@xenide-io/the-old-ui-theme 0.2.9 → 0.3.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/README.md +1 -1
- package/dist/{chunk-SHF57J7U.mjs → chunk-FDMD3IIN.mjs} +1573 -652
- package/dist/index-D1RTT2Ap.d.mts +1044 -0
- package/dist/index-D1RTT2Ap.d.ts +1044 -0
- package/dist/index.d.mts +10 -7
- package/dist/index.d.ts +10 -7
- package/dist/index.js +1705 -744
- package/dist/index.mjs +61 -1
- package/dist/tailwind-preset.js +7 -0
- package/dist/tailwind-preset.mjs +7 -0
- package/dist/ui.d.mts +3 -2
- package/dist/ui.d.ts +3 -2
- package/dist/ui.js +1584 -666
- package/dist/ui.mjs +31 -1
- package/package.json +18 -4
- package/src/app/globals.css +1005 -227
- package/src/components/icons/IconBase.tsx +20 -12
- package/src/components/icons/createIconBase.tsx +12 -7
- package/src/components/icons/icons.tsx +208 -18
- package/src/components/sections/AlertShowcase.tsx +2 -1
- package/src/components/sections/BadgeShowcase.tsx +1 -1
- package/src/components/sections/ButtonShowcase.tsx +6 -10
- package/src/components/sections/CardShowcase.tsx +22 -6
- package/src/components/sections/DropdownShowcase.tsx +4 -6
- package/src/components/sections/FilterChipsShowcase.tsx +74 -26
- package/src/components/sections/FormShowcase.tsx +2 -1
- package/src/components/sections/IconShowcase.tsx +86 -206
- package/src/components/sections/KbdShowcase.tsx +47 -21
- package/src/components/sections/ModalShowcase.tsx +7 -6
- package/src/components/sections/ProductLayoutsShowcase.tsx +138 -0
- package/src/components/sections/ProgressShowcase.tsx +50 -53
- package/src/components/sections/SwapShowcase.tsx +13 -5
- package/src/components/ui/Alert.tsx +28 -19
- package/src/components/ui/AuthLayout.tsx +58 -0
- package/src/components/ui/Badge.tsx +10 -5
- package/src/components/ui/Button.tsx +22 -12
- package/src/components/ui/ButtonChrome.tsx +1 -1
- package/src/components/ui/Calendar.tsx +6 -7
- package/src/components/ui/Card.tsx +21 -11
- package/src/components/ui/CollapsibleSection.tsx +11 -11
- package/src/components/ui/DropdownMenu.tsx +189 -65
- package/src/components/ui/FilterBar.tsx +165 -0
- package/src/components/ui/FilterChips.tsx +65 -35
- package/src/components/ui/FilterControls.tsx +30 -0
- package/src/components/ui/FormField.tsx +69 -0
- package/src/components/ui/Input.tsx +166 -140
- package/src/components/ui/Kbd.tsx +88 -13
- package/src/components/ui/Loader.tsx +96 -0
- package/src/components/ui/Modal.tsx +66 -36
- package/src/components/ui/SettingsLayout.tsx +94 -0
- package/src/components/ui/ShowcaseWrapper.tsx +4 -16
- package/src/components/ui/Stepper.tsx +5 -6
- package/src/components/ui/first-slice.test.tsx +98 -0
- package/src/components/ui/index.ts +62 -3
- package/src/components/ui/interaction-primitives.test.tsx +77 -0
- package/src/components/ui/kbd-icons.test.tsx +90 -0
- package/src/components/ui/product-patterns.test.tsx +77 -0
- package/src/styles/themes.css +411 -1
- package/tailwind-preset.ts +7 -0
- package/dist/index-CmS6hcUk.d.mts +0 -753
- package/dist/index-CmS6hcUk.d.ts +0 -753
package/dist/index.js
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
2
3
|
var __defProp = Object.defineProperty;
|
|
3
4
|
var __defProps = Object.defineProperties;
|
|
4
5
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
6
|
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
6
7
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
8
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
9
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
8
10
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
11
|
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
10
12
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
@@ -44,6 +46,14 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
44
46
|
}
|
|
45
47
|
return to;
|
|
46
48
|
};
|
|
49
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
50
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
51
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
52
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
53
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
54
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
55
|
+
mod
|
|
56
|
+
));
|
|
47
57
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
48
58
|
|
|
49
59
|
// src/index.ts
|
|
@@ -51,12 +61,16 @@ var src_exports = {};
|
|
|
51
61
|
__export(src_exports, {
|
|
52
62
|
Accordion: () => Accordion,
|
|
53
63
|
Alert: () => Alert,
|
|
64
|
+
AuthCard: () => AuthCard,
|
|
65
|
+
AuthDivider: () => AuthDivider,
|
|
66
|
+
AuthLayout: () => AuthLayout,
|
|
54
67
|
Avatar: () => Avatar,
|
|
55
68
|
AvatarGroup: () => AvatarGroup,
|
|
56
69
|
Badge: () => Badge,
|
|
57
70
|
Breadcrumbs: () => Breadcrumbs,
|
|
58
71
|
Button: () => Button,
|
|
59
72
|
ButtonChrome: () => ButtonChrome,
|
|
73
|
+
CANONICAL_ICONS: () => CANONICAL_ICONS,
|
|
60
74
|
Calendar: () => Calendar,
|
|
61
75
|
Caption: () => Caption,
|
|
62
76
|
Card: () => Card,
|
|
@@ -78,9 +92,15 @@ __export(src_exports, {
|
|
|
78
92
|
DropdownButton: () => DropdownButton,
|
|
79
93
|
DropdownItem: () => DropdownItem,
|
|
80
94
|
DropdownMenu: () => DropdownMenu,
|
|
95
|
+
DropdownRadioGroup: () => DropdownRadioGroup,
|
|
96
|
+
DropdownRadioItem: () => DropdownRadioItem,
|
|
81
97
|
EmptyState: () => EmptyState,
|
|
82
98
|
FileUpload: () => FileUpload,
|
|
99
|
+
FilterBar: () => FilterBar,
|
|
83
100
|
FilterChips: () => FilterChips,
|
|
101
|
+
FilterControls: () => FilterControls,
|
|
102
|
+
FilterMenu: () => FilterMenu,
|
|
103
|
+
FormField: () => FormField,
|
|
84
104
|
H1: () => H1,
|
|
85
105
|
H2: () => H2,
|
|
86
106
|
H3: () => H3,
|
|
@@ -107,14 +127,20 @@ __export(src_exports, {
|
|
|
107
127
|
IconChevronRight: () => IconChevronRight,
|
|
108
128
|
IconClipboardEdit: () => IconClipboardEdit,
|
|
109
129
|
IconClose: () => IconClose,
|
|
130
|
+
IconCodePreview: () => IconCodePreview,
|
|
110
131
|
IconCohort: () => IconCohort,
|
|
132
|
+
IconCommandCursor: () => IconCommandCursor,
|
|
111
133
|
IconCopy: () => IconCopy,
|
|
112
134
|
IconCumulativeChart: () => IconCumulativeChart,
|
|
135
|
+
IconDataReel: () => IconDataReel,
|
|
113
136
|
IconDatabase: () => IconDatabase,
|
|
114
137
|
IconDownload: () => IconDownload,
|
|
115
138
|
IconEdit: () => IconEdit,
|
|
116
139
|
IconErrorOutline: () => IconErrorOutline,
|
|
140
|
+
IconEventStream: () => IconEventStream,
|
|
117
141
|
IconExclamation: () => IconExclamation,
|
|
142
|
+
IconExperimentSplit: () => IconExperimentSplit,
|
|
143
|
+
IconFeatureGate: () => IconFeatureGate,
|
|
118
144
|
IconFlag: () => IconFlag,
|
|
119
145
|
IconFlare: () => IconFlare,
|
|
120
146
|
IconFlask: () => IconFlask,
|
|
@@ -122,19 +148,24 @@ __export(src_exports, {
|
|
|
122
148
|
IconGridView: () => IconGridView,
|
|
123
149
|
IconHandClick: () => IconHandClick,
|
|
124
150
|
IconHome: () => IconHome,
|
|
151
|
+
IconInfo: () => IconInfo,
|
|
152
|
+
IconInsightBoard: () => IconInsightBoard,
|
|
125
153
|
IconLayers: () => IconLayers,
|
|
126
154
|
IconListView: () => IconListView,
|
|
127
155
|
IconLogout: () => IconLogout,
|
|
128
156
|
IconMail: () => IconMail,
|
|
129
157
|
IconMoon: () => IconMoon,
|
|
158
|
+
IconOldWindow: () => IconOldWindow,
|
|
130
159
|
IconPanelRight: () => IconPanelRight,
|
|
131
160
|
IconPerson: () => IconPerson,
|
|
132
161
|
IconPlayCircle: () => IconPlayCircle,
|
|
133
162
|
IconPlus: () => IconPlus,
|
|
134
163
|
IconPremium: () => IconPremium,
|
|
135
164
|
IconQueryEditor: () => IconQueryEditor,
|
|
165
|
+
IconQueryStack: () => IconQueryStack,
|
|
136
166
|
IconRadar: () => IconRadar,
|
|
137
167
|
IconRecording: () => IconRecording,
|
|
168
|
+
IconReplayFrame: () => IconReplayFrame,
|
|
138
169
|
IconRobot: () => IconRobot,
|
|
139
170
|
IconRocket: () => IconRocket,
|
|
140
171
|
IconSave: () => IconSave,
|
|
@@ -145,6 +176,7 @@ __export(src_exports, {
|
|
|
145
176
|
IconStar: () => IconStar,
|
|
146
177
|
IconSubArrowRight: () => IconSubArrowRight,
|
|
147
178
|
IconSun: () => IconSun,
|
|
179
|
+
IconSurveyCard: () => IconSurveyCard,
|
|
148
180
|
IconSurveys: () => IconSurveys,
|
|
149
181
|
IconSync: () => IconSync,
|
|
150
182
|
IconTableChart: () => IconTableChart,
|
|
@@ -168,12 +200,16 @@ __export(src_exports, {
|
|
|
168
200
|
Kbd: () => Kbd,
|
|
169
201
|
Label: () => Label,
|
|
170
202
|
Lead: () => Lead,
|
|
203
|
+
Loader: () => Loader,
|
|
204
|
+
LoadingState: () => LoadingState,
|
|
171
205
|
MiniTrendBars: () => MiniTrendBars,
|
|
172
206
|
Modal: () => Modal,
|
|
173
207
|
Mono: () => Mono,
|
|
208
|
+
OLD_UI_ICONS: () => OLD_UI_ICONS,
|
|
174
209
|
Overline: () => Overline,
|
|
175
210
|
P: () => P,
|
|
176
211
|
PH_ICONS: () => PH_ICONS,
|
|
212
|
+
PH_ICON_ALIASES: () => PH_ICON_ALIASES,
|
|
177
213
|
Pagination: () => Pagination,
|
|
178
214
|
Panel: () => Panel,
|
|
179
215
|
Progress: () => Progress,
|
|
@@ -184,8 +220,12 @@ __export(src_exports, {
|
|
|
184
220
|
SearchInput: () => SearchInput,
|
|
185
221
|
SegmentedControl: () => SegmentedControl,
|
|
186
222
|
Select: () => Select,
|
|
223
|
+
SettingsLayout: () => SettingsLayout,
|
|
224
|
+
SettingsNav: () => SettingsNav,
|
|
187
225
|
ShowcaseWrapper: () => ShowcaseWrapper,
|
|
226
|
+
Skeleton: () => Skeleton,
|
|
188
227
|
Small: () => Small,
|
|
228
|
+
SortMenu: () => SortMenu,
|
|
189
229
|
Stat: () => Stat,
|
|
190
230
|
Stepper: () => Stepper,
|
|
191
231
|
THEMES: () => THEMES,
|
|
@@ -211,6 +251,9 @@ __export(src_exports, {
|
|
|
211
251
|
});
|
|
212
252
|
module.exports = __toCommonJS(src_exports);
|
|
213
253
|
|
|
254
|
+
// src/components/ui/Button.tsx
|
|
255
|
+
var import_react = require("react");
|
|
256
|
+
|
|
214
257
|
// src/components/ui/ButtonChrome.tsx
|
|
215
258
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
216
259
|
function ButtonChrome({ label, icon, sideIcon, split }) {
|
|
@@ -255,7 +298,7 @@ var shapeClass = {
|
|
|
255
298
|
square: "ph-btn-square",
|
|
256
299
|
wide: "ph-btn-wide"
|
|
257
300
|
};
|
|
258
|
-
|
|
301
|
+
var Button = (0, import_react.forwardRef)(function Button2(_a, ref) {
|
|
259
302
|
var _b = _a, {
|
|
260
303
|
variant = "secondary",
|
|
261
304
|
size = "md",
|
|
@@ -264,9 +307,12 @@ function Button(_a) {
|
|
|
264
307
|
split = false,
|
|
265
308
|
icon,
|
|
266
309
|
sideIcon,
|
|
310
|
+
loading = false,
|
|
311
|
+
loadingLabel,
|
|
267
312
|
className,
|
|
268
313
|
children,
|
|
269
|
-
type = "button"
|
|
314
|
+
type = "button",
|
|
315
|
+
disabled
|
|
270
316
|
} = _b, props = __objRest(_b, [
|
|
271
317
|
"variant",
|
|
272
318
|
"size",
|
|
@@ -275,23 +321,32 @@ function Button(_a) {
|
|
|
275
321
|
"split",
|
|
276
322
|
"icon",
|
|
277
323
|
"sideIcon",
|
|
324
|
+
"loading",
|
|
325
|
+
"loadingLabel",
|
|
278
326
|
"className",
|
|
279
327
|
"children",
|
|
280
|
-
"type"
|
|
328
|
+
"type",
|
|
329
|
+
"disabled"
|
|
281
330
|
]);
|
|
282
|
-
const usesLemonChrome =
|
|
283
|
-
const
|
|
284
|
-
|
|
285
|
-
|
|
331
|
+
const usesLemonChrome = !["tertiary", "ghost", "link"].includes(variant);
|
|
332
|
+
const label = loadingLabel != null ? loadingLabel : children;
|
|
333
|
+
const leadingIcon = loading ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "ph-btn-spinner", "aria-hidden": true }) : icon;
|
|
334
|
+
const content = usesLemonChrome ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(ButtonChrome, { label, icon: leadingIcon, sideIcon, split }) : /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
335
|
+
leadingIcon != null ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "ph-btn-icon", children: leadingIcon }) : null,
|
|
336
|
+
label != null ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "ph-btn-label", children: label }) : null,
|
|
286
337
|
split ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "ph-btn-split-divider", "aria-hidden": true }) : null,
|
|
287
338
|
sideIcon != null ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "ph-btn-side-icon", children: sideIcon }) : null
|
|
288
339
|
] });
|
|
289
340
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
290
341
|
"button",
|
|
291
342
|
__spreadProps(__spreadValues({
|
|
343
|
+
ref,
|
|
292
344
|
type,
|
|
345
|
+
disabled: disabled || loading,
|
|
346
|
+
"aria-busy": loading || void 0,
|
|
293
347
|
className: cn(
|
|
294
348
|
"ph-btn",
|
|
349
|
+
usesLemonChrome && "ph-btn-raised",
|
|
295
350
|
outline && "ph-btn-outline",
|
|
296
351
|
variantClass[variant],
|
|
297
352
|
sizeClass[size],
|
|
@@ -303,11 +358,16 @@ function Button(_a) {
|
|
|
303
358
|
children: content
|
|
304
359
|
})
|
|
305
360
|
);
|
|
306
|
-
}
|
|
361
|
+
});
|
|
362
|
+
Button.displayName = "Button";
|
|
363
|
+
|
|
364
|
+
// src/components/ui/Alert.tsx
|
|
365
|
+
var import_react5 = require("react");
|
|
307
366
|
|
|
308
367
|
// src/components/icons/IconBase.tsx
|
|
368
|
+
var import_react2 = require("react");
|
|
309
369
|
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
310
|
-
|
|
370
|
+
var IconBase = (0, import_react2.forwardRef)(function IconBase2(_a, ref) {
|
|
311
371
|
var _b = _a, {
|
|
312
372
|
className,
|
|
313
373
|
size,
|
|
@@ -315,7 +375,12 @@ function IconBase(_a) {
|
|
|
315
375
|
viewBox = "0 0 24 24",
|
|
316
376
|
fill: fill2 = "none",
|
|
317
377
|
xmlns = "http://www.w3.org/2000/svg",
|
|
318
|
-
focusable = "false"
|
|
378
|
+
focusable = "false",
|
|
379
|
+
style,
|
|
380
|
+
role,
|
|
381
|
+
"aria-hidden": ariaHidden,
|
|
382
|
+
"aria-label": ariaLabel,
|
|
383
|
+
"aria-labelledby": ariaLabelledBy
|
|
319
384
|
} = _b, props = __objRest(_b, [
|
|
320
385
|
"className",
|
|
321
386
|
"size",
|
|
@@ -323,41 +388,55 @@ function IconBase(_a) {
|
|
|
323
388
|
"viewBox",
|
|
324
389
|
"fill",
|
|
325
390
|
"xmlns",
|
|
326
|
-
"focusable"
|
|
391
|
+
"focusable",
|
|
392
|
+
"style",
|
|
393
|
+
"role",
|
|
394
|
+
"aria-hidden",
|
|
395
|
+
"aria-label",
|
|
396
|
+
"aria-labelledby"
|
|
327
397
|
]);
|
|
328
|
-
|
|
329
|
-
const dimensionProps = size != null ? { width: size, height: size } : {};
|
|
398
|
+
const hasAccessibleName = Boolean(ariaLabel || ariaLabelledBy);
|
|
330
399
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
331
400
|
"svg",
|
|
332
|
-
__spreadProps(__spreadValues(
|
|
333
|
-
|
|
334
|
-
|
|
401
|
+
__spreadProps(__spreadValues({
|
|
402
|
+
ref,
|
|
403
|
+
className: cn("ph-icon", className),
|
|
335
404
|
viewBox,
|
|
336
405
|
fill: fill2,
|
|
337
406
|
xmlns,
|
|
338
407
|
focusable,
|
|
339
|
-
|
|
340
|
-
|
|
408
|
+
role: role != null ? role : hasAccessibleName ? "img" : void 0,
|
|
409
|
+
"aria-hidden": ariaHidden != null ? ariaHidden : hasAccessibleName ? void 0 : true,
|
|
410
|
+
"aria-label": ariaLabel,
|
|
411
|
+
"aria-labelledby": ariaLabelledBy,
|
|
412
|
+
style: __spreadValues({ width: size, height: size }, style)
|
|
413
|
+
}, props), {
|
|
341
414
|
children
|
|
342
415
|
})
|
|
343
416
|
);
|
|
344
|
-
}
|
|
417
|
+
});
|
|
418
|
+
IconBase.displayName = "IconBase";
|
|
345
419
|
|
|
346
420
|
// src/components/icons/createIconBase.tsx
|
|
421
|
+
var import_react3 = require("react");
|
|
347
422
|
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
348
|
-
function createIconBase({ viewBox = "0 0 24 24", paths }) {
|
|
349
|
-
|
|
350
|
-
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(IconBase, __spreadProps(__spreadValues({ viewBox }, props), { children: paths }));
|
|
351
|
-
};
|
|
423
|
+
function createIconBase({ name = "IconGlyph", viewBox = "0 0 24 24", paths }) {
|
|
424
|
+
const IconGlyph = (0, import_react3.forwardRef)(function IconGlyph2(props, ref) {
|
|
425
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(IconBase, __spreadProps(__spreadValues({ ref, viewBox }, props), { children: paths }));
|
|
426
|
+
});
|
|
427
|
+
IconGlyph.displayName = name;
|
|
428
|
+
return IconGlyph;
|
|
352
429
|
}
|
|
353
|
-
function createIconBasePath(d, viewBox = "0 0 24 24") {
|
|
430
|
+
function createIconBasePath(d, viewBox = "0 0 24 24", name) {
|
|
354
431
|
return createIconBase({
|
|
432
|
+
name,
|
|
355
433
|
viewBox,
|
|
356
434
|
paths: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d, fill: "currentColor" })
|
|
357
435
|
});
|
|
358
436
|
}
|
|
359
437
|
|
|
360
438
|
// src/components/icons/icons.tsx
|
|
439
|
+
var import_react4 = require("react");
|
|
361
440
|
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
362
441
|
var fill = (d) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d, fill: "currentColor" });
|
|
363
442
|
var IconAreaChart = createIconBase({
|
|
@@ -466,6 +545,12 @@ var IconErrorOutline = createIconBase({
|
|
|
466
545
|
"m11 15h2v2h-2zm0-8h2v6h-2zm.99-5c-5.52 0-9.99 4.48-9.99 10s4.47 10 9.99 10c5.53 0 10.01-4.48 10.01-10s-4.48-10-10.01-10zm.01 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"
|
|
467
546
|
)
|
|
468
547
|
});
|
|
548
|
+
var IconInfo = createIconBase({
|
|
549
|
+
name: "IconInfo",
|
|
550
|
+
paths: fill(
|
|
551
|
+
"M11 10h2v7h-2v-7zm0-3h2v2h-2V7zm1-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"
|
|
552
|
+
)
|
|
553
|
+
});
|
|
469
554
|
var IconCancel = createIconBase({
|
|
470
555
|
paths: fill(
|
|
471
556
|
"m12 2c-5.53 0-10 4.47-10 10s4.47 10 10 10 10-4.47 10-10-4.47-10-10-10zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm3.59-13-3.59 3.59-3.59-3.59-1.41 1.41 3.59 3.59-3.59 3.59 1.41 1.41 3.59-3.59 3.59 3.59 1.41-1.41-3.59-3.59 3.59-3.59z"
|
|
@@ -563,18 +648,158 @@ var IconToggle = createIconBasePath(
|
|
|
563
648
|
var IconRocket = createIconBasePath(
|
|
564
649
|
"M9.19 6.35c-2.04 2.29-3.44 5.58-3.57 5.89L2 10.69l4.05-4.05c.47-.47 1.15-.68 1.81-.55l1.33 1.26zm5.45 8.67l-1.33-1.26c-.66-.13-1.34.08-1.81.55L2 18.31l3.62 3.57c.31-.13 3.6-1.53 5.89-3.57 1.53-1.72 2.52-3.76 2.87-5.02zM12 2c-1.1 0-2 .9-2 2v1.09c2.84.48 5 2.94 5 5.91 0 2.97-2.16 5.43-5 5.91V20c0 1.1.9 2 2 2s2-.9 2-2v-1.09c-2.84-.48-5-2.94-5-5.91 0-2.97 2.16-5.43 5-5.91V4c0-1.1-.9-2-2-2z"
|
|
565
650
|
);
|
|
566
|
-
var IconTerminal =
|
|
651
|
+
var IconTerminal = createIconBase({
|
|
652
|
+
name: "IconTerminal",
|
|
653
|
+
paths: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
654
|
+
"path",
|
|
655
|
+
{
|
|
656
|
+
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",
|
|
657
|
+
fill: "currentColor",
|
|
658
|
+
fillRule: "evenodd",
|
|
659
|
+
clipRule: "evenodd"
|
|
660
|
+
}
|
|
661
|
+
)
|
|
662
|
+
});
|
|
663
|
+
var IconOldWindow = createIconBase({
|
|
664
|
+
name: "IconOldWindow",
|
|
665
|
+
paths: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
666
|
+
"path",
|
|
667
|
+
{
|
|
668
|
+
d: "M3 3v18h18V3H3zm2 7v9h14v-9H5zm1-4h2v1H6V6zm3 0h2v1H9V6z",
|
|
669
|
+
fill: "currentColor",
|
|
670
|
+
fillRule: "evenodd",
|
|
671
|
+
clipRule: "evenodd"
|
|
672
|
+
}
|
|
673
|
+
)
|
|
674
|
+
});
|
|
675
|
+
var IconCommandCursor = createIconBase({
|
|
676
|
+
name: "IconCommandCursor",
|
|
677
|
+
paths: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
678
|
+
"path",
|
|
679
|
+
{
|
|
680
|
+
d: "M4 3v18h16V3H4zm2 2h12v14H6V5zm1.5 3.5L11 12l-3.5 3.5L9 17l5-5-5-5-1.5 1.5zM13 17h4v-2h-4v2z",
|
|
681
|
+
fill: "currentColor",
|
|
682
|
+
fillRule: "evenodd",
|
|
683
|
+
clipRule: "evenodd"
|
|
684
|
+
}
|
|
685
|
+
)
|
|
686
|
+
});
|
|
687
|
+
var IconDataReel = createIconBase({
|
|
688
|
+
name: "IconDataReel",
|
|
689
|
+
paths: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
690
|
+
"path",
|
|
691
|
+
{
|
|
692
|
+
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",
|
|
693
|
+
fill: "currentColor",
|
|
694
|
+
fillRule: "evenodd",
|
|
695
|
+
clipRule: "evenodd"
|
|
696
|
+
}
|
|
697
|
+
)
|
|
698
|
+
});
|
|
699
|
+
var IconCodePreview = createIconBase({
|
|
700
|
+
name: "IconCodePreview",
|
|
701
|
+
paths: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
702
|
+
"path",
|
|
703
|
+
{
|
|
704
|
+
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",
|
|
705
|
+
fill: "currentColor",
|
|
706
|
+
fillRule: "evenodd",
|
|
707
|
+
clipRule: "evenodd"
|
|
708
|
+
}
|
|
709
|
+
)
|
|
710
|
+
});
|
|
711
|
+
var IconInsightBoard = createIconBase({
|
|
712
|
+
name: "IconInsightBoard",
|
|
713
|
+
paths: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
714
|
+
"path",
|
|
715
|
+
{
|
|
716
|
+
d: "M3 3v18h18V3H3zm2 2h14v3H5V5zm0 5h6v9H5v-9zm8 0h6v4h-6v-4zm0 6h6v3h-6v-3zM6 6h2v1H6V6zm3 0h2v1H9V6z",
|
|
717
|
+
fill: "currentColor",
|
|
718
|
+
fillRule: "evenodd",
|
|
719
|
+
clipRule: "evenodd"
|
|
720
|
+
}
|
|
721
|
+
)
|
|
722
|
+
});
|
|
723
|
+
var IconEventStream = createIconBase({
|
|
724
|
+
name: "IconEventStream",
|
|
725
|
+
paths: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
|
|
726
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M5 4h2v16H5V4z", fill: "currentColor", opacity: "0.45" }),
|
|
727
|
+
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")
|
|
728
|
+
] })
|
|
729
|
+
});
|
|
730
|
+
var IconFeatureGate = createIconBase({
|
|
731
|
+
name: "IconFeatureGate",
|
|
732
|
+
paths: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
733
|
+
"path",
|
|
734
|
+
{
|
|
735
|
+
d: "M4 3h2v18H4V3zm3 2h12l-3 4 3 4H7V5zm4 1-2.2 4H12l-1 4 4.2-5H12l1-3h-2z",
|
|
736
|
+
fill: "currentColor",
|
|
737
|
+
fillRule: "evenodd",
|
|
738
|
+
clipRule: "evenodd"
|
|
739
|
+
}
|
|
740
|
+
)
|
|
741
|
+
});
|
|
742
|
+
var IconReplayFrame = createIconBase({
|
|
743
|
+
name: "IconReplayFrame",
|
|
744
|
+
paths: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
745
|
+
"path",
|
|
746
|
+
{
|
|
747
|
+
d: "M3 3v18h18V3H3zm2 2h14v11H5V5zm5 2v7l6-3.5L10 7zm-5 11h9v1H5v-1zm11 0h3v1h-3v-1z",
|
|
748
|
+
fill: "currentColor",
|
|
749
|
+
fillRule: "evenodd",
|
|
750
|
+
clipRule: "evenodd"
|
|
751
|
+
}
|
|
752
|
+
)
|
|
753
|
+
});
|
|
754
|
+
var IconQueryStack = createIconBase({
|
|
755
|
+
name: "IconQueryStack",
|
|
756
|
+
paths: fill(
|
|
757
|
+
"M4 5c0-1.66 3.58-3 8-3s8 1.34 8 3-3.58 3-8 3-8-1.34-8-3zm0 3v3c0 1.66 3.58 3 8 3 .7 0 1.38-.04 2-.12V11.8c-.64.13-1.31.2-2 .2-4.42 0-8-1.34-8-3zm0 6v3c0 1.66 3.58 3 8 3 .7 0 1.38-.04 2-.12v-2.08c-.64.13-1.31.2-2 .2-4.42 0-8-1.34-8-3zm12-1 5 4-5 4v-3h-4v-2h4v-3z"
|
|
758
|
+
)
|
|
759
|
+
});
|
|
760
|
+
var IconExperimentSplit = createIconBase({
|
|
761
|
+
name: "IconExperimentSplit",
|
|
762
|
+
paths: fill(
|
|
763
|
+
"M5 3a3 3 0 1 0 0 6 3 3 0 0 0 0-6zm14 0a3 3 0 1 0 0 6 3 3 0 0 0 0-6zM5 15a3 3 0 1 0 0 6 3 3 0 0 0 0-6zm1-6h2c0 2.2 1.8 4 4 4h2.17A3 3 0 0 1 19 11v2a3 3 0 0 1-4.83-2H12a6 6 0 0 1-6-6v4zm0 4a6 6 0 0 0 6-6h2a8 8 0 0 1-8 8v-2z"
|
|
764
|
+
)
|
|
765
|
+
});
|
|
766
|
+
var IconSurveyCard = createIconBase({
|
|
767
|
+
name: "IconSurveyCard",
|
|
768
|
+
paths: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
769
|
+
"path",
|
|
770
|
+
{
|
|
771
|
+
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",
|
|
772
|
+
fill: "currentColor",
|
|
773
|
+
fillRule: "evenodd",
|
|
774
|
+
clipRule: "evenodd"
|
|
775
|
+
}
|
|
776
|
+
)
|
|
777
|
+
});
|
|
778
|
+
var OLD_UI_ICONS = {
|
|
779
|
+
oldWindow: IconOldWindow,
|
|
780
|
+
commandCursor: IconCommandCursor,
|
|
781
|
+
dataReel: IconDataReel,
|
|
782
|
+
codePreview: IconCodePreview,
|
|
783
|
+
insightBoard: IconInsightBoard,
|
|
784
|
+
eventStream: IconEventStream,
|
|
785
|
+
featureGate: IconFeatureGate,
|
|
786
|
+
replayFrame: IconReplayFrame,
|
|
787
|
+
queryStack: IconQueryStack,
|
|
788
|
+
experimentSplit: IconExperimentSplit,
|
|
789
|
+
surveyCard: IconSurveyCard
|
|
790
|
+
};
|
|
567
791
|
var IconActivity = createIconBasePath(
|
|
568
792
|
"M22 12h-4l-3 9L9 3l-3 9H2v2h6.76l2.24-6.72L15 15l2.24-6.72L19 14h3v-2z"
|
|
569
793
|
);
|
|
570
794
|
var IconFlask = createIconBasePath(
|
|
571
795
|
"M19.8 18.4L14 10.67V6.5l1.35-1.35c.39-.39.39-1.02 0-1.41L14.65 2.7a.9959.9959 0 0 0-1.41 0L9.35 6.54c-.39.39-.39 1.02 0 1.41L10.7 9.3v4.17L4.2 18.4C3.53 19.07 4.04 20.25 5 20.25h14c.96 0 1.47-1.18.8-1.85zM6.91 18.25l5.09-5.09 5.09 5.09H6.91z"
|
|
572
796
|
);
|
|
573
|
-
|
|
797
|
+
var IconSpinner = (0, import_react4.forwardRef)(function IconSpinner2(_a, ref) {
|
|
574
798
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
575
|
-
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(IconSync, __spreadValues({ className: cn("ph-icon-spin", className) }, props));
|
|
576
|
-
}
|
|
577
|
-
|
|
799
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(IconSync, __spreadValues({ ref, className: cn("ph-icon-spin", className) }, props));
|
|
800
|
+
});
|
|
801
|
+
IconSpinner.displayName = "IconSpinner";
|
|
802
|
+
var CANONICAL_ICONS = {
|
|
578
803
|
activity: IconActivity,
|
|
579
804
|
areaChart: IconAreaChart,
|
|
580
805
|
arrowDown: IconArrowDown,
|
|
@@ -589,74 +814,100 @@ var PH_ICONS = {
|
|
|
589
814
|
chevronDown: IconChevronDown,
|
|
590
815
|
chevronLeft: IconChevronLeft,
|
|
591
816
|
chevronRight: IconChevronRight,
|
|
592
|
-
|
|
817
|
+
clipboardEdit: IconClipboardEdit,
|
|
593
818
|
close: IconClose,
|
|
819
|
+
codePreview: IconCodePreview,
|
|
594
820
|
cohort: IconCohort,
|
|
821
|
+
commandCursor: IconCommandCursor,
|
|
595
822
|
copy: IconCopy,
|
|
596
823
|
cumulativeChart: IconCumulativeChart,
|
|
824
|
+
dataReel: IconDataReel,
|
|
597
825
|
database: IconDatabase,
|
|
598
826
|
download: IconDownload,
|
|
599
827
|
edit: IconEdit,
|
|
600
828
|
errorOutline: IconErrorOutline,
|
|
829
|
+
eventStream: IconEventStream,
|
|
601
830
|
exclamation: IconExclamation,
|
|
831
|
+
experimentSplit: IconExperimentSplit,
|
|
832
|
+
featureGate: IconFeatureGate,
|
|
602
833
|
flag: IconFlag,
|
|
603
834
|
flare: IconFlare,
|
|
604
835
|
flask: IconFlask,
|
|
605
836
|
gift: IconGift,
|
|
606
|
-
|
|
837
|
+
gridView: IconGridView,
|
|
607
838
|
handClick: IconHandClick,
|
|
608
839
|
home: IconHome,
|
|
609
|
-
info:
|
|
840
|
+
info: IconInfo,
|
|
841
|
+
insightBoard: IconInsightBoard,
|
|
610
842
|
layers: IconLayers,
|
|
611
|
-
|
|
843
|
+
listView: IconListView,
|
|
612
844
|
logout: IconLogout,
|
|
613
845
|
mail: IconMail,
|
|
614
846
|
moon: IconMoon,
|
|
847
|
+
oldWindow: IconOldWindow,
|
|
615
848
|
panelRight: IconPanelRight,
|
|
616
849
|
person: IconPerson,
|
|
617
|
-
|
|
850
|
+
playCircle: IconPlayCircle,
|
|
618
851
|
plus: IconPlus,
|
|
619
852
|
premium: IconPremium,
|
|
620
853
|
queryEditor: IconQueryEditor,
|
|
854
|
+
queryStack: IconQueryStack,
|
|
621
855
|
radar: IconRadar,
|
|
622
856
|
recording: IconRecording,
|
|
857
|
+
replayFrame: IconReplayFrame,
|
|
623
858
|
robot: IconRobot,
|
|
624
859
|
rocket: IconRocket,
|
|
625
860
|
save: IconSave,
|
|
626
861
|
search: IconSearch,
|
|
627
862
|
selectEvents: IconSelectEvents,
|
|
628
|
-
settings: IconTuning,
|
|
629
863
|
shoppingCart: IconShoppingCart,
|
|
630
864
|
spinner: IconSpinner,
|
|
631
865
|
star: IconStar,
|
|
632
866
|
subArrowRight: IconSubArrowRight,
|
|
633
867
|
sun: IconSun,
|
|
868
|
+
surveyCard: IconSurveyCard,
|
|
634
869
|
surveys: IconSurveys,
|
|
635
870
|
sync: IconSync,
|
|
636
871
|
tableChart: IconTableChart,
|
|
637
872
|
terminal: IconTerminal,
|
|
638
873
|
toggle: IconToggle,
|
|
639
874
|
trash: IconTrash,
|
|
640
|
-
|
|
875
|
+
tuning: IconTuning,
|
|
641
876
|
upload: IconUpload,
|
|
642
877
|
volume: IconVolume,
|
|
643
|
-
volumeOff: IconVolumeOff
|
|
878
|
+
volumeOff: IconVolumeOff
|
|
879
|
+
};
|
|
880
|
+
var PH_ICON_ALIASES = {
|
|
881
|
+
clipboard: IconClipboardEdit,
|
|
882
|
+
grid: IconGridView,
|
|
883
|
+
list: IconListView,
|
|
884
|
+
play: IconPlayCircle,
|
|
885
|
+
settings: IconTuning,
|
|
886
|
+
trendingUp: IconArrowUp,
|
|
644
887
|
warning: IconExclamation,
|
|
645
888
|
xCircle: IconCancel
|
|
646
889
|
};
|
|
647
|
-
|
|
890
|
+
var PH_ICONS = __spreadValues(__spreadValues({}, CANONICAL_ICONS), PH_ICON_ALIASES);
|
|
891
|
+
for (const [name, Icon] of Object.entries(CANONICAL_ICONS)) {
|
|
892
|
+
const namedIcon = Icon;
|
|
893
|
+
if (!namedIcon.displayName || namedIcon.displayName === "IconGlyph") {
|
|
894
|
+
namedIcon.displayName = `Icon${name[0].toUpperCase()}${name.slice(1)}`;
|
|
895
|
+
}
|
|
896
|
+
}
|
|
897
|
+
var IconByName = (0, import_react4.forwardRef)(function IconByName2(_a, ref) {
|
|
648
898
|
var _b = _a, { name } = _b, props = __objRest(_b, ["name"]);
|
|
649
899
|
const Icon = PH_ICONS[name];
|
|
650
|
-
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Icon, __spreadValues({}, props));
|
|
651
|
-
}
|
|
900
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Icon, __spreadValues({ ref }, props));
|
|
901
|
+
});
|
|
902
|
+
IconByName.displayName = "IconByName";
|
|
652
903
|
|
|
653
904
|
// src/components/ui/Alert.tsx
|
|
654
905
|
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
655
906
|
var statusConfig = {
|
|
656
|
-
info: { icon:
|
|
657
|
-
success: { icon: IconCheckCircle
|
|
658
|
-
warning: { icon: IconExclamation
|
|
659
|
-
danger: { icon: IconCancel
|
|
907
|
+
info: { icon: IconInfo },
|
|
908
|
+
success: { icon: IconCheckCircle },
|
|
909
|
+
warning: { icon: IconExclamation },
|
|
910
|
+
danger: { icon: IconCancel }
|
|
660
911
|
};
|
|
661
912
|
var statusClassMap = {
|
|
662
913
|
info: "ph-alert-info",
|
|
@@ -664,25 +915,43 @@ var statusClassMap = {
|
|
|
664
915
|
warning: "ph-alert-warning",
|
|
665
916
|
danger: "ph-alert-danger"
|
|
666
917
|
};
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
918
|
+
var Alert = (0, import_react5.forwardRef)(function Alert2(_a, ref) {
|
|
919
|
+
var _b = _a, {
|
|
920
|
+
status = "info",
|
|
921
|
+
title,
|
|
922
|
+
description,
|
|
923
|
+
icon,
|
|
924
|
+
children,
|
|
925
|
+
className,
|
|
926
|
+
onDismiss,
|
|
927
|
+
live,
|
|
928
|
+
dismissLabel = "Dismiss notification",
|
|
929
|
+
role
|
|
930
|
+
} = _b, props = __objRest(_b, [
|
|
931
|
+
"status",
|
|
932
|
+
"title",
|
|
933
|
+
"description",
|
|
934
|
+
"icon",
|
|
935
|
+
"children",
|
|
936
|
+
"className",
|
|
937
|
+
"onDismiss",
|
|
938
|
+
"live",
|
|
939
|
+
"dismissLabel",
|
|
940
|
+
"role"
|
|
941
|
+
]);
|
|
676
942
|
const config = statusConfig[status];
|
|
677
943
|
const Icon = config.icon;
|
|
678
944
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
679
945
|
"div",
|
|
680
|
-
{
|
|
681
|
-
|
|
682
|
-
|
|
946
|
+
__spreadProps(__spreadValues({
|
|
947
|
+
ref,
|
|
948
|
+
role: role != null ? role : live === "assertive" ? "alert" : live === "polite" ? "status" : void 0,
|
|
949
|
+
"aria-live": live,
|
|
950
|
+
className: cn("ph-alert", statusClassMap[status], className)
|
|
951
|
+
}, props), {
|
|
683
952
|
children: [
|
|
684
|
-
icon != null ? icon : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Icon, { className:
|
|
685
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "flex-1", children: [
|
|
953
|
+
icon != null ? icon : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Icon, { className: "ph-alert-icon mt-0.5 h-5 w-5 shrink-0", "aria-hidden": true }),
|
|
954
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "min-w-0 flex-1", children: [
|
|
686
955
|
title && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "font-semibold", children: title }),
|
|
687
956
|
description && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "mt-1 text-sm text-ph-subtle", children: description }),
|
|
688
957
|
children
|
|
@@ -692,17 +961,19 @@ function Alert({
|
|
|
692
961
|
{
|
|
693
962
|
type: "button",
|
|
694
963
|
onClick: onDismiss,
|
|
695
|
-
className: "
|
|
696
|
-
"aria-label":
|
|
697
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
964
|
+
className: "ph-alert-dismiss",
|
|
965
|
+
"aria-label": dismissLabel,
|
|
966
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(IconClose, { className: "h-4 w-4", "aria-hidden": true })
|
|
698
967
|
}
|
|
699
968
|
)
|
|
700
969
|
]
|
|
701
|
-
}
|
|
970
|
+
})
|
|
702
971
|
);
|
|
703
|
-
}
|
|
972
|
+
});
|
|
973
|
+
Alert.displayName = "Alert";
|
|
704
974
|
|
|
705
975
|
// src/components/ui/Badge.tsx
|
|
976
|
+
var import_react6 = require("react");
|
|
706
977
|
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
707
978
|
var variantMap = {
|
|
708
979
|
brand: "ph-badge-brand",
|
|
@@ -717,66 +988,95 @@ var sizeMap = {
|
|
|
717
988
|
sm: "text-[10px] px-1.5 py-0.5",
|
|
718
989
|
md: ""
|
|
719
990
|
};
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
991
|
+
var Badge = (0, import_react6.forwardRef)(function Badge2(_a, ref) {
|
|
992
|
+
var _b = _a, {
|
|
993
|
+
variant = "neutral",
|
|
994
|
+
size = "md",
|
|
995
|
+
children,
|
|
996
|
+
className
|
|
997
|
+
} = _b, props = __objRest(_b, [
|
|
998
|
+
"variant",
|
|
999
|
+
"size",
|
|
1000
|
+
"children",
|
|
1001
|
+
"className"
|
|
1002
|
+
]);
|
|
726
1003
|
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
727
1004
|
"span",
|
|
728
|
-
{
|
|
1005
|
+
__spreadProps(__spreadValues({
|
|
1006
|
+
ref,
|
|
729
1007
|
className: cn(
|
|
730
1008
|
"ph-badge",
|
|
731
1009
|
variantMap[variant],
|
|
732
1010
|
sizeMap[size],
|
|
733
1011
|
className
|
|
734
|
-
)
|
|
1012
|
+
)
|
|
1013
|
+
}, props), {
|
|
735
1014
|
children
|
|
736
|
-
}
|
|
1015
|
+
})
|
|
737
1016
|
);
|
|
738
|
-
}
|
|
1017
|
+
});
|
|
1018
|
+
Badge.displayName = "Badge";
|
|
739
1019
|
|
|
740
1020
|
// src/components/ui/Card.tsx
|
|
1021
|
+
var import_react7 = require("react");
|
|
741
1022
|
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
742
1023
|
var variantMap2 = {
|
|
743
|
-
default: "
|
|
744
|
-
outlined: "border-2 border-ph-border
|
|
745
|
-
elevated: "
|
|
746
|
-
highlighted: "
|
|
1024
|
+
default: "",
|
|
1025
|
+
outlined: "border-2 border-ph-border",
|
|
1026
|
+
elevated: "ph-card-elevated",
|
|
1027
|
+
highlighted: "ph-card-highlighted"
|
|
747
1028
|
};
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
1029
|
+
var Card = (0, import_react7.forwardRef)(function Card2(_a, ref) {
|
|
1030
|
+
var _b = _a, {
|
|
1031
|
+
children,
|
|
1032
|
+
title,
|
|
1033
|
+
description,
|
|
1034
|
+
actions,
|
|
1035
|
+
footer,
|
|
1036
|
+
media,
|
|
1037
|
+
variant = "default",
|
|
1038
|
+
className,
|
|
1039
|
+
bodyClassName,
|
|
1040
|
+
interactive = false,
|
|
1041
|
+
titleAs: Title3 = "h3"
|
|
1042
|
+
} = _b, props = __objRest(_b, [
|
|
1043
|
+
"children",
|
|
1044
|
+
"title",
|
|
1045
|
+
"description",
|
|
1046
|
+
"actions",
|
|
1047
|
+
"footer",
|
|
1048
|
+
"media",
|
|
1049
|
+
"variant",
|
|
1050
|
+
"className",
|
|
1051
|
+
"bodyClassName",
|
|
1052
|
+
"interactive",
|
|
1053
|
+
"titleAs"
|
|
1054
|
+
]);
|
|
759
1055
|
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
760
1056
|
"div",
|
|
761
|
-
{
|
|
1057
|
+
__spreadProps(__spreadValues({
|
|
1058
|
+
ref,
|
|
762
1059
|
className: cn(
|
|
763
1060
|
"ph-card",
|
|
764
1061
|
variantMap2[variant],
|
|
1062
|
+
interactive && "ph-card-interactive",
|
|
765
1063
|
className
|
|
766
|
-
)
|
|
1064
|
+
)
|
|
1065
|
+
}, props), {
|
|
767
1066
|
children: [
|
|
768
|
-
media && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "-
|
|
1067
|
+
media && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "ph-card-media", children: media }),
|
|
769
1068
|
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: cn("ph-card-body", bodyClassName), children: [
|
|
770
|
-
title && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1069
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Title3, { className: "ph-card-title", children: title }),
|
|
771
1070
|
description && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "text-sm text-ph-subtle", children: description }),
|
|
772
1071
|
children,
|
|
773
1072
|
actions && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "ph-card-actions", children: actions })
|
|
774
1073
|
] }),
|
|
775
1074
|
footer && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "border-t border-ph-border px-6 py-4 text-xs text-ph-subtle", children: footer })
|
|
776
1075
|
]
|
|
777
|
-
}
|
|
1076
|
+
})
|
|
778
1077
|
);
|
|
779
|
-
}
|
|
1078
|
+
});
|
|
1079
|
+
Card.displayName = "Card";
|
|
780
1080
|
|
|
781
1081
|
// src/components/ui/Drawer.tsx
|
|
782
1082
|
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
@@ -827,21 +1127,269 @@ function Drawer({
|
|
|
827
1127
|
|
|
828
1128
|
// src/components/ui/Kbd.tsx
|
|
829
1129
|
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
1130
|
+
var platformLabels = {
|
|
1131
|
+
text: {
|
|
1132
|
+
command: "Command",
|
|
1133
|
+
cmd: "Command",
|
|
1134
|
+
option: "Option",
|
|
1135
|
+
alt: "Alt",
|
|
1136
|
+
control: "Control",
|
|
1137
|
+
ctrl: "Control",
|
|
1138
|
+
shift: "Shift"
|
|
1139
|
+
},
|
|
1140
|
+
mac: {
|
|
1141
|
+
command: "\u2318",
|
|
1142
|
+
cmd: "\u2318",
|
|
1143
|
+
option: "\u2325",
|
|
1144
|
+
alt: "\u2325",
|
|
1145
|
+
control: "\u2303",
|
|
1146
|
+
ctrl: "\u2303",
|
|
1147
|
+
shift: "\u21E7"
|
|
1148
|
+
},
|
|
1149
|
+
windows: {
|
|
1150
|
+
command: "Win",
|
|
1151
|
+
cmd: "Win",
|
|
1152
|
+
option: "Alt",
|
|
1153
|
+
alt: "Alt",
|
|
1154
|
+
control: "Ctrl",
|
|
1155
|
+
ctrl: "Ctrl",
|
|
1156
|
+
shift: "Shift"
|
|
1157
|
+
}
|
|
1158
|
+
};
|
|
1159
|
+
var spokenLabels = {
|
|
1160
|
+
"\u2318": "Command",
|
|
1161
|
+
"\u2325": "Option",
|
|
1162
|
+
"\u2303": "Control",
|
|
1163
|
+
"\u21E7": "Shift",
|
|
1164
|
+
"\u21B5": "Enter",
|
|
1165
|
+
"\u23CE": "Enter",
|
|
1166
|
+
"\u232B": "Backspace",
|
|
1167
|
+
"\u238B": "Escape"
|
|
1168
|
+
};
|
|
830
1169
|
function Kbd(_a) {
|
|
831
|
-
var _b = _a, {
|
|
1170
|
+
var _b = _a, {
|
|
1171
|
+
variant = "shortcut",
|
|
1172
|
+
keys,
|
|
1173
|
+
platform = "text",
|
|
1174
|
+
separator,
|
|
1175
|
+
children,
|
|
1176
|
+
className,
|
|
1177
|
+
"aria-label": ariaLabel
|
|
1178
|
+
} = _b, props = __objRest(_b, [
|
|
1179
|
+
"variant",
|
|
1180
|
+
"keys",
|
|
1181
|
+
"platform",
|
|
1182
|
+
"separator",
|
|
1183
|
+
"children",
|
|
1184
|
+
"className",
|
|
1185
|
+
"aria-label"
|
|
1186
|
+
]);
|
|
832
1187
|
if (variant === "token") {
|
|
833
|
-
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("code", __spreadProps(__spreadValues({ className: cn("ph-
|
|
1188
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("code", __spreadProps(__spreadValues({ className: cn("ph-code-token ph-kbd", className), "aria-label": ariaLabel }, props), { children }));
|
|
834
1189
|
}
|
|
835
|
-
const
|
|
836
|
-
|
|
1190
|
+
const sourceKeys = (keys == null ? void 0 : keys.length) ? keys : children != null ? [children] : [];
|
|
1191
|
+
const displayKeys = sourceKeys.map((key) => formatKey(key, platform));
|
|
1192
|
+
const accessibleLabel = ariaLabel != null ? ariaLabel : getShortcutLabel(displayKeys);
|
|
1193
|
+
if (variant === "key") {
|
|
1194
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("kbd", __spreadProps(__spreadValues({ className: cn("ph-keycap", className), "aria-label": accessibleLabel }, props), { children: displayKeys[0] }));
|
|
1195
|
+
}
|
|
1196
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("kbd", __spreadProps(__spreadValues({ className: cn("ph-shortcut-group ph-keycap", className), "aria-label": accessibleLabel }, props), { children: displayKeys.map((key, index) => /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("span", { className: "contents", children: [
|
|
1197
|
+
index > 0 && separator != null ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "ph-shortcut-separator", "aria-hidden": "true", children: separator }) : null,
|
|
1198
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "ph-shortcut-key", "aria-hidden": accessibleLabel ? true : void 0, children: key })
|
|
1199
|
+
] }, index)) }));
|
|
837
1200
|
}
|
|
838
|
-
function
|
|
839
|
-
|
|
840
|
-
|
|
1201
|
+
function formatKey(key, platform) {
|
|
1202
|
+
var _a;
|
|
1203
|
+
if (typeof key !== "string") return key;
|
|
1204
|
+
return (_a = platformLabels[platform][key.toLowerCase()]) != null ? _a : key;
|
|
1205
|
+
}
|
|
1206
|
+
function getShortcutLabel(keys) {
|
|
1207
|
+
const labels = keys.map((key) => {
|
|
1208
|
+
var _a;
|
|
1209
|
+
if (typeof key !== "string" && typeof key !== "number") return null;
|
|
1210
|
+
const value = String(key);
|
|
1211
|
+
return (_a = spokenLabels[value]) != null ? _a : value;
|
|
1212
|
+
});
|
|
1213
|
+
return labels.every((label) => label != null) ? labels.join(" + ") : void 0;
|
|
841
1214
|
}
|
|
842
1215
|
|
|
843
|
-
// src/components/ui/
|
|
1216
|
+
// src/components/ui/Loader.tsx
|
|
844
1217
|
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
1218
|
+
var loaderSizeClass = {
|
|
1219
|
+
sm: "ph-loader-sm",
|
|
1220
|
+
md: "ph-loader-md",
|
|
1221
|
+
lg: "ph-loader-lg"
|
|
1222
|
+
};
|
|
1223
|
+
var skeletonShapeClass = {
|
|
1224
|
+
title: "ph-skeleton-title",
|
|
1225
|
+
text: "ph-skeleton-text",
|
|
1226
|
+
"short-text": "ph-skeleton-text-short",
|
|
1227
|
+
avatar: "ph-skeleton-avatar",
|
|
1228
|
+
button: "ph-skeleton-button",
|
|
1229
|
+
block: "ph-skeleton-block"
|
|
1230
|
+
};
|
|
1231
|
+
function Loader(_a) {
|
|
1232
|
+
var _b = _a, {
|
|
1233
|
+
variant = "spinner",
|
|
1234
|
+
size = "md",
|
|
1235
|
+
label = "Loading",
|
|
1236
|
+
className
|
|
1237
|
+
} = _b, props = __objRest(_b, [
|
|
1238
|
+
"variant",
|
|
1239
|
+
"size",
|
|
1240
|
+
"label",
|
|
1241
|
+
"className"
|
|
1242
|
+
]);
|
|
1243
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
1244
|
+
"span",
|
|
1245
|
+
__spreadProps(__spreadValues({
|
|
1246
|
+
role: "status",
|
|
1247
|
+
"aria-label": label,
|
|
1248
|
+
className: cn("ph-loader", loaderSizeClass[size], className)
|
|
1249
|
+
}, props), {
|
|
1250
|
+
children: [
|
|
1251
|
+
variant === "spinner" ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "ph-loading", "aria-hidden": true }) : null,
|
|
1252
|
+
variant === "dots" ? /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("span", { className: "ph-loading-dots", "aria-hidden": true, children: [
|
|
1253
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", {}),
|
|
1254
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", {}),
|
|
1255
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", {})
|
|
1256
|
+
] }) : null,
|
|
1257
|
+
variant === "pulse" ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "ph-loading-pulse", "aria-hidden": true }) : null
|
|
1258
|
+
]
|
|
1259
|
+
})
|
|
1260
|
+
);
|
|
1261
|
+
}
|
|
1262
|
+
function Skeleton(_a) {
|
|
1263
|
+
var _b = _a, { shape = "text", className } = _b, props = __objRest(_b, ["shape", "className"]);
|
|
1264
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1265
|
+
"span",
|
|
1266
|
+
__spreadValues({
|
|
1267
|
+
className: cn("ph-skeleton", skeletonShapeClass[shape], className),
|
|
1268
|
+
"aria-hidden": "true"
|
|
1269
|
+
}, props)
|
|
1270
|
+
);
|
|
1271
|
+
}
|
|
1272
|
+
function LoadingState(_a) {
|
|
1273
|
+
var _b = _a, {
|
|
1274
|
+
label = "Loading",
|
|
1275
|
+
title = "Loading",
|
|
1276
|
+
description,
|
|
1277
|
+
variant = "spinner",
|
|
1278
|
+
size = "lg",
|
|
1279
|
+
className
|
|
1280
|
+
} = _b, props = __objRest(_b, [
|
|
1281
|
+
"label",
|
|
1282
|
+
"title",
|
|
1283
|
+
"description",
|
|
1284
|
+
"variant",
|
|
1285
|
+
"size",
|
|
1286
|
+
"className"
|
|
1287
|
+
]);
|
|
1288
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", __spreadProps(__spreadValues({ className: cn("ph-loading-state", className), role: "status", "aria-label": label }, props), { children: [
|
|
1289
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Loader, { variant, size, label, "aria-hidden": "true" }),
|
|
1290
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "ph-loading-state__copy", children: [
|
|
1291
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("strong", { children: title }),
|
|
1292
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { children: description }) : null
|
|
1293
|
+
] })
|
|
1294
|
+
] }));
|
|
1295
|
+
}
|
|
1296
|
+
|
|
1297
|
+
// src/components/ui/AuthLayout.tsx
|
|
1298
|
+
var import_react8 = require("react");
|
|
1299
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
1300
|
+
function AuthLayout(_a) {
|
|
1301
|
+
var _b = _a, { brand, footer, aside, children, className } = _b, props = __objRest(_b, ["brand", "footer", "aside", "children", "className"]);
|
|
1302
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", __spreadProps(__spreadValues({ className: cn("ph-auth-layout", aside != null && "ph-auth-layout--split", className) }, props), { children: [
|
|
1303
|
+
aside ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("aside", { className: "ph-auth-layout__aside", children: aside }) : null,
|
|
1304
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "ph-auth-layout__main", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "ph-auth-layout__column", children: [
|
|
1305
|
+
brand ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "ph-auth-layout__brand", children: brand }) : null,
|
|
1306
|
+
children,
|
|
1307
|
+
footer ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("footer", { className: "ph-auth-layout__footer", children: footer }) : null
|
|
1308
|
+
] }) })
|
|
1309
|
+
] }));
|
|
1310
|
+
}
|
|
1311
|
+
function AuthCard(_a) {
|
|
1312
|
+
var _b = _a, { title, description, footer, children, className } = _b, props = __objRest(_b, ["title", "description", "footer", "children", "className"]);
|
|
1313
|
+
const titleId = (0, import_react8.useId)();
|
|
1314
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("section", __spreadProps(__spreadValues({ className: cn("ph-auth-card", className), "aria-labelledby": titleId }, props), { children: [
|
|
1315
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("header", { className: "ph-auth-card__header", children: [
|
|
1316
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("h1", { id: titleId, children: title }),
|
|
1317
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { children: description }) : null
|
|
1318
|
+
] }),
|
|
1319
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "ph-auth-card__body", children }),
|
|
1320
|
+
footer ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("footer", { className: "ph-auth-card__footer", children: footer }) : null
|
|
1321
|
+
] }));
|
|
1322
|
+
}
|
|
1323
|
+
function AuthDivider(_a) {
|
|
1324
|
+
var _b = _a, { children = "or continue with", className } = _b, props = __objRest(_b, ["children", "className"]);
|
|
1325
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", __spreadProps(__spreadValues({ className: cn("ph-auth-divider", className) }, props), { children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { children }) }));
|
|
1326
|
+
}
|
|
1327
|
+
|
|
1328
|
+
// src/components/ui/SettingsLayout.tsx
|
|
1329
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
1330
|
+
function SettingsNav(_a) {
|
|
1331
|
+
var _b = _a, { groups, className } = _b, props = __objRest(_b, ["groups", "className"]);
|
|
1332
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", __spreadProps(__spreadValues({ className: cn("ph-settings-nav", className) }, props), { children: groups.map((group, index) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "ph-settings-nav__group", children: [
|
|
1333
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("h3", { children: group.label }),
|
|
1334
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "ph-settings-nav__items", children: group.items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
1335
|
+
"a",
|
|
1336
|
+
{
|
|
1337
|
+
href: item.href,
|
|
1338
|
+
className: cn("ph-settings-nav__item", item.active && "ph-settings-nav__item--active"),
|
|
1339
|
+
"aria-current": item.active ? "page" : void 0,
|
|
1340
|
+
children: [
|
|
1341
|
+
item.icon ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "ph-settings-nav__icon", children: item.icon }) : null,
|
|
1342
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { children: item.label }),
|
|
1343
|
+
item.badge ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "ph-settings-nav__badge", children: item.badge }) : null
|
|
1344
|
+
]
|
|
1345
|
+
},
|
|
1346
|
+
item.id
|
|
1347
|
+
)) })
|
|
1348
|
+
] }, index)) }));
|
|
1349
|
+
}
|
|
1350
|
+
function SettingsLayout(_a) {
|
|
1351
|
+
var _b = _a, {
|
|
1352
|
+
title,
|
|
1353
|
+
description,
|
|
1354
|
+
actions,
|
|
1355
|
+
navigation,
|
|
1356
|
+
navigationLabel = "Settings",
|
|
1357
|
+
children,
|
|
1358
|
+
className
|
|
1359
|
+
} = _b, props = __objRest(_b, [
|
|
1360
|
+
"title",
|
|
1361
|
+
"description",
|
|
1362
|
+
"actions",
|
|
1363
|
+
"navigation",
|
|
1364
|
+
"navigationLabel",
|
|
1365
|
+
"children",
|
|
1366
|
+
"className"
|
|
1367
|
+
]);
|
|
1368
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("section", __spreadProps(__spreadValues({ className: cn("ph-settings-layout", className) }, props), { children: [
|
|
1369
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("header", { className: "ph-settings-layout__header", children: [
|
|
1370
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { children: [
|
|
1371
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("h2", { children: title }),
|
|
1372
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { children: description }) : null
|
|
1373
|
+
] }),
|
|
1374
|
+
actions ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "ph-settings-layout__actions", children: actions }) : null
|
|
1375
|
+
] }),
|
|
1376
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("details", { className: "ph-settings-layout__mobile-nav", children: [
|
|
1377
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("summary", { children: [
|
|
1378
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(IconTuning, { className: "h-4 w-4", "aria-hidden": true }),
|
|
1379
|
+
"Settings menu"
|
|
1380
|
+
] }),
|
|
1381
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("nav", { "aria-label": navigationLabel, children: navigation })
|
|
1382
|
+
] }),
|
|
1383
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "ph-settings-layout__grid", children: [
|
|
1384
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("aside", { className: "ph-settings-layout__sidebar", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("nav", { "aria-label": navigationLabel, children: navigation }) }),
|
|
1385
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "ph-settings-layout__content", children })
|
|
1386
|
+
] })
|
|
1387
|
+
] }));
|
|
1388
|
+
}
|
|
1389
|
+
|
|
1390
|
+
// src/components/ui/DropdownMenu.tsx
|
|
1391
|
+
var DropdownPrimitive = __toESM(require("@radix-ui/react-dropdown-menu"));
|
|
1392
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
845
1393
|
var sizeClass2 = {
|
|
846
1394
|
xs: "ph-btn-xs",
|
|
847
1395
|
sm: "ph-btn-sm",
|
|
@@ -853,40 +1401,95 @@ var variantClass2 = {
|
|
|
853
1401
|
secondary: "ph-btn-secondary",
|
|
854
1402
|
accent: "ph-btn-accent"
|
|
855
1403
|
};
|
|
856
|
-
function
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
1404
|
+
function DropdownContent({
|
|
1405
|
+
children,
|
|
1406
|
+
align = "start",
|
|
1407
|
+
side = "bottom",
|
|
1408
|
+
sideOffset = 7,
|
|
1409
|
+
alignOffset = 0,
|
|
1410
|
+
collisionPadding = 8,
|
|
1411
|
+
avoidCollisions = true,
|
|
1412
|
+
panelClassName
|
|
1413
|
+
}) {
|
|
1414
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(DropdownPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
1415
|
+
DropdownPrimitive.Content,
|
|
1416
|
+
{
|
|
1417
|
+
className: cn("ph-dropdown-panel", panelClassName),
|
|
1418
|
+
align,
|
|
1419
|
+
side,
|
|
1420
|
+
sideOffset,
|
|
1421
|
+
alignOffset,
|
|
1422
|
+
collisionPadding,
|
|
1423
|
+
avoidCollisions,
|
|
1424
|
+
sticky: "partial",
|
|
1425
|
+
children: [
|
|
1426
|
+
children,
|
|
1427
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(DropdownPrimitive.Arrow, { className: "ph-dropdown-arrow", width: 12, height: 6 })
|
|
1428
|
+
]
|
|
1429
|
+
}
|
|
1430
|
+
) });
|
|
862
1431
|
}
|
|
863
1432
|
function DropdownMenu(_a) {
|
|
864
1433
|
var _b = _a, {
|
|
865
1434
|
trigger,
|
|
866
1435
|
children,
|
|
867
|
-
align
|
|
1436
|
+
align,
|
|
1437
|
+
side,
|
|
1438
|
+
sideOffset,
|
|
1439
|
+
alignOffset,
|
|
1440
|
+
collisionPadding,
|
|
1441
|
+
avoidCollisions,
|
|
868
1442
|
className,
|
|
869
1443
|
panelClassName,
|
|
870
|
-
"aria-label": ariaLabel
|
|
1444
|
+
"aria-label": ariaLabel,
|
|
1445
|
+
open,
|
|
1446
|
+
defaultOpen,
|
|
1447
|
+
onOpenChange,
|
|
1448
|
+
modal = false,
|
|
1449
|
+
disabled
|
|
871
1450
|
} = _b, props = __objRest(_b, [
|
|
872
1451
|
"trigger",
|
|
873
1452
|
"children",
|
|
874
1453
|
"align",
|
|
1454
|
+
"side",
|
|
1455
|
+
"sideOffset",
|
|
1456
|
+
"alignOffset",
|
|
1457
|
+
"collisionPadding",
|
|
1458
|
+
"avoidCollisions",
|
|
875
1459
|
"className",
|
|
876
1460
|
"panelClassName",
|
|
877
|
-
"aria-label"
|
|
1461
|
+
"aria-label",
|
|
1462
|
+
"open",
|
|
1463
|
+
"defaultOpen",
|
|
1464
|
+
"onOpenChange",
|
|
1465
|
+
"modal",
|
|
1466
|
+
"disabled"
|
|
878
1467
|
]);
|
|
879
|
-
return /* @__PURE__ */ (0,
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
1468
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", __spreadProps(__spreadValues({ className: cn("ph-dropdown", className) }, props), { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
1469
|
+
DropdownPrimitive.Root,
|
|
1470
|
+
{
|
|
1471
|
+
open,
|
|
1472
|
+
defaultOpen,
|
|
1473
|
+
onOpenChange,
|
|
1474
|
+
modal,
|
|
1475
|
+
children: [
|
|
1476
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(DropdownPrimitive.Trigger, { asChild: true, disabled, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("button", { type: "button", className: "ph-dropdown-trigger", "aria-label": ariaLabel, children: trigger }) }),
|
|
1477
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1478
|
+
DropdownContent,
|
|
1479
|
+
{
|
|
1480
|
+
align,
|
|
1481
|
+
side,
|
|
1482
|
+
sideOffset,
|
|
1483
|
+
alignOffset,
|
|
1484
|
+
collisionPadding,
|
|
1485
|
+
avoidCollisions,
|
|
1486
|
+
panelClassName,
|
|
1487
|
+
children
|
|
1488
|
+
}
|
|
1489
|
+
)
|
|
1490
|
+
]
|
|
1491
|
+
}
|
|
1492
|
+
) }));
|
|
890
1493
|
}
|
|
891
1494
|
function DropdownButton(_a) {
|
|
892
1495
|
var _b = _a, {
|
|
@@ -898,10 +1501,20 @@ function DropdownButton(_a) {
|
|
|
898
1501
|
icon,
|
|
899
1502
|
sideIcon,
|
|
900
1503
|
children,
|
|
901
|
-
align
|
|
1504
|
+
align,
|
|
1505
|
+
side,
|
|
1506
|
+
sideOffset,
|
|
1507
|
+
alignOffset,
|
|
1508
|
+
collisionPadding,
|
|
1509
|
+
avoidCollisions,
|
|
902
1510
|
className,
|
|
903
1511
|
panelClassName,
|
|
904
|
-
"aria-label": ariaLabel
|
|
1512
|
+
"aria-label": ariaLabel,
|
|
1513
|
+
open,
|
|
1514
|
+
defaultOpen,
|
|
1515
|
+
onOpenChange,
|
|
1516
|
+
modal = false,
|
|
1517
|
+
disabled
|
|
905
1518
|
} = _b, props = __objRest(_b, [
|
|
906
1519
|
"label",
|
|
907
1520
|
"variant",
|
|
@@ -912,55 +1525,154 @@ function DropdownButton(_a) {
|
|
|
912
1525
|
"sideIcon",
|
|
913
1526
|
"children",
|
|
914
1527
|
"align",
|
|
1528
|
+
"side",
|
|
1529
|
+
"sideOffset",
|
|
1530
|
+
"alignOffset",
|
|
1531
|
+
"collisionPadding",
|
|
1532
|
+
"avoidCollisions",
|
|
915
1533
|
"className",
|
|
916
1534
|
"panelClassName",
|
|
917
|
-
"aria-label"
|
|
1535
|
+
"aria-label",
|
|
1536
|
+
"open",
|
|
1537
|
+
"defaultOpen",
|
|
1538
|
+
"onOpenChange",
|
|
1539
|
+
"modal",
|
|
1540
|
+
"disabled"
|
|
918
1541
|
]);
|
|
919
|
-
const
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
1542
|
+
const trailing = sideIcon != null ? sideIcon : /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(IconChevronDown, { className: "h-4 w-4", "aria-hidden": true });
|
|
1543
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", __spreadProps(__spreadValues({ className: cn("ph-dropdown", className) }, props), { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
1544
|
+
DropdownPrimitive.Root,
|
|
1545
|
+
{
|
|
1546
|
+
open,
|
|
1547
|
+
defaultOpen,
|
|
1548
|
+
onOpenChange,
|
|
1549
|
+
modal,
|
|
1550
|
+
children: [
|
|
1551
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(DropdownPrimitive.Trigger, { asChild: true, disabled, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1552
|
+
"button",
|
|
1553
|
+
{
|
|
1554
|
+
type: "button",
|
|
1555
|
+
disabled,
|
|
1556
|
+
className: cn(
|
|
1557
|
+
"ph-btn ph-btn-raised ph-dropdown-button",
|
|
1558
|
+
variantClass2[variant],
|
|
1559
|
+
outline && "ph-btn-outline",
|
|
1560
|
+
sizeClass2[size],
|
|
1561
|
+
split && "ph-btn-split"
|
|
1562
|
+
),
|
|
1563
|
+
"aria-label": ariaLabel,
|
|
1564
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ButtonChrome, { label, icon, sideIcon: trailing, split })
|
|
1565
|
+
}
|
|
1566
|
+
) }),
|
|
1567
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1568
|
+
DropdownContent,
|
|
1569
|
+
{
|
|
1570
|
+
align,
|
|
1571
|
+
side,
|
|
1572
|
+
sideOffset,
|
|
1573
|
+
alignOffset,
|
|
1574
|
+
collisionPadding,
|
|
1575
|
+
avoidCollisions,
|
|
1576
|
+
panelClassName,
|
|
1577
|
+
children
|
|
1578
|
+
}
|
|
1579
|
+
)
|
|
1580
|
+
]
|
|
1581
|
+
}
|
|
1582
|
+
) }));
|
|
943
1583
|
}
|
|
944
1584
|
function DropdownItem(_a) {
|
|
1585
|
+
var _b = _a, { className, children, disabled } = _b, props = __objRest(_b, ["className", "children", "disabled"]);
|
|
1586
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(DropdownPrimitive.Item, { asChild: true, disabled, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1587
|
+
"button",
|
|
1588
|
+
__spreadProps(__spreadValues({
|
|
1589
|
+
type: "button",
|
|
1590
|
+
disabled,
|
|
1591
|
+
className: cn("ph-dropdown-item w-full text-left", className)
|
|
1592
|
+
}, props), {
|
|
1593
|
+
children
|
|
1594
|
+
})
|
|
1595
|
+
) });
|
|
1596
|
+
}
|
|
1597
|
+
function DropdownRadioGroup(props) {
|
|
1598
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(DropdownPrimitive.RadioGroup, __spreadValues({}, props));
|
|
1599
|
+
}
|
|
1600
|
+
function DropdownRadioItem(_a) {
|
|
1601
|
+
var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
|
|
1602
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(DropdownPrimitive.RadioItem, __spreadProps(__spreadValues({ className: cn("ph-dropdown-item ph-dropdown-radio-item", className) }, props), { children: [
|
|
1603
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { className: "ph-dropdown-item-indicator", "aria-hidden": true, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(DropdownPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(IconCheck, { className: "h-3.5 w-3.5" }) }) }),
|
|
1604
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { children })
|
|
1605
|
+
] }));
|
|
1606
|
+
}
|
|
1607
|
+
|
|
1608
|
+
// src/components/ui/Input.tsx
|
|
1609
|
+
var import_react10 = require("react");
|
|
1610
|
+
|
|
1611
|
+
// src/components/ui/FormField.tsx
|
|
1612
|
+
var import_react9 = require("react");
|
|
1613
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
1614
|
+
function FormField(_a) {
|
|
945
1615
|
var _b = _a, {
|
|
946
|
-
|
|
947
|
-
|
|
1616
|
+
controlId,
|
|
1617
|
+
label,
|
|
1618
|
+
hideLabel = false,
|
|
1619
|
+
helperText,
|
|
1620
|
+
error,
|
|
1621
|
+
required = false,
|
|
1622
|
+
disabled = false,
|
|
1623
|
+
children,
|
|
1624
|
+
className
|
|
948
1625
|
} = _b, props = __objRest(_b, [
|
|
949
|
-
"
|
|
950
|
-
"
|
|
1626
|
+
"controlId",
|
|
1627
|
+
"label",
|
|
1628
|
+
"hideLabel",
|
|
1629
|
+
"helperText",
|
|
1630
|
+
"error",
|
|
1631
|
+
"required",
|
|
1632
|
+
"disabled",
|
|
1633
|
+
"children",
|
|
1634
|
+
"className"
|
|
951
1635
|
]);
|
|
952
|
-
|
|
1636
|
+
const generatedId = (0, import_react9.useId)();
|
|
1637
|
+
const id = controlId != null ? controlId : generatedId;
|
|
1638
|
+
const descriptionId = helperText && !error ? `${id}-description` : void 0;
|
|
1639
|
+
const errorId = error ? `${id}-error` : void 0;
|
|
1640
|
+
const controlProps = {
|
|
1641
|
+
id,
|
|
1642
|
+
"aria-describedby": descriptionId,
|
|
1643
|
+
"aria-errormessage": errorId,
|
|
1644
|
+
"aria-invalid": error ? true : void 0
|
|
1645
|
+
};
|
|
1646
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", __spreadProps(__spreadValues({ className: cn("ph-field", className) }, props), { children: [
|
|
1647
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
1648
|
+
"label",
|
|
1649
|
+
{
|
|
1650
|
+
htmlFor: id,
|
|
1651
|
+
className: cn("ph-label", hideLabel && "sr-only", disabled && "opacity-50"),
|
|
1652
|
+
children: [
|
|
1653
|
+
label,
|
|
1654
|
+
required ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { "aria-hidden": "true", children: " *" }) : null
|
|
1655
|
+
]
|
|
1656
|
+
}
|
|
1657
|
+
) : null,
|
|
1658
|
+
typeof children === "function" ? children(controlProps) : children,
|
|
1659
|
+
descriptionId ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { id: descriptionId, className: "mt-1 text-xs text-ph-subtle", children: helperText }) : null,
|
|
1660
|
+
errorId ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { id: errorId, className: "mt-1 text-xs font-medium text-ph-danger", children: error }) : null
|
|
1661
|
+
] }));
|
|
953
1662
|
}
|
|
954
1663
|
|
|
955
1664
|
// src/components/ui/Input.tsx
|
|
956
|
-
var
|
|
957
|
-
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
1665
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
958
1666
|
var sizeMap3 = {
|
|
959
1667
|
sm: "ph-input-sm",
|
|
960
1668
|
md: "",
|
|
961
1669
|
lg: "ph-input-lg"
|
|
962
1670
|
};
|
|
963
|
-
function
|
|
1671
|
+
function joinIds(...ids) {
|
|
1672
|
+
const value = ids.filter(Boolean).join(" ");
|
|
1673
|
+
return value || void 0;
|
|
1674
|
+
}
|
|
1675
|
+
var Input = (0, import_react10.forwardRef)(function Input2(_a, ref) {
|
|
964
1676
|
var _b = _a, {
|
|
965
1677
|
id: idProp,
|
|
966
1678
|
label,
|
|
@@ -971,7 +1683,9 @@ function Input(_a) {
|
|
|
971
1683
|
variant = "default",
|
|
972
1684
|
className,
|
|
973
1685
|
wrapperClassName,
|
|
974
|
-
disabled
|
|
1686
|
+
disabled,
|
|
1687
|
+
required,
|
|
1688
|
+
"aria-describedby": ariaDescribedBy
|
|
975
1689
|
} = _b, props = __objRest(_b, [
|
|
976
1690
|
"id",
|
|
977
1691
|
"label",
|
|
@@ -982,45 +1696,46 @@ function Input(_a) {
|
|
|
982
1696
|
"variant",
|
|
983
1697
|
"className",
|
|
984
1698
|
"wrapperClassName",
|
|
985
|
-
"disabled"
|
|
1699
|
+
"disabled",
|
|
1700
|
+
"required",
|
|
1701
|
+
"aria-describedby"
|
|
986
1702
|
]);
|
|
987
|
-
const autoId = (0,
|
|
1703
|
+
const autoId = (0, import_react10.useId)();
|
|
988
1704
|
const id = idProp != null ? idProp : autoId;
|
|
989
1705
|
const hasError = Boolean(error);
|
|
990
|
-
return /* @__PURE__ */ (0,
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
)
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
function Select(_a) {
|
|
1706
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1707
|
+
FormField,
|
|
1708
|
+
{
|
|
1709
|
+
controlId: id,
|
|
1710
|
+
label,
|
|
1711
|
+
hideLabel,
|
|
1712
|
+
helperText,
|
|
1713
|
+
error,
|
|
1714
|
+
required,
|
|
1715
|
+
disabled,
|
|
1716
|
+
className: wrapperClassName,
|
|
1717
|
+
children: (fieldProps) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1718
|
+
"input",
|
|
1719
|
+
__spreadValues(__spreadProps(__spreadValues({}, fieldProps), {
|
|
1720
|
+
ref,
|
|
1721
|
+
disabled,
|
|
1722
|
+
required,
|
|
1723
|
+
"aria-describedby": joinIds(ariaDescribedBy, fieldProps["aria-describedby"]),
|
|
1724
|
+
className: cn(
|
|
1725
|
+
"ph-input w-full",
|
|
1726
|
+
sizeMap3[size],
|
|
1727
|
+
variant === "ghost" && "ph-input-ghost",
|
|
1728
|
+
hasError && "ph-input-error",
|
|
1729
|
+
disabled && "cursor-not-allowed opacity-60",
|
|
1730
|
+
className
|
|
1731
|
+
)
|
|
1732
|
+
}), props)
|
|
1733
|
+
)
|
|
1734
|
+
}
|
|
1735
|
+
);
|
|
1736
|
+
});
|
|
1737
|
+
Input.displayName = "Input";
|
|
1738
|
+
var Select = (0, import_react10.forwardRef)(function Select2(_a, ref) {
|
|
1024
1739
|
var _b = _a, {
|
|
1025
1740
|
id: idProp,
|
|
1026
1741
|
label,
|
|
@@ -1031,7 +1746,9 @@ function Select(_a) {
|
|
|
1031
1746
|
className,
|
|
1032
1747
|
wrapperClassName,
|
|
1033
1748
|
disabled,
|
|
1034
|
-
children
|
|
1749
|
+
children,
|
|
1750
|
+
required,
|
|
1751
|
+
"aria-describedby": ariaDescribedBy
|
|
1035
1752
|
} = _b, props = __objRest(_b, [
|
|
1036
1753
|
"id",
|
|
1037
1754
|
"label",
|
|
@@ -1042,42 +1759,34 @@ function Select(_a) {
|
|
|
1042
1759
|
"className",
|
|
1043
1760
|
"wrapperClassName",
|
|
1044
1761
|
"disabled",
|
|
1045
|
-
"children"
|
|
1762
|
+
"children",
|
|
1763
|
+
"required",
|
|
1764
|
+
"aria-describedby"
|
|
1046
1765
|
]);
|
|
1047
|
-
const autoId = (0,
|
|
1766
|
+
const autoId = (0, import_react10.useId)();
|
|
1048
1767
|
const id = idProp != null ? idProp : autoId;
|
|
1049
1768
|
const hasError = Boolean(error);
|
|
1050
|
-
return /* @__PURE__ */ (0,
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
)
|
|
1072
|
-
}, props), {
|
|
1073
|
-
children
|
|
1074
|
-
})
|
|
1075
|
-
),
|
|
1076
|
-
helperText && !hasError && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "mt-1 text-xs text-ph-subtle", children: helperText }),
|
|
1077
|
-
error && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "mt-1 text-xs font-medium text-ph-danger", children: error })
|
|
1078
|
-
] });
|
|
1079
|
-
}
|
|
1080
|
-
function Textarea(_a) {
|
|
1769
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(FormField, { controlId: id, label, hideLabel, helperText, error, required, disabled, className: wrapperClassName, children: (fieldProps) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1770
|
+
"select",
|
|
1771
|
+
__spreadProps(__spreadValues(__spreadProps(__spreadValues({}, fieldProps), {
|
|
1772
|
+
ref,
|
|
1773
|
+
disabled,
|
|
1774
|
+
required,
|
|
1775
|
+
"aria-describedby": joinIds(ariaDescribedBy, fieldProps["aria-describedby"]),
|
|
1776
|
+
className: cn(
|
|
1777
|
+
"ph-select w-full",
|
|
1778
|
+
sizeMap3[size],
|
|
1779
|
+
hasError && "ph-input-error",
|
|
1780
|
+
disabled && "cursor-not-allowed opacity-60",
|
|
1781
|
+
className
|
|
1782
|
+
)
|
|
1783
|
+
}), props), {
|
|
1784
|
+
children
|
|
1785
|
+
})
|
|
1786
|
+
) });
|
|
1787
|
+
});
|
|
1788
|
+
Select.displayName = "Select";
|
|
1789
|
+
var Textarea = (0, import_react10.forwardRef)(function Textarea2(_a, ref) {
|
|
1081
1790
|
var _b = _a, {
|
|
1082
1791
|
id: idProp,
|
|
1083
1792
|
label,
|
|
@@ -1087,7 +1796,9 @@ function Textarea(_a) {
|
|
|
1087
1796
|
size = "md",
|
|
1088
1797
|
className,
|
|
1089
1798
|
wrapperClassName,
|
|
1090
|
-
disabled
|
|
1799
|
+
disabled,
|
|
1800
|
+
required,
|
|
1801
|
+
"aria-describedby": ariaDescribedBy
|
|
1091
1802
|
} = _b, props = __objRest(_b, [
|
|
1092
1803
|
"id",
|
|
1093
1804
|
"label",
|
|
@@ -1097,40 +1808,32 @@ function Textarea(_a) {
|
|
|
1097
1808
|
"size",
|
|
1098
1809
|
"className",
|
|
1099
1810
|
"wrapperClassName",
|
|
1100
|
-
"disabled"
|
|
1811
|
+
"disabled",
|
|
1812
|
+
"required",
|
|
1813
|
+
"aria-describedby"
|
|
1101
1814
|
]);
|
|
1102
|
-
const autoId = (0,
|
|
1815
|
+
const autoId = (0, import_react10.useId)();
|
|
1103
1816
|
const id = idProp != null ? idProp : autoId;
|
|
1104
1817
|
const hasError = Boolean(error);
|
|
1105
|
-
return /* @__PURE__ */ (0,
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
disabled && "cursor-not-allowed opacity-60",
|
|
1125
|
-
className
|
|
1126
|
-
)
|
|
1127
|
-
}, props)
|
|
1128
|
-
),
|
|
1129
|
-
helperText && !hasError && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "mt-1 text-xs text-ph-subtle", children: helperText }),
|
|
1130
|
-
error && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { className: "mt-1 text-xs font-medium text-ph-danger", children: error })
|
|
1131
|
-
] });
|
|
1132
|
-
}
|
|
1133
|
-
function Checkbox(_a) {
|
|
1818
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(FormField, { controlId: id, label, hideLabel, helperText, error, required, disabled, className: wrapperClassName, children: (fieldProps) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1819
|
+
"textarea",
|
|
1820
|
+
__spreadValues(__spreadProps(__spreadValues({}, fieldProps), {
|
|
1821
|
+
ref,
|
|
1822
|
+
disabled,
|
|
1823
|
+
required,
|
|
1824
|
+
"aria-describedby": joinIds(ariaDescribedBy, fieldProps["aria-describedby"]),
|
|
1825
|
+
className: cn(
|
|
1826
|
+
"ph-textarea w-full",
|
|
1827
|
+
sizeMap3[size],
|
|
1828
|
+
hasError && "ph-input-error",
|
|
1829
|
+
disabled && "cursor-not-allowed opacity-60",
|
|
1830
|
+
className
|
|
1831
|
+
)
|
|
1832
|
+
}), props)
|
|
1833
|
+
) });
|
|
1834
|
+
});
|
|
1835
|
+
Textarea.displayName = "Textarea";
|
|
1836
|
+
var Checkbox = (0, import_react10.forwardRef)(function Checkbox2(_a, ref) {
|
|
1134
1837
|
var _b = _a, {
|
|
1135
1838
|
id: idProp,
|
|
1136
1839
|
label,
|
|
@@ -1138,7 +1841,8 @@ function Checkbox(_a) {
|
|
|
1138
1841
|
helperText,
|
|
1139
1842
|
className,
|
|
1140
1843
|
wrapperClassName,
|
|
1141
|
-
disabled
|
|
1844
|
+
disabled,
|
|
1845
|
+
"aria-describedby": ariaDescribedBy
|
|
1142
1846
|
} = _b, props = __objRest(_b, [
|
|
1143
1847
|
"id",
|
|
1144
1848
|
"label",
|
|
@@ -1146,33 +1850,45 @@ function Checkbox(_a) {
|
|
|
1146
1850
|
"helperText",
|
|
1147
1851
|
"className",
|
|
1148
1852
|
"wrapperClassName",
|
|
1149
|
-
"disabled"
|
|
1853
|
+
"disabled",
|
|
1854
|
+
"aria-describedby"
|
|
1150
1855
|
]);
|
|
1151
|
-
const autoId = (0,
|
|
1856
|
+
const autoId = (0, import_react10.useId)();
|
|
1152
1857
|
const id = idProp != null ? idProp : autoId;
|
|
1153
1858
|
const hasError = Boolean(error);
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
"
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1859
|
+
const descriptionId = helperText && !hasError ? `${id}-description` : void 0;
|
|
1860
|
+
const errorId = error ? `${id}-error` : void 0;
|
|
1861
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: cn("ph-control-row", wrapperClassName), children: [
|
|
1862
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("span", { className: "ph-checkbox-wrap", children: [
|
|
1863
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1864
|
+
"input",
|
|
1865
|
+
__spreadValues({
|
|
1866
|
+
ref,
|
|
1867
|
+
id,
|
|
1868
|
+
type: "checkbox",
|
|
1869
|
+
disabled,
|
|
1870
|
+
"aria-invalid": hasError || void 0,
|
|
1871
|
+
"aria-describedby": joinIds(ariaDescribedBy, descriptionId),
|
|
1872
|
+
"aria-errormessage": errorId,
|
|
1873
|
+
className: cn(
|
|
1874
|
+
"ph-checkbox",
|
|
1875
|
+
hasError && "border-ph-danger",
|
|
1876
|
+
disabled && "cursor-not-allowed opacity-60",
|
|
1877
|
+
className
|
|
1878
|
+
)
|
|
1879
|
+
}, props)
|
|
1880
|
+
),
|
|
1881
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(IconCheck, { className: "ph-checkbox-icon", "aria-hidden": true })
|
|
1882
|
+
] }),
|
|
1883
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "ph-control-copy", children: [
|
|
1884
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("label", { htmlFor: id, className: cn("cursor-pointer", disabled && "opacity-60"), children: label }),
|
|
1885
|
+
descriptionId ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { id: descriptionId, className: "text-xs text-ph-subtle", children: helperText }) : null,
|
|
1886
|
+
errorId ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { id: errorId, className: "text-xs font-medium text-ph-danger", children: error }) : null
|
|
1887
|
+
] })
|
|
1173
1888
|
] });
|
|
1174
|
-
}
|
|
1175
|
-
|
|
1889
|
+
});
|
|
1890
|
+
Checkbox.displayName = "Checkbox";
|
|
1891
|
+
var Radio = (0, import_react10.forwardRef)(function Radio2(_a, ref) {
|
|
1176
1892
|
var _b = _a, {
|
|
1177
1893
|
id: idProp,
|
|
1178
1894
|
label,
|
|
@@ -1186,22 +1902,24 @@ function Radio(_a) {
|
|
|
1186
1902
|
"wrapperClassName",
|
|
1187
1903
|
"disabled"
|
|
1188
1904
|
]);
|
|
1189
|
-
const autoId = (0,
|
|
1905
|
+
const autoId = (0, import_react10.useId)();
|
|
1190
1906
|
const id = idProp != null ? idProp : autoId;
|
|
1191
|
-
return /* @__PURE__ */ (0,
|
|
1192
|
-
/* @__PURE__ */ (0,
|
|
1907
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: cn("ph-control-row", wrapperClassName, disabled && "opacity-60"), children: [
|
|
1908
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1193
1909
|
"input",
|
|
1194
1910
|
__spreadValues({
|
|
1911
|
+
ref,
|
|
1195
1912
|
id,
|
|
1196
1913
|
type: "radio",
|
|
1197
1914
|
disabled,
|
|
1198
1915
|
className: cn("ph-radio", disabled && "cursor-not-allowed", className)
|
|
1199
1916
|
}, props)
|
|
1200
1917
|
),
|
|
1201
|
-
/* @__PURE__ */ (0,
|
|
1918
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("label", { htmlFor: id, className: cn("cursor-pointer", disabled && "opacity-60"), children: label })
|
|
1202
1919
|
] });
|
|
1203
|
-
}
|
|
1204
|
-
|
|
1920
|
+
});
|
|
1921
|
+
Radio.displayName = "Radio";
|
|
1922
|
+
var Toggle = (0, import_react10.forwardRef)(function Toggle2(_a, ref) {
|
|
1205
1923
|
var _b = _a, {
|
|
1206
1924
|
id: idProp,
|
|
1207
1925
|
label,
|
|
@@ -1215,13 +1933,14 @@ function Toggle(_a) {
|
|
|
1215
1933
|
"wrapperClassName",
|
|
1216
1934
|
"disabled"
|
|
1217
1935
|
]);
|
|
1218
|
-
const autoId = (0,
|
|
1936
|
+
const autoId = (0, import_react10.useId)();
|
|
1219
1937
|
const id = idProp != null ? idProp : autoId;
|
|
1220
|
-
return /* @__PURE__ */ (0,
|
|
1221
|
-
/* @__PURE__ */ (0,
|
|
1222
|
-
/* @__PURE__ */ (0,
|
|
1938
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("label", { className: cn("ph-control-row-between", wrapperClassName, disabled && "opacity-60"), children: [
|
|
1939
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: disabled ? "opacity-60" : void 0, children: label }),
|
|
1940
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1223
1941
|
"input",
|
|
1224
1942
|
__spreadValues({
|
|
1943
|
+
ref,
|
|
1225
1944
|
id,
|
|
1226
1945
|
type: "checkbox",
|
|
1227
1946
|
role: "switch",
|
|
@@ -1230,9 +1949,11 @@ function Toggle(_a) {
|
|
|
1230
1949
|
}, props)
|
|
1231
1950
|
)
|
|
1232
1951
|
] });
|
|
1233
|
-
}
|
|
1234
|
-
|
|
1952
|
+
});
|
|
1953
|
+
Toggle.displayName = "Toggle";
|
|
1954
|
+
var Range = (0, import_react10.forwardRef)(function Range2(_a, ref) {
|
|
1235
1955
|
var _b = _a, {
|
|
1956
|
+
id: idProp,
|
|
1236
1957
|
label,
|
|
1237
1958
|
minLabel,
|
|
1238
1959
|
maxLabel,
|
|
@@ -1240,6 +1961,7 @@ function Range(_a) {
|
|
|
1240
1961
|
wrapperClassName,
|
|
1241
1962
|
className
|
|
1242
1963
|
} = _b, props = __objRest(_b, [
|
|
1964
|
+
"id",
|
|
1243
1965
|
"label",
|
|
1244
1966
|
"minLabel",
|
|
1245
1967
|
"maxLabel",
|
|
@@ -1247,35 +1969,55 @@ function Range(_a) {
|
|
|
1247
1969
|
"wrapperClassName",
|
|
1248
1970
|
"className"
|
|
1249
1971
|
]);
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
/* @__PURE__ */ (0,
|
|
1972
|
+
const autoId = (0, import_react10.useId)();
|
|
1973
|
+
const id = idProp != null ? idProp : autoId;
|
|
1974
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: cn("ph-field", wrapperClassName), children: [
|
|
1975
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("label", { htmlFor: id, className: "ph-label", children: label }),
|
|
1976
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("input", __spreadValues({ ref, id, type: "range", className: cn("ph-range", className) }, props)),
|
|
1977
|
+
(minLabel || valueLabel || maxLabel) && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex justify-between text-xs text-ph-mutedtext", children: [
|
|
1978
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { children: minLabel }),
|
|
1979
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { children: valueLabel }),
|
|
1980
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { children: maxLabel })
|
|
1257
1981
|
] })
|
|
1258
1982
|
] });
|
|
1259
|
-
}
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1983
|
+
});
|
|
1984
|
+
Range.displayName = "Range";
|
|
1985
|
+
var FileUpload = (0, import_react10.forwardRef)(function FileUpload2(_a, ref) {
|
|
1986
|
+
var _b = _a, {
|
|
1987
|
+
id: idProp,
|
|
1988
|
+
label,
|
|
1989
|
+
prompt = "Drop file or browse",
|
|
1990
|
+
wrapperClassName,
|
|
1991
|
+
className
|
|
1992
|
+
} = _b, props = __objRest(_b, [
|
|
1993
|
+
"id",
|
|
1994
|
+
"label",
|
|
1995
|
+
"prompt",
|
|
1996
|
+
"wrapperClassName",
|
|
1997
|
+
"className"
|
|
1998
|
+
]);
|
|
1999
|
+
const autoId = (0, import_react10.useId)();
|
|
2000
|
+
const id = idProp != null ? idProp : autoId;
|
|
2001
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: cn("ph-field", wrapperClassName), children: [
|
|
2002
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("label", { htmlFor: id, className: "ph-label", children: label }),
|
|
2003
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("label", { htmlFor: id, className: "ph-file-upload", children: [
|
|
2004
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("input", __spreadValues({ ref, id, type: "file", className: cn("sr-only", className) }, props)),
|
|
1266
2005
|
prompt
|
|
1267
2006
|
] })
|
|
1268
2007
|
] });
|
|
1269
|
-
}
|
|
2008
|
+
});
|
|
2009
|
+
FileUpload.displayName = "FileUpload";
|
|
1270
2010
|
|
|
1271
2011
|
// src/components/ui/Modal.tsx
|
|
1272
|
-
var
|
|
2012
|
+
var Dialog = __toESM(require("@radix-ui/react-dialog"));
|
|
2013
|
+
var import_react11 = require("react");
|
|
2014
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
1273
2015
|
var sizeMap4 = {
|
|
1274
2016
|
sm: "max-w-sm",
|
|
1275
2017
|
md: "max-w-lg",
|
|
1276
2018
|
lg: "max-w-2xl",
|
|
1277
2019
|
xl: "max-w-4xl",
|
|
1278
|
-
full: "max-w-
|
|
2020
|
+
full: "max-w-none"
|
|
1279
2021
|
};
|
|
1280
2022
|
function Modal({
|
|
1281
2023
|
open = false,
|
|
@@ -1286,50 +2028,67 @@ function Modal({
|
|
|
1286
2028
|
footer,
|
|
1287
2029
|
size = "md",
|
|
1288
2030
|
className,
|
|
1289
|
-
showCloseButton = true
|
|
2031
|
+
showCloseButton = true,
|
|
2032
|
+
closeOnOutsideClick = true,
|
|
2033
|
+
closeOnEscape = true,
|
|
2034
|
+
"aria-label": ariaLabel
|
|
1290
2035
|
}) {
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
2036
|
+
const canDismiss = Boolean(onClose);
|
|
2037
|
+
const restoreFocusRef = (0, import_react11.useRef)(null);
|
|
2038
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
2039
|
+
Dialog.Root,
|
|
1294
2040
|
{
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
className
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
}
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
2041
|
+
open,
|
|
2042
|
+
onOpenChange: (nextOpen) => {
|
|
2043
|
+
if (!nextOpen) onClose == null ? void 0 : onClose();
|
|
2044
|
+
},
|
|
2045
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(Dialog.Portal, { children: [
|
|
2046
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Dialog.Overlay, { className: "ph-modal-overlay" }),
|
|
2047
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
2048
|
+
Dialog.Content,
|
|
2049
|
+
__spreadProps(__spreadValues({
|
|
2050
|
+
className: cn("ph-modal-panel", sizeMap4[size], className),
|
|
2051
|
+
"aria-label": ariaLabel
|
|
2052
|
+
}, description ? {} : { "aria-describedby": void 0 }), {
|
|
2053
|
+
onOpenAutoFocus: () => {
|
|
2054
|
+
restoreFocusRef.current = document.activeElement instanceof HTMLElement ? document.activeElement : null;
|
|
2055
|
+
},
|
|
2056
|
+
onCloseAutoFocus: (event) => {
|
|
2057
|
+
var _a;
|
|
2058
|
+
event.preventDefault();
|
|
2059
|
+
(_a = restoreFocusRef.current) == null ? void 0 : _a.focus();
|
|
2060
|
+
},
|
|
2061
|
+
onEscapeKeyDown: (event) => {
|
|
2062
|
+
if (!canDismiss || !closeOnEscape) event.preventDefault();
|
|
2063
|
+
},
|
|
2064
|
+
onPointerDownOutside: (event) => {
|
|
2065
|
+
if (!canDismiss || !closeOnOutsideClick) event.preventDefault();
|
|
2066
|
+
},
|
|
2067
|
+
children: [
|
|
2068
|
+
title ? null : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Dialog.Title, { className: "sr-only", children: ariaLabel != null ? ariaLabel : "Dialog" }),
|
|
2069
|
+
title || description || showCloseButton && canDismiss ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("header", { className: "ph-modal-header", children: [
|
|
2070
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "min-w-0", children: [
|
|
2071
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Dialog.Title, { className: "text-lg font-bold text-ph-ink", children: title }) : null,
|
|
2072
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Dialog.Description, { className: "mt-1 text-sm text-ph-subtle", children: description }) : null
|
|
2073
|
+
] }),
|
|
2074
|
+
showCloseButton && canDismiss ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Dialog.Close, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("button", { type: "button", className: "ph-modal-close", "aria-label": "Close dialog", children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(IconClose, { className: "h-5 w-5", "aria-hidden": true }) }) }) : null
|
|
2075
|
+
] }) : null,
|
|
2076
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "ph-modal-body", children }),
|
|
2077
|
+
footer ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "ph-modal-footer", children: footer }) : null
|
|
2078
|
+
]
|
|
2079
|
+
})
|
|
2080
|
+
)
|
|
2081
|
+
] })
|
|
1323
2082
|
}
|
|
1324
|
-
)
|
|
2083
|
+
);
|
|
1325
2084
|
}
|
|
1326
2085
|
|
|
1327
2086
|
// src/components/ui/Navigation.tsx
|
|
1328
|
-
var
|
|
2087
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
1329
2088
|
function Breadcrumbs({ items, label = "Breadcrumb", className }) {
|
|
1330
|
-
return /* @__PURE__ */ (0,
|
|
1331
|
-
index > 0 ? /* @__PURE__ */ (0,
|
|
1332
|
-
item.current || !item.href ? /* @__PURE__ */ (0,
|
|
2089
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("nav", { "aria-label": label, className: cn("ph-breadcrumbs", className), children: items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("span", { className: "contents", children: [
|
|
2090
|
+
index > 0 ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "ph-breadcrumb-sep", "aria-hidden": "true", children: "/" }) : null,
|
|
2091
|
+
item.current || !item.href ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "ph-breadcrumb-current", "aria-current": item.current ? "page" : void 0, children: item.label }) : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("a", { href: item.href, className: "ph-breadcrumb-link", children: item.label })
|
|
1333
2092
|
] }, `${item.label}-${index}`)) });
|
|
1334
2093
|
}
|
|
1335
2094
|
function Pagination({
|
|
@@ -1342,8 +2101,8 @@ function Pagination({
|
|
|
1342
2101
|
}) {
|
|
1343
2102
|
const pages = compact ? [Math.max(1, page - 1), page, Math.min(totalPages, page + 1)] : [1, 2, 3, totalPages];
|
|
1344
2103
|
const uniquePages = Array.from(new Set(pages)).filter((n) => n >= 1 && n <= totalPages);
|
|
1345
|
-
return /* @__PURE__ */ (0,
|
|
1346
|
-
/* @__PURE__ */ (0,
|
|
2104
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("nav", { "aria-label": label, className: cn("ph-pagination", className), children: [
|
|
2105
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1347
2106
|
"button",
|
|
1348
2107
|
{
|
|
1349
2108
|
type: "button",
|
|
@@ -1351,12 +2110,12 @@ function Pagination({
|
|
|
1351
2110
|
disabled: page <= 1,
|
|
1352
2111
|
"aria-label": "Previous page",
|
|
1353
2112
|
onClick: () => onPageChange == null ? void 0 : onPageChange(page - 1),
|
|
1354
|
-
children: /* @__PURE__ */ (0,
|
|
2113
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(IconChevronLeft, { className: "mx-auto h-4 w-4", "aria-hidden": true })
|
|
1355
2114
|
}
|
|
1356
2115
|
),
|
|
1357
|
-
uniquePages.map((pageNumber, index) => /* @__PURE__ */ (0,
|
|
1358
|
-
!compact && index === uniquePages.length - 1 && pageNumber > 4 ? /* @__PURE__ */ (0,
|
|
1359
|
-
/* @__PURE__ */ (0,
|
|
2116
|
+
uniquePages.map((pageNumber, index) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("span", { className: "contents", children: [
|
|
2117
|
+
!compact && index === uniquePages.length - 1 && pageNumber > 4 ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "ph-pagination-ellipsis", "aria-hidden": "true", children: "..." }) : null,
|
|
2118
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1360
2119
|
"button",
|
|
1361
2120
|
{
|
|
1362
2121
|
type: "button",
|
|
@@ -1367,7 +2126,7 @@ function Pagination({
|
|
|
1367
2126
|
}
|
|
1368
2127
|
)
|
|
1369
2128
|
] }, pageNumber)),
|
|
1370
|
-
/* @__PURE__ */ (0,
|
|
2129
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1371
2130
|
"button",
|
|
1372
2131
|
{
|
|
1373
2132
|
type: "button",
|
|
@@ -1375,25 +2134,25 @@ function Pagination({
|
|
|
1375
2134
|
disabled: page >= totalPages,
|
|
1376
2135
|
"aria-label": "Next page",
|
|
1377
2136
|
onClick: () => onPageChange == null ? void 0 : onPageChange(page + 1),
|
|
1378
|
-
children: /* @__PURE__ */ (0,
|
|
2137
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(IconChevronRight, { className: "mx-auto h-4 w-4", "aria-hidden": true })
|
|
1379
2138
|
}
|
|
1380
2139
|
)
|
|
1381
2140
|
] });
|
|
1382
2141
|
}
|
|
1383
2142
|
|
|
1384
2143
|
// src/components/ui/Panel.tsx
|
|
1385
|
-
var
|
|
2144
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
1386
2145
|
function Panel(_a) {
|
|
1387
2146
|
var _b = _a, { title, description, children, className } = _b, props = __objRest(_b, ["title", "description", "children", "className"]);
|
|
1388
|
-
return /* @__PURE__ */ (0,
|
|
1389
|
-
title && /* @__PURE__ */ (0,
|
|
1390
|
-
description && /* @__PURE__ */ (0,
|
|
2147
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", __spreadProps(__spreadValues({ className: cn("ph-panel", className) }, props), { children: [
|
|
2148
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("h3", { className: "text-sm font-semibold uppercase tracking-wider text-ph-mutedtext", children: title }),
|
|
2149
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "text-sm text-ph-subtle", children: description }),
|
|
1391
2150
|
children
|
|
1392
2151
|
] }));
|
|
1393
2152
|
}
|
|
1394
2153
|
|
|
1395
2154
|
// src/components/ui/Rating.tsx
|
|
1396
|
-
var
|
|
2155
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
1397
2156
|
function Rating(_a) {
|
|
1398
2157
|
var _b = _a, {
|
|
1399
2158
|
label,
|
|
@@ -1413,9 +2172,9 @@ function Rating(_a) {
|
|
|
1413
2172
|
"wrapperClassName"
|
|
1414
2173
|
]);
|
|
1415
2174
|
const stars = Array.from({ length: max }, (_, index) => index + 1);
|
|
1416
|
-
return /* @__PURE__ */ (0,
|
|
1417
|
-
label && /* @__PURE__ */ (0,
|
|
1418
|
-
/* @__PURE__ */ (0,
|
|
2175
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: cn("ph-field", wrapperClassName), children: [
|
|
2176
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "ph-label", children: label }),
|
|
2177
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1419
2178
|
"div",
|
|
1420
2179
|
__spreadProps(__spreadValues({
|
|
1421
2180
|
className: cn("ph-rating flex", className),
|
|
@@ -1425,7 +2184,7 @@ function Rating(_a) {
|
|
|
1425
2184
|
children: stars.map((star) => {
|
|
1426
2185
|
const active = star <= value;
|
|
1427
2186
|
if (readOnly) {
|
|
1428
|
-
return /* @__PURE__ */ (0,
|
|
2187
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1429
2188
|
IconStar,
|
|
1430
2189
|
{
|
|
1431
2190
|
className: cn("h-6 w-6", active ? "text-amber-500" : "text-ph-border"),
|
|
@@ -1434,7 +2193,7 @@ function Rating(_a) {
|
|
|
1434
2193
|
star
|
|
1435
2194
|
);
|
|
1436
2195
|
}
|
|
1437
|
-
return /* @__PURE__ */ (0,
|
|
2196
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1438
2197
|
"button",
|
|
1439
2198
|
{
|
|
1440
2199
|
type: "button",
|
|
@@ -1443,7 +2202,7 @@ function Rating(_a) {
|
|
|
1443
2202
|
"aria-checked": active,
|
|
1444
2203
|
"aria-label": `${star} out of ${max}`,
|
|
1445
2204
|
onClick: () => onChange == null ? void 0 : onChange(star),
|
|
1446
|
-
children: /* @__PURE__ */ (0,
|
|
2205
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(IconStar, { className: cn("h-6 w-6", active ? "text-amber-500" : "text-ph-border") })
|
|
1447
2206
|
},
|
|
1448
2207
|
star
|
|
1449
2208
|
);
|
|
@@ -1454,8 +2213,8 @@ function Rating(_a) {
|
|
|
1454
2213
|
}
|
|
1455
2214
|
|
|
1456
2215
|
// src/components/ui/SearchInput.tsx
|
|
1457
|
-
var
|
|
1458
|
-
var
|
|
2216
|
+
var import_react12 = require("react");
|
|
2217
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
1459
2218
|
function SearchInput(_a) {
|
|
1460
2219
|
var _b = _a, {
|
|
1461
2220
|
id: idProp,
|
|
@@ -1476,12 +2235,12 @@ function SearchInput(_a) {
|
|
|
1476
2235
|
"wrapperClassName",
|
|
1477
2236
|
"placeholder"
|
|
1478
2237
|
]);
|
|
1479
|
-
const autoId = (0,
|
|
2238
|
+
const autoId = (0, import_react12.useId)();
|
|
1480
2239
|
const id = idProp != null ? idProp : autoId;
|
|
1481
|
-
return /* @__PURE__ */ (0,
|
|
1482
|
-
/* @__PURE__ */ (0,
|
|
1483
|
-
/* @__PURE__ */ (0,
|
|
1484
|
-
shortcut != null ? /* @__PURE__ */ (0,
|
|
2240
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: cn("relative", wrapperClassName), children: [
|
|
2241
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("label", { htmlFor: id, className: hideLabel ? "sr-only" : "ph-label mb-1.5 block", children: label }),
|
|
2242
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "relative", children: [
|
|
2243
|
+
shortcut != null ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1485
2244
|
"span",
|
|
1486
2245
|
{
|
|
1487
2246
|
className: "ph-shortcut pointer-events-none absolute left-3 top-1/2 z-10 -translate-y-1/2 text-xs",
|
|
@@ -1489,7 +2248,7 @@ function SearchInput(_a) {
|
|
|
1489
2248
|
children: shortcut
|
|
1490
2249
|
}
|
|
1491
2250
|
) : null,
|
|
1492
|
-
/* @__PURE__ */ (0,
|
|
2251
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1493
2252
|
"input",
|
|
1494
2253
|
__spreadValues({
|
|
1495
2254
|
id,
|
|
@@ -1523,12 +2282,12 @@ function SearchGroup(_a) {
|
|
|
1523
2282
|
"wrapperClassName",
|
|
1524
2283
|
"className"
|
|
1525
2284
|
]);
|
|
1526
|
-
const autoId = (0,
|
|
2285
|
+
const autoId = (0, import_react12.useId)();
|
|
1527
2286
|
const id = idProp != null ? idProp : autoId;
|
|
1528
|
-
return /* @__PURE__ */ (0,
|
|
1529
|
-
/* @__PURE__ */ (0,
|
|
1530
|
-
/* @__PURE__ */ (0,
|
|
1531
|
-
/* @__PURE__ */ (0,
|
|
2287
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: cn("ph-field", wrapperClassName), children: [
|
|
2288
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("label", { htmlFor: id, className: "ph-label", children: label }),
|
|
2289
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "ph-search-group flex w-full max-w-lg min-h-[2.3125rem] items-stretch divide-x divide-ph-border", children: [
|
|
2290
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1532
2291
|
"input",
|
|
1533
2292
|
__spreadValues({
|
|
1534
2293
|
id,
|
|
@@ -1537,12 +2296,12 @@ function SearchGroup(_a) {
|
|
|
1537
2296
|
className: cn("ph-input ph-input-group-field min-w-0 flex-1", className)
|
|
1538
2297
|
}, props)
|
|
1539
2298
|
),
|
|
1540
|
-
/* @__PURE__ */ (0,
|
|
2299
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1541
2300
|
Button,
|
|
1542
2301
|
{
|
|
1543
2302
|
type: "submit",
|
|
1544
2303
|
variant: "primary",
|
|
1545
|
-
icon: /* @__PURE__ */ (0,
|
|
2304
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(IconSearch, { className: "h-4 w-4", "aria-hidden": true }),
|
|
1546
2305
|
className: "ph-search-group__submit",
|
|
1547
2306
|
"aria-label": submitLabel
|
|
1548
2307
|
}
|
|
@@ -1552,7 +2311,7 @@ function SearchGroup(_a) {
|
|
|
1552
2311
|
}
|
|
1553
2312
|
|
|
1554
2313
|
// src/components/ui/Table.tsx
|
|
1555
|
-
var
|
|
2314
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
1556
2315
|
function Table({
|
|
1557
2316
|
data,
|
|
1558
2317
|
columns,
|
|
@@ -1563,15 +2322,15 @@ function Table({
|
|
|
1563
2322
|
className,
|
|
1564
2323
|
caption
|
|
1565
2324
|
}) {
|
|
1566
|
-
return /* @__PURE__ */ (0,
|
|
1567
|
-
caption && /* @__PURE__ */ (0,
|
|
1568
|
-
/* @__PURE__ */ (0,
|
|
1569
|
-
/* @__PURE__ */ (0,
|
|
2325
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: cn("ph-table-wrap", compact && "ph-table-compact", className), children: /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("table", { className: cn("ph-table", zebra && "ph-table-zebra", ribbon && "ph-table--ribbon"), children: [
|
|
2326
|
+
caption && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("caption", { className: "sr-only", children: caption }),
|
|
2327
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("tr", { children: columns.map((col) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("th", { className: col.className, children: col.header }, col.key)) }) }),
|
|
2328
|
+
/* @__PURE__ */ (0, import_jsx_runtime22.jsx)("tbody", { children: data.map((row, i) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("tr", { style: getRowStyle == null ? void 0 : getRowStyle(row), children: columns.map((col) => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("td", { className: col.className, children: col.cell(row) }, col.key)) }, i)) })
|
|
1570
2329
|
] }) });
|
|
1571
2330
|
}
|
|
1572
2331
|
|
|
1573
2332
|
// src/components/ui/Stat.tsx
|
|
1574
|
-
var
|
|
2333
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
1575
2334
|
var toneMap = {
|
|
1576
2335
|
default: "text-ph-ink",
|
|
1577
2336
|
brand: "text-ph-brand",
|
|
@@ -1588,16 +2347,16 @@ var statMap = {
|
|
|
1588
2347
|
};
|
|
1589
2348
|
function Stat(_a) {
|
|
1590
2349
|
var _b = _a, { icon, label, value, footer, tone = "default", className } = _b, props = __objRest(_b, ["icon", "label", "value", "footer", "tone", "className"]);
|
|
1591
|
-
return /* @__PURE__ */ (0,
|
|
1592
|
-
icon && /* @__PURE__ */ (0,
|
|
1593
|
-
/* @__PURE__ */ (0,
|
|
1594
|
-
/* @__PURE__ */ (0,
|
|
1595
|
-
footer && /* @__PURE__ */ (0,
|
|
2350
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("article", __spreadProps(__spreadValues({ className: cn("ph-stat", statMap[tone], className) }, props), { children: [
|
|
2351
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: cn("mb-2 h-7 w-7", toneMap[tone]), children: icon }),
|
|
2352
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: cn("ph-stat-label", tone === "warning" && toneMap[tone]), children: label }),
|
|
2353
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: cn("ph-stat-val", toneMap[tone]), children: value }),
|
|
2354
|
+
footer && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { className: "text-xs text-ph-subtle", children: footer })
|
|
1596
2355
|
] }));
|
|
1597
2356
|
}
|
|
1598
2357
|
|
|
1599
2358
|
// src/components/ui/Toast.tsx
|
|
1600
|
-
var
|
|
2359
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
1601
2360
|
var statusConfig2 = {
|
|
1602
2361
|
info: { icon: IconErrorOutline, color: "text-ph-info", bg: "ph-toast-info" },
|
|
1603
2362
|
success: { icon: IconCheckCircle, color: "text-ph-success", bg: "ph-toast-success" },
|
|
@@ -1613,33 +2372,33 @@ function Toast({
|
|
|
1613
2372
|
}) {
|
|
1614
2373
|
const config = statusConfig2[status];
|
|
1615
2374
|
const Icon = config.icon;
|
|
1616
|
-
return /* @__PURE__ */ (0,
|
|
1617
|
-
/* @__PURE__ */ (0,
|
|
1618
|
-
/* @__PURE__ */ (0,
|
|
1619
|
-
/* @__PURE__ */ (0,
|
|
1620
|
-
description && /* @__PURE__ */ (0,
|
|
2375
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: cn("ph-toast", config.bg, className), children: [
|
|
2376
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Icon, { className: cn("mt-0.5 h-5 w-5 shrink-0", config.color), "aria-hidden": true }),
|
|
2377
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "pr-8", children: [
|
|
2378
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "font-semibold", children: title }),
|
|
2379
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("p", { className: "mt-1 text-xs text-ph-subtle", children: description })
|
|
1621
2380
|
] }),
|
|
1622
|
-
onDismiss && /* @__PURE__ */ (0,
|
|
2381
|
+
onDismiss && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
1623
2382
|
"button",
|
|
1624
2383
|
{
|
|
1625
2384
|
type: "button",
|
|
1626
2385
|
"aria-label": `Dismiss ${title}`,
|
|
1627
2386
|
className: "absolute right-2 top-2 ph-btn ph-btn-ghost ph-btn-xs ph-btn-circle",
|
|
1628
2387
|
onClick: onDismiss,
|
|
1629
|
-
children: /* @__PURE__ */ (0,
|
|
2388
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(IconClose, { className: "h-4 w-4" })
|
|
1630
2389
|
}
|
|
1631
2390
|
)
|
|
1632
2391
|
] });
|
|
1633
2392
|
}
|
|
1634
2393
|
function ToastStack({ children, className }) {
|
|
1635
|
-
return /* @__PURE__ */ (0,
|
|
2394
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: cn("ph-toast-stack", className), children });
|
|
1636
2395
|
}
|
|
1637
2396
|
|
|
1638
2397
|
// src/components/ui/Tabs.tsx
|
|
1639
|
-
var
|
|
2398
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
1640
2399
|
function Tabs({ items, value, onChange, variant = "pill", className }) {
|
|
1641
2400
|
if (variant === "underline") {
|
|
1642
|
-
return /* @__PURE__ */ (0,
|
|
2401
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: cn("flex gap-6 border-b border-ph-border", className), children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1643
2402
|
"button",
|
|
1644
2403
|
{
|
|
1645
2404
|
type: "button",
|
|
@@ -1653,7 +2412,7 @@ function Tabs({ items, value, onChange, variant = "pill", className }) {
|
|
|
1653
2412
|
item.value
|
|
1654
2413
|
)) });
|
|
1655
2414
|
}
|
|
1656
|
-
return /* @__PURE__ */ (0,
|
|
2415
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: cn("ph-tabs-row inline-flex", className), children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
1657
2416
|
"button",
|
|
1658
2417
|
{
|
|
1659
2418
|
type: "button",
|
|
@@ -1666,7 +2425,7 @@ function Tabs({ items, value, onChange, variant = "pill", className }) {
|
|
|
1666
2425
|
}
|
|
1667
2426
|
|
|
1668
2427
|
// src/components/ui/ThemeDomSync.tsx
|
|
1669
|
-
var
|
|
2428
|
+
var import_react13 = require("react");
|
|
1670
2429
|
|
|
1671
2430
|
// src/themes/registry.ts
|
|
1672
2431
|
var DEFAULT_THEME_ID = "hedgehog-light";
|
|
@@ -1852,6 +2611,34 @@ var THEMES = [
|
|
|
1852
2611
|
description: "Notion dark mode \u2014 dark charcoal canvas with blue accent and clean typography.",
|
|
1853
2612
|
colorScheme: "dark",
|
|
1854
2613
|
group: "Productivity"
|
|
2614
|
+
},
|
|
2615
|
+
{
|
|
2616
|
+
id: "deepsea-light",
|
|
2617
|
+
name: "Tokyo Night Day",
|
|
2618
|
+
description: "Tokyo Night Day \u2014 soft bluish greys with vivid blue and purple accents.",
|
|
2619
|
+
colorScheme: "light",
|
|
2620
|
+
group: "Tokyo Night"
|
|
2621
|
+
},
|
|
2622
|
+
{
|
|
2623
|
+
id: "deepsea-dark",
|
|
2624
|
+
name: "Tokyo Night",
|
|
2625
|
+
description: "Tokyo Night \u2014 #1a1b26 base with signature blue, cyan, and purple.",
|
|
2626
|
+
colorScheme: "dark",
|
|
2627
|
+
group: "Tokyo Night"
|
|
2628
|
+
},
|
|
2629
|
+
{
|
|
2630
|
+
id: "kraken-light",
|
|
2631
|
+
name: "Kraken Light",
|
|
2632
|
+
description: "Medium-inspired warm paper, editorial black actions, and classic publication yellow.",
|
|
2633
|
+
colorScheme: "light",
|
|
2634
|
+
group: "Kraken"
|
|
2635
|
+
},
|
|
2636
|
+
{
|
|
2637
|
+
id: "kraken-dark",
|
|
2638
|
+
name: "Kraken Dark",
|
|
2639
|
+
description: "Medium-inspired night reading canvas with white actions and classic publication yellow.",
|
|
2640
|
+
colorScheme: "dark",
|
|
2641
|
+
group: "Kraken"
|
|
1855
2642
|
}
|
|
1856
2643
|
];
|
|
1857
2644
|
var THEME_GROUPS = Array.from(new Set(THEMES.map((theme) => theme.group)));
|
|
@@ -1889,35 +2676,35 @@ function readStoredTheme() {
|
|
|
1889
2676
|
|
|
1890
2677
|
// src/components/ui/ThemeDomSync.tsx
|
|
1891
2678
|
function ThemeDomSync() {
|
|
1892
|
-
(0,
|
|
2679
|
+
(0, import_react13.useLayoutEffect)(() => {
|
|
1893
2680
|
persistTheme(readStoredTheme());
|
|
1894
2681
|
}, []);
|
|
1895
2682
|
return null;
|
|
1896
2683
|
}
|
|
1897
2684
|
|
|
1898
2685
|
// src/components/ui/ThemeManager.tsx
|
|
1899
|
-
var
|
|
1900
|
-
var
|
|
2686
|
+
var import_react14 = require("react");
|
|
2687
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
1901
2688
|
function ThemeManager({ children }) {
|
|
1902
|
-
(0,
|
|
2689
|
+
(0, import_react14.useLayoutEffect)(() => {
|
|
1903
2690
|
persistTheme(readStoredTheme());
|
|
1904
2691
|
}, []);
|
|
1905
|
-
return /* @__PURE__ */ (0,
|
|
2692
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_jsx_runtime26.Fragment, { children });
|
|
1906
2693
|
}
|
|
1907
2694
|
|
|
1908
2695
|
// src/components/ui/ThemeSwitcher.tsx
|
|
1909
|
-
var
|
|
1910
|
-
var
|
|
2696
|
+
var import_react15 = require("react");
|
|
2697
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
1911
2698
|
function ThemeSwitcher({ className }) {
|
|
1912
|
-
const [themeId, setThemeId] = (0,
|
|
1913
|
-
(0,
|
|
2699
|
+
const [themeId, setThemeId] = (0, import_react15.useState)("hedgehog-light");
|
|
2700
|
+
(0, import_react15.useEffect)(() => {
|
|
1914
2701
|
const id = readStoredTheme();
|
|
1915
2702
|
persistTheme(id);
|
|
1916
2703
|
setThemeId(id);
|
|
1917
2704
|
}, []);
|
|
1918
|
-
return /* @__PURE__ */ (0,
|
|
1919
|
-
/* @__PURE__ */ (0,
|
|
1920
|
-
/* @__PURE__ */ (0,
|
|
2705
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("label", { className: cn("flex min-w-0 items-center gap-2", className), children: [
|
|
2706
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "shrink-0 text-xs font-medium text-ph-mutedtext sm:text-sm", children: "Theme" }),
|
|
2707
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
1921
2708
|
"select",
|
|
1922
2709
|
{
|
|
1923
2710
|
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",
|
|
@@ -1928,22 +2715,22 @@ function ThemeSwitcher({ className }) {
|
|
|
1928
2715
|
persistTheme(next);
|
|
1929
2716
|
setThemeId(next);
|
|
1930
2717
|
},
|
|
1931
|
-
children: THEME_GROUPS.map((group) => /* @__PURE__ */ (0,
|
|
2718
|
+
children: THEME_GROUPS.map((group) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("optgroup", { label: group, children: THEMES.filter((theme) => theme.group === group).map((theme) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("option", { value: theme.id, children: theme.name }, theme.id)) }, group))
|
|
1932
2719
|
}
|
|
1933
2720
|
)
|
|
1934
2721
|
] });
|
|
1935
2722
|
}
|
|
1936
2723
|
|
|
1937
2724
|
// src/components/ui/Accordion.tsx
|
|
1938
|
-
var
|
|
1939
|
-
var
|
|
2725
|
+
var import_react16 = require("react");
|
|
2726
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
1940
2727
|
function Accordion({
|
|
1941
2728
|
items,
|
|
1942
2729
|
allowMultiple = false,
|
|
1943
2730
|
defaultOpen = [],
|
|
1944
2731
|
className
|
|
1945
2732
|
}) {
|
|
1946
|
-
const [openItems, setOpenItems] = (0,
|
|
2733
|
+
const [openItems, setOpenItems] = (0, import_react16.useState)(new Set(defaultOpen));
|
|
1947
2734
|
const toggleItem = (id) => {
|
|
1948
2735
|
setOpenItems((prev) => {
|
|
1949
2736
|
const next = new Set(prev);
|
|
@@ -1958,18 +2745,18 @@ function Accordion({
|
|
|
1958
2745
|
return next;
|
|
1959
2746
|
});
|
|
1960
2747
|
};
|
|
1961
|
-
return /* @__PURE__ */ (0,
|
|
2748
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: cn("divide-y divide-ph-border rounded-xl border border-ph-border bg-ph-surface", className), children: items.map((item) => {
|
|
1962
2749
|
const isOpen = openItems.has(item.id);
|
|
1963
|
-
return /* @__PURE__ */ (0,
|
|
1964
|
-
/* @__PURE__ */ (0,
|
|
2750
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "first:rounded-t-xl last:rounded-b-xl", children: [
|
|
2751
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
1965
2752
|
"button",
|
|
1966
2753
|
{
|
|
1967
2754
|
type: "button",
|
|
1968
2755
|
onClick: () => toggleItem(item.id),
|
|
1969
2756
|
className: "flex w-full items-center justify-between px-5 py-4 text-left transition hover:bg-ph-muted",
|
|
1970
2757
|
children: [
|
|
1971
|
-
/* @__PURE__ */ (0,
|
|
1972
|
-
/* @__PURE__ */ (0,
|
|
2758
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "font-semibold text-ph-ink", children: item.title }),
|
|
2759
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1973
2760
|
IconChevronDown,
|
|
1974
2761
|
{
|
|
1975
2762
|
className: cn(
|
|
@@ -1981,14 +2768,14 @@ function Accordion({
|
|
|
1981
2768
|
]
|
|
1982
2769
|
}
|
|
1983
2770
|
),
|
|
1984
|
-
/* @__PURE__ */ (0,
|
|
2771
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
1985
2772
|
"div",
|
|
1986
2773
|
{
|
|
1987
2774
|
className: cn(
|
|
1988
2775
|
"grid transition-all duration-200",
|
|
1989
2776
|
isOpen ? "grid-rows-[1fr]" : "grid-rows-[0fr]"
|
|
1990
2777
|
),
|
|
1991
|
-
children: /* @__PURE__ */ (0,
|
|
2778
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: "px-5 pb-4 text-ph-subtle", children: item.content }) })
|
|
1992
2779
|
}
|
|
1993
2780
|
)
|
|
1994
2781
|
] }, item.id);
|
|
@@ -1996,30 +2783,30 @@ function Accordion({
|
|
|
1996
2783
|
}
|
|
1997
2784
|
|
|
1998
2785
|
// src/components/ui/Stepper.tsx
|
|
1999
|
-
var
|
|
2786
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
2000
2787
|
function Stepper({ steps, currentStep, className }) {
|
|
2001
|
-
return /* @__PURE__ */ (0,
|
|
2788
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: cn("flex items-start gap-2", className), children: steps.map((step, index) => {
|
|
2002
2789
|
const isCompleted = index < currentStep;
|
|
2003
2790
|
const isCurrent = index === currentStep;
|
|
2004
2791
|
const isPending = index > currentStep;
|
|
2005
2792
|
const isError = step.status === "error";
|
|
2006
|
-
return /* @__PURE__ */ (0,
|
|
2007
|
-
/* @__PURE__ */ (0,
|
|
2008
|
-
/* @__PURE__ */ (0,
|
|
2793
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "flex flex-1 items-start gap-2", children: [
|
|
2794
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "flex flex-1 flex-col items-center", children: [
|
|
2795
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2009
2796
|
"div",
|
|
2010
2797
|
{
|
|
2011
2798
|
className: cn(
|
|
2012
2799
|
"flex h-9 w-9 items-center justify-center rounded-full text-sm font-bold transition-colors",
|
|
2013
|
-
isCompleted && "bg-ph-success text-
|
|
2014
|
-
isCurrent && !isError && "bg-ph-brand text-
|
|
2015
|
-
isCurrent && isError && "bg-ph-danger text-
|
|
2800
|
+
isCompleted && "bg-ph-success text-[var(--ph-on-success)]",
|
|
2801
|
+
isCurrent && !isError && "bg-ph-brand text-[var(--ph-on-accent)] ring-4 ring-ph-brand/20",
|
|
2802
|
+
isCurrent && isError && "bg-ph-danger text-[var(--ph-on-danger)]",
|
|
2016
2803
|
isPending && "bg-ph-muted text-ph-mutedtext"
|
|
2017
2804
|
),
|
|
2018
|
-
children: isCompleted ? /* @__PURE__ */ (0,
|
|
2805
|
+
children: isCompleted ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(IconCheck, { className: "h-5 w-5", "aria-hidden": true }) : index + 1
|
|
2019
2806
|
}
|
|
2020
2807
|
),
|
|
2021
|
-
/* @__PURE__ */ (0,
|
|
2022
|
-
/* @__PURE__ */ (0,
|
|
2808
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "mt-2 text-center", children: [
|
|
2809
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2023
2810
|
"p",
|
|
2024
2811
|
{
|
|
2025
2812
|
className: cn(
|
|
@@ -2030,10 +2817,10 @@ function Stepper({ steps, currentStep, className }) {
|
|
|
2030
2817
|
children: step.label
|
|
2031
2818
|
}
|
|
2032
2819
|
),
|
|
2033
|
-
step.description && /* @__PURE__ */ (0,
|
|
2820
|
+
step.description && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { className: "mt-0.5 text-xs text-ph-mutedtext", children: step.description })
|
|
2034
2821
|
] })
|
|
2035
2822
|
] }),
|
|
2036
|
-
index < steps.length - 1 && /* @__PURE__ */ (0,
|
|
2823
|
+
index < steps.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2037
2824
|
"div",
|
|
2038
2825
|
{
|
|
2039
2826
|
className: cn(
|
|
@@ -2047,16 +2834,16 @@ function Stepper({ steps, currentStep, className }) {
|
|
|
2047
2834
|
}
|
|
2048
2835
|
|
|
2049
2836
|
// src/components/ui/SegmentedControl.tsx
|
|
2050
|
-
var
|
|
2837
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
2051
2838
|
function SegmentedControl({ options, value, onChange, className }) {
|
|
2052
|
-
return /* @__PURE__ */ (0,
|
|
2839
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2053
2840
|
"div",
|
|
2054
2841
|
{
|
|
2055
2842
|
className: cn(
|
|
2056
2843
|
"inline-flex rounded-lg bg-ph-muted p-1",
|
|
2057
2844
|
className
|
|
2058
2845
|
),
|
|
2059
|
-
children: options.map((option) => /* @__PURE__ */ (0,
|
|
2846
|
+
children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
2060
2847
|
"button",
|
|
2061
2848
|
{
|
|
2062
2849
|
type: "button",
|
|
@@ -2066,7 +2853,7 @@ function SegmentedControl({ options, value, onChange, className }) {
|
|
|
2066
2853
|
value === option.value ? "bg-ph-surface text-ph-ink shadow-ph" : "text-ph-subtle hover:text-ph-ink"
|
|
2067
2854
|
),
|
|
2068
2855
|
children: [
|
|
2069
|
-
option.icon && /* @__PURE__ */ (0,
|
|
2856
|
+
option.icon && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "h-4 w-4", children: option.icon }),
|
|
2070
2857
|
option.label
|
|
2071
2858
|
]
|
|
2072
2859
|
},
|
|
@@ -2077,8 +2864,8 @@ function SegmentedControl({ options, value, onChange, className }) {
|
|
|
2077
2864
|
}
|
|
2078
2865
|
|
|
2079
2866
|
// src/components/ui/CommandPalette.tsx
|
|
2080
|
-
var
|
|
2081
|
-
var
|
|
2867
|
+
var import_react17 = require("react");
|
|
2868
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
2082
2869
|
function CommandPalette({
|
|
2083
2870
|
items,
|
|
2084
2871
|
isOpen,
|
|
@@ -2086,13 +2873,13 @@ function CommandPalette({
|
|
|
2086
2873
|
placeholder = "Type a command or search...",
|
|
2087
2874
|
className
|
|
2088
2875
|
}) {
|
|
2089
|
-
const [query, setQuery] = (0,
|
|
2090
|
-
const [selectedIndex, setSelectedIndex] = (0,
|
|
2091
|
-
const inputRef = (0,
|
|
2876
|
+
const [query, setQuery] = (0, import_react17.useState)("");
|
|
2877
|
+
const [selectedIndex, setSelectedIndex] = (0, import_react17.useState)(0);
|
|
2878
|
+
const inputRef = (0, import_react17.useRef)(null);
|
|
2092
2879
|
const filtered = items.filter(
|
|
2093
2880
|
(item) => item.label.toLowerCase().includes(query.toLowerCase())
|
|
2094
2881
|
);
|
|
2095
|
-
(0,
|
|
2882
|
+
(0, import_react17.useEffect)(() => {
|
|
2096
2883
|
var _a;
|
|
2097
2884
|
if (isOpen) {
|
|
2098
2885
|
setQuery("");
|
|
@@ -2100,7 +2887,7 @@ function CommandPalette({
|
|
|
2100
2887
|
(_a = inputRef.current) == null ? void 0 : _a.focus();
|
|
2101
2888
|
}
|
|
2102
2889
|
}, [isOpen]);
|
|
2103
|
-
(0,
|
|
2890
|
+
(0, import_react17.useEffect)(() => {
|
|
2104
2891
|
const handleKeyDown = (e) => {
|
|
2105
2892
|
var _a;
|
|
2106
2893
|
if (!isOpen) return;
|
|
@@ -2127,7 +2914,7 @@ function CommandPalette({
|
|
|
2127
2914
|
return () => window.removeEventListener("keydown", handleKeyDown);
|
|
2128
2915
|
}, [isOpen, filtered, selectedIndex, onClose]);
|
|
2129
2916
|
if (!isOpen) return null;
|
|
2130
|
-
return /* @__PURE__ */ (0,
|
|
2917
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "fixed inset-0 z-50 flex items-start justify-center bg-black/40 pt-[20vh] backdrop-blur-sm", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
2131
2918
|
"div",
|
|
2132
2919
|
{
|
|
2133
2920
|
className: cn(
|
|
@@ -2135,9 +2922,9 @@ function CommandPalette({
|
|
|
2135
2922
|
className
|
|
2136
2923
|
),
|
|
2137
2924
|
children: [
|
|
2138
|
-
/* @__PURE__ */ (0,
|
|
2139
|
-
/* @__PURE__ */ (0,
|
|
2140
|
-
/* @__PURE__ */ (0,
|
|
2925
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "flex items-center gap-3 border-b border-ph-border px-4 py-3", children: [
|
|
2926
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(IconSearch, { className: "h-5 w-5 text-ph-mutedtext" }),
|
|
2927
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
2141
2928
|
"input",
|
|
2142
2929
|
{
|
|
2143
2930
|
ref: inputRef,
|
|
@@ -2151,9 +2938,9 @@ function CommandPalette({
|
|
|
2151
2938
|
className: "flex-1 bg-transparent text-ph-ink outline-none placeholder:text-ph-mutedtext"
|
|
2152
2939
|
}
|
|
2153
2940
|
),
|
|
2154
|
-
/* @__PURE__ */ (0,
|
|
2941
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("kbd", { className: "rounded border border-ph-border bg-ph-muted px-1.5 py-0.5 text-xs text-ph-mutedtext", children: "ESC" })
|
|
2155
2942
|
] }),
|
|
2156
|
-
/* @__PURE__ */ (0,
|
|
2943
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "max-h-[50vh] overflow-y-auto py-2", children: filtered.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "px-4 py-8 text-center text-sm text-ph-mutedtext", children: "No results found." }) : filtered.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
|
|
2157
2944
|
"button",
|
|
2158
2945
|
{
|
|
2159
2946
|
type: "button",
|
|
@@ -2167,9 +2954,9 @@ function CommandPalette({
|
|
|
2167
2954
|
index === selectedIndex ? "bg-ph-muted text-ph-ink" : "text-ph-subtle"
|
|
2168
2955
|
),
|
|
2169
2956
|
children: [
|
|
2170
|
-
item.icon && /* @__PURE__ */ (0,
|
|
2171
|
-
/* @__PURE__ */ (0,
|
|
2172
|
-
item.shortcut && /* @__PURE__ */ (0,
|
|
2957
|
+
item.icon && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "h-5 w-5", children: item.icon }),
|
|
2958
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "flex-1", children: item.label }),
|
|
2959
|
+
item.shortcut && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("kbd", { className: "rounded border border-ph-border bg-ph-surface px-1.5 py-0.5 text-xs text-ph-mutedtext", children: item.shortcut })
|
|
2173
2960
|
]
|
|
2174
2961
|
},
|
|
2175
2962
|
item.id
|
|
@@ -2180,10 +2967,10 @@ function CommandPalette({
|
|
|
2180
2967
|
}
|
|
2181
2968
|
|
|
2182
2969
|
// src/components/ui/Calendar.tsx
|
|
2183
|
-
var
|
|
2184
|
-
var
|
|
2970
|
+
var import_react18 = require("react");
|
|
2971
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
2185
2972
|
function Calendar({ value, onChange, className }) {
|
|
2186
|
-
const [currentMonth, setCurrentMonth] = (0,
|
|
2973
|
+
const [currentMonth, setCurrentMonth] = (0, import_react18.useState)(value || /* @__PURE__ */ new Date());
|
|
2187
2974
|
const today = /* @__PURE__ */ new Date();
|
|
2188
2975
|
const year = currentMonth.getFullYear();
|
|
2189
2976
|
const month = currentMonth.getMonth();
|
|
@@ -2223,42 +3010,44 @@ function Calendar({ value, onChange, className }) {
|
|
|
2223
3010
|
for (let i = 1; i <= daysInMonth; i++) {
|
|
2224
3011
|
days.push(i);
|
|
2225
3012
|
}
|
|
2226
|
-
return /* @__PURE__ */ (0,
|
|
2227
|
-
/* @__PURE__ */ (0,
|
|
2228
|
-
/* @__PURE__ */ (0,
|
|
3013
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: cn("w-[280px] rounded-xl border border-ph-border bg-ph-surface p-4 shadow-ph", className), children: [
|
|
3014
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "mb-4 flex items-center justify-between", children: [
|
|
3015
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2229
3016
|
"button",
|
|
2230
3017
|
{
|
|
2231
3018
|
type: "button",
|
|
2232
3019
|
onClick: prevMonth,
|
|
3020
|
+
"aria-label": "Previous month",
|
|
2233
3021
|
className: "rounded-lg p-1 text-ph-subtle transition hover:bg-ph-muted hover:text-ph-ink",
|
|
2234
|
-
children: /* @__PURE__ */ (0,
|
|
3022
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(IconChevronLeft, { className: "h-5 w-5", "aria-hidden": true })
|
|
2235
3023
|
}
|
|
2236
3024
|
),
|
|
2237
|
-
/* @__PURE__ */ (0,
|
|
3025
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("span", { className: "text-sm font-semibold text-ph-ink", children: [
|
|
2238
3026
|
monthNames[month],
|
|
2239
3027
|
" ",
|
|
2240
3028
|
year
|
|
2241
3029
|
] }),
|
|
2242
|
-
/* @__PURE__ */ (0,
|
|
3030
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2243
3031
|
"button",
|
|
2244
3032
|
{
|
|
2245
3033
|
type: "button",
|
|
2246
3034
|
onClick: nextMonth,
|
|
3035
|
+
"aria-label": "Next month",
|
|
2247
3036
|
className: "rounded-lg p-1 text-ph-subtle transition hover:bg-ph-muted hover:text-ph-ink",
|
|
2248
|
-
children: /* @__PURE__ */ (0,
|
|
3037
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(IconChevronRight, { className: "h-5 w-5", "aria-hidden": true })
|
|
2249
3038
|
}
|
|
2250
3039
|
)
|
|
2251
3040
|
] }),
|
|
2252
|
-
/* @__PURE__ */ (0,
|
|
2253
|
-
weekDays.map((day) => /* @__PURE__ */ (0,
|
|
2254
|
-
days.map((day, index) => /* @__PURE__ */ (0,
|
|
3041
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "grid grid-cols-7 gap-1", children: [
|
|
3042
|
+
weekDays.map((day) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "py-1 text-center text-xs font-medium text-ph-mutedtext", children: day }, day)),
|
|
3043
|
+
days.map((day, index) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "aspect-square", children: day && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2255
3044
|
"button",
|
|
2256
3045
|
{
|
|
2257
3046
|
type: "button",
|
|
2258
3047
|
onClick: () => handleSelect(day),
|
|
2259
3048
|
className: cn(
|
|
2260
3049
|
"flex h-full w-full items-center justify-center rounded-lg text-sm transition-colors",
|
|
2261
|
-
isSelected(day) ? "bg-ph-brand font-semibold text-
|
|
3050
|
+
isSelected(day) ? "bg-ph-brand font-semibold text-[var(--ph-on-accent)] shadow-ph" : isToday(day) ? "bg-ph-muted font-semibold text-ph-brand ring-1 ring-ph-brand/30" : "text-ph-ink hover:bg-ph-muted"
|
|
2262
3051
|
),
|
|
2263
3052
|
children: day
|
|
2264
3053
|
}
|
|
@@ -2268,11 +3057,11 @@ function Calendar({ value, onChange, className }) {
|
|
|
2268
3057
|
}
|
|
2269
3058
|
|
|
2270
3059
|
// src/components/ui/HoverCard.tsx
|
|
2271
|
-
var
|
|
2272
|
-
var
|
|
3060
|
+
var import_react19 = require("react");
|
|
3061
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
2273
3062
|
function HoverCard({ trigger, children, className }) {
|
|
2274
|
-
const [isVisible, setIsVisible] = (0,
|
|
2275
|
-
return /* @__PURE__ */ (0,
|
|
3063
|
+
const [isVisible, setIsVisible] = (0, import_react19.useState)(false);
|
|
3064
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
2276
3065
|
"div",
|
|
2277
3066
|
{
|
|
2278
3067
|
className: "relative inline-block",
|
|
@@ -2280,7 +3069,7 @@ function HoverCard({ trigger, children, className }) {
|
|
|
2280
3069
|
onMouseLeave: () => setIsVisible(false),
|
|
2281
3070
|
children: [
|
|
2282
3071
|
trigger,
|
|
2283
|
-
/* @__PURE__ */ (0,
|
|
3072
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
2284
3073
|
"div",
|
|
2285
3074
|
{
|
|
2286
3075
|
className: cn(
|
|
@@ -2289,8 +3078,8 @@ function HoverCard({ trigger, children, className }) {
|
|
|
2289
3078
|
className
|
|
2290
3079
|
),
|
|
2291
3080
|
children: [
|
|
2292
|
-
/* @__PURE__ */ (0,
|
|
2293
|
-
/* @__PURE__ */ (0,
|
|
3081
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "absolute -top-1.5 left-1/2 h-3 w-3 -translate-x-1/2 rotate-45 border-l border-t border-ph-border bg-ph-surface" }),
|
|
3082
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "relative", children })
|
|
2294
3083
|
]
|
|
2295
3084
|
}
|
|
2296
3085
|
)
|
|
@@ -2300,9 +3089,9 @@ function HoverCard({ trigger, children, className }) {
|
|
|
2300
3089
|
}
|
|
2301
3090
|
|
|
2302
3091
|
// src/components/ui/EmptyState.tsx
|
|
2303
|
-
var
|
|
3092
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
2304
3093
|
function EmptyState({ icon, title, description, action, className }) {
|
|
2305
|
-
return /* @__PURE__ */ (0,
|
|
3094
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
2306
3095
|
"div",
|
|
2307
3096
|
{
|
|
2308
3097
|
className: cn(
|
|
@@ -2310,67 +3099,226 @@ function EmptyState({ icon, title, description, action, className }) {
|
|
|
2310
3099
|
className
|
|
2311
3100
|
),
|
|
2312
3101
|
children: [
|
|
2313
|
-
icon && /* @__PURE__ */ (0,
|
|
2314
|
-
/* @__PURE__ */ (0,
|
|
2315
|
-
description && /* @__PURE__ */ (0,
|
|
2316
|
-
action && /* @__PURE__ */ (0,
|
|
3102
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "mb-4 flex h-14 w-14 items-center justify-center rounded-full bg-ph-muted text-ph-mutedtext", children: icon }),
|
|
3103
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("h3", { className: "text-base font-semibold text-ph-ink", children: title }),
|
|
3104
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("p", { className: "mt-1 max-w-sm text-sm text-ph-subtle", children: description }),
|
|
3105
|
+
action && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "mt-4", children: action })
|
|
2317
3106
|
]
|
|
2318
3107
|
}
|
|
2319
3108
|
);
|
|
2320
3109
|
}
|
|
2321
3110
|
|
|
2322
3111
|
// src/components/ui/FilterChips.tsx
|
|
2323
|
-
var
|
|
2324
|
-
function FilterChips({
|
|
2325
|
-
|
|
2326
|
-
|
|
3112
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
3113
|
+
function FilterChips({
|
|
3114
|
+
chips,
|
|
3115
|
+
onToggle,
|
|
3116
|
+
onRemove,
|
|
3117
|
+
className,
|
|
3118
|
+
"aria-label": ariaLabel = "Applied filters"
|
|
3119
|
+
}) {
|
|
3120
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: cn("ph-filter-chips", className), role: "group", "aria-label": ariaLabel, children: chips.map((chip) => {
|
|
3121
|
+
var _a;
|
|
3122
|
+
const label = (_a = chip.removeLabel) != null ? _a : getChipText(chip);
|
|
3123
|
+
const content = /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_jsx_runtime35.Fragment, { children: [
|
|
3124
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "ph-filter-chip__label", children: chip.label }),
|
|
3125
|
+
chip.value != null ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "ph-filter-chip__value", children: chip.value }) : null
|
|
3126
|
+
] });
|
|
3127
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
3128
|
+
"span",
|
|
3129
|
+
{
|
|
3130
|
+
className: cn("ph-filter-chip", chip.active && "ph-filter-chip--active"),
|
|
3131
|
+
"data-state": chip.active ? "on" : "off",
|
|
3132
|
+
children: [
|
|
3133
|
+
onToggle ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3134
|
+
"button",
|
|
3135
|
+
{
|
|
3136
|
+
type: "button",
|
|
3137
|
+
className: "ph-filter-chip__main",
|
|
3138
|
+
"aria-pressed": Boolean(chip.active),
|
|
3139
|
+
onClick: () => onToggle(chip.id),
|
|
3140
|
+
children: content
|
|
3141
|
+
}
|
|
3142
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "ph-filter-chip__main", children: content }),
|
|
3143
|
+
chip.active && onRemove ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3144
|
+
"button",
|
|
3145
|
+
{
|
|
3146
|
+
type: "button",
|
|
3147
|
+
className: "ph-filter-chip__remove",
|
|
3148
|
+
"aria-label": `Remove ${label} filter`,
|
|
3149
|
+
onClick: () => onRemove(chip.id),
|
|
3150
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(IconClose, { className: "h-3 w-3", "aria-hidden": true })
|
|
3151
|
+
}
|
|
3152
|
+
) : null
|
|
3153
|
+
]
|
|
3154
|
+
},
|
|
3155
|
+
chip.id
|
|
3156
|
+
);
|
|
3157
|
+
}) });
|
|
3158
|
+
}
|
|
3159
|
+
function getChipText(chip) {
|
|
3160
|
+
const label = typeof chip.label === "string" || typeof chip.label === "number" ? String(chip.label) : chip.id;
|
|
3161
|
+
const value = typeof chip.value === "string" || typeof chip.value === "number" ? String(chip.value) : null;
|
|
3162
|
+
return value ? `${label}: ${value}` : label;
|
|
3163
|
+
}
|
|
3164
|
+
|
|
3165
|
+
// src/components/ui/FilterBar.tsx
|
|
3166
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
3167
|
+
function FilterBar(_a) {
|
|
3168
|
+
var _b = _a, {
|
|
3169
|
+
children,
|
|
3170
|
+
label = "Filters and sorting",
|
|
3171
|
+
onClear,
|
|
3172
|
+
clearLabel = "Clear all",
|
|
3173
|
+
resultCount,
|
|
3174
|
+
className
|
|
3175
|
+
} = _b, props = __objRest(_b, [
|
|
3176
|
+
"children",
|
|
3177
|
+
"label",
|
|
3178
|
+
"onClear",
|
|
3179
|
+
"clearLabel",
|
|
3180
|
+
"resultCount",
|
|
3181
|
+
"className"
|
|
3182
|
+
]);
|
|
3183
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", __spreadProps(__spreadValues({ className: cn("ph-filter-bar", className) }, props), { children: [
|
|
3184
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "ph-filter-bar__controls", role: "group", "aria-label": label, children: [
|
|
3185
|
+
children,
|
|
3186
|
+
onClear ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("button", { type: "button", className: "ph-filter-bar__clear", onClick: onClear, children: clearLabel }) : null
|
|
3187
|
+
] }),
|
|
3188
|
+
resultCount != null ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("output", { className: "ph-filter-bar__results", "aria-live": "polite", children: resultCount }) : null
|
|
3189
|
+
] }));
|
|
3190
|
+
}
|
|
3191
|
+
function FilterMenu({
|
|
3192
|
+
label,
|
|
3193
|
+
value,
|
|
3194
|
+
options,
|
|
3195
|
+
onValueChange,
|
|
3196
|
+
placeholder = "Any",
|
|
3197
|
+
align = "start",
|
|
3198
|
+
disabled,
|
|
3199
|
+
className
|
|
3200
|
+
}) {
|
|
3201
|
+
var _a;
|
|
3202
|
+
const selected = options.find((option) => option.value === value);
|
|
3203
|
+
const displayValue = (_a = selected == null ? void 0 : selected.label) != null ? _a : placeholder;
|
|
3204
|
+
const accessibleValue = selected ? getOptionText(selected) : String(placeholder);
|
|
3205
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3206
|
+
DropdownMenu,
|
|
2327
3207
|
{
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
3208
|
+
"aria-label": `${label}: ${accessibleValue}`,
|
|
3209
|
+
align,
|
|
3210
|
+
disabled,
|
|
3211
|
+
className,
|
|
3212
|
+
trigger: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("span", { className: cn("ph-filter-menu-trigger", selected && "ph-filter-menu-trigger--active"), children: [
|
|
3213
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(IconTuning, { className: "h-3.5 w-3.5", "aria-hidden": true }),
|
|
3214
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "ph-filter-menu-trigger__label", children: label }),
|
|
3215
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "ph-filter-menu-trigger__value", children: displayValue })
|
|
3216
|
+
] }),
|
|
3217
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(DropdownRadioGroup, { value, onValueChange, children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3218
|
+
DropdownRadioItem,
|
|
3219
|
+
{
|
|
3220
|
+
value: option.value,
|
|
3221
|
+
textValue: getOptionText(option),
|
|
3222
|
+
disabled: option.disabled,
|
|
3223
|
+
children: option.label
|
|
3224
|
+
},
|
|
3225
|
+
option.value
|
|
3226
|
+
)) })
|
|
3227
|
+
}
|
|
3228
|
+
);
|
|
3229
|
+
}
|
|
3230
|
+
function SortMenu({
|
|
3231
|
+
label,
|
|
3232
|
+
value,
|
|
3233
|
+
options,
|
|
3234
|
+
onValueChange,
|
|
3235
|
+
direction = "descending",
|
|
3236
|
+
align = "end",
|
|
3237
|
+
disabled,
|
|
3238
|
+
className
|
|
3239
|
+
}) {
|
|
3240
|
+
const selected = options.find((option) => option.value === value);
|
|
3241
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3242
|
+
DropdownMenu,
|
|
3243
|
+
{
|
|
3244
|
+
"aria-label": `${label}: ${selected ? getOptionText(selected) : "Choose sort order"}`,
|
|
3245
|
+
align,
|
|
3246
|
+
disabled,
|
|
3247
|
+
className,
|
|
3248
|
+
trigger: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("span", { className: "ph-filter-menu-trigger ph-sort-menu-trigger", children: [
|
|
3249
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3250
|
+
IconArrowDown,
|
|
2338
3251
|
{
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
onRemove(chip.id);
|
|
2342
|
-
},
|
|
2343
|
-
className: "ml-0.5 flex h-4 w-4 cursor-pointer items-center justify-center rounded-full hover:bg-white/20",
|
|
2344
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(IconClose, { className: "h-3 w-3" })
|
|
3252
|
+
className: cn("h-3.5 w-3.5", direction === "ascending" && "rotate-180"),
|
|
3253
|
+
"aria-hidden": true
|
|
2345
3254
|
}
|
|
2346
|
-
)
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
3255
|
+
),
|
|
3256
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "ph-filter-menu-trigger__label", children: label }),
|
|
3257
|
+
selected ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "ph-filter-menu-trigger__value", children: selected.label }) : null
|
|
3258
|
+
] }),
|
|
3259
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(DropdownRadioGroup, { value, onValueChange, children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3260
|
+
DropdownRadioItem,
|
|
3261
|
+
{
|
|
3262
|
+
value: option.value,
|
|
3263
|
+
textValue: getOptionText(option),
|
|
3264
|
+
disabled: option.disabled,
|
|
3265
|
+
children: option.label
|
|
3266
|
+
},
|
|
3267
|
+
option.value
|
|
3268
|
+
)) })
|
|
3269
|
+
}
|
|
3270
|
+
);
|
|
3271
|
+
}
|
|
3272
|
+
function getOptionText(option) {
|
|
3273
|
+
if (option.textValue) return option.textValue;
|
|
3274
|
+
if (typeof option.label === "string" || typeof option.label === "number") return String(option.label);
|
|
3275
|
+
return option.value;
|
|
3276
|
+
}
|
|
3277
|
+
|
|
3278
|
+
// src/components/ui/FilterControls.tsx
|
|
3279
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
3280
|
+
function FilterControls(_a) {
|
|
3281
|
+
var _b = _a, {
|
|
3282
|
+
children,
|
|
3283
|
+
barProps,
|
|
3284
|
+
chipsProps,
|
|
3285
|
+
emptyState,
|
|
3286
|
+
className
|
|
3287
|
+
} = _b, props = __objRest(_b, [
|
|
3288
|
+
"children",
|
|
3289
|
+
"barProps",
|
|
3290
|
+
"chipsProps",
|
|
3291
|
+
"emptyState",
|
|
3292
|
+
"className"
|
|
3293
|
+
]);
|
|
3294
|
+
const hasChips = Boolean(chipsProps == null ? void 0 : chipsProps.chips.length);
|
|
3295
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", __spreadProps(__spreadValues({ className: cn("ph-filter-controls", className) }, props), { children: [
|
|
3296
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(FilterBar, __spreadProps(__spreadValues({}, barProps), { children })),
|
|
3297
|
+
hasChips && chipsProps ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(FilterChips, __spreadValues({}, chipsProps)) : emptyState != null ? emptyState : null
|
|
3298
|
+
] }));
|
|
2351
3299
|
}
|
|
2352
3300
|
|
|
2353
3301
|
// src/components/ui/CodeBlock.tsx
|
|
2354
|
-
var
|
|
2355
|
-
var
|
|
3302
|
+
var import_react20 = require("react");
|
|
3303
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
2356
3304
|
function CodeBlock({ code, language = "tsx", filename, className }) {
|
|
2357
|
-
const [copied, setCopied] = (0,
|
|
3305
|
+
const [copied, setCopied] = (0, import_react20.useState)(false);
|
|
2358
3306
|
const handleCopy = async () => {
|
|
2359
3307
|
await navigator.clipboard.writeText(code);
|
|
2360
3308
|
setCopied(true);
|
|
2361
3309
|
setTimeout(() => setCopied(false), 2e3);
|
|
2362
3310
|
};
|
|
2363
|
-
return /* @__PURE__ */ (0,
|
|
2364
|
-
(filename || language) && /* @__PURE__ */ (0,
|
|
2365
|
-
/* @__PURE__ */ (0,
|
|
2366
|
-
/* @__PURE__ */ (0,
|
|
2367
|
-
/* @__PURE__ */ (0,
|
|
2368
|
-
/* @__PURE__ */ (0,
|
|
2369
|
-
/* @__PURE__ */ (0,
|
|
3311
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: cn("overflow-hidden rounded-lg border border-ph-border bg-[#1a1a2e]", className), children: [
|
|
3312
|
+
(filename || language) && /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "flex items-center justify-between border-b border-white/10 px-4 py-2", children: [
|
|
3313
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
3314
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "flex gap-1.5", children: [
|
|
3315
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "h-3 w-3 rounded-full bg-red-400" }),
|
|
3316
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "h-3 w-3 rounded-full bg-amber-400" }),
|
|
3317
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "h-3 w-3 rounded-full bg-emerald-400" })
|
|
2370
3318
|
] }),
|
|
2371
|
-
filename && /* @__PURE__ */ (0,
|
|
3319
|
+
filename && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "ml-2 text-xs text-white/60", children: filename })
|
|
2372
3320
|
] }),
|
|
2373
|
-
/* @__PURE__ */ (0,
|
|
3321
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
2374
3322
|
"button",
|
|
2375
3323
|
{
|
|
2376
3324
|
type: "button",
|
|
@@ -2380,35 +3328,35 @@ function CodeBlock({ code, language = "tsx", filename, className }) {
|
|
|
2380
3328
|
}
|
|
2381
3329
|
)
|
|
2382
3330
|
] }),
|
|
2383
|
-
/* @__PURE__ */ (0,
|
|
3331
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("pre", { className: "overflow-x-auto p-4 text-sm leading-relaxed", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("code", { className: "font-mono text-[#e4e4e7]", children: code }) })
|
|
2384
3332
|
] });
|
|
2385
3333
|
}
|
|
2386
3334
|
|
|
2387
3335
|
// src/components/ui/ComponentDocs.tsx
|
|
2388
|
-
var
|
|
3336
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
2389
3337
|
function ComponentDocs({ title = "Props & variants", rows, defaultOpen = false, className }) {
|
|
2390
|
-
return /* @__PURE__ */ (0,
|
|
2391
|
-
/* @__PURE__ */ (0,
|
|
2392
|
-
/* @__PURE__ */ (0,
|
|
2393
|
-
/* @__PURE__ */ (0,
|
|
2394
|
-
/* @__PURE__ */ (0,
|
|
2395
|
-
/* @__PURE__ */ (0,
|
|
3338
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("details", { className: cn("ph-panel group overflow-hidden p-0", className), open: defaultOpen, children: [
|
|
3339
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("summary", { className: "flex cursor-pointer list-none items-center justify-between gap-4 border-b border-ph-border px-4 py-3 transition hover:bg-ph-muted/60 [&::-webkit-details-marker]:hidden", children: [
|
|
3340
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("h3", { className: "text-xs font-semibold uppercase tracking-wider text-ph-mutedtext", children: title }),
|
|
3341
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("span", { className: "rounded-full border border-ph-border bg-ph-surface px-2 py-1 text-[10px] font-semibold uppercase tracking-wider text-ph-mutedtext transition group-open:bg-ph-brand group-open:text-white", children: [
|
|
3342
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "group-open:hidden", children: "Show" }),
|
|
3343
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "hidden group-open:inline", children: "Hide" })
|
|
2396
3344
|
] })
|
|
2397
3345
|
] }),
|
|
2398
|
-
/* @__PURE__ */ (0,
|
|
2399
|
-
/* @__PURE__ */ (0,
|
|
2400
|
-
/* @__PURE__ */ (0,
|
|
2401
|
-
/* @__PURE__ */ (0,
|
|
2402
|
-
/* @__PURE__ */ (0,
|
|
2403
|
-
/* @__PURE__ */ (0,
|
|
3346
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "overflow-x-auto border-t border-ph-border", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("table", { className: "w-full text-left text-sm", children: [
|
|
3347
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("thead", { className: "bg-ph-muted text-xs uppercase tracking-wider text-ph-mutedtext", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("tr", { children: [
|
|
3348
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("th", { className: "px-4 py-2 font-semibold", children: "Prop" }),
|
|
3349
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("th", { className: "px-4 py-2 font-semibold", children: "Type" }),
|
|
3350
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("th", { className: "px-4 py-2 font-semibold", children: "Default" }),
|
|
3351
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("th", { className: "px-4 py-2 font-semibold", children: "Use" })
|
|
2404
3352
|
] }) }),
|
|
2405
|
-
/* @__PURE__ */ (0,
|
|
3353
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("tbody", { className: "divide-y divide-ph-border", children: rows.map((row) => {
|
|
2406
3354
|
var _a;
|
|
2407
|
-
return /* @__PURE__ */ (0,
|
|
2408
|
-
/* @__PURE__ */ (0,
|
|
2409
|
-
/* @__PURE__ */ (0,
|
|
2410
|
-
/* @__PURE__ */ (0,
|
|
2411
|
-
/* @__PURE__ */ (0,
|
|
3355
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("tr", { children: [
|
|
3356
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("td", { className: "px-4 py-3 align-top font-mono text-xs text-ph-ink", children: row.name }),
|
|
3357
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("td", { className: "px-4 py-3 align-top font-mono text-xs text-ph-subtle", children: row.type }),
|
|
3358
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("td", { className: "px-4 py-3 align-top font-mono text-xs text-ph-subtle", children: (_a = row.defaultValue) != null ? _a : "-" }),
|
|
3359
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("td", { className: "px-4 py-3 align-top text-ph-subtle", children: row.description })
|
|
2412
3360
|
] }, row.name);
|
|
2413
3361
|
}) })
|
|
2414
3362
|
] }) })
|
|
@@ -2416,8 +3364,8 @@ function ComponentDocs({ title = "Props & variants", rows, defaultOpen = false,
|
|
|
2416
3364
|
}
|
|
2417
3365
|
|
|
2418
3366
|
// src/components/ui/ShowcaseWrapper.tsx
|
|
2419
|
-
var
|
|
2420
|
-
var
|
|
3367
|
+
var import_react21 = require("react");
|
|
3368
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
2421
3369
|
function ShowcaseWrapper({
|
|
2422
3370
|
id,
|
|
2423
3371
|
title,
|
|
@@ -2429,49 +3377,32 @@ function ShowcaseWrapper({
|
|
|
2429
3377
|
className
|
|
2430
3378
|
}) {
|
|
2431
3379
|
var _a;
|
|
2432
|
-
const [showCode, setShowCode] = (0,
|
|
3380
|
+
const [showCode, setShowCode] = (0, import_react21.useState)(false);
|
|
2433
3381
|
const fallbackId = (_a = titleIdMap[title]) != null ? _a : title.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, "");
|
|
2434
|
-
return /* @__PURE__ */ (0,
|
|
2435
|
-
/* @__PURE__ */ (0,
|
|
2436
|
-
/* @__PURE__ */ (0,
|
|
2437
|
-
/* @__PURE__ */ (0,
|
|
2438
|
-
/* @__PURE__ */ (0,
|
|
3382
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("section", { id: id != null ? id : fallbackId, className: cn("scroll-mt-20", className), children: [
|
|
3383
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "ph-h2-rule mb-8", children: [
|
|
3384
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "flex items-center gap-1.5", children: [
|
|
3385
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("h2", { children: title }),
|
|
3386
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
2439
3387
|
"button",
|
|
2440
3388
|
{
|
|
2441
3389
|
type: "button",
|
|
2442
3390
|
onClick: () => setShowCode(!showCode),
|
|
2443
3391
|
className: cn(
|
|
2444
3392
|
"flex h-10 w-10 items-center justify-center rounded-full border transition-all",
|
|
2445
|
-
showCode ? "border-ph-brand bg-ph-brand text-
|
|
3393
|
+
showCode ? "border-ph-brand bg-ph-brand text-[var(--ph-on-accent)] shadow-lg shadow-ph-brand/25" : "border-ph-border bg-ph-surface text-ph-subtle hover:border-ph-brand hover:text-ph-brand"
|
|
2446
3394
|
),
|
|
2447
3395
|
title: showCode ? "Hide code" : "Show code",
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
{
|
|
2451
|
-
className: "h-5 w-5",
|
|
2452
|
-
viewBox: "0 0 24 24",
|
|
2453
|
-
fill: "none",
|
|
2454
|
-
stroke: "currentColor",
|
|
2455
|
-
strokeWidth: "2",
|
|
2456
|
-
strokeLinecap: "round",
|
|
2457
|
-
strokeLinejoin: "round",
|
|
2458
|
-
children: [
|
|
2459
|
-
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("rect", { x: "2", y: "3", width: "20", height: "14", rx: "2", ry: "2" }),
|
|
2460
|
-
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("line", { x1: "8", y1: "21", x2: "16", y2: "21" }),
|
|
2461
|
-
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("line", { x1: "12", y1: "17", x2: "12", y2: "21" }),
|
|
2462
|
-
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("line", { x1: "6", y1: "8", x2: "6", y2: "8" }),
|
|
2463
|
-
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("line", { x1: "10", y1: "8", x2: "10", y2: "8" })
|
|
2464
|
-
]
|
|
2465
|
-
}
|
|
2466
|
-
)
|
|
3396
|
+
"aria-label": showCode ? "Hide code" : "Show code",
|
|
3397
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(IconCodePreview, { className: "h-5 w-5", "aria-hidden": true })
|
|
2467
3398
|
}
|
|
2468
3399
|
)
|
|
2469
3400
|
] }),
|
|
2470
|
-
/* @__PURE__ */ (0,
|
|
3401
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("hr", {})
|
|
2471
3402
|
] }),
|
|
2472
|
-
description && /* @__PURE__ */ (0,
|
|
2473
|
-
docs && /* @__PURE__ */ (0,
|
|
2474
|
-
/* @__PURE__ */ (0,
|
|
3403
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("p", { className: "mb-6 text-sm text-ph-subtle", children: description }),
|
|
3404
|
+
docs && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "mb-6", children: docs }),
|
|
3405
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
2475
3406
|
"div",
|
|
2476
3407
|
{
|
|
2477
3408
|
className: cn(
|
|
@@ -2479,15 +3410,15 @@ function ShowcaseWrapper({
|
|
|
2479
3410
|
showCode ? "lg:grid lg:grid-cols-[1fr,minmax(360px,420px)]" : "block"
|
|
2480
3411
|
),
|
|
2481
3412
|
children: [
|
|
2482
|
-
/* @__PURE__ */ (0,
|
|
2483
|
-
/* @__PURE__ */ (0,
|
|
3413
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: cn("min-w-0", showCode && "lg:pr-2"), children }),
|
|
3414
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
2484
3415
|
"div",
|
|
2485
3416
|
{
|
|
2486
3417
|
className: cn(
|
|
2487
3418
|
"transition-all duration-300",
|
|
2488
3419
|
showCode ? "block opacity-100" : "hidden opacity-0 lg:hidden"
|
|
2489
3420
|
),
|
|
2490
|
-
children: /* @__PURE__ */ (0,
|
|
3421
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "sticky top-20", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(CodeBlock, { code, filename }) })
|
|
2491
3422
|
}
|
|
2492
3423
|
)
|
|
2493
3424
|
]
|
|
@@ -2536,41 +3467,41 @@ var titleIdMap = {
|
|
|
2536
3467
|
};
|
|
2537
3468
|
|
|
2538
3469
|
// src/components/ui/CollapsibleSection.tsx
|
|
2539
|
-
var
|
|
2540
|
-
var
|
|
3470
|
+
var import_react22 = require("react");
|
|
3471
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
2541
3472
|
function CollapsibleSection({ title, children, defaultOpen = true, id }) {
|
|
2542
|
-
const [isOpen, setIsOpen] = (0,
|
|
2543
|
-
|
|
2544
|
-
|
|
3473
|
+
const [isOpen, setIsOpen] = (0, import_react22.useState)(defaultOpen);
|
|
3474
|
+
const generatedId = (0, import_react22.useId)();
|
|
3475
|
+
const contentId = `${id != null ? id : generatedId}-content`;
|
|
3476
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("section", { id, className: "scroll-mt-20", children: [
|
|
3477
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
|
|
2545
3478
|
"button",
|
|
2546
3479
|
{
|
|
2547
3480
|
type: "button",
|
|
2548
3481
|
onClick: () => setIsOpen(!isOpen),
|
|
3482
|
+
"aria-expanded": isOpen,
|
|
3483
|
+
"aria-controls": contentId,
|
|
2549
3484
|
className: "mb-6 flex w-full items-center justify-between rounded-lg border border-ph-border bg-ph-muted px-5 py-4 text-left transition hover:bg-ph-muted/80",
|
|
2550
3485
|
children: [
|
|
2551
|
-
/* @__PURE__ */ (0,
|
|
2552
|
-
/* @__PURE__ */ (0,
|
|
2553
|
-
|
|
3486
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "text-lg font-bold text-ph-ink", children: title }),
|
|
3487
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
3488
|
+
IconChevronDown,
|
|
2554
3489
|
{
|
|
2555
3490
|
className: cn(
|
|
2556
3491
|
"h-5 w-5 text-ph-subtle transition-transform duration-200",
|
|
2557
3492
|
isOpen && "rotate-180"
|
|
2558
3493
|
),
|
|
2559
|
-
|
|
2560
|
-
fill: "none",
|
|
2561
|
-
stroke: "currentColor",
|
|
2562
|
-
strokeWidth: "2",
|
|
2563
|
-
strokeLinecap: "round",
|
|
2564
|
-
strokeLinejoin: "round",
|
|
2565
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("path", { d: "M6 9l6 6 6-6" })
|
|
3494
|
+
"aria-hidden": true
|
|
2566
3495
|
}
|
|
2567
3496
|
)
|
|
2568
3497
|
]
|
|
2569
3498
|
}
|
|
2570
3499
|
),
|
|
2571
|
-
/* @__PURE__ */ (0,
|
|
3500
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
2572
3501
|
"div",
|
|
2573
3502
|
{
|
|
3503
|
+
id: contentId,
|
|
3504
|
+
"aria-hidden": !isOpen,
|
|
2574
3505
|
className: cn(
|
|
2575
3506
|
"overflow-hidden transition-all duration-300",
|
|
2576
3507
|
isOpen ? "max-h-[50000px] opacity-100" : "max-h-0 opacity-0"
|
|
@@ -2582,7 +3513,7 @@ function CollapsibleSection({ title, children, defaultOpen = true, id }) {
|
|
|
2582
3513
|
}
|
|
2583
3514
|
|
|
2584
3515
|
// src/components/ui/Typography.tsx
|
|
2585
|
-
var
|
|
3516
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
2586
3517
|
var toneMap2 = {
|
|
2587
3518
|
default: "text-ph-ink",
|
|
2588
3519
|
muted: "text-ph-mutedtext",
|
|
@@ -2611,47 +3542,47 @@ function Display({
|
|
|
2611
3542
|
truncate,
|
|
2612
3543
|
className
|
|
2613
3544
|
}) {
|
|
2614
|
-
return /* @__PURE__ */ (0,
|
|
3545
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("h1", { className: textClass("text-4xl font-extrabold tracking-tight md:text-5xl", tone, weight, truncate, className), children });
|
|
2615
3546
|
}
|
|
2616
3547
|
function H1({ children, tone = "default", weight, truncate, className }) {
|
|
2617
|
-
return /* @__PURE__ */ (0,
|
|
3548
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("h1", { className: textClass("text-3xl font-bold tracking-tight md:text-4xl", tone, weight, truncate, className), children });
|
|
2618
3549
|
}
|
|
2619
3550
|
function H2({ children, tone = "default", weight, truncate, className }) {
|
|
2620
|
-
return /* @__PURE__ */ (0,
|
|
3551
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("h2", { className: textClass("text-2xl font-bold tracking-tight", tone, weight, truncate, className), children });
|
|
2621
3552
|
}
|
|
2622
3553
|
function H3({ children, tone = "default", weight, truncate, className }) {
|
|
2623
|
-
return /* @__PURE__ */ (0,
|
|
3554
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("h3", { className: textClass("text-xl font-semibold", tone, weight, truncate, className), children });
|
|
2624
3555
|
}
|
|
2625
3556
|
function H4({ children, tone = "default", weight, truncate, className }) {
|
|
2626
|
-
return /* @__PURE__ */ (0,
|
|
3557
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("h4", { className: textClass("text-lg font-semibold", tone, weight, truncate, className), children });
|
|
2627
3558
|
}
|
|
2628
3559
|
function H5({ children, tone = "default", weight, truncate, className }) {
|
|
2629
|
-
return /* @__PURE__ */ (0,
|
|
3560
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("h5", { className: textClass("text-base font-semibold", tone, weight, truncate, className), children });
|
|
2630
3561
|
}
|
|
2631
3562
|
function P({ children, tone = "default", weight, truncate, className }) {
|
|
2632
|
-
return /* @__PURE__ */ (0,
|
|
3563
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("p", { className: textClass("text-base leading-relaxed", tone, weight, truncate, className), children });
|
|
2633
3564
|
}
|
|
2634
3565
|
function Small({ children, tone = "default", weight, truncate, className }) {
|
|
2635
|
-
return /* @__PURE__ */ (0,
|
|
3566
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: textClass("text-sm leading-relaxed", tone, weight, truncate, className), children });
|
|
2636
3567
|
}
|
|
2637
3568
|
function Caption({ children, tone = "muted", weight, truncate, className }) {
|
|
2638
|
-
return /* @__PURE__ */ (0,
|
|
3569
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: textClass("text-[11px] font-medium uppercase tracking-wider", tone, weight, truncate, className), children });
|
|
2639
3570
|
}
|
|
2640
3571
|
function Overline({ children, tone = "muted", weight, truncate, className }) {
|
|
2641
|
-
return /* @__PURE__ */ (0,
|
|
3572
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: textClass("text-[10px] font-bold uppercase tracking-[0.15em]", tone, weight, truncate, className), children });
|
|
2642
3573
|
}
|
|
2643
3574
|
function Lead({ children, tone = "subtle", weight, truncate, className }) {
|
|
2644
|
-
return /* @__PURE__ */ (0,
|
|
3575
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("p", { className: textClass("text-lg leading-relaxed", tone, weight, truncate, className), children });
|
|
2645
3576
|
}
|
|
2646
3577
|
function Mono({ children, tone = "default", weight, truncate, className }) {
|
|
2647
|
-
return /* @__PURE__ */ (0,
|
|
3578
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("code", { className: textClass("text-sm font-mono leading-relaxed", tone, weight, truncate, className), children });
|
|
2648
3579
|
}
|
|
2649
3580
|
function Label({ children, tone = "default", weight, truncate, className }) {
|
|
2650
|
-
return /* @__PURE__ */ (0,
|
|
3581
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("label", { className: textClass("text-sm font-medium", tone, weight, truncate, className), children });
|
|
2651
3582
|
}
|
|
2652
3583
|
|
|
2653
3584
|
// src/components/ui/Avatar.tsx
|
|
2654
|
-
var
|
|
3585
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
2655
3586
|
var sizeMap5 = {
|
|
2656
3587
|
xs: "h-8 w-8 text-[10px]",
|
|
2657
3588
|
sm: "h-10 w-10 text-xs",
|
|
@@ -2683,8 +3614,8 @@ function Avatar(_a) {
|
|
|
2683
3614
|
"badge",
|
|
2684
3615
|
"className"
|
|
2685
3616
|
]);
|
|
2686
|
-
return /* @__PURE__ */ (0,
|
|
2687
|
-
/* @__PURE__ */ (0,
|
|
3617
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", __spreadProps(__spreadValues({ className: cn("relative inline-flex shrink-0", className) }, props), { children: [
|
|
3618
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
2688
3619
|
"div",
|
|
2689
3620
|
{
|
|
2690
3621
|
className: cn(
|
|
@@ -2695,7 +3626,7 @@ function Avatar(_a) {
|
|
|
2695
3626
|
children: icon || label
|
|
2696
3627
|
}
|
|
2697
3628
|
),
|
|
2698
|
-
status && /* @__PURE__ */ (0,
|
|
3629
|
+
status && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
2699
3630
|
"span",
|
|
2700
3631
|
{
|
|
2701
3632
|
className: cn(
|
|
@@ -2704,7 +3635,7 @@ function Avatar(_a) {
|
|
|
2704
3635
|
)
|
|
2705
3636
|
}
|
|
2706
3637
|
),
|
|
2707
|
-
badge && /* @__PURE__ */ (0,
|
|
3638
|
+
badge && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: "absolute -bottom-1 -right-1 flex min-w-[22px] items-center justify-center rounded-full bg-ph-brand px-1.5 py-px text-[10px] font-bold text-white", children: badge })
|
|
2708
3639
|
] }));
|
|
2709
3640
|
}
|
|
2710
3641
|
function AvatarGroup(_a) {
|
|
@@ -2712,9 +3643,9 @@ function AvatarGroup(_a) {
|
|
|
2712
3643
|
const items = Array.isArray(children) ? children : [children];
|
|
2713
3644
|
const visible = max ? items.slice(0, max) : items;
|
|
2714
3645
|
const remaining = max ? items.length - max : 0;
|
|
2715
|
-
return /* @__PURE__ */ (0,
|
|
3646
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", __spreadProps(__spreadValues({ className: cn("-space-x-3 flex rtl:space-x-reverse", className) }, props), { children: [
|
|
2716
3647
|
visible,
|
|
2717
|
-
remaining > 0 && /* @__PURE__ */ (0,
|
|
3648
|
+
remaining > 0 && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
2718
3649
|
Avatar,
|
|
2719
3650
|
{
|
|
2720
3651
|
label: `+${remaining}`,
|
|
@@ -2726,7 +3657,7 @@ function AvatarGroup(_a) {
|
|
|
2726
3657
|
}
|
|
2727
3658
|
|
|
2728
3659
|
// src/components/ui/Progress.tsx
|
|
2729
|
-
var
|
|
3660
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
2730
3661
|
var sizeMap6 = {
|
|
2731
3662
|
sm: "h-1",
|
|
2732
3663
|
md: "h-2",
|
|
@@ -2751,15 +3682,15 @@ function Progress(_a) {
|
|
|
2751
3682
|
"className"
|
|
2752
3683
|
]);
|
|
2753
3684
|
const percentage = Math.min(100, Math.max(0, value / max * 100));
|
|
2754
|
-
return /* @__PURE__ */ (0,
|
|
2755
|
-
(label || showPercentage) && /* @__PURE__ */ (0,
|
|
2756
|
-
label && /* @__PURE__ */ (0,
|
|
2757
|
-
showPercentage && /* @__PURE__ */ (0,
|
|
3685
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", __spreadProps(__spreadValues({ className: cn("w-full", className) }, props), { children: [
|
|
3686
|
+
(label || showPercentage) && /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "mb-1.5 flex justify-between text-sm text-ph-subtle", children: [
|
|
3687
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { children: label }),
|
|
3688
|
+
showPercentage && /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("span", { className: "tabular-nums", children: [
|
|
2758
3689
|
Math.round(percentage),
|
|
2759
3690
|
"%"
|
|
2760
3691
|
] })
|
|
2761
3692
|
] }),
|
|
2762
|
-
/* @__PURE__ */ (0,
|
|
3693
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: cn("ph-progress", sizeMap6[size]), children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
2763
3694
|
"div",
|
|
2764
3695
|
{
|
|
2765
3696
|
className: cn("ph-progress-bar", color),
|
|
@@ -2774,7 +3705,7 @@ function Progress(_a) {
|
|
|
2774
3705
|
}
|
|
2775
3706
|
|
|
2776
3707
|
// src/components/ui/ChatBubble.tsx
|
|
2777
|
-
var
|
|
3708
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
2778
3709
|
function ChatBubble(_a) {
|
|
2779
3710
|
var _b = _a, {
|
|
2780
3711
|
children,
|
|
@@ -2794,7 +3725,7 @@ function ChatBubble(_a) {
|
|
|
2794
3725
|
"className"
|
|
2795
3726
|
]);
|
|
2796
3727
|
const isSelf = variant === "self";
|
|
2797
|
-
return /* @__PURE__ */ (0,
|
|
3728
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|
|
2798
3729
|
"div",
|
|
2799
3730
|
__spreadProps(__spreadValues({
|
|
2800
3731
|
className: cn(
|
|
@@ -2804,9 +3735,9 @@ function ChatBubble(_a) {
|
|
|
2804
3735
|
)
|
|
2805
3736
|
}, props), {
|
|
2806
3737
|
children: [
|
|
2807
|
-
avatar && /* @__PURE__ */ (0,
|
|
2808
|
-
/* @__PURE__ */ (0,
|
|
2809
|
-
(name || time) && /* @__PURE__ */ (0,
|
|
3738
|
+
avatar && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: "shrink-0", children: avatar }),
|
|
3739
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: cn("min-w-0 flex-1", isSelf && "text-right"), children: [
|
|
3740
|
+
(name || time) && /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|
|
2810
3741
|
"header",
|
|
2811
3742
|
{
|
|
2812
3743
|
className: cn(
|
|
@@ -2814,12 +3745,12 @@ function ChatBubble(_a) {
|
|
|
2814
3745
|
isSelf && "flex-row-reverse justify-end"
|
|
2815
3746
|
),
|
|
2816
3747
|
children: [
|
|
2817
|
-
name && /* @__PURE__ */ (0,
|
|
2818
|
-
time && /* @__PURE__ */ (0,
|
|
3748
|
+
name && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: "font-semibold text-ph-ink", children: name }),
|
|
3749
|
+
time && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { children: time })
|
|
2819
3750
|
]
|
|
2820
3751
|
}
|
|
2821
3752
|
),
|
|
2822
|
-
/* @__PURE__ */ (0,
|
|
3753
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
2823
3754
|
"div",
|
|
2824
3755
|
{
|
|
2825
3756
|
className: cn(
|
|
@@ -2829,7 +3760,7 @@ function ChatBubble(_a) {
|
|
|
2829
3760
|
children
|
|
2830
3761
|
}
|
|
2831
3762
|
),
|
|
2832
|
-
footer && /* @__PURE__ */ (0,
|
|
3763
|
+
footer && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("footer", { className: "mt-2 text-[11px] text-ph-mutedtext", children: footer })
|
|
2833
3764
|
] })
|
|
2834
3765
|
]
|
|
2835
3766
|
})
|
|
@@ -2837,7 +3768,7 @@ function ChatBubble(_a) {
|
|
|
2837
3768
|
}
|
|
2838
3769
|
|
|
2839
3770
|
// src/components/ui/Terminal.tsx
|
|
2840
|
-
var
|
|
3771
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
2841
3772
|
function Terminal(_a) {
|
|
2842
3773
|
var _b = _a, {
|
|
2843
3774
|
title = "sandbox",
|
|
@@ -2850,7 +3781,7 @@ function Terminal(_a) {
|
|
|
2850
3781
|
"children",
|
|
2851
3782
|
"className"
|
|
2852
3783
|
]);
|
|
2853
|
-
return /* @__PURE__ */ (0,
|
|
3784
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
|
|
2854
3785
|
"div",
|
|
2855
3786
|
__spreadProps(__spreadValues({
|
|
2856
3787
|
className: cn(
|
|
@@ -2859,18 +3790,18 @@ function Terminal(_a) {
|
|
|
2859
3790
|
)
|
|
2860
3791
|
}, props), {
|
|
2861
3792
|
children: [
|
|
2862
|
-
/* @__PURE__ */ (0,
|
|
2863
|
-
/* @__PURE__ */ (0,
|
|
2864
|
-
/* @__PURE__ */ (0,
|
|
2865
|
-
/* @__PURE__ */ (0,
|
|
2866
|
-
title && /* @__PURE__ */ (0,
|
|
3793
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("header", { className: "flex items-center gap-2 border-b border-ph-border bg-ph-muted px-4 py-3", children: [
|
|
3794
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "h-3 w-3 rounded-full bg-red-400" }),
|
|
3795
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "h-3 w-3 rounded-full bg-amber-400" }),
|
|
3796
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "h-3 w-3 rounded-full bg-emerald-400" }),
|
|
3797
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "text-xs font-medium text-ph-mutedtext", children: title })
|
|
2867
3798
|
] }),
|
|
2868
|
-
/* @__PURE__ */ (0,
|
|
3799
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "ph-code rounded-none border-x-0 border-b-0 text-[13px] leading-relaxed", children: children || /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_jsx_runtime46.Fragment, { children: lines == null ? void 0 : lines.map((line, i) => {
|
|
2869
3800
|
const text = typeof line === "string" ? line : line.text;
|
|
2870
3801
|
const color = typeof line === "string" ? void 0 : line.color;
|
|
2871
|
-
return /* @__PURE__ */ (0,
|
|
2872
|
-
/* @__PURE__ */ (0,
|
|
2873
|
-
i < lines.length - 1 && /* @__PURE__ */ (0,
|
|
3802
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("span", { children: [
|
|
3803
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: color || "text-neutral-600", children: text }),
|
|
3804
|
+
i < lines.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("br", {})
|
|
2874
3805
|
] }, i);
|
|
2875
3806
|
}) }) })
|
|
2876
3807
|
]
|
|
@@ -2879,7 +3810,7 @@ function Terminal(_a) {
|
|
|
2879
3810
|
}
|
|
2880
3811
|
|
|
2881
3812
|
// src/components/ui/Indicator.tsx
|
|
2882
|
-
var
|
|
3813
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
2883
3814
|
var positionMap = {
|
|
2884
3815
|
"top-right": "-right-[2px] -top-[2px]",
|
|
2885
3816
|
"top-left": "-left-[2px] -top-[2px]",
|
|
@@ -2902,8 +3833,8 @@ function Indicator(_a) {
|
|
|
2902
3833
|
"dot",
|
|
2903
3834
|
"className"
|
|
2904
3835
|
]);
|
|
2905
|
-
return /* @__PURE__ */ (0,
|
|
2906
|
-
dot ? /* @__PURE__ */ (0,
|
|
3836
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", __spreadProps(__spreadValues({ className: cn("relative inline-flex items-center justify-center", className) }, props), { children: [
|
|
3837
|
+
dot ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
2907
3838
|
"span",
|
|
2908
3839
|
{
|
|
2909
3840
|
className: cn(
|
|
@@ -2912,7 +3843,7 @@ function Indicator(_a) {
|
|
|
2912
3843
|
positionMap[position]
|
|
2913
3844
|
)
|
|
2914
3845
|
}
|
|
2915
|
-
) : badge != null ? /* @__PURE__ */ (0,
|
|
3846
|
+
) : badge != null ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
2916
3847
|
"span",
|
|
2917
3848
|
{
|
|
2918
3849
|
className: cn(
|
|
@@ -2928,7 +3859,7 @@ function Indicator(_a) {
|
|
|
2928
3859
|
}
|
|
2929
3860
|
|
|
2930
3861
|
// src/components/ui/Timeline.tsx
|
|
2931
|
-
var
|
|
3862
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
2932
3863
|
function Timeline(_a) {
|
|
2933
3864
|
var _b = _a, {
|
|
2934
3865
|
events,
|
|
@@ -2939,15 +3870,15 @@ function Timeline(_a) {
|
|
|
2939
3870
|
"alternate",
|
|
2940
3871
|
"className"
|
|
2941
3872
|
]);
|
|
2942
|
-
return /* @__PURE__ */ (0,
|
|
3873
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
2943
3874
|
"ol",
|
|
2944
3875
|
__spreadProps(__spreadValues({
|
|
2945
3876
|
className: cn("relative space-y-8", className)
|
|
2946
3877
|
}, props), {
|
|
2947
3878
|
children: events.map((event, idx) => {
|
|
2948
3879
|
const align = alternate && idx % 2 !== 0 ? "lg:flex-row-reverse" : "";
|
|
2949
|
-
return /* @__PURE__ */ (0,
|
|
2950
|
-
/* @__PURE__ */ (0,
|
|
3880
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("li", { className: cn("relative flex gap-6", align), children: [
|
|
3881
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
2951
3882
|
"div",
|
|
2952
3883
|
{
|
|
2953
3884
|
className: cn(
|
|
@@ -2957,12 +3888,12 @@ function Timeline(_a) {
|
|
|
2957
3888
|
children: event.icon
|
|
2958
3889
|
}
|
|
2959
3890
|
),
|
|
2960
|
-
/* @__PURE__ */ (0,
|
|
2961
|
-
/* @__PURE__ */ (0,
|
|
2962
|
-
/* @__PURE__ */ (0,
|
|
2963
|
-
event.time && /* @__PURE__ */ (0,
|
|
3891
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("article", { className: "flex-1 rounded-xl border border-ph-border bg-ph-surface p-4 shadow-ph", children: [
|
|
3892
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex flex-wrap items-baseline gap-3", children: [
|
|
3893
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("h4", { className: "text-base font-semibold text-ph-ink", children: event.title }),
|
|
3894
|
+
event.time && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("time", { className: "text-[11px] font-semibold uppercase tracking-wide text-ph-mutedtext", children: event.time })
|
|
2964
3895
|
] }),
|
|
2965
|
-
event.description && /* @__PURE__ */ (0,
|
|
3896
|
+
event.description && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("p", { className: "mt-2 text-sm text-ph-subtle", children: event.description })
|
|
2966
3897
|
] })
|
|
2967
3898
|
] }, event.id);
|
|
2968
3899
|
})
|
|
@@ -2971,7 +3902,7 @@ function Timeline(_a) {
|
|
|
2971
3902
|
}
|
|
2972
3903
|
|
|
2973
3904
|
// src/components/charts/ph-insight-charts.tsx
|
|
2974
|
-
var
|
|
3905
|
+
var import_react25 = require("react");
|
|
2975
3906
|
|
|
2976
3907
|
// src/lib/chart/register-chartjs.ts
|
|
2977
3908
|
var import_chart = require("chart.js");
|
|
@@ -3336,7 +4267,7 @@ function buildPolarAreaDemo(tokens) {
|
|
|
3336
4267
|
}
|
|
3337
4268
|
|
|
3338
4269
|
// src/lib/chart/use-ph-chart-tokens.ts
|
|
3339
|
-
var
|
|
4270
|
+
var import_react23 = require("react");
|
|
3340
4271
|
|
|
3341
4272
|
// src/lib/chart/ph-chart-tokens.ts
|
|
3342
4273
|
var FALLBACK_CHART_TOKENS = {
|
|
@@ -3378,9 +4309,9 @@ function tokensEqual(a, b) {
|
|
|
3378
4309
|
return a.grid === b.grid && a.text === b.text && a.textMuted === b.textMuted && a.surface === b.surface && a.borderStrong === b.borderStrong && a.accent === b.accent;
|
|
3379
4310
|
}
|
|
3380
4311
|
function useChartTokens() {
|
|
3381
|
-
const [tokens, setTokens] = (0,
|
|
3382
|
-
const tokensRef = (0,
|
|
3383
|
-
(0,
|
|
4312
|
+
const [tokens, setTokens] = (0, import_react23.useState)(FALLBACK_CHART_TOKENS);
|
|
4313
|
+
const tokensRef = (0, import_react23.useRef)(FALLBACK_CHART_TOKENS);
|
|
4314
|
+
(0, import_react23.useEffect)(() => {
|
|
3384
4315
|
const root = document.documentElement;
|
|
3385
4316
|
const refresh = () => {
|
|
3386
4317
|
const next = readChartTokens(root);
|
|
@@ -3410,8 +4341,8 @@ function buildHogChartTheme(tokens) {
|
|
|
3410
4341
|
|
|
3411
4342
|
// src/lib/hog-charts-lite/CanvasTrendLineChart.tsx
|
|
3412
4343
|
var import_d3_scale = require("d3-scale");
|
|
3413
|
-
var
|
|
3414
|
-
var
|
|
4344
|
+
var import_react24 = require("react");
|
|
4345
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
3415
4346
|
var HOG_LITE_DEFAULT_MARGINS = { top: 16, right: 16, bottom: 32, left: 48 };
|
|
3416
4347
|
function resolveDisplayedSeries(series, palette) {
|
|
3417
4348
|
const visible = series.filter((s) => {
|
|
@@ -3465,11 +4396,11 @@ function CanvasTrendLineChart({
|
|
|
3465
4396
|
showCrosshair = true,
|
|
3466
4397
|
className = ""
|
|
3467
4398
|
}) {
|
|
3468
|
-
const containerRef = (0,
|
|
3469
|
-
const canvasRef = (0,
|
|
3470
|
-
const [size, setSize] = (0,
|
|
3471
|
-
const [hoverIndex, setHoverIndex] = (0,
|
|
3472
|
-
(0,
|
|
4399
|
+
const containerRef = (0, import_react24.useRef)(null);
|
|
4400
|
+
const canvasRef = (0, import_react24.useRef)(null);
|
|
4401
|
+
const [size, setSize] = (0, import_react24.useState)({ width: 0, height: 0 });
|
|
4402
|
+
const [hoverIndex, setHoverIndex] = (0, import_react24.useState)(null);
|
|
4403
|
+
(0, import_react24.useEffect)(() => {
|
|
3473
4404
|
const el = containerRef.current;
|
|
3474
4405
|
if (!el) {
|
|
3475
4406
|
return;
|
|
@@ -3482,8 +4413,8 @@ function CanvasTrendLineChart({
|
|
|
3482
4413
|
ro.observe(el);
|
|
3483
4414
|
return () => ro.disconnect();
|
|
3484
4415
|
}, []);
|
|
3485
|
-
const resolved = (0,
|
|
3486
|
-
const draw = (0,
|
|
4416
|
+
const resolved = (0, import_react24.useMemo)(() => resolveDisplayedSeries(series, theme.colors), [series, theme.colors]);
|
|
4417
|
+
const draw = (0, import_react24.useCallback)(() => {
|
|
3487
4418
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
3488
4419
|
const canvas = canvasRef.current;
|
|
3489
4420
|
const container = containerRef.current;
|
|
@@ -3656,7 +4587,7 @@ function CanvasTrendLineChart({
|
|
|
3656
4587
|
}
|
|
3657
4588
|
}
|
|
3658
4589
|
}, [hoverIndex, labels, resolved, showCrosshair, showGrid, size.height, size.width, theme]);
|
|
3659
|
-
(0,
|
|
4590
|
+
(0, import_react24.useEffect)(() => {
|
|
3660
4591
|
draw();
|
|
3661
4592
|
}, [draw]);
|
|
3662
4593
|
const onMouseMove = (event) => {
|
|
@@ -3691,7 +4622,7 @@ function CanvasTrendLineChart({
|
|
|
3691
4622
|
const onMouseLeave = () => {
|
|
3692
4623
|
setHoverIndex(null);
|
|
3693
4624
|
};
|
|
3694
|
-
const tooltipRows = (0,
|
|
4625
|
+
const tooltipRows = (0, import_react24.useMemo)(() => {
|
|
3695
4626
|
if (hoverIndex == null) {
|
|
3696
4627
|
return null;
|
|
3697
4628
|
}
|
|
@@ -3708,8 +4639,8 @@ function CanvasTrendLineChart({
|
|
|
3708
4639
|
value: s.data[hoverIndex]
|
|
3709
4640
|
})).filter((row) => typeof row.value === "number" && Number.isFinite(row.value));
|
|
3710
4641
|
}, [hoverIndex, labels, resolved]);
|
|
3711
|
-
return /* @__PURE__ */ (0,
|
|
3712
|
-
/* @__PURE__ */ (0,
|
|
4642
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { ref: containerRef, className: `relative w-full ${className}`.trim(), children: [
|
|
4643
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
3713
4644
|
"canvas",
|
|
3714
4645
|
{
|
|
3715
4646
|
ref: canvasRef,
|
|
@@ -3719,7 +4650,7 @@ function CanvasTrendLineChart({
|
|
|
3719
4650
|
onMouseLeave
|
|
3720
4651
|
}
|
|
3721
4652
|
),
|
|
3722
|
-
tooltipRows != null && tooltipRows.length > 0 && hoverIndex != null ? /* @__PURE__ */ (0,
|
|
4653
|
+
tooltipRows != null && tooltipRows.length > 0 && hoverIndex != null ? /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
3723
4654
|
"div",
|
|
3724
4655
|
{
|
|
3725
4656
|
className: "pointer-events-none absolute z-20 max-w-xs rounded-[var(--ph-radius-app)] border border-ph-border-strong bg-ph-surface px-3 py-2 text-xs shadow-ph-md",
|
|
@@ -3728,11 +4659,11 @@ function CanvasTrendLineChart({
|
|
|
3728
4659
|
top: 8
|
|
3729
4660
|
},
|
|
3730
4661
|
children: [
|
|
3731
|
-
/* @__PURE__ */ (0,
|
|
3732
|
-
/* @__PURE__ */ (0,
|
|
3733
|
-
/* @__PURE__ */ (0,
|
|
3734
|
-
/* @__PURE__ */ (0,
|
|
3735
|
-
/* @__PURE__ */ (0,
|
|
4662
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className: "font-semibold text-ph-ink", children: labels[hoverIndex] }),
|
|
4663
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("ul", { className: "mt-1 space-y-0.5 text-ph-mutedtext", children: tooltipRows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("li", { className: "flex items-center gap-2", children: [
|
|
4664
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "h-2 w-2 shrink-0 rounded-full", style: { background: row.color } }),
|
|
4665
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "min-w-0 truncate", children: row.label }),
|
|
4666
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "ml-auto tabular-nums text-ph-ink", children: row.value })
|
|
3736
4667
|
] }, row.label)) })
|
|
3737
4668
|
]
|
|
3738
4669
|
}
|
|
@@ -3741,15 +4672,15 @@ function CanvasTrendLineChart({
|
|
|
3741
4672
|
}
|
|
3742
4673
|
|
|
3743
4674
|
// src/components/charts/ph-insight-charts.tsx
|
|
3744
|
-
var
|
|
4675
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
3745
4676
|
var DEMO_LABELS = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"];
|
|
3746
4677
|
function useClientMounted() {
|
|
3747
|
-
const [mounted, setMounted] = (0,
|
|
3748
|
-
(0,
|
|
4678
|
+
const [mounted, setMounted] = (0, import_react25.useState)(false);
|
|
4679
|
+
(0, import_react25.useEffect)(() => setMounted(true), []);
|
|
3749
4680
|
return mounted;
|
|
3750
4681
|
}
|
|
3751
4682
|
function ChartSkeleton({ className = "h-[280px]" }) {
|
|
3752
|
-
return /* @__PURE__ */ (0,
|
|
4683
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
3753
4684
|
"div",
|
|
3754
4685
|
{
|
|
3755
4686
|
className: `w-full animate-pulse rounded-lemon bg-ph-muted ${className}`,
|
|
@@ -3760,8 +4691,8 @@ function ChartSkeleton({ className = "h-[280px]" }) {
|
|
|
3760
4691
|
function HogTrendLineChart() {
|
|
3761
4692
|
const mounted = useClientMounted();
|
|
3762
4693
|
const tokens = useChartTokens();
|
|
3763
|
-
const theme = (0,
|
|
3764
|
-
const series = (0,
|
|
4694
|
+
const theme = (0, import_react25.useMemo)(() => buildHogChartTheme(tokens), [tokens]);
|
|
4695
|
+
const series = (0, import_react25.useMemo)(
|
|
3765
4696
|
() => [
|
|
3766
4697
|
{
|
|
3767
4698
|
key: "pageview",
|
|
@@ -3781,9 +4712,9 @@ function HogTrendLineChart() {
|
|
|
3781
4712
|
[tokens.series]
|
|
3782
4713
|
);
|
|
3783
4714
|
if (!mounted) {
|
|
3784
|
-
return /* @__PURE__ */ (0,
|
|
4715
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(ChartSkeleton, {});
|
|
3785
4716
|
}
|
|
3786
|
-
return /* @__PURE__ */ (0,
|
|
4717
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "relative h-[280px] w-full min-h-[220px]", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
3787
4718
|
CanvasTrendLineChart,
|
|
3788
4719
|
{
|
|
3789
4720
|
labels: DEMO_LABELS,
|
|
@@ -3798,70 +4729,70 @@ function HogTrendLineChart() {
|
|
|
3798
4729
|
function InsightVerticalBarChart() {
|
|
3799
4730
|
const mounted = useClientMounted();
|
|
3800
4731
|
const tokens = useChartTokens();
|
|
3801
|
-
const config = (0,
|
|
4732
|
+
const config = (0, import_react25.useMemo)(() => buildVerticalBarDemo(tokens), [tokens]);
|
|
3802
4733
|
if (!mounted) {
|
|
3803
|
-
return /* @__PURE__ */ (0,
|
|
4734
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(ChartSkeleton, {});
|
|
3804
4735
|
}
|
|
3805
|
-
return /* @__PURE__ */ (0,
|
|
4736
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "relative h-[280px] w-full min-h-[220px]", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_react_chartjs_2.Bar, { data: config.data, options: config.options, redraw: false }) });
|
|
3806
4737
|
}
|
|
3807
4738
|
function InsightHorizontalBarChart() {
|
|
3808
4739
|
const mounted = useClientMounted();
|
|
3809
4740
|
const tokens = useChartTokens();
|
|
3810
|
-
const config = (0,
|
|
4741
|
+
const config = (0, import_react25.useMemo)(() => buildHorizontalBarDemo(tokens), [tokens]);
|
|
3811
4742
|
if (!mounted) {
|
|
3812
|
-
return /* @__PURE__ */ (0,
|
|
4743
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(ChartSkeleton, { className: "h-[320px]" });
|
|
3813
4744
|
}
|
|
3814
|
-
return /* @__PURE__ */ (0,
|
|
4745
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "relative h-[320px] w-full min-h-[260px]", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_react_chartjs_2.Bar, { data: config.data, options: config.options, redraw: false }) });
|
|
3815
4746
|
}
|
|
3816
4747
|
function InsightStackedBarChart() {
|
|
3817
4748
|
const mounted = useClientMounted();
|
|
3818
4749
|
const tokens = useChartTokens();
|
|
3819
|
-
const config = (0,
|
|
4750
|
+
const config = (0, import_react25.useMemo)(() => buildStackedBarDemo(tokens), [tokens]);
|
|
3820
4751
|
if (!mounted) {
|
|
3821
|
-
return /* @__PURE__ */ (0,
|
|
4752
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(ChartSkeleton, { className: "h-[300px]" });
|
|
3822
4753
|
}
|
|
3823
|
-
return /* @__PURE__ */ (0,
|
|
4754
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "relative h-[300px] w-full min-h-[240px]", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_react_chartjs_2.Bar, { data: config.data, options: config.options, redraw: false }) });
|
|
3824
4755
|
}
|
|
3825
4756
|
function InsightDoughnutChart() {
|
|
3826
4757
|
const mounted = useClientMounted();
|
|
3827
4758
|
const tokens = useChartTokens();
|
|
3828
|
-
const config = (0,
|
|
4759
|
+
const config = (0, import_react25.useMemo)(() => buildDoughnutDemo(tokens), [tokens]);
|
|
3829
4760
|
if (!mounted) {
|
|
3830
|
-
return /* @__PURE__ */ (0,
|
|
4761
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(ChartSkeleton, { className: "h-[260px]" });
|
|
3831
4762
|
}
|
|
3832
|
-
return /* @__PURE__ */ (0,
|
|
4763
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "relative mx-auto h-[260px] w-full max-w-[280px] min-h-[220px]", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_react_chartjs_2.Doughnut, { data: config.data, options: config.options, redraw: false }) });
|
|
3833
4764
|
}
|
|
3834
4765
|
function InsightPolarAreaChart() {
|
|
3835
4766
|
const mounted = useClientMounted();
|
|
3836
4767
|
const tokens = useChartTokens();
|
|
3837
|
-
const config = (0,
|
|
4768
|
+
const config = (0, import_react25.useMemo)(() => buildPolarAreaDemo(tokens), [tokens]);
|
|
3838
4769
|
if (!mounted) {
|
|
3839
|
-
return /* @__PURE__ */ (0,
|
|
4770
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(ChartSkeleton, { className: "h-[280px]" });
|
|
3840
4771
|
}
|
|
3841
|
-
return /* @__PURE__ */ (0,
|
|
4772
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "relative mx-auto h-[280px] w-full max-w-[320px] min-h-[240px]", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_react_chartjs_2.PolarArea, { data: config.data, options: config.options, redraw: false }) });
|
|
3842
4773
|
}
|
|
3843
4774
|
|
|
3844
4775
|
// src/components/dashboard/DashboardWell.tsx
|
|
3845
|
-
var
|
|
4776
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
3846
4777
|
function DashboardWell(_a) {
|
|
3847
4778
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
3848
|
-
return /* @__PURE__ */ (0,
|
|
4779
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", __spreadValues({ className: cn("ph-dashboard-well", className) }, props));
|
|
3849
4780
|
}
|
|
3850
4781
|
|
|
3851
4782
|
// src/components/dashboard/DashboardToolbar.tsx
|
|
3852
|
-
var
|
|
4783
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
3853
4784
|
function DashboardToolbar({ title, description, actions, className }) {
|
|
3854
|
-
return /* @__PURE__ */ (0,
|
|
3855
|
-
/* @__PURE__ */ (0,
|
|
3856
|
-
/* @__PURE__ */ (0,
|
|
3857
|
-
description ? /* @__PURE__ */ (0,
|
|
4785
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: cn("flex flex-wrap items-baseline justify-between gap-4", className), children: [
|
|
4786
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "min-w-0", children: [
|
|
4787
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)("h3", { className: "text-lg font-bold text-ph-ink", children: title }),
|
|
4788
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { className: "mt-0.5 text-sm text-ph-mutedtext", children: description }) : null
|
|
3858
4789
|
] }),
|
|
3859
|
-
actions != null ? /* @__PURE__ */ (0,
|
|
4790
|
+
actions != null ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "flex shrink-0 flex-wrap items-center gap-2", children: actions }) : null
|
|
3860
4791
|
] });
|
|
3861
4792
|
}
|
|
3862
4793
|
|
|
3863
4794
|
// src/components/dashboard/DashboardGrid.tsx
|
|
3864
|
-
var
|
|
4795
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
3865
4796
|
var presetClass = {
|
|
3866
4797
|
insights: "grid gap-4 md:grid-cols-2 xl:grid-cols-3",
|
|
3867
4798
|
dense: "grid gap-3 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4"
|
|
@@ -3874,14 +4805,14 @@ function DashboardGrid(_a) {
|
|
|
3874
4805
|
"preset",
|
|
3875
4806
|
"className"
|
|
3876
4807
|
]);
|
|
3877
|
-
return /* @__PURE__ */ (0,
|
|
4808
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", __spreadValues({ className: cn(presetClass[preset], className) }, props));
|
|
3878
4809
|
}
|
|
3879
4810
|
|
|
3880
4811
|
// src/components/dashboard/DashboardFiltersBar.tsx
|
|
3881
|
-
var
|
|
4812
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
3882
4813
|
function DashboardFiltersBar(_a) {
|
|
3883
4814
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
3884
|
-
return /* @__PURE__ */ (0,
|
|
4815
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
3885
4816
|
"div",
|
|
3886
4817
|
__spreadValues({
|
|
3887
4818
|
className: cn(
|
|
@@ -3894,20 +4825,20 @@ function DashboardFiltersBar(_a) {
|
|
|
3894
4825
|
}
|
|
3895
4826
|
|
|
3896
4827
|
// src/components/dashboard/DashboardKpiCard.tsx
|
|
3897
|
-
var
|
|
4828
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
3898
4829
|
function DashboardKpiCard(_a) {
|
|
3899
4830
|
var _b = _a, { label, value, footer, icon, className, children } = _b, props = __objRest(_b, ["label", "value", "footer", "icon", "className", "children"]);
|
|
3900
|
-
return /* @__PURE__ */ (0,
|
|
3901
|
-
icon != null ? /* @__PURE__ */ (0,
|
|
3902
|
-
/* @__PURE__ */ (0,
|
|
3903
|
-
/* @__PURE__ */ (0,
|
|
3904
|
-
footer != null ? /* @__PURE__ */ (0,
|
|
4831
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("article", __spreadProps(__spreadValues({ className: cn("ph-stat", className) }, props), { children: [
|
|
4832
|
+
icon != null ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "mb-2 [&>svg]:h-7 [&>svg]:w-7", children: icon }) : null,
|
|
4833
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "ph-stat-label", children: label }),
|
|
4834
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "ph-stat-val", children: value }),
|
|
4835
|
+
footer != null ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("p", { className: "mt-1 text-xs text-ph-subtle", children: footer }) : null,
|
|
3905
4836
|
children
|
|
3906
4837
|
] }));
|
|
3907
4838
|
}
|
|
3908
4839
|
|
|
3909
4840
|
// src/components/dashboard/DashboardInsightPlaceholder.tsx
|
|
3910
|
-
var
|
|
4841
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
3911
4842
|
function DashboardInsightPlaceholder(_a) {
|
|
3912
4843
|
var _b = _a, {
|
|
3913
4844
|
label = "Add insight",
|
|
@@ -3920,7 +4851,7 @@ function DashboardInsightPlaceholder(_a) {
|
|
|
3920
4851
|
"children",
|
|
3921
4852
|
"type"
|
|
3922
4853
|
]);
|
|
3923
|
-
return /* @__PURE__ */ (0,
|
|
4854
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
3924
4855
|
"button",
|
|
3925
4856
|
__spreadProps(__spreadValues({
|
|
3926
4857
|
type,
|
|
@@ -3931,13 +4862,13 @@ function DashboardInsightPlaceholder(_a) {
|
|
|
3931
4862
|
className
|
|
3932
4863
|
)
|
|
3933
4864
|
}, props), {
|
|
3934
|
-
children: children != null ? children : /* @__PURE__ */ (0,
|
|
4865
|
+
children: children != null ? children : /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: "font-medium text-ph-subtle group-hover:text-ph-ink", children: label })
|
|
3935
4866
|
})
|
|
3936
4867
|
);
|
|
3937
4868
|
}
|
|
3938
4869
|
|
|
3939
4870
|
// src/components/dashboard/InsightShell.tsx
|
|
3940
|
-
var
|
|
4871
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
3941
4872
|
function InsightShell(_a) {
|
|
3942
4873
|
var _b = _a, {
|
|
3943
4874
|
ribbonColour,
|
|
@@ -3951,8 +4882,8 @@ function InsightShell(_a) {
|
|
|
3951
4882
|
"children"
|
|
3952
4883
|
]);
|
|
3953
4884
|
const ribbon = ribbonColour != null && String(ribbonColour).trim() !== "" ? String(ribbonColour).trim() : null;
|
|
3954
|
-
return /* @__PURE__ */ (0,
|
|
3955
|
-
ribbon != null ? /* @__PURE__ */ (0,
|
|
4885
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("article", __spreadProps(__spreadValues({ className: cn("ph-insight-shell flex-row", className) }, props), { children: [
|
|
4886
|
+
ribbon != null ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
3956
4887
|
"div",
|
|
3957
4888
|
{
|
|
3958
4889
|
className: "ph-insight-shell__ribbon min-h-[7rem] shrink-0 self-stretch",
|
|
@@ -3960,24 +4891,24 @@ function InsightShell(_a) {
|
|
|
3960
4891
|
"aria-hidden": true
|
|
3961
4892
|
}
|
|
3962
4893
|
) : null,
|
|
3963
|
-
/* @__PURE__ */ (0,
|
|
4894
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: cn("flex min-w-0 flex-1 flex-col gap-3 p-4", bodyClassName), children })
|
|
3964
4895
|
] }));
|
|
3965
4896
|
}
|
|
3966
4897
|
|
|
3967
4898
|
// src/components/dashboard/InsightShellHeader.tsx
|
|
3968
|
-
var
|
|
4899
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
3969
4900
|
function InsightShellHeader({ title, subtitle, actions, className }) {
|
|
3970
|
-
return /* @__PURE__ */ (0,
|
|
3971
|
-
/* @__PURE__ */ (0,
|
|
3972
|
-
/* @__PURE__ */ (0,
|
|
3973
|
-
subtitle != null ? /* @__PURE__ */ (0,
|
|
4901
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("header", { className: cn("flex gap-3", actions != null ? "items-start justify-between" : "", className), children: [
|
|
4902
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "min-w-0 flex-1", children: [
|
|
4903
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("h4", { className: "font-semibold leading-snug text-ph-ink", children: title }),
|
|
4904
|
+
subtitle != null ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("p", { className: "mt-0.5 text-xs text-ph-mutedtext", children: subtitle }) : null
|
|
3974
4905
|
] }),
|
|
3975
|
-
actions != null ? /* @__PURE__ */ (0,
|
|
4906
|
+
actions != null ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "flex shrink-0 items-center gap-1", children: actions }) : null
|
|
3976
4907
|
] });
|
|
3977
4908
|
}
|
|
3978
4909
|
|
|
3979
4910
|
// src/components/dashboard/MiniTrendBars.tsx
|
|
3980
|
-
var
|
|
4911
|
+
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
3981
4912
|
var DEFAULT_SERIES_CYCLE = [1, 2, 3, 4, 5, 6, 7];
|
|
3982
4913
|
function clampPct(n) {
|
|
3983
4914
|
if (!Number.isFinite(n)) {
|
|
@@ -3995,7 +4926,7 @@ function MiniTrendBars({
|
|
|
3995
4926
|
var _a;
|
|
3996
4927
|
return (_a = DEFAULT_SERIES_CYCLE[i % DEFAULT_SERIES_CYCLE.length]) != null ? _a : 1;
|
|
3997
4928
|
});
|
|
3998
|
-
return /* @__PURE__ */ (0,
|
|
4929
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: cn("flex items-end gap-0.5", rowClassName, className), children: heights.map((raw, i) => {
|
|
3999
4930
|
const pct = clampPct(raw);
|
|
4000
4931
|
const series = resolveSeries(i, pct);
|
|
4001
4932
|
const style = {
|
|
@@ -4003,12 +4934,12 @@ function MiniTrendBars({
|
|
|
4003
4934
|
background: `var(--ph-data-${String(series)})`,
|
|
4004
4935
|
minHeight: pct > 0 ? 4 : 0
|
|
4005
4936
|
};
|
|
4006
|
-
return /* @__PURE__ */ (0,
|
|
4937
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "min-h-0 flex-1 rounded-t-[3px]", style }, `bar-${String(i)}`);
|
|
4007
4938
|
}) });
|
|
4008
4939
|
}
|
|
4009
4940
|
|
|
4010
4941
|
// src/components/dashboard/InsightMiniCard.tsx
|
|
4011
|
-
var
|
|
4942
|
+
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
4012
4943
|
function InsightMiniCard(_a) {
|
|
4013
4944
|
var _b = _a, {
|
|
4014
4945
|
title,
|
|
@@ -4021,21 +4952,25 @@ function InsightMiniCard(_a) {
|
|
|
4021
4952
|
"heights",
|
|
4022
4953
|
"ribbonColour"
|
|
4023
4954
|
]);
|
|
4024
|
-
return /* @__PURE__ */ (0,
|
|
4025
|
-
/* @__PURE__ */ (0,
|
|
4026
|
-
/* @__PURE__ */ (0,
|
|
4955
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(InsightShell, __spreadProps(__spreadValues({ ribbonColour }, shellProps), { children: [
|
|
4956
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(InsightShellHeader, { title, subtitle }),
|
|
4957
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(MiniTrendBars, { heights })
|
|
4027
4958
|
] }));
|
|
4028
4959
|
}
|
|
4029
4960
|
// Annotate the CommonJS export names for ESM import in node:
|
|
4030
4961
|
0 && (module.exports = {
|
|
4031
4962
|
Accordion,
|
|
4032
4963
|
Alert,
|
|
4964
|
+
AuthCard,
|
|
4965
|
+
AuthDivider,
|
|
4966
|
+
AuthLayout,
|
|
4033
4967
|
Avatar,
|
|
4034
4968
|
AvatarGroup,
|
|
4035
4969
|
Badge,
|
|
4036
4970
|
Breadcrumbs,
|
|
4037
4971
|
Button,
|
|
4038
4972
|
ButtonChrome,
|
|
4973
|
+
CANONICAL_ICONS,
|
|
4039
4974
|
Calendar,
|
|
4040
4975
|
Caption,
|
|
4041
4976
|
Card,
|
|
@@ -4057,9 +4992,15 @@ function InsightMiniCard(_a) {
|
|
|
4057
4992
|
DropdownButton,
|
|
4058
4993
|
DropdownItem,
|
|
4059
4994
|
DropdownMenu,
|
|
4995
|
+
DropdownRadioGroup,
|
|
4996
|
+
DropdownRadioItem,
|
|
4060
4997
|
EmptyState,
|
|
4061
4998
|
FileUpload,
|
|
4999
|
+
FilterBar,
|
|
4062
5000
|
FilterChips,
|
|
5001
|
+
FilterControls,
|
|
5002
|
+
FilterMenu,
|
|
5003
|
+
FormField,
|
|
4063
5004
|
H1,
|
|
4064
5005
|
H2,
|
|
4065
5006
|
H3,
|
|
@@ -4086,14 +5027,20 @@ function InsightMiniCard(_a) {
|
|
|
4086
5027
|
IconChevronRight,
|
|
4087
5028
|
IconClipboardEdit,
|
|
4088
5029
|
IconClose,
|
|
5030
|
+
IconCodePreview,
|
|
4089
5031
|
IconCohort,
|
|
5032
|
+
IconCommandCursor,
|
|
4090
5033
|
IconCopy,
|
|
4091
5034
|
IconCumulativeChart,
|
|
5035
|
+
IconDataReel,
|
|
4092
5036
|
IconDatabase,
|
|
4093
5037
|
IconDownload,
|
|
4094
5038
|
IconEdit,
|
|
4095
5039
|
IconErrorOutline,
|
|
5040
|
+
IconEventStream,
|
|
4096
5041
|
IconExclamation,
|
|
5042
|
+
IconExperimentSplit,
|
|
5043
|
+
IconFeatureGate,
|
|
4097
5044
|
IconFlag,
|
|
4098
5045
|
IconFlare,
|
|
4099
5046
|
IconFlask,
|
|
@@ -4101,19 +5048,24 @@ function InsightMiniCard(_a) {
|
|
|
4101
5048
|
IconGridView,
|
|
4102
5049
|
IconHandClick,
|
|
4103
5050
|
IconHome,
|
|
5051
|
+
IconInfo,
|
|
5052
|
+
IconInsightBoard,
|
|
4104
5053
|
IconLayers,
|
|
4105
5054
|
IconListView,
|
|
4106
5055
|
IconLogout,
|
|
4107
5056
|
IconMail,
|
|
4108
5057
|
IconMoon,
|
|
5058
|
+
IconOldWindow,
|
|
4109
5059
|
IconPanelRight,
|
|
4110
5060
|
IconPerson,
|
|
4111
5061
|
IconPlayCircle,
|
|
4112
5062
|
IconPlus,
|
|
4113
5063
|
IconPremium,
|
|
4114
5064
|
IconQueryEditor,
|
|
5065
|
+
IconQueryStack,
|
|
4115
5066
|
IconRadar,
|
|
4116
5067
|
IconRecording,
|
|
5068
|
+
IconReplayFrame,
|
|
4117
5069
|
IconRobot,
|
|
4118
5070
|
IconRocket,
|
|
4119
5071
|
IconSave,
|
|
@@ -4124,6 +5076,7 @@ function InsightMiniCard(_a) {
|
|
|
4124
5076
|
IconStar,
|
|
4125
5077
|
IconSubArrowRight,
|
|
4126
5078
|
IconSun,
|
|
5079
|
+
IconSurveyCard,
|
|
4127
5080
|
IconSurveys,
|
|
4128
5081
|
IconSync,
|
|
4129
5082
|
IconTableChart,
|
|
@@ -4147,12 +5100,16 @@ function InsightMiniCard(_a) {
|
|
|
4147
5100
|
Kbd,
|
|
4148
5101
|
Label,
|
|
4149
5102
|
Lead,
|
|
5103
|
+
Loader,
|
|
5104
|
+
LoadingState,
|
|
4150
5105
|
MiniTrendBars,
|
|
4151
5106
|
Modal,
|
|
4152
5107
|
Mono,
|
|
5108
|
+
OLD_UI_ICONS,
|
|
4153
5109
|
Overline,
|
|
4154
5110
|
P,
|
|
4155
5111
|
PH_ICONS,
|
|
5112
|
+
PH_ICON_ALIASES,
|
|
4156
5113
|
Pagination,
|
|
4157
5114
|
Panel,
|
|
4158
5115
|
Progress,
|
|
@@ -4163,8 +5120,12 @@ function InsightMiniCard(_a) {
|
|
|
4163
5120
|
SearchInput,
|
|
4164
5121
|
SegmentedControl,
|
|
4165
5122
|
Select,
|
|
5123
|
+
SettingsLayout,
|
|
5124
|
+
SettingsNav,
|
|
4166
5125
|
ShowcaseWrapper,
|
|
5126
|
+
Skeleton,
|
|
4167
5127
|
Small,
|
|
5128
|
+
SortMenu,
|
|
4168
5129
|
Stat,
|
|
4169
5130
|
Stepper,
|
|
4170
5131
|
THEMES,
|