@xenide-io/the-old-ui-theme 0.3.0 → 0.3.2

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 (89) hide show
  1. package/dist/chunk-5HSOBJ4F.mjs +5968 -0
  2. package/dist/{index-D1RTT2Ap.d.mts → index-BgG8Homu.d.mts} +419 -2
  3. package/dist/{index-D1RTT2Ap.d.ts → index-BgG8Homu.d.ts} +419 -2
  4. package/dist/index.d.mts +198 -95
  5. package/dist/index.d.ts +198 -95
  6. package/dist/index.js +2995 -1136
  7. package/dist/index.mjs +629 -735
  8. package/dist/ui.d.mts +1 -1
  9. package/dist/ui.d.ts +1 -1
  10. package/dist/ui.js +1986 -156
  11. package/dist/ui.mjs +76 -3
  12. package/package.json +4 -14
  13. package/src/app/globals.css +976 -2
  14. package/src/components/charts/index.ts +9 -8
  15. package/src/components/charts/quill/BarChart.tsx +85 -0
  16. package/src/components/charts/quill/FunnelChart.tsx +49 -0
  17. package/src/components/charts/quill/InsightShell.tsx +27 -0
  18. package/src/components/charts/quill/MetricCard.tsx +44 -0
  19. package/src/components/charts/quill/PieChart.tsx +81 -0
  20. package/src/components/charts/quill/Sparkline.tsx +57 -0
  21. package/src/components/charts/quill/TimeSeriesLineChart.tsx +62 -0
  22. package/src/components/charts/quill/index.ts +9 -0
  23. package/src/components/icons/icons.tsx +2 -0
  24. package/src/components/icons/index.ts +3 -0
  25. package/src/components/icons/lemon-brand-icons.tsx +16 -0
  26. package/src/components/icons/lemon-category-icons.tsx +72 -0
  27. package/src/components/icons/lemon-icons.tsx +57 -0
  28. package/src/components/sections/IconShowcase.tsx +110 -7
  29. package/src/components/sections/NewComponentsShowcase.tsx +1052 -0
  30. package/src/components/sections/ProductLayoutsShowcase.tsx +57 -117
  31. package/src/components/sections/QuillChartShowcase.tsx +92 -0
  32. package/src/components/sections/QuillDashboardShowcase.tsx +149 -0
  33. package/src/components/sections/SidebarShowcase.tsx +152 -0
  34. package/src/components/sections/TableShowcase.tsx +2 -0
  35. package/src/components/sections/TooltipShowcase.tsx +19 -25
  36. package/src/components/ui/AlertDialog.tsx +62 -0
  37. package/src/components/ui/AppLayout.tsx +27 -0
  38. package/src/components/ui/Autocomplete.tsx +106 -0
  39. package/src/components/ui/Banner.tsx +63 -0
  40. package/src/components/ui/ButtonGroup.tsx +16 -0
  41. package/src/components/ui/Chip.tsx +46 -0
  42. package/src/components/ui/Collapsible.tsx +46 -0
  43. package/src/components/ui/Combobox.tsx +119 -0
  44. package/src/components/ui/ContextMenu.tsx +81 -0
  45. package/src/components/ui/DataTable.tsx +133 -0
  46. package/src/components/ui/DatePicker.tsx +96 -0
  47. package/src/components/ui/Dialog.tsx +75 -0
  48. package/src/components/ui/Divider.tsx +39 -0
  49. package/src/components/ui/Dot.tsx +32 -0
  50. package/src/components/ui/InputGroup.tsx +16 -0
  51. package/src/components/ui/Lettermark.tsx +47 -0
  52. package/src/components/ui/Link.tsx +32 -0
  53. package/src/components/ui/LoadingBar.tsx +25 -0
  54. package/src/components/ui/Menubar.tsx +66 -0
  55. package/src/components/ui/Metric.tsx +34 -0
  56. package/src/components/ui/NumberField.tsx +76 -0
  57. package/src/components/ui/Popover.tsx +73 -0
  58. package/src/components/ui/ProgressCircle.tsx +63 -0
  59. package/src/components/ui/Resizable.tsx +71 -0
  60. package/src/components/ui/Row.tsx +51 -0
  61. package/src/components/ui/ScrollArea.tsx +54 -0
  62. package/src/components/ui/Sidebar.tsx +77 -0
  63. package/src/components/ui/Snack.tsx +48 -0
  64. package/src/components/ui/Spinner.tsx +30 -0
  65. package/src/components/ui/Splotch.tsx +33 -0
  66. package/src/components/ui/Table.tsx +2 -0
  67. package/src/components/ui/Tag.tsx +65 -0
  68. package/src/components/ui/Toggle.tsx +62 -0
  69. package/src/components/ui/Tooltip.test.tsx +58 -0
  70. package/src/components/ui/Tooltip.tsx +211 -0
  71. package/src/components/ui/Widget.tsx +31 -0
  72. package/src/components/ui/index.ts +275 -21
  73. package/dist/chunk-FDMD3IIN.mjs +0 -3831
  74. package/src/components/charts/ph-insight-charts.tsx +0 -162
  75. package/src/components/dashboard/DashboardFiltersBar.tsx +0 -19
  76. package/src/components/dashboard/DashboardGrid.tsx +0 -23
  77. package/src/components/dashboard/DashboardInsightPlaceholder.tsx +0 -37
  78. package/src/components/dashboard/DashboardKpiCard.tsx +0 -25
  79. package/src/components/dashboard/DashboardToolbar.tsx +0 -23
  80. package/src/components/dashboard/DashboardWell.tsx +0 -10
  81. package/src/components/dashboard/InsightMiniCard.tsx +0 -26
  82. package/src/components/dashboard/InsightShell.tsx +0 -37
  83. package/src/components/dashboard/InsightShellHeader.tsx +0 -22
  84. package/src/components/dashboard/MiniTrendBars.tsx +0 -51
  85. package/src/components/dashboard/index.ts +0 -31
  86. package/src/components/dashboard/types.ts +0 -9
  87. package/src/components/sections/ChartShowcase.tsx +0 -190
  88. package/src/components/sections/DashboardShowcase.tsx +0 -191
  89. package/src/components/sections/StatShowcase.tsx +0 -129
package/dist/ui.js CHANGED
@@ -1,4 +1,5 @@
1
1
  "use strict";
2
+ "use client";
2
3
  var __create = Object.create;
3
4
  var __defProp = Object.defineProperty;
4
5
  var __defProps = Object.defineProperties;
@@ -61,25 +62,39 @@ var ui_exports = {};
61
62
  __export(ui_exports, {
62
63
  Accordion: () => Accordion,
63
64
  Alert: () => Alert,
65
+ AlertDialog: () => AlertDialog,
66
+ AppLayout: () => AppLayout,
64
67
  AuthCard: () => AuthCard,
65
68
  AuthDivider: () => AuthDivider,
66
69
  AuthLayout: () => AuthLayout,
70
+ Autocomplete: () => Autocomplete,
67
71
  Avatar: () => Avatar,
68
72
  AvatarGroup: () => AvatarGroup,
69
73
  Badge: () => Badge,
74
+ Banner: () => Banner,
70
75
  Breadcrumbs: () => Breadcrumbs,
71
76
  Button: () => Button,
72
77
  ButtonChrome: () => ButtonChrome,
78
+ ButtonGroup: () => ButtonGroup,
73
79
  Calendar: () => Calendar,
74
80
  Caption: () => Caption,
75
81
  Card: () => Card,
76
82
  ChatBubble: () => ChatBubble,
77
83
  Checkbox: () => Checkbox,
84
+ Chip: () => Chip,
78
85
  CodeBlock: () => CodeBlock,
86
+ Collapsible: () => Collapsible,
79
87
  CollapsibleSection: () => CollapsibleSection,
88
+ Combobox: () => Combobox,
80
89
  CommandPalette: () => CommandPalette,
81
90
  ComponentDocs: () => ComponentDocs,
91
+ ContextMenu: () => ContextMenu,
92
+ DataTable: () => DataTable,
93
+ DatePicker: () => DatePicker,
94
+ Dialog: () => Dialog2,
82
95
  Display: () => Display,
96
+ Divider: () => Divider,
97
+ Dot: () => Dot,
83
98
  Drawer: () => Drawer,
84
99
  DropdownButton: () => DropdownButton,
85
100
  DropdownItem: () => DropdownItem,
@@ -103,21 +118,33 @@ __export(ui_exports, {
103
118
  IconByName: () => IconByName,
104
119
  Indicator: () => Indicator,
105
120
  Input: () => Input,
121
+ InputGroup: () => InputGroup,
106
122
  Kbd: () => Kbd,
107
123
  Label: () => Label,
108
124
  Lead: () => Lead,
125
+ Lettermark: () => Lettermark,
126
+ Link: () => Link,
109
127
  Loader: () => Loader,
128
+ LoadingBar: () => LoadingBar,
110
129
  LoadingState: () => LoadingState,
130
+ Menubar: () => Menubar,
131
+ Metric: () => Metric,
111
132
  Modal: () => Modal,
112
133
  Mono: () => Mono,
134
+ NumberField: () => NumberField,
113
135
  Overline: () => Overline,
114
136
  P: () => P,
115
137
  Pagination: () => Pagination,
116
138
  Panel: () => Panel,
139
+ Popover: () => Popover,
117
140
  Progress: () => Progress,
141
+ ProgressCircle: () => ProgressCircle,
118
142
  Radio: () => Radio,
119
143
  Range: () => Range,
120
144
  Rating: () => Rating,
145
+ Resizable: () => Resizable,
146
+ Row: () => Row,
147
+ ScrollArea: () => ScrollArea,
121
148
  SearchGroup: () => SearchGroup,
122
149
  SearchInput: () => SearchInput,
123
150
  SegmentedControl: () => SegmentedControl,
@@ -125,13 +152,18 @@ __export(ui_exports, {
125
152
  SettingsLayout: () => SettingsLayout,
126
153
  SettingsNav: () => SettingsNav,
127
154
  ShowcaseWrapper: () => ShowcaseWrapper,
155
+ Sidebar: () => Sidebar,
128
156
  Skeleton: () => Skeleton,
129
157
  Small: () => Small,
158
+ Snack: () => Snack,
130
159
  SortMenu: () => SortMenu,
160
+ Spinner: () => Spinner,
161
+ Splotch: () => Splotch,
131
162
  Stat: () => Stat,
132
163
  Stepper: () => Stepper,
133
164
  Table: () => Table,
134
165
  Tabs: () => Tabs,
166
+ Tag: () => Tag,
135
167
  Terminal: () => Terminal,
136
168
  Textarea: () => Textarea,
137
169
  ThemeDomSync: () => ThemeDomSync,
@@ -140,7 +172,12 @@ __export(ui_exports, {
140
172
  Timeline: () => Timeline,
141
173
  Toast: () => Toast,
142
174
  ToastStack: () => ToastStack,
143
- Toggle: () => Toggle
175
+ Toggle: () => Toggle,
176
+ ToggleButton: () => ToggleButton,
177
+ ToggleGroup: () => ToggleGroup,
178
+ Tooltip: () => Tooltip,
179
+ TooltipProvider: () => TooltipProvider,
180
+ Widget: () => Widget
144
181
  });
145
182
  module.exports = __toCommonJS(ui_exports);
146
183
 
@@ -2965,10 +3002,151 @@ function HoverCard({ trigger, children, className }) {
2965
3002
  );
2966
3003
  }
2967
3004
 
2968
- // src/components/ui/EmptyState.tsx
3005
+ // src/components/ui/Tooltip.tsx
3006
+ var import_react20 = require("react");
3007
+ var import_react_dom = require("react-dom");
2969
3008
  var import_jsx_runtime34 = require("react/jsx-runtime");
3009
+ var TooltipDelayContext = (0, import_react20.createContext)(0);
3010
+ function TooltipProvider({
3011
+ children,
3012
+ delayDuration = 0
3013
+ }) {
3014
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(TooltipDelayContext.Provider, { value: delayDuration, children });
3015
+ }
3016
+ function tooltipPosition(trigger, side, align, offset) {
3017
+ const horizontal = align === "start" ? trigger.left : align === "end" ? trigger.right : trigger.left + trigger.width / 2;
3018
+ const vertical = align === "start" ? trigger.top : align === "end" ? trigger.bottom : trigger.top + trigger.height / 2;
3019
+ if (side === "top")
3020
+ return {
3021
+ left: horizontal,
3022
+ top: trigger.top - offset,
3023
+ transform: "translate(-50%, -100%)"
3024
+ };
3025
+ if (side === "bottom")
3026
+ return {
3027
+ left: horizontal,
3028
+ top: trigger.bottom + offset,
3029
+ transform: "translate(-50%, 0)"
3030
+ };
3031
+ if (side === "left")
3032
+ return {
3033
+ left: trigger.left - offset,
3034
+ top: vertical,
3035
+ transform: "translate(-100%, -50%)"
3036
+ };
3037
+ return {
3038
+ left: trigger.right + offset,
3039
+ top: vertical,
3040
+ transform: "translate(0, -50%)"
3041
+ };
3042
+ }
3043
+ function Tooltip({
3044
+ content,
3045
+ children,
3046
+ side = "top",
3047
+ align = "center",
3048
+ sideOffset = 7,
3049
+ className,
3050
+ open,
3051
+ defaultOpen = false,
3052
+ onOpenChange,
3053
+ delayDuration
3054
+ }) {
3055
+ const providerDelay = (0, import_react20.useContext)(TooltipDelayContext);
3056
+ const generatedId = (0, import_react20.useId)().replace(/:/g, "");
3057
+ const triggerRef = (0, import_react20.useRef)(null);
3058
+ const timerRef = (0, import_react20.useRef)(null);
3059
+ const [internalOpen, setInternalOpen] = (0, import_react20.useState)(defaultOpen);
3060
+ const [position, setPosition] = (0, import_react20.useState)(null);
3061
+ const isOpen = open != null ? open : internalOpen;
3062
+ const triggerId = children.props.id;
3063
+ const tooltipId = triggerId ? `${triggerId}-tooltip` : `ph-tooltip-${generatedId}`;
3064
+ function setOpen(next) {
3065
+ if (open === void 0) setInternalOpen(next);
3066
+ onOpenChange == null ? void 0 : onOpenChange(next);
3067
+ }
3068
+ function clearTimer() {
3069
+ if (timerRef.current) clearTimeout(timerRef.current);
3070
+ timerRef.current = null;
3071
+ }
3072
+ function updatePosition() {
3073
+ if (!triggerRef.current) return;
3074
+ setPosition(
3075
+ tooltipPosition(
3076
+ triggerRef.current.getBoundingClientRect(),
3077
+ side,
3078
+ align,
3079
+ sideOffset
3080
+ )
3081
+ );
3082
+ }
3083
+ function show(immediate) {
3084
+ clearTimer();
3085
+ updatePosition();
3086
+ const delay = immediate ? 0 : delayDuration != null ? delayDuration : providerDelay;
3087
+ if (!delay) setOpen(true);
3088
+ else timerRef.current = setTimeout(() => setOpen(true), delay);
3089
+ }
3090
+ function hide() {
3091
+ clearTimer();
3092
+ setOpen(false);
3093
+ }
3094
+ (0, import_react20.useEffect)(() => {
3095
+ if (!isOpen) return;
3096
+ const reposition = () => updatePosition();
3097
+ window.addEventListener("resize", reposition);
3098
+ window.addEventListener("scroll", reposition, true);
3099
+ return () => {
3100
+ window.removeEventListener("resize", reposition);
3101
+ window.removeEventListener("scroll", reposition, true);
3102
+ };
3103
+ });
3104
+ (0, import_react20.useEffect)(() => () => clearTimer(), []);
3105
+ const describedBy = [children.props["aria-describedby"], tooltipId].filter(Boolean).join(" ");
3106
+ const trigger = (0, import_react20.cloneElement)(children, { "aria-describedby": describedBy });
3107
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_jsx_runtime34.Fragment, { children: [
3108
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
3109
+ "span",
3110
+ {
3111
+ ref: triggerRef,
3112
+ className: "inline-flex",
3113
+ onMouseEnter: () => show(false),
3114
+ onMouseLeave: hide,
3115
+ onFocusCapture: () => show(true),
3116
+ onBlurCapture: hide,
3117
+ onKeyDown: (event) => {
3118
+ if (event.key === "Escape") hide();
3119
+ },
3120
+ children: trigger
3121
+ }
3122
+ ),
3123
+ isOpen && position && typeof document !== "undefined" ? (0, import_react_dom.createPortal)(
3124
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
3125
+ "span",
3126
+ {
3127
+ style: __spreadValues({ position: "fixed" }, position),
3128
+ className: "pointer-events-none z-[200]",
3129
+ children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
3130
+ "span",
3131
+ {
3132
+ id: tooltipId,
3133
+ role: "tooltip",
3134
+ "data-side": side,
3135
+ className: cn("ph-tooltip-content", className),
3136
+ children: content
3137
+ }
3138
+ )
3139
+ }
3140
+ ),
3141
+ document.body
3142
+ ) : null
3143
+ ] });
3144
+ }
3145
+
3146
+ // src/components/ui/EmptyState.tsx
3147
+ var import_jsx_runtime35 = require("react/jsx-runtime");
2970
3148
  function EmptyState({ icon, title, description, action, className }) {
2971
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
3149
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
2972
3150
  "div",
2973
3151
  {
2974
3152
  className: cn(
@@ -2976,17 +3154,17 @@ function EmptyState({ icon, title, description, action, className }) {
2976
3154
  className
2977
3155
  ),
2978
3156
  children: [
2979
- icon && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "mb-4 flex h-14 w-14 items-center justify-center rounded-full bg-ph-muted text-ph-mutedtext", children: icon }),
2980
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("h3", { className: "text-base font-semibold text-ph-ink", children: title }),
2981
- description && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("p", { className: "mt-1 max-w-sm text-sm text-ph-subtle", children: description }),
2982
- action && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { className: "mt-4", children: action })
3157
+ 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 }),
3158
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("h3", { className: "text-base font-semibold text-ph-ink", children: title }),
3159
+ description && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("p", { className: "mt-1 max-w-sm text-sm text-ph-subtle", children: description }),
3160
+ action && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: "mt-4", children: action })
2983
3161
  ]
