@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.
Files changed (142) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +176 -176
  3. package/button/_example/ghost.tsx +2 -5
  4. package/color-picker/utils/color-picker/cmyk.ts +89 -89
  5. package/color-picker/utils/color-picker/color.ts +467 -467
  6. package/color-picker/utils/color-picker/constants.ts +187 -187
  7. package/color-picker/utils/color-picker/draggable.ts +99 -99
  8. package/color-picker/utils/color-picker/format.ts +90 -90
  9. package/color-picker/utils/color-picker/gradient.ts +237 -237
  10. package/color-picker/utils/color-picker/index.ts +7 -7
  11. package/color-picker/utils/color-picker/types.ts +33 -33
  12. package/dialog/hooks/useDialogPosition.ts +35 -35
  13. package/form/type.ts +519 -519
  14. package/global-config/default-config.ts +95 -95
  15. package/global-config/locale/ar_KW.ts +259 -259
  16. package/global-config/locale/en_US.ts +265 -265
  17. package/global-config/locale/it_IT.ts +264 -264
  18. package/global-config/locale/ja_JP.ts +264 -264
  19. package/global-config/locale/ko_KR.ts +264 -264
  20. package/global-config/locale/ru_RU.ts +277 -277
  21. package/global-config/locale/zh_CN.ts +265 -265
  22. package/global-config/locale/zh_TW.ts +265 -265
  23. package/global-config/mobile/default-config.ts +6 -6
  24. package/global-config/mobile/locale/ar_KW.ts +112 -112
  25. package/global-config/mobile/locale/en_US.ts +113 -113
  26. package/global-config/mobile/locale/it_IT.ts +113 -113
  27. package/global-config/mobile/locale/ja_JP.ts +100 -100
  28. package/global-config/mobile/locale/ko_KR.ts +100 -100
  29. package/global-config/mobile/locale/ru_RU.ts +112 -112
  30. package/global-config/mobile/locale/zh_CN.ts +100 -100
  31. package/global-config/mobile/locale/zh_TW.ts +100 -100
  32. package/global-config/t.ts +111 -111
  33. package/input-number/InputNumber.tsx +124 -124
  34. package/input-number/defaultProps.ts +17 -17
  35. package/input-number/index.ts +9 -9
  36. package/input-number/style/css.js +1 -1
  37. package/input-number/style/index.js +1 -1
  38. package/input-number/useInputNumber.tsx +270 -270
  39. package/list/ListItem.tsx +36 -36
  40. package/list/ListItemMeta.tsx +40 -40
  41. package/list/defaultProps.ts +11 -11
  42. package/list/hooks/useListVirtualScroll.ts +82 -82
  43. package/list/style/css.js +1 -1
  44. package/list/style/index.js +1 -1
  45. package/locale/LocalReceiver.ts +55 -55
  46. package/locale/ar_KW.ts +7 -7
  47. package/locale/en_US.ts +7 -7
  48. package/locale/it_IT.ts +6 -6
  49. package/locale/ja_JP.ts +6 -6
  50. package/locale/ko_KR.ts +6 -6
  51. package/locale/ru_RU.ts +6 -6
  52. package/locale/zh_CN.ts +5 -5
  53. package/locale/zh_TW.ts +7 -7
  54. package/package.json +2 -2
  55. package/radio/_example/default.tsx +2 -2
  56. package/select/type.ts +382 -382
  57. package/select-input/type.ts +280 -280
  58. package/slider/SliderHandleButton.tsx +50 -50
  59. package/slider/defaultProps.ts +15 -15
  60. package/slider/style/css.js +1 -1
  61. package/slider/style/index.js +1 -1
  62. package/styles/_global.scss +40 -40
  63. package/styles/_vars.scss +374 -374
  64. package/styles/components/alert/_index.scss +175 -175
  65. package/styles/components/alert/_vars.scss +41 -41
  66. package/styles/components/badge/_index.scss +71 -71
  67. package/styles/components/badge/_vars.scss +26 -26
  68. package/styles/components/button/_index.scss +499 -499
  69. package/styles/components/button/_mixins.scss +40 -40
  70. package/styles/components/button/_vars.scss +121 -121
  71. package/styles/components/checkbox/_index.scss +158 -158
  72. package/styles/components/checkbox/_var.scss +59 -59
  73. package/styles/components/color-picker/_index.scss +586 -586
  74. package/styles/components/color-picker/_vars.scss +79 -79
  75. package/styles/components/dialog/_animate.scss +133 -133
  76. package/styles/components/dialog/_index.scss +310 -310
  77. package/styles/components/dialog/_vars.scss +60 -60
  78. package/styles/components/drawer/_index.scss +206 -206
  79. package/styles/components/drawer/_var.scss +55 -55
  80. package/styles/components/fireworks/_index.scss +86 -86
  81. package/styles/components/fireworks/_vars.scss +5 -5
  82. package/styles/components/form/_index.scss +175 -175
  83. package/styles/components/form/_mixins.scss +74 -74
  84. package/styles/components/form/_vars.scss +101 -101
  85. package/styles/components/input/_index.scss +350 -350
  86. package/styles/components/input/_mixins.scss +120 -120
  87. package/styles/components/input/_vars.scss +130 -130
  88. package/styles/components/input-number/_index.scss +327 -327
  89. package/styles/components/input-number/_vars.scss +56 -56
  90. package/styles/components/ip-input/_index.scss +277 -277
  91. package/styles/components/layout/_index.scss +47 -47
  92. package/styles/components/layout/_vars.scss +19 -19
  93. package/styles/components/layout/doc.scss +74 -74
  94. package/styles/components/list/_index.scss +172 -172
  95. package/styles/components/list/_vars.scss +42 -42
  96. package/styles/components/loading/_index.scss +113 -113
  97. package/styles/components/loading/_vars.scss +40 -40
  98. package/styles/components/notification/_index.scss +140 -140
  99. package/styles/components/notification/_mixins.scss +13 -13
  100. package/styles/components/notification/_vars.scss +60 -60
  101. package/styles/components/popup/_index.scss +78 -78
  102. package/styles/components/popup/_mixin.scss +149 -149
  103. package/styles/components/popup/_vars.scss +33 -33
  104. package/styles/components/radio/_index.scss +376 -376
  105. package/styles/components/radio/_vars.scss +89 -89
  106. package/styles/components/select/_index.scss +291 -291
  107. package/styles/components/select/_var.scss +64 -64
  108. package/styles/components/select-input/_index.scss +5 -5
  109. package/styles/components/select-input/_var.scss +4 -4
  110. package/styles/components/slider/_index.scss +241 -241
  111. package/styles/components/slider/_vars.scss +51 -51
  112. package/styles/components/switch/_index.scss +175 -175
  113. package/styles/components/switch/_vars.scss +63 -63
  114. package/styles/components/table/_index.scss +194 -194
  115. package/styles/components/table/_var.scss +52 -52
  116. package/styles/components/tabs/_index.scss +165 -165
  117. package/styles/components/tabs/_mixins.scss +11 -11
  118. package/styles/components/tabs/_vars.scss +72 -72
  119. package/styles/components/tag/_index.scss +317 -317
  120. package/styles/components/tag/_var.scss +86 -86
  121. package/styles/components/tag-input/_index.scss +164 -164
  122. package/styles/components/tag-input/_vars.scss +17 -17
  123. package/styles/mixins/_focus.scss +8 -8
  124. package/styles/mixins/_layout.scss +32 -32
  125. package/styles/mixins/_reset.scss +11 -11
  126. package/styles/mixins/_scrollbar.scss +32 -32
  127. package/styles/mixins/_text.scss +50 -50
  128. package/styles/themes/_dark.scss +169 -169
  129. package/styles/themes/_font.scss +69 -69
  130. package/styles/themes/_index.scss +5 -5
  131. package/styles/themes/_light.scss +170 -170
  132. package/styles/themes/_radius.scss +9 -9
  133. package/styles/themes/_size.scss +68 -68
  134. package/styles/utilities/_animation.scss +58 -58
  135. package/styles/utilities/_tips.scss +10 -10
  136. package/switch/_example/with-label.tsx +1 -1
  137. package/utils/input-number/large-number.ts +423 -423
  138. package/utils/input-number/number.ts +257 -257
  139. package/utils/log/index.ts +3 -3
  140. package/utils/log/log.ts +29 -29
  141. package/utils/log/types.ts +9 -9
  142. package/utils/style.ts +58 -58
