@ngrok/mantle 0.87.0 → 0.89.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 (234) hide show
  1. package/dist/accordion.d.ts +10 -9
  2. package/dist/accordion.js +1 -1
  3. package/dist/agent.json +2 -1
  4. package/dist/{alert-DCVfviBx.d.ts → alert-BzPDUaU7.d.ts} +16 -15
  5. package/dist/alert-CZYYlx9q.js +1 -0
  6. package/dist/alert-center.d.ts +7 -7
  7. package/dist/alert-center.js +1 -1
  8. package/dist/alert-dialog.d.ts +17 -16
  9. package/dist/alert-dialog.js +1 -1
  10. package/dist/alert-vfeV_hso.js +1 -0
  11. package/dist/alert.d.ts +1 -1
  12. package/dist/alert.js +1 -1
  13. package/dist/anchor-CgcbWEUs.js +1 -0
  14. package/dist/anchor.js +1 -1
  15. package/dist/app-layout.d.ts +1128 -45
  16. package/dist/app-layout.js +1 -1
  17. package/dist/area-chart.d.ts +41 -18
  18. package/dist/area-chart.js +1 -1
  19. package/dist/avatar.js +1 -1
  20. package/dist/badge.d.ts +3 -2
  21. package/dist/badge.js +1 -1
  22. package/dist/bar-chart.d.ts +37 -13
  23. package/dist/bar-chart.js +1 -1
  24. package/dist/breadcrumb.js +1 -1
  25. package/dist/browser-only.js +1 -1
  26. package/dist/button-69InNC_m.js +1 -0
  27. package/dist/button-BMfUxs_j.js +1 -0
  28. package/dist/{button-DO53OA70.d.ts → button-CHoYpOzx.d.ts} +5 -4
  29. package/dist/{button-B52_vczK.js → button-D8rr-1AB.js} +1 -1
  30. package/dist/{button-crUf0hbR.d.ts → button-DL7V4bzW.d.ts} +5 -4
  31. package/dist/button-b2HKEIE2.js +1 -0
  32. package/dist/{button-B5i9n7Qp.d.ts → button-mzUR1U0Y.d.ts} +5 -4
  33. package/dist/button.d.ts +3 -3
  34. package/dist/button.js +1 -1
  35. package/dist/calendar.d.ts +3 -2
  36. package/dist/calendar.js +1 -1
  37. package/dist/card.d.ts +8 -7
  38. package/dist/card.js +1 -1
  39. package/dist/centered-layout.js +1 -1
  40. package/dist/{chart-DgaWVBqi.d.ts → chart-23KQ1ZNO.d.ts} +128 -62
  41. package/dist/chart-BRkJfptA.js +2 -0
  42. package/dist/checkbox-C3N2afhB.js +1 -0
  43. package/dist/checkbox.d.ts +3 -2
  44. package/dist/checkbox.js +1 -1
  45. package/dist/{choice-PESu-9s8.d.ts → choice-BCiyqLgO.d.ts} +12 -11
  46. package/dist/choice-DQmecLfy.js +1 -0
  47. package/dist/choice.d.ts +1 -1
  48. package/dist/choice.js +1 -1
  49. package/dist/code-block-4Esx_gV-.js +12 -0
  50. package/dist/code-block.d.ts +17 -16
  51. package/dist/code-block.js +6 -6
  52. package/dist/code-block_highlight-utils.js +1 -1
  53. package/dist/code.d.ts +2 -1
  54. package/dist/code.js +1 -1
  55. package/dist/combobox.d.ts +15 -14
  56. package/dist/combobox.js +1 -1
  57. package/dist/command.d.ts +13 -13
  58. package/dist/command.js +1 -1
  59. package/dist/cx-CK7o_rVv.js +1 -0
  60. package/dist/cx.js +1 -1
  61. package/dist/data-table.d.ts +32 -31
  62. package/dist/data-table.js +1 -1
  63. package/dist/description-list.d.ts +10 -6
  64. package/dist/description-list.js +1 -1
  65. package/dist/dialog-BDzapPLR.js +1 -0
  66. package/dist/{dialog-DXpqpdJj.d.ts → dialog-DQdeqvq-.d.ts} +28 -15
  67. package/dist/dialog.d.ts +1 -1
  68. package/dist/dialog.js +1 -1
  69. package/dist/dropdown-menu-CWUzGFgf.d.ts +1 -0
  70. package/dist/{dropdown-menu-BloQKE_y.d.ts → dropdown-menu-CpRsyt_F.d.ts} +17 -17
  71. package/dist/dropdown-menu-CutWQ0bl.js +1 -0
  72. package/dist/dropdown-menu.d.ts +2 -2
  73. package/dist/dropdown-menu.js +1 -1
  74. package/dist/empty.d.ts +7 -6
  75. package/dist/empty.js +1 -1
  76. package/dist/field.d.ts +16 -15
  77. package/dist/field.js +1 -1
  78. package/dist/flag.d.ts +3 -2
  79. package/dist/flag.js +1 -1
  80. package/dist/hooks.d.ts +36 -1
  81. package/dist/hooks.js +1 -1
  82. package/dist/hover-card.d.ts +5 -4
  83. package/dist/hover-card.js +1 -1
  84. package/dist/icon-BudQMD2S.js +1 -0
  85. package/dist/icon-kK0c-POG.js +1 -0
  86. package/dist/{icon-w0HUe7tr.d.ts → icon-r2NvfTWW.d.ts} +3 -2
  87. package/dist/{icon-BmJ57Tgh.d.ts → icon-ucVgZeXn.d.ts} +3 -2
  88. package/dist/icon.d.ts +2 -2
  89. package/dist/icon.js +1 -1
  90. package/dist/icons-BMZnm4hM.js +1 -0
  91. package/dist/{icons-Bu-2boul.js → icons-CH3tD_wq.js} +1 -1
  92. package/dist/icons-CSwTVV2m.js +1 -0
  93. package/dist/icons.js +1 -1
  94. package/dist/in-view-Dxv_GrUU.js +1 -0
  95. package/dist/input-D_DjD9lT.js +1 -0
  96. package/dist/{input-DpnC3Xgj.d.ts → input-bbB1tC0h.d.ts} +3 -2
  97. package/dist/input.d.ts +5 -4
  98. package/dist/input.js +1 -1
  99. package/dist/kbd-CLHsJ99p.js +1 -0
  100. package/dist/kbd.d.ts +2 -1
  101. package/dist/kbd.js +1 -1
  102. package/dist/label-5T8i7I4X.js +1 -0
  103. package/dist/{label-Bnfe9YJ6.d.ts → label-C-KbNls8.d.ts} +3 -2
  104. package/dist/label.d.ts +1 -1
  105. package/dist/label.js +1 -1
  106. package/dist/{layer-container-R7aux3n8.js → layer-container-DLf-6eBz.js} +1 -1
  107. package/dist/layer-container.js +1 -1
  108. package/dist/line-chart.d.ts +40 -15
  109. package/dist/line-chart.js +1 -1
  110. package/dist/list-DOVZoz9t.js +1 -0
  111. package/dist/list.d.ts +3 -2
  112. package/dist/list.js +1 -1
  113. package/dist/live-region-DQ1QLv3L.js +1 -0
  114. package/dist/live-region.d.ts +3 -2
  115. package/dist/live-region.js +1 -1
  116. package/dist/llms.txt +2 -1
  117. package/dist/{main-Dv2zuT_b.js → main-CC1L9IsH.js} +1 -1
  118. package/dist/main.js +1 -1
  119. package/dist/mantle.css +12 -20
  120. package/dist/media-object.js +1 -1
  121. package/dist/multi-select.d.ts +23 -22
  122. package/dist/multi-select.js +1 -1
  123. package/dist/otp-input.d.ts +9 -8
  124. package/dist/otp-input.js +1 -1
  125. package/dist/pagination.d.ts +9 -8
  126. package/dist/pagination.js +1 -1
  127. package/dist/{popover-Cco1nw8I.d.ts → popover-Dvls7-j4.d.ts} +5 -4
  128. package/dist/popover-oQDUvcZ2.js +1 -0
  129. package/dist/popover.d.ts +1 -1
  130. package/dist/popover.js +1 -1
  131. package/dist/primitive-B-6XILB2.js +1 -0
  132. package/dist/progress.d.ts +9 -8
  133. package/dist/progress.js +1 -1
  134. package/dist/qr-code.d.ts +9 -8
  135. package/dist/qr-code.js +1 -1
  136. package/dist/radio-group.d.ts +19 -18
  137. package/dist/radio-group.js +1 -1
  138. package/dist/sandbar.d.ts +7 -7
  139. package/dist/sandbar.js +1 -1
  140. package/dist/{sandboxed-on-click-BLvvSqOP.js → sandboxed-on-click-C7pPu-2M.js} +1 -1
  141. package/dist/sandboxed-on-click.js +1 -1
  142. package/dist/scatter-plot.d.ts +39 -14
  143. package/dist/scatter-plot.js +1 -1
  144. package/dist/{select-BITJP7I5.d.ts → select-CxXb3aiC.d.ts} +3 -3
  145. package/dist/select-DcL0-duV.js +1 -0
  146. package/dist/select.d.ts +1 -1
  147. package/dist/select.js +1 -1
  148. package/dist/selectable-list.d.ts +16 -15
  149. package/dist/selectable-list.js +1 -1
  150. package/dist/separator-DvPe27fH.js +1 -0
  151. package/dist/{separator-Bo4nY_3M.d.ts → separator-HzGvuD0B.d.ts} +4 -3
  152. package/dist/separator.d.ts +1 -1
  153. package/dist/separator.js +1 -1
  154. package/dist/sheet-DND_KjmS.js +1 -0
  155. package/dist/sheet.d.ts +13 -12
  156. package/dist/sheet.js +1 -1
  157. package/dist/sidebar.d.ts +149 -95
  158. package/dist/sidebar.js +1 -1
  159. package/dist/skeleton-zfqoDAxT.js +1 -0
  160. package/dist/skeleton.d.ts +3 -2
  161. package/dist/skeleton.js +1 -1
  162. package/dist/skip-to-main-link.js +1 -1
  163. package/dist/slider.d.ts +3 -2
  164. package/dist/slider.js +1 -1
  165. package/dist/{slot-BsvE2ntj.js → slot-DdYN1L1C.js} +1 -1
  166. package/dist/{slot-DdgxmuI5.d.ts → slot-Q996Hqk9.d.ts} +1 -1
  167. package/dist/slot.d.ts +1 -1
  168. package/dist/slot.js +1 -1
  169. package/dist/split-button.d.ts +6 -5
  170. package/dist/split-button.js +1 -1
  171. package/dist/switch.d.ts +3 -2
  172. package/dist/switch.js +1 -1
  173. package/dist/{table-DEI-qvSC.d.ts → table-BhzITa19.d.ts} +10 -9
  174. package/dist/table-DBbKqOVq.js +1 -0
  175. package/dist/table.d.ts +1 -1
  176. package/dist/table.js +1 -1
  177. package/dist/tabs.d.ts +172 -33
  178. package/dist/tabs.js +1 -1
  179. package/dist/text-area.d.ts +3 -2
  180. package/dist/text-area.js +1 -1
  181. package/dist/theme-BlCZHClJ.js +1 -0
  182. package/dist/theme-switcher.d.ts +3 -3
  183. package/dist/theme-switcher.js +1 -1
  184. package/dist/theme.js +1 -1
  185. package/dist/toast.d.ts +10 -9
  186. package/dist/toast.js +1 -1
  187. package/dist/{tooltip-nuUCoqq8.d.ts → tooltip-CngH7Kl6.d.ts} +7 -6
  188. package/dist/tooltip-NhYXqStK.js +1 -0
  189. package/dist/tooltip.d.ts +1 -1
  190. package/dist/tooltip.js +1 -1
  191. package/dist/truncated-text.d.ts +138 -0
  192. package/dist/truncated-text.js +1 -0
  193. package/dist/types.js +1 -1
  194. package/dist/{use-breakpoint-CjyNk0fi.js → use-breakpoint--mo7kr9d.js} +1 -1
  195. package/dist/use-is-hydrated-after-paint-r9Cl2mGp.js +1 -0
  196. package/dist/utils.js +1 -1
  197. package/dist/visually-hidden.d.ts +2 -1
  198. package/dist/visually-hidden.js +1 -1
  199. package/dist/well.d.ts +3 -2
  200. package/dist/well.js +1 -1
  201. package/package.json +17 -16
  202. package/dist/alert-OP_-aGJD.js +0 -1
  203. package/dist/anchor-BnMhJYS4.js +0 -1
  204. package/dist/button-BFpCB99R.js +0 -1
  205. package/dist/button-Dij5vCQG.js +0 -1
  206. package/dist/button-pwkdtR3U.js +0 -1
  207. package/dist/chart-aZLMj4xx.js +0 -2
  208. package/dist/checkbox-DbJSqSNN.js +0 -1
  209. package/dist/choice-SRyLguqU.js +0 -1
  210. package/dist/code-block-BE3Q0iAo.js +0 -12
  211. package/dist/cx-0HCjnNv1.js +0 -1
  212. package/dist/dialog-HIdb5d3I.js +0 -1
  213. package/dist/dropdown-menu-BR_AQNMj.js +0 -1
  214. package/dist/dropdown-menu-Dlpb7600.d.ts +0 -1
  215. package/dist/icon-BT8FnkkJ.js +0 -1
  216. package/dist/icon-U24NfYv7.js +0 -1
  217. package/dist/icons-BQRcOU6J.js +0 -1
  218. package/dist/icons-C3rVfpx9.js +0 -1
  219. package/dist/in-view-T_AAYaaF.js +0 -1
  220. package/dist/input-yq0jLE4e.js +0 -1
  221. package/dist/kbd-CJ8hNZfS.js +0 -1
  222. package/dist/label-BAy0Mg59.js +0 -1
  223. package/dist/list-BleZ-43e.js +0 -1
  224. package/dist/live-region-B2vJRvPH.js +0 -1
  225. package/dist/popover-BJ5XNwzD.js +0 -1
  226. package/dist/primitive-w3wFk2La.js +0 -1
  227. package/dist/select-CUWLEeuf.js +0 -1
  228. package/dist/separator-D98be0gY.js +0 -1
  229. package/dist/sheet-B5x8EO9Y.js +0 -1
  230. package/dist/skeleton-bVDP8BzY.js +0 -1
  231. package/dist/table-D2jh52KA.js +0 -1
  232. package/dist/theme-C1kFFdIk.js +0 -1
  233. package/dist/tooltip-H03l7E4Y.js +0 -1
  234. /package/dist/{types-D85fCNV3.js → css-properties-D85fCNV3.js} +0 -0
