UNPKG

@nutui/nutui-react

Version:

京东风格的轻量级移动端 React 组件库,支持一套代码生成 H5 和小程序

255 lines (254 loc) 11.8 kB
:root, page { --nut-scale-f: 1; --nut-scale-font: var(--nut-scale-f, 1); --nut-scale-icon: var(--nut-scale-f, 1); --nut-icon-height: calc(16px * var(--nut-scale-icon, var(--nut-scale-f, 1))) !important; --nut-icon-width: calc(16px * var(--nut-scale-icon, var(--nut-scale-f, 1))) !important; --nut-icon-line-height: calc(16px * var(--nut-scale-icon, var(--nut-scale-f, 1))) !important; } /* #ifdef harmony */ /* #endif */ /* #ifndef harmony */ /* #endif */ .nut-steps { display: flex; } .nut-steps-horizontal { flex-flow: row; } .nut-steps-horizontal .nut-step-head { background-color: var(--nutui-steps-background-color, #ffffff); } .nut-steps-horizontal .nut-step-head-icon .nut-icon { height: var(--nutui-icon-size-10, calc(10px * var(--nut-scale-icon, var(--nut-scale-f, 1)))); width: var(--nutui-icon-size-10, calc(10px * var(--nut-scale-icon, var(--nut-scale-f, 1)))); } .nut-steps-horizontal .nut-step-head-icon .nut-image { width: 100%; height: 100%; background-color: var(--nutui-steps-background-color, #ffffff); } .nut-steps-horizontal .nut-step-head-icon .nut-image img { vertical-align: top; } .nut-steps-horizontal .nut-step.nut-step-process .nut-step-title { color: var(--nutui-steps-process-title-color, var(--nutui-color-primary, #ff0f23)); } .nut-steps-horizontal .nut-step.nut-step-process .nut-step-description { color: var(--nutui-steps-process-description-color, var(--nutui-color-primary, #ff0f23)); } .nut-steps-horizontal .nut-step.nut-step-wait .nut-step-title { color: var(--nutui-steps-wait-title-color, var(--nutui-color-title, #1a1a1a)); } .nut-steps-horizontal .nut-step.nut-step-wait .nut-step-description { color: var(--nutui-steps-wait-description-color, var(--nutui-color-text, #505259)); } .nut-steps-horizontal-single .nut-step { padding-right: var(--nutui-steps-horizontal-item-padding-right, calc(28px * var(--nut-scale-f, 1))); } .nut-steps-horizontal-single .nut-step-last { padding-right: 0 !important; } .nut-steps-horizontal-single .nut-step-line { top: 0; right: 0; height: var(--nutui-steps-base-head-height, calc(14px * var(--nut-scale-f, 1))); width: var(--nutui-steps-horizontal-item-padding-right, calc(28px * var(--nut-scale-f, 1))); padding: var(--nutui-steps-horizontal-item-line-padding, 0 calc(8px * var(--nut-scale-f, 1))); box-sizing: border-box; } .nut-steps-horizontal-single .nut-step-title, .nut-steps-horizontal-single .nut-step-description { padding-left: calc(4px * var(--nut-scale-f, 1)); } .nut-steps-horizontal-single .nut-step-special { padding-right: var(--nutui-steps-horizontal-item-special-padding-right, calc(22px * var(--nut-scale-f, 1))); } .nut-steps-horizontal-single .nut-step-special .nut-step-line { width: 100%; } .nut-steps-horizontal-single .nut-step-special .nut-step-title { padding-right: calc(8px * var(--nut-scale-f, 1)); /* #ifndef dynamic*/ width: fit-content; /* #endif */ } .nut-steps-horizontal-single.nut-steps-horizontal-count-3 .nut-step-special { padding-right: var(--nutui-steps-horizontal-item-special-3-padding-right, calc(9px * var(--nut-scale-f, 1))); } .nut-steps-horizontal-double { width: 100%; justify-content: space-between; } .nut-steps-horizontal-double .nut-step { flex-direction: column; align-items: center; flex: 1; min-width: 0; } .nut-steps-horizontal-double .nut-step-line { top: 0; right: -50%; height: var(--nutui-steps-base-head-height, calc(14px * var(--nut-scale-f, 1))); width: 100%; } .nut-steps-horizontal-double .nut-step-line-inner { /* #ifdef dynamic*/ display: flex; /* #endif */ /* #ifndef dynamic*/ display: inline-flex; /* #endif */ height: var(--nutui-steps-base-line-height, calc(1px * var(--nut-scale-f, 1))); width: 100%; background: var(--nutui-steps-base-line-background, var(--nutui-color-border, rgba(0, 0, 0, 0.06))); } .nut-steps-horizontal-double .nut-step-head { justify-content: center; margin-bottom: calc(5px * var(--nut-scale-f, 1)); } .nut-steps-horizontal-double .nut-step-head-dot-wrap, .nut-steps-horizontal-double .nut-step-head-icon-wrap, .nut-steps-horizontal-double .nut-step-head-text-wrap { background-color: var(--nutui-steps-background-color, #ffffff); padding: var(--nutui-steps-horizontal-item-line-padding, 0 calc(8px * var(--nut-scale-f, 1))); } .nut-steps-horizontal-double .nut-step-head-icon { height: var(--nutui-steps-base-head-icon-size-right, calc(20px * var(--nut-scale-f, 1))); width: var(--nutui-steps-base-head-icon-size-right, calc(20px * var(--nut-scale-f, 1))); } .nut-steps-horizontal-double .nut-step-head-icon .nut-icon { height: var(--nutui-icon-size-12, calc(12px * var(--nut-scale-icon, var(--nut-scale-f, 1)))); width: var(--nutui-icon-size-12, calc(12px * var(--nut-scale-icon, var(--nut-scale-f, 1)))); } .nut-steps-horizontal-double .nut-step-main { align-items: center; margin-left: 0; } .nut-steps-horizontal-double .nut-step-title { height: auto; line-height: calc(20px * var(--nut-scale-f, 1)); white-space: normal; overflow-wrap: break-word; text-align: center; } .nut-steps-horizontal-double.nut-steps-horizontal-icon .nut-step-head, .nut-steps-horizontal-double.nut-steps-horizontal-icon .nut-step-line { height: var(--nutui-steps-base-head-icon-size-right, calc(20px * var(--nut-scale-f, 1))); } .nut-steps-horizontal-double.nut-steps-horizontal-dot .nut-step-head, .nut-steps-horizontal-double.nut-steps-horizontal-dot .nut-step-line { height: var(--nutui-steps-base-head-dot-size, var(--nutui-icon-size-6, calc(6px * var(--nut-scale-icon, var(--nut-scale-f, 1))))); } .nut-steps-horizontal-double.nut-steps-horizontal-text .nut-step-head, .nut-steps-horizontal-double.nut-steps-horizontal-text .nut-step-line { height: var(--nutui-steps-base-head-text-size, var(--nutui-font-size-s, calc(12px * var(--nut-scale-font, var(--nut-scale-f, 1))))); } .nut-steps-vertical { /* #ifdef harmony dynamic*/ flex: 1; min-width: 0; /* #endif */ flex-direction: column; } .nut-steps-vertical .nut-step { padding-bottom: var(--nutui-steps-vertical-item-padding-bottom, calc(12px * var(--nut-scale-f, 1))); } .nut-steps-vertical .nut-step-last { padding-bottom: 0 !important; } .nut-steps-vertical .nut-step-line { height: calc(100% - 4px * var(--nut-scale-f, 1)); width: calc(1px * var(--nut-scale-f, 1)); bottom: 0; } .nut-steps-vertical .nut-step-line-inner { height: 100%; } .nut-steps-vertical .nut-step-head { align-items: center; justify-content: center; height: calc(20px * var(--nut-scale-f, 1)); } .nut-steps-vertical .nut-step-head-icon { width: var(--nutui-steps-vertical-item-icon-size, calc(20px * var(--nut-scale-f, 1))); height: var(--nutui-steps-vertical-item-icon-size, calc(20px * var(--nut-scale-f, 1))); } .nut-steps-vertical .nut-step-head-icon .nut-icon { height: var(--nutui-icon-size-12, calc(12px * var(--nut-scale-icon, var(--nut-scale-f, 1)))); width: var(--nutui-icon-size-12, calc(12px * var(--nut-scale-icon, var(--nut-scale-f, 1)))); } .nut-steps-vertical .nut-step-main { flex: 1; min-width: 0; height: auto; margin-left: calc(8px * var(--nut-scale-f, 1)); } .nut-steps-vertical .nut-step-title { display: flex; align-items: center; height: var(--nutui-steps-vertical-line-height, calc(20px * var(--nut-scale-f, 1))); font-size: var(--nutui-steps-vertical-title-font-size, var(--nutui-font-size-l, calc(15px * var(--nut-scale-font, var(--nut-scale-f, 1))))); /* #ifndef dynamic*/ overflow: auto; /* #endif */ font-weight: 500; margin-bottom: var(--nutui-steps-vertical-title-margin-bottom, calc(3px * var(--nut-scale-f, 1))); } .nut-steps-vertical .nut-step-description { margin: var(--nutui-steps-vertical-description-margin, 0 0 calc(1px * var(--nut-scale-f, 1))); height: auto; line-height: var(--nutui-steps-vertical-line-height, calc(20px * var(--nut-scale-f, 1))); color: var(--nutui-color-title, #1a1a1a); font-size: var(--nutui-steps-vertical-description-font-size, var(--nutui-font-size-base, calc(14px * var(--nut-scale-font, var(--nut-scale-f, 1))))); box-sizing: border-box; } .nut-steps-vertical .nut-step-head-dot-wrap, .nut-steps-vertical .nut-step-head-icon-wrap, .nut-steps-vertical .nut-step-head-text-wrap { display: flex; align-items: center; justify-content: center; width: 100%; background-color: white; position: relative; z-index: 1; } .nut-steps-vertical .nut-step-head-dot-wrap { height: calc(var(--nutui-steps-base-head-dot-size, var(--nutui-icon-size-6, calc(6px * var(--nut-scale-icon, var(--nut-scale-f, 1))))) + 8px * var(--nut-scale-f, 1)); } .nut-steps-vertical .nut-step-head-icon-wrap { height: calc(var(--nutui-steps-vertical-item-icon-size, calc(20px * var(--nut-scale-f, 1))) + 8px * var(--nut-scale-f, 1)); } .nut-steps-vertical .nut-step-head-text-wrap { height: calc(var(--nutui-steps-base-head-text-size, var(--nutui-font-size-s, calc(12px * var(--nut-scale-font, var(--nut-scale-f, 1))))) + 8px * var(--nut-scale-f, 1)); } .nut-steps-vertical-icon .nut-step-head { width: calc(var(--nutui-steps-vertical-item-icon-size, calc(20px * var(--nut-scale-f, 1))) + 1px * var(--nut-scale-f, 1)); min-width: calc(var(--nutui-steps-vertical-item-icon-size, calc(20px * var(--nut-scale-f, 1))) + 1px * var(--nut-scale-f, 1)); } .nut-steps-vertical-icon .nut-step-line { left: calc(var(--nutui-steps-vertical-item-icon-size, calc(20px * var(--nut-scale-f, 1))) / 2); } .nut-steps-vertical-dot .nut-step-head { width: calc(var(--nutui-steps-base-head-dot-size, var(--nutui-icon-size-6, calc(6px * var(--nut-scale-icon, var(--nut-scale-f, 1))))) + 1px * var(--nut-scale-f, 1)); } .nut-steps-vertical-dot .nut-step-line { left: calc(var(--nutui-steps-base-head-dot-size, var(--nutui-icon-size-6, calc(6px * var(--nut-scale-icon, var(--nut-scale-f, 1))))) / 2); } .nut-steps-vertical-text .nut-step-head { width: calc(var(--nutui-steps-base-head-text-size, var(--nutui-font-size-s, calc(12px * var(--nut-scale-font, var(--nut-scale-f, 1))))) + 1px * var(--nut-scale-f, 1)); min-width: calc(var(--nutui-steps-base-head-text-size, var(--nutui-font-size-s, calc(12px * var(--nut-scale-font, var(--nut-scale-f, 1))))) + 1px * var(--nut-scale-f, 1)); } .nut-steps-vertical-text .nut-step-line { left: calc(var(--nutui-steps-base-head-text-size, var(--nutui-font-size-s, calc(12px * var(--nut-scale-font, var(--nut-scale-f, 1))))) / 2); } .nut-steps-horizontal-enhanced .nut-step-finish .nut-step-head-icon, .nut-steps-horizontal-enhanced .nut-step-finish .nut-step-head-text, .nut-steps-vertical-enhanced .nut-step-finish .nut-step-head-icon, .nut-steps-vertical-enhanced .nut-step-finish .nut-step-head-text { background-color: var(--nutui-steps-enhanced-finish-head-background-color, var(--nutui-color-primary-light-pressed, #ffebf1)); } .nut-steps-horizontal-enhanced .nut-step-finish .nut-step-head-icon .nut-icon, .nut-steps-horizontal-enhanced .nut-step-finish .nut-step-head-text .nut-icon, .nut-steps-vertical-enhanced .nut-step-finish .nut-step-head-icon .nut-icon, .nut-steps-vertical-enhanced .nut-step-finish .nut-step-head-text .nut-icon { color: var(--nutui-steps-enhanced-finish-head-icon-color, var(--nutui-color-primary-stop-1, #ff475d)); } .nut-steps-horizontal-enhanced .nut-step-finish .nut-step-head-text, .nut-steps-vertical-enhanced .nut-step-finish .nut-step-head-text { color: var(--nutui-steps-enhanced-finish-head-text-color, var(--nutui-color-primary-stop-1, #ff475d)); } .nut-steps-horizontal-enhanced .nut-step-finish .nut-step-head-dot, .nut-steps-vertical-enhanced .nut-step-finish .nut-step-head-dot { background-color: var(--nutui-steps-enhanced-finish-head-dot-background-color, var(--nutui-color-primary-disabled-special, #ffadbe)); }