@epilot/zenith-react 0.3.0-next.1 → 0.3.0-next.11
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.
- package/CHANGELOG.md +21 -5
- package/README.md +2 -2
- package/dist/components/command/command.js +21 -19
- package/dist/components/command/command.js.map +1 -1
- package/dist/components/dropdown-menu/dropdown-menu.js +4 -1
- package/dist/components/dropdown-menu/dropdown-menu.js.map +1 -1
- package/dist/components/field/field-combobox.js +13 -7
- package/dist/components/field/field-combobox.js.map +1 -1
- package/dist/components/list/list.js +176 -176
- package/dist/components/list/list.js.map +1 -1
- package/dist/components/tooltip/tooltip.js +14 -12
- package/dist/components/tooltip/tooltip.js.map +1 -1
- package/dist/tokens.json +0 -1
- package/package.json +8 -20
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import * as
|
|
3
|
-
import { mergeClasses as
|
|
4
|
-
import { makeZenithStyles as
|
|
1
|
+
import { jsx as e, jsxs as k } from "react/jsx-runtime";
|
|
2
|
+
import * as i from "react";
|
|
3
|
+
import { mergeClasses as g, SLOT_ATTR as m, shorthands as p } from "@epilot/zenith-runtime/v1";
|
|
4
|
+
import { makeZenithStyles as Q } from "../../styles/make-styles.js";
|
|
5
5
|
import { boxModel as d } from "../../styles/host-reset.js";
|
|
6
|
-
import { successLight as
|
|
7
|
-
const
|
|
6
|
+
import { successLight as tt, warningLight as et, errorLight as rt, spacingGroup2 as R, grayA12 as O, fontWeightSemibold as ot, leadingSm as P, textSm as H, grayA10 as it, fontWeightMedium as nt, accentSolid as st, accentA8 as at, grayA11 as T, grayA8 as lt, leadingXs as ct, textXs as dt, listIndexPaddingX as z, listItemPaddingX as j, listItemPaddingY as D, listIndexMinWidth as pt, grayA2 as M, radiusMd as W, successSoftHover as ut, warningSoftHover as mt, errorSoftHover as gt, accentSoft as ft, successDefault as ht, successSoft as xt, warningDefault as yt, warningSoft as vt, errorDefault as wt, errorSoft as bt, listItemMinHeight as It, spacingElement3 as St, grayA5 as kt, spacingElement1 as Lt, spacingElement2 as Ct, listItemGap as Tt } from "../../tokens/index.js";
|
|
7
|
+
const Dt = (t) => /* @__PURE__ */ k(
|
|
8
8
|
"svg",
|
|
9
9
|
{
|
|
10
10
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -13,17 +13,17 @@ const Tt = (r) => /* @__PURE__ */ S(
|
|
|
13
13
|
viewBox: "0 0 24 24",
|
|
14
14
|
fill: "currentColor",
|
|
15
15
|
"aria-hidden": "true",
|
|
16
|
-
...
|
|
16
|
+
...t,
|
|
17
17
|
children: [
|
|
18
|
-
/* @__PURE__ */
|
|
19
|
-
/* @__PURE__ */
|
|
20
|
-
/* @__PURE__ */
|
|
21
|
-
/* @__PURE__ */
|
|
22
|
-
/* @__PURE__ */
|
|
23
|
-
/* @__PURE__ */
|
|
18
|
+
/* @__PURE__ */ e("circle", { cx: "9", cy: "5", r: "1.5" }),
|
|
19
|
+
/* @__PURE__ */ e("circle", { cx: "15", cy: "5", r: "1.5" }),
|
|
20
|
+
/* @__PURE__ */ e("circle", { cx: "9", cy: "12", r: "1.5" }),
|
|
21
|
+
/* @__PURE__ */ e("circle", { cx: "15", cy: "12", r: "1.5" }),
|
|
22
|
+
/* @__PURE__ */ e("circle", { cx: "9", cy: "19", r: "1.5" }),
|
|
23
|
+
/* @__PURE__ */ e("circle", { cx: "15", cy: "19", r: "1.5" })
|
|
24
24
|
]
|
|
25
25
|
}
|
|
26
|
-
),
|
|
26
|
+
), F = (t) => /* @__PURE__ */ k(
|
|
27
27
|
"svg",
|
|
28
28
|
{
|
|
29
29
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -34,14 +34,14 @@ const Tt = (r) => /* @__PURE__ */ S(
|
|
|
34
34
|
strokeLinecap: "round",
|
|
35
35
|
strokeLinejoin: "round",
|
|
36
36
|
"aria-hidden": "true",
|
|
37
|
-
...
|
|
37
|
+
...t,
|
|
38
38
|
children: [
|
|
39
|
-
/* @__PURE__ */
|
|
40
|
-
/* @__PURE__ */
|
|
41
|
-
/* @__PURE__ */
|
|
39
|
+
/* @__PURE__ */ e("path", { d: "M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0Z" }),
|
|
40
|
+
/* @__PURE__ */ e("line", { x1: "12", y1: "9", x2: "12", y2: "13" }),
|
|
41
|
+
/* @__PURE__ */ e("line", { x1: "12", y1: "17", x2: "12.01", y2: "17" })
|
|
42
42
|
]
|
|
43
43
|
}
|
|
44
|
-
),
|
|
44
|
+
), Wt = (t) => /* @__PURE__ */ k(
|
|
45
45
|
"svg",
|
|
46
46
|
{
|
|
47
47
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -52,13 +52,13 @@ const Tt = (r) => /* @__PURE__ */ S(
|
|
|
52
52
|
strokeLinecap: "round",
|
|
53
53
|
strokeLinejoin: "round",
|
|
54
54
|
"aria-hidden": "true",
|
|
55
|
-
...
|
|
55
|
+
...t,
|
|
56
56
|
children: [
|
|
57
|
-
/* @__PURE__ */
|
|
58
|
-
/* @__PURE__ */
|
|
57
|
+
/* @__PURE__ */ e("path", { d: "M22 11.08V12a10 10 0 1 1-5.93-9.14" }),
|
|
58
|
+
/* @__PURE__ */ e("polyline", { points: "22 4 12 14.01 9 11.01" })
|
|
59
59
|
]
|
|
60
60
|
}
|
|
61
|
-
),
|
|
61
|
+
), At = (t) => /* @__PURE__ */ e(
|
|
62
62
|
"svg",
|
|
63
63
|
{
|
|
64
64
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -69,10 +69,10 @@ const Tt = (r) => /* @__PURE__ */ S(
|
|
|
69
69
|
strokeLinecap: "round",
|
|
70
70
|
strokeLinejoin: "round",
|
|
71
71
|
"aria-hidden": "true",
|
|
72
|
-
...
|
|
73
|
-
children: /* @__PURE__ */
|
|
72
|
+
...t,
|
|
73
|
+
children: /* @__PURE__ */ e("polyline", { points: "9 18 15 12 9 6" })
|
|
74
74
|
}
|
|
75
|
-
), f =
|
|
75
|
+
), f = Q({
|
|
76
76
|
list: {
|
|
77
77
|
...d,
|
|
78
78
|
display: "flex",
|
|
@@ -91,15 +91,15 @@ const Tt = (r) => /* @__PURE__ */ S(
|
|
|
91
91
|
width: "100%",
|
|
92
92
|
alignItems: "center",
|
|
93
93
|
...p.borderRadius(W),
|
|
94
|
-
color:
|
|
94
|
+
color: O,
|
|
95
95
|
transitionProperty: "color, background-color, border-color, text-decoration-color, fill, stroke",
|
|
96
96
|
transitionDuration: "150ms",
|
|
97
97
|
transitionTimingFunction: "cubic-bezier(0.4, 0, 0.2, 1)",
|
|
98
|
-
minHeight:
|
|
99
|
-
...p.gap(
|
|
100
|
-
...p.padding(D,
|
|
101
|
-
fontSize:
|
|
102
|
-
lineHeight:
|
|
98
|
+
minHeight: It,
|
|
99
|
+
...p.gap(Tt),
|
|
100
|
+
...p.padding(D, j),
|
|
101
|
+
fontSize: H,
|
|
102
|
+
lineHeight: P,
|
|
103
103
|
"& > svg": {
|
|
104
104
|
flexShrink: 0,
|
|
105
105
|
width: "1rem",
|
|
@@ -109,27 +109,27 @@ const Tt = (r) => /* @__PURE__ */ S(
|
|
|
109
109
|
// Status variants
|
|
110
110
|
statusDefault: {},
|
|
111
111
|
statusError: {
|
|
112
|
-
backgroundColor:
|
|
112
|
+
backgroundColor: bt,
|
|
113
113
|
color: wt
|
|
114
114
|
},
|
|
115
115
|
statusWarning: {
|
|
116
|
-
backgroundColor:
|
|
117
|
-
color:
|
|
116
|
+
backgroundColor: vt,
|
|
117
|
+
color: yt
|
|
118
118
|
},
|
|
119
119
|
statusSuccess: {
|
|
120
|
-
backgroundColor:
|
|
121
|
-
color:
|
|
120
|
+
backgroundColor: xt,
|
|
121
|
+
color: ht
|
|
122
122
|
},
|
|
123
123
|
// Striped variant (only neutral rows)
|
|
124
124
|
stripedEven: {
|
|
125
125
|
"&:nth-child(even)": {
|
|
126
|
-
backgroundColor:
|
|
126
|
+
backgroundColor: M
|
|
127
127
|
}
|
|
128
128
|
},
|
|
129
129
|
// Interactive hovers
|
|
130
130
|
interactiveDefault: {
|
|
131
131
|
":hover": {
|
|
132
|
-
backgroundColor:
|
|
132
|
+
backgroundColor: ft
|
|
133
133
|
}
|
|
134
134
|
},
|
|
135
135
|
interactiveError: {
|
|
@@ -139,12 +139,12 @@ const Tt = (r) => /* @__PURE__ */ S(
|
|
|
139
139
|
},
|
|
140
140
|
interactiveWarning: {
|
|
141
141
|
":hover": {
|
|
142
|
-
backgroundColor:
|
|
142
|
+
backgroundColor: mt
|
|
143
143
|
}
|
|
144
144
|
},
|
|
145
145
|
interactiveSuccess: {
|
|
146
146
|
":hover": {
|
|
147
|
-
backgroundColor:
|
|
147
|
+
backgroundColor: ut
|
|
148
148
|
}
|
|
149
149
|
},
|
|
150
150
|
// Sortable modifiers
|
|
@@ -169,16 +169,16 @@ const Tt = (r) => /* @__PURE__ */ S(
|
|
|
169
169
|
alignSelf: "stretch",
|
|
170
170
|
borderTopLeftRadius: W,
|
|
171
171
|
borderBottomLeftRadius: W,
|
|
172
|
-
backgroundColor:
|
|
172
|
+
backgroundColor: M,
|
|
173
173
|
textAlign: "center",
|
|
174
174
|
color: T,
|
|
175
175
|
fontVariantNumeric: "tabular-nums",
|
|
176
|
-
minWidth:
|
|
176
|
+
minWidth: pt,
|
|
177
177
|
marginTop: `calc(-1 * ${D})`,
|
|
178
178
|
marginBottom: `calc(-1 * ${D})`,
|
|
179
|
-
marginLeft: `calc(-1 * ${
|
|
180
|
-
paddingLeft:
|
|
181
|
-
paddingRight:
|
|
179
|
+
marginLeft: `calc(-1 * ${j})`,
|
|
180
|
+
paddingLeft: z,
|
|
181
|
+
paddingRight: z
|
|
182
182
|
},
|
|
183
183
|
// Content
|
|
184
184
|
content: {
|
|
@@ -189,7 +189,7 @@ const Tt = (r) => /* @__PURE__ */ S(
|
|
|
189
189
|
flexShrink: 1,
|
|
190
190
|
flexBasis: "0%",
|
|
191
191
|
alignItems: "center",
|
|
192
|
-
...p.gap(
|
|
192
|
+
...p.gap(Ct),
|
|
193
193
|
overflow: "hidden",
|
|
194
194
|
textOverflow: "ellipsis",
|
|
195
195
|
whiteSpace: "nowrap",
|
|
@@ -206,7 +206,7 @@ const Tt = (r) => /* @__PURE__ */ S(
|
|
|
206
206
|
display: "flex",
|
|
207
207
|
flexShrink: 0,
|
|
208
208
|
alignItems: "center",
|
|
209
|
-
...p.gap(
|
|
209
|
+
...p.gap(Lt)
|
|
210
210
|
},
|
|
211
211
|
// Text
|
|
212
212
|
text: {
|
|
@@ -224,8 +224,8 @@ const Tt = (r) => /* @__PURE__ */ S(
|
|
|
224
224
|
overflow: "hidden",
|
|
225
225
|
textOverflow: "ellipsis",
|
|
226
226
|
whiteSpace: "nowrap",
|
|
227
|
-
fontSize:
|
|
228
|
-
lineHeight:
|
|
227
|
+
fontSize: dt,
|
|
228
|
+
lineHeight: ct,
|
|
229
229
|
color: T
|
|
230
230
|
},
|
|
231
231
|
// Drag handle button
|
|
@@ -237,7 +237,7 @@ const Tt = (r) => /* @__PURE__ */ S(
|
|
|
237
237
|
flexShrink: 0,
|
|
238
238
|
cursor: "grab",
|
|
239
239
|
alignItems: "center",
|
|
240
|
-
color:
|
|
240
|
+
color: lt,
|
|
241
241
|
backgroundColor: "transparent",
|
|
242
242
|
...p.border("0"),
|
|
243
243
|
...p.padding(0),
|
|
@@ -251,7 +251,7 @@ const Tt = (r) => /* @__PURE__ */ S(
|
|
|
251
251
|
outlineWidth: "2px",
|
|
252
252
|
outlineStyle: "solid",
|
|
253
253
|
outlineOffset: "2px",
|
|
254
|
-
outlineColor:
|
|
254
|
+
outlineColor: at
|
|
255
255
|
},
|
|
256
256
|
"& svg": {
|
|
257
257
|
width: "1rem",
|
|
@@ -269,7 +269,7 @@ const Tt = (r) => /* @__PURE__ */ S(
|
|
|
269
269
|
height: "0.125rem",
|
|
270
270
|
transformOrigin: "center",
|
|
271
271
|
...p.borderRadius("9999px"),
|
|
272
|
-
backgroundColor:
|
|
272
|
+
backgroundColor: st,
|
|
273
273
|
animationName: {
|
|
274
274
|
from: {
|
|
275
275
|
transform: "scaleX(0)",
|
|
@@ -295,7 +295,7 @@ const Tt = (r) => /* @__PURE__ */ S(
|
|
|
295
295
|
transformOrigin: "center",
|
|
296
296
|
transform: "scale(0.95)",
|
|
297
297
|
cursor: "grabbing",
|
|
298
|
-
...p.border("1px", "solid",
|
|
298
|
+
...p.border("1px", "solid", kt),
|
|
299
299
|
backgroundColor: "rgb(255 255 255 / 55%)",
|
|
300
300
|
boxShadow: "0 10px 15px -3px #0000001a, 0 4px 6px -4px #0000001a",
|
|
301
301
|
backdropFilter: "blur(12px)",
|
|
@@ -326,7 +326,7 @@ const Tt = (r) => /* @__PURE__ */ S(
|
|
|
326
326
|
width: "1rem",
|
|
327
327
|
height: "1rem",
|
|
328
328
|
flexShrink: 0,
|
|
329
|
-
color:
|
|
329
|
+
color: it,
|
|
330
330
|
transitionProperty: "transform",
|
|
331
331
|
transitionDuration: "150ms",
|
|
332
332
|
transitionTimingFunction: "cubic-bezier(0.4, 0, 0.2, 1)"
|
|
@@ -346,21 +346,21 @@ const Tt = (r) => /* @__PURE__ */ S(
|
|
|
346
346
|
},
|
|
347
347
|
standaloneGroupLabel: {
|
|
348
348
|
...d,
|
|
349
|
-
marginTop:
|
|
349
|
+
marginTop: R,
|
|
350
350
|
display: "block",
|
|
351
351
|
listStyleType: "none",
|
|
352
|
-
...p.padding("0.375rem",
|
|
353
|
-
fontSize:
|
|
354
|
-
lineHeight:
|
|
355
|
-
fontWeight:
|
|
356
|
-
color:
|
|
352
|
+
...p.padding("0.375rem", St),
|
|
353
|
+
fontSize: H,
|
|
354
|
+
lineHeight: P,
|
|
355
|
+
fontWeight: ot,
|
|
356
|
+
color: O,
|
|
357
357
|
"&:first-child": {
|
|
358
358
|
marginTop: 0
|
|
359
359
|
}
|
|
360
360
|
},
|
|
361
361
|
groupContentList: {
|
|
362
362
|
...d,
|
|
363
|
-
paddingLeft:
|
|
363
|
+
paddingLeft: R
|
|
364
364
|
},
|
|
365
365
|
collapseWrapper: {
|
|
366
366
|
display: "grid",
|
|
@@ -386,292 +386,292 @@ const Tt = (r) => /* @__PURE__ */ S(
|
|
|
386
386
|
width: "1rem",
|
|
387
387
|
height: "1rem",
|
|
388
388
|
flexShrink: 0,
|
|
389
|
-
color:
|
|
389
|
+
color: rt
|
|
390
390
|
},
|
|
391
391
|
statusIconWarning: {
|
|
392
392
|
...d,
|
|
393
393
|
width: "1rem",
|
|
394
394
|
height: "1rem",
|
|
395
395
|
flexShrink: 0,
|
|
396
|
-
color:
|
|
396
|
+
color: et
|
|
397
397
|
},
|
|
398
398
|
statusIconSuccess: {
|
|
399
399
|
...d,
|
|
400
400
|
width: "1rem",
|
|
401
401
|
height: "1rem",
|
|
402
402
|
flexShrink: 0,
|
|
403
|
-
color:
|
|
403
|
+
color: tt
|
|
404
404
|
}
|
|
405
|
-
}),
|
|
406
|
-
const
|
|
407
|
-
return
|
|
408
|
-
},
|
|
405
|
+
}), Nt = ({ status: t }) => {
|
|
406
|
+
const r = f();
|
|
407
|
+
return t === "error" ? /* @__PURE__ */ e(F, { className: r.statusIconError }) : t === "warning" ? /* @__PURE__ */ e(F, { className: r.statusIconWarning }) : t === "success" ? /* @__PURE__ */ e(Wt, { className: r.statusIconSuccess }) : null;
|
|
408
|
+
}, X = i.createContext({
|
|
409
409
|
striped: !1,
|
|
410
410
|
showIndex: !1,
|
|
411
411
|
sortable: !1
|
|
412
|
-
}),
|
|
413
|
-
const l = f(), u =
|
|
414
|
-
(y,
|
|
415
|
-
index:
|
|
412
|
+
}), $ = () => i.useContext(X), Et = (t) => t === void 0 ? void 0 : t === "relaxed" ? "normal" : t, Bt = i.forwardRef(function({ className: r, density: s, children: n, ...o }, a) {
|
|
413
|
+
const l = f(), u = Et(s), w = i.Children.toArray(n).filter(i.isValidElement).map(
|
|
414
|
+
(y, v) => y.type === Ot ? i.cloneElement(y, {
|
|
415
|
+
index: v
|
|
416
416
|
}) : y
|
|
417
417
|
);
|
|
418
|
-
return /* @__PURE__ */
|
|
418
|
+
return /* @__PURE__ */ e(
|
|
419
419
|
"ol",
|
|
420
420
|
{
|
|
421
421
|
ref: a,
|
|
422
422
|
"data-slot": "list",
|
|
423
|
-
[
|
|
423
|
+
[m]: "list",
|
|
424
424
|
...u !== void 0 ? { "data-density": u } : {},
|
|
425
|
-
className:
|
|
425
|
+
className: g(l.list, r),
|
|
426
426
|
...o,
|
|
427
|
-
children:
|
|
427
|
+
children: w
|
|
428
428
|
}
|
|
429
429
|
);
|
|
430
|
-
}), Ft =
|
|
431
|
-
return /* @__PURE__ */
|
|
432
|
-
}),
|
|
430
|
+
}), Ft = i.forwardRef(function({ striped: r = !1, showIndex: s = !1, ...n }, o) {
|
|
431
|
+
return /* @__PURE__ */ e(X.Provider, { value: { striped: r, showIndex: s, sortable: !1 }, children: /* @__PURE__ */ e(Bt, { ref: o, ...n }) });
|
|
432
|
+
}), V = i.forwardRef(function({ className: r, children: s, ...n }, o) {
|
|
433
433
|
const a = f();
|
|
434
|
-
return /* @__PURE__ */
|
|
434
|
+
return /* @__PURE__ */ e(
|
|
435
435
|
"span",
|
|
436
436
|
{
|
|
437
437
|
ref: o,
|
|
438
438
|
"data-slot": "list-item-actions",
|
|
439
|
-
[
|
|
439
|
+
[m]: "list-item-actions",
|
|
440
440
|
onPointerDown: (l) => l.stopPropagation(),
|
|
441
|
-
className:
|
|
442
|
-
...
|
|
443
|
-
children:
|
|
441
|
+
className: g(a.actions, r),
|
|
442
|
+
...n,
|
|
443
|
+
children: s
|
|
444
444
|
}
|
|
445
445
|
);
|
|
446
|
-
}),
|
|
446
|
+
}), Xt = i.forwardRef(function({ className: r, ...s }, n) {
|
|
447
447
|
const o = f();
|
|
448
|
-
return /* @__PURE__ */
|
|
448
|
+
return /* @__PURE__ */ e(
|
|
449
449
|
"span",
|
|
450
450
|
{
|
|
451
|
-
ref:
|
|
451
|
+
ref: n,
|
|
452
452
|
"data-slot": "list-item-text",
|
|
453
|
-
[
|
|
454
|
-
className:
|
|
455
|
-
...
|
|
453
|
+
[m]: "list-item-text",
|
|
454
|
+
className: g(o.text, r),
|
|
455
|
+
...s
|
|
456
456
|
}
|
|
457
457
|
);
|
|
458
|
-
}), Gt =
|
|
458
|
+
}), Gt = i.forwardRef(function({ className: r, ...s }, n) {
|
|
459
459
|
const o = f();
|
|
460
|
-
return /* @__PURE__ */
|
|
460
|
+
return /* @__PURE__ */ e(
|
|
461
461
|
"span",
|
|
462
462
|
{
|
|
463
|
-
ref:
|
|
463
|
+
ref: n,
|
|
464
464
|
"data-slot": "list-item-description",
|
|
465
|
-
[
|
|
466
|
-
className:
|
|
467
|
-
...
|
|
465
|
+
[m]: "list-item-description",
|
|
466
|
+
className: g(o.description, r),
|
|
467
|
+
...s
|
|
468
468
|
}
|
|
469
469
|
);
|
|
470
|
-
}),
|
|
470
|
+
}), A = (t) => typeof t == "string" || typeof t == "number" ? String(t) : typeof t == "object" && t !== null && !i.isValidElement(t) && Symbol.iterator in t ? Array.from(t, A).join(" ") : !i.isValidElement(t) || t.type === Gt || t.type === V || t.props["aria-hidden"] === !0 || t.props["aria-hidden"] === "true" ? "" : A(t.props.children), Rt = i.forwardRef(
|
|
471
471
|
function({
|
|
472
|
-
className:
|
|
473
|
-
value:
|
|
474
|
-
textValue:
|
|
472
|
+
className: r,
|
|
473
|
+
value: s,
|
|
474
|
+
textValue: n,
|
|
475
475
|
status: o = "default",
|
|
476
476
|
index: a,
|
|
477
477
|
children: l,
|
|
478
478
|
setNodeRef: u,
|
|
479
|
-
setActivatorNodeRef:
|
|
479
|
+
setActivatorNodeRef: w,
|
|
480
480
|
style: y,
|
|
481
|
-
isDragging:
|
|
481
|
+
isDragging: v,
|
|
482
482
|
dropEdge: b,
|
|
483
483
|
listeners: h,
|
|
484
484
|
attributes: C,
|
|
485
|
-
...
|
|
485
|
+
...L
|
|
486
486
|
}, I) {
|
|
487
|
-
const c = f(), { striped:
|
|
488
|
-
(x) =>
|
|
489
|
-
),
|
|
487
|
+
const c = f(), { striped: K, showIndex: Z, sortable: S } = $(), U = S && !v, E = i.Children.toArray(l), B = E.find(
|
|
488
|
+
(x) => i.isValidElement(x) && x.type === V
|
|
489
|
+
), G = E.filter((x) => x !== B), Y = S ? (n == null ? void 0 : n.trim()) || A(G).replace(/\s+/g, " ").trim() || s || "item" : void 0, _ = i.useCallback(
|
|
490
490
|
(x) => {
|
|
491
491
|
u == null || u(x), typeof I == "function" ? I(x) : I && (I.current = x);
|
|
492
492
|
},
|
|
493
493
|
[u, I]
|
|
494
|
-
),
|
|
495
|
-
return /* @__PURE__ */
|
|
494
|
+
), q = o === "error" ? c.statusError : o === "warning" ? c.statusWarning : o === "success" ? c.statusSuccess : c.statusDefault, J = U ? o === "error" ? c.interactiveError : o === "warning" ? c.interactiveWarning : o === "success" ? c.interactiveSuccess : c.interactiveDefault : void 0;
|
|
495
|
+
return /* @__PURE__ */ k(
|
|
496
496
|
"li",
|
|
497
497
|
{
|
|
498
|
-
ref:
|
|
498
|
+
ref: _,
|
|
499
499
|
style: y,
|
|
500
500
|
"data-slot": "list-item",
|
|
501
|
-
[
|
|
501
|
+
[m]: "list-item",
|
|
502
502
|
"data-status": o,
|
|
503
|
-
"data-value":
|
|
504
|
-
onPointerDown:
|
|
505
|
-
className:
|
|
503
|
+
"data-value": s,
|
|
504
|
+
onPointerDown: S ? h == null ? void 0 : h.onPointerDown : void 0,
|
|
505
|
+
className: g(
|
|
506
506
|
c.item,
|
|
507
|
-
_,
|
|
508
|
-
$ && o === "default" && c.stripedEven,
|
|
509
507
|
q,
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
508
|
+
K && o === "default" && c.stripedEven,
|
|
509
|
+
J,
|
|
510
|
+
S && c.sortableItem,
|
|
511
|
+
v && c.itemDragging,
|
|
512
|
+
r
|
|
513
513
|
),
|
|
514
|
-
...
|
|
514
|
+
...L,
|
|
515
515
|
children: [
|
|
516
|
-
b && /* @__PURE__ */
|
|
516
|
+
b && /* @__PURE__ */ e(
|
|
517
517
|
"span",
|
|
518
518
|
{
|
|
519
519
|
"data-slot": "list-drop-indicator",
|
|
520
|
-
[
|
|
520
|
+
[m]: "list-drop-indicator",
|
|
521
521
|
"aria-hidden": "true",
|
|
522
|
-
className:
|
|
522
|
+
className: g(
|
|
523
523
|
c.dropIndicator,
|
|
524
524
|
b === "top" ? c.dropIndicatorTop : c.dropIndicatorBottom
|
|
525
525
|
)
|
|
526
526
|
}
|
|
527
527
|
),
|
|
528
|
-
|
|
528
|
+
Z && /* @__PURE__ */ e(
|
|
529
529
|
"span",
|
|
530
530
|
{
|
|
531
531
|
"data-slot": "list-item-index",
|
|
532
|
-
[
|
|
532
|
+
[m]: "list-item-index",
|
|
533
533
|
"aria-hidden": "true",
|
|
534
534
|
className: c.indexBase,
|
|
535
535
|
children: (a ?? 0) + 1
|
|
536
536
|
}
|
|
537
537
|
),
|
|
538
|
-
/* @__PURE__ */
|
|
538
|
+
/* @__PURE__ */ e(
|
|
539
539
|
"span",
|
|
540
540
|
{
|
|
541
541
|
"data-slot": "list-item-content",
|
|
542
|
-
[
|
|
542
|
+
[m]: "list-item-content",
|
|
543
543
|
className: c.content,
|
|
544
|
-
children:
|
|
544
|
+
children: G
|
|
545
545
|
}
|
|
546
546
|
),
|
|
547
|
-
/* @__PURE__ */
|
|
547
|
+
/* @__PURE__ */ e(Nt, { status: o }),
|
|
548
548
|
B,
|
|
549
|
-
|
|
549
|
+
S && /* @__PURE__ */ e(
|
|
550
550
|
"button",
|
|
551
551
|
{
|
|
552
|
-
ref:
|
|
552
|
+
ref: w,
|
|
553
553
|
type: "button",
|
|
554
|
-
"aria-label": `Drag to reorder ${
|
|
554
|
+
"aria-label": `Drag to reorder ${Y}`,
|
|
555
555
|
className: c.dragHandle,
|
|
556
556
|
...C,
|
|
557
557
|
onKeyDown: h == null ? void 0 : h.onKeyDown,
|
|
558
|
-
children: /* @__PURE__ */
|
|
558
|
+
children: /* @__PURE__ */ e(Dt, {})
|
|
559
559
|
}
|
|
560
560
|
)
|
|
561
561
|
]
|
|
562
562
|
}
|
|
563
563
|
);
|
|
564
564
|
}
|
|
565
|
-
), Ot =
|
|
566
|
-
function(
|
|
567
|
-
const { SortableItem:
|
|
568
|
-
return
|
|
565
|
+
), Ot = i.forwardRef(
|
|
566
|
+
function(r, s) {
|
|
567
|
+
const { SortableItem: n } = $();
|
|
568
|
+
return n ? /* @__PURE__ */ e(n, { ref: s, ...r }) : /* @__PURE__ */ e(Rt, { ref: s, ...r });
|
|
569
569
|
}
|
|
570
|
-
),
|
|
570
|
+
), N = i.createContext(null), $t = i.forwardRef(
|
|
571
571
|
function({
|
|
572
|
-
open:
|
|
573
|
-
defaultOpen:
|
|
574
|
-
onOpenChange:
|
|
572
|
+
open: r,
|
|
573
|
+
defaultOpen: s = !1,
|
|
574
|
+
onOpenChange: n,
|
|
575
575
|
className: o,
|
|
576
576
|
children: a,
|
|
577
577
|
...l
|
|
578
578
|
}, u) {
|
|
579
|
-
const
|
|
580
|
-
|
|
579
|
+
const w = f(), [y, v] = i.useState(s), b = r ?? y, h = i.useId(), C = (L) => {
|
|
580
|
+
r === void 0 && v(L), n == null || n(L);
|
|
581
581
|
};
|
|
582
|
-
return /* @__PURE__ */
|
|
582
|
+
return /* @__PURE__ */ e(N.Provider, { value: { open: b, setOpen: C, contentId: h }, children: /* @__PURE__ */ e(
|
|
583
583
|
"li",
|
|
584
584
|
{
|
|
585
585
|
ref: u,
|
|
586
586
|
"data-slot": "list-group",
|
|
587
|
-
[
|
|
587
|
+
[m]: "list-group",
|
|
588
588
|
"data-state": b ? "open" : "closed",
|
|
589
|
-
className:
|
|
589
|
+
className: g(w.group, o),
|
|
590
590
|
...l,
|
|
591
591
|
children: a
|
|
592
592
|
}
|
|
593
593
|
) });
|
|
594
594
|
}
|
|
595
|
-
),
|
|
596
|
-
const a = f(), l =
|
|
597
|
-
return l ? /* @__PURE__ */
|
|
595
|
+
), Vt = i.forwardRef(function({ className: r, children: s, ...n }, o) {
|
|
596
|
+
const a = f(), l = i.useContext(N);
|
|
597
|
+
return l ? /* @__PURE__ */ k(
|
|
598
598
|
"button",
|
|
599
599
|
{
|
|
600
600
|
ref: o,
|
|
601
601
|
type: "button",
|
|
602
602
|
"data-slot": "list-group-trigger",
|
|
603
|
-
[
|
|
603
|
+
[m]: "list-group-trigger",
|
|
604
604
|
"aria-expanded": l.open,
|
|
605
605
|
"aria-controls": l.contentId,
|
|
606
606
|
onClick: () => l.setOpen(!l.open),
|
|
607
|
-
className:
|
|
607
|
+
className: g(
|
|
608
608
|
a.item,
|
|
609
609
|
a.interactiveDefault,
|
|
610
610
|
a.groupTrigger,
|
|
611
|
-
|
|
611
|
+
r
|
|
612
612
|
),
|
|
613
|
-
...
|
|
613
|
+
...n,
|
|
614
614
|
children: [
|
|
615
|
-
/* @__PURE__ */
|
|
616
|
-
|
|
615
|
+
/* @__PURE__ */ e(
|
|
616
|
+
At,
|
|
617
617
|
{
|
|
618
|
-
className:
|
|
618
|
+
className: g(
|
|
619
619
|
a.groupChevron,
|
|
620
620
|
l.open && a.groupChevronOpen
|
|
621
621
|
)
|
|
622
622
|
}
|
|
623
623
|
),
|
|
624
|
-
/* @__PURE__ */
|
|
624
|
+
/* @__PURE__ */ e("span", { className: a.groupTriggerText, children: s })
|
|
625
625
|
]
|
|
626
626
|
}
|
|
627
|
-
) : /* @__PURE__ */
|
|
627
|
+
) : /* @__PURE__ */ e(
|
|
628
628
|
"li",
|
|
629
629
|
{
|
|
630
630
|
ref: o,
|
|
631
631
|
"data-slot": "list-group-label",
|
|
632
|
-
[
|
|
633
|
-
className:
|
|
634
|
-
children:
|
|
632
|
+
[m]: "list-group-label",
|
|
633
|
+
className: g(a.standaloneGroupLabel, r),
|
|
634
|
+
children: s
|
|
635
635
|
}
|
|
636
636
|
);
|
|
637
|
-
}), Kt =
|
|
638
|
-
const a = f(), l =
|
|
637
|
+
}), Kt = i.forwardRef(function({ className: r, children: s, ...n }, o) {
|
|
638
|
+
const a = f(), l = i.useContext(N), u = /* @__PURE__ */ e(
|
|
639
639
|
"ul",
|
|
640
640
|
{
|
|
641
641
|
ref: o,
|
|
642
642
|
"data-slot": "list-group-content",
|
|
643
|
-
[
|
|
644
|
-
className:
|
|
645
|
-
...
|
|
646
|
-
children:
|
|
643
|
+
[m]: "list-group-content",
|
|
644
|
+
className: g(a.list, a.groupContentList, r),
|
|
645
|
+
...n,
|
|
646
|
+
children: s
|
|
647
647
|
}
|
|
648
648
|
);
|
|
649
|
-
return l ? /* @__PURE__ */
|
|
649
|
+
return l ? /* @__PURE__ */ e(
|
|
650
650
|
"div",
|
|
651
651
|
{
|
|
652
652
|
id: l.contentId,
|
|
653
653
|
"data-state": l.open ? "open" : "closed",
|
|
654
|
-
className:
|
|
654
|
+
className: g(
|
|
655
655
|
a.collapseWrapper,
|
|
656
656
|
l.open && a.collapseWrapperOpen
|
|
657
657
|
),
|
|
658
|
-
children: /* @__PURE__ */
|
|
658
|
+
children: /* @__PURE__ */ e("div", { className: a.collapseInner, children: u })
|
|
659
659
|
}
|
|
660
660
|
) : u;
|
|
661
661
|
});
|
|
662
662
|
export {
|
|
663
663
|
Ft as List,
|
|
664
|
-
|
|
664
|
+
$t as ListGroup,
|
|
665
665
|
Kt as ListGroupContent,
|
|
666
|
-
|
|
666
|
+
Vt as ListGroupLabel,
|
|
667
667
|
Ot as ListItem,
|
|
668
|
-
|
|
668
|
+
V as ListItemActions,
|
|
669
669
|
Rt as ListItemBody,
|
|
670
670
|
Gt as ListItemDescription,
|
|
671
|
-
|
|
671
|
+
Xt as ListItemText,
|
|
672
672
|
Bt as ListRoot,
|
|
673
|
-
|
|
674
|
-
|
|
673
|
+
Et as canonicalDomDensity,
|
|
674
|
+
X as listContext,
|
|
675
675
|
f as useListStyles
|
|
676
676
|
};
|
|
677
677
|
//# sourceMappingURL=list.js.map
|