@sableui/react 0.15.0 → 0.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (145) hide show
  1. package/CHANGELOG.md +99 -0
  2. package/bin/sable-lint.mjs +5 -1
  3. package/dist/{_contract-CkqXDVww.d.ts → _contract-CDa9-NdB.d.ts} +47 -1
  4. package/dist/blocks/approval-block.js +30 -48
  5. package/dist/blocks/approval-block.meta.js +7 -8
  6. package/dist/blocks/index.d.ts +1 -1
  7. package/dist/blocks/wallet-block.js +2 -2
  8. package/dist/components/app-shell/app-shell-frame.js +16 -0
  9. package/dist/components/app-shell/app-shell-main.js +12 -0
  10. package/dist/components/app-shell/app-shell.js +28 -4
  11. package/dist/components/app-shell/app-shell.meta.js +88 -4
  12. package/dist/components/area-chart/area-chart.meta.js +6 -1
  13. package/dist/components/attachment/attachment.meta.js +2 -1
  14. package/dist/components/attachment/attachment.variants.js +1 -1
  15. package/dist/components/badge/badge.meta.js +8 -1
  16. package/dist/components/badge/badge.variants.js +7 -7
  17. package/dist/components/banner/banner.meta.js +6 -1
  18. package/dist/components/banner/banner.variants.js +5 -5
  19. package/dist/components/bar-chart/bar-chart.meta.js +6 -1
  20. package/dist/components/caret-menu/caret-menu.js +5 -6
  21. package/dist/components/chat-composer/chat-composer.meta.js +2 -2
  22. package/dist/components/chat-composer/chat-composer.variants.js +1 -1
  23. package/dist/components/color-field/color-field.js +6 -8
  24. package/dist/components/combobox/combobox.js +27 -5
  25. package/dist/components/combobox/combobox.meta.js +10 -2
  26. package/dist/components/command-menu/command-menu.js +14 -3
  27. package/dist/components/command-menu/command-menu.meta.js +9 -1
  28. package/dist/components/date-picker/date-picker.meta.js +2 -2
  29. package/dist/components/feedback/feedback.js +1 -1
  30. package/dist/components/feedback/feedback.meta.js +2 -1
  31. package/dist/components/gradient-art/gradient-art.js +8 -5
  32. package/dist/components/gradient-art/gradient-art.meta.js +35 -2
  33. package/dist/components/input/input.meta.js +11 -3
  34. package/dist/components/input-group/input-group.js +1 -1
  35. package/dist/components/input-group/input-group.meta.js +1 -1
  36. package/dist/components/line-chart/line-chart.meta.js +6 -1
  37. package/dist/components/menu/menu.js +1 -1
  38. package/dist/components/meter/meter.js +53 -7
  39. package/dist/components/meter/meter.meta.js +51 -4
  40. package/dist/components/meter/meter.variants.js +43 -7
  41. package/dist/components/note/note.meta.js +5 -1
  42. package/dist/components/note/note.variants.js +4 -4
  43. package/dist/components/number-field/number-field.meta.js +2 -2
  44. package/dist/components/otp-field/otp-field.meta.js +2 -2
  45. package/dist/components/panel-group/panel-group.js +5 -8
  46. package/dist/components/pie-chart/pie-chart.meta.js +6 -1
  47. package/dist/components/radar-chart/radar-chart.meta.js +6 -1
  48. package/dist/components/radial-chart/radial-chart.meta.js +6 -1
  49. package/dist/components/search-input/search-input.meta.js +11 -3
  50. package/dist/components/section-rail/index.js +7 -0
  51. package/dist/components/section-rail/section-rail.js +153 -0
  52. package/dist/components/section-rail/section-rail.meta.js +189 -0
  53. package/dist/components/segmented-bar/segmented-bar.meta.js +8 -1
  54. package/dist/components/segmented-bar/segmented-bar.variants.js +7 -7
  55. package/dist/components/select/select.js +1 -1
  56. package/dist/components/select/select.meta.js +2 -2
  57. package/dist/components/sheet/sheet.js +5 -4
  58. package/dist/components/sidebar/sidebar.js +16 -1
  59. package/dist/components/sidebar/sidebar.meta.js +7 -2
  60. package/dist/components/sparkline/sparkline.meta.js +8 -1
  61. package/dist/components/status-dot/status-dot.meta.js +8 -1
  62. package/dist/components/status-dot/status-dot.variants.js +7 -7
  63. package/dist/components/stepper/stepper.meta.js +2 -1
  64. package/dist/components/stepper/stepper.variants.js +1 -1
  65. package/dist/components/table/table.meta.js +4 -4
  66. package/dist/components/textarea/textarea.js +5 -0
  67. package/dist/components/textarea/textarea.meta.js +3 -3
  68. package/dist/file-hashes.json +99 -92
  69. package/dist/foundations/accessibility.js +5 -0
  70. package/dist/index.d.ts +227 -25
  71. package/dist/index.js +12 -1
  72. package/dist/lib/chart/types.js +8 -8
  73. package/dist/lib/chart/use-arrival.js +5 -4
  74. package/dist/lib/field-shell.js +1 -1
  75. package/dist/lib/highlight-glide.js +6 -6
  76. package/dist/lib/scrub-gesture.js +6 -6
  77. package/dist/lib/taxonomy.js +1 -0
  78. package/dist/lib/use-active-section.js +59 -0
  79. package/dist/lib/use-caret-trigger.js +11 -18
  80. package/dist/lib/use-match-highlight.js +69 -0
  81. package/dist/lib/use-smooth-wheel.js +10 -8
  82. package/dist/presets/index.d.ts +13 -2
  83. package/dist/presets/index.js +17 -1
  84. package/dist/styles.css +100 -0
  85. package/dist/{theme-provider-CdSicAad.d.ts → theme-provider-BydfM5Z0.d.ts} +1 -1
  86. package/dist/themes/_contract.js +14 -0
  87. package/dist/themes/atelier/atelier.css +18 -0
  88. package/dist/themes/atelier/index.d.ts +1 -1
  89. package/dist/themes/contrast.js +48 -1
  90. package/dist/themes/ember/ember.css +18 -0
  91. package/dist/themes/ember/index.d.ts +1 -1
  92. package/dist/themes/index.d.ts +2 -2
  93. package/dist/themes/meridian/index.d.ts +1 -1
  94. package/dist/themes/meridian/meridian.css +18 -0
  95. package/dist/themes/poppy/index.d.ts +1 -1
  96. package/dist/themes/poppy/poppy.css +18 -0
  97. package/dist/themes/prism/index.d.ts +1 -1
  98. package/dist/themes/prism/prism.css +18 -0
  99. package/dist/themes/sable/index.d.ts +1 -1
  100. package/dist/themes/sable/sable.css +18 -0
  101. package/dist/themes/verdant/index.d.ts +1 -1
  102. package/dist/themes/verdant/verdant.css +18 -0
  103. package/llms/blocks/approval-block.md +40 -55
  104. package/llms/blocks/wallet-block.md +5 -4
  105. package/llms/components/app-shell.md +72 -3
  106. package/llms/components/area-chart.md +1 -1
  107. package/llms/components/attachment.md +1 -1
  108. package/llms/components/badge.md +1 -1
  109. package/llms/components/banner.md +1 -1
  110. package/llms/components/bar-chart.md +1 -1
  111. package/llms/components/chat-composer.md +1 -1
  112. package/llms/components/combobox.md +2 -1
  113. package/llms/components/command-menu.md +3 -2
  114. package/llms/components/date-picker.md +1 -1
  115. package/llms/components/feedback.md +1 -1
  116. package/llms/components/gradient-art.md +28 -1
  117. package/llms/components/input-group.md +1 -1
  118. package/llms/components/input.md +4 -2
  119. package/llms/components/line-chart.md +1 -1
  120. package/llms/components/meter.md +33 -4
  121. package/llms/components/note.md +1 -1
  122. package/llms/components/number-field.md +1 -1
  123. package/llms/components/otp-field.md +1 -1
  124. package/llms/components/pie-chart.md +1 -1
  125. package/llms/components/radar-chart.md +1 -1
  126. package/llms/components/radial-chart.md +1 -1
  127. package/llms/components/search-input.md +20 -2
  128. package/llms/components/section-rail.md +101 -0
  129. package/llms/components/segmented-bar.md +1 -1
  130. package/llms/components/select.md +1 -1
  131. package/llms/components/sidebar.md +3 -2
  132. package/llms/components/sparkline.md +1 -1
  133. package/llms/components/status-dot.md +1 -1
  134. package/llms/components/stepper.md +1 -1
  135. package/llms/components/table.md +2 -2
  136. package/llms/components/textarea.md +2 -2
  137. package/llms/foundations/accessibility.md +1 -0
  138. package/llms/reference/token-intent.md +22 -2
  139. package/llms/reference/utilities.md +5 -2
  140. package/llms-full.txt +367 -105
  141. package/llms.txt +6 -5
  142. package/package.json +1 -1
  143. package/registry.json +609 -67
  144. package/scripts/lint-rules.mjs +6 -3
  145. package/targets/ios.json +9 -0