@@ -1,4 +1,4 @@
1
- import { _ as PointShape, a as LegendPrimitiveProps, c as XAxisPrimitiveProps, f as ChartDatum, i as GridPrimitiveProps, l as YAxisPrimitiveProps, m as ChartSeriesSlot, n as ChartRootBaseProps, o as ReferenceLinePrimitiveProps, p as ChartDatumEvent, r as CopyButtonPrimitiveProps, s as TooltipPrimitiveProps, t as ChartAccessibilityProps, v as SeriesColor } from "./chart-DgaWVBqi.js";
1
+ import { a as GridPrimitiveProps, c as TooltipPrimitiveProps, h as ChartSeriesSlot, i as CopyButtonPrimitiveProps, l as XAxisPrimitiveProps, m as ChartDatumEvent, n as ChartMode, o as LegendPrimitiveProps, p as ChartDatum, r as ChartRootBaseProps, s as ReferenceLinePrimitiveProps, t as ChartAccessibilityProps, u as YAxisPrimitiveProps, v as PointShape, y as SeriesColor } from "./chart-23KQ1ZNO.js";
2
2
  //#region src/components/scatter-plot/scatter-plot.d.ts
3
3
  /**
4
4
  * Props for {@link ScatterPlot.Root}. Scatter x values must be continuous
@@ -10,7 +10,7 @@ import { _ as PointShape, a as LegendPrimitiveProps, c as XAxisPrimitiveProps, f
10
10
  * eight default chart tokens hold at every pair, so keep it to eight series or
11
11
  * fewer. Past eight, fold into an "Other" series or facet into small multiples.
12
12
  */
13
- type ScatterPlotRootProps<TDatum extends ChartDatum = ChartDatum> = Omit<ChartRootBaseProps, "stacked"> & ChartAccessibilityProps & {
13
+ type ScatterPlotRootProps<TDatum extends ChartDatum = ChartDatum, TMode extends ChartMode = "interactive"> = Omit<ChartRootBaseProps, "stacked"> & ChartAccessibilityProps<TMode> & {
14
14
  /** Rows of data; each row is one point per composed `ScatterPlot.Point` series. */
15
15
  data: readonly TDatum[];
16
16
  /** The key of each row's x value (number or `Date`). */
@@ -114,20 +114,42 @@ type ScatterPlotLegendProps = LegendPrimitiveProps;
114
114
  type ScatterPlotCopyButtonProps = CopyButtonPrimitiveProps;
115
115
  /**
116
116
  * The root of a scatter plot: owns the data, the scales, the canvas
117
- * renderer, and the entire interaction contract. Hovering hits the nearest
117
+ * renderer, and the entire interaction contract (the tooltip, keyboard
118
+ * stepping with polite announcements, an sr-only description, an sr-only
119
+ * data table, Enter/Space + click activation). Hovering hits the nearest
118
120
  * point within 24px (never a pinpoint target); the tooltip reads that point's
119
- * series, x, y — and z in 3D. With `zKey` the plot becomes a rotatable 3D
120
- * cube: drag to orbit, with points depth-sorted under gentle perspective.
121
+ * series, x, and y (and z in 3D). With `zKey` the plot becomes a rotatable
122
+ * 3D cube: drag to orbit, with points depth-sorted under gentle perspective.
123
+ *
124
+ * A Root mounts dormant: a shell of the plot, the named overlay, and its
125
+ * sr-only description. It builds its canvas, its hover layers, and its engine
126
+ * once it comes within one viewport of the visible area, takes focus, or
127
+ * prints (on-screen charts first, a few milliseconds at a time), and it mounts
128
+ * the sr-only data table once focus lands inside it. A list of charts pays
129
+ * for the ones a reader can see, and a page of sparklines holds no hidden
130
+ * tables until a reader asks for one.
121
131
  *
122
132
  * The Root's own subtree is addressable by slot: `scatter-plot` on the wrapper,
123
133
  * then `scatter-plot-plot`, `scatter-plot-canvas`, `scatter-plot-crosshair`,
124
134
  * `scatter-plot-hover-band`, `scatter-plot-markers`, `scatter-plot-tooltip`,
125
- * and `scatter-plot-data-table`. A scatter plot shows one marker dot on the hit
126
- * point, and never the crosshair or the band, but all three layers mount on
127
- * every kind. That dot carries `chart-active-point` plus a `data-shape` of
135
+ * `scatter-plot-description`, and, once focus lands inside the chart,
136
+ * `scatter-plot-data-table`. A scatter plot shows one marker dot on the hit
137
+ * point, and never the crosshair or the band. The canvas and the three
138
+ * layers are engine-owned: absent from server HTML and from a dormant chart,
139
+ * inserted at activation (near the viewport, on focus, or before print). A
140
+ * static or decorative chart inserts the canvas alone. The
141
+ * tooltip surface mounts on the first hover or keyboard step and stays. That dot carries `chart-active-point` plus a `data-shape` of
128
142
  * `"circle"`, `"square"`, `"triangle"`, `"diamond"`, `"triangle-down"`,
129
143
  * `"plus"`, `"cross"`, or `"star"`, naming the glyph its series wears.
130
144
  *
145
+ * **Data attributes:**
146
+ *
147
+ * | Data Attribute | Value | Description |
148
+ * | --- | --- | --- |
149
+ * | `data-slot` | `"scatter-plot-description"` | The `sr-only` description the overlay's `aria-describedby` points at: the chart kind, the point count, the x range, the series labels, and, on an interactive chart, the keyboard instructions. Omitted when `mode="decorative"`. |
150
+ * | `data-slot` | `"scatter-plot-data-table"` | The `sr-only` data table. Mounts once focus lands inside the chart (`data-state` flips to `"engaged"`) and stays. Interactive charts only. |
151
+ * | `data-state` | `"dormant"` \| `"engaged"` | On the Root. Flips to `"engaged"` once focus lands inside the chart, and never flips back. The data table mounts with it. Visibility paints the chart but never flips it. Interactive charts only. |
152
+ *
131
153
  * @see https://mantle.ngrok.com/components/charts/scatter-plot#scatterplotroot
132
154
  *
133
155
  * @example
@@ -149,7 +171,7 @@ type ScatterPlotCopyButtonProps = CopyButtonPrimitiveProps;
149
171
  * </ScatterPlot.Root>
150
172
  * ```
151
173
  */
152
- declare const Root: <TDatum extends ChartDatum = ChartDatum>(props: ScatterPlotRootProps<TDatum>) => import("react").JSX.Element;
174
+ declare const Root: <TDatum extends ChartDatum = ChartDatum, TMode extends ChartMode = "interactive">(props: ScatterPlotRootProps<TDatum, TMode>) => import("react").JSX.Element;
153
175
  /**
154
176
  * One point series. Renders nothing itself — it registers the series with the
155
177
  * chart, which paints its points on canvas (r≥4 dots with a surface ring,
@@ -336,9 +358,12 @@ declare const CopyButton: (props: ScatterPlotCopyButtonProps) => import("react")
336
358
  * A canvas-rendered scatter plot for correlating two measures — three with
337
359
  * the 3D projection (`zKey`), which renders a rotatable, depth-sorted point
338
360
  * cloud (drag to orbit). Hover hits the nearest point within 24px; keyboard
339
- * stepping, polite announcements, and the sr-only data table ship with `Root`
340
- * unconditionally. Scatter is an all-pairs chart form: the eight default chart
341
- * tokens hold at every pair, so keep it to eight series or fewer.
361
+ * stepping, polite announcements, and the sr-only description ship with
362
+ * `Root` unconditionally. A Root builds and paints its canvas once it comes
363
+ * within one viewport of the visible area, takes focus, or prints, and it mounts
364
+ * its sr-only data table once focus lands inside it. Scatter is an all-pairs
365
+ * chart form: the eight default chart tokens hold at every pair, so keep it
366
+ * to eight series or fewer.
342
367
  *
343
368
  * **CSS variables (public API):**
344
369
  *
@@ -351,7 +376,7 @@ declare const CopyButton: (props: ScatterPlotCopyButtonProps) => import("react")
351
376
  * `ScatterPlot.Point` sets one series and takes any CSS color. To restyle a slot itself,
352
377
  * redeclare its token on `Root` —
353
378
  * `className="[--color-chart-1:var(--color-brand)]"`. The engine resolves every
354
- * token through a probe inside `Root`, so a declaration scoped there wins for
379
+ * token from `Root`'s computed style, so a declaration scoped there wins for
355
380
  * that chart and leaves every other chart on the page alone.
356
381
  *
357
382
  * @see https://mantle.ngrok.com/components/charts/scatter-plot
@@ -559,4 +584,4 @@ declare const ScatterPlot: {
559
584
  readonly CopyButton: typeof CopyButton;
560
585
  };
561
586
  //#endregion
562
- export { type ChartDatumEvent, ScatterPlot, type ScatterPlotCopyButtonProps, type ScatterPlotGridProps, type ScatterPlotLegendProps, type ScatterPlotPointProps, type ScatterPlotReferenceLineProps, type ScatterPlotRootProps, type ScatterPlotTooltipProps, type ScatterPlotXAxisProps, type ScatterPlotYAxisProps };
587
+ export { type ChartDatumEvent, type ChartMode, ScatterPlot, type ScatterPlotCopyButtonProps, type ScatterPlotGridProps, type ScatterPlotLegendProps, type ScatterPlotPointProps, type ScatterPlotReferenceLineProps, type ScatterPlotRootProps, type ScatterPlotTooltipProps, type ScatterPlotXAxisProps, type ScatterPlotYAxisProps };
@@ -1 +1 @@
1
- import{a as e,c as t,i as n,l as r,n as i,o as a,r as o,s,t as c}from"./chart-aZLMj4xx.js";import{c as l}from"react/compiler-runtime";import{jsx as u}from"react/jsx-runtime";const d={Root:e=>{let t=l(2),n;return t[0]===e?n=t[1]:(n=u(o,{kind:`scatter`,componentName:`ScatterPlot`,slotName:`scatter-plot`,...e}),t[0]=e,t[1]=n),n},Point:e=>a(`ScatterPlot.Point`,`scatter`,e),Grid:e=>n(`ScatterPlot.Grid`,e),XAxis:e=>t(`ScatterPlot.XAxis`,e),YAxis:e=>r(`ScatterPlot.YAxis`,e),ReferenceLine:t=>e(`ScatterPlot.ReferenceLine`,t),Tooltip:e=>s(`ScatterPlot.Tooltip`,e),Legend:e=>{let t=l(2),n;return t[0]===e?n=t[1]:(n=u(i,{partName:`ScatterPlot.Legend`,slotName:`scatter-plot`,...e}),t[0]=e,t[1]=n),n},CopyButton:e=>{let t=l(2),n;return t[0]===e?n=t[1]:(n=u(c,{partName:`ScatterPlot.CopyButton`,slotName:`scatter-plot`,...e}),t[0]=e,t[1]=n),n}};export{d as ScatterPlot};
1
+ import{a as e,c as t,i as n,l as r,n as i,o as a,r as o,s,t as c}from"./chart-BRkJfptA.js";import{c as l}from"react/compiler-runtime";import{jsx as u}from"react/jsx-runtime";const d={Root:e=>{let t=l(2),n;return t[0]===e?n=t[1]:(n=/* @__PURE__ */ u(o,{kind:`scatter`,componentName:`ScatterPlot`,slotName:`scatter-plot`,...e}),t[0]=e,t[1]=n),n},Point:e=>a(`ScatterPlot.Point`,`scatter`,e),Grid:e=>n(`ScatterPlot.Grid`,e),XAxis:e=>t(`ScatterPlot.XAxis`,e),YAxis:e=>r(`ScatterPlot.YAxis`,e),ReferenceLine:t=>e(`ScatterPlot.ReferenceLine`,t),Tooltip:e=>s(`ScatterPlot.Tooltip`,e),Legend:e=>{let t=l(2),n;return t[0]===e?n=t[1]:(n=/* @__PURE__ */ u(i,{partName:`ScatterPlot.Legend`,slotName:`scatter-plot`,...e}),t[0]=e,t[1]=n),n},CopyButton:e=>{let t=l(2),n;return t[0]===e?n=t[1]:(n=/* @__PURE__ */ u(c,{partName:`ScatterPlot.CopyButton`,slotName:`scatter-plot`,...e}),t[0]=e,t[1]=n),n}};export{d as ScatterPlot};
@@ -1,6 +1,6 @@
1
1
  import { t as WithDataSlot } from "./data-slot-CChfb_cv.js";
2
2
  import { o as WithValidation } from "./field-7QeiTFwl.js";
3
- import { n as Separator } from "./separator-Bo4nY_3M.js";
3
+ import { n as Separator } from "./separator-HzGvuD0B.js";
4
4
  import { ComponentProps, FocusEvent, PropsWithChildren, ReactNode, Ref, SelectHTMLAttributes } from "react";
5
5
  import { Content, Group, Item, Label, Trigger, Value } from "@radix-ui/react-select";
6
6
  //#region src/components/select/select.d.ts
