@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
package/README.md
CHANGED
|
@@ -65,7 +65,15 @@ import { TaoProvider, zhCN } from '@rockshin/tao-ui/provider';
|
|
|
65
65
|
</TaoProvider>
|
|
66
66
|
```
|
|
67
67
|
|
|
68
|
-
|
|
68
|
+
TaoProvider supplies component text, accessible names, form validation messages and date/number regional settings. Built-in packs cover English, Simplified/Traditional Chinese, Japanese, Korean, French, German, Spanish, Italian, Brazilian Portuguese, Russian, Arabic (Egypt), Hindi, Turkish, Indonesian, Thai and Vietnamese. Packs are exported from the root and `/provider`, or independently as `import frFR from '@rockshin/tao-ui/locale/fr-FR'`.
|
|
69
|
+
|
|
70
|
+
Override individual keys with `locale={{ ...zhCN, done: '确认' }}` or `locale={{ messages: { loading: '处理中' } }}`. Nested providers inherit omitted text, including in portals. Date values and default ISO formats remain compatible; explicit `format="L"` requests a regional date format. Named months and week starts follow the locale without changing Day.js global locale. InputNumber and Statistic inherit regional digits/grouping; explicit `locale` or separator props take precedence, and numeric input still emits exact ASCII decimal strings. See the [internationalization contract](./INTERNATIONALIZATION.md) for all packs, precedence and verification boundaries.
|
|
71
|
+
|
|
72
|
+
### Right-to-left layouts
|
|
73
|
+
|
|
74
|
+
Set `<TaoProvider direction="rtl">` for an application or section. Components also inherit HTML `dir="rtl"` from their surrounding DOM. Explicit component `direction` props override inheritance; Carousel uses its existing `rtl` prop. Popups retain the direction of their trigger, including mobile Select and date-picker drawers. Nested `direction="ltr"` scopes can display Latin content inside an RTL application.
|
|
75
|
+
|
|
76
|
+
Directional keys, horizontal scrolling, splitters, ratings and fixed table columns follow the rendered direction. Explicit popup placements such as `bottomLeft` remain physical left/right positions. Locale and text direction are independent settings.
|
|
69
77
|
|
|
70
78
|
### Component imports
|
|
71
79
|
|
package/component-manifest.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"packageName": "@rockshin/tao-ui",
|
|
4
|
-
"generatedAt": "2026-11-
|
|
4
|
+
"generatedAt": "2026-11-06T01:19:33.184Z",
|
|
5
5
|
"components": [
|
|
6
6
|
{
|
|
7
7
|
"name": "affix",
|
|
@@ -1249,6 +1249,13 @@
|
|
|
1249
1249
|
"related": [
|
|
1250
1250
|
"InputNumber"
|
|
1251
1251
|
],
|
|
1252
|
+
"props": [
|
|
1253
|
+
{
|
|
1254
|
+
"name": "locale",
|
|
1255
|
+
"type": "string",
|
|
1256
|
+
"description": "BCP 47 numeric locale, also accepted by useNumberInput. Inherits TaoProvider numberLocale; explicit separators win. Canonical values and callbacks remain exact ASCII strings."
|
|
1257
|
+
}
|
|
1258
|
+
],
|
|
1252
1259
|
"usage": {
|
|
1253
1260
|
"description": "Use the headless API when tao-ui styling is not appropriate but number formatting behavior should stay consistent.",
|
|
1254
1261
|
"bestPractices": [
|
|
@@ -1365,6 +1372,13 @@
|
|
|
1365
1372
|
"HeadlessInputNumber",
|
|
1366
1373
|
"Input"
|
|
1367
1374
|
],
|
|
1375
|
+
"props": [
|
|
1376
|
+
{
|
|
1377
|
+
"name": "locale",
|
|
1378
|
+
"type": "string",
|
|
1379
|
+
"description": "BCP 47 numeric locale. Inherits TaoProvider numberLocale; explicit decimalSeparator/thousandsSeparator override regional symbols. Callbacks keep exact canonical ASCII strings."
|
|
1380
|
+
}
|
|
1381
|
+
],
|
|
1368
1382
|
"usage": {
|
|
1369
1383
|
"description": "Use InputNumber for numeric values that need min, max, step, precision, or formatted display.",
|
|
1370
1384
|
"bestPractices": [
|
|
@@ -2473,6 +2487,13 @@
|
|
|
2473
2487
|
"tests": [
|
|
2474
2488
|
"tests/statistic/statistic.test.tsx"
|
|
2475
2489
|
],
|
|
2490
|
+
"props": [
|
|
2491
|
+
{
|
|
2492
|
+
"name": "locale",
|
|
2493
|
+
"type": "string",
|
|
2494
|
+
"description": "BCP 47 numeric locale. Inherits TaoProvider numberLocale. Explicit separators and formatter take precedence; string precision and truncation semantics are preserved."
|
|
2495
|
+
}
|
|
2496
|
+
],
|
|
2476
2497
|
"semanticParts": [
|
|
2477
2498
|
"root",
|
|
2478
2499
|
"header",
|
|
@@ -2710,7 +2731,7 @@
|
|
|
2710
2731
|
"name": "tao-provider",
|
|
2711
2732
|
"displayName": "TaoProvider",
|
|
2712
2733
|
"category": "Config",
|
|
2713
|
-
"description": "Provides global component defaults, portal scoping, and theme seed token overrides.",
|
|
2734
|
+
"description": "Provides global component defaults, 17 locales with date and number regional settings, portal scoping, and theme seed token overrides.",
|
|
2714
2735
|
"exports": [
|
|
2715
2736
|
"TaoProvider"
|
|
2716
2737
|
],
|
|
@@ -2724,7 +2745,9 @@
|
|
|
2724
2745
|
"theme",
|
|
2725
2746
|
"tokens",
|
|
2726
2747
|
"size",
|
|
2727
|
-
"disabled"
|
|
2748
|
+
"disabled",
|
|
2749
|
+
"locale",
|
|
2750
|
+
"internationalization"
|
|
2728
2751
|
],
|
|
2729
2752
|
"related": [
|
|
2730
2753
|
"Button",
|
|
@@ -2732,7 +2755,7 @@
|
|
|
2732
2755
|
"tokenVar"
|
|
2733
2756
|
],
|
|
2734
2757
|
"usage": {
|
|
2735
|
-
"description": "Wrap an app or subtree with TaoProvider to set size, disabled, variant, and theme defaults.",
|
|
2758
|
+
"description": "Wrap an app or subtree with TaoProvider to set size, disabled, variant, direction, and theme defaults.",
|
|
2736
2759
|
"bestPractices": [
|
|
2737
2760
|
"Prefer provider-level defaults for app-wide decisions.",
|
|
2738
2761
|
"Use nested providers for scoped theme overrides."
|
|
@@ -2742,6 +2765,17 @@
|
|
|
2742
2765
|
]
|
|
2743
2766
|
},
|
|
2744
2767
|
"props": [
|
|
2768
|
+
{
|
|
2769
|
+
"name": "locale",
|
|
2770
|
+
"type": "Partial<TaoLocale>",
|
|
2771
|
+
"defaultValue": "enUS",
|
|
2772
|
+
"description": "Component text, accessible names, form validation and regional date/number settings. Missing keys inherit from the parent; explicit component overrides win. Direction is independent."
|
|
2773
|
+
},
|
|
2774
|
+
{
|
|
2775
|
+
"name": "direction",
|
|
2776
|
+
"type": "'ltr' | 'rtl'",
|
|
2777
|
+
"description": "Text and interaction direction. Inherits the surrounding DOM when omitted; nested providers and component props can override it. Portals retain their source direction."
|
|
2778
|
+
},
|
|
2745
2779
|
{
|
|
2746
2780
|
"name": "size",
|
|
2747
2781
|
"type": "TaoSize",
|
|
@@ -3,6 +3,7 @@ import { c } from "react-compiler-runtime";
|
|
|
3
3
|
import { useState } from "react";
|
|
4
4
|
import { cx } from "../../utils/semantic.js";
|
|
5
5
|
import { StatusIcon } from "../status-icon/status-icon.js";
|
|
6
|
+
import { useTaoConfig } from "../../provider/tao-provider.js";
|
|
6
7
|
import "./alert.css";
|
|
7
8
|
function CloseIcon() {
|
|
8
9
|
const $ = c(1);
|
|
@@ -28,11 +29,12 @@ function CloseIcon() {
|
|
|
28
29
|
return t0;
|
|
29
30
|
}
|
|
30
31
|
function Alert(t0) {
|
|
31
|
-
const $ = c(
|
|
32
|
+
const $ = c(45);
|
|
32
33
|
const { type: t1, title, description, showIcon: t2, icon, closable: t3, onClose, action, className, style, classNames, styles } = t0;
|
|
33
34
|
const type = void 0 === t1 ? "info" : t1;
|
|
34
35
|
const showIcon = void 0 === t2 ? false : t2;
|
|
35
36
|
const closable = void 0 === t3 ? false : t3;
|
|
37
|
+
const { locale } = useTaoConfig();
|
|
36
38
|
const [visible, setVisible] = useState(true);
|
|
37
39
|
let t4;
|
|
38
40
|
if ($[0] !== onClose) {
|
|
@@ -138,11 +140,11 @@ function Alert(t0) {
|
|
|
138
140
|
$[29] = t14;
|
|
139
141
|
} else t14 = $[29];
|
|
140
142
|
let t15;
|
|
141
|
-
if ($[30] !== classNames?.close || $[31] !== closable || $[32] !== handleClose || $[33] !== styles?.close) {
|
|
143
|
+
if ($[30] !== classNames?.close || $[31] !== closable || $[32] !== handleClose || $[33] !== locale || $[34] !== styles?.close) {
|
|
142
144
|
t15 = closable && /*#__PURE__*/ jsx("button", {
|
|
143
145
|
type: "button",
|
|
144
146
|
"data-tao-alert-close": "",
|
|
145
|
-
"aria-label":
|
|
147
|
+
"aria-label": locale.close,
|
|
146
148
|
onClick: handleClose,
|
|
147
149
|
className: cx(classNames?.close),
|
|
148
150
|
style: styles?.close,
|
|
@@ -151,11 +153,12 @@ function Alert(t0) {
|
|
|
151
153
|
$[30] = classNames?.close;
|
|
152
154
|
$[31] = closable;
|
|
153
155
|
$[32] = handleClose;
|
|
154
|
-
$[33] =
|
|
155
|
-
$[34] =
|
|
156
|
-
|
|
156
|
+
$[33] = locale;
|
|
157
|
+
$[34] = styles?.close;
|
|
158
|
+
$[35] = t15;
|
|
159
|
+
} else t15 = $[35];
|
|
157
160
|
let t16;
|
|
158
|
-
if ($[
|
|
161
|
+
if ($[36] !== t10 || $[37] !== t13 || $[38] !== t14 || $[39] !== t15 || $[40] !== t5 || $[41] !== t7 || $[42] !== t9 || $[43] !== type) {
|
|
159
162
|
t16 = /*#__PURE__*/ jsxs("div", {
|
|
160
163
|
role: "alert",
|
|
161
164
|
"data-tao-alert": "",
|
|
@@ -170,16 +173,16 @@ function Alert(t0) {
|
|
|
170
173
|
t15
|
|
171
174
|
]
|
|
172
175
|
});
|
|
173
|
-
$[
|
|
174
|
-
$[
|
|
175
|
-
$[
|
|
176
|
-
$[
|
|
177
|
-
$[
|
|
178
|
-
$[
|
|
179
|
-
$[
|
|
180
|
-
$[
|
|
181
|
-
$[
|
|
182
|
-
} else t16 = $[
|
|
176
|
+
$[36] = t10;
|
|
177
|
+
$[37] = t13;
|
|
178
|
+
$[38] = t14;
|
|
179
|
+
$[39] = t15;
|
|
180
|
+
$[40] = t5;
|
|
181
|
+
$[41] = t7;
|
|
182
|
+
$[42] = t9;
|
|
183
|
+
$[43] = type;
|
|
184
|
+
$[44] = t16;
|
|
185
|
+
} else t16 = $[44];
|
|
183
186
|
return t16;
|
|
184
187
|
}
|
|
185
188
|
export { Alert };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
2
|
import _rc_component_select from "@rc-component/select";
|
|
3
|
-
import { Children, forwardRef, isValidElement } from "react";
|
|
4
|
-
import { useTaoInternalConfig } from "../../provider/tao-provider.js";
|
|
3
|
+
import { Children, forwardRef, isValidElement, useMemo } from "react";
|
|
4
|
+
import { useTaoDirection, useTaoInternalConfig } from "../../provider/tao-provider.js";
|
|
5
|
+
import { mergeRefs } from "../../utils/refs.js";
|
|
5
6
|
import { cx } from "../../utils/semantic.js";
|
|
6
7
|
import { SelectEnginePopup, selectAllowClear } from "../tree-select/select-engine.js";
|
|
7
8
|
import "../tree-select/select-engine.css";
|
|
@@ -40,9 +41,16 @@ function InternalAutoComplete(props, ref) {
|
|
|
40
41
|
props: resolvedProps
|
|
41
42
|
}) : styles;
|
|
42
43
|
const renderPopup = popupRender ?? dropdownRender;
|
|
44
|
+
const [direction, directionRef] = useTaoDirection(props.direction);
|
|
45
|
+
const mergedRef = useMemo(()=>mergeRefs(ref, (node)=>directionRef(node?.nativeElement ?? null)), [
|
|
46
|
+
ref,
|
|
47
|
+
directionRef
|
|
48
|
+
]);
|
|
43
49
|
return /*#__PURE__*/ jsx(RcSelectComponent, {
|
|
44
50
|
...rest,
|
|
45
|
-
ref:
|
|
51
|
+
ref: mergedRef,
|
|
52
|
+
direction: direction,
|
|
53
|
+
dir: direction,
|
|
46
54
|
prefixCls: prefixCls,
|
|
47
55
|
mode: "combobox",
|
|
48
56
|
"data-tao-auto-complete": "",
|
|
@@ -92,6 +100,7 @@ function InternalAutoComplete(props, ref) {
|
|
|
92
100
|
...semanticStyles?.popup?.root
|
|
93
101
|
},
|
|
94
102
|
popupRender: (menu)=>/*#__PURE__*/ jsx(SelectEnginePopup, {
|
|
103
|
+
direction: direction,
|
|
95
104
|
size: size,
|
|
96
105
|
children: renderPopup ? renderPopup(menu) : menu
|
|
97
106
|
}),
|
|
@@ -98,6 +98,7 @@ function flattenChildren(children) {
|
|
|
98
98
|
}
|
|
99
99
|
const AvatarGroup = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
100
100
|
const parent = useContext(GroupContext);
|
|
101
|
+
const { locale } = useTaoConfig();
|
|
101
102
|
const { prefixCls, rootClassName, size = parent.size, shape = parent.shape, max, maxCount, maxStyle, maxPopoverPlacement, maxPopoverTrigger, className, style, classNames, styles, children, ...rest } = props;
|
|
102
103
|
const node = useRef(null);
|
|
103
104
|
useImperativeHandle(ref, ()=>({
|
|
@@ -136,7 +137,7 @@ const AvatarGroup = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
|
136
137
|
children: /*#__PURE__*/ jsx("button", {
|
|
137
138
|
type: "button",
|
|
138
139
|
"data-tao-avatar-overflow": "",
|
|
139
|
-
"aria-label":
|
|
140
|
+
"aria-label": locale.messages.moreUsers(hidden.length),
|
|
140
141
|
className: classNames?.overflow,
|
|
141
142
|
style: styles?.overflow,
|
|
142
143
|
children: /*#__PURE__*/ jsxs(AvatarRoot, {
|
|
@@ -11,6 +11,7 @@ function ChevronIcon() {
|
|
|
11
11
|
let t0;
|
|
12
12
|
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
13
13
|
t0 = /*#__PURE__*/ jsx("svg", {
|
|
14
|
+
"data-tao-breadcrumb-chevron": "",
|
|
14
15
|
viewBox: "0 0 16 16",
|
|
15
16
|
fill: "none",
|
|
16
17
|
"aria-hidden": "true",
|
|
@@ -60,9 +61,9 @@ function EllipsisIcon() {
|
|
|
60
61
|
}
|
|
61
62
|
const ELLIPSIS = Symbol('ellipsis');
|
|
62
63
|
function Breadcrumb(t0) {
|
|
63
|
-
const $ = c(
|
|
64
|
+
const $ = c(58);
|
|
64
65
|
const { items, separator, maxItems, itemRender, className, style, classNames, styles } = t0;
|
|
65
|
-
const { size, disabled: ctxDisabled } = useTaoConfig();
|
|
66
|
+
const { size, disabled: ctxDisabled, locale } = useTaoConfig();
|
|
66
67
|
const collapsed = null != maxItems && maxItems >= 1 && items.length > maxItems;
|
|
67
68
|
let t1;
|
|
68
69
|
if ($[0] !== collapsed || $[1] !== items || $[2] !== maxItems) {
|
|
@@ -139,38 +140,39 @@ function Breadcrumb(t0) {
|
|
|
139
140
|
$[13] = t3;
|
|
140
141
|
} else t3 = $[13];
|
|
141
142
|
const renderContent = t3;
|
|
142
|
-
const t4 =
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
143
|
+
const t4 = locale.messages.breadcrumb;
|
|
144
|
+
const t5 = classNames?.root;
|
|
145
|
+
let t6;
|
|
146
|
+
if ($[14] !== className || $[15] !== t5) {
|
|
147
|
+
t6 = cx(t5, className);
|
|
146
148
|
$[14] = className;
|
|
147
|
-
$[15] =
|
|
148
|
-
$[16] =
|
|
149
|
-
} else
|
|
150
|
-
const
|
|
151
|
-
let
|
|
152
|
-
if ($[17] !== style || $[18] !==
|
|
153
|
-
|
|
154
|
-
...
|
|
149
|
+
$[15] = t5;
|
|
150
|
+
$[16] = t6;
|
|
151
|
+
} else t6 = $[16];
|
|
152
|
+
const t7 = styles?.root;
|
|
153
|
+
let t8;
|
|
154
|
+
if ($[17] !== style || $[18] !== t7) {
|
|
155
|
+
t8 = {
|
|
156
|
+
...t7,
|
|
155
157
|
...style
|
|
156
158
|
};
|
|
157
159
|
$[17] = style;
|
|
158
|
-
$[18] =
|
|
159
|
-
$[19] =
|
|
160
|
-
} else
|
|
161
|
-
const
|
|
162
|
-
let
|
|
163
|
-
if ($[20] !==
|
|
164
|
-
|
|
165
|
-
$[20] =
|
|
166
|
-
$[21] =
|
|
167
|
-
} else
|
|
168
|
-
const
|
|
169
|
-
let
|
|
170
|
-
if ($[22] !== classNames?.ellipsis || $[23] !== classNames?.item || $[24] !== classNames?.separator || $[25] !== display || $[26] !== items || $[27] !==
|
|
171
|
-
let
|
|
172
|
-
if ($[
|
|
173
|
-
|
|
160
|
+
$[18] = t7;
|
|
161
|
+
$[19] = t8;
|
|
162
|
+
} else t8 = $[19];
|
|
163
|
+
const t9 = classNames?.list;
|
|
164
|
+
let t10;
|
|
165
|
+
if ($[20] !== t9) {
|
|
166
|
+
t10 = cx(t9);
|
|
167
|
+
$[20] = t9;
|
|
168
|
+
$[21] = t10;
|
|
169
|
+
} else t10 = $[21];
|
|
170
|
+
const t11 = styles?.list;
|
|
171
|
+
let t12;
|
|
172
|
+
if ($[22] !== classNames?.ellipsis || $[23] !== classNames?.item || $[24] !== classNames?.separator || $[25] !== display || $[26] !== items || $[27] !== locale.messages.showMore || $[28] !== maxItems || $[29] !== renderContent || $[30] !== sep || $[31] !== styles?.ellipsis || $[32] !== styles?.item || $[33] !== styles?.separator) {
|
|
173
|
+
let t13;
|
|
174
|
+
if ($[35] !== classNames?.ellipsis || $[36] !== classNames?.item || $[37] !== classNames?.separator || $[38] !== display.length || $[39] !== items || $[40] !== locale.messages.showMore || $[41] !== maxItems || $[42] !== renderContent || $[43] !== sep || $[44] !== styles?.ellipsis || $[45] !== styles?.item || $[46] !== styles?.separator) {
|
|
175
|
+
t13 = (entry, i)=>{
|
|
174
176
|
const isLast_0 = i === display.length - 1;
|
|
175
177
|
const isEllipsis = entry === ELLIPSIS;
|
|
176
178
|
const key = isEllipsis ? `ellipsis-${i}` : entry.key ?? i;
|
|
@@ -191,7 +193,7 @@ function Breadcrumb(t0) {
|
|
|
191
193
|
children: /*#__PURE__*/ jsx("button", {
|
|
192
194
|
type: "button",
|
|
193
195
|
"data-tao-breadcrumb-ellipsis": "",
|
|
194
|
-
"aria-label":
|
|
196
|
+
"aria-label": locale.messages.showMore,
|
|
195
197
|
className: cx(classNames?.ellipsis),
|
|
196
198
|
style: styles?.ellipsis,
|
|
197
199
|
children: /*#__PURE__*/ jsx(EllipsisIcon, {})
|
|
@@ -209,62 +211,65 @@ function Breadcrumb(t0) {
|
|
|
209
211
|
]
|
|
210
212
|
}, key);
|
|
211
213
|
};
|
|
212
|
-
$[
|
|
213
|
-
$[
|
|
214
|
-
$[
|
|
215
|
-
$[
|
|
216
|
-
$[
|
|
217
|
-
$[
|
|
218
|
-
$[
|
|
219
|
-
$[
|
|
220
|
-
$[
|
|
221
|
-
$[
|
|
222
|
-
$[
|
|
223
|
-
$[
|
|
224
|
-
|
|
225
|
-
|
|
214
|
+
$[35] = classNames?.ellipsis;
|
|
215
|
+
$[36] = classNames?.item;
|
|
216
|
+
$[37] = classNames?.separator;
|
|
217
|
+
$[38] = display.length;
|
|
218
|
+
$[39] = items;
|
|
219
|
+
$[40] = locale.messages.showMore;
|
|
220
|
+
$[41] = maxItems;
|
|
221
|
+
$[42] = renderContent;
|
|
222
|
+
$[43] = sep;
|
|
223
|
+
$[44] = styles?.ellipsis;
|
|
224
|
+
$[45] = styles?.item;
|
|
225
|
+
$[46] = styles?.separator;
|
|
226
|
+
$[47] = t13;
|
|
227
|
+
} else t13 = $[47];
|
|
228
|
+
t12 = display.map(t13);
|
|
226
229
|
$[22] = classNames?.ellipsis;
|
|
227
230
|
$[23] = classNames?.item;
|
|
228
231
|
$[24] = classNames?.separator;
|
|
229
232
|
$[25] = display;
|
|
230
233
|
$[26] = items;
|
|
231
|
-
$[27] =
|
|
232
|
-
$[28] =
|
|
233
|
-
$[29] =
|
|
234
|
-
$[30] =
|
|
235
|
-
$[31] = styles?.
|
|
236
|
-
$[32] = styles?.
|
|
237
|
-
$[33] =
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
234
|
+
$[27] = locale.messages.showMore;
|
|
235
|
+
$[28] = maxItems;
|
|
236
|
+
$[29] = renderContent;
|
|
237
|
+
$[30] = sep;
|
|
238
|
+
$[31] = styles?.ellipsis;
|
|
239
|
+
$[32] = styles?.item;
|
|
240
|
+
$[33] = styles?.separator;
|
|
241
|
+
$[34] = t12;
|
|
242
|
+
} else t12 = $[34];
|
|
243
|
+
let t13;
|
|
244
|
+
if ($[48] !== t10 || $[49] !== t11 || $[50] !== t12) {
|
|
245
|
+
t13 = /*#__PURE__*/ jsx("ol", {
|
|
242
246
|
"data-tao-breadcrumb-list": "",
|
|
243
|
-
className:
|
|
244
|
-
style:
|
|
245
|
-
children:
|
|
247
|
+
className: t10,
|
|
248
|
+
style: t11,
|
|
249
|
+
children: t12
|
|
246
250
|
});
|
|
247
|
-
$[
|
|
248
|
-
$[
|
|
249
|
-
$[
|
|
250
|
-
$[
|
|
251
|
-
} else
|
|
252
|
-
let
|
|
253
|
-
if ($[
|
|
254
|
-
|
|
251
|
+
$[48] = t10;
|
|
252
|
+
$[49] = t11;
|
|
253
|
+
$[50] = t12;
|
|
254
|
+
$[51] = t13;
|
|
255
|
+
} else t13 = $[51];
|
|
256
|
+
let t14;
|
|
257
|
+
if ($[52] !== locale.messages.breadcrumb || $[53] !== size || $[54] !== t13 || $[55] !== t6 || $[56] !== t8) {
|
|
258
|
+
t14 = /*#__PURE__*/ jsx("nav", {
|
|
255
259
|
"data-tao-breadcrumb": "",
|
|
256
260
|
"data-tao-size": size,
|
|
257
|
-
"aria-label":
|
|
258
|
-
className:
|
|
259
|
-
style:
|
|
260
|
-
children:
|
|
261
|
+
"aria-label": t4,
|
|
262
|
+
className: t6,
|
|
263
|
+
style: t8,
|
|
264
|
+
children: t13
|
|
261
265
|
});
|
|
262
|
-
$[
|
|
263
|
-
$[
|
|
264
|
-
$[52] = t5;
|
|
265
|
-
$[53] = t7;
|
|
266
|
+
$[52] = locale.messages.breadcrumb;
|
|
267
|
+
$[53] = size;
|
|
266
268
|
$[54] = t13;
|
|
267
|
-
|
|
268
|
-
|
|
269
|
+
$[55] = t6;
|
|
270
|
+
$[56] = t8;
|
|
271
|
+
$[57] = t14;
|
|
272
|
+
} else t14 = $[57];
|
|
273
|
+
return t14;
|
|
269
274
|
}
|
|
270
275
|
export { Breadcrumb };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { CellRenderInfo, Locale } from '@rc-component/picker/interface';
|
|
2
2
|
import { type Dayjs } from 'dayjs';
|
|
3
|
-
import 'dayjs/locale/zh-cn';
|
|
4
3
|
import { type CSSProperties, type ReactNode } from 'react';
|
|
5
4
|
import { type SemanticClassNames, type SemanticStyles } from '../../utils/semantic.js';
|
|
6
5
|
import './calendar.css';
|
|
@@ -19,6 +18,7 @@ type SemanticValue<Value, Props> = Value | ((info: {
|
|
|
19
18
|
props: Props;
|
|
20
19
|
}) => Value);
|
|
21
20
|
export interface CalendarProps<DateType = Dayjs> {
|
|
21
|
+
direction?: 'ltr' | 'rtl';
|
|
22
22
|
prefixCls?: string;
|
|
23
23
|
className?: string;
|
|
24
24
|
rootClassName?: string;
|