@epilot/zenith-react 0.1.0 → 0.2.0-next.1

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 (132) hide show
  1. package/README.md +34 -0
  2. package/dist/components/accordion/accordion.js +57 -48
  3. package/dist/components/accordion/accordion.js.map +1 -1
  4. package/dist/components/alert-dialog/alert-dialog.js +120 -91
  5. package/dist/components/alert-dialog/alert-dialog.js.map +1 -1
  6. package/dist/components/avatar/avatar-group.js +38 -35
  7. package/dist/components/avatar/avatar-group.js.map +1 -1
  8. package/dist/components/avatar/avatar.js +78 -71
  9. package/dist/components/avatar/avatar.js.map +1 -1
  10. package/dist/components/badge/badge.js +60 -55
  11. package/dist/components/badge/badge.js.map +1 -1
  12. package/dist/components/breadcrumb/breadcrumb.js +99 -54
  13. package/dist/components/breadcrumb/breadcrumb.js.map +1 -1
  14. package/dist/components/button/button.js +87 -77
  15. package/dist/components/button/button.js.map +1 -1
  16. package/dist/components/button-group/button-group.js +36 -32
  17. package/dist/components/button-group/button-group.js.map +1 -1
  18. package/dist/components/callout/callout.js +113 -104
  19. package/dist/components/callout/callout.js.map +1 -1
  20. package/dist/components/card/card.js +62 -52
  21. package/dist/components/card/card.js.map +1 -1
  22. package/dist/components/checkbox/checkbox.js +22 -19
  23. package/dist/components/checkbox/checkbox.js.map +1 -1
  24. package/dist/components/code-block/code-block.js +135 -123
  25. package/dist/components/code-block/code-block.js.map +1 -1
  26. package/dist/components/code-editor/code-editor.js +276 -260
  27. package/dist/components/code-editor/code-editor.js.map +1 -1
  28. package/dist/components/collapsible-sidebar/collapsible-sidebar.js +62 -56
  29. package/dist/components/collapsible-sidebar/collapsible-sidebar.js.map +1 -1
  30. package/dist/components/command/command.js +116 -105
  31. package/dist/components/command/command.js.map +1 -1
  32. package/dist/components/data-table/data-table-body.js +38 -34
  33. package/dist/components/data-table/data-table-body.js.map +1 -1
  34. package/dist/components/data-table/data-table-column-header.js +30 -26
  35. package/dist/components/data-table/data-table-column-header.js.map +1 -1
  36. package/dist/components/data-table/data-table-column-order.js +79 -73
  37. package/dist/components/data-table/data-table-column-order.js.map +1 -1
  38. package/dist/components/data-table/data-table-column-visibility.js +25 -22
  39. package/dist/components/data-table/data-table-column-visibility.js.map +1 -1
  40. package/dist/components/data-table/data-table-content.js +47 -44
  41. package/dist/components/data-table/data-table-content.js.map +1 -1
  42. package/dist/components/data-table/data-table-error.js +36 -32
  43. package/dist/components/data-table/data-table-error.js.map +1 -1
  44. package/dist/components/data-table/data-table-footer.js +10 -8
  45. package/dist/components/data-table/data-table-footer.js.map +1 -1
  46. package/dist/components/data-table/data-table-header-draggable.js +40 -36
  47. package/dist/components/data-table/data-table-header-draggable.js.map +1 -1
  48. package/dist/components/data-table/data-table-loading.js +21 -18
  49. package/dist/components/data-table/data-table-loading.js.map +1 -1
  50. package/dist/components/data-table/data-table-resize-handle.js +13 -11
  51. package/dist/components/data-table/data-table-resize-handle.js.map +1 -1
  52. package/dist/components/data-table/data-table-row.js +47 -44
  53. package/dist/components/data-table/data-table-row.js.map +1 -1
  54. package/dist/components/data-table/data-table-toolbar.js +9 -7
  55. package/dist/components/data-table/data-table-toolbar.js.map +1 -1
  56. package/dist/components/data-table/data-table.js +48 -46
  57. package/dist/components/data-table/data-table.js.map +1 -1
  58. package/dist/components/date-range-picker/date-range-picker.js +212 -193
  59. package/dist/components/date-range-picker/date-range-picker.js.map +1 -1
  60. package/dist/components/date-range-picker/range-calendar.js +36 -34
  61. package/dist/components/date-range-picker/range-calendar.js.map +1 -1
  62. package/dist/components/date-time-picker/calendar.js +290 -272
  63. package/dist/components/date-time-picker/calendar.js.map +1 -1
  64. package/dist/components/date-time-picker/date-time-picker-input.js +127 -112
  65. package/dist/components/date-time-picker/date-time-picker-input.js.map +1 -1
  66. package/dist/components/date-time-picker/date-time-picker-panel.js +126 -120
  67. package/dist/components/date-time-picker/date-time-picker-panel.js.map +1 -1
  68. package/dist/components/date-time-picker/date-time-picker.js +91 -86
  69. package/dist/components/date-time-picker/date-time-picker.js.map +1 -1
  70. package/dist/components/date-time-picker/time-picker.js +95 -87
  71. package/dist/components/date-time-picker/time-picker.js.map +1 -1
  72. package/dist/components/dialog/dialog.js +125 -103
  73. package/dist/components/dialog/dialog.js.map +1 -1
  74. package/dist/components/drawer/drawer.js +151 -114
  75. package/dist/components/drawer/drawer.js.map +1 -1
  76. package/dist/components/dropdown-menu/dropdown-menu.js +141 -112
  77. package/dist/components/dropdown-menu/dropdown-menu.js.map +1 -1
  78. package/dist/components/field/field-combobox.js +196 -176
  79. package/dist/components/field/field-combobox.js.map +1 -1
  80. package/dist/components/field/field.js +237 -195
  81. package/dist/components/field/field.js.map +1 -1
  82. package/dist/components/list/list.js +237 -219
  83. package/dist/components/list/list.js.map +1 -1
  84. package/dist/components/option-card/option-card.js +129 -116
  85. package/dist/components/option-card/option-card.js.map +1 -1
  86. package/dist/components/pill/pill.js +55 -51
  87. package/dist/components/pill/pill.js.map +1 -1
  88. package/dist/components/popover/popover.js +53 -36
  89. package/dist/components/popover/popover.js.map +1 -1
  90. package/dist/components/radio/radio.js +38 -34
  91. package/dist/components/radio/radio.js.map +1 -1
  92. package/dist/components/scroll-area/scroll-area.js +38 -35
  93. package/dist/components/scroll-area/scroll-area.js.map +1 -1
  94. package/dist/components/scroll-overflow/scroll-overflow.js +166 -151
  95. package/dist/components/scroll-overflow/scroll-overflow.js.map +1 -1
  96. package/dist/components/segmented-control/segmented-control.js +93 -85
  97. package/dist/components/segmented-control/segmented-control.js.map +1 -1
  98. package/dist/components/select/select.js +149 -128
  99. package/dist/components/select/select.js.map +1 -1
  100. package/dist/components/separator/separator.js +19 -16
  101. package/dist/components/separator/separator.js.map +1 -1
  102. package/dist/components/skeleton/skeleton.js +34 -30
  103. package/dist/components/skeleton/skeleton.js.map +1 -1
  104. package/dist/components/spinner/spinner.js +22 -17
  105. package/dist/components/spinner/spinner.js.map +1 -1
  106. package/dist/components/surface/surface.js +25 -22
  107. package/dist/components/surface/surface.js.map +1 -1
  108. package/dist/components/switch/switch.js +66 -57
  109. package/dist/components/switch/switch.js.map +1 -1
  110. package/dist/components/table/table-pagination.js +139 -129
  111. package/dist/components/table/table-pagination.js.map +1 -1
  112. package/dist/components/table/table.js +104 -90
  113. package/dist/components/table/table.js.map +1 -1
  114. package/dist/components/tabs/tabs.js +212 -79
  115. package/dist/components/tabs/tabs.js.map +1 -1
  116. package/dist/components/toast/toast.js +112 -100
  117. package/dist/components/toast/toast.js.map +1 -1
  118. package/dist/components/toggle/toggle.js +32 -30
  119. package/dist/components/toggle/toggle.js.map +1 -1
  120. package/dist/components/tooltip/tooltip.js +59 -46
  121. package/dist/components/tooltip/tooltip.js.map +1 -1
  122. package/dist/index.d.ts +22 -0
  123. package/dist/lib/clear-button.js +18 -17
  124. package/dist/lib/clear-button.js.map +1 -1
  125. package/dist/styles/host-reset.js +47 -0
  126. package/dist/styles/host-reset.js.map +1 -0
  127. package/dist/styles/overlay-layer.js +5 -0
  128. package/dist/styles/overlay-layer.js.map +1 -0
  129. package/dist/tokens.json +1 -1
  130. package/package.json +8 -7
  131. package/scripts/migration-diagnostics.mjs +42 -7
  132. package/scripts/migration-sweep.mjs +9 -1
