@jirawatpyk/aura-react 5.81.0 → 5.82.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
@@ -248,6 +248,10 @@ DataTable with sort and page in the URL (4.17): `onStateChange={({ sort, page })
248
248
  - **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`.
249
249
  - **Toasts** queue past three instead of dropping: six in a row all show, in order, three at a time.
250
250
 
251
+ ## 5.82 — DxT Monitor 25 (Badge xs)
252
+
253
+ - **Badge `size="xs"`**: 16px high (a larger default font grows it), weight 500, 6px inset — a mark under a cell's main value that keeps a `rowHeight="density"` row at 48px (a 12px line with line-height 12px, 4px gap, the badge; a 12px text at its normal line-height is about 18px and the row grows). Thai text stays 11px at this size — the one exception to the 5.30 rule that Thai labels are at least 12px, so stacked tone marks stay off the 16px outline. Every tone and variant; no icon at this size (a dev warning says so). Also from `@jirawatpyk/aura-react/server`. `<Badge size="xs" variant="outline">Confirm</Badge>`.
254
+
251
255
  ## 5.81 — DxT Monitor 24 (the tab bar hides after a tap)
252
256
 
253
257
  - **BottomNav `hideOnScroll` and AppShell `headerHideOnScroll` after a tap**: with client-side navigation the bar stays mounted, and on Chrome / Android a tap leaves focus on the tapped tab — the bar then never hid on the next page. Focus in the bar now holds it only when it came from the keyboard: focus that enters right after a pointer press doesn't count, and focus moved with the keyboard does (Tab into or within the bar brings it back and keeps it; keys that only scroll the page, such as Space or PageDown, don't). A text field in the bar holds it however it was focused. No new prop; drop any wrapper that blurs the tab on click.
@@ -923,7 +923,10 @@ window.Aura = (() => {
923
923
  );
924
924
  }
925
925
  function badgeElement(props, ref) {
926
- const rest = omit(props, ["tone", "variant", "icon", "className", "children"]);
926
+ const rest = omit(props, ["tone", "variant", "icon", "className", "children", "size"]);
927
+ const xs = props.size === "xs";
928
+ if (xs && props.icon)
929
+ devWarnOnce("badge-xs-icon", 'Badge size="xs" has no icon (16px leaves no room for one); the icon is not shown.');
927
930
  return /* @__PURE__ */ React4.createElement(
928
931
  "span",
929
932
  {
@@ -934,10 +937,11 @@ window.Aura = (() => {
934
937
  "aura-badge--" + tone(props.tone),
935
938
  props.variant === "solid" && "is-solid",
936
939
  props.variant === "outline" && "is-outline",
940
+ xs && "aura-badge--xs",
937
941
  props.className
938
942
  )
939
943
  },
940
- props.icon ? /* @__PURE__ */ React4.createElement(Icon, { name: props.icon, size: 12 }) : null,
944
+ props.icon && !xs ? /* @__PURE__ */ React4.createElement(Icon, { name: props.icon, size: 12 }) : null,
941
945
  props.children
942
946
  );
943
947
  }
@@ -905,7 +905,10 @@ function spinnerElement(props, ref) {
905
905
  );
906
906
  }
907
907
  function badgeElement(props, ref) {
908
- const rest = omit(props, ["tone", "variant", "icon", "className", "children"]);
908
+ const rest = omit(props, ["tone", "variant", "icon", "className", "children", "size"]);
909
+ const xs = props.size === "xs";
910
+ if (xs && props.icon)
911
+ devWarnOnce("badge-xs-icon", 'Badge size="xs" has no icon (16px leaves no room for one); the icon is not shown.');
909
912
  return /* @__PURE__ */ React4.createElement(
910
913
  "span",
911
914
  {
@@ -916,10 +919,11 @@ function badgeElement(props, ref) {
916
919
  "aura-badge--" + tone(props.tone),
917
920
  props.variant === "solid" && "is-solid",
918
921
  props.variant === "outline" && "is-outline",
922
+ xs && "aura-badge--xs",
919
923
  props.className
920
924
  )
921
925
  },
922
- props.icon ? /* @__PURE__ */ React4.createElement(Icon, { name: props.icon, size: 12 }) : null,
926
+ props.icon && !xs ? /* @__PURE__ */ React4.createElement(Icon, { name: props.icon, size: 12 }) : null,
923
927
  props.children
924
928
  );
925
929
  }
@@ -137,7 +137,10 @@ function spinnerElement(props, ref) {
137
137
  );
138
138
  }