2984
3162
  }
2985
3163
  );
2986
3164
  }
2987
3165
 
2988
3166
  // src/components/ui/FilterChips.tsx
2989
- var import_jsx_runtime35 = require("react/jsx-runtime");
3167
+ var import_jsx_runtime36 = require("react/jsx-runtime");
2990
3168
  function FilterChips({
2991
3169
  chips,
2992
3170
  onToggle,
@@ -2994,20 +3172,20 @@ function FilterChips({
2994
3172
  className,
2995
3173
  "aria-label": ariaLabel = "Applied filters"
2996
3174
  }) {
2997
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("div", { className: cn("ph-filter-chips", className), role: "group", "aria-label": ariaLabel, children: chips.map((chip) => {
3175
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: cn("ph-filter-chips", className), role: "group", "aria-label": ariaLabel, children: chips.map((chip) => {
2998
3176
  var _a;
2999
3177
  const label = (_a = chip.removeLabel) != null ? _a : getChipText(chip);
3000
- const content = /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_jsx_runtime35.Fragment, { children: [
3001
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "ph-filter-chip__label", children: chip.label }),
3002
- chip.value != null ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "ph-filter-chip__value", children: chip.value }) : null
3178
+ const content = /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_jsx_runtime36.Fragment, { children: [
3179
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "ph-filter-chip__label", children: chip.label }),
3180
+ chip.value != null ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "ph-filter-chip__value", children: chip.value }) : null
3003
3181
  ] });
3004
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
3182
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
3005
3183
  "span",
3006
3184
  {
3007
3185
  className: cn("ph-filter-chip", chip.active && "ph-filter-chip--active"),
3008
3186
  "data-state": chip.active ? "on" : "off",
3009
3187
  children: [
3010
- onToggle ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
3188
+ onToggle ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
3011
3189
  "button",
3012
3190
  {
3013
3191
  type: "button",
@@ -3016,15 +3194,15 @@ function FilterChips({
3016
3194
  onClick: () => onToggle(chip.id),
3017
3195
  children: content
3018
3196
  }
3019
- ) : /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: "ph-filter-chip__main", children: content }),
3020
- chip.active && onRemove ? /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
3197
+ ) : /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "ph-filter-chip__main", children: content }),
3198
+ chip.active && onRemove ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
3021
3199
  "button",
3022
3200
  {
3023
3201
  type: "button",
3024
3202
  className: "ph-filter-chip__remove",
3025
3203
  "aria-label": `Remove ${label} filter`,
3026
3204
  onClick: () => onRemove(chip.id),
3027
- children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(IconClose, { className: "h-3 w-3", "aria-hidden": true })
3205
+ children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(IconClose, { className: "h-3 w-3", "aria-hidden": true })
3028
3206
  }
3029
3207
  ) : null
3030
3208
  ]
@@ -3040,7 +3218,7 @@ function getChipText(chip) {
3040
3218
  }
3041
3219
 
3042
3220
  // src/components/ui/FilterBar.tsx
3043
- var import_jsx_runtime36 = require("react/jsx-runtime");
3221
+ var import_jsx_runtime37 = require("react/jsx-runtime");
3044
3222
  function FilterBar(_a) {
3045
3223
  var _b = _a, {
3046
3224
  children,
@@ -3057,12 +3235,12 @@ function FilterBar(_a) {
3057
3235
  "resultCount",
3058
3236
  "className"
3059
3237
  ]);
3060
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", __spreadProps(__spreadValues({ className: cn("ph-filter-bar", className) }, props), { children: [
3061
- /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("div", { className: "ph-filter-bar__controls", role: "group", "aria-label": label, children: [
3238
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", __spreadProps(__spreadValues({ className: cn("ph-filter-bar", className) }, props), { children: [
3239
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: "ph-filter-bar__controls", role: "group", "aria-label": label, children: [
3062
3240
  children,
3063
- onClear ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("button", { type: "button", className: "ph-filter-bar__clear", onClick: onClear, children: clearLabel }) : null
3241
+ onClear ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("button", { type: "button", className: "ph-filter-bar__clear", onClick: onClear, children: clearLabel }) : null
3064
3242
  ] }),
3065
- resultCount != null ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("output", { className: "ph-filter-bar__results", "aria-live": "polite", children: resultCount }) : null
3243
+ resultCount != null ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("output", { className: "ph-filter-bar__results", "aria-live": "polite", children: resultCount }) : null
3066
3244
  ] }));
3067
3245
  }
3068
3246
  function FilterMenu({
@@ -3079,19 +3257,19 @@ function FilterMenu({
3079
3257
  const selected = options.find((option) => option.value === value);
3080
3258
  const displayValue = (_a = selected == null ? void 0 : selected.label) != null ? _a : placeholder;
3081
3259
  const accessibleValue = selected ? getOptionText(selected) : String(placeholder);
3082
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
3260
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
3083
3261
  DropdownMenu,
3084
3262
  {
3085
3263
  "aria-label": `${label}: ${accessibleValue}`,
3086
3264
  align,
3087
3265
  disabled,
3088
3266
  className,
3089
- trigger: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("span", { className: cn("ph-filter-menu-trigger", selected && "ph-filter-menu-trigger--active"), children: [
3090
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(IconTuning, { className: "h-3.5 w-3.5", "aria-hidden": true }),
3091
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "ph-filter-menu-trigger__label", children: label }),
3092
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "ph-filter-menu-trigger__value", children: displayValue })
3267
+ trigger: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("span", { className: cn("ph-filter-menu-trigger", selected && "ph-filter-menu-trigger--active"), children: [
3268
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(IconTuning, { className: "h-3.5 w-3.5", "aria-hidden": true }),
3269
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "ph-filter-menu-trigger__label", children: label }),
3270
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "ph-filter-menu-trigger__value", children: displayValue })
3093
3271
  ] }),
3094
- children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(DropdownRadioGroup, { value, onValueChange, children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
3272
+ children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(DropdownRadioGroup, { value, onValueChange, children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
3095
3273
  DropdownRadioItem,
3096
3274
  {
3097
3275
  value: option.value,
@@ -3115,25 +3293,25 @@ function SortMenu({
3115
3293
  className
3116
3294
  }) {
3117
3295
  const selected = options.find((option) => option.value === value);
3118
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
3296
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
3119
3297
  DropdownMenu,
3120
3298
  {
3121
3299
  "aria-label": `${label}: ${selected ? getOptionText(selected) : "Choose sort order"}`,
3122
3300
  align,
3123
3301
  disabled,
3124
3302
  className,
3125
- trigger: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)("span", { className: "ph-filter-menu-trigger ph-sort-menu-trigger", children: [
3126
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
3303
+ trigger: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("span", { className: "ph-filter-menu-trigger ph-sort-menu-trigger", children: [
3304
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
3127
3305
  IconArrowDown,
3128
3306
  {
3129
3307
  className: cn("h-3.5 w-3.5", direction === "ascending" && "rotate-180"),
3130
3308
  "aria-hidden": true
3131
3309
  }
3132
3310
  ),
3133
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "ph-filter-menu-trigger__label", children: label }),
3134
- selected ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("span", { className: "ph-filter-menu-trigger__value", children: selected.label }) : null
3311
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "ph-filter-menu-trigger__label", children: label }),
3312
+ selected ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("span", { className: "ph-filter-menu-trigger__value", children: selected.label }) : null
3135
3313
  ] }),
3136
- children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(DropdownRadioGroup, { value, onValueChange, children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
3314
+ children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(DropdownRadioGroup, { value, onValueChange, children: options.map((option) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
3137
3315
  DropdownRadioItem,
3138
3316
  {
3139
3317
  value: option.value,
@@ -3153,7 +3331,7 @@ function getOptionText(option) {
3153
3331
  }
3154
3332
 
3155
3333
  // src/components/ui/FilterControls.tsx
3156
- var import_jsx_runtime37 = require("react/jsx-runtime");
3334
+ var import_jsx_runtime38 = require("react/jsx-runtime");
3157
3335
  function FilterControls(_a) {
3158
3336
  var _b = _a, {
3159
3337
  children,
@@ -3169,33 +3347,33 @@ function FilterControls(_a) {
3169
3347
  "className"
3170
3348
  ]);
3171
3349
  const hasChips = Boolean(chipsProps == null ? void 0 : chipsProps.chips.length);
3172
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", __spreadProps(__spreadValues({ className: cn("ph-filter-controls", className) }, props), { children: [
3173
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(FilterBar, __spreadProps(__spreadValues({}, barProps), { children })),
3174
- hasChips && chipsProps ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(FilterChips, __spreadValues({}, chipsProps)) : emptyState != null ? emptyState : null
3350
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", __spreadProps(__spreadValues({ className: cn("ph-filter-controls", className) }, props), { children: [
3351
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(FilterBar, __spreadProps(__spreadValues({}, barProps), { children })),
3352
+ hasChips && chipsProps ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(FilterChips, __spreadValues({}, chipsProps)) : emptyState != null ? emptyState : null
3175
3353
  ] }));
3176
3354
  }
3177
3355
 
3178
3356
  // src/components/ui/CodeBlock.tsx
3179
- var import_react20 = require("react");
3180
- var import_jsx_runtime38 = require("react/jsx-runtime");
3357
+ var import_react21 = require("react");
3358
+ var import_jsx_runtime39 = require("react/jsx-runtime");
3181
3359
  function CodeBlock({ code, language = "tsx", filename, className }) {
3182
- const [copied, setCopied] = (0, import_react20.useState)(false);
3360
+ const [copied, setCopied] = (0, import_react21.useState)(false);
3183
3361
  const handleCopy = async () => {
3184
3362
  await navigator.clipboard.writeText(code);
3185
3363
  setCopied(true);
3186
3364
  setTimeout(() => setCopied(false), 2e3);
3187
3365
  };
3188
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: cn("overflow-hidden rounded-lg border border-ph-border bg-[#1a1a2e]", className), children: [
3189
- (filename || language) && /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "flex items-center justify-between border-b border-white/10 px-4 py-2", children: [
3190
- /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "flex items-center gap-2", children: [
3191
- /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "flex gap-1.5", children: [
3192
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "h-3 w-3 rounded-full bg-red-400" }),
3193
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "h-3 w-3 rounded-full bg-amber-400" }),
3194
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "h-3 w-3 rounded-full bg-emerald-400" })
3366
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: cn("overflow-hidden rounded-lg border border-ph-border bg-[#1a1a2e]", className), children: [
3367
+ (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: [
3368
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "flex items-center gap-2", children: [
3369
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: "flex gap-1.5", children: [
3370
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "h-3 w-3 rounded-full bg-red-400" }),
3371
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "h-3 w-3 rounded-full bg-amber-400" }),
3372
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "h-3 w-3 rounded-full bg-emerald-400" })
3195
3373
  ] }),
3196
- filename && /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("span", { className: "ml-2 text-xs text-white/60", children: filename })
3374
+ filename && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "ml-2 text-xs text-white/60", children: filename })
3197
3375
  ] }),
3198
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
3376
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
3199
3377
  "button",
3200
3378
  {
3201
3379
  type: "button",
@@ -3205,35 +3383,35 @@ function CodeBlock({ code, language = "tsx", filename, className }) {
3205
3383
  }
3206
3384
  )
3207
3385
  ] }),
