@rockshin/tao-ui 0.0.39 → 0.0.41

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.
Files changed (143) hide show
  1. package/README.md +12 -0
  2. package/dist/components/alert/alert.d.ts +2 -2
  3. package/dist/components/breadcrumb/breadcrumb.d.ts +2 -2
  4. package/dist/components/button/button.d.ts +2 -2
  5. package/dist/components/checkbox/checkbox.css +4 -0
  6. package/dist/components/checkbox/checkbox.d.ts +8 -6
  7. package/dist/components/checkbox/checkbox.js +184 -111
  8. package/dist/components/collapsible/collapsible.d.ts +6 -6
  9. package/dist/components/context-menu/context-menu.d.ts +3 -3
  10. package/dist/components/date-picker/calendar/calendar-grid.d.ts +1 -1
  11. package/dist/components/date-picker/calendar/calendar-grid.js +47 -35
  12. package/dist/components/date-picker/calendar/calendar-header.d.ts +2 -2
  13. package/dist/components/date-picker/calendar/month-grid.d.ts +1 -1
  14. package/dist/components/date-picker/calendar/month-grid.js +1 -0
  15. package/dist/components/date-picker/calendar/time-panel.d.ts +2 -2
  16. package/dist/components/date-picker/calendar/time-panel.js +10 -7
  17. package/dist/components/date-picker/calendar/year-grid.d.ts +1 -1
  18. package/dist/components/date-picker/calendar/year-grid.js +1 -0
  19. package/dist/components/date-picker/date-picker.css +4 -0
  20. package/dist/components/date-picker/date-picker.d.ts +7 -6
  21. package/dist/components/date-picker/date-picker.js +52 -5
  22. package/dist/components/date-picker/presets.d.ts +1 -1
  23. package/dist/components/date-picker/range-picker.d.ts +6 -5
  24. package/dist/components/date-picker/range-picker.js +124 -28
  25. package/dist/components/date-picker/types.d.ts +1 -1
  26. package/dist/components/drawer/drawer.d.ts +4 -4
  27. package/dist/components/drawer/drawer.js +125 -111
  28. package/dist/components/dropdown/dropdown.d.ts +8 -8
  29. package/dist/components/form/form-context.d.ts +1 -1
  30. package/dist/components/form/form-item.d.ts +3 -3
  31. package/dist/components/form/form.d.ts +3 -3
  32. package/dist/components/form/index.d.ts +2 -2
  33. package/dist/components/form-actions/form-actions.d.ts +2 -2
  34. package/dist/components/form-field/form-field-view.d.ts +2 -2
  35. package/dist/components/form-field/form-field.d.ts +2 -2
  36. package/dist/components/form-section/form-section.d.ts +2 -2
  37. package/dist/components/input/input.d.ts +2 -2
  38. package/dist/components/input/input.js +1 -1
  39. package/dist/components/input-number/input-number.d.ts +6 -7
  40. package/dist/components/input-number/input-number.js +91 -65
  41. package/dist/components/menu/menu-render.d.ts +1 -1
  42. package/dist/components/modal/confirm-dialog.d.ts +4 -4
  43. package/dist/components/modal/confirm.d.ts +1 -1
  44. package/dist/components/modal/index.d.ts +8 -8
  45. package/dist/components/modal/modal.d.ts +6 -6
  46. package/dist/components/modal/modal.js +115 -101
  47. package/dist/components/modal/use-modal.d.ts +2 -2
  48. package/dist/components/pagination/pagination.d.ts +3 -3
  49. package/dist/components/popconfirm/popconfirm.d.ts +5 -5
  50. package/dist/components/popconfirm/popconfirm.js +74 -61
  51. package/dist/components/popover/popover.d.ts +4 -4
  52. package/dist/components/popover/popover.js +124 -115
  53. package/dist/components/radio/radio.d.ts +9 -6
  54. package/dist/components/radio/radio.js +210 -116
  55. package/dist/components/scroll-area/scroll-area.d.ts +2 -2
  56. package/dist/components/select/mobile-select.d.ts +3 -3
  57. package/dist/components/select/mobile-select.js +3 -1
  58. package/dist/components/select/select-icons.d.ts +5 -5
  59. package/dist/components/select/select-model.d.ts +1 -1
  60. package/dist/components/select/select-searchable-list.d.ts +2 -2
  61. package/dist/components/select/select-tags.d.ts +3 -3
  62. package/dist/components/select/select-types.d.ts +2 -2
  63. package/dist/components/select/select.css +1 -0
  64. package/dist/components/select/select.d.ts +2 -2
  65. package/dist/components/select/use-select-selection.d.ts +3 -3
  66. package/dist/components/sonner/index.d.ts +1 -1
  67. package/dist/components/sonner/sonner.d.ts +5 -4
  68. package/dist/components/spinner/spinner.d.ts +5 -5
  69. package/dist/components/spinner/spinner.js +106 -99
  70. package/dist/components/splitter/splitter.d.ts +3 -3
  71. package/dist/components/status-icon/status-icon.d.ts +1 -1
  72. package/dist/components/steps/steps-icons.d.ts +4 -4
  73. package/dist/components/steps/steps.d.ts +3 -3
  74. package/dist/components/steps/use-display-steps.d.ts +1 -1
  75. package/dist/components/switch/switch.d.ts +4 -3
  76. package/dist/components/switch/switch.js +134 -86
  77. package/dist/components/table/table-filter.d.ts +2 -2
  78. package/dist/components/table/table-icons.d.ts +6 -6
  79. package/dist/components/table/table-model.d.ts +2 -2
  80. package/dist/components/table/table-summary.d.ts +5 -5
  81. package/dist/components/table/table-types.d.ts +3 -3
  82. package/dist/components/table/table.d.ts +6 -6
  83. package/dist/components/table/use-table-data.d.ts +1 -1
  84. package/dist/components/tabs/tabs.d.ts +5 -5
  85. package/dist/components/tabs/tabs.js +72 -65
  86. package/dist/components/tag/tag.d.ts +4 -4
  87. package/dist/components/tag/tag.js +38 -35
  88. package/dist/components/textarea/textarea.d.ts +2 -2
  89. package/dist/components/textarea/textarea.js +1 -1
  90. package/dist/components/tooltip/tooltip.d.ts +2 -2
  91. package/dist/docs/component-docs.d.ts +1 -1
  92. package/dist/docs/components/alert.doc.d.ts +1 -1
  93. package/dist/docs/components/button.doc.d.ts +1 -1
  94. package/dist/docs/components/popover.doc.d.ts +1 -1
  95. package/dist/docs/components/tooltip.doc.d.ts +4 -4
  96. package/dist/docs/index.d.ts +2 -2
  97. package/dist/entries/alert.d.ts +1 -1
  98. package/dist/entries/breadcrumb.d.ts +1 -1
  99. package/dist/entries/button.d.ts +1 -1
  100. package/dist/entries/checkbox.d.ts +1 -1
  101. package/dist/entries/collapsible.d.ts +1 -1
  102. package/dist/entries/context-menu.d.ts +1 -1
  103. package/dist/entries/date-picker.d.ts +1 -1
  104. package/dist/entries/drawer.d.ts +1 -1
  105. package/dist/entries/dropdown.d.ts +1 -1
  106. package/dist/entries/form-actions.d.ts +1 -1
  107. package/dist/entries/form-field.d.ts +1 -1
  108. package/dist/entries/form-layout.d.ts +1 -1
  109. package/dist/entries/form-section.d.ts +1 -1
  110. package/dist/entries/form.d.ts +1 -1
  111. package/dist/entries/input-number.d.ts +1 -1
  112. package/dist/entries/input.d.ts +1 -1
  113. package/dist/entries/modal.d.ts +1 -1
  114. package/dist/entries/number-input.d.ts +1 -1
  115. package/dist/entries/pagination.d.ts +1 -1
  116. package/dist/entries/popconfirm.d.ts +1 -1
  117. package/dist/entries/popover.d.ts +1 -1
  118. package/dist/entries/provider.d.ts +1 -1
  119. package/dist/entries/radio.d.ts +1 -1
  120. package/dist/entries/range-picker.d.ts +1 -1
  121. package/dist/entries/scroll-area.d.ts +1 -1
  122. package/dist/entries/select.d.ts +1 -1
  123. package/dist/entries/sonner.d.ts +1 -1
  124. package/dist/entries/spinner.d.ts +1 -1
  125. package/dist/entries/splitter.d.ts +1 -1
  126. package/dist/entries/stack.d.ts +1 -1
  127. package/dist/entries/steps.d.ts +1 -1
  128. package/dist/entries/switch.d.ts +1 -1
  129. package/dist/entries/table.d.ts +1 -1
  130. package/dist/entries/tabs.d.ts +1 -1
  131. package/dist/entries/tag.d.ts +1 -1
  132. package/dist/entries/textarea.d.ts +1 -1
  133. package/dist/entries/tooltip.d.ts +1 -1
  134. package/dist/index.d.ts +40 -40
  135. package/dist/layouts/form-layout/form-layout.d.ts +2 -2
  136. package/dist/layouts/stack/stack.d.ts +3 -3
  137. package/dist/number-input/format.d.ts +1 -1
  138. package/dist/number-input/index.d.ts +4 -4
  139. package/dist/number-input/number-input.d.ts +2 -2
  140. package/dist/number-input/use-number-input.d.ts +1 -1
  141. package/dist/provider/tao-provider.d.ts +3 -3
  142. package/dist/utils/dialog-content.d.ts +1 -1
  143. 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(89);
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] !== keyboard) {
177
- t26 = (e)=>{
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
- $[43] = keyboard;
181
- $[44] = t26;
182
- } else t26 = $[44];
183
- let t27;
184
- if ($[45] !== classNames?.close || $[46] !== classNames?.header || $[47] !== classNames?.title || $[48] !== closable || $[49] !== onClose || $[50] !== stylesProp?.close || $[51] !== stylesProp?.header || $[52] !== stylesProp?.title || $[53] !== title) {
185
- t27 = (null != title || closable) && /*#__PURE__*/ jsxs("div", {
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
- $[45] = classNames?.close;
213
- $[46] = classNames?.header;
214
- $[47] = classNames?.title;
215
- $[48] = closable;
216
- $[49] = onClose;
217
- $[50] = stylesProp?.close;
218
- $[51] = stylesProp?.header;
219
- $[52] = stylesProp?.title;
220
- $[53] = title;
221
- $[54] = t27;
222
- } else t27 = $[54];
223
- const t28 = classNames?.body;
224
- let t29;
225
- if ($[55] !== t28) {
226
- t29 = cx(t28);
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
- $[60] = t31;
243
- } else t31 = $[60];
238
+ } else t30 = $[59];
239
+ const t31 = stylesProp?.body;
244
240
  let t32;
245
- if ($[61] !== classNames?.footer || $[62] !== footerContent || $[63] !== stylesProp?.footer) {
246
- t32 = null != footerContent && /*#__PURE__*/ jsx("div", {
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
- $[61] = classNames?.footer;
253
- $[62] = footerContent;
254
- $[63] = stylesProp?.footer;
255
- $[64] = t32;
256
- } else t32 = $[64];
257
- let t33;
258
- if ($[65] !== contentStyle || $[66] !== forceMount || $[67] !== keepAlive || $[68] !== open || $[69] !== t25 || $[70] !== t26 || $[71] !== t27 || $[72] !== t31 || $[73] !== t32) {
259
- t33 = /*#__PURE__*/ jsxs(DialogContent, {
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-describedby": void 0,
267
- onEscapeKeyDown: t26,
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
- t27,
272
- t31,
273
- t32
282
+ t28,
283
+ t32,
284
+ t33
274
285
  ]
275
286
  });
276
- $[65] = contentStyle;
277
- $[66] = forceMount;
278
- $[67] = keepAlive;
279
- $[68] = open;
280
- $[69] = t25;
281
- $[70] = t26;
282
- $[71] = t27;
283
- $[72] = t31;
284
- $[73] = t32;
285
- $[74] = t33;
286
- } else t33 = $[74];
287
- let t34;
288
- if ($[75] !== t22 || $[76] !== t23 || $[77] !== t33) {
289
- t34 = /*#__PURE__*/ jsx("div", {
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: t33
307
+ children: t34
294
308
  });
295
- $[75] = t22;
296
- $[76] = t23;
297
- $[77] = t33;
298
- $[78] = t34;
299
- } else t34 = $[78];
300
- let t35;
301
- if ($[79] !== t21 || $[80] !== t34) {
302
- t35 = /*#__PURE__*/ jsxs(TaoPortalScope, {
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
- t34
319
+ t35
306
320
  ]
307
321
  });
308
- $[79] = t21;
309
- $[80] = t34;
310
- $[81] = t35;
311
- } else t35 = $[81];
312
- let t36;
313
- if ($[82] !== forceMount || $[83] !== t35) {
314
- t36 = /*#__PURE__*/ jsx(__rspack_external__radix_ui_react_dialog_dabd8325.Portal, {
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: t35
330
+ children: t36
317
331
  });
318
- $[82] = forceMount;
319
- $[83] = t35;
320
- $[84] = t36;
321
- } else t36 = $[84];
322
- let t37;
323
- if ($[85] !== open || $[86] !== t20 || $[87] !== t36) {
324
- t37 = /*#__PURE__*/ jsx(__rspack_external__radix_ui_react_dialog_dabd8325.Root, {
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: t36
341
+ children: t37
328
342
  });
329
- $[85] = open;
330
- $[86] = t20;
331
- $[87] = t36;
332
- $[88] = t37;
333
- } else t37 = $[88];
334
- return t37;
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/jsx-runtime").JSX.Element;
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 { CSSProperties, MouseEvent, ReactNode } from 'react';
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/jsx-runtime").JSX.Element;
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(63);
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] = t15;
108
- } else t15 = $[26];
111
+ $[26] = titleId;
112
+ $[27] = t15;
113
+ } else t15 = $[27];
109
114
  let t16;
