@ngrok/mantle 0.93.7 → 0.94.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 (193) hide show
  1. package/dist/accordion.d.ts +13 -1
  2. package/dist/accordion.js +1 -1
  3. package/dist/agent.json +1181 -36
  4. package/dist/alert-CH99Rw-R.js +1 -0
  5. package/dist/{alert-BcSBNR3S.d.ts → alert-HffaioZM.d.ts} +31 -21
  6. package/dist/alert-center.d.ts +15 -3
  7. package/dist/alert-center.js +1 -1
  8. package/dist/alert-dialog.d.ts +15 -2
  9. package/dist/alert-dialog.js +1 -1
  10. package/dist/alert.d.ts +6 -1
  11. package/dist/alert.js +1 -1
  12. package/dist/anchor.d.ts +12 -0
  13. package/dist/app-layout.d.ts +16 -1
  14. package/dist/app-layout.js +1 -1
  15. package/dist/area-chart.d.ts +144 -88
  16. package/dist/area-chart.js +1 -1
  17. package/dist/avatar.d.ts +12 -0
  18. package/dist/badge.d.ts +13 -1
  19. package/dist/bar-chart.d.ts +144 -89
  20. package/dist/bar-chart.js +1 -1
  21. package/dist/breadcrumb.d.ts +11 -0
  22. package/dist/breadcrumb.js +1 -1
  23. package/dist/browser-only.d.ts +8 -0
  24. package/dist/{button-Yxyu1XMd.d.ts → button-BGwOPjGV.d.ts} +7 -1
  25. package/dist/{button-B8k98Pby.js → button-BWGUuWnu.js} +1 -1
  26. package/dist/{button-CPsKGDK0.d.ts → button-Cgf2IcEC.d.ts} +8 -1
  27. package/dist/button-Cu9e3SM7.js +1 -0
  28. package/dist/{button-BX-4lYUn.d.ts → button-K0pKc3GN.d.ts} +3 -3
  29. package/dist/button.d.ts +9 -3
  30. package/dist/button.js +1 -1
  31. package/dist/calendar.d.ts +7 -0
  32. package/dist/calendar.js +1 -1
  33. package/dist/card.d.ts +6 -1
  34. package/dist/centered-layout.d.ts +11 -0
  35. package/dist/chart-BO9EwQ60.js +1 -0
  36. package/dist/chart-CE5Uaqz9.js +1 -0
  37. package/dist/chart-DCTGGlWL.js +1 -0
  38. package/dist/chart-DudCw24t.js +2 -0
  39. package/dist/{chart-BpfbtOUN.d.ts → chart-jitNqimS.d.ts} +99 -103
  40. package/dist/{checkbox-DmSQXs26.js → checkbox-CS504fKk.js} +1 -1
  41. package/dist/checkbox.d.ts +14 -1
  42. package/dist/checkbox.js +1 -1
  43. package/dist/{choice-BLR0_MeB.d.ts → choice-BwfmbepO.d.ts} +7 -1
  44. package/dist/choice-uyYccm0A.js +1 -0
  45. package/dist/choice.d.ts +6 -1
  46. package/dist/choice.js +1 -1
  47. package/dist/code-block.d.ts +13 -2
  48. package/dist/code-block.js +1 -1
  49. package/dist/code-block_highlight-utils.d.ts +5 -0
  50. package/dist/code.d.ts +13 -0
  51. package/dist/color-CHZbU1Ww.js +1 -0
  52. package/dist/color.js +1 -1
  53. package/dist/combobox.d.ts +28 -14
  54. package/dist/combobox.js +1 -1
  55. package/dist/command.d.ts +14 -2
  56. package/dist/command.js +1 -1
  57. package/dist/cx.js +1 -1
  58. package/dist/data-table.d.ts +50 -19
  59. package/dist/data-table.js +1 -1
  60. package/dist/description-list.d.ts +12 -1
  61. package/dist/dialog-B9JAGy_x.d.ts +28 -0
  62. package/dist/{dialog-7TUgiSzX.js → dialog-CsugEt2A.js} +1 -1
  63. package/dist/{dialog-2fRO4ca4.d.ts → dialog-DD5H3EH1.d.ts} +10 -2
  64. package/dist/dialog.d.ts +7 -2
  65. package/dist/dialog.js +1 -1
  66. package/dist/dropdown-menu-DHdgaw4P.js +1 -0
  67. package/dist/{dropdown-menu-CpjRwMWe.d.ts → dropdown-menu-DmDxYPde.d.ts} +34 -26
  68. package/dist/dropdown-menu.d.ts +6 -1
  69. package/dist/dropdown-menu.js +1 -1
  70. package/dist/empty.d.ts +5 -0
  71. package/dist/empty.js +1 -1
  72. package/dist/{field-V_gnkcmN.d.ts → field-BshcNVe_.d.ts} +1 -1
  73. package/dist/field.d.ts +17 -6
  74. package/dist/field.js +1 -1
  75. package/dist/flag.d.ts +8 -0
  76. package/dist/hooks.d.ts +5 -0
  77. package/dist/hooks.js +1 -1
  78. package/dist/hover-card.d.ts +23 -12
  79. package/dist/{icon-ByLVhdYq.d.ts → icon-NYvyyRMG.d.ts} +6 -0
  80. package/dist/icon.d.ts +7 -2
  81. package/dist/icon.js +1 -1
  82. package/dist/{icons-DP3lQw5O.js → icons-4JA-SGfv.js} +1 -1
  83. package/dist/icons.d.ts +13 -1
  84. package/dist/icons.js +1 -1
  85. package/dist/{index-BhfgyurF.d.ts → index-KJ06KK6t.d.ts} +3 -3
  86. package/dist/input-BjCDSOPA.js +1 -0
  87. package/dist/input-DHovzBjS.js +1 -0
  88. package/dist/{input-Dx5owTCc.d.ts → input-q8o5uMhW.d.ts} +11 -1
  89. package/dist/input.d.ts +34 -2
  90. package/dist/input.js +1 -1
  91. package/dist/kbd.d.ts +12 -0
  92. package/dist/{label-nHqqYS7e.js → label-DmDwzPD8.js} +1 -1
  93. package/dist/{label-Dn5CPJUj.d.ts → label-r2sJcSQ4.d.ts} +6 -0
  94. package/dist/label.d.ts +6 -1
  95. package/dist/label.js +1 -1
  96. package/dist/line-chart.d.ts +139 -82
  97. package/dist/line-chart.js +1 -1
  98. package/dist/{list-RFRIQxU2.js → list-CO_yLdln.js} +1 -1
  99. package/dist/list.d.ts +19 -1
  100. package/dist/list.js +1 -1
  101. package/dist/live-region.d.ts +14 -1
  102. package/dist/llms.txt +78 -76
  103. package/dist/main.d.ts +12 -0
  104. package/dist/mantle.css +110 -65
  105. package/dist/media-object.d.ts +12 -0
  106. package/dist/migrations/0014-chart-named-colors.yml +1389 -0
  107. package/dist/migrations/0015-segmented-control.yml +788 -0
  108. package/dist/multi-select.d.ts +15 -2
  109. package/dist/multi-select.js +1 -1
  110. package/dist/otp-input.d.ts +17 -5
  111. package/dist/otp-input.js +1 -1
  112. package/dist/pagination.d.ts +92 -3
  113. package/dist/pagination.js +1 -1
  114. package/dist/popover-BhTFutCz.d.ts +1 -0
  115. package/dist/{popover-BfB2I9G0.d.ts → popover-lwkwWcRW.d.ts} +16 -7
  116. package/dist/popover.d.ts +7 -2
  117. package/dist/progress.d.ts +27 -10
  118. package/dist/progress.js +1 -1
  119. package/dist/qr-code.d.ts +9 -1
  120. package/dist/query.d.ts +2 -2
  121. package/dist/query.js +1 -1
  122. package/dist/radio-group-jj2abc0t.js +1 -0
  123. package/dist/radio-group-sLz5AA9I.d.ts +27 -0
  124. package/dist/radio-group.d.ts +20 -99
  125. package/dist/radio-group.js +1 -1
  126. package/dist/sandbar.d.ts +14 -1
  127. package/dist/sandbar.js +1 -1
  128. package/dist/sandboxed-on-click.d.ts +8 -0
  129. package/dist/scatter-plot.d.ts +126 -64
  130. package/dist/scatter-plot.js +1 -1
  131. package/dist/segmented-control.d.ts +136 -0
  132. package/dist/segmented-control.js +1 -0
  133. package/dist/{select-BkhBxtOT.d.ts → select-BqmpVJJT.d.ts} +29 -21
  134. package/dist/select-C6Su0dU0.js +1 -0
  135. package/dist/select.d.ts +6 -1
  136. package/dist/select.js +1 -1
  137. package/dist/selectable-list.d.ts +13 -2
  138. package/dist/selectable-list.js +1 -1
  139. package/dist/{separator-D9AWEkcJ.d.ts → separator-QfH0ot5K.d.ts} +3 -1
  140. package/dist/separator.d.ts +6 -1
  141. package/dist/{sheet-CSJc_sB4.js → sheet-Bd2LIhzF.js} +1 -1
  142. package/dist/sheet.d.ts +15 -2
  143. package/dist/sheet.js +1 -1
  144. package/dist/sidebar.d.ts +19 -3
  145. package/dist/sidebar.js +1 -1
  146. package/dist/skeleton.d.ts +11 -0
  147. package/dist/skip-to-main-link.d.ts +11 -0
  148. package/dist/skip-to-main-link.js +1 -1
  149. package/dist/slider.d.ts +10 -0
  150. package/dist/{slot-C0OCJjdJ.d.ts → slot-D12N_fZJ.d.ts} +3 -1
  151. package/dist/slot.d.ts +6 -1
  152. package/dist/split-button.d.ts +14 -3
  153. package/dist/split-button.js +1 -1
  154. package/dist/strata.d.ts +13 -0
  155. package/dist/switch.d.ts +13 -1
  156. package/dist/switch.js +1 -1
  157. package/dist/{table-vT6Okwfa.d.ts → table-rWiVWEgB.d.ts} +79 -0
  158. package/dist/table.d.ts +6 -1
  159. package/dist/tabs.d.ts +23 -11
  160. package/dist/tabs.js +1 -1
  161. package/dist/text-area.d.ts +11 -1
  162. package/dist/theme-DdZgLvKH.js +1 -0
  163. package/dist/theme-switcher.d.ts +16 -2
  164. package/dist/theme-switcher.js +1 -1
  165. package/dist/theme.d.ts +12 -0
  166. package/dist/theme.js +1 -1
  167. package/dist/toast.d.ts +14 -1
  168. package/dist/toast.js +1 -1
  169. package/dist/{tooltip-NcLIeBy5.d.ts → tooltip-CpK3XTor.d.ts} +15 -8
  170. package/dist/tooltip.d.ts +6 -1
  171. package/dist/truncated-text.d.ts +27 -13
  172. package/dist/truncated-text.js +1 -1
  173. package/dist/types.d.ts +1 -1
  174. package/dist/types.js +1 -1
  175. package/dist/use-inert-siblings-CNmNuS2h.js +1 -0
  176. package/dist/use-swipe-to-dismiss-i__cTF2v.js +1 -0
  177. package/dist/utils.d.ts +1 -1
  178. package/dist/utils.js +1 -1
  179. package/dist/visually-hidden.d.ts +13 -0
  180. package/dist/well.d.ts +6 -1
  181. package/package.json +6 -6
  182. package/src/components/chart/d3-license.md +25 -0
  183. package/dist/alert-P9lwn25X.js +0 -1
  184. package/dist/button-Dge0D5bl.js +0 -1
  185. package/dist/chart-BpWfQAwf.js +0 -2
  186. package/dist/choice-2Lrv8_nl.js +0 -1
  187. package/dist/dialog-Dp0QGWwo.d.ts +0 -28
  188. package/dist/dropdown-menu-BHBzCDSZ.js +0 -1
  189. package/dist/input-CpQ6jlpI.js +0 -1
  190. package/dist/popover-C96V8SXi.d.ts +0 -1
  191. package/dist/select-CAAYk4Yj.js +0 -1
  192. package/dist/theme-C-glc5Q-.js +0 -1
  193. package/dist/use-swipe-to-dismiss-DceYk1Id.js +0 -1
