@jirawatpyk/aura-react 5.13.0 → 5.15.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.
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
  import * as React from "react";
3
3
  import { Icon } from "./Icon.js";
4
- import { cx, omit, tone as badgeTone } from "./classes.js";
4
+ import { cx, devWarnOnce, omit, tone as badgeTone } from "./classes.js";
5
5
  import { toneFor } from "./status.js";
6
6
  import {
7
7
  IconBan,
@@ -11,6 +11,9 @@ import {
11
11
  IconCircleDotDashed,
12
12
  IconInbox,
13
13
  IconInfo,
14
+ IconMinus,
15
+ IconTrendingDown,
16
+ IconTrendingUp,
14
17
  IconTriangleAlert
15
18
  } from "./icons.js";
16
19
  const h = React.createElement;
@@ -49,8 +52,11 @@ function cardElement(props, ref) {
49
52
  "interactive",
50
53
  "as",
51
54
  "className",
52
- "titleId"
55
+ "titleId",
56
+ "header",
57
+ "flushBelow"
53
58
  ]);
59
+ const head = props.header !== void 0 && props.header !== null && props.header !== false;
54
60
  return h(
55
61
  props.as || "section",
56
62
  Object.assign({}, rest, {
@@ -59,12 +65,13 @@ function cardElement(props, ref) {
59
65
  "aura-card",
60
66
  creative && "aura-card--creative",
61
67
  props.interactive && "is-interactive",
68
+ props.flushBelow && "aura-card--flush-below-" + props.flushBelow,
62
69
  props.className
63
70
  ),
64
71
  /* A titled card is labelled by its title; otherwise the caller's aria-labelledby stays (5.8). */
65
- "aria-labelledby": props.title && props.titleId ? props.titleId : props["aria-labelledby"]
72
+ "aria-labelledby": !head && props.title && props.titleId ? props.titleId : props["aria-labelledby"]
66
73
  }),
67
- props.title || props.actions ? /* @__PURE__ */ React.createElement("div", { className: "aura-card__head" }, /* @__PURE__ */ React.createElement("div", { className: "aura-card__heading" }, props.title ? h("h" + (props.headingLevel || 3), { className: "aura-card__title", id: props.titleId }, props.title) : null, props.description ? /* @__PURE__ */ React.createElement("p", { className: "aura-card__desc" }, props.description) : null), props.actions ? /* @__PURE__ */ React.createElement("div", { className: "aura-card__actions" }, props.actions) : null) : null,
74
+ head || props.title || props.actions ? /* @__PURE__ */ React.createElement("div", { className: "aura-card__head" }, /* @__PURE__ */ React.createElement("div", { className: "aura-card__heading" }, head ? props.header : null, !head && props.title ? h("h" + (props.headingLevel || 3), { className: "aura-card__title", id: props.titleId }, props.title) : null, !head && props.description ? /* @__PURE__ */ React.createElement("p", { className: "aura-card__desc" }, props.description) : null), props.actions ? /* @__PURE__ */ React.createElement("div", { className: "aura-card__actions" }, props.actions) : null) : null,
68
75
  props.children ? /* @__PURE__ */ React.createElement("div", { className: "aura-card__body" }, props.children) : null,
69
76
  props.footer ? /* @__PURE__ */ React.createElement("div", { className: "aura-card__foot" }, props.footer) : null
70
77
  );
@@ -101,7 +108,7 @@ function badgeElement(props, ref) {
101
108
  );
102
109
  }