110
- if ($[27] !== classNames?.description || $[28] !== description || $[29] !== styles?.description) {
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
- $[27] = classNames?.description;
118
- $[28] = description;
119
- $[29] = styles?.description;
120
- $[30] = t16;
121
- } else t16 = $[30];
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 ($[31] !== t15 || $[32] !== t16) {
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
- $[31] = t15;
132
- $[32] = t16;
133
- $[33] = t17;
134
- } else t17 = $[33];
138
+ $[33] = t15;
139
+ $[34] = t16;
140
+ $[35] = t17;
141
+ } else t17 = $[35];
135
142
  let t18;
136
- if ($[34] !== t14 || $[35] !== t17) {
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
- $[34] = t14;
145
- $[35] = t17;
146
- $[36] = t18;
147
- } else t18 = $[36];
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 ($[37] !== t19) {
157
+ if ($[39] !== t19) {
151
158
  t20 = cx(t19);
152
- $[37] = t19;
153
- $[38] = t20;
154
- } else t20 = $[38];
159
+ $[39] = t19;
160
+ $[40] = t20;
161
+ } else t20 = $[40];
155
162
  const t21 = styles?.footer;
156
163
  let t22;
157
- if ($[39] !== cancelButtonProps || $[40] !== cancelText || $[41] !== handleCancel) {
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
- $[39] = cancelButtonProps;
166
- $[40] = cancelText;
167
- $[41] = handleCancel;
168
- $[42] = t22;
169
- } else t22 = $[42];
172
+ $[41] = cancelButtonProps;
173
+ $[42] = cancelText;
174
+ $[43] = handleCancel;
175
+ $[44] = t22;
176
+ } else t22 = $[44];
170
177
  let t23;