@@ -1,4 +1,13 @@
1
- import { _ as CurveKind, a as GridPrimitiveProps, c as TooltipPrimitiveProps, g as ContinuousXScale, 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-BpfbtOUN.js";
1
+ /**
2
+ * Re-exports for the Line Chart component.
3
+ *
4
+ * @see https://mantle.ngrok.com/components/charts/line-chart
5
+ */
6
+ import { _ as CurveKind, a as XAxisPrimitiveProps, c as LegendPrimitiveProps, d as ChartMode, g as ContinuousXScale, h as ChartDatumEvent, i as ReferenceLinePrimitiveProps, l as CopyButtonPrimitiveProps, m as ChartDatum, n as ChartRootBaseProps, o as YAxisPrimitiveProps, r as GridPrimitiveProps, s as ChartListPrimitiveProps, t as TooltipPrimitiveProps, u as ChartAccessibilityProps, v as PointShape, y as SeriesColor } from "./chart-jitNqimS.js";
7
+ /**
8
+ * Props for {@link LineChart.List}.
9
+ */
10
+ type LineChartListProps = ChartListPrimitiveProps;
2
11
  /**
3
12
  * Props for {@link LineChart.Root}. Lines encode value by vertical position,
4
13
  * not length from a baseline, so the full y domain stays overridable via
@@ -31,28 +40,20 @@ type LineChartLineProps = {
31
40
  /** Display name for the legend, tooltip, and data table. Defaults to `dataKey`. */
32
41
  label?: string;
33
42
  /**
34
- * A fixed visual identity slot. Slots `1` through `8` select a paired chart
35
- * color and point shape. `"other"` selects the shared neutral treatment.
43
+ * The color the series paints: a mantle color name, the same `Color` that
44
+ * `Badge` takes, or any CSS color. Required: name every series' color on
45
+ * purpose. Give an "Other" series `"neutral"`, and a series that means good
46
+ * or bad a functional color such as `"danger"`.
36
47
  *
37
- * Series receive unreserved slots in composition order. Set `seriesSlot` to
38
- * give a series a fixed visual identity.
48
+ * A static CSS color (raw hex) cannot follow the two themes, so prefer a
49
+ * `var(--your-token)` declared per theme.
39
50
  *
40
51
  * @example
41
52
  * ```tsx
42
- * <LineChart.Line dataKey="errors" seriesSlot={4} />
53
+ * <LineChart.Line dataKey="p99" label="p99" color="blue" />
43
54
  * ```
44
55
  */
45
- seriesSlot?: ChartSeriesSlot;
46
- /**
47
- * Override the color channel with a chart token or any CSS color. This does
48
- * not change the series slot or its paired point shape. When omitted, the
49
- * series paints the color from its slot.
50
- *
51
- * A static color (raw hex) cannot follow the two themes, so prefer a
52
- * `var(--your-token)` declared per theme. A series that carries good/bad
53
- * meaning should wear the semantic status colors, never a categorical slot.
54
- */
55
- color?: SeriesColor;
56
+ color: SeriesColor;
56
57
  /**
57
58
  * Interpolation between points: `"linear"` (default), `"monotone"`
58
59
  * (smoothed), or `"step"`.
@@ -69,12 +70,11 @@ type LineChartLineProps = {
69
70
  */
70
71
  connectNulls?: boolean;
71
72
  /**
72
- * The glyph the hover dot, the canvas point markers, and the legend key
73
+ * The glyph the hover dot, the painted point markers, and the legend key
73
74
  * wear: `"circle"`, `"square"`, `"triangle"`, `"diamond"`,
74
75
  * `"triangle-down"`, `"plus"`, `"cross"`, or `"star"`. Shape is a redundant
75
76
  * encoding alongside color that keeps series distinguishable without color
76
- * vision. When omitted, the series wears the glyph paired to its series
77
- * slot, so both channels name one slot.
77
+ * vision. Defaults to `"circle"`.
78
78
  */
79
79
  shape?: PointShape;
80
80
  };
@@ -109,16 +109,16 @@ type LineChartLegendProps = LegendPrimitiveProps;
109
109
  */
110
110
  type LineChartCopyButtonProps = CopyButtonPrimitiveProps;
111
111
  /**
112
- * The root of a line chart: owns the data, the scales, the canvas renderer,
112
+ * The root of a line chart: owns the data, the scales, the renderer,
113
113
  * and the entire interaction contract (a crosshair snapped to the nearest x
114
114
  * with a tooltip reading every series, keyboard stepping with polite
115
115
  * announcements, an sr-only description, an sr-only data table, Enter/Space +
116
- * click activation). Rendering is canvas with min/max decimation, so series
116
+ * click activation). Rendering decimates to min/max per pixel column, so series
117
117
  * of 100k+ points stay smooth. Compose the chrome and series parts as
118
118
  * children.
119
119
  *
120
120
  * A Root mounts dormant: a shell of the plot, the named overlay, and its
121
- * sr-only description. It builds its canvas, its hover layers, and its engine
121
+ * sr-only description. It builds its paint surface and its engine
122
122
  * once it comes within one viewport of the visible area, takes focus, or
123
123
  * prints (on-screen charts first, a few milliseconds at a time), and it mounts
124
124
  * the sr-only data table once focus lands inside it. A list of charts pays
@@ -126,14 +126,16 @@ type LineChartCopyButtonProps = CopyButtonPrimitiveProps;
126
126
  * tables until a reader asks for one.
127
127
  *
128
128
  * The Root's own subtree is addressable by slot: `line-chart` on the wrapper,
129
- * then `line-chart-plot`, `line-chart-canvas`, `line-chart-crosshair`,
129
+ * then `line-chart-plot`, `line-chart-svg`,
130
+ * `line-chart-crosshair`,
130
131
  * `line-chart-hover-band`, `line-chart-markers`, `line-chart-tooltip`,
131
132
  * `line-chart-description`, and, once focus lands inside the chart,
132
133
  * `line-chart-data-table`. A line chart shows the crosshair and one marker
133
- * dot per series, and never the band. The canvas and the three layers are
134
- * engine-owned: absent from server HTML and from a dormant chart, inserted at
135
- * activation (near the viewport, on focus, or before print). A static or
136
- * decorative chart inserts the canvas alone. The tooltip
134
+ * dot per series, and never the band. The surface and the three layers are
135
+ * engine-owned: absent from server HTML and from a dormant chart. The surface arrives at activation (near the viewport, on
136
+ * focus, or before print), and the layers arrive on the first hover or
137
+ * keyboard step. A static or
138
+ * decorative chart inserts the surface alone. The tooltip
137
139
  * surface mounts on the first hover or keyboard step and stays.
138
140
  * Each hover dot carries `chart-active-point` plus a `data-shape` of
139
141
  * `"circle"`, `"square"`, `"triangle"`, `"diamond"`, `"triangle-down"`,
@@ -161,8 +163,8 @@ type LineChartCopyButtonProps = CopyButtonPrimitiveProps;
161
163
  * <LineChart.Grid />
162
164
  * <LineChart.XAxis />
163
165
  * <LineChart.YAxis />
164
- * <LineChart.Line dataKey="p50" label="p50" />
165
- * <LineChart.Line dataKey="p99" label="p99" curve="monotone" />
166
+ * <LineChart.Line dataKey="p50" label="p50" color="blue" />
167
+ * <LineChart.Line dataKey="p99" label="p99" curve="monotone" color="emerald" />
166
168
  * <LineChart.Tooltip />
167
169
  * <LineChart.Legend />
168
170
  * </LineChart.Root>
@@ -171,7 +173,7 @@ type LineChartCopyButtonProps = CopyButtonPrimitiveProps;
171
173
  declare const Root: <TDatum extends ChartDatum = ChartDatum, TMode extends ChartMode = "interactive">(props: LineChartRootProps<TDatum, TMode>) => import("react").JSX.Element;
172
174
  /**
173
175
  * One line series. Renders nothing itself — it registers the series with the
174
- * chart, which paints it on canvas. Compose one `Line` per series; `null` and
176
+ * chart, which paints it. Compose one `Line` per series; `null` and
175
177
  * missing values render as gaps unless `connectNulls` joins across them.
176
178
  *
177
179
  * @see https://mantle.ngrok.com/components/charts/line-chart#linechartline
@@ -182,16 +184,16 @@ declare const Root: <TDatum extends ChartDatum = ChartDatum, TMode extends Chart
182
184
  * <LineChart.Grid />
183
185
  * <LineChart.XAxis />
184
186
  * <LineChart.YAxis />
185
- * <LineChart.Line dataKey="p50" label="p50" />
186
- * <LineChart.Line dataKey="p99" label="p99" curve="monotone" />
187
+ * <LineChart.Line dataKey="p50" label="p50" color="blue" />
188
+ * <LineChart.Line dataKey="p99" label="p99" curve="monotone" color="emerald" />
187
189
  * <LineChart.Legend />
188
190
  * </LineChart.Root>
189
191
  * ```
190
192
  */
191
193
  declare const Line: (props: LineChartLineProps) => null;
192
194
  /**
193
- * Horizontal hairline gridlines behind the lines (renderless; painted on
194
- * canvas). Omit the part to omit the grid.
195
+ * Horizontal hairline gridlines behind the lines (renderless; the chart
196
+ * paints it). Omit the part to omit the grid.
195
197
  *
196
198
  * @see https://mantle.ngrok.com/components/charts/line-chart#linechartgrid
197
199
  *
@@ -201,14 +203,14 @@ declare const Line: (props: LineChartLineProps) => null;
201
203
  * <LineChart.Grid />
202
204
  * <LineChart.XAxis />
203
205
  * <LineChart.YAxis />
204
- * <LineChart.Line dataKey="p50" label="p50" />
206
+ * <LineChart.Line dataKey="p50" label="p50" color="blue" />
205
207
  * <LineChart.Legend />
206
208
  * </LineChart.Root>
207
209
  * ```
208
210
  */
209
211
  declare const Grid: (props: LineChartGridProps) => null;
210
212
  /**
211
- * Tick labels along the bottom of the plot (renderless; painted on canvas).
213
+ * Tick labels along the bottom of the plot (renderless; the chart paints it).
212
214
  * Labels that would collide are skipped, never rotated.
213
215
  *
214
216
  * @see https://mantle.ngrok.com/components/charts/line-chart#linechartxaxis
@@ -219,15 +221,15 @@ declare const Grid: (props: LineChartGridProps) => null;
219
221
  * <LineChart.Grid />
220
222
  * <LineChart.XAxis tickFormat={(time) => (time instanceof Date ? time.toLocaleTimeString() : String(time))} />
221
223
  * <LineChart.YAxis />
222
- * <LineChart.Line dataKey="p50" label="p50" />
224
+ * <LineChart.Line dataKey="p50" label="p50" color="blue" />
223
225
  * <LineChart.Legend />
224
226
  * </LineChart.Root>
225
227
  * ```
226
228
  */
227
229
  declare const XAxis: (props: LineChartXAxisProps) => null;
