@jirawatpyk/aura-react 5.1.0 → 5.1.1

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 (42) hide show
  1. package/dist/aura.bundle.js +418 -148
  2. package/dist/cjs/index.cjs +418 -148
  3. package/dist/esm/AppShell.js +10 -2
  4. package/dist/esm/Avatar.js +4 -3
  5. package/dist/esm/BottomNav.js +2 -1
  6. package/dist/esm/Checkbox.js +3 -2
  7. package/dist/esm/Combobox.js +19 -19
  8. package/dist/esm/Command.js +1 -0
  9. package/dist/esm/DataTable.js +44 -14
  10. package/dist/esm/DatePicker.js +81 -18
  11. package/dist/esm/DropdownMenu.js +12 -0
  12. package/dist/esm/FileUpload.js +15 -0
  13. package/dist/esm/FormErrorSummary.js +19 -4
  14. package/dist/esm/Menu.js +20 -7
  15. package/dist/esm/NumberField.js +3 -1
  16. package/dist/esm/Pagination.js +3 -3
  17. package/dist/esm/Popover.js +11 -1
  18. package/dist/esm/RadioGroup.js +14 -1
  19. package/dist/esm/SideNav.js +2 -1
  20. package/dist/esm/Switch.js +1 -1
  21. package/dist/esm/Table.js +3 -2
  22. package/dist/esm/Tabs.js +11 -7
  23. package/dist/esm/TextField.js +2 -2
  24. package/dist/esm/Textarea.js +2 -2
  25. package/dist/esm/ThemeStyle.js +13 -3
  26. package/dist/esm/Toaster.js +1 -0
  27. package/dist/esm/Tooltip.js +54 -29
  28. package/dist/esm/colorScheme.js +7 -3
  29. package/dist/esm/colorSchemeScript.js +3 -3
  30. package/dist/esm/dates.js +6 -3
  31. package/dist/esm/internal.js +18 -7
  32. package/dist/esm/locale.js +6 -5
  33. package/dist/esm/theme.js +3 -1
  34. package/dist/esm/useModal.js +31 -8
  35. package/dist/index.d.cts +1508 -0
  36. package/dist/index.d.ts +1 -1
  37. package/dist/server/index.cjs +6 -4
  38. package/dist/server/index.d.cts +176 -0
  39. package/dist/server/index.js +6 -4
  40. package/dist/styles.css +19 -3
  41. package/dist/styles.layer.css +19 -3
  42. package/package.json +19 -8