3208
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("pre", { className: "overflow-x-auto p-4 text-sm leading-relaxed", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("code", { className: "font-mono text-[#e4e4e7]", children: code }) })
3386
+ /* @__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 }) })
3209
3387
  ] });
3210
3388
  }
3211
3389
 
3212
3390
  // src/components/ui/ComponentDocs.tsx
3213
- var import_jsx_runtime39 = require("react/jsx-runtime");
3391
+ var import_jsx_runtime40 = require("react/jsx-runtime");
3214
3392
  function ComponentDocs({ title = "Props & variants", rows, defaultOpen = false, className }) {
3215
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("details", { className: cn("ph-panel group overflow-hidden p-0", className), open: defaultOpen, children: [
3216
- /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("summary", { className: "flex cursor-pointer list-none items-center justify-between gap-4 border-b border-ph-border px-4 py-3 transition hover:bg-ph-muted/60 [&::-webkit-details-marker]:hidden", children: [
3217
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("h3", { className: "text-xs font-semibold uppercase tracking-wider text-ph-mutedtext", children: title }),
3218
- /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("span", { className: "rounded-full border border-ph-border bg-ph-surface px-2 py-1 text-[10px] font-semibold uppercase tracking-wider text-ph-mutedtext transition group-open:bg-ph-brand group-open:text-white", children: [
3219
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "group-open:hidden", children: "Show" }),
3220
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: "hidden group-open:inline", children: "Hide" })
3393
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("details", { className: cn("ph-panel group overflow-hidden p-0", className), open: defaultOpen, children: [
3394
+ /* @__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: [
3395
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("h3", { className: "text-xs font-semibold uppercase tracking-wider text-ph-mutedtext", children: title }),
3396
+ /* @__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: [
3397
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "group-open:hidden", children: "Show" }),
3398
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "hidden group-open:inline", children: "Hide" })
3221
3399
  ] })
3222
3400
  ] }),
3223
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "overflow-x-auto border-t border-ph-border", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("table", { className: "w-full text-left text-sm", children: [
3224
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("thead", { className: "bg-ph-muted text-xs uppercase tracking-wider text-ph-mutedtext", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("tr", { children: [
3225
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("th", { className: "px-4 py-2 font-semibold", children: "Prop" }),
3226
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("th", { className: "px-4 py-2 font-semibold", children: "Type" }),
3227
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("th", { className: "px-4 py-2 font-semibold", children: "Default" }),
3228
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("th", { className: "px-4 py-2 font-semibold", children: "Use" })
3401
+ /* @__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: [
3402
+ /* @__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: [
3403
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("th", { className: "px-4 py-2 font-semibold", children: "Prop" }),
3404
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("th", { className: "px-4 py-2 font-semibold", children: "Type" }),
3405
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("th", { className: "px-4 py-2 font-semibold", children: "Default" }),
3406
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("th", { className: "px-4 py-2 font-semibold", children: "Use" })
3229
3407
  ] }) }),
3230
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("tbody", { className: "divide-y divide-ph-border", children: rows.map((row) => {
3408
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("tbody", { className: "divide-y divide-ph-border", children: rows.map((row) => {
3231
3409
  var _a;
3232
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("tr", { children: [
3233
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("td", { className: "px-4 py-3 align-top font-mono text-xs text-ph-ink", children: row.name }),
3234
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("td", { className: "px-4 py-3 align-top font-mono text-xs text-ph-subtle", children: row.type }),
3235
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("td", { className: "px-4 py-3 align-top font-mono text-xs text-ph-subtle", children: (_a = row.defaultValue) != null ? _a : "-" }),
3236
- /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("td", { className: "px-4 py-3 align-top text-ph-subtle", children: row.description })
3410
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("tr", { children: [
3411
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("td", { className: "px-4 py-3 align-top font-mono text-xs text-ph-ink", children: row.name }),
3412
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("td", { className: "px-4 py-3 align-top font-mono text-xs text-ph-subtle", children: row.type }),
3413
+ /* @__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 : "-" }),
3414
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("td", { className: "px-4 py-3 align-top text-ph-subtle", children: row.description })
3237
3415
  ] }, row.name);
3238
3416
  }) })
3239
3417
  ] }) })
@@ -3241,8 +3419,8 @@ function ComponentDocs({ title = "Props & variants", rows, defaultOpen = false,
3241
3419
  }
3242
3420
 
3243
3421
  // src/components/ui/ShowcaseWrapper.tsx
3244
- var import_react21 = require("react");
3245
- var import_jsx_runtime40 = require("react/jsx-runtime");
3422
+ var import_react22 = require("react");
3423
+ var import_jsx_runtime41 = require("react/jsx-runtime");
3246
3424
  function ShowcaseWrapper({
3247
3425
  id,
3248
3426
  title,
@@ -3254,13 +3432,13 @@ function ShowcaseWrapper({
3254
3432
  className
3255
3433
  }) {
3256
3434
  var _a;
3257
- const [showCode, setShowCode] = (0, import_react21.useState)(false);
3435
+ const [showCode, setShowCode] = (0, import_react22.useState)(false);
3258
3436
  const fallbackId = (_a = titleIdMap[title]) != null ? _a : title.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, "");
3259
- return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("section", { id: id != null ? id : fallbackId, className: cn("scroll-mt-20", className), children: [
3260
- /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "ph-h2-rule mb-8", children: [
3261
- /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: "flex items-center gap-1.5", children: [
3262
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("h2", { children: title }),
3263
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
3437
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("section", { id: id != null ? id : fallbackId, className: cn("scroll-mt-20", className), children: [
3438
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "ph-h2-rule mb-8", children: [
3439
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: "flex items-center gap-1.5", children: [
3440
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("h2", { children: title }),
3441
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
3264
3442
  "button",
3265
3443
  {
3266
3444
  type: "button",
@@ -3271,15 +3449,15 @@ function ShowcaseWrapper({
3271
3449
  ),
3272
3450
  title: showCode ? "Hide code" : "Show code",
3273
3451
  "aria-label": showCode ? "Hide code" : "Show code",
3274
- children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(IconCodePreview, { className: "h-5 w-5", "aria-hidden": true })
3452
+ children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(IconCodePreview, { className: "h-5 w-5", "aria-hidden": true })
3275
3453
  }
3276
3454
  )
3277
3455
  ] }),
3278
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("hr", {})
3456
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("hr", {})
3279
3457
  ] }),
3280
- description && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("p", { className: "mb-6 text-sm text-ph-subtle", children: description }),
3281
- docs && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "mb-6", children: docs }),
3282
- /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
3458
+ description && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("p", { className: "mb-6 text-sm text-ph-subtle", children: description }),
3459
+ docs && /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "mb-6", children: docs }),
3460
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
3283
3461
  "div",
3284
3462
  {
3285
3463
  className: cn(
@@ -3287,15 +3465,15 @@ function ShowcaseWrapper({
3287
3465
  showCode ? "lg:grid lg:grid-cols-[1fr,minmax(360px,420px)]" : "block"
3288
3466
  ),
3289
3467
  children: [
3290
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: cn("min-w-0", showCode && "lg:pr-2"), children }),
3291
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
3468
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: cn("min-w-0", showCode && "lg:pr-2"), children }),
3469
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
3292
3470
  "div",
3293
3471
  {
3294
3472
  className: cn(
3295
3473
  "transition-all duration-300",
3296
3474
  showCode ? "block opacity-100" : "hidden opacity-0 lg:hidden"
3297
3475
  ),
3298
- children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("div", { className: "sticky top-20", children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(CodeBlock, { code, filename }) })
3476
+ children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("div", { className: "sticky top-20", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(CodeBlock, { code, filename }) })
3299
3477
  }
3300
3478
  )
3301
3479
  ]
@@ -3344,14 +3522,14 @@ var titleIdMap = {
3344
3522
  };
3345
3523
 
3346
3524
  // src/components/ui/CollapsibleSection.tsx
3347
- var import_react22 = require("react");
3348
- var import_jsx_runtime41 = require("react/jsx-runtime");
3525
+ var import_react23 = require("react");
3526
+ var import_jsx_runtime42 = require("react/jsx-runtime");
3349
3527
  function CollapsibleSection({ title, children, defaultOpen = true, id }) {
3350
- const [isOpen, setIsOpen] = (0, import_react22.useState)(defaultOpen);
3351
- const generatedId = (0, import_react22.useId)();
3528
+ const [isOpen, setIsOpen] = (0, import_react23.useState)(defaultOpen);
3529
+ const generatedId = (0, import_react23.useId)();
3352
3530
  const contentId = `${id != null ? id : generatedId}-content`;
3353
- return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("section", { id, className: "scroll-mt-20", children: [
3354
- /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(
3531
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("section", { id, className: "scroll-mt-20", children: [
3532
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
3355
3533
  "button",
3356
3534
  {
3357
3535
  type: "button",
@@ -3360,8 +3538,8 @@ function CollapsibleSection({ title, children, defaultOpen = true, id }) {
3360
3538
  "aria-controls": contentId,
3361
3539
  className: "mb-6 flex w-full items-center justify-between rounded-lg border border-ph-border bg-ph-muted px-5 py-4 text-left transition hover:bg-ph-muted/80",
3362
3540
  children: [
3363
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: "text-lg font-bold text-ph-ink", children: title }),
3364
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
3541
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: "text-lg font-bold text-ph-ink", children: title }),
3542
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
3365
3543
  IconChevronDown,
3366
3544
  {
3367
3545
  className: cn(
@@ -3374,7 +3552,7 @@ function CollapsibleSection({ title, children, defaultOpen = true, id }) {
3374
3552
  ]
3375
3553
  }
3376
3554
  ),
3377
- /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
3555
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
3378
3556
  "div",
3379
3557
  {
3380
3558
  id: contentId,
@@ -3390,7 +3568,7 @@ function CollapsibleSection({ title, children, defaultOpen = true, id }) {
3390
3568
  }
3391
3569
 
3392
3570
  // src/components/ui/Typography.tsx
3393
- var import_jsx_runtime42 = require("react/jsx-runtime");
3571
+ var import_jsx_runtime43 = require("react/jsx-runtime");
3394
3572
  var toneMap2 = {
3395
3573
  default: "text-ph-ink",
3396
3574
  muted: "text-ph-mutedtext",
@@ -3419,47 +3597,47 @@ function Display({
3419
3597
  truncate,
3420
3598
  className
3421
3599
  }) {
3422
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("h1", { className: textClass("text-4xl font-extrabold tracking-tight md:text-5xl", tone, weight, truncate, className), children });
3600
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("h1", { className: textClass("text-4xl font-extrabold tracking-tight md:text-5xl", tone, weight, truncate, className), children });
3423
3601
  }
3424
3602
  function H1({ children, tone = "default", weight, truncate, className }) {
3425
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("h1", { className: textClass("text-3xl font-bold tracking-tight md:text-4xl", tone, weight, truncate, className), children });
3603
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("h1", { className: textClass("text-3xl font-bold tracking-tight md:text-4xl", tone, weight, truncate, className), children });
3426
3604
  }
3427
3605
  function H2({ children, tone = "default", weight, truncate, className }) {
3428
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("h2", { className: textClass("text-2xl font-bold tracking-tight", tone, weight, truncate, className), children });
3606
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("h2", { className: textClass("text-2xl font-bold tracking-tight", tone, weight, truncate, className), children });
3429
3607
  }
3430
3608
  function H3({ children, tone = "default", weight, truncate, className }) {
3431
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("h3", { className: textClass("text-xl font-semibold", tone, weight, truncate, className), children });
3609
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("h3", { className: textClass("text-xl font-semibold", tone, weight, truncate, className), children });
3432
3610
  }
3433
3611
  function H4({ children, tone = "default", weight, truncate, className }) {
3434
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("h4", { className: textClass("text-lg font-semibold", tone, weight, truncate, className), children });
3612
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("h4", { className: textClass("text-lg font-semibold", tone, weight, truncate, className), children });
3435
3613
  }
3436
3614
  function H5({ children, tone = "default", weight, truncate, className }) {
3437
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("h5", { className: textClass("text-base font-semibold", tone, weight, truncate, className), children });
3615
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("h5", { className: textClass("text-base font-semibold", tone, weight, truncate, className), children });
3438
3616
  }
3439
3617
  function P({ children, tone = "default", weight, truncate, className }) {
3440
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("p", { className: textClass("text-base leading-relaxed", tone, weight, truncate, className), children });
3618
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("p", { className: textClass("text-base leading-relaxed", tone, weight, truncate, className), children });
3441
3619
  }
3442
3620
  function Small({ children, tone = "default", weight, truncate, className }) {
3443
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: textClass("text-sm leading-relaxed", tone, weight, truncate, className), children });
3621
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: textClass("text-sm leading-relaxed", tone, weight, truncate, className), children });
3444
3622
  }
3445
3623
  function Caption({ children, tone = "muted", weight, truncate, className }) {
3446
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: textClass("text-[11px] font-medium uppercase tracking-wider", tone, weight, truncate, className), children });
3624
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: textClass("text-[11px] font-medium uppercase tracking-wider", tone, weight, truncate, className), children });
3447
3625
  }
3448
3626
  function Overline({ children, tone = "muted", weight, truncate, className }) {
3449
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("span", { className: textClass("text-[10px] font-bold uppercase tracking-[0.15em]", tone, weight, truncate, className), children });
3627
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: textClass("text-[10px] font-bold uppercase tracking-[0.15em]", tone, weight, truncate, className), children });
3450
3628
  }
3451
3629
  function Lead({ children, tone = "subtle", weight, truncate, className }) {
3452
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("p", { className: textClass("text-lg leading-relaxed", tone, weight, truncate, className), children });
3630
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("p", { className: textClass("text-lg leading-relaxed", tone, weight, truncate, className), children });
3453
3631
  }
3454
3632
  function Mono({ children, tone = "default", weight, truncate, className }) {
3455
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("code", { className: textClass("text-sm font-mono leading-relaxed", tone, weight, truncate, className), children });
3633
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("code", { className: textClass("text-sm font-mono leading-relaxed", tone, weight, truncate, className), children });
3456
3634
  }
3457
3635
  function Label({ children, tone = "default", weight, truncate, className }) {
3458
- return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("label", { className: textClass("text-sm font-medium", tone, weight, truncate, className), children });
3636
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("label", { className: textClass("text-sm font-medium", tone, weight, truncate, className), children });
3459
3637
  }
3460
3638
 
3461
3639
  // src/components/ui/Avatar.tsx
3462
- var import_jsx_runtime43 = require("react/jsx-runtime");
3640
+ var import_jsx_runtime44 = require("react/jsx-runtime");
3463
3641
  var sizeMap5 = {
3464
3642
  xs: "h-8 w-8 text-[10px]",
3465
3643
  sm: "h-10 w-10 text-xs",
@@ -3491,8 +3669,8 @@ function Avatar(_a) {
3491
3669
  "badge",
3492
3670
  "className"
3493
3671
  ]);
3494
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", __spreadProps(__spreadValues({ className: cn("relative inline-flex shrink-0", className) }, props), { children: [
3495
- /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
3672
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", __spreadProps(__spreadValues({ className: cn("relative inline-flex shrink-0", className) }, props), { children: [
3673
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
3496
3674
  "div",
3497
3675
  {
3498
3676
  className: cn(
@@ -3503,7 +3681,7 @@ function Avatar(_a) {
3503
3681
  children: icon || label
3504
3682
  }
3505
3683
  ),
3506
- status && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
3684
+ status && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
3507
3685
  "span",
3508
3686
  {
3509
3687
  className: cn(
@@ -3512,7 +3690,7 @@ function Avatar(_a) {
3512
3690
  )
3513
3691
  }
3514
3692
  ),
3515
- badge && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("span", { className: "absolute -bottom-1 -right-1 flex min-w-[22px] items-center justify-center rounded-full bg-ph-brand px-1.5 py-px text-[10px] font-bold text-white", children: badge })
3693
+ 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 })
3516
3694
  ] }));
3517
3695
  }
3518
3696
  function AvatarGroup(_a) {
@@ -3520,9 +3698,9 @@ function AvatarGroup(_a) {
3520
3698
  const items = Array.isArray(children) ? children : [children];
3521
3699
  const visible = max ? items.slice(0, max) : items;
3522
3700
  const remaining = max ? items.length - max : 0;
3523
- return /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)("div", __spreadProps(__spreadValues({ className: cn("-space-x-3 flex rtl:space-x-reverse", className) }, props), { children: [
3701
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", __spreadProps(__spreadValues({ className: cn("-space-x-3 flex rtl:space-x-reverse", className) }, props), { children: [
3524
3702
  visible,
3525
- remaining > 0 && /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
3703
+ remaining > 0 && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
3526
3704
  Avatar,
3527
3705
  {
3528
3706
  label: `+${remaining}`,
@@ -3534,7 +3712,7 @@ function AvatarGroup(_a) {
3534
3712
  }
3535
3713
 
3536
3714
  // src/components/ui/Progress.tsx
3537
- var import_jsx_runtime44 = require("react/jsx-runtime");
3715
+ var import_jsx_runtime45 = require("react/jsx-runtime");
3538
3716
  var sizeMap6 = {
3539
3717
  sm: "h-1",
3540
3718
  md: "h-2",
@@ -3559,15 +3737,15 @@ function Progress(_a) {
3559
3737
  "className"
3560
3738
  ]);
3561
3739
  const percentage = Math.min(100, Math.max(0, value / max * 100));
3562
- return /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", __spreadProps(__spreadValues({ className: cn("w-full", className) }, props), { children: [
3563
- (label || showPercentage) && /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("div", { className: "mb-1.5 flex justify-between text-sm text-ph-subtle", children: [
3564
- label && /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("span", { children: label }),
3565
- showPercentage && /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)("span", { className: "tabular-nums", children: [
3740
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", __spreadProps(__spreadValues({ className: cn("w-full", className) }, props), { children: [
3741
+ (label || showPercentage) && /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: "mb-1.5 flex justify-between text-sm text-ph-subtle", children: [
3742
+ label && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { children: label }),
3743
+ showPercentage && /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("span", { className: "tabular-nums", children: [
3566
3744
  Math.round(percentage),
3567
3745
  "%"
3568
3746
  ] })
3569
3747
  ] }),
3570
- /* @__PURE__ */ (0, import_jsx_runtime44.jsx)("div", { className: cn("ph-progress", sizeMap6[size]), children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
3748
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: cn("ph-progress", sizeMap6[size]), children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
3571
3749
  "div",
3572
3750
  {
3573
3751
  className: cn("ph-progress-bar", color),
@@ -3582,7 +3760,7 @@ function Progress(_a) {
3582
3760
  }
3583
3761
 
3584
3762
  // src/components/ui/ChatBubble.tsx
3585
- var import_jsx_runtime45 = require("react/jsx-runtime");
3763
+ var import_jsx_runtime46 = require("react/jsx-runtime");
3586
3764
  function ChatBubble(_a) {
3587
3765
  var _b = _a, {
3588
3766
  children,
@@ -3602,7 +3780,7 @@ function ChatBubble(_a) {
3602
3780
  "className"
3603
3781
  ]);
3604
3782
  const isSelf = variant === "self";
3605
- return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
3783
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
3606
3784
  "div",
3607
3785
  __spreadProps(__spreadValues({
3608
3786
  className: cn(
@@ -3612,9 +3790,9 @@ function ChatBubble(_a) {
3612
3790
  )
3613
3791
  }, props), {
3614
3792
  children: [
3615
- avatar && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("div", { className: "shrink-0", children: avatar }),
3616
- /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("div", { className: cn("min-w-0 flex-1", isSelf && "text-right"), children: [
3617
- (name || time) && /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(
3793
+ avatar && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "shrink-0", children: avatar }),
3794
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { className: cn("min-w-0 flex-1", isSelf && "text-right"), children: [
3795
+ (name || time) && /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
3618
3796
  "header",
3619
3797
  {
3620
3798
  className: cn(
@@ -3622,12 +3800,12 @@ function ChatBubble(_a) {
3622
3800
  isSelf && "flex-row-reverse justify-end"
3623
3801
  ),
3624
3802
  children: [
3625
- name && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: "font-semibold text-ph-ink", children: name }),
3626
- time && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { children: time })
3803
+ name && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "font-semibold text-ph-ink", children: name }),
3804
+ time && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { children: time })
3627
3805
  ]
3628
3806
  }
3629
3807
  ),
3630
- /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
3808
+ /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
3631
3809
  "div",
3632
3810
  {
3633
3811
  className: cn(
@@ -3637,7 +3815,7 @@ function ChatBubble(_a) {
3637
3815
  children
3638
3816
  }
3639
3817
  ),
3640
- footer && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("footer", { className: "mt-2 text-[11px] text-ph-mutedtext", children: footer })
3818
+ footer && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("footer", { className: "mt-2 text-[11px] text-ph-mutedtext", children: footer })
3641
3819
  ] })
3642
3820
  ]
3643
3821
  })
@@ -3645,7 +3823,7 @@ function ChatBubble(_a) {
3645
3823
  }
3646
3824
 
3647
3825
  // src/components/ui/Terminal.tsx
3648
- var import_jsx_runtime46 = require("react/jsx-runtime");
3826
+ var import_jsx_runtime47 = require("react/jsx-runtime");
3649
3827
  function Terminal(_a) {
3650
3828
  var _b = _a, {
3651
3829
  title = "sandbox",
@@ -3658,7 +3836,7 @@ function Terminal(_a) {
3658
3836
  "children",
3659
3837
  "className"
3660
3838
  ]);
3661
- return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
3839
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(
3662
3840
  "div",
3663
3841
  __spreadProps(__spreadValues({
3664
3842
  className: cn(
@@ -3667,18 +3845,18 @@ function Terminal(_a) {
3667
3845
  )
3668
3846
  }, props), {
3669
3847
  children: [
3670
- /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("header", { className: "flex items-center gap-2 border-b border-ph-border bg-ph-muted px-4 py-3", children: [
3671
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "h-3 w-3 rounded-full bg-red-400" }),
3672
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "h-3 w-3 rounded-full bg-amber-400" }),
3673
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "h-3 w-3 rounded-full bg-emerald-400" }),
3674
- title && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: "text-xs font-medium text-ph-mutedtext", children: title })
3848
+ /* @__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: [
3849
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "h-3 w-3 rounded-full bg-red-400" }),
3850
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "h-3 w-3 rounded-full bg-amber-400" }),
3851
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { className: "h-3 w-3 rounded-full bg-emerald-400" }),
3852
+ title && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: "text-xs font-medium text-ph-mutedtext", children: title })
3675
3853
  ] }),
3676
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: "ph-code rounded-none border-x-0 border-b-0 text-[13px] leading-relaxed", children: children || /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_jsx_runtime46.Fragment, { children: lines == null ? void 0 : lines.map((line, i) => {
3854
+ /* @__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) => {
3677
3855
  const text = typeof line === "string" ? line : line.text;
3678
3856
  const color = typeof line === "string" ? void 0 : line.color;
3679
- return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("span", { children: [
3680
- /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("span", { className: color || "text-neutral-600", children: text }),
3681
- i < lines.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("br", {})
3857
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("span", { children: [
3858
+ /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("span", { className: color || "text-neutral-600", children: text }),
3859
+ i < lines.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("br", {})
3682
3860
  ] }, i);
3683
3861
  }) }) })
3684
3862
  ]
@@ -3687,7 +3865,7 @@ function Terminal(_a) {
3687
3865
  }
3688
3866
 
3689
3867
  // src/components/ui/Indicator.tsx
3690
- var import_jsx_runtime47 = require("react/jsx-runtime");
3868
+ var import_jsx_runtime48 = require("react/jsx-runtime");
3691
3869
  var positionMap = {
3692
3870
  "top-right": "-right-[2px] -top-[2px]",
3693
3871
  "top-left": "-left-[2px] -top-[2px]",
@@ -3710,8 +3888,8 @@ function Indicator(_a) {
3710
3888
  "dot",
3711
3889
  "className"
3712
3890
  ]);
3713
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)("div", __spreadProps(__spreadValues({ className: cn("relative inline-flex items-center justify-center", className) }, props), { children: [
3714
- dot ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
3891
+ return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", __spreadProps(__spreadValues({ className: cn("relative inline-flex items-center justify-center", className) }, props), { children: [
3892
+ dot ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
3715
3893
  "span",
3716
3894
  {
3717
3895
  className: cn(
@@ -3720,7 +3898,7 @@ function Indicator(_a) {
3720
3898
  positionMap[position]
3721
3899
  )
3722
3900
  }
3723
- ) : badge != null ? /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
3901
+ ) : badge != null ? /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
3724
3902
  "span",
3725
3903
  {
3726
3904
  className: cn(
@@ -3736,7 +3914,7 @@ function Indicator(_a) {
3736
3914
  }
3737
3915
 
3738
3916
  // src/components/ui/Timeline.tsx
3739
- var import_jsx_runtime48 = require("react/jsx-runtime");
3917
+ var import_jsx_runtime49 = require("react/jsx-runtime");
3740
3918
  function Timeline(_a) {
3741
3919
  var _b = _a, {
3742
3920
  events,
@@ -3747,15 +3925,15 @@ function Timeline(_a) {
3747
3925
  "alternate",
3748
3926
  "className"
3749
3927
  ]);
3750
- return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
3928
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
3751
3929
  "ol",
3752
3930
  __spreadProps(__spreadValues({
3753
3931
  className: cn("relative space-y-8", className)
3754
3932
  }, props), {
3755
3933
  children: events.map((event, idx) => {
3756
3934
  const align = alternate && idx % 2 !== 0 ? "lg:flex-row-reverse" : "";
3757
- return /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("li", { className: cn("relative flex gap-6", align), children: [
3758
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
3935
+ return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("li", { className: cn("relative flex gap-6", align), children: [
3936
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
3759
3937
  "div",
3760
3938
  {
3761
3939
  className: cn(
@@ -3765,41 +3943,1671 @@ function Timeline(_a) {
3765
3943
  children: event.icon
3766
3944
  }
3767
3945
  ),
3768
- /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("article", { className: "flex-1 rounded-xl border border-ph-border bg-ph-surface p-4 shadow-ph", children: [
3769
- /* @__PURE__ */ (0, import_jsx_runtime48.jsxs)("div", { className: "flex flex-wrap items-baseline gap-3", children: [
3770
- /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("h4", { className: "text-base font-semibold text-ph-ink", children: event.title }),
3771
- event.time && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("time", { className: "text-[11px] font-semibold uppercase tracking-wide text-ph-mutedtext", children: event.time })
3946
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("article", { className: "flex-1 rounded-xl border border-ph-border bg-ph-surface p-4 shadow-ph", children: [
3947
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)("div", { className: "flex flex-wrap items-baseline gap-3", children: [
3948
+ /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("h4", { className: "text-base font-semibold text-ph-ink", children: event.title }),
3949
+ event.time && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("time", { className: "text-[11px] font-semibold uppercase tracking-wide text-ph-mutedtext", children: event.time })
3772
3950
  ] }),
3773
- event.description && /* @__PURE__ */ (0, import_jsx_runtime48.jsx)("p", { className: "mt-2 text-sm text-ph-subtle", children: event.description })
3951
+ event.description && /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("p", { className: "mt-2 text-sm text-ph-subtle", children: event.description })
3774
3952
  ] })
3775
3953
  ] }, event.id);
3776
3954
  })
