@jirawatpyk/aura-react 5.14.0 → 5.16.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
@@ -20,6 +20,9 @@ export interface ButtonProps extends React$1.ButtonHTMLAttributes<HTMLButtonElem
20
20
  fullWidth?: boolean | undefined;
21
21
  /** `sm` is 32px with tighter padding, for toolbars, table rows and card footers. Default `md` (44px). */
22
22
  size?: ButtonSize | undefined;
23
+ /** 44px tall below 640px (the viewport's), whatever `size` — a small button that phones get at full touch height
24
+ * (5.15, Chamber-OS 100). From 640px up it keeps its size. */
25
+ touchHeight?: boolean | undefined;
23
26
  }
24
27
  /** A link that looks like a Button: give `Button` an `href` and it renders an `<a>` (navigation, not actions). */
25
28
  export interface ButtonLinkProps extends Omit<React$1.AnchorHTMLAttributes<HTMLAnchorElement>, "children"> {
@@ -38,9 +41,21 @@ export interface ButtonLinkProps extends Omit<React$1.AnchorHTMLAttributes<HTMLA
38
41
  fullWidth?: boolean | undefined;
39
42
  /** `sm` is 32px with tighter padding. Default `md` (44px). */
40
43
  size?: ButtonSize | undefined;
44
+ /** 44px tall below 640px (the viewport's), whatever `size` — a small button that phones get at full touch height
45
+ * (5.15, Chamber-OS 100). From 640px up it keeps its size. */
46
+ touchHeight?: boolean | undefined;
41
47
  /** 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
48
  linkComponent?: React$1.ElementType | undefined;
43
49
  }
50
+ /** How a DataTable selection changed: the second argument of `onSelectionChange` (5.16). */
51
+ export interface DataTableSelectionChange {
52
+ /** The row whose box or Space made the change; null for select-all and `sync`. */
53
+ key: string | number | null;
54
+ shiftKey: boolean;
55
+ source: "click" | "keyboard" | "all" | "sync";
56
+ /** With `rangeSelect`, the keys a Shift range set (the row's own key included). */
57
+ range?: Array<string | number> | undefined;
58
+ }
44
59
  /** What DataTable's onStateChange reports: the sort and the 1-based page, together. */
45
60
  export interface DataTableState {
46
61
  sort: DataTableSort | null;
@@ -143,7 +158,13 @@ export interface DataTableProps<Row extends Record<string, any> = Record<string,
143
158
  selected?: Array<string | number> | undefined;
144
159
  /** Initial selection when uncontrolled. */
145
160
  defaultSelected?: Array<string | number> | undefined;
146
- onSelectionChange?: ((keys: Array<string | number>) => void) | undefined;
161
+ /** The new keys, and how they changed (5.16, Chamber-OS 98): the row's `key` (null for select-all), whether Shift
162
+ * was held, and the `source` — `click` (a checkbox), `keyboard` (Space on a row), `all` (the select-all box) or
163
+ * `sync` (keys of rows `isRowSelectable` rejects, dropped). `range` lists the keys a Shift range changed. */
164
+ onSelectionChange?: ((keys: Array<string | number>, change: DataTableSelectionChange) => void) | undefined;
165
+ /** Shift-click a row's checkbox (or Shift+Space on a row) to set every selectable row from the last one changed to
166
+ * this one, on this page and in this order, to this row's new state (5.16, Chamber-OS 98). Default false. */
167
+ rangeSelect?: boolean | undefined;
147
168
  /** Shown when rows is empty. */
148
169
  empty?: DataTableEmpty | undefined;
149
170
  /** A totals row under the body (4.19): content per column key, e.g. `{ id: 'Total', vat: '7,000.00', total: '107,000.00' }`.
@@ -279,6 +300,13 @@ export interface CheckboxProps extends Omit<React$1.InputHTMLAttributes<HTMLInpu
279
300
  disabled?: boolean | undefined;
280
301
  tabIndex?: number | undefined;
281
302
  className?: string | undefined;
303
+ /** How far a click counts around a box without visible text (5.15, Chamber-OS 99): `box` (default, 16×16),
304
+ * `target` (24×24, WCAG 2.5.8, as DataTable's selection column) or `{ x, y }` — px added on each side, so
305
+ * `{ x: 12, y: 8 }` is a 40×32 area. The box looks the same; a labelled checkbox's whole label is its target. */
306
+ hitArea?: "box" | "target" | {
307
+ x: number;
308
+ y: number;
309
+ } | undefined;
282
310
  }
283
311
  /** 32px round button holding one icon. */
284
312
  export interface IconButtonProps extends React$1.ButtonHTMLAttributes<HTMLButtonElement> {
@@ -289,6 +317,9 @@ export interface IconButtonProps extends React$1.ButtonHTMLAttributes<HTMLButton
289
317
  label: string;
290
318
  /** Icon size. Default `sm` (16). */
291
319
  size?: "sm" | "md" | undefined;
320
+ /** 44×44 below 640px (the viewport's) instead of 32×32 — a phone sheet's close button, a card's ⋯ trigger
321
+ * (5.15, Chamber-OS 100). */
322
+ touchHeight?: boolean | undefined;
292
323
  }
293
324
  export interface MenuItem {
294
325
  label?: string | undefined;
@@ -415,6 +446,12 @@ export interface FilterBarProps {
415
446
  /** The search takes all the room the controls leave in its row, instead of stopping at 360px with the count and
416
447
  * actions pushed to the end (5.12). */
417
448
  searchGrow?: boolean | undefined;
449
+ /** `fill`: the filter controls share their row in equal columns (at least 120px each, wrapping when they can't),
450
+ * and the count and actions keep to the end (5.15, Chamber-OS 92). Default `auto`: each at its own width. */
451
+ controlsLayout?: "auto" | "fill" | undefined;
452
+ /** Below this width (the viewport's) the search takes a row of its own above the controls. Default `md` (768px);
453
+ * `lg` (1024px) for bars with several filters (5.15, Chamber-OS 92). */
454
+ stackBelow?: "md" | "lg" | undefined;
418
455
  className?: string | undefined;
419
456
  }
420
457
  /** One command in the palette. */
@@ -584,9 +621,22 @@ export interface FieldPropsPublic {
584
621
  required?: boolean | undefined;
585
622
  optional?: boolean | undefined;
586
623
  }
587
- export interface DialogProps {
588
- open: boolean;
589
- onClose: () => void;
624
+ /** `id`, `data-*`, `aria-*`, `style`, `lang` and `dir` go on the `.aura-dialog` panel (5.16, Chamber-OS 101). */
625
+ export interface DialogProps extends Pick<React$1.HTMLAttributes<HTMLDivElement>, "id" | "style" | "lang" | "dir">, React$1.AriaAttributes, DataAttributes {
626
+ /** Controlled open state. Leave it out with a `trigger` and the Dialog opens and closes itself (5.16). */
627
+ open?: boolean | undefined;
628
+ onClose?: (() => void) | undefined;
629
+ /** The button that opens it (5.16, Chamber-OS 101): rendered in place, with `aria-haspopup="dialog"`,
630
+ * `aria-expanded` and a click that opens the Dialog (its own onClick runs first; `preventDefault()` keeps it shut).
631
+ * Focus returns to it on close. */
632
+ trigger?: React$1.ReactElement | undefined;
633
+ /** Called when the trigger opens it (5.16). */
634
+ onOpen?: (() => void) | undefined;
635
+ /** Where focus goes when it closes — by a button, Escape or the scrim — instead of back to what opened it: the
636
+ * row a save just created (5.16). A ref, or a function read at close; null falls back to the opener. */
637
+ finalFocus?: React$1.RefObject<HTMLElement | null> | (() => HTMLElement | null) | undefined;
638
+ /** Runs once after it has closed and its panel has left the page (5.16) — reset a selection there. */
639
+ onCloseComplete?: (() => void) | undefined;
590
640
  title: React$1.ReactNode;
591
641
  description?: React$1.ReactNode | undefined;
592
642
  children?: React$1.ReactNode | undefined;
@@ -623,6 +673,12 @@ export interface CardProps extends Omit<React$1.HTMLAttributes<HTMLElement>, "ti
623
673
  className?: string | undefined;
624
674
  /** id for the title element; the card is then labelled by it (aria-labelledby). */
625
675
  titleId?: string | undefined;
676
+ /** Free head content in place of `title` and `description` (5.15, Chamber-OS 87): skeleton bars while the card
677
+ * loads, a status pill above a title you mark up yourself. No heading is added; `actions` still sit top-right. */
678
+ header?: React$1.ReactNode | undefined;
679
+ /** Below this width (the viewport's) the card drops its border, surface and shadow — a list whose rows become
680
+ * cards of their own on a phone, so there are no cards in a card (5.15, Chamber-OS 93). Padding is kept. */
681
+ flushBelow?: "sm" | "md" | "lg" | undefined;
626
682
  }
627
683
  export interface TabItem {
628
684
  id: string;
@@ -658,8 +714,10 @@ export interface TabsProps {
658
714
  /** `underline` (default) or `segmented`: the tabs as a pill track with the selected one raised, like
659
715
  * SegmentedControl, keeping every Tabs behaviour (panels, keepMounted, activation, tabProps). (5.10, Chamber-OS 72) */
660
716
  variant?: "underline" | "segmented" | undefined;
661
- /** With `variant="segmented"`: stretch the track to the full width, tabs sharing it equally. (5.10) */
662
- fullWidth?: boolean | undefined;
717
+ /** Tabs share the full width equally: the segmented track (5.10), or underline tabs (5.15, Chamber-OS 90).
718
+ * `'below-sm' | 'below-md' | 'below-lg'` only below that width (the viewport's) — `below-lg` for phone and tablet
719
+ * layouts, tabs at their own width on a desktop. */
720
+ fullWidth?: boolean | "below-sm" | "below-md" | "below-lg" | undefined;
663
721
  /** Link tabs: what the current link is (5.14). `page` (default) for routes; `location` for links to sections of
664
722
  * this page (`#contacts`). */
665
723
  current?: "page" | "location" | undefined;
@@ -676,6 +734,11 @@ export interface NavItem {
676
734
  children?: NavItem[] | undefined;
677
735
  /** Start open. A group also opens by itself when one of its items is the current one. */
678
736
  defaultOpen?: boolean | undefined;
737
+ /** Runs when the item is chosen (5.16, Chamber-OS 95). */
738
+ onSelect?: (() => void) | undefined;
739
+ /** `false` makes an action row — Sign out, Collapse sidebar: it looks like the other rows and runs `onSelect`,
740
+ * but never becomes the current item (no `aria-current`, no `onChange`). Default true. (5.16) */
741
+ selectable?: boolean | undefined;
679
742
  }
680
743
  export interface SideNavProps {
681
744
  sections?: Array<{
@@ -701,6 +764,15 @@ export interface SideNavProps {
701
764
  onCollapsedChange?: ((collapsed: boolean) => void) | undefined;
702
765
  /** Adds a collapse / expand button at the bottom. AppShell hides it in its phone drawer. */
703
766
  collapsible?: boolean | undefined;
767
+ /** Called with the item's id when an action row (`selectable: false`) is chosen, after its `onSelect` (5.16).
768
+ * AppShell uses it to close its phone drawer. */
769
+ onAction?: ((id: string) => void) | undefined;
770
+ /** How `collapsible` shows its toggle: `icon` (default, an IconButton) or `row` — a labelled nav row
771
+ * ("Collapse sidebar") with the rows' look, its icon alone in the rail (5.16, Chamber-OS 95). */
772
+ collapseToggle?: "icon" | "row" | undefined;
773
+ /** Where a closed group's chevron points: `down` (default; up when open) or `right` (down when open; left in
774
+ * right-to-left pages) (5.16, Chamber-OS 96). */
775
+ chevron?: "down" | "right" | undefined;
704
776
  /** The 1px right edge that divides the nav from the page. Default true; `false` when your layout draws its own
705
777
  * divider. (5.1) */
706
778
  bordered?: boolean | undefined;
@@ -713,8 +785,16 @@ export interface BreadcrumbProps {
713
785
  label: string;
714
786
  href?: string | undefined;
715
787
  onClick?: (() => void) | undefined;
788
+ /** Attributes for this item's `<li>` — `data-slot`, `data-testid` (5.15, Chamber-OS 94). */
789
+ itemProps?: (React$1.LiHTMLAttributes<HTMLLIElement> & DataAttributes) | undefined;
790
+ /** Attributes for the item's link, button or text (5.15): `data-*`, `target`, `rel`… Its `onClick` runs before
791
+ * the item's own. */
792
+ linkProps?: (React$1.AnchorHTMLAttributes<HTMLAnchorElement> & Omit<React$1.ButtonHTMLAttributes<HTMLButtonElement>, keyof React$1.AnchorHTMLAttributes<HTMLAnchorElement>> & DataAttributes) | undefined;
716
793
  }>;
717
794
  label?: string | undefined;
795
+ /** Below this width (the viewport's) a trail of three or more shows the first item, "…" and the last; the "…"
796
+ * button shows the rest (5.15, Chamber-OS 94). Decided in CSS, so the server's HTML is already right. */
797
+ collapseBelow?: "sm" | "md" | undefined;
718
798
  /** Your router's link (e.g. `Link` from `next/link`) for this component; defaults to AuraProvider's `linkComponent`, then `<a>`. */
719
799
  linkComponent?: React$1.ElementType | undefined;
720
800
  className?: string | undefined;
@@ -752,7 +832,7 @@ export interface ComboboxOption {
752
832
  icon?: IconInput | undefined;
753
833
  }
754
834
  /** Combobox with `multiple`: pick any number; the picks show as removable chips in the field. */
755
- export interface ComboboxMultipleProps extends Omit<ComboboxProps, "value" | "defaultValue" | "onChange" | "clearable"> {
835
+ export interface ComboboxMultipleProps extends Omit<ComboboxProps, "value" | "defaultValue" | "onChange" | "clearable" | "allowCustomValue"> {
756
836
  multiple: true;
757
837
  /** Selected option values, in the order they were picked (controlled). */
758
838
  value?: string[] | undefined;
@@ -764,7 +844,8 @@ export interface ComboboxMultipleProps extends Omit<ComboboxProps, "value" | "de
764
844
  max?: number | undefined;
765
845
  }
766
846
  export interface ComboboxProps extends FieldProps {
767
- options: Array<ComboboxOption | string>;
847
+ /** The options. Optional with `groups` (5.16). */
848
+ options?: Array<ComboboxOption | string> | undefined;
768
849
  /** Selected option value (controlled). */
769
850
  value?: string | null | undefined;
770
851
  defaultValue?: string | null | undefined;
@@ -787,6 +868,17 @@ export interface ComboboxProps extends FieldProps {
787
868
  limit?: number | undefined;
788
869
  /** Replace the Thai-aware default filter (label, description, keywords). */
789
870
  filter?: ((option: ComboboxOption, query: string) => boolean) | undefined;
871
+ /** Options under headings, after any in `options` (5.16, Chamber-OS 105): `[{ label: 'Nordic and Thailand',
872
+ * options: [...] }]`. Each heading names its group for screen readers; filtering keeps a heading while any of its
873
+ * options match. */
874
+ groups?: Array<{
875
+ label: string;
876
+ options: Array<ComboboxOption | string>;
877
+ }> | undefined;
878
+ /** A typed value that isn't in the list is kept (5.16, Chamber-OS 105): Enter with no match highlighted, or leaving
879
+ * the field, makes the text the value (text matching an option's label picks that option). Clearing the text
880
+ * clears the value. Single value only. */
881
+ allowCustomValue?: boolean | undefined;
790
882
  className?: string | undefined;
791
883
  }
792
884
  /** Number input: thousands separators, +/− buttons, arrow keys, min/max/step, prefix/suffix (฿, %). */
@@ -935,6 +1027,10 @@ export type ButtonAttributes = React$1.ButtonHTMLAttributes<HTMLButtonElement> &
935
1027
  export interface DrawerProps extends Pick<React$1.HTMLAttributes<HTMLDivElement>, "id" | "style" | "lang" | "dir">, React$1.AriaAttributes, DataAttributes {
936
1028
  open: boolean;
937
1029
  onClose: () => void;
1030
+ /** As Dialog's (5.16): where focus goes when it closes, instead of back to what opened it. */
1031
+ finalFocus?: React$1.RefObject<HTMLElement | null> | (() => HTMLElement | null) | undefined;
1032
+ /** As Dialog's (5.16): runs once after it has closed and left the page. */
1033
+ onCloseComplete?: (() => void) | undefined;
938
1034
  /** Default `right`. */
939
1035
  side?: "right" | "left" | undefined;
940
1036
  /** sm 360 · md 480 (default) · lg 640 · nav = SideNav width. Full width below 640px. */
@@ -956,8 +1052,11 @@ export interface DrawerProps extends Pick<React$1.HTMLAttributes<HTMLDivElement>
956
1052
  /** The close button's accessible name and tooltip, saying what it closes ("Close payment drawer"). Default: the
957
1053
  * built-in "Close" in the provider's language. (5.9) */
958
1054
  closeLabel?: string | undefined;
959
- /** Attributes for the close button, e.g. `{ 'data-testid': 'pay-sheet-close' }`. (5.9) */
960
- closeProps?: ButtonAttributes | undefined;
1055
+ /** Attributes for the close button, e.g. `{ 'data-testid': 'pay-sheet-close' }` (5.9), or `touchHeight: true` for a
1056
+ * 44px close button on phones (5.15). */
1057
+ closeProps?: (ButtonAttributes & {
1058
+ touchHeight?: boolean | undefined;
1059
+ }) | undefined;
961
1060
  }
962
1061
  export type Breakpoint = "base" | "sm" | "md" | "lg" | "xl";
963
1062
  export type Responsive<T> = T | Partial<Record<Breakpoint, T>>;
@@ -1027,6 +1126,10 @@ export interface TableProps extends Omit<React$1.TableHTMLAttributes<HTMLTableEl
1027
1126
  /** `false` (5.13) drops the frame — border, radius, background — and the outer cells' side padding, so the table
1028
1127
  * lines up with the content around it, e.g. flush inside a Card under its heading. Default `true`. */
1029
1128
  bordered?: boolean | undefined;
1129
+ /** How stacked rows look (5.15, Chamber-OS 85): `list` (default) — one frame, rows divided by rules; `cards` —
1130
+ * each row its own framed card, spaced like DataTable's cards, with no frame around them. From the `stackBelow`
1131
+ * width up the table is unchanged. The table then sits in one more `div` (`.aura-tbl-cards`). */
1132
+ stackStyle?: "list" | "cards" | undefined;
1030
1133
  className?: string | undefined;
1031
1134
  children?: React$1.ReactNode | undefined;
1032
1135
  }
@@ -1213,6 +1316,9 @@ export interface ProgressProps {
1213
1316
  showValue?: boolean | undefined;
1214
1317
  /** Replaces the % text, e.g. "3 of 5 files". Also read out as aria-valuetext. */
1215
1318
  valueLabel?: React$1.ReactNode | undefined;
1319
+ /** A reserved amount drawn after `value` as a striped segment of the same tone — queued sends on a quota
1320
+ * (5.15, Chamber-OS 89). Both counts are read out ("2 of 6 used, 1 reserved") unless `valueLabel` is given. */
1321
+ secondaryValue?: number | undefined;
1216
1322
  hint?: React$1.ReactNode | undefined;
1217
1323
  tone?: Tone | undefined;
1218
1324
  size?: "sm" | "md" | undefined;
@@ -1429,6 +1535,7 @@ export declare function buttonClass(opts?: {
1429
1535
  size?: ButtonProps["size"];
1430
1536
  fullWidth?: boolean | undefined;
1431
1537
  loading?: boolean | undefined;
1538
+ touchHeight?: boolean | undefined;
1432
1539
  className?: string | undefined;
1433
1540
  }): string;
1434
1541
  export declare const Alert: React$1.ForwardRefExoticComponent<AlertProps & React$1.RefAttributes<HTMLDivElement>>;
@@ -1460,6 +1567,10 @@ export declare const FormErrorSummary: React$1.ForwardRefExoticComponent<FormErr
1460
1567
  export declare const FilterBar: React$1.ForwardRefExoticComponent<FilterBarProps & React$1.RefAttributes<HTMLDivElement>>;
1461
1568
  export declare function Command(props: CommandProps): React$1.ReactElement | null;
1462
1569
  export declare const Tooltip: React$1.ForwardRefExoticComponent<TooltipProps & React$1.RefAttributes<HTMLSpanElement>>;
1570
+ /** Inside a Dialog's body or footer: a function that closes it (5.16) — also when `dismissible={false}`, which only
1571
+ * turns off Escape, the scrim and ×. Outside a Dialog it does nothing. Use it for Cancel and Save in a Dialog that
1572
+ * has a `trigger` and no `open`. */
1573
+ export declare function useDialogClose(): () => void;
1463
1574
  export declare const Dialog: React$1.ForwardRefExoticComponent<DialogProps & React$1.RefAttributes<HTMLDivElement>>;
1464
1575
  /** Side panel over the page: record detail, filters, mobile navigation. Modal (focus trap, scroll lock, focus restore). */
1465
1576
  export declare const Drawer: React$1.ForwardRefExoticComponent<DrawerProps & React$1.RefAttributes<HTMLDivElement>>;
@@ -1612,6 +1723,10 @@ export interface AuraStrings {
1612
1723
  pagination: string;
1613
1724
  pageN: (p: number) => string;
1614
1725
  accepts: (list?: string, max?: number | string) => string;
1726
+ /** Progress with a reserved segment (5.15): "2 of 6 used, 1 reserved". */
1727
+ progressReserved: (value: number, reserved: number, max: number) => string;
1728
+ /** The collapsed middle of a Breadcrumb (5.15). */
1729
+ breadcrumbMore: string;
1615
1730
  }
1616
1731
  /** Built-in strings by locale. th and sv also ship as packs (`@jirawatpyk/aura-react/locales/th`, `/sv`, 5.9); in 6.0
1617
1732
  * only en stays built in and a Thai or Swedish app passes its pack to AuraProvider `strings`. */
@@ -143,6 +143,10 @@ var sv = {
143
143
  pageN: function(p) {
144
144
  return "Sida " + p;
145
145
  },
146
+ progressReserved: function(v, r, max) {
147
+ return nsv(v) + " av " + nsv(max) + " anv\xE4nda, " + nsv(r) + " reserverade";
148
+ },
149
+ breadcrumbMore: "Visa hela s\xF6kv\xE4gen",
146
150
  accepts: function(list, max) {
147
151
  return [list, max && "h\xF6gst " + max + " per fil"].filter(Boolean).join(", ");
148
152
  }
@@ -83,6 +83,10 @@ export interface AuraStrings {
83
83
  pagination: string;
84
84
  pageN: (p: number) => string;
85
85
  accepts: (list?: string, max?: number | string) => string;
86
+ /** Progress with a reserved segment (5.15): "2 of 6 used, 1 reserved". */
87
+ progressReserved: (value: number, reserved: number, max: number) => string;
88
+ /** The collapsed middle of a Breadcrumb (5.15). */
89
+ breadcrumbMore: string;
86
90
  }
87
91
  /** Built-in strings by locale. th and sv also ship as packs (`@jirawatpyk/aura-react/locales/th`, `/sv`, 5.9); in 6.0
88
92
  * only en stays built in and a Thai or Swedish app passes its pack to AuraProvider `strings`. */
@@ -83,6 +83,10 @@ export interface AuraStrings {
83
83
  pagination: string;
84
84
  pageN: (p: number) => string;
85
85
  accepts: (list?: string, max?: number | string) => string;
86
+ /** Progress with a reserved segment (5.15): "2 of 6 used, 1 reserved". */
87
+ progressReserved: (value: number, reserved: number, max: number) => string;
88
+ /** The collapsed middle of a Breadcrumb (5.15). */
89
+ breadcrumbMore: string;
86
90
  }
87
91
  /** Built-in strings by locale. th and sv also ship as packs (`@jirawatpyk/aura-react/locales/th`, `/sv`, 5.9); in 6.0
88
92
  * only en stays built in and a Thai or Swedish app passes its pack to AuraProvider `strings`. */
@@ -143,6 +143,10 @@ var th = {
143
143
  pageN: function(p) {
144
144
  return "\u0E2B\u0E19\u0E49\u0E32 " + p;
145
145
  },
146
+ progressReserved: function(v, r, max) {
147
+ return "\u0E43\u0E0A\u0E49\u0E41\u0E25\u0E49\u0E27 " + n(v) + " \u0E08\u0E32\u0E01 " + n(max) + " \u0E08\u0E2D\u0E07\u0E44\u0E27\u0E49 " + n(r);
148
+ },
149
+ breadcrumbMore: "\u0E41\u0E2A\u0E14\u0E07\u0E40\u0E2A\u0E49\u0E19\u0E17\u0E32\u0E07\u0E17\u0E31\u0E49\u0E07\u0E2B\u0E21\u0E14",
146
150
  accepts: function(list, max) {
147
151
  return [list, max && "\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19 " + max + " \u0E15\u0E48\u0E2D\u0E44\u0E1F\u0E25\u0E4C"].filter(Boolean).join(" \xB7 ");
148
152
  }
@@ -83,6 +83,10 @@ export interface AuraStrings {
83
83
  pagination: string;
84
84
  pageN: (p: number) => string;
85
85
  accepts: (list?: string, max?: number | string) => string;
86
+ /** Progress with a reserved segment (5.15): "2 of 6 used, 1 reserved". */
87
+ progressReserved: (value: number, reserved: number, max: number) => string;
88
+ /** The collapsed middle of a Breadcrumb (5.15). */
89
+ breadcrumbMore: string;
86
90
  }
87
91
  /** Built-in strings by locale. th and sv also ship as packs (`@jirawatpyk/aura-react/locales/th`, `/sv`, 5.9); in 6.0
88
92
  * only en stays built in and a Thai or Swedish app passes its pack to AuraProvider `strings`. */
@@ -83,6 +83,10 @@ export interface AuraStrings {
83
83
  pagination: string;
84
84
  pageN: (p: number) => string;
85
85
  accepts: (list?: string, max?: number | string) => string;
86
+ /** Progress with a reserved segment (5.15): "2 of 6 used, 1 reserved". */
87
+ progressReserved: (value: number, reserved: number, max: number) => string;
88
+ /** The collapsed middle of a Breadcrumb (5.15). */
89
+ breadcrumbMore: string;
86
90
  }
87
91
  /** Built-in strings by locale. th and sv also ship as packs (`@jirawatpyk/aura-react/locales/th`, `/sv`, 5.9); in 6.0
88
92
  * only en stays built in and a Thai or Swedish app passes its pack to AuraProvider `strings`. */
@@ -327,6 +327,10 @@ var th = {
327
327
  pageN: function(p) {
328
328
  return "\u0E2B\u0E19\u0E49\u0E32 " + p;
329
329
  },
330
+ progressReserved: function(v, r, max) {
331
+ return "\u0E43\u0E0A\u0E49\u0E41\u0E25\u0E49\u0E27 " + n(v) + " \u0E08\u0E32\u0E01 " + n(max) + " \u0E08\u0E2D\u0E07\u0E44\u0E27\u0E49 " + n(r);
332
+ },
333
+ breadcrumbMore: "\u0E41\u0E2A\u0E14\u0E07\u0E40\u0E2A\u0E49\u0E19\u0E17\u0E32\u0E07\u0E17\u0E31\u0E49\u0E07\u0E2B\u0E21\u0E14",
330
334
  accepts: function(list, max) {
331
335
  return [list, max && "\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19 " + max + " \u0E15\u0E48\u0E2D\u0E44\u0E1F\u0E25\u0E4C"].filter(Boolean).join(" \xB7 ");
332
336
  }
@@ -453,6 +457,10 @@ var sv = {
453
457
  pageN: function(p) {
454
458
  return "Sida " + p;
455
459
  },
460
+ progressReserved: function(v, r, max) {
461
+ return nsv(v) + " av " + nsv(max) + " anv\xE4nda, " + nsv(r) + " reserverade";
462
+ },
463
+ breadcrumbMore: "Visa hela s\xF6kv\xE4gen",
456
464
  accepts: function(list, max) {
457
465
  return [list, max && "h\xF6gst " + max + " per fil"].filter(Boolean).join(", ");
458
466
  }
@@ -580,6 +588,10 @@ var STRINGS = {
580
588
  pageN: function(p) {
581
589
  return "Page " + p;
582
590
  },
591
+ progressReserved: function(v, r, max) {
592
+ return n2(v) + " of " + n2(max) + " used, " + n2(r) + " reserved";
593
+ },
594
+ breadcrumbMore: "Show the full path",
583
595
  accepts: function(list, max) {
584
596
  return [list, max && "up to " + max + " each"].filter(Boolean).join(", ");
585
597
  }
@@ -1106,8 +1118,11 @@ function cardElement(props, ref) {
1106
1118
  "interactive",
1107
1119
  "as",
1108
1120
  "className",
1109
- "titleId"
1121
+ "titleId",
1122
+ "header",
1123
+ "flushBelow"
1110
1124
  ]);
1125
+ const head = props.header !== void 0 && props.header !== null && props.header !== false;
1111
1126
  return h2(
1112
1127
  props.as || "section",
1113
1128
  Object.assign({}, rest, {
@@ -1116,12 +1131,13 @@ function cardElement(props, ref) {
1116
1131
  "aura-card",
1117
1132
  creative && "aura-card--creative",
1118
1133
  props.interactive && "is-interactive",
1134
+ props.flushBelow && "aura-card--flush-below-" + props.flushBelow,
1119
1135
  props.className
1120
1136
  ),
1121
1137
  /* A titled card is labelled by its title; otherwise the caller's aria-labelledby stays (5.8). */
1122
- "aria-labelledby": props.title && props.titleId ? props.titleId : props["aria-labelledby"]
1138
+ "aria-labelledby": !head && props.title && props.titleId ? props.titleId : props["aria-labelledby"]
1123
1139
  }),
1124
- props.title || props.actions ? /* @__PURE__ */ React3.createElement("div", { className: "aura-card__head" }, /* @__PURE__ */ React3.createElement("div", { className: "aura-card__heading" }, props.title ? h2("h" + (props.headingLevel || 3), { className: "aura-card__title", id: props.titleId }, props.title) : null, props.description ? /* @__PURE__ */ React3.createElement("p", { className: "aura-card__desc" }, props.description) : null), props.actions ? /* @__PURE__ */ React3.createElement("div", { className: "aura-card__actions" }, props.actions) : null) : null,
1140
+ head || props.title || props.actions ? /* @__PURE__ */ React3.createElement("div", { className: "aura-card__head" }, /* @__PURE__ */ React3.createElement("div", { className: "aura-card__heading" }, head ? props.header : null, !head && props.title ? h2("h" + (props.headingLevel || 3), { className: "aura-card__title", id: props.titleId }, props.title) : null, !head && props.description ? /* @__PURE__ */ React3.createElement("p", { className: "aura-card__desc" }, props.description) : null), props.actions ? /* @__PURE__ */ React3.createElement("div", { className: "aura-card__actions" }, props.actions) : null) : null,
1125
1141
  props.children ? /* @__PURE__ */ React3.createElement("div", { className: "aura-card__body" }, props.children) : null,
1126
1142
  props.footer ? /* @__PURE__ */ React3.createElement("div", { className: "aura-card__foot" }, props.footer) : null
1127
1143
  );
@@ -1256,6 +1272,7 @@ function buttonClass(opts = {}) {
1256
1272
  "aura-btn--" + (opts.variant || "primary"),
1257
1273
  opts.size === "sm" && "aura-btn--sm",
1258
1274
  opts.fullWidth && "aura-btn--full",
1275
+ opts.touchHeight && "aura-btn--touch",
1259
1276
  opts.loading && "is-loading",
1260
1277
  opts.className
1261
1278
  );
@@ -20,6 +20,9 @@ export interface ButtonProps extends React$1.ButtonHTMLAttributes<HTMLButtonElem
20
20
  fullWidth?: boolean | undefined;
21
21
  /** `sm` is 32px with tighter padding, for toolbars, table rows and card footers. Default `md` (44px). */
22
22
  size?: ButtonSize | undefined;
23
+ /** 44px tall below 640px (the viewport's), whatever `size` — a small button that phones get at full touch height
24
+ * (5.15, Chamber-OS 100). From 640px up it keeps its size. */
25
+ touchHeight?: boolean | undefined;
23
26
  }
24
27
  /** An AURA icon name, or any icon element (e.g. `<Building />` from lucide-react). AURA sizes it and hides it from screen readers. */
25
28
  export type IconInput = IconName | React$1.ReactElement;
@@ -80,6 +83,12 @@ export interface CardProps extends Omit<React$1.HTMLAttributes<HTMLElement>, "ti
80
83
  className?: string | undefined;
81
84
  /** id for the title element; the card is then labelled by it (aria-labelledby). */
82
85
  titleId?: string | undefined;
86
+ /** Free head content in place of `title` and `description` (5.15, Chamber-OS 87): skeleton bars while the card
87
+ * loads, a status pill above a title you mark up yourself. No heading is added; `actions` still sit top-right. */
88
+ header?: React$1.ReactNode | undefined;
89
+ /** Below this width (the viewport's) the card drops its border, surface and shadow — a list whose rows become
90
+ * cards of their own on a phone, so there are no cards in a card (5.15, Chamber-OS 93). Padding is kept. */
91
+ flushBelow?: "sm" | "md" | "lg" | undefined;
83
92
  }
84
93
  export interface AvatarProps {
85
94
  /** Accessible name; also gives the initials and a stable colour. */
@@ -281,6 +290,10 @@ export interface AuraStrings {
281
290
  pagination: string;
282
291
  pageN: (p: number) => string;
283
292
  accepts: (list?: string, max?: number | string) => string;
293
+ /** Progress with a reserved segment (5.15): "2 of 6 used, 1 reserved". */
294
+ progressReserved: (value: number, reserved: number, max: number) => string;
295
+ /** The collapsed middle of a Breadcrumb (5.15). */
296
+ breadcrumbMore: string;
284
297
  }
285
298
  /** Built-in strings by locale. th and sv also ship as packs (`@jirawatpyk/aura-react/locales/th`, `/sv`, 5.9); in 6.0
286
299
  * only en stays built in and a Thai or Swedish app passes its pack to AuraProvider `strings`. */
@@ -338,6 +351,7 @@ export declare function buttonClass(opts?: {
338
351
  size?: ButtonProps["size"];
339
352
  fullWidth?: boolean | undefined;
340
353
  loading?: boolean | undefined;
354
+ touchHeight?: boolean | undefined;
341
355
  className?: string | undefined;
342
356
  }): string;
343
357
  declare function ServerAlert(props: Omit<AlertProps, "onDismiss">): React$1.ReactElement;
@@ -20,6 +20,9 @@ export interface ButtonProps extends React$1.ButtonHTMLAttributes<HTMLButtonElem
20
20
  fullWidth?: boolean | undefined;
21
21
  /** `sm` is 32px with tighter padding, for toolbars, table rows and card footers. Default `md` (44px). */
22
22
  size?: ButtonSize | undefined;
23
+ /** 44px tall below 640px (the viewport's), whatever `size` — a small button that phones get at full touch height
24
+ * (5.15, Chamber-OS 100). From 640px up it keeps its size. */
25
+ touchHeight?: boolean | undefined;
23
26
  }
24
27
  /** An AURA icon name, or any icon element (e.g. `<Building />` from lucide-react). AURA sizes it and hides it from screen readers. */
25
28
  export type IconInput = IconName | React$1.ReactElement;
@@ -80,6 +83,12 @@ export interface CardProps extends Omit<React$1.HTMLAttributes<HTMLElement>, "ti
80
83
  className?: string | undefined;
81
84
  /** id for the title element; the card is then labelled by it (aria-labelledby). */
82
85
  titleId?: string | undefined;
86
+ /** Free head content in place of `title` and `description` (5.15, Chamber-OS 87): skeleton bars while the card
87
+ * loads, a status pill above a title you mark up yourself. No heading is added; `actions` still sit top-right. */
88
+ header?: React$1.ReactNode | undefined;
89
+ /** Below this width (the viewport's) the card drops its border, surface and shadow — a list whose rows become
90
+ * cards of their own on a phone, so there are no cards in a card (5.15, Chamber-OS 93). Padding is kept. */
91
+ flushBelow?: "sm" | "md" | "lg" | undefined;
83
92
  }
84
93
  export interface AvatarProps {
85
94
  /** Accessible name; also gives the initials and a stable colour. */
@@ -281,6 +290,10 @@ export interface AuraStrings {
281
290
  pagination: string;
282
291
  pageN: (p: number) => string;
283
292
  accepts: (list?: string, max?: number | string) => string;
293
+ /** Progress with a reserved segment (5.15): "2 of 6 used, 1 reserved". */
294
+ progressReserved: (value: number, reserved: number, max: number) => string;
295
+ /** The collapsed middle of a Breadcrumb (5.15). */
296
+ breadcrumbMore: string;
284
297
  }
285
298
  /** Built-in strings by locale. th and sv also ship as packs (`@jirawatpyk/aura-react/locales/th`, `/sv`, 5.9); in 6.0
286
299
  * only en stays built in and a Thai or Swedish app passes its pack to AuraProvider `strings`. */
@@ -338,6 +351,7 @@ export declare function buttonClass(opts?: {
338
351
  size?: ButtonProps["size"];
339
352
  fullWidth?: boolean | undefined;
340
353
  loading?: boolean | undefined;
354
+ touchHeight?: boolean | undefined;
341
355
  className?: string | undefined;
342
356
  }): string;
343
357
  declare function ServerAlert(props: Omit<AlertProps, "onDismiss">): React$1.ReactElement;
@@ -268,6 +268,10 @@ var th = {
268
268
  pageN: function(p) {
269
269
  return "\u0E2B\u0E19\u0E49\u0E32 " + p;
270
270
  },
271
+ progressReserved: function(v, r, max) {
272
+ return "\u0E43\u0E0A\u0E49\u0E41\u0E25\u0E49\u0E27 " + n(v) + " \u0E08\u0E32\u0E01 " + n(max) + " \u0E08\u0E2D\u0E07\u0E44\u0E27\u0E49 " + n(r);
273
+ },
274
+ breadcrumbMore: "\u0E41\u0E2A\u0E14\u0E07\u0E40\u0E2A\u0E49\u0E19\u0E17\u0E32\u0E07\u0E17\u0E31\u0E49\u0E07\u0E2B\u0E21\u0E14",
271
275
  accepts: function(list, max) {
272
276
  return [list, max && "\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19 " + max + " \u0E15\u0E48\u0E2D\u0E44\u0E1F\u0E25\u0E4C"].filter(Boolean).join(" \xB7 ");
273
277
  }
@@ -394,6 +398,10 @@ var sv = {
394
398
  pageN: function(p) {
395
399
  return "Sida " + p;
396
400
  },
401
+ progressReserved: function(v, r, max) {
402
+ return nsv(v) + " av " + nsv(max) + " anv\xE4nda, " + nsv(r) + " reserverade";
403
+ },
404
+ breadcrumbMore: "Visa hela s\xF6kv\xE4gen",
397
405
  accepts: function(list, max) {
398
406
  return [list, max && "h\xF6gst " + max + " per fil"].filter(Boolean).join(", ");
399
407
  }
@@ -521,6 +529,10 @@ var STRINGS = {
521
529
  pageN: function(p) {
522
530
  return "Page " + p;
523
531
  },
532
+ progressReserved: function(v, r, max) {
533
+ return n2(v) + " of " + n2(max) + " used, " + n2(r) + " reserved";
534
+ },
535
+ breadcrumbMore: "Show the full path",
524
536
  accepts: function(list, max) {
525
537
  return [list, max && "up to " + max + " each"].filter(Boolean).join(", ");
526
538
  }
@@ -1047,8 +1059,11 @@ function cardElement(props, ref) {
1047
1059
  "interactive",
1048
1060
  "as",
1049
1061
  "className",
1050
- "titleId"
1062
+ "titleId",
1063
+ "header",
1064
+ "flushBelow"
1051
1065
  ]);
1066
+ const head = props.header !== void 0 && props.header !== null && props.header !== false;
1052
1067
  return h2(
1053
1068
  props.as || "section",
1054
1069
  Object.assign({}, rest, {
@@ -1057,12 +1072,13 @@ function cardElement(props, ref) {
1057
1072
  "aura-card",
1058
1073
  creative && "aura-card--creative",
1059
1074
  props.interactive && "is-interactive",
1075
+ props.flushBelow && "aura-card--flush-below-" + props.flushBelow,
1060
1076
  props.className
1061
1077
  ),
1062
1078
  /* A titled card is labelled by its title; otherwise the caller's aria-labelledby stays (5.8). */
1063
- "aria-labelledby": props.title && props.titleId ? props.titleId : props["aria-labelledby"]
1079
+ "aria-labelledby": !head && props.title && props.titleId ? props.titleId : props["aria-labelledby"]
1064
1080
  }),
1065
- props.title || props.actions ? /* @__PURE__ */ React3.createElement("div", { className: "aura-card__head" }, /* @__PURE__ */ React3.createElement("div", { className: "aura-card__heading" }, props.title ? h2("h" + (props.headingLevel || 3), { className: "aura-card__title", id: props.titleId }, props.title) : null, props.description ? /* @__PURE__ */ React3.createElement("p", { className: "aura-card__desc" }, props.description) : null), props.actions ? /* @__PURE__ */ React3.createElement("div", { className: "aura-card__actions" }, props.actions) : null) : null,
1081
+ head || props.title || props.actions ? /* @__PURE__ */ React3.createElement("div", { className: "aura-card__head" }, /* @__PURE__ */ React3.createElement("div", { className: "aura-card__heading" }, head ? props.header : null, !head && props.title ? h2("h" + (props.headingLevel || 3), { className: "aura-card__title", id: props.titleId }, props.title) : null, !head && props.description ? /* @__PURE__ */ React3.createElement("p", { className: "aura-card__desc" }, props.description) : null), props.actions ? /* @__PURE__ */ React3.createElement("div", { className: "aura-card__actions" }, props.actions) : null) : null,
1066
1082
  props.children ? /* @__PURE__ */ React3.createElement("div", { className: "aura-card__body" }, props.children) : null,
1067
1083
  props.footer ? /* @__PURE__ */ React3.createElement("div", { className: "aura-card__foot" }, props.footer) : null
1068
1084
  );
@@ -1197,6 +1213,7 @@ function buttonClass(opts = {}) {
1197
1213
  "aura-btn--" + (opts.variant || "primary"),
1198
1214
  opts.size === "sm" && "aura-btn--sm",
1199
1215
  opts.fullWidth && "aura-btn--full",
1216
+ opts.touchHeight && "aura-btn--touch",
1200
1217
  opts.loading && "is-loading",
1201
1218
  opts.className
1202
1219
  );