@rockshin/tao-ui 0.0.59 → 0.0.60
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/dist/components/cascader/cascader.js +1 -0
- package/dist/components/color-picker/color-picker.css +1 -1
- package/dist/components/color-picker/color-picker.js +3 -2
- package/dist/components/context-menu/context-menu.d.ts +3 -1
- package/dist/components/context-menu/context-menu.js +48 -43
- package/dist/components/date-picker/calendar/time-panel.js +7 -3
- package/dist/components/date-picker/date-picker.js +3 -1
- package/dist/components/date-picker/range-picker.js +5 -3
- package/dist/components/dropdown/dropdown.d.ts +1 -0
- package/dist/components/dropdown/dropdown.js +18 -12
- package/dist/components/float-button/float-button.js +2 -1
- package/dist/components/form/use-form.js +2 -1
- package/dist/components/input-number/input-number.d.ts +2 -1
- package/dist/components/input-number/input-number.js +67 -52
- package/dist/components/mentions/mentions.js +3 -2
- package/dist/components/menu/menu-render.d.ts +6 -0
- package/dist/components/menu/menu-render.js +38 -26
- package/dist/components/modal/confirm-dialog.js +11 -6
- package/dist/components/modal/use-modal.js +1 -1
- package/dist/components/pagination/pagination.d.ts +3 -2
- package/dist/components/pagination/pagination.js +127 -117
- package/dist/components/popover/popover.js +125 -298
- package/dist/components/select/mobile-select.js +1 -1
- package/dist/components/select/select-model.js +1 -1
- package/dist/components/select/use-select-selection.js +94 -86
- package/dist/components/statistic/statistic.js +38 -31
- package/dist/components/table/table-filter.d.ts +3 -1
- package/dist/components/table/table-filter.js +100 -74
- package/dist/components/table/table.js +1 -0
- package/dist/components/tabs/tabs.d.ts +3 -2
- package/dist/components/tabs/tabs.js +122 -112
- package/dist/components/time-picker/time-picker.js +4 -2
- package/dist/components/tooltip/tooltip.d.ts +1 -1
- package/dist/components/tooltip/tooltip.js +168 -210
- package/dist/components/tree-select/tree-select.js +1 -0
- package/dist/number-input/use-number-input.d.ts +1 -0
- package/dist/number-input/use-number-input.js +6 -2
- package/dist/provider/tao-provider.js +18 -4
- package/dist/theme/control.css +5 -1
- package/dist/theme/theme.css +2 -2
- package/package.json +1 -1
|
@@ -6,8 +6,8 @@ import { mergeRefs } from "../../utils/refs.js";
|
|
|
6
6
|
import { cx } from "../../utils/semantic.js";
|
|
7
7
|
import "./tabs.css";
|
|
8
8
|
function Tabs(t0) {
|
|
9
|
-
const $ = c(
|
|
10
|
-
const { items, activeKey: activeKeyProp, defaultActiveKey, onChange, size, variant: t1, destroyInactiveTabPane: t2, className, classNames, styles, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy } = t0;
|
|
9
|
+
const $ = c(89);
|
|
10
|
+
const { items, activeKey: activeKeyProp, defaultActiveKey, onChange, size, variant: t1, destroyInactiveTabPane: t2, className, style, classNames, styles, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy } = t0;
|
|
11
11
|
const variant = void 0 === t1 ? "line" : t1;
|
|
12
12
|
const destroyInactiveTabPane = void 0 === t2 ? false : t2;
|
|
13
13
|
const ctx = useTaoConfig();
|
|
@@ -124,7 +124,7 @@ function Tabs(t0) {
|
|
|
124
124
|
next = enabledItems[(idx + 1) % enabledItems.length];
|
|
125
125
|
} else if (e.key === (rtl ? "ArrowRight" : "ArrowLeft")) {
|
|
126
126
|
e.preventDefault();
|
|
127
|
-
next = enabledItems[(idx - 1 + enabledItems.length) % enabledItems.length];
|
|
127
|
+
next = idx < 0 ? enabledItems[enabledItems.length - 1] : enabledItems[(idx - 1 + enabledItems.length) % enabledItems.length];
|
|
128
128
|
} else if ("Home" === e.key) {
|
|
129
129
|
e.preventDefault();
|
|
130
130
|
next = enabledItems[0];
|
|
@@ -154,26 +154,36 @@ function Tabs(t0) {
|
|
|
154
154
|
$[28] = t12;
|
|
155
155
|
} else t12 = $[28];
|
|
156
156
|
const t13 = styles?.root;
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
$[30] = t15;
|
|
163
|
-
} else t15 = $[30];
|
|
164
|
-
const t16 = styles?.nav;
|
|
165
|
-
let t17;
|
|
166
|
-
if ($[31] === Symbol.for("react.memo_cache_sentinel")) {
|
|
167
|
-
t17 = (event)=>{
|
|
168
|
-
if (!(event.relatedTarget instanceof Node) || !event.currentTarget.contains(event.relatedTarget)) setFocusedKey(void 0);
|
|
157
|
+
let t14;
|
|
158
|
+
if ($[29] !== style || $[30] !== t13) {
|
|
159
|
+
t14 = {
|
|
160
|
+
...t13,
|
|
161
|
+
...style
|
|
169
162
|
};
|
|
170
|
-
$[
|
|
171
|
-
|
|
163
|
+
$[29] = style;
|
|
164
|
+
$[30] = t13;
|
|
165
|
+
$[31] = t14;
|
|
166
|
+
} else t14 = $[31];
|
|
167
|
+
const t15 = classNames?.nav;
|
|
168
|
+
let t16;
|
|
169
|
+
if ($[32] !== t15) {
|
|
170
|
+
t16 = cx(t15);
|
|
171
|
+
$[32] = t15;
|
|
172
|
+
$[33] = t16;
|
|
173
|
+
} else t16 = $[33];
|
|
174
|
+
const t17 = styles?.nav;
|
|
172
175
|
let t18;
|
|
173
|
-
if ($[
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
176
|
+
if ($[34] === Symbol.for("react.memo_cache_sentinel")) {
|
|
177
|
+
t18 = (event)=>{
|
|
178
|
+
if (!(event.relatedTarget instanceof Node) || !event.currentTarget.contains(event.relatedTarget)) setFocusedKey(void 0);
|
|
179
|
+
};
|
|
180
|
+
$[34] = t18;
|
|
181
|
+
} else t18 = $[34];
|
|
182
|
+
let t19;
|
|
183
|
+
if ($[35] !== classNames?.tab || $[36] !== currentKey || $[37] !== destroyInactiveTabPane || $[38] !== focusKey || $[39] !== getItemId || $[40] !== handleSelect || $[41] !== items || $[42] !== styles?.tab) {
|
|
184
|
+
let t20;
|
|
185
|
+
if ($[44] !== classNames?.tab || $[45] !== currentKey || $[46] !== destroyInactiveTabPane || $[47] !== focusKey || $[48] !== getItemId || $[49] !== handleSelect || $[50] !== styles?.tab) {
|
|
186
|
+
t20 = (item_5)=>{
|
|
177
187
|
const isActive = item_5.key === currentKey;
|
|
178
188
|
const tabId = getItemId("tab", item_5.key);
|
|
179
189
|
const panelId = getItemId("panel", item_5.key);
|
|
@@ -201,29 +211,29 @@ function Tabs(t0) {
|
|
|
201
211
|
children: item_5.label
|
|
202
212
|
}, item_5.key);
|
|
203
213
|
};
|
|
204
|
-
$[
|
|
205
|
-
$[
|
|
206
|
-
$[
|
|
207
|
-
$[
|
|
208
|
-
$[
|
|
209
|
-
$[
|
|
210
|
-
$[
|
|
211
|
-
$[
|
|
212
|
-
} else
|
|
213
|
-
|
|
214
|
-
$[
|
|
215
|
-
$[
|
|
216
|
-
$[
|
|
217
|
-
$[
|
|
218
|
-
$[
|
|
219
|
-
$[
|
|
220
|
-
$[
|
|
221
|
-
$[
|
|
222
|
-
$[
|
|
223
|
-
} else
|
|
224
|
-
let
|
|
225
|
-
if ($[
|
|
226
|
-
|
|
214
|
+
$[44] = classNames?.tab;
|
|
215
|
+
$[45] = currentKey;
|
|
216
|
+
$[46] = destroyInactiveTabPane;
|
|
217
|
+
$[47] = focusKey;
|
|
218
|
+
$[48] = getItemId;
|
|
219
|
+
$[49] = handleSelect;
|
|
220
|
+
$[50] = styles?.tab;
|
|
221
|
+
$[51] = t20;
|
|
222
|
+
} else t20 = $[51];
|
|
223
|
+
t19 = items.map(t20);
|
|
224
|
+
$[35] = classNames?.tab;
|
|
225
|
+
$[36] = currentKey;
|
|
226
|
+
$[37] = destroyInactiveTabPane;
|
|
227
|
+
$[38] = focusKey;
|
|
228
|
+
$[39] = getItemId;
|
|
229
|
+
$[40] = handleSelect;
|
|
230
|
+
$[41] = items;
|
|
231
|
+
$[42] = styles?.tab;
|
|
232
|
+
$[43] = t19;
|
|
233
|
+
} else t19 = $[43];
|
|
234
|
+
let t20;
|
|
235
|
+
if ($[52] !== classNames?.indicator || $[53] !== direction || $[54] !== inkStyle || $[55] !== styles?.indicator || $[56] !== variant) {
|
|
236
|
+
t20 = "line" === variant && inkStyle && /*#__PURE__*/ jsx("span", {
|
|
227
237
|
"data-tao-tabs-ink": "",
|
|
228
238
|
style: {
|
|
229
239
|
transform: `translateX(${inkStyle.left}px) scaleX(${inkStyle.width})`,
|
|
@@ -232,54 +242,54 @@ function Tabs(t0) {
|
|
|
232
242
|
},
|
|
233
243
|
className: cx(classNames?.indicator)
|
|
234
244
|
});
|
|
235
|
-
$[
|
|
236
|
-
$[
|
|
237
|
-
$[
|
|
238
|
-
$[
|
|
239
|
-
$[
|
|
240
|
-
$[
|
|
241
|
-
} else
|
|
242
|
-
let
|
|
243
|
-
if ($[
|
|
244
|
-
|
|
245
|
+
$[52] = classNames?.indicator;
|
|
246
|
+
$[53] = direction;
|
|
247
|
+
$[54] = inkStyle;
|
|
248
|
+
$[55] = styles?.indicator;
|
|
249
|
+
$[56] = variant;
|
|
250
|
+
$[57] = t20;
|
|
251
|
+
} else t20 = $[57];
|
|
252
|
+
let t21;
|
|
253
|
+
if ($[58] !== ariaLabel || $[59] !== ariaLabelledBy || $[60] !== handleKeyDown || $[61] !== listRef || $[62] !== t19 || $[63] !== t20) {
|
|
254
|
+
t21 = /*#__PURE__*/ jsxs("div", {
|
|
245
255
|
ref: listRef,
|
|
246
256
|
role: "tablist",
|
|
247
257
|
"aria-label": ariaLabel,
|
|
248
258
|
"aria-labelledby": ariaLabelledBy,
|
|
249
259
|
"data-tao-tabs-list": "",
|
|
250
|
-
onBlur:
|
|
260
|
+
onBlur: t18,
|
|
251
261
|
onKeyDown: handleKeyDown,
|
|
252
262
|
children: [
|
|
253
|
-
|
|
254
|
-
|
|
263
|
+
t19,
|
|
264
|
+
t20
|
|
255
265
|
]
|
|
256
266
|
});
|
|
257
|
-
$[
|
|
258
|
-
$[
|
|
259
|
-
$[
|
|
260
|
-
$[
|
|
261
|
-
$[
|
|
262
|
-
$[
|
|
263
|
-
$[
|
|
264
|
-
} else
|
|
265
|
-
let
|
|
266
|
-
if ($[
|
|
267
|
-
|
|
267
|
+
$[58] = ariaLabel;
|
|
268
|
+
$[59] = ariaLabelledBy;
|
|
269
|
+
$[60] = handleKeyDown;
|
|
270
|
+
$[61] = listRef;
|
|
271
|
+
$[62] = t19;
|
|
272
|
+
$[63] = t20;
|
|
273
|
+
$[64] = t21;
|
|
274
|
+
} else t21 = $[64];
|
|
275
|
+
let t22;
|
|
276
|
+
if ($[65] !== t16 || $[66] !== t17 || $[67] !== t21) {
|
|
277
|
+
t22 = /*#__PURE__*/ jsx("div", {
|
|
268
278
|
"data-tao-tabs-nav": "",
|
|
269
|
-
className:
|
|
270
|
-
style:
|
|
271
|
-
children:
|
|
279
|
+
className: t16,
|
|
280
|
+
style: t17,
|
|
281
|
+
children: t21
|
|
272
282
|
});
|
|
273
|
-
$[
|
|
274
|
-
$[
|
|
275
|
-
$[
|
|
276
|
-
$[
|
|
277
|
-
} else
|
|
278
|
-
let
|
|
279
|
-
if ($[
|
|
280
|
-
let
|
|
281
|
-
if ($[
|
|
282
|
-
|
|
283
|
+
$[65] = t16;
|
|
284
|
+
$[66] = t17;
|
|
285
|
+
$[67] = t21;
|
|
286
|
+
$[68] = t22;
|
|
287
|
+
} else t22 = $[68];
|
|
288
|
+
let t23;
|
|
289
|
+
if ($[69] !== classNames?.panel || $[70] !== currentKey || $[71] !== destroyInactiveTabPane || $[72] !== getItemId || $[73] !== items || $[74] !== styles?.panel) {
|
|
290
|
+
let t24;
|
|
291
|
+
if ($[76] !== classNames?.panel || $[77] !== currentKey || $[78] !== destroyInactiveTabPane || $[79] !== getItemId || $[80] !== styles?.panel) {
|
|
292
|
+
t24 = (item_6)=>{
|
|
283
293
|
const isActive_0 = item_6.key === currentKey;
|
|
284
294
|
const tabId_0 = getItemId("tab", item_6.key);
|
|
285
295
|
const panelId_0 = getItemId("panel", item_6.key);
|
|
@@ -297,44 +307,44 @@ function Tabs(t0) {
|
|
|
297
307
|
children: item_6.children
|
|
298
308
|
}, item_6.key);
|
|
299
309
|
};
|
|
300
|
-
$[
|
|
301
|
-
$[
|
|
302
|
-
$[
|
|
303
|
-
$[
|
|
304
|
-
$[
|
|
305
|
-
$[
|
|
306
|
-
} else
|
|
307
|
-
|
|
308
|
-
$[
|
|
309
|
-
$[
|
|
310
|
-
$[
|
|
311
|
-
$[
|
|
312
|
-
$[
|
|
313
|
-
$[
|
|
314
|
-
$[
|
|
315
|
-
} else
|
|
316
|
-
let
|
|
317
|
-
if ($[
|
|
318
|
-
|
|
310
|
+
$[76] = classNames?.panel;
|
|
311
|
+
$[77] = currentKey;
|
|
312
|
+
$[78] = destroyInactiveTabPane;
|
|
313
|
+
$[79] = getItemId;
|
|
314
|
+
$[80] = styles?.panel;
|
|
315
|
+
$[81] = t24;
|
|
316
|
+
} else t24 = $[81];
|
|
317
|
+
t23 = items.map(t24);
|
|
318
|
+
$[69] = classNames?.panel;
|
|
319
|
+
$[70] = currentKey;
|
|
320
|
+
$[71] = destroyInactiveTabPane;
|
|
321
|
+
$[72] = getItemId;
|
|
322
|
+
$[73] = items;
|
|
323
|
+
$[74] = styles?.panel;
|
|
324
|
+
$[75] = t23;
|
|
325
|
+
} else t23 = $[75];
|
|
326
|
+
let t24;
|
|
327
|
+
if ($[82] !== resolvedSize || $[83] !== t12 || $[84] !== t14 || $[85] !== t22 || $[86] !== t23 || $[87] !== variant) {
|
|
328
|
+
t24 = /*#__PURE__*/ jsxs("div", {
|
|
319
329
|
"data-tao-tabs": "",
|
|
320
330
|
"data-tao-variant": variant,
|
|
321
331
|
"data-tao-size": resolvedSize,
|
|
322
332
|
className: t12,
|
|
323
|
-
style:
|
|
333
|
+
style: t14,
|
|
324
334
|
children: [
|
|
325
|
-
|
|
326
|
-
|
|
335
|
+
t22,
|
|
336
|
+
t23
|
|
327
337
|
]
|
|
328
338
|
});
|
|
329
|
-
$[
|
|
330
|
-
$[
|
|
331
|
-
$[
|
|
332
|
-
$[
|
|
333
|
-
$[
|
|
334
|
-
$[
|
|
335
|
-
$[
|
|
336
|
-
} else
|
|
337
|
-
return
|
|
339
|
+
$[82] = resolvedSize;
|
|
340
|
+
$[83] = t12;
|
|
341
|
+
$[84] = t14;
|
|
342
|
+
$[85] = t22;
|
|
343
|
+
$[86] = t23;
|
|
344
|
+
$[87] = variant;
|
|
345
|
+
$[88] = t24;
|
|
346
|
+
} else t24 = $[88];
|
|
347
|
+
return t24;
|
|
338
348
|
}
|
|
339
349
|
function _temp2(t) {
|
|
340
350
|
return !t.disabled;
|
|
@@ -4,9 +4,9 @@ import picker, { RangePicker } from "@rc-component/picker";
|
|
|
4
4
|
import dayjs from "@rc-component/picker/generate/dayjs";
|
|
5
5
|
import en_US from "@rc-component/picker/locale/en_US";
|
|
6
6
|
import { forwardRef, useImperativeHandle, useMemo, useRef, useState } from "react";
|
|
7
|
+
import { normalizeDigits, resolveNumberFormat } from "../../number-input/locale.js";
|
|
7
8
|
import { TaoPortalScope, useTaoConfig, useTaoDirection, useTaoInternalConfig } from "../../provider/tao-provider.js";
|
|
8
9
|
import { mergeRefs } from "../../utils/refs.js";
|
|
9
|
-
import { normalizeDigits, resolveNumberFormat } from "../../number-input/locale.js";
|
|
10
10
|
import { cx } from "../../utils/semantic.js";
|
|
11
11
|
import { Button } from "../button/button.js";
|
|
12
12
|
import { parsePickerDate } from "../date-picker/date-localization.js";
|
|
@@ -211,7 +211,7 @@ function useAppearance(props, classNames, styles) {
|
|
|
211
211
|
position: "absolute",
|
|
212
212
|
width: "max-content",
|
|
213
213
|
maxWidth: "calc(100vw - 24px)",
|
|
214
|
-
zIndex: "
|
|
214
|
+
zIndex: "var(--tao-z-index-popup)",
|
|
215
215
|
...props.popupStyle,
|
|
216
216
|
...t13
|
|
217
217
|
};
|
|
@@ -330,6 +330,7 @@ const SingleTimePicker = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
|
330
330
|
disabled: disabled,
|
|
331
331
|
placeholder: placeholder ?? locale?.timePickerLocale?.placeholder ?? locale?.lang.placeholder ?? appearance.config.locale.selectTime ?? 'Select time',
|
|
332
332
|
prefixCls: prefixCls,
|
|
333
|
+
"aria-invalid": 'error' === status ? true : props['aria-invalid'],
|
|
333
334
|
"aria-busy": 'validating' === status || void 0,
|
|
334
335
|
suffix: void 0 !== suffix ? suffix : void 0 !== suffixIcon ? suffixIcon : /*#__PURE__*/ jsx(TimeIcon, {}),
|
|
335
336
|
allowClear: clear,
|
|
@@ -418,6 +419,7 @@ const TimeRangePicker = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
|
418
419
|
appearance.config.locale.endTime ?? 'End time'
|
|
419
420
|
],
|
|
420
421
|
prefixCls: prefixCls,
|
|
422
|
+
"aria-invalid": 'error' === status ? true : props['aria-invalid'],
|
|
421
423
|
"aria-busy": 'validating' === status || void 0,
|
|
422
424
|
suffix: void 0 !== suffix ? suffix : void 0 !== suffixIcon ? suffixIcon : /*#__PURE__*/ jsx(TimeIcon, {}),
|
|
423
425
|
allowClear: clear,
|
|
@@ -31,4 +31,4 @@ export interface TooltipProps {
|
|
|
31
31
|
/** Exactly one trigger element. */
|
|
32
32
|
children: ReactNode;
|
|
33
33
|
}
|
|
34
|
-
export declare function Tooltip(
|
|
34
|
+
export declare function Tooltip({ direction: directionProp, title, placement, arrow, open, defaultOpen, onOpenChange, mouseEnterDelay, mouseLeaveDelay, color, className, style, classNames, styles, children, }: TooltipProps): import("react").JSX.Element;
|