@xenide-io/the-old-ui-theme 0.5.4 → 0.6.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.
Files changed (63) hide show
  1. package/dist/{Chip-C5hRFAhe.d.mts → Chip-DzC5xtK9.d.mts} +8 -3
  2. package/dist/{Chip-C5hRFAhe.d.ts → Chip-DzC5xtK9.d.ts} +8 -3
  3. package/dist/chunk-3G43JEI3.mjs +2564 -0
  4. package/dist/index.d.mts +2 -2
  5. package/dist/index.d.ts +2 -2
  6. package/dist/index.js +7 -2
  7. package/dist/index.mjs +3 -1
  8. package/dist/tailwind-preset.js +1 -0
  9. package/dist/tailwind-preset.mjs +1 -0
  10. package/dist/ui.d.mts +4 -531
  11. package/dist/ui.d.ts +4 -531
  12. package/dist/ui.js +407 -2504
  13. package/dist/ui.mjs +5 -91
  14. package/package.json +1 -1
  15. package/src/app/globals.css +18 -0
  16. package/src/components/ui/Typography.tsx +12 -4
  17. package/src/components/ui/index.ts +7 -184
  18. package/src/components/ui/typography.test.tsx +27 -0
  19. package/src/styles/suite-skin.css +21 -1
  20. package/src/styles/typography.css +72 -3
  21. package/tailwind-preset.ts +1 -0
  22. package/dist/chunk-SBBKXV35.mjs +0 -4620
  23. package/src/components/ui/AlertDialog.tsx +0 -62
  24. package/src/components/ui/AppLayout.tsx +0 -27
  25. package/src/components/ui/Autocomplete.tsx +0 -106
  26. package/src/components/ui/Banner.tsx +0 -63
  27. package/src/components/ui/ButtonGroup.tsx +0 -16
  28. package/src/components/ui/ChatBubble.tsx +0 -71
  29. package/src/components/ui/Collapsible.tsx +0 -46
  30. package/src/components/ui/Combobox.tsx +0 -119
  31. package/src/components/ui/ContextMenu.tsx +0 -81
  32. package/src/components/ui/DataTable.tsx +0 -133
  33. package/src/components/ui/DatePicker.tsx +0 -96
  34. package/src/components/ui/Dialog.tsx +0 -75
  35. package/src/components/ui/Divider.tsx +0 -39
  36. package/src/components/ui/Drawer.tsx +0 -71
  37. package/src/components/ui/HoverCard.tsx +0 -36
  38. package/src/components/ui/Indicator.tsx +0 -61
  39. package/src/components/ui/InputGroup.tsx +0 -16
  40. package/src/components/ui/Lettermark.tsx +0 -47
  41. package/src/components/ui/LoadingBar.tsx +0 -25
  42. package/src/components/ui/Menubar.tsx +0 -66
  43. package/src/components/ui/Metric.tsx +0 -34
  44. package/src/components/ui/Navigation.tsx +0 -94
  45. package/src/components/ui/NumberField.tsx +0 -76
  46. package/src/components/ui/Popover.tsx +0 -73
  47. package/src/components/ui/ProgressCircle.tsx +0 -63
  48. package/src/components/ui/Rating.tsx +0 -65
  49. package/src/components/ui/Resizable.tsx +0 -71
  50. package/src/components/ui/Row.tsx +0 -51
  51. package/src/components/ui/ScrollArea.tsx +0 -54
  52. package/src/components/ui/Sidebar.tsx +0 -79
  53. package/src/components/ui/Snack.tsx +0 -48
  54. package/src/components/ui/Splotch.tsx +0 -33
  55. package/src/components/ui/Stepper.tsx +0 -74
  56. package/src/components/ui/Tabs.tsx +0 -53
  57. package/src/components/ui/Tag.tsx +0 -65
  58. package/src/components/ui/Terminal.tsx +0 -54
  59. package/src/components/ui/ThemeManager.tsx +0 -18
  60. package/src/components/ui/Timeline.tsx +0 -60
  61. package/src/components/ui/Toast.tsx +0 -70
  62. package/src/components/ui/Toggle.tsx +0 -62
  63. package/src/components/ui/Widget.tsx +0 -31
package/dist/ui.js CHANGED
@@ -62,40 +62,25 @@ var ui_exports = {};
62
62
  __export(ui_exports, {
63
63
  Accordion: () => Accordion,
64
64
  Alert: () => Alert,
65
- AlertDialog: () => AlertDialog,
66
- AppLayout: () => AppLayout,
67
65
  AuthCard: () => AuthCard,
68
66
  AuthDivider: () => AuthDivider,
69
67
  AuthLayout: () => AuthLayout,
70
- Autocomplete: () => Autocomplete,
71
68
  Avatar: () => Avatar,
72
69
  AvatarGroup: () => AvatarGroup,
73
70
  Badge: () => Badge,
74
- Banner: () => Banner,
75
- Breadcrumbs: () => Breadcrumbs,
76
71
  Button: () => Button,
77
72
  ButtonChrome: () => ButtonChrome,
78
- ButtonGroup: () => ButtonGroup,
79
73
  Calendar: () => Calendar,
80
74
  Caption: () => Caption,
81
75
  Card: () => Card,
82
- ChatBubble: () => ChatBubble,
83
76
  Checkbox: () => Checkbox,
84
77
  Chip: () => Chip,
85
78
  CodeBlock: () => CodeBlock,
86
- Collapsible: () => Collapsible,
87
79
  CollapsibleSection: () => CollapsibleSection,
88
- Combobox: () => Combobox,
89
80
  CommandPalette: () => CommandPalette,
90
81
  ComponentDocs: () => ComponentDocs,
91
- ContextMenu: () => ContextMenu,
92
- DataTable: () => DataTable,
93
- DatePicker: () => DatePicker,
94
- Dialog: () => Dialog2,
95
82
  Display: () => Display,
96
- Divider: () => Divider,
97
83
  Dot: () => Dot,
98
- Drawer: () => Drawer,
99
84
  DropdownButton: () => DropdownButton,
100
85
  DropdownItem: () => DropdownItem,
101
86
  DropdownMenu: () => DropdownMenu,
@@ -113,71 +98,43 @@ __export(ui_exports, {
113
98
  H3: () => H3,
114
99
  H4: () => H4,
115
100
  H5: () => H5,
116
- HoverCard: () => HoverCard,
117
101
  Icon: () => IconBase,
118
102
  IconByName: () => IconByName,
119
- Indicator: () => Indicator,
120
103
  Input: () => Input,
121
- InputGroup: () => InputGroup,
122
104
  Kbd: () => Kbd,
123
105
  Label: () => Label,
124
106
  Lead: () => Lead,
125
- Lettermark: () => Lettermark,
126
107
  Link: () => Link,
127
108
  Loader: () => Loader,
128
- LoadingBar: () => LoadingBar,
129
109
  LoadingState: () => LoadingState,
130
- Menubar: () => Menubar,
131
- Metric: () => Metric,
132
110
  Modal: () => Modal,
133
111
  Mono: () => Mono,
134
- NumberField: () => NumberField,
135
112
  Overline: () => Overline,
136
113
  P: () => P,
137
- Pagination: () => Pagination,
138
114
  Panel: () => Panel,
139
- Popover: () => Popover,
140
115
  Progress: () => Progress,
141
- ProgressCircle: () => ProgressCircle,
142
116
  Radio: () => Radio,
143
117
  Range: () => Range,
144
- Rating: () => Rating,
145
- Resizable: () => Resizable,
146
- Row: () => Row,
147
- ScrollArea: () => ScrollArea,
148
118
  SearchGroup: () => SearchGroup,
149
119
  SearchInput: () => SearchInput,
120
+ SectionTitle: () => SectionTitle,
150
121
  SegmentedControl: () => SegmentedControl,
151
122
  Select: () => Select,
152
123
  SettingsLayout: () => SettingsLayout,
153
124
  SettingsNav: () => SettingsNav,
154
125
  ShowcaseWrapper: () => ShowcaseWrapper,
155
- Sidebar: () => Sidebar,
156
126
  Skeleton: () => Skeleton,
157
127
  Small: () => Small,
158
- Snack: () => Snack,
159
128
  SortMenu: () => SortMenu,
160
129
  Spinner: () => Spinner,
161
- Splotch: () => Splotch,
162
130
  Stat: () => Stat,
163
- Stepper: () => Stepper,
164
131
  Table: () => Table,
165
- Tabs: () => Tabs,
166
- Tag: () => Tag,
167
- Terminal: () => Terminal,
168
132
  Textarea: () => Textarea,
169
133
  ThemeDomSync: () => ThemeDomSync,
170
- ThemeManager: () => ThemeManager,
171
134
  ThemeSwitcher: () => ThemeSwitcher,
172
- Timeline: () => Timeline,
173
- Toast: () => Toast,
174
- ToastStack: () => ToastStack,
175
135
  Toggle: () => Toggle,
176
- ToggleButton: () => ToggleButton,
177
- ToggleGroup: () => ToggleGroup,
178
136
  Tooltip: () => Tooltip,
179
- TooltipProvider: () => TooltipProvider,
180
- Widget: () => Widget
137
+ TooltipProvider: () => TooltipProvider
181
138
  });
182
139
  module.exports = __toCommonJS(ui_exports);
183
140
 
@@ -995,55 +952,8 @@ var Card = (0, import_react7.forwardRef)(function Card2(_a, ref) {
995
952
  });
996
953
  Card.displayName = "Card";
997
954
 
998
- // src/components/ui/Drawer.tsx
999
- var import_jsx_runtime9 = require("react/jsx-runtime");
1000
- var sideMap = {
1001
- left: "left-0 border-r",
1002
- right: "right-0 border-l"
1003
- };
1004
- var sizeMap2 = {
1005
- sm: "w-[min(100%,18rem)]",
1006
- md: "w-[min(100%,22rem)]",
1007
- lg: "w-[min(100%,30rem)]"
1008
- };
1009
- function Drawer({
1010
- open = false,
1011
- onClose,
1012
- title,
1013
- children,
1014
- footer,
1015
- side = "right",
1016
- size = "md",
1017
- className,
1018
- showCloseButton = true
1019
- }) {
1020
- if (!open) return null;
1021
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
1022
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "fixed inset-0 z-[120] bg-black/45 backdrop-blur-[2px]", role: "presentation", onClick: onClose }),
1023
- /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
1024
- "aside",
1025
- {
1026
- className: cn(
1027
- "fixed inset-y-0 z-[130] flex flex-col overflow-y-auto border-ph-border bg-ph-surface shadow-ph-md",
1028
- sideMap[side],
1029
- sizeMap2[size],
1030
- className
1031
- ),
1032
- children: [
1033
- (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: [
1034
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "text-sm font-bold text-ph-ink", children: title }),
1035
- 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" }) })
1036
- ] }),
1037
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("div", { className: "flex-1", children }),
1038
- footer && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("footer", { className: "border-t border-ph-border px-4 py-3", children: footer })
1039
- ]
1040
- }
1041
- )
1042
- ] });
1043
- }
1044
-
1045
955
  // src/components/ui/Kbd.tsx
1046
- var import_jsx_runtime10 = require("react/jsx-runtime");
956
+ var import_jsx_runtime9 = require("react/jsx-runtime");
1047
957
  var platformLabels = {
1048
958
  text: {
1049
959
  command: "Command",
@@ -1102,17 +1012,17 @@ function Kbd(_a) {
1102
1012
  "aria-label"
1103
1013
  ]);
1104
1014
  if (variant === "token") {
1105
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("code", __spreadProps(__spreadValues({ className: cn("ph-code-token ph-kbd", className), "aria-label": ariaLabel }, props), { children }));
1015
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("code", __spreadProps(__spreadValues({ className: cn("ph-code-token ph-kbd", className), "aria-label": ariaLabel }, props), { children }));
1106
1016
  }
1107
1017
  const sourceKeys = (keys == null ? void 0 : keys.length) ? keys : children != null ? [children] : [];
1108
1018
  const displayKeys = sourceKeys.map((key) => formatKey(key, platform));
1109
1019
  const accessibleLabel = ariaLabel != null ? ariaLabel : getShortcutLabel(displayKeys);
1110
1020
  if (variant === "key") {
1111
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("kbd", __spreadProps(__spreadValues({ className: cn("ph-keycap", className), "aria-label": accessibleLabel }, props), { children: displayKeys[0] }));
1021
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("kbd", __spreadProps(__spreadValues({ className: cn("ph-keycap", className), "aria-label": accessibleLabel }, props), { children: displayKeys[0] }));
1112
1022
  }
1113
- 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: [
1114
- index > 0 && separator != null ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "ph-shortcut-separator", "aria-hidden": "true", children: separator }) : null,
1115
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "ph-shortcut-key", "aria-hidden": accessibleLabel ? true : void 0, children: key })
1023
+ return /* @__PURE__ */ (0, import_jsx_runtime9.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_runtime9.jsxs)("span", { className: "contents", children: [
1024
+ index > 0 && separator != null ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "ph-shortcut-separator", "aria-hidden": "true", children: separator }) : null,
1025
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: "ph-shortcut-key", "aria-hidden": accessibleLabel ? true : void 0, children: key })
1116
1026
  ] }, index)) }));
1117
1027
  }
1118
1028
  function formatKey(key, platform) {
@@ -1131,7 +1041,7 @@ function getShortcutLabel(keys) {
1131
1041
  }
1132
1042
 
1133
1043
  // src/components/ui/Loader.tsx
1134
- var import_jsx_runtime11 = require("react/jsx-runtime");
1044
+ var import_jsx_runtime10 = require("react/jsx-runtime");
1135
1045
  var loaderSizeClass = {
1136
1046
  sm: "ph-loader-sm",
1137
1047
  md: "ph-loader-md",
@@ -1157,7 +1067,7 @@ function Loader(_a) {
1157
1067
  "label",
1158
1068
  "className"
1159
1069
  ]);
1160
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
1070
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
1161
1071
  "span",
1162
1072
  __spreadProps(__spreadValues({
1163
1073
  role: "status",
@@ -1165,20 +1075,20 @@ function Loader(_a) {
1165
1075
  className: cn("ph-loader", loaderSizeClass[size], className)
1166
1076
  }, props), {
1167
1077
  children: [
1168
- variant === "spinner" ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "ph-loading", "aria-hidden": true }) : null,
1169
- variant === "dots" ? /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("span", { className: "ph-loading-dots", "aria-hidden": true, children: [
1170
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", {}),
1171
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", {}),
1172
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", {})
1078
+ variant === "spinner" ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "ph-loading", "aria-hidden": true }) : null,
1079
+ variant === "dots" ? /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("span", { className: "ph-loading-dots", "aria-hidden": true, children: [
1080
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", {}),
1081
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", {}),
1082
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", {})
1173
1083
  ] }) : null,
1174
- variant === "pulse" ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "ph-loading-pulse", "aria-hidden": true }) : null
1084
+ variant === "pulse" ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "ph-loading-pulse", "aria-hidden": true }) : null
1175
1085
  ]
1176
1086
  })
1177
1087
  );
1178
1088
  }
1179
1089
  function Skeleton(_a) {
1180
1090
  var _b = _a, { shape = "text", className } = _b, props = __objRest(_b, ["shape", "className"]);
1181
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1091
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1182
1092
  "span",
1183
1093
  __spreadValues({
1184
1094
  className: cn("ph-skeleton", skeletonShapeClass[shape], className),
@@ -1202,53 +1112,53 @@ function LoadingState(_a) {
1202
1112
  "size",
1203
1113
  "className"
1204
1114
  ]);
1205
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", __spreadProps(__spreadValues({ className: cn("ph-loading-state", className), role: "status", "aria-label": label }, props), { children: [
1206
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Loader, { variant, size, label, "aria-hidden": "true" }),
1207
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "ph-loading-state__copy", children: [
1208
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("strong", { children: title }),
1209
- description ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { children: description }) : null
1115
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", __spreadProps(__spreadValues({ className: cn("ph-loading-state", className), role: "status", "aria-label": label }, props), { children: [
1116
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Loader, { variant, size, label, "aria-hidden": "true" }),
1117
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "ph-loading-state__copy", children: [
1118
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("strong", { children: title }),
1119
+ description ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { children: description }) : null
1210
1120
  ] })
1211
1121
  ] }));
1212
1122
  }
1213
1123
 
1214
1124
  // src/components/ui/AuthLayout.tsx
1215
1125
  var import_react8 = require("react");
