@tangible/ui 0.2.11 → 0.2.13
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 +35 -22
- package/components/Accordion/Accordion.js +2 -2
- package/components/Combobox/Combobox.js +37 -5
- package/components/Combobox/types.d.ts +6 -0
- package/components/DatePicker/DatePicker.d.ts +3 -0
- package/components/DatePicker/DatePicker.js +8 -2
- package/components/DatePicker/DateRangePicker.d.ts +3 -0
- package/components/DatePicker/DateRangePicker.js +8 -2
- package/components/DatePicker/types.d.ts +36 -0
- package/components/Dropdown/Dropdown.js +2 -1
- package/components/MultiCombobox/MultiCombobox.js +1 -1
- package/components/MultiSelect/MultiSelect.d.ts +1 -1
- package/components/MultiSelect/MultiSelect.js +29 -5
- package/components/MultiSelect/types.d.ts +13 -0
- package/components/Pager/Pager.d.ts +65 -1
- package/components/Pager/Pager.js +83 -10
- package/components/Pager/index.d.ts +1 -1
- package/components/Pager/types.d.ts +39 -0
- package/components/Pager/types.js +6 -0
- package/components/Popover/Popover.js +2 -1
- package/components/SearchSelect/SearchSelect.d.ts +1 -1
- package/components/SearchSelect/SearchSelect.js +3 -5
- package/components/SearchSelect/types.d.ts +0 -2
- package/components/Select/Select.d.ts +1 -1
- package/components/Select/Select.js +29 -5
- package/components/Select/types.d.ts +13 -0
- package/components/Table/DataTable.d.ts +6 -0
- package/components/Textarea/Textarea.js +7 -0
- package/components/Tooltip/Tooltip.js +2 -1
- package/components/index.d.ts +2 -2
- package/components/index.js +1 -1
- package/figma-tokens.json +4018 -0
- package/icons/icons.svg +12 -2
- package/icons/lms/index.d.ts +14 -1
- package/icons/lms/index.js +85 -18
- package/icons/manifest.json +204 -97
- package/icons/membersync/index.js +9 -9
- package/icons/player/index.js +4 -4
- package/icons/reaction/index.d.ts +1 -1
- package/icons/reaction/index.js +5 -5
- package/icons/registry.d.ts +53 -27
- package/icons/registry.js +26 -13
- package/icons/system/index.d.ts +21 -11
- package/icons/system/index.js +78 -32
- package/package.json +5 -1
- package/skills/building-with-tui/SKILL.md +328 -0
- package/styles/all.css +1 -1
- package/styles/all.expanded.css +145 -256
- package/styles/all.expanded.unlayered.css +145 -256
- package/styles/all.unlayered.css +1 -1
- package/styles/components/color-picker.scss +16 -3
- package/styles/components/combobox.scss +33 -58
- package/styles/components/date-picker.scss +17 -9
- package/styles/components/dropdown.scss +11 -6
- package/styles/components/gradient-picker.scss +4 -4
- package/styles/components/multi-combobox.scss +17 -37
- package/styles/components/multi-select.scss +14 -50
- package/styles/components/pager.scss +155 -17
- package/styles/components/radio.scss +37 -0
- package/styles/components/search-select.scss +14 -36
- package/styles/components/select.scss +22 -51
- package/styles/components/text-input.scss +79 -21
- package/styles/system/_constants.scss +7 -1
- package/tui-manifest.json +143 -6
- package/utils/compose-refs.d.ts +29 -3
- package/utils/compose-refs.js +51 -12
|
@@ -16,6 +16,18 @@ import { defaultPagerLabels } from './types.js';
|
|
|
16
16
|
//
|
|
17
17
|
// =============================================================================
|
|
18
18
|
const DEFAULT_MAX_SLOTS = 7;
|
|
19
|
+
/**
|
|
20
|
+
* Glyphs for `navStyle="icon"`. First/last are double chevrons — the
|
|
21
|
+
* conventional "jump to the end" affordance, and distinguishable from the
|
|
22
|
+
* single-chevron prev/next at a glance, which `arrow-left`/`arrow-right`
|
|
23
|
+
* would not have been.
|
|
24
|
+
*/
|
|
25
|
+
const NAV_ICONS = {
|
|
26
|
+
first: 'system/chevron-left-double',
|
|
27
|
+
prev: 'system/chevron-left',
|
|
28
|
+
next: 'system/chevron-right',
|
|
29
|
+
last: 'system/chevron-right-double',
|
|
30
|
+
};
|
|
19
31
|
/**
|
|
20
32
|
* Build a stable-width list of page tokens (numbers + ellipses).
|
|
21
33
|
*
|
|
@@ -85,8 +97,13 @@ function buildNumberTokens(total, current, maxSlots = DEFAULT_MAX_SLOTS) {
|
|
|
85
97
|
}
|
|
86
98
|
return materialize();
|
|
87
99
|
}
|
|
88
|
-
function buildItems(total, current, mode, maxNumbers) {
|
|
100
|
+
function buildItems(total, current, mode, maxNumbers, showFirstLast) {
|
|
89
101
|
const items = [];
|
|
102
|
+
// Outside prev/next, not inside: the reading order is
|
|
103
|
+
// « ‹ 1 2 3 › » in every pager that has them.
|
|
104
|
+
if (showFirstLast) {
|
|
105
|
+
items.push({ kind: 'first', disabled: current <= 1, page: 1 });
|
|
106
|
+
}
|
|
90
107
|
items.push({
|
|
91
108
|
kind: 'prev',
|
|
92
109
|
disabled: current <= 1,
|
|
@@ -117,21 +134,29 @@ function buildItems(total, current, mode, maxNumbers) {
|
|
|
117
134
|
disabled: current >= total,
|
|
118
135
|
page: Math.min(total, current + 1),
|
|
119
136
|
});
|
|
137
|
+
if (showFirstLast) {
|
|
138
|
+
items.push({ kind: 'last', disabled: current >= total, page: total });
|
|
139
|
+
}
|
|
120
140
|
return items;
|
|
121
141
|
}
|
|
122
142
|
// -----------------------------------------------------------------------------
|
|
123
143
|
// Component
|
|
124
144
|
// -----------------------------------------------------------------------------
|
|
125
|
-
export function Pager({ currentPage, totalPages, onPageChange, pageSize, pageSizeOptions, onPageSizeChange, size = 'sm', mode = 'smart', maxNumbers = DEFAULT_MAX_SLOTS, navStyle = 'text', hidden = false, className, labels: labelsProp, }) {
|
|
145
|
+
export function Pager({ currentPage, totalPages, onPageChange, pageSize, pageSizeOptions, onPageSizeChange, size = 'sm', mode = 'smart', maxNumbers = DEFAULT_MAX_SLOTS, navStyle = 'text', variant = 'flush', showInfo = true, showFirstLast = false, showJump = false, hidden = false, className, labels: labelsProp, }) {
|
|
126
146
|
// Size class follows the shared convention: default emits nothing, sm/lg
|
|
127
147
|
// emit `is-size-*`. (Pager's own default is sm, so a stock Pager still gets
|
|
128
148
|
// the class.)
|
|
129
149
|
const sizeClass = size !== 'md' ? `is-size-${size}` : undefined;
|
|
150
|
+
// Prev/next are outline segments in flush — they complete the connected group
|
|
151
|
+
// — but ghost affordances in detached, where they sit outside it. Applies to
|
|
152
|
+
// both nav styles: `icon` becomes a bare chevron, `text` becomes ghost text
|
|
153
|
+
// rather than a bordered box.
|
|
154
|
+
const navVariant = variant === 'detached' ? 'ghost' : 'outline';
|
|
130
155
|
const labels = React.useMemo(() => ({ ...defaultPagerLabels, ...labelsProp }), [labelsProp]);
|
|
131
156
|
// Normalise inputs
|
|
132
157
|
const total = Math.max(1, totalPages);
|
|
133
158
|
const current = Math.min(total, Math.max(1, currentPage));
|
|
134
|
-
const items = React.useMemo(() => buildItems(total, current, mode, maxNumbers), [total, current, mode, maxNumbers]);
|
|
159
|
+
const items = React.useMemo(() => buildItems(total, current, mode, maxNumbers, showFirstLast), [total, current, mode, maxNumbers, showFirstLast]);
|
|
135
160
|
// Live-region text: page changes are announced politely. Empty until the
|
|
136
161
|
// first user-driven change so mount announces nothing.
|
|
137
162
|
const [announcement, setAnnouncement] = React.useState('');
|
|
@@ -139,25 +164,73 @@ export function Pager({ currentPage, totalPages, onPageChange, pageSize, pageSiz
|
|
|
139
164
|
setAnnouncement(labels.pageStatus(page, total));
|
|
140
165
|
onPageChange(page);
|
|
141
166
|
}, [onPageChange, labels, total]);
|
|
167
|
+
// Jump field. Its value is transient input, not a mirror of `currentPage` —
|
|
168
|
+
// it clears on commit so it can never sit there disagreeing with the page
|
|
169
|
+
// the user subsequently reached by other means. "Page X of Y" is what
|
|
170
|
+
// displays state.
|
|
171
|
+
const [jumpValue, setJumpValue] = React.useState('');
|
|
172
|
+
const jumpInputId = `${React.useId()}-jump`;
|
|
173
|
+
const commitJump = React.useCallback(() => {
|
|
174
|
+
const raw = jumpValue.trim();
|
|
175
|
+
// Empty field: no-op. Nothing to navigate to and nothing worth announcing.
|
|
176
|
+
if (!raw)
|
|
177
|
+
return;
|
|
178
|
+
// `Number`, not `parseInt`: a number input accepts exponent notation, and
|
|
179
|
+
// parseInt reads "1e5" as 1 — so a jump to page 100000 would silently
|
|
180
|
+
// become a jump to page 1 instead of clamping to the last page like every
|
|
181
|
+
// other out-of-range entry. Trunc handles "1.5" the same way parseInt did.
|
|
182
|
+
const parsed = Math.trunc(Number(raw));
|
|
183
|
+
if (!Number.isFinite(parsed))
|
|
184
|
+
return;
|
|
185
|
+
// Clamp rather than reject — typing 99 into a 10-page pager is a request
|
|
186
|
+
// for the last page. The status region announces where it actually landed,
|
|
187
|
+
// so the correction is audible instead of silent.
|
|
188
|
+
const page = Math.min(total, Math.max(1, parsed));
|
|
189
|
+
setJumpValue('');
|
|
190
|
+
go(page);
|
|
191
|
+
}, [jumpValue, total, go]);
|
|
142
192
|
if (hidden)
|
|
143
193
|
return null;
|
|
144
194
|
const showPageSizeSelector = pageSizeOptions && pageSizeOptions.length > 0 && onPageSizeChange;
|
|
145
|
-
return (_jsxs("div", { className: cx('tui-pager', className), children: [_jsx("span", { role: "status", "aria-atomic": "true", className: "tui-visually-hidden", children: announcement }), _jsx("nav", { className: "tui-pager__nav", "aria-label": labels.navigation, children: items.map((it, i) => {
|
|
195
|
+
return (_jsxs("div", { className: cx('tui-pager', `is-variant-${variant}`, className), children: [_jsx("span", { role: "status", "aria-atomic": "true", className: "tui-visually-hidden", children: announcement }), _jsx("nav", { className: "tui-pager__nav", "aria-label": labels.navigation, children: items.map((it, i) => {
|
|
146
196
|
if (it.kind === 'ellipsis') {
|
|
147
197
|
return (_jsx("span", { className: cx('tui-pager__ellipsis', sizeClass), "aria-hidden": true, children: "..." }, `e${i}`));
|
|
148
198
|
}
|
|
149
|
-
if (it.kind
|
|
150
|
-
|
|
151
|
-
|
|
199
|
+
if (it.kind !== 'page') {
|
|
200
|
+
// All four nav kinds render identically apart from their glyph and
|
|
201
|
+
// their pair of strings — the accessible name and, for `text`, the
|
|
202
|
+
// shorter visible label WCAG 2.5.3 requires it to contain.
|
|
203
|
+
const label = {
|
|
204
|
+
first: labels.first,
|
|
205
|
+
prev: labels.previous,
|
|
206
|
+
next: labels.next,
|
|
207
|
+
last: labels.last,
|
|
208
|
+
}[it.kind];
|
|
209
|
+
const text = {
|
|
210
|
+
first: labels.firstText,
|
|
211
|
+
prev: labels.previousText,
|
|
212
|
+
next: labels.nextText,
|
|
213
|
+
last: labels.lastText,
|
|
214
|
+
}[it.kind];
|
|
152
215
|
if (navStyle === 'icon') {
|
|
153
|
-
return (_jsx(IconButton, { icon:
|
|
216
|
+
return (_jsx(IconButton, { icon: NAV_ICONS[it.kind], label: label, showTooltip: true, size: size, theme: "secondary", variant: navVariant, disabled: it.disabled, onClick: () => go(it.page), className: "tui-pager__item" }, it.kind));
|
|
154
217
|
}
|
|
155
|
-
return (_jsx(Button, { size: size, theme: "secondary", variant:
|
|
218
|
+
return (_jsx(Button, { size: size, theme: "secondary", variant: navVariant, disabled: it.disabled, onClick: () => go(it.page), "aria-label": label, className: "tui-pager__item", children: text }, it.kind));
|
|
156
219
|
}
|
|
157
220
|
// Page number
|
|
158
221
|
if (it.kind === 'page') {
|
|
159
222
|
return (_jsx(Button, { size: size, theme: it.current ? 'primary' : 'secondary', variant: it.current ? 'solid' : 'outline', "aria-current": it.current ? 'page' : undefined, "aria-label": labels.page(it.page), onClick: () => go(it.page), className: "tui-pager__item", children: it.page }, it.page));
|
|
160
223
|
}
|
|
161
224
|
return null;
|
|
162
|
-
}) }), _jsxs("div", { className: "tui-pager__info", children: [_jsx("span", { children: labels.pageStatus(current, total) }), showPageSizeSelector && (_jsxs("label", { className: "tui-pager__page-size-label", children: [_jsx("span", { className: "tui-visually-hidden", children: labels.itemsPerPage }), _jsx("select", { className: cx('tui-input', sizeClass), value: pageSize, onChange: (e) => onPageSizeChange(Number(e.target.value)), children: pageSizeOptions.map((s) => (_jsx("option", { value: s, children: labels.perPage(s) }, s))) })] }))] })
|
|
225
|
+
}) }), showInfo && (_jsxs("div", { className: "tui-pager__info", children: [_jsx("span", { children: labels.pageStatus(current, total) }), showPageSizeSelector && (_jsxs("label", { className: "tui-pager__page-size-label", children: [_jsx("span", { className: "tui-visually-hidden", children: labels.itemsPerPage }), _jsx("select", { className: cx('tui-input', sizeClass), value: pageSize, onChange: (e) => onPageSizeChange(Number(e.target.value)), children: pageSizeOptions.map((s) => (_jsx("option", { value: s, children: labels.perPage(s) }, s))) })] }))] })), showJump && (_jsxs("div", { className: "tui-pager__jump", children: [_jsx("label", { className: "tui-pager__jump-label", htmlFor: jumpInputId, children: labels.jumpLabel }), _jsx("input", { id: jumpInputId, type: "number", inputMode: "numeric", min: 1, max: total, value: jumpValue, onChange: (e) => setJumpValue(e.target.value), onKeyDown: (e) => {
|
|
226
|
+
if (e.key !== 'Enter')
|
|
227
|
+
return;
|
|
228
|
+
// preventDefault matters despite there being no <form> here: a
|
|
229
|
+
// Pager rendered inside a consumer's form would otherwise submit
|
|
230
|
+
// it on Enter. The commit path is hand-wired precisely because a
|
|
231
|
+
// nested <form> is invalid HTML and the Pager cannot know whether
|
|
232
|
+
// it has been dropped into one.
|
|
233
|
+
e.preventDefault();
|
|
234
|
+
commitJump();
|
|
235
|
+
}, className: cx('tui-input', 'tui-pager__jump-input', sizeClass) }), _jsx(Button, { size: size, theme: "secondary", variant: "outline", onClick: commitJump, className: "tui-pager__jump-submit", children: labels.jumpText })] }))] }));
|
|
163
236
|
}
|
|
@@ -13,6 +13,14 @@ export type PagerLabels = {
|
|
|
13
13
|
* @default "Next page"
|
|
14
14
|
*/
|
|
15
15
|
next?: string;
|
|
16
|
+
/** Accessible name for the first-page button (`showFirstLast`).
|
|
17
|
+
* @default "First page"
|
|
18
|
+
*/
|
|
19
|
+
first?: string;
|
|
20
|
+
/** Accessible name for the last-page button (`showFirstLast`).
|
|
21
|
+
* @default "Last page"
|
|
22
|
+
*/
|
|
23
|
+
last?: string;
|
|
16
24
|
/** VISIBLE text on the previous button (text nav style). Must be contained
|
|
17
25
|
* in `previous` (the accessible name) to satisfy WCAG 2.5.3 Label in Name.
|
|
18
26
|
* @default "Prev"
|
|
@@ -22,11 +30,27 @@ export type PagerLabels = {
|
|
|
22
30
|
* @default "Next"
|
|
23
31
|
*/
|
|
24
32
|
nextText?: string;
|
|
33
|
+
/** VISIBLE text on the first-page button (text nav style). Same WCAG 2.5.3
|
|
34
|
+
* containment rule: must appear inside `first`.
|
|
35
|
+
* @default "First"
|
|
36
|
+
*/
|
|
37
|
+
firstText?: string;
|
|
38
|
+
/** Visible text on the last-page button — must appear inside `last`.
|
|
39
|
+
* @default "Last"
|
|
40
|
+
*/
|
|
41
|
+
lastText?: string;
|
|
25
42
|
/** Label for individual page buttons.
|
|
26
43
|
* @default (n) => `Page ${n}`
|
|
27
44
|
*/
|
|
28
45
|
page?: (n: number) => string;
|
|
29
46
|
/** aria-label for the nav landmark.
|
|
47
|
+
*
|
|
48
|
+
* IMPORTANT: override this when a page renders more than one Pager — the
|
|
49
|
+
* classic case being one above and one below a long table. Every Pager is a
|
|
50
|
+
* `<nav>` landmark, and two sharing the default name are indistinguishable to
|
|
51
|
+
* a screen reader navigating by landmark (axe: `landmark-unique`). TUI cannot
|
|
52
|
+
* pick the distinguishing name for you; only the consumer knows whether it is
|
|
53
|
+
* "top"/"bottom", "results"/"filters", or something else.
|
|
30
54
|
* @default "Pagination"
|
|
31
55
|
*/
|
|
32
56
|
navigation?: string;
|
|
@@ -42,5 +66,20 @@ export type PagerLabels = {
|
|
|
42
66
|
* @default (n) => `${n} / page`
|
|
43
67
|
*/
|
|
44
68
|
perPage?: (n: number) => string;
|
|
69
|
+
/** Visible label on the go-to-page field (`showJump`).
|
|
70
|
+
* @default "Go to page"
|
|
71
|
+
*/
|
|
72
|
+
jumpLabel?: string;
|
|
73
|
+
/** Text on the go-to-page submit button.
|
|
74
|
+
*
|
|
75
|
+
* This is the button's whole accessible name — it carries no `aria-label`, on
|
|
76
|
+
* purpose. Giving it a fuller name ("Go to page") would duplicate the field's
|
|
77
|
+
* label verbatim, and two controls a Tab apart answering to the same name are
|
|
78
|
+
* ambiguous for both screen-reader and voice-control users. Short and
|
|
79
|
+
* distinct beats descriptive and colliding; the adjacent label supplies the
|
|
80
|
+
* context.
|
|
81
|
+
* @default "Go"
|
|
82
|
+
*/
|
|
83
|
+
jumpText?: string;
|
|
45
84
|
};
|
|
46
85
|
export declare const defaultPagerLabels: Required<PagerLabels>;
|
|
@@ -4,11 +4,17 @@
|
|
|
4
4
|
export const defaultPagerLabels = {
|
|
5
5
|
previous: 'Previous page',
|
|
6
6
|
next: 'Next page',
|
|
7
|
+
first: 'First page',
|
|
8
|
+
last: 'Last page',
|
|
7
9
|
previousText: 'Prev',
|
|
8
10
|
nextText: 'Next',
|
|
11
|
+
firstText: 'First',
|
|
12
|
+
lastText: 'Last',
|
|
9
13
|
page: (n) => `Page ${n}`,
|
|
10
14
|
navigation: 'Pagination',
|
|
11
15
|
pageStatus: (current, total) => `Page ${current} of ${total}`,
|
|
12
16
|
itemsPerPage: 'Items per page',
|
|
13
17
|
perPage: (n) => `${n} / page`,
|
|
18
|
+
jumpLabel: 'Go to page',
|
|
19
|
+
jumpText: 'Go',
|
|
14
20
|
};
|
|
@@ -3,6 +3,7 @@ import React, { useCallback, useEffect, useId, useMemo, useRef, useState, cloneE
|
|
|
3
3
|
import { useFloating, offset, flip, shift, size, autoUpdate, FloatingPortal, useDismiss, useInteractions, useRole, FloatingFocusManager, } from '@floating-ui/react';
|
|
4
4
|
import { cx } from '../../utils/cx.js';
|
|
5
5
|
import { getPortalRootFor } from '../../utils/portal.js';
|
|
6
|
+
import { getElementRef } from '../../utils/compose-refs.js';
|
|
6
7
|
import { PopoverContext, usePopoverContext } from './PopoverContext.js';
|
|
7
8
|
import { toPlacement } from './types.js';
|
|
8
9
|
// =============================================================================
|
|
@@ -69,7 +70,7 @@ function PopoverTriggerComponent({ asChild = false, children }) {
|
|
|
69
70
|
const setRefs = useCallback((node) => {
|
|
70
71
|
triggerRef.current = node;
|
|
71
72
|
if (asChild && isValidElement(children)) {
|
|
72
|
-
const childRef = children
|
|
73
|
+
const childRef = getElementRef(children);
|
|
73
74
|
if (typeof childRef === 'function') {
|
|
74
75
|
childRef(node);
|
|
75
76
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type SearchSelectProps, type SearchSelectTriggerProps, type SearchSelectContentProps, type SearchSelectOptionProps } from './types';
|
|
2
|
-
declare function SearchSelectRoot({ value: controlledValue, defaultValue, onValueChange, open: controlledOpen, defaultOpen, onOpenChange, inputValue: controlledInputValue, onInputChange, filter, disabled, placeholder, size, anchorRef, restoreFocusRef, id: triggerIdProp, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, 'aria-describedby': ariaDescribedBy, 'aria-invalid': ariaInvalid,
|
|
2
|
+
declare function SearchSelectRoot({ value: controlledValue, defaultValue, onValueChange, open: controlledOpen, defaultOpen, onOpenChange, inputValue: controlledInputValue, onInputChange, filter, disabled, placeholder, size, anchorRef, restoreFocusRef, id: triggerIdProp, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, 'aria-describedby': ariaDescribedBy, 'aria-invalid': ariaInvalid, labels: labelsProp, children, }: SearchSelectProps): import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
declare namespace SearchSelectRoot {
|
|
4
4
|
var displayName: string;
|
|
5
5
|
}
|
|
@@ -14,7 +14,7 @@ const defaultFilter = (textValue, query) => textValue.toLowerCase().includes(que
|
|
|
14
14
|
// =============================================================================
|
|
15
15
|
// SearchSelect Root
|
|
16
16
|
// =============================================================================
|
|
17
|
-
function SearchSelectRoot({ value: controlledValue, defaultValue, onValueChange, open: controlledOpen, defaultOpen, onOpenChange, inputValue: controlledInputValue, onInputChange, filter = defaultFilter, disabled = false, placeholder = '', size = 'md', anchorRef, restoreFocusRef, id: triggerIdProp, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, 'aria-describedby': ariaDescribedBy, 'aria-invalid': ariaInvalid,
|
|
17
|
+
function SearchSelectRoot({ value: controlledValue, defaultValue, onValueChange, open: controlledOpen, defaultOpen, onOpenChange, inputValue: controlledInputValue, onInputChange, filter = defaultFilter, disabled = false, placeholder = '', size = 'md', anchorRef, restoreFocusRef, id: triggerIdProp, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, 'aria-describedby': ariaDescribedBy, 'aria-invalid': ariaInvalid, labels: labelsProp, children, }) {
|
|
18
18
|
const labels = { ...defaultSearchSelectLabels, ...labelsProp };
|
|
19
19
|
// Controlled/uncontrolled value — lock decision at mount time (see the
|
|
20
20
|
// controlled→uncontrolled gotcha in CLAUDE.md)
|
|
@@ -210,7 +210,6 @@ function SearchSelectRoot({ value: controlledValue, defaultValue, onValueChange,
|
|
|
210
210
|
ariaLabelledBy,
|
|
211
211
|
ariaDescribedBy,
|
|
212
212
|
ariaInvalid,
|
|
213
|
-
ariaRequired,
|
|
214
213
|
setOpen,
|
|
215
214
|
selectValue,
|
|
216
215
|
setInputValue,
|
|
@@ -254,7 +253,6 @@ function SearchSelectRoot({ value: controlledValue, defaultValue, onValueChange,
|
|
|
254
253
|
ariaLabelledBy,
|
|
255
254
|
ariaDescribedBy,
|
|
256
255
|
ariaInvalid,
|
|
257
|
-
ariaRequired,
|
|
258
256
|
setOpen,
|
|
259
257
|
selectValue,
|
|
260
258
|
setInputValue,
|
|
@@ -287,7 +285,7 @@ SearchSelectRoot.displayName = 'SearchSelect';
|
|
|
287
285
|
// SearchSelect.Trigger
|
|
288
286
|
// =============================================================================
|
|
289
287
|
function SearchSelectTriggerComponent({ className, children, onClick: onClickProp, onKeyDown: onKeyDownProp, onPointerDown: onPointerDownProp, ...rest }) {
|
|
290
|
-
const { disabled, placeholder, size, triggerId, panelId, ariaLabel, ariaLabelledBy, ariaDescribedBy, ariaInvalid,
|
|
288
|
+
const { disabled, placeholder, size, triggerId, panelId, ariaLabel, ariaLabelledBy, ariaDescribedBy, ariaInvalid, setOpen, labelFor, refs, triggerElRef, open, value, } = useSearchSelectContext();
|
|
291
289
|
const hasValue = value !== undefined;
|
|
292
290
|
const valueId = `${triggerId}-value`;
|
|
293
291
|
// The trigger is the POSITION reference (the panel anchors to it); the
|
|
@@ -325,7 +323,7 @@ function SearchSelectTriggerComponent({ className, children, onClick: onClickPro
|
|
|
325
323
|
return;
|
|
326
324
|
pointerDownFix(e);
|
|
327
325
|
}, [onPointerDownProp, pointerDownFix]);
|
|
328
|
-
return (_jsxs("button", { ...rest, ref: handleRef, type: "button", id: triggerId, className: cx('tui-search-select__trigger', size !== 'md' && `is-size-${size}`, className), disabled: disabled, "aria-haspopup": "dialog", "aria-expanded": open, "aria-controls": open ? panelId : undefined, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy ? `${ariaLabelledBy} ${valueId}` : undefined, "aria-describedby": ariaDescribedBy, "aria-invalid": ariaInvalid, "
|
|
326
|
+
return (_jsxs("button", { ...rest, ref: handleRef, type: "button", id: triggerId, className: cx('tui-input-group', 'tui-search-select__trigger', size !== 'md' && `is-size-${size}`, className), disabled: disabled, "aria-haspopup": "dialog", "aria-expanded": open, "aria-controls": open ? panelId : undefined, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy ? `${ariaLabelledBy} ${valueId}` : undefined, "aria-describedby": ariaDescribedBy, "aria-invalid": ariaInvalid, "data-state": open ? 'open' : 'closed', onClick: handleClick, onKeyDown: handleKeyDown, onPointerDown: handlePointerDown, children: [_jsx("span", { id: valueId, className: "tui-search-select__value", children: children ??
|
|
329
327
|
(hasValue ? (labelFor(value)) : (_jsx("span", { className: "tui-search-select__placeholder", children: placeholder }))) }), _jsx(Icon, { name: "system/chevron-down", className: "tui-search-select__icon" })] }));
|
|
330
328
|
}
|
|
331
329
|
SearchSelectTriggerComponent.displayName = 'SearchSelect.Trigger';
|
|
@@ -64,7 +64,6 @@ export type SearchSelectProps = {
|
|
|
64
64
|
'aria-labelledby'?: string;
|
|
65
65
|
'aria-describedby'?: string;
|
|
66
66
|
'aria-invalid'?: boolean | 'true' | 'false';
|
|
67
|
-
'aria-required'?: boolean | 'true' | 'false';
|
|
68
67
|
labels?: SearchSelectLabels;
|
|
69
68
|
children: ReactNode;
|
|
70
69
|
};
|
|
@@ -107,7 +106,6 @@ export type SearchSelectContextValue = {
|
|
|
107
106
|
ariaLabelledBy?: string;
|
|
108
107
|
ariaDescribedBy?: string;
|
|
109
108
|
ariaInvalid?: boolean | 'true' | 'false';
|
|
110
|
-
ariaRequired?: boolean | 'true' | 'false';
|
|
111
109
|
setOpen: (open: boolean) => void;
|
|
112
110
|
selectValue: (value: OptionValue, textValue: string) => void;
|
|
113
111
|
setInputValue: (value: string) => void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type SelectProps, type SelectTriggerProps, type SelectContentProps, type SelectOptionProps } from './types';
|
|
2
|
-
declare function SelectRoot({ id: triggerIdProp, value: controlledValue, defaultValue, onValueChange, open: controlledOpen, defaultOpen, onOpenChange, disabled, placeholder, size, side, align, sideOffset, clearable, clearLabel, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, 'aria-describedby': ariaDescribedBy, children, }: SelectProps): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
declare function SelectRoot({ id: triggerIdProp, value: controlledValue, defaultValue, onValueChange, open: controlledOpen, defaultOpen, onOpenChange, disabled, placeholder, size, side, align, sideOffset, clearable, clearLabel, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, 'aria-describedby': ariaDescribedBy, 'aria-invalid': ariaInvalid, 'aria-required': ariaRequired, children, }: SelectProps): import("react/jsx-runtime").JSX.Element;
|
|
3
3
|
declare namespace SelectRoot {
|
|
4
4
|
var displayName: string;
|
|
5
5
|
}
|
|
@@ -4,6 +4,7 @@ import { FloatingPortal } from '@floating-ui/react';
|
|
|
4
4
|
import { cx } from '../../utils/cx.js';
|
|
5
5
|
import { toKey } from '../../utils/value-key.js';
|
|
6
6
|
import { getPortalRootFor } from '../../utils/portal.js';
|
|
7
|
+
import { composeRefs, getElementRef } from '../../utils/compose-refs.js';
|
|
7
8
|
import { useOptionRegistry, useOptionRegistration, useListboxIds, useListboxFloating, useListboxNavigation, useListboxBlurGuard, useTriggerPointerDownFix, useFocusTriggerOnOpen, useActiveOptionScroll, optionIdForIndex, createListboxGroupComponents, } from '../../utils/listbox/index.js';
|
|
8
9
|
import { Icon } from '../Icon/index.js';
|
|
9
10
|
import { SelectContext, SelectContentContext, useSelectContext, useSelectContentContext, } from './SelectContext.js';
|
|
@@ -11,7 +12,7 @@ import { toPlacement, } from './types.js';
|
|
|
11
12
|
// =============================================================================
|
|
12
13
|
// Select Root
|
|
13
14
|
// =============================================================================
|
|
14
|
-
function SelectRoot({ id: triggerIdProp, value: controlledValue, defaultValue, onValueChange, open: controlledOpen, defaultOpen, onOpenChange, disabled = false, placeholder = '', size = 'md', side = 'bottom', align = 'start', sideOffset = 4, clearable = false, clearLabel = 'Clear selection', 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, 'aria-describedby': ariaDescribedBy, children, }) {
|
|
15
|
+
function SelectRoot({ id: triggerIdProp, value: controlledValue, defaultValue, onValueChange, open: controlledOpen, defaultOpen, onOpenChange, disabled = false, placeholder = '', size = 'md', side = 'bottom', align = 'start', sideOffset = 4, clearable = false, clearLabel = 'Clear selection', 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, 'aria-describedby': ariaDescribedBy, 'aria-invalid': ariaInvalid, 'aria-required': ariaRequired, children, }) {
|
|
15
16
|
// Controlled/uncontrolled value — lock decision at mount time to prevent
|
|
16
17
|
// switching modes when controlled value is cleared to undefined
|
|
17
18
|
const [uncontrolledValue, setUncontrolledValue] = useState(defaultValue);
|
|
@@ -160,6 +161,8 @@ function SelectRoot({ id: triggerIdProp, value: controlledValue, defaultValue, o
|
|
|
160
161
|
ariaLabel,
|
|
161
162
|
ariaLabelledBy,
|
|
162
163
|
ariaDescribedBy,
|
|
164
|
+
ariaInvalid,
|
|
165
|
+
ariaRequired,
|
|
163
166
|
// Callbacks
|
|
164
167
|
setOpen,
|
|
165
168
|
setValue,
|
|
@@ -194,6 +197,8 @@ function SelectRoot({ id: triggerIdProp, value: controlledValue, defaultValue, o
|
|
|
194
197
|
ariaLabel,
|
|
195
198
|
ariaLabelledBy,
|
|
196
199
|
ariaDescribedBy,
|
|
200
|
+
ariaInvalid,
|
|
201
|
+
ariaRequired,
|
|
197
202
|
setOpen,
|
|
198
203
|
setValue,
|
|
199
204
|
registerOption,
|
|
@@ -220,7 +225,7 @@ SelectRoot.displayName = 'Select';
|
|
|
220
225
|
// Select.Trigger
|
|
221
226
|
// =============================================================================
|
|
222
227
|
function SelectTriggerComponent({ asChild = false, className, children, }) {
|
|
223
|
-
const { open, setOpen, disabled, placeholder, clearable, clearLabel, size, triggerId, listboxId, ariaLabel, ariaLabelledBy, ariaDescribedBy, displayText, setValue, refs, getReferenceProps, activeIndex, handleSelect, justClearedRef, } = useSelectContext();
|
|
228
|
+
const { open, setOpen, disabled, placeholder, clearable, clearLabel, size, triggerId, listboxId, ariaLabel, ariaLabelledBy, ariaDescribedBy, ariaInvalid, ariaRequired, displayText, setValue, refs, getReferenceProps, activeIndex, handleSelect, justClearedRef, } = useSelectContext();
|
|
224
229
|
const sizeClass = size !== 'md' ? `is-size-${size}` : undefined;
|
|
225
230
|
const hasValue = displayText !== undefined;
|
|
226
231
|
// Ensure trigger has focus when dropdown opens (Safari doesn't focus buttons on click)
|
|
@@ -265,11 +270,28 @@ function SelectTriggerComponent({ asChild = false, className, children, }) {
|
|
|
265
270
|
onBlur: handleBlur,
|
|
266
271
|
onPointerDown: handleTriggerPointerDown,
|
|
267
272
|
});
|
|
273
|
+
// asChild: compose the child's own ref with Floating UI's reference setter.
|
|
274
|
+
// Without this the child's ref is silently discarded — a consumer passing
|
|
275
|
+
// <Select.Trigger asChild><MyButton ref={myRef}/></Select.Trigger> never gets
|
|
276
|
+
// a node, with no error to explain why.
|
|
277
|
+
//
|
|
278
|
+
// Computed unconditionally and memoised, not inside the asChild branch below:
|
|
279
|
+
// hooks cannot be conditional, and an inline composeRefs would hand React a
|
|
280
|
+
// new callback on every render, detaching and re-attaching the reference each
|
|
281
|
+
// time. Floating UI's own setReference is stable, so that churn would be a
|
|
282
|
+
// real regression for a popup that re-renders per keystroke.
|
|
283
|
+
const childRef = asChild && isValidElement(children) ? getElementRef(children) : undefined;
|
|
284
|
+
const composedReferenceRef = React.useMemo(() => composeRefs(refs.setReference, childRef), [refs.setReference, childRef]);
|
|
268
285
|
const triggerProps = {
|
|
269
286
|
id: triggerId,
|
|
270
287
|
'aria-label': ariaLabel,
|
|
271
288
|
'aria-labelledby': ariaLabelledBy,
|
|
272
289
|
'aria-describedby': ariaDescribedBy,
|
|
290
|
+
// Both land on the trigger, which also carries `tui-input-group` — the
|
|
291
|
+
// shared primitive keys its danger border off [aria-invalid="true"] on
|
|
292
|
+
// that same element. Putting them on an inner node fails silently.
|
|
293
|
+
'aria-invalid': ariaInvalid,
|
|
294
|
+
'aria-required': ariaRequired,
|
|
273
295
|
'aria-keyshortcuts': clearable && hasValue ? 'Delete' : undefined,
|
|
274
296
|
'data-state': open ? 'open' : 'closed',
|
|
275
297
|
...floatingProps,
|
|
@@ -301,17 +323,19 @@ function SelectTriggerComponent({ asChild = false, className, children, }) {
|
|
|
301
323
|
...childProps,
|
|
302
324
|
// Re-assert must-have props that child cannot override
|
|
303
325
|
id: triggerId,
|
|
304
|
-
ref:
|
|
326
|
+
ref: composedReferenceRef,
|
|
305
327
|
'aria-haspopup': floatingProps['aria-haspopup'],
|
|
306
328
|
'aria-expanded': floatingProps['aria-expanded'],
|
|
307
329
|
'aria-controls': open ? floatingProps['aria-controls'] : undefined,
|
|
308
330
|
'aria-activedescendant': floatingProps['aria-activedescendant'],
|
|
309
331
|
'aria-describedby': ariaDescribedBy,
|
|
332
|
+
'aria-invalid': ariaInvalid,
|
|
333
|
+
'aria-required': ariaRequired,
|
|
310
334
|
// asChild: use aria-disabled + data-disabled since element may not support native disabled
|
|
311
335
|
'aria-disabled': disabled || undefined,
|
|
312
336
|
'data-state': open ? 'open' : 'closed',
|
|
313
337
|
'data-disabled': disabled || undefined,
|
|
314
|
-
className: cx(childProps.className, 'tui-select__trigger', sizeClass, className),
|
|
338
|
+
className: cx(childProps.className, 'tui-input-group', 'tui-select__trigger', sizeClass, className),
|
|
315
339
|
// Composed handlers override both spreads
|
|
316
340
|
onClick: composeHandler(triggerProps.onClick, childProps.onClick),
|
|
317
341
|
onKeyDown: composeHandler(triggerProps.onKeyDown, childProps.onKeyDown),
|
|
@@ -324,7 +348,7 @@ function SelectTriggerComponent({ asChild = false, className, children, }) {
|
|
|
324
348
|
// Wrap in a relative container so the clear button can be a sibling of the
|
|
325
349
|
// trigger <button> — nesting <button> inside <button> is invalid HTML and
|
|
326
350
|
// causes browsers to eject the inner button via the adoption agency algorithm.
|
|
327
|
-
return (_jsxs("div", { className: cx('tui-select__trigger-wrap', showClear && 'has-clear'), children: [_jsxs("button", { ref: refs.setReference, type: "button", className: cx('tui-select__trigger', sizeClass, className), disabled: disabled, ...triggerProps, children: [_jsx("span", { className: "tui-select__value", children: displayText ?? _jsx("span", { className: "tui-select__placeholder", children: placeholder }) }), _jsx(Icon, { name: "system/chevron-down", className: "tui-select__icon", "aria-hidden": "true" })] }), showClear && (_jsx("button", { type: "button", className: "tui-select__clear", onClick: handleClear, "aria-label": clearLabel, tabIndex: -1, children: _jsx(Icon, { name: "system/close" }) }))] }));
|
|
351
|
+
return (_jsxs("div", { className: cx('tui-select__trigger-wrap', showClear && 'has-clear'), children: [_jsxs("button", { ref: refs.setReference, type: "button", className: cx('tui-input-group', 'tui-select__trigger', sizeClass, className), disabled: disabled, ...triggerProps, children: [_jsx("span", { className: "tui-select__value", children: displayText ?? _jsx("span", { className: "tui-select__placeholder", children: placeholder }) }), _jsx(Icon, { name: "system/chevron-down", className: "tui-select__icon", "aria-hidden": "true" })] }), showClear && (_jsx("button", { type: "button", className: "tui-select__clear", onClick: handleClear, "aria-label": clearLabel, tabIndex: -1, children: _jsx(Icon, { name: "system/close" }) }))] }));
|
|
328
352
|
}
|
|
329
353
|
SelectTriggerComponent.displayName = 'Select.Trigger';
|
|
330
354
|
// =============================================================================
|
|
@@ -87,6 +87,17 @@ export type SelectProps = {
|
|
|
87
87
|
* ID of element(s) that describe this select.
|
|
88
88
|
*/
|
|
89
89
|
'aria-describedby'?: string;
|
|
90
|
+
/**
|
|
91
|
+
* Marks the control invalid. Lands on the trigger, which also wears
|
|
92
|
+
* `tui-input-group` — that is what lights the danger border.
|
|
93
|
+
* Injected automatically by `Field.Control` when the Field has an error.
|
|
94
|
+
*/
|
|
95
|
+
'aria-invalid'?: boolean | 'true' | 'false';
|
|
96
|
+
/**
|
|
97
|
+
* Marks the control required. Injected automatically by `Field.Control`
|
|
98
|
+
* when the Field is required.
|
|
99
|
+
*/
|
|
100
|
+
'aria-required'?: boolean | 'true' | 'false';
|
|
90
101
|
/**
|
|
91
102
|
* Optional trigger ID override.
|
|
92
103
|
* Useful for Field integration via htmlFor.
|
|
@@ -177,6 +188,8 @@ export type SelectContextValue = {
|
|
|
177
188
|
ariaLabel?: string;
|
|
178
189
|
ariaLabelledBy?: string;
|
|
179
190
|
ariaDescribedBy?: string;
|
|
191
|
+
ariaInvalid?: boolean | 'true' | 'false';
|
|
192
|
+
ariaRequired?: boolean | 'true' | 'false';
|
|
180
193
|
setOpen: (open: boolean) => void;
|
|
181
194
|
setValue: (value: OptionValue | undefined, textValue?: string) => void;
|
|
182
195
|
registerOption: (option: RegisteredOption) => void;
|
|
@@ -9,14 +9,20 @@ type BulkSelectionRenderArgs<T> = {
|
|
|
9
9
|
selectedCount?: number;
|
|
10
10
|
};
|
|
11
11
|
export type DataTableProps<T> = {
|
|
12
|
+
/** Row data. Memoize it, or pass `autoResetPageIndex={false}` — see below. */
|
|
12
13
|
data: T[];
|
|
14
|
+
/** TanStack column definitions. The selection column is injected, not declared. */
|
|
13
15
|
columns: ColumnDef<T, unknown>[];
|
|
14
16
|
className?: string;
|
|
15
17
|
'aria-label'?: string;
|
|
16
18
|
'aria-labelledby'?: string;
|
|
19
|
+
/** Initial sort state. Sorting stays internal — this only seeds it. */
|
|
17
20
|
defaultSorting?: SortingState;
|
|
21
|
+
/** Replaces the body with a loading row while true. */
|
|
18
22
|
loading?: boolean;
|
|
23
|
+
/** Shown in place of rows while `loading`. */
|
|
19
24
|
loadingMessage?: React.ReactNode;
|
|
25
|
+
/** Shown in place of rows when `data` is empty. */
|
|
20
26
|
emptyMessage?: React.ReactNode;
|
|
21
27
|
/** Override hardcoded English strings for i18n. Unset keys use English defaults. */
|
|
22
28
|
labels?: DataTableLabels;
|
|
@@ -40,6 +40,13 @@ export const Textarea = forwardRef(function Textarea({ size = 'md', resize = 've
|
|
|
40
40
|
adjustHeight();
|
|
41
41
|
}
|
|
42
42
|
}, [autoResize, adjustHeight, value]);
|
|
43
|
+
// Take the handler's type from React's own declaration rather than naming
|
|
44
|
+
// an event type here. `onInput` was `FormEventHandler` through React 18 and
|
|
45
|
+
// @types/react 19.1, and became an `InputEvent` handler in 19.2 — which adds
|
|
46
|
+
// a required `data` property, so a hand-written `FormEvent<…>` parameter no
|
|
47
|
+
// longer satisfies the `onInput?.(e)` forward. Deriving it means the
|
|
48
|
+
// component tracks whichever @types/react is installed, which matters here
|
|
49
|
+
// because the peer range is `react >= 18`.
|
|
43
50
|
const handleInput = useCallback((e) => {
|
|
44
51
|
if (autoResize) {
|
|
45
52
|
adjustHeight();
|
|
@@ -4,6 +4,7 @@ import { isDev } from '../../utils/is-dev.js';
|
|
|
4
4
|
import { useFloating, offset, flip, shift, arrow, autoUpdate, FloatingPortal, FloatingArrow, } from '@floating-ui/react';
|
|
5
5
|
import { cx } from '../../utils/cx.js';
|
|
6
6
|
import { getPortalRootFor } from '../../utils/portal.js';
|
|
7
|
+
import { getElementRef } from '../../utils/compose-refs.js';
|
|
7
8
|
import { TooltipContext, TooltipProviderContext, useTooltipContext, useTooltipProviderContext, } from './TooltipContext.js';
|
|
8
9
|
import { toPlacement } from './types.js';
|
|
9
10
|
// =============================================================================
|
|
@@ -91,7 +92,7 @@ function TooltipTriggerComponent({ asChild = false, 'aria-label': ariaLabel, chi
|
|
|
91
92
|
triggerRef.current = node;
|
|
92
93
|
// Also call child's ref if it exists
|
|
93
94
|
if (asChild && isValidElement(children)) {
|
|
94
|
-
const childRef = children
|
|
95
|
+
const childRef = getElementRef(children);
|
|
95
96
|
if (typeof childRef === 'function') {
|
|
96
97
|
childRef(node);
|
|
97
98
|
}
|
package/components/index.d.ts
CHANGED
|
@@ -25,7 +25,7 @@ export { Modal } from './Modal';
|
|
|
25
25
|
export { MoveHandle } from './MoveHandle';
|
|
26
26
|
export { Notice } from './Notice';
|
|
27
27
|
export { OverlapStack } from './OverlapStack';
|
|
28
|
-
export { Pager } from './Pager';
|
|
28
|
+
export { Pager, defaultPagerLabels } from './Pager';
|
|
29
29
|
export { Popover, PopoverTrigger, PopoverContent, usePopover } from './Popover';
|
|
30
30
|
export { Progress } from './Progress';
|
|
31
31
|
export { RadioGroup, Radio } from './Radio';
|
|
@@ -68,7 +68,7 @@ export type { ModalProps } from './Modal';
|
|
|
68
68
|
export type { MoveHandleLabels, MoveHandleMode, MoveHandleProps, MoveHandleSize } from './MoveHandle';
|
|
69
69
|
export type { NoticeProps } from './Notice';
|
|
70
70
|
export type { OverlapStackProps, OverlapStackOverflowProps } from './OverlapStack';
|
|
71
|
-
export type { PagerProps, PagerMode } from './Pager';
|
|
71
|
+
export type { PagerProps, PagerMode, PagerVariant, PagerLabels } from './Pager';
|
|
72
72
|
export type { PopoverProps, PopoverTriggerProps, PopoverContentProps, } from './Popover';
|
|
73
73
|
export type { ProgressProps } from './Progress';
|
|
74
74
|
export type { RadioGroupProps, RadioProps } from './Radio';
|
package/components/index.js
CHANGED
|
@@ -23,7 +23,7 @@ export { Modal } from './Modal/index.js';
|
|
|
23
23
|
export { MoveHandle } from './MoveHandle/index.js';
|
|
24
24
|
export { Notice } from './Notice/index.js';
|
|
25
25
|
export { OverlapStack } from './OverlapStack/index.js';
|
|
26
|
-
export { Pager } from './Pager/index.js';
|
|
26
|
+
export { Pager, defaultPagerLabels } from './Pager/index.js';
|
|
27
27
|
export { Popover, PopoverTrigger, PopoverContent, usePopover } from './Popover/index.js';
|
|
28
28
|
export { Progress } from './Progress/index.js';
|
|
29
29
|
export { RadioGroup, Radio } from './Radio/index.js';
|