@jirawatpyk/aura-react 4.15.0 → 4.17.0

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/dist/index.d.ts CHANGED
@@ -1,39 +1,50 @@
1
1
  import * as React$1 from 'react';
2
2
 
3
3
  /** Button look. */
4
- export type ButtonVariant = "primary" | "secondary" | "creative" | "danger" | "danger-secondary";
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";
5
7
  /** AURA pill button. Enterprise (`primary`, `secondary`) for product UI; `creative` for marketing moments only. */
6
8
  export interface ButtonProps extends React$1.ButtonHTMLAttributes<HTMLButtonElement> {
7
- /** Visual variant. Default `primary`. `danger` (filled) and `danger-secondary` (outline) are for irreversible or destructive actions only — typically the confirm button of a `Dialog role="alertdialog"`. */
8
- variant?: ButtonVariant;
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;
9
11
  /** Label text — short, Title Case English or Thai. */
10
12
  children: React$1.ReactNode;
11
13
  /** Leading icon name (see `IconName`). Hidden while loading. */
12
- icon?: IconInput;
14
+ icon?: IconInput | undefined;
13
15
  /** Trailing icon name, e.g. `arrow-right` for forward actions. */
14
- iconRight?: IconInput;
16
+ iconRight?: IconInput | undefined;
15
17
  /** Shows a spinner in place of the leading icon, sets aria-busy and swallows clicks. Keeps the label and width. */
16
- loading?: boolean;
18
+ loading?: boolean | undefined;
17
19
  /** Fills its container and lets a long label wrap onto more lines (at least 44px tall) — phones, Thai and Swedish labels. */
18
- fullWidth?: boolean;
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;
19
23
  }
20
24
  /** A link that looks like a Button: give `Button` an `href` and it renders an `<a>` (navigation, not actions). */
21
25
  export interface ButtonLinkProps extends Omit<React$1.AnchorHTMLAttributes<HTMLAnchorElement>, "children"> {
22
26
  /** Where the link goes. With `href`, Button renders an `<a>` and its ref is the `<a>`. */
23
27
  href: string;
24
- /** Visual variant. Default `primary`. `danger` (filled) and `danger-secondary` (outline) are for irreversible or destructive actions only — typically the confirm button of a `Dialog role="alertdialog"`. */
25
- variant?: ButtonVariant;
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;
26
30
  /** Label text — say where it goes ("View Orders"), not "Click here". */
27
31
  children: React$1.ReactNode;
28
- icon?: IconInput;
32
+ icon?: IconInput | undefined;
29
33
  /** Trailing icon, e.g. `arrow-right`, or `external-link` with `target="_blank"`. */
30
- iconRight?: IconInput;
34
+ iconRight?: IconInput | undefined;
31
35
  /** Looks unavailable and can't be followed: no href, `aria-disabled`, out of the Tab order. */
32
- disabled?: boolean;
36
+ disabled?: boolean | undefined;
33
37
  /** Fills its container and lets a long label wrap (at least 44px tall). */
34
- fullWidth?: boolean;
38
+ fullWidth?: boolean | undefined;
39
+ /** `sm` is 32px with tighter padding. Default `md` (44px). */
40
+ size?: ButtonSize | undefined;
35
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. */
36
- linkComponent?: React$1.ElementType;
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;
37
48
  }
