@rockshin/tao-ui 0.0.38 → 0.0.40
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/README.md +12 -0
- package/dist/components/alert/alert.d.ts +2 -2
- package/dist/components/breadcrumb/breadcrumb.d.ts +2 -2
- package/dist/components/button/button.d.ts +2 -2
- package/dist/components/checkbox/checkbox.css +4 -0
- package/dist/components/checkbox/checkbox.d.ts +8 -6
- package/dist/components/checkbox/checkbox.js +184 -111
- package/dist/components/collapsible/collapsible.d.ts +6 -6
- package/dist/components/context-menu/context-menu.d.ts +3 -3
- package/dist/components/date-picker/calendar/calendar-grid.d.ts +1 -1
- package/dist/components/date-picker/calendar/calendar-grid.js +47 -35
- package/dist/components/date-picker/calendar/calendar-header.d.ts +2 -2
- package/dist/components/date-picker/calendar/month-grid.d.ts +1 -1
- package/dist/components/date-picker/calendar/month-grid.js +1 -0
- package/dist/components/date-picker/calendar/time-panel.d.ts +2 -2
- package/dist/components/date-picker/calendar/time-panel.js +10 -7
- package/dist/components/date-picker/calendar/year-grid.d.ts +1 -1
- package/dist/components/date-picker/calendar/year-grid.js +1 -0
- package/dist/components/date-picker/date-picker.css +4 -0
- package/dist/components/date-picker/date-picker.d.ts +7 -6
- package/dist/components/date-picker/date-picker.js +52 -5
- package/dist/components/date-picker/presets.d.ts +1 -1
- package/dist/components/date-picker/range-picker.d.ts +6 -5
- package/dist/components/date-picker/range-picker.js +124 -28
- package/dist/components/date-picker/types.d.ts +1 -1
- package/dist/components/drawer/drawer.d.ts +4 -4
- package/dist/components/drawer/drawer.js +125 -111
- package/dist/components/dropdown/dropdown.d.ts +8 -8
- package/dist/components/form/form-context.d.ts +1 -1
- package/dist/components/form/form-item.d.ts +3 -3
- package/dist/components/form/form.d.ts +3 -3
- package/dist/components/form/index.d.ts +2 -2
- package/dist/components/form-actions/form-actions.d.ts +2 -2
- package/dist/components/form-field/form-field-view.d.ts +2 -2
- package/dist/components/form-field/form-field.d.ts +2 -2
- package/dist/components/form-section/form-section.d.ts +2 -2
- package/dist/components/input/input.d.ts +2 -2
- package/dist/components/input/input.js +1 -1
- package/dist/components/input-number/input-number.d.ts +6 -7
- package/dist/components/input-number/input-number.js +91 -65
- package/dist/components/menu/menu-render.d.ts +1 -1
- package/dist/components/modal/confirm-dialog.d.ts +4 -4
- package/dist/components/modal/confirm.d.ts +1 -1
- package/dist/components/modal/index.d.ts +8 -8
- package/dist/components/modal/modal.d.ts +6 -6
- package/dist/components/modal/modal.js +115 -101
- package/dist/components/modal/use-modal.d.ts +2 -2
- package/dist/components/pagination/pagination.d.ts +3 -3
- package/dist/components/popconfirm/popconfirm.d.ts +5 -5
- package/dist/components/popconfirm/popconfirm.js +74 -61
- package/dist/components/popover/popover.d.ts +4 -4
- package/dist/components/popover/popover.js +124 -115
- package/dist/components/radio/radio.d.ts +9 -6
- package/dist/components/radio/radio.js +210 -116
- package/dist/components/scroll-area/scroll-area.d.ts +2 -2
- package/dist/components/select/mobile-select.d.ts +3 -3
- package/dist/components/select/mobile-select.js +3 -1
- package/dist/components/select/select-icons.d.ts +5 -5
- package/dist/components/select/select-model.d.ts +1 -1
- package/dist/components/select/select-searchable-list.d.ts +2 -2
- package/dist/components/select/select-tags.d.ts +3 -3
- package/dist/components/select/select-types.d.ts +2 -2
- package/dist/components/select/select.css +7 -0
- package/dist/components/select/select.d.ts +2 -2
- package/dist/components/select/use-select-selection.d.ts +3 -3
- package/dist/components/sonner/index.d.ts +1 -1
- package/dist/components/sonner/sonner.d.ts +5 -4
- package/dist/components/spinner/spinner.d.ts +5 -5
- package/dist/components/spinner/spinner.js +106 -99
- package/dist/components/splitter/splitter.d.ts +3 -3
- package/dist/components/status-icon/status-icon.d.ts +1 -1
- package/dist/components/steps/steps-icons.d.ts +4 -4
- package/dist/components/steps/steps.css +1 -1
- package/dist/components/steps/steps.d.ts +3 -3
- package/dist/components/steps/use-display-steps.d.ts +1 -1
- package/dist/components/switch/switch.d.ts +4 -3
- package/dist/components/switch/switch.js +134 -86
- package/dist/components/table/table-filter.d.ts +2 -2
- package/dist/components/table/table-icons.d.ts +6 -6
- package/dist/components/table/table-model.d.ts +2 -2
- package/dist/components/table/table-summary.d.ts +5 -5
- package/dist/components/table/table-types.d.ts +3 -3
- package/dist/components/table/table.css +5 -3
- package/dist/components/table/table.d.ts +6 -6
- package/dist/components/table/use-table-data.d.ts +1 -1
- package/dist/components/tabs/tabs.d.ts +5 -5
- package/dist/components/tabs/tabs.js +72 -65
- package/dist/components/tag/tag.css +8 -8
- package/dist/components/tag/tag.d.ts +4 -4
- package/dist/components/tag/tag.js +40 -37
- package/dist/components/textarea/textarea.d.ts +2 -2
- package/dist/components/textarea/textarea.js +1 -1
- package/dist/components/tooltip/tooltip.d.ts +2 -2
- package/dist/docs/component-docs.d.ts +1 -1
- package/dist/docs/components/alert.doc.d.ts +1 -1
- package/dist/docs/components/button.doc.d.ts +1 -1
- package/dist/docs/components/popover.doc.d.ts +1 -1
- package/dist/docs/components/tooltip.doc.d.ts +4 -4
- package/dist/docs/index.d.ts +2 -2
- package/dist/entries/alert.d.ts +1 -1
- package/dist/entries/breadcrumb.d.ts +1 -1
- package/dist/entries/button.d.ts +1 -1
- package/dist/entries/checkbox.d.ts +1 -1
- package/dist/entries/collapsible.d.ts +1 -1
- package/dist/entries/context-menu.d.ts +1 -1
- package/dist/entries/date-picker.d.ts +1 -1
- package/dist/entries/drawer.d.ts +1 -1
- package/dist/entries/dropdown.d.ts +1 -1
- package/dist/entries/form-actions.d.ts +1 -1
- package/dist/entries/form-field.d.ts +1 -1
- package/dist/entries/form-layout.d.ts +1 -1
- package/dist/entries/form-section.d.ts +1 -1
- package/dist/entries/form.d.ts +1 -1
- package/dist/entries/input-number.d.ts +1 -1
- package/dist/entries/input.d.ts +1 -1
- package/dist/entries/modal.d.ts +1 -1
- package/dist/entries/number-input.d.ts +1 -1
- package/dist/entries/pagination.d.ts +1 -1
- package/dist/entries/popconfirm.d.ts +1 -1
- package/dist/entries/popover.d.ts +1 -1
- package/dist/entries/provider.d.ts +1 -1
- package/dist/entries/radio.d.ts +1 -1
- package/dist/entries/range-picker.d.ts +1 -1
- package/dist/entries/scroll-area.d.ts +1 -1
- package/dist/entries/select.d.ts +1 -1
- package/dist/entries/sonner.d.ts +1 -1
- package/dist/entries/spinner.d.ts +1 -1
- package/dist/entries/splitter.d.ts +1 -1
- package/dist/entries/stack.d.ts +1 -1
- package/dist/entries/steps.d.ts +1 -1
- package/dist/entries/switch.d.ts +1 -1
- package/dist/entries/table.d.ts +1 -1
- package/dist/entries/tabs.d.ts +1 -1
- package/dist/entries/tag.d.ts +1 -1
- package/dist/entries/textarea.d.ts +1 -1
- package/dist/entries/tooltip.d.ts +1 -1
- package/dist/index.d.ts +40 -40
- package/dist/layouts/form-layout/form-layout.d.ts +2 -2
- package/dist/layouts/stack/stack.d.ts +3 -3
- package/dist/number-input/format.d.ts +1 -1
- package/dist/number-input/index.d.ts +4 -4
- package/dist/number-input/number-input.d.ts +2 -2
- package/dist/number-input/use-number-input.d.ts +1 -1
- package/dist/provider/tao-provider.d.ts +3 -3
- package/dist/theme/control.css +2 -2
- package/dist/theme/theme.css +11 -11
- package/dist/utils/dialog-content.d.ts +1 -1
- package/package.json +38 -38
|
@@ -10,8 +10,8 @@ import { Button } from "../button/button.js";
|
|
|
10
10
|
import "./modal.css";
|
|
11
11
|
import * as __rspack_external__radix_ui_react_dialog_dabd8325 from "@radix-ui/react-dialog";
|
|
12
12
|
function Modal(t0) {
|
|
13
|
-
const $ = c(
|
|
14
|
-
const { open, onClose, title, footer, onOk, okText: t1, cancelText: t2, confirmLoading, okButtonProps, cancelButtonProps, width: t3, centered: t4, closable: t5, maskClosable: t6, keyboard: t7, afterClose, destroyOnHidden: t8, children, classNames, styles: stylesProp } = t0;
|
|
13
|
+
const $ = c(95);
|
|
14
|
+
const { open, onClose, title, footer, onOk, okText: t1, cancelText: t2, confirmLoading, okButtonProps, cancelButtonProps, width: t3, centered: t4, closable: t5, maskClosable: t6, keyboard: t7, afterClose, destroyOnHidden: t8, children, classNames, styles: stylesProp, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy } = t0;
|
|
15
15
|
const okText = void 0 === t1 ? "OK" : t1;
|
|
16
16
|
const cancelText = void 0 === t2 ? "Cancel" : t2;
|
|
17
17
|
const width = void 0 === t3 ? 520 : t3;
|
|
@@ -173,16 +173,25 @@ function Modal(t0) {
|
|
|
173
173
|
$[42] = t25;
|
|
174
174
|
} else t25 = $[42];
|
|
175
175
|
let t26;
|
|
176
|
-
if ($[43] !==
|
|
177
|
-
t26 =
|
|
176
|
+
if ($[43] !== ariaLabel || $[44] !== ariaLabelledBy) {
|
|
177
|
+
t26 = ariaLabel || ariaLabelledBy ? {
|
|
178
|
+
"aria-labelledby": ariaLabelledBy
|
|
179
|
+
} : {};
|
|
180
|
+
$[43] = ariaLabel;
|
|
181
|
+
$[44] = ariaLabelledBy;
|
|
182
|
+
$[45] = t26;
|
|
183
|
+
} else t26 = $[45];
|
|
184
|
+
let t27;
|
|
185
|
+
if ($[46] !== keyboard) {
|
|
186
|
+
t27 = (e)=>{
|
|
178
187
|
if (!keyboard) e.preventDefault();
|
|
179
188
|
};
|
|
180
|
-
$[
|
|
181
|
-
$[
|
|
182
|
-
} else
|
|
183
|
-
let
|
|
184
|
-
if ($[
|
|
185
|
-
|
|
189
|
+
$[46] = keyboard;
|
|
190
|
+
$[47] = t27;
|
|
191
|
+
} else t27 = $[47];
|
|
192
|
+
let t28;
|
|
193
|
+
if ($[48] !== classNames?.close || $[49] !== classNames?.header || $[50] !== classNames?.title || $[51] !== closable || $[52] !== onClose || $[53] !== stylesProp?.close || $[54] !== stylesProp?.header || $[55] !== stylesProp?.title || $[56] !== title) {
|
|
194
|
+
t28 = (null != title || closable) && /*#__PURE__*/ jsxs("div", {
|
|
186
195
|
"data-tao-modal-header": "",
|
|
187
196
|
className: cx(classNames?.header),
|
|
188
197
|
style: stylesProp?.header,
|
|
@@ -209,129 +218,134 @@ function Modal(t0) {
|
|
|
209
218
|
})
|
|
210
219
|
]
|
|
211
220
|
});
|
|
212
|
-
$[
|
|
213
|
-
$[
|
|
214
|
-
$[
|
|
215
|
-
$[
|
|
216
|
-
$[
|
|
217
|
-
$[
|
|
218
|
-
$[
|
|
219
|
-
$[
|
|
220
|
-
$[
|
|
221
|
-
$[
|
|
222
|
-
} else
|
|
223
|
-
const
|
|
224
|
-
let
|
|
225
|
-
if ($[
|
|
226
|
-
|
|
227
|
-
$[55] = t28;
|
|
228
|
-
$[56] = t29;
|
|
229
|
-
} else t29 = $[56];
|
|
230
|
-
const t30 = stylesProp?.body;
|
|
231
|
-
let t31;
|
|
232
|
-
if ($[57] !== children || $[58] !== t29 || $[59] !== t30) {
|
|
233
|
-
t31 = /*#__PURE__*/ jsx("div", {
|
|
234
|
-
"data-tao-modal-body": "",
|
|
235
|
-
className: t29,
|
|
236
|
-
style: t30,
|
|
237
|
-
children: children
|
|
238
|
-
});
|
|
239
|
-
$[57] = children;
|
|
221
|
+
$[48] = classNames?.close;
|
|
222
|
+
$[49] = classNames?.header;
|
|
223
|
+
$[50] = classNames?.title;
|
|
224
|
+
$[51] = closable;
|
|
225
|
+
$[52] = onClose;
|
|
226
|
+
$[53] = stylesProp?.close;
|
|
227
|
+
$[54] = stylesProp?.header;
|
|
228
|
+
$[55] = stylesProp?.title;
|
|
229
|
+
$[56] = title;
|
|
230
|
+
$[57] = t28;
|
|
231
|
+
} else t28 = $[57];
|
|
232
|
+
const t29 = classNames?.body;
|
|
233
|
+
let t30;
|
|
234
|
+
if ($[58] !== t29) {
|
|
235
|
+
t30 = cx(t29);
|
|
240
236
|
$[58] = t29;
|
|
241
237
|
$[59] = t30;
|
|
242
|
-
|
|
243
|
-
|
|
238
|
+
} else t30 = $[59];
|
|
239
|
+
const t31 = stylesProp?.body;
|
|
244
240
|
let t32;
|
|
245
|
-
if ($[
|
|
246
|
-
t32 =
|
|
241
|
+
if ($[60] !== children || $[61] !== t30 || $[62] !== t31) {
|
|
242
|
+
t32 = /*#__PURE__*/ jsx("div", {
|
|
243
|
+
"data-tao-modal-body": "",
|
|
244
|
+
className: t30,
|
|
245
|
+
style: t31,
|
|
246
|
+
children: children
|
|
247
|
+
});
|
|
248
|
+
$[60] = children;
|
|
249
|
+
$[61] = t30;
|
|
250
|
+
$[62] = t31;
|
|
251
|
+
$[63] = t32;
|
|
252
|
+
} else t32 = $[63];
|
|
253
|
+
let t33;
|
|
254
|
+
if ($[64] !== classNames?.footer || $[65] !== footerContent || $[66] !== stylesProp?.footer) {
|
|
255
|
+
t33 = null != footerContent && /*#__PURE__*/ jsx("div", {
|
|
247
256
|
"data-tao-modal-footer": "",
|
|
248
257
|
className: cx(classNames?.footer),
|
|
249
258
|
style: stylesProp?.footer,
|
|
250
259
|
children: footerContent
|
|
251
260
|
});
|
|
252
|
-
$[
|
|
253
|
-
$[
|
|
254
|
-
$[
|
|
255
|
-
$[
|
|
256
|
-
} else
|
|
257
|
-
let
|
|
258
|
-
if ($[
|
|
259
|
-
|
|
261
|
+
$[64] = classNames?.footer;
|
|
262
|
+
$[65] = footerContent;
|
|
263
|
+
$[66] = stylesProp?.footer;
|
|
264
|
+
$[67] = t33;
|
|
265
|
+
} else t33 = $[67];
|
|
266
|
+
let t34;
|
|
267
|
+
if ($[68] !== ariaDescribedBy || $[69] !== ariaLabel || $[70] !== contentStyle || $[71] !== forceMount || $[72] !== keepAlive || $[73] !== open || $[74] !== t25 || $[75] !== t26 || $[76] !== t27 || $[77] !== t28 || $[78] !== t32 || $[79] !== t33) {
|
|
268
|
+
t34 = /*#__PURE__*/ jsxs(DialogContent, {
|
|
260
269
|
open: open,
|
|
261
270
|
keepAlive: keepAlive,
|
|
262
271
|
forceMount: forceMount,
|
|
263
272
|
"data-tao-modal": "",
|
|
264
273
|
style: contentStyle,
|
|
265
274
|
className: t25,
|
|
266
|
-
"aria-
|
|
267
|
-
|
|
275
|
+
"aria-label": ariaLabel,
|
|
276
|
+
...t26,
|
|
277
|
+
"aria-describedby": ariaDescribedBy,
|
|
278
|
+
onEscapeKeyDown: t27,
|
|
268
279
|
onPointerDownOutside: preventParentOutsideDismiss,
|
|
269
280
|
onInteractOutside: preventParentOutsideDismiss,
|
|
270
281
|
children: [
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
282
|
+
t28,
|
|
283
|
+
t32,
|
|
284
|
+
t33
|
|
274
285
|
]
|
|
275
286
|
});
|
|
276
|
-
$[
|
|
277
|
-
$[
|
|
278
|
-
$[
|
|
279
|
-
$[
|
|
280
|
-
$[
|
|
281
|
-
$[
|
|
282
|
-
$[
|
|
283
|
-
$[
|
|
284
|
-
$[
|
|
285
|
-
$[
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
287
|
+
$[68] = ariaDescribedBy;
|
|
288
|
+
$[69] = ariaLabel;
|
|
289
|
+
$[70] = contentStyle;
|
|
290
|
+
$[71] = forceMount;
|
|
291
|
+
$[72] = keepAlive;
|
|
292
|
+
$[73] = open;
|
|
293
|
+
$[74] = t25;
|
|
294
|
+
$[75] = t26;
|
|
295
|
+
$[76] = t27;
|
|
296
|
+
$[77] = t28;
|
|
297
|
+
$[78] = t32;
|
|
298
|
+
$[79] = t33;
|
|
299
|
+
$[80] = t34;
|
|
300
|
+
} else t34 = $[80];
|
|
301
|
+
let t35;
|
|
302
|
+
if ($[81] !== t22 || $[82] !== t23 || $[83] !== t34) {
|
|
303
|
+
t35 = /*#__PURE__*/ jsx("div", {
|
|
290
304
|
"data-tao-modal-wrap": "",
|
|
291
305
|
"data-tao-centered": t22,
|
|
292
306
|
"data-tao-open": t23,
|
|
293
|
-
children:
|
|
307
|
+
children: t34
|
|
294
308
|
});
|
|
295
|
-
$[
|
|
296
|
-
$[
|
|
297
|
-
$[
|
|
298
|
-
$[
|
|
299
|
-
} else
|
|
300
|
-
let
|
|
301
|
-
if ($[
|
|
302
|
-
|
|
309
|
+
$[81] = t22;
|
|
310
|
+
$[82] = t23;
|
|
311
|
+
$[83] = t34;
|
|
312
|
+
$[84] = t35;
|
|
313
|
+
} else t35 = $[84];
|
|
314
|
+
let t36;
|
|
315
|
+
if ($[85] !== t21 || $[86] !== t35) {
|
|
316
|
+
t36 = /*#__PURE__*/ jsxs(TaoPortalScope, {
|
|
303
317
|
children: [
|
|
304
318
|
t21,
|
|
305
|
-
|
|
319
|
+
t35
|
|
306
320
|
]
|
|
307
321
|
});
|
|
308
|
-
$[
|
|
309
|
-
$[
|
|
310
|
-
$[
|
|
311
|
-
} else
|
|
312
|
-
let
|
|
313
|
-
if ($[
|
|
314
|
-
|
|
322
|
+
$[85] = t21;
|
|
323
|
+
$[86] = t35;
|
|
324
|
+
$[87] = t36;
|
|
325
|
+
} else t36 = $[87];
|
|
326
|
+
let t37;
|
|
327
|
+
if ($[88] !== forceMount || $[89] !== t36) {
|
|
328
|
+
t37 = /*#__PURE__*/ jsx(__rspack_external__radix_ui_react_dialog_dabd8325.Portal, {
|
|
315
329
|
forceMount: forceMount,
|
|
316
|
-
children:
|
|
330
|
+
children: t36
|
|
317
331
|
});
|
|
318
|
-
$[
|
|
319
|
-
$[
|
|
320
|
-
$[
|
|
321
|
-
} else
|
|
322
|
-
let
|
|
323
|
-
if ($[
|
|
324
|
-
|
|
332
|
+
$[88] = forceMount;
|
|
333
|
+
$[89] = t36;
|
|
334
|
+
$[90] = t37;
|
|
335
|
+
} else t37 = $[90];
|
|
336
|
+
let t38;
|
|
337
|
+
if ($[91] !== open || $[92] !== t20 || $[93] !== t37) {
|
|
338
|
+
t38 = /*#__PURE__*/ jsx(__rspack_external__radix_ui_react_dialog_dabd8325.Root, {
|
|
325
339
|
open: open,
|
|
326
340
|
onOpenChange: t20,
|
|
327
|
-
children:
|
|
341
|
+
children: t37
|
|
328
342
|
});
|
|
329
|
-
$[
|
|
330
|
-
$[
|
|
331
|
-
$[
|
|
332
|
-
$[
|
|
333
|
-
} else
|
|
334
|
-
return
|
|
343
|
+
$[91] = open;
|
|
344
|
+
$[92] = t20;
|
|
345
|
+
$[93] = t37;
|
|
346
|
+
$[94] = t38;
|
|
347
|
+
} else t38 = $[94];
|
|
348
|
+
return t38;
|
|
335
349
|
}
|
|
336
350
|
function CloseIcon() {
|
|
337
351
|
const $ = c(1);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type ReactElement } from 'react';
|
|
2
|
-
import type { ModalFuncReturn } from './confirm';
|
|
3
|
-
import { type ModalFuncProps } from './confirm-dialog';
|
|
2
|
+
import type { ModalFuncReturn } from './confirm.js';
|
|
3
|
+
import { type ModalFuncProps } from './confirm-dialog.js';
|
|
4
4
|
export interface ModalHookApi {
|
|
5
5
|
confirm: (config: ModalFuncProps) => ModalFuncReturn;
|
|
6
6
|
info: (config: ModalFuncProps) => ModalFuncReturn;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
|
-
import { type TaoSize } from '../../provider/tao-provider';
|
|
3
|
-
import { type SemanticClassNames, type SemanticStyles } from '../../utils/semantic';
|
|
2
|
+
import { type TaoSize } from '../../provider/tao-provider.js';
|
|
3
|
+
import { type SemanticClassNames, type SemanticStyles } from '../../utils/semantic.js';
|
|
4
4
|
import './pagination.css';
|
|
5
5
|
export type PaginationSemanticPart = 'root' | 'item' | 'total';
|
|
6
6
|
export interface PaginationProps {
|
|
@@ -19,4 +19,4 @@ export interface PaginationProps {
|
|
|
19
19
|
classNames?: SemanticClassNames<PaginationSemanticPart>;
|
|
20
20
|
styles?: SemanticStyles<PaginationSemanticPart>;
|
|
21
21
|
}
|
|
22
|
-
export declare function Pagination({ current: currentProp, defaultCurrent, pageSize: pageSizeProp, defaultPageSize, total, onChange, showSizeChanger, pageSizeOptions, showTotal, size, disabled, className, classNames, styles, }: PaginationProps): import("react
|
|
22
|
+
export declare function Pagination({ current: currentProp, defaultCurrent, pageSize: pageSizeProp, defaultPageSize, total, onChange, showSizeChanger, pageSizeOptions, showTotal, size, disabled, className, classNames, styles, }: PaginationProps): import("react").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import { type SemanticClassNames, type SemanticStyles } from '../../utils/semantic';
|
|
3
|
-
import { type ButtonProps } from '../button/button';
|
|
4
|
-
import { type PopoverPlacement } from '../popover/popover';
|
|
1
|
+
import { type CSSProperties, type MouseEvent, type ReactNode } from 'react';
|
|
2
|
+
import { type SemanticClassNames, type SemanticStyles } from '../../utils/semantic.js';
|
|
3
|
+
import { type ButtonProps } from '../button/button.js';
|
|
4
|
+
import { type PopoverPlacement } from '../popover/popover.js';
|
|
5
5
|
import './popconfirm.css';
|
|
6
6
|
export type PopconfirmSemanticPart = 'content' | 'title' | 'description' | 'footer' | 'icon';
|
|
7
7
|
export interface PopconfirmProps {
|
|
@@ -38,4 +38,4 @@ export interface PopconfirmProps {
|
|
|
38
38
|
/** Exactly one trigger element. */
|
|
39
39
|
children: ReactNode;
|
|
40
40
|
}
|
|
41
|
-
export declare function Popconfirm({ title, description, onConfirm, onCancel, okText, cancelText, okButtonProps, cancelButtonProps, icon, disabled, open, defaultOpen, onOpenChange, placement, className, style, classNames, styles, children, }: PopconfirmProps): import("react
|
|
41
|
+
export declare function Popconfirm({ title, description, onConfirm, onCancel, okText, cancelText, okButtonProps, cancelButtonProps, icon, disabled, open, defaultOpen, onOpenChange, placement, className, style, classNames, styles, children, }: PopconfirmProps): import("react").JSX.Element;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { c } from "react-compiler-runtime";
|
|
3
|
+
import { useId } from "react";
|
|
3
4
|
import { useControlledOpen } from "../../utils/overlay.js";
|
|
4
5
|
import { cx } from "../../utils/semantic.js";
|
|
5
6
|
import { Button } from "../button/button.js";
|
|
@@ -7,12 +8,14 @@ import { Popover } from "../popover/popover.js";
|
|
|
7
8
|
import { StatusIcon } from "../status-icon/status-icon.js";
|
|
8
9
|
import "./popconfirm.css";
|
|
9
10
|
function Popconfirm(t0) {
|
|
10
|
-
const $ = c(
|
|
11
|
+
const $ = c(67);
|
|
11
12
|
const { title, description, onConfirm, onCancel, okText: t1, cancelText: t2, okButtonProps, cancelButtonProps, icon, disabled: t3, open, defaultOpen, onOpenChange, placement: t4, className, style, classNames, styles, children } = t0;
|
|
12
13
|
const okText = void 0 === t1 ? "OK" : t1;
|
|
13
14
|
const cancelText = void 0 === t2 ? "Cancel" : t2;
|
|
14
15
|
const disabled = void 0 === t3 ? false : t3;
|
|
15
16
|
const placement = void 0 === t4 ? "top" : t4;
|
|
17
|
+
const titleId = useId();
|
|
18
|
+
const descriptionId = useId();
|
|
16
19
|
const t5 = !disabled;
|
|
17
20
|
let t6;
|
|
18
21
|
if ($[0] !== defaultOpen || $[1] !== onOpenChange || $[2] !== open || $[3] !== t5) {
|
|
@@ -94,9 +97,10 @@ function Popconfirm(t0) {
|
|
|
94
97
|
$[22] = t14;
|
|
95
98
|
} else t14 = $[22];
|
|
96
99
|
let t15;
|
|
97
|
-
if ($[23] !== classNames?.title || $[24] !== styles?.title || $[25] !== title) {
|
|
100
|
+
if ($[23] !== classNames?.title || $[24] !== styles?.title || $[25] !== title || $[26] !== titleId) {
|
|
98
101
|
t15 = null != title && /*#__PURE__*/ jsx("div", {
|
|
99
102
|
"data-tao-popconfirm-title": "",
|
|
103
|
+
id: titleId,
|
|
100
104
|
className: cx(classNames?.title),
|
|
101
105
|
style: styles?.title,
|
|
102
106
|
children: title
|
|
@@ -104,23 +108,26 @@ function Popconfirm(t0) {
|
|
|
104
108
|
$[23] = classNames?.title;
|
|
105
109
|
$[24] = styles?.title;
|
|
106
110
|
$[25] = title;
|
|
107
|
-
$[26] =
|
|
108
|
-
|
|
111
|
+
$[26] = titleId;
|
|
112
|
+
$[27] = t15;
|
|
113
|
+
} else t15 = $[27];
|
|
109
114
|
let t16;
|
|
110
|
-
if ($[
|
|
115
|
+
if ($[28] !== classNames?.description || $[29] !== description || $[30] !== descriptionId || $[31] !== styles?.description) {
|
|
111
116
|
t16 = null != description && /*#__PURE__*/ jsx("div", {
|
|
112
117
|
"data-tao-popconfirm-description": "",
|
|
118
|
+
id: descriptionId,
|
|
113
119
|
className: cx(classNames?.description),
|
|
114
120
|
style: styles?.description,
|
|
115
121
|
children: description
|
|
116
122
|
});
|
|
117
|
-
$[
|
|
118
|
-
$[
|
|
119
|
-
$[
|
|
120
|
-
$[
|
|
121
|
-
|
|
123
|
+
$[28] = classNames?.description;
|
|
124
|
+
$[29] = description;
|
|
125
|
+
$[30] = descriptionId;
|
|
126
|
+
$[31] = styles?.description;
|
|
127
|
+
$[32] = t16;
|
|
128
|
+
} else t16 = $[32];
|
|
122
129
|
let t17;
|
|
123
|
-
if ($[
|
|
130
|
+
if ($[33] !== t15 || $[34] !== t16) {
|
|
124
131
|
t17 = /*#__PURE__*/ jsxs("div", {
|
|
125
132
|
"data-tao-popconfirm-text": "",
|
|
126
133
|
children: [
|
|
@@ -128,12 +135,12 @@ function Popconfirm(t0) {
|
|
|
128
135
|
t16
|
|
129
136
|
]
|
|
130
137
|
});
|
|
131
|
-
$[
|
|
132
|
-
$[
|
|
133
|
-
$[
|
|
134
|
-
} else t17 = $[
|
|
138
|
+
$[33] = t15;
|
|
139
|
+
$[34] = t16;
|
|
140
|
+
$[35] = t17;
|
|
141
|
+
} else t17 = $[35];
|
|
135
142
|
let t18;
|
|
136
|
-
if ($[
|
|
143
|
+
if ($[36] !== t14 || $[37] !== t17) {
|
|
137
144
|
t18 = /*#__PURE__*/ jsxs("div", {
|
|
138
145
|
"data-tao-popconfirm-message": "",
|
|
139
146
|
children: [
|
|
@@ -141,20 +148,20 @@ function Popconfirm(t0) {
|
|
|
141
148
|
t17
|
|
142
149
|
]
|
|
143
150
|
});
|
|
144
|
-
$[
|
|
145
|
-
$[
|
|
146
|
-
$[
|
|
147
|
-
} else t18 = $[
|
|
151
|
+
$[36] = t14;
|
|
152
|
+
$[37] = t17;
|
|
153
|
+
$[38] = t18;
|
|
154
|
+
} else t18 = $[38];
|
|
148
155
|
const t19 = classNames?.footer;
|
|
149
156
|
let t20;
|
|
150
|
-
if ($[
|
|
157
|
+
if ($[39] !== t19) {
|
|
151
158
|
t20 = cx(t19);
|
|
152
|
-
$[
|
|
153
|
-
$[
|
|
154
|
-
} else t20 = $[
|
|
159
|
+
$[39] = t19;
|
|
160
|
+
$[40] = t20;
|
|
161
|
+
} else t20 = $[40];
|
|
155
162
|
const t21 = styles?.footer;
|
|
156
163
|
let t22;
|
|
157
|
-
if ($[
|
|
164
|
+
if ($[41] !== cancelButtonProps || $[42] !== cancelText || $[43] !== handleCancel) {
|
|
158
165
|
t22 = /*#__PURE__*/ jsx(Button, {
|
|
159
166
|
variant: "secondary",
|
|
160
167
|
size: "small",
|
|
@@ -162,13 +169,13 @@ function Popconfirm(t0) {
|
|
|
162
169
|
...cancelButtonProps,
|
|
163
170
|
children: cancelText
|
|
164
171
|
});
|
|
165
|
-
$[
|
|
166
|
-
$[
|
|
167
|
-
$[
|
|
168
|
-
$[
|
|
169
|
-
} else t22 = $[
|
|
172
|
+
$[41] = cancelButtonProps;
|
|
173
|
+
$[42] = cancelText;
|
|
174
|
+
$[43] = handleCancel;
|
|
175
|
+
$[44] = t22;
|
|
176
|
+
} else t22 = $[44];
|
|
170
177
|
let t23;
|
|
171
|
-
if ($[
|
|
178
|
+
if ($[45] !== handleConfirm || $[46] !== okButtonProps || $[47] !== okText) {
|
|
172
179
|
t23 = /*#__PURE__*/ jsx(Button, {
|
|
173
180
|
variant: "primary",
|
|
174
181
|
size: "small",
|
|
@@ -176,13 +183,13 @@ function Popconfirm(t0) {
|
|
|
176
183
|
...okButtonProps,
|
|
177
184
|
children: okText
|
|
178
185
|
});
|
|
179
|
-
$[
|
|
180
|
-
$[
|
|
181
|
-
$[
|
|
182
|
-
$[
|
|
183
|
-
} else t23 = $[
|
|
186
|
+
$[45] = handleConfirm;
|
|
187
|
+
$[46] = okButtonProps;
|
|
188
|
+
$[47] = okText;
|
|
189
|
+
$[48] = t23;
|
|
190
|
+
} else t23 = $[48];
|
|
184
191
|
let t24;
|
|
185
|
-
if ($[
|
|
192
|
+
if ($[49] !== t20 || $[50] !== t21 || $[51] !== t22 || $[52] !== t23) {
|
|
186
193
|
t24 = /*#__PURE__*/ jsxs("div", {
|
|
187
194
|
"data-tao-popconfirm-footer": "",
|
|
188
195
|
className: t20,
|
|
@@ -192,14 +199,14 @@ function Popconfirm(t0) {
|
|
|
192
199
|
t23
|
|
193
200
|
]
|
|
194
201
|
});
|
|
195
|
-
$[
|
|
196
|
-
$[
|
|
197
|
-
$[
|
|
198
|
-
$[
|
|
199
|
-
$[
|
|
200
|
-
} else t24 = $[
|
|
202
|
+
$[49] = t20;
|
|
203
|
+
$[50] = t21;
|
|
204
|
+
$[51] = t22;
|
|
205
|
+
$[52] = t23;
|
|
206
|
+
$[53] = t24;
|
|
207
|
+
} else t24 = $[53];
|
|
201
208
|
let t25;
|
|
202
|
-
if ($[
|
|
209
|
+
if ($[54] !== t11 || $[55] !== t13 || $[56] !== t18 || $[57] !== t24) {
|
|
203
210
|
t25 = /*#__PURE__*/ jsxs("div", {
|
|
204
211
|
"data-tao-popconfirm": "",
|
|
205
212
|
className: t11,
|
|
@@ -209,30 +216,36 @@ function Popconfirm(t0) {
|
|
|
209
216
|
t24
|
|
210
217
|
]
|
|
211
218
|
});
|
|
212
|
-
$[
|
|
213
|
-
$[
|
|
214
|
-
$[
|
|
215
|
-
$[
|
|
216
|
-
$[
|
|
217
|
-
} else t25 = $[
|
|
219
|
+
$[54] = t11;
|
|
220
|
+
$[55] = t13;
|
|
221
|
+
$[56] = t18;
|
|
222
|
+
$[57] = t24;
|
|
223
|
+
$[58] = t25;
|
|
224
|
+
} else t25 = $[58];
|
|
218
225
|
const content = t25;
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
226
|
+
const t26 = null != title ? titleId : void 0;
|
|
227
|
+
const t27 = null != description ? descriptionId : void 0;
|
|
228
|
+
let t28;
|
|
229
|
+
if ($[59] !== children || $[60] !== content || $[61] !== placement || $[62] !== realOpen || $[63] !== setOpen || $[64] !== t26 || $[65] !== t27) {
|
|
230
|
+
t28 = /*#__PURE__*/ jsx(Popover, {
|
|
222
231
|
trigger: "click",
|
|
223
232
|
placement: placement,
|
|
224
233
|
open: realOpen,
|
|
225
234
|
onOpenChange: setOpen,
|
|
226
235
|
content: content,
|
|
236
|
+
"aria-labelledby": t26,
|
|
237
|
+
"aria-describedby": t27,
|
|
227
238
|
children: children
|
|
228
239
|
});
|
|
229
|
-
$[
|
|
230
|
-
$[
|
|
231
|
-
$[
|
|
232
|
-
$[
|
|
233
|
-
$[
|
|
234
|
-
$[
|
|
235
|
-
|
|
236
|
-
|
|
240
|
+
$[59] = children;
|
|
241
|
+
$[60] = content;
|
|
242
|
+
$[61] = placement;
|
|
243
|
+
$[62] = realOpen;
|
|
244
|
+
$[63] = setOpen;
|
|
245
|
+
$[64] = t26;
|
|
246
|
+
$[65] = t27;
|
|
247
|
+
$[66] = t28;
|
|
248
|
+
} else t28 = $[66];
|
|
249
|
+
return t28;
|
|
237
250
|
}
|
|
238
251
|
export { Popconfirm };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { type CSSProperties, type ReactNode } from 'react';
|
|
2
|
-
import { type SemanticClassNames, type SemanticStyles } from '../../utils/semantic';
|
|
1
|
+
import { type AriaAttributes, type CSSProperties, type ReactNode } from 'react';
|
|
2
|
+
import { type SemanticClassNames, type SemanticStyles } from '../../utils/semantic.js';
|
|
3
3
|
import './popover.css';
|
|
4
4
|
export type PopoverSemanticPart = 'root' | 'container' | 'title' | 'content' | 'arrow';
|
|
5
5
|
export type PopoverTrigger = 'hover' | 'focus' | 'click' | 'contextMenu';
|
|
6
6
|
export type PopoverPlacement = 'top' | 'topLeft' | 'topRight' | 'bottom' | 'bottomLeft' | 'bottomRight' | 'left' | 'leftTop' | 'leftBottom' | 'right' | 'rightTop' | 'rightBottom';
|
|
7
7
|
type PopoverRender = ReactNode | (() => ReactNode);
|
|
8
|
-
export interface PopoverProps {
|
|
8
|
+
export interface PopoverProps extends Pick<AriaAttributes, 'aria-label' | 'aria-labelledby' | 'aria-describedby'> {
|
|
9
9
|
/** Header content of the popup. */
|
|
10
10
|
title?: PopoverRender;
|
|
11
11
|
/** Body content of the popup. */
|
|
@@ -37,5 +37,5 @@ export interface PopoverProps {
|
|
|
37
37
|
/** Exactly one trigger element. */
|
|
38
38
|
children: ReactNode;
|
|
39
39
|
}
|
|
40
|
-
export declare function Popover({ title, content, trigger, placement, open, defaultOpen, onOpenChange, mouseEnterDelay, mouseLeaveDelay, arrow, destroyOnHidden, destroyTooltipOnHide, className, style, classNames, styles, children, }: PopoverProps): import("react
|
|
40
|
+
export declare function Popover({ title, content, trigger, placement, open, defaultOpen, onOpenChange, mouseEnterDelay, mouseLeaveDelay, arrow, destroyOnHidden, destroyTooltipOnHide, className, style, classNames, styles, children, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, 'aria-describedby': ariaDescribedBy, }: PopoverProps): import("react").JSX.Element;
|
|
41
41
|
export {};
|