139
139
  function badgeElement(props, ref) {
140
- const rest = omit(props, ["tone", "variant", "icon", "className", "children"]);
140
+ const rest = omit(props, ["tone", "variant", "icon", "className", "children", "size"]);
141
+ const xs = props.size === "xs";
142
+ if (xs && props.icon)
143
+ devWarnOnce("badge-xs-icon", 'Badge size="xs" has no icon (16px leaves no room for one); the icon is not shown.');
141
144
  return /* @__PURE__ */ React.createElement(
142
145
  "span",
143
146
  {
@@ -148,10 +151,11 @@ function badgeElement(props, ref) {
148
151
  "aura-badge--" + badgeTone(props.tone),
149
152
  props.variant === "solid" && "is-solid",
150
153
  props.variant === "outline" && "is-outline",
154
+ xs && "aura-badge--xs",
151
155
  props.className
152
156
  )
153
157
  },
154
- props.icon ? /* @__PURE__ */ React.createElement(Icon, { name: props.icon, size: 12 }) : null,
158
+ props.icon && !xs ? /* @__PURE__ */ React.createElement(Icon, { name: props.icon, size: 12 }) : null,
155
159
  props.children
156
160
  );
157
161
  }
package/dist/index.d.cts CHANGED
@@ -1719,6 +1719,9 @@ export interface BadgeProps extends React$1.HTMLAttributes<HTMLSpanElement> {
1719
1719
  /** soft (default) · solid · outline */
1720
1720
  variant?: "soft" | "solid" | "outline" | undefined;
1721
1721
  icon?: IconInput | undefined;
1722
+ /** 5.82 (DxT Monitor 25): `xs` — 16px high, weight 500, 6px inset: a mark under a value inside a `rowHeight="density"`
1723
+ * row. No icon at this size (a dev warning says so). Default `sm` (20px). */
1724
+ size?: "xs" | "sm" | undefined;
1722
1725
  }
