@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
|
@@ -6,7 +6,7 @@ import { RemoveScroll } from "react-remove-scroll";
|
|
|
6
6
|
import { TaoPortalScope, TaoProvider, useTaoConfig } from "../../provider/tao-provider.js";
|
|
7
7
|
import { resolveResponsiveValue, useBreakpoint } from "../../utils/breakpoint.js";
|
|
8
8
|
import { DialogContent } from "../../utils/dialog-content.js";
|
|
9
|
-
import { preventParentOutsideDismiss } from "../../utils/portal.js";
|
|
9
|
+
import { isEscapeForOpenCombobox, preventParentOutsideDismiss } from "../../utils/portal.js";
|
|
10
10
|
import { cx } from "../../utils/semantic.js";
|
|
11
11
|
import { Button } from "../button/button.js";
|
|
12
12
|
import { useWatermarkPanelRef } from "../watermark/watermark-context.js";
|
|
@@ -24,7 +24,7 @@ function CancelBtn() {
|
|
|
24
24
|
return useContext(ModalActionContext).cancel;
|
|
25
25
|
}
|
|
26
26
|
function Modal(t0) {
|
|
27
|
-
const $ = c(
|
|
27
|
+
const $ = c(174);
|
|
28
28
|
const { direction, open, onClose, title, footer, onOk, okText, cancelText, confirmLoading, okButtonProps, cancelButtonProps, width: t1, centered: t2, closable: t3, maskClosable: t4, keyboard: t5, getContainer, mask: t6, zIndex, scrollLock: t7, closeIcon, modalRender, wrapProps, transitionName, maskTransitionName, focusTriggerAfterClose, autoFocusButton, focusable, afterClose, destroyOnHidden: t8, children, classNames, styles: stylesProp, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy } = t0;
|
|
29
29
|
const width = void 0 === t1 ? 520 : t1;
|
|
30
30
|
const centered = void 0 === t2 ? true : t2;
|
|
@@ -101,85 +101,88 @@ function Modal(t0) {
|
|
|
101
101
|
$[13] = t16;
|
|
102
102
|
} else t16 = $[13];
|
|
103
103
|
const contentStyle = t16;
|
|
104
|
-
|
|
104
|
+
const t17 = cancelButtonProps?.disabled ?? false;
|
|
105
|
+
let t18;
|
|
105
106
|
if ($[14] !== cancelButtonProps || $[15] !== onClose) {
|
|
106
|
-
|
|
107
|
+
t18 = (event)=>{
|
|
107
108
|
cancelButtonProps?.onClick?.(event);
|
|
108
109
|
if (!event.defaultPrevented) onClose?.();
|
|
109
110
|
};
|
|
110
111
|
$[14] = cancelButtonProps;
|
|
111
112
|
$[15] = onClose;
|
|
112
|
-
$[16] =
|
|
113
|
-
} else
|
|
114
|
-
const
|
|
115
|
-
let
|
|
116
|
-
if ($[17] !== cancelButtonProps || $[18] !== t17 || $[19] !== t18) {
|
|
117
|
-
|
|
113
|
+
$[16] = t18;
|
|
114
|
+
} else t18 = $[16];
|
|
115
|
+
const t19 = void 0 === cancelText ? locale.cancel : cancelText;
|
|
116
|
+
let t20;
|
|
117
|
+
if ($[17] !== cancelButtonProps || $[18] !== t17 || $[19] !== t18 || $[20] !== t19) {
|
|
118
|
+
t20 = /*#__PURE__*/ jsx(Button, {
|
|
118
119
|
variant: "secondary",
|
|
119
120
|
"data-tao-modal-action": "cancel",
|
|
120
121
|
...cancelButtonProps,
|
|
121
|
-
|
|
122
|
-
|
|
122
|
+
disabled: t17,
|
|
123
|
+
onClick: t18,
|
|
124
|
+
children: t19
|
|
123
125
|
});
|
|
124
126
|
$[17] = cancelButtonProps;
|
|
125
127
|
$[18] = t17;
|
|
126
128
|
$[19] = t18;
|
|
127
129
|
$[20] = t19;
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
const
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
130
|
+
$[21] = t20;
|
|
131
|
+
} else t20 = $[21];
|
|
132
|
+
const cancelButton = t20;
|
|
133
|
+
const t21 = confirmLoading || okButtonProps?.loading;
|
|
134
|
+
let t22;
|
|
135
|
+
if ($[22] !== okButtonProps || $[23] !== onOk) {
|
|
136
|
+
t22 = (event_0)=>{
|
|
134
137
|
okButtonProps?.onClick?.(event_0);
|
|
135
138
|
if (!event_0.defaultPrevented) onOk?.();
|
|
136
139
|
};
|
|
137
|
-
$[
|
|
138
|
-
$[
|
|
139
|
-
$[
|
|
140
|
-
} else
|
|
141
|
-
const
|
|
142
|
-
let
|
|
143
|
-
if ($[
|
|
144
|
-
|
|
140
|
+
$[22] = okButtonProps;
|
|
141
|
+
$[23] = onOk;
|
|
142
|
+
$[24] = t22;
|
|
143
|
+
} else t22 = $[24];
|
|
144
|
+
const t23 = void 0 === okText ? locale.ok : okText;
|
|
145
|
+
let t24;
|
|
146
|
+
if ($[25] !== okButtonProps || $[26] !== t21 || $[27] !== t22 || $[28] !== t23) {
|
|
147
|
+
t24 = /*#__PURE__*/ jsx(Button, {
|
|
145
148
|
variant: "primary",
|
|
146
149
|
"data-tao-modal-action": "ok",
|
|
147
150
|
...okButtonProps,
|
|
148
|
-
loading:
|
|
149
|
-
onClick:
|
|
150
|
-
children:
|
|
151
|
+
loading: t21,
|
|
152
|
+
onClick: t22,
|
|
153
|
+
children: t23
|
|
151
154
|
});
|
|
152
|
-
$[
|
|
153
|
-
$[25] = t20;
|
|
155
|
+
$[25] = okButtonProps;
|
|
154
156
|
$[26] = t21;
|
|
155
157
|
$[27] = t22;
|
|
156
158
|
$[28] = t23;
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
159
|
+
$[29] = t24;
|
|
160
|
+
} else t24 = $[29];
|
|
161
|
+
const okButton = t24;
|
|
162
|
+
let t25;
|
|
163
|
+
if ($[30] === Symbol.for("react.memo_cache_sentinel")) {
|
|
164
|
+
t25 = /*#__PURE__*/ jsxs(Fragment, {
|
|
162
165
|
children: [
|
|
163
166
|
/*#__PURE__*/ jsx(CancelBtn, {}),
|
|
164
167
|
/*#__PURE__*/ jsx(OkBtn, {})
|
|
165
168
|
]
|
|
166
169
|
});
|
|
167
|
-
$[
|
|
168
|
-
} else
|
|
169
|
-
const defaultFooter =
|
|
170
|
+
$[30] = t25;
|
|
171
|
+
} else t25 = $[30];
|
|
172
|
+
const defaultFooter = t25;
|
|
170
173
|
let footerContent;
|
|
171
174
|
if (void 0 === footer) footerContent = defaultFooter;
|
|
172
175
|
else if ("function" == typeof footer) {
|
|
173
|
-
let
|
|
174
|
-
if ($[
|
|
175
|
-
|
|
176
|
+
let t26;
|
|
177
|
+
if ($[31] !== footer) {
|
|
178
|
+
t26 = footer(defaultFooter, {
|
|
176
179
|
OkBtn: OkBtn,
|
|
177
180
|
CancelBtn: CancelBtn
|
|
178
181
|
});
|
|
179
|
-
$[
|
|
180
|
-
$[
|
|
181
|
-
} else
|
|
182
|
-
footerContent =
|
|
182
|
+
$[31] = footer;
|
|
183
|
+
$[32] = t26;
|
|
184
|
+
} else t26 = $[32];
|
|
185
|
+
footerContent = t26;
|
|
183
186
|
} else footerContent = footer;
|
|
184
187
|
const keepAlive = !destroyOnHidden;
|
|
185
188
|
const forceMount = keepAlive ? true : void 0;
|
|
@@ -190,9 +193,9 @@ function Modal(t0) {
|
|
|
190
193
|
const showClose = closable && null !== mergedCloseIcon && false !== mergedCloseIcon;
|
|
191
194
|
const trapFocus = focusable?.trap ?? true;
|
|
192
195
|
const customInteraction = !scrollLock || !trapFocus;
|
|
193
|
-
let
|
|
194
|
-
if ($[
|
|
195
|
-
|
|
196
|
+
let t26;
|
|
197
|
+
if ($[33] !== autoFocusButton || $[34] !== focusable) {
|
|
198
|
+
t26 = (event_1)=>{
|
|
196
199
|
restoreFocusRef.current = document.activeElement;
|
|
197
200
|
const button = focusable?.autoFocusButton !== void 0 ? focusable.autoFocusButton : autoFocusButton;
|
|
198
201
|
if (null === button) event_1.preventDefault();
|
|
@@ -202,26 +205,26 @@ function Modal(t0) {
|
|
|
202
205
|
if (target && document.activeElement === target) event_1.preventDefault();
|
|
203
206
|
}
|
|
204
207
|
};
|
|
205
|
-
$[
|
|
206
|
-
$[
|
|
207
|
-
$[
|
|
208
|
-
} else
|
|
209
|
-
const openAutoFocus =
|
|
210
|
-
let
|
|
211
|
-
if ($[
|
|
212
|
-
|
|
208
|
+
$[33] = autoFocusButton;
|
|
209
|
+
$[34] = focusable;
|
|
210
|
+
$[35] = t26;
|
|
211
|
+
} else t26 = $[35];
|
|
212
|
+
const openAutoFocus = t26;
|
|
213
|
+
let t27;
|
|
214
|
+
if ($[36] !== focusTriggerAfterClose || $[37] !== focusable?.focusTriggerAfterClose) {
|
|
215
|
+
t27 = (event_2)=>{
|
|
213
216
|
const restore = focusable?.focusTriggerAfterClose ?? focusTriggerAfterClose;
|
|
214
217
|
if (void 0 !== restore) event_2.preventDefault();
|
|
215
218
|
if (restore) restoreFocusRef.current?.focus();
|
|
216
219
|
};
|
|
217
|
-
$[
|
|
218
|
-
$[
|
|
219
|
-
$[
|
|
220
|
-
} else
|
|
221
|
-
const closeAutoFocus =
|
|
222
|
-
let
|
|
223
|
-
if ($[
|
|
224
|
-
|
|
220
|
+
$[36] = focusTriggerAfterClose;
|
|
221
|
+
$[37] = focusable?.focusTriggerAfterClose;
|
|
222
|
+
$[38] = t27;
|
|
223
|
+
} else t27 = $[38];
|
|
224
|
+
const closeAutoFocus = t27;
|
|
225
|
+
let t28;
|
|
226
|
+
if ($[39] !== classNames?.close || $[40] !== classNames?.header || $[41] !== classNames?.title || $[42] !== closeConfig || $[43] !== locale || $[44] !== mergedCloseIcon || $[45] !== onClose || $[46] !== showClose || $[47] !== stylesProp?.close || $[48] !== stylesProp?.header || $[49] !== stylesProp?.title || $[50] !== title) {
|
|
227
|
+
t28 = (null != title || showClose) && /*#__PURE__*/ jsxs("div", {
|
|
225
228
|
"data-tao-modal-header": "",
|
|
226
229
|
className: cx(classNames?.header),
|
|
227
230
|
style: stylesProp?.header,
|
|
@@ -252,44 +255,44 @@ function Modal(t0) {
|
|
|
252
255
|
})
|
|
253
256
|
]
|
|
254
257
|
});
|
|
255
|
-
$[
|
|
256
|
-
$[
|
|
257
|
-
$[
|
|
258
|
-
$[
|
|
259
|
-
$[
|
|
260
|
-
$[
|
|
261
|
-
$[
|
|
262
|
-
$[
|
|
263
|
-
$[
|
|
264
|
-
$[
|
|
265
|
-
$[
|
|
266
|
-
$[
|
|
267
|
-
$[50] = t27;
|
|
268
|
-
} else t27 = $[50];
|
|
269
|
-
const t28 = classNames?.body;
|
|
270
|
-
let t29;
|
|
271
|
-
if ($[51] !== t28) {
|
|
272
|
-
t29 = cx(t28);
|
|
258
|
+
$[39] = classNames?.close;
|
|
259
|
+
$[40] = classNames?.header;
|
|
260
|
+
$[41] = classNames?.title;
|
|
261
|
+
$[42] = closeConfig;
|
|
262
|
+
$[43] = locale;
|
|
263
|
+
$[44] = mergedCloseIcon;
|
|
264
|
+
$[45] = onClose;
|
|
265
|
+
$[46] = showClose;
|
|
266
|
+
$[47] = stylesProp?.close;
|
|
267
|
+
$[48] = stylesProp?.header;
|
|
268
|
+
$[49] = stylesProp?.title;
|
|
269
|
+
$[50] = title;
|
|
273
270
|
$[51] = t28;
|
|
271
|
+
} else t28 = $[51];
|
|
272
|
+
const t29 = classNames?.body;
|
|
273
|
+
let t30;
|
|
274
|
+
if ($[52] !== t29) {
|
|
275
|
+
t30 = cx(t29);
|
|
274
276
|
$[52] = t29;
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
277
|
+
$[53] = t30;
|
|
278
|
+
} else t30 = $[53];
|
|
279
|
+
const t31 = stylesProp?.body;
|
|
280
|
+
let t32;
|
|
281
|
+
if ($[54] !== children || $[55] !== t30 || $[56] !== t31) {
|
|
282
|
+
t32 = /*#__PURE__*/ jsx("div", {
|
|
280
283
|
"data-tao-modal-body": "",
|
|
281
|
-
className:
|
|
282
|
-
style:
|
|
284
|
+
className: t30,
|
|
285
|
+
style: t31,
|
|
283
286
|
children: children
|
|
284
287
|
});
|
|
285
|
-
$[
|
|
286
|
-
$[54] = t29;
|
|
288
|
+
$[54] = children;
|
|
287
289
|
$[55] = t30;
|
|
288
290
|
$[56] = t31;
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
291
|
+
$[57] = t32;
|
|
292
|
+
} else t32 = $[57];
|
|
293
|
+
let t33;
|
|
294
|
+
if ($[58] !== cancelButton || $[59] !== classNames?.footer || $[60] !== footerContent || $[61] !== okButton || $[62] !== stylesProp?.footer) {
|
|
295
|
+
t33 = null != footerContent && /*#__PURE__*/ jsx("div", {
|
|
293
296
|
"data-tao-modal-footer": "",
|
|
294
297
|
className: cx(classNames?.footer),
|
|
295
298
|
style: stylesProp?.footer,
|
|
@@ -301,120 +304,120 @@ function Modal(t0) {
|
|
|
301
304
|
children: footerContent
|
|
302
305
|
})
|
|
303
306
|
});
|
|
304
|
-
$[
|
|
305
|
-
$[
|
|
306
|
-
$[
|
|
307
|
-
$[
|
|
308
|
-
$[
|
|
309
|
-
$[
|
|
310
|
-
} else
|
|
311
|
-
let
|
|
312
|
-
if ($[
|
|
313
|
-
|
|
307
|
+
$[58] = cancelButton;
|
|
308
|
+
$[59] = classNames?.footer;
|
|
309
|
+
$[60] = footerContent;
|
|
310
|
+
$[61] = okButton;
|
|
311
|
+
$[62] = stylesProp?.footer;
|
|
312
|
+
$[63] = t33;
|
|
313
|
+
} else t33 = $[63];
|
|
314
|
+
let t34;
|
|
315
|
+
if ($[64] !== t28 || $[65] !== t32 || $[66] !== t33) {
|
|
316
|
+
t34 = /*#__PURE__*/ jsxs(Fragment, {
|
|
314
317
|
children: [
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
+
t28,
|
|
319
|
+
t32,
|
|
320
|
+
t33
|
|
318
321
|
]
|
|
319
322
|
});
|
|
320
|
-
$[
|
|
321
|
-
$[64] = t31;
|
|
323
|
+
$[64] = t28;
|
|
322
324
|
$[65] = t32;
|
|
323
325
|
$[66] = t33;
|
|
324
|
-
} else t33 = $[66];
|
|
325
|
-
const contents = t33;
|
|
326
|
-
const t34 = classNames?.root;
|
|
327
|
-
const t35 = classNames?.container;
|
|
328
|
-
let t36;
|
|
329
|
-
if ($[67] !== t34 || $[68] !== t35 || $[69] !== transitionName) {
|
|
330
|
-
t36 = cx(t34, t35, transitionName);
|
|
331
326
|
$[67] = t34;
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
327
|
+
} else t34 = $[67];
|
|
328
|
+
const contents = t34;
|
|
329
|
+
const t35 = classNames?.root;
|
|
330
|
+
const t36 = classNames?.container;
|
|
336
331
|
let t37;
|
|
337
|
-
if ($[
|
|
338
|
-
t37 =
|
|
332
|
+
if ($[68] !== t35 || $[69] !== t36 || $[70] !== transitionName) {
|
|
333
|
+
t37 = cx(t35, t36, transitionName);
|
|
334
|
+
$[68] = t35;
|
|
335
|
+
$[69] = t36;
|
|
336
|
+
$[70] = transitionName;
|
|
337
|
+
$[71] = t37;
|
|
338
|
+
} else t37 = $[71];
|
|
339
|
+
let t38;
|
|
340
|
+
if ($[72] !== ariaLabel || $[73] !== ariaLabelledBy) {
|
|
341
|
+
t38 = ariaLabel || ariaLabelledBy ? {
|
|
339
342
|
"aria-labelledby": ariaLabelledBy
|
|
340
343
|
} : {};
|
|
341
|
-
$[
|
|
342
|
-
$[
|
|
343
|
-
$[
|
|
344
|
-
} else
|
|
345
|
-
let t38;
|
|
346
|
-
if ($[74] !== customInteraction || $[75] !== openAutoFocus) {
|
|
347
|
-
t38 = customInteraction ? _temp : openAutoFocus;
|
|
348
|
-
$[74] = customInteraction;
|
|
349
|
-
$[75] = openAutoFocus;
|
|
350
|
-
$[76] = t38;
|
|
351
|
-
} else t38 = $[76];
|
|
344
|
+
$[72] = ariaLabel;
|
|
345
|
+
$[73] = ariaLabelledBy;
|
|
346
|
+
$[74] = t38;
|
|
347
|
+
} else t38 = $[74];
|
|
352
348
|
let t39;
|
|
353
|
-
if ($[
|
|
354
|
-
t39 = customInteraction ?
|
|
355
|
-
$[
|
|
356
|
-
$[
|
|
357
|
-
$[
|
|
358
|
-
} else t39 = $[
|
|
349
|
+
if ($[75] !== customInteraction || $[76] !== openAutoFocus) {
|
|
350
|
+
t39 = customInteraction ? _temp : openAutoFocus;
|
|
351
|
+
$[75] = customInteraction;
|
|
352
|
+
$[76] = openAutoFocus;
|
|
353
|
+
$[77] = t39;
|
|
354
|
+
} else t39 = $[77];
|
|
359
355
|
let t40;
|
|
360
|
-
if ($[
|
|
361
|
-
t40 =
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
$[80] =
|
|
365
|
-
|
|
366
|
-
} else t40 = $[81];
|
|
356
|
+
if ($[78] !== closeAutoFocus || $[79] !== customInteraction) {
|
|
357
|
+
t40 = customInteraction ? _temp2 : closeAutoFocus;
|
|
358
|
+
$[78] = closeAutoFocus;
|
|
359
|
+
$[79] = customInteraction;
|
|
360
|
+
$[80] = t40;
|
|
361
|
+
} else t40 = $[80];
|
|
367
362
|
let t41;
|
|
368
|
-
if ($[
|
|
369
|
-
t41 =
|
|
363
|
+
if ($[81] !== keyboard) {
|
|
364
|
+
t41 = (event_5)=>{
|
|
365
|
+
if (!keyboard || isEscapeForOpenCombobox(event_5)) event_5.preventDefault();
|
|
366
|
+
};
|
|
367
|
+
$[81] = keyboard;
|
|
368
|
+
$[82] = t41;
|
|
369
|
+
} else t41 = $[82];
|
|
370
|
+
let t42;
|
|
371
|
+
if ($[83] !== contents || $[84] !== customInteraction || $[85] !== focusRegistry) {
|
|
372
|
+
t42 = customInteraction ? /*#__PURE__*/ jsx(ModalBranchProvider, {
|
|
370
373
|
registry: focusRegistry,
|
|
371
374
|
children: contents
|
|
372
375
|
}) : contents;
|
|
373
|
-
$[
|
|
374
|
-
$[
|
|
375
|
-
$[
|
|
376
|
-
$[
|
|
377
|
-
} else
|
|
378
|
-
let
|
|
379
|
-
if ($[
|
|
380
|
-
|
|
376
|
+
$[83] = contents;
|
|
377
|
+
$[84] = customInteraction;
|
|
378
|
+
$[85] = focusRegistry;
|
|
379
|
+
$[86] = t42;
|
|
380
|
+
} else t42 = $[86];
|
|
381
|
+
let t43;
|
|
382
|
+
if ($[87] !== ariaDescribedBy || $[88] !== ariaLabel || $[89] !== contentStyle || $[90] !== forceMount || $[91] !== keepAlive || $[92] !== open || $[93] !== setContentRef || $[94] !== t37 || $[95] !== t38 || $[96] !== t39 || $[97] !== t40 || $[98] !== t41 || $[99] !== t42) {
|
|
383
|
+
t43 = /*#__PURE__*/ jsx(DialogContent, {
|
|
381
384
|
contentRef: setContentRef,
|
|
382
385
|
open: open,
|
|
383
386
|
keepAlive: keepAlive,
|
|
384
387
|
forceMount: forceMount,
|
|
385
388
|
"data-tao-modal": "",
|
|
386
389
|
style: contentStyle,
|
|
387
|
-
className:
|
|
390
|
+
className: t37,
|
|
388
391
|
"aria-modal": true,
|
|
389
392
|
"aria-label": ariaLabel,
|
|
390
|
-
...
|
|
393
|
+
...t38,
|
|
391
394
|
"aria-describedby": ariaDescribedBy,
|
|
392
|
-
onOpenAutoFocus:
|
|
393
|
-
onCloseAutoFocus:
|
|
394
|
-
onEscapeKeyDown:
|
|
395
|
+
onOpenAutoFocus: t39,
|
|
396
|
+
onCloseAutoFocus: t40,
|
|
397
|
+
onEscapeKeyDown: t41,
|
|
395
398
|
onPointerDownOutside: preventParentOutsideDismiss,
|
|
396
399
|
onInteractOutside: preventParentOutsideDismiss,
|
|
397
|
-
children:
|
|
400
|
+
children: t42
|
|
398
401
|
});
|
|
399
|
-
$[
|
|
400
|
-
$[
|
|
401
|
-
$[
|
|
402
|
-
$[
|
|
403
|
-
$[
|
|
404
|
-
$[
|
|
405
|
-
$[
|
|
406
|
-
$[93] = t36;
|
|
402
|
+
$[87] = ariaDescribedBy;
|
|
403
|
+
$[88] = ariaLabel;
|
|
404
|
+
$[89] = contentStyle;
|
|
405
|
+
$[90] = forceMount;
|
|
406
|
+
$[91] = keepAlive;
|
|
407
|
+
$[92] = open;
|
|
408
|
+
$[93] = setContentRef;
|
|
407
409
|
$[94] = t37;
|
|
408
410
|
$[95] = t38;
|
|
409
411
|
$[96] = t39;
|
|
410
412
|
$[97] = t40;
|
|
411
413
|
$[98] = t41;
|
|
412
414
|
$[99] = t42;
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
415
|
+
$[100] = t43;
|
|
416
|
+
} else t43 = $[100];
|
|
417
|
+
const content = t43;
|
|
418
|
+
let t44;
|
|
419
|
+
if ($[101] !== classNames?.mask || $[102] !== classNames?.overlay || $[103] !== closeOnMask || $[104] !== customInteraction || $[105] !== forceMount || $[106] !== keepAlive || $[107] !== mask || $[108] !== maskTransitionName || $[109] !== onClose || $[110] !== open || $[111] !== showMask || $[112] !== stylesProp?.mask || $[113] !== stylesProp?.overlay || $[114] !== zIndex) {
|
|
420
|
+
t44 = !customInteraction && (!keepAlive || open) && /*#__PURE__*/ jsx(__rspack_external__radix_ui_react_dialog_dabd8325.Overlay, {
|
|
418
421
|
forceMount: forceMount,
|
|
419
422
|
"data-tao-modal-overlay": "",
|
|
420
423
|
className: cx(classNames?.overlay, classNames?.mask, maskTransitionName),
|
|
@@ -433,25 +436,25 @@ function Modal(t0) {
|
|
|
433
436
|
},
|
|
434
437
|
onClick: closeOnMask ? onClose : void 0
|
|
435
438
|
});
|
|
436
|
-
$[
|
|
437
|
-
$[
|
|
438
|
-
$[
|
|
439
|
-
$[
|
|
440
|
-
$[
|
|
441
|
-
$[
|
|
442
|
-
$[
|
|
443
|
-
$[
|
|
444
|
-
$[
|
|
445
|
-
$[
|
|
446
|
-
$[
|
|
447
|
-
$[
|
|
448
|
-
$[
|
|
449
|
-
$[
|
|
450
|
-
$[
|
|
451
|
-
} else
|
|
452
|
-
let
|
|
453
|
-
if ($[
|
|
454
|
-
|
|
439
|
+
$[101] = classNames?.mask;
|
|
440
|
+
$[102] = classNames?.overlay;
|
|
441
|
+
$[103] = closeOnMask;
|
|
442
|
+
$[104] = customInteraction;
|
|
443
|
+
$[105] = forceMount;
|
|
444
|
+
$[106] = keepAlive;
|
|
445
|
+
$[107] = mask;
|
|
446
|
+
$[108] = maskTransitionName;
|
|
447
|
+
$[109] = onClose;
|
|
448
|
+
$[110] = open;
|
|
449
|
+
$[111] = showMask;
|
|
450
|
+
$[112] = stylesProp?.mask;
|
|
451
|
+
$[113] = stylesProp?.overlay;
|
|
452
|
+
$[114] = zIndex;
|
|
453
|
+
$[115] = t44;
|
|
454
|
+
} else t44 = $[115];
|
|
455
|
+
let t45;
|
|
456
|
+
if ($[116] !== classNames?.mask || $[117] !== classNames?.overlay || $[118] !== closeOnMask || $[119] !== customInteraction || $[120] !== mask || $[121] !== maskTransitionName || $[122] !== onClose || $[123] !== open || $[124] !== showMask || $[125] !== stylesProp?.mask || $[126] !== stylesProp?.overlay || $[127] !== zIndex) {
|
|
457
|
+
t45 = customInteraction && showMask && open && /*#__PURE__*/ jsx("div", {
|
|
455
458
|
"data-tao-modal-overlay": "",
|
|
456
459
|
role: "presentation",
|
|
457
460
|
className: cx(classNames?.overlay, classNames?.mask, maskTransitionName),
|
|
@@ -467,50 +470,50 @@ function Modal(t0) {
|
|
|
467
470
|
if (closeOnMask && 0 === event_6.button) onClose?.();
|
|
468
471
|
}
|
|
469
472
|
});
|
|
470
|
-
$[
|
|
471
|
-
$[
|
|
472
|
-
$[
|
|
473
|
-
$[
|
|
474
|
-
$[
|
|
475
|
-
$[
|
|
476
|
-
$[
|
|
477
|
-
$[
|
|
478
|
-
$[
|
|
479
|
-
$[
|
|
480
|
-
$[
|
|
481
|
-
$[
|
|
482
|
-
$[
|
|
483
|
-
} else
|
|
484
|
-
const
|
|
485
|
-
const
|
|
486
|
-
const
|
|
487
|
-
const
|
|
488
|
-
let
|
|
489
|
-
if ($[
|
|
490
|
-
|
|
491
|
-
$[128] = t47;
|
|
473
|
+
$[116] = classNames?.mask;
|
|
474
|
+
$[117] = classNames?.overlay;
|
|
475
|
+
$[118] = closeOnMask;
|
|
476
|
+
$[119] = customInteraction;
|
|
477
|
+
$[120] = mask;
|
|
478
|
+
$[121] = maskTransitionName;
|
|
479
|
+
$[122] = onClose;
|
|
480
|
+
$[123] = open;
|
|
481
|
+
$[124] = showMask;
|
|
482
|
+
$[125] = stylesProp?.mask;
|
|
483
|
+
$[126] = stylesProp?.overlay;
|
|
484
|
+
$[127] = zIndex;
|
|
485
|
+
$[128] = t45;
|
|
486
|
+
} else t45 = $[128];
|
|
487
|
+
const t46 = centered ? "" : void 0;
|
|
488
|
+
const t47 = open ? "" : void 0;
|
|
489
|
+
const t48 = classNames?.wrapper;
|
|
490
|
+
const t49 = wrapProps?.className;
|
|
491
|
+
let t50;
|
|
492
|
+
if ($[129] !== t48 || $[130] !== t49) {
|
|
493
|
+
t50 = cx(t48, t49);
|
|
492
494
|
$[129] = t48;
|
|
493
495
|
$[130] = t49;
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
const t51 =
|
|
497
|
-
const t52 =
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
496
|
+
$[131] = t50;
|
|
497
|
+
} else t50 = $[131];
|
|
498
|
+
const t51 = void 0 === zIndex ? void 0 : zIndex + 1;
|
|
499
|
+
const t52 = stylesProp?.wrapper;
|
|
500
|
+
const t53 = wrapProps?.style;
|
|
501
|
+
let t54;
|
|
502
|
+
if ($[132] !== t51 || $[133] !== t52 || $[134] !== t53) {
|
|
503
|
+
t54 = {
|
|
501
504
|
pointerEvents: "none",
|
|
502
|
-
zIndex:
|
|
503
|
-
...
|
|
504
|
-
...
|
|
505
|
+
zIndex: t51,
|
|
506
|
+
...t52,
|
|
507
|
+
...t53
|
|
505
508
|
};
|
|
506
|
-
$[131] = t50;
|
|
507
509
|
$[132] = t51;
|
|
508
510
|
$[133] = t52;
|
|
509
511
|
$[134] = t53;
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
512
|
+
$[135] = t54;
|
|
513
|
+
} else t54 = $[135];
|
|
514
|
+
let t55;
|
|
515
|
+
if ($[136] !== closeAutoFocus || $[137] !== content || $[138] !== customInteraction || $[139] !== focusBranches || $[140] !== modalRender || $[141] !== open || $[142] !== openAutoFocus || $[143] !== scrollLock || $[144] !== trapFocus) {
|
|
516
|
+
t55 = customInteraction ? /*#__PURE__*/ jsx(ModalInteractionScope, {
|
|
514
517
|
open: open,
|
|
515
518
|
scrollLock: scrollLock,
|
|
516
519
|
trapFocus: trapFocus,
|
|
@@ -519,110 +522,112 @@ function Modal(t0) {
|
|
|
519
522
|
onCloseAutoFocus: closeAutoFocus,
|
|
520
523
|
children: modalRender ? modalRender(content) : content
|
|
521
524
|
}) : modalRender ? modalRender(content) : content;
|
|
522
|
-
$[
|
|
523
|
-
$[
|
|
524
|
-
$[
|
|
525
|
-
$[
|
|
526
|
-
$[
|
|
527
|
-
$[
|
|
528
|
-
$[
|
|
529
|
-
$[
|
|
530
|
-
$[
|
|
531
|
-
$[
|
|
532
|
-
} else
|
|
533
|
-
let
|
|
534
|
-
if ($[
|
|
535
|
-
|
|
525
|
+
$[136] = closeAutoFocus;
|
|
526
|
+
$[137] = content;
|
|
527
|
+
$[138] = customInteraction;
|
|
528
|
+
$[139] = focusBranches;
|
|
529
|
+
$[140] = modalRender;
|
|
530
|
+
$[141] = open;
|
|
531
|
+
$[142] = openAutoFocus;
|
|
532
|
+
$[143] = scrollLock;
|
|
533
|
+
$[144] = trapFocus;
|
|
534
|
+
$[145] = t55;
|
|
535
|
+
} else t55 = $[145];
|
|
536
|
+
let t56;
|
|
537
|
+
if ($[146] !== t46 || $[147] !== t47 || $[148] !== t50 || $[149] !== t54 || $[150] !== t55 || $[151] !== wrapProps) {
|
|
538
|
+
t56 = /*#__PURE__*/ jsx("div", {
|
|
536
539
|
...wrapProps,
|
|
537
540
|
role: "presentation",
|
|
538
541
|
"data-tao-modal-wrap": "",
|
|
539
|
-
"data-tao-centered":
|
|
540
|
-
"data-tao-open":
|
|
541
|
-
className:
|
|
542
|
-
style:
|
|
543
|
-
children:
|
|
542
|
+
"data-tao-centered": t46,
|
|
543
|
+
"data-tao-open": t47,
|
|
544
|
+
className: t50,
|
|
545
|
+
style: t54,
|
|
546
|
+
children: t55
|
|
544
547
|
});
|
|
545
|
-
$[145] = t45;
|
|
546
548
|
$[146] = t46;
|
|
547
|
-
$[147] =
|
|
548
|
-
$[148] =
|
|
549
|
+
$[147] = t47;
|
|
550
|
+
$[148] = t50;
|
|
549
551
|
$[149] = t54;
|
|
550
|
-
$[150] =
|
|
551
|
-
$[151] =
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
552
|
+
$[150] = t55;
|
|
553
|
+
$[151] = wrapProps;
|
|
554
|
+
$[152] = t56;
|
|
555
|
+
} else t56 = $[152];
|
|
556
|
+
let t57;
|
|
557
|
+
if ($[153] !== t44 || $[154] !== t45 || $[155] !== t56) {
|
|
558
|
+
t57 = /*#__PURE__*/ jsxs(TaoPortalScope, {
|
|
556
559
|
children: [
|
|
557
|
-
t43,
|
|
558
560
|
t44,
|
|
559
|
-
|
|
561
|
+
t45,
|
|
562
|
+
t56
|
|
560
563
|
]
|
|
561
564
|
});
|
|
562
|
-
$[152] = t43;
|
|
563
565
|
$[153] = t44;
|
|
564
|
-
$[154] =
|
|
566
|
+
$[154] = t45;
|
|
565
567
|
$[155] = t56;
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
let t57;
|
|
571
|
-
if ($[156] !== getContainer) {
|
|
572
|
-
t57 = "string" == typeof getContainer ? document.querySelector(getContainer) ?? void 0 : "function" == typeof getContainer ? getContainer() : getContainer;
|
|
573
|
-
$[156] = getContainer;
|
|
574
|
-
$[157] = t57;
|
|
575
|
-
} else t57 = $[157];
|
|
576
|
-
container = t57;
|
|
577
|
-
if (!container) throw new Error(`Modal getContainer did not resolve an element: ${getContainer}`);
|
|
578
|
-
}
|
|
579
|
-
const t57 = !customInteraction;
|
|
568
|
+
$[156] = t57;
|
|
569
|
+
} else t57 = $[156];
|
|
570
|
+
const layer = t57;
|
|
571
|
+
const [container, setContainer] = useState();
|
|
580
572
|
let t58;
|
|
581
|
-
if ($[
|
|
582
|
-
t58 = (
|
|
573
|
+
if ($[157] !== getContainer) {
|
|
574
|
+
t58 = ()=>{
|
|
575
|
+
if (!getContainer) return;
|
|
576
|
+
const next = "string" == typeof getContainer ? document.querySelector(getContainer) : "function" == typeof getContainer ? getContainer() : getContainer;
|
|
577
|
+
if (!next) throw new Error(`Modal getContainer did not resolve an element: ${getContainer}`);
|
|
578
|
+
setContainer(next);
|
|
579
|
+
};
|
|
580
|
+
$[157] = getContainer;
|
|
581
|
+
$[158] = t58;
|
|
582
|
+
} else t58 = $[158];
|
|
583
|
+
useLayoutEffect(t58);
|
|
584
|
+
const t59 = !customInteraction;
|
|
585
|
+
let t60;
|
|
586
|
+
if ($[159] !== onClose) {
|
|
587
|
+
t60 = (value)=>{
|
|
583
588
|
if (!value) onClose?.();
|
|
584
589
|
};
|
|
585
|
-
$[
|
|
586
|
-
$[
|
|
587
|
-
} else
|
|
588
|
-
let
|
|
589
|
-
if ($[
|
|
590
|
-
|
|
590
|
+
$[159] = onClose;
|
|
591
|
+
$[160] = t60;
|
|
592
|
+
} else t60 = $[160];
|
|
593
|
+
let t61;
|
|
594
|
+
if ($[161] !== container || $[162] !== forceMount || $[163] !== getContainer || $[164] !== layer) {
|
|
595
|
+
t61 = false === getContainer ? layer : getContainer && !container ? null : /*#__PURE__*/ jsx(__rspack_external__radix_ui_react_dialog_dabd8325.Portal, {
|
|
591
596
|
forceMount: forceMount,
|
|
592
|
-
container: container,
|
|
597
|
+
container: getContainer ? container : void 0,
|
|
593
598
|
children: layer
|
|
594
599
|
});
|
|
595
|
-
$[
|
|
596
|
-
$[
|
|
597
|
-
$[
|
|
598
|
-
$[
|
|
599
|
-
$[
|
|
600
|
-
} else
|
|
601
|
-
let
|
|
602
|
-
if ($[
|
|
603
|
-
|
|
600
|
+
$[161] = container;
|
|
601
|
+
$[162] = forceMount;
|
|
602
|
+
$[163] = getContainer;
|
|
603
|
+
$[164] = layer;
|
|
604
|
+
$[165] = t61;
|
|
605
|
+
} else t61 = $[165];
|
|
606
|
+
let t62;
|
|
607
|
+
if ($[166] !== open || $[167] !== t59 || $[168] !== t60 || $[169] !== t61) {
|
|
608
|
+
t62 = /*#__PURE__*/ jsx(__rspack_external__radix_ui_react_dialog_dabd8325.Root, {
|
|
604
609
|
open: open,
|
|
605
|
-
modal:
|
|
606
|
-
onOpenChange:
|
|
607
|
-
children:
|
|
610
|
+
modal: t59,
|
|
611
|
+
onOpenChange: t60,
|
|
612
|
+
children: t61
|
|
608
613
|
});
|
|
609
|
-
$[
|
|
610
|
-
$[
|
|
611
|
-
$[
|
|
612
|
-
$[
|
|
613
|
-
$[
|
|
614
|
-
} else
|
|
615
|
-
let
|
|
616
|
-
if ($[
|
|
617
|
-
|
|
614
|
+
$[166] = open;
|
|
615
|
+
$[167] = t59;
|
|
616
|
+
$[168] = t60;
|
|
617
|
+
$[169] = t61;
|
|
618
|
+
$[170] = t62;
|
|
619
|
+
} else t62 = $[170];
|
|
620
|
+
let t63;
|
|
621
|
+
if ($[171] !== direction || $[172] !== t62) {
|
|
622
|
+
t63 = /*#__PURE__*/ jsx(TaoProvider, {
|
|
618
623
|
direction: direction,
|
|
619
|
-
children:
|
|
624
|
+
children: t62
|
|
620
625
|
});
|
|
621
|
-
$[
|
|
622
|
-
$[
|
|
623
|
-
$[
|
|
624
|
-
} else
|
|
625
|
-
return
|
|
626
|
+
$[171] = direction;
|
|
627
|
+
$[172] = t62;
|
|
628
|
+
$[173] = t63;
|
|
629
|
+
} else t63 = $[173];
|
|
630
|
+
return t63;
|
|
626
631
|
}
|
|
627
632
|
function _temp2(event_4) {
|
|
628
633
|
return event_4.preventDefault();
|