@jirawatpyk/aura-react 5.61.0 → 5.62.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,10 @@ 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.62 — Chamber-OS addendum 78 (#177)
190
+
191
+ - **PageHeader `meta` lays chips out as a row:** a `meta` made only of elements (Badges, a StatusPill — through Fragments and arrays) is now a wrapping row, 8px apart and vertically centred, as `eyebrow` — so chips no longer touch when the JSX has no space between them, and they wrap on a phone. Any text in it — a string `meta` ("128 members · updated 3 min ago"), or a sentence with a `<strong>`, `<time>`, a link or `{count}` — keeps it a text line, as before. Also from `/server`. Drop a `flex flex-wrap items-center gap-2` stand-in wrapper.
192
+
189
193
  ## 5.61 — Chamber-OS addendum 77 (#176)
190
194
 
191
195
  - **A visually hidden child of full-width header actions stays hidden:** below the `actionsFullWidthBelow` width every direct child of PageHeader's actions took a share of the row with `min-width: max-content` — including a visually hidden description beside a button (`aria-describedby` → a `.sr-only` / `.aura-sr-only` span), which grew to its text's width and scrolled the page sideways. The share rule — here and in the `actionsBarBelow` bar — now skips a visually hidden child: `.sr-only`, `.aura-sr-only`, `.visually-hidden`, `.screen-reader-text`, `[hidden]`, or one with an inline `position: absolute` (Radix and React Aria `VisuallyHidden`); the buttons share the row as before. Drop a `.sr-only { min-width: 0 }` stand-in. Another out-of-flow child styled by a class of your own (an absolutely positioned badge) needs `min-width: 0`, or put it inside the button.
@@ -7914,6 +7914,22 @@ window.Aura = (() => {
7914
7914
  // src/PageHeader.tsx
7915
7915
  var React43 = __toESM(require_react(), 1);
7916
7916
  var h8 = React43.createElement;
7917
+ function chipsOnly(node) {
7918
+ let el = 0;
7919
+ const walk = function(n3) {
7920
+ if (n3 == null || typeof n3 === "boolean") return true;
7921
+ if (typeof n3 === "string") return n3.trim() === "";
7922
+ if (typeof n3 === "number" || typeof n3 === "bigint") return false;
7923
+ if (Array.isArray(n3)) return n3.every(walk);
7924
+ if (React43.isValidElement(n3)) {
7925
+ if (n3.type === React43.Fragment) return walk(n3.props.children);
7926
+ el++;
7927
+ return true;
7928
+ }
7929
+ return false;
7930
+ };
7931
+ return walk(node) && el > 0;
7932
+ }
7917
7933
  var PageHeader = React43.forwardRef(function PageHeader2(props, ref) {
7918
7934
  const attrs2 = {};
7919
7935
  Object.keys(props).forEach(function(k) {
@@ -7930,6 +7946,7 @@ window.Aura = (() => {
7930
7946
  const size = props.size === "compact" || props.size === "hero" || props.size === "hero-lg" ? props.size : null;
7931
7947
  const eyebrow = props.eyebrow;
7932
7948
  const plainEyebrow = typeof eyebrow === "string" || typeof eyebrow === "number";
7949
+ const richMeta = chipsOnly(props.meta);
7933
7950
  const heading = h8(
7934
7951
  "h" + level,
7935
7952
  {
@@ -7971,7 +7988,7 @@ window.Aura = (() => {
7971
7988
  h8("div", { className: "aura-page-header__title-addon" }, props.titleAddon)
7972
7989
  ) : heading,
7973
7990
  shown(props.subtitle) ? h8("div", { className: "aura-page-header__subtitle" }, props.subtitle) : null,
7974
- props.meta != null && props.meta !== false ? h8("div", { className: "aura-page-header__meta" }, props.meta) : null
7991
+ props.meta != null && props.meta !== false ? h8("div", { className: cx("aura-page-header__meta", richMeta && "aura-page-header__meta--rich") }, props.meta) : null
7975
7992
  ),
7976
7993
  props.actions != null && props.actions !== false ? h8(
7977
7994
  "div",
@@ -7896,6 +7896,22 @@ var React44 = __toESM(require("react"), 1);
7896
7896
  // src/PageHeader.tsx
7897
7897
  var React43 = __toESM(require("react"), 1);
7898
7898
  var h8 = React43.createElement;
7899
+ function chipsOnly(node) {
7900
+ let el = 0;
7901
+ const walk = function(n3) {
7902
+ if (n3 == null || typeof n3 === "boolean") return true;
7903
+ if (typeof n3 === "string") return n3.trim() === "";
7904
+ if (typeof n3 === "number" || typeof n3 === "bigint") return false;
7905
+ if (Array.isArray(n3)) return n3.every(walk);
7906
+ if (React43.isValidElement(n3)) {
7907
+ if (n3.type === React43.Fragment) return walk(n3.props.children);
7908
+ el++;
7909
+ return true;
7910
+ }
7911
+ return false;
7912
+ };
7913
+ return walk(node) && el > 0;
7914
+ }
7899
7915
  var PageHeader = React43.forwardRef(function PageHeader2(props, ref) {
7900
7916
  const attrs2 = {};
7901
7917
  Object.keys(props).forEach(function(k) {
@@ -7912,6 +7928,7 @@ var PageHeader = React43.forwardRef(function PageHeader2(props, ref) {
7912
7928
  const size = props.size === "compact" || props.size === "hero" || props.size === "hero-lg" ? props.size : null;
7913
7929
  const eyebrow = props.eyebrow;
7914
7930
  const plainEyebrow = typeof eyebrow === "string" || typeof eyebrow === "number";
7931
+ const richMeta = chipsOnly(props.meta);
7915
7932
  const heading = h8(
7916
7933
  "h" + level,
7917
7934
  {
@@ -7953,7 +7970,7 @@ var PageHeader = React43.forwardRef(function PageHeader2(props, ref) {
7953
7970
  h8("div", { className: "aura-page-header__title-addon" }, props.titleAddon)
7954
7971
  ) : heading,
7955
7972
  shown(props.subtitle) ? h8("div", { className: "aura-page-header__subtitle" }, props.subtitle) : null,
7956
- props.meta != null && props.meta !== false ? h8("div", { className: "aura-page-header__meta" }, props.meta) : null
7973
+ props.meta != null && props.meta !== false ? h8("div", { className: cx("aura-page-header__meta", richMeta && "aura-page-header__meta--rich") }, props.meta) : null
7957
7974
  ),
7958
7975
  props.actions != null && props.actions !== false ? h8(
7959
7976
  "div",
@@ -2,6 +2,22 @@
2
2
  import * as React from "react";
3
3
  import { cx } from "./classes.js";
4
4
  const h = React.createElement;
5
+ function chipsOnly(node) {
6
+ let el = 0;
7
+ const walk = function(n) {
8
+ if (n == null || typeof n === "boolean") return true;
9
+ if (typeof n === "string") return n.trim() === "";
10
+ if (typeof n === "number" || typeof n === "bigint") return false;
11
+ if (Array.isArray(n)) return n.every(walk);
12
+ if (React.isValidElement(n)) {
13
+ if (n.type === React.Fragment) return walk(n.props.children);
14
+ el++;
15
+ return true;
16
+ }
17
+ return false;
18
+ };
19
+ return walk(node) && el > 0;
20
+ }
5
21
  const PageHeader = React.forwardRef(function PageHeader2(props, ref) {
6
22
  const attrs = {};
7
23
  Object.keys(props).forEach(function(k) {
@@ -18,6 +34,7 @@ const PageHeader = React.forwardRef(function PageHeader2(props, ref) {
18
34
  const size = props.size === "compact" || props.size === "hero" || props.size === "hero-lg" ? props.size : null;
19
35
  const eyebrow = props.eyebrow;
20
36
  const plainEyebrow = typeof eyebrow === "string" || typeof eyebrow === "number";
37
+ const richMeta = chipsOnly(props.meta);
21
38
  const heading = h(
22
39
  "h" + level,
23
40
  {
@@ -59,7 +76,7 @@ const PageHeader = React.forwardRef(function PageHeader2(props, ref) {
59
76
  h("div", { className: "aura-page-header__title-addon" }, props.titleAddon)
60
77
  ) : heading,
61
78
  shown(props.subtitle) ? h("div", { className: "aura-page-header__subtitle" }, props.subtitle) : null,
62
- props.meta != null && props.meta !== false ? h("div", { className: "aura-page-header__meta" }, props.meta) : null
79
+ props.meta != null && props.meta !== false ? h("div", { className: cx("aura-page-header__meta", richMeta && "aura-page-header__meta--rich") }, props.meta) : null
63
80
  ),
64
81
  props.actions != null && props.actions !== false ? h(
65
82
  "div",
package/dist/index.d.cts CHANGED
@@ -2072,7 +2072,8 @@ export interface PageHeaderProps extends Pick<React$1.HTMLAttributes<HTMLElement
2072
2072
  /** 5.46: `end` (default) lines the actions up with the bottom of the text; `start` with its top (the title, when
2073
2073
  * there is no breadcrumb or eyebrow). */
2074
2074
  actionsAlign?: "end" | "start" | undefined;
2075
- /** A line under the title — counts, last update, owner. */
2075
+ /** A line under the title — counts, last update, owner. 5.62 (Chamber-OS 177): made only of elements (Badges, a
2076
+ * StatusPill), it is laid out as a wrapping row, 8px apart; any text in it keeps it a line. */
2076
2077
  meta?: React$1.ReactNode | undefined;
2077
2078
  /** Buttons for the page, bottom-aligned at the end; they wrap below the text on a narrow screen. */
2078
2079
  actions?: React$1.ReactNode | undefined;
package/dist/index.d.ts CHANGED
@@ -2072,7 +2072,8 @@ export interface PageHeaderProps extends Pick<React$1.HTMLAttributes<HTMLElement
2072
2072
  /** 5.46: `end` (default) lines the actions up with the bottom of the text; `start` with its top (the title, when
2073
2073
  * there is no breadcrumb or eyebrow). */
2074
2074
  actionsAlign?: "end" | "start" | undefined;
2075
- /** A line under the title — counts, last update, owner. */
2075
+ /** A line under the title — counts, last update, owner. 5.62 (Chamber-OS 177): made only of elements (Badges, a
2076
+ * StatusPill), it is laid out as a wrapping row, 8px apart; any text in it keeps it a line. */
2076
2077
  meta?: React$1.ReactNode | undefined;
2077
2078
  /** Buttons for the page, bottom-aligned at the end; they wrap below the text on a narrow screen. */
2078
2079
  actions?: React$1.ReactNode | undefined;
@@ -1632,6 +1632,22 @@ function TableSkeleton(props) {
1632
1632
  // src/PageHeader.tsx
1633
1633
  var React6 = __toESM(require("react"), 1);
1634
1634
  var h5 = React6.createElement;
1635
+ function chipsOnly(node) {
1636
+ let el = 0;
1637
+ const walk = function(n3) {
1638
+ if (n3 == null || typeof n3 === "boolean") return true;
1639
+ if (typeof n3 === "string") return n3.trim() === "";
1640
+ if (typeof n3 === "number" || typeof n3 === "bigint") return false;
1641
+ if (Array.isArray(n3)) return n3.every(walk);
1642
+ if (React6.isValidElement(n3)) {
1643
+ if (n3.type === React6.Fragment) return walk(n3.props.children);
1644
+ el++;
1645
+ return true;
1646
+ }
1647
+ return false;
1648
+ };
1649
+ return walk(node) && el > 0;
1650
+ }
1635
1651
  var PageHeader = React6.forwardRef(function PageHeader2(props, ref) {
1636
1652
  const attrs2 = {};
1637
1653
  Object.keys(props).forEach(function(k) {
@@ -1648,6 +1664,7 @@ var PageHeader = React6.forwardRef(function PageHeader2(props, ref) {
1648
1664
  const size = props.size === "compact" || props.size === "hero" || props.size === "hero-lg" ? props.size : null;
1649
1665
  const eyebrow = props.eyebrow;
1650
1666
  const plainEyebrow = typeof eyebrow === "string" || typeof eyebrow === "number";
1667
+ const richMeta = chipsOnly(props.meta);
1651
1668
  const heading = h5(
1652
1669
  "h" + level,
1653
1670
  {
@@ -1689,7 +1706,7 @@ var PageHeader = React6.forwardRef(function PageHeader2(props, ref) {
1689
1706
  h5("div", { className: "aura-page-header__title-addon" }, props.titleAddon)
1690
1707
  ) : heading,
1691
1708
  shown(props.subtitle) ? h5("div", { className: "aura-page-header__subtitle" }, props.subtitle) : null,
1692
- props.meta != null && props.meta !== false ? h5("div", { className: "aura-page-header__meta" }, props.meta) : null
1709
+ props.meta != null && props.meta !== false ? h5("div", { className: cx("aura-page-header__meta", richMeta && "aura-page-header__meta--rich") }, props.meta) : null
1693
1710
  ),
1694
1711
  props.actions != null && props.actions !== false ? h5(
1695
1712
  "div",
@@ -582,7 +582,8 @@ export interface PageHeaderProps extends Pick<React$1.HTMLAttributes<HTMLElement
582
582
  /** 5.46: `end` (default) lines the actions up with the bottom of the text; `start` with its top (the title, when
583
583
  * there is no breadcrumb or eyebrow). */
584
584
  actionsAlign?: "end" | "start" | undefined;
585
- /** A line under the title — counts, last update, owner. */
585
+ /** A line under the title — counts, last update, owner. 5.62 (Chamber-OS 177): made only of elements (Badges, a
586
+ * StatusPill), it is laid out as a wrapping row, 8px apart; any text in it keeps it a line. */
586
587
  meta?: React$1.ReactNode | undefined;
587
588
  /** Buttons for the page, bottom-aligned at the end; they wrap below the text on a narrow screen. */
588
589
  actions?: React$1.ReactNode | undefined;
@@ -582,7 +582,8 @@ export interface PageHeaderProps extends Pick<React$1.HTMLAttributes<HTMLElement
582
582
  /** 5.46: `end` (default) lines the actions up with the bottom of the text; `start` with its top (the title, when
583
583
  * there is no breadcrumb or eyebrow). */
584
584
  actionsAlign?: "end" | "start" | undefined;
585
- /** A line under the title — counts, last update, owner. */
585
+ /** A line under the title — counts, last update, owner. 5.62 (Chamber-OS 177): made only of elements (Badges, a
586
+ * StatusPill), it is laid out as a wrapping row, 8px apart; any text in it keeps it a line. */
586
587
  meta?: React$1.ReactNode | undefined;
587
588
  /** Buttons for the page, bottom-aligned at the end; they wrap below the text on a narrow screen. */
588
589
  actions?: React$1.ReactNode | undefined;
@@ -1566,6 +1566,22 @@ function TableSkeleton(props) {
1566
1566
  // src/PageHeader.tsx
1567
1567
  import * as React6 from "react";
1568
1568
  var h5 = React6.createElement;
1569
+ function chipsOnly(node) {
1570
+ let el = 0;
1571
+ const walk = function(n3) {
1572
+ if (n3 == null || typeof n3 === "boolean") return true;
1573
+ if (typeof n3 === "string") return n3.trim() === "";
1574
+ if (typeof n3 === "number" || typeof n3 === "bigint") return false;
1575
+ if (Array.isArray(n3)) return n3.every(walk);
1576
+ if (React6.isValidElement(n3)) {
1577
+ if (n3.type === React6.Fragment) return walk(n3.props.children);
1578
+ el++;
1579
+ return true;
1580
+ }
1581
+ return false;
1582
+ };
1583
+ return walk(node) && el > 0;
1584
+ }
1569
1585
  var PageHeader = React6.forwardRef(function PageHeader2(props, ref) {
1570
1586
  const attrs2 = {};
1571
1587
  Object.keys(props).forEach(function(k) {
@@ -1582,6 +1598,7 @@ var PageHeader = React6.forwardRef(function PageHeader2(props, ref) {
1582
1598
  const size = props.size === "compact" || props.size === "hero" || props.size === "hero-lg" ? props.size : null;
1583
1599
  const eyebrow = props.eyebrow;
1584
1600
  const plainEyebrow = typeof eyebrow === "string" || typeof eyebrow === "number";
1601
+ const richMeta = chipsOnly(props.meta);
1585
1602
  const heading = h5(
1586
1603
  "h" + level,
1587
1604
  {
@@ -1623,7 +1640,7 @@ var PageHeader = React6.forwardRef(function PageHeader2(props, ref) {
1623
1640
  h5("div", { className: "aura-page-header__title-addon" }, props.titleAddon)
1624
1641
  ) : heading,
1625
1642
  shown(props.subtitle) ? h5("div", { className: "aura-page-header__subtitle" }, props.subtitle) : null,
1626
- props.meta != null && props.meta !== false ? h5("div", { className: "aura-page-header__meta" }, props.meta) : null
1643
+ props.meta != null && props.meta !== false ? h5("div", { className: cx("aura-page-header__meta", richMeta && "aura-page-header__meta--rich") }, props.meta) : null
1627
1644
  ),
1628
1645
  props.actions != null && props.actions !== false ? h5(
1629
1646
  "div",
package/dist/styles.css CHANGED
@@ -1365,6 +1365,8 @@ summary.aura-link::-webkit-details-marker { display: none; }
1365
1365
  .aura-page-header__title-row > .aura-page-header__title { min-width: 0; }
1366
1366
  .aura-page-header__title-addon { display: flex; flex-wrap: wrap; align-items: center; gap: var(--aura-space-2); min-width: 0; }
1367
1367
  .aura-page-header__eyebrow--rich { display: flex; flex-wrap: wrap; align-items: center; gap: var(--aura-space-2); font-family: var(--font-sans); line-height: 1.5; }
1368
+ /* 5.62 (Chamber-OS 177): a meta of chips only (no text) is a wrapping row, as the eyebrow — 8px apart, 4px under the title. */
1369
+ .aura-page-header__meta--rich { display: flex; flex-wrap: wrap; align-items: center; gap: var(--aura-space-2); }
1368
1370
  .aura-page-header--hero, .aura-page-header--hero-lg { padding-top: var(--aura-page-header-hero-space, var(--aura-space-4)); }
1369
1371
  .aura-page-header--hero .aura-page-header__title { font-size: var(--aura-page-header-title-size, max(30px, 1.875rem)); line-height: var(--aura-page-header-title-line-height, 1.2); }
1370
1372
  /* 5.47 (Chamber-OS 152): compact — the staff boards' 26 / 32; hero steps to 36px from 1024px like hero-lg. */
@@ -1367,6 +1367,8 @@ summary.aura-link::-webkit-details-marker { display: none; }
1367
1367
  .aura-page-header__title-row > .aura-page-header__title { min-width: 0; }
1368
1368
  .aura-page-header__title-addon { display: flex; flex-wrap: wrap; align-items: center; gap: var(--aura-space-2); min-width: 0; }
1369
1369
  .aura-page-header__eyebrow--rich { display: flex; flex-wrap: wrap; align-items: center; gap: var(--aura-space-2); font-family: var(--font-sans); line-height: 1.5; }
1370
+ /* 5.62 (Chamber-OS 177): a meta of chips only (no text) is a wrapping row, as the eyebrow — 8px apart, 4px under the title. */
1371
+ .aura-page-header__meta--rich { display: flex; flex-wrap: wrap; align-items: center; gap: var(--aura-space-2); }
1370
1372
  .aura-page-header--hero, .aura-page-header--hero-lg { padding-top: var(--aura-page-header-hero-space, var(--aura-space-4)); }
1371
1373
  .aura-page-header--hero .aura-page-header__title { font-size: var(--aura-page-header-title-size, max(30px, 1.875rem)); line-height: var(--aura-page-header-title-line-height, 1.2); }
1372
1374
  /* 5.47 (Chamber-OS 152): compact — the staff boards' 26 / 32; hero steps to 36px from 1024px like hero-lg. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jirawatpyk/aura-react",
3
- "version": "5.61.0",
3
+ "version": "5.62.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",