@rockshin/tao-ui 0.0.58 → 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 +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 +17 -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.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-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/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 +4 -4
- 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/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/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 +1 -0
- package/dist/components/pagination/pagination.js +1 -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/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.js +58 -58
- 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/switch/switch.js +45 -39
- package/dist/components/table/table.js +1 -0
- 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 +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.js +166 -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 +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
|
@@ -4,8 +4,15 @@ import * as __rspack_external__radix_ui_react_popover_c8444160 from "@radix-ui/r
|
|
|
4
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
|
+
import { useCommittedRef } from "../../utils/refs.js";
|
|
7
8
|
import { cx } from "../../utils/semantic.js";
|
|
8
9
|
import "./popover.css";
|
|
10
|
+
function hasFocusWithin(element) {
|
|
11
|
+
if (!element) return false;
|
|
12
|
+
const root = element.getRootNode();
|
|
13
|
+
const activeElement = 'activeElement' in root ? root.activeElement : element.ownerDocument.activeElement;
|
|
14
|
+
return element.contains(activeElement);
|
|
15
|
+
}
|
|
9
16
|
const placements = {
|
|
10
17
|
top: {
|
|
11
18
|
side: 'top',
|
|
@@ -79,7 +86,7 @@ const popover_PopoverSurface = /*#__PURE__*/ forwardRef(function(props, ref) {
|
|
|
79
86
|
return t1;
|
|
80
87
|
});
|
|
81
88
|
function Popover(t0) {
|
|
82
|
-
const $ = c(
|
|
89
|
+
const $ = c(115);
|
|
83
90
|
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;
|
|
84
91
|
const trigger = void 0 === t1 ? "hover" : t1;
|
|
85
92
|
const placement = void 0 === t2 ? "top" : t2;
|
|
@@ -119,47 +126,64 @@ function Popover(t0) {
|
|
|
119
126
|
onOpenChange,
|
|
120
127
|
canOpen: hasPopup
|
|
121
128
|
});
|
|
129
|
+
let t8;
|
|
130
|
+
if ($[4] !== focusMode || $[5] !== setOpen) {
|
|
131
|
+
t8 = {
|
|
132
|
+
setOpen,
|
|
133
|
+
focusMode
|
|
134
|
+
};
|
|
135
|
+
$[4] = focusMode;
|
|
136
|
+
$[5] = setOpen;
|
|
137
|
+
$[6] = t8;
|
|
138
|
+
} else t8 = $[6];
|
|
139
|
+
const hoverState = useCommittedRef(t8);
|
|
122
140
|
const openTimer = useRef(void 0);
|
|
123
141
|
const closeTimer = useRef(void 0);
|
|
124
142
|
const popupRef = useRef(null);
|
|
125
143
|
const triggerRef = useRef(null);
|
|
126
144
|
const restoringFocus = useRef(false);
|
|
127
145
|
const restoreAfterEscape = useRef(false);
|
|
128
|
-
let
|
|
129
|
-
if ($[
|
|
130
|
-
|
|
146
|
+
let t9;
|
|
147
|
+
if ($[7] !== directionRef) {
|
|
148
|
+
t9 = (node)=>{
|
|
131
149
|
triggerRef.current = node;
|
|
132
150
|
directionRef(node);
|
|
133
151
|
};
|
|
134
|
-
$[
|
|
135
|
-
$[
|
|
136
|
-
} else
|
|
137
|
-
const setTriggerRef =
|
|
138
|
-
let t9;
|
|
139
|
-
if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
|
|
140
|
-
t9 = (target)=>target instanceof Node && (triggerRef.current?.contains(target) || popupRef.current?.contains(target));
|
|
141
|
-
$[6] = t9;
|
|
142
|
-
} else t9 = $[6];
|
|
143
|
-
const containsFocusTarget = t9;
|
|
152
|
+
$[7] = directionRef;
|
|
153
|
+
$[8] = t9;
|
|
154
|
+
} else t9 = $[8];
|
|
155
|
+
const setTriggerRef = t9;
|
|
144
156
|
let t10;
|
|
145
|
-
if ($[
|
|
146
|
-
t10 = ()=>
|
|
157
|
+
if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
|
|
158
|
+
t10 = (target)=>target instanceof Node && !!triggerRef.current?.contains(target);
|
|
159
|
+
$[9] = t10;
|
|
160
|
+
} else t10 = $[9];
|
|
161
|
+
const containsTrigger = t10;
|
|
162
|
+
let t11;
|
|
163
|
+
if ($[10] === Symbol.for("react.memo_cache_sentinel")) {
|
|
164
|
+
t11 = (target_0)=>target_0 instanceof Node && (triggerRef.current?.contains(target_0) || popupRef.current?.contains(target_0));
|
|
165
|
+
$[10] = t11;
|
|
166
|
+
} else t11 = $[10];
|
|
167
|
+
const containsFocusTarget = t11;
|
|
168
|
+
let t12;
|
|
169
|
+
if ($[11] === Symbol.for("react.memo_cache_sentinel")) {
|
|
170
|
+
t12 = ()=>{
|
|
147
171
|
clearTimeout(openTimer.current);
|
|
148
172
|
clearTimeout(closeTimer.current);
|
|
149
173
|
};
|
|
150
|
-
$[
|
|
151
|
-
} else
|
|
152
|
-
const cancelTimers =
|
|
153
|
-
let
|
|
154
|
-
if ($[
|
|
155
|
-
|
|
174
|
+
$[11] = t12;
|
|
175
|
+
} else t12 = $[11];
|
|
176
|
+
const cancelTimers = t12;
|
|
177
|
+
let t13;
|
|
178
|
+
if ($[12] !== setOpen) {
|
|
179
|
+
t13 = (next)=>{
|
|
156
180
|
cancelTimers();
|
|
157
181
|
setOpen(next);
|
|
158
182
|
};
|
|
159
|
-
$[
|
|
160
|
-
$[
|
|
161
|
-
} else
|
|
162
|
-
const changeOpen =
|
|
183
|
+
$[12] = setOpen;
|
|
184
|
+
$[13] = t13;
|
|
185
|
+
} else t13 = $[13];
|
|
186
|
+
const changeOpen = t13;
|
|
163
187
|
const hoverEnabled = hasPopup && hoverMode;
|
|
164
188
|
useEffect(()=>{
|
|
165
189
|
if (hoverEnabled) return cancelTimers;
|
|
@@ -167,23 +191,23 @@ function Popover(t0) {
|
|
|
167
191
|
cancelTimers,
|
|
168
192
|
hoverEnabled
|
|
169
193
|
]);
|
|
170
|
-
let
|
|
171
|
-
let
|
|
172
|
-
if ($[
|
|
173
|
-
|
|
194
|
+
let t14;
|
|
195
|
+
let t15;
|
|
196
|
+
if ($[14] !== realOpen) {
|
|
197
|
+
t14 = ()=>{
|
|
174
198
|
realOpen ? clearTimeout(openTimer.current) : clearTimeout(closeTimer.current);
|
|
175
199
|
};
|
|
176
|
-
|
|
200
|
+
t15 = [
|
|
177
201
|
realOpen
|
|
178
202
|
];
|
|
179
|
-
$[
|
|
180
|
-
$[
|
|
181
|
-
$[
|
|
203
|
+
$[14] = realOpen;
|
|
204
|
+
$[15] = t14;
|
|
205
|
+
$[16] = t15;
|
|
182
206
|
} else {
|
|
183
|
-
|
|
184
|
-
|
|
207
|
+
t14 = $[15];
|
|
208
|
+
t15 = $[16];
|
|
185
209
|
}
|
|
186
|
-
useEffect(
|
|
210
|
+
useEffect(t14, t15);
|
|
187
211
|
useEffect(()=>{
|
|
188
212
|
if (!hasPopup && realOpen && null == open) changeOpen(false);
|
|
189
213
|
}, [
|
|
@@ -192,171 +216,174 @@ function Popover(t0) {
|
|
|
192
216
|
open,
|
|
193
217
|
realOpen
|
|
194
218
|
]);
|
|
195
|
-
let
|
|
196
|
-
if ($[
|
|
197
|
-
|
|
219
|
+
let t16;
|
|
220
|
+
if ($[17] !== hoverState || $[18] !== mouseEnterDelay || $[19] !== realOpen || $[20] !== setOpen) {
|
|
221
|
+
t16 = ()=>{
|
|
198
222
|
cancelTimers();
|
|
223
|
+
if (realOpen) return;
|
|
199
224
|
if (mouseEnterDelay <= 0) return void setOpen(true);
|
|
200
|
-
openTimer.current = setTimeout(()=>setOpen(true), 1000 * mouseEnterDelay);
|
|
225
|
+
openTimer.current = setTimeout(()=>hoverState.current.setOpen(true), 1000 * mouseEnterDelay);
|
|
201
226
|
};
|
|
202
|
-
$[
|
|
203
|
-
$[
|
|
204
|
-
$[
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
227
|
+
$[17] = hoverState;
|
|
228
|
+
$[18] = mouseEnterDelay;
|
|
229
|
+
$[19] = realOpen;
|
|
230
|
+
$[20] = setOpen;
|
|
231
|
+
$[21] = t16;
|
|
232
|
+
} else t16 = $[21];
|
|
233
|
+
const scheduleOpen = t16;
|
|
234
|
+
let t17;
|
|
235
|
+
if ($[22] !== hoverState || $[23] !== mouseLeaveDelay || $[24] !== realOpen) {
|
|
236
|
+
t17 = ()=>{
|
|
210
237
|
cancelTimers();
|
|
211
238
|
if (!realOpen) return;
|
|
212
239
|
const close = ()=>{
|
|
213
|
-
|
|
240
|
+
const { focusMode: focusMode_0, setOpen: setOpen_0 } = hoverState.current;
|
|
241
|
+
if (!focusMode_0 || !hasFocusWithin(triggerRef.current) && !hasFocusWithin(popupRef.current)) setOpen_0(false);
|
|
214
242
|
};
|
|
215
243
|
if (mouseLeaveDelay <= 0) return void close();
|
|
216
244
|
closeTimer.current = setTimeout(close, 1000 * mouseLeaveDelay);
|
|
217
245
|
};
|
|
218
|
-
$[
|
|
219
|
-
$[
|
|
220
|
-
$[
|
|
221
|
-
$[
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
t16 = (event)=>{
|
|
246
|
+
$[22] = hoverState;
|
|
247
|
+
$[23] = mouseLeaveDelay;
|
|
248
|
+
$[24] = realOpen;
|
|
249
|
+
$[25] = t17;
|
|
250
|
+
} else t17 = $[25];
|
|
251
|
+
const scheduleClose = t17;
|
|
252
|
+
let t18;
|
|
253
|
+
if ($[26] !== changeOpen) {
|
|
254
|
+
t18 = (event)=>{
|
|
228
255
|
if (!containsFocusTarget(event.relatedTarget)) {
|
|
229
256
|
restoreAfterEscape.current = false;
|
|
230
257
|
changeOpen(false);
|
|
231
258
|
}
|
|
232
259
|
};
|
|
233
|
-
$[
|
|
234
|
-
$[
|
|
235
|
-
} else
|
|
236
|
-
const handleBlur =
|
|
260
|
+
$[26] = changeOpen;
|
|
261
|
+
$[27] = t18;
|
|
262
|
+
} else t18 = $[27];
|
|
263
|
+
const handleBlur = t18;
|
|
237
264
|
if (!hasPopup) {
|
|
238
|
-
let
|
|
239
|
-
if ($[
|
|
240
|
-
|
|
265
|
+
let t19;
|
|
266
|
+
if ($[28] !== children) {
|
|
267
|
+
t19 = /*#__PURE__*/ jsx(Fragment, {
|
|
241
268
|
children: children
|
|
242
269
|
});
|
|
243
|
-
$[
|
|
244
|
-
$[
|
|
245
|
-
} else
|
|
246
|
-
return
|
|
270
|
+
$[28] = children;
|
|
271
|
+
$[29] = t19;
|
|
272
|
+
} else t19 = $[29];
|
|
273
|
+
return t19;
|
|
247
274
|
}
|
|
248
|
-
let
|
|
249
|
-
if ($[
|
|
250
|
-
|
|
275
|
+
let t19;
|
|
276
|
+
if ($[30] !== hoverMode || $[31] !== scheduleClose || $[32] !== scheduleOpen) {
|
|
277
|
+
t19 = hoverMode ? {
|
|
251
278
|
onPointerEnter: scheduleOpen,
|
|
252
279
|
onPointerLeave: scheduleClose
|
|
253
280
|
} : void 0;
|
|
254
|
-
$[
|
|
255
|
-
$[
|
|
256
|
-
$[
|
|
257
|
-
$[
|
|
258
|
-
} else
|
|
259
|
-
const hoverProps =
|
|
260
|
-
let
|
|
261
|
-
if ($[
|
|
262
|
-
|
|
281
|
+
$[30] = hoverMode;
|
|
282
|
+
$[31] = scheduleClose;
|
|
283
|
+
$[32] = scheduleOpen;
|
|
284
|
+
$[33] = t19;
|
|
285
|
+
} else t19 = $[33];
|
|
286
|
+
const hoverProps = t19;
|
|
287
|
+
let t20;
|
|
288
|
+
if ($[34] !== changeOpen || $[35] !== focusMode) {
|
|
289
|
+
t20 = focusMode ? ()=>{
|
|
263
290
|
if (!restoringFocus.current) changeOpen(true);
|
|
264
291
|
} : void 0;
|
|
265
|
-
$[
|
|
266
|
-
$[
|
|
267
|
-
$[
|
|
268
|
-
} else
|
|
269
|
-
const
|
|
270
|
-
let
|
|
271
|
-
if ($[
|
|
272
|
-
|
|
292
|
+
$[34] = changeOpen;
|
|
293
|
+
$[35] = focusMode;
|
|
294
|
+
$[36] = t20;
|
|
295
|
+
} else t20 = $[36];
|
|
296
|
+
const t21 = focusMode ? handleBlur : void 0;
|
|
297
|
+
let t22;
|
|
298
|
+
if ($[37] !== changeOpen || $[38] !== contextMenuMode) {
|
|
299
|
+
t22 = contextMenuMode ? (event_0)=>{
|
|
273
300
|
if (event_0.defaultPrevented) return;
|
|
274
301
|
event_0.preventDefault();
|
|
275
302
|
changeOpen(true);
|
|
276
303
|
} : void 0;
|
|
277
|
-
$[
|
|
278
|
-
$[
|
|
279
|
-
$[
|
|
280
|
-
} else
|
|
281
|
-
let
|
|
282
|
-
if ($[
|
|
283
|
-
|
|
304
|
+
$[37] = changeOpen;
|
|
305
|
+
$[38] = contextMenuMode;
|
|
306
|
+
$[39] = t22;
|
|
307
|
+
} else t22 = $[39];
|
|
308
|
+
let t23;
|
|
309
|
+
if ($[40] !== hoverProps || $[41] !== t20 || $[42] !== t21 || $[43] !== t22) {
|
|
310
|
+
t23 = {
|
|
284
311
|
...hoverProps,
|
|
285
|
-
onFocus:
|
|
286
|
-
onBlur:
|
|
287
|
-
onContextMenu:
|
|
312
|
+
onFocus: t20,
|
|
313
|
+
onBlur: t21,
|
|
314
|
+
onContextMenu: t22
|
|
288
315
|
};
|
|
289
|
-
$[
|
|
290
|
-
$[
|
|
291
|
-
$[
|
|
292
|
-
$[
|
|
293
|
-
$[
|
|
294
|
-
} else
|
|
295
|
-
const triggerProps =
|
|
296
|
-
const
|
|
297
|
-
let
|
|
298
|
-
if ($[
|
|
299
|
-
|
|
300
|
-
$[
|
|
301
|
-
$[
|
|
302
|
-
} else
|
|
303
|
-
let
|
|
304
|
-
if ($[
|
|
305
|
-
|
|
316
|
+
$[40] = hoverProps;
|
|
317
|
+
$[41] = t20;
|
|
318
|
+
$[42] = t21;
|
|
319
|
+
$[43] = t22;
|
|
320
|
+
$[44] = t23;
|
|
321
|
+
} else t23 = $[44];
|
|
322
|
+
const triggerProps = t23;
|
|
323
|
+
const t24 = __rspack_external__radix_ui_react_popover_c8444160;
|
|
324
|
+
let t25;
|
|
325
|
+
if ($[45] !== children) {
|
|
326
|
+
t25 = asTriggerChild(children);
|
|
327
|
+
$[45] = children;
|
|
328
|
+
$[46] = t25;
|
|
329
|
+
} else t25 = $[46];
|
|
330
|
+
let t26;
|
|
331
|
+
if ($[47] !== TriggerPrimitive || $[48] !== setTriggerRef || $[49] !== t25 || $[50] !== triggerProps) {
|
|
332
|
+
t26 = /*#__PURE__*/ jsx(TriggerPrimitive, {
|
|
306
333
|
asChild: true,
|
|
307
334
|
ref: setTriggerRef,
|
|
308
335
|
...triggerProps,
|
|
309
|
-
children:
|
|
336
|
+
children: t25
|
|
310
337
|
});
|
|
311
|
-
$[
|
|
312
|
-
$[
|
|
313
|
-
$[
|
|
314
|
-
$[
|
|
315
|
-
$[
|
|
316
|
-
} else
|
|
317
|
-
const
|
|
318
|
-
const
|
|
338
|
+
$[47] = TriggerPrimitive;
|
|
339
|
+
$[48] = setTriggerRef;
|
|
340
|
+
$[49] = t25;
|
|
341
|
+
$[50] = triggerProps;
|
|
342
|
+
$[51] = t26;
|
|
343
|
+
} else t26 = $[51];
|
|
344
|
+
const t27 = __rspack_external__radix_ui_react_popover_c8444160;
|
|
345
|
+
const t28 = shouldDestroy ? void 0 : true;
|
|
319
346
|
const T0 = TaoPortalScope;
|
|
320
|
-
const t27 = true;
|
|
321
|
-
const t28 = __rspack_external__radix_ui_react_popover_c8444160;
|
|
322
347
|
const t29 = true;
|
|
323
|
-
const t30 =
|
|
324
|
-
const t31 =
|
|
325
|
-
const t32 = !
|
|
326
|
-
const t33 =
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
t34 = cx(t33, className);
|
|
330
|
-
$[47] = className;
|
|
331
|
-
$[48] = t33;
|
|
332
|
-
$[49] = t34;
|
|
333
|
-
} else t34 = $[49];
|
|
334
|
-
const t35 = styles?.root;
|
|
348
|
+
const t30 = __rspack_external__radix_ui_react_popover_c8444160;
|
|
349
|
+
const t31 = true;
|
|
350
|
+
const t32 = ariaLabelledBy ?? (!ariaLabel && isRenderable(titleNode) ? titleId : void 0);
|
|
351
|
+
const t33 = "";
|
|
352
|
+
const t34 = !shouldDestroy || void 0;
|
|
353
|
+
const t35 = classNames?.root;
|
|
335
354
|
let t36;
|
|
336
|
-
if ($[
|
|
337
|
-
t36 =
|
|
338
|
-
|
|
355
|
+
if ($[52] !== className || $[53] !== t35) {
|
|
356
|
+
t36 = cx(t35, className);
|
|
357
|
+
$[52] = className;
|
|
358
|
+
$[53] = t35;
|
|
359
|
+
$[54] = t36;
|
|
360
|
+
} else t36 = $[54];
|
|
361
|
+
const t37 = styles?.root;
|
|
362
|
+
let t38;
|
|
363
|
+
if ($[55] !== style || $[56] !== t37) {
|
|
364
|
+
t38 = {
|
|
365
|
+
...t37,
|
|
339
366
|
...style
|
|
340
367
|
};
|
|
341
|
-
$[
|
|
342
|
-
$[
|
|
343
|
-
$[
|
|
344
|
-
} else
|
|
345
|
-
const
|
|
346
|
-
const
|
|
347
|
-
const
|
|
348
|
-
const
|
|
349
|
-
let
|
|
350
|
-
if ($[
|
|
351
|
-
|
|
368
|
+
$[55] = style;
|
|
369
|
+
$[56] = t37;
|
|
370
|
+
$[57] = t38;
|
|
371
|
+
} else t38 = $[57];
|
|
372
|
+
const t39 = "rtl" === direction && ("top" === placementProps.side || "bottom" === placementProps.side) && "center" !== placementProps.align ? "start" === placementProps.align ? "end" : "start" : placementProps.align;
|
|
373
|
+
const t40 = 4;
|
|
374
|
+
const t41 = shouldDestroy ? void 0 : true;
|
|
375
|
+
const t42 = _temp;
|
|
376
|
+
let t43;
|
|
377
|
+
if ($[58] !== focusMode) {
|
|
378
|
+
t43 = ()=>{
|
|
352
379
|
restoreAfterEscape.current = focusMode && !!popupRef.current?.contains(document.activeElement);
|
|
353
380
|
};
|
|
354
|
-
$[
|
|
355
|
-
$[
|
|
356
|
-
} else
|
|
357
|
-
let
|
|
358
|
-
if ($[
|
|
359
|
-
|
|
381
|
+
$[58] = focusMode;
|
|
382
|
+
$[59] = t43;
|
|
383
|
+
} else t43 = $[59];
|
|
384
|
+
let t44;
|
|
385
|
+
if ($[60] !== shouldDestroy) {
|
|
386
|
+
t44 = (event_2)=>{
|
|
360
387
|
const focusedRetainedContent = !shouldDestroy && event_2.currentTarget instanceof HTMLElement && event_2.currentTarget.contains(document.activeElement);
|
|
361
388
|
if (restoreAfterEscape.current || focusedRetainedContent) {
|
|
362
389
|
restoreAfterEscape.current = false;
|
|
@@ -366,62 +393,69 @@ function Popover(t0) {
|
|
|
366
393
|
restoringFocus.current = false;
|
|
367
394
|
}
|
|
368
395
|
};
|
|
369
|
-
$[
|
|
370
|
-
$[
|
|
371
|
-
} else
|
|
372
|
-
const
|
|
373
|
-
const
|
|
374
|
-
let
|
|
375
|
-
if ($[
|
|
376
|
-
|
|
377
|
-
if (
|
|
396
|
+
$[60] = shouldDestroy;
|
|
397
|
+
$[61] = t44;
|
|
398
|
+
} else t44 = $[61];
|
|
399
|
+
const t45 = focusMode ? cancelTimers : void 0;
|
|
400
|
+
const t46 = focusMode ? handleBlur : void 0;
|
|
401
|
+
let t47;
|
|
402
|
+
if ($[62] === Symbol.for("react.memo_cache_sentinel")) {
|
|
403
|
+
t47 = (event_3)=>{
|
|
404
|
+
if (containsTrigger(event_3.target)) event_3.preventDefault();
|
|
378
405
|
};
|
|
379
|
-
$[
|
|
380
|
-
|
|
381
|
-
} else t45 = $[58];
|
|
382
|
-
const T1 = popover_PopoverSurface;
|
|
383
|
-
const t46 = "";
|
|
384
|
-
const t47 = classNames?.container;
|
|
406
|
+
$[62] = t47;
|
|
407
|
+
} else t47 = $[62];
|
|
385
408
|
let t48;
|
|
386
|
-
if ($[
|
|
387
|
-
t48 =
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
409
|
+
if ($[63] !== focusMode) {
|
|
410
|
+
t48 = (event_4)=>{
|
|
411
|
+
if (focusMode) event_4.preventDefault();
|
|
412
|
+
};
|
|
413
|
+
$[63] = focusMode;
|
|
414
|
+
$[64] = t48;
|
|
415
|
+
} else t48 = $[64];
|
|
416
|
+
const T1 = popover_PopoverSurface;
|
|
417
|
+
const t49 = "";
|
|
418
|
+
const t50 = classNames?.container;
|
|
419
|
+
let t51;
|
|
420
|
+
if ($[65] !== t50) {
|
|
421
|
+
t51 = cx(t50);
|
|
422
|
+
$[65] = t50;
|
|
423
|
+
$[66] = t51;
|
|
424
|
+
} else t51 = $[66];
|
|
425
|
+
const t52 = styles?.container;
|
|
426
|
+
const t53 = isRenderable(titleNode) && /*#__PURE__*/ jsx("div", {
|
|
393
427
|
"data-tao-popover-title": "",
|
|
394
428
|
id: titleId,
|
|
395
429
|
className: cx(classNames?.title),
|
|
396
430
|
style: styles?.title,
|
|
397
431
|
children: titleNode
|
|
398
432
|
});
|
|
399
|
-
const
|
|
433
|
+
const t54 = isRenderable(contentNode) && /*#__PURE__*/ jsx("div", {
|
|
400
434
|
"data-tao-popover-content": "",
|
|
401
435
|
className: cx(classNames?.content),
|
|
402
436
|
style: styles?.content,
|
|
403
437
|
children: contentNode
|
|
404
438
|
});
|
|
405
|
-
let
|
|
406
|
-
if ($[
|
|
407
|
-
|
|
408
|
-
"data-tao-popover-container":
|
|
409
|
-
className:
|
|
410
|
-
style:
|
|
439
|
+
let t55;
|
|
440
|
+
if ($[67] !== t51 || $[68] !== t52 || $[69] !== t53 || $[70] !== t54) {
|
|
441
|
+
t55 = /*#__PURE__*/ jsxs("div", {
|
|
442
|
+
"data-tao-popover-container": t49,
|
|
443
|
+
className: t51,
|
|
444
|
+
style: t52,
|
|
411
445
|
children: [
|
|
412
|
-
|
|
413
|
-
|
|
446
|
+
t53,
|
|
447
|
+
t54
|
|
414
448
|
]
|
|
415
449
|
});
|
|
416
|
-
$[
|
|
417
|
-
$[
|
|
418
|
-
$[
|
|
419
|
-
$[
|
|
420
|
-
$[
|
|
421
|
-
} else
|
|
422
|
-
let
|
|
423
|
-
if ($[
|
|
424
|
-
|
|
450
|
+
$[67] = t51;
|
|
451
|
+
$[68] = t52;
|
|
452
|
+
$[69] = t53;
|
|
453
|
+
$[70] = t54;
|
|
454
|
+
$[71] = t55;
|
|
455
|
+
} else t55 = $[71];
|
|
456
|
+
let t56;
|
|
457
|
+
if ($[72] !== arrow || $[73] !== classNames?.arrow || $[74] !== styles?.arrow) {
|
|
458
|
+
t56 = false !== arrow && /*#__PURE__*/ jsx(__rspack_external__radix_ui_react_popover_c8444160.Arrow, {
|
|
425
459
|
asChild: true,
|
|
426
460
|
children: /*#__PURE__*/ jsx("span", {
|
|
427
461
|
"data-tao-popover-arrow": "",
|
|
@@ -429,112 +463,114 @@ function Popover(t0) {
|
|
|
429
463
|
style: styles?.arrow
|
|
430
464
|
})
|
|
431
465
|
});
|
|
432
|
-
$[
|
|
433
|
-
$[
|
|
434
|
-
$[
|
|
435
|
-
$[
|
|
436
|
-
} else
|
|
437
|
-
let
|
|
438
|
-
if ($[
|
|
439
|
-
|
|
466
|
+
$[72] = arrow;
|
|
467
|
+
$[73] = classNames?.arrow;
|
|
468
|
+
$[74] = styles?.arrow;
|
|
469
|
+
$[75] = t56;
|
|
470
|
+
} else t56 = $[75];
|
|
471
|
+
let t57;
|
|
472
|
+
if ($[76] !== T1 || $[77] !== t55 || $[78] !== t56) {
|
|
473
|
+
t57 = /*#__PURE__*/ jsxs(T1, {
|
|
440
474
|
children: [
|
|
441
|
-
|
|
442
|
-
|
|
475
|
+
t55,
|
|
476
|
+
t56
|
|
443
477
|
]
|
|
444
478
|
});
|
|
445
|
-
$[
|
|
446
|
-
$[
|
|
447
|
-
$[
|
|
448
|
-
$[
|
|
449
|
-
} else
|
|
450
|
-
let
|
|
451
|
-
if ($[
|
|
452
|
-
|
|
453
|
-
asChild:
|
|
479
|
+
$[76] = T1;
|
|
480
|
+
$[77] = t55;
|
|
481
|
+
$[78] = t56;
|
|
482
|
+
$[79] = t57;
|
|
483
|
+
} else t57 = $[79];
|
|
484
|
+
let t58;
|
|
485
|
+
if ($[80] !== ariaDescribedBy || $[81] !== ariaLabel || $[82] !== hoverProps || $[83] !== placement || $[84] !== placementProps || $[85] !== t30.Content || $[86] !== t32 || $[87] !== t34 || $[88] !== t36 || $[89] !== t38 || $[90] !== t39 || $[91] !== t41 || $[92] !== t42 || $[93] !== t43 || $[94] !== t44 || $[95] !== t45 || $[96] !== t46 || $[97] !== t47 || $[98] !== t48 || $[99] !== t57) {
|
|
486
|
+
t58 = /*#__PURE__*/ jsx(t30.Content, {
|
|
487
|
+
asChild: t31,
|
|
454
488
|
ref: popupRef,
|
|
455
489
|
"aria-label": ariaLabel,
|
|
456
|
-
"aria-labelledby":
|
|
490
|
+
"aria-labelledby": t32,
|
|
457
491
|
"aria-describedby": ariaDescribedBy,
|
|
458
|
-
"data-tao-popover":
|
|
492
|
+
"data-tao-popover": t33,
|
|
459
493
|
"data-tao-placement": placement,
|
|
460
|
-
"data-tao-keep-alive":
|
|
461
|
-
className:
|
|
462
|
-
style:
|
|
494
|
+
"data-tao-keep-alive": t34,
|
|
495
|
+
className: t36,
|
|
496
|
+
style: t38,
|
|
463
497
|
...placementProps,
|
|
464
|
-
align:
|
|
465
|
-
sideOffset:
|
|
466
|
-
forceMount:
|
|
467
|
-
onOpenAutoFocus:
|
|
468
|
-
onEscapeKeyDown:
|
|
469
|
-
onCloseAutoFocus:
|
|
470
|
-
onFocusCapture:
|
|
471
|
-
onBlurCapture:
|
|
472
|
-
|
|
498
|
+
align: t39,
|
|
499
|
+
sideOffset: t40,
|
|
500
|
+
forceMount: t41,
|
|
501
|
+
onOpenAutoFocus: t42,
|
|
502
|
+
onEscapeKeyDown: t43,
|
|
503
|
+
onCloseAutoFocus: t44,
|
|
504
|
+
onFocusCapture: t45,
|
|
505
|
+
onBlurCapture: t46,
|
|
506
|
+
onInteractOutside: t47,
|
|
507
|
+
onFocusOutside: t48,
|
|
473
508
|
...hoverProps,
|
|
474
|
-
children:
|
|
509
|
+
children: t57
|
|
475
510
|
});
|
|
476
|
-
$[
|
|
477
|
-
$[
|
|
478
|
-
$[
|
|
479
|
-
$[
|
|
480
|
-
$[
|
|
481
|
-
$[
|
|
482
|
-
$[
|
|
483
|
-
$[
|
|
484
|
-
$[
|
|
485
|
-
$[
|
|
486
|
-
$[
|
|
487
|
-
$[
|
|
488
|
-
$[
|
|
489
|
-
$[
|
|
490
|
-
$[
|
|
491
|
-
$[
|
|
492
|
-
$[
|
|
493
|
-
$[
|
|
494
|
-
$[
|
|
495
|
-
$[
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
511
|
+
$[80] = ariaDescribedBy;
|
|
512
|
+
$[81] = ariaLabel;
|
|
513
|
+
$[82] = hoverProps;
|
|
514
|
+
$[83] = placement;
|
|
515
|
+
$[84] = placementProps;
|
|
516
|
+
$[85] = t30.Content;
|
|
517
|
+
$[86] = t32;
|
|
518
|
+
$[87] = t34;
|
|
519
|
+
$[88] = t36;
|
|
520
|
+
$[89] = t38;
|
|
521
|
+
$[90] = t39;
|
|
522
|
+
$[91] = t41;
|
|
523
|
+
$[92] = t42;
|
|
524
|
+
$[93] = t43;
|
|
525
|
+
$[94] = t44;
|
|
526
|
+
$[95] = t45;
|
|
527
|
+
$[96] = t46;
|
|
528
|
+
$[97] = t47;
|
|
529
|
+
$[98] = t48;
|
|
530
|
+
$[99] = t57;
|
|
531
|
+
$[100] = t58;
|
|
532
|
+
} else t58 = $[100];
|
|
533
|
+
let t59;
|
|
534
|
+
if ($[101] !== T0 || $[102] !== direction || $[103] !== t58) {
|
|
535
|
+
t59 = /*#__PURE__*/ jsx(T0, {
|
|
536
|
+
asChild: t29,
|
|
501
537
|
direction: direction,
|
|
502
|
-
children:
|
|
538
|
+
children: t58
|
|
503
539
|
});
|
|
504
|
-
$[
|
|
505
|
-
$[
|
|
506
|
-
$[
|
|
507
|
-
$[
|
|
508
|
-
} else
|
|
509
|
-
let
|
|
510
|
-
if ($[
|
|
511
|
-
|
|
512
|
-
forceMount:
|
|
513
|
-
children:
|
|
540
|
+
$[101] = T0;
|
|
541
|
+
$[102] = direction;
|
|
542
|
+
$[103] = t58;
|
|
543
|
+
$[104] = t59;
|
|
544
|
+
} else t59 = $[104];
|
|
545
|
+
let t60;
|
|
546
|
+
if ($[105] !== t27.Portal || $[106] !== t28 || $[107] !== t59) {
|
|
547
|
+
t60 = /*#__PURE__*/ jsx(t27.Portal, {
|
|
548
|
+
forceMount: t28,
|
|
549
|
+
children: t59
|
|
514
550
|
});
|
|
515
|
-
$[
|
|
516
|
-
$[
|
|
517
|
-
$[
|
|
518
|
-
$[
|
|
519
|
-
} else
|
|
520
|
-
let
|
|
521
|
-
if ($[
|
|
522
|
-
|
|
551
|
+
$[105] = t27.Portal;
|
|
552
|
+
$[106] = t28;
|
|
553
|
+
$[107] = t59;
|
|
554
|
+
$[108] = t60;
|
|
555
|
+
} else t60 = $[108];
|
|
556
|
+
let t61;
|
|
557
|
+
if ($[109] !== changeOpen || $[110] !== realOpen || $[111] !== t24.Root || $[112] !== t26 || $[113] !== t60) {
|
|
558
|
+
t61 = /*#__PURE__*/ jsxs(t24.Root, {
|
|
523
559
|
open: realOpen,
|
|
524
560
|
onOpenChange: changeOpen,
|
|
525
561
|
children: [
|
|
526
|
-
|
|
527
|
-
|
|
562
|
+
t26,
|
|
563
|
+
t60
|
|
528
564
|
]
|
|
529
565
|
});
|
|
530
|
-
$[
|
|
531
|
-
$[
|
|
532
|
-
$[
|
|
533
|
-
$[
|
|
534
|
-
$[
|
|
535
|
-
$[
|
|
536
|
-
} else
|
|
537
|
-
return
|
|
566
|
+
$[109] = changeOpen;
|
|
567
|
+
$[110] = realOpen;
|
|
568
|
+
$[111] = t24.Root;
|
|
569
|
+
$[112] = t26;
|
|
570
|
+
$[113] = t60;
|
|
571
|
+
$[114] = t61;
|
|
572
|
+
} else t61 = $[114];
|
|
573
|
+
return t61;
|
|
538
574
|
}
|
|
539
575
|
function _temp(event_1) {
|
|
540
576
|
return event_1.preventDefault();
|