@rockshin/tao-ui 0.0.47 → 0.0.49
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 +20 -16
- package/dist/components/alert/alert.js +114 -99
- package/dist/components/app/app-modals.js +134 -96
- package/dist/components/app/app-notices.js +39 -23
- package/dist/components/auto-complete/auto-complete.js +21 -7
- package/dist/components/avatar/avatar.js +31 -11
- package/dist/components/badge/badge.css +1 -1
- package/dist/components/badge/badge.js +72 -257
- package/dist/components/border-beam/border-beam.js +21 -17
- package/dist/components/breadcrumb/breadcrumb.js +178 -159
- package/dist/components/button/button.js +61 -53
- package/dist/components/calendar/calendar.js +6 -4
- package/dist/components/card/card.js +24 -8
- package/dist/components/carousel/carousel.d.ts +1 -1
- package/dist/components/carousel/carousel.js +105 -68
- package/dist/components/cascader/cascader.js +54 -19
- package/dist/components/checkbox/checkbox.css +13 -2
- package/dist/components/checkbox/checkbox.d.ts +2 -0
- package/dist/components/checkbox/checkbox.js +320 -229
- package/dist/components/collapse/collapse-panels.d.ts +1 -1
- package/dist/components/collapse/collapse-panels.js +122 -113
- package/dist/components/collapse/collapse.js +98 -63
- package/dist/components/color-picker/color-picker.js +539 -441
- package/dist/components/color-picker/color.js +1 -1
- package/dist/components/context-menu/context-menu.d.ts +1 -1
- package/dist/components/context-menu/context-menu.js +108 -68
- package/dist/components/date-picker/calendar/calendar-grid.js +42 -39
- package/dist/components/date-picker/calendar/month-grid.d.ts +8 -1
- package/dist/components/date-picker/calendar/month-grid.js +79 -37
- package/dist/components/date-picker/calendar/time-panel.d.ts +2 -1
- package/dist/components/date-picker/calendar/time-panel.js +94 -89
- package/dist/components/date-picker/calendar/year-grid.d.ts +8 -1
- package/dist/components/date-picker/calendar/year-grid.js +66 -35
- package/dist/components/date-picker/date-picker.css +24 -1
- package/dist/components/date-picker/date-picker.js +99 -53
- package/dist/components/date-picker/presets.d.ts +2 -1
- package/dist/components/date-picker/presets.js +27 -24
- package/dist/components/date-picker/range-picker.js +308 -153
- package/dist/components/descriptions/descriptions.js +7 -3
- package/dist/components/divider/divider.css +1 -1
- package/dist/components/divider/divider.js +1 -1
- package/dist/components/drawer/drawer.js +201 -369
- package/dist/components/dropdown/dropdown.d.ts +1 -1
- package/dist/components/dropdown/dropdown.js +183 -279
- package/dist/components/empty/empty.js +57 -78
- package/dist/components/float-button/float-button.d.ts +1 -0
- package/dist/components/float-button/float-button.js +47 -30
- package/dist/components/form/field-control.d.ts +4 -2
- package/dist/components/form/field-control.js +17 -9
- package/dist/components/form/form-context.d.ts +8 -2
- package/dist/components/form/form-context.js +2 -1
- package/dist/components/form/form-item.js +85 -63
- package/dist/components/form/form.css +3 -2
- package/dist/components/form/use-form.d.ts +2 -1
- package/dist/components/form/use-form.js +2 -1
- package/dist/components/form-field/form-field-view.d.ts +3 -1
- package/dist/components/form-field/form-field-view.js +194 -141
- package/dist/components/form-section/form-section.d.ts +1 -1
- package/dist/components/form-section/form-section.js +52 -45
- package/dist/components/image/image.js +585 -477
- package/dist/components/input/base-input.js +8 -9
- package/dist/components/input/input-shared.d.ts +5 -2
- package/dist/components/input/input-shared.js +42 -18
- package/dist/components/input/otp.js +236 -217
- package/dist/components/input/password.js +2 -1
- package/dist/components/input/search.js +8 -7
- package/dist/components/list/list-pagination.js +41 -36
- package/dist/components/list/list.js +141 -125
- package/dist/components/listy/listy.js +175 -106
- package/dist/components/masonry/masonry.js +108 -85
- package/dist/components/mentions/mentions.js +12 -3
- package/dist/components/menu/menu-render.d.ts +9 -3
- package/dist/components/menu/menu-render.js +99 -36
- package/dist/components/modal/confirm-dialog.js +10 -4
- package/dist/components/modal/confirm.js +3 -7
- package/dist/components/modal/index.js +9 -3
- package/dist/components/modal/modal.js +390 -365
- package/dist/components/pagination/pagination.js +105 -96
- package/dist/components/popconfirm/popconfirm.d.ts +1 -1
- package/dist/components/popconfirm/popconfirm.js +219 -168
- package/dist/components/popover/popover.js +330 -243
- package/dist/components/progress/progress.css +2 -2
- package/dist/components/progress/progress.js +232 -458
- package/dist/components/qr-code/qr-code.js +72 -66
- package/dist/components/radio/radio.css +15 -4
- package/dist/components/radio/radio.d.ts +2 -1
- package/dist/components/radio/radio.js +260 -198
- package/dist/components/rate/rate.js +173 -113
- package/dist/components/scroll-area/scroll-area.js +241 -211
- package/dist/components/segmented/segmented.js +73 -41
- package/dist/components/select/mobile-select.d.ts +2 -1
- package/dist/components/select/mobile-select.js +24 -13
- package/dist/components/select/select-searchable-list.d.ts +2 -1
- package/dist/components/select/select-searchable-list.js +2 -3
- package/dist/components/select/select.js +49 -25
- package/dist/components/select/use-select-selection.d.ts +1 -1
- package/dist/components/select/use-select-selection.js +7 -4
- package/dist/components/skeleton/skeleton.js +56 -48
- package/dist/components/slider/slider.js +87 -212
- package/dist/components/sonner/sonner.js +109 -93
- package/dist/components/spinner/spinner.js +147 -138
- package/dist/components/splitter/splitter.js +222 -159
- package/dist/components/statistic/statistic.js +7 -6
- package/dist/components/steps/steps.js +88 -81
- package/dist/components/steps/use-display-steps.js +1 -1
- package/dist/components/switch/switch.js +89 -89
- package/dist/components/table/table-filter.js +66 -56
- package/dist/components/table/table-icons.d.ts +2 -1
- package/dist/components/table/table-icons.js +11 -9
- package/dist/components/table/table-model.js +1 -1
- package/dist/components/table/table.js +107 -83
- package/dist/components/table/use-table-data.d.ts +6 -3
- package/dist/components/table/use-table-data.js +166 -130
- package/dist/components/tabs/tabs.css +1 -1
- package/dist/components/tabs/tabs.js +236 -179
- package/dist/components/tag/tag.d.ts +2 -2
- package/dist/components/tag/tag.js +111 -108
- package/dist/components/textarea/textarea.js +22 -17
- package/dist/components/time-picker/time-picker.js +5 -3
- package/dist/components/timeline/timeline.css +6 -1
- package/dist/components/timeline/timeline.js +21 -11
- package/dist/components/tooltip/tooltip.d.ts +2 -2
- package/dist/components/tooltip/tooltip.js +123 -233
- package/dist/components/tour/tour.css +4 -0
- package/dist/components/tour/tour.js +400 -331
- package/dist/components/transfer/transfer-list.js +29 -11
- package/dist/components/transfer/transfer-parts.js +1 -1
- package/dist/components/transfer/transfer-types.d.ts +1 -0
- package/dist/components/transfer/transfer.js +29 -14
- package/dist/components/tree/tree-keyboard.d.ts +1 -1
- package/dist/components/tree/tree-keyboard.js +5 -3
- package/dist/components/tree/tree.js +74 -59
- package/dist/components/tree-select/select-engine.d.ts +3 -2
- package/dist/components/tree-select/select-engine.js +18 -16
- package/dist/components/tree-select/tree-select.js +21 -5
- package/dist/components/upload/upload.css +8 -0
- package/dist/components/upload/upload.js +160 -72
- package/dist/components/watermark/watermark.js +36 -29
- package/dist/number-input/use-number-input.js +129 -90
- package/dist/number-input/validate.js +32 -5
- package/dist/provider/merge-locale.js +12 -9
- package/dist/provider/tao-provider.d.ts +3 -1
- package/dist/provider/tao-provider.js +123 -86
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { c } from "react-compiler-runtime";
|
|
3
3
|
import * as __rspack_external__radix_ui_react_popover_c8444160 from "@radix-ui/react-popover";
|
|
4
|
-
import { useEffect, useId, useRef } from "react";
|
|
4
|
+
import { forwardRef, useEffect, useId, useRef } from "react";
|
|
5
5
|
import { TaoPortalScope, useTaoDirection } from "../../provider/tao-provider.js";
|
|
6
6
|
import { asTriggerChild, useControlledOpen } from "../../utils/overlay.js";
|
|
7
7
|
import { cx } from "../../utils/semantic.js";
|
|
@@ -60,10 +60,26 @@ function getRenderNode(node) {
|
|
|
60
60
|
return 'function' == typeof node ? node() : node;
|
|
61
61
|
}
|
|
62
62
|
function isRenderable(node) {
|
|
63
|
-
return null != node &&
|
|
63
|
+
return null != node && 'boolean' != typeof node && '' !== node;
|
|
64
64
|
}
|
|
65
|
+
const popover_PopoverSurface = /*#__PURE__*/ forwardRef(function(props, ref) {
|
|
66
|
+
const $ = c(3);
|
|
67
|
+
const retainedHidden = props["data-tao-keep-alive"] && "closed" === props["data-state"];
|
|
68
|
+
const t0 = retainedHidden ? null : ref;
|
|
69
|
+
let t1;
|
|
70
|
+
if ($[0] !== props || $[1] !== t0) {
|
|
71
|
+
t1 = /*#__PURE__*/ jsx("div", {
|
|
72
|
+
...props,
|
|
73
|
+
ref: t0
|
|
74
|
+
});
|
|
75
|
+
$[0] = props;
|
|
76
|
+
$[1] = t0;
|
|
77
|
+
$[2] = t1;
|
|
78
|
+
} else t1 = $[2];
|
|
79
|
+
return t1;
|
|
80
|
+
});
|
|
65
81
|
function Popover(t0) {
|
|
66
|
-
const $ = c(
|
|
82
|
+
const $ = c(108);
|
|
67
83
|
const { direction: directionProp, title, content, trigger: t1, placement: t2, open, defaultOpen, onOpenChange, mouseEnterDelay: t3, mouseLeaveDelay: t4, arrow: t5, destroyOnHidden, destroyTooltipOnHide, className, style, classNames, styles, children, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy } = t0;
|
|
68
84
|
const trigger = void 0 === t1 ? "hover" : t1;
|
|
69
85
|
const placement = void 0 === t2 ? "top" : t2;
|
|
@@ -99,7 +115,7 @@ function Popover(t0) {
|
|
|
99
115
|
const hasPopup = isRenderable(titleNode) || isRenderable(contentNode);
|
|
100
116
|
const [realOpen, setOpen] = useControlledOpen({
|
|
101
117
|
open,
|
|
102
|
-
defaultOpen,
|
|
118
|
+
defaultOpen: hasPopup && defaultOpen,
|
|
103
119
|
onOpenChange,
|
|
104
120
|
canOpen: hasPopup
|
|
105
121
|
});
|
|
@@ -107,6 +123,8 @@ function Popover(t0) {
|
|
|
107
123
|
const closeTimer = useRef(void 0);
|
|
108
124
|
const popupRef = useRef(null);
|
|
109
125
|
const triggerRef = useRef(null);
|
|
126
|
+
const restoringFocus = useRef(false);
|
|
127
|
+
const restoreAfterEscape = useRef(false);
|
|
110
128
|
let t8;
|
|
111
129
|
if ($[4] !== directionRef) {
|
|
112
130
|
t8 = (node)=>{
|
|
@@ -133,222 +151,277 @@ function Popover(t0) {
|
|
|
133
151
|
} else t10 = $[7];
|
|
134
152
|
const cancelTimers = t10;
|
|
135
153
|
let t11;
|
|
154
|
+
if ($[8] !== setOpen) {
|
|
155
|
+
t11 = (next)=>{
|
|
156
|
+
cancelTimers();
|
|
157
|
+
setOpen(next);
|
|
158
|
+
};
|
|
159
|
+
$[8] = setOpen;
|
|
160
|
+
$[9] = t11;
|
|
161
|
+
} else t11 = $[9];
|
|
162
|
+
const changeOpen = t11;
|
|
163
|
+
const hoverEnabled = hasPopup && hoverMode;
|
|
164
|
+
useEffect(()=>{
|
|
165
|
+
if (hoverEnabled) return cancelTimers;
|
|
166
|
+
}, [
|
|
167
|
+
cancelTimers,
|
|
168
|
+
hoverEnabled
|
|
169
|
+
]);
|
|
136
170
|
let t12;
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
t12 =
|
|
140
|
-
|
|
171
|
+
let t13;
|
|
172
|
+
if ($[10] !== realOpen) {
|
|
173
|
+
t12 = ()=>{
|
|
174
|
+
realOpen ? clearTimeout(openTimer.current) : clearTimeout(closeTimer.current);
|
|
175
|
+
};
|
|
176
|
+
t13 = [
|
|
177
|
+
realOpen
|
|
141
178
|
];
|
|
142
|
-
$[
|
|
143
|
-
$[
|
|
179
|
+
$[10] = realOpen;
|
|
180
|
+
$[11] = t12;
|
|
181
|
+
$[12] = t13;
|
|
144
182
|
} else {
|
|
145
|
-
|
|
146
|
-
|
|
183
|
+
t12 = $[11];
|
|
184
|
+
t13 = $[12];
|
|
147
185
|
}
|
|
148
|
-
useEffect(
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
186
|
+
useEffect(t12, t13);
|
|
187
|
+
useEffect(()=>{
|
|
188
|
+
if (!hasPopup && realOpen && null == open) changeOpen(false);
|
|
189
|
+
}, [
|
|
190
|
+
changeOpen,
|
|
191
|
+
hasPopup,
|
|
192
|
+
open,
|
|
193
|
+
realOpen
|
|
194
|
+
]);
|
|
195
|
+
let t14;
|
|
196
|
+
if ($[13] !== mouseEnterDelay || $[14] !== setOpen) {
|
|
197
|
+
t14 = ()=>{
|
|
152
198
|
cancelTimers();
|
|
153
199
|
if (mouseEnterDelay <= 0) return void setOpen(true);
|
|
154
200
|
openTimer.current = setTimeout(()=>setOpen(true), 1000 * mouseEnterDelay);
|
|
155
201
|
};
|
|
156
|
-
$[
|
|
157
|
-
$[
|
|
158
|
-
$[
|
|
159
|
-
} else
|
|
160
|
-
const scheduleOpen =
|
|
161
|
-
let
|
|
162
|
-
if ($[
|
|
163
|
-
|
|
202
|
+
$[13] = mouseEnterDelay;
|
|
203
|
+
$[14] = setOpen;
|
|
204
|
+
$[15] = t14;
|
|
205
|
+
} else t14 = $[15];
|
|
206
|
+
const scheduleOpen = t14;
|
|
207
|
+
let t15;
|
|
208
|
+
if ($[16] !== focusMode || $[17] !== mouseLeaveDelay || $[18] !== realOpen || $[19] !== setOpen) {
|
|
209
|
+
t15 = ()=>{
|
|
164
210
|
cancelTimers();
|
|
211
|
+
if (!realOpen) return;
|
|
165
212
|
const close = ()=>{
|
|
166
213
|
if (!focusMode || !containsFocusTarget(document.activeElement)) setOpen(false);
|
|
167
214
|
};
|
|
168
215
|
if (mouseLeaveDelay <= 0) return void close();
|
|
169
216
|
closeTimer.current = setTimeout(close, 1000 * mouseLeaveDelay);
|
|
170
217
|
};
|
|
171
|
-
$[
|
|
172
|
-
$[
|
|
173
|
-
$[
|
|
174
|
-
$[
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
218
|
+
$[16] = focusMode;
|
|
219
|
+
$[17] = mouseLeaveDelay;
|
|
220
|
+
$[18] = realOpen;
|
|
221
|
+
$[19] = setOpen;
|
|
222
|
+
$[20] = t15;
|
|
223
|
+
} else t15 = $[20];
|
|
224
|
+
const scheduleClose = t15;
|
|
225
|
+
let t16;
|
|
226
|
+
if ($[21] !== changeOpen) {
|
|
227
|
+
t16 = (event)=>{
|
|
180
228
|
if (!containsFocusTarget(event.relatedTarget)) {
|
|
181
|
-
|
|
182
|
-
|
|
229
|
+
restoreAfterEscape.current = false;
|
|
230
|
+
changeOpen(false);
|
|
183
231
|
}
|
|
184
232
|
};
|
|
185
|
-
$[
|
|
186
|
-
$[
|
|
187
|
-
} else
|
|
188
|
-
const handleBlur =
|
|
233
|
+
$[21] = changeOpen;
|
|
234
|
+
$[22] = t16;
|
|
235
|
+
} else t16 = $[22];
|
|
236
|
+
const handleBlur = t16;
|
|
189
237
|
if (!hasPopup) {
|
|
190
|
-
let
|
|
191
|
-
if ($[
|
|
192
|
-
|
|
238
|
+
let t17;
|
|
239
|
+
if ($[23] !== children) {
|
|
240
|
+
t17 = /*#__PURE__*/ jsx(Fragment, {
|
|
193
241
|
children: children
|
|
194
242
|
});
|
|
195
|
-
$[
|
|
196
|
-
$[
|
|
197
|
-
} else
|
|
198
|
-
return
|
|
243
|
+
$[23] = children;
|
|
244
|
+
$[24] = t17;
|
|
245
|
+
} else t17 = $[24];
|
|
246
|
+
return t17;
|
|
199
247
|
}
|
|
200
|
-
let
|
|
201
|
-
if ($[
|
|
202
|
-
|
|
248
|
+
let t17;
|
|
249
|
+
if ($[25] !== hoverMode || $[26] !== scheduleClose || $[27] !== scheduleOpen) {
|
|
250
|
+
t17 = hoverMode ? {
|
|
203
251
|
onPointerEnter: scheduleOpen,
|
|
204
252
|
onPointerLeave: scheduleClose
|
|
205
253
|
} : void 0;
|
|
206
|
-
$[
|
|
207
|
-
$[
|
|
208
|
-
$[
|
|
209
|
-
$[
|
|
210
|
-
} else
|
|
211
|
-
const hoverProps =
|
|
212
|
-
let
|
|
213
|
-
if ($[
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
setOpen(true);
|
|
254
|
+
$[25] = hoverMode;
|
|
255
|
+
$[26] = scheduleClose;
|
|
256
|
+
$[27] = scheduleOpen;
|
|
257
|
+
$[28] = t17;
|
|
258
|
+
} else t17 = $[28];
|
|
259
|
+
const hoverProps = t17;
|
|
260
|
+
let t18;
|
|
261
|
+
if ($[29] !== changeOpen || $[30] !== focusMode) {
|
|
262
|
+
t18 = focusMode ? ()=>{
|
|
263
|
+
if (!restoringFocus.current) changeOpen(true);
|
|
217
264
|
} : void 0;
|
|
218
|
-
$[
|
|
219
|
-
$[
|
|
220
|
-
$[
|
|
221
|
-
} else
|
|
222
|
-
const
|
|
223
|
-
let
|
|
224
|
-
if ($[
|
|
225
|
-
|
|
265
|
+
$[29] = changeOpen;
|
|
266
|
+
$[30] = focusMode;
|
|
267
|
+
$[31] = t18;
|
|
268
|
+
} else t18 = $[31];
|
|
269
|
+
const t19 = focusMode ? handleBlur : void 0;
|
|
270
|
+
let t20;
|
|
271
|
+
if ($[32] !== changeOpen || $[33] !== contextMenuMode) {
|
|
272
|
+
t20 = contextMenuMode ? (event_0)=>{
|
|
273
|
+
if (event_0.defaultPrevented) return;
|
|
226
274
|
event_0.preventDefault();
|
|
227
|
-
|
|
275
|
+
changeOpen(true);
|
|
228
276
|
} : void 0;
|
|
229
|
-
$[
|
|
230
|
-
$[
|
|
231
|
-
$[
|
|
232
|
-
} else
|
|
233
|
-
let
|
|
234
|
-
if ($[
|
|
235
|
-
|
|
277
|
+
$[32] = changeOpen;
|
|
278
|
+
$[33] = contextMenuMode;
|
|
279
|
+
$[34] = t20;
|
|
280
|
+
} else t20 = $[34];
|
|
281
|
+
let t21;
|
|
282
|
+
if ($[35] !== hoverProps || $[36] !== t18 || $[37] !== t19 || $[38] !== t20) {
|
|
283
|
+
t21 = {
|
|
236
284
|
...hoverProps,
|
|
237
|
-
onFocus:
|
|
238
|
-
onBlur:
|
|
239
|
-
onContextMenu:
|
|
285
|
+
onFocus: t18,
|
|
286
|
+
onBlur: t19,
|
|
287
|
+
onContextMenu: t20
|
|
240
288
|
};
|
|
241
|
-
$[
|
|
242
|
-
$[
|
|
243
|
-
$[
|
|
244
|
-
$[
|
|
245
|
-
$[
|
|
246
|
-
} else
|
|
247
|
-
const triggerProps =
|
|
248
|
-
const
|
|
249
|
-
let t22;
|
|
250
|
-
if ($[36] !== children) {
|
|
251
|
-
t22 = asTriggerChild(children);
|
|
252
|
-
$[36] = children;
|
|
253
|
-
$[37] = t22;
|
|
254
|
-
} else t22 = $[37];
|
|
289
|
+
$[35] = hoverProps;
|
|
290
|
+
$[36] = t18;
|
|
291
|
+
$[37] = t19;
|
|
292
|
+
$[38] = t20;
|
|
293
|
+
$[39] = t21;
|
|
294
|
+
} else t21 = $[39];
|
|
295
|
+
const triggerProps = t21;
|
|
296
|
+
const t22 = __rspack_external__radix_ui_react_popover_c8444160;
|
|
255
297
|
let t23;
|
|
256
|
-
if ($[
|
|
257
|
-
t23 =
|
|
298
|
+
if ($[40] !== children) {
|
|
299
|
+
t23 = asTriggerChild(children);
|
|
300
|
+
$[40] = children;
|
|
301
|
+
$[41] = t23;
|
|
302
|
+
} else t23 = $[41];
|
|
303
|
+
let t24;
|
|
304
|
+
if ($[42] !== TriggerPrimitive || $[43] !== setTriggerRef || $[44] !== t23 || $[45] !== triggerProps) {
|
|
305
|
+
t24 = /*#__PURE__*/ jsx(TriggerPrimitive, {
|
|
258
306
|
asChild: true,
|
|
259
307
|
ref: setTriggerRef,
|
|
260
308
|
...triggerProps,
|
|
261
|
-
children:
|
|
309
|
+
children: t23
|
|
262
310
|
});
|
|
263
|
-
$[
|
|
264
|
-
$[
|
|
265
|
-
$[
|
|
266
|
-
$[
|
|
267
|
-
$[
|
|
268
|
-
} else
|
|
269
|
-
const
|
|
270
|
-
const
|
|
311
|
+
$[42] = TriggerPrimitive;
|
|
312
|
+
$[43] = setTriggerRef;
|
|
313
|
+
$[44] = t23;
|
|
314
|
+
$[45] = triggerProps;
|
|
315
|
+
$[46] = t24;
|
|
316
|
+
} else t24 = $[46];
|
|
317
|
+
const t25 = __rspack_external__radix_ui_react_popover_c8444160;
|
|
318
|
+
const t26 = shouldDestroy ? void 0 : true;
|
|
271
319
|
const T0 = TaoPortalScope;
|
|
272
|
-
const
|
|
273
|
-
const
|
|
274
|
-
const
|
|
275
|
-
const
|
|
276
|
-
const
|
|
277
|
-
const
|
|
278
|
-
|
|
279
|
-
if ($[43] !== className || $[44] !== t31) {
|
|
280
|
-
t32 = cx(t31, className);
|
|
281
|
-
$[43] = className;
|
|
282
|
-
$[44] = t31;
|
|
283
|
-
$[45] = t32;
|
|
284
|
-
} else t32 = $[45];
|
|
285
|
-
const t33 = styles?.root;
|
|
320
|
+
const t27 = true;
|
|
321
|
+
const t28 = __rspack_external__radix_ui_react_popover_c8444160;
|
|
322
|
+
const t29 = true;
|
|
323
|
+
const t30 = ariaLabelledBy ?? (!ariaLabel && isRenderable(titleNode) ? titleId : void 0);
|
|
324
|
+
const t31 = "";
|
|
325
|
+
const t32 = !shouldDestroy || void 0;
|
|
326
|
+
const t33 = classNames?.root;
|
|
286
327
|
let t34;
|
|
287
|
-
if ($[
|
|
288
|
-
t34 =
|
|
289
|
-
|
|
328
|
+
if ($[47] !== className || $[48] !== t33) {
|
|
329
|
+
t34 = cx(t33, className);
|
|
330
|
+
$[47] = className;
|
|
331
|
+
$[48] = t33;
|
|
332
|
+
$[49] = t34;
|
|
333
|
+
} else t34 = $[49];
|
|
334
|
+
const t35 = styles?.root;
|
|
335
|
+
let t36;
|
|
336
|
+
if ($[50] !== style || $[51] !== t35) {
|
|
337
|
+
t36 = {
|
|
338
|
+
...t35,
|
|
290
339
|
...style
|
|
291
340
|
};
|
|
292
|
-
$[
|
|
293
|
-
$[
|
|
294
|
-
$[
|
|
295
|
-
} else
|
|
296
|
-
const
|
|
297
|
-
const
|
|
298
|
-
const
|
|
299
|
-
const
|
|
300
|
-
const t39 = focusMode ? cancelTimers : void 0;
|
|
301
|
-
const t40 = focusMode ? handleBlur : void 0;
|
|
341
|
+
$[50] = style;
|
|
342
|
+
$[51] = t35;
|
|
343
|
+
$[52] = t36;
|
|
344
|
+
} else t36 = $[52];
|
|
345
|
+
const t37 = "rtl" === direction && ("top" === placementProps.side || "bottom" === placementProps.side) && "center" !== placementProps.align ? "start" === placementProps.align ? "end" : "start" : placementProps.align;
|
|
346
|
+
const t38 = 4;
|
|
347
|
+
const t39 = shouldDestroy ? void 0 : true;
|
|
348
|
+
const t40 = _temp;
|
|
302
349
|
let t41;
|
|
303
|
-
if ($[
|
|
304
|
-
t41 = (
|
|
305
|
-
|
|
350
|
+
if ($[53] !== focusMode) {
|
|
351
|
+
t41 = ()=>{
|
|
352
|
+
restoreAfterEscape.current = focusMode && !!popupRef.current?.contains(document.activeElement);
|
|
306
353
|
};
|
|
307
|
-
$[
|
|
308
|
-
$[
|
|
309
|
-
} else t41 = $[
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
354
|
+
$[53] = focusMode;
|
|
355
|
+
$[54] = t41;
|
|
356
|
+
} else t41 = $[54];
|
|
357
|
+
let t42;
|
|
358
|
+
if ($[55] !== shouldDestroy) {
|
|
359
|
+
t42 = (event_2)=>{
|
|
360
|
+
const focusedRetainedContent = !shouldDestroy && event_2.currentTarget instanceof HTMLElement && event_2.currentTarget.contains(document.activeElement);
|
|
361
|
+
if (restoreAfterEscape.current || focusedRetainedContent) {
|
|
362
|
+
restoreAfterEscape.current = false;
|
|
363
|
+
event_2.preventDefault();
|
|
364
|
+
restoringFocus.current = true;
|
|
365
|
+
triggerRef.current?.focus();
|
|
366
|
+
restoringFocus.current = false;
|
|
367
|
+
}
|
|
368
|
+
};
|
|
369
|
+
$[55] = shouldDestroy;
|
|
370
|
+
$[56] = t42;
|
|
371
|
+
} else t42 = $[56];
|
|
372
|
+
const t43 = focusMode ? cancelTimers : void 0;
|
|
373
|
+
const t44 = focusMode ? handleBlur : void 0;
|
|
374
|
+
let t45;
|
|
375
|
+
if ($[57] !== focusMode) {
|
|
376
|
+
t45 = (event_3)=>{
|
|
377
|
+
if (focusMode) event_3.preventDefault();
|
|
378
|
+
};
|
|
379
|
+
$[57] = focusMode;
|
|
380
|
+
$[58] = t45;
|
|
381
|
+
} else t45 = $[58];
|
|
382
|
+
const T1 = popover_PopoverSurface;
|
|
383
|
+
const t46 = "";
|
|
384
|
+
const t47 = classNames?.container;
|
|
385
|
+
let t48;
|
|
386
|
+
if ($[59] !== t47) {
|
|
387
|
+
t48 = cx(t47);
|
|
388
|
+
$[59] = t47;
|
|
389
|
+
$[60] = t48;
|
|
390
|
+
} else t48 = $[60];
|
|
391
|
+
const t49 = styles?.container;
|
|
392
|
+
const t50 = isRenderable(titleNode) && /*#__PURE__*/ jsx("div", {
|
|
320
393
|
"data-tao-popover-title": "",
|
|
321
394
|
id: titleId,
|
|
322
395
|
className: cx(classNames?.title),
|
|
323
396
|
style: styles?.title,
|
|
324
397
|
children: titleNode
|
|
325
398
|
});
|
|
326
|
-
const
|
|
399
|
+
const t51 = isRenderable(contentNode) && /*#__PURE__*/ jsx("div", {
|
|
327
400
|
"data-tao-popover-content": "",
|
|
328
401
|
className: cx(classNames?.content),
|
|
329
402
|
style: styles?.content,
|
|
330
403
|
children: contentNode
|
|
331
404
|
});
|
|
332
|
-
let
|
|
333
|
-
if ($[
|
|
334
|
-
|
|
335
|
-
"data-tao-popover-container":
|
|
336
|
-
className:
|
|
337
|
-
style:
|
|
405
|
+
let t52;
|
|
406
|
+
if ($[61] !== t48 || $[62] !== t49 || $[63] !== t50 || $[64] !== t51) {
|
|
407
|
+
t52 = /*#__PURE__*/ jsxs("div", {
|
|
408
|
+
"data-tao-popover-container": t46,
|
|
409
|
+
className: t48,
|
|
410
|
+
style: t49,
|
|
338
411
|
children: [
|
|
339
|
-
|
|
340
|
-
|
|
412
|
+
t50,
|
|
413
|
+
t51
|
|
341
414
|
]
|
|
342
415
|
});
|
|
343
|
-
$[
|
|
344
|
-
$[
|
|
345
|
-
$[
|
|
346
|
-
$[
|
|
347
|
-
$[
|
|
348
|
-
} else
|
|
349
|
-
let
|
|
350
|
-
if ($[
|
|
351
|
-
|
|
416
|
+
$[61] = t48;
|
|
417
|
+
$[62] = t49;
|
|
418
|
+
$[63] = t50;
|
|
419
|
+
$[64] = t51;
|
|
420
|
+
$[65] = t52;
|
|
421
|
+
} else t52 = $[65];
|
|
422
|
+
let t53;
|
|
423
|
+
if ($[66] !== arrow || $[67] !== classNames?.arrow || $[68] !== styles?.arrow) {
|
|
424
|
+
t53 = false !== arrow && /*#__PURE__*/ jsx(__rspack_external__radix_ui_react_popover_c8444160.Arrow, {
|
|
352
425
|
asChild: true,
|
|
353
426
|
children: /*#__PURE__*/ jsx("span", {
|
|
354
427
|
"data-tao-popover-arrow": "",
|
|
@@ -356,98 +429,112 @@ function Popover(t0) {
|
|
|
356
429
|
style: styles?.arrow
|
|
357
430
|
})
|
|
358
431
|
});
|
|
359
|
-
$[
|
|
360
|
-
$[
|
|
361
|
-
$[
|
|
362
|
-
$[
|
|
363
|
-
} else
|
|
364
|
-
let
|
|
365
|
-
if ($[
|
|
366
|
-
|
|
432
|
+
$[66] = arrow;
|
|
433
|
+
$[67] = classNames?.arrow;
|
|
434
|
+
$[68] = styles?.arrow;
|
|
435
|
+
$[69] = t53;
|
|
436
|
+
} else t53 = $[69];
|
|
437
|
+
let t54;
|
|
438
|
+
if ($[70] !== T1 || $[71] !== t52 || $[72] !== t53) {
|
|
439
|
+
t54 = /*#__PURE__*/ jsxs(T1, {
|
|
440
|
+
children: [
|
|
441
|
+
t52,
|
|
442
|
+
t53
|
|
443
|
+
]
|
|
444
|
+
});
|
|
445
|
+
$[70] = T1;
|
|
446
|
+
$[71] = t52;
|
|
447
|
+
$[72] = t53;
|
|
448
|
+
$[73] = t54;
|
|
449
|
+
} else t54 = $[73];
|
|
450
|
+
let t55;
|
|
451
|
+
if ($[74] !== ariaDescribedBy || $[75] !== ariaLabel || $[76] !== hoverProps || $[77] !== placement || $[78] !== placementProps || $[79] !== t28.Content || $[80] !== t30 || $[81] !== t32 || $[82] !== t34 || $[83] !== t36 || $[84] !== t37 || $[85] !== t39 || $[86] !== t40 || $[87] !== t41 || $[88] !== t42 || $[89] !== t43 || $[90] !== t44 || $[91] !== t45 || $[92] !== t54) {
|
|
452
|
+
t55 = /*#__PURE__*/ jsx(t28.Content, {
|
|
453
|
+
asChild: t29,
|
|
367
454
|
ref: popupRef,
|
|
368
455
|
"aria-label": ariaLabel,
|
|
369
|
-
"aria-labelledby":
|
|
456
|
+
"aria-labelledby": t30,
|
|
370
457
|
"aria-describedby": ariaDescribedBy,
|
|
371
|
-
"data-tao-popover":
|
|
458
|
+
"data-tao-popover": t31,
|
|
372
459
|
"data-tao-placement": placement,
|
|
373
|
-
"data-tao-keep-alive":
|
|
374
|
-
className:
|
|
375
|
-
style:
|
|
460
|
+
"data-tao-keep-alive": t32,
|
|
461
|
+
className: t34,
|
|
462
|
+
style: t36,
|
|
376
463
|
...placementProps,
|
|
377
|
-
align:
|
|
378
|
-
sideOffset:
|
|
379
|
-
forceMount:
|
|
380
|
-
onOpenAutoFocus:
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
464
|
+
align: t37,
|
|
465
|
+
sideOffset: t38,
|
|
466
|
+
forceMount: t39,
|
|
467
|
+
onOpenAutoFocus: t40,
|
|
468
|
+
onEscapeKeyDown: t41,
|
|
469
|
+
onCloseAutoFocus: t42,
|
|
470
|
+
onFocusCapture: t43,
|
|
471
|
+
onBlurCapture: t44,
|
|
472
|
+
onFocusOutside: t45,
|
|
384
473
|
...hoverProps,
|
|
385
|
-
children:
|
|
386
|
-
t48,
|
|
387
|
-
t49
|
|
388
|
-
]
|
|
474
|
+
children: t54
|
|
389
475
|
});
|
|
390
|
-
$[
|
|
391
|
-
$[
|
|
392
|
-
$[
|
|
393
|
-
$[
|
|
394
|
-
$[
|
|
395
|
-
$[
|
|
396
|
-
$[
|
|
397
|
-
$[
|
|
398
|
-
$[
|
|
399
|
-
$[
|
|
400
|
-
$[
|
|
401
|
-
$[
|
|
402
|
-
$[
|
|
403
|
-
$[
|
|
404
|
-
$[
|
|
405
|
-
$[
|
|
406
|
-
$[
|
|
407
|
-
$[
|
|
408
|
-
$[
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
476
|
+
$[74] = ariaDescribedBy;
|
|
477
|
+
$[75] = ariaLabel;
|
|
478
|
+
$[76] = hoverProps;
|
|
479
|
+
$[77] = placement;
|
|
480
|
+
$[78] = placementProps;
|
|
481
|
+
$[79] = t28.Content;
|
|
482
|
+
$[80] = t30;
|
|
483
|
+
$[81] = t32;
|
|
484
|
+
$[82] = t34;
|
|
485
|
+
$[83] = t36;
|
|
486
|
+
$[84] = t37;
|
|
487
|
+
$[85] = t39;
|
|
488
|
+
$[86] = t40;
|
|
489
|
+
$[87] = t41;
|
|
490
|
+
$[88] = t42;
|
|
491
|
+
$[89] = t43;
|
|
492
|
+
$[90] = t44;
|
|
493
|
+
$[91] = t45;
|
|
494
|
+
$[92] = t54;
|
|
495
|
+
$[93] = t55;
|
|
496
|
+
} else t55 = $[93];
|
|
497
|
+
let t56;
|
|
498
|
+
if ($[94] !== T0 || $[95] !== direction || $[96] !== t55) {
|
|
499
|
+
t56 = /*#__PURE__*/ jsx(T0, {
|
|
500
|
+
asChild: t27,
|
|
414
501
|
direction: direction,
|
|
415
|
-
children:
|
|
502
|
+
children: t55
|
|
416
503
|
});
|
|
417
|
-
$[
|
|
418
|
-
$[
|
|
419
|
-
$[
|
|
420
|
-
$[
|
|
421
|
-
} else
|
|
422
|
-
let
|
|
423
|
-
if ($[
|
|
424
|
-
|
|
425
|
-
forceMount:
|
|
426
|
-
children:
|
|
504
|
+
$[94] = T0;
|
|
505
|
+
$[95] = direction;
|
|
506
|
+
$[96] = t55;
|
|
507
|
+
$[97] = t56;
|
|
508
|
+
} else t56 = $[97];
|
|
509
|
+
let t57;
|
|
510
|
+
if ($[98] !== t25.Portal || $[99] !== t26 || $[100] !== t56) {
|
|
511
|
+
t57 = /*#__PURE__*/ jsx(t25.Portal, {
|
|
512
|
+
forceMount: t26,
|
|
513
|
+
children: t56
|
|
427
514
|
});
|
|
428
|
-
$[
|
|
429
|
-
$[
|
|
430
|
-
$[
|
|
431
|
-
$[
|
|
432
|
-
} else
|
|
433
|
-
let
|
|
434
|
-
if ($[
|
|
435
|
-
|
|
515
|
+
$[98] = t25.Portal;
|
|
516
|
+
$[99] = t26;
|
|
517
|
+
$[100] = t56;
|
|
518
|
+
$[101] = t57;
|
|
519
|
+
} else t57 = $[101];
|
|
520
|
+
let t58;
|
|
521
|
+
if ($[102] !== changeOpen || $[103] !== realOpen || $[104] !== t22.Root || $[105] !== t24 || $[106] !== t57) {
|
|
522
|
+
t58 = /*#__PURE__*/ jsxs(t22.Root, {
|
|
436
523
|
open: realOpen,
|
|
437
|
-
onOpenChange:
|
|
524
|
+
onOpenChange: changeOpen,
|
|
438
525
|
children: [
|
|
439
|
-
|
|
440
|
-
|
|
526
|
+
t24,
|
|
527
|
+
t57
|
|
441
528
|
]
|
|
442
529
|
});
|
|
443
|
-
$[
|
|
444
|
-
$[
|
|
445
|
-
$[
|
|
446
|
-
$[
|
|
447
|
-
$[
|
|
448
|
-
$[
|
|
449
|
-
} else
|
|
450
|
-
return
|
|
530
|
+
$[102] = changeOpen;
|
|
531
|
+
$[103] = realOpen;
|
|
532
|
+
$[104] = t22.Root;
|
|
533
|
+
$[105] = t24;
|
|
534
|
+
$[106] = t57;
|
|
535
|
+
$[107] = t58;
|
|
536
|
+
} else t58 = $[107];
|
|
537
|
+
return t58;
|
|
451
538
|
}
|
|
452
539
|
function _temp(event_1) {
|
|
453
540
|
return event_1.preventDefault();
|