@@ -24,7 +24,7 @@ Which token to reach for, and what it is most often confused with. Generated fro
24
24
  - **Not** `border-strong`. Reach for `border-strong` when the line carries *structure* (a grid rule, a table divider, a section separator) and for `border` when it merely bounds a control.
25
25
  - **`border-strong`** — A structural divider. Visibly stronger than `border`. *Use for:* Grid lines, table rules, separators between major sections.
26
26
  - **Not** `border`. If removing the line would make the layout ambiguous, it is structural and belongs here.
27
- - **`input`** — The outline of a form control specifically. *Use for:* Text inputs, textareas and selects. Not the edge of a checkbox, radio or switch — that is `control-border`.
27
+ - **`input`** — The outline of a form control specifically. *Use for:* Text inputs, textareas and selects (through `field-border`, which derives from it). Not the edge of a checkbox, radio or switch — that is `control-border`.
28
28
  - **Not** `border`. They are often the same value, but a theme is entitled to make form controls read differently from other chrome, and only this token gives it the hook.
29
29
  - **`control-border`** — The resting edge of a control whose outline is the whole control. Held to 3:1 (WCAG 1.4.11) on every surface. *Use for:* An unchecked checkbox, an unselected radio, an off switch track, a selection card's check or radio mark — anywhere removing the edge would make the control disappear.