228
230
  /**
229
- * Value tick labels along the left of the plot (renderless; painted on
230
- * canvas). Ticks land on clean thousands-separated numbers.
231
+ * Value tick labels along the left of the plot (renderless; the chart
232
+ * paints it). Ticks land on clean thousands-separated numbers.
231
233
  *
232
234
  * @see https://mantle.ngrok.com/components/charts/line-chart#linechartyaxis
233
235
  *
@@ -237,7 +239,7 @@ declare const XAxis: (props: LineChartXAxisProps) => null;
237
239
  * <LineChart.Grid />
238
240
  * <LineChart.XAxis />
239
241
  * <LineChart.YAxis tickFormat={(value) => `${value}ms`} />
240
- * <LineChart.Line dataKey="p50" label="p50" />
242
+ * <LineChart.Line dataKey="p50" label="p50" color="blue" />
241
243
  * <LineChart.Legend />
242
244
  * </LineChart.Root>
243
245
  * ```
@@ -245,7 +247,7 @@ declare const XAxis: (props: LineChartXAxisProps) => null;
245
247
  declare const YAxis: (props: LineChartYAxisProps) => null;
246
248
  /**
247
249
  * A dashed horizontal marker at a y value — an SLO threshold, a budget, a
248
- * limit (renderless; painted on canvas).
250
+ * limit (renderless; the chart paints it).
249
251
  *
250
252
  * @see https://mantle.ngrok.com/components/charts/line-chart#linechartreferenceline
251
253
  *
@@ -255,7 +257,7 @@ declare const YAxis: (props: LineChartYAxisProps) => null;
255
257
  * <LineChart.Grid />
256
258
  * <LineChart.XAxis />
257
259
  * <LineChart.YAxis />
258
- * <LineChart.Line dataKey="p50" label="p50" />
260
+ * <LineChart.Line dataKey="p50" label="p50" color="blue" />
259
261
  * <LineChart.ReferenceLine y={500} label="SLO" />
260
262
  * <LineChart.Legend />
261
263
  * </LineChart.Root>
@@ -289,7 +291,7 @@ declare const ReferenceLine: (props: LineChartReferenceLineProps) => null;
289
291
  * <LineChart.Grid />
290
292
  * <LineChart.XAxis />
291
293
  * <LineChart.YAxis />
292
- * <LineChart.Line dataKey="p50" label="p50" />
294
+ * <LineChart.Line dataKey="p50" label="p50" color="blue" />
293
295
  * <LineChart.Tooltip valueFormat={(value) => `${value}ms`} footer="Click to view logs" />
294
296
  * <LineChart.Legend />
295
297
  * </LineChart.Root>
@@ -315,7 +317,7 @@ declare const Tooltip: (props: LineChartTooltipProps) => null;
315
317
  * | --- | --- | --- |
316
318
  * | `data-slot` | `"line-chart-legend"` | The legend list. `LineChart.Legend` renders it in flow below the plot. |
317
319
  * | `data-slot` | `"line-chart-legend-label"` | On the `<div>` wrapping a `children` render prop. The default legend has none. |
318
- * | `data-shape` | `"circle"` \| `"square"` \| `"triangle"` \| `"diamond"` \| `"triangle-down"` \| `"plus"` \| `"cross"` \| `"star"` | On the glyph riding each swatch's stroke, naming what its `LineChart.Line` wears — the `shape` it set, else the one paired to its series slot. The glyph clips itself to that shape, so target this only to restyle a key. |
320
+ * | `data-shape` | `"circle"` \| `"square"` \| `"triangle"` \| `"diamond"` \| `"triangle-down"` \| `"plus"` \| `"cross"` \| `"star"` | On the glyph riding each swatch's stroke, naming what its `LineChart.Line` wears — the `shape` it set, else the circle. The glyph clips itself to that shape, so target this only to restyle a key. |
319
321
  *
320
322
  * @see https://mantle.ngrok.com/components/charts/line-chart#linechartlegend
321
323
  *
@@ -325,8 +327,8 @@ declare const Tooltip: (props: LineChartTooltipProps) => null;
325
327
  * <LineChart.Grid />
326
328
  * <LineChart.XAxis />
327
329
  * <LineChart.YAxis />
328
- * <LineChart.Line dataKey="p50" label="p50" />
329
- * <LineChart.Line dataKey="p99" label="p99" curve="monotone" />
330
+ * <LineChart.Line dataKey="p50" label="p50" color="blue" />
331
+ * <LineChart.Line dataKey="p99" label="p99" curve="monotone" color="emerald" />
330
332
  * <LineChart.Legend />
331
333
  * </LineChart.Root>
332
334
  * ```
@@ -345,8 +347,8 @@ declare const Legend: (props: LineChartLegendProps) => import("react").JSX.Eleme
345
347
  * @example
346
348
  * ```tsx
347
349
  * <LineChart.Root data={data} xKey="time" aria-label="Request latency">
348
- * <LineChart.Line dataKey="p50" label="p50" />
349
- * <LineChart.Line dataKey="p99" label="p99" />
350
+ * <LineChart.Line dataKey="p50" label="p50" color="blue" />
351
+ * <LineChart.Line dataKey="p99" label="p99" color="emerald" />
350
352
  * <LineChart.Legend />
351
353
  * <LineChart.CopyButton />
352
354
  * </LineChart.Root>
@@ -354,13 +356,37 @@ declare const Legend: (props: LineChartLegendProps) => import("react").JSX.Eleme
354
356
  */
355
357
  declare const CopyButton: (props: LineChartCopyButtonProps) => import("react").JSX.Element;
356
358
  /**
357
- * A canvas-rendered line chart for trends over a continuous x — time above
358
- * all. Series colors come from the theme's validated `--color-chart-*`
359
- * tokens; lines keep a fixed slot color for the chart's lifetime even as
360
- * other series are filtered in and out. Interaction ships with `Root`
359
+ * Groups a list of charts, such as one chart per card, so they share one
360
+ * `role="status"` live region. A page of 100 charts mounts one region instead
361
+ * of one per chart, plus one for each `LineChart.CopyButton`. Each chart keeps
362
+ * its own tooltip, description, and data table.
363
+ *
364
+ * Renders a `div` (`line-chart-list`) that holds the charts in a `display: contents`
365
+ * wrapper (`line-chart-list-items`), so a grid or flex layout on the List reaches
366
+ * the cards, and the live region as its last child. No `asChild`: a list
367
+ * element such as `ul` cannot hold the live region as a child.
368
+ *
369
+ * @see https://mantle.ngrok.com/components/charts/line-chart#linechartlist
370
+ *
371
+ * @example
372
+ * ```tsx
373
+ * <LineChart.List>
374
+ * {agents.map((agent) => (
375
+ * <LineChart.Root key={agent.id} data={agent.rows} xKey="time" aria-label={agent.name}>
376
+ * <LineChart.Line dataKey="p50" label="p50" color="blue" />
377
+ * <LineChart.Tooltip />
378
+ * </LineChart.Root>
379
+ * ))}
380
+ * </LineChart.List>
381
+ * ```
382
+ */
383
+ declare const List: (props: LineChartListProps) => import("react").JSX.Element;
384
+ /**
385
+ * A line chart for trends over a continuous x — time above
386
+ * all. Each series names its own `color`. Interaction ships with `Root`
361
387
  * unconditionally: a crosshair snapped to the nearest x with an every-series
362
388
  * tooltip, keyboard stepping, aria-live announcements, and an sr-only
363
- * description. A Root paints and allocates its canvas once it comes within
389
+ * description. A Root paints and allocates its surface once it comes within
364
390
  * one viewport of the visible area or takes focus, and it mounts its sr-only
365
391
  * data table once focus lands inside it. Min/max decimation keeps 100k+ point
366
392
  * series smooth.
@@ -369,16 +395,23 @@ declare const CopyButton: (props: LineChartCopyButtonProps) => import("react").J
369
395
  *
370
396
  * | CSS Variable | Default | Description |
371
397
  * | --- | --- | --- |
372
- * | `--color-chart-1` … `--color-chart-8` | per theme | The validated categorical series slots, in assignment order. |
373
- * | `--color-chart-other` | `--color-neutral-500` | The neutral overflow slot a series wears once every slot is held. |
398
+ * | `--color-chart-<name>` | per theme | The color a series with `color="<name>"` paints. Every mantle color name has one: the 600 step of its hue in light mode, and the 500 step in dark mode. Most names reach 3:1 contrast on the card surface, and the docs page lists the names that do not. |
374
399
  *
375
400
  * Two ways to change a series color, both public API. The `color` prop on
376
- * `LineChart.Line` sets one series and takes any CSS color. To restyle a slot itself,
377
- * redeclare its token on `Root` —
378
- * `className="[--color-chart-1:var(--color-brand)]"`. The engine resolves every
379
- * token from `Root`'s computed style, so a declaration scoped there wins for
401
+ * `LineChart.Line` takes a color name or any CSS color. To restyle a color name for one chart,
402
+ * redeclare its token on `Root`:
403
+ * `className="[--color-chart-blue:var(--color-brand)]"`. Every token resolves in
404
+ * `Root`'s own cascade, so a declaration scoped there wins for
380
405
  * that chart and leaves every other chart on the page alone.
381
406
  *
407
+ * @useWhen Show how one or more values trend across an ordered x axis, such as time, including
408
+ * long series with many points.
409
+ *
410
+ * @siblings
411
+ * - `AreaChart`: the chart shows a volume, or a total and its parts, as filled areas.
412
+ * - `BarChart`: the reader compares values across categories by bar length from zero.
413
+ * - `ScatterPlot`: the points show how two measures correlate, and their order does not matter.
414
+ *
382
415
  * @see https://mantle.ngrok.com/components/charts/line-chart
383
416
  *
384
417
  * @example
@@ -395,6 +428,12 @@ declare const CopyButton: (props: LineChartCopyButtonProps) => import("react").J
395
428
  * └── LineChart.CopyButton
396
429
  * ```
397
430
  *
431
+ * A List groups Roots:
432
+ * ```
433
+ * LineChart.List
434
+ * └── LineChart.Root (one per chart)
435
+ * ```
436
+ *
398
437
  * @example
399
438
  * ```tsx
400
439
  * const data = [
@@ -407,8 +446,8 @@ declare const CopyButton: (props: LineChartCopyButtonProps) => import("react").J
407
446
  * <LineChart.Grid />
408
447
  * <LineChart.XAxis />
409
448
  * <LineChart.YAxis />
410
- * <LineChart.Line dataKey="p50" label="p50" />
411
- * <LineChart.Line dataKey="p99" label="p99" curve="monotone" />
449
+ * <LineChart.Line dataKey="p50" label="p50" color="blue" />
450
+ * <LineChart.Line dataKey="p99" label="p99" curve="monotone" color="emerald" />
412
451
  * <LineChart.Tooltip />
413
452
  * <LineChart.Legend />
414
453
  * </LineChart.Root>
@@ -416,7 +455,7 @@ declare const CopyButton: (props: LineChartCopyButtonProps) => import("react").J
416
455
  */
417
456
  declare const LineChart: {
418
457
  /**
419
- * The root of a line chart: owns the data, the scales, the canvas renderer,
458
+ * The root of a line chart: owns the data, the scales, the renderer,
420
459
  * and the entire interaction contract.
421
460
  *
422
461
  * @see https://mantle.ngrok.com/components/charts/line-chart#linechartroot
@@ -427,8 +466,8 @@ declare const LineChart: {
427
466
  * <LineChart.Grid />
428
467
  * <LineChart.XAxis />
429
468
  * <LineChart.YAxis />
430
- * <LineChart.Line dataKey="p50" label="p50" />
431
- * <LineChart.Line dataKey="p99" label="p99" curve="monotone" />
469
+ * <LineChart.Line dataKey="p50" label="p50" color="blue" />
470
+ * <LineChart.Line dataKey="p99" label="p99" curve="monotone" color="emerald" />
432
471
  * <LineChart.Tooltip />
433
472
  * <LineChart.Legend />
434
473
  * </LineChart.Root>
@@ -436,7 +475,7 @@ declare const LineChart: {
436
475
  */
437
476
  readonly Root: typeof Root;
438
477
  /**
439
- * One line series; registers with the chart and paints on canvas.
478
+ * One line series; registers with the chart, which paints it.
440
479
  *
441
480
  * @see https://mantle.ngrok.com/components/charts/line-chart#linechartline
442
481
  *
@@ -446,8 +485,8 @@ declare const LineChart: {
446
485
  * <LineChart.Grid />
447
486
  * <LineChart.XAxis />
448
487
  * <LineChart.YAxis />
449
- * <LineChart.Line dataKey="p50" label="p50" />
450
- * <LineChart.Line dataKey="p99" label="p99" curve="monotone" />
488
+ * <LineChart.Line dataKey="p50" label="p50" color="blue" />
489
+ * <LineChart.Line dataKey="p99" label="p99" curve="monotone" color="emerald" />
451
490
  * <LineChart.Tooltip />
452
491
  * <LineChart.Legend />
453
492
  * </LineChart.Root>
@@ -465,8 +504,8 @@ declare const LineChart: {
465
504
  * <LineChart.Grid />
466
505
  * <LineChart.XAxis />
467
506
  * <LineChart.YAxis />
468
- * <LineChart.Line dataKey="p50" label="p50" />
469
- * <LineChart.Line dataKey="p99" label="p99" curve="monotone" />
507
+ * <LineChart.Line dataKey="p50" label="p50" color="blue" />
508
+ * <LineChart.Line dataKey="p99" label="p99" curve="monotone" color="emerald" />
470
509
  * <LineChart.Tooltip />
471
510
  * <LineChart.Legend />
472
511
  * </LineChart.Root>
@@ -484,8 +523,8 @@ declare const LineChart: {
484
523
  * <LineChart.Grid />
485
524
  * <LineChart.XAxis tickFormat={(time) => (time instanceof Date ? time.toLocaleTimeString() : String(time))} />
486
525
  * <LineChart.YAxis />
487
- * <LineChart.Line dataKey="p50" label="p50" />
488
- * <LineChart.Line dataKey="p99" label="p99" curve="monotone" />
526
+ * <LineChart.Line dataKey="p50" label="p50" color="blue" />
527
+ * <LineChart.Line dataKey="p99" label="p99" curve="monotone" color="emerald" />
489
528
  * <LineChart.Tooltip />
490
529
  * <LineChart.Legend />
491
530
  * </LineChart.Root>
@@ -503,8 +542,8 @@ declare const LineChart: {
503
542
  * <LineChart.Grid />
504
543
  * <LineChart.XAxis />
505
544
  * <LineChart.YAxis tickFormat={(value) => `${value}ms`} />
506
- * <LineChart.Line dataKey="p50" label="p50" />
507
- * <LineChart.Line dataKey="p99" label="p99" curve="monotone" />
545
+ * <LineChart.Line dataKey="p50" label="p50" color="blue" />
546
+ * <LineChart.Line dataKey="p99" label="p99" curve="monotone" color="emerald" />
508
547
  * <LineChart.Tooltip />
509
548
  * <LineChart.Legend />
510
549
  * </LineChart.Root>
@@ -522,7 +561,7 @@ declare const LineChart: {
522
561
  * <LineChart.Grid />
523
562
  * <LineChart.XAxis />
524
563
  * <LineChart.YAxis />
525
- * <LineChart.Line dataKey="p50" label="p50" />
564
+ * <LineChart.Line dataKey="p50" label="p50" color="blue" />
526
565
  * <LineChart.ReferenceLine y={500} label="SLO" />
527
566
  * <LineChart.Tooltip />
528
567
  * <LineChart.Legend />
@@ -541,8 +580,8 @@ declare const LineChart: {
541
580
  * <LineChart.Grid />
542
581
  * <LineChart.XAxis />
543
582
  * <LineChart.YAxis />
544
- * <LineChart.Line dataKey="p50" label="p50" />
545
- * <LineChart.Line dataKey="p99" label="p99" curve="monotone" />
583
+ * <LineChart.Line dataKey="p50" label="p50" color="blue" />
584
+ * <LineChart.Line dataKey="p99" label="p99" curve="monotone" color="emerald" />
546
585
  * <LineChart.Tooltip valueFormat={(value) => `${value}ms`} />
547
586
  * <LineChart.Legend />
548
587
  * </LineChart.Root>
@@ -561,8 +600,8 @@ declare const LineChart: {
561
600
  * <LineChart.Grid />
562
601
  * <LineChart.XAxis />
563
602
  * <LineChart.YAxis />
564
- * <LineChart.Line dataKey="p50" label="p50" />
565
- * <LineChart.Line dataKey="p99" label="p99" curve="monotone" />
603
+ * <LineChart.Line dataKey="p50" label="p50" color="blue" />
604
+ * <LineChart.Line dataKey="p99" label="p99" curve="monotone" color="emerald" />
566
605
  * <LineChart.Tooltip />
567
606
  * <LineChart.Legend />
568
607
  * </LineChart.Root>
@@ -577,13 +616,31 @@ declare const LineChart: {
577
616
  * @example
578
617
  * ```tsx
579
618
  * <LineChart.Root data={data} xKey="time" aria-label="Request latency">
580
- * <LineChart.Line dataKey="p50" label="p50" />
581
- * <LineChart.Line dataKey="p99" label="p99" />
619
+ * <LineChart.Line dataKey="p50" label="p50" color="blue" />
620
+ * <LineChart.Line dataKey="p99" label="p99" color="emerald" />
582
621
  * <LineChart.Legend />
583
622
  * <LineChart.CopyButton />
584
623
  * </LineChart.Root>
585
624
  * ```
586
625
  */
587
626
  readonly CopyButton: typeof CopyButton;
627
+ /**
628
+ * Groups a list of charts so they share one live region.
629
+ *
630
+ * @see https://mantle.ngrok.com/components/charts/line-chart#linechartlist
631
+ *
632
+ * @example
633
+ * ```tsx
634
+ * <LineChart.List>
635
+ * {agents.map((agent) => (
636
+ * <LineChart.Root key={agent.id} data={agent.rows} xKey="time" aria-label={agent.name}>
637
+ * <LineChart.Line dataKey="p50" label="p50" color="blue" />
638
+ * <LineChart.Tooltip />
639
+ * </LineChart.Root>
640
+ * ))}
641
+ * </LineChart.List>
642
+ * ```
643
+ */
644
+ readonly List: typeof List;
588
645
  };
