@agent-factory-platform/ui-kit 0.8.0 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. package/README.md +18 -0
  2. package/dist/charts/adapter.js +111 -0
  3. package/dist/charts/basic.js +115 -0
  4. package/dist/charts/chart-tooltip.js +21 -0
  5. package/dist/charts/event-markers-primitive.d.ts +10 -1
  6. package/dist/charts/event-markers-primitive.js +116 -0
  7. package/dist/charts/index.d.ts +1 -0
  8. package/dist/charts/ohlc-annotations.d.ts +56 -0
  9. package/dist/charts/ohlc-annotations.js +84 -0
  10. package/dist/charts/ohlc.d.ts +5 -1
  11. package/dist/charts/ohlc.js +240 -0
  12. package/dist/charts/series.js +584 -0
  13. package/dist/charts/theme.js +35 -0
  14. package/dist/charts/time-combo.js +17 -0
  15. package/dist/component-api.js +3 -5
  16. package/dist/component-api.json.js +9 -0
  17. package/dist/component-manifest.json.js +9 -0
  18. package/dist/components/alert.js +35 -0
  19. package/dist/components/avatar.js +101 -0
  20. package/dist/components/badge.js +111 -0
  21. package/dist/components/button-group.js +22 -0
  22. package/dist/components/button.js +64 -0
  23. package/dist/components/calendar-period-navigator.js +34 -0
  24. package/dist/components/card.js +35 -0
  25. package/dist/components/chart-frame.js +53 -0
  26. package/dist/components/color-picker.js +155 -0
  27. package/dist/components/combobox.js +129 -0
  28. package/dist/components/command-dialog.js +89 -0
  29. package/dist/components/confirm-dialog.js +57 -0
  30. package/dist/components/data-table.js +135 -0
  31. package/dist/components/date-time.js +203 -0
  32. package/dist/components/disclosure.js +29 -0
  33. package/dist/components/drawer.js +150 -0
  34. package/dist/components/dropdown-select.js +191 -0
  35. package/dist/components/field.js +21 -0
  36. package/dist/components/floating-window.js +159 -0
  37. package/dist/components/heading.js +21 -0
  38. package/dist/components/hover-tip.js +90 -0
  39. package/dist/components/icon-tip.js +12 -0
  40. package/dist/components/input-group.js +16 -0
  41. package/dist/components/input-otp.js +56 -0
  42. package/dist/components/input.js +44 -0
  43. package/dist/components/item.js +47 -0
  44. package/dist/components/kbd.js +18 -0
  45. package/dist/components/line-chart.js +79 -0
  46. package/dist/components/listbox.js +33 -0
  47. package/dist/components/live-value.js +26 -0
  48. package/dist/components/modal.js +140 -0
  49. package/dist/components/multi-select.js +54 -0
  50. package/dist/components/native-select.js +17 -0
  51. package/dist/components/navigation.js +42 -0
  52. package/dist/components/page.js +24 -0
  53. package/dist/components/popover-menu.js +164 -0
  54. package/dist/components/progress.js +23 -0
  55. package/dist/components/resizable-pane.js +73 -0
  56. package/dist/components/scroll-load-more.js +61 -0
  57. package/dist/components/seg-slider.js +42 -0
  58. package/dist/components/segmented-control.js +46 -0
  59. package/dist/components/selection-controls.js +119 -0
  60. package/dist/components/sidebar.js +23 -0
  61. package/dist/components/skeleton.js +9 -0
  62. package/dist/components/slider.js +162 -0
  63. package/dist/components/sliding-tabs.js +118 -0
  64. package/dist/components/spinner.js +9 -0
  65. package/dist/components/spotlight-tour.js +122 -0
  66. package/dist/components/stat-card.js +23 -0
  67. package/dist/components/state-view.js +75 -0
  68. package/dist/components/stats-table.js +17 -0
  69. package/dist/components/table.js +24 -0
  70. package/dist/components/tag-pill.d.ts +4 -1
  71. package/dist/components/tag-pill.js +69 -0
  72. package/dist/components/theme-editor.js +159 -0
  73. package/dist/components/toast.js +66 -0
  74. package/dist/components/toolbar.js +46 -0
  75. package/dist/components/utility.js +19 -0
  76. package/dist/components/widget-frame.js +41 -0
  77. package/dist/components/widget-picker.js +87 -0
  78. package/dist/components/workspace-grid.js +468 -0
  79. package/dist/focus-modality.js +3 -15
  80. package/dist/index.d.ts +1 -1
  81. package/dist/index.js +228 -5564
  82. package/dist/lib/cn.js +6 -0
  83. package/dist/lib/focus-modality.js +16 -0
  84. package/dist/lib/motion.js +27 -0
  85. package/dist/lib/viewport.js +13 -0
  86. package/dist/manifest.js +5 -7
  87. package/dist/styles.js +1 -1
  88. package/dist/theme.js +158 -0
  89. package/package.json +1 -1
