sherick-ui 2.0.0 → 2.1.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 (95) hide show
  1. package/README.md +55 -199
  2. package/dist/cjs/components/Breadcrumb.cjs +47 -0
  3. package/dist/cjs/components/Breadcrumb.cjs.map +1 -0
  4. package/dist/cjs/components/Calendar.cjs +298 -0
  5. package/dist/cjs/components/Calendar.cjs.map +1 -0
  6. package/dist/cjs/components/Combobox.cjs +1 -1
  7. package/dist/cjs/components/Combobox.cjs.map +1 -1
  8. package/dist/cjs/components/Command.cjs +81 -0
  9. package/dist/cjs/components/Command.cjs.map +1 -0
  10. package/dist/cjs/components/CommandPalette.cjs +52 -0
  11. package/dist/cjs/components/CommandPalette.cjs.map +1 -0
  12. package/dist/cjs/components/DatePicker.cjs +107 -0
  13. package/dist/cjs/components/DatePicker.cjs.map +1 -0
  14. package/dist/cjs/components/DateRangePicker.cjs +165 -0
  15. package/dist/cjs/components/DateRangePicker.cjs.map +1 -0
  16. package/dist/cjs/components/FileUpload.cjs +203 -0
  17. package/dist/cjs/components/FileUpload.cjs.map +1 -0
  18. package/dist/cjs/components/Media.cjs +27 -0
  19. package/dist/cjs/components/Media.cjs.map +1 -0
  20. package/dist/cjs/components/Pagination.cjs +115 -0
  21. package/dist/cjs/components/Pagination.cjs.map +1 -0
  22. package/dist/cjs/components/Select.cjs +1 -1
  23. package/dist/cjs/components/Select.cjs.map +1 -1
  24. package/dist/cjs/components/Stepper.cjs +40 -0
  25. package/dist/cjs/components/Stepper.cjs.map +1 -0
  26. package/dist/cjs/components/Tabs.cjs +1 -1
  27. package/dist/cjs/components/Tabs.cjs.map +1 -1
  28. package/dist/cjs/components/TreeView.cjs +247 -0
  29. package/dist/cjs/components/TreeView.cjs.map +1 -0
  30. package/dist/cjs/components/date-family.cjs +191 -0
  31. package/dist/cjs/components/date-family.cjs.map +1 -0
  32. package/dist/cjs/components/date-field.cjs +90 -0
  33. package/dist/cjs/components/date-field.cjs.map +1 -0
  34. package/dist/cjs/components/fileUpload.rules.cjs +121 -0
  35. package/dist/cjs/components/fileUpload.rules.cjs.map +1 -0
  36. package/dist/cjs/components/tree.cjs +95 -0
  37. package/dist/cjs/components/tree.cjs.map +1 -0
  38. package/dist/cjs/components/ui.common.cjs +27 -7
  39. package/dist/cjs/components/ui.common.cjs.map +1 -1
  40. package/dist/cjs/components/ui.motion.cjs +3 -3
  41. package/dist/cjs/components/ui.motion.cjs.map +1 -1
  42. package/dist/cjs/dev.cjs +5 -0
  43. package/dist/cjs/dev.cjs.map +1 -1
  44. package/dist/cjs/index.cjs +22 -0
  45. package/dist/cjs/index.cjs.map +1 -1
  46. package/dist/esm/components/Breadcrumb.js +43 -0
  47. package/dist/esm/components/Breadcrumb.js.map +1 -0
  48. package/dist/esm/components/Calendar.js +294 -0
  49. package/dist/esm/components/Calendar.js.map +1 -0
  50. package/dist/esm/components/Combobox.js +2 -2
  51. package/dist/esm/components/Combobox.js.map +1 -1
  52. package/dist/esm/components/Command.js +77 -0
  53. package/dist/esm/components/Command.js.map +1 -0
  54. package/dist/esm/components/CommandPalette.js +48 -0
  55. package/dist/esm/components/CommandPalette.js.map +1 -0
  56. package/dist/esm/components/DatePicker.js +103 -0
  57. package/dist/esm/components/DatePicker.js.map +1 -0
  58. package/dist/esm/components/DateRangePicker.js +161 -0
  59. package/dist/esm/components/DateRangePicker.js.map +1 -0
  60. package/dist/esm/components/FileUpload.js +199 -0
  61. package/dist/esm/components/FileUpload.js.map +1 -0
  62. package/dist/esm/components/Media.js +25 -0
  63. package/dist/esm/components/Media.js.map +1 -0
  64. package/dist/esm/components/Pagination.js +111 -0
  65. package/dist/esm/components/Pagination.js.map +1 -0
  66. package/dist/esm/components/Select.js +2 -2
  67. package/dist/esm/components/Select.js.map +1 -1
  68. package/dist/esm/components/Stepper.js +36 -0
  69. package/dist/esm/components/Stepper.js.map +1 -0
  70. package/dist/esm/components/Tabs.js +2 -2
  71. package/dist/esm/components/Tabs.js.map +1 -1
  72. package/dist/esm/components/TreeView.js +243 -0
  73. package/dist/esm/components/TreeView.js.map +1 -0
  74. package/dist/esm/components/date-family.js +173 -0
  75. package/dist/esm/components/date-family.js.map +1 -0
  76. package/dist/esm/components/date-field.js +84 -0
  77. package/dist/esm/components/date-field.js.map +1 -0
  78. package/dist/esm/components/fileUpload.rules.js +114 -0
  79. package/dist/esm/components/fileUpload.rules.js.map +1 -0
  80. package/dist/esm/components/tree.js +88 -0
  81. package/dist/esm/components/tree.js.map +1 -0
  82. package/dist/esm/components/ui.common.js +23 -8
  83. package/dist/esm/components/ui.common.js.map +1 -1
  84. package/dist/esm/components/ui.motion.js +3 -3
  85. package/dist/esm/components/ui.motion.js.map +1 -1
  86. package/dist/esm/dev.js +1 -1
  87. package/dist/esm/index.js +11 -0
  88. package/dist/esm/index.js.map +1 -1
  89. package/dist/styles.css +362 -20
  90. package/dist/theme.css +15 -9
  91. package/dist/types/dev.d.cts +8 -3
  92. package/dist/types/dev.d.ts +8 -3
  93. package/dist/types/index.d.cts +600 -66
  94. package/dist/types/index.d.ts +600 -66
  95. package/package.json +1 -1
@@ -66,6 +66,8 @@ import { motionFeedback, motionDisclose, motionStateLayer } from './ui.motion.js
66
66
  draws it from the wrapping control instead of the track it contains. */
67
67
  const focusRing = "focus:outline-none focus-visible:outline focus-visible:outline-2 focus-visible:outline-sherick-focus focus-visible:outline-offset-[3px]";
68
68
  const focusRingInset = "focus:outline-none focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-sherick-focus";
69
+ /* A focus owner that also contains a subtree paints the inset ring on its direct row only. */
70
+ const parentFocusRingInset = "[:focus-visible>&]:ring-2 [:focus-visible>&]:ring-inset [:focus-visible>&]:ring-sherick-focus";
69
71
  /* The ring of a value control that is itself the focusable element: it wears it whenever it
70
72
  holds focus, however it was focused, and whenever the surface it opened is on screen. A select
71
73
  hands the DOM focus to its list while that list is open, so the ring follows the control's
@@ -79,6 +81,8 @@ const focusRingHeld = "focus:outline-none focus:outline focus:outline-2 focus:ou
79
81
  input is `:focus-visible` only for the keyboard, so a slider's handle saves its ring for the
80
82
  keyboard and lets its own engagement answer the pointer. */
81
83
  const focusRingWithin = "has-[:focus-visible]:outline has-[:focus-visible]:outline-2 has-[:focus-visible]:outline-sherick-focus has-[:focus-visible]:outline-offset-[3px]";
84
+ /* A file drag marks the same target with the same outline as visible keyboard focus. */
85
+ const focusRingDrag = "data-[dragging]:outline data-[dragging]:outline-2 data-[dragging]:outline-sherick-focus data-[dragging]:outline-offset-[3px]";
82
86
  const groupFocusRing = "group-focus-visible:outline group-focus-visible:outline-2 group-focus-visible:outline-sherick-focus group-focus-visible:outline-offset-[3px]";
83
87
  /* Motion is not owned here. Every physical event — feedback, tactile, arrive, orient,
84
88
  relocate, direct, presence and activity — is a named recipe in `ui.motion.ts`, which
@@ -92,7 +96,7 @@ const groupFocusRing = "group-focus-visible:outline group-focus-visible:outline-
92
96
  touchable; pressing it returns it to the track.
93
97
  - floating: a surface that genuinely sits above the application.
94
98
  - control: the resting half of the tactile pair, for a part the user moves —
95
- a switch thumb, a selected segment.
99
+ a switch thumb, a selected segment or a held option/date selection.
96
100
  - recessed: the other half of that pair: a groove, a track or a well, which is
97
101
  recessed by definition, and a raised control while it is held, which
98
102
  lands at the same depth.
@@ -110,6 +114,9 @@ const elevation = {
110
114
  of the well is deepened and that boundary is what says what it is. See `selectable.markSurface`. */
111
115
  well: "shadow-sherick-well",
112
116
  };
117
+ /* An inset sheet's shaded upper wall, without a lower rim. Kept independent so
118
+ unrelated components do not bundle this recipe. */
119
+ const recessedTop = "shadow-sherick-recessed-top";
113
120
  /* Shape — semantic corner roles, never an arbitrary radius. Softness grows with
114
121
  the size of the object and the emphasis it carries:
115
122
  - control: ordinary controls and dense data regions — fields, rows, options,
@@ -177,8 +184,8 @@ const effectiveDisabled = "data-[disabled]:cursor-not-allowed data-[disabled]:op
177
184
  pressed a raised control returning to the recessed depth of its own track, plus
178
185
  a slight compression; a flat control stays flat and a floating one keeps
179
186
  its elevation
180
- selected a selected tone; depth comes from the component's anatomy — a
181
- segment inside a groove is raised, a row in a list is not
187
+ selected a held choice: selected tone plus control elevation on a segment,
188
+ option/tree row or date surface; never on mere navigation highlight
182
189
  disabled 45% opacity, no pointer affordance, no interactive state at all
183
190
  focus the shared outer focus ring, visible on keyboard focus */
