@jirawatpyk/aura-react 5.52.0 → 5.53.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/README.md CHANGED
@@ -186,6 +186,16 @@ DataTable with sort and page in the URL (4.17): `onStateChange={({ sort, page })
186
186
  - **Time zone**: `timeZone` on AuraProvider, DatePicker, DateRangePicker and Calendar decides "today" (the marker, `min`/`max="today"`, the first month shown); or pass `today` as an ISO date. `todayIn('Asia/Bangkok')` is exported from the root and `/server`.
187
187
  - **Toasts** queue past three instead of dropping: six in a row all show, in order, three at a time.
188
188
 
189
+ ## 5.53 — Chamber-OS addendum 66 (#165)
190
+
191
+ - **A phone sheet's footer buttons wrap and are 44px:** below 640px a Dialog's footer stacks its buttons full width, and now they behave as `fullWidth` there (a Button directly in `footer`, or the only Button in a wrapper such as a Tooltip or a menu trigger); a Drawer's footer buttons stay in their row but wrap and are 44px too — a long label (Swedish, Thai) wraps instead of running out, and each is at least 44px tall whatever the density or pointer, with no `touchHeight` needed. From 640px the footer is unchanged: right-aligned, the density's height, one line. Drop any `touchHeight` you added to footer buttons only for this.
192
+ - **`fullWidth="below-sm"` / `"below-md"`** on Button, a link Button and `buttonClass` (so in Server Components too): full width and wrapping, at least 44px tall, only below 640px / 768px (the viewport's); its natural width above — for action rows that stack on phones and sit inline on a desktop. `fullWidth` (`true`) is unchanged. Inside a PageHeader's `actionsFullWidthBelow` row with an IconButton, that row's own sizing wins.
193
+
194
+ ```jsx
195
+ <Button fullWidth="below-sm">Skicka för godkännande igen</Button>
196
+ <Link href="/renew" className={buttonClass({ variant: 'secondary', fullWidth: 'below-sm' })}>Renew</Link>
197
+ ```
198
+
189
199
  ## 5.52 — Chamber-OS addendum 65 (#164)
190
200
 
191
201
  - **`Table loading`** (with `loadingRows`, default 5): the head as given, then placeholder rows in its columns — and below `stackBelow`, the same cards (title and action slots kept). Each column follows its head cell: `skeleton={{ lines: 1 | 2, kind: 'text' | 'pill' | 'action', touch }}` (two lines for a value over its caption, a status pill, or a block as tall as a small Button — 44px on a phone card with `touch`), its width from `skeletonWidth`, else the cell's `width` or `style.width`, else an even share of what is left. The THead must be a direct child (call your head as a function, not your own component) — a dev notice says so — and its first row must be the column row (with grouped headers, columns come from that first row). A head cell whose content isn't plain text (an icon, a sort button) needs `label` for the cards' field labels. TBody and TFoot aren't rendered while loading, so a totals row appears with the data.
@@ -831,7 +831,9 @@ window.Aura = (() => {
831
831
  "aura-btn",
832
832
  "aura-btn--" + (opts.variant || "primary"),
833
833
  opts.size === "sm" && "aura-btn--sm",
834
- opts.fullWidth && "aura-btn--full",
834
+ opts.fullWidth && opts.fullWidth !== "below-sm" && opts.fullWidth !== "below-md" && "aura-btn--full",
835
+ /* 5.53 (Chamber-OS 165): full width on phones only. */
836
+ (opts.fullWidth === "below-sm" || opts.fullWidth === "below-md") && "aura-btn--full-" + opts.fullWidth,
835
837
  opts.touchHeight && "aura-btn--touch",
836
838
  opts.loading && "is-loading",
837
839
  opts.className
@@ -813,7 +813,9 @@ function buttonClass(opts = {}) {
813
813
  "aura-btn",
814
814
  "aura-btn--" + (opts.variant || "primary"),
815
815
  opts.size === "sm" && "aura-btn--sm",
816
- opts.fullWidth && "aura-btn--full",
816
+ opts.fullWidth && opts.fullWidth !== "below-sm" && opts.fullWidth !== "below-md" && "aura-btn--full",
817
+ /* 5.53 (Chamber-OS 165): full width on phones only. */
818
+ (opts.fullWidth === "below-sm" || opts.fullWidth === "below-md") && "aura-btn--full-" + opts.fullWidth,
817
819
  opts.touchHeight && "aura-btn--touch",
818
820
  opts.loading && "is-loading",
819
821
  opts.className
@@ -231,7 +231,9 @@ function buttonClass(opts = {}) {
231
231
  "aura-btn",
232
232
  "aura-btn--" + (opts.variant || "primary"),
233
233
  opts.size === "sm" && "aura-btn--sm",
234
- opts.fullWidth && "aura-btn--full",
234
+ opts.fullWidth && opts.fullWidth !== "below-sm" && opts.fullWidth !== "below-md" && "aura-btn--full",
235
+ /* 5.53 (Chamber-OS 165): full width on phones only. */
236
+ (opts.fullWidth === "below-sm" || opts.fullWidth === "below-md") && "aura-btn--full-" + opts.fullWidth,
235
237
  opts.touchHeight && "aura-btn--touch",
236
238
  opts.loading && "is-loading",
237
239
  opts.className
package/dist/index.d.cts CHANGED
@@ -16,8 +16,10 @@ export interface ButtonProps extends React$1.ButtonHTMLAttributes<HTMLButtonElem
16
16
  iconRight?: IconInput | undefined;
17
17
  /** Shows a spinner in place of the leading icon, sets aria-busy and swallows clicks. Keeps the label and width. */
18
18
  loading?: boolean | undefined;
19
- /** Fills its container and lets a long label wrap onto more lines (at least 44px tall) — phones, Thai and Swedish labels. */
20
- fullWidth?: boolean | undefined;
19
+ /** Fills its container and lets a long label wrap onto more lines (at least 44px tall) — phones, Thai and Swedish labels.
20
+ * `'below-sm'` / `'below-md'` (5.53, Chamber-OS 165): only below 640px / 768px (the viewport's), at least 44px tall
21
+ * there whatever the density, its natural width above — for action rows that stack on phones and sit inline above. */
22
+ fullWidth?: boolean | "below-sm" | "below-md" | undefined;
21
23
  /** `sm` is 32px with tighter padding, for toolbars, table rows and card footers. Default `md` (44px). */
22
24
  size?: ButtonSize | undefined;
23
25
  /** 44px tall below 640px (the viewport's) or wherever the primary pointer is coarse (a tablet, 5.24), whatever
@@ -38,8 +40,9 @@ export interface ButtonLinkProps extends Omit<React$1.AnchorHTMLAttributes<HTMLA
38
40
  iconRight?: IconInput | undefined;
39
41
  /** Looks unavailable and can't be followed: no href, `aria-disabled`, out of the Tab order. */
40
42
  disabled?: boolean | undefined;
41
- /** Fills its container and lets a long label wrap (at least 44px tall). */
42
- fullWidth?: boolean | undefined;
43
+ /** Fills its container and lets a long label wrap (at least 44px tall). `'below-sm'` / `'below-md'` (5.53): only
44
+ * below 640px / 768px. */
45
+ fullWidth?: boolean | "below-sm" | "below-md" | undefined;
43
46
  /** `sm` is 32px with tighter padding. Default `md` (44px). */
44
47
  size?: ButtonSize | undefined;
45
48
  /** 44px tall below 640px (the viewport's) or wherever the primary pointer is coarse (a tablet, 5.24), whatever
@@ -1932,7 +1935,7 @@ export declare const DateRangePicker: React$1.ForwardRefExoticComponent<DateRang
1932
1935
  export declare function buttonClass(opts?: {
1933
1936
  variant?: ButtonProps["variant"];
1934
1937
  size?: ButtonProps["size"];
1935
- fullWidth?: boolean | undefined;
1938
+ fullWidth?: boolean | "below-sm" | "below-md" | undefined;
1936
1939
  loading?: boolean | undefined;
1937
1940
  touchHeight?: boolean | undefined;
1938
1941
  className?: string | undefined;
package/dist/index.d.ts CHANGED
@@ -16,8 +16,10 @@ export interface ButtonProps extends React$1.ButtonHTMLAttributes<HTMLButtonElem
16
16
  iconRight?: IconInput | undefined;
17
17
  /** Shows a spinner in place of the leading icon, sets aria-busy and swallows clicks. Keeps the label and width. */
18
18
  loading?: boolean | undefined;
19
- /** Fills its container and lets a long label wrap onto more lines (at least 44px tall) — phones, Thai and Swedish labels. */
20
- fullWidth?: boolean | undefined;
19
+ /** Fills its container and lets a long label wrap onto more lines (at least 44px tall) — phones, Thai and Swedish labels.
20
+ * `'below-sm'` / `'below-md'` (5.53, Chamber-OS 165): only below 640px / 768px (the viewport's), at least 44px tall
21
+ * there whatever the density, its natural width above — for action rows that stack on phones and sit inline above. */
22
+ fullWidth?: boolean | "below-sm" | "below-md" | undefined;
21
23
  /** `sm` is 32px with tighter padding, for toolbars, table rows and card footers. Default `md` (44px). */
22
24
  size?: ButtonSize | undefined;
23
25
  /** 44px tall below 640px (the viewport's) or wherever the primary pointer is coarse (a tablet, 5.24), whatever
@@ -38,8 +40,9 @@ export interface ButtonLinkProps extends Omit<React$1.AnchorHTMLAttributes<HTMLA
38
40
  iconRight?: IconInput | undefined;
39
41
  /** Looks unavailable and can't be followed: no href, `aria-disabled`, out of the Tab order. */
40
42
  disabled?: boolean | undefined;
41
- /** Fills its container and lets a long label wrap (at least 44px tall). */
42
- fullWidth?: boolean | undefined;
43
+ /** Fills its container and lets a long label wrap (at least 44px tall). `'below-sm'` / `'below-md'` (5.53): only
44
+ * below 640px / 768px. */
45
+ fullWidth?: boolean | "below-sm" | "below-md" | undefined;
43
46
  /** `sm` is 32px with tighter padding. Default `md` (44px). */
44
47
  size?: ButtonSize | undefined;
45
48
  /** 44px tall below 640px (the viewport's) or wherever the primary pointer is coarse (a tablet, 5.24), whatever
@@ -1932,7 +1935,7 @@ export declare const DateRangePicker: React$1.ForwardRefExoticComponent<DateRang
1932
1935
  export declare function buttonClass(opts?: {
1933
1936
  variant?: ButtonProps["variant"];
1934
1937
  size?: ButtonProps["size"];
1935
- fullWidth?: boolean | undefined;
1938
+ fullWidth?: boolean | "below-sm" | "below-md" | undefined;
1936
1939
  loading?: boolean | undefined;
1937
1940
  touchHeight?: boolean | undefined;
1938
1941
  className?: string | undefined;
@@ -1387,7 +1387,9 @@ function buttonClass(opts = {}) {
1387
1387
  "aura-btn",
1388
1388
  "aura-btn--" + (opts.variant || "primary"),
1389
1389
  opts.size === "sm" && "aura-btn--sm",
1390
- opts.fullWidth && "aura-btn--full",
1390
+ opts.fullWidth && opts.fullWidth !== "below-sm" && opts.fullWidth !== "below-md" && "aura-btn--full",
1391
+ /* 5.53 (Chamber-OS 165): full width on phones only. */
1392
+ (opts.fullWidth === "below-sm" || opts.fullWidth === "below-md") && "aura-btn--full-" + opts.fullWidth,
1391
1393
  opts.touchHeight && "aura-btn--touch",
1392
1394
  opts.loading && "is-loading",
1393
1395
  opts.className
@@ -16,8 +16,10 @@ export interface ButtonProps extends React$1.ButtonHTMLAttributes<HTMLButtonElem
16
16
  iconRight?: IconInput | undefined;
17
17
  /** Shows a spinner in place of the leading icon, sets aria-busy and swallows clicks. Keeps the label and width. */
18
18
  loading?: boolean | undefined;
19
- /** Fills its container and lets a long label wrap onto more lines (at least 44px tall) — phones, Thai and Swedish labels. */
20
- fullWidth?: boolean | undefined;
19
+ /** Fills its container and lets a long label wrap onto more lines (at least 44px tall) — phones, Thai and Swedish labels.
20
+ * `'below-sm'` / `'below-md'` (5.53, Chamber-OS 165): only below 640px / 768px (the viewport's), at least 44px tall
21
+ * there whatever the density, its natural width above — for action rows that stack on phones and sit inline above. */
22
+ fullWidth?: boolean | "below-sm" | "below-md" | undefined;
21
23
  /** `sm` is 32px with tighter padding, for toolbars, table rows and card footers. Default `md` (44px). */
22
24
  size?: ButtonSize | undefined;
23
25
  /** 44px tall below 640px (the viewport's) or wherever the primary pointer is coarse (a tablet, 5.24), whatever
@@ -484,7 +486,7 @@ export type AuraIcon = React$1.ForwardRefExoticComponent<Omit<IconProps, "name">
484
486
  export declare function buttonClass(opts?: {
485
487
  variant?: ButtonProps["variant"];
486
488
  size?: ButtonProps["size"];
487
- fullWidth?: boolean | undefined;
489
+ fullWidth?: boolean | "below-sm" | "below-md" | undefined;
488
490
  loading?: boolean | undefined;
489
491
  touchHeight?: boolean | undefined;
490
492
  className?: string | undefined;
@@ -16,8 +16,10 @@ export interface ButtonProps extends React$1.ButtonHTMLAttributes<HTMLButtonElem
16
16
  iconRight?: IconInput | undefined;
17
17
  /** Shows a spinner in place of the leading icon, sets aria-busy and swallows clicks. Keeps the label and width. */
18
18
  loading?: boolean | undefined;
19
- /** Fills its container and lets a long label wrap onto more lines (at least 44px tall) — phones, Thai and Swedish labels. */
20
- fullWidth?: boolean | undefined;
19
+ /** Fills its container and lets a long label wrap onto more lines (at least 44px tall) — phones, Thai and Swedish labels.
20
+ * `'below-sm'` / `'below-md'` (5.53, Chamber-OS 165): only below 640px / 768px (the viewport's), at least 44px tall
21
+ * there whatever the density, its natural width above — for action rows that stack on phones and sit inline above. */
22
+ fullWidth?: boolean | "below-sm" | "below-md" | undefined;
21
23
  /** `sm` is 32px with tighter padding, for toolbars, table rows and card footers. Default `md` (44px). */
22
24
  size?: ButtonSize | undefined;
23
25
  /** 44px tall below 640px (the viewport's) or wherever the primary pointer is coarse (a tablet, 5.24), whatever
@@ -484,7 +486,7 @@ export type AuraIcon = React$1.ForwardRefExoticComponent<Omit<IconProps, "name">
484
486
  export declare function buttonClass(opts?: {
485
487
  variant?: ButtonProps["variant"];
486
488
  size?: ButtonProps["size"];
487
- fullWidth?: boolean | undefined;
489
+ fullWidth?: boolean | "below-sm" | "below-md" | undefined;
488
490
  loading?: boolean | undefined;
489
491
  touchHeight?: boolean | undefined;
490
492
  className?: string | undefined;
@@ -1322,7 +1322,9 @@ function buttonClass(opts = {}) {
1322
1322
  "aura-btn",
1323
1323
  "aura-btn--" + (opts.variant || "primary"),
1324
1324
  opts.size === "sm" && "aura-btn--sm",
1325
- opts.fullWidth && "aura-btn--full",
1325
+ opts.fullWidth && opts.fullWidth !== "below-sm" && opts.fullWidth !== "below-md" && "aura-btn--full",
1326
+ /* 5.53 (Chamber-OS 165): full width on phones only. */
1327
+ (opts.fullWidth === "below-sm" || opts.fullWidth === "below-md") && "aura-btn--full-" + opts.fullWidth,
1326
1328
  opts.touchHeight && "aura-btn--touch",
1327
1329
  opts.loading && "is-loading",
1328
1330
  opts.className
package/dist/styles.css CHANGED
@@ -33,6 +33,12 @@ a.aura-btn { text-decoration: none; }
33
33
  width: 100%; height: auto; min-height: var(--aura-button-height); white-space: normal; flex-shrink: 1;
34
34
  padding-block: var(--aura-space-2); line-height: 1.35; text-align: center; overflow-wrap: anywhere;
35
35
  }
36
+ /* 5.53 (Chamber-OS 165): fullWidth="below-md" — the same, only below 768px, and at least 44px tall there, touchHeight
37
+ * or not (hence the doubled class); its natural width above. "below-sm" is with the phone rules (max-width 639.98px). */
38
+ @media (max-width: 767.98px) {
39
+ .aura-btn.aura-btn.aura-btn--full-below-md { width: 100%; height: auto; min-height: var(--aura-touch-target); white-space: normal; flex-shrink: 1;
40
+ padding-block: var(--aura-space-2); line-height: 1.35; text-align: center; overflow-wrap: anywhere; }
41
+ }
36
42
  .aura-btn.is-loading { cursor: progress; }
37
43
  /* 5.14: a button gated with aria-disabled looks unavailable but stays focusable (no pointer-events: none, so the
38
44
  * not-allowed cursor and a tooltip still work). */
@@ -1756,6 +1762,15 @@ button.aura-stepper__step:hover .aura-stepper__label { text-decoration: underlin
1756
1762
  padding-bottom: calc(var(--aura-space-6) + env(safe-area-inset-bottom)); animation-name: aura-sheet-in; }
1757
1763
  .aura-dialog__foot { flex-direction: column-reverse; }
1758
1764
  .aura-dialog__foot > * { width: 100%; }
1765
+ /* 5.53 (Chamber-OS 165): a phone sheet's or drawer's footer button (or one a Tooltip or menu wraps) behaves as
1766
+ * fullWidth — a long label wraps instead of running out, at least 44px tall whatever the density or pointer; so does
1767
+ * fullWidth="below-sm" (the doubled class beats touchHeight's height). Drawer footers stay in their row. */
1768
+ .aura-dialog__foot > .aura-btn, .aura-dialog__foot > * > .aura-btn:only-child,
1769
+ .aura-drawer__foot > .aura-btn, .aura-drawer__foot > * > .aura-btn:only-child, .aura-btn.aura-btn.aura-btn--full-below-sm {
1770
+ height: auto; min-height: var(--aura-touch-target); white-space: normal; flex-shrink: 1;
1771
+ padding-block: var(--aura-space-2); line-height: 1.35; text-align: center; overflow-wrap: anywhere; }
1772
+ .aura-dialog__foot > * > .aura-btn:only-child, .aura-btn.aura-btn.aura-btn--full-below-sm { width: 100%; }
1773
+ .aura-drawer__foot > * { max-width: 100%; }
1759
1774
  .aura-drawer:not(.aura-drawer--nav) { max-width: none; }
1760
1775
  .aura-toaster { left: var(--aura-space-4); right: var(--aura-space-4); bottom: var(--aura-space-4); width: auto; }
1761
1776
  .aura-toaster.is-center { left: var(--aura-space-4); right: var(--aura-space-4); transform: none; }
@@ -35,6 +35,12 @@ a.aura-btn { text-decoration: none; }
35
35
  width: 100%; height: auto; min-height: var(--aura-button-height); white-space: normal; flex-shrink: 1;
36
36
  padding-block: var(--aura-space-2); line-height: 1.35; text-align: center; overflow-wrap: anywhere;
37
37
  }
38
+ /* 5.53 (Chamber-OS 165): fullWidth="below-md" — the same, only below 768px, and at least 44px tall there, touchHeight
39
+ * or not (hence the doubled class); its natural width above. "below-sm" is with the phone rules (max-width 639.98px). */
40
+ @media (max-width: 767.98px) {
41
+ .aura-btn.aura-btn.aura-btn--full-below-md { width: 100%; height: auto; min-height: var(--aura-touch-target); white-space: normal; flex-shrink: 1;
42
+ padding-block: var(--aura-space-2); line-height: 1.35; text-align: center; overflow-wrap: anywhere; }
43
+ }
38
44
  .aura-btn.is-loading { cursor: progress; }
39
45
  /* 5.14: a button gated with aria-disabled looks unavailable but stays focusable (no pointer-events: none, so the
40
46
  * not-allowed cursor and a tooltip still work). */
@@ -1758,6 +1764,15 @@ button.aura-stepper__step:hover .aura-stepper__label { text-decoration: underlin
1758
1764
  padding-bottom: calc(var(--aura-space-6) + env(safe-area-inset-bottom)); animation-name: aura-sheet-in; }
1759
1765
  .aura-dialog__foot { flex-direction: column-reverse; }
1760
1766
  .aura-dialog__foot > * { width: 100%; }
1767
+ /* 5.53 (Chamber-OS 165): a phone sheet's or drawer's footer button (or one a Tooltip or menu wraps) behaves as
1768
+ * fullWidth — a long label wraps instead of running out, at least 44px tall whatever the density or pointer; so does
1769
+ * fullWidth="below-sm" (the doubled class beats touchHeight's height). Drawer footers stay in their row. */
1770
+ .aura-dialog__foot > .aura-btn, .aura-dialog__foot > * > .aura-btn:only-child,
1771
+ .aura-drawer__foot > .aura-btn, .aura-drawer__foot > * > .aura-btn:only-child, .aura-btn.aura-btn.aura-btn--full-below-sm {
1772
+ height: auto; min-height: var(--aura-touch-target); white-space: normal; flex-shrink: 1;
1773
+ padding-block: var(--aura-space-2); line-height: 1.35; text-align: center; overflow-wrap: anywhere; }
1774
+ .aura-dialog__foot > * > .aura-btn:only-child, .aura-btn.aura-btn.aura-btn--full-below-sm { width: 100%; }
1775
+ .aura-drawer__foot > * { max-width: 100%; }
1761
1776
  .aura-drawer:not(.aura-drawer--nav) { max-width: none; }
1762
1777
  .aura-toaster { left: var(--aura-space-4); right: var(--aura-space-4); bottom: var(--aura-space-4); width: auto; }
1763
1778
  .aura-toaster.is-center { left: var(--aura-space-4); right: var(--aura-space-4); transform: none; }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jirawatpyk/aura-react",
3
- "version": "5.52.0",
3
+ "version": "5.53.0",
4
4
  "description": "AURA Design System — React components (Enterprise Standard, Human Creative). Thai-first: Buddhist-era dates, Thai collation.",
5
5
  "license": "MIT",
6
6
  "type": "module",