@goliapkg/gds 0.9.3 → 0.9.5
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/avatar-By0U5Vts.js +74 -0
- package/dist/avatar-By0U5Vts.js.map +1 -0
- package/dist/badge-DTJq6AXr.js +59 -0
- package/dist/badge-DTJq6AXr.js.map +1 -0
- package/dist/button-avu-rQU4.js +99 -0
- package/dist/button-avu-rQU4.js.map +1 -0
- package/dist/dom-17XgfxMq.js +20 -0
- package/dist/dom-17XgfxMq.js.map +1 -0
- package/dist/gesture-BCGijGek.js +104 -0
- package/dist/gesture-BCGijGek.js.map +1 -0
- package/dist/gesture-system-v-bjvnCe.js +56 -0
- package/dist/gesture-system-v-bjvnCe.js.map +1 -0
- package/dist/glass-CQTlX7IO.js +1702 -0
- package/dist/glass-CQTlX7IO.js.map +1 -0
- package/dist/highlight-BAGZc-4h.js +28 -0
- package/dist/highlight-BAGZc-4h.js.map +1 -0
- package/dist/hooks-BE-_EmDI.js +87 -0
- package/dist/hooks-BE-_EmDI.js.map +1 -0
- package/dist/icon-button-YatlVZnz.js +44 -0
- package/dist/icon-button-YatlVZnz.js.map +1 -0
- package/dist/index.d.ts +8 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +32 -18594
- package/dist/l0-tokens/deps.d.ts +5 -0
- package/dist/l0-tokens/deps.d.ts.map +1 -1
- package/dist/l0-tokens/index.js +4 -0
- package/dist/l0-tokens-DZkyVlac.js +296 -0
- package/dist/l0-tokens-DZkyVlac.js.map +1 -0
- package/dist/l1-systems/index.js +2 -0
- package/dist/l2-primitives/index.js +11 -0
- package/dist/l2-primitives/screen-overlay.d.ts.map +1 -1
- package/dist/l2-primitives/truncate.d.ts +2 -1
- package/dist/l2-primitives/truncate.d.ts.map +1 -1
- package/dist/l2-primitives-CqrezrJ4.js +482 -0
- package/dist/l2-primitives-CqrezrJ4.js.map +1 -0
- package/dist/l3-atoms/index.d.ts +0 -14
- package/dist/l3-atoms/index.d.ts.map +1 -1
- package/dist/l3-atoms/index.js +6 -0
- package/dist/l3-atoms/keyboard-shortcut.d.ts +1 -1
- package/dist/l3-atoms/keyboard-shortcut.d.ts.map +1 -1
- package/dist/l3-atoms/sparkle.d.ts +1 -1
- package/dist/l3-atoms/sparkle.d.ts.map +1 -1
- package/dist/l3-atoms-CsN9IA9J.js +1794 -0
- package/dist/l3-atoms-CsN9IA9J.js.map +1 -0
- package/dist/l4-molecules/dialog.d.ts.map +1 -1
- package/dist/l4-molecules/editable.d.ts.map +1 -0
- package/dist/l4-molecules/index.d.ts +12 -4
- package/dist/l4-molecules/index.d.ts.map +1 -1
- package/dist/l4-molecules/index.js +4 -0
- package/dist/l4-molecules/overflow-menu.d.ts.map +1 -0
- package/dist/l4-molecules/pin-input.d.ts.map +1 -0
- package/dist/l4-molecules/popover.d.ts.map +1 -0
- package/dist/l4-molecules/split-button.d.ts.map +1 -0
- package/dist/l4-molecules/tag-input.d.ts.map +1 -0
- package/dist/l4-molecules-DCc074MJ.js +4048 -0
- package/dist/l4-molecules-DCc074MJ.js.map +1 -0
- package/dist/l5-organisms/command-palette.d.ts.map +1 -1
- package/dist/l5-organisms/confetti.d.ts.map +1 -1
- package/dist/l5-organisms/cookie-banner.d.ts.map +1 -1
- package/dist/l5-organisms/image-preview.d.ts.map +1 -1
- package/dist/l5-organisms/index.d.ts +2 -0
- package/dist/l5-organisms/index.d.ts.map +1 -1
- package/dist/l5-organisms/index.js +2 -0
- package/dist/l5-organisms/notification-toast.d.ts.map +1 -1
- package/dist/{l4-molecules → l5-organisms}/sortable-table.d.ts.map +1 -1
- package/dist/l5-organisms-8KB_8a-H.js +3798 -0
- package/dist/l5-organisms-8KB_8a-H.js.map +1 -0
- package/dist/l6-charts/candlestick-chart.d.ts.map +1 -1
- package/dist/l6-charts/index.js +2 -0
- package/dist/l6-charts-DYnr5B9X.js +1743 -0
- package/dist/l6-charts-DYnr5B9X.js.map +1 -0
- package/dist/l7-patterns/index.js +2 -0
- package/dist/l7-patterns-DZXveS4Y.js +1826 -0
- package/dist/l7-patterns-DZXveS4Y.js.map +1 -0
- package/dist/loading-dots-fB4X_Zh0.js +24 -0
- package/dist/loading-dots-fB4X_Zh0.js.map +1 -0
- package/dist/motion-DUPegem-.js +22 -0
- package/dist/motion-DUPegem-.js.map +1 -0
- package/dist/portal-Bbl6F_Wj.js +9 -0
- package/dist/portal-Bbl6F_Wj.js.map +1 -0
- package/dist/progress-wAKN3Czz.js +44 -0
- package/dist/progress-wAKN3Czz.js.map +1 -0
- package/dist/resize-handle-CktEYqwi.js +77 -0
- package/dist/resize-handle-CktEYqwi.js.map +1 -0
- package/dist/scales-C80FTPsL.js +1299 -0
- package/dist/scales-C80FTPsL.js.map +1 -0
- package/dist/separator-Dqs23A9D.js +65 -0
- package/dist/separator-Dqs23A9D.js.map +1 -0
- package/dist/skeleton-C9FFZSYN.js +43 -0
- package/dist/skeleton-C9FFZSYN.js.map +1 -0
- package/dist/spinner-D8Ti-TFe.js +101 -0
- package/dist/spinner-D8Ti-TFe.js.map +1 -0
- package/dist/stepper-DhpGORX8.js +140 -0
- package/dist/stepper-DhpGORX8.js.map +1 -0
- package/dist/switch-DC85Os9r.js +130 -0
- package/dist/switch-DC85Os9r.js.map +1 -0
- package/dist/textarea-BJCl_aH2.js +40 -0
- package/dist/textarea-BJCl_aH2.js.map +1 -0
- package/dist/toast-DN5xANLM.js +442 -0
- package/dist/toast-DN5xANLM.js.map +1 -0
- package/dist/use-theme-C0aWVw70.js +203 -0
- package/dist/use-theme-C0aWVw70.js.map +1 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +7 -0
- package/dist/utils/portal.d.ts +3 -0
- package/dist/utils/portal.d.ts.map +1 -0
- package/package.json +37 -1
- package/dist/index.js.map +0 -1
- package/dist/l3-atoms/editable.d.ts.map +0 -1
- package/dist/l3-atoms/overflow-menu.d.ts.map +0 -1
- package/dist/l3-atoms/pin-input.d.ts.map +0 -1
- package/dist/l3-atoms/popover.d.ts.map +0 -1
- package/dist/l3-atoms/split-button.d.ts.map +0 -1
- package/dist/l3-atoms/tag-input.d.ts.map +0 -1
- package/dist/l3-atoms/time-since.d.ts +0 -9
- package/dist/l3-atoms/time-since.d.ts.map +0 -1
- package/dist/l4-molecules/otp-input.d.ts +0 -11
- package/dist/l4-molecules/otp-input.d.ts.map +0 -1
- /package/dist/{l3-atoms → l4-molecules}/editable.d.ts +0 -0
- /package/dist/{l3-atoms → l4-molecules}/overflow-menu.d.ts +0 -0
- /package/dist/{l3-atoms → l4-molecules}/pin-input.d.ts +0 -0
- /package/dist/{l3-atoms → l4-molecules}/popover.d.ts +0 -0
- /package/dist/{l3-atoms → l4-molecules}/split-button.d.ts +0 -0
- /package/dist/{l3-atoms → l4-molecules}/tag-input.d.ts +0 -0
- /package/dist/{l4-molecules → l5-organisms}/sortable-table.d.ts +0 -0
|
@@ -0,0 +1,3798 @@
|
|
|
1
|
+
import { n as e, r as t, t as n } from "./glass-CQTlX7IO.js";
|
|
2
|
+
import { t as r } from "./button-avu-rQU4.js";
|
|
3
|
+
import { r as i } from "./motion-DUPegem-.js";
|
|
4
|
+
import { t as a } from "./badge-DTJq6AXr.js";
|
|
5
|
+
import { t as o } from "./highlight-BAGZc-4h.js";
|
|
6
|
+
import { t as s } from "./progress-wAKN3Czz.js";
|
|
7
|
+
import { t as c } from "./portal-Bbl6F_Wj.js";
|
|
8
|
+
import { t as l } from "./avatar-By0U5Vts.js";
|
|
9
|
+
import { r as u } from "./dom-17XgfxMq.js";
|
|
10
|
+
import { t as d } from "./loading-dots-fB4X_Zh0.js";
|
|
11
|
+
import { n as f, s as p, t as m } from "./hooks-BE-_EmDI.js";
|
|
12
|
+
import { a as h, i as g, n as _, o as v, r as y, t as b } from "./toast-DN5xANLM.js";
|
|
13
|
+
import { Children as x, Component as S, forwardRef as C, useCallback as w, useEffect as T, useMemo as E, useRef as D, useState as O, useSyncExternalStore as k } from "react";
|
|
14
|
+
import { Fragment as A, jsx as j, jsxs as M } from "react/jsx-runtime";
|
|
15
|
+
//#region src/l5-organisms/activity-feed.tsx
|
|
16
|
+
var N = C(function({ className: e, items: n }, r) {
|
|
17
|
+
return /* @__PURE__ */ j("div", {
|
|
18
|
+
ref: r,
|
|
19
|
+
className: t("flex flex-col", e),
|
|
20
|
+
"data-component": "activity-feed",
|
|
21
|
+
role: "list",
|
|
22
|
+
children: n.map((e) => /* @__PURE__ */ M("div", {
|
|
23
|
+
className: "flex items-start gap-3 gds-pad-x gds-pad-y-sm",
|
|
24
|
+
role: "listitem",
|
|
25
|
+
children: [/* @__PURE__ */ j(l, {
|
|
26
|
+
name: e.user,
|
|
27
|
+
src: e.avatar,
|
|
28
|
+
size: "sm"
|
|
29
|
+
}), /* @__PURE__ */ M("div", {
|
|
30
|
+
className: "min-w-0 flex-1",
|
|
31
|
+
children: [/* @__PURE__ */ M("div", {
|
|
32
|
+
className: "gds-text-body",
|
|
33
|
+
children: [
|
|
34
|
+
/* @__PURE__ */ j("span", {
|
|
35
|
+
className: "font-medium text-fg",
|
|
36
|
+
children: e.user
|
|
37
|
+
}),
|
|
38
|
+
/* @__PURE__ */ M("span", {
|
|
39
|
+
className: "text-fg-muted",
|
|
40
|
+
children: [" ", e.action]
|
|
41
|
+
}),
|
|
42
|
+
e.target !== void 0 && /* @__PURE__ */ M("span", {
|
|
43
|
+
className: "font-medium text-fg",
|
|
44
|
+
children: [" ", e.target]
|
|
45
|
+
})
|
|
46
|
+
]
|
|
47
|
+
}), /* @__PURE__ */ j("div", {
|
|
48
|
+
className: "mt-0.5 gds-text-caption text-fg-muted",
|
|
49
|
+
children: e.timestamp
|
|
50
|
+
})]
|
|
51
|
+
})]
|
|
52
|
+
}, e.id))
|
|
53
|
+
});
|
|
54
|
+
}), P = {
|
|
55
|
+
fade: "animate-fade-in",
|
|
56
|
+
scale: "animate-scale-in",
|
|
57
|
+
"slide-up": "animate-slide-up",
|
|
58
|
+
"slide-down": "animate-slide-down"
|
|
59
|
+
}, F = {
|
|
60
|
+
fade: "animate-fade-out",
|
|
61
|
+
scale: "animate-scale-out",
|
|
62
|
+
"slide-up": "animate-slide-down",
|
|
63
|
+
"slide-down": "animate-slide-up"
|
|
64
|
+
}, ee = C(function({ children: e, animation: n = "fade", duration: r = 200, className: i }, a) {
|
|
65
|
+
let [o, s] = O(e != null && e !== !1), [c, l] = O(!1), u = D(e), d = D(null), f = e != null && e !== !1;
|
|
66
|
+
if (T(() => {
|
|
67
|
+
f ? (d.current !== null && (clearTimeout(d.current), d.current = null), l(!1), s(!0), u.current = e) : o && !c && (l(!0), d.current = setTimeout(() => {
|
|
68
|
+
s(!1), l(!1), d.current = null;
|
|
69
|
+
}, r));
|
|
70
|
+
}, [
|
|
71
|
+
f,
|
|
72
|
+
e,
|
|
73
|
+
r,
|
|
74
|
+
o,
|
|
75
|
+
c
|
|
76
|
+
]), T(() => () => {
|
|
77
|
+
d.current !== null && clearTimeout(d.current);
|
|
78
|
+
}, []), !o) return null;
|
|
79
|
+
let p = c ? F[n] : P[n], m = c ? u.current : e;
|
|
80
|
+
return /* @__PURE__ */ j("div", {
|
|
81
|
+
ref: a,
|
|
82
|
+
className: t(p, i),
|
|
83
|
+
style: { animationDuration: `${r}ms` },
|
|
84
|
+
"data-component": "animate-presence",
|
|
85
|
+
"data-state": c ? "exiting" : "entering",
|
|
86
|
+
children: m
|
|
87
|
+
});
|
|
88
|
+
}), te = {
|
|
89
|
+
fade: "animate-fade-in",
|
|
90
|
+
scale: "animate-scale-in",
|
|
91
|
+
"slide-left": "animate-slide-left",
|
|
92
|
+
"slide-up": "animate-slide-up"
|
|
93
|
+
}, ne = C(function({ animation: e = "slide-up", children: n, className: r, stagger: i = 50, ...a }, o) {
|
|
94
|
+
let s = x.toArray(n);
|
|
95
|
+
return /* @__PURE__ */ j("div", {
|
|
96
|
+
className: t("flex flex-col", r),
|
|
97
|
+
"data-component": "animated-list",
|
|
98
|
+
ref: o,
|
|
99
|
+
...a,
|
|
100
|
+
children: s.map((t, n) => /* @__PURE__ */ j("div", {
|
|
101
|
+
className: te[e],
|
|
102
|
+
style: { animationDelay: `${n * i}ms` },
|
|
103
|
+
children: t
|
|
104
|
+
}, n))
|
|
105
|
+
});
|
|
106
|
+
});
|
|
107
|
+
//#endregion
|
|
108
|
+
//#region src/l5-organisms/audio-player.tsx
|
|
109
|
+
function I(e) {
|
|
110
|
+
return `${Math.floor(e / 60)}:${Math.floor(e % 60).toString().padStart(2, "0")}`;
|
|
111
|
+
}
|
|
112
|
+
var re = C(function({ src: e, title: r, glass: a, className: o }, s) {
|
|
113
|
+
let c = D(null), [l, u] = O(!1), [d, f] = O(0), [p, m] = O(0), h = w(() => {
|
|
114
|
+
let e = c.current;
|
|
115
|
+
e !== null && (e.paused ? (e.play().catch(() => {}), u(!0)) : (e.pause(), u(!1)));
|
|
116
|
+
}, []), g = w(() => {
|
|
117
|
+
let e = c.current;
|
|
118
|
+
e !== null && f(e.currentTime);
|
|
119
|
+
}, []), _ = w(() => {
|
|
120
|
+
let e = c.current;
|
|
121
|
+
e !== null && m(e.duration);
|
|
122
|
+
}, []), v = w(() => {
|
|
123
|
+
u(!1);
|
|
124
|
+
}, []), y = w((e) => {
|
|
125
|
+
let t = c.current;
|
|
126
|
+
if (t === null) return;
|
|
127
|
+
let n = e.currentTarget.getBoundingClientRect();
|
|
128
|
+
t.currentTime = (e.clientX - n.left) / n.width * p;
|
|
129
|
+
}, [p]), b = p > 0 ? d / p * 100 : 0;
|
|
130
|
+
return /* @__PURE__ */ M("div", {
|
|
131
|
+
ref: s,
|
|
132
|
+
className: t("flex items-center gap-2 gds-radius-card gds-pad-x gds-pad-y", "border border-border bg-bg-secondary", n(a), a === !0 && "border-white/10 bg-bg/60", o),
|
|
133
|
+
"data-component": "audio-player",
|
|
134
|
+
children: [
|
|
135
|
+
/* @__PURE__ */ j("audio", {
|
|
136
|
+
ref: c,
|
|
137
|
+
src: e,
|
|
138
|
+
onTimeUpdate: g,
|
|
139
|
+
onLoadedMetadata: _,
|
|
140
|
+
onEnded: v,
|
|
141
|
+
"data-testid": "audio-element"
|
|
142
|
+
}),
|
|
143
|
+
/* @__PURE__ */ j("button", {
|
|
144
|
+
type: "button",
|
|
145
|
+
onClick: h,
|
|
146
|
+
className: t("shrink-0 text-fg", i),
|
|
147
|
+
"aria-label": l ? "Pause" : "Play",
|
|
148
|
+
"data-testid": "play-button",
|
|
149
|
+
children: l ? /* @__PURE__ */ M("svg", {
|
|
150
|
+
width: "16",
|
|
151
|
+
height: "16",
|
|
152
|
+
viewBox: "0 0 16 16",
|
|
153
|
+
fill: "currentColor",
|
|
154
|
+
children: [/* @__PURE__ */ j("rect", {
|
|
155
|
+
x: "3",
|
|
156
|
+
y: "2",
|
|
157
|
+
width: "4",
|
|
158
|
+
height: "12",
|
|
159
|
+
rx: "1"
|
|
160
|
+
}), /* @__PURE__ */ j("rect", {
|
|
161
|
+
x: "9",
|
|
162
|
+
y: "2",
|
|
163
|
+
width: "4",
|
|
164
|
+
height: "12",
|
|
165
|
+
rx: "1"
|
|
166
|
+
})]
|
|
167
|
+
}) : /* @__PURE__ */ j("svg", {
|
|
168
|
+
width: "16",
|
|
169
|
+
height: "16",
|
|
170
|
+
viewBox: "0 0 16 16",
|
|
171
|
+
fill: "currentColor",
|
|
172
|
+
children: /* @__PURE__ */ j("path", { d: "M4 2l10 6-10 6V2z" })
|
|
173
|
+
})
|
|
174
|
+
}),
|
|
175
|
+
r !== void 0 && /* @__PURE__ */ j("span", {
|
|
176
|
+
className: "shrink-0 select-none text-xs text-fg-muted",
|
|
177
|
+
"data-testid": "title",
|
|
178
|
+
children: r
|
|
179
|
+
}),
|
|
180
|
+
/* @__PURE__ */ j("div", {
|
|
181
|
+
className: t("relative h-1 flex-1 cursor-pointer rounded-full bg-bg-tertiary", i),
|
|
182
|
+
onClick: y,
|
|
183
|
+
role: "slider",
|
|
184
|
+
"aria-label": "Seek",
|
|
185
|
+
"aria-valuemin": 0,
|
|
186
|
+
"aria-valuemax": Math.floor(p),
|
|
187
|
+
"aria-valuenow": Math.floor(d),
|
|
188
|
+
tabIndex: 0,
|
|
189
|
+
"data-testid": "progress-bar",
|
|
190
|
+
children: /* @__PURE__ */ j("div", {
|
|
191
|
+
className: "absolute inset-y-0 left-0 rounded-full bg-accent",
|
|
192
|
+
style: { width: `${b}%` }
|
|
193
|
+
})
|
|
194
|
+
}),
|
|
195
|
+
/* @__PURE__ */ M("span", {
|
|
196
|
+
className: "shrink-0 select-none text-xs tabular-nums text-fg-muted",
|
|
197
|
+
"data-testid": "time-display",
|
|
198
|
+
children: [
|
|
199
|
+
I(d),
|
|
200
|
+
" / ",
|
|
201
|
+
I(p)
|
|
202
|
+
]
|
|
203
|
+
})
|
|
204
|
+
]
|
|
205
|
+
});
|
|
206
|
+
}), ie = C(function({ className: e, entries: n, ...r }, i) {
|
|
207
|
+
return /* @__PURE__ */ j("div", {
|
|
208
|
+
className: t("flex flex-col", e),
|
|
209
|
+
"data-component": "audit-log",
|
|
210
|
+
ref: i,
|
|
211
|
+
...r,
|
|
212
|
+
children: n.map((e, n) => /* @__PURE__ */ j("div", {
|
|
213
|
+
className: t("gds-pad-x gds-pad-y", n % 2 == 1 && "bg-surface/50"),
|
|
214
|
+
children: /* @__PURE__ */ j(v, {
|
|
215
|
+
action: e.action,
|
|
216
|
+
target: e.target,
|
|
217
|
+
timestamp: e.timestamp,
|
|
218
|
+
user: e.user,
|
|
219
|
+
variant: e.variant ?? "default"
|
|
220
|
+
})
|
|
221
|
+
}, e.id))
|
|
222
|
+
});
|
|
223
|
+
}), ae = C(function({ users: e, onSelect: r, compact: i = !1, glass: a, className: o, ...s }, c) {
|
|
224
|
+
return /* @__PURE__ */ j("div", {
|
|
225
|
+
className: t("gds-radius-popover overflow-hidden border border-border", n(a), o),
|
|
226
|
+
"data-component": "avatar-list",
|
|
227
|
+
ref: c,
|
|
228
|
+
...s,
|
|
229
|
+
children: e.map((e) => {
|
|
230
|
+
let n = /* @__PURE__ */ M(A, { children: [/* @__PURE__ */ j(l, {
|
|
231
|
+
name: e.name,
|
|
232
|
+
src: e.src,
|
|
233
|
+
status: e.status,
|
|
234
|
+
size: "sm"
|
|
235
|
+
}), /* @__PURE__ */ M("div", {
|
|
236
|
+
className: "min-w-0 flex-1",
|
|
237
|
+
children: [/* @__PURE__ */ j("div", {
|
|
238
|
+
className: "truncate gds-text-body font-medium text-fg",
|
|
239
|
+
children: e.name
|
|
240
|
+
}), i !== !0 && e.role !== void 0 && /* @__PURE__ */ j("div", {
|
|
241
|
+
className: "truncate gds-text-caption text-fg-muted",
|
|
242
|
+
children: e.role
|
|
243
|
+
})]
|
|
244
|
+
})] }), a = t("flex items-center gds-gap gds-pad-x gds-pad-y", "border-b border-border last:border-b-0", r !== void 0 && "cursor-pointer transition-colors hover:bg-bg-tertiary/30 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-offset-1 focus-visible:ring-offset-bg");
|
|
245
|
+
return r === void 0 ? /* @__PURE__ */ j("div", {
|
|
246
|
+
className: a,
|
|
247
|
+
children: n
|
|
248
|
+
}, e.name) : /* @__PURE__ */ j("button", {
|
|
249
|
+
type: "button",
|
|
250
|
+
className: t(a, "w-full text-left"),
|
|
251
|
+
onClick: () => r(e.name),
|
|
252
|
+
children: n
|
|
253
|
+
}, e.name);
|
|
254
|
+
})
|
|
255
|
+
});
|
|
256
|
+
}), oe = [
|
|
257
|
+
"Su",
|
|
258
|
+
"Mo",
|
|
259
|
+
"Tu",
|
|
260
|
+
"We",
|
|
261
|
+
"Th",
|
|
262
|
+
"Fr",
|
|
263
|
+
"Sa"
|
|
264
|
+
], se = [
|
|
265
|
+
"January",
|
|
266
|
+
"February",
|
|
267
|
+
"March",
|
|
268
|
+
"April",
|
|
269
|
+
"May",
|
|
270
|
+
"June",
|
|
271
|
+
"July",
|
|
272
|
+
"August",
|
|
273
|
+
"September",
|
|
274
|
+
"October",
|
|
275
|
+
"November",
|
|
276
|
+
"December"
|
|
277
|
+
];
|
|
278
|
+
function L(e, t) {
|
|
279
|
+
return e.getFullYear() === t.getFullYear() && e.getMonth() === t.getMonth() && e.getDate() === t.getDate();
|
|
280
|
+
}
|
|
281
|
+
function ce(e, t, n) {
|
|
282
|
+
return t !== void 0 && e < new Date(t.getFullYear(), t.getMonth(), t.getDate()) || n !== void 0 && e > new Date(n.getFullYear(), n.getMonth(), n.getDate());
|
|
283
|
+
}
|
|
284
|
+
function le(e, t) {
|
|
285
|
+
let n = [], r = new Date(e, t, 1);
|
|
286
|
+
for (; r.getMonth() === t;) n.push(new Date(r)), r.setDate(r.getDate() + 1);
|
|
287
|
+
return n;
|
|
288
|
+
}
|
|
289
|
+
function ue(e, t) {
|
|
290
|
+
let n = le(e, t), r = n[0].getDay(), i = Array.from({ length: r }, () => null);
|
|
291
|
+
for (i.push(...n); i.length < 42;) i.push(null);
|
|
292
|
+
return i;
|
|
293
|
+
}
|
|
294
|
+
//#endregion
|
|
295
|
+
//#region src/l5-organisms/calendar.tsx
|
|
296
|
+
var R = C(function({ value: e, onChange: n, min: r, max: a, className: o }, s) {
|
|
297
|
+
let c = /* @__PURE__ */ new Date(), l = e ?? c, [u, d] = O(l.getFullYear()), [f, p] = O(l.getMonth()), m = ue(u, f), h = () => {
|
|
298
|
+
f === 0 ? (d((e) => e - 1), p(11)) : p((e) => e - 1);
|
|
299
|
+
}, g = () => {
|
|
300
|
+
f === 11 ? (d((e) => e + 1), p(0)) : p((e) => e + 1);
|
|
301
|
+
};
|
|
302
|
+
return /* @__PURE__ */ M("div", {
|
|
303
|
+
ref: s,
|
|
304
|
+
className: t("w-64 gds-radius-popover border border-border bg-surface gds-pad-x gds-pad-y select-none", o),
|
|
305
|
+
"data-component": "calendar",
|
|
306
|
+
children: [
|
|
307
|
+
/* @__PURE__ */ M("div", {
|
|
308
|
+
className: "mb-2 flex items-center justify-between",
|
|
309
|
+
children: [
|
|
310
|
+
/* @__PURE__ */ j("button", {
|
|
311
|
+
type: "button",
|
|
312
|
+
className: t("rounded p-1 text-fg-muted hover:bg-bg-secondary hover:text-fg", i),
|
|
313
|
+
onClick: h,
|
|
314
|
+
"aria-label": "Previous month",
|
|
315
|
+
children: /* @__PURE__ */ j("svg", {
|
|
316
|
+
className: "h-4 w-4",
|
|
317
|
+
viewBox: "0 0 16 16",
|
|
318
|
+
fill: "none",
|
|
319
|
+
stroke: "currentColor",
|
|
320
|
+
strokeWidth: "2",
|
|
321
|
+
children: /* @__PURE__ */ j("path", { d: "M10 4L6 8L10 12" })
|
|
322
|
+
})
|
|
323
|
+
}),
|
|
324
|
+
/* @__PURE__ */ M("span", {
|
|
325
|
+
className: "text-sm font-medium text-fg",
|
|
326
|
+
children: [
|
|
327
|
+
se[f],
|
|
328
|
+
" ",
|
|
329
|
+
u
|
|
330
|
+
]
|
|
331
|
+
}),
|
|
332
|
+
/* @__PURE__ */ j("button", {
|
|
333
|
+
type: "button",
|
|
334
|
+
className: t("rounded p-1 text-fg-muted hover:bg-bg-secondary hover:text-fg", i),
|
|
335
|
+
onClick: g,
|
|
336
|
+
"aria-label": "Next month",
|
|
337
|
+
children: /* @__PURE__ */ j("svg", {
|
|
338
|
+
className: "h-4 w-4",
|
|
339
|
+
viewBox: "0 0 16 16",
|
|
340
|
+
fill: "none",
|
|
341
|
+
stroke: "currentColor",
|
|
342
|
+
strokeWidth: "2",
|
|
343
|
+
children: /* @__PURE__ */ j("path", { d: "M6 4L10 8L6 12" })
|
|
344
|
+
})
|
|
345
|
+
})
|
|
346
|
+
]
|
|
347
|
+
}),
|
|
348
|
+
/* @__PURE__ */ j("div", {
|
|
349
|
+
className: "grid grid-cols-7 gds-gap-xs text-center gds-text-body text-fg-muted",
|
|
350
|
+
children: oe.map((e) => /* @__PURE__ */ j("div", {
|
|
351
|
+
className: "gds-pad-y-sm font-medium",
|
|
352
|
+
children: e
|
|
353
|
+
}, e))
|
|
354
|
+
}),
|
|
355
|
+
/* @__PURE__ */ j("div", {
|
|
356
|
+
className: "grid grid-cols-7 gds-gap-xs text-center gds-text-body",
|
|
357
|
+
children: m.map((o, s) => {
|
|
358
|
+
if (o === null) return /* @__PURE__ */ j("div", { className: "gds-pad-y-sm" }, `e-${s}`);
|
|
359
|
+
let l = ce(o, r, a), u = e !== void 0 && L(o, e), d = L(o, c);
|
|
360
|
+
return /* @__PURE__ */ j("button", {
|
|
361
|
+
type: "button",
|
|
362
|
+
disabled: l,
|
|
363
|
+
className: t("gds-radius-badge gds-pad-y-sm transition-colors", i, l && "cursor-not-allowed opacity-30", !l && !u && "hover:bg-bg-secondary", u && "bg-accent text-accent-fg", !u && d && "ring-1 ring-accent", !l && "text-fg"),
|
|
364
|
+
onClick: () => {
|
|
365
|
+
!l && n !== void 0 && n(o);
|
|
366
|
+
},
|
|
367
|
+
children: o.getDate()
|
|
368
|
+
}, o.toISOString());
|
|
369
|
+
})
|
|
370
|
+
})
|
|
371
|
+
]
|
|
372
|
+
});
|
|
373
|
+
}), de = () => /* @__PURE__ */ j("svg", {
|
|
374
|
+
width: "16",
|
|
375
|
+
height: "16",
|
|
376
|
+
viewBox: "0 0 16 16",
|
|
377
|
+
fill: "none",
|
|
378
|
+
stroke: "currentColor",
|
|
379
|
+
strokeWidth: "1.5",
|
|
380
|
+
strokeLinecap: "round",
|
|
381
|
+
strokeLinejoin: "round",
|
|
382
|
+
children: /* @__PURE__ */ j("path", { d: "M10 3L5 8l5 5" })
|
|
383
|
+
}), fe = () => /* @__PURE__ */ j("svg", {
|
|
384
|
+
width: "16",
|
|
385
|
+
height: "16",
|
|
386
|
+
viewBox: "0 0 16 16",
|
|
387
|
+
fill: "none",
|
|
388
|
+
stroke: "currentColor",
|
|
389
|
+
strokeWidth: "1.5",
|
|
390
|
+
strokeLinecap: "round",
|
|
391
|
+
strokeLinejoin: "round",
|
|
392
|
+
children: /* @__PURE__ */ j("path", { d: "M6 3l5 5-5 5" })
|
|
393
|
+
}), pe = C(function({ children: e, autoPlay: r = !1, interval: i = 5e3, showDots: a = !0, showArrows: o = !0, glass: s = !1, className: c }, l) {
|
|
394
|
+
let u = x.toArray(e), d = u.length, [f, p] = O(0), m = D(!1), h = D(null), g = w((e) => {
|
|
395
|
+
p((e % d + d) % d);
|
|
396
|
+
}, [d]), _ = w(() => g(f - 1), [f, g]), v = w(() => g(f + 1), [f, g]);
|
|
397
|
+
T(() => {
|
|
398
|
+
if (!r || d <= 1) return;
|
|
399
|
+
let e = setInterval(() => {
|
|
400
|
+
m.current || p((e) => (e + 1) % d);
|
|
401
|
+
}, i);
|
|
402
|
+
return () => clearInterval(e);
|
|
403
|
+
}, [
|
|
404
|
+
r,
|
|
405
|
+
i,
|
|
406
|
+
d
|
|
407
|
+
]);
|
|
408
|
+
let y = w((e) => {
|
|
409
|
+
h.current = e.touches[0].clientX;
|
|
410
|
+
}, []), b = w((e) => {
|
|
411
|
+
if (h.current === null) return;
|
|
412
|
+
let t = e.changedTouches[0].clientX - h.current;
|
|
413
|
+
Math.abs(t) > 50 && (t < 0 ? v() : _()), h.current = null;
|
|
414
|
+
}, [v, _]);
|
|
415
|
+
return /* @__PURE__ */ M("div", {
|
|
416
|
+
ref: l,
|
|
417
|
+
className: t("relative overflow-hidden gds-radius", s && n(s), c),
|
|
418
|
+
"data-component": "carousel",
|
|
419
|
+
onMouseEnter: () => {
|
|
420
|
+
m.current = !0;
|
|
421
|
+
},
|
|
422
|
+
onMouseLeave: () => {
|
|
423
|
+
m.current = !1;
|
|
424
|
+
},
|
|
425
|
+
onTouchStart: y,
|
|
426
|
+
onTouchEnd: b,
|
|
427
|
+
children: [
|
|
428
|
+
/* @__PURE__ */ j("div", {
|
|
429
|
+
className: "flex transition-transform duration-300 ease-out",
|
|
430
|
+
style: { transform: `translateX(-${f * 100}%)` },
|
|
431
|
+
children: u.map((e, t) => /* @__PURE__ */ j("div", {
|
|
432
|
+
className: "w-full shrink-0",
|
|
433
|
+
"data-slide": t,
|
|
434
|
+
children: e
|
|
435
|
+
}, t))
|
|
436
|
+
}),
|
|
437
|
+
o && d > 1 && /* @__PURE__ */ M(A, { children: [/* @__PURE__ */ j("button", {
|
|
438
|
+
type: "button",
|
|
439
|
+
onClick: _,
|
|
440
|
+
className: t("absolute left-2 top-1/2 -translate-y-1/2 rounded-full border border-border bg-bg/80 p-1.5 text-fg transition-colors hover:bg-bg", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-offset-1 focus-visible:ring-offset-bg"),
|
|
441
|
+
"aria-label": "Previous slide",
|
|
442
|
+
children: /* @__PURE__ */ j(de, {})
|
|
443
|
+
}), /* @__PURE__ */ j("button", {
|
|
444
|
+
type: "button",
|
|
445
|
+
onClick: v,
|
|
446
|
+
className: t("absolute right-2 top-1/2 -translate-y-1/2 rounded-full border border-border bg-bg/80 p-1.5 text-fg transition-colors hover:bg-bg", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-offset-1 focus-visible:ring-offset-bg"),
|
|
447
|
+
"aria-label": "Next slide",
|
|
448
|
+
children: /* @__PURE__ */ j(fe, {})
|
|
449
|
+
})] }),
|
|
450
|
+
a && d > 1 && /* @__PURE__ */ j("div", {
|
|
451
|
+
className: "absolute bottom-2 left-1/2 flex -translate-x-1/2 gap-1.5",
|
|
452
|
+
role: "tablist",
|
|
453
|
+
children: u.map((e, n) => /* @__PURE__ */ j("button", {
|
|
454
|
+
type: "button",
|
|
455
|
+
onClick: () => g(n),
|
|
456
|
+
role: "tab",
|
|
457
|
+
"aria-selected": n === f,
|
|
458
|
+
"aria-label": `Slide ${n + 1}`,
|
|
459
|
+
className: t("h-2 w-2 rounded-full transition-all", n === f ? "bg-accent scale-125" : "bg-fg-muted/30 hover:bg-fg-muted/50", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-offset-1 focus-visible:ring-offset-bg")
|
|
460
|
+
}, n))
|
|
461
|
+
})
|
|
462
|
+
]
|
|
463
|
+
});
|
|
464
|
+
}), me = {
|
|
465
|
+
added: "bg-success/15 text-success",
|
|
466
|
+
changed: "bg-accent/15 text-accent",
|
|
467
|
+
fixed: "bg-warning/15 text-warning",
|
|
468
|
+
removed: "bg-danger/15 text-danger"
|
|
469
|
+
}, z = C(function({ entries: e, className: n, ...r }, i) {
|
|
470
|
+
return /* @__PURE__ */ j("div", {
|
|
471
|
+
ref: i,
|
|
472
|
+
className: t("flex flex-col gap-6", n),
|
|
473
|
+
"data-component": "changelog",
|
|
474
|
+
...r,
|
|
475
|
+
children: e.map((e) => /* @__PURE__ */ M("div", {
|
|
476
|
+
className: "flex flex-col gap-2",
|
|
477
|
+
children: [/* @__PURE__ */ M("div", {
|
|
478
|
+
className: "flex items-baseline gap-2",
|
|
479
|
+
children: [/* @__PURE__ */ j("span", {
|
|
480
|
+
className: "font-semibold text-fg gds-heading",
|
|
481
|
+
children: e.version
|
|
482
|
+
}), /* @__PURE__ */ j("span", {
|
|
483
|
+
className: "text-xs text-fg-muted",
|
|
484
|
+
children: e.date
|
|
485
|
+
})]
|
|
486
|
+
}), /* @__PURE__ */ j("ul", {
|
|
487
|
+
className: "flex flex-col gap-1",
|
|
488
|
+
children: e.changes.map((e, n) => /* @__PURE__ */ M("li", {
|
|
489
|
+
className: "flex items-start gap-2 gds-text text-fg",
|
|
490
|
+
children: [/* @__PURE__ */ j("span", {
|
|
491
|
+
className: t("mt-0.5 shrink-0 rounded-full px-1.5 py-px text-[9px] font-bold uppercase leading-tight", me[e.type]),
|
|
492
|
+
children: e.type
|
|
493
|
+
}), /* @__PURE__ */ j("span", { children: e.text })]
|
|
494
|
+
}, n))
|
|
495
|
+
})]
|
|
496
|
+
}, e.version))
|
|
497
|
+
});
|
|
498
|
+
});
|
|
499
|
+
//#endregion
|
|
500
|
+
//#region src/l5-organisms/command-palette-list.tsx
|
|
501
|
+
function he({ groups: e, activeIndex: n, filteredCount: r, onSelect: i }) {
|
|
502
|
+
let a = -1;
|
|
503
|
+
return r === 0 ? /* @__PURE__ */ j("div", {
|
|
504
|
+
className: "py-8 text-center text-sm text-fg-muted/40",
|
|
505
|
+
children: "No results found"
|
|
506
|
+
}) : /* @__PURE__ */ j(A, { children: Array.from(e.entries()).map(([e, r]) => /* @__PURE__ */ M("div", { children: [e !== "" && /* @__PURE__ */ j("div", {
|
|
507
|
+
className: "px-3 pb-1 pt-3 text-[10px] font-semibold uppercase tracking-[0.1em] text-fg-muted/30",
|
|
508
|
+
children: e
|
|
509
|
+
}), r.map((e) => {
|
|
510
|
+
a++;
|
|
511
|
+
let r = a === n;
|
|
512
|
+
return /* @__PURE__ */ M("button", {
|
|
513
|
+
className: t("flex w-full items-center gap-3 rounded-lg px-3 py-2 text-left text-[13px] transition-colors select-none", r ? "bg-accent/15 text-accent" : "text-fg hover:bg-white/[0.04]"),
|
|
514
|
+
onClick: () => i(e.id),
|
|
515
|
+
"data-active": r,
|
|
516
|
+
children: [
|
|
517
|
+
e.icon !== void 0 && /* @__PURE__ */ j("span", {
|
|
518
|
+
className: "flex h-5 w-5 shrink-0 items-center justify-center text-fg-muted/50",
|
|
519
|
+
children: e.icon
|
|
520
|
+
}),
|
|
521
|
+
/* @__PURE__ */ j("span", {
|
|
522
|
+
className: "flex-1 truncate",
|
|
523
|
+
children: e.label
|
|
524
|
+
}),
|
|
525
|
+
e.group !== void 0 && /* @__PURE__ */ j("span", {
|
|
526
|
+
className: "shrink-0 text-[11px] text-fg-muted/25",
|
|
527
|
+
children: e.group
|
|
528
|
+
}),
|
|
529
|
+
e.shortcut !== void 0 && /* @__PURE__ */ j("kbd", {
|
|
530
|
+
className: "shrink-0 rounded border border-white/[0.06] bg-white/[0.03] px-1.5 py-px text-[10px] text-fg-muted/30",
|
|
531
|
+
children: e.shortcut
|
|
532
|
+
})
|
|
533
|
+
]
|
|
534
|
+
}, e.id);
|
|
535
|
+
})] }, e)) });
|
|
536
|
+
}
|
|
537
|
+
//#endregion
|
|
538
|
+
//#region src/l5-organisms/command-palette.tsx
|
|
539
|
+
function ge({ open: e, onClose: n, items: r, onSelect: i, placeholder: a = "Search components, patterns, tokens...", className: o }) {
|
|
540
|
+
let [s, l] = O(""), [u, d] = O(0), m = D(null), h = D(null);
|
|
541
|
+
p(e), f(e, n), T(() => {
|
|
542
|
+
e && (l(""), d(0), requestAnimationFrame(() => m.current?.focus()));
|
|
543
|
+
}, [e]);
|
|
544
|
+
let g = E(() => {
|
|
545
|
+
if (s === "") return r;
|
|
546
|
+
let e = s.toLowerCase();
|
|
547
|
+
return r.filter((t) => t.label.toLowerCase().includes(e));
|
|
548
|
+
}, [r, s]), _ = E(() => {
|
|
549
|
+
let e = /* @__PURE__ */ new Map();
|
|
550
|
+
for (let t of g) {
|
|
551
|
+
let n = t.group ?? "", r = e.get(n);
|
|
552
|
+
r === void 0 ? e.set(n, [t]) : r.push(t);
|
|
553
|
+
}
|
|
554
|
+
return e;
|
|
555
|
+
}, [g]);
|
|
556
|
+
T(() => {
|
|
557
|
+
(h.current?.querySelector("[data-active=\"true\"]"))?.scrollIntoView({ block: "nearest" });
|
|
558
|
+
}, [u]);
|
|
559
|
+
let v = w((e) => {
|
|
560
|
+
i(e), n();
|
|
561
|
+
}, [i, n]), y = w((e) => {
|
|
562
|
+
e.key === "ArrowDown" ? (e.preventDefault(), d((e) => (e + 1) % Math.max(g.length, 1))) : e.key === "ArrowUp" ? (e.preventDefault(), d((e) => (e - 1 + g.length) % Math.max(g.length, 1))) : e.key === "Enter" && g[u] !== void 0 && (e.preventDefault(), v(g[u].id));
|
|
563
|
+
}, [
|
|
564
|
+
g,
|
|
565
|
+
u,
|
|
566
|
+
v
|
|
567
|
+
]);
|
|
568
|
+
return e ? c(/* @__PURE__ */ j("div", {
|
|
569
|
+
className: "fixed inset-0 z-50 flex items-start justify-center bg-black/60 pt-[15vh]",
|
|
570
|
+
"data-component": "command-palette",
|
|
571
|
+
"data-state": "open",
|
|
572
|
+
onClick: (e) => {
|
|
573
|
+
e.target === e.currentTarget && n();
|
|
574
|
+
},
|
|
575
|
+
onKeyDown: y,
|
|
576
|
+
children: /* @__PURE__ */ M("div", {
|
|
577
|
+
className: t("w-full max-w-xl animate-scale-in rounded-xl border border-white/[0.06] bg-bg-secondary shadow-2xl", o),
|
|
578
|
+
children: [
|
|
579
|
+
/* @__PURE__ */ M("div", {
|
|
580
|
+
className: "flex items-center gap-3 border-b border-white/[0.06] px-4",
|
|
581
|
+
children: [
|
|
582
|
+
/* @__PURE__ */ M("svg", {
|
|
583
|
+
className: "h-4 w-4 shrink-0 text-fg-muted/40",
|
|
584
|
+
fill: "none",
|
|
585
|
+
stroke: "currentColor",
|
|
586
|
+
strokeWidth: 2,
|
|
587
|
+
viewBox: "0 0 24 24",
|
|
588
|
+
children: [/* @__PURE__ */ j("circle", {
|
|
589
|
+
cx: "11",
|
|
590
|
+
cy: "11",
|
|
591
|
+
r: "8"
|
|
592
|
+
}), /* @__PURE__ */ j("path", {
|
|
593
|
+
d: "m21 21-4.35-4.35",
|
|
594
|
+
strokeLinecap: "round"
|
|
595
|
+
})]
|
|
596
|
+
}),
|
|
597
|
+
/* @__PURE__ */ j("input", {
|
|
598
|
+
ref: m,
|
|
599
|
+
type: "text",
|
|
600
|
+
value: s,
|
|
601
|
+
onChange: (e) => {
|
|
602
|
+
l(e.target.value), d(0);
|
|
603
|
+
},
|
|
604
|
+
placeholder: a,
|
|
605
|
+
className: "flex-1 bg-transparent py-3.5 text-sm text-fg placeholder:text-fg-muted/30 outline-none"
|
|
606
|
+
}),
|
|
607
|
+
/* @__PURE__ */ j("kbd", {
|
|
608
|
+
className: "shrink-0 rounded border border-white/[0.08] bg-white/[0.04] px-1.5 py-0.5 text-[10px] font-medium text-fg-muted/40",
|
|
609
|
+
children: "ESC"
|
|
610
|
+
})
|
|
611
|
+
]
|
|
612
|
+
}),
|
|
613
|
+
/* @__PURE__ */ j("div", {
|
|
614
|
+
ref: h,
|
|
615
|
+
className: "max-h-80 overflow-y-auto p-1.5",
|
|
616
|
+
children: /* @__PURE__ */ j(he, {
|
|
617
|
+
groups: _,
|
|
618
|
+
activeIndex: u,
|
|
619
|
+
filteredCount: g.length,
|
|
620
|
+
onSelect: v
|
|
621
|
+
})
|
|
622
|
+
}),
|
|
623
|
+
/* @__PURE__ */ M("div", {
|
|
624
|
+
className: "flex items-center justify-between border-t border-white/[0.06] px-4 py-2 text-[10px] text-fg-muted/25",
|
|
625
|
+
children: [/* @__PURE__ */ M("div", {
|
|
626
|
+
className: "flex items-center gap-3",
|
|
627
|
+
children: [
|
|
628
|
+
/* @__PURE__ */ j("span", { children: "↑↓ navigate" }),
|
|
629
|
+
/* @__PURE__ */ j("span", { children: "↵ select" }),
|
|
630
|
+
/* @__PURE__ */ j("span", { children: "esc close" })
|
|
631
|
+
]
|
|
632
|
+
}), /* @__PURE__ */ M("span", { children: [r.length, " commands"] })]
|
|
633
|
+
})
|
|
634
|
+
]
|
|
635
|
+
})
|
|
636
|
+
})) : null;
|
|
637
|
+
}
|
|
638
|
+
//#endregion
|
|
639
|
+
//#region src/l5-organisms/comment-thread.tsx
|
|
640
|
+
function B({ comment: e, depth: n = 0 }) {
|
|
641
|
+
return /* @__PURE__ */ M("div", {
|
|
642
|
+
className: t(n > 0 && "ml-8 border-l border-border pl-4"),
|
|
643
|
+
children: [/* @__PURE__ */ M("div", {
|
|
644
|
+
className: "flex items-start gds-gap",
|
|
645
|
+
children: [/* @__PURE__ */ j("div", {
|
|
646
|
+
className: "flex h-7 w-7 shrink-0 items-center justify-center rounded-full bg-accent/10 text-xs font-medium text-accent",
|
|
647
|
+
children: e.avatar ?? e.author.charAt(0).toUpperCase()
|
|
648
|
+
}), /* @__PURE__ */ M("div", {
|
|
649
|
+
className: "min-w-0 flex-1",
|
|
650
|
+
children: [/* @__PURE__ */ M("div", {
|
|
651
|
+
className: "flex items-baseline gds-gap-sm",
|
|
652
|
+
children: [/* @__PURE__ */ j("span", {
|
|
653
|
+
className: "text-sm font-medium text-fg",
|
|
654
|
+
children: e.author
|
|
655
|
+
}), /* @__PURE__ */ j("span", {
|
|
656
|
+
className: "gds-text-label text-fg-muted",
|
|
657
|
+
children: e.timestamp
|
|
658
|
+
})]
|
|
659
|
+
}), /* @__PURE__ */ j("p", {
|
|
660
|
+
className: "mt-1 text-sm text-fg-muted",
|
|
661
|
+
children: e.content
|
|
662
|
+
})]
|
|
663
|
+
})]
|
|
664
|
+
}), e.replies !== void 0 && e.replies.length > 0 && /* @__PURE__ */ j("div", {
|
|
665
|
+
className: "mt-3 flex flex-col gds-gap",
|
|
666
|
+
children: e.replies.map((e) => /* @__PURE__ */ j(B, {
|
|
667
|
+
comment: e,
|
|
668
|
+
depth: n + 1
|
|
669
|
+
}, e.id))
|
|
670
|
+
})]
|
|
671
|
+
});
|
|
672
|
+
}
|
|
673
|
+
var _e = C(function({ className: e, comments: n, ...r }, i) {
|
|
674
|
+
return /* @__PURE__ */ j("div", {
|
|
675
|
+
className: t("flex flex-col gds-gap", e),
|
|
676
|
+
"data-component": "comment-thread",
|
|
677
|
+
ref: i,
|
|
678
|
+
role: "list",
|
|
679
|
+
...r,
|
|
680
|
+
children: n.map((e) => /* @__PURE__ */ j("div", {
|
|
681
|
+
role: "listitem",
|
|
682
|
+
children: /* @__PURE__ */ j(B, { comment: e })
|
|
683
|
+
}, e.id))
|
|
684
|
+
});
|
|
685
|
+
});
|
|
686
|
+
//#endregion
|
|
687
|
+
//#region src/l5-organisms/confetti-physics.ts
|
|
688
|
+
function ve(e, t) {
|
|
689
|
+
return {
|
|
690
|
+
x: Math.random() * e,
|
|
691
|
+
y: -10,
|
|
692
|
+
vx: (Math.random() - .5) * 8,
|
|
693
|
+
vy: Math.random() * -6 - 4,
|
|
694
|
+
size: Math.random() * 6 + 4,
|
|
695
|
+
color: t[Math.floor(Math.random() * t.length)],
|
|
696
|
+
rotation: Math.random() * 360,
|
|
697
|
+
rotationSpeed: (Math.random() - .5) * 10,
|
|
698
|
+
gravity: .15,
|
|
699
|
+
drag: .98
|
|
700
|
+
};
|
|
701
|
+
}
|
|
702
|
+
function ye(e) {
|
|
703
|
+
return {
|
|
704
|
+
...e,
|
|
705
|
+
x: e.x + e.vx,
|
|
706
|
+
y: e.y + e.vy,
|
|
707
|
+
vx: e.vx * e.drag,
|
|
708
|
+
vy: (e.vy + e.gravity) * e.drag,
|
|
709
|
+
rotation: e.rotation + e.rotationSpeed
|
|
710
|
+
};
|
|
711
|
+
}
|
|
712
|
+
function be(e, t) {
|
|
713
|
+
e.save(), e.translate(t.x, t.y), e.rotate(t.rotation * Math.PI / 180), e.fillStyle = t.color, e.fillRect(-t.size / 2, -t.size / 2, t.size, t.size * .6), e.restore();
|
|
714
|
+
}
|
|
715
|
+
//#endregion
|
|
716
|
+
//#region src/l5-organisms/confetti.tsx
|
|
717
|
+
var xe = [
|
|
718
|
+
"#6366f1",
|
|
719
|
+
"#ec4899",
|
|
720
|
+
"#14b8a6",
|
|
721
|
+
"#f59e0b",
|
|
722
|
+
"#8b5cf6",
|
|
723
|
+
"#ef4444",
|
|
724
|
+
"#22c55e",
|
|
725
|
+
"#3b82f6"
|
|
726
|
+
];
|
|
727
|
+
function Se({ active: e, className: n, colors: r = xe, duration: i = 3e3, particleCount: a = 100 }) {
|
|
728
|
+
let o = D(null), s = D([]), l = D(0), u = D(0);
|
|
729
|
+
return T(() => {
|
|
730
|
+
if (!e) {
|
|
731
|
+
s.current = [];
|
|
732
|
+
return;
|
|
733
|
+
}
|
|
734
|
+
let t = o.current;
|
|
735
|
+
if (t === null) return;
|
|
736
|
+
let n = t.getContext("2d");
|
|
737
|
+
if (n === null) return;
|
|
738
|
+
t.width = window.innerWidth, t.height = window.innerHeight, s.current = [], u.current = performance.now();
|
|
739
|
+
let c = 0;
|
|
740
|
+
function d(e) {
|
|
741
|
+
if (t === null || n === null) return;
|
|
742
|
+
let o = e - u.current;
|
|
743
|
+
if (n.clearRect(0, 0, t.width, t.height), o < i) {
|
|
744
|
+
let e = Math.min(a, Math.floor(o / i * a));
|
|
745
|
+
for (; c < e;) s.current = [...s.current, ve(t.width, r)], c += 1;
|
|
746
|
+
}
|
|
747
|
+
s.current = s.current.map(ye).filter((e) => e.y < t.height + 20);
|
|
748
|
+
for (let e of s.current) be(n, e);
|
|
749
|
+
(s.current.length > 0 || o < i) && (l.current = requestAnimationFrame(d));
|
|
750
|
+
}
|
|
751
|
+
return l.current = requestAnimationFrame(d), () => {
|
|
752
|
+
cancelAnimationFrame(l.current);
|
|
753
|
+
};
|
|
754
|
+
}, [
|
|
755
|
+
e,
|
|
756
|
+
r,
|
|
757
|
+
i,
|
|
758
|
+
a
|
|
759
|
+
]), e ? c(/* @__PURE__ */ j("canvas", {
|
|
760
|
+
ref: o,
|
|
761
|
+
className: t("fixed inset-0 pointer-events-none z-[9999]", n),
|
|
762
|
+
"data-component": "confetti"
|
|
763
|
+
})) : null;
|
|
764
|
+
}
|
|
765
|
+
//#endregion
|
|
766
|
+
//#region src/l5-organisms/contact-card.tsx
|
|
767
|
+
var Ce = C(function({ actions: e, avatar: n, className: r, email: i, name: a, phone: o, role: s, ...c }, l) {
|
|
768
|
+
let u = a.split(" ").map((e) => e[0]).join("").slice(0, 2).toUpperCase();
|
|
769
|
+
return /* @__PURE__ */ M("div", {
|
|
770
|
+
className: t("gds-ctx gds-radius-card border border-border bg-surface gds-pad text-center", r),
|
|
771
|
+
"data-component": "contact-card",
|
|
772
|
+
ref: l,
|
|
773
|
+
...c,
|
|
774
|
+
children: [
|
|
775
|
+
n === void 0 ? /* @__PURE__ */ j("div", {
|
|
776
|
+
className: "mx-auto flex h-14 w-14 items-center justify-center rounded-full bg-accent/10 text-sm font-semibold text-accent",
|
|
777
|
+
children: u
|
|
778
|
+
}) : /* @__PURE__ */ j("img", {
|
|
779
|
+
src: n,
|
|
780
|
+
alt: a,
|
|
781
|
+
className: "mx-auto h-14 w-14 rounded-full object-cover"
|
|
782
|
+
}),
|
|
783
|
+
/* @__PURE__ */ j("div", {
|
|
784
|
+
className: "mt-3 font-semibold text-fg",
|
|
785
|
+
children: a
|
|
786
|
+
}),
|
|
787
|
+
s !== void 0 && /* @__PURE__ */ j("div", {
|
|
788
|
+
className: "mt-0.5 text-xs text-fg-muted",
|
|
789
|
+
children: s
|
|
790
|
+
}),
|
|
791
|
+
i !== void 0 && /* @__PURE__ */ j("div", {
|
|
792
|
+
className: "mt-2 text-xs text-fg-muted",
|
|
793
|
+
children: i
|
|
794
|
+
}),
|
|
795
|
+
o !== void 0 && /* @__PURE__ */ j("div", {
|
|
796
|
+
className: "mt-0.5 text-xs text-fg-muted",
|
|
797
|
+
children: o
|
|
798
|
+
}),
|
|
799
|
+
e !== void 0 && /* @__PURE__ */ j("div", {
|
|
800
|
+
className: "mt-3 flex justify-center gap-2",
|
|
801
|
+
children: e
|
|
802
|
+
})
|
|
803
|
+
]
|
|
804
|
+
});
|
|
805
|
+
}), we = {
|
|
806
|
+
running: "bg-success",
|
|
807
|
+
stopped: "bg-danger",
|
|
808
|
+
paused: "bg-warning"
|
|
809
|
+
}, Te = C(function({ className: e, containers: n, ...r }, i) {
|
|
810
|
+
return /* @__PURE__ */ j("div", {
|
|
811
|
+
className: t("gds-radius-popover overflow-hidden border border-border", e),
|
|
812
|
+
"data-component": "container-list",
|
|
813
|
+
ref: i,
|
|
814
|
+
...r,
|
|
815
|
+
children: /* @__PURE__ */ M("table", {
|
|
816
|
+
className: "w-full",
|
|
817
|
+
children: [/* @__PURE__ */ j("thead", { children: /* @__PURE__ */ M("tr", {
|
|
818
|
+
className: "bg-bg-tertiary/50 text-left gds-text-body text-fg-muted",
|
|
819
|
+
children: [
|
|
820
|
+
/* @__PURE__ */ j("th", {
|
|
821
|
+
className: "px-3 py-1.5 font-medium",
|
|
822
|
+
children: "Name"
|
|
823
|
+
}),
|
|
824
|
+
/* @__PURE__ */ j("th", {
|
|
825
|
+
className: "px-3 py-1.5 font-medium",
|
|
826
|
+
children: "Image"
|
|
827
|
+
}),
|
|
828
|
+
/* @__PURE__ */ j("th", {
|
|
829
|
+
className: "px-3 py-1.5 font-medium",
|
|
830
|
+
children: "Status"
|
|
831
|
+
}),
|
|
832
|
+
/* @__PURE__ */ j("th", {
|
|
833
|
+
className: "px-3 py-1.5 font-medium",
|
|
834
|
+
children: "Ports"
|
|
835
|
+
})
|
|
836
|
+
]
|
|
837
|
+
}) }), /* @__PURE__ */ j("tbody", { children: n.map((e) => /* @__PURE__ */ M("tr", {
|
|
838
|
+
className: "border-t border-border gds-text-body hover:bg-bg-tertiary/30 transition-colors",
|
|
839
|
+
children: [
|
|
840
|
+
/* @__PURE__ */ j("td", {
|
|
841
|
+
className: "px-3 py-1.5 font-medium text-fg",
|
|
842
|
+
children: e.name
|
|
843
|
+
}),
|
|
844
|
+
/* @__PURE__ */ j("td", {
|
|
845
|
+
className: "px-3 py-1.5 font-mono text-fg-muted text-xs",
|
|
846
|
+
children: e.image
|
|
847
|
+
}),
|
|
848
|
+
/* @__PURE__ */ j("td", {
|
|
849
|
+
className: "px-3 py-1.5",
|
|
850
|
+
children: /* @__PURE__ */ M("span", {
|
|
851
|
+
className: "inline-flex items-center gap-1.5",
|
|
852
|
+
children: [/* @__PURE__ */ j("span", { className: t("h-2 w-2 rounded-full", we[e.status]) }), /* @__PURE__ */ j("span", {
|
|
853
|
+
className: "text-fg-muted",
|
|
854
|
+
children: e.status
|
|
855
|
+
})]
|
|
856
|
+
})
|
|
857
|
+
}),
|
|
858
|
+
/* @__PURE__ */ j("td", {
|
|
859
|
+
className: "px-3 py-1.5 font-mono text-fg-muted text-xs",
|
|
860
|
+
children: e.ports ?? "—"
|
|
861
|
+
})
|
|
862
|
+
]
|
|
863
|
+
}, e.name)) })]
|
|
864
|
+
})
|
|
865
|
+
});
|
|
866
|
+
}), Ee = "We use cookies to improve your experience. By continuing to use this site, you agree to our use of cookies.", De = C(function({ onAccept: e, onReject: n, message: i, className: a }, o) {
|
|
867
|
+
return /* @__PURE__ */ M("div", {
|
|
868
|
+
ref: o,
|
|
869
|
+
className: t("fixed inset-x-0 bottom-0 z-50 flex items-center justify-between gap-4 border-t border-border bg-surface/80 px-6 py-4 backdrop-blur-lg", a),
|
|
870
|
+
"data-component": "cookie-banner",
|
|
871
|
+
role: "banner",
|
|
872
|
+
children: [/* @__PURE__ */ j("p", {
|
|
873
|
+
className: "text-sm text-fg-muted flex-1",
|
|
874
|
+
children: i ?? Ee
|
|
875
|
+
}), /* @__PURE__ */ M("div", {
|
|
876
|
+
className: "flex shrink-0 gap-2",
|
|
877
|
+
children: [n !== void 0 && /* @__PURE__ */ j(r, {
|
|
878
|
+
variant: "ghost",
|
|
879
|
+
size: "sm",
|
|
880
|
+
onClick: n,
|
|
881
|
+
children: "Reject"
|
|
882
|
+
}), /* @__PURE__ */ j(r, {
|
|
883
|
+
variant: "primary",
|
|
884
|
+
size: "sm",
|
|
885
|
+
onClick: e,
|
|
886
|
+
children: "Accept"
|
|
887
|
+
})]
|
|
888
|
+
})]
|
|
889
|
+
});
|
|
890
|
+
}), Oe = C(function(e, t) {
|
|
891
|
+
return c(/* @__PURE__ */ j(De, {
|
|
892
|
+
...e,
|
|
893
|
+
ref: t
|
|
894
|
+
}));
|
|
895
|
+
}), ke = [
|
|
896
|
+
"Sunday",
|
|
897
|
+
"Monday",
|
|
898
|
+
"Tuesday",
|
|
899
|
+
"Wednesday",
|
|
900
|
+
"Thursday",
|
|
901
|
+
"Friday",
|
|
902
|
+
"Saturday"
|
|
903
|
+
];
|
|
904
|
+
function Ae(e) {
|
|
905
|
+
let t = e.trim().split(/\s+/);
|
|
906
|
+
if (t.length !== 5) return `Cron: ${e}`;
|
|
907
|
+
let [n, r, i, , a] = t, o = r !== "*" && n !== "*" ? `${r.padStart(2, "0")}:${n.padStart(2, "0")}` : null;
|
|
908
|
+
if (a !== "*" && a !== "?") {
|
|
909
|
+
let e = parseInt(a, 10), t = isNaN(e) ? a : ke[e % 7] ?? a;
|
|
910
|
+
return o === null ? `Every ${t}` : `Every ${t} at ${o}`;
|
|
911
|
+
}
|
|
912
|
+
return i !== "*" && i !== "?" ? o === null ? `Day ${i} of every month` : `Day ${i} of every month at ${o}` : r === "*" && n === "*" ? "Every minute" : r === "*" ? `Every hour at minute ${n}` : n === "0" && r === "0" ? "Every day at midnight" : o === null ? `Cron: ${e}` : `Every day at ${o}`;
|
|
913
|
+
}
|
|
914
|
+
var je = C(function({ expression: e, className: n, ...r }, i) {
|
|
915
|
+
let a = E(() => Ae(e), [e]);
|
|
916
|
+
return /* @__PURE__ */ M("div", {
|
|
917
|
+
ref: i,
|
|
918
|
+
className: t("flex items-center gap-3", n),
|
|
919
|
+
"data-component": "cron-schedule",
|
|
920
|
+
...r,
|
|
921
|
+
children: [/* @__PURE__ */ j("code", {
|
|
922
|
+
className: "rounded bg-bg-secondary px-2 py-1 text-xs text-fg-muted font-mono",
|
|
923
|
+
children: e
|
|
924
|
+
}), /* @__PURE__ */ j("span", {
|
|
925
|
+
className: "gds-text-body text-fg",
|
|
926
|
+
children: a
|
|
927
|
+
})]
|
|
928
|
+
});
|
|
929
|
+
}), V = {
|
|
930
|
+
center: "text-center",
|
|
931
|
+
left: "text-left",
|
|
932
|
+
right: "text-right"
|
|
933
|
+
}, Me = C(function({ columns: e, rows: r, compact: i = !1, striped: a = !1, glass: o, className: s }, c) {
|
|
934
|
+
let l = i ? "px-3 py-1" : "px-3 py-2";
|
|
935
|
+
return /* @__PURE__ */ j("div", {
|
|
936
|
+
className: t("w-full overflow-auto", o === !0 && n(o), s),
|
|
937
|
+
"data-component": "data-grid",
|
|
938
|
+
children: /* @__PURE__ */ M("table", {
|
|
939
|
+
className: "w-full text-sm",
|
|
940
|
+
ref: c,
|
|
941
|
+
children: [/* @__PURE__ */ j("thead", { children: /* @__PURE__ */ j("tr", {
|
|
942
|
+
className: "border-b border-border/40",
|
|
943
|
+
children: e.map((e) => /* @__PURE__ */ j("th", {
|
|
944
|
+
className: t("font-medium text-fg-muted select-none", l, V[e.align ?? "left"]),
|
|
945
|
+
style: e.width === void 0 ? void 0 : { width: e.width },
|
|
946
|
+
children: e.label
|
|
947
|
+
}, e.key))
|
|
948
|
+
}) }), /* @__PURE__ */ M("tbody", { children: [r.length === 0 && /* @__PURE__ */ j("tr", { children: /* @__PURE__ */ j("td", {
|
|
949
|
+
className: "px-3 py-8 text-center text-fg-muted",
|
|
950
|
+
colSpan: e.length,
|
|
951
|
+
children: "No data"
|
|
952
|
+
}) }), r.map((n, r) => /* @__PURE__ */ j("tr", {
|
|
953
|
+
className: t("border-b border-border/20", a && r % 2 == 1 && "bg-bg-secondary/30"),
|
|
954
|
+
children: e.map((e) => /* @__PURE__ */ j("td", {
|
|
955
|
+
className: t("text-fg", l, V[e.align ?? "left"]),
|
|
956
|
+
children: n[e.key]
|
|
957
|
+
}, e.key))
|
|
958
|
+
}, r))] })]
|
|
959
|
+
})
|
|
960
|
+
});
|
|
961
|
+
});
|
|
962
|
+
//#endregion
|
|
963
|
+
//#region src/l5-organisms/data-list.tsx
|
|
964
|
+
function Ne({ items: e, layout: r = "vertical", striped: i = !1, glass: a, className: o }) {
|
|
965
|
+
let s = r === "horizontal";
|
|
966
|
+
return /* @__PURE__ */ j("div", {
|
|
967
|
+
className: t("gds-radius-popover border border-border overflow-hidden", a !== void 0 && a !== !1 ? t("border-white/10 bg-bg/60", n(a)) : "", o),
|
|
968
|
+
"data-component": "data-list",
|
|
969
|
+
"data-variant": r,
|
|
970
|
+
children: e.map((n, r) => /* @__PURE__ */ M("div", {
|
|
971
|
+
className: t("gds-pad-x gds-pad-y-sm", r < e.length - 1 ? "border-b border-border" : "", s ? "flex items-center justify-between gap-4" : "", i && r % 2 == 1 ? "bg-bg-tertiary/20" : ""),
|
|
972
|
+
children: [/* @__PURE__ */ j("div", {
|
|
973
|
+
className: "gds-text-body font-medium text-fg-muted",
|
|
974
|
+
children: n.label
|
|
975
|
+
}), /* @__PURE__ */ j("div", {
|
|
976
|
+
className: t("text-fg gds-text-body", s ? "" : "mt-1"),
|
|
977
|
+
children: n.value
|
|
978
|
+
})]
|
|
979
|
+
}, n.label))
|
|
980
|
+
});
|
|
981
|
+
}
|
|
982
|
+
//#endregion
|
|
983
|
+
//#region src/l5-organisms/data-table.tsx
|
|
984
|
+
function Pe({ dir: e }) {
|
|
985
|
+
return e === void 0 ? /* @__PURE__ */ M("svg", {
|
|
986
|
+
className: "ml-1 inline h-3 w-3 text-fg-muted/40",
|
|
987
|
+
viewBox: "0 0 12 12",
|
|
988
|
+
fill: "currentColor",
|
|
989
|
+
children: [/* @__PURE__ */ j("path", { d: "M6 2L9 5H3L6 2Z" }), /* @__PURE__ */ j("path", { d: "M6 10L3 7H9L6 10Z" })]
|
|
990
|
+
}) : /* @__PURE__ */ j("svg", {
|
|
991
|
+
className: "ml-1 inline h-3 w-3 text-fg-muted",
|
|
992
|
+
viewBox: "0 0 12 12",
|
|
993
|
+
fill: "currentColor",
|
|
994
|
+
children: e === "asc" ? /* @__PURE__ */ j("path", { d: "M6 2L9 5H3L6 2Z" }) : /* @__PURE__ */ j("path", { d: "M6 10L3 7H9L6 10Z" })
|
|
995
|
+
});
|
|
996
|
+
}
|
|
997
|
+
function Fe({ columns: e }) {
|
|
998
|
+
return /* @__PURE__ */ j(A, { children: Array.from({ length: 5 }, (t, n) => /* @__PURE__ */ j("tr", {
|
|
999
|
+
className: "border-b border-border",
|
|
1000
|
+
children: e.map((e) => /* @__PURE__ */ j("td", {
|
|
1001
|
+
className: "gds-pad-x gds-pad-y",
|
|
1002
|
+
children: /* @__PURE__ */ j("div", { className: "h-4 animate-pulse rounded bg-bg-tertiary" })
|
|
1003
|
+
}, e.key))
|
|
1004
|
+
}, n)) });
|
|
1005
|
+
}
|
|
1006
|
+
function Ie({ colSpan: e, text: t }) {
|
|
1007
|
+
return /* @__PURE__ */ j("tr", { children: /* @__PURE__ */ j("td", {
|
|
1008
|
+
colSpan: e,
|
|
1009
|
+
className: "gds-pad-x py-12 text-center text-sm text-fg-muted",
|
|
1010
|
+
children: t
|
|
1011
|
+
}) });
|
|
1012
|
+
}
|
|
1013
|
+
function Le({ columns: n, data: r, className: i, onRowClick: a, sortKey: o, sortDir: s, onSort: c, emptyText: l = "No data", loading: u, glass: d }, f) {
|
|
1014
|
+
let p = (e) => {
|
|
1015
|
+
e.sortable !== !0 || c === void 0 || c(e.key);
|
|
1016
|
+
};
|
|
1017
|
+
return /* @__PURE__ */ j("div", {
|
|
1018
|
+
ref: f,
|
|
1019
|
+
className: t("overflow-auto gds-radius-popover border", d === !0 ? t(e(d), "bg-bg/60") : "border-border bg-surface", i),
|
|
1020
|
+
"data-component": "data-table",
|
|
1021
|
+
"data-state": u === !0 ? "loading" : void 0,
|
|
1022
|
+
children: /* @__PURE__ */ M("table", {
|
|
1023
|
+
className: "w-full border-collapse text-sm",
|
|
1024
|
+
children: [/* @__PURE__ */ j("thead", { children: /* @__PURE__ */ j("tr", {
|
|
1025
|
+
className: "border-b border-border bg-bg-secondary/50",
|
|
1026
|
+
children: n.map((e) => /* @__PURE__ */ M("th", {
|
|
1027
|
+
className: t("gds-pad-x gds-pad-y text-left gds-text-body font-medium uppercase tracking-wider text-fg-muted select-none", e.sortable === !0 && "cursor-pointer hover:text-fg"),
|
|
1028
|
+
style: e.width === void 0 ? void 0 : { width: e.width },
|
|
1029
|
+
onClick: () => p(e),
|
|
1030
|
+
children: [e.header, e.sortable === !0 && /* @__PURE__ */ j(Pe, { dir: o === e.key ? s : void 0 })]
|
|
1031
|
+
}, e.key))
|
|
1032
|
+
}) }), /* @__PURE__ */ M("tbody", { children: [
|
|
1033
|
+
u === !0 && /* @__PURE__ */ j(Fe, { columns: n }),
|
|
1034
|
+
u !== !0 && r.length === 0 && /* @__PURE__ */ j(Ie, {
|
|
1035
|
+
colSpan: n.length,
|
|
1036
|
+
text: l
|
|
1037
|
+
}),
|
|
1038
|
+
u !== !0 && r.map((e, r) => /* @__PURE__ */ j("tr", {
|
|
1039
|
+
className: t("border-b border-border transition-colors", r % 2 == 1 && "bg-bg-secondary/30", a !== void 0 && "cursor-pointer hover:bg-bg-secondary/60"),
|
|
1040
|
+
onClick: a === void 0 ? void 0 : () => a(e),
|
|
1041
|
+
children: n.map((t) => /* @__PURE__ */ j("td", {
|
|
1042
|
+
className: "gds-pad-x gds-pad-y text-fg",
|
|
1043
|
+
children: t.render === void 0 ? String(e[t.key] ?? "") : t.render(e)
|
|
1044
|
+
}, t.key))
|
|
1045
|
+
}, r))
|
|
1046
|
+
] })]
|
|
1047
|
+
})
|
|
1048
|
+
});
|
|
1049
|
+
}
|
|
1050
|
+
var Re = C(Le);
|
|
1051
|
+
//#endregion
|
|
1052
|
+
//#region src/l5-organisms/date-picker.tsx
|
|
1053
|
+
function ze(e) {
|
|
1054
|
+
return `${e.getFullYear()}-${String(e.getMonth() + 1).padStart(2, "0")}-${String(e.getDate()).padStart(2, "0")}`;
|
|
1055
|
+
}
|
|
1056
|
+
var Be = C(function({ value: e, onChange: r, placeholder: a = "Select date", min: o, max: s, glass: c, className: l }, u) {
|
|
1057
|
+
let [d, p] = O(!1), h = D(null), g = w(() => p(!1), []);
|
|
1058
|
+
m(h, d, g), f(d, g);
|
|
1059
|
+
let _ = (e) => {
|
|
1060
|
+
r !== void 0 && r(e), p(!1);
|
|
1061
|
+
};
|
|
1062
|
+
return /* @__PURE__ */ j("div", {
|
|
1063
|
+
ref: u,
|
|
1064
|
+
className: t("relative inline-block", l),
|
|
1065
|
+
"data-component": "date-picker",
|
|
1066
|
+
"data-state": d ? "open" : "closed",
|
|
1067
|
+
children: /* @__PURE__ */ M("div", {
|
|
1068
|
+
ref: h,
|
|
1069
|
+
children: [/* @__PURE__ */ M("button", {
|
|
1070
|
+
type: "button",
|
|
1071
|
+
className: t("flex gds-h-lg items-center gds-gap-sm gds-radius-button border gds-pad-x text-sm transition-colors", i, c === !0 ? t(n(c), "border-white/10 bg-bg/60") : "border-border bg-surface", e === void 0 ? "text-fg-muted" : "text-fg"),
|
|
1072
|
+
onClick: () => p((e) => !e),
|
|
1073
|
+
children: [/* @__PURE__ */ M("svg", {
|
|
1074
|
+
className: "h-4 w-4 text-fg-muted",
|
|
1075
|
+
viewBox: "0 0 16 16",
|
|
1076
|
+
fill: "none",
|
|
1077
|
+
stroke: "currentColor",
|
|
1078
|
+
strokeWidth: "1.5",
|
|
1079
|
+
children: [/* @__PURE__ */ j("rect", {
|
|
1080
|
+
x: "2",
|
|
1081
|
+
y: "3",
|
|
1082
|
+
width: "12",
|
|
1083
|
+
height: "11",
|
|
1084
|
+
rx: "1.5"
|
|
1085
|
+
}), /* @__PURE__ */ j("path", { d: "M2 6.5H14M5 1.5V4M11 1.5V4" })]
|
|
1086
|
+
}), e === void 0 ? a : ze(e)]
|
|
1087
|
+
}), d && /* @__PURE__ */ j("div", {
|
|
1088
|
+
className: "absolute left-0 top-full z-50 mt-1 animate-popup",
|
|
1089
|
+
children: /* @__PURE__ */ j(R, {
|
|
1090
|
+
value: e,
|
|
1091
|
+
onChange: _,
|
|
1092
|
+
min: o,
|
|
1093
|
+
max: s
|
|
1094
|
+
})
|
|
1095
|
+
})]
|
|
1096
|
+
})
|
|
1097
|
+
});
|
|
1098
|
+
}), Ve = {
|
|
1099
|
+
success: "bg-success/15 text-success",
|
|
1100
|
+
failure: "bg-danger/15 text-danger",
|
|
1101
|
+
pending: "bg-warning/15 text-warning"
|
|
1102
|
+
}, He = C(function({ entries: e, className: n }, r) {
|
|
1103
|
+
return /* @__PURE__ */ j("div", {
|
|
1104
|
+
ref: r,
|
|
1105
|
+
className: t("gds-radius-popover overflow-hidden border border-border", n),
|
|
1106
|
+
"data-component": "deploy-log",
|
|
1107
|
+
children: /* @__PURE__ */ M("table", {
|
|
1108
|
+
className: "w-full",
|
|
1109
|
+
children: [/* @__PURE__ */ j("thead", { children: /* @__PURE__ */ M("tr", {
|
|
1110
|
+
className: "bg-bg-tertiary/50 text-left gds-text-body text-fg-muted",
|
|
1111
|
+
children: [
|
|
1112
|
+
/* @__PURE__ */ j("th", {
|
|
1113
|
+
className: "px-3 py-1.5 font-medium",
|
|
1114
|
+
children: "Project"
|
|
1115
|
+
}),
|
|
1116
|
+
/* @__PURE__ */ j("th", {
|
|
1117
|
+
className: "px-3 py-1.5 font-medium",
|
|
1118
|
+
children: "Device"
|
|
1119
|
+
}),
|
|
1120
|
+
/* @__PURE__ */ j("th", {
|
|
1121
|
+
className: "px-3 py-1.5 font-medium",
|
|
1122
|
+
children: "Version"
|
|
1123
|
+
}),
|
|
1124
|
+
/* @__PURE__ */ j("th", {
|
|
1125
|
+
className: "px-3 py-1.5 font-medium",
|
|
1126
|
+
children: "Status"
|
|
1127
|
+
}),
|
|
1128
|
+
/* @__PURE__ */ j("th", {
|
|
1129
|
+
className: "px-3 py-1.5 font-medium",
|
|
1130
|
+
children: "Time"
|
|
1131
|
+
})
|
|
1132
|
+
]
|
|
1133
|
+
}) }), /* @__PURE__ */ j("tbody", { children: e.map((e, n) => /* @__PURE__ */ M("tr", {
|
|
1134
|
+
className: "border-t border-border gds-text-body hover:bg-bg-tertiary/30 transition-colors",
|
|
1135
|
+
children: [
|
|
1136
|
+
/* @__PURE__ */ j("td", {
|
|
1137
|
+
className: "px-3 py-1.5 font-medium text-fg",
|
|
1138
|
+
children: e.project
|
|
1139
|
+
}),
|
|
1140
|
+
/* @__PURE__ */ j("td", {
|
|
1141
|
+
className: "px-3 py-1.5 text-fg-muted",
|
|
1142
|
+
children: e.device
|
|
1143
|
+
}),
|
|
1144
|
+
/* @__PURE__ */ j("td", {
|
|
1145
|
+
className: "px-3 py-1.5 font-mono text-fg-muted",
|
|
1146
|
+
children: e.version
|
|
1147
|
+
}),
|
|
1148
|
+
/* @__PURE__ */ j("td", {
|
|
1149
|
+
className: "px-3 py-1.5",
|
|
1150
|
+
children: /* @__PURE__ */ j("span", {
|
|
1151
|
+
className: t("rounded-full px-2 py-0.5 text-[10px] font-medium", Ve[e.status]),
|
|
1152
|
+
children: e.status
|
|
1153
|
+
})
|
|
1154
|
+
}),
|
|
1155
|
+
/* @__PURE__ */ j("td", {
|
|
1156
|
+
className: "px-3 py-1.5 text-fg-muted",
|
|
1157
|
+
children: e.timestamp
|
|
1158
|
+
})
|
|
1159
|
+
]
|
|
1160
|
+
}, n)) })]
|
|
1161
|
+
})
|
|
1162
|
+
});
|
|
1163
|
+
});
|
|
1164
|
+
//#endregion
|
|
1165
|
+
//#region src/l5-organisms/description-list.tsx
|
|
1166
|
+
function Ue({ items: e, layout: n = "stacked", dividers: r = !0, className: i }) {
|
|
1167
|
+
let a = n === "horizontal";
|
|
1168
|
+
return /* @__PURE__ */ j("dl", {
|
|
1169
|
+
className: t("gds-text-body", i),
|
|
1170
|
+
"data-component": "description-list",
|
|
1171
|
+
"data-variant": n,
|
|
1172
|
+
children: e.map((n, i) => /* @__PURE__ */ M("div", {
|
|
1173
|
+
className: t("gds-pad-x gds-pad-y-sm", a && "grid grid-cols-[1fr_2fr] gap-4", r && i < e.length - 1 && "border-b border-border"),
|
|
1174
|
+
children: [/* @__PURE__ */ j("dt", {
|
|
1175
|
+
className: "font-medium text-fg-muted",
|
|
1176
|
+
children: n.term
|
|
1177
|
+
}), /* @__PURE__ */ j("dd", {
|
|
1178
|
+
className: t("text-fg", a ? "" : "mt-1"),
|
|
1179
|
+
children: n.description
|
|
1180
|
+
})]
|
|
1181
|
+
}, n.term))
|
|
1182
|
+
});
|
|
1183
|
+
}
|
|
1184
|
+
//#endregion
|
|
1185
|
+
//#region src/l5-organisms/diff-algorithm.ts
|
|
1186
|
+
function We(e, t) {
|
|
1187
|
+
let n = e.length, r = t.length, i = Array.from({ length: n + 1 }, () => Array(r + 1).fill(0));
|
|
1188
|
+
for (let a = 1; a <= n; a++) for (let n = 1; n <= r; n++) e[a - 1] === t[n - 1] ? i[a][n] = i[a - 1][n - 1] + 1 : i[a][n] = Math.max(i[a - 1][n], i[a][n - 1]);
|
|
1189
|
+
let a = [], o = n, s = r;
|
|
1190
|
+
for (; o > 0 && s > 0;) e[o - 1] === t[s - 1] ? (a.unshift({
|
|
1191
|
+
type: "unchanged",
|
|
1192
|
+
content: e[o - 1],
|
|
1193
|
+
oldLineNum: o,
|
|
1194
|
+
newLineNum: s
|
|
1195
|
+
}), o--, s--) : i[o - 1][s] >= i[o][s - 1] ? (a.unshift({
|
|
1196
|
+
type: "removed",
|
|
1197
|
+
content: e[o - 1],
|
|
1198
|
+
oldLineNum: o,
|
|
1199
|
+
newLineNum: null
|
|
1200
|
+
}), o--) : (a.unshift({
|
|
1201
|
+
type: "added",
|
|
1202
|
+
content: t[s - 1],
|
|
1203
|
+
oldLineNum: null,
|
|
1204
|
+
newLineNum: s
|
|
1205
|
+
}), s--);
|
|
1206
|
+
for (; o > 0;) a.unshift({
|
|
1207
|
+
type: "removed",
|
|
1208
|
+
content: e[o - 1],
|
|
1209
|
+
oldLineNum: o,
|
|
1210
|
+
newLineNum: null
|
|
1211
|
+
}), o--;
|
|
1212
|
+
for (; s > 0;) a.unshift({
|
|
1213
|
+
type: "added",
|
|
1214
|
+
content: t[s - 1],
|
|
1215
|
+
oldLineNum: null,
|
|
1216
|
+
newLineNum: s
|
|
1217
|
+
}), s--;
|
|
1218
|
+
return a;
|
|
1219
|
+
}
|
|
1220
|
+
function H(e) {
|
|
1221
|
+
return e === "added" ? "bg-success/10" : e === "removed" ? "bg-danger/10" : "";
|
|
1222
|
+
}
|
|
1223
|
+
function Ge(e) {
|
|
1224
|
+
return e === "added" ? "+" : e === "removed" ? "-" : " ";
|
|
1225
|
+
}
|
|
1226
|
+
//#endregion
|
|
1227
|
+
//#region src/l5-organisms/diff-viewer.tsx
|
|
1228
|
+
function Ke({ lines: e }) {
|
|
1229
|
+
return /* @__PURE__ */ j("table", {
|
|
1230
|
+
className: "w-full border-collapse font-mono text-xs",
|
|
1231
|
+
children: /* @__PURE__ */ j("tbody", { children: e.map((e, t) => /* @__PURE__ */ M("tr", {
|
|
1232
|
+
className: H(e.type),
|
|
1233
|
+
children: [
|
|
1234
|
+
/* @__PURE__ */ j("td", {
|
|
1235
|
+
className: "w-10 select-none pr-2 text-right text-fg-muted/50",
|
|
1236
|
+
children: e.oldLineNum ?? ""
|
|
1237
|
+
}),
|
|
1238
|
+
/* @__PURE__ */ j("td", {
|
|
1239
|
+
className: "w-10 select-none pr-2 text-right text-fg-muted/50",
|
|
1240
|
+
children: e.newLineNum ?? ""
|
|
1241
|
+
}),
|
|
1242
|
+
/* @__PURE__ */ j("td", {
|
|
1243
|
+
className: "w-4 select-none text-center text-fg-muted/70",
|
|
1244
|
+
children: Ge(e.type)
|
|
1245
|
+
}),
|
|
1246
|
+
/* @__PURE__ */ j("td", {
|
|
1247
|
+
className: "whitespace-pre px-2",
|
|
1248
|
+
children: e.content
|
|
1249
|
+
})
|
|
1250
|
+
]
|
|
1251
|
+
}, t)) })
|
|
1252
|
+
});
|
|
1253
|
+
}
|
|
1254
|
+
function qe({ lines: e, oldTitle: t, newTitle: n }) {
|
|
1255
|
+
let r = [], i = [];
|
|
1256
|
+
for (let t of e) t.type === "unchanged" ? (r.push(t), i.push(t)) : t.type === "removed" ? (r.push(t), i.push(null)) : (r.push(null), i.push(t));
|
|
1257
|
+
return /* @__PURE__ */ M("div", {
|
|
1258
|
+
className: "grid grid-cols-2 divide-x divide-border",
|
|
1259
|
+
children: [/* @__PURE__ */ M("div", { children: [/* @__PURE__ */ j("div", {
|
|
1260
|
+
className: "border-b border-border px-3 py-1.5 text-[10px] font-medium text-fg-muted select-none",
|
|
1261
|
+
children: t
|
|
1262
|
+
}), /* @__PURE__ */ j("table", {
|
|
1263
|
+
className: "w-full border-collapse font-mono text-xs",
|
|
1264
|
+
children: /* @__PURE__ */ j("tbody", { children: r.map((e, t) => /* @__PURE__ */ M("tr", {
|
|
1265
|
+
className: e === null ? "" : H(e.type),
|
|
1266
|
+
children: [/* @__PURE__ */ j("td", {
|
|
1267
|
+
className: "w-10 select-none pr-2 text-right text-fg-muted/50",
|
|
1268
|
+
children: e?.oldLineNum ?? ""
|
|
1269
|
+
}), /* @__PURE__ */ j("td", {
|
|
1270
|
+
className: "whitespace-pre px-2",
|
|
1271
|
+
children: e?.content ?? ""
|
|
1272
|
+
})]
|
|
1273
|
+
}, t)) })
|
|
1274
|
+
})] }), /* @__PURE__ */ M("div", { children: [/* @__PURE__ */ j("div", {
|
|
1275
|
+
className: "border-b border-border px-3 py-1.5 text-[10px] font-medium text-fg-muted select-none",
|
|
1276
|
+
children: n
|
|
1277
|
+
}), /* @__PURE__ */ j("table", {
|
|
1278
|
+
className: "w-full border-collapse font-mono text-xs",
|
|
1279
|
+
children: /* @__PURE__ */ j("tbody", { children: i.map((e, t) => /* @__PURE__ */ M("tr", {
|
|
1280
|
+
className: e === null ? "" : H(e.type),
|
|
1281
|
+
children: [/* @__PURE__ */ j("td", {
|
|
1282
|
+
className: "w-10 select-none pr-2 text-right text-fg-muted/50",
|
|
1283
|
+
children: e?.newLineNum ?? ""
|
|
1284
|
+
}), /* @__PURE__ */ j("td", {
|
|
1285
|
+
className: "whitespace-pre px-2",
|
|
1286
|
+
children: e?.content ?? ""
|
|
1287
|
+
})]
|
|
1288
|
+
}, t)) })
|
|
1289
|
+
})] })]
|
|
1290
|
+
});
|
|
1291
|
+
}
|
|
1292
|
+
var Je = C(function({ oldText: e, newText: n, mode: r = "unified", oldTitle: i = "Old", newTitle: a = "New", glass: o, className: s }, c) {
|
|
1293
|
+
let l = E(() => We(e.split("\n"), n.split("\n")), [e, n]);
|
|
1294
|
+
return /* @__PURE__ */ j("div", {
|
|
1295
|
+
ref: c,
|
|
1296
|
+
className: t("overflow-auto gds-radius-popover border border-border", o === !0 && "bg-white/5 backdrop-blur-md", o !== !0 && "bg-bg-secondary", s),
|
|
1297
|
+
"data-component": "diff-viewer",
|
|
1298
|
+
"data-variant": r,
|
|
1299
|
+
children: r === "split" ? /* @__PURE__ */ j(qe, {
|
|
1300
|
+
lines: l,
|
|
1301
|
+
oldTitle: i,
|
|
1302
|
+
newTitle: a
|
|
1303
|
+
}) : /* @__PURE__ */ j(Ke, { lines: l })
|
|
1304
|
+
});
|
|
1305
|
+
}), Ye = C(function({ sender: e, senderAvatar: n, subject: r, preview: i, timestamp: a, unread: o, starred: s, selected: c, onClick: l, className: u }, d) {
|
|
1306
|
+
let f = o === !0, p = n ?? e.charAt(0).toUpperCase();
|
|
1307
|
+
return /* @__PURE__ */ M("div", {
|
|
1308
|
+
ref: d,
|
|
1309
|
+
role: l === void 0 ? void 0 : "button",
|
|
1310
|
+
tabIndex: l === void 0 ? void 0 : 0,
|
|
1311
|
+
onClick: l,
|
|
1312
|
+
onKeyDown: l === void 0 ? void 0 : (e) => {
|
|
1313
|
+
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), l());
|
|
1314
|
+
},
|
|
1315
|
+
className: t("flex items-start gap-3 gds-pad-x gds-pad-y-sm gds-text-body select-none", l !== void 0 && "cursor-pointer hover:bg-bg-tertiary", c === !0 && "bg-accent/5", u),
|
|
1316
|
+
"data-component": "email-list-item",
|
|
1317
|
+
"data-state": f ? "unread" : "read",
|
|
1318
|
+
children: [
|
|
1319
|
+
/* @__PURE__ */ j("div", {
|
|
1320
|
+
className: "flex h-8 w-8 shrink-0 items-center justify-center rounded-full bg-bg-tertiary text-xs font-semibold text-fg-muted",
|
|
1321
|
+
children: p
|
|
1322
|
+
}),
|
|
1323
|
+
/* @__PURE__ */ M("div", {
|
|
1324
|
+
className: "min-w-0 flex-1",
|
|
1325
|
+
children: [
|
|
1326
|
+
/* @__PURE__ */ M("div", {
|
|
1327
|
+
className: "flex items-center gap-2",
|
|
1328
|
+
children: [
|
|
1329
|
+
f && /* @__PURE__ */ j("span", { className: "h-2 w-2 shrink-0 rounded-full bg-accent" }),
|
|
1330
|
+
/* @__PURE__ */ j("span", {
|
|
1331
|
+
className: t("truncate", f ? "font-semibold text-fg" : "text-fg"),
|
|
1332
|
+
children: e
|
|
1333
|
+
}),
|
|
1334
|
+
s === !0 && /* @__PURE__ */ j("span", {
|
|
1335
|
+
className: "shrink-0 text-warning",
|
|
1336
|
+
children: "★"
|
|
1337
|
+
})
|
|
1338
|
+
]
|
|
1339
|
+
}),
|
|
1340
|
+
/* @__PURE__ */ j("div", {
|
|
1341
|
+
className: t("truncate", f ? "font-medium text-fg" : "text-fg-muted"),
|
|
1342
|
+
children: r
|
|
1343
|
+
}),
|
|
1344
|
+
i !== void 0 && /* @__PURE__ */ j("div", {
|
|
1345
|
+
className: "truncate text-fg-muted/60",
|
|
1346
|
+
children: i
|
|
1347
|
+
})
|
|
1348
|
+
]
|
|
1349
|
+
}),
|
|
1350
|
+
/* @__PURE__ */ j("span", {
|
|
1351
|
+
className: "shrink-0 text-xs text-fg-muted",
|
|
1352
|
+
children: a
|
|
1353
|
+
})
|
|
1354
|
+
]
|
|
1355
|
+
});
|
|
1356
|
+
}), Xe = C(function({ src: e, title: n, ratio: r = 16 / 9, allowFullscreen: i = !0, sandbox: a, loading: o = "lazy", glass: s = !1, className: c }, l) {
|
|
1357
|
+
return /* @__PURE__ */ j("div", {
|
|
1358
|
+
ref: l,
|
|
1359
|
+
className: t("relative w-full overflow-hidden border border-white/[0.06] gds-radius-card", s && "gds-glass", c),
|
|
1360
|
+
"data-component": "embed",
|
|
1361
|
+
style: { aspectRatio: r },
|
|
1362
|
+
children: /* @__PURE__ */ j("iframe", {
|
|
1363
|
+
src: e,
|
|
1364
|
+
title: n,
|
|
1365
|
+
className: "absolute inset-0 h-full w-full border-none",
|
|
1366
|
+
allowFullScreen: i,
|
|
1367
|
+
sandbox: a,
|
|
1368
|
+
loading: o,
|
|
1369
|
+
"data-testid": "embed-iframe"
|
|
1370
|
+
})
|
|
1371
|
+
});
|
|
1372
|
+
}), Ze = {
|
|
1373
|
+
active: "bg-success/15 text-success",
|
|
1374
|
+
inactive: "bg-danger/15 text-danger",
|
|
1375
|
+
onboarding: "bg-warning/15 text-warning"
|
|
1376
|
+
}, Qe = C(function({ avatar: e, className: n, department: r, email: i, name: a, phone: o, role: s, status: c, ...l }, u) {
|
|
1377
|
+
let d = a.split(" ").map((e) => e[0]).join("").slice(0, 2).toUpperCase();
|
|
1378
|
+
return /* @__PURE__ */ M("div", {
|
|
1379
|
+
className: t("gds-ctx gds-radius-card border border-border bg-surface gds-pad", n),
|
|
1380
|
+
"data-component": "employee-card",
|
|
1381
|
+
ref: u,
|
|
1382
|
+
...l,
|
|
1383
|
+
children: [/* @__PURE__ */ M("div", {
|
|
1384
|
+
className: "flex items-center gds-gap",
|
|
1385
|
+
children: [
|
|
1386
|
+
e === void 0 ? /* @__PURE__ */ j("div", {
|
|
1387
|
+
className: "flex h-12 w-12 items-center justify-center rounded-full bg-accent/10 text-sm font-semibold text-accent",
|
|
1388
|
+
children: d
|
|
1389
|
+
}) : /* @__PURE__ */ j("img", {
|
|
1390
|
+
src: e,
|
|
1391
|
+
alt: a,
|
|
1392
|
+
className: "h-12 w-12 rounded-full object-cover"
|
|
1393
|
+
}),
|
|
1394
|
+
/* @__PURE__ */ M("div", {
|
|
1395
|
+
className: "flex-1 min-w-0",
|
|
1396
|
+
children: [
|
|
1397
|
+
/* @__PURE__ */ j("div", {
|
|
1398
|
+
className: "font-semibold text-fg truncate",
|
|
1399
|
+
children: a
|
|
1400
|
+
}),
|
|
1401
|
+
s !== void 0 && /* @__PURE__ */ j("div", {
|
|
1402
|
+
className: "text-xs text-fg-muted truncate",
|
|
1403
|
+
children: s
|
|
1404
|
+
}),
|
|
1405
|
+
r !== void 0 && /* @__PURE__ */ j("div", {
|
|
1406
|
+
className: "text-xs text-fg-muted truncate",
|
|
1407
|
+
children: r
|
|
1408
|
+
})
|
|
1409
|
+
]
|
|
1410
|
+
}),
|
|
1411
|
+
c !== void 0 && /* @__PURE__ */ j("span", {
|
|
1412
|
+
className: t("shrink-0 rounded-full px-2 py-0.5 text-xs font-medium", Ze[c]),
|
|
1413
|
+
children: c
|
|
1414
|
+
})
|
|
1415
|
+
]
|
|
1416
|
+
}), (i !== void 0 || o !== void 0) && /* @__PURE__ */ M("div", {
|
|
1417
|
+
className: "mt-3 space-y-0.5 text-xs text-fg-muted",
|
|
1418
|
+
children: [i !== void 0 && /* @__PURE__ */ j("div", { children: i }), o !== void 0 && /* @__PURE__ */ j("div", { children: o })]
|
|
1419
|
+
})]
|
|
1420
|
+
});
|
|
1421
|
+
}), $e = class extends S {
|
|
1422
|
+
state = { error: null };
|
|
1423
|
+
static getDerivedStateFromError(e) {
|
|
1424
|
+
return { error: e };
|
|
1425
|
+
}
|
|
1426
|
+
componentDidCatch(e, t) {
|
|
1427
|
+
this.props.onError !== void 0 && this.props.onError(e, t);
|
|
1428
|
+
}
|
|
1429
|
+
render() {
|
|
1430
|
+
let { error: e } = this.state, { children: t, fallback: n } = this.props;
|
|
1431
|
+
return e === null ? t : n === void 0 ? /* @__PURE__ */ M("div", {
|
|
1432
|
+
className: "flex flex-col items-center justify-center gap-2 gds-pad gds-text-body text-danger",
|
|
1433
|
+
"data-component": "error-boundary",
|
|
1434
|
+
children: [/* @__PURE__ */ j("p", {
|
|
1435
|
+
className: "font-semibold",
|
|
1436
|
+
children: "Something went wrong"
|
|
1437
|
+
}), /* @__PURE__ */ j("p", {
|
|
1438
|
+
className: "text-fg-muted gds-text-caption",
|
|
1439
|
+
children: e.message
|
|
1440
|
+
})]
|
|
1441
|
+
}) : typeof n == "function" ? n(e) : n;
|
|
1442
|
+
}
|
|
1443
|
+
};
|
|
1444
|
+
//#endregion
|
|
1445
|
+
//#region src/l5-organisms/file-browser.tsx
|
|
1446
|
+
function et() {
|
|
1447
|
+
return /* @__PURE__ */ j("svg", {
|
|
1448
|
+
className: "h-4 w-4 text-warning",
|
|
1449
|
+
viewBox: "0 0 16 16",
|
|
1450
|
+
fill: "currentColor",
|
|
1451
|
+
children: /* @__PURE__ */ j("path", { d: "M1 3.5A1.5 1.5 0 012.5 2h3.379a1.5 1.5 0 011.06.44L8.062 3.5H13.5A1.5 1.5 0 0115 5v7.5a1.5 1.5 0 01-1.5 1.5h-11A1.5 1.5 0 011 12.5v-9z" })
|
|
1452
|
+
});
|
|
1453
|
+
}
|
|
1454
|
+
function tt() {
|
|
1455
|
+
return /* @__PURE__ */ M("svg", {
|
|
1456
|
+
className: "h-4 w-4 text-fg-muted",
|
|
1457
|
+
viewBox: "0 0 16 16",
|
|
1458
|
+
fill: "none",
|
|
1459
|
+
stroke: "currentColor",
|
|
1460
|
+
strokeWidth: "1.2",
|
|
1461
|
+
children: [/* @__PURE__ */ j("path", { d: "M4 1.5h5l3.5 3.5V14a.5.5 0 01-.5.5H4a.5.5 0 01-.5-.5V2a.5.5 0 01.5-.5z" }), /* @__PURE__ */ j("path", { d: "M9 1.5V5h3.5" })]
|
|
1462
|
+
});
|
|
1463
|
+
}
|
|
1464
|
+
function nt(e) {
|
|
1465
|
+
return e === void 0 ? "—" : e < 1024 ? `${e} B` : e < 1024 * 1024 ? `${(e / 1024).toFixed(1)} KB` : `${(e / (1024 * 1024)).toFixed(1)} MB`;
|
|
1466
|
+
}
|
|
1467
|
+
var rt = C(function({ files: e, onNavigate: n, onSelect: r, selected: a, className: o }, s) {
|
|
1468
|
+
let c = (e) => {
|
|
1469
|
+
e.type === "folder" && n !== void 0 ? n(e.id) : e.type === "file" && r !== void 0 && r(e.id);
|
|
1470
|
+
};
|
|
1471
|
+
return /* @__PURE__ */ j("div", {
|
|
1472
|
+
ref: s,
|
|
1473
|
+
className: t("overflow-auto gds-radius-popover border border-border bg-surface", o),
|
|
1474
|
+
"data-component": "file-browser",
|
|
1475
|
+
children: /* @__PURE__ */ M("table", {
|
|
1476
|
+
className: "w-full border-collapse text-sm",
|
|
1477
|
+
children: [/* @__PURE__ */ j("thead", { children: /* @__PURE__ */ M("tr", {
|
|
1478
|
+
className: "border-b border-border bg-bg-secondary/50",
|
|
1479
|
+
children: [
|
|
1480
|
+
/* @__PURE__ */ j("th", {
|
|
1481
|
+
className: "gds-pad-x gds-pad-y text-left gds-text-body font-medium uppercase tracking-wider text-fg-muted select-none",
|
|
1482
|
+
children: "Name"
|
|
1483
|
+
}),
|
|
1484
|
+
/* @__PURE__ */ j("th", {
|
|
1485
|
+
className: "w-24 gds-pad-x gds-pad-y text-right gds-text-body font-medium uppercase tracking-wider text-fg-muted select-none",
|
|
1486
|
+
children: "Size"
|
|
1487
|
+
}),
|
|
1488
|
+
/* @__PURE__ */ j("th", {
|
|
1489
|
+
className: "w-32 gds-pad-x gds-pad-y text-right gds-text-body font-medium uppercase tracking-wider text-fg-muted select-none",
|
|
1490
|
+
children: "Modified"
|
|
1491
|
+
})
|
|
1492
|
+
]
|
|
1493
|
+
}) }), /* @__PURE__ */ M("tbody", { children: [e.length === 0 && /* @__PURE__ */ j("tr", { children: /* @__PURE__ */ j("td", {
|
|
1494
|
+
colSpan: 3,
|
|
1495
|
+
className: "gds-pad-x py-12 text-center text-sm text-fg-muted",
|
|
1496
|
+
children: "Empty folder"
|
|
1497
|
+
}) }), e.map((e) => /* @__PURE__ */ M("tr", {
|
|
1498
|
+
className: t("border-b border-border transition-colors", i, a === e.id && "bg-accent/10", a !== e.id && "hover:bg-bg-secondary/60", "cursor-pointer"),
|
|
1499
|
+
onClick: () => c(e),
|
|
1500
|
+
tabIndex: 0,
|
|
1501
|
+
onKeyDown: (t) => {
|
|
1502
|
+
t.key === "Enter" && c(e);
|
|
1503
|
+
},
|
|
1504
|
+
children: [
|
|
1505
|
+
/* @__PURE__ */ j("td", {
|
|
1506
|
+
className: "gds-pad-x gds-pad-y",
|
|
1507
|
+
children: /* @__PURE__ */ M("div", {
|
|
1508
|
+
className: "flex items-center gds-gap-sm text-fg",
|
|
1509
|
+
children: [e.icon ?? (e.type === "folder" ? /* @__PURE__ */ j(et, {}) : /* @__PURE__ */ j(tt, {})), /* @__PURE__ */ j("span", {
|
|
1510
|
+
className: e.type === "folder" ? "font-medium" : "",
|
|
1511
|
+
children: e.name
|
|
1512
|
+
})]
|
|
1513
|
+
})
|
|
1514
|
+
}),
|
|
1515
|
+
/* @__PURE__ */ j("td", {
|
|
1516
|
+
className: "gds-pad-x gds-pad-y text-right text-fg-muted",
|
|
1517
|
+
children: e.type === "folder" ? "—" : nt(e.size)
|
|
1518
|
+
}),
|
|
1519
|
+
/* @__PURE__ */ j("td", {
|
|
1520
|
+
className: "gds-pad-x gds-pad-y text-right text-fg-muted",
|
|
1521
|
+
children: e.modified ?? "—"
|
|
1522
|
+
})
|
|
1523
|
+
]
|
|
1524
|
+
}, e.id))] })]
|
|
1525
|
+
})
|
|
1526
|
+
});
|
|
1527
|
+
}), it = C(function({ name: e, size: n, type: r, thumbnail: i, actions: o, onClick: s, className: c }, l) {
|
|
1528
|
+
let u = s !== void 0;
|
|
1529
|
+
return /* @__PURE__ */ M("div", {
|
|
1530
|
+
ref: l,
|
|
1531
|
+
role: u ? "button" : void 0,
|
|
1532
|
+
tabIndex: u ? 0 : void 0,
|
|
1533
|
+
onClick: u ? s : void 0,
|
|
1534
|
+
onKeyDown: u ? (e) => {
|
|
1535
|
+
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), s());
|
|
1536
|
+
} : void 0,
|
|
1537
|
+
className: t("gds-ctx gds-radius-card border border-border bg-surface overflow-hidden select-none", u && "cursor-pointer hover:border-accent/40 transition-colors", c),
|
|
1538
|
+
"data-component": "file-card",
|
|
1539
|
+
children: [i !== void 0 && /* @__PURE__ */ j("div", {
|
|
1540
|
+
className: "flex h-28 items-center justify-center bg-bg-tertiary",
|
|
1541
|
+
children: /* @__PURE__ */ j("img", {
|
|
1542
|
+
src: i,
|
|
1543
|
+
alt: e,
|
|
1544
|
+
className: "h-full w-full object-cover"
|
|
1545
|
+
})
|
|
1546
|
+
}), /* @__PURE__ */ M("div", {
|
|
1547
|
+
className: "gds-pad",
|
|
1548
|
+
children: [
|
|
1549
|
+
/* @__PURE__ */ j("div", {
|
|
1550
|
+
className: "truncate font-medium text-fg gds-text-body",
|
|
1551
|
+
children: e
|
|
1552
|
+
}),
|
|
1553
|
+
/* @__PURE__ */ M("div", {
|
|
1554
|
+
className: "mt-1 flex items-center gap-2",
|
|
1555
|
+
children: [n !== void 0 && /* @__PURE__ */ j("span", {
|
|
1556
|
+
className: "text-fg-muted gds-text-caption",
|
|
1557
|
+
children: n
|
|
1558
|
+
}), r !== void 0 && /* @__PURE__ */ j(a, { children: r })]
|
|
1559
|
+
}),
|
|
1560
|
+
o !== void 0 && /* @__PURE__ */ j("div", {
|
|
1561
|
+
className: "mt-2 flex gap-1",
|
|
1562
|
+
children: o
|
|
1563
|
+
})
|
|
1564
|
+
]
|
|
1565
|
+
})]
|
|
1566
|
+
});
|
|
1567
|
+
}), U = t("w-full gds-radius-button border border-border bg-bg gds-pad-x gds-pad-y-sm text-sm text-fg", "placeholder:text-fg-muted/50", i);
|
|
1568
|
+
function at(e, n, r) {
|
|
1569
|
+
let a = `form-field-${e.id}`;
|
|
1570
|
+
return e.type === "checkbox" ? /* @__PURE__ */ M("label", {
|
|
1571
|
+
htmlFor: a,
|
|
1572
|
+
className: "flex cursor-pointer items-center gds-gap-sm select-none",
|
|
1573
|
+
children: [
|
|
1574
|
+
/* @__PURE__ */ j("input", {
|
|
1575
|
+
id: a,
|
|
1576
|
+
type: "checkbox",
|
|
1577
|
+
checked: !!n,
|
|
1578
|
+
onChange: (t) => r(e.id, t.target.checked),
|
|
1579
|
+
className: t("h-4 w-4 rounded border-border", i)
|
|
1580
|
+
}),
|
|
1581
|
+
/* @__PURE__ */ j("span", {
|
|
1582
|
+
className: "text-sm text-fg",
|
|
1583
|
+
children: e.label
|
|
1584
|
+
}),
|
|
1585
|
+
e.required === !0 && /* @__PURE__ */ j("span", {
|
|
1586
|
+
className: "text-danger",
|
|
1587
|
+
children: "*"
|
|
1588
|
+
})
|
|
1589
|
+
]
|
|
1590
|
+
}) : e.type === "textarea" ? /* @__PURE__ */ M("div", {
|
|
1591
|
+
className: "flex flex-col gds-gap-xs",
|
|
1592
|
+
children: [/* @__PURE__ */ M("label", {
|
|
1593
|
+
htmlFor: a,
|
|
1594
|
+
className: "gds-text-body font-medium text-fg-muted select-none",
|
|
1595
|
+
children: [e.label, e.required === !0 && /* @__PURE__ */ j("span", {
|
|
1596
|
+
className: "ml-0.5 text-danger",
|
|
1597
|
+
children: "*"
|
|
1598
|
+
})]
|
|
1599
|
+
}), /* @__PURE__ */ j("textarea", {
|
|
1600
|
+
id: a,
|
|
1601
|
+
value: String(n ?? ""),
|
|
1602
|
+
placeholder: e.placeholder,
|
|
1603
|
+
onChange: (t) => r(e.id, t.target.value),
|
|
1604
|
+
className: t(U, "min-h-[72px] resize-y"),
|
|
1605
|
+
rows: 3
|
|
1606
|
+
})]
|
|
1607
|
+
}) : e.type === "select" ? /* @__PURE__ */ M("div", {
|
|
1608
|
+
className: "flex flex-col gds-gap-xs",
|
|
1609
|
+
children: [/* @__PURE__ */ M("label", {
|
|
1610
|
+
htmlFor: a,
|
|
1611
|
+
className: "gds-text-body font-medium text-fg-muted select-none",
|
|
1612
|
+
children: [e.label, e.required === !0 && /* @__PURE__ */ j("span", {
|
|
1613
|
+
className: "ml-0.5 text-danger",
|
|
1614
|
+
children: "*"
|
|
1615
|
+
})]
|
|
1616
|
+
}), /* @__PURE__ */ M("select", {
|
|
1617
|
+
id: a,
|
|
1618
|
+
value: String(n ?? ""),
|
|
1619
|
+
onChange: (t) => r(e.id, t.target.value),
|
|
1620
|
+
className: t(U, "cursor-pointer"),
|
|
1621
|
+
children: [/* @__PURE__ */ j("option", {
|
|
1622
|
+
value: "",
|
|
1623
|
+
children: e.placeholder ?? "Select..."
|
|
1624
|
+
}), e.options?.map((e) => /* @__PURE__ */ j("option", {
|
|
1625
|
+
value: e,
|
|
1626
|
+
children: e
|
|
1627
|
+
}, e))]
|
|
1628
|
+
})]
|
|
1629
|
+
}) : /* @__PURE__ */ M("div", {
|
|
1630
|
+
className: "flex flex-col gds-gap-xs",
|
|
1631
|
+
children: [/* @__PURE__ */ M("label", {
|
|
1632
|
+
htmlFor: a,
|
|
1633
|
+
className: "gds-text-body font-medium text-fg-muted select-none",
|
|
1634
|
+
children: [e.label, e.required === !0 && /* @__PURE__ */ j("span", {
|
|
1635
|
+
className: "ml-0.5 text-danger",
|
|
1636
|
+
children: "*"
|
|
1637
|
+
})]
|
|
1638
|
+
}), /* @__PURE__ */ j("input", {
|
|
1639
|
+
id: a,
|
|
1640
|
+
type: e.type,
|
|
1641
|
+
value: String(n ?? ""),
|
|
1642
|
+
placeholder: e.placeholder,
|
|
1643
|
+
onChange: (t) => {
|
|
1644
|
+
e.type === "number" ? r(e.id, t.target.value === "" ? "" : Number(t.target.value)) : r(e.id, t.target.value);
|
|
1645
|
+
},
|
|
1646
|
+
className: U
|
|
1647
|
+
})]
|
|
1648
|
+
});
|
|
1649
|
+
}
|
|
1650
|
+
var ot = C(function({ fields: e, values: n, onChange: r, className: i }, a) {
|
|
1651
|
+
return /* @__PURE__ */ j("div", {
|
|
1652
|
+
ref: a,
|
|
1653
|
+
className: t("flex flex-col gap-4", i),
|
|
1654
|
+
"data-component": "form-builder",
|
|
1655
|
+
children: e.map((e) => /* @__PURE__ */ j("div", { children: at(e, n[e.id], r) }, e.id))
|
|
1656
|
+
});
|
|
1657
|
+
}), st = C(function({ className: e, headers: n, maxValue: r, rows: i, ...a }, o) {
|
|
1658
|
+
let s = r ?? Math.max(1, ...i.flatMap((e) => e.values));
|
|
1659
|
+
return /* @__PURE__ */ M("table", {
|
|
1660
|
+
className: t("w-full border-collapse text-xs", e),
|
|
1661
|
+
"data-component": "heatmap-table",
|
|
1662
|
+
ref: o,
|
|
1663
|
+
...a,
|
|
1664
|
+
children: [/* @__PURE__ */ j("thead", { children: /* @__PURE__ */ M("tr", { children: [/* @__PURE__ */ j("th", { className: "p-1.5 text-left font-medium text-fg-muted" }), n.map((e) => /* @__PURE__ */ j("th", {
|
|
1665
|
+
className: "p-1.5 text-center font-medium text-fg-muted",
|
|
1666
|
+
children: e
|
|
1667
|
+
}, e))] }) }), /* @__PURE__ */ j("tbody", { children: i.map((e) => /* @__PURE__ */ M("tr", { children: [/* @__PURE__ */ j("td", {
|
|
1668
|
+
className: "p-1.5 font-medium text-fg",
|
|
1669
|
+
children: e.label
|
|
1670
|
+
}), e.values.map((e, t) => {
|
|
1671
|
+
let n = Math.min(e / s, 1);
|
|
1672
|
+
return /* @__PURE__ */ j("td", {
|
|
1673
|
+
className: "p-1.5 text-center tabular-nums text-fg",
|
|
1674
|
+
style: { backgroundColor: `color-mix(in srgb, var(--color-accent) ${Math.round(n * 20)}%, transparent)` },
|
|
1675
|
+
children: e
|
|
1676
|
+
}, t);
|
|
1677
|
+
})] }, e.label)) })]
|
|
1678
|
+
});
|
|
1679
|
+
}), ct = C(function({ src: e, alt: n = "", thumbnailClassName: r, className: a }, o) {
|
|
1680
|
+
let [s, l] = O(!1), u = w(() => l(!0), []), d = w(() => l(!1), []);
|
|
1681
|
+
return T(() => {
|
|
1682
|
+
if (!s) return;
|
|
1683
|
+
let e = (e) => {
|
|
1684
|
+
e.key === "Escape" && d();
|
|
1685
|
+
};
|
|
1686
|
+
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
1687
|
+
}, [s, d]), T(() => {
|
|
1688
|
+
if (!s) return;
|
|
1689
|
+
let e = document.body.style.overflow;
|
|
1690
|
+
return document.body.style.overflow = "hidden", () => {
|
|
1691
|
+
document.body.style.overflow = e;
|
|
1692
|
+
};
|
|
1693
|
+
}, [s]), /* @__PURE__ */ M("div", {
|
|
1694
|
+
ref: o,
|
|
1695
|
+
className: t("inline-block", a),
|
|
1696
|
+
"data-component": "image-preview",
|
|
1697
|
+
children: [/* @__PURE__ */ j("button", {
|
|
1698
|
+
type: "button",
|
|
1699
|
+
onClick: u,
|
|
1700
|
+
className: t("cursor-pointer border-0 bg-transparent p-0", i),
|
|
1701
|
+
"aria-label": `Preview ${n}`,
|
|
1702
|
+
children: /* @__PURE__ */ j("img", {
|
|
1703
|
+
src: e,
|
|
1704
|
+
alt: n,
|
|
1705
|
+
className: t("gds-radius object-cover", r),
|
|
1706
|
+
"data-testid": "thumbnail"
|
|
1707
|
+
})
|
|
1708
|
+
}), s && c(/* @__PURE__ */ M("div", {
|
|
1709
|
+
className: "fixed inset-0 z-50 flex items-center justify-center bg-black/90",
|
|
1710
|
+
onClick: (e) => {
|
|
1711
|
+
e.target === e.currentTarget && d();
|
|
1712
|
+
},
|
|
1713
|
+
"data-testid": "lightbox",
|
|
1714
|
+
children: [/* @__PURE__ */ j("button", {
|
|
1715
|
+
type: "button",
|
|
1716
|
+
onClick: d,
|
|
1717
|
+
className: t("absolute right-4 top-4 rounded-full bg-white/10 p-2 text-white transition-colors hover:bg-white/20", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-offset-1 focus-visible:ring-offset-bg"),
|
|
1718
|
+
"aria-label": "Close preview",
|
|
1719
|
+
children: /* @__PURE__ */ j("svg", {
|
|
1720
|
+
width: "16",
|
|
1721
|
+
height: "16",
|
|
1722
|
+
viewBox: "0 0 16 16",
|
|
1723
|
+
fill: "none",
|
|
1724
|
+
stroke: "currentColor",
|
|
1725
|
+
strokeWidth: "2",
|
|
1726
|
+
strokeLinecap: "round",
|
|
1727
|
+
children: /* @__PURE__ */ j("path", { d: "M3 3l10 10M13 3L3 13" })
|
|
1728
|
+
})
|
|
1729
|
+
}), /* @__PURE__ */ j("img", {
|
|
1730
|
+
src: e,
|
|
1731
|
+
alt: n,
|
|
1732
|
+
className: "max-h-[90vh] max-w-[90vw] object-contain"
|
|
1733
|
+
})]
|
|
1734
|
+
}))]
|
|
1735
|
+
});
|
|
1736
|
+
}), lt = C(function({ children: e, className: n, hasMore: r, loader: i, loading: a, onLoadMore: o, threshold: s = .8, ...c }, l) {
|
|
1737
|
+
let u = D(null);
|
|
1738
|
+
return T(() => {
|
|
1739
|
+
let e = u.current;
|
|
1740
|
+
if (e === null) return;
|
|
1741
|
+
let t = new IntersectionObserver((e) => {
|
|
1742
|
+
let t = e[0];
|
|
1743
|
+
t !== void 0 && t.isIntersecting && r && !a && o();
|
|
1744
|
+
}, { threshold: s });
|
|
1745
|
+
return t.observe(e), () => t.disconnect();
|
|
1746
|
+
}, [
|
|
1747
|
+
r,
|
|
1748
|
+
a,
|
|
1749
|
+
o,
|
|
1750
|
+
s
|
|
1751
|
+
]), /* @__PURE__ */ M("div", {
|
|
1752
|
+
className: t("relative", n),
|
|
1753
|
+
"data-component": "infinite-scroll",
|
|
1754
|
+
ref: l,
|
|
1755
|
+
...c,
|
|
1756
|
+
children: [
|
|
1757
|
+
e,
|
|
1758
|
+
a === !0 && /* @__PURE__ */ j("div", {
|
|
1759
|
+
className: "flex items-center justify-center py-4",
|
|
1760
|
+
children: i ?? /* @__PURE__ */ j(d, {})
|
|
1761
|
+
}),
|
|
1762
|
+
/* @__PURE__ */ j("div", {
|
|
1763
|
+
ref: u,
|
|
1764
|
+
"data-sentinel": "true",
|
|
1765
|
+
className: "h-px w-full"
|
|
1766
|
+
})
|
|
1767
|
+
]
|
|
1768
|
+
});
|
|
1769
|
+
});
|
|
1770
|
+
//#endregion
|
|
1771
|
+
//#region src/l5-organisms/json-node.tsx
|
|
1772
|
+
function ut(e, t) {
|
|
1773
|
+
return e === !0 ? !0 : e === !1 ? !1 : t < e;
|
|
1774
|
+
}
|
|
1775
|
+
function dt({ value: e }) {
|
|
1776
|
+
return /* @__PURE__ */ M("span", {
|
|
1777
|
+
className: "text-success",
|
|
1778
|
+
children: [
|
|
1779
|
+
"\"",
|
|
1780
|
+
e,
|
|
1781
|
+
"\""
|
|
1782
|
+
]
|
|
1783
|
+
});
|
|
1784
|
+
}
|
|
1785
|
+
function ft({ value: e }) {
|
|
1786
|
+
return /* @__PURE__ */ j("span", {
|
|
1787
|
+
className: "text-accent",
|
|
1788
|
+
children: String(e)
|
|
1789
|
+
});
|
|
1790
|
+
}
|
|
1791
|
+
function pt({ value: e }) {
|
|
1792
|
+
return /* @__PURE__ */ j("span", {
|
|
1793
|
+
className: "text-[#c084fc]",
|
|
1794
|
+
children: String(e)
|
|
1795
|
+
});
|
|
1796
|
+
}
|
|
1797
|
+
function mt() {
|
|
1798
|
+
return /* @__PURE__ */ j("span", {
|
|
1799
|
+
className: "text-fg-muted",
|
|
1800
|
+
children: "null"
|
|
1801
|
+
});
|
|
1802
|
+
}
|
|
1803
|
+
function W({ value: e, keyName: t, depth: n, defaultExpanded: r }) {
|
|
1804
|
+
let [i, a] = O(() => ut(r, n)), o = w(() => {
|
|
1805
|
+
a((e) => !e);
|
|
1806
|
+
}, []), s = t === void 0 ? null : /* @__PURE__ */ M("span", {
|
|
1807
|
+
className: "text-fg",
|
|
1808
|
+
children: [t, ": "]
|
|
1809
|
+
});
|
|
1810
|
+
if (e == null) return /* @__PURE__ */ M("div", {
|
|
1811
|
+
style: { paddingLeft: `${n * 16}px` },
|
|
1812
|
+
children: [s, /* @__PURE__ */ j(mt, {})]
|
|
1813
|
+
});
|
|
1814
|
+
if (typeof e == "string") return /* @__PURE__ */ M("div", {
|
|
1815
|
+
style: { paddingLeft: `${n * 16}px` },
|
|
1816
|
+
children: [s, /* @__PURE__ */ j(dt, { value: e })]
|
|
1817
|
+
});
|
|
1818
|
+
if (typeof e == "number") return /* @__PURE__ */ M("div", {
|
|
1819
|
+
style: { paddingLeft: `${n * 16}px` },
|
|
1820
|
+
children: [s, /* @__PURE__ */ j(ft, { value: e })]
|
|
1821
|
+
});
|
|
1822
|
+
if (typeof e == "boolean") return /* @__PURE__ */ M("div", {
|
|
1823
|
+
style: { paddingLeft: `${n * 16}px` },
|
|
1824
|
+
children: [s, /* @__PURE__ */ j(pt, { value: e })]
|
|
1825
|
+
});
|
|
1826
|
+
if (Array.isArray(e)) return e.length === 0 ? /* @__PURE__ */ M("div", {
|
|
1827
|
+
style: { paddingLeft: `${n * 16}px` },
|
|
1828
|
+
children: [s, "[]"]
|
|
1829
|
+
}) : i ? /* @__PURE__ */ M("div", { children: [
|
|
1830
|
+
/* @__PURE__ */ M("div", {
|
|
1831
|
+
style: { paddingLeft: `${n * 16}px` },
|
|
1832
|
+
children: [s, /* @__PURE__ */ j("button", {
|
|
1833
|
+
className: "cursor-pointer text-fg-muted hover:text-fg",
|
|
1834
|
+
onClick: o,
|
|
1835
|
+
"data-testid": "toggle",
|
|
1836
|
+
children: "["
|
|
1837
|
+
})]
|
|
1838
|
+
}),
|
|
1839
|
+
e.map((e, t) => /* @__PURE__ */ j(W, {
|
|
1840
|
+
value: e,
|
|
1841
|
+
depth: n + 1,
|
|
1842
|
+
defaultExpanded: r
|
|
1843
|
+
}, t)),
|
|
1844
|
+
/* @__PURE__ */ j("div", {
|
|
1845
|
+
style: { paddingLeft: `${n * 16}px` },
|
|
1846
|
+
children: "]"
|
|
1847
|
+
})
|
|
1848
|
+
] }) : /* @__PURE__ */ M("div", {
|
|
1849
|
+
style: { paddingLeft: `${n * 16}px` },
|
|
1850
|
+
children: [s, /* @__PURE__ */ M("button", {
|
|
1851
|
+
className: "cursor-pointer text-fg-muted hover:text-fg",
|
|
1852
|
+
onClick: o,
|
|
1853
|
+
"data-testid": "toggle",
|
|
1854
|
+
children: [
|
|
1855
|
+
"[...",
|
|
1856
|
+
e.length,
|
|
1857
|
+
" items]"
|
|
1858
|
+
]
|
|
1859
|
+
})]
|
|
1860
|
+
});
|
|
1861
|
+
if (typeof e == "object") {
|
|
1862
|
+
let t = Object.entries(e);
|
|
1863
|
+
return t.length === 0 ? /* @__PURE__ */ M("div", {
|
|
1864
|
+
style: { paddingLeft: `${n * 16}px` },
|
|
1865
|
+
children: [s, "{}"]
|
|
1866
|
+
}) : i ? /* @__PURE__ */ M("div", { children: [
|
|
1867
|
+
/* @__PURE__ */ M("div", {
|
|
1868
|
+
style: { paddingLeft: `${n * 16}px` },
|
|
1869
|
+
children: [s, /* @__PURE__ */ j("button", {
|
|
1870
|
+
className: "cursor-pointer text-fg-muted hover:text-fg",
|
|
1871
|
+
onClick: o,
|
|
1872
|
+
"data-testid": "toggle",
|
|
1873
|
+
children: "{"
|
|
1874
|
+
})]
|
|
1875
|
+
}),
|
|
1876
|
+
t.map(([e, t]) => /* @__PURE__ */ j(W, {
|
|
1877
|
+
value: t,
|
|
1878
|
+
keyName: e,
|
|
1879
|
+
depth: n + 1,
|
|
1880
|
+
defaultExpanded: r
|
|
1881
|
+
}, e)),
|
|
1882
|
+
/* @__PURE__ */ j("div", {
|
|
1883
|
+
style: { paddingLeft: `${n * 16}px` },
|
|
1884
|
+
children: "}"
|
|
1885
|
+
})
|
|
1886
|
+
] }) : /* @__PURE__ */ M("div", {
|
|
1887
|
+
style: { paddingLeft: `${n * 16}px` },
|
|
1888
|
+
children: [s, /* @__PURE__ */ M("button", {
|
|
1889
|
+
className: "cursor-pointer text-fg-muted hover:text-fg",
|
|
1890
|
+
onClick: o,
|
|
1891
|
+
"data-testid": "toggle",
|
|
1892
|
+
children: [
|
|
1893
|
+
"{",
|
|
1894
|
+
" ...",
|
|
1895
|
+
t.length,
|
|
1896
|
+
" keys ",
|
|
1897
|
+
"}"
|
|
1898
|
+
]
|
|
1899
|
+
})]
|
|
1900
|
+
});
|
|
1901
|
+
}
|
|
1902
|
+
return /* @__PURE__ */ M("div", {
|
|
1903
|
+
style: { paddingLeft: `${n * 16}px` },
|
|
1904
|
+
children: [s, String(e)]
|
|
1905
|
+
});
|
|
1906
|
+
}
|
|
1907
|
+
//#endregion
|
|
1908
|
+
//#region src/l5-organisms/json-viewer.tsx
|
|
1909
|
+
var ht = C(function({ data: e, defaultExpanded: n = 2, glass: r, className: i }, a) {
|
|
1910
|
+
return /* @__PURE__ */ j("div", {
|
|
1911
|
+
ref: a,
|
|
1912
|
+
className: t("overflow-auto gds-radius-popover border border-border gds-pad-x gds-pad-y font-mono text-xs leading-5", r === !0 && "bg-white/5 backdrop-blur-md", r !== !0 && "bg-bg-secondary", i),
|
|
1913
|
+
"data-component": "json-viewer",
|
|
1914
|
+
children: /* @__PURE__ */ j(W, {
|
|
1915
|
+
value: e,
|
|
1916
|
+
depth: 0,
|
|
1917
|
+
defaultExpanded: n
|
|
1918
|
+
})
|
|
1919
|
+
});
|
|
1920
|
+
});
|
|
1921
|
+
//#endregion
|
|
1922
|
+
//#region src/l5-organisms/kanban.tsx
|
|
1923
|
+
function gt({ label: e }) {
|
|
1924
|
+
return /* @__PURE__ */ j("span", {
|
|
1925
|
+
className: "inline-block gds-radius-badge bg-bg-tertiary gds-pad-x-sm py-0.5 gds-text-caption font-medium text-fg-muted",
|
|
1926
|
+
children: e
|
|
1927
|
+
});
|
|
1928
|
+
}
|
|
1929
|
+
function _t({ item: e }) {
|
|
1930
|
+
return /* @__PURE__ */ M("div", {
|
|
1931
|
+
className: "gds-radius-popover border border-border bg-surface gds-pad-x gds-pad-y transition-colors hover:border-fg-muted/30",
|
|
1932
|
+
children: [
|
|
1933
|
+
/* @__PURE__ */ j("div", {
|
|
1934
|
+
className: "text-sm font-medium text-fg",
|
|
1935
|
+
children: e.title
|
|
1936
|
+
}),
|
|
1937
|
+
e.description !== void 0 && /* @__PURE__ */ j("p", {
|
|
1938
|
+
className: "mt-1 gds-text-body text-fg-muted",
|
|
1939
|
+
children: e.description
|
|
1940
|
+
}),
|
|
1941
|
+
e.tags !== void 0 && e.tags.length > 0 && /* @__PURE__ */ j("div", {
|
|
1942
|
+
className: "mt-2 flex flex-wrap gds-gap-xs",
|
|
1943
|
+
children: e.tags.map((e) => /* @__PURE__ */ j(gt, { label: e }, e))
|
|
1944
|
+
})
|
|
1945
|
+
]
|
|
1946
|
+
});
|
|
1947
|
+
}
|
|
1948
|
+
function vt({ column: e, renderItem: t }) {
|
|
1949
|
+
return /* @__PURE__ */ M("div", {
|
|
1950
|
+
className: "flex w-72 shrink-0 flex-col gds-radius-popover bg-bg-secondary/50 gds-pad-x-sm gds-pad-y",
|
|
1951
|
+
children: [/* @__PURE__ */ M("div", {
|
|
1952
|
+
className: "mb-2 flex items-center justify-between px-1",
|
|
1953
|
+
children: [/* @__PURE__ */ j("h3", {
|
|
1954
|
+
className: "gds-text-body font-semibold uppercase tracking-wider text-fg-muted",
|
|
1955
|
+
children: e.title
|
|
1956
|
+
}), /* @__PURE__ */ j("span", {
|
|
1957
|
+
className: "gds-text-body text-fg-muted/60",
|
|
1958
|
+
children: e.items.length
|
|
1959
|
+
})]
|
|
1960
|
+
}), /* @__PURE__ */ M("div", {
|
|
1961
|
+
className: "flex flex-1 flex-col gds-gap-sm overflow-y-auto",
|
|
1962
|
+
children: [e.items.map((e) => /* @__PURE__ */ j("div", { children: t === void 0 ? /* @__PURE__ */ j(_t, { item: e }) : t(e) }, e.id)), e.items.length === 0 && /* @__PURE__ */ j("div", {
|
|
1963
|
+
className: "py-8 text-center gds-text-body text-fg-muted/40",
|
|
1964
|
+
children: "No items"
|
|
1965
|
+
})]
|
|
1966
|
+
})]
|
|
1967
|
+
});
|
|
1968
|
+
}
|
|
1969
|
+
var yt = C(function({ columns: e, renderItem: n, className: r }, i) {
|
|
1970
|
+
return /* @__PURE__ */ j("div", {
|
|
1971
|
+
ref: i,
|
|
1972
|
+
className: t("flex gds-gap overflow-x-auto p-1", r),
|
|
1973
|
+
"data-component": "kanban",
|
|
1974
|
+
children: e.map((e) => /* @__PURE__ */ j(vt, {
|
|
1975
|
+
column: e,
|
|
1976
|
+
renderItem: n
|
|
1977
|
+
}, e.id))
|
|
1978
|
+
});
|
|
1979
|
+
});
|
|
1980
|
+
//#endregion
|
|
1981
|
+
//#region src/l5-organisms/markdown-parser.ts
|
|
1982
|
+
function bt(e) {
|
|
1983
|
+
return e.replace(/<script[\s\S]*?<\/script>/gi, "").replace(/<script[^>]*>/gi, "").replace(/\son\w+\s*=\s*"[^"]*"/gi, "").replace(/\son\w+\s*=\s*'[^']*'/gi, "").replace(/\son\w+\s*=\s*[^\s>]*/gi, "");
|
|
1984
|
+
}
|
|
1985
|
+
function G(e) {
|
|
1986
|
+
return e.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);
|
|
1987
|
+
}
|
|
1988
|
+
function K(e) {
|
|
1989
|
+
let t = G(e);
|
|
1990
|
+
return t = t.replace(/`([^`]+)`/g, "<code class=\"rounded bg-bg-tertiary px-1 py-0.5 font-mono text-[0.85em]\">$1</code>"), t = t.replace(/\*\*([^*]+)\*\*/g, "<strong>$1</strong>"), t = t.replace(/\*([^*]+)\*/g, "<em>$1</em>"), t = t.replace(/\[([^\]]+)\]\(([^)]+)\)/g, "<a href=\"$2\" class=\"text-accent hover:underline\" target=\"_blank\" rel=\"noopener noreferrer\">$1</a>"), t;
|
|
1991
|
+
}
|
|
1992
|
+
function xt(e) {
|
|
1993
|
+
let t = e.split("\n"), n = [], r = !1, i = [], a = !1;
|
|
1994
|
+
for (let e = 0; e < t.length; e++) {
|
|
1995
|
+
let o = t[e];
|
|
1996
|
+
if (o.trimStart().startsWith("```")) {
|
|
1997
|
+
r ? (n.push(`<pre class="overflow-auto rounded-lg bg-bg-tertiary p-3 font-mono text-xs"><code>${G(i.join("\n"))}</code></pre>`), i = [], r = !1) : (a &&= (n.push("</ul>"), !1), r = !0);
|
|
1998
|
+
continue;
|
|
1999
|
+
}
|
|
2000
|
+
if (r) {
|
|
2001
|
+
i.push(o);
|
|
2002
|
+
continue;
|
|
2003
|
+
}
|
|
2004
|
+
if (/^---+$/.test(o.trim())) {
|
|
2005
|
+
a &&= (n.push("</ul>"), !1), n.push("<hr class=\"my-3 border-border\" />");
|
|
2006
|
+
continue;
|
|
2007
|
+
}
|
|
2008
|
+
let s = o.match(/^(#{1,6})\s+(.+)$/);
|
|
2009
|
+
if (s !== null) {
|
|
2010
|
+
a &&= (n.push("</ul>"), !1);
|
|
2011
|
+
let e = s[1].length;
|
|
2012
|
+
n.push(`<h${e} class="font-semibold ${[
|
|
2013
|
+
"text-xl",
|
|
2014
|
+
"text-lg",
|
|
2015
|
+
"text-base",
|
|
2016
|
+
"text-sm",
|
|
2017
|
+
"text-xs",
|
|
2018
|
+
"text-xs"
|
|
2019
|
+
][e - 1]} ${[
|
|
2020
|
+
"mt-4 mb-2",
|
|
2021
|
+
"mt-3 mb-2",
|
|
2022
|
+
"mt-3 mb-1",
|
|
2023
|
+
"mt-2 mb-1",
|
|
2024
|
+
"mt-2 mb-1",
|
|
2025
|
+
"mt-2 mb-1"
|
|
2026
|
+
][e - 1]}">${K(s[2])}</h${e}>`);
|
|
2027
|
+
continue;
|
|
2028
|
+
}
|
|
2029
|
+
if (o.trimStart().startsWith("> ")) {
|
|
2030
|
+
a &&= (n.push("</ul>"), !1);
|
|
2031
|
+
let e = o.replace(/^>\s*/, "");
|
|
2032
|
+
n.push(`<blockquote class="border-l-2 border-accent/30 pl-3 text-fg-muted italic">${K(e)}</blockquote>`);
|
|
2033
|
+
continue;
|
|
2034
|
+
}
|
|
2035
|
+
let c = o.match(/^(\s*)[-*]\s+(.+)$/);
|
|
2036
|
+
if (c !== null) {
|
|
2037
|
+
a ||= (n.push("<ul class=\"list-disc pl-5 space-y-0.5\">"), !0), n.push(`<li>${K(c[2])}</li>`);
|
|
2038
|
+
continue;
|
|
2039
|
+
}
|
|
2040
|
+
a &&= (n.push("</ul>"), !1), o.trim() !== "" && n.push(`<p class="mb-2">${K(o)}</p>`);
|
|
2041
|
+
}
|
|
2042
|
+
return r && n.push(`<pre class="overflow-auto rounded-lg bg-bg-tertiary p-3 font-mono text-xs"><code>${G(i.join("\n"))}</code></pre>`), a && n.push("</ul>"), bt(n.join("\n"));
|
|
2043
|
+
}
|
|
2044
|
+
//#endregion
|
|
2045
|
+
//#region src/l5-organisms/markdown-preview.tsx
|
|
2046
|
+
var q = C(function({ content: e, glass: n, className: r }, i) {
|
|
2047
|
+
let a = E(() => xt(e), [e]);
|
|
2048
|
+
return /* @__PURE__ */ j("div", {
|
|
2049
|
+
ref: i,
|
|
2050
|
+
className: t("gds-radius-popover gds-pad-x gds-pad-y text-sm text-fg leading-relaxed", n === !0 && "bg-white/5 backdrop-blur-md", r),
|
|
2051
|
+
"data-component": "markdown-preview",
|
|
2052
|
+
dangerouslySetInnerHTML: { __html: a }
|
|
2053
|
+
});
|
|
2054
|
+
}), St = C(function({ value: e, onChange: n, placeholder: r, className: i }, a) {
|
|
2055
|
+
let o = w((e) => n(e.target.value), [n]);
|
|
2056
|
+
return /* @__PURE__ */ M("div", {
|
|
2057
|
+
ref: a,
|
|
2058
|
+
className: t("flex gap-px rounded-lg border border-border bg-surface overflow-hidden", i),
|
|
2059
|
+
"data-component": "markdown-editor",
|
|
2060
|
+
children: [
|
|
2061
|
+
/* @__PURE__ */ j("textarea", {
|
|
2062
|
+
className: "flex-1 resize-none bg-transparent p-3 text-sm text-fg outline-none font-mono min-h-[200px]",
|
|
2063
|
+
value: e,
|
|
2064
|
+
onChange: o,
|
|
2065
|
+
placeholder: r
|
|
2066
|
+
}),
|
|
2067
|
+
/* @__PURE__ */ j("div", { className: "w-px bg-border" }),
|
|
2068
|
+
/* @__PURE__ */ j("div", {
|
|
2069
|
+
className: "flex-1 overflow-auto min-h-[200px]",
|
|
2070
|
+
children: /* @__PURE__ */ j(q, {
|
|
2071
|
+
content: e,
|
|
2072
|
+
className: "h-full"
|
|
2073
|
+
})
|
|
2074
|
+
})
|
|
2075
|
+
]
|
|
2076
|
+
});
|
|
2077
|
+
}), Ct = C(function({ children: e, columns: n = 3, gap: r = 16, className: i }, a) {
|
|
2078
|
+
return /* @__PURE__ */ j("div", {
|
|
2079
|
+
ref: a,
|
|
2080
|
+
className: t(i),
|
|
2081
|
+
"data-component": "masonry-grid",
|
|
2082
|
+
style: {
|
|
2083
|
+
columnCount: n,
|
|
2084
|
+
columnGap: `${r}px`
|
|
2085
|
+
},
|
|
2086
|
+
children: x.map(e, (e) => /* @__PURE__ */ j("div", {
|
|
2087
|
+
style: {
|
|
2088
|
+
breakInside: "avoid",
|
|
2089
|
+
marginBottom: `${r}px`
|
|
2090
|
+
},
|
|
2091
|
+
children: e
|
|
2092
|
+
}))
|
|
2093
|
+
});
|
|
2094
|
+
}), wt = C(function({ className: e, emptyMessage: r = "No notifications", glass: i, notifications: a, onClear: o, onDismiss: s, ...c }, l) {
|
|
2095
|
+
let u = a.length > 0;
|
|
2096
|
+
return /* @__PURE__ */ M("div", {
|
|
2097
|
+
ref: l,
|
|
2098
|
+
className: t("flex flex-col gds-radius-popover border border-border", i === !0 ? t(n(i), "border-white/10 bg-bg/60") : "bg-surface", e),
|
|
2099
|
+
"data-component": "notification-center",
|
|
2100
|
+
...c,
|
|
2101
|
+
children: [/* @__PURE__ */ M("div", {
|
|
2102
|
+
className: "flex items-center justify-between border-b border-border gds-pad-x gds-pad-y-sm",
|
|
2103
|
+
children: [/* @__PURE__ */ j("span", {
|
|
2104
|
+
className: "gds-text-body font-medium text-fg select-none",
|
|
2105
|
+
children: "Notifications"
|
|
2106
|
+
}), u && o !== void 0 && /* @__PURE__ */ j("button", {
|
|
2107
|
+
type: "button",
|
|
2108
|
+
onClick: o,
|
|
2109
|
+
className: t("gds-text-label text-accent hover:text-accent-hover", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-offset-1 focus-visible:ring-offset-bg"),
|
|
2110
|
+
children: "Clear all"
|
|
2111
|
+
})]
|
|
2112
|
+
}), /* @__PURE__ */ j("div", {
|
|
2113
|
+
className: "flex-1 overflow-y-auto",
|
|
2114
|
+
children: u ? /* @__PURE__ */ j("div", {
|
|
2115
|
+
className: "flex flex-col gds-gap-sm gds-pad",
|
|
2116
|
+
children: a.map((e) => /* @__PURE__ */ j(y, {
|
|
2117
|
+
title: e.title,
|
|
2118
|
+
description: e.message,
|
|
2119
|
+
variant: e.variant ?? "info",
|
|
2120
|
+
onClose: s === void 0 ? void 0 : () => s(e.id)
|
|
2121
|
+
}, e.id))
|
|
2122
|
+
}) : /* @__PURE__ */ j("div", {
|
|
2123
|
+
className: "flex items-center justify-center gds-pad-lg",
|
|
2124
|
+
children: /* @__PURE__ */ j("span", {
|
|
2125
|
+
className: "gds-text-label text-fg-muted",
|
|
2126
|
+
children: r
|
|
2127
|
+
})
|
|
2128
|
+
})
|
|
2129
|
+
})]
|
|
2130
|
+
});
|
|
2131
|
+
}), Tt = {
|
|
2132
|
+
"top-right": "top-4 right-4",
|
|
2133
|
+
"bottom-right": "bottom-4 right-4"
|
|
2134
|
+
}, Et = (e) => e === "info" ? "default" : e ?? "default", Dt = C(function({ toasts: e, onDismiss: n, position: r = "top-right", className: i }, a) {
|
|
2135
|
+
return T(() => {
|
|
2136
|
+
let t = e.map((e) => window.setTimeout(() => n(e.id), 5e3));
|
|
2137
|
+
return () => t.forEach((e) => window.clearTimeout(e));
|
|
2138
|
+
}, [e, n]), e.length === 0 ? null : c(/* @__PURE__ */ j("div", {
|
|
2139
|
+
ref: a,
|
|
2140
|
+
className: t("fixed z-50 flex w-80 flex-col gap-2", Tt[r], i),
|
|
2141
|
+
"data-component": "notification-toast",
|
|
2142
|
+
children: e.map((e) => /* @__PURE__ */ j(b, {
|
|
2143
|
+
title: e.title,
|
|
2144
|
+
description: e.message,
|
|
2145
|
+
variant: Et(e.variant),
|
|
2146
|
+
onClose: () => n(e.id)
|
|
2147
|
+
}, e.id))
|
|
2148
|
+
}));
|
|
2149
|
+
}), Ot = C(function({ children: e, speed: n = .5, direction: r = "vertical", disabled: i = !1, className: a }, o) {
|
|
2150
|
+
let s = D(null), [c, l] = O(0), u = D(0), d = w(() => {
|
|
2151
|
+
u.current === 0 && (u.current = requestAnimationFrame(() => {
|
|
2152
|
+
let e = s.current;
|
|
2153
|
+
if (e !== null) {
|
|
2154
|
+
let t = e.getBoundingClientRect();
|
|
2155
|
+
l(r === "vertical" ? -t.top * n : -t.left * n);
|
|
2156
|
+
}
|
|
2157
|
+
u.current = 0;
|
|
2158
|
+
}));
|
|
2159
|
+
}, [n, r]);
|
|
2160
|
+
T(() => {
|
|
2161
|
+
if (!i) return window.addEventListener("scroll", d, { passive: !0 }), d(), () => {
|
|
2162
|
+
window.removeEventListener("scroll", d), u.current !== 0 && cancelAnimationFrame(u.current);
|
|
2163
|
+
};
|
|
2164
|
+
}, [i, d]);
|
|
2165
|
+
let f = D(!1);
|
|
2166
|
+
T(() => {
|
|
2167
|
+
f.current = window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
2168
|
+
}, []);
|
|
2169
|
+
let p = i || f.current ? void 0 : r === "vertical" ? `translateY(${c}px)` : `translateX(${c}px)`;
|
|
2170
|
+
return /* @__PURE__ */ j("div", {
|
|
2171
|
+
ref: (e) => {
|
|
2172
|
+
s.current = e, typeof o == "function" ? o(e) : o != null && (o.current = e);
|
|
2173
|
+
},
|
|
2174
|
+
className: t("will-change-transform", a),
|
|
2175
|
+
style: p === void 0 ? void 0 : { transform: p },
|
|
2176
|
+
"data-component": "parallax",
|
|
2177
|
+
children: e
|
|
2178
|
+
});
|
|
2179
|
+
}), kt = C(function({ className: e, currency: n = "¥", deductions: r, gross: i, net: a, period: o, ...s }, c) {
|
|
2180
|
+
let l = (e) => `${n}${e.toLocaleString()}`;
|
|
2181
|
+
return /* @__PURE__ */ M("div", {
|
|
2182
|
+
className: t("gds-ctx gds-radius-card border border-border bg-surface gds-pad", e),
|
|
2183
|
+
"data-component": "payslip-card",
|
|
2184
|
+
ref: c,
|
|
2185
|
+
...s,
|
|
2186
|
+
children: [
|
|
2187
|
+
/* @__PURE__ */ j("div", {
|
|
2188
|
+
className: "mb-3 font-semibold text-fg",
|
|
2189
|
+
children: o
|
|
2190
|
+
}),
|
|
2191
|
+
/* @__PURE__ */ M("div", {
|
|
2192
|
+
className: "flex justify-between text-sm",
|
|
2193
|
+
children: [/* @__PURE__ */ j("span", {
|
|
2194
|
+
className: "text-fg-muted",
|
|
2195
|
+
children: "Gross"
|
|
2196
|
+
}), /* @__PURE__ */ j("span", {
|
|
2197
|
+
className: "text-fg",
|
|
2198
|
+
children: l(i)
|
|
2199
|
+
})]
|
|
2200
|
+
}),
|
|
2201
|
+
r.map((e) => /* @__PURE__ */ M("div", {
|
|
2202
|
+
className: "flex justify-between text-sm",
|
|
2203
|
+
children: [/* @__PURE__ */ j("span", {
|
|
2204
|
+
className: "text-fg-muted",
|
|
2205
|
+
children: e.label
|
|
2206
|
+
}), /* @__PURE__ */ M("span", {
|
|
2207
|
+
className: "text-danger",
|
|
2208
|
+
children: ["-", l(e.amount)]
|
|
2209
|
+
})]
|
|
2210
|
+
}, e.label)),
|
|
2211
|
+
/* @__PURE__ */ j("div", { className: "my-2 border-t border-border" }),
|
|
2212
|
+
/* @__PURE__ */ M("div", {
|
|
2213
|
+
className: "flex justify-between font-bold",
|
|
2214
|
+
children: [/* @__PURE__ */ j("span", {
|
|
2215
|
+
className: "text-fg",
|
|
2216
|
+
children: "Net Pay"
|
|
2217
|
+
}), /* @__PURE__ */ j("span", {
|
|
2218
|
+
className: "text-fg",
|
|
2219
|
+
children: l(a)
|
|
2220
|
+
})]
|
|
2221
|
+
})
|
|
2222
|
+
]
|
|
2223
|
+
});
|
|
2224
|
+
}), At = C(function({ roles: e, permissions: n, values: r, onChange: i, readonly: a, className: o, ...s }, c) {
|
|
2225
|
+
return /* @__PURE__ */ j("div", {
|
|
2226
|
+
ref: c,
|
|
2227
|
+
className: t("overflow-auto", o),
|
|
2228
|
+
"data-component": "permission-matrix",
|
|
2229
|
+
...s,
|
|
2230
|
+
children: /* @__PURE__ */ M("table", {
|
|
2231
|
+
className: "w-full border-collapse gds-text-body",
|
|
2232
|
+
children: [/* @__PURE__ */ j("thead", { children: /* @__PURE__ */ M("tr", { children: [/* @__PURE__ */ j("th", {
|
|
2233
|
+
className: "border border-border bg-bg-secondary px-3 py-2 text-left text-fg-muted font-medium select-none",
|
|
2234
|
+
children: "Permission"
|
|
2235
|
+
}), e.map((e) => /* @__PURE__ */ j("th", {
|
|
2236
|
+
className: "border border-border bg-bg-secondary px-3 py-2 text-center text-fg-muted font-medium select-none",
|
|
2237
|
+
children: e
|
|
2238
|
+
}, e))] }) }), /* @__PURE__ */ j("tbody", { children: n.map((t, n) => /* @__PURE__ */ M("tr", { children: [/* @__PURE__ */ j("td", {
|
|
2239
|
+
className: "border border-border px-3 py-2 text-fg select-none",
|
|
2240
|
+
children: t
|
|
2241
|
+
}), e.map((o, s) => {
|
|
2242
|
+
let c = r[n]?.[s] ?? !1;
|
|
2243
|
+
return /* @__PURE__ */ j("td", {
|
|
2244
|
+
className: "border border-border px-3 py-2 text-center",
|
|
2245
|
+
children: a === !0 ? /* @__PURE__ */ j("span", {
|
|
2246
|
+
className: c ? "text-success" : "text-fg-muted",
|
|
2247
|
+
children: c ? "✓" : "—"
|
|
2248
|
+
}) : /* @__PURE__ */ j("input", {
|
|
2249
|
+
type: "checkbox",
|
|
2250
|
+
checked: c,
|
|
2251
|
+
onChange: (e) => i?.(n, s, e.target.checked),
|
|
2252
|
+
className: "cursor-pointer accent-accent",
|
|
2253
|
+
"aria-label": `${t} - ${e[s]}`
|
|
2254
|
+
})
|
|
2255
|
+
}, s);
|
|
2256
|
+
})] }, t)) })]
|
|
2257
|
+
})
|
|
2258
|
+
});
|
|
2259
|
+
}), jt = C(function({ milestones: e, className: n }, r) {
|
|
2260
|
+
let i = e.reduce((e, t, n) => t.completed ? n : e, -1);
|
|
2261
|
+
return /* @__PURE__ */ j("div", {
|
|
2262
|
+
ref: r,
|
|
2263
|
+
className: t("select-none", n),
|
|
2264
|
+
"data-component": "progress-timeline",
|
|
2265
|
+
children: /* @__PURE__ */ M("div", {
|
|
2266
|
+
className: "relative flex items-start justify-between",
|
|
2267
|
+
children: [
|
|
2268
|
+
/* @__PURE__ */ j("div", { className: "absolute top-3 right-4 left-4 h-0.5 bg-border" }),
|
|
2269
|
+
i >= 0 && e.length > 1 && /* @__PURE__ */ j("div", {
|
|
2270
|
+
className: "absolute top-3 left-4 h-0.5 bg-accent",
|
|
2271
|
+
style: { width: `${i / (e.length - 1) * 100}%` }
|
|
2272
|
+
}),
|
|
2273
|
+
e.map((e, n) => /* @__PURE__ */ M("div", {
|
|
2274
|
+
className: "relative z-10 flex flex-col items-center gap-1",
|
|
2275
|
+
children: [
|
|
2276
|
+
/* @__PURE__ */ j("div", {
|
|
2277
|
+
className: t("h-6 w-6 rounded-full border-2 transition-colors", e.completed ? "border-accent bg-accent" : "border-border bg-bg"),
|
|
2278
|
+
"data-completed": e.completed
|
|
2279
|
+
}),
|
|
2280
|
+
/* @__PURE__ */ j("span", {
|
|
2281
|
+
className: "text-xs font-medium text-fg",
|
|
2282
|
+
children: e.label
|
|
2283
|
+
}),
|
|
2284
|
+
/* @__PURE__ */ j("span", {
|
|
2285
|
+
className: "gds-text-body text-fg-muted",
|
|
2286
|
+
children: e.date
|
|
2287
|
+
})
|
|
2288
|
+
]
|
|
2289
|
+
}, n))
|
|
2290
|
+
]
|
|
2291
|
+
})
|
|
2292
|
+
});
|
|
2293
|
+
}), Mt = C(function({ className: e, onChange: n, properties: r }, i) {
|
|
2294
|
+
return /* @__PURE__ */ j("div", {
|
|
2295
|
+
ref: i,
|
|
2296
|
+
className: t("gds-radius-popover border border-border overflow-hidden", e),
|
|
2297
|
+
"data-component": "property-editor",
|
|
2298
|
+
children: r.map((e, i) => /* @__PURE__ */ M("div", {
|
|
2299
|
+
className: t("flex items-center justify-between gds-pad-x gds-pad-y-sm", i < r.length - 1 && "border-b border-border"),
|
|
2300
|
+
children: [/* @__PURE__ */ j("span", {
|
|
2301
|
+
className: "gds-text-body font-medium text-fg-muted",
|
|
2302
|
+
children: e.key
|
|
2303
|
+
}), /* @__PURE__ */ j("div", {
|
|
2304
|
+
className: "text-right",
|
|
2305
|
+
children: e.editable === !0 && n !== void 0 ? /* @__PURE__ */ j(h, {
|
|
2306
|
+
onSave: (t) => n(e.key, t),
|
|
2307
|
+
value: e.value
|
|
2308
|
+
}) : /* @__PURE__ */ j("span", {
|
|
2309
|
+
className: "gds-text-body text-fg",
|
|
2310
|
+
children: e.value
|
|
2311
|
+
})
|
|
2312
|
+
})]
|
|
2313
|
+
}, e.key))
|
|
2314
|
+
});
|
|
2315
|
+
}), Nt = C(function({ className: e, columns: n = 4, links: r, ...a }, o) {
|
|
2316
|
+
return /* @__PURE__ */ j("div", {
|
|
2317
|
+
className: t("grid gap-3", e),
|
|
2318
|
+
"data-component": "quick-links",
|
|
2319
|
+
ref: o,
|
|
2320
|
+
style: { gridTemplateColumns: `repeat(${n}, minmax(0, 1fr))` },
|
|
2321
|
+
...a,
|
|
2322
|
+
children: r.map((e) => /* @__PURE__ */ M(e.href === void 0 ? "button" : "a", {
|
|
2323
|
+
className: t("flex flex-col items-center gap-2 rounded-lg border border-border bg-surface p-4 text-fg transition-colors hover:bg-bg-secondary", i),
|
|
2324
|
+
...e.href === void 0 ? {} : { href: e.href },
|
|
2325
|
+
onClick: e.onClick,
|
|
2326
|
+
children: [e.icon !== void 0 && /* @__PURE__ */ j("div", {
|
|
2327
|
+
className: "text-fg-muted",
|
|
2328
|
+
children: e.icon
|
|
2329
|
+
}), /* @__PURE__ */ j("span", {
|
|
2330
|
+
className: "text-xs font-medium select-none",
|
|
2331
|
+
children: e.label
|
|
2332
|
+
})]
|
|
2333
|
+
}, e.label))
|
|
2334
|
+
});
|
|
2335
|
+
}), Pt = C(function({ className: e, items: n, title: r = "Recent Activity", ...i }, a) {
|
|
2336
|
+
return /* @__PURE__ */ M("div", {
|
|
2337
|
+
className: t("flex flex-col", e),
|
|
2338
|
+
"data-component": "recent-activity",
|
|
2339
|
+
ref: a,
|
|
2340
|
+
...i,
|
|
2341
|
+
children: [/* @__PURE__ */ j("h3", {
|
|
2342
|
+
className: "mb-2 text-xs font-semibold uppercase tracking-wider text-fg-muted",
|
|
2343
|
+
children: r
|
|
2344
|
+
}), /* @__PURE__ */ M("div", {
|
|
2345
|
+
className: "flex flex-col gap-1",
|
|
2346
|
+
children: [n.map((e, t) => /* @__PURE__ */ M("div", {
|
|
2347
|
+
className: "flex items-baseline justify-between gap-2 py-1 text-sm",
|
|
2348
|
+
children: [/* @__PURE__ */ M("div", {
|
|
2349
|
+
className: "min-w-0 truncate",
|
|
2350
|
+
children: [/* @__PURE__ */ j("span", {
|
|
2351
|
+
className: "font-medium text-fg",
|
|
2352
|
+
children: e.user
|
|
2353
|
+
}), /* @__PURE__ */ M("span", {
|
|
2354
|
+
className: "text-fg-muted",
|
|
2355
|
+
children: [" ", e.action]
|
|
2356
|
+
})]
|
|
2357
|
+
}), /* @__PURE__ */ j("span", {
|
|
2358
|
+
className: "shrink-0 text-xs text-fg-muted",
|
|
2359
|
+
children: e.timestamp
|
|
2360
|
+
})]
|
|
2361
|
+
}, t)), n.length === 0 && /* @__PURE__ */ j("p", {
|
|
2362
|
+
className: "py-2 text-center text-xs text-fg-muted",
|
|
2363
|
+
children: "No activity"
|
|
2364
|
+
})]
|
|
2365
|
+
})]
|
|
2366
|
+
});
|
|
2367
|
+
}), Ft = {
|
|
2368
|
+
sm: "sm:flex-row",
|
|
2369
|
+
md: "md:flex-row",
|
|
2370
|
+
lg: "lg:flex-row"
|
|
2371
|
+
}, It = {
|
|
2372
|
+
sm: "gap-2",
|
|
2373
|
+
default: "gap-4",
|
|
2374
|
+
lg: "gap-6"
|
|
2375
|
+
}, Lt = {
|
|
2376
|
+
start: "items-start",
|
|
2377
|
+
center: "items-center",
|
|
2378
|
+
end: "items-end",
|
|
2379
|
+
stretch: "items-stretch"
|
|
2380
|
+
}, Rt = C(function({ children: e, breakpoint: n = "md", gap: r = "default", align: i = "stretch", className: a }, o) {
|
|
2381
|
+
return /* @__PURE__ */ j("div", {
|
|
2382
|
+
ref: o,
|
|
2383
|
+
className: t("flex flex-col", Ft[n], It[r], Lt[i], a),
|
|
2384
|
+
"data-component": "responsive-stack",
|
|
2385
|
+
children: e
|
|
2386
|
+
});
|
|
2387
|
+
}), J = C(function({ striped: e, compact: r, hoverable: i = !0, glass: a, className: o, children: s, ...c }, l) {
|
|
2388
|
+
return /* @__PURE__ */ j("div", {
|
|
2389
|
+
"data-component": "table",
|
|
2390
|
+
"data-striped": e ?? void 0,
|
|
2391
|
+
"data-compact": r ?? void 0,
|
|
2392
|
+
className: t("gds-radius-popover overflow-hidden border border-border", n(a), e && "[&_tbody_tr:nth-child(even)]:bg-bg-secondary/30", r && "[&_th]:px-2 [&_th]:py-1 [&_td]:px-2 [&_td]:py-1", !r && "[&_th]:gds-pad-x [&_th]:py-1.5 [&_td]:gds-pad-x [&_td]:gds-pad-y", i && "[&_tbody_tr]:transition-colors [&_tbody_tr:hover]:bg-bg-tertiary/30", "[&_th]:bg-bg-tertiary/50 [&_th]:text-left [&_th]:font-medium [&_th]:text-fg-muted [&_th]:border-b [&_th]:border-border [&_th]:gds-text-body", "[&_td]:border-b [&_td]:border-border [&_td]:gds-text-body [&_tbody_tr:last-child_td]:border-0", o),
|
|
2393
|
+
children: /* @__PURE__ */ j("table", {
|
|
2394
|
+
ref: l,
|
|
2395
|
+
className: "w-full",
|
|
2396
|
+
...c,
|
|
2397
|
+
children: s
|
|
2398
|
+
})
|
|
2399
|
+
});
|
|
2400
|
+
}), Y = typeof window < "u" ? window.matchMedia("(max-width: 1023px)") : null;
|
|
2401
|
+
function zt(e) {
|
|
2402
|
+
return Y?.addEventListener("change", e), () => Y?.removeEventListener("change", e);
|
|
2403
|
+
}
|
|
2404
|
+
function Bt() {
|
|
2405
|
+
return Y?.matches ?? !1;
|
|
2406
|
+
}
|
|
2407
|
+
var Vt = C(function({ columns: e, data: r, glass: i, className: a, ...o }, s) {
|
|
2408
|
+
return k(zt, Bt, () => !1) ? /* @__PURE__ */ j("div", {
|
|
2409
|
+
className: t("flex flex-col gds-gap", a),
|
|
2410
|
+
"data-component": "responsive-table",
|
|
2411
|
+
"data-mode": "cards",
|
|
2412
|
+
ref: s,
|
|
2413
|
+
...o,
|
|
2414
|
+
children: r.map((r, a) => /* @__PURE__ */ j("div", {
|
|
2415
|
+
className: t("gds-radius-popover border border-border gds-pad", n(i)),
|
|
2416
|
+
children: e.map((e) => /* @__PURE__ */ M("div", {
|
|
2417
|
+
className: "flex justify-between gds-pad-y-sm",
|
|
2418
|
+
children: [/* @__PURE__ */ j("span", {
|
|
2419
|
+
className: "gds-text-caption font-medium text-fg-muted",
|
|
2420
|
+
children: e.header
|
|
2421
|
+
}), /* @__PURE__ */ j("span", {
|
|
2422
|
+
className: "gds-text-body text-fg",
|
|
2423
|
+
children: String(r[e.key] ?? "")
|
|
2424
|
+
})]
|
|
2425
|
+
}, e.key))
|
|
2426
|
+
}, a))
|
|
2427
|
+
}) : /* @__PURE__ */ j("div", {
|
|
2428
|
+
"data-component": "responsive-table",
|
|
2429
|
+
"data-mode": "table",
|
|
2430
|
+
ref: s,
|
|
2431
|
+
...o,
|
|
2432
|
+
children: /* @__PURE__ */ M(J, {
|
|
2433
|
+
glass: i,
|
|
2434
|
+
className: a,
|
|
2435
|
+
children: [/* @__PURE__ */ j("thead", { children: /* @__PURE__ */ j("tr", { children: e.map((e) => /* @__PURE__ */ j("th", { children: e.header }, e.key)) }) }), /* @__PURE__ */ j("tbody", { children: r.map((t, n) => /* @__PURE__ */ j("tr", { children: e.map((e) => /* @__PURE__ */ j("td", { children: String(t[e.key] ?? "") }, e.key)) }, n)) })]
|
|
2436
|
+
})
|
|
2437
|
+
});
|
|
2438
|
+
});
|
|
2439
|
+
//#endregion
|
|
2440
|
+
//#region src/l5-organisms/rich-select-list.tsx
|
|
2441
|
+
function Ht({ options: e, value: r, focusedIndex: i, glass: a, onSelect: o, onFocus: s }) {
|
|
2442
|
+
return /* @__PURE__ */ j("div", {
|
|
2443
|
+
role: "listbox",
|
|
2444
|
+
className: t("absolute z-50 mt-1 w-full gds-radius-popover border border-border bg-bg shadow-lg overflow-auto max-h-60", n(a)),
|
|
2445
|
+
children: e.map((e, n) => /* @__PURE__ */ M("div", {
|
|
2446
|
+
role: "option",
|
|
2447
|
+
"aria-selected": e.value === r,
|
|
2448
|
+
"data-focused": n === i ? "" : void 0,
|
|
2449
|
+
className: t("flex items-start gap-2 px-3 py-2 cursor-pointer transition-colors", e.value === r && "bg-accent/10 text-accent", n === i && "bg-bg-tertiary/50", e.value !== r && n !== i && "hover:bg-bg-tertiary/30"),
|
|
2450
|
+
onClick: () => o(e.value),
|
|
2451
|
+
onMouseEnter: () => s(n),
|
|
2452
|
+
children: [
|
|
2453
|
+
e.icon !== void 0 && /* @__PURE__ */ j("span", {
|
|
2454
|
+
className: "mt-0.5 shrink-0",
|
|
2455
|
+
children: e.icon
|
|
2456
|
+
}),
|
|
2457
|
+
/* @__PURE__ */ M("div", {
|
|
2458
|
+
className: "flex-1 min-w-0",
|
|
2459
|
+
children: [/* @__PURE__ */ j("div", {
|
|
2460
|
+
className: "text-sm truncate",
|
|
2461
|
+
children: e.label
|
|
2462
|
+
}), e.description !== void 0 && /* @__PURE__ */ j("div", {
|
|
2463
|
+
className: "text-xs text-fg-muted truncate",
|
|
2464
|
+
children: e.description
|
|
2465
|
+
})]
|
|
2466
|
+
}),
|
|
2467
|
+
e.badge !== void 0 && /* @__PURE__ */ j("span", {
|
|
2468
|
+
className: "shrink-0 rounded-full bg-bg-tertiary px-2 py-0.5 text-[10px] text-fg-muted",
|
|
2469
|
+
children: e.badge
|
|
2470
|
+
})
|
|
2471
|
+
]
|
|
2472
|
+
}, e.value))
|
|
2473
|
+
});
|
|
2474
|
+
}
|
|
2475
|
+
//#endregion
|
|
2476
|
+
//#region src/l5-organisms/rich-select.tsx
|
|
2477
|
+
var Ut = C(function({ options: e, value: r, onChange: a, placeholder: o, disabled: s, error: c, glass: l, className: d }, f) {
|
|
2478
|
+
let [p, m] = O(!1), [h, g] = O(-1), _ = D(null), v = e.find((e) => e.value === r);
|
|
2479
|
+
T(() => {
|
|
2480
|
+
if (!p) return;
|
|
2481
|
+
function e(e) {
|
|
2482
|
+
_.current !== null && !_.current.contains(e.target) && m(!1);
|
|
2483
|
+
}
|
|
2484
|
+
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
2485
|
+
}, [p]);
|
|
2486
|
+
let y = w((t) => {
|
|
2487
|
+
if (!s) {
|
|
2488
|
+
if (t.key === "Escape") {
|
|
2489
|
+
m(!1);
|
|
2490
|
+
return;
|
|
2491
|
+
}
|
|
2492
|
+
if (!p) {
|
|
2493
|
+
(t.key === "Enter" || t.key === " " || t.key === "ArrowDown") && (t.preventDefault(), m(!0), g(0));
|
|
2494
|
+
return;
|
|
2495
|
+
}
|
|
2496
|
+
t.key === "ArrowDown" ? (t.preventDefault(), g((t) => t < e.length - 1 ? t + 1 : 0)) : t.key === "ArrowUp" ? (t.preventDefault(), g((t) => t > 0 ? t - 1 : e.length - 1)) : t.key === "Enter" && (t.preventDefault(), h >= 0 && h < e.length && (a(e[h].value), m(!1)));
|
|
2497
|
+
}
|
|
2498
|
+
}, [
|
|
2499
|
+
s,
|
|
2500
|
+
p,
|
|
2501
|
+
e,
|
|
2502
|
+
h,
|
|
2503
|
+
a
|
|
2504
|
+
]), b = w((e) => {
|
|
2505
|
+
a(e), m(!1);
|
|
2506
|
+
}, [a]);
|
|
2507
|
+
return /* @__PURE__ */ M("div", {
|
|
2508
|
+
ref: u(f, _),
|
|
2509
|
+
"data-component": "rich-select",
|
|
2510
|
+
"data-state": p ? "open" : "closed",
|
|
2511
|
+
className: t("relative", d),
|
|
2512
|
+
onKeyDown: y,
|
|
2513
|
+
children: [/* @__PURE__ */ M("button", {
|
|
2514
|
+
type: "button",
|
|
2515
|
+
disabled: s,
|
|
2516
|
+
className: t("flex w-full items-center gap-2 gds-radius-input border gds-pad-x gds-h-lg text-sm text-left transition-colors", c ? "border-danger" : "border-border hover:border-fg-muted", s && "opacity-50 cursor-not-allowed", n(l), i),
|
|
2517
|
+
onClick: () => m((e) => !e),
|
|
2518
|
+
"aria-expanded": p,
|
|
2519
|
+
"aria-haspopup": "listbox",
|
|
2520
|
+
children: [v === void 0 ? /* @__PURE__ */ j("span", {
|
|
2521
|
+
className: "flex-1 truncate text-fg-muted",
|
|
2522
|
+
children: o ?? "Select..."
|
|
2523
|
+
}) : /* @__PURE__ */ M(A, { children: [v.icon !== void 0 && /* @__PURE__ */ j("span", {
|
|
2524
|
+
className: "shrink-0",
|
|
2525
|
+
children: v.icon
|
|
2526
|
+
}), /* @__PURE__ */ j("span", {
|
|
2527
|
+
className: "flex-1 truncate text-fg",
|
|
2528
|
+
children: v.label
|
|
2529
|
+
})] }), /* @__PURE__ */ j("svg", {
|
|
2530
|
+
className: "ml-auto h-3 w-3 shrink-0 text-fg-muted",
|
|
2531
|
+
viewBox: "0 0 12 12",
|
|
2532
|
+
fill: "none",
|
|
2533
|
+
stroke: "currentColor",
|
|
2534
|
+
strokeWidth: "2",
|
|
2535
|
+
strokeLinecap: "round",
|
|
2536
|
+
strokeLinejoin: "round",
|
|
2537
|
+
children: /* @__PURE__ */ j("path", { d: "M3 4.5l3 3 3-3" })
|
|
2538
|
+
})]
|
|
2539
|
+
}), p && /* @__PURE__ */ j(Ht, {
|
|
2540
|
+
options: e,
|
|
2541
|
+
value: r,
|
|
2542
|
+
focusedIndex: h,
|
|
2543
|
+
glass: l,
|
|
2544
|
+
onSelect: b,
|
|
2545
|
+
onFocus: g
|
|
2546
|
+
})]
|
|
2547
|
+
});
|
|
2548
|
+
}), Wt = C(function({ results: e, query: n, total: r, onSelect: i, className: s }, c) {
|
|
2549
|
+
return /* @__PURE__ */ M("div", {
|
|
2550
|
+
ref: c,
|
|
2551
|
+
className: t("flex flex-col", s),
|
|
2552
|
+
"data-component": "search-results",
|
|
2553
|
+
children: [r !== void 0 && /* @__PURE__ */ M("div", {
|
|
2554
|
+
className: "gds-pad-x py-2 text-xs text-fg-muted",
|
|
2555
|
+
children: [
|
|
2556
|
+
r,
|
|
2557
|
+
" result",
|
|
2558
|
+
r === 1 ? "" : "s",
|
|
2559
|
+
" found"
|
|
2560
|
+
]
|
|
2561
|
+
}), e.map((e) => /* @__PURE__ */ M("div", {
|
|
2562
|
+
role: i === void 0 ? void 0 : "button",
|
|
2563
|
+
tabIndex: i === void 0 ? void 0 : 0,
|
|
2564
|
+
onClick: i === void 0 ? void 0 : () => i(e.id),
|
|
2565
|
+
onKeyDown: i === void 0 ? void 0 : (t) => {
|
|
2566
|
+
(t.key === "Enter" || t.key === " ") && (t.preventDefault(), i(e.id));
|
|
2567
|
+
},
|
|
2568
|
+
className: t("gds-pad-x gds-pad-y border-b border-border last:border-b-0", i !== void 0 && "cursor-pointer hover:bg-bg-tertiary transition-colors"),
|
|
2569
|
+
children: [/* @__PURE__ */ M("div", {
|
|
2570
|
+
className: "flex items-center gap-2",
|
|
2571
|
+
children: [/* @__PURE__ */ j(o, {
|
|
2572
|
+
text: e.title,
|
|
2573
|
+
query: n,
|
|
2574
|
+
className: "font-medium text-fg gds-text-body"
|
|
2575
|
+
}), e.category !== void 0 && /* @__PURE__ */ j(a, { children: e.category })]
|
|
2576
|
+
}), e.description !== void 0 && /* @__PURE__ */ j(o, {
|
|
2577
|
+
text: e.description,
|
|
2578
|
+
query: n,
|
|
2579
|
+
className: "mt-0.5 text-fg-muted gds-text-caption line-clamp-2"
|
|
2580
|
+
})]
|
|
2581
|
+
}, e.id))]
|
|
2582
|
+
});
|
|
2583
|
+
}), Gt = {
|
|
2584
|
+
healthy: "bg-success",
|
|
2585
|
+
warning: "bg-warning",
|
|
2586
|
+
error: "bg-danger",
|
|
2587
|
+
offline: "bg-fg-muted/40"
|
|
2588
|
+
}, Kt = {
|
|
2589
|
+
healthy: "Healthy",
|
|
2590
|
+
warning: "Warning",
|
|
2591
|
+
error: "Error",
|
|
2592
|
+
offline: "Offline"
|
|
2593
|
+
}, qt = C(function({ name: e, description: n, status: r, metrics: i, tags: a, url: o, className: s }, c) {
|
|
2594
|
+
return /* @__PURE__ */ M("div", {
|
|
2595
|
+
ref: c,
|
|
2596
|
+
className: t("gds-ctx gds-radius-card border border-border bg-surface gds-pad", s),
|
|
2597
|
+
"data-component": "service-card",
|
|
2598
|
+
"data-state": r,
|
|
2599
|
+
children: [
|
|
2600
|
+
/* @__PURE__ */ M("div", {
|
|
2601
|
+
className: "flex items-center gap-2",
|
|
2602
|
+
children: [
|
|
2603
|
+
/* @__PURE__ */ j("span", { className: t("h-2.5 w-2.5 rounded-full", Gt[r]) }),
|
|
2604
|
+
/* @__PURE__ */ j("span", {
|
|
2605
|
+
className: "font-semibold text-fg",
|
|
2606
|
+
children: e
|
|
2607
|
+
}),
|
|
2608
|
+
/* @__PURE__ */ j("span", {
|
|
2609
|
+
className: "ml-auto text-xs text-fg-muted",
|
|
2610
|
+
children: Kt[r]
|
|
2611
|
+
})
|
|
2612
|
+
]
|
|
2613
|
+
}),
|
|
2614
|
+
n !== void 0 && /* @__PURE__ */ j("p", {
|
|
2615
|
+
className: "mt-1.5 gds-text-body text-fg-muted",
|
|
2616
|
+
children: n
|
|
2617
|
+
}),
|
|
2618
|
+
i !== void 0 && i.length > 0 && /* @__PURE__ */ j("div", {
|
|
2619
|
+
className: "mt-3 flex flex-wrap gap-x-4 gap-y-1 text-xs",
|
|
2620
|
+
children: i.map((e) => /* @__PURE__ */ M("div", {
|
|
2621
|
+
className: "flex gap-1",
|
|
2622
|
+
children: [/* @__PURE__ */ j("span", {
|
|
2623
|
+
className: "text-fg-muted",
|
|
2624
|
+
children: e.label
|
|
2625
|
+
}), /* @__PURE__ */ j("span", {
|
|
2626
|
+
className: "font-medium text-fg",
|
|
2627
|
+
children: e.value
|
|
2628
|
+
})]
|
|
2629
|
+
}, e.label))
|
|
2630
|
+
}),
|
|
2631
|
+
(a !== void 0 || o !== void 0) && /* @__PURE__ */ M("div", {
|
|
2632
|
+
className: "mt-3 flex flex-wrap items-center gap-1.5",
|
|
2633
|
+
children: [a?.map((e) => /* @__PURE__ */ j("span", {
|
|
2634
|
+
className: "rounded-full bg-bg-tertiary px-2 py-0.5 text-[10px] text-fg-muted",
|
|
2635
|
+
children: e
|
|
2636
|
+
}, e)), o !== void 0 && /* @__PURE__ */ j("a", {
|
|
2637
|
+
href: o,
|
|
2638
|
+
target: "_blank",
|
|
2639
|
+
rel: "noreferrer",
|
|
2640
|
+
className: "ml-auto text-xs text-accent hover:underline",
|
|
2641
|
+
children: o
|
|
2642
|
+
})]
|
|
2643
|
+
})
|
|
2644
|
+
]
|
|
2645
|
+
});
|
|
2646
|
+
});
|
|
2647
|
+
//#endregion
|
|
2648
|
+
//#region src/l5-organisms/signature-drawing.ts
|
|
2649
|
+
function X(e, t, n) {
|
|
2650
|
+
let r = e.getBoundingClientRect();
|
|
2651
|
+
return {
|
|
2652
|
+
x: (t - r.left) * (e.width / r.width),
|
|
2653
|
+
y: (n - r.top) * (e.height / r.height)
|
|
2654
|
+
};
|
|
2655
|
+
}
|
|
2656
|
+
function Jt(e, t, n) {
|
|
2657
|
+
e.strokeStyle = n.strokeColor, e.lineWidth = n.strokeWidth, e.lineCap = "round", e.lineJoin = "round", e.beginPath(), e.moveTo(t.x, t.y);
|
|
2658
|
+
}
|
|
2659
|
+
function Yt(e, t) {
|
|
2660
|
+
e.lineTo(t.x, t.y), e.stroke();
|
|
2661
|
+
}
|
|
2662
|
+
function Xt(e) {
|
|
2663
|
+
let t = e.getContext("2d");
|
|
2664
|
+
t !== null && t.clearRect(0, 0, e.width, e.height);
|
|
2665
|
+
}
|
|
2666
|
+
function Zt(e) {
|
|
2667
|
+
return e.toDataURL("image/png");
|
|
2668
|
+
}
|
|
2669
|
+
//#endregion
|
|
2670
|
+
//#region src/l5-organisms/signature-pad.tsx
|
|
2671
|
+
var Qt = C(function({ className: e, disabled: n, height: r = 200, onSign: a, strokeColor: o = "var(--gds-fg)", strokeWidth: s = 2, width: c = 400, ...l }, u) {
|
|
2672
|
+
let d = D(null), f = D(!1), [p, m] = O(!0), h = w((e, t) => {
|
|
2673
|
+
if (n === !0) return;
|
|
2674
|
+
let r = d.current;
|
|
2675
|
+
if (r === null) return;
|
|
2676
|
+
let i = r.getContext("2d");
|
|
2677
|
+
i !== null && (f.current = !0, Jt(i, X(r, e, t), {
|
|
2678
|
+
strokeColor: o,
|
|
2679
|
+
strokeWidth: s
|
|
2680
|
+
}));
|
|
2681
|
+
}, [
|
|
2682
|
+
n,
|
|
2683
|
+
o,
|
|
2684
|
+
s
|
|
2685
|
+
]), g = w((e, t) => {
|
|
2686
|
+
if (!f.current) return;
|
|
2687
|
+
let n = d.current;
|
|
2688
|
+
if (n === null) return;
|
|
2689
|
+
let r = n.getContext("2d");
|
|
2690
|
+
r !== null && (Yt(r, X(n, e, t)), m(!1));
|
|
2691
|
+
}, []), _ = w(() => {
|
|
2692
|
+
if (!f.current) return;
|
|
2693
|
+
f.current = !1;
|
|
2694
|
+
let e = d.current;
|
|
2695
|
+
e !== null && a(Zt(e));
|
|
2696
|
+
}, [a]), v = w((e) => {
|
|
2697
|
+
h(e.clientX, e.clientY);
|
|
2698
|
+
}, [h]), y = w((e) => {
|
|
2699
|
+
g(e.clientX, e.clientY);
|
|
2700
|
+
}, [g]), b = w((e) => {
|
|
2701
|
+
e.preventDefault();
|
|
2702
|
+
let t = e.touches[0];
|
|
2703
|
+
t !== void 0 && h(t.clientX, t.clientY);
|
|
2704
|
+
}, [h]), x = w((e) => {
|
|
2705
|
+
e.preventDefault();
|
|
2706
|
+
let t = e.touches[0];
|
|
2707
|
+
t !== void 0 && g(t.clientX, t.clientY);
|
|
2708
|
+
}, [g]), S = w((e) => {
|
|
2709
|
+
e.preventDefault(), _();
|
|
2710
|
+
}, [_]), C = w(() => {
|
|
2711
|
+
let e = d.current;
|
|
2712
|
+
e !== null && (Xt(e), m(!0));
|
|
2713
|
+
}, []);
|
|
2714
|
+
return /* @__PURE__ */ M("div", {
|
|
2715
|
+
className: t("gds-ctx inline-flex flex-col gap-2 gds-radius-popover border border-border bg-surface p-3", n === !0 && "pointer-events-none opacity-40", e),
|
|
2716
|
+
"data-component": "signature-pad",
|
|
2717
|
+
ref: u,
|
|
2718
|
+
...l,
|
|
2719
|
+
children: [/* @__PURE__ */ M("div", {
|
|
2720
|
+
className: "relative",
|
|
2721
|
+
children: [/* @__PURE__ */ j("canvas", {
|
|
2722
|
+
className: "block cursor-crosshair rounded border border-border/50 bg-bg",
|
|
2723
|
+
height: r,
|
|
2724
|
+
onMouseDown: v,
|
|
2725
|
+
onMouseLeave: _,
|
|
2726
|
+
onMouseMove: y,
|
|
2727
|
+
onMouseUp: _,
|
|
2728
|
+
onTouchEnd: S,
|
|
2729
|
+
onTouchMove: x,
|
|
2730
|
+
onTouchStart: b,
|
|
2731
|
+
ref: d,
|
|
2732
|
+
style: {
|
|
2733
|
+
width: c,
|
|
2734
|
+
height: r
|
|
2735
|
+
},
|
|
2736
|
+
width: c
|
|
2737
|
+
}), p && /* @__PURE__ */ j("div", {
|
|
2738
|
+
className: "pointer-events-none absolute inset-0 flex items-end justify-center pb-4",
|
|
2739
|
+
children: /* @__PURE__ */ j("span", {
|
|
2740
|
+
className: "select-none text-xs text-fg-muted/50",
|
|
2741
|
+
children: "Sign above"
|
|
2742
|
+
})
|
|
2743
|
+
})]
|
|
2744
|
+
}), /* @__PURE__ */ j("div", {
|
|
2745
|
+
className: "flex justify-end",
|
|
2746
|
+
children: /* @__PURE__ */ j("button", {
|
|
2747
|
+
className: t("rounded px-2.5 py-1 text-xs text-fg-muted transition-colors hover:bg-fg-muted/10 hover:text-fg", i),
|
|
2748
|
+
onClick: C,
|
|
2749
|
+
type: "button",
|
|
2750
|
+
children: "Clear"
|
|
2751
|
+
})
|
|
2752
|
+
})]
|
|
2753
|
+
});
|
|
2754
|
+
});
|
|
2755
|
+
//#endregion
|
|
2756
|
+
//#region src/l5-organisms/sortable-list.tsx
|
|
2757
|
+
function $t() {
|
|
2758
|
+
return /* @__PURE__ */ M("svg", {
|
|
2759
|
+
className: "h-4 w-4 text-fg-muted/50",
|
|
2760
|
+
fill: "currentColor",
|
|
2761
|
+
viewBox: "0 0 16 16",
|
|
2762
|
+
children: [
|
|
2763
|
+
/* @__PURE__ */ j("circle", {
|
|
2764
|
+
cx: "5",
|
|
2765
|
+
cy: "3",
|
|
2766
|
+
r: "1.2"
|
|
2767
|
+
}),
|
|
2768
|
+
/* @__PURE__ */ j("circle", {
|
|
2769
|
+
cx: "11",
|
|
2770
|
+
cy: "3",
|
|
2771
|
+
r: "1.2"
|
|
2772
|
+
}),
|
|
2773
|
+
/* @__PURE__ */ j("circle", {
|
|
2774
|
+
cx: "5",
|
|
2775
|
+
cy: "8",
|
|
2776
|
+
r: "1.2"
|
|
2777
|
+
}),
|
|
2778
|
+
/* @__PURE__ */ j("circle", {
|
|
2779
|
+
cx: "11",
|
|
2780
|
+
cy: "8",
|
|
2781
|
+
r: "1.2"
|
|
2782
|
+
}),
|
|
2783
|
+
/* @__PURE__ */ j("circle", {
|
|
2784
|
+
cx: "5",
|
|
2785
|
+
cy: "13",
|
|
2786
|
+
r: "1.2"
|
|
2787
|
+
}),
|
|
2788
|
+
/* @__PURE__ */ j("circle", {
|
|
2789
|
+
cx: "11",
|
|
2790
|
+
cy: "13",
|
|
2791
|
+
r: "1.2"
|
|
2792
|
+
})
|
|
2793
|
+
]
|
|
2794
|
+
});
|
|
2795
|
+
}
|
|
2796
|
+
var en = C(function({ className: e, disabled: n, itemClassName: r, items: i, onReorder: a, ...o }, s) {
|
|
2797
|
+
let [c, l] = O(null), [u, d] = O(null);
|
|
2798
|
+
function f(e) {
|
|
2799
|
+
n || l(e);
|
|
2800
|
+
}
|
|
2801
|
+
function p(e, t) {
|
|
2802
|
+
e.preventDefault(), d(t);
|
|
2803
|
+
}
|
|
2804
|
+
function m() {
|
|
2805
|
+
d(null);
|
|
2806
|
+
}
|
|
2807
|
+
function h(e, t) {
|
|
2808
|
+
if (e.preventDefault(), c === null || c === t) {
|
|
2809
|
+
l(null), d(null);
|
|
2810
|
+
return;
|
|
2811
|
+
}
|
|
2812
|
+
let n = [...i], [r] = n.splice(c, 1);
|
|
2813
|
+
r !== void 0 && n.splice(t, 0, r), a(n), l(null), d(null);
|
|
2814
|
+
}
|
|
2815
|
+
function g() {
|
|
2816
|
+
l(null), d(null);
|
|
2817
|
+
}
|
|
2818
|
+
return /* @__PURE__ */ j("div", {
|
|
2819
|
+
className: t("flex flex-col", e),
|
|
2820
|
+
"data-component": "sortable-list",
|
|
2821
|
+
ref: s,
|
|
2822
|
+
...o,
|
|
2823
|
+
children: i.map((e, i) => /* @__PURE__ */ M("div", {
|
|
2824
|
+
className: t("flex items-center gds-gap border-b border-border px-2 py-2 transition-opacity", c === i && "opacity-50", u === i && "border-t-2 border-t-accent", n !== !0 && "cursor-grab active:cursor-grabbing", n === !0 && "pointer-events-none opacity-60", r),
|
|
2825
|
+
"data-item-id": e.id,
|
|
2826
|
+
draggable: n !== !0,
|
|
2827
|
+
onDragEnd: g,
|
|
2828
|
+
onDragLeave: m,
|
|
2829
|
+
onDragOver: (e) => p(e, i),
|
|
2830
|
+
onDragStart: () => f(i),
|
|
2831
|
+
onDrop: (e) => h(e, i),
|
|
2832
|
+
children: [n !== !0 && /* @__PURE__ */ j("span", {
|
|
2833
|
+
className: "flex-shrink-0 select-none",
|
|
2834
|
+
children: /* @__PURE__ */ j($t, {})
|
|
2835
|
+
}), /* @__PURE__ */ j("div", {
|
|
2836
|
+
className: "flex-1",
|
|
2837
|
+
children: e.content
|
|
2838
|
+
})]
|
|
2839
|
+
}, e.id))
|
|
2840
|
+
});
|
|
2841
|
+
}), tn = C(function({ columns: e, data: n, defaultSort: r, className: i, ...a }, o) {
|
|
2842
|
+
let [s, c] = O(r), l = E(() => s === void 0 ? n : [...n].sort((e, t) => {
|
|
2843
|
+
let n = String(e[s.key] ?? ""), r = String(t[s.key] ?? ""), i = n.localeCompare(r, void 0, { numeric: !0 });
|
|
2844
|
+
return s.dir === "asc" ? i : -i;
|
|
2845
|
+
}), [n, s]);
|
|
2846
|
+
function u(e) {
|
|
2847
|
+
s?.key === e ? c({
|
|
2848
|
+
key: e,
|
|
2849
|
+
dir: s.dir === "asc" ? "desc" : "asc"
|
|
2850
|
+
}) : c({
|
|
2851
|
+
key: e,
|
|
2852
|
+
dir: "asc"
|
|
2853
|
+
});
|
|
2854
|
+
}
|
|
2855
|
+
return /* @__PURE__ */ j("div", {
|
|
2856
|
+
ref: o,
|
|
2857
|
+
className: t("overflow-hidden rounded-lg border border-border", i),
|
|
2858
|
+
"data-component": "sortable-table",
|
|
2859
|
+
...a,
|
|
2860
|
+
children: /* @__PURE__ */ M("table", {
|
|
2861
|
+
className: "w-full text-left gds-text",
|
|
2862
|
+
children: [/* @__PURE__ */ j("thead", { children: /* @__PURE__ */ j("tr", {
|
|
2863
|
+
className: "border-b border-border bg-bg-tertiary/50",
|
|
2864
|
+
children: e.map((e) => /* @__PURE__ */ j("th", {
|
|
2865
|
+
className: t("px-3 py-1.5 font-medium text-fg-muted", e.sortable !== !1 && "cursor-pointer select-none hover:text-fg"),
|
|
2866
|
+
onClick: e.sortable === !1 ? void 0 : () => u(e.key),
|
|
2867
|
+
children: /* @__PURE__ */ M("span", {
|
|
2868
|
+
className: "inline-flex items-center gap-1",
|
|
2869
|
+
children: [e.header, s?.key === e.key && /* @__PURE__ */ j("span", {
|
|
2870
|
+
className: "text-[10px]",
|
|
2871
|
+
children: s.dir === "asc" ? "▲" : "▼"
|
|
2872
|
+
})]
|
|
2873
|
+
})
|
|
2874
|
+
}, e.key))
|
|
2875
|
+
}) }), /* @__PURE__ */ j("tbody", { children: l.map((t, n) => /* @__PURE__ */ j("tr", {
|
|
2876
|
+
className: "border-b border-border last:border-0 transition-colors hover:bg-bg-tertiary/30",
|
|
2877
|
+
children: e.map((e) => /* @__PURE__ */ j("td", {
|
|
2878
|
+
className: "px-3 py-1.5 text-fg",
|
|
2879
|
+
children: String(t[e.key] ?? "")
|
|
2880
|
+
}, e.key))
|
|
2881
|
+
}, n)) })]
|
|
2882
|
+
})
|
|
2883
|
+
});
|
|
2884
|
+
});
|
|
2885
|
+
//#endregion
|
|
2886
|
+
//#region src/l5-organisms/spotlight.tsx
|
|
2887
|
+
function nn(e, t) {
|
|
2888
|
+
let [n, r] = O(null);
|
|
2889
|
+
return T(() => {
|
|
2890
|
+
if (!t) {
|
|
2891
|
+
r(null);
|
|
2892
|
+
return;
|
|
2893
|
+
}
|
|
2894
|
+
let n = e.current;
|
|
2895
|
+
if (n === null) return;
|
|
2896
|
+
let i = () => {
|
|
2897
|
+
let e = n.getBoundingClientRect();
|
|
2898
|
+
r({
|
|
2899
|
+
top: e.top,
|
|
2900
|
+
left: e.left,
|
|
2901
|
+
width: e.width,
|
|
2902
|
+
height: e.height
|
|
2903
|
+
});
|
|
2904
|
+
};
|
|
2905
|
+
return i(), window.addEventListener("resize", i), window.addEventListener("scroll", i, !0), () => {
|
|
2906
|
+
window.removeEventListener("resize", i), window.removeEventListener("scroll", i, !0);
|
|
2907
|
+
};
|
|
2908
|
+
}, [t, e]), n;
|
|
2909
|
+
}
|
|
2910
|
+
function rn(e, t) {
|
|
2911
|
+
let n = { position: "fixed" };
|
|
2912
|
+
return t === "bottom" ? {
|
|
2913
|
+
...n,
|
|
2914
|
+
top: e.top + e.height + 12,
|
|
2915
|
+
left: e.left
|
|
2916
|
+
} : t === "top" ? {
|
|
2917
|
+
...n,
|
|
2918
|
+
bottom: window.innerHeight - e.top + 12,
|
|
2919
|
+
left: e.left
|
|
2920
|
+
} : t === "left" ? {
|
|
2921
|
+
...n,
|
|
2922
|
+
top: e.top,
|
|
2923
|
+
right: window.innerWidth - e.left + 12
|
|
2924
|
+
} : {
|
|
2925
|
+
...n,
|
|
2926
|
+
top: e.top,
|
|
2927
|
+
left: e.left + e.width + 12
|
|
2928
|
+
};
|
|
2929
|
+
}
|
|
2930
|
+
function an({ active: e, targetRef: n, title: r, description: i, placement: a = "bottom", onClose: o, className: s }) {
|
|
2931
|
+
let l = nn(n, e), u = D(o);
|
|
2932
|
+
u.current = o;
|
|
2933
|
+
let d = w((e) => {
|
|
2934
|
+
e.key === "Escape" && u.current !== void 0 && u.current();
|
|
2935
|
+
}, []);
|
|
2936
|
+
return T(() => {
|
|
2937
|
+
if (e) return window.addEventListener("keydown", d), () => window.removeEventListener("keydown", d);
|
|
2938
|
+
}, [e, d]), !e || l === null ? null : c(/* @__PURE__ */ M("div", {
|
|
2939
|
+
className: t("fixed inset-0 z-[9998]", s),
|
|
2940
|
+
"data-component": "spotlight",
|
|
2941
|
+
onClick: o,
|
|
2942
|
+
children: [/* @__PURE__ */ j("div", {
|
|
2943
|
+
className: "absolute rounded-md",
|
|
2944
|
+
style: {
|
|
2945
|
+
top: l.top - 6,
|
|
2946
|
+
left: l.left - 6,
|
|
2947
|
+
width: l.width + 12,
|
|
2948
|
+
height: l.height + 12,
|
|
2949
|
+
boxShadow: "0 0 0 9999px rgba(0,0,0,0.6)",
|
|
2950
|
+
pointerEvents: "none"
|
|
2951
|
+
}
|
|
2952
|
+
}), /* @__PURE__ */ M("div", {
|
|
2953
|
+
className: "z-[9999] max-w-xs rounded-lg border border-white/10 bg-bg-secondary p-4 shadow-lg",
|
|
2954
|
+
style: rn(l, a),
|
|
2955
|
+
onClick: (e) => e.stopPropagation(),
|
|
2956
|
+
children: [
|
|
2957
|
+
r !== void 0 && /* @__PURE__ */ j("p", {
|
|
2958
|
+
className: "text-sm font-semibold text-fg",
|
|
2959
|
+
children: r
|
|
2960
|
+
}),
|
|
2961
|
+
i !== void 0 && /* @__PURE__ */ j("p", {
|
|
2962
|
+
className: "mt-1 text-xs text-fg-muted",
|
|
2963
|
+
children: i
|
|
2964
|
+
}),
|
|
2965
|
+
o !== void 0 && /* @__PURE__ */ j("button", {
|
|
2966
|
+
className: "mt-3 text-xs font-medium text-accent hover:text-accent/80",
|
|
2967
|
+
onClick: o,
|
|
2968
|
+
children: "Got it"
|
|
2969
|
+
})
|
|
2970
|
+
]
|
|
2971
|
+
})]
|
|
2972
|
+
}));
|
|
2973
|
+
}
|
|
2974
|
+
//#endregion
|
|
2975
|
+
//#region src/l5-organisms/stacked-list.tsx
|
|
2976
|
+
function on({ items: e, header: n, footer: r, onSelect: i, selectedId: a, dividers: o = !0, glass: s, className: c }) {
|
|
2977
|
+
return /* @__PURE__ */ M("div", {
|
|
2978
|
+
"data-component": "stacked-list",
|
|
2979
|
+
className: t("overflow-hidden gds-radius-card border border-border", s === !0 && "bg-white/5 backdrop-blur-md", c),
|
|
2980
|
+
children: [
|
|
2981
|
+
n !== void 0 && /* @__PURE__ */ j("div", {
|
|
2982
|
+
className: "border-b border-border bg-bg-tertiary/30 px-4 py-2.5",
|
|
2983
|
+
children: n
|
|
2984
|
+
}),
|
|
2985
|
+
/* @__PURE__ */ j("div", { children: e.map((n, r) => /* @__PURE__ */ j(g, {
|
|
2986
|
+
icon: n.icon,
|
|
2987
|
+
title: n.title,
|
|
2988
|
+
description: n.description,
|
|
2989
|
+
trailing: n.trailing,
|
|
2990
|
+
active: a === n.id,
|
|
2991
|
+
onClick: i === void 0 ? void 0 : () => i(n.id),
|
|
2992
|
+
className: t(o === !0 && r < e.length - 1 && "border-b border-border/50")
|
|
2993
|
+
}, n.id)) }),
|
|
2994
|
+
r !== void 0 && /* @__PURE__ */ j("div", {
|
|
2995
|
+
className: "border-t border-border px-4 py-2.5",
|
|
2996
|
+
children: r
|
|
2997
|
+
})
|
|
2998
|
+
]
|
|
2999
|
+
});
|
|
3000
|
+
}
|
|
3001
|
+
//#endregion
|
|
3002
|
+
//#region src/l5-organisms/step-form.tsx
|
|
3003
|
+
var sn = C(function({ steps: e, onComplete: n, className: r }, a) {
|
|
3004
|
+
let [o, s] = O(0), c = o === 0, l = o === e.length - 1, u = () => {
|
|
3005
|
+
if (l) {
|
|
3006
|
+
n();
|
|
3007
|
+
return;
|
|
3008
|
+
}
|
|
3009
|
+
s((e) => e + 1);
|
|
3010
|
+
}, d = () => {
|
|
3011
|
+
s((e) => e - 1);
|
|
3012
|
+
};
|
|
3013
|
+
return /* @__PURE__ */ M("div", {
|
|
3014
|
+
ref: a,
|
|
3015
|
+
className: t("flex flex-col gap-6 select-none", r),
|
|
3016
|
+
"data-component": "step-form",
|
|
3017
|
+
children: [
|
|
3018
|
+
/* @__PURE__ */ j("div", {
|
|
3019
|
+
className: "flex items-center gap-2",
|
|
3020
|
+
children: e.map((e, n) => /* @__PURE__ */ M("div", {
|
|
3021
|
+
className: "flex items-center gap-2",
|
|
3022
|
+
children: [n > 0 && /* @__PURE__ */ j("div", { className: t("h-px w-8", n <= o ? "bg-accent" : "bg-border") }), /* @__PURE__ */ M("div", {
|
|
3023
|
+
className: "flex items-center gap-2",
|
|
3024
|
+
children: [/* @__PURE__ */ j("div", {
|
|
3025
|
+
className: t("flex h-6 w-6 items-center justify-center rounded-full text-xs font-medium", n < o && "bg-accent text-accent-fg", n === o && "border-2 border-accent text-accent", n > o && "border border-border text-fg-muted"),
|
|
3026
|
+
children: n < o ? /* @__PURE__ */ j("svg", {
|
|
3027
|
+
width: "12",
|
|
3028
|
+
height: "12",
|
|
3029
|
+
viewBox: "0 0 14 14",
|
|
3030
|
+
fill: "none",
|
|
3031
|
+
stroke: "currentColor",
|
|
3032
|
+
strokeWidth: "2",
|
|
3033
|
+
strokeLinecap: "round",
|
|
3034
|
+
strokeLinejoin: "round",
|
|
3035
|
+
children: /* @__PURE__ */ j("path", { d: "M3 7l3 3 5-6" })
|
|
3036
|
+
}) : n + 1
|
|
3037
|
+
}), /* @__PURE__ */ j("span", {
|
|
3038
|
+
className: t("text-xs", n === o ? "font-medium text-fg" : "text-fg-muted"),
|
|
3039
|
+
children: e.label
|
|
3040
|
+
})]
|
|
3041
|
+
})]
|
|
3042
|
+
}, n))
|
|
3043
|
+
}),
|
|
3044
|
+
/* @__PURE__ */ j("div", {
|
|
3045
|
+
className: "min-h-[120px]",
|
|
3046
|
+
children: e[o].content
|
|
3047
|
+
}),
|
|
3048
|
+
/* @__PURE__ */ M("div", {
|
|
3049
|
+
className: "flex items-center justify-end gap-2",
|
|
3050
|
+
children: [!c && /* @__PURE__ */ j("button", {
|
|
3051
|
+
type: "button",
|
|
3052
|
+
className: t("h-8 gds-radius-button px-3 text-xs font-medium text-fg-muted transition-colors hover:bg-bg-tertiary hover:text-fg", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-offset-1 focus-visible:ring-offset-bg"),
|
|
3053
|
+
onClick: d,
|
|
3054
|
+
children: "Back"
|
|
3055
|
+
}), /* @__PURE__ */ j("button", {
|
|
3056
|
+
type: "button",
|
|
3057
|
+
className: t("h-8 gds-radius-button bg-accent px-3 text-xs font-medium text-accent-fg transition-colors hover:bg-accent/90", i),
|
|
3058
|
+
onClick: u,
|
|
3059
|
+
children: l ? "Finish" : "Next"
|
|
3060
|
+
})]
|
|
3061
|
+
})
|
|
3062
|
+
]
|
|
3063
|
+
});
|
|
3064
|
+
});
|
|
3065
|
+
//#endregion
|
|
3066
|
+
//#region src/l5-organisms/system-health.tsx
|
|
3067
|
+
function cn(e) {
|
|
3068
|
+
return e >= 90 ? "danger" : e >= 70 ? "warning" : "success";
|
|
3069
|
+
}
|
|
3070
|
+
var ln = C(function({ className: e, metrics: n, ...r }, i) {
|
|
3071
|
+
return /* @__PURE__ */ j("div", {
|
|
3072
|
+
className: t("flex flex-col gds-gap", e),
|
|
3073
|
+
"data-component": "system-health",
|
|
3074
|
+
ref: i,
|
|
3075
|
+
...r,
|
|
3076
|
+
children: n.map((e) => {
|
|
3077
|
+
let t = e.max ?? 100, n = t > 0 ? Math.round(e.value / t * 100) : 0;
|
|
3078
|
+
return /* @__PURE__ */ M("div", {
|
|
3079
|
+
className: "flex flex-col gap-1",
|
|
3080
|
+
children: [/* @__PURE__ */ M("div", {
|
|
3081
|
+
className: "flex items-center justify-between gds-text-label",
|
|
3082
|
+
children: [/* @__PURE__ */ j("span", {
|
|
3083
|
+
className: "text-fg",
|
|
3084
|
+
children: e.label
|
|
3085
|
+
}), /* @__PURE__ */ M("span", {
|
|
3086
|
+
className: "text-fg-muted font-mono tabular-nums",
|
|
3087
|
+
children: [
|
|
3088
|
+
e.value,
|
|
3089
|
+
e.unit ?? "",
|
|
3090
|
+
" / ",
|
|
3091
|
+
t,
|
|
3092
|
+
e.unit ?? "",
|
|
3093
|
+
" (",
|
|
3094
|
+
n,
|
|
3095
|
+
"%)"
|
|
3096
|
+
]
|
|
3097
|
+
})]
|
|
3098
|
+
}), /* @__PURE__ */ j(s, {
|
|
3099
|
+
value: n,
|
|
3100
|
+
variant: cn(n),
|
|
3101
|
+
size: "sm"
|
|
3102
|
+
})]
|
|
3103
|
+
}, e.label);
|
|
3104
|
+
})
|
|
3105
|
+
});
|
|
3106
|
+
}), un = C(function({ tags: e, selected: n, onToggle: r, className: i }, a) {
|
|
3107
|
+
let o = new Set(n ?? []);
|
|
3108
|
+
return /* @__PURE__ */ j("div", {
|
|
3109
|
+
ref: a,
|
|
3110
|
+
className: t("flex flex-wrap gap-2", i),
|
|
3111
|
+
"data-component": "tag-cloud",
|
|
3112
|
+
children: e.map((e) => /* @__PURE__ */ M("button", {
|
|
3113
|
+
type: "button",
|
|
3114
|
+
onClick: () => r?.(e.label),
|
|
3115
|
+
className: t("rounded-full px-3 py-1 gds-text-body font-medium transition-colors select-none", o.has(e.label) ? "bg-accent/15 text-accent" : "bg-bg-tertiary text-fg-muted hover:bg-bg-tertiary/80"),
|
|
3116
|
+
children: [e.label, /* @__PURE__ */ j("span", {
|
|
3117
|
+
className: "ml-1.5 text-[10px] opacity-60",
|
|
3118
|
+
children: e.count
|
|
3119
|
+
})]
|
|
3120
|
+
}, e.label))
|
|
3121
|
+
});
|
|
3122
|
+
}), Z = C(function({ className: e, onToggle: n, sections: r, ...i }, a) {
|
|
3123
|
+
return /* @__PURE__ */ j("div", {
|
|
3124
|
+
className: t("flex flex-col gds-gap", e),
|
|
3125
|
+
"data-component": "task-board",
|
|
3126
|
+
ref: a,
|
|
3127
|
+
...i,
|
|
3128
|
+
children: r.map((e) => /* @__PURE__ */ M("div", {
|
|
3129
|
+
className: "rounded-lg border border-border bg-surface gds-pad",
|
|
3130
|
+
children: [/* @__PURE__ */ j("h3", {
|
|
3131
|
+
className: "mb-2 text-xs font-semibold uppercase tracking-wider text-fg-muted",
|
|
3132
|
+
children: e.title
|
|
3133
|
+
}), /* @__PURE__ */ M("div", {
|
|
3134
|
+
className: "flex flex-col gap-0.5",
|
|
3135
|
+
children: [e.items.map((t) => /* @__PURE__ */ j(_, {
|
|
3136
|
+
completed: t.completed,
|
|
3137
|
+
onToggle: n === void 0 ? void 0 : () => n(e.id, t.id),
|
|
3138
|
+
priority: t.priority,
|
|
3139
|
+
title: t.title
|
|
3140
|
+
}, t.id)), e.items.length === 0 && /* @__PURE__ */ j("p", {
|
|
3141
|
+
className: "py-2 text-center text-xs text-fg-muted",
|
|
3142
|
+
children: "No items"
|
|
3143
|
+
})]
|
|
3144
|
+
})]
|
|
3145
|
+
}, e.id))
|
|
3146
|
+
});
|
|
3147
|
+
}), dn = {
|
|
3148
|
+
default: "bg-fg-muted",
|
|
3149
|
+
success: "bg-success",
|
|
3150
|
+
warning: "bg-warning",
|
|
3151
|
+
danger: "bg-danger"
|
|
3152
|
+
}, fn = C(function({ items: e, className: n }, r) {
|
|
3153
|
+
return /* @__PURE__ */ M("div", {
|
|
3154
|
+
ref: r,
|
|
3155
|
+
className: t("relative", n),
|
|
3156
|
+
"data-component": "timeline",
|
|
3157
|
+
children: [/* @__PURE__ */ j("div", { className: "absolute left-[7px] top-2 bottom-2 w-px bg-border" }), /* @__PURE__ */ j("div", {
|
|
3158
|
+
className: "flex flex-col gap-4",
|
|
3159
|
+
children: e.map((e) => {
|
|
3160
|
+
let n = e.variant ?? "default";
|
|
3161
|
+
return /* @__PURE__ */ M("div", {
|
|
3162
|
+
className: "relative flex gds-gap pl-6",
|
|
3163
|
+
children: [/* @__PURE__ */ j("div", {
|
|
3164
|
+
className: "absolute left-0 top-1.5",
|
|
3165
|
+
children: e.icon === void 0 ? /* @__PURE__ */ j("span", { className: t("block h-[15px] w-[15px] gds-radius-badge border-2 border-bg", dn[n]) }) : /* @__PURE__ */ j("span", {
|
|
3166
|
+
className: "flex h-[15px] w-[15px] items-center justify-center text-fg-muted",
|
|
3167
|
+
children: e.icon
|
|
3168
|
+
})
|
|
3169
|
+
}), /* @__PURE__ */ M("div", {
|
|
3170
|
+
className: "min-w-0 flex-1 pb-1",
|
|
3171
|
+
children: [/* @__PURE__ */ M("div", {
|
|
3172
|
+
className: "flex items-baseline justify-between gds-gap-sm",
|
|
3173
|
+
children: [/* @__PURE__ */ j("span", {
|
|
3174
|
+
className: "text-sm font-medium text-fg",
|
|
3175
|
+
children: e.title
|
|
3176
|
+
}), e.date !== void 0 && /* @__PURE__ */ j("span", {
|
|
3177
|
+
className: "shrink-0 gds-text-body text-fg-muted",
|
|
3178
|
+
children: e.date
|
|
3179
|
+
})]
|
|
3180
|
+
}), e.description !== void 0 && /* @__PURE__ */ j("p", {
|
|
3181
|
+
className: "mt-0.5 gds-text-body text-fg-muted",
|
|
3182
|
+
children: e.description
|
|
3183
|
+
})]
|
|
3184
|
+
})]
|
|
3185
|
+
}, e.id);
|
|
3186
|
+
})
|
|
3187
|
+
})]
|
|
3188
|
+
});
|
|
3189
|
+
}), pn = C(function({ steps: e, active: n, onComplete: r, onSkip: a, className: o }, s) {
|
|
3190
|
+
let [c, l] = O(0), [u, d] = O(!0), [f, p] = O(null), m = D(null);
|
|
3191
|
+
T(() => {
|
|
3192
|
+
if (!n) return;
|
|
3193
|
+
l(0), d(!0);
|
|
3194
|
+
let e = setTimeout(() => d(!1), 300);
|
|
3195
|
+
return () => clearTimeout(e);
|
|
3196
|
+
}, [n]), T(() => {
|
|
3197
|
+
if (!n) return;
|
|
3198
|
+
let t = e[c];
|
|
3199
|
+
if (t?.target === void 0) {
|
|
3200
|
+
p(null);
|
|
3201
|
+
return;
|
|
3202
|
+
}
|
|
3203
|
+
try {
|
|
3204
|
+
let e = document.querySelector(t.target);
|
|
3205
|
+
e === null ? p(null) : (p(e.getBoundingClientRect()), e.scrollIntoView({
|
|
3206
|
+
block: "nearest",
|
|
3207
|
+
behavior: "smooth"
|
|
3208
|
+
}));
|
|
3209
|
+
} catch {
|
|
3210
|
+
p(null);
|
|
3211
|
+
}
|
|
3212
|
+
}, [
|
|
3213
|
+
n,
|
|
3214
|
+
c,
|
|
3215
|
+
e
|
|
3216
|
+
]);
|
|
3217
|
+
let h = w(() => {
|
|
3218
|
+
if (c >= e.length - 1) {
|
|
3219
|
+
r();
|
|
3220
|
+
return;
|
|
3221
|
+
}
|
|
3222
|
+
d(!0), l((e) => e + 1), setTimeout(() => d(!1), 200);
|
|
3223
|
+
}, [
|
|
3224
|
+
c,
|
|
3225
|
+
e.length,
|
|
3226
|
+
r
|
|
3227
|
+
]), g = w(() => {
|
|
3228
|
+
c <= 0 || (d(!0), l((e) => e - 1), setTimeout(() => d(!1), 200));
|
|
3229
|
+
}, [c]), _ = w(() => {
|
|
3230
|
+
a?.();
|
|
3231
|
+
}, [a]);
|
|
3232
|
+
if (T(() => {
|
|
3233
|
+
if (!n) return;
|
|
3234
|
+
let e = (e) => {
|
|
3235
|
+
e.key === "Escape" && _(), e.key === "ArrowRight" && h(), e.key === "ArrowLeft" && g();
|
|
3236
|
+
};
|
|
3237
|
+
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
3238
|
+
}, [
|
|
3239
|
+
n,
|
|
3240
|
+
h,
|
|
3241
|
+
g,
|
|
3242
|
+
_
|
|
3243
|
+
]), !n) return null;
|
|
3244
|
+
let v = e[c];
|
|
3245
|
+
if (v === void 0) return null;
|
|
3246
|
+
let y = c === 0, b = c === e.length - 1, x = (c + 1) / e.length * 100, S = (() => {
|
|
3247
|
+
if (f === null) return;
|
|
3248
|
+
let e = v.placement ?? "bottom";
|
|
3249
|
+
return e === "bottom" ? {
|
|
3250
|
+
position: "fixed",
|
|
3251
|
+
top: `${f.bottom + 16}px`,
|
|
3252
|
+
left: `${Math.max(16, f.left + f.width / 2 - 200)}px`
|
|
3253
|
+
} : e === "top" ? {
|
|
3254
|
+
position: "fixed",
|
|
3255
|
+
bottom: `${window.innerHeight - f.top + 16}px`,
|
|
3256
|
+
left: `${Math.max(16, f.left + f.width / 2 - 200)}px`
|
|
3257
|
+
} : e === "right" ? {
|
|
3258
|
+
position: "fixed",
|
|
3259
|
+
top: `${Math.max(16, f.top + f.height / 2 - 80)}px`,
|
|
3260
|
+
left: `${f.right + 16}px`
|
|
3261
|
+
} : {
|
|
3262
|
+
position: "fixed",
|
|
3263
|
+
top: `${Math.max(16, f.top + f.height / 2 - 80)}px`,
|
|
3264
|
+
right: `${window.innerWidth - f.left + 16}px`
|
|
3265
|
+
};
|
|
3266
|
+
})();
|
|
3267
|
+
return /* @__PURE__ */ M("div", {
|
|
3268
|
+
ref: s,
|
|
3269
|
+
className: t("fixed inset-0 z-50", o),
|
|
3270
|
+
"data-component": "tour",
|
|
3271
|
+
children: [
|
|
3272
|
+
/* @__PURE__ */ M("svg", {
|
|
3273
|
+
className: "absolute inset-0 h-full w-full",
|
|
3274
|
+
style: { pointerEvents: "none" },
|
|
3275
|
+
children: [/* @__PURE__ */ j("defs", { children: /* @__PURE__ */ M("mask", {
|
|
3276
|
+
id: "tour-mask",
|
|
3277
|
+
children: [/* @__PURE__ */ j("rect", {
|
|
3278
|
+
fill: "white",
|
|
3279
|
+
height: "100%",
|
|
3280
|
+
width: "100%",
|
|
3281
|
+
x: "0",
|
|
3282
|
+
y: "0"
|
|
3283
|
+
}), f !== null && /* @__PURE__ */ j("rect", {
|
|
3284
|
+
fill: "black",
|
|
3285
|
+
height: f.height + 16,
|
|
3286
|
+
rx: "8",
|
|
3287
|
+
width: f.width + 16,
|
|
3288
|
+
x: f.left - 8,
|
|
3289
|
+
y: f.top - 8
|
|
3290
|
+
})]
|
|
3291
|
+
}) }), /* @__PURE__ */ j("rect", {
|
|
3292
|
+
className: "fill-fg/40",
|
|
3293
|
+
height: "100%",
|
|
3294
|
+
mask: "url(#tour-mask)",
|
|
3295
|
+
width: "100%",
|
|
3296
|
+
x: "0",
|
|
3297
|
+
y: "0"
|
|
3298
|
+
})]
|
|
3299
|
+
}),
|
|
3300
|
+
f !== null && /* @__PURE__ */ j("div", {
|
|
3301
|
+
className: "pointer-events-none fixed gds-radius ring-2 ring-accent ring-offset-2 ring-offset-transparent transition-all duration-300",
|
|
3302
|
+
style: {
|
|
3303
|
+
top: f.top - 4,
|
|
3304
|
+
left: f.left - 4,
|
|
3305
|
+
width: f.width + 8,
|
|
3306
|
+
height: f.height + 8
|
|
3307
|
+
}
|
|
3308
|
+
}),
|
|
3309
|
+
/* @__PURE__ */ M("div", {
|
|
3310
|
+
ref: m,
|
|
3311
|
+
className: t("w-96 gds-radius border border-border bg-surface shadow-2xl transition-all duration-200 select-none", u ? "scale-95 opacity-0" : "scale-100 opacity-100", f === null && "fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2"),
|
|
3312
|
+
role: "dialog",
|
|
3313
|
+
style: S,
|
|
3314
|
+
children: [
|
|
3315
|
+
/* @__PURE__ */ j("div", {
|
|
3316
|
+
className: "h-1 overflow-hidden rounded-t-xl bg-bg-tertiary",
|
|
3317
|
+
children: /* @__PURE__ */ j("div", {
|
|
3318
|
+
className: "h-full bg-accent transition-all duration-300",
|
|
3319
|
+
style: { width: `${x}%` }
|
|
3320
|
+
})
|
|
3321
|
+
}),
|
|
3322
|
+
/* @__PURE__ */ M("div", {
|
|
3323
|
+
className: "flex items-center justify-between px-5 pt-4 pb-1",
|
|
3324
|
+
children: [/* @__PURE__ */ M("span", {
|
|
3325
|
+
className: "text-[10px] tracking-widest text-fg-muted/40 uppercase",
|
|
3326
|
+
children: [
|
|
3327
|
+
"Step ",
|
|
3328
|
+
c + 1,
|
|
3329
|
+
" of ",
|
|
3330
|
+
e.length
|
|
3331
|
+
]
|
|
3332
|
+
}), a !== void 0 && /* @__PURE__ */ j("button", {
|
|
3333
|
+
type: "button",
|
|
3334
|
+
className: t("gds-radius-button p-1 text-fg-muted/40 transition-colors hover:text-fg", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-offset-1 focus-visible:ring-offset-bg"),
|
|
3335
|
+
onClick: _,
|
|
3336
|
+
"aria-label": "Close tour",
|
|
3337
|
+
children: /* @__PURE__ */ j("svg", {
|
|
3338
|
+
width: "16",
|
|
3339
|
+
height: "16",
|
|
3340
|
+
viewBox: "0 0 16 16",
|
|
3341
|
+
fill: "none",
|
|
3342
|
+
stroke: "currentColor",
|
|
3343
|
+
strokeWidth: "2",
|
|
3344
|
+
strokeLinecap: "round",
|
|
3345
|
+
children: /* @__PURE__ */ j("path", { d: "M4 4l8 8M12 4l-8 8" })
|
|
3346
|
+
})
|
|
3347
|
+
})]
|
|
3348
|
+
}),
|
|
3349
|
+
/* @__PURE__ */ M("div", {
|
|
3350
|
+
className: "px-5 pb-2",
|
|
3351
|
+
children: [
|
|
3352
|
+
/* @__PURE__ */ j("div", {
|
|
3353
|
+
className: "text-base font-semibold text-fg",
|
|
3354
|
+
children: v.title
|
|
3355
|
+
}),
|
|
3356
|
+
/* @__PURE__ */ j("p", {
|
|
3357
|
+
className: "mt-2 text-sm leading-relaxed text-fg-muted",
|
|
3358
|
+
children: v.description
|
|
3359
|
+
}),
|
|
3360
|
+
v.image !== void 0 && /* @__PURE__ */ j("div", {
|
|
3361
|
+
className: "mt-3 overflow-hidden gds-radius border border-border/30",
|
|
3362
|
+
children: /* @__PURE__ */ j("img", {
|
|
3363
|
+
alt: v.title,
|
|
3364
|
+
className: "w-full",
|
|
3365
|
+
src: v.image
|
|
3366
|
+
})
|
|
3367
|
+
})
|
|
3368
|
+
]
|
|
3369
|
+
}),
|
|
3370
|
+
/* @__PURE__ */ M("div", {
|
|
3371
|
+
className: "flex items-center justify-between px-5 pt-2 pb-4",
|
|
3372
|
+
children: [/* @__PURE__ */ j("div", {
|
|
3373
|
+
className: "flex gap-1.5",
|
|
3374
|
+
children: e.map((e, n) => /* @__PURE__ */ j("button", {
|
|
3375
|
+
type: "button",
|
|
3376
|
+
className: t("h-2 rounded-full transition-all", n === c ? "w-5 bg-accent" : "w-2 bg-fg-muted/20 hover:bg-fg-muted/40"),
|
|
3377
|
+
onClick: () => {
|
|
3378
|
+
d(!0), l(n), setTimeout(() => d(!1), 200);
|
|
3379
|
+
}
|
|
3380
|
+
}, n))
|
|
3381
|
+
}), /* @__PURE__ */ M("div", {
|
|
3382
|
+
className: "flex items-center gap-2",
|
|
3383
|
+
children: [!y && /* @__PURE__ */ M("button", {
|
|
3384
|
+
type: "button",
|
|
3385
|
+
className: t("flex h-8 items-center gap-1 gds-radius-button px-3 text-xs text-fg-muted transition-colors hover:bg-bg-tertiary hover:text-fg", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-offset-1 focus-visible:ring-offset-bg"),
|
|
3386
|
+
onClick: g,
|
|
3387
|
+
children: [/* @__PURE__ */ j("svg", {
|
|
3388
|
+
width: "14",
|
|
3389
|
+
height: "14",
|
|
3390
|
+
viewBox: "0 0 16 16",
|
|
3391
|
+
fill: "none",
|
|
3392
|
+
stroke: "currentColor",
|
|
3393
|
+
strokeWidth: "1.5",
|
|
3394
|
+
strokeLinecap: "round",
|
|
3395
|
+
strokeLinejoin: "round",
|
|
3396
|
+
children: /* @__PURE__ */ j("path", { d: "M10 3L5 8l5 5" })
|
|
3397
|
+
}), "Back"]
|
|
3398
|
+
}), /* @__PURE__ */ M("button", {
|
|
3399
|
+
type: "button",
|
|
3400
|
+
className: t("flex h-8 items-center gap-1 gds-radius-button bg-accent px-4 text-xs font-medium text-accent-fg transition-colors hover:bg-accent/90", i),
|
|
3401
|
+
onClick: h,
|
|
3402
|
+
children: [b ? "Done" : "Next", !b && /* @__PURE__ */ j("svg", {
|
|
3403
|
+
width: "14",
|
|
3404
|
+
height: "14",
|
|
3405
|
+
viewBox: "0 0 16 16",
|
|
3406
|
+
fill: "none",
|
|
3407
|
+
stroke: "currentColor",
|
|
3408
|
+
strokeWidth: "1.5",
|
|
3409
|
+
strokeLinecap: "round",
|
|
3410
|
+
strokeLinejoin: "round",
|
|
3411
|
+
children: /* @__PURE__ */ j("path", { d: "M6 3l5 5-5 5" })
|
|
3412
|
+
})]
|
|
3413
|
+
})]
|
|
3414
|
+
})]
|
|
3415
|
+
})
|
|
3416
|
+
]
|
|
3417
|
+
})
|
|
3418
|
+
]
|
|
3419
|
+
});
|
|
3420
|
+
});
|
|
3421
|
+
//#endregion
|
|
3422
|
+
//#region src/l5-organisms/transaction-list.tsx
|
|
3423
|
+
function mn(e, t) {
|
|
3424
|
+
return `${e >= 0 ? "+" : ""}${t}${Math.abs(e).toLocaleString()}`;
|
|
3425
|
+
}
|
|
3426
|
+
var hn = C(function({ className: e, transactions: n, ...r }, i) {
|
|
3427
|
+
return /* @__PURE__ */ j("div", {
|
|
3428
|
+
className: t("flex flex-col divide-y divide-border", e),
|
|
3429
|
+
"data-component": "transaction-list",
|
|
3430
|
+
ref: i,
|
|
3431
|
+
...r,
|
|
3432
|
+
children: n.map((e) => {
|
|
3433
|
+
let n = e.currency ?? "¥", r = e.amount >= 0;
|
|
3434
|
+
return /* @__PURE__ */ M("div", {
|
|
3435
|
+
className: "flex items-center justify-between px-3 py-2.5",
|
|
3436
|
+
children: [/* @__PURE__ */ M("div", {
|
|
3437
|
+
className: "flex flex-col gap-0.5",
|
|
3438
|
+
children: [/* @__PURE__ */ j("span", {
|
|
3439
|
+
className: "text-sm font-medium text-fg",
|
|
3440
|
+
children: e.description
|
|
3441
|
+
}), /* @__PURE__ */ j("span", {
|
|
3442
|
+
className: "text-xs text-fg-muted",
|
|
3443
|
+
children: e.date
|
|
3444
|
+
})]
|
|
3445
|
+
}), /* @__PURE__ */ j("span", {
|
|
3446
|
+
className: t("text-sm font-semibold tabular-nums", r ? "text-success" : "text-danger"),
|
|
3447
|
+
children: mn(e.amount, n)
|
|
3448
|
+
})]
|
|
3449
|
+
}, e.id);
|
|
3450
|
+
})
|
|
3451
|
+
});
|
|
3452
|
+
});
|
|
3453
|
+
//#endregion
|
|
3454
|
+
//#region src/l5-organisms/tree.tsx
|
|
3455
|
+
function gn({ expanded: e }) {
|
|
3456
|
+
return /* @__PURE__ */ j("svg", {
|
|
3457
|
+
className: t("h-3 w-3 shrink-0 text-fg-muted transition-transform", e && "rotate-90"),
|
|
3458
|
+
viewBox: "0 0 12 12",
|
|
3459
|
+
fill: "currentColor",
|
|
3460
|
+
children: /* @__PURE__ */ j("path", { d: "M4 2L8 6L4 10V2Z" })
|
|
3461
|
+
});
|
|
3462
|
+
}
|
|
3463
|
+
function Q({ node: e, depth: n, selected: r, expanded: a, onToggle: o, onSelect: s }) {
|
|
3464
|
+
let c = e.children !== void 0 && e.children.length > 0, l = a.has(e.id), u = r === e.id, d = e.disabled === !0;
|
|
3465
|
+
return /* @__PURE__ */ M("div", { children: [/* @__PURE__ */ M("button", {
|
|
3466
|
+
className: t("flex w-full items-center gds-gap-sm gds-radius-button gds-pad-x-sm gds-pad-y-sm text-sm select-none", u ? "bg-accent/10 text-accent" : "text-fg hover:bg-bg-secondary", d && "cursor-not-allowed opacity-50", i),
|
|
3467
|
+
style: { paddingLeft: `${n * 16 + 8}px` },
|
|
3468
|
+
onClick: () => {
|
|
3469
|
+
d || (c && o(e.id), s !== void 0 && s(e.id));
|
|
3470
|
+
},
|
|
3471
|
+
disabled: d,
|
|
3472
|
+
"data-state": u ? "selected" : void 0,
|
|
3473
|
+
children: [
|
|
3474
|
+
c ? /* @__PURE__ */ j(gn, { expanded: l }) : /* @__PURE__ */ j("span", { className: "h-3 w-3 shrink-0" }),
|
|
3475
|
+
e.icon !== void 0 && /* @__PURE__ */ j("span", {
|
|
3476
|
+
className: "shrink-0 text-fg-muted",
|
|
3477
|
+
children: e.icon
|
|
3478
|
+
}),
|
|
3479
|
+
/* @__PURE__ */ j("span", {
|
|
3480
|
+
className: "truncate",
|
|
3481
|
+
children: e.label
|
|
3482
|
+
})
|
|
3483
|
+
]
|
|
3484
|
+
}), c && l && /* @__PURE__ */ j("div", { children: e.children.map((e) => /* @__PURE__ */ j(Q, {
|
|
3485
|
+
node: e,
|
|
3486
|
+
depth: n + 1,
|
|
3487
|
+
selected: r,
|
|
3488
|
+
expanded: a,
|
|
3489
|
+
onToggle: o,
|
|
3490
|
+
onSelect: s
|
|
3491
|
+
}, e.id)) })] });
|
|
3492
|
+
}
|
|
3493
|
+
var _n = C(function({ nodes: e, onSelect: n, selected: r, defaultExpanded: i, className: a }, o) {
|
|
3494
|
+
let [s, c] = O(() => new Set(i ?? [])), l = w((e) => {
|
|
3495
|
+
c((t) => {
|
|
3496
|
+
let n = new Set(t);
|
|
3497
|
+
return n.has(e) ? n.delete(e) : n.add(e), n;
|
|
3498
|
+
});
|
|
3499
|
+
}, []);
|
|
3500
|
+
return /* @__PURE__ */ j("div", {
|
|
3501
|
+
ref: o,
|
|
3502
|
+
className: t("flex flex-col gds-gap-xs", a),
|
|
3503
|
+
"data-component": "tree",
|
|
3504
|
+
role: "tree",
|
|
3505
|
+
children: e.map((e) => /* @__PURE__ */ j(Q, {
|
|
3506
|
+
node: e,
|
|
3507
|
+
depth: 0,
|
|
3508
|
+
selected: r,
|
|
3509
|
+
expanded: s,
|
|
3510
|
+
onToggle: l,
|
|
3511
|
+
onSelect: n
|
|
3512
|
+
}, e.id))
|
|
3513
|
+
});
|
|
3514
|
+
});
|
|
3515
|
+
//#endregion
|
|
3516
|
+
//#region src/l5-organisms/video-controls.tsx
|
|
3517
|
+
function $(e) {
|
|
3518
|
+
return `${Math.floor(e / 60)}:${Math.floor(e % 60).toString().padStart(2, "0")}`;
|
|
3519
|
+
}
|
|
3520
|
+
function vn() {
|
|
3521
|
+
return /* @__PURE__ */ j("svg", {
|
|
3522
|
+
width: "16",
|
|
3523
|
+
height: "16",
|
|
3524
|
+
viewBox: "0 0 16 16",
|
|
3525
|
+
fill: "currentColor",
|
|
3526
|
+
children: /* @__PURE__ */ j("path", { d: "M4 2l10 6-10 6V2z" })
|
|
3527
|
+
});
|
|
3528
|
+
}
|
|
3529
|
+
function yn() {
|
|
3530
|
+
return /* @__PURE__ */ M("svg", {
|
|
3531
|
+
width: "16",
|
|
3532
|
+
height: "16",
|
|
3533
|
+
viewBox: "0 0 16 16",
|
|
3534
|
+
fill: "currentColor",
|
|
3535
|
+
children: [/* @__PURE__ */ j("rect", {
|
|
3536
|
+
x: "3",
|
|
3537
|
+
y: "2",
|
|
3538
|
+
width: "4",
|
|
3539
|
+
height: "12",
|
|
3540
|
+
rx: "1"
|
|
3541
|
+
}), /* @__PURE__ */ j("rect", {
|
|
3542
|
+
x: "9",
|
|
3543
|
+
y: "2",
|
|
3544
|
+
width: "4",
|
|
3545
|
+
height: "12",
|
|
3546
|
+
rx: "1"
|
|
3547
|
+
})]
|
|
3548
|
+
});
|
|
3549
|
+
}
|
|
3550
|
+
function bn() {
|
|
3551
|
+
return /* @__PURE__ */ M("svg", {
|
|
3552
|
+
width: "16",
|
|
3553
|
+
height: "16",
|
|
3554
|
+
viewBox: "0 0 16 16",
|
|
3555
|
+
fill: "currentColor",
|
|
3556
|
+
children: [/* @__PURE__ */ j("path", { d: "M2 5h3l4-3v12l-4-3H2V5z" }), /* @__PURE__ */ j("line", {
|
|
3557
|
+
x1: "12",
|
|
3558
|
+
y1: "5",
|
|
3559
|
+
x2: "12",
|
|
3560
|
+
y2: "11",
|
|
3561
|
+
stroke: "currentColor",
|
|
3562
|
+
strokeWidth: "1.5"
|
|
3563
|
+
})]
|
|
3564
|
+
});
|
|
3565
|
+
}
|
|
3566
|
+
function xn() {
|
|
3567
|
+
return /* @__PURE__ */ M("svg", {
|
|
3568
|
+
width: "16",
|
|
3569
|
+
height: "16",
|
|
3570
|
+
viewBox: "0 0 16 16",
|
|
3571
|
+
fill: "currentColor",
|
|
3572
|
+
children: [/* @__PURE__ */ j("path", { d: "M2 5h3l4-3v12l-4-3H2V5z" }), /* @__PURE__ */ j("path", {
|
|
3573
|
+
d: "M11 4c1.5 1 2 2.5 2 4s-.5 3-2 4",
|
|
3574
|
+
fill: "none",
|
|
3575
|
+
stroke: "currentColor",
|
|
3576
|
+
strokeWidth: "1.5"
|
|
3577
|
+
})]
|
|
3578
|
+
});
|
|
3579
|
+
}
|
|
3580
|
+
function Sn() {
|
|
3581
|
+
return /* @__PURE__ */ j("svg", {
|
|
3582
|
+
width: "16",
|
|
3583
|
+
height: "16",
|
|
3584
|
+
viewBox: "0 0 16 16",
|
|
3585
|
+
fill: "none",
|
|
3586
|
+
stroke: "currentColor",
|
|
3587
|
+
strokeWidth: "1.5",
|
|
3588
|
+
children: /* @__PURE__ */ j("path", { d: "M2 6V2h4M10 2h4v4M14 10v4h-4M6 14H2v-4" })
|
|
3589
|
+
});
|
|
3590
|
+
}
|
|
3591
|
+
function Cn({ currentTime: e, duration: n, playing: r, isMuted: a, showControls: o, onTogglePlay: s, onToggleMute: c, onSeek: l, onFullscreen: u }) {
|
|
3592
|
+
let d = n > 0 ? e / n * 100 : 0;
|
|
3593
|
+
return /* @__PURE__ */ M("div", {
|
|
3594
|
+
className: t("absolute inset-x-0 bottom-0 flex items-center gap-2 bg-black/60 px-3 py-2 transition-opacity duration-200", o ? "opacity-100" : "pointer-events-none opacity-0"),
|
|
3595
|
+
"data-testid": "controls",
|
|
3596
|
+
children: [
|
|
3597
|
+
/* @__PURE__ */ j("button", {
|
|
3598
|
+
type: "button",
|
|
3599
|
+
onClick: s,
|
|
3600
|
+
className: t("text-white", i),
|
|
3601
|
+
"aria-label": r ? "Pause" : "Play",
|
|
3602
|
+
"data-testid": "play-button",
|
|
3603
|
+
children: j(r ? yn : vn, {})
|
|
3604
|
+
}),
|
|
3605
|
+
/* @__PURE__ */ j("div", {
|
|
3606
|
+
className: t("relative h-1 flex-1 cursor-pointer rounded-full bg-white/30", i),
|
|
3607
|
+
onClick: l,
|
|
3608
|
+
role: "slider",
|
|
3609
|
+
"aria-label": "Seek",
|
|
3610
|
+
"aria-valuemin": 0,
|
|
3611
|
+
"aria-valuemax": Math.floor(n),
|
|
3612
|
+
"aria-valuenow": Math.floor(e),
|
|
3613
|
+
tabIndex: 0,
|
|
3614
|
+
"data-testid": "progress-bar",
|
|
3615
|
+
children: /* @__PURE__ */ j("div", {
|
|
3616
|
+
className: "absolute inset-y-0 left-0 rounded-full bg-white",
|
|
3617
|
+
style: { width: `${d}%` }
|
|
3618
|
+
})
|
|
3619
|
+
}),
|
|
3620
|
+
/* @__PURE__ */ M("span", {
|
|
3621
|
+
className: "select-none text-xs text-white/80",
|
|
3622
|
+
"data-testid": "time-display",
|
|
3623
|
+
children: [
|
|
3624
|
+
$(e),
|
|
3625
|
+
" / ",
|
|
3626
|
+
$(n)
|
|
3627
|
+
]
|
|
3628
|
+
}),
|
|
3629
|
+
/* @__PURE__ */ j("button", {
|
|
3630
|
+
type: "button",
|
|
3631
|
+
onClick: c,
|
|
3632
|
+
className: t("text-white", i),
|
|
3633
|
+
"aria-label": a ? "Unmute" : "Mute",
|
|
3634
|
+
"data-testid": "mute-button",
|
|
3635
|
+
children: j(a ? bn : xn, {})
|
|
3636
|
+
}),
|
|
3637
|
+
/* @__PURE__ */ j("button", {
|
|
3638
|
+
type: "button",
|
|
3639
|
+
onClick: u,
|
|
3640
|
+
className: t("text-white", i),
|
|
3641
|
+
"aria-label": "Fullscreen",
|
|
3642
|
+
"data-testid": "fullscreen-button",
|
|
3643
|
+
children: /* @__PURE__ */ j(Sn, {})
|
|
3644
|
+
})
|
|
3645
|
+
]
|
|
3646
|
+
});
|
|
3647
|
+
}
|
|
3648
|
+
//#endregion
|
|
3649
|
+
//#region src/l5-organisms/video-player.tsx
|
|
3650
|
+
var wn = C(function({ src: e, poster: n, autoPlay: r = !1, muted: i = !1, loop: a = !1, controls: o = !0, glass: s = !1, className: c }, l) {
|
|
3651
|
+
let u = D(null), d = D(null), [f, p] = O(!1), [m, h] = O(0), [g, _] = O(0), [v, y] = O(i), [b, x] = O(!0), S = w(() => {
|
|
3652
|
+
x(!0), d.current !== null && clearTimeout(d.current), d.current = setTimeout(() => {
|
|
3653
|
+
f && x(!1);
|
|
3654
|
+
}, 3e3);
|
|
3655
|
+
}, [f]);
|
|
3656
|
+
T(() => {
|
|
3657
|
+
if (o) return S(), () => {
|
|
3658
|
+
d.current !== null && clearTimeout(d.current);
|
|
3659
|
+
};
|
|
3660
|
+
}, [o, S]);
|
|
3661
|
+
let C = w(() => {
|
|
3662
|
+
let e = u.current;
|
|
3663
|
+
e !== null && (e.paused ? (e.play().catch(() => {}), p(!0)) : (e.pause(), p(!1)));
|
|
3664
|
+
}, []), E = w(() => {
|
|
3665
|
+
let e = u.current;
|
|
3666
|
+
e !== null && (e.muted = !e.muted, y(e.muted));
|
|
3667
|
+
}, []), k = w(() => {
|
|
3668
|
+
let e = u.current;
|
|
3669
|
+
e !== null && h(e.currentTime);
|
|
3670
|
+
}, []), A = w(() => {
|
|
3671
|
+
let e = u.current;
|
|
3672
|
+
e !== null && _(e.duration);
|
|
3673
|
+
}, []), N = w((e) => {
|
|
3674
|
+
let t = u.current;
|
|
3675
|
+
if (t === null) return;
|
|
3676
|
+
let n = e.currentTarget.getBoundingClientRect();
|
|
3677
|
+
t.currentTime = (e.clientX - n.left) / n.width * g;
|
|
3678
|
+
}, [g]), P = w(() => {
|
|
3679
|
+
let e = u.current;
|
|
3680
|
+
e !== null && (document.fullscreenElement === null ? e.requestFullscreen().catch(() => {}) : document.exitFullscreen().catch(() => {}));
|
|
3681
|
+
}, []), F = w(() => {
|
|
3682
|
+
p(!1), x(!0);
|
|
3683
|
+
}, []);
|
|
3684
|
+
return /* @__PURE__ */ M("div", {
|
|
3685
|
+
ref: l,
|
|
3686
|
+
className: t("relative overflow-hidden gds-radius-card", s && "gds-glass", c),
|
|
3687
|
+
"data-component": "video-player",
|
|
3688
|
+
onMouseMove: o ? S : void 0,
|
|
3689
|
+
onMouseLeave: o ? () => x(!1) : void 0,
|
|
3690
|
+
children: [/* @__PURE__ */ j("video", {
|
|
3691
|
+
ref: u,
|
|
3692
|
+
src: e,
|
|
3693
|
+
poster: n,
|
|
3694
|
+
autoPlay: r,
|
|
3695
|
+
muted: v,
|
|
3696
|
+
loop: a,
|
|
3697
|
+
className: "block h-full w-full object-cover",
|
|
3698
|
+
onTimeUpdate: k,
|
|
3699
|
+
onLoadedMetadata: A,
|
|
3700
|
+
onEnded: F,
|
|
3701
|
+
"data-testid": "video-element"
|
|
3702
|
+
}), o && /* @__PURE__ */ j(Cn, {
|
|
3703
|
+
currentTime: m,
|
|
3704
|
+
duration: g,
|
|
3705
|
+
playing: f,
|
|
3706
|
+
isMuted: v,
|
|
3707
|
+
showControls: b,
|
|
3708
|
+
onTogglePlay: C,
|
|
3709
|
+
onToggleMute: E,
|
|
3710
|
+
onSeek: N,
|
|
3711
|
+
onFullscreen: P
|
|
3712
|
+
})]
|
|
3713
|
+
});
|
|
3714
|
+
});
|
|
3715
|
+
//#endregion
|
|
3716
|
+
//#region src/l5-organisms/virtual-list.tsx
|
|
3717
|
+
function Tn({ items: e, itemHeight: n, renderItem: r, overscan: i = 3, className: a, height: o = 400 }, s) {
|
|
3718
|
+
let [c, l] = O(0), u = D(null), d = e.length * n, f = typeof o == "number" ? o : void 0, { visibleItems: p } = E(() => {
|
|
3719
|
+
let t = f ?? 400, r = Math.floor(c / n), a = Math.ceil((c + t) / n), o = Math.max(0, r - i), s = Math.min(e.length, a + i), l = [];
|
|
3720
|
+
for (let t = o; t < s; t++) l.push({
|
|
3721
|
+
item: e[t],
|
|
3722
|
+
index: t
|
|
3723
|
+
});
|
|
3724
|
+
return {
|
|
3725
|
+
startIndex: o,
|
|
3726
|
+
endIndex: s,
|
|
3727
|
+
visibleItems: l
|
|
3728
|
+
};
|
|
3729
|
+
}, [
|
|
3730
|
+
e,
|
|
3731
|
+
n,
|
|
3732
|
+
c,
|
|
3733
|
+
f,
|
|
3734
|
+
i
|
|
3735
|
+
]), m = w((e) => {
|
|
3736
|
+
l(e.currentTarget.scrollTop);
|
|
3737
|
+
}, []);
|
|
3738
|
+
return /* @__PURE__ */ j("div", {
|
|
3739
|
+
ref: s,
|
|
3740
|
+
className: t("overflow-y-auto", a),
|
|
3741
|
+
style: { height: o },
|
|
3742
|
+
onScroll: m,
|
|
3743
|
+
"data-component": "virtual-list",
|
|
3744
|
+
children: /* @__PURE__ */ j("div", {
|
|
3745
|
+
ref: u,
|
|
3746
|
+
style: {
|
|
3747
|
+
height: d,
|
|
3748
|
+
position: "relative"
|
|
3749
|
+
},
|
|
3750
|
+
children: p.map(({ item: e, index: t }) => /* @__PURE__ */ j("div", {
|
|
3751
|
+
style: {
|
|
3752
|
+
position: "absolute",
|
|
3753
|
+
top: t * n,
|
|
3754
|
+
left: 0,
|
|
3755
|
+
right: 0,
|
|
3756
|
+
height: n
|
|
3757
|
+
},
|
|
3758
|
+
children: r(e, t)
|
|
3759
|
+
}, t))
|
|
3760
|
+
})
|
|
3761
|
+
});
|
|
3762
|
+
}
|
|
3763
|
+
var En = C(Tn), Dn = C(function({ className: e, condition: n, icon: r, location: i, temp: a, unit: o = "C", ...s }, c) {
|
|
3764
|
+
return /* @__PURE__ */ M("div", {
|
|
3765
|
+
className: t("inline-flex items-center gap-4 rounded-xl border border-border bg-surface p-4 select-none", e),
|
|
3766
|
+
"data-component": "weather-widget",
|
|
3767
|
+
ref: c,
|
|
3768
|
+
...s,
|
|
3769
|
+
children: [r !== void 0 && /* @__PURE__ */ j("div", {
|
|
3770
|
+
className: "text-2xl text-fg-muted",
|
|
3771
|
+
children: r
|
|
3772
|
+
}), /* @__PURE__ */ M("div", {
|
|
3773
|
+
className: "flex flex-col",
|
|
3774
|
+
children: [
|
|
3775
|
+
/* @__PURE__ */ M("span", {
|
|
3776
|
+
className: "text-2xl font-bold text-fg leading-tight",
|
|
3777
|
+
children: [
|
|
3778
|
+
a,
|
|
3779
|
+
"°",
|
|
3780
|
+
o
|
|
3781
|
+
]
|
|
3782
|
+
}),
|
|
3783
|
+
/* @__PURE__ */ j("span", {
|
|
3784
|
+
className: "text-sm text-fg-muted",
|
|
3785
|
+
children: n
|
|
3786
|
+
}),
|
|
3787
|
+
/* @__PURE__ */ j("span", {
|
|
3788
|
+
className: "text-xs text-fg-muted/70",
|
|
3789
|
+
children: i
|
|
3790
|
+
})
|
|
3791
|
+
]
|
|
3792
|
+
})]
|
|
3793
|
+
});
|
|
3794
|
+
});
|
|
3795
|
+
//#endregion
|
|
3796
|
+
export { Me as $, Dt as A, ot as B, Pt as C, At as D, jt as E, yt as F, Xe as G, rt as H, ht as I, Ue as J, Ye as K, lt as L, Ct as M, St as N, kt as O, q as P, Ne as Q, ct as R, Rt as S, Mt as T, $e as U, it as V, Qe as W, Be as X, He as Y, Re as Z, qt as _, hn as a, _e as at, Vt as b, Z as c, pe as ct, sn as d, ie as dt, je as et, on as f, re as ft, Qt as g, en as h, N as ht, _n as i, Se as it, wt as j, Ot as k, un as l, R as lt, tn as m, ee as mt, En as n, Te as nt, pn as o, ge as ot, an as p, ne as pt, Je as q, wn as r, Ce as rt, fn as s, z as st, Dn as t, Oe as tt, ln as u, ae as ut, Wt as v, Nt as w, J as x, Ut as y, st as z };
|
|
3797
|
+
|
|
3798
|
+
//# sourceMappingURL=l5-organisms-8KB_8a-H.js.map
|