@tendaui/components 1.0.0

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 (245) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +176 -0
  3. package/alert/Alert.tsx +147 -0
  4. package/alert/defaultProps.ts +3 -0
  5. package/alert/index.ts +9 -0
  6. package/alert/style/css.js +1 -0
  7. package/alert/style/index.js +1 -0
  8. package/alert/type.ts +44 -0
  9. package/badge/Badge.tsx +85 -0
  10. package/badge/defaultProps.ts +10 -0
  11. package/badge/index.ts +9 -0
  12. package/badge/style/css.js +1 -0
  13. package/badge/style/index.js +1 -0
  14. package/badge/type.ts +51 -0
  15. package/button/Button.tsx +95 -0
  16. package/button/defaultProps.ts +13 -0
  17. package/button/index.ts +7 -0
  18. package/button/style/css.js +1 -0
  19. package/button/style/index.js +1 -0
  20. package/button/type.ts +82 -0
  21. package/checkbox/Checkbox.tsx +19 -0
  22. package/checkbox/CheckboxGroup.tsx +207 -0
  23. package/checkbox/defaultProps.ts +14 -0
  24. package/checkbox/index.ts +10 -0
  25. package/checkbox/style/css.js +1 -0
  26. package/checkbox/style/index.js +1 -0
  27. package/checkbox/type.ts +117 -0
  28. package/common/Check.tsx +131 -0
  29. package/common/FakeArrow.tsx +36 -0
  30. package/common/PluginContainer.tsx +21 -0
  31. package/common/Portal.tsx +67 -0
  32. package/common.ts +76 -0
  33. package/config-provider/ConfigContext.tsx +21 -0
  34. package/config-provider/ConfigProvider.tsx +53 -0
  35. package/config-provider/index.ts +9 -0
  36. package/config-provider/type.ts +1062 -0
  37. package/dialog/Dialog.tsx +254 -0
  38. package/dialog/DialogCard.tsx +152 -0
  39. package/dialog/defaultProps.ts +25 -0
  40. package/dialog/hooks/useDialogDrag.ts +50 -0
  41. package/dialog/hooks/useDialogEsc.ts +31 -0
  42. package/dialog/hooks/useDialogPosition.ts +36 -0
  43. package/dialog/hooks/useLockStyle.ts +54 -0
  44. package/dialog/index.ts +13 -0
  45. package/dialog/plugin.tsx +78 -0
  46. package/dialog/style/css.js +1 -0
  47. package/dialog/style/index.js +1 -0
  48. package/dialog/type.ts +241 -0
  49. package/dialog/utils.ts +4 -0
  50. package/form/Form.tsx +136 -0
  51. package/form/FormContext.tsx +64 -0
  52. package/form/FormItem.tsx +554 -0
  53. package/form/FormList.tsx +303 -0
  54. package/form/const.ts +6 -0
  55. package/form/defaultProps.ts +26 -0
  56. package/form/formModel.ts +117 -0
  57. package/form/hooks/interface.ts +20 -0
  58. package/form/hooks/useForm.ts +122 -0
  59. package/form/hooks/useFormItemInitialData.ts +95 -0
  60. package/form/hooks/useFormItemStyle.tsx +122 -0
  61. package/form/hooks/useInstance.tsx +275 -0
  62. package/form/hooks/useWatch.ts +42 -0
  63. package/form/index.ts +11 -0
  64. package/form/style/css.js +1 -0
  65. package/form/style/index.js +1 -0
  66. package/form/type.ts +519 -0
  67. package/form/utils/index.ts +69 -0
  68. package/hooks/useAttach.ts +24 -0
  69. package/hooks/useCommonClassName.ts +45 -0
  70. package/hooks/useConfig.ts +3 -0
  71. package/hooks/useControlled.ts +39 -0
  72. package/hooks/useDefaultProps.ts +16 -0
  73. package/hooks/useDomCallback.ts +13 -0
  74. package/hooks/useDomRefCallback.ts +12 -0
  75. package/hooks/useDragSorter.tsx +151 -0
  76. package/hooks/useEventCallback.ts +47 -0
  77. package/hooks/useGlobalConfig.ts +14 -0
  78. package/hooks/useGlobalIcon.ts +14 -0
  79. package/hooks/useLastest.ts +13 -0
  80. package/hooks/useLayoutEffect.ts +7 -0
  81. package/hooks/useMouseEvent.ts +142 -0
  82. package/hooks/useMutationObserver.ts +56 -0
  83. package/hooks/usePopper.ts +189 -0
  84. package/hooks/useRipple.ts +0 -0
  85. package/hooks/useSetState.ts +25 -0
  86. package/hooks/useVirtualScroll.ts +246 -0
  87. package/hooks/useWindowSize.ts +31 -0
  88. package/index.ts +70 -0
  89. package/input/Input.tsx +383 -0
  90. package/input/InputGroup.tsx +29 -0
  91. package/input/defaultProps.ts +22 -0
  92. package/input/index.ts +11 -0
  93. package/input/style/css.js +1 -0
  94. package/input/style/index.js +1 -0
  95. package/input/type.ts +219 -0
  96. package/loading/Gradient.tsx +36 -0
  97. package/loading/Loading.tsx +169 -0
  98. package/loading/circleAdapter.ts +44 -0
  99. package/loading/defaultProps.ts +12 -0
  100. package/loading/index.ts +13 -0
  101. package/loading/style/css.js +1 -0
  102. package/loading/style/index.js +1 -0
  103. package/loading/type.ts +71 -0
  104. package/loading/utils/setStyle.ts +13 -0
  105. package/myform/index.ts +0 -0
  106. package/notification/Notify.ts +24 -0
  107. package/notification/NotifyContainer.tsx +90 -0
  108. package/notification/NotifyContext.tsx +173 -0
  109. package/notification/NotifyItem.tsx +121 -0
  110. package/notification/index.ts +3 -0
  111. package/notification/style/css.js +1 -0
  112. package/notification/style/index.js +1 -0
  113. package/notification/type.ts +23 -0
  114. package/package.json +52 -0
  115. package/popup/Popup.tsx +264 -0
  116. package/popup/defaultProps.ts +13 -0
  117. package/popup/hooks/useTrigger.ts +276 -0
  118. package/popup/index.ts +6 -0
  119. package/popup/style/css.js +1 -0
  120. package/popup/style/index.js +1 -0
  121. package/popup/type.ts +130 -0
  122. package/portal/Portal.tsx +63 -0
  123. package/portal/index.ts +1 -0
  124. package/select/Option.tsx +162 -0
  125. package/select/OptionGroup.tsx +30 -0
  126. package/select/PopupContent.tsx +271 -0
  127. package/select/Select.tsx +586 -0
  128. package/select/defaultProps.ts +27 -0
  129. package/select/hooks/useOptions.ts +120 -0
  130. package/select/hooks/usePanelVirtualScroll.ts +111 -0
  131. package/select/index.ts +9 -0
  132. package/select/style/css.js +1 -0
  133. package/select/style/index.js +2 -0
  134. package/select/type.ts +382 -0
  135. package/select/utils/helper.ts +256 -0
  136. package/select-input/SelectInput.tsx +98 -0
  137. package/select-input/defaultProps.ts +15 -0
  138. package/select-input/hook/useMultiple.tsx +100 -0
  139. package/select-input/hook/useOverlayInnerStyle.ts +84 -0
  140. package/select-input/hook/useSingle.tsx +112 -0
  141. package/select-input/index.ts +6 -0
  142. package/select-input/interface.ts +18 -0
  143. package/select-input/style/css.js +1 -0
  144. package/select-input/style/index.js +1 -0
  145. package/select-input/type.ts +280 -0
  146. package/space/defaultProps.ts +0 -0
  147. package/space/index.ts +0 -0
  148. package/space/type.ts +0 -0
  149. package/style/index.js +2 -0
  150. package/styles/_global.scss +39 -0
  151. package/styles/_vars.scss +386 -0
  152. package/styles/components/alert/_index.scss +175 -0
  153. package/styles/components/alert/_vars.scss +39 -0
  154. package/styles/components/badge/_index.scss +70 -0
  155. package/styles/components/badge/_vars.scss +25 -0
  156. package/styles/components/button/_index.scss +511 -0
  157. package/styles/components/button/_mixins.scss +39 -0
  158. package/styles/components/button/_vars.scss +122 -0
  159. package/styles/components/checkbox/_index.scss +158 -0
  160. package/styles/components/checkbox/_mixin.scss +0 -0
  161. package/styles/components/checkbox/_var.scss +60 -0
  162. package/styles/components/dialog/_animate.scss +135 -0
  163. package/styles/components/dialog/_index.scss +311 -0
  164. package/styles/components/dialog/_mixins.scss +0 -0
  165. package/styles/components/dialog/_vars.scss +59 -0
  166. package/styles/components/form/_index.scss +174 -0
  167. package/styles/components/form/_mixins.scss +76 -0
  168. package/styles/components/form/_vars.scss +100 -0
  169. package/styles/components/input/_index.scss +349 -0
  170. package/styles/components/input/_map.scss +0 -0
  171. package/styles/components/input/_mixins.scss +116 -0
  172. package/styles/components/input/_vars.scss +134 -0
  173. package/styles/components/loading/_index.scss +112 -0
  174. package/styles/components/loading/_vars.scss +39 -0
  175. package/styles/components/notification/_index.scss +160 -0
  176. package/styles/components/notification/_mixins.scss +12 -0
  177. package/styles/components/notification/_vars.scss +59 -0
  178. package/styles/components/popup/_index.scss +82 -0
  179. package/styles/components/popup/_mixin.scss +149 -0
  180. package/styles/components/popup/_var.scss +31 -0
  181. package/styles/components/select/_index.scss +290 -0
  182. package/styles/components/select/_var.scss +65 -0
  183. package/styles/components/select-input/_index.scss +5 -0
  184. package/styles/components/select-input/_var.scss +3 -0
  185. package/styles/components/switch/_index.scss +279 -0
  186. package/styles/components/switch/_mixins.scss +0 -0
  187. package/styles/components/switch/_vars.scss +61 -0
  188. package/styles/components/tag/_index.scss +316 -0
  189. package/styles/components/tag/_var.scss +85 -0
  190. package/styles/components/tag-input/_index.scss +163 -0
  191. package/styles/components/tag-input/_vars.scss +16 -0
  192. package/styles/globals.css +250 -0
  193. package/styles/mixins/_focus.scss +7 -0
  194. package/styles/mixins/_layout.scss +32 -0
  195. package/styles/mixins/_reset.scss +10 -0
  196. package/styles/mixins/_scrollbar.scss +31 -0
  197. package/styles/mixins/_text.scss +48 -0
  198. package/styles/rillple.css +16 -0
  199. package/styles/scrollbar.css +42 -0
  200. package/styles/themes/_dark.scss +191 -0
  201. package/styles/themes/_font.scss +79 -0
  202. package/styles/themes/_index.scss +5 -0
  203. package/styles/themes/_light.scss +190 -0
  204. package/styles/themes/_radius.scss +9 -0
  205. package/styles/themes/_size.scss +68 -0
  206. package/styles/themes.css +66 -0
  207. package/styles/utilities/_animation.scss +57 -0
  208. package/styles/utilities/_tips.scss +9 -0
  209. package/switch/Switch.tsx +120 -0
  210. package/switch/defaultProps.ts +3 -0
  211. package/switch/index.ts +7 -0
  212. package/switch/style/css.js +1 -0
  213. package/switch/style/index.js +1 -0
  214. package/switch/type.ts +46 -0
  215. package/tag/Tag.tsx +149 -0
  216. package/tag/defaultProps.ts +19 -0
  217. package/tag/index.ts +8 -0
  218. package/tag/style/css.js +1 -0
  219. package/tag/style/index.js +1 -0
  220. package/tag/type.ts +170 -0
  221. package/tag-input/TagInput.tsx +215 -0
  222. package/tag-input/defaultProps.ts +15 -0
  223. package/tag-input/hooks/useHover.ts +28 -0
  224. package/tag-input/hooks/useTagList.tsx +131 -0
  225. package/tag-input/hooks/useTagScroll.ts +105 -0
  226. package/tag-input/index.ts +9 -0
  227. package/tag-input/style/css.js +1 -0
  228. package/tag-input/style/index.js +1 -0
  229. package/tag-input/type.ts +224 -0
  230. package/tag-input/useTagList.tsx +131 -0
  231. package/utils/composeRefs.ts +14 -0
  232. package/utils/dom.ts +29 -0
  233. package/utils/forwardRefWithStatics.ts +12 -0
  234. package/utils/getScrollbarWidth.ts +11 -0
  235. package/utils/helper.ts +161 -0
  236. package/utils/isFragment.ts +22 -0
  237. package/utils/listener.ts +37 -0
  238. package/utils/noop.ts +3 -0
  239. package/utils/parentTNode.ts +38 -0
  240. package/utils/parseTNode.ts +38 -0
  241. package/utils/react-render.ts +108 -0
  242. package/utils/ref.ts +6 -0
  243. package/utils/refs.ts +81 -0
  244. package/utils/style.ts +60 -0
  245. package/utils/transition.ts +28 -0