1216
- var import_jsx_runtime12 = require("react/jsx-runtime");
1126
+ var import_jsx_runtime11 = require("react/jsx-runtime");
1217
1127
  function AuthLayout(_a) {
1218
1128
  var _b = _a, { brand, footer, aside, children, className } = _b, props = __objRest(_b, ["brand", "footer", "aside", "children", "className"]);
1219
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", __spreadProps(__spreadValues({ className: cn("ph-auth-layout", aside != null && "ph-auth-layout--split", className) }, props), { children: [
1220
- aside ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("aside", { className: "ph-auth-layout__aside", children: aside }) : null,
1221
- /* @__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: [
1222
- brand ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "ph-auth-layout__brand", children: brand }) : null,
1129
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", __spreadProps(__spreadValues({ className: cn("ph-auth-layout", aside != null && "ph-auth-layout--split", className) }, props), { children: [
1130
+ aside ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("aside", { className: "ph-auth-layout__aside", children: aside }) : null,
1131
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "ph-auth-layout__main", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "ph-auth-layout__column", children: [
1132
+ brand ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "ph-auth-layout__brand", children: brand }) : null,
1223
1133
  children,
1224
- footer ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("footer", { className: "ph-auth-layout__footer", children: footer }) : null
1134
+ footer ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("footer", { className: "ph-auth-layout__footer", children: footer }) : null
1225
1135
  ] }) })
1226
1136
  ] }));
1227
1137
  }
1228
1138
  function AuthCard(_a) {
1229
1139
  var _b = _a, { title, description, footer, children, className } = _b, props = __objRest(_b, ["title", "description", "footer", "children", "className"]);
1230
1140
  const titleId = (0, import_react8.useId)();
1231
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("section", __spreadProps(__spreadValues({ className: cn("ph-auth-card", className), "aria-labelledby": titleId }, props), { children: [
1232
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("header", { className: "ph-auth-card__header", children: [
1233
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("h1", { id: titleId, children: title }),
1234
- description ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { children: description }) : null
1141
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("section", __spreadProps(__spreadValues({ className: cn("ph-auth-card", className), "aria-labelledby": titleId }, props), { children: [
1142
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("header", { className: "ph-auth-card__header", children: [
1143
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("h1", { id: titleId, children: title }),
1144
+ description ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("p", { children: description }) : null
1235
1145
  ] }),
1236
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "ph-auth-card__body", children }),
1237
- footer ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("footer", { className: "ph-auth-card__footer", children: footer }) : null
1146
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "ph-auth-card__body", children }),
1147
+ footer ? /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("footer", { className: "ph-auth-card__footer", children: footer }) : null
1238
1148
  ] }));
1239
1149
  }
1240
1150
  function AuthDivider(_a) {
1241
1151
  var _b = _a, { children = "or continue with", className } = _b, props = __objRest(_b, ["children", "className"]);
1242
- 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 }) }));
1152
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", __spreadProps(__spreadValues({ className: cn("ph-auth-divider", className) }, props), { children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { children }) }));
1243
1153
  }
1244
1154
 
1245
1155
  // src/components/ui/SettingsLayout.tsx
1246
- var import_jsx_runtime13 = require("react/jsx-runtime");
1156
+ var import_jsx_runtime12 = require("react/jsx-runtime");
1247
1157
  function SettingsNav(_a) {
1248
1158
  var _b = _a, { groups, className } = _b, props = __objRest(_b, ["groups", "className"]);
1249
- 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: [
1250
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("h3", { children: group.label }),
1251
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "ph-settings-nav__items", children: group.items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
1159
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", __spreadProps(__spreadValues({ className: cn("ph-settings-nav", className) }, props), { children: groups.map((group, index) => /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "ph-settings-nav__group", children: [
1160
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("h3", { children: group.label }),
1161
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "ph-settings-nav__items", children: group.items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
1252
1162
  "a",
1253
1163
  {
1254
1164
  href: item.href,
@@ -1260,9 +1170,9 @@ function SettingsNav(_a) {
1260
1170
  ),
1261
1171
  "aria-current": item.active ? "page" : void 0,
1262
1172
  children: [
1263
- item.icon ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "ph-settings-nav__icon", children: item.icon }) : null,
1264
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { children: item.label }),
1265
- item.badge ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "ph-settings-nav__badge", children: item.badge }) : null
1173
+ item.icon ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "ph-settings-nav__icon", children: item.icon }) : null,
1174
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { children: item.label }),
1175
+ item.badge ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "ph-settings-nav__badge", children: item.badge }) : null
1266
1176
  ]
1267
1177
  },
1268
1178
  item.id
@@ -1287,31 +1197,31 @@ function SettingsLayout(_a) {
1287
1197
  "children",
1288
1198
  "className"
1289
1199
  ]);
1290
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("section", __spreadProps(__spreadValues({ className: cn("ph-settings-layout", className) }, props), { children: [
1291
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("header", { className: "ph-settings-layout__header", children: [
1292
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { children: [
1293
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("h2", { children: title }),
1294
- description ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("p", { children: description }) : null
1200
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("section", __spreadProps(__spreadValues({ className: cn("ph-settings-layout", className) }, props), { children: [
1201
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("header", { className: "ph-settings-layout__header", children: [
1202
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { children: [
1203
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("h2", { children: title }),
1204
+ description ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { children: description }) : null
1295
1205
  ] }),
1296
- actions ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "ph-settings-layout__actions", children: actions }) : null
1206
+ actions ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "ph-settings-layout__actions", children: actions }) : null
1297
1207
  ] }),
1298
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("details", { className: "ph-settings-layout__mobile-nav", children: [
1299
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("summary", { children: [
1300
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(IconTuning, { className: "h-4 w-4", "aria-hidden": true }),
1208
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("details", { className: "ph-settings-layout__mobile-nav", children: [
1209
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("summary", { children: [
1210
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(IconTuning, { className: "h-4 w-4", "aria-hidden": true }),
1301
1211
  "Settings menu"
1302
1212
  ] }),
1303
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("nav", { "aria-label": navigationLabel, children: navigation })
1213
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("nav", { "aria-label": navigationLabel, children: navigation })
1304
1214
  ] }),
1305
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "ph-settings-layout__grid", children: [
1306
- /* @__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 }) }),
1307
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "ph-settings-layout__content", children })
1215
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "ph-settings-layout__grid", children: [
1216
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("aside", { className: "ph-settings-layout__sidebar", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("nav", { "aria-label": navigationLabel, children: navigation }) }),
1217
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "ph-settings-layout__content", children })
1308
1218
  ] })
1309
1219
  ] }));
1310
1220
  }
1311
1221
 
1312
1222
  // src/components/ui/DropdownMenu.tsx
1313
1223
  var DropdownPrimitive = __toESM(require("@radix-ui/react-dropdown-menu"));
1314
- var import_jsx_runtime14 = require("react/jsx-runtime");
1224
+ var import_jsx_runtime13 = require("react/jsx-runtime");
1315
1225
  var sizeClass2 = {
1316
1226
  xs: "ph-btn-xs",
1317
1227
  sm: "ph-btn-sm",
@@ -1333,7 +1243,7 @@ function DropdownContent({
1333
1243
  avoidCollisions = true,
1334
1244
  panelClassName
1335
1245
  }) {
1336
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(DropdownPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
1246
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(DropdownPrimitive.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
1337
1247
  DropdownPrimitive.Content,
1338
1248
  {
1339
1249
  className: cn("ph-dropdown-panel", panelClassName),
@@ -1346,7 +1256,7 @@ function DropdownContent({
1346
1256
  sticky: "partial",
1347
1257
  children: [
1348
1258
  children,
1349
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1259
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1350
1260
  DropdownPrimitive.Arrow,
1351
1261
  {
1352
1262
  className: "ph-dropdown-arrow",
@@ -1398,7 +1308,7 @@ function DropdownMenu(_a) {
1398
1308
  "modal",
1399
1309
  "disabled"
1400
1310
  ]);
1401
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", __spreadProps(__spreadValues({ className: cn("ph-dropdown", className) }, props), { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
1311
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", __spreadProps(__spreadValues({ className: cn("ph-dropdown", className) }, props), { children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
1402
1312
  DropdownPrimitive.Root,
1403
1313
  {
1404
1314
  open,
@@ -1406,7 +1316,7 @@ function DropdownMenu(_a) {
1406
1316
  onOpenChange,
1407
1317
  modal,
1408
1318
  children: [
1409
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(DropdownPrimitive.Trigger, { asChild: true, disabled, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1319
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(DropdownPrimitive.Trigger, { asChild: true, disabled, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1410
1320
  "button",
1411
1321
  {
1412
1322
  type: "button",
@@ -1417,7 +1327,7 @@ function DropdownMenu(_a) {
1417
1327
  children: trigger
1418
1328
  }
1419
1329
  ) }),
1420
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1330
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1421
1331
  DropdownContent,
1422
1332
  {
1423
1333
  align,
@@ -1482,8 +1392,8 @@ function DropdownButton(_a) {
1482
1392
  "modal",
1483
1393
  "disabled"
1484
1394
  ]);
1485
- const trailing = sideIcon != null ? sideIcon : /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(IconChevronDown, { className: "h-4 w-4", "aria-hidden": true });
1486
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", __spreadProps(__spreadValues({ className: cn("ph-dropdown", className) }, props), { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
1395
+ const trailing = sideIcon != null ? sideIcon : /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(IconChevronDown, { className: "h-4 w-4", "aria-hidden": true });
1396
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", __spreadProps(__spreadValues({ className: cn("ph-dropdown", className) }, props), { children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
1487
1397
  DropdownPrimitive.Root,
1488
1398
  {
1489
1399
  open,
@@ -1491,7 +1401,7 @@ function DropdownButton(_a) {
1491
1401
  onOpenChange,
1492
1402
  modal,
1493
1403
  children: [
1494
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(DropdownPrimitive.Trigger, { asChild: true, disabled, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1404
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(DropdownPrimitive.Trigger, { asChild: true, disabled, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1495
1405
  "button",
1496
1406
  {
1497
1407
  type: "button",
@@ -1504,7 +1414,7 @@ function DropdownButton(_a) {
1504
1414
  split && "ph-btn-split"
1505
1415
  ),
1506
1416
  "aria-label": ariaLabel,
1507
- children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1417
+ children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1508
1418
  ButtonChrome,
1509
1419
  {
1510
1420
  label,
@@ -1515,7 +1425,7 @@ function DropdownButton(_a) {
1515
1425
  )
1516
1426
  }
1517
1427
  ) }),
1518
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1428
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1519
1429
  DropdownContent,
1520
1430
  {
1521
1431
  align,
@@ -1542,7 +1452,7 @@ function DropdownItem(_a) {
1542
1452
  "children",
1543
1453
  "disabled"
1544
1454
  ]);
1545
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(DropdownPrimitive.Item, { asChild: true, disabled, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1455
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(DropdownPrimitive.Item, { asChild: true, disabled, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1546
1456
  "button",
1547
1457
  __spreadProps(__spreadValues({
1548
1458
  type: "button",
@@ -1554,7 +1464,7 @@ function DropdownItem(_a) {
1554
1464
  ) });
1555
1465
  }
1556
1466
  function DropdownRadioGroup(props) {
1557
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(DropdownPrimitive.RadioGroup, __spreadValues({}, props));
1467
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(DropdownPrimitive.RadioGroup, __spreadValues({}, props));
1558
1468
  }
1559
1469
  function DropdownRadioItem(_a) {
1560
1470
  var _b = _a, {
@@ -1564,14 +1474,14 @@ function DropdownRadioItem(_a) {
1564
1474
  "className",
1565
1475
  "children"
1566
1476
  ]);
1567
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
1477
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
1568
1478
  DropdownPrimitive.RadioItem,
1569
1479
  __spreadProps(__spreadValues({
1570
1480
  className: cn("ph-dropdown-item ph-dropdown-radio-item", className)
1571
1481
  }, props), {
1572
1482
  children: [
1573
- /* @__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" }) }) }),
1574
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { children })
1483
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "ph-dropdown-item-indicator", "aria-hidden": true, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(DropdownPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(IconCheck, { className: "h-3.5 w-3.5" }) }) }),
1484
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { children })
1575
1485
  ]
1576
1486
  })
1577
1487
  );
@@ -1582,7 +1492,7 @@ var import_react10 = require("react");
1582
1492
 
1583
1493
  // src/components/ui/FormField.tsx
1584
1494
  var import_react9 = require("react");
1585
- var import_jsx_runtime15 = require("react/jsx-runtime");
1495
+ var import_jsx_runtime14 = require("react/jsx-runtime");
1586
1496
  function FormField(_a) {
1587
1497
  var _b = _a, {
1588
1498
  controlId,
@@ -1615,27 +1525,27 @@ function FormField(_a) {
1615
1525
  "aria-errormessage": errorId,
1616
1526
  "aria-invalid": error ? true : void 0
1617
1527
  };
1618
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", __spreadProps(__spreadValues({ className: cn("ph-field", className) }, props), { children: [
1619
- label ? /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
1528
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", __spreadProps(__spreadValues({ className: cn("ph-field", className) }, props), { children: [
1529
+ label ? /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
1620
1530
  "label",
1621
1531
  {
1622
1532
  htmlFor: id,
1623
1533
  className: cn("ph-label", hideLabel && "sr-only", disabled && "opacity-50"),
1624
1534
  children: [
1625
1535
  label,
1626
- required ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { "aria-hidden": "true", children: " *" }) : null
1536
+ required ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { "aria-hidden": "true", children: " *" }) : null
1627
1537
  ]
1628
1538
  }
1629
1539
  ) : null,
1630
1540
  typeof children === "function" ? children(controlProps) : children,
1631
- descriptionId ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { id: descriptionId, className: "mt-1 text-xs text-ph-subtle", children: helperText }) : null,
1632
- errorId ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { id: errorId, className: "mt-1 text-xs font-medium text-ph-danger", children: error }) : null
1541
+ descriptionId ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { id: descriptionId, className: "mt-1 text-xs text-ph-subtle", children: helperText }) : null,
1542
+ errorId ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("p", { id: errorId, className: "mt-1 text-xs font-medium text-ph-danger", children: error }) : null
1633
1543
  ] }));
1634
1544
  }
1635
1545
 
1636
1546
  // src/components/ui/Input.tsx
1637
- var import_jsx_runtime16 = require("react/jsx-runtime");
1638
- var sizeMap3 = {
1547
+ var import_jsx_runtime15 = require("react/jsx-runtime");
1548
+ var sizeMap2 = {
1639
1549
  sm: "ph-input-sm",
1640
1550
  md: "",
1641
1551
  lg: "ph-input-lg"
@@ -1675,7 +1585,7 @@ var Input = (0, import_react10.forwardRef)(function Input2(_a, ref) {
1675
1585
  const autoId = (0, import_react10.useId)();
1676
1586
  const id = idProp != null ? idProp : autoId;
1677
1587
  const hasError = Boolean(error);
1678
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1588
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1679
1589
  FormField,
1680
1590
  {
1681
1591
  controlId: id,
@@ -1686,7 +1596,7 @@ var Input = (0, import_react10.forwardRef)(function Input2(_a, ref) {
1686
1596
  required,
1687
1597
  disabled,
1688
1598
  className: wrapperClassName,
1689
- children: (fieldProps) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1599
+ children: (fieldProps) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1690
1600
  "input",
1691
1601
  __spreadValues(__spreadProps(__spreadValues({}, fieldProps), {
1692
1602
  ref,
@@ -1695,7 +1605,7 @@ var Input = (0, import_react10.forwardRef)(function Input2(_a, ref) {
1695
1605
  "aria-describedby": joinIds(ariaDescribedBy, fieldProps["aria-describedby"]),
1696
1606
  className: cn(
1697
1607
  "ph-input w-full",
1698
- sizeMap3[size],
1608
+ sizeMap2[size],
1699
1609
  variant === "ghost" && "ph-input-ghost",
1700
1610
  hasError && "ph-input-error",
1701
1611
  disabled && "cursor-not-allowed opacity-60",
@@ -1738,7 +1648,7 @@ var Select = (0, import_react10.forwardRef)(function Select2(_a, ref) {
1738
1648
  const autoId = (0, import_react10.useId)();
1739
1649
  const id = idProp != null ? idProp : autoId;
1740
1650
  const hasError = Boolean(error);
1741
- 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)(
1651
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(FormField, { controlId: id, label, hideLabel, helperText, error, required, disabled, className: wrapperClassName, children: (fieldProps) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1742
1652
  "select",
1743
1653
  __spreadProps(__spreadValues(__spreadProps(__spreadValues({}, fieldProps), {
1744
1654
  ref,
@@ -1747,7 +1657,7 @@ var Select = (0, import_react10.forwardRef)(function Select2(_a, ref) {
1747
1657
  "aria-describedby": joinIds(ariaDescribedBy, fieldProps["aria-describedby"]),
1748
1658
  className: cn(
1749
1659
  "ph-select w-full",
1750
- sizeMap3[size],
1660
+ sizeMap2[size],
1751
1661
  hasError && "ph-input-error",
1752
1662
  disabled && "cursor-not-allowed opacity-60",
1753
1663
  className
@@ -1787,7 +1697,7 @@ var Textarea = (0, import_react10.forwardRef)(function Textarea2(_a, ref) {
1787
1697
  const autoId = (0, import_react10.useId)();
1788
1698
  const id = idProp != null ? idProp : autoId;
1789
1699
  const hasError = Boolean(error);
1790
- 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)(
1700
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(FormField, { controlId: id, label, hideLabel, helperText, error, required, disabled, className: wrapperClassName, children: (fieldProps) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1791
1701
  "textarea",
1792
1702
  __spreadValues(__spreadProps(__spreadValues({}, fieldProps), {
1793
1703
  ref,
@@ -1796,7 +1706,7 @@ var Textarea = (0, import_react10.forwardRef)(function Textarea2(_a, ref) {
1796
1706
  "aria-describedby": joinIds(ariaDescribedBy, fieldProps["aria-describedby"]),
1797
1707
  className: cn(
1798
1708
  "ph-textarea w-full",
1799
- sizeMap3[size],
1709
+ sizeMap2[size],
1800
1710
  hasError && "ph-input-error",
1801
1711
  disabled && "cursor-not-allowed opacity-60",
1802
1712
  className
@@ -1830,9 +1740,9 @@ var Checkbox = (0, import_react10.forwardRef)(function Checkbox2(_a, ref) {
1830
1740
  const hasError = Boolean(error);
1831
1741
  const descriptionId = helperText && !hasError ? `${id}-description` : void 0;
1832
1742
  const errorId = error ? `${id}-error` : void 0;
1833
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: cn("ph-control-row", wrapperClassName), children: [
1834
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("span", { className: "ph-checkbox-wrap", children: [
1835
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1743
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: cn("ph-control-row", wrapperClassName), children: [
1744
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("span", { className: "ph-checkbox-wrap", children: [
1745
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1836
1746
  "input",
1837
1747
  __spreadValues({
1838
1748
  ref,
@@ -1850,12 +1760,12 @@ var Checkbox = (0, import_react10.forwardRef)(function Checkbox2(_a, ref) {
1850
1760
  )
1851
1761
  }, props)
1852
1762
  ),
1853
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(IconCheck, { className: "ph-checkbox-icon", "aria-hidden": true })
1763
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(IconCheck, { className: "ph-checkbox-icon", "aria-hidden": true })
1854
1764
  ] }),
1855
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "ph-control-copy", children: [
1856
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("label", { htmlFor: id, className: cn("cursor-pointer", disabled && "opacity-60"), children: label }),
1857
- descriptionId ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { id: descriptionId, className: "text-xs text-ph-subtle", children: helperText }) : null,
1858
- errorId ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("p", { id: errorId, className: "text-xs font-medium text-ph-danger", children: error }) : null
1765
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "ph-control-copy", children: [
1766
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("label", { htmlFor: id, className: cn("cursor-pointer", disabled && "opacity-60"), children: label }),
1767
+ descriptionId ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { id: descriptionId, className: "text-xs text-ph-subtle", children: helperText }) : null,
1768
+ errorId ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("p", { id: errorId, className: "text-xs font-medium text-ph-danger", children: error }) : null
1859
1769
  ] })
1860
1770
  ] });
1861
1771
  });
@@ -1876,8 +1786,8 @@ var Radio = (0, import_react10.forwardRef)(function Radio2(_a, ref) {
1876
1786
  ]);
1877
1787
  const autoId = (0, import_react10.useId)();
1878
1788
  const id = idProp != null ? idProp : autoId;
1879
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: cn("ph-control-row", wrapperClassName, disabled && "opacity-60"), children: [
1880
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1789
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: cn("ph-control-row", wrapperClassName, disabled && "opacity-60"), children: [
1790
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1881
1791
  "input",
1882
1792
  __spreadValues({
1883
1793
  ref,
@@ -1887,7 +1797,7 @@ var Radio = (0, import_react10.forwardRef)(function Radio2(_a, ref) {
1887
1797
  className: cn("ph-radio", disabled && "cursor-not-allowed", className)
1888
1798
  }, props)
1889
1799
  ),
1890
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("label", { htmlFor: id, className: cn("cursor-pointer", disabled && "opacity-60"), children: label })
1800
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("label", { htmlFor: id, className: cn("cursor-pointer", disabled && "opacity-60"), children: label })
1891
1801
  ] });
1892
1802
  });
1893
1803
  Radio.displayName = "Radio";
@@ -1907,9 +1817,9 @@ var Toggle = (0, import_react10.forwardRef)(function Toggle2(_a, ref) {
1907
1817
  ]);
1908
1818
  const autoId = (0, import_react10.useId)();
1909
1819
  const id = idProp != null ? idProp : autoId;
1910
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("label", { className: cn("ph-control-row-between", wrapperClassName, disabled && "opacity-60"), children: [
1911
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { className: disabled ? "opacity-60" : void 0, children: label }),
1912
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1820
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("label", { className: cn("ph-control-row-between", wrapperClassName, disabled && "opacity-60"), children: [
1821
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { className: disabled ? "opacity-60" : void 0, children: label }),
1822
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1913
1823
  "input",
1914
1824
  __spreadValues({
1915
1825
  ref,
@@ -1943,13 +1853,13 @@ var Range = (0, import_react10.forwardRef)(function Range2(_a, ref) {
1943
1853
  ]);
1944
1854
  const autoId = (0, import_react10.useId)();
1945
1855
  const id = idProp != null ? idProp : autoId;
1946
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: cn("ph-field", wrapperClassName), children: [
1947
- label && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("label", { htmlFor: id, className: "ph-label", children: label }),
1948
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("input", __spreadValues({ ref, id, type: "range", className: cn("ph-range", className) }, props)),
1949
- (minLabel || valueLabel || maxLabel) && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "flex justify-between text-xs text-ph-mutedtext", children: [
1950
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { children: minLabel }),
1951
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { children: valueLabel }),
1952
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("span", { children: maxLabel })
1856
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: cn("ph-field", wrapperClassName), children: [
1857
+ label && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("label", { htmlFor: id, className: "ph-label", children: label }),
1858
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("input", __spreadValues({ ref, id, type: "range", className: cn("ph-range", className) }, props)),
1859
+ (minLabel || valueLabel || maxLabel) && /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "flex justify-between text-xs text-ph-mutedtext", children: [
1860
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { children: minLabel }),
1861
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { children: valueLabel }),
1862
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { children: maxLabel })
1953
1863
  ] })
1954
1864
  ] });
1955
1865
  });
@@ -1970,10 +1880,10 @@ var FileUpload = (0, import_react10.forwardRef)(function FileUpload2(_a, ref) {
1970
1880
  ]);
1971
1881
  const autoId = (0, import_react10.useId)();
1972
1882
  const id = idProp != null ? idProp : autoId;
1973
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: cn("ph-field", wrapperClassName), children: [
1974
- label && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("label", { htmlFor: id, className: "ph-label", children: label }),
1975
- /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("label", { htmlFor: id, className: "ph-file-upload", children: [
1976
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("input", __spreadValues({ ref, id, type: "file", className: cn("sr-only", className) }, props)),
1883
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: cn("ph-field", wrapperClassName), children: [
1884
+ label && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("label", { htmlFor: id, className: "ph-label", children: label }),
1885
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("label", { htmlFor: id, className: "ph-file-upload", children: [
1886
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("input", __spreadValues({ ref, id, type: "file", className: cn("sr-only", className) }, props)),
1977
1887
  prompt
1978
1888
  ] })
1979
1889
  ] });
@@ -1983,8 +1893,8 @@ FileUpload.displayName = "FileUpload";
1983
1893
  // src/components/ui/Modal.tsx
1984
1894
  var Dialog = __toESM(require("@radix-ui/react-dialog"));
1985
1895
  var import_react11 = require("react");
1986
- var import_jsx_runtime17 = require("react/jsx-runtime");
1987
- var sizeMap4 = {
1896
+ var import_jsx_runtime16 = require("react/jsx-runtime");
1897
+ var sizeMap3 = {
1988
1898
  sm: "max-w-sm",
1989
1899
  md: "max-w-lg",
1990
1900
  lg: "max-w-2xl",
@@ -2013,15 +1923,15 @@ function Modal({
2013
1923
  }) {
2014
1924
  const canDismiss = Boolean(onClose);
2015
1925
  const restoreFocusRef = (0, import_react11.useRef)(null);
2016
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1926
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
2017
1927
  Dialog.Root,
2018
1928
  {
2019
1929
  open,
2020
1930
  onOpenChange: (nextOpen) => {
2021
1931
  if (!nextOpen) onClose == null ? void 0 : onClose();
2022
1932
  },
2023
- children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(Dialog.Portal, { children: [
2024
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1933
+ children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(Dialog.Portal, { children: [
1934
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
2025
1935
  Dialog.Overlay,
2026
1936
  {
2027
1937
  "data-test": dataTest,
@@ -2029,12 +1939,12 @@ function Modal({
2029
1939
  style: zIndex ? { zIndex } : void 0
2030
1940
  }
2031
1941
  ),
2032
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1942
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
2033
1943
  Dialog.Content,
2034
1944
  __spreadProps(__spreadValues(__spreadProps(__spreadValues(__spreadValues({
2035
1945
  id,
2036
1946
  "data-test": panelDataTest,
2037
- className: cn("ph-modal-panel", sizeMap4[size], className)
1947
+ className: cn("ph-modal-panel", sizeMap3[size], className)
2038
1948
  }, ariaLabel ? { "aria-label": ariaLabel } : {}), ariaLabelledBy ? { "aria-labelledby": ariaLabelledBy } : {}), {
2039
1949
  style: zIndex ? { zIndex } : void 0
2040
1950
  }), description ? {} : { "aria-describedby": void 0 }), {
@@ -2052,28 +1962,28 @@ function Modal({
2052
1962
  onPointerDownOutside: (event) => {
2053
1963
  if (!canDismiss || !closeOnOutsideClick) event.preventDefault();
2054
1964
  },
2055
- children: customLayout ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
2056
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Dialog.Title, { className: "sr-only", children: ariaLabel != null ? ariaLabel : "Dialog" }),
1965
+ children: customLayout ? /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
1966
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Dialog.Title, { className: "sr-only", children: ariaLabel != null ? ariaLabel : "Dialog" }),
2057
1967
  children
2058
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_jsx_runtime17.Fragment, { children: [
2059
- title ? null : /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Dialog.Title, { className: "sr-only", children: ariaLabel != null ? ariaLabel : "Dialog" }),
2060
- title || description || showCloseButton && canDismiss ? /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("header", { className: "ph-modal-header", children: [
2061
- /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "min-w-0", children: [
2062
- title ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Dialog.Title, { className: "text-lg font-bold text-ph-ink", children: title }) : null,
2063
- description ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Dialog.Description, { className: "mt-1 text-sm text-ph-subtle", children: description }) : null
1968
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
1969
+ title ? null : /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Dialog.Title, { className: "sr-only", children: ariaLabel != null ? ariaLabel : "Dialog" }),
1970
+ title || description || showCloseButton && canDismiss ? /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("header", { className: "ph-modal-header", children: [
1971
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "min-w-0", children: [
1972
+ title ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Dialog.Title, { className: "text-lg font-bold text-ph-ink", children: title }) : null,
1973
+ description ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Dialog.Description, { className: "mt-1 text-sm text-ph-subtle", children: description }) : null
2064
1974
  ] }),
2065
- showCloseButton && canDismiss ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(Dialog.Close, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
1975
+ showCloseButton && canDismiss ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Dialog.Close, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
2066
1976
  "button",
2067
1977
  {
2068
1978
  type: "button",
2069
1979
  className: "ph-modal-close",
2070
1980
  "aria-label": "Close dialog",
2071
- children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(IconClose, { className: "h-5 w-5", "aria-hidden": true })
1981
+ children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(IconClose, { className: "h-5 w-5", "aria-hidden": true })
2072
1982
  }
2073
1983
  ) }) : null
2074
1984
  ] }) : null,
2075
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "ph-modal-body", children }),
2076
- footer ? /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { className: "ph-modal-footer", children: footer }) : null
1985
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "ph-modal-body", children }),
1986
+ footer ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "ph-modal-footer", children: footer }) : null
2077
1987
  ] })
2078
1988
  })
2079
1989
  )
@@ -2082,138 +1992,20 @@ function Modal({
2082
1992
  );
2083
1993
  }
2084
1994
 
2085
- // src/components/ui/Navigation.tsx
2086
- var import_jsx_runtime18 = require("react/jsx-runtime");
2087
- function Breadcrumbs({ items, label = "Breadcrumb", className }) {
2088
- 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: [
2089
- index > 0 ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "ph-breadcrumb-sep", "aria-hidden": "true", children: "/" }) : null,
2090
- 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 })
2091
- ] }, `${item.label}-${index}`)) });
2092
- }
2093
- function Pagination({
2094
- page,
2095
- totalPages,
2096
- onPageChange,
2097
- label = "Pagination",
2098
- compact = false,
2099
- className
2100
- }) {
2101
- const pages = compact ? [Math.max(1, page - 1), page, Math.min(totalPages, page + 1)] : [1, 2, 3, totalPages];
2102
- const uniquePages = Array.from(new Set(pages)).filter((n) => n >= 1 && n <= totalPages);
2103
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("nav", { "aria-label": label, className: cn("ph-pagination", className), children: [
2104
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
2105
- "button",
2106
- {
2107
- type: "button",
2108
- className: "ph-pagination-btn",
2109
- disabled: page <= 1,
2110
- "aria-label": "Previous page",
2111
- onClick: () => onPageChange == null ? void 0 : onPageChange(page - 1),
2112
- children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(IconChevronLeft, { className: "mx-auto h-4 w-4", "aria-hidden": true })
2113
- }
2114
- ),
2115
- uniquePages.map((pageNumber, index) => /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("span", { className: "contents", children: [
2116
- !compact && index === uniquePages.length - 1 && pageNumber > 4 ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("span", { className: "ph-pagination-ellipsis", "aria-hidden": "true", children: "..." }) : null,
2117
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
2118
- "button",
2119
- {
2120
- type: "button",
2121
- className: cn("ph-pagination-btn", pageNumber === page && "ph-pagination-btn-active"),
2122
- "aria-current": pageNumber === page ? "page" : void 0,
2123
- onClick: () => onPageChange == null ? void 0 : onPageChange(pageNumber),
2124
- children: pageNumber
2125
- }
2126
- )
2127
- ] }, pageNumber)),
2128
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
2129
- "button",
2130
- {
2131
- type: "button",
2132
- className: "ph-pagination-btn",
2133
- disabled: page >= totalPages,
2134
- "aria-label": "Next page",
2135
- onClick: () => onPageChange == null ? void 0 : onPageChange(page + 1),
2136
- children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(IconChevronRight, { className: "mx-auto h-4 w-4", "aria-hidden": true })
2137
- }
2138
- )
2139
- ] });
2140
- }
2141
-
2142
1995
  // src/components/ui/Panel.tsx
2143
- var import_jsx_runtime19 = require("react/jsx-runtime");
1996
+ var import_jsx_runtime17 = require("react/jsx-runtime");
2144
1997
  function Panel(_a) {
2145
1998
  var _b = _a, { title, description, children, className } = _b, props = __objRest(_b, ["title", "description", "children", "className"]);
2146
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", __spreadProps(__spreadValues({ className: cn("ph-panel", className) }, props), { children: [
2147
- title && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("h3", { className: "text-sm font-semibold uppercase tracking-wider text-ph-mutedtext", children: title }),
2148
- description && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("p", { className: "text-sm text-ph-subtle", children: description }),
1999
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", __spreadProps(__spreadValues({ className: cn("ph-panel", className) }, props), { children: [
2000
+ title && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("h3", { className: "text-sm font-semibold uppercase tracking-wider text-ph-mutedtext", children: title }),
2001
+ description && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("p", { className: "text-sm text-ph-subtle", children: description }),
2149
2002
  children
2150
2003
  ] }));
2151
2004
  }
2152
2005
 
2153
- // src/components/ui/Rating.tsx
2154
- var import_jsx_runtime20 = require("react/jsx-runtime");
2155
- function Rating(_a) {
2156
- var _b = _a, {
2157
- label,
2158
- value = 0,
2159
- max = 5,
2160
- readOnly = true,
2161
- onChange,
2162
- className,
2163
- wrapperClassName
2164
- } = _b, props = __objRest(_b, [
2165
- "label",
2166
- "value",
2167
- "max",
2168
- "readOnly",
2169
- "onChange",
2170
- "className",
2171
- "wrapperClassName"
2172
- ]);
2173
- const stars = Array.from({ length: max }, (_, index) => index + 1);
2174
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: cn("ph-field", wrapperClassName), children: [
2175
- label && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("span", { className: "ph-label", children: label }),
2176
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
2177
- "div",
2178
- __spreadProps(__spreadValues({
2179
- className: cn("ph-rating flex", className),
2180
- role: readOnly ? "img" : "radiogroup",
2181
- "aria-label": label != null ? label : `Rating: ${value} out of ${max}`
2182
- }, props), {
2183
- children: stars.map((star) => {
2184
- const active = star <= value;
2185
- if (readOnly) {
2186
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
2187
- IconStar,
2188
- {
2189
- className: cn("h-6 w-6", active ? "text-amber-500" : "text-ph-border"),
2190
- "aria-hidden": true
2191
- },
2192
- star
2193
- );
2194
- }
2195
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
2196
- "button",
2197
- {
2198
- type: "button",
2199
- 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",
2200
- role: "radio",
2201
- "aria-checked": active,
2202
- "aria-label": `${star} out of ${max}`,
2203
- onClick: () => onChange == null ? void 0 : onChange(star),
2204
- children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(IconStar, { className: cn("h-6 w-6", active ? "text-amber-500" : "text-ph-border") })
2205
- },
2206
- star
2207
- );
2208
- })
2209
- })
2210
- )
2211
- ] });
2212
- }
2213
-
2214
2006
  // src/components/ui/SearchInput.tsx
2215
2007
  var import_react12 = require("react");
2216
- var import_jsx_runtime21 = require("react/jsx-runtime");
2008
+ var import_jsx_runtime18 = require("react/jsx-runtime");
2217
2009
  function SearchInput(_a) {
2218
2010
  var _b = _a, {
2219
2011
  id: idProp,
@@ -2236,10 +2028,10 @@ function SearchInput(_a) {
2236
2028
  ]);
2237
2029
  const autoId = (0, import_react12.useId)();
2238
2030
  const id = idProp != null ? idProp : autoId;
2239
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: cn("relative", wrapperClassName), children: [
2240
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("label", { htmlFor: id, className: hideLabel ? "sr-only" : "ph-label mb-1.5 block", children: label }),
2241
- /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: "relative", children: [
2242
- shortcut != null ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
2031
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: cn("relative", wrapperClassName), children: [
2032
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("label", { htmlFor: id, className: hideLabel ? "sr-only" : "ph-label mb-1.5 block", children: label }),
2033
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "relative", children: [
2034
+ shortcut != null ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
2243
2035
  "span",
2244
2036
  {
2245
2037
  className: "ph-shortcut pointer-events-none absolute left-3 top-1/2 z-10 -translate-y-1/2 text-xs",
@@ -2247,7 +2039,7 @@ function SearchInput(_a) {
2247
2039
  children: shortcut
2248
2040
  }
2249
2041
  ) : null,
2250
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
2042
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
2251
2043
  "input",
2252
2044
  __spreadValues({
2253
2045
  id,
@@ -2283,10 +2075,10 @@ function SearchGroup(_a) {
2283
2075
  ]);
2284
2076
  const autoId = (0, import_react12.useId)();
2285
2077
  const id = idProp != null ? idProp : autoId;
2286
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("div", { className: cn("ph-field", wrapperClassName), children: [
2287
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("label", { htmlFor: id, className: "ph-label", children: label }),
2288
- /* @__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: [
2289
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
2078
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: cn("ph-field", wrapperClassName), children: [
2079
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("label", { htmlFor: id, className: "ph-label", children: label }),
2080
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "ph-search-group flex w-full max-w-lg min-h-[2.3125rem] items-stretch divide-x divide-ph-border", children: [
2081
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
2290
2082
  "input",
2291
2083
  __spreadValues({
2292
2084
  id,
@@ -2295,12 +2087,12 @@ function SearchGroup(_a) {
2295
2087
  className: cn("ph-input ph-input-group-field min-w-0 flex-1", className)
2296
2088
  }, props)
2297
2089
  ),
2298
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
2090
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
2299
2091
  Button,
2300
2092
  {
2301
2093
  type: "submit",
2302
2094
  variant: "primary",
2303
- icon: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(IconSearch, { className: "h-4 w-4", "aria-hidden": true }),
2095
+ icon: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(IconSearch, { className: "h-4 w-4", "aria-hidden": true }),
2304
2096
  className: "ph-search-group__submit",
2305
2097
  "aria-label": submitLabel
2306
2098
  }
@@ -2310,7 +2102,7 @@ function SearchGroup(_a) {
2310
2102
  }
2311
2103
 
2312
2104
  // src/components/ui/Table.tsx
2313
- var import_jsx_runtime22 = require("react/jsx-runtime");
2105
+ var import_jsx_runtime19 = require("react/jsx-runtime");
2314
2106
  function Table({
2315
2107
  data,
2316
2108
  columns,
@@ -2321,15 +2113,15 @@ function Table({
2321
2113
  className,
2322
2114
  caption
2323
2115
  }) {
2324
- 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: [
2325
- caption && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("caption", { className: "sr-only", children: caption }),
2326
- /* @__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)) }) }),
2327
- /* @__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)) })
2116
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: cn("ph-table-wrap", compact && "ph-table-compact", className), children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("table", { className: cn("ph-table", zebra && "ph-table-zebra", ribbon && "ph-table--ribbon"), children: [
2117
+ caption && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("caption", { className: "sr-only", children: caption }),
2118
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("tr", { children: columns.map((col) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("th", { className: col.className, children: col.header }, col.key)) }) }),
2119
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("tbody", { children: data.map((row, i) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("tr", { style: getRowStyle == null ? void 0 : getRowStyle(row), children: columns.map((col) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("td", { className: col.className, children: col.cell(row) }, col.key)) }, i)) })
2328
2120
  ] }) });
2329
2121
  }
2330
2122
 
2331
2123
  // src/components/ui/Stat.tsx
2332
- var import_jsx_runtime23 = require("react/jsx-runtime");
2124
+ var import_jsx_runtime20 = require("react/jsx-runtime");
2333
2125
  var toneMap = {
2334
2126
  default: "text-ph-ink",
2335
2127
  brand: "text-ph-brand",
@@ -2346,83 +2138,14 @@ var statMap = {
2346
2138
  };
2347
2139
  function Stat(_a) {
2348
2140
  var _b = _a, { icon, label, value, footer, tone = "default", className } = _b, props = __objRest(_b, ["icon", "label", "value", "footer", "tone", "className"]);
2349
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("article", __spreadProps(__spreadValues({ className: cn("ph-stat", statMap[tone], className) }, props), { children: [
2350
- icon && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: cn("mb-2 h-7 w-7", toneMap[tone]), children: icon }),
2351
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: cn("ph-stat-label", tone === "warning" && toneMap[tone]), children: label }),
2352
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: cn("ph-stat-val", toneMap[tone]), children: value }),
2353
- footer && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("p", { className: "text-xs text-ph-subtle", children: footer })
2141
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("article", __spreadProps(__spreadValues({ className: cn("ph-stat", statMap[tone], className) }, props), { children: [
2142
+ icon && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: cn("mb-2 h-7 w-7", toneMap[tone]), children: icon }),
2143
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: cn("ph-stat-label", tone === "warning" && toneMap[tone]), children: label }),
2144
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: cn("ph-stat-val", toneMap[tone]), children: value }),
2145
+ footer && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "text-xs text-ph-subtle", children: footer })
2354
2146
  ] }));
2355
2147
  }
2356
2148
 
2357
- // src/components/ui/Toast.tsx
2358
- var import_jsx_runtime24 = require("react/jsx-runtime");
2359
- var statusConfig2 = {
2360
- info: { icon: IconErrorOutline, color: "text-ph-info", bg: "ph-toast-info" },
2361
- success: { icon: IconCheckCircle, color: "text-ph-success", bg: "ph-toast-success" },
2362
- warning: { icon: IconExclamation, color: "text-ph-warning", bg: "ph-toast-warning" },
2363
- danger: { icon: IconCancel, color: "text-ph-danger", bg: "ph-toast-danger" }
2364
- };
2365
- function Toast({
2366
- status = "info",
2367
- title,
2368
- description,
2369
- onDismiss,
2370
- className
2371
- }) {
2372
- const config = statusConfig2[status];
2373
- const Icon = config.icon;
2374
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: cn("ph-toast", config.bg, className), children: [
2375
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Icon, { className: cn("mt-0.5 h-5 w-5 shrink-0", config.color), "aria-hidden": true }),
2376
- /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "pr-8", children: [
2377
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "font-semibold", children: title }),
2378
- description && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("p", { className: "mt-1 text-xs text-ph-subtle", children: description })
2379
- ] }),
2380
- onDismiss && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
2381
- "button",
2382
- {
2383
- type: "button",
2384
- "aria-label": `Dismiss ${title}`,
2385
- className: "absolute right-2 top-2 ph-btn ph-btn-ghost ph-btn-xs ph-btn-circle",
2386
- onClick: onDismiss,
2387
- children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(IconClose, { className: "h-4 w-4" })
2388
- }
2389
- )
2390
- ] });
2391
- }
2392
- function ToastStack({ children, className }) {
2393
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: cn("ph-toast-stack", className), children });
2394
- }
2395
-
2396
- // src/components/ui/Tabs.tsx
2397
- var import_jsx_runtime25 = require("react/jsx-runtime");
2398
- function Tabs({ items, value, onChange, variant = "pill", className }) {
2399
- if (variant === "underline") {
2400
- 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)(
2401
- "button",
2402
- {
2403
- type: "button",
2404
- onClick: () => onChange(item.value),
2405
- className: cn(
2406
- "-mb-px border-b-2 pb-2 text-sm font-semibold transition",
2407
- value === item.value ? "border-ph-brand text-ph-ink" : "border-transparent text-ph-mutedtext hover:text-ph-ink"
2408
- ),
2409
- children: item.label
2410
- },
2411
- item.value
2412
- )) });
2413
- }
2414
- 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)(
2415
- "button",
2416
- {
2417
- type: "button",
2418
- onClick: () => onChange(item.value),
2419
- className: cn("ph-tab", value === item.value && "ph-tab-active"),
2420
- children: item.label
2421
- },
2422
- item.value
2423
- )) });
2424
- }
2425
-
2426
2149
  // src/components/ui/ThemeDomSync.tsx
2427
2150
  var import_react13 = require("react");
2428
2151
 
@@ -2565,29 +2288,19 @@ function ThemeDomSync() {
2565
2288
  return null;
2566
2289
  }
2567
2290
 
2568
- // src/components/ui/ThemeManager.tsx
2569
- var import_react14 = require("react");
2570
- var import_jsx_runtime26 = require("react/jsx-runtime");
2571
- function ThemeManager({ children }) {
2572
- (0, import_react14.useLayoutEffect)(() => {
2573
- persistTheme(readStoredTheme());
2574
- }, []);
2575
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_jsx_runtime26.Fragment, { children });
2576
- }
2577
-
2578
2291
  // src/components/ui/ThemeSwitcher.tsx
2579
- var import_react15 = require("react");
2580
- var import_jsx_runtime27 = require("react/jsx-runtime");
2292
+ var import_react14 = require("react");
2293
+ var import_jsx_runtime21 = require("react/jsx-runtime");
2581
2294
  function ThemeSwitcher({ className }) {
2582
- const [themeId, setThemeId] = (0, import_react15.useState)(DEFAULT_THEME_ID);
2583
- (0, import_react15.useEffect)(() => {
2295
+ const [themeId, setThemeId] = (0, import_react14.useState)(DEFAULT_THEME_ID);
2296
+ (0, import_react14.useEffect)(() => {
2584
2297
  const id = readStoredTheme();
2585
2298
  persistTheme(id);
2586
2299
  setThemeId(id);
2587
2300
  }, []);
2588
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("label", { className: cn("flex min-w-0 items-center gap-2", className), children: [
2589
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "shrink-0 text-xs font-medium text-ph-mutedtext sm:text-sm", children: "Theme" }),
2590
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2301
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)("label", { className: cn("flex min-w-0 items-center gap-2", className), children: [
2302
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "shrink-0 text-xs font-medium text-ph-mutedtext sm:text-sm", children: "Theme" }),
2303
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
2591
2304
  "select",
2592
2305
  {
2593
2306
  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",
@@ -2598,22 +2311,22 @@ function ThemeSwitcher({ className }) {
2598
2311
  persistTheme(next);
2599
2312
  setThemeId(next);
2600
2313
  },
2601
- 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))
2314
+ children: THEME_GROUPS.map((group) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("optgroup", { label: group, children: THEMES.filter((theme) => theme.group === group).map((theme) => /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("option", { value: theme.id, children: theme.name }, theme.id)) }, group))
2602
2315
  }
2603
2316
  )
2604
2317
  ] });
2605
2318
  }
2606
2319
 
2607
2320
  // src/components/ui/Accordion.tsx
2608
- var import_react16 = require("react");
2609
- var import_jsx_runtime28 = require("react/jsx-runtime");
2321
+ var import_react15 = require("react");
2322
+ var import_jsx_runtime22 = require("react/jsx-runtime");
2610
2323
  function Accordion({
2611
2324
  items,
2612
2325
  allowMultiple = false,
2613
2326
  defaultOpen = [],
2614
2327
  className
2615
2328
  }) {
2616
- const [openItems, setOpenItems] = (0, import_react16.useState)(new Set(defaultOpen));
2329
+ const [openItems, setOpenItems] = (0, import_react15.useState)(new Set(defaultOpen));
2617
2330
  const toggleItem = (id) => {
2618
2331
  setOpenItems((prev) => {
2619
2332
  const next = new Set(prev);
@@ -2628,18 +2341,18 @@ function Accordion({
2628
2341
  return next;
2629
2342
  });
2630
2343
  };
2631
- 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) => {
2344
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: cn("divide-y divide-ph-border rounded-xl border border-ph-border bg-ph-surface", className), children: items.map((item) => {
2632
2345
  const isOpen = openItems.has(item.id);
2633
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { className: "first:rounded-t-xl last:rounded-b-xl", children: [
2634
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
2346
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)("div", { className: "first:rounded-t-xl last:rounded-b-xl", children: [
2347
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
2635
2348
  "button",
2636
2349
  {
2637
2350
  type: "button",
2638
2351
  onClick: () => toggleItem(item.id),
2639
2352
  className: "flex w-full items-center justify-between px-5 py-4 text-left transition hover:bg-ph-muted",
2640
2353
  children: [
2641
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "font-semibold text-ph-ink", children: item.title }),
2642
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
2354
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: "font-semibold text-ph-ink", children: item.title }),
2355
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
2643
2356
  IconChevronDown,
2644
2357
  {
2645
2358
  className: cn(
@@ -2651,82 +2364,31 @@ function Accordion({
2651
2364
  ]
2652
2365
  }
2653
2366
  ),
2654
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
2367
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
2655
2368
  "div",
2656
2369
  {
2657
2370
  className: cn(
2658
2371
  "grid transition-all duration-200",
2659
2372
  isOpen ? "grid-rows-[1fr]" : "grid-rows-[0fr]"
2660
2373
  ),
2661
- 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 }) })
2374
+ children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("div", { className: "px-5 pb-4 text-ph-subtle", children: item.content }) })
2662
2375
  }
2663
2376
  )
2664
2377
  ] }, item.id);
2665
2378
  }) });
2666
2379
  }
2667
2380
 
2668
- // src/components/ui/Stepper.tsx
2669
- var import_jsx_runtime29 = require("react/jsx-runtime");
2670
- function Stepper({ steps, currentStep, className }) {
2671
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: cn("flex items-start gap-2", className), children: steps.map((step, index) => {
2672
- const isCompleted = index < currentStep;
2673
- const isCurrent = index === currentStep;
2674
- const isPending = index > currentStep;
2675
- const isError = step.status === "error";
2676
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "flex flex-1 items-start gap-2", children: [
2677
- /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "flex flex-1 flex-col items-center", children: [
2678
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
2679
- "div",
2680
- {
2681
- className: cn(
2682
- "flex h-9 w-9 items-center justify-center rounded-full text-sm font-bold transition-colors",
2683
- isCompleted && "bg-ph-success text-[var(--ph-on-success)]",
2684
- isCurrent && !isError && "bg-ph-brand text-[var(--ph-on-accent)] ring-4 ring-ph-brand/20",
2685
- isCurrent && isError && "bg-ph-danger text-[var(--ph-on-danger)]",
2686
- isPending && "bg-ph-muted text-ph-mutedtext"
2687
- ),
2688
- children: isCompleted ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(IconCheck, { className: "h-5 w-5", "aria-hidden": true }) : index + 1
2689
- }
2690
- ),
2691
- /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "mt-2 text-center", children: [
2692
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
2693
- "p",
2694
- {
2695
- className: cn(
2696
- "text-sm font-semibold",
2697
- isCurrent && "text-ph-ink",
2698
- !isCurrent && "text-ph-mutedtext"
2699
- ),
2700
- children: step.label
2701
- }
2702
- ),
2703
- step.description && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("p", { className: "mt-0.5 text-xs text-ph-mutedtext", children: step.description })
2704
- ] })
2705
- ] }),
2706
- index < steps.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
2707
- "div",
2708
- {
2709
- className: cn(
2710
- "mt-4 h-0.5 flex-1 rounded-full transition-colors",
2711
- isCompleted ? "bg-ph-success" : "bg-ph-border"
2712
- )
2713
- }
2714
- )
2715
- ] }, step.id);
2716
- }) });
2717
- }
2718
-
2719
2381
  // src/components/ui/SegmentedControl.tsx
2720
- var import_jsx_runtime30 = require("react/jsx-runtime");
2382
+ var import_jsx_runtime23 = require("react/jsx-runtime");
2721
2383
  function SegmentedControl({ options, value, onChange, className }) {
2722
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
2384
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
2723
2385
  "div",
2724
2386
  {
2725
2387
  className: cn(
2726
2388
  "inline-flex rounded-lg bg-ph-muted p-1",
2727
2389
  className
2728
2390
  ),
2729
- children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
2391
+ children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
2730
2392
  "button",
2731
2393
  {
2732
2394
  type: "button",
@@ -2737,7 +2399,7 @@ function SegmentedControl({ options, value, onChange, className }) {
2737
2399
  value === option.value ? "bg-ph-surface text-ph-ink shadow-ph" : "text-ph-subtle hover:text-ph-ink"
2738
2400
  ),
2739
2401
  children: [
2740
- option.icon && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "h-4 w-4", children: option.icon }),
2402
+ option.icon && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "h-4 w-4", children: option.icon }),
2741
2403
  option.label
2742
2404
  ]
2743
2405
  },
@@ -2748,8 +2410,8 @@ function SegmentedControl({ options, value, onChange, className }) {
2748
2410
  }
2749
2411
 
2750
2412
  // src/components/ui/CommandPalette.tsx
2751
- var import_react17 = require("react");
2752
- var import_jsx_runtime31 = require("react/jsx-runtime");
2413
+ var import_react16 = require("react");
2414
+ var import_jsx_runtime24 = require("react/jsx-runtime");
2753
2415
  function CommandPalette({
2754
2416
  items,
2755
2417
  isOpen,
@@ -2761,15 +2423,15 @@ function CommandPalette({
2761
2423
  inputId,
2762
2424
  inputDataTest
2763
2425
  }) {
2764
- const [query, setQuery] = (0, import_react17.useState)("");
2765
- const [selectedIndex, setSelectedIndex] = (0, import_react17.useState)(0);
2766
- const inputRef = (0, import_react17.useRef)(null);
2767
- const panelRef = (0, import_react17.useRef)(null);
2768
- const previousFocusRef = (0, import_react17.useRef)(null);
2426
+ const [query, setQuery] = (0, import_react16.useState)("");
2427
+ const [selectedIndex, setSelectedIndex] = (0, import_react16.useState)(0);
2428
+ const inputRef = (0, import_react16.useRef)(null);
2429
+ const panelRef = (0, import_react16.useRef)(null);
2430
+ const previousFocusRef = (0, import_react16.useRef)(null);
2769
2431
  const filtered = items.filter(
2770
2432
  (item) => item.label.toLowerCase().includes(query.toLowerCase())
2771
2433
  );
2772
- (0, import_react17.useEffect)(() => {
2434
+ (0, import_react16.useEffect)(() => {
2773
2435
  var _a;
2774
2436
  if (!isOpen) return;
2775
2437
  previousFocusRef.current = document.activeElement instanceof HTMLElement ? document.activeElement : null;
@@ -2781,7 +2443,7 @@ function CommandPalette({
2781
2443
  return (_a2 = previousFocusRef.current) == null ? void 0 : _a2.focus();
2782
2444
  };
2783
2445
  }, [isOpen]);
2784
- (0, import_react17.useEffect)(() => {
2446
+ (0, import_react16.useEffect)(() => {
2785
2447
  const handleKeyDown = (e) => {
2786
2448
  var _a, _b;
2787
2449
  if (!isOpen) return;
@@ -2826,7 +2488,7 @@ function CommandPalette({
2826
2488
  return () => window.removeEventListener("keydown", handleKeyDown);
2827
2489
  }, [isOpen, filtered, selectedIndex, onClose]);
2828
2490
  if (!isOpen) return null;
2829
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2491
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
2830
2492
  "div",
2831
2493
  {
2832
2494
  id,
@@ -2835,7 +2497,7 @@ function CommandPalette({
2835
2497
  onMouseDown: (event) => {
2836
2498
  if (event.target === event.currentTarget) onClose();
2837
2499
  },
2838
- children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
2500
+ children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
2839
2501
  "div",
2840
2502
  {
2841
2503
  ref: panelRef,
@@ -2847,9 +2509,9 @@ function CommandPalette({
2847
2509
  className
2848
2510
  ),
2849
2511
  children: [
2850
- /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "flex items-center gap-3 border-b border-ph-border px-4 py-3", children: [
2851
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(IconSearch, { className: "h-5 w-5 text-ph-mutedtext" }),
2852
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2512
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "flex items-center gap-3 border-b border-ph-border px-4 py-3", children: [
2513
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(IconSearch, { className: "h-5 w-5 text-ph-mutedtext" }),
2514
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
2853
2515
  "input",
2854
2516
  {
2855
2517
  ref: inputRef,
@@ -2866,9 +2528,9 @@ function CommandPalette({
2866
2528
  className: "flex-1 bg-transparent text-ph-ink outline-none placeholder:text-ph-mutedtext"
2867
2529
  }
2868
2530
  ),
2869
- /* @__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" })
2531
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("kbd", { className: "rounded border border-ph-border bg-ph-muted px-1.5 py-0.5 text-xs text-ph-mutedtext", children: "ESC" })
2870
2532
  ] }),
2871
- /* @__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)(
2533
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "max-h-[50vh] overflow-y-auto py-2", children: filtered.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime24.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_runtime24.jsxs)(
2872
2534
  "button",
2873
2535
  {
2874
2536
  type: "button",
@@ -2884,9 +2546,9 @@ function CommandPalette({
2884
2546
  index === selectedIndex ? "bg-ph-muted text-ph-ink" : "text-ph-subtle"
2885
2547
  ),
2886
2548
  children: [
2887
- item.icon && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "h-5 w-5", children: item.icon }),
2888
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "flex-1", children: item.label }),
2889
- 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 })
2549
+ item.icon && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "h-5 w-5", children: item.icon }),
2550
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("span", { className: "flex-1", children: item.label }),
2551
+ item.shortcut && /* @__PURE__ */ (0, import_jsx_runtime24.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 })
2890
2552
  ]
