@rockshin/tao-ui 0.0.45 → 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.
Files changed (114) hide show
  1. package/README.md +3 -1
  2. package/component-manifest.json +32 -3
  3. package/dist/components/alert/alert.js +20 -17
  4. package/dist/components/avatar/avatar.js +2 -1
  5. package/dist/components/breadcrumb/breadcrumb.js +81 -77
  6. package/dist/components/calendar/calendar.d.ts +0 -1
  7. package/dist/components/calendar/calendar.js +41 -30
  8. package/dist/components/color-picker/color-picker.js +273 -269
  9. package/dist/components/date-picker/calendar/calendar-grid.js +10 -4
  10. package/dist/components/date-picker/calendar/use-calendar.d.ts +2 -2
  11. package/dist/components/date-picker/calendar/use-calendar.js +2 -3
  12. package/dist/components/date-picker/date-localization.d.ts +3 -0
  13. package/dist/components/date-picker/date-localization.js +76 -0
  14. package/dist/components/date-picker/date-picker.js +35 -27
  15. package/dist/components/date-picker/range-picker.js +28 -20
  16. package/dist/components/dropdown/dropdown.js +21 -20
  17. package/dist/components/float-button/float-button.js +3 -2
  18. package/dist/components/form/form.js +88 -103
  19. package/dist/components/image/image.js +202 -137
  20. package/dist/components/list/list-pagination.js +148 -147
  21. package/dist/components/modal/confirm-dialog.js +4 -2
  22. package/dist/components/modal/modal.js +385 -383
  23. package/dist/components/pagination/pagination.js +115 -110
  24. package/dist/components/popconfirm/popconfirm.js +109 -107
  25. package/dist/components/qr-code/qr-code.js +22 -21
  26. package/dist/components/scroll-area/scroll-area.js +41 -38
  27. package/dist/components/select/mobile-select.d.ts +1 -1
  28. package/dist/components/select/mobile-select.js +2 -1
  29. package/dist/components/sonner/sonner.js +10 -10
  30. package/dist/components/spinner/spinner.js +1 -1
  31. package/dist/components/splitter/splitter.js +24 -21
  32. package/dist/components/statistic/statistic.d.ts +2 -0
  33. package/dist/components/statistic/statistic.js +203 -187
  34. package/dist/components/table/table-filter.js +61 -52
  35. package/dist/components/table/table-icons.js +3 -1
  36. package/dist/components/table/table.d.ts +1 -1
  37. package/dist/components/table/table.js +5 -4
  38. package/dist/components/tag/tag.js +22 -19
  39. package/dist/components/time-picker/time-picker.d.ts +0 -1
  40. package/dist/components/time-picker/time-picker.js +139 -96
  41. package/dist/components/transfer/transfer-list.js +224 -488
  42. package/dist/components/transfer/transfer-parts.js +2 -2
  43. package/dist/components/transfer/transfer-types.d.ts +1 -0
  44. package/dist/components/transfer/transfer.js +13 -16
  45. package/dist/components/upload/upload.js +30 -26
  46. package/dist/docs/component-docs.d.ts +13 -2
  47. package/dist/docs/components/headless-input-number.doc.d.ts +5 -0
  48. package/dist/docs/components/headless-input-number.doc.js +7 -0
  49. package/dist/docs/components/input-number.doc.d.ts +5 -0
  50. package/dist/docs/components/input-number.doc.js +7 -0
  51. package/dist/docs/components/statistic.doc.d.ts +5 -0
  52. package/dist/docs/components/statistic.doc.js +7 -0
  53. package/dist/docs/components/tao-provider.doc.d.ts +8 -2
  54. package/dist/docs/components/tao-provider.doc.js +10 -2
  55. package/dist/docs/components/tooltip.doc.d.ts +2 -2
  56. package/dist/entries/provider.d.ts +1 -0
  57. package/dist/entries/provider.js +1 -0
  58. package/dist/index.d.ts +1 -0
  59. package/dist/index.js +1 -0
  60. package/dist/locales/ar-EG.d.ts +3 -0
  61. package/dist/locales/ar-EG.js +199 -0
  62. package/dist/locales/create-locale.d.ts +41 -0
  63. package/dist/locales/create-locale.js +88 -0
  64. package/dist/locales/de-DE.d.ts +3 -0
  65. package/dist/locales/de-DE.js +195 -0
  66. package/dist/locales/en-US.d.ts +2 -0
  67. package/dist/locales/en-US.js +194 -0
  68. package/dist/locales/es-ES.d.ts +3 -0
  69. package/dist/locales/es-ES.js +195 -0
  70. package/dist/locales/fr-FR.d.ts +3 -0
  71. package/dist/locales/fr-FR.js +195 -0
  72. package/dist/locales/hi-IN.d.ts +3 -0
  73. package/dist/locales/hi-IN.js +194 -0
  74. package/dist/locales/id-ID.d.ts +3 -0
  75. package/dist/locales/id-ID.js +194 -0
  76. package/dist/locales/index.d.ts +18 -0
  77. package/dist/locales/index.js +17 -0
  78. package/dist/locales/it-IT.d.ts +3 -0
  79. package/dist/locales/it-IT.js +195 -0
  80. package/dist/locales/ja-JP.d.ts +3 -0
  81. package/dist/locales/ja-JP.js +194 -0
  82. package/dist/locales/ko-KR.d.ts +3 -0
  83. package/dist/locales/ko-KR.js +194 -0
  84. package/dist/locales/pt-BR.d.ts +3 -0
  85. package/dist/locales/pt-BR.js +195 -0
  86. package/dist/locales/ru-RU.d.ts +3 -0
  87. package/dist/locales/ru-RU.js +197 -0
  88. package/dist/locales/th-TH.d.ts +3 -0
  89. package/dist/locales/th-TH.js +194 -0
  90. package/dist/locales/tr-TR.d.ts +3 -0
  91. package/dist/locales/tr-TR.js +194 -0
  92. package/dist/locales/types.d.ts +176 -0
  93. package/dist/locales/types.js +0 -0
  94. package/dist/locales/vi-VN.d.ts +3 -0
  95. package/dist/locales/vi-VN.js +194 -0
  96. package/dist/locales/zh-CN.d.ts +3 -0
  97. package/dist/locales/zh-CN.js +194 -0
  98. package/dist/locales/zh-TW.d.ts +3 -0
  99. package/dist/locales/zh-TW.js +194 -0
  100. package/dist/number-input/format.d.ts +4 -3
  101. package/dist/number-input/format.js +9 -7
  102. package/dist/number-input/locale.d.ts +19 -0
  103. package/dist/number-input/locale.js +44 -0
  104. package/dist/number-input/number-input.js +1 -0
  105. package/dist/number-input/use-number-input.d.ts +2 -0
  106. package/dist/number-input/use-number-input.js +180 -176
  107. package/dist/provider/locale.d.ts +3 -65
  108. package/dist/provider/locale.js +2 -146
  109. package/dist/provider/merge-locale.d.ts +8 -0
  110. package/dist/provider/merge-locale.js +53 -0
  111. package/dist/provider/tao-provider.d.ts +6 -2
  112. package/dist/provider/tao-provider.js +2 -4
  113. package/llms.txt +1 -1
  114. 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 { TaoProvider } from "../../provider/tao-provider.js";
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(37);
15
- let children;
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 t2 = instance;
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 ($[13] !== layout || $[14] !== t2 || $[15] !== t3) {
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: t2,
64
- fields: t3
38
+ form: t3,
39
+ fields: t4
65
40
  };