38
49
  export interface DataTableColumn {
39
50
  /** Key into each row object. */
@@ -41,34 +52,34 @@ export interface DataTableColumn {
41
52
  /** Header label (source style: UPPERCASE). */
42
53
  label: string;
43
54
  /** Fixed width in px; the last column usually takes the rest. */
44
- width?: number;
55
+ width?: number | undefined;
45
56
  /** Render the cell in the mono face (IDs). */
46
- mono?: boolean;
57
+ mono?: boolean | undefined;
47
58
  /** Render the value as a StatusPill (tone picked from the word). */
48
- pill?: boolean;
59
+ pill?: boolean | undefined;
49
60
  /** Override the tone for specific values, e.g. `{ 'QA': 'progress' }`. */
50
- tones?: Record<string, StatusTone>;
61
+ tones?: Record<string, StatusTone> | undefined;
51
62
  /** Header becomes a button cycling asc → desc → unsorted. */
52
- sortable?: boolean;
63
+ sortable?: boolean | undefined;
53
64
  /** Value to sort by, when not the cell value (dates, amounts). */
54
- sortValue?: (row: Record<string, any>) => string | number | null;
65
+ sortValue?: ((row: Record<string, any>) => string | number | null) | undefined;
55
66
  /** Custom cell content. */
56
- render?: (row: Record<string, any>) => React$1.ReactNode;
67
+ render?: ((row: Record<string, any>) => React$1.ReactNode) | undefined;
57
68
  /** Set false to keep a sized column fixed when the table is `resizable`. */
58
- resizable?: boolean;
69
+ resizable?: boolean | undefined;
59
70
  /** Resize limits in px. Defaults 64 / 480. For the flexible column, minWidth defaults to 160. */
60
- minWidth?: number;
61
- maxWidth?: number;
71
+ minWidth?: number | undefined;
72
+ maxWidth?: number | undefined;
62
73
  /** Start pinned to the left (needs a width). */
63
- pinned?: boolean;
74
+ pinned?: boolean | undefined;
64
75
  /** Start hidden (show it from the columns button). */
65
- hidden?: boolean;
76
+ hidden?: boolean | undefined;
66
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. */
67
- hideBelow?: number | "sm" | "md" | "lg" | "xl";
78
+ hideBelow?: number | "sm" | "md" | "lg" | "xl" | undefined;
68
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. */
69
- actions?: boolean;
80
+ actions?: boolean | undefined;
70
81
  /** `end` right-aligns header and cells (amounts, counts) and uses tabular figures. Default `start`. */
71
- align?: "start" | "end";
82
+ align?: "start" | "end" | undefined;
72
83
  }
73
84
  export interface DataTableSort {
74
85
  key: string;
@@ -76,84 +87,88 @@ export interface DataTableSort {
76
87
  }
77
88
  export interface DataTableEmpty {
78
89
  /** Default `inbox`; use `search` for "no matches". */
79
- icon?: IconInput;
90
+ icon?: IconInput | undefined;
80
91
  /** Default "Nothing here yet". */
81
- title?: string;
82
- description?: string;
92
+ title?: string | undefined;
93
+ description?: string | undefined;
83
94
  /** One action, usually a secondary Button. */
84
- action?: React$1.ReactNode;
95
+ action?: React$1.ReactNode | undefined;
85
96
  }
86
97
  /** Enterprise data table: 48px rows, hairline dividers, mono header band. */
87
98
  export interface DataTableProps {
88
99
  /** Defaults to ID · NAME · STATUS · OWNER (96 / 160 / 112 / auto px). */
89
- columns?: DataTableColumn[];
100
+ columns?: DataTableColumn[] | undefined;
90
101
  rows: Array<Record<string, React$1.ReactNode>>;
91
102
  /** Column key giving each row a unique React key. Default: the first column's key. */
92
- rowKey?: string;
103
+ rowKey?: string | undefined;
93
104
  /** Accessible name for the table. */
94
- label?: string;
105
+ label?: string | undefined;
95
106
  /** Controlled sort; pair with onSortChange. */
96
- sort?: DataTableSort | null;
107
+ sort?: DataTableSort | null | undefined;
97
108
  /** Initial sort when uncontrolled. */
98
- defaultSort?: DataTableSort | null;
99
- onSortChange?: (sort: DataTableSort | null) => void;
109
+ defaultSort?: DataTableSort | null | undefined;
110
+ onSortChange?: ((sort: DataTableSort | null) => void) | undefined;
100
111
  /** Adds a checkbox column. */
101
- selectable?: boolean;
112
+ selectable?: boolean | undefined;
102
113
  /** Controlled selection (row keys); pair with onSelectionChange. */
103
- selected?: Array<string | number>;
114
+ selected?: Array<string | number> | undefined;
104
115
  /** Initial selection when uncontrolled. */
105
- defaultSelected?: Array<string | number>;
106
- onSelectionChange?: (keys: Array<string | number>) => void;
116
+ defaultSelected?: Array<string | number> | undefined;
117
+ onSelectionChange?: ((keys: Array<string | number>) => void) | undefined;
107
118
  /** Shown when rows is empty. */
108
- empty?: DataTableEmpty;
119
+ empty?: DataTableEmpty | undefined;
109
120
  /** Rows per page; omit for no pagination. */
110
- pageSize?: number;
121
+ pageSize?: number | undefined;
111
122
  /** Controlled page (1-based); pair with onPageChange. */
112
- page?: number;
123
+ page?: number | undefined;
113
124
  /** Initial page when uncontrolled. Default 1. */
114
- defaultPage?: number;
115
- onPageChange?: (page: number) => void;
125
+ defaultPage?: number | undefined;
126
+ onPageChange?: ((page: number) => void) | undefined;
127
+ /** Sort and page in one callback (4.17): a sort click reports `{ sort, page: 1 }` once, a page change
128
+ * `{ sort, page }`. When set, onSortChange and onPageChange are not called for them, so an app that keeps both in
129
+ * the URL does one navigation per click. Pair with `sort` + `page` for controlled state. */
130
+ onStateChange?: ((state: DataTableState) => void) | undefined;
116
131
  /** Adds drag/keyboard resize handles to every column that has a width. */
117
- resizable?: boolean;
118
- onColumnResize?: (key: string, width: number) => void;
132
+ resizable?: boolean | undefined;
133
+ onColumnResize?: ((key: string, width: number) => void) | undefined;
119
134
  /** 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. */
120
- loading?: boolean;
135
+ loading?: boolean | undefined;
121
136
  /** Server mode: `rows` is already the current page, sorted by the server. The table doesn't sort or slice; it reports
122
137
  * sort and page through onSortChange / onPageChange (or getPageHref links). Pair with `totalRows` and `pageSize`. */
123
- manual?: boolean;
138
+ manual?: boolean | undefined;
124
139
  /** manual: rows across all pages (drives the page count, "1–25 of 312" and aria-rowcount). */
125
- totalRows?: number;
140
+ totalRows?: number | undefined;
126
141
  /** Makes each row a link: the first column's content renders as the provider's linkComponent (or `<a>`), and a click
127
142
  * or Enter anywhere on the row follows it. Ctrl/⌘-click opens a new tab as usual. */
128
- getRowHref?: (row: Record<string, any>) => string;
143
+ getRowHref?: ((row: Record<string, any>) => string) | undefined;
129
144
  /** Pager arrows become links to these URLs (search-param paging). Without onPageChange the link navigates. */
130
- getPageHref?: (page: number) => string;
145
+ getPageHref?: ((page: number) => string) | undefined;
131
146
  /** Router link for getRowHref / getPageHref. Default: AuraProvider's linkComponent, else `<a>`. */
132
- linkComponent?: React$1.ElementType;
147
+ linkComponent?: React$1.ElementType | undefined;
133
148
  /** Skeleton row count when there is no pageSize. Default 5. */
134
- skeletonRows?: number;
149
+ skeletonRows?: number | undefined;
135
150
  /** Called on row click or Enter. */
136
- onRowActivate?: (row: Record<string, any>) => void;
151
+ onRowActivate?: ((row: Record<string, any>) => void) | undefined;
137
152
  /** Fixed height in px: sticky header, and only the rows in view are rendered. */
138
- height?: number;
153
+ height?: number | undefined;
139
154
  /** Column menu on every header, drag-to-reorder, and the show/hide columns button. */
140
- columnControls?: boolean;
155
+ columnControls?: boolean | undefined;
141
156
  /** Set false to keep column controls but turn off reordering. */
142
- reorderable?: boolean;
157
+ reorderable?: boolean | undefined;
143
158
  /** Controlled column order (keys); pair with onColumnOrderChange. */
144
- columnOrder?: string[];
145
- onColumnOrderChange?: (keys: string[]) => void;
159
+ columnOrder?: string[] | undefined;
160
+ onColumnOrderChange?: ((keys: string[]) => void) | undefined;
146
161
  /** Controlled hidden columns (keys); pair with onHiddenColumnsChange. */
147
- hiddenColumns?: string[];
148
- onHiddenColumnsChange?: (keys: string[]) => void;
162
+ hiddenColumns?: string[] | undefined;
163
+ onHiddenColumnsChange?: ((keys: string[]) => void) | undefined;
149
164
  /** Controlled pinned columns (keys); pair with onPinnedColumnsChange. */
150
- pinnedColumns?: string[];
151
- onPinnedColumnsChange?: (keys: string[]) => void;
165
+ pinnedColumns?: string[] | undefined;
166
+ onPinnedColumnsChange?: ((keys: string[]) => void) | undefined;
152
167
  /** `compact` = 40px rows (48px on touch screens). Default: the surrounding density. */
153
- density?: "comfortable" | "compact";
168
+ density?: "comfortable" | "compact" | undefined;
154
169
  /** Container width in px below which rows render as stacked cards (phones). Try 640. Measured with ResizeObserver, so it follows the container, not the window. */
155
- stackBelow?: number;
156
- className?: string;
170
+ stackBelow?: number | undefined;
171
+ className?: string | undefined;
157
172
  }
158
173
  /** An AURA icon name, or any icon element (e.g. `<Building />` from lucide-react). AURA sizes it and hides it from screen readers. */
159
174
  export type IconInput = IconName | React$1.ReactElement;
@@ -163,34 +178,34 @@ export interface IconProps {
163
178
  /** A name from the set, or an icon element of your own (sized and styled the same way). */
164
179
  name: IconInput;
165
180
  /** `sm` 16 (default) · `md` 20 · `lg` 24, or a px number. */
166
- size?: "sm" | "md" | "lg" | number;
181
+ size?: "sm" | "md" | "lg" | number | undefined;
167
182
  /** Accessible name. Omit for decorative icons next to a text label (then aria-hidden). */
168
- label?: string;
183
+ label?: string | undefined;
169
184
  /** Default 2 (Lucide's). */
170
- strokeWidth?: number;
171
- className?: string;
185
+ strokeWidth?: number | undefined;
186
+ className?: string | undefined;
172
187
  }
173
188
  /** Creative surface with the AURA mesh and/or grain texture. Light in every theme; content in aura-on-texture. */
174
189
  export interface SurfaceProps extends React$1.HTMLAttributes<HTMLElement> {
175
190
  /** Default `mesh`. */
176
- texture?: "mesh" | "grain" | "mesh-grain";
191
+ texture?: "mesh" | "grain" | "mesh-grain" | undefined;
177
192
  /** Element to render. Default `div`. */
178
- as?: keyof React$1.JSX.IntrinsicElements;
179
- children?: React$1.ReactNode;
193
+ as?: keyof React$1.JSX.IntrinsicElements | undefined;
194
+ children?: React$1.ReactNode | undefined;
180
195
  }
181
196
  /** Sets the language of built-in labels (pagination, close buttons, empty states…) and the default date display for everything inside. */
182
197
  export interface AuraProviderProps {
183
198
  /** 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. */
184
- locale?: "th" | "en" | "sv";
199
+ locale?: "th" | "en" | "sv" | undefined;
185
200
  /** Default calendar for DatePicker / DateRangePicker / Calendar / formatDate callers that read it. Unset: `buddhist` (พ.ศ.) for `th`, `gregory` for `en` and `sv`. */
186
- calendar?: "buddhist" | "gregory";
201
+ calendar?: "buddhist" | "gregory" | undefined;
187
202
  /** Override individual strings. */
188
- strings?: Partial<Record<string, string | ((...args: any[]) => string)>>;
203
+ strings?: Partial<Record<string, string | ((...args: any[]) => string)>> | undefined;
189
204
  /** `compact`: 36px fields and buttons, 40px table rows — dense admin screens. Touch screens keep 44px. Default: comfortable (or an ancestor's `data-density`). */
190
- density?: "comfortable" | "compact";
205
+ density?: "comfortable" | "compact" | undefined;
191
206
  /** 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. */
192
- linkComponent?: React$1.ElementType;
193
- children?: React$1.ReactNode;
207
+ linkComponent?: React$1.ElementType | undefined;
208
+ children?: React$1.ReactNode | undefined;
194
209
  }
195
210
  export type StatusTone = "neutral" | "progress" | "ready" | "blocked";
196
211
  /** Status pill: tone fill + icon + the status word. Tone comes from the word unless given. */
@@ -198,49 +213,49 @@ export interface StatusPillProps {
198
213
  /** The status word shown, e.g. "In Progress". */
199
214
  children: React$1.ReactNode;
200
215
  /** Force a tone. Default: matched from the word (Ready/Done → ready, In Progress/In Review → progress, Blocked/Failed → blocked, anything else → neutral). */
201
- tone?: StatusTone;
202
- className?: string;
216
+ tone?: StatusTone | undefined;
217
+ className?: string | undefined;
203
218
  }
204
219
  /** 16px checkbox with 4px corners; ink when checked, a dash when indeterminate. */
205
220
  export interface CheckboxProps extends Omit<React$1.InputHTMLAttributes<HTMLInputElement>, "onChange" | "type" | "checked" | "defaultChecked"> {
206
221
  /** Controlled state; pair with onChange. Or use defaultChecked. */
207
- checked?: boolean;
208
- defaultChecked?: boolean;
209
- indeterminate?: boolean;
222
+ checked?: boolean | undefined;
223
+ defaultChecked?: boolean | undefined;
224
+ indeterminate?: boolean | undefined;
210
225
  /** Accessible name for a bare box (tables). Not needed when children give a visible label. */
211
- label?: string;
226
+ label?: string | undefined;
212
227
  /** Visible label beside the box (form use). */
213
- children?: React$1.ReactNode;
228
+ children?: React$1.ReactNode | undefined;
214
229
  /** Second line under the visible label (needs an id to be linked). */
215
- description?: React$1.ReactNode;
216
- onChange?: (checked: boolean) => void;
217
- disabled?: boolean;
218
- tabIndex?: number;
219
- className?: string;
230
+ description?: React$1.ReactNode | undefined;
231
+ onChange?: ((checked: boolean) => void) | undefined;
232
+ disabled?: boolean | undefined;
233
+ tabIndex?: number | undefined;
234
+ className?: string | undefined;
220
235
  }
221
236
  /** 32px round button holding one icon. */
222
237
  export interface IconButtonProps extends React$1.ButtonHTMLAttributes<HTMLButtonElement> {
223
238
  icon: IconInput;
224
239
  /** `danger` colours the icon and hover for a destructive action (Delete, Revoke). */
225
- tone?: "neutral" | "danger";
240
+ tone?: "neutral" | "danger" | undefined;
226
241
  /** Accessible name and tooltip (required). */
227
242
  label: string;
228
243
  /** Icon size. Default `sm` (16). */
229
- size?: "sm" | "md";
244
+ size?: "sm" | "md" | undefined;
230
245
  }
231
246
  export interface MenuItem {
232
- label?: string;
233
- icon?: IconInput;
247
+ label?: string | undefined;
248
+ icon?: IconInput | undefined;
234
249
  /** Present = a checkable item (menuitemcheckbox). */
235
- checked?: boolean;
236
- disabled?: boolean;
250
+ checked?: boolean | undefined;
251
+ disabled?: boolean | undefined;
237
252
  /** Keep the menu open after choosing (checkbox lists). */
238
- keepOpen?: boolean;
253
+ keepOpen?: boolean | undefined;
239
254
  /** Short right-aligned hint, e.g. a shortcut. */
240
- hint?: string;
255
+ hint?: string | undefined;
241
256
  /** A divider instead of an item. */
242
- separator?: boolean;
243
- onSelect?: () => void;
257
+ separator?: boolean | undefined;
258
+ onSelect?: (() => void) | undefined;
244
259
  }
245
260
  /** Popover list anchored to an element, rendered in a portal. */
246
261
  export interface MenuProps {
@@ -252,30 +267,30 @@ export interface MenuProps {
252
267
  /** Called on choose, Escape, Tab or outside click. `restoreFocus` is true for keyboard closes. */
253
268
  onClose: (restoreFocus: boolean) => void;
254
269
  /** Focus the first item on open. Default true; turn off only for static demos. */
255
- autoFocus?: boolean;
270
+ autoFocus?: boolean | undefined;
256
271
  }
257
272
  export interface FieldProps {
258
273
  /** Visible label; also the accessible name. */
259
274
  label: string;
260
275
  /** Helper line under the field (caption, fg-secondary). */
261
- hint?: React$1.ReactNode;
276
+ hint?: React$1.ReactNode | undefined;
262
277
  /** Replaces the hint, turns the edge fg-danger and sets aria-invalid. Write it as the fix. */
263
- error?: React$1.ReactNode;
278
+ error?: React$1.ReactNode | undefined;
264
279
  /** Adds a red asterisk and the native required attribute. */
265
- required?: boolean;
280
+ required?: boolean | undefined;
266
281
  /** Adds "(optional)" after the label. */
267
- optional?: boolean;
282
+ optional?: boolean | undefined;
268
283
  }
269
284
  export interface TextFieldProps extends FieldProps, Omit<React$1.InputHTMLAttributes<HTMLInputElement>, "required"> {
270
285
  /** Leading icon inside the field. */
271
- icon?: IconInput;
286
+ icon?: IconInput | undefined;
272
287
  /** Trailing unit, e.g. "THB". */
273
- suffix?: React$1.ReactNode;
288
+ suffix?: React$1.ReactNode | undefined;
274
289
  }
275
290
  /** A password input with a show/hide button. All TextField props; `ref` reaches the input (react-hook-form `register`). */
276
291
  export interface PasswordFieldProps extends Omit<TextFieldProps, "type" | "suffix"> {
277
292
  /** Set false to hide the show/hide button. Default true. */
278
- toggle?: boolean;
293
+ toggle?: boolean | undefined;
279
294
  }
280
295
  /** One entry of a FormErrorSummary: the field's `id` (or `name`) and what to fix. */
281
296
  export interface FormErrorItem {
@@ -286,16 +301,16 @@ export interface FormErrorItem {
286
301
  export interface FormErrorSummaryProps {
287
302
  /** A list, or react-hook-form's `formState.errors` as is (`{ name: { message } }`). Empty → renders nothing. */
288
303
  errors: FormErrorItem[] | Record<string, {
289
- message?: React$1.ReactNode;
304
+ message?: React$1.ReactNode | undefined;
290
305
  } | undefined>;
291
306
  /** Default "Fix N fields to continue" in the provider's language. */
292
- title?: React$1.ReactNode;
307
+ title?: React$1.ReactNode | undefined;
293
308
  /** 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. */
294
- onSelect?: (field: string) => void;
309
+ onSelect?: ((field: string) => void) | undefined;
295
310
  /** Change it on every submit (e.g. `formState.submitCount`) to move focus to the summary again. It also takes focus when errors first appear. */
296
311
  focusKey?: unknown;
297
- className?: string;
298
- id?: string;
312
+ className?: string | undefined;
313
+ id?: string | undefined;
299
314
  }
300
315
  /** An applied filter, shown as a removable chip. */
301
316
  export interface ActiveFilter {
@@ -306,26 +321,26 @@ export interface ActiveFilter {
306
321
  /** The row above a table: search, filter controls, applied-filter chips, result count and actions. Wraps below md. */
307
322
  export interface FilterBarProps {
308
323
  /** Search text (controlled). Omit `onSearchChange` to hide the search field. */
309
- search?: string;
324
+ search?: string | undefined;
310
325
  /** Called after typing pauses (`searchDelay`), and at once on Enter or clear — ready to write to the URL. */
311
- onSearchChange?: (value: string) => void;
326
+ onSearchChange?: ((value: string) => void) | undefined;
312
327
  /** ms to wait after the last keystroke. Default 300. */
313
- searchDelay?: number;
314
- searchLabel?: string;
315
- searchPlaceholder?: string;
328
+ searchDelay?: number | undefined;
329
+ searchLabel?: string | undefined;
330
+ searchPlaceholder?: string | undefined;
316
331
  /** Filter controls beside the search: Select, SegmentedControl, a Popover of options… */
317
- children?: React$1.ReactNode;
332
+ children?: React$1.ReactNode | undefined;
318
333
  /** Applied filters as chips, each with its own remove button. */
319
- filters?: ActiveFilter[];
334
+ filters?: ActiveFilter[] | undefined;
320
335
  /** Adds "Clear all" while any filter or search is set. */
321
- onClearAll?: () => void;
336
+ onClearAll?: (() => void) | undefined;
322
337
  /** A number ("312 results", announced politely) or your own node. */
323
- resultCount?: number | React$1.ReactNode;
338
+ resultCount?: number | React$1.ReactNode | undefined;
324
339
  /** Trailing slot: export, a New button… */
325
- actions?: React$1.ReactNode;
340
+ actions?: React$1.ReactNode | undefined;
326
341
  /** Accessible name of the region. Default "Filters". */
327
- label?: string;
328
- className?: string;
342
+ label?: string | undefined;
343
+ className?: string | undefined;
329
344
  }
330
345
  /** One command in the palette. */
331
346
  export interface CommandItem {
@@ -333,16 +348,16 @@ export interface CommandItem {
333
348
  /** Text shown and searched. */
334
349
  label: string;
335
350
  /** Items with the same group are listed together under its heading, in first-seen order. */
336
- group?: string;
337
- icon?: IconInput;
338
- description?: string;
351
+ group?: string | undefined;
352
+ icon?: IconInput | undefined;
353
+ description?: string | undefined;
339
354
  /** Extra words that find it ("invoice" → Billing). */
340
- keywords?: string[];
355
+ keywords?: string[] | undefined;
341
356
  /** A shortcut shown at the right, e.g. "G I". Display only. */
342
- shortcut?: string;
343
- disabled?: boolean;
357
+ shortcut?: string | undefined;
358
+ disabled?: boolean | undefined;
344
359
  /** Runs when chosen (Enter or click); the palette then closes. */
345
- onSelect?: () => void;
360
+ onSelect?: (() => void) | undefined;
346
361
  }
347
362
  /** A command palette: a modal search over commands and pages, grouped, fully keyboard-driven. */
348
363
  export interface CommandProps {
@@ -350,84 +365,94 @@ export interface CommandProps {
350
365
  onOpenChange: (open: boolean) => void;
351
366
  items: CommandItem[];
352
367
  /** Also called with the chosen item (after its own onSelect). */
353
- onSelect?: (item: CommandItem) => void;
368
+ onSelect?: ((item: CommandItem) => void) | undefined;
354
369
  /** Accessible name. Default "Command menu". */
355
- label?: string;
356
- placeholder?: string;
370
+ label?: string | undefined;
371
+ placeholder?: string | undefined;
357
372
  /** Default "No matches". */
358
- emptyText?: string;
373
+ emptyText?: string | undefined;
374
+ /** Shown when nothing matches, instead of `emptyText`: any content, e.g. a hint and a "Create member" button. (4.17) */
375
+ empty?: React$1.ReactNode | undefined;
359
376
  /** ⌘K / Ctrl+K toggles the palette from anywhere on the page. Default true. */
360
- hotkey?: boolean;
361
- /** Replace the Thai-aware default filter. */
362
- filter?: (item: CommandItem, query: string) => boolean;
363
- className?: string;
377
+ hotkey?: boolean | undefined;
378
+ /** Replace the Thai-aware default filter, or `false` to show `items` as given — for results your server already
379
+ * searched (4.17). */
380
+ filter?: ((item: CommandItem, query: string) => boolean) | false | undefined;
381
+ /** The search text, controlled (4.17). Pair with `onQueryChange`; fetch results for it and pass them as `items`. */
382
+ query?: string | undefined;
383
+ /** Called on every keystroke, and with "" when the palette closes. (4.17) */
384
+ onQueryChange?: ((query: string) => void) | undefined;
385
+ /** Results are on their way: a "Searching…" row, `aria-busy`, and the result count announced when they arrive. The
386
+ * current items stay listed meanwhile. (4.17) */
387
+ loading?: boolean | undefined;
388
+ className?: string | undefined;
364
389
  }
365
390
  export interface TextareaProps extends FieldProps, Omit<React$1.TextareaHTMLAttributes<HTMLTextAreaElement>, "required"> {
366
391
  }
367
392
  export type SelectOption = string | {
368
393
  value: string;
369
394
  label: string;
370
- disabled?: boolean;
395
+ disabled?: boolean | undefined;
371
396
  };
372
397
  export interface SelectProps extends FieldProps, Omit<React$1.SelectHTMLAttributes<HTMLSelectElement>, "required"> {
373
398
  options: SelectOption[];
374
399
  /** A disabled first option shown in fg-tertiary until something is chosen. */
375
- placeholder?: string;
376
- icon?: IconInput;
400
+ placeholder?: string | undefined;
401
+ icon?: IconInput | undefined;
377
402
  }
378
403
  export type ChoiceOption = string | {
379
404
  value: string;
380
405
  label: string;
381
- description?: string;
382
- disabled?: boolean;
406
+ description?: string | undefined;
407
+ disabled?: boolean | undefined;
383
408
  };
384
409
  export interface RadioGroupProps extends FieldProps {
385
410
  options: ChoiceOption[];
386
- value?: string;
387
- defaultValue?: string;
388
- onChange?: (value: string) => void;
389
- name?: string;
411
+ value?: string | undefined;
412
+ defaultValue?: string | undefined;
413
+ onChange?: ((value: string) => void) | undefined;
414
+ name?: string | undefined;
390
415
  /** Default `vertical`. */
391
- orientation?: "vertical" | "horizontal";
392
- disabled?: boolean;
393
- id?: string;
394
- className?: string;
416
+ orientation?: "vertical" | "horizontal" | undefined;
417
+ disabled?: boolean | undefined;
418
+ id?: string | undefined;
419
+ className?: string | undefined;
395
420
  }
396
421
  export interface SwitchProps {
397
- label?: string;
398
- description?: string;
399
- checked?: boolean;
400
- defaultChecked?: boolean;
401
- onChange?: (checked: boolean) => void;
402
- disabled?: boolean;
422
+ label?: string | undefined;
423
+ description?: string | undefined;
424
+ checked?: boolean | undefined;
425
+ defaultChecked?: boolean | undefined;
426
+ onChange?: ((checked: boolean) => void) | undefined;
427
+ disabled?: boolean | undefined;
403
428
  /** Required when there is no visible label. */
404
- "aria-label"?: string;
405
- id?: string;
406
- className?: string;
429
+ "aria-label"?: string | undefined;
430
+ id?: string | undefined;
431
+ className?: string | undefined;
407
432
  }
408
433
  export type FeedbackTone = "info" | "success" | "warning" | "danger";
409
434
  export interface AlertProps {
410
- tone?: FeedbackTone;
411
- title?: React$1.ReactNode;
412
- children?: React$1.ReactNode;
435
+ tone?: FeedbackTone | undefined;
436
+ title?: React$1.ReactNode | undefined;
437
+ children?: React$1.ReactNode | undefined;
413
438
  /** Usually a secondary Button. */
414
- action?: React$1.ReactNode;
439
+ action?: React$1.ReactNode | undefined;
415
440
  /** Adds a close button. */
416
- onDismiss?: () => void;
417
- className?: string;
441
+ onDismiss?: (() => void) | undefined;
442
+ className?: string | undefined;
418
443
  }
419
444
  export interface ToastOptions {
420
445
  title: string;
421
- description?: string;
422
- tone?: FeedbackTone;
446
+ description?: string | undefined;
447
+ tone?: FeedbackTone | undefined;
423
448
  action?: {
424
449
  label: string;
425
- onClick?: () => void;
426
- };
450
+ onClick?: (() => void) | undefined;
451
+ } | undefined;
427
452
  /** ms before it closes itself. Default 5000; Infinity keeps it until dismissed. */
428
- duration?: number;
453
+ duration?: number | undefined;
429
454
  /** Reuse an id to replace a toast in place (same position, timer restarts) — never a second toast. */
430
- id?: string;
455
+ id?: string | undefined;
431
456
  }
432
457
  /** Options for the shorthands (`toast.success(title, opts)` …): everything but the title and tone. */
433
458
  export type ToastShorthandOptions = Omit<ToastOptions, "title" | "tone">;
@@ -435,219 +460,221 @@ export interface TooltipProps {
435
460
  content: React$1.ReactNode;
436
461
  /** One focusable element. */
437
462
  children: React$1.ReactElement;
438
- side?: "top" | "bottom";
463
+ side?: "top" | "bottom" | undefined;
439
464
  /** Hover delay in ms. Default 400. */
440
- delay?: number;
465
+ delay?: number | undefined;
441
466
  /** Force open (demos, tests). */
442
- open?: boolean;
467
+ open?: boolean | undefined;
443
468
  }
444
469
  export interface FieldPropsPublic {
445
470
  label: string;
446
- hint?: React$1.ReactNode;
447
- error?: React$1.ReactNode;
448
- required?: boolean;
449
- optional?: boolean;
471
+ hint?: React$1.ReactNode | undefined;
472
+ error?: React$1.ReactNode | undefined;
473
+ required?: boolean | undefined;
474
+ optional?: boolean | undefined;
450
475
  }
451
476
  export interface DialogProps {
452
477
  open: boolean;
453
478
  onClose: () => void;
454
479
  title: React$1.ReactNode;
455
- description?: React$1.ReactNode;
456
- children?: React$1.ReactNode;
480
+ description?: React$1.ReactNode | undefined;
481
+ children?: React$1.ReactNode | undefined;
457
482
  /** Buttons, right-aligned: secondary Cancel, then the primary action. */
458
- footer?: React$1.ReactNode;
483
+ footer?: React$1.ReactNode | undefined;
459
484
  /** `sm` 400 · `md` 560 (default) · `lg` 720. */
460
- size?: "sm" | "md" | "lg";
485
+ size?: "sm" | "md" | "lg" | undefined;
461
486
  /** Default true. False hides the close button and ignores Escape and scrim clicks. */
462
- dismissible?: boolean;
487
+ dismissible?: boolean | undefined;
463
488
  /** Use `alertdialog` for destructive confirmations. */
464
- role?: "dialog" | "alertdialog";
489
+ role?: "dialog" | "alertdialog" | undefined;
465
490
  /** Default true. Turn off only for static demos. */
466
- autoFocus?: boolean;
467
- className?: string;
491
+ autoFocus?: boolean | undefined;
492
+ className?: string | undefined;
468
493
  }
469
494
  export interface CardProps {
470
- title?: React$1.ReactNode;
471
- description?: React$1.ReactNode;
495
+ title?: React$1.ReactNode | undefined;
496
+ description?: React$1.ReactNode | undefined;
472
497
  /** Top-right, usually an IconButton. */
473
- actions?: React$1.ReactNode;
474
- footer?: React$1.ReactNode;
475
- children?: React$1.ReactNode;
498
+ actions?: React$1.ReactNode | undefined;
499
+ footer?: React$1.ReactNode | undefined;
500
+ children?: React$1.ReactNode | undefined;
476
501
  /** Default `enterprise`. `creative` is for marketing and onboarding only. */
477
- variant?: "enterprise" | "creative";
502
+ variant?: "enterprise" | "creative" | undefined;
478
503
  /** Heading level of the title. Default 3 — use 2 when cards sit directly under the page h1. */
479
- headingLevel?: 2 | 3 | 4 | 5 | 6;
504
+ headingLevel?: 2 | 3 | 4 | 5 | 6 | undefined;
480
505
  /** Hover edge for clickable cards. */
481
- interactive?: boolean;
482
- as?: keyof React$1.JSX.IntrinsicElements;
483
- className?: string;
506
+ interactive?: boolean | undefined;
507
+ as?: keyof React$1.JSX.IntrinsicElements | undefined;
508
+ className?: string | undefined;
484
509
  /** id for the title element; the card is then labelled by it (aria-labelledby). */
485
- titleId?: string;
510
+ titleId?: string | undefined;
486
511
  }
487
512
  export interface TabItem {
488
513
  id: string;
489
514
  label: string;
490
- icon?: IconInput;
491
- count?: number;
492
- disabled?: boolean;
493
- content?: React$1.ReactNode;
515
+ icon?: IconInput | undefined;
516
+ count?: number | undefined;
517
+ disabled?: boolean | undefined;
518
+ content?: React$1.ReactNode | undefined;
494
519
  }
495
520
  export interface TabsProps {
496
521
  tabs: TabItem[];
497
522
  /** Accessible name for the tab list. */
498
523
  label: string;
499
- value?: string;
500
- defaultValue?: string;
501
- onChange?: (id: string) => void;
502
- className?: string;
524
+ value?: string | undefined;
525
+ defaultValue?: string | undefined;
526
+ onChange?: ((id: string) => void) | undefined;
527
+ className?: string | undefined;
503
528
  }
504
529
  export interface NavItem {
505
530
  id: string;
506
531
  label: string;
507
- icon?: IconInput;
508
- count?: number;
532
+ icon?: IconInput | undefined;
533
+ count?: number | undefined;
509
534
  /** Anything beside the label, e.g. a status dot or a `Badge`. */
510
- badge?: React$1.ReactNode;
511
- href?: string;
535
+ badge?: React$1.ReactNode | undefined;
536
+ href?: string | undefined;
512
537
  /** Makes this item a collapsible group of links. The group header is a button, never a link. */
513
- children?: NavItem[];
538
+ children?: NavItem[] | undefined;
514
539
  /** Start open. A group also opens by itself when one of its items is the current one. */
515
- defaultOpen?: boolean;
540
+ defaultOpen?: boolean | undefined;
516
541
  }
517
542
  export interface SideNavProps {
518
543
  sections?: Array<{
519
- title?: string;
544
+ title?: string | undefined;
520
545
  items: NavItem[];
521
- }>;
522
- items?: NavItem[];
523
- value?: string;
524
- defaultValue?: string;
525
- onChange?: (id: string) => void;
526
- header?: React$1.ReactNode;
527
- footer?: React$1.ReactNode;
546
+ }> | undefined;
547
+ items?: NavItem[] | undefined;
548
+ value?: string | undefined;
549
+ defaultValue?: string | undefined;
550
+ onChange?: ((id: string) => void) | undefined;
551
+ header?: React$1.ReactNode | undefined;
552
+ footer?: React$1.ReactNode | undefined;
528
553
  /** Default "Main". */
529
- label?: string;
554
+ label?: string | undefined;
530
555
  /** Router link for items with `href`; defaults to the AuraProvider's `linkComponent`, then `<a>`. */
531
- linkComponent?: React$1.ElementType;
556
+ linkComponent?: React$1.ElementType | undefined;
532
557
  /** Icon-only rail (`aura-sidenav-rail-width`, 64px). Labels show as tooltips and stay the accessible names; a group
533
558
  * expands the rail when clicked. Controlled; pair with `onCollapsedChange`. */
534
- collapsed?: boolean;
559
+ collapsed?: boolean | undefined;
535
560
  /** Starting state when `collapsed` isn't controlled. Default false. */
536
- defaultCollapsed?: boolean;
561
+ defaultCollapsed?: boolean | undefined;
537
562
  /** Called by the toggle button, and by a group clicked in the rail (with `false`). Save it to keep the choice. */
538
- onCollapsedChange?: (collapsed: boolean) => void;
563
+ onCollapsedChange?: ((collapsed: boolean) => void) | undefined;
539
564
  /** Adds a collapse / expand button at the bottom. AppShell hides it in its phone drawer. */
540
- collapsible?: boolean;
541
- className?: string;
565
+ collapsible?: boolean | undefined;
566
+ className?: string | undefined;
542
567
  }
543
568
  export interface BreadcrumbProps {
544
569
  /** Root first; the last item is the current page. */
545
570
  items: Array<{
546
571
  label: string;
547
- href?: string;
548
- onClick?: () => void;
572
+ href?: string | undefined;
573
+ onClick?: (() => void) | undefined;
549
574
  }>;
550
- label?: string;
551
- className?: string;
575
+ label?: string | undefined;
576
+ /** Your router's link (e.g. `Link` from `next/link`) for this component; defaults to AuraProvider's `linkComponent`, then `<a>`. */
577
+ linkComponent?: React$1.ElementType | undefined;
578
+ className?: string | undefined;
552
579
  }
553
580
  export interface AvatarProps {
554
581
  /** Accessible name; also gives the initials and a stable colour. */
555
582
  name: string;
556
- src?: string;
583
+ src?: string | undefined;
557
584
  /** `sm` 24 · `md` 32 (default) · `lg` 40. */
558
- size?: "sm" | "md" | "lg";
559
- status?: "online";
560
- className?: string;
585
+ size?: "sm" | "md" | "lg" | undefined;
586
+ status?: "online" | undefined;
587
+ className?: string | undefined;
561
588
  }
562
589
  export interface DropdownMenuProps {
563
590
  /** One element — usually a Button or IconButton. It gets aria-haspopup, aria-expanded and the click handler. */
564
591
  trigger: React$1.ReactElement;
565
592
  items: MenuItem[];
566
593
  /** Accessible name for the menu. */
567
- label?: string;
594
+ label?: string | undefined;
568
595
  }
569
596
  export interface ComboboxOption {
570
597
  value: string;
571
598
  label: string;
572
599
  /** Second line in the list; also searched. */
573
- description?: string;
600
+ description?: string | undefined;
574
601
  /** Extra search terms (English name, phone, code…). */
575
- keywords?: string[];
576
- disabled?: boolean;
602
+ keywords?: string[] | undefined;
603
+ disabled?: boolean | undefined;
577
604
  /** Leading icon in the list. */
578
- icon?: IconInput;
605
+ icon?: IconInput | undefined;
579
606
  }
580
607
  /** Combobox with `multiple`: pick any number; the picks show as removable chips in the field. */
581
608
  export interface ComboboxMultipleProps extends Omit<ComboboxProps, "value" | "defaultValue" | "onChange" | "clearable"> {
582
609
  multiple: true;
583
610
  /** Selected option values, in the order they were picked (controlled). */
584
- value?: string[];
585
- defaultValue?: string[];
586
- onChange?: (value: string[]) => void;
611
+ value?: string[] | undefined;
612
+ defaultValue?: string[] | undefined;
613
+ onChange?: ((value: string[]) => void) | undefined;
587
614
  /** Clear-all button while anything is selected. Default true. */
588
- clearable?: boolean;
615
+ clearable?: boolean | undefined;
589
616
  /** Most picks allowed; further options are disabled. */
590
- max?: number;
617
+ max?: number | undefined;
591
618
  }
592
619
  export interface ComboboxProps extends FieldProps {
593
620
  options: Array<ComboboxOption | string>;
594
621
  /** Selected option value (controlled). */
595
- value?: string | null;
596
- defaultValue?: string | null;
597
- onChange?: (value: string | null) => void;
598
- id?: string;
599
- name?: string;
600
- placeholder?: string;
601
- disabled?: boolean;
602
- readOnly?: boolean;
622
+ value?: string | null | undefined;
623
+ defaultValue?: string | null | undefined;
624
+ onChange?: ((value: string | null) => void) | undefined;
625
+ id?: string | undefined;
626
+ name?: string | undefined;
627
+ placeholder?: string | undefined;
628
+ disabled?: boolean | undefined;
629
+ readOnly?: boolean | undefined;
603
630
  /** Leading icon. Default `search`. */
604
- icon?: IconInput;
631
+ icon?: IconInput | undefined;
605
632
  /** Clear button while a value is selected (Escape clears too). Default true. */
606
- clearable?: boolean;
633
+ clearable?: boolean | undefined;
607
634
  /** Server-side search: called with the typed text; the component stops filtering and shows `options` as given. */
608
- onSearch?: (query: string) => void;
609
- loading?: boolean;
610
- loadingText?: string;
611
- emptyText?: string;
635
+ onSearch?: ((query: string) => void) | undefined;
636
+ loading?: boolean | undefined;
637
+ loadingText?: string | undefined;
638
+ emptyText?: string | undefined;
612
639
  /** Max options rendered. Default 200 — narrow with typing beyond that. */
613
- limit?: number;
640
+ limit?: number | undefined;
614
641
  /** Replace the Thai-aware default filter (label, description, keywords). */
615
- filter?: (option: ComboboxOption, query: string) => boolean;
616
- className?: string;
642
+ filter?: ((option: ComboboxOption, query: string) => boolean) | undefined;
643
+ className?: string | undefined;
617
644
  }
618
645
  /** Number input: thousands separators, +/− buttons, arrow keys, min/max/step, prefix/suffix (฿, %). */
619
646
  export interface NumberFieldProps extends FieldProps {
620
647
  /** The number (controlled). `null` = empty. */
621
- value?: number | null;
622
- defaultValue?: number | null;
648
+ value?: number | null | undefined;
649
+ defaultValue?: number | null | undefined;
623
650
  /** Called with the parsed number (or null when emptied) as the person types, and with the clamped value on blur. */
624
- onChange?: (value: number | null) => void;
625
- min?: number;
626
- max?: number;
651
+ onChange?: ((value: number | null) => void) | undefined;
652
+ min?: number | undefined;
653
+ max?: number | undefined;
627
654
  /** Arrow keys and buttons move by this. Default 1. PageUp/PageDown move 10×. */
628
- step?: number;
655
+ step?: number | undefined;
629
656
  /** Decimal places shown and kept. Default: 0 when step is whole, else step's decimals. */
630
- decimals?: number;
657
+ decimals?: number | undefined;
631
658
  /** Text before the number, e.g. `฿`. */
632
- prefix?: React$1.ReactNode;
659
+ prefix?: React$1.ReactNode | undefined;
633
660
  /** Text after the number, e.g. `%` or `ชิ้น`. */
634
- suffix?: React$1.ReactNode;
661
+ suffix?: React$1.ReactNode | undefined;
635
662
  /** +/− buttons beside the number. Default true. */
636
- stepper?: boolean;
637
- id?: string;
638
- name?: string;
639
- placeholder?: string;
640
- disabled?: boolean;
641
- readOnly?: boolean;
642
- className?: string;
643
- onBlur?: React$1.FocusEventHandler<HTMLInputElement>;
663
+ stepper?: boolean | undefined;
664
+ id?: string | undefined;
665
+ name?: string | undefined;
666
+ placeholder?: string | undefined;
667
+ disabled?: boolean | undefined;
668
+ readOnly?: boolean | undefined;
669
+ className?: string | undefined;
670
+ onBlur?: React$1.FocusEventHandler<HTMLInputElement> | undefined;
644
671
  }
645
672
  /** One step of a Stepper. */
646
673
  export interface StepItem {
647
674
  id: string;
648
675
  label: React$1.ReactNode;
649
676
  /** Short line under the label, e.g. what the step asks for. */
650
- description?: React$1.ReactNode;
677
+ description?: React$1.ReactNode | undefined;
651
678
  }
652
679
  /** Progress through a multi-step flow (wizard, checkout, booking). */
653
680
  export interface StepperProps {
@@ -655,313 +682,318 @@ export interface StepperProps {
655
682
  /** id of the step the person is on. Steps before it are completed. */
656
683
  current: string;
657
684
  /** Accessible name of the list. Default: none (give one when the page has several). */
658
- label?: string;
685
+ label?: string | undefined;
659
686
  /** Makes completed steps buttons that go back to them. Upcoming steps never are. */
660
- onStepClick?: (id: string) => void;
687
+ onStepClick?: ((id: string) => void) | undefined;
661
688
  /** Default `horizontal`. Below `sm` a horizontal stepper shows only the current step ("Step 2 of 4"). */
662
- orientation?: "horizontal" | "vertical";
663
- className?: string;
689
+ orientation?: "horizontal" | "vertical" | undefined;
690
+ className?: string | undefined;
664
691
  }
665
692
  export interface SegmentedOption {
666
693
  value: string;
667
694
  label: string;
668
- icon?: IconInput;
695
+ icon?: IconInput | undefined;
669
696
  /** Show only the icon; `label` becomes its accessible name and tooltip. */
670
- iconOnly?: boolean;
671
- disabled?: boolean;
697
+ iconOnly?: boolean | undefined;
698
+ disabled?: boolean | undefined;
672
699
  }
673
700
  /** A row of 2–5 mutually exclusive choices that apply at once (view, period, unit). A radio group underneath. */
674
701
  export interface SegmentedControlProps {
675
702
  /** Accessible name of the group, e.g. "View". Required. */
676
703
  label: string;
677
704
  options: Array<SegmentedOption | string>;
678
- value?: string;
679
- defaultValue?: string;
680
- onChange?: (value: string) => void;
705
+ value?: string | undefined;
706
+ defaultValue?: string | undefined;
707
+ onChange?: ((value: string) => void) | undefined;
681
708
  /** `md` (default, 36px) or `sm` (28px) for toolbars. */
682
- size?: "sm" | "md";
709
+ size?: "sm" | "md" | undefined;
683
710
  /** Stretch across the container, segments equal width. */
684
- fullWidth?: boolean;
685
- disabled?: boolean;
686
- id?: string;
687
- className?: string;
711
+ fullWidth?: boolean | undefined;
712
+ disabled?: boolean | undefined;
713
+ id?: string | undefined;
714
+ className?: string | undefined;
688
715
  }
689
716
  /** ISO date string, `YYYY-MM-DD` (Gregorian — the era is display only). */
690
717
  export type ISODate = string;
691
718
  export interface DateDisplayOptions {
692
719
  /** Components: the AuraProvider's locale, else `en`. `formatDate()` (no provider to read): `th` unless given. */
693
- locale?: "th" | "en" | "sv";
720
+ locale?: "th" | "en" | "sv" | undefined;
694
721
  /** `buddhist` (พ.ศ.; default for th) or `gregory` (ค.ศ.; default for en and sv). */
695
- calendar?: "buddhist" | "gregory";
722
+ calendar?: "buddhist" | "gregory" | undefined;
696
723
  }
697
724
  export interface CalendarProps extends DateDisplayOptions {
698
- start?: ISODate | null;
699
- end?: ISODate | null;
700
- focus?: ISODate | null;
701
- range?: boolean;
702
- min?: ISODate;
703
- max?: ISODate;
704
- isDateDisabled?: (iso: ISODate) => boolean;
725
+ start?: ISODate | null | undefined;
726
+ end?: ISODate | null | undefined;
727
+ focus?: ISODate | null | undefined;
728
+ range?: boolean | undefined;
729
+ min?: ISODate | undefined;
730
+ max?: ISODate | undefined;
731
+ isDateDisabled?: ((iso: ISODate) => boolean) | undefined;
705
732
  /** 0 = Sunday (Thai default), 1 = Monday. */
706
- weekStartsOn?: 0 | 1;
707
- onSelect?: (iso: ISODate | null) => void;
733
+ weekStartsOn?: 0 | 1 | undefined;
734
+ onSelect?: ((iso: ISODate | null) => void) | undefined;
708
735
  /** Adds a Clear link to the footer. */
709
- onClear?: () => void;
736
+ onClear?: (() => void) | undefined;
710
737
  /** false hides the Today / Clear footer. */
711
- footer?: boolean;
738
+ footer?: boolean | undefined;
712
739
  /** Default true: focuses the selected (or today's) day on mount. */
713
- autoFocus?: boolean;
740
+ autoFocus?: boolean | undefined;
714
741
  }
715
742
  export interface DateFieldProps extends FieldProps, DateDisplayOptions {
716
- id?: string;
717
- name?: string;
718
- placeholder?: string;
719
- disabled?: boolean;
743
+ id?: string | undefined;
744
+ name?: string | undefined;
745
+ placeholder?: string | undefined;
746
+ disabled?: boolean | undefined;
720
747
  /** Clear button while there is a value. Default true. */
721
- clearable?: boolean;
722
- min?: ISODate;
723
- max?: ISODate;
724
- isDateDisabled?: (iso: ISODate) => boolean;
725
- weekStartsOn?: 0 | 1;
726
- className?: string;
748
+ clearable?: boolean | undefined;
749
+ min?: ISODate | undefined;
750
+ max?: ISODate | undefined;
751
+ isDateDisabled?: ((iso: ISODate) => boolean) | undefined;
752
+ weekStartsOn?: 0 | 1 | undefined;
753
+ className?: string | undefined;
727
754
  }
728
755
  export interface DatePickerProps extends DateFieldProps {
729
- value?: ISODate | null;
730
- defaultValue?: ISODate | null;
731
- onChange?: (value: ISODate | null) => void;
756
+ value?: ISODate | null | undefined;
757
+ defaultValue?: ISODate | null | undefined;
758
+ onChange?: ((value: ISODate | null) => void) | undefined;
732
759
  }
733
760
  export interface DateRange {
734
761
  start: ISODate | null;
735
762
  end: ISODate | null;
736
763
  }
737
764
  export interface DateRangePickerProps extends DateFieldProps {
738
- value?: DateRange;
739
- defaultValue?: DateRange;
740
- onChange?: (value: DateRange) => void;
765
+ value?: DateRange | undefined;
766
+ defaultValue?: DateRange | undefined;
767
+ onChange?: ((value: DateRange) => void) | undefined;
741
768
  }
742
769
  export interface DrawerProps {
743
770
  open: boolean;
744
771
  onClose: () => void;
745
772
  /** Default `right`. */
746
- side?: "right" | "left";
773
+ side?: "right" | "left" | undefined;
747
774
  /** sm 360 · md 480 (default) · lg 640 · nav = SideNav width. Full width below 640px. */
748
- size?: "sm" | "md" | "lg" | "nav";
749
- title?: string;
750
- description?: React$1.ReactNode;
751
- children?: React$1.ReactNode;
775
+ size?: "sm" | "md" | "lg" | "nav" | undefined;
776
+ title?: string | undefined;
777
+ description?: React$1.ReactNode | undefined;
778
+ children?: React$1.ReactNode | undefined;
752
779
  /** Buttons, right-aligned; stacked on phones. */
753
- footer?: React$1.ReactNode;
780
+ footer?: React$1.ReactNode | undefined;
754
781
  /** Scrim click and Escape close it. Default true. */
755
- dismissible?: boolean;
782
+ dismissible?: boolean | undefined;
756
783
  /** Default true: focus moves to the element with `data-autofocus`, else the first control in the body. False only for static demos. */
757
- autoFocus?: boolean;
784
+ autoFocus?: boolean | undefined;
758
785
  /** Needed when there is no title. */
759
- "aria-label"?: string;
760
- className?: string;
786
+ "aria-label"?: string | undefined;
787
+ className?: string | undefined;
761
788
  }
762
789
  export type Breakpoint = "base" | "sm" | "md" | "lg" | "xl";
763
790
  export type Responsive<T> = T | Partial<Record<Breakpoint, T>>;
764
791
  /** Spacing step (aura-space-N) or any CSS length. */
765
792
  export type Space = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 8 | 10 | 12 | 16 | string;
766
793
  export interface StackProps {
767
- direction?: Responsive<"row" | "column">;
768
- gap?: Responsive<Space>;
794
+ direction?: Responsive<"row" | "column"> | undefined;
795
+ gap?: Responsive<Space> | undefined;
769
796
  /** Cross-axis alignment; responsive like direction ({ base: 'stretch', sm: 'flex-end' }). */
770
- align?: Responsive<React$1.CSSProperties["alignItems"]>;
771
- justify?: React$1.CSSProperties["justifyContent"];
772
- wrap?: boolean;
773
- as?: keyof React$1.JSX.IntrinsicElements;
774
- className?: string;
775
- style?: React$1.CSSProperties;
776
- children?: React$1.ReactNode;
797
+ align?: Responsive<React$1.CSSProperties["alignItems"]> | undefined;
798
+ justify?: React$1.CSSProperties["justifyContent"] | undefined;
799
+ wrap?: boolean | undefined;
800
+ as?: keyof React$1.JSX.IntrinsicElements | undefined;
801
+ className?: string | undefined;
802
+ style?: React$1.CSSProperties | undefined;
803
+ children?: React$1.ReactNode | undefined;
777
804
  }
778
805
  export interface GridProps {
779
- columns?: Responsive<number>;
806
+ columns?: Responsive<number> | undefined;
780
807
  /** Fit as many columns as there is room for, each at least this wide (px). Overrides columns. */
781
- minItemWidth?: number;
782
- gap?: Responsive<Space>;
783
- as?: keyof React$1.JSX.IntrinsicElements;
784
- className?: string;
785
- style?: React$1.CSSProperties;
786
- children?: React$1.ReactNode;
808
+ minItemWidth?: number | undefined;
809
+ gap?: Responsive<Space> | undefined;
810
+ as?: keyof React$1.JSX.IntrinsicElements | undefined;
811
+ className?: string | undefined;
812
+ style?: React$1.CSSProperties | undefined;
813
+ children?: React$1.ReactNode | undefined;
787
814
  }
788
815
  export interface AppShellProps {
789
816
  /** Usually a SideNav. Fixed from 1024px up; in a Drawer behind a menu button below. */
790
- nav?: React$1.ReactElement;
817
+ nav?: React$1.ReactElement | undefined;
791
818
  /** Top bar content (title, search, account menu). */
792
- header?: React$1.ReactNode;
793
- children?: React$1.ReactNode;
794
- navLabel?: string;
795
- menuLabel?: string;
819
+ header?: React$1.ReactNode | undefined;
820
+ children?: React$1.ReactNode | undefined;
821
+ navLabel?: string | undefined;
822
+ menuLabel?: string | undefined;
796
823
  /** id of `<main>`, for a skip link. Default `main`. */
797
- mainId?: string;
798
- className?: string;
824
+ mainId?: string | undefined;
825
+ className?: string | undefined;
799
826
  }
800
827
  export interface StatChange {
801
828
  /** Shown as written, e.g. "+12%" or "−3". */
802
829
  value: React$1.ReactNode;
803
- direction?: "up" | "down" | "flat";
830
+ direction?: "up" | "down" | "flat" | undefined;
804
831
  /** Default: up = positive, down = negative. Set it when a rise is bad (cancellations, wait time). */
805
- tone?: "positive" | "negative" | "neutral";
832
+ tone?: "positive" | "negative" | "neutral" | undefined;
806
833
  /** e.g. "vs last month". */
807
- label?: React$1.ReactNode;
834
+ label?: React$1.ReactNode | undefined;
808
835
  }
809
836
  export interface StatProps {
837
+ /** Your router's link (e.g. `Link` from `next/link`) for this component; defaults to AuraProvider's `linkComponent`, then `<a>`. */
838
+ linkComponent?: React$1.ElementType | undefined;
810
839
  label: React$1.ReactNode;
811
- value?: React$1.ReactNode;
840
+ value?: React$1.ReactNode | undefined;
812
841
  /** Small unit after the value ("งาน", "คน", "%"). */
813
- unit?: React$1.ReactNode;
814
- change?: StatChange;
815
- caption?: React$1.ReactNode;
816
- icon?: IconInput;
842
+ unit?: React$1.ReactNode | undefined;
843
+ change?: StatChange | undefined;
844
+ caption?: React$1.ReactNode | undefined;
845
+ icon?: IconInput | undefined;
817
846
  /** Skeleton in place of the value. */
818
- loading?: boolean;
847
+ loading?: boolean | undefined;
819
848
  /** Makes the whole card a link or a button (drill-down). */
820
- href?: string;
821
- onClick?: () => void;
822
- className?: string;
849
+ href?: string | undefined;
850
+ onClick?: (() => void) | undefined;
851
+ className?: string | undefined;
823
852
  }
824
853
  export interface TimePickerProps extends FieldProps {
825
854
  /** "HH:mm", 24-hour. */
826
- value?: string | null;
827
- defaultValue?: string | null;
828
- onChange?: (value: string | null) => void;
855
+ value?: string | null | undefined;
856
+ defaultValue?: string | null | undefined;
857
+ onChange?: ((value: string | null) => void) | undefined;
829
858
  /** Minutes between listed slots. Default 30. */
830
- step?: number;
859
+ step?: number | undefined;
831
860
  /** Earliest and latest allowed times, "HH:mm". Typed times outside them are refused with a message. */
832
- min?: string;
833
- max?: string;
834
- isTimeDisabled?: (time: string) => boolean;
861
+ min?: string | undefined;
862
+ max?: string | undefined;
863
+ isTimeDisabled?: ((time: string) => boolean) | undefined;
835
864
  /** Slot to scroll to when empty (e.g. "09:00"). Default: min. */
836
- suggest?: string;
865
+ suggest?: string | undefined;
837
866
  /** Clear button while there is a value. Default true. */
838
- clearable?: boolean;
839
- id?: string;
840
- name?: string;
841
- placeholder?: string;
842
- disabled?: boolean;
843
- readOnly?: boolean;
844
- className?: string;
867
+ clearable?: boolean | undefined;
868
+ id?: string | undefined;
869
+ name?: string | undefined;
870
+ placeholder?: string | undefined;
871
+ disabled?: boolean | undefined;
872
+ readOnly?: boolean | undefined;
873
+ className?: string | undefined;
845
874
  }
846
875
  export interface UploadItem {
847
876
  id: string;
848
877
  /** The browser File (absent for files already on the server). */
849
- file?: File;
878
+ file?: File | undefined;
850
879
  name: string;
851
- size?: number;
852
- type?: string;
880
+ size?: number | undefined;
881
+ type?: string | undefined;
853
882
  /** ready = picked, not sent yet. Set uploading/done yourself while sending. */
854
883
  status: "ready" | "uploading" | "done" | "error";
855
884
  /** 0–100 while uploading. */
856
- progress?: number;
857
- error?: string;
885
+ progress?: number | undefined;
886
+ error?: string | undefined;
858
887
  /** For files already stored (edit forms). */
859
- url?: string;
888
+ url?: string | undefined;
860
889
  }
861
890
  export interface FileUploadProps extends FieldProps {
862
- value?: UploadItem[];
863
- defaultValue?: UploadItem[];
864
- onChange?: (items: UploadItem[]) => void;
865
- onRemove?: (item: UploadItem) => void;
891
+ value?: UploadItem[] | undefined;
892
+ defaultValue?: UploadItem[] | undefined;
893
+ onChange?: ((items: UploadItem[]) => void) | undefined;
894
+ onRemove?: ((item: UploadItem) => void) | undefined;
866
895
  /** Same syntax as `<input accept>`: "image/*,.pdf". Checked on drop too. */
867
- accept?: string;
868
- multiple?: boolean;
896
+ accept?: string | undefined;
897
+ multiple?: boolean | undefined;
869
898
  /** Bytes per file. */
870
- maxSize?: number;
899
+ maxSize?: number | undefined;
871
900
  /** With multiple. */
872
- maxFiles?: number;
873
- id?: string;
874
- name?: string;
875
- disabled?: boolean;
876
- className?: string;
901
+ maxFiles?: number | undefined;
902
+ id?: string | undefined;
903
+ name?: string | undefined;
904
+ disabled?: boolean | undefined;
905
+ className?: string | undefined;
877
906
  }
878
907
  export type Tone = "neutral" | "accent" | "success" | "warning" | "danger";
879
908
  export interface BadgeProps extends React$1.HTMLAttributes<HTMLSpanElement> {
880
- tone?: Tone;
909
+ tone?: Tone | undefined;
881
910
  /** soft (default) · solid · outline */
882
- variant?: "soft" | "solid" | "outline";
883
- icon?: IconInput;
911
+ variant?: "soft" | "solid" | "outline" | undefined;
912
+ icon?: IconInput | undefined;
884
913
  }
885
914
  export interface TagProps extends Omit<React$1.HTMLAttributes<HTMLElement>, "onClick"> {
886
915
  children: React$1.ReactNode;
887
- icon?: IconInput;
916
+ icon?: IconInput | undefined;
888
917
  /** Adds a remove button (applied filters, chosen people). */
889
- onRemove?: () => void;
890
- removeLabel?: string;
918
+ onRemove?: (() => void) | undefined;
919
+ removeLabel?: string | undefined;
891
920
  /** Makes it a toggle chip (filter chips): renders a button with aria-pressed. */
892
- selected?: boolean;
893
- onClick?: (e: React$1.MouseEvent<HTMLButtonElement>) => void;
894
- disabled?: boolean;
921
+ selected?: boolean | undefined;
922
+ onClick?: ((e: React$1.MouseEvent<HTMLButtonElement>) => void) | undefined;
923
+ disabled?: boolean | undefined;
895
924
  }
896
925
  export interface ProgressProps {
897
926
  /** Omit for indeterminate. */
898
- value?: number;
899
- max?: number;
900
- label?: React$1.ReactNode;
901
- "aria-label"?: string;
902
- showValue?: boolean;
927
+ value?: number | undefined;
928
+ max?: number | undefined;
929
+ label?: React$1.ReactNode | undefined;
930
+ "aria-label"?: string | undefined;
931
+ showValue?: boolean | undefined;
903
932
  /** Replaces the % text, e.g. "3 of 5 files". Also read out as aria-valuetext. */
904
- valueLabel?: React$1.ReactNode;
905
- hint?: React$1.ReactNode;
906
- tone?: Tone;
907
- size?: "sm" | "md";
908
- id?: string;
909
- className?: string;
933
+ valueLabel?: React$1.ReactNode | undefined;
934
+ hint?: React$1.ReactNode | undefined;
935
+ tone?: Tone | undefined;
936
+ size?: "sm" | "md" | undefined;
937
+ id?: string | undefined;
938
+ className?: string | undefined;
910
939
  }
911
940
  export interface SkeletonProps {
912
- variant?: "text" | "rect" | "circle";
941
+ variant?: "text" | "rect" | "circle" | undefined;
913
942
  /** text only: number of lines (the last is shorter). */
914
- lines?: number;
915
- width?: number | string;
916
- height?: number | string;
943
+ lines?: number | undefined;
944
+ width?: number | string | undefined;
945
+ height?: number | string | undefined;
917
946
  /** circle diameter. */
918
- size?: number;
919
- className?: string;
947
+ size?: number | undefined;
948
+ className?: string | undefined;
920
949
  }
921
950
  export interface EmptyStateProps {
922
951
  title: React$1.ReactNode;
923
- description?: React$1.ReactNode;
924
- icon?: IconInput;
952
+ description?: React$1.ReactNode | undefined;
953
+ icon?: IconInput | undefined;
925
954
  /** One or two buttons. */
926
- action?: React$1.ReactNode;
927
- size?: "sm" | "md";
928
- bordered?: boolean;
929
- headingLevel?: 2 | 3 | 4 | 5 | 6;
930
- className?: string;
955
+ action?: React$1.ReactNode | undefined;
956
+ size?: "sm" | "md" | undefined;
957
+ bordered?: boolean | undefined;
958
+ headingLevel?: 2 | 3 | 4 | 5 | 6 | undefined;
959
+ className?: string | undefined;
931
960
  }
932
961
  export interface PaginationProps {
933
962
  pageCount: number;
934
963
  /** 1-based, controlled; pair with onChange. Or defaultPage. */
935
- page?: number;
936
- defaultPage?: number;
937
- onChange?: (page: number) => void;
964
+ page?: number | undefined;
965
+ defaultPage?: number | undefined;
966
+ onChange?: ((page: number) => void) | undefined;
938
967
  /** Pages shown each side of the current one. Default 1. */
939
- siblingCount?: number;
940
- /** Render real links (SEO, open in new tab); onChange still runs for client routing. */
941
- getHref?: (page: number) => string;
942
- label?: string;
943
- className?: string;
968
+ siblingCount?: number | undefined;
969
+ /** Render real links — page numbers and the previous / next arrows (4.17) — through your router's link. With
970
+ * `onChange` too, onChange runs instead of following the link. */
971
+ getHref?: ((page: number) => string) | undefined;
972
+ label?: string | undefined;
973
+ /** Your router's link (e.g. `Link` from `next/link`) for this component; defaults to AuraProvider's `linkComponent`, then `<a>`. */
974
+ linkComponent?: React$1.ElementType | undefined;
975
+ className?: string | undefined;
944
976
  }
945
977
  export interface AccordionItem {
946
978
  id: string;
947
979
  title: React$1.ReactNode;
948
- description?: React$1.ReactNode;
980
+ description?: React$1.ReactNode | undefined;
949
981
  content: React$1.ReactNode;
950
- icon?: IconInput;
951
- disabled?: boolean;
982
+ icon?: IconInput | undefined;
983
+ disabled?: boolean | undefined;
952
984
  }
953
985
  export interface AccordionProps {
954
986
  items: AccordionItem[];
955
987
  /** single (default): one open at a time. multiple: any number. */
956
- type?: "single" | "multiple";
957
- value?: string | null | string[];
958
- defaultValue?: string | null | string[];
959
- onChange?: (value: any) => void;
988
+ type?: "single" | "multiple" | undefined;
989
+ value?: string | null | string[] | undefined;
990
+ defaultValue?: string | null | string[] | undefined;
991
+ onChange?: ((value: any) => void) | undefined;
960
992
  /** single only: false keeps one section always open. Default true. */
961
- collapsible?: boolean;
962
- headingLevel?: 2 | 3 | 4 | 5 | 6;
963
- id?: string;
964
- className?: string;
993
+ collapsible?: boolean | undefined;
994
+ headingLevel?: 2 | 3 | 4 | 5 | 6 | undefined;
995
+ id?: string | undefined;
996
+ className?: string | undefined;
965
997
  }
966
998
  export interface PopoverProps {
967
999
  /** One element; it gets aria-haspopup, aria-expanded and the click toggle. */
@@ -969,27 +1001,27 @@ export interface PopoverProps {
969
1001
  children: React$1.ReactNode | ((api: {
970
1002
  close: () => void;
971
1003
  }) => React$1.ReactNode);
972
- title?: React$1.ReactNode;
1004
+ title?: React$1.ReactNode | undefined;
973
1005
  /** Accessible name when there is no title. */
974
- label?: string;
975
- open?: boolean;
976
- defaultOpen?: boolean;
977
- onOpenChange?: (open: boolean) => void;
978
- placement?: "bottom-start" | "bottom-end" | "bottom-center" | "top-start" | "top-end" | "top-center";
979
- width?: number | string;
1006
+ label?: string | undefined;
1007
+ open?: boolean | undefined;
1008
+ defaultOpen?: boolean | undefined;
1009
+ onOpenChange?: ((open: boolean) => void) | undefined;
1010
+ placement?: "bottom-start" | "bottom-end" | "bottom-center" | "top-start" | "top-end" | "top-center" | undefined;
1011
+ width?: number | string | undefined;
980
1012
  /** Default true: focus moves to [data-autofocus] or the first control inside. */
981
- autoFocus?: boolean;
982
- id?: string;
983
- className?: string;
1013
+ autoFocus?: boolean | undefined;
1014
+ id?: string | undefined;
1015
+ className?: string | undefined;
984
1016
  }
985
1017
  export interface ThemeOptions {
986
1018
  /** The project's brand colour, #rgb or #rrggbb. Replaces AURA violet (links, focus ring, selection, info, progress, creative shadow in dark, mesh). */
987
1019
  brand: string;
988
1020
  /** Optional signal colour; replaces AURA lime in the accent dot and mesh only (success/ready stay green). */
989
- signal?: string;
1021
+ signal?: string | undefined;
990
1022
  /** ink (default): primary buttons stay zinc ink. brand: primary buttons use the brand colour. */
991
- primary?: "ink" | "brand";
992
- name?: string;
1023
+ primary?: "ink" | "brand" | undefined;
1024
+ name?: string | undefined;
993
1025
  }
994
1026
  export interface ThemeCheck {
995
1027
  theme: "light" | "dark";
@@ -1022,7 +1054,7 @@ export declare const iconNames: IconName[];
1022
1054
  export interface ButtonComponent {
1023
1055
  (props: ButtonLinkProps & React$1.RefAttributes<HTMLAnchorElement>): React$1.ReactElement | null;
1024
1056
  (props: ButtonProps & React$1.RefAttributes<HTMLButtonElement>): React$1.ReactElement | null;
1025
- displayName?: string;
1057
+ displayName?: string | undefined;
1026
1058
  }
1027
1059
  /** AURA pill button. Enterprise (`primary`, `secondary`) for product UI; `creative` for marketing moments only.
1028
1060
  * With `href` it renders a link that looks the same (`<a>`, or your router's link via `linkComponent`). */
@@ -1039,15 +1071,15 @@ export declare const StatusPill: React$1.ForwardRefExoticComponent<StatusPillPro
1039
1071
  /** Field: label, required/optional marks, the control, then the hint or error line. Wrap a custom control in it. */
1040
1072
  export interface FieldComponentProps extends Omit<FieldPropsPublic, "label"> {
1041
1073
  /** Visible label. Omit only when the control is labelled another way. */
1042
- label?: React$1.ReactNode;
1074
+ label?: React$1.ReactNode | undefined;
1043
1075
  /** The control's id: the label points at it, and the hint/error ids derive from it. */
1044
- id?: string;
1045
- children?: React$1.ReactNode;
1076
+ id?: string | undefined;
1077
+ children?: React$1.ReactNode | undefined;
1046
1078
  /** Render the label as another element (e.g. `span` for a group of controls) with this id. */
1047
- labelAs?: string;
1048
- labelId?: string;
1049
- disabled?: boolean;
1050
- className?: string;
1079
+ labelAs?: string | undefined;
1080
+ labelId?: string | undefined;
1081
+ disabled?: boolean | undefined;
1082
+ className?: string | undefined;
1051
1083
  }
1052
1084
  export declare const Field: React$1.ForwardRefExoticComponent<FieldComponentProps & React$1.RefAttributes<HTMLDivElement>>;
1053
1085
  export declare const TextField: React$1.ForwardRefExoticComponent<TextFieldProps & React$1.RefAttributes<HTMLInputElement>>;
@@ -1059,7 +1091,7 @@ export declare const Switch: React$1.ForwardRefExoticComponent<SwitchProps & Rea
1059
1091
  export interface ComboboxComponent {
1060
1092
  (props: ComboboxMultipleProps & React$1.RefAttributes<HTMLInputElement>): React$1.ReactElement | null;
1061
1093
  (props: ComboboxProps & React$1.RefAttributes<HTMLInputElement>): React$1.ReactElement | null;
1062
- displayName?: string;
1094
+ displayName?: string | undefined;
1063
1095
  }
1064
1096
  /** The Thai-aware default filter: label, description and keywords contain the query. */
1065
1097
  declare function defaultFilter(option: ComboboxOption, query: string): boolean;
@@ -1067,15 +1099,15 @@ declare function defaultFilter(option: ComboboxOption, query: string): boolean;
1067
1099
  export declare const Combobox: ComboboxComponent;
1068
1100
  /** Options for formatDate: locale/calendar plus a preset or any Intl.DateTimeFormat options. */
1069
1101
  export type FormatDateOptions = DateDisplayOptions & {
1070
- format?: "short" | "long" | "numeric" | Intl.DateTimeFormatOptions;
1102
+ format?: "short" | "long" | "numeric" | Intl.DateTimeFormatOptions | undefined;
1071
1103
  };
1072
1104
  /** Format an ISO date for display, e.g. "18 ก.ย. 2569" (th, Buddhist) or "18 Sept 2026" (en, Gregorian). */
1073
1105
  export declare function formatDate(iso: ISODate | null | undefined, opts?: FormatDateOptions): string;
1106
+ /** 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'. */
1107
+ export declare function parseDate(text: string | null | undefined): ISODate | null;
1074
1108
  /** formatDate bound to the nearest AuraProvider: its locale and calendar (English, Gregorian without one).
1075
1109
  * Options you pass still win. Use it in components; plain formatDate() stays for code outside React. */
1076
1110
  export declare function useFormatDate(): (iso: ISODate | null | undefined, opts?: FormatDateOptions) => string;
1077
- /** 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'. */
1078
- export declare function parseDate(text: string | null | undefined): ISODate | null;
1079
1111
  export declare const Calendar: React$1.ForwardRefExoticComponent<CalendarProps & React$1.RefAttributes<HTMLDivElement>>;
1080
1112
  /** 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. */
1081
1113
  export declare const DatePicker: React$1.ForwardRefExoticComponent<DatePickerProps & React$1.RefAttributes<HTMLInputElement>>;
@@ -1093,7 +1125,7 @@ export declare namespace toast {
1093
1125
  }
1094
1126
  export interface ToasterProps {
1095
1127
  /** Default `bottom`. */
1096
- position?: "bottom" | "top";
1128
+ position?: "bottom" | "top" | undefined;
1097
1129
  }
1098
1130
  export declare function Toaster(props: ToasterProps): React$1.ReactElement | null;
1099
1131
  export declare const PasswordField: React$1.ForwardRefExoticComponent<PasswordFieldProps & React$1.RefAttributes<HTMLInputElement>>;
@@ -1119,15 +1151,17 @@ export declare const Grid: React$1.ForwardRefExoticComponent<GridProps & React$1
1119
1151
  /** Centred page column. */
1120
1152
  export interface ContainerProps {
1121
1153
  /** `narrow` caps it at aura-container-narrow (720px). Default `default` (1280px). */
1122
- size?: "default" | "narrow";
1123
- as?: keyof React$1.JSX.IntrinsicElements;
1124
- className?: string;
1125
- style?: React$1.CSSProperties;
1126
- children?: React$1.ReactNode;
1154
+ size?: "default" | "narrow" | undefined;
1155
+ as?: keyof React$1.JSX.IntrinsicElements | undefined;
1156
+ className?: string | undefined;
1157
+ style?: React$1.CSSProperties | undefined;
1158
+ children?: React$1.ReactNode | undefined;
1127
1159
  }
1128
1160
  /** Container — centres content up to aura-container-max (1280px) with responsive side padding. */
1129
1161
  export declare const Container: React$1.ForwardRefExoticComponent<ContainerProps & React$1.RefAttributes<HTMLElement>>;
1130
- /** AppShell — side navigation + top bar + content. The nav is fixed from lg (1024px) up and a Drawer below it. */
1162
+ /** AppShell — side navigation + top bar + content. The nav is fixed from lg (1024px) up and a Drawer below it.
1163
+ * Which one shows is decided in CSS (4.16), so the server's HTML is already right on a phone and nothing shifts on
1164
+ * hydration; JavaScript only opens and closes the drawer. */
1131
1165
  export declare const AppShell: React$1.ForwardRefExoticComponent<AppShellProps & React$1.RefAttributes<HTMLDivElement>>;
1132
1166
  /** Min-width breakpoints in px, mirroring the aura-bp-* tokens. */
1133
1167
  export declare const breakpoints: {
@@ -1230,9 +1264,9 @@ export interface AuraLocaleValue {
1230
1264
  calendar: "buddhist" | "gregory" | null;
1231
1265
  strings: AuraStrings;
1232
1266
  /** The router link set on AuraProvider, if any. */
1233
- linkComponent?: React$1.ElementType | null;
1267
+ linkComponent?: React$1.ElementType | null | undefined;
1234
1268
  /** The density set on the nearest AuraProvider that sets one (null: none, i.e. comfortable unless an ancestor's data-density says otherwise). */
1235
- density?: "comfortable" | "compact" | null;
1269
+ density?: "comfortable" | "compact" | null | undefined;
1236
1270
  }
1237
1271
  /** Sets the language of built-in labels (and the default date locale) for everything inside. */
1238
1272
  export declare function AuraProvider(props: AuraProviderProps): React$1.ReactElement;
@@ -1241,11 +1275,11 @@ export declare function useAuraLocale(): AuraLocaleValue;
1241
1275
  /** The provider's density, for portals that render outside its wrapper. */
1242
1276
  export declare function useDensity(): "comfortable" | "compact" | undefined;
1243
1277
  export declare const Stat: React$1.ForwardRefExoticComponent<StatProps & React$1.RefAttributes<HTMLElement>>;
1278
+ /** 1536 → "1.5 KB". */
1279
+ export declare function formatBytes(n: number | null | undefined): string;
1244
1280
  /** Parse typed time: 9 · 09 · 930 · 0930 · 9:30 · 9.30 · 09.30 น. · 9:30 pm → "HH:mm" (24-hour) or null. */
1245
1281
  export declare function parseTime(text: string | null | undefined): string | null;
1246
1282
  export declare const TimePicker: React$1.ForwardRefExoticComponent<TimePickerProps & React$1.RefAttributes<HTMLInputElement>>;
1247
- /** 1536 → "1.5 KB". */
1248
- export declare function formatBytes(n: number | null | undefined): string;
1249
1283
  export declare const FileUpload: React$1.ForwardRefExoticComponent<FileUploadProps & React$1.RefAttributes<HTMLInputElement>>;
1250
1284
  /** WCAG contrast ratio of two #hex colours. */
1251
1285
  export declare function contrast(a: string, b: string): number;
@@ -1258,23 +1292,23 @@ declare function scale(hex: string): Theme["brand"];
1258
1292
  export declare function createTheme(opts: ThemeOptions): Theme;
1259
1293
  export interface ThemeStyleProps extends ThemeOptions {
1260
1294
  /** Scope the theme to this selector instead of the whole page (multi-tenant). */
1261
- selector?: string;
1295
+ selector?: string | undefined;
1262
1296
  }
1263
1297
  export declare function ThemeStyle(props: ThemeStyleProps): React$1.ReactElement;
1264
1298
  /** `system` follows the operating system and changes with it. */
1265
1299
  export type ColorScheme = "light" | "dark" | "system";
1266
1300
  export interface ColorSchemeOptions {
1267
1301
  /** localStorage key for the choice. Default `aura-color-scheme`. */
1268
- storageKey?: string;
1302
+ storageKey?: string | undefined;
1269
1303
  /** Used when nothing is saved. Default `system`. */
1270
- defaultScheme?: ColorScheme;
1304
+ defaultScheme?: ColorScheme | undefined;
1271
1305
  }
1272
1306
  /** The script ColorSchemeScript renders, as a string — for frameworks that want it in a raw <head> template. */
1273
1307
  export declare function colorSchemeScript(options?: ColorSchemeOptions): string;
1274
1308
  /** Put in <head>: applies the saved colour scheme before the page paints. Server-rendering safe. */
1275
1309
  export declare function ColorSchemeScript(props: ColorSchemeOptions & {
1276
1310
  /** Nonce for a nonce-based Content-Security-Policy (script-src 'nonce-…'). */
1277
- nonce?: string;
1311
+ nonce?: string | undefined;
1278
1312
  }): React$1.ReactElement;
1279
1313
  /** Current colour scheme and a setter. `resolved` is what is on screen (system resolved to light or dark). */
1280
1314
  export interface ColorSchemeState {
@@ -1286,7 +1320,7 @@ export interface ColorSchemeState {
1286
1320
  export declare function useColorScheme(options?: ColorSchemeOptions): ColorSchemeState;
1287
1321
  export interface ColorSchemeToggleProps extends ColorSchemeOptions {
1288
1322
  /** Accessible name of the button. Default: the built-in "Colour scheme" label. */
1289
- label?: string;
1323
+ label?: string | undefined;
1290
1324
  }
1291
1325
  /** Icon button with a menu: Light, Dark, System. Shows a sun or a moon for what is on screen. */
1292
1326
  export declare function ColorSchemeToggle(props: ColorSchemeToggleProps): React$1.ReactElement;