184
191
  const state = {
@@ -218,7 +225,8 @@ const state = {
218
225
  field: {
219
226
  hover: "hover:bg-sherick-surface-high/[0.82]",
220
227
  focus: "focus:bg-sherick-surface-high/[0.9]",
221
- focusWithin: "focus-within:bg-sherick-surface-high/[0.9]",
228
+ /* A composite's engaged tone outranks hover, independent of variant emission order. */
229
+ focusWithin: "[&&]:focus-within:bg-sherick-surface-high/[0.9]",
222
230
  engaged: "bg-sherick-surface-high/[0.9]",
223
231
  errorHover: "hover:bg-sherick-danger/[0.10]",
224
232
  errorFocus: "focus:bg-sherick-danger/[0.13]",
@@ -229,7 +237,7 @@ const state = {
229
237
  invalid: "data-[invalid]:bg-sherick-danger/[0.075]",
230
238
  invalidHover: "data-[invalid]:hover:bg-sherick-danger/[0.10]",
231
239
  invalidEngaged: "data-[invalid]:bg-sherick-danger/[0.13]",
232
- invalidFocusWithin: "data-[invalid]:focus-within:bg-sherick-danger/[0.13]",
240
+ invalidFocusWithin: "[&&]:data-[invalid]:focus-within:bg-sherick-danger/[0.13]",
233
241
  },
234
242
  };
235
243
  /* State layers.
@@ -308,6 +316,8 @@ const hitArea = "relative after:pointer-events-auto after:absolute after:inset-[
308
316
  should sit back from the surface around them.
309
317
  - matte: a matte surface that separates from the canvas by tone alone.
310
318
  - matteHigh: the second matte step, for nesting inside another matte surface.
319
+ - matteInset: a passive sheet tucked under a stronger control; subdued without
320
+ blending into the canvas or needing a drawn rim.
311
321
  - control: the fill every text control shares, plus its placeholder tone.
312
322
  - handle: the fill of a small part the user has to find — a value control's handle.
313
323
  Surface steps sit within a few percent of their neighbours, so this role
@@ -355,6 +365,10 @@ const material = {
355
365
  acrylicDense: "bg-sherick-surface-float/[var(--sui-glass-dense-fill)] bg-[image:var(--sui-glass-gradient-dense)] text-sherick-ink backdrop-blur-[var(--sui-glass-dense-blur)] backdrop-saturate-[var(--sui-glass-dense-saturation)] backdrop-brightness-[var(--sui-glass-dense-brightness)]",
356
366
  acrylicHero: "bg-sherick-surface-overlay/[var(--sui-overlay-fill)] bg-[image:var(--sui-glass-hero-gradient)] text-sherick-ink backdrop-blur-[var(--sui-glass-hero-blur)] backdrop-saturate-[var(--sui-glass-hero-saturation)] backdrop-brightness-[var(--sui-glass-hero-brightness)]",
357
367
  };
368
+ /* Dark neutral behind native video, including poster loading and letterboxing. */
369
+ const mediaCanvas = "bg-sherick-media";
370
+ /* A passive sheet tucked below a stronger control; independently tree-shakeable. */
371
+ const matteInset = "bg-sherick-surface-high/[0.35] text-sherick-ink";
358
372
  /* Density — three control steps plus the accessible hit target.
359
373
  Density owns height and the type step, so controls of one density share a
360
374
  rhythm. A component's anatomy owns its padding: a button's inline padding is
@@ -466,8 +480,9 @@ const detail = {
466
480
  The sheet never exceeds what the viewport leaves it, and scrolls inside itself rather than
467
481
  growing. Its width is the list's own decision: a control's list is never narrower than the
468
482
  control it came from and grows to fit its own content until the viewport clamp, and a command
469
- list only ever grows to its content. A row is flat — depth never announces a state —
470
- and one row step of `stateLayer.quiet` plus `stateLayer.activeRow` carries both its hover and
483
+ list only ever grows to its content. Unselected rows and commands stay flat; held options
484
+ compose `tone.selected` with `elevation.control`. One row step of `stateLayer.quiet` plus
485
+ `stateLayer.activeRow` carries both its hover and
471
486
  its keyboard highlight, so an option and a command are highlighted by the same tone at the
472
487
  same strength. Keyboard focus adds the shared inset ring independently of that highlight.
473
488
  Selection is a tint of the sheet through `tone.selected` and never the opaque
@@ -649,5 +664,5 @@ const recipeAlphas = {
649
664
  the input itself keeps its native single-line scrolling behavior. */
650
665
  const fieldLayout = "flex min-w-0 w-full flex-col [overflow-wrap:anywhere]";
651
666
 
652
- export { density, detail, disclosure, edge, edgeTone, elevation, fieldLayout, focusRing, focusRingHeld, focusRingInset, focusRingWithin, groupFocusRing, hitArea, list, material, overlay, recipeAlphas, selectable, shape, stacking, state, stateLayer, text, tone };
667
+ export { density, detail, disclosure, edge, edgeTone, elevation, fieldLayout, focusRing, focusRingDrag, focusRingHeld, focusRingInset, focusRingWithin, groupFocusRing, hitArea, list, material, matteInset, mediaCanvas, overlay, parentFocusRingInset, recessedTop, recipeAlphas, selectable, shape, stacking, state, stateLayer, text, tone };
653
668
  //# sourceMappingURL=ui.common.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ui.common.js","sources":["../../../src/components/ui.common.ts"],"sourcesContent":["import { cx } from \"@/libs/utils\";\nimport type { Variant } from \"./ui.types\";\nimport { motionDisclose, motionFeedback, motionStateLayer } from \"./ui.motion\";\n\n/* Sherick UI design primitives\n ==========================================================================\n One module owns every visual rule in the library. A component composes these\n primitives; it does not write a color, shadow, radius, duration or hairline of\n its own. The system has these parts:\n\n material what a surface is made of (canvas, matte, control, acrylic)\n elevation how far it sits off the page (flat, raised, floating, control, recessed)\n shape its corner role (control, prominent, surface, expressive, pill, circle)\n edge the hairline between stacked parts (row, header, rule)\n state how it responds (rest, hover, pressed, selected, disabled, focus)\n stateLayer the composited hover/press overlay (quiet, tonal, filled, track, activeRow)\n disclosure one expandable region and its row (trigger, panel)\n tone its color role (text, soft, tonal, selected, strong)\n text the readable emphasis ladder (high, medium)\n density how tightly it is packed (compact, normal, prominent, target)\n overlay floating shells (menu, tooltip, popup, toast, sheet, dialog)\n focusRing the one focus language (focusRing, focusRingInset, focusRingHeld, focusRingWithin, groupFocusRing)\n\n Temporal behavior is deliberately not here: `ui.motion.ts` owns every transition,\n duration, curve and reduced-motion rule, and a recipe below names one of its recipes\n rather than writing a timing of its own.\n\n The canonical statement of these rules — and of what is deliberately left to a\n component's own anatomy, such as layout, spacing, padding, intrinsic size,\n responsive arrangement and content typography — is `docs/DESIGN_LANGUAGE.md`.\n Extend that document and this module together; never implement a visual rule in\n a component.\n\n material, elevation and edge are orthogonal, and that is the point:\n a material is a fill, an elevation is a distance, and an edge is a structural\n line. A component adds elevation only where its anatomy is genuinely lifted,\n and a hairline only where two parts actually meet. Nothing is baked in.\n\n The physical language, in order:\n flat matte by default\n -> tactile depth on manipulated controls\n -> recessed depth for tracks, grooves and wells, and for a raised control\n while it is held\n -> acrylic only for surfaces that genuinely float above the page\n\n Elevation composites from the light values in `theme.css` (light above the\n surface plane). The structural edge tone is its own token, and the acrylic\n recipes are tokenized separately and calibrated per theme, but both follow the\n same model: light above, shade below. So a highlight, a shadow, a floating\n sheet's gradient and a pressed inset stay physically related without sharing\n one set of numbers. */\n\n/* Focus visibility — one language for every interactive element.\n `focusRing` draws the ring outside the shape, for a control that stands alone, and it follows\n **visible** focus: a button does not announce itself when a pointer presses it.\n `focusRingInset` draws it inside, for a control nested within another surface\n where an outer ring would collide with the parent's edge. Fields use the outer\n ring only: no inner rim is added, so focus reads as one ring, never two.\n `focusRingHeld` and `focusRingWithin` are the same ring for a control that **holds a value**,\n where the platform moves focus somewhere a plain ring cannot follow: the first for a control\n that is itself focusable and hands focus to the surface it opens, the second for one whose\n focus lives in a borderless input inside it. `focusRingHeld` follows *any* focus, because a\n select has no focus left to follow once its list has taken it; `focusRingWithin` follows\n *visible* focus, so what a field does is what the platform does — a text field is\n `:focus-visible` whenever it is focused, a range input only for the keyboard — and a select\n trigger and an editable combobox field end up identical in every state: neither looks ringed at\n rest, both look ringed the moment either is used, and both lose it together. `groupFocusRing`\n draws it from the wrapping control instead of the track it contains. */\nexport const focusRing =\n \"focus:outline-none focus-visible:outline focus-visible:outline-2 focus-visible:outline-sherick-focus focus-visible:outline-offset-[3px]\";\n\nexport const focusRingInset =\n \"focus:outline-none focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-sherick-focus\";\n\n/* The ring of a value control that is itself the focusable element: it wears it whenever it\n holds focus, however it was focused, and whenever the surface it opened is on screen. A select\n hands the DOM focus to its list while that list is open, so the ring follows the control's\n engagement rather than the focus — which is exactly what a native `select` shows, and the only\n focus indication the field has left once the list has taken over. */\nexport const focusRingHeld =\n \"focus:outline-none focus:outline focus:outline-2 focus:outline-sherick-focus focus:outline-offset-[3px] data-[popup-open]:outline data-[popup-open]:outline-2 data-[popup-open]:outline-sherick-focus data-[popup-open]:outline-offset-[3px]\";\n\n/* The same ring for a value control whose focus lives in a borderless input inside it. It follows\n **visible** focus rather than any focus, which is what makes a field and a slider differ for\n the platform's reasons instead of by local say-so: a text field is `:focus-visible` whenever it\n is focused, so a combobox or search field wears the ring the moment it is used, while a range\n input is `:focus-visible` only for the keyboard, so a slider's handle saves its ring for the\n keyboard and lets its own engagement answer the pointer. */\nexport const focusRingWithin =\n \"has-[:focus-visible]:outline has-[:focus-visible]:outline-2 has-[:focus-visible]:outline-sherick-focus has-[:focus-visible]:outline-offset-[3px]\";\n\nexport const groupFocusRing =\n \"group-focus-visible:outline group-focus-visible:outline-2 group-focus-visible:outline-sherick-focus group-focus-visible:outline-offset-[3px]\";\n\n/* Motion is not owned here. Every physical event — feedback, tactile, arrive, orient,\n relocate, direct, presence and activity — is a named recipe in `ui.motion.ts`, which\n owns the timing and the reduced-motion behavior for it. A recipe in this module\n interpolates one of those names; it never writes a duration, a curve, a transition or\n an animation of its own. */\n\n/* Elevation — distance from the surface plane, and nothing else. Three depth roles\n exist, and the last two are a single tactile pair:\n - flat: at rest on the page. Separation comes from tone alone.\n - raised: a manipulated control, lifted a hair above its own track so it feels\n touchable; pressing it returns it to the track.\n - floating: a surface that genuinely sits above the application.\n - control: the resting half of the tactile pair, for a part the user moves —\n a switch thumb, a selected segment.\n - recessed: the other half of that pair: a groove, a track or a well, which is\n recessed by definition, and a raised control while it is held, which\n lands at the same depth.\n A passive surface is flat unless its anatomy is sunk by design: a well, a groove and\n a code well are `recessed` while they sit there, and `flat` is the default for\n everything else passive. A flat control never gains depth by being pressed. */\nexport const elevation = {\n flat: \"shadow-sherick-flat\",\n raised: \"shadow-sherick-raised\",\n floating: \"shadow-sherick-floating\",\n control: \"shadow-sherick-control\",\n recessed: \"shadow-sherick-recessed\",\n /* One rung further down: the well of a mark the size of a glyph, whose whole identity is its\n depth. A wide groove reads from its fill; a 24px well has no fill step to spare, so one wall\n of the well is deepened and that boundary is what says what it is. See `selectable.markSurface`. */\n well: \"shadow-sherick-well\",\n} as const;\n\n/* Shape — semantic corner roles, never an arbitrary radius. Softness grows with\n the size of the object and the emphasis it carries:\n - control: ordinary controls and dense data regions — fields, rows, options,\n chips, tables.\n - mark: a compact square selection mark — a checkbox box. `control` is a role\n for objects the size of a field; its radius exceeds the half-extent of a\n 24px square, so a mark needs a step of its own.\n - row: a row at command density — a row in a list that is scanned rather than\n read holds a corner proportional to its own height, because `control`\n would reach a 36px row's half-extent and read as a capsule.\n - prominent: prominent controls and compact floating surfaces.\n - surface: large surfaces — cards, menus, panels.\n - sheet: a surface attached to one edge of the viewport. Its exposed corners step\n below `prominent` rather than above it, because a surface that meets an\n edge is read as an extension of the page: a corner sized for a\n free-floating object makes it read as an oversized floating card. It is a\n role of its own rather than a smaller `prominent`, because `prominent`\n also holds compact floating controls, and those must keep their softness.\n - expressive: an expressive surface that owns the viewport — a dialog, tightened so it\n reads as a focused surface rather than a pillowy one.\n - pill: fully rounded controls whose width follows their content.\n - circle: fully rounded square targets. */\nexport const shape = {\n control: \"rounded-[1.25rem]\",\n mark: \"rounded-[0.625rem]\",\n row: \"rounded-[0.875rem]\",\n prominent: \"rounded-[1.5rem]\",\n surface: \"rounded-[1.75rem]\",\n sheet: \"rounded-[1.25rem]\",\n expressive: \"rounded-[2rem]\",\n pill: \"rounded-full\",\n circle: \"rounded-full\",\n} as const;\n\n/* Structural edges — the hairline where two parts of one surface meet, and the\n only structural lines in the library. A matte control has no rim: a 1px inset\n ring that traces a filled object is still a drawn border, so filled controls\n are separated by tone, not by a line. Light does the rest: a raised control\n carries a lower shadow, and the elevation steps add the upper highlight.\n One tone serves every line, so table rows, dividers, the `Divider` component and\n code sections agree with each other. A Markdown blockquote is not one of these: it\n takes a primary accent, because a quote is content-level emphasis rather than a\n structural join between two parts.\n\n The three roles are a tone each, and two of them carry the direction the row draws. The tone\n is authored once and separately, because a `Divider` draws its own direction: a row's line and\n a standalone rule have to agree on the tone without sharing a border. */\nexport const edgeTone = {\n row: \"border-sherick-edge/[0.06]\",\n header: \"border-sherick-edge/[0.10]\",\n rule: \"border-sherick-edge/[0.075]\",\n} as const;\n\nexport const edge = {\n /* Rows of a stacked list or table. */\n row: /* @__PURE__ */ cx(\"border-b\", edgeTone.row, \"last:border-b-0\"),\n /* The heavier rule beneath a column header. */\n header: /* @__PURE__ */ cx(\"border-b\", edgeTone.header),\n /* A section break inside one surface, or a standalone rule. Pair it with the\n directional border class at the call site (`border-t`, `border-l`). */\n rule: edgeTone.rule,\n} as const;\n\nconst effectiveDisabled =\n \"data-[disabled]:cursor-not-allowed data-[disabled]:opacity-45 disabled:cursor-not-allowed disabled:opacity-45\";\n\n/* Interaction states:\n rest the material, at whatever elevation its anatomy calls for\n hover one tonality step, never a change in depth or a new border\n pressed a raised control returning to the recessed depth of its own track, plus\n a slight compression; a flat control stays flat and a floating one keeps\n its elevation\n selected a selected tone; depth comes from the component's anatomy — a\n segment inside a groove is raised, a row in a list is not\n disabled 45% opacity, no pointer affordance, no interactive state at all\n focus the shared outer focus ring, visible on keyboard focus */\nexport const state = {\n /* A raised matte control presses back into the track beneath it — the same physical\n depth a groove or a well sits at. How far the press itself travels is motion amplitude, and\n it belongs with the tactile intent in `ui.motion.ts`. */\n recess: \"active:shadow-sherick-recessed\",\n /* The disabled step for a control whose disabled state is a Sherick prop. */\n disabled: \"cursor-not-allowed opacity-45\",\n /* The same step, keyed on the primitive's own markers rather than on a Sherick prop: Base marks\n an effectively disabled control — including one disabled by the field around it — with\n `data-disabled`, and a part that disables itself at a bound carries `disabled` as well. */\n effectiveDisabled,\n /* A row whose control is disabled by any means — its own option, its group, or the field around\n it — dims from the control's own marker rather than from a Sherick prop. */\n disabledRow: \"has-[[data-disabled]]:cursor-not-allowed has-[[data-disabled]]:opacity-45\",\n /* A control nested inside a disabled composite. The composite already applied the opacity step,\n and a second one would dim the field unevenly; this carries only the disabled cursor. */\n disabledDescendant: \"cursor-not-allowed\",\n /* A part dims independently at a bound, but never a second time inside a disabled field. */\n disabledPart: /* @__PURE__ */ cx(effectiveDisabled, \"group-data-[disabled]/field:opacity-100\"),\n /* A part the pointer is engaging — the handle of a value control. It sits matte and settled at\n rest and takes its accent, a little larger, while the pointer is on it. Drag covers the case\n where the pointer has been captured and left the control. */\n engaged:\n \"group-[:not([data-disabled])]:hover:scale-110 group-[:not([data-disabled])]:hover:bg-sherick-primary-strong group-[:not([data-disabled])]:hover:text-sherick-on-primary data-[dragging]:scale-110 data-[dragging]:bg-sherick-primary-strong data-[dragging]:text-sherick-on-primary\",\n /* A control with a hit area of its own. */\n enabled: \"cursor-pointer\",\n /* A text field: the normal text cursor, never a pointer. */\n text: \"cursor-text\",\n /* Quiet scan feedback for non-interactive data rows: tonality only. */\n rowHover: \"hover:bg-sherick-ink/[0.05]\",\n /* The matte field family — one tonality ladder, four triggers, no rims. A field\n steps its surface up once on hover and once more while it is engaged; a\n composite field focuses its outer surface while the input inside stays\n borderless; an expanded control holds the engaged step while its popup is\n open. Tonality carries the state, so no border appears and disappears. */\n field: {\n hover: \"hover:bg-sherick-surface-high/[0.82]\",\n focus: \"focus:bg-sherick-surface-high/[0.9]\",\n focusWithin: \"focus-within:bg-sherick-surface-high/[0.9]\",\n engaged: \"bg-sherick-surface-high/[0.9]\",\n errorHover: \"hover:bg-sherick-danger/[0.10]\",\n errorFocus: \"focus:bg-sherick-danger/[0.13]\",\n errorEngaged: \"bg-sherick-danger/[0.13]\",\n /* The error ladder again, keyed on Base UI's validity attribute for a part that learns its\n validity from the field it sits in. Two variants outrank the single-variant ladder above,\n so neither ladder has to be conditional. */\n invalid: \"data-[invalid]:bg-sherick-danger/[0.075]\",\n invalidHover: \"data-[invalid]:hover:bg-sherick-danger/[0.10]\",\n invalidEngaged: \"data-[invalid]:bg-sherick-danger/[0.13]\",\n invalidFocusWithin: \"data-[invalid]:focus-within:bg-sherick-danger/[0.13]\",\n },\n} as const;\n\n/* State layers.\n A layer is `relative` itself, because its overlay is absolutely positioned inside the control.\n A component that positions the control — an absolutely placed close or submit control — writes\n that position *after* the layer in its class list: `tailwind-merge` keeps the last class in a\n conflicting group, so a position written before the layer is silently replaced by the layer's\n own.\n Replacing `background-color` on hover erases whatever fill a control owns: an\n opaque fill collapses to a bare tint and a tinted fill loses most of its step.\n This overlay instead composites over the fill, tinted with `currentColor` — the\n container's own on-color, which is also the color furthest from that fill, and\n the same color as the label, so the glyphs themselves are unaffected. Opacity\n carries the state, so it fades on the shared motion curve instead of snapping,\n and it takes the press timing while the control is held.\n One step per fill strength: a quiet surface tints lightly, an opaque accent fill\n takes the heaviest step.\n Both interactive steps are gated on the primitive's own disabled markers, so an effectively\n disabled control neither tints nor presses — whether it was disabled by a prop, by its group or\n by the field around it. `:disabled` alone cannot gate a press: a row in a collection is a\n `div`, so `:active` matches it while the pointer is down on it and the marker is the only gate\n there is. */\nconst stateLayerBase = /* @__PURE__ */ cx(\n \"before:pointer-events-none before:absolute before:inset-0 before:content-[''] before:opacity-0\",\n motionStateLayer\n);\n\n/* A part answers the pointer only while it is interactive. A native control carries `disabled`, and\n a collection primitive marks its rows with `data-disabled` instead. One rule covers both, in the\n same shape for hover and for press, and the group form is that rule for a part whose pointer\n arrives from the wrapping control.\n\n Each step is written out as a whole class name rather than assembled from a variant fragment and\n a suffix, because the stylesheet compiler reads class names as literal text: a name that only\n exists once the recipe is evaluated compiles to no rule at all, and the step silently disappears.\n Interpolating one of these consts is safe — the name is still written here in full. */\nconst hoverQuiet = \"[&:not([data-disabled]):not(:disabled)]:hover:before:opacity-[0.05]\";\nconst hoverTonal = \"[&:not([data-disabled]):not(:disabled)]:hover:before:opacity-[0.09]\";\nconst hoverFilled = \"[&:not([data-disabled]):not(:disabled)]:hover:before:opacity-[0.18]\";\nconst hoverTrack = \"group-[:not([data-disabled]):not(:disabled)]:hover:before:opacity-[0.18]\";\nconst pressQuiet = \"[&:not([data-disabled]):not(:disabled)]:active:before:opacity-[0.09]\";\nconst pressTonal = \"[&:not([data-disabled]):not(:disabled)]:active:before:opacity-[0.15]\";\nconst pressFilled = \"[&:not([data-disabled]):not(:disabled)]:active:before:opacity-[0.26]\";\nconst pressTrack = \"group-[:not([data-disabled]):not(:disabled)]:active:before:opacity-[0.26]\";\n\nexport const stateLayer = {\n /* Quiet surfaces — ghost controls, navigation rows, menu options. */\n quiet: /* @__PURE__ */ cx(\"relative\", stateLayerBase, \"before:rounded-[inherit] before:bg-current\", hoverQuiet, pressQuiet),\n /* Tinted containers: the fill is nearly page color already, so the container's own\n on-color (`current`) carries the state at a light step. Shared by every matte\n control with a fill — tonal buttons, icon buttons, acrylic buttons. */\n tonal: /* @__PURE__ */ cx(\"relative\", stateLayerBase, \"before:rounded-[inherit] before:bg-current\", hoverTonal, pressTonal),\n /* Opaque fills: `current` is the fill's own on-color — the color furthest from it in\n either theme — so one step reads on a saturated blue and a neutral gray alike. */\n filled: /* @__PURE__ */ cx(\"relative\", stateLayerBase, \"before:rounded-[inherit] before:bg-current\", hoverFilled, pressFilled),\n /* A switch track or a selection well: the same layer, but hover and press arrive from the\n wrapping control rather than from the surface itself. */\n track: /* @__PURE__ */ cx(stateLayerBase, \"before:rounded-[inherit] before:bg-current\", hoverTrack, pressTrack),\n /* A row highlighted by keyboard or pointer navigation. Base UI collection primitives expose\n `data-highlighted`; this is the one canonical visual treatment for it, and it pairs with a\n row's own `quiet` layer — the row carries both, so a highlighted row and a hovered row are the\n same tone at the same strength. That strength is written twice because a class name has to be\n literal to be compiled; that the two rendered layers agree is asserted in the browser suite\n rather than left to these lines to stay in step.\n It is deliberately not gated on the disabled markers: a disabled command stays reachable by\n keyboard so it can be discovered and announced as unavailable, and a reader still has to see\n which row the navigation is on when it lands there. */\n activeRow: \"data-[highlighted]:before:opacity-[0.05]\",\n} as const;\n\n/* Hit area — the interactive region of a control whose visible mark is smaller than a comfortable\n target, drawn outside the layout box so a column, a row gap and the space beside a label are all\n measured from the control the user sees. The expansion is capped at the accessible target floor;\n CSS cannot see neighbouring geometry, so it keeps clearance only while surrounding rows are at\n least as tall as that floor — which this library's own `density.normal` rhythm is, and a 40px\n table row is not. */\nexport const hitArea =\n \"relative after:pointer-events-auto after:absolute after:inset-[min(0px,calc((100%-2.75rem)/2))] after:content-['']\";\n\n/* Material — fill only. No material carries elevation or a rim: the same matte\n fill appears flat in a card, lifted on a button and recessed in a groove.\n - canvas: the page itself.\n - matteQuiet: the quietest matte step, for dense data regions and wells that\n should sit back from the surface around them.\n - matte: a matte surface that separates from the canvas by tone alone.\n - matteHigh: the second matte step, for nesting inside another matte surface.\n - control: the fill every text control shares, plus its placeholder tone.\n - handle: the fill of a small part the user has to find — a value control's handle.\n Surface steps sit within a few percent of their neighbours, so this role\n takes the mid-emphasis tone, which inverts with the theme and separates in\n both.\n - acrylic: a translucent sheet lit from above, for surfaces that float above\n the application. The gradient, fill, blur and saturation are part of\n the material. A gradient arrives as a typed image arbitrary value\n rather than through the colour scale, because `tailwind-merge`\n collapses two background utilities into one and would silently drop\n either the fill or the gradient. Each one is written out literally, so\n the class scanner never meets a half-built name. The fill stays an\n ordinary background colour, so a caller can retone a sheet without\n touching its lighting. An anchored sheet carries most of its own tone,\n because it has to stay legible over whatever it happens to sit on: a\n saturated button behind a popup must not read as the popup's own\n state. `acrylicDense` is the same sheet at higher opacity still, for\n the smallest floating surfaces — a tooltip, a floating control.\n - acrylicHero: the large-overlay sheet, for a surface that owns the viewport. It is\n markedly more opaque and calmer than the smaller sheets: it has to\n read first as a physical surface and only secondarily as glass, so the\n scrim behind it does the separating, the blur only defocuses, and the\n gradient is a restrained top-to-bottom light rather than a frosted\n haze. Its tone is a subtle step above the canvas in every theme —\n in dark mode a small step above the canvas rather than a light grey\n sheet — which is how it separates without leaning on its shadow, and\n `--sui-overlay-fill` tunes how much of the sheet is its own tone rather\n than the defocused page — a large overlay leans on that, not on blur. */\nexport const material = {\n canvas: \"bg-sherick-canvas text-sherick-ink\",\n matteQuiet: \"bg-sherick-surface/[0.42] text-sherick-ink\",\n matte: \"bg-sherick-surface/[0.78] text-sherick-ink\",\n matteHigh: \"bg-sherick-surface-high/[0.72] text-sherick-ink\",\n control: \"bg-sherick-surface-high/[0.66] text-sherick-ink placeholder:text-sherick-ink-muted\",\n /* The invalid fill carries its placeholder at the *full* danger tone, not at a fraction of it. A\n placeholder is text, so it answers to the same 4.5:1 the copy beside it does, and a partial\n opacity of an accent is a different colour from the accent: the 72%-opacity placeholder\n measured 2.8–3.0:1 light and 3.4–3.9:1 dark on this fill, while the token it was mixed from\n measures 4.1–4.7:1 light and 5.2–6.2:1 dark on it. There is no dimmer step of a semantic tone\n that is still readable, and a normal field's placeholder is `ink-muted` at full strength\n already — so the error form is the same rule, in the tone the field is in. */\n controlError: \"bg-sherick-danger/[0.075] text-sherick-ink placeholder:text-sherick-danger\",\n handle: \"bg-sherick-ink-muted text-sherick-canvas\",\n acrylic:\n \"bg-sherick-surface-float/[var(--sui-glass-fill)] bg-[image:var(--sui-glass-gradient)] text-sherick-ink backdrop-blur-[var(--sui-glass-blur)] backdrop-saturate-[var(--sui-glass-saturation)] backdrop-brightness-[var(--sui-glass-brightness)]\",\n acrylicDense:\n \"bg-sherick-surface-float/[var(--sui-glass-dense-fill)] bg-[image:var(--sui-glass-gradient-dense)] text-sherick-ink backdrop-blur-[var(--sui-glass-dense-blur)] backdrop-saturate-[var(--sui-glass-dense-saturation)] backdrop-brightness-[var(--sui-glass-dense-brightness)]\",\n acrylicHero:\n \"bg-sherick-surface-overlay/[var(--sui-overlay-fill)] bg-[image:var(--sui-glass-hero-gradient)] text-sherick-ink backdrop-blur-[var(--sui-glass-hero-blur)] backdrop-saturate-[var(--sui-glass-hero-saturation)] backdrop-brightness-[var(--sui-glass-hero-brightness)]\",\n} as const;\n\n/* Density — three control steps plus the accessible hit target.\n Density owns height and the type step, so controls of one density share a\n rhythm. A component's anatomy owns its padding: a button's inline padding is\n set by how it is gripped, a field's by how much text it holds, and neither is\n derived from the other. The library targets dense desktop and product UI, so\n even the prominent step stays compact. Body copy, headings and labels are\n content, not controls, and set their own type. */\nexport const density = {\n compact: \"min-h-10 text-sm\",\n normal: \"min-h-12 text-[0.95rem]\",\n prominent: \"min-h-14 text-lg\",\n /* Minimum interactive target for an icon-only control that stands on its own. */\n target: \"min-h-11 min-w-11\",\n /* A control that is one part of a composite field — the trailing controls a Combobox owns. It\n keeps the floor's height, because it has to sit in the field's row, and takes only the width\n its glyph needs: the two of them are gripped as one cluster at the field's edge, and two full\n squares there read as two controls beside a field rather than as parts of it.\n The narrower step still clears the 24px pointer-target minimum WCAG AA asks for. It is below\n this system's own 44px floor on purpose: that floor belongs to a control that is the whole\n target of its own action, and this one is a part of a field the pointer is already in. */\n part: \"min-h-11 min-w-9\",\n} as const;\n\n/* Stacking level — where anything that floats sits relative to the application.\n\n One interaction level, deliberately. Base UI nests a popup's portal *inside* the portal of the surface it\n was opened from, and appends it last, so document order already says which floating surface is\n on top: the innermost — the one opened last — wins. A scale that ranked surfaces by kind would\n fight that, and it cannot be right: a popup opened from inside a dialog is the innermost\n surface there is, yet a ranking puts the dialog above it and the popup renders behind the modal\n that owns it. Sharing one level lets the nesting Base already built decide, at any depth.\n\n The level's job is to clear the application's own content, not to rank Sherick surfaces against\n each other. */\nexport const stacking = {\n float: \"z-50\",\n /* A persistent app notification portal predates the modal it reports on. */\n notification: \"z-[60]\",\n} as const;\n\n/* Floating overlay shells.\n Base UI owns popup presence, focus, dismissal, portals and anchored positioning.\n Sherick UI owns only the visual shell: material, elevation and shape. Where the entrance\n grows from and how it moves on the way are the presence recipes' in `ui.motion.ts`, so a\n surface's shell never depends on the primitive's open state. `scrim` is the plane\n *behind* a surface that owns the viewport, so it is a fill and a blur with no elevation\n or shape of its own. It is shared rather than written per component so a dialog and an\n alert dialog separate from the page identically. */\nexport const overlay = {\n /* The plane behind a surface that owns the viewport. */\n scrim: /* @__PURE__ */ cx(\"fixed inset-0\", stacking.float, \"bg-sherick-scrim/[0.38] backdrop-blur-[var(--sui-scrim-blur)]\"),\n /* An anchored surface with room to breathe: a selection list (Select, Combobox) or\n structured content (Popover). It grows out of its trigger and carries the softer\n surface corner, because what it holds is read rather than scanned.\n When not to use it: a short list of commands wants `menu`, and a hint wants\n `tooltip`. */\n popup: /* @__PURE__ */ cx(shape.surface, material.acrylic, elevation.floating),\n /* A compact list of commands. The same sheet, the same presence and the same lighting as\n `popup`, tightened in shape so a handful of short actions reads as a list rather than a\n page: a command list should feel like one more control on the surface it came from.\n When not to use it: a list of options that are chosen rather than performed, or a\n surface holding structured content, wants `popup`. */\n menu: /* @__PURE__ */ cx(shape.control, material.acrylic, elevation.floating),\n /* A short hint is a compact sheet, not a capsule button. */\n tooltip: /* @__PURE__ */ cx(shape.row, material.acrylicDense, elevation.floating),\n /* A toast is a floating status surface that arrives on its own and leaves on its own. It\n holds a line or two of copy rather than being read as a page, so it takes the compact\n floating corner rather than the wide sheet a popup is.\n When not to use it: a hint attached to a control wants `tooltip`, and anything the user\n opened themselves wants `popup`. */\n toast: /* @__PURE__ */ cx(shape.prominent, material.acrylic, elevation.floating),\n /* A dialog rises further than a menu. It is anchored to the viewport rather than to a trigger,\n so it has no side to grow from and takes the modal presence instead of the anchored one.\n Its corner is the most generous in the library, because a surface that floats free of every\n edge has nothing to line up with. */\n dialog: /* @__PURE__ */ cx(shape.expressive, material.acrylicHero, elevation.floating),\n /* A sheet is the same viewport-owning surface as a dialog, attached to one edge of the\n viewport. Its exposed corners take `shape.sheet` — one step below a compact floating\n surface rather than above it — because a surface that meets an edge is read as an extension\n of the page, and its attached edge is squared by the component's own anatomy. Which corners\n those are is decided by the edge; the radius the other two keep is still `shape`'s.\n When not to use it: a surface with no edge to attach to wants `dialog`. */\n sheet: /* @__PURE__ */ cx(shape.sheet, material.acrylicHero, elevation.floating),\n} as const;\n\n/* Text hierarchy — two roles, because only two can carry readable text. High emphasis carries\n labels and values, medium emphasis carries supporting copy, descriptions and placeholders. Both\n clear 4.5:1 on every surface the library composites over, in both themes.\n \n There is deliberately no third text step. A third step would have to sit between `medium` and\n the dimmest tone a surface allows, and at these surfaces the value that clears 4.5:1 collapses\n into `ink-muted` — a step that measures the same as the one above it is not a hierarchy, it is a\n role pretending to be one. The dimmest tone is a *non-text* role instead (see `detail` below). */\nexport const text = {\n high: \"text-sherick-ink\",\n medium: \"text-sherick-ink-muted\",\n} as const;\n\n/* Detail — the non-text furniture tone: a gutter, a rail, a mark's frame, secondary graphical\n detail that carries meaning without being read. It answers to the 3:1 non-text requirement on\n every surface it is permitted on, and it is never a foreground for text: a hint, a placeholder,\n a line number or any other readable step uses `text.medium`. */\nexport const detail = {\n /** A mark's own frame, or a rail drawn as a line. */\n mark: \"border-sherick-detail\",\n /** The same tone as a block, for a gutter or a rail with thickness. */\n fill: \"bg-sherick-detail\",\n} as const;\n\n/* A list surface — the sheet a collection of rows sits in, and the two row densities it can\n hold. Select, Combobox and Menu all compose these, so an option and a command are the same\n object at two densities instead of three independent designs.\n\n The sheet never exceeds what the viewport leaves it, and scrolls inside itself rather than\n growing. Its width is the list's own decision: a control's list is never narrower than the\n control it came from and grows to fit its own content until the viewport clamp, and a command\n list only ever grows to its content. A row is flat — depth never announces a state —\n and one row step of `stateLayer.quiet` plus `stateLayer.activeRow` carries both its hover and\n its keyboard highlight, so an option and a command are highlighted by the same tone at the\n same strength. Keyboard focus adds the shared inset ring independently of that highlight.\n Selection is a tint of the sheet through `tone.selected` and never the opaque\n accent, which belongs to the one primary action in the view rather than to a row that happens\n to be chosen.\n A row that cannot be used takes no hover and no press, and its tone step says so on its own —\n but it keeps the navigation highlight. A disabled option or command stays reachable by\n keyboard so it can be discovered and announced as unavailable, and a reader still has to see\n which row the navigation is on when it arrives there. Disabled means \"cannot be chosen or\n performed\", never \"cannot be found\". */\nexport const list = {\n sheet: \"max-w-[var(--available-width)] max-h-[var(--available-height)] overflow-y-auto\",\n /* A row in a selection list: one line, read one at a time and chosen.\n The row carries two separate things that both have to be visible. Its *navigation highlight*\n is the state layer — one tone shared with the pointer, because a row under the pointer and a\n row under the arrow keys are the same thing happening. Its *focus treatment* is the shared\n inset ring, and it is gated on `:focus-visible`, which is what separates the two cases: Base\n gives the active row real DOM focus, and the platform reports that focus as visible when the\n keyboard put it there and not when a pointer did. So a pointer that opens a list and moves\n over a row gets the highlight and no ring, a keyboard that opens one and steps down it gets\n both, a selected row keeps its selection tint under the ring, and a disabled-but-navigable\n row still shows where the navigation is while saying it cannot be used. The ring is inset\n because the row lives inside the sheet it belongs to, as a segment does in its track. */\n option: /* @__PURE__ */ cx(\n \"flex w-full items-center justify-between gap-4 px-4 py-3 text-start text-sm outline-none\",\n shape.control,\n motionFeedback,\n focusRingInset,\n text.high,\n stateLayer.quiet,\n stateLayer.activeRow,\n state.effectiveDisabled\n ),\n /* The same object at the density a list of short actions wants, where the row is scanned\n rather than read and the list is a control rather than a page. `shape.row` keeps the\n command's corner proportional to its own height, so its highlight nests in the tighter\n sheet the menu is. */\n command: /* @__PURE__ */ cx(\n \"flex w-full items-center gap-3 px-3 py-2 text-start text-sm outline-none\",\n shape.row,\n motionFeedback,\n focusRingInset,\n text.high,\n stateLayer.quiet,\n stateLayer.activeRow,\n state.effectiveDisabled\n ),\n} as const;\n\n/* A disclosure — one row that opens the region beneath it. An item in an `Accordion` and a\n standalone `Collapsible` are the same object: a stacked row, and the in-flow panel its\n primitive measures. They share this recipe so the two cannot drift into two designs, and the\n height itself is the primitive's — it arrives as `--sui-disclose-height`, which each\n component maps its own primitive's panel variable onto, because the measured geometry is\n anatomy and only the interpolation is temporal. */\nexport const disclosure = {\n /* The row: a full-width row in a stacked group, activated like a selectable row. Its own focus\n indicator is the shared inset ring, because an offset one drawn outside the row would land on\n the divider or the panel beside it rather than around the row it belongs to — which is the same\n reason a segment inside a track takes the inset form. The chevron the component puts in the\n row is the disclosure's own affordance and turns in place under `motionOrient`. */\n trigger: /* @__PURE__ */ cx(\n \"group [overflow-wrap:anywhere]\",\n list.option,\n state.enabled\n ),\n panel: /* @__PURE__ */ cx(\"h-[var(--sui-disclose-height)] overflow-hidden text-sm leading-7 [overflow-wrap:anywhere]\", text.medium, motionDisclose),\n} as const;\n\n/* Tone hierarchy — the color roles a surface can take, in rising strength:\n text foreground only, for quiet rows and links.\n soft a de-emphasised tinted surface: alerts, badges, quiet cards.\n tonal a matte control fill at rest: tonal buttons, icon buttons.\n selected the fill a selected control holds: menu options, navigation, the\n selected segment of a segmented control.\n strong the opaque accent fill that marks priority.\n A fill step is composited over whatever sits beneath it, so one tone reads\n correctly on the canvas, inside a card and on an acrylic sheet. */\nexport const tone = {\n text: {\n primary: \"text-sherick-primary\",\n secondary: \"text-sherick-ink\",\n danger: \"text-sherick-danger\",\n warning: \"text-sherick-warning\",\n success: \"text-sherick-success\",\n },\n soft: {\n primary: \"bg-sherick-primary/[0.12] text-sherick-primary\",\n secondary: \"bg-sherick-surface/[0.78] text-sherick-ink\",\n danger: \"bg-sherick-danger/[0.09] text-sherick-danger\",\n warning: \"bg-sherick-warning/[0.09] text-sherick-warning\",\n success: \"bg-sherick-success/[0.09] text-sherick-success\",\n },\n tonal: {\n primary: \"bg-sherick-primary/[0.12]\",\n secondary: \"bg-sherick-surface-high/[0.56]\",\n danger: \"bg-sherick-danger/[0.09]\",\n warning: \"bg-sherick-warning/[0.09]\",\n success: \"bg-sherick-success/[0.09]\",\n },\n selected: {\n primary: \"bg-sherick-primary/[0.22] text-sherick-ink\",\n secondary: \"bg-sherick-surface-high/[0.82] text-sherick-ink\",\n danger: \"bg-sherick-danger/[0.16] text-sherick-ink\",\n warning: \"bg-sherick-warning/[0.16] text-sherick-ink\",\n success: \"bg-sherick-success/[0.16] text-sherick-ink\",\n },\n strong: {\n primary: \"bg-sherick-primary-strong text-sherick-on-primary\",\n secondary: \"bg-sherick-surface-high text-sherick-ink\",\n danger: \"bg-sherick-danger text-sherick-on-danger\",\n warning: \"bg-sherick-warning text-sherick-on-warning\",\n success: \"bg-sherick-success text-sherick-on-success\",\n },\n /* The strong fills again, keyed on the primitive's own selection marker rather than on a\n Sherick prop. A control that holds its selection in the primitive — an uncontrolled\n `Switch` — has to take its fill from the same source of truth as a controlled one, and a\n keyed fill has to be written out literally to be compiled, so it is a role here rather\n than a conditional at the call site. */\n strongChecked: {\n primary: \"group-data-[checked]:bg-sherick-primary-strong group-data-[checked]:text-sherick-on-primary\",\n secondary: \"group-data-[checked]:bg-sherick-surface-high group-data-[checked]:text-sherick-ink\",\n danger: \"group-data-[checked]:bg-sherick-danger group-data-[checked]:text-sherick-on-danger\",\n warning: \"group-data-[checked]:bg-sherick-warning group-data-[checked]:text-sherick-on-warning\",\n success: \"group-data-[checked]:bg-sherick-success group-data-[checked]:text-sherick-on-success\",\n },\n} satisfies Record<string, Record<Variant, string>>;\n\n/* Selectable surface — the recessed surface of a control that fills once it is selected: a\n switch track, a checkbox box, a radio circle, a slider groove. Selection is keyed on the\n primitive's own `data-checked` / `data-indeterminate`, so an uncontrolled control is styled\n from the same source of truth as a controlled one. A mixed box is selected but is not\n ticked, which is why the second attribute stands beside the first. */\nexport const selectable = {\n surface: /* @__PURE__ */ cx(\"relative\", elevation.recessed, motionFeedback),\n /* The same object one rung deeper, for a mark whose identity is its depth. */\n markSurface: /* @__PURE__ */ cx(\"relative\", elevation.well, motionFeedback),\n /* The resting fill a *groove* holds — a segmented control's track, a tab list — and nothing more.\n A groove that holds labelled segments is identified by those segments, exactly as a tab list is\n identified by its labels, so it takes no boundary of its own. */\n rest: /* @__PURE__ */ cx(material.matteHigh, text.medium),\n /* An *empty mark* — an unchecked box, an unselected radio — is the one thing in the family with\n no content at all: nothing inside it says what it is. It takes the fill a `Switch`'s track takes,\n so the interior is a surface rather than a hole, but that *cannot* be what identifies it: the\n tightest neutral step this palette has measures about 1.3:1 against the surface around it, where\n WCAG asks 3:1.\n So the mark is **sunk deeper** instead — `markSurface` — and its depth is what identifies it:\n one wall deepened a rung further than `recessed` draws it (the shaded wall above in light mode,\n the lit wall below in dark mode), which is the same light the whole system is built from. See\n the elevation recipes in `tokens.ts`, and §5 of the design language. No rim: a stroke tracing\n all four sides of a matte control is not part of this language, and the mark now reads as the\n switch's own well does, only deeper. */\n mark: /* @__PURE__ */ cx(\"bg-sherick-surface-high\", text.medium),\n /* A filled mark is identified by its own fill. */\n selected:\n \"group-data-[checked]:bg-sherick-primary-strong group-data-[checked]:text-sherick-on-primary\",\n indeterminate:\n \"group-data-[indeterminate]:bg-sherick-primary-strong group-data-[indeterminate]:text-sherick-on-primary\",\n} as const;\n\n/* The authored alphas the contrast contract measures. They are derived from the class names above\n rather than restated, so a change to a state step, a tint strength or the field ladder moves the\n measurement with it: `scripts/smoke-package.mjs` passes this model to\n `scripts/contrast-contract.mjs`, and the same module proves every class here has a rule in the\n published stylesheet. */\nconst recipeAlpha = (recipe: string, pattern: RegExp, label: string) => {\n const match = recipe.match(pattern);\n if (!match) throw new Error(`recipe alpha missing for ${label}`);\n return Number(match[1]);\n};\nconst stateAlpha = (recipe: string, label: string) =>\n recipeAlpha(recipe, /opacity-\\[(0?\\.\\d+)\\]/, label);\nconst fillAlpha = (recipe: string, label: string) => recipeAlpha(recipe, /\\/\\[(0?\\.\\d+)\\]/, label);\n\nexport const recipeAlphas = {\n state: {\n quiet: { hover: stateAlpha(hoverQuiet, \"state.quiet.hover\"), press: stateAlpha(pressQuiet, \"state.quiet.press\") },\n tonal: { hover: stateAlpha(hoverTonal, \"state.tonal.hover\"), press: stateAlpha(pressTonal, \"state.tonal.press\") },\n filled: { hover: stateAlpha(hoverFilled, \"state.filled.hover\"), press: stateAlpha(pressFilled, \"state.filled.press\") },\n },\n tint: {\n soft: {\n primary: fillAlpha(tone.soft.primary, \"tint.soft.primary\"),\n danger: fillAlpha(tone.soft.danger, \"tint.soft.danger\"),\n warning: fillAlpha(tone.soft.warning, \"tint.soft.warning\"),\n success: fillAlpha(tone.soft.success, \"tint.soft.success\"),\n },\n selected: {\n primary: fillAlpha(tone.selected.primary, \"tint.selected.primary\"),\n danger: fillAlpha(tone.selected.danger, \"tint.selected.danger\"),\n warning: fillAlpha(tone.selected.warning, \"tint.selected.warning\"),\n success: fillAlpha(tone.selected.success, \"tint.selected.success\"),\n },\n neutralRest: fillAlpha(tone.tonal.secondary, \"tint.neutralRest\"),\n },\n field: {\n quiet: fillAlpha(material.matteQuiet, \"field.quiet\"),\n card: fillAlpha(material.matte, \"field.card\"),\n control: fillAlpha(material.control, \"field.control\"),\n hover: fillAlpha(state.field.hover, \"field.hover\"),\n engaged: fillAlpha(state.field.engaged, \"field.engaged\"),\n invalid: fillAlpha(state.field.invalid, \"field.invalid\"),\n invalidHover: fillAlpha(state.field.invalidHover, \"field.invalidHover\"),\n invalidFocus: fillAlpha(state.field.invalidFocusWithin, \"field.invalidFocus\"),\n },\n} as const;\n\n/* A labelled field is a shrinkable column. Its explanatory copy wraps, including identifiers;\n the input itself keeps its native single-line scrolling behavior. */\nexport const fieldLayout = \"flex min-w-0 w-full flex-col [overflow-wrap:anywhere]\";"],"names":[],"mappings":";;;AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8CyB;AAEzB;;;;;;;;;;;;;;;AAe0E;AACnE,MAAM,SAAS,GACpB;AAEK,MAAM,cAAc,GACzB;AAEF;;;;AAIuE;AAChE,MAAM,aAAa,GACxB;AAEF;;;;;AAK8D;AACvD,MAAM,eAAe,GAC1B;AAEK,MAAM,cAAc,GACzB;AAEF;;;;AAI8B;AAE9B;;;;;;;;;;;;;AAaiF;AAC1E,MAAM,SAAS,GAAG;AACvB,IAAA,IAAI,EAAE,qBAAqB;AAC3B,IAAA,MAAM,EAAE,uBAAuB;AAC/B,IAAA,QAAQ,EAAE,yBAAyB;AACnC,IAAA,OAAO,EAAE,wBAAwB;AACjC,IAAA,QAAQ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O,EAAE,uBAAuB,CAAC;YAClE,MAAM,EAAE,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,sBAAsB,CAAC;YAC/D,OAAO,EAAE,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,uBAAuB,CAAC;YAClE,OAAO,EAAE,SAAS,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,uBAAuB,CAAC;AACnE,SAAA;QACD,WAAW,EAAE,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,kBAAkB,CAAC;AACjE,KAAA;AACD,IAAA,KAAK,EAAE;QACL,KAAK,EAAE,SAAS,CAAC,QAAQ,CAAC,UAAU,EAAE,aAAa,CAAC;QACpD,IAAI,EAAE,SAAS,CAAC,QAAQ,CAAC,KAAK,EAAE,YAAY,CAAC;QAC7C,OAAO,EAAE,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,eAAe,CAAC;QACrD,KAAK,EAAE,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,EAAE,aAAa,CAAC;QAClD,OAAO,EAAE,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,EAAE,eAAe,CAAC;QACxD,OAAO,EAAE,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,EAAE,eAAe,CAAC;QACxD,YAAY,EAAE,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,YAAY,EAAE,oBAAoB,CAAC;QACvE,YAAY,EAAE,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,kBAAkB,EAAE,oBAAoB,CAAC;AAC9E,KAAA;;AAGH;AACuE;AAChE,MAAM,WAAW,GAAG;;"}
1
+ {"version":3,"file":"ui.common.js","sources":["../../../src/components/ui.common.ts"],"sourcesContent":["import { cx } from \"@/libs/utils\";\nimport type { Variant } from \"./ui.types\";\nimport { motionDisclose, motionFeedback, motionStateLayer } from \"./ui.motion\";\n\n/* Sherick UI design primitives\n ==========================================================================\n One module owns every visual rule in the library. A component composes these\n primitives; it does not write a color, shadow, radius, duration or hairline of\n its own. The system has these parts:\n\n material what a surface is made of (canvas, matte, control, acrylic)\n elevation how far it sits off the page (flat, raised, floating, control, recessed)\n shape its corner role (control, prominent, surface, expressive, pill, circle)\n edge the hairline between stacked parts (row, header, rule)\n state how it responds (rest, hover, pressed, selected, disabled, focus)\n stateLayer the composited hover/press overlay (quiet, tonal, filled, track, activeRow)\n disclosure one expandable region and its row (trigger, panel)\n tone its color role (text, soft, tonal, selected, strong)\n text the readable emphasis ladder (high, medium)\n density how tightly it is packed (compact, normal, prominent, target)\n overlay floating shells (menu, tooltip, popup, toast, sheet, dialog)\n focusRing the one focus language (focusRing, focusRingInset, focusRingHeld, focusRingWithin, groupFocusRing)\n\n Temporal behavior is deliberately not here: `ui.motion.ts` owns every transition,\n duration, curve and reduced-motion rule, and a recipe below names one of its recipes\n rather than writing a timing of its own.\n\n The canonical statement of these rules — and of what is deliberately left to a\n component's own anatomy, such as layout, spacing, padding, intrinsic size,\n responsive arrangement and content typography — is `docs/DESIGN_LANGUAGE.md`.\n Extend that document and this module together; never implement a visual rule in\n a component.\n\n material, elevation and edge are orthogonal, and that is the point:\n a material is a fill, an elevation is a distance, and an edge is a structural\n line. A component adds elevation only where its anatomy is genuinely lifted,\n and a hairline only where two parts actually meet. Nothing is baked in.\n\n The physical language, in order:\n flat matte by default\n -> tactile depth on manipulated controls\n -> recessed depth for tracks, grooves and wells, and for a raised control\n while it is held\n -> acrylic only for surfaces that genuinely float above the page\n\n Elevation composites from the light values in `theme.css` (light above the\n surface plane). The structural edge tone is its own token, and the acrylic\n recipes are tokenized separately and calibrated per theme, but both follow the\n same model: light above, shade below. So a highlight, a shadow, a floating\n sheet's gradient and a pressed inset stay physically related without sharing\n one set of numbers. */\n\n/* Focus visibility — one language for every interactive element.\n `focusRing` draws the ring outside the shape, for a control that stands alone, and it follows\n **visible** focus: a button does not announce itself when a pointer presses it.\n `focusRingInset` draws it inside, for a control nested within another surface\n where an outer ring would collide with the parent's edge. Fields use the outer\n ring only: no inner rim is added, so focus reads as one ring, never two.\n `focusRingHeld` and `focusRingWithin` are the same ring for a control that **holds a value**,\n where the platform moves focus somewhere a plain ring cannot follow: the first for a control\n that is itself focusable and hands focus to the surface it opens, the second for one whose\n focus lives in a borderless input inside it. `focusRingHeld` follows *any* focus, because a\n select has no focus left to follow once its list has taken it; `focusRingWithin` follows\n *visible* focus, so what a field does is what the platform does — a text field is\n `:focus-visible` whenever it is focused, a range input only for the keyboard — and a select\n trigger and an editable combobox field end up identical in every state: neither looks ringed at\n rest, both look ringed the moment either is used, and both lose it together. `groupFocusRing`\n draws it from the wrapping control instead of the track it contains. */\nexport const focusRing =\n \"focus:outline-none focus-visible:outline focus-visible:outline-2 focus-visible:outline-sherick-focus focus-visible:outline-offset-[3px]\";\n\nexport const focusRingInset =\n \"focus:outline-none focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-sherick-focus\";\n\n/* A focus owner that also contains a subtree paints the inset ring on its direct row only. */\nexport const parentFocusRingInset =\n \"[:focus-visible>&]:ring-2 [:focus-visible>&]:ring-inset [:focus-visible>&]:ring-sherick-focus\";\n\n/* The ring of a value control that is itself the focusable element: it wears it whenever it\n holds focus, however it was focused, and whenever the surface it opened is on screen. A select\n hands the DOM focus to its list while that list is open, so the ring follows the control's\n engagement rather than the focus — which is exactly what a native `select` shows, and the only\n focus indication the field has left once the list has taken over. */\nexport const focusRingHeld =\n \"focus:outline-none focus:outline focus:outline-2 focus:outline-sherick-focus focus:outline-offset-[3px] data-[popup-open]:outline data-[popup-open]:outline-2 data-[popup-open]:outline-sherick-focus data-[popup-open]:outline-offset-[3px]\";\n\n/* The same ring for a value control whose focus lives in a borderless input inside it. It follows\n **visible** focus rather than any focus, which is what makes a field and a slider differ for\n the platform's reasons instead of by local say-so: a text field is `:focus-visible` whenever it\n is focused, so a combobox or search field wears the ring the moment it is used, while a range\n input is `:focus-visible` only for the keyboard, so a slider's handle saves its ring for the\n keyboard and lets its own engagement answer the pointer. */\nexport const focusRingWithin =\n \"has-[:focus-visible]:outline has-[:focus-visible]:outline-2 has-[:focus-visible]:outline-sherick-focus has-[:focus-visible]:outline-offset-[3px]\";\n\n/* A file drag marks the same target with the same outline as visible keyboard focus. */\nexport const focusRingDrag =\n \"data-[dragging]:outline data-[dragging]:outline-2 data-[dragging]:outline-sherick-focus data-[dragging]:outline-offset-[3px]\";\n\nexport const groupFocusRing =\n \"group-focus-visible:outline group-focus-visible:outline-2 group-focus-visible:outline-sherick-focus group-focus-visible:outline-offset-[3px]\";\n\n/* Motion is not owned here. Every physical event — feedback, tactile, arrive, orient,\n relocate, direct, presence and activity — is a named recipe in `ui.motion.ts`, which\n owns the timing and the reduced-motion behavior for it. A recipe in this module\n interpolates one of those names; it never writes a duration, a curve, a transition or\n an animation of its own. */\n\n/* Elevation — distance from the surface plane, and nothing else. Three depth roles\n exist, and the last two are a single tactile pair:\n - flat: at rest on the page. Separation comes from tone alone.\n - raised: a manipulated control, lifted a hair above its own track so it feels\n touchable; pressing it returns it to the track.\n - floating: a surface that genuinely sits above the application.\n - control: the resting half of the tactile pair, for a part the user moves —\n a switch thumb, a selected segment or a held option/date selection.\n - recessed: the other half of that pair: a groove, a track or a well, which is\n recessed by definition, and a raised control while it is held, which\n lands at the same depth.\n A passive surface is flat unless its anatomy is sunk by design: a well, a groove and\n a code well are `recessed` while they sit there, and `flat` is the default for\n everything else passive. A flat control never gains depth by being pressed. */\nexport const elevation = {\n flat: \"shadow-sherick-flat\",\n raised: \"shadow-sherick-raised\",\n floating: \"shadow-sherick-floating\",\n control: \"shadow-sherick-control\",\n recessed: \"shadow-sherick-recessed\",\n /* One rung further down: the well of a mark the size of a glyph, whose whole identity is its\n depth. A wide groove reads from its fill; a 24px well has no fill step to spare, so one wall\n of the well is deepened and that boundary is what says what it is. See `selectable.markSurface`. */\n well: \"shadow-sherick-well\",\n} as const;\n/* An inset sheet's shaded upper wall, without a lower rim. Kept independent so\n unrelated components do not bundle this recipe. */\nexport const recessedTop = \"shadow-sherick-recessed-top\";\n\n/* Shape — semantic corner roles, never an arbitrary radius. Softness grows with\n the size of the object and the emphasis it carries:\n - control: ordinary controls and dense data regions — fields, rows, options,\n chips, tables.\n - mark: a compact square selection mark — a checkbox box. `control` is a role\n for objects the size of a field; its radius exceeds the half-extent of a\n 24px square, so a mark needs a step of its own.\n - row: a row at command density — a row in a list that is scanned rather than\n read holds a corner proportional to its own height, because `control`\n would reach a 36px row's half-extent and read as a capsule.\n - prominent: prominent controls and compact floating surfaces.\n - surface: large surfaces — cards, menus, panels.\n - sheet: a surface attached to one edge of the viewport. Its exposed corners step\n below `prominent` rather than above it, because a surface that meets an\n edge is read as an extension of the page: a corner sized for a\n free-floating object makes it read as an oversized floating card. It is a\n role of its own rather than a smaller `prominent`, because `prominent`\n also holds compact floating controls, and those must keep their softness.\n - expressive: an expressive surface that owns the viewport — a dialog, tightened so it\n reads as a focused surface rather than a pillowy one.\n - pill: fully rounded controls whose width follows their content.\n - circle: fully rounded square targets. */\nexport const shape = {\n control: \"rounded-[1.25rem]\",\n mark: \"rounded-[0.625rem]\",\n row: \"rounded-[0.875rem]\",\n prominent: \"rounded-[1.5rem]\",\n surface: \"rounded-[1.75rem]\",\n sheet: \"rounded-[1.25rem]\",\n expressive: \"rounded-[2rem]\",\n pill: \"rounded-full\",\n circle: \"rounded-full\",\n} as const;\n\n/* Structural edges — the hairline where two parts of one surface meet, and the\n only structural lines in the library. A matte control has no rim: a 1px inset\n ring that traces a filled object is still a drawn border, so filled controls\n are separated by tone, not by a line. Light does the rest: a raised control\n carries a lower shadow, and the elevation steps add the upper highlight.\n One tone serves every line, so table rows, dividers, the `Divider` component and\n code sections agree with each other. A Markdown blockquote is not one of these: it\n takes a primary accent, because a quote is content-level emphasis rather than a\n structural join between two parts.\n\n The three roles are a tone each, and two of them carry the direction the row draws. The tone\n is authored once and separately, because a `Divider` draws its own direction: a row's line and\n a standalone rule have to agree on the tone without sharing a border. */\nexport const edgeTone = {\n row: \"border-sherick-edge/[0.06]\",\n header: \"border-sherick-edge/[0.10]\",\n rule: \"border-sherick-edge/[0.075]\",\n} as const;\n\nexport const edge = {\n /* Rows of a stacked list or table. */\n row: /* @__PURE__ */ cx(\"border-b\", edgeTone.row, \"last:border-b-0\"),\n /* The heavier rule beneath a column header. */\n header: /* @__PURE__ */ cx(\"border-b\", edgeTone.header),\n /* A section break inside one surface, or a standalone rule. Pair it with the\n directional border class at the call site (`border-t`, `border-l`). */\n rule: edgeTone.rule,\n} as const;\n\nconst effectiveDisabled =\n \"data-[disabled]:cursor-not-allowed data-[disabled]:opacity-45 disabled:cursor-not-allowed disabled:opacity-45\";\n\n/* Interaction states:\n rest the material, at whatever elevation its anatomy calls for\n hover one tonality step, never a change in depth or a new border\n pressed a raised control returning to the recessed depth of its own track, plus\n a slight compression; a flat control stays flat and a floating one keeps\n its elevation\n selected a held choice: selected tone plus control elevation on a segment,\n option/tree row or date surface; never on mere navigation highlight\n disabled 45% opacity, no pointer affordance, no interactive state at all\n focus the shared outer focus ring, visible on keyboard focus */\nexport const state = {\n /* A raised matte control presses back into the track beneath it — the same physical\n depth a groove or a well sits at. How far the press itself travels is motion amplitude, and\n it belongs with the tactile intent in `ui.motion.ts`. */\n recess: \"active:shadow-sherick-recessed\",\n /* The disabled step for a control whose disabled state is a Sherick prop. */\n disabled: \"cursor-not-allowed opacity-45\",\n /* The same step, keyed on the primitive's own markers rather than on a Sherick prop: Base marks\n an effectively disabled control — including one disabled by the field around it — with\n `data-disabled`, and a part that disables itself at a bound carries `disabled` as well. */\n effectiveDisabled,\n /* A row whose control is disabled by any means — its own option, its group, or the field around\n it — dims from the control's own marker rather than from a Sherick prop. */\n disabledRow: \"has-[[data-disabled]]:cursor-not-allowed has-[[data-disabled]]:opacity-45\",\n /* A control nested inside a disabled composite. The composite already applied the opacity step,\n and a second one would dim the field unevenly; this carries only the disabled cursor. */\n disabledDescendant: \"cursor-not-allowed\",\n /* A part dims independently at a bound, but never a second time inside a disabled field. */\n disabledPart: /* @__PURE__ */ cx(effectiveDisabled, \"group-data-[disabled]/field:opacity-100\"),\n /* A part the pointer is engaging — the handle of a value control. It sits matte and settled at\n rest and takes its accent, a little larger, while the pointer is on it. Drag covers the case\n where the pointer has been captured and left the control. */\n engaged:\n \"group-[:not([data-disabled])]:hover:scale-110 group-[:not([data-disabled])]:hover:bg-sherick-primary-strong group-[:not([data-disabled])]:hover:text-sherick-on-primary data-[dragging]:scale-110 data-[dragging]:bg-sherick-primary-strong data-[dragging]:text-sherick-on-primary\",\n /* A control with a hit area of its own. */\n enabled: \"cursor-pointer\",\n /* A text field: the normal text cursor, never a pointer. */\n text: \"cursor-text\",\n /* Quiet scan feedback for non-interactive data rows: tonality only. */\n rowHover: \"hover:bg-sherick-ink/[0.05]\",\n /* The matte field family — one tonality ladder, four triggers, no rims. A field\n steps its surface up once on hover and once more while it is engaged; a\n composite field focuses its outer surface while the input inside stays\n borderless; an expanded control holds the engaged step while its popup is\n open. Tonality carries the state, so no border appears and disappears. */\n field: {\n hover: \"hover:bg-sherick-surface-high/[0.82]\",\n focus: \"focus:bg-sherick-surface-high/[0.9]\",\n /* A composite's engaged tone outranks hover, independent of variant emission order. */\n focusWithin: \"[&&]:focus-within:bg-sherick-surface-high/[0.9]\",\n engaged: \"bg-sherick-surface-high/[0.9]\",\n errorHover: \"hover:bg-sherick-danger/[0.10]\",\n errorFocus: \"focus:bg-sherick-danger/[0.13]\",\n errorEngaged: \"bg-sherick-danger/[0.13]\",\n /* The error ladder again, keyed on Base UI's validity attribute for a part that learns its\n validity from the field it sits in. Two variants outrank the single-variant ladder above,\n so neither ladder has to be conditional. */\n invalid: \"data-[invalid]:bg-sherick-danger/[0.075]\",\n invalidHover: \"data-[invalid]:hover:bg-sherick-danger/[0.10]\",\n invalidEngaged: \"data-[invalid]:bg-sherick-danger/[0.13]\",\n invalidFocusWithin: \"[&&]:data-[invalid]:focus-within:bg-sherick-danger/[0.13]\",\n },\n} as const;\n\n/* State layers.\n A layer is `relative` itself, because its overlay is absolutely positioned inside the control.\n A component that positions the control — an absolutely placed close or submit control — writes\n that position *after* the layer in its class list: `tailwind-merge` keeps the last class in a\n conflicting group, so a position written before the layer is silently replaced by the layer's\n own.\n Replacing `background-color` on hover erases whatever fill a control owns: an\n opaque fill collapses to a bare tint and a tinted fill loses most of its step.\n This overlay instead composites over the fill, tinted with `currentColor` — the\n container's own on-color, which is also the color furthest from that fill, and\n the same color as the label, so the glyphs themselves are unaffected. Opacity\n carries the state, so it fades on the shared motion curve instead of snapping,\n and it takes the press timing while the control is held.\n One step per fill strength: a quiet surface tints lightly, an opaque accent fill\n takes the heaviest step.\n Both interactive steps are gated on the primitive's own disabled markers, so an effectively\n disabled control neither tints nor presses — whether it was disabled by a prop, by its group or\n by the field around it. `:disabled` alone cannot gate a press: a row in a collection is a\n `div`, so `:active` matches it while the pointer is down on it and the marker is the only gate\n there is. */\nconst stateLayerBase = /* @__PURE__ */ cx(\n \"before:pointer-events-none before:absolute before:inset-0 before:content-[''] before:opacity-0\",\n motionStateLayer\n);\n\n/* A part answers the pointer only while it is interactive. A native control carries `disabled`, and\n a collection primitive marks its rows with `data-disabled` instead. One rule covers both, in the\n same shape for hover and for press, and the group form is that rule for a part whose pointer\n arrives from the wrapping control.\n\n Each step is written out as a whole class name rather than assembled from a variant fragment and\n a suffix, because the stylesheet compiler reads class names as literal text: a name that only\n exists once the recipe is evaluated compiles to no rule at all, and the step silently disappears.\n Interpolating one of these consts is safe — the name is still written here in full. */\nconst hoverQuiet = \"[&:not([data-disabled]):not(:disabled)]:hover:before:opacity-[0.05]\";\nconst hoverTonal = \"[&:not([data-disabled]):not(:disabled)]:hover:before:opacity-[0.09]\";\nconst hoverFilled = \"[&:not([data-disabled]):not(:disabled)]:hover:before:opacity-[0.18]\";\nconst hoverTrack = \"group-[:not([data-disabled]):not(:disabled)]:hover:before:opacity-[0.18]\";\nconst pressQuiet = \"[&:not([data-disabled]):not(:disabled)]:active:before:opacity-[0.09]\";\nconst pressTonal = \"[&:not([data-disabled]):not(:disabled)]:active:before:opacity-[0.15]\";\nconst pressFilled = \"[&:not([data-disabled]):not(:disabled)]:active:before:opacity-[0.26]\";\nconst pressTrack = \"group-[:not([data-disabled]):not(:disabled)]:active:before:opacity-[0.26]\";\n\nexport const stateLayer = {\n /* Quiet surfaces — ghost controls, navigation rows, menu options. */\n quiet: /* @__PURE__ */ cx(\"relative\", stateLayerBase, \"before:rounded-[inherit] before:bg-current\", hoverQuiet, pressQuiet),\n /* Tinted containers: the fill is nearly page color already, so the container's own\n on-color (`current`) carries the state at a light step. Shared by every matte\n control with a fill — tonal buttons, icon buttons, acrylic buttons. */\n tonal: /* @__PURE__ */ cx(\"relative\", stateLayerBase, \"before:rounded-[inherit] before:bg-current\", hoverTonal, pressTonal),\n /* Opaque fills: `current` is the fill's own on-color — the color furthest from it in\n either theme — so one step reads on a saturated blue and a neutral gray alike. */\n filled: /* @__PURE__ */ cx(\"relative\", stateLayerBase, \"before:rounded-[inherit] before:bg-current\", hoverFilled, pressFilled),\n /* A switch track or a selection well: the same layer, but hover and press arrive from the\n wrapping control rather than from the surface itself. */\n track: /* @__PURE__ */ cx(stateLayerBase, \"before:rounded-[inherit] before:bg-current\", hoverTrack, pressTrack),\n /* A row highlighted by keyboard or pointer navigation. Base UI collection primitives expose\n `data-highlighted`; this is the one canonical visual treatment for it, and it pairs with a\n row's own `quiet` layer — the row carries both, so a highlighted row and a hovered row are the\n same tone at the same strength. That strength is written twice because a class name has to be\n literal to be compiled; that the two rendered layers agree is asserted in the browser suite\n rather than left to these lines to stay in step.\n It is deliberately not gated on the disabled markers: a disabled command stays reachable by\n keyboard so it can be discovered and announced as unavailable, and a reader still has to see\n which row the navigation is on when it lands there. */\n activeRow: \"data-[highlighted]:before:opacity-[0.05]\",\n} as const;\n\n/* Hit area — the interactive region of a control whose visible mark is smaller than a comfortable\n target, drawn outside the layout box so a column, a row gap and the space beside a label are all\n measured from the control the user sees. The expansion is capped at the accessible target floor;\n CSS cannot see neighbouring geometry, so it keeps clearance only while surrounding rows are at\n least as tall as that floor — which this library's own `density.normal` rhythm is, and a 40px\n table row is not. */\nexport const hitArea =\n \"relative after:pointer-events-auto after:absolute after:inset-[min(0px,calc((100%-2.75rem)/2))] after:content-['']\";\n\n/* Material — fill only. No material carries elevation or a rim: the same matte\n fill appears flat in a card, lifted on a button and recessed in a groove.\n - canvas: the page itself.\n - matteQuiet: the quietest matte step, for dense data regions and wells that\n should sit back from the surface around them.\n - matte: a matte surface that separates from the canvas by tone alone.\n - matteHigh: the second matte step, for nesting inside another matte surface.\n - matteInset: a passive sheet tucked under a stronger control; subdued without\n blending into the canvas or needing a drawn rim.\n - control: the fill every text control shares, plus its placeholder tone.\n - handle: the fill of a small part the user has to find — a value control's handle.\n Surface steps sit within a few percent of their neighbours, so this role\n takes the mid-emphasis tone, which inverts with the theme and separates in\n both.\n - acrylic: a translucent sheet lit from above, for surfaces that float above\n the application. The gradient, fill, blur and saturation are part of\n the material. A gradient arrives as a typed image arbitrary value\n rather than through the colour scale, because `tailwind-merge`\n collapses two background utilities into one and would silently drop\n either the fill or the gradient. Each one is written out literally, so\n the class scanner never meets a half-built name. The fill stays an\n ordinary background colour, so a caller can retone a sheet without\n touching its lighting. An anchored sheet carries most of its own tone,\n because it has to stay legible over whatever it happens to sit on: a\n saturated button behind a popup must not read as the popup's own\n state. `acrylicDense` is the same sheet at higher opacity still, for\n the smallest floating surfaces — a tooltip, a floating control.\n - acrylicHero: the large-overlay sheet, for a surface that owns the viewport. It is\n markedly more opaque and calmer than the smaller sheets: it has to\n read first as a physical surface and only secondarily as glass, so the\n scrim behind it does the separating, the blur only defocuses, and the\n gradient is a restrained top-to-bottom light rather than a frosted\n haze. Its tone is a subtle step above the canvas in every theme —\n in dark mode a small step above the canvas rather than a light grey\n sheet — which is how it separates without leaning on its shadow, and\n `--sui-overlay-fill` tunes how much of the sheet is its own tone rather\n than the defocused page — a large overlay leans on that, not on blur. */\nexport const material = {\n canvas: \"bg-sherick-canvas text-sherick-ink\",\n matteQuiet: \"bg-sherick-surface/[0.42] text-sherick-ink\",\n matte: \"bg-sherick-surface/[0.78] text-sherick-ink\",\n matteHigh: \"bg-sherick-surface-high/[0.72] text-sherick-ink\",\n control: \"bg-sherick-surface-high/[0.66] text-sherick-ink placeholder:text-sherick-ink-muted\",\n /* The invalid fill carries its placeholder at the *full* danger tone, not at a fraction of it. A\n placeholder is text, so it answers to the same 4.5:1 the copy beside it does, and a partial\n opacity of an accent is a different colour from the accent: the 72%-opacity placeholder\n measured 2.8–3.0:1 light and 3.4–3.9:1 dark on this fill, while the token it was mixed from\n measures 4.1–4.7:1 light and 5.2–6.2:1 dark on it. There is no dimmer step of a semantic tone\n that is still readable, and a normal field's placeholder is `ink-muted` at full strength\n already — so the error form is the same rule, in the tone the field is in. */\n controlError: \"bg-sherick-danger/[0.075] text-sherick-ink placeholder:text-sherick-danger\",\n handle: \"bg-sherick-ink-muted text-sherick-canvas\",\n acrylic:\n \"bg-sherick-surface-float/[var(--sui-glass-fill)] bg-[image:var(--sui-glass-gradient)] text-sherick-ink backdrop-blur-[var(--sui-glass-blur)] backdrop-saturate-[var(--sui-glass-saturation)] backdrop-brightness-[var(--sui-glass-brightness)]\",\n acrylicDense:\n \"bg-sherick-surface-float/[var(--sui-glass-dense-fill)] bg-[image:var(--sui-glass-gradient-dense)] text-sherick-ink backdrop-blur-[var(--sui-glass-dense-blur)] backdrop-saturate-[var(--sui-glass-dense-saturation)] backdrop-brightness-[var(--sui-glass-dense-brightness)]\",\n acrylicHero:\n \"bg-sherick-surface-overlay/[var(--sui-overlay-fill)] bg-[image:var(--sui-glass-hero-gradient)] text-sherick-ink backdrop-blur-[var(--sui-glass-hero-blur)] backdrop-saturate-[var(--sui-glass-hero-saturation)] backdrop-brightness-[var(--sui-glass-hero-brightness)]\",\n} as const;\n/* Dark neutral behind native video, including poster loading and letterboxing. */\nexport const mediaCanvas = \"bg-sherick-media\";\n/* A passive sheet tucked below a stronger control; independently tree-shakeable. */\nexport const matteInset = \"bg-sherick-surface-high/[0.35] text-sherick-ink\";\n\n/* Density — three control steps plus the accessible hit target.\n Density owns height and the type step, so controls of one density share a\n rhythm. A component's anatomy owns its padding: a button's inline padding is\n set by how it is gripped, a field's by how much text it holds, and neither is\n derived from the other. The library targets dense desktop and product UI, so\n even the prominent step stays compact. Body copy, headings and labels are\n content, not controls, and set their own type. */\nexport const density = {\n compact: \"min-h-10 text-sm\",\n normal: \"min-h-12 text-[0.95rem]\",\n prominent: \"min-h-14 text-lg\",\n /* Minimum interactive target for an icon-only control that stands on its own. */\n target: \"min-h-11 min-w-11\",\n /* A control that is one part of a composite field — the trailing controls a Combobox owns. It\n keeps the floor's height, because it has to sit in the field's row, and takes only the width\n its glyph needs: the two of them are gripped as one cluster at the field's edge, and two full\n squares there read as two controls beside a field rather than as parts of it.\n The narrower step still clears the 24px pointer-target minimum WCAG AA asks for. It is below\n this system's own 44px floor on purpose: that floor belongs to a control that is the whole\n target of its own action, and this one is a part of a field the pointer is already in. */\n part: \"min-h-11 min-w-9\",\n} as const;\n\n/* Stacking level — where anything that floats sits relative to the application.\n\n One interaction level, deliberately. Base UI nests a popup's portal *inside* the portal of the surface it\n was opened from, and appends it last, so document order already says which floating surface is\n on top: the innermost — the one opened last — wins. A scale that ranked surfaces by kind would\n fight that, and it cannot be right: a popup opened from inside a dialog is the innermost\n surface there is, yet a ranking puts the dialog above it and the popup renders behind the modal\n that owns it. Sharing one level lets the nesting Base already built decide, at any depth.\n\n The level's job is to clear the application's own content, not to rank Sherick surfaces against\n each other. */\nexport const stacking = {\n float: \"z-50\",\n /* A persistent app notification portal predates the modal it reports on. */\n notification: \"z-[60]\",\n} as const;\n\n/* Floating overlay shells.\n Base UI owns popup presence, focus, dismissal, portals and anchored positioning.\n Sherick UI owns only the visual shell: material, elevation and shape. Where the entrance\n grows from and how it moves on the way are the presence recipes' in `ui.motion.ts`, so a\n surface's shell never depends on the primitive's open state. `scrim` is the plane\n *behind* a surface that owns the viewport, so it is a fill and a blur with no elevation\n or shape of its own. It is shared rather than written per component so a dialog and an\n alert dialog separate from the page identically. */\nexport const overlay = {\n /* The plane behind a surface that owns the viewport. */\n scrim: /* @__PURE__ */ cx(\"fixed inset-0\", stacking.float, \"bg-sherick-scrim/[0.38] backdrop-blur-[var(--sui-scrim-blur)]\"),\n /* An anchored surface with room to breathe: a selection list (Select, Combobox) or\n structured content (Popover). It grows out of its trigger and carries the softer\n surface corner, because what it holds is read rather than scanned.\n When not to use it: a short list of commands wants `menu`, and a hint wants\n `tooltip`. */\n popup: /* @__PURE__ */ cx(shape.surface, material.acrylic, elevation.floating),\n /* A compact list of commands. The same sheet, the same presence and the same lighting as\n `popup`, tightened in shape so a handful of short actions reads as a list rather than a\n page: a command list should feel like one more control on the surface it came from.\n When not to use it: a list of options that are chosen rather than performed, or a\n surface holding structured content, wants `popup`. */\n menu: /* @__PURE__ */ cx(shape.control, material.acrylic, elevation.floating),\n /* A short hint is a compact sheet, not a capsule button. */\n tooltip: /* @__PURE__ */ cx(shape.row, material.acrylicDense, elevation.floating),\n /* A toast is a floating status surface that arrives on its own and leaves on its own. It\n holds a line or two of copy rather than being read as a page, so it takes the compact\n floating corner rather than the wide sheet a popup is.\n When not to use it: a hint attached to a control wants `tooltip`, and anything the user\n opened themselves wants `popup`. */\n toast: /* @__PURE__ */ cx(shape.prominent, material.acrylic, elevation.floating),\n /* A dialog rises further than a menu. It is anchored to the viewport rather than to a trigger,\n so it has no side to grow from and takes the modal presence instead of the anchored one.\n Its corner is the most generous in the library, because a surface that floats free of every\n edge has nothing to line up with. */\n dialog: /* @__PURE__ */ cx(shape.expressive, material.acrylicHero, elevation.floating),\n /* A sheet is the same viewport-owning surface as a dialog, attached to one edge of the\n viewport. Its exposed corners take `shape.sheet` — one step below a compact floating\n surface rather than above it — because a surface that meets an edge is read as an extension\n of the page, and its attached edge is squared by the component's own anatomy. Which corners\n those are is decided by the edge; the radius the other two keep is still `shape`'s.\n When not to use it: a surface with no edge to attach to wants `dialog`. */\n sheet: /* @__PURE__ */ cx(shape.sheet, material.acrylicHero, elevation.floating),\n} as const;\n\n/* Text hierarchy — two roles, because only two can carry readable text. High emphasis carries\n labels and values, medium emphasis carries supporting copy, descriptions and placeholders. Both\n clear 4.5:1 on every surface the library composites over, in both themes.\n \n There is deliberately no third text step. A third step would have to sit between `medium` and\n the dimmest tone a surface allows, and at these surfaces the value that clears 4.5:1 collapses\n into `ink-muted` — a step that measures the same as the one above it is not a hierarchy, it is a\n role pretending to be one. The dimmest tone is a *non-text* role instead (see `detail` below). */\nexport const text = {\n high: \"text-sherick-ink\",\n medium: \"text-sherick-ink-muted\",\n} as const;\n\n/* Detail — the non-text furniture tone: a gutter, a rail, a mark's frame, secondary graphical\n detail that carries meaning without being read. It answers to the 3:1 non-text requirement on\n every surface it is permitted on, and it is never a foreground for text: a hint, a placeholder,\n a line number or any other readable step uses `text.medium`. */\nexport const detail = {\n /** A mark's own frame, or a rail drawn as a line. */\n mark: \"border-sherick-detail\",\n /** The same tone as a block, for a gutter or a rail with thickness. */\n fill: \"bg-sherick-detail\",\n} as const;\n\n/* A list surface — the sheet a collection of rows sits in, and the two row densities it can\n hold. Select, Combobox and Menu all compose these, so an option and a command are the same\n object at two densities instead of three independent designs.\n\n The sheet never exceeds what the viewport leaves it, and scrolls inside itself rather than\n growing. Its width is the list's own decision: a control's list is never narrower than the\n control it came from and grows to fit its own content until the viewport clamp, and a command\n list only ever grows to its content. Unselected rows and commands stay flat; held options\n compose `tone.selected` with `elevation.control`. One row step of `stateLayer.quiet` plus\n `stateLayer.activeRow` carries both its hover and\n its keyboard highlight, so an option and a command are highlighted by the same tone at the\n same strength. Keyboard focus adds the shared inset ring independently of that highlight.\n Selection is a tint of the sheet through `tone.selected` and never the opaque\n accent, which belongs to the one primary action in the view rather than to a row that happens\n to be chosen.\n A row that cannot be used takes no hover and no press, and its tone step says so on its own —\n but it keeps the navigation highlight. A disabled option or command stays reachable by\n keyboard so it can be discovered and announced as unavailable, and a reader still has to see\n which row the navigation is on when it arrives there. Disabled means \"cannot be chosen or\n performed\", never \"cannot be found\". */\nexport const list = {\n sheet: \"max-w-[var(--available-width)] max-h-[var(--available-height)] overflow-y-auto\",\n /* A row in a selection list: one line, read one at a time and chosen.\n The row carries two separate things that both have to be visible. Its *navigation highlight*\n is the state layer — one tone shared with the pointer, because a row under the pointer and a\n row under the arrow keys are the same thing happening. Its *focus treatment* is the shared\n inset ring, and it is gated on `:focus-visible`, which is what separates the two cases: Base\n gives the active row real DOM focus, and the platform reports that focus as visible when the\n keyboard put it there and not when a pointer did. So a pointer that opens a list and moves\n over a row gets the highlight and no ring, a keyboard that opens one and steps down it gets\n both, a selected row keeps its selection tint under the ring, and a disabled-but-navigable\n row still shows where the navigation is while saying it cannot be used. The ring is inset\n because the row lives inside the sheet it belongs to, as a segment does in its track. */\n option: /* @__PURE__ */ cx(\n \"flex w-full items-center justify-between gap-4 px-4 py-3 text-start text-sm outline-none\",\n shape.control,\n motionFeedback,\n focusRingInset,\n text.high,\n stateLayer.quiet,\n stateLayer.activeRow,\n state.effectiveDisabled\n ),\n /* The same object at the density a list of short actions wants, where the row is scanned\n rather than read and the list is a control rather than a page. `shape.row` keeps the\n command's corner proportional to its own height, so its highlight nests in the tighter\n sheet the menu is. */\n command: /* @__PURE__ */ cx(\n \"flex w-full items-center gap-3 px-3 py-2 text-start text-sm outline-none\",\n shape.row,\n motionFeedback,\n focusRingInset,\n text.high,\n stateLayer.quiet,\n stateLayer.activeRow,\n state.effectiveDisabled\n ),\n} as const;\n\n/* A disclosure — one row that opens the region beneath it. An item in an `Accordion` and a\n standalone `Collapsible` are the same object: a stacked row, and the in-flow panel its\n primitive measures. They share this recipe so the two cannot drift into two designs, and the\n height itself is the primitive's — it arrives as `--sui-disclose-height`, which each\n component maps its own primitive's panel variable onto, because the measured geometry is\n anatomy and only the interpolation is temporal. */\nexport const disclosure = {\n /* The row: a full-width row in a stacked group, activated like a selectable row. Its own focus\n indicator is the shared inset ring, because an offset one drawn outside the row would land on\n the divider or the panel beside it rather than around the row it belongs to — which is the same\n reason a segment inside a track takes the inset form. The chevron the component puts in the\n row is the disclosure's own affordance and turns in place under `motionOrient`. */\n trigger: /* @__PURE__ */ cx(\n \"group [overflow-wrap:anywhere]\",\n list.option,\n state.enabled\n ),\n panel: /* @__PURE__ */ cx(\"h-[var(--sui-disclose-height)] overflow-hidden text-sm leading-7 [overflow-wrap:anywhere]\", text.medium, motionDisclose),\n} as const;\n\n/* Tone hierarchy — the color roles a surface can take, in rising strength:\n text foreground only, for quiet rows and links.\n soft a de-emphasised tinted surface: alerts, badges, quiet cards.\n tonal a matte control fill at rest: tonal buttons, icon buttons.\n selected the fill a selected control holds: menu options, navigation, the\n selected segment of a segmented control.\n strong the opaque accent fill that marks priority.\n A fill step is composited over whatever sits beneath it, so one tone reads\n correctly on the canvas, inside a card and on an acrylic sheet. */\nexport const tone = {\n text: {\n primary: \"text-sherick-primary\",\n secondary: \"text-sherick-ink\",\n danger: \"text-sherick-danger\",\n warning: \"text-sherick-warning\",\n success: \"text-sherick-success\",\n },\n soft: {\n primary: \"bg-sherick-primary/[0.12] text-sherick-primary\",\n secondary: \"bg-sherick-surface/[0.78] text-sherick-ink\",\n danger: \"bg-sherick-danger/[0.09] text-sherick-danger\",\n warning: \"bg-sherick-warning/[0.09] text-sherick-warning\",\n success: \"bg-sherick-success/[0.09] text-sherick-success\",\n },\n tonal: {\n primary: \"bg-sherick-primary/[0.12]\",\n secondary: \"bg-sherick-surface-high/[0.56]\",\n danger: \"bg-sherick-danger/[0.09]\",\n warning: \"bg-sherick-warning/[0.09]\",\n success: \"bg-sherick-success/[0.09]\",\n },\n selected: {\n primary: \"bg-sherick-primary/[0.22] text-sherick-ink\",\n secondary: \"bg-sherick-surface-high/[0.82] text-sherick-ink\",\n danger: \"bg-sherick-danger/[0.16] text-sherick-ink\",\n warning: \"bg-sherick-warning/[0.16] text-sherick-ink\",\n success: \"bg-sherick-success/[0.16] text-sherick-ink\",\n },\n strong: {\n primary: \"bg-sherick-primary-strong text-sherick-on-primary\",\n secondary: \"bg-sherick-surface-high text-sherick-ink\",\n danger: \"bg-sherick-danger text-sherick-on-danger\",\n warning: \"bg-sherick-warning text-sherick-on-warning\",\n success: \"bg-sherick-success text-sherick-on-success\",\n },\n /* The strong fills again, keyed on the primitive's own selection marker rather than on a\n Sherick prop. A control that holds its selection in the primitive — an uncontrolled\n `Switch` — has to take its fill from the same source of truth as a controlled one, and a\n keyed fill has to be written out literally to be compiled, so it is a role here rather\n than a conditional at the call site. */\n strongChecked: {\n primary: \"group-data-[checked]:bg-sherick-primary-strong group-data-[checked]:text-sherick-on-primary\",\n secondary: \"group-data-[checked]:bg-sherick-surface-high group-data-[checked]:text-sherick-ink\",\n danger: \"group-data-[checked]:bg-sherick-danger group-data-[checked]:text-sherick-on-danger\",\n warning: \"group-data-[checked]:bg-sherick-warning group-data-[checked]:text-sherick-on-warning\",\n success: \"group-data-[checked]:bg-sherick-success group-data-[checked]:text-sherick-on-success\",\n },\n} satisfies Record<string, Record<Variant, string>>;\n\n/* Selectable surface — the recessed surface of a control that fills once it is selected: a\n switch track, a checkbox box, a radio circle, a slider groove. Selection is keyed on the\n primitive's own `data-checked` / `data-indeterminate`, so an uncontrolled control is styled\n from the same source of truth as a controlled one. A mixed box is selected but is not\n ticked, which is why the second attribute stands beside the first. */\nexport const selectable = {\n surface: /* @__PURE__ */ cx(\"relative\", elevation.recessed, motionFeedback),\n /* The same object one rung deeper, for a mark whose identity is its depth. */\n markSurface: /* @__PURE__ */ cx(\"relative\", elevation.well, motionFeedback),\n /* The resting fill a *groove* holds — a segmented control's track, a tab list — and nothing more.\n A groove that holds labelled segments is identified by those segments, exactly as a tab list is\n identified by its labels, so it takes no boundary of its own. */\n rest: /* @__PURE__ */ cx(material.matteHigh, text.medium),\n /* An *empty mark* — an unchecked box, an unselected radio — is the one thing in the family with\n no content at all: nothing inside it says what it is. It takes the fill a `Switch`'s track takes,\n so the interior is a surface rather than a hole, but that *cannot* be what identifies it: the\n tightest neutral step this palette has measures about 1.3:1 against the surface around it, where\n WCAG asks 3:1.\n So the mark is **sunk deeper** instead — `markSurface` — and its depth is what identifies it:\n one wall deepened a rung further than `recessed` draws it (the shaded wall above in light mode,\n the lit wall below in dark mode), which is the same light the whole system is built from. See\n the elevation recipes in `tokens.ts`, and §5 of the design language. No rim: a stroke tracing\n all four sides of a matte control is not part of this language, and the mark now reads as the\n switch's own well does, only deeper. */\n mark: /* @__PURE__ */ cx(\"bg-sherick-surface-high\", text.medium),\n /* A filled mark is identified by its own fill. */\n selected:\n \"group-data-[checked]:bg-sherick-primary-strong group-data-[checked]:text-sherick-on-primary\",\n indeterminate:\n \"group-data-[indeterminate]:bg-sherick-primary-strong group-data-[indeterminate]:text-sherick-on-primary\",\n} as const;\n\n/* The authored alphas the contrast contract measures. They are derived from the class names above\n rather than restated, so a change to a state step, a tint strength or the field ladder moves the\n measurement with it: `scripts/smoke-package.mjs` passes this model to\n `scripts/contrast-contract.mjs`, and the same module proves every class here has a rule in the\n published stylesheet. */\nconst recipeAlpha = (recipe: string, pattern: RegExp, label: string) => {\n const match = recipe.match(pattern);\n if (!match) throw new Error(`recipe alpha missing for ${label}`);\n return Number(match[1]);\n};\nconst stateAlpha = (recipe: string, label: string) =>\n recipeAlpha(recipe, /opacity-\\[(0?\\.\\d+)\\]/, label);\nconst fillAlpha = (recipe: string, label: string) => recipeAlpha(recipe, /\\/\\[(0?\\.\\d+)\\]/, label);\n\nexport const recipeAlphas = {\n state: {\n quiet: { hover: stateAlpha(hoverQuiet, \"state.quiet.hover\"), press: stateAlpha(pressQuiet, \"state.quiet.press\") },\n tonal: { hover: stateAlpha(hoverTonal, \"state.tonal.hover\"), press: stateAlpha(pressTonal, \"state.tonal.press\") },\n filled: { hover: stateAlpha(hoverFilled, \"state.filled.hover\"), press: stateAlpha(pressFilled, \"state.filled.press\") },\n },\n tint: {\n soft: {\n primary: fillAlpha(tone.soft.primary, \"tint.soft.primary\"),\n danger: fillAlpha(tone.soft.danger, \"tint.soft.danger\"),\n warning: fillAlpha(tone.soft.warning, \"tint.soft.warning\"),\n success: fillAlpha(tone.soft.success, \"tint.soft.success\"),\n },\n selected: {\n primary: fillAlpha(tone.selected.primary, \"tint.selected.primary\"),\n danger: fillAlpha(tone.selected.danger, \"tint.selected.danger\"),\n warning: fillAlpha(tone.selected.warning, \"tint.selected.warning\"),\n success: fillAlpha(tone.selected.success, \"tint.selected.success\"),\n },\n neutralRest: fillAlpha(tone.tonal.secondary, \"tint.neutralRest\"),\n },\n field: {\n quiet: fillAlpha(material.matteQuiet, \"field.quiet\"),\n card: fillAlpha(material.matte, \"field.card\"),\n control: fillAlpha(material.control, \"field.control\"),\n hover: fillAlpha(state.field.hover, \"field.hover\"),\n engaged: fillAlpha(state.field.engaged, \"field.engaged\"),\n invalid: fillAlpha(state.field.invalid, \"field.invalid\"),\n invalidHover: fillAlpha(state.field.invalidHover, \"field.invalidHover\"),\n invalidFocus: fillAlpha(state.field.invalidFocusWithin, \"field.invalidFocus\"),\n },\n} as const;\n\n/* A labelled field is a shrinkable column. Its explanatory copy wraps, including identifiers;\n the input itself keeps its native single-line scrolling behavior. */\nexport const fieldLayout = \"flex min-w-0 w-full flex-col [overflow-wrap:anywhere]\";"],"names":[],"mappings":";;;AAIA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8CyB;AAEzB;;;;;;;;;;;;;;;AAe0E;AACnE,MAAM,SAAS,GACpB;AAEK,MAAM,cAAc,GACzB;AAEF;AACO,MAAM,oBAAoB,GAC/B;AAEF;;;;AAIuE;AAChE,MAAM,aAAa,GACxB;AAEF;;;;;AAK8D;AACvD,MAAM,eAAe,GAC1B;AAEF;AACO,MAAM,aAAa,GACxB;AAEK,MAAM,cAAc,GACzB;AAEF;;;;AAI8B;AAE9B;;;;;;;;;;;;;AAaiF;AAC1E,MAAM,SAAS,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AkB,EAAE,oBAAoB,CAAC;AAC9E,KAAA;;AAGH;AACuE;AAChE,MAAM,WAAW,GAAG;;"}
@@ -86,9 +86,9 @@ const motionRelocate = "transition-[left,inset-inline-start,top,width,height,tra
86
86
  * transition list and only tone and engagement geometry remain; a keyboard or programmatic
87
87
  * step still settles. Reduced motion never changes direct manipulation. */
88
88
  const motionDirect = "transition-[inset-inline-start,width,height,background-color,color,box-shadow,transform,opacity] duration-release ease-release active:duration-press active:ease-press data-[dragging]:transition-[background-color,color,box-shadow,transform,opacity] motion-reduce:transition-none motion-reduce:transform-none";
89
- /* Presence is split by role: an anchored popup, a tooltip, a modal surface and the plane
90
- behind it. All four describe the same three states — settled, `data-starting-style` and
91
- `data-ending-style` — and let the primitive decide when the node mounts and unmounts.
89
+ /* Anchored popup, tooltip, modal, sheet, toast and scrim presence share three states:
90
+ settled, `data-starting-style` and `data-ending-style`. The primitive decides
91
+ when the node mounts and unmounts.
92
92
  None of them writes an animation keyframe or a timer, so a rapid open → close → open
93
93
  retargets from the current painted value instead of restarting.
94
94
 
@@ -1 +1 @@
1
- {"version":3,"file":"ui.motion.js","sources":["../../../src/components/ui.motion.ts"],"sourcesContent":["/* Sherick UI motion grammar\n =========================\n Components describe what changes; this module exclusively describes how change moves.\n\n The canonical intents are:\n - feedback: non-spatial state response;\n - tactile: temporary physical response to activation;\n - arrive: a meaningful subordinate part appears or leaves;\n - orient: a persistent part changes orientation in place;\n - relocate: a persistent part moves or resizes between stable states;\n - direct: geometry continuously follows the user;\n - disclose: in-flow content expands and collapses;\n - presence: an independent surface enters/leaves;\n - activity: continuous motion that communicates ongoing work.\n\n Every recipe here owns the transition property, the duration, the curve and the\n `prefers-reduced-motion` behavior for one physical event. The durations and curves\n themselves are the authored tokens in `src/styles/tokens.ts`; nothing in this file\n writes a literal duration or an animation keyframe beyond the two activity loops.\n\n `docs/DESIGN_LANGUAGE.md` owns the semantics. Target geometry, material, tone and\n elevation remain component/anatomy concerns: a component says where something ends\n up, and this module says how it gets there. */\n\n/* A recipe that is composed from other recipes is built through `cx`, whose call is marked pure.\n That is load-bearing for the published bundles rather than a bundler detail: an unused recipe\n whose value is a template literal with a substitution in it is not provably side-effect-free, so\n it survives tree-shaking and every consumer that imports any part of this module pays for every\n recipe in it — including the families it never uses. See `libs/utils.ts`. */\nimport { cx } from \"@/libs/utils\";\n\nexport type MotionIntent =\n | \"feedback\"\n | \"tactile\"\n | \"arrive\"\n | \"orient\"\n | \"relocate\"\n | \"direct\"\n | \"disclose\"\n | \"presence\"\n | \"activity\";\n\n/** Non-spatial feedback: hover, focus, field tone, a highlighted row, a filled surface.\n * It never translates, scales or resizes; reduced motion simply drops the interpolation\n * and the state still arrives. */\nexport const motionFeedback =\n \"transition-[background-color,color,box-shadow,opacity] duration-press ease-press motion-reduce:transition-none\";\n\n/** A control answers a press immediately and settles on its release.\n *\n * The recipe owns the *amplitude* of that answer as well as its timing, because how far a\n * press travels is the system's physical character rather than a component's anatomy: a\n * control whose outline is what the user sees compresses 4%, which is about two pixels at the\n * size of the ink it moves. A control whose visible ink is far smaller than the target it is\n * aimed at takes `motionInkPress` on that ink instead, so the target itself never moves. The\n * interpolation and the compression are neutralised together under reduced motion. */\n/* Base may disable the surface itself or the value control inside a Select wrapper.\n Neither is a pressable surface. Timing and amplitude are otherwise unchanged. */\nexport const motionTactile =\n \"transition-[background-color,color,box-shadow,transform,opacity] duration-release ease-release active:duration-press active:ease-press motion-safe:[&:not([data-disabled],:disabled,:has(>[role=combobox][data-disabled]))]:active:scale-[0.96] motion-reduce:transition-none\";\n\n/** The spatial half of a compact press, applied to the *mark* rather than to the control.\n *\n * A control whose visible ink is much smaller than the target it is aimed at — a dialog's close\n * control, a stepper, a search field's submit — is a large target around a small glyph, and only\n * the glyph is visible at rest. Compressing the whole control would shrink the ground the pointer\n * is already on (a 44px target becomes 38.7px while held, which is exactly where a near-edge\n * release lands), so the mark takes the twelve percent and the target keeps its geometry. The\n * target still owns the focus ring and the state layer, and still carries the tone and depth\n * response, so the boundary a press happens inside never moves. */\nexport const motionInkPress =\n \"transition-transform duration-release ease-release group-active:duration-press group-active:ease-press group-active:scale-[0.88] motion-reduce:transition-none motion-reduce:group-active:scale-100\";\n\n/* Motion is not owned here — but the recipes above are the whole vocabulary: every press, arrival,\n travel, presence and activity in the library is one of these names plus its owner's own target\n geometry. */\n\n/* A field that opens a list — a `Select`'s trigger, an editable `Combobox`'s field — takes\n `motionTactile` as a whole, which is what makes the two forms of the same control press\n identically. The *field* is the element that carries the compression in both: a press activates\n the whole chain, so a descendant being pressed is what makes the field itself match `:active`\n (and a select trigger's own active state is suppressed by the primitive, so its field's wrapper\n is the only element left to carry it). Typing, focus and hover never match it, so the field is\n perfectly still while it is used as a text field; a press that places a caret or drags across a\n word is the same press the field already answers, and distinguishing it would take pointer\n bookkeeping inside a component for a case that reads as one interaction either way. */\n\n/** A meaningful subordinate part arrives. Spring is reserved for this intent: a mark is\n * made by overshooting the position it lands in. It leaves without the overshoot, and\n * reduced motion lands it in one step — which takes a *state-specific* override, because the\n * starting state is a higher-specificity rule than a plain `transform: none` and would otherwise\n * win under reduced motion while the transition was gone, turning a spring into an instant jump. */\nexport const motionArrive =\n \"transition-[background-color,color,box-shadow,transform,opacity] duration-release ease-spring data-[starting-style]:scale-50 data-[ending-style]:scale-50 data-[ending-style]:opacity-0 data-[ending-style]:duration-overlay-exit data-[ending-style]:ease-exit motion-reduce:transition-none motion-reduce:transform-none motion-reduce:data-[starting-style]:scale-100 motion-reduce:data-[ending-style]:scale-100\";\n\n/** A persistent affordance changes orientation in place: a disclosure chevron. It reaches\n * its target orientation consistently and never overshoots. */\nexport const motionOrient =\n \"transition-transform duration-release ease-release motion-reduce:transition-none\";\n\n/** A persistent object travels between stable destinations: a tab indicator, a switch\n * thumb. The travel itself is the event, so it takes the glide curve rather than the\n * arrival curve, and it never overshoots: a destination that is passed and come back\n * from reads as a defect. Position, size and the tone the object picks up on the way\n * settle together, and an interrupted move retargets from wherever it currently is\n * because it is a transition and not a keyframe. */\nexport const motionRelocate =\n \"transition-[left,inset-inline-start,top,width,height,transform,background-color,color,box-shadow,opacity] duration-release ease-glide motion-reduce:transition-none\";\n\n/** Direct manipulation: the pointer owns the geometry, so a positional transition would be\n * lag. While the primitive reports a drag, position and size are removed from the\n * transition list and only tone and engagement geometry remain; a keyboard or programmatic\n * step still settles. Reduced motion never changes direct manipulation. */\nexport const motionDirect =\n \"transition-[inset-inline-start,width,height,background-color,color,box-shadow,transform,opacity] duration-release ease-release active:duration-press active:ease-press data-[dragging]:transition-[background-color,color,box-shadow,transform,opacity] motion-reduce:transition-none motion-reduce:transform-none\";\n\n/* Presence is split by role: an anchored popup, a tooltip, a modal surface and the plane\n behind it. All four describe the same three states — settled, `data-starting-style` and\n `data-ending-style` — and let the primitive decide when the node mounts and unmounts.\n None of them writes an animation keyframe or a timer, so a rapid open → close → open\n retargets from the current painted value instead of restarting.\n\n The anchored roles read their entrance direction from the resolved side. Base publishes\n the side on the popup after collision handling and the origin as `--transform-origin`, so\n a surface below its trigger rises into place, one above it settles down into it, and one\n flipped by a collision animates the way it is actually placed. */\n\nconst anchoredGeometry = /* @__PURE__ */ cx(\n \"[transform-origin:var(--transform-origin)]\",\n \"[--sui-overlay-from-shift-y:-4px]\",\n \"data-[side=top]:[--sui-overlay-from-shift-y:4px]\",\n \"data-[side=left]:[--sui-overlay-from-shift-y:0px] data-[side=left]:[--sui-overlay-from-shift-x:4px]\",\n \"data-[side=right]:[--sui-overlay-from-shift-y:0px] data-[side=right]:[--sui-overlay-from-shift-x:-4px]\",\n /* The logical sides resolve against the writing direction: `inline-start` puts the popup at the\n anchor's inline-start edge, which is its physical *left* on a left-to-right page and its\n physical *right* on a right-to-left one, so the four pixels that travel toward the anchor\n change sign with the page while the physical sides above never do. The direction is read from\n the `dir` attribute — the attribute that lays the page out, and the only one a portaled\n surface can see. The primitive resolves the side from the direction *it* is told about\n (`DirectionProvider`), so a consumer whose page is right-to-left declares that direction to\n both, exactly as the workbench's RTL specimens do. */\n \"data-[side=inline-start]:[--sui-overlay-from-shift-y:0px] data-[side=inline-start]:[--sui-overlay-from-shift-x:4px]\",\n \"[[dir=rtl]_&]:data-[side=inline-start]:[--sui-overlay-from-shift-x:-4px]\",\n \"data-[side=inline-end]:[--sui-overlay-from-shift-y:0px] data-[side=inline-end]:[--sui-overlay-from-shift-x:-4px]\",\n \"[[dir=rtl]_&]:data-[side=inline-end]:[--sui-overlay-from-shift-x:4px]\",\n);\n\n/* Both ends of a presence animation start from the same state, and reduced motion drops the\n spatial half of it: presence still reads as arriving, but only through opacity. The\n transform is a literal class rather than an interpolated one, because the stylesheet\n compiler reads class names as text: a name that only exists once a template is evaluated\n compiles to no rule at all. */\nconst anchoredFrom = /* @__PURE__ */ cx(\n \"data-[starting-style]:opacity-0\",\n \"data-[starting-style]:[transform:translate(var(--sui-overlay-from-shift-x,0px),var(--sui-overlay-from-shift-y,0px))scale(var(--sui-overlay-from-scale,1))]\",\n \"data-[ending-style]:opacity-0\",\n \"data-[ending-style]:[transform:translate(var(--sui-overlay-from-shift-x,0px),var(--sui-overlay-from-shift-y,0px))scale(var(--sui-overlay-from-scale,1))]\",\n \"motion-reduce:data-[starting-style]:transform-none\",\n \"motion-reduce:data-[ending-style]:transform-none\",\n);\n\nconst modalFrom = /* @__PURE__ */ cx(\n \"data-[starting-style]:opacity-0\",\n \"data-[starting-style]:[transform:translate(0,12px)scale(0.96)]\",\n \"data-[ending-style]:opacity-0\",\n \"data-[ending-style]:[transform:translate(0,12px)scale(0.96)]\",\n \"motion-reduce:data-[starting-style]:transform-none\",\n \"motion-reduce:data-[ending-style]:transform-none\",\n);\n\n/** An anchored surface: `Select`, `Combobox`, `Menu` and `Popover`. It grows out of the edge\n * it is attached to, enters on the overlay timing, and leaves on the shorter exit.\n *\n * The grow is the motion's signature and the four pixels of travel only support it, so the\n * entrance takes the glide curve rather than the arrival curve. With a front-loaded curve the\n * opacity and the scale both jump in the first frames, which means the surface is already half\n * grown by the time it is visible at all — a pop, not a grow. The glide curve spends its whole\n * duration visible, so the eye actually sees the surface open out of its anchor. */\nexport const motionPresenceAnchored = /* @__PURE__ */ cx(\n \"transition-[opacity,transform] duration-overlay ease-glide\",\n \"data-[ending-style]:duration-overlay-exit data-[ending-style]:ease-exit\",\n \"motion-reduce:transition-[opacity]\",\n \"[--sui-overlay-from-scale:0.94]\",\n anchoredGeometry,\n anchoredFrom,\n);\n\n/** A tooltip: the same side-aware model and the same grow as an anchored popup, deliberately\n * lighter — it settles on the local timing rather than the overlay timing, and it never\n * bounces. */\nexport const motionPresenceTooltip = /* @__PURE__ */ cx(\n \"transition-[opacity,transform] duration-release ease-glide\",\n \"data-[ending-style]:duration-overlay-exit data-[ending-style]:ease-exit\",\n \"motion-reduce:transition-[opacity]\",\n \"[--sui-overlay-from-scale:0.94]\",\n anchoredGeometry,\n anchoredFrom,\n);\n\n/** A modal surface: anchored to the viewport rather than to a trigger, so it has no side\n * to grow from. A large surface never bounces; it fades, rises a little and settles, and its\n * scale stays restrained because a plane this big grows visibly even from a few percent. */\nexport const motionPresenceModal = /* @__PURE__ */ cx(\n \"transition-[opacity,transform] duration-overlay ease-glide\",\n \"data-[ending-style]:duration-overlay-exit data-[ending-style]:ease-exit\",\n \"motion-reduce:transition-[opacity]\",\n modalFrom,\n);\n\n/** The plane behind a surface that owns the viewport. Opacity only: a blur or a filter is\n * never animated, so the plane can never animate the page behind it. */\nexport const motionPresenceScrim =\n \"transition-opacity duration-overlay ease-release data-[ending-style]:duration-overlay-exit data-[ending-style]:ease-exit\";\n\n/** Continuous activity is a distinct intent, not an exception to interaction motion: it\n * reports work rather than answering an event, and it has no entrance of its own. */\nexport const motionActivitySpin = \"animate-spin motion-reduce:animate-none\";\nexport const motionActivityPulse = \"animate-pulse motion-reduce:animate-none\";\n\n/** The indeterminate half of a progress bar. A task with no known value cannot report a\n * position, so it reports *work* instead: the fill sweeps across its own track on the one loop\n * that is paced, because a loop that reports rather than answers cannot arrive. The travel is a\n * composited transform rather than a laid-out edge, and an endless loop must never sit on the\n * layout path; the direction is a value the recipe flips with the writing direction, because a\n * transform is physical and the sweep follows the page. Under reduced motion the loop stops and\n * the fill rests where it starts: a static status glyph, exactly as the spin and the pulse rest. */\nexport const motionActivityIndeterminate =\n \"animate-sherick-indeterminate [[dir=rtl]_&]:[--sui-indeterminate-direction:-1] motion-reduce:animate-none\";\n\n/** The state layer is a composited overlay, so its own opacity is the only thing that\n * moves. Shared here because four interaction states across the library ride it. */\nexport const motionStateLayer =\n \"before:transition-opacity before:duration-release before:ease-release active:before:duration-press active:before:ease-press group-active:before:duration-press group-active:before:ease-press motion-reduce:before:transition-none\";\n\n/* `disclose` is the in-flow counterpart of presence: nothing mounts or unmounts, and nothing\n leaves the page — one region changes its own height where it sits. Base measures the panel and\n publishes that height, so the geometry is the primitive's and only the interpolation is here.\n The panel states the height it opens to; this recipe owns how it gets there, and reduced\n motion applies the layout state in one step rather than travelling through it. */\nexport const motionDisclose =\n \"transition-[height] duration-release ease-release data-[starting-style]:h-0 data-[ending-style]:h-0 motion-reduce:transition-none\";\n\n/* A sheet is a surface that owns the viewport and is attached to one edge of it, so its presence is\n a slide out of that edge rather than the modal lift, and it never bounces. The component names the\n edge by setting exactly one of `--sui-sheet-from-x` / `--sui-sheet-from-y` to a full own-extent\n offset, because which edge a sheet is attached to is anatomy; how far it travels and how long it\n takes are not.\n\n The other axis is `0px`, and that default is load-bearing: a fallback of `100%` on the axis the\n component did not set would translate a side sheet on both axes at once, so a sheet attached to\n the right edge would enter from the bottom-right corner and travel diagonally instead of\n straight in. One edge means one axis. */\nexport const motionPresenceSheet = /* @__PURE__ */ cx(\n \"transition-[transform,opacity] duration-overlay ease-glide\",\n \"data-[ending-style]:duration-overlay-exit data-[ending-style]:ease-exit\",\n \"motion-reduce:transition-[opacity]\",\n \"data-[starting-style]:opacity-0\",\n \"data-[ending-style]:opacity-0\",\n \"data-[starting-style]:[transform:translate(var(--sui-sheet-from-x,0px),var(--sui-sheet-from-y,0px))]\",\n \"data-[ending-style]:[transform:translate(var(--sui-sheet-from-x,0px),var(--sui-sheet-from-y,0px))]\",\n \"motion-reduce:data-[starting-style]:transform-none\",\n \"motion-reduce:data-[ending-style]:transform-none\",\n);\n\n/* A toast is a stack, not a single surface: several independent surfaces share one corner,\n re-flow when one of them leaves, and can each be flung away by the pointer. That is one\n spatial owner on one node, and this is it.\n\n The component owns where a toast rests — its stacked offset, its clamped height and the\n expanded fan are geometry — and sets `--sui-toast-from-y` to the direction the stack grows in.\n This recipe owns the entrance, the exit, the stack's re-flow, and the gesture: while\n `data-swiping` is set the node follows the pointer with no interpolation at all, and a\n dismissal carries the movement it was flung with so the toast keeps travelling the way it was\n already going instead of turning around. */\nexport const motionPresenceToast = /* @__PURE__ */ cx(\n \"transition-[transform,opacity,height] duration-overlay ease-glide\",\n \"data-[ending-style]:duration-overlay-exit data-[ending-style]:ease-exit\",\n \"data-[swiping]:transition-none\",\n \"motion-reduce:transition-[opacity]\",\n \"data-[starting-style]:opacity-0\",\n \"data-[ending-style]:opacity-0\",\n \"data-[starting-style]:[transform:translateY(var(--sui-toast-from-y,150%))]\",\n \"[&[data-ending-style]:not([data-swipe-direction])]:[transform:translateY(var(--sui-toast-from-y,150%))]\",\n \"data-[ending-style]:data-[swipe-direction=down]:[transform:translateY(calc(var(--toast-swipe-movement-y,0px)+150%))]\",\n \"data-[ending-style]:data-[swipe-direction=up]:[transform:translateY(calc(var(--toast-swipe-movement-y,0px)-150%))]\",\n \"data-[ending-style]:data-[swipe-direction=left]:[transform:translateX(calc(var(--toast-swipe-movement-x,0px)-150%))]\",\n \"data-[ending-style]:data-[swipe-direction=right]:[transform:translateX(calc(var(--toast-swipe-movement-x,0px)+150%))]\",\n \"motion-reduce:data-[starting-style]:transform-none\",\n \"motion-reduce:data-[ending-style]:transform-none\",\n);\n"],"names":[],"mappings":";;AAAA;;;;;;;;;;;;;;;;;;;;;;AAsBiD;AAEjD;;;;AAI+E;AAc/E;;AAEmC;AAC5B,M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AAM,kBAAkB,GAAG;AAC3B,MAAM,mBAAmB,GAAG;AAEnC;;;;;;AAMqG;AAC9F,MAAM,2BAA2B,GACtC;AAEF;AACqF;AAC9E,MAAM,gBAAgB,GAC3B;AAEF;;;;AAIoF;AAC7E,MAAM,cAAc,GACzB;AAEF;;;;;;;;;AAS2C;AACpC,MAAM,mBAAmB,mBAAmB,EAAE,CACnD,4DAA4D,EAC5D,yEAAyE,EACzE,oCAAoC,EACpC,iCAAiC,EACjC,+BAA+B,EAC/B,sGAAsG,EACtG,oGAAoG,EACpG,oDAAoD,EACpD,kDAAkD;AAGpD;;;;;;;;;AAS8C;AACvC,MAAM,mBAAmB,mBAAmB,EAAE,CACnD,mEAAmE,EACnE,yEAAyE,EACzE,gCAAgC,EAChC,oCAAoC,EACpC,iCAAiC,EACjC,+BAA+B,EAC/B,4EAA4E,EAC5E,yGAAyG,EACzG,sHAAsH,EACtH,oHAAoH,EACpH,sHAAsH,EACtH,uHAAuH,EACvH,oDAAoD,EACpD,kDAAkD;;"}
1
+ {"version":3,"file":"ui.motion.js","sources":["../../../src/components/ui.motion.ts"],"sourcesContent":["/* Sherick UI motion grammar\n =========================\n Components describe what changes; this module exclusively describes how change moves.\n\n The canonical intents are:\n - feedback: non-spatial state response;\n - tactile: temporary physical response to activation;\n - arrive: a meaningful subordinate part appears or leaves;\n - orient: a persistent part changes orientation in place;\n - relocate: a persistent part moves or resizes between stable states;\n - direct: geometry continuously follows the user;\n - disclose: in-flow content expands and collapses;\n - presence: an independent surface enters/leaves;\n - activity: continuous motion that communicates ongoing work.\n\n Every recipe here owns the transition property, the duration, the curve and the\n `prefers-reduced-motion` behavior for one physical event. The durations and curves\n themselves are the authored tokens in `src/styles/tokens.ts`; nothing in this file\n writes a literal duration or an animation keyframe beyond the two activity loops.\n\n `docs/DESIGN_LANGUAGE.md` owns the semantics. Target geometry, material, tone and\n elevation remain component/anatomy concerns: a component says where something ends\n up, and this module says how it gets there. */\n\n/* A recipe that is composed from other recipes is built through `cx`, whose call is marked pure.\n That is load-bearing for the published bundles rather than a bundler detail: an unused recipe\n whose value is a template literal with a substitution in it is not provably side-effect-free, so\n it survives tree-shaking and every consumer that imports any part of this module pays for every\n recipe in it — including the families it never uses. See `libs/utils.ts`. */\nimport { cx } from \"@/libs/utils\";\n\nexport type MotionIntent =\n | \"feedback\"\n | \"tactile\"\n | \"arrive\"\n | \"orient\"\n | \"relocate\"\n | \"direct\"\n | \"disclose\"\n | \"presence\"\n | \"activity\";\n\n/** Non-spatial feedback: hover, focus, field tone, a highlighted row, a filled surface.\n * It never translates, scales or resizes; reduced motion simply drops the interpolation\n * and the state still arrives. */\nexport const motionFeedback =\n \"transition-[background-color,color,box-shadow,opacity] duration-press ease-press motion-reduce:transition-none\";\n\n/** A control answers a press immediately and settles on its release.\n *\n * The recipe owns the *amplitude* of that answer as well as its timing, because how far a\n * press travels is the system's physical character rather than a component's anatomy: a\n * control whose outline is what the user sees compresses 4%, which is about two pixels at the\n * size of the ink it moves. A control whose visible ink is far smaller than the target it is\n * aimed at takes `motionInkPress` on that ink instead, so the target itself never moves. The\n * interpolation and the compression are neutralised together under reduced motion. */\n/* Base may disable the surface itself or the value control inside a Select wrapper.\n Neither is a pressable surface. Timing and amplitude are otherwise unchanged. */\nexport const motionTactile =\n \"transition-[background-color,color,box-shadow,transform,opacity] duration-release ease-release active:duration-press active:ease-press motion-safe:[&:not([data-disabled],:disabled,:has(>[role=combobox][data-disabled]))]:active:scale-[0.96] motion-reduce:transition-none\";\n\n/** The spatial half of a compact press, applied to the *mark* rather than to the control.\n *\n * A control whose visible ink is much smaller than the target it is aimed at — a dialog's close\n * control, a stepper, a search field's submit — is a large target around a small glyph, and only\n * the glyph is visible at rest. Compressing the whole control would shrink the ground the pointer\n * is already on (a 44px target becomes 38.7px while held, which is exactly where a near-edge\n * release lands), so the mark takes the twelve percent and the target keeps its geometry. The\n * target still owns the focus ring and the state layer, and still carries the tone and depth\n * response, so the boundary a press happens inside never moves. */\nexport const motionInkPress =\n \"transition-transform duration-release ease-release group-active:duration-press group-active:ease-press group-active:scale-[0.88] motion-reduce:transition-none motion-reduce:group-active:scale-100\";\n\n/* Motion is not owned here — but the recipes above are the whole vocabulary: every press, arrival,\n travel, presence and activity in the library is one of these names plus its owner's own target\n geometry. */\n\n/* A field that opens a list — a `Select`'s trigger, an editable `Combobox`'s field — takes\n `motionTactile` as a whole, which is what makes the two forms of the same control press\n identically. The *field* is the element that carries the compression in both: a press activates\n the whole chain, so a descendant being pressed is what makes the field itself match `:active`\n (and a select trigger's own active state is suppressed by the primitive, so its field's wrapper\n is the only element left to carry it). Typing, focus and hover never match it, so the field is\n perfectly still while it is used as a text field; a press that places a caret or drags across a\n word is the same press the field already answers, and distinguishing it would take pointer\n bookkeeping inside a component for a case that reads as one interaction either way. */\n\n/** A meaningful subordinate part arrives. Spring is reserved for this intent: a mark is\n * made by overshooting the position it lands in. It leaves without the overshoot, and\n * reduced motion lands it in one step — which takes a *state-specific* override, because the\n * starting state is a higher-specificity rule than a plain `transform: none` and would otherwise\n * win under reduced motion while the transition was gone, turning a spring into an instant jump. */\nexport const motionArrive =\n \"transition-[background-color,color,box-shadow,transform,opacity] duration-release ease-spring data-[starting-style]:scale-50 data-[ending-style]:scale-50 data-[ending-style]:opacity-0 data-[ending-style]:duration-overlay-exit data-[ending-style]:ease-exit motion-reduce:transition-none motion-reduce:transform-none motion-reduce:data-[starting-style]:scale-100 motion-reduce:data-[ending-style]:scale-100\";\n\n/** A persistent affordance changes orientation in place: a disclosure chevron. It reaches\n * its target orientation consistently and never overshoots. */\nexport const motionOrient =\n \"transition-transform duration-release ease-release motion-reduce:transition-none\";\n\n/** A persistent object travels between stable destinations: a tab indicator, a switch\n * thumb. The travel itself is the event, so it takes the glide curve rather than the\n * arrival curve, and it never overshoots: a destination that is passed and come back\n * from reads as a defect. Position, size and the tone the object picks up on the way\n * settle together, and an interrupted move retargets from wherever it currently is\n * because it is a transition and not a keyframe. */\nexport const motionRelocate =\n \"transition-[left,inset-inline-start,top,width,height,transform,background-color,color,box-shadow,opacity] duration-release ease-glide motion-reduce:transition-none\";\n\n/** Direct manipulation: the pointer owns the geometry, so a positional transition would be\n * lag. While the primitive reports a drag, position and size are removed from the\n * transition list and only tone and engagement geometry remain; a keyboard or programmatic\n * step still settles. Reduced motion never changes direct manipulation. */\nexport const motionDirect =\n \"transition-[inset-inline-start,width,height,background-color,color,box-shadow,transform,opacity] duration-release ease-release active:duration-press active:ease-press data-[dragging]:transition-[background-color,color,box-shadow,transform,opacity] motion-reduce:transition-none motion-reduce:transform-none\";\n\n/* Anchored popup, tooltip, modal, sheet, toast and scrim presence share three states:\n settled, `data-starting-style` and `data-ending-style`. The primitive decides\n when the node mounts and unmounts.\n None of them writes an animation keyframe or a timer, so a rapid open → close → open\n retargets from the current painted value instead of restarting.\n\n The anchored roles read their entrance direction from the resolved side. Base publishes\n the side on the popup after collision handling and the origin as `--transform-origin`, so\n a surface below its trigger rises into place, one above it settles down into it, and one\n flipped by a collision animates the way it is actually placed. */\n\nconst anchoredGeometry = /* @__PURE__ */ cx(\n \"[transform-origin:var(--transform-origin)]\",\n \"[--sui-overlay-from-shift-y:-4px]\",\n \"data-[side=top]:[--sui-overlay-from-shift-y:4px]\",\n \"data-[side=left]:[--sui-overlay-from-shift-y:0px] data-[side=left]:[--sui-overlay-from-shift-x:4px]\",\n \"data-[side=right]:[--sui-overlay-from-shift-y:0px] data-[side=right]:[--sui-overlay-from-shift-x:-4px]\",\n /* The logical sides resolve against the writing direction: `inline-start` puts the popup at the\n anchor's inline-start edge, which is its physical *left* on a left-to-right page and its\n physical *right* on a right-to-left one, so the four pixels that travel toward the anchor\n change sign with the page while the physical sides above never do. The direction is read from\n the `dir` attribute — the attribute that lays the page out, and the only one a portaled\n surface can see. The primitive resolves the side from the direction *it* is told about\n (`DirectionProvider`), so a consumer whose page is right-to-left declares that direction to\n both, exactly as the workbench's RTL specimens do. */\n \"data-[side=inline-start]:[--sui-overlay-from-shift-y:0px] data-[side=inline-start]:[--sui-overlay-from-shift-x:4px]\",\n \"[[dir=rtl]_&]:data-[side=inline-start]:[--sui-overlay-from-shift-x:-4px]\",\n \"data-[side=inline-end]:[--sui-overlay-from-shift-y:0px] data-[side=inline-end]:[--sui-overlay-from-shift-x:-4px]\",\n \"[[dir=rtl]_&]:data-[side=inline-end]:[--sui-overlay-from-shift-x:4px]\",\n);\n\n/* Both ends of a presence animation start from the same state, and reduced motion drops the\n spatial half of it: presence still reads as arriving, but only through opacity. The\n transform is a literal class rather than an interpolated one, because the stylesheet\n compiler reads class names as text: a name that only exists once a template is evaluated\n compiles to no rule at all. */\nconst anchoredFrom = /* @__PURE__ */ cx(\n \"data-[starting-style]:opacity-0\",\n \"data-[starting-style]:[transform:translate(var(--sui-overlay-from-shift-x,0px),var(--sui-overlay-from-shift-y,0px))scale(var(--sui-overlay-from-scale,1))]\",\n \"data-[ending-style]:opacity-0\",\n \"data-[ending-style]:[transform:translate(var(--sui-overlay-from-shift-x,0px),var(--sui-overlay-from-shift-y,0px))scale(var(--sui-overlay-from-scale,1))]\",\n \"motion-reduce:data-[starting-style]:transform-none\",\n \"motion-reduce:data-[ending-style]:transform-none\",\n);\n\nconst modalFrom = /* @__PURE__ */ cx(\n \"data-[starting-style]:opacity-0\",\n \"data-[starting-style]:[transform:translate(0,12px)scale(0.96)]\",\n \"data-[ending-style]:opacity-0\",\n \"data-[ending-style]:[transform:translate(0,12px)scale(0.96)]\",\n \"motion-reduce:data-[starting-style]:transform-none\",\n \"motion-reduce:data-[ending-style]:transform-none\",\n);\n\n/** An anchored surface: `Select`, `Combobox`, `Menu` and `Popover`. It grows out of the edge\n * it is attached to, enters on the overlay timing, and leaves on the shorter exit.\n *\n * The grow is the motion's signature and the four pixels of travel only support it, so the\n * entrance takes the glide curve rather than the arrival curve. With a front-loaded curve the\n * opacity and the scale both jump in the first frames, which means the surface is already half\n * grown by the time it is visible at all — a pop, not a grow. The glide curve spends its whole\n * duration visible, so the eye actually sees the surface open out of its anchor. */\nexport const motionPresenceAnchored = /* @__PURE__ */ cx(\n \"transition-[opacity,transform] duration-overlay ease-glide\",\n \"data-[ending-style]:duration-overlay-exit data-[ending-style]:ease-exit\",\n \"motion-reduce:transition-[opacity]\",\n \"[--sui-overlay-from-scale:0.94]\",\n anchoredGeometry,\n anchoredFrom,\n);\n\n/** A tooltip: the same side-aware model and the same grow as an anchored popup, deliberately\n * lighter — it settles on the local timing rather than the overlay timing, and it never\n * bounces. */\nexport const motionPresenceTooltip = /* @__PURE__ */ cx(\n \"transition-[opacity,transform] duration-release ease-glide\",\n \"data-[ending-style]:duration-overlay-exit data-[ending-style]:ease-exit\",\n \"motion-reduce:transition-[opacity]\",\n \"[--sui-overlay-from-scale:0.94]\",\n anchoredGeometry,\n anchoredFrom,\n);\n\n/** A modal surface: anchored to the viewport rather than to a trigger, so it has no side\n * to grow from. A large surface never bounces; it fades, rises a little and settles, and its\n * scale stays restrained because a plane this big grows visibly even from a few percent. */\nexport const motionPresenceModal = /* @__PURE__ */ cx(\n \"transition-[opacity,transform] duration-overlay ease-glide\",\n \"data-[ending-style]:duration-overlay-exit data-[ending-style]:ease-exit\",\n \"motion-reduce:transition-[opacity]\",\n modalFrom,\n);\n\n/** The plane behind a surface that owns the viewport. Opacity only: a blur or a filter is\n * never animated, so the plane can never animate the page behind it. */\nexport const motionPresenceScrim =\n \"transition-opacity duration-overlay ease-release data-[ending-style]:duration-overlay-exit data-[ending-style]:ease-exit\";\n\n/** Continuous activity is a distinct intent, not an exception to interaction motion: it\n * reports work rather than answering an event, and it has no entrance of its own. */\nexport const motionActivitySpin = \"animate-spin motion-reduce:animate-none\";\nexport const motionActivityPulse = \"animate-pulse motion-reduce:animate-none\";\n\n/** The indeterminate half of a progress bar. A task with no known value cannot report a\n * position, so it reports *work* instead: the fill sweeps across its own track on the one loop\n * that is paced, because a loop that reports rather than answers cannot arrive. The travel is a\n * composited transform rather than a laid-out edge, and an endless loop must never sit on the\n * layout path; the direction is a value the recipe flips with the writing direction, because a\n * transform is physical and the sweep follows the page. Under reduced motion the loop stops and\n * the fill rests where it starts: a static status glyph, exactly as the spin and the pulse rest. */\nexport const motionActivityIndeterminate =\n \"animate-sherick-indeterminate [[dir=rtl]_&]:[--sui-indeterminate-direction:-1] motion-reduce:animate-none\";\n\n/** The state layer is a composited overlay, so its own opacity is the only thing that\n * moves. Shared here because four interaction states across the library ride it. */\nexport const motionStateLayer =\n \"before:transition-opacity before:duration-release before:ease-release active:before:duration-press active:before:ease-press group-active:before:duration-press group-active:before:ease-press motion-reduce:before:transition-none\";\n\n/* `disclose` is the in-flow counterpart of presence: nothing mounts or unmounts, and nothing\n leaves the page — one region changes its own height where it sits. Base measures the panel and\n publishes that height, so the geometry is the primitive's and only the interpolation is here.\n The panel states the height it opens to; this recipe owns how it gets there, and reduced\n motion applies the layout state in one step rather than travelling through it. */\nexport const motionDisclose =\n \"transition-[height] duration-release ease-release data-[starting-style]:h-0 data-[ending-style]:h-0 motion-reduce:transition-none\";\n\n/* A sheet is a surface that owns the viewport and is attached to one edge of it, so its presence is\n a slide out of that edge rather than the modal lift, and it never bounces. The component names the\n edge by setting exactly one of `--sui-sheet-from-x` / `--sui-sheet-from-y` to a full own-extent\n offset, because which edge a sheet is attached to is anatomy; how far it travels and how long it\n takes are not.\n\n The other axis is `0px`, and that default is load-bearing: a fallback of `100%` on the axis the\n component did not set would translate a side sheet on both axes at once, so a sheet attached to\n the right edge would enter from the bottom-right corner and travel diagonally instead of\n straight in. One edge means one axis. */\nexport const motionPresenceSheet = /* @__PURE__ */ cx(\n \"transition-[transform,opacity] duration-overlay ease-glide\",\n \"data-[ending-style]:duration-overlay-exit data-[ending-style]:ease-exit\",\n \"motion-reduce:transition-[opacity]\",\n \"data-[starting-style]:opacity-0\",\n \"data-[ending-style]:opacity-0\",\n \"data-[starting-style]:[transform:translate(var(--sui-sheet-from-x,0px),var(--sui-sheet-from-y,0px))]\",\n \"data-[ending-style]:[transform:translate(var(--sui-sheet-from-x,0px),var(--sui-sheet-from-y,0px))]\",\n \"motion-reduce:data-[starting-style]:transform-none\",\n \"motion-reduce:data-[ending-style]:transform-none\",\n);\n\n/* A toast is a stack, not a single surface: several independent surfaces share one corner,\n re-flow when one of them leaves, and can each be flung away by the pointer. That is one\n spatial owner on one node, and this is it.\n\n The component owns where a toast rests — its stacked offset, its clamped height and the\n expanded fan are geometry — and sets `--sui-toast-from-y` to the direction the stack grows in.\n This recipe owns the entrance, the exit, the stack's re-flow, and the gesture: while\n `data-swiping` is set the node follows the pointer with no interpolation at all, and a\n dismissal carries the movement it was flung with so the toast keeps travelling the way it was\n already going instead of turning around. */\nexport const motionPresenceToast = /* @__PURE__ */ cx(\n \"transition-[transform,opacity,height] duration-overlay ease-glide\",\n \"data-[ending-style]:duration-overlay-exit data-[ending-style]:ease-exit\",\n \"data-[swiping]:transition-none\",\n \"motion-reduce:transition-[opacity]\",\n \"data-[starting-style]:opacity-0\",\n \"data-[ending-style]:opacity-0\",\n \"data-[starting-style]:[transform:translateY(var(--sui-toast-from-y,150%))]\",\n \"[&[data-ending-style]:not([data-swipe-direction])]:[transform:translateY(var(--sui-toast-from-y,150%))]\",\n \"data-[ending-style]:data-[swipe-direction=down]:[transform:translateY(calc(var(--toast-swipe-movement-y,0px)+150%))]\",\n \"data-[ending-style]:data-[swipe-direction=up]:[transform:translateY(calc(var(--toast-swipe-movement-y,0px)-150%))]\",\n \"data-[ending-style]:data-[swipe-direction=left]:[transform:translateX(calc(var(--toast-swipe-movement-x,0px)-150%))]\",\n \"data-[ending-style]:data-[swipe-direction=right]:[transform:translateX(calc(var(--toast-swipe-movement-x,0px)+150%))]\",\n \"motion-reduce:data-[starting-style]:transform-none\",\n \"motion-reduce:data-[ending-style]:transform-none\",\n);\n"],"names":[],"mappings":";;AAAA;;;;;;;;;;;;;;;;;;;;;;AAsBiD;AAEjD;;;;AAI+E;AAc/E;;AAEmC;AAC5B,MAAM,cAAc,GACzB;AAEF;;;;;;;AAOuF;AACvF;AACmF;AA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C;;;;;;AAMqG;AAC9F,MAAM,2BAA2B,GACtC;AAEF;AACqF;AAC9E,MAAM,gBAAgB,GAC3B;AAEF;;;;AAIoF;AAC7E,MAAM,cAAc,GACzB;AAEF;;;;;;;;;AAS2C;AACpC,MAAM,mBAAmB,mBAAmB,EAAE,CACnD,4DAA4D,EAC5D,yEAAyE,EACzE,oCAAoC,EACpC,iCAAiC,EACjC,+BAA+B,EAC/B,sGAAsG,EACtG,oGAAoG,EACpG,oDAAoD,EACpD,kDAAkD;AAGpD;;;;;;;;;AAS8C;AACvC,MAAM,mBAAmB,mBAAmB,EAAE,CACnD,mEAAmE,EACnE,yEAAyE,EACzE,gCAAgC,EAChC,oCAAoC,EACpC,iCAAiC,EACjC,+BAA+B,EAC/B,4EAA4E,EAC5E,yGAAyG,EACzG,sHAAsH,EACtH,oHAAoH,EACpH,sHAAsH,EACtH,uHAAuH,EACvH,oDAAoD,EACpD,kDAAkD;;"}
package/dist/esm/dev.js CHANGED
@@ -1,4 +1,4 @@
1
- export { density, detail, disclosure, edge, edgeTone, elevation, fieldLayout, focusRing, focusRingHeld, focusRingInset, focusRingWithin, groupFocusRing, hitArea, list, material, overlay, recipeAlphas, selectable, shape, stacking, state, stateLayer, text, tone } from './components/ui.common.js';
1
+ export { density, detail, disclosure, edge, edgeTone, elevation, fieldLayout, focusRing, focusRingDrag, focusRingHeld, focusRingInset, focusRingWithin, groupFocusRing, hitArea, list, material, matteInset, mediaCanvas, overlay, parentFocusRingInset, recessedTop, recipeAlphas, selectable, shape, stacking, state, stateLayer, text, tone } from './components/ui.common.js';
2
2
  export { motionActivityIndeterminate, motionActivityPulse, motionActivitySpin, motionArrive, motionDirect, motionDisclose, motionFeedback, motionInkPress, motionOrient, motionPresenceAnchored, motionPresenceModal, motionPresenceScrim, motionPresenceSheet, motionPresenceToast, motionPresenceTooltip, motionRelocate, motionStateLayer, motionTactile } from './components/ui.motion.js';