@@ -0,0 +1,1508 @@
1
+ import * as React$1 from 'react';
2
+
3
+ /** Button look. */
4
+ export type ButtonVariant = "primary" | "secondary" | "ghost" | "creative" | "danger" | "danger-secondary";
5
+ /** `md` 44px (default) · `sm` 32px for toolbars, table rows and card footers (still a 44px hit area on touch screens). */
6
+ export type ButtonSize = "sm" | "md";
7
+ /** AURA pill button. Enterprise (`primary`, `secondary`) for product UI; `creative` for marketing moments only. */
8
+ export interface ButtonProps extends React$1.ButtonHTMLAttributes<HTMLButtonElement> {
9
+ /** Visual variant. Default `primary`. `ghost` has no fill or edge until hover (toolbars, rows, secondary actions beside a primary). `danger` (filled) and `danger-secondary` (outline) are for irreversible or destructive actions only — typically the confirm button of a `Dialog role="alertdialog"`. */
10
+ variant?: ButtonVariant | undefined;
11
+ /** Label text — short, Title Case English or Thai. */
12
+ children: React$1.ReactNode;
13
+ /** Leading icon name (see `IconName`). Hidden while loading. */
14
+ icon?: IconInput | undefined;
15
+ /** Trailing icon name, e.g. `arrow-right` for forward actions. */
16
+ iconRight?: IconInput | undefined;
17
+ /** Shows a spinner in place of the leading icon, sets aria-busy and swallows clicks. Keeps the label and width. */
18
+ loading?: boolean | undefined;
19
+ /** Fills its container and lets a long label wrap onto more lines (at least 44px tall) — phones, Thai and Swedish labels. */
20
+ fullWidth?: boolean | undefined;
21
+ /** `sm` is 32px with tighter padding, for toolbars, table rows and card footers. Default `md` (44px). */
22
+ size?: ButtonSize | undefined;
23
+ }
24
+ /** A link that looks like a Button: give `Button` an `href` and it renders an `<a>` (navigation, not actions). */
25
+ export interface ButtonLinkProps extends Omit<React$1.AnchorHTMLAttributes<HTMLAnchorElement>, "children"> {
26
+ /** Where the link goes. With `href`, Button renders an `<a>` and its ref is the `<a>`. */
27
+ href: string;
28
+ /** Visual variant. Default `primary`. `ghost` has no fill or edge until hover (toolbars, rows, secondary actions beside a primary). `danger` (filled) and `danger-secondary` (outline) are for irreversible or destructive actions only — typically the confirm button of a `Dialog role="alertdialog"`. */
29
+ variant?: ButtonVariant | undefined;
30
+ /** Label text — say where it goes ("View Orders"), not "Click here". */
31
+ children: React$1.ReactNode;
32
+ icon?: IconInput | undefined;
33
+ /** Trailing icon, e.g. `arrow-right`, or `external-link` with `target="_blank"`. */
34
+ iconRight?: IconInput | undefined;
35
+ /** Looks unavailable and can't be followed: no href, `aria-disabled`, out of the Tab order. */
36
+ disabled?: boolean | undefined;
37
+ /** Fills its container and lets a long label wrap (at least 44px tall). */
38
+ fullWidth?: boolean | undefined;
39
+ /** `sm` is 32px with tighter padding. Default `md` (44px). */
40
+ size?: ButtonSize | undefined;
41
+ /** A router's link to render instead of `<a>`, e.g. `Link` from `next/link` (client-side navigation). It gets `href`, `className`, the children and the ref. */
42
+ linkComponent?: React$1.ElementType | undefined;
43
+ }
44
+ /** What DataTable's onStateChange reports: the sort and the 1-based page, together. */
45
+ export interface DataTableState {
46
+ sort: DataTableSort | null;
47
+ page: number;
48
+ }
49
+ export interface DataTableColumn {
50
+ /** Key into each row object. */
51
+ key: string;
52
+ /** Header label (source style: UPPERCASE). */
53
+ label: string;
54
+ /** Fixed width in px; the last column usually takes the rest. */
55
+ width?: number | undefined;
56
+ /** Render the cell in the mono face (IDs). */
57
+ mono?: boolean | undefined;
58
+ /** Render the value as a StatusPill (tone picked from the word). */
59
+ pill?: boolean | undefined;
60
+ /** Override the tone for specific values, e.g. `{ 'QA': 'progress' }`. */
61
+ tones?: Record<string, StatusTone> | undefined;
62
+ /** Header becomes a button cycling asc → desc → unsorted. */
63
+ sortable?: boolean | undefined;
64
+ /** Value to sort by, when not the cell value (dates, amounts). */
65
+ sortValue?: ((row: Record<string, any>) => string | number | null) | undefined;
66
+ /** Custom cell content. */
67
+ render?: ((row: Record<string, any>) => React$1.ReactNode) | undefined;
68
+ /** Set false to keep a sized column fixed when the table is `resizable`. */
69
+ resizable?: boolean | undefined;
70
+ /** Resize limits in px. Defaults 64 / 480. For the flexible column, minWidth defaults to 160. */
71
+ minWidth?: number | undefined;
72
+ maxWidth?: number | undefined;
73
+ /** Start pinned to the left (needs a width). */
74
+ pinned?: boolean | undefined;
75
+ /** Start hidden (show it from the columns button). */
76
+ hidden?: boolean | undefined;
77
+ /** Hide this column when the table is narrower than this (px, or a breakpoint name). For tablets: keep ID, name, date and status; drop the rest below `lg`. Not applied to stacked cards. Decided in CSS from the first paint (4.20) for up to three distinct widths per table; more than that apply once JavaScript runs. */
78
+ hideBelow?: number | "sm" | "md" | "lg" | "xl" | undefined;
79
+ /** Row actions (a DropdownMenu or IconButton). In stacked cards it sits top-right instead of in the field list. Give it an empty label. */
80
+ actions?: boolean | undefined;
81
+ /** `end` right-aligns header and cells (amounts, counts) and uses tabular figures. Default `start`. */
82
+ align?: "start" | "end" | undefined;
83
+ }
84
+ export interface DataTableSort {
85
+ key: string;
86
+ dir: "asc" | "desc";
87
+ }
88
+ export interface DataTableEmpty {
89
+ /** Default `inbox`; use `search` for "no matches". */
90
+ icon?: IconInput | undefined;
91
+ /** Default "Nothing here yet". */
92
+ title?: string | undefined;
93
+ description?: string | undefined;
94
+ /** One action, usually a secondary Button. */
95
+ action?: React$1.ReactNode | undefined;
96
+ }
97
+ /** Enterprise data table: 48px rows, hairline dividers, mono header band. */
98
+ export interface DataTableProps {
99
+ /** Defaults to ID · NAME · STATUS · OWNER (96 / 160 / 112 / auto px). */
100
+ columns?: DataTableColumn[] | undefined;
101
+ rows: Array<Record<string, React$1.ReactNode>>;
102
+ /** Column key giving each row a unique React key. Default: the first column's key. */
103
+ rowKey?: string | undefined;
104
+ /** Accessible name for the table. */
105
+ label?: string | undefined;
106
+ /** Controlled sort; pair with onSortChange. */
107
+ sort?: DataTableSort | null | undefined;
108
+ /** Initial sort when uncontrolled. */
109
+ defaultSort?: DataTableSort | null | undefined;
110
+ onSortChange?: ((sort: DataTableSort | null) => void) | undefined;
111
+ /** Adds a checkbox column. */
112
+ selectable?: boolean | undefined;
113
+ /** Controlled selection (row keys); pair with onSelectionChange. */
114
+ selected?: Array<string | number> | undefined;
115
+ /** Initial selection when uncontrolled. */
116
+ defaultSelected?: Array<string | number> | undefined;
117
+ onSelectionChange?: ((keys: Array<string | number>) => void) | undefined;
118
+ /** Shown when rows is empty. */
119
+ empty?: DataTableEmpty | undefined;
120
+ /** A totals row under the body (4.19): content per column key, e.g. `{ id: 'Total', vat: '7,000.00', total: '107,000.00' }`.
121
+ * Cells share the body's widths and alignment, so right-aligned money lines up. Stacked cards get a Totals card. */
122
+ footer?: Record<string, React$1.ReactNode> | undefined;
123
+ /** Keep the totals row visible while a `height` table scrolls. (4.19) */
124
+ stickyFooter?: boolean | undefined;
125
+ /** Rows per page; omit for no pagination. */
126
+ pageSize?: number | undefined;
127
+ /** Controlled page (1-based); pair with onPageChange. */
128
+ page?: number | undefined;
129
+ /** Initial page when uncontrolled. Default 1. */
130
+ defaultPage?: number | undefined;
131
+ onPageChange?: ((page: number) => void) | undefined;
132
+ /** Sort and page in one callback (4.17): a sort click reports `{ sort, page: 1 }` once, a page change
133
+ * `{ sort, page }`. When set, onSortChange and onPageChange are not called for them, so an app that keeps both in
134
+ * the URL does one navigation per click. Pair with `sort` + `page` for controlled state. */
135
+ onStateChange?: ((state: DataTableState) => void) | undefined;
136
+ /** Adds drag/keyboard resize handles to every column that has a width. */
137
+ resizable?: boolean | undefined;
138
+ onColumnResize?: ((key: string, width: number) => void) | undefined;
139
+ /** Shows skeleton rows and disables sorting, select-all and paging. With `manual` and rows already shown, the rows stay (dimmed, with a progress bar) while the next page loads. */
140
+ loading?: boolean | undefined;
141
+ /** Server mode: `rows` is already the current page, sorted by the server. The table doesn't sort or slice; it reports
142
+ * sort and page through onSortChange / onPageChange (or getPageHref links). Pair with `totalRows` and `pageSize`. */
143
+ manual?: boolean | undefined;
144
+ /** manual: rows across all pages (drives the page count, "1–25 of 312" and aria-rowcount). */
145
+ totalRows?: number | undefined;
146
+ /** Makes each row a link: the first column's content renders as the provider's linkComponent (or `<a>`), and a click
147
+ * or Enter anywhere on the row follows it. Ctrl/⌘-click opens a new tab as usual. */
148
+ getRowHref?: ((row: Record<string, any>) => string) | undefined;
149
+ /** Pager arrows become links to these URLs (search-param paging). Without onPageChange the link navigates. */
150
+ getPageHref?: ((page: number) => string) | undefined;
151
+ /** Router link for getRowHref / getPageHref. Default: AuraProvider's linkComponent, else `<a>`. */
152
+ linkComponent?: React$1.ElementType | undefined;
153
+ /** Skeleton row count when there is no pageSize. Default 5. */
154
+ skeletonRows?: number | undefined;
155
+ /** Called on row click or Enter. */
156
+ onRowActivate?: ((row: Record<string, any>) => void) | undefined;
157
+ /** Fixed height in px: sticky header, and only the rows in view are rendered. */
158
+ height?: number | undefined;
159
+ /** Column menu on every header, drag-to-reorder, and the show/hide columns button. */
160
+ columnControls?: boolean | undefined;
161
+ /** Set false to keep column controls but turn off reordering. */
162
+ reorderable?: boolean | undefined;
163
+ /** Controlled column order (keys); pair with onColumnOrderChange. */
164
+ columnOrder?: string[] | undefined;
165
+ onColumnOrderChange?: ((keys: string[]) => void) | undefined;
166
+ /** Controlled hidden columns (keys); pair with onHiddenColumnsChange. */
167
+ hiddenColumns?: string[] | undefined;
168
+ onHiddenColumnsChange?: ((keys: string[]) => void) | undefined;
169
+ /** Controlled pinned columns (keys); pair with onPinnedColumnsChange. */
170
+ pinnedColumns?: string[] | undefined;
171
+ onPinnedColumnsChange?: ((keys: string[]) => void) | undefined;
172
+ /** `compact` = 40px rows (48px on touch screens). Default: the surrounding density. */
173
+ density?: "comfortable" | "compact" | undefined;
174
+ /** Table width in px below which rows render as stacked cards (phones). Try 640. It follows the table's own width, not the window. Since 4.20 the cards are the same markup as the grid, laid out by a container query, so any width is right before hydration and each row is in the HTML once. With `height` (virtual rows) the server can only send the first screenful; the rest of the cards arrive on hydration. */
175
+ stackBelow?: number | undefined;
176
+ className?: string | undefined;
177
+ }
178
+ /** An AURA icon name, or any icon element (e.g. `<Building />` from lucide-react). AURA sizes it and hides it from screen readers. */
179
+ export type IconInput = IconName | React$1.ReactElement;
180
+ export type IconName = "check" | "x" | "plus" | "minus" | "search" | "chevron-down" | "chevron-up" | "chevron-left" | "chevron-right" | "arrow-right" | "arrow-up-right" | "arrow-up-down" | "loader-circle" | "circle-alert" | "circle-check" | "info" | "triangle-alert" | "settings" | "user" | "users" | "filter" | "ellipsis" | "external-link" | "copy" | "trash-2" | "pencil" | "download" | "upload" | "calendar" | "bell" | "menu" | "eye" | "log-out" | "circle" | "circle-dot-dashed" | "ban" | "arrow-up" | "arrow-down" | "inbox" | "pin" | "pin-off" | "eye-off" | "columns-3" | "arrow-left" | "rotate-ccw" | "house" | "layout-dashboard" | "folder" | "chart-column" | "file-text" | "mail" | "lock" | "clock" | "trending-up" | "trending-down" | "image" | "paperclip" | "cloud-upload" | "file" | "sun" | "moon" | "monitor" | "panel-left-close" | "panel-left-open" | "server" | "globe" | "activity" | "shield-alert" | "phone" | "wrench";
181
+ /** Lucide stroke icon drawn inline in currentColor. */
182
+ export interface IconProps {
183
+ /** A name from the set, or an icon element of your own (sized and styled the same way). */
184
+ name: IconInput;
185
+ /** `sm` 16 (default) · `md` 20 · `lg` 24, or a px number. */
186
+ size?: "sm" | "md" | "lg" | number | undefined;
187
+ /** Accessible name. Omit for decorative icons next to a text label (then aria-hidden). */
188
+ label?: string | undefined;
189
+ /** Default 2 (Lucide's). */
190
+ strokeWidth?: number | undefined;
191
+ className?: string | undefined;
192
+ }
193
+ /** Creative surface with the AURA mesh and/or grain texture. Light in every theme; content in aura-on-texture. */
194
+ export interface SurfaceProps extends React$1.HTMLAttributes<HTMLElement> {
195
+ /** Default `mesh`. */
196
+ texture?: "mesh" | "grain" | "mesh-grain" | undefined;
197
+ /** Element to render. Default `div`. */
198
+ as?: keyof React$1.JSX.IntrinsicElements | undefined;
199
+ children?: React$1.ReactNode | undefined;
200
+ }
201
+ /** Sets the language of built-in labels (pagination, close buttons, empty states…) and the default date display for everything inside. */
202
+ export interface AuraProviderProps {
203
+ /** Built-in labels and date display. `sv` = Swedish labels, `sv-SE` dates, Monday weeks and the Gregorian calendar. Without a provider everything is English: labels, `en-GB` dates, Gregorian years. */
204
+ locale?: "th" | "en" | "sv" | undefined;
205
+ /** Default calendar for DatePicker / DateRangePicker / Calendar / formatDate callers that read it. Unset: `buddhist` (พ.ศ.) for `th`, `gregory` for `en` and `sv`. */
206
+ calendar?: "buddhist" | "gregory" | undefined;
207
+ /** Override individual strings. */
208
+ strings?: Partial<Record<string, string | ((...args: any[]) => string)>> | undefined;
209
+ /** IANA time zone for "today" in DatePicker, DateRangePicker and Calendar, e.g. `Asia/Bangkok` (4.19). Default: the browser's. */
210
+ timeZone?: string | undefined;
211
+ /** `compact`: 36px fields and buttons, 40px table rows — dense admin screens. Touch screens keep 44px. Default: comfortable (or an ancestor's `data-density`). */
212
+ density?: "comfortable" | "compact" | undefined;
213
+ /** Your router's link (e.g. `Link` from `next/link`), used by every AURA component that renders a link: Button with `href`, SideNav, Breadcrumb, Stat, Pagination, DataTable row links. It gets `href`, `className`, `aria-current`, the children and the ref. A component's own `linkComponent` wins. */
214
+ linkComponent?: React$1.ElementType | undefined;
215
+ children?: React$1.ReactNode | undefined;
216
+ }
217
+ /** `warning` (5.1): needs attention but still works — Warning, Problem, Degraded, At risk. */
218
+ export type StatusTone = "neutral" | "progress" | "ready" | "warning" | "blocked";
219
+ /** Status pill: tone fill + icon + the status word. Tone comes from the word unless given. */
220
+ export interface StatusPillProps {
221
+ /** The status word shown, e.g. "In Progress". */
222
+ children: React$1.ReactNode;
223
+ /** Force a tone. Default: matched from the word (Ready/Done → ready, In Progress/In Review → progress, Warning/Problem/Degraded/At risk → warning (5.1), Blocked/Failed → blocked, anything else → neutral). */
224
+ tone?: StatusTone | undefined;
225
+ className?: string | undefined;
226
+ }
227
+ /** 16px checkbox with 4px corners; ink when checked, a dash when indeterminate. */
228
+ export interface CheckboxProps extends Omit<React$1.InputHTMLAttributes<HTMLInputElement>, "onChange" | "type" | "checked" | "defaultChecked"> {
229
+ /** Controlled state; pair with onChange. Or use defaultChecked. */
230
+ checked?: boolean | undefined;
231
+ defaultChecked?: boolean | undefined;
232
+ indeterminate?: boolean | undefined;
233
+ /** Accessible name. In 5.x it is shown only when given as children; **6.0 shows `label` beside the box** like
234
+ * Switch and TextField. Without children and without `hideLabel` it warns once in development. */
235
+ label?: string | undefined;
236
+ /** A bare box named by `label`, e.g. in a table row: keeps it hidden in 6.0 and silences the 5.1 notice. */
237
+ hideLabel?: boolean | undefined;
238
+ /** The visible label beside the box. */
239
+ children?: React$1.ReactNode | undefined;
240
+ /** Second line under the visible label (needs an id to be linked). */
241
+ description?: React$1.ReactNode | undefined;
242
+ onChange?: ((checked: boolean) => void) | undefined;
243
+ disabled?: boolean | undefined;
244
+ tabIndex?: number | undefined;
245
+ className?: string | undefined;
246
+ }
247
+ /** 32px round button holding one icon. */
248
+ export interface IconButtonProps extends React$1.ButtonHTMLAttributes<HTMLButtonElement> {
249
+ icon: IconInput;
250
+ /** `danger` colours the icon and hover for a destructive action (Delete, Revoke). */
251
+ tone?: "neutral" | "danger" | undefined;
252
+ /** Accessible name and tooltip (required). */
253
+ label: string;
254
+ /** Icon size. Default `sm` (16). */
255
+ size?: "sm" | "md" | undefined;
256
+ }
257
+ export interface MenuItem {
258
+ label?: string | undefined;
259
+ icon?: IconInput | undefined;
260
+ /** Present = a checkable item (menuitemcheckbox). */
261
+ checked?: boolean | undefined;
262
+ disabled?: boolean | undefined;
263
+ /** Keep the menu open after choosing (checkbox lists). */
264
+ keepOpen?: boolean | undefined;
265
+ /** Short right-aligned hint, e.g. a shortcut. */
266
+ hint?: string | undefined;
267
+ /** A divider instead of an item. */
268
+ separator?: boolean | undefined;
269
+ onSelect?: (() => void) | undefined;
270
+ /** A link item (4.19): rendered through your router's link (`linkComponent`), e.g. a download or "Open in new tab". */
271
+ href?: string | undefined;
272
+ /** Link target, e.g. `_blank`, with `href`. */
273
+ target?: string | undefined;
274
+ /** `danger` for destructive items (Void, Delete): danger colour, put them last after a separator. (4.19) */
275
+ tone?: "danger" | undefined;
276
+ /** `radio` makes a single-choice item (menuitemradio); `checked` marks the chosen one. (4.19) */
277
+ type?: "radio" | undefined;
278
+ /** Radio items with the same `group` form one labelled group (the name is read out). (4.19) */
279
+ group?: string | undefined;
280
+ }
281
+ /** Popover list anchored to an element, rendered in a portal. */
282
+ export interface MenuProps {
283
+ /** The element it opens from (usually the button that was clicked). */
284
+ anchor: HTMLElement;
285
+ items: MenuItem[];
286
+ /** Accessible name. */
287
+ label: string;
288
+ /** Called on choose, Escape, Tab or outside click. `restoreFocus` is true for keyboard closes. */
289
+ onClose: (restoreFocus: boolean) => void;
290
+ /** Focus the first item on open. Default true; turn off only for static demos. */
291
+ autoFocus?: boolean | undefined;
292
+ /** Router link for items with `href`; defaults to AuraProvider's `linkComponent`, then `<a>`. (4.19) */
293
+ linkComponent?: React$1.ElementType | undefined;
294
+ }
295
+ export interface FieldProps {
296
+ /** Visible label; also the accessible name. */
297
+ label: string;
298
+ /** Helper line under the field (caption, fg-secondary). */
299
+ hint?: React$1.ReactNode | undefined;
300
+ /** Replaces the hint, turns the edge fg-danger and sets aria-invalid. Write it as the fix. */
301
+ error?: React$1.ReactNode | undefined;
302
+ /** Adds a red asterisk and the native required attribute. */
303
+ required?: boolean | undefined;
304
+ /** Adds "(optional)" after the label. */
305
+ optional?: boolean | undefined;
306
+ }
307
+ export interface TextFieldProps extends FieldProps, Omit<React$1.InputHTMLAttributes<HTMLInputElement>, "required"> {
308
+ /** Leading icon inside the field. */
309
+ icon?: IconInput | undefined;
310
+ /** Trailing unit, e.g. "THB". */
311
+ suffix?: React$1.ReactNode | undefined;
312
+ }
313
+ /** A password input with a show/hide button. All TextField props; `ref` reaches the input (react-hook-form `register`). */
314
+ export interface PasswordFieldProps extends Omit<TextFieldProps, "type" | "suffix"> {
315
+ /** Set false to hide the show/hide button. Default true. */
316
+ toggle?: boolean | undefined;
317
+ }
318
+ /** One entry of a FormErrorSummary: the field's `id` (or `name`) and what to fix. */
319
+ export interface FormErrorItem {
320
+ field: string;
321
+ message: React$1.ReactNode;
322
+ }
323
+ /** The list of problems at the top of a form after a failed submit; each links to its field (GOV.UK pattern). */
324
+ export interface FormErrorSummaryProps {
325
+ /** A list, or react-hook-form's `formState.errors` as is (`{ name: { message } }`). Empty → renders nothing. */
326
+ errors: FormErrorItem[] | Record<string, {
327
+ message?: React$1.ReactNode | undefined;
328
+ } | undefined>;
329
+ /** Default "Fix N fields to continue" in the provider's language. */
330
+ title?: React$1.ReactNode | undefined;
331
+ /** Called with the field when a link is followed, e.g. react-hook-form's `setFocus`. Default: focus the element whose id (or name) is the field. */
332
+ onSelect?: ((field: string) => void) | undefined;
333
+ /** Change it on every submit (e.g. `formState.submitCount`) to move focus to the summary again. It also takes focus when errors first appear. */
334
+ focusKey?: unknown;
335
+ className?: string | undefined;
336
+ id?: string | undefined;
337
+ }
338
+ /** An applied filter, shown as a removable chip. */
339
+ export interface ActiveFilter {
340
+ id: string;
341
+ label: React$1.ReactNode;
342
+ onRemove: () => void;
343
+ }
344
+ /** The row above a table: search, filter controls, applied-filter chips, result count and actions. Wraps below md. */
345
+ export interface FilterBarProps {
346
+ /** Search text (controlled). Omit `onSearchChange` to hide the search field. */
347
+ search?: string | undefined;
348
+ /** Called after typing pauses (`searchDelay`), and at once on Enter or clear — ready to write to the URL. */
349
+ onSearchChange?: ((value: string) => void) | undefined;
350
+ /** ms to wait after the last keystroke. Default 300. */
351
+ searchDelay?: number | undefined;
352
+ searchLabel?: string | undefined;
353
+ searchPlaceholder?: string | undefined;
354
+ /** Filter controls beside the search: Select, SegmentedControl, a Popover of options… */
355
+ children?: React$1.ReactNode | undefined;
356
+ /** Applied filters as chips, each with its own remove button. */
357
+ filters?: ActiveFilter[] | undefined;
358
+ /** Adds "Clear all" while any filter or search is set. */
359
+ onClearAll?: (() => void) | undefined;
360
+ /** A number ("312 results", announced politely) or your own node. */
361
+ resultCount?: number | React$1.ReactNode | undefined;
362
+ /** Trailing slot: export, a New button… */
363
+ actions?: React$1.ReactNode | undefined;
364
+ /** Accessible name of the region. Default "Filters". */
365
+ label?: string | undefined;
366
+ className?: string | undefined;
367
+ }
368
+ /** One command in the palette. */
369
+ export interface CommandItem {
370
+ id: string;
371
+ /** Text shown and searched. */
372
+ label: string;
373
+ /** Items with the same group are listed together under its heading, in first-seen order. */
374
+ group?: string | undefined;
375
+ icon?: IconInput | undefined;
376
+ description?: string | undefined;
377
+ /** Extra words that find it ("invoice" → Billing). */
378
+ keywords?: string[] | undefined;
379
+ /** A shortcut shown at the right, e.g. "G I". Display only. */
380
+ shortcut?: string | undefined;
381
+ disabled?: boolean | undefined;
382
+ /** Runs when chosen (Enter or click); the palette then closes. */
383
+ onSelect?: (() => void) | undefined;
384
+ }
385
+ /** A command palette: a modal search over commands and pages, grouped, fully keyboard-driven. */
386
+ export interface CommandProps {
387
+ open: boolean;
388
+ onOpenChange: (open: boolean) => void;
389
+ items: CommandItem[];
390
+ /** Also called with the chosen item (after its own onSelect). */
391
+ onSelect?: ((item: CommandItem) => void) | undefined;
392
+ /** Accessible name. Default "Command menu". */
393
+ label?: string | undefined;
394
+ placeholder?: string | undefined;
395
+ /** Default "No matches". */
396
+ emptyText?: string | undefined;
397
+ /** Shown when nothing matches, instead of `emptyText`: any content, e.g. a hint and a "Create member" button. (4.17) */
398
+ empty?: React$1.ReactNode | undefined;
399
+ /** ⌘K / Ctrl+K toggles the palette from anywhere on the page. Default true. */
400
+ hotkey?: boolean | undefined;
401
+ /** Replace the Thai-aware default filter, or `false` to show `items` as given — for results your server already
402
+ * searched (4.17). */
403
+ filter?: ((item: CommandItem, query: string) => boolean) | false | undefined;
404
+ /** The search text, controlled (4.17). Pair with `onQueryChange`; fetch results for it and pass them as `items`. */
405
+ query?: string | undefined;
406
+ /** Called on every keystroke, and with "" when the palette closes. (4.17) */
407
+ onQueryChange?: ((query: string) => void) | undefined;
408
+ /** Results are on their way: a "Searching…" row, `aria-busy`, and the result count announced when they arrive. The
409
+ * current items stay listed meanwhile. (4.17) */
410
+ loading?: boolean | undefined;
411
+ className?: string | undefined;
412
+ }
413
+ export interface TextareaProps extends FieldProps, Omit<React$1.TextareaHTMLAttributes<HTMLTextAreaElement>, "required"> {
414
+ }
415
+ export type SelectOption = string | {
416
+ value: string;
417
+ label: string;
418
+ disabled?: boolean | undefined;
419
+ };
420
+ export interface SelectProps extends FieldProps, Omit<React$1.SelectHTMLAttributes<HTMLSelectElement>, "required"> {
421
+ options: SelectOption[];
422
+ /** A disabled first option shown in fg-tertiary until something is chosen. */
423
+ placeholder?: string | undefined;
424
+ icon?: IconInput | undefined;
425
+ }
426
+ export type ChoiceOption = string | {
427
+ value: string;
428
+ label: string;
429
+ description?: string | undefined;
430
+ disabled?: boolean | undefined;
431
+ };
432
+ export interface RadioGroupProps extends FieldProps {
433
+ options: ChoiceOption[];
434
+ value?: string | undefined;
435
+ defaultValue?: string | undefined;
436
+ onChange?: ((value: string) => void) | undefined;
437
+ name?: string | undefined;
438
+ /** Default `vertical`. */
439
+ orientation?: "vertical" | "horizontal" | undefined;
440
+ disabled?: boolean | undefined;
441
+ id?: string | undefined;
442
+ className?: string | undefined;
443
+ }
444
+ export interface SwitchProps {
445
+ label?: string | undefined;
446
+ description?: string | undefined;
447
+ checked?: boolean | undefined;
448
+ defaultChecked?: boolean | undefined;
449
+ onChange?: ((checked: boolean) => void) | undefined;
450
+ disabled?: boolean | undefined;
451
+ /** Required when there is no visible label. */
452
+ "aria-label"?: string | undefined;
453
+ id?: string | undefined;
454
+ className?: string | undefined;
455
+ }
456
+ export type FeedbackTone = "info" | "success" | "warning" | "danger";
457
+ export interface AlertProps {
458
+ tone?: FeedbackTone | undefined;
459
+ title?: React$1.ReactNode | undefined;
460
+ children?: React$1.ReactNode | undefined;
461
+ /** Usually a secondary Button. */
462
+ action?: React$1.ReactNode | undefined;
463
+ /** Adds a close button. */
464
+ onDismiss?: (() => void) | undefined;
465
+ className?: string | undefined;
466
+ }
467
+ export interface ToastOptions {
468
+ title: string;
469
+ description?: string | undefined;
470
+ tone?: FeedbackTone | undefined;
471
+ action?: {
472
+ label: string;
473
+ onClick?: (() => void) | undefined;
474
+ } | undefined;
475
+ /** ms before it closes itself. Default 5000; Infinity keeps it until dismissed. */
476
+ duration?: number | undefined;
477
+ /** Reuse an id to replace a toast in place (same position, timer restarts) — never a second toast. */
478
+ id?: string | undefined;
479
+ }
480
+ /** Options for the shorthands (`toast.success(title, opts)` …): everything but the title and tone. */
481
+ export type ToastShorthandOptions = Omit<ToastOptions, "title" | "tone">;
482
+ export interface TooltipProps {
483
+ content: React$1.ReactNode;
484
+ /** One focusable element. */
485
+ children: React$1.ReactElement;
486
+ /** Preferred side. Default `top`. `left` / `right` (4.20) for icon buttons at the right edge of a table or in a
487
+ * collapsed rail. Flips to the opposite side when clipped, and always stays inside the viewport. */
488
+ side?: "top" | "bottom" | "left" | "right" | undefined;
489
+ /** Hover delay in ms. Default 400. */
490
+ delay?: number | undefined;
491
+ /** Force open (demos, tests). */
492
+ open?: boolean | undefined;
493
+ }
494
+ export interface FieldPropsPublic {
495
+ label: string;
496
+ hint?: React$1.ReactNode | undefined;
497
+ error?: React$1.ReactNode | undefined;
498
+ required?: boolean | undefined;
499
+ optional?: boolean | undefined;
500
+ }
501
+ export interface DialogProps {
502
+ open: boolean;
503
+ onClose: () => void;
504
+ title: React$1.ReactNode;
505
+ description?: React$1.ReactNode | undefined;
506
+ children?: React$1.ReactNode | undefined;
507
+ /** Buttons, right-aligned: secondary Cancel, then the primary action. */
508
+ footer?: React$1.ReactNode | undefined;
509
+ /** `sm` 400 · `md` 560 (default) · `lg` 720. */
510
+ size?: "sm" | "md" | "lg" | undefined;
511
+ /** Default true. False hides the close button and ignores Escape and scrim clicks. */
512
+ dismissible?: boolean | undefined;
513
+ /** Use `alertdialog` for destructive confirmations. */
514
+ role?: "dialog" | "alertdialog" | undefined;
515
+ /** Default true. Turn off only for static demos. */
516
+ autoFocus?: boolean | undefined;
517
+ className?: string | undefined;
518
+ }
519
+ export interface CardProps {
520
+ title?: React$1.ReactNode | undefined;
521
+ description?: React$1.ReactNode | undefined;
522
+ /** Top-right, usually an IconButton. */
523
+ actions?: React$1.ReactNode | undefined;
524
+ footer?: React$1.ReactNode | undefined;
525
+ children?: React$1.ReactNode | undefined;
526
+ /** Default `enterprise`. `creative` is for marketing and onboarding only. */
527
+ variant?: "enterprise" | "creative" | undefined;
528
+ /** Heading level of the title. Default 3 — use 2 when cards sit directly under the page h1. */
529
+ headingLevel?: 2 | 3 | 4 | 5 | 6 | undefined;
530
+ /** Hover edge for clickable cards. */
531
+ interactive?: boolean | undefined;
532
+ as?: keyof React$1.JSX.IntrinsicElements | undefined;
533
+ className?: string | undefined;
534
+ /** id for the title element; the card is then labelled by it (aria-labelledby). */
535
+ titleId?: string | undefined;
536
+ }
537
+ export interface TabItem {
538
+ id: string;
539
+ label: string;
540
+ icon?: IconInput | undefined;
541
+ count?: number | undefined;
542
+ disabled?: boolean | undefined;
543
+ content?: React$1.ReactNode | undefined;
544
+ /** A route (4.19). When every tab has one, Tabs renders a `nav` of links (section tabs that are pages), with
545
+ * `aria-current="page"` on the current one and no panels. */
546
+ href?: string | undefined;
547
+ }
548
+ export interface TabsProps {
549
+ tabs: TabItem[];
550
+ /** Accessible name for the tab list (or the nav, for link tabs). */
551
+ label: string;
552
+ /** The current tab's id. For link tabs, the current route's tab. */
553
+ value?: string | undefined;
554
+ defaultValue?: string | undefined;
555
+ onChange?: ((id: string) => void) | undefined;
556
+ /** Router link for tabs with `href`; defaults to AuraProvider's `linkComponent`, then `<a>`. (4.19) */
557
+ linkComponent?: React$1.ElementType | undefined;
558
+ className?: string | undefined;
559
+ }
560
+ export interface NavItem {
561
+ id: string;
562
+ label: string;
563
+ icon?: IconInput | undefined;
564
+ count?: number | undefined;
565
+ /** Anything beside the label, e.g. a status dot or a `Badge`. */
566
+ badge?: React$1.ReactNode | undefined;
567
+ href?: string | undefined;
568
+ /** Makes this item a collapsible group of links. The group header is a button, never a link. */
569
+ children?: NavItem[] | undefined;
570
+ /** Start open. A group also opens by itself when one of its items is the current one. */
571
+ defaultOpen?: boolean | undefined;
572
+ }
573
+ export interface SideNavProps {
574
+ sections?: Array<{
575
+ title?: string | undefined;
576
+ items: NavItem[];
577
+ }> | undefined;
578
+ items?: NavItem[] | undefined;
579
+ value?: string | undefined;
580
+ defaultValue?: string | undefined;
581
+ onChange?: ((id: string) => void) | undefined;
582
+ header?: React$1.ReactNode | undefined;
583
+ footer?: React$1.ReactNode | undefined;
584
+ /** Default "Main". */
585
+ label?: string | undefined;
586
+ /** Router link for items with `href`; defaults to the AuraProvider's `linkComponent`, then `<a>`. */
587
+ linkComponent?: React$1.ElementType | undefined;
588
+ /** Icon-only rail (`aura-sidenav-rail-width`, 64px). Labels show as tooltips and stay the accessible names; a group
589
+ * expands the rail when clicked. Controlled; pair with `onCollapsedChange`. */
590
+ collapsed?: boolean | undefined;
591
+ /** Starting state when `collapsed` isn't controlled. Default false. */
592
+ defaultCollapsed?: boolean | undefined;
593
+ /** Called by the toggle button, and by a group clicked in the rail (with `false`). Save it to keep the choice. */
594
+ onCollapsedChange?: ((collapsed: boolean) => void) | undefined;
595
+ /** Adds a collapse / expand button at the bottom. AppShell hides it in its phone drawer. */
596
+ collapsible?: boolean | undefined;
597
+ /** The 1px right edge that divides the nav from the page. Default true; `false` when your layout draws its own
598
+ * divider. (5.1) */
599
+ bordered?: boolean | undefined;
600
+ className?: string | undefined;
601
+ }
602
+ export interface BreadcrumbProps {
603
+ /** Root first; the last item is the current page. */
604
+ items: Array<{
605
+ label: string;
606
+ href?: string | undefined;
607
+ onClick?: (() => void) | undefined;
608
+ }>;
609
+ label?: string | undefined;
610
+ /** Your router's link (e.g. `Link` from `next/link`) for this component; defaults to AuraProvider's `linkComponent`, then `<a>`. */
611
+ linkComponent?: React$1.ElementType | undefined;
612
+ className?: string | undefined;
613
+ }
614
+ export interface AvatarProps {
615
+ /** Accessible name; also gives the initials and a stable colour. */
616
+ name: string;
617
+ src?: string | undefined;
618
+ /** `sm` 24 · `md` 32 (default) · `lg` 40. */
619
+ size?: "sm" | "md" | "lg" | undefined;
620
+ status?: "online" | undefined;
621
+ className?: string | undefined;
622
+ }
623
+ export interface DropdownMenuProps {
624
+ /** One element — usually a Button or IconButton. It gets aria-haspopup, aria-expanded and the click handler. */
625
+ trigger: React$1.ReactElement;
626
+ items: MenuItem[];
627
+ /** Accessible name for the menu. */
628
+ label?: string | undefined;
629
+ /** Router link for items with `href`. (4.19) */
630
+ linkComponent?: React$1.ElementType | undefined;
631
+ }
632
+ export interface ComboboxOption {
633
+ value: string;
634
+ label: string;
635
+ /** Second line in the list; also searched. */
636
+ description?: string | undefined;
637
+ /** Extra search terms (English name, phone, code…). */
638
+ keywords?: string[] | undefined;
639
+ disabled?: boolean | undefined;
640
+ /** Leading icon in the list. */
641
+ icon?: IconInput | undefined;
642
+ }
643
+ /** Combobox with `multiple`: pick any number; the picks show as removable chips in the field. */
644
+ export interface ComboboxMultipleProps extends Omit<ComboboxProps, "value" | "defaultValue" | "onChange" | "clearable"> {
645
+ multiple: true;
646
+ /** Selected option values, in the order they were picked (controlled). */
647
+ value?: string[] | undefined;
648
+ defaultValue?: string[] | undefined;
649
+ onChange?: ((value: string[]) => void) | undefined;
650
+ /** Clear-all button while anything is selected. Default true. */
651
+ clearable?: boolean | undefined;
652
+ /** Most picks allowed; further options are disabled. */
653
+ max?: number | undefined;
654
+ }
655
+ export interface ComboboxProps extends FieldProps {
656
+ options: Array<ComboboxOption | string>;
657
+ /** Selected option value (controlled). */
658
+ value?: string | null | undefined;
659
+ defaultValue?: string | null | undefined;
660
+ onChange?: ((value: string | null) => void) | undefined;
661
+ id?: string | undefined;
662
+ name?: string | undefined;
663
+ placeholder?: string | undefined;
664
+ disabled?: boolean | undefined;
665
+ readOnly?: boolean | undefined;
666
+ /** Leading icon. Default `search`. */
667
+ icon?: IconInput | undefined;
668
+ /** Clear button while a value is selected (Escape clears too). Default true. */
669
+ clearable?: boolean | undefined;
670
+ /** Server-side search: called with the typed text; the component stops filtering and shows `options` as given. */
671
+ onSearch?: ((query: string) => void) | undefined;
672
+ loading?: boolean | undefined;
673
+ loadingText?: string | undefined;
674
+ emptyText?: string | undefined;
675
+ /** Max options rendered. Default 200 — narrow with typing beyond that. */
676
+ limit?: number | undefined;
677
+ /** Replace the Thai-aware default filter (label, description, keywords). */
678
+ filter?: ((option: ComboboxOption, query: string) => boolean) | undefined;
679
+ className?: string | undefined;
680
+ }
681
+ /** Number input: thousands separators, +/− buttons, arrow keys, min/max/step, prefix/suffix (฿, %). */
682
+ export interface NumberFieldProps extends FieldProps {
683
+ /** The number (controlled). `null` = empty. */
684
+ value?: number | null | undefined;
685
+ defaultValue?: number | null | undefined;
686
+ /** Called with the parsed number (or null when emptied) as the person types, and with the clamped value on blur. */
687
+ onChange?: ((value: number | null) => void) | undefined;
688
+ min?: number | undefined;
689
+ max?: number | undefined;
690
+ /** Arrow keys and buttons move by this. Default 1. PageUp/PageDown move 10×. */
691
+ step?: number | undefined;
692
+ /** Decimal places shown and kept. Default: 0 when step is whole, else step's decimals. */
693
+ decimals?: number | undefined;
694
+ /** Text before the number, e.g. `฿`. */
695
+ prefix?: React$1.ReactNode | undefined;
696
+ /** Text after the number, e.g. `%` or `ชิ้น`. */
697
+ suffix?: React$1.ReactNode | undefined;
698
+ /** +/− buttons beside the number. Default true. */
699
+ stepper?: boolean | undefined;
700
+ id?: string | undefined;
701
+ name?: string | undefined;
702
+ placeholder?: string | undefined;
703
+ disabled?: boolean | undefined;
704
+ readOnly?: boolean | undefined;
705
+ className?: string | undefined;
706
+ onBlur?: React$1.FocusEventHandler<HTMLInputElement> | undefined;
707
+ }
708
+ /** One step of a Stepper. */
709
+ export interface StepItem {
710
+ id: string;
711
+ label: React$1.ReactNode;
712
+ /** Short line under the label, e.g. what the step asks for. */
713
+ description?: React$1.ReactNode | undefined;
714
+ }
715
+ /** Progress through a multi-step flow (wizard, checkout, booking). */
716
+ export interface StepperProps {
717
+ steps: StepItem[];
718
+ /** id of the step the person is on. Steps before it are completed. */
719
+ current: string;
720
+ /** Accessible name of the list. Default: none (give one when the page has several). */
721
+ label?: string | undefined;
722
+ /** Makes completed steps buttons that go back to them. Upcoming steps never are. */
723
+ onStepClick?: ((id: string) => void) | undefined;
724
+ /** Default `horizontal`. Below `sm` a horizontal stepper shows only the current step ("Step 2 of 4"). */
725
+ orientation?: "horizontal" | "vertical" | undefined;
726
+ className?: string | undefined;
727
+ }
728
+ export interface SegmentedOption {
729
+ value: string;
730
+ label: string;
731
+ icon?: IconInput | undefined;
732
+ /** Show only the icon; `label` becomes its accessible name and tooltip. */
733
+ iconOnly?: boolean | undefined;
734
+ disabled?: boolean | undefined;
735
+ }
736
+ /** A row of 2–5 mutually exclusive choices that apply at once (view, period, unit). A radio group underneath. */
737
+ export interface SegmentedControlProps {
738
+ /** Accessible name of the group, e.g. "View". Required. */
739
+ label: string;
740
+ options: Array<SegmentedOption | string>;
741
+ value?: string | undefined;
742
+ defaultValue?: string | undefined;
743
+ onChange?: ((value: string) => void) | undefined;
744
+ /** `md` (default, 36px) or `sm` (28px) for toolbars. */
745
+ size?: "sm" | "md" | undefined;
746
+ /** Stretch across the container, segments equal width. */
747
+ fullWidth?: boolean | undefined;
748
+ disabled?: boolean | undefined;
749
+ id?: string | undefined;
750
+ className?: string | undefined;
751
+ }
752
+ /** ISO date string, `YYYY-MM-DD` (Gregorian — the era is display only). */
753
+ export type ISODate = string;
754
+ export interface DateDisplayOptions {
755
+ /** Components: the AuraProvider's locale, else `en`. `formatDate()` (no provider to read): `en` unless given (5.0; `th` before). */
756
+ locale?: "th" | "en" | "sv" | undefined;
757
+ /** `buddhist` (พ.ศ.; default for th) or `gregory` (ค.ศ.; default for en and sv). */
758
+ calendar?: "buddhist" | "gregory" | undefined;
759
+ }
760
+ export interface CalendarProps extends DateDisplayOptions {
761
+ start?: ISODate | null | undefined;
762
+ end?: ISODate | null | undefined;
763
+ focus?: ISODate | null | undefined;
764
+ range?: boolean | undefined;
765
+ /** Earliest / latest day; `'today'` means today in `timeZone` (4.19). */
766
+ min?: ISODate | "today" | undefined;
767
+ max?: ISODate | "today" | undefined;
768
+ isDateDisabled?: ((iso: ISODate) => boolean) | undefined;
769
+ /** 0 = Sunday (Thai default), 1 = Monday. */
770
+ weekStartsOn?: 0 | 1 | undefined;
771
+ /** IANA time zone that decides which day is "today" (the marker, `min`/`max="today"`, the Today button), e.g.
772
+ * `Asia/Bangkok`. Default: the provider's `timeZone`, else the browser's. (4.19) */
773
+ timeZone?: string | undefined;
774
+ /** Today, given outright (ISO). Wins over `timeZone`; handy in tests and server-rendered pages. (4.19) */
775
+ today?: ISODate | undefined;
776
+ onSelect?: ((iso: ISODate | null) => void) | undefined;
777
+ /** Adds a Clear link to the footer. */
778
+ onClear?: (() => void) | undefined;
779
+ /** false hides the Today / Clear footer. */
780
+ footer?: boolean | undefined;
781
+ /** Default true: focuses the selected (or today's) day on mount. */
782
+ autoFocus?: boolean | undefined;
783
+ }
784
+ export interface DateFieldProps extends FieldProps, DateDisplayOptions {
785
+ id?: string | undefined;
786
+ name?: string | undefined;
787
+ placeholder?: string | undefined;
788
+ disabled?: boolean | undefined;
789
+ /** Clear button while there is a value. Default true. */
790
+ clearable?: boolean | undefined;
791
+ /** Earliest / latest day; `'today'` means today in `timeZone` (4.19). */
792
+ min?: ISODate | "today" | undefined;
793
+ max?: ISODate | "today" | undefined;
794
+ isDateDisabled?: ((iso: ISODate) => boolean) | undefined;
795
+ weekStartsOn?: 0 | 1 | undefined;
796
+ /** IANA time zone that decides which day is "today" (the marker, `min`/`max="today"`, the Today button), e.g.
797
+ * `Asia/Bangkok`. Default: the provider's `timeZone`, else the browser's. (4.19) */
798
+ timeZone?: string | undefined;
799
+ /** Today, given outright (ISO). Wins over `timeZone`; handy in tests and server-rendered pages. (4.19) */
800
+ today?: ISODate | undefined;
801
+ className?: string | undefined;
802
+ }
803
+ export interface DatePickerProps extends DateFieldProps {
804
+ value?: ISODate | null | undefined;
805
+ defaultValue?: ISODate | null | undefined;
806
+ onChange?: ((value: ISODate | null) => void) | undefined;
807
+ }
808
+ export interface DateRange {
809
+ start: ISODate | null;
810
+ end: ISODate | null;
811
+ }
812
+ export interface DateRangePickerProps extends DateFieldProps {
813
+ value?: DateRange | undefined;
814
+ defaultValue?: DateRange | undefined;
815
+ onChange?: ((value: DateRange) => void) | undefined;
816
+ }
817
+ export interface DrawerProps {
818
+ open: boolean;
819
+ onClose: () => void;
820
+ /** Default `right`. */
821
+ side?: "right" | "left" | undefined;
822
+ /** sm 360 · md 480 (default) · lg 640 · nav = SideNav width. Full width below 640px. */
823
+ size?: "sm" | "md" | "lg" | "nav" | undefined;
824
+ title?: string | undefined;
825
+ description?: React$1.ReactNode | undefined;
826
+ children?: React$1.ReactNode | undefined;
827
+ /** Buttons, right-aligned; stacked on phones. */
828
+ footer?: React$1.ReactNode | undefined;
829
+ /** Scrim click and Escape close it. Default true. */
830
+ dismissible?: boolean | undefined;
831
+ /** Default true: focus moves to the element with `data-autofocus`, else the first control in the body. False only for static demos. */
832
+ autoFocus?: boolean | undefined;
833
+ /** Needed when there is no title. */
834
+ "aria-label"?: string | undefined;
835
+ className?: string | undefined;
836
+ }
837
+ export type Breakpoint = "base" | "sm" | "md" | "lg" | "xl";
838
+ export type Responsive<T> = T | Partial<Record<Breakpoint, T>>;
839
+ /** Spacing step (aura-space-N) or any CSS length. */
840
+ export type Space = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 8 | 10 | 12 | 16 | string;
841
+ export interface StackProps {
842
+ direction?: Responsive<"row" | "column"> | undefined;
843
+ gap?: Responsive<Space> | undefined;
844
+ /** Cross-axis alignment; responsive like direction ({ base: 'stretch', sm: 'flex-end' }). */
845
+ align?: Responsive<React$1.CSSProperties["alignItems"]> | undefined;
846
+ justify?: React$1.CSSProperties["justifyContent"] | undefined;
847
+ wrap?: boolean | undefined;
848
+ as?: keyof React$1.JSX.IntrinsicElements | undefined;
849
+ className?: string | undefined;
850
+ style?: React$1.CSSProperties | undefined;
851
+ children?: React$1.ReactNode | undefined;
852
+ }
853
+ export interface GridProps {
854
+ columns?: Responsive<number> | undefined;
855
+ /** Fit as many columns as there is room for, each at least this wide (px). Overrides columns. */
856
+ minItemWidth?: number | undefined;
857
+ gap?: Responsive<Space> | undefined;
858
+ as?: keyof React$1.JSX.IntrinsicElements | undefined;
859
+ className?: string | undefined;
860
+ style?: React$1.CSSProperties | undefined;
861
+ children?: React$1.ReactNode | undefined;
862
+ }
863
+ export interface AppShellProps {
864
+ /** Usually a SideNav. Fixed from 1024px up; in a Drawer behind a menu button below. */
865
+ nav?: React$1.ReactElement | undefined;
866
+ /** Top bar content (title, search, account menu). */
867
+ header?: React$1.ReactNode | undefined;
868
+ children?: React$1.ReactNode | undefined;
869
+ navLabel?: string | undefined;
870
+ menuLabel?: string | undefined;
871
+ /** id of `<main>`, for a skip link. Default `main`. */
872
+ mainId?: string | undefined;
873
+ /** A BottomNav for phones (4.19). Shown below its `hideFrom` breakpoint; the content keeps room for it, and a
874
+ * viewport ActionBar sits on top of it. With a `bottomNav` and no `nav`, there is no menu button. */
875
+ bottomNav?: React$1.ReactElement | undefined;
876
+ className?: string | undefined;
877
+ }
878
+ export interface SeparatorProps {
879
+ /** Default `horizontal` (full width). `vertical` fills the height of a flex row, e.g. between toolbar groups. */
880
+ orientation?: "horizontal" | "vertical" | undefined;
881
+ /** Default true: hidden from screen readers. `false` renders `role="separator"`, announced as a boundary. */
882
+ decorative?: boolean | undefined;
883
+ /** Space on both sides, as an `aura-space-*` step (e.g. 4 = 16px). Default 0. */
884
+ spacing?: 1 | 2 | 3 | 4 | 5 | 6 | 8 | undefined;
885
+ className?: string | undefined;
886
+ }
887
+ export interface TableProps extends Omit<React$1.TableHTMLAttributes<HTMLTableElement>, "className"> {
888
+ /** The table's name (a `<caption>`). Give every table one; `captionHidden` keeps it for screen readers only. */
889
+ caption?: React$1.ReactNode | undefined;
890
+ captionHidden?: boolean | undefined;
891
+ /** `compact` tightens the cell padding. Default follows the page. */
892
+ density?: "comfortable" | "compact" | undefined;
893
+ className?: string | undefined;
894
+ children?: React$1.ReactNode | undefined;
895
+ }
896
+ export interface TableSectionProps extends React$1.HTMLAttributes<HTMLTableSectionElement> {
897
+ className?: string | undefined;
898
+ }
899
+ export interface TableRowProps extends React$1.HTMLAttributes<HTMLTableRowElement> {
900
+ className?: string | undefined;
901
+ }
902
+ export interface TableCellProps extends Omit<React$1.TdHTMLAttributes<HTMLTableCellElement>, "align" | "scope"> {
903
+ /** Text alignment. `numeric` implies `end`. */
904
+ align?: "start" | "center" | "end" | undefined;
905
+ /** Money and counts: right-aligned, tabular figures. */
906
+ numeric?: boolean | undefined;
907
+ /** IDs and codes in the mono face. */
908
+ mono?: boolean | undefined;
909
+ /** Th only. Default `col`. */
910
+ scope?: "col" | "row" | "colgroup" | "rowgroup" | undefined;
911
+ className?: string | undefined;
912
+ }
913
+ export interface ActionBarProps {
914
+ /** Buttons, right-aligned (the primary one last). */
915
+ children?: React$1.ReactNode | undefined;
916
+ /** A short line such as "Total 107,000.00 THB · due Oct 22, 2026" or "Unsaved changes". It sits in a polite live
917
+ * region that is always in the page, so a change is announced. */
918
+ status?: React$1.ReactNode | undefined;
919
+ /** `viewport` (default): sticks to the bottom of the screen, padded for the home indicator, above a BottomNav.
920
+ * `container`: sticks to the bottom of the scrolling card or panel it's in. Both stay in the flow at the end of their
921
+ * parent, so they never cover the last field. Make it the last child of the form or card it belongs to: like any
922
+ * `position: sticky` element it sticks only while that parent is on screen. */
923
+ position?: "viewport" | "container" | undefined;
924
+ /** Bulk actions: the number of selected rows. Shows "N selected" in the status; at 0 the bar hides (its live region
925
+ * stays, so the next selection is announced) and its actions leave the tab order. */
926
+ selected?: number | undefined;
927
+ /** Adds a "Clear" button next to the count. */
928
+ onClearSelection?: (() => void) | undefined;
929
+ /** Name of the region. Default "Actions". */
930
+ label?: string | undefined;
931
+ className?: string | undefined;
932
+ }
933
+ export interface BottomNavItem {
934
+ id: string;
935
+ /** Short: five items share 320px. */
936
+ label: string;
937
+ icon: IconInput;
938
+ href?: string | undefined;
939
+ /** A number on the icon (99+ above 99); 0 hides it. Part of the item's accessible name. */
940
+ count?: number | undefined;
941
+ /** A dot on the icon, e.g. "new". Give it words with `badgeLabel`. */
942
+ badge?: boolean | undefined;
943
+ /** Read after the label when `badge` is set, e.g. "new". */
944
+ badgeLabel?: string | undefined;
945
+ }
946
+ export interface BottomNavProps {
947
+ /** 2–5 items. */
948
+ items: BottomNavItem[];
949
+ value?: string | undefined;
950
+ defaultValue?: string | undefined;
951
+ onChange?: ((id: string) => void) | undefined;
952
+ /** Default "Main". */
953
+ label?: string | undefined;
954
+ /** Router link for items with `href`; defaults to the AuraProvider's `linkComponent`, then `<a>`. */
955
+ linkComponent?: React$1.ElementType | undefined;
956
+ /** Hidden from this breakpoint up, in CSS (so the server's HTML is right). Default `lg` (1024px); `false` never hides. */
957
+ hideFrom?: "md" | "lg" | "xl" | false | undefined;
958
+ className?: string | undefined;
959
+ }
960
+ export interface StatChange {
961
+ /** Shown as written, e.g. "+12%" or "−3". */
962
+ value: React$1.ReactNode;
963
+ direction?: "up" | "down" | "flat" | undefined;
964
+ /** Default: up = positive, down = negative. Set it when a rise is bad (cancellations, wait time). */
965
+ tone?: "positive" | "negative" | "neutral" | undefined;
966
+ /** e.g. "vs last month". */
967
+ label?: React$1.ReactNode | undefined;
968
+ }
969
+ export interface StatProps {
970
+ /** Your router's link (e.g. `Link` from `next/link`) for this component; defaults to AuraProvider's `linkComponent`, then `<a>`. */
971
+ linkComponent?: React$1.ElementType | undefined;
972
+ label: React$1.ReactNode;
973
+ value?: React$1.ReactNode | undefined;
974
+ /** Small unit after the value ("งาน", "คน", "%"). */
975
+ unit?: React$1.ReactNode | undefined;
976
+ change?: StatChange | undefined;
977
+ caption?: React$1.ReactNode | undefined;
978
+ icon?: IconInput | undefined;
979
+ /** Skeleton in place of the value. */
980
+ loading?: boolean | undefined;
981
+ /** Makes the whole card a link or a button (drill-down). */
982
+ href?: string | undefined;
983
+ onClick?: (() => void) | undefined;
984
+ className?: string | undefined;
985
+ }
986
+ export interface TimePickerProps extends FieldProps {
987
+ /** "HH:mm", 24-hour. */
988
+ value?: string | null | undefined;
989
+ defaultValue?: string | null | undefined;
990
+ onChange?: ((value: string | null) => void) | undefined;
991
+ /** Minutes between listed slots. Default 30. */
992
+ step?: number | undefined;
993
+ /** Earliest and latest allowed times, "HH:mm". Typed times outside them are refused with a message. */
994
+ min?: string | undefined;
995
+ max?: string | undefined;
996
+ isTimeDisabled?: ((time: string) => boolean) | undefined;
997
+ /** Slot to scroll to when empty (e.g. "09:00"). Default: min. */
998
+ suggest?: string | undefined;
999
+ /** Clear button while there is a value. Default true. */
1000
+ clearable?: boolean | undefined;
1001
+ id?: string | undefined;
1002
+ name?: string | undefined;
1003
+ placeholder?: string | undefined;
1004
+ disabled?: boolean | undefined;
1005
+ readOnly?: boolean | undefined;
1006
+ className?: string | undefined;
1007
+ }
1008
+ export interface UploadItem {
1009
+ id: string;
1010
+ /** The browser File (absent for files already on the server). */
1011
+ file?: File | undefined;
1012
+ name: string;
1013
+ size?: number | undefined;
1014
+ type?: string | undefined;
1015
+ /** ready = picked, not sent yet. Set uploading/done yourself while sending. */
1016
+ status: "ready" | "uploading" | "done" | "error";
1017
+ /** 0–100 while uploading. */
1018
+ progress?: number | undefined;
1019
+ error?: string | undefined;
1020
+ /** For files already stored (edit forms). */
1021
+ url?: string | undefined;
1022
+ }
1023
+ export interface FileUploadProps extends FieldProps {
1024
+ value?: UploadItem[] | undefined;
1025
+ defaultValue?: UploadItem[] | undefined;
1026
+ onChange?: ((items: UploadItem[]) => void) | undefined;
1027
+ onRemove?: ((item: UploadItem) => void) | undefined;
1028
+ /** Same syntax as `<input accept>`: "image/*,.pdf". Checked on drop too. */
1029
+ accept?: string | undefined;
1030
+ multiple?: boolean | undefined;
1031
+ /** Bytes per file. */
1032
+ maxSize?: number | undefined;
1033
+ /** With multiple. */
1034
+ maxFiles?: number | undefined;
1035
+ id?: string | undefined;
1036
+ name?: string | undefined;
1037
+ disabled?: boolean | undefined;
1038
+ className?: string | undefined;
1039
+ }
1040
+ export type Tone = "neutral" | "accent" | "success" | "warning" | "danger";
1041
+ export interface BadgeProps extends React$1.HTMLAttributes<HTMLSpanElement> {
1042
+ tone?: Tone | undefined;
1043
+ /** soft (default) · solid · outline */
1044
+ variant?: "soft" | "solid" | "outline" | undefined;
1045
+ icon?: IconInput | undefined;
1046
+ }
1047
+ export interface TagProps extends Omit<React$1.HTMLAttributes<HTMLElement>, "onClick"> {
1048
+ children: React$1.ReactNode;
1049
+ icon?: IconInput | undefined;
1050
+ /** Adds a remove button (applied filters, chosen people). */
1051
+ onRemove?: (() => void) | undefined;
1052
+ removeLabel?: string | undefined;
1053
+ /** Makes it a toggle chip (filter chips): renders a button with aria-pressed. */
1054
+ selected?: boolean | undefined;
1055
+ onClick?: ((e: React$1.MouseEvent<HTMLButtonElement>) => void) | undefined;
1056
+ disabled?: boolean | undefined;
1057
+ }
1058
+ export interface ProgressProps {
1059
+ /** Omit for indeterminate. */
1060
+ value?: number | undefined;
1061
+ max?: number | undefined;
1062
+ label?: React$1.ReactNode | undefined;
1063
+ "aria-label"?: string | undefined;
1064
+ showValue?: boolean | undefined;
1065
+ /** Replaces the % text, e.g. "3 of 5 files". Also read out as aria-valuetext. */
1066
+ valueLabel?: React$1.ReactNode | undefined;
1067
+ hint?: React$1.ReactNode | undefined;
1068
+ tone?: Tone | undefined;
1069
+ size?: "sm" | "md" | undefined;
1070
+ id?: string | undefined;
1071
+ className?: string | undefined;
1072
+ }
1073
+ export interface SkeletonProps {
1074
+ variant?: "text" | "rect" | "circle" | undefined;
1075
+ /** text only: number of lines (the last is shorter). */
1076
+ lines?: number | undefined;
1077
+ width?: number | string | undefined;
1078
+ height?: number | string | undefined;
1079
+ /** circle diameter. */
1080
+ size?: number | undefined;
1081
+ className?: string | undefined;
1082
+ }
1083
+ export interface EmptyStateProps {
1084
+ title: React$1.ReactNode;
1085
+ description?: React$1.ReactNode | undefined;
1086
+ icon?: IconInput | undefined;
1087
+ /** One or two buttons. */
1088
+ action?: React$1.ReactNode | undefined;
1089
+ size?: "sm" | "md" | undefined;
1090
+ bordered?: boolean | undefined;
1091
+ headingLevel?: 2 | 3 | 4 | 5 | 6 | undefined;
1092
+ className?: string | undefined;
1093
+ }
1094
+ export interface PaginationProps {
1095
+ pageCount: number;
1096
+ /** 1-based, controlled; pair with onChange. Or defaultPage. */
1097
+ page?: number | undefined;
1098
+ defaultPage?: number | undefined;
1099
+ onChange?: ((page: number) => void) | undefined;
1100
+ /** Pages shown each side of the current one. Default 1. */
1101
+ siblingCount?: number | undefined;
1102
+ /** Render real links — page numbers and the previous / next arrows (4.17) — through your router's link. With
1103
+ * `onChange` too, onChange runs instead of following the link. */
1104
+ getHref?: ((page: number) => string) | undefined;
1105
+ label?: string | undefined;
1106
+ /** Your router's link (e.g. `Link` from `next/link`) for this component; defaults to AuraProvider's `linkComponent`, then `<a>`. */
1107
+ linkComponent?: React$1.ElementType | undefined;
1108
+ className?: string | undefined;
1109
+ }
1110
+ export interface AccordionItem {
1111
+ id: string;
1112
+ title: React$1.ReactNode;
1113
+ description?: React$1.ReactNode | undefined;
1114
+ content: React$1.ReactNode;
1115
+ icon?: IconInput | undefined;
1116
+ disabled?: boolean | undefined;
1117
+ }
1118
+ export interface AccordionProps {
1119
+ items: AccordionItem[];
1120
+ /** single (default): one open at a time. multiple: any number. */
1121
+ type?: "single" | "multiple" | undefined;
1122
+ value?: string | null | string[] | undefined;
1123
+ defaultValue?: string | null | string[] | undefined;
1124
+ onChange?: ((value: any) => void) | undefined;
1125
+ /** single only: false keeps one section always open. Default true. */
1126
+ collapsible?: boolean | undefined;
1127
+ headingLevel?: 2 | 3 | 4 | 5 | 6 | undefined;
1128
+ id?: string | undefined;
1129
+ className?: string | undefined;
1130
+ }
1131
+ export interface PopoverProps {
1132
+ /** One element; it gets aria-haspopup, aria-expanded and the click toggle. */
1133
+ trigger: React$1.ReactElement;
1134
+ children: React$1.ReactNode | ((api: {
1135
+ close: () => void;
1136
+ }) => React$1.ReactNode);
1137
+ title?: React$1.ReactNode | undefined;
1138
+ /** Accessible name when there is no title. */
1139
+ label?: string | undefined;
1140
+ open?: boolean | undefined;
1141
+ defaultOpen?: boolean | undefined;
1142
+ onOpenChange?: ((open: boolean) => void) | undefined;
1143
+ placement?: "bottom-start" | "bottom-end" | "bottom-center" | "top-start" | "top-end" | "top-center" | undefined;
1144
+ width?: number | string | undefined;
1145
+ /** Default true: focus moves to [data-autofocus] or the first control inside. */
1146
+ autoFocus?: boolean | undefined;
1147
+ id?: string | undefined;
1148
+ className?: string | undefined;
1149
+ }
1150
+ export interface ThemeOptions {
1151
+ /** The project's brand colour, #rgb or #rrggbb. Replaces AURA violet (links, focus ring, selection, info, progress, creative shadow in dark, mesh). */
1152
+ brand: string;
1153
+ /** Optional signal colour; replaces AURA lime in the accent dot and mesh only (success/ready stay green). */
1154
+ signal?: string | undefined;
1155
+ /** ink (default): primary buttons stay zinc ink. brand: primary buttons use the brand colour. */
1156
+ primary?: "ink" | "brand" | undefined;
1157
+ name?: string | undefined;
1158
+ }
1159
+ export interface ThemeCheck {
1160
+ theme: "light" | "dark";
1161
+ pair: string;
1162
+ ratio: number;
1163
+ target: number;
1164
+ pass: boolean;
1165
+ }
1166
+ export interface Theme {
1167
+ name: string | null;
1168
+ brand: Record<50 | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900, string>;
1169
+ signal: Record<50 | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900, string> | null;
1170
+ light: Record<string, string>;
1171
+ dark: Record<string, string>;
1172
+ checks: ThemeCheck[];
1173
+ ok: boolean;
1174
+ /** CSS overriding the tokens. No selector: the whole page. A selector (".tenant-acme") scopes it. Load after aura.css. */
1175
+ css(selector?: string): string;
1176
+ }
1177
+ /** One SVG child: element name and its attributes. */
1178
+ export type IconShape = [
1179
+ string,
1180
+ Record<string, string>
1181
+ ];
1182
+ export declare const ICONS: Record<IconName, IconShape[]>;
1183
+ export declare const Icon: React$1.ForwardRefExoticComponent<IconProps & React$1.RefAttributes<SVGSVGElement>>;
1184
+ /** Every icon name the bundle carries. */
1185
+ export declare const iconNames: IconName[];
1186
+ /** Button with an `href` is a link; without, a button. Two call signatures so each gets the right props and ref. */
1187
+ export interface ButtonComponent {
1188
+ (props: ButtonLinkProps & React$1.RefAttributes<HTMLAnchorElement>): React$1.ReactElement | null;
1189
+ (props: ButtonProps & React$1.RefAttributes<HTMLButtonElement>): React$1.ReactElement | null;
1190
+ displayName?: string | undefined;
1191
+ }
1192
+ /** AURA pill button. Enterprise (`primary`, `secondary`) for product UI; `creative` for marketing moments only.
1193
+ * With `href` it renders a link that looks the same (`<a>`, or your router's link via `linkComponent`). */
1194
+ export declare const Button: ButtonComponent;
1195
+ export declare const IconButton: React$1.ForwardRefExoticComponent<IconButtonProps & React$1.RefAttributes<HTMLButtonElement>>;
1196
+ /** Popover list anchored to an element, rendered in a portal. */
1197
+ export declare const Menu: React$1.ForwardRefExoticComponent<MenuProps & React$1.RefAttributes<HTMLDivElement>>;
1198
+ /** A trigger that opens a Menu. ArrowDown / ArrowUp on the trigger also opens it. */
1199
+ export declare const DropdownMenu: React$1.ForwardRefExoticComponent<DropdownMenuProps & React$1.RefAttributes<HTMLSpanElement>>;
1200
+ export declare const Checkbox: React$1.ForwardRefExoticComponent<CheckboxProps & React$1.RefAttributes<HTMLInputElement>>;
1201
+ /** The tone the pill would pick for a status word. */
1202
+ declare function toneFor(status: unknown): StatusTone;
1203
+ export declare const StatusPill: React$1.ForwardRefExoticComponent<StatusPillProps & React$1.RefAttributes<HTMLSpanElement>>;
1204
+ /** Field: label, required/optional marks, the control, then the hint or error line. Wrap a custom control in it. */
1205
+ export interface FieldComponentProps extends Omit<FieldPropsPublic, "label"> {
1206
+ /** Visible label. Omit only when the control is labelled another way. */
1207
+ label?: React$1.ReactNode | undefined;
1208
+ /** The control's id: the label points at it, and the hint/error ids derive from it. */
1209
+ id?: string | undefined;
1210
+ children?: React$1.ReactNode | undefined;
1211
+ /** Render the label as another element (e.g. `span` for a group of controls) with this id. */
1212
+ labelAs?: string | undefined;
1213
+ labelId?: string | undefined;
1214
+ disabled?: boolean | undefined;
1215
+ className?: string | undefined;
1216
+ }
1217
+ export declare const Field: React$1.ForwardRefExoticComponent<FieldComponentProps & React$1.RefAttributes<HTMLDivElement>>;
1218
+ export declare const TextField: React$1.ForwardRefExoticComponent<TextFieldProps & React$1.RefAttributes<HTMLInputElement>>;
1219
+ export declare const Textarea: React$1.ForwardRefExoticComponent<TextareaProps & React$1.RefAttributes<HTMLTextAreaElement>>;
1220
+ export declare const Select: React$1.ForwardRefExoticComponent<SelectProps & React$1.RefAttributes<HTMLSelectElement>>;
1221
+ export declare const RadioGroup: React$1.ForwardRefExoticComponent<RadioGroupProps & React$1.RefAttributes<HTMLFieldSetElement>>;
1222
+ export declare const Switch: React$1.ForwardRefExoticComponent<SwitchProps & React$1.RefAttributes<HTMLButtonElement>>;
1223
+ /** One value, or with `multiple` any number (chips). Two call signatures so value/onChange are typed for each. */
1224
+ export interface ComboboxComponent {
1225
+ (props: ComboboxMultipleProps & React$1.RefAttributes<HTMLInputElement>): React$1.ReactElement | null;
1226
+ (props: ComboboxProps & React$1.RefAttributes<HTMLInputElement>): React$1.ReactElement | null;
1227
+ displayName?: string | undefined;
1228
+ }
1229
+ /** The Thai-aware default filter: label, description and keywords contain the query. */
1230
+ declare function defaultFilter(option: ComboboxOption, query: string): boolean;
1231
+ /** Text field that filters a list as you type (ARIA 1.2 combobox). One value, or any number with `multiple`. */
1232
+ export declare const Combobox: ComboboxComponent;
1233
+ /** Options for formatDate: locale/calendar plus a preset or any Intl.DateTimeFormat options. */
1234
+ export type FormatDateOptions = DateDisplayOptions & {
1235
+ format?: "short" | "long" | "numeric" | Intl.DateTimeFormatOptions | undefined;
1236
+ };
1237
+ /** Format an ISO date for display: "18 Sept 2026" by default (English, Gregorian — 5.0); `{ locale: 'th' }` gives
1238
+ * "18 ก.ย. 2569" (Buddhist era), `{ locale: 'sv' }` "18 sep. 2026". The same function from the package root and from
1239
+ * `/server`. In components, `useFormatDate()` follows the AuraProvider's locale instead. */
1240
+ export declare function formatDate(iso: ISODate | null | undefined, opts?: FormatDateOptions): string;
1241
+ /** Parse typed text: dd/mm/yyyy (Buddhist years ≥ 2400 are converted), d-m-yyyy, d.m.yyyy, yyyy-mm-dd or '18 ก.ย. 2569' / '18 Sep 2026'. */
1242
+ export declare function parseDate(text: string | null | undefined): ISODate | null;
1243
+ /** Today as an ISO date in an IANA time zone (e.g. `Asia/Bangkok`), or in the runtime's own zone without one. (4.19) */
1244
+ export declare function todayIn(timeZone?: string | null): ISODate;
1245
+ /** formatDate bound to the nearest AuraProvider: its locale and calendar (English, Gregorian without one).
1246
+ * Options you pass still win. Use it in components; plain formatDate() stays for code outside React. */
1247
+ export declare function useFormatDate(): (iso: ISODate | null | undefined, opts?: FormatDateOptions) => string;
1248
+ export declare const Calendar: React$1.ForwardRefExoticComponent<CalendarProps & React$1.RefAttributes<HTMLDivElement>>;
1249
+ /** Typed date field + calendar popover. English / Gregorian unless a locale is set; `th` shows Buddhist-era dates (18 ก.ย. 2569) and accepts พ.ศ. or ค.ศ. years. The value is always a Gregorian ISO date. */
1250
+ export declare const DatePicker: React$1.ForwardRefExoticComponent<DatePickerProps & React$1.RefAttributes<HTMLInputElement>>;
1251
+ export declare const DateRangePicker: React$1.ForwardRefExoticComponent<DateRangePickerProps & React$1.RefAttributes<HTMLInputElement>>;
1252
+ export declare const Alert: React$1.ForwardRefExoticComponent<AlertProps & React$1.RefAttributes<HTMLDivElement>>;
1253
+ /** Show a toast; returns its id. Needs `<Toaster />` mounted once. */
1254
+ export declare function toast(opts: ToastOptions | string): string;
1255
+ export declare namespace toast {
1256
+ var success: (title: string, opts?: ToastShorthandOptions) => string;
1257
+ var error: (title: string, opts?: ToastShorthandOptions) => string;
1258
+ var warning: (title: string, opts?: ToastShorthandOptions) => string;
1259
+ var info: (title: string, opts?: ToastShorthandOptions) => string;
1260
+ var loading: (title: string, opts?: ToastShorthandOptions) => string;
1261
+ var dismiss: (id: string) => void;
1262
+ }
1263
+ export interface ToasterProps {
1264
+ /** Default `bottom`. */
1265
+ position?: "bottom" | "top" | undefined;
1266
+ }
1267
+ export declare function Toaster(props: ToasterProps): React$1.ReactElement | null;
1268
+ export declare const PasswordField: React$1.ForwardRefExoticComponent<PasswordFieldProps & React$1.RefAttributes<HTMLInputElement>>;
1269
+ export declare const FormErrorSummary: React$1.ForwardRefExoticComponent<FormErrorSummaryProps & React$1.RefAttributes<HTMLDivElement>>;
1270
+ export declare const FilterBar: React$1.ForwardRefExoticComponent<FilterBarProps & React$1.RefAttributes<HTMLDivElement>>;
1271
+ export declare function Command(props: CommandProps): React$1.ReactElement | null;
1272
+ export declare const Tooltip: React$1.ForwardRefExoticComponent<TooltipProps & React$1.RefAttributes<HTMLSpanElement>>;
1273
+ export declare const Dialog: React$1.ForwardRefExoticComponent<DialogProps & React$1.RefAttributes<HTMLDivElement>>;
1274
+ /** Side panel over the page: record detail, filters, mobile navigation. Modal (focus trap, scroll lock, focus restore). */
1275
+ export declare const Drawer: React$1.ForwardRefExoticComponent<DrawerProps & React$1.RefAttributes<HTMLDivElement>>;
1276
+ /** Enterprise data table: 48px rows, hairline dividers, mono header band. */
1277
+ export declare const DataTable: React$1.ForwardRefExoticComponent<DataTableProps & React$1.RefAttributes<HTMLDivElement>>;
1278
+ export declare const Card: React$1.ForwardRefExoticComponent<CardProps & React$1.RefAttributes<HTMLElement>>;
1279
+ export declare const Tabs: React$1.ForwardRefExoticComponent<TabsProps & React$1.RefAttributes<HTMLDivElement>>;
1280
+ /** Side navigation: sections of links or buttons, collapsible groups, counts and badges. Arrow keys move between items. */
1281
+ export declare const SideNav: React$1.ForwardRefExoticComponent<SideNavProps & React$1.RefAttributes<HTMLElement>>;
1282
+ export declare const Breadcrumb: React$1.ForwardRefExoticComponent<BreadcrumbProps & React$1.RefAttributes<HTMLElement>>;
1283
+ export declare const Avatar: React$1.ForwardRefExoticComponent<AvatarProps & React$1.RefAttributes<HTMLSpanElement>>;
1284
+ /** Stack — one direction, even gaps. direction and gap may be responsive: { base: 'column', md: 'row' }. */
1285
+ export declare const Stack: React$1.ForwardRefExoticComponent<StackProps & React$1.RefAttributes<HTMLElement>>;
1286
+ /** Grid — equal columns. columns may be responsive ({ base: 1, md: 2, lg: 3 }), or use minItemWidth to fit as many as fit. */
1287
+ export declare const Grid: React$1.ForwardRefExoticComponent<GridProps & React$1.RefAttributes<HTMLElement>>;
1288
+ /** Centred page column. */
1289
+ export interface ContainerProps {
1290
+ /** `narrow` caps it at aura-container-narrow (720px). Default `default` (1280px). */
1291
+ size?: "default" | "narrow" | undefined;
1292
+ as?: keyof React$1.JSX.IntrinsicElements | undefined;
1293
+ className?: string | undefined;
1294
+ style?: React$1.CSSProperties | undefined;
1295
+ children?: React$1.ReactNode | undefined;
1296
+ }
1297
+ /** Container — centres content up to aura-container-max (1280px) with responsive side padding. */
1298
+ export declare const Container: React$1.ForwardRefExoticComponent<ContainerProps & React$1.RefAttributes<HTMLElement>>;
1299
+ /** AppShell — side navigation + top bar + content. The nav is fixed from lg (1024px) up and a Drawer below it.
1300
+ * Which one shows is decided in CSS (4.16), so the server's HTML is already right on a phone and nothing shifts on
1301
+ * hydration; JavaScript only opens and closes the drawer. */
1302
+ export declare const AppShell: React$1.ForwardRefExoticComponent<AppShellProps & React$1.RefAttributes<HTMLDivElement>>;
1303
+ /** ActionBar — a bar stuck to the bottom of the screen or of a card: a status line and the form's or selection's
1304
+ * actions. It is `position: sticky`, so it stays in the flow at the end of its parent and never covers the last field. */
1305
+ export declare const ActionBar: React$1.ForwardRefExoticComponent<ActionBarProps & React$1.RefAttributes<HTMLDivElement>>;
1306
+ /** Separator — a 1px `aura-border-default` rule between groups of content (4.20). Decorative by default (hidden from
1307
+ * screen readers); `decorative={false}` makes it a `role="separator"` that is announced. */
1308
+ export declare const Separator: React$1.ForwardRefExoticComponent<SeparatorProps & React$1.RefAttributes<HTMLDivElement>>;
1309
+ /** A static table. Scrolls sideways inside its own box when it is wider than its container. */
1310
+ export declare const Table: React$1.ForwardRefExoticComponent<TableProps & React$1.RefAttributes<HTMLTableElement>>;
1311
+ export declare const THead: React$1.ForwardRefExoticComponent<TableSectionProps & React$1.RefAttributes<HTMLTableSectionElement>>;
1312
+ export declare const TBody: React$1.ForwardRefExoticComponent<TableSectionProps & React$1.RefAttributes<HTMLTableSectionElement>>;
1313
+ export declare const TFoot: React$1.ForwardRefExoticComponent<TableSectionProps & React$1.RefAttributes<HTMLTableSectionElement>>;
1314
+ export declare const Tr: React$1.ForwardRefExoticComponent<TableRowProps & React$1.RefAttributes<HTMLTableRowElement>>;
1315
+ /** Header cell. `scope` defaults to `col`; pass `scope="row"` for a row header in the body. */
1316
+ export declare const Th: React$1.ForwardRefExoticComponent<TableCellProps & React$1.RefAttributes<HTMLTableCellElement>>;
1317
+ /** Data cell. `numeric` right-aligns with tabular figures (money, counts). */
1318
+ export declare const Td: React$1.ForwardRefExoticComponent<TableCellProps & React$1.RefAttributes<HTMLTableCellElement>>;
1319
+ /** BottomNav — a phone tab bar: icon over a short label, a count or dot, the current page marked. Fixed to the bottom,
1320
+ * padded for the home indicator, with a spacer of the same height in the flow so nothing sits under it. Which
1321
+ * breakpoints show it is decided in CSS, so the server's HTML is already right and nothing shifts on hydration. */
1322
+ export declare const BottomNav: React$1.ForwardRefExoticComponent<BottomNavProps & React$1.RefAttributes<HTMLElement>>;
1323
+ /** Min-width breakpoints in px, mirroring the aura-bp-* tokens. */
1324
+ export declare const breakpoints: {
1325
+ sm: 640;
1326
+ md: 768;
1327
+ lg: 1024;
1328
+ xl: 1280;
1329
+ };
1330
+ /** The widest breakpoint the window currently meets: 'base' | 'sm' | 'md' | 'lg' | 'xl'. 'lg' during server render. */
1331
+ export declare function useBreakpoint(): Breakpoint;
1332
+ /** Pick a value for the current breakpoint from { base, sm, md, lg, xl } (falls back to the next smaller one). */
1333
+ export declare function useResponsive<T>(value: Responsive<T>): T | undefined;
1334
+ export declare const Surface: React$1.ForwardRefExoticComponent<SurfaceProps & React$1.RefAttributes<HTMLElement>>;
1335
+ /** Every built-in label. Function entries build the text from their arguments. */
1336
+ export interface AuraStrings {
1337
+ close: string;
1338
+ dismiss: string;
1339
+ dismissToast: string;
1340
+ showPassword: string;
1341
+ filters: string;
1342
+ search: string;
1343
+ clearFilters: string;
1344
+ results: (n: number) => string;
1345
+ commandMenu: string;
1346
+ commandPlaceholder: string;
1347
+ commandHint: string;
1348
+ errorSummary: (n: number) => string;
1349
+ notifications: string;
1350
+ mainNav: string;
1351
+ breadcrumb: string;
1352
+ navigation: string;
1353
+ openNav: string;
1354
+ collapseNav: string;
1355
+ expandNav: string;
1356
+ searching: string;
1357
+ noMatches: string;
1358
+ clear: (what?: string) => string;
1359
+ keepTyping: (total: number) => string;
1360
+ sortAsc: string;
1361
+ sortDesc: string;
1362
+ pin: string;
1363
+ unpin: string;
1364
+ moveLeft: string;
1365
+ moveRight: string;
1366
+ hideColumn: string;
1367
+ resetColumns: string;
1368
+ selectRows: string;
1369
+ selectAllRows: string;
1370
+ deselectAllRows: string;
1371
+ selectAll: string;
1372
+ selectRow: (k: React$1.ReactNode) => string;
1373
+ selectedCount: (c: number) => string;
1374
+ pinned: string;
1375
+ columnOptions: (label?: string) => string;
1376
+ column: (label?: string) => string;
1377
+ columns: string;
1378
+ showHideColumns: string;
1379
+ empty: string;
1380
+ loading: string;
1381
+ loadingRows: string;
1382
+ range: (a: number | string, b: number | string, total: number) => string;
1383
+ page: (p: number, total: number) => string;
1384
+ prevPage: string;
1385
+ nextPage: string;
1386
+ rowCount: (c: number) => string;
1387
+ totals: string;
1388
+ actions: string;
1389
+ optional: string;
1390
+ timePlaceholder: string;
1391
+ timeInvalid: string;
1392
+ timeOutOfRange: (a: number | string, b: number | string) => string;
1393
+ dropFiles: string;
1394
+ browse: string;
1395
+ browseOne: string;
1396
+ remove: (n: number | string) => string;
1397
+ fileTooBig: (max?: number | string) => string;
1398
+ fileWrongType: string;
1399
+ tooManyFiles: (n: number | string) => string;
1400
+ colorScheme: string;
1401
+ increase: string;
1402
+ decrease: string;
1403
+ stepDone: string;
1404
+ stepOf: (i: number, total: number) => string;
1405
+ schemeLight: string;
1406
+ schemeDark: string;
1407
+ schemeSystem: string;
1408
+ uploading: string;
1409
+ images: string;
1410
+ pagination: string;
1411
+ pageN: (p: number) => string;
1412
+ accepts: (list?: string, max?: number | string) => string;
1413
+ }
1414
+ export declare const STRINGS: {
1415
+ en: AuraStrings;
1416
+ th: AuraStrings;
1417
+ sv: AuraStrings;
1418
+ };
1419
+ /** What useAuraLocale returns. `locale` and `calendar` are null outside an AuraProvider. */
1420
+ export interface AuraLocaleValue {
1421
+ locale: "th" | "en" | "sv" | null;
1422
+ calendar: "buddhist" | "gregory" | null;
1423
+ strings: AuraStrings;
1424
+ /** The router link set on AuraProvider, if any. */
1425
+ linkComponent?: React$1.ElementType | null | undefined;
1426
+ /** The density set on the nearest AuraProvider that sets one (null: none, i.e. comfortable unless an ancestor's data-density says otherwise). */
1427
+ density?: "comfortable" | "compact" | null | undefined;
1428
+ /** The time zone set on the nearest AuraProvider that sets one (4.19). */
1429
+ timeZone?: string | null | undefined;
1430
+ }
1431
+ /** Sets the language of built-in labels (and the default date locale) for everything inside. */
1432
+ export declare function AuraProvider(props: AuraProviderProps): React$1.ReactElement;
1433
+ /** { locale, calendar, strings } from the nearest AuraProvider (English strings when there is none). */
1434
+ export declare function useAuraLocale(): AuraLocaleValue;
1435
+ /** The provider's density, for portals that render outside its wrapper. */
1436
+ export declare function useDensity(): "comfortable" | "compact" | undefined;
1437
+ export declare const Stat: React$1.ForwardRefExoticComponent<StatProps & React$1.RefAttributes<HTMLElement>>;
1438
+ /** 1536 → "1.5 KB". */
1439
+ export declare function formatBytes(n: number | null | undefined): string;
1440
+ /** Parse typed time: 9 · 09 · 930 · 0930 · 9:30 · 9.30 · 09.30 น. · 9:30 pm → "HH:mm" (24-hour) or null. */
1441
+ export declare function parseTime(text: string | null | undefined): string | null;
1442
+ export declare const TimePicker: React$1.ForwardRefExoticComponent<TimePickerProps & React$1.RefAttributes<HTMLInputElement>>;
1443
+ export declare const FileUpload: React$1.ForwardRefExoticComponent<FileUploadProps & React$1.RefAttributes<HTMLInputElement>>;
1444
+ /** WCAG contrast ratio of two #hex colours. */
1445
+ export declare function contrast(a: string, b: string): number;
1446
+ /** A 50–900 scale around one colour: same hue, AURA's lightness steps, chroma kept in gamut. */
1447
+ declare function scale(hex: string): Theme["brand"];
1448
+ /**
1449
+ * createTheme({ brand, signal?, primary?: 'ink' | 'brand', name? })
1450
+ * → { name, brand: {50…900}, signal: {50…900}|null, light: {token: #hex}, dark: {…}, checks: [{pair, ratio, target, pass}], ok, css(selector?) }
1451
+ */
1452
+ export declare function createTheme(opts: ThemeOptions): Theme;
1453
+ export interface ThemeStyleProps extends ThemeOptions {
1454
+ /** Scope the theme to this selector instead of the whole page (multi-tenant). */
1455
+ selector?: string | undefined;
1456
+ }
1457
+ export declare function ThemeStyle(props: ThemeStyleProps): React$1.ReactElement | null;
1458
+ /** `system` follows the operating system and changes with it. */
1459
+ export type ColorScheme = "light" | "dark" | "system";
1460
+ export interface ColorSchemeOptions {
1461
+ /** localStorage key for the choice. Default `aura-color-scheme`. */
1462
+ storageKey?: string | undefined;
1463
+ /** Used when nothing is saved. Default `system`. */
1464
+ defaultScheme?: ColorScheme | undefined;
1465
+ }
1466
+ /** The script ColorSchemeScript renders, as a string — for frameworks that want it in a raw <head> template. */
1467
+ export declare function colorSchemeScript(options?: ColorSchemeOptions): string;
1468
+ /** Put in <head>: applies the saved colour scheme before the page paints. Server-rendering safe. */
1469
+ export declare function ColorSchemeScript(props: ColorSchemeOptions & {
1470
+ /** Nonce for a nonce-based Content-Security-Policy (script-src 'nonce-…'). */
1471
+ nonce?: string | undefined;
1472
+ }): React$1.ReactElement;
1473
+ /** Current colour scheme and a setter. `resolved` is what is on screen (system resolved to light or dark). */
1474
+ export interface ColorSchemeState {
1475
+ scheme: ColorScheme;
1476
+ resolved: "light" | "dark";
1477
+ setScheme: (scheme: ColorScheme) => void;
1478
+ }
1479
+ /** Read and change the colour scheme. Every component using it stays in sync, and `system` follows OS changes. */
1480
+ export declare function useColorScheme(options?: ColorSchemeOptions): ColorSchemeState;
1481
+ export interface ColorSchemeToggleProps extends ColorSchemeOptions {
1482
+ /** Accessible name of the button. Default: the built-in "Colour scheme" label. */
1483
+ label?: string | undefined;
1484
+ }
1485
+ /** Icon button with a menu: Light, Dark, System. Shows a sun or a moon for what is on screen. */
1486
+ export declare function ColorSchemeToggle(props: ColorSchemeToggleProps): React$1.ReactElement;
1487
+ export declare const Badge: React$1.ForwardRefExoticComponent<BadgeProps & React$1.RefAttributes<HTMLSpanElement>>;
1488
+ export declare const Tag: React$1.ForwardRefExoticComponent<TagProps & React$1.RefAttributes<HTMLElement>>;
1489
+ export declare const Progress: React$1.ForwardRefExoticComponent<ProgressProps & React$1.RefAttributes<HTMLDivElement>>;
1490
+ export declare const Skeleton: React$1.ForwardRefExoticComponent<SkeletonProps & React$1.RefAttributes<HTMLSpanElement>>;
1491
+ export declare const EmptyState: React$1.ForwardRefExoticComponent<EmptyStateProps & React$1.RefAttributes<HTMLDivElement>>;
1492
+ export declare const Pagination: React$1.ForwardRefExoticComponent<PaginationProps & React$1.RefAttributes<HTMLElement>>;
1493
+ export declare const Accordion: React$1.ForwardRefExoticComponent<AccordionProps & React$1.RefAttributes<HTMLDivElement>>;
1494
+ export declare const Popover: React$1.ForwardRefExoticComponent<PopoverProps & React$1.RefAttributes<HTMLDivElement>>;
1495
+ /** Number input with thousands separators, +/− buttons and arrow keys (ARIA spinbutton). */
1496
+ export declare const NumberField: React$1.ForwardRefExoticComponent<NumberFieldProps & React$1.RefAttributes<HTMLInputElement>>;
1497
+ /** Progress through a multi-step flow. Completed steps can link back; the current one has aria-current="step". */
1498
+ export declare const Stepper: React$1.ForwardRefExoticComponent<StepperProps & React$1.RefAttributes<HTMLElement>>;
1499
+ /** A row of mutually exclusive choices that apply at once. A radio group: one Tab stop, arrow keys move and select. */
1500
+ export declare const SegmentedControl: React$1.ForwardRefExoticComponent<SegmentedControlProps & React$1.RefAttributes<HTMLDivElement>>;
1501
+
1502
+ export {
1503
+ defaultFilter as comboboxFilter,
1504
+ scale as brandScale,
1505
+ toneFor as statusTone,
1506
+ };
1507
+
1508
+ export {};