@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
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { c } from "react-compiler-runtime";
|
|
3
3
|
import * as __rspack_external__radix_ui_react_popover_c8444160 from "@radix-ui/react-popover";
|
|
4
|
-
import { useEffect, useRef } from "react";
|
|
4
|
+
import { useEffect, useId, useRef } from "react";
|
|
5
5
|
import { TaoPortalScope } from "../../provider/tao-provider.js";
|
|
6
6
|
import { asTriggerChild, useControlledOpen } from "../../utils/overlay.js";
|
|
7
7
|
import { cx } from "../../utils/semantic.js";
|
|
@@ -63,13 +63,14 @@ function isRenderable(node) {
|
|
|
63
63
|
return null != node && false !== node && '' !== node;
|
|
64
64
|
}
|
|
65
65
|
function Popover(t0) {
|
|
66
|
-
const $ = c(
|
|
67
|
-
const { title, content, trigger: t1, placement: t2, open, defaultOpen, onOpenChange, mouseEnterDelay: t3, mouseLeaveDelay: t4, arrow: t5, destroyOnHidden, destroyTooltipOnHide, className, style, classNames, styles, children } = t0;
|
|
66
|
+
const $ = c(91);
|
|
67
|
+
const { title, content, trigger: t1, placement: t2, open, defaultOpen, onOpenChange, mouseEnterDelay: t3, mouseLeaveDelay: t4, arrow: t5, destroyOnHidden, destroyTooltipOnHide, className, style, classNames, styles, children, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, "aria-describedby": ariaDescribedBy } = t0;
|
|
68
68
|
const trigger = void 0 === t1 ? "hover" : t1;
|
|
69
69
|
const placement = void 0 === t2 ? "top" : t2;
|
|
70
70
|
const mouseEnterDelay = void 0 === t3 ? 0.1 : t3;
|
|
71
71
|
const mouseLeaveDelay = void 0 === t4 ? 0.1 : t4;
|
|
72
72
|
const arrow = void 0 === t5 ? true : t5;
|
|
73
|
+
const titleId = useId();
|
|
73
74
|
let t6;
|
|
74
75
|
if ($[0] !== trigger) {
|
|
75
76
|
t6 = Array.isArray(trigger) ? trigger : [
|
|
@@ -266,81 +267,83 @@ function Popover(t0) {
|
|
|
266
267
|
const T0 = TaoPortalScope;
|
|
267
268
|
const t26 = true;
|
|
268
269
|
const t27 = __rspack_external__radix_ui_react_popover_c8444160;
|
|
269
|
-
const t28 =
|
|
270
|
-
const t29 =
|
|
271
|
-
const t30 =
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
270
|
+
const t28 = ariaLabelledBy ?? (!ariaLabel && isRenderable(titleNode) ? titleId : void 0);
|
|
271
|
+
const t29 = "";
|
|
272
|
+
const t30 = !shouldDestroy || void 0;
|
|
273
|
+
const t31 = classNames?.root;
|
|
274
|
+
let t32;
|
|
275
|
+
if ($[41] !== className || $[42] !== t31) {
|
|
276
|
+
t32 = cx(t31, className);
|
|
275
277
|
$[41] = className;
|
|
276
|
-
$[42] =
|
|
277
|
-
$[43] =
|
|
278
|
-
} else
|
|
279
|
-
const
|
|
280
|
-
let
|
|
281
|
-
if ($[44] !== style || $[45] !==
|
|
282
|
-
|
|
283
|
-
...
|
|
278
|
+
$[42] = t31;
|
|
279
|
+
$[43] = t32;
|
|
280
|
+
} else t32 = $[43];
|
|
281
|
+
const t33 = styles?.root;
|
|
282
|
+
let t34;
|
|
283
|
+
if ($[44] !== style || $[45] !== t33) {
|
|
284
|
+
t34 = {
|
|
285
|
+
...t33,
|
|
284
286
|
...style
|
|
285
287
|
};
|
|
286
288
|
$[44] = style;
|
|
287
|
-
$[45] =
|
|
288
|
-
$[46] =
|
|
289
|
-
} else
|
|
290
|
-
const
|
|
291
|
-
const
|
|
292
|
-
const
|
|
293
|
-
const
|
|
294
|
-
const
|
|
295
|
-
let
|
|
289
|
+
$[45] = t33;
|
|
290
|
+
$[46] = t34;
|
|
291
|
+
} else t34 = $[46];
|
|
292
|
+
const t35 = 4;
|
|
293
|
+
const t36 = shouldDestroy ? void 0 : true;
|
|
294
|
+
const t37 = _temp;
|
|
295
|
+
const t38 = focusMode ? cancelTimers : void 0;
|
|
296
|
+
const t39 = focusMode ? handleBlur : void 0;
|
|
297
|
+
let t40;
|
|
296
298
|
if ($[47] !== focusMode) {
|
|
297
|
-
|
|
299
|
+
t40 = (event_2)=>{
|
|
298
300
|
if (focusMode && containsFocusTarget(event_2.target)) event_2.preventDefault();
|
|
299
301
|
};
|
|
300
302
|
$[47] = focusMode;
|
|
301
|
-
$[48] =
|
|
302
|
-
} else
|
|
303
|
-
const
|
|
304
|
-
const
|
|
305
|
-
let
|
|
306
|
-
if ($[49] !==
|
|
307
|
-
|
|
308
|
-
$[49] =
|
|
309
|
-
$[50] =
|
|
310
|
-
} else
|
|
311
|
-
const
|
|
312
|
-
const
|
|
303
|
+
$[48] = t40;
|
|
304
|
+
} else t40 = $[48];
|
|
305
|
+
const t41 = "";
|
|
306
|
+
const t42 = classNames?.container;
|
|
307
|
+
let t43;
|
|
308
|
+
if ($[49] !== t42) {
|
|
309
|
+
t43 = cx(t42);
|
|
310
|
+
$[49] = t42;
|
|
311
|
+
$[50] = t43;
|
|
312
|
+
} else t43 = $[50];
|
|
313
|
+
const t44 = styles?.container;
|
|
314
|
+
const t45 = isRenderable(titleNode) && /*#__PURE__*/ jsx("div", {
|
|
313
315
|
"data-tao-popover-title": "",
|
|
316
|
+
id: titleId,
|
|
314
317
|
className: cx(classNames?.title),
|
|
315
318
|
style: styles?.title,
|
|
316
319
|
children: titleNode
|
|
317
320
|
});
|
|
318
|
-
const
|
|
321
|
+
const t46 = isRenderable(contentNode) && /*#__PURE__*/ jsx("div", {
|
|
319
322
|
"data-tao-popover-content": "",
|
|
320
323
|
className: cx(classNames?.content),
|
|
321
324
|
style: styles?.content,
|
|
322
325
|
children: contentNode
|
|
323
326
|
});
|
|
324
|
-
let
|
|
325
|
-
if ($[51] !==
|
|
326
|
-
|
|
327
|
-
"data-tao-popover-container":
|
|
328
|
-
className:
|
|
329
|
-
style:
|
|
327
|
+
let t47;
|
|
328
|
+
if ($[51] !== t43 || $[52] !== t44 || $[53] !== t45 || $[54] !== t46) {
|
|
329
|
+
t47 = /*#__PURE__*/ jsxs("div", {
|
|
330
|
+
"data-tao-popover-container": t41,
|
|
331
|
+
className: t43,
|
|
332
|
+
style: t44,
|
|
330
333
|
children: [
|
|
331
|
-
|
|
332
|
-
|
|
334
|
+
t45,
|
|
335
|
+
t46
|
|
333
336
|
]
|
|
334
337
|
});
|
|
335
|
-
$[51] =
|
|
336
|
-
$[52] =
|
|
337
|
-
$[53] =
|
|
338
|
-
$[54] =
|
|
339
|
-
$[55] =
|
|
340
|
-
} else
|
|
341
|
-
let
|
|
338
|
+
$[51] = t43;
|
|
339
|
+
$[52] = t44;
|
|
340
|
+
$[53] = t45;
|
|
341
|
+
$[54] = t46;
|
|
342
|
+
$[55] = t47;
|
|
343
|
+
} else t47 = $[55];
|
|
344
|
+
let t48;
|
|
342
345
|
if ($[56] !== arrow || $[57] !== classNames?.arrow || $[58] !== styles?.arrow) {
|
|
343
|
-
|
|
346
|
+
t48 = false !== arrow && /*#__PURE__*/ jsx(__rspack_external__radix_ui_react_popover_c8444160.Arrow, {
|
|
344
347
|
asChild: true,
|
|
345
348
|
children: /*#__PURE__*/ jsx("span", {
|
|
346
349
|
"data-tao-popover-arrow": "",
|
|
@@ -351,85 +354,91 @@ function Popover(t0) {
|
|
|
351
354
|
$[56] = arrow;
|
|
352
355
|
$[57] = classNames?.arrow;
|
|
353
356
|
$[58] = styles?.arrow;
|
|
354
|
-
$[59] =
|
|
355
|
-
} else
|
|
356
|
-
let
|
|
357
|
-
if ($[60] !==
|
|
358
|
-
|
|
357
|
+
$[59] = t48;
|
|
358
|
+
} else t48 = $[59];
|
|
359
|
+
let t49;
|
|
360
|
+
if ($[60] !== ariaDescribedBy || $[61] !== ariaLabel || $[62] !== hoverProps || $[63] !== placement || $[64] !== placementProps || $[65] !== t27.Content || $[66] !== t28 || $[67] !== t30 || $[68] !== t32 || $[69] !== t34 || $[70] !== t36 || $[71] !== t37 || $[72] !== t38 || $[73] !== t39 || $[74] !== t40 || $[75] !== t47 || $[76] !== t48) {
|
|
361
|
+
t49 = /*#__PURE__*/ jsxs(t27.Content, {
|
|
359
362
|
ref: popupRef,
|
|
360
|
-
"
|
|
363
|
+
"aria-label": ariaLabel,
|
|
364
|
+
"aria-labelledby": t28,
|
|
365
|
+
"aria-describedby": ariaDescribedBy,
|
|
366
|
+
"data-tao-popover": t29,
|
|
361
367
|
"data-tao-placement": placement,
|
|
362
|
-
"data-tao-keep-alive":
|
|
363
|
-
className:
|
|
364
|
-
style:
|
|
368
|
+
"data-tao-keep-alive": t30,
|
|
369
|
+
className: t32,
|
|
370
|
+
style: t34,
|
|
365
371
|
...placementProps,
|
|
366
|
-
sideOffset:
|
|
367
|
-
forceMount:
|
|
368
|
-
onOpenAutoFocus:
|
|
369
|
-
onFocusCapture:
|
|
370
|
-
onBlurCapture:
|
|
371
|
-
onFocusOutside:
|
|
372
|
+
sideOffset: t35,
|
|
373
|
+
forceMount: t36,
|
|
374
|
+
onOpenAutoFocus: t37,
|
|
375
|
+
onFocusCapture: t38,
|
|
376
|
+
onBlurCapture: t39,
|
|
377
|
+
onFocusOutside: t40,
|
|
372
378
|
...hoverProps,
|
|
373
379
|
children: [
|
|
374
|
-
|
|
375
|
-
|
|
380
|
+
t47,
|
|
381
|
+
t48
|
|
376
382
|
]
|
|
377
383
|
});
|
|
378
|
-
$[60] =
|
|
379
|
-
$[61] =
|
|
380
|
-
$[62] =
|
|
381
|
-
$[63] =
|
|
382
|
-
$[64] =
|
|
383
|
-
$[65] =
|
|
384
|
-
$[66] =
|
|
385
|
-
$[67] =
|
|
386
|
-
$[68] =
|
|
387
|
-
$[69] =
|
|
388
|
-
$[70] =
|
|
389
|
-
$[71] =
|
|
390
|
-
$[72] =
|
|
391
|
-
$[73] =
|
|
392
|
-
$[74] =
|
|
393
|
-
|
|
394
|
-
let t49;
|
|
395
|
-
if ($[75] !== T0 || $[76] !== t48) {
|
|
396
|
-
t49 = /*#__PURE__*/ jsx(T0, {
|
|
397
|
-
asChild: t26,
|
|
398
|
-
children: t48
|
|
399
|
-
});
|
|
400
|
-
$[75] = T0;
|
|
384
|
+
$[60] = ariaDescribedBy;
|
|
385
|
+
$[61] = ariaLabel;
|
|
386
|
+
$[62] = hoverProps;
|
|
387
|
+
$[63] = placement;
|
|
388
|
+
$[64] = placementProps;
|
|
389
|
+
$[65] = t27.Content;
|
|
390
|
+
$[66] = t28;
|
|
391
|
+
$[67] = t30;
|
|
392
|
+
$[68] = t32;
|
|
393
|
+
$[69] = t34;
|
|
394
|
+
$[70] = t36;
|
|
395
|
+
$[71] = t37;
|
|
396
|
+
$[72] = t38;
|
|
397
|
+
$[73] = t39;
|
|
398
|
+
$[74] = t40;
|
|
399
|
+
$[75] = t47;
|
|
401
400
|
$[76] = t48;
|
|
402
401
|
$[77] = t49;
|
|
403
402
|
} else t49 = $[77];
|
|
404
403
|
let t50;
|
|
405
|
-
if ($[78] !==
|
|
406
|
-
t50 = /*#__PURE__*/ jsx(
|
|
407
|
-
|
|
404
|
+
if ($[78] !== T0 || $[79] !== t49) {
|
|
405
|
+
t50 = /*#__PURE__*/ jsx(T0, {
|
|
406
|
+
asChild: t26,
|
|
408
407
|
children: t49
|
|
409
408
|
});
|
|
410
|
-
$[78] =
|
|
411
|
-
$[79] =
|
|
412
|
-
$[80] =
|
|
413
|
-
|
|
414
|
-
} else t50 = $[81];
|
|
409
|
+
$[78] = T0;
|
|
410
|
+
$[79] = t49;
|
|
411
|
+
$[80] = t50;
|
|
412
|
+
} else t50 = $[80];
|
|
415
413
|
let t51;
|
|
416
|
-
if ($[
|
|
417
|
-
t51 = /*#__PURE__*/
|
|
414
|
+
if ($[81] !== t24.Portal || $[82] !== t25 || $[83] !== t50) {
|
|
415
|
+
t51 = /*#__PURE__*/ jsx(t24.Portal, {
|
|
416
|
+
forceMount: t25,
|
|
417
|
+
children: t50
|
|
418
|
+
});
|
|
419
|
+
$[81] = t24.Portal;
|
|
420
|
+
$[82] = t25;
|
|
421
|
+
$[83] = t50;
|
|
422
|
+
$[84] = t51;
|
|
423
|
+
} else t51 = $[84];
|
|
424
|
+
let t52;
|
|
425
|
+
if ($[85] !== realOpen || $[86] !== setOpen || $[87] !== t21.Root || $[88] !== t23 || $[89] !== t51) {
|
|
426
|
+
t52 = /*#__PURE__*/ jsxs(t21.Root, {
|
|
418
427
|
open: realOpen,
|
|
419
428
|
onOpenChange: setOpen,
|
|
420
429
|
children: [
|
|
421
430
|
t23,
|
|
422
|
-
|
|
431
|
+
t51
|
|
423
432
|
]
|
|
424
433
|
});
|
|
425
|
-
$[
|
|
426
|
-
$[
|
|
427
|
-
$[
|
|
428
|
-
$[
|
|
429
|
-
$[
|
|
430
|
-
$[
|
|
431
|
-
} else
|
|
432
|
-
return
|
|
434
|
+
$[85] = realOpen;
|
|
435
|
+
$[86] = setOpen;
|
|
436
|
+
$[87] = t21.Root;
|
|
437
|
+
$[88] = t23;
|
|
438
|
+
$[89] = t51;
|
|
439
|
+
$[90] = t52;
|
|
440
|
+
} else t52 = $[90];
|
|
441
|
+
return t52;
|
|
433
442
|
}
|
|
434
443
|
function _temp(event_1) {
|
|
435
444
|
return event_1.preventDefault();
|
|
@@ -1,13 +1,15 @@
|
|
|
1
|
-
import { type ChangeEvent, type ReactNode, type Ref } from 'react';
|
|
2
|
-
import { type TaoSize } from '../../provider/tao-provider';
|
|
3
|
-
import { type SemanticClassNames, type SemanticStyles } from '../../utils/semantic';
|
|
1
|
+
import { type AriaAttributes, type ChangeEvent, type ReactNode, type Ref } from 'react';
|
|
2
|
+
import { type TaoSize } from '../../provider/tao-provider.js';
|
|
3
|
+
import { type SemanticClassNames, type SemanticStyles } from '../../utils/semantic.js';
|
|
4
4
|
import './radio.css';
|
|
5
5
|
export type RadioSemanticPart = 'root' | 'indicator' | 'label';
|
|
6
|
-
export interface RadioProps {
|
|
6
|
+
export interface RadioProps extends Pick<AriaAttributes, 'aria-label' | 'aria-labelledby' | 'aria-describedby' | 'aria-errormessage' | 'aria-invalid' | 'aria-required'> {
|
|
7
|
+
id?: string;
|
|
7
8
|
value?: string;
|
|
8
9
|
checked?: boolean;
|
|
9
10
|
defaultChecked?: boolean;
|
|
10
11
|
disabled?: boolean;
|
|
12
|
+
required?: boolean;
|
|
11
13
|
onChange?: (e: ChangeEvent<HTMLInputElement>) => void;
|
|
12
14
|
children?: ReactNode;
|
|
13
15
|
name?: string;
|
|
@@ -21,7 +23,8 @@ export type RadioOptionType = {
|
|
|
21
23
|
value: string;
|
|
22
24
|
disabled?: boolean;
|
|
23
25
|
} | string;
|
|
24
|
-
export interface RadioGroupProps {
|
|
26
|
+
export interface RadioGroupProps extends Pick<AriaAttributes, 'aria-label' | 'aria-labelledby' | 'aria-describedby' | 'aria-errormessage' | 'aria-invalid' | 'aria-required'> {
|
|
27
|
+
id?: string;
|
|
25
28
|
options?: RadioOptionType[];
|
|
26
29
|
value?: string;
|
|
27
30
|
defaultValue?: string;
|
|
@@ -32,4 +35,4 @@ export interface RadioGroupProps {
|
|
|
32
35
|
name?: string;
|
|
33
36
|
children?: ReactNode;
|
|
34
37
|
}
|
|
35
|
-
export declare function RadioGroup({ options, value, onChange, disabled, direction, name, children, }: RadioGroupProps): import("react
|
|
38
|
+
export declare function RadioGroup({ options, value, onChange, disabled, direction, name, children, id, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, 'aria-describedby': ariaDescribedBy, 'aria-errormessage': ariaErrorMessage, 'aria-invalid': ariaInvalid, 'aria-required': ariaRequired, }: RadioGroupProps): import("react").JSX.Element;
|