@@ -437,7 +437,7 @@ declare const Item$1: ({ className, children, "data-slot": dataSlot, icon, ref,
437
437
  *
438
438
  * | Data Attribute | Value | Description |
439
439
  * | -------------- | -------------------- | ------------------------- |
440
- * | `data-slot` | `"select-separator"` | On the separator element. |
440
+ * | `data-slot` | `"select-separator separator"` | On the separator element, joined ahead of `Separator`'s own slot. |
441
441
  *
442
442
  * @see https://mantle.ngrok.com/components/forms/select#selectseparator
443
443
  *
@@ -744,7 +744,7 @@ declare const Select: {
744
744
  *
745
745
  * | Data Attribute | Value | Description |
746
746
  * | -------------- | -------------------- | ------------------------- |
747
- * | `data-slot` | `"select-separator"` | On the separator element. |
747
+ * | `data-slot` | `"select-separator separator"` | On the separator element, joined ahead of `Separator`'s own slot. |
748
748
  *
749
749
  * @see https://mantle.ngrok.com/components/forms/select#selectseparator
750
750
  *
@@ -0,0 +1 @@
1
+ import{n as e}from"./compose-refs-sFdxsL7k.js";import{t}from"./cx-CK7o_rVv.js";import{t as n}from"./data-slot-EM6s2WEU.js";import{t as r}from"./icon-kK0c-POG.js";import{r as i}from"./layer-container-DLf-6eBz.js";import{a,r as o}from"./field-Bpptk_9t.js";import{t as s}from"./field-B1wqeZr4.js";import{n as c}from"./separator-DvPe27fH.js";import{c as l}from"react/compiler-runtime";import{CaretDownIcon as u}from"@phosphor-icons/react/CaretDown";import{createContext as d,useContext as f}from"react";import{jsx as p,jsxs as m}from"react/jsx-runtime";import{Slottable as h}from"@radix-ui/react-slot";import{CheckIcon as g}from"@phosphor-icons/react/Check";import{CaretUpIcon as _}from"@phosphor-icons/react/CaretUp";import{Content as v,Group as y,Icon as b,Item as x,ItemIndicator as S,ItemText as C,Label as w,Portal as T,Root as E,ScrollDownButton as D,ScrollUpButton as O,Trigger as k,Value as A,Viewport as j}from"@radix-ui/react-select";const M=d({}),N=e=>{let t=l(26),n,r,i,a,o,s,c,u,d;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4],o=t[5],s=t[6],c=t[7],u=t[8],d=t[9]):({"aria-invalid":n,children:r,id:i,validation:d,onBlur:a,onValueChange:s,onChange:o,ref:u,...c}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a,t[5]=o,t[6]=s,t[7]=c,t[8]=u,t[9]=d);let f;t[10]!==n||t[11]!==i||t[12]!==a||t[13]!==u||t[14]!==d?(f={"aria-invalid":n,id:i,validation:d,onBlur:a,ref:u},t[10]=n,t[11]=i,t[12]=a,t[13]=u,t[14]=d,t[15]=f):f=t[15];let m=f,h;t[16]!==o||t[17]!==s?(h=e=>{o?.(e),s?.(e)},t[16]=o,t[17]=s,t[18]=h):h=t[18];let g;t[19]!==r||t[20]!==m?(g=/* @__PURE__ */ p(M.Provider,{value:m,children:r}),t[19]=r,t[20]=m,t[21]=g):g=t[21];let _;return t[22]!==c||t[23]!==h||t[24]!==g?(_=/* @__PURE__ */ p(E,{...c,onValueChange:h,children:g}),t[22]=c,t[23]=h,t[24]=g,t[25]=_):_=t[25],_},P=e=>{let r=l(14),i,a,o,s;r[0]===e?(i=r[1],a=r[2],o=r[3],s=r[4]):({className:i,"data-slot":a,ref:s,...o}=e,r[0]=e,r[1]=i,r[2]=a,r[3]=o,r[4]=s);let c;r[5]===a?c=r[6]:(c=n(a,`select-group`),r[5]=a,r[6]=c);let u;r[7]===i?u=r[8]:(u=t(`space-y-px`,i),r[7]=i,r[8]=u);let d;return r[9]!==o||r[10]!==s||r[11]!==c||r[12]!==u?(d=/* @__PURE__ */ p(y,{ref:s,"data-slot":c,className:u,...o}),r[9]=o,r[10]=s,r[11]=c,r[12]=u,r[13]=d):d=r[13],d},F=e=>{let t=l(21),r,i,a,o,s,c;t[0]===e?(r=t[1],i=t[2],a=t[3],o=t[4],s=t[5],c=t[6]):({asChild:r,children:i,"data-slot":a,placeholder:o,ref:c,...s}=e,t[0]=e,t[1]=r,t[2]=i,t[3]=a,t[4]=o,t[5]=s,t[6]=c);let u;t[7]===a?u=t[8]:(u=n(a,`select-value`),t[7]=a,t[8]=u);let d;t[9]===o?d=t[10]:(d=o!=null&&/* @__PURE__ */ p(`span`,{"data-slot":`select-placeholder`,className:`contents`,children:o}),t[9]=o,t[10]=d);let f;t[11]!==r||t[12]!==i?(f=r||i==null?i:/* @__PURE__ */ p(`span`,{"data-slot":`select-value-label`,className:`contents`,children:i}),t[11]=r,t[12]=i,t[13]=f):f=t[13];let m;return t[14]!==r||t[15]!==s||t[16]!==c||t[17]!==u||t[18]!==d||t[19]!==f?(m=/* @__PURE__ */ p(A,{ref:c,asChild:r,"data-slot":u,placeholder:d,...s,children:f}),t[14]=r,t[15]=s,t[16]=c,t[17]=u,t[18]=d,t[19]=f,t[20]=m):m=t[20],m},I=i=>{let c=l(36),d,g,_,v,y,x,S,C,w;c[0]===i?(d=c[1],g=c[2],_=c[3],v=c[4],y=c[5],x=c[6],S=c[7],C=c[8],w=c[9]):({"aria-invalid":d,className:_,children:g,"data-slot":v,id:x,onBlur:y,ref:w,validation:S,...C}=i,c[0]=i,c[1]=d,c[2]=g,c[3]=_,c[4]=v,c[5]=y,c[6]=x,c[7]=S,c[8]=C,c[9]=w);let T=f(M),E=f(s),D=e(w,T.ref),O=a(),A=E?E[`aria-invalid`]:T[`aria-invalid`]??d,j=T.validation??S??O,N;c[10]!==A||c[11]!==j?(N=o({"aria-invalid":A,validation:j}),c[10]=A,c[11]=j,c[12]=N):N=c[12];let{ariaInvalid:P,validation:F}=N,I=E?E.id:T.id??x,L;c[13]===v?L=c[14]:(L=n(v,`select-trigger`),c[13]=v,c[14]=L);let R;c[15]===_?R=c[16]:(R=t(`h-9 text-sm`,`border-form bg-form text-strong font-sans placeholder:text-placeholder hover:bg-form-hover hover:text-strong flex w-full items-center justify-between gap-1.5 rounded-md border px-3 py-2 disabled:pointer-events-none disabled:opacity-50`,`[&>[data-slot=select-trigger-label]>span]:line-clamp-1 [&>[data-slot=select-trigger-label]>span]:text-left`,`hover:border-neutral-400`,`focus:outline-hidden focus:ring-4 aria-expanded:ring-4`,`focus:border-accent-600 focus:ring-focus-accent aria-expanded:border-accent-600 aria-expanded:ring-focus-accent`,`data-validation-success:border-success-600 data-validation-success:focus:border-success-600 data-validation-success:focus:ring-focus-success data-validation-success:aria-expanded:border-success-600 data-validation-success:aria-expanded:ring-focus-success`,`data-validation-warning:border-warning-600 data-validation-warning:focus:border-warning-600 data-validation-warning:focus:ring-focus-warning data-validation-warning:aria-expanded:border-warning-600 data-validation-warning:aria-expanded:ring-focus-warning`,`data-validation-error:border-danger-600 data-validation-error:focus:border-danger-600 data-validation-error:focus:ring-focus-danger data-validation-error:aria-expanded:border-danger-600 data-validation-error:aria-expanded:ring-focus-danger`,_),c[15]=_,c[16]=R);let z=F||void 0,V;c[17]!==T||c[18]!==y?(V=e=>{y?.(e),T.onBlur?.(e)},c[17]=T,c[18]=y,c[19]=V):V=c[19];let H;c[20]===E?H=c[21]:(H=E?{"aria-describedby":E[`aria-describedby`],"aria-errormessage":E[`aria-errormessage`]}:void 0,c[20]=E,c[21]=H);let U;c[22]===g?U=c[23]:(U=/* @__PURE__ */ p(h,{child:g,children:B}),c[22]=g,c[23]=U);let W;c[24]===Symbol.for(`react.memo_cache_sentinel`)?(W=/* @__PURE__ */ p(b,{asChild:!0,children:/* @__PURE__ */ p(r,{svg:/* @__PURE__ */ p(u,{weight:`bold`}),className:`size-4`})}),c[24]=W):W=c[24];let G;return c[25]!==P||c[26]!==I||c[27]!==C||c[28]!==L||c[29]!==R||c[30]!==z||c[31]!==V||c[32]!==H||c[33]!==U||c[34]!==D?(G=/* @__PURE__ */ m(k,{"data-slot":L,className:R,"data-validation":z,id:I,ref:D,...C,onBlur:V,...H,"aria-invalid":P,children:[U,W]}),c[25]=P,c[26]=I,c[27]=C,c[28]=L,c[29]=R,c[30]=z,c[31]=V,c[32]=H,c[33]=U,c[34]=D,c[35]=G):G=c[35],G},L=e=>{let n=l(11),i,a,o;n[0]===e?(i=n[1],a=n[2],o=n[3]):({className:i,ref:o,...a}=e,n[0]=e,n[1]=i,n[2]=a,n[3]=o);let s;n[4]===i?s=n[5]:(s=t(`flex cursor-default items-center justify-center py-1`,i),n[4]=i,n[5]=s);let c;n[6]===Symbol.for(`react.memo_cache_sentinel`)?(c=/* @__PURE__ */ p(r,{svg:/* @__PURE__ */ p(_,{weight:`bold`}),className:`size-4`}),n[6]=c):c=n[6];let u;return n[7]!==a||n[8]!==o||n[9]!==s?(u=/* @__PURE__ */ p(O,{ref:o,className:s,...a,children:c}),n[7]=a,n[8]=o,n[9]=s,n[10]=u):u=n[10],u},R=e=>{let n=l(11),i,a,o;n[0]===e?(i=n[1],a=n[2],o=n[3]):({className:i,ref:o,...a}=e,n[0]=e,n[1]=i,n[2]=a,n[3]=o);let s;n[4]===i?s=n[5]:(s=t(`flex cursor-default items-center justify-center py-1`,i),n[4]=i,n[5]=s);let c;n[6]===Symbol.for(`react.memo_cache_sentinel`)?(c=/* @__PURE__ */ p(r,{svg:/* @__PURE__ */ p(u,{weight:`bold`}),className:`size-4`}),n[6]=c):c=n[6];let d;return n[7]!==a||n[8]!==o||n[9]!==s?(d=/* @__PURE__ */ p(D,{ref:o,className:s,...a,children:c}),n[7]=a,n[8]=o,n[9]=s,n[10]=d):d=n[10],d},z={Root:N,Content:e=>{let r=l(31),a,o,s,c,u,d,f;r[0]===e?(a=r[1],o=r[2],s=r[3],c=r[4],u=r[5],d=r[6],f=r[7]):({className:o,children:a,"data-slot":s,position:d,ref:u,width:f,...c}=e,r[0]=e,r[1]=a,r[2]=o,r[3]=s,r[4]=c,r[5]=u,r[6]=d,r[7]=f);let h=d===void 0?`popper`:d,g=f===void 0?`trigger`:f,_=i(),y;r[8]===s?y=r[9]:(y=n(s,`select-content`),r[8]=s,r[9]=y);let b=h===`popper`&&`data-side-bottom:translate-y-2 data-side-left:-translate-x-2 data-side-right:translate-x-2 data-side-top:-translate-y-2 max-h-(--radix-select-content-available-height)`,x=g===`trigger`&&`w-(--radix-select-trigger-width)`,S;r[10]!==o||r[11]!==b||r[12]!==x?(S=t(`border-popover data-side-bottom:slide-in-from-top-2 data-side-left:slide-in-from-right-2 data-side-right:slide-in-from-left-2 data-side-top:slide-in-from-bottom-2 data-state-closed:animate-out data-state-closed:fade-out-0 data-state-closed:zoom-out-95 data-state-open:animate-in data-state-open:fade-in-0 data-state-open:zoom-in-95 motion-reduce:animate-none relative z-50 max-h-96 min-w-32 overflow-hidden rounded-md border shadow-md`,`bg-popover font-sans`,b,x,o),r[10]=o,r[11]=b,r[12]=x,r[13]=S):S=r[13];let C;r[14]===Symbol.for(`react.memo_cache_sentinel`)?(C=/* @__PURE__ */ p(L,{}),r[14]=C):C=r[14];let w=h===`popper`&&`h-(--radix-select-trigger-height) w-full`,E;r[15]===w?E=r[16]:(E=t(`p-1 space-y-px`,w),r[15]=w,r[16]=E);let D;r[17]!==a||r[18]!==E?(D=/* @__PURE__ */ p(j,{className:E,children:a}),r[17]=a,r[18]=E,r[19]=D):D=r[19];let O;r[20]===Symbol.for(`react.memo_cache_sentinel`)?(O=/* @__PURE__ */ p(R,{}),r[20]=O):O=r[20];let k;r[21]!==h||r[22]!==c||r[23]!==u||r[24]!==D||r[25]!==y||r[26]!==S?(k=/* @__PURE__ */ m(v,{ref:u,"data-slot":y,className:S,position:h,...c,children:[C,D,O]}),r[21]=h,r[22]=c,r[23]=u,r[24]=D,r[25]=y,r[26]=S,r[27]=k):k=r[27];let A;return r[28]!==_||r[29]!==k?(A=/* @__PURE__ */ p(T,{container:_,children:k}),r[28]=_,r[29]=k,r[30]=A):A=r[30],A},Group:P,Item:e=>{let i=l(28),a,o,s,c,u,d,f;i[0]===e?(a=i[1],o=i[2],s=i[3],c=i[4],u=i[5],d=i[6],f=i[7]):({className:o,children:a,"data-slot":s,icon:c,ref:d,translate:f,...u}=e,i[0]=e,i[1]=a,i[2]=o,i[3]=s,i[4]=c,i[5]=u,i[6]=d,i[7]=f);let _;i[8]===s?_=i[9]:(_=n(s,`select-item`),i[8]=s,i[9]=_);let v;i[10]===o?v=i[11]:(v=t(`relative flex gap-2 w-full cursor-pointer select-none items-center rounded-md py-1.5 pl-2 pr-8 text-strong text-sm outline-hidden`,`focus:bg-active-menu-item`,`data-disabled:pointer-events-none data-disabled:opacity-50`,`data-state-checked:bg-selected-menu-item`,`focus:data-state-checked:bg-active-selected-menu-item`,o),i[10]=o,i[11]=v);let y;i[12]===c?y=i[13]:(y=c&&/* @__PURE__ */ p(r,{svg:c}),i[12]=c,i[13]=y);let b;i[14]===f?b=i[15]:(b=e=>/* @__PURE__ */ p(C,{children:/* @__PURE__ */ p(`span`,{"data-slot":`select-item-label`,className:`contents`,translate:f,children:e})}),i[14]=f,i[15]=b);let w;i[16]!==a||i[17]!==b?(w=/* @__PURE__ */ p(h,{child:a,children:b}),i[16]=a,i[17]=b,i[18]=w):w=i[18];let T;i[19]===Symbol.for(`react.memo_cache_sentinel`)?(T=/* @__PURE__ */ p(S,{className:`absolute right-2 flex h-3.5 w-3.5 items-center justify-center`,children:/* @__PURE__ */ p(r,{svg:/* @__PURE__ */ p(g,{weight:`bold`}),className:`size-4 text-accent-600`})}),i[19]=T):T=i[19];let E;return i[20]!==u||i[21]!==d||i[22]!==_||i[23]!==v||i[24]!==y||i[25]!==w||i[26]!==f?(E=/* @__PURE__ */ m(x,{ref:d,"data-slot":_,translate:f,className:v,...u,children:[y,w,T]}),i[20]=u,i[21]=d,i[22]=_,i[23]=v,i[24]=y,i[25]=w,i[26]=f,i[27]=E):E=i[27],E},Label:e=>{let r=l(14),i,a,o,s;r[0]===e?(i=r[1],a=r[2],o=r[3],s=r[4]):({className:i,"data-slot":a,ref:s,...o}=e,r[0]=e,r[1]=i,r[2]=a,r[3]=o,r[4]=s);let c;r[5]===a?c=r[6]:(c=n(a,`select-label`),r[5]=a,r[6]=c);let u;r[7]===i?u=r[8]:(u=t(`px-2 py-1.5 text-sm font-medium`,i),r[7]=i,r[8]=u);let d;return r[9]!==o||r[10]!==s||r[11]!==c||r[12]!==u?(d=/* @__PURE__ */ p(w,{ref:s,"data-slot":c,className:u,...o}),r[9]=o,r[10]=s,r[11]=c,r[12]=u,r[13]=d):d=r[13],d},Separator:e=>{let r=l(14),i,a,o,s;r[0]===e?(i=r[1],a=r[2],o=r[3],s=r[4]):({className:i,"data-slot":a,ref:s,...o}=e,r[0]=e,r[1]=i,r[2]=a,r[3]=o,r[4]=s);let u;r[5]===a?u=r[6]:(u=n(a,`select-separator`),r[5]=a,r[6]=u);let d;r[7]===i?d=r[8]:(d=t(`-mx-1 my-1 h-px w-auto`,i),r[7]=i,r[8]=d);let f;return r[9]!==o||r[10]!==s||r[11]!==u||r[12]!==d?(f=/* @__PURE__ */ p(c,{ref:s,"data-slot":u,className:d,...o}),r[9]=o,r[10]=s,r[11]=u,r[12]=d,r[13]=f):f=r[13],f},Trigger:I,Value:F};function B(e){return/* @__PURE__ */ p(`span`,{"data-slot":`select-trigger-label`,className:`contents`,children:e})}export{z as t};
package/dist/select.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { t as Select } from "./select-BITJP7I5.js";
1
+ import { t as Select } from "./select-CxXb3aiC.js";
2
2
  export { Select };
package/dist/select.js CHANGED
@@ -1 +1 @@
1
- import{t as e}from"./select-CUWLEeuf.js";export{e as Select};
1
+ export{t as Select}from"./select-DcL0-duV.js";
@@ -1,5 +1,6 @@
1
- import { t as Choice } from "./choice-PESu-9s8.js";
2
- import { t as Input } from "./input-DpnC3Xgj.js";
1
+ import { t as WithDataSlot } from "./data-slot-CChfb_cv.js";
2
+ import { t as Choice } from "./choice-BCiyqLgO.js";
3
+ import { t as Input } from "./input-bbB1tC0h.js";
3
4
  import { ComponentProps, ReactElement, ReactNode } from "react";
4
5
  //#region src/components/selectable-list/selectable-list.d.ts
5
6
  /**
@@ -155,7 +156,7 @@ type SelectableListRootProps = Omit<ComponentProps<"div">, "onChange"> & {
155
156
  * `label`).
156
157
  */
157
158
  filter?: (option: SelectableListOption, query: string) => boolean;
158
- };
159
+ } & WithDataSlot;
159
160
  /**
160
161
  * Root of a `SelectableList`: a filterable, multi-select **grid** of checkbox
161
162
  * rows. Owns selection state (controlled via `value`/`onValueChange` or
@@ -187,7 +188,7 @@ type SelectableListRootProps = Omit<ComponentProps<"div">, "onChange"> & {
187
188
  * </SelectableList.Root>
188
189
  * ```
189
190
  */