2891
2553
  },
2892
2554
  item.id
@@ -2899,10 +2561,10 @@ function CommandPalette({
2899
2561
  }
2900
2562
 
2901
2563
  // src/components/ui/Calendar.tsx
2902
- var import_react18 = require("react");
2903
- var import_jsx_runtime32 = require("react/jsx-runtime");
2564
+ var import_react17 = require("react");
2565
+ var import_jsx_runtime25 = require("react/jsx-runtime");
2904
2566
  function Calendar({ value, onChange, className }) {
2905
- const [currentMonth, setCurrentMonth] = (0, import_react18.useState)(value || /* @__PURE__ */ new Date());
2567
+ const [currentMonth, setCurrentMonth] = (0, import_react17.useState)(value || /* @__PURE__ */ new Date());
2906
2568
  const today = /* @__PURE__ */ new Date();
2907
2569
  const year = currentMonth.getFullYear();
2908
2570
  const month = currentMonth.getMonth();
@@ -2942,37 +2604,37 @@ function Calendar({ value, onChange, className }) {
2942
2604
  for (let i = 1; i <= daysInMonth; i++) {
2943
2605
  days.push(i);
2944
2606
  }
2945
- 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: [
2946
- /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "mb-4 flex items-center justify-between", children: [
2947
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
2607
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: cn("w-[280px] rounded-xl border border-ph-border bg-ph-surface p-4 shadow-ph", className), children: [
2608
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "mb-4 flex items-center justify-between", children: [
2609
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2948
2610
  "button",
2949
2611
  {
2950
2612
  type: "button",
2951
2613
  onClick: prevMonth,
2952
2614
  "aria-label": "Previous month",
2953
2615
  className: "rounded-lg p-1 text-ph-subtle transition hover:bg-ph-muted hover:text-ph-ink",
2954
- children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(IconChevronLeft, { className: "h-5 w-5", "aria-hidden": true })
2616
+ children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(IconChevronLeft, { className: "h-5 w-5", "aria-hidden": true })
2955
2617
  }
2956
2618
  ),
2957
- /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("span", { className: "text-sm font-semibold text-ph-ink", children: [
2619
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("span", { className: "text-sm font-semibold text-ph-ink", children: [
2958
2620
  monthNames[month],
2959
2621
  " ",
2960
2622
  year
2961
2623
  ] }),
2962
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
2624
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2963
2625
  "button",
2964
2626
  {
2965
2627
  type: "button",
2966
2628
  onClick: nextMonth,
2967
2629
  "aria-label": "Next month",
2968
2630
  className: "rounded-lg p-1 text-ph-subtle transition hover:bg-ph-muted hover:text-ph-ink",
2969
- children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(IconChevronRight, { className: "h-5 w-5", "aria-hidden": true })
2631
+ children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(IconChevronRight, { className: "h-5 w-5", "aria-hidden": true })
2970
2632
  }
2971
2633
  )
2972
2634
  ] }),
2973
- /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("div", { className: "grid grid-cols-7 gap-1", children: [
2974
- 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)),
2975
- days.map((day, index) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "aspect-square", children: day && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
2635
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "grid grid-cols-7 gap-1", children: [
2636
+ weekDays.map((day) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "py-1 text-center text-xs font-medium text-ph-mutedtext", children: day }, day)),
2637
+ days.map((day, index) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "aspect-square", children: day && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2976
2638
  "button",
2977
2639
  {
2978
2640
  type: "button",
@@ -2988,48 +2650,16 @@ function Calendar({ value, onChange, className }) {
2988
2650
  ] });
2989
2651
  }
2990
2652
 
2991
- // src/components/ui/HoverCard.tsx
2992
- var import_react19 = require("react");
2993
- var import_jsx_runtime33 = require("react/jsx-runtime");
2994
- function HoverCard({ trigger, children, className }) {
2995
- const [isVisible, setIsVisible] = (0, import_react19.useState)(false);
2996
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
2997
- "div",
2998
- {
2999
- className: "relative inline-block",
3000
- onMouseEnter: () => setIsVisible(true),
3001
- onMouseLeave: () => setIsVisible(false),
3002
- children: [
3003
- trigger,
3004
- /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
3005
- "div",
3006
- {
3007
- className: cn(
3008
- "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",
3009
- isVisible ? "visible translate-y-0 opacity-100" : "invisible -translate-y-1 opacity-0",
3010
- className
3011
- ),
3012
- children: [
3013
- /* @__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" }),
3014
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "relative", children })
3015
- ]
3016
- }
3017
- )
3018
- ]
3019
- }
3020
- );
3021
- }
3022
-
3023
2653
  // src/components/ui/Tooltip.tsx
3024
- var import_react20 = require("react");
2654
+ var import_react18 = require("react");
3025
2655
  var import_react_dom = require("react-dom");
3026
- var import_jsx_runtime34 = require("react/jsx-runtime");
3027
- var TooltipDelayContext = (0, import_react20.createContext)(0);
2656
+ var import_jsx_runtime26 = require("react/jsx-runtime");
2657
+ var TooltipDelayContext = (0, import_react18.createContext)(0);
3028
2658
  function TooltipProvider({
3029
2659
  children,
3030
2660
  delayDuration = 0
3031
2661
  }) {
3032
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(TooltipDelayContext.Provider, { value: delayDuration, children });
2662
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(TooltipDelayContext.Provider, { value: delayDuration, children });
3033
2663
  }
3034
2664
  function tooltipPosition(trigger, side, align, offset) {
3035
2665
  const horizontal = align === "start" ? trigger.left : align === "end" ? trigger.right : trigger.left + trigger.width / 2;
@@ -3070,12 +2700,12 @@ function Tooltip({
3070
2700
  onOpenChange,
3071
2701
  delayDuration
3072
2702
  }) {
3073
- const providerDelay = (0, import_react20.useContext)(TooltipDelayContext);
3074
- const generatedId = (0, import_react20.useId)().replace(/:/g, "");
3075
- const triggerRef = (0, import_react20.useRef)(null);
3076
- const timerRef = (0, import_react20.useRef)(null);
3077
- const [internalOpen, setInternalOpen] = (0, import_react20.useState)(defaultOpen);
3078
- const [position, setPosition] = (0, import_react20.useState)(null);
2703
+ const providerDelay = (0, import_react18.useContext)(TooltipDelayContext);
2704
+ const generatedId = (0, import_react18.useId)().replace(/:/g, "");
2705
+ const triggerRef = (0, import_react18.useRef)(null);
2706
+ const timerRef = (0, import_react18.useRef)(null);
2707
+ const [internalOpen, setInternalOpen] = (0, import_react18.useState)(defaultOpen);
2708
+ const [position, setPosition] = (0, import_react18.useState)(null);
3079
2709
  const isOpen = open != null ? open : internalOpen;
3080
2710
  const triggerId = children.props.id;
3081
2711
  const tooltipId = triggerId ? `${triggerId}-tooltip` : `ph-tooltip-${generatedId}`;
@@ -3109,7 +2739,7 @@ function Tooltip({
3109
2739
  clearTimer();
3110
2740
  setOpen(false);
3111
2741
  }
3112
- (0, import_react20.useEffect)(() => {
2742
+ (0, import_react18.useEffect)(() => {
3113
2743
  if (!isOpen) return;
3114
2744
  const reposition = () => updatePosition();
3115
2745
  window.addEventListener("resize", reposition);
@@ -3119,11 +2749,11 @@ function Tooltip({
3119
2749
  window.removeEventListener("scroll", reposition, true);
3120
2750
  };
3121
2751
  });
3122
- (0, import_react20.useEffect)(() => () => clearTimer(), []);
2752
+ (0, import_react18.useEffect)(() => () => clearTimer(), []);
3123
2753
  const describedBy = [children.props["aria-describedby"], tooltipId].filter(Boolean).join(" ");
3124
- const trigger = (0, import_react20.cloneElement)(children, { "aria-describedby": describedBy });
3125
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_jsx_runtime34.Fragment, { children: [
3126
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
2754
+ const trigger = (0, import_react18.cloneElement)(children, { "aria-describedby": describedBy });
2755
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_jsx_runtime26.Fragment, { children: [
2756
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
3127
2757
  "span",
3128
2758
  {
3129
2759
  ref: triggerRef,
@@ -3139,12 +2769,12 @@ function Tooltip({
3139
2769
  }
3140
2770
  ),
3141
2771
  isOpen && position && typeof document !== "undefined" ? (0, import_react_dom.createPortal)(
3142
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
2772
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
3143
2773
  "span",
3144
2774
  {
3145
2775
  style: __spreadValues({ position: "fixed" }, position),
3146
2776
  className: "pointer-events-none z-[200]",
3147
- children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
2777
+ children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
3148
2778
  "span",
3149
2779
  {
3150
2780
  id: tooltipId,
@@ -3162,9 +2792,9 @@ function Tooltip({
3162
2792
  }
3163
2793
 
3164
2794
  // src/components/ui/EmptyState.tsx
3165
- var import_jsx_runtime35 = require("react/jsx-runtime");
2795
+ var import_jsx_runtime27 = require("react/jsx-runtime");
3166
2796
  function EmptyState({ icon, title, description, action, className }) {
3167
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
2797
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
3168
2798
  "div",
3169
2799
  {
3170
2800
  className: cn(
@@ -3172,17 +2802,17 @@ function EmptyState({ icon, title, description, action, className }) {
3172
2802
  className
3173
2803
  ),
3174
2804
  children: [
3175
- icon && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "mb-4 flex h-14 w-14 items-center justify-center rounded-full bg-ph-muted text-ph-mutedtext", children: icon }),
3176
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("h3", { className: "text-base font-semibold text-ph-ink", children: title }),
3177
- description && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("p", { className: "mt-1 max-w-sm text-sm text-ph-subtle", children: description }),
3178
- action && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "mt-4", children: action })
2805
+ icon && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "mb-4 flex h-14 w-14 items-center justify-center rounded-full bg-ph-muted text-ph-mutedtext", children: icon }),
2806
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("h3", { className: "text-base font-semibold text-ph-ink", children: title }),
2807
+ description && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("p", { className: "mt-1 max-w-sm text-sm text-ph-subtle", children: description }),
2808
+ action && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "mt-4", children: action })
3179
2809
  ]
3180
2810
  }
3181
2811
  );
3182
2812
  }
3183
2813
 
3184
2814
  // src/components/ui/FilterChips.tsx
3185
- var import_jsx_runtime36 = require("react/jsx-runtime");
2815
+ var import_jsx_runtime28 = require("react/jsx-runtime");
3186
2816
  function FilterChips({
3187
2817
  chips,
3188
2818
  onToggle,
@@ -3190,20 +2820,20 @@ function FilterChips({
3190
2820
  className,
3191
2821
  "aria-label": ariaLabel = "Applied filters"
3192
2822
  }) {
3193
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: cn("ph-filter-chips", className), role: "group", "aria-label": ariaLabel, children: chips.map((chip) => {
2823
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { className: cn("ph-filter-chips", className), role: "group", "aria-label": ariaLabel, children: chips.map((chip) => {
3194
2824
  var _a;
3195
2825
  const label = (_a = chip.removeLabel) != null ? _a : getChipText(chip);
3196
- const content = /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_jsx_runtime36.Fragment, { children: [
3197
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "ph-filter-chip__label", children: chip.label }),
3198
- chip.value != null ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "ph-filter-chip__value", children: chip.value }) : null
2826
+ const content = /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_jsx_runtime28.Fragment, { children: [
2827
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "ph-filter-chip__label", children: chip.label }),
2828
+ chip.value != null ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "ph-filter-chip__value", children: chip.value }) : null
3199
2829
  ] });
3200
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
2830
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
3201
2831
  "span",
3202
2832
  {
3203
2833
  className: cn("ph-filter-chip", chip.active && "ph-filter-chip--active"),
3204
2834
  "data-state": chip.active ? "on" : "off",
3205
2835
  children: [
3206
- onToggle ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
2836
+ onToggle ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
3207
2837
  "button",
3208
2838
  {
3209
2839
  type: "button",
@@ -3212,15 +2842,15 @@ function FilterChips({
3212
2842
  onClick: () => onToggle(chip.id),
3213
2843
  children: content
3214
2844
  }
3215
- ) : /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "ph-filter-chip__main", children: content }),
3216
- chip.active && onRemove ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
2845
+ ) : /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { className: "ph-filter-chip__main", children: content }),
2846
+ chip.active && onRemove ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
3217
2847
  "button",
3218
2848
  {
3219
2849
  type: "button",
3220
2850
  className: "ph-filter-chip__remove",
3221
2851
  "aria-label": `Remove ${label} filter`,
3222
2852
  onClick: () => onRemove(chip.id),
3223
- children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(IconClose, { className: "h-3 w-3", "aria-hidden": true })
2853
+ children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(IconClose, { className: "h-3 w-3", "aria-hidden": true })
3224
2854
  }
3225
2855
  ) : null
3226
2856
  ]
@@ -3236,7 +2866,7 @@ function getChipText(chip) {
3236
2866
  }
3237
2867
 
3238
2868
  // src/components/ui/FilterBar.tsx
3239
- var import_jsx_runtime37 = require("react/jsx-runtime");
2869
+ var import_jsx_runtime29 = require("react/jsx-runtime");
3240
2870
  function FilterBar(_a) {
3241
2871
  var _b = _a, {
3242
2872
  children,
@@ -3253,12 +2883,12 @@ function FilterBar(_a) {
3253
2883
  "resultCount",
3254
2884
  "className"
3255
2885
  ]);
3256
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", __spreadProps(__spreadValues({ className: cn("ph-filter-bar", className) }, props), { children: [
3257
- /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "ph-filter-bar__controls", role: "group", "aria-label": label, children: [
2886
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", __spreadProps(__spreadValues({ className: cn("ph-filter-bar", className) }, props), { children: [
2887
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { className: "ph-filter-bar__controls", role: "group", "aria-label": label, children: [
3258
2888
  children,
3259
- onClear ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("button", { type: "button", className: "ph-filter-bar__clear", onClick: onClear, children: clearLabel }) : null
2889
+ onClear ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("button", { type: "button", className: "ph-filter-bar__clear", onClick: onClear, children: clearLabel }) : null
3260
2890
  ] }),
3261
- resultCount != null ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("output", { className: "ph-filter-bar__results", "aria-live": "polite", children: resultCount }) : null
2891
+ resultCount != null ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("output", { className: "ph-filter-bar__results", "aria-live": "polite", children: resultCount }) : null
3262
2892
  ] }));
3263
2893
  }
3264
2894
  function FilterMenu({
@@ -3275,19 +2905,19 @@ function FilterMenu({
3275
2905
  const selected = options.find((option) => option.value === value);
3276
2906
  const displayValue = (_a = selected == null ? void 0 : selected.label) != null ? _a : placeholder;
3277
2907
  const accessibleValue = selected ? getOptionText(selected) : String(placeholder);
3278
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
2908
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
3279
2909
  DropdownMenu,
3280
2910
  {
3281
2911
  "aria-label": `${label}: ${accessibleValue}`,
3282
2912
  align,
3283
2913
  disabled,
3284
2914
  className,
3285
- trigger: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("span", { className: cn("ph-filter-menu-trigger", selected && "ph-filter-menu-trigger--active"), children: [
3286
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(IconTuning, { className: "h-3.5 w-3.5", "aria-hidden": true }),
3287
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "ph-filter-menu-trigger__label", children: label }),
3288
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "ph-filter-menu-trigger__value", children: displayValue })
2915
+ trigger: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("span", { className: cn("ph-filter-menu-trigger", selected && "ph-filter-menu-trigger--active"), children: [
2916
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(IconTuning, { className: "h-3.5 w-3.5", "aria-hidden": true }),
2917
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "ph-filter-menu-trigger__label", children: label }),
2918
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "ph-filter-menu-trigger__value", children: displayValue })
3289
2919
  ] }),
3290
- children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(DropdownRadioGroup, { value, onValueChange, children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
2920
+ children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(DropdownRadioGroup, { value, onValueChange, children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
3291
2921
  DropdownRadioItem,
3292
2922
  {
3293
2923
  value: option.value,
@@ -3311,25 +2941,25 @@ function SortMenu({
3311
2941
  className
3312
2942
  }) {
3313
2943
  const selected = options.find((option) => option.value === value);
3314
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
2944
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
3315
2945
  DropdownMenu,
3316
2946
  {
3317
2947
  "aria-label": `${label}: ${selected ? getOptionText(selected) : "Choose sort order"}`,
3318
2948
  align,
3319
2949
  disabled,
3320
2950
  className,
3321
- trigger: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("span", { className: "ph-filter-menu-trigger ph-sort-menu-trigger", children: [
3322
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
2951
+ trigger: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("span", { className: "ph-filter-menu-trigger ph-sort-menu-trigger", children: [
2952
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
3323
2953
  IconArrowDown,
3324
2954
  {
3325
2955
  className: cn("h-3.5 w-3.5", direction === "ascending" && "rotate-180"),
3326
2956
  "aria-hidden": true
3327
2957
  }
3328
2958
  ),
3329
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "ph-filter-menu-trigger__label", children: label }),
3330
- selected ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "ph-filter-menu-trigger__value", children: selected.label }) : null
2959
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "ph-filter-menu-trigger__label", children: label }),
2960
+ selected ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { className: "ph-filter-menu-trigger__value", children: selected.label }) : null
3331
2961
  ] }),
3332
- children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(DropdownRadioGroup, { value, onValueChange, children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
2962
+ children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(DropdownRadioGroup, { value, onValueChange, children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
3333
2963
  DropdownRadioItem,
3334
2964
  {
3335
2965
  value: option.value,
@@ -3349,7 +2979,7 @@ function getOptionText(option) {
3349
2979
  }
3350
2980
 
3351
2981
  // src/components/ui/FilterControls.tsx
3352
- var import_jsx_runtime38 = require("react/jsx-runtime");
2982
+ var import_jsx_runtime30 = require("react/jsx-runtime");
3353
2983
  function FilterControls(_a) {
3354
2984
  var _b = _a, {
3355
2985
  children,
@@ -3365,33 +2995,33 @@ function FilterControls(_a) {
3365
2995
  "className"
3366
2996
  ]);
3367
2997
  const hasChips = Boolean(chipsProps == null ? void 0 : chipsProps.chips.length);
3368
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", __spreadProps(__spreadValues({ className: cn("ph-filter-controls", className) }, props), { children: [
3369
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(FilterBar, __spreadProps(__spreadValues({}, barProps), { children })),
3370
- hasChips && chipsProps ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(FilterChips, __spreadValues({}, chipsProps)) : emptyState != null ? emptyState : null
2998
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", __spreadProps(__spreadValues({ className: cn("ph-filter-controls", className) }, props), { children: [
2999
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(FilterBar, __spreadProps(__spreadValues({}, barProps), { children })),
3000
+ hasChips && chipsProps ? /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(FilterChips, __spreadValues({}, chipsProps)) : emptyState != null ? emptyState : null
3371
3001
  ] }));
3372
3002
  }
3373
3003
 
3374
3004
  // src/components/ui/CodeBlock.tsx
3375
- var import_react21 = require("react");
3376
- var import_jsx_runtime39 = require("react/jsx-runtime");
3005
+ var import_react19 = require("react");
3006
+ var import_jsx_runtime31 = require("react/jsx-runtime");
3377
3007
  function CodeBlock({ code, language = "tsx", filename, className }) {
3378
- const [copied, setCopied] = (0, import_react21.useState)(false);
3008
+ const [copied, setCopied] = (0, import_react19.useState)(false);
3379
3009
  const handleCopy = async () => {
3380
3010
  await navigator.clipboard.writeText(code);
3381
3011
  setCopied(true);
3382
3012
  setTimeout(() => setCopied(false), 2e3);
3383
3013
  };
3384
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: cn("overflow-hidden rounded-lg border border-ph-border bg-[#1a1a2e]", className), children: [
3385
- (filename || language) && /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "flex items-center justify-between border-b border-white/10 px-4 py-2", children: [
3386
- /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "flex items-center gap-2", children: [
3387
- /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "flex gap-1.5", children: [
3388
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "h-3 w-3 rounded-full bg-red-400" }),
3389
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "h-3 w-3 rounded-full bg-amber-400" }),
3390
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "h-3 w-3 rounded-full bg-emerald-400" })
3014
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: cn("overflow-hidden rounded-lg border border-ph-border bg-[#1a1a2e]", className), children: [
3015
+ (filename || language) && /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "flex items-center justify-between border-b border-white/10 px-4 py-2", children: [
3016
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "flex items-center gap-2", children: [
3017
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { className: "flex gap-1.5", children: [
3018
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "h-3 w-3 rounded-full bg-red-400" }),
3019
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "h-3 w-3 rounded-full bg-amber-400" }),
3020
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: "h-3 w-3 rounded-full bg-emerald-400" })
3391
3021
  ] }),
3392
- filename && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "ml-2 text-xs text-white/60", children: filename })
3022
+ filename && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("span", { className: "ml-2 text-xs text-white/60", children: filename })
3393
3023
  ] }),
3394
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
3024
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
3395
3025
  "button",
3396
3026
  {
3397
3027
  type: "button",
@@ -3401,35 +3031,35 @@ function CodeBlock({ code, language = "tsx", filename, className }) {
3401
3031
  }
3402
3032
  )
3403
3033
  ] }),
3404
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("pre", { className: "overflow-x-auto p-4 text-sm leading-relaxed", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("code", { className: "font-mono text-[#e4e4e7]", children: code }) })
3034
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("pre", { className: "overflow-x-auto p-4 text-sm leading-relaxed", children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("code", { className: "font-mono text-[#e4e4e7]", children: code }) })
3405
3035
  ] });
3406
3036
  }
3407
3037
 
3408
3038
  // src/components/ui/ComponentDocs.tsx
3409
- var import_jsx_runtime40 = require("react/jsx-runtime");
3039
+ var import_jsx_runtime32 = require("react/jsx-runtime");
3410
3040
  function ComponentDocs({ title = "Props & variants", rows, defaultOpen = false, className }) {
3411
- return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("details", { className: cn("ph-panel group overflow-hidden p-0", className), open: defaultOpen, children: [
3412
- /* @__PURE__ */ (0, import_jsx_runtime40.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: [
3413
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("h3", { className: "text-xs font-semibold uppercase tracking-wider text-ph-mutedtext", children: title }),
3414
- /* @__PURE__ */ (0, import_jsx_runtime40.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: [
3415
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "group-open:hidden", children: "Show" }),
3416
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "hidden group-open:inline", children: "Hide" })
3041
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("details", { className: cn("ph-panel group overflow-hidden p-0", className), open: defaultOpen, children: [
3042
+ /* @__PURE__ */ (0, import_jsx_runtime32.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: [
3043
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("h3", { className: "text-xs font-semibold uppercase tracking-wider text-ph-mutedtext", children: title }),
3044
+ /* @__PURE__ */ (0, import_jsx_runtime32.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: [
3045
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "group-open:hidden", children: "Show" }),
3046
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "hidden group-open:inline", children: "Hide" })
3417
3047
  ] })
3418
3048
  ] }),
3419
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "overflow-x-auto border-t border-ph-border", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("table", { className: "w-full text-left text-sm", children: [
3420
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("thead", { className: "bg-ph-muted text-xs uppercase tracking-wider text-ph-mutedtext", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("tr", { children: [
3421
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("th", { className: "px-4 py-2 font-semibold", children: "Prop" }),
3422
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("th", { className: "px-4 py-2 font-semibold", children: "Type" }),
3423
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("th", { className: "px-4 py-2 font-semibold", children: "Default" }),
3424
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("th", { className: "px-4 py-2 font-semibold", children: "Use" })
3049
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: "overflow-x-auto border-t border-ph-border", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("table", { className: "w-full text-left text-sm", children: [
3050
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("thead", { className: "bg-ph-muted text-xs uppercase tracking-wider text-ph-mutedtext", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("tr", { children: [
3051
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("th", { className: "px-4 py-2 font-semibold", children: "Prop" }),
3052
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("th", { className: "px-4 py-2 font-semibold", children: "Type" }),
3053
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("th", { className: "px-4 py-2 font-semibold", children: "Default" }),
3054
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("th", { className: "px-4 py-2 font-semibold", children: "Use" })
3425
3055
  ] }) }),
3426
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("tbody", { className: "divide-y divide-ph-border", children: rows.map((row) => {
3056
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("tbody", { className: "divide-y divide-ph-border", children: rows.map((row) => {
3427
3057
  var _a, _b;
3428
- return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("tr", { children: [
3429
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("td", { className: "px-4 py-3 align-top font-mono text-xs text-ph-ink", children: row.name }),
3430
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("td", { className: "px-4 py-3 align-top font-mono text-xs text-ph-subtle", children: row.type }),
3431
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("td", { className: "px-4 py-3 align-top font-mono text-xs text-ph-subtle", children: (_a = row.defaultValue) != null ? _a : "-" }),
3432
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("td", { className: "px-4 py-3 align-top text-ph-subtle", children: (_b = row.description) != null ? _b : /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "text-ph-mutedtext", children: "\u2014" }) })
3058
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)("tr", { children: [
3059
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("td", { className: "px-4 py-3 align-top font-mono text-xs text-ph-ink", children: row.name }),
3060
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("td", { className: "px-4 py-3 align-top font-mono text-xs text-ph-subtle", children: row.type }),
3061
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("td", { className: "px-4 py-3 align-top font-mono text-xs text-ph-subtle", children: (_a = row.defaultValue) != null ? _a : "-" }),
3062
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("td", { className: "px-4 py-3 align-top text-ph-subtle", children: (_b = row.description) != null ? _b : /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("span", { className: "text-ph-mutedtext", children: "\u2014" }) })
3433
3063
  ] }, row.name);
3434
3064
  }) })
3435
3065
  ] }) })
@@ -3437,8 +3067,8 @@ function ComponentDocs({ title = "Props & variants", rows, defaultOpen = false,
3437
3067
  }
3438
3068
 
3439
3069
  // src/components/ui/ShowcaseWrapper.tsx
3440
- var import_react22 = require("react");
3441
- var import_jsx_runtime41 = require("react/jsx-runtime");
3070
+ var import_react20 = require("react");
3071
+ var import_jsx_runtime33 = require("react/jsx-runtime");
3442
3072
  function ShowcaseWrapper({
3443
3073
  id,
3444
3074
  title,
@@ -3450,13 +3080,13 @@ function ShowcaseWrapper({
3450
3080
  className
3451
3081
  }) {
3452
3082
  var _a;
3453
- const [showCode, setShowCode] = (0, import_react22.useState)(false);
3083
+ const [showCode, setShowCode] = (0, import_react20.useState)(false);
3454
3084
  const fallbackId = (_a = titleIdMap[title]) != null ? _a : title.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, "");
3455
- return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("section", { id: id != null ? id : fallbackId, className: cn("scroll-mt-20", className), children: [
3456
- /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "ph-h2-rule mb-8", children: [
3457
- /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "flex items-center gap-1.5", children: [
3458
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("h2", { children: title }),
3459
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
3085
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("section", { id: id != null ? id : fallbackId, className: cn("scroll-mt-20", className), children: [
3086
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "ph-h2-rule mb-8", children: [
3087
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: "flex items-center gap-1.5", children: [
3088
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("h2", { children: title }),
3089
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
3460
3090
  "button",
3461
3091
  {
3462
3092
  type: "button",
@@ -3467,15 +3097,15 @@ function ShowcaseWrapper({
3467
3097
  ),
3468
3098
  title: showCode ? "Hide code" : "Show code",
3469
3099
  "aria-label": showCode ? "Hide code" : "Show code",
3470
- children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(IconCodePreview, { className: "h-5 w-5", "aria-hidden": true })
3100
+ children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(IconCodePreview, { className: "h-5 w-5", "aria-hidden": true })
3471
3101
  }
3472
3102
  )
3473
3103
  ] }),
3474
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("hr", {})
3104
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("hr", {})
3475
3105
  ] }),
3476
- description && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("p", { className: "mb-6 text-sm text-ph-subtle", children: description }),
3477
- docs && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "mb-6", children: docs }),
3478
- /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
3106
+ description && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("p", { className: "mb-6 text-sm text-ph-subtle", children: description }),
3107
+ docs && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "mb-6", children: docs }),
3108
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
3479
3109
  "div",
3480
3110
  {
3481
3111
  className: cn(
@@ -3483,15 +3113,15 @@ function ShowcaseWrapper({
3483
3113
  showCode ? "lg:grid lg:grid-cols-[1fr,minmax(360px,420px)]" : "block"
3484
3114
  ),
3485
3115
  children: [
3486
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: cn("min-w-0", showCode && "lg:pr-2"), children }),
3487
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
3116
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: cn("min-w-0", showCode && "lg:pr-2"), children }),
3117
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
3488
3118
  "div",
3489
3119
  {
3490
3120
  className: cn(
3491
3121
  "transition-all duration-300",
3492
3122
  showCode ? "block opacity-100" : "hidden opacity-0 lg:hidden"
3493
3123
  ),
3494
- children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "sticky top-20", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(CodeBlock, { code, filename }) })
3124
+ children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)("div", { className: "sticky top-20", children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(CodeBlock, { code, filename }) })
3495
3125
  }
3496
3126
  )
3497
3127
  ]
@@ -3540,14 +3170,14 @@ var titleIdMap = {
3540
3170
  };
3541
3171
 
3542
3172
  // src/components/ui/CollapsibleSection.tsx
3543
- var import_react23 = require("react");
3544
- var import_jsx_runtime42 = require("react/jsx-runtime");
3173
+ var import_react21 = require("react");
3174
+ var import_jsx_runtime34 = require("react/jsx-runtime");
3545
3175
  function CollapsibleSection({ title, children, defaultOpen = true, id }) {
3546
- const [isOpen, setIsOpen] = (0, import_react23.useState)(defaultOpen);
3547
- const generatedId = (0, import_react23.useId)();
3176
+ const [isOpen, setIsOpen] = (0, import_react21.useState)(defaultOpen);
3177
+ const generatedId = (0, import_react21.useId)();
3548
3178
  const contentId = `${id != null ? id : generatedId}-content`;
3549
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("section", { id, className: "scroll-mt-20", children: [
3550
- /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
3179
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("section", { id, className: "scroll-mt-20", children: [
3180
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
3551
3181
  "button",
3552
3182
  {
3553
3183
  type: "button",
@@ -3556,8 +3186,8 @@ function CollapsibleSection({ title, children, defaultOpen = true, id }) {
3556
3186
  "aria-controls": contentId,
3557
3187
  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",
3558
3188
  children: [
3559
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "text-lg font-bold text-ph-ink", children: title }),
3560
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
3189
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: "text-lg font-bold text-ph-ink", children: title }),
3190
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
3561
3191
  IconChevronDown,
3562
3192
  {
3563
3193
  className: cn(
@@ -3570,7 +3200,7 @@ function CollapsibleSection({ title, children, defaultOpen = true, id }) {
3570
3200
  ]
3571
3201
  }
3572
3202
  ),
3573
- /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
3203
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
3574
3204
  "div",
3575
3205
  {
3576
3206
  id: contentId,
@@ -3586,7 +3216,7 @@ function CollapsibleSection({ title, children, defaultOpen = true, id }) {
3586
3216
  }
3587
3217
 
3588
3218
  // src/components/ui/Typography.tsx
3589
- var import_jsx_runtime43 = require("react/jsx-runtime");
3219
+ var import_jsx_runtime35 = require("react/jsx-runtime");
3590
3220
  var toneMap2 = {
3591
3221
  default: "text-ph-ink",
3592
3222
  muted: "text-ph-mutedtext",
@@ -3615,48 +3245,51 @@ function Display({
3615
3245
  truncate,
3616
3246
  className
3617
3247
  }) {
3618
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("h1", { className: textClass("text-4xl font-extrabold tracking-tight md:text-5xl", tone, weight, truncate, className), children });
3248
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("h1", { className: textClass("ph-hero-title", tone, weight, truncate, className), children });
3249
+ }
3250
+ function SectionTitle({ children, tone = "default", weight, truncate, className }) {
3251
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("h2", { className: textClass("ph-section-title", tone, weight, truncate, className), children });
3619
3252
  }
3620
3253
  function H1({ children, tone = "default", weight, truncate, className }) {
3621
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("h1", { className: textClass("text-3xl font-bold tracking-tight md:text-4xl", tone, weight, truncate, className), children });
3254
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("h1", { className: textClass("text-3xl font-bold tracking-tight md:text-4xl", tone, weight, truncate, className), children });
3622
3255
  }
3623
3256
  function H2({ children, tone = "default", weight, truncate, className }) {
3624
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("h2", { className: textClass("text-2xl font-bold tracking-tight", tone, weight, truncate, className), children });
3257
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("h2", { className: textClass("text-2xl font-bold tracking-tight", tone, weight, truncate, className), children });
3625
3258
  }
3626
3259
  function H3({ children, tone = "default", weight, truncate, className }) {
3627
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("h3", { className: textClass("text-xl font-semibold", tone, weight, truncate, className), children });
3260
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("h3", { className: textClass("text-xl font-semibold", tone, weight, truncate, className), children });
3628
3261
  }
3629
3262
  function H4({ children, tone = "default", weight, truncate, className }) {
3630
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("h4", { className: textClass("text-lg font-semibold", tone, weight, truncate, className), children });
3263
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("h4", { className: textClass("text-lg font-semibold", tone, weight, truncate, className), children });
3631
3264
  }
3632
3265
  function H5({ children, tone = "default", weight, truncate, className }) {
3633
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("h5", { className: textClass("text-base font-semibold", tone, weight, truncate, className), children });
3266
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("h5", { className: textClass("text-base font-semibold", tone, weight, truncate, className), children });
3634
3267
  }
3635
3268
  function P({ children, tone = "default", weight, truncate, className }) {
3636
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("p", { className: textClass("text-base leading-relaxed", tone, weight, truncate, className), children });
3269
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("p", { className: textClass("text-base leading-relaxed", tone, weight, truncate, className), children });
3637
3270
  }
3638
3271
  function Small({ children, tone = "default", weight, truncate, className }) {
3639
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: textClass("text-sm leading-relaxed", tone, weight, truncate, className), children });
3272
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: textClass("text-sm leading-relaxed", tone, weight, truncate, className), children });
3640
3273
  }
3641
3274
  function Caption({ children, tone = "muted", weight, truncate, className }) {
3642
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: textClass("text-[11px] font-medium uppercase tracking-wider", tone, weight, truncate, className), children });
3275
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: textClass("text-[11px] font-medium uppercase tracking-wider", tone, weight, truncate, className), children });
3643
3276
  }
3644
3277
  function Overline({ children, tone = "muted", weight, truncate, className }) {
3645
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: textClass("text-[10px] font-bold uppercase tracking-[0.15em]", tone, weight, truncate, className), children });
3278
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: textClass("text-[10px] font-bold uppercase tracking-[0.15em]", tone, weight, truncate, className), children });
3646
3279
  }
3647
3280
  function Lead({ children, tone = "subtle", weight, truncate, className }) {
3648
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("p", { className: textClass("text-lg leading-relaxed", tone, weight, truncate, className), children });
3281
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("p", { className: textClass("ph-lead", tone, weight, truncate, className), children });
3649
3282
  }
3650
3283
  function Mono({ children, tone = "default", weight, truncate, className }) {
3651
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("code", { className: textClass("text-sm font-mono leading-relaxed", tone, weight, truncate, className), children });
3284
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("code", { className: textClass("text-sm font-mono leading-relaxed", tone, weight, truncate, className), children });
3652
3285
  }
3653
3286
  function Label({ children, tone = "default", weight, truncate, className }) {
3654
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("label", { className: textClass("text-sm font-medium", tone, weight, truncate, className), children });
3287
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("label", { className: textClass("text-sm font-medium", tone, weight, truncate, className), children });
3655
3288
  }
3656
3289
 
3657
3290
  // src/components/ui/Avatar.tsx
3658
- var import_jsx_runtime44 = require("react/jsx-runtime");
3659
- var sizeMap5 = {
3291
+ var import_jsx_runtime36 = require("react/jsx-runtime");
3292
+ var sizeMap4 = {
3660
3293
  xs: "h-8 w-8 text-[10px]",
3661
3294
  sm: "h-10 w-10 text-xs",
3662
3295
  md: "h-12 w-12 text-base",
@@ -3687,19 +3320,19 @@ function Avatar(_a) {
3687
3320
  "badge",
3688
3321
  "className"
3689
3322
  ]);
3690
- return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", __spreadProps(__spreadValues({ className: cn("relative inline-flex shrink-0", className) }, props), { children: [
3691
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
3323
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", __spreadProps(__spreadValues({ className: cn("relative inline-flex shrink-0", className) }, props), { children: [
3324
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
3692
3325
  "div",
3693
3326
  {
3694
3327
  className: cn(
3695
3328
  "flex items-center justify-center rounded-full border border-ph-border font-bold shadow-ph",
3696
- sizeMap5[size],
3329
+ sizeMap4[size],
3697
3330
  color
3698
3331
  ),
3699
3332
  children: icon || label
3700
3333
  }
3701
3334
  ),
3702
- status && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
3335
+ status && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
3703
3336
  "span",
3704
3337
  {
3705
3338
  className: cn(
@@ -3708,7 +3341,7 @@ function Avatar(_a) {
3708
3341
  )
3709
3342
  }
3710
3343
  ),
3711
- badge && /* @__PURE__ */ (0, import_jsx_runtime44.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 })
3344
+ badge && /* @__PURE__ */ (0, import_jsx_runtime36.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 })
3712
3345
  ] }));
3713
3346
  }
3714
3347
  function AvatarGroup(_a) {
@@ -3716,9 +3349,9 @@ function AvatarGroup(_a) {
3716
3349
  const items = Array.isArray(children) ? children : [children];
3717
3350
  const visible = max ? items.slice(0, max) : items;
3718
3351
  const remaining = max ? items.length - max : 0;
3719
- return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", __spreadProps(__spreadValues({ className: cn("-space-x-3 flex rtl:space-x-reverse", className) }, props), { children: [
3352
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", __spreadProps(__spreadValues({ className: cn("-space-x-3 flex rtl:space-x-reverse", className) }, props), { children: [
3720
3353
  visible,
3721
- remaining > 0 && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
3354
+ remaining > 0 && /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
3722
3355
  Avatar,
3723
3356
  {
3724
3357
  label: `+${remaining}`,
@@ -3730,8 +3363,8 @@ function AvatarGroup(_a) {
3730
3363
  }
3731
3364
 
3732
3365
  // src/components/ui/Progress.tsx
3733
- var import_jsx_runtime45 = require("react/jsx-runtime");
3734
- var sizeMap6 = {
3366
+ var import_jsx_runtime37 = require("react/jsx-runtime");
3367
+ var sizeMap5 = {
3735
3368
  sm: "h-1",
3736
3369
  md: "h-2",
3737
3370
  lg: "h-3"
@@ -3755,15 +3388,15 @@ function Progress(_a) {
3755
3388
  "className"
3756
3389
  ]);
3757
3390
  const percentage = Math.min(100, Math.max(0, value / max * 100));
3758
- return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", __spreadProps(__spreadValues({ className: cn("w-full", className) }, props), { children: [
3759
- (label || showPercentage) && /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "mb-1.5 flex justify-between text-sm text-ph-subtle", children: [
3760
- label && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { children: label }),
3761
- showPercentage && /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("span", { className: "tabular-nums", children: [
3391
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", __spreadProps(__spreadValues({ className: cn("w-full", className) }, props), { children: [
3392
+ (label || showPercentage) && /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "mb-1.5 flex justify-between text-sm text-ph-subtle", children: [
3393
+ label && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { children: label }),
3394
+ showPercentage && /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("span", { className: "tabular-nums", children: [
3762
3395
  Math.round(percentage),
3763
3396
  "%"
3764
3397
  ] })
3765
3398
  ] }),
3766
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: cn("ph-progress", sizeMap6[size]), children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
3399
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("div", { className: cn("ph-progress", sizeMap5[size]), children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
3767
3400
  "div",
3768
3401
  {
3769
3402
  className: cn("ph-progress-bar", color),
@@ -3777,1443 +3410,65 @@ function Progress(_a) {
3777
3410
  ] }));
3778
3411
  }
3779
3412
 
3780
- // src/components/ui/ChatBubble.tsx
3781
- var import_jsx_runtime46 = require("react/jsx-runtime");
3782
- function ChatBubble(_a) {
3413
+ // src/components/ui/Link.tsx
3414
+ var import_react22 = require("react");
3415
+ var import_jsx_runtime38 = require("react/jsx-runtime");
3416
+ var Link = (0, import_react22.forwardRef)(function Link2(_a, ref) {
3783
3417
  var _b = _a, {
3784
- children,
3785
- avatar,
3786
- name,
3787
- time,
3788
- variant = "from",
3789
- footer,
3790
- className
3418
+ className,
3419
+ disabled = false,
3420
+ children
3791
3421
  } = _b, props = __objRest(_b, [
3792
- "children",
3793
- "avatar",
3794
- "name",
3795
- "time",
3796
- "variant",
3797
- "footer",
3798
- "className"
3422
+ "className",
3423
+ "disabled",
3424
+ "children"
3799
3425
  ]);
3800
- const isSelf = variant === "self";
3801
- return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
3802
- "div",
3426
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
3427
+ "a",
3803
3428
  __spreadProps(__spreadValues({
3429
+ ref,
3804
3430
  className: cn(
3805
- "flex gap-3",
3806
- isSelf && "flex-row-reverse",
3431
+ "ph-link",
3432
+ disabled && "ph-link--disabled pointer-events-none opacity-50",
3807
3433
  className
3808
- )
3434
+ ),
3435
+ tabIndex: disabled ? -1 : void 0,
3436
+ "aria-disabled": disabled || void 0
3809
3437
  }, props), {
3810
- children: [
3811
- avatar && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "shrink-0", children: avatar }),
3812
- /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: cn("min-w-0 flex-1", isSelf && "text-right"), children: [
3813
- (name || time) && /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
3814
- "header",
3815
- {
3816
- className: cn(
3817
- "flex gap-2 text-xs text-ph-mutedtext",
3818
- isSelf && "flex-row-reverse justify-end"
3819
- ),
3820
- children: [
3821
- name && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "font-semibold text-ph-ink", children: name }),
3822
- time && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { children: time })
3823
- ]
3824
- }
3825
- ),
3826
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
3827
- "div",
3828
- {
3829
- className: cn(
3830
- "mt-2 inline-block text-left shadow-ph",
3831
- isSelf ? "ph-chat-self" : "ph-chat-from"
3832
- ),
3833
- children
3834
- }
3835
- ),
3836
- footer && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("footer", { className: "mt-2 text-[11px] text-ph-mutedtext", children: footer })
3837
- ] })
3838
- ]
3839
- })
3840
- );
3841
- }
3842
-
3843
- // src/components/ui/Terminal.tsx
3844
- var import_jsx_runtime47 = require("react/jsx-runtime");
3845
- function Terminal(_a) {
3846
- var _b = _a, {
3847
- title = "sandbox",
3848
- lines,
3849
- children,
3850
- className
3851
- } = _b, props = __objRest(_b, [
3852
- "title",
3853
- "lines",
3854
- "children",
3855
- "className"
3856
- ]);
3857
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
3858
- "div",
3859
- __spreadProps(__spreadValues({
3860
- className: cn(
3861
- "overflow-hidden rounded-xl border border-ph-border shadow-ph-md",
3862
- className
3863
- )
3864
- }, props), {
3865
- children: [
3866
- /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("header", { className: "flex items-center gap-2 border-b border-ph-border bg-ph-muted px-4 py-3", children: [
3867
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "h-3 w-3 rounded-full bg-red-400" }),
3868
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "h-3 w-3 rounded-full bg-amber-400" }),
3869
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "h-3 w-3 rounded-full bg-emerald-400" }),
3870
- title && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "text-xs font-medium text-ph-mutedtext", children: title })
3871
- ] }),
3872
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "ph-code rounded-none border-x-0 border-b-0 text-[13px] leading-relaxed", children: children || /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_jsx_runtime47.Fragment, { children: lines == null ? void 0 : lines.map((line, i) => {
3873
- const text = typeof line === "string" ? line : line.text;
3874
- const color = typeof line === "string" ? void 0 : line.color;
3875
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("span", { children: [
3876
- /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: color || "text-neutral-600", children: text }),
3877
- i < lines.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("br", {})
3878
- ] }, i);
3879
- }) }) })
3880
- ]
3881
- })
3882
- );
3883
- }
3884
-
3885
- // src/components/ui/Indicator.tsx
3886
- var import_jsx_runtime48 = require("react/jsx-runtime");
3887
- var positionMap = {
3888
- "top-right": "-right-[2px] -top-[2px]",
3889
- "top-left": "-left-[2px] -top-[2px]",
3890
- "bottom-right": "-right-[2px] -bottom-[2px]",
3891
- "bottom-left": "-left-[2px] -bottom-[2px]"
3892
- };
3893
- function Indicator(_a) {
3894
- var _b = _a, {
3895
- children,
3896
- badge,
3897
- color = "bg-ph-brand",
3898
- position = "top-right",
3899
- dot = false,
3900
- className
3901
- } = _b, props = __objRest(_b, [
3902
- "children",
3903
- "badge",
3904
- "color",
3905
- "position",
3906
- "dot",
3907
- "className"
3908
- ]);
3909
- return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", __spreadProps(__spreadValues({ className: cn("relative inline-flex items-center justify-center", className) }, props), { children: [
3910
- dot ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
3911
- "span",
3912
- {
3913
- className: cn(
3914
- "absolute z-10 h-2.5 w-2.5 rounded-full border-2 border-white",
3915
- color,
3916
- positionMap[position]
3917
- )
3918
- }
3919
- ) : badge != null ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
3920
- "span",
3921
- {
3922
- className: cn(
3923
- "absolute z-10 flex min-h-[22px] min-w-[22px] items-center justify-center rounded-full px-1 text-[11px] font-bold text-white",
3924
- color,
3925
- positionMap[position]
3926
- ),
3927
- children: badge
3928
- }
3929
- ) : null,
3930
- children
3931
- ] }));
3932
- }
3933
-
3934
- // src/components/ui/Timeline.tsx
3935
- var import_jsx_runtime49 = require("react/jsx-runtime");
3936
- function Timeline(_a) {
3937
- var _b = _a, {
3938
- events,
3939
- alternate = false,
3940
- className
3941
- } = _b, props = __objRest(_b, [
3942
- "events",
3943
- "alternate",
3944
- "className"
3945
- ]);
3946
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
3947
- "ol",
3948
- __spreadProps(__spreadValues({
3949
- className: cn("relative space-y-8", className)
3950
- }, props), {
3951
- children: events.map((event, idx) => {
3952
- const align = alternate && idx % 2 !== 0 ? "lg:flex-row-reverse" : "";
3953
- return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("li", { className: cn("relative flex gap-6", align), children: [
3954
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
3955
- "div",
3956
- {
3957
- className: cn(
3958
- "relative z-10 flex h-12 w-12 shrink-0 items-center justify-center rounded-full ring-8 ring-ph-muted shadow-md",
3959
- event.color || "bg-ph-brand text-white"
3960
- ),
3961
- children: event.icon
3962
- }
3963
- ),
3964
- /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("article", { className: "flex-1 rounded-xl border border-ph-border bg-ph-surface p-4 shadow-ph", children: [
3965
- /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex flex-wrap items-baseline gap-3", children: [
3966
- /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("h4", { className: "text-base font-semibold text-ph-ink", children: event.title }),
3967
- event.time && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("time", { className: "text-[11px] font-semibold uppercase tracking-wide text-ph-mutedtext", children: event.time })
3968
- ] }),
3969
- event.description && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("p", { className: "mt-2 text-sm text-ph-subtle", children: event.description })
3970
- ] })
3971
- ] }, event.id);
3972
- })
3973
- })
3974
- );
3975
- }
3976
-
3977
- // src/components/ui/Banner.tsx
3978
- var import_react24 = require("react");
3979
- var import_jsx_runtime50 = require("react/jsx-runtime");
3980
- var typeClass = {
3981
- info: "ph-banner-info",
3982
- success: "ph-banner-success",
3983
- warning: "ph-banner-warning",
3984
- danger: "ph-banner-danger",
3985
- ai: "ph-banner-ai"
3986
- };
3987
- var Banner = (0, import_react24.forwardRef)(function Banner2(_a, ref) {
3988
- var _b = _a, {
3989
- type = "info",
3990
- onClose,
3991
- action,
3992
- hideIcon = false,
3993
- square = false,
3994
- icon,
3995
- className,
3996
- children
3997
- } = _b, props = __objRest(_b, [
3998
- "type",
3999
- "onClose",
4000
- "action",
4001
- "hideIcon",
4002
- "square",
4003
- "icon",
4004
- "className",
4005
- "children"
4006
- ]);
4007
- return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
4008
- "div",
4009
- __spreadProps(__spreadValues({
4010
- ref,
4011
- role: "alert",
4012
- className: cn(
4013
- "ph-banner",
4014
- typeClass[type],
4015
- square && "ph-banner--square",
4016
- className
4017
- )
4018
- }, props), {
4019
- children: /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "ph-banner__body", children: [
4020
- icon,
4021
- /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "ph-banner__content", children }),
4022
- action && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "ph-banner__action", children: action }),
4023
- onClose && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("button", { type: "button", onClick: onClose, className: "ph-banner__close", "aria-label": "Dismiss", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", children: /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("path", { d: "M4 4l8 8M12 4l-8 8" }) }) })
4024
- ] })
4025
- })
4026
- );
4027
- });
4028
- Banner.displayName = "Banner";
4029
-
4030
- // src/components/ui/Dialog.tsx
4031
- var import_react25 = require("react");
4032
- var import_jsx_runtime51 = require("react/jsx-runtime");
4033
- function Dialog2(_a) {
4034
- var _b = _a, {
4035
- isOpen: openProp,
4036
- onClose,
4037
- onConfirm,
4038
- confirmText = "Confirm",
4039
- cancelText = "Cancel",
4040
- confirmProps,
4041
- cancelProps,
4042
- children,
4043
- title
4044
- } = _b, modalProps = __objRest(_b, [
4045
- "isOpen",
4046
- "onClose",
4047
- "onConfirm",
4048
- "confirmText",
4049
- "cancelText",
4050
- "confirmProps",
4051
- "cancelProps",
4052
- "children",
4053
- "title"
4054
- ]);
4055
- const [loading, setLoading] = (0, import_react25.useState)(false);
4056
- const isOpen = openProp != null ? openProp : true;
4057
- const handleConfirm = async () => {
4058
- if (!onConfirm) return;
4059
- setLoading(true);
4060
- try {
4061
- await onConfirm();
4062
- } finally {
4063
- setLoading(false);
4064
- }
4065
- onClose == null ? void 0 : onClose();
4066
- };
4067
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
4068
- Modal,
4069
- __spreadProps(__spreadValues({
4070
- open: isOpen,
4071
- onClose,
4072
- title,
4073
- footer: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "flex justify-end gap-2", children: [
4074
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Button, __spreadProps(__spreadValues({ variant: "secondary" }, cancelProps), { onClick: onClose, children: cancelText })),
4075
- onConfirm && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
4076
- Button,
4077
- __spreadProps(__spreadValues({
4078
- variant: "primary",
4079
- loading
4080
- }, confirmProps), {
4081
- onClick: handleConfirm,
4082
- children: confirmText
4083
- })
4084
- )
4085
- ] })
4086
- }, modalProps), {
4087
- children
4088
- })
4089
- );
4090
- }
4091
- Dialog2.displayName = "Dialog";
4092
-
4093
- // src/components/ui/Divider.tsx
4094
- var import_jsx_runtime52 = require("react/jsx-runtime");
4095
- function Divider(_a) {
4096
- var _b = _a, {
4097
- vertical = false,
4098
- dashed = false,
4099
- thick = false,
4100
- label,
4101
- className
4102
- } = _b, props = __objRest(_b, [
4103
- "vertical",
4104
- "dashed",
4105
- "thick",
4106
- "label",
4107
- "className"
4108
- ]);
4109
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
4110
- "div",
4111
- __spreadProps(__spreadValues({
4112
- role: "separator",
4113
- "aria-orientation": vertical ? "vertical" : "horizontal",
4114
- className: cn(
4115
- "ph-divider",
4116
- vertical && "ph-divider--vertical",
4117
- thick && "ph-divider--thick",
4118
- dashed && "ph-divider--dashed",
4119
- !!label && "ph-divider--with-label",
4120
- !className && (vertical ? "mx-2 self-stretch" : "my-2"),
4121
- className
4122
- )
4123
- }, props), {
4124
- children: label && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "ph-divider__label", children: label })
4125
- })
4126
- );
4127
- }
4128
- Divider.displayName = "Divider";
4129
-
4130
- // src/components/ui/Tag.tsx
4131
- var import_react26 = require("react");
4132
- var import_jsx_runtime53 = require("react/jsx-runtime");
4133
- var typeClass2 = {
4134
- default: "ph-tag-default",
4135
- primary: "ph-tag-primary",
4136
- success: "ph-tag-success",
4137
- warning: "ph-tag-warning",
4138
- danger: "ph-tag-danger",
4139
- info: "ph-tag-info",
4140
- muted: "ph-tag-muted",
4141
- highlight: "ph-tag-highlight"
4142
- };
4143
- var Tag = (0, import_react26.forwardRef)(function Tag2(_a, ref) {
4144
- var _b = _a, {
4145
- type = "default",
4146
- size = "md",
4147
- icon,
4148
- closable = false,
4149
- onClose,
4150
- className,
4151
- children
4152
- } = _b, props = __objRest(_b, [
4153
- "type",
4154
- "size",
4155
- "icon",
4156
- "closable",
4157
- "onClose",
4158
- "className",
4159
- "children"
4160
- ]);
4161
- return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
4162
- "div",
4163
- __spreadProps(__spreadValues({
4164
- ref,
4165
- className: cn(
4166
- "ph-tag",
4167
- typeClass2[type],
4168
- size === "sm" && "ph-tag-sm",
4169
- className
4170
- )
4171
- }, props), {
4172
- children: [
4173
- icon && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: "ph-tag__icon", children: icon }),
4174
- /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: "ph-tag__text", children }),
4175
- closable && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
4176
- "button",
4177
- {
4178
- type: "button",
4179
- onClick: (e) => {
4180
- e.stopPropagation();
4181
- onClose == null ? void 0 : onClose();
4182
- },
4183
- className: "ph-tag__close",
4184
- "aria-label": "Remove",
4185
- children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("path", { d: "M3 3l6 6M9 3l-6 6" }) })
4186
- }
4187
- )
4188
- ]
4189
- })
4190
- );
4191
- });
4192
- Tag.displayName = "Tag";
4193
-
4194
- // src/components/ui/ProgressCircle.tsx
4195
- var import_jsx_runtime54 = require("react/jsx-runtime");
4196
- function ProgressCircle(_a) {
4197
- var _b = _a, {
4198
- progress,
4199
- size = 40,
4200
- strokeWidth: sw,
4201
- children,
4202
- className
4203
- } = _b, props = __objRest(_b, [
4204
- "progress",
4205
- "size",
4206
- "strokeWidth",
4207
- "children",
4208
- "className"
4209
- ]);
4210
- const stroke = sw != null ? sw : size * 0.08;
4211
- const radius = (size - stroke) / 2;
4212
- const circumference = 2 * Math.PI * radius;
4213
- const offset = circumference - Math.min(1, Math.max(0, progress)) * circumference;
4214
- return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
4215
- "span",
4216
- __spreadProps(__spreadValues({
4217
- className: cn("ph-progress-circle", className),
4218
- style: { width: size, height: size },
4219
- role: "progressbar",
4220
- "aria-valuenow": Math.round(progress * 100),
4221
- "aria-valuemin": 0,
4222
- "aria-valuemax": 100
4223
- }, props), {
4224
- children: [
4225
- /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("svg", { width: size, height: size, children: [
4226
- /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
4227
- "circle",
4228
- {
4229
- cx: size / 2,
4230
- cy: size / 2,
4231
- r: radius,
4232
- fill: "none",
4233
- stroke: "currentColor",
4234
- strokeWidth: stroke,
4235
- opacity: 0.15
4236
- }
4237
- ),
4238
- /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
4239
- "circle",
4240
- {
4241
- cx: size / 2,
4242
- cy: size / 2,
4243
- r: radius,
4244
- fill: "none",
4245
- stroke: "currentColor",
4246
- strokeWidth: stroke,
4247
- strokeDasharray: circumference,
4248
- strokeDashoffset: offset,
4249
- strokeLinecap: "round",
4250
- transform: `rotate(-90 ${size / 2} ${size / 2})`,
4251
- className: "ph-progress-circle__bar"
4252
- }
4253
- )
4254
- ] }),
4255
- children && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { className: "ph-progress-circle__content", children })
4256
- ]
4257
- })
4258
- );
4259
- }
4260
- ProgressCircle.displayName = "ProgressCircle";
4261
-
4262
- // src/components/ui/Row.tsx
4263
- var import_react27 = require("react");
4264
- var import_jsx_runtime55 = require("react/jsx-runtime");
4265
- var Row = (0, import_react27.forwardRef)(function Row2(_a, ref) {
4266
- var _b = _a, {
4267
- icon,
4268
- sideIcon,
4269
- status = "default",
4270
- fullWidth = false,
4271
- center = false,
4272
- size = "md",
4273
- className,
4274
- children
4275
- } = _b, props = __objRest(_b, [
4276
- "icon",
4277
- "sideIcon",
4278
- "status",
4279
- "fullWidth",
4280
- "center",
4281
- "size",
4282
- "className",
4283
- "children"
4284
- ]);
4285
- const symbolic = children === null || children === void 0 || children === false;
4286
- return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
4287
- "div",
4288
- __spreadProps(__spreadValues({
4289
- ref,
4290
- className: cn(
4291
- "ph-row",
4292
- status !== "default" && `ph-row--${status}`,
4293
- fullWidth && "ph-row--full-width",
4294
- center && "ph-row--center",
4295
- size === "sm" && "ph-row--sm",
4296
- size === "lg" && "ph-row--lg",
4297
- symbolic && "ph-row--symbolic",
4298
- className
4299
- )
4300
- }, props), {
4301
- children: /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "ph-row__main", children: [
4302
- icon && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: "ph-row__icon", children: icon }),
4303
- !symbolic && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "ph-row__content", children }),
4304
- sideIcon && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: "ph-row__side-icon", children: sideIcon })
4305
- ] })
4306
- })
4307
- );
4308
- });
4309
- Row.displayName = "Row";
4310
-
4311
- // src/components/ui/Widget.tsx
4312
- var import_jsx_runtime56 = require("react/jsx-runtime");
4313
- function Widget({ title, onClose, actions, children, className }) {
4314
- return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: cn("ph-widget", className), children: [
4315
- /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "ph-widget__header", children: [
4316
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: "ph-widget__title", children: title }),
4317
- actions,
4318
- onClose && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("button", { type: "button", onClick: onClose, className: "ph-widget__close", "aria-label": "Close", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("path", { d: "M3 3l8 8M11 3l-8 8" }) }) })
4319
- ] }),
4320
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "ph-widget__content", children })
4321
- ] });
4322
- }
4323
- Widget.displayName = "Widget";
4324
-
4325
- // src/components/ui/Lettermark.tsx
4326
- var import_react28 = require("react");
4327
- var import_jsx_runtime57 = require("react/jsx-runtime");
4328
- var Lettermark = (0, import_react28.forwardRef)(function Lettermark2(_a, ref) {
4329
- var _b = _a, {
4330
- name,
4331
- index,
4332
- outlined = false,
4333
- rounded = false,
4334
- size = "md",
4335
- className
4336
- } = _b, props = __objRest(_b, [
4337
- "name",
4338
- "index",
4339
- "outlined",
4340
- "rounded",
4341
- "size",
4342
- "className"
4343
- ]);
4344
- const letter = name ? typeof name === "number" ? String(Math.floor(name)) : String.fromCodePoint(name.codePointAt(0)).toLocaleUpperCase() : "?";
4345
- return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
4346
- "div",
4347
- __spreadProps(__spreadValues({
4348
- ref,
4349
- className: cn(
4350
- "ph-lettermark",
4351
- `ph-lettermark--${size}`,
4352
- typeof index === "number" && `ph-lettermark--v-${index % 8 + 1}`,
4353
- outlined && "ph-lettermark--outlined",
4354
- rounded && "ph-lettermark--rounded",
4355
- letter === "?" && "ph-lettermark--unknown",
4356
- className
4357
- ),
4358
- "aria-hidden": "true"
4359
- }, props), {
4360
- children: letter
4361
- })
4362
- );
4363
- });
4364
- Lettermark.displayName = "Lettermark";
4365
-
4366
- // src/components/ui/Splotch.tsx
4367
- var import_jsx_runtime58 = require("react/jsx-runtime");
4368
- var colorMap = {
4369
- purple: "ph-splotch--purple",
4370
- blue: "ph-splotch--blue",
4371
- green: "ph-splotch--green",
4372
- black: "ph-splotch--black",
4373
- white: "ph-splotch--white",
4374
- orange: "ph-splotch--orange",
4375
- red: "ph-splotch--red",
4376
- yellow: "ph-splotch--yellow"
4377
- };
4378
- function Splotch(_a) {
4379
- var _b = _a, { color, className } = _b, props = __objRest(_b, ["color", "className"]);
4380
- return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
4381
- "div",
4382
- __spreadProps(__spreadValues({
4383
- className: cn("ph-splotch", colorMap[color], className),
4384
- "aria-hidden": "true"
4385
- }, props), {
4386
- children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "ph-splotch__paint" })
4387
- })
4388
- );
4389
- }
4390
- Splotch.displayName = "Splotch";
4391
-
4392
- // src/components/ui/Popover.tsx
4393
- var import_react29 = require("react");
4394
- var import_jsx_runtime59 = require("react/jsx-runtime");
4395
- function Popover(_a) {
4396
- var _b = _a, {
4397
- trigger,
4398
- children,
4399
- open: controlledOpen,
4400
- onOpenChange,
4401
- placement = "bottom",
4402
- matchTriggerWidth = false,
4403
- padded = true,
4404
- className
4405
- } = _b, props = __objRest(_b, [
4406
- "trigger",
4407
- "children",
4408
- "open",
4409
- "onOpenChange",
4410
- "placement",
4411
- "matchTriggerWidth",
4412
- "padded",
4413
- "className"
4414
- ]);
4415
- var _a2;
4416
- const [internalOpen, setInternalOpen] = (0, import_react29.useState)(false);
4417
- const isOpen = controlledOpen != null ? controlledOpen : internalOpen;
4418
- const setOpen = onOpenChange != null ? onOpenChange : setInternalOpen;
4419
- const triggerRef = (0, import_react29.useRef)(null);
4420
- const panelRef = (0, import_react29.useRef)(null);
4421
- (0, import_react29.useEffect)(() => {
4422
- if (!isOpen) return;
4423
- const handleClick = (e) => {
4424
- if (triggerRef.current && !triggerRef.current.contains(e.target) && panelRef.current && !panelRef.current.contains(e.target)) {
4425
- setOpen(false);
4426
- }
4427
- };
4428
- document.addEventListener("mousedown", handleClick);
4429
- return () => document.removeEventListener("mousedown", handleClick);
4430
- }, [isOpen, setOpen]);
4431
- return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", __spreadProps(__spreadValues({ className: cn("ph-popover relative inline-flex", className) }, props), { children: [
4432
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
4433
- "div",
4434
- {
4435
- ref: triggerRef,
4436
- onClick: () => setOpen(!isOpen),
4437
- className: "ph-popover__trigger",
4438
- children: trigger
4439
- }
4440
- ),
4441
- isOpen && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
4442
- "div",
4443
- {
4444
- ref: panelRef,
4445
- className: cn(
4446
- "ph-popover__panel",
4447
- `ph-popover--${placement}`,
4448
- padded && "ph-popover__panel--padded",
4449
- matchTriggerWidth && "ph-popover__panel--match"
4450
- ),
4451
- style: matchTriggerWidth ? { width: (_a2 = triggerRef.current) == null ? void 0 : _a2.offsetWidth } : void 0,
4452
- children
4453
- }
4454
- )
4455
- ] }));
4456
- }
4457
- Popover.displayName = "Popover";
4458
-
4459
- // src/components/ui/LoadingBar.tsx
4460
- var import_jsx_runtime60 = require("react/jsx-runtime");
4461
- function LoadingBar(_a) {
4462
- var _b = _a, { active = true, className } = _b, props = __objRest(_b, ["active", "className"]);
4463
- return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
4464
- "div",
4465
- __spreadProps(__spreadValues({
4466
- className: cn(
4467
- "ph-loading-bar",
4468
- active && "ph-loading-bar--active",
4469
- className
4470
- ),
4471
- role: "progressbar",
4472
- "aria-label": "Loading"
4473
- }, props), {
4474
- children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "ph-loading-bar__fill" })
4475
- })
4476
- );
4477
- }
4478
- LoadingBar.displayName = "LoadingBar";
4479
-
4480
- // src/components/ui/Link.tsx
4481
- var import_react30 = require("react");
4482
- var import_jsx_runtime61 = require("react/jsx-runtime");
4483
- var Link = (0, import_react30.forwardRef)(function Link2(_a, ref) {
4484
- var _b = _a, {
4485
- className,
4486
- disabled = false,
4487
- children
4488
- } = _b, props = __objRest(_b, [
4489
- "className",
4490
- "disabled",
4491
- "children"
4492
- ]);
4493
- return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
4494
- "a",
4495
- __spreadProps(__spreadValues({
4496
- ref,
4497
- className: cn(
4498
- "ph-link",
4499
- disabled && "ph-link--disabled pointer-events-none opacity-50",
4500
- className
4501
- ),
4502
- tabIndex: disabled ? -1 : void 0,
4503
- "aria-disabled": disabled || void 0
4504
- }, props), {
4505
- children
4506
- })
4507
- );
4508
- });
4509
- Link.displayName = "Link";
4510
-
4511
- // src/components/ui/Spinner.tsx
4512
- var import_jsx_runtime62 = require("react/jsx-runtime");
4513
- function Spinner(_a) {
4514
- var _b = _a, { size = "sm", textColored = false, className } = _b, props = __objRest(_b, ["size", "textColored", "className"]);
4515
- return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
4516
- "span",
4517
- __spreadProps(__spreadValues({
4518
- className: cn(
4519
- "ph-spinner",
4520
- `ph-spinner--${size}`,
4521
- textColored && "ph-spinner--text-colored",
4522
- className
4523
- ),
4524
- role: "status",
4525
- "aria-label": "Loading"
4526
- }, props), {
4527
- children: /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("svg", { viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: "ph-spinner__svg", children: [
4528
- /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("circle", { cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "3", opacity: 0.2 }),
4529
- /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("path", { d: "M12 2a10 10 0 0 1 10 10", stroke: "currentColor", strokeWidth: "3", strokeLinecap: "round" })
4530
- ] })
4531
- })
4532
- );
4533
- }
4534
- Spinner.displayName = "Spinner";
4535
-
4536
- // src/components/ui/Snack.tsx
4537
- var import_react31 = require("react");
4538
- var import_jsx_runtime63 = require("react/jsx-runtime");
4539
- var Snack = (0, import_react31.forwardRef)(function Snack2(_a, ref) {
4540
- var _b = _a, {
4541
- type = "regular",
4542
- onClose,
4543
- wrap = false,
4544
- className,
4545
- children
4546
- } = _b, props = __objRest(_b, [
4547
- "type",
4548
- "onClose",
4549
- "wrap",
4550
- "className",
4551
- "children"
4552
- ]);
4553
- return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(
4554
- "span",
4555
- __spreadProps(__spreadValues({
4556
- ref,
4557
- className: cn(
4558
- "ph-snack",
4559
- type === "pill" && "ph-snack--pill",
4560
- !wrap && "truncate",
4561
- className
4562
- ),
4563
- title: typeof children === "string" ? children : void 0
4564
- }, props), {
4565
- children: [
4566
- /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("span", { className: "ph-snack__text", children }),
4567
- onClose && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
4568
- "button",
4569
- {
4570
- type: "button",
4571
- onClick: (e) => {
4572
- e.stopPropagation();
4573
- onClose();
4574
- },
4575
- className: "ph-snack__close",
4576
- "aria-label": "Remove",
4577
- children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("path", { d: "M3 3l6 6M9 3l-6 6" }) })
4578
- }
4579
- )
4580
- ]
4581
- })
4582
- );
4583
- });
4584
- Snack.displayName = "Snack";
4585
-
4586
- // src/components/ui/Combobox.tsx
4587
- var import_react32 = require("react");
4588
- var import_jsx_runtime64 = require("react/jsx-runtime");
4589
- function Combobox({
4590
- options,
4591
- value = [],
4592
- onChange,
4593
- placeholder = "Search...",
4594
- className,
4595
- disabled
4596
- }) {
4597
- const [open, setOpen] = (0, import_react32.useState)(false);
4598
- const [search, setSearch] = (0, import_react32.useState)("");
4599
- const inputRef = (0, import_react32.useRef)(null);
4600
- const containerRef = (0, import_react32.useRef)(null);
4601
- const filtered = options.filter(
4602
- (o) => o.label.toLowerCase().includes(search.toLowerCase())
4603
- );
4604
- const selectedSet = new Set(value);
4605
- const toggle = (val) => {
4606
- const next = selectedSet.has(val) ? value.filter((v) => v !== val) : [...value, val];
4607
- onChange == null ? void 0 : onChange(next);
4608
- };
4609
- (0, import_react32.useEffect)(() => {
4610
- if (!open) return;
4611
- const handle = (e) => {
4612
- if (containerRef.current && !containerRef.current.contains(e.target)) {
4613
- setOpen(false);
4614
- }
4615
- };
4616
- document.addEventListener("mousedown", handle);
4617
- return () => document.removeEventListener("mousedown", handle);
4618
- }, [open]);
4619
- return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("div", { ref: containerRef, className: cn("ph-combobox relative", className), children: [
4620
- /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("div", { className: "ph-combobox__input-wrap", children: [
4621
- value.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: "ph-combobox__chips", children: value.map((v) => {
4622
- var _a, _b;
4623
- const opt = options.find((o) => o.value === v);
4624
- return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("span", { className: "ph-combobox__chip", children: [
4625
- (_a = opt == null ? void 0 : opt.label) != null ? _a : v,
4626
- /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
4627
- "button",
4628
- {
4629
- type: "button",
4630
- onClick: () => toggle(v),
4631
- className: "ph-combobox__chip-remove",
4632
- "aria-label": `Remove ${(_b = opt == null ? void 0 : opt.label) != null ? _b : v}`,
4633
- children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("svg", { width: "10", height: "10", viewBox: "0 0 10 10", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("path", { d: "M2 2l6 6M8 2l-6 6" }) })
4634
- }
4635
- )
4636
- ] }, v);
4637
- }) }),
4638
- /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
4639
- "input",
4640
- {
4641
- ref: inputRef,
4642
- type: "text",
4643
- value: search,
4644
- onChange: (e) => {
4645
- setSearch(e.target.value);
4646
- setOpen(true);
4647
- },
4648
- onFocus: () => setOpen(true),
4649
- placeholder: value.length === 0 ? placeholder : "",
4650
- disabled,
4651
- className: "ph-combobox__input"
4652
- }
4653
- )
4654
- ] }),
4655
- open && filtered.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: "ph-combobox__dropdown", children: filtered.map((opt) => /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(
4656
- "button",
4657
- {
4658
- type: "button",
4659
- onClick: () => toggle(opt.value),
4660
- className: cn(
4661
- "ph-combobox__option",
4662
- selectedSet.has(opt.value) && "ph-combobox__option--selected"
4663
- ),
4664
- children: [
4665
- selectedSet.has(opt.value) && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", stroke: "currentColor", strokeWidth: "2.5", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("path", { d: "M2.5 6l2.5 2.5 4.5-5" }) }),
4666
- /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { children: opt.label })
4667
- ]
4668
- },
4669
- opt.value
4670
- )) })
4671
- ] });
4672
- }
4673
- Combobox.displayName = "Combobox";
4674
-
4675
- // src/components/ui/Autocomplete.tsx
4676
- var import_react33 = require("react");
4677
- var import_jsx_runtime65 = require("react/jsx-runtime");
4678
- function Autocomplete(_a) {
4679
- var _b = _a, {
4680
- options,
4681
- onSelect,
4682
- className,
4683
- value: controlledValue,
4684
- onChange,
4685
- placeholder = "Type to search..."
4686
- } = _b, inputProps = __objRest(_b, [
4687
- "options",
4688
- "onSelect",
4689
- "className",
4690
- "value",
4691
- "onChange",
4692
- "placeholder"
4693
- ]);
4694
- const [open, setOpen] = (0, import_react33.useState)(false);
4695
- const [search, setSearch] = (0, import_react33.useState)("");
4696
- const [activeIndex, setActiveIndex] = (0, import_react33.useState)(-1);
4697
- const containerRef = (0, import_react33.useRef)(null);
4698
- const inputRef = (0, import_react33.useRef)(null);
4699
- const listRef = (0, import_react33.useRef)(null);
4700
- const filtered = options.filter(
4701
- (o) => o.label.toLowerCase().includes(search.toLowerCase())
4702
- );
4703
- const handleSelect = (opt) => {
4704
- setSearch(opt.label);
4705
- setOpen(false);
4706
- onSelect == null ? void 0 : onSelect(opt);
4707
- };
4708
- (0, import_react33.useEffect)(() => {
4709
- if (!open) {
4710
- setActiveIndex(-1);
4711
- return;
4712
- }
4713
- const handle = (e) => {
4714
- if (containerRef.current && !containerRef.current.contains(e.target)) {
4715
- setOpen(false);
4716
- }
4717
- };
4718
- const handleKey = (e) => {
4719
- if (e.key === "ArrowDown") {
4720
- setActiveIndex((i) => Math.min(i + 1, filtered.length - 1));
4721
- e.preventDefault();
4722
- }
4723
- if (e.key === "ArrowUp") {
4724
- setActiveIndex((i) => Math.max(i - 1, 0));
4725
- e.preventDefault();
4726
- }
4727
- if (e.key === "Enter" && activeIndex >= 0) {
4728
- handleSelect(filtered[activeIndex]);
4729
- e.preventDefault();
4730
- }
4731
- if (e.key === "Escape") {
4732
- setOpen(false);
4733
- }
4734
- };
4735
- document.addEventListener("mousedown", handle);
4736
- document.addEventListener("keydown", handleKey);
4737
- return () => {
4738
- document.removeEventListener("mousedown", handle);
4739
- document.removeEventListener("keydown", handleKey);
4740
- };
4741
- }, [open, filtered, activeIndex]);
4742
- (0, import_react33.useEffect)(() => {
4743
- if (activeIndex >= 0 && listRef.current) {
4744
- const el = listRef.current.children[activeIndex];
4745
- el == null ? void 0 : el.scrollIntoView({ block: "nearest" });
4746
- }
4747
- }, [activeIndex]);
4748
- return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { ref: containerRef, className: cn("ph-autocomplete relative", className), children: [
4749
- /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
4750
- "input",
4751
- __spreadValues({
4752
- ref: inputRef,
4753
- type: "text",
4754
- value: search,
4755
- onChange: (e) => {
4756
- setSearch(e.target.value);
4757
- setOpen(true);
4758
- onChange == null ? void 0 : onChange(e);
4759
- },
4760
- onFocus: () => setOpen(true),
4761
- placeholder,
4762
- className: "ph-input w-full"
4763
- }, inputProps)
4764
- ),
4765
- open && filtered.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime65.jsx)("div", { ref: listRef, className: "ph-autocomplete__dropdown", role: "listbox", children: filtered.map((opt, i) => /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
4766
- "button",
4767
- {
4768
- type: "button",
4769
- role: "option",
4770
- "aria-selected": i === activeIndex,
4771
- onMouseDown: () => handleSelect(opt),
4772
- onMouseEnter: () => setActiveIndex(i),
4773
- className: cn(
4774
- "ph-autocomplete__option",
4775
- i === activeIndex && "ph-autocomplete__option--active"
4776
- ),
4777
- children: opt.label
4778
- },
4779
- opt.value
4780
- )) })
4781
- ] });
4782
- }
4783
- Autocomplete.displayName = "Autocomplete";
4784
-
4785
- // src/components/ui/ContextMenu.tsx
4786
- var import_react34 = require("react");
4787
- var import_jsx_runtime66 = require("react/jsx-runtime");
4788
- function ContextMenu(_a) {
4789
- var _b = _a, { items, children, className } = _b, props = __objRest(_b, ["items", "children", "className"]);
4790
- const [open, setOpen] = (0, import_react34.useState)(false);
4791
- const [pos, setPos] = (0, import_react34.useState)({ x: 0, y: 0 });
4792
- const menuRef = (0, import_react34.useRef)(null);
4793
- (0, import_react34.useEffect)(() => {
4794
- if (!open) return;
4795
- const handle = (e) => {
4796
- if (menuRef.current && !menuRef.current.contains(e.target)) {
4797
- setOpen(false);
4798
- }
4799
- };
4800
- const handleKey = (e) => {
4801
- if (e.key === "Escape") setOpen(false);
4802
- };
4803
- document.addEventListener("mousedown", handle);
4804
- document.addEventListener("keydown", handleKey);
4805
- return () => {
4806
- document.removeEventListener("mousedown", handle);
4807
- document.removeEventListener("keydown", handleKey);
4808
- };
4809
- }, [open]);
4810
- return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(
4811
- "div",
4812
- __spreadProps(__spreadValues({
4813
- className: cn("ph-context-menu", className),
4814
- onContextMenu: (e) => {
4815
- e.preventDefault();
4816
- setPos({ x: e.clientX, y: e.clientY });
4817
- setOpen(true);
4818
- }
4819
- }, props), {
4820
- children: [
4821
- children,
4822
- open && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
4823
- "div",
4824
- {
4825
- ref: menuRef,
4826
- className: "ph-context-menu__panel",
4827
- style: { left: pos.x, top: pos.y },
4828
- children: items.map(
4829
- (item, i) => item.separator ? /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: "ph-context-menu__separator" }, i) : /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(
4830
- "button",
4831
- {
4832
- type: "button",
4833
- disabled: item.disabled,
4834
- onClick: () => {
4835
- var _a2;
4836
- (_a2 = item.onClick) == null ? void 0 : _a2.call(item);
4837
- setOpen(false);
4838
- },
4839
- className: "ph-context-menu__item",
4840
- children: [
4841
- item.icon && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { className: "ph-context-menu__icon", children: item.icon }),
4842
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { children: item.label })
4843
- ]
4844
- },
4845
- i
4846
- )
4847
- )
4848
- }
4849
- )
4850
- ]
4851
- })
4852
- );
4853
- }
4854
- ContextMenu.displayName = "ContextMenu";
4855
-
4856
- // src/components/ui/Resizable.tsx
4857
- var import_react35 = require("react");
4858
- var import_jsx_runtime67 = require("react/jsx-runtime");
4859
- function Resizable(_a) {
4860
- var _b = _a, {
4861
- left,
4862
- right,
4863
- defaultLeftWidth = 50,
4864
- minLeftWidth = 20,
4865
- minRightWidth = 20,
4866
- className
4867
- } = _b, props = __objRest(_b, [
4868
- "left",
4869
- "right",
4870
- "defaultLeftWidth",
4871
- "minLeftWidth",
4872
- "minRightWidth",
4873
- "className"
4874
- ]);
4875
- const [leftPercent, setLeftPercent] = (0, import_react35.useState)(defaultLeftWidth);
4876
- const dragging = (0, import_react35.useRef)(false);
4877
- const containerRef = (0, import_react35.useRef)(null);
4878
- const handleMouseDown = (0, import_react35.useCallback)((e) => {
4879
- e.preventDefault();
4880
- dragging.current = true;
4881
- const startX = e.clientX;
4882
- const startPercent = leftPercent;
4883
- const handleMove = (ev) => {
4884
- if (!dragging.current || !containerRef.current) return;
4885
- const rect = containerRef.current.getBoundingClientRect();
4886
- const delta = (ev.clientX - startX) / rect.width * 100;
4887
- const newVal = Math.max(minLeftWidth, Math.min(100 - minRightWidth, startPercent + delta));
4888
- setLeftPercent(newVal);
4889
- };
4890
- const handleUp = () => {
4891
- dragging.current = false;
4892
- document.removeEventListener("mousemove", handleMove);
4893
- document.removeEventListener("mouseup", handleUp);
4894
- };
4895
- document.addEventListener("mousemove", handleMove);
4896
- document.addEventListener("mouseup", handleUp);
4897
- }, [leftPercent, minLeftWidth, minRightWidth]);
4898
- return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(
4899
- "div",
4900
- __spreadProps(__spreadValues({
4901
- ref: containerRef,
4902
- className: cn("ph-resizable flex overflow-hidden", className)
4903
- }, props), {
4904
- children: [
4905
- /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "ph-resizable__left overflow-auto", style: { width: `${leftPercent}%` }, children: left }),
4906
- /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
4907
- "div",
4908
- {
4909
- className: "ph-resizable__handle cursor-col-resize shrink-0",
4910
- onMouseDown: handleMouseDown
4911
- }
4912
- ),
4913
- /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "ph-resizable__right flex-1 overflow-auto", children: right })
4914
- ]
3438
+ children
4915
3439
  })