103
110
  function emptyStateElement(props, ref) {
104
- const HT = "h" + (props.headingLevel || 3);
111
+ const HT = props.headingLevel === false ? "p" : "h" + (props.headingLevel || 3);
105
112
  const rest = omit(props, [
106
113
  "title",
107
114
  "description",
@@ -133,12 +140,73 @@ function emptyStateElement(props, ref) {
133
140
  props.action ? /* @__PURE__ */ React.createElement("div", { className: "aura-empty__action" }, props.action) : null
134
141
  );
135
142
  }
143
+ function statElement(props, ref, Link) {
144
+ const ch = props.change;
145
+ const dir = ch && (ch.direction || "flat");
146
+ const tone = ch && (ch.tone || (dir === "up" ? "positive" : dir === "down" ? "negative" : "neutral"));
147
+ const v = props.value;
148
+ const numeric = typeof v === "number" || typeof v === "string" && /\d/.test(v) && /^[\s\d.,:+\-\u2212%()\u0E3F$\u20AC\u00A3\u00A5kKmMbB]+$/.test(v.replace(/\b[A-Z]{3}\b/g, ""));
149
+ const Tag = props.href ? Link : props.onClick ? "button" : "div";
150
+ const interactive = !!(props.href || props.onClick);
151
+ if (props.headingLevel && Tag === "button")
152
+ devWarnOnce(
153
+ "stat-heading-button",
154
+ "Stat `headingLevel` is ignored with `onClick`: a heading can\u2019t sit in a button. Use `href`, or put the heading outside."
155
+ );
156
+ const LabelTag = props.headingLevel && Tag !== "button" ? "h" + props.headingLevel : "span";
157
+ const HeadTag = LabelTag === "span" ? "span" : "div";
158
+ return /* @__PURE__ */ React.createElement(
159
+ Tag,
160
+ {
161
+ ref,
162
+ className: cx("aura-stat", interactive && "is-interactive", props.loading && "is-loading", props.className),
163
+ href: props.href,
164
+ onClick: props.onClick,
165
+ type: Tag === "button" ? "button" : void 0,
166
+ "aria-busy": props.loading || void 0
167
+ },
168
+ /* @__PURE__ */ React.createElement(HeadTag, { className: "aura-stat__head" }, /* @__PURE__ */ React.createElement(LabelTag, { className: "aura-stat__label" }, props.label), props.icon ? /* @__PURE__ */ React.createElement("span", { className: "aura-stat__icon" }, /* @__PURE__ */ React.createElement(Icon, { name: props.icon })) : null),
169
+ props.loading ? /* @__PURE__ */ React.createElement("span", { className: "aura-stat__value" }, /* @__PURE__ */ React.createElement("span", { className: "aura-skel aura-stat__skel" })) : /* @__PURE__ */ React.createElement("span", { className: cx("aura-stat__value", numeric && "is-numeric") }, props.value, props.unit ? /* @__PURE__ */ React.createElement("span", { className: "aura-stat__unit" }, props.unit) : null),
170
+ ch && !props.loading || props.caption ? /* @__PURE__ */ React.createElement("span", { className: "aura-stat__foot" }, ch && !props.loading ? /* @__PURE__ */ React.createElement("span", { className: cx("aura-stat__change", "is-" + tone) }, /* @__PURE__ */ React.createElement(
171
+ Icon,
172
+ {
173
+ name: dir === "up" ? /* @__PURE__ */ React.createElement(IconTrendingUp, null) : dir === "down" ? /* @__PURE__ */ React.createElement(IconTrendingDown, null) : /* @__PURE__ */ React.createElement(IconMinus, null),
174
+ size: 14
175
+ }
176
+ ), /* @__PURE__ */ React.createElement("span", null, ch.value)) : null, ch && ch.label && !props.loading ? /* @__PURE__ */ React.createElement("span", { className: "aura-stat__caption" }, ch.label) : null, props.caption ? /* @__PURE__ */ React.createElement("span", { className: "aura-stat__caption" }, props.caption) : null) : null
177
+ );
178
+ }
179
+ const AVATAR_TONES = ["progress", "ready", "neutral", "warning"];
180
+ function initials(name) {
181
+ const parts = String(name || "?").trim().split(/\s+/);
182
+ return ((parts[0] || "?")[0] + (parts.length > 1 ? parts[parts.length - 1][0] : parts[0][1] || "")).toUpperCase();
183
+ }
184
+ function avatarElement(props, ref, broken, onError) {
185
+ const size = props.size || "md";
186
+ let hash = 0;
187
+ String(props.name || "").split("").forEach(function(ch) {
188
+ hash = hash * 31 + ch.charCodeAt(0) >>> 0;
189
+ });
190
+ const tone = AVATAR_TONES[hash % AVATAR_TONES.length];
191
+ return /* @__PURE__ */ React.createElement(
192
+ "span",
193
+ {
194
+ ref,
195
+ className: cx("aura-avatar", "aura-avatar--" + size, "aura-avatar--" + tone, props.className),
196
+ role: "img",
197
+ "aria-label": props.name + (props.status ? ", " + props.status : "")
198
+ },
199
+ props.src && broken !== props.src ? /* @__PURE__ */ React.createElement("img", { key: props.src, src: props.src, alt: "", onError }) : /* @__PURE__ */ React.createElement("span", { "aria-hidden": true }, initials(props.name)),
200
+ props.status === "online" ? /* @__PURE__ */ React.createElement("span", { className: "aura-avatar__status", "aria-hidden": true }) : null
201
+ );
202
+ }
136
203
  function buttonClass(opts = {}) {
137
204
  return cx(
138
205
  "aura-btn",
139
206
  "aura-btn--" + (opts.variant || "primary"),
140
207
  opts.size === "sm" && "aura-btn--sm",
141
208
  opts.fullWidth && "aura-btn--full",
209
+ opts.touchHeight && "aura-btn--touch",
142
210
  opts.loading && "is-loading",
143
211
  opts.className
144
212
  );
@@ -158,17 +226,27 @@ function ServerBadge(props) {
158
226
  function ServerEmptyState(props) {
159
227
  return emptyStateElement(props, void 0);
160
228
  }
229
+ function ServerStat(props) {
230
+ return statElement(omit(props, ["onClick"]), void 0, props.linkComponent || "a");
231
+ }
232
+ function ServerAvatar(props) {
233
+ return avatarElement(props, void 0, null, void 0);
234
+ }
161
235
  export {
162
236
  ALERT_ICON,
163
237
  ServerAlert,
238
+ ServerAvatar,
164
239
  ServerBadge,
165
240
  ServerCard,
166
241
  ServerEmptyState,
242
+ ServerStat,
167
243
  ServerStatusPill,
168
244
  alertElement,
245
+ avatarElement,
169
246
  badgeElement,
170
247
  buttonClass,
171
248
  cardElement,
172
249
  emptyStateElement,
250
+ statElement,
173
251
  statusPillElement
174
252
  };
@@ -122,6 +122,10 @@ const STRINGS = {
122
122
  pageN: function(p) {
123
123
  return "Page " + p;
124
124
  },
125
+ progressReserved: function(v, r, max) {
126
+ return n(v) + " of " + n(max) + " used, " + n(r) + " reserved";
127
+ },
128
+ breadcrumbMore: "Show the full path",
125
129
  accepts: function(list, max) {
126
130
  return [list, max && "up to " + max + " each"].filter(Boolean).join(", ");
127
131
  }
@@ -118,6 +118,10 @@ const sv = {
118
118
  pageN: function(p) {
119
119
  return "Sida " + p;
120
120
  },
121
+ progressReserved: function(v, r, max) {
122
+ return nsv(v) + " av " + nsv(max) + " anv\xE4nda, " + nsv(r) + " reserverade";
123
+ },
124
+ breadcrumbMore: "Visa hela s\xF6kv\xE4gen",
121
125
  accepts: function(list, max) {
122
126
  return [list, max && "h\xF6gst " + max + " per fil"].filter(Boolean).join(", ");
123
127
  }
@@ -118,6 +118,10 @@ const th = {
118
118
  pageN: function(p) {
119
119
  return "\u0E2B\u0E19\u0E49\u0E32 " + p;
120
120
  },
121
+ progressReserved: function(v, r, max) {
122
+ return "\u0E43\u0E0A\u0E49\u0E41\u0E25\u0E49\u0E27 " + n(v) + " \u0E08\u0E32\u0E01 " + n(max) + " \u0E08\u0E2D\u0E07\u0E44\u0E27\u0E49 " + n(r);
123
+ },
124
+ breadcrumbMore: "\u0E41\u0E2A\u0E14\u0E07\u0E40\u0E2A\u0E49\u0E19\u0E17\u0E32\u0E07\u0E17\u0E31\u0E49\u0E07\u0E2B\u0E21\u0E14",
121
125
  accepts: function(list, max) {
122
126
  return [list, max && "\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19 " + max + " \u0E15\u0E48\u0E2D\u0E44\u0E1F\u0E25\u0E4C"].filter(Boolean).join(" \xB7 ");
123
127
  }
package/dist/index.d.cts 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,6 +41,9 @@ 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
  }
@@ -279,6 +285,13 @@ export interface CheckboxProps extends Omit<React$1.InputHTMLAttributes<HTMLInpu
279
285
  disabled?: boolean | undefined;
280
286
  tabIndex?: number | undefined;
281
287
  className?: string | undefined;
288
+ /** How far a click counts around a box without visible text (5.15, Chamber-OS 99): `box` (default, 16×16),
289
+ * `target` (24×24, WCAG 2.5.8, as DataTable's selection column) or `{ x, y }` — px added on each side, so
290
+ * `{ x: 12, y: 8 }` is a 40×32 area. The box looks the same; a labelled checkbox's whole label is its target. */
291
+ hitArea?: "box" | "target" | {
292
+ x: number;
293
+ y: number;
294
+ } | undefined;
282
295
  }
283
296
  /** 32px round button holding one icon. */
284
297
  export interface IconButtonProps extends React$1.ButtonHTMLAttributes<HTMLButtonElement> {
@@ -289,6 +302,9 @@ export interface IconButtonProps extends React$1.ButtonHTMLAttributes<HTMLButton
289
302
  label: string;
290
303
  /** Icon size. Default `sm` (16). */
291
304
  size?: "sm" | "md" | undefined;
305
+ /** 44×44 below 640px (the viewport's) instead of 32×32 — a phone sheet's close button, a card's ⋯ trigger
306
+ * (5.15, Chamber-OS 100). */
307
+ touchHeight?: boolean | undefined;
292
308
  }
293
309
  export interface MenuItem {
294
310
  label?: string | undefined;
@@ -415,6 +431,12 @@ export interface FilterBarProps {
415
431
  /** The search takes all the room the controls leave in its row, instead of stopping at 360px with the count and
416
432
  * actions pushed to the end (5.12). */
417
433
  searchGrow?: boolean | undefined;
434
+ /** `fill`: the filter controls share their row in equal columns (at least 120px each, wrapping when they can't),
435
+ * and the count and actions keep to the end (5.15, Chamber-OS 92). Default `auto`: each at its own width. */
436
+ controlsLayout?: "auto" | "fill" | undefined;
437
+ /** Below this width (the viewport's) the search takes a row of its own above the controls. Default `md` (768px);
438
+ * `lg` (1024px) for bars with several filters (5.15, Chamber-OS 92). */
439
+ stackBelow?: "md" | "lg" | undefined;
418
440
  className?: string | undefined;
419
441
  }
420
442
  /** One command in the palette. */
@@ -623,6 +645,12 @@ export interface CardProps extends Omit<React$1.HTMLAttributes<HTMLElement>, "ti
623
645
  className?: string | undefined;
624
646
  /** id for the title element; the card is then labelled by it (aria-labelledby). */
625
647
  titleId?: string | undefined;
648
+ /** Free head content in place of `title` and `description` (5.15, Chamber-OS 87): skeleton bars while the card
649
+ * loads, a status pill above a title you mark up yourself. No heading is added; `actions` still sit top-right. */
650
+ header?: React$1.ReactNode | undefined;
651
+ /** Below this width (the viewport's) the card drops its border, surface and shadow — a list whose rows become
652
+ * cards of their own on a phone, so there are no cards in a card (5.15, Chamber-OS 93). Padding is kept. */
653
+ flushBelow?: "sm" | "md" | "lg" | undefined;
626
654
  }
627
655
  export interface TabItem {
628
656
  id: string;
@@ -658,8 +686,13 @@ export interface TabsProps {
658
686
  /** `underline` (default) or `segmented`: the tabs as a pill track with the selected one raised, like
659
687
  * SegmentedControl, keeping every Tabs behaviour (panels, keepMounted, activation, tabProps). (5.10, Chamber-OS 72) */
660
688
  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;
689
+ /** Tabs share the full width equally: the segmented track (5.10), or underline tabs (5.15, Chamber-OS 90).
690
+ * `'below-sm' | 'below-md' | 'below-lg'` only below that width (the viewport's) — `below-lg` for phone and tablet
691
+ * layouts, tabs at their own width on a desktop. */
692
+ fullWidth?: boolean | "below-sm" | "below-md" | "below-lg" | undefined;
693
+ /** Link tabs: what the current link is (5.14). `page` (default) for routes; `location` for links to sections of
694
+ * this page (`#contacts`). */
695
+ current?: "page" | "location" | undefined;
663
696
  }
664
697
  export interface NavItem {
665
698
  id: string;
@@ -710,8 +743,16 @@ export interface BreadcrumbProps {
710
743
  label: string;
711
744
  href?: string | undefined;
712
745
  onClick?: (() => void) | undefined;
746
+ /** Attributes for this item's `<li>` — `data-slot`, `data-testid` (5.15, Chamber-OS 94). */
747
+ itemProps?: (React$1.LiHTMLAttributes<HTMLLIElement> & DataAttributes) | undefined;
748
+ /** Attributes for the item's link, button or text (5.15): `data-*`, `target`, `rel`… Its `onClick` runs before
749
+ * the item's own. */
750
+ linkProps?: (React$1.AnchorHTMLAttributes<HTMLAnchorElement> & Omit<React$1.ButtonHTMLAttributes<HTMLButtonElement>, keyof React$1.AnchorHTMLAttributes<HTMLAnchorElement>> & DataAttributes) | undefined;
713
751
  }>;
714
752
  label?: string | undefined;
753
+ /** Below this width (the viewport's) a trail of three or more shows the first item, "…" and the last; the "…"
754
+ * button shows the rest (5.15, Chamber-OS 94). Decided in CSS, so the server's HTML is already right. */
755
+ collapseBelow?: "sm" | "md" | undefined;
715
756
  /** Your router's link (e.g. `Link` from `next/link`) for this component; defaults to AuraProvider's `linkComponent`, then `<a>`. */
716
757
  linkComponent?: React$1.ElementType | undefined;
717
758
  className?: string | undefined;
@@ -953,8 +994,11 @@ export interface DrawerProps extends Pick<React$1.HTMLAttributes<HTMLDivElement>
953
994
  /** The close button's accessible name and tooltip, saying what it closes ("Close payment drawer"). Default: the
954
995
  * built-in "Close" in the provider's language. (5.9) */
955
996
  closeLabel?: string | undefined;
956
- /** Attributes for the close button, e.g. `{ 'data-testid': 'pay-sheet-close' }`. (5.9) */
957
- closeProps?: ButtonAttributes | undefined;
997
+ /** Attributes for the close button, e.g. `{ 'data-testid': 'pay-sheet-close' }` (5.9), or `touchHeight: true` for a
998
+ * 44px close button on phones (5.15). */
999
+ closeProps?: (ButtonAttributes & {
1000
+ touchHeight?: boolean | undefined;
1001
+ }) | undefined;
958
1002
  }
959
1003
  export type Breakpoint = "base" | "sm" | "md" | "lg" | "xl";
960
1004
  export type Responsive<T> = T | Partial<Record<Breakpoint, T>>;
@@ -996,6 +1040,8 @@ export interface AppShellProps {
996
1040
  /** A BottomNav for phones (4.19). Shown below its `hideFrom` breakpoint; the content keeps room for it, and a
997
1041
  * viewport ActionBar sits on top of it. With a `bottomNav` and no `nav`, there is no menu button. */
998
1042
  bottomNav?: React$1.ReactElement | undefined;
1043
+ /** `false` (5.14): `<main>` has no padding, for pages whose containers own the page padding and column. */
1044
+ contentPadding?: boolean | undefined;
999
1045
  className?: string | undefined;
1000
1046
  }
1001
1047
  export interface SeparatorProps {
@@ -1022,6 +1068,10 @@ export interface TableProps extends Omit<React$1.TableHTMLAttributes<HTMLTableEl
1022
1068
  /** `false` (5.13) drops the frame — border, radius, background — and the outer cells' side padding, so the table
1023
1069
  * lines up with the content around it, e.g. flush inside a Card under its heading. Default `true`. */
1024
1070
  bordered?: boolean | undefined;
1071
+ /** How stacked rows look (5.15, Chamber-OS 85): `list` (default) — one frame, rows divided by rules; `cards` —
1072
+ * each row its own framed card, spaced like DataTable's cards, with no frame around them. From the `stackBelow`
1073
+ * width up the table is unchanged. The table then sits in one more `div` (`.aura-tbl-cards`). */
1074
+ stackStyle?: "list" | "cards" | undefined;
1025
1075
  className?: string | undefined;
1026
1076
  children?: React$1.ReactNode | undefined;
1027
1077
  }
@@ -1122,6 +1172,9 @@ export interface StatProps {
1122
1172
  /** Makes the whole card a link or a button (drill-down). */
1123
1173
  href?: string | undefined;
1124
1174
  onClick?: (() => void) | undefined;
1175
+ /** The label as a heading of this level (5.14), when the tile titles its section. Not with `onClick` (a heading
1176
+ * can't sit in a button); a link is fine. Default: a plain label. */
1177
+ headingLevel?: 2 | 3 | 4 | 5 | 6 | undefined;
1125
1178
  className?: string | undefined;
1126
1179
  }
1127
1180
  export interface TimePickerProps extends FieldProps {
@@ -1205,6 +1258,9 @@ export interface ProgressProps {
1205
1258
  showValue?: boolean | undefined;
1206
1259
  /** Replaces the % text, e.g. "3 of 5 files". Also read out as aria-valuetext. */
1207
1260
  valueLabel?: React$1.ReactNode | undefined;
1261
+ /** A reserved amount drawn after `value` as a striped segment of the same tone — queued sends on a quota
1262
+ * (5.15, Chamber-OS 89). Both counts are read out ("2 of 6 used, 1 reserved") unless `valueLabel` is given. */
1263
+ secondaryValue?: number | undefined;
1208
1264
  hint?: React$1.ReactNode | undefined;
1209
1265
  tone?: Tone | undefined;
1210
1266
  size?: "sm" | "md" | undefined;
@@ -1232,7 +1288,9 @@ export interface EmptyStateProps extends Omit<React$1.HTMLAttributes<HTMLDivElem
1232
1288
  /** `danger` (5.13) for a failure — the data couldn't load: the danger tint, a danger-coloured icon, and a solid
1233
1289
  * danger frame with `bordered`. It stays quiet; pass `role="alert"` if it must interrupt. Default `neutral`. */
1234
1290
  tone?: "neutral" | "danger" | undefined;
1235
- headingLevel?: 2 | 3 | 4 | 5 | 6 | undefined;
1291
+ /** The title's heading level (default 3); `false` (5.14) makes it a paragraph, for a card or list whose outline
1292
+ * mustn't change. EmptyState has no live-region role unless you pass `role`. */
1293
+ headingLevel?: 2 | 3 | 4 | 5 | 6 | false | undefined;
1236
1294
  className?: string | undefined;
1237
1295
  }
1238
1296
  export interface PaginationProps {
@@ -1419,6 +1477,7 @@ export declare function buttonClass(opts?: {
1419
1477
  size?: ButtonProps["size"];
1420
1478
  fullWidth?: boolean | undefined;
1421
1479
  loading?: boolean | undefined;
1480
+ touchHeight?: boolean | undefined;
1422
1481
  className?: string | undefined;
1423
1482
  }): string;
1424
1483
  export declare const Alert: React$1.ForwardRefExoticComponent<AlertProps & React$1.RefAttributes<HTMLDivElement>>;
@@ -1602,6 +1661,10 @@ export interface AuraStrings {
1602
1661
  pagination: string;
1603
1662
  pageN: (p: number) => string;
1604
1663
  accepts: (list?: string, max?: number | string) => string;
1664
+ /** Progress with a reserved segment (5.15): "2 of 6 used, 1 reserved". */
1665
+ progressReserved: (value: number, reserved: number, max: number) => string;
1666
+ /** The collapsed middle of a Breadcrumb (5.15). */
1667
+ breadcrumbMore: string;
1605
1668
  }
1606
1669
  /** Built-in strings by locale. th and sv also ship as packs (`@jirawatpyk/aura-react/locales/th`, `/sv`, 5.9); in 6.0
1607
1670
  * only en stays built in and a Thai or Swedish app passes its pack to AuraProvider `strings`. */
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,6 +41,9 @@ 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
  }
@@ -279,6 +285,13 @@ export interface CheckboxProps extends Omit<React$1.InputHTMLAttributes<HTMLInpu
279
285
  disabled?: boolean | undefined;
280
286
  tabIndex?: number | undefined;
281
287
  className?: string | undefined;
288
+ /** How far a click counts around a box without visible text (5.15, Chamber-OS 99): `box` (default, 16×16),
289
+ * `target` (24×24, WCAG 2.5.8, as DataTable's selection column) or `{ x, y }` — px added on each side, so
290
+ * `{ x: 12, y: 8 }` is a 40×32 area. The box looks the same; a labelled checkbox's whole label is its target. */
291
+ hitArea?: "box" | "target" | {
292
+ x: number;
293
+ y: number;
294
+ } | undefined;
282
295
  }
283
296
  /** 32px round button holding one icon. */
284
297
  export interface IconButtonProps extends React$1.ButtonHTMLAttributes<HTMLButtonElement> {
@@ -289,6 +302,9 @@ export interface IconButtonProps extends React$1.ButtonHTMLAttributes<HTMLButton
289
302
  label: string;
290
303
  /** Icon size. Default `sm` (16). */
291
304
  size?: "sm" | "md" | undefined;
305
+ /** 44×44 below 640px (the viewport's) instead of 32×32 — a phone sheet's close button, a card's ⋯ trigger
306
+ * (5.15, Chamber-OS 100). */
307
+ touchHeight?: boolean | undefined;
292
308
  }
293
309
  export interface MenuItem {
294
310
  label?: string | undefined;
@@ -415,6 +431,12 @@ export interface FilterBarProps {
415
431
  /** The search takes all the room the controls leave in its row, instead of stopping at 360px with the count and
416
432
  * actions pushed to the end (5.12). */
417
433
  searchGrow?: boolean | undefined;
434
+ /** `fill`: the filter controls share their row in equal columns (at least 120px each, wrapping when they can't),
435
+ * and the count and actions keep to the end (5.15, Chamber-OS 92). Default `auto`: each at its own width. */
436
+ controlsLayout?: "auto" | "fill" | undefined;
437
+ /** Below this width (the viewport's) the search takes a row of its own above the controls. Default `md` (768px);
438
+ * `lg` (1024px) for bars with several filters (5.15, Chamber-OS 92). */
439
+ stackBelow?: "md" | "lg" | undefined;
418
440
  className?: string | undefined;
419
441
  }
420
442
  /** One command in the palette. */
@@ -623,6 +645,12 @@ export interface CardProps extends Omit<React$1.HTMLAttributes<HTMLElement>, "ti
623
645
  className?: string | undefined;
624
646
  /** id for the title element; the card is then labelled by it (aria-labelledby). */
625
647
  titleId?: string | undefined;
648
+ /** Free head content in place of `title` and `description` (5.15, Chamber-OS 87): skeleton bars while the card
649
+ * loads, a status pill above a title you mark up yourself. No heading is added; `actions` still sit top-right. */
650
+ header?: React$1.ReactNode | undefined;
651
+ /** Below this width (the viewport's) the card drops its border, surface and shadow — a list whose rows become
652
+ * cards of their own on a phone, so there are no cards in a card (5.15, Chamber-OS 93). Padding is kept. */
653
+ flushBelow?: "sm" | "md" | "lg" | undefined;
626
654
  }
627
655
  export interface TabItem {
628
656
  id: string;
@@ -658,8 +686,13 @@ export interface TabsProps {
658
686
  /** `underline` (default) or `segmented`: the tabs as a pill track with the selected one raised, like
659
687
  * SegmentedControl, keeping every Tabs behaviour (panels, keepMounted, activation, tabProps). (5.10, Chamber-OS 72) */
660
688
  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;
689
+ /** Tabs share the full width equally: the segmented track (5.10), or underline tabs (5.15, Chamber-OS 90).
690
+ * `'below-sm' | 'below-md' | 'below-lg'` only below that width (the viewport's) — `below-lg` for phone and tablet
691
+ * layouts, tabs at their own width on a desktop. */
692
+ fullWidth?: boolean | "below-sm" | "below-md" | "below-lg" | undefined;
693
+ /** Link tabs: what the current link is (5.14). `page` (default) for routes; `location` for links to sections of
694
+ * this page (`#contacts`). */
695
+ current?: "page" | "location" | undefined;
663
696
  }
664
697
  export interface NavItem {
665
698
  id: string;
@@ -710,8 +743,16 @@ export interface BreadcrumbProps {
710
743
  label: string;
711
744
  href?: string | undefined;
712
745
  onClick?: (() => void) | undefined;
746
+ /** Attributes for this item's `<li>` — `data-slot`, `data-testid` (5.15, Chamber-OS 94). */
747
+ itemProps?: (React$1.LiHTMLAttributes<HTMLLIElement> & DataAttributes) | undefined;
748
+ /** Attributes for the item's link, button or text (5.15): `data-*`, `target`, `rel`… Its `onClick` runs before
749
+ * the item's own. */
750
+ linkProps?: (React$1.AnchorHTMLAttributes<HTMLAnchorElement> & Omit<React$1.ButtonHTMLAttributes<HTMLButtonElement>, keyof React$1.AnchorHTMLAttributes<HTMLAnchorElement>> & DataAttributes) | undefined;
713
751
  }>;
714
752
  label?: string | undefined;
753
+ /** Below this width (the viewport's) a trail of three or more shows the first item, "…" and the last; the "…"
754
+ * button shows the rest (5.15, Chamber-OS 94). Decided in CSS, so the server's HTML is already right. */
755
+ collapseBelow?: "sm" | "md" | undefined;
715
756
  /** Your router's link (e.g. `Link` from `next/link`) for this component; defaults to AuraProvider's `linkComponent`, then `<a>`. */
716
757
  linkComponent?: React$1.ElementType | undefined;
717
758
  className?: string | undefined;
@@ -953,8 +994,11 @@ export interface DrawerProps extends Pick<React$1.HTMLAttributes<HTMLDivElement>
953
994
  /** The close button's accessible name and tooltip, saying what it closes ("Close payment drawer"). Default: the
954
995
  * built-in "Close" in the provider's language. (5.9) */
955
996
  closeLabel?: string | undefined;
956
- /** Attributes for the close button, e.g. `{ 'data-testid': 'pay-sheet-close' }`. (5.9) */
957
- closeProps?: ButtonAttributes | undefined;
997
+ /** Attributes for the close button, e.g. `{ 'data-testid': 'pay-sheet-close' }` (5.9), or `touchHeight: true` for a
998
+ * 44px close button on phones (5.15). */
999
+ closeProps?: (ButtonAttributes & {
1000
+ touchHeight?: boolean | undefined;
1001
+ }) | undefined;
958
1002
  }
959
1003
  export type Breakpoint = "base" | "sm" | "md" | "lg" | "xl";
960
1004
  export type Responsive<T> = T | Partial<Record<Breakpoint, T>>;
@@ -996,6 +1040,8 @@ export interface AppShellProps {
996
1040
  /** A BottomNav for phones (4.19). Shown below its `hideFrom` breakpoint; the content keeps room for it, and a
997
1041
  * viewport ActionBar sits on top of it. With a `bottomNav` and no `nav`, there is no menu button. */
998
1042
  bottomNav?: React$1.ReactElement | undefined;
1043
+ /** `false` (5.14): `<main>` has no padding, for pages whose containers own the page padding and column. */
1044
+ contentPadding?: boolean | undefined;
999
1045
  className?: string | undefined;
1000
1046
  }
1001
1047
  export interface SeparatorProps {
@@ -1022,6 +1068,10 @@ export interface TableProps extends Omit<React$1.TableHTMLAttributes<HTMLTableEl
1022
1068
  /** `false` (5.13) drops the frame — border, radius, background — and the outer cells' side padding, so the table
1023
1069
  * lines up with the content around it, e.g. flush inside a Card under its heading. Default `true`. */
1024
1070
  bordered?: boolean | undefined;
1071
+ /** How stacked rows look (5.15, Chamber-OS 85): `list` (default) — one frame, rows divided by rules; `cards` —
1072
+ * each row its own framed card, spaced like DataTable's cards, with no frame around them. From the `stackBelow`
1073
+ * width up the table is unchanged. The table then sits in one more `div` (`.aura-tbl-cards`). */
1074
+ stackStyle?: "list" | "cards" | undefined;
1025
1075
  className?: string | undefined;
1026
1076
  children?: React$1.ReactNode | undefined;
1027
1077
  }
@@ -1122,6 +1172,9 @@ export interface StatProps {
1122
1172
  /** Makes the whole card a link or a button (drill-down). */
1123
1173
  href?: string | undefined;
1124
1174
  onClick?: (() => void) | undefined;
1175
+ /** The label as a heading of this level (5.14), when the tile titles its section. Not with `onClick` (a heading
1176
+ * can't sit in a button); a link is fine. Default: a plain label. */
1177
+ headingLevel?: 2 | 3 | 4 | 5 | 6 | undefined;
1125
1178
  className?: string | undefined;
1126
1179
  }
1127
1180
  export interface TimePickerProps extends FieldProps {
@@ -1205,6 +1258,9 @@ export interface ProgressProps {
1205
1258
  showValue?: boolean | undefined;
1206
1259
  /** Replaces the % text, e.g. "3 of 5 files". Also read out as aria-valuetext. */
1207
1260
  valueLabel?: React$1.ReactNode | undefined;
1261
+ /** A reserved amount drawn after `value` as a striped segment of the same tone — queued sends on a quota
1262
+ * (5.15, Chamber-OS 89). Both counts are read out ("2 of 6 used, 1 reserved") unless `valueLabel` is given. */
1263
+ secondaryValue?: number | undefined;
1208
1264
  hint?: React$1.ReactNode | undefined;
1209
1265
  tone?: Tone | undefined;
1210
1266
  size?: "sm" | "md" | undefined;
@@ -1232,7 +1288,9 @@ export interface EmptyStateProps extends Omit<React$1.HTMLAttributes<HTMLDivElem
1232
1288
  /** `danger` (5.13) for a failure — the data couldn't load: the danger tint, a danger-coloured icon, and a solid
1233
1289
  * danger frame with `bordered`. It stays quiet; pass `role="alert"` if it must interrupt. Default `neutral`. */
1234
1290
  tone?: "neutral" | "danger" | undefined;
1235
- headingLevel?: 2 | 3 | 4 | 5 | 6 | undefined;
1291
+ /** The title's heading level (default 3); `false` (5.14) makes it a paragraph, for a card or list whose outline
1292
+ * mustn't change. EmptyState has no live-region role unless you pass `role`. */
1293
+ headingLevel?: 2 | 3 | 4 | 5 | 6 | false | undefined;
1236
1294
  className?: string | undefined;
1237
1295
  }
1238
1296
  export interface PaginationProps {
@@ -1419,6 +1477,7 @@ export declare function buttonClass(opts?: {
1419
1477
  size?: ButtonProps["size"];
1420
1478
  fullWidth?: boolean | undefined;
1421
1479
  loading?: boolean | undefined;
1480
+ touchHeight?: boolean | undefined;
1422
1481
  className?: string | undefined;
1423
1482
  }): string;
1424
1483
  export declare const Alert: React$1.ForwardRefExoticComponent<AlertProps & React$1.RefAttributes<HTMLDivElement>>;
@@ -1602,6 +1661,10 @@ export interface AuraStrings {
1602
1661
  pagination: string;
1603
1662
  pageN: (p: number) => string;
1604
1663
  accepts: (list?: string, max?: number | string) => string;
1664
+ /** Progress with a reserved segment (5.15): "2 of 6 used, 1 reserved". */
1665
+ progressReserved: (value: number, reserved: number, max: number) => string;
1666
+ /** The collapsed middle of a Breadcrumb (5.15). */
1667
+ breadcrumbMore: string;
1605
1668
  }
1606
1669
  /** Built-in strings by locale. th and sv also ship as packs (`@jirawatpyk/aura-react/locales/th`, `/sv`, 5.9); in 6.0
1607
1670
  * 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`. */