190
- declare const Root: ({ className, defaultQuery, defaultValue, filter, onQueryChange, onValueChange, options, query: queryProp, ref, value, ...props }: SelectableListRootProps) => import("react").JSX.Element;
191
+ declare const Root: ({ "data-slot": dataSlot, className, defaultQuery, defaultValue, filter, onQueryChange, onValueChange, options, query: queryProp, ref, value, ...props }: SelectableListRootProps) => import("react").JSX.Element;
191
192
  /**
192
193
  * The filter/search box for a `SelectableList`. Renders the mantle `Input` with
193
194
  * a leading magnifying-glass icon and drives the list's filter query (a
@@ -206,7 +207,7 @@ declare const Root: ({ className, defaultQuery, defaultValue, filter, onQueryCha
206
207
  * </SelectableList.Root>
207
208
  * ```
208
209
  */
209
- declare const Filter: ({ "aria-label": ariaLabel, ref, ...props }: Omit<ComponentProps<typeof Input>, "value" | "defaultValue" | "onChange" | "type" | "children">) => import("react").JSX.Element;
210
+ declare const Filter: ({ "data-slot": dataSlot, "aria-label": ariaLabel, ref, ...props }: Omit<ComponentProps<typeof Input>, "value" | "defaultValue" | "onChange" | "type" | "children"> & WithDataSlot) => import("react").JSX.Element;
210
211
  /**
211
212
  * A tri-state "select all" header for a `SelectableList`. Reflects the selection
212
213
  * of the **currently filtered** options — checked when all are selected,
@@ -238,7 +239,7 @@ declare const Filter: ({ "aria-label": ariaLabel, ref, ...props }: Omit<Componen
238
239
  * </SelectableList.Root>
239
240
  * ```
240
241
  */
241
- declare const SelectAll: ({ children, className, ref, ...props }: Omit<ComponentProps<"label">, "htmlFor">) => import("react").JSX.Element;
242
+ declare const SelectAll: ({ "data-slot": dataSlot, children, className, ref, ...props }: Omit<ComponentProps<"label">, "htmlFor"> & WithDataSlot) => import("react").JSX.Element;
242
243
  /**
243
244
  * Props for `SelectableList.Item`. Extends `<div>` props with the option
244
245
  * `value` the row represents; selection and disabled state are read from the
@@ -263,7 +264,7 @@ type SelectableListItemProps = Omit<ComponentProps<"div">, "children" | "id"> &
263
264
  * content `gridcell`; nested interactive content (links, buttons) is allowed.
264
265
  */
265
266
  children: ReactNode;
266
- };
267
+ } & WithDataSlot;
267
268
  /**
268
269
  * A single selectable grid row. Renders a `role="row"` (via the `list`
269
270
  * primitive) laid out with `Choice`: a `role="gridcell"` holding a real
@@ -295,7 +296,7 @@ type SelectableListItemProps = Omit<ComponentProps<"div">, "children" | "id"> &
295
296
  * </SelectableList.Root>
296
297
  * ```
297
298
  */
298
- declare const Item: ({ children, className, ref, value, ...props }: SelectableListItemProps) => import("react").JSX.Element;
299
+ declare const Item: ({ "data-slot": dataSlot, children, className, ref, value, ...props }: SelectableListItemProps) => import("react").JSX.Element;
299
300
  /**
300
301
  * The emphasized title of a `SelectableList.Item`, rendered as `Choice.Label` —
301
302
  * a real `<label>` wired to the row's checkbox, so clicking it toggles the row
@@ -320,7 +321,7 @@ declare const Item: ({ children, className, ref, value, ...props }: SelectableLi
320
321
  * </SelectableList.Root>
321
322
  * ```
322
323
  */
323
- declare const ItemTitle: (props: ComponentProps<typeof Choice.Label>) => import("react").JSX.Element;
324
+ declare const ItemTitle: ({ "data-slot": dataSlot, ...props }: ComponentProps<typeof Choice.Label> & WithDataSlot) => import("react").JSX.Element;
324
325
  /**
325
326
  * The de-emphasized sub-line of a `SelectableList.Item`, rendered as
326
327
  * `Choice.Description`, wired to the row's checkbox via `aria-describedby`
@@ -345,7 +346,7 @@ declare const ItemTitle: (props: ComponentProps<typeof Choice.Label>) => import(
345
346
  * </SelectableList.Root>
346
347
  * ```
347
348
  */
348
- declare const ItemDescription: (props: ComponentProps<typeof Choice.Description>) => import("react").JSX.Element;
349
+ declare const ItemDescription: ({ "data-slot": dataSlot, ...props }: ComponentProps<typeof Choice.Description> & WithDataSlot) => import("react").JSX.Element;
349
350
  /**
350
351
  * Props for `SelectableList.Viewport`. Extends `<div>` props (the scroll
351
352
  * viewport) with an optional render-prop child for custom row layouts.
@@ -366,7 +367,7 @@ type SelectableListViewportProps = Omit<ComponentProps<"div">, "children"> & {
366
367
  * title + description row built from the option.
367
368
  */
368
369
  children?: (option: SelectableListOption) => ReactElement | null;
369
- };
370
+ } & WithDataSlot;
370
371
  /**
371
372
  * The scrollable body of a `SelectableList`: a `role="grid"` of `role="row"`
372
373
  * checkbox rows inside the bordered, rounded `bg-popover` viewport. Renders
@@ -388,7 +389,7 @@ type SelectableListViewportProps = Omit<ComponentProps<"div">, "children"> & {
388
389
  * </SelectableList.Root>
389
390
  * ```
390
391
  */
391
- declare const Viewport: ({ children, ref, ...props }: SelectableListViewportProps) => import("react").JSX.Element | null;
392
+ declare const Viewport: ({ "data-slot": dataSlot, children, ref, ...props }: SelectableListViewportProps) => import("react").JSX.Element | null;
392
393
  /**
393
394
  * Props for `SelectableList.VirtualViewport` — the `Viewport` props plus the
394
395
  * virtualizer knobs.
@@ -405,7 +406,7 @@ type SelectableListVirtualViewportProps = SelectableListViewportProps & {
405
406
  estimateItemHeight?: number;
406
407
  /** Rows rendered beyond the visible window on each side. */
407
408
  overscan?: number;
408
- };
409
+ } & WithDataSlot;
409
410
  /**
410
411
  * The windowed counterpart to `SelectableList.Viewport`: renders only the
411
412
  * visible slice of filtered rows via `@tanstack/react-virtual`, sharing the
@@ -427,7 +428,7 @@ type SelectableListVirtualViewportProps = SelectableListViewportProps & {
427
428
  * </SelectableList.Root>
428
429
  * ```
429
430
  */
430
- declare const VirtualViewport: ({ children, ref, ...props }: SelectableListVirtualViewportProps) => import("react").JSX.Element | null;
431
+ declare const VirtualViewport: ({ "data-slot": dataSlot, children, ref, ...props }: SelectableListVirtualViewportProps) => import("react").JSX.Element | null;
431
432
  /**
432
433
  * Shown in place of the viewport when the active filter matches no options.
433
434
  * Renders its children (e.g. "No results found.") in muted, centered text.
@@ -460,7 +461,7 @@ declare const VirtualViewport: ({ children, ref, ...props }: SelectableListVirtu
460
461
  * </SelectableList.Root>
461
462
  * ```
462
463
  */
