@douyinfe/semi-foundation 2.97.0 → 2.99.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.
- package/cascader/foundation.ts +3 -1
- package/codeHighlight/codeHighlight.scss +1 -1
- package/datePicker/foundation.ts +7 -0
- package/datePicker/inputFoundation.ts +5 -0
- package/form/foundation.ts +50 -4
- package/inputNumber/foundation.ts +119 -3
- package/jsonViewer/jsonViewer.scss +2 -2
- package/lib/cjs/aiChatInput/aiChatInput.css +7 -7
- package/lib/cjs/anchor/anchor.css +3 -3
- package/lib/cjs/autoComplete/autoComplete.css +1 -1
- package/lib/cjs/avatar/avatar.css +5 -5
- package/lib/cjs/badge/badge.css +1 -1
- package/lib/cjs/breadcrumb/breadcrumb.css +2 -2
- package/lib/cjs/calendar/calendar.css +9 -9
- package/lib/cjs/cascader/cascader.css +6 -6
- package/lib/cjs/cascader/foundation.js +4 -1
- package/lib/cjs/checkbox/checkbox.css +2 -2
- package/lib/cjs/codeHighlight/codeHighlight.css +1 -1
- package/lib/cjs/codeHighlight/codeHighlight.scss +1 -1
- package/lib/cjs/collapse/collapse.css +2 -2
- package/lib/cjs/datePicker/datePicker.css +8 -8
- package/lib/cjs/datePicker/foundation.d.ts +5 -0
- package/lib/cjs/datePicker/foundation.js +2 -0
- package/lib/cjs/datePicker/inputFoundation.d.ts +5 -0
- package/lib/cjs/descriptions/descriptions.css +6 -6
- package/lib/cjs/dropdown/dropdown.css +2 -2
- package/lib/cjs/form/form.css +4 -4
- package/lib/cjs/form/foundation.js +51 -3
- package/lib/cjs/hotKeys/hotKeys.css +2 -2
- package/lib/cjs/image/image.css +2 -2
- package/lib/cjs/input/input.css +8 -8
- package/lib/cjs/input/textarea.css +2 -2
- package/lib/cjs/inputNumber/foundation.d.ts +15 -0
- package/lib/cjs/inputNumber/foundation.js +113 -3
- package/lib/cjs/jsonViewer/jsonViewer.css +2 -2
- package/lib/cjs/jsonViewer/jsonViewer.scss +2 -2
- package/lib/cjs/list/list.css +1 -1
- package/lib/cjs/modal/modal.css +1 -1
- package/lib/cjs/navigation/navigation.css +2 -2
- package/lib/cjs/notification/notification.css +4 -4
- package/lib/cjs/pagination/pagination.css +5 -5
- package/lib/cjs/popconfirm/popconfirm.css +1 -1
- package/lib/cjs/popover/popover.css +5 -5
- package/lib/cjs/radio/radio.css +2 -2
- package/lib/cjs/scrollList/itemFoundation.js +12 -0
- package/lib/cjs/scrollList/scrollList.css +2 -2
- package/lib/cjs/select/select.css +6 -6
- package/lib/cjs/sideSheet/sideSheet.css +2 -2
- package/lib/cjs/sidebar/sidebar.css +11 -11
- package/lib/cjs/slider/foundation.js +46 -12
- package/lib/cjs/slider/rtl.scss +62 -0
- package/lib/cjs/slider/slider.css +45 -0
- package/lib/cjs/slider/slider.scss +2 -0
- package/lib/cjs/steps/steps.css +11 -11
- package/lib/cjs/table/foundation.d.ts +36 -0
- package/lib/cjs/table/foundation.js +162 -28
- package/lib/cjs/table/rtl.scss +21 -0
- package/lib/cjs/table/table.css +38 -2
- package/lib/cjs/table/table.scss +49 -0
- package/lib/cjs/tabs/tabs.css +2 -2
- package/lib/cjs/tag/tag.css +2 -2
- package/lib/cjs/tagInput/tagInput.css +2 -2
- package/lib/cjs/timePicker/timePicker.css +1 -1
- package/lib/cjs/timeline/timeline.css +2 -2
- package/lib/cjs/toast/toast.css +1 -1
- package/lib/cjs/tooltip/arrow.scss +4 -4
- package/lib/cjs/tooltip/foundation.js +72 -5
- package/lib/cjs/tooltip/tooltip.css +5 -5
- package/lib/cjs/transfer/constants.d.ts +3 -1
- package/lib/cjs/transfer/constants.js +3 -1
- package/lib/cjs/transfer/foundation.d.ts +3 -0
- package/lib/cjs/transfer/foundation.js +4 -0
- package/lib/cjs/transfer/transfer.css +14 -5
- package/lib/cjs/transfer/transfer.scss +10 -0
- package/lib/cjs/tree/foundation.d.ts +3 -0
- package/lib/cjs/tree/foundation.js +31 -4
- package/lib/cjs/tree/tree.css +1 -1
- package/lib/cjs/treeSelect/foundation.d.ts +1 -0
- package/lib/cjs/treeSelect/foundation.js +8 -1
- package/lib/cjs/treeSelect/treeSelect.css +36 -4
- package/lib/cjs/treeSelect/treeSelect.scss +49 -1
- package/lib/cjs/typography/typography.css +8 -8
- package/lib/cjs/upload/upload.css +8 -8
- package/lib/cjs/utils/Store.d.ts +1 -1
- package/lib/cjs/utils/Store.js +1 -0
- package/lib/es/aiChatInput/aiChatInput.css +7 -7
- package/lib/es/anchor/anchor.css +3 -3
- package/lib/es/autoComplete/autoComplete.css +1 -1
- package/lib/es/avatar/avatar.css +5 -5
- package/lib/es/badge/badge.css +1 -1
- package/lib/es/breadcrumb/breadcrumb.css +2 -2
- package/lib/es/calendar/calendar.css +9 -9
- package/lib/es/cascader/cascader.css +6 -6
- package/lib/es/cascader/foundation.js +4 -1
- package/lib/es/checkbox/checkbox.css +2 -2
- package/lib/es/codeHighlight/codeHighlight.css +1 -1
- package/lib/es/codeHighlight/codeHighlight.scss +1 -1
- package/lib/es/collapse/collapse.css +2 -2
- package/lib/es/datePicker/datePicker.css +8 -8
- package/lib/es/datePicker/foundation.d.ts +5 -0
- package/lib/es/datePicker/foundation.js +2 -0
- package/lib/es/datePicker/inputFoundation.d.ts +5 -0
- package/lib/es/descriptions/descriptions.css +6 -6
- package/lib/es/dropdown/dropdown.css +2 -2
- package/lib/es/form/form.css +4 -4
- package/lib/es/form/foundation.js +51 -3
- package/lib/es/hotKeys/hotKeys.css +2 -2
- package/lib/es/image/image.css +2 -2
- package/lib/es/input/input.css +8 -8
- package/lib/es/input/textarea.css +2 -2
- package/lib/es/inputNumber/foundation.d.ts +15 -0
- package/lib/es/inputNumber/foundation.js +113 -3
- package/lib/es/jsonViewer/jsonViewer.css +2 -2
- package/lib/es/jsonViewer/jsonViewer.scss +2 -2
- package/lib/es/list/list.css +1 -1
- package/lib/es/modal/modal.css +1 -1
- package/lib/es/navigation/navigation.css +2 -2
- package/lib/es/notification/notification.css +4 -4
- package/lib/es/pagination/pagination.css +5 -5
- package/lib/es/popconfirm/popconfirm.css +1 -1
- package/lib/es/popover/popover.css +5 -5
- package/lib/es/radio/radio.css +2 -2
- package/lib/es/scrollList/itemFoundation.js +12 -0
- package/lib/es/scrollList/scrollList.css +2 -2
- package/lib/es/select/select.css +6 -6
- package/lib/es/sideSheet/sideSheet.css +2 -2
- package/lib/es/sidebar/sidebar.css +11 -11
- package/lib/es/slider/foundation.js +46 -12
- package/lib/es/slider/rtl.scss +62 -0
- package/lib/es/slider/slider.css +45 -0
- package/lib/es/slider/slider.scss +2 -0
- package/lib/es/steps/steps.css +11 -11
- package/lib/es/table/foundation.d.ts +36 -0
- package/lib/es/table/foundation.js +162 -28
- package/lib/es/table/rtl.scss +21 -0
- package/lib/es/table/table.css +38 -2
- package/lib/es/table/table.scss +49 -0
- package/lib/es/tabs/tabs.css +2 -2
- package/lib/es/tag/tag.css +2 -2
- package/lib/es/tagInput/tagInput.css +2 -2
- package/lib/es/timePicker/timePicker.css +1 -1
- package/lib/es/timeline/timeline.css +2 -2
- package/lib/es/toast/toast.css +1 -1
- package/lib/es/tooltip/arrow.scss +4 -4
- package/lib/es/tooltip/foundation.js +72 -5
- package/lib/es/tooltip/tooltip.css +5 -5
- package/lib/es/transfer/constants.d.ts +3 -1
- package/lib/es/transfer/constants.js +3 -1
- package/lib/es/transfer/foundation.d.ts +3 -0
- package/lib/es/transfer/foundation.js +4 -0
- package/lib/es/transfer/transfer.css +14 -5
- package/lib/es/transfer/transfer.scss +10 -0
- package/lib/es/tree/foundation.d.ts +3 -0
- package/lib/es/tree/foundation.js +31 -4
- package/lib/es/tree/tree.css +1 -1
- package/lib/es/treeSelect/foundation.d.ts +1 -0
- package/lib/es/treeSelect/foundation.js +8 -1
- package/lib/es/treeSelect/treeSelect.css +36 -4
- package/lib/es/treeSelect/treeSelect.scss +49 -1
- package/lib/es/typography/typography.css +8 -8
- package/lib/es/upload/upload.css +8 -8
- package/lib/es/utils/Store.d.ts +1 -1
- package/lib/es/utils/Store.js +1 -0
- package/package.json +19 -4
- package/scrollList/itemFoundation.ts +12 -0
- package/slider/foundation.ts +55 -15
- package/slider/rtl.scss +62 -0
- package/slider/slider.scss +2 -0
- package/table/foundation.ts +197 -29
- package/table/rtl.scss +21 -0
- package/table/table.scss +49 -0
- package/tooltip/arrow.scss +4 -4
- package/tooltip/foundation.ts +86 -5
- package/transfer/constants.ts +3 -1
- package/transfer/foundation.ts +8 -1
- package/transfer/transfer.scss +10 -0
- package/tree/foundation.ts +34 -5
- package/treeSelect/foundation.ts +10 -1
- package/treeSelect/treeSelect.scss +49 -1
- package/utils/Store.ts +2 -1
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
align-items: flex-start;
|
|
9
9
|
font-size: 14px;
|
|
10
10
|
line-height: 20px;
|
|
11
|
-
font-family: "Inter", -apple-system, BlinkMacSystemFont, "
|
|
11
|
+
font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
12
12
|
cursor: pointer;
|
|
13
13
|
transition: background-color var(--semi-transition_duration-none) var(--semi-transition_function-easeIn) var(--semi-transition_delay-none), border var(--semi-transition_duration-none) var(--semi-transition_function-easeIn) var(--semi-transition_delay-none);
|
|
14
14
|
transform: scale(var(--semi-transform_scale-none));
|
|
@@ -269,7 +269,7 @@
|
|
|
269
269
|
.semi-checkboxGroup {
|
|
270
270
|
font-size: 14px;
|
|
271
271
|
line-height: 20px;
|
|
272
|
-
font-family: "Inter", -apple-system, BlinkMacSystemFont, "
|
|
272
|
+
font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
273
273
|
line-height: 14px;
|
|
274
274
|
}
|
|
275
275
|
.semi-checkboxGroup .semi-checkbox.semi-checkbox-vertical {
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
color: var(--semi-color-text-0);
|
|
14
14
|
font-size: 13px;
|
|
15
15
|
text-shadow: none;
|
|
16
|
-
font-family: "SFMono-Regular", Consolas, "Liberation Mono",
|
|
16
|
+
font-family: ui-monospace, "SFMono-Regular", "SF Mono", Menlo, Monaco, Consolas, "Liberation Mono", "DejaVu Sans Mono", "Courier New", monospace;
|
|
17
17
|
direction: ltr;
|
|
18
18
|
text-align: left;
|
|
19
19
|
white-space: pre;
|
|
@@ -16,7 +16,7 @@ $module: #{$prefix}-codeHighlight;
|
|
|
16
16
|
font-size: 13px;
|
|
17
17
|
text-shadow: none;
|
|
18
18
|
// font-family: 'Inconsolata', Consolas, Monaco, "Andale Mono", "Ubuntu Mono", monospace;
|
|
19
|
-
font-family: 'SFMono-Regular', Consolas, 'Liberation Mono',
|
|
19
|
+
font-family: ui-monospace, 'SFMono-Regular', 'SF Mono', Menlo, Monaco, Consolas, 'Liberation Mono', 'DejaVu Sans Mono', 'Courier New', monospace;
|
|
20
20
|
direction: ltr;
|
|
21
21
|
text-align: left;
|
|
22
22
|
white-space: pre;
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
font-weight: 600;
|
|
18
18
|
font-size: 14px;
|
|
19
19
|
line-height: 20px;
|
|
20
|
-
font-family: "Inter", -apple-system, BlinkMacSystemFont, "
|
|
20
|
+
font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
21
21
|
}
|
|
22
22
|
.semi-collapse-header-right {
|
|
23
23
|
display: flex;
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
color: var(--semi-color-text-1);
|
|
62
62
|
font-size: 14px;
|
|
63
63
|
line-height: 20px;
|
|
64
|
-
font-family: "Inter", -apple-system, BlinkMacSystemFont, "
|
|
64
|
+
font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
65
65
|
}
|
|
66
66
|
.semi-collapse-content p {
|
|
67
67
|
margin: 0;
|
|
@@ -110,7 +110,7 @@
|
|
|
110
110
|
padding: 0;
|
|
111
111
|
font-size: 14px;
|
|
112
112
|
line-height: 20px;
|
|
113
|
-
font-family: "Inter", -apple-system, BlinkMacSystemFont, "
|
|
113
|
+
font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
114
114
|
min-height: 24px;
|
|
115
115
|
line-height: 24px;
|
|
116
116
|
}
|
|
@@ -199,7 +199,7 @@
|
|
|
199
199
|
.semi-datepicker-navigation-month {
|
|
200
200
|
font-size: 16px;
|
|
201
201
|
line-height: 22px;
|
|
202
|
-
font-family: "Inter", -apple-system, BlinkMacSystemFont, "
|
|
202
|
+
font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
203
203
|
flex-grow: 1;
|
|
204
204
|
text-align: center;
|
|
205
205
|
font-weight: 600;
|
|
@@ -217,7 +217,7 @@
|
|
|
217
217
|
.semi-datepicker-weekday {
|
|
218
218
|
font-size: 12px;
|
|
219
219
|
line-height: 16px;
|
|
220
|
-
font-family: "Inter", -apple-system, BlinkMacSystemFont, "
|
|
220
|
+
font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
221
221
|
font-weight: 600;
|
|
222
222
|
color: var(--semi-color-text-2);
|
|
223
223
|
border-bottom: 1px solid var(--semi-color-border);
|
|
@@ -737,7 +737,7 @@
|
|
|
737
737
|
font-weight: 600;
|
|
738
738
|
font-size: 14px;
|
|
739
739
|
line-height: 20px;
|
|
740
|
-
font-family: "Inter", -apple-system, BlinkMacSystemFont, "
|
|
740
|
+
font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
741
741
|
white-space: nowrap;
|
|
742
742
|
color: var(--semi-color-text-2);
|
|
743
743
|
}
|
|
@@ -763,7 +763,7 @@
|
|
|
763
763
|
.semi-datepicker-compact {
|
|
764
764
|
font-size: 12px;
|
|
765
765
|
line-height: 16px;
|
|
766
|
-
font-family: "Inter", -apple-system, BlinkMacSystemFont, "
|
|
766
|
+
font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
767
767
|
line-height: 20px;
|
|
768
768
|
display: inline-block;
|
|
769
769
|
max-width: calc(100vw - 32px);
|
|
@@ -834,7 +834,7 @@
|
|
|
834
834
|
.semi-datepicker-compact .semi-datepicker-month-grid .semi-scrolllist {
|
|
835
835
|
font-size: 12px;
|
|
836
836
|
line-height: 16px;
|
|
837
|
-
font-family: "Inter", -apple-system, BlinkMacSystemFont, "
|
|
837
|
+
font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
838
838
|
line-height: 20px;
|
|
839
839
|
}
|
|
840
840
|
.semi-datepicker-compact .semi-datepicker-month-grid .semi-scrolllist-header {
|
|
@@ -878,7 +878,7 @@
|
|
|
878
878
|
.semi-datepicker-compact.semi-datepicker-panel-yam .semi-scrolllist {
|
|
879
879
|
font-size: 12px;
|
|
880
880
|
line-height: 16px;
|
|
881
|
-
font-family: "Inter", -apple-system, BlinkMacSystemFont, "
|
|
881
|
+
font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
882
882
|
line-height: 20px;
|
|
883
883
|
}
|
|
884
884
|
.semi-datepicker-compact .semi-datepicker-tpk {
|
|
@@ -907,7 +907,7 @@
|
|
|
907
907
|
.semi-datepicker-compact .semi-datepicker-navigation-month .semi-button {
|
|
908
908
|
font-size: 12px;
|
|
909
909
|
line-height: 16px;
|
|
910
|
-
font-family: "Inter", -apple-system, BlinkMacSystemFont, "
|
|
910
|
+
font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
911
911
|
line-height: 20px;
|
|
912
912
|
max-width: 100%;
|
|
913
913
|
}
|
|
@@ -138,6 +138,11 @@ export interface DatePickerFoundationProps extends ElementProps, RenderProps, Ev
|
|
|
138
138
|
dateFnsLocale?: any;
|
|
139
139
|
localeCode?: string;
|
|
140
140
|
rangeSeparator?: string;
|
|
141
|
+
/**
|
|
142
|
+
* Only for UI render. Keep `semi-foundation` framework-agnostic (no React types).
|
|
143
|
+
* `semi-ui` layer should declare this as `React.ReactNode`.
|
|
144
|
+
*/
|
|
145
|
+
rangeSeparatorNode?: any;
|
|
141
146
|
insetInput?: DateInputFoundationProps['insetInput'];
|
|
142
147
|
preventScroll?: boolean;
|
|
143
148
|
}
|
|
@@ -53,6 +53,8 @@ class DatePickerFoundation extends _foundation.default {
|
|
|
53
53
|
this._isRangeValueComplete = value => {
|
|
54
54
|
let result = false;
|
|
55
55
|
if (Array.isArray(value)) {
|
|
56
|
+
// Note: empty array should be treated as "complete" (not partially selected)
|
|
57
|
+
// to keep behaviors such as clear/confirm/change consistent.
|
|
56
58
|
result = !value.some(date => (0, _isNullOrUndefined.default)(date));
|
|
57
59
|
}
|
|
58
60
|
return result;
|
|
@@ -40,6 +40,11 @@ export interface DateInputFoundationProps extends DateInputElementProps, DateInp
|
|
|
40
40
|
validateStatus?: ValidateStatus;
|
|
41
41
|
prefixCls?: string;
|
|
42
42
|
rangeSeparator?: string;
|
|
43
|
+
/**
|
|
44
|
+
* Only for UI render. Keep `semi-foundation` framework-agnostic (no React types).
|
|
45
|
+
* `semi-ui` layer should declare this as `React.ReactNode`.
|
|
46
|
+
*/
|
|
47
|
+
rangeSeparatorNode?: any;
|
|
43
48
|
panelType?: PanelType;
|
|
44
49
|
insetInput?: boolean | InsetInputProps;
|
|
45
50
|
insetInputValue?: InsetInputValue;
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
font-weight: normal;
|
|
26
26
|
font-size: 14px;
|
|
27
27
|
line-height: 20px;
|
|
28
|
-
font-family: "Inter", -apple-system, BlinkMacSystemFont, "
|
|
28
|
+
font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
29
29
|
min-height: 14px;
|
|
30
30
|
white-space: nowrap;
|
|
31
31
|
color: var(--semi-color-text-2);
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
font-weight: normal;
|
|
35
35
|
font-size: 14px;
|
|
36
36
|
line-height: 20px;
|
|
37
|
-
font-family: "Inter", -apple-system, BlinkMacSystemFont, "
|
|
37
|
+
font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
38
38
|
color: var(--semi-color-text-0);
|
|
39
39
|
}
|
|
40
40
|
.semi-descriptions-center .semi-descriptions-item-th {
|
|
@@ -84,14 +84,14 @@
|
|
|
84
84
|
.semi-descriptions-double-small .semi-descriptions-key {
|
|
85
85
|
font-size: 12px;
|
|
86
86
|
line-height: 16px;
|
|
87
|
-
font-family: "Inter", -apple-system, BlinkMacSystemFont, "
|
|
87
|
+
font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
88
88
|
padding-bottom: 0;
|
|
89
89
|
font-size: 12px;
|
|
90
90
|
}
|
|
91
91
|
.semi-descriptions-double-small .semi-descriptions-value {
|
|
92
92
|
font-size: 16px;
|
|
93
93
|
line-height: 22px;
|
|
94
|
-
font-family: "Inter", -apple-system, BlinkMacSystemFont, "
|
|
94
|
+
font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
95
95
|
font-size: 16px;
|
|
96
96
|
}
|
|
97
97
|
.semi-descriptions-double-medium .semi-descriptions-item {
|
|
@@ -104,7 +104,7 @@
|
|
|
104
104
|
.semi-descriptions-double-medium .semi-descriptions-value {
|
|
105
105
|
font-size: 20px;
|
|
106
106
|
line-height: 28px;
|
|
107
|
-
font-family: "Inter", -apple-system, BlinkMacSystemFont, "
|
|
107
|
+
font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
108
108
|
font-size: 20px;
|
|
109
109
|
}
|
|
110
110
|
.semi-descriptions-double-large .semi-descriptions-item {
|
|
@@ -117,7 +117,7 @@
|
|
|
117
117
|
.semi-descriptions-double-large .semi-descriptions-value {
|
|
118
118
|
font-size: 28px;
|
|
119
119
|
line-height: 40px;
|
|
120
|
-
font-family: "Inter", -apple-system, BlinkMacSystemFont, "
|
|
120
|
+
font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
121
121
|
font-size: 28px;
|
|
122
122
|
}
|
|
123
123
|
.semi-descriptions-horizontal table {
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
.semi-dropdown {
|
|
5
5
|
font-size: 14px;
|
|
6
6
|
line-height: 20px;
|
|
7
|
-
font-family: "Inter", -apple-system, BlinkMacSystemFont, "
|
|
7
|
+
font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
8
8
|
}
|
|
9
9
|
.semi-dropdown-wrapper {
|
|
10
10
|
overflow-y: auto;
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
padding-right: 16px;
|
|
36
36
|
font-size: 12px;
|
|
37
37
|
line-height: 16px;
|
|
38
|
-
font-family: "Inter", -apple-system, BlinkMacSystemFont, "
|
|
38
|
+
font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
39
39
|
cursor: default;
|
|
40
40
|
}
|
|
41
41
|
.semi-dropdown-title-withTick {
|
package/lib/cjs/form/form.css
CHANGED
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
vertical-align: middle;
|
|
55
55
|
font-size: 14px;
|
|
56
56
|
line-height: 20px;
|
|
57
|
-
font-family: "Inter", -apple-system, BlinkMacSystemFont, "
|
|
57
|
+
font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
58
58
|
flex-shrink: 0;
|
|
59
59
|
}
|
|
60
60
|
.semi-form-field-label-disabled {
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
.semi-form-field-error-message, .semi-form-field-help-text {
|
|
90
90
|
font-size: 14px;
|
|
91
91
|
line-height: 20px;
|
|
92
|
-
font-family: "Inter", -apple-system, BlinkMacSystemFont, "
|
|
92
|
+
font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
93
93
|
display: flex;
|
|
94
94
|
align-items: center;
|
|
95
95
|
margin-top: 4px;
|
|
@@ -176,7 +176,7 @@
|
|
|
176
176
|
color: var(--semi-color-tertiary);
|
|
177
177
|
font-size: 14px;
|
|
178
178
|
line-height: 20px;
|
|
179
|
-
font-family: "Inter", -apple-system, BlinkMacSystemFont, "
|
|
179
|
+
font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
180
180
|
}
|
|
181
181
|
|
|
182
182
|
.semi-form-vertical .semi-form-field-group {
|
|
@@ -210,7 +210,7 @@
|
|
|
210
210
|
margin-block-end: 0;
|
|
211
211
|
font-size: 18px;
|
|
212
212
|
line-height: 24px;
|
|
213
|
-
font-family: "Inter", -apple-system, BlinkMacSystemFont, "
|
|
213
|
+
font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
214
214
|
font-weight: 600;
|
|
215
215
|
width: 100%;
|
|
216
216
|
padding-bottom: 8px;
|
|
@@ -79,14 +79,60 @@ class FormFoundation extends _foundation.default {
|
|
|
79
79
|
const registered = this.registered[field];
|
|
80
80
|
this.registered[field] = true;
|
|
81
81
|
this.fields.set(field, fieldStuff);
|
|
82
|
-
if (fieldStuff.keepState) {
|
|
83
|
-
//
|
|
82
|
+
if (fieldStuff.keepState && registered) {
|
|
83
|
+
// When keepState is true and the field was previously registered (remounting),
|
|
84
|
+
// restore the saved state from formState instead of using the initial value
|
|
85
|
+
const hasSavedValue = ObjectUtil.has(this.data.values, field);
|
|
86
|
+
const savedValue = ObjectUtil.get(this.data.values, field);
|
|
87
|
+
const hasSavedError = ObjectUtil.has(this.data.errors, field);
|
|
88
|
+
const savedError = ObjectUtil.get(this.data.errors, field);
|
|
89
|
+
const hasSavedTouched = ObjectUtil.has(this.data.touched, field);
|
|
90
|
+
const savedTouched = ObjectUtil.get(this.data.touched, field);
|
|
91
|
+
const allowEmpty = fieldStuff.allowEmpty || false;
|
|
92
|
+
const opts = {
|
|
93
|
+
notNotify: true,
|
|
94
|
+
notUpdate: false,
|
|
95
|
+
// updateStateValue reads `fieldAllowEmpty` (field-level override)
|
|
96
|
+
fieldAllowEmpty: allowEmpty
|
|
97
|
+
};
|
|
98
|
+
// Restore value from formState if it exists
|
|
99
|
+
if (hasSavedValue) {
|
|
100
|
+
// Keep formState as source of truth; still trigger a forceUpdate so that
|
|
101
|
+
// consumers of formState can get the latest snapshot when field remounts.
|
|
102
|
+
this.updateStateValue(field, savedValue, opts);
|
|
103
|
+
// Sync the restored value back to the field component's local state.
|
|
104
|
+
// Avoid a second forceUpdate/notify from FieldApi.
|
|
105
|
+
fieldStuff.fieldApi.setValue(savedValue, Object.assign(Object.assign({}, opts), {
|
|
106
|
+
notUpdate: true
|
|
107
|
+
}));
|
|
108
|
+
} else {
|
|
109
|
+
// No saved value, use initial value
|
|
110
|
+
let fieldValue = fieldState.value;
|
|
111
|
+
if (!allowEmpty && fieldValue === '') {
|
|
112
|
+
fieldValue = undefined;
|
|
113
|
+
}
|
|
114
|
+
this.updateStateValue(field, fieldValue, opts);
|
|
115
|
+
}
|
|
116
|
+
// Restore error from formState if it exists
|
|
117
|
+
if (hasSavedError) {
|
|
118
|
+
this.updateStateError(field, savedError, opts);
|
|
119
|
+
fieldStuff.fieldApi.setError(savedError, Object.assign(Object.assign({}, opts), {
|
|
120
|
+
notUpdate: true
|
|
121
|
+
}));
|
|
122
|
+
}
|
|
123
|
+
// Restore touched from formState if it exists
|
|
124
|
+
if (hasSavedTouched) {
|
|
125
|
+
this.updateStateTouched(field, savedTouched, opts);
|
|
126
|
+
fieldStuff.fieldApi.setTouched(savedTouched, Object.assign(Object.assign({}, opts), {
|
|
127
|
+
notUpdate: true
|
|
128
|
+
}));
|
|
129
|
+
}
|
|
84
130
|
} else {
|
|
85
131
|
const allowEmpty = fieldStuff.allowEmpty || false;
|
|
86
132
|
const opts = {
|
|
87
133
|
notNotify: true,
|
|
88
134
|
notUpdate: false,
|
|
89
|
-
allowEmpty
|
|
135
|
+
fieldAllowEmpty: allowEmpty
|
|
90
136
|
};
|
|
91
137
|
let fieldValue = fieldState.value;
|
|
92
138
|
// When allowEmpty is false, 'is equivalent to undefined, and the key of the field does not need to be reflected on values
|
|
@@ -447,6 +493,8 @@ class FormFoundation extends _foundation.default {
|
|
|
447
493
|
*/
|
|
448
494
|
const formAllowEmpty = this.getProp('allowEmpty');
|
|
449
495
|
// priority at Field level
|
|
496
|
+
// NOTE: Keep legacy semantics here to avoid implicit breaking changes.
|
|
497
|
+
// (Field-level allowEmpty overriding behavior is handled during register/restore paths.)
|
|
450
498
|
const allowEmpty = fieldAllowEmpty ? fieldAllowEmpty : formAllowEmpty;
|
|
451
499
|
ObjectUtil.set(this.data.values, field, value, allowEmpty);
|
|
452
500
|
/**
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
.semi-hotKeys-content {
|
|
16
16
|
font-size: 12px;
|
|
17
17
|
line-height: 16px;
|
|
18
|
-
font-family: "Inter", -apple-system, BlinkMacSystemFont, "
|
|
18
|
+
font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
19
19
|
border-radius: 2px;
|
|
20
20
|
height: 20px;
|
|
21
21
|
padding: 2px 8px;
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
.semi-hotKeys-split {
|
|
27
27
|
font-size: 12px;
|
|
28
28
|
line-height: 16px;
|
|
29
|
-
font-family: "Inter", -apple-system, BlinkMacSystemFont, "
|
|
29
|
+
font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
30
30
|
margin: 0 3px;
|
|
31
31
|
color: var(--semi-color-text-0);
|
|
32
32
|
}
|
package/lib/cjs/image/image.css
CHANGED
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
font-weight: normal;
|
|
97
97
|
font-size: 14px;
|
|
98
98
|
line-height: 20px;
|
|
99
|
-
font-family: "Inter", -apple-system, BlinkMacSystemFont, "
|
|
99
|
+
font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
100
100
|
color: var(--semi-color-white);
|
|
101
101
|
height: 60px;
|
|
102
102
|
display: flex;
|
|
@@ -143,7 +143,7 @@
|
|
|
143
143
|
color: var(--semi-color-white);
|
|
144
144
|
font-size: 16px;
|
|
145
145
|
line-height: 22px;
|
|
146
|
-
font-family: "Inter", -apple-system, BlinkMacSystemFont, "
|
|
146
|
+
font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
147
147
|
margin: 0 12px;
|
|
148
148
|
}
|
|
149
149
|
.semi-image-preview-footer .semi-icon {
|
package/lib/cjs/input/input.css
CHANGED
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
box-shadow: none;
|
|
30
30
|
font-size: 14px;
|
|
31
31
|
line-height: 20px;
|
|
32
|
-
font-family: "Inter", -apple-system, BlinkMacSystemFont, "
|
|
32
|
+
font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
33
33
|
background-color: var(--semi-color-fill-0);
|
|
34
34
|
border: 1px transparent solid;
|
|
35
35
|
border-radius: var(--semi-border-radius-small);
|
|
@@ -45,21 +45,21 @@
|
|
|
45
45
|
height: 32px;
|
|
46
46
|
font-size: 14px;
|
|
47
47
|
line-height: 20px;
|
|
48
|
-
font-family: "Inter", -apple-system, BlinkMacSystemFont, "
|
|
48
|
+
font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
49
49
|
line-height: 30px;
|
|
50
50
|
}
|
|
51
51
|
.semi-input-wrapper-small {
|
|
52
52
|
height: 24px;
|
|
53
53
|
font-size: 14px;
|
|
54
54
|
line-height: 20px;
|
|
55
|
-
font-family: "Inter", -apple-system, BlinkMacSystemFont, "
|
|
55
|
+
font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
56
56
|
line-height: 22px;
|
|
57
57
|
}
|
|
58
58
|
.semi-input-wrapper-large {
|
|
59
59
|
height: 40px;
|
|
60
60
|
font-size: 16px;
|
|
61
61
|
line-height: 22px;
|
|
62
|
-
font-family: "Inter", -apple-system, BlinkMacSystemFont, "
|
|
62
|
+
font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
63
63
|
line-height: 38px;
|
|
64
64
|
}
|
|
65
65
|
.semi-input-wrapper:hover {
|
|
@@ -357,21 +357,21 @@
|
|
|
357
357
|
height: 38px;
|
|
358
358
|
font-size: 16px;
|
|
359
359
|
line-height: 22px;
|
|
360
|
-
font-family: "Inter", -apple-system, BlinkMacSystemFont, "
|
|
360
|
+
font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
361
361
|
line-height: 38px;
|
|
362
362
|
}
|
|
363
363
|
.semi-input-small {
|
|
364
364
|
height: 22px;
|
|
365
365
|
font-size: 14px;
|
|
366
366
|
line-height: 20px;
|
|
367
|
-
font-family: "Inter", -apple-system, BlinkMacSystemFont, "
|
|
367
|
+
font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
368
368
|
line-height: 22px;
|
|
369
369
|
}
|
|
370
370
|
.semi-input-default {
|
|
371
371
|
height: 30px;
|
|
372
372
|
font-size: 14px;
|
|
373
373
|
line-height: 20px;
|
|
374
|
-
font-family: "Inter", -apple-system, BlinkMacSystemFont, "
|
|
374
|
+
font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
375
375
|
line-height: 30px;
|
|
376
376
|
}
|
|
377
377
|
.semi-input-disabled {
|
|
@@ -429,7 +429,7 @@
|
|
|
429
429
|
color: var(--semi-color-text-2);
|
|
430
430
|
font-size: 14px;
|
|
431
431
|
line-height: 20px;
|
|
432
|
-
font-family: "Inter", -apple-system, BlinkMacSystemFont, "
|
|
432
|
+
font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
433
433
|
flex-shrink: 0;
|
|
434
434
|
}
|
|
435
435
|
.semi-input-prepend-icon, .semi-input-prepend-text, .semi-input-append-icon, .semi-input-append-text {
|
|
@@ -107,7 +107,7 @@
|
|
|
107
107
|
box-shadow: none;
|
|
108
108
|
font-size: 14px;
|
|
109
109
|
line-height: 20px;
|
|
110
|
-
font-family: "Inter", -apple-system, BlinkMacSystemFont, "
|
|
110
|
+
font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
111
111
|
background-color: transparent;
|
|
112
112
|
border: 0 solid transparent;
|
|
113
113
|
vertical-align: bottom;
|
|
@@ -147,7 +147,7 @@
|
|
|
147
147
|
.semi-input-textarea-counter {
|
|
148
148
|
font-size: 12px;
|
|
149
149
|
line-height: 16px;
|
|
150
|
-
font-family: "Inter", -apple-system, BlinkMacSystemFont, "
|
|
150
|
+
font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
|
151
151
|
display: flex;
|
|
152
152
|
flex-direction: column;
|
|
153
153
|
justify-content: center;
|
|
@@ -80,6 +80,21 @@ declare class InputNumberFoundation extends BaseFoundation<InputNumberAdapter> {
|
|
|
80
80
|
_getPrecLen(num: string | number): number;
|
|
81
81
|
_adjustPrec(num: string | number): string;
|
|
82
82
|
formatCurrency(value: number | string): string;
|
|
83
|
+
/**
|
|
84
|
+
* Check if scientific notation is enabled
|
|
85
|
+
*/
|
|
86
|
+
_isScientificNotation(): boolean;
|
|
87
|
+
/**
|
|
88
|
+
* Get scientific notation threshold
|
|
89
|
+
* @returns {number} threshold for digit count
|
|
90
|
+
*/
|
|
91
|
+
_getScientificNotationThreshold(): number;
|
|
92
|
+
/**
|
|
93
|
+
* Convert number to scientific notation if exceeds threshold
|
|
94
|
+
* @param {number} num
|
|
95
|
+
* @returns {string}
|
|
96
|
+
*/
|
|
97
|
+
_toScientificNotation(num: number): string;
|
|
83
98
|
/**
|
|
84
99
|
* format number to string
|
|
85
100
|
* @param {string|number} value
|