30
30
  - **Not** `input`. A text field is also found by its fill, caret and placeholder, so its outline may stay quiet; a checkbox has nothing else, and at `input`'s strength it measures about 1.4:1.
@@ -314,7 +314,7 @@ Which token to reach for, and what it is most often confused with. Generated fro
314
314
  - **`type-mono-sm-tracking`** — The monospace family: mono-xl through mono-sm, plus mono-caption. *Use for:* Code, identifiers, hashes, keyboard keys, and any figure where digits must align in a column.
315
315
  - **Not** the sans tiers for numeric data. Proportional digits make a column of numbers ragged; that is what `text-ui-num` solves in chrome and mono solves on a page.
316
316
 
317
- ### derived (10)
317
+ ### derived (20)
318
318
 
319
319
  - **`canvas`** — The WORK surface — the artboard, the document being edited. *Use for:* Behind the thing the tool operates on. `WorkspaceCanvas` uses it.
320
320
  - **Not** `background`. The thing being edited is not the page behind the UI, and collapsing the two makes the document indistinguishable from its chrome.
@@ -336,6 +336,26 @@ Which token to reach for, and what it is most often confused with. Generated fro
336
336
  - **Not** `hairline`, when the line would otherwise disappear against what it bounds.
337
337
  - **`border-floating`** — The edge of a floating surface. Fainter than `border`: the shadow carries the elevation. *Use for:* Every floating surface — popover, menu, select, tooltip, dialog, sheet, toast, a floating panel — as `border-border-floating` or `ring-border-floating`, together with `bg-popover` and a `shadow-md`+ shadow. Derived for every theme (a faint alpha of the foreground); a theme may tune it with `--theme-border-floating`.
338
338
  - **Not** `border`. A full hairline plus a shadow stacks into a heavy outline around anything that floats. `border` is for resting edges: inputs, cards, badges.