463
- declare const Empty: ({ children, className, ref, ...props }: ComponentProps<"div">) => import("react").JSX.Element;
464
+ declare const Empty: ({ "data-slot": dataSlot, children, className, ref, ...props }: ComponentProps<"div"> & WithDataSlot) => import("react").JSX.Element;
464
465
  /**
465
466
  * A filterable, multi-select **grid** of checkbox rows — the inline
466
467
  * (non-popover) counterpart to `MultiSelect`/`Combobox`. Map your data into
@@ -1 +1 @@
1
- import{t as e}from"./cx-0HCjnNv1.js";import{n as t,t as n}from"./checkbox-DbJSqSNN.js";import{t as r}from"./choice-SRyLguqU.js";import{t as i}from"./use-callback-ref-BvVyI5K1.js";import{n as a,t as o}from"./input-yq0jLE4e.js";import{n as s,r as c,t as l}from"./list-BleZ-43e.js";import{c as u}from"react/compiler-runtime";import{cloneElement as d,createContext as f,isValidElement as p,useContext as m,useId as h,useState as g}from"react";import _ from"tiny-invariant";import{jsx as v,jsxs as y}from"react/jsx-runtime";import{MagnifyingGlassIcon as b}from"@phosphor-icons/react/MagnifyingGlass";function x(e){return e.labelText==null?typeof e.label==`string`?e.label:``:e.labelText}function S(e,t){let n=t.trim().toLowerCase();return n===``?e:e.filter(e=>x(e).toLowerCase().includes(n))}function C(e,t){return e.includes(t)?e.filter(e=>e!==t):[...e,t]}function w(e,t){let n=0,r=0;for(let i of e)i.disabled||(n+=1,t.has(i.value)&&(r+=1));return n===0?{allSelected:!1,someSelected:!1}:{allSelected:r===n,someSelected:r>0}}const T=f(null);function E(e){let t=m(T);return _(t,`SelectableList.${e} must be rendered inside SelectableList.Root.`),t}const D=[],O=t=>{let n=u(49),r,a,o,s,c,l,d,f,p,m,_;n[0]===t?(r=n[1],a=n[2],o=n[3],s=n[4],c=n[5],l=n[6],d=n[7],f=n[8],p=n[9],m=n[10],_=n[11]):({className:r,defaultQuery:a,defaultValue:o,filter:s,onQueryChange:c,onValueChange:l,options:d,query:p,ref:m,value:_,...f}=t,n[0]=t,n[1]=r,n[2]=a,n[3]=o,n[4]=s,n[5]=c,n[6]=l,n[7]=d,n[8]=f,n[9]=p,n[10]=m,n[11]=_);let y=h(),b=_!=null,[x,w]=g(o??D),E=b?_:x,O=p!=null,[k,A]=g(a??``),j=O?p:k,M=i(l),N=i(c),P;n[12]!==b||n[13]!==M?(P=e=>{b||w(e),M(e)},n[12]=b,n[13]=M,n[14]=P):P=n[14];let F=P,I;n[15]!==O||n[16]!==N?(I=e=>{O||A(e),N(e)},n[15]=O,n[16]=N,n[17]=I):I=n[17];let L=I,R;n[18]===E?R=n[19]:(R=new Set(E),n[18]=E,n[19]=R);let V=R,H;n[20]===d?H=n[21]:(H=new Set(d.filter(z).map(B)),n[20]=d,n[21]=H);let U=H,W;n[22]!==s||n[23]!==d||n[24]!==j?(W=s==null?S(d,j):d.filter(e=>s(e,j)),n[22]=s,n[23]=d,n[24]=j,n[25]=W):W=n[25];let G=W,K;n[26]!==F||n[27]!==U||n[28]!==E?(K=e=>{U.has(e)||F(C(E,e))},n[26]=F,n[27]=U,n[28]=E,n[29]=K):K=n[29];let q;n[30]!==F||n[31]!==U||n[32]!==G||n[33]!==y||n[34]!==j||n[35]!==V||n[36]!==E||n[37]!==L||n[38]!==K?(q={listId:y,filteredOptions:G,query:j,setQuery:L,selectedValues:E,selectedSet:V,disabledSet:U,toggle:K,setSelection:F},n[30]=F,n[31]=U,n[32]=G,n[33]=y,n[34]=j,n[35]=V,n[36]=E,n[37]=L,n[38]=K,n[39]=q):q=n[39];let J=q,Y;n[40]===r?Y=n[41]:(Y=e(`flex w-full flex-col gap-3`,r),n[40]=r,n[41]=Y);let X;n[42]!==f||n[43]!==m||n[44]!==Y?(X=v(`div`,{ref:m,"data-slot":`selectable-list`,className:Y,...f}),n[42]=f,n[43]=m,n[44]=Y,n[45]=X):X=n[45];let Z;return n[46]!==J||n[47]!==X?(Z=v(T.Provider,{value:J,children:X}),n[46]=J,n[47]=X,n[48]=Z):Z=n[48],Z},k=e=>{let t=u(14),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({"aria-label":i,ref:r,...n}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let s=i===void 0?`Filter`:i,{query:c,setQuery:l}=E(`Filter`),d;t[4]===l?d=t[5]:(d=e=>l(e.target.value),t[4]=l,t[5]=d);let f,p;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(f=v(b,{"aria-hidden":!0}),p=v(a,{}),t[6]=f,t[7]=p):(f=t[6],p=t[7]);let m;return t[8]!==s||t[9]!==n||t[10]!==c||t[11]!==r||t[12]!==d?(m=y(o,{ref:r,type:`text`,"data-slot":`selectable-list-filter`,"aria-label":s,value:c,onChange:d,...n,children:[f,p]}),t[8]=s,t[9]=n,t[10]=c,t[11]=r,t[12]=d,t[13]=m):m=t[13],m},A=r=>{let i=u(32),a,o,s,c;i[0]===r?(a=i[1],o=i[2],s=i[3],c=i[4]):({children:a,className:o,ref:c,...s}=r,i[0]=r,i[1]=a,i[2]=o,i[3]=s,i[4]=c);let{filteredOptions:l,selectedValues:d,selectedSet:f,setSelection:p}=E(`SelectAll`),m=h(),g,_;if(i[5]!==l||i[6]!==f){let{allSelected:e,someSelected:n}=w(l,f);g=e,_=t({allSelected:g,someSelected:n}),i[5]=l,i[6]=f,i[7]=g,i[8]=_}else g=i[7],_=i[8];let b=_,x;i[9]===l?x=i[10]:(x=l.some(V),i[9]=l,i[10]=x);let S=x,C;i[11]!==g||i[12]!==l||i[13]!==d||i[14]!==p?(C=()=>{let e=l.filter(H).map(U);if(g){let t=new Set(e);p(d.filter(e=>!t.has(e)));return}p([...new Set([...d,...e])])},i[11]=g,i[12]=l,i[13]=d,i[14]=p,i[15]=C):C=i[15];let T=C,D;i[16]===o?D=i[17]:(D=e(`text-strong flex cursor-pointer items-center gap-2 text-sm font-medium font-sans`,o),i[16]=o,i[17]=D);let O=!S,k;i[18]!==b||i[19]!==m||i[20]!==T||i[21]!==O?(k=v(n,{id:m,checked:b,onChange:T,disabled:O}),i[18]=b,i[19]=m,i[20]=T,i[21]=O,i[22]=k):k=i[22];let A;i[23]===a?A=i[24]:(A=v(`span`,{"data-slot":`selectable-list-select-all-label`,className:`contents`,children:a}),i[23]=a,i[24]=A);let j;return i[25]!==m||i[26]!==s||i[27]!==c||i[28]!==D||i[29]!==k||i[30]!==A?(j=y(`label`,{ref:c,htmlFor:m,"data-slot":`selectable-list-select-all`,className:D,...s,children:[k,A]}),i[25]=m,i[26]=s,i[27]=c,i[28]=D,i[29]=k,i[30]=A,i[31]=j):j=i[31],j};function j(e,t){return`${e}-control-${encodeURIComponent(t)}`}const M=t=>{let i=u(38),a,o,c,l,d;i[0]===t?(a=i[1],o=i[2],c=i[3],l=i[4],d=i[5]):({children:a,className:o,ref:l,value:d,...c}=t,i[0]=t,i[1]=a,i[2]=o,i[3]=c,i[4]=l,i[5]=d);let{listId:f,selectedSet:p,disabledSet:m,toggle:h}=E(`Item`),g;i[6]!==f||i[7]!==d?(g=j(f,d),i[6]=f,i[7]=d,i[8]=g):g=i[8];let _=g,b;i[9]!==p||i[10]!==d?(b=p.has(d),i[9]=p,i[10]=d,i[11]=b):b=i[11];let x=b,S;i[12]!==m||i[13]!==d?(S=m.has(d),i[12]=m,i[13]=d,i[14]=S):S=i[14];let C=S,w;i[15]===o?w=i[16]:(w=e(`px-2 py-1.5 text-sm`,`cursor-pointer aria-disabled:cursor-default`,o),i[15]=o,i[16]=w);let T;i[17]!==h||i[18]!==d?(T=()=>h(d),i[17]=h,i[18]=d,i[19]=T):T=i[19];let D;i[20]!==x||i[21]!==T?(D=v(r.Indicator,{role:`gridcell`,children:v(n,{checked:x,onChange:T,tabIndex:-1})}),i[20]=x,i[21]=T,i[22]=D):D=i[22];let O;i[23]===a?O=i[24]:(O=v(r.Content,{role:`gridcell`,children:a}),i[23]=a,i[24]=O);let k;i[25]!==_||i[26]!==C||i[27]!==D||i[28]!==O?(k=y(r.Root,{id:_,disabled:C,children:[D,O]}),i[25]=_,i[26]=C,i[27]=D,i[28]=O,i[29]=k):k=i[29];let A;return i[30]!==C||i[31]!==c||i[32]!==l||i[33]!==x||i[34]!==w||i[35]!==k||i[36]!==d?(A=v(s,{ref:l,asChild:!0,selected:x,disabled:C,className:w,...c,"data-slot":`selectable-list-item`,"data-value":d,children:k}),i[30]=C,i[31]=c,i[32]=l,i[33]=x,i[34]=w,i[35]=k,i[36]=d,i[37]=A):A=i[37],A},N=e=>{let t=u(2),n;return t[0]===e?n=t[1]:(n=v(r.Label,{"data-slot":`selectable-list-item-title`,...e}),t[0]=e,t[1]=n),n},P=e=>{let t=u(2),n;return t[0]===e?n=t[1]:(n=v(r.Description,{"data-slot":`selectable-list-item-description`,...e}),t[0]=e,t[1]=n),n};function F(e){return y(M,{value:e.value,children:[v(N,{children:e.label}),e.description!=null&&v(P,{children:e.description})]})}function I(e,t){let n=[],r=[];for(let i of e){let e=t(i);p(e)&&(n.push(d(e,{key:i.value})),r.push(i))}return{items:n,options:r}}function L(e,t){let n=u(17),{filteredOptions:r,listId:i,toggle:a}=E(e),o=t??F,s;n[0]!==r||n[1]!==o?(s=I(r,o),n[0]=r,n[1]=o,n[2]=s):s=n[2];let{items:c,options:l}=s,d;n[3]!==l||n[4]!==a?(d=e=>{let t=l[e];t!=null&&a(t.value)},n[3]=l,n[4]=a,n[5]=d):d=n[5];let f=d,p;n[6]!==l||n[7]!==i?(p=e=>{let t=l[e];return t==null?``:j(i,t.value)},n[6]=l,n[7]=i,n[8]=p):p=n[8];let m=p,h;n[9]===l?h=n[10]:(h=e=>l[e]?.disabled===!0,n[9]=l,n[10]=h);let g=h,_=c.length===0,v;return n[11]!==g||n[12]!==m||n[13]!==c||n[14]!==f||n[15]!==_?(v={isEmpty:_,isItemDisabled:g,onActivate:f,itemId:m,items:c},n[11]=g,n[12]=m,n[13]=c,n[14]=f,n[15]=_,n[16]=v):v=n[16],v}const R={Root:O,Filter:k,SelectAll:A,Viewport:e=>{let t=u(11),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({children:n,ref:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let{isEmpty:a,isItemDisabled:o,onActivate:s,itemId:l,items:d}=L(`Viewport`,n);if(a)return null;let f;return t[4]!==o||t[5]!==l||t[6]!==d||t[7]!==s||t[8]!==r||t[9]!==i?(f=v(c,{ref:i,"data-slot":`selectable-list-viewport`,semantics:`grid`,...r,"aria-multiselectable":!0,isItemDisabled:o,onActivate:s,itemId:l,children:d}),t[4]=o,t[5]=l,t[6]=d,t[7]=s,t[8]=r,t[9]=i,t[10]=f):f=t[10],f},VirtualViewport:e=>{let t=u(11),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({children:n,ref:i,...r}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let{isEmpty:a,isItemDisabled:o,onActivate:s,itemId:c,items:d}=L(`VirtualViewport`,n);if(a)return null;let f;return t[4]!==o||t[5]!==c||t[6]!==d||t[7]!==s||t[8]!==r||t[9]!==i?(f=v(l,{ref:i,"data-slot":`selectable-list-viewport`,semantics:`grid`,...r,"aria-multiselectable":!0,isItemDisabled:o,onActivate:s,itemId:c,children:d}),t[4]=o,t[5]=c,t[6]=d,t[7]=s,t[8]=r,t[9]=i,t[10]=f):f=t[10],f},Item:M,ItemTitle:N,ItemDescription:P,Empty:t=>{let n=u(17),r,i,a,o;n[0]===t?(r=n[1],i=n[2],a=n[3],o=n[4]):({children:r,className:i,ref:o,...a}=t,n[0]=t,n[1]=r,n[2]=i,n[3]=a,n[4]=o);let{filteredOptions:s}=E(`Empty`),c=s.length===0,l=!c&&`sr-only`,d=c&&`text-muted border-popover bg-popover flex items-center justify-center rounded-md border px-3 py-8 text-center text-sm`,f;n[5]!==i||n[6]!==l||n[7]!==d?(f=e(l,d,i),n[5]=i,n[6]=l,n[7]=d,n[8]=f):f=n[8];let p;n[9]!==r||n[10]!==c?(p=c&&v(`span`,{"data-slot":`selectable-list-empty-label`,className:`contents`,children:r}),n[9]=r,n[10]=c,n[11]=p):p=n[11];let m;return n[12]!==a||n[13]!==o||n[14]!==f||n[15]!==p?(m=v(`div`,{ref:o,"data-slot":`selectable-list-empty`,role:`status`,className:f,...a,children:p}),n[12]=a,n[13]=o,n[14]=f,n[15]=p,n[16]=m):m=n[16],m}};function z(e){return e.disabled}function B(e){return e.value}function V(e){return!e.disabled}function H(e){return!e.disabled}function U(e){return e.value}export{R as SelectableList,S as filterSelectableOptions,x as optionLabelText,w as summarizeSelection,C as toggleSelectionValue};
1
+ import{t as e}from"./cx-CK7o_rVv.js";import{t}from"./data-slot-EM6s2WEU.js";import{n,t as r}from"./checkbox-C3N2afhB.js";import{t as i}from"./choice-DQmecLfy.js";import{t as a}from"./use-callback-ref-BvVyI5K1.js";import{n as o,t as s}from"./input-D_DjD9lT.js";import{n as c,r as l,t as u}from"./list-DOVZoz9t.js";import{c as d}from"react/compiler-runtime";import{cloneElement as f,createContext as p,isValidElement as m,useContext as h,useId as g,useState as _}from"react";import v from"tiny-invariant";import{jsx as y,jsxs as b}from"react/jsx-runtime";import{MagnifyingGlassIcon as x}from"@phosphor-icons/react/MagnifyingGlass";function S(e){return e.labelText==null?typeof e.label==`string`?e.label:``:e.labelText}function C(e,t){let n=t.trim().toLowerCase();return n===``?e:e.filter(e=>S(e).toLowerCase().includes(n))}function w(e,t){return e.includes(t)?e.filter(e=>e!==t):[...e,t]}function T(e,t){let n=0,r=0;for(let i of e)i.disabled||(n+=1,t.has(i.value)&&(r+=1));return n===0?{allSelected:!1,someSelected:!1}:{allSelected:r===n,someSelected:r>0}}const E=p(null);function D(e){let t=h(E);return v(t,`SelectableList.${e} must be rendered inside SelectableList.Root.`),t}const O=[],k=n=>{let r=d(53),i,o,s,c,l,u,f,p,m,h,v,b;r[0]===n?(i=r[1],o=r[2],s=r[3],c=r[4],l=r[5],u=r[6],f=r[7],p=r[8],m=r[9],h=r[10],v=r[11],b=r[12]):({"data-slot":o,className:i,defaultQuery:s,defaultValue:c,filter:l,onQueryChange:u,onValueChange:f,options:p,query:h,ref:v,value:b,...m}=n,r[0]=n,r[1]=i,r[2]=o,r[3]=s,r[4]=c,r[5]=l,r[6]=u,r[7]=f,r[8]=p,r[9]=m,r[10]=h,r[11]=v,r[12]=b);let x=g(),S=b!=null,[T,D]=_(c??O),k=S?b:T,A=h!=null,[j,M]=_(s??``),N=A?h:j,P=a(f),F=a(u),I;r[13]!==S||r[14]!==P?(I=e=>{S||D(e),P(e)},r[13]=S,r[14]=P,r[15]=I):I=r[15];let L=I,R;r[16]!==A||r[17]!==F?(R=e=>{A||M(e),F(e)},r[16]=A,r[17]=F,r[18]=R):R=r[18];let z=R,V;r[19]===k?V=r[20]:(V=new Set(k),r[19]=k,r[20]=V);let H=V,U;r[21]===p?U=r[22]:(U=new Set(p.filter(B).map(ee)),r[21]=p,r[22]=U);let W=U,G;r[23]!==l||r[24]!==p||r[25]!==N?(G=l==null?C(p,N):p.filter(e=>l(e,N)),r[23]=l,r[24]=p,r[25]=N,r[26]=G):G=r[26];let K=G,q;r[27]!==L||r[28]!==W||r[29]!==k?(q=e=>{W.has(e)||L(w(k,e))},r[27]=L,r[28]=W,r[29]=k,r[30]=q):q=r[30];let J;r[31]!==L||r[32]!==W||r[33]!==K||r[34]!==x||r[35]!==N||r[36]!==H||r[37]!==k||r[38]!==z||r[39]!==q?(J={listId:x,filteredOptions:K,query:N,setQuery:z,selectedValues:k,selectedSet:H,disabledSet:W,toggle:q,setSelection:L},r[31]=L,r[32]=W,r[33]=K,r[34]=x,r[35]=N,r[36]=H,r[37]=k,r[38]=z,r[39]=q,r[40]=J):J=r[40];let Y=J,X;r[41]===o?X=r[42]:(X=t(o,`selectable-list`),r[41]=o,r[42]=X);let Z;r[43]===i?Z=r[44]:(Z=e(`flex w-full flex-col gap-3`,i),r[43]=i,r[44]=Z);let Q;r[45]!==m||r[46]!==v||r[47]!==X||r[48]!==Z?(Q=/* @__PURE__ */ y(`div`,{ref:v,"data-slot":X,className:Z,...m}),r[45]=m,r[46]=v,r[47]=X,r[48]=Z,r[49]=Q):Q=r[49];let $;return r[50]!==Y||r[51]!==Q?($=/* @__PURE__ */ y(E.Provider,{value:Y,children:Q}),r[50]=Y,r[51]=Q,r[52]=$):$=r[52],$},A=e=>{let n=d(18),r,i,a,c;n[0]===e?(r=n[1],i=n[2],a=n[3],c=n[4]):({"data-slot":r,"aria-label":c,ref:a,...i}=e,n[0]=e,n[1]=r,n[2]=i,n[3]=a,n[4]=c);let l=c===void 0?`Filter`:c,{query:u,setQuery:f}=D(`Filter`),p;n[5]===r?p=n[6]:(p=t(r,`selectable-list-filter`),n[5]=r,n[6]=p);let m;n[7]===f?m=n[8]:(m=e=>f(e.target.value),n[7]=f,n[8]=m);let h,g;n[9]===Symbol.for(`react.memo_cache_sentinel`)?(h=/* @__PURE__ */ y(x,{"aria-hidden":!0}),g=/* @__PURE__ */ y(o,{}),n[9]=h,n[10]=g):(h=n[9],g=n[10]);let _;return n[11]!==l||n[12]!==i||n[13]!==u||n[14]!==a||n[15]!==p||n[16]!==m?(_=/* @__PURE__ */ b(s,{ref:a,type:`text`,"data-slot":p,"aria-label":l,value:u,onChange:m,...i,children:[h,g]}),n[11]=l,n[12]=i,n[13]=u,n[14]=a,n[15]=p,n[16]=m,n[17]=_):_=n[17],_},j=i=>{let a=d(36),o,s,c,l,u;a[0]===i?(o=a[1],s=a[2],c=a[3],l=a[4],u=a[5]):({"data-slot":c,children:o,className:s,ref:u,...l}=i,a[0]=i,a[1]=o,a[2]=s,a[3]=c,a[4]=l,a[5]=u);let{filteredOptions:f,selectedValues:p,selectedSet:m,setSelection:h}=D(`SelectAll`),_=g(),v,x;if(a[6]!==f||a[7]!==m){let{allSelected:e,someSelected:t}=T(f,m);v=e,x=n({allSelected:v,someSelected:t}),a[6]=f,a[7]=m,a[8]=v,a[9]=x}else v=a[8],x=a[9];let S=x,C;a[10]===f?C=a[11]:(C=f.some(V),a[10]=f,a[11]=C);let w=C,E;a[12]!==v||a[13]!==f||a[14]!==p||a[15]!==h?(E=()=>{let e=f.filter(H).map(U);if(v){let t=new Set(e);h(p.filter(e=>!t.has(e)))}else h([.../* @__PURE__ */ new Set([...p,...e])])},a[12]=v,a[13]=f,a[14]=p,a[15]=h,a[16]=E):E=a[16];let O=E,k;a[17]===c?k=a[18]:(k=t(c,`selectable-list-select-all`),a[17]=c,a[18]=k);let A;a[19]===s?A=a[20]:(A=e(`text-strong flex cursor-pointer items-center gap-2 text-sm font-medium font-sans`,s),a[19]=s,a[20]=A);let j=!w,M;a[21]!==S||a[22]!==_||a[23]!==O||a[24]!==j?(M=/* @__PURE__ */ y(r,{id:_,checked:S,onChange:O,disabled:j}),a[21]=S,a[22]=_,a[23]=O,a[24]=j,a[25]=M):M=a[25];let N;a[26]===o?N=a[27]:(N=/* @__PURE__ */ y(`span`,{"data-slot":`selectable-list-select-all-label`,className:`contents`,children:o}),a[26]=o,a[27]=N);let P;return a[28]!==_||a[29]!==l||a[30]!==u||a[31]!==k||a[32]!==A||a[33]!==M||a[34]!==N?(P=/* @__PURE__ */ b(`label`,{ref:u,htmlFor:_,"data-slot":k,className:A,...l,children:[M,N]}),a[28]=_,a[29]=l,a[30]=u,a[31]=k,a[32]=A,a[33]=M,a[34]=N,a[35]=P):P=a[35],P};function M(e,t){return`${e}-control-${encodeURIComponent(t)}`}const N=n=>{let a=d(42),o,s,l,u,f,p;a[0]===n?(o=a[1],s=a[2],l=a[3],u=a[4],f=a[5],p=a[6]):({"data-slot":l,children:o,className:s,ref:f,value:p,...u}=n,a[0]=n,a[1]=o,a[2]=s,a[3]=l,a[4]=u,a[5]=f,a[6]=p);let{listId:m,selectedSet:h,disabledSet:g,toggle:_}=D(`Item`),v;a[7]!==m||a[8]!==p?(v=M(m,p),a[7]=m,a[8]=p,a[9]=v):v=a[9];let x=v,S;a[10]!==h||a[11]!==p?(S=h.has(p),a[10]=h,a[11]=p,a[12]=S):S=a[12];let C=S,w;a[13]!==g||a[14]!==p?(w=g.has(p),a[13]=g,a[14]=p,a[15]=w):w=a[15];let T=w,E;a[16]===s?E=a[17]:(E=e(`px-2 py-1.5 text-sm`,`cursor-pointer aria-disabled:cursor-default`,s),a[16]=s,a[17]=E);let O;a[18]===l?O=a[19]:(O=t(l,`selectable-list-item`),a[18]=l,a[19]=O);let k;a[20]!==_||a[21]!==p?(k=()=>_(p),a[20]=_,a[21]=p,a[22]=k):k=a[22];let A;a[23]!==C||a[24]!==k?(A=/* @__PURE__ */ y(i.Indicator,{role:`gridcell`,children:/* @__PURE__ */ y(r,{checked:C,onChange:k,tabIndex:-1})}),a[23]=C,a[24]=k,a[25]=A):A=a[25];let j;a[26]===o?j=a[27]:(j=/* @__PURE__ */ y(i.Content,{role:`gridcell`,children:o}),a[26]=o,a[27]=j);let N;a[28]!==x||a[29]!==T||a[30]!==A||a[31]!==j?(N=/* @__PURE__ */ b(i.Root,{id:x,disabled:T,children:[A,j]}),a[28]=x,a[29]=T,a[30]=A,a[31]=j,a[32]=N):N=a[32];let P;return a[33]!==T||a[34]!==u||a[35]!==f||a[36]!==C||a[37]!==E||a[38]!==O||a[39]!==N||a[40]!==p?(P=/* @__PURE__ */ y(c,{ref:f,asChild:!0,selected:C,disabled:T,className:E,...u,"data-slot":O,"data-value":p,children:N}),a[33]=T,a[34]=u,a[35]=f,a[36]=C,a[37]=E,a[38]=O,a[39]=N,a[40]=p,a[41]=P):P=a[41],P},P=e=>{let n=d(8),r,a;n[0]===e?(r=n[1],a=n[2]):({"data-slot":r,...a}=e,n[0]=e,n[1]=r,n[2]=a);let o;n[3]===r?o=n[4]:(o=t(r,`selectable-list-item-title`),n[3]=r,n[4]=o);let s;return n[5]!==a||n[6]!==o?(s=/* @__PURE__ */ y(i.Label,{"data-slot":o,...a}),n[5]=a,n[6]=o,n[7]=s):s=n[7],s},F=e=>{let n=d(8),r,a;n[0]===e?(r=n[1],a=n[2]):({"data-slot":r,...a}=e,n[0]=e,n[1]=r,n[2]=a);let o;n[3]===r?o=n[4]:(o=t(r,`selectable-list-item-description`),n[3]=r,n[4]=o);let s;return n[5]!==a||n[6]!==o?(s=/* @__PURE__ */ y(i.Description,{"data-slot":o,...a}),n[5]=a,n[6]=o,n[7]=s):s=n[7],s};function I(e){return/* @__PURE__ */ b(N,{value:e.value,children:[/* @__PURE__ */ y(P,{children:e.label}),e.description!=null&&/* @__PURE__ */ y(F,{children:e.description})]})}function L(e,t){let n=[],r=[];for(let i of e){let e=t(i);m(e)&&(n.push(f(e,{key:i.value})),r.push(i))}return{items:n,options:r}}function R(e,t){let n=d(17),{filteredOptions:r,listId:i,toggle:a}=D(e),o=t??I,s;n[0]!==r||n[1]!==o?(s=L(r,o),n[0]=r,n[1]=o,n[2]=s):s=n[2];let{items:c,options:l}=s,u;n[3]!==l||n[4]!==a?(u=e=>{let t=l[e];t!=null&&a(t.value)},n[3]=l,n[4]=a,n[5]=u):u=n[5];let f=u,p;n[6]!==l||n[7]!==i?(p=e=>{let t=l[e];return t==null?``:M(i,t.value)},n[6]=l,n[7]=i,n[8]=p):p=n[8];let m=p,h;n[9]===l?h=n[10]:(h=e=>l[e]?.disabled===!0,n[9]=l,n[10]=h);let g=h,_=c.length===0,v;return n[11]!==g||n[12]!==m||n[13]!==c||n[14]!==f||n[15]!==_?(v={isEmpty:_,isItemDisabled:g,onActivate:f,itemId:m,items:c},n[11]=g,n[12]=m,n[13]=c,n[14]=f,n[15]=_,n[16]=v):v=n[16],v}const z={Root:k,Filter:A,SelectAll:j,Viewport:e=>{let n=d(15),r,i,a,o;n[0]===e?(r=n[1],i=n[2],a=n[3],o=n[4]):({"data-slot":i,children:r,ref:o,...a}=e,n[0]=e,n[1]=r,n[2]=i,n[3]=a,n[4]=o);let{isEmpty:s,isItemDisabled:c,onActivate:u,itemId:f,items:p}=R(`Viewport`,r);if(s)return null;let m;n[5]===i?m=n[6]:(m=t(i,`selectable-list-viewport`),n[5]=i,n[6]=m);let h;return n[7]!==c||n[8]!==f||n[9]!==p||n[10]!==u||n[11]!==a||n[12]!==o||n[13]!==m?(h=/* @__PURE__ */ y(l,{ref:o,"data-slot":m,semantics:`grid`,...a,"aria-multiselectable":!0,isItemDisabled:c,onActivate:u,itemId:f,children:p}),n[7]=c,n[8]=f,n[9]=p,n[10]=u,n[11]=a,n[12]=o,n[13]=m,n[14]=h):h=n[14],h},VirtualViewport:e=>{let n=d(15),r,i,a,o;n[0]===e?(r=n[1],i=n[2],a=n[3],o=n[4]):({"data-slot":i,children:r,ref:o,...a}=e,n[0]=e,n[1]=r,n[2]=i,n[3]=a,n[4]=o);let{isEmpty:s,isItemDisabled:c,onActivate:l,itemId:f,items:p}=R(`VirtualViewport`,r);if(s)return null;let m;n[5]===i?m=n[6]:(m=t(i,`selectable-list-viewport`),n[5]=i,n[6]=m);let h;return n[7]!==c||n[8]!==f||n[9]!==p||n[10]!==l||n[11]!==a||n[12]!==o||n[13]!==m?(h=/* @__PURE__ */ y(u,{ref:o,"data-slot":m,semantics:`grid`,...a,"aria-multiselectable":!0,isItemDisabled:c,onActivate:l,itemId:f,children:p}),n[7]=c,n[8]=f,n[9]=p,n[10]=l,n[11]=a,n[12]=o,n[13]=m,n[14]=h):h=n[14],h},Item:N,ItemTitle:P,ItemDescription:F,Empty:n=>{let r=d(21),i,a,o,s,c;r[0]===n?(i=r[1],a=r[2],o=r[3],s=r[4],c=r[5]):({"data-slot":o,children:i,className:a,ref:c,...s}=n,r[0]=n,r[1]=i,r[2]=a,r[3]=o,r[4]=s,r[5]=c);let{filteredOptions:l}=D(`Empty`),u=l.length===0,f;r[6]===o?f=r[7]:(f=t(o,`selectable-list-empty`),r[6]=o,r[7]=f);let p=!u&&`sr-only`,m=u&&`text-muted border-popover bg-popover flex items-center justify-center rounded-md border px-3 py-8 text-center text-sm`,h;r[8]!==a||r[9]!==p||r[10]!==m?(h=e(p,m,a),r[8]=a,r[9]=p,r[10]=m,r[11]=h):h=r[11];let g;r[12]!==i||r[13]!==u?(g=u&&/* @__PURE__ */ y(`span`,{"data-slot":`selectable-list-empty-label`,className:`contents`,children:i}),r[12]=i,r[13]=u,r[14]=g):g=r[14];let _;return r[15]!==s||r[16]!==c||r[17]!==f||r[18]!==h||r[19]!==g?(_=/* @__PURE__ */ y(`div`,{ref:c,"data-slot":f,role:`status`,className:h,...s,children:g}),r[15]=s,r[16]=c,r[17]=f,r[18]=h,r[19]=g,r[20]=_):_=r[20],_}};function B(e){return e.disabled}function ee(e){return e.value}function V(e){return!e.disabled}function H(e){return!e.disabled}function U(e){return e.value}export{z as SelectableList,C as filterSelectableOptions,S as optionLabelText,T as summarizeSelection,w as toggleSelectionValue};
@@ -0,0 +1 @@
1
+ import{t as e}from"./cx-CK7o_rVv.js";import{t}from"./data-slot-EM6s2WEU.js";import{t as n}from"./slot-DdYN1L1C.js";import{c as r}from"react/compiler-runtime";import{createContext as i,useContext as a}from"react";import{jsx as o}from"react/jsx-runtime";const s=[`horizontal`,`vertical`],c=i({}),l={orientation:`horizontal`},u=i=>{let a=r(16),s,u,d,f,p;a[0]===i?(s=a[1],u=a[2],d=a[3],f=a[4],p=a[5]):({"data-slot":f,className:d,children:u,asChild:s,...p}=i,a[0]=i,a[1]=s,a[2]=u,a[3]=d,a[4]=f,a[5]=p);let m=s?n:`div`,h;a[6]===f?h=a[7]:(h=t(f,`horizontal-separator-group`),a[6]=f,a[7]=h);let g;a[8]===d?g=a[9]:(g=e(`group flex items-center gap-2 [&>*:not([data-separator])]:shrink-0`,d),a[8]=d,a[9]=g);let _;return a[10]!==m||a[11]!==u||a[12]!==p||a[13]!==h||a[14]!==g?(_=/* @__PURE__ */ o(c.Provider,{value:l,children:/* @__PURE__ */ o(m,{"data-slot":h,"data-horizontal-separator-group":!0,className:g,...p,children:u})}),a[10]=m,a[11]=u,a[12]=p,a[13]=h,a[14]=g,a[15]=_):_=a[15],_},d=i=>{let s=r(32),l,u,d,p,m,h,g,_;s[0]===i?(l=s[1],u=s[2],d=s[3],p=s[4],m=s[5],h=s[6],g=s[7],_=s[8]):({"data-slot":d,asChild:g,children:l,className:u,orientation:p,ref:h,semantic:_,...m}=i,s[0]=i,s[1]=l,s[2]=u,s[3]=d,s[4]=p,s[5]=m,s[6]=h,s[7]=g,s[8]=_);let v=g!==void 0&&g,y=_!==void 0&&_,b=v?n:`div`,x=a(c),S;s[9]!==x.orientation||s[10]!==p?(S=x.orientation??(f(p)?p:`horizontal`),s[9]=x.orientation,s[10]=p,s[11]=S):S=s[11];let C=S,w=C===`vertical`?C:void 0,T;s[12]!==w||s[13]!==y?(T=y?{"aria-orientation":w,role:`separator`}:{role:`none`},s[12]=w,s[13]=y,s[14]=T):T=s[14];let E=T,D;s[15]===d?D=s[16]:(D=t(d,`separator`),s[15]=d,s[16]=D);let O=C===`horizontal`?`h-px w-full group-data-horizontal-separator-group:flex-1`:`h-full w-px`,k;s[17]!==u||s[18]!==O?(k=e(`separator`,`bg-separator`,O,u),s[17]=u,s[18]=O,s[19]=k):k=s[19];let A;s[20]!==v||s[21]!==l?(A=v?{children:l}:{},s[20]=v,s[21]=l,s[22]=A):A=s[22];let j;return s[23]!==b||s[24]!==C||s[25]!==m||s[26]!==h||s[27]!==E||s[28]!==D||s[29]!==k||s[30]!==A?(j=/* @__PURE__ */ o(b,{"data-slot":D,className:k,"data-orientation":C,"data-separator":!0,...E,ref:h,...A,...m}),s[23]=b,s[24]=C,s[25]=m,s[26]=h,s[27]=E,s[28]=D,s[29]=k,s[30]=A,s[31]=j):j=s[31],j};function f(e){return typeof e==`string`&&s.includes(e)}export{d as n,u as t};
@@ -1,4 +1,5 @@
1
1
  import { n as WithAsChild } from "./as-child-D23mGo4f.js";
