@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.
- package/README.md +3 -1
- package/component-manifest.json +32 -3
- package/dist/components/alert/alert.js +20 -17
- package/dist/components/avatar/avatar.js +2 -1
- package/dist/components/breadcrumb/breadcrumb.js +81 -77
- package/dist/components/calendar/calendar.d.ts +0 -1
- package/dist/components/calendar/calendar.js +41 -30
- package/dist/components/color-picker/color-picker.js +273 -269
- package/dist/components/date-picker/calendar/calendar-grid.js +10 -4
- 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.js +35 -27
- package/dist/components/date-picker/range-picker.js +28 -20
- package/dist/components/dropdown/dropdown.js +21 -20
- 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/modal/confirm-dialog.js +4 -2
- package/dist/components/modal/modal.js +385 -383
- package/dist/components/pagination/pagination.js +115 -110
- package/dist/components/popconfirm/popconfirm.js +109 -107
- package/dist/components/qr-code/qr-code.js +22 -21
- package/dist/components/scroll-area/scroll-area.js +41 -38
- package/dist/components/select/mobile-select.d.ts +1 -1
- package/dist/components/select/mobile-select.js +2 -1
- package/dist/components/sonner/sonner.js +10 -10
- package/dist/components/spinner/spinner.js +1 -1
- package/dist/components/splitter/splitter.js +24 -21
- 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.d.ts +1 -1
- package/dist/components/table/table.js +5 -4
- 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 +139 -96
- package/dist/components/transfer/transfer-list.js +224 -488
- package/dist/components/transfer/transfer-parts.js +2 -2
- package/dist/components/transfer/transfer-types.d.ts +1 -0
- package/dist/components/transfer/transfer.js +13 -16
- 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 +10 -2
- package/dist/docs/components/tooltip.doc.d.ts +2 -2
- package/dist/entries/provider.d.ts +1 -0
- package/dist/entries/provider.js +1 -0
- package/dist/index.d.ts +1 -0
- 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 +6 -2
- package/dist/provider/tao-provider.js +2 -4
- package/llms.txt +1 -1
- package/package.json +5 -1
|
@@ -9,7 +9,7 @@ import { Button } from "../button/button.js";
|
|
|
9
9
|
import { Spinner } from "../spinner/spinner.js";
|
|
10
10
|
import "./qr-code.css";
|
|
11
11
|
const qr_code_QRCode = /*#__PURE__*/ forwardRef(function(props, ref) {
|
|
12
|
-
const $ = c(
|
|
12
|
+
const $ = c(79);
|
|
13
13
|
let boostLevel;
|
|
14
14
|
let className;
|
|
15
15
|
let classNames;
|
|
@@ -224,7 +224,7 @@ const qr_code_QRCode = /*#__PURE__*/ forwardRef(function(props, ref) {
|
|
|
224
224
|
$[62] = t18;
|
|
225
225
|
} else t18 = $[62];
|
|
226
226
|
let t19;
|
|
227
|
-
if ($[63] !== locale || $[64] !== names?.cover || $[
|
|
227
|
+
if ($[63] !== config.locale.messages || $[64] !== locale || $[65] !== names?.cover || $[66] !== onRefresh || $[67] !== semanticStyles?.cover || $[68] !== status || $[69] !== statusRender) {
|
|
228
228
|
t19 = "active" !== status && /*#__PURE__*/ jsx("div", {
|
|
229
229
|
"data-tao-qr-cover": "",
|
|
230
230
|
role: "status",
|
|
@@ -235,7 +235,7 @@ const qr_code_QRCode = /*#__PURE__*/ forwardRef(function(props, ref) {
|
|
|
235
235
|
locale,
|
|
236
236
|
onRefresh
|
|
237
237
|
}) : "loading" === status ? /*#__PURE__*/ jsx(Spinner, {
|
|
238
|
-
"aria-label":
|
|
238
|
+
"aria-label": config.locale.messages.loadingQrCode
|
|
239
239
|
}) : /*#__PURE__*/ jsxs(Fragment, {
|
|
240
240
|
children: [
|
|
241
241
|
/*#__PURE__*/ jsx("span", {
|
|
@@ -249,16 +249,17 @@ const qr_code_QRCode = /*#__PURE__*/ forwardRef(function(props, ref) {
|
|
|
249
249
|
]
|
|
250
250
|
})
|
|
251
251
|
});
|
|
252
|
-
$[63] = locale;
|
|
253
|
-
$[64] =
|
|
254
|
-
$[65] =
|
|
255
|
-
$[66] =
|
|
256
|
-
$[67] =
|
|
257
|
-
$[68] =
|
|
258
|
-
$[69] =
|
|
259
|
-
|
|
252
|
+
$[63] = config.locale.messages;
|
|
253
|
+
$[64] = locale;
|
|
254
|
+
$[65] = names?.cover;
|
|
255
|
+
$[66] = onRefresh;
|
|
256
|
+
$[67] = semanticStyles?.cover;
|
|
257
|
+
$[68] = status;
|
|
258
|
+
$[69] = statusRender;
|
|
259
|
+
$[70] = t19;
|
|
260
|
+
} else t19 = $[70];
|
|
260
261
|
let t20;
|
|
261
|
-
if ($[
|
|
262
|
+
if ($[71] !== bordered || $[72] !== rest || $[73] !== status || $[74] !== t15 || $[75] !== t17 || $[76] !== t18 || $[77] !== t19) {
|
|
262
263
|
t20 = /*#__PURE__*/ jsxs("div", {
|
|
263
264
|
...rest,
|
|
264
265
|
ref: root,
|
|
@@ -272,15 +273,15 @@ const qr_code_QRCode = /*#__PURE__*/ forwardRef(function(props, ref) {
|
|
|
272
273
|
t19
|
|
273
274
|
]
|
|
274
275
|
});
|
|
275
|
-
$[
|
|
276
|
-
$[
|
|
277
|
-
$[
|
|
278
|
-
$[
|
|
279
|
-
$[
|
|
280
|
-
$[
|
|
281
|
-
$[
|
|
282
|
-
$[
|
|
283
|
-
} else t20 = $[
|
|
276
|
+
$[71] = bordered;
|
|
277
|
+
$[72] = rest;
|
|
278
|
+
$[73] = status;
|
|
279
|
+
$[74] = t15;
|
|
280
|
+
$[75] = t17;
|
|
281
|
+
$[76] = t18;
|
|
282
|
+
$[77] = t19;
|
|
283
|
+
$[78] = t20;
|
|
284
|
+
} else t20 = $[78];
|
|
284
285
|
return t20;
|
|
285
286
|
});
|
|
286
287
|
export { qr_code_QRCode as QRCode };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { c } from "react-compiler-runtime";
|
|
3
3
|
import { useEffect, useRef, useState } from "react";
|
|
4
|
-
import { useTaoDirection } from "../../provider/tao-provider.js";
|
|
4
|
+
import { useTaoConfig, useTaoDirection } from "../../provider/tao-provider.js";
|
|
5
5
|
import { getScrollLeft, setScrollLeft } from "../../utils/scroll-left.js";
|
|
6
6
|
import { cx } from "../../utils/semantic.js";
|
|
7
7
|
import "./scroll-area.css";
|
|
8
8
|
function ScrollArea(t0) {
|
|
9
|
-
const $ = c(
|
|
9
|
+
const $ = c(82);
|
|
10
10
|
const { children, type: t1, direction: t2, maxHeight, maxWidth, scrollbarSize: t3, scrollbarOffset: t4, scrollShadow: t5, onScroll: onScrollProp, onScrollEnd, scrollEndThreshold: t6, className, style, classNames, styles } = t0;
|
|
11
11
|
const type = void 0 === t1 ? "hover" : t1;
|
|
12
12
|
const direction = void 0 === t2 ? "vertical" : t2;
|
|
@@ -33,6 +33,7 @@ function ScrollArea(t0) {
|
|
|
33
33
|
} else t7 = $[0];
|
|
34
34
|
const [scrollState, setScrollState] = useState(t7);
|
|
35
35
|
const [textDirection, directionRef] = useTaoDirection(void 0, "self");
|
|
36
|
+
const { locale } = useTaoConfig();
|
|
36
37
|
let t8;
|
|
37
38
|
if ($[1] !== textDirection) {
|
|
38
39
|
t8 = ()=>{
|
|
@@ -309,12 +310,12 @@ function ScrollArea(t0) {
|
|
|
309
310
|
$[49] = t36;
|
|
310
311
|
} else t36 = $[49];
|
|
311
312
|
let t37;
|
|
312
|
-
if ($[50] !== classNames?.scrollbar || $[51] !== classNames?.thumb || $[52] !== scrollState.hasVertical || $[
|
|
313
|
+
if ($[50] !== classNames?.scrollbar || $[51] !== classNames?.thumb || $[52] !== locale || $[53] !== scrollState.hasVertical || $[54] !== scrollState.thumbYOffset || $[55] !== scrollState.thumbYRatio || $[56] !== showVertical || $[57] !== styles?.scrollbar || $[58] !== styles?.thumb) {
|
|
313
314
|
t37 = showVertical && scrollState.hasVertical && /*#__PURE__*/ jsx("button", {
|
|
314
315
|
type: "button",
|
|
315
316
|
"data-tao-scrollbar": "",
|
|
316
317
|
"data-tao-orientation": "vertical",
|
|
317
|
-
"aria-label":
|
|
318
|
+
"aria-label": locale.messages.scrollVertically,
|
|
318
319
|
className: cx(classNames?.scrollbar),
|
|
319
320
|
style: styles?.scrollbar,
|
|
320
321
|
onClick: (e_2)=>handleTrackClick("y", e_2),
|
|
@@ -333,21 +334,22 @@ function ScrollArea(t0) {
|
|
|
333
334
|
});
|
|
334
335
|
$[50] = classNames?.scrollbar;
|
|
335
336
|
$[51] = classNames?.thumb;
|
|
336
|
-
$[52] =
|
|
337
|
-
$[53] = scrollState.
|
|
338
|
-
$[54] = scrollState.
|
|
339
|
-
$[55] =
|
|
340
|
-
$[56] =
|
|
341
|
-
$[57] = styles?.
|
|
342
|
-
$[58] =
|
|
343
|
-
|
|
337
|
+
$[52] = locale;
|
|
338
|
+
$[53] = scrollState.hasVertical;
|
|
339
|
+
$[54] = scrollState.thumbYOffset;
|
|
340
|
+
$[55] = scrollState.thumbYRatio;
|
|
341
|
+
$[56] = showVertical;
|
|
342
|
+
$[57] = styles?.scrollbar;
|
|
343
|
+
$[58] = styles?.thumb;
|
|
344
|
+
$[59] = t37;
|
|
345
|
+
} else t37 = $[59];
|
|
344
346
|
let t38;
|
|
345
|
-
if ($[
|
|
347
|
+
if ($[60] !== classNames?.scrollbar || $[61] !== classNames?.thumb || $[62] !== locale || $[63] !== scrollState.hasHorizontal || $[64] !== scrollState.thumbXOffset || $[65] !== scrollState.thumbXRatio || $[66] !== showHorizontal || $[67] !== styles?.scrollbar || $[68] !== styles?.thumb) {
|
|
346
348
|
t38 = showHorizontal && scrollState.hasHorizontal && /*#__PURE__*/ jsx("button", {
|
|
347
349
|
type: "button",
|
|
348
350
|
"data-tao-scrollbar": "",
|
|
349
351
|
"data-tao-orientation": "horizontal",
|
|
350
|
-
"aria-label":
|
|
352
|
+
"aria-label": locale.messages.scrollHorizontally,
|
|
351
353
|
className: cx(classNames?.scrollbar),
|
|
352
354
|
style: styles?.scrollbar,
|
|
353
355
|
onClick: (e_4)=>handleTrackClick("x", e_4),
|
|
@@ -364,18 +366,19 @@ function ScrollArea(t0) {
|
|
|
364
366
|
onPointerDown: (e_5)=>handleThumbPointerDown("x", e_5)
|
|
365
367
|
})
|
|
366
368
|
});
|
|
367
|
-
$[
|
|
368
|
-
$[
|
|
369
|
-
$[
|
|
370
|
-
$[
|
|
371
|
-
$[
|
|
372
|
-
$[
|
|
373
|
-
$[
|
|
374
|
-
$[
|
|
375
|
-
$[
|
|
376
|
-
|
|
369
|
+
$[60] = classNames?.scrollbar;
|
|
370
|
+
$[61] = classNames?.thumb;
|
|
371
|
+
$[62] = locale;
|
|
372
|
+
$[63] = scrollState.hasHorizontal;
|
|
373
|
+
$[64] = scrollState.thumbXOffset;
|
|
374
|
+
$[65] = scrollState.thumbXRatio;
|
|
375
|
+
$[66] = showHorizontal;
|
|
376
|
+
$[67] = styles?.scrollbar;
|
|
377
|
+
$[68] = styles?.thumb;
|
|
378
|
+
$[69] = t38;
|
|
379
|
+
} else t38 = $[69];
|
|
377
380
|
let t39;
|
|
378
|
-
if ($[
|
|
381
|
+
if ($[70] !== directionRef || $[71] !== t26 || $[72] !== t27 || $[73] !== t29 || $[74] !== t31 || $[75] !== t34 || $[76] !== t35 || $[77] !== t36 || $[78] !== t37 || $[79] !== t38 || $[80] !== type) {
|
|
379
382
|
t39 = /*#__PURE__*/ jsxs("div", {
|
|
380
383
|
ref: directionRef,
|
|
381
384
|
"data-tao-scroll-area": "",
|
|
@@ -392,19 +395,19 @@ function ScrollArea(t0) {
|
|
|
392
395
|
t38
|
|
393
396
|
]
|
|
394
397
|
});
|
|
395
|
-
$[
|
|
396
|
-
$[
|
|
397
|
-
$[
|
|
398
|
-
$[
|
|
399
|
-
$[
|
|
400
|
-
$[
|
|
401
|
-
$[
|
|
402
|
-
$[
|
|
403
|
-
$[
|
|
404
|
-
$[
|
|
405
|
-
$[
|
|
406
|
-
$[
|
|
407
|
-
} else t39 = $[
|
|
398
|
+
$[70] = directionRef;
|
|
399
|
+
$[71] = t26;
|
|
400
|
+
$[72] = t27;
|
|
401
|
+
$[73] = t29;
|
|
402
|
+
$[74] = t31;
|
|
403
|
+
$[75] = t34;
|
|
404
|
+
$[76] = t35;
|
|
405
|
+
$[77] = t36;
|
|
406
|
+
$[78] = t37;
|
|
407
|
+
$[79] = t38;
|
|
408
|
+
$[80] = type;
|
|
409
|
+
$[81] = t39;
|
|
410
|
+
} else t39 = $[81];
|
|
408
411
|
return t39;
|
|
409
412
|
}
|
|
410
413
|
export { ScrollArea };
|
|
@@ -25,7 +25,7 @@ interface MobileSelectContentProps extends Pick<SelectProps, 'classNames' | 'sty
|
|
|
25
25
|
tokenSeparators?: string[];
|
|
26
26
|
onSearchClear: () => void;
|
|
27
27
|
}
|
|
28
|
-
declare function MobileSelectContentInner({ options, value, onChange, onMultiChange, showSearch, searchValue: search, onSearch, filterOption, notFoundContent, optionRender, onClose, multiple, maxCount, mode, tokenSeparators, onSearchClear, disabled, classNames, styles, }: MobileSelectContentProps): import("react").JSX.Element;
|
|
28
|
+
declare function MobileSelectContentInner({ options, value, onChange, onMultiChange, showSearch, searchValue: search, onSearch, filterOption, notFoundContent: notFoundContentProp, optionRender, onClose, multiple, maxCount, mode, tokenSeparators, onSearchClear, disabled, classNames, styles, }: MobileSelectContentProps): import("react").JSX.Element;
|
|
29
29
|
export { MobileSelectContentInner as MobileSelectContent };
|
|
30
30
|
export interface MobileSelectDrawerProps extends MobileSelectContentProps {
|
|
31
31
|
direction?: 'ltr' | 'rtl';
|
|
@@ -9,8 +9,9 @@ import { SearchIcon } from "./select-icons.js";
|
|
|
9
9
|
import { countLeafOptions, defaultFilter, filterTree, flattenLeafOptions } from "./select-model.js";
|
|
10
10
|
import { useSelectSelection } from "./use-select-selection.js";
|
|
11
11
|
import "./mobile-select.css";
|
|
12
|
-
function MobileSelectContentInner({ options, value, onChange, onMultiChange, showSearch, searchValue: search, onSearch, filterOption, notFoundContent
|
|
12
|
+
function MobileSelectContentInner({ options, value, onChange, onMultiChange, showSearch, searchValue: search, onSearch, filterOption, notFoundContent: notFoundContentProp, optionRender, onClose, multiple, maxCount, mode, tokenSeparators, onSearchClear, disabled, classNames, styles }) {
|
|
13
13
|
const { locale } = useTaoConfig();
|
|
14
|
+
const notFoundContent = void 0 === notFoundContentProp ? locale.noResults : notFoundContentProp;
|
|
14
15
|
const valueArray = useMemo(()=>{
|
|
15
16
|
if (multiple) return value ?? [];
|
|
16
17
|
return value ? [
|
|
@@ -116,20 +116,20 @@ function resolveDataType(type, richColors) {
|
|
|
116
116
|
if (!richColors) return 'default';
|
|
117
117
|
return type;
|
|
118
118
|
}
|
|
119
|
-
function getAriaLabel(type) {
|
|
119
|
+
function getAriaLabel(type, messages) {
|
|
120
120
|
switch(type){
|
|
121
121
|
case 'success':
|
|
122
|
-
return
|
|
122
|
+
return messages.successNotification;
|
|
123
123
|
case 'error':
|
|
124
|
-
return
|
|
124
|
+
return messages.errorNotification;
|
|
125
125
|
case 'warning':
|
|
126
|
-
return
|
|
126
|
+
return messages.warningNotification;
|
|
127
127
|
case 'info':
|
|
128
|
-
return
|
|
128
|
+
return messages.infoNotification;
|
|
129
129
|
case 'loading':
|
|
130
|
-
return
|
|
130
|
+
return messages.loadingNotification;
|
|
131
131
|
default:
|
|
132
|
-
return
|
|
132
|
+
return messages.notification;
|
|
133
133
|
}
|
|
134
134
|
}
|
|
135
135
|
function renderPromiseState(stateValue, payload) {
|
|
@@ -138,7 +138,6 @@ function renderPromiseState(stateValue, payload) {
|
|
|
138
138
|
return stateValue;
|
|
139
139
|
}
|
|
140
140
|
function Sonner({ position = 'bottom-right', visibleToasts = 3, offset = 24, gap = 12, expand = true, richColors = false, closeButton = false, duration = 4000, className, style, classNames, styles }) {
|
|
141
|
-
useTaoConfig();
|
|
142
141
|
const snapshot = useSyncExternalStore(subscribe, getSnapshot, getSnapshot);
|
|
143
142
|
const [heights, setHeights] = useState(()=>new Map());
|
|
144
143
|
useEffect(()=>{
|
|
@@ -197,6 +196,7 @@ function Sonner({ position = 'bottom-right', visibleToasts = 3, offset = 24, gap
|
|
|
197
196
|
});
|
|
198
197
|
}
|
|
199
198
|
function ToastView({ toast, richColors, showClose, yPosition, index, visibleToasts, expanded, offset, frontToastHeight, setHeights, classNames, styles }) {
|
|
199
|
+
const { locale: { messages } } = useTaoConfig();
|
|
200
200
|
const [mounted, setMounted] = useState(false);
|
|
201
201
|
const [offsetBeforeRemove, setOffsetBeforeRemove] = useState(0);
|
|
202
202
|
const ref = useRef(null);
|
|
@@ -245,7 +245,7 @@ function ToastView({ toast, richColors, showClose, yPosition, index, visibleToas
|
|
|
245
245
|
className: cx(classNames?.toast),
|
|
246
246
|
role: "status",
|
|
247
247
|
"aria-live": "polite",
|
|
248
|
-
"aria-label": getAriaLabel(toast.type),
|
|
248
|
+
"aria-label": getAriaLabel(toast.type, messages),
|
|
249
249
|
"data-tao-sonner-toast": "",
|
|
250
250
|
"data-tao-type": resolveDataType(toast.type, richColors),
|
|
251
251
|
"data-tao-mounted": mounted,
|
|
@@ -312,7 +312,7 @@ function ToastView({ toast, richColors, showClose, yPosition, index, visibleToas
|
|
|
312
312
|
}) : null,
|
|
313
313
|
showClose ? /*#__PURE__*/ jsx("button", {
|
|
314
314
|
type: "button",
|
|
315
|
-
"aria-label":
|
|
315
|
+
"aria-label": messages.closeNotification,
|
|
316
316
|
className: cx(classNames?.close),
|
|
317
317
|
style: styles?.close,
|
|
318
318
|
"data-tao-sonner-close": "",
|
|
@@ -56,7 +56,7 @@ function Spinner(t0) {
|
|
|
56
56
|
$[10] = styles?.root;
|
|
57
57
|
$[11] = t8;
|
|
58
58
|
} else t8 = $[11];
|
|
59
|
-
const t9 = ariaLabel ?? (null != tip || ariaLabelledBy ? void 0 :
|
|
59
|
+
const t9 = ariaLabel ?? (null != tip || ariaLabelledBy ? void 0 : ctx.locale.messages.loading);
|
|
60
60
|
const t10 = classNames?.indicator;
|
|
61
61
|
let t11;
|
|
62
62
|
if ($[12] !== t10) {
|
|
@@ -3,6 +3,7 @@ import { c } from "react-compiler-runtime";
|
|
|
3
3
|
import { useEffect, useRef, useState } from "react";
|
|
4
4
|
import { cx } from "../../utils/semantic.js";
|
|
5
5
|
import "./splitter.css";
|
|
6
|
+
import { useTaoConfig } from "../../provider/tao-provider.js";
|
|
6
7
|
function parseSize(value, total) {
|
|
7
8
|
if (void 0 === value) return;
|
|
8
9
|
if ('number' == typeof value) return value;
|
|
@@ -83,9 +84,10 @@ function Panel(_props) {
|
|
|
83
84
|
return null;
|
|
84
85
|
}
|
|
85
86
|
function Splitter(t0) {
|
|
86
|
-
const $ = c(
|
|
87
|
+
const $ = c(72);
|
|
87
88
|
const { orientation: t1, onResize, onResizeEnd, onResizeStart, className, classNames, styles, children } = t0;
|
|
88
89
|
const orientation = void 0 === t1 ? "horizontal" : t1;
|
|
90
|
+
const { locale } = useTaoConfig();
|
|
89
91
|
const containerRef = useRef(null);
|
|
90
92
|
let t2;
|
|
91
93
|
if ($[0] !== children) {
|
|
@@ -379,7 +381,7 @@ function Splitter(t0) {
|
|
|
379
381
|
} else t16 = $[49];
|
|
380
382
|
const t17 = styles?.root;
|
|
381
383
|
let t18;
|
|
382
|
-
if ($[50] !== classNames?.dragger || $[51] !== classNames?.panel || $[52] !== containerSize || $[53] !== getDraggerCollapse || $[54] !== handleCollapse || $[55] !== handleDragStart || $[56] !== handleDraggerKeyDown || $[57] !== isHorizontal || $[58] !==
|
|
384
|
+
if ($[50] !== classNames?.dragger || $[51] !== classNames?.panel || $[52] !== containerSize || $[53] !== getDraggerCollapse || $[54] !== handleCollapse || $[55] !== handleDragStart || $[56] !== handleDraggerKeyDown || $[57] !== isHorizontal || $[58] !== locale || $[59] !== orientation || $[60] !== panelChildren || $[61] !== panelCount || $[62] !== panels || $[63] !== sizes || $[64] !== styles?.dragger || $[65] !== styles?.panel) {
|
|
383
385
|
t18 = panels.map((panel, i_0)=>{
|
|
384
386
|
const sizeStyle = isHorizontal ? {
|
|
385
387
|
width: sizes[i_0],
|
|
@@ -417,7 +419,7 @@ function Splitter(t0) {
|
|
|
417
419
|
"data-tao-splitter-dragger": "",
|
|
418
420
|
"data-tao-orientation": orientation,
|
|
419
421
|
role: "separator",
|
|
420
|
-
"aria-label":
|
|
422
|
+
"aria-label": locale.messages.resizePanels(i_0 + 1, i_0 + 2),
|
|
421
423
|
"aria-orientation": isHorizontal ? "vertical" : "horizontal",
|
|
422
424
|
"aria-valuemin": Math.round(valueMin),
|
|
423
425
|
"aria-valuemax": Math.round(valueMax),
|
|
@@ -444,7 +446,7 @@ function Splitter(t0) {
|
|
|
444
446
|
"data-tao-splitter-collapse": "",
|
|
445
447
|
"data-tao-collapse-direction": "start",
|
|
446
448
|
"data-tao-orientation": orientation,
|
|
447
|
-
"aria-label":
|
|
449
|
+
"aria-label": locale.messages.collapsePanel,
|
|
448
450
|
onClick: ()=>handleCollapse(i_0, "start"),
|
|
449
451
|
children: /*#__PURE__*/ jsx(CollapseIcon, {
|
|
450
452
|
direction: sizes[i_0] <= 0 ? "end" : "start",
|
|
@@ -456,7 +458,7 @@ function Splitter(t0) {
|
|
|
456
458
|
"data-tao-splitter-collapse": "",
|
|
457
459
|
"data-tao-collapse-direction": "end",
|
|
458
460
|
"data-tao-orientation": orientation,
|
|
459
|
-
"aria-label":
|
|
461
|
+
"aria-label": locale.messages.collapsePanel,
|
|
460
462
|
onClick: ()=>handleCollapse(i_0, "end"),
|
|
461
463
|
children: /*#__PURE__*/ jsx(CollapseIcon, {
|
|
462
464
|
direction: sizes[i_0 + 1] <= 0 ? "start" : "end",
|
|
@@ -479,17 +481,18 @@ function Splitter(t0) {
|
|
|
479
481
|
$[55] = handleDragStart;
|
|
480
482
|
$[56] = handleDraggerKeyDown;
|
|
481
483
|
$[57] = isHorizontal;
|
|
482
|
-
$[58] =
|
|
483
|
-
$[59] =
|
|
484
|
-
$[60] =
|
|
485
|
-
$[61] =
|
|
486
|
-
$[62] =
|
|
487
|
-
$[63] =
|
|
488
|
-
$[64] = styles?.
|
|
489
|
-
$[65] =
|
|
490
|
-
|
|
484
|
+
$[58] = locale;
|
|
485
|
+
$[59] = orientation;
|
|
486
|
+
$[60] = panelChildren;
|
|
487
|
+
$[61] = panelCount;
|
|
488
|
+
$[62] = panels;
|
|
489
|
+
$[63] = sizes;
|
|
490
|
+
$[64] = styles?.dragger;
|
|
491
|
+
$[65] = styles?.panel;
|
|
492
|
+
$[66] = t18;
|
|
493
|
+
} else t18 = $[66];
|
|
491
494
|
let t19;
|
|
492
|
-
if ($[
|
|
495
|
+
if ($[67] !== orientation || $[68] !== t16 || $[69] !== t17 || $[70] !== t18) {
|
|
493
496
|
t19 = /*#__PURE__*/ jsx("div", {
|
|
494
497
|
ref: containerRef,
|
|
495
498
|
"data-tao-splitter": "",
|
|
@@ -498,12 +501,12 @@ function Splitter(t0) {
|
|
|
498
501
|
style: t17,
|
|
499
502
|
children: t18
|
|
500
503
|
});
|
|
501
|
-
$[
|
|
502
|
-
$[
|
|
503
|
-
$[
|
|
504
|
-
$[
|
|
505
|
-
$[
|
|
506
|
-
} else t19 = $[
|
|
504
|
+
$[67] = orientation;
|
|
505
|
+
$[68] = t16;
|
|
506
|
+
$[69] = t17;
|
|
507
|
+
$[70] = t18;
|
|
508
|
+
$[71] = t19;
|
|
509
|
+
} else t19 = $[71];
|
|
507
510
|
return t19;
|
|
508
511
|
}
|
|
509
512
|
Splitter.Panel = Panel;
|
|
@@ -4,6 +4,8 @@ import './statistic.css';
|
|
|
4
4
|
export type StatisticValue = number | string;
|
|
5
5
|
export type StatisticSemanticPart = 'root' | 'content' | 'value' | 'title' | 'header' | 'prefix' | 'suffix';
|
|
6
6
|
export interface StatisticFormatConfig {
|
|
7
|
+
/** BCP 47 locale. Defaults to the provider's number locale. */
|
|
8
|
+
locale?: string;
|
|
7
9
|
formatter?: false | 'number' | 'countdown' | ((value: StatisticValue, config?: StatisticFormatConfig) => ReactNode);
|
|
8
10
|
decimalSeparator?: string;
|
|
9
11
|
groupSeparator?: string;
|