@tendaui/components 1.3.0 → 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/LICENSE +21 -21
- package/README.md +176 -176
- package/button/_example/ghost.tsx +2 -5
- package/color-picker/utils/color-picker/cmyk.ts +89 -89
- package/color-picker/utils/color-picker/color.ts +467 -467
- package/color-picker/utils/color-picker/constants.ts +187 -187
- package/color-picker/utils/color-picker/draggable.ts +99 -99
- package/color-picker/utils/color-picker/format.ts +90 -90
- package/color-picker/utils/color-picker/gradient.ts +237 -237
- package/color-picker/utils/color-picker/index.ts +7 -7
- package/color-picker/utils/color-picker/types.ts +33 -33
- package/dialog/hooks/useDialogPosition.ts +35 -35
- package/form/type.ts +519 -519
- package/global-config/default-config.ts +95 -95
- package/global-config/locale/ar_KW.ts +259 -259
- package/global-config/locale/en_US.ts +265 -265
- package/global-config/locale/it_IT.ts +264 -264
- package/global-config/locale/ja_JP.ts +264 -264
- package/global-config/locale/ko_KR.ts +264 -264
- package/global-config/locale/ru_RU.ts +277 -277
- package/global-config/locale/zh_CN.ts +265 -265
- package/global-config/locale/zh_TW.ts +265 -265
- package/global-config/mobile/default-config.ts +6 -6
- package/global-config/mobile/locale/ar_KW.ts +112 -112
- package/global-config/mobile/locale/en_US.ts +113 -113
- package/global-config/mobile/locale/it_IT.ts +113 -113
- package/global-config/mobile/locale/ja_JP.ts +100 -100
- package/global-config/mobile/locale/ko_KR.ts +100 -100
- package/global-config/mobile/locale/ru_RU.ts +112 -112
- package/global-config/mobile/locale/zh_CN.ts +100 -100
- package/global-config/mobile/locale/zh_TW.ts +100 -100
- package/global-config/t.ts +111 -111
- package/input-number/InputNumber.tsx +124 -124
- package/input-number/defaultProps.ts +17 -17
- package/input-number/index.ts +9 -9
- package/input-number/style/css.js +1 -1
- package/input-number/style/index.js +1 -1
- package/input-number/useInputNumber.tsx +270 -270
- package/list/ListItem.tsx +36 -36
- package/list/ListItemMeta.tsx +40 -40
- package/list/defaultProps.ts +11 -11
- package/list/hooks/useListVirtualScroll.ts +82 -82
- package/list/style/css.js +1 -1
- package/list/style/index.js +1 -1
- package/locale/LocalReceiver.ts +55 -55
- package/locale/ar_KW.ts +7 -7
- package/locale/en_US.ts +7 -7
- package/locale/it_IT.ts +6 -6
- package/locale/ja_JP.ts +6 -6
- package/locale/ko_KR.ts +6 -6
- package/locale/ru_RU.ts +6 -6
- package/locale/zh_CN.ts +5 -5
- package/locale/zh_TW.ts +7 -7
- package/package.json +2 -2
- package/radio/_example/default.tsx +2 -2
- package/select/type.ts +382 -382
- package/select-input/type.ts +280 -280
- package/slider/SliderHandleButton.tsx +50 -50
- package/slider/defaultProps.ts +15 -15
- package/slider/style/css.js +1 -1
- package/slider/style/index.js +1 -1
- package/styles/_global.scss +40 -40
- package/styles/_vars.scss +374 -374
- package/styles/components/alert/_index.scss +175 -175
- package/styles/components/alert/_vars.scss +41 -41
- package/styles/components/badge/_index.scss +71 -71
- package/styles/components/badge/_vars.scss +26 -26
- package/styles/components/button/_index.scss +499 -499
- package/styles/components/button/_mixins.scss +40 -40
- package/styles/components/button/_vars.scss +121 -121
- package/styles/components/checkbox/_index.scss +158 -158
- package/styles/components/checkbox/_var.scss +59 -59
- package/styles/components/color-picker/_index.scss +586 -586
- package/styles/components/color-picker/_vars.scss +79 -79
- package/styles/components/dialog/_animate.scss +133 -133
- package/styles/components/dialog/_index.scss +310 -310
- package/styles/components/dialog/_vars.scss +60 -60
- package/styles/components/drawer/_index.scss +206 -206
- package/styles/components/drawer/_var.scss +55 -55
- package/styles/components/fireworks/_index.scss +86 -86
- package/styles/components/fireworks/_vars.scss +5 -5
- package/styles/components/form/_index.scss +175 -175
- package/styles/components/form/_mixins.scss +74 -74
- package/styles/components/form/_vars.scss +101 -101
- package/styles/components/input/_index.scss +350 -350
- package/styles/components/input/_mixins.scss +120 -120
- package/styles/components/input/_vars.scss +130 -130
- package/styles/components/input-number/_index.scss +327 -327
- package/styles/components/input-number/_vars.scss +56 -56
- package/styles/components/ip-input/_index.scss +277 -277
- package/styles/components/layout/_index.scss +47 -47
- package/styles/components/layout/_vars.scss +19 -19
- package/styles/components/layout/doc.scss +74 -74
- package/styles/components/list/_index.scss +172 -172
- package/styles/components/list/_vars.scss +42 -42
- package/styles/components/loading/_index.scss +113 -113
- package/styles/components/loading/_vars.scss +40 -40
- package/styles/components/notification/_index.scss +140 -140
- package/styles/components/notification/_mixins.scss +13 -13
- package/styles/components/notification/_vars.scss +60 -60
- package/styles/components/popup/_index.scss +78 -78
- package/styles/components/popup/_mixin.scss +149 -149
- package/styles/components/popup/_vars.scss +33 -33
- package/styles/components/radio/_index.scss +376 -376
- package/styles/components/radio/_vars.scss +89 -89
- package/styles/components/select/_index.scss +291 -291
- package/styles/components/select/_var.scss +64 -64
- package/styles/components/select-input/_index.scss +5 -5
- package/styles/components/select-input/_var.scss +4 -4
- package/styles/components/slider/_index.scss +241 -241
- package/styles/components/slider/_vars.scss +51 -51
- package/styles/components/switch/_index.scss +175 -175
- package/styles/components/switch/_vars.scss +63 -63
- package/styles/components/table/_index.scss +194 -194
- package/styles/components/table/_var.scss +52 -52
- package/styles/components/tabs/_index.scss +165 -165
- package/styles/components/tabs/_mixins.scss +11 -11
- package/styles/components/tabs/_vars.scss +72 -72
- package/styles/components/tag/_index.scss +317 -317
- package/styles/components/tag/_var.scss +86 -86
- package/styles/components/tag-input/_index.scss +164 -164
- package/styles/components/tag-input/_vars.scss +17 -17
- package/styles/mixins/_focus.scss +8 -8
- package/styles/mixins/_layout.scss +32 -32
- package/styles/mixins/_reset.scss +11 -11
- package/styles/mixins/_scrollbar.scss +32 -32
- package/styles/mixins/_text.scss +50 -50
- package/styles/themes/_dark.scss +169 -169
- package/styles/themes/_font.scss +69 -69
- package/styles/themes/_index.scss +5 -5
- package/styles/themes/_light.scss +170 -170
- package/styles/themes/_radius.scss +9 -9
- package/styles/themes/_size.scss +68 -68
- package/styles/utilities/_animation.scss +58 -58
- package/styles/utilities/_tips.scss +10 -10
- package/switch/_example/with-label.tsx +1 -1
- package/utils/input-number/large-number.ts +423 -423
- package/utils/input-number/number.ts +257 -257
- package/utils/log/index.ts +3 -3
- package/utils/log/log.ts +29 -29
- package/utils/log/types.ts +9 -9
- package/utils/style.ts +58 -58
|
@@ -1,86 +1,86 @@
|
|
|
1
|
-
@use "../../_vars.scss" as *;
|
|
2
|
-
// <component>-[type]-[attrtype]-<attr>-[status]
|
|
3
|
-
@use '../../vars.scss' as *;
|
|
4
|
-
// checked [false - default; true - primary]
|
|
5
|
-
$tag-default-background-color: $bg-color-component;
|
|
6
|
-
$tag-default-border-color: transparent;
|
|
7
|
-
$tag-default-hover-color: $brand-color-hover;
|
|
8
|
-
$tag-default-click-color: $brand-color-active;
|
|
9
|
-
$tag-default-disabled-color: $brand-color-disabled;
|
|
10
|
-
$tag-checked-color: $text-color-anti;
|
|
11
|
-
$tag-checked-background-color: $brand-color;
|
|
12
|
-
$tag-check-hover-bg: $bg-color-component-hover;
|
|
13
|
-
$tag-checked-hover-bg: $brand-color-hover;
|
|
14
|
-
$tag-default-click-bg: $bg-color-component-active;
|
|
15
|
-
|
|
16
|
-
$tag-grey-hover-color: $bg-color-component-hover;
|
|
17
|
-
$tag-grey-outline-disabled-color: $bg-color-component-disabled;
|
|
18
|
-
$tag-grey-outline-hover-color: $brand-color-hover;
|
|
19
|
-
|
|
20
|
-
// disabled
|
|
21
|
-
$tag-disabled-color: $text-color-disabled;
|
|
22
|
-
$tag-disabled-bg: $bg-color-component-disabled;
|
|
23
|
-
|
|
24
|
-
// dark color
|
|
25
|
-
$tag-primary-color: $brand-color;
|
|
26
|
-
$tag-success-color: $success-color;
|
|
27
|
-
$tag-warning-color: $warning-color;
|
|
28
|
-
$tag-danger-color: $error-color;
|
|
29
|
-
|
|
30
|
-
// light color
|
|
31
|
-
$tag-default-color-light: $bg-color-secondarycontainer;
|
|
32
|
-
$tag-primary-color-light: $brand-color-light;
|
|
33
|
-
$tag-success-color-light: $success-color-light;
|
|
34
|
-
$tag-warning-color-light: $warning-color-light;
|
|
35
|
-
$tag-error-color-light: $error-color-light;
|
|
36
|
-
|
|
37
|
-
// border
|
|
38
|
-
$tag-outline-default-border-color: $component-border;
|
|
39
|
-
$tag-outline-primary-border-color: $tag-primary-color;
|
|
40
|
-
$tag-outline-success-border-color: $tag-success-color;
|
|
41
|
-
$tag-outline-warning-border-color: $tag-warning-color;
|
|
42
|
-
$tag-outline-danger-border-color: $tag-danger-color;
|
|
43
|
-
|
|
44
|
-
// font size
|
|
45
|
-
$tag-small-font: $font-body-small;
|
|
46
|
-
$tag-medium-font: $font-body-small;
|
|
47
|
-
$tag-large-font: $font-body-medium;
|
|
48
|
-
|
|
49
|
-
// padding
|
|
50
|
-
$tag-small-padding: 0px $comp-paddingLR-xs;
|
|
51
|
-
$tag-medium-padding: 0px $comp-paddingLR-s;
|
|
52
|
-
$tag-large-padding: 0px $comp-paddingLR-m;
|
|
53
|
-
|
|
54
|
-
// text color
|
|
55
|
-
$tag-text-color: $text-color-anti;
|
|
56
|
-
$tag-default-text-color: $text-color-primary;
|
|
57
|
-
|
|
58
|
-
// shape
|
|
59
|
-
$tag-border-radius-square: $border-radius-default;
|
|
60
|
-
$tag-border-radius-round: $border-radius-extraLarge;
|
|
61
|
-
|
|
62
|
-
// width
|
|
63
|
-
$tag-default-border-width: 1px;
|
|
64
|
-
|
|
65
|
-
// height
|
|
66
|
-
$tag-height-small: $comp-size-xxs;
|
|
67
|
-
$tag-height-medium: $comp-size-xs;
|
|
68
|
-
$tag-height-large: $comp-size-m;
|
|
69
|
-
|
|
70
|
-
// icon
|
|
71
|
-
$tag-icon-size: calc($font-size-base + 2px);
|
|
72
|
-
$tag-close-icon-color: $text-color-placeholder;
|
|
73
|
-
$tag-close-icon-hover-color: $text-color-primary;
|
|
74
|
-
$tag-close-icon-color--dark: $font-white-2;
|
|
75
|
-
$tag-close-icon-hover-color--dark: $font-white-1;
|
|
76
|
-
|
|
77
|
-
// link
|
|
78
|
-
$link-tag-hover-bg: $bg-color-component-hover;
|
|
79
|
-
$link-tag-hover-color: $brand-color;
|
|
80
|
-
$link-tag-active-bg: $bg-color-component-active;
|
|
81
|
-
$link-tag-active-color: $brand-color-active;
|
|
82
|
-
|
|
83
|
-
// margin
|
|
84
|
-
$tag-icon-margin-right: $comp-margin-xs;
|
|
85
|
-
$tag-close-icon-margin-right: $comp-margin-s;
|
|
86
|
-
$check-tag-margin-left: $comp-margin-s;
|
|
1
|
+
@use "../../_vars.scss" as *;
|
|
2
|
+
// <component>-[type]-[attrtype]-<attr>-[status]
|
|
3
|
+
@use '../../vars.scss' as *;
|
|
4
|
+
// checked [false - default; true - primary]
|
|
5
|
+
$tag-default-background-color: $bg-color-component;
|
|
6
|
+
$tag-default-border-color: transparent;
|
|
7
|
+
$tag-default-hover-color: $brand-color-hover;
|
|
8
|
+
$tag-default-click-color: $brand-color-active;
|
|
9
|
+
$tag-default-disabled-color: $brand-color-disabled;
|
|
10
|
+
$tag-checked-color: $text-color-anti;
|
|
11
|
+
$tag-checked-background-color: $brand-color;
|
|
12
|
+
$tag-check-hover-bg: $bg-color-component-hover;
|
|
13
|
+
$tag-checked-hover-bg: $brand-color-hover;
|
|
14
|
+
$tag-default-click-bg: $bg-color-component-active;
|
|
15
|
+
|
|
16
|
+
$tag-grey-hover-color: $bg-color-component-hover;
|
|
17
|
+
$tag-grey-outline-disabled-color: $bg-color-component-disabled;
|
|
18
|
+
$tag-grey-outline-hover-color: $brand-color-hover;
|
|
19
|
+
|
|
20
|
+
// disabled
|
|
21
|
+
$tag-disabled-color: $text-color-disabled;
|
|
22
|
+
$tag-disabled-bg: $bg-color-component-disabled;
|
|
23
|
+
|
|
24
|
+
// dark color
|
|
25
|
+
$tag-primary-color: $brand-color;
|
|
26
|
+
$tag-success-color: $success-color;
|
|
27
|
+
$tag-warning-color: $warning-color;
|
|
28
|
+
$tag-danger-color: $error-color;
|
|
29
|
+
|
|
30
|
+
// light color
|
|
31
|
+
$tag-default-color-light: $bg-color-secondarycontainer;
|
|
32
|
+
$tag-primary-color-light: $brand-color-light;
|
|
33
|
+
$tag-success-color-light: $success-color-light;
|
|
34
|
+
$tag-warning-color-light: $warning-color-light;
|
|
35
|
+
$tag-error-color-light: $error-color-light;
|
|
36
|
+
|
|
37
|
+
// border
|
|
38
|
+
$tag-outline-default-border-color: $component-border;
|
|
39
|
+
$tag-outline-primary-border-color: $tag-primary-color;
|
|
40
|
+
$tag-outline-success-border-color: $tag-success-color;
|
|
41
|
+
$tag-outline-warning-border-color: $tag-warning-color;
|
|
42
|
+
$tag-outline-danger-border-color: $tag-danger-color;
|
|
43
|
+
|
|
44
|
+
// font size
|
|
45
|
+
$tag-small-font: $font-body-small;
|
|
46
|
+
$tag-medium-font: $font-body-small;
|
|
47
|
+
$tag-large-font: $font-body-medium;
|
|
48
|
+
|
|
49
|
+
// padding
|
|
50
|
+
$tag-small-padding: 0px $comp-paddingLR-xs;
|
|
51
|
+
$tag-medium-padding: 0px $comp-paddingLR-s;
|
|
52
|
+
$tag-large-padding: 0px $comp-paddingLR-m;
|
|
53
|
+
|
|
54
|
+
// text color
|
|
55
|
+
$tag-text-color: $text-color-anti;
|
|
56
|
+
$tag-default-text-color: $text-color-primary;
|
|
57
|
+
|
|
58
|
+
// shape
|
|
59
|
+
$tag-border-radius-square: $border-radius-default;
|
|
60
|
+
$tag-border-radius-round: $border-radius-extraLarge;
|
|
61
|
+
|
|
62
|
+
// width
|
|
63
|
+
$tag-default-border-width: 1px;
|
|
64
|
+
|
|
65
|
+
// height
|
|
66
|
+
$tag-height-small: $comp-size-xxs;
|
|
67
|
+
$tag-height-medium: $comp-size-xs;
|
|
68
|
+
$tag-height-large: $comp-size-m;
|
|
69
|
+
|
|
70
|
+
// icon
|
|
71
|
+
$tag-icon-size: calc($font-size-base + 2px);
|
|
72
|
+
$tag-close-icon-color: $text-color-placeholder;
|
|
73
|
+
$tag-close-icon-hover-color: $text-color-primary;
|
|
74
|
+
$tag-close-icon-color--dark: $font-white-2;
|
|
75
|
+
$tag-close-icon-hover-color--dark: $font-white-1;
|
|
76
|
+
|
|
77
|
+
// link
|
|
78
|
+
$link-tag-hover-bg: $bg-color-component-hover;
|
|
79
|
+
$link-tag-hover-color: $brand-color;
|
|
80
|
+
$link-tag-active-bg: $bg-color-component-active;
|
|
81
|
+
$link-tag-active-color: $brand-color-active;
|
|
82
|
+
|
|
83
|
+
// margin
|
|
84
|
+
$tag-icon-margin-right: $comp-margin-xs;
|
|
85
|
+
$tag-close-icon-margin-right: $comp-margin-s;
|
|
86
|
+
$check-tag-margin-left: $comp-margin-s;
|
|
@@ -1,164 +1,164 @@
|
|
|
1
|
-
@use "../../_vars.scss" as *;
|
|
2
|
-
@use '../../_vars.scss' as *;
|
|
3
|
-
@use './_vars.scss' as *;
|
|
4
|
-
@use '../../utilities/_animation.scss' as *;
|
|
5
|
-
|
|
6
|
-
@use '../../mixins/_reset.scss' as *;
|
|
7
|
-
@use '../../mixins/_scrollbar.scss' as *;
|
|
8
|
-
|
|
9
|
-
.#{$prefix}-tag-input {
|
|
10
|
-
@include reset;
|
|
11
|
-
|
|
12
|
-
.#{$prefix}-tag {
|
|
13
|
-
vertical-align: middle;
|
|
14
|
-
animation: t-fade-in $anim-duration-base ease-in-out;
|
|
15
|
-
margin: 3px $comp-margin-xs 3px 0;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.#{$prefix}-tag-input__drag_wrapper + .#{$prefix}-tag-input__drag_wrapper {
|
|
19
|
-
margin-left: $comp-margin-xs;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.#{$prefix}-input {
|
|
23
|
-
overflow: hidden;
|
|
24
|
-
min-height: $tag-input-height-default;
|
|
25
|
-
height: fit-content;
|
|
26
|
-
padding: 0 $comp-paddingLR-s 0 $comp-margin-xs;
|
|
27
|
-
@include t-input-suffix-icon($comp-margin-s);
|
|
28
|
-
|
|
29
|
-
&.#{$prefix}-size-s {
|
|
30
|
-
padding: 0 $comp-paddingLR-s 0 $comp-margin-xs;
|
|
31
|
-
min-height: $tag-input-height-s;
|
|
32
|
-
.#{$prefix}-tag {
|
|
33
|
-
margin: 1px $comp-margin-xs 1px 0;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
&.#{$prefix}-size-l {
|
|
38
|
-
min-height: $tag-input-height-l;
|
|
39
|
-
padding: 0 $comp-paddingLR-m 0 $comp-margin-s;
|
|
40
|
-
@include t-input-suffix-icon($comp-margin-m);
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
/** 设计稿:未填充标签场景,边距和已填充不同 */
|
|
45
|
-
&.#{$prefix}-is-empty {
|
|
46
|
-
.#{$prefix}-input__inner {
|
|
47
|
-
margin-left: $comp-margin-xs;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
&:hover,
|
|
52
|
-
.#{$prefix}-input--focused {
|
|
53
|
-
.#{$prefix}-input__inner:not(.#{$prefix}-input--soft-hidden) {
|
|
54
|
-
min-width: 20px;
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.#{$prefix}-tag-input__prefix {
|
|
59
|
-
margin-left: $comp-margin-xs;
|
|
60
|
-
line-height: 1;
|
|
61
|
-
|
|
62
|
-
> .t-icon {
|
|
63
|
-
color: $text-color-placeholder;
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
.#{$prefix}-input .#{$prefix}-input__prefix:not(:empty) {
|
|
68
|
-
margin-right: 0;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
&.#{$prefix}-input--auto-width {
|
|
72
|
-
.#{$prefix}-input.#{$prefix}-input--focused {
|
|
73
|
-
padding-right: $tag-input-clear-icon-padding-m;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
.#{$prefix}-input__prefix {
|
|
77
|
-
white-space: nowrap;
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
.#{$prefix}-input__prefix--scrollable {
|
|
81
|
-
@include scrollbar();
|
|
82
|
-
|
|
83
|
-
overflow-y: hidden;
|
|
84
|
-
overflow-x: auto;
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
.#{$prefix}-tag-input__suffix-clear {
|
|
89
|
-
cursor: pointer;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
.#{$prefix}-tag-input--drag-sort {
|
|
93
|
-
.#{$prefix}-input__prefix {
|
|
94
|
-
.#{$prefix}-tag {
|
|
95
|
-
cursor: move;
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
// 标签数量超出时,换行显示
|
|
101
|
-
.#{$prefix}-tag-input--break-line:not(.#{$prefix}-is-empty) {
|
|
102
|
-
.#{$prefix}-input {
|
|
103
|
-
display: block;
|
|
104
|
-
|
|
105
|
-
&.#{$prefix}-input--prefix > .#{$prefix}-input__prefix {
|
|
106
|
-
display: inline;
|
|
107
|
-
text-align: left;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
.#{$prefix}-input__suffix-icon {
|
|
111
|
-
position: absolute;
|
|
112
|
-
bottom: 0;
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
.#{$prefix}-tag-input__prefix {
|
|
117
|
-
vertical-align: middle;
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
.#{$prefix}-tag-input__prefix {
|
|
122
|
-
width: max-content;
|
|
123
|
-
display: inline-block;
|
|
124
|
-
margin-right: $comp-margin-s;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
/** 换行模式避免标签和右侧图标重合,需保留图标宽度 22px 和左侧距离标签间�?8px */
|
|
128
|
-
.#{$prefix}-tag-input--break-line.#{$prefix}-tag-input--with-tag:not(
|
|
129
|
-
.#{$prefix}-input--auto-width
|
|
130
|
-
),
|
|
131
|
-
.#{$prefix}-tag-input.#{$prefix}-input--auto-width:hover {
|
|
132
|
-
.#{$prefix}-input {
|
|
133
|
-
padding-right: $tag-input-clear-icon-padding-m;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
.#{$prefix}-size-l {
|
|
137
|
-
.#{$prefix}-input {
|
|
138
|
-
padding-right: $tag-input-clear-icon-padding-l;
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
/** auto-width 模式,左右边距相�?*/
|
|
144
|
-
.#{$prefix}-tag-input.#{$prefix}-input--auto-width {
|
|
145
|
-
.#{$prefix}-input {
|
|
146
|
-
padding-right: 0;
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
/** max-rows模式,限制最大高�?*/
|
|
151
|
-
.#{$prefix}-tag-input--max-rows {
|
|
152
|
-
.#{$prefix}-input {
|
|
153
|
-
&.#{$prefix}-size-s {
|
|
154
|
-
max-height: calc(var(--max-rows, 1) * $tag-input-height-s);
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
&.#{$prefix}-size-l {
|
|
158
|
-
max-height: calc(var(--max-rows, 1) * ($tag-input-height-l - 2px));
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
max-height: calc(var(--max-rows, 1) * ($tag-input-height-default - 2px));
|
|
162
|
-
overflow-y: scroll;
|
|
163
|
-
}
|
|
164
|
-
}
|
|
1
|
+
@use "../../_vars.scss" as *;
|
|
2
|
+
@use '../../_vars.scss' as *;
|
|
3
|
+
@use './_vars.scss' as *;
|
|
4
|
+
@use '../../utilities/_animation.scss' as *;
|
|
5
|
+
|
|
6
|
+
@use '../../mixins/_reset.scss' as *;
|
|
7
|
+
@use '../../mixins/_scrollbar.scss' as *;
|
|
8
|
+
|
|
9
|
+
.#{$prefix}-tag-input {
|
|
10
|
+
@include reset;
|
|
11
|
+
|
|
12
|
+
.#{$prefix}-tag {
|
|
13
|
+
vertical-align: middle;
|
|
14
|
+
animation: t-fade-in $anim-duration-base ease-in-out;
|
|
15
|
+
margin: 3px $comp-margin-xs 3px 0;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.#{$prefix}-tag-input__drag_wrapper + .#{$prefix}-tag-input__drag_wrapper {
|
|
19
|
+
margin-left: $comp-margin-xs;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.#{$prefix}-input {
|
|
23
|
+
overflow: hidden;
|
|
24
|
+
min-height: $tag-input-height-default;
|
|
25
|
+
height: fit-content;
|
|
26
|
+
padding: 0 $comp-paddingLR-s 0 $comp-margin-xs;
|
|
27
|
+
@include t-input-suffix-icon($comp-margin-s);
|
|
28
|
+
|
|
29
|
+
&.#{$prefix}-size-s {
|
|
30
|
+
padding: 0 $comp-paddingLR-s 0 $comp-margin-xs;
|
|
31
|
+
min-height: $tag-input-height-s;
|
|
32
|
+
.#{$prefix}-tag {
|
|
33
|
+
margin: 1px $comp-margin-xs 1px 0;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
&.#{$prefix}-size-l {
|
|
38
|
+
min-height: $tag-input-height-l;
|
|
39
|
+
padding: 0 $comp-paddingLR-m 0 $comp-margin-s;
|
|
40
|
+
@include t-input-suffix-icon($comp-margin-m);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/** 设计稿:未填充标签场景,边距和已填充不同 */
|
|
45
|
+
&.#{$prefix}-is-empty {
|
|
46
|
+
.#{$prefix}-input__inner {
|
|
47
|
+
margin-left: $comp-margin-xs;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
&:hover,
|
|
52
|
+
.#{$prefix}-input--focused {
|
|
53
|
+
.#{$prefix}-input__inner:not(.#{$prefix}-input--soft-hidden) {
|
|
54
|
+
min-width: 20px;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.#{$prefix}-tag-input__prefix {
|
|
59
|
+
margin-left: $comp-margin-xs;
|
|
60
|
+
line-height: 1;
|
|
61
|
+
|
|
62
|
+
> .t-icon {
|
|
63
|
+
color: $text-color-placeholder;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.#{$prefix}-input .#{$prefix}-input__prefix:not(:empty) {
|
|
68
|
+
margin-right: 0;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
&.#{$prefix}-input--auto-width {
|
|
72
|
+
.#{$prefix}-input.#{$prefix}-input--focused {
|
|
73
|
+
padding-right: $tag-input-clear-icon-padding-m;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.#{$prefix}-input__prefix {
|
|
77
|
+
white-space: nowrap;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
.#{$prefix}-input__prefix--scrollable {
|
|
81
|
+
@include scrollbar();
|
|
82
|
+
|
|
83
|
+
overflow-y: hidden;
|
|
84
|
+
overflow-x: auto;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.#{$prefix}-tag-input__suffix-clear {
|
|
89
|
+
cursor: pointer;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.#{$prefix}-tag-input--drag-sort {
|
|
93
|
+
.#{$prefix}-input__prefix {
|
|
94
|
+
.#{$prefix}-tag {
|
|
95
|
+
cursor: move;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
// 标签数量超出时,换行显示
|
|
101
|
+
.#{$prefix}-tag-input--break-line:not(.#{$prefix}-is-empty) {
|
|
102
|
+
.#{$prefix}-input {
|
|
103
|
+
display: block;
|
|
104
|
+
|
|
105
|
+
&.#{$prefix}-input--prefix > .#{$prefix}-input__prefix {
|
|
106
|
+
display: inline;
|
|
107
|
+
text-align: left;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.#{$prefix}-input__suffix-icon {
|
|
111
|
+
position: absolute;
|
|
112
|
+
bottom: 0;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.#{$prefix}-tag-input__prefix {
|
|
117
|
+
vertical-align: middle;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.#{$prefix}-tag-input__prefix {
|
|
122
|
+
width: max-content;
|
|
123
|
+
display: inline-block;
|
|
124
|
+
margin-right: $comp-margin-s;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/** 换行模式避免标签和右侧图标重合,需保留图标宽度 22px 和左侧距离标签间�?8px */
|
|
128
|
+
.#{$prefix}-tag-input--break-line.#{$prefix}-tag-input--with-tag:not(
|
|
129
|
+
.#{$prefix}-input--auto-width
|
|
130
|
+
),
|
|
131
|
+
.#{$prefix}-tag-input.#{$prefix}-input--auto-width:hover {
|
|
132
|
+
.#{$prefix}-input {
|
|
133
|
+
padding-right: $tag-input-clear-icon-padding-m;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.#{$prefix}-size-l {
|
|
137
|
+
.#{$prefix}-input {
|
|
138
|
+
padding-right: $tag-input-clear-icon-padding-l;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/** auto-width 模式,左右边距相�?*/
|
|
144
|
+
.#{$prefix}-tag-input.#{$prefix}-input--auto-width {
|
|
145
|
+
.#{$prefix}-input {
|
|
146
|
+
padding-right: 0;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/** max-rows模式,限制最大高�?*/
|
|
151
|
+
.#{$prefix}-tag-input--max-rows {
|
|
152
|
+
.#{$prefix}-input {
|
|
153
|
+
&.#{$prefix}-size-s {
|
|
154
|
+
max-height: calc(var(--max-rows, 1) * $tag-input-height-s);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
&.#{$prefix}-size-l {
|
|
158
|
+
max-height: calc(var(--max-rows, 1) * ($tag-input-height-l - 2px));
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
max-height: calc(var(--max-rows, 1) * ($tag-input-height-default - 2px));
|
|
162
|
+
overflow-y: scroll;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
@use "../../_vars.scss" as *;
|
|
2
|
-
$tag-input-height-s: $comp-size-xs;
|
|
3
|
-
$tag-input-height-default: $comp-size-m;
|
|
4
|
-
$tag-input-height-l: $comp-size-xl;
|
|
5
|
-
|
|
6
|
-
$tag-input-padding-default: calc($comp-margin-xs - 1px);
|
|
7
|
-
|
|
8
|
-
$tag-input-clear-icon-padding-m: calc(
|
|
9
|
-
$comp-paddingLR-xxl + $comp-paddingLR-xxs
|
|
10
|
-
);
|
|
11
|
-
$tag-input-clear-icon-padding-l: calc($comp-paddingLR-xxl + $comp-paddingLR-xs);
|
|
12
|
-
|
|
13
|
-
@mixin t-input-suffix-icon($distance) {
|
|
14
|
-
.#{$prefix}-input__suffix-icon {
|
|
15
|
-
right: $distance;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
1
|
+
@use "../../_vars.scss" as *;
|
|
2
|
+
$tag-input-height-s: $comp-size-xs;
|
|
3
|
+
$tag-input-height-default: $comp-size-m;
|
|
4
|
+
$tag-input-height-l: $comp-size-xl;
|
|
5
|
+
|
|
6
|
+
$tag-input-padding-default: calc($comp-margin-xs - 1px);
|
|
7
|
+
|
|
8
|
+
$tag-input-clear-icon-padding-m: calc(
|
|
9
|
+
$comp-paddingLR-xxl + $comp-paddingLR-xxs
|
|
10
|
+
);
|
|
11
|
+
$tag-input-clear-icon-padding-l: calc($comp-paddingLR-xxl + $comp-paddingLR-xs);
|
|
12
|
+
|
|
13
|
+
@mixin t-input-suffix-icon($distance) {
|
|
14
|
+
.#{$prefix}-input__suffix-icon {
|
|
15
|
+
right: $distance;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
@use "../_vars.scss" as *;
|
|
2
|
-
@mixin tab-focus-style-rect() {
|
|
3
|
-
&:focus-visible {
|
|
4
|
-
outline: 2px solid $brand-color;
|
|
5
|
-
outline-offset: $comp-paddingTB-xs;
|
|
6
|
-
border-radius: 0;
|
|
7
|
-
}
|
|
8
|
-
}
|
|
1
|
+
@use "../_vars.scss" as *;
|
|
2
|
+
@mixin tab-focus-style-rect() {
|
|
3
|
+
&:focus-visible {
|
|
4
|
+
outline: 2px solid $brand-color;
|
|
5
|
+
outline-offset: $comp-paddingTB-xs;
|
|
6
|
+
border-radius: 0;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
@mixin horizontal-vertical-center-with-flex() {
|
|
2
|
-
display: flex;
|
|
3
|
-
align-items: center;
|
|
4
|
-
justify-content: center;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
@mixin fill-with-position-absolute() {
|
|
8
|
-
position: absolute;
|
|
9
|
-
left: 0;
|
|
10
|
-
right: 0;
|
|
11
|
-
top: 0;
|
|
12
|
-
bottom: 0;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
@mixin list-style-none() {
|
|
16
|
-
list-style: none;
|
|
17
|
-
padding: 0;
|
|
18
|
-
margin: 0;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
@mixin input-visually-hidden() {
|
|
22
|
-
border: 0;
|
|
23
|
-
clip: rect(0 0 0 0);
|
|
24
|
-
height: 1px;
|
|
25
|
-
margin: -1px;
|
|
26
|
-
overflow: hidden;
|
|
27
|
-
padding: 0;
|
|
28
|
-
position: absolute;
|
|
29
|
-
width: 1px;
|
|
30
|
-
outline: 0;
|
|
31
|
-
appearance: none;
|
|
32
|
-
}
|
|
1
|
+
@mixin horizontal-vertical-center-with-flex() {
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
justify-content: center;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
@mixin fill-with-position-absolute() {
|
|
8
|
+
position: absolute;
|
|
9
|
+
left: 0;
|
|
10
|
+
right: 0;
|
|
11
|
+
top: 0;
|
|
12
|
+
bottom: 0;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
@mixin list-style-none() {
|
|
16
|
+
list-style: none;
|
|
17
|
+
padding: 0;
|
|
18
|
+
margin: 0;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
@mixin input-visually-hidden() {
|
|
22
|
+
border: 0;
|
|
23
|
+
clip: rect(0 0 0 0);
|
|
24
|
+
height: 1px;
|
|
25
|
+
margin: -1px;
|
|
26
|
+
overflow: hidden;
|
|
27
|
+
padding: 0;
|
|
28
|
+
position: absolute;
|
|
29
|
+
width: 1px;
|
|
30
|
+
outline: 0;
|
|
31
|
+
appearance: none;
|
|
32
|
+
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
@use "../_vars.scss" as *;
|
|
2
|
-
@use '../_vars.scss' as *;
|
|
3
|
-
|
|
4
|
-
@mixin reset {
|
|
5
|
-
font: $font-body-medium;
|
|
6
|
-
color: $text-color-primary;
|
|
7
|
-
box-sizing: border-box;
|
|
8
|
-
margin: 0;
|
|
9
|
-
padding: 0;
|
|
10
|
-
list-style: none;
|
|
11
|
-
}
|
|
1
|
+
@use "../_vars.scss" as *;
|
|
2
|
+
@use '../_vars.scss' as *;
|
|
3
|
+
|
|
4
|
+
@mixin reset {
|
|
5
|
+
font: $font-body-medium;
|
|
6
|
+
color: $text-color-primary;
|
|
7
|
+
box-sizing: border-box;
|
|
8
|
+
margin: 0;
|
|
9
|
+
padding: 0;
|
|
10
|
+
list-style: none;
|
|
11
|
+
}
|