@rockshin/tao-ui 0.0.44 → 0.0.46
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/README.md +9 -1
- package/component-manifest.json +38 -4
- package/dist/components/alert/alert.js +20 -17
- package/dist/components/auto-complete/auto-complete.js +12 -3
- package/dist/components/avatar/avatar.js +2 -1
- package/dist/components/breadcrumb/breadcrumb.css +4 -0
- package/dist/components/breadcrumb/breadcrumb.js +82 -77
- package/dist/components/calendar/calendar.d.ts +1 -1
- package/dist/components/calendar/calendar.js +51 -33
- package/dist/components/card/card-tabs.js +204 -182
- package/dist/components/card/card.js +1 -1
- package/dist/components/carousel/carousel.js +11 -5
- package/dist/components/cascader/cascader.js +16 -4
- package/dist/components/collapse/collapse.css +8 -0
- package/dist/components/color-picker/color-picker.js +273 -269
- package/dist/components/context-menu/context-menu.d.ts +2 -1
- package/dist/components/context-menu/context-menu.js +57 -44
- package/dist/components/date-picker/calendar/calendar-grid.js +13 -6
- package/dist/components/date-picker/calendar/use-calendar.d.ts +2 -2
- package/dist/components/date-picker/calendar/use-calendar.js +2 -3
- package/dist/components/date-picker/date-localization.d.ts +3 -0
- package/dist/components/date-picker/date-localization.js +76 -0
- package/dist/components/date-picker/date-picker.css +4 -0
- package/dist/components/date-picker/date-picker.d.ts +1 -0
- package/dist/components/date-picker/date-picker.js +48 -30
- package/dist/components/date-picker/range-picker.d.ts +1 -0
- package/dist/components/date-picker/range-picker.js +41 -23
- package/dist/components/drawer/drawer.d.ts +2 -1
- package/dist/components/drawer/drawer.js +32 -20
- package/dist/components/dropdown/dropdown.d.ts +1 -0
- package/dist/components/dropdown/dropdown.js +160 -143
- package/dist/components/float-button/float-button.js +3 -2
- package/dist/components/form/form.js +88 -103
- package/dist/components/image/image.js +202 -137
- package/dist/components/list/list-pagination.js +148 -147
- package/dist/components/mentions/mentions.js +6 -2
- package/dist/components/modal/confirm-dialog.js +4 -2
- package/dist/components/modal/modal.d.ts +2 -1
- package/dist/components/modal/modal.js +387 -375
- package/dist/components/pagination/pagination.css +4 -0
- package/dist/components/pagination/pagination.js +115 -110
- package/dist/components/popconfirm/popconfirm.js +109 -107
- package/dist/components/popover/popover.d.ts +2 -1
- package/dist/components/popover/popover.js +185 -176
- package/dist/components/qr-code/qr-code.js +22 -21
- package/dist/components/rate/rate.js +114 -88
- package/dist/components/scroll-area/scroll-area.js +132 -120
- package/dist/components/segmented/segmented.js +52 -29
- package/dist/components/select/mobile-select.d.ts +3 -2
- package/dist/components/select/mobile-select.js +54 -48
- package/dist/components/select/select-types.d.ts +1 -0
- package/dist/components/select/select.js +19 -6
- package/dist/components/slider/slider.js +136 -133
- package/dist/components/sonner/sonner.js +10 -10
- package/dist/components/spinner/spinner.js +1 -1
- package/dist/components/splitter/splitter.css +4 -0
- package/dist/components/splitter/splitter.js +29 -24
- package/dist/components/statistic/statistic.d.ts +2 -0
- package/dist/components/statistic/statistic.js +203 -187
- package/dist/components/table/table-filter.js +61 -52
- package/dist/components/table/table-icons.js +3 -1
- package/dist/components/table/table.css +29 -11
- package/dist/components/table/table.d.ts +1 -1
- package/dist/components/table/table.js +384 -547
- package/dist/components/tabs/tabs.js +3 -2
- package/dist/components/tag/tag.js +22 -19
- package/dist/components/time-picker/time-picker.d.ts +0 -1
- package/dist/components/time-picker/time-picker.js +160 -103
- package/dist/components/tooltip/tooltip.d.ts +2 -1
- package/dist/components/tooltip/tooltip.js +82 -71
- package/dist/components/transfer/transfer-list.js +224 -488
- package/dist/components/transfer/transfer-parts.js +14 -4
- package/dist/components/transfer/transfer-types.d.ts +1 -0
- package/dist/components/transfer/transfer.js +23 -20
- package/dist/components/tree/tree-keyboard.d.ts +6 -0
- package/dist/components/tree/tree-keyboard.js +27 -0
- package/dist/components/tree/tree.js +14 -3
- package/dist/components/tree-select/select-engine.d.ts +2 -1
- package/dist/components/tree-select/select-engine.js +23 -15
- package/dist/components/tree-select/tree-select.js +20 -10
- package/dist/components/upload/upload.js +30 -26
- package/dist/docs/component-docs.d.ts +13 -2
- package/dist/docs/components/headless-input-number.doc.d.ts +5 -0
- package/dist/docs/components/headless-input-number.doc.js +7 -0
- package/dist/docs/components/input-number.doc.d.ts +5 -0
- package/dist/docs/components/input-number.doc.js +7 -0
- package/dist/docs/components/statistic.doc.d.ts +5 -0
- package/dist/docs/components/statistic.doc.js +7 -0
- package/dist/docs/components/tao-provider.doc.d.ts +8 -2
- package/dist/docs/components/tao-provider.doc.js +16 -3
- package/dist/docs/components/tooltip.doc.d.ts +2 -2
- package/dist/entries/provider.d.ts +2 -1
- package/dist/entries/provider.js +1 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +1 -0
- package/dist/locales/ar-EG.d.ts +3 -0
- package/dist/locales/ar-EG.js +199 -0
- package/dist/locales/create-locale.d.ts +41 -0
- package/dist/locales/create-locale.js +88 -0
- package/dist/locales/de-DE.d.ts +3 -0
- package/dist/locales/de-DE.js +195 -0
- package/dist/locales/en-US.d.ts +2 -0
- package/dist/locales/en-US.js +194 -0
- package/dist/locales/es-ES.d.ts +3 -0
- package/dist/locales/es-ES.js +195 -0
- package/dist/locales/fr-FR.d.ts +3 -0
- package/dist/locales/fr-FR.js +195 -0
- package/dist/locales/hi-IN.d.ts +3 -0
- package/dist/locales/hi-IN.js +194 -0
- package/dist/locales/id-ID.d.ts +3 -0
- package/dist/locales/id-ID.js +194 -0
- package/dist/locales/index.d.ts +18 -0
- package/dist/locales/index.js +17 -0
- package/dist/locales/it-IT.d.ts +3 -0
- package/dist/locales/it-IT.js +195 -0
- package/dist/locales/ja-JP.d.ts +3 -0
- package/dist/locales/ja-JP.js +194 -0
- package/dist/locales/ko-KR.d.ts +3 -0
- package/dist/locales/ko-KR.js +194 -0
- package/dist/locales/pt-BR.d.ts +3 -0
- package/dist/locales/pt-BR.js +195 -0
- package/dist/locales/ru-RU.d.ts +3 -0
- package/dist/locales/ru-RU.js +197 -0
- package/dist/locales/th-TH.d.ts +3 -0
- package/dist/locales/th-TH.js +194 -0
- package/dist/locales/tr-TR.d.ts +3 -0
- package/dist/locales/tr-TR.js +194 -0
- package/dist/locales/types.d.ts +176 -0
- package/dist/locales/types.js +0 -0
- package/dist/locales/vi-VN.d.ts +3 -0
- package/dist/locales/vi-VN.js +194 -0
- package/dist/locales/zh-CN.d.ts +3 -0
- package/dist/locales/zh-CN.js +194 -0
- package/dist/locales/zh-TW.d.ts +3 -0
- package/dist/locales/zh-TW.js +194 -0
- package/dist/number-input/format.d.ts +4 -3
- package/dist/number-input/format.js +9 -7
- package/dist/number-input/locale.d.ts +19 -0
- package/dist/number-input/locale.js +44 -0
- package/dist/number-input/number-input.js +1 -0
- package/dist/number-input/use-number-input.d.ts +2 -0
- package/dist/number-input/use-number-input.js +180 -176
- package/dist/provider/locale.d.ts +3 -65
- package/dist/provider/locale.js +2 -146
- package/dist/provider/merge-locale.d.ts +8 -0
- package/dist/provider/merge-locale.js +53 -0
- package/dist/provider/tao-provider.d.ts +16 -5
- package/dist/provider/tao-provider.js +200 -92
- package/dist/utils/scroll-left.d.ts +3 -0
- package/dist/utils/scroll-left.js +7 -0
- package/llms.txt +3 -3
- package/package.json +5 -1
|
@@ -2,7 +2,9 @@ import { jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { c } from "react-compiler-runtime";
|
|
3
3
|
import _rc_component_form, { FormProvider, List, useWatch } from "@rc-component/form";
|
|
4
4
|
import { forwardRef, useContext } from "react";
|
|
5
|
-
import
|
|
5
|
+
import FormContext from "@rc-component/form/es/FormContext";
|
|
6
|
+
import { TaoProvider, useTaoConfig } from "../../provider/tao-provider.js";
|
|
7
|
+
import { mergeValidateMessages } from "../../provider/merge-locale.js";
|
|
6
8
|
import { cx } from "../../utils/semantic.js";
|
|
7
9
|
import { FormLayoutContext } from "./form-context.js";
|
|
8
10
|
import { FormItem } from "./form-item.js";
|
|
@@ -11,125 +13,108 @@ import "./form.css";
|
|
|
11
13
|
import { interopDefault } from "../../utils/interop-default.js";
|
|
12
14
|
const RcFormComponent = /*#__PURE__*/ interopDefault(_rc_component_form);
|
|
13
15
|
function FormInner(t0, ref) {
|
|
14
|
-
const $ = c(
|
|
15
|
-
|
|
16
|
-
let className;
|
|
17
|
-
let classNames;
|
|
18
|
-
let disabled;
|
|
19
|
-
let form;
|
|
20
|
-
let rcProps;
|
|
21
|
-
let size;
|
|
22
|
-
let style;
|
|
23
|
-
let styles;
|
|
24
|
-
let t1;
|
|
25
|
-
if ($[0] !== t0) {
|
|
26
|
-
({ layout: t1, size, disabled, children, className, style, classNames, styles, form, ...rcProps } = t0);
|
|
27
|
-
$[0] = t0;
|
|
28
|
-
$[1] = children;
|
|
29
|
-
$[2] = className;
|
|
30
|
-
$[3] = classNames;
|
|
31
|
-
$[4] = disabled;
|
|
32
|
-
$[5] = form;
|
|
33
|
-
$[6] = rcProps;
|
|
34
|
-
$[7] = size;
|
|
35
|
-
$[8] = style;
|
|
36
|
-
$[9] = styles;
|
|
37
|
-
$[10] = t1;
|
|
38
|
-
} else {
|
|
39
|
-
children = $[1];
|
|
40
|
-
className = $[2];
|
|
41
|
-
classNames = $[3];
|
|
42
|
-
disabled = $[4];
|
|
43
|
-
form = $[5];
|
|
44
|
-
rcProps = $[6];
|
|
45
|
-
size = $[7];
|
|
46
|
-
style = $[8];
|
|
47
|
-
styles = $[9];
|
|
48
|
-
t1 = $[10];
|
|
49
|
-
}
|
|
16
|
+
const $ = c(31);
|
|
17
|
+
const { layout: t1, size, disabled, children, className, style, classNames, styles, form, ...rcProps } = t0;
|
|
50
18
|
const layout = void 0 === t1 ? "vertical" : t1;
|
|
19
|
+
const { locale } = useTaoConfig();
|
|
20
|
+
let t2;
|
|
21
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
22
|
+
t2 = interopDefault(FormContext);
|
|
23
|
+
$[0] = t2;
|
|
24
|
+
} else t2 = $[0];
|
|
25
|
+
const formContext = useContext(t2);
|
|
51
26
|
const [instance] = useForm(form);
|
|
52
|
-
const
|
|
53
|
-
let t3;
|
|
54
|
-
if ($[11] !== instance) {
|
|
55
|
-
t3 = getFieldRegistry(instance);
|
|
56
|
-
$[11] = instance;
|
|
57
|
-
$[12] = t3;
|
|
58
|
-
} else t3 = $[12];
|
|
27
|
+
const t3 = instance;
|
|
59
28
|
let t4;
|
|
60
|
-
if ($[
|
|
61
|
-
t4 =
|
|
29
|
+
if ($[1] !== instance) {
|
|
30
|
+
t4 = getFieldRegistry(instance);
|
|
31
|
+
$[1] = instance;
|
|
32
|
+
$[2] = t4;
|
|
33
|
+
} else t4 = $[2];
|
|
34
|
+
let t5;
|
|
35
|
+
if ($[3] !== layout || $[4] !== t3 || $[5] !== t4) {
|
|
36
|
+
t5 = {
|
|
62
37
|
layout,
|
|
63
|
-
form:
|
|
64
|
-
fields:
|
|
38
|
+
form: t3,
|
|
39
|
+
fields: t4
|
|
65
40
|
};
|
|
66
|
-
$[
|
|
67
|
-
$[
|
|
68
|
-
$[
|
|
69
|
-
$[
|
|
70
|
-
} else
|
|
71
|
-
const layoutValue =
|
|
72
|
-
const
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
41
|
+
$[3] = layout;
|
|
42
|
+
$[4] = t3;
|
|
43
|
+
$[5] = t4;
|
|
44
|
+
$[6] = t5;
|
|
45
|
+
} else t5 = $[6];
|
|
46
|
+
const layoutValue = t5;
|
|
47
|
+
const t6 = FormLayoutContext;
|
|
48
|
+
const T0 = TaoProvider;
|
|
49
|
+
const T1 = RcFormComponent;
|
|
50
|
+
const t7 = "";
|
|
51
|
+
const t8 = classNames?.root;
|
|
52
|
+
let t9;
|
|
53
|
+
if ($[7] !== className || $[8] !== t8) {
|
|
54
|
+
t9 = cx(t8, className);
|
|
55
|
+
$[7] = className;
|
|
56
|
+
$[8] = t8;
|
|
57
|
+
$[9] = t9;
|
|
58
|
+
} else t9 = $[9];
|
|
59
|
+
const t10 = styles?.root;
|
|
60
|
+
let t11;
|
|
61
|
+
if ($[10] !== style || $[11] !== t10) {
|
|
62
|
+
t11 = {
|
|
63
|
+
...t10,
|
|
85
64
|
...style
|
|
86
65
|
};
|
|
87
|
-
$[
|
|
88
|
-
$[
|
|
89
|
-
$[
|
|
90
|
-
} else
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
66
|
+
$[10] = style;
|
|
67
|
+
$[11] = t10;
|
|
68
|
+
$[12] = t11;
|
|
69
|
+
} else t11 = $[12];
|
|
70
|
+
const t12 = mergeValidateMessages(mergeValidateMessages(locale.form, formContext.validateMessages), rcProps.validateMessages);
|
|
71
|
+
let t13;
|
|
72
|
+
if ($[13] !== T1 || $[14] !== children || $[15] !== instance || $[16] !== rcProps || $[17] !== ref || $[18] !== t11 || $[19] !== t12 || $[20] !== t9) {
|
|
73
|
+
t13 = /*#__PURE__*/ jsx(T1, {
|
|
74
|
+
"data-tao-form": t7,
|
|
95
75
|
ref: ref,
|
|
96
|
-
className:
|
|
97
|
-
style:
|
|
76
|
+
className: t9,
|
|
77
|
+
style: t11,
|
|
98
78
|
...rcProps,
|
|
79
|
+
validateMessages: t12,
|
|
99
80
|
form: instance,
|
|
100
81
|
children: children
|
|
101
82
|
});
|
|
102
|
-
$[
|
|
103
|
-
$[
|
|
104
|
-
$[
|
|
105
|
-
$[
|
|
106
|
-
$[
|
|
107
|
-
$[
|
|
108
|
-
$[
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
83
|
+
$[13] = T1;
|
|
84
|
+
$[14] = children;
|
|
85
|
+
$[15] = instance;
|
|
86
|
+
$[16] = rcProps;
|
|
87
|
+
$[17] = ref;
|
|
88
|
+
$[18] = t11;
|
|
89
|
+
$[19] = t12;
|
|
90
|
+
$[20] = t9;
|
|
91
|
+
$[21] = t13;
|
|
92
|
+
} else t13 = $[21];
|
|
93
|
+
let t14;
|
|
94
|
+
if ($[22] !== T0 || $[23] !== disabled || $[24] !== size || $[25] !== t13) {
|
|
95
|
+
t14 = /*#__PURE__*/ jsx(T0, {
|
|
113
96
|
size: size,
|
|
114
97
|
disabled: disabled,
|
|
115
|
-
children:
|
|
98
|
+
children: t13
|
|
116
99
|
});
|
|
117
|
-
$[
|
|
118
|
-
$[
|
|
119
|
-
$[
|
|
120
|
-
$[
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
100
|
+
$[22] = T0;
|
|
101
|
+
$[23] = disabled;
|
|
102
|
+
$[24] = size;
|
|
103
|
+
$[25] = t13;
|
|
104
|
+
$[26] = t14;
|
|
105
|
+
} else t14 = $[26];
|
|
106
|
+
let t15;
|
|
107
|
+
if ($[27] !== layoutValue || $[28] !== t14 || $[29] !== t6.Provider) {
|
|
108
|
+
t15 = /*#__PURE__*/ jsx(t6.Provider, {
|
|
125
109
|
value: layoutValue,
|
|
126
|
-
children:
|
|
110
|
+
children: t14
|
|
127
111
|
});
|
|
128
|
-
$[
|
|
129
|
-
$[
|
|
130
|
-
$[
|
|
131
|
-
|
|
132
|
-
|
|
112
|
+
$[27] = layoutValue;
|
|
113
|
+
$[28] = t14;
|
|
114
|
+
$[29] = t6.Provider;
|
|
115
|
+
$[30] = t15;
|
|
116
|
+
} else t15 = $[30];
|
|
117
|
+
return t15;
|
|
133
118
|
}
|
|
134
119
|
const ForwardedForm = /*#__PURE__*/ forwardRef(FormInner);
|
|
135
120
|
function useFormInstance() {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { c } from "react-compiler-runtime";
|
|
3
3
|
import _rc_component_image from "@rc-component/image";
|
|
4
|
-
import { isValidElement, useEffect, useRef } from "react";
|
|
4
|
+
import { Children, cloneElement, isValidElement, useEffect, useRef } from "react";
|
|
5
5
|
import { useTaoInternalConfig } from "../../provider/tao-provider.js";
|
|
6
6
|
import { cx } from "../../utils/semantic.js";
|
|
7
7
|
import { ImageControlIcon } from "./image-icons.js";
|
|
@@ -87,7 +87,7 @@ function usePreviewContainer(getContainer) {
|
|
|
87
87
|
return t5;
|
|
88
88
|
}
|
|
89
89
|
function usePreviewOptions(preview) {
|
|
90
|
-
const $ = c(
|
|
90
|
+
const $ = c(58);
|
|
91
91
|
const { locale } = useTaoInternalConfig();
|
|
92
92
|
let t0;
|
|
93
93
|
if ($[0] !== preview) {
|
|
@@ -224,63 +224,117 @@ function usePreviewOptions(preview) {
|
|
|
224
224
|
$[28] = t11;
|
|
225
225
|
} else t11 = $[28];
|
|
226
226
|
const icons = t11;
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
227
|
+
let t12;
|
|
228
|
+
if ($[29] !== locale.messages.flipX || $[30] !== locale.messages.flipY || $[31] !== locale.messages.rotateLeft || $[32] !== locale.messages.rotateRight || $[33] !== locale.messages.zoomIn || $[34] !== locale.messages.zoomOut || $[35] !== locale.next || $[36] !== locale.previous) {
|
|
229
|
+
const actionLabels = {
|
|
230
|
+
prev: locale.previous,
|
|
231
|
+
next: locale.next,
|
|
232
|
+
flipY: locale.messages.flipY,
|
|
233
|
+
flipX: locale.messages.flipX,
|
|
234
|
+
rotateLeft: locale.messages.rotateLeft,
|
|
235
|
+
rotateRight: locale.messages.rotateRight,
|
|
236
|
+
zoomOut: locale.messages.zoomOut,
|
|
237
|
+
zoomIn: locale.messages.zoomIn
|
|
238
|
+
};
|
|
239
|
+
t12 = (node)=>{
|
|
240
|
+
if (!/*#__PURE__*/ isValidElement(node)) return node;
|
|
241
|
+
const label = actionLabels[node.props["aria-label"] ?? ""];
|
|
242
|
+
return void 0 === label ? node : /*#__PURE__*/ cloneElement(node, {
|
|
243
|
+
"aria-label": label
|
|
244
|
+
});
|
|
245
|
+
};
|
|
246
|
+
$[29] = locale.messages.flipX;
|
|
247
|
+
$[30] = locale.messages.flipY;
|
|
248
|
+
$[31] = locale.messages.rotateLeft;
|
|
249
|
+
$[32] = locale.messages.rotateRight;
|
|
250
|
+
$[33] = locale.messages.zoomIn;
|
|
251
|
+
$[34] = locale.messages.zoomOut;
|
|
252
|
+
$[35] = locale.next;
|
|
253
|
+
$[36] = locale.previous;
|
|
254
|
+
$[37] = t12;
|
|
255
|
+
} else t12 = $[37];
|
|
256
|
+
const localizeAction = t12;
|
|
257
|
+
const renderActions = raw.actionsRender ?? toolbarRender;
|
|
258
|
+
let t13;
|
|
259
|
+
if ($[38] !== localizeAction || $[39] !== renderActions) {
|
|
260
|
+
t13 = (original, info)=>{
|
|
261
|
+
const actions = original;
|
|
262
|
+
const localized = /*#__PURE__*/ cloneElement(actions, void 0, Children.map(actions.props.children, localizeAction));
|
|
263
|
+
return renderActions ? renderActions(localized, {
|
|
264
|
+
...info,
|
|
265
|
+
icons: {
|
|
266
|
+
prevIcon: localizeAction(info.icons.prevIcon),
|
|
267
|
+
nextIcon: localizeAction(info.icons.nextIcon),
|
|
268
|
+
flipYIcon: localizeAction(info.icons.flipYIcon),
|
|
269
|
+
flipXIcon: localizeAction(info.icons.flipXIcon),
|
|
270
|
+
rotateLeftIcon: localizeAction(info.icons.rotateLeftIcon),
|
|
271
|
+
rotateRightIcon: localizeAction(info.icons.rotateRightIcon),
|
|
272
|
+
zoomOutIcon: localizeAction(info.icons.zoomOutIcon),
|
|
273
|
+
zoomInIcon: localizeAction(info.icons.zoomInIcon)
|
|
274
|
+
}
|
|
275
|
+
}) : localized;
|
|
276
|
+
};
|
|
277
|
+
$[38] = localizeAction;
|
|
278
|
+
$[39] = renderActions;
|
|
279
|
+
$[40] = t13;
|
|
280
|
+
} else t13 = $[40];
|
|
281
|
+
const actionsRender = t13;
|
|
282
|
+
const t14 = false === preview;
|
|
283
|
+
const t15 = false === mask || maskConfig?.enabled === false;
|
|
284
|
+
const t16 = maskConfig?.blur;
|
|
285
|
+
const t17 = open ?? visible;
|
|
286
|
+
const t18 = maskConfig?.closable ?? true;
|
|
287
|
+
let t19;
|
|
288
|
+
if ($[41] !== mask) {
|
|
289
|
+
t19 = /*#__PURE__*/ isValidElement(mask) ? {
|
|
236
290
|
cover: mask
|
|
237
291
|
} : {};
|
|
238
|
-
$[
|
|
239
|
-
$[
|
|
240
|
-
} else
|
|
241
|
-
let
|
|
242
|
-
if ($[
|
|
243
|
-
|
|
292
|
+
$[41] = mask;
|
|
293
|
+
$[42] = t19;
|
|
294
|
+
} else t19 = $[42];
|
|
295
|
+
let t20;
|
|
296
|
+
if ($[43] !== actionsRender || $[44] !== container || $[45] !== icons || $[46] !== rest || $[47] !== rootClassName || $[48] !== t17 || $[49] !== t18 || $[50] !== t19) {
|
|
297
|
+
t20 = {
|
|
244
298
|
...rest,
|
|
245
|
-
open:
|
|
299
|
+
open: t17,
|
|
246
300
|
rootClassName,
|
|
247
301
|
getContainer: container,
|
|
248
302
|
icons,
|
|
249
303
|
motionName: "tao-image-preview-fade",
|
|
250
|
-
maskClosable:
|
|
251
|
-
actionsRender
|
|
252
|
-
...
|
|
304
|
+
maskClosable: t18,
|
|
305
|
+
actionsRender,
|
|
306
|
+
...t19
|
|
253
307
|
};
|
|
254
|
-
$[
|
|
255
|
-
$[
|
|
256
|
-
$[
|
|
257
|
-
$[
|
|
258
|
-
$[
|
|
259
|
-
$[
|
|
260
|
-
$[
|
|
261
|
-
$[
|
|
262
|
-
$[
|
|
263
|
-
} else
|
|
264
|
-
let
|
|
265
|
-
if ($[
|
|
266
|
-
|
|
267
|
-
disabled:
|
|
308
|
+
$[43] = actionsRender;
|
|
309
|
+
$[44] = container;
|
|
310
|
+
$[45] = icons;
|
|
311
|
+
$[46] = rest;
|
|
312
|
+
$[47] = rootClassName;
|
|
313
|
+
$[48] = t17;
|
|
314
|
+
$[49] = t18;
|
|
315
|
+
$[50] = t19;
|
|
316
|
+
$[51] = t20;
|
|
317
|
+
} else t20 = $[51];
|
|
318
|
+
let t21;
|
|
319
|
+
if ($[52] !== raw || $[53] !== t14 || $[54] !== t15 || $[55] !== t16 || $[56] !== t20) {
|
|
320
|
+
t21 = {
|
|
321
|
+
disabled: t14,
|
|
268
322
|
raw,
|
|
269
|
-
hiddenMask:
|
|
270
|
-
blurMask:
|
|
271
|
-
config:
|
|
323
|
+
hiddenMask: t15,
|
|
324
|
+
blurMask: t16,
|
|
325
|
+
config: t20
|
|
272
326
|
};
|
|
273
|
-
$[
|
|
274
|
-
$[
|
|
275
|
-
$[
|
|
276
|
-
$[
|
|
277
|
-
$[
|
|
278
|
-
$[
|
|
279
|
-
} else
|
|
280
|
-
return
|
|
327
|
+
$[52] = raw;
|
|
328
|
+
$[53] = t14;
|
|
329
|
+
$[54] = t15;
|
|
330
|
+
$[55] = t16;
|
|
331
|
+
$[56] = t20;
|
|
332
|
+
$[57] = t21;
|
|
333
|
+
} else t21 = $[57];
|
|
334
|
+
return t21;
|
|
281
335
|
}
|
|
282
336
|
function ImageProgress(t0) {
|
|
283
|
-
const $ = c(
|
|
337
|
+
const $ = c(54);
|
|
284
338
|
const { props, progress, placeholder } = t0;
|
|
285
339
|
let t1;
|
|
286
340
|
if ($[0] !== props) {
|
|
@@ -300,7 +354,7 @@ function ImageProgress(t0) {
|
|
|
300
354
|
$[3] = t2;
|
|
301
355
|
} else t2 = $[3];
|
|
302
356
|
const styles = t2;
|
|
303
|
-
const { tokenStyle } = useTaoInternalConfig();
|
|
357
|
+
const { tokenStyle, locale } = useTaoInternalConfig();
|
|
304
358
|
const cn = classes?.placeholder?.progress;
|
|
305
359
|
const st = styles?.placeholder?.progress;
|
|
306
360
|
let t3;
|
|
@@ -319,26 +373,39 @@ function ImageProgress(t0) {
|
|
|
319
373
|
} else t4 = $[8];
|
|
320
374
|
const percent = t4;
|
|
321
375
|
let t5;
|
|
322
|
-
if ($[9] !==
|
|
323
|
-
t5 =
|
|
376
|
+
if ($[9] !== locale.numberLocale || $[10] !== percent) {
|
|
377
|
+
t5 = new Intl.NumberFormat(locale.numberLocale ?? "en-US", {
|
|
378
|
+
style: "percent"
|
|
379
|
+
}).format(percent / 100);
|
|
380
|
+
$[9] = locale.numberLocale;
|
|
381
|
+
$[10] = percent;
|
|
382
|
+
$[11] = t5;
|
|
383
|
+
} else t5 = $[11];
|
|
384
|
+
const percentText = t5;
|
|
385
|
+
let t6;
|
|
386
|
+
if ($[12] !== hasPercent || $[13] !== locale.messages || $[14] !== percent || $[15] !== percentText || $[16] !== props) {
|
|
387
|
+
t6 = hasPercent ? {
|
|
324
388
|
role: "progressbar",
|
|
325
389
|
"aria-valuemin": 0,
|
|
326
390
|
"aria-valuemax": 100,
|
|
327
391
|
"aria-valuenow": percent,
|
|
328
|
-
"aria-label":
|
|
392
|
+
"aria-label": props["aria-label"] ?? percentText
|
|
329
393
|
} : {
|
|
330
394
|
role: "status",
|
|
331
|
-
"aria-label": "
|
|
395
|
+
"aria-label": props["aria-label"] ?? locale.messages.loading,
|
|
332
396
|
"aria-busy": true
|
|
333
397
|
};
|
|
334
|
-
$[
|
|
335
|
-
$[
|
|
336
|
-
$[
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
398
|
+
$[12] = hasPercent;
|
|
399
|
+
$[13] = locale.messages;
|
|
400
|
+
$[14] = percent;
|
|
401
|
+
$[15] = percentText;
|
|
402
|
+
$[16] = props;
|
|
403
|
+
$[17] = t6;
|
|
404
|
+
} else t6 = $[17];
|
|
405
|
+
const progressAria = t6;
|
|
406
|
+
let t7;
|
|
407
|
+
if ($[18] !== cn?.rail || $[19] !== hasPercent || $[20] !== percent || $[21] !== st?.rail) {
|
|
408
|
+
t7 = hasPercent ? /*#__PURE__*/ jsx("div", {
|
|
342
409
|
"data-tao-image-progress-rail": "",
|
|
343
410
|
className: cn?.rail,
|
|
344
411
|
style: st?.rail,
|
|
@@ -348,101 +415,99 @@ function ImageProgress(t0) {
|
|
|
348
415
|
}
|
|
349
416
|
})
|
|
350
417
|
}) : null;
|
|
351
|
-
$[
|
|
352
|
-
$[
|
|
353
|
-
$[
|
|
354
|
-
$[
|
|
355
|
-
$[
|
|
356
|
-
} else
|
|
357
|
-
const bar =
|
|
358
|
-
const
|
|
359
|
-
const
|
|
360
|
-
let
|
|
361
|
-
if ($[
|
|
362
|
-
|
|
363
|
-
$[
|
|
364
|
-
$[
|
|
365
|
-
$[
|
|
366
|
-
$[
|
|
367
|
-
$[
|
|
368
|
-
} else
|
|
369
|
-
const
|
|
370
|
-
const
|
|
371
|
-
let
|
|
372
|
-
if ($[
|
|
373
|
-
|
|
418
|
+
$[18] = cn?.rail;
|
|
419
|
+
$[19] = hasPercent;
|
|
420
|
+
$[20] = percent;
|
|
421
|
+
$[21] = st?.rail;
|
|
422
|
+
$[22] = t7;
|
|
423
|
+
} else t7 = $[22];
|
|
424
|
+
const bar = t7;
|
|
425
|
+
const t8 = classes?.root;
|
|
426
|
+
const t9 = cn?.root;
|
|
427
|
+
let t10;
|
|
428
|
+
if ($[23] !== props.className || $[24] !== props.rootClassName || $[25] !== t8 || $[26] !== t9) {
|
|
429
|
+
t10 = cx(t8, t9, props.rootClassName, props.className);
|
|
430
|
+
$[23] = props.className;
|
|
431
|
+
$[24] = props.rootClassName;
|
|
432
|
+
$[25] = t8;
|
|
433
|
+
$[26] = t9;
|
|
434
|
+
$[27] = t10;
|
|
435
|
+
} else t10 = $[27];
|
|
436
|
+
const t11 = styles?.root;
|
|
437
|
+
const t12 = st?.root;
|
|
438
|
+
let t13;
|
|
439
|
+
if ($[28] !== props.height || $[29] !== props.style || $[30] !== props.width || $[31] !== props.wrapperStyle || $[32] !== t11 || $[33] !== t12 || $[34] !== tokenStyle) {
|
|
440
|
+
t13 = {
|
|
374
441
|
...tokenStyle,
|
|
375
442
|
width: props.width,
|
|
376
443
|
height: props.height,
|
|
377
444
|
...props.wrapperStyle,
|
|
378
|
-
...
|
|
445
|
+
...t11,
|
|
379
446
|
...props.style,
|
|
380
|
-
...
|
|
447
|
+
...t12
|
|
381
448
|
};
|
|
382
|
-
$[
|
|
383
|
-
$[
|
|
384
|
-
$[
|
|
385
|
-
$[
|
|
386
|
-
$[
|
|
387
|
-
$[
|
|
388
|
-
$[
|
|
389
|
-
$[
|
|
390
|
-
} else
|
|
391
|
-
const
|
|
392
|
-
const
|
|
393
|
-
let
|
|
394
|
-
if ($[
|
|
395
|
-
|
|
449
|
+
$[28] = props.height;
|
|
450
|
+
$[29] = props.style;
|
|
451
|
+
$[30] = props.width;
|
|
452
|
+
$[31] = props.wrapperStyle;
|
|
453
|
+
$[32] = t11;
|
|
454
|
+
$[33] = t12;
|
|
455
|
+
$[34] = tokenStyle;
|
|
456
|
+
$[35] = t13;
|
|
457
|
+
} else t13 = $[35];
|
|
458
|
+
const t14 = cn?.content;
|
|
459
|
+
const t15 = st?.content;
|
|
460
|
+
let t16;
|
|
461
|
+
if ($[36] !== bar || $[37] !== cn?.indicator || $[38] !== hasPercent || $[39] !== percent || $[40] !== percentText || $[41] !== placeholder || $[42] !== progress || $[43] !== st?.indicator) {
|
|
462
|
+
t16 = placeholder ?? (progress?.render ? progress.render(bar, percent) : /*#__PURE__*/ jsxs(Fragment, {
|
|
396
463
|
children: [
|
|
397
464
|
bar,
|
|
398
|
-
hasPercent && /*#__PURE__*/
|
|
465
|
+
hasPercent && /*#__PURE__*/ jsx("span", {
|
|
399
466
|
className: cn?.indicator,
|
|
400
467
|
style: st?.indicator,
|
|
401
|
-
children:
|
|
402
|
-
percent,
|
|
403
|
-
"%"
|
|
404
|
-
]
|
|
468
|
+
children: percentText
|
|
405
469
|
})
|
|
406
470
|
]
|
|
407
471
|
}));
|
|
408
|
-
$[
|
|
409
|
-
$[
|
|
410
|
-
$[
|
|
411
|
-
$[
|
|
412
|
-
$[
|
|
413
|
-
$[
|
|
414
|
-
$[
|
|
415
|
-
$[
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
if ($[38] !== t13 || $[39] !== t14 || $[40] !== t15) {
|
|
419
|
-
t16 = /*#__PURE__*/ jsx("div", {
|
|
420
|
-
"data-tao-image-progress-content": "",
|
|
421
|
-
className: t13,
|
|
422
|
-
style: t14,
|
|
423
|
-
children: t15
|
|
424
|
-
});
|
|
425
|
-
$[38] = t13;
|
|
426
|
-
$[39] = t14;
|
|
427
|
-
$[40] = t15;
|
|
428
|
-
$[41] = t16;
|
|
429
|
-
} else t16 = $[41];
|
|
472
|
+
$[36] = bar;
|
|
473
|
+
$[37] = cn?.indicator;
|
|
474
|
+
$[38] = hasPercent;
|
|
475
|
+
$[39] = percent;
|
|
476
|
+
$[40] = percentText;
|
|
477
|
+
$[41] = placeholder;
|
|
478
|
+
$[42] = progress;
|
|
479
|
+
$[43] = st?.indicator;
|
|
480
|
+
$[44] = t16;
|
|
481
|
+
} else t16 = $[44];
|
|
430
482
|
let t17;
|
|
431
|
-
if ($[
|
|
483
|
+
if ($[45] !== t14 || $[46] !== t15 || $[47] !== t16) {
|
|
432
484
|
t17 = /*#__PURE__*/ jsx("div", {
|
|
485
|
+
"data-tao-image-progress-content": "",
|
|
486
|
+
className: t14,
|
|
487
|
+
style: t15,
|
|
488
|
+
children: t16
|
|
489
|
+
});
|
|
490
|
+
$[45] = t14;
|
|
491
|
+
$[46] = t15;
|
|
492
|
+
$[47] = t16;
|
|
493
|
+
$[48] = t17;
|
|
494
|
+
} else t17 = $[48];
|
|
495
|
+
let t18;
|
|
496
|
+
if ($[49] !== progressAria || $[50] !== t10 || $[51] !== t13 || $[52] !== t17) {
|
|
497
|
+
t18 = /*#__PURE__*/ jsx("div", {
|
|
433
498
|
"data-tao-image-progress": "",
|
|
434
|
-
className:
|
|
435
|
-
style:
|
|
499
|
+
className: t10,
|
|
500
|
+
style: t13,
|
|
436
501
|
...progressAria,
|
|
437
|
-
children:
|
|
502
|
+
children: t17
|
|
438
503
|
});
|
|
439
|
-
$[
|
|
440
|
-
$[
|
|
441
|
-
$[
|
|
442
|
-
$[
|
|
443
|
-
$[
|
|
444
|
-
} else
|
|
445
|
-
return
|
|
504
|
+
$[49] = progressAria;
|
|
505
|
+
$[50] = t10;
|
|
506
|
+
$[51] = t13;
|
|
507
|
+
$[52] = t17;
|
|
508
|
+
$[53] = t18;
|
|
509
|
+
} else t18 = $[53];
|
|
510
|
+
return t18;
|
|
446
511
|
}
|
|
447
512
|
function ImageBase(props) {
|
|
448
513
|
const $ = c(64);
|