@sableui/react 0.13.1 → 0.13.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 (85) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/CONTRIBUTING.md +1 -1
  3. package/bin/sable.mjs +17 -1
  4. package/dist/blocks/index.d.ts +1 -1
  5. package/dist/components/accordion/accordion.meta.js +2 -1
  6. package/dist/components/badge/badge.meta.js +2 -1
  7. package/dist/components/banner/banner.meta.js +4 -2
  8. package/dist/components/button-group/button-group.meta.js +2 -1
  9. package/dist/components/checkbox/checkbox.meta.js +2 -1
  10. package/dist/components/collapsible/collapsible.meta.js +2 -1
  11. package/dist/components/combobox/combobox.meta.js +4 -2
  12. package/dist/components/command-menu/command-menu.meta.js +6 -3
  13. package/dist/components/context-card/context-card.meta.js +2 -1
  14. package/dist/components/dialog/dialog.meta.js +6 -3
  15. package/dist/components/disclosure-picker/disclosure-picker.meta.js +2 -1
  16. package/dist/components/inline-status/inline-status.meta.js +2 -1
  17. package/dist/components/menu/menu.meta.js +2 -1
  18. package/dist/components/menubar/menubar.meta.js +2 -1
  19. package/dist/components/meter/meter.meta.js +2 -1
  20. package/dist/components/note/note.meta.js +2 -1
  21. package/dist/components/page-loader/page-loader.meta.js +2 -1
  22. package/dist/components/pill/pill.meta.js +2 -1
  23. package/dist/components/popover/popover.meta.js +4 -2
  24. package/dist/components/progress/progress.meta.js +2 -1
  25. package/dist/components/radio/radio.meta.js +2 -1
  26. package/dist/components/segmented-bar/segmented-bar.meta.js +2 -1
  27. package/dist/components/select/select.meta.js +4 -2
  28. package/dist/components/sheet/sheet.meta.js +4 -2
  29. package/dist/components/side-nav/side-nav.meta.js +2 -1
  30. package/dist/components/skeleton/skeleton.meta.js +2 -1
  31. package/dist/components/spinner/spinner.meta.js +2 -1
  32. package/dist/components/stepper/stepper.meta.js +4 -2
  33. package/dist/components/switch/switch.meta.js +2 -1
  34. package/dist/components/table/table.meta.js +2 -1
  35. package/dist/components/tabs/tabs.meta.js +4 -2
  36. package/dist/components/thinking-orb/thinking-orb.meta.js +4 -2
  37. package/dist/components/toast/toast.meta.js +2 -1
  38. package/dist/components/toggle/toggle.meta.js +2 -1
  39. package/dist/components/toolbar/toolbar.meta.js +2 -1
  40. package/dist/components/tooltip/tooltip.meta.js +2 -1
  41. package/dist/file-hashes.json +41 -41
  42. package/dist/index.d.ts +3 -3
  43. package/dist/index.js +1 -1
  44. package/dist/{meta-DVG8ceze.d.ts → meta-DX5r5wQL.d.ts} +8 -0
  45. package/dist/patterns/index.d.ts +1 -1
  46. package/llms/components/accordion.md +1 -1
  47. package/llms/components/badge.md +1 -1
  48. package/llms/components/banner.md +2 -2
  49. package/llms/components/button-group.md +1 -1
  50. package/llms/components/checkbox.md +1 -1
  51. package/llms/components/collapsible.md +1 -1
  52. package/llms/components/combobox.md +2 -2
  53. package/llms/components/command-menu.md +3 -3
  54. package/llms/components/context-card.md +1 -1
  55. package/llms/components/dialog.md +3 -3
  56. package/llms/components/disclosure-picker.md +1 -1
  57. package/llms/components/inline-status.md +1 -1
  58. package/llms/components/menu.md +1 -1
  59. package/llms/components/menubar.md +1 -1
  60. package/llms/components/meter.md +1 -1
  61. package/llms/components/note.md +1 -1
  62. package/llms/components/page-loader.md +1 -1
  63. package/llms/components/pill.md +1 -1
  64. package/llms/components/popover.md +2 -2
  65. package/llms/components/progress.md +1 -1
  66. package/llms/components/radio.md +1 -1
  67. package/llms/components/segmented-bar.md +1 -1
  68. package/llms/components/select.md +2 -2
  69. package/llms/components/sheet.md +2 -2
  70. package/llms/components/side-nav.md +1 -1
  71. package/llms/components/skeleton.md +1 -1
  72. package/llms/components/spinner.md +1 -1
  73. package/llms/components/stepper.md +2 -2
  74. package/llms/components/switch.md +1 -1
  75. package/llms/components/table.md +1 -1
  76. package/llms/components/tabs.md +2 -2
  77. package/llms/components/thinking-orb.md +2 -2
  78. package/llms/components/toast.md +1 -1
  79. package/llms/components/toggle.md +1 -1
  80. package/llms/components/toolbar.md +1 -1
  81. package/llms/components/tooltip.md +1 -1
  82. package/llms-full.txt +49 -49
  83. package/llms.txt +1 -1
  84. package/package.json +1 -1
  85. package/registry.json +215 -49
