@juwel-development/design-system 4.3.0 → 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 +504 -498
- package/dist/styles.css +1 -1
- package/dist/styles.dark.css +1 -1
- package/dist/styles.light.css +1 -1
- package/dist/types/Layout/Pane/Pane.d.ts +23 -1
- package/package.json +1 -1
- package/src/Layout/Pane/Pane.tsx +30 -2
package/dist/design-system.js
CHANGED
|
@@ -168,25 +168,25 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
168
168
|
}, ce = -1, F = 3, I = (e, t, n) => {
|
|
169
169
|
let [r, i, a, o] = e;
|
|
170
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;
|
|
171
|
-
},
|
|
172
|
-
if (k(e)) return
|
|
173
|
-
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)");
|
|
174
174
|
return [e];
|
|
175
|
-
}),
|
|
175
|
+
}), z = (e, t) => {
|
|
176
176
|
let n = j(e.props.children).map(oe);
|
|
177
177
|
if (n.length === 0) throw new w(`alternative ${t + 1} declares no columns, so it has no minimum to fit`);
|
|
178
178
|
return {
|
|
179
179
|
arrangement: e,
|
|
180
180
|
threshold: O(n)
|
|
181
181
|
};
|
|
182
|
-
},
|
|
182
|
+
}, le = (e, t) => ({
|
|
183
183
|
"--column-layout-threshold": e,
|
|
184
184
|
"--column-layout-reserve": t
|
|
185
|
-
}),
|
|
185
|
+
}), ue = (e) => Array.from(e.children).findIndex((e) => e.getBoundingClientRect().width === 0), B = (e) => e === ce ? Infinity : e, V = {
|
|
186
186
|
Root: N,
|
|
187
187
|
Column: P,
|
|
188
188
|
Alternatives: ({ fill: e, fallback: r, children: a, testId: o }) => {
|
|
189
|
-
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);
|
|
190
190
|
d(() => {
|
|
191
191
|
let e = l.current;
|
|
192
192
|
if (e === null) return;
|
|
@@ -196,10 +196,10 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
196
196
|
};
|
|
197
197
|
n = t, requestAnimationFrame(i);
|
|
198
198
|
}, i = () => {
|
|
199
|
-
let i =
|
|
199
|
+
let i = ue(e);
|
|
200
200
|
if (i === t) return;
|
|
201
201
|
let { width: a } = e.getBoundingClientRect(), o = I(n, i, a);
|
|
202
|
-
o !== void 0 && (v((e) => Math.max(e, o)), n = [], t !== void 0 &&
|
|
202
|
+
o !== void 0 && (v((e) => Math.max(e, o)), n = [], t !== void 0 && B(i) < B(t)) || (r({
|
|
203
203
|
to: i,
|
|
204
204
|
width: a
|
|
205
205
|
}), t = i, g({
|
|
@@ -223,7 +223,7 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
223
223
|
d(() => {
|
|
224
224
|
u.current = S;
|
|
225
225
|
});
|
|
226
|
-
let C = (e) => b !== void 0 && e <
|
|
226
|
+
let C = (e) => b !== void 0 && e < B(b.firstFit) ? `${_}px` : "0px";
|
|
227
227
|
return /* @__PURE__ */ n("div", {
|
|
228
228
|
className: E({ fill: e }),
|
|
229
229
|
"data-height-passing": e || void 0,
|
|
@@ -234,105 +234,105 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
234
234
|
className: re(),
|
|
235
235
|
children: s.map(({ arrangement: e, threshold: n }, r) => /* @__PURE__ */ t("div", {
|
|
236
236
|
className: ie({ gap: e.props.gap }),
|
|
237
|
-
style:
|
|
237
|
+
style: le(n, C(r))
|
|
238
238
|
}, r))
|
|
239
239
|
}), S]
|
|
240
240
|
});
|
|
241
241
|
}
|
|
242
|
-
},
|
|
242
|
+
}, de = .5, H = (e, t) => Math.abs(e - t) <= de, fe = (e) => {
|
|
243
243
|
let t = [];
|
|
244
|
-
for (let { top: n } of e) t.some((e) =>
|
|
245
|
-
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)));
|
|
246
246
|
return e.map(({ top: e, controlEdge: r }) => {
|
|
247
|
-
let i = t.findIndex((t) =>
|
|
247
|
+
let i = t.findIndex((t) => H(t, e));
|
|
248
248
|
return (n[i] ?? r) - r;
|
|
249
249
|
});
|
|
250
|
-
},
|
|
250
|
+
}, pe = class extends Error {
|
|
251
251
|
constructor(e) {
|
|
252
252
|
super(`FieldRow.${e} must be composed inside FieldRow.Root`), this.name = "FieldRowCompositionError";
|
|
253
253
|
}
|
|
254
|
-
},
|
|
254
|
+
}, U = class extends Error {
|
|
255
255
|
constructor(e) {
|
|
256
256
|
super(`FieldRow configuration: ${e}`), this.name = "FieldRowConfigurationError";
|
|
257
257
|
}
|
|
258
|
-
},
|
|
258
|
+
}, me = b("flex flex-wrap items-start gap-y-[var(--space-stack)]", {
|
|
259
259
|
variants: { gap: {
|
|
260
260
|
stack: "gap-x-[var(--space-stack)]",
|
|
261
261
|
region: "gap-x-[var(--space-region)]"
|
|
262
262
|
} },
|
|
263
263
|
defaultVariants: { gap: "stack" }
|
|
264
|
-
}),
|
|
264
|
+
}), he = b("shrink basis-0"), ge = b("", {
|
|
265
265
|
variants: { part: {
|
|
266
266
|
item: "min-w-0 max-w-full flex-none",
|
|
267
267
|
group: "flex flex-wrap items-end gap-[var(--space-stack)]"
|
|
268
268
|
} },
|
|
269
269
|
defaultVariants: { part: "item" }
|
|
270
|
-
}),
|
|
271
|
-
let t = c(
|
|
272
|
-
if (t === void 0) throw new
|
|
270
|
+
}), _e = /^--[A-Za-z0-9_-]+$/, ve = ":scope > [data-field-row-item]", ye = a(void 0), be = (e) => {
|
|
271
|
+
let t = c(ye);
|
|
272
|
+
if (t === void 0) throw new pe(e);
|
|
273
273
|
return t;
|
|
274
|
+
}, xe = (e) => {
|
|
275
|
+
if (!(Number.isFinite(e) && e > 0)) throw new U(`weight must be a positive finite number, got ${e}`);
|
|
276
|
+
}, Se = (e) => {
|
|
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)}`);
|
|
274
278
|
}, Ce = (e) => {
|
|
275
|
-
if (!(Number.isFinite(e) && e > 0)) throw new V(`weight must be a positive finite number, got ${e}`);
|
|
276
|
-
}, we = (e) => {
|
|
277
|
-
if (!ye.test(e)) throw new V(`minWidth must name a CSS custom property such as --search-field-min-width, got ${JSON.stringify(e)}`);
|
|
278
|
-
}, Te = (e) => {
|
|
279
279
|
let t = e.querySelector("label[for]")?.getAttribute("for");
|
|
280
280
|
if (!t) return;
|
|
281
281
|
let n = e.ownerDocument.getElementById(t);
|
|
282
282
|
return n !== null && e.contains(n) ? n : void 0;
|
|
283
|
-
},
|
|
283
|
+
}, we = (e) => getComputedStyle(e).position !== "static", Te = (e, t) => {
|
|
284
284
|
if (getComputedStyle(e).position !== "absolute") return e;
|
|
285
285
|
let n = e.parentElement;
|
|
286
|
-
for (; n !== null && n !== t && !
|
|
286
|
+
for (; n !== null && n !== t && !we(n);) n = n.parentElement;
|
|
287
287
|
return n ?? e;
|
|
288
|
-
},
|
|
288
|
+
}, Ee = (e) => {
|
|
289
289
|
let t = e.getBoundingClientRect().top, n = e.firstElementChild;
|
|
290
290
|
if (n === null) return {
|
|
291
291
|
top: t,
|
|
292
292
|
controlEdge: 0
|
|
293
293
|
};
|
|
294
|
-
let r = n.getBoundingClientRect(), i =
|
|
294
|
+
let r = n.getBoundingClientRect(), i = Ce(n);
|
|
295
295
|
return {
|
|
296
296
|
top: t,
|
|
297
|
-
controlEdge: (i === void 0 ? r.bottom :
|
|
297
|
+
controlEdge: (i === void 0 ? r.bottom : Te(i, n).getBoundingClientRect().bottom) - r.top
|
|
298
298
|
};
|
|
299
|
-
},
|
|
300
|
-
let t = Array.from(e.querySelectorAll(
|
|
299
|
+
}, De = (e) => {
|
|
300
|
+
let t = Array.from(e.querySelectorAll(ve)), n = fe(t.map(Ee));
|
|
301
301
|
t.forEach((e, t) => {
|
|
302
302
|
let r = n[t] ?? 0, i = Number.parseFloat(e.style.paddingTop) || 0;
|
|
303
303
|
Math.abs(i - r) > .01 && (e.style.paddingTop = r === 0 ? "" : `${r}px`);
|
|
304
304
|
});
|
|
305
|
-
},
|
|
305
|
+
}, Oe = {
|
|
306
306
|
Root: ({ gap: e, children: n, testId: r }) => {
|
|
307
307
|
let i = p(null), a = p(void 0), o = p(/* @__PURE__ */ new WeakSet()), s = () => {
|
|
308
|
-
i.current &&
|
|
308
|
+
i.current && De(i.current);
|
|
309
309
|
}, c = (e) => {
|
|
310
310
|
e && a.current && !o.current.has(e) && (o.current.add(e), a.current.observe(e));
|
|
311
311
|
};
|
|
312
312
|
return d(() => {
|
|
313
313
|
let e = i.current;
|
|
314
|
-
if (e !== null && (
|
|
315
|
-
a.current ??= new ResizeObserver(() =>
|
|
316
|
-
for (let t of e.querySelectorAll(
|
|
314
|
+
if (e !== null && (De(e), !(typeof ResizeObserver > "u"))) {
|
|
315
|
+
a.current ??= new ResizeObserver(() => De(e));
|
|
316
|
+
for (let t of e.querySelectorAll(ve)) {
|
|
317
317
|
let e = t.firstElementChild ?? void 0;
|
|
318
318
|
c(e), c(e?.querySelector("label[for]") ?? void 0);
|
|
319
319
|
}
|
|
320
320
|
}
|
|
321
321
|
}), d(() => () => a.current?.disconnect(), []), /* @__PURE__ */ t("div", {
|
|
322
322
|
ref: i,
|
|
323
|
-
className:
|
|
323
|
+
className: me({ gap: e }),
|
|
324
324
|
"data-testid": r,
|
|
325
|
-
children: /* @__PURE__ */ t(
|
|
325
|
+
children: /* @__PURE__ */ t(ye, {
|
|
326
326
|
value: { align: s },
|
|
327
327
|
children: n
|
|
328
328
|
})
|
|
329
329
|
});
|
|
330
330
|
},
|
|
331
331
|
Field: ({ children: e, weight: n = 1, minWidth: r, testId: i }) => {
|
|
332
|
-
let { align: a } =
|
|
333
|
-
return
|
|
332
|
+
let { align: a } = be("Field");
|
|
333
|
+
return xe(n), Se(r), d(() => a()), /* @__PURE__ */ t("div", {
|
|
334
334
|
"data-field-row-item": !0,
|
|
335
|
-
className:
|
|
335
|
+
className: he(),
|
|
336
336
|
"data-testid": i,
|
|
337
337
|
style: {
|
|
338
338
|
flexGrow: n,
|
|
@@ -342,18 +342,18 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
342
342
|
});
|
|
343
343
|
},
|
|
344
344
|
Actions: ({ children: e, testId: n }) => {
|
|
345
|
-
let { align: r } =
|
|
345
|
+
let { align: r } = be("Actions");
|
|
346
346
|
return d(() => r()), /* @__PURE__ */ t("div", {
|
|
347
347
|
"data-field-row-item": !0,
|
|
348
|
-
className:
|
|
348
|
+
className: ge(),
|
|
349
349
|
"data-testid": n,
|
|
350
350
|
children: /* @__PURE__ */ t("div", {
|
|
351
|
-
className:
|
|
351
|
+
className: ge({ part: "group" }),
|
|
352
352
|
children: e
|
|
353
353
|
})
|
|
354
354
|
});
|
|
355
355
|
}
|
|
356
|
-
},
|
|
356
|
+
}, ke = b("flex", {
|
|
357
357
|
variants: {
|
|
358
358
|
gap: {
|
|
359
359
|
stack: "gap-[var(--space-stack)]",
|
|
@@ -378,8 +378,8 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
378
378
|
measure: !1,
|
|
379
379
|
direction: "column"
|
|
380
380
|
}
|
|
381
|
-
}),
|
|
382
|
-
className:
|
|
381
|
+
}), Ae = ({ gap: e, measure: n, direction: r, align: i, children: a, testId: o }) => /* @__PURE__ */ t("div", {
|
|
382
|
+
className: ke({
|
|
383
383
|
gap: e,
|
|
384
384
|
measure: n,
|
|
385
385
|
direction: r,
|
|
@@ -387,33 +387,33 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
387
387
|
}),
|
|
388
388
|
"data-testid": o,
|
|
389
389
|
children: a
|
|
390
|
-
}),
|
|
391
|
-
className:
|
|
390
|
+
}), je = b(["min-w-0 border border-solid border-border bg-surface text-foreground", "p-[var(--space-box-inset)] [overflow-wrap:anywhere]"].join(" ")), Me = ({ children: e, name: n, testId: r }) => n === void 0 || n === "" ? /* @__PURE__ */ t("div", {
|
|
391
|
+
className: je(),
|
|
392
392
|
"data-testid": r,
|
|
393
393
|
children: e
|
|
394
394
|
}) : /* @__PURE__ */ t("div", {
|
|
395
|
-
className:
|
|
395
|
+
className: je(),
|
|
396
396
|
role: "group",
|
|
397
397
|
"aria-label": n,
|
|
398
398
|
"data-testid": r,
|
|
399
399
|
children: e
|
|
400
|
-
}),
|
|
400
|
+
}), Ne = b("inline-flex", { variants: { cut: {
|
|
401
401
|
full: "",
|
|
402
402
|
compact: ""
|
|
403
|
-
} } }),
|
|
403
|
+
} } }), Pe = ({ name: e, cut: n, children: r, testId: i }) => e === "" ? /* @__PURE__ */ t("span", {
|
|
404
404
|
"aria-hidden": "true",
|
|
405
405
|
"data-cut": n,
|
|
406
|
-
className:
|
|
406
|
+
className: Ne({ cut: n }),
|
|
407
407
|
"data-testid": i,
|
|
408
408
|
children: r
|
|
409
409
|
}) : /* @__PURE__ */ t("span", {
|
|
410
410
|
role: "img",
|
|
411
411
|
"aria-label": e,
|
|
412
412
|
"data-cut": n,
|
|
413
|
-
className:
|
|
413
|
+
className: Ne({ cut: n }),
|
|
414
414
|
"data-testid": i,
|
|
415
415
|
children: r
|
|
416
|
-
}),
|
|
416
|
+
}), Fe = b("min-w-0 border-s-[length:var(--callout-mark-width)] border-solid ps-[var(--space-callout-inset)] text-foreground [overflow-wrap:anywhere] forced-colors:border-s-[CanvasText]", {
|
|
417
417
|
variants: { tone: {
|
|
418
418
|
warning: "border-warning",
|
|
419
419
|
info: "border-info",
|
|
@@ -421,54 +421,54 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
421
421
|
error: "border-error"
|
|
422
422
|
} },
|
|
423
423
|
defaultVariants: { tone: "warning" }
|
|
424
|
-
}),
|
|
425
|
-
className:
|
|
424
|
+
}), Ie = ({ children: e, tone: n, name: r, testId: i }) => r === void 0 || r === "" ? /* @__PURE__ */ t("div", {
|
|
425
|
+
className: Fe({ tone: n }),
|
|
426
426
|
"data-testid": i,
|
|
427
427
|
children: e
|
|
428
428
|
}) : /* @__PURE__ */ t("div", {
|
|
429
|
-
className:
|
|
429
|
+
className: Fe({ tone: n }),
|
|
430
430
|
role: "group",
|
|
431
431
|
"aria-label": r,
|
|
432
432
|
"data-testid": i,
|
|
433
433
|
children: e
|
|
434
|
-
}),
|
|
434
|
+
}), Le = b("m-0 list-none p-0"), Re = b([
|
|
435
435
|
"flex items-start gap-3 font-body text-body leading-body text-foreground",
|
|
436
436
|
"before:mt-[0.35em] before:size-[calc(var(--tick-length)*0.7)] before:shrink-0 before:rotate-45 before:[border-top:var(--tick-thickness)_solid_var(--color-rule)] before:[border-right:var(--tick-thickness)_solid_var(--color-rule)] before:content-['']",
|
|
437
437
|
"[&:not(:first-child)]:mt-[var(--space-stack)] [&:not(:first-child)]:border-border [&:not(:first-child)]:border-t [&:not(:first-child)]:border-solid [&:not(:first-child)]:pt-[var(--space-stack)]"
|
|
438
|
-
].join(" ")),
|
|
438
|
+
].join(" ")), ze = {
|
|
439
439
|
Root: ({ children: e, testId: n }) => /* @__PURE__ */ t("ul", {
|
|
440
|
-
className:
|
|
440
|
+
className: Le(),
|
|
441
441
|
role: "list",
|
|
442
442
|
"data-testid": n,
|
|
443
443
|
children: e
|
|
444
444
|
}),
|
|
445
445
|
Item: ({ children: e }) => /* @__PURE__ */ t("li", {
|
|
446
|
-
className:
|
|
446
|
+
className: Re(),
|
|
447
447
|
children: e
|
|
448
448
|
})
|
|
449
|
-
},
|
|
449
|
+
}, Be = b("m-0 list-none p-0"), Ve = b("py-[var(--space-collection-item)] [&+li]:border-t [&+li]:border-solid [&+li]:border-border"), He = {
|
|
450
450
|
Root: ({ children: e, testId: n }) => /* @__PURE__ */ t("ul", {
|
|
451
|
-
className:
|
|
451
|
+
className: Be(),
|
|
452
452
|
role: "list",
|
|
453
453
|
"data-testid": n,
|
|
454
454
|
children: e
|
|
455
455
|
}),
|
|
456
456
|
Item: ({ children: e, testId: n }) => /* @__PURE__ */ t("li", {
|
|
457
|
-
className:
|
|
457
|
+
className: Ve(),
|
|
458
458
|
"data-testid": n,
|
|
459
459
|
children: e
|
|
460
460
|
})
|
|
461
|
-
},
|
|
461
|
+
}, Ue = class extends Error {
|
|
462
462
|
constructor(e) {
|
|
463
463
|
super(`DefinitionList configuration is invalid: ${e}`), this.name = "DefinitionListConfigurationError";
|
|
464
464
|
}
|
|
465
|
-
},
|
|
465
|
+
}, We = b("@container", {
|
|
466
466
|
variants: { density: {
|
|
467
467
|
comfortable: "[&>div]:py-[var(--space-definition-item)]",
|
|
468
468
|
compact: "[&>div]:py-[var(--space-definition-item-compact)]"
|
|
469
469
|
} },
|
|
470
470
|
defaultVariants: { density: "comfortable" }
|
|
471
|
-
}),
|
|
471
|
+
}), Ge = b([
|
|
472
472
|
"grid grid-flow-row-dense gap-[var(--space-stack)] border-b border-solid border-border first:border-t",
|
|
473
473
|
"[--definition-stack:clamp(0px,(var(--definition-threshold)-100%)*1000000,100%)]",
|
|
474
474
|
"[--definition-shortfall:clamp(0px,(var(--definition-threshold)-100cqi)*1000000,1px)]",
|
|
@@ -476,46 +476,46 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
476
476
|
"gap-x-[max(0px,var(--space-definition-column)-var(--definition-stack))]",
|
|
477
477
|
"[&>dt]:col-start-1 [&>dt]:self-baseline [&>dd]:col-span-full [&>dd]:self-baseline",
|
|
478
478
|
"[&>dd]:col-start-[calc(2-tan(atan2(var(--definition-shortfall),1px)))]"
|
|
479
|
-
].join(" ")),
|
|
479
|
+
].join(" ")), Ke = b("font-body text-subtitle leading-subtitle text-foreground wrap-break-word"), qe = b("font-body text-body leading-body text-muted max-w-[var(--measure)] wrap-break-word"), Je = {
|
|
480
480
|
weight: 1,
|
|
481
481
|
minWidth: "--definition-term-min-width"
|
|
482
|
-
},
|
|
482
|
+
}, Ye = {
|
|
483
483
|
weight: 2,
|
|
484
484
|
minWidth: "--definition-description-min-width"
|
|
485
|
-
},
|
|
486
|
-
if (!Number.isFinite(t.weight) || t.weight <= 0) throw new
|
|
487
|
-
if (!
|
|
485
|
+
}, Xe = /^--[A-Za-z0-9_-]+$/, Ze = (e, t) => {
|
|
486
|
+
if (!Number.isFinite(t.weight) || t.weight <= 0) throw new Ue(`${e} needs a positive finite weight (got ${t.weight})`);
|
|
487
|
+
if (!Xe.test(t.minWidth)) throw new Ue(`${e} needs a custom-property name such as --summary-term-min-width for minWidth (got ${JSON.stringify(t.minWidth)})`);
|
|
488
488
|
return t;
|
|
489
|
-
},
|
|
489
|
+
}, Qe = (e, t) => {
|
|
490
490
|
let n = e.weight + t.weight;
|
|
491
491
|
return `calc(var(--space-definition-column) + max(var(${e.minWidth}) * ${n / e.weight}, var(${t.minWidth}) * ${n / t.weight}))`;
|
|
492
|
-
},
|
|
493
|
-
Root: ({ density: e, termColumn: n =
|
|
494
|
-
let o =
|
|
495
|
-
"--definition-threshold":
|
|
492
|
+
}, $e = {
|
|
493
|
+
Root: ({ density: e, termColumn: n = Je, descriptionColumn: r = Ye, children: i, testId: a }) => {
|
|
494
|
+
let o = Ze("termColumn", n), s = Ze("descriptionColumn", r), c = {
|
|
495
|
+
"--definition-threshold": Qe(o, s),
|
|
496
496
|
"--definition-term-share": `calc(${o.weight} / ${o.weight + s.weight})`
|
|
497
497
|
};
|
|
498
498
|
return /* @__PURE__ */ t("dl", {
|
|
499
|
-
className:
|
|
499
|
+
className: We({ density: e }),
|
|
500
500
|
style: c,
|
|
501
501
|
"data-testid": a,
|
|
502
502
|
children: i
|
|
503
503
|
});
|
|
504
504
|
},
|
|
505
505
|
Item: ({ children: e, testId: n }) => /* @__PURE__ */ t("div", {
|
|
506
|
-
className:
|
|
506
|
+
className: Ge(),
|
|
507
507
|
"data-testid": n,
|
|
508
508
|
children: e
|
|
509
509
|
}),
|
|
510
510
|
Term: ({ children: e }) => /* @__PURE__ */ t("dt", {
|
|
511
|
-
className:
|
|
511
|
+
className: Ke(),
|
|
512
512
|
children: e
|
|
513
513
|
}),
|
|
514
514
|
Description: ({ children: e }) => /* @__PURE__ */ t("dd", {
|
|
515
|
-
className:
|
|
515
|
+
className: qe(),
|
|
516
516
|
children: e
|
|
517
517
|
})
|
|
518
|
-
},
|
|
518
|
+
}, et = b("block w-full object-cover bg-backing", {
|
|
519
519
|
variants: {
|
|
520
520
|
ratio: {
|
|
521
521
|
portrait: "aspect-portrait",
|
|
@@ -532,13 +532,13 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
532
532
|
}
|
|
533
533
|
},
|
|
534
534
|
defaultVariants: { focus: "center" }
|
|
535
|
-
}),
|
|
535
|
+
}), tt = ({ src: e, alt: r, width: i, height: a, ratio: o, focus: s, responsive: c, caption: l, overlay: u, priority: d, testId: f }) => {
|
|
536
536
|
let p = u != null && typeof u != "boolean", m = /* @__PURE__ */ t("img", {
|
|
537
537
|
src: e,
|
|
538
538
|
alt: r,
|
|
539
539
|
width: i,
|
|
540
540
|
height: a,
|
|
541
|
-
className:
|
|
541
|
+
className: et({
|
|
542
542
|
ratio: o,
|
|
543
543
|
focus: s
|
|
544
544
|
}),
|
|
@@ -561,13 +561,13 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
561
561
|
children: l
|
|
562
562
|
})]
|
|
563
563
|
});
|
|
564
|
-
},
|
|
564
|
+
}, nt = b("inline-block shrink-0 align-[-0.125em] forced-color-adjust-auto", { variants: { color: {
|
|
565
565
|
muted: "text-muted",
|
|
566
566
|
success: "text-success",
|
|
567
567
|
warning: "text-warning",
|
|
568
568
|
error: "text-error",
|
|
569
569
|
info: "text-info"
|
|
570
|
-
} } }),
|
|
570
|
+
} } }), rt = "M3.5 2h9a1 1 0 0 1 1 1v7a1 1 0 0 1-1 1H7.25L4 13.75V11h-.5a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1z", it = {
|
|
571
571
|
plus: ["M3 8h10", "M8 3v10"],
|
|
572
572
|
right: ["M3 8h10", "M9 4l4 4-4 4"],
|
|
573
573
|
remove: ["M3 8h10"],
|
|
@@ -588,12 +588,12 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
588
588
|
"M9.25 7.25v3.5"
|
|
589
589
|
],
|
|
590
590
|
"bubble-exclamation": [
|
|
591
|
-
|
|
591
|
+
rt,
|
|
592
592
|
"M8 4.5v2",
|
|
593
593
|
"M8 8.75h.01"
|
|
594
594
|
],
|
|
595
|
-
"bubble-tick": [
|
|
596
|
-
},
|
|
595
|
+
"bubble-tick": [rt, "M5.75 6.75l1.5 1.5 3-3.5"]
|
|
596
|
+
}, at = ({ name: e, label: n, color: r, testId: i }) => /* @__PURE__ */ t("svg", {
|
|
597
597
|
role: n ? "img" : void 0,
|
|
598
598
|
"aria-label": n || void 0,
|
|
599
599
|
"aria-hidden": !n || void 0,
|
|
@@ -601,9 +601,9 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
601
601
|
viewBox: "0 0 16 16",
|
|
602
602
|
width: "1em",
|
|
603
603
|
height: "1em",
|
|
604
|
-
className:
|
|
604
|
+
className: nt({ color: r }),
|
|
605
605
|
"data-testid": i,
|
|
606
|
-
children:
|
|
606
|
+
children: it[e].map((n) => /* @__PURE__ */ t("path", {
|
|
607
607
|
d: n,
|
|
608
608
|
fill: e === "dot" ? "currentColor" : "none",
|
|
609
609
|
stroke: e === "dot" ? "none" : "currentColor",
|
|
@@ -611,36 +611,36 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
611
611
|
strokeLinecap: "round",
|
|
612
612
|
strokeLinejoin: "round"
|
|
613
613
|
}, n))
|
|
614
|
-
}),
|
|
614
|
+
}), W = (e) => ({ label: n, color: r, testId: i }) => /* @__PURE__ */ t(at, {
|
|
615
615
|
name: e,
|
|
616
616
|
label: n,
|
|
617
617
|
color: r,
|
|
618
618
|
testId: i
|
|
619
|
-
}),
|
|
619
|
+
}), ot = Object.assign(({ name: e, label: n, color: r, testId: i }) => /* @__PURE__ */ t(at, {
|
|
620
620
|
name: e,
|
|
621
621
|
label: n,
|
|
622
622
|
color: r,
|
|
623
623
|
testId: i
|
|
624
624
|
}), {
|
|
625
|
-
Plus:
|
|
626
|
-
Up:
|
|
627
|
-
Down:
|
|
628
|
-
Right:
|
|
629
|
-
Remove:
|
|
630
|
-
}),
|
|
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 {
|
|
631
631
|
constructor(e) {
|
|
632
632
|
super(`Meter configuration is invalid: ${e}`), this.name = "MeterConfigurationError";
|
|
633
633
|
}
|
|
634
|
-
},
|
|
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%)]", {
|
|
635
635
|
variants: { treatment: {
|
|
636
636
|
neutral: "bg-meter-fill",
|
|
637
637
|
depleting: "bg-[color-mix(in_oklab,var(--color-meter-fill)_calc(var(--meter-level)*100%),var(--color-error))]"
|
|
638
638
|
} },
|
|
639
639
|
defaultVariants: { treatment: "neutral" }
|
|
640
|
-
}),
|
|
641
|
-
if (!Number.isFinite(e) || !Number.isFinite(n) || !Number.isFinite(r)) throw new
|
|
642
|
-
if (n >= r) throw new
|
|
643
|
-
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) };
|
|
644
644
|
return /* @__PURE__ */ t("div", {
|
|
645
645
|
role: "meter",
|
|
646
646
|
"aria-valuenow": e,
|
|
@@ -649,28 +649,28 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
649
649
|
"aria-label": a,
|
|
650
650
|
"aria-valuetext": o,
|
|
651
651
|
"data-testid": s,
|
|
652
|
-
className:
|
|
652
|
+
className: ct(),
|
|
653
653
|
style: c,
|
|
654
654
|
children: /* @__PURE__ */ t("div", {
|
|
655
655
|
"aria-hidden": "true",
|
|
656
|
-
className:
|
|
656
|
+
className: lt({ treatment: i })
|
|
657
657
|
})
|
|
658
658
|
});
|
|
659
|
-
},
|
|
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 = {
|
|
660
660
|
Root: ({ children: e, testId: n }) => /* @__PURE__ */ t("div", {
|
|
661
|
-
className:
|
|
661
|
+
className: ft(),
|
|
662
662
|
"data-testid": n,
|
|
663
663
|
children: e
|
|
664
664
|
}),
|
|
665
665
|
Index: ({ number: e, children: r, testId: i }) => /* @__PURE__ */ n("div", {
|
|
666
|
-
className:
|
|
666
|
+
className: pt(),
|
|
667
667
|
"data-testid": i,
|
|
668
668
|
"aria-hidden": "true",
|
|
669
669
|
children: [e !== void 0 && /* @__PURE__ */ t("span", {
|
|
670
|
-
className:
|
|
670
|
+
className: mt(),
|
|
671
671
|
children: e
|
|
672
672
|
}), /* @__PURE__ */ t("span", {
|
|
673
|
-
className:
|
|
673
|
+
className: ht(),
|
|
674
674
|
children: r
|
|
675
675
|
})]
|
|
676
676
|
}),
|
|
@@ -678,15 +678,15 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
678
678
|
"data-testid": n,
|
|
679
679
|
children: e
|
|
680
680
|
})
|
|
681
|
-
},
|
|
681
|
+
}, _t = b("w-full shrink-0 border-t border-solid border-border forced-colors:border-[CanvasText]"), vt = ({ testId: e }) => /* @__PURE__ */ t("div", {
|
|
682
682
|
"aria-hidden": "true",
|
|
683
|
-
className:
|
|
683
|
+
className: _t(),
|
|
684
684
|
"data-testid": e
|
|
685
|
-
}),
|
|
685
|
+
}), yt = class extends Error {
|
|
686
686
|
constructor(e) {
|
|
687
687
|
super(`Table configuration is invalid: ${e}`), this.name = "TableConfigurationError";
|
|
688
688
|
}
|
|
689
|
-
},
|
|
689
|
+
}, bt = "comfortable", xt = "marker", St = b([
|
|
690
690
|
"overflow-x-auto",
|
|
691
691
|
"[&[data-icon-actions]]:p-[calc(var(--focus-ring-width)+var(--focus-ring-offset))]",
|
|
692
692
|
"[&[data-icon-actions]]:m-[calc(-1*(var(--focus-ring-width)+var(--focus-ring-offset)))]",
|
|
@@ -730,11 +730,11 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
730
730
|
}
|
|
731
731
|
},
|
|
732
732
|
defaultVariants: {
|
|
733
|
-
density:
|
|
733
|
+
density: bt,
|
|
734
734
|
captionVisibility: "visible",
|
|
735
|
-
selectionTreatment:
|
|
735
|
+
selectionTreatment: xt
|
|
736
736
|
}
|
|
737
|
-
}),
|
|
737
|
+
}), Ct = b([
|
|
738
738
|
"border-t border-solid border-border",
|
|
739
739
|
"[&[aria-selected=true]>*:first-child]:relative",
|
|
740
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",
|
|
@@ -745,7 +745,7 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
745
745
|
false: ""
|
|
746
746
|
} },
|
|
747
747
|
defaultVariants: { interactive: !1 }
|
|
748
|
-
}),
|
|
748
|
+
}), wt = [
|
|
749
749
|
"a[href]",
|
|
750
750
|
"button",
|
|
751
751
|
"input",
|
|
@@ -771,11 +771,11 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
771
771
|
"[role=\"searchbox\"]",
|
|
772
772
|
"[role=\"slider\"]",
|
|
773
773
|
"[role=\"spinbutton\"]"
|
|
774
|
-
].join(", "),
|
|
774
|
+
].join(", "), Tt = (e, t) => {
|
|
775
775
|
if (!(t instanceof Element)) return !1;
|
|
776
|
-
let n = t.closest(
|
|
776
|
+
let n = t.closest(wt);
|
|
777
777
|
return n !== null && n !== e && e.contains(n);
|
|
778
|
-
},
|
|
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", {
|
|
779
779
|
variants: {
|
|
780
780
|
variant: {
|
|
781
781
|
value: "font-body text-foreground tabular-nums",
|
|
@@ -791,23 +791,23 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
791
791
|
variant: "value",
|
|
792
792
|
align: "left"
|
|
793
793
|
}
|
|
794
|
-
}),
|
|
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", {
|
|
795
795
|
variants: { align: {
|
|
796
796
|
left: "text-left",
|
|
797
797
|
right: "text-right",
|
|
798
798
|
center: "text-center"
|
|
799
799
|
} },
|
|
800
800
|
defaultVariants: { align: "left" }
|
|
801
|
-
}),
|
|
801
|
+
}), kt = (e) => `var(--table-column-${e})`, At = (e, t) => {
|
|
802
802
|
if (e.width === "icon-action") return "max-content";
|
|
803
|
-
let n = e.minWidth === void 0 ? void 0 :
|
|
803
|
+
let n = e.minWidth === void 0 ? void 0 : kt(e.minWidth);
|
|
804
804
|
if (e.width !== void 0) {
|
|
805
|
-
let t =
|
|
805
|
+
let t = kt(e.width);
|
|
806
806
|
return n === void 0 ? t : `max(${n}, ${t})`;
|
|
807
807
|
}
|
|
808
|
-
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})`);
|
|
809
809
|
return `minmax(${n ?? "0"}, ${e.weight}fr)`;
|
|
810
|
-
},
|
|
810
|
+
}, jt = (e) => e === void 0 || e.length === 0 ? void 0 : e.map(At).join(" "), Mt = (e, t, n, r) => {
|
|
811
811
|
let [i, a] = m(0);
|
|
812
812
|
return d(() => {
|
|
813
813
|
let i = e.current;
|
|
@@ -842,16 +842,16 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
842
842
|
n,
|
|
843
843
|
r
|
|
844
844
|
]), i;
|
|
845
|
-
},
|
|
845
|
+
}, Nt = (e) => {
|
|
846
846
|
let t = e.currentTarget;
|
|
847
847
|
if (getComputedStyle(t).getPropertyValue("--_scroll-released").trim() === "1") return;
|
|
848
848
|
let n = e.target;
|
|
849
849
|
if (n === t) return;
|
|
850
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;
|
|
851
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);
|
|
852
|
-
},
|
|
852
|
+
}, Pt = {
|
|
853
853
|
Root: ({ caption: e, captionVisibility: r, bounded: i, selectionTreatment: a, notes: o, columns: s, density: c, children: l, testId: u }) => {
|
|
854
|
-
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", {
|
|
855
855
|
ref: f,
|
|
856
856
|
role: "table",
|
|
857
857
|
children: [/* @__PURE__ */ t("caption", {
|
|
@@ -860,7 +860,7 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
860
860
|
}), l]
|
|
861
861
|
});
|
|
862
862
|
return o === void 0 && !i ? /* @__PURE__ */ t("section", {
|
|
863
|
-
className:
|
|
863
|
+
className: St({
|
|
864
864
|
density: c,
|
|
865
865
|
captionVisibility: r,
|
|
866
866
|
selectionTreatment: a,
|
|
@@ -869,16 +869,16 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
869
869
|
style: v,
|
|
870
870
|
"data-columns": y,
|
|
871
871
|
"data-icon-actions": s?.some((e) => e.width === "icon-action") || void 0,
|
|
872
|
-
"data-density": c ??
|
|
873
|
-
"data-selection-treatment": a ??
|
|
872
|
+
"data-density": c ?? bt,
|
|
873
|
+
"data-selection-treatment": a ?? xt,
|
|
874
874
|
"data-testid": u,
|
|
875
875
|
"aria-label": e,
|
|
876
876
|
tabIndex: 0,
|
|
877
877
|
children: b
|
|
878
878
|
}) : /* @__PURE__ */ t("div", {
|
|
879
879
|
ref: d,
|
|
880
|
-
onFocus: i ?
|
|
881
|
-
className:
|
|
880
|
+
onFocus: i ? Nt : void 0,
|
|
881
|
+
className: St({
|
|
882
882
|
density: c,
|
|
883
883
|
captionVisibility: r,
|
|
884
884
|
selectionTreatment: a,
|
|
@@ -890,8 +890,8 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
890
890
|
"data-notes": o,
|
|
891
891
|
"data-columns": y,
|
|
892
892
|
"data-icon-actions": s?.some((e) => e.width === "icon-action") || void 0,
|
|
893
|
-
"data-density": c ??
|
|
894
|
-
"data-selection-treatment": a ??
|
|
893
|
+
"data-density": c ?? bt,
|
|
894
|
+
"data-selection-treatment": a ?? xt,
|
|
895
895
|
"data-testid": u,
|
|
896
896
|
role: _ ? "group" : void 0,
|
|
897
897
|
"aria-label": _ ? e : void 0,
|
|
@@ -919,13 +919,13 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
919
919
|
return () => e?.unsubscribe();
|
|
920
920
|
}, [i]);
|
|
921
921
|
let s = (e) => {
|
|
922
|
-
|
|
922
|
+
Tt(e.currentTarget, e.target) || r?.next();
|
|
923
923
|
}, c = (e) => {
|
|
924
|
-
e.target !== e.currentTarget || !
|
|
924
|
+
e.target !== e.currentTarget || !Et.has(e.key) || (e.key === " " && e.preventDefault(), e.repeat || r?.next());
|
|
925
925
|
}, l = r !== void 0;
|
|
926
926
|
return /* @__PURE__ */ t("tr", {
|
|
927
927
|
role: "row",
|
|
928
|
-
className:
|
|
928
|
+
className: Ct({ interactive: l }),
|
|
929
929
|
"data-testid": n,
|
|
930
930
|
tabIndex: l ? 0 : void 0,
|
|
931
931
|
"aria-selected": i === void 0 ? void 0 : a,
|
|
@@ -938,19 +938,19 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
938
938
|
role: e === "row" ? "rowheader" : "columnheader",
|
|
939
939
|
scope: e,
|
|
940
940
|
"aria-sort": r,
|
|
941
|
-
className:
|
|
941
|
+
className: Ot({ align: n }),
|
|
942
942
|
children: i
|
|
943
943
|
}),
|
|
944
944
|
Cell: ({ variant: e, align: n, children: r }) => /* @__PURE__ */ t("td", {
|
|
945
945
|
role: "cell",
|
|
946
|
-
className:
|
|
946
|
+
className: Dt({
|
|
947
947
|
variant: e,
|
|
948
948
|
align: n
|
|
949
949
|
}),
|
|
950
950
|
"data-variant": e ?? "value",
|
|
951
951
|
children: r
|
|
952
952
|
})
|
|
953
|
-
},
|
|
953
|
+
}, Ft = b("font-secondary text-label tracking-label font-medium", {
|
|
954
954
|
variants: { color: {
|
|
955
955
|
foreground: "text-foreground",
|
|
956
956
|
muted: "text-muted",
|
|
@@ -960,11 +960,11 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
960
960
|
info: "text-info"
|
|
961
961
|
} },
|
|
962
962
|
defaultVariants: { color: "muted" }
|
|
963
|
-
}),
|
|
964
|
-
className:
|
|
963
|
+
}), It = ({ children: e, color: n, testId: r }) => /* @__PURE__ */ t("p", {
|
|
964
|
+
className: Ft({ color: n }),
|
|
965
965
|
"data-testid": r,
|
|
966
966
|
children: e
|
|
967
|
-
}),
|
|
967
|
+
}), Lt = b("font-heading text-display leading-display tracking-optical max-w-[var(--measure-display)]", {
|
|
968
968
|
variants: { color: {
|
|
969
969
|
foreground: "text-foreground",
|
|
970
970
|
muted: "text-muted",
|
|
@@ -974,11 +974,11 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
974
974
|
info: "text-info"
|
|
975
975
|
} },
|
|
976
976
|
defaultVariants: { color: "foreground" }
|
|
977
|
-
}),
|
|
978
|
-
className:
|
|
977
|
+
}), Rt = ({ children: e, color: n, testId: r }) => /* @__PURE__ */ t("h1", {
|
|
978
|
+
className: Lt({ color: n }),
|
|
979
979
|
"data-testid": r,
|
|
980
980
|
children: e
|
|
981
|
-
}),
|
|
981
|
+
}), zt = b("font-heading text-title leading-title tracking-optical", {
|
|
982
982
|
variants: { color: {
|
|
983
983
|
foreground: "text-foreground",
|
|
984
984
|
muted: "text-muted",
|
|
@@ -988,11 +988,11 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
988
988
|
info: "text-info"
|
|
989
989
|
} },
|
|
990
990
|
defaultVariants: { color: "foreground" }
|
|
991
|
-
}),
|
|
992
|
-
className:
|
|
991
|
+
}), Bt = ({ children: e, color: n, testId: r }) => /* @__PURE__ */ t("h2", {
|
|
992
|
+
className: zt({ color: n }),
|
|
993
993
|
"data-testid": r,
|
|
994
994
|
children: e
|
|
995
|
-
}),
|
|
995
|
+
}), Vt = b("font-heading text-subtitle leading-subtitle", {
|
|
996
996
|
variants: { color: {
|
|
997
997
|
foreground: "text-foreground",
|
|
998
998
|
muted: "text-muted",
|
|
@@ -1002,11 +1002,11 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
1002
1002
|
info: "text-info"
|
|
1003
1003
|
} },
|
|
1004
1004
|
defaultVariants: { color: "foreground" }
|
|
1005
|
-
}),
|
|
1006
|
-
className:
|
|
1005
|
+
}), Ht = ({ children: e, color: n, testId: r }) => /* @__PURE__ */ t("h3", {
|
|
1006
|
+
className: Vt({ color: n }),
|
|
1007
1007
|
"data-testid": r,
|
|
1008
1008
|
children: e
|
|
1009
|
-
}),
|
|
1009
|
+
}), Ut = b("font-heading text-body leading-body font-bold", {
|
|
1010
1010
|
variants: { color: {
|
|
1011
1011
|
foreground: "text-foreground",
|
|
1012
1012
|
muted: "text-muted",
|
|
@@ -1016,11 +1016,11 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
1016
1016
|
info: "text-info"
|
|
1017
1017
|
} },
|
|
1018
1018
|
defaultVariants: { color: "foreground" }
|
|
1019
|
-
}),
|
|
1020
|
-
className:
|
|
1019
|
+
}), Wt = ({ children: e, color: n, testId: r }) => /* @__PURE__ */ t("h4", {
|
|
1020
|
+
className: Ut({ color: n }),
|
|
1021
1021
|
"data-testid": r,
|
|
1022
1022
|
children: e
|
|
1023
|
-
}),
|
|
1023
|
+
}), Gt = b("font-heading text-body leading-body font-semibold", {
|
|
1024
1024
|
variants: { color: {
|
|
1025
1025
|
foreground: "text-foreground",
|
|
1026
1026
|
muted: "text-muted",
|
|
@@ -1030,11 +1030,11 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
1030
1030
|
info: "text-info"
|
|
1031
1031
|
} },
|
|
1032
1032
|
defaultVariants: { color: "foreground" }
|
|
1033
|
-
}),
|
|
1034
|
-
className:
|
|
1033
|
+
}), Kt = ({ children: e, color: n, testId: r }) => /* @__PURE__ */ t("h5", {
|
|
1034
|
+
className: Gt({ color: n }),
|
|
1035
1035
|
"data-testid": r,
|
|
1036
1036
|
children: e
|
|
1037
|
-
}),
|
|
1037
|
+
}), qt = b("font-heading text-body leading-body font-medium", {
|
|
1038
1038
|
variants: { color: {
|
|
1039
1039
|
foreground: "text-foreground",
|
|
1040
1040
|
muted: "text-muted",
|
|
@@ -1044,11 +1044,11 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
1044
1044
|
info: "text-info"
|
|
1045
1045
|
} },
|
|
1046
1046
|
defaultVariants: { color: "foreground" }
|
|
1047
|
-
}),
|
|
1048
|
-
className:
|
|
1047
|
+
}), Jt = ({ children: e, color: n, testId: r }) => /* @__PURE__ */ t("h6", {
|
|
1048
|
+
className: qt({ color: n }),
|
|
1049
1049
|
"data-testid": r,
|
|
1050
1050
|
children: e
|
|
1051
|
-
}),
|
|
1051
|
+
}), Yt = b("font-secondary text-small", {
|
|
1052
1052
|
variants: {
|
|
1053
1053
|
emphasis: {
|
|
1054
1054
|
regular: "",
|
|
@@ -1072,15 +1072,15 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
1072
1072
|
truncate: !1,
|
|
1073
1073
|
emphasis: "regular"
|
|
1074
1074
|
}
|
|
1075
|
-
}),
|
|
1076
|
-
className:
|
|
1075
|
+
}), Xt = ({ children: e, color: n, emphasis: r, truncate: i, testId: a }) => /* @__PURE__ */ t("p", {
|
|
1076
|
+
className: Yt({
|
|
1077
1077
|
color: n,
|
|
1078
1078
|
emphasis: r,
|
|
1079
1079
|
truncate: i
|
|
1080
1080
|
}),
|
|
1081
1081
|
"data-testid": a,
|
|
1082
1082
|
children: e
|
|
1083
|
-
}),
|
|
1083
|
+
}), Zt = b("font-body text-body leading-body", {
|
|
1084
1084
|
variants: {
|
|
1085
1085
|
emphasis: {
|
|
1086
1086
|
regular: "",
|
|
@@ -1104,21 +1104,21 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
1104
1104
|
truncate: !1,
|
|
1105
1105
|
emphasis: "regular"
|
|
1106
1106
|
}
|
|
1107
|
-
}),
|
|
1108
|
-
className:
|
|
1107
|
+
}), Qt = ({ children: e, color: n, emphasis: r, truncate: i, testId: a }) => /* @__PURE__ */ t("p", {
|
|
1108
|
+
className: Zt({
|
|
1109
1109
|
color: n,
|
|
1110
1110
|
emphasis: r,
|
|
1111
1111
|
truncate: i
|
|
1112
1112
|
}),
|
|
1113
1113
|
"data-testid": a,
|
|
1114
1114
|
children: e
|
|
1115
|
-
}),
|
|
1115
|
+
}), $t = b("flex flex-col gap-[var(--space-stack)]", {
|
|
1116
1116
|
variants: { variant: {
|
|
1117
1117
|
default: "max-w-[var(--measure)]",
|
|
1118
1118
|
letter: "min-w-0 max-w-[min(100%,var(--measure-letter))] font-letter text-letter"
|
|
1119
1119
|
} },
|
|
1120
1120
|
defaultVariants: { variant: "default" }
|
|
1121
|
-
}),
|
|
1121
|
+
}), en = a(!1), tn = b("font-body text-lede leading-lede text-foreground"), nn = b("", {
|
|
1122
1122
|
variants: {
|
|
1123
1123
|
letter: {
|
|
1124
1124
|
false: "font-body text-body leading-body",
|
|
@@ -1137,82 +1137,82 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
1137
1137
|
letter: !1,
|
|
1138
1138
|
color: "foreground"
|
|
1139
1139
|
}
|
|
1140
|
-
}),
|
|
1141
|
-
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, {
|
|
1142
1142
|
value: r === "letter",
|
|
1143
1143
|
children: /* @__PURE__ */ t("div", {
|
|
1144
|
-
className:
|
|
1144
|
+
className: $t({ variant: r }),
|
|
1145
1145
|
"data-testid": n,
|
|
1146
1146
|
children: e
|
|
1147
1147
|
})
|
|
1148
1148
|
}),
|
|
1149
1149
|
Lede: ({ children: e }) => /* @__PURE__ */ t("p", {
|
|
1150
|
-
className:
|
|
1150
|
+
className: tn(),
|
|
1151
1151
|
children: e
|
|
1152
1152
|
}),
|
|
1153
1153
|
Body: ({ color: e, children: n }) => /* @__PURE__ */ t("p", {
|
|
1154
|
-
className:
|
|
1154
|
+
className: nn({
|
|
1155
1155
|
color: e,
|
|
1156
|
-
letter: c(
|
|
1156
|
+
letter: c(en)
|
|
1157
1157
|
}),
|
|
1158
1158
|
children: n
|
|
1159
1159
|
}),
|
|
1160
1160
|
Tail: ({ children: e }) => /* @__PURE__ */ t("p", {
|
|
1161
|
-
className:
|
|
1161
|
+
className: rn(),
|
|
1162
1162
|
children: e
|
|
1163
1163
|
})
|
|
1164
|
-
},
|
|
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)]", {
|
|
1165
1165
|
variants: { variant: {
|
|
1166
|
-
primary: `${
|
|
1167
|
-
secondary: `${
|
|
1168
|
-
ghost: `${
|
|
1169
|
-
outlined: `${
|
|
1170
|
-
destructive: `${
|
|
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`,
|
|
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`,
|
|
1168
|
+
ghost: `${G} px-2 py-2 min-w-0 bg-transparent text-foreground hover:underline hover:decoration-[length:var(--underline-thickness)] hover:underline-offset-[var(--underline-offset)] disabled:bg-disabled disabled:hover:bg-disabled-hover`,
|
|
1169
|
+
outlined: `${G} px-[calc(1rem_-_1px)] sm:px-[calc(1.5rem_-_1px)] py-[calc(0.5rem_-_1px)] min-w-[min(var(--control-min-width),100%)] border border-solid border-secondary bg-transparent text-secondary hover:bg-backing disabled:border-disabled disabled:text-muted disabled:hover:bg-transparent`,
|
|
1170
|
+
destructive: `${G} px-4 sm:px-6 py-2 min-w-[min(var(--control-min-width),100%)] bg-error text-error-foreground hover:bg-error-hover disabled:bg-disabled disabled:hover:bg-disabled-hover forced-colors:border`,
|
|
1171
1171
|
link: "inline p-0 min-w-0 max-w-full whitespace-normal wrap-anywhere bg-transparent [font:inherit] [letter-spacing:inherit] [text-align:inherit] text-link underline decoration-[length:var(--underline-thickness)] underline-offset-[var(--underline-offset)] enabled:hover:decoration-[length:var(--underline-thickness-hover)] disabled:text-disabled",
|
|
1172
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"
|
|
1173
1173
|
} },
|
|
1174
1174
|
defaultVariants: { variant: "primary" }
|
|
1175
|
-
}),
|
|
1175
|
+
}), sn = ({ children: e, disabled: n, testId: r, variant: i, onClick$: a, ariaLabel: o, type: s = "button" }) => /* @__PURE__ */ t("button", {
|
|
1176
1176
|
type: s,
|
|
1177
1177
|
"data-testid": r,
|
|
1178
|
-
className:
|
|
1178
|
+
className: on({ variant: i }),
|
|
1179
1179
|
onClick: () => a?.next(),
|
|
1180
1180
|
disabled: n,
|
|
1181
1181
|
"aria-label": o,
|
|
1182
1182
|
children: e
|
|
1183
|
-
}),
|
|
1183
|
+
}), cn = class extends Error {
|
|
1184
1184
|
constructor(e) {
|
|
1185
1185
|
super(`Choices.${e} must be composed inside Choices.Root`), this.name = "ChoicesCompositionError";
|
|
1186
1186
|
}
|
|
1187
|
-
},
|
|
1187
|
+
}, ln = b("flex min-w-0 gap-[var(--space-stack)]", {
|
|
1188
1188
|
variants: { arrangement: {
|
|
1189
1189
|
vertical: "flex-col [&>[role=radio]]:w-full",
|
|
1190
1190
|
wrapping: "flex-row flex-wrap items-start"
|
|
1191
1191
|
} },
|
|
1192
1192
|
defaultVariants: { arrangement: "vertical" }
|
|
1193
|
-
}),
|
|
1193
|
+
}), un = b([
|
|
1194
1194
|
"group/choice flex min-w-0 max-w-full flex-none flex-row items-start gap-3 text-left wrap-anywhere",
|
|
1195
1195
|
"rounded-[var(--radius-control)] border border-solid border-control-border bg-transparent aria-checked:border-foreground",
|
|
1196
1196
|
"px-3 py-2",
|
|
1197
1197
|
"cursor-pointer disabled:cursor-not-allowed",
|
|
1198
1198
|
"transition-colors duration-[var(--motion-duration-color)]",
|
|
1199
1199
|
"outline-focus-ring outline-offset-[var(--focus-ring-offset)] focus-visible:outline focus-visible:outline-[length:var(--focus-ring-width)]"
|
|
1200
|
-
].join(" ")),
|
|
1201
|
-
let t = c(
|
|
1202
|
-
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);
|
|
1203
1203
|
return t;
|
|
1204
|
-
},
|
|
1204
|
+
}, pn = (e, t) => {
|
|
1205
1205
|
let n = e.closest("[role=\"radiogroup\"]");
|
|
1206
1206
|
if (n === null) return;
|
|
1207
1207
|
let r = Array.from(n.querySelectorAll(":scope > [role=\"radio\"]"));
|
|
1208
1208
|
return r[(r.indexOf(e) + t + r.length) % r.length];
|
|
1209
|
-
},
|
|
1209
|
+
}, mn = {
|
|
1210
1210
|
ArrowDown: 1,
|
|
1211
1211
|
ArrowRight: 1,
|
|
1212
1212
|
ArrowUp: -1,
|
|
1213
1213
|
ArrowLeft: -1
|
|
1214
|
-
},
|
|
1215
|
-
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, {
|
|
1216
1216
|
value: {
|
|
1217
1217
|
selected: n,
|
|
1218
1218
|
onSelect$: r,
|
|
@@ -1222,13 +1222,13 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
1222
1222
|
role: "radiogroup",
|
|
1223
1223
|
"aria-label": i,
|
|
1224
1224
|
"aria-disabled": a === !0 ? "true" : void 0,
|
|
1225
|
-
className:
|
|
1225
|
+
className: ln({ arrangement: e }),
|
|
1226
1226
|
"data-testid": s,
|
|
1227
1227
|
children: o
|
|
1228
1228
|
})
|
|
1229
1229
|
}),
|
|
1230
1230
|
Choice: ({ value: e, children: r, description: i, testId: a }) => {
|
|
1231
|
-
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`;
|
|
1232
1232
|
return /* @__PURE__ */ n("button", {
|
|
1233
1233
|
type: "button",
|
|
1234
1234
|
role: "radio",
|
|
@@ -1239,15 +1239,15 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
1239
1239
|
disabled: c,
|
|
1240
1240
|
"data-value": e,
|
|
1241
1241
|
"data-testid": a,
|
|
1242
|
-
className:
|
|
1242
|
+
className: un(),
|
|
1243
1243
|
onClick: () => {
|
|
1244
1244
|
l || s.next(e);
|
|
1245
1245
|
},
|
|
1246
1246
|
onKeyDown: (e) => {
|
|
1247
|
-
let t =
|
|
1247
|
+
let t = mn[e.key];
|
|
1248
1248
|
if (t === void 0 || c) return;
|
|
1249
1249
|
e.preventDefault();
|
|
1250
|
-
let n =
|
|
1250
|
+
let n = pn(e.currentTarget, t);
|
|
1251
1251
|
if (n === void 0) return;
|
|
1252
1252
|
n.focus();
|
|
1253
1253
|
let r = n.dataset.value;
|
|
@@ -1273,14 +1273,14 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
1273
1273
|
})]
|
|
1274
1274
|
});
|
|
1275
1275
|
}
|
|
1276
|
-
},
|
|
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", {
|
|
1277
1277
|
variants: { variant: {
|
|
1278
1278
|
text: "",
|
|
1279
1279
|
email: "",
|
|
1280
1280
|
url: ""
|
|
1281
1281
|
} },
|
|
1282
1282
|
defaultVariants: { variant: "text" }
|
|
1283
|
-
}),
|
|
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 }) => {
|
|
1284
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);
|
|
1285
1285
|
return l(() => {
|
|
1286
1286
|
let e = v?.subscribe(() => {
|
|
@@ -1300,7 +1300,7 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
1300
1300
|
id: x,
|
|
1301
1301
|
name: r,
|
|
1302
1302
|
type: i ?? "text",
|
|
1303
|
-
className:
|
|
1303
|
+
className: gn({ variant: i }),
|
|
1304
1304
|
required: a,
|
|
1305
1305
|
disabled: c,
|
|
1306
1306
|
defaultValue: d,
|
|
@@ -1327,7 +1327,7 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
1327
1327
|
})
|
|
1328
1328
|
]
|
|
1329
1329
|
});
|
|
1330
|
-
},
|
|
1330
|
+
}, vn = b("outline-focus-ring outline-offset-[var(--focus-ring-offset)] focus-visible:outline focus-visible:outline-[length:var(--focus-ring-width)]", {
|
|
1331
1331
|
variants: { treatment: {
|
|
1332
1332
|
prose: "text-link underline decoration-[length:var(--underline-thickness)] underline-offset-[var(--underline-offset)] hover:decoration-[length:var(--underline-thickness-hover)]",
|
|
1333
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",
|
|
@@ -1335,15 +1335,15 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
1335
1335
|
graphic: "text-inherit no-underline"
|
|
1336
1336
|
} },
|
|
1337
1337
|
defaultVariants: { treatment: "prose" }
|
|
1338
|
-
}),
|
|
1338
|
+
}), yn = ({ href: e, children: n, treatment: r, external: i, current: a, testId: o }) => /* @__PURE__ */ t("a", {
|
|
1339
1339
|
href: e,
|
|
1340
|
-
className:
|
|
1340
|
+
className: vn({ treatment: r }),
|
|
1341
1341
|
target: i ? "_blank" : void 0,
|
|
1342
1342
|
rel: i ? "noopener noreferrer" : void 0,
|
|
1343
1343
|
"aria-current": a ? "page" : void 0,
|
|
1344
1344
|
"data-testid": o,
|
|
1345
1345
|
children: n
|
|
1346
|
-
}),
|
|
1346
|
+
}), bn = (e, t, n, r) => {
|
|
1347
1347
|
let i = Math.max(e.length - 1, 0) * r;
|
|
1348
1348
|
if (e.reduce((e, t) => e + t, 0) + i <= n) return e.length;
|
|
1349
1349
|
let a = 0, o = t;
|
|
@@ -1352,11 +1352,11 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
1352
1352
|
o += t + r, a += 1;
|
|
1353
1353
|
}
|
|
1354
1354
|
return a;
|
|
1355
|
-
},
|
|
1355
|
+
}, xn = class extends Error {
|
|
1356
1356
|
constructor(e) {
|
|
1357
1357
|
super(`MultiSelect.${e} must be composed inside MultiSelect.Root`), this.name = "MultiSelectCompositionError";
|
|
1358
1358
|
}
|
|
1359
|
-
},
|
|
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("", {
|
|
1360
1360
|
variants: { part: {
|
|
1361
1361
|
root: [
|
|
1362
1362
|
"relative flex flex-col gap-[var(--space-stack)]",
|
|
@@ -1369,7 +1369,7 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
1369
1369
|
"font-control text-body text-foreground transition-colors duration-[var(--motion-duration-color)]",
|
|
1370
1370
|
"data-[disabled]:border-disabled data-[disabled]:text-muted"
|
|
1371
1371
|
].join(" "),
|
|
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 ${
|
|
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}`,
|
|
1373
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",
|
|
1374
1374
|
track: "relative flex min-h-[calc(var(--text-body)*var(--leading-body))] items-center gap-1",
|
|
1375
1375
|
chip: [
|
|
@@ -1377,9 +1377,9 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
1377
1377
|
"rounded-[var(--radius-control)] bg-backing py-0.5 pr-0.5 pl-2 font-secondary text-small text-foreground",
|
|
1378
1378
|
"group-data-[disabled]/field:text-muted data-[overflow]:invisible data-[overflow]:absolute"
|
|
1379
1379
|
].join(" "),
|
|
1380
|
-
count:
|
|
1381
|
-
countMeasure: `${
|
|
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 ${
|
|
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}`,
|
|
1383
1383
|
surface: [
|
|
1384
1384
|
"absolute left-0 right-0 z-10 flex flex-col gap-1 overflow-y-auto p-1",
|
|
1385
1385
|
"rounded-[var(--radius-control)] border border-solid border-border bg-surface shadow-[var(--elevation-floating)]",
|
|
@@ -1388,22 +1388,22 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
1388
1388
|
].join(" ")
|
|
1389
1389
|
} },
|
|
1390
1390
|
defaultVariants: { part: "root" }
|
|
1391
|
-
}),
|
|
1391
|
+
}), wn = b([
|
|
1392
1392
|
"group/option flex w-full flex-row items-center gap-3 text-left",
|
|
1393
1393
|
"rounded-[var(--radius-control)] bg-transparent px-3 py-2 hover:bg-backing",
|
|
1394
1394
|
"cursor-pointer disabled:cursor-not-allowed",
|
|
1395
1395
|
"transition-colors duration-[var(--motion-duration-color)]",
|
|
1396
1396
|
"outline-focus-ring outline-offset-[var(--focus-ring-offset)] focus-visible:outline focus-visible:outline-[length:var(--focus-ring-width)]"
|
|
1397
|
-
].join(" ")),
|
|
1398
|
-
let t = c(
|
|
1399
|
-
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);
|
|
1400
1400
|
return t;
|
|
1401
|
-
},
|
|
1401
|
+
}, q = (e) => (t) => {
|
|
1402
1402
|
e.current = t ?? void 0;
|
|
1403
|
-
},
|
|
1403
|
+
}, On = (e) => e.getBoundingClientRect().width, kn = (e) => r.toArray(e).flatMap((e) => {
|
|
1404
1404
|
if (!o(e)) return [];
|
|
1405
|
-
if (e.type === i) return
|
|
1406
|
-
if (e.type ===
|
|
1405
|
+
if (e.type === i) return kn(e.props.children);
|
|
1406
|
+
if (e.type === Rn) {
|
|
1407
1407
|
let { value: t, children: n } = e.props;
|
|
1408
1408
|
return [{
|
|
1409
1409
|
value: t,
|
|
@@ -1411,19 +1411,19 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
1411
1411
|
}];
|
|
1412
1412
|
}
|
|
1413
1413
|
return [];
|
|
1414
|
-
}),
|
|
1414
|
+
}), An = (e) => Array.from(e.querySelectorAll("[data-multiselect-chip]:not([data-overflow]) button")), jn = (e) => {
|
|
1415
1415
|
let t = document.activeElement;
|
|
1416
1416
|
return !e.contains(t) || t instanceof Element && t.closest("[data-overflow]") !== null;
|
|
1417
|
-
},
|
|
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) => {
|
|
1418
1418
|
switch (e.kind) {
|
|
1419
|
-
case "firstOption": return r === void 0 ? void 0 :
|
|
1419
|
+
case "firstOption": return r === void 0 ? void 0 : Mn(r);
|
|
1420
1420
|
case "afterRemoval": {
|
|
1421
|
-
let r =
|
|
1421
|
+
let r = An(t);
|
|
1422
1422
|
return r[e.index] ?? r[e.index - 1] ?? n;
|
|
1423
1423
|
}
|
|
1424
1424
|
case "afterClear": return n;
|
|
1425
1425
|
}
|
|
1426
|
-
},
|
|
1426
|
+
}, In = () => /* @__PURE__ */ t("svg", {
|
|
1427
1427
|
"aria-hidden": !0,
|
|
1428
1428
|
focusable: !1,
|
|
1429
1429
|
viewBox: "0 0 16 16",
|
|
@@ -1435,8 +1435,8 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
1435
1435
|
strokeWidth: 1.5,
|
|
1436
1436
|
strokeLinecap: "round"
|
|
1437
1437
|
})
|
|
1438
|
-
}),
|
|
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 =
|
|
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;
|
|
1440
1440
|
d(() => {
|
|
1441
1441
|
te([]);
|
|
1442
1442
|
let e = r.subscribe((e) => te(e));
|
|
@@ -1451,12 +1451,12 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
1451
1451
|
}, []), d(() => {
|
|
1452
1452
|
let e = A.current;
|
|
1453
1453
|
if (e === void 0) return;
|
|
1454
|
-
let t = Array.from(e.querySelectorAll("[data-multiselect-chip]")), n = e.querySelector("[data-multiselect-count]"), r = Number.parseFloat(getComputedStyle(e).columnGap) || 0, i =
|
|
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
1455
|
ie((e) => e === i ? e : i);
|
|
1456
1456
|
}), d(() => {
|
|
1457
1457
|
let e = se.current, t = j.current;
|
|
1458
1458
|
if (!P || e === void 0 || t === void 0) return;
|
|
1459
|
-
let n = e.getBoundingClientRect(), r = window.innerHeight - n.bottom -
|
|
1459
|
+
let n = e.getBoundingClientRect(), r = window.innerHeight - n.bottom - Tn, i = n.top - Tn, a = t.scrollHeight > r && i > r;
|
|
1460
1460
|
t.style.setProperty("--multiselect-surface-max-height", `${Math.max(a ? i : r, 0)}px`), ae(a ? "above" : "below");
|
|
1461
1461
|
}), l(() => {
|
|
1462
1462
|
if (!P) return;
|
|
@@ -1469,15 +1469,15 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
1469
1469
|
let e = O.current, t = k.current;
|
|
1470
1470
|
if (e === void 0 || t === void 0) return;
|
|
1471
1471
|
let n = M.current;
|
|
1472
|
-
n !== void 0 &&
|
|
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);
|
|
1473
1473
|
});
|
|
1474
|
-
let
|
|
1475
|
-
i.next(
|
|
1476
|
-
},
|
|
1474
|
+
let z = (e) => {
|
|
1475
|
+
i.next(Nn(ce, e));
|
|
1476
|
+
}, le = (e) => {
|
|
1477
1477
|
if (T) return;
|
|
1478
1478
|
let t = new Set(F);
|
|
1479
|
-
t.delete(e) || t.add(e),
|
|
1480
|
-
},
|
|
1479
|
+
t.delete(e) || t.add(e), z(t);
|
|
1480
|
+
}, ue = (e, t) => (n) => {
|
|
1481
1481
|
if (T) return;
|
|
1482
1482
|
document.activeElement === n.currentTarget && (M.current = {
|
|
1483
1483
|
kind: "afterRemoval",
|
|
@@ -1485,39 +1485,39 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
1485
1485
|
control: n.currentTarget
|
|
1486
1486
|
});
|
|
1487
1487
|
let r = new Set(F);
|
|
1488
|
-
r.delete(e),
|
|
1489
|
-
},
|
|
1488
|
+
r.delete(e), z(r);
|
|
1489
|
+
}, B = (e) => {
|
|
1490
1490
|
T || (document.activeElement === e.currentTarget && (M.current = {
|
|
1491
1491
|
kind: "afterClear",
|
|
1492
1492
|
control: e.currentTarget
|
|
1493
1493
|
}), i.next([]));
|
|
1494
|
-
},
|
|
1494
|
+
}, V = (e) => {
|
|
1495
1495
|
T || (e.detail === 0 && (M.current = { kind: "firstOption" }), E(!0));
|
|
1496
|
-
},
|
|
1497
|
-
P ? E(!1) :
|
|
1498
|
-
},
|
|
1496
|
+
}, de = (e) => {
|
|
1497
|
+
P ? E(!1) : V(e);
|
|
1498
|
+
}, H = (e) => {
|
|
1499
1499
|
if (e.key !== "ArrowDown" || T) return;
|
|
1500
1500
|
e.preventDefault();
|
|
1501
1501
|
let t = j.current;
|
|
1502
|
-
P && t !== void 0 ?
|
|
1503
|
-
},
|
|
1502
|
+
P && t !== void 0 ? Mn(t)?.focus() : (M.current = { kind: "firstOption" }, E(!0));
|
|
1503
|
+
}, fe = (e) => {
|
|
1504
1504
|
e.key !== "Escape" || !P || (e.preventDefault(), e.stopPropagation(), E(!1), k.current?.focus());
|
|
1505
|
-
},
|
|
1505
|
+
}, pe = (e) => {
|
|
1506
1506
|
N.current = !0;
|
|
1507
1507
|
let t = M.current;
|
|
1508
1508
|
t !== void 0 && t.kind !== "firstOption" && e.target !== t.control && (M.current = void 0);
|
|
1509
|
-
},
|
|
1509
|
+
}, U = (e) => {
|
|
1510
1510
|
let t = O.current, n = e.relatedTarget;
|
|
1511
1511
|
t !== void 0 && n instanceof Node && t.contains(n) || e.target.isConnected && (N.current = !1, M.current = void 0, E(!1));
|
|
1512
|
-
},
|
|
1512
|
+
}, me = (e) => {
|
|
1513
1513
|
(!(e.target instanceof Element) || e.target.closest("button") === null) && e.preventDefault();
|
|
1514
|
-
},
|
|
1514
|
+
}, he = [I.length === 0 ? w : void 0, h ? C : void 0].filter(Boolean).join(" ") || void 0;
|
|
1515
1515
|
return /* @__PURE__ */ n("div", {
|
|
1516
|
-
ref:
|
|
1517
|
-
className:
|
|
1518
|
-
onKeyDown:
|
|
1519
|
-
onFocus:
|
|
1520
|
-
onBlur:
|
|
1516
|
+
ref: q(O),
|
|
1517
|
+
className: K(),
|
|
1518
|
+
onKeyDown: fe,
|
|
1519
|
+
onFocus: pe,
|
|
1520
|
+
onBlur: U,
|
|
1521
1521
|
children: [
|
|
1522
1522
|
/* @__PURE__ */ t("label", {
|
|
1523
1523
|
id: b,
|
|
@@ -1525,24 +1525,24 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
1525
1525
|
children: e
|
|
1526
1526
|
}),
|
|
1527
1527
|
/* @__PURE__ */ n("div", {
|
|
1528
|
-
ref:
|
|
1528
|
+
ref: q(se),
|
|
1529
1529
|
"data-multiselect-field": !0,
|
|
1530
1530
|
"data-disabled": T || void 0,
|
|
1531
|
-
className:
|
|
1531
|
+
className: K({ part: "field" }),
|
|
1532
1532
|
children: [
|
|
1533
1533
|
/* @__PURE__ */ t("button", {
|
|
1534
|
-
ref:
|
|
1534
|
+
ref: q(k),
|
|
1535
1535
|
id: x,
|
|
1536
1536
|
type: "button",
|
|
1537
1537
|
"aria-labelledby": b,
|
|
1538
1538
|
"aria-expanded": P,
|
|
1539
1539
|
"aria-controls": P ? S : void 0,
|
|
1540
|
-
"aria-describedby":
|
|
1540
|
+
"aria-describedby": he,
|
|
1541
1541
|
disabled: T,
|
|
1542
1542
|
"data-testid": _,
|
|
1543
|
-
className:
|
|
1544
|
-
onClick:
|
|
1545
|
-
onKeyDown:
|
|
1543
|
+
className: K({ part: "trigger" }),
|
|
1544
|
+
onClick: de,
|
|
1545
|
+
onKeyDown: H,
|
|
1546
1546
|
children: /* @__PURE__ */ t("svg", {
|
|
1547
1547
|
"aria-hidden": !0,
|
|
1548
1548
|
focusable: !1,
|
|
@@ -1559,11 +1559,11 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
1559
1559
|
})
|
|
1560
1560
|
}),
|
|
1561
1561
|
/* @__PURE__ */ t("div", {
|
|
1562
|
-
className:
|
|
1562
|
+
className: K({ part: "clip" }),
|
|
1563
1563
|
children: /* @__PURE__ */ n("div", {
|
|
1564
|
-
ref:
|
|
1564
|
+
ref: q(A),
|
|
1565
1565
|
"data-multiselect-track": !0,
|
|
1566
|
-
className:
|
|
1566
|
+
className: K({ part: "track" }),
|
|
1567
1567
|
children: [
|
|
1568
1568
|
I.length === 0 && /* @__PURE__ */ t("span", {
|
|
1569
1569
|
id: w,
|
|
@@ -1571,13 +1571,13 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
1571
1571
|
children: a
|
|
1572
1572
|
}),
|
|
1573
1573
|
I.map(({ value: e, label: r }, i) => {
|
|
1574
|
-
let a = i >=
|
|
1574
|
+
let a = i >= L;
|
|
1575
1575
|
return /* @__PURE__ */ n("span", {
|
|
1576
1576
|
"data-multiselect-chip": !0,
|
|
1577
1577
|
"data-overflow": a || void 0,
|
|
1578
1578
|
"aria-hidden": a || void 0,
|
|
1579
1579
|
inert: a || void 0,
|
|
1580
|
-
className:
|
|
1580
|
+
className: K({ part: "chip" }),
|
|
1581
1581
|
children: [/* @__PURE__ */ t("span", {
|
|
1582
1582
|
className: "truncate",
|
|
1583
1583
|
children: r
|
|
@@ -1586,23 +1586,23 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
1586
1586
|
"aria-label": o.replaceAll("{label}", r),
|
|
1587
1587
|
disabled: T,
|
|
1588
1588
|
tabIndex: a ? -1 : void 0,
|
|
1589
|
-
className:
|
|
1590
|
-
onClick:
|
|
1591
|
-
children: /* @__PURE__ */ t(
|
|
1589
|
+
className: K({ part: "iconButton" }),
|
|
1590
|
+
onClick: ue(e, i),
|
|
1591
|
+
children: /* @__PURE__ */ t(In, {})
|
|
1592
1592
|
})]
|
|
1593
1593
|
}, e);
|
|
1594
1594
|
}),
|
|
1595
|
-
|
|
1595
|
+
R > 0 && /* @__PURE__ */ t("button", {
|
|
1596
1596
|
type: "button",
|
|
1597
1597
|
disabled: T,
|
|
1598
|
-
className:
|
|
1599
|
-
onClick:
|
|
1600
|
-
children: c.replaceAll("{count}", String(
|
|
1598
|
+
className: K({ part: "count" }),
|
|
1599
|
+
onClick: V,
|
|
1600
|
+
children: c.replaceAll("{count}", String(R))
|
|
1601
1601
|
}),
|
|
1602
1602
|
I.length > 0 && /* @__PURE__ */ t("span", {
|
|
1603
1603
|
"aria-hidden": !0,
|
|
1604
1604
|
"data-multiselect-count": !0,
|
|
1605
|
-
className:
|
|
1605
|
+
className: K({ part: "countMeasure" }),
|
|
1606
1606
|
children: c.replaceAll("{count}", String(I.length))
|
|
1607
1607
|
})
|
|
1608
1608
|
]
|
|
@@ -1612,9 +1612,9 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
1612
1612
|
type: "button",
|
|
1613
1613
|
"aria-label": s,
|
|
1614
1614
|
disabled: T,
|
|
1615
|
-
className:
|
|
1616
|
-
onClick:
|
|
1617
|
-
children: /* @__PURE__ */ t(
|
|
1615
|
+
className: K({ part: "iconButton" }),
|
|
1616
|
+
onClick: B,
|
|
1617
|
+
children: /* @__PURE__ */ t(In, {})
|
|
1618
1618
|
}) : /* @__PURE__ */ t("span", {
|
|
1619
1619
|
"aria-hidden": !0,
|
|
1620
1620
|
className: "size-6 shrink-0"
|
|
@@ -1624,18 +1624,18 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
1624
1624
|
className: "size-6 shrink-0"
|
|
1625
1625
|
}),
|
|
1626
1626
|
P && /* @__PURE__ */ t("div", {
|
|
1627
|
-
ref:
|
|
1627
|
+
ref: q(j),
|
|
1628
1628
|
id: S,
|
|
1629
1629
|
role: "group",
|
|
1630
1630
|
"aria-labelledby": b,
|
|
1631
1631
|
"data-placement": D,
|
|
1632
|
-
className:
|
|
1633
|
-
onMouseDown:
|
|
1634
|
-
children: /* @__PURE__ */ t(
|
|
1632
|
+
className: K({ part: "surface" }),
|
|
1633
|
+
onMouseDown: me,
|
|
1634
|
+
children: /* @__PURE__ */ t(En, {
|
|
1635
1635
|
value: {
|
|
1636
1636
|
selected: F,
|
|
1637
1637
|
disabled: T,
|
|
1638
|
-
toggle:
|
|
1638
|
+
toggle: le
|
|
1639
1639
|
},
|
|
1640
1640
|
children: v
|
|
1641
1641
|
})
|
|
@@ -1648,15 +1648,15 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
1648
1648
|
})
|
|
1649
1649
|
]
|
|
1650
1650
|
});
|
|
1651
|
-
},
|
|
1652
|
-
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);
|
|
1653
1653
|
return /* @__PURE__ */ n("button", {
|
|
1654
1654
|
type: "button",
|
|
1655
1655
|
role: "checkbox",
|
|
1656
1656
|
"aria-checked": c,
|
|
1657
1657
|
disabled: o,
|
|
1658
1658
|
"data-testid": i,
|
|
1659
|
-
className:
|
|
1659
|
+
className: wn(),
|
|
1660
1660
|
onClick: () => s(e),
|
|
1661
1661
|
children: [/* @__PURE__ */ t("span", {
|
|
1662
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",
|
|
@@ -1679,10 +1679,10 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
1679
1679
|
children: r
|
|
1680
1680
|
})]
|
|
1681
1681
|
});
|
|
1682
|
-
},
|
|
1683
|
-
Root:
|
|
1684
|
-
Option:
|
|
1685
|
-
},
|
|
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: _ }) => {
|
|
1686
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);
|
|
1687
1687
|
return l(() => {
|
|
1688
1688
|
let e = g?.subscribe(() => {
|
|
@@ -1703,7 +1703,7 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
1703
1703
|
name: r,
|
|
1704
1704
|
type: "text",
|
|
1705
1705
|
inputMode: "decimal",
|
|
1706
|
-
className:
|
|
1706
|
+
className: Bn(),
|
|
1707
1707
|
required: i,
|
|
1708
1708
|
disabled: d,
|
|
1709
1709
|
defaultValue: m,
|
|
@@ -1729,7 +1729,7 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
1729
1729
|
})
|
|
1730
1730
|
]
|
|
1731
1731
|
});
|
|
1732
|
-
},
|
|
1732
|
+
}, Hn = b([
|
|
1733
1733
|
"flex flex-col gap-[var(--space-stack)]",
|
|
1734
1734
|
"[&>label]:font-secondary [&>label]:font-medium [&>label]:text-body [&>label]:text-foreground",
|
|
1735
1735
|
"[&>span]:font-secondary [&>span]:text-muted [&>span]:text-small",
|
|
@@ -1738,11 +1738,11 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
1738
1738
|
"[&>select]:font-control [&>select]:text-body [&>select]:text-foreground [&>select]:transition-colors [&>select]:duration-[var(--motion-duration-color)]",
|
|
1739
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)]",
|
|
1740
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"
|
|
1741
|
-
].join(" ")),
|
|
1741
|
+
].join(" ")), Un = {
|
|
1742
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 }) => {
|
|
1743
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;
|
|
1744
1744
|
return /* @__PURE__ */ n("div", {
|
|
1745
|
-
className:
|
|
1745
|
+
className: Hn(),
|
|
1746
1746
|
children: [
|
|
1747
1747
|
/* @__PURE__ */ t("label", {
|
|
1748
1748
|
htmlFor: _,
|
|
@@ -1781,11 +1781,11 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
1781
1781
|
"data-testid": r,
|
|
1782
1782
|
children: n
|
|
1783
1783
|
})
|
|
1784
|
-
},
|
|
1784
|
+
}, J = class extends Error {
|
|
1785
1785
|
constructor(e) {
|
|
1786
1786
|
super(`Slider configuration: ${e}`), this.name = "SliderConfigurationError";
|
|
1787
1787
|
}
|
|
1788
|
-
},
|
|
1788
|
+
}, Wn = b([
|
|
1789
1789
|
"block h-[var(--slider-thumb-size)] w-full cursor-pointer appearance-none bg-transparent",
|
|
1790
1790
|
"disabled:cursor-not-allowed",
|
|
1791
1791
|
"outline-focus-ring outline-offset-[var(--focus-ring-offset)] focus-visible:outline focus-visible:outline-[length:var(--focus-ring-width)]",
|
|
@@ -1796,13 +1796,13 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
1796
1796
|
"[&::-moz-range-track]:h-[var(--slider-track-thickness)] [&::-moz-range-track]:rounded-[var(--radius-control)] [&::-moz-range-track]:bg-control-border",
|
|
1797
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",
|
|
1798
1798
|
"[&:disabled::-moz-range-track]:bg-disabled [&:disabled::-moz-range-thumb]:bg-disabled"
|
|
1799
|
-
].join(" ")),
|
|
1800
|
-
for (let [t, n] of Object.entries(e)) if (!Number.isFinite(n)) throw new
|
|
1801
|
-
if (e.min >= e.max) throw new
|
|
1802
|
-
if (e.step <= 0) throw new
|
|
1803
|
-
},
|
|
1799
|
+
].join(" ")), Gn = (e) => {
|
|
1800
|
+
for (let [t, n] of Object.entries(e)) if (!Number.isFinite(n)) throw new J(`\`${t}\` must be a finite number, got ${n}`);
|
|
1801
|
+
if (e.min >= e.max) throw new J(`\`min\` (${e.min}) must be below \`max\` (${e.max})`);
|
|
1802
|
+
if (e.step <= 0) throw new J(`\`step\` (${e.step}) must be positive`);
|
|
1803
|
+
}, Kn = ({ min: e, max: r, step: i = 1, value: a, onInput$: o, label: s, visibleValue: c, valueText: l, disabled: d, testId: f }) => {
|
|
1804
1804
|
let p = `${u()}-control`;
|
|
1805
|
-
|
|
1805
|
+
Gn({
|
|
1806
1806
|
min: e,
|
|
1807
1807
|
max: r,
|
|
1808
1808
|
step: i,
|
|
@@ -1825,7 +1825,7 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
1825
1825
|
}), /* @__PURE__ */ t("input", {
|
|
1826
1826
|
id: p,
|
|
1827
1827
|
type: "range",
|
|
1828
|
-
className:
|
|
1828
|
+
className: Wn(),
|
|
1829
1829
|
min: e,
|
|
1830
1830
|
max: r,
|
|
1831
1831
|
step: i,
|
|
@@ -1836,15 +1836,15 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
1836
1836
|
onChange: (e) => o.next(e.currentTarget.valueAsNumber)
|
|
1837
1837
|
})]
|
|
1838
1838
|
});
|
|
1839
|
-
},
|
|
1839
|
+
}, qn = class extends Error {
|
|
1840
1840
|
constructor(e) {
|
|
1841
1841
|
super(`Stepper.${e} must be composed inside Stepper.Root`), this.name = "StepperCompositionError";
|
|
1842
1842
|
}
|
|
1843
|
-
},
|
|
1843
|
+
}, Jn = b("flex h-full min-h-0 min-w-0 flex-col gap-[var(--space-stack)]"), Yn = b([
|
|
1844
1844
|
"flex flex-row shrink-0 min-w-0 overflow-x-auto",
|
|
1845
1845
|
"p-[calc(var(--focus-ring-width)+var(--focus-ring-offset))]",
|
|
1846
1846
|
"scroll-p-[calc(var(--focus-ring-width)+var(--focus-ring-offset))]"
|
|
1847
|
-
].join(" ")),
|
|
1847
|
+
].join(" ")), Xn = b([
|
|
1848
1848
|
"relative isolate flex flex-1 flex-col items-center gap-[var(--space-stack)] text-center",
|
|
1849
1849
|
"font-secondary text-label text-foreground cursor-pointer select-none",
|
|
1850
1850
|
"px-[var(--step-inset-inline)] py-[var(--step-inset-block)]",
|
|
@@ -1857,28 +1857,28 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
1857
1857
|
"forced-colors:after:border-[CanvasText] forced-colors:aria-selected:border-[Highlight]",
|
|
1858
1858
|
"forced-colors:border-b-0 forced-colors:aria-selected:border-b-[length:var(--step-selection-thickness)]",
|
|
1859
1859
|
"forced-colors:[&>[data-marker]]:bg-[Canvas] forced-colors:[&>[data-marker]]:text-[CanvasText] forced-colors:[&>[data-marker]]:border-[CanvasText]"
|
|
1860
|
-
]),
|
|
1861
|
-
let t = c(
|
|
1862
|
-
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);
|
|
1863
1863
|
return t;
|
|
1864
|
-
},
|
|
1864
|
+
}, nr = (e) => e.split("").map((e) => e.charCodeAt(0).toString(16).padStart(4, "0")).join(""), rr = (e) => {
|
|
1865
1865
|
e.currentTarget.scrollIntoView({
|
|
1866
1866
|
block: "nearest",
|
|
1867
1867
|
inline: "nearest"
|
|
1868
1868
|
});
|
|
1869
|
-
},
|
|
1869
|
+
}, Y = (e, t) => `${e}tab-${nr(t)}`, ir = (e, t) => `${e}panel-${nr(t)}`, ar = (e, t) => {
|
|
1870
1870
|
let n = e.closest("[role=\"tablist\"]");
|
|
1871
1871
|
if (n === null) return;
|
|
1872
1872
|
let r = Array.from(n.querySelectorAll(":scope > [role=\"tab\"]"));
|
|
1873
1873
|
return r[(r.indexOf(e) + t + r.length) % r.length];
|
|
1874
|
-
},
|
|
1874
|
+
}, or = {
|
|
1875
1875
|
Root: ({ active$: e, onSelect$: n, label: r, children: i, testId: a }) => {
|
|
1876
1876
|
let o = u(), [s, c] = m();
|
|
1877
1877
|
return l(() => {
|
|
1878
1878
|
c(void 0);
|
|
1879
1879
|
let t = e.subscribe(c);
|
|
1880
1880
|
return () => t.unsubscribe();
|
|
1881
|
-
}, [e]), /* @__PURE__ */ t(
|
|
1881
|
+
}, [e]), /* @__PURE__ */ t(er.Provider, {
|
|
1882
1882
|
value: {
|
|
1883
1883
|
active: s,
|
|
1884
1884
|
onSelect$: n,
|
|
@@ -1886,7 +1886,7 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
1886
1886
|
baseId: o
|
|
1887
1887
|
},
|
|
1888
1888
|
children: /* @__PURE__ */ t("div", {
|
|
1889
|
-
className:
|
|
1889
|
+
className: Jn(),
|
|
1890
1890
|
"data-height-passing": !0,
|
|
1891
1891
|
"data-testid": a,
|
|
1892
1892
|
children: i
|
|
@@ -1894,45 +1894,45 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
1894
1894
|
});
|
|
1895
1895
|
},
|
|
1896
1896
|
List: ({ children: e, testId: n }) => {
|
|
1897
|
-
let { label: r } =
|
|
1897
|
+
let { label: r } = tr("List");
|
|
1898
1898
|
return /* @__PURE__ */ t("div", {
|
|
1899
1899
|
role: "tablist",
|
|
1900
1900
|
"aria-label": r,
|
|
1901
|
-
className:
|
|
1901
|
+
className: Yn(),
|
|
1902
1902
|
"data-testid": n,
|
|
1903
|
-
children:
|
|
1903
|
+
children: $n(e).map((e, n) => /* @__PURE__ */ t(Qn.Provider, {
|
|
1904
1904
|
value: n + 1,
|
|
1905
1905
|
children: e
|
|
1906
1906
|
}, o(e) ? e.props.value : n))
|
|
1907
1907
|
});
|
|
1908
1908
|
},
|
|
1909
1909
|
Step: ({ value: e, label: r, status: i, valueText: a, statusContent: o, testId: s }) => {
|
|
1910
|
-
let { active: l, onSelect$: u, baseId: d } =
|
|
1911
|
-
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)");
|
|
1912
1912
|
let p = l === e;
|
|
1913
1913
|
return /* @__PURE__ */ n("button", {
|
|
1914
1914
|
type: "button",
|
|
1915
1915
|
role: "tab",
|
|
1916
|
-
id:
|
|
1916
|
+
id: Y(d, e),
|
|
1917
1917
|
"aria-selected": p,
|
|
1918
|
-
"aria-controls":
|
|
1919
|
-
"aria-labelledby": `${
|
|
1920
|
-
"aria-describedby": o === void 0 ? void 0 : `${
|
|
1918
|
+
"aria-controls": ir(d, e),
|
|
1919
|
+
"aria-labelledby": `${Y(d, e)}-label ${Y(d, e)}-value`,
|
|
1920
|
+
"aria-describedby": o === void 0 ? void 0 : `${Y(d, e)}-status`,
|
|
1921
1921
|
tabIndex: p ? 0 : -1,
|
|
1922
1922
|
"data-value": e,
|
|
1923
1923
|
"data-testid": s,
|
|
1924
|
-
className:
|
|
1924
|
+
className: Xn(),
|
|
1925
1925
|
onClick: () => u.next(e),
|
|
1926
1926
|
onKeyDown: (e) => {
|
|
1927
1927
|
if (e.key !== "ArrowLeft" && e.key !== "ArrowRight") return;
|
|
1928
1928
|
e.preventDefault();
|
|
1929
|
-
let t =
|
|
1929
|
+
let t = ar(e.currentTarget, e.key === "ArrowRight" ? 1 : -1);
|
|
1930
1930
|
if (t === void 0) return;
|
|
1931
1931
|
t.focus();
|
|
1932
1932
|
let n = t.dataset.value;
|
|
1933
1933
|
n !== void 0 && u.next(n);
|
|
1934
1934
|
},
|
|
1935
|
-
onFocus:
|
|
1935
|
+
onFocus: rr,
|
|
1936
1936
|
children: [
|
|
1937
1937
|
/* @__PURE__ */ t("span", {
|
|
1938
1938
|
"data-marker": !0,
|
|
@@ -1940,37 +1940,37 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
1940
1940
|
children: i === "done" ? "✓" : i === "blocked" ? "⊘" : f
|
|
1941
1941
|
}),
|
|
1942
1942
|
/* @__PURE__ */ t("span", {
|
|
1943
|
-
id: `${
|
|
1943
|
+
id: `${Y(d, e)}-label`,
|
|
1944
1944
|
children: r
|
|
1945
1945
|
}),
|
|
1946
1946
|
/* @__PURE__ */ t("span", {
|
|
1947
1947
|
"data-value-text": !0,
|
|
1948
|
-
id: `${
|
|
1948
|
+
id: `${Y(d, e)}-value`,
|
|
1949
1949
|
children: a
|
|
1950
1950
|
}),
|
|
1951
1951
|
o === void 0 ? void 0 : /* @__PURE__ */ t("span", {
|
|
1952
1952
|
"data-status-content": !0,
|
|
1953
|
-
id: `${
|
|
1953
|
+
id: `${Y(d, e)}-status`,
|
|
1954
1954
|
children: o
|
|
1955
1955
|
})
|
|
1956
1956
|
]
|
|
1957
1957
|
});
|
|
1958
1958
|
},
|
|
1959
1959
|
Panel: ({ value: e, children: n, testId: r }) => {
|
|
1960
|
-
let { active: i, baseId: a } =
|
|
1960
|
+
let { active: i, baseId: a } = tr("Panel"), o = i === e;
|
|
1961
1961
|
return /* @__PURE__ */ t("div", {
|
|
1962
1962
|
role: "tabpanel",
|
|
1963
|
-
id:
|
|
1964
|
-
"aria-labelledby":
|
|
1963
|
+
id: ir(a, e),
|
|
1964
|
+
"aria-labelledby": Y(a, e),
|
|
1965
1965
|
hidden: !o,
|
|
1966
1966
|
tabIndex: o ? 0 : void 0,
|
|
1967
|
-
className:
|
|
1967
|
+
className: Zn(),
|
|
1968
1968
|
"data-height-passing": !0,
|
|
1969
1969
|
"data-testid": r,
|
|
1970
1970
|
children: o ? n : void 0
|
|
1971
1971
|
});
|
|
1972
1972
|
}
|
|
1973
|
-
},
|
|
1973
|
+
}, sr = b([
|
|
1974
1974
|
"inline-flex max-w-full items-center gap-[var(--space-stack)] rounded-[var(--radius-control)] bg-transparent p-0 text-start cursor-pointer",
|
|
1975
1975
|
"font-secondary font-medium text-body text-foreground disabled:text-muted disabled:cursor-not-allowed",
|
|
1976
1976
|
"outline-focus-ring outline-offset-[var(--focus-ring-offset)] focus-visible:outline focus-visible:outline-[length:var(--focus-ring-width)]",
|
|
@@ -1982,7 +1982,7 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
1982
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]",
|
|
1983
1983
|
"forced-colors:disabled:text-[GrayText] forced-colors:disabled:[&>[data-track]]:border-[GrayText] forced-colors:disabled:[&>[data-track]::before]:bg-[GrayText]",
|
|
1984
1984
|
"[&>[data-label]]:min-w-0 [&>[data-label]]:wrap-anywhere"
|
|
1985
|
-
]),
|
|
1985
|
+
]), cr = ({ label: e, checked$: r, onChange$: i, disabled: a, testId: o }) => {
|
|
1986
1986
|
let [s, c] = m(!1);
|
|
1987
1987
|
return l(() => {
|
|
1988
1988
|
c(!1);
|
|
@@ -1994,7 +1994,7 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
1994
1994
|
"aria-checked": s,
|
|
1995
1995
|
disabled: a,
|
|
1996
1996
|
"data-testid": o,
|
|
1997
|
-
className:
|
|
1997
|
+
className: sr(),
|
|
1998
1998
|
onClick: () => i.next(!s),
|
|
1999
1999
|
children: [/* @__PURE__ */ t("span", {
|
|
2000
2000
|
"data-track": !0,
|
|
@@ -2004,17 +2004,17 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
2004
2004
|
children: e
|
|
2005
2005
|
})]
|
|
2006
2006
|
});
|
|
2007
|
-
},
|
|
2007
|
+
}, lr = class extends Error {
|
|
2008
2008
|
constructor(e) {
|
|
2009
2009
|
super(`Tabs.${e} must be composed inside Tabs.Root`), this.name = "TabsCompositionError";
|
|
2010
2010
|
}
|
|
2011
|
-
},
|
|
2011
|
+
}, ur = b("", {
|
|
2012
2012
|
variants: { fill: {
|
|
2013
2013
|
true: "flex h-full min-h-0 min-w-0 flex-col",
|
|
2014
2014
|
false: ""
|
|
2015
2015
|
} },
|
|
2016
2016
|
defaultVariants: { fill: !1 }
|
|
2017
|
-
}),
|
|
2017
|
+
}), dr = b([
|
|
2018
2018
|
"flex flex-row overflow-x-auto",
|
|
2019
2019
|
"p-[calc(var(--focus-ring-width)+var(--focus-ring-offset))]",
|
|
2020
2020
|
"m-[calc(-1*(var(--focus-ring-width)+var(--focus-ring-offset)))]",
|
|
@@ -2022,34 +2022,34 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
2022
2022
|
].join(" "), { variants: { fill: {
|
|
2023
2023
|
true: "shrink-0",
|
|
2024
2024
|
false: ""
|
|
2025
|
-
} } }),
|
|
2025
|
+
} } }), fr = b([
|
|
2026
2026
|
"font-secondary text-label tracking-label",
|
|
2027
2027
|
"text-muted hover:text-foreground aria-selected:text-foreground",
|
|
2028
2028
|
"border-b-[length:var(--tab-marker-thickness)] border-solid border-transparent aria-selected:border-foreground",
|
|
2029
2029
|
"cursor-pointer select-none px-[var(--tab-inset-inline)] py-[var(--tab-inset-block)]",
|
|
2030
2030
|
"transition-colors duration-[var(--motion-duration-color)]",
|
|
2031
2031
|
"outline-focus-ring outline-offset-[var(--focus-ring-offset)] focus-visible:outline focus-visible:outline-[length:var(--focus-ring-width)]"
|
|
2032
|
-
].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: {
|
|
2033
2033
|
true: "min-h-0 min-w-0 flex-auto",
|
|
2034
2034
|
false: ""
|
|
2035
|
-
} } }),
|
|
2036
|
-
let t = c(
|
|
2037
|
-
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);
|
|
2038
2038
|
return t;
|
|
2039
|
-
},
|
|
2039
|
+
}, gr = (e) => e.split("").map((e) => e.charCodeAt(0).toString(16).padStart(4, "0")).join(""), _r = (e) => {
|
|
2040
2040
|
e.currentTarget.scrollIntoView({
|
|
2041
2041
|
block: "nearest",
|
|
2042
2042
|
inline: "nearest"
|
|
2043
2043
|
});
|
|
2044
|
-
},
|
|
2044
|
+
}, vr = (e, t) => `${e}tab-${gr(t)}`, yr = (e, t) => `${e}panel-${gr(t)}`, br = (e, t) => {
|
|
2045
2045
|
let n = e.closest("[role=\"tablist\"]");
|
|
2046
2046
|
if (n === null) return;
|
|
2047
2047
|
let r = Array.from(n.querySelectorAll(":scope > [role=\"tab\"]"));
|
|
2048
2048
|
return r[(r.indexOf(e) + t + r.length) % r.length];
|
|
2049
|
-
},
|
|
2049
|
+
}, xr = {
|
|
2050
2050
|
Root: ({ active: e, onSelect$: n, label: r, fill: i, children: a, testId: o }) => {
|
|
2051
2051
|
let s = u();
|
|
2052
|
-
return /* @__PURE__ */ t(
|
|
2052
|
+
return /* @__PURE__ */ t(mr.Provider, {
|
|
2053
2053
|
value: {
|
|
2054
2054
|
active: e,
|
|
2055
2055
|
onSelect$: n,
|
|
@@ -2058,7 +2058,7 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
2058
2058
|
fill: i === !0
|
|
2059
2059
|
},
|
|
2060
2060
|
children: /* @__PURE__ */ t("div", {
|
|
2061
|
-
className:
|
|
2061
|
+
className: ur({ fill: i }),
|
|
2062
2062
|
"data-height-passing": i || void 0,
|
|
2063
2063
|
"data-testid": o,
|
|
2064
2064
|
children: a
|
|
@@ -2066,56 +2066,56 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
2066
2066
|
});
|
|
2067
2067
|
},
|
|
2068
2068
|
List: ({ children: e, testId: n }) => {
|
|
2069
|
-
let { label: r, fill: i } =
|
|
2069
|
+
let { label: r, fill: i } = hr("List");
|
|
2070
2070
|
return /* @__PURE__ */ t("div", {
|
|
2071
2071
|
role: "tablist",
|
|
2072
2072
|
"aria-label": r,
|
|
2073
|
-
className:
|
|
2073
|
+
className: dr({ fill: i }),
|
|
2074
2074
|
"data-testid": n,
|
|
2075
2075
|
children: e
|
|
2076
2076
|
});
|
|
2077
2077
|
},
|
|
2078
2078
|
Tab: ({ value: e, children: n, testId: r }) => {
|
|
2079
|
-
let { active: i, onSelect$: a, baseId: o } =
|
|
2079
|
+
let { active: i, onSelect$: a, baseId: o } = hr("Tab"), s = i === e;
|
|
2080
2080
|
return /* @__PURE__ */ t("button", {
|
|
2081
2081
|
type: "button",
|
|
2082
2082
|
role: "tab",
|
|
2083
|
-
id:
|
|
2083
|
+
id: vr(o, e),
|
|
2084
2084
|
"aria-selected": s,
|
|
2085
|
-
"aria-controls":
|
|
2085
|
+
"aria-controls": yr(o, e),
|
|
2086
2086
|
tabIndex: s ? 0 : -1,
|
|
2087
2087
|
"data-value": e,
|
|
2088
2088
|
"data-testid": r,
|
|
2089
|
-
className:
|
|
2089
|
+
className: fr(),
|
|
2090
2090
|
onClick: () => a.next(e),
|
|
2091
2091
|
onKeyDown: (e) => {
|
|
2092
2092
|
if (e.key !== "ArrowLeft" && e.key !== "ArrowRight") return;
|
|
2093
2093
|
e.preventDefault();
|
|
2094
|
-
let t =
|
|
2094
|
+
let t = br(e.currentTarget, e.key === "ArrowRight" ? 1 : -1);
|
|
2095
2095
|
if (t === void 0) return;
|
|
2096
2096
|
t.focus();
|
|
2097
2097
|
let n = t.dataset.value;
|
|
2098
2098
|
n !== void 0 && a.next(n);
|
|
2099
2099
|
},
|
|
2100
|
-
onFocus:
|
|
2100
|
+
onFocus: _r,
|
|
2101
2101
|
children: n
|
|
2102
2102
|
});
|
|
2103
2103
|
},
|
|
2104
2104
|
Panel: ({ value: e, children: n, testId: r }) => {
|
|
2105
|
-
let { active: i, baseId: a, fill: o } =
|
|
2105
|
+
let { active: i, baseId: a, fill: o } = hr("Panel"), s = i === e;
|
|
2106
2106
|
return /* @__PURE__ */ t("div", {
|
|
2107
2107
|
role: "tabpanel",
|
|
2108
|
-
id:
|
|
2109
|
-
"aria-labelledby":
|
|
2108
|
+
id: yr(a, e),
|
|
2109
|
+
"aria-labelledby": vr(a, e),
|
|
2110
2110
|
hidden: !s,
|
|
2111
2111
|
tabIndex: s ? 0 : void 0,
|
|
2112
|
-
className:
|
|
2112
|
+
className: pr({ fill: o }),
|
|
2113
2113
|
"data-height-passing": o || void 0,
|
|
2114
2114
|
"data-testid": r,
|
|
2115
2115
|
children: s ? n : void 0
|
|
2116
2116
|
});
|
|
2117
2117
|
}
|
|
2118
|
-
},
|
|
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 }) => {
|
|
2119
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);
|
|
2120
2120
|
return l(() => {
|
|
2121
2121
|
let e = _?.subscribe(() => {
|
|
@@ -2134,7 +2134,7 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
2134
2134
|
ref: w,
|
|
2135
2135
|
id: b,
|
|
2136
2136
|
name: r,
|
|
2137
|
-
className:
|
|
2137
|
+
className: Sr(),
|
|
2138
2138
|
required: i,
|
|
2139
2139
|
disabled: s,
|
|
2140
2140
|
defaultValue: c,
|
|
@@ -2161,49 +2161,49 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
2161
2161
|
})
|
|
2162
2162
|
]
|
|
2163
2163
|
});
|
|
2164
|
-
},
|
|
2164
|
+
}, wr = b([
|
|
2165
2165
|
"flex flex-col items-center",
|
|
2166
2166
|
"min-h-[var(--cover-height)]",
|
|
2167
2167
|
"px-[var(--gutter)] py-[var(--space-region)]"
|
|
2168
|
-
].join(" ")),
|
|
2168
|
+
].join(" ")), Tr = "my-auto max-w-full", Er = ({ children: e, foot: r, testId: i }) => {
|
|
2169
2169
|
let a = r != null && typeof r != "boolean";
|
|
2170
2170
|
return /* @__PURE__ */ n("div", {
|
|
2171
|
-
className:
|
|
2171
|
+
className: wr(),
|
|
2172
2172
|
"data-testid": i,
|
|
2173
2173
|
children: [/* @__PURE__ */ t("div", {
|
|
2174
|
-
className:
|
|
2174
|
+
className: Tr,
|
|
2175
2175
|
children: e
|
|
2176
2176
|
}), a && /* @__PURE__ */ t("div", { children: r })]
|
|
2177
2177
|
});
|
|
2178
|
-
},
|
|
2178
|
+
}, Dr = class extends Error {
|
|
2179
2179
|
constructor(e) {
|
|
2180
2180
|
super(`Dialog.${e} must be composed inside Dialog.Root`), this.name = "DialogCompositionError";
|
|
2181
2181
|
}
|
|
2182
|
-
},
|
|
2182
|
+
}, Or = class extends Error {
|
|
2183
2183
|
constructor() {
|
|
2184
2184
|
super("A Dialog takes exactly one accessible naming source: a visible Dialog.Title or ariaLabel on Dialog.Root, never both"), this.name = "DialogNamingError";
|
|
2185
2185
|
}
|
|
2186
|
-
},
|
|
2186
|
+
}, X = (e) => Number.parseFloat(e) || 0, kr = (e) => X(e.paddingTop) + X(e.paddingBottom) + X(e.borderTopWidth) + X(e.borderBottomWidth), Ar = (e) => {
|
|
2187
2187
|
let t = getComputedStyle(e);
|
|
2188
|
-
return
|
|
2189
|
-
},
|
|
2188
|
+
return X(t.marginTop) + X(t.marginBottom);
|
|
2189
|
+
}, jr = (e) => {
|
|
2190
2190
|
let t = getComputedStyle(e);
|
|
2191
2191
|
if (t.display === "none" || t.position === "absolute") return 0;
|
|
2192
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));
|
|
2193
2193
|
if (e.querySelector("table")) {
|
|
2194
2194
|
let n = Array.from(e.children);
|
|
2195
|
-
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);
|
|
2196
2196
|
}
|
|
2197
|
-
let n = Math.max(
|
|
2198
|
-
return
|
|
2199
|
-
},
|
|
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"));
|
|
2198
|
+
return kr(t) + n + 2 * r;
|
|
2199
|
+
}, Mr = (e) => {
|
|
2200
2200
|
let [t, n] = m(!1);
|
|
2201
2201
|
return d(() => {
|
|
2202
2202
|
let t = e.current;
|
|
2203
2203
|
if (!t) return;
|
|
2204
2204
|
let r = () => {
|
|
2205
2205
|
if (!t.open) return;
|
|
2206
|
-
let e = getComputedStyle(t), r = e.maxHeight === "none" ?
|
|
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));
|
|
2207
2207
|
n(r < i);
|
|
2208
2208
|
}, i = typeof ResizeObserver > "u" ? void 0 : new ResizeObserver(r), a = () => {
|
|
2209
2209
|
i?.disconnect(), i?.observe(t);
|
|
@@ -2228,23 +2228,23 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
2228
2228
|
inline: "nearest"
|
|
2229
2229
|
});
|
|
2230
2230
|
}, [e, t]), t;
|
|
2231
|
-
},
|
|
2232
|
-
let t = e.ownerDocument.documentElement, n =
|
|
2231
|
+
}, Nr = /* @__PURE__ */ new WeakMap(), Pr = (e) => {
|
|
2232
|
+
let t = e.ownerDocument.documentElement, n = Nr.get(t);
|
|
2233
2233
|
n === void 0 && (n = {
|
|
2234
2234
|
overflow: t.style.getPropertyValue("overflow"),
|
|
2235
2235
|
priority: t.style.getPropertyPriority("overflow"),
|
|
2236
2236
|
dialogs: /* @__PURE__ */ new Set()
|
|
2237
|
-
},
|
|
2237
|
+
}, Nr.set(t, n), t.style.setProperty("overflow", "hidden"));
|
|
2238
2238
|
let r = n;
|
|
2239
2239
|
return r.dialogs.add(e), () => {
|
|
2240
|
-
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));
|
|
2241
2241
|
};
|
|
2242
|
-
},
|
|
2242
|
+
}, Fr = (e) => {
|
|
2243
2243
|
d(() => {
|
|
2244
2244
|
let t = e.current;
|
|
2245
2245
|
if (!t) return;
|
|
2246
2246
|
let n, r = () => {
|
|
2247
|
-
t.open && n === void 0 ? n =
|
|
2247
|
+
t.open && n === void 0 ? n = Pr(t) : !t.open && n !== void 0 && (n(), n = void 0);
|
|
2248
2248
|
};
|
|
2249
2249
|
r();
|
|
2250
2250
|
let i = new MutationObserver(r);
|
|
@@ -2255,7 +2255,7 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
2255
2255
|
i.disconnect(), n?.();
|
|
2256
2256
|
};
|
|
2257
2257
|
}, [e]);
|
|
2258
|
-
},
|
|
2258
|
+
}, Ir = b([
|
|
2259
2259
|
"open:flex open:flex-col m-auto p-0 overflow-hidden",
|
|
2260
2260
|
"[&[data-dialog-unusable]]:overflow-auto [&[data-dialog-unusable]]:[--_scroll-released:1]",
|
|
2261
2261
|
"[&[data-dialog-unusable]]:scroll-p-[calc(var(--focus-ring-width)+var(--focus-ring-offset))]",
|
|
@@ -2275,7 +2275,7 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
2275
2275
|
content: ["w-[32rem] max-w-[calc(100vw-2*var(--gutter))]", "max-h-[calc(100dvh-2*var(--space-region))]"].join(" ")
|
|
2276
2276
|
} },
|
|
2277
2277
|
defaultVariants: { extent: "screen" }
|
|
2278
|
-
}),
|
|
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([
|
|
2279
2279
|
"grow shrink min-h-0 min-w-0",
|
|
2280
2280
|
"px-[var(--space-region)] py-[var(--space-region)]",
|
|
2281
2281
|
"[&:not(:first-child)]:border-t [&:not(:first-child)]:border-border"
|
|
@@ -2285,24 +2285,24 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
2285
2285
|
child: "flex flex-col"
|
|
2286
2286
|
} },
|
|
2287
2287
|
defaultVariants: { scrollOwner: "body" }
|
|
2288
|
-
}),
|
|
2288
|
+
}), Br = b([
|
|
2289
2289
|
"flex flex-row flex-wrap items-center justify-end gap-[var(--space-stack)] shrink-0",
|
|
2290
2290
|
"px-[var(--space-region)] pt-[var(--space-region)] pb-[var(--space-region)]",
|
|
2291
2291
|
"[[data-dialog-member=content]+&]:border-t [[data-dialog-member=content]+&]:border-border"
|
|
2292
|
-
].join(" ")),
|
|
2293
|
-
let t = c(
|
|
2294
|
-
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);
|
|
2295
2295
|
return t;
|
|
2296
|
-
},
|
|
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 }) => {
|
|
2297
2297
|
if (e === void 0 || e.open) return;
|
|
2298
2298
|
let r = document.activeElement;
|
|
2299
|
-
n.current = r instanceof HTMLElement && r !== document.body ? r : void 0, e.showModal(), t.current = !0, e.querySelector(
|
|
2300
|
-
},
|
|
2299
|
+
n.current = r instanceof HTMLElement && r !== document.body ? r : void 0, e.showModal(), t.current = !0, e.querySelector(Hr)?.focus();
|
|
2300
|
+
}, Q = (e, { presented: t }) => {
|
|
2301
2301
|
t.current = !1, e?.open && e.close();
|
|
2302
|
-
},
|
|
2302
|
+
}, Wr = {
|
|
2303
2303
|
Root: ({ children: e, onDismiss$: n, showDialog$: r, extent: i, ariaLabel: a, testId: o }) => {
|
|
2304
|
-
let c = u(), d = p(void 0), f =
|
|
2305
|
-
|
|
2304
|
+
let c = u(), d = p(void 0), f = Mr(d);
|
|
2305
|
+
Fr(d);
|
|
2306
2306
|
let h = p(!1), g = p(void 0), [_] = m(() => ({
|
|
2307
2307
|
presented: h,
|
|
2308
2308
|
opener: g
|
|
@@ -2321,23 +2321,23 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
2321
2321
|
isLabelled: a !== void 0,
|
|
2322
2322
|
registerNamePart: b
|
|
2323
2323
|
}, S = () => {
|
|
2324
|
-
n.next(), r === void 0 ?
|
|
2324
|
+
n.next(), r === void 0 ? Q(d.current, _) : r.next(!1);
|
|
2325
2325
|
};
|
|
2326
2326
|
return l(() => {
|
|
2327
|
-
if (r === void 0) return
|
|
2327
|
+
if (r === void 0) return Ur(d.current, _), () => Q(d.current, _);
|
|
2328
2328
|
let e = r.subscribe((e) => {
|
|
2329
|
-
e ?
|
|
2329
|
+
e ? Ur(d.current, _) : Q(d.current, _);
|
|
2330
2330
|
});
|
|
2331
2331
|
return () => {
|
|
2332
|
-
e.unsubscribe(),
|
|
2332
|
+
e.unsubscribe(), Q(d.current, _);
|
|
2333
2333
|
};
|
|
2334
|
-
}, [r, _]), /* @__PURE__ */ t(
|
|
2334
|
+
}, [r, _]), /* @__PURE__ */ t(Vr.Provider, {
|
|
2335
2335
|
value: x,
|
|
2336
2336
|
children: /* @__PURE__ */ t("dialog", {
|
|
2337
2337
|
ref: (e) => {
|
|
2338
2338
|
d.current = e ?? void 0, e?.setAttribute("headingreset", "");
|
|
2339
2339
|
},
|
|
2340
|
-
className:
|
|
2340
|
+
className: Ir({ extent: i }),
|
|
2341
2341
|
"data-dialog-unusable": f || void 0,
|
|
2342
2342
|
"aria-label": a,
|
|
2343
2343
|
"aria-labelledby": a === void 0 && v.title ? x.titleId : void 0,
|
|
@@ -2354,7 +2354,7 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
2354
2354
|
let e = h.current;
|
|
2355
2355
|
h.current = !1;
|
|
2356
2356
|
let t = g.current;
|
|
2357
|
-
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);
|
|
2358
2358
|
},
|
|
2359
2359
|
"data-testid": o,
|
|
2360
2360
|
children: e
|
|
@@ -2362,11 +2362,11 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
2362
2362
|
});
|
|
2363
2363
|
},
|
|
2364
2364
|
Title: ({ children: e, testId: n }) => {
|
|
2365
|
-
let { titleId: r, isLabelled: i, registerNamePart: a } =
|
|
2366
|
-
if (l(() => a("title"), [a]), i) throw new
|
|
2365
|
+
let { titleId: r, isLabelled: i, registerNamePart: a } = Z("Title");
|
|
2366
|
+
if (l(() => a("title"), [a]), i) throw new Or();
|
|
2367
2367
|
return /* @__PURE__ */ t("div", {
|
|
2368
2368
|
"data-dialog-member": "title",
|
|
2369
|
-
className:
|
|
2369
|
+
className: Lr(),
|
|
2370
2370
|
"data-testid": n,
|
|
2371
2371
|
children: /* @__PURE__ */ t("h1", {
|
|
2372
2372
|
id: r,
|
|
@@ -2376,10 +2376,10 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
2376
2376
|
});
|
|
2377
2377
|
},
|
|
2378
2378
|
Description: ({ children: e, testId: n }) => {
|
|
2379
|
-
let { descriptionId: r, registerNamePart: i } =
|
|
2379
|
+
let { descriptionId: r, registerNamePart: i } = Z("Description");
|
|
2380
2380
|
return l(() => i("description"), [i]), /* @__PURE__ */ t("div", {
|
|
2381
2381
|
"data-dialog-member": "description",
|
|
2382
|
-
className:
|
|
2382
|
+
className: Rr(),
|
|
2383
2383
|
"data-testid": n,
|
|
2384
2384
|
children: /* @__PURE__ */ t("p", {
|
|
2385
2385
|
id: r,
|
|
@@ -2388,33 +2388,33 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
2388
2388
|
})
|
|
2389
2389
|
});
|
|
2390
2390
|
},
|
|
2391
|
-
Content: ({ children: e, scrollOwner: n, testId: r }) => (
|
|
2391
|
+
Content: ({ children: e, scrollOwner: n, testId: r }) => (Z("Content"), /* @__PURE__ */ t("div", {
|
|
2392
2392
|
"data-dialog-member": "content",
|
|
2393
|
-
className:
|
|
2393
|
+
className: zr({ scrollOwner: n }),
|
|
2394
2394
|
"data-testid": r,
|
|
2395
2395
|
children: e
|
|
2396
2396
|
})),
|
|
2397
|
-
Actions: ({ children: e, testId: n }) => (
|
|
2397
|
+
Actions: ({ children: e, testId: n }) => (Z("Actions"), /* @__PURE__ */ t("div", {
|
|
2398
2398
|
"data-dialog-member": "actions",
|
|
2399
|
-
className:
|
|
2399
|
+
className: Br(),
|
|
2400
2400
|
"data-testid": n,
|
|
2401
2401
|
children: e
|
|
2402
2402
|
}))
|
|
2403
|
-
},
|
|
2403
|
+
}, Gr = b("font-secondary text-small text-muted py-[var(--space-region)] px-[var(--gutter)]", {
|
|
2404
2404
|
variants: { edge: {
|
|
2405
2405
|
none: "",
|
|
2406
2406
|
rule: "border-t border-solid border-rule"
|
|
2407
2407
|
} },
|
|
2408
2408
|
defaultVariants: { edge: "rule" }
|
|
2409
|
-
}),
|
|
2410
|
-
className:
|
|
2409
|
+
}), Kr = ({ edge: e, children: n, testId: r }) => /* @__PURE__ */ t("footer", {
|
|
2410
|
+
className: Gr({ edge: e }),
|
|
2411
2411
|
"data-testid": r,
|
|
2412
2412
|
children: n
|
|
2413
|
-
}),
|
|
2413
|
+
}), qr = class extends Error {
|
|
2414
2414
|
constructor(e) {
|
|
2415
2415
|
super(`Form configuration is invalid: ${e}`), this.name = "FormConfigurationError";
|
|
2416
2416
|
}
|
|
2417
|
-
},
|
|
2417
|
+
}, Jr = b("font-secondary text-small", {
|
|
2418
2418
|
variants: { state: {
|
|
2419
2419
|
idle: "text-muted",
|
|
2420
2420
|
sending: "text-muted",
|
|
@@ -2422,13 +2422,13 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
2422
2422
|
failed: "text-error"
|
|
2423
2423
|
} },
|
|
2424
2424
|
defaultVariants: { state: "idle" }
|
|
2425
|
-
}),
|
|
2425
|
+
}), Yr = {
|
|
2426
2426
|
sent: "status",
|
|
2427
2427
|
failed: "alert"
|
|
2428
|
-
},
|
|
2428
|
+
}, Xr = ({ action: e, method: r = "post", state: i = "idle", children: a, actions: o, note: s, testId: c }) => {
|
|
2429
2429
|
let l = s != null && typeof s != "boolean";
|
|
2430
|
-
if (i === "sent" && !l) throw new
|
|
2431
|
-
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];
|
|
2432
2432
|
return /* @__PURE__ */ n("form", {
|
|
2433
2433
|
action: e,
|
|
2434
2434
|
method: r,
|
|
@@ -2446,12 +2446,12 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
2446
2446
|
}),
|
|
2447
2447
|
l && /* @__PURE__ */ t("p", {
|
|
2448
2448
|
role: d,
|
|
2449
|
-
className:
|
|
2449
|
+
className: Jr({ state: i }),
|
|
2450
2450
|
children: s
|
|
2451
2451
|
})
|
|
2452
2452
|
]
|
|
2453
2453
|
});
|
|
2454
|
-
},
|
|
2454
|
+
}, Zr = b([
|
|
2455
2455
|
"flex items-baseline",
|
|
2456
2456
|
"font-secondary text-label leading-label tracking-label text-muted",
|
|
2457
2457
|
"py-[var(--space-region)] px-[var(--gutter)]",
|
|
@@ -2471,66 +2471,72 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
2471
2471
|
edge: "rule",
|
|
2472
2472
|
mode: "navigation"
|
|
2473
2473
|
}
|
|
2474
|
-
}),
|
|
2474
|
+
}), Qr = [
|
|
2475
2475
|
"inline-flex shrink-0 items-center",
|
|
2476
2476
|
"min-h-[calc(var(--text-label)*var(--leading-label))]",
|
|
2477
2477
|
"min-w-[var(--standing-min-width)]"
|
|
2478
|
-
].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 }) => {
|
|
2479
2479
|
let u = c !== void 0 || l !== void 0;
|
|
2480
2480
|
return /* @__PURE__ */ t("header", {
|
|
2481
|
-
className:
|
|
2481
|
+
className: Zr({
|
|
2482
2482
|
edge: r,
|
|
2483
2483
|
mode: u ? "statusAction" : "navigation"
|
|
2484
2484
|
}),
|
|
2485
2485
|
"data-testid": i,
|
|
2486
|
-
children: u ? /* @__PURE__ */ n(e, { children: [
|
|
2487
|
-
className:
|
|
2486
|
+
children: u ? /* @__PURE__ */ n(e, { children: [ni(c) && /* @__PURE__ */ t("div", {
|
|
2487
|
+
className: ei,
|
|
2488
2488
|
children: c
|
|
2489
|
-
}),
|
|
2490
|
-
className:
|
|
2489
|
+
}), ni(l) && /* @__PURE__ */ t("div", {
|
|
2490
|
+
className: ti,
|
|
2491
2491
|
children: l
|
|
2492
2492
|
})] }) : /* @__PURE__ */ n(e, { children: [/* @__PURE__ */ t("div", {
|
|
2493
|
-
className:
|
|
2493
|
+
className: Qr,
|
|
2494
2494
|
children: a
|
|
2495
2495
|
}), /* @__PURE__ */ t("nav", {
|
|
2496
2496
|
"aria-label": o,
|
|
2497
|
-
className:
|
|
2497
|
+
className: $r,
|
|
2498
2498
|
children: s
|
|
2499
2499
|
})] })
|
|
2500
2500
|
});
|
|
2501
|
-
},
|
|
2501
|
+
}, ii = b("flex flex-col min-h-[var(--fold-height)] gap-[var(--space-stack)]", {
|
|
2502
2502
|
variants: { place: {
|
|
2503
2503
|
start: "justify-start",
|
|
2504
2504
|
center: "justify-center",
|
|
2505
2505
|
between: "justify-between"
|
|
2506
2506
|
} },
|
|
2507
2507
|
defaultVariants: { place: "center" }
|
|
2508
|
-
}),
|
|
2509
|
-
className:
|
|
2508
|
+
}), ai = ({ place: e, children: n, testId: r }) => /* @__PURE__ */ t("div", {
|
|
2509
|
+
className: ii({ place: e }),
|
|
2510
2510
|
"data-testid": r,
|
|
2511
2511
|
children: n
|
|
2512
|
-
}),
|
|
2513
|
-
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(),
|
|
2514
2514
|
"data-testid": a,
|
|
2515
2515
|
children: [
|
|
2516
2516
|
/* @__PURE__ */ t("h1", {
|
|
2517
|
-
className:
|
|
2517
|
+
className: si(),
|
|
2518
2518
|
children: e
|
|
2519
2519
|
}),
|
|
2520
2520
|
r !== void 0 && /* @__PURE__ */ t("p", {
|
|
2521
|
-
className:
|
|
2521
|
+
className: ci(),
|
|
2522
2522
|
children: r
|
|
2523
2523
|
}),
|
|
2524
2524
|
i !== void 0 && /* @__PURE__ */ t("p", {
|
|
2525
|
-
className:
|
|
2525
|
+
className: li(),
|
|
2526
2526
|
children: i
|
|
2527
2527
|
})
|
|
2528
2528
|
]
|
|
2529
|
-
}),
|
|
2529
|
+
}), di = a(null), fi = b([
|
|
2530
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
2531
|
"[[data-screen-spacing=compact]_&:not(dialog_*)]:gap-[var(--space-pane-slot-compact)]",
|
|
2532
2532
|
"[[data-screen-spacing=compact]_&:not(dialog_*)]:p-[max(var(--space-pane-inset-compact),calc(var(--focus-ring-width)+var(--focus-ring-offset)))]"
|
|
2533
|
-
]),
|
|
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]", {
|
|
2534
2540
|
variants: { scrollOwner: {
|
|
2535
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)]",
|
|
2536
2542
|
child: "flex flex-col"
|
|
@@ -2558,26 +2564,26 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
2558
2564
|
t,
|
|
2559
2565
|
n
|
|
2560
2566
|
]), r;
|
|
2561
|
-
},
|
|
2567
|
+
}, $ = (e) => Number.parseFloat(e) || 0, _i = (e) => {
|
|
2562
2568
|
let t = getComputedStyle(e);
|
|
2563
|
-
return
|
|
2569
|
+
return $(t.paddingTop) + $(t.paddingBottom) + $(t.borderTopWidth) + $(t.borderBottomWidth);
|
|
2564
2570
|
}, vi = (e) => {
|
|
2565
2571
|
let t = 0;
|
|
2566
2572
|
for (let n of [e, ...e.querySelectorAll("*")]) {
|
|
2567
2573
|
let r = getComputedStyle(n);
|
|
2568
2574
|
if (r.display === "none") continue;
|
|
2569
|
-
let i =
|
|
2575
|
+
let i = $(r.lineHeight) || $(r.fontSize), a = $(getComputedStyle(e.firstElementChild ?? e).paddingTop), o = n.matches("tr, button, input, select, textarea, [role=\"button\"]") ? n.getBoundingClientRect().height : i;
|
|
2570
2576
|
t = Math.max(t, o + 2 * a);
|
|
2571
2577
|
}
|
|
2572
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;
|
|
2573
2579
|
return t + r + _i(e);
|
|
2574
2580
|
}, yi = (e) => {
|
|
2575
|
-
let t = c(
|
|
2581
|
+
let t = c(di), [n, r] = m(!1);
|
|
2576
2582
|
return d(() => {
|
|
2577
2583
|
let n = e.current, i = t;
|
|
2578
2584
|
if (!n || !i) return;
|
|
2579
2585
|
let a = () => {
|
|
2580
|
-
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) *
|
|
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);
|
|
2581
2587
|
r(s.height - c < a + o + _i(n) + (t instanceof HTMLElement ? vi(t) : 0));
|
|
2582
2588
|
}, o = typeof ResizeObserver > "u" ? void 0 : new ResizeObserver(a), s = new MutationObserver(() => l()), c = {
|
|
2583
2589
|
childList: !0,
|
|
@@ -2607,7 +2613,7 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
2607
2613
|
ref: i,
|
|
2608
2614
|
"data-screen-unusable": a || void 0,
|
|
2609
2615
|
"data-height-bounded": !0,
|
|
2610
|
-
className:
|
|
2616
|
+
className: fi(),
|
|
2611
2617
|
role: n ? "group" : void 0,
|
|
2612
2618
|
"aria-label": n || void 0,
|
|
2613
2619
|
"data-testid": r,
|
|
@@ -2615,7 +2621,7 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
2615
2621
|
});
|
|
2616
2622
|
},
|
|
2617
2623
|
Head: ({ children: e, testId: n }) => /* @__PURE__ */ t("div", {
|
|
2618
|
-
className:
|
|
2624
|
+
className: pi(),
|
|
2619
2625
|
"data-testid": n,
|
|
2620
2626
|
children: e
|
|
2621
2627
|
}),
|
|
@@ -2635,9 +2641,9 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
2635
2641
|
}) : e
|
|
2636
2642
|
});
|
|
2637
2643
|
},
|
|
2638
|
-
Foot: ({ children: e,
|
|
2639
|
-
className: mi(),
|
|
2640
|
-
"data-testid":
|
|
2644
|
+
Foot: ({ children: e, placement: n, testId: r }) => /* @__PURE__ */ t("div", {
|
|
2645
|
+
className: mi({ placement: n }),
|
|
2646
|
+
"data-testid": r,
|
|
2641
2647
|
children: e
|
|
2642
2648
|
})
|
|
2643
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)]", {
|
|
@@ -2646,14 +2652,14 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
2646
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)))]"
|
|
2647
2653
|
} },
|
|
2648
2654
|
defaultVariants: { spacing: "comfortable" }
|
|
2649
|
-
}), 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",
|
|
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) => {
|
|
2650
2656
|
let n = getComputedStyle(t), r = [...e.observed, t];
|
|
2651
2657
|
if (wi(n) || t.hasAttribute("data-height-bounded")) return {
|
|
2652
2658
|
bottom: e.bottom,
|
|
2653
2659
|
observed: r
|
|
2654
2660
|
};
|
|
2655
2661
|
if (t.hasAttribute("data-height-passing")) {
|
|
2656
|
-
let n =
|
|
2662
|
+
let n = Ti(t);
|
|
2657
2663
|
return {
|
|
2658
2664
|
bottom: Math.max(e.bottom, n.bottom),
|
|
2659
2665
|
observed: [...r, ...n.observed]
|
|
@@ -2667,14 +2673,14 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
2667
2673
|
}, {
|
|
2668
2674
|
bottom: -Infinity,
|
|
2669
2675
|
observed: []
|
|
2670
|
-
}),
|
|
2676
|
+
}), Ei = (e) => {
|
|
2671
2677
|
let [t, n] = m(!1);
|
|
2672
2678
|
return d(() => {
|
|
2673
2679
|
let t = e?.firstElementChild;
|
|
2674
2680
|
if (!e || !t) return;
|
|
2675
|
-
let r = () => n(
|
|
2681
|
+
let r = () => n(Ti(t).bottom > e.getBoundingClientRect().bottom), i = typeof ResizeObserver > "u" ? void 0 : new ResizeObserver(r), a = () => {
|
|
2676
2682
|
i?.disconnect(), i?.observe(e);
|
|
2677
|
-
for (let e of
|
|
2683
|
+
for (let e of Ti(t).observed) i?.observe(e);
|
|
2678
2684
|
r();
|
|
2679
2685
|
};
|
|
2680
2686
|
a();
|
|
@@ -2687,8 +2693,8 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
2687
2693
|
i?.disconnect(), o.disconnect(), window.removeEventListener("resize", r);
|
|
2688
2694
|
};
|
|
2689
2695
|
}, [e]), t;
|
|
2690
|
-
},
|
|
2691
|
-
let [o, s] = m(null), c =
|
|
2696
|
+
}, Di = ({ heading: e, spacing: r, children: i, testId: a }) => {
|
|
2697
|
+
let [o, s] = m(null), c = Ei(o);
|
|
2692
2698
|
return /* @__PURE__ */ n("main", {
|
|
2693
2699
|
className: xi({ spacing: r }),
|
|
2694
2700
|
"data-screen-spacing": r === "compact" ? r : void 0,
|
|
@@ -2701,36 +2707,36 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
2701
2707
|
className: Ci(),
|
|
2702
2708
|
children: /* @__PURE__ */ t("div", {
|
|
2703
2709
|
"data-screen-unusable": c || void 0,
|
|
2704
|
-
children: /* @__PURE__ */ t(
|
|
2710
|
+
children: /* @__PURE__ */ t(di.Provider, {
|
|
2705
2711
|
value: o,
|
|
2706
2712
|
children: i
|
|
2707
2713
|
})
|
|
2708
2714
|
})
|
|
2709
2715
|
})]
|
|
2710
2716
|
});
|
|
2711
|
-
},
|
|
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)]", {
|
|
2712
2718
|
variants: { axis: {
|
|
2713
2719
|
both: "overflow-auto",
|
|
2714
2720
|
horizontal: "overflow-x-auto overflow-y-hidden",
|
|
2715
2721
|
vertical: "overflow-y-auto overflow-x-hidden"
|
|
2716
2722
|
} },
|
|
2717
2723
|
defaultVariants: { axis: "both" }
|
|
2718
|
-
}),
|
|
2724
|
+
}), ki = b("p-[calc(var(--focus-ring-width)+var(--focus-ring-offset))]", {
|
|
2719
2725
|
variants: { axis: {
|
|
2720
2726
|
both: "w-fit min-w-full",
|
|
2721
2727
|
horizontal: "w-fit min-w-full",
|
|
2722
2728
|
vertical: "w-full"
|
|
2723
2729
|
} },
|
|
2724
2730
|
defaultVariants: { axis: "both" }
|
|
2725
|
-
}),
|
|
2731
|
+
}), Ai = (e, t) => {
|
|
2726
2732
|
let n = e.scrollWidth > e.clientWidth, r = e.scrollHeight > e.clientHeight;
|
|
2727
2733
|
return t !== "vertical" && n || t !== "horizontal" && r;
|
|
2728
|
-
},
|
|
2734
|
+
}, ji = (e, t, n) => {
|
|
2729
2735
|
let [r, i] = m(!0);
|
|
2730
2736
|
return d(() => {
|
|
2731
2737
|
let r = e.current;
|
|
2732
2738
|
if (r === null) return;
|
|
2733
|
-
let a = () => i(
|
|
2739
|
+
let a = () => i(Ai(r, n) || r === document.activeElement);
|
|
2734
2740
|
a();
|
|
2735
2741
|
let o = typeof ResizeObserver > "u" ? void 0 : new ResizeObserver(a);
|
|
2736
2742
|
return o?.observe(r), t.current !== null && o?.observe(t.current), window.addEventListener("resize", a), r.addEventListener("blur", a), () => {
|
|
@@ -2741,11 +2747,11 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
2741
2747
|
t,
|
|
2742
2748
|
n
|
|
2743
2749
|
]), r;
|
|
2744
|
-
},
|
|
2745
|
-
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");
|
|
2746
2752
|
return /* @__PURE__ */ t("div", {
|
|
2747
2753
|
ref: a,
|
|
2748
|
-
className:
|
|
2754
|
+
className: Oi({ axis: e }),
|
|
2749
2755
|
"data-height-bounded": !0,
|
|
2750
2756
|
"data-testid": i,
|
|
2751
2757
|
role: s ? "group" : void 0,
|
|
@@ -2753,11 +2759,11 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
2753
2759
|
tabIndex: s ? 0 : void 0,
|
|
2754
2760
|
children: /* @__PURE__ */ t("div", {
|
|
2755
2761
|
ref: o,
|
|
2756
|
-
className:
|
|
2762
|
+
className: ki({ axis: e }),
|
|
2757
2763
|
children: r
|
|
2758
2764
|
})
|
|
2759
2765
|
});
|
|
2760
|
-
},
|
|
2766
|
+
}, Ni = b([
|
|
2761
2767
|
"relative",
|
|
2762
2768
|
"py-[var(--space-band)]",
|
|
2763
2769
|
"[[data-section]+&]:border-t [[data-section]+&]:border-solid [[data-section]+&]:border-rule"
|
|
@@ -2767,19 +2773,19 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
2767
2773
|
full: ""
|
|
2768
2774
|
} },
|
|
2769
2775
|
defaultVariants: { bleed: "inset" }
|
|
2770
|
-
}),
|
|
2776
|
+
}), Pi = ({ bleed: e, name: n, children: r, testId: i }) => /* @__PURE__ */ t("section", {
|
|
2771
2777
|
"data-section": "",
|
|
2772
|
-
className:
|
|
2778
|
+
className: Ni({ bleed: e }),
|
|
2773
2779
|
"aria-label": n,
|
|
2774
2780
|
"data-testid": i,
|
|
2775
2781
|
children: r
|
|
2776
|
-
}),
|
|
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))]", {
|
|
2777
2783
|
variants: { mode: {
|
|
2778
2784
|
console: "[&>div]:h-full",
|
|
2779
2785
|
page: "[&>div]:min-h-full"
|
|
2780
2786
|
} },
|
|
2781
2787
|
defaultVariants: { mode: "console" }
|
|
2782
|
-
}),
|
|
2788
|
+
}), Li = (e) => {
|
|
2783
2789
|
let [t, n] = m(!0);
|
|
2784
2790
|
return d(() => {
|
|
2785
2791
|
let t = e.current;
|
|
@@ -2801,21 +2807,21 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
2801
2807
|
i?.disconnect(), o.disconnect(), window.removeEventListener("resize", r), t.removeEventListener("blur", r);
|
|
2802
2808
|
};
|
|
2803
2809
|
}, [e]), t;
|
|
2804
|
-
},
|
|
2805
|
-
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);
|
|
2806
2812
|
return /* @__PURE__ */ n("div", {
|
|
2807
|
-
className:
|
|
2813
|
+
className: Fi(),
|
|
2808
2814
|
"data-testid": o,
|
|
2809
2815
|
children: [/* @__PURE__ */ t("div", { children: e }), /* @__PURE__ */ t("div", {
|
|
2810
2816
|
ref: s,
|
|
2811
|
-
className:
|
|
2817
|
+
className: Ii({ mode: a }),
|
|
2812
2818
|
role: c ? "group" : void 0,
|
|
2813
2819
|
"aria-label": c ? i : void 0,
|
|
2814
2820
|
tabIndex: c ? 0 : void 0,
|
|
2815
2821
|
children: /* @__PURE__ */ t("div", { children: r })
|
|
2816
2822
|
})]
|
|
2817
2823
|
});
|
|
2818
|
-
},
|
|
2824
|
+
}, zi = b([
|
|
2819
2825
|
"grid gap-[var(--space-region)] lg:grid-cols-[12rem_minmax(0,1fr)]",
|
|
2820
2826
|
"[&>div:first-child]:border-solid [&>div:first-child]:border-border [&>div:first-child]:border-b [&>div:first-child]:pb-[var(--space-stack)]",
|
|
2821
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)]",
|
|
@@ -2828,7 +2834,7 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
2828
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"
|
|
2829
2835
|
} },
|
|
2830
2836
|
defaultVariants: { fill: !1 }
|
|
2831
|
-
}),
|
|
2837
|
+
}), Bi = (e) => {
|
|
2832
2838
|
if (!e) return;
|
|
2833
2839
|
let t = [];
|
|
2834
2840
|
for (let n = e.parentElement; n && n !== e.ownerDocument.documentElement; n = n.parentElement) t.push(n);
|
|
@@ -2845,7 +2851,7 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
2845
2851
|
return window.addEventListener("resize", n), () => {
|
|
2846
2852
|
r?.disconnect(), window.removeEventListener("resize", n), e.style.removeProperty("--sidebar-scrollport-height");
|
|
2847
2853
|
};
|
|
2848
|
-
},
|
|
2854
|
+
}, Vi = b([
|
|
2849
2855
|
"w-full text-left font-secondary text-label tracking-label wrap-anywhere",
|
|
2850
2856
|
"underline-offset-[var(--underline-offset)]",
|
|
2851
2857
|
"outline-focus-ring outline-offset-[var(--focus-ring-offset)] focus-visible:outline focus-visible:outline-[length:var(--focus-ring-width)]"
|
|
@@ -2856,11 +2862,11 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
2856
2862
|
inert: "text-muted cursor-not-allowed"
|
|
2857
2863
|
} },
|
|
2858
2864
|
defaultVariants: { state: "usable" }
|
|
2859
|
-
}),
|
|
2860
|
-
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;
|
|
2861
2867
|
return /* @__PURE__ */ t("li", { children: /* @__PURE__ */ t("button", {
|
|
2862
2868
|
type: "button",
|
|
2863
|
-
className:
|
|
2869
|
+
className: Vi({ state: r ? "inert" : o ? "active" : "usable" }),
|
|
2864
2870
|
disabled: r,
|
|
2865
2871
|
"aria-current": o ? "true" : void 0,
|
|
2866
2872
|
"data-testid": i,
|
|
@@ -2869,31 +2875,31 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
2869
2875
|
},
|
|
2870
2876
|
children: n
|
|
2871
2877
|
}) });
|
|
2872
|
-
},
|
|
2878
|
+
}, Wi = ({ children: e, testId: n }) => /* @__PURE__ */ t("div", {
|
|
2873
2879
|
"data-testid": n,
|
|
2874
2880
|
children: e
|
|
2875
|
-
}),
|
|
2881
|
+
}), Gi = {
|
|
2876
2882
|
Root: ({ active: e, label: i, onSelect$: a, children: s, testId: c, fill: l }) => {
|
|
2877
2883
|
let u = r.toArray(s).filter(o);
|
|
2878
2884
|
return /* @__PURE__ */ n("div", {
|
|
2879
|
-
className:
|
|
2885
|
+
className: zi({ fill: l }),
|
|
2880
2886
|
"data-testid": c,
|
|
2881
2887
|
children: [/* @__PURE__ */ t("div", { children: /* @__PURE__ */ t("nav", {
|
|
2882
|
-
ref: l ? void 0 :
|
|
2888
|
+
ref: l ? void 0 : Bi,
|
|
2883
2889
|
"aria-label": i,
|
|
2884
|
-
children: /* @__PURE__ */ t(
|
|
2890
|
+
children: /* @__PURE__ */ t(Hi, {
|
|
2885
2891
|
value: {
|
|
2886
2892
|
active: e,
|
|
2887
2893
|
onSelect$: a
|
|
2888
2894
|
},
|
|
2889
|
-
children: /* @__PURE__ */ t("ul", { children: u.filter((e) => e.type ===
|
|
2895
|
+
children: /* @__PURE__ */ t("ul", { children: u.filter((e) => e.type === Ui) })
|
|
2890
2896
|
})
|
|
2891
|
-
}) }), u.filter((e) => e.type ===
|
|
2897
|
+
}) }), u.filter((e) => e.type === Wi)]
|
|
2892
2898
|
});
|
|
2893
2899
|
},
|
|
2894
|
-
Item:
|
|
2895
|
-
Content:
|
|
2896
|
-
},
|
|
2900
|
+
Item: Ui,
|
|
2901
|
+
Content: Wi
|
|
2902
|
+
}, Ki = {
|
|
2897
2903
|
surface: "#ffffff",
|
|
2898
2904
|
selectedSurface: "#f8fafc",
|
|
2899
2905
|
selectedError: "#cd2d7d",
|
|
@@ -2922,7 +2928,7 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
2922
2928
|
errorHover: "#be185d",
|
|
2923
2929
|
errorForeground: "#ffffff",
|
|
2924
2930
|
info: "#0e7490"
|
|
2925
|
-
},
|
|
2931
|
+
}, qi = {
|
|
2926
2932
|
surface: "#0f172a",
|
|
2927
2933
|
selectedSurface: "#151e30",
|
|
2928
2934
|
selectedError: "#f48fb1",
|
|
@@ -2953,4 +2959,4 @@ var v = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, y = _, b = (e
|
|
|
2953
2959
|
info: "#22d3ee"
|
|
2954
2960
|
};
|
|
2955
2961
|
//#endregion
|
|
2956
|
-
export {
|
|
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 };
|