@xenide-io/the-old-ui-theme 0.2.6 → 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-FDMD3IIN.mjs +3831 -0
- package/dist/index-D1RTT2Ap.d.mts +1044 -0
- package/dist/index-D1RTT2Ap.d.ts +1044 -0
- package/dist/index.d.mts +11 -758
- package/dist/index.d.ts +11 -758
- package/dist/index.js +1749 -768
- package/dist/index.mjs +312 -2846
- package/dist/tailwind-preset.js +7 -0
- package/dist/tailwind-preset.mjs +7 -0
- package/dist/ui.d.mts +4 -0
- package/dist/ui.d.ts +4 -0
- package/dist/ui.js +3864 -0
- package/dist/ui.mjs +169 -0
- package/package.json +28 -6
- package/src/app/globals.css +1005 -227
- package/src/components/charts/index.ts +8 -0
- package/src/components/charts/ph-insight-charts.tsx +162 -0
- package/src/components/dashboard/DashboardFiltersBar.tsx +19 -0
- package/src/components/dashboard/DashboardGrid.tsx +23 -0
- package/src/components/dashboard/DashboardInsightPlaceholder.tsx +37 -0
- package/src/components/dashboard/DashboardKpiCard.tsx +25 -0
- package/src/components/dashboard/DashboardToolbar.tsx +23 -0
- package/src/components/dashboard/DashboardWell.tsx +10 -0
- package/src/components/dashboard/InsightMiniCard.tsx +26 -0
- package/src/components/dashboard/InsightShell.tsx +37 -0
- package/src/components/dashboard/InsightShellHeader.tsx +22 -0
- package/src/components/dashboard/MiniTrendBars.tsx +51 -0
- package/src/components/dashboard/index.ts +31 -0
- package/src/components/dashboard/types.ts +9 -0
- package/src/components/icons/IconBase.tsx +47 -0
- package/src/components/icons/createIconBase.tsx +32 -0
- package/src/components/icons/icons.tsx +557 -0
- package/src/components/icons/index.ts +3 -0
- package/src/components/sections/AccordionShowcase.tsx +45 -0
- package/src/components/sections/AlertShowcase.tsx +40 -0
- package/src/components/sections/AvatarShowcase.tsx +80 -0
- package/src/components/sections/BadgeShowcase.tsx +65 -0
- package/src/components/sections/ButtonShowcase.tsx +308 -0
- package/src/components/sections/CalendarShowcase.tsx +35 -0
- package/src/components/sections/CardShowcase.tsx +159 -0
- package/src/components/sections/ChartShowcase.tsx +190 -0
- package/src/components/sections/CodeMockupShowcase.tsx +56 -0
- package/src/components/sections/ColorPalette.tsx +117 -0
- package/src/components/sections/CommandPaletteShowcase.tsx +48 -0
- package/src/components/sections/CountdownShowcase.tsx +43 -0
- package/src/components/sections/DashboardShowcase.tsx +191 -0
- package/src/components/sections/DiffShowcase.tsx +70 -0
- package/src/components/sections/DrawerShowcase.tsx +97 -0
- package/src/components/sections/DropdownShowcase.tsx +98 -0
- package/src/components/sections/EmptyStateShowcase.tsx +50 -0
- package/src/components/sections/FilterChipsShowcase.tsx +98 -0
- package/src/components/sections/FormShowcase.tsx +127 -0
- package/src/components/sections/HoverCardShowcase.tsx +50 -0
- package/src/components/sections/IconShowcase.tsx +127 -0
- package/src/components/sections/IndicatorShowcase.tsx +52 -0
- package/src/components/sections/KbdShowcase.tsx +57 -0
- package/src/components/sections/ModalShowcase.tsx +211 -0
- package/src/components/sections/NavigationShowcase.tsx +199 -0
- package/src/components/sections/ProductLayoutsShowcase.tsx +138 -0
- package/src/components/sections/ProgressShowcase.tsx +82 -0
- package/src/components/sections/SegmentedControlShowcase.tsx +49 -0
- package/src/components/sections/SetupThemeShowcase.tsx +262 -0
- package/src/components/sections/StackShowcase.tsx +33 -0
- package/src/components/sections/StatShowcase.tsx +129 -0
- package/src/components/sections/StepperShowcase.tsx +37 -0
- package/src/components/sections/SwapShowcase.tsx +99 -0
- package/src/components/sections/TabShowcase.tsx +84 -0
- package/src/components/sections/TableShowcase.tsx +140 -0
- package/src/components/sections/TimelineShowcase.tsx +83 -0
- package/src/components/sections/ToastShowcase.tsx +108 -0
- package/src/components/sections/TooltipShowcase.tsx +44 -0
- package/src/components/sections/UtilityShowcase.tsx +81 -0
- package/src/components/ui/Accordion.tsx +77 -0
- package/src/components/ui/Alert.tsx +77 -0
- package/src/components/ui/AuthLayout.tsx +58 -0
- package/src/components/ui/Avatar.tsx +97 -0
- package/src/components/ui/Badge.tsx +60 -0
- package/src/components/ui/Button.tsx +120 -0
- package/src/components/ui/ButtonChrome.tsx +20 -0
- package/src/components/ui/Calendar.tsx +115 -0
- package/src/components/ui/Card.tsx +70 -0
- package/src/components/ui/ChatBubble.tsx +71 -0
- package/src/components/ui/CodeBlock.tsx +48 -0
- package/src/components/ui/CollapsibleSection.tsx +49 -0
- package/src/components/ui/CommandPalette.tsx +137 -0
- package/src/components/ui/ComponentDocs.tsx +52 -0
- package/src/components/ui/Drawer.tsx +71 -0
- package/src/components/ui/DropdownMenu.tsx +262 -0
- package/src/components/ui/EmptyState.tsx +33 -0
- package/src/components/ui/FilterBar.tsx +165 -0
- package/src/components/ui/FilterChips.tsx +80 -0
- package/src/components/ui/FilterControls.tsx +30 -0
- package/src/components/ui/FormField.tsx +69 -0
- package/src/components/ui/HoverCard.tsx +36 -0
- package/src/components/ui/Indicator.tsx +61 -0
- package/src/components/ui/Input.tsx +385 -0
- package/src/components/ui/Kbd.tsx +113 -0
- package/src/components/ui/Loader.tsx +96 -0
- package/src/components/ui/Modal.tsx +105 -0
- package/src/components/ui/Navigation.tsx +94 -0
- package/src/components/ui/Panel.tsx +18 -0
- package/src/components/ui/Progress.tsx +59 -0
- package/src/components/ui/Rating.tsx +65 -0
- package/src/components/ui/SearchInput.tsx +106 -0
- package/src/components/ui/SegmentedControl.tsx +44 -0
- package/src/components/ui/SettingsLayout.tsx +94 -0
- package/src/components/ui/ShowcaseWrapper.tsx +124 -0
- package/src/components/ui/Stat.tsx +39 -0
- package/src/components/ui/Stepper.tsx +74 -0
- package/src/components/ui/Table.tsx +55 -0
- package/src/components/ui/Tabs.tsx +53 -0
- package/src/components/ui/Terminal.tsx +54 -0
- package/src/components/ui/ThemeDomSync.tsx +17 -0
- package/src/components/ui/ThemeManager.tsx +18 -0
- package/src/components/ui/ThemeSwitcher.tsx +46 -0
- package/src/components/ui/Timeline.tsx +60 -0
- package/src/components/ui/Toast.tsx +70 -0
- package/src/components/ui/Typography.tsx +129 -0
- package/src/components/ui/first-slice.test.tsx +98 -0
- package/src/components/ui/index.ts +151 -0
- 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 +528 -0
- package/tailwind-preset.ts +7 -0
package/dist/ui.js
ADDED
|
@@ -0,0 +1,3864 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __defProps = Object.defineProperties;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
7
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
9
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
10
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
11
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
12
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
13
|
+
var __spreadValues = (a, b) => {
|
|
14
|
+
for (var prop in b || (b = {}))
|
|
15
|
+
if (__hasOwnProp.call(b, prop))
|
|
16
|
+
__defNormalProp(a, prop, b[prop]);
|
|
17
|
+
if (__getOwnPropSymbols)
|
|
18
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
19
|
+
if (__propIsEnum.call(b, prop))
|
|
20
|
+
__defNormalProp(a, prop, b[prop]);
|
|
21
|
+
}
|
|
22
|
+
return a;
|
|
23
|
+
};
|
|
24
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
25
|
+
var __objRest = (source, exclude) => {
|
|
26
|
+
var target = {};
|
|
27
|
+
for (var prop in source)
|
|
28
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
29
|
+
target[prop] = source[prop];
|
|
30
|
+
if (source != null && __getOwnPropSymbols)
|
|
31
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
32
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
33
|
+
target[prop] = source[prop];
|
|
34
|
+
}
|
|
35
|
+
return target;
|
|
36
|
+
};
|
|
37
|
+
var __export = (target, all) => {
|
|
38
|
+
for (var name in all)
|
|
39
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
40
|
+
};
|
|
41
|
+
var __copyProps = (to, from, except, desc) => {
|
|
42
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
43
|
+
for (let key of __getOwnPropNames(from))
|
|
44
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
45
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
46
|
+
}
|
|
47
|
+
return to;
|
|
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
|
+
));
|
|
57
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
58
|
+
|
|
59
|
+
// src/components/ui/index.ts
|
|
60
|
+
var ui_exports = {};
|
|
61
|
+
__export(ui_exports, {
|
|
62
|
+
Accordion: () => Accordion,
|
|
63
|
+
Alert: () => Alert,
|
|
64
|
+
AuthCard: () => AuthCard,
|
|
65
|
+
AuthDivider: () => AuthDivider,
|
|
66
|
+
AuthLayout: () => AuthLayout,
|
|
67
|
+
Avatar: () => Avatar,
|
|
68
|
+
AvatarGroup: () => AvatarGroup,
|
|
69
|
+
Badge: () => Badge,
|
|
70
|
+
Breadcrumbs: () => Breadcrumbs,
|
|
71
|
+
Button: () => Button,
|
|
72
|
+
ButtonChrome: () => ButtonChrome,
|
|
73
|
+
Calendar: () => Calendar,
|
|
74
|
+
Caption: () => Caption,
|
|
75
|
+
Card: () => Card,
|
|
76
|
+
ChatBubble: () => ChatBubble,
|
|
77
|
+
Checkbox: () => Checkbox,
|
|
78
|
+
CodeBlock: () => CodeBlock,
|
|
79
|
+
CollapsibleSection: () => CollapsibleSection,
|
|
80
|
+
CommandPalette: () => CommandPalette,
|
|
81
|
+
ComponentDocs: () => ComponentDocs,
|
|
82
|
+
Display: () => Display,
|
|
83
|
+
Drawer: () => Drawer,
|
|
84
|
+
DropdownButton: () => DropdownButton,
|
|
85
|
+
DropdownItem: () => DropdownItem,
|
|
86
|
+
DropdownMenu: () => DropdownMenu,
|
|
87
|
+
DropdownRadioGroup: () => DropdownRadioGroup,
|
|
88
|
+
DropdownRadioItem: () => DropdownRadioItem,
|
|
89
|
+
EmptyState: () => EmptyState,
|
|
90
|
+
FileUpload: () => FileUpload,
|
|
91
|
+
FilterBar: () => FilterBar,
|
|
92
|
+
FilterChips: () => FilterChips,
|
|
93
|
+
FilterControls: () => FilterControls,
|
|
94
|
+
FilterMenu: () => FilterMenu,
|
|
95
|
+
FormField: () => FormField,
|
|
96
|
+
H1: () => H1,
|
|
97
|
+
H2: () => H2,
|
|
98
|
+
H3: () => H3,
|
|
99
|
+
H4: () => H4,
|
|
100
|
+
H5: () => H5,
|
|
101
|
+
HoverCard: () => HoverCard,
|
|
102
|
+
Icon: () => IconBase,
|
|
103
|
+
IconByName: () => IconByName,
|
|
104
|
+
Indicator: () => Indicator,
|
|
105
|
+
Input: () => Input,
|
|
106
|
+
Kbd: () => Kbd,
|
|
107
|
+
Label: () => Label,
|
|
108
|
+
Lead: () => Lead,
|
|
109
|
+
Loader: () => Loader,
|
|
110
|
+
LoadingState: () => LoadingState,
|
|
111
|
+
Modal: () => Modal,
|
|
112
|
+
Mono: () => Mono,
|
|
113
|
+
Overline: () => Overline,
|
|
114
|
+
P: () => P,
|
|
115
|
+
Pagination: () => Pagination,
|
|
116
|
+
Panel: () => Panel,
|
|
117
|
+
Progress: () => Progress,
|
|
118
|
+
Radio: () => Radio,
|
|
119
|
+
Range: () => Range,
|
|
120
|
+
Rating: () => Rating,
|
|
121
|
+
SearchGroup: () => SearchGroup,
|
|
122
|
+
SearchInput: () => SearchInput,
|
|
123
|
+
SegmentedControl: () => SegmentedControl,
|
|
124
|
+
Select: () => Select,
|
|
125
|
+
SettingsLayout: () => SettingsLayout,
|
|
126
|
+
SettingsNav: () => SettingsNav,
|
|
127
|
+
ShowcaseWrapper: () => ShowcaseWrapper,
|
|
128
|
+
Skeleton: () => Skeleton,
|
|
129
|
+
Small: () => Small,
|
|
130
|
+
SortMenu: () => SortMenu,
|
|
131
|
+
Stat: () => Stat,
|
|
132
|
+
Stepper: () => Stepper,
|
|
133
|
+
Table: () => Table,
|
|
134
|
+
Tabs: () => Tabs,
|
|
135
|
+
Terminal: () => Terminal,
|
|
136
|
+
Textarea: () => Textarea,
|
|
137
|
+
ThemeDomSync: () => ThemeDomSync,
|
|
138
|
+
ThemeManager: () => ThemeManager,
|
|
139
|
+
ThemeSwitcher: () => ThemeSwitcher,
|
|
140
|
+
Timeline: () => Timeline,
|
|
141
|
+
Toast: () => Toast,
|
|
142
|
+
ToastStack: () => ToastStack,
|
|
143
|
+
Toggle: () => Toggle
|
|
144
|
+
});
|
|
145
|
+
module.exports = __toCommonJS(ui_exports);
|
|
146
|
+
|
|
147
|
+
// src/components/ui/Button.tsx
|
|
148
|
+
var import_react = require("react");
|
|
149
|
+
|
|
150
|
+
// src/components/ui/ButtonChrome.tsx
|
|
151
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
152
|
+
function ButtonChrome({ label, icon, sideIcon, split }) {
|
|
153
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "ph-btn-chrome", children: [
|
|
154
|
+
icon != null ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "ph-btn-icon", children: icon }) : null,
|
|
155
|
+
label != null ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "ph-btn-label", children: label }) : null,
|
|
156
|
+
split ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "ph-btn-split-divider", "aria-hidden": true }) : null,
|
|
157
|
+
sideIcon != null ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "ph-btn-side-icon", children: sideIcon }) : null
|
|
158
|
+
] });
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
// src/lib/cn.ts
|
|
162
|
+
function cn(...parts) {
|
|
163
|
+
return parts.filter(Boolean).join(" ");
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
// src/components/ui/Button.tsx
|
|
167
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
168
|
+
var variantClass = {
|
|
169
|
+
primary: "ph-btn-primary",
|
|
170
|
+
secondary: "ph-btn-secondary",
|
|
171
|
+
tertiary: "ph-btn-tertiary",
|
|
172
|
+
signal: "ph-btn-signal",
|
|
173
|
+
accent: "ph-btn-accent",
|
|
174
|
+
neutral: "ph-btn-neutral",
|
|
175
|
+
info: "ph-btn-info",
|
|
176
|
+
success: "ph-btn-success",
|
|
177
|
+
warning: "ph-btn-warning",
|
|
178
|
+
danger: "ph-btn-danger",
|
|
179
|
+
ghost: "ph-btn-ghost",
|
|
180
|
+
link: "ph-btn-link"
|
|
181
|
+
};
|
|
182
|
+
var sizeClass = {
|
|
183
|
+
xs: "ph-btn-xs",
|
|
184
|
+
sm: "ph-btn-sm",
|
|
185
|
+
md: "",
|
|
186
|
+
lg: "ph-btn-lg"
|
|
187
|
+
};
|
|
188
|
+
var shapeClass = {
|
|
189
|
+
default: "",
|
|
190
|
+
circle: "ph-btn-circle",
|
|
191
|
+
square: "ph-btn-square",
|
|
192
|
+
wide: "ph-btn-wide"
|
|
193
|
+
};
|
|
194
|
+
var Button = (0, import_react.forwardRef)(function Button2(_a, ref) {
|
|
195
|
+
var _b = _a, {
|
|
196
|
+
variant = "secondary",
|
|
197
|
+
size = "md",
|
|
198
|
+
shape = "default",
|
|
199
|
+
outline = false,
|
|
200
|
+
split = false,
|
|
201
|
+
icon,
|
|
202
|
+
sideIcon,
|
|
203
|
+
loading = false,
|
|
204
|
+
loadingLabel,
|
|
205
|
+
className,
|
|
206
|
+
children,
|
|
207
|
+
type = "button",
|
|
208
|
+
disabled
|
|
209
|
+
} = _b, props = __objRest(_b, [
|
|
210
|
+
"variant",
|
|
211
|
+
"size",
|
|
212
|
+
"shape",
|
|
213
|
+
"outline",
|
|
214
|
+
"split",
|
|
215
|
+
"icon",
|
|
216
|
+
"sideIcon",
|
|
217
|
+
"loading",
|
|
218
|
+
"loadingLabel",
|
|
219
|
+
"className",
|
|
220
|
+
"children",
|
|
221
|
+
"type",
|
|
222
|
+
"disabled"
|
|
223
|
+
]);
|
|
224
|
+
const usesLemonChrome = !["tertiary", "ghost", "link"].includes(variant);
|
|
225
|
+
const label = loadingLabel != null ? loadingLabel : children;
|
|
226
|
+
const leadingIcon = loading ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "ph-btn-spinner", "aria-hidden": true }) : icon;
|
|
227
|
+
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: [
|
|
228
|
+
leadingIcon != null ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "ph-btn-icon", children: leadingIcon }) : null,
|
|
229
|
+
label != null ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "ph-btn-label", children: label }) : null,
|
|
230
|
+
split ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "ph-btn-split-divider", "aria-hidden": true }) : null,
|
|
231
|
+
sideIcon != null ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: "ph-btn-side-icon", children: sideIcon }) : null
|
|
232
|
+
] });
|
|
233
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
234
|
+
"button",
|
|
235
|
+
__spreadProps(__spreadValues({
|
|
236
|
+
ref,
|
|
237
|
+
type,
|
|
238
|
+
disabled: disabled || loading,
|
|
239
|
+
"aria-busy": loading || void 0,
|
|
240
|
+
className: cn(
|
|
241
|
+
"ph-btn",
|
|
242
|
+
usesLemonChrome && "ph-btn-raised",
|
|
243
|
+
outline && "ph-btn-outline",
|
|
244
|
+
variantClass[variant],
|
|
245
|
+
sizeClass[size],
|
|
246
|
+
shapeClass[shape],
|
|
247
|
+
split && "ph-btn-split",
|
|
248
|
+
className
|
|
249
|
+
)
|
|
250
|
+
}, props), {
|
|
251
|
+
children: content
|
|
252
|
+
})
|
|
253
|
+
);
|
|
254
|
+
});
|
|
255
|
+
Button.displayName = "Button";
|
|
256
|
+
|
|
257
|
+
// src/components/ui/Alert.tsx
|
|
258
|
+
var import_react5 = require("react");
|
|
259
|
+
|
|
260
|
+
// src/components/icons/IconBase.tsx
|
|
261
|
+
var import_react2 = require("react");
|
|
262
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
263
|
+
var IconBase = (0, import_react2.forwardRef)(function IconBase2(_a, ref) {
|
|
264
|
+
var _b = _a, {
|
|
265
|
+
className,
|
|
266
|
+
size,
|
|
267
|
+
children,
|
|
268
|
+
viewBox = "0 0 24 24",
|
|
269
|
+
fill: fill2 = "none",
|
|
270
|
+
xmlns = "http://www.w3.org/2000/svg",
|
|
271
|
+
focusable = "false",
|
|
272
|
+
style,
|
|
273
|
+
role,
|
|
274
|
+
"aria-hidden": ariaHidden,
|
|
275
|
+
"aria-label": ariaLabel,
|
|
276
|
+
"aria-labelledby": ariaLabelledBy
|
|
277
|
+
} = _b, props = __objRest(_b, [
|
|
278
|
+
"className",
|
|
279
|
+
"size",
|
|
280
|
+
"children",
|
|
281
|
+
"viewBox",
|
|
282
|
+
"fill",
|
|
283
|
+
"xmlns",
|
|
284
|
+
"focusable",
|
|
285
|
+
"style",
|
|
286
|
+
"role",
|
|
287
|
+
"aria-hidden",
|
|
288
|
+
"aria-label",
|
|
289
|
+
"aria-labelledby"
|
|
290
|
+
]);
|
|
291
|
+
const hasAccessibleName = Boolean(ariaLabel || ariaLabelledBy);
|
|
292
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
293
|
+
"svg",
|
|
294
|
+
__spreadProps(__spreadValues({
|
|
295
|
+
ref,
|
|
296
|
+
className: cn("ph-icon", className),
|
|
297
|
+
viewBox,
|
|
298
|
+
fill: fill2,
|
|
299
|
+
xmlns,
|
|
300
|
+
focusable,
|
|
301
|
+
role: role != null ? role : hasAccessibleName ? "img" : void 0,
|
|
302
|
+
"aria-hidden": ariaHidden != null ? ariaHidden : hasAccessibleName ? void 0 : true,
|
|
303
|
+
"aria-label": ariaLabel,
|
|
304
|
+
"aria-labelledby": ariaLabelledBy,
|
|
305
|
+
style: __spreadValues({ width: size, height: size }, style)
|
|
306
|
+
}, props), {
|
|
307
|
+
children
|
|
308
|
+
})
|
|
309
|
+
);
|
|
310
|
+
});
|
|
311
|
+
IconBase.displayName = "IconBase";
|
|
312
|
+
|
|
313
|
+
// src/components/icons/createIconBase.tsx
|
|
314
|
+
var import_react3 = require("react");
|
|
315
|
+
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
316
|
+
function createIconBase({ name = "IconGlyph", viewBox = "0 0 24 24", paths }) {
|
|
317
|
+
const IconGlyph = (0, import_react3.forwardRef)(function IconGlyph2(props, ref) {
|
|
318
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(IconBase, __spreadProps(__spreadValues({ ref, viewBox }, props), { children: paths }));
|
|
319
|
+
});
|
|
320
|
+
IconGlyph.displayName = name;
|
|
321
|
+
return IconGlyph;
|
|
322
|
+
}
|
|
323
|
+
function createIconBasePath(d, viewBox = "0 0 24 24", name) {
|
|
324
|
+
return createIconBase({
|
|
325
|
+
name,
|
|
326
|
+
viewBox,
|
|
327
|
+
paths: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("path", { d, fill: "currentColor" })
|
|
328
|
+
});
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
// src/components/icons/icons.tsx
|
|
332
|
+
var import_react4 = require("react");
|
|
333
|
+
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
334
|
+
var fill = (d) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d, fill: "currentColor" });
|
|
335
|
+
var IconAreaChart = createIconBase({
|
|
336
|
+
paths: fill("M3 20V7l4 3 5-7 5 4h4v13Zm5-3 4-5.5 7 5.45V9h-2.7l-3.9-3.125-4.95 6.95L5 11v3.6Z")
|
|
337
|
+
});
|
|
338
|
+
var IconCumulativeChart = createIconBase({
|
|
339
|
+
paths: fill(
|
|
340
|
+
"M20.8805 7.97408C15.0614 18.7809 6.51281 19.5979 2.71265 18.4578L3.28734 16.5422C6.15384 17.4021 13.7386 17.0191 19.1195 7.02588L20.8805 7.97408Z"
|
|
341
|
+
)
|
|
342
|
+
});
|
|
343
|
+
var IconTableChart = createIconBase({
|
|
344
|
+
paths: fill(
|
|
345
|
+
"M20 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h15c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 2v3H5V5h15zm-5 14h-5v-9h5v9zM5 10h3v9H5v-9zm12 9v-9h3v9h-3z"
|
|
346
|
+
)
|
|
347
|
+
});
|
|
348
|
+
var IconHandClick = createIconBase({
|
|
349
|
+
viewBox: "0 0 18 18",
|
|
350
|
+
paths: fill(
|
|
351
|
+
"M14.9942 7.90164C14.9942 7.82992 14.9583 7.46993 14.6342 7.10993C14.2925 6.71407 13.7524 6.49822 13.05 6.44407C12.9783 6.33579 12.8883 6.22822 12.7442 6.11993C12.3483 5.81407 11.7359 5.65164 10.9442 5.63407C10.8724 5.54407 10.7459 5.43578 10.6024 5.32822C10.2425 5.0765 9.79245 4.93236 9.23416 4.87822V3.41993C9.23416 3.27579 9.25244 2.66407 8.83831 2.23164C8.65831 2.03335 8.31659 1.79993 7.74002 1.79993C7.14587 1.79993 6.80416 2.03407 6.60587 2.23164C6.22759 2.64578 6.22759 3.18578 6.22759 3.31164V8.46C5.88587 8.1 5.50759 7.70414 5.29173 7.56C4.84173 7.21829 3.99587 7.39828 3.51002 7.75829C3.04173 8.1 2.88002 8.62243 3.06002 9.12658C3.38416 10.0266 4.19416 10.9266 4.39173 11.1424C4.57173 11.4841 5.38173 12.9782 6.10173 13.5182C6.48002 13.8065 6.76759 14.9941 6.84002 15.7499L6.87588 16.1457H13.6801V14.364C13.7701 14.1123 13.9859 13.5723 14.2201 13.3199C14.7783 12.7616 14.9583 11.3582 14.9583 10.9257V7.91986L14.9942 7.90164ZM14.1117 10.89C14.1117 11.4117 13.8959 12.4017 13.6259 12.6717C13.1576 13.14 12.87 14.04 12.8517 14.13L12.8335 14.1841V15.2283H7.68583C7.64997 15.03 7.61411 14.7783 7.54169 14.5083C7.32583 13.6441 7.03754 13.0866 6.65998 12.7983C6.13826 12.4024 5.39998 11.1241 5.16583 10.6566L5.09411 10.5484C5.09411 10.5301 4.2124 9.63008 3.90582 8.80251C3.86996 8.69423 3.86996 8.60422 3.99582 8.47836C4.22997 8.26251 4.67997 8.20836 4.78754 8.24422C5.05754 8.46008 5.88582 9.34251 6.35339 9.86422L7.12754 10.7284L7.12824 3.29418V3.25762C7.12824 3.1859 7.14652 2.95176 7.27238 2.82591C7.36238 2.71763 7.52409 2.66419 7.75824 2.66419C7.95652 2.66419 8.09995 2.71833 8.20824 2.80833C8.35238 2.97005 8.36996 3.25833 8.36996 3.36662V8.02826H9.25167V5.7599C10.0617 5.8499 10.2958 6.19161 10.3317 6.24575L10.3675 6.33575V8.02747H11.2492V6.53332C12.0051 6.60504 12.2934 6.83918 12.3651 6.94747V8.65747H13.2468V7.34332C14.021 7.4516 14.1468 7.86504 14.1651 7.95504L14.1658 10.8899L14.1117 10.89Z"
|
|
352
|
+
)
|
|
353
|
+
});
|
|
354
|
+
var IconSurveys = createIconBase({
|
|
355
|
+
paths: fill(
|
|
356
|
+
"M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm0 14H5.17l-.59.59-.58.58V4h16v12zm-9.5-2H18v-2h-5.5zm3.86-5.87c.2-.2.2-.51 0-.71l-1.77-1.77c-.2-.2-.51-.2-.71 0L6 11.53V14h2.47l5.89-5.87z"
|
|
357
|
+
)
|
|
358
|
+
});
|
|
359
|
+
var IconCohort = createIconBase({
|
|
360
|
+
paths: fill(
|
|
361
|
+
"m4 13c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm1.13 1.1c-.37-.06-.74-.1-1.13-.1-.99 0-1.93.21-2.78.58-.74.32-1.22 1.04-1.22 1.85v1.57h4.5v-1.61c0-.83.23-1.61.63-2.29zm14.87-1.1c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm4 3.43c0-.81-.48-1.53-1.22-1.85-.85-.37-1.79-.58-2.78-.58-.39 0-.76.04-1.13.1.4.68.63 1.46.63 2.29v1.61h4.5zm-7.76-2.78c-1.17-.52-2.61-.9-4.24-.9s-3.07.39-4.24.9c-1.08.48-1.76 1.56-1.76 2.74v1.61h12v-1.61c0-1.18-.68-2.26-1.76-2.74zm-8.17 2.35c.09-.23.13-.39.91-.69.97-.38 1.99-.56 3.02-.56s2.05.18 3.02.56c.77.3.81.46.91.69zm3.93-8c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm0-2c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z"
|
|
362
|
+
)
|
|
363
|
+
});
|
|
364
|
+
var IconRecording = createIconBase({
|
|
365
|
+
paths: fill(
|
|
366
|
+
"m10 8v8l5-4zm9-5h-14c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-14c0-1.1-.9-2-2-2zm0 16h-14v-14h14z"
|
|
367
|
+
)
|
|
368
|
+
});
|
|
369
|
+
var IconFlare = createIconBase({
|
|
370
|
+
paths: fill(
|
|
371
|
+
"m7 11h-6v2h6zm2.17-3.24-2.12-2.12-1.41 1.41 2.12 2.12zm3.83-6.76h-2v6h2zm5.36 6.05-1.41-1.41-2.12 2.12 1.41 1.41zm-1.36 3.95v2h6v-2zm-5-2c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3zm2.83 7.24 2.12 2.12 1.41-1.41-2.12-2.12zm-9.19.71 1.41 1.41 2.12-2.12-1.41-1.41zm5.36 6.05h2v-6h-2z"
|
|
372
|
+
)
|
|
373
|
+
});
|
|
374
|
+
var IconSelectEvents = createIconBase({
|
|
375
|
+
paths: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
|
|
376
|
+
fill("M17.5 9L16.56 6.94L14.5 6L16.56 5.06L17.5 3L18.44 5.06L20.5 6L18.44 6.94L17.5 9Z"),
|
|
377
|
+
fill("M6 12.5L6.94 14.56L9 15.5L6.94 16.44L6 18.5L5.06 16.44L3 15.5L5.06 14.56L6 12.5Z"),
|
|
378
|
+
fill("M6 9L5.06 6.94L3 6L5.06 5.06L6 3L6.94 5.06L9 6L6.94 6.94L6 9Z"),
|
|
379
|
+
fill("M16.23 14.26L20 13L10 10L13 20L14.26 16.23L18.53 20.5L20.51 18.52L16.23 14.26Z")
|
|
380
|
+
] })
|
|
381
|
+
});
|
|
382
|
+
var IconClipboardEdit = createIconBase({
|
|
383
|
+
paths: fill(
|
|
384
|
+
"M21.04 12.13C21.18 12.13 21.31 12.19 21.42 12.3L22.7 13.58C22.92 13.79 22.92 14.14 22.7 14.35L21.7 15.35L19.65 13.3L20.65 12.3C20.76 12.19 20.9 12.13 21.04 12.13M19.07 13.88L21.12 15.93L15.06 22H13V19.94L19.07 13.88M11 19L9 21H5C3.9 21 3 20.1 3 19V5C3 3.9 3.9 3 5 3H9.18C9.6 1.84 10.7 1 12 1C13.3 1 14.4 1.84 14.82 3H19C20.1 3 21 3.9 21 5V9L19 11V5H17V7H7V5H5V19H11M12 3C11.45 3 11 3.45 11 4C11 4.55 11.45 5 12 5C12.55 5 13 4.55 13 4C13 3.45 12.55 3 12 3Z"
|
|
385
|
+
)
|
|
386
|
+
});
|
|
387
|
+
var IconQueryEditor = createIconBase({
|
|
388
|
+
paths: fill(
|
|
389
|
+
"M4,14V17C4,19 7.05,20.72 11,21V18.11L11.13,18C7.12,17.76 4,16.06 4,14M12,13C7.58,13 4,11.21 4,9V12C4,14.21 7.58,16 12,16C12.39,16 12.77,16 13.16,16L17,12.12C15.4,12.72 13.71,13 12,13M12,3C7.58,3 4,4.79 4,7C4,9.21 7.58,11 12,11C16.42,11 20,9.21 20,7C20,4.79 16.42,3 12,3M21,11.13C20.85,11.13 20.71,11.19 20.61,11.3L19.61,12.3L21.66,14.3L22.66,13.3C22.87,13.1 22.88,12.76 22.66,12.53L21.42,11.3C21.32,11.19 21.18,11.13 21.04,11.13M19.04,12.88L13,18.94V21H15.06L21.12,14.93L19.04,12.88Z"
|
|
390
|
+
)
|
|
391
|
+
});
|
|
392
|
+
var IconTuning = createIconBase({
|
|
393
|
+
paths: fill(
|
|
394
|
+
"M3,17V19H9V17H3M3,5V7H13V5H3M13,21V19H21V17H13V15H11V21H13M7,9V11H3V13H7V15H9V9H7M21,13V11H11V13H21M15,9H17V7H21V5H17V3H15V9Z"
|
|
395
|
+
)
|
|
396
|
+
});
|
|
397
|
+
var IconSync = createIconBase({
|
|
398
|
+
paths: fill(
|
|
399
|
+
"m12.5 4v-3l-4 4 4 4v-3c3.31 0 6 2.69 6 6 0 1.01-.25 1.97-.7 2.8l1.46 1.46c.78-1.23 1.24-2.69 1.24-4.26 0-4.42-3.58-8-8-8zm0 14c-3.31 0-6-2.69-6-6 0-1.01.25-1.97.7-2.8l-1.46-1.46c-.78 1.23-1.24 2.69-1.24 4.26 0 4.42 3.58 8 8 8v3l4-4-4-4z"
|
|
400
|
+
)
|
|
401
|
+
});
|
|
402
|
+
var IconPlayCircle = createIconBase({
|
|
403
|
+
paths: fill(
|
|
404
|
+
"M12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM12 20C7.59 20 4 16.41 4 12C4 7.59 7.59 4 12 4C16.41 4 20 7.59 20 12C20 16.41 16.41 20 12 20ZM9.5 16.5L16.5 12L9.5 7.5V16.5Z"
|
|
405
|
+
)
|
|
406
|
+
});
|
|
407
|
+
var IconGridView = createIconBase({
|
|
408
|
+
paths: fill("M3 3v8h8V3H3zm6 6H5V5h4v4zm-6 4v8h8v-8H3zm6 6H5v-4h4v4zm4-16v8h8V3h-8zm6 6h-4V5h4v4zm-6 4v8h8v-8h-8zm6 6h-4v-4h4v4z")
|
|
409
|
+
});
|
|
410
|
+
var IconListView = createIconBase({
|
|
411
|
+
paths: fill(
|
|
412
|
+
"M3,5v14h18V5H3z M7,7v2H5V7H7z M5,13v-2h2v2H5z M5,15h2v2H5V15z M19,17H9v-2h10V17z M19,13H9v-2h10V13z M19,9H9V7h10V9z"
|
|
413
|
+
)
|
|
414
|
+
});
|
|
415
|
+
var IconPremium = createIconBase({
|
|
416
|
+
paths: fill(
|
|
417
|
+
"m9.68 13.69 2.32-1.76 2.31 1.76-.88-2.85 2.32-1.84h-2.84l-.91-2.81-.91 2.81h-2.84l2.31 1.84zm10.32-3.69c0-4.42-3.58-8-8-8s-8 3.58-8 8c0 2.03.76 3.87 2 5.28v7.72l6-2 6 2v-7.72c1.24-1.41 2-3.25 2-5.28zm-8-6c3.31 0 6 2.69 6 6s-2.69 6-6 6-6-2.69-6-6 2.69-6 6-6zm0 15-4 1.02v-3.1c1.18.68 2.54 1.08 4 1.08s2.82-.4 4-1.08v3.1z"
|
|
418
|
+
)
|
|
419
|
+
});
|
|
420
|
+
var IconGift = createIconBase({
|
|
421
|
+
paths: fill(
|
|
422
|
+
"M14.4495 4.55495C15.264 4.31223 15.8631 4.48426 16.1 4.80007C16.4013 5.20182 16.4765 5.57305 16.4336 5.91424C16.3888 6.27088 16.2084 6.63998 15.9211 7.00139C15.3397 7.73275 14.4193 8.30877 13.8244 8.53186C13.598 8.61674 13.4648 8.85138 13.508 9.08924C13.5511 9.32709 13.7582 9.50002 13.9999 9.50002L19.4999 9.50002V12.5H17.9999C17.7237 12.5 17.4999 12.7239 17.4999 13V20.5H6.49988V14.5C6.49988 14.2239 6.27602 14 5.99988 14C5.72374 14 5.49988 14.2239 5.49988 14.5V21C5.49988 21.2762 5.72374 21.5 5.99988 21.5H17.9999C18.276 21.5 18.4999 21.2762 18.4999 21V13.5H19.9999C20.276 13.5 20.4999 13.2762 20.4999 13V9.00002C20.4999 8.86741 20.4472 8.74023 20.3534 8.64646C20.2597 8.5527 20.1325 8.50002 19.9999 8.50002L15.8202 8.50002C16.1407 8.24235 16.4465 7.94742 16.7039 7.62365C17.0625 7.17257 17.3508 6.63541 17.4258 6.03894C17.5027 5.42702 17.3487 4.79826 16.8999 4.20003C16.2882 3.3845 15.1373 3.30652 14.1639 3.5966C13.3806 3.83005 12.5842 4.3279 12.0008 5.07014C11.4285 4.33982 10.6586 3.86464 9.88727 3.64427C8.91382 3.36616 7.82238 3.47045 7.14633 4.14645C6.65753 4.63523 6.41235 5.18234 6.41347 5.75925C6.41457 6.32144 6.64952 6.84016 6.97799 7.28883C7.30058 7.72946 7.7389 8.13769 8.22434 8.50002L3.99988 8.50002C3.86727 8.50002 3.74009 8.5527 3.64632 8.64646C3.55256 8.74023 3.49988 8.86741 3.49988 9.00002V13C3.49988 13.2762 3.72374 13.5 3.99988 13.5H15.4999C15.776 13.5 15.9999 13.2762 15.9999 13C15.9999 12.7239 15.776 12.5 15.4999 12.5H4.49988V9.50002L9.99995 9.50002C10.2318 9.50002 10.4333 9.34058 10.4866 9.1149C10.5398 8.88921 10.431 8.65651 10.2236 8.55281C9.25206 8.06706 8.29723 7.39797 7.78487 6.69811C7.53216 6.35292 7.41402 6.03722 7.41347 5.7573C7.41295 5.49209 7.51758 5.1894 7.85342 4.85358C8.17738 4.52964 8.83597 4.38393 9.61256 4.6058C10.3657 4.82096 11.1212 5.36045 11.5528 6.22359C11.6375 6.39298 11.8106 6.49997 12 6.49997C12.1894 6.49997 12.3625 6.39297 12.4472 6.22358C12.8783 5.36141 13.672 4.78667 14.4495 4.55495Z"
|
|
423
|
+
)
|
|
424
|
+
});
|
|
425
|
+
var IconRobot = createIconBase({
|
|
426
|
+
paths: fill(
|
|
427
|
+
"M17.5 15.5C17.5 16.61 16.61 17.5 15.5 17.5S13.5 16.61 13.5 15.5 14.4 13.5 15.5 13.5 17.5 14.4 17.5 15.5M8.5 13.5C7.4 13.5 6.5 14.4 6.5 15.5S7.4 17.5 8.5 17.5 10.5 16.61 10.5 15.5 9.61 13.5 8.5 13.5M23 15V18C23 18.55 22.55 19 22 19H21V20C21 21.11 20.11 22 19 22H5C3.9 22 3 21.11 3 20V19H2C1.45 19 1 18.55 1 18V15C1 14.45 1.45 14 2 14H3C3 10.13 6.13 7 10 7H11V5.73C10.4 5.39 10 4.74 10 4C10 2.9 10.9 2 12 2S14 2.9 14 4C14 4.74 13.6 5.39 13 5.73V7H14C17.87 7 21 10.13 21 14H22C22.55 14 23 14.45 23 15M21 16H19V14C19 11.24 16.76 9 14 9H10C7.24 9 5 11.24 5 14V16H3V17H5V20H19V17H21V16Z"
|
|
428
|
+
)
|
|
429
|
+
});
|
|
430
|
+
var IconExclamation = createIconBase({
|
|
431
|
+
paths: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("g", { fill: "currentColor", children: [
|
|
432
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "m12 21c1.1046 0 2-.8954 2-2s-.8954-2-2-2-2 .8954-2 2 .8954 2 2 2z" }),
|
|
433
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "m10 3h4v12h-4z" })
|
|
434
|
+
] })
|
|
435
|
+
});
|
|
436
|
+
var IconErrorOutline = createIconBase({
|
|
437
|
+
paths: fill(
|
|
438
|
+
"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"
|
|
439
|
+
)
|
|
440
|
+
});
|
|
441
|
+
var IconInfo = createIconBase({
|
|
442
|
+
name: "IconInfo",
|
|
443
|
+
paths: fill(
|
|
444
|
+
"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"
|
|
445
|
+
)
|
|
446
|
+
});
|
|
447
|
+
var IconCancel = createIconBase({
|
|
448
|
+
paths: fill(
|
|
449
|
+
"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"
|
|
450
|
+
)
|
|
451
|
+
});
|
|
452
|
+
var IconCheckCircle = createIconBase({
|
|
453
|
+
paths: fill(
|
|
454
|
+
"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"
|
|
455
|
+
)
|
|
456
|
+
});
|
|
457
|
+
var IconArrowUp = createIconBase({
|
|
458
|
+
paths: fill("M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z")
|
|
459
|
+
});
|
|
460
|
+
var IconArrowDown = createIconBase({
|
|
461
|
+
paths: fill("M20 12l-1.41-1.41L13 16.17V4h-2v12.17l-5.58-5.59L4 12l8 8 8-8z")
|
|
462
|
+
});
|
|
463
|
+
var IconChevronLeft = createIconBasePath("M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z");
|
|
464
|
+
var IconChevronRight = createIconBasePath("M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z");
|
|
465
|
+
var IconChevronDown = createIconBasePath("M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z");
|
|
466
|
+
var IconSubArrowRight = createIconBase({
|
|
467
|
+
paths: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("g", { transform: "translate(4 5.5)", children: fill("M2 0H0V10H12.01V13L16 9L12.01 5V8H2V0Z") })
|
|
468
|
+
});
|
|
469
|
+
var IconSearch = createIconBasePath(
|
|
470
|
+
"M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"
|
|
471
|
+
);
|
|
472
|
+
var IconBell = createIconBasePath(
|
|
473
|
+
"M12 22c1.1 0 2-.9 2-2h-4c0 1.1.89 2 2 2m6-6v-5c0-3.07-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.63 5.36 6 7.92 6 11v5l-2 2v1h16v-1z"
|
|
474
|
+
);
|
|
475
|
+
var IconBellOff = createIconBasePath(
|
|
476
|
+
"M20 18.69 7.84 6.14 5.27 3.49 4 4.76l2.8 2.8v.01c-.52.99-.8 2.16-.8 3.42v5l-2 2v1h13.73l2 2L21 19.72zM12 22c1.11 0 2-.89 2-2h-4c0 1.11.89 2 2 2m6-7.32V11c0-3.08-1.64-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68c-.15.03-.29.08-.42.12-.1.03-.2.07-.3.11h-.01c-.01 0-.01 0-.02.01-.23.09-.46.2-.68.31 0 0-.01 0-.01.01z"
|
|
477
|
+
);
|
|
478
|
+
var IconPerson = createIconBasePath(
|
|
479
|
+
"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"
|
|
480
|
+
);
|
|
481
|
+
var IconHome = createIconBasePath("M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z");
|
|
482
|
+
var IconPanelRight = createIconBasePath(
|
|
483
|
+
"M3 5v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2zm12 4h-5v10h5V9zm-7 0H5v10h3V9z"
|
|
484
|
+
);
|
|
485
|
+
var IconPlus = createIconBasePath("M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z");
|
|
486
|
+
var IconCheck = createIconBasePath("M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z");
|
|
487
|
+
var IconClose = createIconBasePath("M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z");
|
|
488
|
+
var IconTrash = createIconBasePath("M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z");
|
|
489
|
+
var IconDownload = createIconBasePath("M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z");
|
|
490
|
+
var IconUpload = createIconBasePath("M9 16h6v-6h4l-7-7-7 7h4v6zm-4 2h14v2H5v-2z");
|
|
491
|
+
var IconSave = createIconBasePath(
|
|
492
|
+
"M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7l-4-4zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3zm3-10H5V5h10v4z"
|
|
493
|
+
);
|
|
494
|
+
var IconCopy = createIconBasePath(
|
|
495
|
+
"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"
|
|
496
|
+
);
|
|
497
|
+
var IconEdit = createIconBasePath(
|
|
498
|
+
"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"
|
|
499
|
+
);
|
|
500
|
+
var IconLogout = createIconBasePath(
|
|
501
|
+
"M17 7l-1.41 1.41L18.17 11H8v2h10.17l-2.58 2.59L17 17l5-5zM4 5h8V3H4c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h8v-2H4V5z"
|
|
502
|
+
);
|
|
503
|
+
var IconStar = createIconBasePath(
|
|
504
|
+
"M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z"
|
|
505
|
+
);
|
|
506
|
+
var IconMail = createIconBasePath(
|
|
507
|
+
"M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z"
|
|
508
|
+
);
|
|
509
|
+
var IconShoppingCart = createIconBasePath(
|
|
510
|
+
"M7 18c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2zM1 2v2h2l3.6 7.59-1.35 2.45c-.16.28-.25.61-.25.96 0 1.1.9 2 2 2h12v-2H7.42c-.14 0-.25-.11-.25-.25l.03-.12.9-1.63h7.45c.75 0 1.41-.41 1.75-1.03l3.58-6.49c.08-.14.12-.31.12-.48 0-.55-.45-1-1-1H5.21l-.94-2H1zm16 16c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2z"
|
|
511
|
+
);
|
|
512
|
+
var IconMoon = createIconBasePath(
|
|
513
|
+
"M12 3c-4.97 0-9 4.03-9 9s4.03 9 9 9 9-4.03 9-9c0-.46-.04-.92-.1-1.36-.98 1.37-2.58 2.26-4.4 2.26-2.98 0-5.4-2.42-5.4-5.4 0-1.81.89-3.42 2.26-4.4-.44-.06-.9-.1-1.36-.1z"
|
|
514
|
+
);
|
|
515
|
+
var IconSun = createIconBasePath(
|
|
516
|
+
"M6.76 4.84l-1.8-1.79-1.41 1.41 1.79 1.79 1.42-1.41zM4 10.5H1v2h3v-2zm9-9.95h-2V3.5h2V.55zm7.45 3.91l-1.41-1.41-1.79 1.79 1.41 1.41 1.79-1.79zm-3.21 13.7l1.79 1.8 1.41-1.41-1.8-1.79-1.4 1.4zM20 10.5v2h3v-2h-3zm-8-5c-3.31 0-6 2.69-6 6s2.69 6 6 6 6-2.69 6-6-2.69-6-6-6zm-1 16.95h2V19.5h-2v2.95zm-7.45-3.91l1.41 1.41 1.79-1.8-1.41-1.41-1.79 1.8z"
|
|
517
|
+
);
|
|
518
|
+
var IconVolume = createIconBasePath(
|
|
519
|
+
"M3 9v6h4l5 5V4L7 9H3zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02zM14 3.23v2.06c2.89.86 5 3.54 5 6.71s-2.11 5.85-5 6.71v2.06c4.01-.91 7-4.49 7-8.77s-2.99-7.86-7-8.77z"
|
|
520
|
+
);
|
|
521
|
+
var IconVolumeOff = createIconBasePath(
|
|
522
|
+
"M16.5 12c0-1.77-1.02-3.29-2.5-4.03v2.21l2.45 2.45c.03-.2.05-.41.05-.63zm2.5 0c0 .94-.2 1.82-.54 2.64l1.51 1.51C20.63 14.91 21 13.5 21 12c0-4.28-2.99-7.86-7-8.77v2.06c2.89.86 5 3.54 5 6.71zM4.27 3L3 4.27 7.73 9H3v6h4l5 5v-6.73l4.25 4.25c-.67.52-1.42.93-2.25 1.18v2.06c1.38-.31 2.63-.95 3.69-1.81L19.73 21 21 19.73l-9-9L4.27 3zM12 4L9.91 6.09 12 8.18V4z"
|
|
523
|
+
);
|
|
524
|
+
var IconFlag = createIconBasePath("M14.4 6L14 4H5v17h2v-7h5.6l.4 2h7V6h-5.6z");
|
|
525
|
+
var IconDatabase = createIconBasePath(
|
|
526
|
+
"M12 3C7.58 3 4 4.79 4 7s3.58 4 8 4 8-1.79 8-4-3.58-4-8-4zM4 9v3c0 2.21 3.58 4 8 4s8-1.79 8-4V9c0 2.21-3.58 4-8 4s-8-1.79-8-4zm0 5v3c0 2.21 3.58 4 8 4s8-1.79 8-4v-3c0 2.21-3.58 4-8 4s-8-1.79-8-4z"
|
|
527
|
+
);
|
|
528
|
+
var IconLayers = createIconBasePath("M11.99 18.54l-7.37-5.73L3 14.07l9 7 9-7-1.63-1.27-7.38 5.74zM12 16l7.36-5.73L21 9l-9-7-9 7 1.63 1.27L12 16z");
|
|
529
|
+
var IconBox = createIconBasePath(
|
|
530
|
+
"M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"
|
|
531
|
+
);
|
|
532
|
+
var IconBolt = createIconBasePath(
|
|
533
|
+
"M11 21h-1l1-7H7.5c-.58 0-.57-.32-.38-.66-.19-.34-.04-.12-.07-.12C8.48 10.94 10.42 7.54 11 7V3h1v4c.58 0 .57.32.38.66-.19-.34-.04-.12-.07-.12-.95 2.28-2.96 5.66-3.31 6.22H13l-1 7h-1z"
|
|
534
|
+
);
|
|
535
|
+
var IconRadar = createIconBasePath(
|
|
536
|
+
"M12 2C6.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 8zm-5.5-2.5l7.51-3.49L17.5 6.5 9.99 9.99 6.5 17.5zm5.5-6.6c.61 0 1.1.49 1.1 1.1s-.49 1.1-1.1 1.1-1.1-.49-1.1-1.1.49-1.1 1.1-1.1z"
|
|
537
|
+
);
|
|
538
|
+
var IconToggle = createIconBasePath(
|
|
539
|
+
"M17 7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h10c2.76 0 5-2.24 5-5s-2.24-5-5-5zm0 8H7c-1.66 0-3-1.34-3-3s1.34-3 3-3h10c1.66 0 3 1.34 3 3s-1.34 3-3 3zM7 10c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"
|
|
540
|
+
);
|
|
541
|
+
var IconRocket = createIconBasePath(
|
|
542
|
+
"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"
|
|
543
|
+
);
|
|
544
|
+
var IconTerminal = createIconBase({
|
|
545
|
+
name: "IconTerminal",
|
|
546
|
+
paths: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
547
|
+
"path",
|
|
548
|
+
{
|
|
549
|
+
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",
|
|
550
|
+
fill: "currentColor",
|
|
551
|
+
fillRule: "evenodd",
|
|
552
|
+
clipRule: "evenodd"
|
|
553
|
+
}
|
|
554
|
+
)
|
|
555
|
+
});
|
|
556
|
+
var IconOldWindow = createIconBase({
|
|
557
|
+
name: "IconOldWindow",
|
|
558
|
+
paths: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
559
|
+
"path",
|
|
560
|
+
{
|
|
561
|
+
d: "M3 3v18h18V3H3zm2 7v9h14v-9H5zm1-4h2v1H6V6zm3 0h2v1H9V6z",
|
|
562
|
+
fill: "currentColor",
|
|
563
|
+
fillRule: "evenodd",
|
|
564
|
+
clipRule: "evenodd"
|
|
565
|
+
}
|
|
566
|
+
)
|
|
567
|
+
});
|
|
568
|
+
var IconCommandCursor = createIconBase({
|
|
569
|
+
name: "IconCommandCursor",
|
|
570
|
+
paths: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
571
|
+
"path",
|
|
572
|
+
{
|
|
573
|
+
d: "M4 3v18h16V3H4zm2 2h12v14H6V5zm1.5 3.5L11 12l-3.5 3.5L9 17l5-5-5-5-1.5 1.5zM13 17h4v-2h-4v2z",
|
|
574
|
+
fill: "currentColor",
|
|
575
|
+
fillRule: "evenodd",
|
|
576
|
+
clipRule: "evenodd"
|
|
577
|
+
}
|
|
578
|
+
)
|
|
579
|
+
});
|
|
580
|
+
var IconDataReel = createIconBase({
|
|
581
|
+
name: "IconDataReel",
|
|
582
|
+
paths: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
583
|
+
"path",
|
|
584
|
+
{
|
|
585
|
+
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",
|
|
586
|
+
fill: "currentColor",
|
|
587
|
+
fillRule: "evenodd",
|
|
588
|
+
clipRule: "evenodd"
|
|
589
|
+
}
|
|
590
|
+
)
|
|
591
|
+
});
|
|
592
|
+
var IconCodePreview = createIconBase({
|
|
593
|
+
name: "IconCodePreview",
|
|
594
|
+
paths: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
595
|
+
"path",
|
|
596
|
+
{
|
|
597
|
+
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",
|
|
598
|
+
fill: "currentColor",
|
|
599
|
+
fillRule: "evenodd",
|
|
600
|
+
clipRule: "evenodd"
|
|
601
|
+
}
|
|
602
|
+
)
|
|
603
|
+
});
|
|
604
|
+
var IconInsightBoard = createIconBase({
|
|
605
|
+
name: "IconInsightBoard",
|
|
606
|
+
paths: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
607
|
+
"path",
|
|
608
|
+
{
|
|
609
|
+
d: "M3 3v18h18V3H3zm2 2h14v3H5V5zm0 5h6v9H5v-9zm8 0h6v4h-6v-4zm0 6h6v3h-6v-3zM6 6h2v1H6V6zm3 0h2v1H9V6z",
|
|
610
|
+
fill: "currentColor",
|
|
611
|
+
fillRule: "evenodd",
|
|
612
|
+
clipRule: "evenodd"
|
|
613
|
+
}
|
|
614
|
+
)
|
|
615
|
+
});
|
|
616
|
+
var IconEventStream = createIconBase({
|
|
617
|
+
name: "IconEventStream",
|
|
618
|
+
paths: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
|
|
619
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M5 4h2v16H5V4z", fill: "currentColor", opacity: "0.45" }),
|
|
620
|
+
fill("M6 3a3 3 0 1 0 0 6 3 3 0 0 0 0-6zm0 8a3 3 0 1 0 0 6 3 3 0 0 0 0-6zm5-6h10v2H11V5zm0 8h7v2h-7v-2zm0 5h10v2H11v-2z")
|
|
621
|
+
] })
|
|
622
|
+
});
|
|
623
|
+
var IconFeatureGate = createIconBase({
|
|
624
|
+
name: "IconFeatureGate",
|
|
625
|
+
paths: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
626
|
+
"path",
|
|
627
|
+
{
|
|
628
|
+
d: "M4 3h2v18H4V3zm3 2h12l-3 4 3 4H7V5zm4 1-2.2 4H12l-1 4 4.2-5H12l1-3h-2z",
|
|
629
|
+
fill: "currentColor",
|
|
630
|
+
fillRule: "evenodd",
|
|
631
|
+
clipRule: "evenodd"
|
|
632
|
+
}
|
|
633
|
+
)
|
|
634
|
+
});
|
|
635
|
+
var IconReplayFrame = createIconBase({
|
|
636
|
+
name: "IconReplayFrame",
|
|
637
|
+
paths: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
638
|
+
"path",
|
|
639
|
+
{
|
|
640
|
+
d: "M3 3v18h18V3H3zm2 2h14v11H5V5zm5 2v7l6-3.5L10 7zm-5 11h9v1H5v-1zm11 0h3v1h-3v-1z",
|
|
641
|
+
fill: "currentColor",
|
|
642
|
+
fillRule: "evenodd",
|
|
643
|
+
clipRule: "evenodd"
|
|
644
|
+
}
|
|
645
|
+
)
|
|
646
|
+
});
|
|
647
|
+
var IconQueryStack = createIconBase({
|
|
648
|
+
name: "IconQueryStack",
|
|
649
|
+
paths: fill(
|
|
650
|
+
"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"
|
|
651
|
+
)
|
|
652
|
+
});
|
|
653
|
+
var IconExperimentSplit = createIconBase({
|
|
654
|
+
name: "IconExperimentSplit",
|
|
655
|
+
paths: fill(
|
|
656
|
+
"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"
|
|
657
|
+
)
|
|
658
|
+
});
|
|
659
|
+
var IconSurveyCard = createIconBase({
|
|
660
|
+
name: "IconSurveyCard",
|
|
661
|
+
paths: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
662
|
+
"path",
|
|
663
|
+
{
|
|
664
|
+
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",
|
|
665
|
+
fill: "currentColor",
|
|
666
|
+
fillRule: "evenodd",
|
|
667
|
+
clipRule: "evenodd"
|
|
668
|
+
}
|
|
669
|
+
)
|
|
670
|
+
});
|
|
671
|
+
var IconActivity = createIconBasePath(
|
|
672
|
+
"M22 12h-4l-3 9L9 3l-3 9H2v2h6.76l2.24-6.72L15 15l2.24-6.72L19 14h3v-2z"
|
|
673
|
+
);
|
|
674
|
+
var IconFlask = createIconBasePath(
|
|
675
|
+
"M19.8 18.4L14 10.67V6.5l1.35-1.35c.39-.39.39-1.02 0-1.41L14.65 2.7a.9959.9959 0 0 0-1.41 0L9.35 6.54c-.39.39-.39 1.02 0 1.41L10.7 9.3v4.17L4.2 18.4C3.53 19.07 4.04 20.25 5 20.25h14c.96 0 1.47-1.18.8-1.85zM6.91 18.25l5.09-5.09 5.09 5.09H6.91z"
|
|
676
|
+
);
|
|
677
|
+
var IconSpinner = (0, import_react4.forwardRef)(function IconSpinner2(_a, ref) {
|
|
678
|
+
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
679
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(IconSync, __spreadValues({ ref, className: cn("ph-icon-spin", className) }, props));
|
|
680
|
+
});
|
|
681
|
+
IconSpinner.displayName = "IconSpinner";
|
|
682
|
+
var CANONICAL_ICONS = {
|
|
683
|
+
activity: IconActivity,
|
|
684
|
+
areaChart: IconAreaChart,
|
|
685
|
+
arrowDown: IconArrowDown,
|
|
686
|
+
arrowUp: IconArrowUp,
|
|
687
|
+
bell: IconBell,
|
|
688
|
+
bellOff: IconBellOff,
|
|
689
|
+
bolt: IconBolt,
|
|
690
|
+
box: IconBox,
|
|
691
|
+
cancel: IconCancel,
|
|
692
|
+
check: IconCheck,
|
|
693
|
+
checkCircle: IconCheckCircle,
|
|
694
|
+
chevronDown: IconChevronDown,
|
|
695
|
+
chevronLeft: IconChevronLeft,
|
|
696
|
+
chevronRight: IconChevronRight,
|
|
697
|
+
clipboardEdit: IconClipboardEdit,
|
|
698
|
+
close: IconClose,
|
|
699
|
+
codePreview: IconCodePreview,
|
|
700
|
+
cohort: IconCohort,
|
|
701
|
+
commandCursor: IconCommandCursor,
|
|
702
|
+
copy: IconCopy,
|
|
703
|
+
cumulativeChart: IconCumulativeChart,
|
|
704
|
+
dataReel: IconDataReel,
|
|
705
|
+
database: IconDatabase,
|
|
706
|
+
download: IconDownload,
|
|
707
|
+
edit: IconEdit,
|
|
708
|
+
errorOutline: IconErrorOutline,
|
|
709
|
+
eventStream: IconEventStream,
|
|
710
|
+
exclamation: IconExclamation,
|
|
711
|
+
experimentSplit: IconExperimentSplit,
|
|
712
|
+
featureGate: IconFeatureGate,
|
|
713
|
+
flag: IconFlag,
|
|
714
|
+
flare: IconFlare,
|
|
715
|
+
flask: IconFlask,
|
|
716
|
+
gift: IconGift,
|
|
717
|
+
gridView: IconGridView,
|
|
718
|
+
handClick: IconHandClick,
|
|
719
|
+
home: IconHome,
|
|
720
|
+
info: IconInfo,
|
|
721
|
+
insightBoard: IconInsightBoard,
|
|
722
|
+
layers: IconLayers,
|
|
723
|
+
listView: IconListView,
|
|
724
|
+
logout: IconLogout,
|
|
725
|
+
mail: IconMail,
|
|
726
|
+
moon: IconMoon,
|
|
727
|
+
oldWindow: IconOldWindow,
|
|
728
|
+
panelRight: IconPanelRight,
|
|
729
|
+
person: IconPerson,
|
|
730
|
+
playCircle: IconPlayCircle,
|
|
731
|
+
plus: IconPlus,
|
|
732
|
+
premium: IconPremium,
|
|
733
|
+
queryEditor: IconQueryEditor,
|
|
734
|
+
queryStack: IconQueryStack,
|
|
735
|
+
radar: IconRadar,
|
|
736
|
+
recording: IconRecording,
|
|
737
|
+
replayFrame: IconReplayFrame,
|
|
738
|
+
robot: IconRobot,
|
|
739
|
+
rocket: IconRocket,
|
|
740
|
+
save: IconSave,
|
|
741
|
+
search: IconSearch,
|
|
742
|
+
selectEvents: IconSelectEvents,
|
|
743
|
+
shoppingCart: IconShoppingCart,
|
|
744
|
+
spinner: IconSpinner,
|
|
745
|
+
star: IconStar,
|
|
746
|
+
subArrowRight: IconSubArrowRight,
|
|
747
|
+
sun: IconSun,
|
|
748
|
+
surveyCard: IconSurveyCard,
|
|
749
|
+
surveys: IconSurveys,
|
|
750
|
+
sync: IconSync,
|
|
751
|
+
tableChart: IconTableChart,
|
|
752
|
+
terminal: IconTerminal,
|
|
753
|
+
toggle: IconToggle,
|
|
754
|
+
trash: IconTrash,
|
|
755
|
+
tuning: IconTuning,
|
|
756
|
+
upload: IconUpload,
|
|
757
|
+
volume: IconVolume,
|
|
758
|
+
volumeOff: IconVolumeOff
|
|
759
|
+
};
|
|
760
|
+
var PH_ICON_ALIASES = {
|
|
761
|
+
clipboard: IconClipboardEdit,
|
|
762
|
+
grid: IconGridView,
|
|
763
|
+
list: IconListView,
|
|
764
|
+
play: IconPlayCircle,
|
|
765
|
+
settings: IconTuning,
|
|
766
|
+
trendingUp: IconArrowUp,
|
|
767
|
+
warning: IconExclamation,
|
|
768
|
+
xCircle: IconCancel
|
|
769
|
+
};
|
|
770
|
+
var PH_ICONS = __spreadValues(__spreadValues({}, CANONICAL_ICONS), PH_ICON_ALIASES);
|
|
771
|
+
for (const [name, Icon] of Object.entries(CANONICAL_ICONS)) {
|
|
772
|
+
const namedIcon = Icon;
|
|
773
|
+
if (!namedIcon.displayName || namedIcon.displayName === "IconGlyph") {
|
|
774
|
+
namedIcon.displayName = `Icon${name[0].toUpperCase()}${name.slice(1)}`;
|
|
775
|
+
}
|
|
776
|
+
}
|
|
777
|
+
var IconByName = (0, import_react4.forwardRef)(function IconByName2(_a, ref) {
|
|
778
|
+
var _b = _a, { name } = _b, props = __objRest(_b, ["name"]);
|
|
779
|
+
const Icon = PH_ICONS[name];
|
|
780
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Icon, __spreadValues({ ref }, props));
|
|
781
|
+
});
|
|
782
|
+
IconByName.displayName = "IconByName";
|
|
783
|
+
|
|
784
|
+
// src/components/ui/Alert.tsx
|
|
785
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
786
|
+
var statusConfig = {
|
|
787
|
+
info: { icon: IconInfo },
|
|
788
|
+
success: { icon: IconCheckCircle },
|
|
789
|
+
warning: { icon: IconExclamation },
|
|
790
|
+
danger: { icon: IconCancel }
|
|
791
|
+
};
|
|
792
|
+
var statusClassMap = {
|
|
793
|
+
info: "ph-alert-info",
|
|
794
|
+
success: "ph-alert-success",
|
|
795
|
+
warning: "ph-alert-warning",
|
|
796
|
+
danger: "ph-alert-danger"
|
|
797
|
+
};
|
|
798
|
+
var Alert = (0, import_react5.forwardRef)(function Alert2(_a, ref) {
|
|
799
|
+
var _b = _a, {
|
|
800
|
+
status = "info",
|
|
801
|
+
title,
|
|
802
|
+
description,
|
|
803
|
+
icon,
|
|
804
|
+
children,
|
|
805
|
+
className,
|
|
806
|
+
onDismiss,
|
|
807
|
+
live,
|
|
808
|
+
dismissLabel = "Dismiss notification",
|
|
809
|
+
role
|
|
810
|
+
} = _b, props = __objRest(_b, [
|
|
811
|
+
"status",
|
|
812
|
+
"title",
|
|
813
|
+
"description",
|
|
814
|
+
"icon",
|
|
815
|
+
"children",
|
|
816
|
+
"className",
|
|
817
|
+
"onDismiss",
|
|
818
|
+
"live",
|
|
819
|
+
"dismissLabel",
|
|
820
|
+
"role"
|
|
821
|
+
]);
|
|
822
|
+
const config = statusConfig[status];
|
|
823
|
+
const Icon = config.icon;
|
|
824
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
825
|
+
"div",
|
|
826
|
+
__spreadProps(__spreadValues({
|
|
827
|
+
ref,
|
|
828
|
+
role: role != null ? role : live === "assertive" ? "alert" : live === "polite" ? "status" : void 0,
|
|
829
|
+
"aria-live": live,
|
|
830
|
+
className: cn("ph-alert", statusClassMap[status], className)
|
|
831
|
+
}, props), {
|
|
832
|
+
children: [
|
|
833
|
+
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 }),
|
|
834
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "min-w-0 flex-1", children: [
|
|
835
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "font-semibold", children: title }),
|
|
836
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "mt-1 text-sm text-ph-subtle", children: description }),
|
|
837
|
+
children
|
|
838
|
+
] }),
|
|
839
|
+
onDismiss && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
840
|
+
"button",
|
|
841
|
+
{
|
|
842
|
+
type: "button",
|
|
843
|
+
onClick: onDismiss,
|
|
844
|
+
className: "ph-alert-dismiss",
|
|
845
|
+
"aria-label": dismissLabel,
|
|
846
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(IconClose, { className: "h-4 w-4", "aria-hidden": true })
|
|
847
|
+
}
|
|
848
|
+
)
|
|
849
|
+
]
|
|
850
|
+
})
|
|
851
|
+
);
|
|
852
|
+
});
|
|
853
|
+
Alert.displayName = "Alert";
|
|
854
|
+
|
|
855
|
+
// src/components/ui/Badge.tsx
|
|
856
|
+
var import_react6 = require("react");
|
|
857
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
858
|
+
var variantMap = {
|
|
859
|
+
brand: "ph-badge-brand",
|
|
860
|
+
neutral: "ph-badge-neutral",
|
|
861
|
+
success: "ph-badge-success",
|
|
862
|
+
warning: "ph-badge-warning",
|
|
863
|
+
danger: "ph-badge-danger",
|
|
864
|
+
info: "ph-badge-info",
|
|
865
|
+
outline: "ph-badge-outline"
|
|
866
|
+
};
|
|
867
|
+
var sizeMap = {
|
|
868
|
+
sm: "text-[10px] px-1.5 py-0.5",
|
|
869
|
+
md: ""
|
|
870
|
+
};
|
|
871
|
+
var Badge = (0, import_react6.forwardRef)(function Badge2(_a, ref) {
|
|
872
|
+
var _b = _a, {
|
|
873
|
+
variant = "neutral",
|
|
874
|
+
size = "md",
|
|
875
|
+
children,
|
|
876
|
+
className
|
|
877
|
+
} = _b, props = __objRest(_b, [
|
|
878
|
+
"variant",
|
|
879
|
+
"size",
|
|
880
|
+
"children",
|
|
881
|
+
"className"
|
|
882
|
+
]);
|
|
883
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
884
|
+
"span",
|
|
885
|
+
__spreadProps(__spreadValues({
|
|
886
|
+
ref,
|
|
887
|
+
className: cn(
|
|
888
|
+
"ph-badge",
|
|
889
|
+
variantMap[variant],
|
|
890
|
+
sizeMap[size],
|
|
891
|
+
className
|
|
892
|
+
)
|
|
893
|
+
}, props), {
|
|
894
|
+
children
|
|
895
|
+
})
|
|
896
|
+
);
|
|
897
|
+
});
|
|
898
|
+
Badge.displayName = "Badge";
|
|
899
|
+
|
|
900
|
+
// src/components/ui/Card.tsx
|
|
901
|
+
var import_react7 = require("react");
|
|
902
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
903
|
+
var variantMap2 = {
|
|
904
|
+
default: "",
|
|
905
|
+
outlined: "border-2 border-ph-border",
|
|
906
|
+
elevated: "ph-card-elevated",
|
|
907
|
+
highlighted: "ph-card-highlighted"
|
|
908
|
+
};
|
|
909
|
+
var Card = (0, import_react7.forwardRef)(function Card2(_a, ref) {
|
|
910
|
+
var _b = _a, {
|
|
911
|
+
children,
|
|
912
|
+
title,
|
|
913
|
+
description,
|
|
914
|
+
actions,
|
|
915
|
+
footer,
|
|
916
|
+
media,
|
|
917
|
+
variant = "default",
|
|
918
|
+
className,
|
|
919
|
+
bodyClassName,
|
|
920
|
+
interactive = false,
|
|
921
|
+
titleAs: Title2 = "h3"
|
|
922
|
+
} = _b, props = __objRest(_b, [
|
|
923
|
+
"children",
|
|
924
|
+
"title",
|
|
925
|
+
"description",
|
|
926
|
+
"actions",
|
|
927
|
+
"footer",
|
|
928
|
+
"media",
|
|
929
|
+
"variant",
|
|
930
|
+
"className",
|
|
931
|
+
"bodyClassName",
|
|
932
|
+
"interactive",
|
|
933
|
+
"titleAs"
|
|
934
|
+
]);
|
|
935
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
936
|
+
"div",
|
|
937
|
+
__spreadProps(__spreadValues({
|
|
938
|
+
ref,
|
|
939
|
+
className: cn(
|
|
940
|
+
"ph-card",
|
|
941
|
+
variantMap2[variant],
|
|
942
|
+
interactive && "ph-card-interactive",
|
|
943
|
+
className
|
|
944
|
+
)
|
|
945
|
+
}, props), {
|
|
946
|
+
children: [
|
|
947
|
+
media && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "ph-card-media", children: media }),
|
|
948
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: cn("ph-card-body", bodyClassName), children: [
|
|
949
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Title2, { className: "ph-card-title", children: title }),
|
|
950
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "text-sm text-ph-subtle", children: description }),
|
|
951
|
+
children,
|
|
952
|
+
actions && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "ph-card-actions", children: actions })
|
|
953
|
+
] }),
|
|
954
|
+
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 })
|
|
955
|
+
]
|
|
956
|
+
})
|
|
957
|
+
);
|
|
958
|
+
});
|
|
959
|
+
Card.displayName = "Card";
|
|
960
|
+
|
|
961
|
+
// src/components/ui/Drawer.tsx
|
|
962
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
963
|
+
var sideMap = {
|
|
964
|
+
left: "left-0 border-r",
|
|
965
|
+
right: "right-0 border-l"
|
|
966
|
+
};
|
|
967
|
+
var sizeMap2 = {
|
|
968
|
+
sm: "w-[min(100%,18rem)]",
|
|
969
|
+
md: "w-[min(100%,22rem)]",
|
|
970
|
+
lg: "w-[min(100%,30rem)]"
|
|
971
|
+
};
|
|
972
|
+
function Drawer({
|
|
973
|
+
open = false,
|
|
974
|
+
onClose,
|
|
975
|
+
title,
|
|
976
|
+
children,
|
|
977
|
+
footer,
|
|
978
|
+
side = "right",
|
|
979
|
+
size = "md",
|
|
980
|
+
className,
|
|
981
|
+
showCloseButton = true
|
|
982
|
+
}) {
|
|
983
|
+
if (!open) return null;
|
|
984
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
|
|
985
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "fixed inset-0 z-[120] bg-black/45 backdrop-blur-[2px]", role: "presentation", onClick: onClose }),
|
|
986
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
987
|
+
"aside",
|
|
988
|
+
{
|
|
989
|
+
className: cn(
|
|
990
|
+
"fixed inset-y-0 z-[130] flex flex-col overflow-y-auto border-ph-border bg-ph-surface shadow-ph-md",
|
|
991
|
+
sideMap[side],
|
|
992
|
+
sizeMap2[size],
|
|
993
|
+
className
|
|
994
|
+
),
|
|
995
|
+
children: [
|
|
996
|
+
(title || showCloseButton) && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)("header", { className: "flex items-center justify-between border-b border-ph-border px-4 py-3", children: [
|
|
997
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "text-sm font-bold text-ph-ink", children: title }),
|
|
998
|
+
showCloseButton && onClose && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Button, { variant: "ghost", className: "ph-btn-circle", onClick: onClose, "aria-label": "Close drawer", children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(IconClose, { className: "h-5 w-5" }) })
|
|
999
|
+
] }),
|
|
1000
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "flex-1", children }),
|
|
1001
|
+
footer && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("footer", { className: "border-t border-ph-border px-4 py-3", children: footer })
|
|
1002
|
+
]
|
|
1003
|
+
}
|
|
1004
|
+
)
|
|
1005
|
+
] });
|
|
1006
|
+
}
|
|
1007
|
+
|
|
1008
|
+
// src/components/ui/Kbd.tsx
|
|
1009
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
1010
|
+
var platformLabels = {
|
|
1011
|
+
text: {
|
|
1012
|
+
command: "Command",
|
|
1013
|
+
cmd: "Command",
|
|
1014
|
+
option: "Option",
|
|
1015
|
+
alt: "Alt",
|
|
1016
|
+
control: "Control",
|
|
1017
|
+
ctrl: "Control",
|
|
1018
|
+
shift: "Shift"
|
|
1019
|
+
},
|
|
1020
|
+
mac: {
|
|
1021
|
+
command: "\u2318",
|
|
1022
|
+
cmd: "\u2318",
|
|
1023
|
+
option: "\u2325",
|
|
1024
|
+
alt: "\u2325",
|
|
1025
|
+
control: "\u2303",
|
|
1026
|
+
ctrl: "\u2303",
|
|
1027
|
+
shift: "\u21E7"
|
|
1028
|
+
},
|
|
1029
|
+
windows: {
|
|
1030
|
+
command: "Win",
|
|
1031
|
+
cmd: "Win",
|
|
1032
|
+
option: "Alt",
|
|
1033
|
+
alt: "Alt",
|
|
1034
|
+
control: "Ctrl",
|
|
1035
|
+
ctrl: "Ctrl",
|
|
1036
|
+
shift: "Shift"
|
|
1037
|
+
}
|
|
1038
|
+
};
|
|
1039
|
+
var spokenLabels = {
|
|
1040
|
+
"\u2318": "Command",
|
|
1041
|
+
"\u2325": "Option",
|
|
1042
|
+
"\u2303": "Control",
|
|
1043
|
+
"\u21E7": "Shift",
|
|
1044
|
+
"\u21B5": "Enter",
|
|
1045
|
+
"\u23CE": "Enter",
|
|
1046
|
+
"\u232B": "Backspace",
|
|
1047
|
+
"\u238B": "Escape"
|
|
1048
|
+
};
|
|
1049
|
+
function Kbd(_a) {
|
|
1050
|
+
var _b = _a, {
|
|
1051
|
+
variant = "shortcut",
|
|
1052
|
+
keys,
|
|
1053
|
+
platform = "text",
|
|
1054
|
+
separator,
|
|
1055
|
+
children,
|
|
1056
|
+
className,
|
|
1057
|
+
"aria-label": ariaLabel
|
|
1058
|
+
} = _b, props = __objRest(_b, [
|
|
1059
|
+
"variant",
|
|
1060
|
+
"keys",
|
|
1061
|
+
"platform",
|
|
1062
|
+
"separator",
|
|
1063
|
+
"children",
|
|
1064
|
+
"className",
|
|
1065
|
+
"aria-label"
|
|
1066
|
+
]);
|
|
1067
|
+
if (variant === "token") {
|
|
1068
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("code", __spreadProps(__spreadValues({ className: cn("ph-code-token ph-kbd", className), "aria-label": ariaLabel }, props), { children }));
|
|
1069
|
+
}
|
|
1070
|
+
const sourceKeys = (keys == null ? void 0 : keys.length) ? keys : children != null ? [children] : [];
|
|
1071
|
+
const displayKeys = sourceKeys.map((key) => formatKey(key, platform));
|
|
1072
|
+
const accessibleLabel = ariaLabel != null ? ariaLabel : getShortcutLabel(displayKeys);
|
|
1073
|
+
if (variant === "key") {
|
|
1074
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("kbd", __spreadProps(__spreadValues({ className: cn("ph-keycap", className), "aria-label": accessibleLabel }, props), { children: displayKeys[0] }));
|
|
1075
|
+
}
|
|
1076
|
+
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: [
|
|
1077
|
+
index > 0 && separator != null ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "ph-shortcut-separator", "aria-hidden": "true", children: separator }) : null,
|
|
1078
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "ph-shortcut-key", "aria-hidden": accessibleLabel ? true : void 0, children: key })
|
|
1079
|
+
] }, index)) }));
|
|
1080
|
+
}
|
|
1081
|
+
function formatKey(key, platform) {
|
|
1082
|
+
var _a;
|
|
1083
|
+
if (typeof key !== "string") return key;
|
|
1084
|
+
return (_a = platformLabels[platform][key.toLowerCase()]) != null ? _a : key;
|
|
1085
|
+
}
|
|
1086
|
+
function getShortcutLabel(keys) {
|
|
1087
|
+
const labels = keys.map((key) => {
|
|
1088
|
+
var _a;
|
|
1089
|
+
if (typeof key !== "string" && typeof key !== "number") return null;
|
|
1090
|
+
const value = String(key);
|
|
1091
|
+
return (_a = spokenLabels[value]) != null ? _a : value;
|
|
1092
|
+
});
|
|
1093
|
+
return labels.every((label) => label != null) ? labels.join(" + ") : void 0;
|
|
1094
|
+
}
|
|
1095
|
+
|
|
1096
|
+
// src/components/ui/Loader.tsx
|
|
1097
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
1098
|
+
var loaderSizeClass = {
|
|
1099
|
+
sm: "ph-loader-sm",
|
|
1100
|
+
md: "ph-loader-md",
|
|
1101
|
+
lg: "ph-loader-lg"
|
|
1102
|
+
};
|
|
1103
|
+
var skeletonShapeClass = {
|
|
1104
|
+
title: "ph-skeleton-title",
|
|
1105
|
+
text: "ph-skeleton-text",
|
|
1106
|
+
"short-text": "ph-skeleton-text-short",
|
|
1107
|
+
avatar: "ph-skeleton-avatar",
|
|
1108
|
+
button: "ph-skeleton-button",
|
|
1109
|
+
block: "ph-skeleton-block"
|
|
1110
|
+
};
|
|
1111
|
+
function Loader(_a) {
|
|
1112
|
+
var _b = _a, {
|
|
1113
|
+
variant = "spinner",
|
|
1114
|
+
size = "md",
|
|
1115
|
+
label = "Loading",
|
|
1116
|
+
className
|
|
1117
|
+
} = _b, props = __objRest(_b, [
|
|
1118
|
+
"variant",
|
|
1119
|
+
"size",
|
|
1120
|
+
"label",
|
|
1121
|
+
"className"
|
|
1122
|
+
]);
|
|
1123
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
1124
|
+
"span",
|
|
1125
|
+
__spreadProps(__spreadValues({
|
|
1126
|
+
role: "status",
|
|
1127
|
+
"aria-label": label,
|
|
1128
|
+
className: cn("ph-loader", loaderSizeClass[size], className)
|
|
1129
|
+
}, props), {
|
|
1130
|
+
children: [
|
|
1131
|
+
variant === "spinner" ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "ph-loading", "aria-hidden": true }) : null,
|
|
1132
|
+
variant === "dots" ? /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("span", { className: "ph-loading-dots", "aria-hidden": true, children: [
|
|
1133
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", {}),
|
|
1134
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", {}),
|
|
1135
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", {})
|
|
1136
|
+
] }) : null,
|
|
1137
|
+
variant === "pulse" ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "ph-loading-pulse", "aria-hidden": true }) : null
|
|
1138
|
+
]
|
|
1139
|
+
})
|
|
1140
|
+
);
|
|
1141
|
+
}
|
|
1142
|
+
function Skeleton(_a) {
|
|
1143
|
+
var _b = _a, { shape = "text", className } = _b, props = __objRest(_b, ["shape", "className"]);
|
|
1144
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1145
|
+
"span",
|
|
1146
|
+
__spreadValues({
|
|
1147
|
+
className: cn("ph-skeleton", skeletonShapeClass[shape], className),
|
|
1148
|
+
"aria-hidden": "true"
|
|
1149
|
+
}, props)
|
|
1150
|
+
);
|
|
1151
|
+
}
|
|
1152
|
+
function LoadingState(_a) {
|
|
1153
|
+
var _b = _a, {
|
|
1154
|
+
label = "Loading",
|
|
1155
|
+
title = "Loading",
|
|
1156
|
+
description,
|
|
1157
|
+
variant = "spinner",
|
|
1158
|
+
size = "lg",
|
|
1159
|
+
className
|
|
1160
|
+
} = _b, props = __objRest(_b, [
|
|
1161
|
+
"label",
|
|
1162
|
+
"title",
|
|
1163
|
+
"description",
|
|
1164
|
+
"variant",
|
|
1165
|
+
"size",
|
|
1166
|
+
"className"
|
|
1167
|
+
]);
|
|
1168
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", __spreadProps(__spreadValues({ className: cn("ph-loading-state", className), role: "status", "aria-label": label }, props), { children: [
|
|
1169
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Loader, { variant, size, label, "aria-hidden": "true" }),
|
|
1170
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "ph-loading-state__copy", children: [
|
|
1171
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("strong", { children: title }),
|
|
1172
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { children: description }) : null
|
|
1173
|
+
] })
|
|
1174
|
+
] }));
|
|
1175
|
+
}
|
|
1176
|
+
|
|
1177
|
+
// src/components/ui/AuthLayout.tsx
|
|
1178
|
+
var import_react8 = require("react");
|
|
1179
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
1180
|
+
function AuthLayout(_a) {
|
|
1181
|
+
var _b = _a, { brand, footer, aside, children, className } = _b, props = __objRest(_b, ["brand", "footer", "aside", "children", "className"]);
|
|
1182
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", __spreadProps(__spreadValues({ className: cn("ph-auth-layout", aside != null && "ph-auth-layout--split", className) }, props), { children: [
|
|
1183
|
+
aside ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("aside", { className: "ph-auth-layout__aside", children: aside }) : null,
|
|
1184
|
+
/* @__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: [
|
|
1185
|
+
brand ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "ph-auth-layout__brand", children: brand }) : null,
|
|
1186
|
+
children,
|
|
1187
|
+
footer ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("footer", { className: "ph-auth-layout__footer", children: footer }) : null
|
|
1188
|
+
] }) })
|
|
1189
|
+
] }));
|
|
1190
|
+
}
|
|
1191
|
+
function AuthCard(_a) {
|
|
1192
|
+
var _b = _a, { title, description, footer, children, className } = _b, props = __objRest(_b, ["title", "description", "footer", "children", "className"]);
|
|
1193
|
+
const titleId = (0, import_react8.useId)();
|
|
1194
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("section", __spreadProps(__spreadValues({ className: cn("ph-auth-card", className), "aria-labelledby": titleId }, props), { children: [
|
|
1195
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("header", { className: "ph-auth-card__header", children: [
|
|
1196
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("h1", { id: titleId, children: title }),
|
|
1197
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { children: description }) : null
|
|
1198
|
+
] }),
|
|
1199
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "ph-auth-card__body", children }),
|
|
1200
|
+
footer ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("footer", { className: "ph-auth-card__footer", children: footer }) : null
|
|
1201
|
+
] }));
|
|
1202
|
+
}
|
|
1203
|
+
function AuthDivider(_a) {
|
|
1204
|
+
var _b = _a, { children = "or continue with", className } = _b, props = __objRest(_b, ["children", "className"]);
|
|
1205
|
+
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 }) }));
|
|
1206
|
+
}
|
|
1207
|
+
|
|
1208
|
+
// src/components/ui/SettingsLayout.tsx
|
|
1209
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
1210
|
+
function SettingsNav(_a) {
|
|
1211
|
+
var _b = _a, { groups, className } = _b, props = __objRest(_b, ["groups", "className"]);
|
|
1212
|
+
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: [
|
|
1213
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("h3", { children: group.label }),
|
|
1214
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "ph-settings-nav__items", children: group.items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
1215
|
+
"a",
|
|
1216
|
+
{
|
|
1217
|
+
href: item.href,
|
|
1218
|
+
className: cn("ph-settings-nav__item", item.active && "ph-settings-nav__item--active"),
|
|
1219
|
+
"aria-current": item.active ? "page" : void 0,
|
|
1220
|
+
children: [
|
|
1221
|
+
item.icon ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "ph-settings-nav__icon", children: item.icon }) : null,
|
|
1222
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { children: item.label }),
|
|
1223
|
+
item.badge ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "ph-settings-nav__badge", children: item.badge }) : null
|
|
1224
|
+
]
|
|
1225
|
+
},
|
|
1226
|
+
item.id
|
|
1227
|
+
)) })
|
|
1228
|
+
] }, index)) }));
|
|
1229
|
+
}
|
|
1230
|
+
function SettingsLayout(_a) {
|
|
1231
|
+
var _b = _a, {
|
|
1232
|
+
title,
|
|
1233
|
+
description,
|
|
1234
|
+
actions,
|
|
1235
|
+
navigation,
|
|
1236
|
+
navigationLabel = "Settings",
|
|
1237
|
+
children,
|
|
1238
|
+
className
|
|
1239
|
+
} = _b, props = __objRest(_b, [
|
|
1240
|
+
"title",
|
|
1241
|
+
"description",
|
|
1242
|
+
"actions",
|
|
1243
|
+
"navigation",
|
|
1244
|
+
"navigationLabel",
|
|
1245
|
+
"children",
|
|
1246
|
+
"className"
|
|
1247
|
+
]);
|
|
1248
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("section", __spreadProps(__spreadValues({ className: cn("ph-settings-layout", className) }, props), { children: [
|
|
1249
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("header", { className: "ph-settings-layout__header", children: [
|
|
1250
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { children: [
|
|
1251
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("h2", { children: title }),
|
|
1252
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { children: description }) : null
|
|
1253
|
+
] }),
|
|
1254
|
+
actions ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "ph-settings-layout__actions", children: actions }) : null
|
|
1255
|
+
] }),
|
|
1256
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("details", { className: "ph-settings-layout__mobile-nav", children: [
|
|
1257
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("summary", { children: [
|
|
1258
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(IconTuning, { className: "h-4 w-4", "aria-hidden": true }),
|
|
1259
|
+
"Settings menu"
|
|
1260
|
+
] }),
|
|
1261
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("nav", { "aria-label": navigationLabel, children: navigation })
|
|
1262
|
+
] }),
|
|
1263
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "ph-settings-layout__grid", children: [
|
|
1264
|
+
/* @__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 }) }),
|
|
1265
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "ph-settings-layout__content", children })
|
|
1266
|
+
] })
|
|
1267
|
+
] }));
|
|
1268
|
+
}
|
|
1269
|
+
|
|
1270
|
+
// src/components/ui/DropdownMenu.tsx
|
|
1271
|
+
var DropdownPrimitive = __toESM(require("@radix-ui/react-dropdown-menu"));
|
|
1272
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
1273
|
+
var sizeClass2 = {
|
|
1274
|
+
xs: "ph-btn-xs",
|
|
1275
|
+
sm: "ph-btn-sm",
|
|
1276
|
+
md: "",
|
|
1277
|
+
lg: "ph-btn-lg"
|
|
1278
|
+
};
|
|
1279
|
+
var variantClass2 = {
|
|
1280
|
+
primary: "ph-btn-primary",
|
|
1281
|
+
secondary: "ph-btn-secondary",
|
|
1282
|
+
accent: "ph-btn-accent"
|
|
1283
|
+
};
|
|
1284
|
+
function DropdownContent({
|
|
1285
|
+
children,
|
|
1286
|
+
align = "start",
|
|
1287
|
+
side = "bottom",
|
|
1288
|
+
sideOffset = 7,
|
|
1289
|
+
alignOffset = 0,
|
|
1290
|
+
collisionPadding = 8,
|
|
1291
|
+
avoidCollisions = true,
|
|
1292
|
+
panelClassName
|
|
1293
|
+
}) {
|
|
1294
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(DropdownPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
1295
|
+
DropdownPrimitive.Content,
|
|
1296
|
+
{
|
|
1297
|
+
className: cn("ph-dropdown-panel", panelClassName),
|
|
1298
|
+
align,
|
|
1299
|
+
side,
|
|
1300
|
+
sideOffset,
|
|
1301
|
+
alignOffset,
|
|
1302
|
+
collisionPadding,
|
|
1303
|
+
avoidCollisions,
|
|
1304
|
+
sticky: "partial",
|
|
1305
|
+
children: [
|
|
1306
|
+
children,
|
|
1307
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(DropdownPrimitive.Arrow, { className: "ph-dropdown-arrow", width: 12, height: 6 })
|
|
1308
|
+
]
|
|
1309
|
+
}
|
|
1310
|
+
) });
|
|
1311
|
+
}
|
|
1312
|
+
function DropdownMenu(_a) {
|
|
1313
|
+
var _b = _a, {
|
|
1314
|
+
trigger,
|
|
1315
|
+
children,
|
|
1316
|
+
align,
|
|
1317
|
+
side,
|
|
1318
|
+
sideOffset,
|
|
1319
|
+
alignOffset,
|
|
1320
|
+
collisionPadding,
|
|
1321
|
+
avoidCollisions,
|
|
1322
|
+
className,
|
|
1323
|
+
panelClassName,
|
|
1324
|
+
"aria-label": ariaLabel,
|
|
1325
|
+
open,
|
|
1326
|
+
defaultOpen,
|
|
1327
|
+
onOpenChange,
|
|
1328
|
+
modal = false,
|
|
1329
|
+
disabled
|
|
1330
|
+
} = _b, props = __objRest(_b, [
|
|
1331
|
+
"trigger",
|
|
1332
|
+
"children",
|
|
1333
|
+
"align",
|
|
1334
|
+
"side",
|
|
1335
|
+
"sideOffset",
|
|
1336
|
+
"alignOffset",
|
|
1337
|
+
"collisionPadding",
|
|
1338
|
+
"avoidCollisions",
|
|
1339
|
+
"className",
|
|
1340
|
+
"panelClassName",
|
|
1341
|
+
"aria-label",
|
|
1342
|
+
"open",
|
|
1343
|
+
"defaultOpen",
|
|
1344
|
+
"onOpenChange",
|
|
1345
|
+
"modal",
|
|
1346
|
+
"disabled"
|
|
1347
|
+
]);
|
|
1348
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", __spreadProps(__spreadValues({ className: cn("ph-dropdown", className) }, props), { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
1349
|
+
DropdownPrimitive.Root,
|
|
1350
|
+
{
|
|
1351
|
+
open,
|
|
1352
|
+
defaultOpen,
|
|
1353
|
+
onOpenChange,
|
|
1354
|
+
modal,
|
|
1355
|
+
children: [
|
|
1356
|
+
/* @__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 }) }),
|
|
1357
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1358
|
+
DropdownContent,
|
|
1359
|
+
{
|
|
1360
|
+
align,
|
|
1361
|
+
side,
|
|
1362
|
+
sideOffset,
|
|
1363
|
+
alignOffset,
|
|
1364
|
+
collisionPadding,
|
|
1365
|
+
avoidCollisions,
|
|
1366
|
+
panelClassName,
|
|
1367
|
+
children
|
|
1368
|
+
}
|
|
1369
|
+
)
|
|
1370
|
+
]
|
|
1371
|
+
}
|
|
1372
|
+
) }));
|
|
1373
|
+
}
|
|
1374
|
+
function DropdownButton(_a) {
|
|
1375
|
+
var _b = _a, {
|
|
1376
|
+
label,
|
|
1377
|
+
variant = "secondary",
|
|
1378
|
+
outline = false,
|
|
1379
|
+
size = "md",
|
|
1380
|
+
split = false,
|
|
1381
|
+
icon,
|
|
1382
|
+
sideIcon,
|
|
1383
|
+
children,
|
|
1384
|
+
align,
|
|
1385
|
+
side,
|
|
1386
|
+
sideOffset,
|
|
1387
|
+
alignOffset,
|
|
1388
|
+
collisionPadding,
|
|
1389
|
+
avoidCollisions,
|
|
1390
|
+
className,
|
|
1391
|
+
panelClassName,
|
|
1392
|
+
"aria-label": ariaLabel,
|
|
1393
|
+
open,
|
|
1394
|
+
defaultOpen,
|
|
1395
|
+
onOpenChange,
|
|
1396
|
+
modal = false,
|
|
1397
|
+
disabled
|
|
1398
|
+
} = _b, props = __objRest(_b, [
|
|
1399
|
+
"label",
|
|
1400
|
+
"variant",
|
|
1401
|
+
"outline",
|
|
1402
|
+
"size",
|
|
1403
|
+
"split",
|
|
1404
|
+
"icon",
|
|
1405
|
+
"sideIcon",
|
|
1406
|
+
"children",
|
|
1407
|
+
"align",
|
|
1408
|
+
"side",
|
|
1409
|
+
"sideOffset",
|
|
1410
|
+
"alignOffset",
|
|
1411
|
+
"collisionPadding",
|
|
1412
|
+
"avoidCollisions",
|
|
1413
|
+
"className",
|
|
1414
|
+
"panelClassName",
|
|
1415
|
+
"aria-label",
|
|
1416
|
+
"open",
|
|
1417
|
+
"defaultOpen",
|
|
1418
|
+
"onOpenChange",
|
|
1419
|
+
"modal",
|
|
1420
|
+
"disabled"
|
|
1421
|
+
]);
|
|
1422
|
+
const trailing = sideIcon != null ? sideIcon : /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(IconChevronDown, { className: "h-4 w-4", "aria-hidden": true });
|
|
1423
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", __spreadProps(__spreadValues({ className: cn("ph-dropdown", className) }, props), { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
1424
|
+
DropdownPrimitive.Root,
|
|
1425
|
+
{
|
|
1426
|
+
open,
|
|
1427
|
+
defaultOpen,
|
|
1428
|
+
onOpenChange,
|
|
1429
|
+
modal,
|
|
1430
|
+
children: [
|
|
1431
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(DropdownPrimitive.Trigger, { asChild: true, disabled, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1432
|
+
"button",
|
|
1433
|
+
{
|
|
1434
|
+
type: "button",
|
|
1435
|
+
disabled,
|
|
1436
|
+
className: cn(
|
|
1437
|
+
"ph-btn ph-btn-raised ph-dropdown-button",
|
|
1438
|
+
variantClass2[variant],
|
|
1439
|
+
outline && "ph-btn-outline",
|
|
1440
|
+
sizeClass2[size],
|
|
1441
|
+
split && "ph-btn-split"
|
|
1442
|
+
),
|
|
1443
|
+
"aria-label": ariaLabel,
|
|
1444
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(ButtonChrome, { label, icon, sideIcon: trailing, split })
|
|
1445
|
+
}
|
|
1446
|
+
) }),
|
|
1447
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1448
|
+
DropdownContent,
|
|
1449
|
+
{
|
|
1450
|
+
align,
|
|
1451
|
+
side,
|
|
1452
|
+
sideOffset,
|
|
1453
|
+
alignOffset,
|
|
1454
|
+
collisionPadding,
|
|
1455
|
+
avoidCollisions,
|
|
1456
|
+
panelClassName,
|
|
1457
|
+
children
|
|
1458
|
+
}
|
|
1459
|
+
)
|
|
1460
|
+
]
|
|
1461
|
+
}
|
|
1462
|
+
) }));
|
|
1463
|
+
}
|
|
1464
|
+
function DropdownItem(_a) {
|
|
1465
|
+
var _b = _a, { className, children, disabled } = _b, props = __objRest(_b, ["className", "children", "disabled"]);
|
|
1466
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(DropdownPrimitive.Item, { asChild: true, disabled, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1467
|
+
"button",
|
|
1468
|
+
__spreadProps(__spreadValues({
|
|
1469
|
+
type: "button",
|
|
1470
|
+
disabled,
|
|
1471
|
+
className: cn("ph-dropdown-item w-full text-left", className)
|
|
1472
|
+
}, props), {
|
|
1473
|
+
children
|
|
1474
|
+
})
|
|
1475
|
+
) });
|
|
1476
|
+
}
|
|
1477
|
+
function DropdownRadioGroup(props) {
|
|
1478
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(DropdownPrimitive.RadioGroup, __spreadValues({}, props));
|
|
1479
|
+
}
|
|
1480
|
+
function DropdownRadioItem(_a) {
|
|
1481
|
+
var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
|
|
1482
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(DropdownPrimitive.RadioItem, __spreadProps(__spreadValues({ className: cn("ph-dropdown-item ph-dropdown-radio-item", className) }, props), { children: [
|
|
1483
|
+
/* @__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" }) }) }),
|
|
1484
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { children })
|
|
1485
|
+
] }));
|
|
1486
|
+
}
|
|
1487
|
+
|
|
1488
|
+
// src/components/ui/Input.tsx
|
|
1489
|
+
var import_react10 = require("react");
|
|
1490
|
+
|
|
1491
|
+
// src/components/ui/FormField.tsx
|
|
1492
|
+
var import_react9 = require("react");
|
|
1493
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
1494
|
+
function FormField(_a) {
|
|
1495
|
+
var _b = _a, {
|
|
1496
|
+
controlId,
|
|
1497
|
+
label,
|
|
1498
|
+
hideLabel = false,
|
|
1499
|
+
helperText,
|
|
1500
|
+
error,
|
|
1501
|
+
required = false,
|
|
1502
|
+
disabled = false,
|
|
1503
|
+
children,
|
|
1504
|
+
className
|
|
1505
|
+
} = _b, props = __objRest(_b, [
|
|
1506
|
+
"controlId",
|
|
1507
|
+
"label",
|
|
1508
|
+
"hideLabel",
|
|
1509
|
+
"helperText",
|
|
1510
|
+
"error",
|
|
1511
|
+
"required",
|
|
1512
|
+
"disabled",
|
|
1513
|
+
"children",
|
|
1514
|
+
"className"
|
|
1515
|
+
]);
|
|
1516
|
+
const generatedId = (0, import_react9.useId)();
|
|
1517
|
+
const id = controlId != null ? controlId : generatedId;
|
|
1518
|
+
const descriptionId = helperText && !error ? `${id}-description` : void 0;
|
|
1519
|
+
const errorId = error ? `${id}-error` : void 0;
|
|
1520
|
+
const controlProps = {
|
|
1521
|
+
id,
|
|
1522
|
+
"aria-describedby": descriptionId,
|
|
1523
|
+
"aria-errormessage": errorId,
|
|
1524
|
+
"aria-invalid": error ? true : void 0
|
|
1525
|
+
};
|
|
1526
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", __spreadProps(__spreadValues({ className: cn("ph-field", className) }, props), { children: [
|
|
1527
|
+
label ? /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
1528
|
+
"label",
|
|
1529
|
+
{
|
|
1530
|
+
htmlFor: id,
|
|
1531
|
+
className: cn("ph-label", hideLabel && "sr-only", disabled && "opacity-50"),
|
|
1532
|
+
children: [
|
|
1533
|
+
label,
|
|
1534
|
+
required ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { "aria-hidden": "true", children: " *" }) : null
|
|
1535
|
+
]
|
|
1536
|
+
}
|
|
1537
|
+
) : null,
|
|
1538
|
+
typeof children === "function" ? children(controlProps) : children,
|
|
1539
|
+
descriptionId ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { id: descriptionId, className: "mt-1 text-xs text-ph-subtle", children: helperText }) : null,
|
|
1540
|
+
errorId ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { id: errorId, className: "mt-1 text-xs font-medium text-ph-danger", children: error }) : null
|
|
1541
|
+
] }));
|
|
1542
|
+
}
|
|
1543
|
+
|
|
1544
|
+
// src/components/ui/Input.tsx
|
|
1545
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
1546
|
+
var sizeMap3 = {
|
|
1547
|
+
sm: "ph-input-sm",
|
|
1548
|
+
md: "",
|
|
1549
|
+
lg: "ph-input-lg"
|
|
1550
|
+
};
|
|
1551
|
+
function joinIds(...ids) {
|
|
1552
|
+
const value = ids.filter(Boolean).join(" ");
|
|
1553
|
+
return value || void 0;
|
|
1554
|
+
}
|
|
1555
|
+
var Input = (0, import_react10.forwardRef)(function Input2(_a, ref) {
|
|
1556
|
+
var _b = _a, {
|
|
1557
|
+
id: idProp,
|
|
1558
|
+
label,
|
|
1559
|
+
hideLabel = false,
|
|
1560
|
+
error,
|
|
1561
|
+
helperText,
|
|
1562
|
+
size = "md",
|
|
1563
|
+
variant = "default",
|
|
1564
|
+
className,
|
|
1565
|
+
wrapperClassName,
|
|
1566
|
+
disabled,
|
|
1567
|
+
required,
|
|
1568
|
+
"aria-describedby": ariaDescribedBy
|
|
1569
|
+
} = _b, props = __objRest(_b, [
|
|
1570
|
+
"id",
|
|
1571
|
+
"label",
|
|
1572
|
+
"hideLabel",
|
|
1573
|
+
"error",
|
|
1574
|
+
"helperText",
|
|
1575
|
+
"size",
|
|
1576
|
+
"variant",
|
|
1577
|
+
"className",
|
|
1578
|
+
"wrapperClassName",
|
|
1579
|
+
"disabled",
|
|
1580
|
+
"required",
|
|
1581
|
+
"aria-describedby"
|
|
1582
|
+
]);
|
|
1583
|
+
const autoId = (0, import_react10.useId)();
|
|
1584
|
+
const id = idProp != null ? idProp : autoId;
|
|
1585
|
+
const hasError = Boolean(error);
|
|
1586
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1587
|
+
FormField,
|
|
1588
|
+
{
|
|
1589
|
+
controlId: id,
|
|
1590
|
+
label,
|
|
1591
|
+
hideLabel,
|
|
1592
|
+
helperText,
|
|
1593
|
+
error,
|
|
1594
|
+
required,
|
|
1595
|
+
disabled,
|
|
1596
|
+
className: wrapperClassName,
|
|
1597
|
+
children: (fieldProps) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1598
|
+
"input",
|
|
1599
|
+
__spreadValues(__spreadProps(__spreadValues({}, fieldProps), {
|
|
1600
|
+
ref,
|
|
1601
|
+
disabled,
|
|
1602
|
+
required,
|
|
1603
|
+
"aria-describedby": joinIds(ariaDescribedBy, fieldProps["aria-describedby"]),
|
|
1604
|
+
className: cn(
|
|
1605
|
+
"ph-input w-full",
|
|
1606
|
+
sizeMap3[size],
|
|
1607
|
+
variant === "ghost" && "ph-input-ghost",
|
|
1608
|
+
hasError && "ph-input-error",
|
|
1609
|
+
disabled && "cursor-not-allowed opacity-60",
|
|
1610
|
+
className
|
|
1611
|
+
)
|
|
1612
|
+
}), props)
|
|
1613
|
+
)
|
|
1614
|
+
}
|
|
1615
|
+
);
|
|
1616
|
+
});
|
|
1617
|
+
Input.displayName = "Input";
|
|
1618
|
+
var Select = (0, import_react10.forwardRef)(function Select2(_a, ref) {
|
|
1619
|
+
var _b = _a, {
|
|
1620
|
+
id: idProp,
|
|
1621
|
+
label,
|
|
1622
|
+
hideLabel = false,
|
|
1623
|
+
error,
|
|
1624
|
+
helperText,
|
|
1625
|
+
size = "md",
|
|
1626
|
+
className,
|
|
1627
|
+
wrapperClassName,
|
|
1628
|
+
disabled,
|
|
1629
|
+
children,
|
|
1630
|
+
required,
|
|
1631
|
+
"aria-describedby": ariaDescribedBy
|
|
1632
|
+
} = _b, props = __objRest(_b, [
|
|
1633
|
+
"id",
|
|
1634
|
+
"label",
|
|
1635
|
+
"hideLabel",
|
|
1636
|
+
"error",
|
|
1637
|
+
"helperText",
|
|
1638
|
+
"size",
|
|
1639
|
+
"className",
|
|
1640
|
+
"wrapperClassName",
|
|
1641
|
+
"disabled",
|
|
1642
|
+
"children",
|
|
1643
|
+
"required",
|
|
1644
|
+
"aria-describedby"
|
|
1645
|
+
]);
|
|
1646
|
+
const autoId = (0, import_react10.useId)();
|
|
1647
|
+
const id = idProp != null ? idProp : autoId;
|
|
1648
|
+
const hasError = Boolean(error);
|
|
1649
|
+
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)(
|
|
1650
|
+
"select",
|
|
1651
|
+
__spreadProps(__spreadValues(__spreadProps(__spreadValues({}, fieldProps), {
|
|
1652
|
+
ref,
|
|
1653
|
+
disabled,
|
|
1654
|
+
required,
|
|
1655
|
+
"aria-describedby": joinIds(ariaDescribedBy, fieldProps["aria-describedby"]),
|
|
1656
|
+
className: cn(
|
|
1657
|
+
"ph-select w-full",
|
|
1658
|
+
sizeMap3[size],
|
|
1659
|
+
hasError && "ph-input-error",
|
|
1660
|
+
disabled && "cursor-not-allowed opacity-60",
|
|
1661
|
+
className
|
|
1662
|
+
)
|
|
1663
|
+
}), props), {
|
|
1664
|
+
children
|
|
1665
|
+
})
|
|
1666
|
+
) });
|
|
1667
|
+
});
|
|
1668
|
+
Select.displayName = "Select";
|
|
1669
|
+
var Textarea = (0, import_react10.forwardRef)(function Textarea2(_a, ref) {
|
|
1670
|
+
var _b = _a, {
|
|
1671
|
+
id: idProp,
|
|
1672
|
+
label,
|
|
1673
|
+
hideLabel = false,
|
|
1674
|
+
error,
|
|
1675
|
+
helperText,
|
|
1676
|
+
size = "md",
|
|
1677
|
+
className,
|
|
1678
|
+
wrapperClassName,
|
|
1679
|
+
disabled,
|
|
1680
|
+
required,
|
|
1681
|
+
"aria-describedby": ariaDescribedBy
|
|
1682
|
+
} = _b, props = __objRest(_b, [
|
|
1683
|
+
"id",
|
|
1684
|
+
"label",
|
|
1685
|
+
"hideLabel",
|
|
1686
|
+
"error",
|
|
1687
|
+
"helperText",
|
|
1688
|
+
"size",
|
|
1689
|
+
"className",
|
|
1690
|
+
"wrapperClassName",
|
|
1691
|
+
"disabled",
|
|
1692
|
+
"required",
|
|
1693
|
+
"aria-describedby"
|
|
1694
|
+
]);
|
|
1695
|
+
const autoId = (0, import_react10.useId)();
|
|
1696
|
+
const id = idProp != null ? idProp : autoId;
|
|
1697
|
+
const hasError = Boolean(error);
|
|
1698
|
+
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)(
|
|
1699
|
+
"textarea",
|
|
1700
|
+
__spreadValues(__spreadProps(__spreadValues({}, fieldProps), {
|
|
1701
|
+
ref,
|
|
1702
|
+
disabled,
|
|
1703
|
+
required,
|
|
1704
|
+
"aria-describedby": joinIds(ariaDescribedBy, fieldProps["aria-describedby"]),
|
|
1705
|
+
className: cn(
|
|
1706
|
+
"ph-textarea w-full",
|
|
1707
|
+
sizeMap3[size],
|
|
1708
|
+
hasError && "ph-input-error",
|
|
1709
|
+
disabled && "cursor-not-allowed opacity-60",
|
|
1710
|
+
className
|
|
1711
|
+
)
|
|
1712
|
+
}), props)
|
|
1713
|
+
) });
|
|
1714
|
+
});
|
|
1715
|
+
Textarea.displayName = "Textarea";
|
|
1716
|
+
var Checkbox = (0, import_react10.forwardRef)(function Checkbox2(_a, ref) {
|
|
1717
|
+
var _b = _a, {
|
|
1718
|
+
id: idProp,
|
|
1719
|
+
label,
|
|
1720
|
+
error,
|
|
1721
|
+
helperText,
|
|
1722
|
+
className,
|
|
1723
|
+
wrapperClassName,
|
|
1724
|
+
disabled,
|
|
1725
|
+
"aria-describedby": ariaDescribedBy
|
|
1726
|
+
} = _b, props = __objRest(_b, [
|
|
1727
|
+
"id",
|
|
1728
|
+
"label",
|
|
1729
|
+
"error",
|
|
1730
|
+
"helperText",
|
|
1731
|
+
"className",
|
|
1732
|
+
"wrapperClassName",
|
|
1733
|
+
"disabled",
|
|
1734
|
+
"aria-describedby"
|
|
1735
|
+
]);
|
|
1736
|
+
const autoId = (0, import_react10.useId)();
|
|
1737
|
+
const id = idProp != null ? idProp : autoId;
|
|
1738
|
+
const hasError = Boolean(error);
|
|
1739
|
+
const descriptionId = helperText && !hasError ? `${id}-description` : void 0;
|
|
1740
|
+
const errorId = error ? `${id}-error` : void 0;
|
|
1741
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: cn("ph-control-row", wrapperClassName), children: [
|
|
1742
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("span", { className: "ph-checkbox-wrap", children: [
|
|
1743
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1744
|
+
"input",
|
|
1745
|
+
__spreadValues({
|
|
1746
|
+
ref,
|
|
1747
|
+
id,
|
|
1748
|
+
type: "checkbox",
|
|
1749
|
+
disabled,
|
|
1750
|
+
"aria-invalid": hasError || void 0,
|
|
1751
|
+
"aria-describedby": joinIds(ariaDescribedBy, descriptionId),
|
|
1752
|
+
"aria-errormessage": errorId,
|
|
1753
|
+
className: cn(
|
|
1754
|
+
"ph-checkbox",
|
|
1755
|
+
hasError && "border-ph-danger",
|
|
1756
|
+
disabled && "cursor-not-allowed opacity-60",
|
|
1757
|
+
className
|
|
1758
|
+
)
|
|
1759
|
+
}, props)
|
|
1760
|
+
),
|
|
1761
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(IconCheck, { className: "ph-checkbox-icon", "aria-hidden": true })
|
|
1762
|
+
] }),
|
|
1763
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "ph-control-copy", children: [
|
|
1764
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("label", { htmlFor: id, className: cn("cursor-pointer", disabled && "opacity-60"), children: label }),
|
|
1765
|
+
descriptionId ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { id: descriptionId, className: "text-xs text-ph-subtle", children: helperText }) : null,
|
|
1766
|
+
errorId ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { id: errorId, className: "text-xs font-medium text-ph-danger", children: error }) : null
|
|
1767
|
+
] })
|
|
1768
|
+
] });
|
|
1769
|
+
});
|
|
1770
|
+
Checkbox.displayName = "Checkbox";
|
|
1771
|
+
var Radio = (0, import_react10.forwardRef)(function Radio2(_a, ref) {
|
|
1772
|
+
var _b = _a, {
|
|
1773
|
+
id: idProp,
|
|
1774
|
+
label,
|
|
1775
|
+
className,
|
|
1776
|
+
wrapperClassName,
|
|
1777
|
+
disabled
|
|
1778
|
+
} = _b, props = __objRest(_b, [
|
|
1779
|
+
"id",
|
|
1780
|
+
"label",
|
|
1781
|
+
"className",
|
|
1782
|
+
"wrapperClassName",
|
|
1783
|
+
"disabled"
|
|
1784
|
+
]);
|
|
1785
|
+
const autoId = (0, import_react10.useId)();
|
|
1786
|
+
const id = idProp != null ? idProp : autoId;
|
|
1787
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: cn("ph-control-row", wrapperClassName, disabled && "opacity-60"), children: [
|
|
1788
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1789
|
+
"input",
|
|
1790
|
+
__spreadValues({
|
|
1791
|
+
ref,
|
|
1792
|
+
id,
|
|
1793
|
+
type: "radio",
|
|
1794
|
+
disabled,
|
|
1795
|
+
className: cn("ph-radio", disabled && "cursor-not-allowed", className)
|
|
1796
|
+
}, props)
|
|
1797
|
+
),
|
|
1798
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("label", { htmlFor: id, className: cn("cursor-pointer", disabled && "opacity-60"), children: label })
|
|
1799
|
+
] });
|
|
1800
|
+
});
|
|
1801
|
+
Radio.displayName = "Radio";
|
|
1802
|
+
var Toggle = (0, import_react10.forwardRef)(function Toggle2(_a, ref) {
|
|
1803
|
+
var _b = _a, {
|
|
1804
|
+
id: idProp,
|
|
1805
|
+
label,
|
|
1806
|
+
className,
|
|
1807
|
+
wrapperClassName,
|
|
1808
|
+
disabled
|
|
1809
|
+
} = _b, props = __objRest(_b, [
|
|
1810
|
+
"id",
|
|
1811
|
+
"label",
|
|
1812
|
+
"className",
|
|
1813
|
+
"wrapperClassName",
|
|
1814
|
+
"disabled"
|
|
1815
|
+
]);
|
|
1816
|
+
const autoId = (0, import_react10.useId)();
|
|
1817
|
+
const id = idProp != null ? idProp : autoId;
|
|
1818
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("label", { className: cn("ph-control-row-between", wrapperClassName, disabled && "opacity-60"), children: [
|
|
1819
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: disabled ? "opacity-60" : void 0, children: label }),
|
|
1820
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1821
|
+
"input",
|
|
1822
|
+
__spreadValues({
|
|
1823
|
+
ref,
|
|
1824
|
+
id,
|
|
1825
|
+
type: "checkbox",
|
|
1826
|
+
role: "switch",
|
|
1827
|
+
disabled,
|
|
1828
|
+
className: cn("ph-toggle", disabled && "cursor-not-allowed", className)
|
|
1829
|
+
}, props)
|
|
1830
|
+
)
|
|
1831
|
+
] });
|
|
1832
|
+
});
|
|
1833
|
+
Toggle.displayName = "Toggle";
|
|
1834
|
+
var Range = (0, import_react10.forwardRef)(function Range2(_a, ref) {
|
|
1835
|
+
var _b = _a, {
|
|
1836
|
+
id: idProp,
|
|
1837
|
+
label,
|
|
1838
|
+
minLabel,
|
|
1839
|
+
maxLabel,
|
|
1840
|
+
valueLabel,
|
|
1841
|
+
wrapperClassName,
|
|
1842
|
+
className
|
|
1843
|
+
} = _b, props = __objRest(_b, [
|
|
1844
|
+
"id",
|
|
1845
|
+
"label",
|
|
1846
|
+
"minLabel",
|
|
1847
|
+
"maxLabel",
|
|
1848
|
+
"valueLabel",
|
|
1849
|
+
"wrapperClassName",
|
|
1850
|
+
"className"
|
|
1851
|
+
]);
|
|
1852
|
+
const autoId = (0, import_react10.useId)();
|
|
1853
|
+
const id = idProp != null ? idProp : autoId;
|
|
1854
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: cn("ph-field", wrapperClassName), children: [
|
|
1855
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("label", { htmlFor: id, className: "ph-label", children: label }),
|
|
1856
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("input", __spreadValues({ ref, id, type: "range", className: cn("ph-range", className) }, props)),
|
|
1857
|
+
(minLabel || valueLabel || maxLabel) && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex justify-between text-xs text-ph-mutedtext", children: [
|
|
1858
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { children: minLabel }),
|
|
1859
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { children: valueLabel }),
|
|
1860
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { children: maxLabel })
|
|
1861
|
+
] })
|
|
1862
|
+
] });
|
|
1863
|
+
});
|
|
1864
|
+
Range.displayName = "Range";
|
|
1865
|
+
var FileUpload = (0, import_react10.forwardRef)(function FileUpload2(_a, ref) {
|
|
1866
|
+
var _b = _a, {
|
|
1867
|
+
id: idProp,
|
|
1868
|
+
label,
|
|
1869
|
+
prompt = "Drop file or browse",
|
|
1870
|
+
wrapperClassName,
|
|
1871
|
+
className
|
|
1872
|
+
} = _b, props = __objRest(_b, [
|
|
1873
|
+
"id",
|
|
1874
|
+
"label",
|
|
1875
|
+
"prompt",
|
|
1876
|
+
"wrapperClassName",
|
|
1877
|
+
"className"
|
|
1878
|
+
]);
|
|
1879
|
+
const autoId = (0, import_react10.useId)();
|
|
1880
|
+
const id = idProp != null ? idProp : autoId;
|
|
1881
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: cn("ph-field", wrapperClassName), children: [
|
|
1882
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("label", { htmlFor: id, className: "ph-label", children: label }),
|
|
1883
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("label", { htmlFor: id, className: "ph-file-upload", children: [
|
|
1884
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)("input", __spreadValues({ ref, id, type: "file", className: cn("sr-only", className) }, props)),
|
|
1885
|
+
prompt
|
|
1886
|
+
] })
|
|
1887
|
+
] });
|
|
1888
|
+
});
|
|
1889
|
+
FileUpload.displayName = "FileUpload";
|
|
1890
|
+
|
|
1891
|
+
// src/components/ui/Modal.tsx
|
|
1892
|
+
var Dialog = __toESM(require("@radix-ui/react-dialog"));
|
|
1893
|
+
var import_react11 = require("react");
|
|
1894
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
1895
|
+
var sizeMap4 = {
|
|
1896
|
+
sm: "max-w-sm",
|
|
1897
|
+
md: "max-w-lg",
|
|
1898
|
+
lg: "max-w-2xl",
|
|
1899
|
+
xl: "max-w-4xl",
|
|
1900
|
+
full: "max-w-none"
|
|
1901
|
+
};
|
|
1902
|
+
function Modal({
|
|
1903
|
+
open = false,
|
|
1904
|
+
onClose,
|
|
1905
|
+
title,
|
|
1906
|
+
description,
|
|
1907
|
+
children,
|
|
1908
|
+
footer,
|
|
1909
|
+
size = "md",
|
|
1910
|
+
className,
|
|
1911
|
+
showCloseButton = true,
|
|
1912
|
+
closeOnOutsideClick = true,
|
|
1913
|
+
closeOnEscape = true,
|
|
1914
|
+
"aria-label": ariaLabel
|
|
1915
|
+
}) {
|
|
1916
|
+
const canDismiss = Boolean(onClose);
|
|
1917
|
+
const restoreFocusRef = (0, import_react11.useRef)(null);
|
|
1918
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1919
|
+
Dialog.Root,
|
|
1920
|
+
{
|
|
1921
|
+
open,
|
|
1922
|
+
onOpenChange: (nextOpen) => {
|
|
1923
|
+
if (!nextOpen) onClose == null ? void 0 : onClose();
|
|
1924
|
+
},
|
|
1925
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(Dialog.Portal, { children: [
|
|
1926
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Dialog.Overlay, { className: "ph-modal-overlay" }),
|
|
1927
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
1928
|
+
Dialog.Content,
|
|
1929
|
+
__spreadProps(__spreadValues({
|
|
1930
|
+
className: cn("ph-modal-panel", sizeMap4[size], className),
|
|
1931
|
+
"aria-label": ariaLabel
|
|
1932
|
+
}, description ? {} : { "aria-describedby": void 0 }), {
|
|
1933
|
+
onOpenAutoFocus: () => {
|
|
1934
|
+
restoreFocusRef.current = document.activeElement instanceof HTMLElement ? document.activeElement : null;
|
|
1935
|
+
},
|
|
1936
|
+
onCloseAutoFocus: (event) => {
|
|
1937
|
+
var _a;
|
|
1938
|
+
event.preventDefault();
|
|
1939
|
+
(_a = restoreFocusRef.current) == null ? void 0 : _a.focus();
|
|
1940
|
+
},
|
|
1941
|
+
onEscapeKeyDown: (event) => {
|
|
1942
|
+
if (!canDismiss || !closeOnEscape) event.preventDefault();
|
|
1943
|
+
},
|
|
1944
|
+
onPointerDownOutside: (event) => {
|
|
1945
|
+
if (!canDismiss || !closeOnOutsideClick) event.preventDefault();
|
|
1946
|
+
},
|
|
1947
|
+
children: [
|
|
1948
|
+
title ? null : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Dialog.Title, { className: "sr-only", children: ariaLabel != null ? ariaLabel : "Dialog" }),
|
|
1949
|
+
title || description || showCloseButton && canDismiss ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("header", { className: "ph-modal-header", children: [
|
|
1950
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "min-w-0", children: [
|
|
1951
|
+
title ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Dialog.Title, { className: "text-lg font-bold text-ph-ink", children: title }) : null,
|
|
1952
|
+
description ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Dialog.Description, { className: "mt-1 text-sm text-ph-subtle", children: description }) : null
|
|
1953
|
+
] }),
|
|
1954
|
+
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
|
|
1955
|
+
] }) : null,
|
|
1956
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "ph-modal-body", children }),
|
|
1957
|
+
footer ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "ph-modal-footer", children: footer }) : null
|
|
1958
|
+
]
|
|
1959
|
+
})
|
|
1960
|
+
)
|
|
1961
|
+
] })
|
|
1962
|
+
}
|
|
1963
|
+
);
|
|
1964
|
+
}
|
|
1965
|
+
|
|
1966
|
+
// src/components/ui/Navigation.tsx
|
|
1967
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
1968
|
+
function Breadcrumbs({ items, label = "Breadcrumb", className }) {
|
|
1969
|
+
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: [
|
|
1970
|
+
index > 0 ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "ph-breadcrumb-sep", "aria-hidden": "true", children: "/" }) : null,
|
|
1971
|
+
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 })
|
|
1972
|
+
] }, `${item.label}-${index}`)) });
|
|
1973
|
+
}
|
|
1974
|
+
function Pagination({
|
|
1975
|
+
page,
|
|
1976
|
+
totalPages,
|
|
1977
|
+
onPageChange,
|
|
1978
|
+
label = "Pagination",
|
|
1979
|
+
compact = false,
|
|
1980
|
+
className
|
|
1981
|
+
}) {
|
|
1982
|
+
const pages = compact ? [Math.max(1, page - 1), page, Math.min(totalPages, page + 1)] : [1, 2, 3, totalPages];
|
|
1983
|
+
const uniquePages = Array.from(new Set(pages)).filter((n) => n >= 1 && n <= totalPages);
|
|
1984
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("nav", { "aria-label": label, className: cn("ph-pagination", className), children: [
|
|
1985
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1986
|
+
"button",
|
|
1987
|
+
{
|
|
1988
|
+
type: "button",
|
|
1989
|
+
className: "ph-pagination-btn",
|
|
1990
|
+
disabled: page <= 1,
|
|
1991
|
+
"aria-label": "Previous page",
|
|
1992
|
+
onClick: () => onPageChange == null ? void 0 : onPageChange(page - 1),
|
|
1993
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(IconChevronLeft, { className: "mx-auto h-4 w-4", "aria-hidden": true })
|
|
1994
|
+
}
|
|
1995
|
+
),
|
|
1996
|
+
uniquePages.map((pageNumber, index) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("span", { className: "contents", children: [
|
|
1997
|
+
!compact && index === uniquePages.length - 1 && pageNumber > 4 ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "ph-pagination-ellipsis", "aria-hidden": "true", children: "..." }) : null,
|
|
1998
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1999
|
+
"button",
|
|
2000
|
+
{
|
|
2001
|
+
type: "button",
|
|
2002
|
+
className: cn("ph-pagination-btn", pageNumber === page && "ph-pagination-btn-active"),
|
|
2003
|
+
"aria-current": pageNumber === page ? "page" : void 0,
|
|
2004
|
+
onClick: () => onPageChange == null ? void 0 : onPageChange(pageNumber),
|
|
2005
|
+
children: pageNumber
|
|
2006
|
+
}
|
|
2007
|
+
)
|
|
2008
|
+
] }, pageNumber)),
|
|
2009
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
2010
|
+
"button",
|
|
2011
|
+
{
|
|
2012
|
+
type: "button",
|
|
2013
|
+
className: "ph-pagination-btn",
|
|
2014
|
+
disabled: page >= totalPages,
|
|
2015
|
+
"aria-label": "Next page",
|
|
2016
|
+
onClick: () => onPageChange == null ? void 0 : onPageChange(page + 1),
|
|
2017
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(IconChevronRight, { className: "mx-auto h-4 w-4", "aria-hidden": true })
|
|
2018
|
+
}
|
|
2019
|
+
)
|
|
2020
|
+
] });
|
|
2021
|
+
}
|
|
2022
|
+
|
|
2023
|
+
// src/components/ui/Panel.tsx
|
|
2024
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
2025
|
+
function Panel(_a) {
|
|
2026
|
+
var _b = _a, { title, description, children, className } = _b, props = __objRest(_b, ["title", "description", "children", "className"]);
|
|
2027
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", __spreadProps(__spreadValues({ className: cn("ph-panel", className) }, props), { children: [
|
|
2028
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("h3", { className: "text-sm font-semibold uppercase tracking-wider text-ph-mutedtext", children: title }),
|
|
2029
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "text-sm text-ph-subtle", children: description }),
|
|
2030
|
+
children
|
|
2031
|
+
] }));
|
|
2032
|
+
}
|
|
2033
|
+
|
|
2034
|
+
// src/components/ui/Rating.tsx
|
|
2035
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
2036
|
+
function Rating(_a) {
|
|
2037
|
+
var _b = _a, {
|
|
2038
|
+
label,
|
|
2039
|
+
value = 0,
|
|
2040
|
+
max = 5,
|
|
2041
|
+
readOnly = true,
|
|
2042
|
+
onChange,
|
|
2043
|
+
className,
|
|
2044
|
+
wrapperClassName
|
|
2045
|
+
} = _b, props = __objRest(_b, [
|
|
2046
|
+
"label",
|
|
2047
|
+
"value",
|
|
2048
|
+
"max",
|
|
2049
|
+
"readOnly",
|
|
2050
|
+
"onChange",
|
|
2051
|
+
"className",
|
|
2052
|
+
"wrapperClassName"
|
|
2053
|
+
]);
|
|
2054
|
+
const stars = Array.from({ length: max }, (_, index) => index + 1);
|
|
2055
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: cn("ph-field", wrapperClassName), children: [
|
|
2056
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "ph-label", children: label }),
|
|
2057
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
2058
|
+
"div",
|
|
2059
|
+
__spreadProps(__spreadValues({
|
|
2060
|
+
className: cn("ph-rating flex", className),
|
|
2061
|
+
role: readOnly ? "img" : "radiogroup",
|
|
2062
|
+
"aria-label": label != null ? label : `Rating: ${value} out of ${max}`
|
|
2063
|
+
}, props), {
|
|
2064
|
+
children: stars.map((star) => {
|
|
2065
|
+
const active = star <= value;
|
|
2066
|
+
if (readOnly) {
|
|
2067
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
2068
|
+
IconStar,
|
|
2069
|
+
{
|
|
2070
|
+
className: cn("h-6 w-6", active ? "text-amber-500" : "text-ph-border"),
|
|
2071
|
+
"aria-hidden": true
|
|
2072
|
+
},
|
|
2073
|
+
star
|
|
2074
|
+
);
|
|
2075
|
+
}
|
|
2076
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
2077
|
+
"button",
|
|
2078
|
+
{
|
|
2079
|
+
type: "button",
|
|
2080
|
+
className: "rounded p-0.5 transition hover:scale-105 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ph-brand",
|
|
2081
|
+
role: "radio",
|
|
2082
|
+
"aria-checked": active,
|
|
2083
|
+
"aria-label": `${star} out of ${max}`,
|
|
2084
|
+
onClick: () => onChange == null ? void 0 : onChange(star),
|
|
2085
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(IconStar, { className: cn("h-6 w-6", active ? "text-amber-500" : "text-ph-border") })
|
|
2086
|
+
},
|
|
2087
|
+
star
|
|
2088
|
+
);
|
|
2089
|
+
})
|
|
2090
|
+
})
|
|
2091
|
+
)
|
|
2092
|
+
] });
|
|
2093
|
+
}
|
|
2094
|
+
|
|
2095
|
+
// src/components/ui/SearchInput.tsx
|
|
2096
|
+
var import_react12 = require("react");
|
|
2097
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
2098
|
+
function SearchInput(_a) {
|
|
2099
|
+
var _b = _a, {
|
|
2100
|
+
id: idProp,
|
|
2101
|
+
label = "Search",
|
|
2102
|
+
hideLabel = false,
|
|
2103
|
+
shortcut,
|
|
2104
|
+
density = "default",
|
|
2105
|
+
className,
|
|
2106
|
+
wrapperClassName,
|
|
2107
|
+
placeholder
|
|
2108
|
+
} = _b, props = __objRest(_b, [
|
|
2109
|
+
"id",
|
|
2110
|
+
"label",
|
|
2111
|
+
"hideLabel",
|
|
2112
|
+
"shortcut",
|
|
2113
|
+
"density",
|
|
2114
|
+
"className",
|
|
2115
|
+
"wrapperClassName",
|
|
2116
|
+
"placeholder"
|
|
2117
|
+
]);
|
|
2118
|
+
const autoId = (0, import_react12.useId)();
|
|
2119
|
+
const id = idProp != null ? idProp : autoId;
|
|
2120
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: cn("relative", wrapperClassName), children: [
|
|
2121
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("label", { htmlFor: id, className: hideLabel ? "sr-only" : "ph-label mb-1.5 block", children: label }),
|
|
2122
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "relative", children: [
|
|
2123
|
+
shortcut != null ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2124
|
+
"span",
|
|
2125
|
+
{
|
|
2126
|
+
className: "ph-shortcut pointer-events-none absolute left-3 top-1/2 z-10 -translate-y-1/2 text-xs",
|
|
2127
|
+
"aria-hidden": true,
|
|
2128
|
+
children: shortcut
|
|
2129
|
+
}
|
|
2130
|
+
) : null,
|
|
2131
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2132
|
+
"input",
|
|
2133
|
+
__spreadValues({
|
|
2134
|
+
id,
|
|
2135
|
+
type: "search",
|
|
2136
|
+
placeholder,
|
|
2137
|
+
"aria-label": hideLabel ? label : void 0,
|
|
2138
|
+
className: cn(
|
|
2139
|
+
"ph-input w-full",
|
|
2140
|
+
density === "compact" && "max-w-xs !min-h-[2rem] py-1.5 text-sm",
|
|
2141
|
+
shortcut != null && "pl-[3.25rem]",
|
|
2142
|
+
className
|
|
2143
|
+
)
|
|
2144
|
+
}, props)
|
|
2145
|
+
)
|
|
2146
|
+
] })
|
|
2147
|
+
] });
|
|
2148
|
+
}
|
|
2149
|
+
function SearchGroup(_a) {
|
|
2150
|
+
var _b = _a, {
|
|
2151
|
+
id: idProp,
|
|
2152
|
+
label = "Search records",
|
|
2153
|
+
submitLabel = "Search",
|
|
2154
|
+
placeholder = "Persons, actions, flags\u2026",
|
|
2155
|
+
wrapperClassName,
|
|
2156
|
+
className
|
|
2157
|
+
} = _b, props = __objRest(_b, [
|
|
2158
|
+
"id",
|
|
2159
|
+
"label",
|
|
2160
|
+
"submitLabel",
|
|
2161
|
+
"placeholder",
|
|
2162
|
+
"wrapperClassName",
|
|
2163
|
+
"className"
|
|
2164
|
+
]);
|
|
2165
|
+
const autoId = (0, import_react12.useId)();
|
|
2166
|
+
const id = idProp != null ? idProp : autoId;
|
|
2167
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: cn("ph-field", wrapperClassName), children: [
|
|
2168
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("label", { htmlFor: id, className: "ph-label", children: label }),
|
|
2169
|
+
/* @__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: [
|
|
2170
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2171
|
+
"input",
|
|
2172
|
+
__spreadValues({
|
|
2173
|
+
id,
|
|
2174
|
+
type: "search",
|
|
2175
|
+
placeholder,
|
|
2176
|
+
className: cn("ph-input ph-input-group-field min-w-0 flex-1", className)
|
|
2177
|
+
}, props)
|
|
2178
|
+
),
|
|
2179
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
2180
|
+
Button,
|
|
2181
|
+
{
|
|
2182
|
+
type: "submit",
|
|
2183
|
+
variant: "primary",
|
|
2184
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(IconSearch, { className: "h-4 w-4", "aria-hidden": true }),
|
|
2185
|
+
className: "ph-search-group__submit",
|
|
2186
|
+
"aria-label": submitLabel
|
|
2187
|
+
}
|
|
2188
|
+
)
|
|
2189
|
+
] })
|
|
2190
|
+
] });
|
|
2191
|
+
}
|
|
2192
|
+
|
|
2193
|
+
// src/components/ui/Table.tsx
|
|
2194
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
2195
|
+
function Table({
|
|
2196
|
+
data,
|
|
2197
|
+
columns,
|
|
2198
|
+
zebra = false,
|
|
2199
|
+
compact = false,
|
|
2200
|
+
ribbon = false,
|
|
2201
|
+
getRowStyle,
|
|
2202
|
+
className,
|
|
2203
|
+
caption
|
|
2204
|
+
}) {
|
|
2205
|
+
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: [
|
|
2206
|
+
caption && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("caption", { className: "sr-only", children: caption }),
|
|
2207
|
+
/* @__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)) }) }),
|
|
2208
|
+
/* @__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)) })
|
|
2209
|
+
] }) });
|
|
2210
|
+
}
|
|
2211
|
+
|
|
2212
|
+
// src/components/ui/Stat.tsx
|
|
2213
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
2214
|
+
var toneMap = {
|
|
2215
|
+
default: "text-ph-ink",
|
|
2216
|
+
brand: "text-ph-brand",
|
|
2217
|
+
blue: "text-ph-blue",
|
|
2218
|
+
purple: "text-ph-purple",
|
|
2219
|
+
warning: "text-amber-900"
|
|
2220
|
+
};
|
|
2221
|
+
var statMap = {
|
|
2222
|
+
default: "",
|
|
2223
|
+
brand: "",
|
|
2224
|
+
blue: "",
|
|
2225
|
+
purple: "",
|
|
2226
|
+
warning: "border-amber-200 bg-amber-50/70"
|
|
2227
|
+
};
|
|
2228
|
+
function Stat(_a) {
|
|
2229
|
+
var _b = _a, { icon, label, value, footer, tone = "default", className } = _b, props = __objRest(_b, ["icon", "label", "value", "footer", "tone", "className"]);
|
|
2230
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("article", __spreadProps(__spreadValues({ className: cn("ph-stat", statMap[tone], className) }, props), { children: [
|
|
2231
|
+
icon && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: cn("mb-2 h-7 w-7", toneMap[tone]), children: icon }),
|
|
2232
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: cn("ph-stat-label", tone === "warning" && toneMap[tone]), children: label }),
|
|
2233
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: cn("ph-stat-val", toneMap[tone]), children: value }),
|
|
2234
|
+
footer && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { className: "text-xs text-ph-subtle", children: footer })
|
|
2235
|
+
] }));
|
|
2236
|
+
}
|
|
2237
|
+
|
|
2238
|
+
// src/components/ui/Toast.tsx
|
|
2239
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
2240
|
+
var statusConfig2 = {
|
|
2241
|
+
info: { icon: IconErrorOutline, color: "text-ph-info", bg: "ph-toast-info" },
|
|
2242
|
+
success: { icon: IconCheckCircle, color: "text-ph-success", bg: "ph-toast-success" },
|
|
2243
|
+
warning: { icon: IconExclamation, color: "text-ph-warning", bg: "ph-toast-warning" },
|
|
2244
|
+
danger: { icon: IconCancel, color: "text-ph-danger", bg: "ph-toast-danger" }
|
|
2245
|
+
};
|
|
2246
|
+
function Toast({
|
|
2247
|
+
status = "info",
|
|
2248
|
+
title,
|
|
2249
|
+
description,
|
|
2250
|
+
onDismiss,
|
|
2251
|
+
className
|
|
2252
|
+
}) {
|
|
2253
|
+
const config = statusConfig2[status];
|
|
2254
|
+
const Icon = config.icon;
|
|
2255
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: cn("ph-toast", config.bg, className), children: [
|
|
2256
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Icon, { className: cn("mt-0.5 h-5 w-5 shrink-0", config.color), "aria-hidden": true }),
|
|
2257
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "pr-8", children: [
|
|
2258
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "font-semibold", children: title }),
|
|
2259
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("p", { className: "mt-1 text-xs text-ph-subtle", children: description })
|
|
2260
|
+
] }),
|
|
2261
|
+
onDismiss && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
2262
|
+
"button",
|
|
2263
|
+
{
|
|
2264
|
+
type: "button",
|
|
2265
|
+
"aria-label": `Dismiss ${title}`,
|
|
2266
|
+
className: "absolute right-2 top-2 ph-btn ph-btn-ghost ph-btn-xs ph-btn-circle",
|
|
2267
|
+
onClick: onDismiss,
|
|
2268
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(IconClose, { className: "h-4 w-4" })
|
|
2269
|
+
}
|
|
2270
|
+
)
|
|
2271
|
+
] });
|
|
2272
|
+
}
|
|
2273
|
+
function ToastStack({ children, className }) {
|
|
2274
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: cn("ph-toast-stack", className), children });
|
|
2275
|
+
}
|
|
2276
|
+
|
|
2277
|
+
// src/components/ui/Tabs.tsx
|
|
2278
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
2279
|
+
function Tabs({ items, value, onChange, variant = "pill", className }) {
|
|
2280
|
+
if (variant === "underline") {
|
|
2281
|
+
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)(
|
|
2282
|
+
"button",
|
|
2283
|
+
{
|
|
2284
|
+
type: "button",
|
|
2285
|
+
onClick: () => onChange(item.value),
|
|
2286
|
+
className: cn(
|
|
2287
|
+
"-mb-px border-b-2 pb-2 text-sm font-semibold transition",
|
|
2288
|
+
value === item.value ? "border-ph-brand text-ph-ink" : "border-transparent text-ph-mutedtext hover:text-ph-ink"
|
|
2289
|
+
),
|
|
2290
|
+
children: item.label
|
|
2291
|
+
},
|
|
2292
|
+
item.value
|
|
2293
|
+
)) });
|
|
2294
|
+
}
|
|
2295
|
+
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)(
|
|
2296
|
+
"button",
|
|
2297
|
+
{
|
|
2298
|
+
type: "button",
|
|
2299
|
+
onClick: () => onChange(item.value),
|
|
2300
|
+
className: cn("ph-tab", value === item.value && "ph-tab-active"),
|
|
2301
|
+
children: item.label
|
|
2302
|
+
},
|
|
2303
|
+
item.value
|
|
2304
|
+
)) });
|
|
2305
|
+
}
|
|
2306
|
+
|
|
2307
|
+
// src/components/ui/ThemeDomSync.tsx
|
|
2308
|
+
var import_react13 = require("react");
|
|
2309
|
+
|
|
2310
|
+
// src/themes/registry.ts
|
|
2311
|
+
var DEFAULT_THEME_ID = "hedgehog-light";
|
|
2312
|
+
var THEMES = [
|
|
2313
|
+
{
|
|
2314
|
+
id: "hedgehog-light",
|
|
2315
|
+
name: "HedgeHog Light",
|
|
2316
|
+
description: "Default Quill warm greys and orange Lemon chrome.",
|
|
2317
|
+
colorScheme: "light",
|
|
2318
|
+
group: "HedgeHog"
|
|
2319
|
+
},
|
|
2320
|
+
{
|
|
2321
|
+
id: "hedgehog-dark",
|
|
2322
|
+
name: "HedgeHog Dark",
|
|
2323
|
+
description: "Dark app shell with HedgeHog orange accents.",
|
|
2324
|
+
colorScheme: "dark",
|
|
2325
|
+
group: "HedgeHog"
|
|
2326
|
+
},
|
|
2327
|
+
{
|
|
2328
|
+
id: "catppuccin-light",
|
|
2329
|
+
name: "Catppuccin Light",
|
|
2330
|
+
description: "Catppuccin Latte \u2014 soft pastels and mauve accent.",
|
|
2331
|
+
colorScheme: "light",
|
|
2332
|
+
group: "Catppuccin"
|
|
2333
|
+
},
|
|
2334
|
+
{
|
|
2335
|
+
id: "catppuccin-dark",
|
|
2336
|
+
name: "Catppuccin Dark",
|
|
2337
|
+
description: "Catppuccin Mocha \u2014 deep base and lavender peach.",
|
|
2338
|
+
colorScheme: "dark",
|
|
2339
|
+
group: "Catppuccin"
|
|
2340
|
+
},
|
|
2341
|
+
{
|
|
2342
|
+
id: "sheets",
|
|
2343
|
+
name: "Sheets",
|
|
2344
|
+
description: "Spreadsheet green on office neutrals.",
|
|
2345
|
+
colorScheme: "light",
|
|
2346
|
+
group: "Productivity"
|
|
2347
|
+
},
|
|
2348
|
+
{
|
|
2349
|
+
id: "sheets-dark",
|
|
2350
|
+
name: "Sheets Dark",
|
|
2351
|
+
description: "Dark shell with spreadsheet green accent.",
|
|
2352
|
+
colorScheme: "dark",
|
|
2353
|
+
group: "Productivity"
|
|
2354
|
+
},
|
|
2355
|
+
{
|
|
2356
|
+
id: "note",
|
|
2357
|
+
name: "Note",
|
|
2358
|
+
description: "Notebook purple on lavender-white chrome.",
|
|
2359
|
+
colorScheme: "light",
|
|
2360
|
+
group: "Productivity"
|
|
2361
|
+
},
|
|
2362
|
+
{
|
|
2363
|
+
id: "note-dark",
|
|
2364
|
+
name: "Note Dark",
|
|
2365
|
+
description: "Dark notebook purple \u2014 night reading mode.",
|
|
2366
|
+
colorScheme: "dark",
|
|
2367
|
+
group: "Productivity"
|
|
2368
|
+
},
|
|
2369
|
+
{
|
|
2370
|
+
id: "presentation",
|
|
2371
|
+
name: "Presentation",
|
|
2372
|
+
description: "Orange-red on office neutrals.",
|
|
2373
|
+
colorScheme: "light",
|
|
2374
|
+
group: "Productivity"
|
|
2375
|
+
},
|
|
2376
|
+
{
|
|
2377
|
+
id: "presentation-dark",
|
|
2378
|
+
name: "Presentation Dark",
|
|
2379
|
+
description: "Dark shell with orange-red accent.",
|
|
2380
|
+
colorScheme: "dark",
|
|
2381
|
+
group: "Productivity"
|
|
2382
|
+
},
|
|
2383
|
+
{
|
|
2384
|
+
id: "socials",
|
|
2385
|
+
name: "Socials",
|
|
2386
|
+
description: "Meta blue accent on familiar social greys.",
|
|
2387
|
+
colorScheme: "light",
|
|
2388
|
+
group: "Social"
|
|
2389
|
+
},
|
|
2390
|
+
{
|
|
2391
|
+
id: "socials-dark",
|
|
2392
|
+
name: "Socials Dark",
|
|
2393
|
+
description: "Social dark mode \u2014 #18191A base and Meta blue.",
|
|
2394
|
+
colorScheme: "dark",
|
|
2395
|
+
group: "Social"
|
|
2396
|
+
},
|
|
2397
|
+
{
|
|
2398
|
+
id: "chats-light",
|
|
2399
|
+
name: "Chats Light",
|
|
2400
|
+
description: "Aubergine brand on clean workspace neutrals.",
|
|
2401
|
+
colorScheme: "light",
|
|
2402
|
+
group: "Chats"
|
|
2403
|
+
},
|
|
2404
|
+
{
|
|
2405
|
+
id: "chats-dark",
|
|
2406
|
+
name: "Chats Dark",
|
|
2407
|
+
description: "Dark sidebar \u2014 #1A1D21 base and green highlights.",
|
|
2408
|
+
colorScheme: "dark",
|
|
2409
|
+
group: "Chats"
|
|
2410
|
+
},
|
|
2411
|
+
{
|
|
2412
|
+
id: "xenide-light",
|
|
2413
|
+
name: "Xenide Light",
|
|
2414
|
+
description: "xenide.io light \u2014 Excel green + purple on neutral greys.",
|
|
2415
|
+
colorScheme: "light",
|
|
2416
|
+
group: "Xenide"
|
|
2417
|
+
},
|
|
2418
|
+
{
|
|
2419
|
+
id: "xenide-dark",
|
|
2420
|
+
name: "Xenide Dark",
|
|
2421
|
+
description: "xenide.io dark \u2014 #0A0A0F base, emerald green + violet.",
|
|
2422
|
+
colorScheme: "dark",
|
|
2423
|
+
group: "Xenide"
|
|
2424
|
+
},
|
|
2425
|
+
{
|
|
2426
|
+
id: "bikini-bottom",
|
|
2427
|
+
name: "Bikini Bottom",
|
|
2428
|
+
description: "SpongeBob palette \u2014 ocean canvas, readable surfaces, character accents.",
|
|
2429
|
+
colorScheme: "light",
|
|
2430
|
+
group: "Fun"
|
|
2431
|
+
},
|
|
2432
|
+
{
|
|
2433
|
+
id: "bikini-bottom-dark",
|
|
2434
|
+
name: "Bikini Bottom Dark",
|
|
2435
|
+
description: "Bikini Bottom at night \u2014 deep ocean with neon character accents.",
|
|
2436
|
+
colorScheme: "dark",
|
|
2437
|
+
group: "Fun"
|
|
2438
|
+
},
|
|
2439
|
+
{
|
|
2440
|
+
id: "turtletime",
|
|
2441
|
+
name: "TurtleTime",
|
|
2442
|
+
description: "Turtle mascot palette \u2014 shell orange, leaf green, and warm cream.",
|
|
2443
|
+
colorScheme: "light",
|
|
2444
|
+
group: "Fun"
|
|
2445
|
+
},
|
|
2446
|
+
{
|
|
2447
|
+
id: "turtletime-dark",
|
|
2448
|
+
name: "TurtleTime Dark",
|
|
2449
|
+
description: "TurtleTime after dusk \u2014 dark olive shell with bright orange clock accents.",
|
|
2450
|
+
colorScheme: "dark",
|
|
2451
|
+
group: "Fun"
|
|
2452
|
+
},
|
|
2453
|
+
{
|
|
2454
|
+
id: "github-light",
|
|
2455
|
+
name: "GitHub Light",
|
|
2456
|
+
description: "GitHub Primer \u2014 #f6f8fa canvas and emphasis blue accents.",
|
|
2457
|
+
colorScheme: "light",
|
|
2458
|
+
group: "GitHub"
|
|
2459
|
+
},
|
|
2460
|
+
{
|
|
2461
|
+
id: "github-dark",
|
|
2462
|
+
name: "GitHub Dark",
|
|
2463
|
+
description: "GitHub dark dimmed \u2014 #0d1117 base and #4493f8 links.",
|
|
2464
|
+
colorScheme: "dark",
|
|
2465
|
+
group: "GitHub"
|
|
2466
|
+
},
|
|
2467
|
+
{
|
|
2468
|
+
id: "rosepine-light",
|
|
2469
|
+
name: "Ros\xE9 Pine Dawn",
|
|
2470
|
+
description: "Ros\xE9 Pine Dawn \u2014 warm paper base with muted iris accents.",
|
|
2471
|
+
colorScheme: "light",
|
|
2472
|
+
group: "Ros\xE9 Pine"
|
|
2473
|
+
},
|
|
2474
|
+
{
|
|
2475
|
+
id: "rosepine-dark",
|
|
2476
|
+
name: "Ros\xE9 Pine",
|
|
2477
|
+
description: "Ros\xE9 Pine Main \u2014 moonlit base with iris and love accents.",
|
|
2478
|
+
colorScheme: "dark",
|
|
2479
|
+
group: "Ros\xE9 Pine"
|
|
2480
|
+
},
|
|
2481
|
+
{
|
|
2482
|
+
id: "notion",
|
|
2483
|
+
name: "Notion",
|
|
2484
|
+
description: "Notion light \u2014 warm off-white canvas, Notion blue accent, signature dark text.",
|
|
2485
|
+
colorScheme: "light",
|
|
2486
|
+
group: "Productivity"
|
|
2487
|
+
},
|
|
2488
|
+
{
|
|
2489
|
+
id: "notion-dark",
|
|
2490
|
+
name: "Notion Dark",
|
|
2491
|
+
description: "Notion dark mode \u2014 dark charcoal canvas with blue accent and clean typography.",
|
|
2492
|
+
colorScheme: "dark",
|
|
2493
|
+
group: "Productivity"
|
|
2494
|
+
},
|
|
2495
|
+
{
|
|
2496
|
+
id: "deepsea-light",
|
|
2497
|
+
name: "Tokyo Night Day",
|
|
2498
|
+
description: "Tokyo Night Day \u2014 soft bluish greys with vivid blue and purple accents.",
|
|
2499
|
+
colorScheme: "light",
|
|
2500
|
+
group: "Tokyo Night"
|
|
2501
|
+
},
|
|
2502
|
+
{
|
|
2503
|
+
id: "deepsea-dark",
|
|
2504
|
+
name: "Tokyo Night",
|
|
2505
|
+
description: "Tokyo Night \u2014 #1a1b26 base with signature blue, cyan, and purple.",
|
|
2506
|
+
colorScheme: "dark",
|
|
2507
|
+
group: "Tokyo Night"
|
|
2508
|
+
},
|
|
2509
|
+
{
|
|
2510
|
+
id: "kraken-light",
|
|
2511
|
+
name: "Kraken Light",
|
|
2512
|
+
description: "Medium-inspired warm paper, editorial black actions, and classic publication yellow.",
|
|
2513
|
+
colorScheme: "light",
|
|
2514
|
+
group: "Kraken"
|
|
2515
|
+
},
|
|
2516
|
+
{
|
|
2517
|
+
id: "kraken-dark",
|
|
2518
|
+
name: "Kraken Dark",
|
|
2519
|
+
description: "Medium-inspired night reading canvas with white actions and classic publication yellow.",
|
|
2520
|
+
colorScheme: "dark",
|
|
2521
|
+
group: "Kraken"
|
|
2522
|
+
}
|
|
2523
|
+
];
|
|
2524
|
+
var THEME_GROUPS = Array.from(new Set(THEMES.map((theme) => theme.group)));
|
|
2525
|
+
function isThemeId(value) {
|
|
2526
|
+
return THEMES.some((theme) => theme.id === value);
|
|
2527
|
+
}
|
|
2528
|
+
|
|
2529
|
+
// src/themes/init-theme.ts
|
|
2530
|
+
var STORAGE_KEY = "ph-theme";
|
|
2531
|
+
var VALID_THEMES = THEMES.map((theme) => theme.id);
|
|
2532
|
+
var THEME_INIT_SCRIPT = `(function(){try{var k="${STORAGE_KEY}",d="${DEFAULT_THEME_ID}",v=${JSON.stringify(VALID_THEMES)},t=localStorage.getItem(k);if(t==="xenide")t="xenide-light";if(!t||v.indexOf(t)<0)t=d;document.documentElement.setAttribute("data-theme",t)}catch(e){document.documentElement.setAttribute("data-theme","${DEFAULT_THEME_ID}")}})();`;
|
|
2533
|
+
function persistTheme(themeId) {
|
|
2534
|
+
if (typeof window === "undefined") {
|
|
2535
|
+
return;
|
|
2536
|
+
}
|
|
2537
|
+
if (!isThemeId(themeId)) {
|
|
2538
|
+
return;
|
|
2539
|
+
}
|
|
2540
|
+
document.documentElement.setAttribute("data-theme", themeId);
|
|
2541
|
+
localStorage.setItem(STORAGE_KEY, themeId);
|
|
2542
|
+
}
|
|
2543
|
+
function readStoredTheme() {
|
|
2544
|
+
if (typeof window === "undefined") {
|
|
2545
|
+
return DEFAULT_THEME_ID;
|
|
2546
|
+
}
|
|
2547
|
+
const stored = localStorage.getItem(STORAGE_KEY);
|
|
2548
|
+
if (stored === "xenide") {
|
|
2549
|
+
return "xenide-light";
|
|
2550
|
+
}
|
|
2551
|
+
return stored && isThemeId(stored) ? stored : DEFAULT_THEME_ID;
|
|
2552
|
+
}
|
|
2553
|
+
|
|
2554
|
+
// src/components/ui/ThemeDomSync.tsx
|
|
2555
|
+
function ThemeDomSync() {
|
|
2556
|
+
(0, import_react13.useLayoutEffect)(() => {
|
|
2557
|
+
persistTheme(readStoredTheme());
|
|
2558
|
+
}, []);
|
|
2559
|
+
return null;
|
|
2560
|
+
}
|
|
2561
|
+
|
|
2562
|
+
// src/components/ui/ThemeManager.tsx
|
|
2563
|
+
var import_react14 = require("react");
|
|
2564
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
2565
|
+
function ThemeManager({ children }) {
|
|
2566
|
+
(0, import_react14.useLayoutEffect)(() => {
|
|
2567
|
+
persistTheme(readStoredTheme());
|
|
2568
|
+
}, []);
|
|
2569
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_jsx_runtime26.Fragment, { children });
|
|
2570
|
+
}
|
|
2571
|
+
|
|
2572
|
+
// src/components/ui/ThemeSwitcher.tsx
|
|
2573
|
+
var import_react15 = require("react");
|
|
2574
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
2575
|
+
function ThemeSwitcher({ className }) {
|
|
2576
|
+
const [themeId, setThemeId] = (0, import_react15.useState)("hedgehog-light");
|
|
2577
|
+
(0, import_react15.useEffect)(() => {
|
|
2578
|
+
const id = readStoredTheme();
|
|
2579
|
+
persistTheme(id);
|
|
2580
|
+
setThemeId(id);
|
|
2581
|
+
}, []);
|
|
2582
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("label", { className: cn("flex min-w-0 items-center gap-2", className), children: [
|
|
2583
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "shrink-0 text-xs font-medium text-ph-mutedtext sm:text-sm", children: "Theme" }),
|
|
2584
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
2585
|
+
"select",
|
|
2586
|
+
{
|
|
2587
|
+
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",
|
|
2588
|
+
value: themeId,
|
|
2589
|
+
"aria-label": "Colour theme",
|
|
2590
|
+
onChange: (event) => {
|
|
2591
|
+
const next = event.target.value;
|
|
2592
|
+
persistTheme(next);
|
|
2593
|
+
setThemeId(next);
|
|
2594
|
+
},
|
|
2595
|
+
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))
|
|
2596
|
+
}
|
|
2597
|
+
)
|
|
2598
|
+
] });
|
|
2599
|
+
}
|
|
2600
|
+
|
|
2601
|
+
// src/components/ui/Accordion.tsx
|
|
2602
|
+
var import_react16 = require("react");
|
|
2603
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
2604
|
+
function Accordion({
|
|
2605
|
+
items,
|
|
2606
|
+
allowMultiple = false,
|
|
2607
|
+
defaultOpen = [],
|
|
2608
|
+
className
|
|
2609
|
+
}) {
|
|
2610
|
+
const [openItems, setOpenItems] = (0, import_react16.useState)(new Set(defaultOpen));
|
|
2611
|
+
const toggleItem = (id) => {
|
|
2612
|
+
setOpenItems((prev) => {
|
|
2613
|
+
const next = new Set(prev);
|
|
2614
|
+
if (next.has(id)) {
|
|
2615
|
+
next.delete(id);
|
|
2616
|
+
} else {
|
|
2617
|
+
if (!allowMultiple) {
|
|
2618
|
+
next.clear();
|
|
2619
|
+
}
|
|
2620
|
+
next.add(id);
|
|
2621
|
+
}
|
|
2622
|
+
return next;
|
|
2623
|
+
});
|
|
2624
|
+
};
|
|
2625
|
+
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) => {
|
|
2626
|
+
const isOpen = openItems.has(item.id);
|
|
2627
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "first:rounded-t-xl last:rounded-b-xl", children: [
|
|
2628
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
|
|
2629
|
+
"button",
|
|
2630
|
+
{
|
|
2631
|
+
type: "button",
|
|
2632
|
+
onClick: () => toggleItem(item.id),
|
|
2633
|
+
className: "flex w-full items-center justify-between px-5 py-4 text-left transition hover:bg-ph-muted",
|
|
2634
|
+
children: [
|
|
2635
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "font-semibold text-ph-ink", children: item.title }),
|
|
2636
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2637
|
+
IconChevronDown,
|
|
2638
|
+
{
|
|
2639
|
+
className: cn(
|
|
2640
|
+
"h-5 w-5 text-ph-mutedtext transition-transform duration-200",
|
|
2641
|
+
isOpen && "rotate-180"
|
|
2642
|
+
)
|
|
2643
|
+
}
|
|
2644
|
+
)
|
|
2645
|
+
]
|
|
2646
|
+
}
|
|
2647
|
+
),
|
|
2648
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2649
|
+
"div",
|
|
2650
|
+
{
|
|
2651
|
+
className: cn(
|
|
2652
|
+
"grid transition-all duration-200",
|
|
2653
|
+
isOpen ? "grid-rows-[1fr]" : "grid-rows-[0fr]"
|
|
2654
|
+
),
|
|
2655
|
+
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 }) })
|
|
2656
|
+
}
|
|
2657
|
+
)
|
|
2658
|
+
] }, item.id);
|
|
2659
|
+
}) });
|
|
2660
|
+
}
|
|
2661
|
+
|
|
2662
|
+
// src/components/ui/Stepper.tsx
|
|
2663
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
2664
|
+
function Stepper({ steps, currentStep, className }) {
|
|
2665
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: cn("flex items-start gap-2", className), children: steps.map((step, index) => {
|
|
2666
|
+
const isCompleted = index < currentStep;
|
|
2667
|
+
const isCurrent = index === currentStep;
|
|
2668
|
+
const isPending = index > currentStep;
|
|
2669
|
+
const isError = step.status === "error";
|
|
2670
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "flex flex-1 items-start gap-2", children: [
|
|
2671
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "flex flex-1 flex-col items-center", children: [
|
|
2672
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2673
|
+
"div",
|
|
2674
|
+
{
|
|
2675
|
+
className: cn(
|
|
2676
|
+
"flex h-9 w-9 items-center justify-center rounded-full text-sm font-bold transition-colors",
|
|
2677
|
+
isCompleted && "bg-ph-success text-[var(--ph-on-success)]",
|
|
2678
|
+
isCurrent && !isError && "bg-ph-brand text-[var(--ph-on-accent)] ring-4 ring-ph-brand/20",
|
|
2679
|
+
isCurrent && isError && "bg-ph-danger text-[var(--ph-on-danger)]",
|
|
2680
|
+
isPending && "bg-ph-muted text-ph-mutedtext"
|
|
2681
|
+
),
|
|
2682
|
+
children: isCompleted ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(IconCheck, { className: "h-5 w-5", "aria-hidden": true }) : index + 1
|
|
2683
|
+
}
|
|
2684
|
+
),
|
|
2685
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "mt-2 text-center", children: [
|
|
2686
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2687
|
+
"p",
|
|
2688
|
+
{
|
|
2689
|
+
className: cn(
|
|
2690
|
+
"text-sm font-semibold",
|
|
2691
|
+
isCurrent && "text-ph-ink",
|
|
2692
|
+
!isCurrent && "text-ph-mutedtext"
|
|
2693
|
+
),
|
|
2694
|
+
children: step.label
|
|
2695
|
+
}
|
|
2696
|
+
),
|
|
2697
|
+
step.description && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { className: "mt-0.5 text-xs text-ph-mutedtext", children: step.description })
|
|
2698
|
+
] })
|
|
2699
|
+
] }),
|
|
2700
|
+
index < steps.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
2701
|
+
"div",
|
|
2702
|
+
{
|
|
2703
|
+
className: cn(
|
|
2704
|
+
"mt-4 h-0.5 flex-1 rounded-full transition-colors",
|
|
2705
|
+
isCompleted ? "bg-ph-success" : "bg-ph-border"
|
|
2706
|
+
)
|
|
2707
|
+
}
|
|
2708
|
+
)
|
|
2709
|
+
] }, step.id);
|
|
2710
|
+
}) });
|
|
2711
|
+
}
|
|
2712
|
+
|
|
2713
|
+
// src/components/ui/SegmentedControl.tsx
|
|
2714
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
2715
|
+
function SegmentedControl({ options, value, onChange, className }) {
|
|
2716
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
2717
|
+
"div",
|
|
2718
|
+
{
|
|
2719
|
+
className: cn(
|
|
2720
|
+
"inline-flex rounded-lg bg-ph-muted p-1",
|
|
2721
|
+
className
|
|
2722
|
+
),
|
|
2723
|
+
children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
|
|
2724
|
+
"button",
|
|
2725
|
+
{
|
|
2726
|
+
type: "button",
|
|
2727
|
+
onClick: () => onChange(option.value),
|
|
2728
|
+
className: cn(
|
|
2729
|
+
"relative flex items-center gap-1.5 rounded-md px-3.5 py-1.5 text-sm font-medium transition-all",
|
|
2730
|
+
value === option.value ? "bg-ph-surface text-ph-ink shadow-ph" : "text-ph-subtle hover:text-ph-ink"
|
|
2731
|
+
),
|
|
2732
|
+
children: [
|
|
2733
|
+
option.icon && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "h-4 w-4", children: option.icon }),
|
|
2734
|
+
option.label
|
|
2735
|
+
]
|
|
2736
|
+
},
|
|
2737
|
+
option.value
|
|
2738
|
+
))
|
|
2739
|
+
}
|
|
2740
|
+
);
|
|
2741
|
+
}
|
|
2742
|
+
|
|
2743
|
+
// src/components/ui/CommandPalette.tsx
|
|
2744
|
+
var import_react17 = require("react");
|
|
2745
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
2746
|
+
function CommandPalette({
|
|
2747
|
+
items,
|
|
2748
|
+
isOpen,
|
|
2749
|
+
onClose,
|
|
2750
|
+
placeholder = "Type a command or search...",
|
|
2751
|
+
className
|
|
2752
|
+
}) {
|
|
2753
|
+
const [query, setQuery] = (0, import_react17.useState)("");
|
|
2754
|
+
const [selectedIndex, setSelectedIndex] = (0, import_react17.useState)(0);
|
|
2755
|
+
const inputRef = (0, import_react17.useRef)(null);
|
|
2756
|
+
const filtered = items.filter(
|
|
2757
|
+
(item) => item.label.toLowerCase().includes(query.toLowerCase())
|
|
2758
|
+
);
|
|
2759
|
+
(0, import_react17.useEffect)(() => {
|
|
2760
|
+
var _a;
|
|
2761
|
+
if (isOpen) {
|
|
2762
|
+
setQuery("");
|
|
2763
|
+
setSelectedIndex(0);
|
|
2764
|
+
(_a = inputRef.current) == null ? void 0 : _a.focus();
|
|
2765
|
+
}
|
|
2766
|
+
}, [isOpen]);
|
|
2767
|
+
(0, import_react17.useEffect)(() => {
|
|
2768
|
+
const handleKeyDown = (e) => {
|
|
2769
|
+
var _a;
|
|
2770
|
+
if (!isOpen) return;
|
|
2771
|
+
switch (e.key) {
|
|
2772
|
+
case "ArrowDown":
|
|
2773
|
+
e.preventDefault();
|
|
2774
|
+
setSelectedIndex((i) => (i + 1) % filtered.length);
|
|
2775
|
+
break;
|
|
2776
|
+
case "ArrowUp":
|
|
2777
|
+
e.preventDefault();
|
|
2778
|
+
setSelectedIndex((i) => (i - 1 + filtered.length) % filtered.length);
|
|
2779
|
+
break;
|
|
2780
|
+
case "Enter":
|
|
2781
|
+
e.preventDefault();
|
|
2782
|
+
(_a = filtered[selectedIndex]) == null ? void 0 : _a.onSelect();
|
|
2783
|
+
onClose();
|
|
2784
|
+
break;
|
|
2785
|
+
case "Escape":
|
|
2786
|
+
onClose();
|
|
2787
|
+
break;
|
|
2788
|
+
}
|
|
2789
|
+
};
|
|
2790
|
+
window.addEventListener("keydown", handleKeyDown);
|
|
2791
|
+
return () => window.removeEventListener("keydown", handleKeyDown);
|
|
2792
|
+
}, [isOpen, filtered, selectedIndex, onClose]);
|
|
2793
|
+
if (!isOpen) return null;
|
|
2794
|
+
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)(
|
|
2795
|
+
"div",
|
|
2796
|
+
{
|
|
2797
|
+
className: cn(
|
|
2798
|
+
"w-full max-w-xl overflow-hidden rounded-xl border border-ph-border bg-ph-surface shadow-ph-md",
|
|
2799
|
+
className
|
|
2800
|
+
),
|
|
2801
|
+
children: [
|
|
2802
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "flex items-center gap-3 border-b border-ph-border px-4 py-3", children: [
|
|
2803
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(IconSearch, { className: "h-5 w-5 text-ph-mutedtext" }),
|
|
2804
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
2805
|
+
"input",
|
|
2806
|
+
{
|
|
2807
|
+
ref: inputRef,
|
|
2808
|
+
type: "text",
|
|
2809
|
+
value: query,
|
|
2810
|
+
onChange: (e) => {
|
|
2811
|
+
setQuery(e.target.value);
|
|
2812
|
+
setSelectedIndex(0);
|
|
2813
|
+
},
|
|
2814
|
+
placeholder,
|
|
2815
|
+
className: "flex-1 bg-transparent text-ph-ink outline-none placeholder:text-ph-mutedtext"
|
|
2816
|
+
}
|
|
2817
|
+
),
|
|
2818
|
+
/* @__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" })
|
|
2819
|
+
] }),
|
|
2820
|
+
/* @__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)(
|
|
2821
|
+
"button",
|
|
2822
|
+
{
|
|
2823
|
+
type: "button",
|
|
2824
|
+
onClick: () => {
|
|
2825
|
+
item.onSelect();
|
|
2826
|
+
onClose();
|
|
2827
|
+
},
|
|
2828
|
+
onMouseEnter: () => setSelectedIndex(index),
|
|
2829
|
+
className: cn(
|
|
2830
|
+
"flex w-full items-center gap-3 px-4 py-2.5 text-left text-sm transition-colors",
|
|
2831
|
+
index === selectedIndex ? "bg-ph-muted text-ph-ink" : "text-ph-subtle"
|
|
2832
|
+
),
|
|
2833
|
+
children: [
|
|
2834
|
+
item.icon && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "h-5 w-5", children: item.icon }),
|
|
2835
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "flex-1", children: item.label }),
|
|
2836
|
+
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 })
|
|
2837
|
+
]
|
|
2838
|
+
},
|
|
2839
|
+
item.id
|
|
2840
|
+
)) })
|
|
2841
|
+
]
|
|
2842
|
+
}
|
|
2843
|
+
) });
|
|
2844
|
+
}
|
|
2845
|
+
|
|
2846
|
+
// src/components/ui/Calendar.tsx
|
|
2847
|
+
var import_react18 = require("react");
|
|
2848
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
2849
|
+
function Calendar({ value, onChange, className }) {
|
|
2850
|
+
const [currentMonth, setCurrentMonth] = (0, import_react18.useState)(value || /* @__PURE__ */ new Date());
|
|
2851
|
+
const today = /* @__PURE__ */ new Date();
|
|
2852
|
+
const year = currentMonth.getFullYear();
|
|
2853
|
+
const month = currentMonth.getMonth();
|
|
2854
|
+
const firstDay = new Date(year, month, 1).getDay();
|
|
2855
|
+
const daysInMonth = new Date(year, month + 1, 0).getDate();
|
|
2856
|
+
const prevMonth = () => setCurrentMonth(new Date(year, month - 1, 1));
|
|
2857
|
+
const nextMonth = () => setCurrentMonth(new Date(year, month + 1, 1));
|
|
2858
|
+
const monthNames = [
|
|
2859
|
+
"January",
|
|
2860
|
+
"February",
|
|
2861
|
+
"March",
|
|
2862
|
+
"April",
|
|
2863
|
+
"May",
|
|
2864
|
+
"June",
|
|
2865
|
+
"July",
|
|
2866
|
+
"August",
|
|
2867
|
+
"September",
|
|
2868
|
+
"October",
|
|
2869
|
+
"November",
|
|
2870
|
+
"December"
|
|
2871
|
+
];
|
|
2872
|
+
const weekDays = ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"];
|
|
2873
|
+
const isSelected = (day) => {
|
|
2874
|
+
if (!value) return false;
|
|
2875
|
+
return value.getDate() === day && value.getMonth() === month && value.getFullYear() === year;
|
|
2876
|
+
};
|
|
2877
|
+
const isToday = (day) => {
|
|
2878
|
+
return today.getDate() === day && today.getMonth() === month && today.getFullYear() === year;
|
|
2879
|
+
};
|
|
2880
|
+
const handleSelect = (day) => {
|
|
2881
|
+
onChange == null ? void 0 : onChange(new Date(year, month, day));
|
|
2882
|
+
};
|
|
2883
|
+
const days = [];
|
|
2884
|
+
for (let i = 0; i < firstDay; i++) {
|
|
2885
|
+
days.push(null);
|
|
2886
|
+
}
|
|
2887
|
+
for (let i = 1; i <= daysInMonth; i++) {
|
|
2888
|
+
days.push(i);
|
|
2889
|
+
}
|
|
2890
|
+
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: [
|
|
2891
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "mb-4 flex items-center justify-between", children: [
|
|
2892
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2893
|
+
"button",
|
|
2894
|
+
{
|
|
2895
|
+
type: "button",
|
|
2896
|
+
onClick: prevMonth,
|
|
2897
|
+
"aria-label": "Previous month",
|
|
2898
|
+
className: "rounded-lg p-1 text-ph-subtle transition hover:bg-ph-muted hover:text-ph-ink",
|
|
2899
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(IconChevronLeft, { className: "h-5 w-5", "aria-hidden": true })
|
|
2900
|
+
}
|
|
2901
|
+
),
|
|
2902
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("span", { className: "text-sm font-semibold text-ph-ink", children: [
|
|
2903
|
+
monthNames[month],
|
|
2904
|
+
" ",
|
|
2905
|
+
year
|
|
2906
|
+
] }),
|
|
2907
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2908
|
+
"button",
|
|
2909
|
+
{
|
|
2910
|
+
type: "button",
|
|
2911
|
+
onClick: nextMonth,
|
|
2912
|
+
"aria-label": "Next month",
|
|
2913
|
+
className: "rounded-lg p-1 text-ph-subtle transition hover:bg-ph-muted hover:text-ph-ink",
|
|
2914
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(IconChevronRight, { className: "h-5 w-5", "aria-hidden": true })
|
|
2915
|
+
}
|
|
2916
|
+
)
|
|
2917
|
+
] }),
|
|
2918
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "grid grid-cols-7 gap-1", children: [
|
|
2919
|
+
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)),
|
|
2920
|
+
days.map((day, index) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "aspect-square", children: day && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
2921
|
+
"button",
|
|
2922
|
+
{
|
|
2923
|
+
type: "button",
|
|
2924
|
+
onClick: () => handleSelect(day),
|
|
2925
|
+
className: cn(
|
|
2926
|
+
"flex h-full w-full items-center justify-center rounded-lg text-sm transition-colors",
|
|
2927
|
+
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"
|
|
2928
|
+
),
|
|
2929
|
+
children: day
|
|
2930
|
+
}
|
|
2931
|
+
) }, index))
|
|
2932
|
+
] })
|
|
2933
|
+
] });
|
|
2934
|
+
}
|
|
2935
|
+
|
|
2936
|
+
// src/components/ui/HoverCard.tsx
|
|
2937
|
+
var import_react19 = require("react");
|
|
2938
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
2939
|
+
function HoverCard({ trigger, children, className }) {
|
|
2940
|
+
const [isVisible, setIsVisible] = (0, import_react19.useState)(false);
|
|
2941
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
2942
|
+
"div",
|
|
2943
|
+
{
|
|
2944
|
+
className: "relative inline-block",
|
|
2945
|
+
onMouseEnter: () => setIsVisible(true),
|
|
2946
|
+
onMouseLeave: () => setIsVisible(false),
|
|
2947
|
+
children: [
|
|
2948
|
+
trigger,
|
|
2949
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
|
|
2950
|
+
"div",
|
|
2951
|
+
{
|
|
2952
|
+
className: cn(
|
|
2953
|
+
"absolute left-1/2 top-full z-50 mt-2 w-64 -translate-x-1/2 rounded-lg border border-ph-border bg-ph-surface p-4 shadow-ph-md transition-all duration-150",
|
|
2954
|
+
isVisible ? "visible translate-y-0 opacity-100" : "invisible -translate-y-1 opacity-0",
|
|
2955
|
+
className
|
|
2956
|
+
),
|
|
2957
|
+
children: [
|
|
2958
|
+
/* @__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" }),
|
|
2959
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "relative", children })
|
|
2960
|
+
]
|
|
2961
|
+
}
|
|
2962
|
+
)
|
|
2963
|
+
]
|
|
2964
|
+
}
|
|
2965
|
+
);
|
|
2966
|
+
}
|
|
2967
|
+
|
|
2968
|
+
// src/components/ui/EmptyState.tsx
|
|
2969
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
2970
|
+
function EmptyState({ icon, title, description, action, className }) {
|
|
2971
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
|
|
2972
|
+
"div",
|
|
2973
|
+
{
|
|
2974
|
+
className: cn(
|
|
2975
|
+
"flex flex-col items-center justify-center rounded-xl border border-dashed border-ph-border bg-ph-muted/50 px-8 py-16 text-center",
|
|
2976
|
+
className
|
|
2977
|
+
),
|
|
2978
|
+
children: [
|
|
2979
|
+
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 }),
|
|
2980
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)("h3", { className: "text-base font-semibold text-ph-ink", children: title }),
|
|
2981
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("p", { className: "mt-1 max-w-sm text-sm text-ph-subtle", children: description }),
|
|
2982
|
+
action && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "mt-4", children: action })
|
|
2983
|
+
]
|
|
2984
|
+
}
|
|
2985
|
+
);
|
|
2986
|
+
}
|
|
2987
|
+
|
|
2988
|
+
// src/components/ui/FilterChips.tsx
|
|
2989
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
2990
|
+
function FilterChips({
|
|
2991
|
+
chips,
|
|
2992
|
+
onToggle,
|
|
2993
|
+
onRemove,
|
|
2994
|
+
className,
|
|
2995
|
+
"aria-label": ariaLabel = "Applied filters"
|
|
2996
|
+
}) {
|
|
2997
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: cn("ph-filter-chips", className), role: "group", "aria-label": ariaLabel, children: chips.map((chip) => {
|
|
2998
|
+
var _a;
|
|
2999
|
+
const label = (_a = chip.removeLabel) != null ? _a : getChipText(chip);
|
|
3000
|
+
const content = /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_jsx_runtime35.Fragment, { children: [
|
|
3001
|
+
/* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "ph-filter-chip__label", children: chip.label }),
|
|
3002
|
+
chip.value != null ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "ph-filter-chip__value", children: chip.value }) : null
|
|
3003
|
+
] });
|
|
3004
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
|
|
3005
|
+
"span",
|
|
3006
|
+
{
|
|
3007
|
+
className: cn("ph-filter-chip", chip.active && "ph-filter-chip--active"),
|
|
3008
|
+
"data-state": chip.active ? "on" : "off",
|
|
3009
|
+
children: [
|
|
3010
|
+
onToggle ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3011
|
+
"button",
|
|
3012
|
+
{
|
|
3013
|
+
type: "button",
|
|
3014
|
+
className: "ph-filter-chip__main",
|
|
3015
|
+
"aria-pressed": Boolean(chip.active),
|
|
3016
|
+
onClick: () => onToggle(chip.id),
|
|
3017
|
+
children: content
|
|
3018
|
+
}
|
|
3019
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "ph-filter-chip__main", children: content }),
|
|
3020
|
+
chip.active && onRemove ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
3021
|
+
"button",
|
|
3022
|
+
{
|
|
3023
|
+
type: "button",
|
|
3024
|
+
className: "ph-filter-chip__remove",
|
|
3025
|
+
"aria-label": `Remove ${label} filter`,
|
|
3026
|
+
onClick: () => onRemove(chip.id),
|
|
3027
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(IconClose, { className: "h-3 w-3", "aria-hidden": true })
|
|
3028
|
+
}
|
|
3029
|
+
) : null
|
|
3030
|
+
]
|
|
3031
|
+
},
|
|
3032
|
+
chip.id
|
|
3033
|
+
);
|
|
3034
|
+
}) });
|
|
3035
|
+
}
|
|
3036
|
+
function getChipText(chip) {
|
|
3037
|
+
const label = typeof chip.label === "string" || typeof chip.label === "number" ? String(chip.label) : chip.id;
|
|
3038
|
+
const value = typeof chip.value === "string" || typeof chip.value === "number" ? String(chip.value) : null;
|
|
3039
|
+
return value ? `${label}: ${value}` : label;
|
|
3040
|
+
}
|
|
3041
|
+
|
|
3042
|
+
// src/components/ui/FilterBar.tsx
|
|
3043
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
3044
|
+
function FilterBar(_a) {
|
|
3045
|
+
var _b = _a, {
|
|
3046
|
+
children,
|
|
3047
|
+
label = "Filters and sorting",
|
|
3048
|
+
onClear,
|
|
3049
|
+
clearLabel = "Clear all",
|
|
3050
|
+
resultCount,
|
|
3051
|
+
className
|
|
3052
|
+
} = _b, props = __objRest(_b, [
|
|
3053
|
+
"children",
|
|
3054
|
+
"label",
|
|
3055
|
+
"onClear",
|
|
3056
|
+
"clearLabel",
|
|
3057
|
+
"resultCount",
|
|
3058
|
+
"className"
|
|
3059
|
+
]);
|
|
3060
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", __spreadProps(__spreadValues({ className: cn("ph-filter-bar", className) }, props), { children: [
|
|
3061
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "ph-filter-bar__controls", role: "group", "aria-label": label, children: [
|
|
3062
|
+
children,
|
|
3063
|
+
onClear ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("button", { type: "button", className: "ph-filter-bar__clear", onClick: onClear, children: clearLabel }) : null
|
|
3064
|
+
] }),
|
|
3065
|
+
resultCount != null ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("output", { className: "ph-filter-bar__results", "aria-live": "polite", children: resultCount }) : null
|
|
3066
|
+
] }));
|
|
3067
|
+
}
|
|
3068
|
+
function FilterMenu({
|
|
3069
|
+
label,
|
|
3070
|
+
value,
|
|
3071
|
+
options,
|
|
3072
|
+
onValueChange,
|
|
3073
|
+
placeholder = "Any",
|
|
3074
|
+
align = "start",
|
|
3075
|
+
disabled,
|
|
3076
|
+
className
|
|
3077
|
+
}) {
|
|
3078
|
+
var _a;
|
|
3079
|
+
const selected = options.find((option) => option.value === value);
|
|
3080
|
+
const displayValue = (_a = selected == null ? void 0 : selected.label) != null ? _a : placeholder;
|
|
3081
|
+
const accessibleValue = selected ? getOptionText(selected) : String(placeholder);
|
|
3082
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3083
|
+
DropdownMenu,
|
|
3084
|
+
{
|
|
3085
|
+
"aria-label": `${label}: ${accessibleValue}`,
|
|
3086
|
+
align,
|
|
3087
|
+
disabled,
|
|
3088
|
+
className,
|
|
3089
|
+
trigger: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("span", { className: cn("ph-filter-menu-trigger", selected && "ph-filter-menu-trigger--active"), children: [
|
|
3090
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(IconTuning, { className: "h-3.5 w-3.5", "aria-hidden": true }),
|
|
3091
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "ph-filter-menu-trigger__label", children: label }),
|
|
3092
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "ph-filter-menu-trigger__value", children: displayValue })
|
|
3093
|
+
] }),
|
|
3094
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(DropdownRadioGroup, { value, onValueChange, children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3095
|
+
DropdownRadioItem,
|
|
3096
|
+
{
|
|
3097
|
+
value: option.value,
|
|
3098
|
+
textValue: getOptionText(option),
|
|
3099
|
+
disabled: option.disabled,
|
|
3100
|
+
children: option.label
|
|
3101
|
+
},
|
|
3102
|
+
option.value
|
|
3103
|
+
)) })
|
|
3104
|
+
}
|
|
3105
|
+
);
|
|
3106
|
+
}
|
|
3107
|
+
function SortMenu({
|
|
3108
|
+
label,
|
|
3109
|
+
value,
|
|
3110
|
+
options,
|
|
3111
|
+
onValueChange,
|
|
3112
|
+
direction = "descending",
|
|
3113
|
+
align = "end",
|
|
3114
|
+
disabled,
|
|
3115
|
+
className
|
|
3116
|
+
}) {
|
|
3117
|
+
const selected = options.find((option) => option.value === value);
|
|
3118
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3119
|
+
DropdownMenu,
|
|
3120
|
+
{
|
|
3121
|
+
"aria-label": `${label}: ${selected ? getOptionText(selected) : "Choose sort order"}`,
|
|
3122
|
+
align,
|
|
3123
|
+
disabled,
|
|
3124
|
+
className,
|
|
3125
|
+
trigger: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("span", { className: "ph-filter-menu-trigger ph-sort-menu-trigger", children: [
|
|
3126
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3127
|
+
IconArrowDown,
|
|
3128
|
+
{
|
|
3129
|
+
className: cn("h-3.5 w-3.5", direction === "ascending" && "rotate-180"),
|
|
3130
|
+
"aria-hidden": true
|
|
3131
|
+
}
|
|
3132
|
+
),
|
|
3133
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "ph-filter-menu-trigger__label", children: label }),
|
|
3134
|
+
selected ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "ph-filter-menu-trigger__value", children: selected.label }) : null
|
|
3135
|
+
] }),
|
|
3136
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(DropdownRadioGroup, { value, onValueChange, children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3137
|
+
DropdownRadioItem,
|
|
3138
|
+
{
|
|
3139
|
+
value: option.value,
|
|
3140
|
+
textValue: getOptionText(option),
|
|
3141
|
+
disabled: option.disabled,
|
|
3142
|
+
children: option.label
|
|
3143
|
+
},
|
|
3144
|
+
option.value
|
|
3145
|
+
)) })
|
|
3146
|
+
}
|
|
3147
|
+
);
|
|
3148
|
+
}
|
|
3149
|
+
function getOptionText(option) {
|
|
3150
|
+
if (option.textValue) return option.textValue;
|
|
3151
|
+
if (typeof option.label === "string" || typeof option.label === "number") return String(option.label);
|
|
3152
|
+
return option.value;
|
|
3153
|
+
}
|
|
3154
|
+
|
|
3155
|
+
// src/components/ui/FilterControls.tsx
|
|
3156
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
3157
|
+
function FilterControls(_a) {
|
|
3158
|
+
var _b = _a, {
|
|
3159
|
+
children,
|
|
3160
|
+
barProps,
|
|
3161
|
+
chipsProps,
|
|
3162
|
+
emptyState,
|
|
3163
|
+
className
|
|
3164
|
+
} = _b, props = __objRest(_b, [
|
|
3165
|
+
"children",
|
|
3166
|
+
"barProps",
|
|
3167
|
+
"chipsProps",
|
|
3168
|
+
"emptyState",
|
|
3169
|
+
"className"
|
|
3170
|
+
]);
|
|
3171
|
+
const hasChips = Boolean(chipsProps == null ? void 0 : chipsProps.chips.length);
|
|
3172
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", __spreadProps(__spreadValues({ className: cn("ph-filter-controls", className) }, props), { children: [
|
|
3173
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(FilterBar, __spreadProps(__spreadValues({}, barProps), { children })),
|
|
3174
|
+
hasChips && chipsProps ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(FilterChips, __spreadValues({}, chipsProps)) : emptyState != null ? emptyState : null
|
|
3175
|
+
] }));
|
|
3176
|
+
}
|
|
3177
|
+
|
|
3178
|
+
// src/components/ui/CodeBlock.tsx
|
|
3179
|
+
var import_react20 = require("react");
|
|
3180
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
3181
|
+
function CodeBlock({ code, language = "tsx", filename, className }) {
|
|
3182
|
+
const [copied, setCopied] = (0, import_react20.useState)(false);
|
|
3183
|
+
const handleCopy = async () => {
|
|
3184
|
+
await navigator.clipboard.writeText(code);
|
|
3185
|
+
setCopied(true);
|
|
3186
|
+
setTimeout(() => setCopied(false), 2e3);
|
|
3187
|
+
};
|
|
3188
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: cn("overflow-hidden rounded-lg border border-ph-border bg-[#1a1a2e]", className), children: [
|
|
3189
|
+
(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: [
|
|
3190
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "flex items-center gap-2", children: [
|
|
3191
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "flex gap-1.5", children: [
|
|
3192
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "h-3 w-3 rounded-full bg-red-400" }),
|
|
3193
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "h-3 w-3 rounded-full bg-amber-400" }),
|
|
3194
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "h-3 w-3 rounded-full bg-emerald-400" })
|
|
3195
|
+
] }),
|
|
3196
|
+
filename && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "ml-2 text-xs text-white/60", children: filename })
|
|
3197
|
+
] }),
|
|
3198
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
3199
|
+
"button",
|
|
3200
|
+
{
|
|
3201
|
+
type: "button",
|
|
3202
|
+
onClick: handleCopy,
|
|
3203
|
+
className: "text-xs text-white/60 transition hover:text-white",
|
|
3204
|
+
children: copied ? "Copied!" : "Copy"
|
|
3205
|
+
}
|
|
3206
|
+
)
|
|
3207
|
+
] }),
|
|
3208
|
+
/* @__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 }) })
|
|
3209
|
+
] });
|
|
3210
|
+
}
|
|
3211
|
+
|
|
3212
|
+
// src/components/ui/ComponentDocs.tsx
|
|
3213
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
3214
|
+
function ComponentDocs({ title = "Props & variants", rows, defaultOpen = false, className }) {
|
|
3215
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("details", { className: cn("ph-panel group overflow-hidden p-0", className), open: defaultOpen, children: [
|
|
3216
|
+
/* @__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: [
|
|
3217
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("h3", { className: "text-xs font-semibold uppercase tracking-wider text-ph-mutedtext", children: title }),
|
|
3218
|
+
/* @__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: [
|
|
3219
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "group-open:hidden", children: "Show" }),
|
|
3220
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "hidden group-open:inline", children: "Hide" })
|
|
3221
|
+
] })
|
|
3222
|
+
] }),
|
|
3223
|
+
/* @__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: [
|
|
3224
|
+
/* @__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: [
|
|
3225
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("th", { className: "px-4 py-2 font-semibold", children: "Prop" }),
|
|
3226
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("th", { className: "px-4 py-2 font-semibold", children: "Type" }),
|
|
3227
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("th", { className: "px-4 py-2 font-semibold", children: "Default" }),
|
|
3228
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("th", { className: "px-4 py-2 font-semibold", children: "Use" })
|
|
3229
|
+
] }) }),
|
|
3230
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("tbody", { className: "divide-y divide-ph-border", children: rows.map((row) => {
|
|
3231
|
+
var _a;
|
|
3232
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("tr", { children: [
|
|
3233
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("td", { className: "px-4 py-3 align-top font-mono text-xs text-ph-ink", children: row.name }),
|
|
3234
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("td", { className: "px-4 py-3 align-top font-mono text-xs text-ph-subtle", children: row.type }),
|
|
3235
|
+
/* @__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 : "-" }),
|
|
3236
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsx)("td", { className: "px-4 py-3 align-top text-ph-subtle", children: row.description })
|
|
3237
|
+
] }, row.name);
|
|
3238
|
+
}) })
|
|
3239
|
+
] }) })
|
|
3240
|
+
] });
|
|
3241
|
+
}
|
|
3242
|
+
|
|
3243
|
+
// src/components/ui/ShowcaseWrapper.tsx
|
|
3244
|
+
var import_react21 = require("react");
|
|
3245
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
3246
|
+
function ShowcaseWrapper({
|
|
3247
|
+
id,
|
|
3248
|
+
title,
|
|
3249
|
+
description,
|
|
3250
|
+
docs,
|
|
3251
|
+
code,
|
|
3252
|
+
filename = "Example.tsx",
|
|
3253
|
+
children,
|
|
3254
|
+
className
|
|
3255
|
+
}) {
|
|
3256
|
+
var _a;
|
|
3257
|
+
const [showCode, setShowCode] = (0, import_react21.useState)(false);
|
|
3258
|
+
const fallbackId = (_a = titleIdMap[title]) != null ? _a : title.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, "");
|
|
3259
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("section", { id: id != null ? id : fallbackId, className: cn("scroll-mt-20", className), children: [
|
|
3260
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "ph-h2-rule mb-8", children: [
|
|
3261
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "flex items-center gap-1.5", children: [
|
|
3262
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("h2", { children: title }),
|
|
3263
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
3264
|
+
"button",
|
|
3265
|
+
{
|
|
3266
|
+
type: "button",
|
|
3267
|
+
onClick: () => setShowCode(!showCode),
|
|
3268
|
+
className: cn(
|
|
3269
|
+
"flex h-10 w-10 items-center justify-center rounded-full border transition-all",
|
|
3270
|
+
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"
|
|
3271
|
+
),
|
|
3272
|
+
title: showCode ? "Hide code" : "Show code",
|
|
3273
|
+
"aria-label": showCode ? "Hide code" : "Show code",
|
|
3274
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(IconCodePreview, { className: "h-5 w-5", "aria-hidden": true })
|
|
3275
|
+
}
|
|
3276
|
+
)
|
|
3277
|
+
] }),
|
|
3278
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("hr", {})
|
|
3279
|
+
] }),
|
|
3280
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("p", { className: "mb-6 text-sm text-ph-subtle", children: description }),
|
|
3281
|
+
docs && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "mb-6", children: docs }),
|
|
3282
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
3283
|
+
"div",
|
|
3284
|
+
{
|
|
3285
|
+
className: cn(
|
|
3286
|
+
"gap-6",
|
|
3287
|
+
showCode ? "lg:grid lg:grid-cols-[1fr,minmax(360px,420px)]" : "block"
|
|
3288
|
+
),
|
|
3289
|
+
children: [
|
|
3290
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: cn("min-w-0", showCode && "lg:pr-2"), children }),
|
|
3291
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
3292
|
+
"div",
|
|
3293
|
+
{
|
|
3294
|
+
className: cn(
|
|
3295
|
+
"transition-all duration-300",
|
|
3296
|
+
showCode ? "block opacity-100" : "hidden opacity-0 lg:hidden"
|
|
3297
|
+
),
|
|
3298
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "sticky top-20", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(CodeBlock, { code, filename }) })
|
|
3299
|
+
}
|
|
3300
|
+
)
|
|
3301
|
+
]
|
|
3302
|
+
}
|
|
3303
|
+
)
|
|
3304
|
+
] });
|
|
3305
|
+
}
|
|
3306
|
+
var titleIdMap = {
|
|
3307
|
+
"Icons": "icons",
|
|
3308
|
+
"Colour tokens": "colors",
|
|
3309
|
+
"Buttons": "buttons",
|
|
3310
|
+
"Badges": "badges",
|
|
3311
|
+
"Alerts": "alerts",
|
|
3312
|
+
"Toasts": "toasts",
|
|
3313
|
+
"Cards": "cards",
|
|
3314
|
+
"Forms": "forms",
|
|
3315
|
+
"Inputs & Forms": "forms",
|
|
3316
|
+
"Tables": "tables",
|
|
3317
|
+
"Accordion": "accordion",
|
|
3318
|
+
"Calendar": "calendar",
|
|
3319
|
+
"Hover Card": "hovercard",
|
|
3320
|
+
"Modals": "modals",
|
|
3321
|
+
"Drawers": "drawers",
|
|
3322
|
+
"Navigation chrome": "navigation",
|
|
3323
|
+
"Navigation utilities": "utilities",
|
|
3324
|
+
"Stepper": "stepper",
|
|
3325
|
+
"Command Palette": "command",
|
|
3326
|
+
"Filter Chips": "filters",
|
|
3327
|
+
"Empty State": "emptystate",
|
|
3328
|
+
"Charts (PostHog-style)": "charts",
|
|
3329
|
+
"Dashboard shells": "dashboard",
|
|
3330
|
+
"Tabs": "tabs",
|
|
3331
|
+
"Dropdowns": "dropdowns",
|
|
3332
|
+
"Progress & loading": "progress",
|
|
3333
|
+
"Tooltip": "tooltip",
|
|
3334
|
+
"Avatars": "avatars",
|
|
3335
|
+
"Stats & conversational UI": "stats",
|
|
3336
|
+
"Timeline": "timeline",
|
|
3337
|
+
"Countdown motif": "countdown",
|
|
3338
|
+
"Keyboard glyphs": "kbd",
|
|
3339
|
+
"Icon swap": "swap",
|
|
3340
|
+
"Stacked surfaces": "stack",
|
|
3341
|
+
"Diff slider": "diff",
|
|
3342
|
+
"Badge hotspots": "indicator",
|
|
3343
|
+
"Terminal capture": "code-mockup"
|
|
3344
|
+
};
|
|
3345
|
+
|
|
3346
|
+
// src/components/ui/CollapsibleSection.tsx
|
|
3347
|
+
var import_react22 = require("react");
|
|
3348
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
3349
|
+
function CollapsibleSection({ title, children, defaultOpen = true, id }) {
|
|
3350
|
+
const [isOpen, setIsOpen] = (0, import_react22.useState)(defaultOpen);
|
|
3351
|
+
const generatedId = (0, import_react22.useId)();
|
|
3352
|
+
const contentId = `${id != null ? id : generatedId}-content`;
|
|
3353
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("section", { id, className: "scroll-mt-20", children: [
|
|
3354
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
|
|
3355
|
+
"button",
|
|
3356
|
+
{
|
|
3357
|
+
type: "button",
|
|
3358
|
+
onClick: () => setIsOpen(!isOpen),
|
|
3359
|
+
"aria-expanded": isOpen,
|
|
3360
|
+
"aria-controls": contentId,
|
|
3361
|
+
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",
|
|
3362
|
+
children: [
|
|
3363
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "text-lg font-bold text-ph-ink", children: title }),
|
|
3364
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
3365
|
+
IconChevronDown,
|
|
3366
|
+
{
|
|
3367
|
+
className: cn(
|
|
3368
|
+
"h-5 w-5 text-ph-subtle transition-transform duration-200",
|
|
3369
|
+
isOpen && "rotate-180"
|
|
3370
|
+
),
|
|
3371
|
+
"aria-hidden": true
|
|
3372
|
+
}
|
|
3373
|
+
)
|
|
3374
|
+
]
|
|
3375
|
+
}
|
|
3376
|
+
),
|
|
3377
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
3378
|
+
"div",
|
|
3379
|
+
{
|
|
3380
|
+
id: contentId,
|
|
3381
|
+
"aria-hidden": !isOpen,
|
|
3382
|
+
className: cn(
|
|
3383
|
+
"overflow-hidden transition-all duration-300",
|
|
3384
|
+
isOpen ? "max-h-[50000px] opacity-100" : "max-h-0 opacity-0"
|
|
3385
|
+
),
|
|
3386
|
+
children
|
|
3387
|
+
}
|
|
3388
|
+
)
|
|
3389
|
+
] });
|
|
3390
|
+
}
|
|
3391
|
+
|
|
3392
|
+
// src/components/ui/Typography.tsx
|
|
3393
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
3394
|
+
var toneMap2 = {
|
|
3395
|
+
default: "text-ph-ink",
|
|
3396
|
+
muted: "text-ph-mutedtext",
|
|
3397
|
+
subtle: "text-ph-subtle",
|
|
3398
|
+
brand: "text-ph-brand",
|
|
3399
|
+
danger: "text-ph-danger",
|
|
3400
|
+
success: "text-ph-success",
|
|
3401
|
+
warning: "text-ph-warning",
|
|
3402
|
+
info: "text-ph-info",
|
|
3403
|
+
inherit: ""
|
|
3404
|
+
};
|
|
3405
|
+
var weightMap = {
|
|
3406
|
+
normal: "font-normal",
|
|
3407
|
+
medium: "font-medium",
|
|
3408
|
+
semibold: "font-semibold",
|
|
3409
|
+
bold: "font-bold",
|
|
3410
|
+
extrabold: "font-extrabold"
|
|
3411
|
+
};
|
|
3412
|
+
function textClass(base, tone, weight, truncate, className) {
|
|
3413
|
+
return cn(base, toneMap2[tone], weight && weightMap[weight], truncate && "truncate", className);
|
|
3414
|
+
}
|
|
3415
|
+
function Display({
|
|
3416
|
+
children,
|
|
3417
|
+
tone = "default",
|
|
3418
|
+
weight,
|
|
3419
|
+
truncate,
|
|
3420
|
+
className
|
|
3421
|
+
}) {
|
|
3422
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("h1", { className: textClass("text-4xl font-extrabold tracking-tight md:text-5xl", tone, weight, truncate, className), children });
|
|
3423
|
+
}
|
|
3424
|
+
function H1({ children, tone = "default", weight, truncate, className }) {
|
|
3425
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("h1", { className: textClass("text-3xl font-bold tracking-tight md:text-4xl", tone, weight, truncate, className), children });
|
|
3426
|
+
}
|
|
3427
|
+
function H2({ children, tone = "default", weight, truncate, className }) {
|
|
3428
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("h2", { className: textClass("text-2xl font-bold tracking-tight", tone, weight, truncate, className), children });
|
|
3429
|
+
}
|
|
3430
|
+
function H3({ children, tone = "default", weight, truncate, className }) {
|
|
3431
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("h3", { className: textClass("text-xl font-semibold", tone, weight, truncate, className), children });
|
|
3432
|
+
}
|
|
3433
|
+
function H4({ children, tone = "default", weight, truncate, className }) {
|
|
3434
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("h4", { className: textClass("text-lg font-semibold", tone, weight, truncate, className), children });
|
|
3435
|
+
}
|
|
3436
|
+
function H5({ children, tone = "default", weight, truncate, className }) {
|
|
3437
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("h5", { className: textClass("text-base font-semibold", tone, weight, truncate, className), children });
|
|
3438
|
+
}
|
|
3439
|
+
function P({ children, tone = "default", weight, truncate, className }) {
|
|
3440
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("p", { className: textClass("text-base leading-relaxed", tone, weight, truncate, className), children });
|
|
3441
|
+
}
|
|
3442
|
+
function Small({ children, tone = "default", weight, truncate, className }) {
|
|
3443
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: textClass("text-sm leading-relaxed", tone, weight, truncate, className), children });
|
|
3444
|
+
}
|
|
3445
|
+
function Caption({ children, tone = "muted", weight, truncate, className }) {
|
|
3446
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: textClass("text-[11px] font-medium uppercase tracking-wider", tone, weight, truncate, className), children });
|
|
3447
|
+
}
|
|
3448
|
+
function Overline({ children, tone = "muted", weight, truncate, className }) {
|
|
3449
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: textClass("text-[10px] font-bold uppercase tracking-[0.15em]", tone, weight, truncate, className), children });
|
|
3450
|
+
}
|
|
3451
|
+
function Lead({ children, tone = "subtle", weight, truncate, className }) {
|
|
3452
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("p", { className: textClass("text-lg leading-relaxed", tone, weight, truncate, className), children });
|
|
3453
|
+
}
|
|
3454
|
+
function Mono({ children, tone = "default", weight, truncate, className }) {
|
|
3455
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("code", { className: textClass("text-sm font-mono leading-relaxed", tone, weight, truncate, className), children });
|
|
3456
|
+
}
|
|
3457
|
+
function Label({ children, tone = "default", weight, truncate, className }) {
|
|
3458
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("label", { className: textClass("text-sm font-medium", tone, weight, truncate, className), children });
|
|
3459
|
+
}
|
|
3460
|
+
|
|
3461
|
+
// src/components/ui/Avatar.tsx
|
|
3462
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
3463
|
+
var sizeMap5 = {
|
|
3464
|
+
xs: "h-8 w-8 text-[10px]",
|
|
3465
|
+
sm: "h-10 w-10 text-xs",
|
|
3466
|
+
md: "h-12 w-12 text-base",
|
|
3467
|
+
lg: "h-16 w-16 text-xl",
|
|
3468
|
+
xl: "h-24 w-24 text-3xl"
|
|
3469
|
+
};
|
|
3470
|
+
var statusMap = {
|
|
3471
|
+
online: "bg-emerald-500",
|
|
3472
|
+
offline: "bg-ph-mutedtext",
|
|
3473
|
+
away: "bg-amber-400",
|
|
3474
|
+
busy: "bg-ph-danger"
|
|
3475
|
+
};
|
|
3476
|
+
function Avatar(_a) {
|
|
3477
|
+
var _b = _a, {
|
|
3478
|
+
label,
|
|
3479
|
+
icon,
|
|
3480
|
+
size = "md",
|
|
3481
|
+
color = "bg-ph-brand text-white",
|
|
3482
|
+
status,
|
|
3483
|
+
badge,
|
|
3484
|
+
className
|
|
3485
|
+
} = _b, props = __objRest(_b, [
|
|
3486
|
+
"label",
|
|
3487
|
+
"icon",
|
|
3488
|
+
"size",
|
|
3489
|
+
"color",
|
|
3490
|
+
"status",
|
|
3491
|
+
"badge",
|
|
3492
|
+
"className"
|
|
3493
|
+
]);
|
|
3494
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", __spreadProps(__spreadValues({ className: cn("relative inline-flex shrink-0", className) }, props), { children: [
|
|
3495
|
+
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
3496
|
+
"div",
|
|
3497
|
+
{
|
|
3498
|
+
className: cn(
|
|
3499
|
+
"flex items-center justify-center rounded-full border border-ph-border font-bold shadow-ph",
|
|
3500
|
+
sizeMap5[size],
|
|
3501
|
+
color
|
|
3502
|
+
),
|
|
3503
|
+
children: icon || label
|
|
3504
|
+
}
|
|
3505
|
+
),
|
|
3506
|
+
status && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
3507
|
+
"span",
|
|
3508
|
+
{
|
|
3509
|
+
className: cn(
|
|
3510
|
+
"absolute bottom-0 right-1 h-2.5 w-2.5 rounded-full border-2 border-white",
|
|
3511
|
+
statusMap[status]
|
|
3512
|
+
)
|
|
3513
|
+
}
|
|
3514
|
+
),
|
|
3515
|
+
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 })
|
|
3516
|
+
] }));
|
|
3517
|
+
}
|
|
3518
|
+
function AvatarGroup(_a) {
|
|
3519
|
+
var _b = _a, { children, max, className } = _b, props = __objRest(_b, ["children", "max", "className"]);
|
|
3520
|
+
const items = Array.isArray(children) ? children : [children];
|
|
3521
|
+
const visible = max ? items.slice(0, max) : items;
|
|
3522
|
+
const remaining = max ? items.length - max : 0;
|
|
3523
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", __spreadProps(__spreadValues({ className: cn("-space-x-3 flex rtl:space-x-reverse", className) }, props), { children: [
|
|
3524
|
+
visible,
|
|
3525
|
+
remaining > 0 && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
3526
|
+
Avatar,
|
|
3527
|
+
{
|
|
3528
|
+
label: `+${remaining}`,
|
|
3529
|
+
size: "md",
|
|
3530
|
+
color: "bg-ph-toolbar text-ph-subtle"
|
|
3531
|
+
}
|
|
3532
|
+
)
|
|
3533
|
+
] }));
|
|
3534
|
+
}
|
|
3535
|
+
|
|
3536
|
+
// src/components/ui/Progress.tsx
|
|
3537
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
3538
|
+
var sizeMap6 = {
|
|
3539
|
+
sm: "h-1",
|
|
3540
|
+
md: "h-2",
|
|
3541
|
+
lg: "h-3"
|
|
3542
|
+
};
|
|
3543
|
+
function Progress(_a) {
|
|
3544
|
+
var _b = _a, {
|
|
3545
|
+
value,
|
|
3546
|
+
max = 100,
|
|
3547
|
+
color = "bg-ph-brand",
|
|
3548
|
+
label,
|
|
3549
|
+
showPercentage = false,
|
|
3550
|
+
size = "md",
|
|
3551
|
+
className
|
|
3552
|
+
} = _b, props = __objRest(_b, [
|
|
3553
|
+
"value",
|
|
3554
|
+
"max",
|
|
3555
|
+
"color",
|
|
3556
|
+
"label",
|
|
3557
|
+
"showPercentage",
|
|
3558
|
+
"size",
|
|
3559
|
+
"className"
|
|
3560
|
+
]);
|
|
3561
|
+
const percentage = Math.min(100, Math.max(0, value / max * 100));
|
|
3562
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", __spreadProps(__spreadValues({ className: cn("w-full", className) }, props), { children: [
|
|
3563
|
+
(label || showPercentage) && /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "mb-1.5 flex justify-between text-sm text-ph-subtle", children: [
|
|
3564
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { children: label }),
|
|
3565
|
+
showPercentage && /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("span", { className: "tabular-nums", children: [
|
|
3566
|
+
Math.round(percentage),
|
|
3567
|
+
"%"
|
|
3568
|
+
] })
|
|
3569
|
+
] }),
|
|
3570
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: cn("ph-progress", sizeMap6[size]), children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
3571
|
+
"div",
|
|
3572
|
+
{
|
|
3573
|
+
className: cn("ph-progress-bar", color),
|
|
3574
|
+
style: { width: `${percentage}%` },
|
|
3575
|
+
role: "progressbar",
|
|
3576
|
+
"aria-valuenow": value,
|
|
3577
|
+
"aria-valuemin": 0,
|
|
3578
|
+
"aria-valuemax": max
|
|
3579
|
+
}
|
|
3580
|
+
) })
|
|
3581
|
+
] }));
|
|
3582
|
+
}
|
|
3583
|
+
|
|
3584
|
+
// src/components/ui/ChatBubble.tsx
|
|
3585
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
3586
|
+
function ChatBubble(_a) {
|
|
3587
|
+
var _b = _a, {
|
|
3588
|
+
children,
|
|
3589
|
+
avatar,
|
|
3590
|
+
name,
|
|
3591
|
+
time,
|
|
3592
|
+
variant = "from",
|
|
3593
|
+
footer,
|
|
3594
|
+
className
|
|
3595
|
+
} = _b, props = __objRest(_b, [
|
|
3596
|
+
"children",
|
|
3597
|
+
"avatar",
|
|
3598
|
+
"name",
|
|
3599
|
+
"time",
|
|
3600
|
+
"variant",
|
|
3601
|
+
"footer",
|
|
3602
|
+
"className"
|
|
3603
|
+
]);
|
|
3604
|
+
const isSelf = variant === "self";
|
|
3605
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|
|
3606
|
+
"div",
|
|
3607
|
+
__spreadProps(__spreadValues({
|
|
3608
|
+
className: cn(
|
|
3609
|
+
"flex gap-3",
|
|
3610
|
+
isSelf && "flex-row-reverse",
|
|
3611
|
+
className
|
|
3612
|
+
)
|
|
3613
|
+
}, props), {
|
|
3614
|
+
children: [
|
|
3615
|
+
avatar && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: "shrink-0", children: avatar }),
|
|
3616
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: cn("min-w-0 flex-1", isSelf && "text-right"), children: [
|
|
3617
|
+
(name || time) && /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
|
|
3618
|
+
"header",
|
|
3619
|
+
{
|
|
3620
|
+
className: cn(
|
|
3621
|
+
"flex gap-2 text-xs text-ph-mutedtext",
|
|
3622
|
+
isSelf && "flex-row-reverse justify-end"
|
|
3623
|
+
),
|
|
3624
|
+
children: [
|
|
3625
|
+
name && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: "font-semibold text-ph-ink", children: name }),
|
|
3626
|
+
time && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { children: time })
|
|
3627
|
+
]
|
|
3628
|
+
}
|
|
3629
|
+
),
|
|
3630
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
3631
|
+
"div",
|
|
3632
|
+
{
|
|
3633
|
+
className: cn(
|
|
3634
|
+
"mt-2 inline-block text-left shadow-ph",
|
|
3635
|
+
isSelf ? "ph-chat-self" : "ph-chat-from"
|
|
3636
|
+
),
|
|
3637
|
+
children
|
|
3638
|
+
}
|
|
3639
|
+
),
|
|
3640
|
+
footer && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("footer", { className: "mt-2 text-[11px] text-ph-mutedtext", children: footer })
|
|
3641
|
+
] })
|
|
3642
|
+
]
|
|
3643
|
+
})
|
|
3644
|
+
);
|
|
3645
|
+
}
|
|
3646
|
+
|
|
3647
|
+
// src/components/ui/Terminal.tsx
|
|
3648
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
3649
|
+
function Terminal(_a) {
|
|
3650
|
+
var _b = _a, {
|
|
3651
|
+
title = "sandbox",
|
|
3652
|
+
lines,
|
|
3653
|
+
children,
|
|
3654
|
+
className
|
|
3655
|
+
} = _b, props = __objRest(_b, [
|
|
3656
|
+
"title",
|
|
3657
|
+
"lines",
|
|
3658
|
+
"children",
|
|
3659
|
+
"className"
|
|
3660
|
+
]);
|
|
3661
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
|
|
3662
|
+
"div",
|
|
3663
|
+
__spreadProps(__spreadValues({
|
|
3664
|
+
className: cn(
|
|
3665
|
+
"overflow-hidden rounded-xl border border-ph-border shadow-ph-md",
|
|
3666
|
+
className
|
|
3667
|
+
)
|
|
3668
|
+
}, props), {
|
|
3669
|
+
children: [
|
|
3670
|
+
/* @__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: [
|
|
3671
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "h-3 w-3 rounded-full bg-red-400" }),
|
|
3672
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "h-3 w-3 rounded-full bg-amber-400" }),
|
|
3673
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "h-3 w-3 rounded-full bg-emerald-400" }),
|
|
3674
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "text-xs font-medium text-ph-mutedtext", children: title })
|
|
3675
|
+
] }),
|
|
3676
|
+
/* @__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) => {
|
|
3677
|
+
const text = typeof line === "string" ? line : line.text;
|
|
3678
|
+
const color = typeof line === "string" ? void 0 : line.color;
|
|
3679
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("span", { children: [
|
|
3680
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: color || "text-neutral-600", children: text }),
|
|
3681
|
+
i < lines.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("br", {})
|
|
3682
|
+
] }, i);
|
|
3683
|
+
}) }) })
|
|
3684
|
+
]
|
|
3685
|
+
})
|
|
3686
|
+
);
|
|
3687
|
+
}
|
|
3688
|
+
|
|
3689
|
+
// src/components/ui/Indicator.tsx
|
|
3690
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
3691
|
+
var positionMap = {
|
|
3692
|
+
"top-right": "-right-[2px] -top-[2px]",
|
|
3693
|
+
"top-left": "-left-[2px] -top-[2px]",
|
|
3694
|
+
"bottom-right": "-right-[2px] -bottom-[2px]",
|
|
3695
|
+
"bottom-left": "-left-[2px] -bottom-[2px]"
|
|
3696
|
+
};
|
|
3697
|
+
function Indicator(_a) {
|
|
3698
|
+
var _b = _a, {
|
|
3699
|
+
children,
|
|
3700
|
+
badge,
|
|
3701
|
+
color = "bg-ph-brand",
|
|
3702
|
+
position = "top-right",
|
|
3703
|
+
dot = false,
|
|
3704
|
+
className
|
|
3705
|
+
} = _b, props = __objRest(_b, [
|
|
3706
|
+
"children",
|
|
3707
|
+
"badge",
|
|
3708
|
+
"color",
|
|
3709
|
+
"position",
|
|
3710
|
+
"dot",
|
|
3711
|
+
"className"
|
|
3712
|
+
]);
|
|
3713
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", __spreadProps(__spreadValues({ className: cn("relative inline-flex items-center justify-center", className) }, props), { children: [
|
|
3714
|
+
dot ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
3715
|
+
"span",
|
|
3716
|
+
{
|
|
3717
|
+
className: cn(
|
|
3718
|
+
"absolute z-10 h-2.5 w-2.5 rounded-full border-2 border-white",
|
|
3719
|
+
color,
|
|
3720
|
+
positionMap[position]
|
|
3721
|
+
)
|
|
3722
|
+
}
|
|
3723
|
+
) : badge != null ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
3724
|
+
"span",
|
|
3725
|
+
{
|
|
3726
|
+
className: cn(
|
|
3727
|
+
"absolute z-10 flex min-h-[22px] min-w-[22px] items-center justify-center rounded-full px-1 text-[11px] font-bold text-white",
|
|
3728
|
+
color,
|
|
3729
|
+
positionMap[position]
|
|
3730
|
+
),
|
|
3731
|
+
children: badge
|
|
3732
|
+
}
|
|
3733
|
+
) : null,
|
|
3734
|
+
children
|
|
3735
|
+
] }));
|
|
3736
|
+
}
|
|
3737
|
+
|
|
3738
|
+
// src/components/ui/Timeline.tsx
|
|
3739
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
3740
|
+
function Timeline(_a) {
|
|
3741
|
+
var _b = _a, {
|
|
3742
|
+
events,
|
|
3743
|
+
alternate = false,
|
|
3744
|
+
className
|
|
3745
|
+
} = _b, props = __objRest(_b, [
|
|
3746
|
+
"events",
|
|
3747
|
+
"alternate",
|
|
3748
|
+
"className"
|
|
3749
|
+
]);
|
|
3750
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
3751
|
+
"ol",
|
|
3752
|
+
__spreadProps(__spreadValues({
|
|
3753
|
+
className: cn("relative space-y-8", className)
|
|
3754
|
+
}, props), {
|
|
3755
|
+
children: events.map((event, idx) => {
|
|
3756
|
+
const align = alternate && idx % 2 !== 0 ? "lg:flex-row-reverse" : "";
|
|
3757
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("li", { className: cn("relative flex gap-6", align), children: [
|
|
3758
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
3759
|
+
"div",
|
|
3760
|
+
{
|
|
3761
|
+
className: cn(
|
|
3762
|
+
"relative z-10 flex h-12 w-12 shrink-0 items-center justify-center rounded-full ring-8 ring-ph-muted shadow-md",
|
|
3763
|
+
event.color || "bg-ph-brand text-white"
|
|
3764
|
+
),
|
|
3765
|
+
children: event.icon
|
|
3766
|
+
}
|
|
3767
|
+
),
|
|
3768
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("article", { className: "flex-1 rounded-xl border border-ph-border bg-ph-surface p-4 shadow-ph", children: [
|
|
3769
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex flex-wrap items-baseline gap-3", children: [
|
|
3770
|
+
/* @__PURE__ */ (0, import_jsx_runtime48.jsx)("h4", { className: "text-base font-semibold text-ph-ink", children: event.title }),
|
|
3771
|
+
event.time && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("time", { className: "text-[11px] font-semibold uppercase tracking-wide text-ph-mutedtext", children: event.time })
|
|
3772
|
+
] }),
|
|
3773
|
+
event.description && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("p", { className: "mt-2 text-sm text-ph-subtle", children: event.description })
|
|
3774
|
+
] })
|
|
3775
|
+
] }, event.id);
|
|
3776
|
+
})
|
|
3777
|
+
})
|
|
3778
|
+
);
|
|
3779
|
+
}
|
|
3780
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
3781
|
+
0 && (module.exports = {
|
|
3782
|
+
Accordion,
|
|
3783
|
+
Alert,
|
|
3784
|
+
AuthCard,
|
|
3785
|
+
AuthDivider,
|
|
3786
|
+
AuthLayout,
|
|
3787
|
+
Avatar,
|
|
3788
|
+
AvatarGroup,
|
|
3789
|
+
Badge,
|
|
3790
|
+
Breadcrumbs,
|
|
3791
|
+
Button,
|
|
3792
|
+
ButtonChrome,
|
|
3793
|
+
Calendar,
|
|
3794
|
+
Caption,
|
|
3795
|
+
Card,
|
|
3796
|
+
ChatBubble,
|
|
3797
|
+
Checkbox,
|
|
3798
|
+
CodeBlock,
|
|
3799
|
+
CollapsibleSection,
|
|
3800
|
+
CommandPalette,
|
|
3801
|
+
ComponentDocs,
|
|
3802
|
+
Display,
|
|
3803
|
+
Drawer,
|
|
3804
|
+
DropdownButton,
|
|
3805
|
+
DropdownItem,
|
|
3806
|
+
DropdownMenu,
|
|
3807
|
+
DropdownRadioGroup,
|
|
3808
|
+
DropdownRadioItem,
|
|
3809
|
+
EmptyState,
|
|
3810
|
+
FileUpload,
|
|
3811
|
+
FilterBar,
|
|
3812
|
+
FilterChips,
|
|
3813
|
+
FilterControls,
|
|
3814
|
+
FilterMenu,
|
|
3815
|
+
FormField,
|
|
3816
|
+
H1,
|
|
3817
|
+
H2,
|
|
3818
|
+
H3,
|
|
3819
|
+
H4,
|
|
3820
|
+
H5,
|
|
3821
|
+
HoverCard,
|
|
3822
|
+
Icon,
|
|
3823
|
+
IconByName,
|
|
3824
|
+
Indicator,
|
|
3825
|
+
Input,
|
|
3826
|
+
Kbd,
|
|
3827
|
+
Label,
|
|
3828
|
+
Lead,
|
|
3829
|
+
Loader,
|
|
3830
|
+
LoadingState,
|
|
3831
|
+
Modal,
|
|
3832
|
+
Mono,
|
|
3833
|
+
Overline,
|
|
3834
|
+
P,
|
|
3835
|
+
Pagination,
|
|
3836
|
+
Panel,
|
|
3837
|
+
Progress,
|
|
3838
|
+
Radio,
|
|
3839
|
+
Range,
|
|
3840
|
+
Rating,
|
|
3841
|
+
SearchGroup,
|
|
3842
|
+
SearchInput,
|
|
3843
|
+
SegmentedControl,
|
|
3844
|
+
Select,
|
|
3845
|
+
SettingsLayout,
|
|
3846
|
+
SettingsNav,
|
|
3847
|
+
ShowcaseWrapper,
|
|
3848
|
+
Skeleton,
|
|
3849
|
+
Small,
|
|
3850
|
+
SortMenu,
|
|
3851
|
+
Stat,
|
|
3852
|
+
Stepper,
|
|
3853
|
+
Table,
|
|
3854
|
+
Tabs,
|
|
3855
|
+
Terminal,
|
|
3856
|
+
Textarea,
|
|
3857
|
+
ThemeDomSync,
|
|
3858
|
+
ThemeManager,
|
|
3859
|
+
ThemeSwitcher,
|
|
3860
|
+
Timeline,
|
|
3861
|
+
Toast,
|
|
3862
|
+
ToastStack,
|
|
3863
|
+
Toggle
|
|
3864
|
+
});
|