@juwel-development/design-system 4.2.1 → 4.4.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.
- package/dist/design-system.js +560 -464
- package/dist/styles.css +1 -1
- package/dist/styles.dark.css +1 -1
- package/dist/styles.light.css +1 -1
- package/dist/types/Arrangement/ColumnLayout/ColumnLayout.d.ts +17 -2
- package/dist/types/Display/Table/Table.d.ts +1 -0
- package/dist/types/Interaction/Slider/Slider.d.ts +17 -7
- package/dist/types/Layout/Pane/Pane.d.ts +31 -5
- package/dist/types/Layout/Screen/Screen.d.ts +28 -8
- package/package.json +1 -1
- package/src/Arrangement/ColumnLayout/ColumnLayout.tsx +55 -5
- package/src/Display/Table/Table.tsx +5 -1
- package/src/Interaction/Slider/Slider.tsx +51 -16
- package/src/Interaction/Stepper/Stepper.tsx +2 -1
- package/src/Interaction/Tabs/Tabs.tsx +6 -1
- package/src/Layout/Pane/Pane.tsx +65 -14
- package/src/Layout/Screen/Screen.tsx +123 -13
- package/src/Layout/ScrollContainer/ScrollContainer.tsx +1 -0
- package/src/Theme/renderTokens.ts +13 -0
- package/src/tokens.css +7 -0
- package/src/tokens.dark.css +7 -0
- package/src/tokens.light.css +7 -0
package/dist/design-system.js
CHANGED
|
@@ -93,100 +93,112 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
93
93
|
gap: "region",
|
|
94
94
|
fill: !1
|
|
95
95
|
}
|
|
96
|
-
}), ee = b("h-full min-h-0 min-w-0 [container-type:inline-size]"), te = b("min-w-0 grow-[calc(var(--column-layout-weight)/var(--column-layout-growth-unit))] basis-[clamp(0px,(var(--column-layout-threshold)-100%)*1000000,100%)] max-w-[var(--column-layout-maximum)]"
|
|
96
|
+
}), ee = b("h-full min-h-0 min-w-0 [container-type:inline-size]"), te = b("min-w-0 grow-[calc(var(--column-layout-weight)/var(--column-layout-growth-unit))] basis-[clamp(0px,(var(--column-layout-threshold)-100%)*1000000,100%)] max-w-[var(--column-layout-maximum)]", {
|
|
97
|
+
variants: { hasHead: {
|
|
98
|
+
true: "grid grid-cols-[minmax(0,1fr)] grid-rows-[auto_minmax(0,1fr)] gap-[var(--column-layout-gap)]",
|
|
99
|
+
false: ""
|
|
100
|
+
} },
|
|
101
|
+
defaultVariants: { hasHead: !1 }
|
|
102
|
+
}), ne = b("min-w-0"), E = b("relative min-w-0", {
|
|
97
103
|
variants: { fill: {
|
|
98
104
|
false: "",
|
|
99
105
|
true: "h-full min-h-0"
|
|
100
106
|
} },
|
|
101
107
|
defaultVariants: { fill: !1 }
|
|
102
|
-
}),
|
|
108
|
+
}), re = b("pointer-events-none invisible absolute inset-x-0 top-0 h-0 overflow-hidden"), ie = b("h-0 w-[clamp(0px,(var(--column-layout-threshold)-100%+var(--column-layout-reserve))*1000000,1px)]", {
|
|
103
109
|
variants: { gap: {
|
|
104
110
|
stack: "[--column-layout-gap:var(--space-stack)]",
|
|
105
111
|
region: "[--column-layout-gap:var(--space-region)]"
|
|
106
112
|
} },
|
|
107
113
|
defaultVariants: { gap: "region" }
|
|
108
|
-
}), D = a(!1),
|
|
114
|
+
}), D = a(!1), ae = /^--[A-Za-z0-9_-]+$/, oe = (e, t) => {
|
|
109
115
|
let { weight: n, minWidth: r, maxWidth: i } = e.props;
|
|
110
116
|
if (!Number.isFinite(n) || n <= 0) throw new w(`column ${t + 1} needs a positive finite weight (got ${n})`);
|
|
111
|
-
if (!
|
|
112
|
-
if (i !== void 0 && !
|
|
117
|
+
if (!ae.test(r)) throw new w(`column ${t + 1} needs a custom-property name such as --main-column-min-width for minWidth (got ${JSON.stringify(r)})`);
|
|
118
|
+
if (i !== void 0 && !ae.test(i)) throw new w(`column ${t + 1} needs a custom-property name such as --support-column-max-width for maxWidth (got ${JSON.stringify(i)})`);
|
|
113
119
|
return {
|
|
114
120
|
weight: n,
|
|
115
121
|
minWidth: r,
|
|
116
122
|
maxWidth: i
|
|
117
123
|
};
|
|
118
|
-
},
|
|
124
|
+
}, O = (e) => {
|
|
119
125
|
let t = e.reduce((e, t) => e + t.weight, 0), n = e.map((e) => `var(${e.minWidth}) * ${t / e.weight}`);
|
|
120
126
|
return `calc(${e.length - 1} * var(--column-layout-gap) + max(${n.join(", ")}))`;
|
|
121
|
-
},
|
|
127
|
+
}, se = (e) => e.some((e) => e.maxWidth !== void 0) ? Math.min(1, ...e.map((e) => e.weight)) : 1, k = (e) => o(e) && e.type === i, A = (e) => o(e) && e.type === P, j = (e) => r.toArray(e).flatMap((e) => k(e) ? j(e.props.children) : A(e) ? [e] : []), M = (e) => r.map(e, (e) => k(e) ? /* @__PURE__ */ t(i, { children: M(e.props.children) }) : A(e) ? /* @__PURE__ */ t(D.Provider, {
|
|
122
128
|
value: !0,
|
|
123
129
|
children: e
|
|
124
130
|
}) : e), N = ({ gap: e, fill: n, children: r, testId: i }) => {
|
|
125
|
-
let a = j(r).map(
|
|
126
|
-
"--column-layout-threshold":
|
|
127
|
-
"--column-layout-growth-unit":
|
|
131
|
+
let a = j(r).map(oe), o = a.length === 0 ? void 0 : {
|
|
132
|
+
"--column-layout-threshold": O(a),
|
|
133
|
+
"--column-layout-growth-unit": se(a)
|
|
128
134
|
}, s = /* @__PURE__ */ t("div", {
|
|
129
135
|
className: T({
|
|
130
136
|
gap: e,
|
|
131
137
|
fill: n
|
|
132
138
|
}),
|
|
133
139
|
style: o,
|
|
140
|
+
"data-height-passing": n || void 0,
|
|
134
141
|
"data-testid": i,
|
|
135
142
|
children: M(r)
|
|
136
143
|
});
|
|
137
144
|
return n ? /* @__PURE__ */ t("div", {
|
|
138
145
|
className: ee(),
|
|
146
|
+
"data-height-passing": !0,
|
|
139
147
|
children: s
|
|
140
148
|
}) : s;
|
|
141
|
-
}, P = ({ weight: e, maxWidth:
|
|
149
|
+
}, P = ({ weight: e, maxWidth: r, head: i, children: a, testId: o }) => {
|
|
142
150
|
if (!c(D)) throw new C();
|
|
143
|
-
let
|
|
151
|
+
let s = {
|
|
144
152
|
"--column-layout-weight": e,
|
|
145
|
-
"--column-layout-maximum":
|
|
146
|
-
};
|
|
153
|
+
"--column-layout-maximum": r === void 0 ? "none" : `max(var(${r}), clamp(0px, (var(--column-layout-threshold) - 100%) * 1000000, 100%))`
|
|
154
|
+
}, l = i != null && i !== !1;
|
|
147
155
|
return /* @__PURE__ */ t("div", {
|
|
148
|
-
className: te(),
|
|
149
|
-
style:
|
|
150
|
-
"data-
|
|
151
|
-
|
|
156
|
+
className: te({ hasHead: l }),
|
|
157
|
+
style: s,
|
|
158
|
+
"data-height-passing": !0,
|
|
159
|
+
"data-testid": o,
|
|
160
|
+
children: /* @__PURE__ */ n(D.Provider, {
|
|
152
161
|
value: !1,
|
|
153
|
-
children:
|
|
162
|
+
children: [l && /* @__PURE__ */ t("div", {
|
|
163
|
+
className: ne(),
|
|
164
|
+
children: i
|
|
165
|
+
}), a]
|
|
154
166
|
})
|
|
155
167
|
});
|
|
156
|
-
},
|
|
168
|
+
}, ce = -1, F = 3, I = (e, t, n) => {
|
|
157
169
|
let [r, i, a, o] = e;
|
|
158
170
|
return r?.to === t && a?.to === t && r.width === n && a.width === n && i?.to === o?.to && i?.width === o?.width && o !== void 0 && o.width !== n ? Math.abs(n - o.width) : void 0;
|
|
159
|
-
},
|
|
160
|
-
if (k(e)) return
|
|
161
|
-
if (!
|
|
171
|
+
}, L = (e) => o(e) && e.type === N, R = (e) => r.toArray(e).flatMap((e) => {
|
|
172
|
+
if (k(e)) return R(e.props.children);
|
|
173
|
+
if (!L(e)) throw new w("Alternatives takes ColumnLayout.Root elements only (arrays and fragments are fine; other content or a wrapping component is not)");
|
|
162
174
|
return [e];
|
|
163
|
-
}),
|
|
164
|
-
let n = j(e.props.children).map(
|
|
175
|
+
}), z = (e, t) => {
|
|
176
|
+
let n = j(e.props.children).map(oe);
|
|
165
177
|
if (n.length === 0) throw new w(`alternative ${t + 1} declares no columns, so it has no minimum to fit`);
|
|
166
178
|
return {
|
|
167
179
|
arrangement: e,
|
|
168
|
-
threshold:
|
|
180
|
+
threshold: O(n)
|
|
169
181
|
};
|
|
170
|
-
},
|
|
182
|
+
}, le = (e, t) => ({
|
|
171
183
|
"--column-layout-threshold": e,
|
|
172
184
|
"--column-layout-reserve": t
|
|
173
|
-
}),
|
|
185
|
+
}), ue = (e) => Array.from(e.children).findIndex((e) => e.getBoundingClientRect().width === 0), B = (e) => e === ce ? Infinity : e, V = {
|
|
174
186
|
Root: N,
|
|
175
187
|
Column: P,
|
|
176
188
|
Alternatives: ({ fill: e, fallback: r, children: a, testId: o }) => {
|
|
177
|
-
let s =
|
|
189
|
+
let s = R(a).map(z), c = s.map(({ arrangement: e, threshold: t }) => `${e.props.gap} ${t}`).join("\n"), l = p(null), u = p(null), [f, g] = m(void 0), [_, v] = m(0);
|
|
178
190
|
d(() => {
|
|
179
191
|
let e = l.current;
|
|
180
192
|
if (e === null) return;
|
|
181
193
|
let t, n = [], r = (e) => {
|
|
182
|
-
let t = [...n.slice(-3), e], r =
|
|
194
|
+
let t = [...n.slice(-3), e], r = F, i = () => {
|
|
183
195
|
n === t && (--r, r === 0 ? n = [] : requestAnimationFrame(i));
|
|
184
196
|
};
|
|
185
197
|
n = t, requestAnimationFrame(i);
|
|
186
198
|
}, i = () => {
|
|
187
|
-
let i =
|
|
199
|
+
let i = ue(e);
|
|
188
200
|
if (i === t) return;
|
|
189
|
-
let { width: a } = e.getBoundingClientRect(), o =
|
|
201
|
+
let { width: a } = e.getBoundingClientRect(), o = I(n, i, a);
|
|
190
202
|
o !== void 0 && (v((e) => Math.max(e, o)), n = [], t !== void 0 && B(i) < B(t)) || (r({
|
|
191
203
|
to: i,
|
|
192
204
|
width: a
|
|
@@ -213,32 +225,33 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
213
225
|
});
|
|
214
226
|
let C = (e) => b !== void 0 && e < B(b.firstFit) ? `${_}px` : "0px";
|
|
215
227
|
return /* @__PURE__ */ n("div", {
|
|
216
|
-
className:
|
|
228
|
+
className: E({ fill: e }),
|
|
229
|
+
"data-height-passing": e || void 0,
|
|
217
230
|
"data-testid": o,
|
|
218
231
|
children: [/* @__PURE__ */ t("div", {
|
|
219
232
|
ref: l,
|
|
220
233
|
"aria-hidden": "true",
|
|
221
|
-
className:
|
|
234
|
+
className: re(),
|
|
222
235
|
children: s.map(({ arrangement: e, threshold: n }, r) => /* @__PURE__ */ t("div", {
|
|
223
|
-
className:
|
|
224
|
-
style:
|
|
236
|
+
className: ie({ gap: e.props.gap }),
|
|
237
|
+
style: le(n, C(r))
|
|
225
238
|
}, r))
|
|
226
239
|
}), S]
|
|
227
240
|
});
|
|
228
241
|
}
|
|
229
|
-
}, de = .5,
|
|
242
|
+
}, de = .5, H = (e, t) => Math.abs(e - t) <= de, fe = (e) => {
|
|
230
243
|
let t = [];
|
|
231
|
-
for (let { top: n } of e) t.some((e) =>
|
|
232
|
-
let n = t.map((t) => Math.max(...e.filter((e) =>
|
|
244
|
+
for (let { top: n } of e) t.some((e) => H(e, n)) || t.push(n);
|
|
245
|
+
let n = t.map((t) => Math.max(...e.filter((e) => H(t, e.top)).map((e) => e.controlEdge)));
|
|
233
246
|
return e.map(({ top: e, controlEdge: r }) => {
|
|
234
|
-
let i = t.findIndex((t) =>
|
|
247
|
+
let i = t.findIndex((t) => H(t, e));
|
|
235
248
|
return (n[i] ?? r) - r;
|
|
236
249
|
});
|
|
237
250
|
}, pe = class extends Error {
|
|
238
251
|
constructor(e) {
|
|
239
252
|
super(`FieldRow.${e} must be composed inside FieldRow.Root`), this.name = "FieldRowCompositionError";
|
|
240
253
|
}
|
|
241
|
-
},
|
|
254
|
+
}, U = class extends Error {
|
|
242
255
|
constructor(e) {
|
|
243
256
|
super(`FieldRow configuration: ${e}`), this.name = "FieldRowConfigurationError";
|
|
244
257
|
}
|
|
@@ -259,9 +272,9 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
259
272
|
if (t === void 0) throw new pe(e);
|
|
260
273
|
return t;
|
|
261
274
|
}, xe = (e) => {
|
|
262
|
-
if (!(Number.isFinite(e) && e > 0)) throw new
|
|
275
|
+
if (!(Number.isFinite(e) && e > 0)) throw new U(`weight must be a positive finite number, got ${e}`);
|
|
263
276
|
}, Se = (e) => {
|
|
264
|
-
if (!_e.test(e)) throw new
|
|
277
|
+
if (!_e.test(e)) throw new U(`minWidth must name a CSS custom property such as --search-field-min-width, got ${JSON.stringify(e)}`);
|
|
265
278
|
}, Ce = (e) => {
|
|
266
279
|
let t = e.querySelector("label[for]")?.getAttribute("for");
|
|
267
280
|
if (!t) return;
|
|
@@ -598,7 +611,7 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
598
611
|
strokeLinecap: "round",
|
|
599
612
|
strokeLinejoin: "round"
|
|
600
613
|
}, n))
|
|
601
|
-
}),
|
|
614
|
+
}), W = (e) => ({ label: n, color: r, testId: i }) => /* @__PURE__ */ t(at, {
|
|
602
615
|
name: e,
|
|
603
616
|
label: n,
|
|
604
617
|
color: r,
|
|
@@ -609,25 +622,25 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
609
622
|
color: r,
|
|
610
623
|
testId: i
|
|
611
624
|
}), {
|
|
612
|
-
Plus:
|
|
613
|
-
Up:
|
|
614
|
-
Down:
|
|
615
|
-
Right:
|
|
616
|
-
Remove:
|
|
617
|
-
}),
|
|
625
|
+
Plus: W("plus"),
|
|
626
|
+
Up: W("sort-ascending"),
|
|
627
|
+
Down: W("sort-descending"),
|
|
628
|
+
Right: W("right"),
|
|
629
|
+
Remove: W("remove")
|
|
630
|
+
}), st = class extends Error {
|
|
618
631
|
constructor(e) {
|
|
619
632
|
super(`Meter configuration is invalid: ${e}`), this.name = "MeterConfigurationError";
|
|
620
633
|
}
|
|
621
|
-
},
|
|
634
|
+
}, ct = b("w-full h-[var(--meter-track-thickness)] bg-meter-track border border-solid border-rule"), lt = b("h-full w-[calc(var(--meter-level)*100%)]", {
|
|
622
635
|
variants: { treatment: {
|
|
623
636
|
neutral: "bg-meter-fill",
|
|
624
637
|
depleting: "bg-[color-mix(in_oklab,var(--color-meter-fill)_calc(var(--meter-level)*100%),var(--color-error))]"
|
|
625
638
|
} },
|
|
626
639
|
defaultVariants: { treatment: "neutral" }
|
|
627
|
-
}),
|
|
628
|
-
if (!Number.isFinite(e) || !Number.isFinite(n) || !Number.isFinite(r)) throw new
|
|
629
|
-
if (n >= r) throw new
|
|
630
|
-
let c = { "--meter-level":
|
|
640
|
+
}), ut = (e, t, n) => e <= t ? 0 : e >= n ? 1 : (e - t) / (n - t), dt = ({ value: e, min: n = 0, max: r, treatment: i, label: a, valueText: o, testId: s }) => {
|
|
641
|
+
if (!Number.isFinite(e) || !Number.isFinite(n) || !Number.isFinite(r)) throw new st(`value, min and max must be finite numbers (got value=${e}, min=${n}, max=${r})`);
|
|
642
|
+
if (n >= r) throw new st(`min must be less than max (got min=${n}, max=${r})`);
|
|
643
|
+
let c = { "--meter-level": ut(e, n, r) };
|
|
631
644
|
return /* @__PURE__ */ t("div", {
|
|
632
645
|
role: "meter",
|
|
633
646
|
"aria-valuenow": e,
|
|
@@ -636,28 +649,28 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
636
649
|
"aria-label": a,
|
|
637
650
|
"aria-valuetext": o,
|
|
638
651
|
"data-testid": s,
|
|
639
|
-
className:
|
|
652
|
+
className: ct(),
|
|
640
653
|
style: c,
|
|
641
654
|
children: /* @__PURE__ */ t("div", {
|
|
642
655
|
"aria-hidden": "true",
|
|
643
|
-
className:
|
|
656
|
+
className: lt({ treatment: i })
|
|
644
657
|
})
|
|
645
658
|
});
|
|
646
|
-
},
|
|
659
|
+
}, ft = b(["grid gap-[var(--space-stack)]", "lg:grid-cols-[10rem_minmax(0,1fr)] lg:items-start lg:gap-x-12"].join(" ")), pt = b("lg:sticky lg:top-6"), mt = b("block border-b border-solid border-border pb-1 font-secondary text-label tracking-label text-muted"), ht = b("block pt-1 font-secondary text-label tracking-label text-foreground"), gt = {
|
|
647
660
|
Root: ({ children: e, testId: n }) => /* @__PURE__ */ t("div", {
|
|
648
|
-
className:
|
|
661
|
+
className: ft(),
|
|
649
662
|
"data-testid": n,
|
|
650
663
|
children: e
|
|
651
664
|
}),
|
|
652
665
|
Index: ({ number: e, children: r, testId: i }) => /* @__PURE__ */ n("div", {
|
|
653
|
-
className:
|
|
666
|
+
className: pt(),
|
|
654
667
|
"data-testid": i,
|
|
655
668
|
"aria-hidden": "true",
|
|
656
669
|
children: [e !== void 0 && /* @__PURE__ */ t("span", {
|
|
657
|
-
className:
|
|
670
|
+
className: mt(),
|
|
658
671
|
children: e
|
|
659
672
|
}), /* @__PURE__ */ t("span", {
|
|
660
|
-
className:
|
|
673
|
+
className: ht(),
|
|
661
674
|
children: r
|
|
662
675
|
})]
|
|
663
676
|
}),
|
|
@@ -665,15 +678,15 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
665
678
|
"data-testid": n,
|
|
666
679
|
children: e
|
|
667
680
|
})
|
|
668
|
-
},
|
|
681
|
+
}, _t = b("w-full shrink-0 border-t border-solid border-border forced-colors:border-[CanvasText]"), vt = ({ testId: e }) => /* @__PURE__ */ t("div", {
|
|
669
682
|
"aria-hidden": "true",
|
|
670
|
-
className:
|
|
683
|
+
className: _t(),
|
|
671
684
|
"data-testid": e
|
|
672
|
-
}),
|
|
685
|
+
}), yt = class extends Error {
|
|
673
686
|
constructor(e) {
|
|
674
687
|
super(`Table configuration is invalid: ${e}`), this.name = "TableConfigurationError";
|
|
675
688
|
}
|
|
676
|
-
},
|
|
689
|
+
}, bt = "comfortable", xt = "marker", St = b([
|
|
677
690
|
"overflow-x-auto",
|
|
678
691
|
"[&[data-icon-actions]]:p-[calc(var(--focus-ring-width)+var(--focus-ring-offset))]",
|
|
679
692
|
"[&[data-icon-actions]]:m-[calc(-1*(var(--focus-ring-width)+var(--focus-ring-offset)))]",
|
|
@@ -709,7 +722,7 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
709
722
|
},
|
|
710
723
|
captionVisibility: {
|
|
711
724
|
visible: "[&>table>caption]:pb-3",
|
|
712
|
-
hidden: "[&>table>caption]:sr-only"
|
|
725
|
+
hidden: "relative [&>table>caption]:sr-only"
|
|
713
726
|
},
|
|
714
727
|
density: {
|
|
715
728
|
comfortable: "[--table-cell-padding-inline:var(--table-cell-inset-inline)] [--table-cell-padding-block:var(--table-cell-inset-block)]",
|
|
@@ -717,11 +730,11 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
717
730
|
}
|
|
718
731
|
},
|
|
719
732
|
defaultVariants: {
|
|
720
|
-
density:
|
|
733
|
+
density: bt,
|
|
721
734
|
captionVisibility: "visible",
|
|
722
|
-
selectionTreatment:
|
|
735
|
+
selectionTreatment: xt
|
|
723
736
|
}
|
|
724
|
-
}),
|
|
737
|
+
}), Ct = b([
|
|
725
738
|
"border-t border-solid border-border",
|
|
726
739
|
"[&[aria-selected=true]>*:first-child]:relative",
|
|
727
740
|
"[&[aria-selected=true]>*:first-child]:before:absolute [&[aria-selected=true]>*:first-child]:before:inset-y-0 [&[aria-selected=true]>*:first-child]:before:left-0",
|
|
@@ -732,7 +745,7 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
732
745
|
false: ""
|
|
733
746
|
} },
|
|
734
747
|
defaultVariants: { interactive: !1 }
|
|
735
|
-
}),
|
|
748
|
+
}), wt = [
|
|
736
749
|
"a[href]",
|
|
737
750
|
"button",
|
|
738
751
|
"input",
|
|
@@ -758,11 +771,11 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
758
771
|
"[role=\"searchbox\"]",
|
|
759
772
|
"[role=\"slider\"]",
|
|
760
773
|
"[role=\"spinbutton\"]"
|
|
761
|
-
].join(", "),
|
|
774
|
+
].join(", "), Tt = (e, t) => {
|
|
762
775
|
if (!(t instanceof Element)) return !1;
|
|
763
|
-
let n = t.closest(
|
|
776
|
+
let n = t.closest(wt);
|
|
764
777
|
return n !== null && n !== e && e.contains(n);
|
|
765
|
-
},
|
|
778
|
+
}, Et = /* @__PURE__ */ new Set(["Enter", " "]), Dt = b("px-[var(--table-cell-padding-inline)] py-[var(--table-cell-padding-block)] text-small first:pl-0 last:pr-0", {
|
|
766
779
|
variants: {
|
|
767
780
|
variant: {
|
|
768
781
|
value: "font-body text-foreground tabular-nums",
|
|
@@ -778,23 +791,23 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
778
791
|
variant: "value",
|
|
779
792
|
align: "left"
|
|
780
793
|
}
|
|
781
|
-
}),
|
|
794
|
+
}), Ot = b("px-[var(--table-cell-padding-inline)] py-[var(--table-cell-padding-block)] font-secondary font-medium text-label text-muted tracking-label first:pl-0 last:pr-0", {
|
|
782
795
|
variants: { align: {
|
|
783
796
|
left: "text-left",
|
|
784
797
|
right: "text-right",
|
|
785
798
|
center: "text-center"
|
|
786
799
|
} },
|
|
787
800
|
defaultVariants: { align: "left" }
|
|
788
|
-
}),
|
|
801
|
+
}), kt = (e) => `var(--table-column-${e})`, At = (e, t) => {
|
|
789
802
|
if (e.width === "icon-action") return "max-content";
|
|
790
|
-
let n = e.minWidth === void 0 ? void 0 :
|
|
803
|
+
let n = e.minWidth === void 0 ? void 0 : kt(e.minWidth);
|
|
791
804
|
if (e.width !== void 0) {
|
|
792
|
-
let t =
|
|
805
|
+
let t = kt(e.width);
|
|
793
806
|
return n === void 0 ? t : `max(${n}, ${t})`;
|
|
794
807
|
}
|
|
795
|
-
if (!Number.isFinite(e.weight) || e.weight <= 0) throw new
|
|
808
|
+
if (!Number.isFinite(e.weight) || e.weight <= 0) throw new yt(`column ${t + 1} needs a positive finite weight (got ${e.weight})`);
|
|
796
809
|
return `minmax(${n ?? "0"}, ${e.weight}fr)`;
|
|
797
|
-
},
|
|
810
|
+
}, jt = (e) => e === void 0 || e.length === 0 ? void 0 : e.map(At).join(" "), Mt = (e, t, n, r) => {
|
|
798
811
|
let [i, a] = m(0);
|
|
799
812
|
return d(() => {
|
|
800
813
|
let i = e.current;
|
|
@@ -829,16 +842,16 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
829
842
|
n,
|
|
830
843
|
r
|
|
831
844
|
]), i;
|
|
832
|
-
},
|
|
845
|
+
}, Nt = (e) => {
|
|
833
846
|
let t = e.currentTarget;
|
|
834
847
|
if (getComputedStyle(t).getPropertyValue("--_scroll-released").trim() === "1") return;
|
|
835
848
|
let n = e.target;
|
|
836
849
|
if (n === t) return;
|
|
837
850
|
let r = t.getBoundingClientRect(), i = t.querySelector(":scope > table > thead"), a = n.getBoundingClientRect(), o = Number.parseFloat(getComputedStyle(t).paddingTop) || 0, s = r.top + t.clientTop + (i?.getBoundingClientRect().height ?? 0) + 2 * o, c = r.top + t.clientTop + t.clientHeight - o;
|
|
838
851
|
i?.contains(n) || (a.top < s ? t.scrollTop += a.top - s : a.bottom > c && (t.scrollTop += a.bottom - c)), a.left < r.left + o ? t.scrollLeft += a.left - r.left - o : a.right > r.left + t.clientLeft + t.clientWidth - o && (t.scrollLeft += a.right - r.left - t.clientLeft - t.clientWidth + o);
|
|
839
|
-
},
|
|
852
|
+
}, Pt = {
|
|
840
853
|
Root: ({ caption: e, captionVisibility: r, bounded: i, selectionTreatment: a, notes: o, columns: s, density: c, children: l, testId: u }) => {
|
|
841
|
-
let d = p(null), f = p(null), m = p(null), h =
|
|
854
|
+
let d = p(null), f = p(null), m = p(null), h = jt(s), g = Mt(d, f, m, i === !0), _ = g !== void 0, v = h === void 0 ? void 0 : { "--table-columns": h }, y = h === void 0 ? void 0 : s?.length, b = /* @__PURE__ */ n("table", {
|
|
842
855
|
ref: f,
|
|
843
856
|
role: "table",
|
|
844
857
|
children: [/* @__PURE__ */ t("caption", {
|
|
@@ -847,7 +860,7 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
847
860
|
}), l]
|
|
848
861
|
});
|
|
849
862
|
return o === void 0 && !i ? /* @__PURE__ */ t("section", {
|
|
850
|
-
className:
|
|
863
|
+
className: St({
|
|
851
864
|
density: c,
|
|
852
865
|
captionVisibility: r,
|
|
853
866
|
selectionTreatment: a,
|
|
@@ -856,16 +869,16 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
856
869
|
style: v,
|
|
857
870
|
"data-columns": y,
|
|
858
871
|
"data-icon-actions": s?.some((e) => e.width === "icon-action") || void 0,
|
|
859
|
-
"data-density": c ??
|
|
860
|
-
"data-selection-treatment": a ??
|
|
872
|
+
"data-density": c ?? bt,
|
|
873
|
+
"data-selection-treatment": a ?? xt,
|
|
861
874
|
"data-testid": u,
|
|
862
875
|
"aria-label": e,
|
|
863
876
|
tabIndex: 0,
|
|
864
877
|
children: b
|
|
865
878
|
}) : /* @__PURE__ */ t("div", {
|
|
866
879
|
ref: d,
|
|
867
|
-
onFocus: i ?
|
|
868
|
-
className:
|
|
880
|
+
onFocus: i ? Nt : void 0,
|
|
881
|
+
className: St({
|
|
869
882
|
density: c,
|
|
870
883
|
captionVisibility: r,
|
|
871
884
|
selectionTreatment: a,
|
|
@@ -873,11 +886,12 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
873
886
|
}),
|
|
874
887
|
style: v,
|
|
875
888
|
"data-bounded": i || void 0,
|
|
889
|
+
"data-height-bounded": i || void 0,
|
|
876
890
|
"data-notes": o,
|
|
877
891
|
"data-columns": y,
|
|
878
892
|
"data-icon-actions": s?.some((e) => e.width === "icon-action") || void 0,
|
|
879
|
-
"data-density": c ??
|
|
880
|
-
"data-selection-treatment": a ??
|
|
893
|
+
"data-density": c ?? bt,
|
|
894
|
+
"data-selection-treatment": a ?? xt,
|
|
881
895
|
"data-testid": u,
|
|
882
896
|
role: _ ? "group" : void 0,
|
|
883
897
|
"aria-label": _ ? e : void 0,
|
|
@@ -905,13 +919,13 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
905
919
|
return () => e?.unsubscribe();
|
|
906
920
|
}, [i]);
|
|
907
921
|
let s = (e) => {
|
|
908
|
-
|
|
922
|
+
Tt(e.currentTarget, e.target) || r?.next();
|
|
909
923
|
}, c = (e) => {
|
|
910
|
-
e.target !== e.currentTarget || !
|
|
924
|
+
e.target !== e.currentTarget || !Et.has(e.key) || (e.key === " " && e.preventDefault(), e.repeat || r?.next());
|
|
911
925
|
}, l = r !== void 0;
|
|
912
926
|
return /* @__PURE__ */ t("tr", {
|
|
913
927
|
role: "row",
|
|
914
|
-
className:
|
|
928
|
+
className: Ct({ interactive: l }),
|
|
915
929
|
"data-testid": n,
|
|
916
930
|
tabIndex: l ? 0 : void 0,
|
|
917
931
|
"aria-selected": i === void 0 ? void 0 : a,
|
|
@@ -924,19 +938,19 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
924
938
|
role: e === "row" ? "rowheader" : "columnheader",
|
|
925
939
|
scope: e,
|
|
926
940
|
"aria-sort": r,
|
|
927
|
-
className:
|
|
941
|
+
className: Ot({ align: n }),
|
|
928
942
|
children: i
|
|
929
943
|
}),
|
|
930
944
|
Cell: ({ variant: e, align: n, children: r }) => /* @__PURE__ */ t("td", {
|
|
931
945
|
role: "cell",
|
|
932
|
-
className:
|
|
946
|
+
className: Dt({
|
|
933
947
|
variant: e,
|
|
934
948
|
align: n
|
|
935
949
|
}),
|
|
936
950
|
"data-variant": e ?? "value",
|
|
937
951
|
children: r
|
|
938
952
|
})
|
|
939
|
-
},
|
|
953
|
+
}, Ft = b("font-secondary text-label tracking-label font-medium", {
|
|
940
954
|
variants: { color: {
|
|
941
955
|
foreground: "text-foreground",
|
|
942
956
|
muted: "text-muted",
|
|
@@ -946,11 +960,11 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
946
960
|
info: "text-info"
|
|
947
961
|
} },
|
|
948
962
|
defaultVariants: { color: "muted" }
|
|
949
|
-
}),
|
|
950
|
-
className:
|
|
963
|
+
}), It = ({ children: e, color: n, testId: r }) => /* @__PURE__ */ t("p", {
|
|
964
|
+
className: Ft({ color: n }),
|
|
951
965
|
"data-testid": r,
|
|
952
966
|
children: e
|
|
953
|
-
}),
|
|
967
|
+
}), Lt = b("font-heading text-display leading-display tracking-optical max-w-[var(--measure-display)]", {
|
|
954
968
|
variants: { color: {
|
|
955
969
|
foreground: "text-foreground",
|
|
956
970
|
muted: "text-muted",
|
|
@@ -960,11 +974,11 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
960
974
|
info: "text-info"
|
|
961
975
|
} },
|
|
962
976
|
defaultVariants: { color: "foreground" }
|
|
963
|
-
}),
|
|
964
|
-
className:
|
|
977
|
+
}), Rt = ({ children: e, color: n, testId: r }) => /* @__PURE__ */ t("h1", {
|
|
978
|
+
className: Lt({ color: n }),
|
|
965
979
|
"data-testid": r,
|
|
966
980
|
children: e
|
|
967
|
-
}),
|
|
981
|
+
}), zt = b("font-heading text-title leading-title tracking-optical", {
|
|
968
982
|
variants: { color: {
|
|
969
983
|
foreground: "text-foreground",
|
|
970
984
|
muted: "text-muted",
|
|
@@ -974,11 +988,11 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
974
988
|
info: "text-info"
|
|
975
989
|
} },
|
|
976
990
|
defaultVariants: { color: "foreground" }
|
|
977
|
-
}),
|
|
978
|
-
className:
|
|
991
|
+
}), Bt = ({ children: e, color: n, testId: r }) => /* @__PURE__ */ t("h2", {
|
|
992
|
+
className: zt({ color: n }),
|
|
979
993
|
"data-testid": r,
|
|
980
994
|
children: e
|
|
981
|
-
}),
|
|
995
|
+
}), Vt = b("font-heading text-subtitle leading-subtitle", {
|
|
982
996
|
variants: { color: {
|
|
983
997
|
foreground: "text-foreground",
|
|
984
998
|
muted: "text-muted",
|
|
@@ -988,11 +1002,11 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
988
1002
|
info: "text-info"
|
|
989
1003
|
} },
|
|
990
1004
|
defaultVariants: { color: "foreground" }
|
|
991
|
-
}),
|
|
992
|
-
className:
|
|
1005
|
+
}), Ht = ({ children: e, color: n, testId: r }) => /* @__PURE__ */ t("h3", {
|
|
1006
|
+
className: Vt({ color: n }),
|
|
993
1007
|
"data-testid": r,
|
|
994
1008
|
children: e
|
|
995
|
-
}),
|
|
1009
|
+
}), Ut = b("font-heading text-body leading-body font-bold", {
|
|
996
1010
|
variants: { color: {
|
|
997
1011
|
foreground: "text-foreground",
|
|
998
1012
|
muted: "text-muted",
|
|
@@ -1002,11 +1016,11 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
1002
1016
|
info: "text-info"
|
|
1003
1017
|
} },
|
|
1004
1018
|
defaultVariants: { color: "foreground" }
|
|
1005
|
-
}),
|
|
1006
|
-
className:
|
|
1019
|
+
}), Wt = ({ children: e, color: n, testId: r }) => /* @__PURE__ */ t("h4", {
|
|
1020
|
+
className: Ut({ color: n }),
|
|
1007
1021
|
"data-testid": r,
|
|
1008
1022
|
children: e
|
|
1009
|
-
}),
|
|
1023
|
+
}), Gt = b("font-heading text-body leading-body font-semibold", {
|
|
1010
1024
|
variants: { color: {
|
|
1011
1025
|
foreground: "text-foreground",
|
|
1012
1026
|
muted: "text-muted",
|
|
@@ -1016,11 +1030,11 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
1016
1030
|
info: "text-info"
|
|
1017
1031
|
} },
|
|
1018
1032
|
defaultVariants: { color: "foreground" }
|
|
1019
|
-
}),
|
|
1020
|
-
className:
|
|
1033
|
+
}), Kt = ({ children: e, color: n, testId: r }) => /* @__PURE__ */ t("h5", {
|
|
1034
|
+
className: Gt({ color: n }),
|
|
1021
1035
|
"data-testid": r,
|
|
1022
1036
|
children: e
|
|
1023
|
-
}),
|
|
1037
|
+
}), qt = b("font-heading text-body leading-body font-medium", {
|
|
1024
1038
|
variants: { color: {
|
|
1025
1039
|
foreground: "text-foreground",
|
|
1026
1040
|
muted: "text-muted",
|
|
@@ -1030,11 +1044,11 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
1030
1044
|
info: "text-info"
|
|
1031
1045
|
} },
|
|
1032
1046
|
defaultVariants: { color: "foreground" }
|
|
1033
|
-
}),
|
|
1034
|
-
className:
|
|
1047
|
+
}), Jt = ({ children: e, color: n, testId: r }) => /* @__PURE__ */ t("h6", {
|
|
1048
|
+
className: qt({ color: n }),
|
|
1035
1049
|
"data-testid": r,
|
|
1036
1050
|
children: e
|
|
1037
|
-
}),
|
|
1051
|
+
}), Yt = b("font-secondary text-small", {
|
|
1038
1052
|
variants: {
|
|
1039
1053
|
emphasis: {
|
|
1040
1054
|
regular: "",
|
|
@@ -1058,15 +1072,15 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
1058
1072
|
truncate: !1,
|
|
1059
1073
|
emphasis: "regular"
|
|
1060
1074
|
}
|
|
1061
|
-
}),
|
|
1062
|
-
className:
|
|
1075
|
+
}), Xt = ({ children: e, color: n, emphasis: r, truncate: i, testId: a }) => /* @__PURE__ */ t("p", {
|
|
1076
|
+
className: Yt({
|
|
1063
1077
|
color: n,
|
|
1064
1078
|
emphasis: r,
|
|
1065
1079
|
truncate: i
|
|
1066
1080
|
}),
|
|
1067
1081
|
"data-testid": a,
|
|
1068
1082
|
children: e
|
|
1069
|
-
}),
|
|
1083
|
+
}), Zt = b("font-body text-body leading-body", {
|
|
1070
1084
|
variants: {
|
|
1071
1085
|
emphasis: {
|
|
1072
1086
|
regular: "",
|
|
@@ -1090,21 +1104,21 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
1090
1104
|
truncate: !1,
|
|
1091
1105
|
emphasis: "regular"
|
|
1092
1106
|
}
|
|
1093
|
-
}),
|
|
1094
|
-
className:
|
|
1107
|
+
}), Qt = ({ children: e, color: n, emphasis: r, truncate: i, testId: a }) => /* @__PURE__ */ t("p", {
|
|
1108
|
+
className: Zt({
|
|
1095
1109
|
color: n,
|
|
1096
1110
|
emphasis: r,
|
|
1097
1111
|
truncate: i
|
|
1098
1112
|
}),
|
|
1099
1113
|
"data-testid": a,
|
|
1100
1114
|
children: e
|
|
1101
|
-
}),
|
|
1115
|
+
}), $t = b("flex flex-col gap-[var(--space-stack)]", {
|
|
1102
1116
|
variants: { variant: {
|
|
1103
1117
|
default: "max-w-[var(--measure)]",
|
|
1104
1118
|
letter: "min-w-0 max-w-[min(100%,var(--measure-letter))] font-letter text-letter"
|
|
1105
1119
|
} },
|
|
1106
1120
|
defaultVariants: { variant: "default" }
|
|
1107
|
-
}),
|
|
1121
|
+
}), en = a(!1), tn = b("font-body text-lede leading-lede text-foreground"), nn = b("", {
|
|
1108
1122
|
variants: {
|
|
1109
1123
|
letter: {
|
|
1110
1124
|
false: "font-body text-body leading-body",
|
|
@@ -1123,31 +1137,31 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
1123
1137
|
letter: !1,
|
|
1124
1138
|
color: "foreground"
|
|
1125
1139
|
}
|
|
1126
|
-
}),
|
|
1127
|
-
Root: ({ children: e, testId: n, variant: r }) => /* @__PURE__ */ t(
|
|
1140
|
+
}), rn = b("font-body text-small text-muted"), an = {
|
|
1141
|
+
Root: ({ children: e, testId: n, variant: r }) => /* @__PURE__ */ t(en, {
|
|
1128
1142
|
value: r === "letter",
|
|
1129
1143
|
children: /* @__PURE__ */ t("div", {
|
|
1130
|
-
className:
|
|
1144
|
+
className: $t({ variant: r }),
|
|
1131
1145
|
"data-testid": n,
|
|
1132
1146
|
children: e
|
|
1133
1147
|
})
|
|
1134
1148
|
}),
|
|
1135
1149
|
Lede: ({ children: e }) => /* @__PURE__ */ t("p", {
|
|
1136
|
-
className:
|
|
1150
|
+
className: tn(),
|
|
1137
1151
|
children: e
|
|
1138
1152
|
}),
|
|
1139
1153
|
Body: ({ color: e, children: n }) => /* @__PURE__ */ t("p", {
|
|
1140
|
-
className:
|
|
1154
|
+
className: nn({
|
|
1141
1155
|
color: e,
|
|
1142
|
-
letter: c(
|
|
1156
|
+
letter: c(en)
|
|
1143
1157
|
}),
|
|
1144
1158
|
children: n
|
|
1145
1159
|
}),
|
|
1146
1160
|
Tail: ({ children: e }) => /* @__PURE__ */ t("p", {
|
|
1147
|
-
className:
|
|
1161
|
+
className: rn(),
|
|
1148
1162
|
children: e
|
|
1149
1163
|
})
|
|
1150
|
-
}, G = "font-control text-body text-balance wrap-anywhere rounded-[var(--radius-control)] select-none inline-flex flex-row items-center justify-center gap-2",
|
|
1164
|
+
}, G = "font-control text-body text-balance wrap-anywhere rounded-[var(--radius-control)] select-none inline-flex flex-row items-center justify-center gap-2", on = b("transition-colors duration-[var(--motion-duration-color)] cursor-pointer disabled:cursor-not-allowed outline-focus-ring outline-offset-[var(--focus-ring-offset)] focus-visible:outline focus-visible:outline-[length:var(--focus-ring-width)]", {
|
|
1151
1165
|
variants: { variant: {
|
|
1152
1166
|
primary: `${G} px-4 sm:px-6 py-2 min-w-[min(var(--control-min-width),100%)] bg-primary text-primary-foreground hover:bg-primary-hover disabled:bg-disabled disabled:hover:bg-disabled-hover forced-colors:border`,
|
|
1153
1167
|
secondary: `${G} px-4 sm:px-6 py-2 min-w-[min(var(--control-min-width),100%)] bg-secondary text-secondary-foreground hover:bg-secondary-hover disabled:bg-disabled disabled:hover:bg-disabled-hover forced-colors:border`,
|
|
@@ -1158,47 +1172,47 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
1158
1172
|
plain: "inline p-0 min-w-0 max-w-full whitespace-normal wrap-anywhere bg-transparent [font:inherit] [letter-spacing:inherit] [color:inherit] [text-align:inherit] disabled:text-disabled"
|
|
1159
1173
|
} },
|
|
1160
1174
|
defaultVariants: { variant: "primary" }
|
|
1161
|
-
}),
|
|
1175
|
+
}), sn = ({ children: e, disabled: n, testId: r, variant: i, onClick$: a, ariaLabel: o, type: s = "button" }) => /* @__PURE__ */ t("button", {
|
|
1162
1176
|
type: s,
|
|
1163
1177
|
"data-testid": r,
|
|
1164
|
-
className:
|
|
1178
|
+
className: on({ variant: i }),
|
|
1165
1179
|
onClick: () => a?.next(),
|
|
1166
1180
|
disabled: n,
|
|
1167
1181
|
"aria-label": o,
|
|
1168
1182
|
children: e
|
|
1169
|
-
}),
|
|
1183
|
+
}), cn = class extends Error {
|
|
1170
1184
|
constructor(e) {
|
|
1171
1185
|
super(`Choices.${e} must be composed inside Choices.Root`), this.name = "ChoicesCompositionError";
|
|
1172
1186
|
}
|
|
1173
|
-
},
|
|
1187
|
+
}, ln = b("flex min-w-0 gap-[var(--space-stack)]", {
|
|
1174
1188
|
variants: { arrangement: {
|
|
1175
1189
|
vertical: "flex-col [&>[role=radio]]:w-full",
|
|
1176
1190
|
wrapping: "flex-row flex-wrap items-start"
|
|
1177
1191
|
} },
|
|
1178
1192
|
defaultVariants: { arrangement: "vertical" }
|
|
1179
|
-
}),
|
|
1193
|
+
}), un = b([
|
|
1180
1194
|
"group/choice flex min-w-0 max-w-full flex-none flex-row items-start gap-3 text-left wrap-anywhere",
|
|
1181
1195
|
"rounded-[var(--radius-control)] border border-solid border-control-border bg-transparent aria-checked:border-foreground",
|
|
1182
1196
|
"px-3 py-2",
|
|
1183
1197
|
"cursor-pointer disabled:cursor-not-allowed",
|
|
1184
1198
|
"transition-colors duration-[var(--motion-duration-color)]",
|
|
1185
1199
|
"outline-focus-ring outline-offset-[var(--focus-ring-offset)] focus-visible:outline focus-visible:outline-[length:var(--focus-ring-width)]"
|
|
1186
|
-
].join(" ")),
|
|
1187
|
-
let t = c(
|
|
1188
|
-
if (t === void 0) throw new
|
|
1200
|
+
].join(" ")), dn = a(void 0), fn = (e) => {
|
|
1201
|
+
let t = c(dn);
|
|
1202
|
+
if (t === void 0) throw new cn(e);
|
|
1189
1203
|
return t;
|
|
1190
|
-
},
|
|
1204
|
+
}, pn = (e, t) => {
|
|
1191
1205
|
let n = e.closest("[role=\"radiogroup\"]");
|
|
1192
1206
|
if (n === null) return;
|
|
1193
1207
|
let r = Array.from(n.querySelectorAll(":scope > [role=\"radio\"]"));
|
|
1194
1208
|
return r[(r.indexOf(e) + t + r.length) % r.length];
|
|
1195
|
-
},
|
|
1209
|
+
}, mn = {
|
|
1196
1210
|
ArrowDown: 1,
|
|
1197
1211
|
ArrowRight: 1,
|
|
1198
1212
|
ArrowUp: -1,
|
|
1199
1213
|
ArrowLeft: -1
|
|
1200
|
-
},
|
|
1201
|
-
Root: ({ arrangement: e, selected: n, onSelect$: r, label: i, inert: a, children: o, testId: s }) => /* @__PURE__ */ t(
|
|
1214
|
+
}, hn = {
|
|
1215
|
+
Root: ({ arrangement: e, selected: n, onSelect$: r, label: i, inert: a, children: o, testId: s }) => /* @__PURE__ */ t(dn.Provider, {
|
|
1202
1216
|
value: {
|
|
1203
1217
|
selected: n,
|
|
1204
1218
|
onSelect$: r,
|
|
@@ -1208,13 +1222,13 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
1208
1222
|
role: "radiogroup",
|
|
1209
1223
|
"aria-label": i,
|
|
1210
1224
|
"aria-disabled": a === !0 ? "true" : void 0,
|
|
1211
|
-
className:
|
|
1225
|
+
className: ln({ arrangement: e }),
|
|
1212
1226
|
"data-testid": s,
|
|
1213
1227
|
children: o
|
|
1214
1228
|
})
|
|
1215
1229
|
}),
|
|
1216
1230
|
Choice: ({ value: e, children: r, description: i, testId: a }) => {
|
|
1217
|
-
let { selected: o, onSelect$: s, inert: c } =
|
|
1231
|
+
let { selected: o, onSelect$: s, inert: c } = fn("Choice"), l = o === e, d = u(), f = `${d}-name`, p = `${d}-description`;
|
|
1218
1232
|
return /* @__PURE__ */ n("button", {
|
|
1219
1233
|
type: "button",
|
|
1220
1234
|
role: "radio",
|
|
@@ -1225,15 +1239,15 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
1225
1239
|
disabled: c,
|
|
1226
1240
|
"data-value": e,
|
|
1227
1241
|
"data-testid": a,
|
|
1228
|
-
className:
|
|
1242
|
+
className: un(),
|
|
1229
1243
|
onClick: () => {
|
|
1230
1244
|
l || s.next(e);
|
|
1231
1245
|
},
|
|
1232
1246
|
onKeyDown: (e) => {
|
|
1233
|
-
let t =
|
|
1247
|
+
let t = mn[e.key];
|
|
1234
1248
|
if (t === void 0 || c) return;
|
|
1235
1249
|
e.preventDefault();
|
|
1236
|
-
let n =
|
|
1250
|
+
let n = pn(e.currentTarget, t);
|
|
1237
1251
|
if (n === void 0) return;
|
|
1238
1252
|
n.focus();
|
|
1239
1253
|
let r = n.dataset.value;
|
|
@@ -1259,14 +1273,14 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
1259
1273
|
})]
|
|
1260
1274
|
});
|
|
1261
1275
|
}
|
|
1262
|
-
},
|
|
1276
|
+
}, gn = b("block w-full rounded-[var(--radius-control)] border border-solid border-control-border bg-transparent px-3 py-2 font-control text-body text-foreground transition-colors duration-[var(--motion-duration-color)] outline-focus-ring outline-offset-[var(--focus-ring-offset)] focus-visible:outline focus-visible:outline-[length:var(--focus-ring-width)] [&:user-invalid]:border-error aria-[invalid=true]:border-error disabled:cursor-not-allowed disabled:border-disabled disabled:text-muted", {
|
|
1263
1277
|
variants: { variant: {
|
|
1264
1278
|
text: "",
|
|
1265
1279
|
email: "",
|
|
1266
1280
|
url: ""
|
|
1267
1281
|
} },
|
|
1268
1282
|
defaultVariants: { variant: "text" }
|
|
1269
|
-
}),
|
|
1283
|
+
}), _n = ({ label: e, name: r, variant: i, required: a, optionalLabel: o, invalid: s, disabled: c, defaultValue: d, placeholder: f, autocomplete: m, hint: h, errorMessage: g, onInput$: _, reset$: v, testId: y }) => {
|
|
1270
1284
|
let b = u(), x = `${b}-control`, S = `${b}-hint`, C = `${b}-error`, w = [h ? S : void 0, s ? C : void 0].filter(Boolean).join(" ") || void 0, T = p(null);
|
|
1271
1285
|
return l(() => {
|
|
1272
1286
|
let e = v?.subscribe(() => {
|
|
@@ -1286,7 +1300,7 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
1286
1300
|
id: x,
|
|
1287
1301
|
name: r,
|
|
1288
1302
|
type: i ?? "text",
|
|
1289
|
-
className:
|
|
1303
|
+
className: gn({ variant: i }),
|
|
1290
1304
|
required: a,
|
|
1291
1305
|
disabled: c,
|
|
1292
1306
|
defaultValue: d,
|
|
@@ -1313,7 +1327,7 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
1313
1327
|
})
|
|
1314
1328
|
]
|
|
1315
1329
|
});
|
|
1316
|
-
},
|
|
1330
|
+
}, vn = b("outline-focus-ring outline-offset-[var(--focus-ring-offset)] focus-visible:outline focus-visible:outline-[length:var(--focus-ring-width)]", {
|
|
1317
1331
|
variants: { treatment: {
|
|
1318
1332
|
prose: "text-link underline decoration-[length:var(--underline-thickness)] underline-offset-[var(--underline-offset)] hover:decoration-[length:var(--underline-thickness-hover)]",
|
|
1319
1333
|
quiet: "font-secondary text-muted no-underline decoration-[length:var(--underline-thickness)] underline-offset-[var(--underline-offset)] transition-colors duration-[var(--motion-duration-color)] hover:text-foreground hover:underline",
|
|
@@ -1321,15 +1335,15 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
1321
1335
|
graphic: "text-inherit no-underline"
|
|
1322
1336
|
} },
|
|
1323
1337
|
defaultVariants: { treatment: "prose" }
|
|
1324
|
-
}),
|
|
1338
|
+
}), yn = ({ href: e, children: n, treatment: r, external: i, current: a, testId: o }) => /* @__PURE__ */ t("a", {
|
|
1325
1339
|
href: e,
|
|
1326
|
-
className:
|
|
1340
|
+
className: vn({ treatment: r }),
|
|
1327
1341
|
target: i ? "_blank" : void 0,
|
|
1328
1342
|
rel: i ? "noopener noreferrer" : void 0,
|
|
1329
1343
|
"aria-current": a ? "page" : void 0,
|
|
1330
1344
|
"data-testid": o,
|
|
1331
1345
|
children: n
|
|
1332
|
-
}),
|
|
1346
|
+
}), bn = (e, t, n, r) => {
|
|
1333
1347
|
let i = Math.max(e.length - 1, 0) * r;
|
|
1334
1348
|
if (e.reduce((e, t) => e + t, 0) + i <= n) return e.length;
|
|
1335
1349
|
let a = 0, o = t;
|
|
@@ -1338,11 +1352,11 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
1338
1352
|
o += t + r, a += 1;
|
|
1339
1353
|
}
|
|
1340
1354
|
return a;
|
|
1341
|
-
},
|
|
1355
|
+
}, xn = class extends Error {
|
|
1342
1356
|
constructor(e) {
|
|
1343
1357
|
super(`MultiSelect.${e} must be composed inside MultiSelect.Root`), this.name = "MultiSelectCompositionError";
|
|
1344
1358
|
}
|
|
1345
|
-
},
|
|
1359
|
+
}, Sn = "outline-focus-ring outline-offset-[var(--focus-ring-offset)] focus-visible:outline focus-visible:outline-[length:var(--focus-ring-width)]", Cn = `relative inline-flex shrink-0 cursor-pointer items-center rounded-[var(--radius-control)] bg-backing px-2 py-0.5 font-secondary text-small text-foreground disabled:cursor-not-allowed disabled:text-muted pointer-events-auto ${Sn}`, K = b("", {
|
|
1346
1360
|
variants: { part: {
|
|
1347
1361
|
root: [
|
|
1348
1362
|
"relative flex flex-col gap-[var(--space-stack)]",
|
|
@@ -1355,7 +1369,7 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
1355
1369
|
"font-control text-body text-foreground transition-colors duration-[var(--motion-duration-color)]",
|
|
1356
1370
|
"data-[disabled]:border-disabled data-[disabled]:text-muted"
|
|
1357
1371
|
].join(" "),
|
|
1358
|
-
trigger: `absolute inset-0 flex cursor-pointer items-center justify-end rounded-[var(--radius-control)] bg-transparent px-3 text-muted disabled:cursor-not-allowed ${
|
|
1372
|
+
trigger: `absolute inset-0 flex cursor-pointer items-center justify-end rounded-[var(--radius-control)] bg-transparent px-3 text-muted disabled:cursor-not-allowed ${Sn}`,
|
|
1359
1373
|
clip: "relative min-w-0 flex-1 overflow-hidden p-[calc(var(--focus-ring-width)+var(--focus-ring-offset))] -m-[calc(var(--focus-ring-width)+var(--focus-ring-offset))] pointer-events-none",
|
|
1360
1374
|
track: "relative flex min-h-[calc(var(--text-body)*var(--leading-body))] items-center gap-1",
|
|
1361
1375
|
chip: [
|
|
@@ -1363,9 +1377,9 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
1363
1377
|
"rounded-[var(--radius-control)] bg-backing py-0.5 pr-0.5 pl-2 font-secondary text-small text-foreground",
|
|
1364
1378
|
"group-data-[disabled]/field:text-muted data-[overflow]:invisible data-[overflow]:absolute"
|
|
1365
1379
|
].join(" "),
|
|
1366
|
-
count:
|
|
1367
|
-
countMeasure: `${
|
|
1368
|
-
iconButton: `relative inline-flex size-6 shrink-0 cursor-pointer items-center justify-center rounded-[var(--radius-control)] text-muted transition-colors duration-[var(--motion-duration-color)] hover:text-foreground disabled:cursor-not-allowed disabled:hover:text-muted ${
|
|
1380
|
+
count: Cn,
|
|
1381
|
+
countMeasure: `${Cn} invisible absolute`,
|
|
1382
|
+
iconButton: `relative inline-flex size-6 shrink-0 cursor-pointer items-center justify-center rounded-[var(--radius-control)] text-muted transition-colors duration-[var(--motion-duration-color)] hover:text-foreground disabled:cursor-not-allowed disabled:hover:text-muted ${Sn}`,
|
|
1369
1383
|
surface: [
|
|
1370
1384
|
"absolute left-0 right-0 z-10 flex flex-col gap-1 overflow-y-auto p-1",
|
|
1371
1385
|
"rounded-[var(--radius-control)] border border-solid border-border bg-surface shadow-[var(--elevation-floating)]",
|
|
@@ -1374,22 +1388,22 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
1374
1388
|
].join(" ")
|
|
1375
1389
|
} },
|
|
1376
1390
|
defaultVariants: { part: "root" }
|
|
1377
|
-
}),
|
|
1391
|
+
}), wn = b([
|
|
1378
1392
|
"group/option flex w-full flex-row items-center gap-3 text-left",
|
|
1379
1393
|
"rounded-[var(--radius-control)] bg-transparent px-3 py-2 hover:bg-backing",
|
|
1380
1394
|
"cursor-pointer disabled:cursor-not-allowed",
|
|
1381
1395
|
"transition-colors duration-[var(--motion-duration-color)]",
|
|
1382
1396
|
"outline-focus-ring outline-offset-[var(--focus-ring-offset)] focus-visible:outline focus-visible:outline-[length:var(--focus-ring-width)]"
|
|
1383
|
-
].join(" ")),
|
|
1384
|
-
let t = c(
|
|
1385
|
-
if (t === void 0) throw new
|
|
1397
|
+
].join(" ")), Tn = 8, En = a(void 0), Dn = (e) => {
|
|
1398
|
+
let t = c(En);
|
|
1399
|
+
if (t === void 0) throw new xn(e);
|
|
1386
1400
|
return t;
|
|
1387
1401
|
}, q = (e) => (t) => {
|
|
1388
1402
|
e.current = t ?? void 0;
|
|
1389
|
-
},
|
|
1403
|
+
}, On = (e) => e.getBoundingClientRect().width, kn = (e) => r.toArray(e).flatMap((e) => {
|
|
1390
1404
|
if (!o(e)) return [];
|
|
1391
|
-
if (e.type === i) return
|
|
1392
|
-
if (e.type ===
|
|
1405
|
+
if (e.type === i) return kn(e.props.children);
|
|
1406
|
+
if (e.type === Rn) {
|
|
1393
1407
|
let { value: t, children: n } = e.props;
|
|
1394
1408
|
return [{
|
|
1395
1409
|
value: t,
|
|
@@ -1397,19 +1411,19 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
1397
1411
|
}];
|
|
1398
1412
|
}
|
|
1399
1413
|
return [];
|
|
1400
|
-
}),
|
|
1414
|
+
}), An = (e) => Array.from(e.querySelectorAll("[data-multiselect-chip]:not([data-overflow]) button")), jn = (e) => {
|
|
1401
1415
|
let t = document.activeElement;
|
|
1402
1416
|
return !e.contains(t) || t instanceof Element && t.closest("[data-overflow]") !== null;
|
|
1403
|
-
},
|
|
1417
|
+
}, Mn = (e) => e.querySelector("[role=\"checkbox\"][aria-checked=\"true\"]") ?? e.querySelector("[role=\"checkbox\"]") ?? void 0, Nn = (e, t) => [...new Set(e.map(({ value: e }) => e).filter((e) => t.has(e)))], Pn = (e) => e.kind === "firstOption" || !e.control.isConnected, Fn = (e, t, n, r) => {
|
|
1404
1418
|
switch (e.kind) {
|
|
1405
|
-
case "firstOption": return r === void 0 ? void 0 :
|
|
1419
|
+
case "firstOption": return r === void 0 ? void 0 : Mn(r);
|
|
1406
1420
|
case "afterRemoval": {
|
|
1407
|
-
let r =
|
|
1421
|
+
let r = An(t);
|
|
1408
1422
|
return r[e.index] ?? r[e.index - 1] ?? n;
|
|
1409
1423
|
}
|
|
1410
1424
|
case "afterClear": return n;
|
|
1411
1425
|
}
|
|
1412
|
-
},
|
|
1426
|
+
}, In = () => /* @__PURE__ */ t("svg", {
|
|
1413
1427
|
"aria-hidden": !0,
|
|
1414
1428
|
focusable: !1,
|
|
1415
1429
|
viewBox: "0 0 16 16",
|
|
@@ -1421,8 +1435,8 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
1421
1435
|
strokeWidth: 1.5,
|
|
1422
1436
|
strokeLinecap: "round"
|
|
1423
1437
|
})
|
|
1424
|
-
}),
|
|
1425
|
-
let y = u(), b = `${y}-label`, x = `${y}-trigger`, S = `${y}-options`, C = `${y}-hint`, w = `${y}-empty`, T = g === !0, [ee, te] = m([]), [ne, E] = m(!1), [re,
|
|
1438
|
+
}), Ln = ({ label: e, selected$: r, onChange$: i, emptyLabel: a, removeLabel: o, clearLabel: s, overflowLabel: c, hint: h, disabled: g, testId: _, children: v }) => {
|
|
1439
|
+
let y = u(), b = `${y}-label`, x = `${y}-trigger`, S = `${y}-options`, C = `${y}-hint`, w = `${y}-empty`, T = g === !0, [ee, te] = m([]), [ne, E] = m(!1), [re, ie] = m(void 0), [D, ae] = m("below"), [, oe] = f((e) => e + 1, 0), O = p(void 0), se = p(void 0), k = p(void 0), A = p(void 0), j = p(void 0), M = p(void 0), N = p(!1), P = ne && !T, ce = kn(v), F = new Set(ee), I = ce.filter((e) => F.has(e.value)), L = re === void 0 ? I.length : Math.min(re, I.length), R = I.length - L;
|
|
1426
1440
|
d(() => {
|
|
1427
1441
|
te([]);
|
|
1428
1442
|
let e = r.subscribe((e) => te(e));
|
|
@@ -1430,80 +1444,80 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
1430
1444
|
}, [r]), l(() => {
|
|
1431
1445
|
T && E(!1);
|
|
1432
1446
|
}, [T]), d(() => {
|
|
1433
|
-
let e =
|
|
1447
|
+
let e = A.current;
|
|
1434
1448
|
if (e === void 0 || typeof ResizeObserver > "u") return;
|
|
1435
1449
|
let t = new ResizeObserver(() => oe());
|
|
1436
1450
|
return t.observe(e), () => t.disconnect();
|
|
1437
1451
|
}, []), d(() => {
|
|
1438
|
-
let e =
|
|
1452
|
+
let e = A.current;
|
|
1439
1453
|
if (e === void 0) return;
|
|
1440
|
-
let t = Array.from(e.querySelectorAll("[data-multiselect-chip]")), n = e.querySelector("[data-multiselect-count]"), r = Number.parseFloat(getComputedStyle(e).columnGap) || 0, i =
|
|
1441
|
-
|
|
1454
|
+
let t = Array.from(e.querySelectorAll("[data-multiselect-chip]")), n = e.querySelector("[data-multiselect-count]"), r = Number.parseFloat(getComputedStyle(e).columnGap) || 0, i = bn(t.map(On), n === null ? 0 : On(n), On(e), r);
|
|
1455
|
+
ie((e) => e === i ? e : i);
|
|
1442
1456
|
}), d(() => {
|
|
1443
|
-
let e =
|
|
1444
|
-
if (!
|
|
1445
|
-
let n = e.getBoundingClientRect(), r = window.innerHeight - n.bottom -
|
|
1457
|
+
let e = se.current, t = j.current;
|
|
1458
|
+
if (!P || e === void 0 || t === void 0) return;
|
|
1459
|
+
let n = e.getBoundingClientRect(), r = window.innerHeight - n.bottom - Tn, i = n.top - Tn, a = t.scrollHeight > r && i > r;
|
|
1446
1460
|
t.style.setProperty("--multiselect-surface-max-height", `${Math.max(a ? i : r, 0)}px`), ae(a ? "above" : "below");
|
|
1447
1461
|
}), l(() => {
|
|
1448
|
-
if (!
|
|
1462
|
+
if (!P) return;
|
|
1449
1463
|
let e = (e) => {
|
|
1450
1464
|
let t = O.current;
|
|
1451
|
-
t !== void 0 && e.target instanceof Node && !t.contains(e.target) && (
|
|
1465
|
+
t !== void 0 && e.target instanceof Node && !t.contains(e.target) && (N.current = !1, M.current = void 0, E(!1));
|
|
1452
1466
|
};
|
|
1453
1467
|
return document.addEventListener("pointerdown", e), () => document.removeEventListener("pointerdown", e);
|
|
1454
|
-
}, [
|
|
1455
|
-
let e = O.current, t =
|
|
1468
|
+
}, [P]), d(() => {
|
|
1469
|
+
let e = O.current, t = k.current;
|
|
1456
1470
|
if (e === void 0 || t === void 0) return;
|
|
1457
|
-
let n =
|
|
1458
|
-
n !== void 0 &&
|
|
1471
|
+
let n = M.current;
|
|
1472
|
+
n !== void 0 && Pn(n) ? (M.current = void 0, Fn(n, e, t, P ? j.current : void 0)?.focus()) : n === void 0 && N.current && jn(e) && t.focus(), N.current = e.contains(document.activeElement);
|
|
1459
1473
|
});
|
|
1460
|
-
let
|
|
1461
|
-
i.next(
|
|
1474
|
+
let z = (e) => {
|
|
1475
|
+
i.next(Nn(ce, e));
|
|
1462
1476
|
}, le = (e) => {
|
|
1463
1477
|
if (T) return;
|
|
1464
|
-
let t = new Set(
|
|
1465
|
-
t.delete(e) || t.add(e),
|
|
1466
|
-
},
|
|
1478
|
+
let t = new Set(F);
|
|
1479
|
+
t.delete(e) || t.add(e), z(t);
|
|
1480
|
+
}, ue = (e, t) => (n) => {
|
|
1467
1481
|
if (T) return;
|
|
1468
|
-
document.activeElement === n.currentTarget && (
|
|
1482
|
+
document.activeElement === n.currentTarget && (M.current = {
|
|
1469
1483
|
kind: "afterRemoval",
|
|
1470
1484
|
index: t,
|
|
1471
1485
|
control: n.currentTarget
|
|
1472
1486
|
});
|
|
1473
|
-
let r = new Set(
|
|
1474
|
-
r.delete(e),
|
|
1475
|
-
},
|
|
1476
|
-
T || (document.activeElement === e.currentTarget && (
|
|
1487
|
+
let r = new Set(F);
|
|
1488
|
+
r.delete(e), z(r);
|
|
1489
|
+
}, B = (e) => {
|
|
1490
|
+
T || (document.activeElement === e.currentTarget && (M.current = {
|
|
1477
1491
|
kind: "afterClear",
|
|
1478
1492
|
control: e.currentTarget
|
|
1479
1493
|
}), i.next([]));
|
|
1480
|
-
}, de = (e) => {
|
|
1481
|
-
T || (e.detail === 0 && (N.current = { kind: "firstOption" }), E(!0));
|
|
1482
1494
|
}, V = (e) => {
|
|
1483
|
-
|
|
1484
|
-
},
|
|
1495
|
+
T || (e.detail === 0 && (M.current = { kind: "firstOption" }), E(!0));
|
|
1496
|
+
}, de = (e) => {
|
|
1497
|
+
P ? E(!1) : V(e);
|
|
1498
|
+
}, H = (e) => {
|
|
1485
1499
|
if (e.key !== "ArrowDown" || T) return;
|
|
1486
1500
|
e.preventDefault();
|
|
1487
|
-
let t =
|
|
1488
|
-
|
|
1501
|
+
let t = j.current;
|
|
1502
|
+
P && t !== void 0 ? Mn(t)?.focus() : (M.current = { kind: "firstOption" }, E(!0));
|
|
1503
|
+
}, fe = (e) => {
|
|
1504
|
+
e.key !== "Escape" || !P || (e.preventDefault(), e.stopPropagation(), E(!1), k.current?.focus());
|
|
1489
1505
|
}, pe = (e) => {
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
t !== void 0 && t.kind !== "firstOption" && e.target !== t.control && (N.current = void 0);
|
|
1495
|
-
}, me = (e) => {
|
|
1506
|
+
N.current = !0;
|
|
1507
|
+
let t = M.current;
|
|
1508
|
+
t !== void 0 && t.kind !== "firstOption" && e.target !== t.control && (M.current = void 0);
|
|
1509
|
+
}, U = (e) => {
|
|
1496
1510
|
let t = O.current, n = e.relatedTarget;
|
|
1497
|
-
t !== void 0 && n instanceof Node && t.contains(n) || e.target.isConnected && (
|
|
1498
|
-
},
|
|
1511
|
+
t !== void 0 && n instanceof Node && t.contains(n) || e.target.isConnected && (N.current = !1, M.current = void 0, E(!1));
|
|
1512
|
+
}, me = (e) => {
|
|
1499
1513
|
(!(e.target instanceof Element) || e.target.closest("button") === null) && e.preventDefault();
|
|
1500
|
-
},
|
|
1514
|
+
}, he = [I.length === 0 ? w : void 0, h ? C : void 0].filter(Boolean).join(" ") || void 0;
|
|
1501
1515
|
return /* @__PURE__ */ n("div", {
|
|
1502
1516
|
ref: q(O),
|
|
1503
1517
|
className: K(),
|
|
1504
|
-
onKeyDown:
|
|
1505
|
-
onFocus:
|
|
1506
|
-
onBlur:
|
|
1518
|
+
onKeyDown: fe,
|
|
1519
|
+
onFocus: pe,
|
|
1520
|
+
onBlur: U,
|
|
1507
1521
|
children: [
|
|
1508
1522
|
/* @__PURE__ */ t("label", {
|
|
1509
1523
|
id: b,
|
|
@@ -1511,24 +1525,24 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
1511
1525
|
children: e
|
|
1512
1526
|
}),
|
|
1513
1527
|
/* @__PURE__ */ n("div", {
|
|
1514
|
-
ref: q(
|
|
1528
|
+
ref: q(se),
|
|
1515
1529
|
"data-multiselect-field": !0,
|
|
1516
1530
|
"data-disabled": T || void 0,
|
|
1517
1531
|
className: K({ part: "field" }),
|
|
1518
1532
|
children: [
|
|
1519
1533
|
/* @__PURE__ */ t("button", {
|
|
1520
|
-
ref: q(
|
|
1534
|
+
ref: q(k),
|
|
1521
1535
|
id: x,
|
|
1522
1536
|
type: "button",
|
|
1523
1537
|
"aria-labelledby": b,
|
|
1524
|
-
"aria-expanded":
|
|
1525
|
-
"aria-controls":
|
|
1526
|
-
"aria-describedby":
|
|
1538
|
+
"aria-expanded": P,
|
|
1539
|
+
"aria-controls": P ? S : void 0,
|
|
1540
|
+
"aria-describedby": he,
|
|
1527
1541
|
disabled: T,
|
|
1528
1542
|
"data-testid": _,
|
|
1529
1543
|
className: K({ part: "trigger" }),
|
|
1530
|
-
onClick:
|
|
1531
|
-
onKeyDown:
|
|
1544
|
+
onClick: de,
|
|
1545
|
+
onKeyDown: H,
|
|
1532
1546
|
children: /* @__PURE__ */ t("svg", {
|
|
1533
1547
|
"aria-hidden": !0,
|
|
1534
1548
|
focusable: !1,
|
|
@@ -1547,17 +1561,17 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
1547
1561
|
/* @__PURE__ */ t("div", {
|
|
1548
1562
|
className: K({ part: "clip" }),
|
|
1549
1563
|
children: /* @__PURE__ */ n("div", {
|
|
1550
|
-
ref: q(
|
|
1564
|
+
ref: q(A),
|
|
1551
1565
|
"data-multiselect-track": !0,
|
|
1552
1566
|
className: K({ part: "track" }),
|
|
1553
1567
|
children: [
|
|
1554
|
-
|
|
1568
|
+
I.length === 0 && /* @__PURE__ */ t("span", {
|
|
1555
1569
|
id: w,
|
|
1556
1570
|
className: "truncate text-muted",
|
|
1557
1571
|
children: a
|
|
1558
1572
|
}),
|
|
1559
|
-
|
|
1560
|
-
let a = i >=
|
|
1573
|
+
I.map(({ value: e, label: r }, i) => {
|
|
1574
|
+
let a = i >= L;
|
|
1561
1575
|
return /* @__PURE__ */ n("span", {
|
|
1562
1576
|
"data-multiselect-chip": !0,
|
|
1563
1577
|
"data-overflow": a || void 0,
|
|
@@ -1573,34 +1587,34 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
1573
1587
|
disabled: T,
|
|
1574
1588
|
tabIndex: a ? -1 : void 0,
|
|
1575
1589
|
className: K({ part: "iconButton" }),
|
|
1576
|
-
onClick:
|
|
1577
|
-
children: /* @__PURE__ */ t(
|
|
1590
|
+
onClick: ue(e, i),
|
|
1591
|
+
children: /* @__PURE__ */ t(In, {})
|
|
1578
1592
|
})]
|
|
1579
1593
|
}, e);
|
|
1580
1594
|
}),
|
|
1581
|
-
|
|
1595
|
+
R > 0 && /* @__PURE__ */ t("button", {
|
|
1582
1596
|
type: "button",
|
|
1583
1597
|
disabled: T,
|
|
1584
1598
|
className: K({ part: "count" }),
|
|
1585
|
-
onClick:
|
|
1586
|
-
children: c.replaceAll("{count}", String(
|
|
1599
|
+
onClick: V,
|
|
1600
|
+
children: c.replaceAll("{count}", String(R))
|
|
1587
1601
|
}),
|
|
1588
|
-
|
|
1602
|
+
I.length > 0 && /* @__PURE__ */ t("span", {
|
|
1589
1603
|
"aria-hidden": !0,
|
|
1590
1604
|
"data-multiselect-count": !0,
|
|
1591
1605
|
className: K({ part: "countMeasure" }),
|
|
1592
|
-
children: c.replaceAll("{count}", String(
|
|
1606
|
+
children: c.replaceAll("{count}", String(I.length))
|
|
1593
1607
|
})
|
|
1594
1608
|
]
|
|
1595
1609
|
})
|
|
1596
1610
|
}),
|
|
1597
|
-
|
|
1611
|
+
I.length > 0 ? /* @__PURE__ */ t("button", {
|
|
1598
1612
|
type: "button",
|
|
1599
1613
|
"aria-label": s,
|
|
1600
1614
|
disabled: T,
|
|
1601
1615
|
className: K({ part: "iconButton" }),
|
|
1602
|
-
onClick:
|
|
1603
|
-
children: /* @__PURE__ */ t(
|
|
1616
|
+
onClick: B,
|
|
1617
|
+
children: /* @__PURE__ */ t(In, {})
|
|
1604
1618
|
}) : /* @__PURE__ */ t("span", {
|
|
1605
1619
|
"aria-hidden": !0,
|
|
1606
1620
|
className: "size-6 shrink-0"
|
|
@@ -1609,17 +1623,17 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
1609
1623
|
"aria-hidden": !0,
|
|
1610
1624
|
className: "size-6 shrink-0"
|
|
1611
1625
|
}),
|
|
1612
|
-
|
|
1613
|
-
ref: q(
|
|
1626
|
+
P && /* @__PURE__ */ t("div", {
|
|
1627
|
+
ref: q(j),
|
|
1614
1628
|
id: S,
|
|
1615
1629
|
role: "group",
|
|
1616
1630
|
"aria-labelledby": b,
|
|
1617
|
-
"data-placement":
|
|
1631
|
+
"data-placement": D,
|
|
1618
1632
|
className: K({ part: "surface" }),
|
|
1619
|
-
onMouseDown:
|
|
1620
|
-
children: /* @__PURE__ */ t(
|
|
1633
|
+
onMouseDown: me,
|
|
1634
|
+
children: /* @__PURE__ */ t(En, {
|
|
1621
1635
|
value: {
|
|
1622
|
-
selected:
|
|
1636
|
+
selected: F,
|
|
1623
1637
|
disabled: T,
|
|
1624
1638
|
toggle: le
|
|
1625
1639
|
},
|
|
@@ -1634,15 +1648,15 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
1634
1648
|
})
|
|
1635
1649
|
]
|
|
1636
1650
|
});
|
|
1637
|
-
},
|
|
1638
|
-
let { selected: a, disabled: o, toggle: s } =
|
|
1651
|
+
}, Rn = ({ value: e, children: r, testId: i }) => {
|
|
1652
|
+
let { selected: a, disabled: o, toggle: s } = Dn("Option"), c = a.has(e);
|
|
1639
1653
|
return /* @__PURE__ */ n("button", {
|
|
1640
1654
|
type: "button",
|
|
1641
1655
|
role: "checkbox",
|
|
1642
1656
|
"aria-checked": c,
|
|
1643
1657
|
disabled: o,
|
|
1644
1658
|
"data-testid": i,
|
|
1645
|
-
className:
|
|
1659
|
+
className: wn(),
|
|
1646
1660
|
onClick: () => s(e),
|
|
1647
1661
|
children: [/* @__PURE__ */ t("span", {
|
|
1648
1662
|
className: "flex size-[var(--choice-marker-size)] shrink-0 items-center justify-center border border-solid border-control-border group-aria-checked/option:border-foreground",
|
|
@@ -1665,10 +1679,10 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
1665
1679
|
children: r
|
|
1666
1680
|
})]
|
|
1667
1681
|
});
|
|
1668
|
-
},
|
|
1669
|
-
Root:
|
|
1670
|
-
Option:
|
|
1671
|
-
},
|
|
1682
|
+
}, zn = {
|
|
1683
|
+
Root: Ln,
|
|
1684
|
+
Option: Rn
|
|
1685
|
+
}, Bn = b("block w-full rounded-[var(--radius-control)] border border-solid border-control-border bg-transparent px-3 py-2 font-control text-body text-foreground transition-colors duration-[var(--motion-duration-color)] outline-focus-ring outline-offset-[var(--focus-ring-offset)] focus-visible:outline focus-visible:outline-[length:var(--focus-ring-width)] [&:user-invalid]:border-error aria-[invalid=true]:border-error disabled:cursor-not-allowed disabled:border-disabled disabled:text-muted"), Vn = ({ label: e, name: r, required: i, optionalLabel: a, hint: o, invalid: s, errorMessage: c, disabled: d, placeholder: f, defaultValue: m, onInput$: h, reset$: g, testId: _ }) => {
|
|
1672
1686
|
let v = u(), y = `${v}-control`, b = `${v}-hint`, x = `${v}-error`, S = [o ? b : void 0, s ? x : void 0].filter(Boolean).join(" ") || void 0, C = p(null);
|
|
1673
1687
|
return l(() => {
|
|
1674
1688
|
let e = g?.subscribe(() => {
|
|
@@ -1689,7 +1703,7 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
1689
1703
|
name: r,
|
|
1690
1704
|
type: "text",
|
|
1691
1705
|
inputMode: "decimal",
|
|
1692
|
-
className:
|
|
1706
|
+
className: Bn(),
|
|
1693
1707
|
required: i,
|
|
1694
1708
|
disabled: d,
|
|
1695
1709
|
defaultValue: m,
|
|
@@ -1715,7 +1729,7 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
1715
1729
|
})
|
|
1716
1730
|
]
|
|
1717
1731
|
});
|
|
1718
|
-
},
|
|
1732
|
+
}, Hn = b([
|
|
1719
1733
|
"flex flex-col gap-[var(--space-stack)]",
|
|
1720
1734
|
"[&>label]:font-secondary [&>label]:font-medium [&>label]:text-body [&>label]:text-foreground",
|
|
1721
1735
|
"[&>span]:font-secondary [&>span]:text-muted [&>span]:text-small",
|
|
@@ -1724,11 +1738,11 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
1724
1738
|
"[&>select]:font-control [&>select]:text-body [&>select]:text-foreground [&>select]:transition-colors [&>select]:duration-[var(--motion-duration-color)]",
|
|
1725
1739
|
"[&>select]:outline-focus-ring [&>select]:outline-offset-[var(--focus-ring-offset)] [&>select]:focus-visible:outline [&>select]:focus-visible:outline-[length:var(--focus-ring-width)]",
|
|
1726
1740
|
"[&>select:user-invalid]:border-error [&>select]:aria-[invalid=true]:border-error [&>select]:disabled:cursor-not-allowed [&>select]:disabled:border-disabled [&>select]:disabled:text-muted"
|
|
1727
|
-
].join(" ")),
|
|
1741
|
+
].join(" ")), Un = {
|
|
1728
1742
|
Root: ({ label: e, name: r, required: i, optionalLabel: a, disabled: o, invalid: s, hint: c, errorMessage: l, testId: d, defaultValue: f, onChange$: p, placeholder: m, children: h }) => {
|
|
1729
1743
|
let g = u(), _ = `${g}-control`, v = `${g}-hint`, y = `${g}-error`, b = [c ? v : void 0, s && l ? y : void 0].filter(Boolean).join(" ") || void 0;
|
|
1730
1744
|
return /* @__PURE__ */ n("div", {
|
|
1731
|
-
className:
|
|
1745
|
+
className: Hn(),
|
|
1732
1746
|
children: [
|
|
1733
1747
|
/* @__PURE__ */ t("label", {
|
|
1734
1748
|
htmlFor: _,
|
|
@@ -1771,7 +1785,7 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
1771
1785
|
constructor(e) {
|
|
1772
1786
|
super(`Slider configuration: ${e}`), this.name = "SliderConfigurationError";
|
|
1773
1787
|
}
|
|
1774
|
-
},
|
|
1788
|
+
}, Wn = b([
|
|
1775
1789
|
"block h-[var(--slider-thumb-size)] w-full cursor-pointer appearance-none bg-transparent",
|
|
1776
1790
|
"disabled:cursor-not-allowed",
|
|
1777
1791
|
"outline-focus-ring outline-offset-[var(--focus-ring-offset)] focus-visible:outline focus-visible:outline-[length:var(--focus-ring-width)]",
|
|
@@ -1782,46 +1796,55 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
1782
1796
|
"[&::-moz-range-track]:h-[var(--slider-track-thickness)] [&::-moz-range-track]:rounded-[var(--radius-control)] [&::-moz-range-track]:bg-control-border",
|
|
1783
1797
|
"[&::-moz-range-thumb]:size-[var(--slider-thumb-size)] [&::-moz-range-thumb]:rounded-[var(--radius-control)] [&::-moz-range-thumb]:border-none [&::-moz-range-thumb]:bg-foreground",
|
|
1784
1798
|
"[&:disabled::-moz-range-track]:bg-disabled [&:disabled::-moz-range-thumb]:bg-disabled"
|
|
1785
|
-
].join(" ")),
|
|
1799
|
+
].join(" ")), Gn = (e) => {
|
|
1786
1800
|
for (let [t, n] of Object.entries(e)) if (!Number.isFinite(n)) throw new J(`\`${t}\` must be a finite number, got ${n}`);
|
|
1787
1801
|
if (e.min >= e.max) throw new J(`\`min\` (${e.min}) must be below \`max\` (${e.max})`);
|
|
1788
1802
|
if (e.step <= 0) throw new J(`\`step\` (${e.step}) must be positive`);
|
|
1789
|
-
},
|
|
1790
|
-
let
|
|
1791
|
-
|
|
1803
|
+
}, Kn = ({ min: e, max: r, step: i = 1, value: a, onInput$: o, label: s, visibleValue: c, valueText: l, disabled: d, testId: f }) => {
|
|
1804
|
+
let p = `${u()}-control`;
|
|
1805
|
+
Gn({
|
|
1792
1806
|
min: e,
|
|
1793
1807
|
max: r,
|
|
1794
1808
|
step: i,
|
|
1795
1809
|
value: a
|
|
1796
|
-
})
|
|
1810
|
+
});
|
|
1811
|
+
let m = /* @__PURE__ */ t("label", {
|
|
1812
|
+
htmlFor: p,
|
|
1813
|
+
className: "font-secondary font-medium text-body text-foreground",
|
|
1814
|
+
children: s
|
|
1815
|
+
});
|
|
1816
|
+
return /* @__PURE__ */ n("div", {
|
|
1797
1817
|
className: "flex flex-col gap-[var(--space-stack)]",
|
|
1798
|
-
children: [/* @__PURE__ */
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1818
|
+
children: [c === void 0 ? m : /* @__PURE__ */ n("div", {
|
|
1819
|
+
className: "flex flex-wrap items-baseline justify-between gap-x-[var(--space-stack)]",
|
|
1820
|
+
children: [m, /* @__PURE__ */ t("span", {
|
|
1821
|
+
"aria-hidden": !0,
|
|
1822
|
+
className: "min-w-0 wrap-anywhere font-secondary text-body text-foreground",
|
|
1823
|
+
children: c
|
|
1824
|
+
})]
|
|
1802
1825
|
}), /* @__PURE__ */ t("input", {
|
|
1803
|
-
id:
|
|
1826
|
+
id: p,
|
|
1804
1827
|
type: "range",
|
|
1805
|
-
className:
|
|
1828
|
+
className: Wn(),
|
|
1806
1829
|
min: e,
|
|
1807
1830
|
max: r,
|
|
1808
1831
|
step: i,
|
|
1809
1832
|
value: a,
|
|
1810
|
-
disabled:
|
|
1811
|
-
"aria-valuetext": c,
|
|
1812
|
-
"data-testid":
|
|
1833
|
+
disabled: d,
|
|
1834
|
+
"aria-valuetext": l ?? c,
|
|
1835
|
+
"data-testid": f,
|
|
1813
1836
|
onChange: (e) => o.next(e.currentTarget.valueAsNumber)
|
|
1814
1837
|
})]
|
|
1815
1838
|
});
|
|
1816
|
-
},
|
|
1839
|
+
}, qn = class extends Error {
|
|
1817
1840
|
constructor(e) {
|
|
1818
1841
|
super(`Stepper.${e} must be composed inside Stepper.Root`), this.name = "StepperCompositionError";
|
|
1819
1842
|
}
|
|
1820
|
-
},
|
|
1843
|
+
}, Jn = b("flex h-full min-h-0 min-w-0 flex-col gap-[var(--space-stack)]"), Yn = b([
|
|
1821
1844
|
"flex flex-row shrink-0 min-w-0 overflow-x-auto",
|
|
1822
1845
|
"p-[calc(var(--focus-ring-width)+var(--focus-ring-offset))]",
|
|
1823
1846
|
"scroll-p-[calc(var(--focus-ring-width)+var(--focus-ring-offset))]"
|
|
1824
|
-
].join(" ")),
|
|
1847
|
+
].join(" ")), Xn = b([
|
|
1825
1848
|
"relative isolate flex flex-1 flex-col items-center gap-[var(--space-stack)] text-center",
|
|
1826
1849
|
"font-secondary text-label text-foreground cursor-pointer select-none",
|
|
1827
1850
|
"px-[var(--step-inset-inline)] py-[var(--step-inset-block)]",
|
|
@@ -1834,28 +1857,28 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
1834
1857
|
"forced-colors:after:border-[CanvasText] forced-colors:aria-selected:border-[Highlight]",
|
|
1835
1858
|
"forced-colors:border-b-0 forced-colors:aria-selected:border-b-[length:var(--step-selection-thickness)]",
|
|
1836
1859
|
"forced-colors:[&>[data-marker]]:bg-[Canvas] forced-colors:[&>[data-marker]]:text-[CanvasText] forced-colors:[&>[data-marker]]:border-[CanvasText]"
|
|
1837
|
-
]),
|
|
1838
|
-
let t = c(
|
|
1839
|
-
if (t === void 0) throw new
|
|
1860
|
+
]), Zn = b("min-h-0 min-w-0 flex-auto outline-focus-ring outline-offset-[var(--focus-ring-offset)] focus-visible:outline focus-visible:outline-[length:var(--focus-ring-width)]"), Qn = a(void 0), $n = (e) => r.toArray(e).flatMap((e) => o(e) && e.type === i ? $n(e.props.children) : [e]), er = a(void 0), tr = (e) => {
|
|
1861
|
+
let t = c(er);
|
|
1862
|
+
if (t === void 0) throw new qn(e);
|
|
1840
1863
|
return t;
|
|
1841
|
-
},
|
|
1864
|
+
}, nr = (e) => e.split("").map((e) => e.charCodeAt(0).toString(16).padStart(4, "0")).join(""), rr = (e) => {
|
|
1842
1865
|
e.currentTarget.scrollIntoView({
|
|
1843
1866
|
block: "nearest",
|
|
1844
1867
|
inline: "nearest"
|
|
1845
1868
|
});
|
|
1846
|
-
}, Y = (e, t) => `${e}tab-${
|
|
1869
|
+
}, Y = (e, t) => `${e}tab-${nr(t)}`, ir = (e, t) => `${e}panel-${nr(t)}`, ar = (e, t) => {
|
|
1847
1870
|
let n = e.closest("[role=\"tablist\"]");
|
|
1848
1871
|
if (n === null) return;
|
|
1849
1872
|
let r = Array.from(n.querySelectorAll(":scope > [role=\"tab\"]"));
|
|
1850
1873
|
return r[(r.indexOf(e) + t + r.length) % r.length];
|
|
1851
|
-
},
|
|
1874
|
+
}, or = {
|
|
1852
1875
|
Root: ({ active$: e, onSelect$: n, label: r, children: i, testId: a }) => {
|
|
1853
1876
|
let o = u(), [s, c] = m();
|
|
1854
1877
|
return l(() => {
|
|
1855
1878
|
c(void 0);
|
|
1856
1879
|
let t = e.subscribe(c);
|
|
1857
1880
|
return () => t.unsubscribe();
|
|
1858
|
-
}, [e]), /* @__PURE__ */ t(
|
|
1881
|
+
}, [e]), /* @__PURE__ */ t(er.Provider, {
|
|
1859
1882
|
value: {
|
|
1860
1883
|
active: s,
|
|
1861
1884
|
onSelect$: n,
|
|
@@ -1863,52 +1886,53 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
1863
1886
|
baseId: o
|
|
1864
1887
|
},
|
|
1865
1888
|
children: /* @__PURE__ */ t("div", {
|
|
1866
|
-
className:
|
|
1889
|
+
className: Jn(),
|
|
1890
|
+
"data-height-passing": !0,
|
|
1867
1891
|
"data-testid": a,
|
|
1868
1892
|
children: i
|
|
1869
1893
|
})
|
|
1870
1894
|
});
|
|
1871
1895
|
},
|
|
1872
1896
|
List: ({ children: e, testId: n }) => {
|
|
1873
|
-
let { label: r } =
|
|
1897
|
+
let { label: r } = tr("List");
|
|
1874
1898
|
return /* @__PURE__ */ t("div", {
|
|
1875
1899
|
role: "tablist",
|
|
1876
1900
|
"aria-label": r,
|
|
1877
|
-
className:
|
|
1901
|
+
className: Yn(),
|
|
1878
1902
|
"data-testid": n,
|
|
1879
|
-
children:
|
|
1903
|
+
children: $n(e).map((e, n) => /* @__PURE__ */ t(Qn.Provider, {
|
|
1880
1904
|
value: n + 1,
|
|
1881
1905
|
children: e
|
|
1882
1906
|
}, o(e) ? e.props.value : n))
|
|
1883
1907
|
});
|
|
1884
1908
|
},
|
|
1885
1909
|
Step: ({ value: e, label: r, status: i, valueText: a, statusContent: o, testId: s }) => {
|
|
1886
|
-
let { active: l, onSelect$: u, baseId: d } =
|
|
1887
|
-
if (f === void 0) throw new
|
|
1910
|
+
let { active: l, onSelect$: u, baseId: d } = tr("Step"), f = c(Qn);
|
|
1911
|
+
if (f === void 0) throw new qn("Step (inside List)");
|
|
1888
1912
|
let p = l === e;
|
|
1889
1913
|
return /* @__PURE__ */ n("button", {
|
|
1890
1914
|
type: "button",
|
|
1891
1915
|
role: "tab",
|
|
1892
1916
|
id: Y(d, e),
|
|
1893
1917
|
"aria-selected": p,
|
|
1894
|
-
"aria-controls":
|
|
1918
|
+
"aria-controls": ir(d, e),
|
|
1895
1919
|
"aria-labelledby": `${Y(d, e)}-label ${Y(d, e)}-value`,
|
|
1896
1920
|
"aria-describedby": o === void 0 ? void 0 : `${Y(d, e)}-status`,
|
|
1897
1921
|
tabIndex: p ? 0 : -1,
|
|
1898
1922
|
"data-value": e,
|
|
1899
1923
|
"data-testid": s,
|
|
1900
|
-
className:
|
|
1924
|
+
className: Xn(),
|
|
1901
1925
|
onClick: () => u.next(e),
|
|
1902
1926
|
onKeyDown: (e) => {
|
|
1903
1927
|
if (e.key !== "ArrowLeft" && e.key !== "ArrowRight") return;
|
|
1904
1928
|
e.preventDefault();
|
|
1905
|
-
let t =
|
|
1929
|
+
let t = ar(e.currentTarget, e.key === "ArrowRight" ? 1 : -1);
|
|
1906
1930
|
if (t === void 0) return;
|
|
1907
1931
|
t.focus();
|
|
1908
1932
|
let n = t.dataset.value;
|
|
1909
1933
|
n !== void 0 && u.next(n);
|
|
1910
1934
|
},
|
|
1911
|
-
onFocus:
|
|
1935
|
+
onFocus: rr,
|
|
1912
1936
|
children: [
|
|
1913
1937
|
/* @__PURE__ */ t("span", {
|
|
1914
1938
|
"data-marker": !0,
|
|
@@ -1933,19 +1957,20 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
1933
1957
|
});
|
|
1934
1958
|
},
|
|
1935
1959
|
Panel: ({ value: e, children: n, testId: r }) => {
|
|
1936
|
-
let { active: i, baseId: a } =
|
|
1960
|
+
let { active: i, baseId: a } = tr("Panel"), o = i === e;
|
|
1937
1961
|
return /* @__PURE__ */ t("div", {
|
|
1938
1962
|
role: "tabpanel",
|
|
1939
|
-
id:
|
|
1963
|
+
id: ir(a, e),
|
|
1940
1964
|
"aria-labelledby": Y(a, e),
|
|
1941
1965
|
hidden: !o,
|
|
1942
1966
|
tabIndex: o ? 0 : void 0,
|
|
1943
|
-
className:
|
|
1967
|
+
className: Zn(),
|
|
1968
|
+
"data-height-passing": !0,
|
|
1944
1969
|
"data-testid": r,
|
|
1945
1970
|
children: o ? n : void 0
|
|
1946
1971
|
});
|
|
1947
1972
|
}
|
|
1948
|
-
},
|
|
1973
|
+
}, sr = b([
|
|
1949
1974
|
"inline-flex max-w-full items-center gap-[var(--space-stack)] rounded-[var(--radius-control)] bg-transparent p-0 text-start cursor-pointer",
|
|
1950
1975
|
"font-secondary font-medium text-body text-foreground disabled:text-muted disabled:cursor-not-allowed",
|
|
1951
1976
|
"outline-focus-ring outline-offset-[var(--focus-ring-offset)] focus-visible:outline focus-visible:outline-[length:var(--focus-ring-width)]",
|
|
@@ -1957,7 +1982,7 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
1957
1982
|
"forced-colors:[&>[data-track]]:[forced-color-adjust:none] forced-colors:[&>[data-track]]:border-[ButtonText] forced-colors:[&>[data-track]]:bg-[Canvas] forced-colors:[&>[data-track]::before]:bg-[ButtonText]",
|
|
1958
1983
|
"forced-colors:disabled:text-[GrayText] forced-colors:disabled:[&>[data-track]]:border-[GrayText] forced-colors:disabled:[&>[data-track]::before]:bg-[GrayText]",
|
|
1959
1984
|
"[&>[data-label]]:min-w-0 [&>[data-label]]:wrap-anywhere"
|
|
1960
|
-
]),
|
|
1985
|
+
]), cr = ({ label: e, checked$: r, onChange$: i, disabled: a, testId: o }) => {
|
|
1961
1986
|
let [s, c] = m(!1);
|
|
1962
1987
|
return l(() => {
|
|
1963
1988
|
c(!1);
|
|
@@ -1969,7 +1994,7 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
1969
1994
|
"aria-checked": s,
|
|
1970
1995
|
disabled: a,
|
|
1971
1996
|
"data-testid": o,
|
|
1972
|
-
className:
|
|
1997
|
+
className: sr(),
|
|
1973
1998
|
onClick: () => i.next(!s),
|
|
1974
1999
|
children: [/* @__PURE__ */ t("span", {
|
|
1975
2000
|
"data-track": !0,
|
|
@@ -1979,17 +2004,17 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
1979
2004
|
children: e
|
|
1980
2005
|
})]
|
|
1981
2006
|
});
|
|
1982
|
-
},
|
|
2007
|
+
}, lr = class extends Error {
|
|
1983
2008
|
constructor(e) {
|
|
1984
2009
|
super(`Tabs.${e} must be composed inside Tabs.Root`), this.name = "TabsCompositionError";
|
|
1985
2010
|
}
|
|
1986
|
-
},
|
|
2011
|
+
}, ur = b("", {
|
|
1987
2012
|
variants: { fill: {
|
|
1988
2013
|
true: "flex h-full min-h-0 min-w-0 flex-col",
|
|
1989
2014
|
false: ""
|
|
1990
2015
|
} },
|
|
1991
2016
|
defaultVariants: { fill: !1 }
|
|
1992
|
-
}),
|
|
2017
|
+
}), dr = b([
|
|
1993
2018
|
"flex flex-row overflow-x-auto",
|
|
1994
2019
|
"p-[calc(var(--focus-ring-width)+var(--focus-ring-offset))]",
|
|
1995
2020
|
"m-[calc(-1*(var(--focus-ring-width)+var(--focus-ring-offset)))]",
|
|
@@ -1997,34 +2022,34 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
1997
2022
|
].join(" "), { variants: { fill: {
|
|
1998
2023
|
true: "shrink-0",
|
|
1999
2024
|
false: ""
|
|
2000
|
-
} } }),
|
|
2025
|
+
} } }), fr = b([
|
|
2001
2026
|
"font-secondary text-label tracking-label",
|
|
2002
2027
|
"text-muted hover:text-foreground aria-selected:text-foreground",
|
|
2003
2028
|
"border-b-[length:var(--tab-marker-thickness)] border-solid border-transparent aria-selected:border-foreground",
|
|
2004
2029
|
"cursor-pointer select-none px-[var(--tab-inset-inline)] py-[var(--tab-inset-block)]",
|
|
2005
2030
|
"transition-colors duration-[var(--motion-duration-color)]",
|
|
2006
2031
|
"outline-focus-ring outline-offset-[var(--focus-ring-offset)] focus-visible:outline focus-visible:outline-[length:var(--focus-ring-width)]"
|
|
2007
|
-
].join(" ")),
|
|
2032
|
+
].join(" ")), pr = b("outline-focus-ring outline-offset-[var(--focus-ring-offset)] focus-visible:outline focus-visible:outline-[length:var(--focus-ring-width)]", { variants: { fill: {
|
|
2008
2033
|
true: "min-h-0 min-w-0 flex-auto",
|
|
2009
2034
|
false: ""
|
|
2010
|
-
} } }),
|
|
2011
|
-
let t = c(
|
|
2012
|
-
if (t === void 0) throw new
|
|
2035
|
+
} } }), mr = a(void 0), hr = (e) => {
|
|
2036
|
+
let t = c(mr);
|
|
2037
|
+
if (t === void 0) throw new lr(e);
|
|
2013
2038
|
return t;
|
|
2014
|
-
},
|
|
2039
|
+
}, gr = (e) => e.split("").map((e) => e.charCodeAt(0).toString(16).padStart(4, "0")).join(""), _r = (e) => {
|
|
2015
2040
|
e.currentTarget.scrollIntoView({
|
|
2016
2041
|
block: "nearest",
|
|
2017
2042
|
inline: "nearest"
|
|
2018
2043
|
});
|
|
2019
|
-
},
|
|
2044
|
+
}, vr = (e, t) => `${e}tab-${gr(t)}`, yr = (e, t) => `${e}panel-${gr(t)}`, br = (e, t) => {
|
|
2020
2045
|
let n = e.closest("[role=\"tablist\"]");
|
|
2021
2046
|
if (n === null) return;
|
|
2022
2047
|
let r = Array.from(n.querySelectorAll(":scope > [role=\"tab\"]"));
|
|
2023
2048
|
return r[(r.indexOf(e) + t + r.length) % r.length];
|
|
2024
|
-
},
|
|
2049
|
+
}, xr = {
|
|
2025
2050
|
Root: ({ active: e, onSelect$: n, label: r, fill: i, children: a, testId: o }) => {
|
|
2026
2051
|
let s = u();
|
|
2027
|
-
return /* @__PURE__ */ t(
|
|
2052
|
+
return /* @__PURE__ */ t(mr.Provider, {
|
|
2028
2053
|
value: {
|
|
2029
2054
|
active: e,
|
|
2030
2055
|
onSelect$: n,
|
|
@@ -2033,62 +2058,64 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
2033
2058
|
fill: i === !0
|
|
2034
2059
|
},
|
|
2035
2060
|
children: /* @__PURE__ */ t("div", {
|
|
2036
|
-
className:
|
|
2061
|
+
className: ur({ fill: i }),
|
|
2062
|
+
"data-height-passing": i || void 0,
|
|
2037
2063
|
"data-testid": o,
|
|
2038
2064
|
children: a
|
|
2039
2065
|
})
|
|
2040
2066
|
});
|
|
2041
2067
|
},
|
|
2042
2068
|
List: ({ children: e, testId: n }) => {
|
|
2043
|
-
let { label: r, fill: i } =
|
|
2069
|
+
let { label: r, fill: i } = hr("List");
|
|
2044
2070
|
return /* @__PURE__ */ t("div", {
|
|
2045
2071
|
role: "tablist",
|
|
2046
2072
|
"aria-label": r,
|
|
2047
|
-
className:
|
|
2073
|
+
className: dr({ fill: i }),
|
|
2048
2074
|
"data-testid": n,
|
|
2049
2075
|
children: e
|
|
2050
2076
|
});
|
|
2051
2077
|
},
|
|
2052
2078
|
Tab: ({ value: e, children: n, testId: r }) => {
|
|
2053
|
-
let { active: i, onSelect$: a, baseId: o } =
|
|
2079
|
+
let { active: i, onSelect$: a, baseId: o } = hr("Tab"), s = i === e;
|
|
2054
2080
|
return /* @__PURE__ */ t("button", {
|
|
2055
2081
|
type: "button",
|
|
2056
2082
|
role: "tab",
|
|
2057
|
-
id:
|
|
2083
|
+
id: vr(o, e),
|
|
2058
2084
|
"aria-selected": s,
|
|
2059
|
-
"aria-controls":
|
|
2085
|
+
"aria-controls": yr(o, e),
|
|
2060
2086
|
tabIndex: s ? 0 : -1,
|
|
2061
2087
|
"data-value": e,
|
|
2062
2088
|
"data-testid": r,
|
|
2063
|
-
className:
|
|
2089
|
+
className: fr(),
|
|
2064
2090
|
onClick: () => a.next(e),
|
|
2065
2091
|
onKeyDown: (e) => {
|
|
2066
2092
|
if (e.key !== "ArrowLeft" && e.key !== "ArrowRight") return;
|
|
2067
2093
|
e.preventDefault();
|
|
2068
|
-
let t =
|
|
2094
|
+
let t = br(e.currentTarget, e.key === "ArrowRight" ? 1 : -1);
|
|
2069
2095
|
if (t === void 0) return;
|
|
2070
2096
|
t.focus();
|
|
2071
2097
|
let n = t.dataset.value;
|
|
2072
2098
|
n !== void 0 && a.next(n);
|
|
2073
2099
|
},
|
|
2074
|
-
onFocus:
|
|
2100
|
+
onFocus: _r,
|
|
2075
2101
|
children: n
|
|
2076
2102
|
});
|
|
2077
2103
|
},
|
|
2078
2104
|
Panel: ({ value: e, children: n, testId: r }) => {
|
|
2079
|
-
let { active: i, baseId: a, fill: o } =
|
|
2105
|
+
let { active: i, baseId: a, fill: o } = hr("Panel"), s = i === e;
|
|
2080
2106
|
return /* @__PURE__ */ t("div", {
|
|
2081
2107
|
role: "tabpanel",
|
|
2082
|
-
id:
|
|
2083
|
-
"aria-labelledby":
|
|
2108
|
+
id: yr(a, e),
|
|
2109
|
+
"aria-labelledby": vr(a, e),
|
|
2084
2110
|
hidden: !s,
|
|
2085
2111
|
tabIndex: s ? 0 : void 0,
|
|
2086
|
-
className:
|
|
2112
|
+
className: pr({ fill: o }),
|
|
2113
|
+
"data-height-passing": o || void 0,
|
|
2087
2114
|
"data-testid": r,
|
|
2088
2115
|
children: s ? n : void 0
|
|
2089
2116
|
});
|
|
2090
2117
|
}
|
|
2091
|
-
},
|
|
2118
|
+
}, Sr = b("block min-h-24 w-full rounded-[var(--radius-control)] border border-solid border-control-border bg-transparent px-3 py-2 font-control text-body text-foreground transition-colors duration-[var(--motion-duration-color)] outline-focus-ring outline-offset-[var(--focus-ring-offset)] focus-visible:outline focus-visible:outline-[length:var(--focus-ring-width)] [&:user-invalid]:border-error aria-[invalid=true]:border-error disabled:cursor-not-allowed disabled:border-disabled disabled:text-muted"), Cr = ({ label: e, name: r, required: i, optionalLabel: a, invalid: o, disabled: s, defaultValue: c, placeholder: d, autocomplete: f, hint: m, errorMessage: h, onInput$: g, reset$: _, testId: v }) => {
|
|
2092
2119
|
let y = u(), b = `${y}-control`, x = `${y}-hint`, S = `${y}-error`, C = [m ? x : void 0, o ? S : void 0].filter(Boolean).join(" ") || void 0, w = p(null);
|
|
2093
2120
|
return l(() => {
|
|
2094
2121
|
let e = _?.subscribe(() => {
|
|
@@ -2107,7 +2134,7 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
2107
2134
|
ref: w,
|
|
2108
2135
|
id: b,
|
|
2109
2136
|
name: r,
|
|
2110
|
-
className:
|
|
2137
|
+
className: Sr(),
|
|
2111
2138
|
required: i,
|
|
2112
2139
|
disabled: s,
|
|
2113
2140
|
defaultValue: c,
|
|
@@ -2134,49 +2161,49 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
2134
2161
|
})
|
|
2135
2162
|
]
|
|
2136
2163
|
});
|
|
2137
|
-
},
|
|
2164
|
+
}, wr = b([
|
|
2138
2165
|
"flex flex-col items-center",
|
|
2139
2166
|
"min-h-[var(--cover-height)]",
|
|
2140
2167
|
"px-[var(--gutter)] py-[var(--space-region)]"
|
|
2141
|
-
].join(" ")),
|
|
2168
|
+
].join(" ")), Tr = "my-auto max-w-full", Er = ({ children: e, foot: r, testId: i }) => {
|
|
2142
2169
|
let a = r != null && typeof r != "boolean";
|
|
2143
2170
|
return /* @__PURE__ */ n("div", {
|
|
2144
|
-
className:
|
|
2171
|
+
className: wr(),
|
|
2145
2172
|
"data-testid": i,
|
|
2146
2173
|
children: [/* @__PURE__ */ t("div", {
|
|
2147
|
-
className:
|
|
2174
|
+
className: Tr,
|
|
2148
2175
|
children: e
|
|
2149
2176
|
}), a && /* @__PURE__ */ t("div", { children: r })]
|
|
2150
2177
|
});
|
|
2151
|
-
},
|
|
2178
|
+
}, Dr = class extends Error {
|
|
2152
2179
|
constructor(e) {
|
|
2153
2180
|
super(`Dialog.${e} must be composed inside Dialog.Root`), this.name = "DialogCompositionError";
|
|
2154
2181
|
}
|
|
2155
|
-
},
|
|
2182
|
+
}, Or = class extends Error {
|
|
2156
2183
|
constructor() {
|
|
2157
2184
|
super("A Dialog takes exactly one accessible naming source: a visible Dialog.Title or ariaLabel on Dialog.Root, never both"), this.name = "DialogNamingError";
|
|
2158
2185
|
}
|
|
2159
|
-
}, X = (e) => Number.parseFloat(e) || 0,
|
|
2186
|
+
}, X = (e) => Number.parseFloat(e) || 0, kr = (e) => X(e.paddingTop) + X(e.paddingBottom) + X(e.borderTopWidth) + X(e.borderBottomWidth), Ar = (e) => {
|
|
2160
2187
|
let t = getComputedStyle(e);
|
|
2161
2188
|
return X(t.marginTop) + X(t.marginBottom);
|
|
2162
|
-
},
|
|
2189
|
+
}, jr = (e) => {
|
|
2163
2190
|
let t = getComputedStyle(e);
|
|
2164
2191
|
if (t.display === "none" || t.position === "absolute") return 0;
|
|
2165
2192
|
if (e.matches("table")) return Array.from(e.children).filter((e) => e.matches("caption, thead")).reduce((e, t) => e + t.getBoundingClientRect().height, 0) + Math.max(0, ...Array.from(e.querySelectorAll("tbody>tr")).map((e) => e.getBoundingClientRect().height));
|
|
2166
2193
|
if (e.querySelector("table")) {
|
|
2167
2194
|
let n = Array.from(e.children);
|
|
2168
|
-
return
|
|
2195
|
+
return kr(t) + Math.max(0, n.length - 1) * X(t.rowGap) + n.reduce((e, t) => e + Ar(t) + (t.matches("table") || t.querySelector("table") ? jr(t) : t.getBoundingClientRect().height), 0);
|
|
2169
2196
|
}
|
|
2170
2197
|
let n = Math.max(X(t.lineHeight) || X(t.fontSize), ...Array.from(e.querySelectorAll("button, input, select, textarea, [role=\"button\"]")).map((e) => e.getBoundingClientRect().height)), r = X(t.getPropertyValue("--focus-ring-width")) + X(t.getPropertyValue("--focus-ring-offset"));
|
|
2171
|
-
return
|
|
2172
|
-
},
|
|
2198
|
+
return kr(t) + n + 2 * r;
|
|
2199
|
+
}, Mr = (e) => {
|
|
2173
2200
|
let [t, n] = m(!1);
|
|
2174
2201
|
return d(() => {
|
|
2175
2202
|
let t = e.current;
|
|
2176
2203
|
if (!t) return;
|
|
2177
2204
|
let r = () => {
|
|
2178
2205
|
if (!t.open) return;
|
|
2179
|
-
let e = getComputedStyle(t), r = e.maxHeight === "none" ? X(e.height) : X(e.maxHeight), i = Array.from(t.children).reduce((e, t) => e +
|
|
2206
|
+
let e = getComputedStyle(t), r = e.maxHeight === "none" ? X(e.height) : X(e.maxHeight), i = Array.from(t.children).reduce((e, t) => e + Ar(t) + (t.getAttribute("data-dialog-member") === "content" ? jr(t) : t.getBoundingClientRect().height), kr(e));
|
|
2180
2207
|
n(r < i);
|
|
2181
2208
|
}, i = typeof ResizeObserver > "u" ? void 0 : new ResizeObserver(r), a = () => {
|
|
2182
2209
|
i?.disconnect(), i?.observe(t);
|
|
@@ -2201,23 +2228,23 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
2201
2228
|
inline: "nearest"
|
|
2202
2229
|
});
|
|
2203
2230
|
}, [e, t]), t;
|
|
2204
|
-
},
|
|
2205
|
-
let t = e.ownerDocument.documentElement, n =
|
|
2231
|
+
}, Nr = /* @__PURE__ */ new WeakMap(), Pr = (e) => {
|
|
2232
|
+
let t = e.ownerDocument.documentElement, n = Nr.get(t);
|
|
2206
2233
|
n === void 0 && (n = {
|
|
2207
2234
|
overflow: t.style.getPropertyValue("overflow"),
|
|
2208
2235
|
priority: t.style.getPropertyPriority("overflow"),
|
|
2209
2236
|
dialogs: /* @__PURE__ */ new Set()
|
|
2210
|
-
},
|
|
2237
|
+
}, Nr.set(t, n), t.style.setProperty("overflow", "hidden"));
|
|
2211
2238
|
let r = n;
|
|
2212
2239
|
return r.dialogs.add(e), () => {
|
|
2213
|
-
r.dialogs.delete(e), r.dialogs.size === 0 && (t.style.setProperty("overflow", r.overflow, r.priority),
|
|
2240
|
+
r.dialogs.delete(e), r.dialogs.size === 0 && (t.style.setProperty("overflow", r.overflow, r.priority), Nr.delete(t));
|
|
2214
2241
|
};
|
|
2215
|
-
},
|
|
2242
|
+
}, Fr = (e) => {
|
|
2216
2243
|
d(() => {
|
|
2217
2244
|
let t = e.current;
|
|
2218
2245
|
if (!t) return;
|
|
2219
2246
|
let n, r = () => {
|
|
2220
|
-
t.open && n === void 0 ? n =
|
|
2247
|
+
t.open && n === void 0 ? n = Pr(t) : !t.open && n !== void 0 && (n(), n = void 0);
|
|
2221
2248
|
};
|
|
2222
2249
|
r();
|
|
2223
2250
|
let i = new MutationObserver(r);
|
|
@@ -2228,7 +2255,7 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
2228
2255
|
i.disconnect(), n?.();
|
|
2229
2256
|
};
|
|
2230
2257
|
}, [e]);
|
|
2231
|
-
},
|
|
2258
|
+
}, Ir = b([
|
|
2232
2259
|
"open:flex open:flex-col m-auto p-0 overflow-hidden",
|
|
2233
2260
|
"[&[data-dialog-unusable]]:overflow-auto [&[data-dialog-unusable]]:[--_scroll-released:1]",
|
|
2234
2261
|
"[&[data-dialog-unusable]]:scroll-p-[calc(var(--focus-ring-width)+var(--focus-ring-offset))]",
|
|
@@ -2248,7 +2275,7 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
2248
2275
|
content: ["w-[32rem] max-w-[calc(100vw-2*var(--gutter))]", "max-h-[calc(100dvh-2*var(--space-region))]"].join(" ")
|
|
2249
2276
|
} },
|
|
2250
2277
|
defaultVariants: { extent: "screen" }
|
|
2251
|
-
}),
|
|
2278
|
+
}), Lr = b(["shrink-0 px-[var(--space-region)] pt-[var(--space-region)] pb-[var(--space-region)]", "[&:has(+[data-dialog-member=description])]:pb-0"].join(" ")), Rr = b(["shrink-0 px-[var(--space-region)] pt-[var(--space-region)] pb-[var(--space-region)]", "[[data-dialog-member=title]+&]:mt-[var(--space-stack)] [[data-dialog-member=title]+&]:pt-0"].join(" ")), zr = b([
|
|
2252
2279
|
"grow shrink min-h-0 min-w-0",
|
|
2253
2280
|
"px-[var(--space-region)] py-[var(--space-region)]",
|
|
2254
2281
|
"[&:not(:first-child)]:border-t [&:not(:first-child)]:border-border"
|
|
@@ -2258,24 +2285,24 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
2258
2285
|
child: "flex flex-col"
|
|
2259
2286
|
} },
|
|
2260
2287
|
defaultVariants: { scrollOwner: "body" }
|
|
2261
|
-
}),
|
|
2288
|
+
}), Br = b([
|
|
2262
2289
|
"flex flex-row flex-wrap items-center justify-end gap-[var(--space-stack)] shrink-0",
|
|
2263
2290
|
"px-[var(--space-region)] pt-[var(--space-region)] pb-[var(--space-region)]",
|
|
2264
2291
|
"[[data-dialog-member=content]+&]:border-t [[data-dialog-member=content]+&]:border-border"
|
|
2265
|
-
].join(" ")),
|
|
2266
|
-
let t = c(
|
|
2267
|
-
if (t === void 0) throw new
|
|
2292
|
+
].join(" ")), Vr = a(void 0), Z = (e) => {
|
|
2293
|
+
let t = c(Vr);
|
|
2294
|
+
if (t === void 0) throw new Dr(e);
|
|
2268
2295
|
return t;
|
|
2269
|
-
},
|
|
2296
|
+
}, Hr = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])", Ur = (e, { presented: t, opener: n }) => {
|
|
2270
2297
|
if (e === void 0 || e.open) return;
|
|
2271
2298
|
let r = document.activeElement;
|
|
2272
|
-
n.current = r instanceof HTMLElement && r !== document.body ? r : void 0, e.showModal(), t.current = !0, e.querySelector(
|
|
2299
|
+
n.current = r instanceof HTMLElement && r !== document.body ? r : void 0, e.showModal(), t.current = !0, e.querySelector(Hr)?.focus();
|
|
2273
2300
|
}, Q = (e, { presented: t }) => {
|
|
2274
2301
|
t.current = !1, e?.open && e.close();
|
|
2275
|
-
},
|
|
2302
|
+
}, Wr = {
|
|
2276
2303
|
Root: ({ children: e, onDismiss$: n, showDialog$: r, extent: i, ariaLabel: a, testId: o }) => {
|
|
2277
|
-
let c = u(), d = p(void 0), f =
|
|
2278
|
-
|
|
2304
|
+
let c = u(), d = p(void 0), f = Mr(d);
|
|
2305
|
+
Fr(d);
|
|
2279
2306
|
let h = p(!1), g = p(void 0), [_] = m(() => ({
|
|
2280
2307
|
presented: h,
|
|
2281
2308
|
opener: g
|
|
@@ -2297,20 +2324,20 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
2297
2324
|
n.next(), r === void 0 ? Q(d.current, _) : r.next(!1);
|
|
2298
2325
|
};
|
|
2299
2326
|
return l(() => {
|
|
2300
|
-
if (r === void 0) return
|
|
2327
|
+
if (r === void 0) return Ur(d.current, _), () => Q(d.current, _);
|
|
2301
2328
|
let e = r.subscribe((e) => {
|
|
2302
|
-
e ?
|
|
2329
|
+
e ? Ur(d.current, _) : Q(d.current, _);
|
|
2303
2330
|
});
|
|
2304
2331
|
return () => {
|
|
2305
2332
|
e.unsubscribe(), Q(d.current, _);
|
|
2306
2333
|
};
|
|
2307
|
-
}, [r, _]), /* @__PURE__ */ t(
|
|
2334
|
+
}, [r, _]), /* @__PURE__ */ t(Vr.Provider, {
|
|
2308
2335
|
value: x,
|
|
2309
2336
|
children: /* @__PURE__ */ t("dialog", {
|
|
2310
2337
|
ref: (e) => {
|
|
2311
2338
|
d.current = e ?? void 0, e?.setAttribute("headingreset", "");
|
|
2312
2339
|
},
|
|
2313
|
-
className:
|
|
2340
|
+
className: Ir({ extent: i }),
|
|
2314
2341
|
"data-dialog-unusable": f || void 0,
|
|
2315
2342
|
"aria-label": a,
|
|
2316
2343
|
"aria-labelledby": a === void 0 && v.title ? x.titleId : void 0,
|
|
@@ -2327,7 +2354,7 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
2327
2354
|
let e = h.current;
|
|
2328
2355
|
h.current = !1;
|
|
2329
2356
|
let t = g.current;
|
|
2330
|
-
g.current = void 0, t?.isConnected && (t.matches(
|
|
2357
|
+
g.current = void 0, t?.isConnected && (t.matches(Hr) || t.hasAttribute("tabindex")) && t.focus(), e && r?.next(!1);
|
|
2331
2358
|
},
|
|
2332
2359
|
"data-testid": o,
|
|
2333
2360
|
children: e
|
|
@@ -2336,10 +2363,10 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
2336
2363
|
},
|
|
2337
2364
|
Title: ({ children: e, testId: n }) => {
|
|
2338
2365
|
let { titleId: r, isLabelled: i, registerNamePart: a } = Z("Title");
|
|
2339
|
-
if (l(() => a("title"), [a]), i) throw new
|
|
2366
|
+
if (l(() => a("title"), [a]), i) throw new Or();
|
|
2340
2367
|
return /* @__PURE__ */ t("div", {
|
|
2341
2368
|
"data-dialog-member": "title",
|
|
2342
|
-
className:
|
|
2369
|
+
className: Lr(),
|
|
2343
2370
|
"data-testid": n,
|
|
2344
2371
|
children: /* @__PURE__ */ t("h1", {
|
|
2345
2372
|
id: r,
|
|
@@ -2352,7 +2379,7 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
2352
2379
|
let { descriptionId: r, registerNamePart: i } = Z("Description");
|
|
2353
2380
|
return l(() => i("description"), [i]), /* @__PURE__ */ t("div", {
|
|
2354
2381
|
"data-dialog-member": "description",
|
|
2355
|
-
className:
|
|
2382
|
+
className: Rr(),
|
|
2356
2383
|
"data-testid": n,
|
|
2357
2384
|
children: /* @__PURE__ */ t("p", {
|
|
2358
2385
|
id: r,
|
|
@@ -2363,31 +2390,31 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
2363
2390
|
},
|
|
2364
2391
|
Content: ({ children: e, scrollOwner: n, testId: r }) => (Z("Content"), /* @__PURE__ */ t("div", {
|
|
2365
2392
|
"data-dialog-member": "content",
|
|
2366
|
-
className:
|
|
2393
|
+
className: zr({ scrollOwner: n }),
|
|
2367
2394
|
"data-testid": r,
|
|
2368
2395
|
children: e
|
|
2369
2396
|
})),
|
|
2370
2397
|
Actions: ({ children: e, testId: n }) => (Z("Actions"), /* @__PURE__ */ t("div", {
|
|
2371
2398
|
"data-dialog-member": "actions",
|
|
2372
|
-
className:
|
|
2399
|
+
className: Br(),
|
|
2373
2400
|
"data-testid": n,
|
|
2374
2401
|
children: e
|
|
2375
2402
|
}))
|
|
2376
|
-
},
|
|
2403
|
+
}, Gr = b("font-secondary text-small text-muted py-[var(--space-region)] px-[var(--gutter)]", {
|
|
2377
2404
|
variants: { edge: {
|
|
2378
2405
|
none: "",
|
|
2379
2406
|
rule: "border-t border-solid border-rule"
|
|
2380
2407
|
} },
|
|
2381
2408
|
defaultVariants: { edge: "rule" }
|
|
2382
|
-
}),
|
|
2383
|
-
className:
|
|
2409
|
+
}), Kr = ({ edge: e, children: n, testId: r }) => /* @__PURE__ */ t("footer", {
|
|
2410
|
+
className: Gr({ edge: e }),
|
|
2384
2411
|
"data-testid": r,
|
|
2385
2412
|
children: n
|
|
2386
|
-
}),
|
|
2413
|
+
}), qr = class extends Error {
|
|
2387
2414
|
constructor(e) {
|
|
2388
2415
|
super(`Form configuration is invalid: ${e}`), this.name = "FormConfigurationError";
|
|
2389
2416
|
}
|
|
2390
|
-
},
|
|
2417
|
+
}, Jr = b("font-secondary text-small", {
|
|
2391
2418
|
variants: { state: {
|
|
2392
2419
|
idle: "text-muted",
|
|
2393
2420
|
sending: "text-muted",
|
|
@@ -2395,13 +2422,13 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
2395
2422
|
failed: "text-error"
|
|
2396
2423
|
} },
|
|
2397
2424
|
defaultVariants: { state: "idle" }
|
|
2398
|
-
}),
|
|
2425
|
+
}), Yr = {
|
|
2399
2426
|
sent: "status",
|
|
2400
2427
|
failed: "alert"
|
|
2401
|
-
},
|
|
2428
|
+
}, Xr = ({ action: e, method: r = "post", state: i = "idle", children: a, actions: o, note: s, testId: c }) => {
|
|
2402
2429
|
let l = s != null && typeof s != "boolean";
|
|
2403
|
-
if (i === "sent" && !l) throw new
|
|
2404
|
-
let u = i !== "sent", d =
|
|
2430
|
+
if (i === "sent" && !l) throw new qr("Form in the `sent` state must be given a `note` - it is the outcome message.");
|
|
2431
|
+
let u = i !== "sent", d = Yr[i];
|
|
2405
2432
|
return /* @__PURE__ */ n("form", {
|
|
2406
2433
|
action: e,
|
|
2407
2434
|
method: r,
|
|
@@ -2419,12 +2446,12 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
2419
2446
|
}),
|
|
2420
2447
|
l && /* @__PURE__ */ t("p", {
|
|
2421
2448
|
role: d,
|
|
2422
|
-
className:
|
|
2449
|
+
className: Jr({ state: i }),
|
|
2423
2450
|
children: s
|
|
2424
2451
|
})
|
|
2425
2452
|
]
|
|
2426
2453
|
});
|
|
2427
|
-
},
|
|
2454
|
+
}, Zr = b([
|
|
2428
2455
|
"flex items-baseline",
|
|
2429
2456
|
"font-secondary text-label leading-label tracking-label text-muted",
|
|
2430
2457
|
"py-[var(--space-region)] px-[var(--gutter)]",
|
|
@@ -2444,68 +2471,78 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
2444
2471
|
edge: "rule",
|
|
2445
2472
|
mode: "navigation"
|
|
2446
2473
|
}
|
|
2447
|
-
}),
|
|
2474
|
+
}), Qr = [
|
|
2448
2475
|
"inline-flex shrink-0 items-center",
|
|
2449
2476
|
"min-h-[calc(var(--text-label)*var(--leading-label))]",
|
|
2450
2477
|
"min-w-[var(--standing-min-width)]"
|
|
2451
|
-
].join(" "),
|
|
2478
|
+
].join(" "), $r = "flex flex-wrap items-baseline gap-[var(--space-region)]", ei = "min-w-0 wrap-anywhere", ti = "ms-auto", ni = (e) => e != null && typeof e != "boolean" && e !== "", ri = ({ edge: r, testId: i, standing: a, navName: o, children: s, status: c, action: l }) => {
|
|
2452
2479
|
let u = c !== void 0 || l !== void 0;
|
|
2453
2480
|
return /* @__PURE__ */ t("header", {
|
|
2454
|
-
className:
|
|
2481
|
+
className: Zr({
|
|
2455
2482
|
edge: r,
|
|
2456
2483
|
mode: u ? "statusAction" : "navigation"
|
|
2457
2484
|
}),
|
|
2458
2485
|
"data-testid": i,
|
|
2459
|
-
children: u ? /* @__PURE__ */ n(e, { children: [
|
|
2460
|
-
className: $r,
|
|
2461
|
-
children: c
|
|
2462
|
-
}), ti(l) && /* @__PURE__ */ t("div", {
|
|
2486
|
+
children: u ? /* @__PURE__ */ n(e, { children: [ni(c) && /* @__PURE__ */ t("div", {
|
|
2463
2487
|
className: ei,
|
|
2488
|
+
children: c
|
|
2489
|
+
}), ni(l) && /* @__PURE__ */ t("div", {
|
|
2490
|
+
className: ti,
|
|
2464
2491
|
children: l
|
|
2465
2492
|
})] }) : /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("div", {
|
|
2466
|
-
className:
|
|
2493
|
+
className: Qr,
|
|
2467
2494
|
children: a
|
|
2468
2495
|
}), /* @__PURE__ */ t("nav", {
|
|
2469
2496
|
"aria-label": o,
|
|
2470
|
-
className:
|
|
2497
|
+
className: $r,
|
|
2471
2498
|
children: s
|
|
2472
2499
|
})] })
|
|
2473
2500
|
});
|
|
2474
|
-
},
|
|
2501
|
+
}, ii = b("flex flex-col min-h-[var(--fold-height)] gap-[var(--space-stack)]", {
|
|
2475
2502
|
variants: { place: {
|
|
2476
2503
|
start: "justify-start",
|
|
2477
2504
|
center: "justify-center",
|
|
2478
2505
|
between: "justify-between"
|
|
2479
2506
|
} },
|
|
2480
2507
|
defaultVariants: { place: "center" }
|
|
2481
|
-
}),
|
|
2482
|
-
className:
|
|
2508
|
+
}), ai = ({ place: e, children: n, testId: r }) => /* @__PURE__ */ t("div", {
|
|
2509
|
+
className: ii({ place: e }),
|
|
2483
2510
|
"data-testid": r,
|
|
2484
2511
|
children: n
|
|
2485
|
-
}),
|
|
2486
|
-
className:
|
|
2512
|
+
}), oi = b("flex flex-col gap-[var(--space-stack)] py-[var(--space-band)] px-[var(--gutter)]"), si = b("font-heading text-title leading-title tracking-optical text-foreground"), ci = b("font-body text-lede leading-lede text-foreground max-w-[var(--measure-wide)]"), li = b("font-body text-small text-muted max-w-[var(--measure)]"), ui = ({ title: e, lede: r, intro: i, testId: a }) => /* @__PURE__ */ n("header", {
|
|
2513
|
+
className: oi(),
|
|
2487
2514
|
"data-testid": a,
|
|
2488
2515
|
children: [
|
|
2489
2516
|
/* @__PURE__ */ t("h1", {
|
|
2490
|
-
className:
|
|
2517
|
+
className: si(),
|
|
2491
2518
|
children: e
|
|
2492
2519
|
}),
|
|
2493
2520
|
r !== void 0 && /* @__PURE__ */ t("p", {
|
|
2494
|
-
className:
|
|
2521
|
+
className: ci(),
|
|
2495
2522
|
children: r
|
|
2496
2523
|
}),
|
|
2497
2524
|
i !== void 0 && /* @__PURE__ */ t("p", {
|
|
2498
|
-
className:
|
|
2525
|
+
className: li(),
|
|
2499
2526
|
children: i
|
|
2500
2527
|
})
|
|
2501
2528
|
]
|
|
2502
|
-
}),
|
|
2529
|
+
}), di = a(null), fi = b([
|
|
2530
|
+
"box-border flex h-full min-h-0 min-w-0 flex-col gap-[var(--space-stack)] border border-solid border-border bg-surface text-foreground p-[var(--space-box-inset)] [overflow-wrap:anywhere]",
|
|
2531
|
+
"[[data-screen-spacing=compact]_&:not(dialog_*)]:gap-[var(--space-pane-slot-compact)]",
|
|
2532
|
+
"[[data-screen-spacing=compact]_&:not(dialog_*)]:p-[max(var(--space-pane-inset-compact),calc(var(--focus-ring-width)+var(--focus-ring-offset)))]"
|
|
2533
|
+
]), pi = b("min-w-0 shrink-0"), mi = b("min-w-0 shrink-0", {
|
|
2534
|
+
variants: { placement: {
|
|
2535
|
+
"after-body": "",
|
|
2536
|
+
bottom: "mt-auto"
|
|
2537
|
+
} },
|
|
2538
|
+
defaultVariants: { placement: "after-body" }
|
|
2539
|
+
}), hi = b("min-h-0 min-w-0 flex-[0_1_auto]", {
|
|
2503
2540
|
variants: { scrollOwner: {
|
|
2504
2541
|
body: "[&>div]:flow-root [&>div]:w-fit [&>div]:min-w-full [&>div]:p-[calc(var(--focus-ring-width)+var(--focus-ring-offset))] overflow-auto overscroll-contain outline-focus-ring outline-offset-[var(--focus-ring-offset)] focus-visible:outline focus-visible:outline-[length:var(--focus-ring-width)]",
|
|
2505
2542
|
child: "flex flex-col"
|
|
2506
2543
|
} },
|
|
2507
2544
|
defaultVariants: { scrollOwner: "body" }
|
|
2508
|
-
}),
|
|
2545
|
+
}), gi = (e, t, n) => {
|
|
2509
2546
|
let [r, i] = m(!0);
|
|
2510
2547
|
return d(() => {
|
|
2511
2548
|
let r = e.current;
|
|
@@ -2527,10 +2564,10 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
2527
2564
|
t,
|
|
2528
2565
|
n
|
|
2529
2566
|
]), r;
|
|
2530
|
-
}, $ = (e) => Number.parseFloat(e) || 0,
|
|
2567
|
+
}, $ = (e) => Number.parseFloat(e) || 0, _i = (e) => {
|
|
2531
2568
|
let t = getComputedStyle(e);
|
|
2532
2569
|
return $(t.paddingTop) + $(t.paddingBottom) + $(t.borderTopWidth) + $(t.borderBottomWidth);
|
|
2533
|
-
},
|
|
2570
|
+
}, vi = (e) => {
|
|
2534
2571
|
let t = 0;
|
|
2535
2572
|
for (let n of [e, ...e.querySelectorAll("*")]) {
|
|
2536
2573
|
let r = getComputedStyle(n);
|
|
@@ -2539,37 +2576,44 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
2539
2576
|
t = Math.max(t, o + 2 * a);
|
|
2540
2577
|
}
|
|
2541
2578
|
let n = e.querySelector("table"), r = n ? Array.from(n.children).filter((e) => e.matches("caption, thead")).reduce((e, t) => e + t.getBoundingClientRect().height, 0) : 0;
|
|
2542
|
-
return t + r +
|
|
2543
|
-
},
|
|
2544
|
-
let t = c(
|
|
2579
|
+
return t + r + _i(e);
|
|
2580
|
+
}, yi = (e) => {
|
|
2581
|
+
let t = c(di), [n, r] = m(!1);
|
|
2545
2582
|
return d(() => {
|
|
2546
2583
|
let n = e.current, i = t;
|
|
2547
2584
|
if (!n || !i) return;
|
|
2548
2585
|
let a = () => {
|
|
2549
2586
|
let e = Array.from(n.children), t = e.find((e) => e.hasAttribute("data-pane-body")), a = e.filter((e) => e !== t).reduce((e, t) => e + t.getBoundingClientRect().height, 0), o = Math.max(0, e.length - 1) * $(getComputedStyle(n).rowGap), s = i.getBoundingClientRect(), c = Math.max(0, n.getBoundingClientRect().top - s.top);
|
|
2550
|
-
r(s.height - c < a + o +
|
|
2551
|
-
}, o = typeof ResizeObserver > "u" ? void 0 : new ResizeObserver(a), s = () => {
|
|
2552
|
-
o?.disconnect(), o?.observe(i), o?.observe(n);
|
|
2553
|
-
for (let e of n.querySelectorAll("*")) o?.observe(e);
|
|
2554
|
-
a();
|
|
2555
|
-
};
|
|
2556
|
-
s();
|
|
2557
|
-
let c = new MutationObserver(s);
|
|
2558
|
-
return c.observe(n, {
|
|
2587
|
+
r(s.height - c < a + o + _i(n) + (t instanceof HTMLElement ? vi(t) : 0));
|
|
2588
|
+
}, o = typeof ResizeObserver > "u" ? void 0 : new ResizeObserver(a), s = new MutationObserver(() => l()), c = {
|
|
2559
2589
|
childList: !0,
|
|
2560
2590
|
subtree: !0,
|
|
2561
2591
|
characterData: !0
|
|
2562
|
-
}
|
|
2563
|
-
o?.disconnect(),
|
|
2592
|
+
}, l = () => {
|
|
2593
|
+
o?.disconnect(), s.disconnect(), o?.observe(i), o?.observe(n);
|
|
2594
|
+
for (let e of n.querySelectorAll("*")) o?.observe(e);
|
|
2595
|
+
s.observe(n, c);
|
|
2596
|
+
for (let e = n; e !== i && e.parentElement; e = e.parentElement) {
|
|
2597
|
+
s.observe(e.parentElement, { childList: !0 });
|
|
2598
|
+
for (let t = e.previousElementSibling; t; t = t.previousElementSibling) o?.observe(t), s.observe(t, {
|
|
2599
|
+
...c,
|
|
2600
|
+
attributes: !0
|
|
2601
|
+
});
|
|
2602
|
+
}
|
|
2603
|
+
a();
|
|
2604
|
+
};
|
|
2605
|
+
return l(), window.addEventListener("resize", a), () => {
|
|
2606
|
+
o?.disconnect(), s.disconnect(), window.removeEventListener("resize", a);
|
|
2564
2607
|
};
|
|
2565
2608
|
}, [t, e]), n;
|
|
2566
|
-
},
|
|
2609
|
+
}, bi = {
|
|
2567
2610
|
Root: ({ children: e, name: n, testId: r }) => {
|
|
2568
|
-
let i = p(null), a =
|
|
2611
|
+
let i = p(null), a = yi(i);
|
|
2569
2612
|
return /* @__PURE__ */ t("div", {
|
|
2570
2613
|
ref: i,
|
|
2571
2614
|
"data-screen-unusable": a || void 0,
|
|
2572
|
-
|
|
2615
|
+
"data-height-bounded": !0,
|
|
2616
|
+
className: fi(),
|
|
2573
2617
|
role: n ? "group" : void 0,
|
|
2574
2618
|
"aria-label": n || void 0,
|
|
2575
2619
|
"data-testid": r,
|
|
@@ -2577,16 +2621,16 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
2577
2621
|
});
|
|
2578
2622
|
},
|
|
2579
2623
|
Head: ({ children: e, testId: n }) => /* @__PURE__ */ t("div", {
|
|
2580
|
-
className:
|
|
2624
|
+
className: pi(),
|
|
2581
2625
|
"data-testid": n,
|
|
2582
2626
|
children: e
|
|
2583
2627
|
}),
|
|
2584
2628
|
Body: ({ children: e, ariaLabel: n, scrollOwner: r, testId: i }) => {
|
|
2585
|
-
let a = p(null), o = p(null), s = r !== "child", c =
|
|
2629
|
+
let a = p(null), o = p(null), s = r !== "child", c = gi(a, o, s) && s;
|
|
2586
2630
|
return /* @__PURE__ */ t("div", {
|
|
2587
2631
|
"data-pane-body": "",
|
|
2588
2632
|
ref: a,
|
|
2589
|
-
className:
|
|
2633
|
+
className: hi({ scrollOwner: r ?? "body" }),
|
|
2590
2634
|
role: c ? "group" : void 0,
|
|
2591
2635
|
"aria-label": c ? n : void 0,
|
|
2592
2636
|
tabIndex: c ? 0 : void 0,
|
|
@@ -2597,51 +2641,102 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
2597
2641
|
}) : e
|
|
2598
2642
|
});
|
|
2599
2643
|
},
|
|
2600
|
-
Foot: ({ children: e,
|
|
2601
|
-
className:
|
|
2602
|
-
"data-testid":
|
|
2644
|
+
Foot: ({ children: e, placement: n, testId: r }) => /* @__PURE__ */ t("div", {
|
|
2645
|
+
className: mi({ placement: n }),
|
|
2646
|
+
"data-testid": r,
|
|
2603
2647
|
children: e
|
|
2604
2648
|
})
|
|
2605
|
-
},
|
|
2606
|
-
|
|
2649
|
+
}, xi = b("box-border grid h-full min-h-0 min-w-0 grid-rows-[minmax(0,1fr)] px-[var(--gutter)] [&:has(>header)]:grid-rows-[auto_minmax(0,1fr)]", {
|
|
2650
|
+
variants: { spacing: {
|
|
2651
|
+
comfortable: "py-[var(--space-region)] [&:has(>header)]:gap-[var(--space-region)]",
|
|
2652
|
+
compact: "py-[max(var(--space-screen-region-compact),calc(var(--focus-ring-width)+var(--focus-ring-offset)))] [&:has(>header)]:gap-[max(var(--space-screen-region-compact),calc(var(--focus-ring-width)+var(--focus-ring-offset)))]"
|
|
2653
|
+
} },
|
|
2654
|
+
defaultVariants: { spacing: "comfortable" }
|
|
2655
|
+
}), Si = b("min-w-0"), Ci = b("h-full min-h-0 min-w-0 [&>div]:h-full [&:has([data-screen-unusable])>div]:h-auto"), wi = (e) => e.display === "none" || e.position === "absolute" || e.position === "fixed", Ti = (e) => Array.from(e.children).reduce((e, t) => {
|
|
2656
|
+
let n = getComputedStyle(t), r = [...e.observed, t];
|
|
2657
|
+
if (wi(n) || t.hasAttribute("data-height-bounded")) return {
|
|
2658
|
+
bottom: e.bottom,
|
|
2659
|
+
observed: r
|
|
2660
|
+
};
|
|
2661
|
+
if (t.hasAttribute("data-height-passing")) {
|
|
2662
|
+
let n = Ti(t);
|
|
2663
|
+
return {
|
|
2664
|
+
bottom: Math.max(e.bottom, n.bottom),
|
|
2665
|
+
observed: [...r, ...n.observed]
|
|
2666
|
+
};
|
|
2667
|
+
}
|
|
2668
|
+
let i = t.getBoundingClientRect().bottom + (Number.parseFloat(n.marginBottom) || 0);
|
|
2669
|
+
return {
|
|
2670
|
+
bottom: Math.max(e.bottom, i),
|
|
2671
|
+
observed: r
|
|
2672
|
+
};
|
|
2673
|
+
}, {
|
|
2674
|
+
bottom: -Infinity,
|
|
2675
|
+
observed: []
|
|
2676
|
+
}), Ei = (e) => {
|
|
2677
|
+
let [t, n] = m(!1);
|
|
2678
|
+
return d(() => {
|
|
2679
|
+
let t = e?.firstElementChild;
|
|
2680
|
+
if (!e || !t) return;
|
|
2681
|
+
let r = () => n(Ti(t).bottom > e.getBoundingClientRect().bottom), i = typeof ResizeObserver > "u" ? void 0 : new ResizeObserver(r), a = () => {
|
|
2682
|
+
i?.disconnect(), i?.observe(e);
|
|
2683
|
+
for (let e of Ti(t).observed) i?.observe(e);
|
|
2684
|
+
r();
|
|
2685
|
+
};
|
|
2686
|
+
a();
|
|
2687
|
+
let o = new MutationObserver(a);
|
|
2688
|
+
return o.observe(t, {
|
|
2689
|
+
childList: !0,
|
|
2690
|
+
subtree: !0,
|
|
2691
|
+
characterData: !0
|
|
2692
|
+
}), window.addEventListener("resize", r), () => {
|
|
2693
|
+
i?.disconnect(), o.disconnect(), window.removeEventListener("resize", r);
|
|
2694
|
+
};
|
|
2695
|
+
}, [e]), t;
|
|
2696
|
+
}, Di = ({ heading: e, spacing: r, children: i, testId: a }) => {
|
|
2697
|
+
let [o, s] = m(null), c = Ei(o);
|
|
2607
2698
|
return /* @__PURE__ */ n("main", {
|
|
2608
|
-
className:
|
|
2609
|
-
"data-
|
|
2699
|
+
className: xi({ spacing: r }),
|
|
2700
|
+
"data-screen-spacing": r === "compact" ? r : void 0,
|
|
2701
|
+
"data-testid": a,
|
|
2610
2702
|
children: [e != null && e !== !1 && /* @__PURE__ */ t("header", {
|
|
2611
|
-
className:
|
|
2703
|
+
className: Si(),
|
|
2612
2704
|
children: e
|
|
2613
2705
|
}), /* @__PURE__ */ t("div", {
|
|
2614
|
-
ref:
|
|
2615
|
-
className:
|
|
2616
|
-
children: /* @__PURE__ */ t("div", {
|
|
2617
|
-
|
|
2618
|
-
children:
|
|
2619
|
-
|
|
2706
|
+
ref: s,
|
|
2707
|
+
className: Ci(),
|
|
2708
|
+
children: /* @__PURE__ */ t("div", {
|
|
2709
|
+
"data-screen-unusable": c || void 0,
|
|
2710
|
+
children: /* @__PURE__ */ t(di.Provider, {
|
|
2711
|
+
value: o,
|
|
2712
|
+
children: i
|
|
2713
|
+
})
|
|
2714
|
+
})
|
|
2620
2715
|
})]
|
|
2621
2716
|
});
|
|
2622
|
-
},
|
|
2717
|
+
}, Oi = b("max-h-full max-w-full min-h-0 min-w-0 outline-focus-ring outline-offset-[var(--focus-ring-offset)] focus-visible:outline focus-visible:outline-[length:var(--focus-ring-width)]", {
|
|
2623
2718
|
variants: { axis: {
|
|
2624
2719
|
both: "overflow-auto",
|
|
2625
2720
|
horizontal: "overflow-x-auto overflow-y-hidden",
|
|
2626
2721
|
vertical: "overflow-y-auto overflow-x-hidden"
|
|
2627
2722
|
} },
|
|
2628
2723
|
defaultVariants: { axis: "both" }
|
|
2629
|
-
}),
|
|
2724
|
+
}), ki = b("p-[calc(var(--focus-ring-width)+var(--focus-ring-offset))]", {
|
|
2630
2725
|
variants: { axis: {
|
|
2631
2726
|
both: "w-fit min-w-full",
|
|
2632
2727
|
horizontal: "w-fit min-w-full",
|
|
2633
2728
|
vertical: "w-full"
|
|
2634
2729
|
} },
|
|
2635
2730
|
defaultVariants: { axis: "both" }
|
|
2636
|
-
}),
|
|
2731
|
+
}), Ai = (e, t) => {
|
|
2637
2732
|
let n = e.scrollWidth > e.clientWidth, r = e.scrollHeight > e.clientHeight;
|
|
2638
2733
|
return t !== "vertical" && n || t !== "horizontal" && r;
|
|
2639
|
-
},
|
|
2734
|
+
}, ji = (e, t, n) => {
|
|
2640
2735
|
let [r, i] = m(!0);
|
|
2641
2736
|
return d(() => {
|
|
2642
2737
|
let r = e.current;
|
|
2643
2738
|
if (r === null) return;
|
|
2644
|
-
let a = () => i(
|
|
2739
|
+
let a = () => i(Ai(r, n) || r === document.activeElement);
|
|
2645
2740
|
a();
|
|
2646
2741
|
let o = typeof ResizeObserver > "u" ? void 0 : new ResizeObserver(a);
|
|
2647
2742
|
return o?.observe(r), t.current !== null && o?.observe(t.current), window.addEventListener("resize", a), r.addEventListener("blur", a), () => {
|
|
@@ -2652,22 +2747,23 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
2652
2747
|
t,
|
|
2653
2748
|
n
|
|
2654
2749
|
]), r;
|
|
2655
|
-
},
|
|
2656
|
-
let a = p(null), o = p(null), s =
|
|
2750
|
+
}, Mi = ({ axis: e, ariaLabel: n, children: r, testId: i }) => {
|
|
2751
|
+
let a = p(null), o = p(null), s = ji(a, o, e ?? "both");
|
|
2657
2752
|
return /* @__PURE__ */ t("div", {
|
|
2658
2753
|
ref: a,
|
|
2659
|
-
className:
|
|
2754
|
+
className: Oi({ axis: e }),
|
|
2755
|
+
"data-height-bounded": !0,
|
|
2660
2756
|
"data-testid": i,
|
|
2661
2757
|
role: s ? "group" : void 0,
|
|
2662
2758
|
"aria-label": s ? n : void 0,
|
|
2663
2759
|
tabIndex: s ? 0 : void 0,
|
|
2664
2760
|
children: /* @__PURE__ */ t("div", {
|
|
2665
2761
|
ref: o,
|
|
2666
|
-
className:
|
|
2762
|
+
className: ki({ axis: e }),
|
|
2667
2763
|
children: r
|
|
2668
2764
|
})
|
|
2669
2765
|
});
|
|
2670
|
-
},
|
|
2766
|
+
}, Ni = b([
|
|
2671
2767
|
"relative",
|
|
2672
2768
|
"py-[var(--space-band)]",
|
|
2673
2769
|
"[[data-section]+&]:border-t [[data-section]+&]:border-solid [[data-section]+&]:border-rule"
|
|
@@ -2677,19 +2773,19 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
2677
2773
|
full: ""
|
|
2678
2774
|
} },
|
|
2679
2775
|
defaultVariants: { bleed: "inset" }
|
|
2680
|
-
}),
|
|
2776
|
+
}), Pi = ({ bleed: e, name: n, children: r, testId: i }) => /* @__PURE__ */ t("section", {
|
|
2681
2777
|
"data-section": "",
|
|
2682
|
-
className:
|
|
2778
|
+
className: Ni({ bleed: e }),
|
|
2683
2779
|
"aria-label": n,
|
|
2684
2780
|
"data-testid": i,
|
|
2685
2781
|
children: r
|
|
2686
|
-
}),
|
|
2782
|
+
}), Fi = b("h-dvh min-w-0 overflow-clip grid grid-rows-[auto_minmax(0,1fr)]"), Ii = b("min-h-0 min-w-0 overflow-auto overscroll-contain p-[calc(var(--focus-ring-width)+var(--focus-ring-offset))] scroll-p-[calc(var(--focus-ring-width)+var(--focus-ring-offset))] outline-focus-ring focus-visible:outline focus-visible:outline-[length:var(--focus-ring-width)] focus-visible:outline-offset-[calc(-1*var(--focus-ring-width))]", {
|
|
2687
2783
|
variants: { mode: {
|
|
2688
2784
|
console: "[&>div]:h-full",
|
|
2689
2785
|
page: "[&>div]:min-h-full"
|
|
2690
2786
|
} },
|
|
2691
2787
|
defaultVariants: { mode: "console" }
|
|
2692
|
-
}),
|
|
2788
|
+
}), Li = (e) => {
|
|
2693
2789
|
let [t, n] = m(!0);
|
|
2694
2790
|
return d(() => {
|
|
2695
2791
|
let t = e.current;
|
|
@@ -2711,21 +2807,21 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
2711
2807
|
i?.disconnect(), o.disconnect(), window.removeEventListener("resize", r), t.removeEventListener("blur", r);
|
|
2712
2808
|
};
|
|
2713
2809
|
}, [e]), t;
|
|
2714
|
-
},
|
|
2715
|
-
let s = p(null), c =
|
|
2810
|
+
}, Ri = ({ bar: e, children: r, ariaLabel: i, mode: a, testId: o }) => {
|
|
2811
|
+
let s = p(null), c = Li(s);
|
|
2716
2812
|
return /* @__PURE__ */ n("div", {
|
|
2717
|
-
className:
|
|
2813
|
+
className: Fi(),
|
|
2718
2814
|
"data-testid": o,
|
|
2719
2815
|
children: [/* @__PURE__ */ t("div", { children: e }), /* @__PURE__ */ t("div", {
|
|
2720
2816
|
ref: s,
|
|
2721
|
-
className:
|
|
2817
|
+
className: Ii({ mode: a }),
|
|
2722
2818
|
role: c ? "group" : void 0,
|
|
2723
2819
|
"aria-label": c ? i : void 0,
|
|
2724
2820
|
tabIndex: c ? 0 : void 0,
|
|
2725
2821
|
children: /* @__PURE__ */ t("div", { children: r })
|
|
2726
2822
|
})]
|
|
2727
2823
|
});
|
|
2728
|
-
},
|
|
2824
|
+
}, zi = b([
|
|
2729
2825
|
"grid gap-[var(--space-region)] lg:grid-cols-[12rem_minmax(0,1fr)]",
|
|
2730
2826
|
"[&>div:first-child]:border-solid [&>div:first-child]:border-border [&>div:first-child]:border-b [&>div:first-child]:pb-[var(--space-stack)]",
|
|
2731
2827
|
"lg:[&>div:first-child]:border-b-0 lg:[&>div:first-child]:border-r lg:[&>div:first-child]:pb-0 lg:[&>div:first-child]:pr-[var(--space-stack)]",
|
|
@@ -2738,7 +2834,7 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
2738
2834
|
true: "min-h-full lg:h-full lg:min-h-0 lg:grid-rows-[minmax(0,1fr)] lg:[&>div]:min-h-0 lg:[&>div]:h-full lg:[&>div:first-child>nav]:max-h-full"
|
|
2739
2835
|
} },
|
|
2740
2836
|
defaultVariants: { fill: !1 }
|
|
2741
|
-
}),
|
|
2837
|
+
}), Bi = (e) => {
|
|
2742
2838
|
if (!e) return;
|
|
2743
2839
|
let t = [];
|
|
2744
2840
|
for (let n = e.parentElement; n && n !== e.ownerDocument.documentElement; n = n.parentElement) t.push(n);
|
|
@@ -2755,7 +2851,7 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
2755
2851
|
return window.addEventListener("resize", n), () => {
|
|
2756
2852
|
r?.disconnect(), window.removeEventListener("resize", n), e.style.removeProperty("--sidebar-scrollport-height");
|
|
2757
2853
|
};
|
|
2758
|
-
},
|
|
2854
|
+
}, Vi = b([
|
|
2759
2855
|
"w-full text-left font-secondary text-label tracking-label wrap-anywhere",
|
|
2760
2856
|
"underline-offset-[var(--underline-offset)]",
|
|
2761
2857
|
"outline-focus-ring outline-offset-[var(--focus-ring-offset)] focus-visible:outline focus-visible:outline-[length:var(--focus-ring-width)]"
|
|
@@ -2766,11 +2862,11 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
2766
2862
|
inert: "text-muted cursor-not-allowed"
|
|
2767
2863
|
} },
|
|
2768
2864
|
defaultVariants: { state: "usable" }
|
|
2769
|
-
}),
|
|
2770
|
-
let a = c(
|
|
2865
|
+
}), Hi = a(void 0), Ui = ({ entryKey: e, children: n, inert: r, testId: i }) => {
|
|
2866
|
+
let a = c(Hi), o = a !== void 0 && a.active === e;
|
|
2771
2867
|
return /* @__PURE__ */ t("li", { children: /* @__PURE__ */ t("button", {
|
|
2772
2868
|
type: "button",
|
|
2773
|
-
className:
|
|
2869
|
+
className: Vi({ state: r ? "inert" : o ? "active" : "usable" }),
|
|
2774
2870
|
disabled: r,
|
|
2775
2871
|
"aria-current": o ? "true" : void 0,
|
|
2776
2872
|
"data-testid": i,
|
|
@@ -2779,31 +2875,31 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
2779
2875
|
},
|
|
2780
2876
|
children: n
|
|
2781
2877
|
}) });
|
|
2782
|
-
},
|
|
2878
|
+
}, Wi = ({ children: e, testId: n }) => /* @__PURE__ */ t("div", {
|
|
2783
2879
|
"data-testid": n,
|
|
2784
2880
|
children: e
|
|
2785
|
-
}),
|
|
2881
|
+
}), Gi = {
|
|
2786
2882
|
Root: ({ active: e, label: i, onSelect$: a, children: s, testId: c, fill: l }) => {
|
|
2787
2883
|
let u = r.toArray(s).filter(o);
|
|
2788
2884
|
return /* @__PURE__ */ n("div", {
|
|
2789
|
-
className:
|
|
2885
|
+
className: zi({ fill: l }),
|
|
2790
2886
|
"data-testid": c,
|
|
2791
2887
|
children: [/* @__PURE__ */ t("div", { children: /* @__PURE__ */ t("nav", {
|
|
2792
|
-
ref: l ? void 0 :
|
|
2888
|
+
ref: l ? void 0 : Bi,
|
|
2793
2889
|
"aria-label": i,
|
|
2794
|
-
children: /* @__PURE__ */ t(
|
|
2890
|
+
children: /* @__PURE__ */ t(Hi, {
|
|
2795
2891
|
value: {
|
|
2796
2892
|
active: e,
|
|
2797
2893
|
onSelect$: a
|
|
2798
2894
|
},
|
|
2799
|
-
children: /* @__PURE__ */ t("ul", { children: u.filter((e) => e.type ===
|
|
2895
|
+
children: /* @__PURE__ */ t("ul", { children: u.filter((e) => e.type === Ui) })
|
|
2800
2896
|
})
|
|
2801
|
-
}) }), u.filter((e) => e.type ===
|
|
2897
|
+
}) }), u.filter((e) => e.type === Wi)]
|
|
2802
2898
|
});
|
|
2803
2899
|
},
|
|
2804
|
-
Item:
|
|
2805
|
-
Content:
|
|
2806
|
-
},
|
|
2900
|
+
Item: Ui,
|
|
2901
|
+
Content: Wi
|
|
2902
|
+
}, Ki = {
|
|
2807
2903
|
surface: "#ffffff",
|
|
2808
2904
|
selectedSurface: "#f8fafc",
|
|
2809
2905
|
selectedError: "#cd2d7d",
|
|
@@ -2832,7 +2928,7 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
2832
2928
|
errorHover: "#be185d",
|
|
2833
2929
|
errorForeground: "#ffffff",
|
|
2834
2930
|
info: "#0e7490"
|
|
2835
|
-
},
|
|
2931
|
+
}, qi = {
|
|
2836
2932
|
surface: "#0f172a",
|
|
2837
2933
|
selectedSurface: "#151e30",
|
|
2838
2934
|
selectedError: "#f48fb1",
|
|
@@ -2863,4 +2959,4 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
2863
2959
|
info: "#22d3ee"
|
|
2864
2960
|
};
|
|
2865
2961
|
//#endregion
|
|
2866
|
-
export { Me as Box, Pe as Brandmark,
|
|
2962
|
+
export { Me as Box, Pe as Brandmark, sn as Button, Ie as Callout, ze as Checklist, hn as Choices, cn as ChoicesCompositionError, S as Cluster, He as Collection, V as ColumnLayout, C as ColumnLayoutCompositionError, w as ColumnLayoutConfigurationError, Er as Cover, $e as DefinitionList, Ue as DefinitionListConfigurationError, Wr as Dialog, Dr as DialogCompositionError, Or as DialogNamingError, It as Eyebrow, Oe as FieldRow, pe as FieldRowCompositionError, U as FieldRowConfigurationError, tt as Figure, Kr as Footer, Xr as Form, qr as FormConfigurationError, Rt as H1, Bt as H2, Ht as H3, Wt as H4, Kt as H5, Jt as H6, ri as Header, ai as Hero, ot as Icon, _n as Input, yn as Link, dt as Meter, st as MeterConfigurationError, zn as MultiSelect, xn as MultiSelectCompositionError, Xt as Note, Vn as NumberInput, Qt as P, ui as PageHead, bi as Pane, an as Prose, gt as Rail, vt as Rule, Di as Screen, Mi as ScrollContainer, Pi as Section, Un as Select, Ri as Shell, Gi as Sidebar, Kn as Slider, J as SliderConfigurationError, Ae as Stack, or as Stepper, qn as StepperCompositionError, cr as Switch, Pt as Table, yt as TableConfigurationError, xr as Tabs, lr as TabsCompositionError, Cr as TextArea, qi as dark, Ki as light };
|