@webority/ui-react 0.130.1 → 0.130.2

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.
Files changed (29) hide show
  1. package/dist/canvas-kit/kit.js +972 -483
  2. package/dist/canvas-kit/manifest.json +600 -100
  3. package/dist/canvas-kit/release.json +6 -6
  4. package/dist/components/AppTooltip.js +1 -1
  5. package/dist/guidance.json +568 -68
  6. package/dist/types/components/AppAutocomplete.d.ts +2 -2
  7. package/dist/types/components/AppCheckbox.d.ts +1 -1
  8. package/dist/types/components/AppCountrySelect.d.ts +1 -1
  9. package/dist/types/components/AppDatePicker.d.ts +1 -1
  10. package/dist/types/components/AppDateRangePicker.d.ts +1 -1
  11. package/dist/types/components/AppDropZone.d.ts +2 -2
  12. package/dist/types/components/AppDropdown.d.ts +1 -1
  13. package/dist/types/components/AppFileAttachment.d.ts +3 -3
  14. package/dist/types/components/AppFilePicker.d.ts +2 -2
  15. package/dist/types/components/AppImagePicker.d.ts +2 -2
  16. package/dist/types/components/AppInput.d.ts +2 -2
  17. package/dist/types/components/AppMentionInput.d.ts +1 -1
  18. package/dist/types/components/AppNumberInput.d.ts +1 -1
  19. package/dist/types/components/AppOtpInput.d.ts +1 -1
  20. package/dist/types/components/AppPhoneNumberInput.d.ts +2 -2
  21. package/dist/types/components/AppRadio.d.ts +1 -1
  22. package/dist/types/components/AppRadioGroup.d.ts +1 -1
  23. package/dist/types/components/AppScoreScale.d.ts +1 -1
  24. package/dist/types/components/AppSearch.d.ts +1 -1
  25. package/dist/types/components/AppSelect.d.ts +1 -1
  26. package/dist/types/components/AppTagInput.d.ts +1 -1
  27. package/dist/types/components/AppTextarea.d.ts +2 -2
  28. package/dist/types/components/AppTimePicker.d.ts +1 -1
  29. package/package.json +7 -7
@@ -11839,40 +11839,46 @@ var us = ({ trigger: i = ["hover", "focus"], overlay: a, children: o, popperConf
11839
11839
  options: { offset: [0, 6] }
11840
11840
  }] };