1723
1726
  export interface TagProps extends Omit<React$1.HTMLAttributes<HTMLElement>, "onClick"> {
1724
1727
  children: React$1.ReactNode;
package/dist/index.d.ts CHANGED
@@ -1719,6 +1719,9 @@ export interface BadgeProps extends React$1.HTMLAttributes<HTMLSpanElement> {
1719
1719
  /** soft (default) · solid · outline */
1720
1720
  variant?: "soft" | "solid" | "outline" | undefined;
1721
1721
  icon?: IconInput | undefined;
1722
+ /** 5.82 (DxT Monitor 25): `xs` — 16px high, weight 500, 6px inset: a mark under a value inside a `rowHeight="density"`
1723
+ * row. No icon at this size (a dev warning says so). Default `sm` (20px). */
1724
+ size?: "xs" | "sm" | undefined;
1722
1725
  }
1723
1726
  export interface TagProps extends Omit<React$1.HTMLAttributes<HTMLElement>, "onClick"> {
1724
1727
  children: React$1.ReactNode;
@@ -1308,7 +1308,10 @@ function spinnerElement(props, ref) {
1308
1308
  );
1309
1309
  }
1310
1310
  function badgeElement(props, ref) {
1311
- const rest = omit(props, ["tone", "variant", "icon", "className", "children"]);
1311
+ const rest = omit(props, ["tone", "variant", "icon", "className", "children", "size"]);
1312
+ const xs = props.size === "xs";
1313
+ if (xs && props.icon)
1314
+ devWarnOnce("badge-xs-icon", 'Badge size="xs" has no icon (16px leaves no room for one); the icon is not shown.');
1312
1315
  return /* @__PURE__ */ React3.createElement(
1313
1316
  "span",
1314
1317
  {
@@ -1319,10 +1322,11 @@ function badgeElement(props, ref) {
1319
1322
  "aura-badge--" + tone(props.tone),
1320
1323
  props.variant === "solid" && "is-solid",
1321
1324
  props.variant === "outline" && "is-outline",
1325
+ xs && "aura-badge--xs",
1322
1326
  props.className
1323
1327
  )
1324
1328
  },
1325
- props.icon ? /* @__PURE__ */ React3.createElement(Icon, { name: props.icon, size: 12 }) : null,
1329
+ props.icon && !xs ? /* @__PURE__ */ React3.createElement(Icon, { name: props.icon, size: 12 }) : null,
1326
1330
  props.children
1327
1331
  );
1328
1332
  }
@@ -222,6 +222,9 @@ export interface BadgeProps extends React$1.HTMLAttributes<HTMLSpanElement> {
222
222
  /** soft (default) · solid · outline */
223
223
  variant?: "soft" | "solid" | "outline" | undefined;
224
224
  icon?: IconInput | undefined;
225
+ /** 5.82 (DxT Monitor 25): `xs` — 16px high, weight 500, 6px inset: a mark under a value inside a `rowHeight="density"`
226
+ * row. No icon at this size (a dev warning says so). Default `sm` (20px). */
227
+ size?: "xs" | "sm" | undefined;
225
228
  }
226
229
  export interface EmptyStateProps extends Omit<React$1.HTMLAttributes<HTMLDivElement>, "title" | "children"> {
227
230
  title: React$1.ReactNode;
@@ -222,6 +222,9 @@ export interface BadgeProps extends React$1.HTMLAttributes<HTMLSpanElement> {
222
222
  /** soft (default) · solid · outline */
223
223
  variant?: "soft" | "solid" | "outline" | undefined;
224
224
  icon?: IconInput | undefined;
225
+ /** 5.82 (DxT Monitor 25): `xs` — 16px high, weight 500, 6px inset: a mark under a value inside a `rowHeight="density"`
226
+ * row. No icon at this size (a dev warning says so). Default `sm` (20px). */
227
+ size?: "xs" | "sm" | undefined;
225
228
  }
226
229
  export interface EmptyStateProps extends Omit<React$1.HTMLAttributes<HTMLDivElement>, "title" | "children"> {
227
230
  title: React$1.ReactNode;
@@ -1241,7 +1241,10 @@ function spinnerElement(props, ref) {
1241
1241
  );
1242
1242
  }
1243
1243
  function badgeElement(props, ref) {
1244
- const rest = omit(props, ["tone", "variant", "icon", "className", "children"]);
1244
+ const rest = omit(props, ["tone", "variant", "icon", "className", "children", "size"]);
1245
+ const xs = props.size === "xs";
1246
+ if (xs && props.icon)
1247
+ devWarnOnce("badge-xs-icon", 'Badge size="xs" has no icon (16px leaves no room for one); the icon is not shown.');
1245
1248
  return /* @__PURE__ */ React3.createElement(
1246
1249
  "span",
1247
1250
  {
@@ -1252,10 +1255,11 @@ function badgeElement(props, ref) {
1252
1255
  "aura-badge--" + tone(props.tone),
1253
1256
  props.variant === "solid" && "is-solid",
1254
1257
  props.variant === "outline" && "is-outline",
1258
+ xs && "aura-badge--xs",
1255
1259
  props.className
1256
1260
  )
1257
1261
  },
1258
- props.icon ? /* @__PURE__ */ React3.createElement(Icon, { name: props.icon, size: 12 }) : null,
1262
+ props.icon && !xs ? /* @__PURE__ */ React3.createElement(Icon, { name: props.icon, size: 12 }) : null,
1259
1263
  props.children
1260
1264
  );
1261
1265
  }
package/dist/styles.css CHANGED
@@ -1671,6 +1671,12 @@ a.aura-upload__name:focus-visible { outline: var(--aura-focus-ring-width) solid
1671
1671
  .aura-badge--neutral.is-outline { border-color: var(--aura-border-control); }
1672
1672
  .aura-badge.is-solid { background: var(--aura-button-primary-bg); color: var(--aura-button-primary-fg); }
1673
1673
  .aura-badge--danger.is-solid { background: var(--aura-status-blocked-solid-bg); color: var(--aura-status-blocked-solid-fg); }
1674
+ /* 5.82 (DxT Monitor 25): xs — a mark under a cell's value in a density row (48px: a 12px line, 4px, this). 16px at the
1675
+ * default font (min-, so a larger default font grows it), weight 500, 6px inset. Same tones and variants. */
1676
+ .aura-badge--xs { min-height: 16px; padding: 0 6px; font-weight: 500; }
1677
+ /* Thai keeps 11px at xs — the one exception to the 5.30 Thai 12px floor: at 12px with line-height 1 the stacked tone
1678
+ * marks (ซ้ำ) touch the outline; 11px keeps them off the border. */
1679
+ .aura-badge.aura-badge--xs:lang(th) { font-size: max(11px, .6875rem); }
1674
1680
 
1675
1681
  /* ---------- Tag ---------- */
1676
1682
  .aura-tag {
@@ -1673,6 +1673,12 @@ a.aura-upload__name:focus-visible { outline: var(--aura-focus-ring-width) solid
1673
1673
  .aura-badge--neutral.is-outline { border-color: var(--aura-border-control); }
1674
1674
  .aura-badge.is-solid { background: var(--aura-button-primary-bg); color: var(--aura-button-primary-fg); }
1675
1675
  .aura-badge--danger.is-solid { background: var(--aura-status-blocked-solid-bg); color: var(--aura-status-blocked-solid-fg); }
1676
+ /* 5.82 (DxT Monitor 25): xs — a mark under a cell's value in a density row (48px: a 12px line, 4px, this). 16px at the
1677
+ * default font (min-, so a larger default font grows it), weight 500, 6px inset. Same tones and variants. */
1678
+ .aura-badge--xs { min-height: 16px; padding: 0 6px; font-weight: 500; }
1679
+ /* Thai keeps 11px at xs — the one exception to the 5.30 Thai 12px floor: at 12px with line-height 1 the stacked tone
1680
+ * marks (ซ้ำ) touch the outline; 11px keeps them off the border. */
1681
+ .aura-badge.aura-badge--xs:lang(th) { font-size: max(11px, .6875rem); }
1676
1682
 
1677
1683
  /* ---------- Tag ---------- */
1678
1684
  .aura-tag {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jirawatpyk/aura-react",
3
- "version": "5.81.0",
3
+ "version": "5.82.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",