171
- if ($[43] !== handleConfirm || $[44] !== okButtonProps || $[45] !== okText) {
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
- $[43] = handleConfirm;
180
- $[44] = okButtonProps;
181
- $[45] = okText;
182
- $[46] = t23;
183
- } else t23 = $[46];
186
+ $[45] = handleConfirm;
187
+ $[46] = okButtonProps;
188
+ $[47] = okText;
189
+ $[48] = t23;
190
+ } else t23 = $[48];
184
191
  let t24;
185
- if ($[47] !== t20 || $[48] !== t21 || $[49] !== t22 || $[50] !== t23) {
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
- $[47] = t20;
196
- $[48] = t21;
197
- $[49] = t22;
198
- $[50] = t23;
199
- $[51] = t24;
200
- } else t24 = $[51];
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 ($[52] !== t11 || $[53] !== t13 || $[54] !== t18 || $[55] !== t24) {
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
- $[52] = t11;
213
- $[53] = t13;
214
- $[54] = t18;
215
- $[55] = t24;
216
- $[56] = t25;
217
- } else t25 = $[56];
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
- let t26;
220
- if ($[57] !== children || $[58] !== content || $[59] !== placement || $[60] !== realOpen || $[61] !== setOpen) {
221
- t26 = /*#__PURE__*/ jsx(Popover, {
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
- $[57] = children;
230
- $[58] = content;
231
- $[59] = placement;
232
- $[60] = realOpen;
233
- $[61] = setOpen;
234
- $[62] = t26;
235
- } else t26 = $[62];
236
- return t26;
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/jsx-runtime").JSX.Element;
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 {};