3777
3955
  })
3778
3956
  );
3779
3957
  }
3958
+
3959
+ // src/components/ui/Banner.tsx
3960
+ var import_react24 = require("react");
3961
+ var import_jsx_runtime50 = require("react/jsx-runtime");
3962
+ var typeClass = {
3963
+ info: "ph-banner-info",
3964
+ success: "ph-banner-success",
3965
+ warning: "ph-banner-warning",
3966
+ danger: "ph-banner-danger",
3967
+ ai: "ph-banner-ai"
3968
+ };
3969
+ var Banner = (0, import_react24.forwardRef)(function Banner2(_a, ref) {
3970
+ var _b = _a, {
3971
+ type = "info",
3972
+ onClose,
3973
+ action,
3974
+ hideIcon = false,
3975
+ square = false,
3976
+ icon,
3977
+ className,
3978
+ children
3979
+ } = _b, props = __objRest(_b, [
3980
+ "type",
3981
+ "onClose",
3982
+ "action",
3983
+ "hideIcon",
3984
+ "square",
3985
+ "icon",
3986
+ "className",
3987
+ "children"
3988
+ ]);
3989
+ return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
3990
+ "div",
3991
+ __spreadProps(__spreadValues({
3992
+ ref,
3993
+ role: "alert",
3994
+ className: cn(
3995
+ "ph-banner",
3996
+ typeClass[type],
3997
+ square && "ph-banner--square",
3998
+ className
3999
+ )
4000
+ }, props), {
4001
+ children: /* @__PURE__ */ (0, import_jsx_runtime50.jsxs)("div", { className: "ph-banner__body", children: [
4002
+ icon,
4003
+ /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "ph-banner__content", children }),
4004
+ action && /* @__PURE__ */ (0, import_jsx_runtime50.jsx)("div", { className: "ph-banner__action", children: action }),
4005
+ 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" }) }) })
4006
+ ] })
4007
+ })
4008
+ );
4009
+ });
4010
+ Banner.displayName = "Banner";
4011
+
4012
+ // src/components/ui/Dialog.tsx
4013
+ var import_react25 = require("react");
4014
+ var import_jsx_runtime51 = require("react/jsx-runtime");
4015
+ function Dialog2(_a) {
4016
+ var _b = _a, {
4017
+ isOpen: openProp,
4018
+ onClose,
4019
+ onConfirm,
4020
+ confirmText = "Confirm",
4021
+ cancelText = "Cancel",
4022
+ confirmProps,
4023
+ cancelProps,
4024
+ children,
4025
+ title
4026
+ } = _b, modalProps = __objRest(_b, [
4027
+ "isOpen",
4028
+ "onClose",
4029
+ "onConfirm",
4030
+ "confirmText",
4031
+ "cancelText",
4032
+ "confirmProps",
4033
+ "cancelProps",
4034
+ "children",
4035
+ "title"
4036
+ ]);
4037
+ const [loading, setLoading] = (0, import_react25.useState)(false);
4038
+ const isOpen = openProp != null ? openProp : true;
4039
+ const handleConfirm = async () => {
4040
+ if (!onConfirm) return;
4041
+ setLoading(true);
4042
+ try {
4043
+ await onConfirm();
4044
+ } finally {
4045
+ setLoading(false);
4046
+ }
4047
+ onClose == null ? void 0 : onClose();
4048
+ };
4049
+ return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
4050
+ Modal,
4051
+ __spreadProps(__spreadValues({
4052
+ open: isOpen,
4053
+ onClose,
4054
+ title,
4055
+ footer: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "flex justify-end gap-2", children: [
4056
+ /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Button, __spreadProps(__spreadValues({ variant: "secondary" }, cancelProps), { onClick: onClose, children: cancelText })),
4057
+ onConfirm && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
4058
+ Button,
4059
+ __spreadProps(__spreadValues({
4060
+ variant: "primary",
4061
+ loading
4062
+ }, confirmProps), {
4063
+ onClick: handleConfirm,
4064
+ children: confirmText
4065
+ })
4066
+ )
4067
+ ] })
4068
+ }, modalProps), {
4069
+ children
4070
+ })
4071
+ );
4072
+ }
4073
+ Dialog2.displayName = "Dialog";
4074
+
4075
+ // src/components/ui/Divider.tsx
4076
+ var import_jsx_runtime52 = require("react/jsx-runtime");
4077
+ function Divider(_a) {
4078
+ var _b = _a, {
4079
+ vertical = false,
4080
+ dashed = false,
4081
+ thick = false,
4082
+ label,
4083
+ className
4084
+ } = _b, props = __objRest(_b, [
4085
+ "vertical",
4086
+ "dashed",
4087
+ "thick",
4088
+ "label",
4089
+ "className"
4090
+ ]);
4091
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
4092
+ "div",
4093
+ __spreadProps(__spreadValues({
4094
+ role: "separator",
4095
+ "aria-orientation": vertical ? "vertical" : "horizontal",
4096
+ className: cn(
4097
+ "ph-divider",
4098
+ vertical && "ph-divider--vertical",
4099
+ thick && "ph-divider--thick",
4100
+ dashed && "ph-divider--dashed",
4101
+ !!label && "ph-divider--with-label",
4102
+ !className && (vertical ? "mx-2 self-stretch" : "my-2"),
4103
+ className
4104
+ )
4105
+ }, props), {
4106
+ children: label && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "ph-divider__label", children: label })
4107
+ })
4108
+ );
4109
+ }
4110
+ Divider.displayName = "Divider";
4111
+
4112
+ // src/components/ui/Tag.tsx
4113
+ var import_react26 = require("react");
4114
+ var import_jsx_runtime53 = require("react/jsx-runtime");
4115
+ var typeClass2 = {
4116
+ default: "ph-tag-default",
4117
+ primary: "ph-tag-primary",
4118
+ success: "ph-tag-success",
4119
+ warning: "ph-tag-warning",
4120
+ danger: "ph-tag-danger",
4121
+ info: "ph-tag-info",
4122
+ muted: "ph-tag-muted",
4123
+ highlight: "ph-tag-highlight"
4124
+ };
4125
+ var Tag = (0, import_react26.forwardRef)(function Tag2(_a, ref) {
4126
+ var _b = _a, {
4127
+ type = "default",
4128
+ size = "md",
4129
+ icon,
4130
+ closable = false,
4131
+ onClose,
4132
+ className,
4133
+ children
4134
+ } = _b, props = __objRest(_b, [
4135
+ "type",
4136
+ "size",
4137
+ "icon",
4138
+ "closable",
4139
+ "onClose",
4140
+ "className",
4141
+ "children"
4142
+ ]);
4143
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)(
4144
+ "div",
4145
+ __spreadProps(__spreadValues({
4146
+ ref,
4147
+ className: cn(
4148
+ "ph-tag",
4149
+ typeClass2[type],
4150
+ size === "sm" && "ph-tag-sm",
4151
+ className
4152
+ )
4153
+ }, props), {
4154
+ children: [
4155
+ icon && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: "ph-tag__icon", children: icon }),
4156
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: "ph-tag__text", children }),
4157
+ closable && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
4158
+ "button",
4159
+ {
4160
+ type: "button",
4161
+ onClick: (e) => {
4162
+ e.stopPropagation();
4163
+ onClose == null ? void 0 : onClose();
4164
+ },
4165
+ className: "ph-tag__close",
4166
+ "aria-label": "Remove",
4167
+ 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" }) })
4168
+ }
4169
+ )
4170
+ ]
4171
+ })
4172
+ );
4173
+ });
4174
+ Tag.displayName = "Tag";
4175
+
4176
+ // src/components/ui/ProgressCircle.tsx
4177
+ var import_jsx_runtime54 = require("react/jsx-runtime");
4178
+ function ProgressCircle(_a) {
4179
+ var _b = _a, {
4180
+ progress,
4181
+ size = 40,
4182
+ strokeWidth: sw,
4183
+ children,
4184
+ className
4185
+ } = _b, props = __objRest(_b, [
4186
+ "progress",
4187
+ "size",
4188
+ "strokeWidth",
4189
+ "children",
4190
+ "className"
4191
+ ]);
4192
+ const stroke = sw != null ? sw : size * 0.08;
4193
+ const radius = (size - stroke) / 2;
4194
+ const circumference = 2 * Math.PI * radius;
4195
+ const offset = circumference - Math.min(1, Math.max(0, progress)) * circumference;
4196
+ return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
4197
+ "span",
4198
+ __spreadProps(__spreadValues({
4199
+ className: cn("ph-progress-circle", className),
4200
+ style: { width: size, height: size },
4201
+ role: "progressbar",
4202
+ "aria-valuenow": Math.round(progress * 100),
4203
+ "aria-valuemin": 0,
4204
+ "aria-valuemax": 100
4205
+ }, props), {
4206
+ children: [
4207
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)("svg", { width: size, height: size, children: [
4208
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
4209
+ "circle",
4210
+ {
4211
+ cx: size / 2,
4212
+ cy: size / 2,
4213
+ r: radius,
4214
+ fill: "none",
4215
+ stroke: "currentColor",
4216
+ strokeWidth: stroke,
4217
+ opacity: 0.15
4218
+ }
4219
+ ),
4220
+ /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
4221
+ "circle",
4222
+ {
4223
+ cx: size / 2,
4224
+ cy: size / 2,
4225
+ r: radius,
4226
+ fill: "none",
4227
+ stroke: "currentColor",
4228
+ strokeWidth: stroke,
4229
+ strokeDasharray: circumference,
4230
+ strokeDashoffset: offset,
4231
+ strokeLinecap: "round",
4232
+ transform: `rotate(-90 ${size / 2} ${size / 2})`,
4233
+ className: "ph-progress-circle__bar"
4234
+ }
4235
+ )
4236
+ ] }),
4237
+ children && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("span", { className: "ph-progress-circle__content", children })
4238
+ ]
4239
+ })
4240
+ );
4241
+ }
4242
+ ProgressCircle.displayName = "ProgressCircle";
4243
+
4244
+ // src/components/ui/Row.tsx
4245
+ var import_react27 = require("react");
4246
+ var import_jsx_runtime55 = require("react/jsx-runtime");
4247
+ var Row = (0, import_react27.forwardRef)(function Row2(_a, ref) {
4248
+ var _b = _a, {
4249
+ icon,
4250
+ sideIcon,
4251
+ status = "default",
4252
+ fullWidth = false,
4253
+ center = false,
4254
+ size = "md",
4255
+ className,
4256
+ children
4257
+ } = _b, props = __objRest(_b, [
4258
+ "icon",
4259
+ "sideIcon",
4260
+ "status",
4261
+ "fullWidth",
4262
+ "center",
4263
+ "size",
4264
+ "className",
4265
+ "children"
4266
+ ]);
4267
+ const symbolic = children === null || children === void 0 || children === false;
4268
+ return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
4269
+ "div",
4270
+ __spreadProps(__spreadValues({
4271
+ ref,
4272
+ className: cn(
4273
+ "ph-row",
4274
+ status !== "default" && `ph-row--${status}`,
4275
+ fullWidth && "ph-row--full-width",
4276
+ center && "ph-row--center",
4277
+ size === "sm" && "ph-row--sm",
4278
+ size === "lg" && "ph-row--lg",
4279
+ symbolic && "ph-row--symbolic",
4280
+ className
4281
+ )
4282
+ }, props), {
4283
+ children: /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "ph-row__main", children: [
4284
+ icon && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: "ph-row__icon", children: icon }),
4285
+ !symbolic && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "ph-row__content", children }),
4286
+ sideIcon && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: "ph-row__side-icon", children: sideIcon })
4287
+ ] })
4288
+ })
4289
+ );
4290
+ });
4291
+ Row.displayName = "Row";
4292
+
4293
+ // src/components/ui/Widget.tsx
4294
+ var import_jsx_runtime56 = require("react/jsx-runtime");
4295
+ function Widget({ title, onClose, actions, children, className }) {
4296
+ return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: cn("ph-widget", className), children: [
4297
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "ph-widget__header", children: [
4298
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: "ph-widget__title", children: title }),
4299
+ actions,
4300
+ 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" }) }) })
4301
+ ] }),
4302
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "ph-widget__content", children })
4303
+ ] });
4304
+ }
4305
+ Widget.displayName = "Widget";
4306
+
4307
+ // src/components/ui/Lettermark.tsx
4308
+ var import_react28 = require("react");
4309
+ var import_jsx_runtime57 = require("react/jsx-runtime");
4310
+ var Lettermark = (0, import_react28.forwardRef)(function Lettermark2(_a, ref) {
4311
+ var _b = _a, {
4312
+ name,
4313
+ index,
4314
+ outlined = false,
4315
+ rounded = false,
4316
+ size = "md",
4317
+ className
4318
+ } = _b, props = __objRest(_b, [
4319
+ "name",
4320
+ "index",
4321
+ "outlined",
4322
+ "rounded",
4323
+ "size",
4324
+ "className"
4325
+ ]);
4326
+ const letter = name ? typeof name === "number" ? String(Math.floor(name)) : String.fromCodePoint(name.codePointAt(0)).toLocaleUpperCase() : "?";
4327
+ return /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
4328
+ "div",
4329
+ __spreadProps(__spreadValues({
4330
+ ref,
4331
+ className: cn(
4332
+ "ph-lettermark",
4333
+ `ph-lettermark--${size}`,
4334
+ typeof index === "number" && `ph-lettermark--v-${index % 8 + 1}`,
4335
+ outlined && "ph-lettermark--outlined",
4336
+ rounded && "ph-lettermark--rounded",
4337
+ letter === "?" && "ph-lettermark--unknown",
4338
+ className
4339
+ ),
4340
+ "aria-hidden": "true"
4341
+ }, props), {
4342
+ children: letter
4343
+ })
4344
+ );
4345
+ });
4346
+ Lettermark.displayName = "Lettermark";
4347
+
4348
+ // src/components/ui/Splotch.tsx
4349
+ var import_jsx_runtime58 = require("react/jsx-runtime");
4350
+ var colorMap = {
4351
+ purple: "ph-splotch--purple",
4352
+ blue: "ph-splotch--blue",
4353
+ green: "ph-splotch--green",
4354
+ black: "ph-splotch--black",
4355
+ white: "ph-splotch--white",
4356
+ orange: "ph-splotch--orange",
4357
+ red: "ph-splotch--red",
4358
+ yellow: "ph-splotch--yellow"
4359
+ };
4360
+ function Splotch(_a) {
4361
+ var _b = _a, { color, className } = _b, props = __objRest(_b, ["color", "className"]);
4362
+ return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
4363
+ "div",
4364
+ __spreadProps(__spreadValues({
4365
+ className: cn("ph-splotch", colorMap[color], className),
4366
+ "aria-hidden": "true"
4367
+ }, props), {
4368
+ children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "ph-splotch__paint" })
4369
+ })
4370
+ );
4371
+ }
4372
+ Splotch.displayName = "Splotch";
4373
+
4374
+ // src/components/ui/Popover.tsx
4375
+ var import_react29 = require("react");
4376
+ var import_jsx_runtime59 = require("react/jsx-runtime");
4377
+ function Popover(_a) {
4378
+ var _b = _a, {
4379
+ trigger,
4380
+ children,
4381
+ open: controlledOpen,
4382
+ onOpenChange,
4383
+ placement = "bottom",
4384
+ matchTriggerWidth = false,
4385
+ padded = true,
4386
+ className
4387
+ } = _b, props = __objRest(_b, [
4388
+ "trigger",
4389
+ "children",
4390
+ "open",
4391
+ "onOpenChange",
4392
+ "placement",
4393
+ "matchTriggerWidth",
4394
+ "padded",
4395
+ "className"
4396
+ ]);
4397
+ var _a2;
4398
+ const [internalOpen, setInternalOpen] = (0, import_react29.useState)(false);
4399
+ const isOpen = controlledOpen != null ? controlledOpen : internalOpen;
4400
+ const setOpen = onOpenChange != null ? onOpenChange : setInternalOpen;
4401
+ const triggerRef = (0, import_react29.useRef)(null);
4402
+ const panelRef = (0, import_react29.useRef)(null);
4403
+ (0, import_react29.useEffect)(() => {
4404
+ if (!isOpen) return;
4405
+ const handleClick = (e) => {
4406
+ if (triggerRef.current && !triggerRef.current.contains(e.target) && panelRef.current && !panelRef.current.contains(e.target)) {
4407
+ setOpen(false);
4408
+ }
4409
+ };
4410
+ document.addEventListener("mousedown", handleClick);
4411
+ return () => document.removeEventListener("mousedown", handleClick);
4412
+ }, [isOpen, setOpen]);
4413
+ return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", __spreadProps(__spreadValues({ className: cn("ph-popover relative inline-flex", className) }, props), { children: [
4414
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
4415
+ "div",
4416
+ {
4417
+ ref: triggerRef,
4418
+ onClick: () => setOpen(!isOpen),
4419
+ className: "ph-popover__trigger",
4420
+ children: trigger
4421
+ }
4422
+ ),
4423
+ isOpen && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
4424
+ "div",
4425
+ {
4426
+ ref: panelRef,
4427
+ className: cn(
4428
+ "ph-popover__panel",
4429
+ `ph-popover--${placement}`,
4430
+ padded && "ph-popover__panel--padded",
4431
+ matchTriggerWidth && "ph-popover__panel--match"
4432
+ ),
4433
+ style: matchTriggerWidth ? { width: (_a2 = triggerRef.current) == null ? void 0 : _a2.offsetWidth } : void 0,
4434
+ children
4435
+ }
4436
+ )
4437
+ ] }));
4438
+ }
4439
+ Popover.displayName = "Popover";
4440
+
4441
+ // src/components/ui/LoadingBar.tsx
4442
+ var import_jsx_runtime60 = require("react/jsx-runtime");
4443
+ function LoadingBar(_a) {
4444
+ var _b = _a, { active = true, className } = _b, props = __objRest(_b, ["active", "className"]);
4445
+ return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
4446
+ "div",
4447
+ __spreadProps(__spreadValues({
4448
+ className: cn(
4449
+ "ph-loading-bar",
4450
+ active && "ph-loading-bar--active",
4451
+ className
4452
+ ),
4453
+ role: "progressbar",
4454
+ "aria-label": "Loading"
4455
+ }, props), {
4456
+ children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("div", { className: "ph-loading-bar__fill" })
4457
+ })
4458
+ );
4459
+ }
4460
+ LoadingBar.displayName = "LoadingBar";
4461
+
4462
+ // src/components/ui/Link.tsx
4463
+ var import_react30 = require("react");
4464
+ var import_jsx_runtime61 = require("react/jsx-runtime");
4465
+ var Link = (0, import_react30.forwardRef)(function Link2(_a, ref) {
4466
+ var _b = _a, {
4467
+ className,
4468
+ disabled = false,
4469
+ children
4470
+ } = _b, props = __objRest(_b, [
4471
+ "className",
4472
+ "disabled",
4473
+ "children"
4474
+ ]);
4475
+ return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
4476
+ "a",
4477
+ __spreadProps(__spreadValues({
4478
+ ref,
4479
+ className: cn(
4480
+ "ph-link",
4481
+ disabled && "ph-link--disabled pointer-events-none opacity-50",
4482
+ className
4483
+ ),
4484
+ tabIndex: disabled ? -1 : void 0,
4485
+ "aria-disabled": disabled || void 0
4486
+ }, props), {
4487
+ children
4488
+ })
4489
+ );
4490
+ });
4491
+ Link.displayName = "Link";
4492
+
4493
+ // src/components/ui/Spinner.tsx
4494
+ var import_jsx_runtime62 = require("react/jsx-runtime");
4495
+ function Spinner(_a) {
4496
+ var _b = _a, { size = "sm", textColored = false, className } = _b, props = __objRest(_b, ["size", "textColored", "className"]);
4497
+ return /* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
4498
+ "span",
4499
+ __spreadProps(__spreadValues({
4500
+ className: cn(
4501
+ "ph-spinner",
4502
+ `ph-spinner--${size}`,
4503
+ textColored && "ph-spinner--text-colored",
4504
+ className
4505
+ ),
4506
+ role: "status",
4507
+ "aria-label": "Loading"
4508
+ }, props), {
4509
+ 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: [
4510
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("circle", { cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "3", opacity: 0.2 }),
4511
+ /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("path", { d: "M12 2a10 10 0 0 1 10 10", stroke: "currentColor", strokeWidth: "3", strokeLinecap: "round" })
4512
+ ] })
4513
+ })
4514
+ );
4515
+ }
4516
+ Spinner.displayName = "Spinner";
4517
+
4518
+ // src/components/ui/Snack.tsx
4519
+ var import_react31 = require("react");
4520
+ var import_jsx_runtime63 = require("react/jsx-runtime");
4521
+ var Snack = (0, import_react31.forwardRef)(function Snack2(_a, ref) {
4522
+ var _b = _a, {
4523
+ type = "regular",
4524
+ onClose,
4525
+ wrap = false,
4526
+ className,
4527
+ children
4528
+ } = _b, props = __objRest(_b, [
4529
+ "type",
4530
+ "onClose",
4531
+ "wrap",
4532
+ "className",
4533
+ "children"
4534
+ ]);
4535
+ return /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(
4536
+ "span",
4537
+ __spreadProps(__spreadValues({
4538
+ ref,
4539
+ className: cn(
4540
+ "ph-snack",
4541
+ type === "pill" && "ph-snack--pill",
4542
+ !wrap && "truncate",
4543
+ className
4544
+ ),
4545
+ title: typeof children === "string" ? children : void 0
4546
+ }, props), {
4547
+ children: [
4548
+ /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("span", { className: "ph-snack__text", children }),
4549
+ onClose && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
4550
+ "button",
4551
+ {
4552
+ type: "button",
4553
+ onClick: (e) => {
4554
+ e.stopPropagation();
4555
+ onClose();
4556
+ },
4557
+ className: "ph-snack__close",
4558
+ "aria-label": "Remove",
4559
+ 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" }) })
4560
+ }
4561
+ )
4562
+ ]
4563
+ })
4564
+ );
4565
+ });
4566
+ Snack.displayName = "Snack";
4567
+
4568
+ // src/components/ui/Combobox.tsx
4569
+ var import_react32 = require("react");
4570
+ var import_jsx_runtime64 = require("react/jsx-runtime");
4571
+ function Combobox({
4572
+ options,
4573
+ value = [],
4574
+ onChange,
4575
+ placeholder = "Search...",
4576
+ className,
4577
+ disabled
4578
+ }) {
4579
+ const [open, setOpen] = (0, import_react32.useState)(false);
4580
+ const [search, setSearch] = (0, import_react32.useState)("");
4581
+ const inputRef = (0, import_react32.useRef)(null);
4582
+ const containerRef = (0, import_react32.useRef)(null);
4583
+ const filtered = options.filter(
4584
+ (o) => o.label.toLowerCase().includes(search.toLowerCase())
4585
+ );
4586
+ const selectedSet = new Set(value);
4587
+ const toggle = (val) => {
4588
+ const next = selectedSet.has(val) ? value.filter((v) => v !== val) : [...value, val];
4589
+ onChange == null ? void 0 : onChange(next);
4590
+ };
4591
+ (0, import_react32.useEffect)(() => {
4592
+ if (!open) return;
4593
+ const handle = (e) => {
4594
+ if (containerRef.current && !containerRef.current.contains(e.target)) {
4595
+ setOpen(false);
4596
+ }
4597
+ };
4598
+ document.addEventListener("mousedown", handle);
4599
+ return () => document.removeEventListener("mousedown", handle);
4600
+ }, [open]);
4601
+ return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("div", { ref: containerRef, className: cn("ph-combobox relative", className), children: [
4602
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("div", { className: "ph-combobox__input-wrap", children: [
4603
+ value.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { className: "ph-combobox__chips", children: value.map((v) => {
4604
+ var _a, _b;
4605
+ const opt = options.find((o) => o.value === v);
4606
+ return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("span", { className: "ph-combobox__chip", children: [
4607
+ (_a = opt == null ? void 0 : opt.label) != null ? _a : v,
4608
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
4609
+ "button",
4610
+ {
4611
+ type: "button",
4612
+ onClick: () => toggle(v),
4613
+ className: "ph-combobox__chip-remove",
4614
+ "aria-label": `Remove ${(_b = opt == null ? void 0 : opt.label) != null ? _b : v}`,
4615
+ 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" }) })
4616
+ }
4617
+ )
4618
+ ] }, v);
4619
+ }) }),
4620
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
4621
+ "input",
4622
+ {
4623
+ ref: inputRef,
4624
+ type: "text",
4625
+ value: search,
4626
+ onChange: (e) => {
4627
+ setSearch(e.target.value);
4628
+ setOpen(true);
4629
+ },
4630
+ onFocus: () => setOpen(true),
4631
+ placeholder: value.length === 0 ? placeholder : "",
4632
+ disabled,
4633
+ className: "ph-combobox__input"
4634
+ }
4635
+ )
4636
+ ] }),
4637
+ 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)(
4638
+ "button",
4639
+ {
4640
+ type: "button",
4641
+ onClick: () => toggle(opt.value),
4642
+ className: cn(
4643
+ "ph-combobox__option",
4644
+ selectedSet.has(opt.value) && "ph-combobox__option--selected"
4645
+ ),
4646
+ children: [
4647
+ 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" }) }),
4648
+ /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("span", { children: opt.label })
4649
+ ]
4650
+ },
4651
+ opt.value
4652
+ )) })
4653
+ ] });
4654
+ }
4655
+ Combobox.displayName = "Combobox";
4656
+
4657
+ // src/components/ui/Autocomplete.tsx
4658
+ var import_react33 = require("react");
4659
+ var import_jsx_runtime65 = require("react/jsx-runtime");
4660
+ function Autocomplete(_a) {
4661
+ var _b = _a, {
4662
+ options,
4663
+ onSelect,
4664
+ className,
4665
+ value: controlledValue,
4666
+ onChange,
4667
+ placeholder = "Type to search..."
4668
+ } = _b, inputProps = __objRest(_b, [
4669
+ "options",
4670
+ "onSelect",
4671
+ "className",
4672
+ "value",
4673
+ "onChange",
4674
+ "placeholder"
4675
+ ]);
4676
+ const [open, setOpen] = (0, import_react33.useState)(false);
4677
+ const [search, setSearch] = (0, import_react33.useState)("");
4678
+ const [activeIndex, setActiveIndex] = (0, import_react33.useState)(-1);
4679
+ const containerRef = (0, import_react33.useRef)(null);
4680
+ const inputRef = (0, import_react33.useRef)(null);
4681
+ const listRef = (0, import_react33.useRef)(null);
4682
+ const filtered = options.filter(
4683
+ (o) => o.label.toLowerCase().includes(search.toLowerCase())
4684
+ );
4685
+ const handleSelect = (opt) => {
4686
+ setSearch(opt.label);
4687
+ setOpen(false);
4688
+ onSelect == null ? void 0 : onSelect(opt);
4689
+ };
4690
+ (0, import_react33.useEffect)(() => {
4691
+ if (!open) {
4692
+ setActiveIndex(-1);
4693
+ return;
4694
+ }
4695
+ const handle = (e) => {
4696
+ if (containerRef.current && !containerRef.current.contains(e.target)) {
4697
+ setOpen(false);
4698
+ }
4699
+ };
4700
+ const handleKey = (e) => {
4701
+ if (e.key === "ArrowDown") {
4702
+ setActiveIndex((i) => Math.min(i + 1, filtered.length - 1));
4703
+ e.preventDefault();
4704
+ }
4705
+ if (e.key === "ArrowUp") {
4706
+ setActiveIndex((i) => Math.max(i - 1, 0));
4707
+ e.preventDefault();
4708
+ }
4709
+ if (e.key === "Enter" && activeIndex >= 0) {
4710
+ handleSelect(filtered[activeIndex]);
4711
+ e.preventDefault();
4712
+ }
4713
+ if (e.key === "Escape") {
4714
+ setOpen(false);
4715
+ }
4716
+ };
4717
+ document.addEventListener("mousedown", handle);
4718
+ document.addEventListener("keydown", handleKey);
4719
+ return () => {
4720
+ document.removeEventListener("mousedown", handle);
4721
+ document.removeEventListener("keydown", handleKey);
4722
+ };
4723
+ }, [open, filtered, activeIndex]);
4724
+ (0, import_react33.useEffect)(() => {
4725
+ if (activeIndex >= 0 && listRef.current) {
4726
+ const el = listRef.current.children[activeIndex];
4727
+ el == null ? void 0 : el.scrollIntoView({ block: "nearest" });
4728
+ }
4729
+ }, [activeIndex]);
4730
+ return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)("div", { ref: containerRef, className: cn("ph-autocomplete relative", className), children: [
4731
+ /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
4732
+ "input",
4733
+ __spreadValues({
4734
+ ref: inputRef,
4735
+ type: "text",
4736
+ value: search,
4737
+ onChange: (e) => {
4738
+ setSearch(e.target.value);
4739
+ setOpen(true);
4740
+ onChange == null ? void 0 : onChange(e);
4741
+ },
4742
+ onFocus: () => setOpen(true),
4743
+ placeholder,
4744
+ className: "ph-input w-full"
4745
+ }, inputProps)
4746
+ ),
4747
+ 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)(
4748
+ "button",
4749
+ {
4750
+ type: "button",
4751
+ role: "option",
4752
+ "aria-selected": i === activeIndex,
4753
+ onMouseDown: () => handleSelect(opt),
4754
+ onMouseEnter: () => setActiveIndex(i),
4755
+ className: cn(
4756
+ "ph-autocomplete__option",
4757
+ i === activeIndex && "ph-autocomplete__option--active"
4758
+ ),
4759
+ children: opt.label
4760
+ },
4761
+ opt.value
4762
+ )) })
4763
+ ] });
4764
+ }
4765
+ Autocomplete.displayName = "Autocomplete";
4766
+
4767
+ // src/components/ui/ContextMenu.tsx
4768
+ var import_react34 = require("react");
4769
+ var import_jsx_runtime66 = require("react/jsx-runtime");
4770
+ function ContextMenu(_a) {
4771
+ var _b = _a, { items, children, className } = _b, props = __objRest(_b, ["items", "children", "className"]);
4772
+ const [open, setOpen] = (0, import_react34.useState)(false);
4773
+ const [pos, setPos] = (0, import_react34.useState)({ x: 0, y: 0 });
4774
+ const menuRef = (0, import_react34.useRef)(null);
4775
+ (0, import_react34.useEffect)(() => {
4776
+ if (!open) return;
4777
+ const handle = (e) => {
4778
+ if (menuRef.current && !menuRef.current.contains(e.target)) {
4779
+ setOpen(false);
4780
+ }
4781
+ };
4782
+ const handleKey = (e) => {
4783
+ if (e.key === "Escape") setOpen(false);
4784
+ };
4785
+ document.addEventListener("mousedown", handle);
4786
+ document.addEventListener("keydown", handleKey);
4787
+ return () => {
4788
+ document.removeEventListener("mousedown", handle);
4789
+ document.removeEventListener("keydown", handleKey);
4790
+ };
4791
+ }, [open]);
4792
+ return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(
4793
+ "div",
4794
+ __spreadProps(__spreadValues({
4795
+ className: cn("ph-context-menu", className),
4796
+ onContextMenu: (e) => {
4797
+ e.preventDefault();
4798
+ setPos({ x: e.clientX, y: e.clientY });
4799
+ setOpen(true);
4800
+ }
4801
+ }, props), {
4802
+ children: [
4803
+ children,
4804
+ open && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
4805
+ "div",
4806
+ {
4807
+ ref: menuRef,
4808
+ className: "ph-context-menu__panel",
4809
+ style: { left: pos.x, top: pos.y },
4810
+ children: items.map(
4811
+ (item, i) => item.separator ? /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: "ph-context-menu__separator" }, i) : /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(
4812
+ "button",
4813
+ {
4814
+ type: "button",
4815
+ disabled: item.disabled,
4816
+ onClick: () => {
4817
+ var _a2;
4818
+ (_a2 = item.onClick) == null ? void 0 : _a2.call(item);
4819
+ setOpen(false);
4820
+ },
4821
+ className: "ph-context-menu__item",
4822
+ children: [
4823
+ item.icon && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { className: "ph-context-menu__icon", children: item.icon }),
4824
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { children: item.label })
4825
+ ]
4826
+ },
4827
+ i
4828
+ )
4829
+ )
4830
+ }
4831
+ )
4832
+ ]
4833
+ })
4834
+ );
4835
+ }
4836
+ ContextMenu.displayName = "ContextMenu";
4837
+
4838
+ // src/components/ui/Resizable.tsx
4839
+ var import_react35 = require("react");
4840
+ var import_jsx_runtime67 = require("react/jsx-runtime");
4841
+ function Resizable(_a) {
4842
+ var _b = _a, {
4843
+ left,
4844
+ right,
4845
+ defaultLeftWidth = 50,
4846
+ minLeftWidth = 20,
4847
+ minRightWidth = 20,
4848
+ className
4849
+ } = _b, props = __objRest(_b, [
4850
+ "left",
4851
+ "right",
4852
+ "defaultLeftWidth",
4853
+ "minLeftWidth",
4854
+ "minRightWidth",
4855
+ "className"
4856
+ ]);
4857
+ const [leftPercent, setLeftPercent] = (0, import_react35.useState)(defaultLeftWidth);
4858
+ const dragging = (0, import_react35.useRef)(false);
4859
+ const containerRef = (0, import_react35.useRef)(null);
4860
+ const handleMouseDown = (0, import_react35.useCallback)((e) => {
4861
+ e.preventDefault();
4862
+ dragging.current = true;
4863
+ const startX = e.clientX;
4864
+ const startPercent = leftPercent;
4865
+ const handleMove = (ev) => {
4866
+ if (!dragging.current || !containerRef.current) return;
4867
+ const rect = containerRef.current.getBoundingClientRect();
4868
+ const delta = (ev.clientX - startX) / rect.width * 100;
4869
+ const newVal = Math.max(minLeftWidth, Math.min(100 - minRightWidth, startPercent + delta));
4870
+ setLeftPercent(newVal);
4871
+ };
4872
+ const handleUp = () => {
4873
+ dragging.current = false;
4874
+ document.removeEventListener("mousemove", handleMove);
4875
+ document.removeEventListener("mouseup", handleUp);
4876
+ };
4877
+ document.addEventListener("mousemove", handleMove);
4878
+ document.addEventListener("mouseup", handleUp);
4879
+ }, [leftPercent, minLeftWidth, minRightWidth]);
4880
+ return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(
4881
+ "div",
4882
+ __spreadProps(__spreadValues({
4883
+ ref: containerRef,
4884
+ className: cn("ph-resizable flex overflow-hidden", className)
4885
+ }, props), {
4886
+ children: [
4887
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "ph-resizable__left overflow-auto", style: { width: `${leftPercent}%` }, children: left }),
4888
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
4889
+ "div",
4890
+ {
4891
+ className: "ph-resizable__handle cursor-col-resize shrink-0",
4892
+ onMouseDown: handleMouseDown
4893
+ }
4894
+ ),
4895
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "ph-resizable__right flex-1 overflow-auto", children: right })
4896
+ ]
4897
+ })
4898
+ );
4899
+ }
4900
+ Resizable.displayName = "Resizable";
4901
+
4902
+ // src/components/ui/ScrollArea.tsx
4903
+ var import_react36 = require("react");
4904
+ var import_jsx_runtime68 = require("react/jsx-runtime");
4905
+ function ScrollArea(_a) {
4906
+ var _b = _a, {
4907
+ children,
4908
+ orientation = "vertical",
4909
+ className
4910
+ } = _b, props = __objRest(_b, [
4911
+ "children",
4912
+ "orientation",
4913
+ "className"
4914
+ ]);
4915
+ const viewportRef = (0, import_react36.useRef)(null);
4916
+ const [showTop, setShowTop] = (0, import_react36.useState)(false);
4917
+ const [showBottom, setShowBottom] = (0, import_react36.useState)(false);
4918
+ (0, import_react36.useEffect)(() => {
4919
+ const el = viewportRef.current;
4920
+ if (!el) return;
4921
+ const update = () => {
4922
+ setShowTop(el.scrollTop > 4);
4923
+ setShowBottom(el.scrollTop < el.scrollHeight - el.clientHeight - 4);
4924
+ };
4925
+ update();
4926
+ el.addEventListener("scroll", update, { passive: true });
4927
+ const ro = new ResizeObserver(update);
4928
+ ro.observe(el);
4929
+ return () => {
4930
+ el.removeEventListener("scroll", update);
4931
+ ro.disconnect();
4932
+ };
4933
+ }, []);
4934
+ return /* @__PURE__ */ (0, import_jsx_runtime68.jsxs)(
4935
+ "div",
4936
+ __spreadProps(__spreadValues({
4937
+ className: cn(
4938
+ "ph-scroll-area relative overflow-hidden",
4939
+ orientation === "horizontal" && "overflow-x-auto",
4940
+ orientation === "both" && "overflow-auto",
4941
+ className
4942
+ )
4943
+ }, props), {
4944
+ children: [
4945
+ showTop && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "ph-scroll-area__shadow-top" }),
4946
+ /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { ref: viewportRef, className: "ph-scroll-area__viewport overflow-y-auto overscroll-contain", children }),
4947
+ showBottom && /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("div", { className: "ph-scroll-area__shadow-bottom" })
4948
+ ]
4949
+ })
4950
+ );
4951
+ }
4952
+ ScrollArea.displayName = "ScrollArea";
4953
+
4954
+ // src/components/ui/NumberField.tsx
4955
+ var import_react37 = require("react");
4956
+ var import_jsx_runtime69 = require("react/jsx-runtime");
4957
+ function NumberField(_a) {
4958
+ var _b = _a, {
4959
+ value: controlledValue,
4960
+ onChange,
4961
+ min,
4962
+ max,
4963
+ step = 1,
4964
+ label,
4965
+ className,
4966
+ disabled,
4967
+ defaultValue
4968
+ } = _b, inputProps = __objRest(_b, [
4969
+ "value",
4970
+ "onChange",
4971
+ "min",
4972
+ "max",
4973
+ "step",
4974
+ "label",
4975
+ "className",
4976
+ "disabled",
4977
+ "defaultValue"
4978
+ ]);
4979
+ const [internal, setInternal] = (0, import_react37.useState)(controlledValue != null ? controlledValue : 0);
4980
+ const value = controlledValue != null ? controlledValue : internal;
4981
+ const set = (v) => {
4982
+ const clamped = Math.max(min != null ? min : -Infinity, Math.min(max != null ? max : Infinity, v));
4983
+ setInternal(clamped);
4984
+ onChange == null ? void 0 : onChange(clamped);
4985
+ };
4986
+ return /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: cn("ph-number-field", className), children: [
4987
+ label && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("label", { className: "ph-label", children: label }),
4988
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "ph-number-field__control", children: [
4989
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
4990
+ "button",
4991
+ {
4992
+ type: "button",
4993
+ disabled: disabled || min !== void 0 && value <= min,
4994
+ onClick: () => set(value - step),
4995
+ className: "ph-number-field__btn",
4996
+ "aria-label": "Decrease",
4997
+ 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" }) })
4998
+ }
4999
+ ),
5000
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
5001
+ "input",
5002
+ __spreadValues({
5003
+ type: "number",
5004
+ value,
5005
+ onChange: (e) => set(Number(e.target.value)),
5006
+ disabled,
5007
+ min,
5008
+ max,
5009
+ step,
5010
+ className: "ph-number-field__input"
5011
+ }, inputProps)
5012
+ ),
5013
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
5014
+ "button",
5015
+ {
5016
+ type: "button",
5017
+ disabled: disabled || max !== void 0 && value >= max,
5018
+ onClick: () => set(value + step),
5019
+ className: "ph-number-field__btn",
5020
+ "aria-label": "Increase",
5021
+ 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" }) })
5022
+ }
5023
+ )
5024
+ ] })
5025
+ ] });
5026
+ }
5027
+ NumberField.displayName = "NumberField";
5028
+
5029
+ // src/components/ui/InputGroup.tsx
5030
+ var import_jsx_runtime70 = require("react/jsx-runtime");
5031
+ function InputGroup(_a) {
5032
+ var _b = _a, { children, className } = _b, props = __objRest(_b, ["children", "className"]);
5033
+ return /* @__PURE__ */ (0, import_jsx_runtime70.jsx)("div", __spreadProps(__spreadValues({ className: cn("ph-input-group", className) }, props), { children }));
5034
+ }
5035
+ InputGroup.displayName = "InputGroup";
5036
+
5037
+ // src/components/ui/ButtonGroup.tsx
5038
+ var import_jsx_runtime71 = require("react/jsx-runtime");
5039
+ function ButtonGroup(_a) {
5040
+ var _b = _a, { children, className } = _b, props = __objRest(_b, ["children", "className"]);
5041
+ return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("div", __spreadProps(__spreadValues({ className: cn("ph-btn-group", className) }, props), { children }));
5042
+ }
5043
+ ButtonGroup.displayName = "ButtonGroup";
5044
+
5045
+ // src/components/ui/Toggle.tsx
5046
+ var import_react38 = require("react");
5047
+ var import_jsx_runtime72 = require("react/jsx-runtime");
5048
+ var ToggleButton = (0, import_react38.forwardRef)(function ToggleButton2(_a, ref) {
5049
+ var _b = _a, {
5050
+ pressed = false,
5051
+ onPressedChange,
5052
+ icon,
5053
+ children,
5054
+ className
5055
+ } = _b, props = __objRest(_b, [
5056
+ "pressed",
5057
+ "onPressedChange",
5058
+ "icon",
5059
+ "children",
5060
+ "className"
5061
+ ]);
5062
+ return /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(
5063
+ "button",
5064
+ __spreadProps(__spreadValues({
5065
+ ref,
5066
+ type: "button",
5067
+ "aria-pressed": pressed,
5068
+ onClick: () => onPressedChange == null ? void 0 : onPressedChange(!pressed),
5069
+ className: cn(
5070
+ "ph-toggle-btn",
5071
+ pressed && "ph-toggle-btn--pressed",
5072
+ className
5073
+ )
5074
+ }, props), {
5075
+ children: [
5076
+ icon && /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("span", { className: "ph-toggle-btn__icon", children: icon }),
5077
+ children
5078
+ ]
5079
+ })
5080
+ );
5081
+ });
5082
+ ToggleButton.displayName = "ToggleButton";
5083
+ function ToggleGroup({
5084
+ type = "single",
5085
+ value,
5086
+ onValueChange,
5087
+ children,
5088
+ className
5089
+ }) {
5090
+ return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { className: cn("ph-toggle-group", className), role: "group", children });
5091
+ }
5092
+ ToggleGroup.displayName = "ToggleGroup";
5093
+
5094
+ // src/components/ui/Menubar.tsx
5095
+ var import_react39 = require("react");
5096
+ var import_jsx_runtime73 = require("react/jsx-runtime");
5097
+ function Menubar(_a) {
5098
+ var _b = _a, { items, className } = _b, props = __objRest(_b, ["items", "className"]);
5099
+ const [openIndex, setOpenIndex] = (0, import_react39.useState)(-1);
5100
+ const barRef = (0, import_react39.useRef)(null);
5101
+ (0, import_react39.useEffect)(() => {
5102
+ if (openIndex < 0) return;
5103
+ const handle = (e) => {
5104
+ if (barRef.current && !barRef.current.contains(e.target)) {
5105
+ setOpenIndex(-1);
5106
+ }
5107
+ };
5108
+ document.addEventListener("mousedown", handle);
5109
+ return () => document.removeEventListener("mousedown", handle);
5110
+ }, [openIndex]);
5111
+ 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: [
5112
+ /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
5113
+ "button",
5114
+ {
5115
+ type: "button",
5116
+ onClick: () => setOpenIndex(openIndex === i ? -1 : i),
5117
+ className: cn("ph-menubar__trigger", openIndex === i && "ph-menubar__trigger--open"),
5118
+ children: item.label
5119
+ }
5120
+ ),
5121
+ openIndex === i && item.items && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "ph-menubar__dropdown", children: item.items.map(
5122
+ (sub, j) => sub.separator ? /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "ph-menubar__separator" }, j) : /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
5123
+ "button",
5124
+ {
5125
+ type: "button",
5126
+ disabled: sub.disabled,
5127
+ onClick: () => {
5128
+ var _a2;
5129
+ (_a2 = sub.onClick) == null ? void 0 : _a2.call(sub);
5130
+ setOpenIndex(-1);
5131
+ },
5132
+ className: "ph-menubar__sub-item",
5133
+ children: sub.label
5134
+ },
5135
+ j
5136
+ )
5137
+ ) })
5138
+ ] }, i)) }));
5139
+ }
5140
+ Menubar.displayName = "Menubar";
5141
+
5142
+ // src/components/ui/AlertDialog.tsx
5143
+ var import_react40 = require("react");
5144
+ var import_jsx_runtime74 = require("react/jsx-runtime");
5145
+ function AlertDialog(_a) {
5146
+ var _b = _a, {
5147
+ isOpen: openProp,
5148
+ onClose,
5149
+ onConfirm,
5150
+ confirmText = "Confirm",
5151
+ cancelText = "Cancel",
5152
+ confirmProps,
5153
+ cancelProps,
5154
+ children,
5155
+ title
5156
+ } = _b, modalProps = __objRest(_b, [
5157
+ "isOpen",
5158
+ "onClose",
5159
+ "onConfirm",
5160
+ "confirmText",
5161
+ "cancelText",
5162
+ "confirmProps",
5163
+ "cancelProps",
5164
+ "children",
5165
+ "title"
5166
+ ]);
5167
+ const [loading, setLoading] = (0, import_react40.useState)(false);
5168
+ const isOpen = openProp != null ? openProp : true;
5169
+ const handleConfirm = async () => {
5170
+ if (!onConfirm) return;
5171
+ setLoading(true);
5172
+ try {
5173
+ await onConfirm();
5174
+ } finally {
5175
+ setLoading(false);
5176
+ }
5177
+ onClose == null ? void 0 : onClose();
5178
+ };
5179
+ return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(
5180
+ Modal,
5181
+ __spreadProps(__spreadValues({
5182
+ open: isOpen,
5183
+ onClose,
5184
+ title,
5185
+ footer: /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: "flex justify-end gap-2", children: [
5186
+ /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(Button, __spreadProps(__spreadValues({ variant: "secondary" }, cancelProps), { onClick: onClose, children: cancelText })),
5187
+ onConfirm && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(Button, __spreadProps(__spreadValues({ variant: "primary", loading }, confirmProps), { onClick: handleConfirm, children: confirmText }))
5188
+ ] })
5189
+ }, modalProps), {
5190
+ children
5191
+ })
5192
+ );
5193
+ }
5194
+ AlertDialog.displayName = "AlertDialog";
5195
+
5196
+ // src/components/ui/Dot.tsx
5197
+ var import_jsx_runtime75 = require("react/jsx-runtime");
5198
+ var colorMap2 = {
5199
+ green: "bg-ph-success",
5200
+ yellow: "bg-ph-warning",
5201
+ red: "bg-ph-danger",
5202
+ blue: "bg-ph-info",
5203
+ gray: "bg-ph-mutedtext"
5204
+ };
5205
+ function Dot(_a) {
5206
+ var _b = _a, { color = "gray", size = "md", className } = _b, props = __objRest(_b, ["color", "size", "className"]);
5207
+ return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(
5208
+ "span",
5209
+ __spreadValues({
5210
+ className: cn(
5211
+ "ph-dot inline-block shrink-0 rounded-full",
5212
+ size === "sm" ? "h-1.5 w-1.5" : "h-2.5 w-2.5",
5213
+ colorMap2[color],
5214
+ className
5215
+ ),
5216
+ "aria-hidden": "true"
5217
+ }, props)
5218
+ );
5219
+ }
5220
+ Dot.displayName = "Dot";
5221
+
5222
+ // src/components/ui/Collapsible.tsx
5223
+ var import_react41 = require("react");
5224
+ var import_jsx_runtime76 = require("react/jsx-runtime");
5225
+ function Collapsible(_a) {
5226
+ var _b = _a, {
5227
+ trigger,
5228
+ open: controlledOpen,
5229
+ onOpenChange,
5230
+ children,
5231
+ className
5232
+ } = _b, props = __objRest(_b, [
5233
+ "trigger",
5234
+ "open",
5235
+ "onOpenChange",
5236
+ "children",
5237
+ "className"
5238
+ ]);
5239
+ const [internalOpen, setInternalOpen] = (0, import_react41.useState)(false);
5240
+ const isOpen = controlledOpen != null ? controlledOpen : internalOpen;
5241
+ const setOpen = onOpenChange != null ? onOpenChange : setInternalOpen;
5242
+ return /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", __spreadProps(__spreadValues({ className: cn("ph-collapsible", className) }, props), { children: [
5243
+ /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)(
5244
+ "button",
5245
+ {
5246
+ type: "button",
5247
+ onClick: () => setOpen(!isOpen),
5248
+ className: "ph-collapsible__trigger",
5249
+ "aria-expanded": isOpen,
5250
+ children: [
5251
+ /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
5252
+ "svg",
5253
+ {
5254
+ className: cn("ph-collapsible__chevron", isOpen && "ph-collapsible__chevron--open"),
5255
+ width: "14",
5256
+ height: "14",
5257
+ viewBox: "0 0 14 14",
5258
+ fill: "none",
5259
+ stroke: "currentColor",
5260
+ strokeWidth: "2",
5261
+ strokeLinecap: "round",
5262
+ children: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("path", { d: "M4 5l3 3 3-3" })
5263
+ }
5264
+ ),
5265
+ trigger
5266
+ ]
5267
+ }
5268
+ ),
5269
+ isOpen && /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: "ph-collapsible__content", children })
5270
+ ] }));
5271
+ }
5272
+ Collapsible.displayName = "Collapsible";
5273
+
5274
+ // src/components/ui/Metric.tsx
5275
+ var import_jsx_runtime77 = require("react/jsx-runtime");
5276
+ function Metric(_a) {
5277
+ var _b = _a, {
5278
+ value,
5279
+ label,
5280
+ badge,
5281
+ trend,
5282
+ icon,
5283
+ className
5284
+ } = _b, props = __objRest(_b, [
5285
+ "value",
5286
+ "label",
5287
+ "badge",
5288
+ "trend",
5289
+ "icon",
5290
+ "className"
5291
+ ]);
5292
+ return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", __spreadProps(__spreadValues({ className: cn("ph-metric", className) }, props), { children: [
5293
+ /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: "ph-metric__header", children: [
5294
+ icon && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { className: "ph-metric__icon", children: icon }),
5295
+ /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { className: "ph-metric__label", children: label }),
5296
+ badge && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("span", { className: "ph-metric__badge", children: badge })
5297
+ ] }),
5298
+ /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "ph-metric__value", children: value }),
5299
+ trend && /* @__PURE__ */ (0, import_jsx_runtime77.jsx)("div", { className: "ph-metric__trend", children: trend })
5300
+ ] }));
5301
+ }
5302
+ Metric.displayName = "Metric";
5303
+
5304
+ // src/components/ui/Chip.tsx
5305
+ var import_react42 = require("react");
5306
+ var import_jsx_runtime78 = require("react/jsx-runtime");
5307
+ var Chip = (0, import_react42.forwardRef)(function Chip2(_a, ref) {
5308
+ var _b = _a, {
5309
+ selected = false,
5310
+ onRemove,
5311
+ children,
5312
+ className
5313
+ } = _b, props = __objRest(_b, [
5314
+ "selected",
5315
+ "onRemove",
5316
+ "children",
5317
+ "className"
5318
+ ]);
5319
+ return /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)(
5320
+ "button",
5321
+ __spreadProps(__spreadValues({
5322
+ ref,
5323
+ type: "button",
5324
+ className: cn(
5325
+ "ph-chip",
5326
+ selected && "ph-chip--selected",
5327
+ className
5328
+ )
5329
+ }, props), {
5330
+ children: [
5331
+ /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("span", { className: "ph-chip__text", children }),
5332
+ onRemove && /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
5333
+ "span",
5334
+ {
5335
+ role: "button",
5336
+ tabIndex: -1,
5337
+ onClick: (e) => {
5338
+ e.stopPropagation();
5339
+ onRemove();
5340
+ },
5341
+ className: "ph-chip__remove",
5342
+ "aria-label": "Remove",
5343
+ 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", children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("path", { d: "M2 2l6 6M8 2l-6 6" }) })
5344
+ }
5345
+ )
5346
+ ]
5347
+ })
5348
+ );
5349
+ });
5350
+ Chip.displayName = "Chip";
5351
+
5352
+ // src/components/ui/DataTable.tsx
5353
+ var import_react43 = require("react");
5354
+ var import_jsx_runtime79 = require("react/jsx-runtime");
5355
+ function DataTable({
5356
+ columns,
5357
+ data,
5358
+ pageSize = 10,
5359
+ searchable = false,
5360
+ searchPlaceholder = "Search...",
5361
+ className
5362
+ }) {
5363
+ const [search, setSearch] = (0, import_react43.useState)("");
5364
+ const [sortKey, setSortKey] = (0, import_react43.useState)(null);
5365
+ const [sortDir, setSortDir] = (0, import_react43.useState)("asc");
5366
+ const [page, setPage] = (0, import_react43.useState)(0);
5367
+ const filtered = (0, import_react43.useMemo)(() => {
5368
+ let items = data;
5369
+ if (search) {
5370
+ const q = search.toLowerCase();
5371
+ items = items.filter(
5372
+ (item) => Object.values(item).some((v) => String(v).toLowerCase().includes(q))
5373
+ );
5374
+ }
5375
+ if (sortKey) {
5376
+ items = [...items].sort((a, b) => {
5377
+ const av = a[sortKey];
5378
+ const bv = b[sortKey];
5379
+ const cmp = av < bv ? -1 : av > bv ? 1 : 0;
5380
+ return sortDir === "asc" ? cmp : -cmp;
5381
+ });
5382
+ }
5383
+ return items;
5384
+ }, [data, search, sortKey, sortDir]);
5385
+ const totalPages = Math.ceil(filtered.length / pageSize);
5386
+ const paged = filtered.slice(page * pageSize, (page + 1) * pageSize);
5387
+ const handleSort = (key) => {
5388
+ if (sortKey === key) {
5389
+ setSortDir((d) => d === "asc" ? "desc" : "asc");
5390
+ } else {
5391
+ setSortKey(key);
5392
+ setSortDir("asc");
5393
+ }
5394
+ };
5395
+ return /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: cn("ph-data-table", className), children: [
5396
+ searchable && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: "ph-data-table__toolbar", children: /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
5397
+ "input",
5398
+ {
5399
+ type: "text",
5400
+ value: search,
5401
+ onChange: (e) => {
5402
+ setSearch(e.target.value);
5403
+ setPage(0);
5404
+ },
5405
+ placeholder: searchPlaceholder,
5406
+ className: "ph-input ph-input-sm"
5407
+ }
5408
+ ) }),
5409
+ /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: "ph-table-wrap", children: /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("table", { className: "ph-table", children: [
5410
+ /* @__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)(
5411
+ "th",
5412
+ {
5413
+ className: cn(col.sortable && "cursor-pointer select-none", col.className),
5414
+ onClick: () => col.sortable && handleSort(col.key),
5415
+ children: [
5416
+ col.label,
5417
+ sortKey === col.key && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("span", { className: "ml-1 inline-block", children: sortDir === "asc" ? "\u2191" : "\u2193" })
5418
+ ]
5419
+ },
5420
+ col.key
5421
+ )) }) }),
5422
+ /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("tbody", { children: [
5423
+ 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)),
5424
+ 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" }) })
5425
+ ] })
5426
+ ] }) }),
5427
+ totalPages > 1 && /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("div", { className: "ph-data-table__pagination", children: [
5428
+ /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("button", { disabled: page === 0, onClick: () => setPage((p) => p - 1), className: "ph-data-table__page-btn", children: "Previous" }),
5429
+ /* @__PURE__ */ (0, import_jsx_runtime79.jsxs)("span", { className: "text-xs text-ph-mutedtext", children: [
5430
+ "Page ",
5431
+ page + 1,
5432
+ " of ",
5433
+ totalPages
5434
+ ] }),
5435
+ /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("button", { disabled: page >= totalPages - 1, onClick: () => setPage((p) => p + 1), className: "ph-data-table__page-btn", children: "Next" })
5436
+ ] })
5437
+ ] });
5438
+ }
5439
+ DataTable.displayName = "DataTable";
5440
+
5441
+ // src/components/ui/DatePicker.tsx
5442
+ var import_react44 = require("react");
5443
+ var import_jsx_runtime80 = require("react/jsx-runtime");
5444
+ var MONTHS = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
5445
+ var DAYS = ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"];
5446
+ function DatePicker(_a) {
5447
+ var _b = _a, { value, onChange, className } = _b, props = __objRest(_b, ["value", "onChange", "className"]);
5448
+ const [open, setOpen] = (0, import_react44.useState)(false);
5449
+ const [viewDate, setViewDate] = (0, import_react44.useState)(value != null ? value : /* @__PURE__ */ new Date());
5450
+ const selected = value;
5451
+ const days = (0, import_react44.useMemo)(() => {
5452
+ const year = viewDate.getFullYear();
5453
+ const month = viewDate.getMonth();
5454
+ const first = new Date(year, month, 1).getDay();
5455
+ const last = new Date(year, month + 1, 0).getDate();
5456
+ const prevLast = new Date(year, month, 0).getDate();
5457
+ const cells = [];
5458
+ for (let i = first - 1; i >= 0; i--) cells.push({ day: prevLast - i, month: "prev" });
5459
+ for (let d = 1; d <= last; d++) cells.push({ day: d, month: "current" });
5460
+ const remaining = 42 - cells.length;
5461
+ for (let d = 1; d <= remaining; d++) cells.push({ day: d, month: "next" });
5462
+ return cells;
5463
+ }, [viewDate]);
5464
+ const isSelected = (d, m) => {
5465
+ if (!selected || m !== "current") return false;
5466
+ const date = new Date(viewDate.getFullYear(), viewDate.getMonth(), d);
5467
+ return date.toDateString() === selected.toDateString();
5468
+ };
5469
+ const selectDay = (d, m) => {
5470
+ const month = m === "prev" ? viewDate.getMonth() - 1 : m === "next" ? viewDate.getMonth() + 1 : viewDate.getMonth();
5471
+ const year = month < 0 ? viewDate.getFullYear() - 1 : month > 11 ? viewDate.getFullYear() + 1 : viewDate.getFullYear();
5472
+ const adjustedMonth = (month % 12 + 12) % 12;
5473
+ const date = new Date(year, adjustedMonth, d);
5474
+ onChange == null ? void 0 : onChange(date);
5475
+ setOpen(false);
5476
+ };
5477
+ const nav = (delta) => setViewDate(new Date(viewDate.getFullYear(), viewDate.getMonth() + delta, 1));
5478
+ return /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: cn("ph-datepicker relative", className), children: [
5479
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
5480
+ "input",
5481
+ __spreadValues({
5482
+ type: "text",
5483
+ readOnly: true,
5484
+ value: selected ? `${MONTHS[selected.getMonth()]} ${selected.getDate()}, ${selected.getFullYear()}` : "",
5485
+ onFocus: () => setOpen(true),
5486
+ placeholder: "Pick a date",
5487
+ className: "ph-input w-full cursor-pointer"
5488
+ }, props)
5489
+ ),
5490
+ open && /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "ph-datepicker__dropdown", children: [
5491
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "ph-datepicker__nav", children: [
5492
+ /* @__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" }) }) }),
5493
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("span", { className: "ph-datepicker__nav-label", children: [
5494
+ MONTHS[viewDate.getMonth()],
5495
+ " ",
5496
+ viewDate.getFullYear()
5497
+ ] }),
5498
+ /* @__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" }) }) })
5499
+ ] }),
5500
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsxs)("div", { className: "ph-datepicker__grid", children: [
5501
+ DAYS.map((d) => /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "ph-datepicker__day-header", children: d }, d)),
5502
+ days.map((d, i) => /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
5503
+ "button",
5504
+ {
5505
+ type: "button",
5506
+ disabled: d.month !== "current",
5507
+ onClick: () => selectDay(d.day, d.month),
5508
+ className: cn(
5509
+ "ph-datepicker__day",
5510
+ d.month !== "current" && "ph-datepicker__day--other",
5511
+ isSelected(d.day, d.month) && "ph-datepicker__day--selected"
5512
+ ),
5513
+ children: d.day
5514
+ },
5515
+ i
5516
+ ))
5517
+ ] })
5518
+ ] })
5519
+ ] });
5520
+ }
5521
+ DatePicker.displayName = "DatePicker";
5522
+
5523
+ // src/components/ui/AppLayout.tsx
5524
+ var import_jsx_runtime81 = require("react/jsx-runtime");
5525
+ function AppLayout({ sidebar, children, sidebarWidth = 240, className }) {
5526
+ return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)(
5527
+ "div",
5528
+ {
5529
+ className: cn("ph-app-layout grid min-h-screen", className),
5530
+ style: { gridTemplateColumns: `${sidebarWidth}px minmax(0, 1fr)` },
5531
+ children: [
5532
+ /* @__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 }),
5533
+ /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("main", { className: "ph-app-layout__content min-w-0 overflow-y-auto bg-ph-canvas", children })
5534
+ ]
5535
+ }
5536
+ );
5537
+ }
5538
+
5539
+ // src/components/ui/Sidebar.tsx
5540
+ var import_jsx_runtime82 = require("react/jsx-runtime");
5541
+ function Sidebar({ groups, className, header, footer, collapsed = false, onCollapse }) {
5542
+ return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("nav", { className: cn("ph-sidebar flex flex-col h-full", collapsed && "ph-sidebar--collapsed", className), children: [
5543
+ header && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "ph-sidebar__header px-3 py-3 border-b border-ph-border-subtle", children: header }),
5544
+ /* @__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) => /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: "ph-sidebar__group", children: [
5545
+ !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 }),
5546
+ /* @__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)) })
5547
+ ] }, group.label)) }),
5548
+ footer && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("div", { className: "ph-sidebar__footer px-3 py-3 border-t border-ph-border-subtle", children: footer })
5549
+ ] });
5550
+ }
5551
+ function SidebarItem({ label, icon, badge, active, onClick, collapsed }) {
5552
+ const Comp = onClick ? "button" : "a";
5553
+ return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(
5554
+ Comp,
5555
+ {
5556
+ type: onClick ? "button" : void 0,
5557
+ href: onClick ? void 0 : void 0,
5558
+ onClick,
5559
+ className: cn(
5560
+ "ph-sidebar__item flex items-center gap-2.5 w-full rounded-md px-2.5 py-2 text-sm text-left transition",
5561
+ active ? "bg-ph-selected-bg text-ph-selected-text font-medium" : "text-ph-subtle hover:bg-ph-muted hover:text-ph-ink",
5562
+ collapsed && "justify-center px-2"
5563
+ ),
5564
+ title: collapsed ? label : void 0,
5565
+ children: [
5566
+ icon && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("span", { className: "ph-sidebar__item-icon shrink-0 w-4 h-4 flex items-center justify-center", children: icon }),
5567
+ !collapsed && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("span", { className: "ph-sidebar__item-label truncate flex-1", children: label }),
5568
+ !collapsed && badge && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("span", { className: "ph-sidebar__item-badge shrink-0", children: badge })
5569
+ ]
5570
+ }
5571
+ );
5572
+ }
5573
+ Sidebar.displayName = "Sidebar";
3780
5574
  // Annotate the CommonJS export names for ESM import in node:
3781
5575
  0 && (module.exports = {
3782
5576
  Accordion,
3783
5577
  Alert,
5578
+ AlertDialog,
5579
+ AppLayout,
3784
5580
  AuthCard,
3785
5581
  AuthDivider,
3786
5582
  AuthLayout,
5583
+ Autocomplete,
3787
5584
  Avatar,
3788
5585
  AvatarGroup,
3789
5586
  Badge,
5587
+ Banner,
3790
5588
  Breadcrumbs,
3791
5589
  Button,
3792
5590
  ButtonChrome,
5591
+ ButtonGroup,
3793
5592
  Calendar,
3794
5593
  Caption,
3795
5594
  Card,
3796
5595
  ChatBubble,
3797
5596
  Checkbox,
5597
+ Chip,
3798
5598
  CodeBlock,
5599
+ Collapsible,
3799
5600
  CollapsibleSection,
5601
+ Combobox,
3800
5602
  CommandPalette,
3801
5603
  ComponentDocs,
5604
+ ContextMenu,
5605
+ DataTable,
5606
+ DatePicker,
5607
+ Dialog,
3802
5608
  Display,
5609
+ Divider,
5610
+ Dot,
3803
5611
  Drawer,
3804
5612
  DropdownButton,
3805
5613
  DropdownItem,
@@ -3823,21 +5631,33 @@ function Timeline(_a) {
3823
5631
  IconByName,
3824
5632
  Indicator,
3825
5633
  Input,
5634
+ InputGroup,
3826
5635
  Kbd,
3827
5636
  Label,
3828
5637
  Lead,
5638
+ Lettermark,
5639
+ Link,
3829
5640
  Loader,
5641
+ LoadingBar,
3830
5642
  LoadingState,
5643
+ Menubar,
5644
+ Metric,
3831
5645
  Modal,
3832
5646
  Mono,
5647
+ NumberField,
3833
5648
  Overline,
3834
5649
  P,
3835
5650
  Pagination,
3836
5651
  Panel,
5652
+ Popover,
3837
5653
  Progress,
5654
+ ProgressCircle,
3838
5655
  Radio,
3839
5656
  Range,
3840
5657
  Rating,
5658
+ Resizable,
5659
+ Row,
5660
+ ScrollArea,
3841
5661
  SearchGroup,
3842
5662
  SearchInput,
3843
5663
  SegmentedControl,
@@ -3845,13 +5665,18 @@ function Timeline(_a) {
3845
5665
  SettingsLayout,
3846
5666
  SettingsNav,
3847
5667
  ShowcaseWrapper,
5668
+ Sidebar,
3848
5669
  Skeleton,
3849
5670
  Small,
5671
+ Snack,
3850
5672
  SortMenu,
5673
+ Spinner,
5674
+ Splotch,
3851
5675
  Stat,
3852
5676
  Stepper,
3853
5677
  Table,
3854
5678
  Tabs,
5679
+ Tag,
3855
5680
  Terminal,
3856
5681
  Textarea,
3857
5682
  ThemeDomSync,
@@ -3860,5 +5685,10 @@ function Timeline(_a) {
3860
5685
  Timeline,
3861
5686
  Toast,
3862
5687
  ToastStack,
3863
- Toggle
5688
+ Toggle,
5689
+ ToggleButton,
5690
+ ToggleGroup,
5691
+ Tooltip,
5692
+ TooltipProvider,
5693
+ Widget
3864
5694
  });