11841
11841
  function ds(e) {
11842
- let { marker: r, props: i } = U("AppTooltip", e), { content: a, children: o, placement: s = "top", tone: l = "neutral", variant: u, size: d = "md", open: f, shortcut: p, className: m = "", ...h } = i;
11843
- G("AppTooltip", h), W("AppTooltip", "tone", l, Tfe), W("AppTooltip", "variant", u, Efe), W("AppTooltip", "size", d, Dfe), W("AppTooltip", "placement", s, kfe);
11844
- let _ = g(), [v, y] = C(!1), b = typeof f == "boolean", x = [
11842
+ let { marker: r, props: i } = U("AppTooltip", e), { content: a, children: o, placement: s = "top", tone: l = "neutral", variant: u, size: d = "md", open: f, shortcut: p, className: m = "", ..._ } = i;
11843
+ G("AppTooltip", _), W("AppTooltip", "tone", l, Tfe), W("AppTooltip", "variant", u, Efe), W("AppTooltip", "size", d, Dfe), W("AppTooltip", "placement", s, kfe);
11844
+ let v = g(), [y, b] = C(!1), x = typeof f == "boolean", w = [
11845
11845
  "wui-tooltip",
11846
11846
  l && l !== "neutral" ? `tone-${l}` : "",
11847
11847
  u ? `wui-tooltip-${u}` : "",
11848
11848
  d && d !== "md" ? `size-${d}` : "",
11849
11849
  m
11850
- ].filter(Boolean).join(" "), w = /* @__PURE__ */ n(ss, {
11851
- id: _,
11852
- className: x,
11850
+ ].filter(Boolean).join(" "), T = /* @__PURE__ */ n(ss, {
11851
+ id: v,
11852
+ className: w,
11853
11853
  ...r,
11854
11854
  children: [a, ei(p, { inTooltip: !0 })]
11855
- }), T = (e) => {
11856
- o.props.onClick?.(e), h.onClick?.(e), y(!1);
11857
- }, E = S(!1), D = (e) => {
11858
- o.props.onFocusCapture?.(e), h.onFocusCapture?.(e), E.current = !e.currentTarget.matches?.(":focus-visible"), queueMicrotask(() => {
11859
- E.current = !1;
11855
+ }), E = (e) => {
11856
+ o.props.onClick?.(e), _.onClick?.(e), b(!1);
11857
+ }, D = S(!1), O = (e) => {
11858
+ o.props.onFocusCapture?.(e), _.onFocusCapture?.(e), D.current = !e.currentTarget.matches?.(":focus-visible"), queueMicrotask(() => {
11859
+ D.current = !1;
11860
11860
  });
11861
11861
  };
11862
- return /* @__PURE__ */ t(us, {
11862
+ return h(() => {
11863
+ if (x || !y) return;
11864
+ let e = (e) => {
11865
+ e.key === "Escape" && (e.stopPropagation(), b(!1));
11866
+ };
11867
+ return document.addEventListener("keydown", e, !0), () => document.removeEventListener("keydown", e, !0);
11868
+ }, [x, y]), /* @__PURE__ */ t(us, {
11863
11869
  trigger: ["hover", "focus"],
11864
11870
  placement: Ofe[s] || s,
11865
11871
  popperConfig: Afe,
11866
- show: b ? f : v,
11867
- onToggle: b ? void 0 : (e) => {
11868
- let t = E.current;
11869
- E.current = !1, e && t || y(e);
11872
+ show: x ? f : y,
11873
+ onToggle: x ? void 0 : (e) => {
11874
+ let t = D.current;
11875
+ D.current = !1, e && t || b(e);
11870
11876
  },
11871
- overlay: w,
11872
- children: b ? c(o, h) : c(o, {
11873
- ...h,
11874
- onClick: T,
11875
- onFocusCapture: D
11877
+ overlay: T,
11878
+ children: x ? c(o, _) : c(o, {
11879
+ ..._,
11880
+ onClick: E,
11881
+ onFocusCapture: O
11876
11882
  })
11877
11883
  });
11878
11884
  }
@@ -63452,7 +63458,7 @@ function SGe(e) {
63452
63458
  ...v
63453
63459
  });
63454
63460
  }
63455
- // ../elements/dist/WuiContextMenu-C_u0AVna.js
63461
+ // ../elements/dist/WuiContextMenu-BvDHn1cP.js
63456
63462
  var jK = "[role=\"menuitem\"]", MK = ".wui-context-menu-sub", NK = "input.wui-context-menu-search", CGe = "input, textarea, select, [contenteditable=\"\"], [contenteditable=\"true\"]", PK = "data-open", wGe = 500, TGe = 10, EGe = 400, FK = null, IK = null, DGe = 0, LK = /* @__PURE__ */ new WeakMap();
63457
63463
  function RK(e, t, n) {
63458
63464
  let r = LK.get(e);
@@ -63494,7 +63500,7 @@ fc("wui-context-menu", class extends pc {
63494
63500
  };
63495
63501
  }
63496
63502
  connectedCallback() {
63497
- this._teardown(), document.addEventListener("contextmenu", this._onContextMenuCapture, !0), document.addEventListener("contextmenu", this._onContextMenu), document.addEventListener("keydown", this._onDocKeyDown), document.addEventListener("pointerdown", this._onPointerDownCapture, !0), document.addEventListener("pointerdown", this._onPointerDown), document.addEventListener("click", this._onClickCapture, !0), document.addEventListener("click", this._onDocClick), this.addEventListener("keydown", this._onKeyDown), this.addEventListener("click", this._onClick), this.addEventListener("input", this._onInput), this.addEventListener("mousemove", this._onMouseMove), this._syncOpen();
63503
+ this._teardown(), document.addEventListener("contextmenu", this._onContextMenuCapture, !0), document.addEventListener("contextmenu", this._onContextMenu), document.addEventListener("keydown", this._onDocKeyDown), document.addEventListener("pointerdown", this._onPointerDownCapture, !0), document.addEventListener("pointerdown", this._onPointerDown), document.addEventListener("click", this._onClickCapture, !0), document.addEventListener("click", this._onDocClick), window.addEventListener("keydown", this._onKeyDown, !0), this.addEventListener("click", this._onClick), this.addEventListener("input", this._onInput), this.addEventListener("mousemove", this._onMouseMove), this._syncOpen();
63498
63504
  }
63499
63505
  disconnectedCallback() {
63500
63506
  this._teardown();
@@ -63689,7 +63695,7 @@ fc("wui-context-menu", class extends pc {
63689
63695
  e ? this._closeSubByKey(e) : this.close(!0);
63690
63696
  }
63691
63697
  } else if (e.key === "Tab") this.close(!0);
63692
- else if (e.key === "ArrowDown" || e.key === "ArrowUp") e.preventDefault(), this._step(n, r, e.key === "ArrowDown" ? 1 : -1);
63698
+ else if (e.key === "ArrowDown" || e.key === "ArrowUp") e.preventDefault(), e.stopPropagation(), this._step(n, r, e.key === "ArrowDown" ? 1 : -1);
63693
63699
  else if (e.key === "ArrowRight") {
63694
63700
  let t = r && this._subOf(r);
63695
63701
  if (!t) return;
@@ -63776,7 +63782,7 @@ fc("wui-context-menu", class extends pc {
63776
63782
  })));
63777
63783
  }
63778
63784
  _teardown() {
63779
- this.close(), this._cancelPress(), document.removeEventListener("contextmenu", this._onContextMenuCapture, !0), document.removeEventListener("contextmenu", this._onContextMenu), document.removeEventListener("keydown", this._onDocKeyDown), document.removeEventListener("pointerdown", this._onPointerDownCapture, !0), document.removeEventListener("pointerdown", this._onPointerDown), document.removeEventListener("click", this._onClickCapture, !0), document.removeEventListener("click", this._onDocClick), this.removeEventListener("keydown", this._onKeyDown), this.removeEventListener("click", this._onClick), this.removeEventListener("input", this._onInput), this.removeEventListener("mousemove", this._onMouseMove);
63785
+ this.close(), this._cancelPress(), document.removeEventListener("contextmenu", this._onContextMenuCapture, !0), document.removeEventListener("contextmenu", this._onContextMenu), document.removeEventListener("keydown", this._onDocKeyDown), document.removeEventListener("pointerdown", this._onPointerDownCapture, !0), document.removeEventListener("pointerdown", this._onPointerDown), document.removeEventListener("click", this._onClickCapture, !0), document.removeEventListener("click", this._onDocClick), window.removeEventListener("keydown", this._onKeyDown, !0), this.removeEventListener("click", this._onClick), this.removeEventListener("input", this._onInput), this.removeEventListener("mousemove", this._onMouseMove);
63780
63786
  }
63781
63787
  });
63782
63788
  // dist/components/AppContextMenu.js
@@ -68693,7 +68699,7 @@ function Vqe({ item: e, isImage: r, linkComponent: i, onRemove: a, removeLabel:
68693
68699
  ]
68694
68700
  });
68695
68701
  }
68696
- // ../elements/dist/fileViewerUi-D9R6-gZt.js
68702
+ // ../elements/dist/fileViewerUi-N3zooUFM.js
68697
68703
  function Cq(e, ...t) {
68698
68704
  console.warn(e, ...t);
68699
68705
  }
@@ -68742,12 +68748,16 @@ function Dq(e, t) {
68742
68748
  }
68743
68749
  function Oq(e, { items: t, onPick: n, label: r }) {
68744
68750
  let i = null, a = (t = !1) => {
68745
- i && (i.remove(), i = null, e.setAttribute("aria-expanded", "false"), document.removeEventListener("pointerdown", o, !0), window.removeEventListener("scroll", s, !0), window.removeEventListener("resize", s), t && e.focus());
68751
+ i && (i.remove(), i = null, e.setAttribute("aria-expanded", "false"), document.removeEventListener("pointerdown", o, !0), window.removeEventListener("scroll", s, !0), window.removeEventListener("resize", s), window.removeEventListener("keydown", c, !0), t && e.focus());
68746
68752
  }, o = (t) => {
68747
68753
  i && !i.contains(t.target) && !e.contains(t.target) && a();
68748
68754
  }, s = (e) => {
68749
68755
  i && e.target instanceof Node && i.contains(e.target) || a();
68750
- }, c = () => {
68756
+ }, c = (e) => {
68757
+ if (!i?.contains(e.target)) return;
68758
+ let t = [...i.querySelectorAll(".dropdown-item")], n = t.indexOf(document.activeElement);
68759
+ e.key === "ArrowDown" || e.key === "ArrowUp" ? (e.preventDefault(), e.stopPropagation(), t[(n + (e.key === "ArrowDown" ? 1 : -1) + t.length) % t.length]?.focus()) : e.key === "Home" || e.key === "End" ? (e.preventDefault(), (e.key === "Home" ? t[0] : t.at(-1))?.focus()) : (e.key === "Escape" || e.key === "Tab") && (e.key === "Escape" && (e.preventDefault(), e.stopPropagation()), a(e.key === "Escape"));
68760
+ }, l = () => {
68751
68761
  i = document.createElement("div"), i.className = "dropdown-menu show wui-file-viewer-menu", i.setAttribute("role", "menu"), i.setAttribute("aria-label", r);
68752
68762
  for (let e of t()) {
68753
68763
  if (e.divider) {
@@ -68762,13 +68772,10 @@ function Oq(e, { items: t, onPick: n, label: r }) {
68762
68772
  a(!0), n(e.key);
68763
68773
  }), i.append(t);
68764
68774
  }
68765
- i.addEventListener("keydown", (e) => {
68766
- let t = [...i.querySelectorAll(".dropdown-item")], n = t.indexOf(document.activeElement);
68767
- e.key === "ArrowDown" || e.key === "ArrowUp" ? (e.preventDefault(), t[(n + (e.key === "ArrowDown" ? 1 : -1) + t.length) % t.length]?.focus()) : e.key === "Home" || e.key === "End" ? (e.preventDefault(), (e.key === "Home" ? t[0] : t.at(-1))?.focus()) : (e.key === "Escape" || e.key === "Tab") && (e.key === "Escape" && (e.preventDefault(), e.stopPropagation()), a(e.key === "Escape"));
68768
- }), e.closest("wui-file-viewer")?.append(i), Uqe(e, i), e.setAttribute("aria-expanded", "true"), document.addEventListener("pointerdown", o, !0), window.addEventListener("scroll", s, !0), window.addEventListener("resize", s), (i.querySelector("[aria-checked=\"true\"]") ?? i.querySelector(".dropdown-item"))?.focus();
68775
+ e.closest("wui-file-viewer")?.append(i), Uqe(e, i), e.setAttribute("aria-expanded", "true"), document.addEventListener("pointerdown", o, !0), window.addEventListener("scroll", s, !0), window.addEventListener("resize", s), window.addEventListener("keydown", c, !0), (i.querySelector("[aria-checked=\"true\"]") ?? i.querySelector(".dropdown-item"))?.focus();
68769
68776
  };
68770
- return e.setAttribute("aria-haspopup", "menu"), e.setAttribute("aria-expanded", "false"), e.addEventListener("click", () => i ? a() : c()), e.addEventListener("keydown", (e) => {
68771
- i || e.key !== "ArrowDown" && e.key !== "ArrowUp" || (e.preventDefault(), c());
68777
+ return e.setAttribute("aria-haspopup", "menu"), e.setAttribute("aria-expanded", "false"), e.addEventListener("click", () => i ? a() : l()), e.addEventListener("keydown", (e) => {
68778
+ i || e.key !== "ArrowDown" && e.key !== "ArrowUp" || (e.preventDefault(), l());
68772
68779
  }), { close: a };
68773
68780
  }
68774
68781
  var kq, Aq = P((() => {
@@ -133900,7 +133907,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
133900
133907
  kind: "WeborityWeb",
133901
133908
  library: {
133902
133909
  name: "@webority/ui-react",
133903
- version: "0.130.1"
133910
+ version: "0.130.2"
133904
133911
  },
133905
133912
  rendererProtocolVersion: 13,
133906
133913
  platform: "Web",
@@ -134008,11 +134015,12 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
134008
134015
  instead: "plain sections with headings"
134009
134016
  },
134010
134017
  {
134011
- text: "It is one short hint attached to a field label.",
134018
+ text: "It is a short helper text attached to a field label.",
134012
134019
  instead: "AppInfoTip"
134013
134020
  }
134014
134021
  ],
134015
134022
  do: [{
134023
+ title: "Titles that name what is inside",
134016
134024
  note: "Write the title as the question or the thing the reader is looking for. They are scanning titles, not content.",
134017
134025
  example: [{
134018
134026
  component: "AppAccordion",
@@ -134024,6 +134032,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
134024
134032
  }]
134025
134033
  }],
134026
134034
  dont: [{
134035
+ title: "Titles that name what is inside",
134027
134036
  note: "\"More information\" says nothing about what is inside, so the reader has to open every pane to find what they want.",
134028
134037
  example: [{
134029
134038
  component: "AppAccordion",
@@ -134125,6 +134134,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
134125
134134
  }
134126
134135
  ],
134127
134136
  do: [{
134137
+ title: "Offer switching only with several accounts",
134128
134138
  note: "The current account is ticked, and each other account is one row to switch to.",
134129
134139
  example: [{
134130
134140
  component: "AppAccountSwitcher",
@@ -134143,6 +134153,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
134143
134153
  }]
134144
134154
  }],
134145
134155
  dont: [{
134156
+ title: "Offer switching only with several accounts",
134146
134157
  note: "A list of one account. There is nothing to switch to, so the section does not earn its place.",
134147
134158
  example: [{
134148
134159
  component: "AppAccountSwitcher",
@@ -134297,6 +134308,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
134297
134308
  }
134298
134309
  ],
134299
134310
  do: [{
134311
+ title: "Collapse the extra actions",
134300
134312
  note: "When a row has more than two or three actions, collapse the extras behind a single \"more\" trigger.",
134301
134313
  example: [{
134302
134314
  component: "AppActionIcon",
@@ -134306,6 +134318,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
134306
134318
  }
134307
134319
  }]
134308
134320
  }, {
134321
+ title: "Use a conventional glyph",
134309
134322
  note: "A recognisable, conventional glyph. A trash can reads as \"delete\" with no thinking.",
134310
134323
  example: [{
134311
134324
  component: "AppActionIcon",
@@ -134316,6 +134329,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
134316
134329
  }]
134317
134330
  }],
134318
134331
  dont: [{
134332
+ title: "Collapse the extra actions",
134319
134333
  note: "Five icons crammed in a row is a guessing game, with too many targets to scan at a glance.",
134320
134334
  example: [
134321
134335
  {
@@ -134356,6 +134370,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
134356
134370
  }
134357
134371
  ]
134358
134372
  }, {
134373
+ title: "Use a conventional glyph",
134359
134374
  note: "An obscure glyph for a common action makes the user hover and hope. Stick to the conventional icon.",
134360
134375
  example: [{
134361
134376
  component: "AppActionIcon",
@@ -134530,6 +134545,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
134530
134545
  }
134531
134546
  ],
134532
134547
  do: [{
134548
+ title: "Match the tone to the message",
134533
134549
  note: "Match the tone to intent and say what to do next. A danger alert names the problem and the recovery.",
134534
134550
  example: [{
134535
134551
  component: "AppAlert",
@@ -134537,6 +134553,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
134537
134553
  children: "We couldn't save your changes: check the highlighted fields and try again."
134538
134554
  }]
134539
134555
  }, {
134556
+ title: "Use info for a neutral notice",
134540
134557
  note: "A neutral, informational notice uses the info tone: calm, not alarming.",
134541
134558
  example: [{
134542
134559
  component: "AppAlert",
@@ -134545,6 +134562,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
134545
134562
  }]
134546
134563
  }],
134547
134564
  dont: [{
134565
+ title: "Match the tone to the message",
134548
134566
  note: "A success (green) tone on an error message contradicts the words. The colour lies about what happened.",
134549
134567
  example: [{
134550
134568
  component: "AppAlert",
@@ -134552,6 +134570,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
134552
134570
  children: "Something went wrong while saving."
134553
134571
  }]
134554
134572
  }, {
134573
+ title: "Use info for a neutral notice",
134555
134574
  note: "A warning (amber) tone on a purely informational message implies a problem that is not there.",
134556
134575
  example: [{
134557
134576
  component: "AppAlert",
@@ -134653,6 +134672,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
134653
134672
  }
134654
134673
  ],
134655
134674
  do: [{
134675
+ title: "Shape the skeleton like the content",
134656
134676
  note: "A skeleton shaped like the content that is coming. The layout does not jump on arrival.",
134657
134677
  example: [{
134658
134678
  component: "AppAsyncBlock",
@@ -134677,8 +134697,34 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
134677
134697
  },
134678
134698
  children: "content"
134679
134699
  }]
134700
+ }, {
134701
+ title: "Use the shared loading state",
134702
+ note: "The shared loading state owns the loading, error and empty handling, so each screen does not hand-roll its own.",
134703
+ example: [{
134704
+ component: "AppAsyncBlock",
134705
+ props: { loading: !0 },
134706
+ children: "content"
134707
+ }]
134680
134708
  }],
134681
134709
  dont: [{
134710
+ title: "Shape the skeleton like the content",
134711
+ note: "A single tall block that matches no part of the content makes the layout jump when the data arrives.",
134712
+ example: [{
134713
+ component: "AppAsyncBlock",
134714
+ props: {
134715
+ loading: !0,
134716
+ skeleton: {
134717
+ component: "AppSkeleton",
134718
+ props: {
134719
+ width: "100%",
134720
+ height: 300
134721
+ }
134722
+ }
134723
+ },
134724
+ children: "content"
134725
+ }]
134726
+ }, {
134727
+ title: "Use the shared loading state",
134682
134728
  note: "A bare \"loading…\" string hand-rolled per screen is inconsistent, and it skips the shared empty and error handling entirely.",
134683
134729
  example: [{
134684
134730
  component: "div",
@@ -134833,7 +134879,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
134833
134879
  name: "helperText",
134834
134880
  type: "string",
134835
134881
  required: !1,
134836
- description: "A hint shown under the field when there is no error."
134882
+ description: "Helper text shown under the field when there is no error."
134837
134883
  },
134838
134884
  {
134839
134885
  name: "id",
@@ -134922,7 +134968,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
134922
134968
  name: "placeholder",
134923
134969
  type: "string",
134924
134970
  required: !1,
134925
- description: "Hint text shown in the empty field.",
134971
+ description: "Placeholder text shown in the empty field.",
134926
134972
  default: "Search…"
134927
134973
  },
134928
134974
  {
@@ -135004,6 +135050,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
135004
135050
  }
135005
135051
  ],
135006
135052
  do: [{
135053
+ title: "Autocomplete for long lists only",
135007
135054
  note: "A long list users know by name. Type-to-find lands them on the right row in one or two keystrokes.",
135008
135055
  example: [{
135009
135056
  component: "AppAutocomplete",
@@ -135057,6 +135104,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
135057
135104
  }
135058
135105
  }]
135059
135106
  }, {
135107
+ title: "Radios for a handful of options",
135060
135108
  note: "For a handful of exclusive options, radios show every choice at once. No typing, no dropdown.",
135061
135109
  example: [
135062
135110
  {
@@ -135084,6 +135132,20 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
135084
135132
  ]
135085
135133
  }],
135086
135134
  dont: [{
135135
+ title: "Autocomplete for long lists only",
135136
+ note: "Reserve the remote search for genuinely large or server-side lists, where loadOptions fetches only matches.",
135137
+ example: [{
135138
+ component: "AppAutocomplete",
135139
+ props: {
135140
+ label: "City (remote)",
135141
+ name: "city-remote",
135142
+ placeholder: "Type to search…",
135143
+ minChars: 1,
135144
+ helperText: "Debounced search with a loading spinner."
135145
+ }
135146
+ }]
135147
+ }, {
135148
+ title: "Radios for a handful of options",
135087
135149
  note: "Three fixed options do not need a search box. The field is heavier than the choice.",
135088
135150
  example: [{
135089
135151
  component: "AppAutocomplete",
@@ -135106,22 +135168,10 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
135106
135168
  ]
135107
135169
  }
135108
135170
  }]
135109
- }, {
135110
- note: "Reserve the remote search for genuinely large or server-side lists, where loadOptions fetches only matches.",
135111
- example: [{
135112
- component: "AppAutocomplete",
135113
- props: {
135114
- label: "City (remote)",
135115
- name: "city-remote",
135116
- placeholder: "Type to search…",
135117
- minChars: 1,
135118
- helperText: "Debounced search with a loading spinner."
135119
- }
135120
- }]
135121
135171
  }],
135122
135172
  a11y: [
135123
135173
  "A text label is the accessible name of the control, because the label element cannot name the custom element.",
135124
- "aria-invalid is set when there is an error, and aria-describedby points at the error message, or at the hint when there is no error.",
135174
+ "aria-invalid is set when there is an error, and aria-describedby points at the error message, or at the helper text when there is no error.",
135125
135175
  "Required adds the required mark to the label and the required attribute to the control."
135126
135176
  ]
135127
135177
  }
@@ -135296,46 +135346,75 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
135296
135346
  instead: "AppImagePicker"
135297
135347
  }
135298
135348
  ],
135299
- do: [{
135300
- note: "A name is always supplied, so the avatar shows meaningful initials and correct alt text.",
135301
- example: [{
135302
- component: "AppAvatar",
135303
- props: { name: "Jane Doe" }
135304
- }]
135305
- }, {
135306
- note: "The avatar sits next to the name it represents, so identity reads as one unit.",
135307
- example: [{
135308
- component: "div",
135309
- props: { className: "d-flex align-items-center gap-2" },
135310
- children: [{
135349
+ do: [
135350
+ {
135351
+ title: "Always pass a name",
135352
+ note: "A name is always supplied, so the avatar shows meaningful initials and correct alt text.",
135353
+ example: [{
135354
+ component: "AppAvatar",
135355
+ props: { name: "Jane Doe" }
135356
+ }]
135357
+ },
135358
+ {
135359
+ title: "Beside the name it shows",
135360
+ note: "The avatar sits next to the name it represents, so identity reads as one unit.",
135361
+ example: [{
135362
+ component: "div",
135363
+ props: { className: "d-flex align-items-center gap-2" },
135364
+ children: [{
135365
+ component: "AppAvatar",
135366
+ props: {
135367
+ name: "Ravi Kumar",
135368
+ src: "data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"80\" height=\"80\"><rect width=\"80\" height=\"80\" fill=\"%234f46e5\"/><circle cx=\"40\" cy=\"32\" r=\"14\" fill=\"%23c7d2fe\"/><rect x=\"16\" y=\"52\" width=\"48\" height=\"28\" rx=\"14\" fill=\"%23c7d2fe\"/></svg>"
135369
+ }
135370
+ }, {
135371
+ component: "span",
135372
+ props: { className: "fw-semibold" },
135373
+ children: "Ravi Kumar"
135374
+ }]
135375
+ }]
135376
+ },
135377
+ {
135378
+ title: "Use AppAvatar, not a plain image",
135379
+ note: "AppAvatar keeps the shared shape and falls back to initials when the photo is missing.",
135380
+ example: [{
135311
135381
  component: "AppAvatar",
135312
135382
  props: {
135313
135383
  name: "Ravi Kumar",
135314
- src: "data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"80\" height=\"80\"><rect width=\"80\" height=\"80\" fill=\"%234f46e5\"/><circle cx=\"40\" cy=\"32\" r=\"14\" fill=\"%23c7d2fe\"/><rect x=\"16\" y=\"52\" width=\"48\" height=\"28\" rx=\"14\" fill=\"%23c7d2fe\"/></svg>"
135384
+ tone: "auto"
135315
135385
  }
135316
- }, {
135317
- component: "span",
135318
- props: { className: "fw-semibold" },
135319
- children: "Ravi Kumar"
135320
135386
  }]
135321
- }]
135322
- }],
135323
- dont: [{
135324
- note: "With no name and no photo the avatar can only render a bare question mark, which is useless to the eye and to a screen reader.",
135325
- example: [{ component: "AppAvatar" }]
135326
- }, {
135327
- note: "A hand-rolled round <img> drifts from the shared avatar shape and skips the initials fallback.",
135328
- example: [{
135329
- component: "img",
135330
- props: {
135331
- src: "data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"80\" height=\"80\"><rect width=\"80\" height=\"80\" fill=\"%234f46e5\"/><circle cx=\"40\" cy=\"32\" r=\"14\" fill=\"%23c7d2fe\"/><rect x=\"16\" y=\"52\" width=\"48\" height=\"28\" rx=\"14\" fill=\"%23c7d2fe\"/></svg>",
135332
- alt: "Ravi",
135333
- width: 40,
135334
- height: 40,
135335
- className: "rounded-circle"
135336
- }
135337
- }]
135338
- }],
135387
+ }
135388
+ ],
135389
+ dont: [
135390
+ {
135391
+ title: "Always pass a name",
135392
+ note: "With no name and no photo the avatar can only render a bare question mark, which is useless to the eye and to a screen reader.",
135393
+ example: [{ component: "AppAvatar" }]
135394
+ },
135395
+ {
135396
+ title: "Beside the name it shows",
135397
+ note: "On its own the avatar names no one, so the reader cannot tell whose row it is.",
135398
+ example: [{
135399
+ component: "AppAvatar",
135400
+ props: { name: "Ravi Kumar" }
135401
+ }]
135402
+ },
135403
+ {
135404
+ title: "Use AppAvatar, not a plain image",
135405
+ note: "A hand-rolled round <img> drifts from the shared avatar shape and skips the initials fallback.",
135406
+ example: [{
135407
+ component: "img",
135408
+ props: {
135409
+ src: "data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"80\" height=\"80\"><rect width=\"80\" height=\"80\" fill=\"%234f46e5\"/><circle cx=\"40\" cy=\"32\" r=\"14\" fill=\"%23c7d2fe\"/><rect x=\"16\" y=\"52\" width=\"48\" height=\"28\" rx=\"14\" fill=\"%23c7d2fe\"/></svg>",
135410
+ alt: "Ravi",
135411
+ width: 40,
135412
+ height: 40,
135413
+ className: "rounded-circle"
135414
+ }
135415
+ }]
135416
+ }
135417
+ ],
135339
135418
  a11y: [
135340
135419
  "A plain initials avatar is announced as an image named by label, else name; with a photo, the photo's alt text is the name, or 'Profile photo' when there is no name.",
135341
135420
  "With href or onClick the whole avatar is one link or button named by label, else name, and the photo's alt text is empty.",
@@ -135497,6 +135576,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
135497
135576
  }
135498
135577
  ],
135499
135578
  do: [{
135579
+ title: "Keep badge text to a word or a number",
135500
135580
  note: "A short count attached to its label. The badge reads instantly.",
135501
135581
  example: [{
135502
135582
  component: "span",
@@ -135508,6 +135588,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
135508
135588
  }]
135509
135589
  }]
135510
135590
  }, {
135591
+ title: "Use one tone for one tag",
135511
135592
  note: "A neutral New tag in one intentional tone.",
135512
135593
  example: [{
135513
135594
  component: "AppBadge",
@@ -135516,6 +135597,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
135516
135597
  }]
135517
135598
  }],
135518
135599
  dont: [{
135600
+ title: "Keep badge text to a word or a number",
135519
135601
  note: "A sentence in a badge is the wrong tool. Badges hold a word or a number, not prose.",
135520
135602
  example: [{
135521
135603
  component: "AppBadge",
@@ -135523,6 +135605,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
135523
135605
  children: "This item was updated 3 minutes ago by an editor"
135524
135606
  }]
135525
135607
  }, {
135608
+ title: "Use one tone for one tag",
135526
135609
  note: "The same label in three tones invents meaning that is not there. One tag, one tone.",
135527
135610
  example: [
135528
135611
  {
@@ -135622,6 +135705,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
135622
135705
  }
135623
135706
  ],
135624
135707
  do: [{
135708
+ title: "Banner only for page-wide notices",
135625
135709
  note: "A page-wide, time-bound notice every visitor needs to see, with a tone that matches its urgency.",
135626
135710
  example: [{
135627
135711
  component: "AppBanner",
@@ -135633,6 +135717,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
135633
135717
  }]
135634
135718
  }],
135635
135719
  dont: [{
135720
+ title: "Banner only for page-wide notices",
135636
135721
  note: "A field-level validation message belongs next to the field, not full-bleed across the page. That is AppAlert's job.",
135637
135722
  example: [{
135638
135723
  component: "AppBanner",
@@ -135715,6 +135800,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
135715
135800
  }
135716
135801
  ],
135717
135802
  do: [{
135803
+ title: "Current page as plain text",
135718
135804
  note: "Short labels, a real link on every ancestor, and the current page as plain text.",
135719
135805
  example: [{
135720
135806
  component: "AppBreadcrumbs",
@@ -135733,6 +135819,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
135733
135819
  }]
135734
135820
  }],
135735
135821
  dont: [{
135822
+ title: "Current page as plain text",
135736
135823
  note: "The current page still looks like the others. AppBreadcrumbs already prevents this by ignoring href on the last item, so this shape only happens if you fight the component.",
135737
135824
  example: [{
135738
135825
  component: "AppBreadcrumbs",
@@ -135978,6 +136065,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
135978
136065
  ],
135979
136066
  do: [
135980
136067
  {
136068
+ title: "One primary action per group",
135981
136069
  note: "One clear primary action, supported by a secondary. The eye knows where to go.",
135982
136070
  example: [{
135983
136071
  component: "AppButton",
@@ -135990,6 +136078,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
135990
136078
  }]
135991
136079
  },
135992
136080
  {
136081
+ title: "Name destructive actions specifically",
135993
136082
  note: "Destructive actions use danger and name the object: \"Delete project\", not \"OK\".",
135994
136083
  example: [{
135995
136084
  component: "AppButton",
@@ -135998,6 +136087,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
135998
136087
  }]
135999
136088
  },
136000
136089
  {
136090
+ title: "Start labels with an action verb",
136001
136091
  note: "Action-first verb + optional reinforcing icon. The label says exactly what happens.",
136002
136092
  example: [{
136003
136093
  component: "AppButton",
@@ -136014,6 +136104,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
136014
136104
  ],
136015
136105
  dont: [
136016
136106
  {
136107
+ title: "One primary action per group",
136017
136108
  note: "Two primaries compete for attention, so neither reads as the main action.",
136018
136109
  example: [{
136019
136110
  component: "AppButton",
@@ -136026,6 +136117,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
136026
136117
  }]
136027
136118
  },
136028
136119
  {
136120
+ title: "Name destructive actions specifically",
136029
136121
  note: "A vague \"Submit\" in the default variant hides that this deletes data.",
136030
136122
  example: [{
136031
136123
  component: "AppButton",
@@ -136034,6 +136126,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
136034
136126
  }]
136035
136127
  },
136036
136128
  {
136129
+ title: "Start labels with an action verb",
136037
136130
  note: "A noun-only label leaves the user guessing what the button does.",
136038
136131
  example: [{
136039
136132
  component: "AppButton",
@@ -136522,6 +136615,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
136522
136615
  }
136523
136616
  ],
136524
136617
  do: [{
136618
+ title: "One titled subject per card",
136525
136619
  note: "One titled card, one coherent subject: the header tells the user what this block is.",
136526
136620
  example: [{
136527
136621
  component: "AppCard",
@@ -136533,6 +136627,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
136533
136627
  }]
136534
136628
  }]
136535
136629
  }, {
136630
+ title: "Use body={false} for a table",
136536
136631
  note: "A table uses body={false} so its rows sit flush to the card edges.",
136537
136632
  example: [{
136538
136633
  component: "AppCard",
@@ -136557,6 +136652,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
136557
136652
  }]
136558
136653
  }],
136559
136654
  dont: [{
136655
+ title: "One titled subject per card",
136560
136656
  note: "Three unrelated facts crammed into one untitled card, so none of them stands out.",
136561
136657
  example: [{
136562
136658
  component: "AppCard",
@@ -136579,6 +136675,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
136579
136675
  ]
136580
136676
  }]
136581
136677
  }, {
136678
+ title: "Use body={false} for a table",
136582
136679
  note: "The default body padding leaves an awkward inset gap around a full-width table.",
136583
136680
  example: [{
136584
136681
  component: "AppCard",
@@ -137341,7 +137438,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
137341
137438
  name: "error",
137342
137439
  type: "string",
137343
137440
  required: !1,
137344
- description: "Error message, rendered below the control. Replaces the hint."
137441
+ description: "Error message, rendered below the control. Replaces the helper text."
137345
137442
  },
137346
137443
  {
137347
137444
  name: "help",
@@ -137442,6 +137539,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
137442
137539
  }
137443
137540
  ],
137444
137541
  do: [{
137542
+ title: "Independent options each get a checkbox",
137445
137543
  note: "Independent settings: each checkbox toggles on its own, any combination allowed.",
137446
137544
  example: [{
137447
137545
  component: "div",
@@ -137468,6 +137566,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
137468
137566
  ]
137469
137567
  }]
137470
137568
  }, {
137569
+ title: "Checkboxes, not switches, for saved forms",
137471
137570
  note: "A clear, specific label states exactly what opting in means.",
137472
137571
  example: [{
137473
137572
  component: "AppCheckbox",
@@ -137475,6 +137574,30 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
137475
137574
  }]
137476
137575
  }],
137477
137576
  dont: [{
137577
+ title: "Independent options each get a checkbox",
137578
+ note: "Radios force a single choice, so independent yes/no options each need their own checkbox.",
137579
+ example: [{
137580
+ component: "div",
137581
+ props: { className: "wui-control-group" },
137582
+ children: [{
137583
+ component: "AppRadio",
137584
+ props: {
137585
+ label: "Weekly digest",
137586
+ name: "prefs-bad",
137587
+ value: "digest",
137588
+ defaultChecked: !0
137589
+ }
137590
+ }, {
137591
+ component: "AppRadio",
137592
+ props: {
137593
+ label: "Security alerts",
137594
+ name: "prefs-bad",
137595
+ value: "security"
137596
+ }
137597
+ }]
137598
+ }]
137599
+ }, {
137600
+ title: "Checkboxes, not switches, for saved forms",
137478
137601
  note: "Switches imply an instant, saved effect; on a form that submits on Save, checkboxes set the right expectation.",
137479
137602
  example: [{
137480
137603
  component: "div",
@@ -137500,32 +137623,10 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
137500
137623
  }
137501
137624
  ]
137502
137625
  }]
137503
- }, {
137504
- note: "Radios force a single choice, so independent yes/no options each need their own checkbox.",
137505
- example: [{
137506
- component: "div",
137507
- props: { className: "wui-control-group" },
137508
- children: [{
137509
- component: "AppRadio",
137510
- props: {
137511
- label: "Weekly digest",
137512
- name: "prefs-bad",
137513
- value: "digest",
137514
- defaultChecked: !0
137515
- }
137516
- }, {
137517
- component: "AppRadio",
137518
- props: {
137519
- label: "Security alerts",
137520
- name: "prefs-bad",
137521
- value: "security"
137522
- }
137523
- }]
137524
- }]
137525
137626
  }],
137526
137627
  a11y: [
137527
137628
  "The label is linked to the input by id, so a click on the label text ticks the box.",
137528
- "The error or the hint is linked to the input with aria-describedby, and an error sets aria-invalid to true.",
137629
+ "The error or the helper text is linked to the input with aria-describedby, and an error sets aria-invalid to true.",
137529
137630
  "An id is generated when none is given, so the label link always works."
137530
137631
  ]
137531
137632
  }
@@ -137636,68 +137737,97 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
137636
137737
  instead: "AppButton"
137637
137738
  }
137638
137739
  ],
137639
- do: [{
137640
- note: "Removable chips for applied filters: the user sees exactly what is active and can clear each one.",
137641
- example: [
137642
- {
137643
- component: "AppChip",
137644
- props: { label: "Lightning" }
137645
- },
137646
- {
137740
+ do: [
137741
+ {
137742
+ title: "Show applied filters as removable chips",
137743
+ note: "Removable chips for applied filters: the user sees exactly what is active and can clear each one.",
137744
+ example: [
137745
+ {
137746
+ component: "AppChip",
137747
+ props: { label: "Lightning" }
137748
+ },
137749
+ {
137750
+ component: "AppChip",
137751
+ props: { label: "Zone 1" }
137752
+ },
137753
+ {
137754
+ component: "AppChip",
137755
+ props: { label: "Rev B" }
137756
+ }
137757
+ ]
137758
+ },
137759
+ {
137760
+ title: "One clear tone and a glyph",
137761
+ note: "One clear tone and a reinforcing glyph: the chip reads at a glance.",
137762
+ example: [{
137647
137763
  component: "AppChip",
137648
- props: { label: "Zone 1" }
137649
- },
137650
- {
137764
+ props: {
137765
+ label: "Verified",
137766
+ tone: "success",
137767
+ leadingIcon: "check-circle"
137768
+ }
137769
+ }]
137770
+ },
137771
+ {
137772
+ title: "Keep chip text short",
137773
+ note: "A short label reads as a token at a glance.",
137774
+ example: [{
137651
137775
  component: "AppChip",
137652
- props: { label: "Rev B" }
137653
- }
137654
- ]
137655
- }, {
137656
- note: "One clear tone and a reinforcing glyph: the chip reads at a glance.",
137657
- example: [{
137658
- component: "AppChip",
137659
- props: {
137660
- label: "Verified",
137661
- tone: "success",
137662
- leadingIcon: "check-circle"
137663
- }
137664
- }]
137665
- }],
137666
- dont: [{
137667
- note: "Three tones on three peer filters invent meaning that isn’t there: keep peers one tone.",
137668
- example: [
137669
- {
137776
+ props: { label: "Draft" }
137777
+ }]
137778
+ }
137779
+ ],
137780
+ dont: [
137781
+ {
137782
+ title: "Show applied filters as removable chips",
137783
+ note: "A disabled chip cannot be cleared, so the user has no way to remove the filter from the chip.",
137784
+ example: [{
137670
137785
  component: "AppChip",
137671
137786
  props: {
137672
137787
  label: "Lightning",
137673
- tone: "primary"
137788
+ disabled: !0
137674
137789
  }
137675
- },
137676
- {
137677
- component: "AppChip",
137678
- props: {
137679
- label: "Zone 1",
137680
- tone: "success"
137790
+ }]
137791
+ },
137792
+ {
137793
+ title: "One clear tone and a glyph",
137794
+ note: "Three tones on three peer filters invent meaning that isn’t there: keep peers one tone.",
137795
+ example: [
137796
+ {
137797
+ component: "AppChip",
137798
+ props: {
137799
+ label: "Lightning",
137800
+ tone: "primary"
137801
+ }
137802
+ },
137803
+ {
137804
+ component: "AppChip",
137805
+ props: {
137806
+ label: "Zone 1",
137807
+ tone: "success"
137808
+ }
137809
+ },
137810
+ {
137811
+ component: "AppChip",
137812
+ props: {
137813
+ label: "Rev B",
137814
+ tone: "danger"
137815
+ }
137681
137816
  }
137682
- },
137683
- {
137817
+ ]
137818
+ },
137819
+ {
137820
+ title: "Keep chip text short",
137821
+ note: "A sentence in a chip defeats the point: a chip is a token, not a paragraph.",
137822
+ example: [{
137684
137823
  component: "AppChip",
137685
137824
  props: {
137686
- label: "Rev B",
137687
- tone: "danger"
137825
+ label: "Verified, submitted, and awaiting final sign-off from the reviewer",
137826
+ tone: "success"
137688
137827
  }
137689
- }
137690
- ]
137691
- }, {
137692
- note: "A sentence in a chip defeats the point: a chip is a token, not a paragraph.",
137693
- example: [{
137694
- component: "AppChip",
137695
- props: {
137696
- label: "Verified, submitted, and awaiting final sign-off from the reviewer",
137697
- tone: "success"
137698
- }
137699
- }]
137700
- }],
137828
+ }]
137829
+ }
137830
+ ],
137701
137831
  a11y: [
137702
137832
  "A removable chip's dismiss button is named by removeLabel, or by Remove followed by the chip text when no label is given.",
137703
137833
  "A clickable chip is a button; its aria-* and data-* attributes go to that button, so the button carries the name.",
@@ -137951,6 +138081,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
137951
138081
  }
137952
138082
  ],
137953
138083
  do: [{
138084
+ title: "A short title and one line",
137954
138085
  note: "A short title and a one-line description. The card reads instantly.",
137955
138086
  example: [{
137956
138087
  component: "div",
@@ -137980,6 +138111,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
137980
138111
  }]
137981
138112
  }]
137982
138113
  }, {
138114
+ title: "One visual style per group",
137983
138115
  note: "One visual style across the group: all icon cards, or all image cards.",
137984
138116
  example: [{
137985
138117
  component: "div",
@@ -138010,6 +138142,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
138010
138142
  }]
138011
138143
  }],
138012
138144
  dont: [{
138145
+ title: "A short title and one line",
138013
138146
  note: "A paragraph stuffed into a card. If it needs this much text, it needs a different control.",
138014
138147
  example: [{
138015
138148
  component: "AppChoiceCard",
@@ -138024,6 +138157,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
138024
138157
  handlers: ["onChange"]
138025
138158
  }]
138026
138159
  }, {
138160
+ title: "One visual style per group",
138027
138161
  note: "Mixing an icon card with an image card in one group makes the set feel broken.",
138028
138162
  example: [{
138029
138163
  component: "div",
@@ -138192,6 +138326,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
138192
138326
  }
138193
138327
  ],
138194
138328
  do: [{
138329
+ title: "A few short pills",
138195
138330
  note: "A few short, scannable pills; the user sees every option and toggles at a glance.",
138196
138331
  example: [{
138197
138332
  component: "AppChoiceChip",
@@ -138205,6 +138340,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
138205
138340
  handlers: ["onChange"]
138206
138341
  }]
138207
138342
  }, {
138343
+ title: "Drive checked from state",
138208
138344
  note: "checked reflects real selection state that your onChange updates; a proper control.",
138209
138345
  example: [{
138210
138346
  component: "AppChoiceChip",
@@ -138214,6 +138350,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
138214
138350
  }]
138215
138351
  }],
138216
138352
  dont: [{
138353
+ title: "A few short pills",
138217
138354
  note: "A sentence crammed into a chip. Long labels belong in a select or a checkbox list.",
138218
138355
  example: [{
138219
138356
  component: "AppChoiceChip",
@@ -138222,6 +138359,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
138222
138359
  handlers: ["onChange"]
138223
138360
  }]
138224
138361
  }, {
138362
+ title: "Drive checked from state",
138225
138363
  note: "A chip used to fire an action. Actions are buttons; a chip should hold a choice.",
138226
138364
  example: [{
138227
138365
  component: "AppChoiceChip",
@@ -138501,6 +138639,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
138501
138639
  }
138502
138640
  ],
138503
138641
  do: [{
138642
+ title: "Say what the colour affects",
138504
138643
  note: "Says what the colour affects. A user picking blind cannot tell whether they are about to change one button or the whole portal.",
138505
138644
  example: [{
138506
138645
  component: "AppColorField",
@@ -138512,7 +138651,8 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
138512
138651
  }]
138513
138652
  }],
138514
138653
  dont: [{
138515
- note: "“Colour” of what? And with no hint, the user has to save and go looking to find out what changed.",
138654
+ title: "Say what the colour affects",
138655
+ note: "“Colour” of what? And with no helper text, the user has to save and go looking to find out what changed.",
138516
138656
  example: [{
138517
138657
  component: "AppColorField",
138518
138658
  props: {
@@ -138524,7 +138664,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
138524
138664
  a11y: [
138525
138665
  "The hex text box is the labelled control and the field that posts; the label points at it and the required mark follows the label.",
138526
138666
  "The swatch has its own accessible name, the label followed by colour picker (or Colour when there is no label), and is skipped by the tab key.",
138527
- "An error sets the text box invalid and describes it with the error text; without an error, the hint describes it."
138667
+ "An error sets the text box invalid and describes it with the error text; without an error, the helper text describes it."
138528
138668
  ]
138529
138669
  }
138530
138670
  },
@@ -138605,6 +138745,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
138605
138745
  }
138606
138746
  ],
138607
138747
  do: [{
138748
+ title: "One Columns button in the toolbar",
138608
138749
  note: "One Columns button in the toolbar actions, beside search and export.",
138609
138750
  example: [{
138610
138751
  component: "AppTableToolbar",
@@ -138637,6 +138778,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
138637
138778
  }]
138638
138779
  }],
138639
138780
  dont: [{
138781
+ title: "One Columns button in the toolbar",
138640
138782
  note: "A permanent row of checkboxes takes space above the table and pushes the data down.",
138641
138783
  example: [{
138642
138784
  component: "div",
@@ -139624,6 +139766,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
139624
139766
  }
139625
139767
  ],
139626
139768
  do: [{
139769
+ title: "Booleans as ticks, plain row labels",
139627
139770
  note: "Every row appears for every column, so the reader can read across. The row label names the capability in the customer’s words.",
139628
139771
  example: [{
139629
139772
  component: "AppCompareTable",
@@ -139646,6 +139789,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
139646
139789
  }]
139647
139790
  }],
139648
139791
  dont: [{
139792
+ title: "Booleans as ticks, plain row labels",
139649
139793
  note: "Two highlighted columns both tint, so no option reads as the recommendation; internal jargon in the row label; and hand-typed dashes and Y instead of booleans lose the tick's shape cue.",
139650
139794
  example: [{
139651
139795
  component: "AppCompareTable",
@@ -139848,6 +139992,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
139848
139992
  }
139849
139993
  ],
139850
139994
  do: [{
139995
+ title: "Name the verb and use danger",
139851
139996
  note: "The danger tone + a verb-labelled button (\"Delete\") makes the weight and the outcome of the action clear.",
139852
139997
  example: [{
139853
139998
  component: "AppButton",
@@ -139855,6 +140000,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
139855
140000
  children: "Delete project"
139856
140001
  }]
139857
140002
  }, {
140003
+ title: "Typed name only for irreversible actions",
139858
140004
  note: "For an account-wide wipe, confirmPhrase forces the user to type the name, so there are no accidental clicks.",
139859
140005
  example: [{
139860
140006
  component: "AppButton",
@@ -139863,12 +140009,14 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
139863
140009
  }]
139864
140010
  }],
139865
140011
  dont: [{
140012
+ title: "Name the verb and use danger",
139866
140013
  note: "A neutral \"OK\" on a destructive confirm hides what pressing it actually does.",
139867
140014
  example: [{
139868
140015
  component: "AppButton",
139869
140016
  children: "OK"
139870
140017
  }]
139871
140018
  }, {
140019
+ title: "Typed name only for irreversible actions",
139872
140020
  note: "Gating a reversible archive behind a typed phrase is friction with no payoff, so save it for the irreversible.",
139873
140021
  example: [{
139874
140022
  component: "AppButton",
@@ -140411,7 +140559,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
140411
140559
  name: "helperText",
140412
140560
  type: "string",
140413
140561
  required: !1,
140414
- description: "Help text shown under the field when there is no error."
140562
+ description: "Helper text shown under the field when there is no error."
140415
140563
  },
140416
140564
  {
140417
140565
  name: "id",
@@ -140514,7 +140662,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
140514
140662
  dont: [],
140515
140663
  a11y: [
140516
140664
  "The visible label is the control's accessible name, unless an aria-label or aria-labelledby is passed, and it is tied to the control through its id.",
140517
- "An error sets aria-invalid on the control and is linked to it with aria-describedby; the hint is linked the same way when there is no error.",
140665
+ "An error sets aria-invalid on the control and is linked to it with aria-describedby; the helper text is linked the same way when there is no error.",
140518
140666
  "A required field marks the label with the required mark and sets required on the control."
140519
140667
  ]
140520
140668
  }
@@ -140926,6 +141074,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
140926
141074
  }
140927
141075
  ],
140928
141076
  do: [{
141077
+ title: "Say when a table is empty",
140929
141078
  note: "An explicit empty message tells the user the list is genuinely empty, not broken.",
140930
141079
  example: [{
140931
141080
  component: "AppDataTable",
@@ -140952,6 +141101,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
140952
141101
  }]
140953
141102
  }],
140954
141103
  dont: [{
141104
+ title: "Say when a table is empty",
140955
141105
  note: "A blank table with no message reads as a bug, because the user cannot tell empty from failed.",
140956
141106
  example: [{
140957
141107
  component: "AppDataTable",
@@ -141066,7 +141216,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
141066
141216
  name: "helperText",
141067
141217
  type: "string",
141068
141218
  required: !1,
141069
- description: "Help text shown under the control."
141219
+ description: "Helper text shown under the control."
141070
141220
  },
141071
141221
  {
141072
141222
  name: "id",
@@ -141186,6 +141336,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
141186
141336
  }
141187
141337
  ],
141188
141338
  do: [{
141339
+ title: "Give the date a visible label",
141189
141340
  note: "A visible label above the field. The user knows what the date is for before opening it.",
141190
141341
  example: [{
141191
141342
  component: "AppDatePicker",
@@ -141196,6 +141347,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
141196
141347
  }
141197
141348
  }]
141198
141349
  }, {
141350
+ title: "Set min and max bounds",
141199
141351
  note: "min / max stop invalid dates at the source, so the user can only pick a real one.",
141200
141352
  example: [{
141201
141353
  component: "AppDatePicker",
@@ -141207,6 +141359,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
141207
141359
  }]
141208
141360
  }],
141209
141361
  dont: [{
141362
+ title: "Give the date a visible label",
141210
141363
  note: "Only a placeholder as the label, which vanishes the moment a date is picked.",
141211
141364
  example: [{
141212
141365
  component: "AppDatePicker",
@@ -141216,6 +141369,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
141216
141369
  }
141217
141370
  }]
141218
141371
  }, {
141372
+ title: "Set min and max bounds",
141219
141373
  note: "No bounds, then reject the date after submit. Constrain up front instead.",
141220
141374
  example: [{
141221
141375
  component: "AppDatePicker",
@@ -141224,7 +141378,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
141224
141378
  }],
141225
141379
  a11y: [
141226
141380
  "The field label names the control through aria-label when it is a string, and ariaLabel overrides it.",
141227
- "Hint or error text is linked to the control with aria-describedby, and an error sets aria-invalid.",
141381
+ "Helper text or error text is linked to the control with aria-describedby, and an error sets aria-invalid.",
141228
141382
  "Required and disabled are set as native attributes on the control."
141229
141383
  ]
141230
141384
  }
@@ -141328,7 +141482,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
141328
141482
  name: "helperText",
141329
141483
  type: "string",
141330
141484
  required: !1,
141331
- description: "Help text shown under the control."
141485
+ description: "Helper text shown under the control."
141332
141486
  },
141333
141487
  {
141334
141488
  name: "id",
@@ -141459,7 +141613,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
141459
141613
  dont: [],
141460
141614
  a11y: [
141461
141615
  "The field label names the control through aria-label when it is a string, and ariaLabel overrides it.",
141462
- "Hint or error text is linked to the control with aria-describedby, and an error sets aria-invalid.",
141616
+ "Helper text or error text is linked to the control with aria-describedby, and an error sets aria-invalid.",
141463
141617
  "Required and disabled are set as native attributes on the control."
141464
141618
  ]
141465
141619
  }
@@ -141604,6 +141758,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
141604
141758
  }
141605
141759
  ],
141606
141760
  do: [{
141761
+ title: "Name each value",
141607
141762
  note: "Specific, concise labels (no generic \"Info\") and clear values.",
141608
141763
  example: [{
141609
141764
  component: "AppDescriptions",
@@ -141617,6 +141772,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
141617
141772
  }]
141618
141773
  }],
141619
141774
  dont: [{
141775
+ title: "Name each value",
141620
141776
  note: "Generic labels like \"Data 1\" and ellipsis placeholders carry no meaning.",
141621
141777
  example: [{
141622
141778
  component: "AppDescriptions",
@@ -141685,6 +141841,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
141685
141841
  }
141686
141842
  ],
141687
141843
  do: [{
141844
+ title: "Beside the list it details",
141688
141845
  note: "The pane sits beside the list it details. Escape inside it calls onClose.",
141689
141846
  example: [{
141690
141847
  component: "AppDetailPane",
@@ -141699,6 +141856,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
141699
141856
  }]
141700
141857
  }],
141701
141858
  dont: [{
141859
+ title: "Beside the list it details",
141702
141860
  note: "Use a detail pane to cover the page or hold a multi-step task; use AppDrawer or AppModal for that.",
141703
141861
  example: [{
141704
141862
  component: "AppDetailPane",
@@ -142000,13 +142158,13 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
142000
142158
  name: "maxSizeMb",
142001
142159
  type: "number",
142002
142160
  required: !1,
142003
- description: "Largest file size in megabytes, the shared limit when left out. 0 means no size limit: nothing is rejected for its size, and the hint names no size."
142161
+ description: "Largest file size in megabytes, the shared limit when left out. 0 means no size limit: nothing is rejected for its size, and the format line names no size."
142004
142162
  },
142005
142163
  {
142006
142164
  name: "maxSizeText",
142007
142165
  type: "string",
142008
142166
  required: !1,
142009
- description: "The size cap in the hint; {size} is the limit in MB. Replaces the built-in English text, for other languages.",
142167
+ description: "The size cap in the format line; {size} is the limit in MB. Replaces the built-in English text, for other languages.",
142010
142168
  default: "up to {size} MB"
142011
142169
  },
142012
142170
  {
@@ -142044,7 +142202,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
142044
142202
  dont: [],
142045
142203
  a11y: [
142046
142204
  "The zone is a label bound to a visually hidden native file input, so keyboard and screen reader users reach the same file chooser as a click.",
142047
- "The input is described by the hint, or by the error when one shows, through aria-describedby.",
142205
+ "The input is described by the helper text, or by the error when one shows, through aria-describedby.",
142048
142206
  "A disabled zone sets aria-disabled, disables the input and ignores drops."
142049
142207
  ]
142050
142208
  }
@@ -142215,7 +142373,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
142215
142373
  name: "trigger",
142216
142374
  type: "node",
142217
142375
  required: !1,
142218
- description: "A custom trigger drawn inside the toggle button instead of the icon, such as an account chip or a labelled sort button. It wins over icon. The button keeps its open state, keyboard behavior and accessible role."
142376
+ description: "A custom trigger drawn inside the toggle button instead of the icon, such as an account chip or a labelled sort button. It wins over icon. The button keeps its open state, keyboard behaviour and accessible role."
142219
142377
  }
142220
142378
  ],
142221
142379
  itemsTakeAction: ["items"],
@@ -142246,6 +142404,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
142246
142404
  }
142247
142405
  ],
142248
142406
  do: [{
142407
+ title: "Put the destructive item last",
142249
142408
  note: "Overflow actions collapse into one trigger, with the destructive one marked danger and placed last.",
142250
142409
  example: [{
142251
142410
  component: "AppDropdown",
@@ -142273,6 +142432,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
142273
142432
  }
142274
142433
  }]
142275
142434
  }, {
142435
+ title: "Keep the menu short and clear",
142276
142436
  note: "A short, scannable list of clearly worded actions.",
142277
142437
  example: [{
142278
142438
  component: "AppDropdown",
@@ -142290,6 +142450,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
142290
142450
  }]
142291
142451
  }],
142292
142452
  dont: [{
142453
+ title: "Put the destructive item last",
142293
142454
  note: "Delete sits first and unmarked, so it looks like every other item and is the easiest to hit by mistake.",
142294
142455
  example: [{
142295
142456
  component: "AppDropdown",
@@ -142316,6 +142477,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
142316
142477
  }
142317
142478
  }]
142318
142479
  }, {
142480
+ title: "Keep the menu short and clear",
142319
142481
  note: "A menu with nine items becomes a wall to read. Group or split it, or promote the common ones out.",
142320
142482
  example: [{
142321
142483
  component: "AppDropdown",
@@ -142583,52 +142745,85 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
142583
142745
  instead: "a muted caption"
142584
142746
  }
142585
142747
  ],
142586
- do: [{
142587
- note: "Names what's missing, explains why it matters, and offers the exact action to fix it.",
142588
- example: [{
142589
- component: "AppEmptyState",
142590
- props: {
142591
- icon: "users",
142592
- title: "No team members yet",
142593
- description: "Invite a colleague to collaborate on this project.",
142594
- action: {
142595
- component: "AppButton",
142596
- props: { leftIcon: "plus" },
142597
- children: "Invite member"
142748
+ do: [
142749
+ {
142750
+ title: "Offer a next step",
142751
+ note: "Names what's missing, explains why it matters, and offers the exact action to fix it.",
142752
+ example: [{
142753
+ component: "AppEmptyState",
142754
+ props: {
142755
+ icon: "users",
142756
+ title: "No team members yet",
142757
+ description: "Invite a colleague to collaborate on this project.",
142758
+ action: {
142759
+ component: "AppButton",
142760
+ props: { leftIcon: "plus" },
142761
+ children: "Invite member"
142762
+ }
142598
142763
  }
142599
- }
142600
- }]
142601
- }, {
142602
- note: "A search-empty explains the specific query and suggests how to get results.",
142603
- example: [{
142604
- component: "AppEmptyState",
142605
- props: {
142606
- icon: "search",
142607
- title: "No results for “risk”",
142608
- description: "Try a broader keyword or clear the filters."
142609
- }
142610
- }]
142611
- }],
142612
- dont: [{
142613
- note: "A bare \"Empty\" with no guidance and no action leaves the user stuck at a dead end.",
142614
- example: [{
142615
- component: "AppEmptyState",
142616
- props: {
142617
- icon: "users",
142618
- title: "Empty"
142619
- }
142620
- }]
142621
- }, {
142622
- note: "Repetitive filler text pads the space without helping the user do anything.",
142623
- example: [{
142624
- component: "AppEmptyState",
142625
- props: {
142626
- icon: "search",
142627
- title: "No results",
142628
- description: "No results found. No results found. No results found."
142629
- }
142630
- }]
142631
- }],
142764
+ }]
142765
+ },
142766
+ {
142767
+ title: "Explain a search with no matches",
142768
+ note: "A search-empty explains the specific query and suggests how to get results.",
142769
+ example: [{
142770
+ component: "AppEmptyState",
142771
+ props: {
142772
+ icon: "search",
142773
+ title: "No results for “risk”",
142774
+ description: "Try a broader keyword or clear the filters."
142775
+ }
142776
+ }]
142777
+ },
142778
+ {
142779
+ title: "Keep the description specific",
142780
+ note: "A description that says what the empty state means helps the user, where filler only pads the space.",
142781
+ example: [{
142782
+ component: "AppEmptyState",
142783
+ props: {
142784
+ icon: "inbox",
142785
+ title: "No requests this week",
142786
+ description: "Requests you raise appear here once they are submitted."
142787
+ }
142788
+ }]
142789
+ }
142790
+ ],
142791
+ dont: [
142792
+ {
142793
+ title: "Offer a next step",
142794
+ note: "A bare \"Empty\" with no guidance and no action leaves the user stuck at a dead end.",
142795
+ example: [{
142796
+ component: "AppEmptyState",
142797
+ props: {
142798
+ icon: "users",
142799
+ title: "Empty"
142800
+ }
142801
+ }]
142802
+ },
142803
+ {
142804
+ title: "Explain a search with no matches",
142805
+ note: "A bare \"No results\" with no reason and no way forward leaves the user unsure whether to change the search or the data.",
142806
+ example: [{
142807
+ component: "AppEmptyState",
142808
+ props: {
142809
+ icon: "search",
142810
+ title: "No results"
142811
+ }
142812
+ }]
142813
+ },
142814
+ {
142815
+ title: "Keep the description specific",
142816
+ note: "Repetitive filler text pads the space without helping the user do anything.",
142817
+ example: [{
142818
+ component: "AppEmptyState",
142819
+ props: {
142820
+ icon: "search",
142821
+ title: "No results",
142822
+ description: "No results found. No results found. No results found."
142823
+ }
142824
+ }]
142825
+ }
142826
+ ],
142632
142827
  a11y: [
142633
142828
  "A named illustration is decorative; the title carries the meaning for assistive technology.",
142634
142829
  "A custom illustration node is wrapped with aria-hidden, so it is skipped by screen readers.",
@@ -142687,17 +142882,36 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
142687
142882
  }
142688
142883
  ],
142689
142884
  do: [{
142885
+ title: "Clear the error on navigation",
142690
142886
  note: "Pass resetKeys so moving to another page clears the error.",
142691
142887
  example: [{
142692
142888
  component: "AppErrorBoundary",
142693
- props: {}
142889
+ props: { resetKeys: ["/projects"] }
142890
+ }]
142891
+ }, {
142892
+ title: "Never show the error text",
142893
+ note: "The default screen shows a plain sentence, so internal details stay private.",
142894
+ example: [{
142895
+ component: "AppErrorBoundary",
142896
+ props: { homeHref: "/dashboard" }
142694
142897
  }]
142695
142898
  }],
142696
142899
  dont: [{
142697
- note: "Do not print the caught error in the fallback; it can leak internal details.",
142900
+ title: "Clear the error on navigation",
142901
+ note: "Without resetKeys, the error stays on screen after the person moves to another page.",
142698
142902
  example: [{
142699
- component: "p",
142700
- children: "TypeError: Cannot read properties of undefined (reading 'map')"
142903
+ component: "AppErrorBoundary",
142904
+ props: { brand: "Projects" }
142905
+ }]
142906
+ }, {
142907
+ title: "Never show the error text",
142908
+ note: "It can leak internal details to the person reading the page, so the fallback never shows the error text.",
142909
+ example: [{
142910
+ component: "AppCodeBlock",
142911
+ props: {
142912
+ code: "TypeError: Cannot read properties of undefined (reading 'map')",
142913
+ language: "text"
142914
+ }
142701
142915
  }]
142702
142916
  }],
142703
142917
  a11y: ["The default screen has a real heading and native buttons and a link.", "The caught error is never shown, only a plain sentence."]
@@ -142794,7 +143008,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
142794
143008
  name: "accept",
142795
143009
  type: "string",
142796
143010
  required: !1,
142797
- description: "The file types the field takes, as an accept list. Defaults to images; pass for example image/*,application/pdf for mixed. An empty string accepts any file type, and the hint then names no types."
143011
+ description: "The file types the field takes, as an accept list. Defaults to images; pass for example image/*,application/pdf for mixed. An empty string accepts any file type, and the format line then names no types."
142798
143012
  },
142799
143013
  {
142800
143014
  name: "browseLabel",
@@ -142833,7 +143047,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
142833
143047
  name: "maxSizeMb",
142834
143048
  type: "number",
142835
143049
  required: !1,
142836
- description: "The size limit in megabytes. Defaults to the shared limit. 0 means no size limit: nothing is rejected for its size, and the hint names no size."
143050
+ description: "The size limit in megabytes. Defaults to the shared limit. 0 means no size limit: nothing is rejected for its size, and the format line names no size."
142837
143051
  },
142838
143052
  {
142839
143053
  name: "maxSizeText",
@@ -142901,7 +143115,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
142901
143115
  name: "validate",
142902
143116
  type: "boolean",
142903
143117
  required: !1,
142904
- description: "Checks each pick against accept and maxSizeMb and shows the field's own message for a rejected file. Set false when the page validates the files itself and shows its own message through error, so every pick reaches onChange and the person never sees two messages in two voices for one problem. accept and maxSizeMb still set the picker filter and the hint text.",
143118
+ description: "Checks each pick against accept and maxSizeMb and shows the field's own message for a rejected file. Set false when the page validates the files itself and shows its own message through error, so every pick reaches onChange and the person never sees two messages in two voices for one problem. accept and maxSizeMb still set the picker filter and the format line.",
142905
143119
  default: !0
142906
143120
  },
142907
143121
  {
@@ -142939,6 +143153,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
142939
143153
  }
142940
143154
  ],
142941
143155
  do: [{
143156
+ title: "Name the row and limit types",
142942
143157
  note: "Give the row a specific label and restrict the accepted types, so the user knows what belongs here and what is allowed before they pick.",
142943
143158
  example: [{
142944
143159
  component: "AppFileAttachment",
@@ -142949,6 +143164,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
142949
143164
  }
142950
143165
  }]
142951
143166
  }, {
143167
+ title: "Make a required file's requirement visible",
142952
143168
  note: "Surface a submit-time requirement with a message below the row, in the field's error style.",
142953
143169
  example: [{
142954
143170
  component: "AppFileAttachment",
@@ -142959,12 +143175,14 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
142959
143175
  }]
142960
143176
  }],
142961
143177
  dont: [{
143178
+ title: "Name the row and limit types",
142962
143179
  note: "A bare \"Attach\" label with no constraints leaves the user unsure what belongs here or what the field accepts.",
142963
143180
  example: [{
142964
143181
  component: "AppFileAttachment",
142965
143182
  props: { label: "Attach" }
142966
143183
  }]
142967
143184
  }, {
143185
+ title: "Make a required file's requirement visible",
142968
143186
  note: "Marking a genuinely required attachment \"optional\" mis-signals that it can be skipped.",
142969
143187
  example: [{
142970
143188
  component: "AppFileAttachment",
@@ -143110,13 +143328,13 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
143110
143328
  name: "maxSizeMb",
143111
143329
  type: "number",
143112
143330
  required: !1,
143113
- description: "The size limit in megabytes. Defaults to the shared limit. 0 means no size limit: nothing is rejected for its size, and the hint names no size."
143331
+ description: "The size limit in megabytes. Defaults to the shared limit. 0 means no size limit: nothing is rejected for its size, and the format line names no size."
143114
143332
  },
143115
143333
  {
143116
143334
  name: "maxSizeText",
143117
143335
  type: "string",
143118
143336
  required: !1,
143119
- description: "The size cap in the hint; {size} is the limit in MB. Replaces the built-in English text, for other languages.",
143337
+ description: "The size cap in the format line; {size} is the limit in MB. Replaces the built-in English text, for other languages.",
143120
143338
  default: "up to {size} MB"
143121
143339
  },
143122
143340
  {
@@ -143221,12 +143439,14 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
143221
143439
  }
143222
143440
  ],
143223
143441
  do: [{
143442
+ title: "Give the field a specific label",
143224
143443
  note: "Give the field a specific label, \"Structure photo\" rather than \"Upload\", so the user knows what image belongs here.",
143225
143444
  example: [{
143226
143445
  component: "AppFilePicker",
143227
143446
  props: { label: "Structure photo" }
143228
143447
  }]
143229
143448
  }, {
143449
+ title: "Show validation beside the field",
143230
143450
  note: "Surface validation with a message below the zone, in the field's own error style, so the eye lands on it next to the control.",
143231
143451
  example: [{
143232
143452
  component: "AppFilePicker",
@@ -143238,12 +143458,14 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
143238
143458
  }]
143239
143459
  }],
143240
143460
  dont: [{
143241
- note: "A vague \"File\" label leaves the user guessing what to drop, and mixes with the format hint already in the zone.",
143461
+ title: "Give the field a specific label",
143462
+ note: "A vague \"File\" label leaves the user guessing what to drop, and mixes with the format line already in the zone.",
143242
143463
  example: [{
143243
143464
  component: "AppFilePicker",
143244
143465
  props: { label: "File" }
143245
143466
  }]
143246
143467
  }, {
143468
+ title: "Show validation beside the field",
143247
143469
  note: "A required field with no message on submit leaves the user unsure why the form will not save.",
143248
143470
  example: [{
143249
143471
  component: "AppFilePicker",
@@ -143255,7 +143477,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
143255
143477
  }],
143256
143478
  a11y: [
143257
143479
  "The label is tied to the file input, and the dropzone is a label for the same input, so the zone opens the picker by click or keyboard.",
143258
- "A shown error or hint is linked to the file input through aria-describedby.",
143480
+ "A shown error or helper text is linked to the file input through aria-describedby.",
143259
143481
  "While loading, the control is marked aria-busy and a spinner with the status role named Loading shows.",
143260
143482
  "In single mode the preview has a button to change the file and a separate remove button, each with an accessible name."
143261
143483
  ]
@@ -144269,6 +144491,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
144269
144491
  }
144270
144492
  ],
144271
144493
  do: [{
144494
+ title: "Reinforce a text label",
144272
144495
  note: "The icon reinforces a clear text label: it supports the word and does not replace it.",
144273
144496
  example: [{
144274
144497
  component: "AppButton",
@@ -144282,6 +144505,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
144282
144505
  children: "Add member"
144283
144506
  }]
144284
144507
  }, {
144508
+ title: "Match the text size",
144285
144509
  note: "AppIcon size matches the text it sits beside, so the baseline stays clean.",
144286
144510
  example: [{
144287
144511
  component: "div",
@@ -144296,6 +144520,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
144296
144520
  }]
144297
144521
  }],
144298
144522
  dont: [{
144523
+ title: "Reinforce a text label",
144299
144524
  note: "Hand-written icon markup in app code bypasses the shared name map and drifts.",
144300
144525
  example: [{
144301
144526
  component: "button",
@@ -144310,6 +144535,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
144310
144535
  }]
144311
144536
  }]
144312
144537
  }, {
144538
+ title: "Match the text size",
144313
144539
  note: "A glyph far larger than its label unbalances the row and pulls the eye away from the words.",
144314
144540
  example: [{
144315
144541
  component: "div",
@@ -144449,7 +144675,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
144449
144675
  name: "helperText",
144450
144676
  type: "string",
144451
144677
  required: !1,
144452
- description: "Help text under the picker. An error replaces it."
144678
+ description: "Helper text under the picker. An error replaces it."
144453
144679
  },
144454
144680
  {
144455
144681
  name: "kind",
@@ -144474,7 +144700,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
144474
144700
  "stacked"
144475
144701
  ],
144476
144702
  required: !1,
144477
- description: "Stacked is the ring with the hint below. Inline puts the ring on the left with a title, subtitle and hint column beside it. Profile stacks the same identity block, centred, beneath the ring. Applies to the overlay controls.",
144703
+ description: "Stacked is the ring with the helper text below. Inline puts the ring on the left with a title, subtitle and helper text column beside it. Profile stacks the same identity block, centred, beneath the ring. Applies to the overlay controls.",
144478
144704
  default: "stacked"
144479
144705
  },
144480
144706
  {
@@ -144671,6 +144897,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
144671
144897
  }
144672
144898
  ],
144673
144899
  do: [{
144900
+ title: "Name the action the overlay performs",
144674
144901
  note: "Set an overlay label that names the thing, such as \"Change logo\", so the hover affordance says exactly what happens.",
144675
144902
  example: [{
144676
144903
  component: "AppImagePicker",
@@ -144680,6 +144907,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
144680
144907
  }
144681
144908
  }]
144682
144909
  }, {
144910
+ title: "Label and size the picker",
144683
144911
  note: "Say what a good photo is. People crop better when they know.",
144684
144912
  example: [{
144685
144913
  component: "AppImagePicker",
@@ -144692,6 +144920,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
144692
144920
  }]
144693
144921
  }],
144694
144922
  dont: [{
144923
+ title: "Name the action the overlay performs",
144695
144924
  note: "A generic \"Click\" overlay tells the user how to interact but not what the action does.",
144696
144925
  example: [{
144697
144926
  component: "AppImagePicker",
@@ -144701,6 +144930,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
144701
144930
  }
144702
144931
  }]
144703
144932
  }, {
144933
+ title: "Label and size the picker",
144704
144934
  note: "A tiny, disabled avatar picker with no label. Nobody can tell it sets their photo.",
144705
144935
  example: [{
144706
144936
  component: "AppImagePicker",
@@ -144715,7 +144945,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
144715
144945
  a11y: [
144716
144946
  "The upload control is named by ariaLabel, else by Upload photo for the overlay and by the action's words (Choose or Change photo) for buttons. It is disabled and marked busy while loading.",
144717
144947
  "The remove control is its own button named by removeLabel, and it stays hidden until there is an image to remove.",
144718
- "The hint or the error is tied to the upload control with aria-describedby, and an error wins over the hint.",
144948
+ "The helper text or the error is tied to the upload control with aria-describedby, and an error wins over helper text.",
144719
144949
  "The buttons look sits out of the tab order and the Upload button beside it is the keyboard path to the same action."
144720
144950
  ]
144721
144951
  }
@@ -144781,8 +145011,8 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
144781
145011
  instead: "AppAlert"
144782
145012
  },
144783
145013
  {
144784
- text: "It is a permanent hint under a field the user should always read.",
144785
- instead: "the hint prop on AppInput"
145014
+ text: "It is a permanent helper text under a field the user should always read.",
145015
+ instead: "the helperText prop on AppInput"
144786
145016
  },
144787
145017
  {
144788
145018
  text: "You would otherwise expose the text via a native title=\"\".",
@@ -144794,6 +145024,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
144794
145024
  }
144795
145025
  ],
144796
145026
  do: [{
145027
+ title: "Ask the question in the label",
144797
145028
  note: "Give the tip a descriptive label (a real question) so it’s clear what the “?” explains, and keep the body to a sentence.",
144798
145029
  example: [{
144799
145030
  component: "span",
@@ -144805,6 +145036,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
144805
145036
  }]
144806
145037
  }]
144807
145038
  }, {
145039
+ title: "Attach the tip to its term",
144808
145040
  note: "Attach the tip to the exact term it explains, inline with the label, so the “?” sits where the question arises.",
144809
145041
  example: [{
144810
145042
  component: "span",
@@ -144817,6 +145049,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
144817
145049
  }]
144818
145050
  }],
144819
145051
  dont: [{
145052
+ title: "Ask the question in the label",
144820
145053
  note: "A vague “info” label and a wall of text overload a tip: move long explanations into a linked doc.",
144821
145054
  example: [{
144822
145055
  component: "span",
@@ -144828,6 +145061,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
144828
145061
  }]
144829
145062
  }]
144830
145063
  }, {
145064
+ title: "Attach the tip to its term",
144831
145065
  note: "Burying the explanation elsewhere (or omitting it) forces the user to leave the field to understand it.",
144832
145066
  example: [{
144833
145067
  component: "span",
@@ -145045,7 +145279,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
145045
145279
  name: "helperText",
145046
145280
  type: "string",
145047
145281
  required: !1,
145048
- description: "Help text under the field. An error replaces it while both are set."
145282
+ description: "Helper text under the field. An error replaces it while both are set."
145049
145283
  },
145050
145284
  {
145051
145285
  name: "hidePasswordLabel",
@@ -145238,7 +145472,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
145238
145472
  "top"
145239
145473
  ],
145240
145474
  required: !1,
145241
- description: "The side the requirements popover opens on. Auto flips to stay in view. Inline puts the checklist under the field, in place of the hint.",
145475
+ description: "The side the requirements popover opens on. Auto flips to stay in view. Inline puts the checklist under the field, in place of the helper text.",
145242
145476
  default: "auto"
145243
145477
  },
145244
145478
  {
@@ -145325,7 +145559,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
145325
145559
  usage: {
145326
145560
  when: [
145327
145561
  "The user enters a single line of text or a number: name, email, amount, reference.",
145328
- "You want the shared field treatment: label, hint, error, and required marking.",
145562
+ "You want the shared field treatment: label, helper text, error, and required marking.",
145329
145563
  "A specific type (email, number, tel) should drive the keyboard and native validation."
145330
145564
  ],
145331
145565
  whenNot: [
@@ -145348,6 +145582,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
145348
145582
  ],
145349
145583
  do: [
145350
145584
  {
145585
+ title: "A visible label, not a placeholder",
145351
145586
  note: "A visible label stays put while the user types and is read by screen readers.",
145352
145587
  example: [{
145353
145588
  component: "AppInput",
@@ -145360,6 +145595,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
145360
145595
  }]
145361
145596
  },
145362
145597
  {
145598
+ title: "Use the right input type",
145363
145599
  note: "type=\"email\" brings the right keyboard and native validation for free.",
145364
145600
  example: [{
145365
145601
  component: "AppInput",
@@ -145372,6 +145608,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
145372
145608
  }]
145373
145609
  },
145374
145610
  {
145611
+ title: "Say exactly what is wrong",
145375
145612
  note: "A specific error tells the user exactly what to change.",
145376
145613
  example: [{
145377
145614
  component: "AppInput",
@@ -145386,6 +145623,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
145386
145623
  ],
145387
145624
  dont: [
145388
145625
  {
145626
+ title: "A visible label, not a placeholder",
145389
145627
  note: "A placeholder used as the label vanishes on the first keystroke and fails accessibility.",
145390
145628
  example: [{
145391
145629
  component: "AppInput",
@@ -145396,6 +145634,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
145396
145634
  }]
145397
145635
  },
145398
145636
  {
145637
+ title: "Use the right input type",
145399
145638
  note: "A plain text type misses the email keyboard and validation the browser could give.",
145400
145639
  example: [{
145401
145640
  component: "AppInput",
@@ -145408,6 +145647,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
145408
145647
  }]
145409
145648
  },
145410
145649
  {
145650
+ title: "Say exactly what is wrong",
145411
145651
  note: "Invalid leaves them guessing what is actually wrong.",
145412
145652
  example: [{
145413
145653
  component: "AppInput",
@@ -145421,7 +145661,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
145421
145661
  }
145422
145662
  ],
145423
145663
  a11y: [
145424
- "The control carries aria-invalid, and aria-describedby points at the error or the hint.",
145664
+ "The control carries aria-invalid, and aria-describedby points at the error or the helper text.",
145425
145665
  "The clear button is named Clear and is hidden while the field is empty.",
145426
145666
  "The password reveal button is named Show password or Hide password, and the checklist sits in a polite live region.",
145427
145667
  "The right-icon button is named by rightIconLabel, or by the icon name when none is given.",
@@ -145775,7 +146015,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
145775
146015
  takesAction: [],
145776
146016
  source: "@webority/ui-react",
145777
146017
  usage: {
145778
- when: ["Naming a key in help text, a hint or an empty state.", "A legend or a guide that lists keys."],
146018
+ when: ["Naming a key in help text, in a field's helper text or in an empty state.", "A legend or a guide that lists keys."],
145779
146019
  whenNot: [{
145780
146020
  text: "Showing the key of a button or menu row.",
145781
146021
  instead: "the shortcut prop"
@@ -146009,6 +146249,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
146009
146249
  }
146010
146250
  ],
146011
146251
  do: [{
146252
+ title: "Name the measure and comparison",
146012
146253
  note: "Name what is measured and say what the delta compares against. “vs last week” is what makes 12 meaningful.",
146013
146254
  example: [{
146014
146255
  component: "AppKpiTile",
@@ -146021,6 +146262,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
146021
146262
  }]
146022
146263
  }],
146023
146264
  dont: [{
146265
+ title: "Name the measure and comparison",
146024
146266
  note: "“Count” of what? “+4” since when? The reader cannot act on either without going to look somewhere else.",
146025
146267
  example: [{
146026
146268
  component: "AppKpiTile",
@@ -146473,6 +146715,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
146473
146715
  }
146474
146716
  ],
146475
146717
  do: [{
146718
+ title: "Name the destination",
146476
146719
  note: "One clear animation and a descriptive label. The link reads as a link and says where it goes.",
146477
146720
  example: [{
146478
146721
  component: "AppLink",
@@ -146484,6 +146727,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
146484
146727
  }]
146485
146728
  }],
146486
146729
  dont: [{
146730
+ title: "Name the destination",
146487
146731
  note: "“Click here” tells the reader nothing. Name the destination so the link explains where it goes.",
146488
146732
  example: [{
146489
146733
  component: "AppLink",
@@ -146692,7 +146936,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
146692
146936
  name: "placeholder",
146693
146937
  type: "string",
146694
146938
  required: !1,
146695
- description: "Hint text shown while the box is empty."
146939
+ description: "Placeholder text shown while the box is empty."
146696
146940
  },
146697
146941
  {
146698
146942
  name: "readOnly",
@@ -146750,7 +146994,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
146750
146994
  dont: [],
146751
146995
  a11y: [
146752
146996
  "The label points at the text box, whose id is the element id plus -text, so the label names it.",
146753
- "The hint or the error is tied to the box with aria-describedby, and an error also marks the box aria-invalid.",
146997
+ "The helper text or the error is tied to the box with aria-describedby, and an error also marks the box aria-invalid.",
146754
146998
  "In the list, Up and Down choose, Enter or Tab mention and Escape closes it. Backspace just after a mention removes it whole."
146755
146999
  ]
146756
147000
  }
@@ -146867,6 +147111,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
146867
147111
  }
146868
147112
  ],
146869
147113
  do: [{
147114
+ title: "Use meters for measurements, not tasks",
146870
147115
  note: "Real thresholds that mean something operationally, so the auto-tone is trustworthy.",
146871
147116
  example: [{
146872
147117
  component: "AppMeter",
@@ -146881,6 +147126,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
146881
147126
  }]
146882
147127
  }],
146883
147128
  dont: [{
147129
+ title: "Use meters for measurements, not tasks",
146884
147130
  note: "A task advancing toward completion is not a measurement: that is AppProgress, not AppMeter.",
146885
147131
  example: [{
146886
147132
  component: "AppMeter",
@@ -147158,12 +147404,14 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
147158
147404
  }
147159
147405
  ],
147160
147406
  do: [{
147407
+ title: "One trigger, one dialog",
147161
147408
  note: "A clear trigger opens a single-purpose dialog; open/onClose stay controlled so Escape and the backdrop always work.",
147162
147409
  example: [{
147163
147410
  component: "AppButton",
147164
147411
  children: "Edit project"
147165
147412
  }]
147166
147413
  }, {
147414
+ title: "One primary action in the footer",
147167
147415
  note: "A footer that pairs a secondary Cancel with one primary confirm: the eye knows the main action.",
147168
147416
  example: [{
147169
147417
  component: "div",
@@ -147179,6 +147427,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
147179
147427
  }]
147180
147428
  }],
147181
147429
  dont: [{
147430
+ title: "One trigger, one dialog",
147182
147431
  note: "A modal with no onClose traps the user: the backdrop and Escape have nothing to call.",
147183
147432
  example: [{
147184
147433
  component: "AppButton",
@@ -147186,6 +147435,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
147186
147435
  children: "Open (never closes)"
147187
147436
  }]
147188
147437
  }, {
147438
+ title: "One primary action in the footer",
147189
147439
  note: "Three competing primaries in the footer leave the user unsure which one commits.",
147190
147440
  example: [{
147191
147441
  component: "div",
@@ -147457,188 +147707,292 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
147457
147707
  instead: "AppChip"
147458
147708
  }
147459
147709
  ],
147460
- do: [{
147461
- note: "Many related values in one compact control; the current picks read back as chips.",
147462
- example: [{
147463
- component: "AppMultiSelect",
147464
- props: {
147465
- label: "Skills",
147466
- name: "skills",
147467
- options: [
147468
- {
147469
- value: "risk-assessment",
147470
- label: "Risk assessment"
147471
- },
147472
- {
147473
- value: "lightning-protection",
147474
- label: "Lightning protection"
147475
- },
147476
- {
147477
- value: "surge-protection",
147478
- label: "Surge protection"
147479
- },
147480
- {
147481
- value: "earthing",
147482
- label: "Earthing"
147483
- },
147484
- {
147485
- value: "bonding",
147486
- label: "Bonding"
147487
- },
147488
- {
147489
- value: "site-survey",
147490
- label: "Site survey"
147491
- },
147492
- {
147493
- value: "iec-62305",
147494
- label: "IEC 62305"
147495
- },
147496
- {
147497
- value: "reporting",
147498
- label: "Reporting"
147499
- }
147500
- ],
147501
- values: ["iec-62305", "earthing"],
147502
- placeholder: "Add skills…",
147503
- helperText: "2 selected"
147504
- }
147505
- }]
147506
- }, {
147507
- note: "A searchable checklist keeps a long list usable: the user filters instead of scrolling.",
147508
- example: [{
147509
- component: "AppMultiSelect",
147510
- props: {
147511
- label: "Tags",
147512
- name: "tags",
147513
- options: [
147514
- {
147515
- value: "risk-assessment",
147516
- label: "Risk assessment"
147517
- },
147518
- {
147519
- value: "lightning-protection",
147520
- label: "Lightning protection"
147521
- },
147522
- {
147523
- value: "surge-protection",
147524
- label: "Surge protection"
147525
- },
147526
- {
147527
- value: "earthing",
147528
- label: "Earthing"
147529
- },
147530
- {
147531
- value: "bonding",
147532
- label: "Bonding"
147533
- },
147534
- {
147535
- value: "site-survey",
147536
- label: "Site survey"
147537
- },
147538
- {
147539
- value: "iec-62305",
147540
- label: "IEC 62305"
147541
- },
147542
- {
147543
- value: "reporting",
147544
- label: "Reporting"
147545
- }
147546
- ],
147547
- values: [],
147548
- placeholder: "Select tags…"
147549
- }
147550
- }]
147551
- }],
147552
- dont: [{
147553
- note: "A wall of checkboxes for the same multi-pick is slower to scan and hides the total selection.",
147554
- example: [{
147555
- component: "div",
147556
- props: { className: "d-flex flex-column gap-2" },
147557
- children: [
147558
- {
147559
- component: "AppCheckbox",
147560
- props: {
147561
- label: "Risk assessment",
147562
- name: "skill-risk-assessment"
147563
- }
147564
- },
147565
- {
147566
- component: "AppCheckbox",
147567
- props: {
147568
- label: "Lightning protection",
147569
- name: "skill-lightning-protection"
147570
- }
147571
- },
147572
- {
147573
- component: "AppCheckbox",
147574
- props: {
147575
- label: "Surge protection",
147576
- name: "skill-surge-protection"
147577
- }
147578
- },
147579
- {
147580
- component: "AppCheckbox",
147581
- props: {
147582
- label: "Earthing",
147583
- name: "skill-earthing"
147584
- }
147585
- },
147586
- {
147587
- component: "AppCheckbox",
147588
- props: {
147589
- label: "Bonding",
147590
- name: "skill-bonding"
147591
- }
147710
+ do: [
147711
+ {
147712
+ title: "Several picks as chips, not checkboxes",
147713
+ note: "Many related values in one compact control; the current picks read back as chips.",
147714
+ example: [{
147715
+ component: "AppMultiSelect",
147716
+ props: {
147717
+ label: "Skills",
147718
+ name: "skills",
147719
+ options: [
147720
+ {
147721
+ value: "risk-assessment",
147722
+ label: "Risk assessment"
147723
+ },
147724
+ {
147725
+ value: "lightning-protection",
147726
+ label: "Lightning protection"
147727
+ },
147728
+ {
147729
+ value: "surge-protection",
147730
+ label: "Surge protection"
147731
+ },
147732
+ {
147733
+ value: "earthing",
147734
+ label: "Earthing"
147735
+ },
147736
+ {
147737
+ value: "bonding",
147738
+ label: "Bonding"
147739
+ },
147740
+ {
147741
+ value: "site-survey",
147742
+ label: "Site survey"
147743
+ },
147744
+ {
147745
+ value: "iec-62305",
147746
+ label: "IEC 62305"
147747
+ },
147748
+ {
147749
+ value: "reporting",
147750
+ label: "Reporting"
147751
+ }
147752
+ ],
147753
+ values: ["iec-62305", "earthing"],
147754
+ placeholder: "Add skills…",
147755
+ helperText: "2 selected"
147592
147756
  }
147593
- ]
147594
- }]
147595
- }, {
147596
- note: "Only one value can ever apply here: a single-select dropdown says so; a multiselect invites over-picking.",
147597
- example: [{
147598
- component: "AppMultiSelect",
147599
- props: {
147600
- label: "Primary standard",
147601
- name: "standard-bad",
147602
- options: [
147603
- {
147604
- value: "risk-assessment",
147605
- label: "Risk assessment"
147606
- },
147607
- {
147608
- value: "lightning-protection",
147609
- label: "Lightning protection"
147610
- },
147611
- {
147612
- value: "surge-protection",
147613
- label: "Surge protection"
147614
- },
147757
+ }]
147758
+ },
147759
+ {
147760
+ title: "Make long lists searchable",
147761
+ note: "A searchable checklist keeps a long list usable: the user filters instead of scrolling.",
147762
+ example: [{
147763
+ component: "AppMultiSelect",
147764
+ props: {
147765
+ label: "Tags",
147766
+ name: "tags",
147767
+ options: [
147768
+ {
147769
+ value: "risk-assessment",
147770
+ label: "Risk assessment"
147771
+ },
147772
+ {
147773
+ value: "lightning-protection",
147774
+ label: "Lightning protection"
147775
+ },
147776
+ {
147777
+ value: "surge-protection",
147778
+ label: "Surge protection"
147779
+ },
147780
+ {
147781
+ value: "earthing",
147782
+ label: "Earthing"
147783
+ },
147784
+ {
147785
+ value: "bonding",
147786
+ label: "Bonding"
147787
+ },
147788
+ {
147789
+ value: "site-survey",
147790
+ label: "Site survey"
147791
+ },
147792
+ {
147793
+ value: "iec-62305",
147794
+ label: "IEC 62305"
147795
+ },
147796
+ {
147797
+ value: "reporting",
147798
+ label: "Reporting"
147799
+ }
147800
+ ],
147801
+ values: [],
147802
+ placeholder: "Select tags…"
147803
+ }
147804
+ }]
147805
+ },
147806
+ {
147807
+ title: "Single values use single-select",
147808
+ note: "One value can apply here, so a single-select dropdown says so; a multiselect invites over-picking.",
147809
+ example: [{
147810
+ component: "AppSelect",
147811
+ props: {
147812
+ label: "Primary standard",
147813
+ name: "standard",
147814
+ value: "iec-62305",
147815
+ options: [
147816
+ {
147817
+ value: "risk-assessment",
147818
+ label: "Risk assessment"
147819
+ },
147820
+ {
147821
+ value: "lightning-protection",
147822
+ label: "Lightning protection"
147823
+ },
147824
+ {
147825
+ value: "surge-protection",
147826
+ label: "Surge protection"
147827
+ },
147828
+ {
147829
+ value: "earthing",
147830
+ label: "Earthing"
147831
+ },
147832
+ {
147833
+ value: "bonding",
147834
+ label: "Bonding"
147835
+ },
147836
+ {
147837
+ value: "site-survey",
147838
+ label: "Site survey"
147839
+ },
147840
+ {
147841
+ value: "iec-62305",
147842
+ label: "IEC 62305"
147843
+ },
147844
+ {
147845
+ value: "reporting",
147846
+ label: "Reporting"
147847
+ }
147848
+ ]
147849
+ }
147850
+ }]
147851
+ }
147852
+ ],
147853
+ dont: [
147854
+ {
147855
+ title: "Several picks as chips, not checkboxes",
147856
+ note: "A wall of checkboxes for the same multi-pick is slower to scan and hides the total selection.",
147857
+ example: [{
147858
+ component: "div",
147859
+ props: { className: "d-flex flex-column gap-2" },
147860
+ children: [
147615
147861
  {
147616
- value: "earthing",
147617
- label: "Earthing"
147862
+ component: "AppCheckbox",
147863
+ props: {
147864
+ label: "Risk assessment",
147865
+ name: "skill-risk-assessment"
147866
+ }
147618
147867
  },
147619
147868
  {
147620
- value: "bonding",
147621
- label: "Bonding"
147869
+ component: "AppCheckbox",
147870
+ props: {
147871
+ label: "Lightning protection",
147872
+ name: "skill-lightning-protection"
147873
+ }
147622
147874
  },
147623
147875
  {
147624
- value: "site-survey",
147625
- label: "Site survey"
147876
+ component: "AppCheckbox",
147877
+ props: {
147878
+ label: "Surge protection",
147879
+ name: "skill-surge-protection"
147880
+ }
147626
147881
  },
147627
147882
  {
147628
- value: "iec-62305",
147629
- label: "IEC 62305"
147883
+ component: "AppCheckbox",
147884
+ props: {
147885
+ label: "Earthing",
147886
+ name: "skill-earthing"
147887
+ }
147630
147888
  },
147631
147889
  {
147632
- value: "reporting",
147633
- label: "Reporting"
147890
+ component: "AppCheckbox",
147891
+ props: {
147892
+ label: "Bonding",
147893
+ name: "skill-bonding"
147894
+ }
147634
147895
  }
147635
- ],
147636
- values: ["iec-62305"]
147637
- }
147638
- }]
147639
- }],
147896
+ ]
147897
+ }]
147898
+ },
147899
+ {
147900
+ title: "Make long lists searchable",
147901
+ note: "With search off, the user scrolls the whole list to find one option, so a long list needs a search box.",
147902
+ example: [{
147903
+ component: "AppMultiSelect",
147904
+ props: {
147905
+ label: "Tags",
147906
+ name: "tags-unsearchable",
147907
+ searchable: !1,
147908
+ values: [],
147909
+ placeholder: "Select tags…",
147910
+ options: [
147911
+ {
147912
+ value: "risk-assessment",
147913
+ label: "Risk assessment"
147914
+ },
147915
+ {
147916
+ value: "lightning-protection",
147917
+ label: "Lightning protection"
147918
+ },
147919
+ {
147920
+ value: "surge-protection",
147921
+ label: "Surge protection"
147922
+ },
147923
+ {
147924
+ value: "earthing",
147925
+ label: "Earthing"
147926
+ },
147927
+ {
147928
+ value: "bonding",
147929
+ label: "Bonding"
147930
+ },
147931
+ {
147932
+ value: "site-survey",
147933
+ label: "Site survey"
147934
+ },
147935
+ {
147936
+ value: "iec-62305",
147937
+ label: "IEC 62305"
147938
+ },
147939
+ {
147940
+ value: "reporting",
147941
+ label: "Reporting"
147942
+ }
147943
+ ]
147944
+ }
147945
+ }]
147946
+ },
147947
+ {
147948
+ title: "Single values use single-select",
147949
+ note: "Only one value can ever apply here: a single-select dropdown says so; a multiselect invites over-picking.",
147950
+ example: [{
147951
+ component: "AppMultiSelect",
147952
+ props: {
147953
+ label: "Primary standard",
147954
+ name: "standard-bad",
147955
+ options: [
147956
+ {
147957
+ value: "risk-assessment",
147958
+ label: "Risk assessment"
147959
+ },
147960
+ {
147961
+ value: "lightning-protection",
147962
+ label: "Lightning protection"
147963
+ },
147964
+ {
147965
+ value: "surge-protection",
147966
+ label: "Surge protection"
147967
+ },
147968
+ {
147969
+ value: "earthing",
147970
+ label: "Earthing"
147971
+ },
147972
+ {
147973
+ value: "bonding",
147974
+ label: "Bonding"
147975
+ },
147976
+ {
147977
+ value: "site-survey",
147978
+ label: "Site survey"
147979
+ },
147980
+ {
147981
+ value: "iec-62305",
147982
+ label: "IEC 62305"
147983
+ },
147984
+ {
147985
+ value: "reporting",
147986
+ label: "Reporting"
147987
+ }
147988
+ ],
147989
+ values: ["iec-62305"]
147990
+ }
147991
+ }]
147992
+ }
147993
+ ],
147640
147994
  a11y: [
147641
- "The control takes its accessible name from a text label, is described by its hint or its error, and is marked invalid while it has an error.",
147995
+ "The control takes its accessible name from a text label, is described by its helper text or its error, and is marked invalid while it has an error.",
147642
147996
  "A node label is read as its text: the option, the chip and the chip's remove button are named from it.",
147643
147997
  "Each chosen value is a removable chip, so the selection is readable without opening the menu."
147644
147998
  ]
@@ -148046,7 +148400,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
148046
148400
  name: "helperText",
148047
148401
  type: "string",
148048
148402
  required: !1,
148049
- description: "Help text under the field, linked to the input for screen readers."
148403
+ description: "Helper text under the field, linked to the input for screen readers."
148050
148404
  },
148051
148405
  {
148052
148406
  name: "id",
@@ -148371,7 +148725,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
148371
148725
  name: "helperText",
148372
148726
  type: "string",
148373
148727
  required: !1,
148374
- description: "Help text under the code. It is hidden while an error is shown."
148728
+ description: "Helper text under the code. It is hidden while an error is shown."
148375
148729
  },
148376
148730
  {
148377
148731
  name: "id",
@@ -148480,6 +148834,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
148480
148834
  }
148481
148835
  ],
148482
148836
  do: [{
148837
+ title: "One field for the whole code",
148483
148838
  note: "One labelled field, six boxes drawn underneath. Autofill, paste and a screen reader all work.",
148484
148839
  example: [{
148485
148840
  component: "AppOtpInput",
@@ -148487,6 +148842,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
148487
148842
  }]
148488
148843
  }],
148489
148844
  dont: [{
148845
+ title: "One field for the whole code",
148490
148846
  note: "Six inputs: the OS drops the whole SMS code into box one, and a screen reader announces six unlabelled boxes.",
148491
148847
  example: [{
148492
148848
  component: "div",
@@ -148742,6 +149098,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
148742
149098
  }
148743
149099
  ],
148744
149100
  do: [{
149101
+ title: "One primary page action",
148745
149102
  note: "One clear title, a context subtitle, and the single page-level action on the right.",
148746
149103
  example: [{
148747
149104
  component: "AppPageHeader",
@@ -148756,6 +149113,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
148756
149113
  }
148757
149114
  }]
148758
149115
  }, {
149116
+ title: "Keep the subtitle short and useful",
148759
149117
  note: "The subtitle carries useful state: what this is and when it changed.",
148760
149118
  example: [{
148761
149119
  component: "AppPageHeader",
@@ -148766,6 +149124,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
148766
149124
  }]
148767
149125
  }],
148768
149126
  dont: [{
149127
+ title: "One primary page action",
148769
149128
  note: "A pile of equal-weight buttons hides the primary action. Keep secondary ones in a menu.",
148770
149129
  example: [{
148771
149130
  component: "AppPageHeader",
@@ -148808,6 +149167,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
148808
149167
  }
148809
149168
  }]
148810
149169
  }, {
149170
+ title: "Keep the subtitle short and useful",
148811
149171
  note: "A sentence-long subtitle reads as body copy, not a heading. Keep it to a phrase.",
148812
149172
  example: [{
148813
149173
  component: "AppPageHeader",
@@ -148884,7 +149244,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
148884
149244
  name: "helperText",
148885
149245
  type: "string",
148886
149246
  required: !1,
148887
- description: "Help text under the field. The error replaces it while one is shown."
149247
+ description: "Helper text under the field. The error replaces it while one is shown."
148888
149248
  },
148889
149249
  {
148890
149250
  name: "id",
@@ -148936,7 +149296,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
148936
149296
  name: "placeholder",
148937
149297
  type: "string",
148938
149298
  required: !1,
148939
- description: "Hint text in the empty field. Left unset, the control hints with the country's example number."
149299
+ description: "Placeholder text in the empty field. Left unset, the control shows the country's example number."
148940
149300
  },
148941
149301
  {
148942
149302
  name: "readOnly",
@@ -149013,6 +149373,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
149013
149373
  }
149014
149374
  ],
149015
149375
  do: [{
149376
+ title: "Default the country",
149016
149377
  note: "Default the country to the one most users will pick: fewer taps for the common case.",
149017
149378
  example: [{
149018
149379
  component: "AppPhoneNumberInput",
@@ -149023,6 +149384,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
149023
149384
  }
149024
149385
  }]
149025
149386
  }, {
149387
+ title: "Show the error under the field",
149026
149388
  note: "Surface validation inline with error, right under the field the user must fix.",
149027
149389
  example: [{
149028
149390
  component: "AppPhoneNumberInput",
@@ -149035,6 +149397,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
149035
149397
  }]
149036
149398
  }],
149037
149399
  dont: [{
149400
+ title: "Default the country",
149038
149401
  note: "No label and no sensible default country: the user guesses what to enter and where.",
149039
149402
  example: [{
149040
149403
  component: "AppPhoneNumberInput",
@@ -149044,6 +149407,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
149044
149407
  }
149045
149408
  }]
149046
149409
  }, {
149410
+ title: "Show the error under the field",
149047
149411
  note: "Required with no error feedback: the user submits and is bounced with no clue why.",
149048
149412
  example: [{
149049
149413
  component: "AppPhoneNumberInput",
@@ -149056,7 +149420,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
149056
149420
  }],
149057
149421
  a11y: [
149058
149422
  "The label is a real label tied to the field by id, and a text label is also passed to the phone control as its accessible name.",
149059
- "An error or hint is linked to the field with aria-describedby, and the hint gives way to the error while one shows.",
149423
+ "An error or helper text is linked to the field with aria-describedby, and the helper text gives way to the error while one shows.",
149060
149424
  "An error sets aria-invalid on the control, and required adds the required mark and marks the control required."
149061
149425
  ]
149062
149426
  }
@@ -149164,6 +149528,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
149164
149528
  }
149165
149529
  ],
149166
149530
  do: [{
149531
+ title: "Keep the panel short",
149167
149532
  note: "A short, scannable panel: a few lines the user can read without scrolling.",
149168
149533
  example: [{
149169
149534
  component: "AppPopover",
@@ -149189,6 +149554,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
149189
149554
  }]
149190
149555
  }],
149191
149556
  dont: [{
149557
+ title: "Keep the panel short",
149192
149558
  note: "A multi-field form crammed into a popover has nowhere to show validation and no backdrop to hold focus. Use AppModal instead.",
149193
149559
  example: [{
149194
149560
  component: "AppPopover",
@@ -149350,6 +149716,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
149350
149716
  }
149351
149717
  ],
149352
149718
  do: [{
149719
+ title: "Unit, audience and every feature listed",
149353
149720
  note: "A unit so the price is unambiguous, a tagline saying who it is for, excluded features kept in the list, and a CTA naming the tier.",
149354
149721
  example: [{
149355
149722
  component: "AppPricingCard",
@@ -149371,6 +149738,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
149371
149738
  }]
149372
149739
  }],
149373
149740
  dont: [{
149741
+ title: "Unit, audience and every feature listed",
149374
149742
  note: "“1499”: of what, per what? No tagline, the excluded feature dropped so rows no longer align, and “Click here” tells the reader nothing about what they are committing to.",
149375
149743
  example: [{
149376
149744
  component: "AppPricingCard",
@@ -149497,6 +149865,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
149497
149865
  }
149498
149866
  ],
149499
149867
  do: [{
149868
+ title: "Real amounts, not fake progress",
149500
149869
  note: "A real value with a label that states the actual amount, not just a bare percentage.",
149501
149870
  example: [{
149502
149871
  component: "AppProgress",
@@ -149510,6 +149879,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
149510
149879
  }]
149511
149880
  }],
149512
149881
  dont: [{
149882
+ title: "Real amounts, not fake progress",
149513
149883
  note: "A progress bar pinned at 100% (or any fixed value) to fake a spinner. That is AppSpinner's job.",
149514
149884
  example: [{
149515
149885
  component: "AppProgress",
@@ -149577,6 +149947,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
149577
149947
  instead: "AppCopyButton"
149578
149948
  }],
149579
149949
  do: [{
149950
+ title: "Clear title and room to scan",
149580
149951
  note: "Enough room around it, and a title that says what scanning does.",
149581
149952
  example: [{
149582
149953
  component: "AppQrCode",
@@ -149588,6 +149959,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
149588
149959
  }]
149589
149960
  }],
149590
149961
  dont: [{
149962
+ title: "Clear title and room to scan",
149591
149963
  note: "A long value squeezed into a small box. The squares are too small to scan, and part of the code is cut off.",
149592
149964
  example: [{
149593
149965
  component: "AppQrCode",
@@ -149638,7 +150010,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
149638
150010
  name: "error",
149639
150011
  type: "string",
149640
150012
  required: !1,
149641
- description: "Error message, rendered below the control. Replaces the hint."
150013
+ description: "Error message, rendered below the control. Replaces the helper text."
149642
150014
  },
149643
150015
  {
149644
150016
  name: "help",
@@ -149738,6 +150110,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
149738
150110
  }
149739
150111
  ],
149740
150112
  do: [{
150113
+ title: "Two to five options, all visible",
149741
150114
  note: "2 to 5 exclusive options, all on screen. The user compares every choice without opening anything.",
149742
150115
  example: [
149743
150116
  {
@@ -149764,6 +150137,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
149764
150137
  }
149765
150138
  ]
149766
150139
  }, {
150140
+ title: "Radios for one answer, not checkboxes",
149767
150141
  note: "Radios enforce a single answer. Exactly one can ever be selected.",
149768
150142
  example: [
149769
150143
  {
@@ -149791,6 +150165,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
149791
150165
  ]
149792
150166
  }],
149793
150167
  dont: [{
150168
+ title: "Two to five options, all visible",
149794
150169
  note: "Past about five options a radio list sprawls and is hard to scan. A dropdown holds it in one line.",
149795
150170
  example: [
149796
150171
  {
@@ -149852,6 +150227,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
149852
150227
  }
149853
150228
  ]
149854
150229
  }, {
150230
+ title: "Radios for one answer, not checkboxes",
149855
150231
  note: "Checkboxes let the user tick several, the wrong control for a single exclusive choice.",
149856
150232
  example: [
149857
150233
  {
@@ -149909,7 +150285,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
149909
150285
  name: "error",
149910
150286
  type: "string",
149911
150287
  required: !1,
149912
- description: "Error message below the group. Replaces the hint."
150288
+ description: "Error message below the group. Replaces the helper text."
149913
150289
  },
149914
150290
  {
149915
150291
  name: "fieldClassName",
@@ -150069,7 +150445,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
150069
150445
  when: [
150070
150446
  "Two to five exclusive options, and the reader should see all of them before choosing.",
150071
150447
  "The choice is a field in a form that sits in the same grid as the other fields.",
150072
- "You need a hint, an error or a required mark on the group as a whole."
150448
+ "You need helper text, an error or a required mark on the group as a whole."
150073
150449
  ],
150074
150450
  whenNot: [
150075
150451
  {
@@ -150094,7 +150470,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
150094
150470
  a11y: [
150095
150471
  "The group is a radiogroup named by its label, so a screen reader announces the label as the group's name.",
150096
150472
  "Each option's label is bound to its radio through htmlFor, so a click on the text selects it.",
150097
- "A hint or an error is linked to the group through aria-describedby."
150473
+ "Helper text or an error is linked to the group through aria-describedby."
150098
150474
  ]
150099
150475
  }
150100
150476
  },
@@ -150509,6 +150885,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
150509
150885
  }
150510
150886
  ],
150511
150887
  do: [{
150888
+ title: "Name the actions and number rows",
150512
150889
  note: "Specific add and remove labels (\"Add contact\"), a minimum so the form cannot reach an unsubmittable state, and numbered rows validation can point at.",
150513
150890
  example: [{
150514
150891
  component: "AppRepeater",
@@ -150522,6 +150899,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
150522
150899
  }]
150523
150900
  }],
150524
150901
  dont: [{
150902
+ title: "Name the actions and number rows",
150525
150903
  note: "A generic \"Add another\", no remove control at all, and no numbering, so \"Row 2 email is invalid\" has nothing to point at.",
150526
150904
  example: [{
150527
150905
  component: "AppRepeater",
@@ -150559,6 +150937,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
150559
150937
  }
150560
150938
  ],
150561
150939
  do: [{
150940
+ title: "One mark beside the label",
150562
150941
  note: "One asterisk flush against its label, using the shared mark.",
150563
150942
  example: [{
150564
150943
  component: "span",
@@ -150566,6 +150945,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
150566
150945
  children: ["Company name", { component: "AppRequiredMark" }]
150567
150946
  }]
150568
150947
  }, {
150948
+ title: "Let the field own the mark",
150569
150949
  note: "Let the field own the mark via required.",
150570
150950
  example: [{
150571
150951
  component: "AppInput",
@@ -150576,6 +150956,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
150576
150956
  }]
150577
150957
  }],
150578
150958
  dont: [{
150959
+ title: "One mark beside the label",
150579
150960
  note: "A hand-rolled star drifts in colour and spacing from every library field.",
150580
150961
  example: [{
150581
150962
  component: "span",
@@ -150587,6 +150968,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
150587
150968
  }]
150588
150969
  }]
150589
150970
  }, {
150971
+ title: "Let the field own the mark",
150590
150972
  note: "A star typed into the label of a required field doubles the mark: the field already draws one.",
150591
150973
  example: [{
150592
150974
  component: "AppInput",
@@ -150792,6 +151174,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
150792
151174
  }
150793
151175
  ],
150794
151176
  do: [{
151177
+ title: "Link text that names the resource",
150795
151178
  note: "The title names the resource, the text says the format and what to do with it, and the icon matches the action (a download).",
150796
151179
  example: [{
150797
151180
  component: "AppResourceCard",
@@ -150804,6 +151187,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
150804
151187
  }]
150805
151188
  }],
150806
151189
  dont: [{
151190
+ title: "Link text that names the resource",
150807
151191
  note: "\"Click here\" twice tells the reader nothing about the destination, and it is what a screen reader announces as the link name.",
150808
151192
  example: [{
150809
151193
  component: "AppResourceCard",
@@ -151057,6 +151441,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
151057
151441
  }
151058
151442
  ],
151059
151443
  do: [{
151444
+ title: "Keep a visible label",
151060
151445
  note: "A visible label stays put while the user types and is read by screen readers.",
151061
151446
  example: [{
151062
151447
  component: "AppRichText",
@@ -151068,6 +151453,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
151068
151453
  }]
151069
151454
  }],
151070
151455
  dont: [{
151456
+ title: "Keep a visible label",
151071
151457
  note: "A placeholder used as the label vanishes on the first keystroke and fails accessibility.",
151072
151458
  example: [{
151073
151459
  component: "AppRichText",
@@ -151291,6 +151677,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
151291
151677
  }
151292
151678
  ],
151293
151679
  do: [{
151680
+ title: "Plain sentence, not the raw error",
151294
151681
  note: "A plain sentence and a way forward. The error details go to the logs.",
151295
151682
  example: [{
151296
151683
  component: "AppRouteError",
@@ -151301,10 +151688,14 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
151301
151688
  }]
151302
151689
  }],
151303
151690
  dont: [{
151691
+ title: "Plain sentence, not the raw error",
151304
151692
  note: "The raw error tells the person nothing they can act on, and can leak internal details.",
151305
151693
  example: [{
151306
- component: "p",
151307
- children: "TypeError: Cannot read properties of undefined (reading 'map')"
151694
+ component: "AppCodeBlock",
151695
+ props: {
151696
+ code: "TypeError: Cannot read properties of undefined (reading 'map')",
151697
+ language: "text"
151698
+ }
151308
151699
  }]
151309
151700
  }],
151310
151701
  a11y: [
@@ -151359,6 +151750,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
151359
151750
  }
151360
151751
  ],
151361
151752
  do: [{
151753
+ title: "Wait for the save before flipping",
151362
151754
  note: "The row keeps its saved state. The switch shows the next state only after the save resolves.",
151363
151755
  example: [{
151364
151756
  component: "AppRowSwitch",
@@ -151370,6 +151762,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
151370
151762
  }]
151371
151763
  }],
151372
151764
  dont: [{
151765
+ title: "Wait for the save before flipping",
151373
151766
  note: "A page-level switch in a row has no busy state, so a second flip can race the first save.",
151374
151767
  example: [{
151375
151768
  component: "AppSwitch",
@@ -151434,7 +151827,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
151434
151827
  name: "id",
151435
151828
  type: "string",
151436
151829
  required: !1,
151437
- description: "The id of the radio group; the label, hint and error ids derive from it. Generated when omitted."
151830
+ description: "The id of the radio group; the label, helper text and error ids derive from it. Generated when omitted."
151438
151831
  },
151439
151832
  {
151440
151833
  name: "label",
@@ -151507,7 +151900,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
151507
151900
  a11y: [
151508
151901
  "The scale is a radio group named by its label, or named Score when there is no label.",
151509
151902
  "Each value is a native radio sharing one name, so the arrow keys move and choose and the group posts with its form.",
151510
- "A hint or an error is linked through aria-describedby, and an error also sets aria-invalid."
151903
+ "Helper text or an error is linked through aria-describedby, and an error also sets aria-invalid."
151511
151904
  ]
151512
151905
  }
151513
151906
  },
@@ -151612,7 +152005,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
151612
152005
  name: "placeholder",
151613
152006
  type: "string",
151614
152007
  required: !1,
151615
- description: "Hint text shown while the field is empty.",
152008
+ description: "Placeholder text shown while the field is empty.",
151616
152009
  default: "Search…"
151617
152010
  },
151618
152011
  {
@@ -151664,6 +152057,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
151664
152057
  }
151665
152058
  ],
151666
152059
  do: [{
152060
+ title: "Name what the search covers",
151667
152061
  note: "A placeholder that names what is being searched sets the right expectation.",
151668
152062
  example: [{
151669
152063
  component: "AppSearch",
@@ -151675,6 +152069,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
151675
152069
  handlers: ["onChange"]
151676
152070
  }]
151677
152071
  }, {
152072
+ title: "Clear to reset the list",
151678
152073
  note: "With a value present, the clear (×) lets the user reset to the full list in one click.",
151679
152074
  example: [{
151680
152075
  component: "AppSearch",
@@ -151687,6 +152082,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
151687
152082
  }]
151688
152083
  }],
151689
152084
  dont: [{
152085
+ title: "Name what the search covers",
151690
152086
  note: "A vague 'Type here' doesn't say what the box searches.",
151691
152087
  example: [{
151692
152088
  component: "AppSearch",
@@ -151698,6 +152094,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
151698
152094
  handlers: ["onChange"]
151699
152095
  }]
151700
152096
  }, {
152097
+ title: "Clear to reset the list",
151701
152098
  note: "A raw input with a magnifier drawn on top has no clear control and drifts from the theme.",
151702
152099
  example: [{
151703
152100
  component: "AppInput",
@@ -152851,6 +153248,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
152851
153248
  }
152852
153249
  ],
152853
153250
  do: [{
153251
+ title: "Short, parallel labels",
152854
153252
  note: "Short, parallel labels of similar length, so the pills are balanced and the row reads as one control.",
152855
153253
  example: [{
152856
153254
  component: "AppSegmented",
@@ -152878,6 +153276,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
152878
153276
  }]
152879
153277
  }],
152880
153278
  dont: [{
153279
+ title: "Short, parallel labels",
152881
153280
  note: "Wildly uneven labels make one pill swamp the other and push the control past its container. If a label needs a sentence, the choice needs radios.",
152882
153281
  example: [{
152883
153282
  component: "AppSegmented",
@@ -152988,7 +153387,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
152988
153387
  name: "helperText",
152989
153388
  type: "string",
152990
153389
  required: !1,
152991
- description: "Help text shown under the field when there is no error."
153390
+ description: "Helper text shown under the field when there is no error."
152992
153391
  },
152993
153392
  {
152994
153393
  name: "icon",
@@ -153172,6 +153571,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
153172
153571
  ],
153173
153572
  do: [
153174
153573
  {
153574
+ title: "Searchable past ten options",
153175
153575
  note: "Past ~10 options, searchable turns a long scroll into a quick type-to-find.",
153176
153576
  example: [{
153177
153577
  component: "AppSelect",
@@ -153203,6 +153603,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
153203
153603
  }]
153204
153604
  },
153205
153605
  {
153606
+ title: "A label and a placeholder",
153206
153607
  note: "A label names the field and the placeholder tells the user what to pick.",
153207
153608
  example: [{
153208
153609
  component: "AppSelect",
@@ -153232,6 +153633,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
153232
153633
  }]
153233
153634
  },
153234
153635
  {
153636
+ title: "A specific error",
153235
153637
  note: "A specific error says which choice is missing and why it matters.",
153236
153638
  example: [{
153237
153639
  component: "AppSelect",
@@ -153264,6 +153666,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
153264
153666
  ],
153265
153667
  dont: [
153266
153668
  {
153669
+ title: "Searchable past ten options",
153267
153670
  note: "A long, unsearchable list forces the user to scroll and scan every time.",
153268
153671
  example: [{
153269
153672
  component: "AppSelect",
@@ -153293,6 +153696,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
153293
153696
  }]
153294
153697
  },
153295
153698
  {
153699
+ title: "A label and a placeholder",
153296
153700
  note: "No label and a bare 'Select' leave the field's purpose unclear.",
153297
153701
  example: [{
153298
153702
  component: "AppSelect",
@@ -153321,6 +153725,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
153321
153725
  }]
153322
153726
  },
153323
153727
  {
153728
+ title: "A specific error",
153324
153729
  note: "'Required' just repeats the asterisk without helping.",
153325
153730
  example: [{
153326
153731
  component: "AppSelect",
@@ -153353,7 +153758,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
153353
153758
  ],
153354
153759
  a11y: [
153355
153760
  "The visible label is the control's accessible name; a select with no visible label takes aria-label or aria-labelledby from the caller.",
153356
- "An error sets aria-invalid on the control and is linked by aria-describedby, as is the hint when there is no error.",
153761
+ "An error sets aria-invalid on the control and is linked by aria-describedby, as is the helper text when there is no error.",
153357
153762
  "required and disabled are passed to the control, and required also draws a required mark in the label."
153358
153763
  ]
153359
153764
  }
@@ -154474,6 +154879,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
154474
154879
  }
154475
154880
  ],
154476
154881
  do: [{
154882
+ title: "Echo the layout that is loading",
154477
154883
  note: "A few bars that echo the real layout, a heading over two body lines. The eye reads it as \"content, loading\".",
154478
154884
  example: [{
154479
154885
  component: "div",
@@ -154502,6 +154908,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
154502
154908
  ]
154503
154909
  }]
154504
154910
  }, {
154911
+ title: "Match table columns while loading",
154505
154912
  note: "Table skeletons use the same column count as the loaded table, so headers and widths never shift.",
154506
154913
  example: [{
154507
154914
  component: "table",
@@ -154518,6 +154925,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
154518
154925
  }]
154519
154926
  }],
154520
154927
  dont: [{
154928
+ title: "Echo the layout that is loading",
154521
154929
  note: "One giant block tells the user nothing about what's coming and reflows hard when the real, smaller content lands.",
154522
154930
  example: [{
154523
154931
  component: "AppSkeleton",
@@ -154527,6 +154935,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
154527
154935
  }
154528
154936
  }]
154529
154937
  }, {
154938
+ title: "Match table columns while loading",
154530
154939
  note: "Two loose bars where a table is loading leaves the columns to snap into place on arrival.",
154531
154940
  example: [{
154532
154941
  component: "div",
@@ -154633,6 +155042,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
154633
155042
  instead: "AppEmptyState variant=\"table\""
154634
155043
  }],
154635
155044
  do: [{
155045
+ title: "Match skeleton columns to the table",
154636
155046
  note: "Table skeletons use the same column count as the loaded table, so headers and widths never shift.",
154637
155047
  example: [{
154638
155048
  component: "table",
@@ -154649,6 +155059,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
154649
155059
  }]
154650
155060
  }],
154651
155061
  dont: [{
155062
+ title: "Match skeleton columns to the table",
154652
155063
  note: "Two loose bars where a table is loading leaves the columns to snap into place on arrival.",
154653
155064
  example: [{
154654
155065
  component: "div",
@@ -154908,7 +155319,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
154908
155319
  dont: [],
154909
155320
  a11y: [
154910
155321
  "The visible label is tied to the control by id, and the control takes its accessible name from a text label or from ariaLabel.",
154911
- "aria-describedby points at the error text, or at the hint when there is no error, and an error also sets aria-invalid.",
155322
+ "aria-describedby points at the error text, or at the helper text when there is no error, and an error also sets aria-invalid.",
154912
155323
  "A required slider shows a required mark beside its label and carries the required attribute."
154913
155324
  ]
154914
155325
  }
@@ -155192,6 +155603,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
155192
155603
  }
155193
155604
  ],
155194
155605
  do: [{
155606
+ title: "Name what is loading",
155195
155607
  note: "A label that says what is happening, sized to sit inline with the thing it belongs to.",
155196
155608
  example: [{
155197
155609
  component: "AppSpinner",
@@ -155202,6 +155614,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
155202
155614
  }]
155203
155615
  }],
155204
155616
  dont: [{
155617
+ title: "Name what is loading",
155205
155618
  note: "A lone spinner filling a content area: no indication of what is loading, no idea how long, and the layout will jump when the real content arrives.",
155206
155619
  example: [{
155207
155620
  component: "div",
@@ -155796,6 +156209,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
155796
156209
  }
155797
156210
  ],
155798
156211
  do: [{
156212
+ title: "Mark the open list item",
155799
156213
  note: "One item is open and marked in the list, so it is clear what the pane shows.",
155800
156214
  example: [{
155801
156215
  component: "AppSplitView",
@@ -155829,6 +156243,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
155829
156243
  }
155830
156244
  }]
155831
156245
  }, {
156246
+ title: "One line of context per item",
155832
156247
  note: "Items carry a title and one line of context; the detail waits in the pane.",
155833
156248
  example: [{
155834
156249
  component: "AppSplitView",
@@ -155864,6 +156279,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
155864
156279
  }]
155865
156280
  }],
155866
156281
  dont: [{
156282
+ title: "Mark the open list item",
155867
156283
  note: "A pane with content but no open item: nothing in the list says which item it belongs to.",
155868
156284
  example: [{
155869
156285
  component: "AppSplitView",
@@ -155897,6 +156313,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
155897
156313
  }
155898
156314
  }]
155899
156315
  }, {
156316
+ title: "One line of context per item",
155900
156317
  note: "Packing the detail into the list makes every item tall and the queue slow to scan.",
155901
156318
  example: [{
155902
156319
  component: "AppSplitView",
@@ -156008,6 +156425,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
156008
156425
  }
156009
156426
  ],
156010
156427
  do: [{
156428
+ title: "One consistent tone per status",
156011
156429
  note: "Each status maps to a consistent, meaningful tone: the colour reinforces the word.",
156012
156430
  example: [
156013
156431
  {
@@ -156033,6 +156451,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
156033
156451
  }
156034
156452
  ]
156035
156453
  }, {
156454
+ title: "Pill holds one or two words",
156036
156455
  note: "A single, concise status word, instantly scannable.",
156037
156456
  example: [{
156038
156457
  component: "AppStatusBadge",
@@ -156043,6 +156462,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
156043
156462
  }]
156044
156463
  }],
156045
156464
  dont: [{
156465
+ title: "One consistent tone per status",
156046
156466
  note: "One tone for every status throws away the signal: the colour tells the user nothing.",
156047
156467
  example: [
156048
156468
  {
@@ -156068,6 +156488,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
156068
156488
  }
156069
156489
  ]
156070
156490
  }, {
156491
+ title: "Pill holds one or two words",
156071
156492
  note: "A pill is not a place for a sentence: keep the status to a word or two and explain elsewhere.",
156072
156493
  example: [{
156073
156494
  component: "AppStatusBadge",
@@ -156252,6 +156673,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
156252
156673
  }
156253
156674
  ],
156254
156675
  do: [{
156676
+ title: "Name each step by its action",
156255
156677
  note: "Label each step with the action it performs, and mark exactly one step active. Three to five steps is the readable range.",
156256
156678
  example: [{
156257
156679
  component: "AppStepper",
@@ -156274,6 +156696,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
156274
156696
  }]
156275
156697
  }],
156276
156698
  dont: [{
156699
+ title: "Name each step by its action",
156277
156700
  note: "The label \"Step 2\" adds nothing: the circle already says 2. The label is the only place that can tell the user what the step is for.",
156278
156701
  example: [{
156279
156702
  component: "AppStepper",
@@ -156442,6 +156865,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
156442
156865
  }
156443
156866
  ],
156444
156867
  do: [{
156868
+ title: "Use a switch for instant settings",
156445
156869
  note: "An on/off setting that applies right away. The switch reads as a live control.",
156446
156870
  example: [{
156447
156871
  component: "AppSwitch",
@@ -156452,6 +156876,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
156452
156876
  handlers: ["onChange"]
156453
156877
  }]
156454
156878
  }, {
156879
+ title: "Caption every switch",
156455
156880
  note: "Each switch is captioned, so the user knows exactly what it controls and its current state.",
156456
156881
  example: [{
156457
156882
  component: "AppSwitch",
@@ -156465,6 +156890,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
156465
156890
  }]
156466
156891
  }],
156467
156892
  dont: [{
156893
+ title: "Use a switch for instant settings",
156468
156894
  note: "A checkbox reads as a form field to submit later, the wrong signal for an instant toggle.",
156469
156895
  example: [{
156470
156896
  component: "AppCheckbox",
@@ -156474,6 +156900,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
156474
156900
  }
156475
156901
  }]
156476
156902
  }, {
156903
+ title: "Caption every switch",
156477
156904
  note: "A bare switch with no caption leaves the user guessing what it turns on.",
156478
156905
  example: [{
156479
156906
  component: "AppSwitch",
@@ -156651,6 +157078,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
156651
157078
  }
156652
157079
  ],
156653
157080
  do: [{
157081
+ title: "Show the page and the total",
156654
157082
  note: "The page buttons show the current page and how many there are, so the user always knows where they are in the list.",
156655
157083
  example: [{
156656
157084
  component: "AppTablePagination",
@@ -156661,6 +157089,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
156661
157089
  }
156662
157090
  }]
156663
157091
  }, {
157092
+ title: "Sit the pager under its table",
156664
157093
  note: "The pager sits flush under the table it controls, so the two read as one visual unit.",
156665
157094
  example: [{
156666
157095
  component: "div",
@@ -156713,6 +157142,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
156713
157142
  }]
156714
157143
  }],
156715
157144
  dont: [{
157145
+ title: "Show the page and the total",
156716
157146
  note: "Bare prev/next buttons with no page readout hide how big the list is or where the user stands.",
156717
157147
  example: [{
156718
157148
  component: "div",
@@ -156734,6 +157164,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
156734
157164
  }]
156735
157165
  }]
156736
157166
  }, {
157167
+ title: "Sit the pager under its table",
156737
157168
  note: "A pager floating above its table breaks the expected footer placement and reads as disconnected.",
156738
157169
  example: [{
156739
157170
  component: "div",
@@ -156899,6 +157330,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
156899
157330
  }
156900
157331
  ],
156901
157332
  do: [{
157333
+ title: "Show bulk actions only when selected",
156902
157334
  note: "Bulk actions appear only while rows are selected, with the count and a way out.",
156903
157335
  example: [{
156904
157336
  component: "AppTableToolbar",
@@ -156916,6 +157348,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
156916
157348
  }
156917
157349
  }]
156918
157350
  }, {
157351
+ title: "Filters left, search and actions right",
156919
157352
  note: "Filters narrow the rows on the left; search and actions sit on the right.",
156920
157353
  example: [{
156921
157354
  component: "AppTableToolbar",
@@ -156966,6 +157399,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
156966
157399
  }]
156967
157400
  }],
156968
157401
  dont: [{
157402
+ title: "Show bulk actions only when selected",
156969
157403
  note: "A row of always-visible, disabled bulk buttons takes space and explains nothing until something is selected.",
156970
157404
  example: [{
156971
157405
  component: "div",
@@ -156989,6 +157423,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
156989
157423
  }]
156990
157424
  }]
156991
157425
  }, {
157426
+ title: "Filters left, search and actions right",
156992
157427
  note: "Search first and filters last, scattered with no shared strip: the eye has no fixed place to look.",
156993
157428
  example: [{
156994
157429
  component: "div",
@@ -157260,6 +157695,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
157260
157695
  }
157261
157696
  ],
157262
157697
  do: [{
157698
+ title: "Short labels for peer views",
157263
157699
  note: "A few short, peer labels: the user sees every view at a glance.",
157264
157700
  example: [{
157265
157701
  component: "AppTabs",
@@ -157283,6 +157719,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
157283
157719
  }
157284
157720
  }]
157285
157721
  }, {
157722
+ title: "Tabs switch views, never steps",
157286
157723
  note: "A count on a filter tab tells the user how much is behind it before they click.",
157287
157724
  example: [{
157288
157725
  component: "AppTabs",
@@ -157302,6 +157739,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
157302
157739
  }]
157303
157740
  }],
157304
157741
  dont: [{
157742
+ title: "Short labels for peer views",
157305
157743
  note: "Sentence-long labels break the scannable rhythm a tab strip depends on.",
157306
157744
  example: [{
157307
157745
  component: "AppTabs",
@@ -157325,6 +157763,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
157325
157763
  }
157326
157764
  }]
157327
157765
  }, {
157766
+ title: "Tabs switch views, never steps",
157328
157767
  note: "Fitted pills read as a segmented control. Do not use them for sequential steps; that is a stepper.",
157329
157768
  example: [{
157330
157769
  component: "AppTabs",
@@ -157427,7 +157866,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
157427
157866
  name: "helperText",
157428
157867
  type: "string",
157429
157868
  required: !1,
157430
- description: "Help text under the field."
157869
+ description: "Helper text under the field."
157431
157870
  },
157432
157871
  {
157433
157872
  name: "id",
@@ -157541,54 +157980,90 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
157541
157980
  instead: "AppChip"
157542
157981
  }
157543
157982
  ],
157544
- do: [{
157545
- note: "Helper text that names the commit keys (Enter and comma) tells the user how to add a tag without trial and error.",
157546
- example: [{
157547
- component: "AppTagInput",
157548
- props: {
157549
- label: "Keywords",
157550
- helperText: "Press Enter or comma to add a tag",
157551
- values: ["react", "javascript"]
157552
- }
157553
- }]
157554
- }, {
157555
- note: "A placeholder that mentions paste tells the user they can drop a whole list in at once.",
157556
- example: [{
157557
- component: "AppTagInput",
157558
- props: {
157559
- label: "Recipients",
157560
- placeholder: "Paste or type email addresses"
157561
- }
157562
- }]
157563
- }],
157564
- dont: [{
157565
- note: "No helper text at all: a first-time user may not discover that Enter or comma commits a tag.",
157566
- example: [{
157567
- component: "AppTagInput",
157568
- props: {
157569
- label: "Keywords",
157570
- values: ["react", "javascript"]
157571
- }
157572
- }]
157573
- }, {
157574
- note: "A fixed, known set of options belongs in AppSelect or AppMultiSelect: a tag input invites free text where a picker would be faster and less error-prone.",
157575
- example: [{
157576
- component: "AppTagInput",
157577
- props: {
157578
- label: "Choose from these categories",
157579
- values: [
157580
- "tag1",
157581
- "tag2",
157582
- "tag3",
157583
- "tag4",
157584
- "tag5",
157585
- "tag6",
157586
- "tag7",
157587
- "tag8"
157588
- ]
157589
- }
157590
- }]
157591
- }],
157983
+ do: [
157984
+ {
157985
+ title: "Name the keys in helper text",
157986
+ note: "Helper text that names the commit keys (Enter and comma) tells the user how to add a tag without trial and error.",
157987
+ example: [{
157988
+ component: "AppTagInput",
157989
+ props: {
157990
+ label: "Keywords",
157991
+ helperText: "Press Enter or comma to add a tag",
157992
+ values: ["react", "javascript"]
157993
+ }
157994
+ }]
157995
+ },
157996
+ {
157997
+ title: "Free text, not a fixed list",
157998
+ note: "Use AppSelect or AppMultiSelect when the choices are a fixed set.",
157999
+ example: [{
158000
+ component: "AppMultiSelect",
158001
+ props: {
158002
+ label: "Categories",
158003
+ name: "categories",
158004
+ options: [{
158005
+ value: "css",
158006
+ label: "CSS"
158007
+ }]
158008
+ }
158009
+ }]
158010
+ },
158011
+ {
158012
+ title: "Placeholder that names paste",
158013
+ note: "A placeholder that mentions paste tells the user they can drop a whole list in at once.",
158014
+ example: [{
158015
+ component: "AppTagInput",
158016
+ props: {
158017
+ label: "Recipients",
158018
+ placeholder: "Paste or type email addresses"
158019
+ }
158020
+ }]
158021
+ }
158022
+ ],
158023
+ dont: [
158024
+ {
158025
+ title: "Name the keys in helper text",
158026
+ note: "No helper text at all: a first-time user may not discover that Enter or comma commits a tag.",
158027
+ example: [{
158028
+ component: "AppTagInput",
158029
+ props: {
158030
+ label: "Keywords",
158031
+ values: ["react", "javascript"]
158032
+ }
158033
+ }]
158034
+ },
158035
+ {
158036
+ title: "Free text, not a fixed list",
158037
+ note: "A fixed, known set of options belongs in AppSelect or AppMultiSelect: a tag input invites free text where a picker would be faster and less error-prone.",
158038
+ example: [{
158039
+ component: "AppTagInput",
158040
+ props: {
158041
+ label: "Choose from these categories",
158042
+ values: [
158043
+ "tag1",
158044
+ "tag2",
158045
+ "tag3",
158046
+ "tag4",
158047
+ "tag5",
158048
+ "tag6",
158049
+ "tag7",
158050
+ "tag8"
158051
+ ]
158052
+ }
158053
+ }]
158054
+ },
158055
+ {
158056
+ title: "Placeholder that names paste",
158057
+ note: "A placeholder that only says what to type hides that a whole pasted list splits into tags.",
158058
+ example: [{
158059
+ component: "AppTagInput",
158060
+ props: {
158061
+ label: "Recipients",
158062
+ placeholder: "Add a recipient"
158063
+ }
158064
+ }]
158065
+ }
158066
+ ],
157592
158067
  a11y: [
157593
158068
  "The label is tied to the field with a for and id pair, and a generated id is used when none is given.",
157594
158069
  "An error sets aria-invalid and points aria-describedby at the error text; with no error it points at the helper text.",
@@ -157633,7 +158108,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
157633
158108
  name: "error",
157634
158109
  type: "string",
157635
158110
  required: !1,
157636
- description: "An error message. It replaces the hint and marks the field invalid."
158111
+ description: "An error message. It replaces the helper text and marks the field invalid."
157637
158112
  },
157638
158113
  {
157639
158114
  name: "fieldClassName",
@@ -157659,7 +158134,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
157659
158134
  name: "helperText",
157660
158135
  type: "string",
157661
158136
  required: !1,
157662
- description: "Help text under the field."
158137
+ description: "Helper text under the field."
157663
158138
  },
157664
158139
  {
157665
158140
  name: "id",
@@ -157772,7 +158247,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
157772
158247
  usage: {
157773
158248
  when: [
157774
158249
  "The value is free-form text that can run past a single line: a note, description, comment, or address block.",
157775
- "You want the same labelled treatment (hint, error, required) as the rest of the form, for a longer answer.",
158250
+ "You want the same labelled treatment (helper text, error, required) as the rest of the form, for a longer answer.",
157776
158251
  "The user might write a few words or a few paragraphs and you can't predict which."
157777
158252
  ],
157778
158253
  whenNot: [
@@ -157791,6 +158266,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
157791
158266
  ],
157792
158267
  do: [
157793
158268
  {
158269
+ title: "Keep a visible label",
157794
158270
  note: "A visible label stays put while the user types and is read by screen readers.",
157795
158271
  example: [{
157796
158272
  component: "AppTextarea",
@@ -157802,6 +158278,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
157802
158278
  }]
157803
158279
  },
157804
158280
  {
158281
+ title: "Match the height to the answer",
157805
158282
  note: "A height that matches the expected answer keeps the form compact and scannable.",
157806
158283
  example: [{
157807
158284
  component: "AppTextarea",
@@ -157814,6 +158291,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
157814
158291
  }]
157815
158292
  },
157816
158293
  {
158294
+ title: "Say exactly what to change",
157817
158295
  note: "A specific error tells the user exactly what to change.",
157818
158296
  example: [{
157819
158297
  component: "AppTextarea",
@@ -157828,6 +158306,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
157828
158306
  ],
157829
158307
  dont: [
157830
158308
  {
158309
+ title: "Keep a visible label",
157831
158310
  note: "A placeholder used as the label vanishes on the first keystroke and fails accessibility.",
157832
158311
  example: [{
157833
158312
  component: "AppTextarea",
@@ -157838,6 +158317,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
157838
158317
  }]
157839
158318
  },
157840
158319
  {
158320
+ title: "Match the height to the answer",
157841
158321
  note: "An oversized box wastes space and signals 'write an essay' when you wanted a sentence.",
157842
158322
  example: [{
157843
158323
  component: "AppTextarea",
@@ -157850,6 +158330,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
157850
158330
  }]
157851
158331
  },
157852
158332
  {
158333
+ title: "Say exactly what to change",
157853
158334
  note: "'Invalid' leaves them guessing what is actually wrong.",
157854
158335
  example: [{
157855
158336
  component: "AppTextarea",
@@ -157865,7 +158346,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
157865
158346
  a11y: [
157866
158347
  "The label is tied to the field with a for and id pair, and a generated id is used when none is given.",
157867
158348
  "The field carries the native required attribute as well as the visible required mark.",
157868
- "aria-invalid is set from error, and aria-describedby points at the error text, or at the hint when there is no error.",
158349
+ "aria-invalid is set from error, and aria-describedby points at the error text, or at the helper text when there is no error.",
157869
158350
  "The info tip beside the label is named by helpLabel."
157870
158351
  ]
157871
158352
  }
@@ -158070,7 +158551,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
158070
158551
  name: "helperText",
158071
158552
  type: "string",
158072
158553
  required: !1,
158073
- description: "Help text under the field."
158554
+ description: "Helper text under the field."
158074
158555
  },
158075
158556
  {
158076
158557
  name: "id",
@@ -158397,6 +158878,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
158397
158878
  }
158398
158879
  ],
158399
158880
  do: [{
158881
+ title: "Record what happened, by whom, when",
158400
158882
  note: "Title in the past tense saying what happened, plus the actor and an absolute timestamp: the three things an audit reader is looking for.",
158401
158883
  example: [{
158402
158884
  component: "AppTimeline",
@@ -158412,6 +158894,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
158412
158894
  }]
158413
158895
  }],
158414
158896
  dont: [{
158897
+ title: "Record what happened, by whom, when",
158415
158898
  note: "'Status changed' to what, by whom? And '2 days ago' cannot be cross-referenced against anything, so an audit trail needs absolute times.",
158416
158899
  example: [{
158417
158900
  component: "AppTimeline",
@@ -159267,6 +159750,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
159267
159750
  instead: "AppBanner"
159268
159751
  }],
159269
159752
  do: [{
159753
+ title: "Let people choose when to reload",
159270
159754
  note: "Tell the person and let them choose when to reload.",
159271
159755
  example: [{
159272
159756
  component: "AppUpdateBar",
@@ -159274,6 +159758,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
159274
159758
  }]
159275
159759
  }],
159276
159760
  dont: [{
159761
+ title: "Let people choose when to reload",
159277
159762
  note: "A forced reload throws away what the person was typing.",
159278
159763
  example: [{
159279
159764
  component: "div",
@@ -159857,6 +160342,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
159857
160342
  }
159858
160343
  ],
159859
160344
  do: [{
160345
+ title: "Name the current workspace",
159860
160346
  note: "The current workspace is named on the trigger, ticked in the list, and settings are one row away.",
159861
160347
  example: [{
159862
160348
  component: "AppWorkspaceSwitcher",
@@ -159895,6 +160381,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
159895
160381
  }
159896
160382
  }]
159897
160383
  }, {
160384
+ title: "Filter only a long list",
159898
160385
  note: "Eight workspaces get a filter box, so finding one is typing rather than scrolling.",
159899
160386
  example: [{
159900
160387
  component: "AppWorkspaceSwitcher",
@@ -159940,6 +160427,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
159940
160427
  }]
159941
160428
  }],
159942
160429
  dont: [{
160430
+ title: "Name the current workspace",
159943
160431
  note: "A compact trigger in a full-width sidebar hides the workspace name, the one thing the control exists to show. Save it for a collapsed rail.",
159944
160432
  example: [{
159945
160433
  component: "AppWorkspaceSwitcher",
@@ -159964,6 +160452,7 @@ var zyt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
159964
160452
  }
159965
160453
  }]
159966
160454
  }, {
160455
+ title: "Filter only a long list",
159967
160456
  note: "Three workspaces behind a search box: a control to skip past on the way to something already visible.",
159968
160457
  example: [{
159969
160458
  component: "AppWorkspaceSwitcher",