66
- $[13] = layout;
67
- $[14] = t2;
68
- $[15] = t3;
69
- $[16] = t4;
70
- } else t4 = $[16];
71
- const layoutValue = t4;
72
- const t5 = classNames?.root;
73
- let t6;
74
- if ($[17] !== className || $[18] !== t5) {
75
- t6 = cx(t5, className);
76
- $[17] = className;
77
- $[18] = t5;
78
- $[19] = t6;
79
- } else t6 = $[19];
80
- const t7 = styles?.root;
81
- let t8;
82
- if ($[20] !== style || $[21] !== t7) {
83
- t8 = {
84
- ...t7,
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
- $[20] = style;
88
- $[21] = t7;
89
- $[22] = t8;
90
- } else t8 = $[22];
91
- let t9;
92
- if ($[23] !== children || $[24] !== instance || $[25] !== rcProps || $[26] !== ref || $[27] !== t6 || $[28] !== t8) {
93
- t9 = /*#__PURE__*/ jsx(RcFormComponent, {
94
- "data-tao-form": "",
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: t6,
97
- style: t8,
76
+ className: t9,
77
+ style: t11,
98
78
  ...rcProps,
79
+ validateMessages: t12,
99
80
  form: instance,
100
81
  children: children
101
82
  });
102
- $[23] = children;
103
- $[24] = instance;
104
- $[25] = rcProps;
105
- $[26] = ref;
106
- $[27] = t6;
107
- $[28] = t8;
108
- $[29] = t9;
109
- } else t9 = $[29];
110
- let t10;
111
- if ($[30] !== disabled || $[31] !== size || $[32] !== t9) {
112
- t10 = /*#__PURE__*/ jsx(TaoProvider, {
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: t9
98
+ children: t13
116
99
  });
117
- $[30] = disabled;
118
- $[31] = size;
119
- $[32] = t9;
120
- $[33] = t10;
121
- } else t10 = $[33];
122
- let t11;
123
- if ($[34] !== layoutValue || $[35] !== t10) {
124
- t11 = /*#__PURE__*/ jsx(FormLayoutContext.Provider, {
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: t10
110
+ children: t14
127
111
  });
128
- $[34] = layoutValue;
129
- $[35] = t10;
130
- $[36] = t11;
131
- } else t11 = $[36];
132
- return t11;
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(46);
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
- const t12 = false === preview;
228
- const t13 = false === mask || maskConfig?.enabled === false;
229
- const t14 = maskConfig?.blur;
230
- const t15 = open ?? visible;
231
- const t16 = maskConfig?.closable ?? true;
232
- const t17 = raw.actionsRender ?? toolbarRender;
233
- let t18;
234
- if ($[29] !== mask) {
235
- t18 = /*#__PURE__*/ isValidElement(mask) ? {
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
- $[29] = mask;
239
- $[30] = t18;
240
- } else t18 = $[30];
241
- let t19;
242
- if ($[31] !== container || $[32] !== icons || $[33] !== rest || $[34] !== rootClassName || $[35] !== t15 || $[36] !== t16 || $[37] !== t17 || $[38] !== t18) {
243
- t19 = {
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: t15,
299
+ open: t17,
246
300
  rootClassName,
247
301
  getContainer: container,
248
302
  icons,
249
303
  motionName: "tao-image-preview-fade",
250
- maskClosable: t16,
251
- actionsRender: t17,
252
- ...t18
304
+ maskClosable: t18,
305
+ actionsRender,
306
+ ...t19
253
307
  };
254
- $[31] = container;
255
- $[32] = icons;
256
- $[33] = rest;
257
- $[34] = rootClassName;
258
- $[35] = t15;
259
- $[36] = t16;
260
- $[37] = t17;
261
- $[38] = t18;
262
- $[39] = t19;
263
- } else t19 = $[39];
264
- let t20;
265
- if ($[40] !== raw || $[41] !== t12 || $[42] !== t13 || $[43] !== t14 || $[44] !== t19) {
266
- t20 = {
267
- disabled: t12,
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: t13,
270
- blurMask: t14,
271
- config: t19
323
+ hiddenMask: t15,
324
+ blurMask: t16,
325
+ config: t20
272
326
  };
273
- $[40] = raw;
274
- $[41] = t12;
275
- $[42] = t13;
276
- $[43] = t14;
277
- $[44] = t19;
278
- $[45] = t20;
279
- } else t20 = $[45];
280
- return t20;
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(47);
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] !== hasPercent || $[10] !== percent) {
323
- t5 = hasPercent ? {
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": `${percent}%`
392
+ "aria-label": props["aria-label"] ?? percentText
329
393
  } : {
330
394
  role: "status",
331
- "aria-label": "Loading",
395
+ "aria-label": props["aria-label"] ?? locale.messages.loading,
332
396
  "aria-busy": true
333
397
  };
334
- $[9] = hasPercent;
335
- $[10] = percent;
336
- $[11] = t5;
337
- } else t5 = $[11];
338
- const progressAria = t5;
339
- let t6;
340
- if ($[12] !== cn?.rail || $[13] !== hasPercent || $[14] !== percent || $[15] !== st?.rail) {
341
- t6 = hasPercent ? /*#__PURE__*/ jsx("div", {
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
- $[12] = cn?.rail;
352
- $[13] = hasPercent;
353
- $[14] = percent;
354
- $[15] = st?.rail;
355
- $[16] = t6;
356
- } else t6 = $[16];
357
- const bar = t6;
358
- const t7 = classes?.root;
359
- const t8 = cn?.root;
360
- let t9;
361
- if ($[17] !== props.className || $[18] !== props.rootClassName || $[19] !== t7 || $[20] !== t8) {
362
- t9 = cx(t7, t8, props.rootClassName, props.className);
363
- $[17] = props.className;
364
- $[18] = props.rootClassName;
365
- $[19] = t7;
366
- $[20] = t8;
367
- $[21] = t9;
368
- } else t9 = $[21];
369
- const t10 = styles?.root;
370
- const t11 = st?.root;
371
- let t12;
372
- if ($[22] !== props.height || $[23] !== props.style || $[24] !== props.width || $[25] !== props.wrapperStyle || $[26] !== t10 || $[27] !== t11 || $[28] !== tokenStyle) {
373
- t12 = {
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
- ...t10,
445
+ ...t11,
379
446
  ...props.style,
380
- ...t11
447
+ ...t12
381
448
  };
382
- $[22] = props.height;
383
- $[23] = props.style;
384
- $[24] = props.width;
385
- $[25] = props.wrapperStyle;
386
- $[26] = t10;
387
- $[27] = t11;
388
- $[28] = tokenStyle;
389
- $[29] = t12;
390
- } else t12 = $[29];
391
- const t13 = cn?.content;
392
- const t14 = st?.content;
393
- let t15;
394
- if ($[30] !== bar || $[31] !== cn?.indicator || $[32] !== hasPercent || $[33] !== percent || $[34] !== placeholder || $[35] !== progress || $[36] !== st?.indicator) {
395
- t15 = placeholder ?? (progress?.render ? progress.render(bar, percent) : /*#__PURE__*/ jsxs(Fragment, {
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__*/ jsxs("span", {
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
- $[30] = bar;
409
- $[31] = cn?.indicator;
410
- $[32] = hasPercent;
411
- $[33] = percent;
412
- $[34] = placeholder;
413
- $[35] = progress;
414
- $[36] = st?.indicator;
415
- $[37] = t15;
416
- } else t15 = $[37];
417
- let t16;
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 ($[42] !== progressAria || $[43] !== t12 || $[44] !== t16 || $[45] !== t9) {
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: t9,
435
- style: t12,
499
+ className: t10,
500
+ style: t13,
436
501
  ...progressAria,
437
- children: t16
502
+ children: t17
438
503
  });
439
- $[42] = progressAria;
440
- $[43] = t12;
441
- $[44] = t16;
442
- $[45] = t9;
443
- $[46] = t17;
444
- } else t17 = $[46];
445
- return t17;
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);