339
+ - **`field`** — The fill of a text field: Input, Textarea, Select, Combobox, SearchInput, InputGroup, ChatComposer. *Use for:* Read by every field through its shell, so you rarely name it. Derived for every theme (`card`, an outlined field on the card); a theme fills its fields instead with `--theme-field: var(--muted)` and `--theme-field-border: transparent`, and every field changes at once. Name it only for a field-shaped surface of your own that must match.
340
+ - **Not** `card` or `muted` on a hand-built field. A field that paints `card` keeps its outline when the theme fills the rest, and one that paints `muted` stays filled when the theme outlines them.
341
+ - **`field-border`** — The outline of a text field. Derived from `input`; `transparent` in a theme with filled fields. *Use for:* With `field`, on the same field-shaped surfaces. Tune it with `--theme-field-border`.
342
+ - **Not** `input` on a text field. `input` stays the theme's outline colour for form chrome; this is the field's outline, which a filled theme turns off.
343
+ - **`shell-ground`** — The ground of an inset app frame: the rail and the gap around the raised main panel. *Use for:* Painted by `<AppShell frame="inset">` and the Sidebar in its slot; you rarely name it. Derived for every theme as one step off `sidebar` toward its ink, so the panel reads as lifted even where the rail is the page colour. Tune it with `--theme-shell-ground`.
344
+ - **Not** `sidebar` or `canvas` behind an inset panel. `sidebar` is the page colour in most themes, so the panel would sit on itself; `canvas` is a workspace's artboard, not app chrome.
345
+ - **`destructive-mark`** — `destructive` at graphic strength: the same hue lifted and saturated, for a mark that carries no text. *Use for:* A meter's or progress fill, a segmented bar, a status dot, a chart series, and the soft tint behind a badge or note (`bg-destructive-mark/15`). Held to 2:1 on the page — visibility, not a text ratio — because each of these sits beside text that says the same thing. Every bundled theme tunes its own; a preset sets `--theme-destructive-mark` or gets one derived from `destructive`.
346
+ - **Not** `bg-destructive` on a mark. The fill is pinned dark enough to carry a white label, so a meter or dot painted with it reads brown, forest or plum. And not for text — that is `text-destructive` — nor for a graphic that is the only carrier of its meaning, which owes 3:1 (WCAG 1.4.11): use the fill or add the text.
347
+ - **`success-mark`** — `success` at graphic strength: the same hue lifted and saturated, for a mark that carries no text. *Use for:* A meter's or progress fill, a segmented bar, a status dot, a chart series, and the soft tint behind a badge or note (`bg-success-mark/15`). Held to 2:1 on the page — visibility, not a text ratio — because each of these sits beside text that says the same thing. Every bundled theme tunes its own; a preset sets `--theme-success-mark` or gets one derived from `success`.
348
+ - **Not** `bg-success` on a mark. The fill is pinned dark enough to carry a white label, so a meter or dot painted with it reads brown, forest or plum. And not for text — that is `text-success` — nor for a graphic that is the only carrier of its meaning, which owes 3:1 (WCAG 1.4.11): use the fill or add the text.
349
+ - **`tone-warning-mark`** — `tone-warning` at graphic strength: the same hue lifted and saturated, for a mark that carries no text. *Use for:* A meter's or progress fill, a segmented bar, a status dot, a chart series, and the soft tint behind a badge or note (`bg-tone-warning-mark/15`). Held to 2:1 on the page — visibility, not a text ratio — because each of these sits beside text that says the same thing. Every bundled theme tunes its own; a preset sets `--theme-tone-warning-mark` or gets one derived from `tone-warning`.
350
+ - **Not** `bg-tone-warning` on a mark. The fill is pinned dark enough to carry a white label, so a meter or dot painted with it reads brown, forest or plum. And not for text — that is `text-tone-warning` — nor for a graphic that is the only carrier of its meaning, which owes 3:1 (WCAG 1.4.11): use the fill or add the text.
351
+ - **`tone-info-mark`** — `tone-info` at graphic strength: the same hue lifted and saturated, for a mark that carries no text. *Use for:* A meter's or progress fill, a segmented bar, a status dot, a chart series, and the soft tint behind a badge or note (`bg-tone-info-mark/15`). Held to 2:1 on the page — visibility, not a text ratio — because each of these sits beside text that says the same thing. Every bundled theme tunes its own; a preset sets `--theme-tone-info-mark` or gets one derived from `tone-info`.
352
+ - **Not** `bg-tone-info` on a mark. The fill is pinned dark enough to carry a white label, so a meter or dot painted with it reads brown, forest or plum. And not for text — that is `text-tone-info` — nor for a graphic that is the only carrier of its meaning, which owes 3:1 (WCAG 1.4.11): use the fill or add the text.
353
+ - **`tone-1-mark`** — `tone-1` at graphic strength: the same hue lifted and saturated, for a mark that carries no text. *Use for:* A meter's or progress fill, a segmented bar, a status dot, a chart series, and the soft tint behind a badge or note (`bg-tone-1-mark/15`). Held to 2:1 on the page — visibility, not a text ratio — because each of these sits beside text that says the same thing. Every bundled theme tunes its own; a preset sets `--theme-tone-1-mark` or gets one derived from `tone-1`.
354
+ - **Not** `bg-tone-1` on a mark. The fill is pinned dark enough to carry a white label, so a meter or dot painted with it reads brown, forest or plum. And not for text — that is `text-tone-1` — nor for a graphic that is the only carrier of its meaning, which owes 3:1 (WCAG 1.4.11): use the fill or add the text.
355
+ - **`tone-2-mark`** — `tone-2` at graphic strength: the same hue lifted and saturated, for a mark that carries no text. *Use for:* A meter's or progress fill, a segmented bar, a status dot, a chart series, and the soft tint behind a badge or note (`bg-tone-2-mark/15`). Held to 2:1 on the page — visibility, not a text ratio — because each of these sits beside text that says the same thing. Every bundled theme tunes its own; a preset sets `--theme-tone-2-mark` or gets one derived from `tone-2`.
356
+ - **Not** `bg-tone-2` on a mark. The fill is pinned dark enough to carry a white label, so a meter or dot painted with it reads brown, forest or plum. And not for text — that is `text-tone-2` — nor for a graphic that is the only carrier of its meaning, which owes 3:1 (WCAG 1.4.11): use the fill or add the text.
357
+ - **`tone-3-mark`** — `tone-3` at graphic strength: the same hue lifted and saturated, for a mark that carries no text. *Use for:* A meter's or progress fill, a segmented bar, a status dot, a chart series, and the soft tint behind a badge or note (`bg-tone-3-mark/15`). Held to 2:1 on the page — visibility, not a text ratio — because each of these sits beside text that says the same thing. Every bundled theme tunes its own; a preset sets `--theme-tone-3-mark` or gets one derived from `tone-3`.
358
+ - **Not** `bg-tone-3` on a mark. The fill is pinned dark enough to carry a white label, so a meter or dot painted with it reads brown, forest or plum. And not for text — that is `text-tone-3` — nor for a graphic that is the only carrier of its meaning, which owes 3:1 (WCAG 1.4.11): use the fill or add the text.
339
359
 