4916
3440
  );
4917
- }
4918
- Resizable.displayName = "Resizable";
3441
+ });
3442
+ Link.displayName = "Link";
4919
3443
 
4920
- // src/components/ui/ScrollArea.tsx
4921
- var import_react36 = require("react");
4922
- var import_jsx_runtime68 = require("react/jsx-runtime");
4923
- function ScrollArea(_a) {
4924
- var _b = _a, {
4925
- children,
4926
- orientation = "vertical",
4927
- className
4928
- } = _b, props = __objRest(_b, [
4929
- "children",
4930
- "orientation",
4931
- "className"
4932
- ]);
4933
- const viewportRef = (0, import_react36.useRef)(null);
4934
- const [showTop, setShowTop] = (0, import_react36.useState)(false);
4935
- const [showBottom, setShowBottom] = (0, import_react36.useState)(false);
4936
- (0, import_react36.useEffect)(() => {
4937
- const el = viewportRef.current;
4938
- if (!el) return;
4939
- const update = () => {
4940
- setShowTop(el.scrollTop > 4);
4941
- setShowBottom(el.scrollTop < el.scrollHeight - el.clientHeight - 4);
4942
- };
4943
- update();
4944
- el.addEventListener("scroll", update, { passive: true });
4945
- const ro = new ResizeObserver(update);
4946
- ro.observe(el);
4947
- return () => {
4948
- el.removeEventListener("scroll", update);
4949
- ro.disconnect();
4950
- };
4951
- }, []);
4952
- return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
4953
- "div",
3444
+ // src/components/ui/Spinner.tsx
3445
+ var import_jsx_runtime39 = require("react/jsx-runtime");
3446
+ function Spinner(_a) {
3447
+ var _b = _a, { size = "sm", textColored = false, className } = _b, props = __objRest(_b, ["size", "textColored", "className"]);
3448
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
3449
+ "span",
4954
3450
  __spreadProps(__spreadValues({
4955
3451
  className: cn(
4956
- "ph-scroll-area relative overflow-hidden",
4957
- orientation === "horizontal" && "overflow-x-auto",
4958
- orientation === "both" && "overflow-auto",
3452
+ "ph-spinner",
3453
+ `ph-spinner--${size}`,
3454
+ textColored && "ph-spinner--text-colored",
4959
3455
  className
4960
- )
4961
- }, props), {
4962
- children: [
4963
- showTop && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "ph-scroll-area__shadow-top" }),
4964
- /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { ref: viewportRef, className: "ph-scroll-area__viewport overflow-y-auto overscroll-contain", children }),
4965
- showBottom && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "ph-scroll-area__shadow-bottom" })
4966
- ]
4967
- })
4968
- );
4969
- }
4970
- ScrollArea.displayName = "ScrollArea";
4971
-
4972
- // src/components/ui/NumberField.tsx
4973
- var import_react37 = require("react");
4974
- var import_jsx_runtime69 = require("react/jsx-runtime");
4975
- function NumberField(_a) {
4976
- var _b = _a, {
4977
- value: controlledValue,
4978
- onChange,
4979
- min,
4980
- max,
4981
- step = 1,
4982
- label,
4983
- className,
4984
- disabled,
4985
- defaultValue
4986
- } = _b, inputProps = __objRest(_b, [
4987
- "value",
4988
- "onChange",
4989
- "min",
4990
- "max",
4991
- "step",
4992
- "label",
4993
- "className",
4994
- "disabled",
4995
- "defaultValue"
4996
- ]);
4997
- const [internal, setInternal] = (0, import_react37.useState)(controlledValue != null ? controlledValue : 0);
4998
- const value = controlledValue != null ? controlledValue : internal;
4999
- const set = (v) => {
5000
- const clamped = Math.max(min != null ? min : -Infinity, Math.min(max != null ? max : Infinity, v));
5001
- setInternal(clamped);
5002
- onChange == null ? void 0 : onChange(clamped);
5003
- };
5004
- return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: cn("ph-number-field", className), children: [
5005
- label && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("label", { className: "ph-label", children: label }),
5006
- /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "ph-number-field__control", children: [
5007
- /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
5008
- "button",
5009
- {
5010
- type: "button",
5011
- disabled: disabled || min !== void 0 && value <= min,
5012
- onClick: () => set(value - step),
5013
- className: "ph-number-field__btn",
5014
- "aria-label": "Decrease",
5015
- children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("svg", { width: "12", height: "2", viewBox: "0 0 12 2", fill: "currentColor", children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("rect", { y: "0", width: "12", height: "2", rx: "1" }) })
5016
- }
5017
- ),
5018
- /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
5019
- "input",
5020
- __spreadValues({
5021
- type: "number",
5022
- value,
5023
- onChange: (e) => set(Number(e.target.value)),
5024
- disabled,
5025
- min,
5026
- max,
5027
- step,
5028
- className: "ph-number-field__input"
5029
- }, inputProps)
5030
3456
  ),
5031
- /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
5032
- "button",
5033
- {
5034
- type: "button",
5035
- disabled: disabled || max !== void 0 && value >= max,
5036
- onClick: () => set(value + step),
5037
- className: "ph-number-field__btn",
5038
- "aria-label": "Increase",
5039
- children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("path", { d: "M6 2v8M2 6h8" }) })
5040
- }
5041
- )
5042
- ] })
5043
- ] });
5044
- }
5045
- NumberField.displayName = "NumberField";
5046
-
5047
- // src/components/ui/InputGroup.tsx
5048
- var import_jsx_runtime70 = require("react/jsx-runtime");
5049
- function InputGroup(_a) {
5050
- var _b = _a, { children, className } = _b, props = __objRest(_b, ["children", "className"]);
5051
- return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("div", __spreadProps(__spreadValues({ className: cn("ph-input-group", className) }, props), { children }));
5052
- }
5053
- InputGroup.displayName = "InputGroup";
5054
-
5055
- // src/components/ui/ButtonGroup.tsx
5056
- var import_jsx_runtime71 = require("react/jsx-runtime");
5057
- function ButtonGroup(_a) {
5058
- var _b = _a, { children, className } = _b, props = __objRest(_b, ["children", "className"]);
5059
- return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("div", __spreadProps(__spreadValues({ className: cn("ph-btn-group", className) }, props), { children }));
5060
- }
5061
- ButtonGroup.displayName = "ButtonGroup";
5062
-
5063
- // src/components/ui/Toggle.tsx
5064
- var import_react38 = require("react");
5065
- var import_jsx_runtime72 = require("react/jsx-runtime");
5066
- var ToggleButton = (0, import_react38.forwardRef)(function ToggleButton2(_a, ref) {
5067
- var _b = _a, {
5068
- pressed = false,
5069
- onPressedChange,
5070
- icon,
5071
- children,
5072
- className
5073
- } = _b, props = __objRest(_b, [
5074
- "pressed",
5075
- "onPressedChange",
5076
- "icon",
5077
- "children",
5078
- "className"
5079
- ]);
5080
- return /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(
5081
- "button",
5082
- __spreadProps(__spreadValues({
5083
- ref,
5084
- type: "button",
5085
- "aria-pressed": pressed,
5086
- onClick: () => onPressedChange == null ? void 0 : onPressedChange(!pressed),
5087
- className: cn(
5088
- "ph-toggle-btn",
5089
- pressed && "ph-toggle-btn--pressed",
5090
- className
5091
- )
3457
+ role: "status",
3458
+ "aria-label": "Loading"
5092
3459
  }, props), {
5093
- children: [
5094
- icon && /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("span", { className: "ph-toggle-btn__icon", children: icon }),
5095
- children
5096
- ]
5097
- })
5098
- );
5099
- });
5100
- ToggleButton.displayName = "ToggleButton";
5101
- function ToggleGroup({
5102
- type = "single",
5103
- value,
5104
- onValueChange,
5105
- children,
5106
- className
5107
- }) {
5108
- return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { className: cn("ph-toggle-group", className), role: "group", children });
5109
- }
5110
- ToggleGroup.displayName = "ToggleGroup";
5111
-
5112
- // src/components/ui/Menubar.tsx
5113
- var import_react39 = require("react");
5114
- var import_jsx_runtime73 = require("react/jsx-runtime");
5115
- function Menubar(_a) {
5116
- var _b = _a, { items, className } = _b, props = __objRest(_b, ["items", "className"]);
5117
- const [openIndex, setOpenIndex] = (0, import_react39.useState)(-1);
5118
- const barRef = (0, import_react39.useRef)(null);
5119
- (0, import_react39.useEffect)(() => {
5120
- if (openIndex < 0) return;
5121
- const handle = (e) => {
5122
- if (barRef.current && !barRef.current.contains(e.target)) {
5123
- setOpenIndex(-1);
5124
- }
5125
- };
5126
- document.addEventListener("mousedown", handle);
5127
- return () => document.removeEventListener("mousedown", handle);
5128
- }, [openIndex]);
5129
- return /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", __spreadProps(__spreadValues({ ref: barRef, className: cn("ph-menubar", className) }, props), { children: items.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "ph-menubar__item", children: [
5130
- /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
5131
- "button",
5132
- {
5133
- type: "button",
5134
- onClick: () => setOpenIndex(openIndex === i ? -1 : i),
5135
- className: cn("ph-menubar__trigger", openIndex === i && "ph-menubar__trigger--open"),
5136
- children: item.label
5137
- }
5138
- ),
5139
- openIndex === i && item.items && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "ph-menubar__dropdown", children: item.items.map(
5140
- (sub, j) => sub.separator ? /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "ph-menubar__separator" }, j) : /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
5141
- "button",
5142
- {
5143
- type: "button",
5144
- disabled: sub.disabled,
5145
- onClick: () => {
5146
- var _a2;
5147
- (_a2 = sub.onClick) == null ? void 0 : _a2.call(sub);
5148
- setOpenIndex(-1);
5149
- },
5150
- className: "ph-menubar__sub-item",
5151
- children: sub.label
5152
- },
5153
- j
5154
- )
5155
- ) })
5156
- ] }, i)) }));
5157
- }
5158
- Menubar.displayName = "Menubar";
5159
-
5160
- // src/components/ui/AlertDialog.tsx
5161
- var import_react40 = require("react");
5162
- var import_jsx_runtime74 = require("react/jsx-runtime");
5163
- function AlertDialog(_a) {
5164
- var _b = _a, {
5165
- isOpen: openProp,
5166
- onClose,
5167
- onConfirm,
5168
- confirmText = "Confirm",
5169
- cancelText = "Cancel",
5170
- confirmProps,
5171
- cancelProps,
5172
- children,
5173
- title
5174
- } = _b, modalProps = __objRest(_b, [
5175
- "isOpen",
5176
- "onClose",
5177
- "onConfirm",
5178
- "confirmText",
5179
- "cancelText",
5180
- "confirmProps",
5181
- "cancelProps",
5182
- "children",
5183
- "title"
5184
- ]);
5185
- const [loading, setLoading] = (0, import_react40.useState)(false);
5186
- const isOpen = openProp != null ? openProp : true;
5187
- const handleConfirm = async () => {
5188
- if (!onConfirm) return;
5189
- setLoading(true);
5190
- try {
5191
- await onConfirm();
5192
- } finally {
5193
- setLoading(false);
5194
- }
5195
- onClose == null ? void 0 : onClose();
5196
- };
5197
- return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
5198
- Modal,
5199
- __spreadProps(__spreadValues({
5200
- open: isOpen,
5201
- onClose,
5202
- title,
5203
- footer: /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: "flex justify-end gap-2", children: [
5204
- /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(Button, __spreadProps(__spreadValues({ variant: "secondary" }, cancelProps), { onClick: onClose, children: cancelText })),
5205
- onConfirm && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(Button, __spreadProps(__spreadValues({ variant: "primary", loading }, confirmProps), { onClick: handleConfirm, children: confirmText }))
3460
+ children: /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("svg", { viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: "ph-spinner__svg", children: [
3461
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("circle", { cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "3", opacity: 0.2 }),
3462
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("path", { d: "M12 2a10 10 0 0 1 10 10", stroke: "currentColor", strokeWidth: "3", strokeLinecap: "round" })
5206
3463
  ] })
5207
- }, modalProps), {
5208
- children
5209
3464
  })
5210
3465
  );
5211
3466
  }