package/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # What's new
2
2
 
3
+ ## 0.13.2
4
+
5
+ What to use instead, wherever a component is the wrong pick.
6
+
7
+ - **New: a don't can name its replacement.** `usage.bestPractices` entries
8
+ take `instead: ["Banner", "Dialog"]`, set on 48 don'ts across the
9
+ families that get confused: Toast, Banner, Note and InlineStatus; Dialog,
10
+ Sheet and Popover; Select, Combobox and DisclosurePicker; Progress, Meter,
11
+ Spinner, Skeleton, PageLoader and ThinkingOrb; Tabs, Stepper and the
12
+ navs; Checkbox, Radio, Switch and Toggle. The build fails if a name isn't
13
+ a real component or subcomponent, so a rename can't leave a pointer to
14
+ nothing.
15
+ - **`sable component <Name>` ends with "not for".** At compact detail, the
16
+ default, it now lists those don'ts in one line each with what to use
17
+ instead (`✗ Use Select for very large or fuzzy lists. → Combobox`). Before,
18
+ the don'ts only showed at `--detail full`. `--json` carries the same list
19
+ as `notFor`, and the markdown mirrors end each one with `→ use **X**`.
20
+
3
21
  ## 0.13.1
4
22
 
5
23
  Sable from any agent, and setup that starts with `sable init` everywhere an agent looks first.
package/CONTRIBUTING.md CHANGED
@@ -223,7 +223,7 @@ The system grows **out of the apps**, not ahead of them. A component earns its w
223
223
 