@@ -1,11 +1,12 @@
1
- import { jsx as t, jsxs as D } from "react/jsx-runtime";
1
+ import { jsx as t, jsxs as T } from "react/jsx-runtime";
2
2
  import * as i from "react";
3
- import { useSensors as Q, useSensor as j, DndContext as tt, closestCenter as et, DragOverlay as ot, KeyboardSensor as rt, PointerSensor as nt } from "../../vendor/.bun/@dnd-kit_core@6.3.1_6f4b9a1cfb20c0ae/vendor/@dnd-kit/core/dist/core.esm.js";
4
- import { SortableContext as it, verticalListSortingStrategy as st, arrayMove as at, useSortable as lt } from "../../vendor/.bun/@dnd-kit_sortable@10.0.0_1d291640e1250bbe/vendor/@dnd-kit/sortable/dist/sortable.esm.js";
5
- import { mergeClasses as f, SLOT_ATTR as m, shorthands as p } from "@epilot/zenith-runtime/v1";
6
- import { makeZenithStyles as ct } from "../../styles/make-styles.js";
7
- import { successLight as dt, warningLight as ut, errorLight as pt, spacingGroup2 as F, grayA12 as V, fontWeightSemibold as gt, leadingSm as X, textSm as $, grayA10 as mt, fontWeightMedium as ft, accentSolid as ht, accentA8 as xt, grayA11 as G, grayA8 as vt, leadingXs as yt, textXs as bt, listIndexPaddingX as K, listItemPaddingX as Z, listItemPaddingY as B, listIndexMinWidth as wt, grayA2 as _, radiusMd as P, successSoftHover as It, warningSoftHover as St, errorSoftHover as Lt, accentSoft as kt, successDefault as Ct, successSoft as Dt, warningDefault as Tt, warningSoft as Wt, errorDefault as Nt, errorSoft as Et, listItemMinHeight as Ot, spacingElement3 as At, grayA5 as Gt, spacingElement1 as Bt, spacingElement2 as Pt, listItemGap as Rt } from "../../tokens/index.js";
8
- const Ht = (n) => /* @__PURE__ */ D(
3
+ import { useSensors as tt, useSensor as F, DndContext as et, closestCenter as ot, DragOverlay as rt, KeyboardSensor as nt, PointerSensor as it } from "../../vendor/.bun/@dnd-kit_core@6.3.1_6f4b9a1cfb20c0ae/vendor/@dnd-kit/core/dist/core.esm.js";
4
+ import { SortableContext as st, verticalListSortingStrategy as at, arrayMove as lt, useSortable as ct } from "../../vendor/.bun/@dnd-kit_sortable@10.0.0_1d291640e1250bbe/vendor/@dnd-kit/sortable/dist/sortable.esm.js";
5
+ import { mergeClasses as h, SLOT_ATTR as f, shorthands as g } from "@epilot/zenith-runtime/v1";
6
+ import { makeZenithStyles as dt } from "../../styles/make-styles.js";
7
+ import { boxModel as u } from "../../styles/host-reset.js";
8
+ import { successLight as ut, warningLight as pt, errorLight as gt, spacingGroup2 as V, grayA12 as X, fontWeightSemibold as mt, leadingSm as $, textSm as K, grayA10 as ft, fontWeightMedium as ht, accentSolid as xt, accentA8 as vt, grayA11 as B, grayA8 as yt, leadingXs as bt, textXs as wt, listIndexPaddingX as Z, listItemPaddingX as _, listItemPaddingY as P, listIndexMinWidth as It, grayA2 as q, radiusMd as R, successSoftHover as St, warningSoftHover as Lt, errorSoftHover as kt, accentSoft as Ct, successDefault as Dt, successSoft as Tt, warningDefault as Wt, warningSoft as Nt, errorDefault as Et, errorSoft as Ot, listItemMinHeight as At, spacingElement3 as Gt, grayA5 as Bt, spacingElement1 as Pt, spacingElement2 as Rt, listItemGap as Ht } from "../../tokens/index.js";
9
+ const zt = (n) => /* @__PURE__ */ T(
9
10
  "svg",
10
11
  {
11
12
  xmlns: "http://www.w3.org/2000/svg",
@@ -24,7 +25,7 @@ const Ht = (n) => /* @__PURE__ */ D(
24
25
  /* @__PURE__ */ t("circle", { cx: "15", cy: "19", r: "1.5" })
25
26
  ]
26
27
  }
27
- ), q = (n) => /* @__PURE__ */ D(
28
+ ), U = (n) => /* @__PURE__ */ T(
28
29
  "svg",
29
30
  {
30
31
  xmlns: "http://www.w3.org/2000/svg",
@@ -42,7 +43,7 @@ const Ht = (n) => /* @__PURE__ */ D(
42
43
  /* @__PURE__ */ t("line", { x1: "12", y1: "17", x2: "12.01", y2: "17" })
43
44
  ]
44
45
  }
45
- ), zt = (n) => /* @__PURE__ */ D(
46
+ ), Mt = (n) => /* @__PURE__ */ T(
46
47
  "svg",
47
48
  {
48
49
  xmlns: "http://www.w3.org/2000/svg",
@@ -59,7 +60,7 @@ const Ht = (n) => /* @__PURE__ */ D(
59
60
  /* @__PURE__ */ t("polyline", { points: "22 4 12 14.01 9 11.01" })
60
61
  ]
61
62
  }
62
- ), Mt = (n) => /* @__PURE__ */ t(
63
+ ), jt = (n) => /* @__PURE__ */ t(
63
64
  "svg",
64
65
  {
65
66
  xmlns: "http://www.w3.org/2000/svg",
@@ -73,32 +74,34 @@ const Ht = (n) => /* @__PURE__ */ D(
73
74
  ...n,
74
75
  children: /* @__PURE__ */ t("polyline", { points: "9 18 15 12 9 6" })
75
76
  }
76
- ), y = ct({
77
+ ), b = dt({
77
78
  list: {
79
+ ...u,
78
80
  display: "flex",
79
81
  width: "100%",
80
82
  listStyleType: "none",
81
83
  flexDirection: "column",
82
- ...p.gap(0),
83
- ...p.padding(0),
84
- ...p.margin(0)
84
+ ...g.gap(0),
85
+ ...g.padding(0),
86
+ ...g.margin(0)
85
87
  },
86
88
  // ListItem base — density-bound (DENSITY-SPEC.md §2.2, WP9B2A-ACCEPTANCE-LIST).
87
89
  item: {
90
+ ...u,
88
91
  position: "relative",
89
92
  display: "flex",
90
93
  width: "100%",
91
94
  alignItems: "center",
92
- ...p.borderRadius(P),
93
- color: V,
95
+ ...g.borderRadius(R),
96
+ color: X,
94
97
  transitionProperty: "color, background-color, border-color, text-decoration-color, fill, stroke",
95
98
  transitionDuration: "150ms",
96
99
  transitionTimingFunction: "cubic-bezier(0.4, 0, 0.2, 1)",
97
- minHeight: Ot,
98
- ...p.gap(Rt),
99
- ...p.padding(B, Z),
100
- fontSize: $,
101
- lineHeight: X,
100
+ minHeight: At,
101
+ ...g.gap(Ht),
102
+ ...g.padding(P, _),
103
+ fontSize: K,
104
+ lineHeight: $,
102
105
  "& > svg": {
103
106
  flexShrink: 0,
104
107
  width: "1rem",
@@ -108,42 +111,42 @@ const Ht = (n) => /* @__PURE__ */ D(
108
111
  // Status variants
109
112
  statusDefault: {},
110
113
  statusError: {
111
- backgroundColor: Et,
112
- color: Nt
114
+ backgroundColor: Ot,
115
+ color: Et
113
116
  },
114
117
  statusWarning: {
115
- backgroundColor: Wt,
116
- color: Tt
118
+ backgroundColor: Nt,
119
+ color: Wt
117
120
  },
118
121
  statusSuccess: {
119
- backgroundColor: Dt,
120
- color: Ct
122
+ backgroundColor: Tt,
123
+ color: Dt
121
124
  },
122
125
  // Striped variant (only neutral rows)
123
126
  stripedEven: {
124
127
  "&:nth-child(even)": {
125
- backgroundColor: _
128
+ backgroundColor: q
126
129
  }
127
130
  },
128
131
  // Interactive hovers
129
132
  interactiveDefault: {
130
133
  ":hover": {
131
- backgroundColor: kt
134
+ backgroundColor: Ct
132
135
  }
133
136
  },
134
137
  interactiveError: {
135
138
  ":hover": {
136
- backgroundColor: Lt
139
+ backgroundColor: kt
137
140
  }
138
141
  },
139
142
  interactiveWarning: {
140
143
  ":hover": {
141
- backgroundColor: St
144
+ backgroundColor: Lt
142
145
  }
143
146
  },
144
147
  interactiveSuccess: {
145
148
  ":hover": {
146
- backgroundColor: It
149
+ backgroundColor: St
147
150
  }
148
151
  },
149
152
  // Sortable modifiers
@@ -159,34 +162,36 @@ const Ht = (n) => /* @__PURE__ */ D(
159
162
  },
160
163
  // Index gutter — density-bound.
161
164
  indexBase: {
165
+ ...u,
162
166
  display: "flex",
163
167
  flexShrink: 0,
164
168
  userSelect: "none",
165
169
  alignItems: "center",
166
170
  justifyContent: "center",
167
171
  alignSelf: "stretch",
168
- borderTopLeftRadius: P,
169
- borderBottomLeftRadius: P,
170
- backgroundColor: _,
172
+ borderTopLeftRadius: R,
173
+ borderBottomLeftRadius: R,
174
+ backgroundColor: q,
171
175
  textAlign: "center",
172
- color: G,
176
+ color: B,
173
177
  fontVariantNumeric: "tabular-nums",
174
- minWidth: wt,
175
- marginTop: `calc(-1 * ${B})`,
176
- marginBottom: `calc(-1 * ${B})`,
177
- marginLeft: `calc(-1 * ${Z})`,
178
- paddingLeft: K,
179
- paddingRight: K
178
+ minWidth: It,
179
+ marginTop: `calc(-1 * ${P})`,
180
+ marginBottom: `calc(-1 * ${P})`,
181
+ marginLeft: `calc(-1 * ${_})`,
182
+ paddingLeft: Z,
183
+ paddingRight: Z
180
184
  },
181
185
  // Content
182
186
  content: {
187
+ ...u,
183
188
  display: "flex",
184
189
  minWidth: 0,
185
190
  flexGrow: 1,
186
191
  flexShrink: 1,
187
192
  flexBasis: "0%",
188
193
  alignItems: "center",
189
- ...p.gap(Pt),
194
+ ...g.gap(Rt),
190
195
  overflow: "hidden",
191
196
  textOverflow: "ellipsis",
192
197
  whiteSpace: "nowrap",
@@ -203,41 +208,43 @@ const Ht = (n) => /* @__PURE__ */ D(
203
208
  display: "flex",
204
209
  flexShrink: 0,
205
210
  alignItems: "center",
206
- ...p.gap(Bt)
211
+ ...g.gap(Pt)
207
212
  },
208
213
  // Text
209
214
  text: {
215
+ ...u,
210
216
  display: "flex",
211
217
  minWidth: 0,
212
218
  flexGrow: 1,
213
219
  flexShrink: 1,
214
220
  flexBasis: "0%",
215
221
  flexDirection: "column",
216
- ...p.gap("0.125rem")
222
+ ...g.gap("0.125rem")
217
223
  },
218
224
  // Description
219
225
  description: {
220
226
  overflow: "hidden",
221
227
  textOverflow: "ellipsis",
222
228
  whiteSpace: "nowrap",
223
- fontSize: bt,
224
- lineHeight: yt,
225
- color: G
229
+ fontSize: wt,
230
+ lineHeight: bt,
231
+ color: B
226
232
  },
227
233
  // Drag handle button
228
234
  dragHandle: {
235
+ ...u,
229
236
  position: "relative",
230
237
  zIndex: 10,
231
238
  display: "inline-flex",
232
239
  flexShrink: 0,
233
240
  cursor: "grab",
234
241
  alignItems: "center",
235
- color: vt,
242
+ color: yt,
236
243
  backgroundColor: "transparent",
237
- ...p.border("0"),
238
- ...p.padding(0),
244
+ ...g.border("0"),
245
+ ...g.padding(0),
239
246
  ":hover": {
240
- color: G
247
+ color: B
241
248
  },
242
249
  ":active": {
243
250
  cursor: "grabbing"
@@ -246,7 +253,7 @@ const Ht = (n) => /* @__PURE__ */ D(
246
253
  outlineWidth: "2px",
247
254
  outlineStyle: "solid",
248
255
  outlineOffset: "2px",
249
- outlineColor: xt
256
+ outlineColor: vt
250
257
  },
251
258
  "& svg": {
252
259
  width: "1rem",
@@ -255,6 +262,7 @@ const Ht = (n) => /* @__PURE__ */ D(
255
262
  },
256
263
  // Drop indicator line
257
264
  dropIndicator: {
265
+ ...u,
258
266
  pointerEvents: "none",
259
267
  position: "absolute",
260
268
  left: 0,
@@ -262,8 +270,8 @@ const Ht = (n) => /* @__PURE__ */ D(
262
270
  zIndex: 10,
263
271
  height: "0.125rem",
264
272
  transformOrigin: "center",
265
- ...p.borderRadius("9999px"),
266
- backgroundColor: ht,
273
+ ...g.borderRadius("9999px"),
274
+ backgroundColor: xt,
267
275
  animationName: {
268
276
  from: {
269
277
  transform: "scaleX(0)",
@@ -285,10 +293,11 @@ const Ht = (n) => /* @__PURE__ */ D(
285
293
  },
286
294
  // DragOverlay ghost
287
295
  dragOverlayItem: {
296
+ ...u,
288
297
  transformOrigin: "center",
289
298
  transform: "scale(0.95)",
290
299
  cursor: "grabbing",
291
- ...p.border("1px", "solid", Gt),
300
+ ...g.border("1px", "solid", Bt),
292
301
  backgroundColor: "rgb(255 255 255 / 55%)",
293
302
  boxShadow: "0 10px 15px -3px #0000001a, 0 4px 6px -4px #0000001a",
294
303
  backdropFilter: "blur(12px)",
@@ -307,17 +316,19 @@ const Ht = (n) => /* @__PURE__ */ D(
307
316
  listStyleType: "none"
308
317
  },
309
318
  groupTrigger: {
319
+ ...u,
310
320
  cursor: "pointer",
311
321
  textAlign: "left",
312
- fontWeight: ft,
322
+ fontWeight: ht,
313
323
  backgroundColor: "transparent",
314
- ...p.border("0")
324
+ ...g.border("0")
315
325
  },
316
326
  groupChevron: {
327
+ ...u,
317
328
  width: "1rem",
318
329
  height: "1rem",
319
330
  flexShrink: 0,
320
- color: mt,
331
+ color: ft,
321
332
  transitionProperty: "transform",
322
333
  transitionDuration: "150ms",
323
334
  transitionTimingFunction: "cubic-bezier(0.4, 0, 0.2, 1)"
@@ -326,6 +337,7 @@ const Ht = (n) => /* @__PURE__ */ D(
326
337
  transform: "rotate(90deg)"
327
338
  },
328
339
  groupTriggerText: {
340
+ ...u,
329
341
  minWidth: 0,
330
342
  flexGrow: 1,
331
343
  flexShrink: 1,
@@ -335,20 +347,22 @@ const Ht = (n) => /* @__PURE__ */ D(
335
347
  whiteSpace: "nowrap"
336
348
  },
337
349
  standaloneGroupLabel: {
338
- marginTop: F,
350
+ ...u,
351
+ marginTop: V,
339
352
  display: "block",
340
353
  listStyleType: "none",
341
- ...p.padding("0.375rem", At),
342
- fontSize: $,
343
- lineHeight: X,
344
- fontWeight: gt,
345
- color: V,
354
+ ...g.padding("0.375rem", Gt),
355
+ fontSize: K,
356
+ lineHeight: $,
357
+ fontWeight: mt,
358
+ color: X,
346
359
  "&:first-child": {
347
360
  marginTop: 0
348
361
  }
349
362
  },
350
363
  groupContentList: {
351
- paddingLeft: F
364
+ ...u,
365
+ paddingLeft: V
352
366
  },
353
367
  collapseWrapper: {
354
368
  display: "grid",
@@ -364,142 +378,146 @@ const Ht = (n) => /* @__PURE__ */ D(
364
378
  gridTemplateRows: "1fr"
365
379
  },
366
380
  collapseInner: {
381
+ ...u,
367
382
  minHeight: 0,
368
383
  overflow: "hidden"
369
384
  },
370
385
  // Status icons
371
386
  statusIconError: {
387
+ ...u,
372
388
  width: "1rem",
373
389
  height: "1rem",
374
390
  flexShrink: 0,
375
- color: pt
391
+ color: gt
376
392
  },
377
393
  statusIconWarning: {
394
+ ...u,
378
395
  width: "1rem",
379
396
  height: "1rem",
380
397
  flexShrink: 0,
381
- color: ut
398
+ color: pt
382
399
  },
383
400
  statusIconSuccess: {
401
+ ...u,
384
402
  width: "1rem",
385
403
  height: "1rem",
386
404
  flexShrink: 0,
387
- color: dt
405
+ color: ut
388
406
  }
389
- }), jt = ({ status: n }) => {
390
- const o = y();
391
- return n === "error" ? /* @__PURE__ */ t(q, { className: o.statusIconError }) : n === "warning" ? /* @__PURE__ */ t(q, { className: o.statusIconWarning }) : n === "success" ? /* @__PURE__ */ t(zt, { className: o.statusIconSuccess }) : null;
392
- }, Y = i.createContext({
407
+ }), Ft = ({ status: n }) => {
408
+ const o = b();
409
+ return n === "error" ? /* @__PURE__ */ t(U, { className: o.statusIconError }) : n === "warning" ? /* @__PURE__ */ t(U, { className: o.statusIconWarning }) : n === "success" ? /* @__PURE__ */ t(Mt, { className: o.statusIconSuccess }) : null;
410
+ }, J = i.createContext({
393
411
  striped: !1,
394
412
  showIndex: !1,
395
413
  sortable: !1
396
- }), J = () => i.useContext(Y), Ft = (n) => n === void 0 ? void 0 : n === "relaxed" ? "normal" : n, Yt = i.forwardRef(function({
414
+ }), Q = () => i.useContext(J), Vt = (n) => n === void 0 ? void 0 : n === "relaxed" ? "normal" : n, Qt = i.forwardRef(function({
397
415
  className: o,
398
416
  density: l,
399
417
  striped: e = !1,
400
418
  showIndex: c = !1,
401
419
  sortable: s = !1,
402
420
  onReorder: r,
403
- children: x,
404
- ...b
405
- }, w) {
406
- const v = y(), u = Ft(l), I = i.Children.toArray(x).filter(
421
+ children: v,
422
+ ...w
423
+ }, I) {
424
+ const y = b(), p = Vt(l), S = i.Children.toArray(v).filter(
407
425
  i.isValidElement
408
- ), T = I.map(
409
- (d, C) => d.type === U ? i.cloneElement(d, { index: C }) : d
410
- ), h = I.filter((d) => d.type === U), a = h.map((d) => d.props.value).filter((d) => typeof d == "string"), [S, W] = i.useState(null), L = S ? a.indexOf(S) : -1, k = S != null ? h.find((d) => d.props.value === S) : void 0, N = Q(
411
- j(nt, { activationConstraint: { distance: 3 } }),
412
- j(rt)
413
- ), E = (d) => {
414
- W(d.active.id);
415
- }, A = (d) => {
416
- W(null);
417
- const { active: C, over: g } = d;
418
- if (!g || C.id === g.id) return;
419
- const z = a.indexOf(C.id), M = a.indexOf(g.id);
420
- z === -1 || M === -1 || r == null || r(at(a, z, M));
421
- }, O = /* @__PURE__ */ t(
426
+ ), W = S.map(
427
+ (d, D) => d.type === Y ? i.cloneElement(d, { index: D }) : d
428
+ ), x = S.filter((d) => d.type === Y), a = x.map((d) => d.props.value).filter((d) => typeof d == "string"), [L, N] = i.useState(null), k = L ? a.indexOf(L) : -1, C = L != null ? x.find((d) => d.props.value === L) : void 0, E = tt(
429
+ F(it, { activationConstraint: { distance: 3 } }),
430
+ F(nt)
431
+ ), O = (d) => {
432
+ N(d.active.id);
433
+ }, G = (d) => {
434
+ N(null);
435
+ const { active: D, over: m } = d;
436
+ if (!m || D.id === m.id) return;
437
+ const M = a.indexOf(D.id), j = a.indexOf(m.id);
438
+ M === -1 || j === -1 || r == null || r(lt(a, M, j));
439
+ }, A = /* @__PURE__ */ t(
422
440
  "ol",
423
441
  {
424
- ref: w,
442
+ ref: I,
425
443
  "data-slot": "list",
426
- [m]: "list",
427
- ...u !== void 0 ? { "data-density": u } : {},
428
- className: f(v.list, o),
429
- ...b,
430
- children: T
444
+ [f]: "list",
445
+ ...p !== void 0 ? { "data-density": p } : {},
446
+ className: h(y.list, o),
447
+ ...w,
448
+ children: W
431
449
  }
432
450
  );
433
- return /* @__PURE__ */ t(Y.Provider, { value: { striped: e, showIndex: c, sortable: s }, children: s ? /* @__PURE__ */ D(
434
- tt,
451
+ return /* @__PURE__ */ t(J.Provider, { value: { striped: e, showIndex: c, sortable: s }, children: s ? /* @__PURE__ */ T(
452
+ et,
435
453
  {
436
- sensors: N,
437
- collisionDetection: et,
438
- onDragStart: E,
439
- onDragEnd: A,
440
- onDragCancel: () => W(null),
454
+ sensors: E,
455
+ collisionDetection: ot,
456
+ onDragStart: O,
457
+ onDragEnd: G,
458
+ onDragCancel: () => N(null),
441
459
  children: [
442
460
  /* @__PURE__ */ t(
443
- it,
461
+ st,
444
462
  {
445
463
  items: a,
446
- strategy: st,
447
- children: O
464
+ strategy: at,
465
+ children: A
448
466
  }
449
467
  ),
450
- /* @__PURE__ */ t(ot, { children: k ? /* @__PURE__ */ t(
451
- R,
468
+ /* @__PURE__ */ t(rt, { children: C ? /* @__PURE__ */ t(
469
+ H,
452
470
  {
453
- value: k.props.value,
454
- status: k.props.status,
455
- index: L,
456
- className: v.dragOverlayItem,
457
- ...u !== void 0 ? { "data-density": u } : {},
458
- children: k.props.children
471
+ value: C.props.value,
472
+ status: C.props.status,
473
+ index: k,
474
+ className: y.dragOverlayItem,
475
+ ...p !== void 0 ? { "data-density": p } : {},
476
+ children: C.props.children
459
477
  }
460
478
  ) : null })
461
479
  ]
462
480
  }
463
- ) : O });
464
- }), Vt = i.forwardRef(function({ className: o, children: l, ...e }, c) {
465
- const s = y();
481
+ ) : A });
482
+ }), Xt = i.forwardRef(function({ className: o, children: l, ...e }, c) {
483
+ const s = b();
466
484
  return /* @__PURE__ */ t(
467
485
  "span",
468
486
  {
469
487
  ref: c,
470
488
  "data-slot": "list-item-actions",
471
- [m]: "list-item-actions",
489
+ [f]: "list-item-actions",
472
490
  onPointerDown: (r) => r.stopPropagation(),
473
- className: f(s.actions, o),
491
+ className: h(s.actions, o),
474
492
  ...e,
475
493
  children: l
476
494
  }
477
495
  );
478
- }), Jt = i.forwardRef(function({ className: o, ...l }, e) {
479
- const c = y();
496
+ }), te = i.forwardRef(function({ className: o, ...l }, e) {
497
+ const c = b();
480
498
  return /* @__PURE__ */ t(
481
499
  "span",
482
500
  {
483
501
  ref: e,
484
502
  "data-slot": "list-item-text",
485
- [m]: "list-item-text",
486
- className: f(c.text, o),
503
+ [f]: "list-item-text",
504
+ className: h(c.text, o),
487
505
  ...l
488
506
  }
489
507
  );
490
- }), Qt = i.forwardRef(function({ className: o, ...l }, e) {
491
- const c = y();
508
+ }), ee = i.forwardRef(function({ className: o, ...l }, e) {
509
+ const c = b();
492
510
  return /* @__PURE__ */ t(
493
511
  "span",
494
512
  {
495
513
  ref: e,
496
514
  "data-slot": "list-item-description",
497
- [m]: "list-item-description",
498
- className: f(c.description, o),
515
+ [f]: "list-item-description",
516
+ className: h(c.description, o),
499
517
  ...l
500
518
  }
501
519
  );
502
- }), R = i.forwardRef(
520
+ }), H = i.forwardRef(
503
521
  function({
504
522
  className: o,
505
523
  value: l,
@@ -507,60 +525,60 @@ const Ht = (n) => /* @__PURE__ */ D(
507
525
  index: c,
508
526
  children: s,
509
527
  setNodeRef: r,
510
- setActivatorNodeRef: x,
511
- style: b,
512
- isDragging: w,
513
- dropEdge: v,
514
- listeners: u,
515
- attributes: I,
516
- ...T
517
- }, h) {
518
- const a = y(), { striped: S, showIndex: W, sortable: L } = J(), k = L && !w, N = i.Children.toArray(s), E = N.find(
519
- (g) => i.isValidElement(g) && g.type === Vt
520
- ), A = N.filter((g) => g !== E), O = i.useCallback(
521
- (g) => {
522
- r == null || r(g), typeof h == "function" ? h(g) : h && (h.current = g);
528
+ setActivatorNodeRef: v,
529
+ style: w,
530
+ isDragging: I,
531
+ dropEdge: y,
532
+ listeners: p,
533
+ attributes: S,
534
+ ...W
535
+ }, x) {
536
+ const a = b(), { striped: L, showIndex: N, sortable: k } = Q(), C = k && !I, E = i.Children.toArray(s), O = E.find(
537
+ (m) => i.isValidElement(m) && m.type === Xt
538
+ ), G = E.filter((m) => m !== O), A = i.useCallback(
539
+ (m) => {
540
+ r == null || r(m), typeof x == "function" ? x(m) : x && (x.current = m);
523
541
  },
524
- [r, h]
525
- ), d = e === "error" ? a.statusError : e === "warning" ? a.statusWarning : e === "success" ? a.statusSuccess : a.statusDefault, C = k ? e === "error" ? a.interactiveError : e === "warning" ? a.interactiveWarning : e === "success" ? a.interactiveSuccess : a.interactiveDefault : void 0;
526
- return /* @__PURE__ */ D(
542
+ [r, x]
543
+ ), d = e === "error" ? a.statusError : e === "warning" ? a.statusWarning : e === "success" ? a.statusSuccess : a.statusDefault, D = C ? e === "error" ? a.interactiveError : e === "warning" ? a.interactiveWarning : e === "success" ? a.interactiveSuccess : a.interactiveDefault : void 0;
544
+ return /* @__PURE__ */ T(
527
545
  "li",
528
546
  {
529
- ref: O,
530
- style: b,
547
+ ref: A,
548
+ style: w,
531
549
  "data-slot": "list-item",
532
- [m]: "list-item",
550
+ [f]: "list-item",
533
551
  "data-status": e,
534
552
  "data-value": l,
535
- onPointerDown: L ? u == null ? void 0 : u.onPointerDown : void 0,
536
- className: f(
553
+ onPointerDown: k ? p == null ? void 0 : p.onPointerDown : void 0,
554
+ className: h(
537
555
  a.item,
538
556
  d,
539
- S && e === "default" && a.stripedEven,
540
- C,
541
- L && a.sortableItem,
542
- w && a.itemDragging,
557
+ L && e === "default" && a.stripedEven,
558
+ D,
559
+ k && a.sortableItem,
560
+ I && a.itemDragging,
543
561
  o
544
562
  ),
545
- ...T,
563
+ ...W,
546
564
  children: [
547
- v && /* @__PURE__ */ t(
565
+ y && /* @__PURE__ */ t(
548
566
  "span",
549
567
  {
550
568
  "data-slot": "list-drop-indicator",
551
- [m]: "list-drop-indicator",
569
+ [f]: "list-drop-indicator",
552
570
  "aria-hidden": "true",
553
- className: f(
571
+ className: h(
554
572
  a.dropIndicator,
555
- v === "top" ? a.dropIndicatorTop : a.dropIndicatorBottom
573
+ y === "top" ? a.dropIndicatorTop : a.dropIndicatorBottom
556
574
  )
557
575
  }
558
576
  ),
559
- W && /* @__PURE__ */ t(
577
+ N && /* @__PURE__ */ t(
560
578
  "span",
561
579
  {
562
580
  "data-slot": "list-item-index",
563
- [m]: "list-item-index",
581
+ [f]: "list-item-index",
564
582
  "aria-hidden": "true",
565
583
  className: a.indexBase,
566
584
  children: (c ?? 0) + 1
@@ -570,30 +588,30 @@ const Ht = (n) => /* @__PURE__ */ D(
570
588
  "span",
571
589
  {
572
590
  "data-slot": "list-item-content",
573
- [m]: "list-item-content",
591
+ [f]: "list-item-content",
574
592
  className: a.content,
575
- children: A
593
+ children: G
576
594
  }
577
595
  ),
578
- /* @__PURE__ */ t(jt, { status: e }),
579
- E,
580
- L && /* @__PURE__ */ t(
596
+ /* @__PURE__ */ t(Ft, { status: e }),
597
+ O,
598
+ k && /* @__PURE__ */ t(
581
599
  "button",
582
600
  {
583
- ref: x,
601
+ ref: v,
584
602
  type: "button",
585
603
  "aria-label": `Drag to reorder ${l ?? "item"}`,
586
604
  className: a.dragHandle,
587
- ...I,
588
- onKeyDown: u == null ? void 0 : u.onKeyDown,
589
- children: /* @__PURE__ */ t(Ht, {})
605
+ ...S,
606
+ onKeyDown: p == null ? void 0 : p.onKeyDown,
607
+ children: /* @__PURE__ */ t(zt, {})
590
608
  }
591
609
  )
592
610
  ]
593
611
  }
594
612
  );
595
613
  }
596
- ), Xt = i.forwardRef(
614
+ ), $t = i.forwardRef(
597
615
  function(o, l) {
598
616
  const e = i.useId();
599
617
  process.env.NODE_ENV !== "production" && o.value === void 0 && console.warn(
@@ -603,35 +621,35 @@ const Ht = (n) => /* @__PURE__ */ D(
603
621
  attributes: c,
604
622
  listeners: s,
605
623
  setNodeRef: r,
606
- setActivatorNodeRef: x,
607
- isDragging: b,
608
- isOver: w,
609
- activeIndex: v,
610
- overIndex: u
611
- } = lt({
624
+ setActivatorNodeRef: v,
625
+ isDragging: w,
626
+ isOver: I,
627
+ activeIndex: y,
628
+ overIndex: p
629
+ } = ct({
612
630
  id: o.value ?? e,
613
631
  animateLayoutChanges: () => !1
614
- }), I = w && !b && v !== -1 ? v < u ? "bottom" : "top" : null;
632
+ }), S = I && !w && y !== -1 ? y < p ? "bottom" : "top" : null;
615
633
  return /* @__PURE__ */ t(
616
- R,
634
+ H,
617
635
  {
618
636
  ref: l,
619
637
  ...o,
620
638
  setNodeRef: r,
621
- setActivatorNodeRef: x,
622
- isDragging: b,
623
- dropEdge: I,
639
+ setActivatorNodeRef: v,
640
+ isDragging: w,
641
+ dropEdge: S,
624
642
  listeners: s,
625
643
  attributes: c
626
644
  }
627
645
  );
628
646
  }
629
- ), U = i.forwardRef(
647
+ ), Y = i.forwardRef(
630
648
  function(o, l) {
631
- const { sortable: e } = J();
632
- return e ? /* @__PURE__ */ t(Xt, { ref: l, ...o }) : /* @__PURE__ */ t(R, { ref: l, ...o });
649
+ const { sortable: e } = Q();
650
+ return e ? /* @__PURE__ */ t($t, { ref: l, ...o }) : /* @__PURE__ */ t(H, { ref: l, ...o });
633
651
  }
634
- ), H = i.createContext(null), te = i.forwardRef(
652
+ ), z = i.createContext(null), oe = i.forwardRef(
635
653
  function({
636
654
  open: o,
637
655
  defaultOpen: l = !1,
@@ -639,36 +657,36 @@ const Ht = (n) => /* @__PURE__ */ D(
639
657
  className: c,
640
658
  children: s,
641
659
  ...r
642
- }, x) {
643
- const b = y(), [w, v] = i.useState(l), u = o ?? w, I = i.useId(), T = (h) => {
644
- o === void 0 && v(h), e == null || e(h);
660
+ }, v) {
661
+ const w = b(), [I, y] = i.useState(l), p = o ?? I, S = i.useId(), W = (x) => {
662
+ o === void 0 && y(x), e == null || e(x);
645
663
  };
646
- return /* @__PURE__ */ t(H.Provider, { value: { open: u, setOpen: T, contentId: I }, children: /* @__PURE__ */ t(
664
+ return /* @__PURE__ */ t(z.Provider, { value: { open: p, setOpen: W, contentId: S }, children: /* @__PURE__ */ t(
647
665
  "li",
648
666
  {
649
- ref: x,
667
+ ref: v,
650
668
  "data-slot": "list-group",
651
- [m]: "list-group",
652
- "data-state": u ? "open" : "closed",
653
- className: f(b.group, c),
669
+ [f]: "list-group",
670
+ "data-state": p ? "open" : "closed",
671
+ className: h(w.group, c),
654
672
  ...r,
655
673
  children: s
656
674
  }
657
675
  ) });
658
676
  }
659
- ), ee = i.forwardRef(function({ className: o, children: l, ...e }, c) {
660
- const s = y(), r = i.useContext(H);
661
- return r ? /* @__PURE__ */ D(
677
+ ), re = i.forwardRef(function({ className: o, children: l, ...e }, c) {
678
+ const s = b(), r = i.useContext(z);
679
+ return r ? /* @__PURE__ */ T(
662
680
  "button",
663
681
  {
664
682
  ref: c,
665
683
  type: "button",
666
684
  "data-slot": "list-group-trigger",
667
- [m]: "list-group-trigger",
685
+ [f]: "list-group-trigger",
668
686
  "aria-expanded": r.open,
669
687
  "aria-controls": r.contentId,
670
688
  onClick: () => r.setOpen(!r.open),
671
- className: f(
689
+ className: h(
672
690
  s.item,
673
691
  s.interactiveDefault,
674
692
  s.groupTrigger,
@@ -677,9 +695,9 @@ const Ht = (n) => /* @__PURE__ */ D(
677
695
  ...e,
678
696
  children: [
679
697
  /* @__PURE__ */ t(
680
- Mt,
698
+ jt,
681
699
  {
682
- className: f(
700
+ className: h(
683
701
  s.groupChevron,
684
702
  r.open && s.groupChevronOpen
685
703
  )
@@ -693,19 +711,19 @@ const Ht = (n) => /* @__PURE__ */ D(
693
711
  {
694
712
  ref: c,
695
713
  "data-slot": "list-group-label",
696
- [m]: "list-group-label",
697
- className: f(s.standaloneGroupLabel, o),
714
+ [f]: "list-group-label",
715
+ className: h(s.standaloneGroupLabel, o),
698
716
  children: l
699
717
  }
700
718
  );
701
- }), oe = i.forwardRef(function({ className: o, children: l, ...e }, c) {
702
- const s = y(), r = i.useContext(H), x = /* @__PURE__ */ t(
719
+ }), ne = i.forwardRef(function({ className: o, children: l, ...e }, c) {
720
+ const s = b(), r = i.useContext(z), v = /* @__PURE__ */ t(
703
721
  "ul",
704
722
  {
705
723
  ref: c,
706
724
  "data-slot": "list-group-content",
707
- [m]: "list-group-content",
708
- className: f(s.list, s.groupContentList, o),
725
+ [f]: "list-group-content",
726
+ className: h(s.list, s.groupContentList, o),
709
727
  ...e,
710
728
  children: l
711
729
  }
@@ -715,22 +733,22 @@ const Ht = (n) => /* @__PURE__ */ D(
715
733
  {
716
734
  id: r.contentId,
717
735
  "data-state": r.open ? "open" : "closed",
718
- className: f(
736
+ className: h(
719
737
  s.collapseWrapper,
720
738
  r.open && s.collapseWrapperOpen
721
739
  ),
722
- children: /* @__PURE__ */ t("div", { className: s.collapseInner, children: x })
740
+ children: /* @__PURE__ */ t("div", { className: s.collapseInner, children: v })
723
741
  }
724
- ) : x;
742
+ ) : v;
725
743
  });
726
744
  export {
727
- Yt as List,
728
- te as ListGroup,
729
- oe as ListGroupContent,
730
- ee as ListGroupLabel,
731
- U as ListItem,
732
- Vt as ListItemActions,
733
- Qt as ListItemDescription,
734
- Jt as ListItemText
745
+ Qt as List,
746
+ oe as ListGroup,
747
+ ne as ListGroupContent,
748
+ re as ListGroupLabel,
749
+ Y as ListItem,
750
+ Xt as ListItemActions,
751
+ ee as ListItemDescription,
752
+ te as ListItemText
735
753
  };
736
754
  //# sourceMappingURL=list.js.map