5212
- AlertDialog.displayName = "AlertDialog";
3467
+ Spinner.displayName = "Spinner";
5213
3468
 
5214
3469
  // src/components/ui/Dot.tsx
5215
- var import_jsx_runtime75 = require("react/jsx-runtime");
5216
- var colorMap2 = {
3470
+ var import_jsx_runtime40 = require("react/jsx-runtime");
3471
+ var colorMap = {
5217
3472
  green: "bg-ph-success",
5218
3473
  yellow: "bg-ph-warning",
5219
3474
  red: "bg-ph-danger",
@@ -5222,13 +3477,13 @@ var colorMap2 = {
5222
3477
  };
5223
3478
  function Dot(_a) {
5224
3479
  var _b = _a, { color = "gray", size = "md", className } = _b, props = __objRest(_b, ["color", "size", "className"]);
5225
- return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
3480
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
5226
3481
  "span",
5227
3482
  __spreadValues({
5228
3483
  className: cn(
5229
3484
  "ph-dot inline-block shrink-0 rounded-full",
5230
3485
  size === "sm" ? "h-1.5 w-1.5" : "h-2.5 w-2.5",
5231
- colorMap2[color],
3486
+ colorMap[color],
5232
3487
  className
5233
3488
  ),
5234
3489
  "aria-hidden": "true"
@@ -5237,92 +3492,10 @@ function Dot(_a) {
5237
3492
  }
5238
3493
  Dot.displayName = "Dot";
5239
3494
 
5240
- // src/components/ui/Collapsible.tsx
5241
- var import_react41 = require("react");
5242
- var import_jsx_runtime76 = require("react/jsx-runtime");
5243
- function Collapsible(_a) {
5244
- var _b = _a, {
5245
- trigger,
5246
- open: controlledOpen,
5247
- onOpenChange,
5248
- children,
5249
- className
5250
- } = _b, props = __objRest(_b, [
5251
- "trigger",
5252
- "open",
5253
- "onOpenChange",
5254
- "children",
5255
- "className"
5256
- ]);
5257
- const [internalOpen, setInternalOpen] = (0, import_react41.useState)(false);
5258
- const isOpen = controlledOpen != null ? controlledOpen : internalOpen;
5259
- const setOpen = onOpenChange != null ? onOpenChange : setInternalOpen;
5260
- return /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", __spreadProps(__spreadValues({ className: cn("ph-collapsible", className) }, props), { children: [
5261
- /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(
5262
- "button",
5263
- {
5264
- type: "button",
5265
- onClick: () => setOpen(!isOpen),
5266
- className: "ph-collapsible__trigger",
5267
- "aria-expanded": isOpen,
5268
- children: [
5269
- /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
5270
- "svg",
5271
- {
5272
- className: cn("ph-collapsible__chevron", isOpen && "ph-collapsible__chevron--open"),
5273
- width: "14",
5274
- height: "14",
5275
- viewBox: "0 0 14 14",
5276
- fill: "none",
5277
- stroke: "currentColor",
5278
- strokeWidth: "2",
5279
- strokeLinecap: "round",
5280
- children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("path", { d: "M4 5l3 3 3-3" })
5281
- }
5282
- ),
5283
- trigger
5284
- ]
5285
- }
5286
- ),
5287
- isOpen && /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: "ph-collapsible__content", children })
5288
- ] }));
5289
- }
5290
- Collapsible.displayName = "Collapsible";
5291
-
5292
- // src/components/ui/Metric.tsx
5293
- var import_jsx_runtime77 = require("react/jsx-runtime");
5294
- function Metric(_a) {
5295
- var _b = _a, {
5296
- value,
5297
- label,
5298
- badge,
5299
- trend,
5300
- icon,
5301
- className
5302
- } = _b, props = __objRest(_b, [
5303
- "value",
5304
- "label",
5305
- "badge",
5306
- "trend",
5307
- "icon",
5308
- "className"
5309
- ]);
5310
- return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", __spreadProps(__spreadValues({ className: cn("ph-metric", className) }, props), { children: [
5311
- /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "ph-metric__header", children: [
5312
- icon && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { className: "ph-metric__icon", children: icon }),
5313
- /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { className: "ph-metric__label", children: label }),
5314
- badge && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { className: "ph-metric__badge", children: badge })
5315
- ] }),
5316
- /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "ph-metric__value", children: value }),
5317
- trend && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "ph-metric__trend", children: trend })
5318
- ] }));
5319
- }
5320
- Metric.displayName = "Metric";
5321
-
5322
3495
  // src/components/ui/Chip.tsx