224
224
  Each component ships `<name>.meta.ts` exporting a `ComponentMeta` object: `name`, `summary`, `keywords`, `usage` (intent, do/don't guidance, anatomy), `related`, `props` (name/type/default/description), `subcomponents`, `variants`, `tokensUsed` (semantic tokens it reads), `a11y` notes, and `examples` (label + code). Inline meta is the preferred **source of truth** and the contract other agents read; keep it in sync when you change a component. Existing guidance backfills may also live in `src/lib/component-guidance.ts`; the docs and registry generator merge that overlay so consumers read one resolved catalog.
225
225
 
226
- `usage.bestPractices` is where design judgment lives. Include concrete "do" and "dont" items that teach agents when to reach for the component, when to choose a neighboring component instead, and which visual/interaction anti-patterns to avoid. For composite components, include `usage.anatomy` so agents understand the required parts and slots before composing JSX.
226
+ `usage.bestPractices` is where design judgment lives. Include concrete "do" and "dont" items that teach agents when to reach for the component, when to choose a neighboring component instead, and which visual/interaction anti-patterns to avoid. When a dont points at a neighbour, name it in `instead: ["Banner"]` as well as in the prose: the build checks each name is a real component or subcomponent, and `sable component` prints those donts as a short **not for** list at compact detail. For composite components, include `usage.anatomy` so agents understand the required parts and slots before composing JSX.
227
227
 
228
228
  Two rules that keep the contract unambiguous for consumers reading the registry:
229
229
 
package/bin/sable.mjs CHANGED
@@ -855,6 +855,7 @@ function cmdComponent() {
855
855
  data.subcomponents = c.subcomponents ?? []
856
856
  data.related = c.related ?? []
857
857
  if (!DENSE) data.usage = c.usage
858
+ data.notFor = notFor(c)
858
859
  }
859
860
  if (level === "full") {
860
861
  data.a11y = c.a11y ?? []
@@ -873,6 +874,7 @@ function cmdComponent() {
873
874
  `\n${data.import}`,
874
875
  level === "brief" ? "" : renderProps(c),
875
876
  level !== "full" || DENSE ? "" : renderUsage(c),
877
+ level === "full" && !DENSE ? "" : renderNotFor(data.notFor ?? []),
876
878
  level === "full" ? section("a11y", (c.a11y ?? []).map(bullet)) : "",
877
879
  level === "full" ? section("tokens", [` ${(c.tokensUsed ?? []).join(", ")}`]) : "",
878
880
  level === "full" ? renderExamples(c) : "",
@@ -896,9 +898,23 @@ function renderProps(c) {
896
898
  return [section("props", lines), section("subcomponents", subs)].filter(Boolean).join("\n")
897
899
  }
898
900
 
901
+ /* The donts that name a replacement, cut to their first sentence: the "when not
902
+ * to use this" an agent needs at compact detail, without the whole guidance list. */
903
+ function notFor(c) {
904
+ return (c.usage?.bestPractices ?? [])
905
+ .filter((b) => b.guidance === "dont" && b.instead?.length)
906
+ .map((b) => ({ dont: b.description.split(/(?<=[.;])\s/)[0], use: b.instead }))
907
+ }
908
+
909
+ function renderNotFor(items) {
910
+ return section("not for", items.map((i) => ` ✗ ${i.dont} → ${i.use.join(", ")}`))
911
+ }
912
+
899
913
  function renderUsage(c) {
900
914
  if (!c.usage) return ""
901
- const dos = (c.usage.bestPractices ?? []).map((b) => ` ${b.guidance === "do" ? "✓" : "✗"} ${b.description}`)
915
+ const dos = (c.usage.bestPractices ?? []).map(
916
+ (b) => ` ${b.guidance === "do" ? "✓" : "✗"} ${b.description}${b.instead ? ` → ${b.instead.join(", ")}` : ""}`,
917
+ )
902
918
  return [c.usage.description ? `\nWhen to use:\n ${c.usage.description}` : "", section("guidance", dos)]
903
919
  .filter(Boolean)
904
920
  .join("\n")
@@ -1,5 +1,5 @@
1
1
  import * as react from 'react';
2
- import { B as BlockMeta } from '../meta-DVG8ceze.js';
2
+ import { B as BlockMeta } from '../meta-DX5r5wQL.js';
3
3
 
4
4
  interface ApiKeysBlockProps {
5
5
  className?: string;
@@ -26,7 +26,8 @@ var accordionMeta = {
26
26
  },
27
27
  {
28
28
  guidance: "dont",
29
- description: "Do not nest an Accordion inside an Accordion. Two layers of roving focus fight each other, and the arrow keys become ambiguous \u2014 flatten the hierarchy or use a Tree."
29
+ description: "Do not nest an Accordion inside an Accordion. Two layers of roving focus fight each other, and the arrow keys become ambiguous \u2014 flatten the hierarchy or use a Tree.",
30
+ instead: ["Tree"]
30
31
  }
31
32
  ],
32
33
  anatomy: [
@@ -30,7 +30,8 @@ var badgeMeta = {
30
30
  },
31
31
  {
32
32
  guidance: "dont",
33
- description: "Use a Badge as a button. If it triggers an action, use Button, Toggle, or a menu item."
33
+ description: "Use a Badge as a button. If it triggers an action, use Button, Toggle, or a menu item.",
34
+ instead: ["Button", "Toggle"]
34
35
  },
35
36
  {
36
37
  guidance: "do",
@@ -34,11 +34,13 @@ var bannerMeta = {
34
34
  },
35
35
  {
36
36
  guidance: "dont",
37
- description: "Use Banner for field-level validation, row status, or small local hints; use Field, InlineStatus, or Badge instead."
37
+ description: "Use Banner for field-level validation, row status, or small local hints; use Field, InlineStatus, or Badge instead.",
38
+ instead: ["InlineStatus", "Badge"]
38
39
  },
39
40
  {
40
41
  guidance: "dont",
41
- description: "Use Banner inside a dialog, a form, or a section to qualify the content around it \u2014 that is Note. Banner is a full-width announcement strip for page- or app-level state, so in a modal it reads as a slab heavier than the fields it warns about, and its soft appearance has no border and no tone-colored icon: the severity survives only as a faint wash."
42
+ description: "Use Banner inside a dialog, a form, or a section to qualify the content around it \u2014 that is Note. Banner is a full-width announcement strip for page- or app-level state, so in a modal it reads as a slab heavier than the fields it warns about, and its soft appearance has no border and no tone-colored icon: the severity survives only as a faint wash.",
43
+ instead: ["Note"]
42
44
  }
43
45
  ],
44
46
  anatomy: [
@@ -25,7 +25,8 @@ var buttonGroupMeta = {
25
25
  },
26
26
  {
27
27
  guidance: "dont",
28
- description: "Do not use it for a selection that stays on. That is ToggleGroup, which carries the pressed state."
28
+ description: "Do not use it for a selection that stays on. That is ToggleGroup, which carries the pressed state.",
29
+ instead: ["ToggleGroup"]
29
30
  }
30
31
  ]
31
32
  },
@@ -22,7 +22,8 @@ var checkboxMeta = {
22
22
  },
23
23
  {
24
24
  guidance: "dont",
25
- description: "Do not use Checkbox for mutually exclusive choices; use Radio or Select instead."
25
+ description: "Do not use Checkbox for mutually exclusive choices; use Radio or Select instead.",
26
+ instead: ["Radio", "Select"]
26
27
  },
27
28
  {
28
29
  guidance: "dont",
@@ -22,7 +22,8 @@ var collapsibleMeta = {
22
22
  },
23
23
  {
24
24
  guidance: "dont",
25
- description: "Do not use Collapsible for multi-section navigation; use Accordion or Tabs instead."
25
+ description: "Do not use Collapsible for multi-section navigation; use Accordion or Tabs instead.",
26
+ instead: ["Accordion", "Tabs"]
26
27
  },
27
28
  {
28
29
  guidance: "dont",
@@ -32,7 +32,8 @@ var comboboxMeta = {
32
32
  },
33
33
  {
34
34
  guidance: "dont",
35
- description: "Use Combobox for tiny option sets where Select or Radio would be easier to scan."
35
+ description: "Use Combobox for tiny option sets where Select or Radio would be easier to scan.",
36
+ instead: ["Select", "Radio"]
36
37
  },
37
38
  {
38
39
  guidance: "do",
@@ -44,7 +45,8 @@ var comboboxMeta = {
44
45
  },
45
46
  {
46
47
  guidance: "dont",
47
- description: "Use Combobox as a command launcher. Use CommandMenu for actions and navigation."
48
+ description: "Use Combobox as a command launcher. Use CommandMenu for actions and navigation.",
49
+ instead: ["CommandMenu"]
48
50
  },
49
51
  {
50
52
  guidance: "dont",
@@ -28,7 +28,8 @@ var commandMenuMeta = {
28
28
  },
29
29
  {
30
30
  guidance: "dont",
31
- description: "Hand-style a <button> to look like a search field, or put a SearchInput in the header that opens a dialog when focused. The first drifts from the field it imitates; the second is a text box you cannot type in. A header search that opens the palette is CommandMenuTrigger."
31
+ description: "Hand-style a <button> to look like a search field, or put a SearchInput in the header that opens a dialog when focused. The first drifts from the field it imitates; the second is a text box you cannot type in. A header search that opens the palette is CommandMenuTrigger.",
32
+ instead: ["CommandMenuTrigger"]
32
33
  },
33
34
  {
34
35
  guidance: "do",
@@ -44,7 +45,8 @@ var commandMenuMeta = {
44
45
  },
45
46
  {
46
47
  guidance: "dont",
47
- description: "Use CommandMenu as a replacement for every dropdown. Simple choices belong in Select, Menu, or Tabs."
48
+ description: "Use CommandMenu as a replacement for every dropdown. Simple choices belong in Select, Menu, or Tabs.",
49
+ instead: ["Select", "Menu", "Tabs"]
48
50
  },
49
51
  {
50
52
  guidance: "do",
@@ -64,7 +66,8 @@ var commandMenuMeta = {
64
66
  },
65
67
  {
66
68
  guidance: "dont",
67
- description: "Hand-build a palette mock from a search glyph, a row of buttons and a highlight. That is CommandMenuPanel, and the hand-built one has no combobox, no filtering and no keyboard model."
69
+ description: "Hand-build a palette mock from a search glyph, a row of buttons and a highlight. That is CommandMenuPanel, and the hand-built one has no combobox, no filtering and no keyboard model.",
70
+ instead: ["CommandMenuPanel"]
68
71
  },
69
72
  {
70
73
  guidance: "dont",
@@ -26,7 +26,8 @@ var contextCardMeta = {
26
26
  },
27
27
  {
28
28
  guidance: "dont",
29
- description: "Do not open it on click. It is a hover/focus preview; making it click-triggered gives you a Popover with no dismiss affordance and no way to reach the content it previews."
29
+ description: "Do not open it on click. It is a hover/focus preview; making it click-triggered gives you a Popover with no dismiss affordance and no way to reach the content it previews.",
30
+ instead: ["Popover"]
30
31
  }
31
32
  ],
32
33
  anatomy: [
@@ -38,7 +38,8 @@ var dialogMeta = {
38
38
  },
39
39
  {
40
40
  guidance: "dont",
41
- description: "Put large multipage workflows in a centered dialog. Use Sheet or a page route when the task needs space."
41
+ description: "Put large multipage workflows in a centered dialog. Use Sheet or a page route when the task needs space.",
42
+ instead: ["Sheet"]
42
43
  },
43
44
  {
44
45
  guidance: "do",
@@ -46,7 +47,8 @@ var dialogMeta = {
46
47
  },
47
48
  {
48
49
  guidance: "dont",
49
- description: `Use size="fullscreen" for forms, confirmations, or anything that isn't media. A dialog that happens to need room is a Sheet or a page; the fullscreen affordances (dark scrim, corner close, centred content) all assume something to look at.`
50
+ description: `Use size="fullscreen" for forms, confirmations, or anything that isn't media. A dialog that happens to need room is a Sheet or a page; the fullscreen affordances (dark scrim, corner close, centred content) all assume something to look at.`,
51
+ instead: ["Sheet"]
50
52
  },
51
53
  {
52
54
  guidance: "dont",
@@ -54,7 +56,8 @@ var dialogMeta = {
54
56
  },
55
57
  {
56
58
  guidance: "dont",
57
- description: "Open a dialog for passive status updates. Use Toast, Banner, or InlineStatus instead."
59
+ description: "Open a dialog for passive status updates. Use Toast, Banner, or InlineStatus instead.",
60
+ instead: ["Toast", "Banner", "InlineStatus"]
58
61
  },
59
62
  {
60
63
  guidance: "do",
@@ -47,7 +47,8 @@ var disclosurePickerMeta = {
47
47
  },
48
48
  {
49
49
  guidance: "dont",
50
- description: "Use it in a page-register form. A form field that pushes the form down on open reads as a layout jump; that is Select's job."
50
+ description: "Use it in a page-register form. A form field that pushes the form down on open reads as a layout jump; that is Select's job.",
51
+ instead: ["Select"]
51
52
  },
52
53
  {
53
54
  guidance: "dont",
@@ -22,7 +22,8 @@ var inlineStatusMeta = {
22
22
  },
23
23
  {
24
24
  guidance: "dont",
25
- description: "Do not use InlineStatus for global announcements or page-level alerts."
25
+ description: "Do not use InlineStatus for global announcements or page-level alerts.",
26
+ instead: ["Banner"]
26
27
  },
27
28
  {
28
29
  guidance: "dont",
@@ -26,7 +26,8 @@ var menuMeta = {
26
26
  },
27
27
  {
28
28
  guidance: "dont",
29
- description: "Do not build a Select out of it. A menu fires actions and has no value; a Select holds one and reports changes. Swapping them loses form semantics and keyboard type-ahead."
29
+ description: "Do not build a Select out of it. A menu fires actions and has no value; a Select holds one and reports changes. Swapping them loses form semantics and keyboard type-ahead.",
30
+ instead: ["Select"]
30
31
  },
31
32
  {
32
33
  guidance: "do",
@@ -25,7 +25,8 @@ var menubarMeta = {
25
25
  },
26
26
  {
27
27
  guidance: "dont",
28
- description: "Do not use a menubar for site navigation. Its items are commands in menus (role=menuitem), not links between pages."
28
+ description: "Do not use a menubar for site navigation. Its items are commands in menus (role=menuitem), not links between pages.",
29
+ instead: ["NavigationMenu"]
29
30
  }
30
31
  ],
31
32
  anatomy: [
@@ -26,7 +26,8 @@ var meterMeta = {
26
26
  },
27
27
  {
28
28
  guidance: "dont",
29
- description: "Do not use Meter for a task in flight \u2014 an upload, an install, a step count. That is Progress; Meter tells assistive tech nothing is happening."
29
+ description: "Do not use Meter for a task in flight \u2014 an upload, an install, a step count. That is Progress; Meter tells assistive tech nothing is happening.",
30
+ instead: ["Progress"]
30
31
  },
31
32
  {
32
33
  guidance: "dont",
@@ -33,7 +33,8 @@ var noteMeta = {
33
33
  },
34
34
  {
35
35
  guidance: "dont",
36
- description: "Do not use Note for state the whole page or app is in (an outage, an offline session, a blocked account) \u2014 that is Banner \u2014 or for a message tied to one field, which is the field's own error text."
36
+ description: "Do not use Note for state the whole page or app is in (an outage, an offline session, a blocked account) \u2014 that is Banner \u2014 or for a message tied to one field, which is the field's own error text.",
37
+ instead: ["Banner"]
37
38
  },
38
39
  {
39
40
  guidance: "dont",
@@ -22,7 +22,8 @@ var pageLoaderMeta = {
22
22
  },
23
23
  {
24
24
  guidance: "dont",
25
- description: "Do not use PageLoader for small inline waits; use Spinner, an indeterminate Progress, or Skeleton."
25
+ description: "Do not use PageLoader for small inline waits; use Spinner, an indeterminate Progress, or Skeleton.",
26
+ instead: ["Spinner", "Progress", "Skeleton"]
26
27
  },
27
28
  {
28
29
  guidance: "dont",
@@ -24,7 +24,8 @@ var pillMeta = {
24
24
  },
25
25
  {
26
26
  guidance: "dont",
27
- description: "Do not use Pill as a static label. A pressable-looking chip that does nothing is the most common cause of dead clicks in a filter row \u2014 that is a Badge."
27
+ description: "Do not use Pill as a static label. A pressable-looking chip that does nothing is the most common cause of dead clicks in a filter row \u2014 that is a Badge.",
28
+ instead: ["Badge"]
28
29
  },
29
30
  {
30
31
  guidance: "dont",
@@ -22,11 +22,13 @@ var popoverMeta = {
22
22
  },
23
23
  {
24
24
  guidance: "dont",
25
- description: "Do not use Popover for blocking confirmations, long forms, or critical information."
25
+ description: "Do not use Popover for blocking confirmations, long forms, or critical information.",
26
+ instead: ["Dialog"]
26
27
  },
27
28
  {
28
29
  guidance: "dont",
29
- description: "Do not put a form that can fail validation inside one. A popover dismisses on outside click, which discards what the user typed with no warning \u2014 that is a Dialog."
30
+ description: "Do not put a form that can fail validation inside one. A popover dismisses on outside click, which discards what the user typed with no warning \u2014 that is a Dialog.",
31
+ instead: ["Dialog"]
30
32
  }
31
33
  ],
32
34
  anatomy: [
@@ -26,7 +26,8 @@ var progressMeta = {
26
26
  },
27
27
  {
28
28
  guidance: "dont",
29
- description: "Do not use a determinate Progress for an unknown duration. A bar that sits at 90% is worse than a Spinner, because it makes a promise about time that you cannot keep."
29
+ description: "Do not use a determinate Progress for an unknown duration. A bar that sits at 90% is worse than a Spinner, because it makes a promise about time that you cannot keep.",
30
+ instead: ["Spinner"]
30
31
  }
31
32
  ],
32
33
  anatomy: [
@@ -22,7 +22,8 @@ var radioMeta = {
22
22
  },
23
23
  {
24
24
  guidance: "dont",
25
- description: "Do not use Radio for independent toggles or multiple selection; use Checkbox or Switch."
25
+ description: "Do not use Radio for independent toggles or multiple selection; use Checkbox or Switch.",
26
+ instead: ["Checkbox", "Switch"]
26
27
  },
27
28
  {
28
29
  guidance: "dont",
@@ -16,7 +16,8 @@ var segmentedBarMeta = {
16
16
  },
17
17
  {
18
18
  guidance: "dont",
19
- description: "Use it for a single value against a limit; that is Meter, which carries the meter role and its value."
19
+ description: "Use it for a single value against a limit; that is Meter, which carries the meter role and its value.",
20
+ instead: ["Meter"]
20
21
  },
21
22
  {
22
23
  guidance: "dont",
@@ -29,11 +29,13 @@ var selectMeta = {
29
29
  },
30
30
  {
31
31
  guidance: "dont",
32
- description: "Use Select for very large or fuzzy lists. Use Combobox when typing is the primary way to find an option."
32
+ description: "Use Select for very large or fuzzy lists. Use Combobox when typing is the primary way to find an option.",
33
+ instead: ["Combobox"]
33
34
  },
34
35
  {
35
36
  guidance: "dont",
36
- description: "Use Select for binary on/off settings. Use Switch or Checkbox instead."
37
+ description: "Use Select for binary on/off settings. Use Switch or Checkbox instead.",
38
+ instead: ["Switch", "Checkbox"]
37
39
  },
38
40
  {
39
41
  guidance: "do",
@@ -30,11 +30,13 @@ var sheetMeta = {
30
30
  },
31
31
  {
32
32
  guidance: "dont",
33
- description: "Do not use Sheet for simple confirmations or deeply nested workflows."
33
+ description: "Do not use Sheet for simple confirmations or deeply nested workflows.",
34
+ instead: ["Dialog"]
34
35
  },
35
36
  {
36
37
  guidance: "dont",
37
- description: "Do not use it on desktop where a Dialog fits. A sheet's affordance is edge-anchored travel for thumb reach; on a wide viewport it becomes a dialog that arrives from the wrong place."
38
+ description: "Do not use it on desktop where a Dialog fits. A sheet's affordance is edge-anchored travel for thumb reach; on a wide viewport it becomes a dialog that arrives from the wrong place.",
39
+ instead: ["Dialog"]
38
40
  }
39
41
  ],
40
42
  anatomy: [
@@ -33,7 +33,8 @@ var sideNavMeta = {
33
33
  },
34
34
  {
35
35
  guidance: "dont",
36
- description: "Use SideNav for bottom mobile navigation; use BottomNav in AppShell's bottomNav slot."
36
+ description: "Use SideNav for bottom mobile navigation; use BottomNav in AppShell's bottomNav slot.",
37
+ instead: ["BottomNav"]
37
38
  },
38
39
  {
39
40
  guidance: "dont",
@@ -22,7 +22,8 @@ var skeletonMeta = {
22
22
  },
23
23
  {
24
24
  guidance: "dont",
25
- description: "Do not leave Skeleton visible after an error or empty state; switch to EmptyState (tone='destructive' for an error)."
25
+ description: "Do not leave Skeleton visible after an error or empty state; switch to EmptyState (tone='destructive' for an error).",
26
+ instead: ["EmptyState"]
26
27
  },
27
28
  {
28
29
  guidance: "dont",
@@ -22,7 +22,8 @@ var spinnerMeta = {
22
22
  },
23
23
  {
24
24
  guidance: "dont",
25
- description: "Do not use Spinner as the only content for long waits or full page loading."
25
+ description: "Do not use Spinner as the only content for long waits or full page loading.",
26
+ instead: ["Skeleton", "PageLoader"]
26
27
  },
27
28
  {
28
29
  guidance: "dont",
@@ -30,11 +30,13 @@ var stepperMeta = {
30
30
  },
31
31
  {
32
32
  guidance: "dont",
33
- description: "Do not use Stepper for a task with unknown length or for a percentage. That is Progress; a stepper promises a fixed set of named stops."
33
+ description: "Do not use Stepper for a task with unknown length or for a percentage. That is Progress; a stepper promises a fixed set of named stops.",
34
+ instead: ["Progress"]
34
35
  },
35
36
  {
36
37
  guidance: "dont",
37
- description: "Do not use it as navigation between independent sections. Sections the user can visit in any order are Tabs; a stepper implies each step depends on the one before."
38
+ description: "Do not use it as navigation between independent sections. Sections the user can visit in any order are Tabs; a stepper implies each step depends on the one before.",
39
+ instead: ["Tabs"]
38
40
  },
39
41
  {
40
42
  guidance: "dont",
@@ -26,7 +26,8 @@ var switchMeta = {
26
26
  },
27
27
  {
28
28
  guidance: "dont",
29
- description: "Do not use Switch for one-time agreement, multi-select choices, or submit-only booleans."
29
+ description: "Do not use Switch for one-time agreement, multi-select choices, or submit-only booleans.",
30
+ instead: ["Checkbox", "Radio"]
30
31
  },
31
32
  {
32
33
  guidance: "dont",
@@ -34,7 +34,8 @@ var tableMeta = {
34
34
  },
35
35
  {
36
36
  guidance: "dont",
37
- description: "Use Table for heterogeneous items with no stable columns. Use Card, Entity, or a list composition instead."
37
+ description: "Use Table for heterogeneous items with no stable columns. Use Card, Entity, or a list composition instead.",
38
+ instead: ["Card", "Entity"]
38
39
  },
39
40
  {
40
41
  guidance: "dont",
@@ -26,11 +26,13 @@ var tabsMeta = {
26
26
  },
27
27
  {
28
28
  guidance: "dont",
29
- description: "Do not use Tabs for unrelated pages or primary navigation that needs distinct URLs."
29
+ description: "Do not use Tabs for unrelated pages or primary navigation that needs distinct URLs.",
30
+ instead: ["SideNav", "NavigationMenu"]
30
31
  },
31
32
  {
32
33
  guidance: "dont",
33
- description: "Do not use tabs for sequential steps. Tabs are peer views the user returns to in any order; a process with an order needs a stepper, or the user will skip ahead."
34
+ description: "Do not use tabs for sequential steps. Tabs are peer views the user returns to in any order; a process with an order needs a stepper, or the user will skip ahead.",
35
+ instead: ["Stepper"]
34
36
  }
35
37
  ],
36
38
  anatomy: [
@@ -31,11 +31,13 @@ var thinkingOrbMeta = {
31
31
  },
32
32
  {
33
33
  guidance: "dont",
34
- description: "Do not put one on every row of a list or in a repeated skeleton. Each orb runs its own animation frame loop painting hundreds of arcs; use Skeleton for content-shaped waits and Spinner inside buttons."
34
+ description: "Do not put one on every row of a list or in a repeated skeleton. Each orb runs its own animation frame loop painting hundreds of arcs; use Skeleton for content-shaped waits and Spinner inside buttons.",
35
+ instead: ["Skeleton", "Spinner"]
35
36
  },
36
37
  {
37
38
  guidance: "dont",
38
- description: "Do not use it for a determinate wait. It carries no sense of how far along anything is \u2014 reach for Progress when a percentage exists."
39
+ description: "Do not use it for a determinate wait. It carries no sense of how far along anything is \u2014 reach for Progress when a percentage exists.",
40
+ instead: ["Progress"]
39
41
  },
40
42
  {
41
43
  guidance: "dont",
@@ -33,7 +33,8 @@ var toastMeta = {
33
33
  },
34
34
  {
35
35
  guidance: "dont",
36
- description: "Use Toast for critical blockers or persistent outages. Use Banner or Dialog when the user must notice and act."
36
+ description: "Use Toast for critical blockers or persistent outages. Use Banner or Dialog when the user must notice and act.",
37
+ instead: ["Banner", "Dialog"]
37
38
  },
38
39
  {
39
40
  guidance: "dont",
@@ -31,7 +31,8 @@ var toggleMeta = {
31
31
  },
32
32
  {
33
33
  guidance: "dont",
34
- description: "Do not use Toggle for persistent application settings; use Switch."
34
+ description: "Do not use Toggle for persistent application settings; use Switch.",
35
+ instead: ["Switch"]
35
36
  },
36
37
  {
37
38
  guidance: "dont",
@@ -43,7 +43,8 @@ var toolbarMeta = {
43
43
  },
44
44
  {
45
45
  guidance: "dont",
46
- description: "Use Toolbar for navigation between pages or views. Links that go somewhere are Tabs, SideNav or Breadcrumbs; ToolbarLink is for the odd link that sits among actions, like Help."
46
+ description: "Use Toolbar for navigation between pages or views. Links that go somewhere are Tabs, SideNav or Breadcrumbs; ToolbarLink is for the odd link that sits among actions, like Help.",
47
+ instead: ["Tabs", "SideNav", "Breadcrumbs"]
47
48
  },
48
49
  {
49
50
  guidance: "dont",
@@ -22,7 +22,8 @@ var tooltipMeta = {
22
22
  },
23
23
  {
24
24
  guidance: "dont",
25
- description: "Do not put critical instructions, errors, or interactive content inside Tooltip."
25
+ description: "Do not put critical instructions, errors, or interactive content inside Tooltip.",
26
+ instead: ["Popover", "InlineStatus"]
26
27
  },
27
28
  {
28
29
  guidance: "dont",