@tendaui/components 1.2.4 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_util/scroll.ts +9 -0
- package/alert/_example/base.tsx +13 -0
- package/alert/_example/collapse.tsx +15 -0
- package/badge/_example/base.tsx +10 -0
- package/badge/_example/count.tsx +29 -0
- package/badge/_example/custom-color.tsx +32 -0
- package/badge/_example/dot.tsx +26 -0
- package/badge/_example/max-count.tsx +26 -0
- package/badge/_example/offset.tsx +29 -0
- package/badge/_example/shape.tsx +32 -0
- package/badge/_example/show-zero.tsx +23 -0
- package/badge/_example/size.tsx +35 -0
- package/badge/_example/standalone.tsx +14 -0
- package/badge/_example/text-count.tsx +26 -0
- package/badge/_example/with-button.tsx +23 -0
- package/button/_example/block.tsx +18 -0
- package/button/_example/disabled.tsx +22 -0
- package/button/_example/ghost.tsx +21 -0
- package/button/_example/link.tsx +15 -0
- package/button/_example/loading.tsx +19 -0
- package/button/_example/shape.tsx +18 -0
- package/button/_example/size.tsx +18 -0
- package/button/_example/suffix.tsx +16 -0
- package/button/_example/theme.tsx +14 -0
- package/button/_example/variant-base.tsx +24 -0
- package/button/_example/variant-dashed.tsx +24 -0
- package/button/_example/variant-outline.tsx +24 -0
- package/button/_example/variant-text.tsx +24 -0
- package/checkbox/_example/base.tsx +8 -0
- package/checkbox/_example/controlled.tsx +11 -0
- package/checkbox/_example/group-disabled.tsx +13 -0
- package/checkbox/_example/group-with-check-all.tsx +22 -0
- package/checkbox/_example/group-with-max.tsx +17 -0
- package/checkbox/_example/group-with-options.tsx +18 -0
- package/checkbox/_example/group.tsx +17 -0
- package/checkbox/_example/states.tsx +19 -0
- package/color-picker/ColorPicker.tsx +16 -2
- package/color-picker/_example/base.tsx +12 -0
- package/color-picker/_example/borderless.tsx +17 -0
- package/color-picker/_example/clearable.tsx +12 -0
- package/color-picker/_example/disabled.tsx +17 -0
- package/color-picker/_example/formats.tsx +30 -0
- package/color-picker/_example/manual-input.tsx +39 -0
- package/color-picker/_example/recent-colors.tsx +19 -0
- package/color-picker/_example/swatch-colors.tsx +28 -0
- package/color-picker/_example/with-alpha.tsx +21 -0
- package/color-picker/components/panel/format/inputs.tsx +1 -1
- package/color-picker/components/panel/index.tsx +13 -0
- package/color-picker/components/trigger.tsx +64 -13
- package/color-picker/defaultProps.ts +4 -1
- package/color-picker/utils/color-picker/cmyk.ts +5 -5
- package/color-picker/utils/color-picker/draggable.ts +14 -15
- package/color-picker/utils/color-picker/format.ts +21 -26
- package/color-picker/utils/color-picker/gradient.ts +35 -41
- package/color-picker/utils/color-picker/types.ts +4 -4
- package/config-provider/ConfigContext.tsx +1 -0
- package/config-provider/ConfigProvider.tsx +18 -1
- package/config-provider/type.ts +5 -0
- package/dialog/_example/base.tsx +27 -0
- package/dialog/_example/confirm-loading.tsx +32 -0
- package/dialog/_example/custom-buttons.tsx +24 -0
- package/dialog/_example/full-screen.tsx +26 -0
- package/dialog/_example/hide-buttons.tsx +39 -0
- package/dialog/_example/modeless.tsx +25 -0
- package/dialog/_example/placement.tsx +40 -0
- package/dialog/_example/plugin-example.tsx +69 -0
- package/dialog/_example/themes.tsx +41 -0
- package/drawer/Drawer.tsx +17 -9
- package/drawer/_example/custom-header-footer.tsx +29 -0
- package/drawer/_example/default.tsx +20 -0
- package/drawer/_example/events.tsx +53 -0
- package/drawer/_example/no-footer.tsx +20 -0
- package/drawer/_example/no-overlay.tsx +20 -0
- package/drawer/_example/placement.tsx +43 -0
- package/drawer/_example/size-draggable.tsx +26 -0
- package/drawer/_example/size.tsx +40 -0
- package/drawer/defaultProps.ts +1 -1
- package/fireworks/Fireworks.tsx +1 -10
- package/fireworks/index.ts +0 -1
- package/fireworks/type.ts +0 -1
- package/form/_example/complex.tsx +76 -0
- package/form/_example/default.tsx +58 -0
- package/form/_example/disabled.tsx +26 -0
- package/form/_example/form-list.tsx +74 -0
- package/form/_example/inline-layout.tsx +20 -0
- package/form/_example/label-align.tsx +46 -0
- package/form/_example/methods.tsx +66 -0
- package/form/_example/validation.tsx +71 -0
- package/form/hooks/useFormItemStyle.tsx +19 -7
- package/form/index.ts +20 -2
- package/global-config/default-config.ts +28 -28
- package/global-config/locale/ar_KW.ts +176 -187
- package/global-config/locale/en_US.ts +180 -195
- package/global-config/locale/it_IT.ts +174 -197
- package/global-config/locale/ja_JP.ts +178 -193
- package/global-config/locale/ko_KR.ts +178 -193
- package/global-config/locale/ru_RU.ts +189 -200
- package/global-config/locale/zh_CN.ts +179 -193
- package/global-config/locale/zh_TW.ts +178 -192
- package/global-config/mobile/default-config.ts +3 -3
- package/global-config/mobile/locale/ar_KW.ts +76 -77
- package/global-config/mobile/locale/en_US.ts +76 -77
- package/global-config/mobile/locale/it_IT.ts +76 -77
- package/global-config/mobile/locale/ja_JP.ts +64 -65
- package/global-config/mobile/locale/ko_KR.ts +64 -65
- package/global-config/mobile/locale/ru_RU.ts +76 -77
- package/global-config/mobile/locale/zh_CN.ts +64 -65
- package/global-config/mobile/locale/zh_TW.ts +64 -65
- package/global-config/t.ts +12 -12
- package/hooks/useDebounce.ts +27 -0
- package/hooks/useLastest.ts +6 -2
- package/hooks/useResizeObserve.ts +0 -1
- package/index.ts +1 -1
- package/input/Input.tsx +53 -10
- package/input/_example/auto-width.tsx +14 -0
- package/input/_example/borderless.tsx +17 -0
- package/input/_example/clearable.tsx +14 -0
- package/input/_example/default.tsx +10 -0
- package/input/_example/disabled-readonly.tsx +12 -0
- package/input/_example/events.tsx +42 -0
- package/input/_example/group.tsx +14 -0
- package/input/_example/label-suffix.tsx +12 -0
- package/input/_example/max-length.tsx +11 -0
- package/input/_example/password.tsx +14 -0
- package/input/_example/sizes.tsx +12 -0
- package/input/_example/status.tsx +13 -0
- package/input/_example/text-align.tsx +12 -0
- package/input/_example/with-icon.tsx +13 -0
- package/input/type.ts +3 -0
- package/input/useLengthLimit.ts +122 -0
- package/input-number/_example/align.tsx +23 -0
- package/input-number/_example/auto-width.tsx +8 -0
- package/input-number/_example/default.tsx +8 -0
- package/input-number/_example/events.tsx +45 -0
- package/input-number/_example/format.tsx +27 -0
- package/input-number/_example/large-number.tsx +17 -0
- package/input-number/_example/min-max.tsx +14 -0
- package/input-number/_example/sizes.tsx +35 -0
- package/input-number/_example/status.tsx +65 -0
- package/input-number/_example/step-and-decimal.tsx +14 -0
- package/input-number/_example/themes.tsx +21 -0
- package/input-number/_example/with-suffix.tsx +12 -0
- package/ip-input/_example/controlled.tsx +26 -0
- package/ip-input/_example/default.tsx +12 -0
- package/ip-input/_example/full-featured.tsx +32 -0
- package/ip-input/_example/ipv6.tsx +23 -0
- package/ip-input/_example/keyboard-navigation.tsx +19 -0
- package/ip-input/_example/paste-demo.tsx +23 -0
- package/ip-input/_example/states.tsx +21 -0
- package/ip-input/_example/with-cidr.tsx +23 -0
- package/layout/_example/combine-left.tsx +54 -0
- package/layout/_example/combine-right.tsx +54 -0
- package/layout/_example/custom-aside-width.tsx +56 -0
- package/layout/_example/custom-height.tsx +45 -0
- package/layout/_example/double-sidebar.tsx +57 -0
- package/layout/_example/side-navigation-right.tsx +51 -0
- package/layout/_example/side-navigation.tsx +51 -0
- package/layout/_example/top-navigation.tsx +41 -0
- package/list/_example/async-loading.tsx +46 -0
- package/list/_example/default.tsx +23 -0
- package/list/_example/header-footer.tsx +40 -0
- package/list/_example/multiline.tsx +24 -0
- package/list/_example/scroll-loading.tsx +69 -0
- package/list/_example/sizes.tsx +45 -0
- package/list/_example/split.tsx +36 -0
- package/list/_example/stripe.tsx +24 -0
- package/list/_example/virtual-scroll.tsx +51 -0
- package/list/_example/with-image.tsx +26 -0
- package/loading/_example/default.tsx +6 -0
- package/loading/_example/delay.tsx +53 -0
- package/loading/_example/fullscreen.tsx +29 -0
- package/loading/_example/inherit-color.tsx +24 -0
- package/loading/_example/no-overlay.tsx +15 -0
- package/loading/_example/sizes.tsx +25 -0
- package/loading/_example/with-text.tsx +12 -0
- package/loading/_example/wrapper.tsx +30 -0
- package/notification/_example/default.tsx +31 -0
- package/notification/_example/long-content.tsx +37 -0
- package/notification/_example/stacking.tsx +40 -0
- package/notification/_example/types.tsx +78 -0
- package/notification/_example/usage-example.tsx +62 -0
- package/package.json +4 -3
- package/popup/Popup.tsx +17 -5
- package/popup/_example/controlled.tsx +32 -0
- package/popup/_example/custom-content.tsx +64 -0
- package/popup/_example/default.tsx +19 -0
- package/popup/_example/delay.tsx +35 -0
- package/popup/_example/disabled.tsx +17 -0
- package/popup/_example/no-arrow.tsx +17 -0
- package/popup/_example/placements.tsx +61 -0
- package/popup/_example/triggers.tsx +26 -0
- package/radio/_example/allow-uncheck.tsx +19 -0
- package/radio/_example/button-style.tsx +40 -0
- package/radio/_example/controlled.tsx +13 -0
- package/radio/_example/default.tsx +13 -0
- package/radio/_example/group-disabled.tsx +22 -0
- package/radio/_example/group-with-options.tsx +20 -0
- package/radio/_example/group.tsx +19 -0
- package/radio/_example/sizes.tsx +37 -0
- package/radio/_example/states.tsx +20 -0
- package/select/_example/collapsed.tsx +30 -0
- package/select/_example/creatable.tsx +36 -0
- package/select/_example/custom-content.tsx +26 -0
- package/select/_example/default.tsx +29 -0
- package/select/_example/disabled.tsx +20 -0
- package/select/_example/filterable.tsx +27 -0
- package/select/_example/group-options.tsx +44 -0
- package/select/_example/label-suffix.tsx +24 -0
- package/select/_example/loading.tsx +19 -0
- package/select/_example/multiple.tsx +31 -0
- package/select/_example/sizes.tsx +20 -0
- package/select/_example/status.tsx +27 -0
- package/slider/Slider.tsx +13 -5
- package/slider/_example/custom-label.tsx +19 -0
- package/slider/_example/default.tsx +14 -0
- package/slider/_example/disabled.tsx +17 -0
- package/slider/_example/marks.tsx +31 -0
- package/slider/_example/range.tsx +16 -0
- package/slider/_example/step.tsx +14 -0
- package/slider/_example/vertical.tsx +26 -0
- package/slider/_example/with-input-number.tsx +21 -0
- package/slider/type.ts +1 -1
- package/styles/_vars.scss +16 -0
- package/styles/components/button/_index.scss +3 -3
- package/styles/components/dialog/_index.scss +18 -20
- package/styles/components/drawer/_index.scss +4 -3
- package/styles/components/drawer/_var.scss +1 -1
- package/styles/components/form/_index.scss +7 -6
- package/styles/components/input/_mixins.scss +7 -5
- package/styles/components/input-number/_index.scss +13 -12
- package/styles/components/list/_index.scss +5 -5
- package/styles/components/notification/_index.scss +4 -4
- package/styles/components/slider/_index.scss +8 -8
- package/styles/components/switch/_index.scss +98 -15
- package/styles/components/table/_index.scss +37 -29
- package/styles/components/tabs/_index.scss +8 -9
- package/styles/components/tooltip/_index.scss +104 -0
- package/styles/components/tooltip/_vars.scss +23 -0
- package/switch/_example/async-change.tsx +25 -0
- package/switch/_example/before-change.tsx +22 -0
- package/switch/_example/controlled.tsx +14 -0
- package/switch/_example/custom-value.tsx +21 -0
- package/switch/_example/default.tsx +6 -0
- package/switch/_example/disabled.tsx +25 -0
- package/switch/_example/loading.tsx +17 -0
- package/switch/_example/sizes.tsx +21 -0
- package/switch/_example/with-label.tsx +21 -0
- package/tab/TabPanel.tsx +9 -6
- package/tab/_example/addable.tsx +45 -0
- package/tab/_example/card-theme.tsx +22 -0
- package/tab/_example/default.tsx +22 -0
- package/tab/_example/disabled.tsx +38 -0
- package/tab/_example/lazy.tsx +25 -0
- package/tab/_example/placement.tsx +36 -0
- package/tab/_example/removable.tsx +31 -0
- package/tab/_example/sizes.tsx +31 -0
- package/tab/_example/with-action.tsx +26 -0
- package/table/Cell.tsx +3 -6
- package/table/Ellipsis.tsx +73 -0
- package/table/_example/alignment.tsx +46 -0
- package/table/_example/auto-width.tsx +47 -0
- package/table/_example/bordered-stripe-hover.tsx +42 -0
- package/table/_example/bordered.tsx +42 -0
- package/table/_example/cell-click.tsx +52 -0
- package/table/_example/complex.tsx +82 -0
- package/table/_example/custom-cell.tsx +68 -0
- package/table/_example/custom-empty.tsx +37 -0
- package/table/_example/custom-row-class-name.tsx +57 -0
- package/table/_example/default.tsx +42 -0
- package/table/_example/ellipsis.tsx +56 -0
- package/table/_example/empty.tsx +28 -0
- package/table/_example/fixed-width.tsx +48 -0
- package/table/_example/hover.tsx +42 -0
- package/table/_example/row-click.tsx +52 -0
- package/table/_example/sizes.tsx +57 -0
- package/table/_example/stripe.tsx +42 -0
- package/table/_example/vertical-align.tsx +110 -0
- package/table/hooks/useTableClassName.ts +3 -3
- package/table/index.ts +2 -0
- package/table/type.ts +1 -0
- package/tag/Tag.tsx +1 -1
- package/tag/_example/closable.tsx +44 -0
- package/tag/_example/default.tsx +17 -0
- package/tag/_example/disabled.tsx +19 -0
- package/tag/_example/sizes.tsx +18 -0
- package/tag/_example/variants.tsx +37 -0
- package/tag-input/_example/collapsed.tsx +27 -0
- package/tag-input/_example/controlled-uncontrolled.tsx +26 -0
- package/tag-input/_example/default.tsx +15 -0
- package/tag-input/_example/disabled-readonly.tsx +21 -0
- package/tag-input/_example/events.tsx +64 -0
- package/tag-input/_example/excess-display.tsx +27 -0
- package/tag-input/_example/max-tags.tsx +22 -0
- package/tag-input/_example/sizes.tsx +21 -0
- package/tag-input/_example/status.tsx +37 -0
- package/tag-input/_example/with-label.tsx +23 -0
- package/tag-input/hooks/useTagList.tsx +1 -1
- package/tooltip/Tooltip.tsx +76 -0
- package/tooltip/_example/base.tsx +26 -0
- package/tooltip/_example/custom-content.tsx +47 -0
- package/tooltip/_example/placement.tsx +33 -0
- package/tooltip/_example/theme.tsx +34 -0
- package/tooltip/defaultProps.ts +14 -0
- package/tooltip/index.ts +7 -0
- package/tooltip/style/index.js +1 -0
- package/tooltip/type.ts +99 -0
- package/utils/log/index.ts +1 -1
- package/utils/log/log.ts +2 -3
- package/utils/log/types.ts +1 -4
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
@use "../../_vars.scss" as *;
|
|
2
2
|
// 组件允许单个组件打包,因此默认引入公共基础样式
|
|
3
3
|
|
|
4
|
-
@use
|
|
4
|
+
@use "../../_vars.scss" as *;
|
|
5
5
|
|
|
6
|
-
@use
|
|
6
|
+
@use "./_vars.scss" as *;
|
|
7
7
|
|
|
8
|
-
@use
|
|
8
|
+
@use "./_animate.scss" as *;
|
|
9
9
|
|
|
10
|
-
@use
|
|
10
|
+
@use "./_mixins.scss" as *;
|
|
11
11
|
|
|
12
|
-
@use
|
|
12
|
+
@use "../../mixins/_reset.scss" as *;
|
|
13
13
|
|
|
14
|
-
@use
|
|
14
|
+
@use "../../mixins/_scrollbar.scss" as *;
|
|
15
15
|
|
|
16
16
|
// <name> 替换为组件名
|
|
17
17
|
.#{$prefix}-dialog {
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
font-size: $dialog-icon-size;
|
|
65
65
|
display: inline-flex;
|
|
66
66
|
align-items: center;
|
|
67
|
-
margin-
|
|
67
|
+
margin-inline-end: $dialog-header-icon-margin-right;
|
|
68
68
|
flex-shrink: 0;
|
|
69
69
|
}
|
|
70
70
|
}
|
|
@@ -106,9 +106,7 @@
|
|
|
106
106
|
|
|
107
107
|
box-sizing: border-box;
|
|
108
108
|
padding: $dialog-body-padding-fullscreen;
|
|
109
|
-
height: calc(
|
|
110
|
-
100% - $dialog-header-height-fullscreen - $dialog-footer-height-fullscreen
|
|
111
|
-
);
|
|
109
|
+
height: calc(100% - $dialog-header-height-fullscreen - $dialog-footer-height-fullscreen);
|
|
112
110
|
overflow: auto;
|
|
113
111
|
}
|
|
114
112
|
|
|
@@ -121,10 +119,10 @@
|
|
|
121
119
|
|
|
122
120
|
&__footer {
|
|
123
121
|
width: 100%;
|
|
124
|
-
text-align:
|
|
122
|
+
text-align: end;
|
|
125
123
|
padding: $dialog-footer-padding;
|
|
126
124
|
.#{$prefix}-button + .#{$prefix}-button {
|
|
127
|
-
margin-
|
|
125
|
+
margin-inline-start: $dialog-footer-button-margin-left;
|
|
128
126
|
}
|
|
129
127
|
}
|
|
130
128
|
|
|
@@ -202,7 +200,7 @@
|
|
|
202
200
|
width: 100%;
|
|
203
201
|
height: 100%;
|
|
204
202
|
|
|
205
|
-
// modeless 点击穿�?即可以操作背景后的元�?
|
|
203
|
+
// modeless 点击穿�?即可以操作背景后的元�?
|
|
206
204
|
&.#{$prefix}-dialog__ctx--modeless {
|
|
207
205
|
pointer-events: none;
|
|
208
206
|
}
|
|
@@ -238,7 +236,7 @@
|
|
|
238
236
|
&.#{$prefix}-not-display {
|
|
239
237
|
display: none;
|
|
240
238
|
}
|
|
241
|
-
// 遮罩�?
|
|
239
|
+
// 遮罩�?
|
|
242
240
|
.#{$prefix}-dialog__mask {
|
|
243
241
|
position: fixed;
|
|
244
242
|
top: 0;
|
|
@@ -249,7 +247,7 @@
|
|
|
249
247
|
background: $dialog-mask-bg-color;
|
|
250
248
|
pointer-events: auto;
|
|
251
249
|
}
|
|
252
|
-
// wrap 滚动的显示层 固定为页面窗口大�?
|
|
250
|
+
// wrap 滚动的显示层 固定为页面窗口大�?
|
|
253
251
|
.#{$prefix}-dialog__wrap {
|
|
254
252
|
position: fixed;
|
|
255
253
|
top: 0;
|
|
@@ -260,22 +258,22 @@
|
|
|
260
258
|
overflow: auto;
|
|
261
259
|
@include scrollbar(8px, 2px);
|
|
262
260
|
}
|
|
263
|
-
// 定位�?用于实现居中 或者距离顶�?定位
|
|
261
|
+
// 定位�?用于实现居中 或者距离顶�?定位
|
|
264
262
|
.#{$prefix}-dialog__position {
|
|
265
|
-
// 因为内容会超�?使用flex布局
|
|
263
|
+
// 因为内容会超�?使用flex布局
|
|
266
264
|
display: flex;
|
|
267
265
|
justify-content: center;
|
|
268
266
|
min-height: 100%;
|
|
269
267
|
width: 100%;
|
|
270
268
|
// 通过修改position为absolute进行拖拽定位
|
|
271
269
|
position: relative;
|
|
272
|
-
// 设置最小距离顶部底部距�?
|
|
270
|
+
// 设置最小距离顶部底部距�?
|
|
273
271
|
padding: 48px 0;
|
|
274
272
|
box-sizing: border-box;
|
|
275
273
|
// 居中和距顶部布局
|
|
276
274
|
&.#{$prefix}-dialog--top {
|
|
277
275
|
align-items: flex-start;
|
|
278
|
-
// 这里top api实现 更改padding 因为子元素拖拽定�?如果使用子元素margin 拖拽时需要计算margin 比较麻烦
|
|
276
|
+
// 这里top api实现 更改padding 因为子元素拖拽定�?如果使用子元素margin 拖拽时需要计算margin 比较麻烦
|
|
279
277
|
padding-top: $dialog-top-position-top;
|
|
280
278
|
}
|
|
281
279
|
// 垂直居中布局
|
|
@@ -285,7 +283,7 @@
|
|
|
285
283
|
}
|
|
286
284
|
|
|
287
285
|
.#{$prefix}-dialog__position_fullscreen {
|
|
288
|
-
// 因为内容会超�?使用flex布局
|
|
286
|
+
// 因为内容会超�?使用flex布局
|
|
289
287
|
display: flex;
|
|
290
288
|
justify-content: center;
|
|
291
289
|
min-height: 100%;
|
|
@@ -141,11 +141,11 @@
|
|
|
141
141
|
box-sizing: border-box;
|
|
142
142
|
|
|
143
143
|
.#{$prefix}-button {
|
|
144
|
-
margin-
|
|
144
|
+
margin-inline-start: $drawer-footer-btn-margin-left;
|
|
145
145
|
}
|
|
146
146
|
|
|
147
147
|
.#{$prefix}-button:first-child {
|
|
148
|
-
margin-
|
|
148
|
+
margin-inline-start: 0;
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
151
|
|
|
@@ -157,7 +157,7 @@
|
|
|
157
157
|
width: $drawer-close-btn-size;
|
|
158
158
|
height: $drawer-close-btn-size;
|
|
159
159
|
top: calc((#{$drawer-header-height} - #{$drawer-close-btn-size}) / 2);
|
|
160
|
-
|
|
160
|
+
inset-inline-end: $drawer-close-btn-position-right;
|
|
161
161
|
color: $drawer-close-btn-color;
|
|
162
162
|
background-color: $drawer-close-btn-bg-color;
|
|
163
163
|
border-radius: $border-radius-default;
|
|
@@ -203,3 +203,4 @@
|
|
|
203
203
|
[tabindex="-1"]:focus {
|
|
204
204
|
outline: none !important;
|
|
205
205
|
}
|
|
206
|
+
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
|
|
39
39
|
&__label {
|
|
40
40
|
float: left;
|
|
41
|
-
padding-
|
|
41
|
+
padding-inline-end: $form-label-padding-right;
|
|
42
42
|
vertical-align: middle;
|
|
43
43
|
line-height: $form-item-control-height;
|
|
44
44
|
color: $form-color-label;
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
&--required:not(.#{$prefix}-form__label--required-right) {
|
|
62
62
|
label::before {
|
|
63
63
|
display: inline-block;
|
|
64
|
-
margin-
|
|
64
|
+
margin-inline-end: $form-label-margin-right-required;
|
|
65
65
|
color: $form-color-error;
|
|
66
66
|
line-height: $form-label-line-height;
|
|
67
67
|
content: '*';
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
&--required-right {
|
|
72
72
|
label::after {
|
|
73
73
|
display: inline-block;
|
|
74
|
-
margin-
|
|
74
|
+
margin-inline-start: $form-label-margin-left-required;
|
|
75
75
|
color: $form-color-error;
|
|
76
76
|
line-height: $form-label-line-height;
|
|
77
77
|
content: '*';
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
// formItem 嵌套情况无间�?
|
|
102
102
|
.#{$prefix}-form__item {
|
|
103
103
|
margin-bottom: 0;
|
|
104
|
-
margin-
|
|
104
|
+
margin-inline-end: $form-item-margin-right-inline;
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
107
|
|
|
@@ -133,7 +133,7 @@
|
|
|
133
133
|
}
|
|
134
134
|
|
|
135
135
|
button + button {
|
|
136
|
-
margin-
|
|
136
|
+
margin-inline-start: $form-status-button-margin;
|
|
137
137
|
}
|
|
138
138
|
}
|
|
139
139
|
}
|
|
@@ -147,7 +147,7 @@
|
|
|
147
147
|
margin: 0;
|
|
148
148
|
min-width: 200px;
|
|
149
149
|
display: inline-block;
|
|
150
|
-
margin-
|
|
150
|
+
margin-inline-end: $form-item-margin-right-inline;
|
|
151
151
|
}
|
|
152
152
|
}
|
|
153
153
|
|
|
@@ -173,3 +173,4 @@
|
|
|
173
173
|
// 输入框状�?
|
|
174
174
|
@include input-status(warning);
|
|
175
175
|
@include input-status(error);
|
|
176
|
+
|
|
@@ -73,18 +73,20 @@
|
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
-
//
|
|
76
|
+
// 状态样式:使用 map-get 从映射中获取颜色值
|
|
77
77
|
@mixin input-status($status) {
|
|
78
78
|
&.#{$prefix}-is-#{$status} {
|
|
79
|
-
border-color:
|
|
80
|
-
|
|
79
|
+
border-color: map-get(map-get($input-color, border), $status);
|
|
80
|
+
&:hover {
|
|
81
|
+
border-color: map-get(map-get($input-color, border), $status);
|
|
82
|
+
}
|
|
81
83
|
&:focus,
|
|
82
84
|
&.#{$prefix}-input--focused {
|
|
83
|
-
box-shadow: 0 0 0 2px
|
|
85
|
+
box-shadow: 0 0 0 2px map-get(map-get($input-color, box-shadow), $status);
|
|
84
86
|
}
|
|
85
87
|
|
|
86
88
|
& > .#{$prefix}-input__extra {
|
|
87
|
-
color:
|
|
89
|
+
color: map-get(map-get($input-color, extra), $status);
|
|
88
90
|
}
|
|
89
91
|
}
|
|
90
92
|
}
|
|
@@ -21,7 +21,7 @@ $inputNumberCls: "#{$prefix}-input-number";
|
|
|
21
21
|
|
|
22
22
|
&:not(&--column) {
|
|
23
23
|
> .#{$prefix}-input-number__decrease + .#{$prefix}-input__wrap {
|
|
24
|
-
margin-
|
|
24
|
+
margin-inline-start: $comp-margin-xs;
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
|
|
@@ -36,15 +36,15 @@ $inputNumberCls: "#{$prefix}-input-number";
|
|
|
36
36
|
|
|
37
37
|
> .#{$prefix}-input__tips {
|
|
38
38
|
position: absolute;
|
|
39
|
-
|
|
39
|
+
inset-inline-start: 0;
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
// 输入框和右置内容之间需要间距 input + .#{$prefix}-input__suffix {
|
|
43
|
-
margin-
|
|
43
|
+
margin-inline-start: $input-number-padding-horizontal-default;
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
.#{$prefix}-input__prefix {
|
|
47
|
-
margin-
|
|
47
|
+
margin-inline-end: $input-number-padding-horizontal-default;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
.#{$inputCls} {
|
|
@@ -127,11 +127,11 @@ $inputNumberCls: "#{$prefix}-input-number";
|
|
|
127
127
|
}
|
|
128
128
|
|
|
129
129
|
.#{$inputNumberCls}__decrease {
|
|
130
|
-
|
|
130
|
+
inset-inline-start: 0;
|
|
131
131
|
}
|
|
132
132
|
|
|
133
133
|
.#{$inputNumberCls}__increase {
|
|
134
|
-
|
|
134
|
+
inset-inline-end: -8px;
|
|
135
135
|
}
|
|
136
136
|
|
|
137
137
|
.#{$inputNumberCls}.#{$prefix}-is-disabled {
|
|
@@ -197,7 +197,7 @@ $inputNumberCls: "#{$prefix}-input-number";
|
|
|
197
197
|
.#{$inputCls} {
|
|
198
198
|
height: $input-number-inner-height-l;
|
|
199
199
|
line-height: $input-number-inner-height-l;
|
|
200
|
-
padding-
|
|
200
|
+
padding-inline-end: calc($input-number-right-button-width-l + $input-number-padding-horizontal-default);
|
|
201
201
|
}
|
|
202
202
|
|
|
203
203
|
.#{$inputNumberCls}__decrease,
|
|
@@ -252,7 +252,7 @@ $inputNumberCls: "#{$prefix}-input-number";
|
|
|
252
252
|
width: 100%;
|
|
253
253
|
box-sizing: border-box;
|
|
254
254
|
margin: 0;
|
|
255
|
-
padding-
|
|
255
|
+
padding-inline-end: calc($input-number-right-button-width + $input-number-padding-horizontal-default);
|
|
256
256
|
border-radius: $border-radius-default;
|
|
257
257
|
}
|
|
258
258
|
|
|
@@ -261,9 +261,9 @@ $inputNumberCls: "#{$prefix}-input-number";
|
|
|
261
261
|
width: $input-number-right-button-width;
|
|
262
262
|
height: $input-number-button-column-height;
|
|
263
263
|
border: 0;
|
|
264
|
-
|
|
264
|
+
inset-inline-start: auto;
|
|
265
265
|
top: initial;
|
|
266
|
-
|
|
266
|
+
inset-inline-end: 1px;
|
|
267
267
|
border-radius: 0;
|
|
268
268
|
background: $input-number-right-button-bg-color;
|
|
269
269
|
opacity: 0;
|
|
@@ -343,9 +343,10 @@ $inputNumberCls: "#{$prefix}-input-number";
|
|
|
343
343
|
.#{$inputNumberCls}--row {
|
|
344
344
|
.#{$prefix}-input__wrap {
|
|
345
345
|
width: initial;
|
|
346
|
-
margin-
|
|
346
|
+
margin-inline-end: $comp-margin-xs;
|
|
347
347
|
}
|
|
348
348
|
.#{$prefix}-input-number__increase {
|
|
349
|
-
|
|
349
|
+
inset-inline-end: 0;
|
|
350
350
|
}
|
|
351
351
|
}
|
|
352
|
+
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
&::after {
|
|
31
31
|
content: "";
|
|
32
32
|
position: absolute;
|
|
33
|
-
|
|
33
|
+
inset-inline-start: 0;
|
|
34
34
|
bottom: 0;
|
|
35
35
|
width: 100%;
|
|
36
36
|
height: 1px;
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
border-radius: calc($list-avatar-size / 2);
|
|
55
55
|
overflow: hidden;
|
|
56
56
|
background: $list-avatar-bg-color;
|
|
57
|
-
margin-
|
|
57
|
+
margin-inline-end: $list-avatar-margin-right;
|
|
58
58
|
flex-shrink: 0;
|
|
59
59
|
|
|
60
60
|
img {
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
&-description {
|
|
75
|
-
margin-
|
|
75
|
+
margin-inline-end: $list-meta-description-margin-right;
|
|
76
76
|
color: $list-meta-description-color;
|
|
77
77
|
}
|
|
78
78
|
}
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
display: inline-block;
|
|
87
87
|
|
|
88
88
|
&:not(:last-child) {
|
|
89
|
-
margin-
|
|
89
|
+
margin-inline-end: $list-action-margin-right;
|
|
90
90
|
}
|
|
91
91
|
|
|
92
92
|
.t-icon {
|
|
@@ -163,7 +163,7 @@
|
|
|
163
163
|
|
|
164
164
|
.#{$prefix}-loading {
|
|
165
165
|
font-size: $list-load-font-size;
|
|
166
|
-
margin-
|
|
166
|
+
margin-inline-end: $list-load-icon-margin;
|
|
167
167
|
}
|
|
168
168
|
|
|
169
169
|
.#{$prefix}-loading.#{$prefix}-is-load-more {
|
|
@@ -10,15 +10,15 @@
|
|
|
10
10
|
|
|
11
11
|
.#{$prefix}-notify {
|
|
12
12
|
&[data-x-position='right'] {
|
|
13
|
-
|
|
13
|
+
inset-inline-end: 8px;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
&[data-x-position='left'] {
|
|
17
|
-
|
|
17
|
+
inset-inline-start: 8px;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
&[data-x-position='center'] {
|
|
21
|
-
|
|
21
|
+
inset-inline-start: 50%;
|
|
22
22
|
transform: translateX(-50%);
|
|
23
23
|
}
|
|
24
24
|
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
&__icon {
|
|
91
91
|
width: $notification-icon-width;
|
|
92
92
|
text-align: center;
|
|
93
|
-
margin-
|
|
93
|
+
margin-inline-end: $notification-icon-margin-right;
|
|
94
94
|
|
|
95
95
|
.t-icon {
|
|
96
96
|
font-size: $notification-icon-font-size;
|
|
@@ -11,11 +11,11 @@
|
|
|
11
11
|
.#{$prefix}-slider__input-container {
|
|
12
12
|
display: flex;
|
|
13
13
|
align-items: center;
|
|
14
|
-
margin-
|
|
14
|
+
margin-inline-start: $slider-input-margin-left;
|
|
15
15
|
|
|
16
16
|
&.is-vertical {
|
|
17
17
|
padding-top: $slider-input-vertical-padding-top;
|
|
18
|
-
margin-
|
|
18
|
+
margin-inline-start: $slider-input-vertical-margin-left;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
.#{$prefix}-slider__center-line {
|
|
@@ -120,7 +120,7 @@
|
|
|
120
120
|
&__mark {
|
|
121
121
|
position: absolute;
|
|
122
122
|
top: 2px;
|
|
123
|
-
|
|
123
|
+
inset-inline-start: 0;
|
|
124
124
|
width: 100%;
|
|
125
125
|
}
|
|
126
126
|
|
|
@@ -168,14 +168,14 @@
|
|
|
168
168
|
|
|
169
169
|
.#{$prefix}-slider__handle {
|
|
170
170
|
margin-top: $slider-vertical-handle-margin-top;
|
|
171
|
-
margin-
|
|
171
|
+
margin-inline-start: $slider-vertical-handle-margin-left;
|
|
172
172
|
top: auto;
|
|
173
173
|
transform: translateY(50%);
|
|
174
174
|
}
|
|
175
175
|
|
|
176
176
|
.#{$prefix}-slider__mark {
|
|
177
177
|
top: 0;
|
|
178
|
-
|
|
178
|
+
inset-inline-start: 12px;
|
|
179
179
|
width: $slider-vertical-mark-width;
|
|
180
180
|
height: 100%;
|
|
181
181
|
}
|
|
@@ -183,14 +183,14 @@
|
|
|
183
183
|
.#{$prefix}-slider__stop {
|
|
184
184
|
width: $slider-stop-height;
|
|
185
185
|
height: $slider-stop-width;
|
|
186
|
-
|
|
186
|
+
inset-inline-start: 4px;
|
|
187
187
|
background-color: $slider-background;
|
|
188
188
|
}
|
|
189
189
|
|
|
190
190
|
.#{$prefix}-slider__mark-text {
|
|
191
191
|
transform: translateY(-50%);
|
|
192
192
|
margin-top: $slider-vertical-text-margin-top;
|
|
193
|
-
margin-
|
|
193
|
+
margin-inline-start: $slider-vertical-text-margin-left;
|
|
194
194
|
}
|
|
195
195
|
}
|
|
196
196
|
|
|
@@ -198,7 +198,7 @@
|
|
|
198
198
|
top: auto;
|
|
199
199
|
position: absolute;
|
|
200
200
|
z-index: 2;
|
|
201
|
-
|
|
201
|
+
inset-inline-start: 50%;
|
|
202
202
|
transform: translate(-50%, 50%);
|
|
203
203
|
background-color: transparent;
|
|
204
204
|
text-align: center;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
@use "../../_vars.scss" as *;
|
|
2
|
-
@use
|
|
2
|
+
@use "../../_vars.scss" as *;
|
|
3
3
|
|
|
4
|
-
@use
|
|
4
|
+
@use "./_vars.scss" as *;
|
|
5
5
|
|
|
6
|
-
@use
|
|
6
|
+
@use "./_mixins.scss" as *;
|
|
7
7
|
|
|
8
|
-
@use
|
|
8
|
+
@use "../../mixins/_reset.scss" as *;
|
|
9
9
|
|
|
10
10
|
.#{$prefix}-switch {
|
|
11
11
|
@include reset;
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
&::before {
|
|
53
|
-
content:
|
|
53
|
+
content: "";
|
|
54
54
|
position: absolute;
|
|
55
55
|
top: 0;
|
|
56
56
|
left: 0;
|
|
@@ -85,8 +85,7 @@
|
|
|
85
85
|
display: inline-flex;
|
|
86
86
|
align-items: center;
|
|
87
87
|
color: $switch-content-color-unchecked;
|
|
88
|
-
padding: 0 $switch-content-margin-right-default 0
|
|
89
|
-
$switch-content-margin-left-default;
|
|
88
|
+
padding: 0 $switch-content-margin-right-default 0 $switch-content-margin-left-default;
|
|
90
89
|
font-size: $switch-content-font-size-default;
|
|
91
90
|
min-width: $switch-min-width-default;
|
|
92
91
|
transition: $switch-content-transition;
|
|
@@ -106,18 +105,13 @@
|
|
|
106
105
|
.#{$prefix}-switch__handle {
|
|
107
106
|
left: calc(100% - $switch-width-border-check-default);
|
|
108
107
|
transform: translate(-100%, 0);
|
|
109
|
-
width: calc(
|
|
110
|
-
|
|
111
|
-
);
|
|
112
|
-
height: calc(
|
|
113
|
-
$switch-height-default - 2 * $switch-width-border-check-default
|
|
114
|
-
);
|
|
108
|
+
width: calc($switch-height-default - 2 * $switch-width-border-check-default);
|
|
109
|
+
height: calc($switch-height-default - 2 * $switch-width-border-check-default);
|
|
115
110
|
top: $switch-width-border-check-default;
|
|
116
111
|
}
|
|
117
112
|
|
|
118
113
|
.#{$prefix}-switch__content {
|
|
119
|
-
padding: 0 $switch-content-margin-left-default 0
|
|
120
|
-
$switch-content-margin-right-default;
|
|
114
|
+
padding: 0 $switch-content-margin-left-default 0 $switch-content-margin-right-default;
|
|
121
115
|
color: $switch-content-color-checked;
|
|
122
116
|
}
|
|
123
117
|
}
|
|
@@ -169,6 +163,35 @@
|
|
|
169
163
|
}
|
|
170
164
|
}
|
|
171
165
|
|
|
166
|
+
[dir="rtl"] .#{$prefix}-switch {
|
|
167
|
+
&__handle {
|
|
168
|
+
left: auto;
|
|
169
|
+
right: $switch-width-border-default;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
&:active:not(.#{$prefix}-is-disabled):not(.#{$prefix}-is-loading) {
|
|
173
|
+
.#{$prefix}-switch__handle::before {
|
|
174
|
+
left: -6px;
|
|
175
|
+
right: 0;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
&.#{$prefix}-is-checked {
|
|
179
|
+
.#{$prefix}-switch__handle::before {
|
|
180
|
+
right: -6px;
|
|
181
|
+
left: 0;
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
&.#{$prefix}-is-checked {
|
|
187
|
+
.#{$prefix}-switch__handle {
|
|
188
|
+
right: auto;
|
|
189
|
+
left: $switch-width-border-check-default;
|
|
190
|
+
transform: none;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
|
|
172
195
|
.#{$prefix}-switch.#{$prefix}-size-l {
|
|
173
196
|
min-width: $switch-min-width-l;
|
|
174
197
|
height: $switch-height-l;
|
|
@@ -213,6 +236,7 @@
|
|
|
213
236
|
&.#{$prefix}-is-checked {
|
|
214
237
|
.#{$prefix}-switch__handle {
|
|
215
238
|
left: calc(100% - $switch-width-border-check-l);
|
|
239
|
+
transform: translate(-100%, 0);
|
|
216
240
|
top: $switch-width-border-check-l;
|
|
217
241
|
width: calc($switch-height-l - 2 * $switch-width-border-check-l);
|
|
218
242
|
height: calc($switch-height-l - 2 * $switch-width-border-check-l);
|
|
@@ -224,6 +248,35 @@
|
|
|
224
248
|
}
|
|
225
249
|
}
|
|
226
250
|
|
|
251
|
+
[dir="rtl"] .#{$prefix}-switch.#{$prefix}-size-l {
|
|
252
|
+
&:active:not(.#{$prefix}-is-disabled):not(.#{$prefix}-is-loading) {
|
|
253
|
+
.#{$prefix}-switch__handle::before {
|
|
254
|
+
left: -8px;
|
|
255
|
+
right: 0;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
&.#{$prefix}-is-checked {
|
|
259
|
+
.#{$prefix}-switch__handle::before {
|
|
260
|
+
right: -8px;
|
|
261
|
+
left: 0;
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
.#{$prefix}-switch__handle {
|
|
267
|
+
left: auto;
|
|
268
|
+
right: $switch-width-border-l;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
&.#{$prefix}-is-checked {
|
|
272
|
+
.#{$prefix}-switch__handle {
|
|
273
|
+
right: auto;
|
|
274
|
+
left: $switch-width-border-check-l;
|
|
275
|
+
transform: none;
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
|
|
227
280
|
.#{$prefix}-switch.#{$prefix}-size-s {
|
|
228
281
|
min-width: $switch-min-width-s;
|
|
229
282
|
height: $switch-height-s;
|
|
@@ -268,6 +321,7 @@
|
|
|
268
321
|
&.#{$prefix}-is-checked {
|
|
269
322
|
.#{$prefix}-switch__handle {
|
|
270
323
|
left: calc(100% - $switch-width-border-check-s);
|
|
324
|
+
transform: translate(-100%, 0);
|
|
271
325
|
top: $switch-width-border-check-s;
|
|
272
326
|
width: calc($switch-height-s - 2 * $switch-width-border-check-s);
|
|
273
327
|
height: calc($switch-height-s - 2 * $switch-width-border-check-s);
|
|
@@ -278,3 +332,32 @@
|
|
|
278
332
|
}
|
|
279
333
|
}
|
|
280
334
|
}
|
|
335
|
+
|
|
336
|
+
[dir="rtl"] .#{$prefix}-switch.#{$prefix}-size-s {
|
|
337
|
+
&:active:not(.#{$prefix}-is-disabled):not(.#{$prefix}-is-loading) {
|
|
338
|
+
.#{$prefix}-switch__handle::before {
|
|
339
|
+
left: -4px;
|
|
340
|
+
right: 0;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
&.#{$prefix}-is-checked {
|
|
344
|
+
.#{$prefix}-switch__handle::before {
|
|
345
|
+
right: -4px;
|
|
346
|
+
left: 0;
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
.#{$prefix}-switch__handle {
|
|
352
|
+
left: auto;
|
|
353
|
+
right: $switch-width-border-s;
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
&.#{$prefix}-is-checked {
|
|
357
|
+
.#{$prefix}-switch__handle {
|
|
358
|
+
right: auto;
|
|
359
|
+
left: $switch-width-border-check-s;
|
|
360
|
+
transform: none;
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
}
|