5323
- var import_react42 = require("react");
5324
- var import_jsx_runtime78 = require("react/jsx-runtime");
5325
- var Chip = (0, import_react42.forwardRef)(function Chip2(_a, ref) {
3496
+ var import_react23 = require("react");
3497
+ var import_jsx_runtime41 = require("react/jsx-runtime");
3498
+ var Chip = (0, import_react23.forwardRef)(function Chip2(_a, ref) {
5326
3499
  var _b = _a, {
5327
3500
  selected = false,
5328
3501
  onRemove,
@@ -5341,18 +3514,18 @@ var Chip = (0, import_react42.forwardRef)(function Chip2(_a, ref) {
5341
3514
  );
5342
3515
  if (onRemove) {
5343
3516
  const removeLabel = typeof children === "string" ? `Remove ${children}` : "Remove";
5344
- return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("span", { className: chipClassName, children: [
5345
- /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
3517
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("span", { className: chipClassName, children: [
3518
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
5346
3519
  "button",
5347
3520
  __spreadProps(__spreadValues({
5348
3521
  ref,
5349
3522
  type: "button",
5350
3523
  className: "min-w-0 bg-transparent p-0 text-inherit"
5351
3524
  }, props), {
5352
- children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "ph-chip__text", children })
3525
+ children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "ph-chip__text", children })
5353
3526
  })
5354
3527
  ),
5355
- /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
3528
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
5356
3529
  "button",
5357
3530
  {
5358
3531
  type: "button",
@@ -5360,288 +3533,46 @@ var Chip = (0, import_react42.forwardRef)(function Chip2(_a, ref) {
5360
3533
  disabled: props.disabled,
5361
3534
  className: "ph-chip__remove",
5362
3535
  "aria-label": removeLabel,
5363
- children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("svg", { width: "10", height: "10", viewBox: "0 0 10 10", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("path", { d: "M2 2l6 6M8 2l-6 6" }) })
3536
+ children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("svg", { width: "10", height: "10", viewBox: "0 0 10 10", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("path", { d: "M2 2l6 6M8 2l-6 6" }) })
5364
3537
  }
5365
3538
  )
5366
3539
  ] });
5367
3540
  }
5368
- return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
3541
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
5369
3542
  "button",
5370
3543
  __spreadProps(__spreadValues({
5371
3544
  ref,
5372
3545
  type: "button",
5373
3546
  className: chipClassName
5374
3547
  }, props), {
5375
- children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "ph-chip__text", children })
3548
+ children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "ph-chip__text", children })
5376
3549
  })
5377
3550
  );