@@ -1,60 +1,60 @@
1
- @use "../../_vars.scss" as *;
2
- $dialog-border-color: transparent;
3
- $dialog-bg-color: $bg-color-container;
4
- $dialog-header-text-color: $text-color-primary;
5
- $dialog-header-bg-color-fullscreen: $bg-color-secondarycontainer;
6
- $dialog-close-icon-fullscreen-hover: $bg-color-secondarycontainer-hover;
7
- $dialog-close-icon-fullscreen-active: $bg-color-secondarycontainer-active;
8
- $dialog-body-text-color: $text-color-secondary;
9
- $dialog-close-icon-hover: $bg-color-container-hover;
10
- $dialog-close-icon-active: $bg-color-container-active;
11
- $dialog-info-icon-color: $brand-color;
12
- $dialog-success-icon-color: $success-color;
13
- $dialog-warning-icon-color: $warning-color;
14
- $dialog-error-icon-color: $error-color;
15
- $dialog-close-color: $text-color-secondary;
16
- $dialog-mask-bg-color: $mask-active;
17
-
18
- // 字体
19
- $dialog-header-font: $font-title-medium;
20
- $dialog-header-weight: 600;
21
- $dialog-body-text-font: $font-body-medium;
22
-
23
- // 尺寸
24
- $dialog-width: 480px;
25
- $dialog-header-height-fullscreen: $comp-size-xxxl;
26
- $dialog-icon-size: calc($font-size-l + 8px);
27
- $dialog-close-icon-size: calc($font-size-l + 4px);
28
- $dialog-footer-height-fullscreen: $comp-size-xxxxl;
29
-
30
- // 间距
31
- $dialog-spacer: $comp-paddingTB-xxl $comp-paddingLR-xxl;
32
- $dialog-default-spacer: $comp-paddingTB-xxl $comp-paddingLR-xxl;
33
- $dialog-default-padding: $dialog-spacer;
34
- $dialog-header-icon-margin-right: $comp-margin-s;
35
- $dialog-header-icon-margin-top: $size-1;
36
- $dialog-header-content-margin-right: $comp-margin-s;
37
- $dialog-header-padding-fullscreen: 0 $comp-paddingLR-xxl;
38
- $dialog-closebtn-padding: $comp-paddingTB-xxs $comp-paddingLR-xxs;
39
- $dialog-body-padding: $comp-paddingTB-l 0;
40
- $dialog-body-padding-fullscreen: $comp-paddingTB-xl $comp-paddingLR-xxl;
41
- $dialog-body-icon-padding: $comp-paddingTB-l 0;
42
- $dialog-footer-button-margin-left: $comp-margin-s;
43
- $dialog-footer-padding: $comp-paddingTB-l 0 0;
44
- $dialog-footer-padding-fullscreen: 0 $comp-paddingLR-xxl $comp-paddingTB-xxl;
45
-
46
- // 边框
47
- $dialog-border: 1px solid $border-level-1-color;
48
- $dialog-border-radius: $border-radius-medium;
49
- $dialog-close-border-radius: $border-radius-medium;
50
-
51
- // 位置
52
- $dialog-close-position-top: $spacer-3;
53
- $dialog-close-position-right: $spacer-3;
54
- // 此处不能使用 20% 因为定位是 paddingTop,所以 20% 会根据屏幕宽度计算
55
- $dialog-top-position-top: 20vh;
56
-
57
- // 动画
58
- $dialog-anim-duration: $anim-duration-base;
59
- $dialog-anim-time-fn-enter: $anim-time-fn-easing;
60
- $dialog-anim-time-fn-exit: $anim-time-fn-easing;
1
+ @use "../../_vars.scss" as *;
2
+ $dialog-border-color: transparent;
3
+ $dialog-bg-color: $bg-color-container;
4
+ $dialog-header-text-color: $text-color-primary;
5
+ $dialog-header-bg-color-fullscreen: $bg-color-secondarycontainer;
6
+ $dialog-close-icon-fullscreen-hover: $bg-color-secondarycontainer-hover;
7
+ $dialog-close-icon-fullscreen-active: $bg-color-secondarycontainer-active;
8
+ $dialog-body-text-color: $text-color-secondary;
9
+ $dialog-close-icon-hover: $bg-color-container-hover;
10
+ $dialog-close-icon-active: $bg-color-container-active;
11
+ $dialog-info-icon-color: $brand-color;
12
+ $dialog-success-icon-color: $success-color;
13
+ $dialog-warning-icon-color: $warning-color;
14
+ $dialog-error-icon-color: $error-color;
15
+ $dialog-close-color: $text-color-secondary;
16
+ $dialog-mask-bg-color: $mask-active;
17
+
18
+ // 字体
19
+ $dialog-header-font: $font-title-medium;
20
+ $dialog-header-weight: 600;
21
+ $dialog-body-text-font: $font-body-medium;
22
+
23
+ // 尺寸
24
+ $dialog-width: 480px;
25
+ $dialog-header-height-fullscreen: $comp-size-xxxl;
26
+ $dialog-icon-size: calc($font-size-l + 8px);
27
+ $dialog-close-icon-size: calc($font-size-l + 4px);
28
+ $dialog-footer-height-fullscreen: $comp-size-xxxxl;
29
+
30
+ // 间距
31
+ $dialog-spacer: $comp-paddingTB-xxl $comp-paddingLR-xxl;
32
+ $dialog-default-spacer: $comp-paddingTB-xxl $comp-paddingLR-xxl;
33
+ $dialog-default-padding: $dialog-spacer;
34
+ $dialog-header-icon-margin-right: $comp-margin-s;
35
+ $dialog-header-icon-margin-top: $size-1;
36
+ $dialog-header-content-margin-right: $comp-margin-s;
37
+ $dialog-header-padding-fullscreen: 0 $comp-paddingLR-xxl;
38
+ $dialog-closebtn-padding: $comp-paddingTB-xxs $comp-paddingLR-xxs;
39
+ $dialog-body-padding: $comp-paddingTB-l 0;
40
+ $dialog-body-padding-fullscreen: $comp-paddingTB-xl $comp-paddingLR-xxl;
41
+ $dialog-body-icon-padding: $comp-paddingTB-l 0;
42
+ $dialog-footer-button-margin-left: $comp-margin-s;
43
+ $dialog-footer-padding: $comp-paddingTB-l 0 0;
44
+ $dialog-footer-padding-fullscreen: 0 $comp-paddingLR-xxl $comp-paddingTB-xxl;
45
+
46
+ // 边框
47
+ $dialog-border: 1px solid $border-level-1-color;
48
+ $dialog-border-radius: $border-radius-medium;
49
+ $dialog-close-border-radius: $border-radius-medium;
50
+
51
+ // 位置
52
+ $dialog-close-position-top: $spacer-3;
53
+ $dialog-close-position-right: $spacer-3;
54
+ // 此处不能使用 20% 因为定位是 paddingTop,所以 20% 会根据屏幕宽度计算
55
+ $dialog-top-position-top: 20vh;
56
+
57
+ // 动画
58
+ $dialog-anim-duration: $anim-duration-base;
59
+ $dialog-anim-time-fn-enter: $anim-time-fn-easing;
60
+ $dialog-anim-time-fn-exit: $anim-time-fn-easing;
@@ -1,206 +1,206 @@
1
- @use "../../_vars.scss" as *;
2
- @use "./_var.scss" as *;
3
- @use "./_mixins.scss" as *;
4
- @use "../../mixins/_reset.scss" as *;
5
- @use "../../utilities/_tips.scss" as *;
6
-
7
- .#{$prefix}-drawer {
8
- $root: ".#{$prefix}-drawer";
9
-
10
- position: fixed;
11
- z-index: 1500;
12
- width: 100%;
13
- height: 100%;
14
- pointer-events: none;
15
- overflow: hidden;
16
- outline: none;
17
-
18
- &--lock {
19
- overflow: hidden;
20
- }
21
-
22
- &--attach {
23
- position: absolute;
24
- }
25
-
26
- &--left,
27
- &--right {
28
- top: 0;
29
- }
30
-
31
- &--left {
32
- left: 0;
33
- }
34
-
35
- &--right {
36
- right: 0;
37
- }
38
-
39
- &--top,
40
- &--bottom {
41
- left: 0;
42
- }
43
-
44
- &--top {
45
- top: 0;
46
- }
47
-
48
- &--bottom {
49
- bottom: 0;
50
- }
51
-
52
- &__mask {
53
- position: absolute;
54
- top: 0;
55
- left: 0;
56
- width: 100%;
57
- height: 100%;
58
- background-color: $drawer-mask;
59
- transition: opacity $drawer-default-duration $drawer-default-timing-function;
60
- opacity: 0;
61
- }
62
-
63
- &__content-wrapper {
64
- display: flex;
65
- flex-direction: column;
66
- background: $drawer-bg-color;
67
- width: 16px;
68
- height: 16px;
69
- font-size: $drawer-body-text-font-size;
70
- color: $drawer-body-text-color;
71
- box-shadow: $dialog-box-shadow;
72
- overflow: hidden;
73
- pointer-events: auto;
74
- transition:
75
- transform $drawer-slow-duration $drawer-default-timing-function,
76
- visibility $drawer-slow-duration $drawer-default-timing-function;
77
- position: relative;
78
- }
79
-
80
- #{$root}__content-wrapper {
81
- position: absolute;
82
- width: 100%;
83
- height: 100%;
84
- visibility: hidden;
85
-
86
- &--left,
87
- &--right {
88
- top: 0;
89
- }
90
-
91
- &--left {
92
- left: 0;
93
- transform: translateX(-100%);
94
- }
95
-
96
- &--right {
97
- right: 0;
98
- transform: translateX(100%);
99
- }
100
-
101
- &--top,
102
- &--bottom {
103
- left: 0;
104
- }
105
-
106
- &--top {
107
- top: 0;
108
- transform: translateY(-100%);
109
- }
110
-
111
- &--bottom {
112
- bottom: 0;
113
- transform: translateY(100%);
114
- }
115
- }
116
-
117
- &__header {
118
- display: flex;
119
- align-items: center;
120
- min-height: $drawer-header-height;
121
- padding: $drawer-header-padding;
122
- font: $drawer-header-font-size;
123
- color: $drawer-header-text-color;
124
- border-bottom: 1px solid $drawer-border-color;
125
- border-radius: $drawer-header-border-radius;
126
- box-sizing: border-box;
127
- }
128
-
129
- &__body {
130
- padding: $drawer-body-padding;
131
- overflow: auto;
132
- flex: 1;
133
- }
134
-
135
- &__footer {
136
- width: 100%;
137
- padding: $drawer-footer-padding;
138
- text-align: $drawer-footer-text-align;
139
- border-top: 1px solid $drawer-border-color;
140
- background-color: $drawer-bg-color;
141
- box-sizing: border-box;
142
-
143
- .#{$prefix}-button {
144
- margin-inline-start: $drawer-footer-btn-margin-left;
145
- }
146
-
147
- .#{$prefix}-button:first-child {
148
- margin-inline-start: 0;
149
- }
150
- }
151
-
152
- &__close-btn {
153
- position: absolute;
154
- display: flex;
155
- justify-content: center;
156
- align-items: center;
157
- width: $drawer-close-btn-size;
158
- height: $drawer-close-btn-size;
159
- top: calc((#{$drawer-header-height} - #{$drawer-close-btn-size}) / 2);
160
- inset-inline-end: $drawer-close-btn-position-right;
161
- color: $drawer-close-btn-color;
162
- background-color: $drawer-close-btn-bg-color;
163
- border-radius: $border-radius-default;
164
- cursor: pointer;
165
- transition: background-color $anim-duration-base;
166
-
167
- &:hover {
168
- background-color: $dialog-close-btn-bg-hover;
169
- }
170
-
171
- &:active {
172
- background-color: $dialog-close-btn-bg-active;
173
- }
174
-
175
- .t-icon {
176
- font-size: $drawer-icon-size;
177
- vertical-align: unset;
178
- }
179
- }
180
-
181
- &--open {
182
- width: 100%;
183
- height: 100%;
184
- pointer-events: auto;
185
-
186
- > #{$root}__content-wrapper {
187
- visibility: visible;
188
- }
189
-
190
- > #{$root}__mask {
191
- opacity: 1;
192
- width: 100%;
193
- height: 100%;
194
- }
195
- }
196
-
197
- // 覆盖 t-drawer--open
198
- &--without-mask {
199
- pointer-events: none;
200
- }
201
- }
202
-
203
- [tabindex="-1"]:focus {
204
- outline: none !important;
205
- }
206
-
1
+ @use "../../_vars.scss" as *;
2
+ @use "./_var.scss" as *;
3
+ @use "./_mixins.scss" as *;
4
+ @use "../../mixins/_reset.scss" as *;
5
+ @use "../../utilities/_tips.scss" as *;
6
+
7
+ .#{$prefix}-drawer {
8
+ $root: ".#{$prefix}-drawer";
9
+
10
+ position: fixed;
11
+ z-index: 1500;
12
+ width: 100%;
13
+ height: 100%;
14
+ pointer-events: none;
15
+ overflow: hidden;
16
+ outline: none;
17
+
18
+ &--lock {
19
+ overflow: hidden;
20
+ }
21
+
22
+ &--attach {
23
+ position: absolute;
24
+ }
25
+
26
+ &--left,
27
+ &--right {
28
+ top: 0;
29
+ }
30
+
31
+ &--left {
32
+ left: 0;
33
+ }
34
+
35
+ &--right {
36
+ right: 0;
37
+ }
38
+
39
+ &--top,
40
+ &--bottom {
41
+ left: 0;
42
+ }
43
+
44
+ &--top {
45
+ top: 0;
46
+ }
47
+
48
+ &--bottom {
49
+ bottom: 0;
50
+ }
51
+
52
+ &__mask {
53
+ position: absolute;
54
+ top: 0;
55
+ left: 0;
56
+ width: 100%;
57
+ height: 100%;
58
+ background-color: $drawer-mask;
59
+ transition: opacity $drawer-default-duration $drawer-default-timing-function;
60
+ opacity: 0;
61
+ }
62
+
63
+ &__content-wrapper {
64
+ display: flex;
65
+ flex-direction: column;
66
+ background: $drawer-bg-color;
67
+ width: 16px;
68
+ height: 16px;
69
+ font-size: $drawer-body-text-font-size;
70
+ color: $drawer-body-text-color;
71
+ box-shadow: $dialog-box-shadow;
72
+ overflow: hidden;
73
+ pointer-events: auto;
74
+ transition:
75
+ transform $drawer-slow-duration $drawer-default-timing-function,
76
+ visibility $drawer-slow-duration $drawer-default-timing-function;
77
+ position: relative;
78
+ }
79
+
80
+ #{$root}__content-wrapper {
81
+ position: absolute;
82
+ width: 100%;
83
+ height: 100%;
84
+ visibility: hidden;
85
+
86
+ &--left,
87
+ &--right {
88
+ top: 0;
89
+ }
90
+
91
+ &--left {
92
+ left: 0;
93
+ transform: translateX(-100%);
94
+ }
95
+
96
+ &--right {
97
+ right: 0;
98
+ transform: translateX(100%);
99
+ }
100
+
101
+ &--top,
102
+ &--bottom {
103
+ left: 0;
104
+ }
105
+
106
+ &--top {
107
+ top: 0;
108
+ transform: translateY(-100%);
109
+ }
110
+
111
+ &--bottom {
112
+ bottom: 0;
113
+ transform: translateY(100%);
114
+ }
115
+ }
116
+
117
+ &__header {
118
+ display: flex;
119
+ align-items: center;
120
+ min-height: $drawer-header-height;
121
+ padding: $drawer-header-padding;
122
+ font: $drawer-header-font-size;
123
+ color: $drawer-header-text-color;
124
+ border-bottom: 1px solid $drawer-border-color;
125
+ border-radius: $drawer-header-border-radius;
126
+ box-sizing: border-box;
127
+ }
128
+
129
+ &__body {
130
+ padding: $drawer-body-padding;
131
+ overflow: auto;
132
+ flex: 1;
133
+ }
134
+
135
+ &__footer {
136
+ width: 100%;
137
+ padding: $drawer-footer-padding;
138
+ text-align: $drawer-footer-text-align;
139
+ border-top: 1px solid $drawer-border-color;
140
+ background-color: $drawer-bg-color;
141
+ box-sizing: border-box;
142
+
143
+ .#{$prefix}-button {
144
+ margin-inline-start: $drawer-footer-btn-margin-left;
145
+ }
146
+
147
+ .#{$prefix}-button:first-child {
148
+ margin-inline-start: 0;
149
+ }
150
+ }
151
+
152
+ &__close-btn {
153
+ position: absolute;
154
+ display: flex;
155
+ justify-content: center;
156
+ align-items: center;
157
+ width: $drawer-close-btn-size;
158
+ height: $drawer-close-btn-size;
159
+ top: calc((#{$drawer-header-height} - #{$drawer-close-btn-size}) / 2);
160
+ inset-inline-end: $drawer-close-btn-position-right;
161
+ color: $drawer-close-btn-color;
162
+ background-color: $drawer-close-btn-bg-color;
163
+ border-radius: $border-radius-default;
164
+ cursor: pointer;
165
+ transition: background-color $anim-duration-base;
166
+
167
+ &:hover {
168
+ background-color: $dialog-close-btn-bg-hover;
169
+ }
170
+
171
+ &:active {
172
+ background-color: $dialog-close-btn-bg-active;
173
+ }
174
+
175
+ .t-icon {
176
+ font-size: $drawer-icon-size;
177
+ vertical-align: unset;
178
+ }
179
+ }
180
+
181
+ &--open {
182
+ width: 100%;
183
+ height: 100%;
184
+ pointer-events: auto;
185
+
186
+ > #{$root}__content-wrapper {
187
+ visibility: visible;
188
+ }
189
+
190
+ > #{$root}__mask {
191
+ opacity: 1;
192
+ width: 100%;
193
+ height: 100%;
194
+ }
195
+ }
196
+
197
+ // 覆盖 t-drawer--open
198
+ &--without-mask {
199
+ pointer-events: none;
200
+ }
201
+ }
202
+
203
+ [tabindex="-1"]:focus {
204
+ outline: none !important;
205
+ }
206
+
@@ -1,55 +1,55 @@
1
- /**
2
- * 颜色
3
- */
4
- @use "../../_vars.scss" as *;
5
-
6
- $dialog-box-shadow: $shadow-2;
7
- $drawer-bg-color: $bg-color-container;
8
- $drawer-border-color: $border-level-1-color;
9
- $drawer-header-text-color: $text-color-primary;
10
- $drawer-body-text-color: $text-color-secondary;
11
- $drawer-shadow: $shadow-2;
12
- $drawer-mask: $mask-active;
13
- $drawer-close-btn-color: $text-color-primary;
14
- $drawer-close-btn-bg-color: $bg-color-container;
15
- $dialog-close-btn-bg-hover: $bg-color-container-hover;
16
- $dialog-close-btn-bg-active: $bg-color-container-active;
17
- /**
18
- * 尺寸
19
- */
20
- $drawer-icon-size: calc($font-size-base + 2px);
21
- $drawer-header-height: $comp-size-xxxl;
22
- $drawer-close-btn-size: $comp-size-xs;
23
- $drawer-content-wrapper-size: 300px;
24
-
25
- /**
26
- * 字体
27
- */
28
- $drawer-body-text-font-size: $font-body-medium;
29
- $drawer-header-font-size: $font-title-medium;
30
-
31
- /**
32
- * 动画
33
- */
34
- $drawer-default-timing-function: $anim-time-fn-easing;
35
- $drawer-default-duration: $anim-duration-base;
36
- $drawer-slow-duration: $anim-duration-slow;
37
-
38
- /**
39
- * 间距
40
- */
41
- $drawer-footer-padding: $comp-paddingTB-l $comp-paddingLR-l;
42
- $drawer-header-padding: 0 $comp-paddingLR-l;
43
- $drawer-body-padding: $comp-paddingTB-l $comp-paddingLR-l;
44
- $drawer-footer-btn-margin-left: $comp-margin-s;
45
-
46
- /**
47
- * 位置
48
- */
49
- $drawer-close-btn-position-right: $comp-margin-s;
50
- $drawer-footer-text-align: start;
51
-
52
- /**
53
- * 边框弧度
54
- */
55
- $drawer-header-border-radius: $border-radius-small $border-radius-small 0 0;
1
+ /**
2
+ * 颜色
3
+ */
4
+ @use "../../_vars.scss" as *;
5
+
6
+ $dialog-box-shadow: $shadow-2;
7
+ $drawer-bg-color: $bg-color-container;
8
+ $drawer-border-color: $border-level-1-color;
9
+ $drawer-header-text-color: $text-color-primary;
10
+ $drawer-body-text-color: $text-color-secondary;
11
+ $drawer-shadow: $shadow-2;
12
+ $drawer-mask: $mask-active;
13
+ $drawer-close-btn-color: $text-color-primary;
14
+ $drawer-close-btn-bg-color: $bg-color-container;
15
+ $dialog-close-btn-bg-hover: $bg-color-container-hover;
16
+ $dialog-close-btn-bg-active: $bg-color-container-active;
17
+ /**
18
+ * 尺寸
19
+ */
20
+ $drawer-icon-size: calc($font-size-base + 2px);
21
+ $drawer-header-height: $comp-size-xxxl;
22
+ $drawer-close-btn-size: $comp-size-xs;
23
+ $drawer-content-wrapper-size: 300px;
24
+
25
+ /**
26
+ * 字体
27
+ */
28
+ $drawer-body-text-font-size: $font-body-medium;
29
+ $drawer-header-font-size: $font-title-medium;
30
+
31
+ /**
32
+ * 动画
33
+ */
34
+ $drawer-default-timing-function: $anim-time-fn-easing;
35
+ $drawer-default-duration: $anim-duration-base;
36
+ $drawer-slow-duration: $anim-duration-slow;
37
+
38
+ /**
39
+ * 间距
40
+ */
41
+ $drawer-footer-padding: $comp-paddingTB-l $comp-paddingLR-l;
42
+ $drawer-header-padding: 0 $comp-paddingLR-l;
43
+ $drawer-body-padding: $comp-paddingTB-l $comp-paddingLR-l;
44
+ $drawer-footer-btn-margin-left: $comp-margin-s;
45
+
46
+ /**
47
+ * 位置
48
+ */
49
+ $drawer-close-btn-position-right: $comp-margin-s;
50
+ $drawer-footer-text-align: start;
51
+
52
+ /**
53
+ * 边框弧度
54
+ */
55
+ $drawer-header-border-radius: $border-radius-small $border-radius-small 0 0;