@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
|
@@ -1,11 +1,18 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { 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
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(41);
|
|
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,349 +216,188 @@ 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 =
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
$[24] = t17;
|
|
245
|
-
} else t17 = $[24];
|
|
246
|
-
return t17;
|
|
247
|
-
}
|
|
248
|
-
let t17;
|
|
249
|
-
if ($[25] !== hoverMode || $[26] !== scheduleClose || $[27] !== scheduleOpen) {
|
|
250
|
-
t17 = hoverMode ? {
|
|
251
|
-
onPointerEnter: scheduleOpen,
|
|
252
|
-
onPointerLeave: scheduleClose
|
|
253
|
-
} : void 0;
|
|
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 ? ()=>{
|
|
260
|
+
$[26] = changeOpen;
|
|
261
|
+
$[27] = t18;
|
|
262
|
+
} else t18 = $[27];
|
|
263
|
+
const handleBlur = t18;
|
|
264
|
+
const hoverProps = hasPopup && hoverMode ? {
|
|
265
|
+
onPointerEnter: scheduleOpen,
|
|
266
|
+
onPointerLeave: scheduleClose
|
|
267
|
+
} : void 0;
|
|
268
|
+
const triggerProps = hasPopup ? {
|
|
269
|
+
...hoverProps,
|
|
270
|
+
onFocus: focusMode ? ()=>{
|
|
263
271
|
if (!restoringFocus.current) changeOpen(true);
|
|
264
|
-
} : void 0
|
|
265
|
-
|
|
266
|
-
|
|
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)=>{
|
|
272
|
+
} : void 0,
|
|
273
|
+
onBlur: focusMode ? handleBlur : void 0,
|
|
274
|
+
onContextMenu: contextMenuMode ? (event_0)=>{
|
|
273
275
|
if (event_0.defaultPrevented) return;
|
|
274
276
|
event_0.preventDefault();
|
|
275
277
|
changeOpen(true);
|
|
276
|
-
} : void 0
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
} else t20 = $[34];
|
|
278
|
+
} : void 0
|
|
279
|
+
} : void 0;
|
|
280
|
+
const t19 = __rspack_external__radix_ui_react_popover_c8444160;
|
|
281
|
+
const t20 = hasPopup && realOpen;
|
|
281
282
|
let t21;
|
|
282
|
-
if ($[
|
|
283
|
-
t21 =
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
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;
|
|
297
|
-
let 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, {
|
|
283
|
+
if ($[28] !== children) {
|
|
284
|
+
t21 = asTriggerChild(children);
|
|
285
|
+
$[28] = children;
|
|
286
|
+
$[29] = t21;
|
|
287
|
+
} else t21 = $[29];
|
|
288
|
+
let t22;
|
|
289
|
+
if ($[30] !== TriggerPrimitive || $[31] !== setTriggerRef || $[32] !== t21 || $[33] !== triggerProps) {
|
|
290
|
+
t22 = /*#__PURE__*/ jsx(TriggerPrimitive, {
|
|
306
291
|
asChild: true,
|
|
307
292
|
ref: setTriggerRef,
|
|
308
293
|
...triggerProps,
|
|
309
|
-
children:
|
|
294
|
+
children: t21
|
|
310
295
|
});
|
|
311
|
-
$[
|
|
312
|
-
$[
|
|
313
|
-
$[
|
|
314
|
-
$[
|
|
315
|
-
$[
|
|
316
|
-
} else
|
|
317
|
-
const
|
|
318
|
-
|
|
319
|
-
|
|
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;
|
|
327
|
-
let t34;
|
|
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,
|
|
339
|
-
...style
|
|
340
|
-
};
|
|
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;
|
|
349
|
-
let t41;
|
|
350
|
-
if ($[53] !== focusMode) {
|
|
351
|
-
t41 = ()=>{
|
|
352
|
-
restoreAfterEscape.current = focusMode && !!popupRef.current?.contains(document.activeElement);
|
|
353
|
-
};
|
|
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", {
|
|
393
|
-
"data-tao-popover-title": "",
|
|
394
|
-
id: titleId,
|
|
395
|
-
className: cx(classNames?.title),
|
|
396
|
-
style: styles?.title,
|
|
397
|
-
children: titleNode
|
|
398
|
-
});
|
|
399
|
-
const t51 = isRenderable(contentNode) && /*#__PURE__*/ jsx("div", {
|
|
400
|
-
"data-tao-popover-content": "",
|
|
401
|
-
className: cx(classNames?.content),
|
|
402
|
-
style: styles?.content,
|
|
403
|
-
children: contentNode
|
|
404
|
-
});
|
|
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,
|
|
411
|
-
children: [
|
|
412
|
-
t50,
|
|
413
|
-
t51
|
|
414
|
-
]
|
|
415
|
-
});
|
|
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, {
|
|
296
|
+
$[30] = TriggerPrimitive;
|
|
297
|
+
$[31] = setTriggerRef;
|
|
298
|
+
$[32] = t21;
|
|
299
|
+
$[33] = triggerProps;
|
|
300
|
+
$[34] = t22;
|
|
301
|
+
} else t22 = $[34];
|
|
302
|
+
const t23 = hasPopup && /*#__PURE__*/ jsx(__rspack_external__radix_ui_react_popover_c8444160.Portal, {
|
|
303
|
+
forceMount: shouldDestroy ? void 0 : true,
|
|
304
|
+
children: /*#__PURE__*/ jsx(TaoPortalScope, {
|
|
425
305
|
asChild: true,
|
|
426
|
-
children: /*#__PURE__*/ jsx("span", {
|
|
427
|
-
"data-tao-popover-arrow": "",
|
|
428
|
-
className: cx(classNames?.arrow),
|
|
429
|
-
style: styles?.arrow
|
|
430
|
-
})
|
|
431
|
-
});
|
|
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,
|
|
454
|
-
ref: popupRef,
|
|
455
|
-
"aria-label": ariaLabel,
|
|
456
|
-
"aria-labelledby": t30,
|
|
457
|
-
"aria-describedby": ariaDescribedBy,
|
|
458
|
-
"data-tao-popover": t31,
|
|
459
|
-
"data-tao-placement": placement,
|
|
460
|
-
"data-tao-keep-alive": t32,
|
|
461
|
-
className: t34,
|
|
462
|
-
style: t36,
|
|
463
|
-
...placementProps,
|
|
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,
|
|
473
|
-
...hoverProps,
|
|
474
|
-
children: t54
|
|
475
|
-
});
|
|
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,
|
|
501
306
|
direction: direction,
|
|
502
|
-
children:
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
307
|
+
children: /*#__PURE__*/ jsx(__rspack_external__radix_ui_react_popover_c8444160.Content, {
|
|
308
|
+
asChild: true,
|
|
309
|
+
ref: popupRef,
|
|
310
|
+
"aria-label": ariaLabel,
|
|
311
|
+
"aria-labelledby": ariaLabelledBy ?? (!ariaLabel && isRenderable(titleNode) ? titleId : void 0),
|
|
312
|
+
"aria-describedby": ariaDescribedBy,
|
|
313
|
+
"data-tao-popover": "",
|
|
314
|
+
"data-tao-placement": placement,
|
|
315
|
+
"data-tao-keep-alive": !shouldDestroy || void 0,
|
|
316
|
+
className: cx(classNames?.root, className),
|
|
317
|
+
style: {
|
|
318
|
+
...styles?.root,
|
|
319
|
+
...style
|
|
320
|
+
},
|
|
321
|
+
...placementProps,
|
|
322
|
+
align: "rtl" === direction && ("top" === placementProps.side || "bottom" === placementProps.side) && "center" !== placementProps.align ? "start" === placementProps.align ? "end" : "start" : placementProps.align,
|
|
323
|
+
sideOffset: 4,
|
|
324
|
+
forceMount: shouldDestroy ? void 0 : true,
|
|
325
|
+
onOpenAutoFocus: _temp,
|
|
326
|
+
onEscapeKeyDown: ()=>{
|
|
327
|
+
restoreAfterEscape.current = focusMode && !!popupRef.current?.contains(document.activeElement);
|
|
328
|
+
},
|
|
329
|
+
onCloseAutoFocus: (event_2)=>{
|
|
330
|
+
const focusedRetainedContent = !shouldDestroy && event_2.currentTarget instanceof HTMLElement && event_2.currentTarget.contains(document.activeElement);
|
|
331
|
+
if (restoreAfterEscape.current || focusedRetainedContent) {
|
|
332
|
+
restoreAfterEscape.current = false;
|
|
333
|
+
event_2.preventDefault();
|
|
334
|
+
restoringFocus.current = true;
|
|
335
|
+
triggerRef.current?.focus();
|
|
336
|
+
restoringFocus.current = false;
|
|
337
|
+
}
|
|
338
|
+
},
|
|
339
|
+
onFocusCapture: focusMode ? cancelTimers : void 0,
|
|
340
|
+
onBlurCapture: focusMode ? handleBlur : void 0,
|
|
341
|
+
onInteractOutside: (event_3)=>{
|
|
342
|
+
if (containsTrigger(event_3.target)) event_3.preventDefault();
|
|
343
|
+
},
|
|
344
|
+
onFocusOutside: (event_4)=>{
|
|
345
|
+
if (focusMode) event_4.preventDefault();
|
|
346
|
+
},
|
|
347
|
+
...hoverProps,
|
|
348
|
+
children: /*#__PURE__*/ jsxs(popover_PopoverSurface, {
|
|
349
|
+
children: [
|
|
350
|
+
/*#__PURE__*/ jsxs("div", {
|
|
351
|
+
"data-tao-popover-container": "",
|
|
352
|
+
className: cx(classNames?.container),
|
|
353
|
+
style: styles?.container,
|
|
354
|
+
children: [
|
|
355
|
+
isRenderable(titleNode) && /*#__PURE__*/ jsx("div", {
|
|
356
|
+
"data-tao-popover-title": "",
|
|
357
|
+
id: titleId,
|
|
358
|
+
className: cx(classNames?.title),
|
|
359
|
+
style: styles?.title,
|
|
360
|
+
children: titleNode
|
|
361
|
+
}),
|
|
362
|
+
isRenderable(contentNode) && /*#__PURE__*/ jsx("div", {
|
|
363
|
+
"data-tao-popover-content": "",
|
|
364
|
+
className: cx(classNames?.content),
|
|
365
|
+
style: styles?.content,
|
|
366
|
+
children: contentNode
|
|
367
|
+
})
|
|
368
|
+
]
|
|
369
|
+
}),
|
|
370
|
+
false !== arrow && /*#__PURE__*/ jsx(__rspack_external__radix_ui_react_popover_c8444160.Arrow, {
|
|
371
|
+
asChild: true,
|
|
372
|
+
children: /*#__PURE__*/ jsx("span", {
|
|
373
|
+
"data-tao-popover-arrow": "",
|
|
374
|
+
className: cx(classNames?.arrow),
|
|
375
|
+
style: styles?.arrow
|
|
376
|
+
})
|
|
377
|
+
})
|
|
378
|
+
]
|
|
379
|
+
})
|
|
380
|
+
})
|
|
381
|
+
})
|
|
382
|
+
});
|
|
383
|
+
let t24;
|
|
384
|
+
if ($[35] !== changeOpen || $[36] !== t19.Root || $[37] !== t20 || $[38] !== t22 || $[39] !== t23) {
|
|
385
|
+
t24 = /*#__PURE__*/ jsxs(t19.Root, {
|
|
386
|
+
open: t20,
|
|
524
387
|
onOpenChange: changeOpen,
|
|
525
388
|
children: [
|
|
526
|
-
|
|
527
|
-
|
|
389
|
+
t22,
|
|
390
|
+
t23
|
|
528
391
|
]
|
|
529
392
|
});
|
|
530
|
-
$[
|
|
531
|
-
$[
|
|
532
|
-
$[
|
|
533
|
-
$[
|
|
534
|
-
$[
|
|
535
|
-
$[
|
|
536
|
-
} else
|
|
537
|
-
return
|
|
393
|
+
$[35] = changeOpen;
|
|
394
|
+
$[36] = t19.Root;
|
|
395
|
+
$[37] = t20;
|
|
396
|
+
$[38] = t22;
|
|
397
|
+
$[39] = t23;
|
|
398
|
+
$[40] = t24;
|
|
399
|
+
} else t24 = $[40];
|
|
400
|
+
return t24;
|
|
538
401
|
}
|
|
539
402
|
function _temp(event_1) {
|
|
540
403
|
return event_1.preventDefault();
|