@rockshin/tao-ui 0.0.57 → 0.0.59
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 +112 -47
- package/dist/components/auto-complete/auto-complete.js +9 -2
- package/dist/components/avatar/avatar.js +1 -1
- package/dist/components/badge/badge.js +2 -2
- package/dist/components/breadcrumb/breadcrumb.js +5 -1
- package/dist/components/calendar/calendar.js +24 -17
- package/dist/components/carousel/carousel.js +35 -16
- package/dist/components/cascader/cascader.js +17 -12
- package/dist/components/checkbox/checkbox.d.ts +3 -1
- package/dist/components/checkbox/checkbox.js +65 -58
- package/dist/components/collapse/collapse-panels.js +68 -67
- package/dist/components/color-picker/color-picker.js +383 -360
- 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 +89 -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-localization.js +12 -14
- package/dist/components/date-picker/date-picker.css +9 -0
- package/dist/components/date-picker/date-picker.js +22 -13
- package/dist/components/date-picker/range-picker.d.ts +2 -0
- package/dist/components/date-picker/range-picker.js +127 -70
- package/dist/components/date-picker/types.js +1 -1
- package/dist/components/divider/divider.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.js +11 -9
- package/dist/components/float-button/float-button.js +11 -9
- package/dist/components/form/form-item.d.ts +1 -1
- package/dist/components/form/form-item.js +160 -120
- 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/image/image.js +135 -143
- package/dist/components/input/input-shared.js +3 -2
- package/dist/components/input/otp.js +120 -110
- package/dist/components/input/password.js +55 -61
- package/dist/components/input/search.js +13 -7
- package/dist/components/list/list.js +106 -105
- package/dist/components/masonry/masonry.js +1 -1
- package/dist/components/mentions/mentions.js +1 -0
- package/dist/components/menu/menu-render.js +1 -0
- package/dist/components/modal/confirm-dialog.js +11 -4
- package/dist/components/modal/modal.js +320 -315
- package/dist/components/pagination/pagination.d.ts +3 -0
- package/dist/components/pagination/pagination.js +5 -0
- package/dist/components/popover/popover.js +325 -289
- 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/rate/rate.js +83 -72
- package/dist/components/scroll-area/scroll-area.css +1 -1
- package/dist/components/scroll-area/scroll-area.js +294 -222
- package/dist/components/select/mobile-select.js +6 -3
- package/dist/components/select/select-model.js +2 -2
- package/dist/components/select/select.js +78 -39
- package/dist/components/select/use-select-selection.d.ts +1 -1
- package/dist/components/select/use-select-selection.js +91 -84
- 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 +84 -78
- package/dist/components/steps/steps.js +1 -1
- package/dist/components/switch/switch.js +45 -39
- package/dist/components/table/table.js +5 -1
- package/dist/components/table/use-table-data.js +2 -2
- package/dist/components/time-picker/time-picker.js +31 -1
- package/dist/components/tooltip/tooltip.js +237 -99
- package/dist/components/tree/tree.js +31 -3
- package/dist/components/tree-select/tree-select.js +1 -1
- package/dist/components/upload/upload.js +69 -42
- 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/cursor.js +20 -8
- package/dist/number-input/format.js +13 -5
- package/dist/number-input/use-number-input.js +166 -318
- 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 +49 -49
- 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
|
@@ -5,7 +5,7 @@ import { useTaoConfig } from "../../provider/tao-provider.js";
|
|
|
5
5
|
import { cx } from "../../utils/semantic.js";
|
|
6
6
|
import "./switch.css";
|
|
7
7
|
const switch_Switch = /*#__PURE__*/ forwardRef(function(props, ref) {
|
|
8
|
-
const $ = c(
|
|
8
|
+
const $ = c(52);
|
|
9
9
|
let ariaProps;
|
|
10
10
|
let checked;
|
|
11
11
|
let checkedChildren;
|
|
@@ -115,40 +115,46 @@ const switch_Switch = /*#__PURE__*/ forwardRef(function(props, ref) {
|
|
|
115
115
|
$[28] = t9;
|
|
116
116
|
$[29] = t10;
|
|
117
117
|
} else t10 = $[29];
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
118
|
+
const t11 = !resolvedChecked || void 0;
|
|
119
|
+
let t12;
|
|
120
|
+
if ($[30] !== checkedChildren || $[31] !== t11) {
|
|
121
|
+
t12 = /*#__PURE__*/ jsx("span", {
|
|
121
122
|
"data-tao-switch-inner-checked": "",
|
|
123
|
+
"aria-hidden": t11,
|
|
122
124
|
children: checkedChildren
|
|
123
125
|
});
|
|
124
126
|
$[30] = checkedChildren;
|
|
125
127
|
$[31] = t11;
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
128
|
+
$[32] = t12;
|
|
129
|
+
} else t12 = $[32];
|
|
130
|
+
const t13 = resolvedChecked || void 0;
|
|
131
|
+
let t14;
|
|
132
|
+
if ($[33] !== t13 || $[34] !== unCheckedChildren) {
|
|
133
|
+
t14 = /*#__PURE__*/ jsx("span", {
|
|
130
134
|
"data-tao-switch-inner-unchecked": "",
|
|
135
|
+
"aria-hidden": t13,
|
|
131
136
|
children: unCheckedChildren
|
|
132
137
|
});
|
|
133
|
-
$[
|
|
134
|
-
$[
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
138
|
+
$[33] = t13;
|
|
139
|
+
$[34] = unCheckedChildren;
|
|
140
|
+
$[35] = t14;
|
|
141
|
+
} else t14 = $[35];
|
|
142
|
+
let t15;
|
|
143
|
+
if ($[36] !== t12 || $[37] !== t14) {
|
|
144
|
+
t15 = /*#__PURE__*/ jsxs("span", {
|
|
139
145
|
"data-tao-switch-inner": "",
|
|
140
146
|
children: [
|
|
141
|
-
|
|
142
|
-
|
|
147
|
+
t12,
|
|
148
|
+
t14
|
|
143
149
|
]
|
|
144
150
|
});
|
|
145
|
-
$[
|
|
146
|
-
$[
|
|
147
|
-
$[
|
|
148
|
-
} else
|
|
149
|
-
let
|
|
150
|
-
if ($[
|
|
151
|
-
|
|
151
|
+
$[36] = t12;
|
|
152
|
+
$[37] = t14;
|
|
153
|
+
$[38] = t15;
|
|
154
|
+
} else t15 = $[38];
|
|
155
|
+
let t16;
|
|
156
|
+
if ($[39] !== ariaProps || $[40] !== handleChange || $[41] !== isDisabled || $[42] !== ref || $[43] !== resolvedChecked || $[44] !== resolvedSize || $[45] !== t1 || $[46] !== t10 || $[47] !== t15 || $[48] !== t3 || $[49] !== t5 || $[50] !== t6) {
|
|
157
|
+
t16 = /*#__PURE__*/ jsxs("button", {
|
|
152
158
|
...ariaProps,
|
|
153
159
|
"aria-busy": t1,
|
|
154
160
|
ref: ref,
|
|
@@ -164,24 +170,24 @@ const switch_Switch = /*#__PURE__*/ forwardRef(function(props, ref) {
|
|
|
164
170
|
onClick: handleChange,
|
|
165
171
|
children: [
|
|
166
172
|
t10,
|
|
167
|
-
|
|
173
|
+
t15
|
|
168
174
|
]
|
|
169
175
|
});
|
|
170
|
-
$[
|
|
171
|
-
$[
|
|
172
|
-
$[
|
|
173
|
-
$[
|
|
174
|
-
$[
|
|
175
|
-
$[
|
|
176
|
-
$[
|
|
177
|
-
$[
|
|
178
|
-
$[
|
|
179
|
-
$[
|
|
180
|
-
$[
|
|
181
|
-
$[
|
|
182
|
-
$[
|
|
183
|
-
} else
|
|
184
|
-
return
|
|
176
|
+
$[39] = ariaProps;
|
|
177
|
+
$[40] = handleChange;
|
|
178
|
+
$[41] = isDisabled;
|
|
179
|
+
$[42] = ref;
|
|
180
|
+
$[43] = resolvedChecked;
|
|
181
|
+
$[44] = resolvedSize;
|
|
182
|
+
$[45] = t1;
|
|
183
|
+
$[46] = t10;
|
|
184
|
+
$[47] = t15;
|
|
185
|
+
$[48] = t3;
|
|
186
|
+
$[49] = t5;
|
|
187
|
+
$[50] = t6;
|
|
188
|
+
$[51] = t16;
|
|
189
|
+
} else t16 = $[51];
|
|
190
|
+
return t16;
|
|
185
191
|
});
|
|
186
192
|
function LoadingIcon() {
|
|
187
193
|
const $ = c(1);
|
|
@@ -143,7 +143,9 @@ function Table({ columns: columnsProp, dataSource, rowKey, loading = false, pagi
|
|
|
143
143
|
] : expandedKeys.filter((k_0)=>k_0 !== key_1);
|
|
144
144
|
if (!isExpansionControlled) setInternalExpandedKeys(nextKeys_1);
|
|
145
145
|
expandable?.onExpand?.(expanded, record_2);
|
|
146
|
-
expandable?.onExpandedRowsChange?.(
|
|
146
|
+
expandable?.onExpandedRowsChange?.([
|
|
147
|
+
...nextKeys_1
|
|
148
|
+
]);
|
|
147
149
|
};
|
|
148
150
|
const scrollRef = useRef(null);
|
|
149
151
|
const headerRowRef = useRef(null);
|
|
@@ -416,6 +418,7 @@ function Table({ columns: columnsProp, dataSource, rowKey, loading = false, pagi
|
|
|
416
418
|
"data-tao-table-row": "",
|
|
417
419
|
"data-tao-selected": isSelected || void 0,
|
|
418
420
|
onClick: (event)=>{
|
|
421
|
+
if (!event.currentTarget.contains(event.target)) return;
|
|
419
422
|
const selectionCell = event.target.closest('[data-tao-table-selection-cell]');
|
|
420
423
|
if (selectionCell && event.target !== selectionCell) return void event.stopPropagation();
|
|
421
424
|
rowProps.onClick?.(event);
|
|
@@ -470,6 +473,7 @@ function Table({ columns: columnsProp, dataSource, rowKey, loading = false, pagi
|
|
|
470
473
|
const stickyPos_0 = stickyPositions[colIdx];
|
|
471
474
|
const isFixed_0 = !!col_5.fixed && !!scroll?.x;
|
|
472
475
|
const cellProps = col_5.onCell?.(record_3, rowIdx) ?? {};
|
|
476
|
+
if (0 === cellProps.colSpan || 0 === cellProps.rowSpan) return null;
|
|
473
477
|
return /*#__PURE__*/ createElement("td", {
|
|
474
478
|
...cellProps,
|
|
475
479
|
key: colKey_0,
|
|
@@ -126,7 +126,7 @@ function useTableData(t0) {
|
|
|
126
126
|
const currentPage = paginationConfig?.current ?? internalPage;
|
|
127
127
|
let t7;
|
|
128
128
|
bb0: {
|
|
129
|
-
if (false === paginationProp ||
|
|
129
|
+
if (false === paginationProp || processedData.length < total) {
|
|
130
130
|
t7 = processedData;
|
|
131
131
|
break bb0;
|
|
132
132
|
}
|
|
@@ -152,7 +152,7 @@ function useTableData(t0) {
|
|
|
152
152
|
if (!column_7.filters) continue;
|
|
153
153
|
const values_2 = Object.hasOwn(nextFilters, key_0) ? nextFilters[key_0] : void 0;
|
|
154
154
|
filterEntries.push([
|
|
155
|
-
|
|
155
|
+
key_0,
|
|
156
156
|
values_2?.length ? [
|
|
157
157
|
...values_2
|
|
158
158
|
] : null
|
|
@@ -3,7 +3,7 @@ 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
7
|
import { TaoPortalScope, useTaoConfig, useTaoDirection, useTaoInternalConfig } from "../../provider/tao-provider.js";
|
|
8
8
|
import { mergeRefs } from "../../utils/refs.js";
|
|
9
9
|
import { normalizeDigits, resolveNumberFormat } from "../../number-input/locale.js";
|
|
@@ -11,6 +11,32 @@ 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;
|
|
@@ -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",
|
|
@@ -351,6 +379,7 @@ const TimeRangePicker = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
|
351
379
|
props
|
|
352
380
|
}) : props.styles;
|
|
353
381
|
const appearance = useAppearance(props, names, semanticStyles);
|
|
382
|
+
const popupState = usePopupState(props.open, props.onOpenChange);
|
|
354
383
|
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
384
|
const clear = false === allowClear ? false : {
|
|
356
385
|
clearIcon: /*#__PURE__*/ jsx(TimeIcon, {
|
|
@@ -376,6 +405,7 @@ const TimeRangePicker = /*#__PURE__*/ forwardRef((props, ref)=>{
|
|
|
376
405
|
},
|
|
377
406
|
children: /*#__PURE__*/ jsx(RangePicker, {
|
|
378
407
|
...rest,
|
|
408
|
+
...popupState,
|
|
379
409
|
ref: pickerRef,
|
|
380
410
|
direction: direction,
|
|
381
411
|
picker: "time",
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { c } from "react-compiler-runtime";
|
|
3
|
-
import {
|
|
3
|
+
import { useEffect, useRef } from "react";
|
|
4
4
|
import { TaoPortalScope, useTaoDirection } from "../../provider/tao-provider.js";
|
|
5
5
|
import { asTriggerChild, useControlledOpen } 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";
|
|
@@ -30,114 +31,251 @@ function Tooltip(props) {
|
|
|
30
31
|
} else t0 = $[3];
|
|
31
32
|
return t0;
|
|
32
33
|
}
|
|
33
|
-
function ActiveTooltip(
|
|
34
|
-
const
|
|
35
|
-
const
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
const
|
|
41
|
-
|
|
34
|
+
function ActiveTooltip(t0) {
|
|
35
|
+
const $ = c(58);
|
|
36
|
+
const { direction: directionProp, title, placement: t1, arrow: t2, open, defaultOpen, onOpenChange, mouseEnterDelay: t3, mouseLeaveDelay: t4, color, className, style, classNames, styles, children } = t0;
|
|
37
|
+
const placement = void 0 === t1 ? "top" : t1;
|
|
38
|
+
const arrow = void 0 === t2 ? true : t2;
|
|
39
|
+
const mouseEnterDelay = void 0 === t3 ? 0.1 : t3;
|
|
40
|
+
const mouseLeaveDelay = void 0 === t4 ? 0.1 : t4;
|
|
41
|
+
const [direction, directionRef] = useTaoDirection(directionProp, "self");
|
|
42
|
+
let t5;
|
|
43
|
+
if ($[0] !== defaultOpen || $[1] !== onOpenChange || $[2] !== open) {
|
|
44
|
+
t5 = {
|
|
45
|
+
open,
|
|
46
|
+
defaultOpen,
|
|
47
|
+
onOpenChange
|
|
48
|
+
};
|
|
49
|
+
$[0] = defaultOpen;
|
|
50
|
+
$[1] = onOpenChange;
|
|
51
|
+
$[2] = open;
|
|
52
|
+
$[3] = t5;
|
|
53
|
+
} else t5 = $[3];
|
|
54
|
+
const [realOpen, setOpen] = useControlledOpen(t5);
|
|
55
|
+
const latestSetOpen = useCommittedRef(setOpen);
|
|
42
56
|
const closeTimer = useRef(void 0);
|
|
43
57
|
const pointerDriven = useRef(false);
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
58
|
+
let t6;
|
|
59
|
+
let t7;
|
|
60
|
+
if ($[4] !== realOpen) {
|
|
61
|
+
t6 = ()=>{
|
|
62
|
+
if (!realOpen) return;
|
|
63
|
+
return ()=>{
|
|
64
|
+
clearTimeout(closeTimer.current);
|
|
65
|
+
pointerDriven.current = false;
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
t7 = [
|
|
69
|
+
realOpen
|
|
70
|
+
];
|
|
71
|
+
$[4] = realOpen;
|
|
72
|
+
$[5] = t6;
|
|
73
|
+
$[6] = t7;
|
|
74
|
+
} else {
|
|
75
|
+
t6 = $[5];
|
|
76
|
+
t7 = $[6];
|
|
77
|
+
}
|
|
78
|
+
useEffect(t6, t7);
|
|
79
|
+
let t8;
|
|
80
|
+
if ($[7] !== latestSetOpen || $[8] !== mouseLeaveDelay || $[9] !== setOpen) {
|
|
81
|
+
t8 = ()=>{
|
|
47
82
|
clearTimeout(closeTimer.current);
|
|
48
|
-
|
|
83
|
+
if (mouseLeaveDelay <= 0) return void setOpen(false);
|
|
84
|
+
closeTimer.current = setTimeout(()=>{
|
|
85
|
+
pointerDriven.current = false;
|
|
86
|
+
latestSetOpen.current(false);
|
|
87
|
+
}, 1000 * mouseLeaveDelay);
|
|
49
88
|
};
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
89
|
+
$[7] = latestSetOpen;
|
|
90
|
+
$[8] = mouseLeaveDelay;
|
|
91
|
+
$[9] = setOpen;
|
|
92
|
+
$[10] = t8;
|
|
93
|
+
} else t8 = $[10];
|
|
94
|
+
const schedulePointerClose = t8;
|
|
95
|
+
let t9;
|
|
96
|
+
if ($[11] !== schedulePointerClose || $[12] !== setOpen) {
|
|
97
|
+
t9 = (next)=>{
|
|
98
|
+
if (!next && pointerDriven.current) return void schedulePointerClose();
|
|
99
|
+
clearTimeout(closeTimer.current);
|
|
57
100
|
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;
|
|
101
|
+
setOpen(next);
|
|
102
|
+
};
|
|
103
|
+
$[11] = schedulePointerClose;
|
|
104
|
+
$[12] = setOpen;
|
|
105
|
+
$[13] = t9;
|
|
106
|
+
} else t9 = $[13];
|
|
107
|
+
const handleOpenChange = t9;
|
|
108
|
+
let t10;
|
|
109
|
+
if ($[14] === Symbol.for("react.memo_cache_sentinel")) {
|
|
110
|
+
t10 = (event)=>{
|
|
111
|
+
if ("touch" === event.pointerType) return;
|
|
76
112
|
pointerDriven.current = false;
|
|
77
113
|
clearTimeout(closeTimer.current);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
114
|
+
};
|
|
115
|
+
$[14] = t10;
|
|
116
|
+
} else t10 = $[14];
|
|
117
|
+
let t11;
|
|
118
|
+
if ($[15] !== realOpen || $[16] !== schedulePointerClose) {
|
|
119
|
+
t11 = {
|
|
120
|
+
onPointerEnter: t10,
|
|
121
|
+
onPointerLeave: (event_0)=>{
|
|
122
|
+
if (!realOpen || "touch" === event_0.pointerType) return;
|
|
123
|
+
pointerDriven.current = true;
|
|
124
|
+
schedulePointerClose();
|
|
125
|
+
}
|
|
126
|
+
};
|
|
127
|
+
$[15] = realOpen;
|
|
128
|
+
$[16] = schedulePointerClose;
|
|
129
|
+
$[17] = t11;
|
|
130
|
+
} else t11 = $[17];
|
|
131
|
+
const hoverProps = t11;
|
|
132
|
+
let t12;
|
|
133
|
+
if ($[18] !== color) {
|
|
134
|
+
t12 = color ? {
|
|
135
|
+
background: color
|
|
136
|
+
} : void 0;
|
|
137
|
+
$[18] = color;
|
|
138
|
+
$[19] = t12;
|
|
139
|
+
} else t12 = $[19];
|
|
140
|
+
const colorStyle = t12;
|
|
141
|
+
const t13 = 1000 * mouseEnterDelay;
|
|
142
|
+
let t14;
|
|
143
|
+
if ($[20] === Symbol.for("react.memo_cache_sentinel")) {
|
|
144
|
+
t14 = ()=>{
|
|
145
|
+
pointerDriven.current = false;
|
|
146
|
+
};
|
|
147
|
+
$[20] = t14;
|
|
148
|
+
} else t14 = $[20];
|
|
149
|
+
let t15;
|
|
150
|
+
if ($[21] !== children) {
|
|
151
|
+
t15 = asTriggerChild(children);
|
|
152
|
+
$[21] = children;
|
|
153
|
+
$[22] = t15;
|
|
154
|
+
} else t15 = $[22];
|
|
155
|
+
let t16;
|
|
156
|
+
if ($[23] !== directionRef || $[24] !== hoverProps || $[25] !== t15) {
|
|
157
|
+
t16 = /*#__PURE__*/ jsx(__rspack_external__radix_ui_react_tooltip_b301f25d.Trigger, {
|
|
158
|
+
ref: directionRef,
|
|
159
|
+
asChild: true,
|
|
160
|
+
...hoverProps,
|
|
161
|
+
onBlur: t14,
|
|
162
|
+
children: t15
|
|
163
|
+
});
|
|
164
|
+
$[23] = directionRef;
|
|
165
|
+
$[24] = hoverProps;
|
|
166
|
+
$[25] = t15;
|
|
167
|
+
$[26] = t16;
|
|
168
|
+
} else t16 = $[26];
|
|
169
|
+
const t17 = classNames?.content;
|
|
170
|
+
let t18;
|
|
171
|
+
if ($[27] !== className || $[28] !== t17) {
|
|
172
|
+
t18 = cx(t17, className);
|
|
173
|
+
$[27] = className;
|
|
174
|
+
$[28] = t17;
|
|
175
|
+
$[29] = t18;
|
|
176
|
+
} else t18 = $[29];
|
|
177
|
+
const t19 = styles?.content;
|
|
178
|
+
let t20;
|
|
179
|
+
if ($[30] !== colorStyle || $[31] !== style || $[32] !== t19) {
|
|
180
|
+
t20 = {
|
|
181
|
+
...colorStyle,
|
|
182
|
+
...t19,
|
|
183
|
+
...style
|
|
184
|
+
};
|
|
185
|
+
$[30] = colorStyle;
|
|
186
|
+
$[31] = style;
|
|
187
|
+
$[32] = t19;
|
|
188
|
+
$[33] = t20;
|
|
189
|
+
} else t20 = $[33];
|
|
190
|
+
let t21;
|
|
191
|
+
if ($[34] === Symbol.for("react.memo_cache_sentinel")) {
|
|
192
|
+
t21 = ()=>{
|
|
193
|
+
pointerDriven.current = false;
|
|
194
|
+
};
|
|
195
|
+
$[34] = t21;
|
|
196
|
+
} else t21 = $[34];
|
|
197
|
+
let t22;
|
|
198
|
+
if ($[35] !== arrow || $[36] !== classNames?.arrow || $[37] !== color || $[38] !== styles?.arrow) {
|
|
199
|
+
t22 = arrow && /*#__PURE__*/ jsx(__rspack_external__radix_ui_react_tooltip_b301f25d.Arrow, {
|
|
200
|
+
asChild: true,
|
|
201
|
+
children: /*#__PURE__*/ jsx("span", {
|
|
202
|
+
"data-tao-tooltip-arrow": "",
|
|
203
|
+
className: cx(classNames?.arrow),
|
|
204
|
+
style: {
|
|
205
|
+
...color ? {
|
|
206
|
+
"--tao-tooltip-arrow-bg": color
|
|
207
|
+
} : void 0,
|
|
208
|
+
...styles?.arrow
|
|
209
|
+
}
|
|
210
|
+
})
|
|
211
|
+
});
|
|
212
|
+
$[35] = arrow;
|
|
213
|
+
$[36] = classNames?.arrow;
|
|
214
|
+
$[37] = color;
|
|
215
|
+
$[38] = styles?.arrow;
|
|
216
|
+
$[39] = t22;
|
|
217
|
+
} else t22 = $[39];
|
|
218
|
+
let t23;
|
|
219
|
+
if ($[40] !== hoverProps || $[41] !== placement || $[42] !== t18 || $[43] !== t20 || $[44] !== t22 || $[45] !== title) {
|
|
220
|
+
t23 = /*#__PURE__*/ jsxs(__rspack_external__radix_ui_react_tooltip_b301f25d.Content, {
|
|
221
|
+
"data-tao-tooltip-content": "",
|
|
222
|
+
className: t18,
|
|
223
|
+
style: t20,
|
|
224
|
+
side: placement,
|
|
225
|
+
sideOffset: 4,
|
|
226
|
+
onEscapeKeyDown: t21,
|
|
227
|
+
...hoverProps,
|
|
228
|
+
children: [
|
|
229
|
+
title,
|
|
230
|
+
t22
|
|
231
|
+
]
|
|
232
|
+
});
|
|
233
|
+
$[40] = hoverProps;
|
|
234
|
+
$[41] = placement;
|
|
235
|
+
$[42] = t18;
|
|
236
|
+
$[43] = t20;
|
|
237
|
+
$[44] = t22;
|
|
238
|
+
$[45] = title;
|
|
239
|
+
$[46] = t23;
|
|
240
|
+
} else t23 = $[46];
|
|
241
|
+
let t24;
|
|
242
|
+
if ($[47] !== direction || $[48] !== t23) {
|
|
243
|
+
t24 = /*#__PURE__*/ jsx(__rspack_external__radix_ui_react_tooltip_b301f25d.Portal, {
|
|
244
|
+
children: /*#__PURE__*/ jsx(TaoPortalScope, {
|
|
245
|
+
direction: direction,
|
|
246
|
+
children: t23
|
|
247
|
+
})
|
|
248
|
+
});
|
|
249
|
+
$[47] = direction;
|
|
250
|
+
$[48] = t23;
|
|
251
|
+
$[49] = t24;
|
|
252
|
+
} else t24 = $[49];
|
|
253
|
+
let t25;
|
|
254
|
+
if ($[50] !== handleOpenChange || $[51] !== realOpen || $[52] !== t16 || $[53] !== t24) {
|
|
255
|
+
t25 = /*#__PURE__*/ jsxs(__rspack_external__radix_ui_react_tooltip_b301f25d.Root, {
|
|
91
256
|
open: realOpen,
|
|
92
257
|
onOpenChange: handleOpenChange,
|
|
93
258
|
children: [
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
asChild: true,
|
|
97
|
-
...hoverProps,
|
|
98
|
-
onBlur: ()=>{
|
|
99
|
-
pointerDriven.current = false;
|
|
100
|
-
},
|
|
101
|
-
children: asTriggerChild(children)
|
|
102
|
-
}),
|
|
103
|
-
/*#__PURE__*/ jsx(__rspack_external__radix_ui_react_tooltip_b301f25d.Portal, {
|
|
104
|
-
children: /*#__PURE__*/ jsx(TaoPortalScope, {
|
|
105
|
-
direction: direction,
|
|
106
|
-
children: /*#__PURE__*/ jsxs(__rspack_external__radix_ui_react_tooltip_b301f25d.Content, {
|
|
107
|
-
"data-tao-tooltip-content": "",
|
|
108
|
-
className: cx(classNames?.content, className),
|
|
109
|
-
style: {
|
|
110
|
-
...colorStyle,
|
|
111
|
-
...styles?.content,
|
|
112
|
-
...style
|
|
113
|
-
},
|
|
114
|
-
side: placement,
|
|
115
|
-
sideOffset: 4,
|
|
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
|
-
]
|
|
136
|
-
})
|
|
137
|
-
})
|
|
138
|
-
})
|
|
259
|
+
t16,
|
|
260
|
+
t24
|
|
139
261
|
]
|
|
140
|
-
})
|
|
141
|
-
|
|
262
|
+
});
|
|
263
|
+
$[50] = handleOpenChange;
|
|
264
|
+
$[51] = realOpen;
|
|
265
|
+
$[52] = t16;
|
|
266
|
+
$[53] = t24;
|
|
267
|
+
$[54] = t25;
|
|
268
|
+
} else t25 = $[54];
|
|
269
|
+
let t26;
|
|
270
|
+
if ($[55] !== t13 || $[56] !== t25) {
|
|
271
|
+
t26 = /*#__PURE__*/ jsx(__rspack_external__radix_ui_react_tooltip_b301f25d.Provider, {
|
|
272
|
+
delayDuration: t13,
|
|
273
|
+
children: t25
|
|
274
|
+
});
|
|
275
|
+
$[55] = t13;
|
|
276
|
+
$[56] = t25;
|
|
277
|
+
$[57] = t26;
|
|
278
|
+
} else t26 = $[57];
|
|
279
|
+
return t26;
|
|
142
280
|
}
|
|
143
281
|
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;
|
|
@@ -76,7 +76,7 @@ function InternalTreeSelect(props, ref) {
|
|
|
76
76
|
classNames: classes,
|
|
77
77
|
styles: semanticStyles,
|
|
78
78
|
multiple: !!(treeCheckable || multiple),
|
|
79
|
-
treeCheckable: treeCheckable ? /*#__PURE__*/ jsx(TreeCheck, {}) : false,
|
|
79
|
+
treeCheckable: treeCheckable || props.treeCheckStrictly ? /*#__PURE__*/ jsx(TreeCheck, {}) : false,
|
|
80
80
|
treeLine: !!treeLine,
|
|
81
81
|
treeIcon: treeIcon,
|
|
82
82
|
showTreeIcon: !!treeIcon,
|