@xenide-io/the-old-ui-theme 0.9.18 → 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 +4248 -4039
- package/dist/suite.mjs +1006 -793
- 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-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
|
@@ -114,12 +114,430 @@ var Button = forwardRef(function Button2(_a, ref) {
|
|
|
114
114
|
});
|
|
115
115
|
Button.displayName = "Button";
|
|
116
116
|
|
|
117
|
+
// src/components/ui/Marketing.tsx
|
|
118
|
+
import {
|
|
119
|
+
useEffect,
|
|
120
|
+
useRef,
|
|
121
|
+
useState
|
|
122
|
+
} from "react";
|
|
123
|
+
import { Pause, Play } from "iconoir-react";
|
|
124
|
+
import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
125
|
+
function MarketingHeader(_a) {
|
|
126
|
+
var _b = _a, {
|
|
127
|
+
brand,
|
|
128
|
+
navigation,
|
|
129
|
+
actions,
|
|
130
|
+
className
|
|
131
|
+
} = _b, props = __objRest(_b, [
|
|
132
|
+
"brand",
|
|
133
|
+
"navigation",
|
|
134
|
+
"actions",
|
|
135
|
+
"className"
|
|
136
|
+
]);
|
|
137
|
+
return /* @__PURE__ */ jsx3("header", __spreadProps(__spreadValues({}, props), { className: cn("marketing-header", className), children: /* @__PURE__ */ jsxs3("div", { className: "marketing-header__inner", children: [
|
|
138
|
+
/* @__PURE__ */ jsx3("div", { className: "marketing-header__brand", children: brand }),
|
|
139
|
+
/* @__PURE__ */ jsx3(
|
|
140
|
+
"nav",
|
|
141
|
+
{
|
|
142
|
+
className: "marketing-header__navigation",
|
|
143
|
+
"aria-label": "Product navigation",
|
|
144
|
+
children: navigation
|
|
145
|
+
}
|
|
146
|
+
),
|
|
147
|
+
/* @__PURE__ */ jsx3("div", { className: "marketing-header__actions", children: actions })
|
|
148
|
+
] }) }));
|
|
149
|
+
}
|
|
150
|
+
function MarketingLink(_a) {
|
|
151
|
+
var _b = _a, {
|
|
152
|
+
variant = "secondary",
|
|
153
|
+
icon,
|
|
154
|
+
sideIcon,
|
|
155
|
+
children,
|
|
156
|
+
className
|
|
157
|
+
} = _b, props = __objRest(_b, [
|
|
158
|
+
"variant",
|
|
159
|
+
"icon",
|
|
160
|
+
"sideIcon",
|
|
161
|
+
"children",
|
|
162
|
+
"className"
|
|
163
|
+
]);
|
|
164
|
+
return /* @__PURE__ */ jsx3(
|
|
165
|
+
"a",
|
|
166
|
+
__spreadProps(__spreadValues({}, props), {
|
|
167
|
+
className: cn(
|
|
168
|
+
"ph-btn ph-btn-raised marketing-button",
|
|
169
|
+
`ph-btn-${variant}`,
|
|
170
|
+
className
|
|
171
|
+
),
|
|
172
|
+
children: /* @__PURE__ */ jsx3(ButtonChrome, { label: children, icon, sideIcon })
|
|
173
|
+
})
|
|
174
|
+
);
|
|
175
|
+
}
|
|
176
|
+
function MarketingMotionControl() {
|
|
177
|
+
const [paused, setPaused] = useState(false);
|
|
178
|
+
useEffect(() => {
|
|
179
|
+
document.documentElement.toggleAttribute("data-marketing-paused", paused);
|
|
180
|
+
return () => document.documentElement.removeAttribute("data-marketing-paused");
|
|
181
|
+
}, [paused]);
|
|
182
|
+
return /* @__PURE__ */ jsxs3(
|
|
183
|
+
"button",
|
|
184
|
+
{
|
|
185
|
+
type: "button",
|
|
186
|
+
className: "marketing-motion-control",
|
|
187
|
+
onClick: () => setPaused((value) => !value),
|
|
188
|
+
"aria-pressed": paused,
|
|
189
|
+
"aria-label": paused ? "Play landing animations" : "Pause landing animations",
|
|
190
|
+
children: [
|
|
191
|
+
paused ? /* @__PURE__ */ jsx3(Play, { className: "h-4 w-4", "aria-hidden": true }) : /* @__PURE__ */ jsx3(Pause, { className: "h-4 w-4", "aria-hidden": true }),
|
|
192
|
+
/* @__PURE__ */ jsx3("span", { children: paused ? "Play motion" : "Pause motion" })
|
|
193
|
+
]
|
|
194
|
+
}
|
|
195
|
+
);
|
|
196
|
+
}
|
|
197
|
+
function MarketingReveal(_a) {
|
|
198
|
+
var _b = _a, {
|
|
199
|
+
children,
|
|
200
|
+
className
|
|
201
|
+
} = _b, props = __objRest(_b, [
|
|
202
|
+
"children",
|
|
203
|
+
"className"
|
|
204
|
+
]);
|
|
205
|
+
const ref = useRef(null);
|
|
206
|
+
useEffect(() => {
|
|
207
|
+
const element = ref.current;
|
|
208
|
+
if (!element || !window.IntersectionObserver || window.matchMedia("(prefers-reduced-motion: reduce)").matches)
|
|
209
|
+
return;
|
|
210
|
+
const observer = new IntersectionObserver(
|
|
211
|
+
([entry]) => {
|
|
212
|
+
if (!entry.isIntersecting) return;
|
|
213
|
+
element.classList.add("marketing-reveal--entered");
|
|
214
|
+
observer.disconnect();
|
|
215
|
+
},
|
|
216
|
+
{ threshold: 0.1 }
|
|
217
|
+
);
|
|
218
|
+
observer.observe(element);
|
|
219
|
+
return () => observer.disconnect();
|
|
220
|
+
}, []);
|
|
221
|
+
return /* @__PURE__ */ jsx3("div", __spreadProps(__spreadValues({}, props), { ref, className: cn("marketing-reveal", className), children }));
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
// src/components/ui/MarketingIllustrations.tsx
|
|
225
|
+
import { useId } from "react";
|
|
226
|
+
import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
227
|
+
function AiWritingIllustration({
|
|
228
|
+
title,
|
|
229
|
+
prompt,
|
|
230
|
+
before,
|
|
231
|
+
after
|
|
232
|
+
}) {
|
|
233
|
+
const id = useId().replaceAll(":", "");
|
|
234
|
+
return /* @__PURE__ */ jsxs4(
|
|
235
|
+
"svg",
|
|
236
|
+
{
|
|
237
|
+
viewBox: "0 0 560 370",
|
|
238
|
+
className: "h-auto w-full",
|
|
239
|
+
role: "img",
|
|
240
|
+
"aria-label": `${title}: use /ai and Shelly AI to draft and polish writing`,
|
|
241
|
+
"data-marketing-art": true,
|
|
242
|
+
children: [
|
|
243
|
+
/* @__PURE__ */ jsxs4("defs", { children: [
|
|
244
|
+
/* @__PURE__ */ jsxs4("radialGradient", { id: `${id}-glow`, children: [
|
|
245
|
+
/* @__PURE__ */ jsx4("stop", { stopColor: "var(--ph-accent)", stopOpacity: ".2" }),
|
|
246
|
+
/* @__PURE__ */ jsx4("stop", { offset: "1", stopColor: "var(--ph-accent)", stopOpacity: "0" })
|
|
247
|
+
] }),
|
|
248
|
+
/* @__PURE__ */ jsxs4("linearGradient", { id: `${id}-paper`, x2: "1", y2: "1", children: [
|
|
249
|
+
/* @__PURE__ */ jsx4("stop", { stopColor: "var(--ph-surface)" }),
|
|
250
|
+
/* @__PURE__ */ jsx4("stop", { offset: "1", stopColor: "var(--ph-muted)" })
|
|
251
|
+
] })
|
|
252
|
+
] }),
|
|
253
|
+
/* @__PURE__ */ jsx4("ellipse", { cx: "280", cy: "198", rx: "260", ry: "168", fill: `url(#${id}-glow)` }),
|
|
254
|
+
/* @__PURE__ */ jsxs4("g", { className: "marketing-svg-float", children: [
|
|
255
|
+
/* @__PURE__ */ jsx4(
|
|
256
|
+
"rect",
|
|
257
|
+
{
|
|
258
|
+
x: "18",
|
|
259
|
+
y: "28",
|
|
260
|
+
width: "524",
|
|
261
|
+
height: "300",
|
|
262
|
+
rx: "20",
|
|
263
|
+
fill: `url(#${id}-paper)`,
|
|
264
|
+
stroke: "var(--ph-border)"
|
|
265
|
+
}
|
|
266
|
+
),
|
|
267
|
+
/* @__PURE__ */ jsx4("path", { d: "M18 76h524", stroke: "var(--ph-border)" }),
|
|
268
|
+
/* @__PURE__ */ jsx4("image", { href: "/shelly-icon.svg", x: "36", y: "40", width: "24", height: "24" }),
|
|
269
|
+
/* @__PURE__ */ jsx4(
|
|
270
|
+
"text",
|
|
271
|
+
{
|
|
272
|
+
x: "70",
|
|
273
|
+
y: "57",
|
|
274
|
+
fontSize: "16",
|
|
275
|
+
fontWeight: "700",
|
|
276
|
+
fill: "var(--ph-text-primary)",
|
|
277
|
+
children: title
|
|
278
|
+
}
|
|
279
|
+
),
|
|
280
|
+
/* @__PURE__ */ jsx4("text", { x: "434", y: "57", fontSize: "12", fill: "var(--ph-text-secondary)", children: "Shelly AI" }),
|
|
281
|
+
/* @__PURE__ */ jsx4(
|
|
282
|
+
"rect",
|
|
283
|
+
{
|
|
284
|
+
x: "38",
|
|
285
|
+
y: "94",
|
|
286
|
+
width: "484",
|
|
287
|
+
height: "42",
|
|
288
|
+
rx: "10",
|
|
289
|
+
fill: "var(--ph-canvas)",
|
|
290
|
+
stroke: "var(--ph-selected-border)"
|
|
291
|
+
}
|
|
292
|
+
),
|
|
293
|
+
/* @__PURE__ */ jsx4("text", { x: "54", y: "121", fontSize: "16", fill: "var(--ph-text-primary)", children: prompt }),
|
|
294
|
+
/* @__PURE__ */ jsxs4("g", { className: "marketing-svg-draft", children: [
|
|
295
|
+
/* @__PURE__ */ jsx4(
|
|
296
|
+
"text",
|
|
297
|
+
{
|
|
298
|
+
x: "46",
|
|
299
|
+
y: "171",
|
|
300
|
+
fontSize: "12",
|
|
301
|
+
fontWeight: "700",
|
|
302
|
+
fill: "var(--ph-text-secondary)",
|
|
303
|
+
children: "YOUR DRAFT"
|
|
304
|
+
}
|
|
305
|
+
),
|
|
306
|
+
before.map((line, index) => /* @__PURE__ */ jsx4(
|
|
307
|
+
"text",
|
|
308
|
+
{
|
|
309
|
+
x: "46",
|
|
310
|
+
y: 205 + index * 26,
|
|
311
|
+
fontSize: "16",
|
|
312
|
+
fill: "var(--ph-text-secondary)",
|
|
313
|
+
children: line
|
|
314
|
+
},
|
|
315
|
+
index
|
|
316
|
+
))
|
|
317
|
+
] }),
|
|
318
|
+
/* @__PURE__ */ jsx4(
|
|
319
|
+
"path",
|
|
320
|
+
{
|
|
321
|
+
className: "marketing-svg-thread",
|
|
322
|
+
d: "M265 175v102",
|
|
323
|
+
stroke: "var(--ph-accent)",
|
|
324
|
+
strokeWidth: "2",
|
|
325
|
+
strokeDasharray: "4 7"
|
|
326
|
+
}
|
|
327
|
+
),
|
|
328
|
+
/* @__PURE__ */ jsxs4("g", { className: "marketing-svg-polished", children: [
|
|
329
|
+
/* @__PURE__ */ jsx4(
|
|
330
|
+
"text",
|
|
331
|
+
{
|
|
332
|
+
x: "294",
|
|
333
|
+
y: "171",
|
|
334
|
+
fontSize: "12",
|
|
335
|
+
fontWeight: "700",
|
|
336
|
+
fill: "var(--ph-accent)",
|
|
337
|
+
children: "POLISHED WITH SHELLY"
|
|
338
|
+
}
|
|
339
|
+
),
|
|
340
|
+
after.map((line, index) => /* @__PURE__ */ jsx4(
|
|
341
|
+
"text",
|
|
342
|
+
{
|
|
343
|
+
x: "294",
|
|
344
|
+
y: 205 + index * 26,
|
|
345
|
+
fontSize: "16",
|
|
346
|
+
fill: "var(--ph-text-primary)",
|
|
347
|
+
children: line
|
|
348
|
+
},
|
|
349
|
+
index
|
|
350
|
+
)),
|
|
351
|
+
/* @__PURE__ */ jsx4(
|
|
352
|
+
"path",
|
|
353
|
+
{
|
|
354
|
+
d: "m302 294 5 5 10-11",
|
|
355
|
+
fill: "none",
|
|
356
|
+
stroke: "var(--ph-success)",
|
|
357
|
+
strokeWidth: "3",
|
|
358
|
+
strokeLinecap: "round"
|
|
359
|
+
}
|
|
360
|
+
),
|
|
361
|
+
/* @__PURE__ */ jsx4("text", { x: "328", y: "300", fontSize: "12", fill: "var(--ph-text-secondary)", children: "Ready to keep working" })
|
|
362
|
+
] })
|
|
363
|
+
] }),
|
|
364
|
+
/* @__PURE__ */ jsxs4("g", { className: "marketing-svg-spark", fill: "var(--ph-accent)", children: [
|
|
365
|
+
/* @__PURE__ */ jsx4("path", { d: "m520 12 3 10 10 3-10 3-3 10-3-10-10-3 10-3z" }),
|
|
366
|
+
/* @__PURE__ */ jsx4("path", { d: "m25 310 2 7 7 2-7 2-2 7-2-7-7-2 7-2z" })
|
|
367
|
+
] })
|
|
368
|
+
]
|
|
369
|
+
}
|
|
370
|
+
);
|
|
371
|
+
}
|
|
372
|
+
function IntegrationBridgeIllustration({
|
|
373
|
+
appName,
|
|
374
|
+
appIcon,
|
|
375
|
+
recordLabel,
|
|
376
|
+
calendar = false
|
|
377
|
+
}) {
|
|
378
|
+
const id = useId().replaceAll(":", "");
|
|
379
|
+
const rows = calendar ? ["Client catch-up", "10:00 \u2013 11:00", "Meeting notes"] : ["Client", "Project", recordLabel];
|
|
380
|
+
return /* @__PURE__ */ jsxs4(
|
|
381
|
+
"svg",
|
|
382
|
+
{
|
|
383
|
+
viewBox: "0 0 600 350",
|
|
384
|
+
className: "h-auto w-full",
|
|
385
|
+
role: "img",
|
|
386
|
+
"aria-label": calendar ? "Choose a calendar event to prefill a TurtleTime entry" : `Shelly Bridge matches connected records with ${appName}`,
|
|
387
|
+
"data-marketing-art": true,
|
|
388
|
+
children: [
|
|
389
|
+
/* @__PURE__ */ jsx4("defs", { children: /* @__PURE__ */ jsxs4("radialGradient", { id: `${id}-bridge`, children: [
|
|
390
|
+
/* @__PURE__ */ jsx4("stop", { stopColor: "var(--ph-blue)", stopOpacity: ".17" }),
|
|
391
|
+
/* @__PURE__ */ jsx4("stop", { offset: "1", stopColor: "var(--ph-blue)", stopOpacity: "0" })
|
|
392
|
+
] }) }),
|
|
393
|
+
/* @__PURE__ */ jsx4(
|
|
394
|
+
"ellipse",
|
|
395
|
+
{
|
|
396
|
+
cx: "300",
|
|
397
|
+
cy: "185",
|
|
398
|
+
rx: "280",
|
|
399
|
+
ry: "160",
|
|
400
|
+
fill: `url(#${id}-bridge)`
|
|
401
|
+
}
|
|
402
|
+
),
|
|
403
|
+
/* @__PURE__ */ jsxs4("g", { className: "marketing-svg-float", children: [
|
|
404
|
+
/* @__PURE__ */ jsx4(
|
|
405
|
+
"rect",
|
|
406
|
+
{
|
|
407
|
+
x: "18",
|
|
408
|
+
y: "55",
|
|
409
|
+
width: "230",
|
|
410
|
+
height: "240",
|
|
411
|
+
rx: "18",
|
|
412
|
+
fill: "var(--ph-surface)",
|
|
413
|
+
stroke: "var(--ph-border)"
|
|
414
|
+
}
|
|
415
|
+
),
|
|
416
|
+
/* @__PURE__ */ jsx4(
|
|
417
|
+
"rect",
|
|
418
|
+
{
|
|
419
|
+
x: "352",
|
|
420
|
+
y: "55",
|
|
421
|
+
width: "230",
|
|
422
|
+
height: "240",
|
|
423
|
+
rx: "18",
|
|
424
|
+
fill: "var(--ph-surface)",
|
|
425
|
+
stroke: "var(--ph-border)"
|
|
426
|
+
}
|
|
427
|
+
),
|
|
428
|
+
/* @__PURE__ */ jsx4(
|
|
429
|
+
"text",
|
|
430
|
+
{
|
|
431
|
+
x: "38",
|
|
432
|
+
y: "92",
|
|
433
|
+
fontSize: "17",
|
|
434
|
+
fontWeight: "700",
|
|
435
|
+
fill: "var(--ph-text-primary)",
|
|
436
|
+
children: calendar ? "Calendar events" : "Connected tools"
|
|
437
|
+
}
|
|
438
|
+
),
|
|
439
|
+
/* @__PURE__ */ jsx4("image", { href: appIcon, x: "370", y: "72", width: "28", height: "28" }),
|
|
440
|
+
/* @__PURE__ */ jsx4(
|
|
441
|
+
"text",
|
|
442
|
+
{
|
|
443
|
+
x: "410",
|
|
444
|
+
y: "93",
|
|
445
|
+
fontSize: "17",
|
|
446
|
+
fontWeight: "700",
|
|
447
|
+
fill: "var(--ph-text-primary)",
|
|
448
|
+
children: appName
|
|
449
|
+
}
|
|
450
|
+
),
|
|
451
|
+
rows.map((row, index) => /* @__PURE__ */ jsxs4("g", { children: [
|
|
452
|
+
/* @__PURE__ */ jsx4(
|
|
453
|
+
"rect",
|
|
454
|
+
{
|
|
455
|
+
x: "36",
|
|
456
|
+
y: 119 + index * 48,
|
|
457
|
+
width: "194",
|
|
458
|
+
height: "36",
|
|
459
|
+
rx: "8",
|
|
460
|
+
fill: "var(--ph-muted)"
|
|
461
|
+
}
|
|
462
|
+
),
|
|
463
|
+
/* @__PURE__ */ jsx4(
|
|
464
|
+
"text",
|
|
465
|
+
{
|
|
466
|
+
x: "50",
|
|
467
|
+
y: 142 + index * 48,
|
|
468
|
+
fontSize: "14",
|
|
469
|
+
fill: "var(--ph-text-secondary)",
|
|
470
|
+
children: row
|
|
471
|
+
}
|
|
472
|
+
),
|
|
473
|
+
/* @__PURE__ */ jsx4(
|
|
474
|
+
"rect",
|
|
475
|
+
{
|
|
476
|
+
x: "370",
|
|
477
|
+
y: 119 + index * 48,
|
|
478
|
+
width: "194",
|
|
479
|
+
height: "36",
|
|
480
|
+
rx: "8",
|
|
481
|
+
fill: "var(--ph-muted)"
|
|
482
|
+
}
|
|
483
|
+
),
|
|
484
|
+
/* @__PURE__ */ jsx4(
|
|
485
|
+
"text",
|
|
486
|
+
{
|
|
487
|
+
x: "384",
|
|
488
|
+
y: 142 + index * 48,
|
|
489
|
+
fontSize: "14",
|
|
490
|
+
fill: "var(--ph-text-primary)",
|
|
491
|
+
children: calendar && index === 1 ? "1 hour, ready to review" : row
|
|
492
|
+
}
|
|
493
|
+
),
|
|
494
|
+
/* @__PURE__ */ jsx4(
|
|
495
|
+
"path",
|
|
496
|
+
{
|
|
497
|
+
className: "marketing-svg-thread",
|
|
498
|
+
d: `M248 ${137 + index * 48}h104`,
|
|
499
|
+
stroke: "var(--ph-accent)",
|
|
500
|
+
strokeWidth: "2",
|
|
501
|
+
strokeDasharray: "5 8"
|
|
502
|
+
}
|
|
503
|
+
)
|
|
504
|
+
] }, row))
|
|
505
|
+
] }),
|
|
506
|
+
/* @__PURE__ */ jsxs4("g", { className: "marketing-svg-polished", children: [
|
|
507
|
+
/* @__PURE__ */ jsx4(
|
|
508
|
+
"circle",
|
|
509
|
+
{
|
|
510
|
+
cx: "300",
|
|
511
|
+
cy: "185",
|
|
512
|
+
r: "27",
|
|
513
|
+
fill: "var(--ph-canvas)",
|
|
514
|
+
stroke: "var(--ph-selected-border)"
|
|
515
|
+
}
|
|
516
|
+
),
|
|
517
|
+
/* @__PURE__ */ jsx4("image", { href: "/shelly-icon.svg", x: "280", y: "165", width: "40", height: "40" }),
|
|
518
|
+
/* @__PURE__ */ jsx4(
|
|
519
|
+
"text",
|
|
520
|
+
{
|
|
521
|
+
x: "300",
|
|
522
|
+
y: "331",
|
|
523
|
+
textAnchor: "middle",
|
|
524
|
+
fontSize: "13",
|
|
525
|
+
fill: "var(--ph-text-secondary)",
|
|
526
|
+
children: calendar ? "Prefill details \xB7 review \xB7 save the entry" : "Shelly Bridge \xB7 match the records you want to connect"
|
|
527
|
+
}
|
|
528
|
+
)
|
|
529
|
+
] })
|
|
530
|
+
]
|
|
531
|
+
}
|
|
532
|
+
);
|
|
533
|
+
}
|
|
534
|
+
|
|
117
535
|
// src/components/ui/Alert.tsx
|
|
118
536
|
import { forwardRef as forwardRef5 } from "react";
|
|
119
537
|
|
|
120
538
|
// src/components/icons/IconBase.tsx
|
|
121
539
|
import { forwardRef as forwardRef2 } from "react";
|
|
122
|
-
import { jsx as
|
|
540
|
+
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
123
541
|
var IconBase = forwardRef2(function IconBase2(_a, ref) {
|
|
124
542
|
var _b = _a, {
|
|
125
543
|
className,
|
|
@@ -149,7 +567,7 @@ var IconBase = forwardRef2(function IconBase2(_a, ref) {
|
|
|
149
567
|
"aria-labelledby"
|
|
150
568
|
]);
|
|
151
569
|
const hasAccessibleName = Boolean(ariaLabel || ariaLabelledBy);
|
|
152
|
-
return /* @__PURE__ */
|
|
570
|
+
return /* @__PURE__ */ jsx5(
|
|
153
571
|
"svg",
|
|
154
572
|
__spreadProps(__spreadValues({
|
|
155
573
|
ref,
|
|
@@ -172,10 +590,10 @@ IconBase.displayName = "IconBase";
|
|
|
172
590
|
|
|
173
591
|
// src/components/icons/createIconBase.tsx
|
|
174
592
|
import { forwardRef as forwardRef3 } from "react";
|
|
175
|
-
import { jsx as
|
|
593
|
+
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
176
594
|
function createIconBase({ name = "IconGlyph", viewBox = "0 0 24 24", paths }) {
|
|
177
595
|
const IconGlyph = forwardRef3(function IconGlyph2(props, ref) {
|
|
178
|
-
return /* @__PURE__ */
|
|
596
|
+
return /* @__PURE__ */ jsx6(IconBase, __spreadProps(__spreadValues({ ref, viewBox }, props), { children: paths }));
|
|
179
597
|
});
|
|
180
598
|
IconGlyph.displayName = name;
|
|
181
599
|
return IconGlyph;
|
|
@@ -184,14 +602,14 @@ function createIconBasePath(d, viewBox = "0 0 24 24", name) {
|
|
|
184
602
|
return createIconBase({
|
|
185
603
|
name,
|
|
186
604
|
viewBox,
|
|
187
|
-
paths: /* @__PURE__ */
|
|
605
|
+
paths: /* @__PURE__ */ jsx6("path", { d, fill: "currentColor" })
|
|
188
606
|
});
|
|
189
607
|
}
|
|
190
608
|
|
|
191
609
|
// src/components/icons/icons.tsx
|
|
192
610
|
import { forwardRef as forwardRef4 } from "react";
|
|
193
|
-
import { Fragment as Fragment2, jsx as
|
|
194
|
-
var fill = (d) => /* @__PURE__ */
|
|
611
|
+
import { Fragment as Fragment2, jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
612
|
+
var fill = (d) => /* @__PURE__ */ jsx7("path", { d, fill: "currentColor" });
|
|
195
613
|
var IconAreaChart = createIconBase({
|
|
196
614
|
paths: fill("M3 20V7l4 3 5-7 5 4h4v13Zm5-3 4-5.5 7 5.45V9h-2.7l-3.9-3.125-4.95 6.95L5 11v3.6Z")
|
|
197
615
|
});
|
|
@@ -232,7 +650,7 @@ var IconFlare = createIconBase({
|
|
|
232
650
|
)
|
|
233
651
|
});
|
|
234
652
|
var IconSelectEvents = createIconBase({
|
|
235
|
-
paths: /* @__PURE__ */
|
|
653
|
+
paths: /* @__PURE__ */ jsxs5(Fragment2, { children: [
|
|
236
654
|
fill("M17.5 9L16.56 6.94L14.5 6L16.56 5.06L17.5 3L18.44 5.06L20.5 6L18.44 6.94L17.5 9Z"),
|
|
237
655
|
fill("M6 12.5L6.94 14.56L9 15.5L6.94 16.44L6 18.5L5.06 16.44L3 15.5L5.06 14.56L6 12.5Z"),
|
|
238
656
|
fill("M6 9L5.06 6.94L3 6L5.06 5.06L6 3L6.94 5.06L9 6L6.94 6.94L6 9Z"),
|
|
@@ -290,9 +708,9 @@ var IconRobot = createIconBase({
|
|
|
290
708
|
)
|
|
291
709
|
});
|
|
292
710
|
var IconExclamation = createIconBase({
|
|
293
|
-
paths: /* @__PURE__ */
|
|
294
|
-
/* @__PURE__ */
|
|
295
|
-
/* @__PURE__ */
|
|
711
|
+
paths: /* @__PURE__ */ jsxs5("g", { fill: "currentColor", children: [
|
|
712
|
+
/* @__PURE__ */ jsx7("path", { d: "m12 21c1.1046 0 2-.8954 2-2s-.8954-2-2-2-2 .8954-2 2 .8954 2 2 2z" }),
|
|
713
|
+
/* @__PURE__ */ jsx7("path", { d: "m10 3h4v12h-4z" })
|
|
296
714
|
] })
|
|
297
715
|
});
|
|
298
716
|
var IconErrorOutline = createIconBase({
|
|
@@ -326,7 +744,7 @@ var IconChevronLeft = createIconBasePath("M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10
|
|
|
326
744
|
var IconChevronRight = createIconBasePath("M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z");
|
|
327
745
|
var IconChevronDown = createIconBasePath("M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z");
|
|
328
746
|
var IconSubArrowRight = createIconBase({
|
|
329
|
-
paths: /* @__PURE__ */
|
|
747
|
+
paths: /* @__PURE__ */ jsx7("g", { transform: "translate(4 5.5)", children: fill("M2 0H0V10H12.01V13L16 9L12.01 5V8H2V0Z") })
|
|
330
748
|
});
|
|
331
749
|
var IconSearch = createIconBasePath(
|
|
332
750
|
"M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"
|
|
@@ -405,7 +823,7 @@ var IconRocket = createIconBasePath(
|
|
|
405
823
|
);
|
|
406
824
|
var IconTerminal = createIconBase({
|
|
407
825
|
name: "IconTerminal",
|
|
408
|
-
paths: /* @__PURE__ */
|
|
826
|
+
paths: /* @__PURE__ */ jsx7(
|
|
409
827
|
"path",
|
|
410
828
|
{
|
|
411
829
|
d: "M3 4v16h18V4H3zm2 2h14v12H5V6zm2 2.2L10.8 12 7 15.8 8.4 17.2l5.2-5.2-5.2-5.2L7 8.2zM13 17h5v-2h-5v2z",
|
|
@@ -417,7 +835,7 @@ var IconTerminal = createIconBase({
|
|
|
417
835
|
});
|
|
418
836
|
var IconOldWindow = createIconBase({
|
|
419
837
|
name: "IconOldWindow",
|
|
420
|
-
paths: /* @__PURE__ */
|
|
838
|
+
paths: /* @__PURE__ */ jsx7(
|
|
421
839
|
"path",
|
|
422
840
|
{
|
|
423
841
|
d: "M3 3v18h18V3H3zm2 7v9h14v-9H5zm1-4h2v1H6V6zm3 0h2v1H9V6z",
|
|
@@ -429,7 +847,7 @@ var IconOldWindow = createIconBase({
|
|
|
429
847
|
});
|
|
430
848
|
var IconCommandCursor = createIconBase({
|
|
431
849
|
name: "IconCommandCursor",
|
|
432
|
-
paths: /* @__PURE__ */
|
|
850
|
+
paths: /* @__PURE__ */ jsx7(
|
|
433
851
|
"path",
|
|
434
852
|
{
|
|
435
853
|
d: "M4 3v18h16V3H4zm2 2h12v14H6V5zm1.5 3.5L11 12l-3.5 3.5L9 17l5-5-5-5-1.5 1.5zM13 17h4v-2h-4v2z",
|
|
@@ -441,7 +859,7 @@ var IconCommandCursor = createIconBase({
|
|
|
441
859
|
});
|
|
442
860
|
var IconDataReel = createIconBase({
|
|
443
861
|
name: "IconDataReel",
|
|
444
|
-
paths: /* @__PURE__ */
|
|
862
|
+
paths: /* @__PURE__ */ jsx7(
|
|
445
863
|
"path",
|
|
446
864
|
{
|
|
447
865
|
d: "M3 5v14h18V5H3zm2 2h14v10H5V7zm3 1a3 3 0 1 0 0 6 3 3 0 0 0 0-6zm8 0a3 3 0 1 0 0 6 3 3 0 0 0 0-6zM10 11h4v1.5h-4V11z",
|
|
@@ -453,7 +871,7 @@ var IconDataReel = createIconBase({
|
|
|
453
871
|
});
|
|
454
872
|
var IconCodePreview = createIconBase({
|
|
455
873
|
name: "IconCodePreview",
|
|
456
|
-
paths: /* @__PURE__ */
|
|
874
|
+
paths: /* @__PURE__ */ jsx7(
|
|
457
875
|
"path",
|
|
458
876
|
{
|
|
459
877
|
d: "M3 3v15h18V3H3zm2 2h14v11H5V5zm3.5 2L5 10.5 8.5 14l1.4-1.4-2.1-2.1 2.1-2.1L8.5 7zm7 0-1.4 1.4 2.1 2.1-2.1 2.1 1.4 1.4 3.5-3.5L15.5 7zM9 20h6v2H9v-2z",
|
|
@@ -465,7 +883,7 @@ var IconCodePreview = createIconBase({
|
|
|
465
883
|
});
|
|
466
884
|
var IconInsightBoard = createIconBase({
|
|
467
885
|
name: "IconInsightBoard",
|
|
468
|
-
paths: /* @__PURE__ */
|
|
886
|
+
paths: /* @__PURE__ */ jsx7(
|
|
469
887
|
"path",
|
|
470
888
|
{
|
|
471
889
|
d: "M3 3v18h18V3H3zm2 2h14v3H5V5zm0 5h6v9H5v-9zm8 0h6v4h-6v-4zm0 6h6v3h-6v-3zM6 6h2v1H6V6zm3 0h2v1H9V6z",
|
|
@@ -477,14 +895,14 @@ var IconInsightBoard = createIconBase({
|
|
|
477
895
|
});
|
|
478
896
|
var IconEventStream = createIconBase({
|
|
479
897
|
name: "IconEventStream",
|
|
480
|
-
paths: /* @__PURE__ */
|
|
481
|
-
/* @__PURE__ */
|
|
898
|
+
paths: /* @__PURE__ */ jsxs5(Fragment2, { children: [
|
|
899
|
+
/* @__PURE__ */ jsx7("path", { d: "M5 4h2v16H5V4z", fill: "currentColor", opacity: "0.45" }),
|
|
482
900
|
fill("M6 3a3 3 0 1 0 0 6 3 3 0 0 0 0-6zm0 8a3 3 0 1 0 0 6 3 3 0 0 0 0-6zm5-6h10v2H11V5zm0 8h7v2h-7v-2zm0 5h10v2H11v-2z")
|
|
483
901
|
] })
|
|
484
902
|
});
|
|
485
903
|
var IconFeatureGate = createIconBase({
|
|
486
904
|
name: "IconFeatureGate",
|
|
487
|
-
paths: /* @__PURE__ */
|
|
905
|
+
paths: /* @__PURE__ */ jsx7(
|
|
488
906
|
"path",
|
|
489
907
|
{
|
|
490
908
|
d: "M4 3h2v18H4V3zm3 2h12l-3 4 3 4H7V5zm4 1-2.2 4H12l-1 4 4.2-5H12l1-3h-2z",
|
|
@@ -496,7 +914,7 @@ var IconFeatureGate = createIconBase({
|
|
|
496
914
|
});
|
|
497
915
|
var IconReplayFrame = createIconBase({
|
|
498
916
|
name: "IconReplayFrame",
|
|
499
|
-
paths: /* @__PURE__ */
|
|
917
|
+
paths: /* @__PURE__ */ jsx7(
|
|
500
918
|
"path",
|
|
501
919
|
{
|
|
502
920
|
d: "M3 3v18h18V3H3zm2 2h14v11H5V5zm5 2v7l6-3.5L10 7zm-5 11h9v1H5v-1zm11 0h3v1h-3v-1z",
|
|
@@ -520,7 +938,7 @@ var IconExperimentSplit = createIconBase({
|
|
|
520
938
|
});
|
|
521
939
|
var IconSurveyCard = createIconBase({
|
|
522
940
|
name: "IconSurveyCard",
|
|
523
|
-
paths: /* @__PURE__ */
|
|
941
|
+
paths: /* @__PURE__ */ jsx7(
|
|
524
942
|
"path",
|
|
525
943
|
{
|
|
526
944
|
d: "M3 3v18h18V3H3zm2 2h14v14H5V5zm2 2h7v2H7V7zm0 4h4v2H7v-2zm7-.4-2.5 2.5-1-1-1.4 1.4 2.4 2.4 3.9-3.9-1.4-1.4zM7 16h10v1H7v-1z",
|
|
@@ -551,7 +969,7 @@ var IconFlask = createIconBasePath(
|
|
|
551
969
|
);
|
|
552
970
|
var IconSpinner = forwardRef4(function IconSpinner2(_a, ref) {
|
|
553
971
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
554
|
-
return /* @__PURE__ */
|
|
972
|
+
return /* @__PURE__ */ jsx7(IconSync, __spreadValues({ ref, className: cn("ph-icon-spin", className) }, props));
|
|
555
973
|
});
|
|
556
974
|
IconSpinner.displayName = "IconSpinner";
|
|
557
975
|
var CANONICAL_ICONS = {
|
|
@@ -652,12 +1070,12 @@ for (const [name, Icon] of Object.entries(CANONICAL_ICONS)) {
|
|
|
652
1070
|
var IconByName = forwardRef4(function IconByName2(_a, ref) {
|
|
653
1071
|
var _b = _a, { name } = _b, props = __objRest(_b, ["name"]);
|
|
654
1072
|
const Icon = PH_ICONS[name];
|
|
655
|
-
return /* @__PURE__ */
|
|
1073
|
+
return /* @__PURE__ */ jsx7(Icon, __spreadValues({ ref }, props));
|
|
656
1074
|
});
|
|
657
1075
|
IconByName.displayName = "IconByName";
|
|
658
1076
|
|
|
659
1077
|
// src/components/ui/Alert.tsx
|
|
660
|
-
import { jsx as
|
|
1078
|
+
import { jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
661
1079
|
var statusConfig = {
|
|
662
1080
|
info: { icon: IconInfo },
|
|
663
1081
|
success: { icon: IconCheckCircle },
|
|
@@ -696,7 +1114,7 @@ var Alert = forwardRef5(function Alert2(_a, ref) {
|
|
|
696
1114
|
]);
|
|
697
1115
|
const config = statusConfig[status];
|
|
698
1116
|
const Icon = config.icon;
|
|
699
|
-
return /* @__PURE__ */
|
|
1117
|
+
return /* @__PURE__ */ jsxs6(
|
|
700
1118
|
"div",
|
|
701
1119
|
__spreadProps(__spreadValues({
|
|
702
1120
|
ref,
|
|
@@ -705,20 +1123,20 @@ var Alert = forwardRef5(function Alert2(_a, ref) {
|
|
|
705
1123
|
className: cn("ph-alert", statusClassMap[status], className)
|
|
706
1124
|
}, props), {
|
|
707
1125
|
children: [
|
|
708
|
-
icon != null ? icon : /* @__PURE__ */
|
|
709
|
-
/* @__PURE__ */
|
|
710
|
-
title && /* @__PURE__ */
|
|
711
|
-
description && /* @__PURE__ */
|
|
1126
|
+
icon != null ? icon : /* @__PURE__ */ jsx8(Icon, { className: "ph-alert-icon mt-0.5 h-5 w-5 shrink-0", "aria-hidden": true }),
|
|
1127
|
+
/* @__PURE__ */ jsxs6("div", { className: "min-w-0 flex-1", children: [
|
|
1128
|
+
title && /* @__PURE__ */ jsx8("p", { className: "font-semibold", children: title }),
|
|
1129
|
+
description && /* @__PURE__ */ jsx8("p", { className: "mt-1 text-sm text-ph-subtle", children: description }),
|
|
712
1130
|
children
|
|
713
1131
|
] }),
|
|
714
|
-
onDismiss && /* @__PURE__ */
|
|
1132
|
+
onDismiss && /* @__PURE__ */ jsx8(
|
|
715
1133
|
"button",
|
|
716
1134
|
{
|
|
717
1135
|
type: "button",
|
|
718
1136
|
onClick: onDismiss,
|
|
719
1137
|
className: "ph-alert-dismiss",
|
|
720
1138
|
"aria-label": dismissLabel,
|
|
721
|
-
children: /* @__PURE__ */
|
|
1139
|
+
children: /* @__PURE__ */ jsx8(IconClose, { className: "h-4 w-4", "aria-hidden": true })
|
|
722
1140
|
}
|
|
723
1141
|
)
|
|
724
1142
|
]
|
|
@@ -729,7 +1147,7 @@ Alert.displayName = "Alert";
|
|
|
729
1147
|
|
|
730
1148
|
// src/components/ui/Badge.tsx
|
|
731
1149
|
import { forwardRef as forwardRef6 } from "react";
|
|
732
|
-
import { jsx as
|
|
1150
|
+
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
733
1151
|
var variantMap = {
|
|
734
1152
|
brand: "ph-badge-brand",
|
|
735
1153
|
neutral: "ph-badge-neutral",
|
|
@@ -755,7 +1173,7 @@ var Badge = forwardRef6(function Badge2(_a, ref) {
|
|
|
755
1173
|
"children",
|
|
756
1174
|
"className"
|
|
757
1175
|
]);
|
|
758
|
-
return /* @__PURE__ */
|
|
1176
|
+
return /* @__PURE__ */ jsx9(
|
|
759
1177
|
"span",
|
|
760
1178
|
__spreadProps(__spreadValues({
|
|
761
1179
|
ref,
|
|
@@ -776,7 +1194,7 @@ Badge.displayName = "Badge";
|
|
|
776
1194
|
import {
|
|
777
1195
|
forwardRef as forwardRef7
|
|
778
1196
|
} from "react";
|
|
779
|
-
import { Fragment as Fragment3, jsx as
|
|
1197
|
+
import { Fragment as Fragment3, jsx as jsx10, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
780
1198
|
var variantMap2 = {
|
|
781
1199
|
default: "",
|
|
782
1200
|
outlined: "border-2 border-ph-border",
|
|
@@ -827,18 +1245,18 @@ var Card = forwardRef7(function Card2(_a, ref) {
|
|
|
827
1245
|
(interactive || isLink || isButton) && "ph-card-interactive",
|
|
828
1246
|
className
|
|
829
1247
|
);
|
|
830
|
-
const cardContent = /* @__PURE__ */
|
|
831
|
-
media && /* @__PURE__ */
|
|
832
|
-
/* @__PURE__ */
|
|
833
|
-
title && /* @__PURE__ */
|
|
834
|
-
description && /* @__PURE__ */
|
|
1248
|
+
const cardContent = /* @__PURE__ */ jsxs7(Fragment3, { children: [
|
|
1249
|
+
media && /* @__PURE__ */ jsx10("div", { className: "ph-card-media", children: media }),
|
|
1250
|
+
/* @__PURE__ */ jsxs7("div", { className: cn("ph-card-body", bodyClassName), children: [
|
|
1251
|
+
title && /* @__PURE__ */ jsx10(Title3, { className: "ph-card-title", children: title }),
|
|
1252
|
+
description && /* @__PURE__ */ jsx10("p", { className: "text-sm text-ph-subtle", children: description }),
|
|
835
1253
|
children,
|
|
836
|
-
actions && /* @__PURE__ */
|
|
1254
|
+
actions && /* @__PURE__ */ jsx10("div", { className: "ph-card-actions", children: actions })
|
|
837
1255
|
] }),
|
|
838
|
-
footer && /* @__PURE__ */
|
|
1256
|
+
footer && /* @__PURE__ */ jsx10("div", { className: "border-t border-ph-border px-6 py-4 text-xs text-ph-subtle", children: footer })
|
|
839
1257
|
] });
|
|
840
1258
|
if (isLink) {
|
|
841
|
-
return /* @__PURE__ */
|
|
1259
|
+
return /* @__PURE__ */ jsx10(
|
|
842
1260
|
"a",
|
|
843
1261
|
__spreadProps(__spreadValues({
|
|
844
1262
|
ref,
|
|
@@ -853,7 +1271,7 @@ var Card = forwardRef7(function Card2(_a, ref) {
|
|
|
853
1271
|
);
|
|
854
1272
|
}
|
|
855
1273
|
if (isButton) {
|
|
856
|
-
return /* @__PURE__ */
|
|
1274
|
+
return /* @__PURE__ */ jsx10(
|
|
857
1275
|
"button",
|
|
858
1276
|
__spreadProps(__spreadValues({
|
|
859
1277
|
ref,
|
|
@@ -865,12 +1283,12 @@ var Card = forwardRef7(function Card2(_a, ref) {
|
|
|
865
1283
|
})
|
|
866
1284
|
);
|
|
867
1285
|
}
|
|
868
|
-
return /* @__PURE__ */
|
|
1286
|
+
return /* @__PURE__ */ jsx10("div", __spreadProps(__spreadValues({ ref, className: cardClassName }, props), { children: cardContent }));
|
|
869
1287
|
});
|
|
870
1288
|
Card.displayName = "Card";
|
|
871
1289
|
|
|
872
1290
|
// src/components/ui/Kbd.tsx
|
|
873
|
-
import { jsx as
|
|
1291
|
+
import { jsx as jsx11, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
874
1292
|
var platformLabels = {
|
|
875
1293
|
text: {
|
|
876
1294
|
command: "Command",
|
|
@@ -929,7 +1347,7 @@ function Kbd(_a) {
|
|
|
929
1347
|
"aria-label"
|
|
930
1348
|
]);
|
|
931
1349
|
if (variant === "token") {
|
|
932
|
-
return /* @__PURE__ */
|
|
1350
|
+
return /* @__PURE__ */ jsx11(
|
|
933
1351
|
"code",
|
|
934
1352
|
__spreadProps(__spreadValues({
|
|
935
1353
|
className: cn("ph-code-token ph-kbd", className),
|
|
@@ -944,7 +1362,7 @@ function Kbd(_a) {
|
|
|
944
1362
|
const displayKeys = sourceKeys.map((key) => formatKey(key, platform));
|
|
945
1363
|
const accessibleLabel = ariaLabel != null ? ariaLabel : getShortcutLabel(displayKeys);
|
|
946
1364
|
if (variant === "key") {
|
|
947
|
-
return /* @__PURE__ */
|
|
1365
|
+
return /* @__PURE__ */ jsx11(
|
|
948
1366
|
"kbd",
|
|
949
1367
|
__spreadProps(__spreadValues({
|
|
950
1368
|
className: cn("ph-keycap", className),
|
|
@@ -955,16 +1373,16 @@ function Kbd(_a) {
|
|
|
955
1373
|
})
|
|
956
1374
|
);
|
|
957
1375
|
}
|
|
958
|
-
return /* @__PURE__ */
|
|
1376
|
+
return /* @__PURE__ */ jsx11(
|
|
959
1377
|
"kbd",
|
|
960
1378
|
__spreadProps(__spreadValues({
|
|
961
1379
|
className: cn("ph-shortcut-group ph-keycap", className),
|
|
962
1380
|
role: accessibleLabel ? "img" : void 0,
|
|
963
1381
|
"aria-label": accessibleLabel
|
|
964
1382
|
}, props), {
|
|
965
|
-
children: displayKeys.map((key, index) => /* @__PURE__ */
|
|
966
|
-
index > 0 && separator != null ? /* @__PURE__ */
|
|
967
|
-
/* @__PURE__ */
|
|
1383
|
+
children: displayKeys.map((key, index) => /* @__PURE__ */ jsxs8("span", { className: "contents", children: [
|
|
1384
|
+
index > 0 && separator != null ? /* @__PURE__ */ jsx11("span", { className: "ph-shortcut-separator", "aria-hidden": "true", children: separator }) : null,
|
|
1385
|
+
/* @__PURE__ */ jsx11("span", { className: "ph-shortcut-key", "aria-hidden": accessibleLabel ? true : void 0, children: key })
|
|
968
1386
|
] }, index))
|
|
969
1387
|
})
|
|
970
1388
|
);
|
|
@@ -985,7 +1403,7 @@ function getShortcutLabel(keys) {
|
|
|
985
1403
|
}
|
|
986
1404
|
|
|
987
1405
|
// src/components/ui/Loader.tsx
|
|
988
|
-
import { jsx as
|
|
1406
|
+
import { jsx as jsx12, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
989
1407
|
var loaderSizeClass = {
|
|
990
1408
|
sm: "ph-loader-sm",
|
|
991
1409
|
md: "ph-loader-md",
|
|
@@ -1011,7 +1429,7 @@ function Loader(_a) {
|
|
|
1011
1429
|
"label",
|
|
1012
1430
|
"className"
|
|
1013
1431
|
]);
|
|
1014
|
-
return /* @__PURE__ */
|
|
1432
|
+
return /* @__PURE__ */ jsxs9(
|
|
1015
1433
|
"span",
|
|
1016
1434
|
__spreadProps(__spreadValues({
|
|
1017
1435
|
role: "status",
|
|
@@ -1019,20 +1437,20 @@ function Loader(_a) {
|
|
|
1019
1437
|
className: cn("ph-loader", loaderSizeClass[size], className)
|
|
1020
1438
|
}, props), {
|
|
1021
1439
|
children: [
|
|
1022
|
-
variant === "spinner" ? /* @__PURE__ */
|
|
1023
|
-
variant === "dots" ? /* @__PURE__ */
|
|
1024
|
-
/* @__PURE__ */
|
|
1025
|
-
/* @__PURE__ */
|
|
1026
|
-
/* @__PURE__ */
|
|
1440
|
+
variant === "spinner" ? /* @__PURE__ */ jsx12("span", { className: "ph-loading", "aria-hidden": true }) : null,
|
|
1441
|
+
variant === "dots" ? /* @__PURE__ */ jsxs9("span", { className: "ph-loading-dots", "aria-hidden": true, children: [
|
|
1442
|
+
/* @__PURE__ */ jsx12("span", {}),
|
|
1443
|
+
/* @__PURE__ */ jsx12("span", {}),
|
|
1444
|
+
/* @__PURE__ */ jsx12("span", {})
|
|
1027
1445
|
] }) : null,
|
|
1028
|
-
variant === "pulse" ? /* @__PURE__ */
|
|
1446
|
+
variant === "pulse" ? /* @__PURE__ */ jsx12("span", { className: "ph-loading-pulse", "aria-hidden": true }) : null
|
|
1029
1447
|
]
|
|
1030
1448
|
})
|
|
1031
1449
|
);
|
|
1032
1450
|
}
|
|
1033
1451
|
function Skeleton(_a) {
|
|
1034
1452
|
var _b = _a, { shape = "text", className } = _b, props = __objRest(_b, ["shape", "className"]);
|
|
1035
|
-
return /* @__PURE__ */
|
|
1453
|
+
return /* @__PURE__ */ jsx12(
|
|
1036
1454
|
"span",
|
|
1037
1455
|
__spreadValues({
|
|
1038
1456
|
className: cn("ph-skeleton", skeletonShapeClass[shape], className),
|
|
@@ -1056,53 +1474,53 @@ function LoadingState(_a) {
|
|
|
1056
1474
|
"size",
|
|
1057
1475
|
"className"
|
|
1058
1476
|
]);
|
|
1059
|
-
return /* @__PURE__ */
|
|
1060
|
-
/* @__PURE__ */
|
|
1061
|
-
/* @__PURE__ */
|
|
1062
|
-
/* @__PURE__ */
|
|
1063
|
-
description ? /* @__PURE__ */
|
|
1477
|
+
return /* @__PURE__ */ jsxs9("div", __spreadProps(__spreadValues({ className: cn("ph-loading-state", className), role: "status", "aria-label": label }, props), { children: [
|
|
1478
|
+
/* @__PURE__ */ jsx12(Loader, { variant, size, label, "aria-hidden": "true" }),
|
|
1479
|
+
/* @__PURE__ */ jsxs9("div", { className: "ph-loading-state__copy", children: [
|
|
1480
|
+
/* @__PURE__ */ jsx12("strong", { children: title }),
|
|
1481
|
+
description ? /* @__PURE__ */ jsx12("span", { children: description }) : null
|
|
1064
1482
|
] })
|
|
1065
1483
|
] }));
|
|
1066
1484
|
}
|
|
1067
1485
|
|
|
1068
1486
|
// src/components/ui/AuthLayout.tsx
|
|
1069
|
-
import { useId } from "react";
|
|
1070
|
-
import { jsx as
|
|
1487
|
+
import { useId as useId2 } from "react";
|
|
1488
|
+
import { jsx as jsx13, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1071
1489
|
function AuthLayout(_a) {
|
|
1072
1490
|
var _b = _a, { brand, footer, aside, children, className } = _b, props = __objRest(_b, ["brand", "footer", "aside", "children", "className"]);
|
|
1073
|
-
return /* @__PURE__ */
|
|
1074
|
-
aside ? /* @__PURE__ */
|
|
1075
|
-
/* @__PURE__ */
|
|
1076
|
-
brand ? /* @__PURE__ */
|
|
1491
|
+
return /* @__PURE__ */ jsxs10("div", __spreadProps(__spreadValues({ className: cn("ph-auth-layout", aside != null && "ph-auth-layout--split", className) }, props), { children: [
|
|
1492
|
+
aside ? /* @__PURE__ */ jsx13("aside", { className: "ph-auth-layout__aside", children: aside }) : null,
|
|
1493
|
+
/* @__PURE__ */ jsx13("div", { className: "ph-auth-layout__main", children: /* @__PURE__ */ jsxs10("div", { className: "ph-auth-layout__column", children: [
|
|
1494
|
+
brand ? /* @__PURE__ */ jsx13("div", { className: "ph-auth-layout__brand", children: brand }) : null,
|
|
1077
1495
|
children,
|
|
1078
|
-
footer ? /* @__PURE__ */
|
|
1496
|
+
footer ? /* @__PURE__ */ jsx13("footer", { className: "ph-auth-layout__footer", children: footer }) : null
|
|
1079
1497
|
] }) })
|
|
1080
1498
|
] }));
|
|
1081
1499
|
}
|
|
1082
1500
|
function AuthCard(_a) {
|
|
1083
1501
|
var _b = _a, { title, description, footer, children, className } = _b, props = __objRest(_b, ["title", "description", "footer", "children", "className"]);
|
|
1084
|
-
const titleId =
|
|
1085
|
-
return /* @__PURE__ */
|
|
1086
|
-
/* @__PURE__ */
|
|
1087
|
-
/* @__PURE__ */
|
|
1088
|
-
description ? /* @__PURE__ */
|
|
1502
|
+
const titleId = useId2();
|
|
1503
|
+
return /* @__PURE__ */ jsxs10("section", __spreadProps(__spreadValues({ className: cn("ph-auth-card", className), "aria-labelledby": titleId }, props), { children: [
|
|
1504
|
+
/* @__PURE__ */ jsxs10("header", { className: "ph-auth-card__header", children: [
|
|
1505
|
+
/* @__PURE__ */ jsx13("h1", { id: titleId, children: title }),
|
|
1506
|
+
description ? /* @__PURE__ */ jsx13("p", { children: description }) : null
|
|
1089
1507
|
] }),
|
|
1090
|
-
/* @__PURE__ */
|
|
1091
|
-
footer ? /* @__PURE__ */
|
|
1508
|
+
/* @__PURE__ */ jsx13("div", { className: "ph-auth-card__body", children }),
|
|
1509
|
+
footer ? /* @__PURE__ */ jsx13("footer", { className: "ph-auth-card__footer", children: footer }) : null
|
|
1092
1510
|
] }));
|
|
1093
1511
|
}
|
|
1094
1512
|
function AuthDivider(_a) {
|
|
1095
1513
|
var _b = _a, { children = "or continue with", className } = _b, props = __objRest(_b, ["children", "className"]);
|
|
1096
|
-
return /* @__PURE__ */
|
|
1514
|
+
return /* @__PURE__ */ jsx13("div", __spreadProps(__spreadValues({ className: cn("ph-auth-divider", className) }, props), { children: /* @__PURE__ */ jsx13("span", { children }) }));
|
|
1097
1515
|
}
|
|
1098
1516
|
|
|
1099
1517
|
// src/components/ui/SettingsLayout.tsx
|
|
1100
|
-
import { jsx as
|
|
1518
|
+
import { jsx as jsx14, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1101
1519
|
function SettingsNav(_a) {
|
|
1102
1520
|
var _b = _a, { groups, className } = _b, props = __objRest(_b, ["groups", "className"]);
|
|
1103
|
-
return /* @__PURE__ */
|
|
1104
|
-
/* @__PURE__ */
|
|
1105
|
-
/* @__PURE__ */
|
|
1521
|
+
return /* @__PURE__ */ jsx14("div", __spreadProps(__spreadValues({ className: cn("ph-settings-nav", className) }, props), { children: groups.map((group, index) => /* @__PURE__ */ jsxs11("div", { className: "ph-settings-nav__group", children: [
|
|
1522
|
+
/* @__PURE__ */ jsx14("p", { className: "ph-settings-nav__heading", children: group.label }),
|
|
1523
|
+
/* @__PURE__ */ jsx14("div", { className: "ph-settings-nav__items", children: group.items.map((item) => /* @__PURE__ */ jsxs11(
|
|
1106
1524
|
"a",
|
|
1107
1525
|
{
|
|
1108
1526
|
href: item.href,
|
|
@@ -1114,9 +1532,9 @@ function SettingsNav(_a) {
|
|
|
1114
1532
|
),
|
|
1115
1533
|
"aria-current": item.active ? "page" : void 0,
|
|
1116
1534
|
children: [
|
|
1117
|
-
item.icon ? /* @__PURE__ */
|
|
1118
|
-
/* @__PURE__ */
|
|
1119
|
-
item.badge ? /* @__PURE__ */
|
|
1535
|
+
item.icon ? /* @__PURE__ */ jsx14("span", { className: "ph-settings-nav__icon", children: item.icon }) : null,
|
|
1536
|
+
/* @__PURE__ */ jsx14("span", { children: item.label }),
|
|
1537
|
+
item.badge ? /* @__PURE__ */ jsx14("span", { className: "ph-settings-nav__badge", children: item.badge }) : null
|
|
1120
1538
|
]
|
|
1121
1539
|
},
|
|
1122
1540
|
item.id
|
|
@@ -1141,31 +1559,31 @@ function SettingsLayout(_a) {
|
|
|
1141
1559
|
"children",
|
|
1142
1560
|
"className"
|
|
1143
1561
|
]);
|
|
1144
|
-
return /* @__PURE__ */
|
|
1145
|
-
/* @__PURE__ */
|
|
1146
|
-
/* @__PURE__ */
|
|
1147
|
-
/* @__PURE__ */
|
|
1148
|
-
description ? /* @__PURE__ */
|
|
1562
|
+
return /* @__PURE__ */ jsxs11("section", __spreadProps(__spreadValues({ className: cn("ph-settings-layout", className) }, props), { children: [
|
|
1563
|
+
/* @__PURE__ */ jsxs11("header", { className: "ph-settings-layout__header", children: [
|
|
1564
|
+
/* @__PURE__ */ jsxs11("div", { children: [
|
|
1565
|
+
/* @__PURE__ */ jsx14("h2", { children: title }),
|
|
1566
|
+
description ? /* @__PURE__ */ jsx14("p", { children: description }) : null
|
|
1149
1567
|
] }),
|
|
1150
|
-
actions ? /* @__PURE__ */
|
|
1568
|
+
actions ? /* @__PURE__ */ jsx14("div", { className: "ph-settings-layout__actions", children: actions }) : null
|
|
1151
1569
|
] }),
|
|
1152
|
-
/* @__PURE__ */
|
|
1153
|
-
/* @__PURE__ */
|
|
1154
|
-
/* @__PURE__ */
|
|
1570
|
+
/* @__PURE__ */ jsxs11("details", { className: "ph-settings-layout__mobile-nav", children: [
|
|
1571
|
+
/* @__PURE__ */ jsxs11("summary", { children: [
|
|
1572
|
+
/* @__PURE__ */ jsx14(IconTuning, { className: "h-4 w-4", "aria-hidden": true }),
|
|
1155
1573
|
"Settings menu"
|
|
1156
1574
|
] }),
|
|
1157
|
-
/* @__PURE__ */
|
|
1575
|
+
/* @__PURE__ */ jsx14("nav", { "aria-label": navigationLabel, children: navigation })
|
|
1158
1576
|
] }),
|
|
1159
|
-
/* @__PURE__ */
|
|
1160
|
-
/* @__PURE__ */
|
|
1161
|
-
/* @__PURE__ */
|
|
1577
|
+
/* @__PURE__ */ jsxs11("div", { className: "ph-settings-layout__grid", children: [
|
|
1578
|
+
/* @__PURE__ */ jsx14("aside", { className: "ph-settings-layout__sidebar", children: /* @__PURE__ */ jsx14("nav", { "aria-label": navigationLabel, children: navigation }) }),
|
|
1579
|
+
/* @__PURE__ */ jsx14("div", { className: "ph-settings-layout__content", children })
|
|
1162
1580
|
] })
|
|
1163
1581
|
] }));
|
|
1164
1582
|
}
|
|
1165
1583
|
|
|
1166
1584
|
// src/components/ui/DropdownMenu.tsx
|
|
1167
1585
|
import * as DropdownPrimitive from "@radix-ui/react-dropdown-menu";
|
|
1168
|
-
import { jsx as
|
|
1586
|
+
import { jsx as jsx15, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1169
1587
|
var sizeClass2 = {
|
|
1170
1588
|
xs: "ph-btn-xs",
|
|
1171
1589
|
sm: "ph-btn-sm",
|
|
@@ -1187,7 +1605,7 @@ function DropdownContent({
|
|
|
1187
1605
|
avoidCollisions = true,
|
|
1188
1606
|
panelClassName
|
|
1189
1607
|
}) {
|
|
1190
|
-
return /* @__PURE__ */
|
|
1608
|
+
return /* @__PURE__ */ jsx15(DropdownPrimitive.Portal, { children: /* @__PURE__ */ jsxs12(
|
|
1191
1609
|
DropdownPrimitive.Content,
|
|
1192
1610
|
{
|
|
1193
1611
|
className: cn("ph-dropdown-panel", panelClassName),
|
|
@@ -1200,7 +1618,7 @@ function DropdownContent({
|
|
|
1200
1618
|
sticky: "partial",
|
|
1201
1619
|
children: [
|
|
1202
1620
|
children,
|
|
1203
|
-
/* @__PURE__ */
|
|
1621
|
+
/* @__PURE__ */ jsx15(
|
|
1204
1622
|
DropdownPrimitive.Arrow,
|
|
1205
1623
|
{
|
|
1206
1624
|
className: "ph-dropdown-arrow",
|
|
@@ -1252,7 +1670,7 @@ function DropdownMenu(_a) {
|
|
|
1252
1670
|
"modal",
|
|
1253
1671
|
"disabled"
|
|
1254
1672
|
]);
|
|
1255
|
-
return /* @__PURE__ */
|
|
1673
|
+
return /* @__PURE__ */ jsx15("div", __spreadProps(__spreadValues({ className: cn("ph-dropdown", className) }, props), { children: /* @__PURE__ */ jsxs12(
|
|
1256
1674
|
DropdownPrimitive.Root,
|
|
1257
1675
|
{
|
|
1258
1676
|
open,
|
|
@@ -1260,7 +1678,7 @@ function DropdownMenu(_a) {
|
|
|
1260
1678
|
onOpenChange,
|
|
1261
1679
|
modal,
|
|
1262
1680
|
children: [
|
|
1263
|
-
/* @__PURE__ */
|
|
1681
|
+
/* @__PURE__ */ jsx15(DropdownPrimitive.Trigger, { asChild: true, disabled, children: /* @__PURE__ */ jsx15(
|
|
1264
1682
|
"button",
|
|
1265
1683
|
{
|
|
1266
1684
|
type: "button",
|
|
@@ -1271,7 +1689,7 @@ function DropdownMenu(_a) {
|
|
|
1271
1689
|
children: trigger
|
|
1272
1690
|
}
|
|
1273
1691
|
) }),
|
|
1274
|
-
/* @__PURE__ */
|
|
1692
|
+
/* @__PURE__ */ jsx15(
|
|
1275
1693
|
DropdownContent,
|
|
1276
1694
|
{
|
|
1277
1695
|
align,
|
|
@@ -1336,8 +1754,8 @@ function DropdownButton(_a) {
|
|
|
1336
1754
|
"modal",
|
|
1337
1755
|
"disabled"
|
|
1338
1756
|
]);
|
|
1339
|
-
const trailing = sideIcon != null ? sideIcon : /* @__PURE__ */
|
|
1340
|
-
return /* @__PURE__ */
|
|
1757
|
+
const trailing = sideIcon != null ? sideIcon : /* @__PURE__ */ jsx15(IconChevronDown, { className: "h-4 w-4", "aria-hidden": true });
|
|
1758
|
+
return /* @__PURE__ */ jsx15("div", __spreadProps(__spreadValues({ className: cn("ph-dropdown", className) }, props), { children: /* @__PURE__ */ jsxs12(
|
|
1341
1759
|
DropdownPrimitive.Root,
|
|
1342
1760
|
{
|
|
1343
1761
|
open,
|
|
@@ -1345,7 +1763,7 @@ function DropdownButton(_a) {
|
|
|
1345
1763
|
onOpenChange,
|
|
1346
1764
|
modal,
|
|
1347
1765
|
children: [
|
|
1348
|
-
/* @__PURE__ */
|
|
1766
|
+
/* @__PURE__ */ jsx15(DropdownPrimitive.Trigger, { asChild: true, disabled, children: /* @__PURE__ */ jsx15(
|
|
1349
1767
|
"button",
|
|
1350
1768
|
{
|
|
1351
1769
|
type: "button",
|
|
@@ -1358,7 +1776,7 @@ function DropdownButton(_a) {
|
|
|
1358
1776
|
split && "ph-btn-split"
|
|
1359
1777
|
),
|
|
1360
1778
|
"aria-label": ariaLabel,
|
|
1361
|
-
children: /* @__PURE__ */
|
|
1779
|
+
children: /* @__PURE__ */ jsx15(
|
|
1362
1780
|
ButtonChrome,
|
|
1363
1781
|
{
|
|
1364
1782
|
label,
|
|
@@ -1369,7 +1787,7 @@ function DropdownButton(_a) {
|
|
|
1369
1787
|
)
|
|
1370
1788
|
}
|
|
1371
1789
|
) }),
|
|
1372
|
-
/* @__PURE__ */
|
|
1790
|
+
/* @__PURE__ */ jsx15(
|
|
1373
1791
|
DropdownContent,
|
|
1374
1792
|
{
|
|
1375
1793
|
align,
|
|
@@ -1396,7 +1814,7 @@ function DropdownItem(_a) {
|
|
|
1396
1814
|
"children",
|
|
1397
1815
|
"disabled"
|
|
1398
1816
|
]);
|
|
1399
|
-
return /* @__PURE__ */
|
|
1817
|
+
return /* @__PURE__ */ jsx15(DropdownPrimitive.Item, { asChild: true, disabled, children: /* @__PURE__ */ jsx15(
|
|
1400
1818
|
"button",
|
|
1401
1819
|
__spreadProps(__spreadValues({
|
|
1402
1820
|
type: "button",
|
|
@@ -1408,7 +1826,7 @@ function DropdownItem(_a) {
|
|
|
1408
1826
|
) });
|
|
1409
1827
|
}
|
|
1410
1828
|
function DropdownRadioGroup(props) {
|
|
1411
|
-
return /* @__PURE__ */
|
|
1829
|
+
return /* @__PURE__ */ jsx15(DropdownPrimitive.RadioGroup, __spreadValues({}, props));
|
|
1412
1830
|
}
|
|
1413
1831
|
function DropdownRadioItem(_a) {
|
|
1414
1832
|
var _b = _a, {
|
|
@@ -1418,26 +1836,26 @@ function DropdownRadioItem(_a) {
|
|
|
1418
1836
|
"className",
|
|
1419
1837
|
"children"
|
|
1420
1838
|
]);
|
|
1421
|
-
return /* @__PURE__ */
|
|
1839
|
+
return /* @__PURE__ */ jsxs12(
|
|
1422
1840
|
DropdownPrimitive.RadioItem,
|
|
1423
1841
|
__spreadProps(__spreadValues({
|
|
1424
1842
|
className: cn("ph-dropdown-item ph-dropdown-radio-item", className)
|
|
1425
1843
|
}, props), {
|
|
1426
1844
|
children: [
|
|
1427
|
-
/* @__PURE__ */
|
|
1428
|
-
/* @__PURE__ */
|
|
1845
|
+
/* @__PURE__ */ jsx15("span", { className: "ph-dropdown-item-indicator", "aria-hidden": true, children: /* @__PURE__ */ jsx15(DropdownPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx15(IconCheck, { className: "h-3.5 w-3.5" }) }) }),
|
|
1846
|
+
/* @__PURE__ */ jsx15("span", { children })
|
|
1429
1847
|
]
|
|
1430
1848
|
})
|
|
1431
1849
|
);
|
|
1432
1850
|
}
|
|
1433
1851
|
|
|
1434
1852
|
// src/components/ui/Input.tsx
|
|
1435
|
-
import { forwardRef as forwardRef8, useId as
|
|
1853
|
+
import { forwardRef as forwardRef8, useId as useId4, useState as useState2 } from "react";
|
|
1436
1854
|
import { Eye, EyeClosed } from "iconoir-react";
|
|
1437
1855
|
|
|
1438
1856
|
// src/components/ui/FormField.tsx
|
|
1439
|
-
import { useId as
|
|
1440
|
-
import { jsx as
|
|
1857
|
+
import { useId as useId3 } from "react";
|
|
1858
|
+
import { jsx as jsx16, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1441
1859
|
function FormField(_a) {
|
|
1442
1860
|
var _b = _a, {
|
|
1443
1861
|
controlId,
|
|
@@ -1460,7 +1878,7 @@ function FormField(_a) {
|
|
|
1460
1878
|
"children",
|
|
1461
1879
|
"className"
|
|
1462
1880
|
]);
|
|
1463
|
-
const generatedId =
|
|
1881
|
+
const generatedId = useId3();
|
|
1464
1882
|
const id = controlId != null ? controlId : generatedId;
|
|
1465
1883
|
const descriptionId = helperText && !error ? `${id}-description` : void 0;
|
|
1466
1884
|
const errorId = error ? `${id}-error` : void 0;
|
|
@@ -1470,26 +1888,26 @@ function FormField(_a) {
|
|
|
1470
1888
|
"aria-errormessage": errorId,
|
|
1471
1889
|
"aria-invalid": error ? true : void 0
|
|
1472
1890
|
};
|
|
1473
|
-
return /* @__PURE__ */
|
|
1474
|
-
label ? /* @__PURE__ */
|
|
1891
|
+
return /* @__PURE__ */ jsxs13("div", __spreadProps(__spreadValues({ className: cn("ph-field", className) }, props), { children: [
|
|
1892
|
+
label ? /* @__PURE__ */ jsxs13(
|
|
1475
1893
|
"label",
|
|
1476
1894
|
{
|
|
1477
1895
|
htmlFor: id,
|
|
1478
1896
|
className: cn("ph-label", hideLabel && "sr-only", disabled && "opacity-50"),
|
|
1479
1897
|
children: [
|
|
1480
1898
|
label,
|
|
1481
|
-
required ? /* @__PURE__ */
|
|
1899
|
+
required ? /* @__PURE__ */ jsx16("span", { "aria-hidden": "true", children: " *" }) : null
|
|
1482
1900
|
]
|
|
1483
1901
|
}
|
|
1484
1902
|
) : null,
|
|
1485
1903
|
typeof children === "function" ? children(controlProps) : children,
|
|
1486
|
-
descriptionId ? /* @__PURE__ */
|
|
1487
|
-
errorId ? /* @__PURE__ */
|
|
1904
|
+
descriptionId ? /* @__PURE__ */ jsx16("p", { id: descriptionId, className: "mt-1 text-xs text-ph-subtle", children: helperText }) : null,
|
|
1905
|
+
errorId ? /* @__PURE__ */ jsx16("p", { id: errorId, className: "mt-1 text-xs font-medium text-ph-danger", children: error }) : null
|
|
1488
1906
|
] }));
|
|
1489
1907
|
}
|
|
1490
1908
|
|
|
1491
1909
|
// src/components/ui/Input.tsx
|
|
1492
|
-
import { jsx as
|
|
1910
|
+
import { jsx as jsx17, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
1493
1911
|
var sizeMap2 = {
|
|
1494
1912
|
sm: "ph-input-sm",
|
|
1495
1913
|
md: "",
|
|
@@ -1529,12 +1947,12 @@ var Input = forwardRef8(function Input2(_a, ref) {
|
|
|
1529
1947
|
"required",
|
|
1530
1948
|
"aria-describedby"
|
|
1531
1949
|
]);
|
|
1532
|
-
const autoId =
|
|
1950
|
+
const autoId = useId4();
|
|
1533
1951
|
const id = idProp != null ? idProp : autoId;
|
|
1534
1952
|
const hasError = Boolean(error);
|
|
1535
1953
|
const isPassword = type === "password";
|
|
1536
|
-
const [revealed, setRevealed] =
|
|
1537
|
-
return /* @__PURE__ */
|
|
1954
|
+
const [revealed, setRevealed] = useState2(false);
|
|
1955
|
+
return /* @__PURE__ */ jsx17(
|
|
1538
1956
|
FormField,
|
|
1539
1957
|
{
|
|
1540
1958
|
controlId: id,
|
|
@@ -1545,8 +1963,8 @@ var Input = forwardRef8(function Input2(_a, ref) {
|
|
|
1545
1963
|
required,
|
|
1546
1964
|
disabled,
|
|
1547
1965
|
className: wrapperClassName,
|
|
1548
|
-
children: (fieldProps) => /* @__PURE__ */
|
|
1549
|
-
/* @__PURE__ */
|
|
1966
|
+
children: (fieldProps) => /* @__PURE__ */ jsxs14("div", { className: "relative", children: [
|
|
1967
|
+
/* @__PURE__ */ jsx17(
|
|
1550
1968
|
"input",
|
|
1551
1969
|
__spreadValues(__spreadProps(__spreadValues({}, fieldProps), {
|
|
1552
1970
|
ref,
|
|
@@ -1565,7 +1983,7 @@ var Input = forwardRef8(function Input2(_a, ref) {
|
|
|
1565
1983
|
)
|
|
1566
1984
|
}), props)
|
|
1567
1985
|
),
|
|
1568
|
-
isPassword ? /* @__PURE__ */
|
|
1986
|
+
isPassword ? /* @__PURE__ */ jsx17(
|
|
1569
1987
|
"button",
|
|
1570
1988
|
{
|
|
1571
1989
|
type: "button",
|
|
@@ -1573,8 +1991,8 @@ var Input = forwardRef8(function Input2(_a, ref) {
|
|
|
1573
1991
|
"aria-label": revealed ? "Hide password" : "Show password",
|
|
1574
1992
|
"aria-pressed": revealed,
|
|
1575
1993
|
disabled,
|
|
1576
|
-
className: "
|
|
1577
|
-
children: revealed ? /* @__PURE__ */
|
|
1994
|
+
className: "ph-field-icon-button",
|
|
1995
|
+
children: revealed ? /* @__PURE__ */ jsx17(EyeClosed, { className: "h-4 w-4", "aria-hidden": true }) : /* @__PURE__ */ jsx17(Eye, { className: "h-4 w-4", "aria-hidden": true })
|
|
1578
1996
|
}
|
|
1579
1997
|
) : null
|
|
1580
1998
|
] })
|
|
@@ -1610,10 +2028,10 @@ var Select = forwardRef8(function Select2(_a, ref) {
|
|
|
1610
2028
|
"required",
|
|
1611
2029
|
"aria-describedby"
|
|
1612
2030
|
]);
|
|
1613
|
-
const autoId =
|
|
2031
|
+
const autoId = useId4();
|
|
1614
2032
|
const id = idProp != null ? idProp : autoId;
|
|
1615
2033
|
const hasError = Boolean(error);
|
|
1616
|
-
return /* @__PURE__ */
|
|
2034
|
+
return /* @__PURE__ */ jsx17(FormField, { controlId: id, label, hideLabel, helperText, error, required, disabled, className: wrapperClassName, children: (fieldProps) => /* @__PURE__ */ jsx17(
|
|
1617
2035
|
"select",
|
|
1618
2036
|
__spreadProps(__spreadValues(__spreadProps(__spreadValues({}, fieldProps), {
|
|
1619
2037
|
ref,
|
|
@@ -1659,10 +2077,10 @@ var Textarea = forwardRef8(function Textarea2(_a, ref) {
|
|
|
1659
2077
|
"required",
|
|
1660
2078
|
"aria-describedby"
|
|
1661
2079
|
]);
|
|
1662
|
-
const autoId =
|
|
2080
|
+
const autoId = useId4();
|
|
1663
2081
|
const id = idProp != null ? idProp : autoId;
|
|
1664
2082
|
const hasError = Boolean(error);
|
|
1665
|
-
return /* @__PURE__ */
|
|
2083
|
+
return /* @__PURE__ */ jsx17(FormField, { controlId: id, label, hideLabel, helperText, error, required, disabled, className: wrapperClassName, children: (fieldProps) => /* @__PURE__ */ jsx17(
|
|
1666
2084
|
"textarea",
|
|
1667
2085
|
__spreadValues(__spreadProps(__spreadValues({}, fieldProps), {
|
|
1668
2086
|
ref,
|
|
@@ -1700,14 +2118,14 @@ var Checkbox = forwardRef8(function Checkbox2(_a, ref) {
|
|
|
1700
2118
|
"disabled",
|
|
1701
2119
|
"aria-describedby"
|
|
1702
2120
|
]);
|
|
1703
|
-
const autoId =
|
|
2121
|
+
const autoId = useId4();
|
|
1704
2122
|
const id = idProp != null ? idProp : autoId;
|
|
1705
2123
|
const hasError = Boolean(error);
|
|
1706
2124
|
const descriptionId = helperText && !hasError ? `${id}-description` : void 0;
|
|
1707
2125
|
const errorId = error ? `${id}-error` : void 0;
|
|
1708
|
-
return /* @__PURE__ */
|
|
1709
|
-
/* @__PURE__ */
|
|
1710
|
-
/* @__PURE__ */
|
|
2126
|
+
return /* @__PURE__ */ jsxs14("div", { className: cn("ph-control-row", wrapperClassName), children: [
|
|
2127
|
+
/* @__PURE__ */ jsxs14("span", { className: "ph-checkbox-wrap", children: [
|
|
2128
|
+
/* @__PURE__ */ jsx17(
|
|
1711
2129
|
"input",
|
|
1712
2130
|
__spreadValues({
|
|
1713
2131
|
ref,
|
|
@@ -1725,12 +2143,12 @@ var Checkbox = forwardRef8(function Checkbox2(_a, ref) {
|
|
|
1725
2143
|
)
|
|
1726
2144
|
}, props)
|
|
1727
2145
|
),
|
|
1728
|
-
/* @__PURE__ */
|
|
2146
|
+
/* @__PURE__ */ jsx17(IconCheck, { className: "ph-checkbox-icon", "aria-hidden": true })
|
|
1729
2147
|
] }),
|
|
1730
|
-
/* @__PURE__ */
|
|
1731
|
-
/* @__PURE__ */
|
|
1732
|
-
descriptionId ? /* @__PURE__ */
|
|
1733
|
-
errorId ? /* @__PURE__ */
|
|
2148
|
+
/* @__PURE__ */ jsxs14("div", { className: "ph-control-copy", children: [
|
|
2149
|
+
/* @__PURE__ */ jsx17("label", { htmlFor: id, className: cn("cursor-pointer", disabled && "opacity-60"), children: label }),
|
|
2150
|
+
descriptionId ? /* @__PURE__ */ jsx17("p", { id: descriptionId, className: "text-xs text-ph-subtle", children: helperText }) : null,
|
|
2151
|
+
errorId ? /* @__PURE__ */ jsx17("p", { id: errorId, className: "text-xs font-medium text-ph-danger", children: error }) : null
|
|
1734
2152
|
] })
|
|
1735
2153
|
] });
|
|
1736
2154
|
});
|
|
@@ -1749,10 +2167,10 @@ var Radio = forwardRef8(function Radio2(_a, ref) {
|
|
|
1749
2167
|
"wrapperClassName",
|
|
1750
2168
|
"disabled"
|
|
1751
2169
|
]);
|
|
1752
|
-
const autoId =
|
|
2170
|
+
const autoId = useId4();
|
|
1753
2171
|
const id = idProp != null ? idProp : autoId;
|
|
1754
|
-
return /* @__PURE__ */
|
|
1755
|
-
/* @__PURE__ */
|
|
2172
|
+
return /* @__PURE__ */ jsxs14("div", { className: cn("ph-control-row", wrapperClassName, disabled && "opacity-60"), children: [
|
|
2173
|
+
/* @__PURE__ */ jsx17(
|
|
1756
2174
|
"input",
|
|
1757
2175
|
__spreadValues({
|
|
1758
2176
|
ref,
|
|
@@ -1762,7 +2180,7 @@ var Radio = forwardRef8(function Radio2(_a, ref) {
|
|
|
1762
2180
|
className: cn("ph-radio", disabled && "cursor-not-allowed", className)
|
|
1763
2181
|
}, props)
|
|
1764
2182
|
),
|
|
1765
|
-
/* @__PURE__ */
|
|
2183
|
+
/* @__PURE__ */ jsx17("label", { htmlFor: id, className: cn("cursor-pointer", disabled && "opacity-60"), children: label })
|
|
1766
2184
|
] });
|
|
1767
2185
|
});
|
|
1768
2186
|
Radio.displayName = "Radio";
|
|
@@ -1780,11 +2198,11 @@ var Toggle = forwardRef8(function Toggle2(_a, ref) {
|
|
|
1780
2198
|
"wrapperClassName",
|
|
1781
2199
|
"disabled"
|
|
1782
2200
|
]);
|
|
1783
|
-
const autoId =
|
|
2201
|
+
const autoId = useId4();
|
|
1784
2202
|
const id = idProp != null ? idProp : autoId;
|
|
1785
|
-
return /* @__PURE__ */
|
|
1786
|
-
/* @__PURE__ */
|
|
1787
|
-
/* @__PURE__ */
|
|
2203
|
+
return /* @__PURE__ */ jsxs14("label", { className: cn("ph-control-row-between", wrapperClassName, disabled && "opacity-60"), children: [
|
|
2204
|
+
/* @__PURE__ */ jsx17("span", { className: disabled ? "opacity-60" : void 0, children: label }),
|
|
2205
|
+
/* @__PURE__ */ jsx17(
|
|
1788
2206
|
"input",
|
|
1789
2207
|
__spreadValues({
|
|
1790
2208
|
ref,
|
|
@@ -1816,15 +2234,15 @@ var Range = forwardRef8(function Range2(_a, ref) {
|
|
|
1816
2234
|
"wrapperClassName",
|
|
1817
2235
|
"className"
|
|
1818
2236
|
]);
|
|
1819
|
-
const autoId =
|
|
2237
|
+
const autoId = useId4();
|
|
1820
2238
|
const id = idProp != null ? idProp : autoId;
|
|
1821
|
-
return /* @__PURE__ */
|
|
1822
|
-
label && /* @__PURE__ */
|
|
1823
|
-
/* @__PURE__ */
|
|
1824
|
-
(minLabel || valueLabel || maxLabel) && /* @__PURE__ */
|
|
1825
|
-
/* @__PURE__ */
|
|
1826
|
-
/* @__PURE__ */
|
|
1827
|
-
/* @__PURE__ */
|
|
2239
|
+
return /* @__PURE__ */ jsxs14("div", { className: cn("ph-field", wrapperClassName), children: [
|
|
2240
|
+
label && /* @__PURE__ */ jsx17("label", { htmlFor: id, className: "ph-label", children: label }),
|
|
2241
|
+
/* @__PURE__ */ jsx17("input", __spreadValues({ ref, id, type: "range", className: cn("ph-range", className) }, props)),
|
|
2242
|
+
(minLabel || valueLabel || maxLabel) && /* @__PURE__ */ jsxs14("div", { className: "flex justify-between text-xs text-ph-mutedtext", children: [
|
|
2243
|
+
/* @__PURE__ */ jsx17("span", { children: minLabel }),
|
|
2244
|
+
/* @__PURE__ */ jsx17("span", { children: valueLabel }),
|
|
2245
|
+
/* @__PURE__ */ jsx17("span", { children: maxLabel })
|
|
1828
2246
|
] })
|
|
1829
2247
|
] });
|
|
1830
2248
|
});
|
|
@@ -1843,12 +2261,12 @@ var FileUpload = forwardRef8(function FileUpload2(_a, ref) {
|
|
|
1843
2261
|
"wrapperClassName",
|
|
1844
2262
|
"className"
|
|
1845
2263
|
]);
|
|
1846
|
-
const autoId =
|
|
2264
|
+
const autoId = useId4();
|
|
1847
2265
|
const id = idProp != null ? idProp : autoId;
|
|
1848
|
-
return /* @__PURE__ */
|
|
1849
|
-
label && /* @__PURE__ */
|
|
1850
|
-
/* @__PURE__ */
|
|
1851
|
-
/* @__PURE__ */
|
|
2266
|
+
return /* @__PURE__ */ jsxs14("div", { className: cn("ph-field", wrapperClassName), children: [
|
|
2267
|
+
label && /* @__PURE__ */ jsx17("label", { htmlFor: id, className: "ph-label", children: label }),
|
|
2268
|
+
/* @__PURE__ */ jsxs14("label", { htmlFor: id, className: "ph-file-upload", children: [
|
|
2269
|
+
/* @__PURE__ */ jsx17("input", __spreadValues({ ref, id, type: "file", className: cn("sr-only", className) }, props)),
|
|
1852
2270
|
prompt
|
|
1853
2271
|
] })
|
|
1854
2272
|
] });
|
|
@@ -1857,8 +2275,8 @@ FileUpload.displayName = "FileUpload";
|
|
|
1857
2275
|
|
|
1858
2276
|
// src/components/ui/Modal.tsx
|
|
1859
2277
|
import * as Dialog from "@radix-ui/react-dialog";
|
|
1860
|
-
import { useRef } from "react";
|
|
1861
|
-
import { Fragment as Fragment4, jsx as
|
|
2278
|
+
import { useRef as useRef2 } from "react";
|
|
2279
|
+
import { Fragment as Fragment4, jsx as jsx18, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
1862
2280
|
var sizeMap3 = {
|
|
1863
2281
|
sm: "max-w-sm",
|
|
1864
2282
|
md: "max-w-lg",
|
|
@@ -1888,16 +2306,16 @@ function Modal({
|
|
|
1888
2306
|
"aria-labelledby": ariaLabelledBy
|
|
1889
2307
|
}) {
|
|
1890
2308
|
const canDismiss = Boolean(onClose);
|
|
1891
|
-
const restoreFocusRef =
|
|
1892
|
-
return /* @__PURE__ */
|
|
2309
|
+
const restoreFocusRef = useRef2(null);
|
|
2310
|
+
return /* @__PURE__ */ jsx18(
|
|
1893
2311
|
Dialog.Root,
|
|
1894
2312
|
{
|
|
1895
2313
|
open,
|
|
1896
2314
|
onOpenChange: (nextOpen) => {
|
|
1897
2315
|
if (!nextOpen) onClose == null ? void 0 : onClose();
|
|
1898
2316
|
},
|
|
1899
|
-
children: /* @__PURE__ */
|
|
1900
|
-
/* @__PURE__ */
|
|
2317
|
+
children: /* @__PURE__ */ jsxs15(Dialog.Portal, { children: [
|
|
2318
|
+
/* @__PURE__ */ jsx18(
|
|
1901
2319
|
Dialog.Overlay,
|
|
1902
2320
|
{
|
|
1903
2321
|
"data-test": dataTest,
|
|
@@ -1905,7 +2323,7 @@ function Modal({
|
|
|
1905
2323
|
style: zIndex ? { zIndex } : void 0
|
|
1906
2324
|
}
|
|
1907
2325
|
),
|
|
1908
|
-
/* @__PURE__ */
|
|
2326
|
+
/* @__PURE__ */ jsx18(
|
|
1909
2327
|
Dialog.Content,
|
|
1910
2328
|
__spreadProps(__spreadValues(__spreadProps(__spreadValues(__spreadValues({
|
|
1911
2329
|
id,
|
|
@@ -1928,28 +2346,28 @@ function Modal({
|
|
|
1928
2346
|
onPointerDownOutside: (event) => {
|
|
1929
2347
|
if (!canDismiss || !closeOnOutsideClick) event.preventDefault();
|
|
1930
2348
|
},
|
|
1931
|
-
children: customLayout ? /* @__PURE__ */
|
|
1932
|
-
/* @__PURE__ */
|
|
2349
|
+
children: customLayout ? /* @__PURE__ */ jsxs15(Fragment4, { children: [
|
|
2350
|
+
/* @__PURE__ */ jsx18(Dialog.Title, { className: "sr-only", children: ariaLabel != null ? ariaLabel : "Dialog" }),
|
|
1933
2351
|
children
|
|
1934
|
-
] }) : /* @__PURE__ */
|
|
1935
|
-
title ? null : /* @__PURE__ */
|
|
1936
|
-
title || description || showCloseButton && canDismiss ? /* @__PURE__ */
|
|
1937
|
-
/* @__PURE__ */
|
|
1938
|
-
title ? /* @__PURE__ */
|
|
1939
|
-
description ? /* @__PURE__ */
|
|
2352
|
+
] }) : /* @__PURE__ */ jsxs15(Fragment4, { children: [
|
|
2353
|
+
title ? null : /* @__PURE__ */ jsx18(Dialog.Title, { className: "sr-only", children: ariaLabel != null ? ariaLabel : "Dialog" }),
|
|
2354
|
+
title || description || showCloseButton && canDismiss ? /* @__PURE__ */ jsxs15("header", { className: "ph-modal-header", children: [
|
|
2355
|
+
/* @__PURE__ */ jsxs15("div", { className: "min-w-0", children: [
|
|
2356
|
+
title ? /* @__PURE__ */ jsx18(Dialog.Title, { className: "text-lg font-bold text-ph-ink", children: title }) : null,
|
|
2357
|
+
description ? /* @__PURE__ */ jsx18(Dialog.Description, { className: "mt-1 text-sm text-ph-subtle", children: description }) : null
|
|
1940
2358
|
] }),
|
|
1941
|
-
showCloseButton && canDismiss ? /* @__PURE__ */
|
|
2359
|
+
showCloseButton && canDismiss ? /* @__PURE__ */ jsx18(Dialog.Close, { asChild: true, children: /* @__PURE__ */ jsx18(
|
|
1942
2360
|
"button",
|
|
1943
2361
|
{
|
|
1944
2362
|
type: "button",
|
|
1945
2363
|
className: "ph-modal-close",
|
|
1946
2364
|
"aria-label": "Close dialog",
|
|
1947
|
-
children: /* @__PURE__ */
|
|
2365
|
+
children: /* @__PURE__ */ jsx18(IconClose, { className: "h-5 w-5", "aria-hidden": true })
|
|
1948
2366
|
}
|
|
1949
2367
|
) }) : null
|
|
1950
2368
|
] }) : null,
|
|
1951
|
-
/* @__PURE__ */
|
|
1952
|
-
footer ? /* @__PURE__ */
|
|
2369
|
+
/* @__PURE__ */ jsx18("div", { className: cn("ph-modal-body", bodyClassName), children }),
|
|
2370
|
+
footer ? /* @__PURE__ */ jsx18("div", { className: "ph-modal-footer", children: footer }) : null
|
|
1953
2371
|
] })
|
|
1954
2372
|
})
|
|
1955
2373
|
)
|
|
@@ -1959,19 +2377,19 @@ function Modal({
|
|
|
1959
2377
|
}
|
|
1960
2378
|
|
|
1961
2379
|
// src/components/ui/Panel.tsx
|
|
1962
|
-
import { jsx as
|
|
2380
|
+
import { jsx as jsx19, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
1963
2381
|
function Panel(_a) {
|
|
1964
2382
|
var _b = _a, { title, description, children, className } = _b, props = __objRest(_b, ["title", "description", "children", "className"]);
|
|
1965
|
-
return /* @__PURE__ */
|
|
1966
|
-
title && /* @__PURE__ */
|
|
1967
|
-
description && /* @__PURE__ */
|
|
2383
|
+
return /* @__PURE__ */ jsxs16("div", __spreadProps(__spreadValues({ className: cn("ph-panel", className) }, props), { children: [
|
|
2384
|
+
title && /* @__PURE__ */ jsx19("h3", { className: "text-lg font-semibold tracking-tight text-ph-ink", children: title }),
|
|
2385
|
+
description && /* @__PURE__ */ jsx19("p", { className: "text-sm text-ph-subtle", children: description }),
|
|
1968
2386
|
children
|
|
1969
2387
|
] }));
|
|
1970
2388
|
}
|
|
1971
2389
|
|
|
1972
2390
|
// src/components/ui/SearchInput.tsx
|
|
1973
|
-
import { useId as
|
|
1974
|
-
import { jsx as
|
|
2391
|
+
import { useId as useId5 } from "react";
|
|
2392
|
+
import { jsx as jsx20, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
1975
2393
|
function SearchInput(_a) {
|
|
1976
2394
|
var _b = _a, {
|
|
1977
2395
|
id: idProp,
|
|
@@ -1992,12 +2410,12 @@ function SearchInput(_a) {
|
|
|
1992
2410
|
"wrapperClassName",
|
|
1993
2411
|
"placeholder"
|
|
1994
2412
|
]);
|
|
1995
|
-
const autoId =
|
|
2413
|
+
const autoId = useId5();
|
|
1996
2414
|
const id = idProp != null ? idProp : autoId;
|
|
1997
|
-
return /* @__PURE__ */
|
|
1998
|
-
/* @__PURE__ */
|
|
1999
|
-
/* @__PURE__ */
|
|
2000
|
-
shortcut != null ? /* @__PURE__ */
|
|
2415
|
+
return /* @__PURE__ */ jsxs17("div", { className: cn("relative", wrapperClassName), children: [
|
|
2416
|
+
/* @__PURE__ */ jsx20("label", { htmlFor: id, className: hideLabel ? "sr-only" : "ph-label mb-1.5 block", children: label }),
|
|
2417
|
+
/* @__PURE__ */ jsxs17("div", { className: "relative", children: [
|
|
2418
|
+
shortcut != null ? /* @__PURE__ */ jsx20(
|
|
2001
2419
|
"span",
|
|
2002
2420
|
{
|
|
2003
2421
|
className: "ph-shortcut pointer-events-none absolute left-3 top-1/2 z-10 -translate-y-1/2 text-xs",
|
|
@@ -2005,7 +2423,7 @@ function SearchInput(_a) {
|
|
|
2005
2423
|
children: shortcut
|
|
2006
2424
|
}
|
|
2007
2425
|
) : null,
|
|
2008
|
-
/* @__PURE__ */
|
|
2426
|
+
/* @__PURE__ */ jsx20(
|
|
2009
2427
|
"input",
|
|
2010
2428
|
__spreadValues({
|
|
2011
2429
|
id,
|
|
@@ -2039,12 +2457,12 @@ function SearchGroup(_a) {
|
|
|
2039
2457
|
"wrapperClassName",
|
|
2040
2458
|
"className"
|
|
2041
2459
|
]);
|
|
2042
|
-
const autoId =
|
|
2460
|
+
const autoId = useId5();
|
|
2043
2461
|
const id = idProp != null ? idProp : autoId;
|
|
2044
|
-
return /* @__PURE__ */
|
|
2045
|
-
/* @__PURE__ */
|
|
2046
|
-
/* @__PURE__ */
|
|
2047
|
-
/* @__PURE__ */
|
|
2462
|
+
return /* @__PURE__ */ jsxs17("div", { className: cn("ph-field", wrapperClassName), children: [
|
|
2463
|
+
/* @__PURE__ */ jsx20("label", { htmlFor: id, className: "ph-label", children: label }),
|
|
2464
|
+
/* @__PURE__ */ jsxs17("div", { className: "ph-search-group flex w-full max-w-lg min-h-[2.3125rem] items-stretch divide-x divide-ph-border", children: [
|
|
2465
|
+
/* @__PURE__ */ jsx20(
|
|
2048
2466
|
"input",
|
|
2049
2467
|
__spreadValues({
|
|
2050
2468
|
id,
|
|
@@ -2053,12 +2471,12 @@ function SearchGroup(_a) {
|
|
|
2053
2471
|
className: cn("ph-input ph-input-group-field min-w-0 flex-1", className)
|
|
2054
2472
|
}, props)
|
|
2055
2473
|
),
|
|
2056
|
-
/* @__PURE__ */
|
|
2474
|
+
/* @__PURE__ */ jsx20(
|
|
2057
2475
|
Button,
|
|
2058
2476
|
{
|
|
2059
2477
|
type: "submit",
|
|
2060
2478
|
variant: "primary",
|
|
2061
|
-
icon: /* @__PURE__ */
|
|
2479
|
+
icon: /* @__PURE__ */ jsx20(IconSearch, { className: "h-4 w-4", "aria-hidden": true }),
|
|
2062
2480
|
className: "ph-search-group__submit",
|
|
2063
2481
|
"aria-label": submitLabel
|
|
2064
2482
|
}
|
|
@@ -2068,7 +2486,7 @@ function SearchGroup(_a) {
|
|
|
2068
2486
|
}
|
|
2069
2487
|
|
|
2070
2488
|
// src/components/ui/Table.tsx
|
|
2071
|
-
import { jsx as
|
|
2489
|
+
import { jsx as jsx21, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
2072
2490
|
function Table({
|
|
2073
2491
|
data,
|
|
2074
2492
|
columns,
|
|
@@ -2078,19 +2496,22 @@ function Table({
|
|
|
2078
2496
|
getRowStyle,
|
|
2079
2497
|
getRowKey,
|
|
2080
2498
|
className,
|
|
2081
|
-
caption
|
|
2499
|
+
caption,
|
|
2500
|
+
emptyState = "No data available."
|
|
2082
2501
|
}) {
|
|
2083
|
-
return /* @__PURE__ */
|
|
2502
|
+
return /* @__PURE__ */ jsx21(
|
|
2084
2503
|
"div",
|
|
2085
2504
|
{
|
|
2086
2505
|
className: cn("ph-table-wrap", compact && "ph-table-compact", className),
|
|
2506
|
+
role: "region",
|
|
2507
|
+
"aria-label": caption != null ? caption : "Data table",
|
|
2087
2508
|
tabIndex: 0,
|
|
2088
|
-
children: /* @__PURE__ */
|
|
2089
|
-
caption && /* @__PURE__ */
|
|
2090
|
-
/* @__PURE__ */
|
|
2091
|
-
/* @__PURE__ */
|
|
2509
|
+
children: /* @__PURE__ */ jsxs18("table", { className: cn("ph-table", zebra && "ph-table-zebra", ribbon && "ph-table--ribbon"), children: [
|
|
2510
|
+
caption && /* @__PURE__ */ jsx21("caption", { className: "sr-only", children: caption }),
|
|
2511
|
+
/* @__PURE__ */ jsx21("thead", { children: /* @__PURE__ */ jsx21("tr", { children: columns.map((col) => /* @__PURE__ */ jsx21("th", { className: col.className, children: col.header }, col.key)) }) }),
|
|
2512
|
+
/* @__PURE__ */ jsx21("tbody", { children: data.length === 0 ? /* @__PURE__ */ jsx21("tr", { children: /* @__PURE__ */ jsx21("td", { colSpan: columns.length, className: "ph-table-empty", children: emptyState }) }) : data.map((row, i) => {
|
|
2092
2513
|
var _a;
|
|
2093
|
-
return /* @__PURE__ */
|
|
2514
|
+
return /* @__PURE__ */ jsx21("tr", { style: getRowStyle == null ? void 0 : getRowStyle(row), children: columns.map((col) => /* @__PURE__ */ jsx21("td", { className: col.className, children: col.cell(row) }, col.key)) }, (_a = getRowKey == null ? void 0 : getRowKey(row, i)) != null ? _a : i);
|
|
2094
2515
|
}) })
|
|
2095
2516
|
] })
|
|
2096
2517
|
}
|
|
@@ -2098,7 +2519,7 @@ function Table({
|
|
|
2098
2519
|
}
|
|
2099
2520
|
|
|
2100
2521
|
// src/components/ui/Stat.tsx
|
|
2101
|
-
import { jsx as
|
|
2522
|
+
import { jsx as jsx22, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
2102
2523
|
var toneMap = {
|
|
2103
2524
|
default: "text-ph-ink",
|
|
2104
2525
|
brand: "text-ph-brand",
|
|
@@ -2115,11 +2536,11 @@ var statMap = {
|
|
|
2115
2536
|
};
|
|
2116
2537
|
function Stat(_a) {
|
|
2117
2538
|
var _b = _a, { icon, label, value, footer, tone = "default", className } = _b, props = __objRest(_b, ["icon", "label", "value", "footer", "tone", "className"]);
|
|
2118
|
-
return /* @__PURE__ */
|
|
2119
|
-
icon && /* @__PURE__ */
|
|
2120
|
-
/* @__PURE__ */
|
|
2121
|
-
/* @__PURE__ */
|
|
2122
|
-
footer && /* @__PURE__ */
|
|
2539
|
+
return /* @__PURE__ */ jsxs19("article", __spreadProps(__spreadValues({ className: cn("ph-stat", statMap[tone], className) }, props), { children: [
|
|
2540
|
+
icon && /* @__PURE__ */ jsx22("div", { className: cn("mb-2 h-7 w-7", toneMap[tone]), children: icon }),
|
|
2541
|
+
/* @__PURE__ */ jsx22("div", { className: cn("ph-stat-label", tone === "warning" && toneMap[tone]), children: label }),
|
|
2542
|
+
/* @__PURE__ */ jsx22("div", { className: cn("ph-stat-val", toneMap[tone]), children: value }),
|
|
2543
|
+
footer && /* @__PURE__ */ jsx22("p", { className: "text-xs text-ph-subtle", children: footer })
|
|
2123
2544
|
] }));
|
|
2124
2545
|
}
|
|
2125
2546
|
|
|
@@ -2283,18 +2704,18 @@ function ThemeDomSync() {
|
|
|
2283
2704
|
}
|
|
2284
2705
|
|
|
2285
2706
|
// src/components/ui/ThemeSwitcher.tsx
|
|
2286
|
-
import { useEffect, useState as
|
|
2287
|
-
import { jsx as
|
|
2707
|
+
import { useEffect as useEffect2, useState as useState3 } from "react";
|
|
2708
|
+
import { jsx as jsx23, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
2288
2709
|
function ThemeSwitcher({ className }) {
|
|
2289
|
-
const [themeId, setThemeId] =
|
|
2290
|
-
|
|
2710
|
+
const [themeId, setThemeId] = useState3(DEFAULT_THEME_ID);
|
|
2711
|
+
useEffect2(() => {
|
|
2291
2712
|
const id = readStoredTheme();
|
|
2292
2713
|
persistTheme(id);
|
|
2293
2714
|
setThemeId(id);
|
|
2294
2715
|
}, []);
|
|
2295
|
-
return /* @__PURE__ */
|
|
2296
|
-
/* @__PURE__ */
|
|
2297
|
-
/* @__PURE__ */
|
|
2716
|
+
return /* @__PURE__ */ jsxs20("label", { className: cn("flex min-w-0 items-center gap-2", className), children: [
|
|
2717
|
+
/* @__PURE__ */ jsx23("span", { className: "shrink-0 text-xs font-medium text-ph-mutedtext sm:text-sm", children: "Theme" }),
|
|
2718
|
+
/* @__PURE__ */ jsx23(
|
|
2298
2719
|
"select",
|
|
2299
2720
|
{
|
|
2300
2721
|
className: "ph-select max-w-[11rem] !min-h-[2rem] py-1 pl-2.5 pr-8 text-xs sm:max-w-[14rem] sm:text-sm",
|
|
@@ -2305,23 +2726,23 @@ function ThemeSwitcher({ className }) {
|
|
|
2305
2726
|
persistTheme(next);
|
|
2306
2727
|
setThemeId(next);
|
|
2307
2728
|
},
|
|
2308
|
-
children: THEME_GROUPS.map((group) => /* @__PURE__ */
|
|
2729
|
+
children: THEME_GROUPS.map((group) => /* @__PURE__ */ jsx23("optgroup", { label: group, children: THEMES.filter((theme) => theme.group === group).map((theme) => /* @__PURE__ */ jsx23("option", { value: theme.id, children: theme.name }, theme.id)) }, group))
|
|
2309
2730
|
}
|
|
2310
2731
|
)
|
|
2311
2732
|
] });
|
|
2312
2733
|
}
|
|
2313
2734
|
|
|
2314
2735
|
// src/components/ui/Accordion.tsx
|
|
2315
|
-
import { useId as
|
|
2316
|
-
import { jsx as
|
|
2736
|
+
import { useId as useId6, useState as useState4 } from "react";
|
|
2737
|
+
import { jsx as jsx24, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
2317
2738
|
function Accordion({
|
|
2318
2739
|
items,
|
|
2319
2740
|
allowMultiple = false,
|
|
2320
2741
|
defaultOpen = [],
|
|
2321
2742
|
className
|
|
2322
2743
|
}) {
|
|
2323
|
-
const [openItems, setOpenItems] =
|
|
2324
|
-
const idPrefix =
|
|
2744
|
+
const [openItems, setOpenItems] = useState4(new Set(defaultOpen));
|
|
2745
|
+
const idPrefix = useId6();
|
|
2325
2746
|
const toggleItem = (id) => {
|
|
2326
2747
|
setOpenItems((prev) => {
|
|
2327
2748
|
const next = new Set(prev);
|
|
@@ -2336,28 +2757,25 @@ function Accordion({
|
|
|
2336
2757
|
return next;
|
|
2337
2758
|
});
|
|
2338
2759
|
};
|
|
2339
|
-
return /* @__PURE__ */
|
|
2760
|
+
return /* @__PURE__ */ jsx24(
|
|
2340
2761
|
"div",
|
|
2341
2762
|
{
|
|
2342
|
-
className: cn(
|
|
2343
|
-
"divide-y divide-ph-border rounded-xl border border-ph-border bg-ph-surface",
|
|
2344
|
-
className
|
|
2345
|
-
),
|
|
2763
|
+
className: cn("ph-accordion", className),
|
|
2346
2764
|
children: items.map((item) => {
|
|
2347
2765
|
const isOpen = openItems.has(item.id);
|
|
2348
2766
|
const contentId = `accordion-${idPrefix}-${item.id}-content`;
|
|
2349
|
-
return /* @__PURE__ */
|
|
2350
|
-
/* @__PURE__ */
|
|
2767
|
+
return /* @__PURE__ */ jsxs21("div", { className: "ph-accordion__item", children: [
|
|
2768
|
+
/* @__PURE__ */ jsxs21(
|
|
2351
2769
|
"button",
|
|
2352
2770
|
{
|
|
2353
2771
|
type: "button",
|
|
2354
2772
|
onClick: () => toggleItem(item.id),
|
|
2355
2773
|
"aria-expanded": isOpen,
|
|
2356
2774
|
"aria-controls": contentId,
|
|
2357
|
-
className: "
|
|
2775
|
+
className: "ph-accordion__trigger",
|
|
2358
2776
|
children: [
|
|
2359
|
-
/* @__PURE__ */
|
|
2360
|
-
/* @__PURE__ */
|
|
2777
|
+
/* @__PURE__ */ jsx24("span", { className: "font-semibold text-ph-ink", children: item.title }),
|
|
2778
|
+
/* @__PURE__ */ jsx24(
|
|
2361
2779
|
IconChevronDown,
|
|
2362
2780
|
{
|
|
2363
2781
|
className: cn(
|
|
@@ -2369,7 +2787,7 @@ function Accordion({
|
|
|
2369
2787
|
]
|
|
2370
2788
|
}
|
|
2371
2789
|
),
|
|
2372
|
-
/* @__PURE__ */
|
|
2790
|
+
/* @__PURE__ */ jsx24(
|
|
2373
2791
|
"div",
|
|
2374
2792
|
{
|
|
2375
2793
|
id: contentId,
|
|
@@ -2378,10 +2796,10 @@ function Accordion({
|
|
|
2378
2796
|
if (node) node.toggleAttribute("inert", !isOpen);
|
|
2379
2797
|
},
|
|
2380
2798
|
className: cn(
|
|
2381
|
-
"grid transition-
|
|
2799
|
+
"grid transition-[grid-template-rows] duration-200",
|
|
2382
2800
|
isOpen ? "grid-rows-[1fr]" : "grid-rows-[0fr]"
|
|
2383
2801
|
),
|
|
2384
|
-
children: /* @__PURE__ */
|
|
2802
|
+
children: /* @__PURE__ */ jsx24("div", { className: "overflow-hidden", children: /* @__PURE__ */ jsx24("div", { className: "px-5 pb-4 text-ph-subtle", children: item.content }) })
|
|
2385
2803
|
}
|
|
2386
2804
|
)
|
|
2387
2805
|
] }, item.id);
|
|
@@ -2391,27 +2809,68 @@ function Accordion({
|
|
|
2391
2809
|
}
|
|
2392
2810
|
|
|
2393
2811
|
// src/components/ui/SegmentedControl.tsx
|
|
2394
|
-
import {
|
|
2395
|
-
|
|
2396
|
-
|
|
2812
|
+
import { useRef as useRef3 } from "react";
|
|
2813
|
+
import { jsx as jsx25, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
2814
|
+
function SegmentedControl({
|
|
2815
|
+
options,
|
|
2816
|
+
value,
|
|
2817
|
+
onChange,
|
|
2818
|
+
className,
|
|
2819
|
+
"aria-label": ariaLabel
|
|
2820
|
+
}) {
|
|
2821
|
+
const itemRefs = useRef3([]);
|
|
2822
|
+
const selectedIndex = options.findIndex((option) => option.value === value);
|
|
2823
|
+
const handleKeyDown = (event, index) => {
|
|
2824
|
+
var _a;
|
|
2825
|
+
let nextIndex;
|
|
2826
|
+
switch (event.key) {
|
|
2827
|
+
case "ArrowLeft":
|
|
2828
|
+
case "ArrowUp":
|
|
2829
|
+
nextIndex = (index - 1 + options.length) % options.length;
|
|
2830
|
+
break;
|
|
2831
|
+
case "ArrowRight":
|
|
2832
|
+
case "ArrowDown":
|
|
2833
|
+
nextIndex = (index + 1) % options.length;
|
|
2834
|
+
break;
|
|
2835
|
+
case "Home":
|
|
2836
|
+
nextIndex = 0;
|
|
2837
|
+
break;
|
|
2838
|
+
case "End":
|
|
2839
|
+
nextIndex = options.length - 1;
|
|
2840
|
+
break;
|
|
2841
|
+
default:
|
|
2842
|
+
return;
|
|
2843
|
+
}
|
|
2844
|
+
event.preventDefault();
|
|
2845
|
+
const nextOption = options[nextIndex];
|
|
2846
|
+
if (!nextOption) return;
|
|
2847
|
+
onChange(nextOption.value);
|
|
2848
|
+
(_a = itemRefs.current[nextIndex]) == null ? void 0 : _a.focus();
|
|
2849
|
+
};
|
|
2850
|
+
return /* @__PURE__ */ jsx25(
|
|
2397
2851
|
"div",
|
|
2398
2852
|
{
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
)
|
|
2403
|
-
children: options.map((option) => /* @__PURE__ */ jsxs20(
|
|
2853
|
+
role: "radiogroup",
|
|
2854
|
+
"aria-label": ariaLabel,
|
|
2855
|
+
className: cn("ph-segmented-control", className),
|
|
2856
|
+
children: options.map((option, index) => /* @__PURE__ */ jsxs22(
|
|
2404
2857
|
"button",
|
|
2405
2858
|
{
|
|
2859
|
+
ref: (node) => {
|
|
2860
|
+
itemRefs.current[index] = node;
|
|
2861
|
+
},
|
|
2406
2862
|
type: "button",
|
|
2407
|
-
"
|
|
2863
|
+
role: "radio",
|
|
2864
|
+
"aria-checked": value === option.value,
|
|
2865
|
+
tabIndex: selectedIndex === index || selectedIndex < 0 && index === 0 ? 0 : -1,
|
|
2408
2866
|
onClick: () => onChange(option.value),
|
|
2867
|
+
onKeyDown: (event) => handleKeyDown(event, index),
|
|
2409
2868
|
className: cn(
|
|
2410
|
-
"
|
|
2411
|
-
value === option.value
|
|
2869
|
+
"ph-segmented-control__item",
|
|
2870
|
+
value === option.value && "ph-segmented-control__item--selected"
|
|
2412
2871
|
),
|
|
2413
2872
|
children: [
|
|
2414
|
-
option.icon && /* @__PURE__ */
|
|
2873
|
+
option.icon && /* @__PURE__ */ jsx25("span", { className: "h-4 w-4", "aria-hidden": true, children: option.icon }),
|
|
2415
2874
|
option.label
|
|
2416
2875
|
]
|
|
2417
2876
|
},
|
|
@@ -2422,9 +2881,9 @@ function SegmentedControl({ options, value, onChange, className }) {
|
|
|
2422
2881
|
}
|
|
2423
2882
|
|
|
2424
2883
|
// src/components/ui/CommandPalette.tsx
|
|
2425
|
-
import { useEffect as
|
|
2884
|
+
import { useEffect as useEffect3, useId as useId7, useRef as useRef4, useState as useState5 } from "react";
|
|
2426
2885
|
import * as Dialog2 from "@radix-ui/react-dialog";
|
|
2427
|
-
import { jsx as
|
|
2886
|
+
import { jsx as jsx26, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
2428
2887
|
function CommandPalette({
|
|
2429
2888
|
items,
|
|
2430
2889
|
isOpen,
|
|
@@ -2436,27 +2895,27 @@ function CommandPalette({
|
|
|
2436
2895
|
inputId,
|
|
2437
2896
|
inputDataTest
|
|
2438
2897
|
}) {
|
|
2439
|
-
const [query, setQuery] =
|
|
2440
|
-
const [selectedIndex, setSelectedIndex] =
|
|
2441
|
-
const inputRef =
|
|
2442
|
-
const listboxRef =
|
|
2443
|
-
const restoreFocusRef =
|
|
2444
|
-
const generatedId =
|
|
2898
|
+
const [query, setQuery] = useState5("");
|
|
2899
|
+
const [selectedIndex, setSelectedIndex] = useState5(0);
|
|
2900
|
+
const inputRef = useRef4(null);
|
|
2901
|
+
const listboxRef = useRef4(null);
|
|
2902
|
+
const restoreFocusRef = useRef4(null);
|
|
2903
|
+
const generatedId = useId7();
|
|
2445
2904
|
const listboxId = `${id != null ? id : `command-palette-${generatedId}`}-listbox`;
|
|
2446
2905
|
const filtered = items.filter(
|
|
2447
2906
|
(item) => item.label.toLowerCase().includes(query.toLowerCase())
|
|
2448
2907
|
);
|
|
2449
2908
|
const activeIndex = filtered.length ? Math.min(selectedIndex, filtered.length - 1) : 0;
|
|
2450
2909
|
const activeItem = filtered[activeIndex];
|
|
2451
|
-
|
|
2910
|
+
useEffect3(() => {
|
|
2452
2911
|
if (!isOpen) return;
|
|
2453
2912
|
setQuery("");
|
|
2454
2913
|
setSelectedIndex(0);
|
|
2455
2914
|
}, [isOpen]);
|
|
2456
|
-
|
|
2915
|
+
useEffect3(() => {
|
|
2457
2916
|
setSelectedIndex((current) => Math.min(current, Math.max(filtered.length - 1, 0)));
|
|
2458
2917
|
}, [filtered.length]);
|
|
2459
|
-
|
|
2918
|
+
useEffect3(() => {
|
|
2460
2919
|
var _a, _b;
|
|
2461
2920
|
if (!isOpen || !activeItem) return;
|
|
2462
2921
|
(_b = (_a = listboxRef.current) == null ? void 0 : _a.querySelectorAll('[role="option"]')[activeIndex]) == null ? void 0 : _b.scrollIntoView({ block: "nearest" });
|
|
@@ -2485,29 +2944,26 @@ function CommandPalette({
|
|
|
2485
2944
|
return;
|
|
2486
2945
|
}
|
|
2487
2946
|
};
|
|
2488
|
-
return /* @__PURE__ */
|
|
2947
|
+
return /* @__PURE__ */ jsx26(
|
|
2489
2948
|
Dialog2.Root,
|
|
2490
2949
|
{
|
|
2491
2950
|
open: isOpen,
|
|
2492
2951
|
onOpenChange: (nextOpen) => {
|
|
2493
2952
|
if (!nextOpen) onClose();
|
|
2494
2953
|
},
|
|
2495
|
-
children: /* @__PURE__ */
|
|
2496
|
-
/* @__PURE__ */
|
|
2954
|
+
children: /* @__PURE__ */ jsxs23(Dialog2.Portal, { children: [
|
|
2955
|
+
/* @__PURE__ */ jsx26(
|
|
2497
2956
|
Dialog2.Overlay,
|
|
2498
2957
|
{
|
|
2499
2958
|
id,
|
|
2500
2959
|
"data-test": dataTest,
|
|
2501
|
-
className: "
|
|
2960
|
+
className: "ph-command-palette__overlay"
|
|
2502
2961
|
}
|
|
2503
2962
|
),
|
|
2504
|
-
/* @__PURE__ */
|
|
2963
|
+
/* @__PURE__ */ jsxs23(
|
|
2505
2964
|
Dialog2.Content,
|
|
2506
2965
|
{
|
|
2507
|
-
className: cn(
|
|
2508
|
-
"fixed left-1/2 top-[20vh] z-50 w-full max-w-xl -translate-x-1/2 overflow-hidden rounded-xl border border-ph-border bg-ph-surface shadow-ph-md",
|
|
2509
|
-
className
|
|
2510
|
-
),
|
|
2966
|
+
className: cn("ph-command-palette", className),
|
|
2511
2967
|
onOpenAutoFocus: (event) => {
|
|
2512
2968
|
var _a;
|
|
2513
2969
|
restoreFocusRef.current = document.activeElement instanceof HTMLElement ? document.activeElement : null;
|
|
@@ -2520,10 +2976,10 @@ function CommandPalette({
|
|
|
2520
2976
|
(_a = restoreFocusRef.current) == null ? void 0 : _a.focus();
|
|
2521
2977
|
},
|
|
2522
2978
|
children: [
|
|
2523
|
-
/* @__PURE__ */
|
|
2524
|
-
/* @__PURE__ */
|
|
2525
|
-
/* @__PURE__ */
|
|
2526
|
-
/* @__PURE__ */
|
|
2979
|
+
/* @__PURE__ */ jsx26(Dialog2.Title, { className: "sr-only", children: "Command palette" }),
|
|
2980
|
+
/* @__PURE__ */ jsxs23("div", { className: "ph-command-palette__search", children: [
|
|
2981
|
+
/* @__PURE__ */ jsx26(IconSearch, { className: "h-5 w-5 text-ph-mutedtext" }),
|
|
2982
|
+
/* @__PURE__ */ jsx26(
|
|
2527
2983
|
"input",
|
|
2528
2984
|
{
|
|
2529
2985
|
ref: inputRef,
|
|
@@ -2546,9 +3002,9 @@ function CommandPalette({
|
|
|
2546
3002
|
className: "flex-1 bg-transparent text-ph-ink outline-none placeholder:text-ph-mutedtext"
|
|
2547
3003
|
}
|
|
2548
3004
|
),
|
|
2549
|
-
/* @__PURE__ */
|
|
3005
|
+
/* @__PURE__ */ jsx26("kbd", { "aria-hidden": "true", className: "ph-keycap", children: "ESC" })
|
|
2550
3006
|
] }),
|
|
2551
|
-
/* @__PURE__ */
|
|
3007
|
+
/* @__PURE__ */ jsx26("div", { ref: listboxRef, id: listboxId, role: "listbox", "aria-label": "Commands", className: "max-h-[50vh] overflow-y-auto py-2", children: filtered.length === 0 ? /* @__PURE__ */ jsx26("div", { role: "status", className: "px-4 py-8 text-center text-sm text-ph-mutedtext", children: "No results found." }) : filtered.map((item, index) => /* @__PURE__ */ jsxs23(
|
|
2552
3008
|
"div",
|
|
2553
3009
|
{
|
|
2554
3010
|
id: `command-${item.id}`,
|
|
@@ -2561,13 +3017,13 @@ function CommandPalette({
|
|
|
2561
3017
|
},
|
|
2562
3018
|
onMouseEnter: () => setSelectedIndex(index),
|
|
2563
3019
|
className: cn(
|
|
2564
|
-
"
|
|
2565
|
-
index === activeIndex ? "
|
|
3020
|
+
"ph-command-palette__option",
|
|
3021
|
+
index === activeIndex ? "ph-command-palette__option--selected" : "text-ph-subtle"
|
|
2566
3022
|
),
|
|
2567
3023
|
children: [
|
|
2568
|
-
item.icon && /* @__PURE__ */
|
|
2569
|
-
/* @__PURE__ */
|
|
2570
|
-
item.shortcut && /* @__PURE__ */
|
|
3024
|
+
item.icon && /* @__PURE__ */ jsx26("span", { "aria-hidden": "true", className: "h-5 w-5", children: item.icon }),
|
|
3025
|
+
/* @__PURE__ */ jsx26("span", { className: "flex-1", children: item.label }),
|
|
3026
|
+
item.shortcut && /* @__PURE__ */ jsx26("kbd", { "aria-hidden": "true", className: "ph-keycap text-ph-mutedtext", children: item.shortcut })
|
|
2571
3027
|
]
|
|
2572
3028
|
},
|
|
2573
3029
|
item.id
|
|
@@ -2581,8 +3037,8 @@ function CommandPalette({
|
|
|
2581
3037
|
}
|
|
2582
3038
|
|
|
2583
3039
|
// src/components/ui/Calendar.tsx
|
|
2584
|
-
import { useEffect as
|
|
2585
|
-
import { jsx as
|
|
3040
|
+
import { useEffect as useEffect4, useId as useId8, useRef as useRef5, useState as useState6 } from "react";
|
|
3041
|
+
import { jsx as jsx27, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
2586
3042
|
var monthNames = [
|
|
2587
3043
|
"January",
|
|
2588
3044
|
"February",
|
|
@@ -2639,19 +3095,19 @@ function dateLabel(date) {
|
|
|
2639
3095
|
return `${fullWeekDays[date.getDay()]}, ${date.getDate()} ${monthNames[date.getMonth()]} ${date.getFullYear()}`;
|
|
2640
3096
|
}
|
|
2641
3097
|
function Calendar({ value, onChange, className }) {
|
|
2642
|
-
const [currentMonth, setCurrentMonth] =
|
|
2643
|
-
const [focusedDate, setFocusedDate] =
|
|
2644
|
-
const gridRef =
|
|
2645
|
-
const shouldFocusDateRef =
|
|
2646
|
-
const monthLabelId =
|
|
3098
|
+
const [currentMonth, setCurrentMonth] = useState6(() => startOfMonth(value != null ? value : /* @__PURE__ */ new Date()));
|
|
3099
|
+
const [focusedDate, setFocusedDate] = useState6(() => startOfDay(value != null ? value : /* @__PURE__ */ new Date()));
|
|
3100
|
+
const gridRef = useRef5(null);
|
|
3101
|
+
const shouldFocusDateRef = useRef5(false);
|
|
3102
|
+
const monthLabelId = useId8();
|
|
2647
3103
|
const today = startOfDay(/* @__PURE__ */ new Date());
|
|
2648
|
-
|
|
3104
|
+
useEffect4(() => {
|
|
2649
3105
|
if (!value) return;
|
|
2650
3106
|
const nextDate = startOfDay(value);
|
|
2651
3107
|
setCurrentMonth(startOfMonth(nextDate));
|
|
2652
3108
|
setFocusedDate(nextDate);
|
|
2653
3109
|
}, [value]);
|
|
2654
|
-
|
|
3110
|
+
useEffect4(() => {
|
|
2655
3111
|
var _a, _b;
|
|
2656
3112
|
if (!shouldFocusDateRef.current) return;
|
|
2657
3113
|
(_b = (_a = gridRef.current) == null ? void 0 : _a.querySelector(`[data-date="${dateKey(focusedDate)}"]`)) == null ? void 0 : _b.focus();
|
|
@@ -2720,36 +3176,36 @@ function Calendar({ value, onChange, className }) {
|
|
|
2720
3176
|
while (days.length < 42) {
|
|
2721
3177
|
days.push(null);
|
|
2722
3178
|
}
|
|
2723
|
-
return /* @__PURE__ */
|
|
2724
|
-
/* @__PURE__ */
|
|
2725
|
-
/* @__PURE__ */
|
|
3179
|
+
return /* @__PURE__ */ jsxs24("div", { className: cn("ph-calendar w-[280px] p-4", className), children: [
|
|
3180
|
+
/* @__PURE__ */ jsxs24("div", { className: "mb-4 flex items-center justify-between", children: [
|
|
3181
|
+
/* @__PURE__ */ jsx27(
|
|
2726
3182
|
"button",
|
|
2727
3183
|
{
|
|
2728
3184
|
type: "button",
|
|
2729
3185
|
onClick: () => changeMonth(-1),
|
|
2730
3186
|
"aria-label": "Previous month",
|
|
2731
|
-
className: "
|
|
2732
|
-
children: /* @__PURE__ */
|
|
3187
|
+
className: "ph-calendar__nav",
|
|
3188
|
+
children: /* @__PURE__ */ jsx27(IconChevronLeft, { className: "h-5 w-5", "aria-hidden": true })
|
|
2733
3189
|
}
|
|
2734
3190
|
),
|
|
2735
|
-
/* @__PURE__ */
|
|
3191
|
+
/* @__PURE__ */ jsxs24("span", { id: monthLabelId, "aria-live": "polite", className: "text-sm font-semibold text-ph-ink", children: [
|
|
2736
3192
|
monthNames[month],
|
|
2737
3193
|
" ",
|
|
2738
3194
|
year
|
|
2739
3195
|
] }),
|
|
2740
|
-
/* @__PURE__ */
|
|
3196
|
+
/* @__PURE__ */ jsx27(
|
|
2741
3197
|
"button",
|
|
2742
3198
|
{
|
|
2743
3199
|
type: "button",
|
|
2744
3200
|
onClick: () => changeMonth(1),
|
|
2745
3201
|
"aria-label": "Next month",
|
|
2746
|
-
className: "
|
|
2747
|
-
children: /* @__PURE__ */
|
|
3202
|
+
className: "ph-calendar__nav",
|
|
3203
|
+
children: /* @__PURE__ */ jsx27(IconChevronRight, { className: "h-5 w-5", "aria-hidden": true })
|
|
2748
3204
|
}
|
|
2749
3205
|
)
|
|
2750
3206
|
] }),
|
|
2751
|
-
/* @__PURE__ */
|
|
2752
|
-
/* @__PURE__ */
|
|
3207
|
+
/* @__PURE__ */ jsxs24("div", { ref: gridRef, role: "grid", "aria-labelledby": monthLabelId, children: [
|
|
3208
|
+
/* @__PURE__ */ jsx27("div", { role: "row", className: "grid grid-cols-7 gap-1", children: weekDays.map((day, index) => /* @__PURE__ */ jsx27(
|
|
2753
3209
|
"div",
|
|
2754
3210
|
{
|
|
2755
3211
|
role: "columnheader",
|
|
@@ -2762,14 +3218,14 @@ function Calendar({ value, onChange, className }) {
|
|
|
2762
3218
|
Array.from({ length: 6 }, (_, week) => {
|
|
2763
3219
|
const weekDates = days.slice(week * 7, week * 7 + 7);
|
|
2764
3220
|
if (weekDates.length === 0 || weekDates.every((date) => !date)) return null;
|
|
2765
|
-
return /* @__PURE__ */
|
|
2766
|
-
(date, day) => date ? /* @__PURE__ */
|
|
3221
|
+
return /* @__PURE__ */ jsx27("div", { role: "row", className: "grid grid-cols-7 gap-1", children: weekDates.map(
|
|
3222
|
+
(date, day) => date ? /* @__PURE__ */ jsx27(
|
|
2767
3223
|
"div",
|
|
2768
3224
|
{
|
|
2769
3225
|
role: "gridcell",
|
|
2770
3226
|
"aria-selected": value ? isSameDay(value, date) : false,
|
|
2771
3227
|
className: "aspect-square",
|
|
2772
|
-
children: /* @__PURE__ */
|
|
3228
|
+
children: /* @__PURE__ */ jsx27(
|
|
2773
3229
|
"button",
|
|
2774
3230
|
{
|
|
2775
3231
|
type: "button",
|
|
@@ -2780,15 +3236,15 @@ function Calendar({ value, onChange, className }) {
|
|
|
2780
3236
|
onClick: () => handleSelect(date),
|
|
2781
3237
|
onKeyDown: (event) => handleDayKeyDown(event, date),
|
|
2782
3238
|
className: cn(
|
|
2783
|
-
"
|
|
2784
|
-
value && isSameDay(value, date) ? "
|
|
3239
|
+
"ph-calendar__day",
|
|
3240
|
+
value && isSameDay(value, date) ? "ph-calendar__day--selected" : isSameDay(today, date) ? "ph-calendar__day--today" : void 0
|
|
2785
3241
|
),
|
|
2786
3242
|
children: date.getDate()
|
|
2787
3243
|
}
|
|
2788
3244
|
)
|
|
2789
3245
|
},
|
|
2790
3246
|
dateKey(date)
|
|
2791
|
-
) : /* @__PURE__ */
|
|
3247
|
+
) : /* @__PURE__ */ jsx27("div", { role: "gridcell", "aria-hidden": "true", className: "aspect-square" }, `empty-${week}-${day}`)
|
|
2792
3248
|
) }, week);
|
|
2793
3249
|
})
|
|
2794
3250
|
] })
|
|
@@ -2801,20 +3257,20 @@ import {
|
|
|
2801
3257
|
createContext,
|
|
2802
3258
|
useCallback,
|
|
2803
3259
|
useContext,
|
|
2804
|
-
useEffect as
|
|
2805
|
-
useId as
|
|
3260
|
+
useEffect as useEffect5,
|
|
3261
|
+
useId as useId9,
|
|
2806
3262
|
useLayoutEffect as useLayoutEffect2,
|
|
2807
|
-
useRef as
|
|
2808
|
-
useState as
|
|
3263
|
+
useRef as useRef6,
|
|
3264
|
+
useState as useState7
|
|
2809
3265
|
} from "react";
|
|
2810
3266
|
import { createPortal } from "react-dom";
|
|
2811
|
-
import { Fragment as Fragment5, jsx as
|
|
3267
|
+
import { Fragment as Fragment5, jsx as jsx28, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
2812
3268
|
var TooltipDelayContext = createContext(0);
|
|
2813
3269
|
function TooltipProvider({
|
|
2814
3270
|
children,
|
|
2815
3271
|
delayDuration = 0
|
|
2816
3272
|
}) {
|
|
2817
|
-
return /* @__PURE__ */
|
|
3273
|
+
return /* @__PURE__ */ jsx28(TooltipDelayContext.Provider, { value: delayDuration, children });
|
|
2818
3274
|
}
|
|
2819
3275
|
function tooltipPosition(trigger, content, side, align, offset, collisionPadding) {
|
|
2820
3276
|
const horizontal = align === "start" ? trigger.left : align === "end" ? trigger.right : trigger.left + trigger.width / 2;
|
|
@@ -2842,12 +3298,12 @@ function Tooltip({
|
|
|
2842
3298
|
disableHoverableContent = false
|
|
2843
3299
|
}) {
|
|
2844
3300
|
const providerDelay = useContext(TooltipDelayContext);
|
|
2845
|
-
const generatedId =
|
|
2846
|
-
const triggerRef =
|
|
2847
|
-
const contentRef =
|
|
2848
|
-
const timerRef =
|
|
2849
|
-
const [internalOpen, setInternalOpen] =
|
|
2850
|
-
const [position, setPosition] =
|
|
3301
|
+
const generatedId = useId9().replace(/:/g, "");
|
|
3302
|
+
const triggerRef = useRef6(null);
|
|
3303
|
+
const contentRef = useRef6(null);
|
|
3304
|
+
const timerRef = useRef6(null);
|
|
3305
|
+
const [internalOpen, setInternalOpen] = useState7(defaultOpen);
|
|
3306
|
+
const [position, setPosition] = useState7(null);
|
|
2851
3307
|
const isOpen = open != null ? open : internalOpen;
|
|
2852
3308
|
const triggerId = children.props.id;
|
|
2853
3309
|
const tooltipId = triggerId ? `${triggerId}-tooltip` : `ph-tooltip-${generatedId}`;
|
|
@@ -2894,7 +3350,7 @@ function Tooltip({
|
|
|
2894
3350
|
useLayoutEffect2(() => {
|
|
2895
3351
|
if (isOpen) updatePosition();
|
|
2896
3352
|
}, [isOpen, updatePosition]);
|
|
2897
|
-
|
|
3353
|
+
useEffect5(() => {
|
|
2898
3354
|
if (!isOpen) return;
|
|
2899
3355
|
const reposition = () => updatePosition();
|
|
2900
3356
|
window.addEventListener("resize", reposition);
|
|
@@ -2904,11 +3360,11 @@ function Tooltip({
|
|
|
2904
3360
|
window.removeEventListener("scroll", reposition, true);
|
|
2905
3361
|
};
|
|
2906
3362
|
}, [isOpen, updatePosition]);
|
|
2907
|
-
|
|
3363
|
+
useEffect5(() => () => clearTimer(), []);
|
|
2908
3364
|
const describedBy = [children.props["aria-describedby"], tooltipId].filter(Boolean).join(" ");
|
|
2909
3365
|
const trigger = cloneElement(children, { "aria-describedby": describedBy });
|
|
2910
|
-
return /* @__PURE__ */
|
|
2911
|
-
/* @__PURE__ */
|
|
3366
|
+
return /* @__PURE__ */ jsxs25(Fragment5, { children: [
|
|
3367
|
+
/* @__PURE__ */ jsx28(
|
|
2912
3368
|
"span",
|
|
2913
3369
|
{
|
|
2914
3370
|
ref: triggerRef,
|
|
@@ -2924,12 +3380,12 @@ function Tooltip({
|
|
|
2924
3380
|
}
|
|
2925
3381
|
),
|
|
2926
3382
|
isOpen && typeof document !== "undefined" ? createPortal(
|
|
2927
|
-
/* @__PURE__ */
|
|
3383
|
+
/* @__PURE__ */ jsx28(
|
|
2928
3384
|
"span",
|
|
2929
3385
|
{
|
|
2930
3386
|
style: __spreadProps(__spreadValues({ position: "fixed" }, position), { visibility: position ? void 0 : "hidden" }),
|
|
2931
3387
|
className: "pointer-events-none z-[200]",
|
|
2932
|
-
children: /* @__PURE__ */
|
|
3388
|
+
children: /* @__PURE__ */ jsx28(
|
|
2933
3389
|
"span",
|
|
2934
3390
|
{
|
|
2935
3391
|
ref: contentRef,
|
|
@@ -2954,27 +3410,27 @@ function Tooltip({
|
|
|
2954
3410
|
}
|
|
2955
3411
|
|
|
2956
3412
|
// src/components/ui/EmptyState.tsx
|
|
2957
|
-
import { jsx as
|
|
3413
|
+
import { jsx as jsx29, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
2958
3414
|
function EmptyState({ icon, title, description, action, className }) {
|
|
2959
|
-
return /* @__PURE__ */
|
|
3415
|
+
return /* @__PURE__ */ jsxs26(
|
|
2960
3416
|
"div",
|
|
2961
3417
|
{
|
|
2962
3418
|
className: cn(
|
|
2963
|
-
"
|
|
3419
|
+
"ph-empty-state",
|
|
2964
3420
|
className
|
|
2965
3421
|
),
|
|
2966
3422
|
children: [
|
|
2967
|
-
icon && /* @__PURE__ */
|
|
2968
|
-
/* @__PURE__ */
|
|
2969
|
-
description && /* @__PURE__ */
|
|
2970
|
-
action && /* @__PURE__ */
|
|
3423
|
+
icon && /* @__PURE__ */ jsx29("div", { className: "ph-empty-state__icon", children: icon }),
|
|
3424
|
+
/* @__PURE__ */ jsx29("h2", { className: "text-base font-semibold text-ph-ink", children: title }),
|
|
3425
|
+
description && /* @__PURE__ */ jsx29("p", { className: "mt-1 max-w-sm text-sm text-ph-subtle", children: description }),
|
|
3426
|
+
action && /* @__PURE__ */ jsx29("div", { className: "mt-4", children: action })
|
|
2971
3427
|
]
|
|
2972
3428
|
}
|
|
2973
3429
|
);
|
|
2974
3430
|
}
|
|
2975
3431
|
|
|
2976
3432
|
// src/components/ui/FilterChips.tsx
|
|
2977
|
-
import { Fragment as Fragment6, jsx as
|
|
3433
|
+
import { Fragment as Fragment6, jsx as jsx30, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
2978
3434
|
function FilterChips({
|
|
2979
3435
|
chips,
|
|
2980
3436
|
onToggle,
|
|
@@ -2982,20 +3438,20 @@ function FilterChips({
|
|
|
2982
3438
|
className,
|
|
2983
3439
|
"aria-label": ariaLabel = "Applied filters"
|
|
2984
3440
|
}) {
|
|
2985
|
-
return /* @__PURE__ */
|
|
3441
|
+
return /* @__PURE__ */ jsx30("div", { className: cn("ph-filter-chips", className), role: "group", "aria-label": ariaLabel, children: chips.map((chip) => {
|
|
2986
3442
|
var _a;
|
|
2987
3443
|
const label = (_a = chip.removeLabel) != null ? _a : getChipText(chip);
|
|
2988
|
-
const content = /* @__PURE__ */
|
|
2989
|
-
/* @__PURE__ */
|
|
2990
|
-
chip.value != null ? /* @__PURE__ */
|
|
3444
|
+
const content = /* @__PURE__ */ jsxs27(Fragment6, { children: [
|
|
3445
|
+
/* @__PURE__ */ jsx30("span", { className: "ph-filter-chip__label", children: chip.label }),
|
|
3446
|
+
chip.value != null ? /* @__PURE__ */ jsx30("span", { className: "ph-filter-chip__value", children: chip.value }) : null
|
|
2991
3447
|
] });
|
|
2992
|
-
return /* @__PURE__ */
|
|
3448
|
+
return /* @__PURE__ */ jsxs27(
|
|
2993
3449
|
"span",
|
|
2994
3450
|
{
|
|
2995
3451
|
className: cn("ph-filter-chip", chip.active && "ph-filter-chip--active"),
|
|
2996
3452
|
"data-state": chip.active ? "on" : "off",
|
|
2997
3453
|
children: [
|
|
2998
|
-
onToggle ? /* @__PURE__ */
|
|
3454
|
+
onToggle ? /* @__PURE__ */ jsx30(
|
|
2999
3455
|
"button",
|
|
3000
3456
|
{
|
|
3001
3457
|
type: "button",
|
|
@@ -3004,15 +3460,15 @@ function FilterChips({
|
|
|
3004
3460
|
onClick: () => onToggle(chip.id),
|
|
3005
3461
|
children: content
|
|
3006
3462
|
}
|
|
3007
|
-
) : /* @__PURE__ */
|
|
3008
|
-
chip.active && onRemove ? /* @__PURE__ */
|
|
3463
|
+
) : /* @__PURE__ */ jsx30("span", { className: "ph-filter-chip__main", children: content }),
|
|
3464
|
+
chip.active && onRemove ? /* @__PURE__ */ jsx30(
|
|
3009
3465
|
"button",
|
|
3010
3466
|
{
|
|
3011
3467
|
type: "button",
|
|
3012
3468
|
className: "ph-filter-chip__remove",
|
|
3013
3469
|
"aria-label": `Remove ${label} filter`,
|
|
3014
3470
|
onClick: () => onRemove(chip.id),
|
|
3015
|
-
children: /* @__PURE__ */
|
|
3471
|
+
children: /* @__PURE__ */ jsx30(IconClose, { className: "h-3 w-3", "aria-hidden": true })
|
|
3016
3472
|
}
|
|
3017
3473
|
) : null
|
|
3018
3474
|
]
|
|
@@ -3028,7 +3484,7 @@ function getChipText(chip) {
|
|
|
3028
3484
|
}
|
|
3029
3485
|
|
|
3030
3486
|
// src/components/ui/FilterBar.tsx
|
|
3031
|
-
import { jsx as
|
|
3487
|
+
import { jsx as jsx31, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
3032
3488
|
function FilterBar(_a) {
|
|
3033
3489
|
var _b = _a, {
|
|
3034
3490
|
children,
|
|
@@ -3045,12 +3501,12 @@ function FilterBar(_a) {
|
|
|
3045
3501
|
"resultCount",
|
|
3046
3502
|
"className"
|
|
3047
3503
|
]);
|
|
3048
|
-
return /* @__PURE__ */
|
|
3049
|
-
/* @__PURE__ */
|
|
3504
|
+
return /* @__PURE__ */ jsxs28("div", __spreadProps(__spreadValues({ className: cn("ph-filter-bar", className) }, props), { children: [
|
|
3505
|
+
/* @__PURE__ */ jsxs28("div", { className: "ph-filter-bar__controls", role: "group", "aria-label": label, children: [
|
|
3050
3506
|
children,
|
|
3051
|
-
onClear ? /* @__PURE__ */
|
|
3507
|
+
onClear ? /* @__PURE__ */ jsx31("button", { type: "button", className: "ph-filter-bar__clear", onClick: onClear, children: clearLabel }) : null
|
|
3052
3508
|
] }),
|
|
3053
|
-
resultCount != null ? /* @__PURE__ */
|
|
3509
|
+
resultCount != null ? /* @__PURE__ */ jsx31("output", { className: "ph-filter-bar__results", "aria-live": "polite", children: resultCount }) : null
|
|
3054
3510
|
] }));
|
|
3055
3511
|
}
|
|
3056
3512
|
function FilterMenu({
|
|
@@ -3067,19 +3523,19 @@ function FilterMenu({
|
|
|
3067
3523
|
const selected = options.find((option) => option.value === value);
|
|
3068
3524
|
const displayValue = (_a = selected == null ? void 0 : selected.label) != null ? _a : placeholder;
|
|
3069
3525
|
const accessibleValue = selected ? getOptionText(selected) : String(placeholder);
|
|
3070
|
-
return /* @__PURE__ */
|
|
3526
|
+
return /* @__PURE__ */ jsx31(
|
|
3071
3527
|
DropdownMenu,
|
|
3072
3528
|
{
|
|
3073
3529
|
"aria-label": `${label}: ${accessibleValue}`,
|
|
3074
3530
|
align,
|
|
3075
3531
|
disabled,
|
|
3076
3532
|
className,
|
|
3077
|
-
trigger: /* @__PURE__ */
|
|
3078
|
-
/* @__PURE__ */
|
|
3079
|
-
/* @__PURE__ */
|
|
3080
|
-
/* @__PURE__ */
|
|
3533
|
+
trigger: /* @__PURE__ */ jsxs28("span", { className: cn("ph-filter-menu-trigger", selected && "ph-filter-menu-trigger--active"), children: [
|
|
3534
|
+
/* @__PURE__ */ jsx31(IconTuning, { className: "h-3.5 w-3.5", "aria-hidden": true }),
|
|
3535
|
+
/* @__PURE__ */ jsx31("span", { className: "ph-filter-menu-trigger__label", children: label }),
|
|
3536
|
+
/* @__PURE__ */ jsx31("span", { className: "ph-filter-menu-trigger__value", children: displayValue })
|
|
3081
3537
|
] }),
|
|
3082
|
-
children: /* @__PURE__ */
|
|
3538
|
+
children: /* @__PURE__ */ jsx31(DropdownRadioGroup, { value, onValueChange, children: options.map((option) => /* @__PURE__ */ jsx31(
|
|
3083
3539
|
DropdownRadioItem,
|
|
3084
3540
|
{
|
|
3085
3541
|
value: option.value,
|
|
@@ -3103,25 +3559,25 @@ function SortMenu({
|
|
|
3103
3559
|
className
|
|
3104
3560
|
}) {
|
|
3105
3561
|
const selected = options.find((option) => option.value === value);
|
|
3106
|
-
return /* @__PURE__ */
|
|
3562
|
+
return /* @__PURE__ */ jsx31(
|
|
3107
3563
|
DropdownMenu,
|
|
3108
3564
|
{
|
|
3109
3565
|
"aria-label": `${label}: ${selected ? getOptionText(selected) : "Choose sort order"}`,
|
|
3110
3566
|
align,
|
|
3111
3567
|
disabled,
|
|
3112
3568
|
className,
|
|
3113
|
-
trigger: /* @__PURE__ */
|
|
3114
|
-
/* @__PURE__ */
|
|
3569
|
+
trigger: /* @__PURE__ */ jsxs28("span", { className: "ph-filter-menu-trigger ph-sort-menu-trigger", children: [
|
|
3570
|
+
/* @__PURE__ */ jsx31(
|
|
3115
3571
|
IconArrowDown,
|
|
3116
3572
|
{
|
|
3117
3573
|
className: cn("h-3.5 w-3.5", direction === "ascending" && "rotate-180"),
|
|
3118
3574
|
"aria-hidden": true
|
|
3119
3575
|
}
|
|
3120
3576
|
),
|
|
3121
|
-
/* @__PURE__ */
|
|
3122
|
-
selected ? /* @__PURE__ */
|
|
3577
|
+
/* @__PURE__ */ jsx31("span", { className: "ph-filter-menu-trigger__label", children: label }),
|
|
3578
|
+
selected ? /* @__PURE__ */ jsx31("span", { className: "ph-filter-menu-trigger__value", children: selected.label }) : null
|
|
3123
3579
|
] }),
|
|
3124
|
-
children: /* @__PURE__ */
|
|
3580
|
+
children: /* @__PURE__ */ jsx31(DropdownRadioGroup, { value, onValueChange, children: options.map((option) => /* @__PURE__ */ jsx31(
|
|
3125
3581
|
DropdownRadioItem,
|
|
3126
3582
|
{
|
|
3127
3583
|
value: option.value,
|
|
@@ -3141,7 +3597,7 @@ function getOptionText(option) {
|
|
|
3141
3597
|
}
|
|
3142
3598
|
|
|
3143
3599
|
// src/components/ui/FilterControls.tsx
|
|
3144
|
-
import { jsx as
|
|
3600
|
+
import { jsx as jsx32, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
3145
3601
|
function FilterControls(_a) {
|
|
3146
3602
|
var _b = _a, {
|
|
3147
3603
|
children,
|
|
@@ -3157,71 +3613,64 @@ function FilterControls(_a) {
|
|
|
3157
3613
|
"className"
|
|
3158
3614
|
]);
|
|
3159
3615
|
const hasChips = Boolean(chipsProps == null ? void 0 : chipsProps.chips.length);
|
|
3160
|
-
return /* @__PURE__ */
|
|
3161
|
-
/* @__PURE__ */
|
|
3162
|
-
hasChips && chipsProps ? /* @__PURE__ */
|
|
3616
|
+
return /* @__PURE__ */ jsxs29("div", __spreadProps(__spreadValues({ className: cn("ph-filter-controls", className) }, props), { children: [
|
|
3617
|
+
/* @__PURE__ */ jsx32(FilterBar, __spreadProps(__spreadValues({}, barProps), { children })),
|
|
3618
|
+
hasChips && chipsProps ? /* @__PURE__ */ jsx32(FilterChips, __spreadValues({}, chipsProps)) : emptyState != null ? emptyState : null
|
|
3163
3619
|
] }));
|
|
3164
3620
|
}
|
|
3165
3621
|
|
|
3166
3622
|
// src/components/ui/CodeBlock.tsx
|
|
3167
|
-
import { useState as
|
|
3168
|
-
import { jsx as
|
|
3623
|
+
import { useState as useState8 } from "react";
|
|
3624
|
+
import { jsx as jsx33, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
3169
3625
|
function CodeBlock({ code, language = "tsx", filename, className }) {
|
|
3170
|
-
const [copied, setCopied] =
|
|
3626
|
+
const [copied, setCopied] = useState8(false);
|
|
3171
3627
|
const handleCopy = async () => {
|
|
3172
3628
|
await navigator.clipboard.writeText(code);
|
|
3173
3629
|
setCopied(true);
|
|
3174
3630
|
setTimeout(() => setCopied(false), 2e3);
|
|
3175
3631
|
};
|
|
3176
|
-
return /* @__PURE__ */
|
|
3177
|
-
(filename || language) && /* @__PURE__ */
|
|
3178
|
-
/* @__PURE__ */
|
|
3179
|
-
|
|
3180
|
-
/* @__PURE__ */ jsx31("div", { className: "h-3 w-3 rounded-full bg-red-400" }),
|
|
3181
|
-
/* @__PURE__ */ jsx31("div", { className: "h-3 w-3 rounded-full bg-amber-400" }),
|
|
3182
|
-
/* @__PURE__ */ jsx31("div", { className: "h-3 w-3 rounded-full bg-emerald-400" })
|
|
3183
|
-
] }),
|
|
3184
|
-
filename && /* @__PURE__ */ jsx31("span", { className: "ml-2 text-xs text-white/60", children: filename })
|
|
3185
|
-
] }),
|
|
3186
|
-
/* @__PURE__ */ jsx31(
|
|
3632
|
+
return /* @__PURE__ */ jsxs30("div", { className: cn("ph-code-block", className), children: [
|
|
3633
|
+
(filename || language) && /* @__PURE__ */ jsxs30("div", { className: "flex items-center justify-between border-b border-white/10 px-4 py-2", children: [
|
|
3634
|
+
/* @__PURE__ */ jsx33("span", { className: "text-xs text-white/60", children: filename != null ? filename : language }),
|
|
3635
|
+
/* @__PURE__ */ jsx33(
|
|
3187
3636
|
"button",
|
|
3188
3637
|
{
|
|
3189
3638
|
type: "button",
|
|
3190
3639
|
onClick: handleCopy,
|
|
3191
|
-
className: "
|
|
3640
|
+
className: "ph-code-block__copy",
|
|
3192
3641
|
children: copied ? "Copied!" : "Copy"
|
|
3193
3642
|
}
|
|
3194
3643
|
)
|
|
3195
3644
|
] }),
|
|
3196
|
-
/* @__PURE__ */
|
|
3645
|
+
/* @__PURE__ */ jsx33("pre", { className: "overflow-x-auto p-4 text-sm leading-relaxed", children: /* @__PURE__ */ jsx33("code", { className: "font-mono text-[#e4e4e7]", children: code }) })
|
|
3197
3646
|
] });
|
|
3198
3647
|
}
|
|
3199
3648
|
|
|
3200
3649
|
// src/components/ui/ComponentDocs.tsx
|
|
3201
|
-
import { jsx as
|
|
3650
|
+
import { jsx as jsx34, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
3202
3651
|
function ComponentDocs({ title = "Props & variants", rows, defaultOpen = false, className }) {
|
|
3203
|
-
return /* @__PURE__ */
|
|
3204
|
-
/* @__PURE__ */
|
|
3205
|
-
/* @__PURE__ */
|
|
3206
|
-
/* @__PURE__ */
|
|
3207
|
-
/* @__PURE__ */
|
|
3208
|
-
/* @__PURE__ */
|
|
3652
|
+
return /* @__PURE__ */ jsxs31("details", { className: cn("ph-panel group overflow-hidden p-0", className), open: defaultOpen, children: [
|
|
3653
|
+
/* @__PURE__ */ jsxs31("summary", { className: "flex cursor-pointer list-none items-center justify-between gap-4 border-b border-ph-border px-4 py-3 transition hover:bg-ph-muted/60 [&::-webkit-details-marker]:hidden", children: [
|
|
3654
|
+
/* @__PURE__ */ jsx34("h3", { className: "text-xs font-semibold uppercase tracking-wider text-ph-mutedtext", children: title }),
|
|
3655
|
+
/* @__PURE__ */ jsxs31("span", { className: "rounded-full border border-ph-border bg-ph-surface px-2 py-1 text-[10px] font-semibold uppercase tracking-wider text-ph-mutedtext transition group-open:bg-ph-brand group-open:text-white", children: [
|
|
3656
|
+
/* @__PURE__ */ jsx34("span", { className: "group-open:hidden", children: "Show" }),
|
|
3657
|
+
/* @__PURE__ */ jsx34("span", { className: "hidden group-open:inline", children: "Hide" })
|
|
3209
3658
|
] })
|
|
3210
3659
|
] }),
|
|
3211
|
-
/* @__PURE__ */
|
|
3212
|
-
/* @__PURE__ */
|
|
3213
|
-
/* @__PURE__ */
|
|
3214
|
-
/* @__PURE__ */
|
|
3215
|
-
/* @__PURE__ */
|
|
3216
|
-
/* @__PURE__ */
|
|
3660
|
+
/* @__PURE__ */ jsx34("div", { className: "overflow-x-auto border-t border-ph-border", children: /* @__PURE__ */ jsxs31("table", { className: "w-full text-left text-sm", children: [
|
|
3661
|
+
/* @__PURE__ */ jsx34("thead", { className: "bg-ph-muted text-xs uppercase tracking-wider text-ph-mutedtext", children: /* @__PURE__ */ jsxs31("tr", { children: [
|
|
3662
|
+
/* @__PURE__ */ jsx34("th", { className: "px-4 py-2 font-semibold", children: "Prop" }),
|
|
3663
|
+
/* @__PURE__ */ jsx34("th", { className: "px-4 py-2 font-semibold", children: "Type" }),
|
|
3664
|
+
/* @__PURE__ */ jsx34("th", { className: "px-4 py-2 font-semibold", children: "Default" }),
|
|
3665
|
+
/* @__PURE__ */ jsx34("th", { className: "px-4 py-2 font-semibold", children: "Use" })
|
|
3217
3666
|
] }) }),
|
|
3218
|
-
/* @__PURE__ */
|
|
3667
|
+
/* @__PURE__ */ jsx34("tbody", { className: "divide-y divide-ph-border", children: rows.map((row) => {
|
|
3219
3668
|
var _a, _b;
|
|
3220
|
-
return /* @__PURE__ */
|
|
3221
|
-
/* @__PURE__ */
|
|
3222
|
-
/* @__PURE__ */
|
|
3223
|
-
/* @__PURE__ */
|
|
3224
|
-
/* @__PURE__ */
|
|
3669
|
+
return /* @__PURE__ */ jsxs31("tr", { children: [
|
|
3670
|
+
/* @__PURE__ */ jsx34("td", { className: "px-4 py-3 align-top font-mono text-xs text-ph-ink", children: row.name }),
|
|
3671
|
+
/* @__PURE__ */ jsx34("td", { className: "px-4 py-3 align-top font-mono text-xs text-ph-subtle", children: row.type }),
|
|
3672
|
+
/* @__PURE__ */ jsx34("td", { className: "px-4 py-3 align-top font-mono text-xs text-ph-subtle", children: (_a = row.defaultValue) != null ? _a : "-" }),
|
|
3673
|
+
/* @__PURE__ */ jsx34("td", { className: "px-4 py-3 align-top text-ph-subtle", children: (_b = row.description) != null ? _b : /* @__PURE__ */ jsx34("span", { className: "text-ph-mutedtext", children: "\u2014" }) })
|
|
3225
3674
|
] }, row.name);
|
|
3226
3675
|
}) })
|
|
3227
3676
|
] }) })
|
|
@@ -3229,8 +3678,8 @@ function ComponentDocs({ title = "Props & variants", rows, defaultOpen = false,
|
|
|
3229
3678
|
}
|
|
3230
3679
|
|
|
3231
3680
|
// src/components/ui/ShowcaseWrapper.tsx
|
|
3232
|
-
import { useState as
|
|
3233
|
-
import { jsx as
|
|
3681
|
+
import { useState as useState9 } from "react";
|
|
3682
|
+
import { jsx as jsx35, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
3234
3683
|
function ShowcaseWrapper({
|
|
3235
3684
|
id,
|
|
3236
3685
|
title,
|
|
@@ -3242,32 +3691,32 @@ function ShowcaseWrapper({
|
|
|
3242
3691
|
className
|
|
3243
3692
|
}) {
|
|
3244
3693
|
var _a;
|
|
3245
|
-
const [showCode, setShowCode] =
|
|
3694
|
+
const [showCode, setShowCode] = useState9(false);
|
|
3246
3695
|
const fallbackId = (_a = titleIdMap[title]) != null ? _a : title.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, "");
|
|
3247
|
-
return /* @__PURE__ */
|
|
3248
|
-
/* @__PURE__ */
|
|
3249
|
-
/* @__PURE__ */
|
|
3250
|
-
/* @__PURE__ */
|
|
3251
|
-
/* @__PURE__ */
|
|
3696
|
+
return /* @__PURE__ */ jsxs32("section", { id: id != null ? id : fallbackId, className: cn("scroll-mt-20", className), children: [
|
|
3697
|
+
/* @__PURE__ */ jsxs32("div", { className: "ph-h2-rule mb-8", children: [
|
|
3698
|
+
/* @__PURE__ */ jsxs32("div", { className: "flex items-center gap-1.5", children: [
|
|
3699
|
+
/* @__PURE__ */ jsx35("h2", { children: title }),
|
|
3700
|
+
/* @__PURE__ */ jsx35(
|
|
3252
3701
|
"button",
|
|
3253
3702
|
{
|
|
3254
3703
|
type: "button",
|
|
3255
3704
|
onClick: () => setShowCode(!showCode),
|
|
3256
3705
|
className: cn(
|
|
3257
|
-
"flex h-10 w-10 items-center justify-center rounded-full border transition-
|
|
3258
|
-
showCode ? "border-ph-brand bg-ph-brand text-[var(--ph-on-accent)] shadow-
|
|
3706
|
+
"ph-showcase-toggle flex h-10 w-10 items-center justify-center rounded-full border transition-colors",
|
|
3707
|
+
showCode ? "border-ph-brand bg-ph-brand text-[var(--ph-on-accent)] shadow-[var(--ph-shadow-control)]" : "border-ph-border bg-ph-surface text-ph-subtle hover:border-ph-brand hover:text-ph-brand"
|
|
3259
3708
|
),
|
|
3260
3709
|
title: showCode ? "Hide code" : "Show code",
|
|
3261
3710
|
"aria-label": showCode ? "Hide code" : "Show code",
|
|
3262
|
-
children: /* @__PURE__ */
|
|
3711
|
+
children: /* @__PURE__ */ jsx35(IconCodePreview, { className: "h-5 w-5", "aria-hidden": true })
|
|
3263
3712
|
}
|
|
3264
3713
|
)
|
|
3265
3714
|
] }),
|
|
3266
|
-
/* @__PURE__ */
|
|
3715
|
+
/* @__PURE__ */ jsx35("hr", {})
|
|
3267
3716
|
] }),
|
|
3268
|
-
description && /* @__PURE__ */
|
|
3269
|
-
docs && /* @__PURE__ */
|
|
3270
|
-
/* @__PURE__ */
|
|
3717
|
+
description && /* @__PURE__ */ jsx35("p", { className: "mb-6 text-sm text-ph-subtle", children: description }),
|
|
3718
|
+
docs && /* @__PURE__ */ jsx35("div", { className: "mb-6", children: docs }),
|
|
3719
|
+
/* @__PURE__ */ jsxs32(
|
|
3271
3720
|
"div",
|
|
3272
3721
|
{
|
|
3273
3722
|
className: cn(
|
|
@@ -3275,15 +3724,15 @@ function ShowcaseWrapper({
|
|
|
3275
3724
|
showCode ? "lg:grid lg:grid-cols-[1fr,minmax(360px,420px)]" : "block"
|
|
3276
3725
|
),
|
|
3277
3726
|
children: [
|
|
3278
|
-
/* @__PURE__ */
|
|
3279
|
-
/* @__PURE__ */
|
|
3727
|
+
/* @__PURE__ */ jsx35("div", { className: cn("min-w-0", showCode && "lg:pr-2"), children }),
|
|
3728
|
+
/* @__PURE__ */ jsx35(
|
|
3280
3729
|
"div",
|
|
3281
3730
|
{
|
|
3282
3731
|
className: cn(
|
|
3283
|
-
"transition-
|
|
3732
|
+
"transition-opacity duration-200",
|
|
3284
3733
|
showCode ? "block opacity-100" : "hidden opacity-0 lg:hidden"
|
|
3285
3734
|
),
|
|
3286
|
-
children: /* @__PURE__ */
|
|
3735
|
+
children: /* @__PURE__ */ jsx35("div", { className: "sticky top-20", children: /* @__PURE__ */ jsx35(CodeBlock, { code, filename }) })
|
|
3287
3736
|
}
|
|
3288
3737
|
)
|
|
3289
3738
|
]
|
|
@@ -3332,29 +3781,29 @@ var titleIdMap = {
|
|
|
3332
3781
|
};
|
|
3333
3782
|
|
|
3334
3783
|
// src/components/ui/CollapsibleSection.tsx
|
|
3335
|
-
import { useId as
|
|
3336
|
-
import { jsx as
|
|
3784
|
+
import { useId as useId10, useState as useState10 } from "react";
|
|
3785
|
+
import { jsx as jsx36, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
3337
3786
|
function CollapsibleSection({
|
|
3338
3787
|
title,
|
|
3339
3788
|
children,
|
|
3340
3789
|
defaultOpen = true,
|
|
3341
3790
|
id
|
|
3342
3791
|
}) {
|
|
3343
|
-
const [isOpen, setIsOpen] =
|
|
3344
|
-
const generatedId =
|
|
3792
|
+
const [isOpen, setIsOpen] = useState10(defaultOpen);
|
|
3793
|
+
const generatedId = useId10();
|
|
3345
3794
|
const contentId = `${id != null ? id : generatedId}-content`;
|
|
3346
|
-
return /* @__PURE__ */
|
|
3347
|
-
/* @__PURE__ */
|
|
3795
|
+
return /* @__PURE__ */ jsxs33("section", { id, className: "scroll-mt-20", children: [
|
|
3796
|
+
/* @__PURE__ */ jsxs33(
|
|
3348
3797
|
"button",
|
|
3349
3798
|
{
|
|
3350
3799
|
type: "button",
|
|
3351
3800
|
onClick: () => setIsOpen(!isOpen),
|
|
3352
3801
|
"aria-expanded": isOpen,
|
|
3353
3802
|
"aria-controls": contentId,
|
|
3354
|
-
className: "
|
|
3803
|
+
className: "ph-collapsible-trigger mb-6",
|
|
3355
3804
|
children: [
|
|
3356
|
-
/* @__PURE__ */
|
|
3357
|
-
/* @__PURE__ */
|
|
3805
|
+
/* @__PURE__ */ jsx36("span", { className: "text-lg font-bold text-ph-ink", children: title }),
|
|
3806
|
+
/* @__PURE__ */ jsx36(
|
|
3358
3807
|
IconChevronDown,
|
|
3359
3808
|
{
|
|
3360
3809
|
className: cn(
|
|
@@ -3367,7 +3816,7 @@ function CollapsibleSection({
|
|
|
3367
3816
|
]
|
|
3368
3817
|
}
|
|
3369
3818
|
),
|
|
3370
|
-
/* @__PURE__ */
|
|
3819
|
+
/* @__PURE__ */ jsx36(
|
|
3371
3820
|
"div",
|
|
3372
3821
|
{
|
|
3373
3822
|
id: contentId,
|
|
@@ -3376,10 +3825,10 @@ function CollapsibleSection({
|
|
|
3376
3825
|
if (node) node.toggleAttribute("inert", !isOpen);
|
|
3377
3826
|
},
|
|
3378
3827
|
className: cn(
|
|
3379
|
-
"
|
|
3380
|
-
isOpen ? "
|
|
3828
|
+
"grid transition-[grid-template-rows,opacity] duration-200",
|
|
3829
|
+
isOpen ? "grid-rows-[1fr] opacity-100" : "grid-rows-[0fr] opacity-0"
|
|
3381
3830
|
),
|
|
3382
|
-
children
|
|
3831
|
+
children: /* @__PURE__ */ jsx36("div", { className: "overflow-hidden", children })
|
|
3383
3832
|
}
|
|
3384
3833
|
)
|
|
3385
3834
|
] });
|
|
@@ -3387,7 +3836,7 @@ function CollapsibleSection({
|
|
|
3387
3836
|
|
|
3388
3837
|
// src/components/ui/Typography.tsx
|
|
3389
3838
|
import { forwardRef as forwardRef9 } from "react";
|
|
3390
|
-
import { jsx as
|
|
3839
|
+
import { jsx as jsx37 } from "react/jsx-runtime";
|
|
3391
3840
|
var toneMap2 = {
|
|
3392
3841
|
default: "text-ph-ink",
|
|
3393
3842
|
muted: "text-ph-mutedtext",
|
|
@@ -3411,63 +3860,64 @@ function textClass(base, tone, weight, truncate, className) {
|
|
|
3411
3860
|
}
|
|
3412
3861
|
var Display = forwardRef9(function Display2(_a, ref) {
|
|
3413
3862
|
var _b = _a, { children, tone = "default", weight, truncate, className } = _b, props = __objRest(_b, ["children", "tone", "weight", "truncate", "className"]);
|
|
3414
|
-
return /* @__PURE__ */
|
|
3863
|
+
return /* @__PURE__ */ jsx37("h1", __spreadProps(__spreadValues({ ref }, props), { className: textClass("ph-hero-title", tone, weight, truncate, className), children }));
|
|
3415
3864
|
});
|
|
3416
3865
|
var SectionTitle = forwardRef9(function SectionTitle2(_a, ref) {
|
|
3417
3866
|
var _b = _a, { children, tone = "default", weight, truncate, className } = _b, props = __objRest(_b, ["children", "tone", "weight", "truncate", "className"]);
|
|
3418
|
-
return /* @__PURE__ */
|
|
3867
|
+
return /* @__PURE__ */ jsx37("h2", __spreadProps(__spreadValues({ ref }, props), { className: textClass("ph-section-title", tone, weight, truncate, className), children }));
|
|
3419
3868
|
});
|
|
3420
3869
|
var H1 = forwardRef9(function H12(_a, ref) {
|
|
3421
3870
|
var _b = _a, { children, tone = "default", weight, truncate, className } = _b, props = __objRest(_b, ["children", "tone", "weight", "truncate", "className"]);
|
|
3422
|
-
return /* @__PURE__ */
|
|
3871
|
+
return /* @__PURE__ */ jsx37("h1", __spreadProps(__spreadValues({ ref }, props), { className: textClass("ph-page-title font-bold", tone, weight, truncate, className), children }));
|
|
3423
3872
|
});
|
|
3424
3873
|
var H2 = forwardRef9(function H22(_a, ref) {
|
|
3425
3874
|
var _b = _a, { children, tone = "default", weight, truncate, className } = _b, props = __objRest(_b, ["children", "tone", "weight", "truncate", "className"]);
|
|
3426
|
-
return /* @__PURE__ */
|
|
3875
|
+
return /* @__PURE__ */ jsx37("h2", __spreadProps(__spreadValues({ ref }, props), { className: textClass("text-2xl font-semibold tracking-tight", tone, weight, truncate, className), children }));
|
|
3427
3876
|
});
|
|
3428
3877
|
var H3 = forwardRef9(function H32(_a, ref) {
|
|
3429
3878
|
var _b = _a, { children, tone = "default", weight, truncate, className } = _b, props = __objRest(_b, ["children", "tone", "weight", "truncate", "className"]);
|
|
3430
|
-
return /* @__PURE__ */
|
|
3879
|
+
return /* @__PURE__ */ jsx37("h3", __spreadProps(__spreadValues({ ref }, props), { className: textClass("text-xl font-semibold", tone, weight, truncate, className), children }));
|
|
3431
3880
|
});
|
|
3432
3881
|
var H4 = forwardRef9(function H42(_a, ref) {
|
|
3433
3882
|
var _b = _a, { children, tone = "default", weight, truncate, className } = _b, props = __objRest(_b, ["children", "tone", "weight", "truncate", "className"]);
|
|
3434
|
-
return /* @__PURE__ */
|
|
3883
|
+
return /* @__PURE__ */ jsx37("h4", __spreadProps(__spreadValues({ ref }, props), { className: textClass("text-lg font-semibold", tone, weight, truncate, className), children }));
|
|
3435
3884
|
});
|
|
3436
3885
|
var H5 = forwardRef9(function H52(_a, ref) {
|
|
3437
3886
|
var _b = _a, { children, tone = "default", weight, truncate, className } = _b, props = __objRest(_b, ["children", "tone", "weight", "truncate", "className"]);
|
|
3438
|
-
return /* @__PURE__ */
|
|
3887
|
+
return /* @__PURE__ */ jsx37("h5", __spreadProps(__spreadValues({ ref }, props), { className: textClass("text-base font-semibold", tone, weight, truncate, className), children }));
|
|
3439
3888
|
});
|
|
3440
3889
|
var P = forwardRef9(function P2(_a, ref) {
|
|
3441
3890
|
var _b = _a, { children, tone = "default", weight, truncate, className } = _b, props = __objRest(_b, ["children", "tone", "weight", "truncate", "className"]);
|
|
3442
|
-
return /* @__PURE__ */
|
|
3891
|
+
return /* @__PURE__ */ jsx37("p", __spreadProps(__spreadValues({ ref }, props), { className: textClass("text-base leading-relaxed", tone, weight, truncate, className), children }));
|
|
3443
3892
|
});
|
|
3444
3893
|
var Small = forwardRef9(function Small2(_a, ref) {
|
|
3445
3894
|
var _b = _a, { children, tone = "default", weight, truncate, className } = _b, props = __objRest(_b, ["children", "tone", "weight", "truncate", "className"]);
|
|
3446
|
-
return /* @__PURE__ */
|
|
3895
|
+
return /* @__PURE__ */ jsx37("span", __spreadProps(__spreadValues({ ref }, props), { className: textClass("text-sm leading-relaxed", tone, weight, truncate, className), children }));
|
|
3447
3896
|
});
|
|
3448
3897
|
var Caption = forwardRef9(function Caption2(_a, ref) {
|
|
3449
3898
|
var _b = _a, { children, tone = "muted", weight, truncate, className } = _b, props = __objRest(_b, ["children", "tone", "weight", "truncate", "className"]);
|
|
3450
|
-
return /* @__PURE__ */
|
|
3899
|
+
return /* @__PURE__ */ jsx37("span", __spreadProps(__spreadValues({ ref }, props), { className: textClass("text-xs font-medium", tone, weight, truncate, className), children }));
|
|
3451
3900
|
});
|
|
3452
3901
|
var Overline = forwardRef9(function Overline2(_a, ref) {
|
|
3453
3902
|
var _b = _a, { children, tone = "muted", weight, truncate, className } = _b, props = __objRest(_b, ["children", "tone", "weight", "truncate", "className"]);
|
|
3454
|
-
return /* @__PURE__ */
|
|
3903
|
+
return /* @__PURE__ */ jsx37("span", __spreadProps(__spreadValues({ ref }, props), { className: textClass("text-[length:var(--ph-type-overline)] font-semibold uppercase tracking-[0.08em]", tone, weight, truncate, className), children }));
|
|
3455
3904
|
});
|
|
3456
3905
|
var Lead = forwardRef9(function Lead2(_a, ref) {
|
|
3457
3906
|
var _b = _a, { children, tone = "subtle", weight, truncate, className } = _b, props = __objRest(_b, ["children", "tone", "weight", "truncate", "className"]);
|
|
3458
|
-
return /* @__PURE__ */
|
|
3907
|
+
return /* @__PURE__ */ jsx37("p", __spreadProps(__spreadValues({ ref }, props), { className: textClass("ph-lead", tone, weight, truncate, className), children }));
|
|
3459
3908
|
});
|
|
3460
3909
|
var Mono = forwardRef9(function Mono2(_a, ref) {
|
|
3461
3910
|
var _b = _a, { children, tone = "default", weight, truncate, className } = _b, props = __objRest(_b, ["children", "tone", "weight", "truncate", "className"]);
|
|
3462
|
-
return /* @__PURE__ */
|
|
3911
|
+
return /* @__PURE__ */ jsx37("code", __spreadProps(__spreadValues({ ref }, props), { className: textClass("text-sm font-mono leading-relaxed", tone, weight, truncate, className), children }));
|
|
3463
3912
|
});
|
|
3464
3913
|
var Label = forwardRef9(function Label2(_a, ref) {
|
|
3465
3914
|
var _b = _a, { children, tone = "default", weight, truncate, className } = _b, props = __objRest(_b, ["children", "tone", "weight", "truncate", "className"]);
|
|
3466
|
-
return /* @__PURE__ */
|
|
3915
|
+
return /* @__PURE__ */ jsx37("label", __spreadProps(__spreadValues({ ref }, props), { className: textClass("text-sm font-medium", tone, weight, truncate, className), children }));
|
|
3467
3916
|
});
|
|
3468
3917
|
|
|
3469
3918
|
// src/components/ui/Avatar.tsx
|
|
3470
|
-
import {
|
|
3919
|
+
import { Children } from "react";
|
|
3920
|
+
import { jsx as jsx38, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
3471
3921
|
var sizeMap4 = {
|
|
3472
3922
|
xs: "h-8 w-8 text-[10px]",
|
|
3473
3923
|
sm: "h-10 w-10 text-xs",
|
|
@@ -3486,7 +3936,7 @@ function Avatar(_a) {
|
|
|
3486
3936
|
label,
|
|
3487
3937
|
icon,
|
|
3488
3938
|
size = "md",
|
|
3489
|
-
color = "bg-ph-brand text-
|
|
3939
|
+
color = "bg-ph-brand text-[var(--ph-on-accent)]",
|
|
3490
3940
|
status,
|
|
3491
3941
|
badge,
|
|
3492
3942
|
className
|
|
@@ -3499,19 +3949,19 @@ function Avatar(_a) {
|
|
|
3499
3949
|
"badge",
|
|
3500
3950
|
"className"
|
|
3501
3951
|
]);
|
|
3502
|
-
return /* @__PURE__ */
|
|
3503
|
-
/* @__PURE__ */
|
|
3952
|
+
return /* @__PURE__ */ jsxs34("div", __spreadProps(__spreadValues({ className: cn("relative inline-flex shrink-0", className) }, props), { children: [
|
|
3953
|
+
/* @__PURE__ */ jsx38(
|
|
3504
3954
|
"div",
|
|
3505
3955
|
{
|
|
3506
3956
|
className: cn(
|
|
3507
|
-
"flex items-center justify-center rounded-full border border-ph-border font-bold
|
|
3957
|
+
"ph-avatar flex items-center justify-center rounded-full border border-ph-border font-bold",
|
|
3508
3958
|
sizeMap4[size],
|
|
3509
3959
|
color
|
|
3510
3960
|
),
|
|
3511
3961
|
children: icon || label
|
|
3512
3962
|
}
|
|
3513
3963
|
),
|
|
3514
|
-
status && /* @__PURE__ */
|
|
3964
|
+
status && /* @__PURE__ */ jsx38(
|
|
3515
3965
|
"span",
|
|
3516
3966
|
{
|
|
3517
3967
|
role: "img",
|
|
@@ -3522,17 +3972,17 @@ function Avatar(_a) {
|
|
|
3522
3972
|
)
|
|
3523
3973
|
}
|
|
3524
3974
|
),
|
|
3525
|
-
badge && /* @__PURE__ */
|
|
3975
|
+
badge && /* @__PURE__ */ jsx38("span", { className: "absolute -bottom-1 -right-1 flex min-w-[22px] items-center justify-center rounded-full bg-ph-brand px-1.5 py-px text-[10px] font-bold text-[var(--ph-on-accent)]", children: badge })
|
|
3526
3976
|
] }));
|
|
3527
3977
|
}
|
|
3528
3978
|
function AvatarGroup(_a) {
|
|
3529
3979
|
var _b = _a, { children, max, className } = _b, props = __objRest(_b, ["children", "max", "className"]);
|
|
3530
|
-
const items =
|
|
3980
|
+
const items = Children.toArray(children);
|
|
3531
3981
|
const visible = max ? items.slice(0, max) : items;
|
|
3532
3982
|
const remaining = max ? items.length - max : 0;
|
|
3533
|
-
return /* @__PURE__ */
|
|
3983
|
+
return /* @__PURE__ */ jsxs34("div", __spreadProps(__spreadValues({ className: cn("-space-x-3 flex rtl:space-x-reverse", className) }, props), { children: [
|
|
3534
3984
|
visible,
|
|
3535
|
-
remaining > 0 && /* @__PURE__ */
|
|
3985
|
+
remaining > 0 && /* @__PURE__ */ jsx38(
|
|
3536
3986
|
Avatar,
|
|
3537
3987
|
{
|
|
3538
3988
|
label: `+${remaining}`,
|
|
@@ -3544,8 +3994,8 @@ function AvatarGroup(_a) {
|
|
|
3544
3994
|
}
|
|
3545
3995
|
|
|
3546
3996
|
// src/components/ui/Progress.tsx
|
|
3547
|
-
import { useId as
|
|
3548
|
-
import { jsx as
|
|
3997
|
+
import { useId as useId11 } from "react";
|
|
3998
|
+
import { jsx as jsx39, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
3549
3999
|
var sizeMap5 = {
|
|
3550
4000
|
sm: "h-1",
|
|
3551
4001
|
md: "h-2",
|
|
@@ -3573,19 +4023,19 @@ function Progress(_a) {
|
|
|
3573
4023
|
"aria-label",
|
|
3574
4024
|
"aria-labelledby"
|
|
3575
4025
|
]);
|
|
3576
|
-
const labelId =
|
|
4026
|
+
const labelId = useId11();
|
|
3577
4027
|
const safeMax = Number.isFinite(max) && max > 0 ? max : 100;
|
|
3578
4028
|
const safeValue = Number.isFinite(value) ? Math.min(safeMax, Math.max(0, value)) : 0;
|
|
3579
4029
|
const percentage = safeValue / safeMax * 100;
|
|
3580
|
-
return /* @__PURE__ */
|
|
3581
|
-
(label || showPercentage) && /* @__PURE__ */
|
|
3582
|
-
label && /* @__PURE__ */
|
|
3583
|
-
showPercentage && /* @__PURE__ */
|
|
4030
|
+
return /* @__PURE__ */ jsxs35("div", __spreadProps(__spreadValues({ className: cn("w-full", className) }, props), { children: [
|
|
4031
|
+
(label || showPercentage) && /* @__PURE__ */ jsxs35("div", { className: "mb-1.5 flex justify-between text-sm text-ph-subtle", children: [
|
|
4032
|
+
label && /* @__PURE__ */ jsx39("span", { id: labelId, children: label }),
|
|
4033
|
+
showPercentage && /* @__PURE__ */ jsxs35("span", { className: "tabular-nums", children: [
|
|
3584
4034
|
Math.round(percentage),
|
|
3585
4035
|
"%"
|
|
3586
4036
|
] })
|
|
3587
4037
|
] }),
|
|
3588
|
-
/* @__PURE__ */
|
|
4038
|
+
/* @__PURE__ */ jsx39("div", { className: cn("ph-progress", sizeMap5[size]), children: /* @__PURE__ */ jsx39(
|
|
3589
4039
|
"div",
|
|
3590
4040
|
{
|
|
3591
4041
|
className: cn("ph-progress-bar", color),
|
|
@@ -3603,7 +4053,7 @@ function Progress(_a) {
|
|
|
3603
4053
|
|
|
3604
4054
|
// src/components/ui/Link.tsx
|
|
3605
4055
|
import { forwardRef as forwardRef10 } from "react";
|
|
3606
|
-
import { jsx as
|
|
4056
|
+
import { jsx as jsx40 } from "react/jsx-runtime";
|
|
3607
4057
|
var Link = forwardRef10(function Link2(_a, ref) {
|
|
3608
4058
|
var _b = _a, {
|
|
3609
4059
|
className,
|
|
@@ -3614,7 +4064,7 @@ var Link = forwardRef10(function Link2(_a, ref) {
|
|
|
3614
4064
|
"disabled",
|
|
3615
4065
|
"children"
|
|
3616
4066
|
]);
|
|
3617
|
-
return /* @__PURE__ */
|
|
4067
|
+
return /* @__PURE__ */ jsx40(
|
|
3618
4068
|
"a",
|
|
3619
4069
|
__spreadProps(__spreadValues({
|
|
3620
4070
|
ref,
|
|
@@ -3633,10 +4083,10 @@ var Link = forwardRef10(function Link2(_a, ref) {
|
|
|
3633
4083
|
Link.displayName = "Link";
|
|
3634
4084
|
|
|
3635
4085
|
// src/components/ui/Spinner.tsx
|
|
3636
|
-
import { jsx as
|
|
4086
|
+
import { jsx as jsx41, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
3637
4087
|
function Spinner(_a) {
|
|
3638
4088
|
var _b = _a, { size = "sm", textColored = false, className } = _b, props = __objRest(_b, ["size", "textColored", "className"]);
|
|
3639
|
-
return /* @__PURE__ */
|
|
4089
|
+
return /* @__PURE__ */ jsx41(
|
|
3640
4090
|
"span",
|
|
3641
4091
|
__spreadProps(__spreadValues({
|
|
3642
4092
|
className: cn(
|
|
@@ -3648,9 +4098,9 @@ function Spinner(_a) {
|
|
|
3648
4098
|
role: "status",
|
|
3649
4099
|
"aria-label": "Loading"
|
|
3650
4100
|
}, props), {
|
|
3651
|
-
children: /* @__PURE__ */
|
|
3652
|
-
/* @__PURE__ */
|
|
3653
|
-
/* @__PURE__ */
|
|
4101
|
+
children: /* @__PURE__ */ jsxs36("svg", { viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: "ph-spinner__svg", children: [
|
|
4102
|
+
/* @__PURE__ */ jsx41("circle", { cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "3", opacity: 0.2 }),
|
|
4103
|
+
/* @__PURE__ */ jsx41("path", { d: "M12 2a10 10 0 0 1 10 10", stroke: "currentColor", strokeWidth: "3", strokeLinecap: "round" })
|
|
3654
4104
|
] })
|
|
3655
4105
|
})
|
|
3656
4106
|
);
|
|
@@ -3658,7 +4108,7 @@ function Spinner(_a) {
|
|
|
3658
4108
|
Spinner.displayName = "Spinner";
|
|
3659
4109
|
|
|
3660
4110
|
// src/components/ui/Dot.tsx
|
|
3661
|
-
import { jsx as
|
|
4111
|
+
import { jsx as jsx42 } from "react/jsx-runtime";
|
|
3662
4112
|
var colorMap = {
|
|
3663
4113
|
green: "bg-ph-success",
|
|
3664
4114
|
yellow: "bg-ph-warning",
|
|
@@ -3668,7 +4118,7 @@ var colorMap = {
|
|
|
3668
4118
|
};
|
|
3669
4119
|
function Dot(_a) {
|
|
3670
4120
|
var _b = _a, { color = "gray", size = "md", className } = _b, props = __objRest(_b, ["color", "size", "className"]);
|
|
3671
|
-
return /* @__PURE__ */
|
|
4121
|
+
return /* @__PURE__ */ jsx42(
|
|
3672
4122
|
"span",
|
|
3673
4123
|
__spreadValues({
|
|
3674
4124
|
className: cn(
|
|
@@ -3685,7 +4135,7 @@ Dot.displayName = "Dot";
|
|
|
3685
4135
|
|
|
3686
4136
|
// src/components/ui/Chip.tsx
|
|
3687
4137
|
import { forwardRef as forwardRef11 } from "react";
|
|
3688
|
-
import { jsx as
|
|
4138
|
+
import { jsx as jsx43, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
3689
4139
|
var Chip = forwardRef11(function Chip2(_a, ref) {
|
|
3690
4140
|
var _b = _a, {
|
|
3691
4141
|
selected = false,
|
|
@@ -3705,18 +4155,18 @@ var Chip = forwardRef11(function Chip2(_a, ref) {
|
|
|
3705
4155
|
);
|
|
3706
4156
|
if (onRemove) {
|
|
3707
4157
|
const removeLabel = typeof children === "string" ? `Remove ${children}` : "Remove";
|
|
3708
|
-
return /* @__PURE__ */
|
|
3709
|
-
/* @__PURE__ */
|
|
4158
|
+
return /* @__PURE__ */ jsxs37("span", { className: chipClassName, children: [
|
|
4159
|
+
/* @__PURE__ */ jsx43(
|
|
3710
4160
|
"button",
|
|
3711
4161
|
__spreadProps(__spreadValues({
|
|
3712
4162
|
ref,
|
|
3713
4163
|
type: "button",
|
|
3714
4164
|
className: "min-w-0 bg-transparent p-0 text-inherit"
|
|
3715
4165
|
}, props), {
|
|
3716
|
-
children: /* @__PURE__ */
|
|
4166
|
+
children: /* @__PURE__ */ jsx43("span", { className: "ph-chip__text", children })
|
|
3717
4167
|
})
|
|
3718
4168
|
),
|
|
3719
|
-
/* @__PURE__ */
|
|
4169
|
+
/* @__PURE__ */ jsx43(
|
|
3720
4170
|
"button",
|
|
3721
4171
|
{
|
|
3722
4172
|
type: "button",
|
|
@@ -3724,26 +4174,26 @@ var Chip = forwardRef11(function Chip2(_a, ref) {
|
|
|
3724
4174
|
disabled: props.disabled,
|
|
3725
4175
|
className: "ph-chip__remove",
|
|
3726
4176
|
"aria-label": removeLabel,
|
|
3727
|
-
children: /* @__PURE__ */
|
|
4177
|
+
children: /* @__PURE__ */ jsx43("svg", { width: "10", height: "10", viewBox: "0 0 10 10", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", "aria-hidden": "true", children: /* @__PURE__ */ jsx43("path", { d: "M2 2l6 6M8 2l-6 6" }) })
|
|
3728
4178
|
}
|
|
3729
4179
|
)
|
|
3730
4180
|
] });
|
|
3731
4181
|
}
|
|
3732
|
-
return /* @__PURE__ */
|
|
4182
|
+
return /* @__PURE__ */ jsx43(
|
|
3733
4183
|
"button",
|
|
3734
4184
|
__spreadProps(__spreadValues({
|
|
3735
4185
|
ref,
|
|
3736
4186
|
type: "button",
|
|
3737
4187
|
className: chipClassName
|
|
3738
4188
|
}, props), {
|
|
3739
|
-
children: /* @__PURE__ */
|
|
4189
|
+
children: /* @__PURE__ */ jsx43("span", { className: "ph-chip__text", children })
|
|
3740
4190
|
})
|
|
3741
4191
|
);
|
|
3742
4192
|
});
|
|
3743
4193
|
Chip.displayName = "Chip";
|
|
3744
4194
|
|
|
3745
4195
|
// src/lib/chart/use-ph-chart-tokens.ts
|
|
3746
|
-
import { useEffect as
|
|
4196
|
+
import { useEffect as useEffect6, useState as useState11 } from "react";
|
|
3747
4197
|
var DEFAULT_TOKENS = {
|
|
3748
4198
|
series: ["#1d4aff", "#621da6", "#42827e", "#ce0e74", "#f14f58", "#529a0a", "#fe729e"],
|
|
3749
4199
|
muted: "hsl(220 9% 90%)",
|
|
@@ -3774,20 +4224,20 @@ function readTokens() {
|
|
|
3774
4224
|
};
|
|
3775
4225
|
}
|
|
3776
4226
|
function useChartTokens() {
|
|
3777
|
-
const [tokens, setTokens] =
|
|
3778
|
-
|
|
4227
|
+
const [tokens, setTokens] = useState11(DEFAULT_TOKENS);
|
|
4228
|
+
useEffect6(() => {
|
|
3779
4229
|
setTokens(readTokens());
|
|
3780
4230
|
}, []);
|
|
3781
4231
|
return tokens;
|
|
3782
4232
|
}
|
|
3783
4233
|
|
|
3784
4234
|
// src/components/ui/Charts.tsx
|
|
3785
|
-
import { jsx as
|
|
4235
|
+
import { jsx as jsx44, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
3786
4236
|
function percent(value, total) {
|
|
3787
4237
|
return total > 0 ? Math.round(value / total * 100) : 0;
|
|
3788
4238
|
}
|
|
3789
4239
|
function EmptyChart() {
|
|
3790
|
-
return /* @__PURE__ */
|
|
4240
|
+
return /* @__PURE__ */ jsx44("p", { className: "text-sm text-ph-subtle", children: "No data for this period." });
|
|
3791
4241
|
}
|
|
3792
4242
|
function sliceColour(slice, index, series) {
|
|
3793
4243
|
var _a;
|
|
@@ -3797,7 +4247,7 @@ function DonutChart({ slices, label, formatValue, className }) {
|
|
|
3797
4247
|
const { series } = useChartTokens();
|
|
3798
4248
|
const visible = slices.filter((slice) => slice.value > 0);
|
|
3799
4249
|
const total = visible.reduce((sum, slice) => sum + slice.value, 0);
|
|
3800
|
-
if (total <= 0) return /* @__PURE__ */
|
|
4250
|
+
if (total <= 0) return /* @__PURE__ */ jsx44(EmptyChart, {});
|
|
3801
4251
|
const stops = visible.map((slice, index) => {
|
|
3802
4252
|
const colour = sliceColour(slice, index, series);
|
|
3803
4253
|
const before = visible.slice(0, index).reduce((sum, item) => sum + item.value, 0);
|
|
@@ -3805,15 +4255,15 @@ function DonutChart({ slices, label, formatValue, className }) {
|
|
|
3805
4255
|
const end = (before + slice.value) / total * 360;
|
|
3806
4256
|
return `${colour} ${start}deg ${end}deg`;
|
|
3807
4257
|
}).join(", ");
|
|
3808
|
-
return /* @__PURE__ */
|
|
3809
|
-
/* @__PURE__ */
|
|
4258
|
+
return /* @__PURE__ */ jsxs38("div", { className: cn("flex flex-col items-center gap-4 sm:flex-row sm:items-center", className), children: [
|
|
4259
|
+
/* @__PURE__ */ jsx44(
|
|
3810
4260
|
"div",
|
|
3811
4261
|
{
|
|
3812
4262
|
role: "img",
|
|
3813
4263
|
"aria-label": label,
|
|
3814
4264
|
className: "relative h-36 w-36 shrink-0 rounded-full",
|
|
3815
4265
|
style: { background: `conic-gradient(${stops})` },
|
|
3816
|
-
children: /* @__PURE__ */
|
|
4266
|
+
children: /* @__PURE__ */ jsx44(
|
|
3817
4267
|
"span",
|
|
3818
4268
|
{
|
|
3819
4269
|
className: "absolute inset-[22%] rounded-full bg-ph-surface ring-1 ring-ph-border",
|
|
@@ -3822,14 +4272,14 @@ function DonutChart({ slices, label, formatValue, className }) {
|
|
|
3822
4272
|
)
|
|
3823
4273
|
}
|
|
3824
4274
|
),
|
|
3825
|
-
/* @__PURE__ */
|
|
4275
|
+
/* @__PURE__ */ jsx44("ul", { className: "min-w-0 w-full flex-1 space-y-2", children: visible.map((slice, index) => {
|
|
3826
4276
|
const colour = sliceColour(slice, index, series);
|
|
3827
|
-
return /* @__PURE__ */
|
|
3828
|
-
/* @__PURE__ */
|
|
3829
|
-
/* @__PURE__ */
|
|
3830
|
-
/* @__PURE__ */
|
|
4277
|
+
return /* @__PURE__ */ jsxs38("li", { className: "flex items-center justify-between gap-3 text-sm", children: [
|
|
4278
|
+
/* @__PURE__ */ jsxs38("span", { className: "flex min-w-0 items-center gap-2 text-ph-subtle", children: [
|
|
4279
|
+
/* @__PURE__ */ jsx44("span", { className: "h-2.5 w-2.5 shrink-0 rounded-full", style: { background: colour } }),
|
|
4280
|
+
/* @__PURE__ */ jsx44("span", { className: "truncate", children: slice.label })
|
|
3831
4281
|
] }),
|
|
3832
|
-
/* @__PURE__ */
|
|
4282
|
+
/* @__PURE__ */ jsx44("span", { className: "shrink-0 tabular-nums text-ph-ink", children: formatValue ? formatValue(slice.value) : `${percent(slice.value, total)}%` })
|
|
3833
4283
|
] }, slice.label);
|
|
3834
4284
|
}) })
|
|
3835
4285
|
] });
|
|
@@ -3838,15 +4288,15 @@ function BarChart({ items, formatValue, className }) {
|
|
|
3838
4288
|
const { series } = useChartTokens();
|
|
3839
4289
|
const visible = items.filter((item) => item.value > 0);
|
|
3840
4290
|
const max = Math.max(...visible.map((item) => item.value), 1);
|
|
3841
|
-
if (!visible.length) return /* @__PURE__ */
|
|
3842
|
-
return /* @__PURE__ */
|
|
4291
|
+
if (!visible.length) return /* @__PURE__ */ jsx44(EmptyChart, {});
|
|
4292
|
+
return /* @__PURE__ */ jsx44("ul", { className: cn("space-y-3", className), children: visible.map((item, index) => {
|
|
3843
4293
|
const colour = sliceColour(item, index, series);
|
|
3844
|
-
return /* @__PURE__ */
|
|
3845
|
-
/* @__PURE__ */
|
|
3846
|
-
/* @__PURE__ */
|
|
3847
|
-
/* @__PURE__ */
|
|
4294
|
+
return /* @__PURE__ */ jsxs38("li", { children: [
|
|
4295
|
+
/* @__PURE__ */ jsxs38("div", { className: "mb-1 flex items-center justify-between gap-3 text-sm", children: [
|
|
4296
|
+
/* @__PURE__ */ jsx44("span", { className: "truncate text-ph-subtle", children: item.label }),
|
|
4297
|
+
/* @__PURE__ */ jsx44("span", { className: "shrink-0 tabular-nums text-ph-ink", children: formatValue ? formatValue(item.value) : item.value.toLocaleString("en-AU") })
|
|
3848
4298
|
] }),
|
|
3849
|
-
/* @__PURE__ */
|
|
4299
|
+
/* @__PURE__ */ jsx44("div", { className: "h-2.5 rounded-full bg-ph-muted ring-1 ring-ph-border", children: /* @__PURE__ */ jsx44(
|
|
3850
4300
|
"div",
|
|
3851
4301
|
{
|
|
3852
4302
|
className: "h-full rounded-full transition-[width] duration-300 ease-out motion-reduce:transition-none",
|
|
@@ -3868,15 +4318,15 @@ function StackedBarChart({
|
|
|
3868
4318
|
const { series } = useChartTokens();
|
|
3869
4319
|
const visible = slices.filter((slice) => slice.value > 0);
|
|
3870
4320
|
const total = visible.reduce((sum, slice) => sum + slice.value, 0);
|
|
3871
|
-
if (total <= 0) return /* @__PURE__ */
|
|
3872
|
-
return /* @__PURE__ */
|
|
3873
|
-
/* @__PURE__ */
|
|
4321
|
+
if (total <= 0) return /* @__PURE__ */ jsx44(EmptyChart, {});
|
|
4322
|
+
return /* @__PURE__ */ jsxs38("div", { className: cn("space-y-3", className), children: [
|
|
4323
|
+
/* @__PURE__ */ jsx44(
|
|
3874
4324
|
"div",
|
|
3875
4325
|
{
|
|
3876
4326
|
role: "img",
|
|
3877
4327
|
"aria-label": label,
|
|
3878
4328
|
className: "flex h-3 overflow-hidden rounded-full bg-ph-muted ring-1 ring-ph-border",
|
|
3879
|
-
children: visible.map((slice, index) => /* @__PURE__ */
|
|
4329
|
+
children: visible.map((slice, index) => /* @__PURE__ */ jsx44(
|
|
3880
4330
|
"span",
|
|
3881
4331
|
{
|
|
3882
4332
|
className: "h-full",
|
|
@@ -3889,14 +4339,14 @@ function StackedBarChart({
|
|
|
3889
4339
|
))
|
|
3890
4340
|
}
|
|
3891
4341
|
),
|
|
3892
|
-
/* @__PURE__ */
|
|
4342
|
+
/* @__PURE__ */ jsx44("ul", { className: "space-y-2", children: visible.map((slice, index) => {
|
|
3893
4343
|
const colour = sliceColour(slice, index, series);
|
|
3894
|
-
return /* @__PURE__ */
|
|
3895
|
-
/* @__PURE__ */
|
|
3896
|
-
/* @__PURE__ */
|
|
3897
|
-
/* @__PURE__ */
|
|
4344
|
+
return /* @__PURE__ */ jsxs38("li", { className: "flex items-center justify-between gap-3 text-sm", children: [
|
|
4345
|
+
/* @__PURE__ */ jsxs38("span", { className: "flex min-w-0 items-center gap-2 text-ph-subtle", children: [
|
|
4346
|
+
/* @__PURE__ */ jsx44("span", { className: "h-2.5 w-2.5 shrink-0 rounded-full", style: { background: colour } }),
|
|
4347
|
+
/* @__PURE__ */ jsx44("span", { className: "truncate", children: slice.label })
|
|
3898
4348
|
] }),
|
|
3899
|
-
/* @__PURE__ */
|
|
4349
|
+
/* @__PURE__ */ jsx44("span", { className: "shrink-0 tabular-nums text-ph-ink", children: formatValue ? formatValue(slice.value) : `${percent(slice.value, total)}%` })
|
|
3900
4350
|
] }, slice.label);
|
|
3901
4351
|
}) })
|
|
3902
4352
|
] });
|
|
@@ -3906,6 +4356,12 @@ export {
|
|
|
3906
4356
|
ButtonChrome,
|
|
3907
4357
|
cn,
|
|
3908
4358
|
Button,
|
|
4359
|
+
MarketingHeader,
|
|
4360
|
+
MarketingLink,
|
|
4361
|
+
MarketingMotionControl,
|
|
4362
|
+
MarketingReveal,
|
|
4363
|
+
AiWritingIllustration,
|
|
4364
|
+
IntegrationBridgeIllustration,
|
|
3909
4365
|
IconBase,
|
|
3910
4366
|
createIconBase,
|
|
3911
4367
|
createIconBasePath,
|