2
+ import { t as WithDataSlot } from "./data-slot-CChfb_cv.js";
2
3
  import { ComponentProps } from "react";
3
4
  //#region src/components/separator/separator.d.ts
4
5
  declare const orientations: readonly ["horizontal", "vertical"];
@@ -33,7 +34,7 @@ type Orientation = (typeof orientations)[number];
33
34
  * </HorizontalSeparatorGroup>
34
35
  * ```
35
36
  */
36
- declare const HorizontalSeparatorGroup: ({ className, children, asChild, ...props }: ComponentProps<"div"> & WithAsChild) => import("react").JSX.Element;
37
+ declare const HorizontalSeparatorGroup: ({ "data-slot": dataSlot, className, children, asChild, ...props }: ComponentProps<"div"> & WithAsChild & WithDataSlot) => import("react").JSX.Element;
37
38
  type SeparatorProps = ComponentProps<"div"> & WithAsChild & {
38
39
  /**
39
40
  * Either `horizontal` or `vertical`.
@@ -49,7 +50,7 @@ type SeparatorProps = ComponentProps<"div"> & WithAsChild & {
49
50
  * @default false
50
51
  */
51
52
  semantic?: boolean;
52
- };
53
+ } & WithDataSlot;
53
54
  /**
54
55
  * Visually or semantically separates content.
55
56
  *
@@ -81,6 +82,6 @@ type SeparatorProps = ComponentProps<"div"> & WithAsChild & {
81
82
  * </div>
82
83
  * ```
