@rockshin/tao-ui 0.0.58 → 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/affix/affix.js +38 -4
- package/dist/components/app/app-modals.js +11 -6
- package/dist/components/app/app-notices.js +105 -47
- package/dist/components/auto-complete/auto-complete.js +9 -2
- package/dist/components/calendar/calendar.js +22 -18
- package/dist/components/carousel/carousel.js +27 -14
- package/dist/components/cascader/cascader.js +18 -12
- package/dist/components/checkbox/checkbox.d.ts +3 -1
- package/dist/components/checkbox/checkbox.js +65 -58
- package/dist/components/color-picker/color-picker.css +1 -1
- package/dist/components/color-picker/color-picker.js +386 -362
- 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/calendar-grid.d.ts +5 -3
- package/dist/components/date-picker/calendar/calendar-grid.js +9 -4
- package/dist/components/date-picker/calendar/month-grid.d.ts +2 -1
- package/dist/components/date-picker/calendar/month-grid.js +61 -45
- package/dist/components/date-picker/calendar/time-panel.d.ts +8 -1
- package/dist/components/date-picker/calendar/time-panel.js +93 -88
- package/dist/components/date-picker/calendar/year-grid.d.ts +2 -1
- package/dist/components/date-picker/calendar/year-grid.js +60 -44
- package/dist/components/date-picker/date-picker.css +9 -0
- package/dist/components/date-picker/date-picker.js +25 -14
- package/dist/components/date-picker/range-picker.d.ts +2 -0
- package/dist/components/date-picker/range-picker.js +132 -73
- package/dist/components/date-picker/types.js +1 -1
- package/dist/components/drawer/drawer.d.ts +1 -1
- package/dist/components/drawer/drawer.js +4 -3
- package/dist/components/dropdown/dropdown.d.ts +1 -0
- package/dist/components/dropdown/dropdown.js +29 -21
- package/dist/components/float-button/float-button.js +6 -5
- package/dist/components/form/form-item.d.ts +1 -1
- package/dist/components/form/form-item.js +160 -120
- package/dist/components/form/use-form.js +2 -1
- package/dist/components/form-field/form-field-view.d.ts +2 -1
- package/dist/components/form-field/form-field-view.js +173 -108
- package/dist/components/input/input-shared.js +3 -2
- package/dist/components/input/otp.js +114 -110
- package/dist/components/input/password.js +55 -61
- package/dist/components/input/search.js +8 -4
- 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 +4 -2
- package/dist/components/menu/menu-render.d.ts +6 -0
- package/dist/components/menu/menu-render.js +39 -26
- package/dist/components/modal/confirm-dialog.js +22 -10
- package/dist/components/modal/modal.js +320 -315
- package/dist/components/modal/use-modal.js +1 -1
- package/dist/components/pagination/pagination.d.ts +4 -2
- package/dist/components/pagination/pagination.js +128 -117
- package/dist/components/popover/popover.js +214 -351
- package/dist/components/qr-code/qr-code.js +157 -150
- package/dist/components/radio/radio.d.ts +3 -1
- package/dist/components/radio/radio.js +73 -64
- package/dist/components/select/mobile-select.js +7 -4
- package/dist/components/select/select-model.js +3 -3
- package/dist/components/select/select.js +78 -39
- package/dist/components/select/use-select-selection.js +100 -92
- package/dist/components/slider/slider.d.ts +2 -2
- package/dist/components/slider/slider.js +13 -2
- package/dist/components/sonner/sonner.js +2 -2
- package/dist/components/splitter/splitter.css +1 -0
- package/dist/components/splitter/splitter.js +152 -126
- package/dist/components/statistic/statistic.js +38 -31
- package/dist/components/switch/switch.js +45 -39
- 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 +2 -0
- package/dist/components/table/use-table-data.js +2 -2
- 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 +35 -3
- package/dist/components/tooltip/tooltip.d.ts +1 -1
- package/dist/components/tooltip/tooltip.js +220 -124
- package/dist/components/tree/tree.js +31 -3
- package/dist/components/tree-select/tree-select.js +2 -1
- package/dist/components/upload/upload.js +67 -40
- package/dist/locales/ar-EG.js +2 -0
- package/dist/locales/de-DE.js +2 -0
- package/dist/locales/en-US.js +2 -0
- package/dist/locales/es-ES.js +2 -0
- package/dist/locales/fr-FR.js +2 -0
- package/dist/locales/hi-IN.js +2 -0
- package/dist/locales/id-ID.js +2 -0
- package/dist/locales/it-IT.js +2 -0
- package/dist/locales/ja-JP.js +2 -0
- package/dist/locales/ko-KR.js +2 -0
- package/dist/locales/pt-BR.js +2 -0
- package/dist/locales/ru-RU.js +2 -0
- package/dist/locales/th-TH.js +2 -0
- package/dist/locales/tr-TR.js +2 -0
- package/dist/locales/types.d.ts +2 -0
- package/dist/locales/vi-VN.js +2 -0
- package/dist/locales/zh-CN.js +2 -0
- package/dist/locales/zh-TW.js +2 -0
- package/dist/number-input/format.js +1 -1
- package/dist/number-input/use-number-input.d.ts +1 -0
- package/dist/number-input/use-number-input.js +170 -321
- package/dist/number-input/validate.d.ts +1 -0
- package/dist/number-input/validate.js +1 -1
- package/dist/provider/tao-provider.d.ts +2 -2
- package/dist/provider/tao-provider.js +66 -52
- package/dist/theme/control.css +5 -1
- package/dist/theme/theme.css +2 -2
- package/dist/utils/composed-parent.d.ts +1 -0
- package/dist/utils/composed-parent.js +7 -0
- package/dist/utils/portal.d.ts +5 -0
- package/dist/utils/portal.js +7 -1
- package/dist/utils/refs.d.ts +3 -1
- package/dist/utils/refs.js +25 -1
- package/package.json +1 -1
|
@@ -3,14 +3,40 @@ import { c } from "react-compiler-runtime";
|
|
|
3
3
|
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
|
-
import { forwardRef, useImperativeHandle, useMemo, useRef } from "react";
|
|
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";
|
|
13
13
|
import "./time-picker.css";
|
|
14
|
+
function usePopupState(open, onOpenChange) {
|
|
15
|
+
const $ = c(5);
|
|
16
|
+
const [innerOpen, setInnerOpen] = useState(false);
|
|
17
|
+
const t0 = open ?? innerOpen;
|
|
18
|
+
let t1;
|
|
19
|
+
if ($[0] !== onOpenChange) {
|
|
20
|
+
t1 = (next)=>{
|
|
21
|
+
setInnerOpen(next);
|
|
22
|
+
onOpenChange?.(next);
|
|
23
|
+
};
|
|
24
|
+
$[0] = onOpenChange;
|
|
25
|
+
$[1] = t1;
|
|
26
|
+
} else t1 = $[1];
|
|
27
|
+
let t2;
|
|
28
|
+
if ($[2] !== t0 || $[3] !== t1) {
|
|
29
|
+
t2 = {
|
|
30
|
+
"aria-haspopup": "dialog",
|
|
31
|
+
"aria-expanded": t0,
|
|
32
|
+
onOpenChange: t1
|
|
33
|
+
};
|
|
34
|
+
$[2] = t0;
|
|
35
|
+
$[3] = t1;
|
|
36
|
+
$[4] = t2;
|
|
37
|
+
} else t2 = $[4];
|
|
38
|
+
return t2;
|
|
39
|
+
}
|
|
14
40
|
function TimeIcon(t0) {
|
|
15
41
|
const $ = c(2);
|
|
16
42
|
const { clear: t1 } = t0;
|
|
@@ -185,7 +211,7 @@ function useAppearance(props, classNames, styles) {
|
|
|
185
211
|
position: "absolute",
|
|
186
212
|
width: "max-content",
|
|
187
213
|
maxWidth: "calc(100vw - 24px)",
|
|
188
|
-
zIndex: "
|
|
214
|
+
zIndex: "var(--tao-z-index-popup)",
|
|
189
215
|
...props.popupStyle,
|
|
190
216
|
...t13
|
|
191
217
|
};
|
|
@@ -267,6 +293,7 @@ const SingleTimePicker = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
|
267
293
|
props
|
|
268
294
|
}) : props.styles;
|
|
269
295
|
const appearance = useAppearance(props, names, semanticStyles);
|
|
296
|
+
const popupState = usePopupState(props.open, props.onOpenChange);
|
|
270
297
|
const { locale, size, status, variant, bordered, popupClassName, dropdownClassName, popupStyle, classNames, styles, addon, renderExtraFooter, panelRender, components, onSelect, onCalendarChange, onChange, onOk, value, defaultValue, disabled = appearance.config.disabled, allowClear = true, suffix, suffixIcon, prefixCls = 'tao-time-picker', placeholder, className, style, ...rest } = props;
|
|
271
298
|
const clear = false === allowClear ? false : {
|
|
272
299
|
clearIcon: /*#__PURE__*/ jsx(TimeIcon, {
|
|
@@ -292,6 +319,7 @@ const SingleTimePicker = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
|
292
319
|
},
|
|
293
320
|
children: /*#__PURE__*/ jsx(picker, {
|
|
294
321
|
...rest,
|
|
322
|
+
...popupState,
|
|
295
323
|
ref: pickerRef,
|
|
296
324
|
direction: direction,
|
|
297
325
|
picker: "time",
|
|
@@ -302,6 +330,7 @@ const SingleTimePicker = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
|
302
330
|
disabled: disabled,
|
|
303
331
|
placeholder: placeholder ?? locale?.timePickerLocale?.placeholder ?? locale?.lang.placeholder ?? appearance.config.locale.selectTime ?? 'Select time',
|
|
304
332
|
prefixCls: prefixCls,
|
|
333
|
+
"aria-invalid": 'error' === status ? true : props['aria-invalid'],
|
|
305
334
|
"aria-busy": 'validating' === status || void 0,
|
|
306
335
|
suffix: void 0 !== suffix ? suffix : void 0 !== suffixIcon ? suffixIcon : /*#__PURE__*/ jsx(TimeIcon, {}),
|
|
307
336
|
allowClear: clear,
|
|
@@ -351,6 +380,7 @@ const TimeRangePicker = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
|
351
380
|
props
|
|
352
381
|
}) : props.styles;
|
|
353
382
|
const appearance = useAppearance(props, names, semanticStyles);
|
|
383
|
+
const popupState = usePopupState(props.open, props.onOpenChange);
|
|
354
384
|
const { locale, size, status, variant, bordered, popupClassName, dropdownClassName, popupStyle, classNames, styles, panelRender, components, value, disabled = appearance.config.disabled, allowClear = true, suffix, suffixIcon, prefixCls = 'tao-time-picker', placeholder, className, style, ...rest } = props;
|
|
355
385
|
const clear = false === allowClear ? false : {
|
|
356
386
|
clearIcon: /*#__PURE__*/ jsx(TimeIcon, {
|
|
@@ -376,6 +406,7 @@ const TimeRangePicker = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
|
376
406
|
},
|
|
377
407
|
children: /*#__PURE__*/ jsx(RangePicker, {
|
|
378
408
|
...rest,
|
|
409
|
+
...popupState,
|
|
379
410
|
ref: pickerRef,
|
|
380
411
|
direction: direction,
|
|
381
412
|
picker: "time",
|
|
@@ -388,6 +419,7 @@ const TimeRangePicker = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
|
388
419
|
appearance.config.locale.endTime ?? 'End time'
|
|
389
420
|
],
|
|
390
421
|
prefixCls: prefixCls,
|
|
422
|
+
"aria-invalid": 'error' === status ? true : props['aria-invalid'],
|
|
391
423
|
"aria-busy": 'validating' === status || void 0,
|
|
392
424
|
suffix: void 0 !== suffix ? suffix : void 0 !== suffixIcon ? suffixIcon : /*#__PURE__*/ jsx(TimeIcon, {}),
|
|
393
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;
|
|
@@ -1,143 +1,239 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { c } from "react-compiler-runtime";
|
|
3
|
-
import {
|
|
3
|
+
import { useEffect, useRef, useState } from "react";
|
|
4
4
|
import { TaoPortalScope, useTaoDirection } from "../../provider/tao-provider.js";
|
|
5
|
-
import { asTriggerChild
|
|
5
|
+
import { asTriggerChild } from "../../utils/overlay.js";
|
|
6
|
+
import { useCommittedRef } from "../../utils/refs.js";
|
|
6
7
|
import { cx } from "../../utils/semantic.js";
|
|
7
8
|
import "./tooltip.css";
|
|
8
9
|
import * as __rspack_external__radix_ui_react_tooltip_b301f25d from "@radix-ui/react-tooltip";
|
|
9
|
-
function Tooltip(
|
|
10
|
-
const $ = c(
|
|
11
|
-
const { title, children } =
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
onOpenChange
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
10
|
+
function Tooltip(t0) {
|
|
11
|
+
const $ = c(53);
|
|
12
|
+
const { direction: directionProp, title, placement: t1, arrow: t2, open, defaultOpen, onOpenChange, mouseEnterDelay: t3, mouseLeaveDelay: t4, color, className, style, classNames, styles, children } = t0;
|
|
13
|
+
const placement = void 0 === t1 ? "top" : t1;
|
|
14
|
+
const arrow = void 0 === t2 ? true : t2;
|
|
15
|
+
const mouseEnterDelay = void 0 === t3 ? 0.1 : t3;
|
|
16
|
+
const mouseLeaveDelay = void 0 === t4 ? 0.1 : t4;
|
|
17
|
+
const hasTitle = null != title && "" !== title && "boolean" != typeof title;
|
|
18
|
+
const [direction, directionRef] = useTaoDirection(directionProp, "self");
|
|
19
|
+
const isControlled = null != open;
|
|
20
|
+
let t5;
|
|
21
|
+
if ($[0] !== defaultOpen || $[1] !== hasTitle) {
|
|
22
|
+
t5 = ()=>Boolean(hasTitle && defaultOpen);
|
|
23
|
+
$[0] = defaultOpen;
|
|
24
|
+
$[1] = hasTitle;
|
|
25
|
+
$[2] = t5;
|
|
26
|
+
} else t5 = $[2];
|
|
27
|
+
const [internalOpen, setInternalOpen] = useState(t5);
|
|
28
|
+
if (!hasTitle && internalOpen) setInternalOpen(false);
|
|
29
|
+
const realOpen = hasTitle && (isControlled ? open : internalOpen);
|
|
30
|
+
let t6;
|
|
31
|
+
if ($[3] !== hasTitle || $[4] !== isControlled || $[5] !== onOpenChange) {
|
|
32
|
+
t6 = (next)=>{
|
|
33
|
+
if (next && !hasTitle) return;
|
|
34
|
+
if (!isControlled) setInternalOpen(next);
|
|
35
|
+
onOpenChange?.(next);
|
|
36
|
+
};
|
|
37
|
+
$[3] = hasTitle;
|
|
38
|
+
$[4] = isControlled;
|
|
39
|
+
$[5] = onOpenChange;
|
|
40
|
+
$[6] = t6;
|
|
41
|
+
} else t6 = $[6];
|
|
42
|
+
const setOpen = t6;
|
|
43
|
+
const latestSetOpen = useCommittedRef(setOpen);
|
|
42
44
|
const closeTimer = useRef(void 0);
|
|
43
45
|
const pointerDriven = useRef(false);
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
46
|
+
let t7;
|
|
47
|
+
let t8;
|
|
48
|
+
if ($[7] !== realOpen) {
|
|
49
|
+
t7 = ()=>{
|
|
50
|
+
if (!realOpen) return;
|
|
51
|
+
return ()=>{
|
|
52
|
+
clearTimeout(closeTimer.current);
|
|
53
|
+
pointerDriven.current = false;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
t8 = [
|
|
57
|
+
realOpen
|
|
58
|
+
];
|
|
59
|
+
$[7] = realOpen;
|
|
60
|
+
$[8] = t7;
|
|
61
|
+
$[9] = t8;
|
|
62
|
+
} else {
|
|
63
|
+
t7 = $[8];
|
|
64
|
+
t8 = $[9];
|
|
65
|
+
}
|
|
66
|
+
useEffect(t7, t8);
|
|
67
|
+
let t9;
|
|
68
|
+
if ($[10] !== latestSetOpen || $[11] !== mouseLeaveDelay || $[12] !== setOpen) {
|
|
69
|
+
t9 = ()=>{
|
|
47
70
|
clearTimeout(closeTimer.current);
|
|
48
|
-
|
|
71
|
+
if (mouseLeaveDelay <= 0) return void setOpen(false);
|
|
72
|
+
closeTimer.current = setTimeout(()=>{
|
|
73
|
+
pointerDriven.current = false;
|
|
74
|
+
latestSetOpen.current(false);
|
|
75
|
+
}, 1000 * mouseLeaveDelay);
|
|
49
76
|
};
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
77
|
+
$[10] = latestSetOpen;
|
|
78
|
+
$[11] = mouseLeaveDelay;
|
|
79
|
+
$[12] = setOpen;
|
|
80
|
+
$[13] = t9;
|
|
81
|
+
} else t9 = $[13];
|
|
82
|
+
const schedulePointerClose = t9;
|
|
83
|
+
let t10;
|
|
84
|
+
if ($[14] !== schedulePointerClose || $[15] !== setOpen) {
|
|
85
|
+
t10 = (next_0)=>{
|
|
86
|
+
if (!next_0 && pointerDriven.current) return void schedulePointerClose();
|
|
87
|
+
clearTimeout(closeTimer.current);
|
|
57
88
|
pointerDriven.current = false;
|
|
58
|
-
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
]
|
|
64
|
-
const handleOpenChange =
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
}, [
|
|
70
|
-
schedulePointerClose,
|
|
71
|
-
setOpen
|
|
72
|
-
]);
|
|
73
|
-
const hoverProps = {
|
|
74
|
-
onPointerEnter: (event)=>{
|
|
75
|
-
if ('touch' === event.pointerType) return;
|
|
89
|
+
setOpen(next_0);
|
|
90
|
+
};
|
|
91
|
+
$[14] = schedulePointerClose;
|
|
92
|
+
$[15] = setOpen;
|
|
93
|
+
$[16] = t10;
|
|
94
|
+
} else t10 = $[16];
|
|
95
|
+
const handleOpenChange = t10;
|
|
96
|
+
let t11;
|
|
97
|
+
if ($[17] === Symbol.for("react.memo_cache_sentinel")) {
|
|
98
|
+
t11 = (event)=>{
|
|
99
|
+
if ("touch" === event.pointerType) return;
|
|
76
100
|
pointerDriven.current = false;
|
|
77
101
|
clearTimeout(closeTimer.current);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
102
|
+
};
|
|
103
|
+
$[17] = t11;
|
|
104
|
+
} else t11 = $[17];
|
|
105
|
+
let t12;
|
|
106
|
+
if ($[18] !== realOpen || $[19] !== schedulePointerClose) {
|
|
107
|
+
t12 = {
|
|
108
|
+
onPointerEnter: t11,
|
|
109
|
+
onPointerLeave: (event_0)=>{
|
|
110
|
+
if (!realOpen || "touch" === event_0.pointerType) return;
|
|
111
|
+
pointerDriven.current = true;
|
|
112
|
+
schedulePointerClose();
|
|
113
|
+
}
|
|
114
|
+
};
|
|
115
|
+
$[18] = realOpen;
|
|
116
|
+
$[19] = schedulePointerClose;
|
|
117
|
+
$[20] = t12;
|
|
118
|
+
} else t12 = $[20];
|
|
119
|
+
const hoverProps = t12;
|
|
120
|
+
let t13;
|
|
121
|
+
if ($[21] !== color) {
|
|
122
|
+
t13 = color ? {
|
|
123
|
+
background: color
|
|
124
|
+
} : void 0;
|
|
125
|
+
$[21] = color;
|
|
126
|
+
$[22] = t13;
|
|
127
|
+
} else t13 = $[22];
|
|
128
|
+
const colorStyle = t13;
|
|
129
|
+
const t14 = 1000 * mouseEnterDelay;
|
|
130
|
+
let t15;
|
|
131
|
+
if ($[23] === Symbol.for("react.memo_cache_sentinel")) {
|
|
132
|
+
t15 = ()=>{
|
|
133
|
+
pointerDriven.current = false;
|
|
134
|
+
};
|
|
135
|
+
$[23] = t15;
|
|
136
|
+
} else t15 = $[23];
|
|
137
|
+
let t16;
|
|
138
|
+
if ($[24] !== children) {
|
|
139
|
+
t16 = asTriggerChild(children);
|
|
140
|
+
$[24] = children;
|
|
141
|
+
$[25] = t16;
|
|
142
|
+
} else t16 = $[25];
|
|
143
|
+
let t17;
|
|
144
|
+
if ($[26] !== directionRef || $[27] !== hoverProps || $[28] !== t16) {
|
|
145
|
+
t17 = /*#__PURE__*/ jsx(__rspack_external__radix_ui_react_tooltip_b301f25d.Trigger, {
|
|
146
|
+
ref: directionRef,
|
|
147
|
+
asChild: true,
|
|
148
|
+
...hoverProps,
|
|
149
|
+
onBlur: t15,
|
|
150
|
+
children: t16
|
|
151
|
+
});
|
|
152
|
+
$[26] = directionRef;
|
|
153
|
+
$[27] = hoverProps;
|
|
154
|
+
$[28] = t16;
|
|
155
|
+
$[29] = t17;
|
|
156
|
+
} else t17 = $[29];
|
|
157
|
+
let t18;
|
|
158
|
+
if ($[30] !== arrow || $[31] !== className || $[32] !== classNames?.arrow || $[33] !== classNames?.content || $[34] !== color || $[35] !== colorStyle || $[36] !== direction || $[37] !== hasTitle || $[38] !== hoverProps || $[39] !== placement || $[40] !== style || $[41] !== styles?.arrow || $[42] !== styles?.content || $[43] !== title) {
|
|
159
|
+
t18 = hasTitle && /*#__PURE__*/ jsx(__rspack_external__radix_ui_react_tooltip_b301f25d.Portal, {
|
|
160
|
+
children: /*#__PURE__*/ jsx(TaoPortalScope, {
|
|
161
|
+
direction: direction,
|
|
162
|
+
children: /*#__PURE__*/ jsxs(__rspack_external__radix_ui_react_tooltip_b301f25d.Content, {
|
|
163
|
+
"data-tao-tooltip-content": "",
|
|
164
|
+
className: cx(classNames?.content, className),
|
|
165
|
+
style: {
|
|
166
|
+
...colorStyle,
|
|
167
|
+
...styles?.content,
|
|
168
|
+
...style
|
|
169
|
+
},
|
|
170
|
+
side: placement,
|
|
171
|
+
sideOffset: 4,
|
|
172
|
+
onEscapeKeyDown: ()=>{
|
|
99
173
|
pointerDriven.current = false;
|
|
100
174
|
},
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
onEscapeKeyDown: ()=>{
|
|
117
|
-
pointerDriven.current = false;
|
|
118
|
-
},
|
|
119
|
-
...hoverProps,
|
|
120
|
-
children: [
|
|
121
|
-
title,
|
|
122
|
-
arrow && /*#__PURE__*/ jsx(__rspack_external__radix_ui_react_tooltip_b301f25d.Arrow, {
|
|
123
|
-
asChild: true,
|
|
124
|
-
children: /*#__PURE__*/ jsx("span", {
|
|
125
|
-
"data-tao-tooltip-arrow": "",
|
|
126
|
-
className: cx(classNames?.arrow),
|
|
127
|
-
style: {
|
|
128
|
-
...color ? {
|
|
129
|
-
'--tao-tooltip-arrow-bg': color
|
|
130
|
-
} : void 0,
|
|
131
|
-
...styles?.arrow
|
|
132
|
-
}
|
|
133
|
-
})
|
|
134
|
-
})
|
|
135
|
-
]
|
|
175
|
+
...hoverProps,
|
|
176
|
+
children: [
|
|
177
|
+
title,
|
|
178
|
+
arrow && /*#__PURE__*/ jsx(__rspack_external__radix_ui_react_tooltip_b301f25d.Arrow, {
|
|
179
|
+
asChild: true,
|
|
180
|
+
children: /*#__PURE__*/ jsx("span", {
|
|
181
|
+
"data-tao-tooltip-arrow": "",
|
|
182
|
+
className: cx(classNames?.arrow),
|
|
183
|
+
style: {
|
|
184
|
+
...color ? {
|
|
185
|
+
"--tao-tooltip-arrow-bg": color
|
|
186
|
+
} : void 0,
|
|
187
|
+
...styles?.arrow
|
|
188
|
+
}
|
|
189
|
+
})
|
|
136
190
|
})
|
|
137
|
-
|
|
191
|
+
]
|
|
138
192
|
})
|
|
193
|
+
})
|
|
194
|
+
});
|
|
195
|
+
$[30] = arrow;
|
|
196
|
+
$[31] = className;
|
|
197
|
+
$[32] = classNames?.arrow;
|
|
198
|
+
$[33] = classNames?.content;
|
|
199
|
+
$[34] = color;
|
|
200
|
+
$[35] = colorStyle;
|
|
201
|
+
$[36] = direction;
|
|
202
|
+
$[37] = hasTitle;
|
|
203
|
+
$[38] = hoverProps;
|
|
204
|
+
$[39] = placement;
|
|
205
|
+
$[40] = style;
|
|
206
|
+
$[41] = styles?.arrow;
|
|
207
|
+
$[42] = styles?.content;
|
|
208
|
+
$[43] = title;
|
|
209
|
+
$[44] = t18;
|
|
210
|
+
} else t18 = $[44];
|
|
211
|
+
let t19;
|
|
212
|
+
if ($[45] !== handleOpenChange || $[46] !== realOpen || $[47] !== t17 || $[48] !== t18) {
|
|
213
|
+
t19 = /*#__PURE__*/ jsxs(__rspack_external__radix_ui_react_tooltip_b301f25d.Root, {
|
|
214
|
+
open: realOpen,
|
|
215
|
+
onOpenChange: handleOpenChange,
|
|
216
|
+
children: [
|
|
217
|
+
t17,
|
|
218
|
+
t18
|
|
139
219
|
]
|
|
140
|
-
})
|
|
141
|
-
|
|
220
|
+
});
|
|
221
|
+
$[45] = handleOpenChange;
|
|
222
|
+
$[46] = realOpen;
|
|
223
|
+
$[47] = t17;
|
|
224
|
+
$[48] = t18;
|
|
225
|
+
$[49] = t19;
|
|
226
|
+
} else t19 = $[49];
|
|
227
|
+
let t20;
|
|
228
|
+
if ($[50] !== t14 || $[51] !== t19) {
|
|
229
|
+
t20 = /*#__PURE__*/ jsx(__rspack_external__radix_ui_react_tooltip_b301f25d.Provider, {
|
|
230
|
+
delayDuration: t14,
|
|
231
|
+
children: t19
|
|
232
|
+
});
|
|
233
|
+
$[50] = t14;
|
|
234
|
+
$[51] = t19;
|
|
235
|
+
$[52] = t20;
|
|
236
|
+
} else t20 = $[52];
|
|
237
|
+
return t20;
|
|
142
238
|
}
|
|
143
239
|
export { Tooltip };
|
|
@@ -108,7 +108,7 @@ function TreeGlyph(t0) {
|
|
|
108
108
|
}
|
|
109
109
|
const TreeBase = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
110
110
|
const config = useTaoConfig();
|
|
111
|
-
const { prefixCls = 'tao-tree', className, rootClassName, rootStyle, classNames, styles, showLine = false, showIcon = false, checkable = false, selectable = true, blockNode = false, disabled = config.disabled, switcherIcon, switcherLoadingIcon, draggable, filterAntTreeNode, filterTreeNode = filterAntTreeNode, itemHeight = 32, dropIndicatorRender, direction: directionProp, onKeyDown, ...rest } = props;
|
|
111
|
+
const { prefixCls = 'tao-tree', className, rootClassName, rootStyle, classNames, styles, showLine = false, showIcon = false, checkable = false, selectable = true, blockNode = false, disabled = config.disabled, switcherIcon, switcherLoadingIcon, draggable, filterAntTreeNode, filterTreeNode = filterAntTreeNode, itemHeight = 32, dropIndicatorRender, direction: directionProp, onKeyDown, onSelect, onCheck, onExpand, onLoad, ...rest } = props;
|
|
112
112
|
const [direction, directionRef] = useTaoDirection(directionProp);
|
|
113
113
|
const mergedProps = {
|
|
114
114
|
...props,
|
|
@@ -202,6 +202,30 @@ const TreeBase = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
|
202
202
|
prefixCls: prefixCls,
|
|
203
203
|
direction: direction,
|
|
204
204
|
onKeyDown: (event)=>onKeyDown?.(originalTreeKeyboardEvent(event)),
|
|
205
|
+
onSelect: onSelect && ((keys, info)=>onSelect([
|
|
206
|
+
...keys
|
|
207
|
+
], info)),
|
|
208
|
+
onCheck: onCheck && ((keys_0, info_0)=>onCheck(Array.isArray(keys_0) ? [
|
|
209
|
+
...keys_0
|
|
210
|
+
] : {
|
|
211
|
+
checked: [
|
|
212
|
+
...keys_0.checked
|
|
213
|
+
],
|
|
214
|
+
halfChecked: [
|
|
215
|
+
...keys_0.halfChecked
|
|
216
|
+
]
|
|
217
|
+
}, info_0.halfCheckedKeys ? {
|
|
218
|
+
...info_0,
|
|
219
|
+
halfCheckedKeys: [
|
|
220
|
+
...info_0.halfCheckedKeys
|
|
221
|
+
]
|
|
222
|
+
} : info_0)),
|
|
223
|
+
onExpand: onExpand && ((keys_1, info_1)=>onExpand([
|
|
224
|
+
...keys_1
|
|
225
|
+
], info_1)),
|
|
226
|
+
onLoad: onLoad && ((keys_2, info_2)=>onLoad([
|
|
227
|
+
...keys_2
|
|
228
|
+
], info_2)),
|
|
205
229
|
showLine: Boolean(showLine),
|
|
206
230
|
showIcon: showIcon,
|
|
207
231
|
disabled: disabled,
|
|
@@ -337,7 +361,9 @@ const DirectoryTreeBase = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
|
337
361
|
}
|
|
338
362
|
lastRequestedSelection.current = selection;
|
|
339
363
|
if (void 0 === props.selectedKeys) setSelected(selection);
|
|
340
|
-
props.onSelect?.(
|
|
364
|
+
props.onSelect?.([
|
|
365
|
+
...selection
|
|
366
|
+
], {
|
|
341
367
|
...info,
|
|
342
368
|
selected: selection.includes(key_0),
|
|
343
369
|
selectedNodes: ordered.filter((item)=>selection.includes(item.key)).map(_temp4)
|
|
@@ -354,7 +380,9 @@ const DirectoryTreeBase = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
|
354
380
|
if ($[24] !== props) {
|
|
355
381
|
t10 = (keys_0, info_0)=>{
|
|
356
382
|
if (void 0 === props.expandedKeys) setExpanded(keys_0);
|
|
357
|
-
props.onExpand?.(
|
|
383
|
+
props.onExpand?.([
|
|
384
|
+
...keys_0
|
|
385
|
+
], info_0);
|
|
358
386
|
};
|
|
359
387
|
$[24] = props;
|
|
360
388
|
$[25] = t10;
|
|
@@ -63,6 +63,7 @@ function InternalTreeSelect(props, ref) {
|
|
|
63
63
|
"data-tao-error": 'error' === status || void 0,
|
|
64
64
|
"data-tao-warning": 'warning' === status || void 0,
|
|
65
65
|
disabled: disabled,
|
|
66
|
+
"aria-invalid": 'error' === status ? true : props['aria-invalid'],
|
|
66
67
|
onInputKeyDown: (event)=>{
|
|
67
68
|
props.onInputKeyDown?.(event);
|
|
68
69
|
if ('Enter' === event.key && (event.nativeEvent.isComposing || 229 === event.keyCode)) event.stopPropagation();
|
|
@@ -76,7 +77,7 @@ function InternalTreeSelect(props, ref) {
|
|
|
76
77
|
classNames: classes,
|
|
77
78
|
styles: semanticStyles,
|
|
78
79
|
multiple: !!(treeCheckable || multiple),
|
|
79
|
-
treeCheckable: treeCheckable ? /*#__PURE__*/ jsx(TreeCheck, {}) : false,
|
|
80
|
+
treeCheckable: treeCheckable || props.treeCheckStrictly ? /*#__PURE__*/ jsx(TreeCheck, {}) : false,
|
|
80
81
|
treeLine: !!treeLine,
|
|
81
82
|
treeIcon: treeIcon,
|
|
82
83
|
showTreeIcon: !!treeIcon,
|