5378
3551
  });
5379
3552
  Chip.displayName = "Chip";
5380
-
5381
- // src/components/ui/DataTable.tsx
5382
- var import_react43 = require("react");
5383
- var import_jsx_runtime79 = require("react/jsx-runtime");
5384
- function DataTable({
5385
- columns,
5386
- data,
5387
- pageSize = 10,
5388
- searchable = false,
5389
- searchPlaceholder = "Search...",
5390
- className
5391
- }) {
5392
- const [search, setSearch] = (0, import_react43.useState)("");
5393
- const [sortKey, setSortKey] = (0, import_react43.useState)(null);
5394
- const [sortDir, setSortDir] = (0, import_react43.useState)("asc");
5395
- const [page, setPage] = (0, import_react43.useState)(0);
5396
- const filtered = (0, import_react43.useMemo)(() => {
5397
- let items = data;
5398
- if (search) {
5399
- const q = search.toLowerCase();
5400
- items = items.filter(
5401
- (item) => Object.values(item).some((v) => String(v).toLowerCase().includes(q))
5402
- );
5403
- }
5404
- if (sortKey) {
5405
- items = [...items].sort((a, b) => {
5406
- const av = a[sortKey];
5407
- const bv = b[sortKey];
5408
- const cmp = av < bv ? -1 : av > bv ? 1 : 0;
5409
- return sortDir === "asc" ? cmp : -cmp;
5410
- });
5411
- }
5412
- return items;
5413
- }, [data, search, sortKey, sortDir]);
5414
- const totalPages = Math.ceil(filtered.length / pageSize);
5415
- const paged = filtered.slice(page * pageSize, (page + 1) * pageSize);
5416
- const handleSort = (key) => {
5417
- if (sortKey === key) {
5418
- setSortDir((d) => d === "asc" ? "desc" : "asc");
5419
- } else {
5420
- setSortKey(key);
5421
- setSortDir("asc");
5422
- }
5423
- };
5424
- return /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: cn("ph-data-table", className), children: [
5425
- searchable && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: "ph-data-table__toolbar", children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
5426
- "input",
5427
- {
5428
- type: "text",
5429
- value: search,
5430
- onChange: (e) => {
5431
- setSearch(e.target.value);
5432
- setPage(0);
5433
- },
5434
- placeholder: searchPlaceholder,
5435
- className: "ph-input ph-input-sm"
5436
- }
5437
- ) }),
5438
- /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: "ph-table-wrap", children: /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("table", { className: "ph-table", children: [
5439
- /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("tr", { children: columns.map((col) => /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)(
5440
- "th",
5441
- {
5442
- className: cn(col.sortable && "cursor-pointer select-none", col.className),
5443
- onClick: () => col.sortable && handleSort(col.key),
5444
- children: [
5445
- col.label,
5446
- sortKey === col.key && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("span", { className: "ml-1 inline-block", children: sortDir === "asc" ? "\u2191" : "\u2193" })
5447
- ]
5448
- },
5449
- col.key
5450
- )) }) }),
5451
- /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("tbody", { children: [
5452
- paged.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("tr", { children: columns.map((col) => /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("td", { className: col.className, children: col.render ? col.render(item) : item[col.key] }, col.key)) }, i)),
5453
- paged.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("tr", { children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("td", { colSpan: columns.length, className: "text-center text-ph-mutedtext py-8", children: "No results" }) })
5454
- ] })
5455
- ] }) }),
5456
- totalPages > 1 && /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: "ph-data-table__pagination", children: [
5457
- /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("button", { disabled: page === 0, onClick: () => setPage((p) => p - 1), className: "ph-data-table__page-btn", children: "Previous" }),
5458
- /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("span", { className: "text-xs text-ph-mutedtext", children: [
5459
- "Page ",
5460
- page + 1,
5461
- " of ",
5462
- totalPages
5463
- ] }),
5464
- /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("button", { disabled: page >= totalPages - 1, onClick: () => setPage((p) => p + 1), className: "ph-data-table__page-btn", children: "Next" })
5465
- ] })
5466
- ] });
5467
- }
5468
- DataTable.displayName = "DataTable";
5469
-
5470
- // src/components/ui/DatePicker.tsx
5471
- var import_react44 = require("react");
5472
- var import_jsx_runtime80 = require("react/jsx-runtime");
5473
- var MONTHS = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
5474
- var DAYS = ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"];
5475
- function DatePicker(_a) {
5476
- var _b = _a, { value, onChange, className } = _b, props = __objRest(_b, ["value", "onChange", "className"]);
5477
- const [open, setOpen] = (0, import_react44.useState)(false);
5478
- const [viewDate, setViewDate] = (0, import_react44.useState)(value != null ? value : /* @__PURE__ */ new Date());
5479
- const selected = value;
5480
- const days = (0, import_react44.useMemo)(() => {
5481
- const year = viewDate.getFullYear();
5482
- const month = viewDate.getMonth();
5483
- const first = new Date(year, month, 1).getDay();
5484
- const last = new Date(year, month + 1, 0).getDate();
5485
- const prevLast = new Date(year, month, 0).getDate();
5486
- const cells = [];
5487
- for (let i = first - 1; i >= 0; i--) cells.push({ day: prevLast - i, month: "prev" });
5488
- for (let d = 1; d <= last; d++) cells.push({ day: d, month: "current" });
5489
- const remaining = 42 - cells.length;
5490
- for (let d = 1; d <= remaining; d++) cells.push({ day: d, month: "next" });
5491
- return cells;
5492
- }, [viewDate]);
5493
- const isSelected = (d, m) => {
5494
- if (!selected || m !== "current") return false;
5495
- const date = new Date(viewDate.getFullYear(), viewDate.getMonth(), d);
5496
- return date.toDateString() === selected.toDateString();
5497
- };
5498
- const selectDay = (d, m) => {
5499
- const month = m === "prev" ? viewDate.getMonth() - 1 : m === "next" ? viewDate.getMonth() + 1 : viewDate.getMonth();
5500
- const year = month < 0 ? viewDate.getFullYear() - 1 : month > 11 ? viewDate.getFullYear() + 1 : viewDate.getFullYear();
5501
- const adjustedMonth = (month % 12 + 12) % 12;
5502
- const date = new Date(year, adjustedMonth, d);
5503
- onChange == null ? void 0 : onChange(date);
5504
- setOpen(false);
5505
- };
5506
- const nav = (delta) => setViewDate(new Date(viewDate.getFullYear(), viewDate.getMonth() + delta, 1));
5507
- return /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: cn("ph-datepicker relative", className), children: [
5508
- /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
5509
- "input",
5510
- __spreadValues({
5511
- type: "text",
5512
- readOnly: true,
5513
- value: selected ? `${MONTHS[selected.getMonth()]} ${selected.getDate()}, ${selected.getFullYear()}` : "",
5514
- onFocus: () => setOpen(true),
5515
- placeholder: "Pick a date",
5516
- className: "ph-input w-full cursor-pointer"
5517
- }, props)
5518
- ),
5519
- open && /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "ph-datepicker__dropdown", children: [
5520
- /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "ph-datepicker__nav", children: [
5521
- /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("button", { type: "button", onClick: () => nav(-1), className: "ph-datepicker__nav-btn", "aria-label": "Previous month", children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("path", { d: "M7 3L4 6l3 3" }) }) }),
5522
- /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("span", { className: "ph-datepicker__nav-label", children: [
5523
- MONTHS[viewDate.getMonth()],
5524
- " ",
5525
- viewDate.getFullYear()
5526
- ] }),
5527
- /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("button", { type: "button", onClick: () => nav(1), className: "ph-datepicker__nav-btn", "aria-label": "Next month", children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("path", { d: "M5 3l3 3-3 3" }) }) })
5528
- ] }),
5529
- /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "ph-datepicker__grid", children: [
5530
- DAYS.map((d) => /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "ph-datepicker__day-header", children: d }, d)),
5531
- days.map((d, i) => /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
5532
- "button",
5533
- {
5534
- type: "button",
5535
- disabled: d.month !== "current",
5536
- onClick: () => selectDay(d.day, d.month),
5537
- className: cn(
5538
- "ph-datepicker__day",
5539
- d.month !== "current" && "ph-datepicker__day--other",
5540
- isSelected(d.day, d.month) && "ph-datepicker__day--selected"
5541
- ),
5542
- children: d.day
5543
- },
5544
- i
5545
- ))
5546
- ] })
5547
- ] })
5548
- ] });
5549
- }
5550
- DatePicker.displayName = "DatePicker";
5551
-
5552
- // src/components/ui/AppLayout.tsx
5553
- var import_jsx_runtime81 = require("react/jsx-runtime");
5554
- function AppLayout({ sidebar, children, sidebarWidth = 240, className }) {
5555
- return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(
5556
- "div",
5557
- {
5558
- className: cn("ph-app-layout grid min-h-screen", className),
5559
- style: { gridTemplateColumns: `${sidebarWidth}px minmax(0, 1fr)` },
5560
- children: [
5561
- /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("aside", { className: "ph-app-layout__sidebar border-r border-ph-border bg-ph-surface overflow-y-auto", children: sidebar }),
5562
- /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("main", { className: "ph-app-layout__content min-w-0 overflow-y-auto bg-ph-canvas", children })
5563
- ]
5564
- }
5565
- );
5566
- }
5567
-
5568
- // src/components/ui/Sidebar.tsx
5569
- var import_jsx_runtime82 = require("react/jsx-runtime");
5570
- function Sidebar({ groups, className, header, footer, children, collapsed = false, onCollapse }) {
5571
- return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("nav", { className: cn("ph-sidebar flex flex-col h-full", collapsed && "ph-sidebar--collapsed", className), children: [
5572
- header && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "ph-sidebar__header px-3 py-3 border-b border-ph-border-subtle", children: header }),
5573
- /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "ph-sidebar__body flex-1 overflow-y-auto px-2 py-3 space-y-5", children: groups.map((group) => {
5574
- var _a;
5575
- return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: "ph-sidebar__group", children: [
5576
- group.label && !collapsed && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("h3", { className: "ph-sidebar__group-label px-2 mb-1 text-[10px] font-semibold uppercase tracking-wider text-ph-mutedtext", children: group.label }),
5577
- /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "ph-sidebar__items space-y-0.5", children: group.items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime82.jsx)(SidebarItem, __spreadProps(__spreadValues({}, item), { collapsed }), item.label)) })
5578
- ] }, (_a = group.label) != null ? _a : "default");
5579
- }) }),
5580
- children,
5581
- footer && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "ph-sidebar__footer px-3 py-3 border-t border-ph-border-subtle", children: footer })
5582
- ] });
5583
- }
5584
- function SidebarItem({ label, icon, badge, active, href, onClick, collapsed }) {
5585
- const Comp = onClick ? "button" : "a";
5586
- return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(
5587
- Comp,
5588
- {
5589
- type: onClick ? "button" : void 0,
5590
- href: onClick ? void 0 : href,
5591
- onClick,
5592
- className: cn(
5593
- "ph-sidebar__item flex items-center gap-2.5 w-full rounded-md px-2.5 py-2 text-sm text-left transition",
5594
- active ? "bg-ph-selected-bg text-ph-selected-text font-medium" : "text-ph-subtle hover:bg-ph-muted hover:text-ph-ink",
5595
- collapsed && "justify-center px-2"
5596
- ),
5597
- title: collapsed ? label : void 0,
5598
- children: [
5599
- icon && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("span", { className: cn("ph-sidebar__item-icon shrink-0 flex items-center justify-center", collapsed ? "w-5 h-5" : "w-4 h-4"), children: icon }),
5600
- !collapsed && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("span", { className: "ph-sidebar__item-label truncate flex-1", children: label }),
5601
- !collapsed && badge && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("span", { className: "ph-sidebar__item-badge shrink-0", children: badge })
5602
- ]
5603
- }
5604
- );
5605
- }
5606
- Sidebar.displayName = "Sidebar";
5607
3553
  // Annotate the CommonJS export names for ESM import in node:
5608
3554
  0 && (module.exports = {
5609
3555
  Accordion,
5610
3556
  Alert,
5611
- AlertDialog,
5612
- AppLayout,
5613
3557
  AuthCard,
5614
3558
  AuthDivider,
5615
3559
  AuthLayout,
5616
- Autocomplete,
5617
3560
  Avatar,
5618
3561
  AvatarGroup,
5619
3562
  Badge,
5620
- Banner,
5621
- Breadcrumbs,
5622
3563
  Button,
5623
3564
  ButtonChrome,
5624
- ButtonGroup,
5625
3565
  Calendar,
5626
3566
  Caption,
5627
3567
  Card,
5628
- ChatBubble,
5629
3568
  Checkbox,
5630
3569
  Chip,
5631
3570
  CodeBlock,
5632
- Collapsible,
5633
3571
  CollapsibleSection,
5634
- Combobox,
5635
3572
  CommandPalette,
5636
3573
  ComponentDocs,
5637
- ContextMenu,
5638
- DataTable,
5639
- DatePicker,
5640
- Dialog,
5641
3574
  Display,
5642
- Divider,
5643
3575
  Dot,
5644
- Drawer,
5645
3576
  DropdownButton,
5646
3577
  DropdownItem,
5647
3578
  DropdownMenu,
@@ -5659,69 +3590,41 @@ Sidebar.displayName = "Sidebar";
5659
3590
  H3,
5660
3591
  H4,
5661
3592
  H5,
5662
- HoverCard,
5663
3593
  Icon,
5664
3594
  IconByName,
5665
- Indicator,
5666
3595
  Input,
5667
- InputGroup,
5668
3596
  Kbd,
5669
3597
  Label,
5670
3598
  Lead,
5671
- Lettermark,
5672
3599
  Link,
5673
3600
  Loader,
5674
- LoadingBar,
5675
3601
  LoadingState,
5676
- Menubar,
5677
- Metric,
5678
3602
  Modal,
5679
3603
  Mono,
5680
- NumberField,
5681
3604
  Overline,
5682
3605
  P,
5683
- Pagination,
5684
3606
  Panel,
5685
- Popover,
5686
3607
  Progress,
5687
- ProgressCircle,
5688
3608
  Radio,
5689
3609
  Range,
5690
- Rating,
5691
- Resizable,
5692
- Row,
5693
- ScrollArea,
5694
3610
  SearchGroup,
5695
3611
  SearchInput,
3612
+ SectionTitle,
5696
3613
  SegmentedControl,
5697
3614
  Select,
5698
3615
  SettingsLayout,
5699
3616
  SettingsNav,
5700
3617
  ShowcaseWrapper,
5701
- Sidebar,
5702
3618
  Skeleton,
5703
3619
  Small,
5704
- Snack,
5705
3620
  SortMenu,
5706
3621
  Spinner,
5707
- Splotch,
5708
3622
  Stat,
5709
- Stepper,
5710
3623
  Table,
5711
- Tabs,
5712
- Tag,
5713
- Terminal,
5714
3624
  Textarea,
5715
3625
  ThemeDomSync,
5716
- ThemeManager,
5717
3626
  ThemeSwitcher,
5718
- Timeline,
5719
- Toast,
5720
- ToastStack,
5721
3627
  Toggle,
5722
- ToggleButton,
5723
- ToggleGroup,
5724
3628
  Tooltip,
5725
- TooltipProvider,
5726
- Widget
3629
+ TooltipProvider
5727
3630
  });