83
84
  */
84
- declare const Separator: ({ asChild, children, className, orientation: propOrientation, ref, semantic, ...props }: SeparatorProps) => import("react").JSX.Element;
85
+ declare const Separator: ({ "data-slot": dataSlot, asChild, children, className, orientation: propOrientation, ref, semantic, ...props }: SeparatorProps) => import("react").JSX.Element;
85
86
  //#endregion
86
87
  export { Separator as n, HorizontalSeparatorGroup as t };
@@ -1,2 +1,2 @@
1
- import { n as Separator, t as HorizontalSeparatorGroup } from "./separator-Bo4nY_3M.js";
1
+ import { n as Separator, t as HorizontalSeparatorGroup } from "./separator-HzGvuD0B.js";
2
2
  export { HorizontalSeparatorGroup, Separator };
package/dist/separator.js CHANGED
@@ -1 +1 @@
1
- import{n as e,t}from"./separator-D98be0gY.js";export{t as HorizontalSeparatorGroup,e as Separator};
1
+ export{t as HorizontalSeparatorGroup,n as Separator}from"./separator-DvPe27fH.js";
@@ -0,0 +1 @@
1
+ import{t as e}from"./cx-CK7o_rVv.js";import{t}from"./data-slot-EM6s2WEU.js";import{t as n}from"./button-BMfUxs_j.js";import{t as r}from"./layer-container-DLf-6eBz.js";import{a as i,c as a,i as o,l as s,n as c,o as l,r as u,s as d,t as f}from"./primitive-B-6XILB2.js";import{c as p}from"react/compiler-runtime";import{jsx as m,jsxs as h}from"react/jsx-runtime";import{XIcon as g}from"@phosphor-icons/react/X";import{cva as _}from"class-variance-authority";const v=s();function y(){return v(void 0)}const b=e=>{let t=p(3),n=y(),r;return t[0]!==e||t[1]!==n?(r=/* @__PURE__ */ m(l,{...e,...n}),t[0]=e,t[1]=n,t[2]=r):r=t[2],r},x=e=>{let t=p(3),n=y(),r;return t[0]!==e||t[1]!==n?(r=/* @__PURE__ */ m(a,{...e,...n}),t[0]=e,t[1]=n,t[2]=r):r=t[2],r},S=e=>{let t=p(3),n=y(),r;return t[0]!==e||t[1]!==n?(r=/* @__PURE__ */ m(f,{...e,...n}),t[0]=e,t[1]=n,t[2]=r):r=t[2],r},C=e=>{let t=p(3),n=y(),r;return t[0]!==e||t[1]!==n?(r=/* @__PURE__ */ m(i,{...e,...n}),t[0]=e,t[1]=n,t[2]=r):r=t[2],r},w=n=>{let r=p(15),i,a,s,c;r[0]===n?(i=r[1],a=r[2],s=r[3],c=r[4]):({"data-slot":a,className:i,ref:c,...s}=n,r[0]=n,r[1]=i,r[2]=a,r[3]=s,r[4]=c);let l=y(),u;r[5]===a?u=r[6]:(u=t(a,`sheet-overlay`),r[5]=a,r[6]=u);let d;r[7]===i?d=r[8]:(d=e(`bg-overlay data-state-closed:animate-out data-state-closed:fade-out-0 data-state-open:animate-in data-state-open:fade-in-0 fixed inset-0 z-60 backdrop-blur-xs`,i),r[7]=i,r[8]=d);let f;return r[9]!==s||r[10]!==c||r[11]!==l||r[12]!==u||r[13]!==d?(f=/* @__PURE__ */ m(o,{"data-slot":u,className:d,...s,...l,ref:c}),r[9]=s,r[10]=c,r[11]=l,r[12]=u,r[13]=d,r[14]=f):f=r[14],f},T=_(`bg-dialog border-dialog inset-y-0 h-full w-full fixed flex flex-col shadow-lg outline-hidden transition ease-in-out focus-within:outline-hidden data-state-closed:duration-100 data-state-closed:animate-out data-state-open:duration-100 data-state-open:animate-in`,{variants:{side:{left:`data-state-closed:slide-out-to-left data-state-open:slide-in-from-left left-0 border-r`,right:`data-state-closed:slide-out-to-right data-state-open:slide-in-from-right right-0 border-l`}},defaultVariants:{side:`right`}}),E={Root:b,Actions:n=>{let r=p(16),i,a,o,s,c;r[0]===n?(i=r[1],a=r[2],o=r[3],s=r[4],c=r[5]):({"data-slot":o,children:i,className:a,ref:c,...s}=n,r[0]=n,r[1]=i,r[2]=a,r[3]=o,r[4]=s,r[5]=c);let l;r[6]===o?l=r[7]:(l=t(o,`sheet-actions`),r[6]=o,r[7]=l);let u;r[8]===a?u=r[9]:(u=e(`flex h-full items-center gap-2`,a),r[8]=a,r[9]=u);let d;return r[10]!==i||r[11]!==s||r[12]!==c||r[13]!==l||r[14]!==u?(d=/* @__PURE__ */ m(`div`,{"data-slot":l,className:u,...s,ref:c,children:i}),r[10]=i,r[11]=s,r[12]=c,r[13]=l,r[14]=u,r[15]=d):d=r[15],d},Body:n=>{let r=p(12),i,a,o;r[0]===n?(i=r[1],a=r[2],o=r[3]):({"data-slot":a,className:i,...o}=n,r[0]=n,r[1]=i,r[2]=a,r[3]=o);let s;r[4]===a?s=r[5]:(s=t(a,`sheet-body`),r[4]=a,r[5]=s);let c;r[6]===i?c=r[7]:(c=e(`scrollbar scrollbar-gutter-stable text-body flex-1 overflow-y-auto p-6`,i),r[6]=i,r[7]=c);let l;return r[8]!==o||r[9]!==s||r[10]!==c?(l=/* @__PURE__ */ m(`div`,{"data-slot":s,className:c,...o}),r[8]=o,r[9]=s,r[10]=c,r[11]=l):l=r[11],l},Close:S,CloseIconButton:e=>{let r=p(22),i,a,o,s,c,l,u;r[0]===e?(i=r[1],a=r[2],o=r[3],s=r[4],c=r[5],l=r[6],u=r[7]):({"data-slot":i,size:o,type:s,label:c,appearance:l,intent:u,...a}=e,r[0]=e,r[1]=i,r[2]=a,r[3]=o,r[4]=s,r[5]=c,r[6]=l,r[7]=u);let d=o===void 0?`md`:o,h=s===void 0?`button`:s,_=c===void 0?`Close Sheet`:c,v=l===void 0?`ghost`:l,b=u===void 0?`neutral`:u,x=y(),S;r[8]===i?S=r[9]:(S=t(i,`sheet-close-icon-button`),r[8]=i,r[9]=S);let C;r[10]===Symbol.for(`react.memo_cache_sentinel`)?(C=/* @__PURE__ */ m(g,{}),r[10]=C):C=r[10];let w;r[11]!==v||r[12]!==b||r[13]!==_||r[14]!==a||r[15]!==d||r[16]!==S||r[17]!==h?(w=/* @__PURE__ */ m(n,{"data-slot":S,appearance:v,icon:C,intent:b,label:_,size:d,type:h,...a}),r[11]=v,r[12]=b,r[13]=_,r[14]=a,r[15]=d,r[16]=S,r[17]=h,r[18]=w):w=r[18];let T;return r[19]!==x||r[20]!==w?(T=/* @__PURE__ */ m(f,{asChild:!0,...x,children:w}),r[19]=x,r[20]=w,r[21]=T):T=r[21],T},Content:n=>{let i=p(22),a,o,s,l,u,d,f;i[0]===n?(a=i[1],o=i[2],s=i[3],l=i[4],u=i[5],d=i[6],f=i[7]):({"data-slot":s,children:a,className:o,preferredWidth:d,side:f,ref:u,...l}=n,i[0]=n,i[1]=a,i[2]=o,i[3]=s,i[4]=l,i[5]=u,i[6]=d,i[7]=f);let g=d===void 0?`sm:max-w-[30rem]`:d,_=f===void 0?`right`:f,v=y(),b;i[8]===Symbol.for(`react.memo_cache_sentinel`)?(b=/* @__PURE__ */ m(w,{}),i[8]=b):b=i[8];let x;i[9]===s?x=i[10]:(x=t(s,`sheet-content`),i[9]=s,i[10]=x);let S;i[11]!==o||i[12]!==g||i[13]!==_?(S=e(T({side:_}),g,o),i[11]=o,i[12]=g,i[13]=_,i[14]=S):S=i[14];let E;return i[15]!==a||i[16]!==l||i[17]!==u||i[18]!==v||i[19]!==x||i[20]!==S?(E=/* @__PURE__ */ h(C,{children:[b,/* @__PURE__ */ m(r,{"data-slot":`sheet-positioner`,className:`fixed z-60`,children:/* @__PURE__ */ m(c,{"data-slot":x,"data-mantle-modal-content":!0,className:S,ref:u,...l,...v,children:a})})]}),i[15]=a,i[16]=l,i[17]=u,i[18]=v,i[19]=x,i[20]=S,i[21]=E):E=i[21],E},Description:n=>{let r=p(15),i,a,o,s;r[0]===n?(i=r[1],a=r[2],o=r[3],s=r[4]):({"data-slot":a,className:i,ref:s,...o}=n,r[0]=n,r[1]=i,r[2]=a,r[3]=o,r[4]=s);let c=y(),l;r[5]===a?l=r[6]:(l=t(a,`sheet-description`),r[5]=a,r[6]=l);let d;r[7]===i?d=r[8]:(d=e(`text-body text-sm`,i),r[7]=i,r[8]=d);let f;return r[9]!==o||r[10]!==s||r[11]!==c||r[12]!==l||r[13]!==d?(f=/* @__PURE__ */ m(u,{"data-slot":l,ref:s,className:d,...o,...c}),r[9]=o,r[10]=s,r[11]=c,r[12]=l,r[13]=d,r[14]=f):f=r[14],f},Footer:n=>{let r=p(12),i,a,o;r[0]===n?(i=r[1],a=r[2],o=r[3]):({"data-slot":a,className:i,...o}=n,r[0]=n,r[1]=i,r[2]=a,r[3]=o);let s;r[4]===a?s=r[5]:(s=t(a,`sheet-footer`),r[4]=a,r[5]=s);let c;r[6]===i?c=r[7]:(c=e(`border-dialog-muted flex shrink-0 justify-end gap-2 border-t px-6 py-2.5`,i),r[6]=i,r[7]=c);let l;return r[8]!==o||r[9]!==s||r[10]!==c?(l=/* @__PURE__ */ m(`div`,{"data-slot":s,className:c,...o}),r[8]=o,r[9]=s,r[10]=c,r[11]=l):l=r[11],l},Header:n=>{let r=p(12),i,a,o;r[0]===n?(i=r[1],a=r[2],o=r[3]):({"data-slot":a,className:i,...o}=n,r[0]=n,r[1]=i,r[2]=a,r[3]=o);let s;r[4]===a?s=r[5]:(s=t(a,`sheet-header`),r[4]=a,r[5]=s);let c;r[6]===i?c=r[7]:(c=e(`border-dialog-muted flex shrink-0 flex-col gap-2 border-b py-4 pl-6 pr-4`,`has-[.icon-button]:pr-4`,i),r[6]=i,r[7]=c);let l;return r[8]!==o||r[9]!==s||r[10]!==c?(l=/* @__PURE__ */ m(`div`,{"data-slot":s,className:c,...o}),r[8]=o,r[9]=s,r[10]=c,r[11]=l):l=r[11],l},Title:n=>{let r=p(15),i,a,o,s;r[0]===n?(i=r[1],a=r[2],o=r[3],s=r[4]):({"data-slot":a,className:i,ref:s,...o}=n,r[0]=n,r[1]=i,r[2]=a,r[3]=o,r[4]=s);let c=y(),l;r[5]===a?l=r[6]:(l=t(a,`sheet-title`),r[5]=a,r[6]=l);let u;r[7]===i?u=r[8]:(u=e(`text-strong flex-1 truncate text-lg font-medium`,i),r[7]=i,r[8]=u);let f;return r[9]!==o||r[10]!==s||r[11]!==c||r[12]!==l||r[13]!==u?(f=/* @__PURE__ */ m(d,{"data-slot":l,ref:s,className:u,...o,...c}),r[9]=o,r[10]=s,r[11]=c,r[12]=l,r[13]=u,r[14]=f):f=r[14],f},TitleGroup:n=>{let r=p(16),i,a,o,s,c;r[0]===n?(i=r[1],a=r[2],o=r[3],s=r[4],c=r[5]):({"data-slot":o,children:i,className:a,ref:c,...s}=n,r[0]=n,r[1]=i,r[2]=a,r[3]=o,r[4]=s,r[5]=c);let l;r[6]===o?l=r[7]:(l=t(o,`sheet-title-group`),r[6]=o,r[7]=l);let u;r[8]===a?u=r[9]:(u=e(`flex items-center justify-between gap-2`,a),r[8]=a,r[9]=u);let d;return r[10]!==i||r[11]!==s||r[12]!==c||r[13]!==l||r[14]!==u?(d=/* @__PURE__ */ m(`div`,{"data-slot":l,className:u,...s,ref:c,children:i}),r[10]=i,r[11]=s,r[12]=c,r[13]=l,r[14]=u,r[15]=d):d=r[15],d},Trigger:x};export{E as t};
package/dist/sheet.d.ts CHANGED
@@ -1,4 +1,5 @@
1
- import { i as IconButtonIntent, n as IconButtonProps, r as IconButtonAppearance } from "./button-crUf0hbR.js";
1
+ import { t as WithDataSlot } from "./data-slot-CChfb_cv.js";
2
+ import { i as IconButtonIntent, n as IconButtonProps, r as IconButtonAppearance } from "./button-DL7V4bzW.js";
2
3
  import { c as Trigger$1, n as Content$1, o as Root$1, r as Description$1, s as Title$1, t as Close$1 } from "./dialog-CZYD3xL-.js";
