@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
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { c } from "react-compiler-runtime";
|
|
3
3
|
import { useRef, useState } from "react";
|
|
4
|
-
import { TaoPortalScope, useTaoConfig } from "../../provider/tao-provider.js";
|
|
4
|
+
import { TaoPortalScope, useTaoConfig, useTaoDirection } from "../../provider/tao-provider.js";
|
|
5
5
|
import { asTriggerChild } from "../../utils/overlay.js";
|
|
6
6
|
import { cx } from "../../utils/semantic.js";
|
|
7
7
|
import { Button } from "../button/button.js";
|
|
@@ -65,93 +65,94 @@ function EllipsisIcon() {
|
|
|
65
65
|
return t0;
|
|
66
66
|
}
|
|
67
67
|
function Dropdown(props) {
|
|
68
|
-
const $ = c(
|
|
69
|
-
const
|
|
70
|
-
|
|
68
|
+
const $ = c(68);
|
|
69
|
+
const [direction, directionRef] = useTaoDirection(props.direction, "self");
|
|
70
|
+
const { menu, children, trigger: t0, placement, open, defaultOpen, onOpenChange, disabled, arrow: t1, className, style, classNames, styles } = props;
|
|
71
|
+
let t2;
|
|
71
72
|
if ($[0] !== t0) {
|
|
72
|
-
|
|
73
|
+
t2 = void 0 === t0 ? [
|
|
73
74
|
"click"
|
|
74
75
|
] : t0;
|
|
75
76
|
$[0] = t0;
|
|
76
|
-
$[1] =
|
|
77
|
-
} else
|
|
78
|
-
const trigger =
|
|
79
|
-
const
|
|
80
|
-
const arrow = void 0 === t2 ? false : t2;
|
|
77
|
+
$[1] = t2;
|
|
78
|
+
} else t2 = $[1];
|
|
79
|
+
const trigger = t2;
|
|
80
|
+
const arrow = void 0 === t1 ? false : t1;
|
|
81
81
|
const { size, disabled: ctxDisabled } = useTaoConfig();
|
|
82
82
|
const resolvedDisabled = disabled ?? ctxDisabled;
|
|
83
|
-
let
|
|
83
|
+
let t3;
|
|
84
84
|
if ($[2] !== trigger) {
|
|
85
|
-
|
|
85
|
+
t3 = trigger.includes("contextMenu");
|
|
86
86
|
$[2] = trigger;
|
|
87
|
-
$[3] =
|
|
88
|
-
} else
|
|
89
|
-
const isContext =
|
|
90
|
-
let
|
|
87
|
+
$[3] = t3;
|
|
88
|
+
} else t3 = $[3];
|
|
89
|
+
const isContext = t3;
|
|
90
|
+
let t4;
|
|
91
91
|
if ($[4] !== isContext || $[5] !== trigger) {
|
|
92
|
-
|
|
92
|
+
t4 = !isContext && trigger.includes("hover");
|
|
93
93
|
$[4] = isContext;
|
|
94
94
|
$[5] = trigger;
|
|
95
|
-
$[6] =
|
|
96
|
-
} else
|
|
97
|
-
const hoverMode =
|
|
95
|
+
$[6] = t4;
|
|
96
|
+
} else t4 = $[6];
|
|
97
|
+
const hoverMode = t4;
|
|
98
98
|
const isOpenControlled = null != open;
|
|
99
99
|
const [openInternal, setOpenInternal] = useState(defaultOpen ?? false);
|
|
100
100
|
const realOpen = isOpenControlled ? open : openInternal;
|
|
101
|
-
let
|
|
101
|
+
let t5;
|
|
102
102
|
if ($[7] !== isOpenControlled || $[8] !== onOpenChange) {
|
|
103
|
-
|
|
103
|
+
t5 = (next)=>{
|
|
104
104
|
if (!isOpenControlled) setOpenInternal(next);
|
|
105
105
|
onOpenChange?.(next);
|
|
106
106
|
};
|
|
107
107
|
$[7] = isOpenControlled;
|
|
108
108
|
$[8] = onOpenChange;
|
|
109
|
-
$[9] =
|
|
110
|
-
} else
|
|
111
|
-
const setOpen =
|
|
109
|
+
$[9] = t5;
|
|
110
|
+
} else t5 = $[9];
|
|
111
|
+
const setOpen = t5;
|
|
112
112
|
const closeTimer = useRef(void 0);
|
|
113
|
-
let
|
|
113
|
+
let t6;
|
|
114
114
|
if ($[10] !== resolvedDisabled || $[11] !== setOpen) {
|
|
115
|
-
|
|
115
|
+
t6 = ()=>{
|
|
116
116
|
clearTimeout(closeTimer.current);
|
|
117
117
|
if (!resolvedDisabled) setOpen(true);
|
|
118
118
|
};
|
|
119
119
|
$[10] = resolvedDisabled;
|
|
120
120
|
$[11] = setOpen;
|
|
121
|
-
$[12] =
|
|
122
|
-
} else
|
|
123
|
-
const openOnHover =
|
|
124
|
-
let
|
|
121
|
+
$[12] = t6;
|
|
122
|
+
} else t6 = $[12];
|
|
123
|
+
const openOnHover = t6;
|
|
124
|
+
let t7;
|
|
125
125
|
if ($[13] !== setOpen) {
|
|
126
|
-
|
|
126
|
+
t7 = ()=>{
|
|
127
127
|
closeTimer.current = setTimeout(()=>setOpen(false), 120);
|
|
128
128
|
};
|
|
129
129
|
$[13] = setOpen;
|
|
130
|
-
$[14] =
|
|
131
|
-
} else
|
|
132
|
-
const closeOnHover =
|
|
133
|
-
let
|
|
130
|
+
$[14] = t7;
|
|
131
|
+
} else t7 = $[14];
|
|
132
|
+
const closeOnHover = t7;
|
|
133
|
+
let t8;
|
|
134
134
|
if ($[15] !== classNames || $[16] !== styles) {
|
|
135
|
-
|
|
135
|
+
t8 = {
|
|
136
136
|
classNames,
|
|
137
137
|
styles
|
|
138
138
|
};
|
|
139
139
|
$[15] = classNames;
|
|
140
140
|
$[16] = styles;
|
|
141
|
-
$[17] =
|
|
142
|
-
} else
|
|
143
|
-
const content = useMenuController(menu, DD,
|
|
144
|
-
let
|
|
141
|
+
$[17] = t8;
|
|
142
|
+
} else t8 = $[17];
|
|
143
|
+
const content = useMenuController(menu, DD, t8);
|
|
144
|
+
let t9;
|
|
145
145
|
if ($[18] !== children) {
|
|
146
|
-
|
|
146
|
+
t9 = asTriggerChild(children);
|
|
147
147
|
$[18] = children;
|
|
148
|
-
$[19] =
|
|
149
|
-
} else
|
|
150
|
-
const triggerChild =
|
|
148
|
+
$[19] = t9;
|
|
149
|
+
} else t9 = $[19];
|
|
150
|
+
const triggerChild = t9;
|
|
151
151
|
if (isContext) {
|
|
152
|
-
let
|
|
153
|
-
if ($[20] !== children || $[21] !== className || $[22] !== classNames || $[23] !== disabled || $[24] !== menu || $[25] !== onOpenChange || $[26] !== open || $[27] !==
|
|
154
|
-
|
|
152
|
+
let t10;
|
|
153
|
+
if ($[20] !== children || $[21] !== className || $[22] !== classNames || $[23] !== disabled || $[24] !== menu || $[25] !== onOpenChange || $[26] !== open || $[27] !== props.direction || $[28] !== style || $[29] !== styles) {
|
|
154
|
+
t10 = /*#__PURE__*/ jsx(ContextMenu, {
|
|
155
|
+
direction: props.direction,
|
|
155
156
|
menu: menu,
|
|
156
157
|
open: open,
|
|
157
158
|
onOpenChange: onOpenChange,
|
|
@@ -169,128 +170,143 @@ function Dropdown(props) {
|
|
|
169
170
|
$[24] = menu;
|
|
170
171
|
$[25] = onOpenChange;
|
|
171
172
|
$[26] = open;
|
|
172
|
-
$[27] =
|
|
173
|
-
$[28] =
|
|
174
|
-
$[29] =
|
|
175
|
-
|
|
176
|
-
|
|
173
|
+
$[27] = props.direction;
|
|
174
|
+
$[28] = style;
|
|
175
|
+
$[29] = styles;
|
|
176
|
+
$[30] = t10;
|
|
177
|
+
} else t10 = $[30];
|
|
178
|
+
return t10;
|
|
177
179
|
}
|
|
180
|
+
const t10 = placement ?? ("rtl" === direction ? "bottomRight" : "bottomLeft");
|
|
178
181
|
let t11;
|
|
179
|
-
if ($[
|
|
180
|
-
t11 = parsePlacement(
|
|
181
|
-
$[
|
|
182
|
-
$[
|
|
183
|
-
} else t11 = $[
|
|
184
|
-
const { side, align } = t11;
|
|
182
|
+
if ($[31] !== t10) {
|
|
183
|
+
t11 = parsePlacement(t10);
|
|
184
|
+
$[31] = t10;
|
|
185
|
+
$[32] = t11;
|
|
186
|
+
} else t11 = $[32];
|
|
187
|
+
const { side, align: physicalAlign } = t11;
|
|
188
|
+
const align = "rtl" === direction && "center" !== physicalAlign ? "start" === physicalAlign ? "end" : "start" : physicalAlign;
|
|
185
189
|
let t12;
|
|
186
|
-
if ($[
|
|
190
|
+
if ($[33] !== closeOnHover || $[34] !== hoverMode || $[35] !== openOnHover) {
|
|
187
191
|
t12 = hoverMode ? {
|
|
188
192
|
onPointerEnter: openOnHover,
|
|
189
193
|
onPointerLeave: closeOnHover
|
|
190
194
|
} : void 0;
|
|
191
|
-
$[
|
|
192
|
-
$[
|
|
193
|
-
$[
|
|
194
|
-
$[
|
|
195
|
-
} else t12 = $[
|
|
195
|
+
$[33] = closeOnHover;
|
|
196
|
+
$[34] = hoverMode;
|
|
197
|
+
$[35] = openOnHover;
|
|
198
|
+
$[36] = t12;
|
|
199
|
+
} else t12 = $[36];
|
|
196
200
|
const hoverProps = t12;
|
|
197
201
|
let t13;
|
|
198
|
-
if ($[
|
|
202
|
+
if ($[37] !== directionRef || $[38] !== hoverProps || $[39] !== resolvedDisabled || $[40] !== triggerChild) {
|
|
199
203
|
t13 = /*#__PURE__*/ jsx(__rspack_external__radix_ui_react_dropdown_menu_154a7470.Trigger, {
|
|
204
|
+
ref: directionRef,
|
|
200
205
|
asChild: true,
|
|
201
206
|
disabled: resolvedDisabled,
|
|
202
207
|
"data-tao-dropdown-trigger": "",
|
|
203
208
|
...hoverProps,
|
|
204
209
|
children: triggerChild
|
|
205
210
|
});
|
|
206
|
-
$[
|
|
207
|
-
$[
|
|
208
|
-
$[
|
|
209
|
-
$[
|
|
210
|
-
|
|
211
|
+
$[37] = directionRef;
|
|
212
|
+
$[38] = hoverProps;
|
|
213
|
+
$[39] = resolvedDisabled;
|
|
214
|
+
$[40] = triggerChild;
|
|
215
|
+
$[41] = t13;
|
|
216
|
+
} else t13 = $[41];
|
|
211
217
|
const t14 = classNames?.content;
|
|
212
218
|
let t15;
|
|
213
|
-
if ($[
|
|
219
|
+
if ($[42] !== className || $[43] !== t14) {
|
|
214
220
|
t15 = cx(t14, className);
|
|
215
|
-
$[
|
|
216
|
-
$[
|
|
217
|
-
$[
|
|
218
|
-
} else t15 = $[
|
|
221
|
+
$[42] = className;
|
|
222
|
+
$[43] = t14;
|
|
223
|
+
$[44] = t15;
|
|
224
|
+
} else t15 = $[44];
|
|
219
225
|
const t16 = styles?.content;
|
|
220
226
|
let t17;
|
|
221
|
-
if ($[
|
|
227
|
+
if ($[45] !== style || $[46] !== t16) {
|
|
222
228
|
t17 = {
|
|
223
229
|
...t16,
|
|
224
230
|
...style
|
|
225
231
|
};
|
|
226
|
-
$[
|
|
227
|
-
$[
|
|
228
|
-
$[
|
|
229
|
-
} else t17 = $[
|
|
232
|
+
$[45] = style;
|
|
233
|
+
$[46] = t16;
|
|
234
|
+
$[47] = t17;
|
|
235
|
+
} else t17 = $[47];
|
|
230
236
|
let t18;
|
|
231
|
-
if ($[
|
|
237
|
+
if ($[48] !== arrow) {
|
|
232
238
|
t18 = arrow && /*#__PURE__*/ jsx(__rspack_external__radix_ui_react_dropdown_menu_154a7470.Arrow, {
|
|
233
239
|
asChild: true,
|
|
234
240
|
children: /*#__PURE__*/ jsx("span", {
|
|
235
241
|
"data-tao-dropdown-arrow": ""
|
|
236
242
|
})
|
|
237
243
|
});
|
|
238
|
-
$[
|
|
239
|
-
$[
|
|
240
|
-
} else t18 = $[
|
|
244
|
+
$[48] = arrow;
|
|
245
|
+
$[49] = t18;
|
|
246
|
+
} else t18 = $[49];
|
|
241
247
|
let t19;
|
|
242
|
-
if ($[
|
|
243
|
-
t19 = /*#__PURE__*/
|
|
248
|
+
if ($[50] !== align || $[51] !== content || $[52] !== hoverProps || $[53] !== side || $[54] !== size || $[55] !== t15 || $[56] !== t17 || $[57] !== t18) {
|
|
249
|
+
t19 = /*#__PURE__*/ jsxs(__rspack_external__radix_ui_react_dropdown_menu_154a7470.Content, {
|
|
250
|
+
"data-tao-menu-content": "",
|
|
251
|
+
"data-tao-dropdown": "",
|
|
252
|
+
"data-tao-size": size,
|
|
253
|
+
className: t15,
|
|
254
|
+
style: t17,
|
|
255
|
+
side: side,
|
|
256
|
+
align: align,
|
|
257
|
+
sideOffset: 4,
|
|
258
|
+
...hoverProps,
|
|
259
|
+
children: [
|
|
260
|
+
t18,
|
|
261
|
+
content
|
|
262
|
+
]
|
|
263
|
+
});
|
|
264
|
+
$[50] = align;
|
|
265
|
+
$[51] = content;
|
|
266
|
+
$[52] = hoverProps;
|
|
267
|
+
$[53] = side;
|
|
268
|
+
$[54] = size;
|
|
269
|
+
$[55] = t15;
|
|
270
|
+
$[56] = t17;
|
|
271
|
+
$[57] = t18;
|
|
272
|
+
$[58] = t19;
|
|
273
|
+
} else t19 = $[58];
|
|
274
|
+
let t20;
|
|
275
|
+
if ($[59] !== direction || $[60] !== t19) {
|
|
276
|
+
t20 = /*#__PURE__*/ jsx(__rspack_external__radix_ui_react_dropdown_menu_154a7470.Portal, {
|
|
244
277
|
children: /*#__PURE__*/ jsx(TaoPortalScope, {
|
|
245
278
|
asChild: true,
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
"data-tao-dropdown": "",
|
|
249
|
-
"data-tao-size": size,
|
|
250
|
-
className: t15,
|
|
251
|
-
style: t17,
|
|
252
|
-
side: side,
|
|
253
|
-
align: align,
|
|
254
|
-
sideOffset: 4,
|
|
255
|
-
...hoverProps,
|
|
256
|
-
children: [
|
|
257
|
-
t18,
|
|
258
|
-
content
|
|
259
|
-
]
|
|
260
|
-
})
|
|
279
|
+
direction: direction,
|
|
280
|
+
children: t19
|
|
261
281
|
})
|
|
262
282
|
});
|
|
263
|
-
$[
|
|
264
|
-
$[
|
|
265
|
-
$[
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
$[56] = t19;
|
|
272
|
-
} else t19 = $[56];
|
|
273
|
-
let t20;
|
|
274
|
-
if ($[57] !== realOpen || $[58] !== setOpen || $[59] !== t13 || $[60] !== t19) {
|
|
275
|
-
t20 = /*#__PURE__*/ jsxs(__rspack_external__radix_ui_react_dropdown_menu_154a7470.Root, {
|
|
283
|
+
$[59] = direction;
|
|
284
|
+
$[60] = t19;
|
|
285
|
+
$[61] = t20;
|
|
286
|
+
} else t20 = $[61];
|
|
287
|
+
let t21;
|
|
288
|
+
if ($[62] !== direction || $[63] !== realOpen || $[64] !== setOpen || $[65] !== t13 || $[66] !== t20) {
|
|
289
|
+
t21 = /*#__PURE__*/ jsxs(__rspack_external__radix_ui_react_dropdown_menu_154a7470.Root, {
|
|
290
|
+
dir: direction,
|
|
276
291
|
open: realOpen,
|
|
277
292
|
onOpenChange: setOpen,
|
|
278
293
|
modal: false,
|
|
279
294
|
children: [
|
|
280
295
|
t13,
|
|
281
|
-
|
|
296
|
+
t20
|
|
282
297
|
]
|
|
283
298
|
});
|
|
284
|
-
$[
|
|
285
|
-
$[
|
|
286
|
-
$[
|
|
287
|
-
$[
|
|
288
|
-
$[
|
|
289
|
-
|
|
290
|
-
|
|
299
|
+
$[62] = direction;
|
|
300
|
+
$[63] = realOpen;
|
|
301
|
+
$[64] = setOpen;
|
|
302
|
+
$[65] = t13;
|
|
303
|
+
$[66] = t20;
|
|
304
|
+
$[67] = t21;
|
|
305
|
+
} else t21 = $[67];
|
|
306
|
+
return t21;
|
|
291
307
|
}
|
|
292
308
|
function DropdownButton(t0) {
|
|
293
|
-
const $ = c(
|
|
309
|
+
const $ = c(27);
|
|
294
310
|
let children;
|
|
295
311
|
let dropdownRest;
|
|
296
312
|
let icon;
|
|
@@ -318,7 +334,7 @@ function DropdownButton(t0) {
|
|
|
318
334
|
t1 = $[7];
|
|
319
335
|
}
|
|
320
336
|
const variant = void 0 === t1 ? "secondary" : t1;
|
|
321
|
-
const { size: ctxSize } = useTaoConfig();
|
|
337
|
+
const { size: ctxSize, locale } = useTaoConfig();
|
|
322
338
|
const resolvedSize = size ?? ctxSize;
|
|
323
339
|
let t2;
|
|
324
340
|
if ($[8] !== children || $[9] !== onClick || $[10] !== resolvedSize || $[11] !== variant) {
|
|
@@ -342,33 +358,34 @@ function DropdownButton(t0) {
|
|
|
342
358
|
$[14] = t3;
|
|
343
359
|
} else t3 = $[14];
|
|
344
360
|
let t4;
|
|
345
|
-
if ($[15] !==
|
|
361
|
+
if ($[15] !== locale.messages.more || $[16] !== resolvedSize || $[17] !== t3 || $[18] !== variant) {
|
|
346
362
|
t4 = /*#__PURE__*/ jsx(Button, {
|
|
347
363
|
variant: variant,
|
|
348
364
|
size: resolvedSize,
|
|
349
|
-
"aria-label":
|
|
365
|
+
"aria-label": locale.messages.more,
|
|
350
366
|
"data-tao-dropdown-button-trigger": "",
|
|
351
367
|
children: t3
|
|
352
368
|
});
|
|
353
|
-
$[15] =
|
|
354
|
-
$[16] =
|
|
355
|
-
$[17] =
|
|
356
|
-
$[18] =
|
|
357
|
-
|
|
369
|
+
$[15] = locale.messages.more;
|
|
370
|
+
$[16] = resolvedSize;
|
|
371
|
+
$[17] = t3;
|
|
372
|
+
$[18] = variant;
|
|
373
|
+
$[19] = t4;
|
|
374
|
+
} else t4 = $[19];
|
|
358
375
|
let t5;
|
|
359
|
-
if ($[
|
|
376
|
+
if ($[20] !== dropdownRest || $[21] !== menu || $[22] !== t4) {
|
|
360
377
|
t5 = /*#__PURE__*/ jsx(Dropdown, {
|
|
361
378
|
menu: menu,
|
|
362
379
|
...dropdownRest,
|
|
363
380
|
children: t4
|
|
364
381
|
});
|
|
365
|
-
$[
|
|
366
|
-
$[
|
|
367
|
-
$[
|
|
368
|
-
$[
|
|
369
|
-
} else t5 = $[
|
|
382
|
+
$[20] = dropdownRest;
|
|
383
|
+
$[21] = menu;
|
|
384
|
+
$[22] = t4;
|
|
385
|
+
$[23] = t5;
|
|
386
|
+
} else t5 = $[23];
|
|
370
387
|
let t6;
|
|
371
|
-
if ($[
|
|
388
|
+
if ($[24] !== t2 || $[25] !== t5) {
|
|
372
389
|
t6 = /*#__PURE__*/ jsxs("span", {
|
|
373
390
|
"data-tao-dropdown-button-group": "",
|
|
374
391
|
children: [
|
|
@@ -376,10 +393,10 @@ function DropdownButton(t0) {
|
|
|
376
393
|
t5
|
|
377
394
|
]
|
|
378
395
|
});
|
|
379
|
-
$[
|
|
380
|
-
$[
|
|
381
|
-
$[
|
|
382
|
-
} else t6 = $[
|
|
396
|
+
$[24] = t2;
|
|
397
|
+
$[25] = t5;
|
|
398
|
+
$[26] = t6;
|
|
399
|
+
} else t6 = $[26];
|
|
383
400
|
return t6;
|
|
384
401
|
}
|
|
385
402
|
Dropdown.Button = DropdownButton;
|
|
@@ -189,7 +189,7 @@ const FloatButtonGroup = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
|
189
189
|
return /*#__PURE__*/ jsxs("div", {
|
|
190
190
|
ref: root,
|
|
191
191
|
role: "toolbar",
|
|
192
|
-
"aria-label":
|
|
192
|
+
"aria-label": config.locale.messages.floatingActions,
|
|
193
193
|
"data-tao-float-button-group": "",
|
|
194
194
|
"data-tao-shape": shape,
|
|
195
195
|
"data-tao-placement": placement,
|
|
@@ -265,6 +265,7 @@ function scrollElement(target) {
|
|
|
265
265
|
return target === window || target instanceof Document ? (target instanceof Document ? target : document).scrollingElement : target;
|
|
266
266
|
}
|
|
267
267
|
const BackTop = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
268
|
+
const { locale } = useTaoConfig();
|
|
268
269
|
const { visibilityHeight = 400, target = defaultTarget, duration = 450, showProgress = false, onClick, icon = /*#__PURE__*/ jsx(ActionIcon, {
|
|
269
270
|
kind: "top"
|
|
270
271
|
}), style, ...rest } = props;
|
|
@@ -328,7 +329,7 @@ const BackTop = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
|
328
329
|
...rest,
|
|
329
330
|
ref: node,
|
|
330
331
|
icon: icon,
|
|
331
|
-
"aria-label": rest['aria-label'] ??
|
|
332
|
+
"aria-label": rest['aria-label'] ?? locale.messages.backToTop,
|
|
332
333
|
onClick: click,
|
|
333
334
|
style: {
|
|
334
335
|
...showProgress ? {
|