UNPKG

@nutui/nutui-react-taro

Version:

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

271 lines (267 loc) 5.24 kB
/* #ifdef harmony */ /* #endif */ /* #ifndef harmony */ /* #endif */ .nut-range-container { display: flex; flex-direction: row; position: relative; width: 100%; height: 4px; align-items: center; justify-content: space-between; } .nut-range-container-native { height: auto; } .nut-range { display: block; position: relative; height: 4px; margin: 0 15px; background-color: #ffebf1; border-radius: 2px; flex: 1; cursor: pointer; } .nut-range::before { position: absolute; inset-block: -8px; inset-inline: 0; content: ""; } .nut-range-min { font-size: 12px; color: #1a1a1a; user-select: none; } .nut-range-max { font-size: 12px; color: #1a1a1a; user-select: none; } .nut-range-bar { display: block; position: relative; width: 100%; height: 100%; max-width: 100%; max-height: 100%; background: #ff0f23; border-radius: 2px; transition: all 0.2s; } .nut-range-button { position: absolute; display: flex; width: 24px; height: 24px; background: #ffffff; border-radius: 50%; box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.15); border: 1px solid #ff0f23; outline: none; align-items: center; top: 50%; left: 50%; } .nut-range-button-wrapper { width: 24px; height: 24px; } .nut-range-button-wrapper-right { width: 24px; height: 24px; } .nut-range-button-wrapper-left { width: 24px; height: 24px; } .nut-range-button-wrapper, .nut-range-button-wrapper-right { touch-action: none; position: absolute; top: 50%; left: 100%; cursor: grab; outline: none; } .nut-range-button-wrapper-left { position: absolute; top: 50%; left: 0; cursor: grab; outline: none; touch-action: none; } .nut-range-button-number { position: relative; width: 200%; height: 24px; line-height: 14px; padding: 5px 0; left: 50%; display: flex; align-items: center; justify-content: center; user-select: none; font-size: 12px; color: #1a1a1a; text-align: center; vertical-align: center; box-sizing: border-box; } .nut-range-disabled { cursor: not-allowed; opacity: 0.54; } .nut-range-disabled .nut-range-button-wrapper, .nut-range-disabled .nut-range-button-wrapper-left, .nut-range-disabled .nut-range-button-wrapper-right { cursor: not-allowed; } .nut-range-mark { position: absolute; width: 100%; height: 14px; overflow: visible; top: 50%; } .nut-range-mark-text-wrapper { position: absolute; height: 100%; top: 14px; display: inline-block; transform: translateX(-10px); } .nut-range-mark-text { position: absolute; line-height: 16px; font-size: 12px; color: #999; text-align: center; word-break: keep-all; user-select: none; } .nut-range-tick { position: absolute; top: -20px; width: 11px; height: 11px; left: 0px; border-radius: 6px; background: #ffebf1; } .nut-range-tick-active { background: #ff0f23; } .nut-range-vertical-container { height: 100%; flex-direction: column; padding: 0px 15px; } .nut-range-vertical { width: 4px; margin: 15px 0px; } .nut-range-vertical-button-wrapper, .nut-range-vertical-button-wrapper-right { position: absolute; top: initial; top: 100%; left: 50%; right: initial; } .nut-range-vertical-button-wrapper-left { top: 0px; left: 50%; right: initial; } .nut-range-vertical-button-number { left: 0px; top: 50%; } .nut-range-vertical-mark { position: absolute; width: 36px; height: 100%; top: initial; right: 50%; overflow: visible; font-size: 12px; padding: 0px; } .nut-range-vertical-mark-hm { left: -34px; } .nut-range-vertical-mark-text-wrapper { height: 16px; position: absolute; display: inline-block; user-select: none; transform: translateY(-11px); } .nut-range-vertical-mark-text { height: 100%; line-height: 16px; color: #999; text-align: center; word-break: keep-all; } .nut-range-vertical-tick { position: absolute; top: 2px; left: 31px; width: 10px; height: 10px; border-radius: 5px; background: #ffebf1; } .nut-range-vertical-tick-active { background: #ff0f23; } [dir=rtl] .nut-range-button-wrapper, [dir=rtl] .nut-range-button-wrapper-right, .rtl-nut-range-button-wrapper, .rtl-nut-range-button-wrapper-right { left: 0; right: initial; } [dir=rtl] .nut-range-button-wrapper-left, .rtl-nut-range-button-wrapper-left { right: 0; left: initial; } [dir=rtl] .nut-range-tick, .rtl-nut-range-tick { right: 0px; left: initial; } [dir=rtl] .nut-range-mark-text, .rtl-nut-range-mark-text { transform: translateX(10px); } [dir=rtl] .nut-range-vertical-button-wrapper, [dir=rtl] .nut-range-vertical-button-wrapper-right, .rtl-nut-range-vertical-button-wrapper, .rtl-nut-range-vertical-button-wrapper-right { right: 50%; left: initial; } [dir=rtl] .nut-range-vertical-button-wrapper-left, .rtl-nut-range-vertical-button-wrapper-left { right: 50%; left: initial; } [dir=rtl] .nut-range-vertical-mark, .rtl-nut-range-vertical-mark { right: auto; left: 50%; } [dir=rtl] .nut-range-vertical-tick, .rtl-nut-range-vertical-tick { left: auto; right: 30px; margin-left: 0; margin-right: 0px; } [dir=rtl] .nut-range-vertical-mark-text-wrapper, .rtl-nut-range-vertical-mark-text-wrapper { transform: translateY(-11px); }