@@ -0,0 +1,59 @@
1
+ $dialog-border-color: transparent;
2
+ $dialog-bg-color: $bg-color-container;
3
+ $dialog-header-text-color: $text-color-primary;
4
+ $dialog-header-bg-color-fullscreen: $bg-color-secondarycontainer;
5
+ $dialog-close-icon-fullscreen-hover: $bg-color-secondarycontainer-hover;
6
+ $dialog-close-icon-fullscreen-active: $bg-color-secondarycontainer-active;
7
+ $dialog-body-text-color: $text-color-secondary;
8
+ $dialog-close-icon-hover: $bg-color-container-hover;
9
+ $dialog-close-icon-active: $bg-color-container-active;
10
+ $dialog-info-icon-color: $brand-color;
11
+ $dialog-success-icon-color: $success-color;
12
+ $dialog-warning-icon-color: $warning-color;
13
+ $dialog-error-icon-color: $error-color;
14
+ $dialog-close-color: $text-color-secondary;
15
+ $dialog-mask-bg-color: $mask-active;
16
+
17
+ // 字体
18
+ $dialog-header-font: $font-title-medium;
19
+ $dialog-header-weight: 600;
20
+ $dialog-body-text-font: $font-body-medium;
21
+
22
+ // 尺寸
23
+ $dialog-width: 480px;
24
+ $dialog-header-height-fullscreen: $comp-size-xxxl;
25
+ $dialog-icon-size: calc($font-size-l + 8px);
26
+ $dialog-close-icon-size: calc($font-size-l + 4px);
27
+ $dialog-footer-height-fullscreen: $comp-size-xxxxl;
28
+
29
+ // 间距
30
+ $dialog-spacer: $comp-paddingTB-xxl $comp-paddingLR-xxl;
31
+ $dialog-default-spacer: $comp-paddingTB-xxl $comp-paddingLR-xxl;
32
+ $dialog-default-padding: $dialog-spacer;
33
+ $dialog-header-icon-margin-right: $comp-margin-s;
34
+ $dialog-header-icon-margin-top: $size-1;
35
+ $dialog-header-content-margin-right: $comp-margin-s;
36
+ $dialog-header-padding-fullscreen: 0 $comp-paddingLR-xxl;
37
+ $dialog-closebtn-padding: $comp-paddingTB-xxs $comp-paddingLR-xxs;
38
+ $dialog-body-padding: $comp-paddingTB-l 0;
39
+ $dialog-body-padding-fullscreen: $comp-paddingTB-xl $comp-paddingLR-xxl;
40
+ $dialog-body-icon-padding: $comp-paddingTB-l 0;
41
+ $dialog-footer-button-margin-left: $comp-margin-s;
42
+ $dialog-footer-padding: $comp-paddingTB-l 0 0;
43
+ $dialog-footer-padding-fullscreen: 0 $comp-paddingLR-xxl $comp-paddingTB-xxl;
44
+
45
+ // 边框
46
+ $dialog-border: 1px solid $border-level-1-color;
47
+ $dialog-border-radius: $border-radius-medium;
48
+ $dialog-close-border-radius: $border-radius-medium;
49
+
50
+ // 位置
51
+ $dialog-close-position-top: $spacer-3;
52
+ $dialog-close-position-right: $spacer-3;
53
+ // 此处不能使用20% 因为定位是paddingTop 所以20% 会根据屏幕宽度
54
+ $dialog-top-position-top: 20vh;
55
+
56
+ // 动画
57
+ $dialog-anim-duration: $anim-duration-base;
58
+ $dialog-anim-time-fn-enter: $anim-time-fn-easing;
59
+ $dialog-anim-time-fn-exit: $anim-time-fn-easing;
@@ -0,0 +1,174 @@
1
+ // 组件允许单个组件打包,因此默认引入公共基础样式
2
+
3
+ @import '../../_vars.scss';
4
+
5
+ @import './_vars.scss';
6
+
7
+ @import './_mixins.scss';
8
+
9
+ @import '../../mixins/_reset.scss';
10
+
11
+ .#{$prefix}-form {
12
+ @include reset;
13
+
14
+ font: $form-font;
15
+
16
+ &:not(.#{$prefix}-form-inline) {
17
+ .#{$prefix}-form__item {
18
+ &:last-of-type {
19
+ margin: 0;
20
+ }
21
+ }
22
+ }
23
+
24
+ &__item {
25
+ margin-bottom: $form-item-margin-bottom;
26
+
27
+ // 文档流撑开内容补足剩余的 4px
28
+ &.#{$prefix}-form__item-with-help {
29
+ margin-bottom: $form-item-with-help-margin-bottom;
30
+ }
31
+
32
+ // 绝对定位布局需要重设底部间距
33
+ &.#{$prefix}-form__item-with-extra {
34
+ margin-bottom: $form-item-margin-bottom;
35
+ }
36
+ }
37
+
38
+ &__label {
39
+ float: left;
40
+ padding-right: $form-label-padding-right;
41
+ vertical-align: middle;
42
+ line-height: $form-item-control-height;
43
+ color: $form-color-label;
44
+ box-sizing: border-box;
45
+ white-space: nowrap;
46
+
47
+ &--top {
48
+ float: none;
49
+ min-height: $form-item-control-height;
50
+ }
51
+
52
+ &--left {
53
+ text-align: left;
54
+ }
55
+
56
+ &--right {
57
+ text-align: right;
58
+ }
59
+
60
+ &--required:not(.#{$prefix}-form__label--required-right) {
61
+ label::before {
62
+ display: inline-block;
63
+ margin-right: $form-label-margin-right-required;
64
+ color: $form-color-error;
65
+ line-height: $form-label-line-height;
66
+ content: '*';
67
+ }
68
+ }
69
+
70
+ &--required-right {
71
+ label::after {
72
+ display: inline-block;
73
+ margin-left: $form-label-margin-left-required;
74
+ color: $form-color-error;
75
+ line-height: $form-label-line-height;
76
+ content: '*';
77
+ }
78
+ }
79
+
80
+ &--colon {
81
+ label::after {
82
+ content: ':';
83
+ position: relative;
84
+ margin: $form-label-margin-colon;
85
+ }
86
+ }
87
+ }
88
+
89
+ &__controls {
90
+ min-height: $form-item-control-height;
91
+ display: flow-root;
92
+ position: relative;
93
+
94
+ &-content {
95
+ display: flex;
96
+ align-items: center;
97
+ min-height: $form-item-control-height;
98
+ }
99
+
100
+ // formItem 嵌套情况无间距
101
+ .#{$prefix}-form__item {
102
+ margin-bottom: 0;
103
+ margin-right: $form-item-margin-right-inline;
104
+ }
105
+ }
106
+
107
+ &__controls.#{$prefix}-is-success {
108
+ @include input-status-icon(success);
109
+ @include input-status-extra(success);
110
+ }
111
+
112
+ &__controls.#{$prefix}-form--success-border {
113
+ // 输入框状态
114
+ @include input-status(success);
115
+ }
116
+
117
+ &__status {
118
+ display: flex;
119
+ margin: $form-status-margin;
120
+
121
+ > .t-icon {
122
+ font-size: $form-status-icon-size;
123
+ }
124
+
125
+ &-without-icon {
126
+ width: 25px;
127
+ height: 25px;
128
+ }
129
+
130
+ button {
131
+ width: $form-status-button-width;
132
+ }
133
+
134
+ button + button {
135
+ margin-left: $form-status-button-margin;
136
+ }
137
+ }
138
+ }
139
+
140
+ .#{$prefix}-form-inline {
141
+ display: flex;
142
+ flex-wrap: wrap;
143
+ row-gap: $form-item-row-gap;
144
+
145
+ .#{$prefix}-form__item {
146
+ margin: 0;
147
+ min-width: 200px;
148
+ display: inline-block;
149
+ margin-right: $form-item-margin-right-inline;
150
+ }
151
+ }
152
+
153
+ .#{$prefix}-input__extra,
154
+ .#{$prefix}-input__help {
155
+ margin: 0;
156
+ width: 100%;
157
+ height: auto;
158
+ min-height: $form-item-help-line-height;
159
+ font: $form-item-help-font;
160
+ color: $form-color-extra;
161
+ }
162
+
163
+ .#{$prefix}-input__extra {
164
+ position: absolute;
165
+ bottom: calc(0px - $form-item-help-line-height);
166
+ max-width: 100%;
167
+ overflow: hidden;
168
+ text-overflow: ellipsis;
169
+ white-space: nowrap;
170
+ }
171
+
172
+ // 输入框状态
173
+ @include input-status(warning);
174
+ @include input-status(error);
@@ -0,0 +1,76 @@
1
+ @use 'sass:map';
2
+
3
+ @mixin input-status($status) {
4
+ .#{$prefix}-is-#{$status} {
5
+ // 辅助文字
6
+ @include input-status-extra($status);
7
+
8
+ .#{$prefix}-form__controls-content {
9
+ // TODO: 兼容目前未使用SelectInput重构的组件的样式 全部重构后可以都由input层控制状态变化
10
+ .#{$prefix}-input,
11
+ .#{$prefix}-select,
12
+ .#{$prefix}-radio-button,
13
+ .#{$prefix}-cascader,
14
+ .#{$prefix}-range-input,
15
+ .#{$prefix}-textarea__inner {
16
+ border-color: map.get(map.get($input-color, border), $status);
17
+
18
+ &--focused {
19
+ box-shadow: 0 0 0 2px
20
+ map.get(map.get($input-color, box-shadow), $status);
21
+ }
22
+
23
+ // 处理组件内icon颜色
24
+ .t-icon,
25
+ .#{$prefix}-fake-arrow {
26
+ color: map.get(map.get($input-color, border), $status);
27
+ }
28
+ }
29
+
30
+ .#{$prefix}-select {
31
+ > .#{$prefix}-select__right-icon:not(
32
+ .#{$prefix}-select__right-icon-clear
33
+ ) {
34
+ color: map.get(map.get($input-color, border), $status);
35
+ }
36
+ }
37
+
38
+ .#{$prefix}-radio-button {
39
+ &:last-child {
40
+ border-right-color: map.get(map.get($input-color, border), $status);
41
+ }
42
+ }
43
+
44
+ .#{$prefix}-textarea__inner {
45
+ &.#{$prefix}-is-focused {
46
+ box-shadow: 0 0 0 2px map.get(map.get($input-color, border), $status);
47
+ }
48
+ }
49
+
50
+ .#{$prefix}-cascader,
51
+ .#{$prefix}-select {
52
+ &.#{$prefix}-is-active {
53
+ box-shadow: 0 0 0 2px
54
+ map.get(map.get($input-color, box-shadow), $status);
55
+ }
56
+ }
57
+
58
+ // 右侧状态图标
59
+ @include input-status-icon($status);
60
+ }
61
+ }
62
+ }
63
+
64
+ @mixin input-status-icon($status) {
65
+ .#{$prefix}-form__status {
66
+ .t-icon {
67
+ color: map.get($form-color, $status);
68
+ }
69
+ }
70
+ }
71
+
72
+ @mixin input-status-extra($status) {
73
+ .#{$prefix}-input__extra {
74
+ color: map.get($form-color, $status);
75
+ }
76
+ }
@@ -0,0 +1,100 @@
1
+ // 组件变量
2
+ // 名称可按如下规则定义:
3
+ // <component>-[type]-[attrtype]-<attr>-[status]
4
+
5
+ // component:组件名,如button,
6
+ // type: 组件类型,如 button 的次要按钮(line)
7
+ // attrtype: 属性的具体应用场景。如颜色,用于背景(bg)、文本(text)、边框(border)等
8
+ // attr: 属性名称,如color、height、radius等
9
+ // status: 表示组件状态或尺寸,如 hover、disabled、s、l 等
10
+
11
+ // 如:$button-line-bg-color-hover
12
+ // 如:$button-line-height-s
13
+ //字体
14
+
15
+ $form-font: $font-body-medium;
16
+ $form-item-help-font: $font-body-small;
17
+
18
+ // 行高
19
+ $form-item-help-line-height: $text-line-height-s;
20
+
21
+ // 颜色
22
+ $form-color-label: $text-color-primary;
23
+ $form-color-error: $error-color;
24
+ $form-color-warning: $warning-color;
25
+ $form-color-success: $success-color;
26
+ $form-color-extra: $text-color-placeholder;
27
+
28
+ $form-color: (
29
+ label: $text-color-primary,
30
+ error: $error-color,
31
+ warning: $warning-color,
32
+ success: $success-color,
33
+ extra: $text-color-placeholder,
34
+ );
35
+ // 间距
36
+ $form-item-margin-bottom: $comp-margin-xxl;
37
+ $form-item-with-help-margin-bottom: $comp-margin-xs;
38
+ $form-item-control-height: $comp-margin-xxxl;
39
+ $form-item-row-gap: $comp-margin-l;
40
+ $form-item-padding-bottom: $comp-paddingTB-xs;
41
+ $form-item-margin-right-inline: $comp-margin-xxl;
42
+
43
+ $form-label-line-height: $text-line-height-base;
44
+ $form-label-padding-right: $comp-paddingLR-xl;
45
+ $form-label-margin-left-required: $comp-margin-xs;
46
+ $form-label-margin-right-required: $comp-margin-xs;
47
+ $form-label-margin-colon: 0 $comp-margin-xxs;
48
+ $form-status-margin: 0 $comp-margin-s;
49
+ $form-status-button-margin: $comp-margin-s;
50
+ $form-status-button-width: $comp-size-m;
51
+ $from-help-text-margin-top: $comp-margin-xs;
52
+ $form-status-icon-size: $comp-size-xxxs;
53
+
54
+ // status
55
+ $input-border-color-success: $success-color;
56
+ $input-box-shadow-color-success-focus: $success-color-focus;
57
+ $input-border-color-warning: $warning-color;
58
+ $input-box-shadow-color-warning-focus: $warning-color-focus;
59
+ $input-border-color-error: $error-color;
60
+ $input-box-shadow-color-error-focus: $error-color-focus;
61
+
62
+ $input-color: (
63
+ border: (
64
+ default: (
65
+ hover: $brand-color,
66
+ focus: $brand-color,
67
+ ),
68
+ success: $success-color,
69
+ warning: $warning-color,
70
+ error: $error-color,
71
+ ),
72
+ text: (
73
+ default: $text-color-primary,
74
+ success: $success-color,
75
+ warning: $warning-color,
76
+ error: $error-color,
77
+ readonly: $text-color-primary,
78
+ tips: $text-color-placeholder,
79
+ disabled: $text-color-disabled,
80
+ ),
81
+ bg-color: (
82
+ default: $text-color-placeholder,
83
+ readonly: $bg-color-specialcomponent,
84
+ disabled: $bg-color-component-disabled,
85
+ ),
86
+ extra: (
87
+ default: $text-color-placeholder,
88
+ success: $success-color,
89
+ warning: $warning-color,
90
+ error: $error-color,
91
+ ),
92
+ append: $bg-color-secondarycontainer-hover,
93
+ limit: $text-color-placeholder,
94
+ box-shadow: (
95
+ default: $brand-color-focus,
96
+ success: $success-color-focus,
97
+ warning: $warning-color-focus,
98
+ error: $error-color-focus,
99
+ ),
100
+ );