@jirawatpyk/aura-tokens 5.10.0 → 5.10.1

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/aura-tailwind.css CHANGED
@@ -1,4 +1,4 @@
1
- /* AURA v5.10.0 — Tailwind v4 theme. GENERATED by scripts/build-tokens.mts from tokens.json. Do not edit by hand.
1
+ /* AURA v5.10.1 — Tailwind v4 theme. GENERATED by scripts/build-tokens.mts from tokens.json. Do not edit by hand.
2
2
  * @import "tailwindcss";
3
3
  * @import "@jirawatpyk/aura-tokens/tailwind.css";
4
4
  * Gives bg-bg-surface, text-fg-primary, border-border-strong, p-aura-6, rounded-aura-xl, shadow-aura-overlay,
@@ -1,4 +1,4 @@
1
- /* AURA v5.10.0 — Tailwind v4 theme with aura- prefixed names. GENERATED by scripts/build-tokens.mts. Do not edit by hand.
1
+ /* AURA v5.10.1 — Tailwind v4 theme with aura- prefixed names. GENERATED by scripts/build-tokens.mts. Do not edit by hand.
2
2
  * For apps that already have a Tailwind theme (shadcn): nothing here redefines an existing name.
3
3
  * @layer aura-tokens, theme, base, aura, components, utilities;
4
4
  * @import "tailwindcss";
package/aura.css CHANGED
@@ -1,4 +1,4 @@
1
- /* AURA v5.10.0 — GENERATED by scripts/build-tokens.mts from tokens.json. Do not edit by hand. */
1
+ /* AURA v5.10.1 — GENERATED by scripts/build-tokens.mts from tokens.json. Do not edit by hand. */
2
2
  /* Fonts: load aura-fonts.css (or the <link> tags in README) separately, so a blocked Google Fonts never breaks this file. */
3
3
 
4
4
  :root, [data-theme="light"] {
@@ -3883,6 +3883,16 @@ window.Aura = (() => {
3883
3883
 
3884
3884
  // src/Tag.tsx
3885
3885
  var React24 = __toESM(require_react(), 1);
3886
+ function textOf(node) {
3887
+ if (node == null || typeof node === "boolean") return "";
3888
+ if (typeof node === "string" || typeof node === "number") return String(node);
3889
+ if (Array.isArray(node)) return node.map(textOf).join("");
3890
+ if (React24.isValidElement(node)) {
3891
+ const p = node.props;
3892
+ return p["aria-hidden"] === true || p["aria-hidden"] === "true" ? "" : textOf(p.children);
3893
+ }
3894
+ return "";
3895
+ }
3886
3896
  var Tag = React24.forwardRef(function Tag2(props, ref) {
3887
3897
  const t = useStrings();
3888
3898
  const selectable = props.onClick != null || props.selected != null;
@@ -3906,12 +3916,18 @@ window.Aura = (() => {
3906
3916
  inner[1]
3907
3917
  );
3908
3918
  }
3919
+ const name = props.onRemove && !props.removeLabel ? textOf(props.children).replace(/\s+/g, " ").trim() : "";
3920
+ if (props.onRemove && !props.disabled && !props.removeLabel && !name)
3921
+ devWarnOnce(
3922
+ "tag-remove-label",
3923
+ 'Tag: the remove button has no name \u2014 its children have no text. Pass removeLabel (e.g. "Remove Acme AB").'
3924
+ );
3909
3925
  return /* @__PURE__ */ React24.createElement("span", { ...rest, ref, className: cx("aura-tag", props.disabled && "is-disabled", props.className) }, inner, props.onRemove && !props.disabled ? /* @__PURE__ */ React24.createElement(
3910
3926
  "button",
3911
3927
  {
3912
3928
  type: "button",
3913
3929
  className: "aura-tag__remove",
3914
- "aria-label": props.removeLabel || t.remove(typeof props.children === "string" ? props.children : ""),
3930
+ "aria-label": props.removeLabel || t.remove(name),
3915
3931
  onClick: props.onRemove
3916
3932
  },
3917
3933
  /* @__PURE__ */ React24.createElement(Icon, { name: /* @__PURE__ */ React24.createElement(IconX, null), size: 12 })
@@ -466,7 +466,13 @@ a.aura-icon-btn { text-decoration: none; }
466
466
  .aura-radio-group.is-invalid .aura-radio:not(:checked) { border-color: var(--aura-border-danger); }
467
467
 
468
468
  .aura-switch-row { display: flex; align-items: flex-start; gap: var(--aura-space-3); font-family: var(--font-sans); }
469
- .aura-switch-row.is-disabled { opacity: var(--aura-disabled-opacity); }
469
+ /* 5.10.1: disabled rows, on or off, are treated alike and stay readable — the label turns secondary, the description
470
+ * keeps its colour (often the reason it's locked) — and only the switch fades: off to the disabled opacity, on to 0.75,
471
+ * ≥3:1 apart in both themes, so "locked on" never looks like "off". */
472
+ .aura-switch-row.is-disabled { cursor: not-allowed; }
473
+ .aura-switch-row.is-disabled .aura-choice__label { color: var(--aura-fg-secondary); cursor: not-allowed; }
474
+ .aura-switch:disabled { opacity: var(--aura-disabled-opacity); }
475
+ .aura-switch.is-on:disabled { opacity: 0.75; }
470
476
  .aura-switch {
471
477
  position: relative; flex: none; box-sizing: border-box; margin: 0; padding: 0;
472
478
  width: var(--aura-switch-width); height: var(--aura-switch-height); border-radius: var(--aura-radius-full);
@@ -1601,6 +1607,11 @@ button.aura-stepper__step:hover .aura-stepper__label { text-decoration: underlin
1601
1607
  .aura-switch__thumb { background: CanvasText; forced-color-adjust: none; }
1602
1608
  .aura-switch.is-on { background: Highlight; forced-color-adjust: none; }
1603
1609
  .aura-switch.is-on .aura-switch__thumb { background: HighlightText; }
1610
+ .aura-switch:disabled, .aura-switch.is-on:disabled { border-color: GrayText; opacity: 1; }
1611
+ .aura-switch:disabled .aura-switch__thumb { background: GrayText; }
1612
+ .aura-switch.is-on:disabled { background: GrayText; }
1613
+ .aura-switch.is-on:disabled .aura-switch__thumb { background: Canvas; }
1614
+ .aura-switch-row.is-disabled .aura-choice__label { color: GrayText; }
1604
1615
  .aura-progress__track, .aura-upload__bar { border: 1px solid CanvasText; }
1605
1616
  .aura-progress__bar, .aura-upload__bar > span { background: Highlight; forced-color-adjust: none; }
1606
1617
  .aura-segmented__option.is-selected { outline: 2px solid Highlight; outline-offset: -2px; }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jirawatpyk/aura-tokens",
3
- "version": "5.10.0",
3
+ "version": "5.10.1",
4
4
  "description": "AURA Design System — tokens (CSS variables, Tailwind preset, Figma variables), theme contrast checks and token lint.",
5
5
  "main": "tailwind.tokens.cjs",
6
6
  "types": "components/index.d.ts",
package/tokens.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "5.10.0",
2
+ "version": "5.10.1",
3
3
  "meta": {
4
4
  "name": "AURA Design System",
5
5
  "tier": "3-tier",