589
- export { type ChartDatumEvent, type ChartMode, LineChart, type LineChartCopyButtonProps, type LineChartGridProps, type LineChartLegendProps, type LineChartLineProps, type LineChartReferenceLineProps, type LineChartRootProps, type LineChartTooltipProps, type LineChartXAxisProps, type LineChartYAxisProps };
646
+ export { type ChartDatumEvent, type ChartMode, LineChart, type LineChartCopyButtonProps, type LineChartGridProps, type LineChartLegendProps, type LineChartLineProps, type LineChartListProps, type LineChartReferenceLineProps, type LineChartRootProps, type LineChartTooltipProps, type LineChartXAxisProps, type LineChartYAxisProps };
@@ -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-BpWfQAwf.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:`line`,componentName:`LineChart`,slotName:`line-chart`,...e}),t[0]=e,t[1]=n),n},Line:e=>a(`LineChart.Line`,`line`,e),Grid:e=>n(`LineChart.Grid`,e),XAxis:e=>t(`LineChart.XAxis`,e),YAxis:e=>r(`LineChart.YAxis`,e),ReferenceLine:t=>e(`LineChart.ReferenceLine`,t),Tooltip:e=>s(`LineChart.Tooltip`,e),Legend:e=>{let t=l(2),n;return t[0]===e?n=t[1]:(n=/* @__PURE__ */ u(i,{partName:`LineChart.Legend`,slotName:`line-chart`,...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:`LineChart.CopyButton`,slotName:`line-chart`,...e}),t[0]=e,t[1]=n),n}};export{d as LineChart};
1
+ import{_ as e,a as t,c as n,d as r,l as i,n as a,o,s,t as c,u as l}from"./chart-DudCw24t.js";import{t as u}from"./chart-DCTGGlWL.js";import{c as d}from"react/compiler-runtime";import{jsx as f}from"react/jsx-runtime";const p={Root:e=>{let t=d(2),n;return t[0]===e?n=t[1]:(n=/* @__PURE__ */ f(c,{kind:`line`,componentName:`LineChart`,slotName:`line-chart`,paintBackend:u,...e}),t[0]=e,t[1]=n),n},Line:e=>s(`LineChart.Line`,`line`,e),Grid:e=>t(`LineChart.Grid`,e),XAxis:e=>n(`LineChart.XAxis`,e),YAxis:e=>i(`LineChart.YAxis`,e),ReferenceLine:e=>o(`LineChart.ReferenceLine`,e),Tooltip:e=>a(`LineChart.Tooltip`,e),Legend:e=>{let t=d(2),n;return t[0]===e?n=t[1]:(n=/* @__PURE__ */ f(r,{partName:`LineChart.Legend`,slotName:`line-chart`,...e}),t[0]=e,t[1]=n),n},CopyButton:t=>{let n=d(2),r;return n[0]===t?r=n[1]:(r=/* @__PURE__ */ f(e,{partName:`LineChart.CopyButton`,slotName:`line-chart`,...t}),n[0]=t,n[1]=r),r},List:e=>{let t=d(2),n;return t[0]===e?n=t[1]:(n=/* @__PURE__ */ f(l,{slotName:`line-chart-list`,...e}),t[0]=e,t[1]=n),n}};export{p as LineChart};
@@ -1 +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"./slot-DdYN1L1C.js";import{t as i}from"./interactive-target-BXScNeOr.js";import{c as a}from"react/compiler-runtime";import{Children as o,createContext as s,isValidElement as c,useContext as l,useEffect as u,useId as d,useRef as f,useState as p}from"react";import m from"tiny-invariant";import{jsx as h}from"react/jsx-runtime";import{useVirtualizer as g}from"@tanstack/react-virtual";const _=s(null);function v(e){let t=l(_);return m(t,`List.${e} must be composed inside List.Root / List.VirtualRoot (or a SelectableList viewport).`),t}const y=s(null),b=s(null);function x(e){return c(e)?e.props.disabled===!0:!1}function S({start:e,step:t,count:n,isItemDisabled:r}){for(let i=e;i>=0&&i<n;i+=t)if(!r(i))return i;return-1}const C=`a[href]:not([tabindex="-1"]), button:not(:disabled):not([tabindex="-1"]), [tabindex]:not([tabindex="-1"])`;function w(e){let t=e.matches(C)?e:e.querySelector(C);return t instanceof HTMLElement?t:null}function T(e){let t=e instanceof Element?e.closest(`[data-index]`):null;if(t==null)return null;let n=Number(t.getAttribute(`data-index`));return!Number.isInteger(n)||n<0?null:{item:t,index:n}}function E({count:e,isItemDisabled:t,focusItemAt:n}){return{onKeyDown:r=>{if(r.target instanceof HTMLElement&&(r.target.isContentEditable||r.target.tagName===`INPUT`||r.target.tagName===`TEXTAREA`||r.target.tagName===`SELECT`)||r.altKey||r.ctrlKey||r.metaKey)return;let i=T(r.target);if(i==null)return;let a=-1,o=1;switch(r.key){case`ArrowDown`:o=1,a=S({start:i.index+1,step:o,count:e,isItemDisabled:t});break;case`ArrowUp`:o=-1,a=S({start:i.index-1,step:o,count:e,isItemDisabled:t});break;case`Home`:o=1,a=S({start:0,step:o,count:e,isItemDisabled:t});break;case`End`:o=-1,a=S({start:e-1,step:o,count:e,isItemDisabled:t});break;default:return}r.preventDefault(),a>=0&&a!==i.index&&n(a,o)}}}function D(e){let t=a(37),{count:n,enabled:r,isItemDisabled:o,onActivate:s,itemId:c,scrollToIndex:l}=e,[u,d]=p(-1),m=f(!1),h=u>=n?n-1:u;if(u>=n&&d(n-1),!r){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e={activeIndex:-1,collectionProps:{}},t[0]=e):e=t[0],e}let g;t[1]===o?g=t[2]:(g=e=>o?.(e)??!1,t[1]=o,t[2]=g);let _=g,v;t[3]!==n||t[4]!==_?(v=(e,t)=>S({start:e,step:t,count:n,isItemDisabled:_}),t[3]=n,t[4]=_,t[5]=v):v=t[5];let y=v,b;t[6]===l?b=t[7]:(b=e=>{e<0||(d(e),l(e))},t[6]=l,t[7]=b);let x=b,C;t[8]!==h||t[9]!==c?(C=h>=0?c(h):void 0,t[8]=h,t[9]=c,t[10]=C):C=t[10];let w;t[11]===_?w=t[12]:(w=e=>{let t=T(e.target);t!=null&&!_(t.index)?(d(t.index),m.current=!1):m.current=!0},t[11]=_,t[12]=w);let E;t[13]!==_||t[14]!==s?(E=e=>{if(e.defaultPrevented)return;let t=T(e.target);t==null||_(t.index)||i(e.target,t.item)||(d(t.index),s?.(t.index))},t[13]=_,t[14]=s,t[15]=E):E=t[15];let D;t[16]!==n||t[17]!==y||t[18]!==_?(D=e=>{if(e.target!==e.currentTarget){let t=T(e.target);t!=null&&!_(t.index)&&d(t.index),e.target instanceof HTMLElement&&e.target.tabIndex>=0||e.currentTarget.focus({preventScroll:!0}),m.current=!1;return}let t=m.current;m.current=!1,n>0&&!t&&d(e=>e<0?y(0,1):e)},t[16]=n,t[17]=y,t[18]=_,t[19]=D):D=t[19];let O;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(O=e=>{e.currentTarget.contains(e.relatedTarget)||(d(-1),m.current=!1)},t[20]=O):O=t[20];let k;t[21]!==x||t[22]!==h||t[23]!==n||t[24]!==y||t[25]!==_||t[26]!==s?(k=e=>{if(e.target===e.currentTarget&&!(e.altKey||e.ctrlKey||e.metaKey)){m.current=!1;bb103:switch(e.key){case`ArrowDown`:e.preventDefault(),x(y(h<0?0:h+1,1));break bb103;case`ArrowUp`:e.preventDefault(),x(h<0?y(0,1):y(h-1,-1));break bb103;case`Home`:e.preventDefault(),x(y(0,1));break bb103;case`End`:e.preventDefault(),x(y(n-1,-1));break bb103;case` `:case`Enter`:!e.repeat&&h>=0&&!_(h)&&(e.preventDefault(),s?.(h));break bb103}}},t[21]=x,t[22]=h,t[23]=n,t[24]=y,t[25]=_,t[26]=s,t[27]=k):k=t[27];let A;t[28]!==C||t[29]!==w||t[30]!==E||t[31]!==D||t[32]!==k?(A={tabIndex:0,"aria-activedescendant":C,onMouseDown:w,onClick:E,onFocus:D,onBlur:O,onKeyDown:k},t[28]=C,t[29]=w,t[30]=E,t[31]=D,t[32]=k,t[33]=A):A=t[33];let j;return t[34]!==h||t[35]!==A?(j={activeIndex:h,collectionProps:A},t[34]=h,t[35]=A,t[36]=j):j=t[36],j}function O(e){let t=a(25),{count:n,focusItemAt:r,isItemDisabled:i,onActivate:o,itemId:s,scrollToIndex:c,semantics:l}=e,u=d(),f;t[0]===l?f=t[1]:(f={semantics:l},t[0]=l,t[1]=f);let p=f,m;t[2]!==u||t[3]!==s?(m=s??(e=>`${u}-item-${e}`),t[2]=u,t[3]=s,t[4]=m):m=t[4];let h=m,g=l===`grid`,_;t[5]!==n||t[6]!==i||t[7]!==o||t[8]!==h||t[9]!==c||t[10]!==g?(_={count:n,enabled:g,isItemDisabled:i,onActivate:o,itemId:h,scrollToIndex:c},t[5]=n,t[6]=i,t[7]=o,t[8]=h,t[9]=c,t[10]=g,t[11]=_):_=t[11];let{activeIndex:v,collectionProps:y}=D(_),b=s==null?h:null,x;t[12]!==v||t[13]!==b?(x={activeIndex:v,stampItemId:b},t[12]=v,t[13]=b,t[14]=x):x=t[14];let S=x,C;t[15]!==n||t[16]!==r||t[17]!==y||t[18]!==i||t[19]!==l?(C=l===`list`?E({count:n,isItemDisabled:i,focusItemAt:r}):y,t[15]=n,t[16]=r,t[17]=y,t[18]=i,t[19]=l,t[20]=C):C=t[20];let w=C,T;return t[21]!==w||t[22]!==S||t[23]!==p?(T={collectionProps:w,gridNav:S,listContext:p},t[21]=w,t[22]=S,t[23]=p,t[24]=T):T=t[24],T}function k(e){let r=a(26),{"aria-label":i,"aria-labelledby":o,"aria-multiselectable":s,children:c,className:l,collectionProps:u,gridNav:d,listContext:f,viewportProps:p,ref:m}=e,g,v;r[0]===p?(g=r[1],v=r[2]):({"data-slot":g,...v}=p,r[0]=p,r[1]=g,r[2]=v);let y;r[3]===g?y=r[4]:(y=n(g,`list`),r[3]=g,r[4]=y);let x;r[5]===l?x=r[6]:(x=t(`border-popover bg-popover scrollbar overscroll-none overflow-x-hidden overflow-y-auto rounded-md border p-1`,l),r[5]=l,r[6]=x);let S=f.semantics===`grid`?`grid`:`list`,C;r[7]!==i||r[8]!==o||r[9]!==s||r[10]!==c||r[11]!==u||r[12]!==S?(C=/* @__PURE__ */ h(`div`,{"data-slot":`list-collection`,role:S,"aria-label":i,"aria-labelledby":o,"aria-multiselectable":s,className:`relative flex w-full flex-col gap-px outline-hidden`,...u,children:c}),r[7]=i,r[8]=o,r[9]=s,r[10]=c,r[11]=u,r[12]=S,r[13]=C):C=r[13];let w;r[14]!==m||r[15]!==y||r[16]!==x||r[17]!==C||r[18]!==v?(w=/* @__PURE__ */ h(`div`,{ref:m,"data-slot":y,className:x,...v,children:C}),r[14]=m,r[15]=y,r[16]=x,r[17]=C,r[18]=v,r[19]=w):w=r[19];let T;r[20]!==d||r[21]!==w?(T=/* @__PURE__ */ h(b.Provider,{value:d,children:w}),r[20]=d,r[21]=w,r[22]=T):T=r[22];let E;return r[23]!==f||r[24]!==T?(E=/* @__PURE__ */ h(_.Provider,{value:f,children:T}),r[23]=f,r[24]=T,r[25]=E):E=r[25],E}const A=i=>{let o=a(43),s,c,u,d,f,p,m,g,_;o[0]===i?(s=o[1],c=o[2],u=o[3],d=o[4],f=o[5],p=o[6],m=o[7],g=o[8],_=o[9]):({"data-slot":d,asChild:s,children:c,className:u,disabled:g,ref:p,selected:_,style:m,...f}=i,o[0]=i,o[1]=s,o[2]=c,o[3]=u,o[4]=d,o[5]=f,o[6]=p,o[7]=m,o[8]=g,o[9]=_);let x=g!==void 0&&g,S=_!==void 0&&_,{semantics:C}=v(`Item`),w=l(y),T=l(b),E=C===`grid`,D=s?r:`div`,O=w?.placement??null,k=w?.index,A=E&&T!=null&&k!=null&&T.activeIndex===k,j=O?.measureRef??null,M=e(p,j),N;o[10]===d?N=o[11]:(N=n(d,`list-item`),o[10]=d,o[11]=N);let P;o[12]!==T||o[13]!==k||o[14]!==E||o[15]!==f?(P=E&&k!=null&&T?.stampItemId!=null?T.stampItemId(k):f.id,o[12]=T,o[13]=k,o[14]=E,o[15]=f,o[16]=P):P=o[16];let F=S?`selected`:`unselected`,I=x||void 0,L=A||void 0,R=E?`row`:`listitem`,z=E?S:void 0,B=E&&x?!0:f[`aria-disabled`],V=E?O?.posInSet:void 0,H=E?void 0:O?.posInSet,U=E?void 0:O?.setSize,W=!x&&`hover:bg-active-menu-item hover:data-[state=selected]:bg-active-selected-menu-item`,G=!E&&!x&&`has-focus-visible:bg-active-menu-item has-focus-visible:data-[state=selected]:bg-active-selected-menu-item`,K;o[17]!==u||o[18]!==W||o[19]!==G?(K=t(`rounded-md data-[state=selected]:bg-selected-menu-item data-active:bg-active-menu-item data-active:data-[state=selected]:bg-active-selected-menu-item`,W,G,u),o[17]=u,o[18]=W,o[19]=G,o[20]=K):K=o[20];let q;o[21]!==O||o[22]!==m?(q=O?{...m,...O.style}:m,o[21]=O,o[22]=m,o[23]=q):q=o[23];let J;return o[24]!==D||o[25]!==c||o[26]!==M||o[27]!==k||o[28]!==f||o[29]!==B||o[30]!==V||o[31]!==H||o[32]!==U||o[33]!==K||o[34]!==q||o[35]!==N||o[36]!==P||o[37]!==F||o[38]!==I||o[39]!==L||o[40]!==R||o[41]!==z?(J=/* @__PURE__ */ h(D,{ref:M,"data-slot":N,...f,id:P,"data-index":k,"data-state":F,"data-disabled":I,"data-active":L,role:R,"aria-selected":z,"aria-disabled":B,"aria-rowindex":V,"aria-posinset":H,"aria-setsize":U,className:K,style:q,children:c}),o[24]=D,o[25]=c,o[26]=M,o[27]=k,o[28]=f,o[29]=B,o[30]=V,o[31]=H,o[32]=U,o[33]=K,o[34]=q,o[35]=N,o[36]=P,o[37]=F,o[38]=I,o[39]=L,o[40]=R,o[41]=z,o[42]=J):J=o[42],J};function j(e){let t=a(5),{children:n,index:r}=e,i;t[0]===r?i=t[1]:(i={index:r,placement:null},t[0]=r,t[1]=i);let o=i,s;return t[2]!==n||t[3]!==o?(s=/* @__PURE__ */ h(y.Provider,{value:o,children:n}),t[2]=n,t[3]=o,t[4]=s):s=t[4],s}const M=t=>{let n=a(40),r,i,s,l,u,d,p,m,g,_,v;n[0]===t?(r=n[1],i=n[2],s=n[3],l=n[4],u=n[5],d=n[6],p=n[7],m=n[8],g=n[9],_=n[10],v=n[11]):({"aria-label":r,"aria-labelledby":i,"aria-multiselectable":s,children:l,className:u,isItemDisabled:d,onActivate:m,itemId:p,ref:_,semantics:v,...g}=t,n[0]=t,n[1]=r,n[2]=i,n[3]=s,n[4]=l,n[5]=u,n[6]=d,n[7]=p,n[8]=m,n[9]=g,n[10]=_,n[11]=v);let y=v===void 0?`list`:v,b=f(null),S=e(b,_),C;n[12]===l?C=n[13]:(C=o.toArray(l).filter(c),n[12]=l,n[13]=C);let T=C,E;n[14]===Symbol.for(`react.memo_cache_sentinel`)?(E=e=>{b.current?.querySelector(`[data-index="${e}"]`)?.scrollIntoView({block:`nearest`})},n[14]=E):E=n[14];let D=E,A;n[15]===T.length?A=n[16]:(A=(e,t)=>{let n=b.current;if(n!=null)for(let r=e;r>=0&&r<T.length;r+=t){let e=n.querySelector(`[data-index="${r}"]`);if(e==null)continue;let t=w(e);if(t!=null){t.focus({preventScroll:!0}),e.scrollIntoView({block:`nearest`});return}}},n[15]=T.length,n[16]=A);let j=A,M;n[17]!==d||n[18]!==T?(M=d??(e=>x(T[e])),n[17]=d,n[18]=T,n[19]=M):M=n[19];let P;n[20]!==j||n[21]!==T.length||n[22]!==p||n[23]!==m||n[24]!==y||n[25]!==M?(P={count:T.length,focusItemAt:j,isItemDisabled:M,onActivate:m,itemId:p,scrollToIndex:D,semantics:y},n[20]=j,n[21]=T.length,n[22]=p,n[23]=m,n[24]=y,n[25]=M,n[26]=P):P=n[26];let{collectionProps:F,gridNav:I,listContext:L}=O(P),R;n[27]===T?R=n[28]:(R=T.map(N),n[27]=T,n[28]=R);let z;return n[29]!==r||n[30]!==i||n[31]!==s||n[32]!==u||n[33]!==F||n[34]!==S||n[35]!==I||n[36]!==L||n[37]!==g||n[38]!==R?(z=/* @__PURE__ */ h(k,{"aria-label":r,"aria-labelledby":i,"aria-multiselectable":s,className:u,collectionProps:F,gridNav:I,listContext:L,viewportProps:g,ref:S,children:R}),n[29]=r,n[30]=i,n[31]=s,n[32]=u,n[33]=F,n[34]=S,n[35]=I,n[36]=L,n[37]=g,n[38]=R,n[39]=z):z=n[39],z};function N(e,t){return/* @__PURE__ */ h(j,{index:t,children:e},e.key??t)}function P({virtualItem:e,count:t,measureRef:n}){return{posInSet:e.index+1,setSize:t,measureRef:n,style:{position:`absolute`,left:0,top:0,width:`100%`,transform:`translateY(${e.start}px)`}}}function F(e){let t=a(10),{children:n,count:r,measureRef:i,virtualItem:o}=e,s=o.index,c;t[0]!==r||t[1]!==i||t[2]!==o?(c=P({virtualItem:o,count:r,measureRef:i}),t[0]=r,t[1]=i,t[2]=o,t[3]=c):c=t[3];let l;t[4]!==c||t[5]!==o.index?(l={index:s,placement:c},t[4]=c,t[5]=o.index,t[6]=l):l=t[6];let u=l,d;return t[7]!==n||t[8]!==u?(d=/* @__PURE__ */ h(y.Provider,{value:u,children:n}),t[7]=n,t[8]=u,t[9]=d):d=t[9],d}function I({count:e,estimateItemHeight:t,getItemKey:n,overscan:r,scrollRef:i}){"use no memo";let a=g({count:e,getScrollElement:()=>i.current,estimateSize:()=>t,getItemKey:n,overscan:r,gap:1,initialRect:{width:0,height:t*(r+1)}});return{virtualItems:a.getVirtualItems(),totalSize:a.getTotalSize(),measureElement:a.measureElement,scrollToIndex:a.scrollToIndex}}const L=t=>{let n=a(68),r,i,s,l,d,p,m,g,_,v,y,b,S;n[0]===t?(r=n[1],i=n[2],s=n[3],l=n[4],d=n[5],p=n[6],m=n[7],g=n[8],_=n[9],v=n[10],y=n[11],b=n[12],S=n[13]):({"aria-label":r,"aria-labelledby":i,"aria-multiselectable":s,children:l,className:d,estimateItemHeight:y,isItemDisabled:p,onActivate:g,overscan:b,itemId:m,ref:v,semantics:S,..._}=t,n[0]=t,n[1]=r,n[2]=i,n[3]=s,n[4]=l,n[5]=d,n[6]=p,n[7]=m,n[8]=g,n[9]=_,n[10]=v,n[11]=y,n[12]=b,n[13]=S);let C=y===void 0?44:y,T=b===void 0?8:b,E=S===void 0?`list`:S,D=f(null),A=e(D,v),j;n[14]===l?j=n[15]:(j=o.toArray(l).filter(c),n[14]=l,n[15]=j);let M=j,N=M.length,P;n[16]===M?P=n[17]:(P=e=>M[e]?.key??e,n[16]=M,n[17]=P);let L=P,R;n[18]!==N||n[19]!==C||n[20]!==L||n[21]!==T?(R={count:N,estimateItemHeight:C,getItemKey:L,overscan:T,scrollRef:D},n[18]=N,n[19]=C,n[20]=L,n[21]=T,n[22]=R):R=n[22];let{virtualItems:z,totalSize:B,measureElement:V,scrollToIndex:H}=I(R),U;n[23]===H?U=n[24]:(U=e=>H(e,{align:`auto`}),n[23]=H,n[24]=U);let W=U,G=f(null),K,q;n[25]===Symbol.for(`react.memo_cache_sentinel`)?(K=()=>()=>{G.current!=null&&cancelAnimationFrame(G.current)},q=[],n[25]=K,n[26]=q):(K=n[25],q=n[26]),u(K,q);let J;n[27]!==N||n[28]!==W?(J=(e,t)=>{G.current!=null&&(cancelAnimationFrame(G.current),G.current=null);let n=e,r=0,i=()=>{G.current=null;let e=D.current;if(e==null||n<0||n>=N)return;W(n);let a=e.querySelector(`[data-index="${n}"]`);if(a!=null){let e=w(a);if(e!=null){e.focus({preventScroll:!0});return}n+=t,r=0}r+=1,r<10&&(G.current=requestAnimationFrame(i))};i()},n[27]=N,n[28]=W,n[29]=J):J=n[29];let ee=J,Y;n[30]!==p||n[31]!==M?(Y=p??(e=>x(M[e])),n[30]=p,n[31]=M,n[32]=Y):Y=n[32];let X;n[33]!==N||n[34]!==ee||n[35]!==m||n[36]!==g||n[37]!==W||n[38]!==E||n[39]!==Y?(X={count:N,focusItemAt:ee,isItemDisabled:Y,onActivate:g,itemId:m,scrollToIndex:W,semantics:E},n[33]=N,n[34]=ee,n[35]=m,n[36]=g,n[37]=W,n[38]=E,n[39]=Y,n[40]=X):X=n[40];let{collectionProps:te,gridNav:ne,listContext:re}=O(X),ie=z.some(e=>e.index===ne.activeIndex)?te[`aria-activedescendant`]:void 0,ae=E===`grid`?N:void 0,oe=`${B}px`,Z;n[41]===oe?Z=n[42]:(Z={height:oe},n[41]=oe,n[42]=Z);let Q;n[43]!==te||n[44]!==ie||n[45]!==ae||n[46]!==Z?(Q={...te,"aria-activedescendant":ie,"aria-rowcount":ae,style:Z},n[43]=te,n[44]=ie,n[45]=ae,n[46]=Z,n[47]=Q):Q=n[47];let $;if(n[48]!==N||n[49]!==M||n[50]!==V||n[51]!==z){let e;n[53]!==N||n[54]!==M||n[55]!==V?(e=e=>{let t=M[e.index];return t==null?null:/* @__PURE__ */ h(F,{virtualItem:e,count:N,measureRef:V,children:t},e.key)},n[53]=N,n[54]=M,n[55]=V,n[56]=e):e=n[56],$=z.map(e),n[48]=N,n[49]=M,n[50]=V,n[51]=z,n[52]=$}else $=n[52];let se;return n[57]!==r||n[58]!==i||n[59]!==s||n[60]!==d||n[61]!==A||n[62]!==ne||n[63]!==re||n[64]!==_||n[65]!==Q||n[66]!==$?(se=/* @__PURE__ */ h(k,{"aria-label":r,"aria-labelledby":i,"aria-multiselectable":s,className:d,collectionProps:Q,gridNav:ne,listContext:re,viewportProps:_,ref:A,children:$}),n[57]=r,n[58]=i,n[59]=s,n[60]=d,n[61]=A,n[62]=ne,n[63]=re,n[64]=_,n[65]=Q,n[66]=$,n[67]=se):se=n[67],se};export{A as n,M as r,L as t};
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"./interactive-target-BXScNeOr.js";import{t as i}from"./slot-DdYN1L1C.js";import{c as a}from"react/compiler-runtime";import{Children as o,createContext as s,isValidElement as c,useContext as l,useEffect as u,useId as d,useRef as f,useState as p}from"react";import m from"tiny-invariant";import{jsx as h}from"react/jsx-runtime";import{useVirtualizer as g}from"@tanstack/react-virtual";const _=s(null);function v(e){let t=l(_);return m(t,`List.${e} must be composed inside List.Root / List.VirtualRoot (or a SelectableList viewport).`),t}const y=s(null),b=s(null);function x(e){return c(e)?e.props.disabled===!0:!1}function S({start:e,step:t,count:n,isItemDisabled:r}){for(let i=e;i>=0&&i<n;i+=t)if(!r(i))return i;return-1}const C=`a[href]:not([tabindex="-1"]), button:not(:disabled):not([tabindex="-1"]), [tabindex]:not([tabindex="-1"])`;function w(e){let t=e.matches(C)?e:e.querySelector(C);return t instanceof HTMLElement?t:null}function T(e){let t=e instanceof Element?e.closest(`[data-index]`):null;if(t==null)return null;let n=Number(t.getAttribute(`data-index`));return!Number.isInteger(n)||n<0?null:{item:t,index:n}}function E({count:e,isItemDisabled:t,focusItemAt:n}){return{onKeyDown:r=>{if(r.target instanceof HTMLElement&&(r.target.isContentEditable||r.target.tagName===`INPUT`||r.target.tagName===`TEXTAREA`||r.target.tagName===`SELECT`)||r.altKey||r.ctrlKey||r.metaKey)return;let i=T(r.target);if(i==null)return;let a=-1,o=1;switch(r.key){case`ArrowDown`:o=1,a=S({start:i.index+1,step:o,count:e,isItemDisabled:t});break;case`ArrowUp`:o=-1,a=S({start:i.index-1,step:o,count:e,isItemDisabled:t});break;case`Home`:o=1,a=S({start:0,step:o,count:e,isItemDisabled:t});break;case`End`:o=-1,a=S({start:e-1,step:o,count:e,isItemDisabled:t});break;default:return}r.preventDefault(),a>=0&&a!==i.index&&n(a,o)}}}function D(e){let t=a(37),{count:n,enabled:i,isItemDisabled:o,onActivate:s,itemId:c,scrollToIndex:l}=e,[u,d]=p(-1),m=f(!1),h=u>=n?n-1:u;if(u>=n&&d(n-1),!i){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e={activeIndex:-1,collectionProps:{}},t[0]=e):e=t[0],e}let g;t[1]===o?g=t[2]:(g=e=>o?.(e)??!1,t[1]=o,t[2]=g);let _=g,v;t[3]!==n||t[4]!==_?(v=(e,t)=>S({start:e,step:t,count:n,isItemDisabled:_}),t[3]=n,t[4]=_,t[5]=v):v=t[5];let y=v,b;t[6]===l?b=t[7]:(b=e=>{e<0||(d(e),l(e))},t[6]=l,t[7]=b);let x=b,C;t[8]!==h||t[9]!==c?(C=h>=0?c(h):void 0,t[8]=h,t[9]=c,t[10]=C):C=t[10];let w;t[11]===_?w=t[12]:(w=e=>{let t=T(e.target);t!=null&&!_(t.index)?(d(t.index),m.current=!1):m.current=!0},t[11]=_,t[12]=w);let E;t[13]!==_||t[14]!==s?(E=e=>{if(e.defaultPrevented)return;let t=T(e.target);t==null||_(t.index)||r(e.target,t.item)||(d(t.index),s?.(t.index))},t[13]=_,t[14]=s,t[15]=E):E=t[15];let D;t[16]!==n||t[17]!==y||t[18]!==_?(D=e=>{if(e.target!==e.currentTarget){let t=T(e.target);t!=null&&!_(t.index)&&d(t.index),e.target instanceof HTMLElement&&e.target.tabIndex>=0||e.currentTarget.focus({preventScroll:!0}),m.current=!1;return}let t=m.current;m.current=!1,n>0&&!t&&d(e=>e<0?y(0,1):e)},t[16]=n,t[17]=y,t[18]=_,t[19]=D):D=t[19];let O;t[20]===Symbol.for(`react.memo_cache_sentinel`)?(O=e=>{e.currentTarget.contains(e.relatedTarget)||(d(-1),m.current=!1)},t[20]=O):O=t[20];let k;t[21]!==x||t[22]!==h||t[23]!==n||t[24]!==y||t[25]!==_||t[26]!==s?(k=e=>{if(e.target===e.currentTarget&&!(e.altKey||e.ctrlKey||e.metaKey)){m.current=!1;bb103:switch(e.key){case`ArrowDown`:e.preventDefault(),x(y(h<0?0:h+1,1));break bb103;case`ArrowUp`:e.preventDefault(),x(h<0?y(0,1):y(h-1,-1));break bb103;case`Home`:e.preventDefault(),x(y(0,1));break bb103;case`End`:e.preventDefault(),x(y(n-1,-1));break bb103;case` `:case`Enter`:!e.repeat&&h>=0&&!_(h)&&(e.preventDefault(),s?.(h));break bb103}}},t[21]=x,t[22]=h,t[23]=n,t[24]=y,t[25]=_,t[26]=s,t[27]=k):k=t[27];let A;t[28]!==C||t[29]!==w||t[30]!==E||t[31]!==D||t[32]!==k?(A={tabIndex:0,"aria-activedescendant":C,onMouseDown:w,onClick:E,onFocus:D,onBlur:O,onKeyDown:k},t[28]=C,t[29]=w,t[30]=E,t[31]=D,t[32]=k,t[33]=A):A=t[33];let j;return t[34]!==h||t[35]!==A?(j={activeIndex:h,collectionProps:A},t[34]=h,t[35]=A,t[36]=j):j=t[36],j}function O(e){let t=a(25),{count:n,focusItemAt:r,isItemDisabled:i,onActivate:o,itemId:s,scrollToIndex:c,semantics:l}=e,u=d(),f;t[0]===l?f=t[1]:(f={semantics:l},t[0]=l,t[1]=f);let p=f,m;t[2]!==u||t[3]!==s?(m=s??(e=>`${u}-item-${e}`),t[2]=u,t[3]=s,t[4]=m):m=t[4];let h=m,g=l===`grid`,_;t[5]!==n||t[6]!==i||t[7]!==o||t[8]!==h||t[9]!==c||t[10]!==g?(_={count:n,enabled:g,isItemDisabled:i,onActivate:o,itemId:h,scrollToIndex:c},t[5]=n,t[6]=i,t[7]=o,t[8]=h,t[9]=c,t[10]=g,t[11]=_):_=t[11];let{activeIndex:v,collectionProps:y}=D(_),b=s==null?h:null,x;t[12]!==v||t[13]!==b?(x={activeIndex:v,stampItemId:b},t[12]=v,t[13]=b,t[14]=x):x=t[14];let S=x,C;t[15]!==n||t[16]!==r||t[17]!==y||t[18]!==i||t[19]!==l?(C=l===`list`?E({count:n,isItemDisabled:i,focusItemAt:r}):y,t[15]=n,t[16]=r,t[17]=y,t[18]=i,t[19]=l,t[20]=C):C=t[20];let w=C,T;return t[21]!==w||t[22]!==S||t[23]!==p?(T={collectionProps:w,gridNav:S,listContext:p},t[21]=w,t[22]=S,t[23]=p,t[24]=T):T=t[24],T}function k(e){let r=a(26),{"aria-label":i,"aria-labelledby":o,"aria-multiselectable":s,children:c,className:l,collectionProps:u,gridNav:d,listContext:f,viewportProps:p,ref:m}=e,g,v;r[0]===p?(g=r[1],v=r[2]):({"data-slot":g,...v}=p,r[0]=p,r[1]=g,r[2]=v);let y;r[3]===g?y=r[4]:(y=n(g,`list`),r[3]=g,r[4]=y);let x;r[5]===l?x=r[6]:(x=t(`border-popover bg-popover scrollbar overscroll-none overflow-x-hidden overflow-y-auto rounded-md border p-1`,l),r[5]=l,r[6]=x);let S=f.semantics===`grid`?`grid`:`list`,C;r[7]!==i||r[8]!==o||r[9]!==s||r[10]!==c||r[11]!==u||r[12]!==S?(C=/* @__PURE__ */ h(`div`,{"data-slot":`list-collection`,role:S,"aria-label":i,"aria-labelledby":o,"aria-multiselectable":s,className:`relative flex w-full flex-col gap-px outline-hidden`,...u,children:c}),r[7]=i,r[8]=o,r[9]=s,r[10]=c,r[11]=u,r[12]=S,r[13]=C):C=r[13];let w;r[14]!==m||r[15]!==y||r[16]!==x||r[17]!==C||r[18]!==v?(w=/* @__PURE__ */ h(`div`,{ref:m,"data-slot":y,className:x,...v,children:C}),r[14]=m,r[15]=y,r[16]=x,r[17]=C,r[18]=v,r[19]=w):w=r[19];let T;r[20]!==d||r[21]!==w?(T=/* @__PURE__ */ h(b.Provider,{value:d,children:w}),r[20]=d,r[21]=w,r[22]=T):T=r[22];let E;return r[23]!==f||r[24]!==T?(E=/* @__PURE__ */ h(_.Provider,{value:f,children:T}),r[23]=f,r[24]=T,r[25]=E):E=r[25],E}const A=r=>{let o=a(43),s,c,u,d,f,p,m,g,_;o[0]===r?(s=o[1],c=o[2],u=o[3],d=o[4],f=o[5],p=o[6],m=o[7],g=o[8],_=o[9]):({"data-slot":d,asChild:s,children:c,className:u,disabled:g,ref:p,selected:_,style:m,...f}=r,o[0]=r,o[1]=s,o[2]=c,o[3]=u,o[4]=d,o[5]=f,o[6]=p,o[7]=m,o[8]=g,o[9]=_);let x=g!==void 0&&g,S=_!==void 0&&_,{semantics:C}=v(`Item`),w=l(y),T=l(b),E=C===`grid`,D=s?i:`div`,O=w?.placement??null,k=w?.index,A=E&&T!=null&&k!=null&&T.activeIndex===k,j=O?.measureRef??null,M=e(p,j),N;o[10]===d?N=o[11]:(N=n(d,`list-item`),o[10]=d,o[11]=N);let P;o[12]!==T||o[13]!==k||o[14]!==E||o[15]!==f?(P=E&&k!=null&&T?.stampItemId!=null?T.stampItemId(k):f.id,o[12]=T,o[13]=k,o[14]=E,o[15]=f,o[16]=P):P=o[16];let F=S?`selected`:`unselected`,I=x||void 0,L=A||void 0,R=E?`row`:`listitem`,z=E?S:void 0,B=E&&x?!0:f[`aria-disabled`],V=E?O?.posInSet:void 0,H=E?void 0:O?.posInSet,U=E?void 0:O?.setSize,W=!x&&`hover:bg-active-menu-item hover:data-[state=selected]:bg-active-selected-menu-item`,G=!E&&!x&&`has-focus-visible:bg-active-menu-item has-focus-visible:data-[state=selected]:bg-active-selected-menu-item`,K;o[17]!==u||o[18]!==W||o[19]!==G?(K=t(`rounded-md data-[state=selected]:bg-selected-menu-item data-active:bg-active-menu-item data-active:data-[state=selected]:bg-active-selected-menu-item`,W,G,u),o[17]=u,o[18]=W,o[19]=G,o[20]=K):K=o[20];let q;o[21]!==O||o[22]!==m?(q=O?{...m,...O.style}:m,o[21]=O,o[22]=m,o[23]=q):q=o[23];let J;return o[24]!==D||o[25]!==c||o[26]!==M||o[27]!==k||o[28]!==f||o[29]!==B||o[30]!==V||o[31]!==H||o[32]!==U||o[33]!==K||o[34]!==q||o[35]!==N||o[36]!==P||o[37]!==F||o[38]!==I||o[39]!==L||o[40]!==R||o[41]!==z?(J=/* @__PURE__ */ h(D,{ref:M,"data-slot":N,...f,id:P,"data-index":k,"data-state":F,"data-disabled":I,"data-active":L,role:R,"aria-selected":z,"aria-disabled":B,"aria-rowindex":V,"aria-posinset":H,"aria-setsize":U,className:K,style:q,children:c}),o[24]=D,o[25]=c,o[26]=M,o[27]=k,o[28]=f,o[29]=B,o[30]=V,o[31]=H,o[32]=U,o[33]=K,o[34]=q,o[35]=N,o[36]=P,o[37]=F,o[38]=I,o[39]=L,o[40]=R,o[41]=z,o[42]=J):J=o[42],J};function j(e){let t=a(5),{children:n,index:r}=e,i;t[0]===r?i=t[1]:(i={index:r,placement:null},t[0]=r,t[1]=i);let o=i,s;return t[2]!==n||t[3]!==o?(s=/* @__PURE__ */ h(y.Provider,{value:o,children:n}),t[2]=n,t[3]=o,t[4]=s):s=t[4],s}const M=t=>{let n=a(40),r,i,s,l,u,d,p,m,g,_,v;n[0]===t?(r=n[1],i=n[2],s=n[3],l=n[4],u=n[5],d=n[6],p=n[7],m=n[8],g=n[9],_=n[10],v=n[11]):({"aria-label":r,"aria-labelledby":i,"aria-multiselectable":s,children:l,className:u,isItemDisabled:d,onActivate:m,itemId:p,ref:_,semantics:v,...g}=t,n[0]=t,n[1]=r,n[2]=i,n[3]=s,n[4]=l,n[5]=u,n[6]=d,n[7]=p,n[8]=m,n[9]=g,n[10]=_,n[11]=v);let y=v===void 0?`list`:v,b=f(null),S=e(b,_),C;n[12]===l?C=n[13]:(C=o.toArray(l).filter(c),n[12]=l,n[13]=C);let T=C,E;n[14]===Symbol.for(`react.memo_cache_sentinel`)?(E=e=>{b.current?.querySelector(`[data-index="${e}"]`)?.scrollIntoView({block:`nearest`})},n[14]=E):E=n[14];let D=E,A;n[15]===T.length?A=n[16]:(A=(e,t)=>{let n=b.current;if(n!=null)for(let r=e;r>=0&&r<T.length;r+=t){let e=n.querySelector(`[data-index="${r}"]`);if(e==null)continue;let t=w(e);if(t!=null){t.focus({preventScroll:!0}),e.scrollIntoView({block:`nearest`});return}}},n[15]=T.length,n[16]=A);let j=A,M;n[17]!==d||n[18]!==T?(M=d??(e=>x(T[e])),n[17]=d,n[18]=T,n[19]=M):M=n[19];let P;n[20]!==j||n[21]!==T.length||n[22]!==p||n[23]!==m||n[24]!==y||n[25]!==M?(P={count:T.length,focusItemAt:j,isItemDisabled:M,onActivate:m,itemId:p,scrollToIndex:D,semantics:y},n[20]=j,n[21]=T.length,n[22]=p,n[23]=m,n[24]=y,n[25]=M,n[26]=P):P=n[26];let{collectionProps:F,gridNav:I,listContext:L}=O(P),R;n[27]===T?R=n[28]:(R=T.map(N),n[27]=T,n[28]=R);let z;return n[29]!==r||n[30]!==i||n[31]!==s||n[32]!==u||n[33]!==F||n[34]!==S||n[35]!==I||n[36]!==L||n[37]!==g||n[38]!==R?(z=/* @__PURE__ */ h(k,{"aria-label":r,"aria-labelledby":i,"aria-multiselectable":s,className:u,collectionProps:F,gridNav:I,listContext:L,viewportProps:g,ref:S,children:R}),n[29]=r,n[30]=i,n[31]=s,n[32]=u,n[33]=F,n[34]=S,n[35]=I,n[36]=L,n[37]=g,n[38]=R,n[39]=z):z=n[39],z};function N(e,t){return/* @__PURE__ */ h(j,{index:t,children:e},e.key??t)}function P({virtualItem:e,count:t,measureRef:n}){return{posInSet:e.index+1,setSize:t,measureRef:n,style:{position:`absolute`,left:0,top:0,width:`100%`,transform:`translateY(${e.start}px)`}}}function F(e){let t=a(10),{children:n,count:r,measureRef:i,virtualItem:o}=e,s=o.index,c;t[0]!==r||t[1]!==i||t[2]!==o?(c=P({virtualItem:o,count:r,measureRef:i}),t[0]=r,t[1]=i,t[2]=o,t[3]=c):c=t[3];let l;t[4]!==c||t[5]!==o.index?(l={index:s,placement:c},t[4]=c,t[5]=o.index,t[6]=l):l=t[6];let u=l,d;return t[7]!==n||t[8]!==u?(d=/* @__PURE__ */ h(y.Provider,{value:u,children:n}),t[7]=n,t[8]=u,t[9]=d):d=t[9],d}function I({count:e,estimateItemHeight:t,getItemKey:n,overscan:r,scrollRef:i}){"use no memo";let a=g({count:e,getScrollElement:()=>i.current,estimateSize:()=>t,getItemKey:n,overscan:r,gap:1,initialRect:{width:0,height:t*(r+1)}});return{virtualItems:a.getVirtualItems(),totalSize:a.getTotalSize(),measureElement:a.measureElement,scrollToIndex:a.scrollToIndex}}const L=t=>{let n=a(68),r,i,s,l,d,p,m,g,_,v,y,b,S;n[0]===t?(r=n[1],i=n[2],s=n[3],l=n[4],d=n[5],p=n[6],m=n[7],g=n[8],_=n[9],v=n[10],y=n[11],b=n[12],S=n[13]):({"aria-label":r,"aria-labelledby":i,"aria-multiselectable":s,children:l,className:d,estimateItemHeight:y,isItemDisabled:p,onActivate:g,overscan:b,itemId:m,ref:v,semantics:S,..._}=t,n[0]=t,n[1]=r,n[2]=i,n[3]=s,n[4]=l,n[5]=d,n[6]=p,n[7]=m,n[8]=g,n[9]=_,n[10]=v,n[11]=y,n[12]=b,n[13]=S);let C=y===void 0?44:y,T=b===void 0?8:b,E=S===void 0?`list`:S,D=f(null),A=e(D,v),j;n[14]===l?j=n[15]:(j=o.toArray(l).filter(c),n[14]=l,n[15]=j);let M=j,N=M.length,P;n[16]===M?P=n[17]:(P=e=>M[e]?.key??e,n[16]=M,n[17]=P);let L=P,R;n[18]!==N||n[19]!==C||n[20]!==L||n[21]!==T?(R={count:N,estimateItemHeight:C,getItemKey:L,overscan:T,scrollRef:D},n[18]=N,n[19]=C,n[20]=L,n[21]=T,n[22]=R):R=n[22];let{virtualItems:z,totalSize:B,measureElement:V,scrollToIndex:H}=I(R),U;n[23]===H?U=n[24]:(U=e=>H(e,{align:`auto`}),n[23]=H,n[24]=U);let W=U,G=f(null),K,q;n[25]===Symbol.for(`react.memo_cache_sentinel`)?(K=()=>()=>{G.current!=null&&cancelAnimationFrame(G.current)},q=[],n[25]=K,n[26]=q):(K=n[25],q=n[26]),u(K,q);let J;n[27]!==N||n[28]!==W?(J=(e,t)=>{G.current!=null&&(cancelAnimationFrame(G.current),G.current=null);let n=e,r=0,i=()=>{G.current=null;let e=D.current;if(e==null||n<0||n>=N)return;W(n);let a=e.querySelector(`[data-index="${n}"]`);if(a!=null){let e=w(a);if(e!=null){e.focus({preventScroll:!0});return}n+=t,r=0}r+=1,r<10&&(G.current=requestAnimationFrame(i))};i()},n[27]=N,n[28]=W,n[29]=J):J=n[29];let ee=J,Y;n[30]!==p||n[31]!==M?(Y=p??(e=>x(M[e])),n[30]=p,n[31]=M,n[32]=Y):Y=n[32];let X;n[33]!==N||n[34]!==ee||n[35]!==m||n[36]!==g||n[37]!==W||n[38]!==E||n[39]!==Y?(X={count:N,focusItemAt:ee,isItemDisabled:Y,onActivate:g,itemId:m,scrollToIndex:W,semantics:E},n[33]=N,n[34]=ee,n[35]=m,n[36]=g,n[37]=W,n[38]=E,n[39]=Y,n[40]=X):X=n[40];let{collectionProps:te,gridNav:ne,listContext:re}=O(X),ie=z.some(e=>e.index===ne.activeIndex)?te[`aria-activedescendant`]:void 0,ae=E===`grid`?N:void 0,oe=`${B}px`,Z;n[41]===oe?Z=n[42]:(Z={height:oe},n[41]=oe,n[42]=Z);let Q;n[43]!==te||n[44]!==ie||n[45]!==ae||n[46]!==Z?(Q={...te,"aria-activedescendant":ie,"aria-rowcount":ae,style:Z},n[43]=te,n[44]=ie,n[45]=ae,n[46]=Z,n[47]=Q):Q=n[47];let $;if(n[48]!==N||n[49]!==M||n[50]!==V||n[51]!==z){let e;n[53]!==N||n[54]!==M||n[55]!==V?(e=e=>{let t=M[e.index];return t==null?null:/* @__PURE__ */ h(F,{virtualItem:e,count:N,measureRef:V,children:t},e.key)},n[53]=N,n[54]=M,n[55]=V,n[56]=e):e=n[56],$=z.map(e),n[48]=N,n[49]=M,n[50]=V,n[51]=z,n[52]=$}else $=n[52];let se;return n[57]!==r||n[58]!==i||n[59]!==s||n[60]!==d||n[61]!==A||n[62]!==ne||n[63]!==re||n[64]!==_||n[65]!==Q||n[66]!==$?(se=/* @__PURE__ */ h(k,{"aria-label":r,"aria-labelledby":i,"aria-multiselectable":s,className:d,collectionProps:Q,gridNav:ne,listContext:re,viewportProps:_,ref:A,children:$}),n[57]=r,n[58]=i,n[59]=s,n[60]=d,n[61]=A,n[62]=ne,n[63]=re,n[64]=_,n[65]=Q,n[66]=$,n[67]=se):se=n[67],se};export{A as n,M as r,L as t};
package/dist/list.d.ts CHANGED
@@ -1,6 +1,17 @@
1
+ /**
2
+ * Re-exports for the List component — a scrollable, optionally-virtualized
3
+ * list of clickable items (account switchers, SSO provider pickers).
4
+ *
5
+ * The list primitive backing it (and `SelectableList`) lives in
6
+ * `./primitive.js` / `./virtual.js` and is deliberately **not** exported — it
7
+ * is internal shared implementation, mirroring how `dialog/primitive` backs
8
+ * the dialog family.
9
+ *
10
+ * @see https://mantle.ngrok.com/components/data-display/list
11
+ */
1
12
  import { n as WithAsChild } from "./as-child-DFxX3U2i.js";