3
3
  export { cn } from './libs/utils.js';
4
4
  //# sourceMappingURL=dev.js.map
package/dist/esm/index.js CHANGED
@@ -5,21 +5,30 @@ export { Alert } from './components/Alert.js';
5
5
  export { default as AlertDialog } from './components/AlertDialog.js';
6
6
  export { default as Avatar } from './components/Avatar.js';
7
7
  export { default as Badge } from './components/Badge.js';
8
+ export { default as Breadcrumb } from './components/Breadcrumb.js';
9
+ export { default as Calendar } from './components/Calendar.js';
8
10
  export { Card } from './components/Card.js';
9
11
  export { Checkbox } from './components/Checkbox.js';
10
12
  export { Chip } from './components/Chip.js';
11
13
  export { ChipGroup } from './components/ChipGroup.js';
12
14
  export { default as Combobox } from './components/Combobox.js';
15
+ export { default as Command } from './components/Command.js';
16
+ export { default as CommandPalette } from './components/CommandPalette.js';
17
+ export { default as DatePicker } from './components/DatePicker.js';
18
+ export { default as DateRangePicker } from './components/DateRangePicker.js';
13
19
  export { default as Divider } from './components/Divider.js';
14
20
  export { default as Select } from './components/Select.js';
15
21
  export { Field } from './components/Field.js';