@@ -0,0 +1,56 @@
1
+ import { jsxs as p, jsx as n } from "react/jsx-runtime";
2
+ import { cn as f } from "../lib/cn.js";
3
+ function v({
4
+ value: a,
5
+ onValueChange: s,
6
+ label: l,
7
+ length: t = 6,
8
+ disabled: u = !1,
9
+ invalid: r = !1,
10
+ inputMode: o = "numeric",
11
+ className: d
12
+ }) {
13
+ const c = (i) => {
14
+ const e = i.target.value, m = o === "numeric" ? e.replace(/\D/g, "") : e;
15
+ s(m.slice(0, t));
16
+ };
17
+ return /* @__PURE__ */ p(
18
+ "div",
19
+ {
20
+ "data-slot": "input-otp",
21
+ "data-focus-shell": !0,
22
+ "data-invalid": r || void 0,
23
+ className: f("group relative inline-flex max-w-full items-center gap-1.5 rounded-selection outline-none has-[input:focus-visible]:ring-2 has-[input:focus-visible]:ring-rust/35", d),
24
+ children: [
25
+ /* @__PURE__ */ n(
26
+ "input",
27
+ {
28
+ type: "text",
29
+ value: a,
30
+ onChange: c,
31
+ maxLength: t,
32
+ inputMode: o,
33
+ autoComplete: "one-time-code",
34
+ "aria-label": l,
35
+ "aria-invalid": r || void 0,
36
+ disabled: u,
37
+ className: "absolute inset-0 z-10 size-full cursor-text opacity-0 outline-none disabled:cursor-not-allowed"
38
+ }
39
+ ),
40
+ Array.from({ length: t }, (i, e) => /* @__PURE__ */ n(
41
+ "span",
42
+ {
43
+ "aria-hidden": !0,
44
+ "data-active": e === Math.min(a.length, t - 1) || void 0,
45
+ className: "grid size-control-default place-items-center rounded-control border border-border bg-pure-white font-mono text-body-sm tabular-nums text-ink data-[active=true]:border-rust data-[active=true]:bg-surface-muted group-data-[invalid=true]:border-danger",
46
+ children: a[e] ?? ""
47
+ },
48
+ e
49
+ ))
50
+ ]
51
+ }
52
+ );
53
+ }
54
+ export {
55
+ v as InputOtp
56
+ };
@@ -0,0 +1,44 @@
1
+ import { jsx as n } from "react/jsx-runtime";
2
+ import { forwardRef as i } from "react";
3
+ import { cn as a } from "../lib/cn.js";
4
+ const s = "w-full rounded-control border border-border bg-pure-white font-sohne text-ink outline-none transition-colors placeholder:text-graphite hover:border-graphite focus:border-rust/70 focus-visible:ring-2 focus-visible:ring-rust/20 disabled:cursor-not-allowed disabled:bg-surface-muted disabled:text-graphite disabled:opacity-70", l = {
5
+ compact: "h-control-compact px-2.5 text-caption",
6
+ default: "h-control-default px-3 text-body-sm",
7
+ touch: "h-control-touch px-3.5 text-body"
8
+ }, b = `${s} ${l.default}`, c = a(
9
+ s,
10
+ "min-h-[7.5rem] resize-y px-3 py-2.5 text-body-sm"
11
+ ), x = i(
12
+ function({ className: e, density: t = "default", ...o }, r) {
13
+ return /* @__PURE__ */ n(
14
+ "input",
15
+ {
16
+ ref: r,
17
+ "data-density": t,
18
+ className: a(s, l[t], e),
19
+ ...o
20
+ }
21
+ );
22
+ }
23
+ ), h = i(
24
+ function({ className: e, variant: t = "outlined", ...o }, r) {
25
+ return /* @__PURE__ */ n(
26
+ "textarea",
27
+ {
28
+ ref: r,
29
+ "data-variant": t,
30
+ className: a(
31
+ t === "outlined" ? c : "w-full min-h-[7.5rem] resize-y border-0 bg-transparent px-0 py-0 font-sohne text-body-sm text-ink outline-none placeholder:text-graphite focus-visible:ring-0 disabled:cursor-not-allowed disabled:text-graphite disabled:opacity-70",
32
+ e
33
+ ),
34
+ ...o
35
+ }
36
+ );
37
+ }
38
+ );
39
+ export {
40
+ x as Input,
41
+ h as Textarea,
42
+ b as fieldInputClass,
43
+ c as fieldTextareaClass
44
+ };
@@ -0,0 +1,47 @@
1
+ import { jsx as n } from "react/jsx-runtime";
2
+ import { cn as a } from "../lib/cn.js";
3
+ function c({ label: e, children: t, className: i }) {
4
+ return /* @__PURE__ */ n("ul", { role: "list", "aria-label": e, className: a("min-w-0 divide-y divide-divider", i), children: t });
5
+ }
6
+ function m({ className: e, density: t = "touch", ...i }) {
7
+ return /* @__PURE__ */ n(
8
+ "li",
9
+ {
10
+ "data-density": t,
11
+ className: a(
12
+ "flex min-w-0 items-center",
13
+ t === "compact" ? "min-h-row-default gap-1 py-0.5" : "min-h-row-touch gap-3 py-2.5",
14
+ e
15
+ ),
16
+ ...i
17
+ }
18
+ );
19
+ }
20
+ function s({ className: e, ...t }) {
21
+ return /* @__PURE__ */ n("span", { className: a("inline-grid size-control-default shrink-0 place-items-center rounded-control bg-surface-muted text-graphite", e), ...t });
22
+ }
23
+ function u({ className: e, ...t }) {
24
+ return /* @__PURE__ */ n("div", { className: a("min-w-0 flex-1", e), ...t });
25
+ }
26
+ function l({ className: e, ...t }) {
27
+ return /* @__PURE__ */ n("p", { className: a("truncate font-product text-body-sm font-[500] text-ink", e), ...t });
28
+ }
29
+ function p({ className: e, ...t }) {
30
+ return /* @__PURE__ */ n("p", { className: a("mt-0.5 truncate font-product text-caption text-graphite", e), ...t });
31
+ }
32
+ function d({ children: e, className: t }) {
33
+ return /* @__PURE__ */ n("span", { className: a("shrink-0 font-data text-data tabular-nums text-graphite", t), children: e });
34
+ }
35
+ function f({ children: e, className: t }) {
36
+ return /* @__PURE__ */ n("span", { className: a("shrink-0", t), children: e });
37
+ }
38
+ export {
39
+ m as Item,
40
+ f as ItemAction,
41
+ u as ItemContent,
42
+ p as ItemDescription,
43
+ c as ItemList,
44
+ s as ItemMedia,
45
+ d as ItemMeta,
46
+ l as ItemTitle
47
+ };
@@ -0,0 +1,18 @@
1
+ import { jsx as n } from "react/jsx-runtime";
2
+ import { cn as t } from "../lib/cn.js";
3
+ function d({ className: e, ...r }) {
4
+ return /* @__PURE__ */ n(
5
+ "kbd",
6
+ {
7
+ className: t("inline-flex min-w-5 items-center justify-center rounded-indicator border border-border bg-surface-muted px-1.5 py-0.5 font-mono text-micro leading-none text-graphite shadow-subtle", e),
8
+ ...r
9
+ }
10
+ );
11
+ }
12
+ function m({ label: e, children: r, className: o }) {
13
+ return /* @__PURE__ */ n("span", { role: "group", "aria-label": e, className: t("inline-flex items-center gap-1", o), children: r });
14
+ }
15
+ export {
16
+ d as Kbd,
17
+ m as KbdGroup
18
+ };
@@ -0,0 +1,79 @@
1
+ import { jsxs as l, jsx as r } from "react/jsx-runtime";
2
+ function i(t, o, e, n = 6) {
3
+ const a = Math.max(...t, 1), c = Math.min(...t, 0), d = a - c || 1, f = (o - n * 2) / (t.length - 1 || 1);
4
+ return t.map((h, s) => {
5
+ const m = n + s * f, u = e - n - (h - c) / d * (e - n * 2);
6
+ return `${s === 0 ? "M" : "L"}${m.toFixed(1)},${u.toFixed(1)}`;
7
+ }).join(" ");
8
+ }
9
+ function k({
10
+ current: t,
11
+ previous: o,
12
+ width: e = 280,
13
+ height: n = 96,
14
+ ariaLabel: a
15
+ }) {
16
+ return /* @__PURE__ */ l("svg", { width: "100%", viewBox: `0 0 ${e} ${n}`, role: "img", "aria-label": a, focusable: "false", className: "pointer-events-none select-none outline-none", children: [
17
+ o && /* @__PURE__ */ r(
18
+ "path",
19
+ {
20
+ d: i(o, e, n),
21
+ fill: "none",
22
+ stroke: "var(--color-rust)",
23
+ strokeWidth: 2,
24
+ strokeLinecap: "round",
25
+ opacity: 0.7
26
+ }
27
+ ),
28
+ /* @__PURE__ */ r(
29
+ "path",
30
+ {
31
+ d: i(t, e, n),
32
+ fill: "none",
33
+ stroke: "var(--color-data-blue)",
34
+ strokeWidth: 2,
35
+ strokeLinecap: "round"
36
+ }
37
+ )
38
+ ] });
39
+ }
40
+ function $({ pct: t, size: o = 96 }) {
41
+ const e = o / 2 - 8, n = 2 * Math.PI * e;
42
+ return /* @__PURE__ */ l("svg", { width: o, height: o, viewBox: `0 0 ${o} ${o}`, role: "img", "aria-label": `${t}%`, focusable: "false", className: "pointer-events-none select-none outline-none", children: [
43
+ /* @__PURE__ */ r("circle", { cx: o / 2, cy: o / 2, r: e, fill: "none", stroke: "var(--color-pure-white)", strokeWidth: 10 }),
44
+ /* @__PURE__ */ r(
45
+ "circle",
46
+ {
47
+ cx: o / 2,
48
+ cy: o / 2,
49
+ r: e,
50
+ fill: "none",
51
+ stroke: "var(--color-rust)",
52
+ strokeWidth: 10,
53
+ strokeLinecap: "round",
54
+ strokeDasharray: `${n * t / 100} ${n}`,
55
+ transform: `rotate(-90 ${o / 2} ${o / 2})`
56
+ }
57
+ ),
58
+ /* @__PURE__ */ l(
59
+ "text",
60
+ {
61
+ x: "50%",
62
+ y: "52%",
63
+ textAnchor: "middle",
64
+ dominantBaseline: "middle",
65
+ className: "font-sohne font-[480]",
66
+ fontSize: o * 0.22,
67
+ fill: "var(--color-ink)",
68
+ children: [
69
+ t,
70
+ "%"
71
+ ]
72
+ }
73
+ )
74
+ ] });
75
+ }
76
+ export {
77
+ $ as Donut,
78
+ k as LineChart
79
+ };
@@ -0,0 +1,33 @@
1
+ import { jsx as a } from "react/jsx-runtime";
2
+ import { Slot as s } from "radix-ui";
3
+ import { cn as d } from "../lib/cn.js";
4
+ function c({ label: o, className: t, children: i, ...r }) {
5
+ return /* @__PURE__ */ a("div", { role: "listbox", "aria-label": o, className: d("min-w-0", t), ...r, children: i });
6
+ }
7
+ function u({
8
+ selected: o,
9
+ disabled: t = !1,
10
+ asChild: i = !1,
11
+ className: r,
12
+ children: e,
13
+ ...n
14
+ }) {
15
+ const l = i ? s.Root : "div";
16
+ return /* @__PURE__ */ a(
17
+ l,
18
+ {
19
+ role: "option",
20
+ "aria-selected": o,
21
+ "aria-disabled": t || void 0,
22
+ "data-selected": o ? "true" : "false",
23
+ "data-disabled": t ? "true" : void 0,
24
+ className: r,
25
+ ...n,
26
+ children: e
27
+ }
28
+ );
29
+ }
30
+ export {
31
+ c as Listbox,
32
+ u as ListboxOption
33
+ };
@@ -0,0 +1,26 @@
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { useRef as u, useState as p, useEffect as c } from "react";
3
+ import { cn as l } from "../lib/cn.js";
4
+ function x({ value: i, children: a, className: d, ...f }) {
5
+ const o = u(i), m = u(0), [e, s] = p(null);
6
+ return c(() => {
7
+ const n = o.current;
8
+ i != null && Number.isFinite(i) && n != null && Number.isFinite(n) && i !== n && s({ direction: i > n ? "up" : "down", sequence: ++m.current }), o.current = i;
9
+ }, [i]), c(() => {
10
+ if (!e) return;
11
+ const n = window.setTimeout(() => s((t) => (t == null ? void 0 : t.sequence) === e.sequence ? null : t), 1200);
12
+ return () => window.clearTimeout(n);
13
+ }, [e]), /* @__PURE__ */ r("span", { "data-live-value": !0, className: l("inline-flex min-w-0", d), ...f, children: /* @__PURE__ */ r(
14
+ "span",
15
+ {
16
+ "data-live-value-pulse": !0,
17
+ "data-direction": e == null ? void 0 : e.direction,
18
+ className: l("rounded-control px-0.5", e && (e.direction === "up" ? "af-live-value-up" : "af-live-value-down")),
19
+ children: a
20
+ },
21
+ (e == null ? void 0 : e.sequence) ?? 0
22
+ ) });
23
+ }
24
+ export {
25
+ x as LiveValue
26
+ };
@@ -0,0 +1,140 @@
1
+ import { jsx as o, jsxs as b, Fragment as S } from "react/jsx-runtime";
2
+ import { useRef as C, useId as O, useEffect as q, useState as T } from "react";
3
+ import { createPortal as A } from "react-dom";
4
+ import { AnimatePresence as X, motion as j } from "motion/react";
5
+ import { X as $ } from "lucide-react";
6
+ import { transitions as v, fadeInOut as z, dialogRise as B, bottomSheet as G } from "../lib/motion.js";
7
+ import { cn as y } from "../lib/cn.js";
8
+ function H(i = 560) {
9
+ const n = `(min-width: ${i}px)`, [r, m] = T(
10
+ () => typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia(n).matches
11
+ );
12
+ return q(() => {
13
+ if (typeof window.matchMedia != "function") return;
14
+ const a = window.matchMedia(n), d = () => m(a.matches);
15
+ return a.addEventListener("change", d), () => a.removeEventListener("change", d);
16
+ }, [n]), r;
17
+ }
18
+ function _({
19
+ open: i,
20
+ onClose: n,
21
+ title: r,
22
+ ariaLabel: m,
23
+ closeLabel: a = "Close",
24
+ children: d,
25
+ footer: w,
26
+ size: s = "sm",
27
+ bare: f = !1,
28
+ /** Viewport width (px) at which the modal becomes a centered card; below stays bottom sheet. */
29
+ sheetUntilPx: D = 560,
30
+ placement: x = "responsive",
31
+ rootClassName: I,
32
+ panelClassName: P
33
+ }) {
34
+ const l = C(null), g = O(), k = C(n);
35
+ k.current = n;
36
+ const R = H(D), c = x === "center" || x === "responsive" && R, p = c ? B : G, F = c ? v.panel : v.drawer;
37
+ return q(() => {
38
+ if (!i) return;
39
+ const t = document.activeElement, E = (e) => {
40
+ if (e.key === "Escape") {
41
+ k.current();
42
+ return;
43
+ }
44
+ if (e.key === "Tab" && l.current) {
45
+ const u = l.current.querySelectorAll(
46
+ 'a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex="-1"])'
47
+ );
48
+ if (u.length === 0) {
49
+ e.preventDefault();
50
+ return;
51
+ }
52
+ const M = u[0], N = u[u.length - 1], h = document.activeElement;
53
+ e.shiftKey && (h === M || h === l.current) ? (e.preventDefault(), N.focus()) : !e.shiftKey && h === N && (e.preventDefault(), M.focus());
54
+ }
55
+ };
56
+ document.addEventListener("keydown", E);
57
+ const K = document.body.style.overflow;
58
+ document.body.style.overflow = "hidden";
59
+ const L = requestAnimationFrame(() => {
60
+ var e;
61
+ return (e = l.current) == null ? void 0 : e.focus();
62
+ });
63
+ return () => {
64
+ var e;
65
+ document.removeEventListener("keydown", E), document.body.style.overflow = K, cancelAnimationFrame(L), (e = t == null ? void 0 : t.focus) == null || e.call(t);
66
+ };
67
+ }, [i]), typeof document > "u" ? null : A(
68
+ /* @__PURE__ */ o(X, { children: i && /* @__PURE__ */ b(
69
+ "div",
70
+ {
71
+ className: y("fixed inset-0 z-50 flex justify-center", c ? "items-center" : "items-end", I),
72
+ role: "dialog",
73
+ "aria-modal": "true",
74
+ "aria-labelledby": !f && r ? g : void 0,
75
+ "aria-label": f ? m ?? r : r ? void 0 : m,
76
+ "data-overlay": "modal",
77
+ "data-placement": c ? "center" : "bottom",
78
+ children: [
79
+ /* @__PURE__ */ o(
80
+ j.div,
81
+ {
82
+ ...z,
83
+ transition: v.fade,
84
+ "aria-hidden": "true",
85
+ onClick: n,
86
+ className: "absolute inset-0 bg-black/55 backdrop-blur-sm"
87
+ }
88
+ ),
89
+ /* @__PURE__ */ o(
90
+ j.div,
91
+ {
92
+ ref: l,
93
+ "data-testid": "modal-panel",
94
+ tabIndex: -1,
95
+ onClick: (t) => t.stopPropagation(),
96
+ onMouseDown: (t) => t.stopPropagation(),
97
+ initial: p.initial,
98
+ animate: p.animate,
99
+ exit: p.exit,
100
+ transition: F,
101
+ className: y(
102
+ // overflow-hidden clips full-bleed children (e.g. the account
103
+ // modal's Fog sidebar) to the panel radius — without it a square
104
+ // child paints over the rounded corners.
105
+ "relative z-10 flex max-h-[90dvh] w-full min-w-0 flex-col overflow-hidden border border-border bg-surface-raised shadow-pop outline-none",
106
+ c ? y(
107
+ "m-4 rounded-overlay pb-0",
108
+ s === "full" ? "max-w-[1500px]" : s === "wide" ? "max-w-[980px]" : s === "xl" ? "max-w-overlay-dashboard" : s === "lg" ? "max-w-overlay-lg" : s === "command" ? "max-w-overlay-command" : "max-w-overlay-sm"
109
+ ) : "rounded-t-sheet border-b-0 pb-[env(safe-area-inset-bottom)]",
110
+ P
111
+ ),
112
+ children: f ? d : /* @__PURE__ */ b(S, { children: [
113
+ r && /* @__PURE__ */ b("header", { className: "flex shrink-0 items-center justify-between gap-3 px-5 pb-1 pt-5", children: [
114
+ /* @__PURE__ */ o("h2", { id: g, className: "font-sohne text-body-lg font-[500] tracking-[0] text-ink", children: r }),
115
+ /* @__PURE__ */ o(
116
+ "button",
117
+ {
118
+ type: "button",
119
+ onClick: n,
120
+ title: a,
121
+ "aria-label": a,
122
+ className: "-mr-1 grid size-8 place-items-center rounded-control text-graphite outline-none transition hover:bg-surface-hover hover:text-ink focus-visible:ring-2 focus-visible:ring-rust/35",
123
+ children: /* @__PURE__ */ o($, { size: 16, "aria-hidden": !0 })
124
+ }
125
+ )
126
+ ] }),
127
+ /* @__PURE__ */ o("div", { className: "min-h-0 min-w-0 flex-1 overflow-y-auto px-5 pb-5 pt-2", children: d }),
128
+ w && /* @__PURE__ */ o("div", { className: "shrink-0 border-t border-divider px-5 py-3", children: w })
129
+ ] })
130
+ }
131
+ )
132
+ ]
133
+ }
134
+ ) }),
135
+ document.body
136
+ );
137
+ }
138
+ export {
139
+ _ as Modal
140
+ };
@@ -0,0 +1,54 @@
1
+ import { jsxs as n, jsx as r } from "react/jsx-runtime";
2
+ import { ChevronDown as f, Check as b } from "lucide-react";
3
+ import { useId as p } from "react";
4
+ import { DropdownMenu as a } from "radix-ui";
5
+ import { Button as g } from "./button.js";
6
+ function C({
7
+ value: t,
8
+ options: s,
9
+ onValueChange: c,
10
+ label: l,
11
+ valueLabel: o
12
+ }) {
13
+ const i = p(), u = s.filter((e) => t.includes(e.value));
14
+ return /* @__PURE__ */ n(a.Root, { children: [
15
+ /* @__PURE__ */ r(a.Trigger, { asChild: !0, children: /* @__PURE__ */ n(g, { variant: "secondary", "aria-label": l, className: "max-w-full", children: [
16
+ /* @__PURE__ */ r("span", { className: "truncate", children: o(u) }),
17
+ /* @__PURE__ */ r(f, { size: 14, className: "shrink-0", "aria-hidden": !0 })
18
+ ] }) }),
19
+ /* @__PURE__ */ r(a.Portal, { children: /* @__PURE__ */ n(
20
+ a.Content,
21
+ {
22
+ "aria-labelledby": i,
23
+ sideOffset: 4,
24
+ collisionPadding: 8,
25
+ className: "z-50 min-w-48 rounded-panel border border-border bg-surface-raised p-1 font-product text-body-sm text-ink shadow-pop outline-none",
26
+ children: [
27
+ /* @__PURE__ */ r("span", { id: i, className: "sr-only", children: l }),
28
+ s.map((e) => {
29
+ const h = t.includes(e.value);
30
+ return /* @__PURE__ */ n(
31
+ a.CheckboxItem,
32
+ {
33
+ checked: h,
34
+ disabled: e.disabled,
35
+ onCheckedChange: (d) => c(d ? [...t, e.value] : t.filter((m) => m !== e.value)),
36
+ onSelect: (d) => d.preventDefault(),
37
+ className: "group flex min-h-row-default cursor-default select-none items-center gap-2 rounded-control px-3 outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[highlighted]:bg-surface-hover",
38
+ children: [
39
+ /* @__PURE__ */ r("span", { className: "inline-flex size-4 shrink-0 items-center justify-center rounded-indicator border border-border group-data-[state=checked]:border-rust group-data-[state=checked]:bg-rust group-data-[state=checked]:text-on-accent", children: /* @__PURE__ */ r(a.ItemIndicator, { children: /* @__PURE__ */ r(b, { size: 12, strokeWidth: 3, "aria-hidden": !0 }) }) }),
40
+ /* @__PURE__ */ r("span", { className: "min-w-0 flex-1 truncate", children: e.label }),
41
+ e.meta
42
+ ]
43
+ },
44
+ e.value
45
+ );
46
+ })
47
+ ]
48
+ }
49
+ ) })
50
+ ] });
51
+ }
52
+ export {
53
+ C as MultiSelect
54
+ };
@@ -0,0 +1,17 @@
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { cn as i } from "../lib/cn.js";
3
+ function s({ label: t, options: l, onChange: a, className: o, ...d }) {
4
+ return /* @__PURE__ */ r(
5
+ "select",
6
+ {
7
+ "aria-label": t,
8
+ className: i("h-control-default min-w-0 rounded-control border border-border bg-pure-white px-3 font-product text-body-sm text-ink outline-none hover:border-graphite focus:border-rust/70 focus-visible:ring-2 focus-visible:ring-rust/20 disabled:bg-surface-muted disabled:text-graphite", o),
9
+ onChange: (e) => a(e.target.value),
10
+ ...d,
11
+ children: l.map((e) => /* @__PURE__ */ r("option", { value: e.value, disabled: e.disabled, children: e.label }, e.value))
12
+ }
13
+ );
14
+ }
15
+ export {
16
+ s as NativeSelect
17
+ };
@@ -0,0 +1,42 @@
1
+ import { jsx as e, jsxs as s } from "react/jsx-runtime";
2
+ import { ChevronLeft as f, ChevronRight as d } from "lucide-react";
3
+ function v({ label: l, items: t }) {
4
+ return /* @__PURE__ */ e("nav", { "aria-label": l, children: /* @__PURE__ */ e("ol", { className: "flex min-w-0 items-center gap-1 font-product text-caption text-graphite", children: t.map((r, i) => {
5
+ const o = i === t.length - 1;
6
+ return /* @__PURE__ */ s("li", { className: "flex min-w-0 items-center gap-1", children: [
7
+ i > 0 && /* @__PURE__ */ e("span", { "aria-hidden": !0, children: "/" }),
8
+ o ? /* @__PURE__ */ e("span", { "aria-current": "page", className: "truncate font-[500] text-ink", children: r.label }) : r.href ? /* @__PURE__ */ e("a", { href: r.href, className: "truncate rounded-control outline-none hover:text-ink focus-visible:ring-2 focus-visible:ring-rust", children: r.label }) : /* @__PURE__ */ e("button", { type: "button", onClick: r.onClick, className: "truncate rounded-control outline-none hover:text-ink focus-visible:ring-2 focus-visible:ring-rust", children: r.label })
9
+ ] }, r.id);
10
+ }) }) });
11
+ }
12
+ function x({
13
+ label: l,
14
+ page: t,
15
+ pageCount: r,
16
+ onPageChange: i,
17
+ pageLabel: o,
18
+ previousLabel: c,
19
+ nextLabel: u
20
+ }) {
21
+ const b = Array.from({ length: r }, (n, h) => h + 1), a = "inline-flex size-control-compact items-center justify-center rounded-control font-data text-caption outline-none hover:bg-surface-hover focus-visible:ring-2 focus-visible:ring-rust disabled:opacity-40";
22
+ return /* @__PURE__ */ s("nav", { "aria-label": l, className: "flex items-center gap-1", children: [
23
+ /* @__PURE__ */ e("button", { type: "button", "aria-label": c, disabled: t <= 1, onClick: () => i(t - 1), className: a, children: /* @__PURE__ */ e(f, { size: 14, "aria-hidden": !0 }) }),
24
+ b.map((n) => /* @__PURE__ */ e(
25
+ "button",
26
+ {
27
+ type: "button",
28
+ "aria-label": o(n),
29
+ "aria-current": n === t ? "page" : void 0,
30
+ onClick: () => i(n),
31
+ className: `${a} ${n === t ? "bg-surface-hover font-[500] text-ink" : "text-graphite"}`,
32
+ children: n
33
+ },
34
+ n
35
+ )),
36
+ /* @__PURE__ */ e("button", { type: "button", "aria-label": u, disabled: t >= r, onClick: () => i(t + 1), className: a, children: /* @__PURE__ */ e(d, { size: 14, "aria-hidden": !0 }) })
37
+ ] });
38
+ }
39
+ export {
40
+ v as Breadcrumb,
41
+ x as Pagination
42
+ };
@@ -0,0 +1,24 @@
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import "react";
3
+ import { cn as t } from "../lib/cn.js";
4
+ function p({
5
+ className: m,
6
+ children: o,
7
+ width: a = "fluid"
8
+ }) {
9
+ return /* @__PURE__ */ r(
10
+ "div",
11
+ {
12
+ "data-page-width": a,
13
+ className: t(
14
+ "w-full px-3 md:px-5",
15
+ a === "contained" && "mx-auto max-w-[96rem]",
16
+ m
17
+ ),
18
+ children: o
19
+ }
20
+ );
21
+ }
22
+ export {
23
+ p as PageContainer
24
+ };