340
360
  ### Generated palette
341
361
 
@@ -230,7 +230,7 @@ The `@utility` and `@custom-variant` layer in `styles.css`: what each one is, wh
230
230
  - **Instead of** A hand-written dash-offset animation with literal timing, which keeps animating, or keeps its delay, under reduced motion.
231
231
  - `<Reveal><svg viewBox="0 0 100 100"><path className="motion-draw" pathLength="1" d="M10 50 L90 50" /></svg></Reveal>`
232
232
 
233
- ### helper (5)
233
+ ### helper (6)
234
234
 
235
235
  - **`hit-target`** — Grows an element's tap target to 44px with a transparent `::after`, without moving its layout by a pixel. `--hit-target-size` overrides the size. *Use for:* A deliberately small mark — a tag's remove ×, a tiny disclosure, a toast close — that must still meet the WCAG touch floor. Shrink it (`[--hit-target-size:32px]`) where targets sit side by side, or the later one steals the taps.
236
236
  - **Instead of** Padding the glyph up (moves it off the row's grid and pushes siblings) or a bigger icon. Never on an `<input>` or other replaced element — pseudo-elements silently do nothing there; wrap it in a label.
@@ -246,4 +246,7 @@ The `@utility` and `@custom-variant` layer in `styles.css`: what each one is, wh
246
246
  - `<a href="/terms" className="link-underline motion-interactive text-primary">terms</a>`
247
247
  - **`checkerboard`** — The transparency checkerboard, painted from `--panel` and a derived darker step so it reads in both modes. `--checkerboard-size` (default 16px) and `--checkerboard-alt` tune it. *Use for:* Behind anything that can be translucent: a colour swatch with alpha, an image or artboard preview, an alpha slider track.
248
248
  - **Instead of** A hand-rolled `repeating-conic-gradient` with two hardcoded greys. Deliberately not named `bg-checkerboard`, so `cn()` never merges it away against a real `bg-*` colour — you can layer a colour over it.
249
- - `<div className="checkerboard [--checkerboard-size:8px] size-6 rounded-sm" />`
249
+ - `<div className="checkerboard [--checkerboard-size:8px] size-6 rounded-sm" />`
250
+ - **`texture-dither`** — A faint pixel / halftone dither field that dissolves: a small pseudo-random tile of squares painted in `--border-strong` and faded out by a gradient mask. Static, pure CSS, follows every theme and mode. Hooks: `--dither-fade` (direction, any linear-gradient side or angle, default `to bottom`), `--dither-size` (tile, default 48px = 2px squares) and `--dither-color` (default `var(--border-strong)`). *Use for:* Decoration at the top of a content area, a panel or a card, or behind an empty-state heading. Put it on its own `aria-hidden` element, `absolute -z-10` as the first child of a `relative isolate` parent, so the content after it paints on top with no z-index of its own. It sets `pointer-events: none` and no position, so it never takes layout or catches clicks.
251
+ - **Instead of** A hand-written `radial-gradient` dot grid (reads as graph paper, not dither), a PNG noise texture, a canvas, or hardcoded greys. Deliberately not named `bg-dither`, so `cn()` never merges it away against a real `bg-*` colour class.
252
+ - `<div className="relative isolate"><div aria-hidden className="texture-dither absolute inset-x-0 top-0 -z-10 h-40" /></div>`