@xenide-io/the-old-ui-theme 0.9.18 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Chip-BzuNgJIa.d.mts → Chip-Dw2g2t8D.d.mts} +18 -4
- package/dist/{Chip-BzuNgJIa.d.ts → Chip-Dw2g2t8D.d.ts} +18 -4
- package/dist/{chunk-6SVJAU5K.mjs → chunk-RIPGN6FG.mjs} +1333 -526
- package/dist/index.d.mts +3 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.js +490 -119
- package/dist/index.mjs +11 -3
- package/dist/suite-analytics--Mf1RZbw.d.mts +29 -0
- package/dist/suite-analytics--Mf1RZbw.d.ts +29 -0
- package/dist/suite.d.mts +36 -4
- package/dist/suite.d.ts +36 -4
- package/dist/suite.js +4617 -4001
- package/dist/suite.mjs +1456 -868
- package/dist/tailwind-preset.js +10 -1
- package/dist/tailwind-preset.mjs +10 -1
- package/dist/ui.d.mts +33 -4
- package/dist/ui.d.ts +33 -4
- package/dist/ui.js +1364 -571
- package/dist/ui.mjs +15 -1
- package/docs/macos-identity-audit.md +279 -0
- package/package.json +1 -1
- package/src/app/globals.css +390 -44
- package/src/components/ui/Accordion.tsx +4 -7
- package/src/components/ui/Avatar.tsx +5 -5
- package/src/components/ui/BrandSpinner.tsx +256 -0
- package/src/components/ui/Calendar.tsx +7 -7
- package/src/components/ui/CodeBlock.tsx +14 -11
- package/src/components/ui/CollapsibleSection.tsx +4 -4
- package/src/components/ui/CommandPalette.tsx +7 -10
- package/src/components/ui/EmptyState.tsx +2 -2
- package/src/components/ui/Input.tsx +1 -1
- package/src/components/ui/Marketing.tsx +144 -0
- package/src/components/ui/MarketingIllustrations.tsx +287 -0
- package/src/components/ui/Panel.tsx +1 -1
- package/src/components/ui/SegmentedControl.tsx +59 -13
- package/src/components/ui/SettingsLayout.tsx +4 -0
- package/src/components/ui/ShowcaseWrapper.tsx +3 -3
- package/src/components/ui/Table.tsx +45 -10
- package/src/components/ui/Typography.tsx +4 -4
- package/src/components/ui/avatar-stat.test.tsx +14 -1
- package/src/components/ui/brand-spinner.test.tsx +62 -0
- package/src/components/ui/index.ts +19 -11
- package/src/components/ui/interaction-primitives.test.tsx +12 -6
- package/src/components/ui/marketing.test.tsx +39 -0
- package/src/components/ui/table.test.tsx +47 -0
- package/src/styles/suite-skin.css +471 -74
- package/src/styles/themes.css +45 -45
- package/src/styles/typography.css +25 -1
- package/src/suite/components/ai-draft-editor.tsx +184 -0
- package/src/suite/components/ai-panel-workflows.test.tsx +179 -0
- package/src/suite/components/ai-panel.tsx +201 -31
- package/src/suite/components/app-switcher.tsx +22 -9
- package/src/suite/components/command-palette-host.tsx +20 -2
- package/src/suite/components/suite-app-layout.tsx +7 -4
- package/src/suite/components/suite-bottom-nav.tsx +1 -1
- package/src/suite/components/suite-clients-projects-directory.tsx +6 -6
- package/src/suite/components/suite-integration-picker.tsx +7 -7
- package/src/suite/components/suite-integration-rules.tsx +5 -5
- package/src/suite/components/suite-layout.test.tsx +32 -3
- package/src/suite/components/suite-layout.tsx +4 -4
- package/src/suite/components/suite-mobile-drawer.tsx +2 -2
- package/src/suite/components/suite-mobile-header.tsx +1 -1
- package/src/suite/components/suite-notification-bell.tsx +27 -6
- package/src/suite/components/suite-notification-settings.tsx +182 -0
- package/src/suite/components/suite-palette-library.test.tsx +46 -0
- package/src/suite/components/suite-palette-library.tsx +82 -15
- package/src/suite/components/suite-settings-layout.tsx +2 -2
- package/src/suite/components/suite-settings-mobile-nav.tsx +10 -10
- package/src/suite/components/suite-sidebar.test.tsx +39 -0
- package/src/suite/components/suite-sidebar.tsx +41 -19
- package/src/suite/components/suite-skeleton.tsx +6 -6
- package/src/suite/components/suite-user-menu.tsx +2 -2
- package/src/suite/components/theme-provider.tsx +2 -0
- package/src/suite/components/today-calibrating.tsx +3 -3
- package/src/suite/components/today-ui.tsx +42 -37
- package/src/suite/components/workspace-switcher.tsx +3 -3
- package/src/suite/index.ts +14 -0
- package/src/suite/lib/suite-notifications.tsx +5 -0
- package/tailwind-preset.ts +9 -0
|
@@ -114,12 +114,444 @@ var Button = forwardRef(function Button2(_a, ref) {
|
|
|
114
114
|
});
|
|
115
115
|
Button.displayName = "Button";
|
|
116
116
|
|
|
117
|
+
// src/components/ui/Marketing.tsx
|
|
118
|
+
import {
|
|
119
|
+
useEffect,
|
|
120
|
+
useRef,
|
|
121
|
+
useState
|
|
122
|
+
} from "react";
|
|
123
|
+
import { Pause, Play } from "iconoir-react";
|
|
124
|
+
import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
125
|
+
function MarketingHeader(_a) {
|
|
126
|
+
var _b = _a, {
|
|
127
|
+
brand,
|
|
128
|
+
navigation,
|
|
129
|
+
actions,
|
|
130
|
+
className
|
|
131
|
+
} = _b, props = __objRest(_b, [
|
|
132
|
+
"brand",
|
|
133
|
+
"navigation",
|
|
134
|
+
"actions",
|
|
135
|
+
"className"
|
|
136
|
+
]);
|
|
137
|
+
const [scrolled, setScrolled] = useState(false);
|
|
138
|
+
useEffect(() => {
|
|
139
|
+
const onScroll = () => setScrolled(window.scrollY > 4);
|
|
140
|
+
onScroll();
|
|
141
|
+
window.addEventListener("scroll", onScroll, { passive: true });
|
|
142
|
+
return () => window.removeEventListener("scroll", onScroll);
|
|
143
|
+
}, []);
|
|
144
|
+
return /* @__PURE__ */ jsx3(
|
|
145
|
+
"header",
|
|
146
|
+
__spreadProps(__spreadValues({}, props), {
|
|
147
|
+
"data-scrolled": scrolled ? "true" : "false",
|
|
148
|
+
className: cn("marketing-header", className),
|
|
149
|
+
children: /* @__PURE__ */ jsxs3("div", { className: "marketing-header__inner", children: [
|
|
150
|
+
/* @__PURE__ */ jsx3("div", { className: "marketing-header__brand", children: brand }),
|
|
151
|
+
/* @__PURE__ */ jsx3(
|
|
152
|
+
"nav",
|
|
153
|
+
{
|
|
154
|
+
className: "marketing-header__navigation",
|
|
155
|
+
"aria-label": "Product navigation",
|
|
156
|
+
children: navigation
|
|
157
|
+
}
|
|
158
|
+
),
|
|
159
|
+
/* @__PURE__ */ jsx3("div", { className: "marketing-header__actions", children: actions })
|
|
160
|
+
] })
|
|
161
|
+
})
|
|
162
|
+
);
|
|
163
|
+
}
|
|
164
|
+
function MarketingLink(_a) {
|
|
165
|
+
var _b = _a, {
|
|
166
|
+
variant = "secondary",
|
|
167
|
+
icon,
|
|
168
|
+
sideIcon,
|
|
169
|
+
children,
|
|
170
|
+
className
|
|
171
|
+
} = _b, props = __objRest(_b, [
|
|
172
|
+
"variant",
|
|
173
|
+
"icon",
|
|
174
|
+
"sideIcon",
|
|
175
|
+
"children",
|
|
176
|
+
"className"
|
|
177
|
+
]);
|
|
178
|
+
return /* @__PURE__ */ jsx3(
|
|
179
|
+
"a",
|
|
180
|
+
__spreadProps(__spreadValues({}, props), {
|
|
181
|
+
className: cn(
|
|
182
|
+
"ph-btn ph-btn-raised marketing-button",
|
|
183
|
+
`ph-btn-${variant}`,
|
|
184
|
+
className
|
|
185
|
+
),
|
|
186
|
+
children: /* @__PURE__ */ jsx3(ButtonChrome, { label: children, icon, sideIcon })
|
|
187
|
+
})
|
|
188
|
+
);
|
|
189
|
+
}
|
|
190
|
+
function MarketingMotionControl() {
|
|
191
|
+
const [paused, setPaused] = useState(false);
|
|
192
|
+
useEffect(() => {
|
|
193
|
+
document.documentElement.toggleAttribute("data-marketing-paused", paused);
|
|
194
|
+
return () => document.documentElement.removeAttribute("data-marketing-paused");
|
|
195
|
+
}, [paused]);
|
|
196
|
+
return /* @__PURE__ */ jsxs3(
|
|
197
|
+
"button",
|
|
198
|
+
{
|
|
199
|
+
type: "button",
|
|
200
|
+
className: "marketing-motion-control",
|
|
201
|
+
onClick: () => setPaused((value) => !value),
|
|
202
|
+
"aria-pressed": paused,
|
|
203
|
+
"aria-label": paused ? "Play landing animations" : "Pause landing animations",
|
|
204
|
+
children: [
|
|
205
|
+
paused ? /* @__PURE__ */ jsx3(Play, { className: "h-4 w-4", "aria-hidden": true }) : /* @__PURE__ */ jsx3(Pause, { className: "h-4 w-4", "aria-hidden": true }),
|
|
206
|
+
/* @__PURE__ */ jsx3("span", { children: paused ? "Play motion" : "Pause motion" })
|
|
207
|
+
]
|
|
208
|
+
}
|
|
209
|
+
);
|
|
210
|
+
}
|
|
211
|
+
function MarketingReveal(_a) {
|
|
212
|
+
var _b = _a, {
|
|
213
|
+
children,
|
|
214
|
+
className
|
|
215
|
+
} = _b, props = __objRest(_b, [
|
|
216
|
+
"children",
|
|
217
|
+
"className"
|
|
218
|
+
]);
|
|
219
|
+
const ref = useRef(null);
|
|
220
|
+
useEffect(() => {
|
|
221
|
+
const element = ref.current;
|
|
222
|
+
if (!element || !window.IntersectionObserver || window.matchMedia("(prefers-reduced-motion: reduce)").matches)
|
|
223
|
+
return;
|
|
224
|
+
const observer = new IntersectionObserver(
|
|
225
|
+
([entry]) => {
|
|
226
|
+
if (!entry.isIntersecting) return;
|
|
227
|
+
element.classList.add("marketing-reveal--entered");
|
|
228
|
+
observer.disconnect();
|
|
229
|
+
},
|
|
230
|
+
{ threshold: 0.1 }
|
|
231
|
+
);
|
|
232
|
+
observer.observe(element);
|
|
233
|
+
return () => observer.disconnect();
|
|
234
|
+
}, []);
|
|
235
|
+
return /* @__PURE__ */ jsx3("div", __spreadProps(__spreadValues({}, props), { ref, className: cn("marketing-reveal", className), children }));
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
// src/components/ui/MarketingIllustrations.tsx
|
|
239
|
+
import { useId } from "react";
|
|
240
|
+
import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
241
|
+
function AiWritingIllustration({
|
|
242
|
+
title,
|
|
243
|
+
prompt,
|
|
244
|
+
before,
|
|
245
|
+
after
|
|
246
|
+
}) {
|
|
247
|
+
const id = useId().replaceAll(":", "");
|
|
248
|
+
return /* @__PURE__ */ jsxs4(
|
|
249
|
+
"svg",
|
|
250
|
+
{
|
|
251
|
+
viewBox: "0 0 560 370",
|
|
252
|
+
className: "h-auto w-full",
|
|
253
|
+
role: "img",
|
|
254
|
+
"aria-label": `${title}: use /ai and Shelly AI to draft and polish writing`,
|
|
255
|
+
"data-marketing-art": true,
|
|
256
|
+
children: [
|
|
257
|
+
/* @__PURE__ */ jsxs4("defs", { children: [
|
|
258
|
+
/* @__PURE__ */ jsxs4("radialGradient", { id: `${id}-glow`, children: [
|
|
259
|
+
/* @__PURE__ */ jsx4("stop", { stopColor: "var(--ph-accent)", stopOpacity: ".2" }),
|
|
260
|
+
/* @__PURE__ */ jsx4("stop", { offset: "1", stopColor: "var(--ph-accent)", stopOpacity: "0" })
|
|
261
|
+
] }),
|
|
262
|
+
/* @__PURE__ */ jsxs4("linearGradient", { id: `${id}-paper`, x2: "1", y2: "1", children: [
|
|
263
|
+
/* @__PURE__ */ jsx4("stop", { stopColor: "var(--ph-surface)" }),
|
|
264
|
+
/* @__PURE__ */ jsx4("stop", { offset: "1", stopColor: "var(--ph-muted)" })
|
|
265
|
+
] })
|
|
266
|
+
] }),
|
|
267
|
+
/* @__PURE__ */ jsx4("ellipse", { cx: "280", cy: "198", rx: "260", ry: "168", fill: `url(#${id}-glow)` }),
|
|
268
|
+
/* @__PURE__ */ jsxs4("g", { className: "marketing-svg-float", children: [
|
|
269
|
+
/* @__PURE__ */ jsx4(
|
|
270
|
+
"rect",
|
|
271
|
+
{
|
|
272
|
+
x: "18",
|
|
273
|
+
y: "28",
|
|
274
|
+
width: "524",
|
|
275
|
+
height: "300",
|
|
276
|
+
rx: "20",
|
|
277
|
+
fill: `url(#${id}-paper)`,
|
|
278
|
+
stroke: "var(--ph-border)"
|
|
279
|
+
}
|
|
280
|
+
),
|
|
281
|
+
/* @__PURE__ */ jsx4("path", { d: "M18 76h524", stroke: "var(--ph-border)" }),
|
|
282
|
+
/* @__PURE__ */ jsx4("image", { href: "/shelly-icon.svg", x: "36", y: "40", width: "24", height: "24" }),
|
|
283
|
+
/* @__PURE__ */ jsx4(
|
|
284
|
+
"text",
|
|
285
|
+
{
|
|
286
|
+
x: "70",
|
|
287
|
+
y: "57",
|
|
288
|
+
fontSize: "16",
|
|
289
|
+
fontWeight: "700",
|
|
290
|
+
fill: "var(--ph-text-primary)",
|
|
291
|
+
children: title
|
|
292
|
+
}
|
|
293
|
+
),
|
|
294
|
+
/* @__PURE__ */ jsx4("text", { x: "434", y: "57", fontSize: "12", fill: "var(--ph-text-secondary)", children: "Shelly AI" }),
|
|
295
|
+
/* @__PURE__ */ jsx4(
|
|
296
|
+
"rect",
|
|
297
|
+
{
|
|
298
|
+
x: "38",
|
|
299
|
+
y: "94",
|
|
300
|
+
width: "484",
|
|
301
|
+
height: "42",
|
|
302
|
+
rx: "10",
|
|
303
|
+
fill: "var(--ph-canvas)",
|
|
304
|
+
stroke: "var(--ph-selected-border)"
|
|
305
|
+
}
|
|
306
|
+
),
|
|
307
|
+
/* @__PURE__ */ jsx4("text", { x: "54", y: "121", fontSize: "16", fill: "var(--ph-text-primary)", children: prompt }),
|
|
308
|
+
/* @__PURE__ */ jsxs4("g", { className: "marketing-svg-draft", children: [
|
|
309
|
+
/* @__PURE__ */ jsx4(
|
|
310
|
+
"text",
|
|
311
|
+
{
|
|
312
|
+
x: "46",
|
|
313
|
+
y: "171",
|
|
314
|
+
fontSize: "12",
|
|
315
|
+
fontWeight: "700",
|
|
316
|
+
fill: "var(--ph-text-secondary)",
|
|
317
|
+
children: "YOUR DRAFT"
|
|
318
|
+
}
|
|
319
|
+
),
|
|
320
|
+
before.map((line, index) => /* @__PURE__ */ jsx4(
|
|
321
|
+
"text",
|
|
322
|
+
{
|
|
323
|
+
x: "46",
|
|
324
|
+
y: 205 + index * 26,
|
|
325
|
+
fontSize: "16",
|
|
326
|
+
fill: "var(--ph-text-secondary)",
|
|
327
|
+
children: line
|
|
328
|
+
},
|
|
329
|
+
index
|
|
330
|
+
))
|
|
331
|
+
] }),
|
|
332
|
+
/* @__PURE__ */ jsx4(
|
|
333
|
+
"path",
|
|
334
|
+
{
|
|
335
|
+
className: "marketing-svg-thread",
|
|
336
|
+
d: "M265 175v102",
|
|
337
|
+
stroke: "var(--ph-accent)",
|
|
338
|
+
strokeWidth: "2",
|
|
339
|
+
strokeDasharray: "4 7"
|
|
340
|
+
}
|
|
341
|
+
),
|
|
342
|
+
/* @__PURE__ */ jsxs4("g", { className: "marketing-svg-polished", children: [
|
|
343
|
+
/* @__PURE__ */ jsx4(
|
|
344
|
+
"text",
|
|
345
|
+
{
|
|
346
|
+
x: "294",
|
|
347
|
+
y: "171",
|
|
348
|
+
fontSize: "12",
|
|
349
|
+
fontWeight: "700",
|
|
350
|
+
fill: "var(--ph-accent)",
|
|
351
|
+
children: "POLISHED WITH SHELLY"
|
|
352
|
+
}
|
|
353
|
+
),
|
|
354
|
+
after.map((line, index) => /* @__PURE__ */ jsx4(
|
|
355
|
+
"text",
|
|
356
|
+
{
|
|
357
|
+
x: "294",
|
|
358
|
+
y: 205 + index * 26,
|
|
359
|
+
fontSize: "16",
|
|
360
|
+
fill: "var(--ph-text-primary)",
|
|
361
|
+
children: line
|
|
362
|
+
},
|
|
363
|
+
index
|
|
364
|
+
)),
|
|
365
|
+
/* @__PURE__ */ jsx4(
|
|
366
|
+
"path",
|
|
367
|
+
{
|
|
368
|
+
d: "m302 294 5 5 10-11",
|
|
369
|
+
fill: "none",
|
|
370
|
+
stroke: "var(--ph-success)",
|
|
371
|
+
strokeWidth: "3",
|
|
372
|
+
strokeLinecap: "round"
|
|
373
|
+
}
|
|
374
|
+
),
|
|
375
|
+
/* @__PURE__ */ jsx4("text", { x: "328", y: "300", fontSize: "12", fill: "var(--ph-text-secondary)", children: "Ready to keep working" })
|
|
376
|
+
] })
|
|
377
|
+
] }),
|
|
378
|
+
/* @__PURE__ */ jsxs4("g", { className: "marketing-svg-spark", fill: "var(--ph-accent)", children: [
|
|
379
|
+
/* @__PURE__ */ jsx4("path", { d: "m520 12 3 10 10 3-10 3-3 10-3-10-10-3 10-3z" }),
|
|
380
|
+
/* @__PURE__ */ jsx4("path", { d: "m25 310 2 7 7 2-7 2-2 7-2-7-7-2 7-2z" })
|
|
381
|
+
] })
|
|
382
|
+
]
|
|
383
|
+
}
|
|
384
|
+
);
|
|
385
|
+
}
|
|
386
|
+
function IntegrationBridgeIllustration({
|
|
387
|
+
appName,
|
|
388
|
+
appIcon,
|
|
389
|
+
recordLabel,
|
|
390
|
+
calendar = false
|
|
391
|
+
}) {
|
|
392
|
+
const id = useId().replaceAll(":", "");
|
|
393
|
+
const rows = calendar ? ["Client catch-up", "10:00 \u2013 11:00", "Meeting notes"] : ["Client", "Project", recordLabel];
|
|
394
|
+
return /* @__PURE__ */ jsxs4(
|
|
395
|
+
"svg",
|
|
396
|
+
{
|
|
397
|
+
viewBox: "0 0 600 350",
|
|
398
|
+
className: "h-auto w-full",
|
|
399
|
+
role: "img",
|
|
400
|
+
"aria-label": calendar ? "Choose a calendar event to prefill a TurtleTime entry" : `Shelly Bridge matches connected records with ${appName}`,
|
|
401
|
+
"data-marketing-art": true,
|
|
402
|
+
children: [
|
|
403
|
+
/* @__PURE__ */ jsx4("defs", { children: /* @__PURE__ */ jsxs4("radialGradient", { id: `${id}-bridge`, children: [
|
|
404
|
+
/* @__PURE__ */ jsx4("stop", { stopColor: "var(--ph-blue)", stopOpacity: ".17" }),
|
|
405
|
+
/* @__PURE__ */ jsx4("stop", { offset: "1", stopColor: "var(--ph-blue)", stopOpacity: "0" })
|
|
406
|
+
] }) }),
|
|
407
|
+
/* @__PURE__ */ jsx4(
|
|
408
|
+
"ellipse",
|
|
409
|
+
{
|
|
410
|
+
cx: "300",
|
|
411
|
+
cy: "185",
|
|
412
|
+
rx: "280",
|
|
413
|
+
ry: "160",
|
|
414
|
+
fill: `url(#${id}-bridge)`
|
|
415
|
+
}
|
|
416
|
+
),
|
|
417
|
+
/* @__PURE__ */ jsxs4("g", { className: "marketing-svg-float", children: [
|
|
418
|
+
/* @__PURE__ */ jsx4(
|
|
419
|
+
"rect",
|
|
420
|
+
{
|
|
421
|
+
x: "18",
|
|
422
|
+
y: "55",
|
|
423
|
+
width: "230",
|
|
424
|
+
height: "240",
|
|
425
|
+
rx: "18",
|
|
426
|
+
fill: "var(--ph-surface)",
|
|
427
|
+
stroke: "var(--ph-border)"
|
|
428
|
+
}
|
|
429
|
+
),
|
|
430
|
+
/* @__PURE__ */ jsx4(
|
|
431
|
+
"rect",
|
|
432
|
+
{
|
|
433
|
+
x: "352",
|
|
434
|
+
y: "55",
|
|
435
|
+
width: "230",
|
|
436
|
+
height: "240",
|
|
437
|
+
rx: "18",
|
|
438
|
+
fill: "var(--ph-surface)",
|
|
439
|
+
stroke: "var(--ph-border)"
|
|
440
|
+
}
|
|
441
|
+
),
|
|
442
|
+
/* @__PURE__ */ jsx4(
|
|
443
|
+
"text",
|
|
444
|
+
{
|
|
445
|
+
x: "38",
|
|
446
|
+
y: "92",
|
|
447
|
+
fontSize: "17",
|
|
448
|
+
fontWeight: "700",
|
|
449
|
+
fill: "var(--ph-text-primary)",
|
|
450
|
+
children: calendar ? "Calendar events" : "Connected tools"
|
|
451
|
+
}
|
|
452
|
+
),
|
|
453
|
+
/* @__PURE__ */ jsx4("image", { href: appIcon, x: "370", y: "72", width: "28", height: "28" }),
|
|
454
|
+
/* @__PURE__ */ jsx4(
|
|
455
|
+
"text",
|
|
456
|
+
{
|
|
457
|
+
x: "410",
|
|
458
|
+
y: "93",
|
|
459
|
+
fontSize: "17",
|
|
460
|
+
fontWeight: "700",
|
|
461
|
+
fill: "var(--ph-text-primary)",
|
|
462
|
+
children: appName
|
|
463
|
+
}
|
|
464
|
+
),
|
|
465
|
+
rows.map((row, index) => /* @__PURE__ */ jsxs4("g", { children: [
|
|
466
|
+
/* @__PURE__ */ jsx4(
|
|
467
|
+
"rect",
|
|
468
|
+
{
|
|
469
|
+
x: "36",
|
|
470
|
+
y: 119 + index * 48,
|
|
471
|
+
width: "194",
|
|
472
|
+
height: "36",
|
|
473
|
+
rx: "8",
|
|
474
|
+
fill: "var(--ph-muted)"
|
|
475
|
+
}
|
|
476
|
+
),
|
|
477
|
+
/* @__PURE__ */ jsx4(
|
|
478
|
+
"text",
|
|
479
|
+
{
|
|
480
|
+
x: "50",
|
|
481
|
+
y: 142 + index * 48,
|
|
482
|
+
fontSize: "14",
|
|
483
|
+
fill: "var(--ph-text-secondary)",
|
|
484
|
+
children: row
|
|
485
|
+
}
|
|
486
|
+
),
|
|
487
|
+
/* @__PURE__ */ jsx4(
|
|
488
|
+
"rect",
|
|
489
|
+
{
|
|
490
|
+
x: "370",
|
|
491
|
+
y: 119 + index * 48,
|
|
492
|
+
width: "194",
|
|
493
|
+
height: "36",
|
|
494
|
+
rx: "8",
|
|
495
|
+
fill: "var(--ph-muted)"
|
|
496
|
+
}
|
|
497
|
+
),
|
|
498
|
+
/* @__PURE__ */ jsx4(
|
|
499
|
+
"text",
|
|
500
|
+
{
|
|
501
|
+
x: "384",
|
|
502
|
+
y: 142 + index * 48,
|
|
503
|
+
fontSize: "14",
|
|
504
|
+
fill: "var(--ph-text-primary)",
|
|
505
|
+
children: calendar && index === 1 ? "1 hour, ready to review" : row
|
|
506
|
+
}
|
|
507
|
+
),
|
|
508
|
+
/* @__PURE__ */ jsx4(
|
|
509
|
+
"path",
|
|
510
|
+
{
|
|
511
|
+
className: "marketing-svg-thread",
|
|
512
|
+
d: `M248 ${137 + index * 48}h104`,
|
|
513
|
+
stroke: "var(--ph-accent)",
|
|
514
|
+
strokeWidth: "2",
|
|
515
|
+
strokeDasharray: "5 8"
|
|
516
|
+
}
|
|
517
|
+
)
|
|
518
|
+
] }, row))
|
|
519
|
+
] }),
|
|
520
|
+
/* @__PURE__ */ jsxs4("g", { className: "marketing-svg-polished", children: [
|
|
521
|
+
/* @__PURE__ */ jsx4(
|
|
522
|
+
"circle",
|
|
523
|
+
{
|
|
524
|
+
cx: "300",
|
|
525
|
+
cy: "185",
|
|
526
|
+
r: "27",
|
|
527
|
+
fill: "var(--ph-canvas)",
|
|
528
|
+
stroke: "var(--ph-selected-border)"
|
|
529
|
+
}
|
|
530
|
+
),
|
|
531
|
+
/* @__PURE__ */ jsx4("image", { href: "/shelly-icon.svg", x: "280", y: "165", width: "40", height: "40" }),
|
|
532
|
+
/* @__PURE__ */ jsx4(
|
|
533
|
+
"text",
|
|
534
|
+
{
|
|
535
|
+
x: "300",
|
|
536
|
+
y: "331",
|
|
537
|
+
textAnchor: "middle",
|
|
538
|
+
fontSize: "13",
|
|
539
|
+
fill: "var(--ph-text-secondary)",
|
|
540
|
+
children: calendar ? "Prefill details \xB7 review \xB7 save the entry" : "Shelly Bridge \xB7 match the records you want to connect"
|
|
541
|
+
}
|
|
542
|
+
)
|
|
543
|
+
] })
|
|
544
|
+
]
|
|
545
|
+
}
|
|
546
|
+
);
|
|
547
|
+
}
|
|
548
|
+
|
|
117
549
|
// src/components/ui/Alert.tsx
|
|
118
550
|
import { forwardRef as forwardRef5 } from "react";
|
|
119
551
|
|
|
120
552
|
// src/components/icons/IconBase.tsx
|
|
121
553
|
import { forwardRef as forwardRef2 } from "react";
|
|
122
|
-
import { jsx as
|
|
554
|
+
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
123
555
|
var IconBase = forwardRef2(function IconBase2(_a, ref) {
|
|
124
556
|
var _b = _a, {
|
|
125
557
|
className,
|
|
@@ -149,7 +581,7 @@ var IconBase = forwardRef2(function IconBase2(_a, ref) {
|
|
|
149
581
|
"aria-labelledby"
|
|
150
582
|
]);
|
|
151
583
|
const hasAccessibleName = Boolean(ariaLabel || ariaLabelledBy);
|
|
152
|
-
return /* @__PURE__ */
|
|
584
|
+
return /* @__PURE__ */ jsx5(
|
|
153
585
|
"svg",
|
|
154
586
|
__spreadProps(__spreadValues({
|
|
155
587
|
ref,
|
|
@@ -172,10 +604,10 @@ IconBase.displayName = "IconBase";
|
|
|
172
604
|
|
|
173
605
|
// src/components/icons/createIconBase.tsx
|
|
174
606
|
import { forwardRef as forwardRef3 } from "react";
|
|
175
|
-
import { jsx as
|
|
607
|
+
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
176
608
|
function createIconBase({ name = "IconGlyph", viewBox = "0 0 24 24", paths }) {
|
|
177
609
|
const IconGlyph = forwardRef3(function IconGlyph2(props, ref) {
|
|
178
|
-
return /* @__PURE__ */
|
|
610
|
+
return /* @__PURE__ */ jsx6(IconBase, __spreadProps(__spreadValues({ ref, viewBox }, props), { children: paths }));
|
|
179
611
|
});
|
|
180
612
|
IconGlyph.displayName = name;
|
|
181
613
|
return IconGlyph;
|
|
@@ -184,14 +616,14 @@ function createIconBasePath(d, viewBox = "0 0 24 24", name) {
|
|
|
184
616
|
return createIconBase({
|
|
185
617
|
name,
|
|
186
618
|
viewBox,
|
|
187
|
-
paths: /* @__PURE__ */
|
|
619
|
+
paths: /* @__PURE__ */ jsx6("path", { d, fill: "currentColor" })
|
|
188
620
|
});
|
|
189
621
|
}
|
|
190
622
|
|
|
191
623
|
// src/components/icons/icons.tsx
|
|
192
624
|
import { forwardRef as forwardRef4 } from "react";
|
|
193
|
-
import { Fragment as Fragment2, jsx as
|
|
194
|
-
var fill = (d) => /* @__PURE__ */
|
|
625
|
+
import { Fragment as Fragment2, jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
626
|
+
var fill = (d) => /* @__PURE__ */ jsx7("path", { d, fill: "currentColor" });
|
|
195
627
|
var IconAreaChart = createIconBase({
|
|
196
628
|
paths: fill("M3 20V7l4 3 5-7 5 4h4v13Zm5-3 4-5.5 7 5.45V9h-2.7l-3.9-3.125-4.95 6.95L5 11v3.6Z")
|
|
197
629
|
});
|
|
@@ -232,7 +664,7 @@ var IconFlare = createIconBase({
|
|
|
232
664
|
)
|
|
233
665
|
});
|
|
234
666
|
var IconSelectEvents = createIconBase({
|
|
235
|
-
paths: /* @__PURE__ */
|
|
667
|
+
paths: /* @__PURE__ */ jsxs5(Fragment2, { children: [
|
|
236
668
|
fill("M17.5 9L16.56 6.94L14.5 6L16.56 5.06L17.5 3L18.44 5.06L20.5 6L18.44 6.94L17.5 9Z"),
|
|
237
669
|
fill("M6 12.5L6.94 14.56L9 15.5L6.94 16.44L6 18.5L5.06 16.44L3 15.5L5.06 14.56L6 12.5Z"),
|
|
238
670
|
fill("M6 9L5.06 6.94L3 6L5.06 5.06L6 3L6.94 5.06L9 6L6.94 6.94L6 9Z"),
|
|
@@ -290,9 +722,9 @@ var IconRobot = createIconBase({
|
|
|
290
722
|
)
|
|
291
723
|
});
|
|
292
724
|
var IconExclamation = createIconBase({
|
|
293
|
-
paths: /* @__PURE__ */
|
|
294
|
-
/* @__PURE__ */
|
|
295
|
-
/* @__PURE__ */
|
|
725
|
+
paths: /* @__PURE__ */ jsxs5("g", { fill: "currentColor", children: [
|
|
726
|
+
/* @__PURE__ */ jsx7("path", { d: "m12 21c1.1046 0 2-.8954 2-2s-.8954-2-2-2-2 .8954-2 2 .8954 2 2 2z" }),
|
|
727
|
+
/* @__PURE__ */ jsx7("path", { d: "m10 3h4v12h-4z" })
|
|
296
728
|
] })
|
|
297
729
|
});
|
|
298
730
|
var IconErrorOutline = createIconBase({
|
|
@@ -326,7 +758,7 @@ var IconChevronLeft = createIconBasePath("M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10
|
|
|
326
758
|
var IconChevronRight = createIconBasePath("M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z");
|
|
327
759
|
var IconChevronDown = createIconBasePath("M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z");
|
|
328
760
|
var IconSubArrowRight = createIconBase({
|
|
329
|
-
paths: /* @__PURE__ */
|
|
761
|
+
paths: /* @__PURE__ */ jsx7("g", { transform: "translate(4 5.5)", children: fill("M2 0H0V10H12.01V13L16 9L12.01 5V8H2V0Z") })
|
|
330
762
|
});
|
|
331
763
|
var IconSearch = createIconBasePath(
|
|
332
764
|
"M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"
|
|
@@ -405,7 +837,7 @@ var IconRocket = createIconBasePath(
|
|
|
405
837
|
);
|
|
406
838
|
var IconTerminal = createIconBase({
|
|
407
839
|
name: "IconTerminal",
|
|
408
|
-
paths: /* @__PURE__ */
|
|
840
|
+
paths: /* @__PURE__ */ jsx7(
|
|
409
841
|
"path",
|
|
410
842
|
{
|
|
411
843
|
d: "M3 4v16h18V4H3zm2 2h14v12H5V6zm2 2.2L10.8 12 7 15.8 8.4 17.2l5.2-5.2-5.2-5.2L7 8.2zM13 17h5v-2h-5v2z",
|
|
@@ -417,7 +849,7 @@ var IconTerminal = createIconBase({
|
|
|
417
849
|
});
|
|
418
850
|
var IconOldWindow = createIconBase({
|
|
419
851
|
name: "IconOldWindow",
|
|
420
|
-
paths: /* @__PURE__ */
|
|
852
|
+
paths: /* @__PURE__ */ jsx7(
|
|
421
853
|
"path",
|
|
422
854
|
{
|
|
423
855
|
d: "M3 3v18h18V3H3zm2 7v9h14v-9H5zm1-4h2v1H6V6zm3 0h2v1H9V6z",
|
|
@@ -429,7 +861,7 @@ var IconOldWindow = createIconBase({
|
|
|
429
861
|
});
|
|
430
862
|
var IconCommandCursor = createIconBase({
|
|
431
863
|
name: "IconCommandCursor",
|
|
432
|
-
paths: /* @__PURE__ */
|
|
864
|
+
paths: /* @__PURE__ */ jsx7(
|
|
433
865
|
"path",
|
|
434
866
|
{
|
|
435
867
|
d: "M4 3v18h16V3H4zm2 2h12v14H6V5zm1.5 3.5L11 12l-3.5 3.5L9 17l5-5-5-5-1.5 1.5zM13 17h4v-2h-4v2z",
|
|
@@ -441,7 +873,7 @@ var IconCommandCursor = createIconBase({
|
|
|
441
873
|
});
|
|
442
874
|
var IconDataReel = createIconBase({
|
|
443
875
|
name: "IconDataReel",
|
|
444
|
-
paths: /* @__PURE__ */
|
|
876
|
+
paths: /* @__PURE__ */ jsx7(
|
|
445
877
|
"path",
|
|
446
878
|
{
|
|
447
879
|
d: "M3 5v14h18V5H3zm2 2h14v10H5V7zm3 1a3 3 0 1 0 0 6 3 3 0 0 0 0-6zm8 0a3 3 0 1 0 0 6 3 3 0 0 0 0-6zM10 11h4v1.5h-4V11z",
|
|
@@ -453,7 +885,7 @@ var IconDataReel = createIconBase({
|
|
|
453
885
|
});
|
|
454
886
|
var IconCodePreview = createIconBase({
|
|
455
887
|
name: "IconCodePreview",
|
|
456
|
-
paths: /* @__PURE__ */
|
|
888
|
+
paths: /* @__PURE__ */ jsx7(
|
|
457
889
|
"path",
|
|
458
890
|
{
|
|
459
891
|
d: "M3 3v15h18V3H3zm2 2h14v11H5V5zm3.5 2L5 10.5 8.5 14l1.4-1.4-2.1-2.1 2.1-2.1L8.5 7zm7 0-1.4 1.4 2.1 2.1-2.1 2.1 1.4 1.4 3.5-3.5L15.5 7zM9 20h6v2H9v-2z",
|
|
@@ -465,7 +897,7 @@ var IconCodePreview = createIconBase({
|
|
|
465
897
|
});
|
|
466
898
|
var IconInsightBoard = createIconBase({
|
|
467
899
|
name: "IconInsightBoard",
|
|
468
|
-
paths: /* @__PURE__ */
|
|
900
|
+
paths: /* @__PURE__ */ jsx7(
|
|
469
901
|
"path",
|
|
470
902
|
{
|
|
471
903
|
d: "M3 3v18h18V3H3zm2 2h14v3H5V5zm0 5h6v9H5v-9zm8 0h6v4h-6v-4zm0 6h6v3h-6v-3zM6 6h2v1H6V6zm3 0h2v1H9V6z",
|
|
@@ -477,14 +909,14 @@ var IconInsightBoard = createIconBase({
|
|
|
477
909
|
});
|
|
478
910
|
var IconEventStream = createIconBase({
|
|
479
911
|
name: "IconEventStream",
|
|
480
|
-
paths: /* @__PURE__ */
|
|
481
|
-
/* @__PURE__ */
|
|
912
|
+
paths: /* @__PURE__ */ jsxs5(Fragment2, { children: [
|
|
913
|
+
/* @__PURE__ */ jsx7("path", { d: "M5 4h2v16H5V4z", fill: "currentColor", opacity: "0.45" }),
|
|
482
914
|
fill("M6 3a3 3 0 1 0 0 6 3 3 0 0 0 0-6zm0 8a3 3 0 1 0 0 6 3 3 0 0 0 0-6zm5-6h10v2H11V5zm0 8h7v2h-7v-2zm0 5h10v2H11v-2z")
|
|
483
915
|
] })
|
|
484
916
|
});
|
|
485
917
|
var IconFeatureGate = createIconBase({
|
|
486
918
|
name: "IconFeatureGate",
|
|
487
|
-
paths: /* @__PURE__ */
|
|
919
|
+
paths: /* @__PURE__ */ jsx7(
|
|
488
920
|
"path",
|
|
489
921
|
{
|
|
490
922
|
d: "M4 3h2v18H4V3zm3 2h12l-3 4 3 4H7V5zm4 1-2.2 4H12l-1 4 4.2-5H12l1-3h-2z",
|
|
@@ -496,7 +928,7 @@ var IconFeatureGate = createIconBase({
|
|
|
496
928
|
});
|
|
497
929
|
var IconReplayFrame = createIconBase({
|
|
498
930
|
name: "IconReplayFrame",
|
|
499
|
-
paths: /* @__PURE__ */
|
|
931
|
+
paths: /* @__PURE__ */ jsx7(
|
|
500
932
|
"path",
|
|
501
933
|
{
|
|
502
934
|
d: "M3 3v18h18V3H3zm2 2h14v11H5V5zm5 2v7l6-3.5L10 7zm-5 11h9v1H5v-1zm11 0h3v1h-3v-1z",
|
|
@@ -520,7 +952,7 @@ var IconExperimentSplit = createIconBase({
|
|
|
520
952
|
});
|
|
521
953
|
var IconSurveyCard = createIconBase({
|
|
522
954
|
name: "IconSurveyCard",
|
|
523
|
-
paths: /* @__PURE__ */
|
|
955
|
+
paths: /* @__PURE__ */ jsx7(
|
|
524
956
|
"path",
|
|
525
957
|
{
|
|
526
958
|
d: "M3 3v18h18V3H3zm2 2h14v14H5V5zm2 2h7v2H7V7zm0 4h4v2H7v-2zm7-.4-2.5 2.5-1-1-1.4 1.4 2.4 2.4 3.9-3.9-1.4-1.4zM7 16h10v1H7v-1z",
|
|
@@ -551,7 +983,7 @@ var IconFlask = createIconBasePath(
|
|
|
551
983
|
);
|
|
552
984
|
var IconSpinner = forwardRef4(function IconSpinner2(_a, ref) {
|
|
553
985
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
554
|
-
return /* @__PURE__ */
|
|
986
|
+
return /* @__PURE__ */ jsx7(IconSync, __spreadValues({ ref, className: cn("ph-icon-spin", className) }, props));
|
|
555
987
|
});
|
|
556
988
|
IconSpinner.displayName = "IconSpinner";
|
|
557
989
|
var CANONICAL_ICONS = {
|
|
@@ -652,12 +1084,12 @@ for (const [name, Icon] of Object.entries(CANONICAL_ICONS)) {
|
|
|
652
1084
|
var IconByName = forwardRef4(function IconByName2(_a, ref) {
|
|
653
1085
|
var _b = _a, { name } = _b, props = __objRest(_b, ["name"]);
|
|
654
1086
|
const Icon = PH_ICONS[name];
|
|
655
|
-
return /* @__PURE__ */
|
|
1087
|
+
return /* @__PURE__ */ jsx7(Icon, __spreadValues({ ref }, props));
|
|
656
1088
|
});
|
|
657
1089
|
IconByName.displayName = "IconByName";
|
|
658
1090
|
|
|
659
1091
|
// src/components/ui/Alert.tsx
|
|
660
|
-
import { jsx as
|
|
1092
|
+
import { jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
661
1093
|
var statusConfig = {
|
|
662
1094
|
info: { icon: IconInfo },
|
|
663
1095
|
success: { icon: IconCheckCircle },
|
|
@@ -696,7 +1128,7 @@ var Alert = forwardRef5(function Alert2(_a, ref) {
|
|
|
696
1128
|
]);
|
|
697
1129
|
const config = statusConfig[status];
|
|
698
1130
|
const Icon = config.icon;
|
|
699
|
-
return /* @__PURE__ */
|
|
1131
|
+
return /* @__PURE__ */ jsxs6(
|
|
700
1132
|
"div",
|
|
701
1133
|
__spreadProps(__spreadValues({
|
|
702
1134
|
ref,
|
|
@@ -705,20 +1137,20 @@ var Alert = forwardRef5(function Alert2(_a, ref) {
|
|
|
705
1137
|
className: cn("ph-alert", statusClassMap[status], className)
|
|
706
1138
|
}, props), {
|
|
707
1139
|
children: [
|
|
708
|
-
icon != null ? icon : /* @__PURE__ */
|
|
709
|
-
/* @__PURE__ */
|
|
710
|
-
title && /* @__PURE__ */
|
|
711
|
-
description && /* @__PURE__ */
|
|
1140
|
+
icon != null ? icon : /* @__PURE__ */ jsx8(Icon, { className: "ph-alert-icon mt-0.5 h-5 w-5 shrink-0", "aria-hidden": true }),
|
|
1141
|
+
/* @__PURE__ */ jsxs6("div", { className: "min-w-0 flex-1", children: [
|
|
1142
|
+
title && /* @__PURE__ */ jsx8("p", { className: "font-semibold", children: title }),
|
|
1143
|
+
description && /* @__PURE__ */ jsx8("p", { className: "mt-1 text-sm text-ph-subtle", children: description }),
|
|
712
1144
|
children
|
|
713
1145
|
] }),
|
|
714
|
-
onDismiss && /* @__PURE__ */
|
|
1146
|
+
onDismiss && /* @__PURE__ */ jsx8(
|
|
715
1147
|
"button",
|
|
716
1148
|
{
|
|
717
1149
|
type: "button",
|
|
718
1150
|
onClick: onDismiss,
|
|
719
1151
|
className: "ph-alert-dismiss",
|
|
720
1152
|
"aria-label": dismissLabel,
|
|
721
|
-
children: /* @__PURE__ */
|
|
1153
|
+
children: /* @__PURE__ */ jsx8(IconClose, { className: "h-4 w-4", "aria-hidden": true })
|
|
722
1154
|
}
|
|
723
1155
|
)
|
|
724
1156
|
]
|
|
@@ -729,7 +1161,7 @@ Alert.displayName = "Alert";
|
|
|
729
1161
|
|
|
730
1162
|
// src/components/ui/Badge.tsx
|
|
731
1163
|
import { forwardRef as forwardRef6 } from "react";
|
|
732
|
-
import { jsx as
|
|
1164
|
+
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
733
1165
|
var variantMap = {
|
|
734
1166
|
brand: "ph-badge-brand",
|
|
735
1167
|
neutral: "ph-badge-neutral",
|
|
@@ -755,7 +1187,7 @@ var Badge = forwardRef6(function Badge2(_a, ref) {
|
|
|
755
1187
|
"children",
|
|
756
1188
|
"className"
|
|
757
1189
|
]);
|
|
758
|
-
return /* @__PURE__ */
|
|
1190
|
+
return /* @__PURE__ */ jsx9(
|
|
759
1191
|
"span",
|
|
760
1192
|
__spreadProps(__spreadValues({
|
|
761
1193
|
ref,
|
|
@@ -776,7 +1208,7 @@ Badge.displayName = "Badge";
|
|
|
776
1208
|
import {
|
|
777
1209
|
forwardRef as forwardRef7
|
|
778
1210
|
} from "react";
|
|
779
|
-
import { Fragment as Fragment3, jsx as
|
|
1211
|
+
import { Fragment as Fragment3, jsx as jsx10, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
780
1212
|
var variantMap2 = {
|
|
781
1213
|
default: "",
|
|
782
1214
|
outlined: "border-2 border-ph-border",
|
|
@@ -827,18 +1259,18 @@ var Card = forwardRef7(function Card2(_a, ref) {
|
|
|
827
1259
|
(interactive || isLink || isButton) && "ph-card-interactive",
|
|
828
1260
|
className
|
|
829
1261
|
);
|
|
830
|
-
const cardContent = /* @__PURE__ */
|
|
831
|
-
media && /* @__PURE__ */
|
|
832
|
-
/* @__PURE__ */
|
|
833
|
-
title && /* @__PURE__ */
|
|
834
|
-
description && /* @__PURE__ */
|
|
1262
|
+
const cardContent = /* @__PURE__ */ jsxs7(Fragment3, { children: [
|
|
1263
|
+
media && /* @__PURE__ */ jsx10("div", { className: "ph-card-media", children: media }),
|
|
1264
|
+
/* @__PURE__ */ jsxs7("div", { className: cn("ph-card-body", bodyClassName), children: [
|
|
1265
|
+
title && /* @__PURE__ */ jsx10(Title3, { className: "ph-card-title", children: title }),
|
|
1266
|
+
description && /* @__PURE__ */ jsx10("p", { className: "text-sm text-ph-subtle", children: description }),
|
|
835
1267
|
children,
|
|
836
|
-
actions && /* @__PURE__ */
|
|
1268
|
+
actions && /* @__PURE__ */ jsx10("div", { className: "ph-card-actions", children: actions })
|
|
837
1269
|
] }),
|
|
838
|
-
footer && /* @__PURE__ */
|
|
1270
|
+
footer && /* @__PURE__ */ jsx10("div", { className: "border-t border-ph-border px-6 py-4 text-xs text-ph-subtle", children: footer })
|
|
839
1271
|
] });
|
|
840
1272
|
if (isLink) {
|
|
841
|
-
return /* @__PURE__ */
|
|
1273
|
+
return /* @__PURE__ */ jsx10(
|
|
842
1274
|
"a",
|
|
843
1275
|
__spreadProps(__spreadValues({
|
|
844
1276
|
ref,
|
|
@@ -853,7 +1285,7 @@ var Card = forwardRef7(function Card2(_a, ref) {
|
|
|
853
1285
|
);
|
|
854
1286
|
}
|
|
855
1287
|
if (isButton) {
|
|
856
|
-
return /* @__PURE__ */
|
|
1288
|
+
return /* @__PURE__ */ jsx10(
|
|
857
1289
|
"button",
|
|
858
1290
|
__spreadProps(__spreadValues({
|
|
859
1291
|
ref,
|
|
@@ -865,12 +1297,12 @@ var Card = forwardRef7(function Card2(_a, ref) {
|
|
|
865
1297
|
})
|
|
866
1298
|
);
|
|
867
1299
|
}
|
|
868
|
-
return /* @__PURE__ */
|
|
1300
|
+
return /* @__PURE__ */ jsx10("div", __spreadProps(__spreadValues({ ref, className: cardClassName }, props), { children: cardContent }));
|
|
869
1301
|
});
|
|
870
1302
|
Card.displayName = "Card";
|
|
871
1303
|
|
|
872
1304
|
// src/components/ui/Kbd.tsx
|
|
873
|
-
import { jsx as
|
|
1305
|
+
import { jsx as jsx11, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
874
1306
|
var platformLabels = {
|
|
875
1307
|
text: {
|
|
876
1308
|
command: "Command",
|
|
@@ -929,7 +1361,7 @@ function Kbd(_a) {
|
|
|
929
1361
|
"aria-label"
|
|
930
1362
|
]);
|
|
931
1363
|
if (variant === "token") {
|
|
932
|
-
return /* @__PURE__ */
|
|
1364
|
+
return /* @__PURE__ */ jsx11(
|
|
933
1365
|
"code",
|
|
934
1366
|
__spreadProps(__spreadValues({
|
|
935
1367
|
className: cn("ph-code-token ph-kbd", className),
|
|
@@ -944,7 +1376,7 @@ function Kbd(_a) {
|
|
|
944
1376
|
const displayKeys = sourceKeys.map((key) => formatKey(key, platform));
|
|
945
1377
|
const accessibleLabel = ariaLabel != null ? ariaLabel : getShortcutLabel(displayKeys);
|
|
946
1378
|
if (variant === "key") {
|
|
947
|
-
return /* @__PURE__ */
|
|
1379
|
+
return /* @__PURE__ */ jsx11(
|
|
948
1380
|
"kbd",
|
|
949
1381
|
__spreadProps(__spreadValues({
|
|
950
1382
|
className: cn("ph-keycap", className),
|
|
@@ -955,16 +1387,16 @@ function Kbd(_a) {
|
|
|
955
1387
|
})
|
|
956
1388
|
);
|
|
957
1389
|
}
|
|
958
|
-
return /* @__PURE__ */
|
|
1390
|
+
return /* @__PURE__ */ jsx11(
|
|
959
1391
|
"kbd",
|
|
960
1392
|
__spreadProps(__spreadValues({
|
|
961
1393
|
className: cn("ph-shortcut-group ph-keycap", className),
|
|
962
1394
|
role: accessibleLabel ? "img" : void 0,
|
|
963
1395
|
"aria-label": accessibleLabel
|
|
964
1396
|
}, props), {
|
|
965
|
-
children: displayKeys.map((key, index) => /* @__PURE__ */
|
|
966
|
-
index > 0 && separator != null ? /* @__PURE__ */
|
|
967
|
-
/* @__PURE__ */
|
|
1397
|
+
children: displayKeys.map((key, index) => /* @__PURE__ */ jsxs8("span", { className: "contents", children: [
|
|
1398
|
+
index > 0 && separator != null ? /* @__PURE__ */ jsx11("span", { className: "ph-shortcut-separator", "aria-hidden": "true", children: separator }) : null,
|
|
1399
|
+
/* @__PURE__ */ jsx11("span", { className: "ph-shortcut-key", "aria-hidden": accessibleLabel ? true : void 0, children: key })
|
|
968
1400
|
] }, index))
|
|
969
1401
|
})
|
|
970
1402
|
);
|
|
@@ -985,7 +1417,7 @@ function getShortcutLabel(keys) {
|
|
|
985
1417
|
}
|
|
986
1418
|
|
|
987
1419
|
// src/components/ui/Loader.tsx
|
|
988
|
-
import { jsx as
|
|
1420
|
+
import { jsx as jsx12, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
989
1421
|
var loaderSizeClass = {
|
|
990
1422
|
sm: "ph-loader-sm",
|
|
991
1423
|
md: "ph-loader-md",
|
|
@@ -1011,7 +1443,7 @@ function Loader(_a) {
|
|
|
1011
1443
|
"label",
|
|
1012
1444
|
"className"
|
|
1013
1445
|
]);
|
|
1014
|
-
return /* @__PURE__ */
|
|
1446
|
+
return /* @__PURE__ */ jsxs9(
|
|
1015
1447
|
"span",
|
|
1016
1448
|
__spreadProps(__spreadValues({
|
|
1017
1449
|
role: "status",
|
|
@@ -1019,20 +1451,20 @@ function Loader(_a) {
|
|
|
1019
1451
|
className: cn("ph-loader", loaderSizeClass[size], className)
|
|
1020
1452
|
}, props), {
|
|
1021
1453
|
children: [
|
|
1022
|
-
variant === "spinner" ? /* @__PURE__ */
|
|
1023
|
-
variant === "dots" ? /* @__PURE__ */
|
|
1024
|
-
/* @__PURE__ */
|
|
1025
|
-
/* @__PURE__ */
|
|
1026
|
-
/* @__PURE__ */
|
|
1454
|
+
variant === "spinner" ? /* @__PURE__ */ jsx12("span", { className: "ph-loading", "aria-hidden": true }) : null,
|
|
1455
|
+
variant === "dots" ? /* @__PURE__ */ jsxs9("span", { className: "ph-loading-dots", "aria-hidden": true, children: [
|
|
1456
|
+
/* @__PURE__ */ jsx12("span", {}),
|
|
1457
|
+
/* @__PURE__ */ jsx12("span", {}),
|
|
1458
|
+
/* @__PURE__ */ jsx12("span", {})
|
|
1027
1459
|
] }) : null,
|
|
1028
|
-
variant === "pulse" ? /* @__PURE__ */
|
|
1460
|
+
variant === "pulse" ? /* @__PURE__ */ jsx12("span", { className: "ph-loading-pulse", "aria-hidden": true }) : null
|
|
1029
1461
|
]
|
|
1030
1462
|
})
|
|
1031
1463
|
);
|
|
1032
1464
|
}
|
|
1033
1465
|
function Skeleton(_a) {
|
|
1034
1466
|
var _b = _a, { shape = "text", className } = _b, props = __objRest(_b, ["shape", "className"]);
|
|
1035
|
-
return /* @__PURE__ */
|
|
1467
|
+
return /* @__PURE__ */ jsx12(
|
|
1036
1468
|
"span",
|
|
1037
1469
|
__spreadValues({
|
|
1038
1470
|
className: cn("ph-skeleton", skeletonShapeClass[shape], className),
|
|
@@ -1056,53 +1488,81 @@ function LoadingState(_a) {
|
|
|
1056
1488
|
"size",
|
|
1057
1489
|
"className"
|
|
1058
1490
|
]);
|
|
1059
|
-
return /* @__PURE__ */
|
|
1060
|
-
/* @__PURE__ */
|
|
1061
|
-
/* @__PURE__ */
|
|
1062
|
-
/* @__PURE__ */
|
|
1063
|
-
description ? /* @__PURE__ */
|
|
1491
|
+
return /* @__PURE__ */ jsxs9("div", __spreadProps(__spreadValues({ className: cn("ph-loading-state", className), role: "status", "aria-label": label }, props), { children: [
|
|
1492
|
+
/* @__PURE__ */ jsx12(Loader, { variant, size, label, "aria-hidden": "true" }),
|
|
1493
|
+
/* @__PURE__ */ jsxs9("div", { className: "ph-loading-state__copy", children: [
|
|
1494
|
+
/* @__PURE__ */ jsx12("strong", { children: title }),
|
|
1495
|
+
description ? /* @__PURE__ */ jsx12("span", { children: description }) : null
|
|
1064
1496
|
] })
|
|
1065
1497
|
] }));
|
|
1066
1498
|
}
|
|
1067
1499
|
|
|
1068
1500
|
// src/components/ui/AuthLayout.tsx
|
|
1069
|
-
import { useId } from "react";
|
|
1070
|
-
import { jsx as
|
|
1501
|
+
import { useId as useId2 } from "react";
|
|
1502
|
+
import { jsx as jsx13, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1071
1503
|
function AuthLayout(_a) {
|
|
1072
1504
|
var _b = _a, { brand, footer, aside, children, className } = _b, props = __objRest(_b, ["brand", "footer", "aside", "children", "className"]);
|
|
1073
|
-
return /* @__PURE__ */
|
|
1074
|
-
aside ? /* @__PURE__ */
|
|
1075
|
-
/* @__PURE__ */
|
|
1076
|
-
brand ? /* @__PURE__ */
|
|
1505
|
+
return /* @__PURE__ */ jsxs10("div", __spreadProps(__spreadValues({ className: cn("ph-auth-layout", aside != null && "ph-auth-layout--split", className) }, props), { children: [
|
|
1506
|
+
aside ? /* @__PURE__ */ jsx13("aside", { className: "ph-auth-layout__aside", children: aside }) : null,
|
|
1507
|
+
/* @__PURE__ */ jsx13("div", { className: "ph-auth-layout__main", children: /* @__PURE__ */ jsxs10("div", { className: "ph-auth-layout__column", children: [
|
|
1508
|
+
brand ? /* @__PURE__ */ jsx13("div", { className: "ph-auth-layout__brand", children: brand }) : null,
|
|
1077
1509
|
children,
|
|
1078
|
-
footer ? /* @__PURE__ */
|
|
1510
|
+
footer ? /* @__PURE__ */ jsx13("footer", { className: "ph-auth-layout__footer", children: footer }) : null
|
|
1079
1511
|
] }) })
|
|
1080
1512
|
] }));
|
|
1081
1513
|
}
|
|
1082
1514
|
function AuthCard(_a) {
|
|
1083
1515
|
var _b = _a, { title, description, footer, children, className } = _b, props = __objRest(_b, ["title", "description", "footer", "children", "className"]);
|
|
1084
|
-
const titleId =
|
|
1085
|
-
return /* @__PURE__ */
|
|
1086
|
-
/* @__PURE__ */
|
|
1087
|
-
/* @__PURE__ */
|
|
1088
|
-
description ? /* @__PURE__ */
|
|
1516
|
+
const titleId = useId2();
|
|
1517
|
+
return /* @__PURE__ */ jsxs10("section", __spreadProps(__spreadValues({ className: cn("ph-auth-card", className), "aria-labelledby": titleId }, props), { children: [
|
|
1518
|
+
/* @__PURE__ */ jsxs10("header", { className: "ph-auth-card__header", children: [
|
|
1519
|
+
/* @__PURE__ */ jsx13("h1", { id: titleId, children: title }),
|
|
1520
|
+
description ? /* @__PURE__ */ jsx13("p", { children: description }) : null
|
|
1089
1521
|
] }),
|
|
1090
|
-
/* @__PURE__ */
|
|
1091
|
-
footer ? /* @__PURE__ */
|
|
1522
|
+
/* @__PURE__ */ jsx13("div", { className: "ph-auth-card__body", children }),
|
|
1523
|
+
footer ? /* @__PURE__ */ jsx13("footer", { className: "ph-auth-card__footer", children: footer }) : null
|
|
1092
1524
|
] }));
|
|
1093
1525
|
}
|
|
1094
1526
|
function AuthDivider(_a) {
|
|
1095
1527
|
var _b = _a, { children = "or continue with", className } = _b, props = __objRest(_b, ["children", "className"]);
|
|
1096
|
-
return /* @__PURE__ */
|
|
1528
|
+
return /* @__PURE__ */ jsx13("div", __spreadProps(__spreadValues({ className: cn("ph-auth-divider", className) }, props), { children: /* @__PURE__ */ jsx13("span", { children }) }));
|
|
1529
|
+
}
|
|
1530
|
+
|
|
1531
|
+
// src/lib/suite-analytics.ts
|
|
1532
|
+
var SUITE_ANALYTICS_EVENT = "shellstack:analytics";
|
|
1533
|
+
function trackSuiteEvent(event, properties) {
|
|
1534
|
+
if (typeof window === "undefined" || !event) return;
|
|
1535
|
+
try {
|
|
1536
|
+
window.dispatchEvent(
|
|
1537
|
+
new CustomEvent(SUITE_ANALYTICS_EVENT, {
|
|
1538
|
+
detail: { event, properties }
|
|
1539
|
+
})
|
|
1540
|
+
);
|
|
1541
|
+
} catch (e) {
|
|
1542
|
+
}
|
|
1543
|
+
}
|
|
1544
|
+
function subscribeSuiteAnalytics(handler) {
|
|
1545
|
+
if (typeof window === "undefined") return () => {
|
|
1546
|
+
};
|
|
1547
|
+
const listener = (raw) => {
|
|
1548
|
+
const detail = raw.detail;
|
|
1549
|
+
if (!(detail == null ? void 0 : detail.event)) return;
|
|
1550
|
+
try {
|
|
1551
|
+
handler(detail.event, detail.properties);
|
|
1552
|
+
} catch (e) {
|
|
1553
|
+
}
|
|
1554
|
+
};
|
|
1555
|
+
window.addEventListener(SUITE_ANALYTICS_EVENT, listener);
|
|
1556
|
+
return () => window.removeEventListener(SUITE_ANALYTICS_EVENT, listener);
|
|
1097
1557
|
}
|
|
1098
1558
|
|
|
1099
1559
|
// src/components/ui/SettingsLayout.tsx
|
|
1100
|
-
import { jsx as
|
|
1560
|
+
import { jsx as jsx14, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1101
1561
|
function SettingsNav(_a) {
|
|
1102
1562
|
var _b = _a, { groups, className } = _b, props = __objRest(_b, ["groups", "className"]);
|
|
1103
|
-
return /* @__PURE__ */
|
|
1104
|
-
/* @__PURE__ */
|
|
1105
|
-
/* @__PURE__ */
|
|
1563
|
+
return /* @__PURE__ */ jsx14("div", __spreadProps(__spreadValues({ className: cn("ph-settings-nav", className) }, props), { children: groups.map((group, index) => /* @__PURE__ */ jsxs11("div", { className: "ph-settings-nav__group", children: [
|
|
1564
|
+
/* @__PURE__ */ jsx14("p", { className: "ph-settings-nav__heading", children: group.label }),
|
|
1565
|
+
/* @__PURE__ */ jsx14("div", { className: "ph-settings-nav__items", children: group.items.map((item) => /* @__PURE__ */ jsxs11(
|
|
1106
1566
|
"a",
|
|
1107
1567
|
{
|
|
1108
1568
|
href: item.href,
|
|
@@ -1113,10 +1573,11 @@ function SettingsNav(_a) {
|
|
|
1113
1573
|
item.active && "ph-settings-nav__item--active"
|
|
1114
1574
|
),
|
|
1115
1575
|
"aria-current": item.active ? "page" : void 0,
|
|
1576
|
+
onClick: () => trackSuiteEvent("Tab Viewed", { tab: item.id }),
|
|
1116
1577
|
children: [
|
|
1117
|
-
item.icon ? /* @__PURE__ */
|
|
1118
|
-
/* @__PURE__ */
|
|
1119
|
-
item.badge ? /* @__PURE__ */
|
|
1578
|
+
item.icon ? /* @__PURE__ */ jsx14("span", { className: "ph-settings-nav__icon", children: item.icon }) : null,
|
|
1579
|
+
/* @__PURE__ */ jsx14("span", { children: item.label }),
|
|
1580
|
+
item.badge ? /* @__PURE__ */ jsx14("span", { className: "ph-settings-nav__badge", children: item.badge }) : null
|
|
1120
1581
|
]
|
|
1121
1582
|
},
|
|
1122
1583
|
item.id
|
|
@@ -1141,31 +1602,31 @@ function SettingsLayout(_a) {
|
|
|
1141
1602
|
"children",
|
|
1142
1603
|
"className"
|
|
1143
1604
|
]);
|
|
1144
|
-
return /* @__PURE__ */
|
|
1145
|
-
/* @__PURE__ */
|
|
1146
|
-
/* @__PURE__ */
|
|
1147
|
-
/* @__PURE__ */
|
|
1148
|
-
description ? /* @__PURE__ */
|
|
1605
|
+
return /* @__PURE__ */ jsxs11("section", __spreadProps(__spreadValues({ className: cn("ph-settings-layout", className) }, props), { children: [
|
|
1606
|
+
/* @__PURE__ */ jsxs11("header", { className: "ph-settings-layout__header", children: [
|
|
1607
|
+
/* @__PURE__ */ jsxs11("div", { children: [
|
|
1608
|
+
/* @__PURE__ */ jsx14("h2", { children: title }),
|
|
1609
|
+
description ? /* @__PURE__ */ jsx14("p", { children: description }) : null
|
|
1149
1610
|
] }),
|
|
1150
|
-
actions ? /* @__PURE__ */
|
|
1611
|
+
actions ? /* @__PURE__ */ jsx14("div", { className: "ph-settings-layout__actions", children: actions }) : null
|
|
1151
1612
|
] }),
|
|
1152
|
-
/* @__PURE__ */
|
|
1153
|
-
/* @__PURE__ */
|
|
1154
|
-
/* @__PURE__ */
|
|
1613
|
+
/* @__PURE__ */ jsxs11("details", { className: "ph-settings-layout__mobile-nav", children: [
|
|
1614
|
+
/* @__PURE__ */ jsxs11("summary", { children: [
|
|
1615
|
+
/* @__PURE__ */ jsx14(IconTuning, { className: "h-4 w-4", "aria-hidden": true }),
|
|
1155
1616
|
"Settings menu"
|
|
1156
1617
|
] }),
|
|
1157
|
-
/* @__PURE__ */
|
|
1618
|
+
/* @__PURE__ */ jsx14("nav", { "aria-label": navigationLabel, children: navigation })
|
|
1158
1619
|
] }),
|
|
1159
|
-
/* @__PURE__ */
|
|
1160
|
-
/* @__PURE__ */
|
|
1161
|
-
/* @__PURE__ */
|
|
1620
|
+
/* @__PURE__ */ jsxs11("div", { className: "ph-settings-layout__grid", children: [
|
|
1621
|
+
/* @__PURE__ */ jsx14("aside", { className: "ph-settings-layout__sidebar", children: /* @__PURE__ */ jsx14("nav", { "aria-label": navigationLabel, children: navigation }) }),
|
|
1622
|
+
/* @__PURE__ */ jsx14("div", { className: "ph-settings-layout__content", children })
|
|
1162
1623
|
] })
|
|
1163
1624
|
] }));
|
|
1164
1625
|
}
|
|
1165
1626
|
|
|
1166
1627
|
// src/components/ui/DropdownMenu.tsx
|
|
1167
1628
|
import * as DropdownPrimitive from "@radix-ui/react-dropdown-menu";
|
|
1168
|
-
import { jsx as
|
|
1629
|
+
import { jsx as jsx15, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1169
1630
|
var sizeClass2 = {
|
|
1170
1631
|
xs: "ph-btn-xs",
|
|
1171
1632
|
sm: "ph-btn-sm",
|
|
@@ -1187,7 +1648,7 @@ function DropdownContent({
|
|
|
1187
1648
|
avoidCollisions = true,
|
|
1188
1649
|
panelClassName
|
|
1189
1650
|
}) {
|
|
1190
|
-
return /* @__PURE__ */
|
|
1651
|
+
return /* @__PURE__ */ jsx15(DropdownPrimitive.Portal, { children: /* @__PURE__ */ jsxs12(
|
|
1191
1652
|
DropdownPrimitive.Content,
|
|
1192
1653
|
{
|
|
1193
1654
|
className: cn("ph-dropdown-panel", panelClassName),
|
|
@@ -1200,7 +1661,7 @@ function DropdownContent({
|
|
|
1200
1661
|
sticky: "partial",
|
|
1201
1662
|
children: [
|
|
1202
1663
|
children,
|
|
1203
|
-
/* @__PURE__ */
|
|
1664
|
+
/* @__PURE__ */ jsx15(
|
|
1204
1665
|
DropdownPrimitive.Arrow,
|
|
1205
1666
|
{
|
|
1206
1667
|
className: "ph-dropdown-arrow",
|
|
@@ -1252,7 +1713,7 @@ function DropdownMenu(_a) {
|
|
|
1252
1713
|
"modal",
|
|
1253
1714
|
"disabled"
|
|
1254
1715
|
]);
|
|
1255
|
-
return /* @__PURE__ */
|
|
1716
|
+
return /* @__PURE__ */ jsx15("div", __spreadProps(__spreadValues({ className: cn("ph-dropdown", className) }, props), { children: /* @__PURE__ */ jsxs12(
|
|
1256
1717
|
DropdownPrimitive.Root,
|
|
1257
1718
|
{
|
|
1258
1719
|
open,
|
|
@@ -1260,7 +1721,7 @@ function DropdownMenu(_a) {
|
|
|
1260
1721
|
onOpenChange,
|
|
1261
1722
|
modal,
|
|
1262
1723
|
children: [
|
|
1263
|
-
/* @__PURE__ */
|
|
1724
|
+
/* @__PURE__ */ jsx15(DropdownPrimitive.Trigger, { asChild: true, disabled, children: /* @__PURE__ */ jsx15(
|
|
1264
1725
|
"button",
|
|
1265
1726
|
{
|
|
1266
1727
|
type: "button",
|
|
@@ -1271,7 +1732,7 @@ function DropdownMenu(_a) {
|
|
|
1271
1732
|
children: trigger
|
|
1272
1733
|
}
|
|
1273
1734
|
) }),
|
|
1274
|
-
/* @__PURE__ */
|
|
1735
|
+
/* @__PURE__ */ jsx15(
|
|
1275
1736
|
DropdownContent,
|
|
1276
1737
|
{
|
|
1277
1738
|
align,
|
|
@@ -1336,8 +1797,8 @@ function DropdownButton(_a) {
|
|
|
1336
1797
|
"modal",
|
|
1337
1798
|
"disabled"
|
|
1338
1799
|
]);
|
|
1339
|
-
const trailing = sideIcon != null ? sideIcon : /* @__PURE__ */
|
|
1340
|
-
return /* @__PURE__ */
|
|
1800
|
+
const trailing = sideIcon != null ? sideIcon : /* @__PURE__ */ jsx15(IconChevronDown, { className: "h-4 w-4", "aria-hidden": true });
|
|
1801
|
+
return /* @__PURE__ */ jsx15("div", __spreadProps(__spreadValues({ className: cn("ph-dropdown", className) }, props), { children: /* @__PURE__ */ jsxs12(
|
|
1341
1802
|
DropdownPrimitive.Root,
|
|
1342
1803
|
{
|
|
1343
1804
|
open,
|
|
@@ -1345,7 +1806,7 @@ function DropdownButton(_a) {
|
|
|
1345
1806
|
onOpenChange,
|
|
1346
1807
|
modal,
|
|
1347
1808
|
children: [
|
|
1348
|
-
/* @__PURE__ */
|
|
1809
|
+
/* @__PURE__ */ jsx15(DropdownPrimitive.Trigger, { asChild: true, disabled, children: /* @__PURE__ */ jsx15(
|
|
1349
1810
|
"button",
|
|
1350
1811
|
{
|
|
1351
1812
|
type: "button",
|
|
@@ -1358,7 +1819,7 @@ function DropdownButton(_a) {
|
|
|
1358
1819
|
split && "ph-btn-split"
|
|
1359
1820
|
),
|
|
1360
1821
|
"aria-label": ariaLabel,
|
|
1361
|
-
children: /* @__PURE__ */
|
|
1822
|
+
children: /* @__PURE__ */ jsx15(
|
|
1362
1823
|
ButtonChrome,
|
|
1363
1824
|
{
|
|
1364
1825
|
label,
|
|
@@ -1369,7 +1830,7 @@ function DropdownButton(_a) {
|
|
|
1369
1830
|
)
|
|
1370
1831
|
}
|
|
1371
1832
|
) }),
|
|
1372
|
-
/* @__PURE__ */
|
|
1833
|
+
/* @__PURE__ */ jsx15(
|
|
1373
1834
|
DropdownContent,
|
|
1374
1835
|
{
|
|
1375
1836
|
align,
|
|
@@ -1396,7 +1857,7 @@ function DropdownItem(_a) {
|
|
|
1396
1857
|
"children",
|
|
1397
1858
|
"disabled"
|
|
1398
1859
|
]);
|
|
1399
|
-
return /* @__PURE__ */
|
|
1860
|
+
return /* @__PURE__ */ jsx15(DropdownPrimitive.Item, { asChild: true, disabled, children: /* @__PURE__ */ jsx15(
|
|
1400
1861
|
"button",
|
|
1401
1862
|
__spreadProps(__spreadValues({
|
|
1402
1863
|
type: "button",
|
|
@@ -1408,7 +1869,7 @@ function DropdownItem(_a) {
|
|
|
1408
1869
|
) });
|
|
1409
1870
|
}
|
|
1410
1871
|
function DropdownRadioGroup(props) {
|
|
1411
|
-
return /* @__PURE__ */
|
|
1872
|
+
return /* @__PURE__ */ jsx15(DropdownPrimitive.RadioGroup, __spreadValues({}, props));
|
|
1412
1873
|
}
|
|
1413
1874
|
function DropdownRadioItem(_a) {
|
|
1414
1875
|
var _b = _a, {
|
|
@@ -1418,26 +1879,26 @@ function DropdownRadioItem(_a) {
|
|
|
1418
1879
|
"className",
|
|
1419
1880
|
"children"
|
|
1420
1881
|
]);
|
|
1421
|
-
return /* @__PURE__ */
|
|
1882
|
+
return /* @__PURE__ */ jsxs12(
|
|
1422
1883
|
DropdownPrimitive.RadioItem,
|
|
1423
1884
|
__spreadProps(__spreadValues({
|
|
1424
1885
|
className: cn("ph-dropdown-item ph-dropdown-radio-item", className)
|
|
1425
1886
|
}, props), {
|
|
1426
1887
|
children: [
|
|
1427
|
-
/* @__PURE__ */
|
|
1428
|
-
/* @__PURE__ */
|
|
1888
|
+
/* @__PURE__ */ jsx15("span", { className: "ph-dropdown-item-indicator", "aria-hidden": true, children: /* @__PURE__ */ jsx15(DropdownPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx15(IconCheck, { className: "h-3.5 w-3.5" }) }) }),
|
|
1889
|
+
/* @__PURE__ */ jsx15("span", { children })
|
|
1429
1890
|
]
|
|
1430
1891
|
})
|
|
1431
1892
|
);
|
|
1432
1893
|
}
|
|
1433
1894
|
|
|
1434
1895
|
// src/components/ui/Input.tsx
|
|
1435
|
-
import { forwardRef as forwardRef8, useId as
|
|
1896
|
+
import { forwardRef as forwardRef8, useId as useId4, useState as useState2 } from "react";
|
|
1436
1897
|
import { Eye, EyeClosed } from "iconoir-react";
|
|
1437
1898
|
|
|
1438
1899
|
// src/components/ui/FormField.tsx
|
|
1439
|
-
import { useId as
|
|
1440
|
-
import { jsx as
|
|
1900
|
+
import { useId as useId3 } from "react";
|
|
1901
|
+
import { jsx as jsx16, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1441
1902
|
function FormField(_a) {
|
|
1442
1903
|
var _b = _a, {
|
|
1443
1904
|
controlId,
|
|
@@ -1460,7 +1921,7 @@ function FormField(_a) {
|
|
|
1460
1921
|
"children",
|
|
1461
1922
|
"className"
|
|
1462
1923
|
]);
|
|
1463
|
-
const generatedId =
|
|
1924
|
+
const generatedId = useId3();
|
|
1464
1925
|
const id = controlId != null ? controlId : generatedId;
|
|
1465
1926
|
const descriptionId = helperText && !error ? `${id}-description` : void 0;
|
|
1466
1927
|
const errorId = error ? `${id}-error` : void 0;
|
|
@@ -1470,26 +1931,26 @@ function FormField(_a) {
|
|
|
1470
1931
|
"aria-errormessage": errorId,
|
|
1471
1932
|
"aria-invalid": error ? true : void 0
|
|
1472
1933
|
};
|
|
1473
|
-
return /* @__PURE__ */
|
|
1474
|
-
label ? /* @__PURE__ */
|
|
1934
|
+
return /* @__PURE__ */ jsxs13("div", __spreadProps(__spreadValues({ className: cn("ph-field", className) }, props), { children: [
|
|
1935
|
+
label ? /* @__PURE__ */ jsxs13(
|
|
1475
1936
|
"label",
|
|
1476
1937
|
{
|
|
1477
1938
|
htmlFor: id,
|
|
1478
1939
|
className: cn("ph-label", hideLabel && "sr-only", disabled && "opacity-50"),
|
|
1479
1940
|
children: [
|
|
1480
1941
|
label,
|
|
1481
|
-
required ? /* @__PURE__ */
|
|
1942
|
+
required ? /* @__PURE__ */ jsx16("span", { "aria-hidden": "true", children: " *" }) : null
|
|
1482
1943
|
]
|
|
1483
1944
|
}
|
|
1484
1945
|
) : null,
|
|
1485
1946
|
typeof children === "function" ? children(controlProps) : children,
|
|
1486
|
-
descriptionId ? /* @__PURE__ */
|
|
1487
|
-
errorId ? /* @__PURE__ */
|
|
1947
|
+
descriptionId ? /* @__PURE__ */ jsx16("p", { id: descriptionId, className: "mt-1 text-xs text-ph-subtle", children: helperText }) : null,
|
|
1948
|
+
errorId ? /* @__PURE__ */ jsx16("p", { id: errorId, className: "mt-1 text-xs font-medium text-ph-danger", children: error }) : null
|
|
1488
1949
|
] }));
|
|
1489
1950
|
}
|
|
1490
1951
|
|
|
1491
1952
|
// src/components/ui/Input.tsx
|
|
1492
|
-
import { jsx as
|
|
1953
|
+
import { jsx as jsx17, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
1493
1954
|
var sizeMap2 = {
|
|
1494
1955
|
sm: "ph-input-sm",
|
|
1495
1956
|
md: "",
|
|
@@ -1529,12 +1990,12 @@ var Input = forwardRef8(function Input2(_a, ref) {
|
|
|
1529
1990
|
"required",
|
|
1530
1991
|
"aria-describedby"
|
|
1531
1992
|
]);
|
|
1532
|
-
const autoId =
|
|
1993
|
+
const autoId = useId4();
|
|
1533
1994
|
const id = idProp != null ? idProp : autoId;
|
|
1534
1995
|
const hasError = Boolean(error);
|
|
1535
1996
|
const isPassword = type === "password";
|
|
1536
|
-
const [revealed, setRevealed] =
|
|
1537
|
-
return /* @__PURE__ */
|
|
1997
|
+
const [revealed, setRevealed] = useState2(false);
|
|
1998
|
+
return /* @__PURE__ */ jsx17(
|
|
1538
1999
|
FormField,
|
|
1539
2000
|
{
|
|
1540
2001
|
controlId: id,
|
|
@@ -1545,8 +2006,8 @@ var Input = forwardRef8(function Input2(_a, ref) {
|
|
|
1545
2006
|
required,
|
|
1546
2007
|
disabled,
|
|
1547
2008
|
className: wrapperClassName,
|
|
1548
|
-
children: (fieldProps) => /* @__PURE__ */
|
|
1549
|
-
/* @__PURE__ */
|
|
2009
|
+
children: (fieldProps) => /* @__PURE__ */ jsxs14("div", { className: "relative", children: [
|
|
2010
|
+
/* @__PURE__ */ jsx17(
|
|
1550
2011
|
"input",
|
|
1551
2012
|
__spreadValues(__spreadProps(__spreadValues({}, fieldProps), {
|
|
1552
2013
|
ref,
|
|
@@ -1565,7 +2026,7 @@ var Input = forwardRef8(function Input2(_a, ref) {
|
|
|
1565
2026
|
)
|
|
1566
2027
|
}), props)
|
|
1567
2028
|
),
|
|
1568
|
-
isPassword ? /* @__PURE__ */
|
|
2029
|
+
isPassword ? /* @__PURE__ */ jsx17(
|
|
1569
2030
|
"button",
|
|
1570
2031
|
{
|
|
1571
2032
|
type: "button",
|
|
@@ -1573,8 +2034,8 @@ var Input = forwardRef8(function Input2(_a, ref) {
|
|
|
1573
2034
|
"aria-label": revealed ? "Hide password" : "Show password",
|
|
1574
2035
|
"aria-pressed": revealed,
|
|
1575
2036
|
disabled,
|
|
1576
|
-
className: "
|
|
1577
|
-
children: revealed ? /* @__PURE__ */
|
|
2037
|
+
className: "ph-field-icon-button",
|
|
2038
|
+
children: revealed ? /* @__PURE__ */ jsx17(EyeClosed, { className: "h-4 w-4", "aria-hidden": true }) : /* @__PURE__ */ jsx17(Eye, { className: "h-4 w-4", "aria-hidden": true })
|
|
1578
2039
|
}
|
|
1579
2040
|
) : null
|
|
1580
2041
|
] })
|
|
@@ -1610,10 +2071,10 @@ var Select = forwardRef8(function Select2(_a, ref) {
|
|
|
1610
2071
|
"required",
|
|
1611
2072
|
"aria-describedby"
|
|
1612
2073
|
]);
|
|
1613
|
-
const autoId =
|
|
2074
|
+
const autoId = useId4();
|
|
1614
2075
|
const id = idProp != null ? idProp : autoId;
|
|
1615
2076
|
const hasError = Boolean(error);
|
|
1616
|
-
return /* @__PURE__ */
|
|
2077
|
+
return /* @__PURE__ */ jsx17(FormField, { controlId: id, label, hideLabel, helperText, error, required, disabled, className: wrapperClassName, children: (fieldProps) => /* @__PURE__ */ jsx17(
|
|
1617
2078
|
"select",
|
|
1618
2079
|
__spreadProps(__spreadValues(__spreadProps(__spreadValues({}, fieldProps), {
|
|
1619
2080
|
ref,
|
|
@@ -1659,10 +2120,10 @@ var Textarea = forwardRef8(function Textarea2(_a, ref) {
|
|
|
1659
2120
|
"required",
|
|
1660
2121
|
"aria-describedby"
|
|
1661
2122
|
]);
|
|
1662
|
-
const autoId =
|
|
2123
|
+
const autoId = useId4();
|
|
1663
2124
|
const id = idProp != null ? idProp : autoId;
|
|
1664
2125
|
const hasError = Boolean(error);
|
|
1665
|
-
return /* @__PURE__ */
|
|
2126
|
+
return /* @__PURE__ */ jsx17(FormField, { controlId: id, label, hideLabel, helperText, error, required, disabled, className: wrapperClassName, children: (fieldProps) => /* @__PURE__ */ jsx17(
|
|
1666
2127
|
"textarea",
|
|
1667
2128
|
__spreadValues(__spreadProps(__spreadValues({}, fieldProps), {
|
|
1668
2129
|
ref,
|
|
@@ -1700,14 +2161,14 @@ var Checkbox = forwardRef8(function Checkbox2(_a, ref) {
|
|
|
1700
2161
|
"disabled",
|
|
1701
2162
|
"aria-describedby"
|
|
1702
2163
|
]);
|
|
1703
|
-
const autoId =
|
|
2164
|
+
const autoId = useId4();
|
|
1704
2165
|
const id = idProp != null ? idProp : autoId;
|
|
1705
2166
|
const hasError = Boolean(error);
|
|
1706
2167
|
const descriptionId = helperText && !hasError ? `${id}-description` : void 0;
|
|
1707
2168
|
const errorId = error ? `${id}-error` : void 0;
|
|
1708
|
-
return /* @__PURE__ */
|
|
1709
|
-
/* @__PURE__ */
|
|
1710
|
-
/* @__PURE__ */
|
|
2169
|
+
return /* @__PURE__ */ jsxs14("div", { className: cn("ph-control-row", wrapperClassName), children: [
|
|
2170
|
+
/* @__PURE__ */ jsxs14("span", { className: "ph-checkbox-wrap", children: [
|
|
2171
|
+
/* @__PURE__ */ jsx17(
|
|
1711
2172
|
"input",
|
|
1712
2173
|
__spreadValues({
|
|
1713
2174
|
ref,
|
|
@@ -1725,12 +2186,12 @@ var Checkbox = forwardRef8(function Checkbox2(_a, ref) {
|
|
|
1725
2186
|
)
|
|
1726
2187
|
}, props)
|
|
1727
2188
|
),
|
|
1728
|
-
/* @__PURE__ */
|
|
2189
|
+
/* @__PURE__ */ jsx17(IconCheck, { className: "ph-checkbox-icon", "aria-hidden": true })
|
|
1729
2190
|
] }),
|
|
1730
|
-
/* @__PURE__ */
|
|
1731
|
-
/* @__PURE__ */
|
|
1732
|
-
descriptionId ? /* @__PURE__ */
|
|
1733
|
-
errorId ? /* @__PURE__ */
|
|
2191
|
+
/* @__PURE__ */ jsxs14("div", { className: "ph-control-copy", children: [
|
|
2192
|
+
/* @__PURE__ */ jsx17("label", { htmlFor: id, className: cn("cursor-pointer", disabled && "opacity-60"), children: label }),
|
|
2193
|
+
descriptionId ? /* @__PURE__ */ jsx17("p", { id: descriptionId, className: "text-xs text-ph-subtle", children: helperText }) : null,
|
|
2194
|
+
errorId ? /* @__PURE__ */ jsx17("p", { id: errorId, className: "text-xs font-medium text-ph-danger", children: error }) : null
|
|
1734
2195
|
] })
|
|
1735
2196
|
] });
|
|
1736
2197
|
});
|
|
@@ -1749,10 +2210,10 @@ var Radio = forwardRef8(function Radio2(_a, ref) {
|
|
|
1749
2210
|
"wrapperClassName",
|
|
1750
2211
|
"disabled"
|
|
1751
2212
|
]);
|
|
1752
|
-
const autoId =
|
|
2213
|
+
const autoId = useId4();
|
|
1753
2214
|
const id = idProp != null ? idProp : autoId;
|
|
1754
|
-
return /* @__PURE__ */
|
|
1755
|
-
/* @__PURE__ */
|
|
2215
|
+
return /* @__PURE__ */ jsxs14("div", { className: cn("ph-control-row", wrapperClassName, disabled && "opacity-60"), children: [
|
|
2216
|
+
/* @__PURE__ */ jsx17(
|
|
1756
2217
|
"input",
|
|
1757
2218
|
__spreadValues({
|
|
1758
2219
|
ref,
|
|
@@ -1762,7 +2223,7 @@ var Radio = forwardRef8(function Radio2(_a, ref) {
|
|
|
1762
2223
|
className: cn("ph-radio", disabled && "cursor-not-allowed", className)
|
|
1763
2224
|
}, props)
|
|
1764
2225
|
),
|
|
1765
|
-
/* @__PURE__ */
|
|
2226
|
+
/* @__PURE__ */ jsx17("label", { htmlFor: id, className: cn("cursor-pointer", disabled && "opacity-60"), children: label })
|
|
1766
2227
|
] });
|
|
1767
2228
|
});
|
|
1768
2229
|
Radio.displayName = "Radio";
|
|
@@ -1780,11 +2241,11 @@ var Toggle = forwardRef8(function Toggle2(_a, ref) {
|
|
|
1780
2241
|
"wrapperClassName",
|
|
1781
2242
|
"disabled"
|
|
1782
2243
|
]);
|
|
1783
|
-
const autoId =
|
|
2244
|
+
const autoId = useId4();
|
|
1784
2245
|
const id = idProp != null ? idProp : autoId;
|
|
1785
|
-
return /* @__PURE__ */
|
|
1786
|
-
/* @__PURE__ */
|
|
1787
|
-
/* @__PURE__ */
|
|
2246
|
+
return /* @__PURE__ */ jsxs14("label", { className: cn("ph-control-row-between", wrapperClassName, disabled && "opacity-60"), children: [
|
|
2247
|
+
/* @__PURE__ */ jsx17("span", { className: disabled ? "opacity-60" : void 0, children: label }),
|
|
2248
|
+
/* @__PURE__ */ jsx17(
|
|
1788
2249
|
"input",
|
|
1789
2250
|
__spreadValues({
|
|
1790
2251
|
ref,
|
|
@@ -1816,15 +2277,15 @@ var Range = forwardRef8(function Range2(_a, ref) {
|
|
|
1816
2277
|
"wrapperClassName",
|
|
1817
2278
|
"className"
|
|
1818
2279
|
]);
|
|
1819
|
-
const autoId =
|
|
2280
|
+
const autoId = useId4();
|
|
1820
2281
|
const id = idProp != null ? idProp : autoId;
|
|
1821
|
-
return /* @__PURE__ */
|
|
1822
|
-
label && /* @__PURE__ */
|
|
1823
|
-
/* @__PURE__ */
|
|
1824
|
-
(minLabel || valueLabel || maxLabel) && /* @__PURE__ */
|
|
1825
|
-
/* @__PURE__ */
|
|
1826
|
-
/* @__PURE__ */
|
|
1827
|
-
/* @__PURE__ */
|
|
2282
|
+
return /* @__PURE__ */ jsxs14("div", { className: cn("ph-field", wrapperClassName), children: [
|
|
2283
|
+
label && /* @__PURE__ */ jsx17("label", { htmlFor: id, className: "ph-label", children: label }),
|
|
2284
|
+
/* @__PURE__ */ jsx17("input", __spreadValues({ ref, id, type: "range", className: cn("ph-range", className) }, props)),
|
|
2285
|
+
(minLabel || valueLabel || maxLabel) && /* @__PURE__ */ jsxs14("div", { className: "flex justify-between text-xs text-ph-mutedtext", children: [
|
|
2286
|
+
/* @__PURE__ */ jsx17("span", { children: minLabel }),
|
|
2287
|
+
/* @__PURE__ */ jsx17("span", { children: valueLabel }),
|
|
2288
|
+
/* @__PURE__ */ jsx17("span", { children: maxLabel })
|
|
1828
2289
|
] })
|
|
1829
2290
|
] });
|
|
1830
2291
|
});
|
|
@@ -1843,12 +2304,12 @@ var FileUpload = forwardRef8(function FileUpload2(_a, ref) {
|
|
|
1843
2304
|
"wrapperClassName",
|
|
1844
2305
|
"className"
|
|
1845
2306
|
]);
|
|
1846
|
-
const autoId =
|
|
2307
|
+
const autoId = useId4();
|
|
1847
2308
|
const id = idProp != null ? idProp : autoId;
|
|
1848
|
-
return /* @__PURE__ */
|
|
1849
|
-
label && /* @__PURE__ */
|
|
1850
|
-
/* @__PURE__ */
|
|
1851
|
-
/* @__PURE__ */
|
|
2309
|
+
return /* @__PURE__ */ jsxs14("div", { className: cn("ph-field", wrapperClassName), children: [
|
|
2310
|
+
label && /* @__PURE__ */ jsx17("label", { htmlFor: id, className: "ph-label", children: label }),
|
|
2311
|
+
/* @__PURE__ */ jsxs14("label", { htmlFor: id, className: "ph-file-upload", children: [
|
|
2312
|
+
/* @__PURE__ */ jsx17("input", __spreadValues({ ref, id, type: "file", className: cn("sr-only", className) }, props)),
|
|
1852
2313
|
prompt
|
|
1853
2314
|
] })
|
|
1854
2315
|
] });
|
|
@@ -1857,8 +2318,8 @@ FileUpload.displayName = "FileUpload";
|
|
|
1857
2318
|
|
|
1858
2319
|
// src/components/ui/Modal.tsx
|
|
1859
2320
|
import * as Dialog from "@radix-ui/react-dialog";
|
|
1860
|
-
import { useRef } from "react";
|
|
1861
|
-
import { Fragment as Fragment4, jsx as
|
|
2321
|
+
import { useRef as useRef2 } from "react";
|
|
2322
|
+
import { Fragment as Fragment4, jsx as jsx18, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
1862
2323
|
var sizeMap3 = {
|
|
1863
2324
|
sm: "max-w-sm",
|
|
1864
2325
|
md: "max-w-lg",
|
|
@@ -1888,16 +2349,16 @@ function Modal({
|
|
|
1888
2349
|
"aria-labelledby": ariaLabelledBy
|
|
1889
2350
|
}) {
|
|
1890
2351
|
const canDismiss = Boolean(onClose);
|
|
1891
|
-
const restoreFocusRef =
|
|
1892
|
-
return /* @__PURE__ */
|
|
2352
|
+
const restoreFocusRef = useRef2(null);
|
|
2353
|
+
return /* @__PURE__ */ jsx18(
|
|
1893
2354
|
Dialog.Root,
|
|
1894
2355
|
{
|
|
1895
2356
|
open,
|
|
1896
2357
|
onOpenChange: (nextOpen) => {
|
|
1897
2358
|
if (!nextOpen) onClose == null ? void 0 : onClose();
|
|
1898
2359
|
},
|
|
1899
|
-
children: /* @__PURE__ */
|
|
1900
|
-
/* @__PURE__ */
|
|
2360
|
+
children: /* @__PURE__ */ jsxs15(Dialog.Portal, { children: [
|
|
2361
|
+
/* @__PURE__ */ jsx18(
|
|
1901
2362
|
Dialog.Overlay,
|
|
1902
2363
|
{
|
|
1903
2364
|
"data-test": dataTest,
|
|
@@ -1905,7 +2366,7 @@ function Modal({
|
|
|
1905
2366
|
style: zIndex ? { zIndex } : void 0
|
|
1906
2367
|
}
|
|
1907
2368
|
),
|
|
1908
|
-
/* @__PURE__ */
|
|
2369
|
+
/* @__PURE__ */ jsx18(
|
|
1909
2370
|
Dialog.Content,
|
|
1910
2371
|
__spreadProps(__spreadValues(__spreadProps(__spreadValues(__spreadValues({
|
|
1911
2372
|
id,
|
|
@@ -1928,28 +2389,28 @@ function Modal({
|
|
|
1928
2389
|
onPointerDownOutside: (event) => {
|
|
1929
2390
|
if (!canDismiss || !closeOnOutsideClick) event.preventDefault();
|
|
1930
2391
|
},
|
|
1931
|
-
children: customLayout ? /* @__PURE__ */
|
|
1932
|
-
/* @__PURE__ */
|
|
2392
|
+
children: customLayout ? /* @__PURE__ */ jsxs15(Fragment4, { children: [
|
|
2393
|
+
/* @__PURE__ */ jsx18(Dialog.Title, { className: "sr-only", children: ariaLabel != null ? ariaLabel : "Dialog" }),
|
|
1933
2394
|
children
|
|
1934
|
-
] }) : /* @__PURE__ */
|
|
1935
|
-
title ? null : /* @__PURE__ */
|
|
1936
|
-
title || description || showCloseButton && canDismiss ? /* @__PURE__ */
|
|
1937
|
-
/* @__PURE__ */
|
|
1938
|
-
title ? /* @__PURE__ */
|
|
1939
|
-
description ? /* @__PURE__ */
|
|
2395
|
+
] }) : /* @__PURE__ */ jsxs15(Fragment4, { children: [
|
|
2396
|
+
title ? null : /* @__PURE__ */ jsx18(Dialog.Title, { className: "sr-only", children: ariaLabel != null ? ariaLabel : "Dialog" }),
|
|
2397
|
+
title || description || showCloseButton && canDismiss ? /* @__PURE__ */ jsxs15("header", { className: "ph-modal-header", children: [
|
|
2398
|
+
/* @__PURE__ */ jsxs15("div", { className: "min-w-0", children: [
|
|
2399
|
+
title ? /* @__PURE__ */ jsx18(Dialog.Title, { className: "text-lg font-bold text-ph-ink", children: title }) : null,
|
|
2400
|
+
description ? /* @__PURE__ */ jsx18(Dialog.Description, { className: "mt-1 text-sm text-ph-subtle", children: description }) : null
|
|
1940
2401
|
] }),
|
|
1941
|
-
showCloseButton && canDismiss ? /* @__PURE__ */
|
|
2402
|
+
showCloseButton && canDismiss ? /* @__PURE__ */ jsx18(Dialog.Close, { asChild: true, children: /* @__PURE__ */ jsx18(
|
|
1942
2403
|
"button",
|
|
1943
2404
|
{
|
|
1944
2405
|
type: "button",
|
|
1945
2406
|
className: "ph-modal-close",
|
|
1946
2407
|
"aria-label": "Close dialog",
|
|
1947
|
-
children: /* @__PURE__ */
|
|
2408
|
+
children: /* @__PURE__ */ jsx18(IconClose, { className: "h-5 w-5", "aria-hidden": true })
|
|
1948
2409
|
}
|
|
1949
2410
|
) }) : null
|
|
1950
2411
|
] }) : null,
|
|
1951
|
-
/* @__PURE__ */
|
|
1952
|
-
footer ? /* @__PURE__ */
|
|
2412
|
+
/* @__PURE__ */ jsx18("div", { className: cn("ph-modal-body", bodyClassName), children }),
|
|
2413
|
+
footer ? /* @__PURE__ */ jsx18("div", { className: "ph-modal-footer", children: footer }) : null
|
|
1953
2414
|
] })
|
|
1954
2415
|
})
|
|
1955
2416
|
)
|
|
@@ -1959,19 +2420,19 @@ function Modal({
|
|
|
1959
2420
|
}
|
|
1960
2421
|
|
|
1961
2422
|
// src/components/ui/Panel.tsx
|
|
1962
|
-
import { jsx as
|
|
2423
|
+
import { jsx as jsx19, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
1963
2424
|
function Panel(_a) {
|
|
1964
2425
|
var _b = _a, { title, description, children, className } = _b, props = __objRest(_b, ["title", "description", "children", "className"]);
|
|
1965
|
-
return /* @__PURE__ */
|
|
1966
|
-
title && /* @__PURE__ */
|
|
1967
|
-
description && /* @__PURE__ */
|
|
2426
|
+
return /* @__PURE__ */ jsxs16("div", __spreadProps(__spreadValues({ className: cn("ph-panel", className) }, props), { children: [
|
|
2427
|
+
title && /* @__PURE__ */ jsx19("h3", { className: "text-lg font-semibold tracking-tight text-ph-ink", children: title }),
|
|
2428
|
+
description && /* @__PURE__ */ jsx19("p", { className: "text-sm text-ph-subtle", children: description }),
|
|
1968
2429
|
children
|
|
1969
2430
|
] }));
|
|
1970
2431
|
}
|
|
1971
2432
|
|
|
1972
2433
|
// src/components/ui/SearchInput.tsx
|
|
1973
|
-
import { useId as
|
|
1974
|
-
import { jsx as
|
|
2434
|
+
import { useId as useId5 } from "react";
|
|
2435
|
+
import { jsx as jsx20, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
1975
2436
|
function SearchInput(_a) {
|
|
1976
2437
|
var _b = _a, {
|
|
1977
2438
|
id: idProp,
|
|
@@ -1992,12 +2453,12 @@ function SearchInput(_a) {
|
|
|
1992
2453
|
"wrapperClassName",
|
|
1993
2454
|
"placeholder"
|
|
1994
2455
|
]);
|
|
1995
|
-
const autoId =
|
|
2456
|
+
const autoId = useId5();
|
|
1996
2457
|
const id = idProp != null ? idProp : autoId;
|
|
1997
|
-
return /* @__PURE__ */
|
|
1998
|
-
/* @__PURE__ */
|
|
1999
|
-
/* @__PURE__ */
|
|
2000
|
-
shortcut != null ? /* @__PURE__ */
|
|
2458
|
+
return /* @__PURE__ */ jsxs17("div", { className: cn("relative", wrapperClassName), children: [
|
|
2459
|
+
/* @__PURE__ */ jsx20("label", { htmlFor: id, className: hideLabel ? "sr-only" : "ph-label mb-1.5 block", children: label }),
|
|
2460
|
+
/* @__PURE__ */ jsxs17("div", { className: "relative", children: [
|
|
2461
|
+
shortcut != null ? /* @__PURE__ */ jsx20(
|
|
2001
2462
|
"span",
|
|
2002
2463
|
{
|
|
2003
2464
|
className: "ph-shortcut pointer-events-none absolute left-3 top-1/2 z-10 -translate-y-1/2 text-xs",
|
|
@@ -2005,7 +2466,7 @@ function SearchInput(_a) {
|
|
|
2005
2466
|
children: shortcut
|
|
2006
2467
|
}
|
|
2007
2468
|
) : null,
|
|
2008
|
-
/* @__PURE__ */
|
|
2469
|
+
/* @__PURE__ */ jsx20(
|
|
2009
2470
|
"input",
|
|
2010
2471
|
__spreadValues({
|
|
2011
2472
|
id,
|
|
@@ -2039,12 +2500,12 @@ function SearchGroup(_a) {
|
|
|
2039
2500
|
"wrapperClassName",
|
|
2040
2501
|
"className"
|
|
2041
2502
|
]);
|
|
2042
|
-
const autoId =
|
|
2503
|
+
const autoId = useId5();
|
|
2043
2504
|
const id = idProp != null ? idProp : autoId;
|
|
2044
|
-
return /* @__PURE__ */
|
|
2045
|
-
/* @__PURE__ */
|
|
2046
|
-
/* @__PURE__ */
|
|
2047
|
-
/* @__PURE__ */
|
|
2505
|
+
return /* @__PURE__ */ jsxs17("div", { className: cn("ph-field", wrapperClassName), children: [
|
|
2506
|
+
/* @__PURE__ */ jsx20("label", { htmlFor: id, className: "ph-label", children: label }),
|
|
2507
|
+
/* @__PURE__ */ jsxs17("div", { className: "ph-search-group flex w-full max-w-lg min-h-[2.3125rem] items-stretch divide-x divide-ph-border", children: [
|
|
2508
|
+
/* @__PURE__ */ jsx20(
|
|
2048
2509
|
"input",
|
|
2049
2510
|
__spreadValues({
|
|
2050
2511
|
id,
|
|
@@ -2053,12 +2514,12 @@ function SearchGroup(_a) {
|
|
|
2053
2514
|
className: cn("ph-input ph-input-group-field min-w-0 flex-1", className)
|
|
2054
2515
|
}, props)
|
|
2055
2516
|
),
|
|
2056
|
-
/* @__PURE__ */
|
|
2517
|
+
/* @__PURE__ */ jsx20(
|
|
2057
2518
|
Button,
|
|
2058
2519
|
{
|
|
2059
2520
|
type: "submit",
|
|
2060
2521
|
variant: "primary",
|
|
2061
|
-
icon: /* @__PURE__ */
|
|
2522
|
+
icon: /* @__PURE__ */ jsx20(IconSearch, { className: "h-4 w-4", "aria-hidden": true }),
|
|
2062
2523
|
className: "ph-search-group__submit",
|
|
2063
2524
|
"aria-label": submitLabel
|
|
2064
2525
|
}
|
|
@@ -2068,7 +2529,7 @@ function SearchGroup(_a) {
|
|
|
2068
2529
|
}
|
|
2069
2530
|
|
|
2070
2531
|
// src/components/ui/Table.tsx
|
|
2071
|
-
import { jsx as
|
|
2532
|
+
import { jsx as jsx21, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
2072
2533
|
function Table({
|
|
2073
2534
|
data,
|
|
2074
2535
|
columns,
|
|
@@ -2078,27 +2539,47 @@ function Table({
|
|
|
2078
2539
|
getRowStyle,
|
|
2079
2540
|
getRowKey,
|
|
2080
2541
|
className,
|
|
2081
|
-
|
|
2542
|
+
tableClassName,
|
|
2543
|
+
variant = "default",
|
|
2544
|
+
caption,
|
|
2545
|
+
emptyState = "No data available."
|
|
2082
2546
|
}) {
|
|
2083
|
-
return /* @__PURE__ */
|
|
2547
|
+
return /* @__PURE__ */ jsx21(
|
|
2084
2548
|
"div",
|
|
2085
2549
|
{
|
|
2086
|
-
className: cn(
|
|
2550
|
+
className: cn(
|
|
2551
|
+
variant === "report" ? "ph-table-report-wrap" : "ph-table-wrap",
|
|
2552
|
+
compact && "ph-table-compact",
|
|
2553
|
+
className
|
|
2554
|
+
),
|
|
2555
|
+
role: "region",
|
|
2556
|
+
"aria-label": caption != null ? caption : "Data table",
|
|
2087
2557
|
tabIndex: 0,
|
|
2088
|
-
children: /* @__PURE__ */
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2558
|
+
children: /* @__PURE__ */ jsxs18(
|
|
2559
|
+
"table",
|
|
2560
|
+
{
|
|
2561
|
+
className: cn(
|
|
2562
|
+
variant === "report" ? "ph-table-report" : "ph-table",
|
|
2563
|
+
zebra && "ph-table-zebra",
|
|
2564
|
+
ribbon && "ph-table--ribbon",
|
|
2565
|
+
tableClassName
|
|
2566
|
+
),
|
|
2567
|
+
children: [
|
|
2568
|
+
caption && /* @__PURE__ */ jsx21("caption", { className: "sr-only", children: caption }),
|
|
2569
|
+
/* @__PURE__ */ jsx21("thead", { children: /* @__PURE__ */ jsx21("tr", { children: columns.map((col) => /* @__PURE__ */ jsx21("th", { scope: "col", className: col.className, children: col.header }, col.key)) }) }),
|
|
2570
|
+
/* @__PURE__ */ jsx21("tbody", { children: data.length === 0 ? emptyState === null ? null : /* @__PURE__ */ jsx21("tr", { children: /* @__PURE__ */ jsx21("td", { colSpan: columns.length, className: "ph-table-empty", children: emptyState }) }) : data.map((row, i) => {
|
|
2571
|
+
var _a;
|
|
2572
|
+
return /* @__PURE__ */ jsx21("tr", { style: getRowStyle == null ? void 0 : getRowStyle(row), children: columns.map((col) => /* @__PURE__ */ jsx21("td", { className: col.className, children: col.cell(row) }, col.key)) }, (_a = getRowKey == null ? void 0 : getRowKey(row, i)) != null ? _a : i);
|
|
2573
|
+
}) })
|
|
2574
|
+
]
|
|
2575
|
+
}
|
|
2576
|
+
)
|
|
2096
2577
|
}
|
|
2097
2578
|
);
|
|
2098
2579
|
}
|
|
2099
2580
|
|
|
2100
2581
|
// src/components/ui/Stat.tsx
|
|
2101
|
-
import { jsx as
|
|
2582
|
+
import { jsx as jsx22, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
2102
2583
|
var toneMap = {
|
|
2103
2584
|
default: "text-ph-ink",
|
|
2104
2585
|
brand: "text-ph-brand",
|
|
@@ -2115,11 +2596,11 @@ var statMap = {
|
|
|
2115
2596
|
};
|
|
2116
2597
|
function Stat(_a) {
|
|
2117
2598
|
var _b = _a, { icon, label, value, footer, tone = "default", className } = _b, props = __objRest(_b, ["icon", "label", "value", "footer", "tone", "className"]);
|
|
2118
|
-
return /* @__PURE__ */
|
|
2119
|
-
icon && /* @__PURE__ */
|
|
2120
|
-
/* @__PURE__ */
|
|
2121
|
-
/* @__PURE__ */
|
|
2122
|
-
footer && /* @__PURE__ */
|
|
2599
|
+
return /* @__PURE__ */ jsxs19("article", __spreadProps(__spreadValues({ className: cn("ph-stat", statMap[tone], className) }, props), { children: [
|
|
2600
|
+
icon && /* @__PURE__ */ jsx22("div", { className: cn("mb-2 h-7 w-7", toneMap[tone]), children: icon }),
|
|
2601
|
+
/* @__PURE__ */ jsx22("div", { className: cn("ph-stat-label", tone === "warning" && toneMap[tone]), children: label }),
|
|
2602
|
+
/* @__PURE__ */ jsx22("div", { className: cn("ph-stat-val", toneMap[tone]), children: value }),
|
|
2603
|
+
footer && /* @__PURE__ */ jsx22("p", { className: "text-xs text-ph-subtle", children: footer })
|
|
2123
2604
|
] }));
|
|
2124
2605
|
}
|
|
2125
2606
|
|
|
@@ -2283,18 +2764,18 @@ function ThemeDomSync() {
|
|
|
2283
2764
|
}
|
|
2284
2765
|
|
|
2285
2766
|
// src/components/ui/ThemeSwitcher.tsx
|
|
2286
|
-
import { useEffect, useState as
|
|
2287
|
-
import { jsx as
|
|
2767
|
+
import { useEffect as useEffect2, useState as useState3 } from "react";
|
|
2768
|
+
import { jsx as jsx23, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
2288
2769
|
function ThemeSwitcher({ className }) {
|
|
2289
|
-
const [themeId, setThemeId] =
|
|
2290
|
-
|
|
2770
|
+
const [themeId, setThemeId] = useState3(DEFAULT_THEME_ID);
|
|
2771
|
+
useEffect2(() => {
|
|
2291
2772
|
const id = readStoredTheme();
|
|
2292
2773
|
persistTheme(id);
|
|
2293
2774
|
setThemeId(id);
|
|
2294
2775
|
}, []);
|
|
2295
|
-
return /* @__PURE__ */
|
|
2296
|
-
/* @__PURE__ */
|
|
2297
|
-
/* @__PURE__ */
|
|
2776
|
+
return /* @__PURE__ */ jsxs20("label", { className: cn("flex min-w-0 items-center gap-2", className), children: [
|
|
2777
|
+
/* @__PURE__ */ jsx23("span", { className: "shrink-0 text-xs font-medium text-ph-mutedtext sm:text-sm", children: "Theme" }),
|
|
2778
|
+
/* @__PURE__ */ jsx23(
|
|
2298
2779
|
"select",
|
|
2299
2780
|
{
|
|
2300
2781
|
className: "ph-select max-w-[11rem] !min-h-[2rem] py-1 pl-2.5 pr-8 text-xs sm:max-w-[14rem] sm:text-sm",
|
|
@@ -2305,23 +2786,23 @@ function ThemeSwitcher({ className }) {
|
|
|
2305
2786
|
persistTheme(next);
|
|
2306
2787
|
setThemeId(next);
|
|
2307
2788
|
},
|
|
2308
|
-
children: THEME_GROUPS.map((group) => /* @__PURE__ */
|
|
2789
|
+
children: THEME_GROUPS.map((group) => /* @__PURE__ */ jsx23("optgroup", { label: group, children: THEMES.filter((theme) => theme.group === group).map((theme) => /* @__PURE__ */ jsx23("option", { value: theme.id, children: theme.name }, theme.id)) }, group))
|
|
2309
2790
|
}
|
|
2310
2791
|
)
|
|
2311
2792
|
] });
|
|
2312
2793
|
}
|
|
2313
2794
|
|
|
2314
2795
|
// src/components/ui/Accordion.tsx
|
|
2315
|
-
import { useId as
|
|
2316
|
-
import { jsx as
|
|
2796
|
+
import { useId as useId6, useState as useState4 } from "react";
|
|
2797
|
+
import { jsx as jsx24, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
2317
2798
|
function Accordion({
|
|
2318
2799
|
items,
|
|
2319
2800
|
allowMultiple = false,
|
|
2320
2801
|
defaultOpen = [],
|
|
2321
2802
|
className
|
|
2322
2803
|
}) {
|
|
2323
|
-
const [openItems, setOpenItems] =
|
|
2324
|
-
const idPrefix =
|
|
2804
|
+
const [openItems, setOpenItems] = useState4(new Set(defaultOpen));
|
|
2805
|
+
const idPrefix = useId6();
|
|
2325
2806
|
const toggleItem = (id) => {
|
|
2326
2807
|
setOpenItems((prev) => {
|
|
2327
2808
|
const next = new Set(prev);
|
|
@@ -2336,28 +2817,25 @@ function Accordion({
|
|
|
2336
2817
|
return next;
|
|
2337
2818
|
});
|
|
2338
2819
|
};
|
|
2339
|
-
return /* @__PURE__ */
|
|
2820
|
+
return /* @__PURE__ */ jsx24(
|
|
2340
2821
|
"div",
|
|
2341
2822
|
{
|
|
2342
|
-
className: cn(
|
|
2343
|
-
"divide-y divide-ph-border rounded-xl border border-ph-border bg-ph-surface",
|
|
2344
|
-
className
|
|
2345
|
-
),
|
|
2823
|
+
className: cn("ph-accordion", className),
|
|
2346
2824
|
children: items.map((item) => {
|
|
2347
2825
|
const isOpen = openItems.has(item.id);
|
|
2348
2826
|
const contentId = `accordion-${idPrefix}-${item.id}-content`;
|
|
2349
|
-
return /* @__PURE__ */
|
|
2350
|
-
/* @__PURE__ */
|
|
2827
|
+
return /* @__PURE__ */ jsxs21("div", { className: "ph-accordion__item", children: [
|
|
2828
|
+
/* @__PURE__ */ jsxs21(
|
|
2351
2829
|
"button",
|
|
2352
2830
|
{
|
|
2353
2831
|
type: "button",
|
|
2354
2832
|
onClick: () => toggleItem(item.id),
|
|
2355
2833
|
"aria-expanded": isOpen,
|
|
2356
2834
|
"aria-controls": contentId,
|
|
2357
|
-
className: "
|
|
2835
|
+
className: "ph-accordion__trigger",
|
|
2358
2836
|
children: [
|
|
2359
|
-
/* @__PURE__ */
|
|
2360
|
-
/* @__PURE__ */
|
|
2837
|
+
/* @__PURE__ */ jsx24("span", { className: "font-semibold text-ph-ink", children: item.title }),
|
|
2838
|
+
/* @__PURE__ */ jsx24(
|
|
2361
2839
|
IconChevronDown,
|
|
2362
2840
|
{
|
|
2363
2841
|
className: cn(
|
|
@@ -2369,7 +2847,7 @@ function Accordion({
|
|
|
2369
2847
|
]
|
|
2370
2848
|
}
|
|
2371
2849
|
),
|
|
2372
|
-
/* @__PURE__ */
|
|
2850
|
+
/* @__PURE__ */ jsx24(
|
|
2373
2851
|
"div",
|
|
2374
2852
|
{
|
|
2375
2853
|
id: contentId,
|
|
@@ -2378,10 +2856,10 @@ function Accordion({
|
|
|
2378
2856
|
if (node) node.toggleAttribute("inert", !isOpen);
|
|
2379
2857
|
},
|
|
2380
2858
|
className: cn(
|
|
2381
|
-
"grid transition-
|
|
2859
|
+
"grid transition-[grid-template-rows] duration-200",
|
|
2382
2860
|
isOpen ? "grid-rows-[1fr]" : "grid-rows-[0fr]"
|
|
2383
2861
|
),
|
|
2384
|
-
children: /* @__PURE__ */
|
|
2862
|
+
children: /* @__PURE__ */ jsx24("div", { className: "overflow-hidden", children: /* @__PURE__ */ jsx24("div", { className: "px-5 pb-4 text-ph-subtle", children: item.content }) })
|
|
2385
2863
|
}
|
|
2386
2864
|
)
|
|
2387
2865
|
] }, item.id);
|
|
@@ -2391,27 +2869,68 @@ function Accordion({
|
|
|
2391
2869
|
}
|
|
2392
2870
|
|
|
2393
2871
|
// src/components/ui/SegmentedControl.tsx
|
|
2394
|
-
import {
|
|
2395
|
-
|
|
2396
|
-
|
|
2872
|
+
import { useRef as useRef3 } from "react";
|
|
2873
|
+
import { jsx as jsx25, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
2874
|
+
function SegmentedControl({
|
|
2875
|
+
options,
|
|
2876
|
+
value,
|
|
2877
|
+
onChange,
|
|
2878
|
+
className,
|
|
2879
|
+
"aria-label": ariaLabel
|
|
2880
|
+
}) {
|
|
2881
|
+
const itemRefs = useRef3([]);
|
|
2882
|
+
const selectedIndex = options.findIndex((option) => option.value === value);
|
|
2883
|
+
const handleKeyDown = (event, index) => {
|
|
2884
|
+
var _a;
|
|
2885
|
+
let nextIndex;
|
|
2886
|
+
switch (event.key) {
|
|
2887
|
+
case "ArrowLeft":
|
|
2888
|
+
case "ArrowUp":
|
|
2889
|
+
nextIndex = (index - 1 + options.length) % options.length;
|
|
2890
|
+
break;
|
|
2891
|
+
case "ArrowRight":
|
|
2892
|
+
case "ArrowDown":
|
|
2893
|
+
nextIndex = (index + 1) % options.length;
|
|
2894
|
+
break;
|
|
2895
|
+
case "Home":
|
|
2896
|
+
nextIndex = 0;
|
|
2897
|
+
break;
|
|
2898
|
+
case "End":
|
|
2899
|
+
nextIndex = options.length - 1;
|
|
2900
|
+
break;
|
|
2901
|
+
default:
|
|
2902
|
+
return;
|
|
2903
|
+
}
|
|
2904
|
+
event.preventDefault();
|
|
2905
|
+
const nextOption = options[nextIndex];
|
|
2906
|
+
if (!nextOption) return;
|
|
2907
|
+
onChange(nextOption.value);
|
|
2908
|
+
(_a = itemRefs.current[nextIndex]) == null ? void 0 : _a.focus();
|
|
2909
|
+
};
|
|
2910
|
+
return /* @__PURE__ */ jsx25(
|
|
2397
2911
|
"div",
|
|
2398
2912
|
{
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
)
|
|
2403
|
-
children: options.map((option) => /* @__PURE__ */ jsxs20(
|
|
2913
|
+
role: "radiogroup",
|
|
2914
|
+
"aria-label": ariaLabel,
|
|
2915
|
+
className: cn("ph-segmented-control", className),
|
|
2916
|
+
children: options.map((option, index) => /* @__PURE__ */ jsxs22(
|
|
2404
2917
|
"button",
|
|
2405
2918
|
{
|
|
2919
|
+
ref: (node) => {
|
|
2920
|
+
itemRefs.current[index] = node;
|
|
2921
|
+
},
|
|
2406
2922
|
type: "button",
|
|
2407
|
-
"
|
|
2923
|
+
role: "radio",
|
|
2924
|
+
"aria-checked": value === option.value,
|
|
2925
|
+
tabIndex: selectedIndex === index || selectedIndex < 0 && index === 0 ? 0 : -1,
|
|
2408
2926
|
onClick: () => onChange(option.value),
|
|
2927
|
+
onKeyDown: (event) => handleKeyDown(event, index),
|
|
2409
2928
|
className: cn(
|
|
2410
|
-
"
|
|
2411
|
-
value === option.value
|
|
2929
|
+
"ph-segmented-control__item",
|
|
2930
|
+
value === option.value && "ph-segmented-control__item--selected"
|
|
2412
2931
|
),
|
|
2413
2932
|
children: [
|
|
2414
|
-
option.icon && /* @__PURE__ */
|
|
2933
|
+
option.icon && /* @__PURE__ */ jsx25("span", { className: "h-4 w-4", "aria-hidden": true, children: option.icon }),
|
|
2415
2934
|
option.label
|
|
2416
2935
|
]
|
|
2417
2936
|
},
|
|
@@ -2422,9 +2941,9 @@ function SegmentedControl({ options, value, onChange, className }) {
|
|
|
2422
2941
|
}
|
|
2423
2942
|
|
|
2424
2943
|
// src/components/ui/CommandPalette.tsx
|
|
2425
|
-
import { useEffect as
|
|
2944
|
+
import { useEffect as useEffect3, useId as useId7, useRef as useRef4, useState as useState5 } from "react";
|
|
2426
2945
|
import * as Dialog2 from "@radix-ui/react-dialog";
|
|
2427
|
-
import { jsx as
|
|
2946
|
+
import { jsx as jsx26, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
2428
2947
|
function CommandPalette({
|
|
2429
2948
|
items,
|
|
2430
2949
|
isOpen,
|
|
@@ -2436,27 +2955,27 @@ function CommandPalette({
|
|
|
2436
2955
|
inputId,
|
|
2437
2956
|
inputDataTest
|
|
2438
2957
|
}) {
|
|
2439
|
-
const [query, setQuery] =
|
|
2440
|
-
const [selectedIndex, setSelectedIndex] =
|
|
2441
|
-
const inputRef =
|
|
2442
|
-
const listboxRef =
|
|
2443
|
-
const restoreFocusRef =
|
|
2444
|
-
const generatedId =
|
|
2958
|
+
const [query, setQuery] = useState5("");
|
|
2959
|
+
const [selectedIndex, setSelectedIndex] = useState5(0);
|
|
2960
|
+
const inputRef = useRef4(null);
|
|
2961
|
+
const listboxRef = useRef4(null);
|
|
2962
|
+
const restoreFocusRef = useRef4(null);
|
|
2963
|
+
const generatedId = useId7();
|
|
2445
2964
|
const listboxId = `${id != null ? id : `command-palette-${generatedId}`}-listbox`;
|
|
2446
2965
|
const filtered = items.filter(
|
|
2447
2966
|
(item) => item.label.toLowerCase().includes(query.toLowerCase())
|
|
2448
2967
|
);
|
|
2449
2968
|
const activeIndex = filtered.length ? Math.min(selectedIndex, filtered.length - 1) : 0;
|
|
2450
2969
|
const activeItem = filtered[activeIndex];
|
|
2451
|
-
|
|
2970
|
+
useEffect3(() => {
|
|
2452
2971
|
if (!isOpen) return;
|
|
2453
2972
|
setQuery("");
|
|
2454
2973
|
setSelectedIndex(0);
|
|
2455
2974
|
}, [isOpen]);
|
|
2456
|
-
|
|
2975
|
+
useEffect3(() => {
|
|
2457
2976
|
setSelectedIndex((current) => Math.min(current, Math.max(filtered.length - 1, 0)));
|
|
2458
2977
|
}, [filtered.length]);
|
|
2459
|
-
|
|
2978
|
+
useEffect3(() => {
|
|
2460
2979
|
var _a, _b;
|
|
2461
2980
|
if (!isOpen || !activeItem) return;
|
|
2462
2981
|
(_b = (_a = listboxRef.current) == null ? void 0 : _a.querySelectorAll('[role="option"]')[activeIndex]) == null ? void 0 : _b.scrollIntoView({ block: "nearest" });
|
|
@@ -2485,29 +3004,26 @@ function CommandPalette({
|
|
|
2485
3004
|
return;
|
|
2486
3005
|
}
|
|
2487
3006
|
};
|
|
2488
|
-
return /* @__PURE__ */
|
|
3007
|
+
return /* @__PURE__ */ jsx26(
|
|
2489
3008
|
Dialog2.Root,
|
|
2490
3009
|
{
|
|
2491
3010
|
open: isOpen,
|
|
2492
3011
|
onOpenChange: (nextOpen) => {
|
|
2493
3012
|
if (!nextOpen) onClose();
|
|
2494
3013
|
},
|
|
2495
|
-
children: /* @__PURE__ */
|
|
2496
|
-
/* @__PURE__ */
|
|
3014
|
+
children: /* @__PURE__ */ jsxs23(Dialog2.Portal, { children: [
|
|
3015
|
+
/* @__PURE__ */ jsx26(
|
|
2497
3016
|
Dialog2.Overlay,
|
|
2498
3017
|
{
|
|
2499
3018
|
id,
|
|
2500
3019
|
"data-test": dataTest,
|
|
2501
|
-
className: "
|
|
3020
|
+
className: "ph-command-palette__overlay"
|
|
2502
3021
|
}
|
|
2503
3022
|
),
|
|
2504
|
-
/* @__PURE__ */
|
|
3023
|
+
/* @__PURE__ */ jsxs23(
|
|
2505
3024
|
Dialog2.Content,
|
|
2506
3025
|
{
|
|
2507
|
-
className: cn(
|
|
2508
|
-
"fixed left-1/2 top-[20vh] z-50 w-full max-w-xl -translate-x-1/2 overflow-hidden rounded-xl border border-ph-border bg-ph-surface shadow-ph-md",
|
|
2509
|
-
className
|
|
2510
|
-
),
|
|
3026
|
+
className: cn("ph-command-palette", className),
|
|
2511
3027
|
onOpenAutoFocus: (event) => {
|
|
2512
3028
|
var _a;
|
|
2513
3029
|
restoreFocusRef.current = document.activeElement instanceof HTMLElement ? document.activeElement : null;
|
|
@@ -2520,10 +3036,10 @@ function CommandPalette({
|
|
|
2520
3036
|
(_a = restoreFocusRef.current) == null ? void 0 : _a.focus();
|
|
2521
3037
|
},
|
|
2522
3038
|
children: [
|
|
2523
|
-
/* @__PURE__ */
|
|
2524
|
-
/* @__PURE__ */
|
|
2525
|
-
/* @__PURE__ */
|
|
2526
|
-
/* @__PURE__ */
|
|
3039
|
+
/* @__PURE__ */ jsx26(Dialog2.Title, { className: "sr-only", children: "Command palette" }),
|
|
3040
|
+
/* @__PURE__ */ jsxs23("div", { className: "ph-command-palette__search", children: [
|
|
3041
|
+
/* @__PURE__ */ jsx26(IconSearch, { className: "h-5 w-5 text-ph-mutedtext" }),
|
|
3042
|
+
/* @__PURE__ */ jsx26(
|
|
2527
3043
|
"input",
|
|
2528
3044
|
{
|
|
2529
3045
|
ref: inputRef,
|
|
@@ -2546,9 +3062,9 @@ function CommandPalette({
|
|
|
2546
3062
|
className: "flex-1 bg-transparent text-ph-ink outline-none placeholder:text-ph-mutedtext"
|
|
2547
3063
|
}
|
|
2548
3064
|
),
|
|
2549
|
-
/* @__PURE__ */
|
|
3065
|
+
/* @__PURE__ */ jsx26("kbd", { "aria-hidden": "true", className: "ph-keycap", children: "ESC" })
|
|
2550
3066
|
] }),
|
|
2551
|
-
/* @__PURE__ */
|
|
3067
|
+
/* @__PURE__ */ jsx26("div", { ref: listboxRef, id: listboxId, role: "listbox", "aria-label": "Commands", className: "max-h-[50vh] overflow-y-auto py-2", children: filtered.length === 0 ? /* @__PURE__ */ jsx26("div", { role: "status", className: "px-4 py-8 text-center text-sm text-ph-mutedtext", children: "No results found." }) : filtered.map((item, index) => /* @__PURE__ */ jsxs23(
|
|
2552
3068
|
"div",
|
|
2553
3069
|
{
|
|
2554
3070
|
id: `command-${item.id}`,
|
|
@@ -2561,13 +3077,13 @@ function CommandPalette({
|
|
|
2561
3077
|
},
|
|
2562
3078
|
onMouseEnter: () => setSelectedIndex(index),
|
|
2563
3079
|
className: cn(
|
|
2564
|
-
"
|
|
2565
|
-
index === activeIndex ? "
|
|
3080
|
+
"ph-command-palette__option",
|
|
3081
|
+
index === activeIndex ? "ph-command-palette__option--selected" : "text-ph-subtle"
|
|
2566
3082
|
),
|
|
2567
3083
|
children: [
|
|
2568
|
-
item.icon && /* @__PURE__ */
|
|
2569
|
-
/* @__PURE__ */
|
|
2570
|
-
item.shortcut && /* @__PURE__ */
|
|
3084
|
+
item.icon && /* @__PURE__ */ jsx26("span", { "aria-hidden": "true", className: "h-5 w-5", children: item.icon }),
|
|
3085
|
+
/* @__PURE__ */ jsx26("span", { className: "flex-1", children: item.label }),
|
|
3086
|
+
item.shortcut && /* @__PURE__ */ jsx26("kbd", { "aria-hidden": "true", className: "ph-keycap text-ph-mutedtext", children: item.shortcut })
|
|
2571
3087
|
]
|
|
2572
3088
|
},
|
|
2573
3089
|
item.id
|
|
@@ -2581,8 +3097,8 @@ function CommandPalette({
|
|
|
2581
3097
|
}
|
|
2582
3098
|
|
|
2583
3099
|
// src/components/ui/Calendar.tsx
|
|
2584
|
-
import { useEffect as
|
|
2585
|
-
import { jsx as
|
|
3100
|
+
import { useEffect as useEffect4, useId as useId8, useRef as useRef5, useState as useState6 } from "react";
|
|
3101
|
+
import { jsx as jsx27, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
2586
3102
|
var monthNames = [
|
|
2587
3103
|
"January",
|
|
2588
3104
|
"February",
|
|
@@ -2639,19 +3155,19 @@ function dateLabel(date) {
|
|
|
2639
3155
|
return `${fullWeekDays[date.getDay()]}, ${date.getDate()} ${monthNames[date.getMonth()]} ${date.getFullYear()}`;
|
|
2640
3156
|
}
|
|
2641
3157
|
function Calendar({ value, onChange, className }) {
|
|
2642
|
-
const [currentMonth, setCurrentMonth] =
|
|
2643
|
-
const [focusedDate, setFocusedDate] =
|
|
2644
|
-
const gridRef =
|
|
2645
|
-
const shouldFocusDateRef =
|
|
2646
|
-
const monthLabelId =
|
|
3158
|
+
const [currentMonth, setCurrentMonth] = useState6(() => startOfMonth(value != null ? value : /* @__PURE__ */ new Date()));
|
|
3159
|
+
const [focusedDate, setFocusedDate] = useState6(() => startOfDay(value != null ? value : /* @__PURE__ */ new Date()));
|
|
3160
|
+
const gridRef = useRef5(null);
|
|
3161
|
+
const shouldFocusDateRef = useRef5(false);
|
|
3162
|
+
const monthLabelId = useId8();
|
|
2647
3163
|
const today = startOfDay(/* @__PURE__ */ new Date());
|
|
2648
|
-
|
|
3164
|
+
useEffect4(() => {
|
|
2649
3165
|
if (!value) return;
|
|
2650
3166
|
const nextDate = startOfDay(value);
|
|
2651
3167
|
setCurrentMonth(startOfMonth(nextDate));
|
|
2652
3168
|
setFocusedDate(nextDate);
|
|
2653
3169
|
}, [value]);
|
|
2654
|
-
|
|
3170
|
+
useEffect4(() => {
|
|
2655
3171
|
var _a, _b;
|
|
2656
3172
|
if (!shouldFocusDateRef.current) return;
|
|
2657
3173
|
(_b = (_a = gridRef.current) == null ? void 0 : _a.querySelector(`[data-date="${dateKey(focusedDate)}"]`)) == null ? void 0 : _b.focus();
|
|
@@ -2720,36 +3236,36 @@ function Calendar({ value, onChange, className }) {
|
|
|
2720
3236
|
while (days.length < 42) {
|
|
2721
3237
|
days.push(null);
|
|
2722
3238
|
}
|
|
2723
|
-
return /* @__PURE__ */
|
|
2724
|
-
/* @__PURE__ */
|
|
2725
|
-
/* @__PURE__ */
|
|
3239
|
+
return /* @__PURE__ */ jsxs24("div", { className: cn("ph-calendar w-[280px] p-4", className), children: [
|
|
3240
|
+
/* @__PURE__ */ jsxs24("div", { className: "mb-4 flex items-center justify-between", children: [
|
|
3241
|
+
/* @__PURE__ */ jsx27(
|
|
2726
3242
|
"button",
|
|
2727
3243
|
{
|
|
2728
3244
|
type: "button",
|
|
2729
3245
|
onClick: () => changeMonth(-1),
|
|
2730
3246
|
"aria-label": "Previous month",
|
|
2731
|
-
className: "
|
|
2732
|
-
children: /* @__PURE__ */
|
|
3247
|
+
className: "ph-calendar__nav",
|
|
3248
|
+
children: /* @__PURE__ */ jsx27(IconChevronLeft, { className: "h-5 w-5", "aria-hidden": true })
|
|
2733
3249
|
}
|
|
2734
3250
|
),
|
|
2735
|
-
/* @__PURE__ */
|
|
3251
|
+
/* @__PURE__ */ jsxs24("span", { id: monthLabelId, "aria-live": "polite", className: "text-sm font-semibold text-ph-ink", children: [
|
|
2736
3252
|
monthNames[month],
|
|
2737
3253
|
" ",
|
|
2738
3254
|
year
|
|
2739
3255
|
] }),
|
|
2740
|
-
/* @__PURE__ */
|
|
3256
|
+
/* @__PURE__ */ jsx27(
|
|
2741
3257
|
"button",
|
|
2742
3258
|
{
|
|
2743
3259
|
type: "button",
|
|
2744
3260
|
onClick: () => changeMonth(1),
|
|
2745
3261
|
"aria-label": "Next month",
|
|
2746
|
-
className: "
|
|
2747
|
-
children: /* @__PURE__ */
|
|
3262
|
+
className: "ph-calendar__nav",
|
|
3263
|
+
children: /* @__PURE__ */ jsx27(IconChevronRight, { className: "h-5 w-5", "aria-hidden": true })
|
|
2748
3264
|
}
|
|
2749
3265
|
)
|
|
2750
3266
|
] }),
|
|
2751
|
-
/* @__PURE__ */
|
|
2752
|
-
/* @__PURE__ */
|
|
3267
|
+
/* @__PURE__ */ jsxs24("div", { ref: gridRef, role: "grid", "aria-labelledby": monthLabelId, children: [
|
|
3268
|
+
/* @__PURE__ */ jsx27("div", { role: "row", className: "grid grid-cols-7 gap-1", children: weekDays.map((day, index) => /* @__PURE__ */ jsx27(
|
|
2753
3269
|
"div",
|
|
2754
3270
|
{
|
|
2755
3271
|
role: "columnheader",
|
|
@@ -2762,14 +3278,14 @@ function Calendar({ value, onChange, className }) {
|
|
|
2762
3278
|
Array.from({ length: 6 }, (_, week) => {
|
|
2763
3279
|
const weekDates = days.slice(week * 7, week * 7 + 7);
|
|
2764
3280
|
if (weekDates.length === 0 || weekDates.every((date) => !date)) return null;
|
|
2765
|
-
return /* @__PURE__ */
|
|
2766
|
-
(date, day) => date ? /* @__PURE__ */
|
|
3281
|
+
return /* @__PURE__ */ jsx27("div", { role: "row", className: "grid grid-cols-7 gap-1", children: weekDates.map(
|
|
3282
|
+
(date, day) => date ? /* @__PURE__ */ jsx27(
|
|
2767
3283
|
"div",
|
|
2768
3284
|
{
|
|
2769
3285
|
role: "gridcell",
|
|
2770
3286
|
"aria-selected": value ? isSameDay(value, date) : false,
|
|
2771
3287
|
className: "aspect-square",
|
|
2772
|
-
children: /* @__PURE__ */
|
|
3288
|
+
children: /* @__PURE__ */ jsx27(
|
|
2773
3289
|
"button",
|
|
2774
3290
|
{
|
|
2775
3291
|
type: "button",
|
|
@@ -2780,15 +3296,15 @@ function Calendar({ value, onChange, className }) {
|
|
|
2780
3296
|
onClick: () => handleSelect(date),
|
|
2781
3297
|
onKeyDown: (event) => handleDayKeyDown(event, date),
|
|
2782
3298
|
className: cn(
|
|
2783
|
-
"
|
|
2784
|
-
value && isSameDay(value, date) ? "
|
|
3299
|
+
"ph-calendar__day",
|
|
3300
|
+
value && isSameDay(value, date) ? "ph-calendar__day--selected" : isSameDay(today, date) ? "ph-calendar__day--today" : void 0
|
|
2785
3301
|
),
|
|
2786
3302
|
children: date.getDate()
|
|
2787
3303
|
}
|
|
2788
3304
|
)
|
|
2789
3305
|
},
|
|
2790
3306
|
dateKey(date)
|
|
2791
|
-
) : /* @__PURE__ */
|
|
3307
|
+
) : /* @__PURE__ */ jsx27("div", { role: "gridcell", "aria-hidden": "true", className: "aspect-square" }, `empty-${week}-${day}`)
|
|
2792
3308
|
) }, week);
|
|
2793
3309
|
})
|
|
2794
3310
|
] })
|
|
@@ -2801,20 +3317,20 @@ import {
|
|
|
2801
3317
|
createContext,
|
|
2802
3318
|
useCallback,
|
|
2803
3319
|
useContext,
|
|
2804
|
-
useEffect as
|
|
2805
|
-
useId as
|
|
3320
|
+
useEffect as useEffect5,
|
|
3321
|
+
useId as useId9,
|
|
2806
3322
|
useLayoutEffect as useLayoutEffect2,
|
|
2807
|
-
useRef as
|
|
2808
|
-
useState as
|
|
3323
|
+
useRef as useRef6,
|
|
3324
|
+
useState as useState7
|
|
2809
3325
|
} from "react";
|
|
2810
3326
|
import { createPortal } from "react-dom";
|
|
2811
|
-
import { Fragment as Fragment5, jsx as
|
|
3327
|
+
import { Fragment as Fragment5, jsx as jsx28, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
2812
3328
|
var TooltipDelayContext = createContext(0);
|
|
2813
3329
|
function TooltipProvider({
|
|
2814
3330
|
children,
|
|
2815
3331
|
delayDuration = 0
|
|
2816
3332
|
}) {
|
|
2817
|
-
return /* @__PURE__ */
|
|
3333
|
+
return /* @__PURE__ */ jsx28(TooltipDelayContext.Provider, { value: delayDuration, children });
|
|
2818
3334
|
}
|
|
2819
3335
|
function tooltipPosition(trigger, content, side, align, offset, collisionPadding) {
|
|
2820
3336
|
const horizontal = align === "start" ? trigger.left : align === "end" ? trigger.right : trigger.left + trigger.width / 2;
|
|
@@ -2842,12 +3358,12 @@ function Tooltip({
|
|
|
2842
3358
|
disableHoverableContent = false
|
|
2843
3359
|
}) {
|
|
2844
3360
|
const providerDelay = useContext(TooltipDelayContext);
|
|
2845
|
-
const generatedId =
|
|
2846
|
-
const triggerRef =
|
|
2847
|
-
const contentRef =
|
|
2848
|
-
const timerRef =
|
|
2849
|
-
const [internalOpen, setInternalOpen] =
|
|
2850
|
-
const [position, setPosition] =
|
|
3361
|
+
const generatedId = useId9().replace(/:/g, "");
|
|
3362
|
+
const triggerRef = useRef6(null);
|
|
3363
|
+
const contentRef = useRef6(null);
|
|
3364
|
+
const timerRef = useRef6(null);
|
|
3365
|
+
const [internalOpen, setInternalOpen] = useState7(defaultOpen);
|
|
3366
|
+
const [position, setPosition] = useState7(null);
|
|
2851
3367
|
const isOpen = open != null ? open : internalOpen;
|
|
2852
3368
|
const triggerId = children.props.id;
|
|
2853
3369
|
const tooltipId = triggerId ? `${triggerId}-tooltip` : `ph-tooltip-${generatedId}`;
|
|
@@ -2894,7 +3410,7 @@ function Tooltip({
|
|
|
2894
3410
|
useLayoutEffect2(() => {
|
|
2895
3411
|
if (isOpen) updatePosition();
|
|
2896
3412
|
}, [isOpen, updatePosition]);
|
|
2897
|
-
|
|
3413
|
+
useEffect5(() => {
|
|
2898
3414
|
if (!isOpen) return;
|
|
2899
3415
|
const reposition = () => updatePosition();
|
|
2900
3416
|
window.addEventListener("resize", reposition);
|
|
@@ -2904,11 +3420,11 @@ function Tooltip({
|
|
|
2904
3420
|
window.removeEventListener("scroll", reposition, true);
|
|
2905
3421
|
};
|
|
2906
3422
|
}, [isOpen, updatePosition]);
|
|
2907
|
-
|
|
3423
|
+
useEffect5(() => () => clearTimer(), []);
|
|
2908
3424
|
const describedBy = [children.props["aria-describedby"], tooltipId].filter(Boolean).join(" ");
|
|
2909
3425
|
const trigger = cloneElement(children, { "aria-describedby": describedBy });
|
|
2910
|
-
return /* @__PURE__ */
|
|
2911
|
-
/* @__PURE__ */
|
|
3426
|
+
return /* @__PURE__ */ jsxs25(Fragment5, { children: [
|
|
3427
|
+
/* @__PURE__ */ jsx28(
|
|
2912
3428
|
"span",
|
|
2913
3429
|
{
|
|
2914
3430
|
ref: triggerRef,
|
|
@@ -2924,12 +3440,12 @@ function Tooltip({
|
|
|
2924
3440
|
}
|
|
2925
3441
|
),
|
|
2926
3442
|
isOpen && typeof document !== "undefined" ? createPortal(
|
|
2927
|
-
/* @__PURE__ */
|
|
3443
|
+
/* @__PURE__ */ jsx28(
|
|
2928
3444
|
"span",
|
|
2929
3445
|
{
|
|
2930
3446
|
style: __spreadProps(__spreadValues({ position: "fixed" }, position), { visibility: position ? void 0 : "hidden" }),
|
|
2931
3447
|
className: "pointer-events-none z-[200]",
|
|
2932
|
-
children: /* @__PURE__ */
|
|
3448
|
+
children: /* @__PURE__ */ jsx28(
|
|
2933
3449
|
"span",
|
|
2934
3450
|
{
|
|
2935
3451
|
ref: contentRef,
|
|
@@ -2954,27 +3470,27 @@ function Tooltip({
|
|
|
2954
3470
|
}
|
|
2955
3471
|
|
|
2956
3472
|
// src/components/ui/EmptyState.tsx
|
|
2957
|
-
import { jsx as
|
|
3473
|
+
import { jsx as jsx29, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
2958
3474
|
function EmptyState({ icon, title, description, action, className }) {
|
|
2959
|
-
return /* @__PURE__ */
|
|
3475
|
+
return /* @__PURE__ */ jsxs26(
|
|
2960
3476
|
"div",
|
|
2961
3477
|
{
|
|
2962
3478
|
className: cn(
|
|
2963
|
-
"
|
|
3479
|
+
"ph-empty-state",
|
|
2964
3480
|
className
|
|
2965
3481
|
),
|
|
2966
3482
|
children: [
|
|
2967
|
-
icon && /* @__PURE__ */
|
|
2968
|
-
/* @__PURE__ */
|
|
2969
|
-
description && /* @__PURE__ */
|
|
2970
|
-
action && /* @__PURE__ */
|
|
3483
|
+
icon && /* @__PURE__ */ jsx29("div", { className: "ph-empty-state__icon", children: icon }),
|
|
3484
|
+
/* @__PURE__ */ jsx29("h2", { className: "text-base font-semibold text-ph-ink", children: title }),
|
|
3485
|
+
description && /* @__PURE__ */ jsx29("p", { className: "mt-1 max-w-sm text-sm text-ph-subtle", children: description }),
|
|
3486
|
+
action && /* @__PURE__ */ jsx29("div", { className: "mt-4", children: action })
|
|
2971
3487
|
]
|
|
2972
3488
|
}
|
|
2973
3489
|
);
|
|
2974
3490
|
}
|
|
2975
3491
|
|
|
2976
3492
|
// src/components/ui/FilterChips.tsx
|
|
2977
|
-
import { Fragment as Fragment6, jsx as
|
|
3493
|
+
import { Fragment as Fragment6, jsx as jsx30, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
2978
3494
|
function FilterChips({
|
|
2979
3495
|
chips,
|
|
2980
3496
|
onToggle,
|
|
@@ -2982,20 +3498,20 @@ function FilterChips({
|
|
|
2982
3498
|
className,
|
|
2983
3499
|
"aria-label": ariaLabel = "Applied filters"
|
|
2984
3500
|
}) {
|
|
2985
|
-
return /* @__PURE__ */
|
|
3501
|
+
return /* @__PURE__ */ jsx30("div", { className: cn("ph-filter-chips", className), role: "group", "aria-label": ariaLabel, children: chips.map((chip) => {
|
|
2986
3502
|
var _a;
|
|
2987
3503
|
const label = (_a = chip.removeLabel) != null ? _a : getChipText(chip);
|
|
2988
|
-
const content = /* @__PURE__ */
|
|
2989
|
-
/* @__PURE__ */
|
|
2990
|
-
chip.value != null ? /* @__PURE__ */
|
|
3504
|
+
const content = /* @__PURE__ */ jsxs27(Fragment6, { children: [
|
|
3505
|
+
/* @__PURE__ */ jsx30("span", { className: "ph-filter-chip__label", children: chip.label }),
|
|
3506
|
+
chip.value != null ? /* @__PURE__ */ jsx30("span", { className: "ph-filter-chip__value", children: chip.value }) : null
|
|
2991
3507
|
] });
|
|
2992
|
-
return /* @__PURE__ */
|
|
3508
|
+
return /* @__PURE__ */ jsxs27(
|
|
2993
3509
|
"span",
|
|
2994
3510
|
{
|
|
2995
3511
|
className: cn("ph-filter-chip", chip.active && "ph-filter-chip--active"),
|
|
2996
3512
|
"data-state": chip.active ? "on" : "off",
|
|
2997
3513
|
children: [
|
|
2998
|
-
onToggle ? /* @__PURE__ */
|
|
3514
|
+
onToggle ? /* @__PURE__ */ jsx30(
|
|
2999
3515
|
"button",
|
|
3000
3516
|
{
|
|
3001
3517
|
type: "button",
|
|
@@ -3004,15 +3520,15 @@ function FilterChips({
|
|
|
3004
3520
|
onClick: () => onToggle(chip.id),
|
|
3005
3521
|
children: content
|
|
3006
3522
|
}
|
|
3007
|
-
) : /* @__PURE__ */
|
|
3008
|
-
chip.active && onRemove ? /* @__PURE__ */
|
|
3523
|
+
) : /* @__PURE__ */ jsx30("span", { className: "ph-filter-chip__main", children: content }),
|
|
3524
|
+
chip.active && onRemove ? /* @__PURE__ */ jsx30(
|
|
3009
3525
|
"button",
|
|
3010
3526
|
{
|
|
3011
3527
|
type: "button",
|
|
3012
3528
|
className: "ph-filter-chip__remove",
|
|
3013
3529
|
"aria-label": `Remove ${label} filter`,
|
|
3014
3530
|
onClick: () => onRemove(chip.id),
|
|
3015
|
-
children: /* @__PURE__ */
|
|
3531
|
+
children: /* @__PURE__ */ jsx30(IconClose, { className: "h-3 w-3", "aria-hidden": true })
|
|
3016
3532
|
}
|
|
3017
3533
|
) : null
|
|
3018
3534
|
]
|
|
@@ -3028,7 +3544,7 @@ function getChipText(chip) {
|
|
|
3028
3544
|
}
|
|
3029
3545
|
|
|
3030
3546
|
// src/components/ui/FilterBar.tsx
|
|
3031
|
-
import { jsx as
|
|
3547
|
+
import { jsx as jsx31, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
3032
3548
|
function FilterBar(_a) {
|
|
3033
3549
|
var _b = _a, {
|
|
3034
3550
|
children,
|
|
@@ -3045,12 +3561,12 @@ function FilterBar(_a) {
|
|
|
3045
3561
|
"resultCount",
|
|
3046
3562
|
"className"
|
|
3047
3563
|
]);
|
|
3048
|
-
return /* @__PURE__ */
|
|
3049
|
-
/* @__PURE__ */
|
|
3564
|
+
return /* @__PURE__ */ jsxs28("div", __spreadProps(__spreadValues({ className: cn("ph-filter-bar", className) }, props), { children: [
|
|
3565
|
+
/* @__PURE__ */ jsxs28("div", { className: "ph-filter-bar__controls", role: "group", "aria-label": label, children: [
|
|
3050
3566
|
children,
|
|
3051
|
-
onClear ? /* @__PURE__ */
|
|
3567
|
+
onClear ? /* @__PURE__ */ jsx31("button", { type: "button", className: "ph-filter-bar__clear", onClick: onClear, children: clearLabel }) : null
|
|
3052
3568
|
] }),
|
|
3053
|
-
resultCount != null ? /* @__PURE__ */
|
|
3569
|
+
resultCount != null ? /* @__PURE__ */ jsx31("output", { className: "ph-filter-bar__results", "aria-live": "polite", children: resultCount }) : null
|
|
3054
3570
|
] }));
|
|
3055
3571
|
}
|
|
3056
3572
|
function FilterMenu({
|
|
@@ -3067,19 +3583,19 @@ function FilterMenu({
|
|
|
3067
3583
|
const selected = options.find((option) => option.value === value);
|
|
3068
3584
|
const displayValue = (_a = selected == null ? void 0 : selected.label) != null ? _a : placeholder;
|
|
3069
3585
|
const accessibleValue = selected ? getOptionText(selected) : String(placeholder);
|
|
3070
|
-
return /* @__PURE__ */
|
|
3586
|
+
return /* @__PURE__ */ jsx31(
|
|
3071
3587
|
DropdownMenu,
|
|
3072
3588
|
{
|
|
3073
3589
|
"aria-label": `${label}: ${accessibleValue}`,
|
|
3074
3590
|
align,
|
|
3075
3591
|
disabled,
|
|
3076
3592
|
className,
|
|
3077
|
-
trigger: /* @__PURE__ */
|
|
3078
|
-
/* @__PURE__ */
|
|
3079
|
-
/* @__PURE__ */
|
|
3080
|
-
/* @__PURE__ */
|
|
3593
|
+
trigger: /* @__PURE__ */ jsxs28("span", { className: cn("ph-filter-menu-trigger", selected && "ph-filter-menu-trigger--active"), children: [
|
|
3594
|
+
/* @__PURE__ */ jsx31(IconTuning, { className: "h-3.5 w-3.5", "aria-hidden": true }),
|
|
3595
|
+
/* @__PURE__ */ jsx31("span", { className: "ph-filter-menu-trigger__label", children: label }),
|
|
3596
|
+
/* @__PURE__ */ jsx31("span", { className: "ph-filter-menu-trigger__value", children: displayValue })
|
|
3081
3597
|
] }),
|
|
3082
|
-
children: /* @__PURE__ */
|
|
3598
|
+
children: /* @__PURE__ */ jsx31(DropdownRadioGroup, { value, onValueChange, children: options.map((option) => /* @__PURE__ */ jsx31(
|
|
3083
3599
|
DropdownRadioItem,
|
|
3084
3600
|
{
|
|
3085
3601
|
value: option.value,
|
|
@@ -3103,25 +3619,25 @@ function SortMenu({
|
|
|
3103
3619
|
className
|
|
3104
3620
|
}) {
|
|
3105
3621
|
const selected = options.find((option) => option.value === value);
|
|
3106
|
-
return /* @__PURE__ */
|
|
3622
|
+
return /* @__PURE__ */ jsx31(
|
|
3107
3623
|
DropdownMenu,
|
|
3108
3624
|
{
|
|
3109
3625
|
"aria-label": `${label}: ${selected ? getOptionText(selected) : "Choose sort order"}`,
|
|
3110
3626
|
align,
|
|
3111
3627
|
disabled,
|
|
3112
3628
|
className,
|
|
3113
|
-
trigger: /* @__PURE__ */
|
|
3114
|
-
/* @__PURE__ */
|
|
3629
|
+
trigger: /* @__PURE__ */ jsxs28("span", { className: "ph-filter-menu-trigger ph-sort-menu-trigger", children: [
|
|
3630
|
+
/* @__PURE__ */ jsx31(
|
|
3115
3631
|
IconArrowDown,
|
|
3116
3632
|
{
|
|
3117
3633
|
className: cn("h-3.5 w-3.5", direction === "ascending" && "rotate-180"),
|
|
3118
3634
|
"aria-hidden": true
|
|
3119
3635
|
}
|
|
3120
3636
|
),
|
|
3121
|
-
/* @__PURE__ */
|
|
3122
|
-
selected ? /* @__PURE__ */
|
|
3637
|
+
/* @__PURE__ */ jsx31("span", { className: "ph-filter-menu-trigger__label", children: label }),
|
|
3638
|
+
selected ? /* @__PURE__ */ jsx31("span", { className: "ph-filter-menu-trigger__value", children: selected.label }) : null
|
|
3123
3639
|
] }),
|
|
3124
|
-
children: /* @__PURE__ */
|
|
3640
|
+
children: /* @__PURE__ */ jsx31(DropdownRadioGroup, { value, onValueChange, children: options.map((option) => /* @__PURE__ */ jsx31(
|
|
3125
3641
|
DropdownRadioItem,
|
|
3126
3642
|
{
|
|
3127
3643
|
value: option.value,
|
|
@@ -3141,7 +3657,7 @@ function getOptionText(option) {
|
|
|
3141
3657
|
}
|
|
3142
3658
|
|
|
3143
3659
|
// src/components/ui/FilterControls.tsx
|
|
3144
|
-
import { jsx as
|
|
3660
|
+
import { jsx as jsx32, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
3145
3661
|
function FilterControls(_a) {
|
|
3146
3662
|
var _b = _a, {
|
|
3147
3663
|
children,
|
|
@@ -3157,71 +3673,73 @@ function FilterControls(_a) {
|
|
|
3157
3673
|
"className"
|
|
3158
3674
|
]);
|
|
3159
3675
|
const hasChips = Boolean(chipsProps == null ? void 0 : chipsProps.chips.length);
|
|
3160
|
-
return /* @__PURE__ */
|
|
3161
|
-
/* @__PURE__ */
|
|
3162
|
-
hasChips && chipsProps ? /* @__PURE__ */
|
|
3676
|
+
return /* @__PURE__ */ jsxs29("div", __spreadProps(__spreadValues({ className: cn("ph-filter-controls", className) }, props), { children: [
|
|
3677
|
+
/* @__PURE__ */ jsx32(FilterBar, __spreadProps(__spreadValues({}, barProps), { children })),
|
|
3678
|
+
hasChips && chipsProps ? /* @__PURE__ */ jsx32(FilterChips, __spreadValues({}, chipsProps)) : emptyState != null ? emptyState : null
|
|
3163
3679
|
] }));
|
|
3164
3680
|
}
|
|
3165
3681
|
|
|
3166
3682
|
// src/components/ui/CodeBlock.tsx
|
|
3167
|
-
import { useState as
|
|
3168
|
-
import { jsx as
|
|
3683
|
+
import { useState as useState8 } from "react";
|
|
3684
|
+
import { jsx as jsx33, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
3169
3685
|
function CodeBlock({ code, language = "tsx", filename, className }) {
|
|
3170
|
-
const [copied, setCopied] =
|
|
3686
|
+
const [copied, setCopied] = useState8(false);
|
|
3171
3687
|
const handleCopy = async () => {
|
|
3172
|
-
|
|
3688
|
+
try {
|
|
3689
|
+
await navigator.clipboard.writeText(code);
|
|
3690
|
+
} catch (e) {
|
|
3691
|
+
return;
|
|
3692
|
+
}
|
|
3693
|
+
trackSuiteEvent("Link Copied", {
|
|
3694
|
+
kind: "code",
|
|
3695
|
+
copy_kind: "code_block",
|
|
3696
|
+
label: filename != null ? filename : language
|
|
3697
|
+
});
|
|
3173
3698
|
setCopied(true);
|
|
3174
3699
|
setTimeout(() => setCopied(false), 2e3);
|
|
3175
3700
|
};
|
|
3176
|
-
return /* @__PURE__ */
|
|
3177
|
-
(filename || language) && /* @__PURE__ */
|
|
3178
|
-
/* @__PURE__ */
|
|
3179
|
-
|
|
3180
|
-
/* @__PURE__ */ jsx31("div", { className: "h-3 w-3 rounded-full bg-red-400" }),
|
|
3181
|
-
/* @__PURE__ */ jsx31("div", { className: "h-3 w-3 rounded-full bg-amber-400" }),
|
|
3182
|
-
/* @__PURE__ */ jsx31("div", { className: "h-3 w-3 rounded-full bg-emerald-400" })
|
|
3183
|
-
] }),
|
|
3184
|
-
filename && /* @__PURE__ */ jsx31("span", { className: "ml-2 text-xs text-white/60", children: filename })
|
|
3185
|
-
] }),
|
|
3186
|
-
/* @__PURE__ */ jsx31(
|
|
3701
|
+
return /* @__PURE__ */ jsxs30("div", { className: cn("ph-code-block", className), children: [
|
|
3702
|
+
(filename || language) && /* @__PURE__ */ jsxs30("div", { className: "flex items-center justify-between border-b border-white/10 px-4 py-2", children: [
|
|
3703
|
+
/* @__PURE__ */ jsx33("span", { className: "text-xs text-white/60", children: filename != null ? filename : language }),
|
|
3704
|
+
/* @__PURE__ */ jsx33(
|
|
3187
3705
|
"button",
|
|
3188
3706
|
{
|
|
3189
3707
|
type: "button",
|
|
3190
3708
|
onClick: handleCopy,
|
|
3191
|
-
className: "
|
|
3709
|
+
className: "ph-code-block__copy",
|
|
3192
3710
|
children: copied ? "Copied!" : "Copy"
|
|
3193
3711
|
}
|
|
3194
3712
|
)
|
|
3195
3713
|
] }),
|
|
3196
|
-
/* @__PURE__ */
|
|
3714
|
+
/* @__PURE__ */ jsx33("pre", { className: "overflow-x-auto p-4 text-sm leading-relaxed", children: /* @__PURE__ */ jsx33("code", { className: "font-mono text-[#e4e4e7]", children: code }) })
|
|
3197
3715
|
] });
|
|
3198
3716
|
}
|
|
3199
3717
|
|
|
3200
3718
|
// src/components/ui/ComponentDocs.tsx
|
|
3201
|
-
import { jsx as
|
|
3719
|
+
import { jsx as jsx34, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
3202
3720
|
function ComponentDocs({ title = "Props & variants", rows, defaultOpen = false, className }) {
|
|
3203
|
-
return /* @__PURE__ */
|
|
3204
|
-
/* @__PURE__ */
|
|
3205
|
-
/* @__PURE__ */
|
|
3206
|
-
/* @__PURE__ */
|
|
3207
|
-
/* @__PURE__ */
|
|
3208
|
-
/* @__PURE__ */
|
|
3721
|
+
return /* @__PURE__ */ jsxs31("details", { className: cn("ph-panel group overflow-hidden p-0", className), open: defaultOpen, children: [
|
|
3722
|
+
/* @__PURE__ */ jsxs31("summary", { className: "flex cursor-pointer list-none items-center justify-between gap-4 border-b border-ph-border px-4 py-3 transition hover:bg-ph-muted/60 [&::-webkit-details-marker]:hidden", children: [
|
|
3723
|
+
/* @__PURE__ */ jsx34("h3", { className: "text-xs font-semibold uppercase tracking-wider text-ph-mutedtext", children: title }),
|
|
3724
|
+
/* @__PURE__ */ jsxs31("span", { className: "rounded-full border border-ph-border bg-ph-surface px-2 py-1 text-[10px] font-semibold uppercase tracking-wider text-ph-mutedtext transition group-open:bg-ph-brand group-open:text-white", children: [
|
|
3725
|
+
/* @__PURE__ */ jsx34("span", { className: "group-open:hidden", children: "Show" }),
|
|
3726
|
+
/* @__PURE__ */ jsx34("span", { className: "hidden group-open:inline", children: "Hide" })
|
|
3209
3727
|
] })
|
|
3210
3728
|
] }),
|
|
3211
|
-
/* @__PURE__ */
|
|
3212
|
-
/* @__PURE__ */
|
|
3213
|
-
/* @__PURE__ */
|
|
3214
|
-
/* @__PURE__ */
|
|
3215
|
-
/* @__PURE__ */
|
|
3216
|
-
/* @__PURE__ */
|
|
3729
|
+
/* @__PURE__ */ jsx34("div", { className: "overflow-x-auto border-t border-ph-border", children: /* @__PURE__ */ jsxs31("table", { className: "w-full text-left text-sm", children: [
|
|
3730
|
+
/* @__PURE__ */ jsx34("thead", { className: "bg-ph-muted text-xs uppercase tracking-wider text-ph-mutedtext", children: /* @__PURE__ */ jsxs31("tr", { children: [
|
|
3731
|
+
/* @__PURE__ */ jsx34("th", { className: "px-4 py-2 font-semibold", children: "Prop" }),
|
|
3732
|
+
/* @__PURE__ */ jsx34("th", { className: "px-4 py-2 font-semibold", children: "Type" }),
|
|
3733
|
+
/* @__PURE__ */ jsx34("th", { className: "px-4 py-2 font-semibold", children: "Default" }),
|
|
3734
|
+
/* @__PURE__ */ jsx34("th", { className: "px-4 py-2 font-semibold", children: "Use" })
|
|
3217
3735
|
] }) }),
|
|
3218
|
-
/* @__PURE__ */
|
|
3736
|
+
/* @__PURE__ */ jsx34("tbody", { className: "divide-y divide-ph-border", children: rows.map((row) => {
|
|
3219
3737
|
var _a, _b;
|
|
3220
|
-
return /* @__PURE__ */
|
|
3221
|
-
/* @__PURE__ */
|
|
3222
|
-
/* @__PURE__ */
|
|
3223
|
-
/* @__PURE__ */
|
|
3224
|
-
/* @__PURE__ */
|
|
3738
|
+
return /* @__PURE__ */ jsxs31("tr", { children: [
|
|
3739
|
+
/* @__PURE__ */ jsx34("td", { className: "px-4 py-3 align-top font-mono text-xs text-ph-ink", children: row.name }),
|
|
3740
|
+
/* @__PURE__ */ jsx34("td", { className: "px-4 py-3 align-top font-mono text-xs text-ph-subtle", children: row.type }),
|
|
3741
|
+
/* @__PURE__ */ jsx34("td", { className: "px-4 py-3 align-top font-mono text-xs text-ph-subtle", children: (_a = row.defaultValue) != null ? _a : "-" }),
|
|
3742
|
+
/* @__PURE__ */ jsx34("td", { className: "px-4 py-3 align-top text-ph-subtle", children: (_b = row.description) != null ? _b : /* @__PURE__ */ jsx34("span", { className: "text-ph-mutedtext", children: "\u2014" }) })
|
|
3225
3743
|
] }, row.name);
|
|
3226
3744
|
}) })
|
|
3227
3745
|
] }) })
|
|
@@ -3229,8 +3747,8 @@ function ComponentDocs({ title = "Props & variants", rows, defaultOpen = false,
|
|
|
3229
3747
|
}
|
|
3230
3748
|
|
|
3231
3749
|
// src/components/ui/ShowcaseWrapper.tsx
|
|
3232
|
-
import { useState as
|
|
3233
|
-
import { jsx as
|
|
3750
|
+
import { useState as useState9 } from "react";
|
|
3751
|
+
import { jsx as jsx35, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
3234
3752
|
function ShowcaseWrapper({
|
|
3235
3753
|
id,
|
|
3236
3754
|
title,
|
|
@@ -3242,32 +3760,32 @@ function ShowcaseWrapper({
|
|
|
3242
3760
|
className
|
|
3243
3761
|
}) {
|
|
3244
3762
|
var _a;
|
|
3245
|
-
const [showCode, setShowCode] =
|
|
3763
|
+
const [showCode, setShowCode] = useState9(false);
|
|
3246
3764
|
const fallbackId = (_a = titleIdMap[title]) != null ? _a : title.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, "");
|
|
3247
|
-
return /* @__PURE__ */
|
|
3248
|
-
/* @__PURE__ */
|
|
3249
|
-
/* @__PURE__ */
|
|
3250
|
-
/* @__PURE__ */
|
|
3251
|
-
/* @__PURE__ */
|
|
3765
|
+
return /* @__PURE__ */ jsxs32("section", { id: id != null ? id : fallbackId, className: cn("scroll-mt-20", className), children: [
|
|
3766
|
+
/* @__PURE__ */ jsxs32("div", { className: "ph-h2-rule mb-8", children: [
|
|
3767
|
+
/* @__PURE__ */ jsxs32("div", { className: "flex items-center gap-1.5", children: [
|
|
3768
|
+
/* @__PURE__ */ jsx35("h2", { children: title }),
|
|
3769
|
+
/* @__PURE__ */ jsx35(
|
|
3252
3770
|
"button",
|
|
3253
3771
|
{
|
|
3254
3772
|
type: "button",
|
|
3255
3773
|
onClick: () => setShowCode(!showCode),
|
|
3256
3774
|
className: cn(
|
|
3257
|
-
"flex h-10 w-10 items-center justify-center rounded-full border transition-
|
|
3258
|
-
showCode ? "border-ph-brand bg-ph-brand text-[var(--ph-on-accent)] shadow-
|
|
3775
|
+
"ph-showcase-toggle flex h-10 w-10 items-center justify-center rounded-full border transition-colors",
|
|
3776
|
+
showCode ? "border-ph-brand bg-ph-brand text-[var(--ph-on-accent)] shadow-[var(--ph-shadow-control)]" : "border-ph-border bg-ph-surface text-ph-subtle hover:border-ph-brand hover:text-ph-brand"
|
|
3259
3777
|
),
|
|
3260
3778
|
title: showCode ? "Hide code" : "Show code",
|
|
3261
3779
|
"aria-label": showCode ? "Hide code" : "Show code",
|
|
3262
|
-
children: /* @__PURE__ */
|
|
3780
|
+
children: /* @__PURE__ */ jsx35(IconCodePreview, { className: "h-5 w-5", "aria-hidden": true })
|
|
3263
3781
|
}
|
|
3264
3782
|
)
|
|
3265
3783
|
] }),
|
|
3266
|
-
/* @__PURE__ */
|
|
3784
|
+
/* @__PURE__ */ jsx35("hr", {})
|
|
3267
3785
|
] }),
|
|
3268
|
-
description && /* @__PURE__ */
|
|
3269
|
-
docs && /* @__PURE__ */
|
|
3270
|
-
/* @__PURE__ */
|
|
3786
|
+
description && /* @__PURE__ */ jsx35("p", { className: "mb-6 text-sm text-ph-subtle", children: description }),
|
|
3787
|
+
docs && /* @__PURE__ */ jsx35("div", { className: "mb-6", children: docs }),
|
|
3788
|
+
/* @__PURE__ */ jsxs32(
|
|
3271
3789
|
"div",
|
|
3272
3790
|
{
|
|
3273
3791
|
className: cn(
|
|
@@ -3275,15 +3793,15 @@ function ShowcaseWrapper({
|
|
|
3275
3793
|
showCode ? "lg:grid lg:grid-cols-[1fr,minmax(360px,420px)]" : "block"
|
|
3276
3794
|
),
|
|
3277
3795
|
children: [
|
|
3278
|
-
/* @__PURE__ */
|
|
3279
|
-
/* @__PURE__ */
|
|
3796
|
+
/* @__PURE__ */ jsx35("div", { className: cn("min-w-0", showCode && "lg:pr-2"), children }),
|
|
3797
|
+
/* @__PURE__ */ jsx35(
|
|
3280
3798
|
"div",
|
|
3281
3799
|
{
|
|
3282
3800
|
className: cn(
|
|
3283
|
-
"transition-
|
|
3801
|
+
"transition-opacity duration-200",
|
|
3284
3802
|
showCode ? "block opacity-100" : "hidden opacity-0 lg:hidden"
|
|
3285
3803
|
),
|
|
3286
|
-
children: /* @__PURE__ */
|
|
3804
|
+
children: /* @__PURE__ */ jsx35("div", { className: "sticky top-20", children: /* @__PURE__ */ jsx35(CodeBlock, { code, filename }) })
|
|
3287
3805
|
}
|
|
3288
3806
|
)
|
|
3289
3807
|
]
|
|
@@ -3332,29 +3850,29 @@ var titleIdMap = {
|
|
|
3332
3850
|
};
|
|
3333
3851
|
|
|
3334
3852
|
// src/components/ui/CollapsibleSection.tsx
|
|
3335
|
-
import { useId as
|
|
3336
|
-
import { jsx as
|
|
3853
|
+
import { useId as useId10, useState as useState10 } from "react";
|
|
3854
|
+
import { jsx as jsx36, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
3337
3855
|
function CollapsibleSection({
|
|
3338
3856
|
title,
|
|
3339
3857
|
children,
|
|
3340
3858
|
defaultOpen = true,
|
|
3341
3859
|
id
|
|
3342
3860
|
}) {
|
|
3343
|
-
const [isOpen, setIsOpen] =
|
|
3344
|
-
const generatedId =
|
|
3861
|
+
const [isOpen, setIsOpen] = useState10(defaultOpen);
|
|
3862
|
+
const generatedId = useId10();
|
|
3345
3863
|
const contentId = `${id != null ? id : generatedId}-content`;
|
|
3346
|
-
return /* @__PURE__ */
|
|
3347
|
-
/* @__PURE__ */
|
|
3864
|
+
return /* @__PURE__ */ jsxs33("section", { id, className: "scroll-mt-20", children: [
|
|
3865
|
+
/* @__PURE__ */ jsxs33(
|
|
3348
3866
|
"button",
|
|
3349
3867
|
{
|
|
3350
3868
|
type: "button",
|
|
3351
3869
|
onClick: () => setIsOpen(!isOpen),
|
|
3352
3870
|
"aria-expanded": isOpen,
|
|
3353
3871
|
"aria-controls": contentId,
|
|
3354
|
-
className: "
|
|
3872
|
+
className: "ph-collapsible-trigger mb-6",
|
|
3355
3873
|
children: [
|
|
3356
|
-
/* @__PURE__ */
|
|
3357
|
-
/* @__PURE__ */
|
|
3874
|
+
/* @__PURE__ */ jsx36("span", { className: "text-lg font-bold text-ph-ink", children: title }),
|
|
3875
|
+
/* @__PURE__ */ jsx36(
|
|
3358
3876
|
IconChevronDown,
|
|
3359
3877
|
{
|
|
3360
3878
|
className: cn(
|
|
@@ -3367,7 +3885,7 @@ function CollapsibleSection({
|
|
|
3367
3885
|
]
|
|
3368
3886
|
}
|
|
3369
3887
|
),
|
|
3370
|
-
/* @__PURE__ */
|
|
3888
|
+
/* @__PURE__ */ jsx36(
|
|
3371
3889
|
"div",
|
|
3372
3890
|
{
|
|
3373
3891
|
id: contentId,
|
|
@@ -3376,10 +3894,10 @@ function CollapsibleSection({
|
|
|
3376
3894
|
if (node) node.toggleAttribute("inert", !isOpen);
|
|
3377
3895
|
},
|
|
3378
3896
|
className: cn(
|
|
3379
|
-
"
|
|
3380
|
-
isOpen ? "
|
|
3897
|
+
"grid transition-[grid-template-rows,opacity] duration-200",
|
|
3898
|
+
isOpen ? "grid-rows-[1fr] opacity-100" : "grid-rows-[0fr] opacity-0"
|
|
3381
3899
|
),
|
|
3382
|
-
children
|
|
3900
|
+
children: /* @__PURE__ */ jsx36("div", { className: "overflow-hidden", children })
|
|
3383
3901
|
}
|
|
3384
3902
|
)
|
|
3385
3903
|
] });
|
|
@@ -3387,7 +3905,7 @@ function CollapsibleSection({
|
|
|
3387
3905
|
|
|
3388
3906
|
// src/components/ui/Typography.tsx
|
|
3389
3907
|
import { forwardRef as forwardRef9 } from "react";
|
|
3390
|
-
import { jsx as
|
|
3908
|
+
import { jsx as jsx37 } from "react/jsx-runtime";
|
|
3391
3909
|
var toneMap2 = {
|
|
3392
3910
|
default: "text-ph-ink",
|
|
3393
3911
|
muted: "text-ph-mutedtext",
|
|
@@ -3411,63 +3929,64 @@ function textClass(base, tone, weight, truncate, className) {
|
|
|
3411
3929
|
}
|
|
3412
3930
|
var Display = forwardRef9(function Display2(_a, ref) {
|
|
3413
3931
|
var _b = _a, { children, tone = "default", weight, truncate, className } = _b, props = __objRest(_b, ["children", "tone", "weight", "truncate", "className"]);
|
|
3414
|
-
return /* @__PURE__ */
|
|
3932
|
+
return /* @__PURE__ */ jsx37("h1", __spreadProps(__spreadValues({ ref }, props), { className: textClass("ph-hero-title", tone, weight, truncate, className), children }));
|
|
3415
3933
|
});
|
|
3416
3934
|
var SectionTitle = forwardRef9(function SectionTitle2(_a, ref) {
|
|
3417
3935
|
var _b = _a, { children, tone = "default", weight, truncate, className } = _b, props = __objRest(_b, ["children", "tone", "weight", "truncate", "className"]);
|
|
3418
|
-
return /* @__PURE__ */
|
|
3936
|
+
return /* @__PURE__ */ jsx37("h2", __spreadProps(__spreadValues({ ref }, props), { className: textClass("ph-section-title", tone, weight, truncate, className), children }));
|
|
3419
3937
|
});
|
|
3420
3938
|
var H1 = forwardRef9(function H12(_a, ref) {
|
|
3421
3939
|
var _b = _a, { children, tone = "default", weight, truncate, className } = _b, props = __objRest(_b, ["children", "tone", "weight", "truncate", "className"]);
|
|
3422
|
-
return /* @__PURE__ */
|
|
3940
|
+
return /* @__PURE__ */ jsx37("h1", __spreadProps(__spreadValues({ ref }, props), { className: textClass("ph-page-title font-bold", tone, weight, truncate, className), children }));
|
|
3423
3941
|
});
|
|
3424
3942
|
var H2 = forwardRef9(function H22(_a, ref) {
|
|
3425
3943
|
var _b = _a, { children, tone = "default", weight, truncate, className } = _b, props = __objRest(_b, ["children", "tone", "weight", "truncate", "className"]);
|
|
3426
|
-
return /* @__PURE__ */
|
|
3944
|
+
return /* @__PURE__ */ jsx37("h2", __spreadProps(__spreadValues({ ref }, props), { className: textClass("text-2xl font-semibold tracking-tight", tone, weight, truncate, className), children }));
|
|
3427
3945
|
});
|
|
3428
3946
|
var H3 = forwardRef9(function H32(_a, ref) {
|
|
3429
3947
|
var _b = _a, { children, tone = "default", weight, truncate, className } = _b, props = __objRest(_b, ["children", "tone", "weight", "truncate", "className"]);
|
|
3430
|
-
return /* @__PURE__ */
|
|
3948
|
+
return /* @__PURE__ */ jsx37("h3", __spreadProps(__spreadValues({ ref }, props), { className: textClass("text-xl font-semibold", tone, weight, truncate, className), children }));
|
|
3431
3949
|
});
|
|
3432
3950
|
var H4 = forwardRef9(function H42(_a, ref) {
|
|
3433
3951
|
var _b = _a, { children, tone = "default", weight, truncate, className } = _b, props = __objRest(_b, ["children", "tone", "weight", "truncate", "className"]);
|
|
3434
|
-
return /* @__PURE__ */
|
|
3952
|
+
return /* @__PURE__ */ jsx37("h4", __spreadProps(__spreadValues({ ref }, props), { className: textClass("text-lg font-semibold", tone, weight, truncate, className), children }));
|
|
3435
3953
|
});
|
|
3436
3954
|
var H5 = forwardRef9(function H52(_a, ref) {
|
|
3437
3955
|
var _b = _a, { children, tone = "default", weight, truncate, className } = _b, props = __objRest(_b, ["children", "tone", "weight", "truncate", "className"]);
|
|
3438
|
-
return /* @__PURE__ */
|
|
3956
|
+
return /* @__PURE__ */ jsx37("h5", __spreadProps(__spreadValues({ ref }, props), { className: textClass("text-base font-semibold", tone, weight, truncate, className), children }));
|
|
3439
3957
|
});
|
|
3440
3958
|
var P = forwardRef9(function P2(_a, ref) {
|
|
3441
3959
|
var _b = _a, { children, tone = "default", weight, truncate, className } = _b, props = __objRest(_b, ["children", "tone", "weight", "truncate", "className"]);
|
|
3442
|
-
return /* @__PURE__ */
|
|
3960
|
+
return /* @__PURE__ */ jsx37("p", __spreadProps(__spreadValues({ ref }, props), { className: textClass("text-base leading-relaxed", tone, weight, truncate, className), children }));
|
|
3443
3961
|
});
|
|
3444
3962
|
var Small = forwardRef9(function Small2(_a, ref) {
|
|
3445
3963
|
var _b = _a, { children, tone = "default", weight, truncate, className } = _b, props = __objRest(_b, ["children", "tone", "weight", "truncate", "className"]);
|
|
3446
|
-
return /* @__PURE__ */
|
|
3964
|
+
return /* @__PURE__ */ jsx37("span", __spreadProps(__spreadValues({ ref }, props), { className: textClass("text-sm leading-relaxed", tone, weight, truncate, className), children }));
|
|
3447
3965
|
});
|
|
3448
3966
|
var Caption = forwardRef9(function Caption2(_a, ref) {
|
|
3449
3967
|
var _b = _a, { children, tone = "muted", weight, truncate, className } = _b, props = __objRest(_b, ["children", "tone", "weight", "truncate", "className"]);
|
|
3450
|
-
return /* @__PURE__ */
|
|
3968
|
+
return /* @__PURE__ */ jsx37("span", __spreadProps(__spreadValues({ ref }, props), { className: textClass("text-xs font-medium", tone, weight, truncate, className), children }));
|
|
3451
3969
|
});
|
|
3452
3970
|
var Overline = forwardRef9(function Overline2(_a, ref) {
|
|
3453
3971
|
var _b = _a, { children, tone = "muted", weight, truncate, className } = _b, props = __objRest(_b, ["children", "tone", "weight", "truncate", "className"]);
|
|
3454
|
-
return /* @__PURE__ */
|
|
3972
|
+
return /* @__PURE__ */ jsx37("span", __spreadProps(__spreadValues({ ref }, props), { className: textClass("text-[length:var(--ph-type-overline)] font-semibold uppercase tracking-[0.08em]", tone, weight, truncate, className), children }));
|
|
3455
3973
|
});
|
|
3456
3974
|
var Lead = forwardRef9(function Lead2(_a, ref) {
|
|
3457
3975
|
var _b = _a, { children, tone = "subtle", weight, truncate, className } = _b, props = __objRest(_b, ["children", "tone", "weight", "truncate", "className"]);
|
|
3458
|
-
return /* @__PURE__ */
|
|
3976
|
+
return /* @__PURE__ */ jsx37("p", __spreadProps(__spreadValues({ ref }, props), { className: textClass("ph-lead", tone, weight, truncate, className), children }));
|
|
3459
3977
|
});
|
|
3460
3978
|
var Mono = forwardRef9(function Mono2(_a, ref) {
|
|
3461
3979
|
var _b = _a, { children, tone = "default", weight, truncate, className } = _b, props = __objRest(_b, ["children", "tone", "weight", "truncate", "className"]);
|
|
3462
|
-
return /* @__PURE__ */
|
|
3980
|
+
return /* @__PURE__ */ jsx37("code", __spreadProps(__spreadValues({ ref }, props), { className: textClass("text-sm font-mono leading-relaxed", tone, weight, truncate, className), children }));
|
|
3463
3981
|
});
|
|
3464
3982
|
var Label = forwardRef9(function Label2(_a, ref) {
|
|
3465
3983
|
var _b = _a, { children, tone = "default", weight, truncate, className } = _b, props = __objRest(_b, ["children", "tone", "weight", "truncate", "className"]);
|
|
3466
|
-
return /* @__PURE__ */
|
|
3984
|
+
return /* @__PURE__ */ jsx37("label", __spreadProps(__spreadValues({ ref }, props), { className: textClass("text-sm font-medium", tone, weight, truncate, className), children }));
|
|
3467
3985
|
});
|
|
3468
3986
|
|
|
3469
3987
|
// src/components/ui/Avatar.tsx
|
|
3470
|
-
import {
|
|
3988
|
+
import { Children } from "react";
|
|
3989
|
+
import { jsx as jsx38, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
3471
3990
|
var sizeMap4 = {
|
|
3472
3991
|
xs: "h-8 w-8 text-[10px]",
|
|
3473
3992
|
sm: "h-10 w-10 text-xs",
|
|
@@ -3486,7 +4005,7 @@ function Avatar(_a) {
|
|
|
3486
4005
|
label,
|
|
3487
4006
|
icon,
|
|
3488
4007
|
size = "md",
|
|
3489
|
-
color = "bg-ph-brand text-
|
|
4008
|
+
color = "bg-ph-brand text-[var(--ph-on-accent)]",
|
|
3490
4009
|
status,
|
|
3491
4010
|
badge,
|
|
3492
4011
|
className
|
|
@@ -3499,19 +4018,19 @@ function Avatar(_a) {
|
|
|
3499
4018
|
"badge",
|
|
3500
4019
|
"className"
|
|
3501
4020
|
]);
|
|
3502
|
-
return /* @__PURE__ */
|
|
3503
|
-
/* @__PURE__ */
|
|
4021
|
+
return /* @__PURE__ */ jsxs34("div", __spreadProps(__spreadValues({ className: cn("relative inline-flex shrink-0", className) }, props), { children: [
|
|
4022
|
+
/* @__PURE__ */ jsx38(
|
|
3504
4023
|
"div",
|
|
3505
4024
|
{
|
|
3506
4025
|
className: cn(
|
|
3507
|
-
"flex items-center justify-center rounded-full border border-ph-border font-bold
|
|
4026
|
+
"ph-avatar flex items-center justify-center rounded-full border border-ph-border font-bold",
|
|
3508
4027
|
sizeMap4[size],
|
|
3509
4028
|
color
|
|
3510
4029
|
),
|
|
3511
4030
|
children: icon || label
|
|
3512
4031
|
}
|
|
3513
4032
|
),
|
|
3514
|
-
status && /* @__PURE__ */
|
|
4033
|
+
status && /* @__PURE__ */ jsx38(
|
|
3515
4034
|
"span",
|
|
3516
4035
|
{
|
|
3517
4036
|
role: "img",
|
|
@@ -3522,17 +4041,17 @@ function Avatar(_a) {
|
|
|
3522
4041
|
)
|
|
3523
4042
|
}
|
|
3524
4043
|
),
|
|
3525
|
-
badge && /* @__PURE__ */
|
|
4044
|
+
badge && /* @__PURE__ */ jsx38("span", { className: "absolute -bottom-1 -right-1 flex min-w-[22px] items-center justify-center rounded-full bg-ph-brand px-1.5 py-px text-[10px] font-bold text-[var(--ph-on-accent)]", children: badge })
|
|
3526
4045
|
] }));
|
|
3527
4046
|
}
|
|
3528
4047
|
function AvatarGroup(_a) {
|
|
3529
4048
|
var _b = _a, { children, max, className } = _b, props = __objRest(_b, ["children", "max", "className"]);
|
|
3530
|
-
const items =
|
|
4049
|
+
const items = Children.toArray(children);
|
|
3531
4050
|
const visible = max ? items.slice(0, max) : items;
|
|
3532
4051
|
const remaining = max ? items.length - max : 0;
|
|
3533
|
-
return /* @__PURE__ */
|
|
4052
|
+
return /* @__PURE__ */ jsxs34("div", __spreadProps(__spreadValues({ className: cn("-space-x-3 flex rtl:space-x-reverse", className) }, props), { children: [
|
|
3534
4053
|
visible,
|
|
3535
|
-
remaining > 0 && /* @__PURE__ */
|
|
4054
|
+
remaining > 0 && /* @__PURE__ */ jsx38(
|
|
3536
4055
|
Avatar,
|
|
3537
4056
|
{
|
|
3538
4057
|
label: `+${remaining}`,
|
|
@@ -3544,8 +4063,8 @@ function AvatarGroup(_a) {
|
|
|
3544
4063
|
}
|
|
3545
4064
|
|
|
3546
4065
|
// src/components/ui/Progress.tsx
|
|
3547
|
-
import { useId as
|
|
3548
|
-
import { jsx as
|
|
4066
|
+
import { useId as useId11 } from "react";
|
|
4067
|
+
import { jsx as jsx39, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
3549
4068
|
var sizeMap5 = {
|
|
3550
4069
|
sm: "h-1",
|
|
3551
4070
|
md: "h-2",
|
|
@@ -3573,19 +4092,19 @@ function Progress(_a) {
|
|
|
3573
4092
|
"aria-label",
|
|
3574
4093
|
"aria-labelledby"
|
|
3575
4094
|
]);
|
|
3576
|
-
const labelId =
|
|
4095
|
+
const labelId = useId11();
|
|
3577
4096
|
const safeMax = Number.isFinite(max) && max > 0 ? max : 100;
|
|
3578
4097
|
const safeValue = Number.isFinite(value) ? Math.min(safeMax, Math.max(0, value)) : 0;
|
|
3579
4098
|
const percentage = safeValue / safeMax * 100;
|
|
3580
|
-
return /* @__PURE__ */
|
|
3581
|
-
(label || showPercentage) && /* @__PURE__ */
|
|
3582
|
-
label && /* @__PURE__ */
|
|
3583
|
-
showPercentage && /* @__PURE__ */
|
|
4099
|
+
return /* @__PURE__ */ jsxs35("div", __spreadProps(__spreadValues({ className: cn("w-full", className) }, props), { children: [
|
|
4100
|
+
(label || showPercentage) && /* @__PURE__ */ jsxs35("div", { className: "mb-1.5 flex justify-between text-sm text-ph-subtle", children: [
|
|
4101
|
+
label && /* @__PURE__ */ jsx39("span", { id: labelId, children: label }),
|
|
4102
|
+
showPercentage && /* @__PURE__ */ jsxs35("span", { className: "tabular-nums", children: [
|
|
3584
4103
|
Math.round(percentage),
|
|
3585
4104
|
"%"
|
|
3586
4105
|
] })
|
|
3587
4106
|
] }),
|
|
3588
|
-
/* @__PURE__ */
|
|
4107
|
+
/* @__PURE__ */ jsx39("div", { className: cn("ph-progress", sizeMap5[size]), children: /* @__PURE__ */ jsx39(
|
|
3589
4108
|
"div",
|
|
3590
4109
|
{
|
|
3591
4110
|
className: cn("ph-progress-bar", color),
|
|
@@ -3603,7 +4122,7 @@ function Progress(_a) {
|
|
|
3603
4122
|
|
|
3604
4123
|
// src/components/ui/Link.tsx
|
|
3605
4124
|
import { forwardRef as forwardRef10 } from "react";
|
|
3606
|
-
import { jsx as
|
|
4125
|
+
import { jsx as jsx40 } from "react/jsx-runtime";
|
|
3607
4126
|
var Link = forwardRef10(function Link2(_a, ref) {
|
|
3608
4127
|
var _b = _a, {
|
|
3609
4128
|
className,
|
|
@@ -3614,7 +4133,7 @@ var Link = forwardRef10(function Link2(_a, ref) {
|
|
|
3614
4133
|
"disabled",
|
|
3615
4134
|
"children"
|
|
3616
4135
|
]);
|
|
3617
|
-
return /* @__PURE__ */
|
|
4136
|
+
return /* @__PURE__ */ jsx40(
|
|
3618
4137
|
"a",
|
|
3619
4138
|
__spreadProps(__spreadValues({
|
|
3620
4139
|
ref,
|
|
@@ -3633,10 +4152,10 @@ var Link = forwardRef10(function Link2(_a, ref) {
|
|
|
3633
4152
|
Link.displayName = "Link";
|
|
3634
4153
|
|
|
3635
4154
|
// src/components/ui/Spinner.tsx
|
|
3636
|
-
import { jsx as
|
|
4155
|
+
import { jsx as jsx41, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
3637
4156
|
function Spinner(_a) {
|
|
3638
4157
|
var _b = _a, { size = "sm", textColored = false, className } = _b, props = __objRest(_b, ["size", "textColored", "className"]);
|
|
3639
|
-
return /* @__PURE__ */
|
|
4158
|
+
return /* @__PURE__ */ jsx41(
|
|
3640
4159
|
"span",
|
|
3641
4160
|
__spreadProps(__spreadValues({
|
|
3642
4161
|
className: cn(
|
|
@@ -3648,17 +4167,295 @@ function Spinner(_a) {
|
|
|
3648
4167
|
role: "status",
|
|
3649
4168
|
"aria-label": "Loading"
|
|
3650
4169
|
}, props), {
|
|
3651
|
-
children: /* @__PURE__ */
|
|
3652
|
-
/* @__PURE__ */
|
|
3653
|
-
/* @__PURE__ */
|
|
4170
|
+
children: /* @__PURE__ */ jsxs36("svg", { viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: "ph-spinner__svg", children: [
|
|
4171
|
+
/* @__PURE__ */ jsx41("circle", { cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "3", opacity: 0.2 }),
|
|
4172
|
+
/* @__PURE__ */ jsx41("path", { d: "M12 2a10 10 0 0 1 10 10", stroke: "currentColor", strokeWidth: "3", strokeLinecap: "round" })
|
|
3654
4173
|
] })
|
|
3655
4174
|
})
|
|
3656
4175
|
);
|
|
3657
4176
|
}
|
|
3658
4177
|
Spinner.displayName = "Spinner";
|
|
3659
4178
|
|
|
4179
|
+
// src/components/ui/BrandSpinner.tsx
|
|
4180
|
+
import { useId as useId12, useSyncExternalStore } from "react";
|
|
4181
|
+
import { Fragment as Fragment7, jsx as jsx42, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
4182
|
+
var sizes = { sm: 20, md: 40, lg: 56 };
|
|
4183
|
+
var reducedMotionQuery = "(prefers-reduced-motion: reduce)";
|
|
4184
|
+
function subscribeMotion(onChange) {
|
|
4185
|
+
var _a;
|
|
4186
|
+
const media = (_a = window.matchMedia) == null ? void 0 : _a.call(window, reducedMotionQuery);
|
|
4187
|
+
media == null ? void 0 : media.addEventListener("change", onChange);
|
|
4188
|
+
return () => media == null ? void 0 : media.removeEventListener("change", onChange);
|
|
4189
|
+
}
|
|
4190
|
+
function readReducedMotion() {
|
|
4191
|
+
var _a, _b;
|
|
4192
|
+
return (_b = (_a = window.matchMedia) == null ? void 0 : _a.call(window, reducedMotionQuery).matches) != null ? _b : false;
|
|
4193
|
+
}
|
|
4194
|
+
function BrandSpinner(_a) {
|
|
4195
|
+
var _b = _a, {
|
|
4196
|
+
variant = "ring",
|
|
4197
|
+
size = "md",
|
|
4198
|
+
label = "Loading",
|
|
4199
|
+
className
|
|
4200
|
+
} = _b, props = __objRest(_b, [
|
|
4201
|
+
"variant",
|
|
4202
|
+
"size",
|
|
4203
|
+
"label",
|
|
4204
|
+
"className"
|
|
4205
|
+
]);
|
|
4206
|
+
const gradientId = `ph-spinner-${useId12().replace(/:/g, "")}`;
|
|
4207
|
+
const reducedMotion = useSyncExternalStore(
|
|
4208
|
+
subscribeMotion,
|
|
4209
|
+
readReducedMotion,
|
|
4210
|
+
() => true
|
|
4211
|
+
);
|
|
4212
|
+
const dimension = sizes[size];
|
|
4213
|
+
return /* @__PURE__ */ jsx42(
|
|
4214
|
+
"div",
|
|
4215
|
+
__spreadProps(__spreadValues({
|
|
4216
|
+
role: "status",
|
|
4217
|
+
"aria-label": label,
|
|
4218
|
+
"data-test": "app-spinner",
|
|
4219
|
+
className: cn(
|
|
4220
|
+
"inline-flex shrink-0",
|
|
4221
|
+
variant !== "orbit" && "text-ph-brand",
|
|
4222
|
+
className
|
|
4223
|
+
)
|
|
4224
|
+
}, props), {
|
|
4225
|
+
children: /* @__PURE__ */ jsx42(
|
|
4226
|
+
"svg",
|
|
4227
|
+
{
|
|
4228
|
+
width: dimension,
|
|
4229
|
+
height: dimension,
|
|
4230
|
+
viewBox: variant === "ring" ? "0 0 24 24" : "0 0 40 40",
|
|
4231
|
+
"aria-hidden": true,
|
|
4232
|
+
className: variant === "timer" || variant === "ring" ? "animate-spin motion-reduce:animate-none" : void 0,
|
|
4233
|
+
children: variant === "ring" ? /* @__PURE__ */ jsxs37(Fragment7, { children: [
|
|
4234
|
+
/* @__PURE__ */ jsx42(
|
|
4235
|
+
"circle",
|
|
4236
|
+
{
|
|
4237
|
+
cx: "12",
|
|
4238
|
+
cy: "12",
|
|
4239
|
+
r: "10",
|
|
4240
|
+
fill: "none",
|
|
4241
|
+
stroke: "currentColor",
|
|
4242
|
+
strokeWidth: "3",
|
|
4243
|
+
opacity: "0.2"
|
|
4244
|
+
}
|
|
4245
|
+
),
|
|
4246
|
+
/* @__PURE__ */ jsx42(
|
|
4247
|
+
"path",
|
|
4248
|
+
{
|
|
4249
|
+
d: "M12 2a10 10 0 0 1 10 10",
|
|
4250
|
+
fill: "none",
|
|
4251
|
+
stroke: "currentColor",
|
|
4252
|
+
strokeWidth: "3",
|
|
4253
|
+
strokeLinecap: "round"
|
|
4254
|
+
}
|
|
4255
|
+
)
|
|
4256
|
+
] }) : variant === "timer" ? /* @__PURE__ */ jsxs37(Fragment7, { children: [
|
|
4257
|
+
/* @__PURE__ */ jsx42(
|
|
4258
|
+
"circle",
|
|
4259
|
+
{
|
|
4260
|
+
cx: "20",
|
|
4261
|
+
cy: "20",
|
|
4262
|
+
r: "15",
|
|
4263
|
+
fill: "none",
|
|
4264
|
+
stroke: "currentColor",
|
|
4265
|
+
strokeOpacity: "0.18",
|
|
4266
|
+
strokeWidth: "2.5"
|
|
4267
|
+
}
|
|
4268
|
+
),
|
|
4269
|
+
/* @__PURE__ */ jsx42(
|
|
4270
|
+
"circle",
|
|
4271
|
+
{
|
|
4272
|
+
cx: "20",
|
|
4273
|
+
cy: "20",
|
|
4274
|
+
r: "15",
|
|
4275
|
+
fill: "none",
|
|
4276
|
+
stroke: "currentColor",
|
|
4277
|
+
strokeWidth: "2.5",
|
|
4278
|
+
strokeLinecap: "round",
|
|
4279
|
+
strokeDasharray: "24 70"
|
|
4280
|
+
}
|
|
4281
|
+
),
|
|
4282
|
+
/* @__PURE__ */ jsx42("circle", { cx: "20", cy: "5", r: "2.25", fill: "currentColor" })
|
|
4283
|
+
] }) : variant === "columns" ? /* @__PURE__ */ jsxs37(Fragment7, { children: [
|
|
4284
|
+
/* @__PURE__ */ jsx42(
|
|
4285
|
+
"rect",
|
|
4286
|
+
{
|
|
4287
|
+
x: "9",
|
|
4288
|
+
y: "16",
|
|
4289
|
+
width: "6",
|
|
4290
|
+
height: "14",
|
|
4291
|
+
rx: "2",
|
|
4292
|
+
fill: "currentColor",
|
|
4293
|
+
fillOpacity: "0.35",
|
|
4294
|
+
className: "ph-brand-spinner__column"
|
|
4295
|
+
}
|
|
4296
|
+
),
|
|
4297
|
+
/* @__PURE__ */ jsx42(
|
|
4298
|
+
"rect",
|
|
4299
|
+
{
|
|
4300
|
+
x: "17",
|
|
4301
|
+
y: "11",
|
|
4302
|
+
width: "6",
|
|
4303
|
+
height: "19",
|
|
4304
|
+
rx: "2",
|
|
4305
|
+
fill: "currentColor",
|
|
4306
|
+
className: "ph-brand-spinner__column",
|
|
4307
|
+
style: { animationDelay: "0.14s" }
|
|
4308
|
+
}
|
|
4309
|
+
),
|
|
4310
|
+
/* @__PURE__ */ jsx42(
|
|
4311
|
+
"rect",
|
|
4312
|
+
{
|
|
4313
|
+
x: "25",
|
|
4314
|
+
y: "14",
|
|
4315
|
+
width: "6",
|
|
4316
|
+
height: "16",
|
|
4317
|
+
rx: "2",
|
|
4318
|
+
fill: "currentColor",
|
|
4319
|
+
fillOpacity: "0.55",
|
|
4320
|
+
className: "ph-brand-spinner__column",
|
|
4321
|
+
style: { animationDelay: "0.28s" }
|
|
4322
|
+
}
|
|
4323
|
+
)
|
|
4324
|
+
] }) : variant === "orbit" ? /* @__PURE__ */ jsxs37(Fragment7, { children: [
|
|
4325
|
+
/* @__PURE__ */ jsx42("defs", { children: /* @__PURE__ */ jsxs37(
|
|
4326
|
+
"linearGradient",
|
|
4327
|
+
{
|
|
4328
|
+
id: gradientId,
|
|
4329
|
+
x1: "0%",
|
|
4330
|
+
y1: "0%",
|
|
4331
|
+
x2: "100%",
|
|
4332
|
+
y2: "100%",
|
|
4333
|
+
children: [
|
|
4334
|
+
/* @__PURE__ */ jsx42("stop", { offset: "0%", stopColor: "#1877f2" }),
|
|
4335
|
+
/* @__PURE__ */ jsx42("stop", { offset: "100%", stopColor: "#ebbcba" })
|
|
4336
|
+
]
|
|
4337
|
+
}
|
|
4338
|
+
) }),
|
|
4339
|
+
/* @__PURE__ */ jsx42(
|
|
4340
|
+
"circle",
|
|
4341
|
+
{
|
|
4342
|
+
cx: "20",
|
|
4343
|
+
cy: "20",
|
|
4344
|
+
r: "15",
|
|
4345
|
+
fill: "none",
|
|
4346
|
+
stroke: `url(#${gradientId})`,
|
|
4347
|
+
strokeOpacity: "0.25",
|
|
4348
|
+
strokeWidth: "2"
|
|
4349
|
+
}
|
|
4350
|
+
),
|
|
4351
|
+
/* @__PURE__ */ jsx42("g", { className: "origin-[20px_20px] animate-spin motion-reduce:animate-none", children: /* @__PURE__ */ jsx42(
|
|
4352
|
+
"circle",
|
|
4353
|
+
{
|
|
4354
|
+
cx: "20",
|
|
4355
|
+
cy: "20",
|
|
4356
|
+
r: "15",
|
|
4357
|
+
fill: "none",
|
|
4358
|
+
stroke: `url(#${gradientId})`,
|
|
4359
|
+
strokeWidth: "2.5",
|
|
4360
|
+
strokeLinecap: "round",
|
|
4361
|
+
strokeDasharray: "22 72"
|
|
4362
|
+
}
|
|
4363
|
+
) }),
|
|
4364
|
+
/* @__PURE__ */ jsx42("g", { className: "origin-[20px_20px] animate-[spin_1.6s_linear_infinite_reverse] motion-reduce:animate-none", children: /* @__PURE__ */ jsx42(
|
|
4365
|
+
"circle",
|
|
4366
|
+
{
|
|
4367
|
+
cx: "20",
|
|
4368
|
+
cy: "20",
|
|
4369
|
+
r: "9",
|
|
4370
|
+
fill: "none",
|
|
4371
|
+
stroke: "#ebbcba",
|
|
4372
|
+
strokeWidth: "2",
|
|
4373
|
+
strokeLinecap: "round",
|
|
4374
|
+
strokeDasharray: "12 45",
|
|
4375
|
+
strokeOpacity: "0.9"
|
|
4376
|
+
}
|
|
4377
|
+
) }),
|
|
4378
|
+
/* @__PURE__ */ jsx42(
|
|
4379
|
+
"circle",
|
|
4380
|
+
{
|
|
4381
|
+
cx: "20",
|
|
4382
|
+
cy: "20",
|
|
4383
|
+
r: "2.5",
|
|
4384
|
+
fill: "#1877f2",
|
|
4385
|
+
className: "animate-pulse motion-reduce:animate-none"
|
|
4386
|
+
}
|
|
4387
|
+
)
|
|
4388
|
+
] }) : /* @__PURE__ */ jsxs37(Fragment7, { children: [
|
|
4389
|
+
/* @__PURE__ */ jsxs37("g", { children: [
|
|
4390
|
+
!reducedMotion ? /* @__PURE__ */ jsx42(
|
|
4391
|
+
"animateTransform",
|
|
4392
|
+
{
|
|
4393
|
+
attributeName: "transform",
|
|
4394
|
+
type: "rotate",
|
|
4395
|
+
from: "0 20 20",
|
|
4396
|
+
to: "360 20 20",
|
|
4397
|
+
dur: "2.4s",
|
|
4398
|
+
repeatCount: "indefinite"
|
|
4399
|
+
}
|
|
4400
|
+
) : null,
|
|
4401
|
+
/* @__PURE__ */ jsx42(
|
|
4402
|
+
"circle",
|
|
4403
|
+
{
|
|
4404
|
+
cx: "20",
|
|
4405
|
+
cy: "20",
|
|
4406
|
+
r: "16",
|
|
4407
|
+
fill: "none",
|
|
4408
|
+
stroke: "currentColor",
|
|
4409
|
+
strokeOpacity: "0.2",
|
|
4410
|
+
strokeWidth: "1.5",
|
|
4411
|
+
strokeDasharray: "3 5"
|
|
4412
|
+
}
|
|
4413
|
+
)
|
|
4414
|
+
] }),
|
|
4415
|
+
/* @__PURE__ */ jsxs37("g", { children: [
|
|
4416
|
+
!reducedMotion ? /* @__PURE__ */ jsx42(
|
|
4417
|
+
"animateTransform",
|
|
4418
|
+
{
|
|
4419
|
+
attributeName: "transform",
|
|
4420
|
+
type: "rotate",
|
|
4421
|
+
from: "360 20 20",
|
|
4422
|
+
to: "0 20 20",
|
|
4423
|
+
dur: "1.1s",
|
|
4424
|
+
repeatCount: "indefinite"
|
|
4425
|
+
}
|
|
4426
|
+
) : null,
|
|
4427
|
+
/* @__PURE__ */ jsx42(
|
|
4428
|
+
"circle",
|
|
4429
|
+
{
|
|
4430
|
+
cx: "20",
|
|
4431
|
+
cy: "20",
|
|
4432
|
+
r: "11",
|
|
4433
|
+
fill: "none",
|
|
4434
|
+
stroke: "currentColor",
|
|
4435
|
+
strokeWidth: "2",
|
|
4436
|
+
strokeLinecap: "round",
|
|
4437
|
+
strokeDasharray: "18 52"
|
|
4438
|
+
}
|
|
4439
|
+
)
|
|
4440
|
+
] }),
|
|
4441
|
+
/* @__PURE__ */ jsx42(
|
|
4442
|
+
"path",
|
|
4443
|
+
{
|
|
4444
|
+
d: "M16 14h8v12a1 1 0 0 1-1.4.9L20 25.5l-2.6 1.4A1 1 0 0 1 16 26V14z",
|
|
4445
|
+
fill: "currentColor",
|
|
4446
|
+
fillOpacity: "0.85",
|
|
4447
|
+
className: "animate-pulse motion-reduce:animate-none"
|
|
4448
|
+
}
|
|
4449
|
+
)
|
|
4450
|
+
] })
|
|
4451
|
+
}
|
|
4452
|
+
)
|
|
4453
|
+
})
|
|
4454
|
+
);
|
|
4455
|
+
}
|
|
4456
|
+
|
|
3660
4457
|
// src/components/ui/Dot.tsx
|
|
3661
|
-
import { jsx as
|
|
4458
|
+
import { jsx as jsx43 } from "react/jsx-runtime";
|
|
3662
4459
|
var colorMap = {
|
|
3663
4460
|
green: "bg-ph-success",
|
|
3664
4461
|
yellow: "bg-ph-warning",
|
|
@@ -3668,7 +4465,7 @@ var colorMap = {
|
|
|
3668
4465
|
};
|
|
3669
4466
|
function Dot(_a) {
|
|
3670
4467
|
var _b = _a, { color = "gray", size = "md", className } = _b, props = __objRest(_b, ["color", "size", "className"]);
|
|
3671
|
-
return /* @__PURE__ */
|
|
4468
|
+
return /* @__PURE__ */ jsx43(
|
|
3672
4469
|
"span",
|
|
3673
4470
|
__spreadValues({
|
|
3674
4471
|
className: cn(
|
|
@@ -3685,7 +4482,7 @@ Dot.displayName = "Dot";
|
|
|
3685
4482
|
|
|
3686
4483
|
// src/components/ui/Chip.tsx
|
|
3687
4484
|
import { forwardRef as forwardRef11 } from "react";
|
|
3688
|
-
import { jsx as
|
|
4485
|
+
import { jsx as jsx44, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
3689
4486
|
var Chip = forwardRef11(function Chip2(_a, ref) {
|
|
3690
4487
|
var _b = _a, {
|
|
3691
4488
|
selected = false,
|
|
@@ -3705,18 +4502,18 @@ var Chip = forwardRef11(function Chip2(_a, ref) {
|
|
|
3705
4502
|
);
|
|
3706
4503
|
if (onRemove) {
|
|
3707
4504
|
const removeLabel = typeof children === "string" ? `Remove ${children}` : "Remove";
|
|
3708
|
-
return /* @__PURE__ */
|
|
3709
|
-
/* @__PURE__ */
|
|
4505
|
+
return /* @__PURE__ */ jsxs38("span", { className: chipClassName, children: [
|
|
4506
|
+
/* @__PURE__ */ jsx44(
|
|
3710
4507
|
"button",
|
|
3711
4508
|
__spreadProps(__spreadValues({
|
|
3712
4509
|
ref,
|
|
3713
4510
|
type: "button",
|
|
3714
4511
|
className: "min-w-0 bg-transparent p-0 text-inherit"
|
|
3715
4512
|
}, props), {
|
|
3716
|
-
children: /* @__PURE__ */
|
|
4513
|
+
children: /* @__PURE__ */ jsx44("span", { className: "ph-chip__text", children })
|
|
3717
4514
|
})
|
|
3718
4515
|
),
|
|
3719
|
-
/* @__PURE__ */
|
|
4516
|
+
/* @__PURE__ */ jsx44(
|
|
3720
4517
|
"button",
|
|
3721
4518
|
{
|
|
3722
4519
|
type: "button",
|
|
@@ -3724,26 +4521,26 @@ var Chip = forwardRef11(function Chip2(_a, ref) {
|
|
|
3724
4521
|
disabled: props.disabled,
|
|
3725
4522
|
className: "ph-chip__remove",
|
|
3726
4523
|
"aria-label": removeLabel,
|
|
3727
|
-
children: /* @__PURE__ */
|
|
4524
|
+
children: /* @__PURE__ */ jsx44("svg", { width: "10", height: "10", viewBox: "0 0 10 10", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", "aria-hidden": "true", children: /* @__PURE__ */ jsx44("path", { d: "M2 2l6 6M8 2l-6 6" }) })
|
|
3728
4525
|
}
|
|
3729
4526
|
)
|
|
3730
4527
|
] });
|
|
3731
4528
|
}
|
|
3732
|
-
return /* @__PURE__ */
|
|
4529
|
+
return /* @__PURE__ */ jsx44(
|
|
3733
4530
|
"button",
|
|
3734
4531
|
__spreadProps(__spreadValues({
|
|
3735
4532
|
ref,
|
|
3736
4533
|
type: "button",
|
|
3737
4534
|
className: chipClassName
|
|
3738
4535
|
}, props), {
|
|
3739
|
-
children: /* @__PURE__ */
|
|
4536
|
+
children: /* @__PURE__ */ jsx44("span", { className: "ph-chip__text", children })
|
|
3740
4537
|
})
|
|
3741
4538
|
);
|
|
3742
4539
|
});
|
|
3743
4540
|
Chip.displayName = "Chip";
|
|
3744
4541
|
|
|
3745
4542
|
// src/lib/chart/use-ph-chart-tokens.ts
|
|
3746
|
-
import { useEffect as
|
|
4543
|
+
import { useEffect as useEffect6, useState as useState11 } from "react";
|
|
3747
4544
|
var DEFAULT_TOKENS = {
|
|
3748
4545
|
series: ["#1d4aff", "#621da6", "#42827e", "#ce0e74", "#f14f58", "#529a0a", "#fe729e"],
|
|
3749
4546
|
muted: "hsl(220 9% 90%)",
|
|
@@ -3774,20 +4571,20 @@ function readTokens() {
|
|
|
3774
4571
|
};
|
|
3775
4572
|
}
|
|
3776
4573
|
function useChartTokens() {
|
|
3777
|
-
const [tokens, setTokens] =
|
|
3778
|
-
|
|
4574
|
+
const [tokens, setTokens] = useState11(DEFAULT_TOKENS);
|
|
4575
|
+
useEffect6(() => {
|
|
3779
4576
|
setTokens(readTokens());
|
|
3780
4577
|
}, []);
|
|
3781
4578
|
return tokens;
|
|
3782
4579
|
}
|
|
3783
4580
|
|
|
3784
4581
|
// src/components/ui/Charts.tsx
|
|
3785
|
-
import { jsx as
|
|
4582
|
+
import { jsx as jsx45, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
3786
4583
|
function percent(value, total) {
|
|
3787
4584
|
return total > 0 ? Math.round(value / total * 100) : 0;
|
|
3788
4585
|
}
|
|
3789
4586
|
function EmptyChart() {
|
|
3790
|
-
return /* @__PURE__ */
|
|
4587
|
+
return /* @__PURE__ */ jsx45("p", { className: "text-sm text-ph-subtle", children: "No data for this period." });
|
|
3791
4588
|
}
|
|
3792
4589
|
function sliceColour(slice, index, series) {
|
|
3793
4590
|
var _a;
|
|
@@ -3797,7 +4594,7 @@ function DonutChart({ slices, label, formatValue, className }) {
|
|
|
3797
4594
|
const { series } = useChartTokens();
|
|
3798
4595
|
const visible = slices.filter((slice) => slice.value > 0);
|
|
3799
4596
|
const total = visible.reduce((sum, slice) => sum + slice.value, 0);
|
|
3800
|
-
if (total <= 0) return /* @__PURE__ */
|
|
4597
|
+
if (total <= 0) return /* @__PURE__ */ jsx45(EmptyChart, {});
|
|
3801
4598
|
const stops = visible.map((slice, index) => {
|
|
3802
4599
|
const colour = sliceColour(slice, index, series);
|
|
3803
4600
|
const before = visible.slice(0, index).reduce((sum, item) => sum + item.value, 0);
|
|
@@ -3805,15 +4602,15 @@ function DonutChart({ slices, label, formatValue, className }) {
|
|
|
3805
4602
|
const end = (before + slice.value) / total * 360;
|
|
3806
4603
|
return `${colour} ${start}deg ${end}deg`;
|
|
3807
4604
|
}).join(", ");
|
|
3808
|
-
return /* @__PURE__ */
|
|
3809
|
-
/* @__PURE__ */
|
|
4605
|
+
return /* @__PURE__ */ jsxs39("div", { className: cn("flex flex-col items-center gap-4 sm:flex-row sm:items-center", className), children: [
|
|
4606
|
+
/* @__PURE__ */ jsx45(
|
|
3810
4607
|
"div",
|
|
3811
4608
|
{
|
|
3812
4609
|
role: "img",
|
|
3813
4610
|
"aria-label": label,
|
|
3814
4611
|
className: "relative h-36 w-36 shrink-0 rounded-full",
|
|
3815
4612
|
style: { background: `conic-gradient(${stops})` },
|
|
3816
|
-
children: /* @__PURE__ */
|
|
4613
|
+
children: /* @__PURE__ */ jsx45(
|
|
3817
4614
|
"span",
|
|
3818
4615
|
{
|
|
3819
4616
|
className: "absolute inset-[22%] rounded-full bg-ph-surface ring-1 ring-ph-border",
|
|
@@ -3822,14 +4619,14 @@ function DonutChart({ slices, label, formatValue, className }) {
|
|
|
3822
4619
|
)
|
|
3823
4620
|
}
|
|
3824
4621
|
),
|
|
3825
|
-
/* @__PURE__ */
|
|
4622
|
+
/* @__PURE__ */ jsx45("ul", { className: "min-w-0 w-full flex-1 space-y-2", children: visible.map((slice, index) => {
|
|
3826
4623
|
const colour = sliceColour(slice, index, series);
|
|
3827
|
-
return /* @__PURE__ */
|
|
3828
|
-
/* @__PURE__ */
|
|
3829
|
-
/* @__PURE__ */
|
|
3830
|
-
/* @__PURE__ */
|
|
4624
|
+
return /* @__PURE__ */ jsxs39("li", { className: "flex items-center justify-between gap-3 text-sm", children: [
|
|
4625
|
+
/* @__PURE__ */ jsxs39("span", { className: "flex min-w-0 items-center gap-2 text-ph-subtle", children: [
|
|
4626
|
+
/* @__PURE__ */ jsx45("span", { className: "h-2.5 w-2.5 shrink-0 rounded-full", style: { background: colour } }),
|
|
4627
|
+
/* @__PURE__ */ jsx45("span", { className: "truncate", children: slice.label })
|
|
3831
4628
|
] }),
|
|
3832
|
-
/* @__PURE__ */
|
|
4629
|
+
/* @__PURE__ */ jsx45("span", { className: "shrink-0 tabular-nums text-ph-ink", children: formatValue ? formatValue(slice.value) : `${percent(slice.value, total)}%` })
|
|
3833
4630
|
] }, slice.label);
|
|
3834
4631
|
}) })
|
|
3835
4632
|
] });
|
|
@@ -3838,15 +4635,15 @@ function BarChart({ items, formatValue, className }) {
|
|
|
3838
4635
|
const { series } = useChartTokens();
|
|
3839
4636
|
const visible = items.filter((item) => item.value > 0);
|
|
3840
4637
|
const max = Math.max(...visible.map((item) => item.value), 1);
|
|
3841
|
-
if (!visible.length) return /* @__PURE__ */
|
|
3842
|
-
return /* @__PURE__ */
|
|
4638
|
+
if (!visible.length) return /* @__PURE__ */ jsx45(EmptyChart, {});
|
|
4639
|
+
return /* @__PURE__ */ jsx45("ul", { className: cn("space-y-3", className), children: visible.map((item, index) => {
|
|
3843
4640
|
const colour = sliceColour(item, index, series);
|
|
3844
|
-
return /* @__PURE__ */
|
|
3845
|
-
/* @__PURE__ */
|
|
3846
|
-
/* @__PURE__ */
|
|
3847
|
-
/* @__PURE__ */
|
|
4641
|
+
return /* @__PURE__ */ jsxs39("li", { children: [
|
|
4642
|
+
/* @__PURE__ */ jsxs39("div", { className: "mb-1 flex items-center justify-between gap-3 text-sm", children: [
|
|
4643
|
+
/* @__PURE__ */ jsx45("span", { className: "truncate text-ph-subtle", children: item.label }),
|
|
4644
|
+
/* @__PURE__ */ jsx45("span", { className: "shrink-0 tabular-nums text-ph-ink", children: formatValue ? formatValue(item.value) : item.value.toLocaleString("en-AU") })
|
|
3848
4645
|
] }),
|
|
3849
|
-
/* @__PURE__ */
|
|
4646
|
+
/* @__PURE__ */ jsx45("div", { className: "h-2.5 rounded-full bg-ph-muted ring-1 ring-ph-border", children: /* @__PURE__ */ jsx45(
|
|
3850
4647
|
"div",
|
|
3851
4648
|
{
|
|
3852
4649
|
className: "h-full rounded-full transition-[width] duration-300 ease-out motion-reduce:transition-none",
|
|
@@ -3868,15 +4665,15 @@ function StackedBarChart({
|
|
|
3868
4665
|
const { series } = useChartTokens();
|
|
3869
4666
|
const visible = slices.filter((slice) => slice.value > 0);
|
|
3870
4667
|
const total = visible.reduce((sum, slice) => sum + slice.value, 0);
|
|
3871
|
-
if (total <= 0) return /* @__PURE__ */
|
|
3872
|
-
return /* @__PURE__ */
|
|
3873
|
-
/* @__PURE__ */
|
|
4668
|
+
if (total <= 0) return /* @__PURE__ */ jsx45(EmptyChart, {});
|
|
4669
|
+
return /* @__PURE__ */ jsxs39("div", { className: cn("space-y-3", className), children: [
|
|
4670
|
+
/* @__PURE__ */ jsx45(
|
|
3874
4671
|
"div",
|
|
3875
4672
|
{
|
|
3876
4673
|
role: "img",
|
|
3877
4674
|
"aria-label": label,
|
|
3878
4675
|
className: "flex h-3 overflow-hidden rounded-full bg-ph-muted ring-1 ring-ph-border",
|
|
3879
|
-
children: visible.map((slice, index) => /* @__PURE__ */
|
|
4676
|
+
children: visible.map((slice, index) => /* @__PURE__ */ jsx45(
|
|
3880
4677
|
"span",
|
|
3881
4678
|
{
|
|
3882
4679
|
className: "h-full",
|
|
@@ -3889,14 +4686,14 @@ function StackedBarChart({
|
|
|
3889
4686
|
))
|
|
3890
4687
|
}
|
|
3891
4688
|
),
|
|
3892
|
-
/* @__PURE__ */
|
|
4689
|
+
/* @__PURE__ */ jsx45("ul", { className: "space-y-2", children: visible.map((slice, index) => {
|
|
3893
4690
|
const colour = sliceColour(slice, index, series);
|
|
3894
|
-
return /* @__PURE__ */
|
|
3895
|
-
/* @__PURE__ */
|
|
3896
|
-
/* @__PURE__ */
|
|
3897
|
-
/* @__PURE__ */
|
|
4691
|
+
return /* @__PURE__ */ jsxs39("li", { className: "flex items-center justify-between gap-3 text-sm", children: [
|
|
4692
|
+
/* @__PURE__ */ jsxs39("span", { className: "flex min-w-0 items-center gap-2 text-ph-subtle", children: [
|
|
4693
|
+
/* @__PURE__ */ jsx45("span", { className: "h-2.5 w-2.5 shrink-0 rounded-full", style: { background: colour } }),
|
|
4694
|
+
/* @__PURE__ */ jsx45("span", { className: "truncate", children: slice.label })
|
|
3898
4695
|
] }),
|
|
3899
|
-
/* @__PURE__ */
|
|
4696
|
+
/* @__PURE__ */ jsx45("span", { className: "shrink-0 tabular-nums text-ph-ink", children: formatValue ? formatValue(slice.value) : `${percent(slice.value, total)}%` })
|
|
3900
4697
|
] }, slice.label);
|
|
3901
4698
|
}) })
|
|
3902
4699
|
] });
|
|
@@ -3906,6 +4703,12 @@ export {
|
|
|
3906
4703
|
ButtonChrome,
|
|
3907
4704
|
cn,
|
|
3908
4705
|
Button,
|
|
4706
|
+
MarketingHeader,
|
|
4707
|
+
MarketingLink,
|
|
4708
|
+
MarketingMotionControl,
|
|
4709
|
+
MarketingReveal,
|
|
4710
|
+
AiWritingIllustration,
|
|
4711
|
+
IntegrationBridgeIllustration,
|
|
3909
4712
|
IconBase,
|
|
3910
4713
|
createIconBase,
|
|
3911
4714
|
createIconBasePath,
|
|
@@ -4000,6 +4803,9 @@ export {
|
|
|
4000
4803
|
AuthLayout,
|
|
4001
4804
|
AuthCard,
|
|
4002
4805
|
AuthDivider,
|
|
4806
|
+
SUITE_ANALYTICS_EVENT,
|
|
4807
|
+
trackSuiteEvent,
|
|
4808
|
+
subscribeSuiteAnalytics,
|
|
4003
4809
|
SettingsNav,
|
|
4004
4810
|
SettingsLayout,
|
|
4005
4811
|
DropdownMenu,
|
|
@@ -4067,6 +4873,7 @@ export {
|
|
|
4067
4873
|
Progress,
|
|
4068
4874
|
Link,
|
|
4069
4875
|
Spinner,
|
|
4876
|
+
BrandSpinner,
|
|
4070
4877
|
Dot,
|
|
4071
4878
|
Chip,
|
|
4072
4879
|
useChartTokens,
|