2
13
  import { t as WithDataSlot } from "./data-slot-B-LqAcBB.js";
3
- import { CSSProperties, ComponentProps, ReactNode, Ref } from "react";
14
+ import { ComponentProps } from "react";
4
15
  /**
5
16
  * ARIA semantics for a {@link Root} / `VirtualRoot` collection and its
6
17
  * {@link Item}s. The element is always a `<div>` — per WAI-ARIA the *role*
@@ -299,6 +310,13 @@ declare const ItemDescription: ({ "data-slot": dataSlot, className, ref, ...prop
299
310
  * also move focus between them — the focused item tints like hover instead of
300
311
  * drawing a focus ring.
301
312
  *
313
+ * @useWhen Show a scrollable list of items that each run an action or navigate, such as an account
314
+ * switcher.
315
+ *
316
+ * @siblings
317
+ * - `SelectableList`: the user selects rows with checkboxes.
318
+ * - `DropdownMenu`: the actions open in a menu from a button.
319
+ *
302
320
  * @see https://mantle.ngrok.com/components/data-display/list
303
321
  *
304
322
  * @example
package/dist/list.js CHANGED
@@ -1 +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{n as r,r as i,t as a}from"./list-RFRIQxU2.js";import{c as o}from"react/compiler-runtime";import{jsx as s}from"react/jsx-runtime";const c={Root:e=>{let t=o(2),n;return t[0]===e?n=t[1]:(n=/* @__PURE__ */ s(i,{semantics:`list`,...e}),t[0]=e,t[1]=n),n},VirtualRoot:e=>{let t=o(2),n;return t[0]===e?n=t[1]:(n=/* @__PURE__ */ s(a,{semantics:`list`,...e}),t[0]=e,t[1]=n),n},Item:t=>{let i=o(34),a,c,u,d,f,p,m;i[0]===t?(a=i[1],c=i[2],u=i[3],d=i[4],f=i[5],p=i[6],m=i[7]):({asChild:a,className:c,current:u,disabled:d,onClick:f,ref:m,...p}=t,i[0]=t,i[1]=a,i[2]=c,i[3]=u,i[4]=d,i[5]=f,i[6]=p,i[7]=m);let h=a?n:`button`,g=u||void 0,_;i[8]!==a||i[9]!==d?(_=a?{"aria-disabled":d||void 0,tabIndex:d?-1:void 0}:{type:`button`,disabled:d},i[8]=a,i[9]=d,i[10]=_):_=i[10];let v;i[11]!==a||i[12]!==d||i[13]!==f?(v=e=>{a&&d?(e.preventDefault(),e.stopPropagation()):f?.(e)},i[11]=a,i[12]=d,i[13]=f,i[14]=v):v=i[14];let y;i[15]===c?y=i[16]:(y=e(`flex w-full cursor-pointer flex-col gap-0.5 rounded-md bg-transparent px-2 py-1.5 text-left text-sm`,`disabled:cursor-default disabled:opacity-50 aria-disabled:cursor-default aria-disabled:opacity-50 aria-disabled:pointer-events-none`,`focus-visible:outline-hidden`,c),i[15]=c,i[16]=y);let b;i[17]!==a||i[18]!==d||i[19]!==p?(b=a&&d?l:p.onClickCapture,i[17]=a,i[18]=d,i[19]=p,i[20]=b):b=i[20];let x;i[21]!==h||i[22]!==p||i[23]!==m||i[24]!==g||i[25]!==_||i[26]!==v||i[27]!==y||i[28]!==b?(x=/* @__PURE__ */ s(h,{ref:m,"data-slot":`list-item-control`,"aria-current":g,..._,onClick:v,className:y,...p,onClickCapture:b}),i[21]=h,i[22]=p,i[23]=m,i[24]=g,i[25]=_,i[26]=v,i[27]=y,i[28]=b,i[29]=x):x=i[29];let S;return i[30]!==u||i[31]!==d||i[32]!==x?(S=/* @__PURE__ */ s(r,{selected:u,disabled:d,children:x}),i[30]=u,i[31]=d,i[32]=x,i[33]=S):S=i[33],S},ItemTitle:n=>{let r=o(14),i,a,c,l;r[0]===n?(i=r[1],a=r[2],c=r[3],l=r[4]):({"data-slot":a,className:i,ref:l,...c}=n,r[0]=n,r[1]=i,r[2]=a,r[3]=c,r[4]=l);let u;r[5]===a?u=r[6]:(u=t(a,`list-item-title`),r[5]=a,r[6]=u);let d;r[7]===i?d=r[8]:(d=e(`text-strong font-medium`,i),r[7]=i,r[8]=d);let f;return r[9]!==c||r[10]!==l||r[11]!==u||r[12]!==d?(f=/* @__PURE__ */ s(`span`,{ref:l,"data-slot":u,className:d,...c}),r[9]=c,r[10]=l,r[11]=u,r[12]=d,r[13]=f):f=r[13],f},ItemDescription:n=>{let r=o(14),i,a,c,l;r[0]===n?(i=r[1],a=r[2],c=r[3],l=r[4]):({"data-slot":a,className:i,ref:l,...c}=n,r[0]=n,r[1]=i,r[2]=a,r[3]=c,r[4]=l);let u;r[5]===a?u=r[6]:(u=t(a,`list-item-description`),r[5]=a,r[6]=u);let d;r[7]===i?d=r[8]:(d=e(`text-body leading-4`,i),r[7]=i,r[8]=d);let f;return r[9]!==c||r[10]!==l||r[11]!==u||r[12]!==d?(f=/* @__PURE__ */ s(`span`,{ref:l,"data-slot":u,className:d,...c}),r[9]=c,r[10]=l,r[11]=u,r[12]=d,r[13]=f):f=r[13],f}};function l(e){e.preventDefault(),e.stopPropagation()}export{c as List};
1
+ import{t as e}from"./cx-CK7o_rVv.js";import{t}from"./data-slot-EM6s2WEU.js";import{n,r,t as i}from"./list-CO_yLdln.js";import{t as a}from"./slot-DdYN1L1C.js";import{c as o}from"react/compiler-runtime";import{jsx as s}from"react/jsx-runtime";const c={Root:e=>{let t=o(2),n;return t[0]===e?n=t[1]:(n=/* @__PURE__ */ s(r,{semantics:`list`,...e}),t[0]=e,t[1]=n),n},VirtualRoot:e=>{let t=o(2),n;return t[0]===e?n=t[1]:(n=/* @__PURE__ */ s(i,{semantics:`list`,...e}),t[0]=e,t[1]=n),n},Item:t=>{let r=o(34),i,c,u,d,f,p,m;r[0]===t?(i=r[1],c=r[2],u=r[3],d=r[4],f=r[5],p=r[6],m=r[7]):({asChild:i,className:c,current:u,disabled:d,onClick:f,ref:m,...p}=t,r[0]=t,r[1]=i,r[2]=c,r[3]=u,r[4]=d,r[5]=f,r[6]=p,r[7]=m);let h=i?a:`button`,g=u||void 0,_;r[8]!==i||r[9]!==d?(_=i?{"aria-disabled":d||void 0,tabIndex:d?-1:void 0}:{type:`button`,disabled:d},r[8]=i,r[9]=d,r[10]=_):_=r[10];let v;r[11]!==i||r[12]!==d||r[13]!==f?(v=e=>{i&&d?(e.preventDefault(),e.stopPropagation()):f?.(e)},r[11]=i,r[12]=d,r[13]=f,r[14]=v):v=r[14];let y;r[15]===c?y=r[16]:(y=e(`flex w-full cursor-pointer flex-col gap-0.5 rounded-md bg-transparent px-2 py-1.5 text-left text-sm`,`disabled:cursor-default disabled:opacity-50 aria-disabled:cursor-default aria-disabled:opacity-50 aria-disabled:pointer-events-none`,`focus-visible:outline-hidden`,c),r[15]=c,r[16]=y);let b;r[17]!==i||r[18]!==d||r[19]!==p?(b=i&&d?l:p.onClickCapture,r[17]=i,r[18]=d,r[19]=p,r[20]=b):b=r[20];let x;r[21]!==h||r[22]!==p||r[23]!==m||r[24]!==g||r[25]!==_||r[26]!==v||r[27]!==y||r[28]!==b?(x=/* @__PURE__ */ s(h,{ref:m,"data-slot":`list-item-control`,"aria-current":g,..._,onClick:v,className:y,...p,onClickCapture:b}),r[21]=h,r[22]=p,r[23]=m,r[24]=g,r[25]=_,r[26]=v,r[27]=y,r[28]=b,r[29]=x):x=r[29];let S;return r[30]!==u||r[31]!==d||r[32]!==x?(S=/* @__PURE__ */ s(n,{selected:u,disabled:d,children:x}),r[30]=u,r[31]=d,r[32]=x,r[33]=S):S=r[33],S},ItemTitle:n=>{let r=o(14),i,a,c,l;r[0]===n?(i=r[1],a=r[2],c=r[3],l=r[4]):({"data-slot":a,className:i,ref:l,...c}=n,r[0]=n,r[1]=i,r[2]=a,r[3]=c,r[4]=l);let u;r[5]===a?u=r[6]:(u=t(a,`list-item-title`),r[5]=a,r[6]=u);let d;r[7]===i?d=r[8]:(d=e(`text-strong font-medium`,i),r[7]=i,r[8]=d);let f;return r[9]!==c||r[10]!==l||r[11]!==u||r[12]!==d?(f=/* @__PURE__ */ s(`span`,{ref:l,"data-slot":u,className:d,...c}),r[9]=c,r[10]=l,r[11]=u,r[12]=d,r[13]=f):f=r[13],f},ItemDescription:n=>{let r=o(14),i,a,c,l;r[0]===n?(i=r[1],a=r[2],c=r[3],l=r[4]):({"data-slot":a,className:i,ref:l,...c}=n,r[0]=n,r[1]=i,r[2]=a,r[3]=c,r[4]=l);let u;r[5]===a?u=r[6]:(u=t(a,`list-item-description`),r[5]=a,r[6]=u);let d;r[7]===i?d=r[8]:(d=e(`text-body leading-4`,i),r[7]=i,r[8]=d);let f;return r[9]!==c||r[10]!==l||r[11]!==u||r[12]!==d?(f=/* @__PURE__ */ s(`span`,{ref:l,"data-slot":u,className:d,...c}),r[9]=c,r[10]=l,r[11]=u,r[12]=d,r[13]=f):f=r[13],f}};function l(e){e.preventDefault(),e.stopPropagation()}export{c as List};