@xenide-io/the-old-ui-theme 0.9.17 → 0.10.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-DKT-82Lf.d.mts} +5 -3
- package/dist/{Chip-BzuNgJIa.d.ts → Chip-DKT-82Lf.d.ts} +5 -3
- package/dist/{chunk-6SVJAU5K.mjs → chunk-LHE4ROON.mjs} +977 -521
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +138 -99
- package/dist/index.mjs +1 -1
- package/dist/suite.d.mts +23 -1
- package/dist/suite.d.ts +23 -1
- package/dist/suite.js +4250 -4041
- package/dist/suite.mjs +1008 -795
- 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 +1024 -566
- package/dist/ui.mjs +13 -1
- package/docs/macos-identity-audit.md +279 -0
- package/package.json +1 -1
- package/src/app/globals.css +334 -44
- package/src/components/ui/Accordion.tsx +4 -7
- package/src/components/ui/Avatar.tsx +5 -5
- package/src/components/ui/Calendar.tsx +7 -7
- package/src/components/ui/CodeBlock.tsx +3 -10
- 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 +128 -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/ShowcaseWrapper.tsx +3 -3
- package/src/components/ui/Table.tsx +18 -6
- package/src/components/ui/Typography.tsx +4 -4
- package/src/components/ui/avatar-stat.test.tsx +14 -1
- package/src/components/ui/index.ts +13 -12
- 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 +20 -0
- package/src/styles/suite-skin.css +405 -40
- package/src/styles/themes.css +45 -45
- package/src/styles/typography.css +25 -1
- package/src/suite/components/ai-panel.tsx +17 -17
- package/src/suite/components/app-switcher.tsx +9 -9
- 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-entity-icon.tsx +3 -3
- 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 +4 -4
- package/src/suite/components/suite-notification-settings.tsx +171 -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 +5 -9
- 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/today-calibrating.tsx +3 -3
- package/src/suite/components/today-ui.tsx +12 -12
- package/src/suite/components/workspace-switcher.tsx +3 -3
- package/src/suite/index.ts +6 -0
- package/tailwind-preset.ts +9 -0
package/dist/ui.js
CHANGED
|
@@ -61,6 +61,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
61
61
|
var ui_exports = {};
|
|
62
62
|
__export(ui_exports, {
|
|
63
63
|
Accordion: () => Accordion,
|
|
64
|
+
AiWritingIllustration: () => AiWritingIllustration,
|
|
64
65
|
Alert: () => Alert,
|
|
65
66
|
AuthCard: () => AuthCard,
|
|
66
67
|
AuthDivider: () => AuthDivider,
|
|
@@ -103,12 +104,17 @@ __export(ui_exports, {
|
|
|
103
104
|
Icon: () => IconBase,
|
|
104
105
|
IconByName: () => IconByName,
|
|
105
106
|
Input: () => Input,
|
|
107
|
+
IntegrationBridgeIllustration: () => IntegrationBridgeIllustration,
|
|
106
108
|
Kbd: () => Kbd,
|
|
107
109
|
Label: () => Label,
|
|
108
110
|
Lead: () => Lead,
|
|
109
111
|
Link: () => Link,
|
|
110
112
|
Loader: () => Loader,
|
|
111
113
|
LoadingState: () => LoadingState,
|
|
114
|
+
MarketingHeader: () => MarketingHeader,
|
|
115
|
+
MarketingLink: () => MarketingLink,
|
|
116
|
+
MarketingMotionControl: () => MarketingMotionControl,
|
|
117
|
+
MarketingReveal: () => MarketingReveal,
|
|
112
118
|
Modal: () => Modal,
|
|
113
119
|
Mono: () => Mono,
|
|
114
120
|
Overline: () => Overline,
|
|
@@ -252,13 +258,427 @@ var Button = (0, import_react.forwardRef)(function Button2(_a, ref) {
|
|
|
252
258
|
});
|
|
253
259
|
Button.displayName = "Button";
|
|
254
260
|
|
|
261
|
+
// src/components/ui/Marketing.tsx
|
|
262
|
+
var import_react2 = require("react");
|
|
263
|
+
var import_iconoir_react = require("iconoir-react");
|
|
264
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
265
|
+
function MarketingHeader(_a) {
|
|
266
|
+
var _b = _a, {
|
|
267
|
+
brand,
|
|
268
|
+
navigation,
|
|
269
|
+
actions,
|
|
270
|
+
className
|
|
271
|
+
} = _b, props = __objRest(_b, [
|
|
272
|
+
"brand",
|
|
273
|
+
"navigation",
|
|
274
|
+
"actions",
|
|
275
|
+
"className"
|
|
276
|
+
]);
|
|
277
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("header", __spreadProps(__spreadValues({}, props), { className: cn("marketing-header", className), children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "marketing-header__inner", children: [
|
|
278
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "marketing-header__brand", children: brand }),
|
|
279
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
280
|
+
"nav",
|
|
281
|
+
{
|
|
282
|
+
className: "marketing-header__navigation",
|
|
283
|
+
"aria-label": "Product navigation",
|
|
284
|
+
children: navigation
|
|
285
|
+
}
|
|
286
|
+
),
|
|
287
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "marketing-header__actions", children: actions })
|
|
288
|
+
] }) }));
|
|
289
|
+
}
|
|
290
|
+
function MarketingLink(_a) {
|
|
291
|
+
var _b = _a, {
|
|
292
|
+
variant = "secondary",
|
|
293
|
+
icon,
|
|
294
|
+
sideIcon,
|
|
295
|
+
children,
|
|
296
|
+
className
|
|
297
|
+
} = _b, props = __objRest(_b, [
|
|
298
|
+
"variant",
|
|
299
|
+
"icon",
|
|
300
|
+
"sideIcon",
|
|
301
|
+
"children",
|
|
302
|
+
"className"
|
|
303
|
+
]);
|
|
304
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
305
|
+
"a",
|
|
306
|
+
__spreadProps(__spreadValues({}, props), {
|
|
307
|
+
className: cn(
|
|
308
|
+
"ph-btn ph-btn-raised marketing-button",
|
|
309
|
+
`ph-btn-${variant}`,
|
|
310
|
+
className
|
|
311
|
+
),
|
|
312
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ButtonChrome, { label: children, icon, sideIcon })
|
|
313
|
+
})
|
|
314
|
+
);
|
|
315
|
+
}
|
|
316
|
+
function MarketingMotionControl() {
|
|
317
|
+
const [paused, setPaused] = (0, import_react2.useState)(false);
|
|
318
|
+
(0, import_react2.useEffect)(() => {
|
|
319
|
+
document.documentElement.toggleAttribute("data-marketing-paused", paused);
|
|
320
|
+
return () => document.documentElement.removeAttribute("data-marketing-paused");
|
|
321
|
+
}, [paused]);
|
|
322
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
323
|
+
"button",
|
|
324
|
+
{
|
|
325
|
+
type: "button",
|
|
326
|
+
className: "marketing-motion-control",
|
|
327
|
+
onClick: () => setPaused((value) => !value),
|
|
328
|
+
"aria-pressed": paused,
|
|
329
|
+
"aria-label": paused ? "Play landing animations" : "Pause landing animations",
|
|
330
|
+
children: [
|
|
331
|
+
paused ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_iconoir_react.Play, { className: "h-4 w-4", "aria-hidden": true }) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_iconoir_react.Pause, { className: "h-4 w-4", "aria-hidden": true }),
|
|
332
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { children: paused ? "Play motion" : "Pause motion" })
|
|
333
|
+
]
|
|
334
|
+
}
|
|
335
|
+
);
|
|
336
|
+
}
|
|
337
|
+
function MarketingReveal(_a) {
|
|
338
|
+
var _b = _a, {
|
|
339
|
+
children,
|
|
340
|
+
className
|
|
341
|
+
} = _b, props = __objRest(_b, [
|
|
342
|
+
"children",
|
|
343
|
+
"className"
|
|
344
|
+
]);
|
|
345
|
+
const ref = (0, import_react2.useRef)(null);
|
|
346
|
+
(0, import_react2.useEffect)(() => {
|
|
347
|
+
const element = ref.current;
|
|
348
|
+
if (!element || !window.IntersectionObserver || window.matchMedia("(prefers-reduced-motion: reduce)").matches)
|
|
349
|
+
return;
|
|
350
|
+
const observer = new IntersectionObserver(
|
|
351
|
+
([entry]) => {
|
|
352
|
+
if (!entry.isIntersecting) return;
|
|
353
|
+
element.classList.add("marketing-reveal--entered");
|
|
354
|
+
observer.disconnect();
|
|
355
|
+
},
|
|
356
|
+
{ threshold: 0.1 }
|
|
357
|
+
);
|
|
358
|
+
observer.observe(element);
|
|
359
|
+
return () => observer.disconnect();
|
|
360
|
+
}, []);
|
|
361
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", __spreadProps(__spreadValues({}, props), { ref, className: cn("marketing-reveal", className), children }));
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
// src/components/ui/MarketingIllustrations.tsx
|
|
365
|
+
var import_react3 = require("react");
|
|
366
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
367
|
+
function AiWritingIllustration({
|
|
368
|
+
title,
|
|
369
|
+
prompt,
|
|
370
|
+
before,
|
|
371
|
+
after
|
|
372
|
+
}) {
|
|
373
|
+
const id = (0, import_react3.useId)().replaceAll(":", "");
|
|
374
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
|
|
375
|
+
"svg",
|
|
376
|
+
{
|
|
377
|
+
viewBox: "0 0 560 370",
|
|
378
|
+
className: "h-auto w-full",
|
|
379
|
+
role: "img",
|
|
380
|
+
"aria-label": `${title}: use /ai and Shelly AI to draft and polish writing`,
|
|
381
|
+
"data-marketing-art": true,
|
|
382
|
+
children: [
|
|
383
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("defs", { children: [
|
|
384
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("radialGradient", { id: `${id}-glow`, children: [
|
|
385
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("stop", { stopColor: "var(--ph-accent)", stopOpacity: ".2" }),
|
|
386
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("stop", { offset: "1", stopColor: "var(--ph-accent)", stopOpacity: "0" })
|
|
387
|
+
] }),
|
|
388
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("linearGradient", { id: `${id}-paper`, x2: "1", y2: "1", children: [
|
|
389
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("stop", { stopColor: "var(--ph-surface)" }),
|
|
390
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("stop", { offset: "1", stopColor: "var(--ph-muted)" })
|
|
391
|
+
] })
|
|
392
|
+
] }),
|
|
393
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("ellipse", { cx: "280", cy: "198", rx: "260", ry: "168", fill: `url(#${id}-glow)` }),
|
|
394
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("g", { className: "marketing-svg-float", children: [
|
|
395
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
396
|
+
"rect",
|
|
397
|
+
{
|
|
398
|
+
x: "18",
|
|
399
|
+
y: "28",
|
|
400
|
+
width: "524",
|
|
401
|
+
height: "300",
|
|
402
|
+
rx: "20",
|
|
403
|
+
fill: `url(#${id}-paper)`,
|
|
404
|
+
stroke: "var(--ph-border)"
|
|
405
|
+
}
|
|
406
|
+
),
|
|
407
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "M18 76h524", stroke: "var(--ph-border)" }),
|
|
408
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("image", { href: "/shelly-icon.svg", x: "36", y: "40", width: "24", height: "24" }),
|
|
409
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
410
|
+
"text",
|
|
411
|
+
{
|
|
412
|
+
x: "70",
|
|
413
|
+
y: "57",
|
|
414
|
+
fontSize: "16",
|
|
415
|
+
fontWeight: "700",
|
|
416
|
+
fill: "var(--ph-text-primary)",
|
|
417
|
+
children: title
|
|
418
|
+
}
|
|
419
|
+
),
|
|
420
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("text", { x: "434", y: "57", fontSize: "12", fill: "var(--ph-text-secondary)", children: "Shelly AI" }),
|
|
421
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
422
|
+
"rect",
|
|
423
|
+
{
|
|
424
|
+
x: "38",
|
|
425
|
+
y: "94",
|
|
426
|
+
width: "484",
|
|
427
|
+
height: "42",
|
|
428
|
+
rx: "10",
|
|
429
|
+
fill: "var(--ph-canvas)",
|
|
430
|
+
stroke: "var(--ph-selected-border)"
|
|
431
|
+
}
|
|
432
|
+
),
|
|
433
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("text", { x: "54", y: "121", fontSize: "16", fill: "var(--ph-text-primary)", children: prompt }),
|
|
434
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("g", { className: "marketing-svg-draft", children: [
|
|
435
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
436
|
+
"text",
|
|
437
|
+
{
|
|
438
|
+
x: "46",
|
|
439
|
+
y: "171",
|
|
440
|
+
fontSize: "12",
|
|
441
|
+
fontWeight: "700",
|
|
442
|
+
fill: "var(--ph-text-secondary)",
|
|
443
|
+
children: "YOUR DRAFT"
|
|
444
|
+
}
|
|
445
|
+
),
|
|
446
|
+
before.map((line, index) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
447
|
+
"text",
|
|
448
|
+
{
|
|
449
|
+
x: "46",
|
|
450
|
+
y: 205 + index * 26,
|
|
451
|
+
fontSize: "16",
|
|
452
|
+
fill: "var(--ph-text-secondary)",
|
|
453
|
+
children: line
|
|
454
|
+
},
|
|
455
|
+
index
|
|
456
|
+
))
|
|
457
|
+
] }),
|
|
458
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
459
|
+
"path",
|
|
460
|
+
{
|
|
461
|
+
className: "marketing-svg-thread",
|
|
462
|
+
d: "M265 175v102",
|
|
463
|
+
stroke: "var(--ph-accent)",
|
|
464
|
+
strokeWidth: "2",
|
|
465
|
+
strokeDasharray: "4 7"
|
|
466
|
+
}
|
|
467
|
+
),
|
|
468
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("g", { className: "marketing-svg-polished", children: [
|
|
469
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
470
|
+
"text",
|
|
471
|
+
{
|
|
472
|
+
x: "294",
|
|
473
|
+
y: "171",
|
|
474
|
+
fontSize: "12",
|
|
475
|
+
fontWeight: "700",
|
|
476
|
+
fill: "var(--ph-accent)",
|
|
477
|
+
children: "POLISHED WITH SHELLY"
|
|
478
|
+
}
|
|
479
|
+
),
|
|
480
|
+
after.map((line, index) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
481
|
+
"text",
|
|
482
|
+
{
|
|
483
|
+
x: "294",
|
|
484
|
+
y: 205 + index * 26,
|
|
485
|
+
fontSize: "16",
|
|
486
|
+
fill: "var(--ph-text-primary)",
|
|
487
|
+
children: line
|
|
488
|
+
},
|
|
489
|
+
index
|
|
490
|
+
)),
|
|
491
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
492
|
+
"path",
|
|
493
|
+
{
|
|
494
|
+
d: "m302 294 5 5 10-11",
|
|
495
|
+
fill: "none",
|
|
496
|
+
stroke: "var(--ph-success)",
|
|
497
|
+
strokeWidth: "3",
|
|
498
|
+
strokeLinecap: "round"
|
|
499
|
+
}
|
|
500
|
+
),
|
|
501
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("text", { x: "328", y: "300", fontSize: "12", fill: "var(--ph-text-secondary)", children: "Ready to keep working" })
|
|
502
|
+
] })
|
|
503
|
+
] }),
|
|
504
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("g", { className: "marketing-svg-spark", fill: "var(--ph-accent)", children: [
|
|
505
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "m520 12 3 10 10 3-10 3-3 10-3-10-10-3 10-3z" }),
|
|
506
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d: "m25 310 2 7 7 2-7 2-2 7-2-7-7-2 7-2z" })
|
|
507
|
+
] })
|
|
508
|
+
]
|
|
509
|
+
}
|
|
510
|
+
);
|
|
511
|
+
}
|
|
512
|
+
function IntegrationBridgeIllustration({
|
|
513
|
+
appName,
|
|
514
|
+
appIcon,
|
|
515
|
+
recordLabel,
|
|
516
|
+
calendar = false
|
|
517
|
+
}) {
|
|
518
|
+
const id = (0, import_react3.useId)().replaceAll(":", "");
|
|
519
|
+
const rows = calendar ? ["Client catch-up", "10:00 \u2013 11:00", "Meeting notes"] : ["Client", "Project", recordLabel];
|
|
520
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
|
|
521
|
+
"svg",
|
|
522
|
+
{
|
|
523
|
+
viewBox: "0 0 600 350",
|
|
524
|
+
className: "h-auto w-full",
|
|
525
|
+
role: "img",
|
|
526
|
+
"aria-label": calendar ? "Choose a calendar event to prefill a TurtleTime entry" : `Shelly Bridge matches connected records with ${appName}`,
|
|
527
|
+
"data-marketing-art": true,
|
|
528
|
+
children: [
|
|
529
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("radialGradient", { id: `${id}-bridge`, children: [
|
|
530
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("stop", { stopColor: "var(--ph-blue)", stopOpacity: ".17" }),
|
|
531
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("stop", { offset: "1", stopColor: "var(--ph-blue)", stopOpacity: "0" })
|
|
532
|
+
] }) }),
|
|
533
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
534
|
+
"ellipse",
|
|
535
|
+
{
|
|
536
|
+
cx: "300",
|
|
537
|
+
cy: "185",
|
|
538
|
+
rx: "280",
|
|
539
|
+
ry: "160",
|
|
540
|
+
fill: `url(#${id}-bridge)`
|
|
541
|
+
}
|
|
542
|
+
),
|
|
543
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("g", { className: "marketing-svg-float", children: [
|
|
544
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
545
|
+
"rect",
|
|
546
|
+
{
|
|
547
|
+
x: "18",
|
|
548
|
+
y: "55",
|
|
549
|
+
width: "230",
|
|
550
|
+
height: "240",
|
|
551
|
+
rx: "18",
|
|
552
|
+
fill: "var(--ph-surface)",
|
|
553
|
+
stroke: "var(--ph-border)"
|
|
554
|
+
}
|
|
555
|
+
),
|
|
556
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
557
|
+
"rect",
|
|
558
|
+
{
|
|
559
|
+
x: "352",
|
|
560
|
+
y: "55",
|
|
561
|
+
width: "230",
|
|
562
|
+
height: "240",
|
|
563
|
+
rx: "18",
|
|
564
|
+
fill: "var(--ph-surface)",
|
|
565
|
+
stroke: "var(--ph-border)"
|
|
566
|
+
}
|
|
567
|
+
),
|
|
568
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
569
|
+
"text",
|
|
570
|
+
{
|
|
571
|
+
x: "38",
|
|
572
|
+
y: "92",
|
|
573
|
+
fontSize: "17",
|
|
574
|
+
fontWeight: "700",
|
|
575
|
+
fill: "var(--ph-text-primary)",
|
|
576
|
+
children: calendar ? "Calendar events" : "Connected tools"
|
|
577
|
+
}
|
|
578
|
+
),
|
|
579
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("image", { href: appIcon, x: "370", y: "72", width: "28", height: "28" }),
|
|
580
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
581
|
+
"text",
|
|
582
|
+
{
|
|
583
|
+
x: "410",
|
|
584
|
+
y: "93",
|
|
585
|
+
fontSize: "17",
|
|
586
|
+
fontWeight: "700",
|
|
587
|
+
fill: "var(--ph-text-primary)",
|
|
588
|
+
children: appName
|
|
589
|
+
}
|
|
590
|
+
),
|
|
591
|
+
rows.map((row, index) => /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("g", { children: [
|
|
592
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
593
|
+
"rect",
|
|
594
|
+
{
|
|
595
|
+
x: "36",
|
|
596
|
+
y: 119 + index * 48,
|
|
597
|
+
width: "194",
|
|
598
|
+
height: "36",
|
|
599
|
+
rx: "8",
|
|
600
|
+
fill: "var(--ph-muted)"
|
|
601
|
+
}
|
|
602
|
+
),
|
|
603
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
604
|
+
"text",
|
|
605
|
+
{
|
|
606
|
+
x: "50",
|
|
607
|
+
y: 142 + index * 48,
|
|
608
|
+
fontSize: "14",
|
|
609
|
+
fill: "var(--ph-text-secondary)",
|
|
610
|
+
children: row
|
|
611
|
+
}
|
|
612
|
+
),
|
|
613
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
614
|
+
"rect",
|
|
615
|
+
{
|
|
616
|
+
x: "370",
|
|
617
|
+
y: 119 + index * 48,
|
|
618
|
+
width: "194",
|
|
619
|
+
height: "36",
|
|
620
|
+
rx: "8",
|
|
621
|
+
fill: "var(--ph-muted)"
|
|
622
|
+
}
|
|
623
|
+
),
|
|
624
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
625
|
+
"text",
|
|
626
|
+
{
|
|
627
|
+
x: "384",
|
|
628
|
+
y: 142 + index * 48,
|
|
629
|
+
fontSize: "14",
|
|
630
|
+
fill: "var(--ph-text-primary)",
|
|
631
|
+
children: calendar && index === 1 ? "1 hour, ready to review" : row
|
|
632
|
+
}
|
|
633
|
+
),
|
|
634
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
635
|
+
"path",
|
|
636
|
+
{
|
|
637
|
+
className: "marketing-svg-thread",
|
|
638
|
+
d: `M248 ${137 + index * 48}h104`,
|
|
639
|
+
stroke: "var(--ph-accent)",
|
|
640
|
+
strokeWidth: "2",
|
|
641
|
+
strokeDasharray: "5 8"
|
|
642
|
+
}
|
|
643
|
+
)
|
|
644
|
+
] }, row))
|
|
645
|
+
] }),
|
|
646
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("g", { className: "marketing-svg-polished", children: [
|
|
647
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
648
|
+
"circle",
|
|
649
|
+
{
|
|
650
|
+
cx: "300",
|
|
651
|
+
cy: "185",
|
|
652
|
+
r: "27",
|
|
653
|
+
fill: "var(--ph-canvas)",
|
|
654
|
+
stroke: "var(--ph-selected-border)"
|
|
655
|
+
}
|
|
656
|
+
),
|
|
657
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("image", { href: "/shelly-icon.svg", x: "280", y: "165", width: "40", height: "40" }),
|
|
658
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
659
|
+
"text",
|
|
660
|
+
{
|
|
661
|
+
x: "300",
|
|
662
|
+
y: "331",
|
|
663
|
+
textAnchor: "middle",
|
|
664
|
+
fontSize: "13",
|
|
665
|
+
fill: "var(--ph-text-secondary)",
|
|
666
|
+
children: calendar ? "Prefill details \xB7 review \xB7 save the entry" : "Shelly Bridge \xB7 match the records you want to connect"
|
|
667
|
+
}
|
|
668
|
+
)
|
|
669
|
+
] })
|
|
670
|
+
]
|
|
671
|
+
}
|
|
672
|
+
);
|
|
673
|
+
}
|
|
674
|
+
|
|
255
675
|
// src/components/ui/Alert.tsx
|
|
256
|
-
var
|
|
676
|
+
var import_react7 = require("react");
|
|
257
677
|
|
|
258
678
|
// src/components/icons/IconBase.tsx
|
|
259
|
-
var
|
|
260
|
-
var
|
|
261
|
-
var IconBase = (0,
|
|
679
|
+
var import_react4 = require("react");
|
|
680
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
681
|
+
var IconBase = (0, import_react4.forwardRef)(function IconBase2(_a, ref) {
|
|
262
682
|
var _b = _a, {
|
|
263
683
|
className,
|
|
264
684
|
size,
|
|
@@ -287,7 +707,7 @@ var IconBase = (0, import_react2.forwardRef)(function IconBase2(_a, ref) {
|
|
|
287
707
|
"aria-labelledby"
|
|
288
708
|
]);
|
|
289
709
|
const hasAccessibleName = Boolean(ariaLabel || ariaLabelledBy);
|
|
290
|
-
return /* @__PURE__ */ (0,
|
|
710
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
291
711
|
"svg",
|
|
292
712
|
__spreadProps(__spreadValues({
|
|
293
713
|
ref,
|
|
@@ -309,11 +729,11 @@ var IconBase = (0, import_react2.forwardRef)(function IconBase2(_a, ref) {
|
|
|
309
729
|
IconBase.displayName = "IconBase";
|
|
310
730
|
|
|
311
731
|
// src/components/icons/createIconBase.tsx
|
|
312
|
-
var
|
|
313
|
-
var
|
|
732
|
+
var import_react5 = require("react");
|
|
733
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
314
734
|
function createIconBase({ name = "IconGlyph", viewBox = "0 0 24 24", paths }) {
|
|
315
|
-
const IconGlyph = (0,
|
|
316
|
-
return /* @__PURE__ */ (0,
|
|
735
|
+
const IconGlyph = (0, import_react5.forwardRef)(function IconGlyph2(props, ref) {
|
|
736
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(IconBase, __spreadProps(__spreadValues({ ref, viewBox }, props), { children: paths }));
|
|
317
737
|
});
|
|
318
738
|
IconGlyph.displayName = name;
|
|
319
739
|
return IconGlyph;
|
|
@@ -322,14 +742,14 @@ function createIconBasePath(d, viewBox = "0 0 24 24", name) {
|
|
|
322
742
|
return createIconBase({
|
|
323
743
|
name,
|
|
324
744
|
viewBox,
|
|
325
|
-
paths: /* @__PURE__ */ (0,
|
|
745
|
+
paths: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { d, fill: "currentColor" })
|
|
326
746
|
});
|
|
327
747
|
}
|
|
328
748
|
|
|
329
749
|
// src/components/icons/icons.tsx
|
|
330
|
-
var
|
|
331
|
-
var
|
|
332
|
-
var fill = (d) => /* @__PURE__ */ (0,
|
|
750
|
+
var import_react6 = require("react");
|
|
751
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
752
|
+
var fill = (d) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d, fill: "currentColor" });
|
|
333
753
|
var IconAreaChart = createIconBase({
|
|
334
754
|
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")
|
|
335
755
|
});
|
|
@@ -370,7 +790,7 @@ var IconFlare = createIconBase({
|
|
|
370
790
|
)
|
|
371
791
|
});
|
|
372
792
|
var IconSelectEvents = createIconBase({
|
|
373
|
-
paths: /* @__PURE__ */ (0,
|
|
793
|
+
paths: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
|
|
374
794
|
fill("M17.5 9L16.56 6.94L14.5 6L16.56 5.06L17.5 3L18.44 5.06L20.5 6L18.44 6.94L17.5 9Z"),
|
|
375
795
|
fill("M6 12.5L6.94 14.56L9 15.5L6.94 16.44L6 18.5L5.06 16.44L3 15.5L5.06 14.56L6 12.5Z"),
|
|
376
796
|
fill("M6 9L5.06 6.94L3 6L5.06 5.06L6 3L6.94 5.06L9 6L6.94 6.94L6 9Z"),
|
|
@@ -428,9 +848,9 @@ var IconRobot = createIconBase({
|
|
|
428
848
|
)
|
|
429
849
|
});
|
|
430
850
|
var IconExclamation = createIconBase({
|
|
431
|
-
paths: /* @__PURE__ */ (0,
|
|
432
|
-
/* @__PURE__ */ (0,
|
|
433
|
-
/* @__PURE__ */ (0,
|
|
851
|
+
paths: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("g", { fill: "currentColor", children: [
|
|
852
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "m12 21c1.1046 0 2-.8954 2-2s-.8954-2-2-2-2 .8954-2 2 .8954 2 2 2z" }),
|
|
853
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "m10 3h4v12h-4z" })
|
|
434
854
|
] })
|
|
435
855
|
});
|
|
436
856
|
var IconErrorOutline = createIconBase({
|
|
@@ -464,7 +884,7 @@ var IconChevronLeft = createIconBasePath("M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10
|
|
|
464
884
|
var IconChevronRight = createIconBasePath("M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z");
|
|
465
885
|
var IconChevronDown = createIconBasePath("M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z");
|
|
466
886
|
var IconSubArrowRight = createIconBase({
|
|
467
|
-
paths: /* @__PURE__ */ (0,
|
|
887
|
+
paths: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("g", { transform: "translate(4 5.5)", children: fill("M2 0H0V10H12.01V13L16 9L12.01 5V8H2V0Z") })
|
|
468
888
|
});
|
|
469
889
|
var IconSearch = createIconBasePath(
|
|
470
890
|
"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"
|
|
@@ -543,7 +963,7 @@ var IconRocket = createIconBasePath(
|
|
|
543
963
|
);
|
|
544
964
|
var IconTerminal = createIconBase({
|
|
545
965
|
name: "IconTerminal",
|
|
546
|
-
paths: /* @__PURE__ */ (0,
|
|
966
|
+
paths: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
547
967
|
"path",
|
|
548
968
|
{
|
|
549
969
|
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",
|
|
@@ -555,7 +975,7 @@ var IconTerminal = createIconBase({
|
|
|
555
975
|
});
|
|
556
976
|
var IconOldWindow = createIconBase({
|
|
557
977
|
name: "IconOldWindow",
|
|
558
|
-
paths: /* @__PURE__ */ (0,
|
|
978
|
+
paths: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
559
979
|
"path",
|
|
560
980
|
{
|
|
561
981
|
d: "M3 3v18h18V3H3zm2 7v9h14v-9H5zm1-4h2v1H6V6zm3 0h2v1H9V6z",
|
|
@@ -567,7 +987,7 @@ var IconOldWindow = createIconBase({
|
|
|
567
987
|
});
|
|
568
988
|
var IconCommandCursor = createIconBase({
|
|
569
989
|
name: "IconCommandCursor",
|
|
570
|
-
paths: /* @__PURE__ */ (0,
|
|
990
|
+
paths: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
571
991
|
"path",
|
|
572
992
|
{
|
|
573
993
|
d: "M4 3v18h16V3H4zm2 2h12v14H6V5zm1.5 3.5L11 12l-3.5 3.5L9 17l5-5-5-5-1.5 1.5zM13 17h4v-2h-4v2z",
|
|
@@ -579,7 +999,7 @@ var IconCommandCursor = createIconBase({
|
|
|
579
999
|
});
|
|
580
1000
|
var IconDataReel = createIconBase({
|
|
581
1001
|
name: "IconDataReel",
|
|
582
|
-
paths: /* @__PURE__ */ (0,
|
|
1002
|
+
paths: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
583
1003
|
"path",
|
|
584
1004
|
{
|
|
585
1005
|
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",
|
|
@@ -591,7 +1011,7 @@ var IconDataReel = createIconBase({
|
|
|
591
1011
|
});
|
|
592
1012
|
var IconCodePreview = createIconBase({
|
|
593
1013
|
name: "IconCodePreview",
|
|
594
|
-
paths: /* @__PURE__ */ (0,
|
|
1014
|
+
paths: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
595
1015
|
"path",
|
|
596
1016
|
{
|
|
597
1017
|
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",
|
|
@@ -603,7 +1023,7 @@ var IconCodePreview = createIconBase({
|
|
|
603
1023
|
});
|
|
604
1024
|
var IconInsightBoard = createIconBase({
|
|
605
1025
|
name: "IconInsightBoard",
|
|
606
|
-
paths: /* @__PURE__ */ (0,
|
|
1026
|
+
paths: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
607
1027
|
"path",
|
|
608
1028
|
{
|
|
609
1029
|
d: "M3 3v18h18V3H3zm2 2h14v3H5V5zm0 5h6v9H5v-9zm8 0h6v4h-6v-4zm0 6h6v3h-6v-3zM6 6h2v1H6V6zm3 0h2v1H9V6z",
|
|
@@ -615,14 +1035,14 @@ var IconInsightBoard = createIconBase({
|
|
|
615
1035
|
});
|
|
616
1036
|
var IconEventStream = createIconBase({
|
|
617
1037
|
name: "IconEventStream",
|
|
618
|
-
paths: /* @__PURE__ */ (0,
|
|
619
|
-
/* @__PURE__ */ (0,
|
|
1038
|
+
paths: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
|
|
1039
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { d: "M5 4h2v16H5V4z", fill: "currentColor", opacity: "0.45" }),
|
|
620
1040
|
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")
|
|
621
1041
|
] })
|
|
622
1042
|
});
|
|
623
1043
|
var IconFeatureGate = createIconBase({
|
|
624
1044
|
name: "IconFeatureGate",
|
|
625
|
-
paths: /* @__PURE__ */ (0,
|
|
1045
|
+
paths: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
626
1046
|
"path",
|
|
627
1047
|
{
|
|
628
1048
|
d: "M4 3h2v18H4V3zm3 2h12l-3 4 3 4H7V5zm4 1-2.2 4H12l-1 4 4.2-5H12l1-3h-2z",
|
|
@@ -634,7 +1054,7 @@ var IconFeatureGate = createIconBase({
|
|
|
634
1054
|
});
|
|
635
1055
|
var IconReplayFrame = createIconBase({
|
|
636
1056
|
name: "IconReplayFrame",
|
|
637
|
-
paths: /* @__PURE__ */ (0,
|
|
1057
|
+
paths: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
638
1058
|
"path",
|
|
639
1059
|
{
|
|
640
1060
|
d: "M3 3v18h18V3H3zm2 2h14v11H5V5zm5 2v7l6-3.5L10 7zm-5 11h9v1H5v-1zm11 0h3v1h-3v-1z",
|
|
@@ -658,7 +1078,7 @@ var IconExperimentSplit = createIconBase({
|
|
|
658
1078
|
});
|
|
659
1079
|
var IconSurveyCard = createIconBase({
|
|
660
1080
|
name: "IconSurveyCard",
|
|
661
|
-
paths: /* @__PURE__ */ (0,
|
|
1081
|
+
paths: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
662
1082
|
"path",
|
|
663
1083
|
{
|
|
664
1084
|
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",
|
|
@@ -674,9 +1094,9 @@ var IconActivity = createIconBasePath(
|
|
|
674
1094
|
var IconFlask = createIconBasePath(
|
|
675
1095
|
"M19.8 18.4L14 10.67V6.5l1.35-1.35c.39-.39.39-1.02 0-1.41L14.65 2.7a.9959.9959 0 0 0-1.41 0L9.35 6.54c-.39.39-.39 1.02 0 1.41L10.7 9.3v4.17L4.2 18.4C3.53 19.07 4.04 20.25 5 20.25h14c.96 0 1.47-1.18.8-1.85zM6.91 18.25l5.09-5.09 5.09 5.09H6.91z"
|
|
676
1096
|
);
|
|
677
|
-
var IconSpinner = (0,
|
|
1097
|
+
var IconSpinner = (0, import_react6.forwardRef)(function IconSpinner2(_a, ref) {
|
|
678
1098
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
679
|
-
return /* @__PURE__ */ (0,
|
|
1099
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(IconSync, __spreadValues({ ref, className: cn("ph-icon-spin", className) }, props));
|
|
680
1100
|
});
|
|
681
1101
|
IconSpinner.displayName = "IconSpinner";
|
|
682
1102
|
var CANONICAL_ICONS = {
|
|
@@ -774,15 +1194,15 @@ for (const [name, Icon] of Object.entries(CANONICAL_ICONS)) {
|
|
|
774
1194
|
namedIcon.displayName = `Icon${name[0].toUpperCase()}${name.slice(1)}`;
|
|
775
1195
|
}
|
|
776
1196
|
}
|
|
777
|
-
var IconByName = (0,
|
|
1197
|
+
var IconByName = (0, import_react6.forwardRef)(function IconByName2(_a, ref) {
|
|
778
1198
|
var _b = _a, { name } = _b, props = __objRest(_b, ["name"]);
|
|
779
1199
|
const Icon = PH_ICONS[name];
|
|
780
|
-
return /* @__PURE__ */ (0,
|
|
1200
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Icon, __spreadValues({ ref }, props));
|
|
781
1201
|
});
|
|
782
1202
|
IconByName.displayName = "IconByName";
|
|
783
1203
|
|
|
784
1204
|
// src/components/ui/Alert.tsx
|
|
785
|
-
var
|
|
1205
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
786
1206
|
var statusConfig = {
|
|
787
1207
|
info: { icon: IconInfo },
|
|
788
1208
|
success: { icon: IconCheckCircle },
|
|
@@ -795,7 +1215,7 @@ var statusClassMap = {
|
|
|
795
1215
|
warning: "ph-alert-warning",
|
|
796
1216
|
danger: "ph-alert-danger"
|
|
797
1217
|
};
|
|
798
|
-
var Alert = (0,
|
|
1218
|
+
var Alert = (0, import_react7.forwardRef)(function Alert2(_a, ref) {
|
|
799
1219
|
var _b = _a, {
|
|
800
1220
|
status = "info",
|
|
801
1221
|
title,
|
|
@@ -821,7 +1241,7 @@ var Alert = (0, import_react5.forwardRef)(function Alert2(_a, ref) {
|
|
|
821
1241
|
]);
|
|
822
1242
|
const config = statusConfig[status];
|
|
823
1243
|
const Icon = config.icon;
|
|
824
|
-
return /* @__PURE__ */ (0,
|
|
1244
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
825
1245
|
"div",
|
|
826
1246
|
__spreadProps(__spreadValues({
|
|
827
1247
|
ref,
|
|
@@ -830,20 +1250,20 @@ var Alert = (0, import_react5.forwardRef)(function Alert2(_a, ref) {
|
|
|
830
1250
|
className: cn("ph-alert", statusClassMap[status], className)
|
|
831
1251
|
}, props), {
|
|
832
1252
|
children: [
|
|
833
|
-
icon != null ? icon : /* @__PURE__ */ (0,
|
|
834
|
-
/* @__PURE__ */ (0,
|
|
835
|
-
title && /* @__PURE__ */ (0,
|
|
836
|
-
description && /* @__PURE__ */ (0,
|
|
1253
|
+
icon != null ? icon : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Icon, { className: "ph-alert-icon mt-0.5 h-5 w-5 shrink-0", "aria-hidden": true }),
|
|
1254
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "min-w-0 flex-1", children: [
|
|
1255
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "font-semibold", children: title }),
|
|
1256
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "mt-1 text-sm text-ph-subtle", children: description }),
|
|
837
1257
|
children
|
|
838
1258
|
] }),
|
|
839
|
-
onDismiss && /* @__PURE__ */ (0,
|
|
1259
|
+
onDismiss && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
840
1260
|
"button",
|
|
841
1261
|
{
|
|
842
1262
|
type: "button",
|
|
843
1263
|
onClick: onDismiss,
|
|
844
1264
|
className: "ph-alert-dismiss",
|
|
845
1265
|
"aria-label": dismissLabel,
|
|
846
|
-
children: /* @__PURE__ */ (0,
|
|
1266
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(IconClose, { className: "h-4 w-4", "aria-hidden": true })
|
|
847
1267
|
}
|
|
848
1268
|
)
|
|
849
1269
|
]
|
|
@@ -853,8 +1273,8 @@ var Alert = (0, import_react5.forwardRef)(function Alert2(_a, ref) {
|
|
|
853
1273
|
Alert.displayName = "Alert";
|
|
854
1274
|
|
|
855
1275
|
// src/components/ui/Badge.tsx
|
|
856
|
-
var
|
|
857
|
-
var
|
|
1276
|
+
var import_react8 = require("react");
|
|
1277
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
858
1278
|
var variantMap = {
|
|
859
1279
|
brand: "ph-badge-brand",
|
|
860
1280
|
neutral: "ph-badge-neutral",
|
|
@@ -868,7 +1288,7 @@ var sizeMap = {
|
|
|
868
1288
|
sm: "text-[10px] px-1.5 py-0.5",
|
|
869
1289
|
md: ""
|
|
870
1290
|
};
|
|
871
|
-
var Badge = (0,
|
|
1291
|
+
var Badge = (0, import_react8.forwardRef)(function Badge2(_a, ref) {
|
|
872
1292
|
var _b = _a, {
|
|
873
1293
|
variant = "neutral",
|
|
874
1294
|
size = "md",
|
|
@@ -880,7 +1300,7 @@ var Badge = (0, import_react6.forwardRef)(function Badge2(_a, ref) {
|
|
|
880
1300
|
"children",
|
|
881
1301
|
"className"
|
|
882
1302
|
]);
|
|
883
|
-
return /* @__PURE__ */ (0,
|
|
1303
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
884
1304
|
"span",
|
|
885
1305
|
__spreadProps(__spreadValues({
|
|
886
1306
|
ref,
|
|
@@ -898,15 +1318,15 @@ var Badge = (0, import_react6.forwardRef)(function Badge2(_a, ref) {
|
|
|
898
1318
|
Badge.displayName = "Badge";
|
|
899
1319
|
|
|
900
1320
|
// src/components/ui/Card.tsx
|
|
901
|
-
var
|
|
902
|
-
var
|
|
1321
|
+
var import_react9 = require("react");
|
|
1322
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
903
1323
|
var variantMap2 = {
|
|
904
1324
|
default: "",
|
|
905
1325
|
outlined: "border-2 border-ph-border",
|
|
906
1326
|
elevated: "ph-card-elevated",
|
|
907
1327
|
highlighted: "ph-card-highlighted"
|
|
908
1328
|
};
|
|
909
|
-
var Card = (0,
|
|
1329
|
+
var Card = (0, import_react9.forwardRef)(function Card2(_a, ref) {
|
|
910
1330
|
var _b = _a, {
|
|
911
1331
|
children,
|
|
912
1332
|
title,
|
|
@@ -950,18 +1370,18 @@ var Card = (0, import_react7.forwardRef)(function Card2(_a, ref) {
|
|
|
950
1370
|
(interactive || isLink || isButton) && "ph-card-interactive",
|
|
951
1371
|
className
|
|
952
1372
|
);
|
|
953
|
-
const cardContent = /* @__PURE__ */ (0,
|
|
954
|
-
media && /* @__PURE__ */ (0,
|
|
955
|
-
/* @__PURE__ */ (0,
|
|
956
|
-
title && /* @__PURE__ */ (0,
|
|
957
|
-
description && /* @__PURE__ */ (0,
|
|
1373
|
+
const cardContent = /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_jsx_runtime10.Fragment, { children: [
|
|
1374
|
+
media && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "ph-card-media", children: media }),
|
|
1375
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: cn("ph-card-body", bodyClassName), children: [
|
|
1376
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Title3, { className: "ph-card-title", children: title }),
|
|
1377
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("p", { className: "text-sm text-ph-subtle", children: description }),
|
|
958
1378
|
children,
|
|
959
|
-
actions && /* @__PURE__ */ (0,
|
|
1379
|
+
actions && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "ph-card-actions", children: actions })
|
|
960
1380
|
] }),
|
|
961
|
-
footer && /* @__PURE__ */ (0,
|
|
1381
|
+
footer && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "border-t border-ph-border px-6 py-4 text-xs text-ph-subtle", children: footer })
|
|
962
1382
|
] });
|
|
963
1383
|
if (isLink) {
|
|
964
|
-
return /* @__PURE__ */ (0,
|
|
1384
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
965
1385
|
"a",
|
|
966
1386
|
__spreadProps(__spreadValues({
|
|
967
1387
|
ref,
|
|
@@ -976,7 +1396,7 @@ var Card = (0, import_react7.forwardRef)(function Card2(_a, ref) {
|
|
|
976
1396
|
);
|
|
977
1397
|
}
|
|
978
1398
|
if (isButton) {
|
|
979
|
-
return /* @__PURE__ */ (0,
|
|
1399
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
980
1400
|
"button",
|
|
981
1401
|
__spreadProps(__spreadValues({
|
|
982
1402
|
ref,
|
|
@@ -988,12 +1408,12 @@ var Card = (0, import_react7.forwardRef)(function Card2(_a, ref) {
|
|
|
988
1408
|
})
|
|
989
1409
|
);
|
|
990
1410
|
}
|
|
991
|
-
return /* @__PURE__ */ (0,
|
|
1411
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", __spreadProps(__spreadValues({ ref, className: cardClassName }, props), { children: cardContent }));
|
|
992
1412
|
});
|
|
993
1413
|
Card.displayName = "Card";
|
|
994
1414
|
|
|
995
1415
|
// src/components/ui/Kbd.tsx
|
|
996
|
-
var
|
|
1416
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
997
1417
|
var platformLabels = {
|
|
998
1418
|
text: {
|
|
999
1419
|
command: "Command",
|
|
@@ -1052,7 +1472,7 @@ function Kbd(_a) {
|
|
|
1052
1472
|
"aria-label"
|
|
1053
1473
|
]);
|
|
1054
1474
|
if (variant === "token") {
|
|
1055
|
-
return /* @__PURE__ */ (0,
|
|
1475
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1056
1476
|
"code",
|
|
1057
1477
|
__spreadProps(__spreadValues({
|
|
1058
1478
|
className: cn("ph-code-token ph-kbd", className),
|
|
@@ -1067,7 +1487,7 @@ function Kbd(_a) {
|
|
|
1067
1487
|
const displayKeys = sourceKeys.map((key) => formatKey(key, platform));
|
|
1068
1488
|
const accessibleLabel = ariaLabel != null ? ariaLabel : getShortcutLabel(displayKeys);
|
|
1069
1489
|
if (variant === "key") {
|
|
1070
|
-
return /* @__PURE__ */ (0,
|
|
1490
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1071
1491
|
"kbd",
|
|
1072
1492
|
__spreadProps(__spreadValues({
|
|
1073
1493
|
className: cn("ph-keycap", className),
|
|
@@ -1078,16 +1498,16 @@ function Kbd(_a) {
|
|
|
1078
1498
|
})
|
|
1079
1499
|
);
|
|
1080
1500
|
}
|
|
1081
|
-
return /* @__PURE__ */ (0,
|
|
1501
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1082
1502
|
"kbd",
|
|
1083
1503
|
__spreadProps(__spreadValues({
|
|
1084
1504
|
className: cn("ph-shortcut-group ph-keycap", className),
|
|
1085
1505
|
role: accessibleLabel ? "img" : void 0,
|
|
1086
1506
|
"aria-label": accessibleLabel
|
|
1087
1507
|
}, props), {
|
|
1088
|
-
children: displayKeys.map((key, index) => /* @__PURE__ */ (0,
|
|
1089
|
-
index > 0 && separator != null ? /* @__PURE__ */ (0,
|
|
1090
|
-
/* @__PURE__ */ (0,
|
|
1508
|
+
children: displayKeys.map((key, index) => /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("span", { className: "contents", children: [
|
|
1509
|
+
index > 0 && separator != null ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "ph-shortcut-separator", "aria-hidden": "true", children: separator }) : null,
|
|
1510
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "ph-shortcut-key", "aria-hidden": accessibleLabel ? true : void 0, children: key })
|
|
1091
1511
|
] }, index))
|
|
1092
1512
|
})
|
|
1093
1513
|
);
|
|
@@ -1108,7 +1528,7 @@ function getShortcutLabel(keys) {
|
|
|
1108
1528
|
}
|
|
1109
1529
|
|
|
1110
1530
|
// src/components/ui/Loader.tsx
|
|
1111
|
-
var
|
|
1531
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
1112
1532
|
var loaderSizeClass = {
|
|
1113
1533
|
sm: "ph-loader-sm",
|
|
1114
1534
|
md: "ph-loader-md",
|
|
@@ -1134,7 +1554,7 @@ function Loader(_a) {
|
|
|
1134
1554
|
"label",
|
|
1135
1555
|
"className"
|
|
1136
1556
|
]);
|
|
1137
|
-
return /* @__PURE__ */ (0,
|
|
1557
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
1138
1558
|
"span",
|
|
1139
1559
|
__spreadProps(__spreadValues({
|
|
1140
1560
|
role: "status",
|
|
@@ -1142,20 +1562,20 @@ function Loader(_a) {
|
|
|
1142
1562
|
className: cn("ph-loader", loaderSizeClass[size], className)
|
|
1143
1563
|
}, props), {
|
|
1144
1564
|
children: [
|
|
1145
|
-
variant === "spinner" ? /* @__PURE__ */ (0,
|
|
1146
|
-
variant === "dots" ? /* @__PURE__ */ (0,
|
|
1147
|
-
/* @__PURE__ */ (0,
|
|
1148
|
-
/* @__PURE__ */ (0,
|
|
1149
|
-
/* @__PURE__ */ (0,
|
|
1565
|
+
variant === "spinner" ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "ph-loading", "aria-hidden": true }) : null,
|
|
1566
|
+
variant === "dots" ? /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("span", { className: "ph-loading-dots", "aria-hidden": true, children: [
|
|
1567
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", {}),
|
|
1568
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", {}),
|
|
1569
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", {})
|
|
1150
1570
|
] }) : null,
|
|
1151
|
-
variant === "pulse" ? /* @__PURE__ */ (0,
|
|
1571
|
+
variant === "pulse" ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "ph-loading-pulse", "aria-hidden": true }) : null
|
|
1152
1572
|
]
|
|
1153
1573
|
})
|
|
1154
1574
|
);
|
|
1155
1575
|
}
|
|
1156
1576
|
function Skeleton(_a) {
|
|
1157
1577
|
var _b = _a, { shape = "text", className } = _b, props = __objRest(_b, ["shape", "className"]);
|
|
1158
|
-
return /* @__PURE__ */ (0,
|
|
1578
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1159
1579
|
"span",
|
|
1160
1580
|
__spreadValues({
|
|
1161
1581
|
className: cn("ph-skeleton", skeletonShapeClass[shape], className),
|
|
@@ -1179,53 +1599,53 @@ function LoadingState(_a) {
|
|
|
1179
1599
|
"size",
|
|
1180
1600
|
"className"
|
|
1181
1601
|
]);
|
|
1182
|
-
return /* @__PURE__ */ (0,
|
|
1183
|
-
/* @__PURE__ */ (0,
|
|
1184
|
-
/* @__PURE__ */ (0,
|
|
1185
|
-
/* @__PURE__ */ (0,
|
|
1186
|
-
description ? /* @__PURE__ */ (0,
|
|
1602
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", __spreadProps(__spreadValues({ className: cn("ph-loading-state", className), role: "status", "aria-label": label }, props), { children: [
|
|
1603
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Loader, { variant, size, label, "aria-hidden": "true" }),
|
|
1604
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "ph-loading-state__copy", children: [
|
|
1605
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("strong", { children: title }),
|
|
1606
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { children: description }) : null
|
|
1187
1607
|
] })
|
|
1188
1608
|
] }));
|
|
1189
1609
|
}
|
|
1190
1610
|
|
|
1191
1611
|
// src/components/ui/AuthLayout.tsx
|
|
1192
|
-
var
|
|
1193
|
-
var
|
|
1612
|
+
var import_react10 = require("react");
|
|
1613
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
1194
1614
|
function AuthLayout(_a) {
|
|
1195
1615
|
var _b = _a, { brand, footer, aside, children, className } = _b, props = __objRest(_b, ["brand", "footer", "aside", "children", "className"]);
|
|
1196
|
-
return /* @__PURE__ */ (0,
|
|
1197
|
-
aside ? /* @__PURE__ */ (0,
|
|
1198
|
-
/* @__PURE__ */ (0,
|
|
1199
|
-
brand ? /* @__PURE__ */ (0,
|
|
1616
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", __spreadProps(__spreadValues({ className: cn("ph-auth-layout", aside != null && "ph-auth-layout--split", className) }, props), { children: [
|
|
1617
|
+
aside ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("aside", { className: "ph-auth-layout__aside", children: aside }) : null,
|
|
1618
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "ph-auth-layout__main", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "ph-auth-layout__column", children: [
|
|
1619
|
+
brand ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "ph-auth-layout__brand", children: brand }) : null,
|
|
1200
1620
|
children,
|
|
1201
|
-
footer ? /* @__PURE__ */ (0,
|
|
1621
|
+
footer ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("footer", { className: "ph-auth-layout__footer", children: footer }) : null
|
|
1202
1622
|
] }) })
|
|
1203
1623
|
] }));
|
|
1204
1624
|
}
|
|
1205
1625
|
function AuthCard(_a) {
|
|
1206
1626
|
var _b = _a, { title, description, footer, children, className } = _b, props = __objRest(_b, ["title", "description", "footer", "children", "className"]);
|
|
1207
|
-
const titleId = (0,
|
|
1208
|
-
return /* @__PURE__ */ (0,
|
|
1209
|
-
/* @__PURE__ */ (0,
|
|
1210
|
-
/* @__PURE__ */ (0,
|
|
1211
|
-
description ? /* @__PURE__ */ (0,
|
|
1627
|
+
const titleId = (0, import_react10.useId)();
|
|
1628
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("section", __spreadProps(__spreadValues({ className: cn("ph-auth-card", className), "aria-labelledby": titleId }, props), { children: [
|
|
1629
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("header", { className: "ph-auth-card__header", children: [
|
|
1630
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("h1", { id: titleId, children: title }),
|
|
1631
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { children: description }) : null
|
|
1212
1632
|
] }),
|
|
1213
|
-
/* @__PURE__ */ (0,
|
|
1214
|
-
footer ? /* @__PURE__ */ (0,
|
|
1633
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "ph-auth-card__body", children }),
|
|
1634
|
+
footer ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("footer", { className: "ph-auth-card__footer", children: footer }) : null
|
|
1215
1635
|
] }));
|
|
1216
1636
|
}
|
|
1217
1637
|
function AuthDivider(_a) {
|
|
1218
1638
|
var _b = _a, { children = "or continue with", className } = _b, props = __objRest(_b, ["children", "className"]);
|
|
1219
|
-
return /* @__PURE__ */ (0,
|
|
1639
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", __spreadProps(__spreadValues({ className: cn("ph-auth-divider", className) }, props), { children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { children }) }));
|
|
1220
1640
|
}
|
|
1221
1641
|
|
|
1222
1642
|
// src/components/ui/SettingsLayout.tsx
|
|
1223
|
-
var
|
|
1643
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
1224
1644
|
function SettingsNav(_a) {
|
|
1225
1645
|
var _b = _a, { groups, className } = _b, props = __objRest(_b, ["groups", "className"]);
|
|
1226
|
-
return /* @__PURE__ */ (0,
|
|
1227
|
-
/* @__PURE__ */ (0,
|
|
1228
|
-
/* @__PURE__ */ (0,
|
|
1646
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", __spreadProps(__spreadValues({ className: cn("ph-settings-nav", className) }, props), { children: groups.map((group, index) => /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "ph-settings-nav__group", children: [
|
|
1647
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { className: "ph-settings-nav__heading", children: group.label }),
|
|
1648
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "ph-settings-nav__items", children: group.items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
1229
1649
|
"a",
|
|
1230
1650
|
{
|
|
1231
1651
|
href: item.href,
|
|
@@ -1237,9 +1657,9 @@ function SettingsNav(_a) {
|
|
|
1237
1657
|
),
|
|
1238
1658
|
"aria-current": item.active ? "page" : void 0,
|
|
1239
1659
|
children: [
|
|
1240
|
-
item.icon ? /* @__PURE__ */ (0,
|
|
1241
|
-
/* @__PURE__ */ (0,
|
|
1242
|
-
item.badge ? /* @__PURE__ */ (0,
|
|
1660
|
+
item.icon ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "ph-settings-nav__icon", children: item.icon }) : null,
|
|
1661
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { children: item.label }),
|
|
1662
|
+
item.badge ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "ph-settings-nav__badge", children: item.badge }) : null
|
|
1243
1663
|
]
|
|
1244
1664
|
},
|
|
1245
1665
|
item.id
|
|
@@ -1264,31 +1684,31 @@ function SettingsLayout(_a) {
|
|
|
1264
1684
|
"children",
|
|
1265
1685
|
"className"
|
|
1266
1686
|
]);
|
|
1267
|
-
return /* @__PURE__ */ (0,
|
|
1268
|
-
/* @__PURE__ */ (0,
|
|
1269
|
-
/* @__PURE__ */ (0,
|
|
1270
|
-
/* @__PURE__ */ (0,
|
|
1271
|
-
description ? /* @__PURE__ */ (0,
|
|
1687
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("section", __spreadProps(__spreadValues({ className: cn("ph-settings-layout", className) }, props), { children: [
|
|
1688
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("header", { className: "ph-settings-layout__header", children: [
|
|
1689
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { children: [
|
|
1690
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("h2", { children: title }),
|
|
1691
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { children: description }) : null
|
|
1272
1692
|
] }),
|
|
1273
|
-
actions ? /* @__PURE__ */ (0,
|
|
1693
|
+
actions ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "ph-settings-layout__actions", children: actions }) : null
|
|
1274
1694
|
] }),
|
|
1275
|
-
/* @__PURE__ */ (0,
|
|
1276
|
-
/* @__PURE__ */ (0,
|
|
1277
|
-
/* @__PURE__ */ (0,
|
|
1695
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("details", { className: "ph-settings-layout__mobile-nav", children: [
|
|
1696
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("summary", { children: [
|
|
1697
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(IconTuning, { className: "h-4 w-4", "aria-hidden": true }),
|
|
1278
1698
|
"Settings menu"
|
|
1279
1699
|
] }),
|
|
1280
|
-
/* @__PURE__ */ (0,
|
|
1700
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("nav", { "aria-label": navigationLabel, children: navigation })
|
|
1281
1701
|
] }),
|
|
1282
|
-
/* @__PURE__ */ (0,
|
|
1283
|
-
/* @__PURE__ */ (0,
|
|
1284
|
-
/* @__PURE__ */ (0,
|
|
1702
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "ph-settings-layout__grid", children: [
|
|
1703
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("aside", { className: "ph-settings-layout__sidebar", children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("nav", { "aria-label": navigationLabel, children: navigation }) }),
|
|
1704
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "ph-settings-layout__content", children })
|
|
1285
1705
|
] })
|
|
1286
1706
|
] }));
|
|
1287
1707
|
}
|
|
1288
1708
|
|
|
1289
1709
|
// src/components/ui/DropdownMenu.tsx
|
|
1290
1710
|
var DropdownPrimitive = __toESM(require("@radix-ui/react-dropdown-menu"));
|
|
1291
|
-
var
|
|
1711
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
1292
1712
|
var sizeClass2 = {
|
|
1293
1713
|
xs: "ph-btn-xs",
|
|
1294
1714
|
sm: "ph-btn-sm",
|
|
@@ -1310,7 +1730,7 @@ function DropdownContent({
|
|
|
1310
1730
|
avoidCollisions = true,
|
|
1311
1731
|
panelClassName
|
|
1312
1732
|
}) {
|
|
1313
|
-
return /* @__PURE__ */ (0,
|
|
1733
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(DropdownPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
1314
1734
|
DropdownPrimitive.Content,
|
|
1315
1735
|
{
|
|
1316
1736
|
className: cn("ph-dropdown-panel", panelClassName),
|
|
@@ -1323,7 +1743,7 @@ function DropdownContent({
|
|
|
1323
1743
|
sticky: "partial",
|
|
1324
1744
|
children: [
|
|
1325
1745
|
children,
|
|
1326
|
-
/* @__PURE__ */ (0,
|
|
1746
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1327
1747
|
DropdownPrimitive.Arrow,
|
|
1328
1748
|
{
|
|
1329
1749
|
className: "ph-dropdown-arrow",
|
|
@@ -1375,7 +1795,7 @@ function DropdownMenu(_a) {
|
|
|
1375
1795
|
"modal",
|
|
1376
1796
|
"disabled"
|
|
1377
1797
|
]);
|
|
1378
|
-
return /* @__PURE__ */ (0,
|
|
1798
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", __spreadProps(__spreadValues({ className: cn("ph-dropdown", className) }, props), { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
1379
1799
|
DropdownPrimitive.Root,
|
|
1380
1800
|
{
|
|
1381
1801
|
open,
|
|
@@ -1383,7 +1803,7 @@ function DropdownMenu(_a) {
|
|
|
1383
1803
|
onOpenChange,
|
|
1384
1804
|
modal,
|
|
1385
1805
|
children: [
|
|
1386
|
-
/* @__PURE__ */ (0,
|
|
1806
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(DropdownPrimitive.Trigger, { asChild: true, disabled, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1387
1807
|
"button",
|
|
1388
1808
|
{
|
|
1389
1809
|
type: "button",
|
|
@@ -1394,7 +1814,7 @@ function DropdownMenu(_a) {
|
|
|
1394
1814
|
children: trigger
|
|
1395
1815
|
}
|
|
1396
1816
|
) }),
|
|
1397
|
-
/* @__PURE__ */ (0,
|
|
1817
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1398
1818
|
DropdownContent,
|
|
1399
1819
|
{
|
|
1400
1820
|
align,
|
|
@@ -1459,8 +1879,8 @@ function DropdownButton(_a) {
|
|
|
1459
1879
|
"modal",
|
|
1460
1880
|
"disabled"
|
|
1461
1881
|
]);
|
|
1462
|
-
const trailing = sideIcon != null ? sideIcon : /* @__PURE__ */ (0,
|
|
1463
|
-
return /* @__PURE__ */ (0,
|
|
1882
|
+
const trailing = sideIcon != null ? sideIcon : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(IconChevronDown, { className: "h-4 w-4", "aria-hidden": true });
|
|
1883
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", __spreadProps(__spreadValues({ className: cn("ph-dropdown", className) }, props), { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
1464
1884
|
DropdownPrimitive.Root,
|
|
1465
1885
|
{
|
|
1466
1886
|
open,
|
|
@@ -1468,7 +1888,7 @@ function DropdownButton(_a) {
|
|
|
1468
1888
|
onOpenChange,
|
|
1469
1889
|
modal,
|
|
1470
1890
|
children: [
|
|
1471
|
-
/* @__PURE__ */ (0,
|
|
1891
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(DropdownPrimitive.Trigger, { asChild: true, disabled, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1472
1892
|
"button",
|
|
1473
1893
|
{
|
|
1474
1894
|
type: "button",
|
|
@@ -1481,7 +1901,7 @@ function DropdownButton(_a) {
|
|
|
1481
1901
|
split && "ph-btn-split"
|
|
1482
1902
|
),
|
|
1483
1903
|
"aria-label": ariaLabel,
|
|
1484
|
-
children: /* @__PURE__ */ (0,
|
|
1904
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1485
1905
|
ButtonChrome,
|
|
1486
1906
|
{
|
|
1487
1907
|
label,
|
|
@@ -1492,7 +1912,7 @@ function DropdownButton(_a) {
|
|
|
1492
1912
|
)
|
|
1493
1913
|
}
|
|
1494
1914
|
) }),
|
|
1495
|
-
/* @__PURE__ */ (0,
|
|
1915
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1496
1916
|
DropdownContent,
|
|
1497
1917
|
{
|
|
1498
1918
|
align,
|
|
@@ -1519,7 +1939,7 @@ function DropdownItem(_a) {
|
|
|
1519
1939
|
"children",
|
|
1520
1940
|
"disabled"
|
|
1521
1941
|
]);
|
|
1522
|
-
return /* @__PURE__ */ (0,
|
|
1942
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(DropdownPrimitive.Item, { asChild: true, disabled, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1523
1943
|
"button",
|
|
1524
1944
|
__spreadProps(__spreadValues({
|
|
1525
1945
|
type: "button",
|
|
@@ -1531,7 +1951,7 @@ function DropdownItem(_a) {
|
|
|
1531
1951
|
) });
|
|
1532
1952
|
}
|
|
1533
1953
|
function DropdownRadioGroup(props) {
|
|
1534
|
-
return /* @__PURE__ */ (0,
|
|
1954
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(DropdownPrimitive.RadioGroup, __spreadValues({}, props));
|
|
1535
1955
|
}
|
|
1536
1956
|
function DropdownRadioItem(_a) {
|
|
1537
1957
|
var _b = _a, {
|
|
@@ -1541,26 +1961,26 @@ function DropdownRadioItem(_a) {
|
|
|
1541
1961
|
"className",
|
|
1542
1962
|
"children"
|
|
1543
1963
|
]);
|
|
1544
|
-
return /* @__PURE__ */ (0,
|
|
1964
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
1545
1965
|
DropdownPrimitive.RadioItem,
|
|
1546
1966
|
__spreadProps(__spreadValues({
|
|
1547
1967
|
className: cn("ph-dropdown-item ph-dropdown-radio-item", className)
|
|
1548
1968
|
}, props), {
|
|
1549
1969
|
children: [
|
|
1550
|
-
/* @__PURE__ */ (0,
|
|
1551
|
-
/* @__PURE__ */ (0,
|
|
1970
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: "ph-dropdown-item-indicator", "aria-hidden": true, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(DropdownPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(IconCheck, { className: "h-3.5 w-3.5" }) }) }),
|
|
1971
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { children })
|
|
1552
1972
|
]
|
|
1553
1973
|
})
|
|
1554
1974
|
);
|
|
1555
1975
|
}
|
|
1556
1976
|
|
|
1557
1977
|
// src/components/ui/Input.tsx
|
|
1558
|
-
var
|
|
1559
|
-
var
|
|
1978
|
+
var import_react12 = require("react");
|
|
1979
|
+
var import_iconoir_react2 = require("iconoir-react");
|
|
1560
1980
|
|
|
1561
1981
|
// src/components/ui/FormField.tsx
|
|
1562
|
-
var
|
|
1563
|
-
var
|
|
1982
|
+
var import_react11 = require("react");
|
|
1983
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
1564
1984
|
function FormField(_a) {
|
|
1565
1985
|
var _b = _a, {
|
|
1566
1986
|
controlId,
|
|
@@ -1583,7 +2003,7 @@ function FormField(_a) {
|
|
|
1583
2003
|
"children",
|
|
1584
2004
|
"className"
|
|
1585
2005
|
]);
|
|
1586
|
-
const generatedId = (0,
|
|
2006
|
+
const generatedId = (0, import_react11.useId)();
|
|
1587
2007
|
const id = controlId != null ? controlId : generatedId;
|
|
1588
2008
|
const descriptionId = helperText && !error ? `${id}-description` : void 0;
|
|
1589
2009
|
const errorId = error ? `${id}-error` : void 0;
|
|
@@ -1593,26 +2013,26 @@ function FormField(_a) {
|
|
|
1593
2013
|
"aria-errormessage": errorId,
|
|
1594
2014
|
"aria-invalid": error ? true : void 0
|
|
1595
2015
|
};
|
|
1596
|
-
return /* @__PURE__ */ (0,
|
|
1597
|
-
label ? /* @__PURE__ */ (0,
|
|
2016
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", __spreadProps(__spreadValues({ className: cn("ph-field", className) }, props), { children: [
|
|
2017
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
1598
2018
|
"label",
|
|
1599
2019
|
{
|
|
1600
2020
|
htmlFor: id,
|
|
1601
2021
|
className: cn("ph-label", hideLabel && "sr-only", disabled && "opacity-50"),
|
|
1602
2022
|
children: [
|
|
1603
2023
|
label,
|
|
1604
|
-
required ? /* @__PURE__ */ (0,
|
|
2024
|
+
required ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { "aria-hidden": "true", children: " *" }) : null
|
|
1605
2025
|
]
|
|
1606
2026
|
}
|
|
1607
2027
|
) : null,
|
|
1608
2028
|
typeof children === "function" ? children(controlProps) : children,
|
|
1609
|
-
descriptionId ? /* @__PURE__ */ (0,
|
|
1610
|
-
errorId ? /* @__PURE__ */ (0,
|
|
2029
|
+
descriptionId ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { id: descriptionId, className: "mt-1 text-xs text-ph-subtle", children: helperText }) : null,
|
|
2030
|
+
errorId ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { id: errorId, className: "mt-1 text-xs font-medium text-ph-danger", children: error }) : null
|
|
1611
2031
|
] }));
|
|
1612
2032
|
}
|
|
1613
2033
|
|
|
1614
2034
|
// src/components/ui/Input.tsx
|
|
1615
|
-
var
|
|
2035
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
1616
2036
|
var sizeMap2 = {
|
|
1617
2037
|
sm: "ph-input-sm",
|
|
1618
2038
|
md: "",
|
|
@@ -1622,7 +2042,7 @@ function joinIds(...ids) {
|
|
|
1622
2042
|
const value = ids.filter(Boolean).join(" ");
|
|
1623
2043
|
return value || void 0;
|
|
1624
2044
|
}
|
|
1625
|
-
var Input = (0,
|
|
2045
|
+
var Input = (0, import_react12.forwardRef)(function Input2(_a, ref) {
|
|
1626
2046
|
var _b = _a, {
|
|
1627
2047
|
id: idProp,
|
|
1628
2048
|
label,
|
|
@@ -1652,12 +2072,12 @@ var Input = (0, import_react10.forwardRef)(function Input2(_a, ref) {
|
|
|
1652
2072
|
"required",
|
|
1653
2073
|
"aria-describedby"
|
|
1654
2074
|
]);
|
|
1655
|
-
const autoId = (0,
|
|
2075
|
+
const autoId = (0, import_react12.useId)();
|
|
1656
2076
|
const id = idProp != null ? idProp : autoId;
|
|
1657
2077
|
const hasError = Boolean(error);
|
|
1658
2078
|
const isPassword = type === "password";
|
|
1659
|
-
const [revealed, setRevealed] = (0,
|
|
1660
|
-
return /* @__PURE__ */ (0,
|
|
2079
|
+
const [revealed, setRevealed] = (0, import_react12.useState)(false);
|
|
2080
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1661
2081
|
FormField,
|
|
1662
2082
|
{
|
|
1663
2083
|
controlId: id,
|
|
@@ -1668,8 +2088,8 @@ var Input = (0, import_react10.forwardRef)(function Input2(_a, ref) {
|
|
|
1668
2088
|
required,
|
|
1669
2089
|
disabled,
|
|
1670
2090
|
className: wrapperClassName,
|
|
1671
|
-
children: (fieldProps) => /* @__PURE__ */ (0,
|
|
1672
|
-
/* @__PURE__ */ (0,
|
|
2091
|
+
children: (fieldProps) => /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "relative", children: [
|
|
2092
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1673
2093
|
"input",
|
|
1674
2094
|
__spreadValues(__spreadProps(__spreadValues({}, fieldProps), {
|
|
1675
2095
|
ref,
|
|
@@ -1688,7 +2108,7 @@ var Input = (0, import_react10.forwardRef)(function Input2(_a, ref) {
|
|
|
1688
2108
|
)
|
|
1689
2109
|
}), props)
|
|
1690
2110
|
),
|
|
1691
|
-
isPassword ? /* @__PURE__ */ (0,
|
|
2111
|
+
isPassword ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1692
2112
|
"button",
|
|
1693
2113
|
{
|
|
1694
2114
|
type: "button",
|
|
@@ -1696,8 +2116,8 @@ var Input = (0, import_react10.forwardRef)(function Input2(_a, ref) {
|
|
|
1696
2116
|
"aria-label": revealed ? "Hide password" : "Show password",
|
|
1697
2117
|
"aria-pressed": revealed,
|
|
1698
2118
|
disabled,
|
|
1699
|
-
className: "
|
|
1700
|
-
children: revealed ? /* @__PURE__ */ (0,
|
|
2119
|
+
className: "ph-field-icon-button",
|
|
2120
|
+
children: revealed ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_iconoir_react2.EyeClosed, { className: "h-4 w-4", "aria-hidden": true }) : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_iconoir_react2.Eye, { className: "h-4 w-4", "aria-hidden": true })
|
|
1701
2121
|
}
|
|
1702
2122
|
) : null
|
|
1703
2123
|
] })
|
|
@@ -1705,7 +2125,7 @@ var Input = (0, import_react10.forwardRef)(function Input2(_a, ref) {
|
|
|
1705
2125
|
);
|
|
1706
2126
|
});
|
|
1707
2127
|
Input.displayName = "Input";
|
|
1708
|
-
var Select = (0,
|
|
2128
|
+
var Select = (0, import_react12.forwardRef)(function Select2(_a, ref) {
|
|
1709
2129
|
var _b = _a, {
|
|
1710
2130
|
id: idProp,
|
|
1711
2131
|
label,
|
|
@@ -1733,10 +2153,10 @@ var Select = (0, import_react10.forwardRef)(function Select2(_a, ref) {
|
|
|
1733
2153
|
"required",
|
|
1734
2154
|
"aria-describedby"
|
|
1735
2155
|
]);
|
|
1736
|
-
const autoId = (0,
|
|
2156
|
+
const autoId = (0, import_react12.useId)();
|
|
1737
2157
|
const id = idProp != null ? idProp : autoId;
|
|
1738
2158
|
const hasError = Boolean(error);
|
|
1739
|
-
return /* @__PURE__ */ (0,
|
|
2159
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(FormField, { controlId: id, label, hideLabel, helperText, error, required, disabled, className: wrapperClassName, children: (fieldProps) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1740
2160
|
"select",
|
|
1741
2161
|
__spreadProps(__spreadValues(__spreadProps(__spreadValues({}, fieldProps), {
|
|
1742
2162
|
ref,
|
|
@@ -1756,7 +2176,7 @@ var Select = (0, import_react10.forwardRef)(function Select2(_a, ref) {
|
|
|
1756
2176
|
) });
|
|
1757
2177
|
});
|
|
1758
2178
|
Select.displayName = "Select";
|
|
1759
|
-
var Textarea = (0,
|
|
2179
|
+
var Textarea = (0, import_react12.forwardRef)(function Textarea2(_a, ref) {
|
|
1760
2180
|
var _b = _a, {
|
|
1761
2181
|
id: idProp,
|
|
1762
2182
|
label,
|
|
@@ -1782,10 +2202,10 @@ var Textarea = (0, import_react10.forwardRef)(function Textarea2(_a, ref) {
|
|
|
1782
2202
|
"required",
|
|
1783
2203
|
"aria-describedby"
|
|
1784
2204
|
]);
|
|
1785
|
-
const autoId = (0,
|
|
2205
|
+
const autoId = (0, import_react12.useId)();
|
|
1786
2206
|
const id = idProp != null ? idProp : autoId;
|
|
1787
2207
|
const hasError = Boolean(error);
|
|
1788
|
-
return /* @__PURE__ */ (0,
|
|
2208
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(FormField, { controlId: id, label, hideLabel, helperText, error, required, disabled, className: wrapperClassName, children: (fieldProps) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1789
2209
|
"textarea",
|
|
1790
2210
|
__spreadValues(__spreadProps(__spreadValues({}, fieldProps), {
|
|
1791
2211
|
ref,
|
|
@@ -1803,7 +2223,7 @@ var Textarea = (0, import_react10.forwardRef)(function Textarea2(_a, ref) {
|
|
|
1803
2223
|
) });
|
|
1804
2224
|
});
|
|
1805
2225
|
Textarea.displayName = "Textarea";
|
|
1806
|
-
var Checkbox = (0,
|
|
2226
|
+
var Checkbox = (0, import_react12.forwardRef)(function Checkbox2(_a, ref) {
|
|
1807
2227
|
var _b = _a, {
|
|
1808
2228
|
id: idProp,
|
|
1809
2229
|
label,
|
|
@@ -1823,14 +2243,14 @@ var Checkbox = (0, import_react10.forwardRef)(function Checkbox2(_a, ref) {
|
|
|
1823
2243
|
"disabled",
|
|
1824
2244
|
"aria-describedby"
|
|
1825
2245
|
]);
|
|
1826
|
-
const autoId = (0,
|
|
2246
|
+
const autoId = (0, import_react12.useId)();
|
|
1827
2247
|
const id = idProp != null ? idProp : autoId;
|
|
1828
2248
|
const hasError = Boolean(error);
|
|
1829
2249
|
const descriptionId = helperText && !hasError ? `${id}-description` : void 0;
|
|
1830
2250
|
const errorId = error ? `${id}-error` : void 0;
|
|
1831
|
-
return /* @__PURE__ */ (0,
|
|
1832
|
-
/* @__PURE__ */ (0,
|
|
1833
|
-
/* @__PURE__ */ (0,
|
|
2251
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: cn("ph-control-row", wrapperClassName), children: [
|
|
2252
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("span", { className: "ph-checkbox-wrap", children: [
|
|
2253
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1834
2254
|
"input",
|
|
1835
2255
|
__spreadValues({
|
|
1836
2256
|
ref,
|
|
@@ -1848,17 +2268,17 @@ var Checkbox = (0, import_react10.forwardRef)(function Checkbox2(_a, ref) {
|
|
|
1848
2268
|
)
|
|
1849
2269
|
}, props)
|
|
1850
2270
|
),
|
|
1851
|
-
/* @__PURE__ */ (0,
|
|
2271
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(IconCheck, { className: "ph-checkbox-icon", "aria-hidden": true })
|
|
1852
2272
|
] }),
|
|
1853
|
-
/* @__PURE__ */ (0,
|
|
1854
|
-
/* @__PURE__ */ (0,
|
|
1855
|
-
descriptionId ? /* @__PURE__ */ (0,
|
|
1856
|
-
errorId ? /* @__PURE__ */ (0,
|
|
2273
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "ph-control-copy", children: [
|
|
2274
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("label", { htmlFor: id, className: cn("cursor-pointer", disabled && "opacity-60"), children: label }),
|
|
2275
|
+
descriptionId ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { id: descriptionId, className: "text-xs text-ph-subtle", children: helperText }) : null,
|
|
2276
|
+
errorId ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { id: errorId, className: "text-xs font-medium text-ph-danger", children: error }) : null
|
|
1857
2277
|
] })
|
|
1858
2278
|
] });
|
|
1859
2279
|
});
|
|
1860
2280
|
Checkbox.displayName = "Checkbox";
|
|
1861
|
-
var Radio = (0,
|
|
2281
|
+
var Radio = (0, import_react12.forwardRef)(function Radio2(_a, ref) {
|
|
1862
2282
|
var _b = _a, {
|
|
1863
2283
|
id: idProp,
|
|
1864
2284
|
label,
|
|
@@ -1872,10 +2292,10 @@ var Radio = (0, import_react10.forwardRef)(function Radio2(_a, ref) {
|
|
|
1872
2292
|
"wrapperClassName",
|
|
1873
2293
|
"disabled"
|
|
1874
2294
|
]);
|
|
1875
|
-
const autoId = (0,
|
|
2295
|
+
const autoId = (0, import_react12.useId)();
|
|
1876
2296
|
const id = idProp != null ? idProp : autoId;
|
|
1877
|
-
return /* @__PURE__ */ (0,
|
|
1878
|
-
/* @__PURE__ */ (0,
|
|
2297
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: cn("ph-control-row", wrapperClassName, disabled && "opacity-60"), children: [
|
|
2298
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1879
2299
|
"input",
|
|
1880
2300
|
__spreadValues({
|
|
1881
2301
|
ref,
|
|
@@ -1885,11 +2305,11 @@ var Radio = (0, import_react10.forwardRef)(function Radio2(_a, ref) {
|
|
|
1885
2305
|
className: cn("ph-radio", disabled && "cursor-not-allowed", className)
|
|
1886
2306
|
}, props)
|
|
1887
2307
|
),
|
|
1888
|
-
/* @__PURE__ */ (0,
|
|
2308
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("label", { htmlFor: id, className: cn("cursor-pointer", disabled && "opacity-60"), children: label })
|
|
1889
2309
|
] });
|
|
1890
2310
|
});
|
|
1891
2311
|
Radio.displayName = "Radio";
|
|
1892
|
-
var Toggle = (0,
|
|
2312
|
+
var Toggle = (0, import_react12.forwardRef)(function Toggle2(_a, ref) {
|
|
1893
2313
|
var _b = _a, {
|
|
1894
2314
|
id: idProp,
|
|
1895
2315
|
label,
|
|
@@ -1903,11 +2323,11 @@ var Toggle = (0, import_react10.forwardRef)(function Toggle2(_a, ref) {
|
|
|
1903
2323
|
"wrapperClassName",
|
|
1904
2324
|
"disabled"
|
|
1905
2325
|
]);
|
|
1906
|
-
const autoId = (0,
|
|
2326
|
+
const autoId = (0, import_react12.useId)();
|
|
1907
2327
|
const id = idProp != null ? idProp : autoId;
|
|
1908
|
-
return /* @__PURE__ */ (0,
|
|
1909
|
-
/* @__PURE__ */ (0,
|
|
1910
|
-
/* @__PURE__ */ (0,
|
|
2328
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("label", { className: cn("ph-control-row-between", wrapperClassName, disabled && "opacity-60"), children: [
|
|
2329
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { className: disabled ? "opacity-60" : void 0, children: label }),
|
|
2330
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1911
2331
|
"input",
|
|
1912
2332
|
__spreadValues({
|
|
1913
2333
|
ref,
|
|
@@ -1921,7 +2341,7 @@ var Toggle = (0, import_react10.forwardRef)(function Toggle2(_a, ref) {
|
|
|
1921
2341
|
] });
|
|
1922
2342
|
});
|
|
1923
2343
|
Toggle.displayName = "Toggle";
|
|
1924
|
-
var Range = (0,
|
|
2344
|
+
var Range = (0, import_react12.forwardRef)(function Range2(_a, ref) {
|
|
1925
2345
|
var _b = _a, {
|
|
1926
2346
|
id: idProp,
|
|
1927
2347
|
label,
|
|
@@ -1939,20 +2359,20 @@ var Range = (0, import_react10.forwardRef)(function Range2(_a, ref) {
|
|
|
1939
2359
|
"wrapperClassName",
|
|
1940
2360
|
"className"
|
|
1941
2361
|
]);
|
|
1942
|
-
const autoId = (0,
|
|
2362
|
+
const autoId = (0, import_react12.useId)();
|
|
1943
2363
|
const id = idProp != null ? idProp : autoId;
|
|
1944
|
-
return /* @__PURE__ */ (0,
|
|
1945
|
-
label && /* @__PURE__ */ (0,
|
|
1946
|
-
/* @__PURE__ */ (0,
|
|
1947
|
-
(minLabel || valueLabel || maxLabel) && /* @__PURE__ */ (0,
|
|
1948
|
-
/* @__PURE__ */ (0,
|
|
1949
|
-
/* @__PURE__ */ (0,
|
|
1950
|
-
/* @__PURE__ */ (0,
|
|
2364
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: cn("ph-field", wrapperClassName), children: [
|
|
2365
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("label", { htmlFor: id, className: "ph-label", children: label }),
|
|
2366
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("input", __spreadValues({ ref, id, type: "range", className: cn("ph-range", className) }, props)),
|
|
2367
|
+
(minLabel || valueLabel || maxLabel) && /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "flex justify-between text-xs text-ph-mutedtext", children: [
|
|
2368
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { children: minLabel }),
|
|
2369
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { children: valueLabel }),
|
|
2370
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("span", { children: maxLabel })
|
|
1951
2371
|
] })
|
|
1952
2372
|
] });
|
|
1953
2373
|
});
|
|
1954
2374
|
Range.displayName = "Range";
|
|
1955
|
-
var FileUpload = (0,
|
|
2375
|
+
var FileUpload = (0, import_react12.forwardRef)(function FileUpload2(_a, ref) {
|
|
1956
2376
|
var _b = _a, {
|
|
1957
2377
|
id: idProp,
|
|
1958
2378
|
label,
|
|
@@ -1966,12 +2386,12 @@ var FileUpload = (0, import_react10.forwardRef)(function FileUpload2(_a, ref) {
|
|
|
1966
2386
|
"wrapperClassName",
|
|
1967
2387
|
"className"
|
|
1968
2388
|
]);
|
|
1969
|
-
const autoId = (0,
|
|
2389
|
+
const autoId = (0, import_react12.useId)();
|
|
1970
2390
|
const id = idProp != null ? idProp : autoId;
|
|
1971
|
-
return /* @__PURE__ */ (0,
|
|
1972
|
-
label && /* @__PURE__ */ (0,
|
|
1973
|
-
/* @__PURE__ */ (0,
|
|
1974
|
-
/* @__PURE__ */ (0,
|
|
2391
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: cn("ph-field", wrapperClassName), children: [
|
|
2392
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("label", { htmlFor: id, className: "ph-label", children: label }),
|
|
2393
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("label", { htmlFor: id, className: "ph-file-upload", children: [
|
|
2394
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("input", __spreadValues({ ref, id, type: "file", className: cn("sr-only", className) }, props)),
|
|
1975
2395
|
prompt
|
|
1976
2396
|
] })
|
|
1977
2397
|
] });
|
|
@@ -1980,8 +2400,8 @@ FileUpload.displayName = "FileUpload";
|
|
|
1980
2400
|
|
|
1981
2401
|
// src/components/ui/Modal.tsx
|
|
1982
2402
|
var Dialog = __toESM(require("@radix-ui/react-dialog"));
|
|
1983
|
-
var
|
|
1984
|
-
var
|
|
2403
|
+
var import_react13 = require("react");
|
|
2404
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
1985
2405
|
var sizeMap3 = {
|
|
1986
2406
|
sm: "max-w-sm",
|
|
1987
2407
|
md: "max-w-lg",
|
|
@@ -2011,16 +2431,16 @@ function Modal({
|
|
|
2011
2431
|
"aria-labelledby": ariaLabelledBy
|
|
2012
2432
|
}) {
|
|
2013
2433
|
const canDismiss = Boolean(onClose);
|
|
2014
|
-
const restoreFocusRef = (0,
|
|
2015
|
-
return /* @__PURE__ */ (0,
|
|
2434
|
+
const restoreFocusRef = (0, import_react13.useRef)(null);
|
|
2435
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
2016
2436
|
Dialog.Root,
|
|
2017
2437
|
{
|
|
2018
2438
|
open,
|
|
2019
2439
|
onOpenChange: (nextOpen) => {
|
|
2020
2440
|
if (!nextOpen) onClose == null ? void 0 : onClose();
|
|
2021
2441
|
},
|
|
2022
|
-
children: /* @__PURE__ */ (0,
|
|
2023
|
-
/* @__PURE__ */ (0,
|
|
2442
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(Dialog.Portal, { children: [
|
|
2443
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
2024
2444
|
Dialog.Overlay,
|
|
2025
2445
|
{
|
|
2026
2446
|
"data-test": dataTest,
|
|
@@ -2028,7 +2448,7 @@ function Modal({
|
|
|
2028
2448
|
style: zIndex ? { zIndex } : void 0
|
|
2029
2449
|
}
|
|
2030
2450
|
),
|
|
2031
|
-
/* @__PURE__ */ (0,
|
|
2451
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
2032
2452
|
Dialog.Content,
|
|
2033
2453
|
__spreadProps(__spreadValues(__spreadProps(__spreadValues(__spreadValues({
|
|
2034
2454
|
id,
|
|
@@ -2051,28 +2471,28 @@ function Modal({
|
|
|
2051
2471
|
onPointerDownOutside: (event) => {
|
|
2052
2472
|
if (!canDismiss || !closeOnOutsideClick) event.preventDefault();
|
|
2053
2473
|
},
|
|
2054
|
-
children: customLayout ? /* @__PURE__ */ (0,
|
|
2055
|
-
/* @__PURE__ */ (0,
|
|
2474
|
+
children: customLayout ? /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, { children: [
|
|
2475
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Dialog.Title, { className: "sr-only", children: ariaLabel != null ? ariaLabel : "Dialog" }),
|
|
2056
2476
|
children
|
|
2057
|
-
] }) : /* @__PURE__ */ (0,
|
|
2058
|
-
title ? null : /* @__PURE__ */ (0,
|
|
2059
|
-
title || description || showCloseButton && canDismiss ? /* @__PURE__ */ (0,
|
|
2060
|
-
/* @__PURE__ */ (0,
|
|
2061
|
-
title ? /* @__PURE__ */ (0,
|
|
2062
|
-
description ? /* @__PURE__ */ (0,
|
|
2477
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_jsx_runtime18.Fragment, { children: [
|
|
2478
|
+
title ? null : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Dialog.Title, { className: "sr-only", children: ariaLabel != null ? ariaLabel : "Dialog" }),
|
|
2479
|
+
title || description || showCloseButton && canDismiss ? /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("header", { className: "ph-modal-header", children: [
|
|
2480
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "min-w-0", children: [
|
|
2481
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Dialog.Title, { className: "text-lg font-bold text-ph-ink", children: title }) : null,
|
|
2482
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Dialog.Description, { className: "mt-1 text-sm text-ph-subtle", children: description }) : null
|
|
2063
2483
|
] }),
|
|
2064
|
-
showCloseButton && canDismiss ? /* @__PURE__ */ (0,
|
|
2484
|
+
showCloseButton && canDismiss ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Dialog.Close, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
2065
2485
|
"button",
|
|
2066
2486
|
{
|
|
2067
2487
|
type: "button",
|
|
2068
2488
|
className: "ph-modal-close",
|
|
2069
2489
|
"aria-label": "Close dialog",
|
|
2070
|
-
children: /* @__PURE__ */ (0,
|
|
2490
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(IconClose, { className: "h-5 w-5", "aria-hidden": true })
|
|
2071
2491
|
}
|
|
2072
2492
|
) }) : null
|
|
2073
2493
|
] }) : null,
|
|
2074
|
-
/* @__PURE__ */ (0,
|
|
2075
|
-
footer ? /* @__PURE__ */ (0,
|
|
2494
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: cn("ph-modal-body", bodyClassName), children }),
|
|
2495
|
+
footer ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "ph-modal-footer", children: footer }) : null
|
|
2076
2496
|
] })
|
|
2077
2497
|
})
|
|
2078
2498
|
)
|
|
@@ -2082,19 +2502,19 @@ function Modal({
|
|
|
2082
2502
|
}
|
|
2083
2503
|
|
|
2084
2504
|
// src/components/ui/Panel.tsx
|
|
2085
|
-
var
|
|
2505
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
2086
2506
|
function Panel(_a) {
|
|
2087
2507
|
var _b = _a, { title, description, children, className } = _b, props = __objRest(_b, ["title", "description", "children", "className"]);
|
|
2088
|
-
return /* @__PURE__ */ (0,
|
|
2089
|
-
title && /* @__PURE__ */ (0,
|
|
2090
|
-
description && /* @__PURE__ */ (0,
|
|
2508
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", __spreadProps(__spreadValues({ className: cn("ph-panel", className) }, props), { children: [
|
|
2509
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("h3", { className: "text-lg font-semibold tracking-tight text-ph-ink", children: title }),
|
|
2510
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "text-sm text-ph-subtle", children: description }),
|
|
2091
2511
|
children
|
|
2092
2512
|
] }));
|
|
2093
2513
|
}
|
|
2094
2514
|
|
|
2095
2515
|
// src/components/ui/SearchInput.tsx
|
|
2096
|
-
var
|
|
2097
|
-
var
|
|
2516
|
+
var import_react14 = require("react");
|
|
2517
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
2098
2518
|
function SearchInput(_a) {
|
|
2099
2519
|
var _b = _a, {
|
|
2100
2520
|
id: idProp,
|
|
@@ -2115,12 +2535,12 @@ function SearchInput(_a) {
|
|
|
2115
2535
|
"wrapperClassName",
|
|
2116
2536
|
"placeholder"
|
|
2117
2537
|
]);
|
|
2118
|
-
const autoId = (0,
|
|
2538
|
+
const autoId = (0, import_react14.useId)();
|
|
2119
2539
|
const id = idProp != null ? idProp : autoId;
|
|
2120
|
-
return /* @__PURE__ */ (0,
|
|
2121
|
-
/* @__PURE__ */ (0,
|
|
2122
|
-
/* @__PURE__ */ (0,
|
|
2123
|
-
shortcut != null ? /* @__PURE__ */ (0,
|
|
2540
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: cn("relative", wrapperClassName), children: [
|
|
2541
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("label", { htmlFor: id, className: hideLabel ? "sr-only" : "ph-label mb-1.5 block", children: label }),
|
|
2542
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "relative", children: [
|
|
2543
|
+
shortcut != null ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
2124
2544
|
"span",
|
|
2125
2545
|
{
|
|
2126
2546
|
className: "ph-shortcut pointer-events-none absolute left-3 top-1/2 z-10 -translate-y-1/2 text-xs",
|
|
@@ -2128,7 +2548,7 @@ function SearchInput(_a) {
|
|
|
2128
2548
|
children: shortcut
|
|
2129
2549
|
}
|
|
2130
2550
|
) : null,
|
|
2131
|
-
/* @__PURE__ */ (0,
|
|
2551
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
2132
2552
|
"input",
|
|
2133
2553
|
__spreadValues({
|
|
2134
2554
|
id,
|
|
@@ -2162,12 +2582,12 @@ function SearchGroup(_a) {
|
|
|
2162
2582
|
"wrapperClassName",
|
|
2163
2583
|
"className"
|
|
2164
2584
|
]);
|
|
2165
|
-
const autoId = (0,
|
|
2585
|
+
const autoId = (0, import_react14.useId)();
|
|
2166
2586
|
const id = idProp != null ? idProp : autoId;
|
|
2167
|
-
return /* @__PURE__ */ (0,
|
|
2168
|
-
/* @__PURE__ */ (0,
|
|
2169
|
-
/* @__PURE__ */ (0,
|
|
2170
|
-
/* @__PURE__ */ (0,
|
|
2587
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: cn("ph-field", wrapperClassName), children: [
|
|
2588
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("label", { htmlFor: id, className: "ph-label", children: label }),
|
|
2589
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "ph-search-group flex w-full max-w-lg min-h-[2.3125rem] items-stretch divide-x divide-ph-border", children: [
|
|
2590
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
2171
2591
|
"input",
|
|
2172
2592
|
__spreadValues({
|
|
2173
2593
|
id,
|
|
@@ -2176,12 +2596,12 @@ function SearchGroup(_a) {
|
|
|
2176
2596
|
className: cn("ph-input ph-input-group-field min-w-0 flex-1", className)
|
|
2177
2597
|
}, props)
|
|
2178
2598
|
),
|
|
2179
|
-
/* @__PURE__ */ (0,
|
|
2599
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
2180
2600
|
Button,
|
|
2181
2601
|
{
|
|
2182
2602
|
type: "submit",
|
|
2183
2603
|
variant: "primary",
|
|
2184
|
-
icon: /* @__PURE__ */ (0,
|
|
2604
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(IconSearch, { className: "h-4 w-4", "aria-hidden": true }),
|
|
2185
2605
|
className: "ph-search-group__submit",
|
|
2186
2606
|
"aria-label": submitLabel
|
|
2187
2607
|
}
|
|
@@ -2191,7 +2611,7 @@ function SearchGroup(_a) {
|
|
|
2191
2611
|
}
|
|
2192
2612
|
|
|
2193
2613
|
// src/components/ui/Table.tsx
|
|
2194
|
-
var
|
|
2614
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
2195
2615
|
function Table({
|
|
2196
2616
|
data,
|
|
2197
2617
|
columns,
|
|
@@ -2201,19 +2621,22 @@ function Table({
|
|
|
2201
2621
|
getRowStyle,
|
|
2202
2622
|
getRowKey,
|
|
2203
2623
|
className,
|
|
2204
|
-
caption
|
|
2624
|
+
caption,
|
|
2625
|
+
emptyState = "No data available."
|
|
2205
2626
|
}) {
|
|
2206
|
-
return /* @__PURE__ */ (0,
|
|
2627
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2207
2628
|
"div",
|
|
2208
2629
|
{
|
|
2209
2630
|
className: cn("ph-table-wrap", compact && "ph-table-compact", className),
|
|
2631
|
+
role: "region",
|
|
2632
|
+
"aria-label": caption != null ? caption : "Data table",
|
|
2210
2633
|
tabIndex: 0,
|
|
2211
|
-
children: /* @__PURE__ */ (0,
|
|
2212
|
-
caption && /* @__PURE__ */ (0,
|
|
2213
|
-
/* @__PURE__ */ (0,
|
|
2214
|
-
/* @__PURE__ */ (0,
|
|
2634
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("table", { className: cn("ph-table", zebra && "ph-table-zebra", ribbon && "ph-table--ribbon"), children: [
|
|
2635
|
+
caption && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("caption", { className: "sr-only", children: caption }),
|
|
2636
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("tr", { children: columns.map((col) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("th", { className: col.className, children: col.header }, col.key)) }) }),
|
|
2637
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("tbody", { children: data.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("tr", { children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("td", { colSpan: columns.length, className: "ph-table-empty", children: emptyState }) }) : data.map((row, i) => {
|
|
2215
2638
|
var _a;
|
|
2216
|
-
return /* @__PURE__ */ (0,
|
|
2639
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("tr", { style: getRowStyle == null ? void 0 : getRowStyle(row), children: columns.map((col) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("td", { className: col.className, children: col.cell(row) }, col.key)) }, (_a = getRowKey == null ? void 0 : getRowKey(row, i)) != null ? _a : i);
|
|
2217
2640
|
}) })
|
|
2218
2641
|
] })
|
|
2219
2642
|
}
|
|
@@ -2221,7 +2644,7 @@ function Table({
|
|
|
2221
2644
|
}
|
|
2222
2645
|
|
|
2223
2646
|
// src/components/ui/Stat.tsx
|
|
2224
|
-
var
|
|
2647
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
2225
2648
|
var toneMap = {
|
|
2226
2649
|
default: "text-ph-ink",
|
|
2227
2650
|
brand: "text-ph-brand",
|
|
@@ -2238,16 +2661,16 @@ var statMap = {
|
|
|
2238
2661
|
};
|
|
2239
2662
|
function Stat(_a) {
|
|
2240
2663
|
var _b = _a, { icon, label, value, footer, tone = "default", className } = _b, props = __objRest(_b, ["icon", "label", "value", "footer", "tone", "className"]);
|
|
2241
|
-
return /* @__PURE__ */ (0,
|
|
2242
|
-
icon && /* @__PURE__ */ (0,
|
|
2243
|
-
/* @__PURE__ */ (0,
|
|
2244
|
-
/* @__PURE__ */ (0,
|
|
2245
|
-
footer && /* @__PURE__ */ (0,
|
|
2664
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("article", __spreadProps(__spreadValues({ className: cn("ph-stat", statMap[tone], className) }, props), { children: [
|
|
2665
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: cn("mb-2 h-7 w-7", toneMap[tone]), children: icon }),
|
|
2666
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: cn("ph-stat-label", tone === "warning" && toneMap[tone]), children: label }),
|
|
2667
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: cn("ph-stat-val", toneMap[tone]), children: value }),
|
|
2668
|
+
footer && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("p", { className: "text-xs text-ph-subtle", children: footer })
|
|
2246
2669
|
] }));
|
|
2247
2670
|
}
|
|
2248
2671
|
|
|
2249
2672
|
// src/components/ui/ThemeDomSync.tsx
|
|
2250
|
-
var
|
|
2673
|
+
var import_react15 = require("react");
|
|
2251
2674
|
|
|
2252
2675
|
// src/themes/registry.ts
|
|
2253
2676
|
var DEFAULT_THEME_ID = "hedgehog-light";
|
|
@@ -2396,25 +2819,25 @@ function readStoredTheme() {
|
|
|
2396
2819
|
|
|
2397
2820
|
// src/components/ui/ThemeDomSync.tsx
|
|
2398
2821
|
function ThemeDomSync() {
|
|
2399
|
-
(0,
|
|
2822
|
+
(0, import_react15.useLayoutEffect)(() => {
|
|
2400
2823
|
persistTheme(readStoredTheme());
|
|
2401
2824
|
}, []);
|
|
2402
2825
|
return null;
|
|
2403
2826
|
}
|
|
2404
2827
|
|
|
2405
2828
|
// src/components/ui/ThemeSwitcher.tsx
|
|
2406
|
-
var
|
|
2407
|
-
var
|
|
2829
|
+
var import_react16 = require("react");
|
|
2830
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
2408
2831
|
function ThemeSwitcher({ className }) {
|
|
2409
|
-
const [themeId, setThemeId] = (0,
|
|
2410
|
-
(0,
|
|
2832
|
+
const [themeId, setThemeId] = (0, import_react16.useState)(DEFAULT_THEME_ID);
|
|
2833
|
+
(0, import_react16.useEffect)(() => {
|
|
2411
2834
|
const id = readStoredTheme();
|
|
2412
2835
|
persistTheme(id);
|
|
2413
2836
|
setThemeId(id);
|
|
2414
2837
|
}, []);
|
|
2415
|
-
return /* @__PURE__ */ (0,
|
|
2416
|
-
/* @__PURE__ */ (0,
|
|
2417
|
-
/* @__PURE__ */ (0,
|
|
2838
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("label", { className: cn("flex min-w-0 items-center gap-2", className), children: [
|
|
2839
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "shrink-0 text-xs font-medium text-ph-mutedtext sm:text-sm", children: "Theme" }),
|
|
2840
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
2418
2841
|
"select",
|
|
2419
2842
|
{
|
|
2420
2843
|
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",
|
|
@@ -2425,23 +2848,23 @@ function ThemeSwitcher({ className }) {
|
|
|
2425
2848
|
persistTheme(next);
|
|
2426
2849
|
setThemeId(next);
|
|
2427
2850
|
},
|
|
2428
|
-
children: THEME_GROUPS.map((group) => /* @__PURE__ */ (0,
|
|
2851
|
+
children: THEME_GROUPS.map((group) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("optgroup", { label: group, children: THEMES.filter((theme) => theme.group === group).map((theme) => /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("option", { value: theme.id, children: theme.name }, theme.id)) }, group))
|
|
2429
2852
|
}
|
|
2430
2853
|
)
|
|
2431
2854
|
] });
|
|
2432
2855
|
}
|
|
2433
2856
|
|
|
2434
2857
|
// src/components/ui/Accordion.tsx
|
|
2435
|
-
var
|
|
2436
|
-
var
|
|
2858
|
+
var import_react17 = require("react");
|
|
2859
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
2437
2860
|
function Accordion({
|
|
2438
2861
|
items,
|
|
2439
2862
|
allowMultiple = false,
|
|
2440
2863
|
defaultOpen = [],
|
|
2441
2864
|
className
|
|
2442
2865
|
}) {
|
|
2443
|
-
const [openItems, setOpenItems] = (0,
|
|
2444
|
-
const idPrefix = (0,
|
|
2866
|
+
const [openItems, setOpenItems] = (0, import_react17.useState)(new Set(defaultOpen));
|
|
2867
|
+
const idPrefix = (0, import_react17.useId)();
|
|
2445
2868
|
const toggleItem = (id) => {
|
|
2446
2869
|
setOpenItems((prev) => {
|
|
2447
2870
|
const next = new Set(prev);
|
|
@@ -2456,28 +2879,25 @@ function Accordion({
|
|
|
2456
2879
|
return next;
|
|
2457
2880
|
});
|
|
2458
2881
|
};
|
|
2459
|
-
return /* @__PURE__ */ (0,
|
|
2882
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2460
2883
|
"div",
|
|
2461
2884
|
{
|
|
2462
|
-
className: cn(
|
|
2463
|
-
"divide-y divide-ph-border rounded-xl border border-ph-border bg-ph-surface",
|
|
2464
|
-
className
|
|
2465
|
-
),
|
|
2885
|
+
className: cn("ph-accordion", className),
|
|
2466
2886
|
children: items.map((item) => {
|
|
2467
2887
|
const isOpen = openItems.has(item.id);
|
|
2468
2888
|
const contentId = `accordion-${idPrefix}-${item.id}-content`;
|
|
2469
|
-
return /* @__PURE__ */ (0,
|
|
2470
|
-
/* @__PURE__ */ (0,
|
|
2889
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "ph-accordion__item", children: [
|
|
2890
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
|
2471
2891
|
"button",
|
|
2472
2892
|
{
|
|
2473
2893
|
type: "button",
|
|
2474
2894
|
onClick: () => toggleItem(item.id),
|
|
2475
2895
|
"aria-expanded": isOpen,
|
|
2476
2896
|
"aria-controls": contentId,
|
|
2477
|
-
className: "
|
|
2897
|
+
className: "ph-accordion__trigger",
|
|
2478
2898
|
children: [
|
|
2479
|
-
/* @__PURE__ */ (0,
|
|
2480
|
-
/* @__PURE__ */ (0,
|
|
2899
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "font-semibold text-ph-ink", children: item.title }),
|
|
2900
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2481
2901
|
IconChevronDown,
|
|
2482
2902
|
{
|
|
2483
2903
|
className: cn(
|
|
@@ -2489,7 +2909,7 @@ function Accordion({
|
|
|
2489
2909
|
]
|
|
2490
2910
|
}
|
|
2491
2911
|
),
|
|
2492
|
-
/* @__PURE__ */ (0,
|
|
2912
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2493
2913
|
"div",
|
|
2494
2914
|
{
|
|
2495
2915
|
id: contentId,
|
|
@@ -2498,10 +2918,10 @@ function Accordion({
|
|
|
2498
2918
|
if (node) node.toggleAttribute("inert", !isOpen);
|
|
2499
2919
|
},
|
|
2500
2920
|
className: cn(
|
|
2501
|
-
"grid transition-
|
|
2921
|
+
"grid transition-[grid-template-rows] duration-200",
|
|
2502
2922
|
isOpen ? "grid-rows-[1fr]" : "grid-rows-[0fr]"
|
|
2503
2923
|
),
|
|
2504
|
-
children: /* @__PURE__ */ (0,
|
|
2924
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "px-5 pb-4 text-ph-subtle", children: item.content }) })
|
|
2505
2925
|
}
|
|
2506
2926
|
)
|
|
2507
2927
|
] }, item.id);
|
|
@@ -2511,27 +2931,68 @@ function Accordion({
|
|
|
2511
2931
|
}
|
|
2512
2932
|
|
|
2513
2933
|
// src/components/ui/SegmentedControl.tsx
|
|
2514
|
-
var
|
|
2515
|
-
|
|
2516
|
-
|
|
2934
|
+
var import_react18 = require("react");
|
|
2935
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
2936
|
+
function SegmentedControl({
|
|
2937
|
+
options,
|
|
2938
|
+
value,
|
|
2939
|
+
onChange,
|
|
2940
|
+
className,
|
|
2941
|
+
"aria-label": ariaLabel
|
|
2942
|
+
}) {
|
|
2943
|
+
const itemRefs = (0, import_react18.useRef)([]);
|
|
2944
|
+
const selectedIndex = options.findIndex((option) => option.value === value);
|
|
2945
|
+
const handleKeyDown = (event, index) => {
|
|
2946
|
+
var _a;
|
|
2947
|
+
let nextIndex;
|
|
2948
|
+
switch (event.key) {
|
|
2949
|
+
case "ArrowLeft":
|
|
2950
|
+
case "ArrowUp":
|
|
2951
|
+
nextIndex = (index - 1 + options.length) % options.length;
|
|
2952
|
+
break;
|
|
2953
|
+
case "ArrowRight":
|
|
2954
|
+
case "ArrowDown":
|
|
2955
|
+
nextIndex = (index + 1) % options.length;
|
|
2956
|
+
break;
|
|
2957
|
+
case "Home":
|
|
2958
|
+
nextIndex = 0;
|
|
2959
|
+
break;
|
|
2960
|
+
case "End":
|
|
2961
|
+
nextIndex = options.length - 1;
|
|
2962
|
+
break;
|
|
2963
|
+
default:
|
|
2964
|
+
return;
|
|
2965
|
+
}
|
|
2966
|
+
event.preventDefault();
|
|
2967
|
+
const nextOption = options[nextIndex];
|
|
2968
|
+
if (!nextOption) return;
|
|
2969
|
+
onChange(nextOption.value);
|
|
2970
|
+
(_a = itemRefs.current[nextIndex]) == null ? void 0 : _a.focus();
|
|
2971
|
+
};
|
|
2972
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
2517
2973
|
"div",
|
|
2518
2974
|
{
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
),
|
|
2523
|
-
children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
2975
|
+
role: "radiogroup",
|
|
2976
|
+
"aria-label": ariaLabel,
|
|
2977
|
+
className: cn("ph-segmented-control", className),
|
|
2978
|
+
children: options.map((option, index) => /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
|
|
2524
2979
|
"button",
|
|
2525
2980
|
{
|
|
2981
|
+
ref: (node) => {
|
|
2982
|
+
itemRefs.current[index] = node;
|
|
2983
|
+
},
|
|
2526
2984
|
type: "button",
|
|
2527
|
-
"
|
|
2985
|
+
role: "radio",
|
|
2986
|
+
"aria-checked": value === option.value,
|
|
2987
|
+
tabIndex: selectedIndex === index || selectedIndex < 0 && index === 0 ? 0 : -1,
|
|
2528
2988
|
onClick: () => onChange(option.value),
|
|
2989
|
+
onKeyDown: (event) => handleKeyDown(event, index),
|
|
2529
2990
|
className: cn(
|
|
2530
|
-
"
|
|
2531
|
-
value === option.value
|
|
2991
|
+
"ph-segmented-control__item",
|
|
2992
|
+
value === option.value && "ph-segmented-control__item--selected"
|
|
2532
2993
|
),
|
|
2533
2994
|
children: [
|
|
2534
|
-
option.icon && /* @__PURE__ */ (0,
|
|
2995
|
+
option.icon && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "h-4 w-4", "aria-hidden": true, children: option.icon }),
|
|
2535
2996
|
option.label
|
|
2536
2997
|
]
|
|
2537
2998
|
},
|
|
@@ -2542,9 +3003,9 @@ function SegmentedControl({ options, value, onChange, className }) {
|
|
|
2542
3003
|
}
|
|
2543
3004
|
|
|
2544
3005
|
// src/components/ui/CommandPalette.tsx
|
|
2545
|
-
var
|
|
3006
|
+
var import_react19 = require("react");
|
|
2546
3007
|
var Dialog2 = __toESM(require("@radix-ui/react-dialog"));
|
|
2547
|
-
var
|
|
3008
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
2548
3009
|
function CommandPalette({
|
|
2549
3010
|
items,
|
|
2550
3011
|
isOpen,
|
|
@@ -2556,27 +3017,27 @@ function CommandPalette({
|
|
|
2556
3017
|
inputId,
|
|
2557
3018
|
inputDataTest
|
|
2558
3019
|
}) {
|
|
2559
|
-
const [query, setQuery] = (0,
|
|
2560
|
-
const [selectedIndex, setSelectedIndex] = (0,
|
|
2561
|
-
const inputRef = (0,
|
|
2562
|
-
const listboxRef = (0,
|
|
2563
|
-
const restoreFocusRef = (0,
|
|
2564
|
-
const generatedId = (0,
|
|
3020
|
+
const [query, setQuery] = (0, import_react19.useState)("");
|
|
3021
|
+
const [selectedIndex, setSelectedIndex] = (0, import_react19.useState)(0);
|
|
3022
|
+
const inputRef = (0, import_react19.useRef)(null);
|
|
3023
|
+
const listboxRef = (0, import_react19.useRef)(null);
|
|
3024
|
+
const restoreFocusRef = (0, import_react19.useRef)(null);
|
|
3025
|
+
const generatedId = (0, import_react19.useId)();
|
|
2565
3026
|
const listboxId = `${id != null ? id : `command-palette-${generatedId}`}-listbox`;
|
|
2566
3027
|
const filtered = items.filter(
|
|
2567
3028
|
(item) => item.label.toLowerCase().includes(query.toLowerCase())
|
|
2568
3029
|
);
|
|
2569
3030
|
const activeIndex = filtered.length ? Math.min(selectedIndex, filtered.length - 1) : 0;
|
|
2570
3031
|
const activeItem = filtered[activeIndex];
|
|
2571
|
-
(0,
|
|
3032
|
+
(0, import_react19.useEffect)(() => {
|
|
2572
3033
|
if (!isOpen) return;
|
|
2573
3034
|
setQuery("");
|
|
2574
3035
|
setSelectedIndex(0);
|
|
2575
3036
|
}, [isOpen]);
|
|
2576
|
-
(0,
|
|
3037
|
+
(0, import_react19.useEffect)(() => {
|
|
2577
3038
|
setSelectedIndex((current) => Math.min(current, Math.max(filtered.length - 1, 0)));
|
|
2578
3039
|
}, [filtered.length]);
|
|
2579
|
-
(0,
|
|
3040
|
+
(0, import_react19.useEffect)(() => {
|
|
2580
3041
|
var _a, _b;
|
|
2581
3042
|
if (!isOpen || !activeItem) return;
|
|
2582
3043
|
(_b = (_a = listboxRef.current) == null ? void 0 : _a.querySelectorAll('[role="option"]')[activeIndex]) == null ? void 0 : _b.scrollIntoView({ block: "nearest" });
|
|
@@ -2605,29 +3066,26 @@ function CommandPalette({
|
|
|
2605
3066
|
return;
|
|
2606
3067
|
}
|
|
2607
3068
|
};
|
|
2608
|
-
return /* @__PURE__ */ (0,
|
|
3069
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2609
3070
|
Dialog2.Root,
|
|
2610
3071
|
{
|
|
2611
3072
|
open: isOpen,
|
|
2612
3073
|
onOpenChange: (nextOpen) => {
|
|
2613
3074
|
if (!nextOpen) onClose();
|
|
2614
3075
|
},
|
|
2615
|
-
children: /* @__PURE__ */ (0,
|
|
2616
|
-
/* @__PURE__ */ (0,
|
|
3076
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(Dialog2.Portal, { children: [
|
|
3077
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2617
3078
|
Dialog2.Overlay,
|
|
2618
3079
|
{
|
|
2619
3080
|
id,
|
|
2620
3081
|
"data-test": dataTest,
|
|
2621
|
-
className: "
|
|
3082
|
+
className: "ph-command-palette__overlay"
|
|
2622
3083
|
}
|
|
2623
3084
|
),
|
|
2624
|
-
/* @__PURE__ */ (0,
|
|
3085
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
2625
3086
|
Dialog2.Content,
|
|
2626
3087
|
{
|
|
2627
|
-
className: cn(
|
|
2628
|
-
"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",
|
|
2629
|
-
className
|
|
2630
|
-
),
|
|
3088
|
+
className: cn("ph-command-palette", className),
|
|
2631
3089
|
onOpenAutoFocus: (event) => {
|
|
2632
3090
|
var _a;
|
|
2633
3091
|
restoreFocusRef.current = document.activeElement instanceof HTMLElement ? document.activeElement : null;
|
|
@@ -2640,10 +3098,10 @@ function CommandPalette({
|
|
|
2640
3098
|
(_a = restoreFocusRef.current) == null ? void 0 : _a.focus();
|
|
2641
3099
|
},
|
|
2642
3100
|
children: [
|
|
2643
|
-
/* @__PURE__ */ (0,
|
|
2644
|
-
/* @__PURE__ */ (0,
|
|
2645
|
-
/* @__PURE__ */ (0,
|
|
2646
|
-
/* @__PURE__ */ (0,
|
|
3101
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Dialog2.Title, { className: "sr-only", children: "Command palette" }),
|
|
3102
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "ph-command-palette__search", children: [
|
|
3103
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(IconSearch, { className: "h-5 w-5 text-ph-mutedtext" }),
|
|
3104
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2647
3105
|
"input",
|
|
2648
3106
|
{
|
|
2649
3107
|
ref: inputRef,
|
|
@@ -2666,9 +3124,9 @@ function CommandPalette({
|
|
|
2666
3124
|
className: "flex-1 bg-transparent text-ph-ink outline-none placeholder:text-ph-mutedtext"
|
|
2667
3125
|
}
|
|
2668
3126
|
),
|
|
2669
|
-
/* @__PURE__ */ (0,
|
|
3127
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("kbd", { "aria-hidden": "true", className: "ph-keycap", children: "ESC" })
|
|
2670
3128
|
] }),
|
|
2671
|
-
/* @__PURE__ */ (0,
|
|
3129
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { ref: listboxRef, id: listboxId, role: "listbox", "aria-label": "Commands", className: "max-h-[50vh] overflow-y-auto py-2", children: filtered.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { role: "status", className: "px-4 py-8 text-center text-sm text-ph-mutedtext", children: "No results found." }) : filtered.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
|
|
2672
3130
|
"div",
|
|
2673
3131
|
{
|
|
2674
3132
|
id: `command-${item.id}`,
|
|
@@ -2681,13 +3139,13 @@ function CommandPalette({
|
|
|
2681
3139
|
},
|
|
2682
3140
|
onMouseEnter: () => setSelectedIndex(index),
|
|
2683
3141
|
className: cn(
|
|
2684
|
-
"
|
|
2685
|
-
index === activeIndex ? "
|
|
3142
|
+
"ph-command-palette__option",
|
|
3143
|
+
index === activeIndex ? "ph-command-palette__option--selected" : "text-ph-subtle"
|
|
2686
3144
|
),
|
|
2687
3145
|
children: [
|
|
2688
|
-
item.icon && /* @__PURE__ */ (0,
|
|
2689
|
-
/* @__PURE__ */ (0,
|
|
2690
|
-
item.shortcut && /* @__PURE__ */ (0,
|
|
3146
|
+
item.icon && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { "aria-hidden": "true", className: "h-5 w-5", children: item.icon }),
|
|
3147
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: "flex-1", children: item.label }),
|
|
3148
|
+
item.shortcut && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("kbd", { "aria-hidden": "true", className: "ph-keycap text-ph-mutedtext", children: item.shortcut })
|
|
2691
3149
|
]
|
|
2692
3150
|
},
|
|
2693
3151
|
item.id
|
|
@@ -2701,8 +3159,8 @@ function CommandPalette({
|
|
|
2701
3159
|
}
|
|
2702
3160
|
|
|
2703
3161
|
// src/components/ui/Calendar.tsx
|
|
2704
|
-
var
|
|
2705
|
-
var
|
|
3162
|
+
var import_react20 = require("react");
|
|
3163
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
2706
3164
|
var monthNames = [
|
|
2707
3165
|
"January",
|
|
2708
3166
|
"February",
|
|
@@ -2759,19 +3217,19 @@ function dateLabel(date) {
|
|
|
2759
3217
|
return `${fullWeekDays[date.getDay()]}, ${date.getDate()} ${monthNames[date.getMonth()]} ${date.getFullYear()}`;
|
|
2760
3218
|
}
|
|
2761
3219
|
function Calendar({ value, onChange, className }) {
|
|
2762
|
-
const [currentMonth, setCurrentMonth] = (0,
|
|
2763
|
-
const [focusedDate, setFocusedDate] = (0,
|
|
2764
|
-
const gridRef = (0,
|
|
2765
|
-
const shouldFocusDateRef = (0,
|
|
2766
|
-
const monthLabelId = (0,
|
|
3220
|
+
const [currentMonth, setCurrentMonth] = (0, import_react20.useState)(() => startOfMonth(value != null ? value : /* @__PURE__ */ new Date()));
|
|
3221
|
+
const [focusedDate, setFocusedDate] = (0, import_react20.useState)(() => startOfDay(value != null ? value : /* @__PURE__ */ new Date()));
|
|
3222
|
+
const gridRef = (0, import_react20.useRef)(null);
|
|
3223
|
+
const shouldFocusDateRef = (0, import_react20.useRef)(false);
|
|
3224
|
+
const monthLabelId = (0, import_react20.useId)();
|
|
2767
3225
|
const today = startOfDay(/* @__PURE__ */ new Date());
|
|
2768
|
-
(0,
|
|
3226
|
+
(0, import_react20.useEffect)(() => {
|
|
2769
3227
|
if (!value) return;
|
|
2770
3228
|
const nextDate = startOfDay(value);
|
|
2771
3229
|
setCurrentMonth(startOfMonth(nextDate));
|
|
2772
3230
|
setFocusedDate(nextDate);
|
|
2773
3231
|
}, [value]);
|
|
2774
|
-
(0,
|
|
3232
|
+
(0, import_react20.useEffect)(() => {
|
|
2775
3233
|
var _a, _b;
|
|
2776
3234
|
if (!shouldFocusDateRef.current) return;
|
|
2777
3235
|
(_b = (_a = gridRef.current) == null ? void 0 : _a.querySelector(`[data-date="${dateKey(focusedDate)}"]`)) == null ? void 0 : _b.focus();
|
|
@@ -2840,36 +3298,36 @@ function Calendar({ value, onChange, className }) {
|
|
|
2840
3298
|
while (days.length < 42) {
|
|
2841
3299
|
days.push(null);
|
|
2842
3300
|
}
|
|
2843
|
-
return /* @__PURE__ */ (0,
|
|
2844
|
-
/* @__PURE__ */ (0,
|
|
2845
|
-
/* @__PURE__ */ (0,
|
|
3301
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: cn("ph-calendar w-[280px] p-4", className), children: [
|
|
3302
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "mb-4 flex items-center justify-between", children: [
|
|
3303
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2846
3304
|
"button",
|
|
2847
3305
|
{
|
|
2848
3306
|
type: "button",
|
|
2849
3307
|
onClick: () => changeMonth(-1),
|
|
2850
3308
|
"aria-label": "Previous month",
|
|
2851
|
-
className: "
|
|
2852
|
-
children: /* @__PURE__ */ (0,
|
|
3309
|
+
className: "ph-calendar__nav",
|
|
3310
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(IconChevronLeft, { className: "h-5 w-5", "aria-hidden": true })
|
|
2853
3311
|
}
|
|
2854
3312
|
),
|
|
2855
|
-
/* @__PURE__ */ (0,
|
|
3313
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("span", { id: monthLabelId, "aria-live": "polite", className: "text-sm font-semibold text-ph-ink", children: [
|
|
2856
3314
|
monthNames[month],
|
|
2857
3315
|
" ",
|
|
2858
3316
|
year
|
|
2859
3317
|
] }),
|
|
2860
|
-
/* @__PURE__ */ (0,
|
|
3318
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2861
3319
|
"button",
|
|
2862
3320
|
{
|
|
2863
3321
|
type: "button",
|
|
2864
3322
|
onClick: () => changeMonth(1),
|
|
2865
3323
|
"aria-label": "Next month",
|
|
2866
|
-
className: "
|
|
2867
|
-
children: /* @__PURE__ */ (0,
|
|
3324
|
+
className: "ph-calendar__nav",
|
|
3325
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(IconChevronRight, { className: "h-5 w-5", "aria-hidden": true })
|
|
2868
3326
|
}
|
|
2869
3327
|
)
|
|
2870
3328
|
] }),
|
|
2871
|
-
/* @__PURE__ */ (0,
|
|
2872
|
-
/* @__PURE__ */ (0,
|
|
3329
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { ref: gridRef, role: "grid", "aria-labelledby": monthLabelId, children: [
|
|
3330
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { role: "row", className: "grid grid-cols-7 gap-1", children: weekDays.map((day, index) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2873
3331
|
"div",
|
|
2874
3332
|
{
|
|
2875
3333
|
role: "columnheader",
|
|
@@ -2882,14 +3340,14 @@ function Calendar({ value, onChange, className }) {
|
|
|
2882
3340
|
Array.from({ length: 6 }, (_, week) => {
|
|
2883
3341
|
const weekDates = days.slice(week * 7, week * 7 + 7);
|
|
2884
3342
|
if (weekDates.length === 0 || weekDates.every((date) => !date)) return null;
|
|
2885
|
-
return /* @__PURE__ */ (0,
|
|
2886
|
-
(date, day) => date ? /* @__PURE__ */ (0,
|
|
3343
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { role: "row", className: "grid grid-cols-7 gap-1", children: weekDates.map(
|
|
3344
|
+
(date, day) => date ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2887
3345
|
"div",
|
|
2888
3346
|
{
|
|
2889
3347
|
role: "gridcell",
|
|
2890
3348
|
"aria-selected": value ? isSameDay(value, date) : false,
|
|
2891
3349
|
className: "aspect-square",
|
|
2892
|
-
children: /* @__PURE__ */ (0,
|
|
3350
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2893
3351
|
"button",
|
|
2894
3352
|
{
|
|
2895
3353
|
type: "button",
|
|
@@ -2900,15 +3358,15 @@ function Calendar({ value, onChange, className }) {
|
|
|
2900
3358
|
onClick: () => handleSelect(date),
|
|
2901
3359
|
onKeyDown: (event) => handleDayKeyDown(event, date),
|
|
2902
3360
|
className: cn(
|
|
2903
|
-
"
|
|
2904
|
-
value && isSameDay(value, date) ? "
|
|
3361
|
+
"ph-calendar__day",
|
|
3362
|
+
value && isSameDay(value, date) ? "ph-calendar__day--selected" : isSameDay(today, date) ? "ph-calendar__day--today" : void 0
|
|
2905
3363
|
),
|
|
2906
3364
|
children: date.getDate()
|
|
2907
3365
|
}
|
|
2908
3366
|
)
|
|
2909
3367
|
},
|
|
2910
3368
|
dateKey(date)
|
|
2911
|
-
) : /* @__PURE__ */ (0,
|
|
3369
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { role: "gridcell", "aria-hidden": "true", className: "aspect-square" }, `empty-${week}-${day}`)
|
|
2912
3370
|
) }, week);
|
|
2913
3371
|
})
|
|
2914
3372
|
] })
|
|
@@ -2916,15 +3374,15 @@ function Calendar({ value, onChange, className }) {
|
|
|
2916
3374
|
}
|
|
2917
3375
|
|
|
2918
3376
|
// src/components/ui/Tooltip.tsx
|
|
2919
|
-
var
|
|
3377
|
+
var import_react21 = require("react");
|
|
2920
3378
|
var import_react_dom = require("react-dom");
|
|
2921
|
-
var
|
|
2922
|
-
var TooltipDelayContext = (0,
|
|
3379
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
3380
|
+
var TooltipDelayContext = (0, import_react21.createContext)(0);
|
|
2923
3381
|
function TooltipProvider({
|
|
2924
3382
|
children,
|
|
2925
3383
|
delayDuration = 0
|
|
2926
3384
|
}) {
|
|
2927
|
-
return /* @__PURE__ */ (0,
|
|
3385
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(TooltipDelayContext.Provider, { value: delayDuration, children });
|
|
2928
3386
|
}
|
|
2929
3387
|
function tooltipPosition(trigger, content, side, align, offset, collisionPadding) {
|
|
2930
3388
|
const horizontal = align === "start" ? trigger.left : align === "end" ? trigger.right : trigger.left + trigger.width / 2;
|
|
@@ -2951,13 +3409,13 @@ function Tooltip({
|
|
|
2951
3409
|
delayDuration,
|
|
2952
3410
|
disableHoverableContent = false
|
|
2953
3411
|
}) {
|
|
2954
|
-
const providerDelay = (0,
|
|
2955
|
-
const generatedId = (0,
|
|
2956
|
-
const triggerRef = (0,
|
|
2957
|
-
const contentRef = (0,
|
|
2958
|
-
const timerRef = (0,
|
|
2959
|
-
const [internalOpen, setInternalOpen] = (0,
|
|
2960
|
-
const [position, setPosition] = (0,
|
|
3412
|
+
const providerDelay = (0, import_react21.useContext)(TooltipDelayContext);
|
|
3413
|
+
const generatedId = (0, import_react21.useId)().replace(/:/g, "");
|
|
3414
|
+
const triggerRef = (0, import_react21.useRef)(null);
|
|
3415
|
+
const contentRef = (0, import_react21.useRef)(null);
|
|
3416
|
+
const timerRef = (0, import_react21.useRef)(null);
|
|
3417
|
+
const [internalOpen, setInternalOpen] = (0, import_react21.useState)(defaultOpen);
|
|
3418
|
+
const [position, setPosition] = (0, import_react21.useState)(null);
|
|
2961
3419
|
const isOpen = open != null ? open : internalOpen;
|
|
2962
3420
|
const triggerId = children.props.id;
|
|
2963
3421
|
const tooltipId = triggerId ? `${triggerId}-tooltip` : `ph-tooltip-${generatedId}`;
|
|
@@ -2969,7 +3427,7 @@ function Tooltip({
|
|
|
2969
3427
|
if (timerRef.current) clearTimeout(timerRef.current);
|
|
2970
3428
|
timerRef.current = null;
|
|
2971
3429
|
}
|
|
2972
|
-
const updatePosition = (0,
|
|
3430
|
+
const updatePosition = (0, import_react21.useCallback)(() => {
|
|
2973
3431
|
if (!triggerRef.current || !contentRef.current) return;
|
|
2974
3432
|
setPosition(
|
|
2975
3433
|
tooltipPosition(
|
|
@@ -3001,10 +3459,10 @@ function Tooltip({
|
|
|
3001
3459
|
clearTimer();
|
|
3002
3460
|
timerRef.current = setTimeout(() => setOpen(false), 100);
|
|
3003
3461
|
}
|
|
3004
|
-
(0,
|
|
3462
|
+
(0, import_react21.useLayoutEffect)(() => {
|
|
3005
3463
|
if (isOpen) updatePosition();
|
|
3006
3464
|
}, [isOpen, updatePosition]);
|
|
3007
|
-
(0,
|
|
3465
|
+
(0, import_react21.useEffect)(() => {
|
|
3008
3466
|
if (!isOpen) return;
|
|
3009
3467
|
const reposition = () => updatePosition();
|
|
3010
3468
|
window.addEventListener("resize", reposition);
|
|
@@ -3014,11 +3472,11 @@ function Tooltip({
|
|
|
3014
3472
|
window.removeEventListener("scroll", reposition, true);
|
|
3015
3473
|
};
|
|
3016
3474
|
}, [isOpen, updatePosition]);
|
|
3017
|
-
(0,
|
|
3475
|
+
(0, import_react21.useEffect)(() => () => clearTimer(), []);
|
|
3018
3476
|
const describedBy = [children.props["aria-describedby"], tooltipId].filter(Boolean).join(" ");
|
|
3019
|
-
const trigger = (0,
|
|
3020
|
-
return /* @__PURE__ */ (0,
|
|
3021
|
-
/* @__PURE__ */ (0,
|
|
3477
|
+
const trigger = (0, import_react21.cloneElement)(children, { "aria-describedby": describedBy });
|
|
3478
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_jsx_runtime28.Fragment, { children: [
|
|
3479
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
3022
3480
|
"span",
|
|
3023
3481
|
{
|
|
3024
3482
|
ref: triggerRef,
|
|
@@ -3034,12 +3492,12 @@ function Tooltip({
|
|
|
3034
3492
|
}
|
|
3035
3493
|
),
|
|
3036
3494
|
isOpen && typeof document !== "undefined" ? (0, import_react_dom.createPortal)(
|
|
3037
|
-
/* @__PURE__ */ (0,
|
|
3495
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
3038
3496
|
"span",
|
|
3039
3497
|
{
|
|
3040
3498
|
style: __spreadProps(__spreadValues({ position: "fixed" }, position), { visibility: position ? void 0 : "hidden" }),
|
|
3041
3499
|
className: "pointer-events-none z-[200]",
|
|
3042
|
-
children: /* @__PURE__ */ (0,
|
|
3500
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
3043
3501
|
"span",
|
|
3044
3502
|
{
|
|
3045
3503
|
ref: contentRef,
|
|
@@ -3064,27 +3522,27 @@ function Tooltip({
|
|
|
3064
3522
|
}
|
|
3065
3523
|
|
|
3066
3524
|
// src/components/ui/EmptyState.tsx
|
|
3067
|
-
var
|
|
3525
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
3068
3526
|
function EmptyState({ icon, title, description, action, className }) {
|
|
3069
|
-
return /* @__PURE__ */ (0,
|
|
3527
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
|
3070
3528
|
"div",
|
|
3071
3529
|
{
|
|
3072
3530
|
className: cn(
|
|
3073
|
-
"
|
|
3531
|
+
"ph-empty-state",
|
|
3074
3532
|
className
|
|
3075
3533
|
),
|
|
3076
3534
|
children: [
|
|
3077
|
-
icon && /* @__PURE__ */ (0,
|
|
3078
|
-
/* @__PURE__ */ (0,
|
|
3079
|
-
description && /* @__PURE__ */ (0,
|
|
3080
|
-
action && /* @__PURE__ */ (0,
|
|
3535
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "ph-empty-state__icon", children: icon }),
|
|
3536
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)("h2", { className: "text-base font-semibold text-ph-ink", children: title }),
|
|
3537
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { className: "mt-1 max-w-sm text-sm text-ph-subtle", children: description }),
|
|
3538
|
+
action && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: "mt-4", children: action })
|
|
3081
3539
|
]
|
|
3082
3540
|
}
|
|
3083
3541
|
);
|
|
3084
3542
|
}
|
|
3085
3543
|
|
|
3086
3544
|
// src/components/ui/FilterChips.tsx
|
|
3087
|
-
var
|
|
3545
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
3088
3546
|
function FilterChips({
|
|
3089
3547
|
chips,
|
|
3090
3548
|
onToggle,
|
|
@@ -3092,20 +3550,20 @@ function FilterChips({
|
|
|
3092
3550
|
className,
|
|
3093
3551
|
"aria-label": ariaLabel = "Applied filters"
|
|
3094
3552
|
}) {
|
|
3095
|
-
return /* @__PURE__ */ (0,
|
|
3553
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { className: cn("ph-filter-chips", className), role: "group", "aria-label": ariaLabel, children: chips.map((chip) => {
|
|
3096
3554
|
var _a;
|
|
3097
3555
|
const label = (_a = chip.removeLabel) != null ? _a : getChipText(chip);
|
|
3098
|
-
const content = /* @__PURE__ */ (0,
|
|
3099
|
-
/* @__PURE__ */ (0,
|
|
3100
|
-
chip.value != null ? /* @__PURE__ */ (0,
|
|
3556
|
+
const content = /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_jsx_runtime30.Fragment, { children: [
|
|
3557
|
+
/* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "ph-filter-chip__label", children: chip.label }),
|
|
3558
|
+
chip.value != null ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "ph-filter-chip__value", children: chip.value }) : null
|
|
3101
3559
|
] });
|
|
3102
|
-
return /* @__PURE__ */ (0,
|
|
3560
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
3103
3561
|
"span",
|
|
3104
3562
|
{
|
|
3105
3563
|
className: cn("ph-filter-chip", chip.active && "ph-filter-chip--active"),
|
|
3106
3564
|
"data-state": chip.active ? "on" : "off",
|
|
3107
3565
|
children: [
|
|
3108
|
-
onToggle ? /* @__PURE__ */ (0,
|
|
3566
|
+
onToggle ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
3109
3567
|
"button",
|
|
3110
3568
|
{
|
|
3111
3569
|
type: "button",
|
|
@@ -3114,15 +3572,15 @@ function FilterChips({
|
|
|
3114
3572
|
onClick: () => onToggle(chip.id),
|
|
3115
3573
|
children: content
|
|
3116
3574
|
}
|
|
3117
|
-
) : /* @__PURE__ */ (0,
|
|
3118
|
-
chip.active && onRemove ? /* @__PURE__ */ (0,
|
|
3575
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "ph-filter-chip__main", children: content }),
|
|
3576
|
+
chip.active && onRemove ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
3119
3577
|
"button",
|
|
3120
3578
|
{
|
|
3121
3579
|
type: "button",
|
|
3122
3580
|
className: "ph-filter-chip__remove",
|
|
3123
3581
|
"aria-label": `Remove ${label} filter`,
|
|
3124
3582
|
onClick: () => onRemove(chip.id),
|
|
3125
|
-
children: /* @__PURE__ */ (0,
|
|
3583
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(IconClose, { className: "h-3 w-3", "aria-hidden": true })
|
|
3126
3584
|
}
|
|
3127
3585
|
) : null
|
|
3128
3586
|
]
|
|
@@ -3138,7 +3596,7 @@ function getChipText(chip) {
|
|
|
3138
3596
|
}
|
|
3139
3597
|
|
|
3140
3598
|
// src/components/ui/FilterBar.tsx
|
|
3141
|
-
var
|
|
3599
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
3142
3600
|
function FilterBar(_a) {
|
|
3143
3601
|
var _b = _a, {
|
|
3144
3602
|
children,
|
|
@@ -3155,12 +3613,12 @@ function FilterBar(_a) {
|
|
|
3155
3613
|
"resultCount",
|
|
3156
3614
|
"className"
|
|
3157
3615
|
]);
|
|
3158
|
-
return /* @__PURE__ */ (0,
|
|
3159
|
-
/* @__PURE__ */ (0,
|
|
3616
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", __spreadProps(__spreadValues({ className: cn("ph-filter-bar", className) }, props), { children: [
|
|
3617
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "ph-filter-bar__controls", role: "group", "aria-label": label, children: [
|
|
3160
3618
|
children,
|
|
3161
|
-
onClear ? /* @__PURE__ */ (0,
|
|
3619
|
+
onClear ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("button", { type: "button", className: "ph-filter-bar__clear", onClick: onClear, children: clearLabel }) : null
|
|
3162
3620
|
] }),
|
|
3163
|
-
resultCount != null ? /* @__PURE__ */ (0,
|
|
3621
|
+
resultCount != null ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("output", { className: "ph-filter-bar__results", "aria-live": "polite", children: resultCount }) : null
|
|
3164
3622
|
] }));
|
|
3165
3623
|
}
|
|
3166
3624
|
function FilterMenu({
|
|
@@ -3177,19 +3635,19 @@ function FilterMenu({
|
|
|
3177
3635
|
const selected = options.find((option) => option.value === value);
|
|
3178
3636
|
const displayValue = (_a = selected == null ? void 0 : selected.label) != null ? _a : placeholder;
|
|
3179
3637
|
const accessibleValue = selected ? getOptionText(selected) : String(placeholder);
|
|
3180
|
-
return /* @__PURE__ */ (0,
|
|
3638
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
3181
3639
|
DropdownMenu,
|
|
3182
3640
|
{
|
|
3183
3641
|
"aria-label": `${label}: ${accessibleValue}`,
|
|
3184
3642
|
align,
|
|
3185
3643
|
disabled,
|
|
3186
3644
|
className,
|
|
3187
|
-
trigger: /* @__PURE__ */ (0,
|
|
3188
|
-
/* @__PURE__ */ (0,
|
|
3189
|
-
/* @__PURE__ */ (0,
|
|
3190
|
-
/* @__PURE__ */ (0,
|
|
3645
|
+
trigger: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("span", { className: cn("ph-filter-menu-trigger", selected && "ph-filter-menu-trigger--active"), children: [
|
|
3646
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(IconTuning, { className: "h-3.5 w-3.5", "aria-hidden": true }),
|
|
3647
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "ph-filter-menu-trigger__label", children: label }),
|
|
3648
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "ph-filter-menu-trigger__value", children: displayValue })
|
|
3191
3649
|
] }),
|
|
3192
|
-
children: /* @__PURE__ */ (0,
|
|
3650
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(DropdownRadioGroup, { value, onValueChange, children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
3193
3651
|
DropdownRadioItem,
|
|
3194
3652
|
{
|
|
3195
3653
|
value: option.value,
|
|
@@ -3213,25 +3671,25 @@ function SortMenu({
|
|
|
3213
3671
|
className
|
|
3214
3672
|
}) {
|
|
3215
3673
|
const selected = options.find((option) => option.value === value);
|
|
3216
|
-
return /* @__PURE__ */ (0,
|
|
3674
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
3217
3675
|
DropdownMenu,
|
|
3218
3676
|
{
|
|
3219
3677
|
"aria-label": `${label}: ${selected ? getOptionText(selected) : "Choose sort order"}`,
|
|
3220
3678
|
align,
|
|
3221
3679
|
disabled,
|
|
3222
3680
|
className,
|
|
3223
|
-
trigger: /* @__PURE__ */ (0,
|
|
3224
|
-
/* @__PURE__ */ (0,
|
|
3681
|
+
trigger: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("span", { className: "ph-filter-menu-trigger ph-sort-menu-trigger", children: [
|
|
3682
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
3225
3683
|
IconArrowDown,
|
|
3226
3684
|
{
|
|
3227
3685
|
className: cn("h-3.5 w-3.5", direction === "ascending" && "rotate-180"),
|
|
3228
3686
|
"aria-hidden": true
|
|
3229
3687
|
}
|
|
3230
3688
|
),
|
|
3231
|
-
/* @__PURE__ */ (0,
|
|
3232
|
-
selected ? /* @__PURE__ */ (0,
|
|
3689
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "ph-filter-menu-trigger__label", children: label }),
|
|
3690
|
+
selected ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "ph-filter-menu-trigger__value", children: selected.label }) : null
|
|
3233
3691
|
] }),
|
|
3234
|
-
children: /* @__PURE__ */ (0,
|
|
3692
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(DropdownRadioGroup, { value, onValueChange, children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
3235
3693
|
DropdownRadioItem,
|
|
3236
3694
|
{
|
|
3237
3695
|
value: option.value,
|
|
@@ -3251,7 +3709,7 @@ function getOptionText(option) {
|
|
|
3251
3709
|
}
|
|
3252
3710
|
|
|
3253
3711
|
// src/components/ui/FilterControls.tsx
|
|
3254
|
-
var
|
|
3712
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
3255
3713
|
function FilterControls(_a) {
|
|
3256
3714
|
var _b = _a, {
|
|
3257
3715
|
children,
|
|
@@ -3267,71 +3725,64 @@ function FilterControls(_a) {
|
|
|
3267
3725
|
"className"
|
|
3268
3726
|
]);
|
|
3269
3727
|
const hasChips = Boolean(chipsProps == null ? void 0 : chipsProps.chips.length);
|
|
3270
|
-
return /* @__PURE__ */ (0,
|
|
3271
|
-
/* @__PURE__ */ (0,
|
|
3272
|
-
hasChips && chipsProps ? /* @__PURE__ */ (0,
|
|
3728
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", __spreadProps(__spreadValues({ className: cn("ph-filter-controls", className) }, props), { children: [
|
|
3729
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(FilterBar, __spreadProps(__spreadValues({}, barProps), { children })),
|
|
3730
|
+
hasChips && chipsProps ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(FilterChips, __spreadValues({}, chipsProps)) : emptyState != null ? emptyState : null
|
|
3273
3731
|
] }));
|
|
3274
3732
|
}
|
|
3275
3733
|
|
|
3276
3734
|
// src/components/ui/CodeBlock.tsx
|
|
3277
|
-
var
|
|
3278
|
-
var
|
|
3735
|
+
var import_react22 = require("react");
|
|
3736
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
3279
3737
|
function CodeBlock({ code, language = "tsx", filename, className }) {
|
|
3280
|
-
const [copied, setCopied] = (0,
|
|
3738
|
+
const [copied, setCopied] = (0, import_react22.useState)(false);
|
|
3281
3739
|
const handleCopy = async () => {
|
|
3282
3740
|
await navigator.clipboard.writeText(code);
|
|
3283
3741
|
setCopied(true);
|
|
3284
3742
|
setTimeout(() => setCopied(false), 2e3);
|
|
3285
3743
|
};
|
|
3286
|
-
return /* @__PURE__ */ (0,
|
|
3287
|
-
(filename || language) && /* @__PURE__ */ (0,
|
|
3288
|
-
/* @__PURE__ */ (0,
|
|
3289
|
-
|
|
3290
|
-
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "h-3 w-3 rounded-full bg-red-400" }),
|
|
3291
|
-
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "h-3 w-3 rounded-full bg-amber-400" }),
|
|
3292
|
-
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "h-3 w-3 rounded-full bg-emerald-400" })
|
|
3293
|
-
] }),
|
|
3294
|
-
filename && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "ml-2 text-xs text-white/60", children: filename })
|
|
3295
|
-
] }),
|
|
3296
|
-
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
3744
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: cn("ph-code-block", className), children: [
|
|
3745
|
+
(filename || language) && /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex items-center justify-between border-b border-white/10 px-4 py-2", children: [
|
|
3746
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("span", { className: "text-xs text-white/60", children: filename != null ? filename : language }),
|
|
3747
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
3297
3748
|
"button",
|
|
3298
3749
|
{
|
|
3299
3750
|
type: "button",
|
|
3300
3751
|
onClick: handleCopy,
|
|
3301
|
-
className: "
|
|
3752
|
+
className: "ph-code-block__copy",
|
|
3302
3753
|
children: copied ? "Copied!" : "Copy"
|
|
3303
3754
|
}
|
|
3304
3755
|
)
|
|
3305
3756
|
] }),
|
|
3306
|
-
/* @__PURE__ */ (0,
|
|
3757
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("pre", { className: "overflow-x-auto p-4 text-sm leading-relaxed", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("code", { className: "font-mono text-[#e4e4e7]", children: code }) })
|
|
3307
3758
|
] });
|
|
3308
3759
|
}
|
|
3309
3760
|
|
|
3310
3761
|
// src/components/ui/ComponentDocs.tsx
|
|
3311
|
-
var
|
|
3762
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
3312
3763
|
function ComponentDocs({ title = "Props & variants", rows, defaultOpen = false, className }) {
|
|
3313
|
-
return /* @__PURE__ */ (0,
|
|
3314
|
-
/* @__PURE__ */ (0,
|
|
3315
|
-
/* @__PURE__ */ (0,
|
|
3316
|
-
/* @__PURE__ */ (0,
|
|
3317
|
-
/* @__PURE__ */ (0,
|
|
3318
|
-
/* @__PURE__ */ (0,
|
|
3764
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("details", { className: cn("ph-panel group overflow-hidden p-0", className), open: defaultOpen, children: [
|
|
3765
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("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: [
|
|
3766
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("h3", { className: "text-xs font-semibold uppercase tracking-wider text-ph-mutedtext", children: title }),
|
|
3767
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("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: [
|
|
3768
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "group-open:hidden", children: "Show" }),
|
|
3769
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "hidden group-open:inline", children: "Hide" })
|
|
3319
3770
|
] })
|
|
3320
3771
|
] }),
|
|
3321
|
-
/* @__PURE__ */ (0,
|
|
3322
|
-
/* @__PURE__ */ (0,
|
|
3323
|
-
/* @__PURE__ */ (0,
|
|
3324
|
-
/* @__PURE__ */ (0,
|
|
3325
|
-
/* @__PURE__ */ (0,
|
|
3326
|
-
/* @__PURE__ */ (0,
|
|
3772
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "overflow-x-auto border-t border-ph-border", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("table", { className: "w-full text-left text-sm", children: [
|
|
3773
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("thead", { className: "bg-ph-muted text-xs uppercase tracking-wider text-ph-mutedtext", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("tr", { children: [
|
|
3774
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("th", { className: "px-4 py-2 font-semibold", children: "Prop" }),
|
|
3775
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("th", { className: "px-4 py-2 font-semibold", children: "Type" }),
|
|
3776
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("th", { className: "px-4 py-2 font-semibold", children: "Default" }),
|
|
3777
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("th", { className: "px-4 py-2 font-semibold", children: "Use" })
|
|
3327
3778
|
] }) }),
|
|
3328
|
-
/* @__PURE__ */ (0,
|
|
3779
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("tbody", { className: "divide-y divide-ph-border", children: rows.map((row) => {
|
|
3329
3780
|
var _a, _b;
|
|
3330
|
-
return /* @__PURE__ */ (0,
|
|
3331
|
-
/* @__PURE__ */ (0,
|
|
3332
|
-
/* @__PURE__ */ (0,
|
|
3333
|
-
/* @__PURE__ */ (0,
|
|
3334
|
-
/* @__PURE__ */ (0,
|
|
3781
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("tr", { children: [
|
|
3782
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("td", { className: "px-4 py-3 align-top font-mono text-xs text-ph-ink", children: row.name }),
|
|
3783
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("td", { className: "px-4 py-3 align-top font-mono text-xs text-ph-subtle", children: row.type }),
|
|
3784
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("td", { className: "px-4 py-3 align-top font-mono text-xs text-ph-subtle", children: (_a = row.defaultValue) != null ? _a : "-" }),
|
|
3785
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("td", { className: "px-4 py-3 align-top text-ph-subtle", children: (_b = row.description) != null ? _b : /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "text-ph-mutedtext", children: "\u2014" }) })
|
|
3335
3786
|
] }, row.name);
|
|
3336
3787
|
}) })
|
|
3337
3788
|
] }) })
|
|
@@ -3339,8 +3790,8 @@ function ComponentDocs({ title = "Props & variants", rows, defaultOpen = false,
|
|
|
3339
3790
|
}
|
|
3340
3791
|
|
|
3341
3792
|
// src/components/ui/ShowcaseWrapper.tsx
|
|
3342
|
-
var
|
|
3343
|
-
var
|
|
3793
|
+
var import_react23 = require("react");
|
|
3794
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
3344
3795
|
function ShowcaseWrapper({
|
|
3345
3796
|
id,
|
|
3346
3797
|
title,
|
|
@@ -3352,32 +3803,32 @@ function ShowcaseWrapper({
|
|
|
3352
3803
|
className
|
|
3353
3804
|
}) {
|
|
3354
3805
|
var _a;
|
|
3355
|
-
const [showCode, setShowCode] = (0,
|
|
3806
|
+
const [showCode, setShowCode] = (0, import_react23.useState)(false);
|
|
3356
3807
|
const fallbackId = (_a = titleIdMap[title]) != null ? _a : title.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, "");
|
|
3357
|
-
return /* @__PURE__ */ (0,
|
|
3358
|
-
/* @__PURE__ */ (0,
|
|
3359
|
-
/* @__PURE__ */ (0,
|
|
3360
|
-
/* @__PURE__ */ (0,
|
|
3361
|
-
/* @__PURE__ */ (0,
|
|
3808
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("section", { id: id != null ? id : fallbackId, className: cn("scroll-mt-20", className), children: [
|
|
3809
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "ph-h2-rule mb-8", children: [
|
|
3810
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)("div", { className: "flex items-center gap-1.5", children: [
|
|
3811
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("h2", { children: title }),
|
|
3812
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3362
3813
|
"button",
|
|
3363
3814
|
{
|
|
3364
3815
|
type: "button",
|
|
3365
3816
|
onClick: () => setShowCode(!showCode),
|
|
3366
3817
|
className: cn(
|
|
3367
|
-
"flex h-10 w-10 items-center justify-center rounded-full border transition-
|
|
3368
|
-
showCode ? "border-ph-brand bg-ph-brand text-[var(--ph-on-accent)] shadow-
|
|
3818
|
+
"ph-showcase-toggle flex h-10 w-10 items-center justify-center rounded-full border transition-colors",
|
|
3819
|
+
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"
|
|
3369
3820
|
),
|
|
3370
3821
|
title: showCode ? "Hide code" : "Show code",
|
|
3371
3822
|
"aria-label": showCode ? "Hide code" : "Show code",
|
|
3372
|
-
children: /* @__PURE__ */ (0,
|
|
3823
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(IconCodePreview, { className: "h-5 w-5", "aria-hidden": true })
|
|
3373
3824
|
}
|
|
3374
3825
|
)
|
|
3375
3826
|
] }),
|
|
3376
|
-
/* @__PURE__ */ (0,
|
|
3827
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("hr", {})
|
|
3377
3828
|
] }),
|
|
3378
|
-
description && /* @__PURE__ */ (0,
|
|
3379
|
-
docs && /* @__PURE__ */ (0,
|
|
3380
|
-
/* @__PURE__ */ (0,
|
|
3829
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("p", { className: "mb-6 text-sm text-ph-subtle", children: description }),
|
|
3830
|
+
docs && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "mb-6", children: docs }),
|
|
3831
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
3381
3832
|
"div",
|
|
3382
3833
|
{
|
|
3383
3834
|
className: cn(
|
|
@@ -3385,15 +3836,15 @@ function ShowcaseWrapper({
|
|
|
3385
3836
|
showCode ? "lg:grid lg:grid-cols-[1fr,minmax(360px,420px)]" : "block"
|
|
3386
3837
|
),
|
|
3387
3838
|
children: [
|
|
3388
|
-
/* @__PURE__ */ (0,
|
|
3389
|
-
/* @__PURE__ */ (0,
|
|
3839
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: cn("min-w-0", showCode && "lg:pr-2"), children }),
|
|
3840
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3390
3841
|
"div",
|
|
3391
3842
|
{
|
|
3392
3843
|
className: cn(
|
|
3393
|
-
"transition-
|
|
3844
|
+
"transition-opacity duration-200",
|
|
3394
3845
|
showCode ? "block opacity-100" : "hidden opacity-0 lg:hidden"
|
|
3395
3846
|
),
|
|
3396
|
-
children: /* @__PURE__ */ (0,
|
|
3847
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "sticky top-20", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(CodeBlock, { code, filename }) })
|
|
3397
3848
|
}
|
|
3398
3849
|
)
|
|
3399
3850
|
]
|
|
@@ -3442,29 +3893,29 @@ var titleIdMap = {
|
|
|
3442
3893
|
};
|
|
3443
3894
|
|
|
3444
3895
|
// src/components/ui/CollapsibleSection.tsx
|
|
3445
|
-
var
|
|
3446
|
-
var
|
|
3896
|
+
var import_react24 = require("react");
|
|
3897
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
3447
3898
|
function CollapsibleSection({
|
|
3448
3899
|
title,
|
|
3449
3900
|
children,
|
|
3450
3901
|
defaultOpen = true,
|
|
3451
3902
|
id
|
|
3452
3903
|
}) {
|
|
3453
|
-
const [isOpen, setIsOpen] = (0,
|
|
3454
|
-
const generatedId = (0,
|
|
3904
|
+
const [isOpen, setIsOpen] = (0, import_react24.useState)(defaultOpen);
|
|
3905
|
+
const generatedId = (0, import_react24.useId)();
|
|
3455
3906
|
const contentId = `${id != null ? id : generatedId}-content`;
|
|
3456
|
-
return /* @__PURE__ */ (0,
|
|
3457
|
-
/* @__PURE__ */ (0,
|
|
3907
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("section", { id, className: "scroll-mt-20", children: [
|
|
3908
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
|
|
3458
3909
|
"button",
|
|
3459
3910
|
{
|
|
3460
3911
|
type: "button",
|
|
3461
3912
|
onClick: () => setIsOpen(!isOpen),
|
|
3462
3913
|
"aria-expanded": isOpen,
|
|
3463
3914
|
"aria-controls": contentId,
|
|
3464
|
-
className: "
|
|
3915
|
+
className: "ph-collapsible-trigger mb-6",
|
|
3465
3916
|
children: [
|
|
3466
|
-
/* @__PURE__ */ (0,
|
|
3467
|
-
/* @__PURE__ */ (0,
|
|
3917
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "text-lg font-bold text-ph-ink", children: title }),
|
|
3918
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3468
3919
|
IconChevronDown,
|
|
3469
3920
|
{
|
|
3470
3921
|
className: cn(
|
|
@@ -3477,7 +3928,7 @@ function CollapsibleSection({
|
|
|
3477
3928
|
]
|
|
3478
3929
|
}
|
|
3479
3930
|
),
|
|
3480
|
-
/* @__PURE__ */ (0,
|
|
3931
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3481
3932
|
"div",
|
|
3482
3933
|
{
|
|
3483
3934
|
id: contentId,
|
|
@@ -3486,18 +3937,18 @@ function CollapsibleSection({
|
|
|
3486
3937
|
if (node) node.toggleAttribute("inert", !isOpen);
|
|
3487
3938
|
},
|
|
3488
3939
|
className: cn(
|
|
3489
|
-
"
|
|
3490
|
-
isOpen ? "
|
|
3940
|
+
"grid transition-[grid-template-rows,opacity] duration-200",
|
|
3941
|
+
isOpen ? "grid-rows-[1fr] opacity-100" : "grid-rows-[0fr] opacity-0"
|
|
3491
3942
|
),
|
|
3492
|
-
children
|
|
3943
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "overflow-hidden", children })
|
|
3493
3944
|
}
|
|
3494
3945
|
)
|
|
3495
3946
|
] });
|
|
3496
3947
|
}
|
|
3497
3948
|
|
|
3498
3949
|
// src/components/ui/Typography.tsx
|
|
3499
|
-
var
|
|
3500
|
-
var
|
|
3950
|
+
var import_react25 = require("react");
|
|
3951
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
3501
3952
|
var toneMap2 = {
|
|
3502
3953
|
default: "text-ph-ink",
|
|
3503
3954
|
muted: "text-ph-mutedtext",
|
|
@@ -3519,65 +3970,66 @@ var weightMap = {
|
|
|
3519
3970
|
function textClass(base, tone, weight, truncate, className) {
|
|
3520
3971
|
return cn(base, toneMap2[tone], weight && weightMap[weight], truncate && "truncate", className);
|
|
3521
3972
|
}
|
|
3522
|
-
var Display = (0,
|
|
3973
|
+
var Display = (0, import_react25.forwardRef)(function Display2(_a, ref) {
|
|
3523
3974
|
var _b = _a, { children, tone = "default", weight, truncate, className } = _b, props = __objRest(_b, ["children", "tone", "weight", "truncate", "className"]);
|
|
3524
|
-
return /* @__PURE__ */ (0,
|
|
3975
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("h1", __spreadProps(__spreadValues({ ref }, props), { className: textClass("ph-hero-title", tone, weight, truncate, className), children }));
|
|
3525
3976
|
});
|
|
3526
|
-
var SectionTitle = (0,
|
|
3977
|
+
var SectionTitle = (0, import_react25.forwardRef)(function SectionTitle2(_a, ref) {
|
|
3527
3978
|
var _b = _a, { children, tone = "default", weight, truncate, className } = _b, props = __objRest(_b, ["children", "tone", "weight", "truncate", "className"]);
|
|
3528
|
-
return /* @__PURE__ */ (0,
|
|
3979
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("h2", __spreadProps(__spreadValues({ ref }, props), { className: textClass("ph-section-title", tone, weight, truncate, className), children }));
|
|
3529
3980
|
});
|
|
3530
|
-
var H1 = (0,
|
|
3981
|
+
var H1 = (0, import_react25.forwardRef)(function H12(_a, ref) {
|
|
3531
3982
|
var _b = _a, { children, tone = "default", weight, truncate, className } = _b, props = __objRest(_b, ["children", "tone", "weight", "truncate", "className"]);
|
|
3532
|
-
return /* @__PURE__ */ (0,
|
|
3983
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("h1", __spreadProps(__spreadValues({ ref }, props), { className: textClass("ph-page-title font-bold", tone, weight, truncate, className), children }));
|
|
3533
3984
|
});
|
|
3534
|
-
var H2 = (0,
|
|
3985
|
+
var H2 = (0, import_react25.forwardRef)(function H22(_a, ref) {
|
|
3535
3986
|
var _b = _a, { children, tone = "default", weight, truncate, className } = _b, props = __objRest(_b, ["children", "tone", "weight", "truncate", "className"]);
|
|
3536
|
-
return /* @__PURE__ */ (0,
|
|
3987
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("h2", __spreadProps(__spreadValues({ ref }, props), { className: textClass("text-2xl font-semibold tracking-tight", tone, weight, truncate, className), children }));
|
|
3537
3988
|
});
|
|
3538
|
-
var H3 = (0,
|
|
3989
|
+
var H3 = (0, import_react25.forwardRef)(function H32(_a, ref) {
|
|
3539
3990
|
var _b = _a, { children, tone = "default", weight, truncate, className } = _b, props = __objRest(_b, ["children", "tone", "weight", "truncate", "className"]);
|
|
3540
|
-
return /* @__PURE__ */ (0,
|
|
3991
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("h3", __spreadProps(__spreadValues({ ref }, props), { className: textClass("text-xl font-semibold", tone, weight, truncate, className), children }));
|
|
3541
3992
|
});
|
|
3542
|
-
var H4 = (0,
|
|
3993
|
+
var H4 = (0, import_react25.forwardRef)(function H42(_a, ref) {
|
|
3543
3994
|
var _b = _a, { children, tone = "default", weight, truncate, className } = _b, props = __objRest(_b, ["children", "tone", "weight", "truncate", "className"]);
|
|
3544
|
-
return /* @__PURE__ */ (0,
|
|
3995
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("h4", __spreadProps(__spreadValues({ ref }, props), { className: textClass("text-lg font-semibold", tone, weight, truncate, className), children }));
|
|
3545
3996
|
});
|
|
3546
|
-
var H5 = (0,
|
|
3997
|
+
var H5 = (0, import_react25.forwardRef)(function H52(_a, ref) {
|
|
3547
3998
|
var _b = _a, { children, tone = "default", weight, truncate, className } = _b, props = __objRest(_b, ["children", "tone", "weight", "truncate", "className"]);
|
|
3548
|
-
return /* @__PURE__ */ (0,
|
|
3999
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("h5", __spreadProps(__spreadValues({ ref }, props), { className: textClass("text-base font-semibold", tone, weight, truncate, className), children }));
|
|
3549
4000
|
});
|
|
3550
|
-
var P = (0,
|
|
4001
|
+
var P = (0, import_react25.forwardRef)(function P2(_a, ref) {
|
|
3551
4002
|
var _b = _a, { children, tone = "default", weight, truncate, className } = _b, props = __objRest(_b, ["children", "tone", "weight", "truncate", "className"]);
|
|
3552
|
-
return /* @__PURE__ */ (0,
|
|
4003
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("p", __spreadProps(__spreadValues({ ref }, props), { className: textClass("text-base leading-relaxed", tone, weight, truncate, className), children }));
|
|
3553
4004
|
});
|
|
3554
|
-
var Small = (0,
|
|
4005
|
+
var Small = (0, import_react25.forwardRef)(function Small2(_a, ref) {
|
|
3555
4006
|
var _b = _a, { children, tone = "default", weight, truncate, className } = _b, props = __objRest(_b, ["children", "tone", "weight", "truncate", "className"]);
|
|
3556
|
-
return /* @__PURE__ */ (0,
|
|
4007
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", __spreadProps(__spreadValues({ ref }, props), { className: textClass("text-sm leading-relaxed", tone, weight, truncate, className), children }));
|
|
3557
4008
|
});
|
|
3558
|
-
var Caption = (0,
|
|
4009
|
+
var Caption = (0, import_react25.forwardRef)(function Caption2(_a, ref) {
|
|
3559
4010
|
var _b = _a, { children, tone = "muted", weight, truncate, className } = _b, props = __objRest(_b, ["children", "tone", "weight", "truncate", "className"]);
|
|
3560
|
-
return /* @__PURE__ */ (0,
|
|
4011
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", __spreadProps(__spreadValues({ ref }, props), { className: textClass("text-xs font-medium", tone, weight, truncate, className), children }));
|
|
3561
4012
|
});
|
|
3562
|
-
var Overline = (0,
|
|
4013
|
+
var Overline = (0, import_react25.forwardRef)(function Overline2(_a, ref) {
|
|
3563
4014
|
var _b = _a, { children, tone = "muted", weight, truncate, className } = _b, props = __objRest(_b, ["children", "tone", "weight", "truncate", "className"]);
|
|
3564
|
-
return /* @__PURE__ */ (0,
|
|
4015
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", __spreadProps(__spreadValues({ ref }, props), { className: textClass("text-[length:var(--ph-type-overline)] font-semibold uppercase tracking-[0.08em]", tone, weight, truncate, className), children }));
|
|
3565
4016
|
});
|
|
3566
|
-
var Lead = (0,
|
|
4017
|
+
var Lead = (0, import_react25.forwardRef)(function Lead2(_a, ref) {
|
|
3567
4018
|
var _b = _a, { children, tone = "subtle", weight, truncate, className } = _b, props = __objRest(_b, ["children", "tone", "weight", "truncate", "className"]);
|
|
3568
|
-
return /* @__PURE__ */ (0,
|
|
4019
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("p", __spreadProps(__spreadValues({ ref }, props), { className: textClass("ph-lead", tone, weight, truncate, className), children }));
|
|
3569
4020
|
});
|
|
3570
|
-
var Mono = (0,
|
|
4021
|
+
var Mono = (0, import_react25.forwardRef)(function Mono2(_a, ref) {
|
|
3571
4022
|
var _b = _a, { children, tone = "default", weight, truncate, className } = _b, props = __objRest(_b, ["children", "tone", "weight", "truncate", "className"]);
|
|
3572
|
-
return /* @__PURE__ */ (0,
|
|
4023
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("code", __spreadProps(__spreadValues({ ref }, props), { className: textClass("text-sm font-mono leading-relaxed", tone, weight, truncate, className), children }));
|
|
3573
4024
|
});
|
|
3574
|
-
var Label = (0,
|
|
4025
|
+
var Label = (0, import_react25.forwardRef)(function Label2(_a, ref) {
|
|
3575
4026
|
var _b = _a, { children, tone = "default", weight, truncate, className } = _b, props = __objRest(_b, ["children", "tone", "weight", "truncate", "className"]);
|
|
3576
|
-
return /* @__PURE__ */ (0,
|
|
4027
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("label", __spreadProps(__spreadValues({ ref }, props), { className: textClass("text-sm font-medium", tone, weight, truncate, className), children }));
|
|
3577
4028
|
});
|
|
3578
4029
|
|
|
3579
4030
|
// src/components/ui/Avatar.tsx
|
|
3580
|
-
var
|
|
4031
|
+
var import_react26 = require("react");
|
|
4032
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
3581
4033
|
var sizeMap4 = {
|
|
3582
4034
|
xs: "h-8 w-8 text-[10px]",
|
|
3583
4035
|
sm: "h-10 w-10 text-xs",
|
|
@@ -3596,7 +4048,7 @@ function Avatar(_a) {
|
|
|
3596
4048
|
label,
|
|
3597
4049
|
icon,
|
|
3598
4050
|
size = "md",
|
|
3599
|
-
color = "bg-ph-brand text-
|
|
4051
|
+
color = "bg-ph-brand text-[var(--ph-on-accent)]",
|
|
3600
4052
|
status,
|
|
3601
4053
|
badge,
|
|
3602
4054
|
className
|
|
@@ -3609,19 +4061,19 @@ function Avatar(_a) {
|
|
|
3609
4061
|
"badge",
|
|
3610
4062
|
"className"
|
|
3611
4063
|
]);
|
|
3612
|
-
return /* @__PURE__ */ (0,
|
|
3613
|
-
/* @__PURE__ */ (0,
|
|
4064
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", __spreadProps(__spreadValues({ className: cn("relative inline-flex shrink-0", className) }, props), { children: [
|
|
4065
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3614
4066
|
"div",
|
|
3615
4067
|
{
|
|
3616
4068
|
className: cn(
|
|
3617
|
-
"flex items-center justify-center rounded-full border border-ph-border font-bold
|
|
4069
|
+
"ph-avatar flex items-center justify-center rounded-full border border-ph-border font-bold",
|
|
3618
4070
|
sizeMap4[size],
|
|
3619
4071
|
color
|
|
3620
4072
|
),
|
|
3621
4073
|
children: icon || label
|
|
3622
4074
|
}
|
|
3623
4075
|
),
|
|
3624
|
-
status && /* @__PURE__ */ (0,
|
|
4076
|
+
status && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3625
4077
|
"span",
|
|
3626
4078
|
{
|
|
3627
4079
|
role: "img",
|
|
@@ -3632,17 +4084,17 @@ function Avatar(_a) {
|
|
|
3632
4084
|
)
|
|
3633
4085
|
}
|
|
3634
4086
|
),
|
|
3635
|
-
badge && /* @__PURE__ */ (0,
|
|
4087
|
+
badge && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("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 })
|
|
3636
4088
|
] }));
|
|
3637
4089
|
}
|
|
3638
4090
|
function AvatarGroup(_a) {
|
|
3639
4091
|
var _b = _a, { children, max, className } = _b, props = __objRest(_b, ["children", "max", "className"]);
|
|
3640
|
-
const items =
|
|
4092
|
+
const items = import_react26.Children.toArray(children);
|
|
3641
4093
|
const visible = max ? items.slice(0, max) : items;
|
|
3642
4094
|
const remaining = max ? items.length - max : 0;
|
|
3643
|
-
return /* @__PURE__ */ (0,
|
|
4095
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", __spreadProps(__spreadValues({ className: cn("-space-x-3 flex rtl:space-x-reverse", className) }, props), { children: [
|
|
3644
4096
|
visible,
|
|
3645
|
-
remaining > 0 && /* @__PURE__ */ (0,
|
|
4097
|
+
remaining > 0 && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3646
4098
|
Avatar,
|
|
3647
4099
|
{
|
|
3648
4100
|
label: `+${remaining}`,
|
|
@@ -3654,8 +4106,8 @@ function AvatarGroup(_a) {
|
|
|
3654
4106
|
}
|
|
3655
4107
|
|
|
3656
4108
|
// src/components/ui/Progress.tsx
|
|
3657
|
-
var
|
|
3658
|
-
var
|
|
4109
|
+
var import_react27 = require("react");
|
|
4110
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
3659
4111
|
var sizeMap5 = {
|
|
3660
4112
|
sm: "h-1",
|
|
3661
4113
|
md: "h-2",
|
|
@@ -3683,19 +4135,19 @@ function Progress(_a) {
|
|
|
3683
4135
|
"aria-label",
|
|
3684
4136
|
"aria-labelledby"
|
|
3685
4137
|
]);
|
|
3686
|
-
const labelId = (0,
|
|
4138
|
+
const labelId = (0, import_react27.useId)();
|
|
3687
4139
|
const safeMax = Number.isFinite(max) && max > 0 ? max : 100;
|
|
3688
4140
|
const safeValue = Number.isFinite(value) ? Math.min(safeMax, Math.max(0, value)) : 0;
|
|
3689
4141
|
const percentage = safeValue / safeMax * 100;
|
|
3690
|
-
return /* @__PURE__ */ (0,
|
|
3691
|
-
(label || showPercentage) && /* @__PURE__ */ (0,
|
|
3692
|
-
label && /* @__PURE__ */ (0,
|
|
3693
|
-
showPercentage && /* @__PURE__ */ (0,
|
|
4142
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", __spreadProps(__spreadValues({ className: cn("w-full", className) }, props), { children: [
|
|
4143
|
+
(label || showPercentage) && /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "mb-1.5 flex justify-between text-sm text-ph-subtle", children: [
|
|
4144
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { id: labelId, children: label }),
|
|
4145
|
+
showPercentage && /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("span", { className: "tabular-nums", children: [
|
|
3694
4146
|
Math.round(percentage),
|
|
3695
4147
|
"%"
|
|
3696
4148
|
] })
|
|
3697
4149
|
] }),
|
|
3698
|
-
/* @__PURE__ */ (0,
|
|
4150
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: cn("ph-progress", sizeMap5[size]), children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
3699
4151
|
"div",
|
|
3700
4152
|
{
|
|
3701
4153
|
className: cn("ph-progress-bar", color),
|
|
@@ -3712,9 +4164,9 @@ function Progress(_a) {
|
|
|
3712
4164
|
}
|
|
3713
4165
|
|
|
3714
4166
|
// src/components/ui/Link.tsx
|
|
3715
|
-
var
|
|
3716
|
-
var
|
|
3717
|
-
var Link = (0,
|
|
4167
|
+
var import_react28 = require("react");
|
|
4168
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
4169
|
+
var Link = (0, import_react28.forwardRef)(function Link2(_a, ref) {
|
|
3718
4170
|
var _b = _a, {
|
|
3719
4171
|
className,
|
|
3720
4172
|
disabled = false,
|
|
@@ -3724,7 +4176,7 @@ var Link = (0, import_react24.forwardRef)(function Link2(_a, ref) {
|
|
|
3724
4176
|
"disabled",
|
|
3725
4177
|
"children"
|
|
3726
4178
|
]);
|
|
3727
|
-
return /* @__PURE__ */ (0,
|
|
4179
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
3728
4180
|
"a",
|
|
3729
4181
|
__spreadProps(__spreadValues({
|
|
3730
4182
|
ref,
|
|
@@ -3743,10 +4195,10 @@ var Link = (0, import_react24.forwardRef)(function Link2(_a, ref) {
|
|
|
3743
4195
|
Link.displayName = "Link";
|
|
3744
4196
|
|
|
3745
4197
|
// src/components/ui/Spinner.tsx
|
|
3746
|
-
var
|
|
4198
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
3747
4199
|
function Spinner(_a) {
|
|
3748
4200
|
var _b = _a, { size = "sm", textColored = false, className } = _b, props = __objRest(_b, ["size", "textColored", "className"]);
|
|
3749
|
-
return /* @__PURE__ */ (0,
|
|
4201
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
3750
4202
|
"span",
|
|
3751
4203
|
__spreadProps(__spreadValues({
|
|
3752
4204
|
className: cn(
|
|
@@ -3758,9 +4210,9 @@ function Spinner(_a) {
|
|
|
3758
4210
|
role: "status",
|
|
3759
4211
|
"aria-label": "Loading"
|
|
3760
4212
|
}, props), {
|
|
3761
|
-
children: /* @__PURE__ */ (0,
|
|
3762
|
-
/* @__PURE__ */ (0,
|
|
3763
|
-
/* @__PURE__ */ (0,
|
|
4213
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("svg", { viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: "ph-spinner__svg", children: [
|
|
4214
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("circle", { cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "3", opacity: 0.2 }),
|
|
4215
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("path", { d: "M12 2a10 10 0 0 1 10 10", stroke: "currentColor", strokeWidth: "3", strokeLinecap: "round" })
|
|
3764
4216
|
] })
|
|
3765
4217
|
})
|
|
3766
4218
|
);
|
|
@@ -3768,7 +4220,7 @@ function Spinner(_a) {
|
|
|
3768
4220
|
Spinner.displayName = "Spinner";
|
|
3769
4221
|
|
|
3770
4222
|
// src/components/ui/Dot.tsx
|
|
3771
|
-
var
|
|
4223
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
3772
4224
|
var colorMap = {
|
|
3773
4225
|
green: "bg-ph-success",
|
|
3774
4226
|
yellow: "bg-ph-warning",
|
|
@@ -3778,7 +4230,7 @@ var colorMap = {
|
|
|
3778
4230
|
};
|
|
3779
4231
|
function Dot(_a) {
|
|
3780
4232
|
var _b = _a, { color = "gray", size = "md", className } = _b, props = __objRest(_b, ["color", "size", "className"]);
|
|
3781
|
-
return /* @__PURE__ */ (0,
|
|
4233
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
3782
4234
|
"span",
|
|
3783
4235
|
__spreadValues({
|
|
3784
4236
|
className: cn(
|
|
@@ -3794,9 +4246,9 @@ function Dot(_a) {
|
|
|
3794
4246
|
Dot.displayName = "Dot";
|
|
3795
4247
|
|
|
3796
4248
|
// src/components/ui/Chip.tsx
|
|
3797
|
-
var
|
|
3798
|
-
var
|
|
3799
|
-
var Chip = (0,
|
|
4249
|
+
var import_react29 = require("react");
|
|
4250
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
4251
|
+
var Chip = (0, import_react29.forwardRef)(function Chip2(_a, ref) {
|
|
3800
4252
|
var _b = _a, {
|
|
3801
4253
|
selected = false,
|
|
3802
4254
|
onRemove,
|
|
@@ -3815,18 +4267,18 @@ var Chip = (0, import_react25.forwardRef)(function Chip2(_a, ref) {
|
|
|
3815
4267
|
);
|
|
3816
4268
|
if (onRemove) {
|
|
3817
4269
|
const removeLabel = typeof children === "string" ? `Remove ${children}` : "Remove";
|
|
3818
|
-
return /* @__PURE__ */ (0,
|
|
3819
|
-
/* @__PURE__ */ (0,
|
|
4270
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("span", { className: chipClassName, children: [
|
|
4271
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
3820
4272
|
"button",
|
|
3821
4273
|
__spreadProps(__spreadValues({
|
|
3822
4274
|
ref,
|
|
3823
4275
|
type: "button",
|
|
3824
4276
|
className: "min-w-0 bg-transparent p-0 text-inherit"
|
|
3825
4277
|
}, props), {
|
|
3826
|
-
children: /* @__PURE__ */ (0,
|
|
4278
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: "ph-chip__text", children })
|
|
3827
4279
|
})
|
|
3828
4280
|
),
|
|
3829
|
-
/* @__PURE__ */ (0,
|
|
4281
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
3830
4282
|
"button",
|
|
3831
4283
|
{
|
|
3832
4284
|
type: "button",
|
|
@@ -3834,26 +4286,26 @@ var Chip = (0, import_react25.forwardRef)(function Chip2(_a, ref) {
|
|
|
3834
4286
|
disabled: props.disabled,
|
|
3835
4287
|
className: "ph-chip__remove",
|
|
3836
4288
|
"aria-label": removeLabel,
|
|
3837
|
-
children: /* @__PURE__ */ (0,
|
|
4289
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("svg", { width: "10", height: "10", viewBox: "0 0 10 10", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("path", { d: "M2 2l6 6M8 2l-6 6" }) })
|
|
3838
4290
|
}
|
|
3839
4291
|
)
|
|
3840
4292
|
] });
|
|
3841
4293
|
}
|
|
3842
|
-
return /* @__PURE__ */ (0,
|
|
4294
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
3843
4295
|
"button",
|
|
3844
4296
|
__spreadProps(__spreadValues({
|
|
3845
4297
|
ref,
|
|
3846
4298
|
type: "button",
|
|
3847
4299
|
className: chipClassName
|
|
3848
4300
|
}, props), {
|
|
3849
|
-
children: /* @__PURE__ */ (0,
|
|
4301
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: "ph-chip__text", children })
|
|
3850
4302
|
})
|
|
3851
4303
|
);
|
|
3852
4304
|
});
|
|
3853
4305
|
Chip.displayName = "Chip";
|
|
3854
4306
|
|
|
3855
4307
|
// src/lib/chart/use-ph-chart-tokens.ts
|
|
3856
|
-
var
|
|
4308
|
+
var import_react30 = require("react");
|
|
3857
4309
|
var DEFAULT_TOKENS = {
|
|
3858
4310
|
series: ["#1d4aff", "#621da6", "#42827e", "#ce0e74", "#f14f58", "#529a0a", "#fe729e"],
|
|
3859
4311
|
muted: "hsl(220 9% 90%)",
|
|
@@ -3884,20 +4336,20 @@ function readTokens() {
|
|
|
3884
4336
|
};
|
|
3885
4337
|
}
|
|
3886
4338
|
function useChartTokens() {
|
|
3887
|
-
const [tokens, setTokens] = (0,
|
|
3888
|
-
(0,
|
|
4339
|
+
const [tokens, setTokens] = (0, import_react30.useState)(DEFAULT_TOKENS);
|
|
4340
|
+
(0, import_react30.useEffect)(() => {
|
|
3889
4341
|
setTokens(readTokens());
|
|
3890
4342
|
}, []);
|
|
3891
4343
|
return tokens;
|
|
3892
4344
|
}
|
|
3893
4345
|
|
|
3894
4346
|
// src/components/ui/Charts.tsx
|
|
3895
|
-
var
|
|
4347
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
3896
4348
|
function percent(value, total) {
|
|
3897
4349
|
return total > 0 ? Math.round(value / total * 100) : 0;
|
|
3898
4350
|
}
|
|
3899
4351
|
function EmptyChart() {
|
|
3900
|
-
return /* @__PURE__ */ (0,
|
|
4352
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("p", { className: "text-sm text-ph-subtle", children: "No data for this period." });
|
|
3901
4353
|
}
|
|
3902
4354
|
function sliceColour(slice, index, series) {
|
|
3903
4355
|
var _a;
|
|
@@ -3907,7 +4359,7 @@ function DonutChart({ slices, label, formatValue, className }) {
|
|
|
3907
4359
|
const { series } = useChartTokens();
|
|
3908
4360
|
const visible = slices.filter((slice) => slice.value > 0);
|
|
3909
4361
|
const total = visible.reduce((sum, slice) => sum + slice.value, 0);
|
|
3910
|
-
if (total <= 0) return /* @__PURE__ */ (0,
|
|
4362
|
+
if (total <= 0) return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(EmptyChart, {});
|
|
3911
4363
|
const stops = visible.map((slice, index) => {
|
|
3912
4364
|
const colour = sliceColour(slice, index, series);
|
|
3913
4365
|
const before = visible.slice(0, index).reduce((sum, item) => sum + item.value, 0);
|
|
@@ -3915,15 +4367,15 @@ function DonutChart({ slices, label, formatValue, className }) {
|
|
|
3915
4367
|
const end = (before + slice.value) / total * 360;
|
|
3916
4368
|
return `${colour} ${start}deg ${end}deg`;
|
|
3917
4369
|
}).join(", ");
|
|
3918
|
-
return /* @__PURE__ */ (0,
|
|
3919
|
-
/* @__PURE__ */ (0,
|
|
4370
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: cn("flex flex-col items-center gap-4 sm:flex-row sm:items-center", className), children: [
|
|
4371
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
3920
4372
|
"div",
|
|
3921
4373
|
{
|
|
3922
4374
|
role: "img",
|
|
3923
4375
|
"aria-label": label,
|
|
3924
4376
|
className: "relative h-36 w-36 shrink-0 rounded-full",
|
|
3925
4377
|
style: { background: `conic-gradient(${stops})` },
|
|
3926
|
-
children: /* @__PURE__ */ (0,
|
|
4378
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
3927
4379
|
"span",
|
|
3928
4380
|
{
|
|
3929
4381
|
className: "absolute inset-[22%] rounded-full bg-ph-surface ring-1 ring-ph-border",
|
|
@@ -3932,14 +4384,14 @@ function DonutChart({ slices, label, formatValue, className }) {
|
|
|
3932
4384
|
)
|
|
3933
4385
|
}
|
|
3934
4386
|
),
|
|
3935
|
-
/* @__PURE__ */ (0,
|
|
4387
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("ul", { className: "min-w-0 w-full flex-1 space-y-2", children: visible.map((slice, index) => {
|
|
3936
4388
|
const colour = sliceColour(slice, index, series);
|
|
3937
|
-
return /* @__PURE__ */ (0,
|
|
3938
|
-
/* @__PURE__ */ (0,
|
|
3939
|
-
/* @__PURE__ */ (0,
|
|
3940
|
-
/* @__PURE__ */ (0,
|
|
4389
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("li", { className: "flex items-center justify-between gap-3 text-sm", children: [
|
|
4390
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("span", { className: "flex min-w-0 items-center gap-2 text-ph-subtle", children: [
|
|
4391
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { className: "h-2.5 w-2.5 shrink-0 rounded-full", style: { background: colour } }),
|
|
4392
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { className: "truncate", children: slice.label })
|
|
3941
4393
|
] }),
|
|
3942
|
-
/* @__PURE__ */ (0,
|
|
4394
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { className: "shrink-0 tabular-nums text-ph-ink", children: formatValue ? formatValue(slice.value) : `${percent(slice.value, total)}%` })
|
|
3943
4395
|
] }, slice.label);
|
|
3944
4396
|
}) })
|
|
3945
4397
|
] });
|
|
@@ -3948,15 +4400,15 @@ function BarChart({ items, formatValue, className }) {
|
|
|
3948
4400
|
const { series } = useChartTokens();
|
|
3949
4401
|
const visible = items.filter((item) => item.value > 0);
|
|
3950
4402
|
const max = Math.max(...visible.map((item) => item.value), 1);
|
|
3951
|
-
if (!visible.length) return /* @__PURE__ */ (0,
|
|
3952
|
-
return /* @__PURE__ */ (0,
|
|
4403
|
+
if (!visible.length) return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(EmptyChart, {});
|
|
4404
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("ul", { className: cn("space-y-3", className), children: visible.map((item, index) => {
|
|
3953
4405
|
const colour = sliceColour(item, index, series);
|
|
3954
|
-
return /* @__PURE__ */ (0,
|
|
3955
|
-
/* @__PURE__ */ (0,
|
|
3956
|
-
/* @__PURE__ */ (0,
|
|
3957
|
-
/* @__PURE__ */ (0,
|
|
4406
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("li", { children: [
|
|
4407
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "mb-1 flex items-center justify-between gap-3 text-sm", children: [
|
|
4408
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { className: "truncate text-ph-subtle", children: item.label }),
|
|
4409
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { className: "shrink-0 tabular-nums text-ph-ink", children: formatValue ? formatValue(item.value) : item.value.toLocaleString("en-AU") })
|
|
3958
4410
|
] }),
|
|
3959
|
-
/* @__PURE__ */ (0,
|
|
4411
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: "h-2.5 rounded-full bg-ph-muted ring-1 ring-ph-border", children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
3960
4412
|
"div",
|
|
3961
4413
|
{
|
|
3962
4414
|
className: "h-full rounded-full transition-[width] duration-300 ease-out motion-reduce:transition-none",
|
|
@@ -3978,15 +4430,15 @@ function StackedBarChart({
|
|
|
3978
4430
|
const { series } = useChartTokens();
|
|
3979
4431
|
const visible = slices.filter((slice) => slice.value > 0);
|
|
3980
4432
|
const total = visible.reduce((sum, slice) => sum + slice.value, 0);
|
|
3981
|
-
if (total <= 0) return /* @__PURE__ */ (0,
|
|
3982
|
-
return /* @__PURE__ */ (0,
|
|
3983
|
-
/* @__PURE__ */ (0,
|
|
4433
|
+
if (total <= 0) return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(EmptyChart, {});
|
|
4434
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: cn("space-y-3", className), children: [
|
|
4435
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
3984
4436
|
"div",
|
|
3985
4437
|
{
|
|
3986
4438
|
role: "img",
|
|
3987
4439
|
"aria-label": label,
|
|
3988
4440
|
className: "flex h-3 overflow-hidden rounded-full bg-ph-muted ring-1 ring-ph-border",
|
|
3989
|
-
children: visible.map((slice, index) => /* @__PURE__ */ (0,
|
|
4441
|
+
children: visible.map((slice, index) => /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
3990
4442
|
"span",
|
|
3991
4443
|
{
|
|
3992
4444
|
className: "h-full",
|
|
@@ -3999,14 +4451,14 @@ function StackedBarChart({
|
|
|
3999
4451
|
))
|
|
4000
4452
|
}
|
|
4001
4453
|
),
|
|
4002
|
-
/* @__PURE__ */ (0,
|
|
4454
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("ul", { className: "space-y-2", children: visible.map((slice, index) => {
|
|
4003
4455
|
const colour = sliceColour(slice, index, series);
|
|
4004
|
-
return /* @__PURE__ */ (0,
|
|
4005
|
-
/* @__PURE__ */ (0,
|
|
4006
|
-
/* @__PURE__ */ (0,
|
|
4007
|
-
/* @__PURE__ */ (0,
|
|
4456
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("li", { className: "flex items-center justify-between gap-3 text-sm", children: [
|
|
4457
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("span", { className: "flex min-w-0 items-center gap-2 text-ph-subtle", children: [
|
|
4458
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { className: "h-2.5 w-2.5 shrink-0 rounded-full", style: { background: colour } }),
|
|
4459
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { className: "truncate", children: slice.label })
|
|
4008
4460
|
] }),
|
|
4009
|
-
/* @__PURE__ */ (0,
|
|
4461
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { className: "shrink-0 tabular-nums text-ph-ink", children: formatValue ? formatValue(slice.value) : `${percent(slice.value, total)}%` })
|
|
4010
4462
|
] }, slice.label);
|
|
4011
4463
|
}) })
|
|
4012
4464
|
] });
|
|
@@ -4014,6 +4466,7 @@ function StackedBarChart({
|
|
|
4014
4466
|
// Annotate the CommonJS export names for ESM import in node:
|
|
4015
4467
|
0 && (module.exports = {
|
|
4016
4468
|
Accordion,
|
|
4469
|
+
AiWritingIllustration,
|
|
4017
4470
|
Alert,
|
|
4018
4471
|
AuthCard,
|
|
4019
4472
|
AuthDivider,
|
|
@@ -4056,12 +4509,17 @@ function StackedBarChart({
|
|
|
4056
4509
|
Icon,
|
|
4057
4510
|
IconByName,
|
|
4058
4511
|
Input,
|
|
4512
|
+
IntegrationBridgeIllustration,
|
|
4059
4513
|
Kbd,
|
|
4060
4514
|
Label,
|
|
4061
4515
|
Lead,
|
|
4062
4516
|
Link,
|
|
4063
4517
|
Loader,
|
|
4064
4518
|
LoadingState,
|
|
4519
|
+
MarketingHeader,
|
|
4520
|
+
MarketingLink,
|
|
4521
|
+
MarketingMotionControl,
|
|
4522
|
+
MarketingReveal,
|
|
4065
4523
|
Modal,
|
|
4066
4524
|
Mono,
|
|
4067
4525
|
Overline,
|