22
+ export { default as FileUpload } from './components/FileUpload.js';
16
23
  export { default as IconButton } from './components/IconButton.js';
17
24
  export { default as Input } from './components/Input.js';
18
25
  export { default as Dialog } from './components/Dialog.js';
19
26
  export { default as Menu } from './components/Menu.js';
27
+ export { Media } from './components/Media.js';
20
28
  export { default as NavGroup } from './components/NavGroup.js';
21
29
  export { default as NavItem } from './components/NavItem.js';
22
30
  export { NumberField } from './components/NumberField.js';
31
+ export { default as Pagination } from './components/Pagination.js';
23
32
  export { default as Popover } from './components/Popover.js';
24
33
  export { Progress } from './components/Progress.js';
25
34
  export { RadioGroup } from './components/RadioGroup.js';
@@ -28,12 +37,14 @@ export { SegmentedControl } from './components/SegmentedControl.js';
28
37
  export { Skeleton } from './components/Skeleton.js';
29
38
  export { Slider } from './components/Slider.js';
30
39
  export { Spinner } from './components/Spinner.js';
40
+ export { default as Stepper } from './components/Stepper.js';
31
41
  export { Switch } from './components/Switch.js';
32
42
  export { Tabs } from './components/Tabs.js';
33
43
  export { default as ToggleGroup } from './components/ToggleGroup.js';
34
44
  export { Table } from './components/Table.js';
35
45
  export { default as Textarea } from './components/Textarea.js';
36
46
  export { default as Tooltip } from './components/Tooltip.js';
47
+ export { default as TreeView } from './components/TreeView.js';
37
48
  export { default as Drawer } from './components/Drawer.js';
38
49
  export { ToastProvider, ToastViewport, createToastManager, useToast } from './components/Toast.js';
39
50
  export { DirectionProvider } from './components/DirectionProvider.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}