3
4
  import { ComponentProps, HTMLAttributes } from "react";
4
5
  import { VariantProps } from "class-variance-authority";
@@ -213,7 +214,7 @@ type SheetContentProps = ComponentProps<typeof Content$1> & VariantProps<typeof
213
214
  * @default `sm:max-w-[30rem]`
214
215
  */
215
216
  preferredWidth?: `sm:max-w-${string}`;
216
- };
217
+ } & WithDataSlot;
217
218
  /**
218
219
  * The main container for a `Sheet`. Should be rendered as a child of the `Sheet` component.
219
220
  * Renders on top of the overlay backdrop.
@@ -271,7 +272,7 @@ type SheetContentProps = ComponentProps<typeof Content$1> & VariantProps<typeof
271
272
  * </Sheet.Root>
272
273
  * ```
273
274
  */
274
- declare const Content: ({ children, className, preferredWidth, side, ref, ...props }: SheetContentProps) => import("react").JSX.Element;
275
+ declare const Content: ({ "data-slot": dataSlot, children, className, preferredWidth, side, ref, ...props }: SheetContentProps) => import("react").JSX.Element;
275
276
  type SheetCloseIconButtonProps = Partial<Omit<IconButtonProps, "icon" | "appearance" | "intent">> & {
276
277
  /**
277
278
  * The visual style of the close icon button. Optional here —
@@ -289,7 +290,7 @@ type SheetCloseIconButtonProps = Partial<Omit<IconButtonProps, "icon" | "appeara
289
290
  * @default "neutral"
290
291
  */
291
292
  intent?: IconButtonIntent;
292
- };
293
+ } & WithDataSlot;
293
294
  /**
294
295
  * An icon button that closes the `Sheet` when clicked.
295
296
  * Should be rendered within the `Sheet.Header` as a child of `Sheet.Actions`.
@@ -343,7 +344,7 @@ type SheetCloseIconButtonProps = Partial<Omit<IconButtonProps, "icon" | "appeara
343
344
  * </Sheet.Root>
344
345
  * ```
345
346
  */
346
- declare const CloseIconButton: ({ size, type, label, appearance, intent, ...props }: SheetCloseIconButtonProps) => import("react").JSX.Element;
347
+ declare const CloseIconButton: ({ "data-slot": dataSlot, size, type, label, appearance, intent, ...props }: SheetCloseIconButtonProps) => import("react").JSX.Element;
347
348
  /**
348
349
  * The body container for a `Sheet`. This is where you would typically place the main content of the sheet, such as forms or text.
349
350
  * Should be rendered as a child of `Sheet.Content`.
@@ -394,7 +395,7 @@ declare const CloseIconButton: ({ size, type, label, appearance, intent, ...prop
394
395
  * </Sheet.Root>
395
396
  * ```
396
397
  */
397
- declare const Body: ({ className, ...props }: HTMLAttributes<HTMLDivElement>) => import("react").JSX.Element;
398
+ declare const Body: ({ "data-slot": dataSlot, className, ...props }: HTMLAttributes<HTMLDivElement> & WithDataSlot) => import("react").JSX.Element;
398
399
  /**
399
400
  * The header container for a `Sheet`. This is where you would typically place the title, description, and actions.
400
401
  * Should be rendered as a child of `Sheet.Content`.
@@ -445,7 +446,7 @@ declare const Body: ({ className, ...props }: HTMLAttributes<HTMLDivElement>) =>
445
446
  * </Sheet.Root>
446
447
  * ```
447
448
  */
448
- declare const Header: ({ className, ...props }: HTMLAttributes<HTMLDivElement>) => import("react").JSX.Element;
449
+ declare const Header: ({ "data-slot": dataSlot, className, ...props }: HTMLAttributes<HTMLDivElement> & WithDataSlot) => import("react").JSX.Element;
449
450
  /**
450
451
  * The footer container for a `Sheet`. This is where you would typically place close and submit buttons.
451
452
  * Should be rendered as a child of `Sheet.Content`.
@@ -496,7 +497,7 @@ declare const Header: ({ className, ...props }: HTMLAttributes<HTMLDivElement>)
496
497
  * </Sheet.Root>
497
498
  * ```
498
499
  */
499
- declare const Footer: ({ className, ...props }: HTMLAttributes<HTMLDivElement>) => import("react").JSX.Element;
500
+ declare const Footer: ({ "data-slot": dataSlot, className, ...props }: HTMLAttributes<HTMLDivElement> & WithDataSlot) => import("react").JSX.Element;
500
501
  /**
501
502
  * The title for a `Sheet`. Typically rendered as a child of `Sheet.TitleGroup`.
502
503
  * Defaults to an `h2` element, but can be changed via the `asChild` prop.
@@ -547,7 +548,7 @@ declare const Footer: ({ className, ...props }: HTMLAttributes<HTMLDivElement>)
547
548
  * </Sheet.Root>
548
549
  * ```
549
550
  */
550
- declare const Title: ({ className, ref, ...props }: ComponentProps<typeof Title$1>) => import("react").JSX.Element;
551
+ declare const Title: ({ "data-slot": dataSlot, className, ref, ...props }: ComponentProps<typeof Title$1> & WithDataSlot) => import("react").JSX.Element;
551
552
  /**
552
553
  * A group container for the title and actions of a sheet. Typically rendered as a child of `Sheet.Header`.
553
554
  *
@@ -597,7 +598,7 @@ declare const Title: ({ className, ref, ...props }: ComponentProps<typeof Title$
597
598
  * </Sheet.Root>
598
599
  * ```
599
600
  */
600
- declare const TitleGroup: ({ children, className, ref, ...props }: ComponentProps<"div">) => import("react").JSX.Element;
601
+ declare const TitleGroup: ({ "data-slot": dataSlot, children, className, ref, ...props }: ComponentProps<"div"> & WithDataSlot) => import("react").JSX.Element;
601
602
  /**
602
603
  * A description for a sheet. Typically rendered as a child of `Sheet.Header`.
603
604
  *
@@ -647,7 +648,7 @@ declare const TitleGroup: ({ children, className, ref, ...props }: ComponentProp
647
648
  * </Sheet.Root>
648
649
  * ```
649
650
  */
650
- declare const Description: ({ className, ref, ...props }: ComponentProps<typeof Description$1>) => import("react").JSX.Element;
651
+ declare const Description: ({ "data-slot": dataSlot, className, ref, ...props }: ComponentProps<typeof Description$1> & WithDataSlot) => import("react").JSX.Element;
651
652
  /**
652
653
  * A group container for the actions of a `Sheet`. Typically rendered as a child of `Sheet.TitleGroup`.
653
654
  *
@@ -697,7 +698,7 @@ declare const Description: ({ className, ref, ...props }: ComponentProps<typeof
697
698
  * </Sheet.Root>
698
699
  * ```
699
700
  */
700
- declare const Actions: ({ children, className, ref, ...props }: ComponentProps<"div">) => import("react").JSX.Element;
701
+ declare const Actions: ({ "data-slot": dataSlot, children, className, ref, ...props }: ComponentProps<"div"> & WithDataSlot) => import("react").JSX.Element;
701
702
  /**
702
703
  * A container that overlays the current view from the edge of the screen.
703
704
  * It is a lightweight way of allowing users to complete a task without losing
package/dist/sheet.js CHANGED
@@ -1 +1 @@
1
- import{t as e}from"./sheet-B5x8EO9Y.js";export{e as Sheet};
1
+ export{t as Sheet}from"./sheet-DND_KjmS.js";