@boostdev/design-system-components 0.1.1

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 (233) hide show
  1. package/AGENTS.md +72 -0
  2. package/README.md +396 -0
  3. package/dist/index.cjs +2273 -0
  4. package/dist/index.css +2543 -0
  5. package/dist/index.d.cts +453 -0
  6. package/dist/index.d.ts +453 -0
  7. package/dist/index.js +2221 -0
  8. package/package.json +143 -0
  9. package/src/components/interaction/Button/Button.module.css +136 -0
  10. package/src/components/interaction/Button/Button.spec.tsx +50 -0
  11. package/src/components/interaction/Button/Button.stories.tsx +43 -0
  12. package/src/components/interaction/Button/Button.tsx +68 -0
  13. package/src/components/interaction/Button/index.ts +1 -0
  14. package/src/components/interaction/Command/Command.module.css +128 -0
  15. package/src/components/interaction/Command/Command.spec.tsx +60 -0
  16. package/src/components/interaction/Command/Command.stories.tsx +35 -0
  17. package/src/components/interaction/Command/Command.tsx +161 -0
  18. package/src/components/interaction/Command/index.ts +2 -0
  19. package/src/components/interaction/Dialog/Dialog.module.css +39 -0
  20. package/src/components/interaction/Dialog/Dialog.spec.tsx +43 -0
  21. package/src/components/interaction/Dialog/Dialog.stories.tsx +36 -0
  22. package/src/components/interaction/Dialog/Dialog.tsx +42 -0
  23. package/src/components/interaction/Dialog/index.ts +1 -0
  24. package/src/components/interaction/Drawer/Drawer.module.css +98 -0
  25. package/src/components/interaction/Drawer/Drawer.spec.tsx +43 -0
  26. package/src/components/interaction/Drawer/Drawer.stories.tsx +46 -0
  27. package/src/components/interaction/Drawer/Drawer.tsx +71 -0
  28. package/src/components/interaction/Drawer/index.ts +1 -0
  29. package/src/components/interaction/DropdownMenu/DropdownMenu.module.css +68 -0
  30. package/src/components/interaction/DropdownMenu/DropdownMenu.spec.tsx +74 -0
  31. package/src/components/interaction/DropdownMenu/DropdownMenu.stories.tsx +68 -0
  32. package/src/components/interaction/DropdownMenu/DropdownMenu.tsx +137 -0
  33. package/src/components/interaction/DropdownMenu/index.ts +1 -0
  34. package/src/components/interaction/Popover/Popover.module.css +39 -0
  35. package/src/components/interaction/Popover/Popover.spec.tsx +72 -0
  36. package/src/components/interaction/Popover/Popover.stories.tsx +47 -0
  37. package/src/components/interaction/Popover/Popover.tsx +78 -0
  38. package/src/components/interaction/Popover/index.ts +1 -0
  39. package/src/components/interaction/Rating/Rating.module.css +16 -0
  40. package/src/components/interaction/Rating/Rating.spec.tsx +30 -0
  41. package/src/components/interaction/Rating/Rating.stories.tsx +29 -0
  42. package/src/components/interaction/Rating/Rating.tsx +30 -0
  43. package/src/components/interaction/Rating/index.ts +1 -0
  44. package/src/components/interaction/Toast/Toast.module.css +48 -0
  45. package/src/components/interaction/Toast/Toast.spec.tsx +41 -0
  46. package/src/components/interaction/Toast/Toast.stories.tsx +57 -0
  47. package/src/components/interaction/Toast/Toast.tsx +64 -0
  48. package/src/components/interaction/Toast/index.ts +1 -0
  49. package/src/components/interaction/form/Checkbox/Checkbox.module.css +61 -0
  50. package/src/components/interaction/form/Checkbox/Checkbox.spec.tsx +39 -0
  51. package/src/components/interaction/form/Checkbox/Checkbox.stories.tsx +17 -0
  52. package/src/components/interaction/form/Checkbox/Checkbox.tsx +39 -0
  53. package/src/components/interaction/form/Checkbox/index.ts +1 -0
  54. package/src/components/interaction/form/Combobox/Combobox.module.css +104 -0
  55. package/src/components/interaction/form/Combobox/Combobox.spec.tsx +81 -0
  56. package/src/components/interaction/form/Combobox/Combobox.stories.tsx +25 -0
  57. package/src/components/interaction/form/Combobox/Combobox.tsx +182 -0
  58. package/src/components/interaction/form/Combobox/index.ts +1 -0
  59. package/src/components/interaction/form/FileInput/FileInput.module.css +79 -0
  60. package/src/components/interaction/form/FileInput/FileInput.spec.tsx +53 -0
  61. package/src/components/interaction/form/FileInput/FileInput.stories.tsx +17 -0
  62. package/src/components/interaction/form/FileInput/FileInput.tsx +99 -0
  63. package/src/components/interaction/form/FileInput/index.ts +1 -0
  64. package/src/components/interaction/form/FormInput/FormInput.module.css +37 -0
  65. package/src/components/interaction/form/FormInput/FormInput.spec.tsx +43 -0
  66. package/src/components/interaction/form/FormInput/FormInput.stories.tsx +17 -0
  67. package/src/components/interaction/form/FormInput/FormInput.tsx +47 -0
  68. package/src/components/interaction/form/FormInput/index.ts +1 -0
  69. package/src/components/interaction/form/NumberInput/NumberInput.module.css +78 -0
  70. package/src/components/interaction/form/NumberInput/NumberInput.spec.tsx +49 -0
  71. package/src/components/interaction/form/NumberInput/NumberInput.stories.tsx +17 -0
  72. package/src/components/interaction/form/NumberInput/NumberInput.tsx +106 -0
  73. package/src/components/interaction/form/NumberInput/index.ts +1 -0
  74. package/src/components/interaction/form/Radio/Radio.module.css +62 -0
  75. package/src/components/interaction/form/Radio/Radio.spec.tsx +38 -0
  76. package/src/components/interaction/form/Radio/Radio.stories.tsx +26 -0
  77. package/src/components/interaction/form/Radio/Radio.tsx +39 -0
  78. package/src/components/interaction/form/Radio/index.ts +1 -0
  79. package/src/components/interaction/form/Select/Select.module.css +64 -0
  80. package/src/components/interaction/form/Select/Select.spec.tsx +61 -0
  81. package/src/components/interaction/form/Select/Select.stories.tsx +24 -0
  82. package/src/components/interaction/form/Select/Select.tsx +72 -0
  83. package/src/components/interaction/form/Select/index.ts +1 -0
  84. package/src/components/interaction/form/Slider/Slider.module.css +99 -0
  85. package/src/components/interaction/form/Slider/Slider.spec.tsx +53 -0
  86. package/src/components/interaction/form/Slider/Slider.stories.tsx +18 -0
  87. package/src/components/interaction/form/Slider/Slider.tsx +71 -0
  88. package/src/components/interaction/form/Slider/index.ts +1 -0
  89. package/src/components/interaction/form/Switch/Switch.module.css +114 -0
  90. package/src/components/interaction/form/Switch/Switch.spec.tsx +48 -0
  91. package/src/components/interaction/form/Switch/Switch.stories.tsx +31 -0
  92. package/src/components/interaction/form/Switch/Switch.tsx +54 -0
  93. package/src/components/interaction/form/Switch/index.ts +1 -0
  94. package/src/components/interaction/form/Textarea/Textarea.module.css +44 -0
  95. package/src/components/interaction/form/Textarea/Textarea.spec.tsx +53 -0
  96. package/src/components/interaction/form/Textarea/Textarea.stories.tsx +18 -0
  97. package/src/components/interaction/form/Textarea/Textarea.tsx +44 -0
  98. package/src/components/interaction/form/Textarea/index.ts +1 -0
  99. package/src/components/interaction/form/atoms/InputContainer.module.css +9 -0
  100. package/src/components/interaction/form/atoms/InputContainer.tsx +9 -0
  101. package/src/components/interaction/form/atoms/Label.module.css +10 -0
  102. package/src/components/interaction/form/atoms/Label.tsx +15 -0
  103. package/src/components/interaction/form/atoms/Message.module.css +11 -0
  104. package/src/components/interaction/form/atoms/Message.tsx +17 -0
  105. package/src/components/layout/ButtonGroup/ButtonGroup.module.css +59 -0
  106. package/src/components/layout/ButtonGroup/ButtonGroup.spec.tsx +20 -0
  107. package/src/components/layout/ButtonGroup/ButtonGroup.stories.tsx +28 -0
  108. package/src/components/layout/ButtonGroup/ButtonGroup.tsx +17 -0
  109. package/src/components/layout/ButtonGroup/index.ts +1 -0
  110. package/src/components/layout/Card/Card.module.css +72 -0
  111. package/src/components/layout/Card/Card.spec.tsx +33 -0
  112. package/src/components/layout/Card/Card.stories.tsx +32 -0
  113. package/src/components/layout/Card/Card.tsx +45 -0
  114. package/src/components/layout/Card/index.ts +1 -0
  115. package/src/components/layout/IconWrapper/IconWrapper.module.css +24 -0
  116. package/src/components/layout/IconWrapper/IconWrapper.spec.tsx +19 -0
  117. package/src/components/layout/IconWrapper/IconWrapper.stories.tsx +22 -0
  118. package/src/components/layout/IconWrapper/IconWrapper.tsx +14 -0
  119. package/src/components/layout/IconWrapper/index.ts +1 -0
  120. package/src/components/layout/SectionHeader/SectionHeader.module.css +75 -0
  121. package/src/components/layout/SectionHeader/SectionHeader.spec.tsx +31 -0
  122. package/src/components/layout/SectionHeader/SectionHeader.stories.tsx +21 -0
  123. package/src/components/layout/SectionHeader/SectionHeader.tsx +32 -0
  124. package/src/components/layout/SectionHeader/index.ts +1 -0
  125. package/src/components/ui/Accordion/Accordion.module.css +87 -0
  126. package/src/components/ui/Accordion/Accordion.spec.tsx +78 -0
  127. package/src/components/ui/Accordion/Accordion.stories.tsx +34 -0
  128. package/src/components/ui/Accordion/Accordion.tsx +82 -0
  129. package/src/components/ui/Accordion/index.ts +1 -0
  130. package/src/components/ui/Alert/Alert.module.css +91 -0
  131. package/src/components/ui/Alert/Alert.spec.tsx +63 -0
  132. package/src/components/ui/Alert/Alert.stories.tsx +53 -0
  133. package/src/components/ui/Alert/Alert.tsx +54 -0
  134. package/src/components/ui/Alert/index.ts +1 -0
  135. package/src/components/ui/Avatar/Avatar.module.css +42 -0
  136. package/src/components/ui/Avatar/Avatar.spec.tsx +49 -0
  137. package/src/components/ui/Avatar/Avatar.stories.tsx +44 -0
  138. package/src/components/ui/Avatar/Avatar.tsx +45 -0
  139. package/src/components/ui/Avatar/index.ts +1 -0
  140. package/src/components/ui/Badge/Badge.module.css +46 -0
  141. package/src/components/ui/Badge/Badge.spec.tsx +19 -0
  142. package/src/components/ui/Badge/Badge.stories.tsx +29 -0
  143. package/src/components/ui/Badge/Badge.tsx +13 -0
  144. package/src/components/ui/Badge/index.ts +1 -0
  145. package/src/components/ui/Breadcrumb/Breadcrumb.module.css +50 -0
  146. package/src/components/ui/Breadcrumb/Breadcrumb.spec.tsx +44 -0
  147. package/src/components/ui/Breadcrumb/Breadcrumb.stories.tsx +48 -0
  148. package/src/components/ui/Breadcrumb/Breadcrumb.tsx +41 -0
  149. package/src/components/ui/Breadcrumb/index.ts +1 -0
  150. package/src/components/ui/Calendar/Calendar.module.css +120 -0
  151. package/src/components/ui/Calendar/Calendar.spec.tsx +64 -0
  152. package/src/components/ui/Calendar/Calendar.stories.tsx +59 -0
  153. package/src/components/ui/Calendar/Calendar.tsx +184 -0
  154. package/src/components/ui/Calendar/index.ts +1 -0
  155. package/src/components/ui/Carousel/Carousel.module.css +66 -0
  156. package/src/components/ui/Carousel/Carousel.spec.tsx +29 -0
  157. package/src/components/ui/Carousel/Carousel.stories.tsx +30 -0
  158. package/src/components/ui/Carousel/Carousel.tsx +64 -0
  159. package/src/components/ui/Carousel/index.ts +1 -0
  160. package/src/components/ui/DescriptionList/DescriptionList.module.css +43 -0
  161. package/src/components/ui/DescriptionList/DescriptionList.spec.tsx +31 -0
  162. package/src/components/ui/DescriptionList/DescriptionList.stories.tsx +21 -0
  163. package/src/components/ui/DescriptionList/DescriptionList.tsx +30 -0
  164. package/src/components/ui/DescriptionList/index.ts +1 -0
  165. package/src/components/ui/Link/Link.module.css +64 -0
  166. package/src/components/ui/Link/Link.spec.tsx +43 -0
  167. package/src/components/ui/Link/Link.stories.tsx +55 -0
  168. package/src/components/ui/Link/Link.tsx +42 -0
  169. package/src/components/ui/Link/index.ts +1 -0
  170. package/src/components/ui/Loading/Loading.module.css +33 -0
  171. package/src/components/ui/Loading/Loading.spec.tsx +19 -0
  172. package/src/components/ui/Loading/Loading.stories.tsx +27 -0
  173. package/src/components/ui/Loading/Loading.tsx +15 -0
  174. package/src/components/ui/Loading/index.ts +1 -0
  175. package/src/components/ui/NotificationBanner/NotificationBanner.module.css +79 -0
  176. package/src/components/ui/NotificationBanner/NotificationBanner.spec.tsx +42 -0
  177. package/src/components/ui/NotificationBanner/NotificationBanner.stories.tsx +30 -0
  178. package/src/components/ui/NotificationBanner/NotificationBanner.tsx +45 -0
  179. package/src/components/ui/NotificationBanner/index.ts +1 -0
  180. package/src/components/ui/Pagination/Pagination.module.css +78 -0
  181. package/src/components/ui/Pagination/Pagination.spec.tsx +67 -0
  182. package/src/components/ui/Pagination/Pagination.stories.tsx +40 -0
  183. package/src/components/ui/Pagination/Pagination.tsx +87 -0
  184. package/src/components/ui/Pagination/index.ts +1 -0
  185. package/src/components/ui/Progress/Progress.module.css +51 -0
  186. package/src/components/ui/Progress/Progress.spec.tsx +55 -0
  187. package/src/components/ui/Progress/Progress.stories.tsx +30 -0
  188. package/src/components/ui/Progress/Progress.tsx +43 -0
  189. package/src/components/ui/Progress/index.ts +1 -0
  190. package/src/components/ui/ProgressCircle/ProgressCircle.module.css +40 -0
  191. package/src/components/ui/ProgressCircle/ProgressCircle.spec.tsx +34 -0
  192. package/src/components/ui/ProgressCircle/ProgressCircle.stories.tsx +18 -0
  193. package/src/components/ui/ProgressCircle/ProgressCircle.tsx +75 -0
  194. package/src/components/ui/ProgressCircle/index.ts +1 -0
  195. package/src/components/ui/Separator/Separator.module.css +23 -0
  196. package/src/components/ui/Separator/Separator.spec.tsx +30 -0
  197. package/src/components/ui/Separator/Separator.stories.tsx +40 -0
  198. package/src/components/ui/Separator/Separator.tsx +21 -0
  199. package/src/components/ui/Separator/index.ts +1 -0
  200. package/src/components/ui/Skeleton/Skeleton.module.css +24 -0
  201. package/src/components/ui/Skeleton/Skeleton.spec.tsx +19 -0
  202. package/src/components/ui/Skeleton/Skeleton.stories.tsx +25 -0
  203. package/src/components/ui/Skeleton/Skeleton.tsx +12 -0
  204. package/src/components/ui/Skeleton/index.ts +1 -0
  205. package/src/components/ui/SkipLink/SkipLink.module.css +30 -0
  206. package/src/components/ui/SkipLink/SkipLink.spec.tsx +24 -0
  207. package/src/components/ui/SkipLink/SkipLink.stories.tsx +24 -0
  208. package/src/components/ui/SkipLink/SkipLink.tsx +14 -0
  209. package/src/components/ui/SkipLink/index.ts +1 -0
  210. package/src/components/ui/Table/Table.module.css +111 -0
  211. package/src/components/ui/Table/Table.spec.tsx +69 -0
  212. package/src/components/ui/Table/Table.stories.tsx +53 -0
  213. package/src/components/ui/Table/Table.tsx +98 -0
  214. package/src/components/ui/Table/index.ts +1 -0
  215. package/src/components/ui/Tabs/Tabs.module.css +61 -0
  216. package/src/components/ui/Tabs/Tabs.spec.tsx +91 -0
  217. package/src/components/ui/Tabs/Tabs.stories.tsx +59 -0
  218. package/src/components/ui/Tabs/Tabs.tsx +100 -0
  219. package/src/components/ui/Tabs/index.ts +1 -0
  220. package/src/components/ui/Tooltip/Tooltip.module.css +69 -0
  221. package/src/components/ui/Tooltip/Tooltip.spec.tsx +46 -0
  222. package/src/components/ui/Tooltip/Tooltip.stories.tsx +69 -0
  223. package/src/components/ui/Tooltip/Tooltip.tsx +38 -0
  224. package/src/components/ui/Tooltip/index.ts +1 -0
  225. package/src/components/ui/Typography/Typography.module.css +41 -0
  226. package/src/components/ui/Typography/Typography.spec.tsx +39 -0
  227. package/src/components/ui/Typography/Typography.stories.tsx +31 -0
  228. package/src/components/ui/Typography/Typography.tsx +28 -0
  229. package/src/components/ui/Typography/index.ts +1 -0
  230. package/src/css/index.css +55 -0
  231. package/src/index.ts +54 -0
  232. package/src/test/setup.ts +1 -0
  233. package/src/typings.d.ts +4 -0
package/dist/index.cjs ADDED
@@ -0,0 +1,2273 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/index.ts
21
+ var index_exports = {};
22
+ __export(index_exports, {
23
+ Accordion: () => Accordion,
24
+ Alert: () => Alert,
25
+ Avatar: () => Avatar,
26
+ Badge: () => Badge,
27
+ Breadcrumb: () => Breadcrumb,
28
+ Button: () => Button,
29
+ ButtonGroup: () => ButtonGroup,
30
+ Calendar: () => Calendar,
31
+ Card: () => Card,
32
+ Carousel: () => Carousel,
33
+ Checkbox: () => Checkbox,
34
+ Combobox: () => Combobox,
35
+ Command: () => Command,
36
+ DescriptionList: () => DescriptionList,
37
+ Dialog: () => Dialog,
38
+ Drawer: () => Drawer,
39
+ DropdownMenu: () => DropdownMenu,
40
+ FileInput: () => FileInput,
41
+ FormInput: () => FormInput,
42
+ IconWrapper: () => IconWrapper,
43
+ Link: () => Link,
44
+ Loading: () => Loading,
45
+ NotificationBanner: () => NotificationBanner,
46
+ NumberInput: () => NumberInput,
47
+ Pagination: () => Pagination,
48
+ Popover: () => Popover,
49
+ Progress: () => Progress,
50
+ ProgressCircle: () => ProgressCircle,
51
+ Radio: () => Radio,
52
+ Rating: () => Rating,
53
+ SectionHeader: () => SectionHeader,
54
+ Select: () => Select,
55
+ Separator: () => Separator,
56
+ Skeleton: () => Skeleton,
57
+ SkipLink: () => SkipLink,
58
+ Slider: () => Slider,
59
+ Switch: () => Switch,
60
+ Table: () => Table,
61
+ Tabs: () => Tabs,
62
+ Textarea: () => Textarea,
63
+ ToastProvider: () => ToastProvider,
64
+ Tooltip: () => Tooltip,
65
+ Typography: () => Typography,
66
+ cn: () => import_design_system_foundation44.cn,
67
+ useToast: () => useToast
68
+ });
69
+ module.exports = __toCommonJS(index_exports);
70
+
71
+ // src/components/ui/Accordion/Accordion.tsx
72
+ var import_react = require("react");
73
+
74
+ // src/components/ui/Accordion/Accordion.module.css
75
+ var Accordion_default = {};
76
+
77
+ // src/components/ui/Accordion/Accordion.tsx
78
+ var import_design_system_foundation = require("@boostdev/design-system-foundation");
79
+ var import_jsx_runtime = require("react/jsx-runtime");
80
+ function Accordion({
81
+ items,
82
+ allowMultiple = false,
83
+ defaultOpen = [],
84
+ className
85
+ }) {
86
+ const baseId = (0, import_react.useId)();
87
+ const [openIds, setOpenIds] = (0, import_react.useState)(defaultOpen);
88
+ const toggle = (id) => {
89
+ setOpenIds((prev) => {
90
+ const isOpen = prev.includes(id);
91
+ if (isOpen) return prev.filter((i) => i !== id);
92
+ return allowMultiple ? [...prev, id] : [id];
93
+ });
94
+ };
95
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: (0, import_design_system_foundation.cn)(Accordion_default.accordion, className), children: items.map((item) => {
96
+ const isOpen = openIds.includes(item.id);
97
+ const triggerId = `${baseId}-trigger-${item.id}`;
98
+ const panelId = `${baseId}-panel-${item.id}`;
99
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: (0, import_design_system_foundation.cn)(Accordion_default.item, isOpen ? Accordion_default["--open"] : void 0), children: [
100
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("h3", { className: Accordion_default.heading, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
101
+ "button",
102
+ {
103
+ type: "button",
104
+ id: triggerId,
105
+ "aria-expanded": isOpen,
106
+ "aria-controls": panelId,
107
+ disabled: item.disabled,
108
+ className: Accordion_default.trigger,
109
+ onClick: () => toggle(item.id),
110
+ children: [
111
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: Accordion_default.triggerLabel, children: item.title }),
112
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
113
+ "svg",
114
+ {
115
+ "aria-hidden": "true",
116
+ className: Accordion_default.chevron,
117
+ viewBox: "0 0 24 24",
118
+ fill: "none",
119
+ stroke: "currentColor",
120
+ strokeWidth: "2",
121
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6 9l6 6 6-6" })
122
+ }
123
+ )
124
+ ]
125
+ }
126
+ ) }),
127
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
128
+ "div",
129
+ {
130
+ id: panelId,
131
+ role: "region",
132
+ "aria-labelledby": triggerId,
133
+ hidden: !isOpen,
134
+ className: Accordion_default.panel,
135
+ children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: Accordion_default.panelContent, children: item.content })
136
+ }
137
+ )
138
+ ] }, item.id);
139
+ }) });
140
+ }
141
+
142
+ // src/components/ui/Alert/Alert.module.css
143
+ var Alert_default = {};
144
+
145
+ // src/components/ui/Alert/Alert.tsx
146
+ var import_design_system_foundation2 = require("@boostdev/design-system-foundation");
147
+ var import_jsx_runtime2 = require("react/jsx-runtime");
148
+ function Alert({
149
+ variant = "info",
150
+ icon,
151
+ title,
152
+ children,
153
+ onDismiss,
154
+ className
155
+ }) {
156
+ const isUrgent = variant === "error" || variant === "warning";
157
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
158
+ "div",
159
+ {
160
+ role: isUrgent ? "alert" : "status",
161
+ "aria-live": isUrgent ? "assertive" : "polite",
162
+ "aria-atomic": "true",
163
+ className: (0, import_design_system_foundation2.cn)(Alert_default.alert, Alert_default[`--variant_${variant}`], className),
164
+ children: [
165
+ icon && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className: Alert_default.icon, "aria-hidden": "true", children: icon }),
166
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { className: Alert_default.content, children: [
167
+ title && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("strong", { className: Alert_default.title, children: title }),
168
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: Alert_default.body, children })
169
+ ] }),
170
+ onDismiss && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
171
+ "button",
172
+ {
173
+ type: "button",
174
+ className: Alert_default.dismiss,
175
+ onClick: onDismiss,
176
+ "aria-label": "Dismiss alert",
177
+ children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M18 6L6 18M6 6l12 12" }) })
178
+ }
179
+ )
180
+ ]
181
+ }
182
+ );
183
+ }
184
+
185
+ // src/components/ui/Avatar/Avatar.module.css
186
+ var Avatar_default = {};
187
+
188
+ // src/components/ui/Avatar/Avatar.tsx
189
+ var import_design_system_foundation3 = require("@boostdev/design-system-foundation");
190
+ var import_jsx_runtime3 = require("react/jsx-runtime");
191
+ function getInitials(name) {
192
+ return name.split(" ").filter(Boolean).slice(0, 2).map((word) => word[0].toUpperCase()).join("");
193
+ }
194
+ function Avatar({ src, alt, name, size = "medium", className }) {
195
+ const sizeClass = Avatar_default[`--size_${size}`];
196
+ if (src) {
197
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: (0, import_design_system_foundation3.cn)(Avatar_default.avatar, sizeClass, className), children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("img", { src, alt: alt ?? name ?? "", className: Avatar_default.image }) });
198
+ }
199
+ const initials = name ? getInitials(name) : "";
200
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
201
+ "span",
202
+ {
203
+ role: "img",
204
+ "aria-label": name ?? "User avatar",
205
+ className: (0, import_design_system_foundation3.cn)(Avatar_default.avatar, Avatar_default["--fallback"], sizeClass, className),
206
+ children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: Avatar_default.initials, "aria-hidden": "true", children: initials })
207
+ }
208
+ );
209
+ }
210
+
211
+ // src/components/ui/Badge/Badge.module.css
212
+ var Badge_default = {};
213
+
214
+ // src/components/ui/Badge/Badge.tsx
215
+ var import_design_system_foundation4 = require("@boostdev/design-system-foundation");
216
+ var import_jsx_runtime4 = require("react/jsx-runtime");
217
+ function Badge({ children, variant = "primary", className }) {
218
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: (0, import_design_system_foundation4.cn)(Badge_default.badge, Badge_default[`--variant_${variant}`], className), children });
219
+ }
220
+
221
+ // src/components/ui/Breadcrumb/Breadcrumb.module.css
222
+ var Breadcrumb_default = {};
223
+
224
+ // src/components/ui/Breadcrumb/Breadcrumb.tsx
225
+ var import_design_system_foundation5 = require("@boostdev/design-system-foundation");
226
+ var import_jsx_runtime5 = require("react/jsx-runtime");
227
+ function Breadcrumb({ items, className }) {
228
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("nav", { "aria-label": "Breadcrumb", className: (0, import_design_system_foundation5.cn)(Breadcrumb_default.breadcrumb, className), children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("ol", { className: Breadcrumb_default.list, children: items.map((item, index) => {
229
+ const isLast = index === items.length - 1;
230
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("li", { className: Breadcrumb_default.item, children: isLast ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { "aria-current": "page", className: Breadcrumb_default.current, children: item.label }) : /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
231
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("a", { href: item.href, className: Breadcrumb_default.link, children: item.label }),
232
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("span", { className: Breadcrumb_default.separator, "aria-hidden": "true", children: "\u203A" })
233
+ ] }) }, item.label);
234
+ }) }) });
235
+ }
236
+
237
+ // src/components/ui/Calendar/Calendar.tsx
238
+ var import_react2 = require("react");
239
+
240
+ // src/components/ui/Calendar/Calendar.module.css
241
+ var Calendar_default = {};
242
+
243
+ // src/components/ui/Calendar/Calendar.tsx
244
+ var import_design_system_foundation6 = require("@boostdev/design-system-foundation");
245
+ var import_jsx_runtime6 = require("react/jsx-runtime");
246
+ var DAYS = ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"];
247
+ var MONTHS = [
248
+ "January",
249
+ "February",
250
+ "March",
251
+ "April",
252
+ "May",
253
+ "June",
254
+ "July",
255
+ "August",
256
+ "September",
257
+ "October",
258
+ "November",
259
+ "December"
260
+ ];
261
+ function isSameDay(a, b) {
262
+ return a.getFullYear() === b.getFullYear() && a.getMonth() === b.getMonth() && a.getDate() === b.getDate();
263
+ }
264
+ function isOutOfRange(date, min, max) {
265
+ if (min && date < min) return true;
266
+ if (max && date > max) return true;
267
+ return false;
268
+ }
269
+ function getDaysInMonth(year, month) {
270
+ return new Date(year, month + 1, 0).getDate();
271
+ }
272
+ function getFirstDayOfMonth(year, month) {
273
+ return new Date(year, month, 1).getDay();
274
+ }
275
+ function Calendar({ value, defaultValue, min, max, onChange, className }) {
276
+ const today = /* @__PURE__ */ new Date();
277
+ const controlled = value !== void 0;
278
+ const [internal, setInternal] = (0, import_react2.useState)(defaultValue);
279
+ const selected = controlled ? value : internal;
280
+ const [viewYear, setViewYear] = (0, import_react2.useState)(selected?.getFullYear() ?? today.getFullYear());
281
+ const [viewMonth, setViewMonth] = (0, import_react2.useState)(selected?.getMonth() ?? today.getMonth());
282
+ const [focusedDay, setFocusedDay] = (0, import_react2.useState)();
283
+ const titleId = (0, import_react2.useId)();
284
+ const daysInMonth = getDaysInMonth(viewYear, viewMonth);
285
+ const firstDay = getFirstDayOfMonth(viewYear, viewMonth);
286
+ const navigate = (delta) => {
287
+ const d = new Date(viewYear, viewMonth + delta, 1);
288
+ setViewYear(d.getFullYear());
289
+ setViewMonth(d.getMonth());
290
+ setFocusedDay(void 0);
291
+ };
292
+ const selectDay = (day) => {
293
+ const date = new Date(viewYear, viewMonth, day);
294
+ if (isOutOfRange(date, min, max)) return;
295
+ if (!controlled) setInternal(date);
296
+ onChange?.(date);
297
+ };
298
+ const handleKeyDown = (e, day) => {
299
+ const map = {
300
+ ArrowRight: 1,
301
+ ArrowLeft: -1,
302
+ ArrowDown: 7,
303
+ ArrowUp: -7
304
+ };
305
+ if (e.key in map) {
306
+ e.preventDefault();
307
+ const current = new Date(viewYear, viewMonth, day);
308
+ const next = new Date(current);
309
+ next.setDate(next.getDate() + map[e.key]);
310
+ setViewYear(next.getFullYear());
311
+ setViewMonth(next.getMonth());
312
+ setFocusedDay(next.getDate());
313
+ } else if (e.key === "Home") {
314
+ e.preventDefault();
315
+ setFocusedDay(1);
316
+ } else if (e.key === "End") {
317
+ e.preventDefault();
318
+ setFocusedDay(daysInMonth);
319
+ } else if (e.key === "Enter" || e.key === " ") {
320
+ e.preventDefault();
321
+ selectDay(day);
322
+ }
323
+ };
324
+ const cells = [
325
+ ...Array.from({ length: firstDay }, () => null),
326
+ ...Array.from({ length: daysInMonth }, (_, i) => ({ day: i + 1 }))
327
+ ];
328
+ while (cells.length % 7 !== 0) cells.push(null);
329
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: (0, import_design_system_foundation6.cn)(Calendar_default.calendar, className), role: "group", "aria-labelledby": titleId, children: [
330
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: Calendar_default.header, children: [
331
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
332
+ "button",
333
+ {
334
+ type: "button",
335
+ className: Calendar_default.navBtn,
336
+ "aria-label": "Previous month",
337
+ onClick: () => navigate(-1),
338
+ children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15 19l-7-7 7-7" }) })
339
+ }
340
+ ),
341
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { id: titleId, className: Calendar_default.monthYear, "aria-live": "polite", children: [
342
+ MONTHS[viewMonth],
343
+ " ",
344
+ viewYear
345
+ ] }),
346
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
347
+ "button",
348
+ {
349
+ type: "button",
350
+ className: Calendar_default.navBtn,
351
+ "aria-label": "Next month",
352
+ onClick: () => navigate(1),
353
+ children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9 5l7 7-7 7" }) })
354
+ }
355
+ )
356
+ ] }),
357
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
358
+ "table",
359
+ {
360
+ className: Calendar_default.grid,
361
+ role: "grid",
362
+ "aria-labelledby": titleId,
363
+ children: [
364
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("thead", { children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("tr", { children: DAYS.map((d) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("th", { scope: "col", abbr: d, className: Calendar_default.weekday, children: d }, d)) }) }),
365
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("tbody", { children: Array.from({ length: cells.length / 7 }, (_, row) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("tr", { children: cells.slice(row * 7, row * 7 + 7).map((cell, col) => {
366
+ if (!cell) return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("td", { className: Calendar_default.empty, "aria-hidden": "true" }, col);
367
+ const date = new Date(viewYear, viewMonth, cell.day);
368
+ const isSelected = selected ? isSameDay(date, selected) : false;
369
+ const isToday = isSameDay(date, today);
370
+ const disabled = isOutOfRange(date, min, max);
371
+ const isFocused = focusedDay === cell.day;
372
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("td", { role: "gridcell", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
373
+ "button",
374
+ {
375
+ type: "button",
376
+ className: (0, import_design_system_foundation6.cn)(
377
+ Calendar_default.day,
378
+ isSelected && Calendar_default.selected,
379
+ isToday && !isSelected && Calendar_default.today,
380
+ disabled && Calendar_default.disabled
381
+ ),
382
+ "aria-label": date.toLocaleDateString("en", { month: "long", day: "numeric", year: "numeric" }),
383
+ "aria-pressed": isSelected,
384
+ "aria-current": isToday ? "date" : void 0,
385
+ "aria-disabled": disabled,
386
+ disabled,
387
+ tabIndex: isFocused || !focusedDay && isSelected || !focusedDay && !selected && isToday ? 0 : -1,
388
+ onClick: () => selectDay(cell.day),
389
+ onKeyDown: (e) => handleKeyDown(e, cell.day),
390
+ children: cell.day
391
+ }
392
+ ) }, col);
393
+ }) }, row)) })
394
+ ]
395
+ }
396
+ )
397
+ ] });
398
+ }
399
+
400
+ // src/components/ui/Carousel/Carousel.tsx
401
+ var import_react3 = require("react");
402
+
403
+ // src/components/ui/Carousel/Carousel.module.css
404
+ var Carousel_default = {};
405
+
406
+ // src/components/ui/Carousel/Carousel.tsx
407
+ var import_design_system_foundation7 = require("@boostdev/design-system-foundation");
408
+ var import_jsx_runtime7 = require("react/jsx-runtime");
409
+ function Carousel({ items, label, className }) {
410
+ const trackRef = (0, import_react3.useRef)(null);
411
+ const listId = (0, import_react3.useId)();
412
+ const scroll = (direction) => {
413
+ if (!trackRef.current) return;
414
+ const { scrollLeft, clientWidth } = trackRef.current;
415
+ trackRef.current.scrollTo({
416
+ left: scrollLeft + (direction === "next" ? clientWidth : -clientWidth),
417
+ behavior: "smooth"
418
+ });
419
+ };
420
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("section", { "aria-label": label, className: (0, import_design_system_foundation7.cn)(Carousel_default.carousel, className), children: [
421
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
422
+ "button",
423
+ {
424
+ type: "button",
425
+ className: (0, import_design_system_foundation7.cn)(Carousel_default.navBtn, Carousel_default["--prev"]),
426
+ "aria-label": "Previous",
427
+ "aria-controls": listId,
428
+ onClick: () => scroll("prev"),
429
+ children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15 19l-7-7 7-7" }) })
430
+ }
431
+ ),
432
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
433
+ "div",
434
+ {
435
+ ref: trackRef,
436
+ id: listId,
437
+ role: "list",
438
+ className: Carousel_default.track,
439
+ children: items.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { role: "listitem", className: Carousel_default.slide, children: item }, i))
440
+ }
441
+ ),
442
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
443
+ "button",
444
+ {
445
+ type: "button",
446
+ className: (0, import_design_system_foundation7.cn)(Carousel_default.navBtn, Carousel_default["--next"]),
447
+ "aria-label": "Next",
448
+ "aria-controls": listId,
449
+ onClick: () => scroll("next"),
450
+ children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9 5l7 7-7 7" }) })
451
+ }
452
+ )
453
+ ] });
454
+ }
455
+
456
+ // src/components/ui/DescriptionList/DescriptionList.module.css
457
+ var DescriptionList_default = {};
458
+
459
+ // src/components/ui/DescriptionList/DescriptionList.tsx
460
+ var import_design_system_foundation8 = require("@boostdev/design-system-foundation");
461
+ var import_jsx_runtime8 = require("react/jsx-runtime");
462
+ function DescriptionList({ items, layout = "stacked", className }) {
463
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("dl", { className: (0, import_design_system_foundation8.cn)(DescriptionList_default.list, DescriptionList_default[`--layout_${layout}`], className), children: items.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: DescriptionList_default.group, children: [
464
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("dt", { className: DescriptionList_default.term, children: item.term }),
465
+ Array.isArray(item.details) ? item.details.map((d, j) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("dd", { className: DescriptionList_default.details, children: d }, j)) : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("dd", { className: DescriptionList_default.details, children: item.details })
466
+ ] }, i)) });
467
+ }
468
+
469
+ // src/components/ui/Link/Link.module.css
470
+ var Link_default = {};
471
+
472
+ // src/components/ui/Link/Link.tsx
473
+ var import_design_system_foundation9 = require("@boostdev/design-system-foundation");
474
+ var import_jsx_runtime9 = require("react/jsx-runtime");
475
+ function Link({
476
+ as,
477
+ children,
478
+ variant = "default",
479
+ external = false,
480
+ className,
481
+ ...props
482
+ }) {
483
+ const Component = as ?? "a";
484
+ const externalProps = external ? { target: "_blank", rel: "noreferrer noopener" } : {};
485
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
486
+ Component,
487
+ {
488
+ className: (0, import_design_system_foundation9.cn)(Link_default.link, Link_default[`--variant_${variant}`], className),
489
+ ...externalProps,
490
+ ...props,
491
+ children: [
492
+ children,
493
+ external && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { className: Link_default.externalLabel, children: " (opens in new tab)" })
494
+ ]
495
+ }
496
+ );
497
+ }
498
+
499
+ // src/components/ui/Loading/Loading.module.css
500
+ var Loading_default = {};
501
+
502
+ // src/components/ui/Loading/Loading.tsx
503
+ var import_design_system_foundation10 = require("@boostdev/design-system-foundation");
504
+ var import_jsx_runtime10 = require("react/jsx-runtime");
505
+ function Loading({ size = "medium", className }) {
506
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: (0, import_design_system_foundation10.cn)(Loading_default.loading, Loading_default[`--size_${size}`], className), children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: Loading_default.spinner, role: "status", "aria-label": "Loading" }) });
507
+ }
508
+
509
+ // src/components/ui/NotificationBanner/NotificationBanner.module.css
510
+ var NotificationBanner_default = {};
511
+
512
+ // src/components/ui/NotificationBanner/NotificationBanner.tsx
513
+ var import_design_system_foundation11 = require("@boostdev/design-system-foundation");
514
+ var import_jsx_runtime11 = require("react/jsx-runtime");
515
+ function NotificationBanner({
516
+ variant = "info",
517
+ children,
518
+ action,
519
+ onDismiss,
520
+ className
521
+ }) {
522
+ const isUrgent = variant === "error" || variant === "warning";
523
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
524
+ "div",
525
+ {
526
+ role: isUrgent ? "alert" : "status",
527
+ "aria-live": isUrgent ? "assertive" : "polite",
528
+ "aria-atomic": "true",
529
+ className: (0, import_design_system_foundation11.cn)(NotificationBanner_default.banner, NotificationBanner_default[`--variant_${variant}`], className),
530
+ children: [
531
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: NotificationBanner_default.content, children }),
532
+ action && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: NotificationBanner_default.action, children: action }),
533
+ onDismiss && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
534
+ "button",
535
+ {
536
+ type: "button",
537
+ className: NotificationBanner_default.dismiss,
538
+ onClick: onDismiss,
539
+ "aria-label": "Dismiss notification",
540
+ children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M18 6L6 18M6 6l12 12" }) })
541
+ }
542
+ )
543
+ ]
544
+ }
545
+ );
546
+ }
547
+
548
+ // src/components/ui/Pagination/Pagination.module.css
549
+ var Pagination_default = {};
550
+
551
+ // src/components/ui/Pagination/Pagination.tsx
552
+ var import_design_system_foundation12 = require("@boostdev/design-system-foundation");
553
+ var import_jsx_runtime12 = require("react/jsx-runtime");
554
+ function getPageRange(current, total) {
555
+ const delta = 1;
556
+ const range = [];
557
+ for (let i = 1; i <= total; i++) {
558
+ if (i === 1 || i === total || i >= current - delta && i <= current + delta) {
559
+ range.push(i);
560
+ } else if (range[range.length - 1] !== "...") {
561
+ range.push("...");
562
+ }
563
+ }
564
+ return range;
565
+ }
566
+ function Pagination({
567
+ currentPage,
568
+ totalPages,
569
+ onPageChange,
570
+ className
571
+ }) {
572
+ const pages = getPageRange(currentPage, totalPages);
573
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("nav", { "aria-label": "Pagination", className: (0, import_design_system_foundation12.cn)(Pagination_default.pagination, className), children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("ul", { className: Pagination_default.list, children: [
574
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
575
+ "button",
576
+ {
577
+ type: "button",
578
+ className: (0, import_design_system_foundation12.cn)(Pagination_default.button, Pagination_default["--nav"]),
579
+ onClick: () => onPageChange(currentPage - 1),
580
+ disabled: currentPage <= 1,
581
+ "aria-label": "Previous page",
582
+ children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M15 19l-7-7 7-7" }) })
583
+ }
584
+ ) }),
585
+ pages.map(
586
+ (page, index) => page === "..." ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: Pagination_default.ellipsis, "aria-hidden": "true", children: "\u2026" }) }, `ellipsis-${index}`) : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
587
+ "button",
588
+ {
589
+ type: "button",
590
+ className: (0, import_design_system_foundation12.cn)(Pagination_default.button, currentPage === page ? Pagination_default["--active"] : void 0),
591
+ onClick: () => onPageChange(page),
592
+ "aria-label": `Page ${page}`,
593
+ "aria-current": currentPage === page ? "page" : void 0,
594
+ children: page
595
+ }
596
+ ) }, page)
597
+ ),
598
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("li", { children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
599
+ "button",
600
+ {
601
+ type: "button",
602
+ className: (0, import_design_system_foundation12.cn)(Pagination_default.button, Pagination_default["--nav"]),
603
+ onClick: () => onPageChange(currentPage + 1),
604
+ disabled: currentPage >= totalPages,
605
+ "aria-label": "Next page",
606
+ children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M9 5l7 7-7 7" }) })
607
+ }
608
+ ) })
609
+ ] }) });
610
+ }
611
+
612
+ // src/components/ui/Progress/Progress.module.css
613
+ var Progress_default = {};
614
+
615
+ // src/components/ui/Progress/Progress.tsx
616
+ var import_design_system_foundation13 = require("@boostdev/design-system-foundation");
617
+ var import_jsx_runtime13 = require("react/jsx-runtime");
618
+ function Progress({
619
+ value,
620
+ max = 100,
621
+ label,
622
+ showLabel = false,
623
+ size = "medium",
624
+ className
625
+ }) {
626
+ const percentage = Math.min(100, Math.max(0, value / max * 100));
627
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: (0, import_design_system_foundation13.cn)(Progress_default.container, className), children: [
628
+ showLabel && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: Progress_default.labelRow, children: [
629
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: Progress_default.label, children: label }),
630
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("span", { className: Progress_default.value, children: [
631
+ Math.round(percentage),
632
+ "%"
633
+ ] })
634
+ ] }),
635
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
636
+ "div",
637
+ {
638
+ role: "progressbar",
639
+ "aria-label": label,
640
+ "aria-valuenow": value,
641
+ "aria-valuemin": 0,
642
+ "aria-valuemax": max,
643
+ className: (0, import_design_system_foundation13.cn)(Progress_default.track, Progress_default[`--size_${size}`]),
644
+ children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: Progress_default.fill, style: { width: `${percentage}%` } })
645
+ }
646
+ )
647
+ ] });
648
+ }
649
+
650
+ // src/components/ui/ProgressCircle/ProgressCircle.module.css
651
+ var ProgressCircle_default = {};
652
+
653
+ // src/components/ui/ProgressCircle/ProgressCircle.tsx
654
+ var import_design_system_foundation14 = require("@boostdev/design-system-foundation");
655
+ var import_jsx_runtime14 = require("react/jsx-runtime");
656
+ var SIZE_PX = { small: 40, medium: 64, large: 96 };
657
+ var STROKE_WIDTH = 4;
658
+ function ProgressCircle({
659
+ value,
660
+ max = 100,
661
+ label,
662
+ showValue = false,
663
+ size = "medium",
664
+ className
665
+ }) {
666
+ const percentage = Math.min(100, Math.max(0, value / max * 100));
667
+ const px = SIZE_PX[size];
668
+ const radius = (px - STROKE_WIDTH * 2) / 2;
669
+ const circumference = 2 * Math.PI * radius;
670
+ const offset = circumference - percentage / 100 * circumference;
671
+ const cx = px / 2;
672
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
673
+ "div",
674
+ {
675
+ role: "progressbar",
676
+ "aria-label": label,
677
+ "aria-valuenow": value,
678
+ "aria-valuemin": 0,
679
+ "aria-valuemax": max,
680
+ className: (0, import_design_system_foundation14.cn)(ProgressCircle_default.wrapper, ProgressCircle_default[`--size_${size}`], className),
681
+ children: [
682
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
683
+ "svg",
684
+ {
685
+ width: px,
686
+ height: px,
687
+ viewBox: `0 0 ${px} ${px}`,
688
+ "aria-hidden": "true",
689
+ className: ProgressCircle_default.svg,
690
+ children: [
691
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
692
+ "circle",
693
+ {
694
+ className: ProgressCircle_default.track,
695
+ cx,
696
+ cy: cx,
697
+ r: radius,
698
+ strokeWidth: STROKE_WIDTH,
699
+ fill: "none"
700
+ }
701
+ ),
702
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
703
+ "circle",
704
+ {
705
+ className: ProgressCircle_default.fill,
706
+ cx,
707
+ cy: cx,
708
+ r: radius,
709
+ strokeWidth: STROKE_WIDTH,
710
+ fill: "none",
711
+ strokeDasharray: circumference,
712
+ strokeDashoffset: offset,
713
+ strokeLinecap: "round",
714
+ transform: `rotate(-90 ${cx} ${cx})`
715
+ }
716
+ )
717
+ ]
718
+ }
719
+ ),
720
+ showValue && /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("span", { className: ProgressCircle_default.value, "aria-hidden": "true", children: [
721
+ Math.round(percentage),
722
+ "%"
723
+ ] })
724
+ ]
725
+ }
726
+ );
727
+ }
728
+
729
+ // src/components/ui/Separator/Separator.module.css
730
+ var Separator_default = {};
731
+
732
+ // src/components/ui/Separator/Separator.tsx
733
+ var import_design_system_foundation15 = require("@boostdev/design-system-foundation");
734
+ var import_jsx_runtime15 = require("react/jsx-runtime");
735
+ function Separator({ orientation = "horizontal", className }) {
736
+ if (orientation === "vertical") {
737
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
738
+ "div",
739
+ {
740
+ role: "separator",
741
+ "aria-orientation": "vertical",
742
+ className: (0, import_design_system_foundation15.cn)(Separator_default.separator, Separator_default["--vertical"], className)
743
+ }
744
+ );
745
+ }
746
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("hr", { className: (0, import_design_system_foundation15.cn)(Separator_default.separator, Separator_default["--horizontal"], className) });
747
+ }
748
+
749
+ // src/components/ui/Skeleton/Skeleton.tsx
750
+ var import_design_system_foundation16 = require("@boostdev/design-system-foundation");
751
+
752
+ // src/components/ui/Skeleton/Skeleton.module.css
753
+ var Skeleton_default = {};
754
+
755
+ // src/components/ui/Skeleton/Skeleton.tsx
756
+ var import_jsx_runtime16 = require("react/jsx-runtime");
757
+ function Skeleton({ className }) {
758
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { "aria-hidden": "true", className: (0, import_design_system_foundation16.cn)(Skeleton_default.skeleton, className) });
759
+ }
760
+
761
+ // src/components/ui/SkipLink/SkipLink.module.css
762
+ var SkipLink_default = {};
763
+
764
+ // src/components/ui/SkipLink/SkipLink.tsx
765
+ var import_jsx_runtime17 = require("react/jsx-runtime");
766
+ function SkipLink({ href = "#main", children = "Skip to main content" }) {
767
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("a", { href, className: SkipLink_default.skipLink, children });
768
+ }
769
+
770
+ // src/components/ui/Table/Table.module.css
771
+ var Table_default = {};
772
+
773
+ // src/components/ui/Table/Table.tsx
774
+ var import_design_system_foundation17 = require("@boostdev/design-system-foundation");
775
+ var import_jsx_runtime18 = require("react/jsx-runtime");
776
+ function Table({
777
+ columns,
778
+ rows,
779
+ caption,
780
+ sortKey,
781
+ sortDirection,
782
+ onSort,
783
+ className
784
+ }) {
785
+ const handleSort = (key) => {
786
+ if (!onSort) return;
787
+ const nextDirection = sortKey === key && sortDirection === "asc" ? "desc" : "asc";
788
+ onSort(key, nextDirection);
789
+ };
790
+ const getAriaSort = (key) => {
791
+ if (sortKey !== key) return "none";
792
+ return sortDirection === "asc" ? "ascending" : "descending";
793
+ };
794
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: (0, import_design_system_foundation17.cn)(Table_default.wrapper, className), children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("table", { className: Table_default.table, children: [
795
+ caption && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("caption", { className: Table_default.caption, children: caption }),
796
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("thead", { className: Table_default.thead, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("tr", { children: columns.map((col) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
797
+ "th",
798
+ {
799
+ scope: "col",
800
+ "aria-sort": col.sortable ? getAriaSort(col.key) : void 0,
801
+ className: (0, import_design_system_foundation17.cn)(Table_default.th, col.sortable ? Table_default["--sortable"] : void 0),
802
+ children: col.sortable ? /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
803
+ "button",
804
+ {
805
+ type: "button",
806
+ className: Table_default.sortButton,
807
+ onClick: () => handleSort(col.key),
808
+ children: [
809
+ col.header,
810
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
811
+ "svg",
812
+ {
813
+ "aria-hidden": "true",
814
+ className: (0, import_design_system_foundation17.cn)(
815
+ Table_default.sortIcon,
816
+ sortKey === col.key ? Table_default["--sort-active"] : void 0,
817
+ sortKey === col.key && sortDirection === "desc" ? Table_default["--sort-desc"] : void 0
818
+ ),
819
+ viewBox: "0 0 24 24",
820
+ fill: "none",
821
+ stroke: "currentColor",
822
+ strokeWidth: "2",
823
+ children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6 9l6 6 6-6" })
824
+ }
825
+ )
826
+ ]
827
+ }
828
+ ) : col.header
829
+ },
830
+ col.key
831
+ )) }) }),
832
+ /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("tbody", { className: Table_default.tbody, children: rows.map((row, rowIndex) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("tr", { className: Table_default.tr, children: columns.map((col) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("td", { className: Table_default.td, children: col.render ? col.render(row) : String(row[col.key] ?? "") }, col.key)) }, rowIndex)) })
833
+ ] }) });
834
+ }
835
+
836
+ // src/components/ui/Tabs/Tabs.tsx
837
+ var import_react4 = require("react");
838
+
839
+ // src/components/ui/Tabs/Tabs.module.css
840
+ var Tabs_default = {};
841
+
842
+ // src/components/ui/Tabs/Tabs.tsx
843
+ var import_design_system_foundation18 = require("@boostdev/design-system-foundation");
844
+ var import_jsx_runtime19 = require("react/jsx-runtime");
845
+ function Tabs({ tabs, defaultTab, className }) {
846
+ const baseId = (0, import_react4.useId)();
847
+ const [activeTab, setActiveTab] = (0, import_react4.useState)(defaultTab ?? tabs[0]?.id);
848
+ const tabRefs = (0, import_react4.useRef)([]);
849
+ const enabledIndexes = tabs.map((tab, i) => ({ tab, i })).filter(({ tab }) => !tab.disabled).map(({ i }) => i);
850
+ const handleKeyDown = (e, index) => {
851
+ const pos = enabledIndexes.indexOf(index);
852
+ const focusAt = (i) => {
853
+ tabRefs.current[i]?.focus();
854
+ setActiveTab(tabs[i].id);
855
+ };
856
+ if (e.key === "ArrowRight") {
857
+ e.preventDefault();
858
+ focusAt(enabledIndexes[(pos + 1) % enabledIndexes.length]);
859
+ } else if (e.key === "ArrowLeft") {
860
+ e.preventDefault();
861
+ focusAt(enabledIndexes[(pos - 1 + enabledIndexes.length) % enabledIndexes.length]);
862
+ } else if (e.key === "Home") {
863
+ e.preventDefault();
864
+ focusAt(enabledIndexes[0]);
865
+ } else if (e.key === "End") {
866
+ e.preventDefault();
867
+ focusAt(enabledIndexes[enabledIndexes.length - 1]);
868
+ }
869
+ };
870
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: (0, import_design_system_foundation18.cn)(Tabs_default.tabs, className), children: [
871
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { role: "tablist", className: Tabs_default.tabList, children: tabs.map((tab, i) => {
872
+ const tabId = `${baseId}-tab-${tab.id}`;
873
+ const panelId = `${baseId}-panel-${tab.id}`;
874
+ const isActive = activeTab === tab.id;
875
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
876
+ "button",
877
+ {
878
+ ref: (el) => {
879
+ tabRefs.current[i] = el;
880
+ },
881
+ id: tabId,
882
+ type: "button",
883
+ role: "tab",
884
+ "aria-selected": isActive,
885
+ "aria-controls": panelId,
886
+ tabIndex: isActive ? 0 : -1,
887
+ disabled: tab.disabled,
888
+ className: (0, import_design_system_foundation18.cn)(Tabs_default.tab, isActive ? Tabs_default["--active"] : void 0),
889
+ onClick: () => setActiveTab(tab.id),
890
+ onKeyDown: (e) => handleKeyDown(e, i),
891
+ children: tab.label
892
+ },
893
+ tab.id
894
+ );
895
+ }) }),
896
+ tabs.map((tab) => {
897
+ const tabId = `${baseId}-tab-${tab.id}`;
898
+ const panelId = `${baseId}-panel-${tab.id}`;
899
+ const isActive = activeTab === tab.id;
900
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
901
+ "div",
902
+ {
903
+ id: panelId,
904
+ role: "tabpanel",
905
+ "aria-labelledby": tabId,
906
+ tabIndex: 0,
907
+ hidden: !isActive,
908
+ className: Tabs_default.panel,
909
+ children: tab.content
910
+ },
911
+ tab.id
912
+ );
913
+ })
914
+ ] });
915
+ }
916
+
917
+ // src/components/ui/Tooltip/Tooltip.tsx
918
+ var import_react5 = require("react");
919
+
920
+ // src/components/ui/Tooltip/Tooltip.module.css
921
+ var Tooltip_default = {};
922
+
923
+ // src/components/ui/Tooltip/Tooltip.tsx
924
+ var import_design_system_foundation19 = require("@boostdev/design-system-foundation");
925
+ var import_jsx_runtime20 = require("react/jsx-runtime");
926
+ function Tooltip({
927
+ content,
928
+ placement = "top",
929
+ children,
930
+ className
931
+ }) {
932
+ const tooltipId = (0, import_react5.useId)();
933
+ const trigger = (0, import_react5.isValidElement)(children) ? (0, import_react5.cloneElement)(children, {
934
+ "aria-describedby": tooltipId
935
+ }) : children;
936
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("span", { className: (0, import_design_system_foundation19.cn)(Tooltip_default.wrapper, className), children: [
937
+ trigger,
938
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
939
+ "span",
940
+ {
941
+ id: tooltipId,
942
+ role: "tooltip",
943
+ className: (0, import_design_system_foundation19.cn)(Tooltip_default.tooltip, Tooltip_default[`--placement_${placement}`]),
944
+ children: content
945
+ }
946
+ )
947
+ ] });
948
+ }
949
+
950
+ // src/components/ui/Typography/Typography.module.css
951
+ var Typography_default = {};
952
+
953
+ // src/components/ui/Typography/Typography.tsx
954
+ var import_design_system_foundation20 = require("@boostdev/design-system-foundation");
955
+ var import_jsx_runtime21 = require("react/jsx-runtime");
956
+ var variantToElement = {
957
+ h1: "h1",
958
+ h2: "h2",
959
+ h3: "h3",
960
+ body: "p",
961
+ body_s: "p"
962
+ };
963
+ function Typography({ variant = "body", component, children, className }) {
964
+ const Component = component || variantToElement[variant];
965
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Component, { className: (0, import_design_system_foundation20.cn)(Typography_default.typography, Typography_default[`--${variant}`], className), children });
966
+ }
967
+
968
+ // src/components/interaction/Button/Button.module.css
969
+ var Button_default = {};
970
+
971
+ // src/components/interaction/Button/Button.tsx
972
+ var import_design_system_foundation21 = require("@boostdev/design-system-foundation");
973
+ var import_jsx_runtime22 = require("react/jsx-runtime");
974
+ function Button({
975
+ children,
976
+ className = "",
977
+ variant = "primary",
978
+ type = "button",
979
+ iconStart,
980
+ iconEnd,
981
+ size = "medium",
982
+ hasPulse = false,
983
+ href,
984
+ target,
985
+ rel,
986
+ disabled,
987
+ onClick,
988
+ ...rest
989
+ }) {
990
+ const classNames = (0, import_design_system_foundation21.cn)(
991
+ Button_default.button,
992
+ Button_default[`--${variant}`],
993
+ Button_default[`--size_${size}`],
994
+ hasPulse && Button_default["--hasPulse"],
995
+ className
996
+ );
997
+ const allChildren = /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_jsx_runtime22.Fragment, { children: [
998
+ !!iconStart && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: Button_default.prefix, children: iconStart }),
999
+ children,
1000
+ !!iconEnd && /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("span", { className: Button_default.suffix, children: iconEnd })
1001
+ ] });
1002
+ if (href) {
1003
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("a", { className: classNames, href, target, rel, onClick, ...rest, children: allChildren });
1004
+ }
1005
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("button", { type, className: classNames, disabled, onClick, ...rest, children: allChildren });
1006
+ }
1007
+
1008
+ // src/components/interaction/Command/Command.tsx
1009
+ var import_react6 = require("react");
1010
+
1011
+ // src/components/interaction/Command/Command.module.css
1012
+ var Command_default = {};
1013
+
1014
+ // src/components/interaction/Command/Command.tsx
1015
+ var import_design_system_foundation22 = require("@boostdev/design-system-foundation");
1016
+ var import_jsx_runtime23 = require("react/jsx-runtime");
1017
+ function Command({
1018
+ isOpen,
1019
+ onClose,
1020
+ items,
1021
+ placeholder = "Search commands\u2026",
1022
+ className
1023
+ }) {
1024
+ const [query, setQuery] = (0, import_react6.useState)("");
1025
+ const [activeIndex, setActiveIndex] = (0, import_react6.useState)(0);
1026
+ const dialogRef = (0, import_react6.useRef)(null);
1027
+ const inputRef = (0, import_react6.useRef)(null);
1028
+ const listboxId = (0, import_react6.useId)();
1029
+ const filtered = (0, import_react6.useMemo)(() => {
1030
+ const q = query.toLowerCase().trim();
1031
+ return q ? items.filter(
1032
+ (item) => item.label.toLowerCase().includes(q) || item.description?.toLowerCase().includes(q)
1033
+ ) : items;
1034
+ }, [query, items]);
1035
+ const groups = (0, import_react6.useMemo)(() => {
1036
+ const map = /* @__PURE__ */ new Map();
1037
+ filtered.forEach((item) => {
1038
+ const g = item.group ?? "";
1039
+ const list = map.get(g) ?? [];
1040
+ list.push(item);
1041
+ map.set(g, list);
1042
+ });
1043
+ return map;
1044
+ }, [filtered]);
1045
+ (0, import_react6.useEffect)(() => {
1046
+ const dialog = dialogRef.current;
1047
+ if (!dialog) return;
1048
+ if (isOpen) {
1049
+ dialog.showModal();
1050
+ setQuery("");
1051
+ setActiveIndex(0);
1052
+ setTimeout(() => inputRef.current?.focus(), 0);
1053
+ } else if (dialog.open) {
1054
+ dialog.close();
1055
+ }
1056
+ }, [isOpen]);
1057
+ (0, import_react6.useEffect)(() => {
1058
+ setActiveIndex(0);
1059
+ }, [query]);
1060
+ const handleCancel = (e) => {
1061
+ e.preventDefault();
1062
+ onClose();
1063
+ };
1064
+ const handleKeyDown = (e) => {
1065
+ if (e.key === "ArrowDown") {
1066
+ e.preventDefault();
1067
+ setActiveIndex((i) => Math.min(i + 1, filtered.length - 1));
1068
+ } else if (e.key === "ArrowUp") {
1069
+ e.preventDefault();
1070
+ setActiveIndex((i) => Math.max(i - 1, 0));
1071
+ } else if (e.key === "Enter") {
1072
+ e.preventDefault();
1073
+ filtered[activeIndex]?.onSelect();
1074
+ onClose();
1075
+ } else if (e.key === "Escape") {
1076
+ onClose();
1077
+ }
1078
+ };
1079
+ const selectItem = (item) => {
1080
+ item.onSelect();
1081
+ onClose();
1082
+ };
1083
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
1084
+ "dialog",
1085
+ {
1086
+ ref: dialogRef,
1087
+ className: (0, import_design_system_foundation22.cn)(Command_default.dialog, className),
1088
+ "aria-label": "Command palette",
1089
+ onCancel: handleCancel,
1090
+ children: /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: Command_default.palette, onKeyDown: handleKeyDown, children: [
1091
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: Command_default.searchRow, children: [
1092
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("svg", { "aria-hidden": "true", className: Command_default.searchIcon, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [
1093
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("circle", { cx: "11", cy: "11", r: "8" }),
1094
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("path", { strokeLinecap: "round", d: "M21 21l-4.35-4.35" })
1095
+ ] }),
1096
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
1097
+ "input",
1098
+ {
1099
+ ref: inputRef,
1100
+ type: "search",
1101
+ role: "combobox",
1102
+ "aria-expanded": filtered.length > 0,
1103
+ "aria-controls": listboxId,
1104
+ "aria-autocomplete": "list",
1105
+ "aria-activedescendant": filtered[activeIndex] ? `cmd-${filtered[activeIndex].id}` : void 0,
1106
+ className: Command_default.search,
1107
+ placeholder,
1108
+ value: query,
1109
+ onChange: (e) => setQuery(e.target.value)
1110
+ }
1111
+ ),
1112
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("kbd", { className: Command_default.escHint, children: "Esc" })
1113
+ ] }),
1114
+ filtered.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("ul", { id: listboxId, role: "listbox", className: Command_default.list, "aria-label": "Commands", children: Array.from(groups.entries()).map(([group, groupItems]) => /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("li", { role: "presentation", children: [
1115
+ group && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("div", { className: Command_default.group, role: "presentation", children: group }),
1116
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("ul", { role: "group", "aria-label": group || void 0, className: Command_default.groupList, children: groupItems.map((item) => {
1117
+ const flatIndex = filtered.indexOf(item);
1118
+ const isActive = flatIndex === activeIndex;
1119
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
1120
+ "li",
1121
+ {
1122
+ id: `cmd-${item.id}`,
1123
+ role: "option",
1124
+ "aria-selected": isActive,
1125
+ className: (0, import_design_system_foundation22.cn)(Command_default.item, isActive && Command_default.itemActive),
1126
+ onPointerDown: (e) => e.preventDefault(),
1127
+ onClick: () => selectItem(item),
1128
+ children: [
1129
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: Command_default.itemLabel, children: item.label }),
1130
+ item.description && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: Command_default.itemDesc, children: item.description }),
1131
+ item.shortcut && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("kbd", { className: Command_default.shortcut, children: item.shortcut })
1132
+ ]
1133
+ },
1134
+ item.id
1135
+ );
1136
+ }) })
1137
+ ] }, group)) }) : /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)("div", { className: Command_default.empty, "aria-live": "polite", children: [
1138
+ "No results for \u201C",
1139
+ query,
1140
+ "\u201D"
1141
+ ] })
1142
+ ] })
1143
+ }
1144
+ );
1145
+ }
1146
+
1147
+ // src/components/interaction/Dialog/Dialog.tsx
1148
+ var import_react7 = require("react");
1149
+
1150
+ // src/components/interaction/Dialog/Dialog.module.css
1151
+ var Dialog_default = {};
1152
+
1153
+ // src/components/interaction/Dialog/Dialog.tsx
1154
+ var import_design_system_foundation23 = require("@boostdev/design-system-foundation");
1155
+ var import_jsx_runtime24 = require("react/jsx-runtime");
1156
+ function Dialog({ children, isVisible = false, className, handleClose }) {
1157
+ const dialogRef = (0, import_react7.useRef)(null);
1158
+ (0, import_react7.useEffect)(() => {
1159
+ const dialog = dialogRef.current;
1160
+ if (!dialog) return;
1161
+ if (isVisible) {
1162
+ dialog.showModal();
1163
+ } else if (dialog.open) {
1164
+ dialog.close();
1165
+ }
1166
+ }, [isVisible]);
1167
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("dialog", { ref: dialogRef, className: (0, import_design_system_foundation23.cn)(className, Dialog_default.dialog), children: [
1168
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("form", { method: "dialog", className: Dialog_default.closeForm, children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
1169
+ "button",
1170
+ {
1171
+ type: "submit",
1172
+ className: Dialog_default.closeButton,
1173
+ onClick: handleClose,
1174
+ "aria-label": "Close dialog",
1175
+ children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M18 6L6 18M6 6l12 12" }) })
1176
+ }
1177
+ ) }),
1178
+ children
1179
+ ] });
1180
+ }
1181
+
1182
+ // src/components/interaction/Drawer/Drawer.tsx
1183
+ var import_react8 = require("react");
1184
+
1185
+ // src/components/interaction/Drawer/Drawer.module.css
1186
+ var Drawer_default = {};
1187
+
1188
+ // src/components/interaction/Drawer/Drawer.tsx
1189
+ var import_design_system_foundation24 = require("@boostdev/design-system-foundation");
1190
+ var import_jsx_runtime25 = require("react/jsx-runtime");
1191
+ function Drawer({
1192
+ isOpen,
1193
+ onClose,
1194
+ title,
1195
+ children,
1196
+ side = "right",
1197
+ className
1198
+ }) {
1199
+ const dialogRef = (0, import_react8.useRef)(null);
1200
+ (0, import_react8.useEffect)(() => {
1201
+ const dialog = dialogRef.current;
1202
+ if (!dialog) return;
1203
+ if (isOpen) {
1204
+ dialog.showModal();
1205
+ } else if (dialog.open) {
1206
+ dialog.close();
1207
+ }
1208
+ }, [isOpen]);
1209
+ const handleClick = (e) => {
1210
+ if (e.target === dialogRef.current) onClose();
1211
+ };
1212
+ const handleCancel = (e) => {
1213
+ e.preventDefault();
1214
+ onClose();
1215
+ };
1216
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
1217
+ "dialog",
1218
+ {
1219
+ ref: dialogRef,
1220
+ className: (0, import_design_system_foundation24.cn)(Drawer_default.drawer, Drawer_default[`--side_${side}`], className),
1221
+ "aria-label": title,
1222
+ onClick: handleClick,
1223
+ onCancel: handleCancel,
1224
+ children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: Drawer_default.panel, children: [
1225
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: Drawer_default.header, children: [
1226
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("h2", { className: Drawer_default.title, children: title }),
1227
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
1228
+ "button",
1229
+ {
1230
+ type: "button",
1231
+ className: Drawer_default.closeButton,
1232
+ onClick: onClose,
1233
+ "aria-label": "Close drawer",
1234
+ children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M18 6L6 18M6 6l12 12" }) })
1235
+ }
1236
+ )
1237
+ ] }),
1238
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: Drawer_default.body, children })
1239
+ ] })
1240
+ }
1241
+ );
1242
+ }
1243
+
1244
+ // src/components/interaction/DropdownMenu/DropdownMenu.tsx
1245
+ var import_react9 = require("react");
1246
+
1247
+ // src/components/interaction/DropdownMenu/DropdownMenu.module.css
1248
+ var DropdownMenu_default = {};
1249
+
1250
+ // src/components/interaction/DropdownMenu/DropdownMenu.tsx
1251
+ var import_design_system_foundation25 = require("@boostdev/design-system-foundation");
1252
+ var import_jsx_runtime26 = require("react/jsx-runtime");
1253
+ function DropdownMenu({
1254
+ trigger,
1255
+ items,
1256
+ placement = "bottom-start",
1257
+ className
1258
+ }) {
1259
+ const [isOpen, setIsOpen] = (0, import_react9.useState)(false);
1260
+ const containerRef = (0, import_react9.useRef)(null);
1261
+ const menuId = (0, import_react9.useId)();
1262
+ const itemRefs = (0, import_react9.useRef)([]);
1263
+ const open = () => {
1264
+ setIsOpen(true);
1265
+ };
1266
+ const close = () => setIsOpen(false);
1267
+ (0, import_react9.useEffect)(() => {
1268
+ if (isOpen) {
1269
+ itemRefs.current[0]?.focus();
1270
+ }
1271
+ }, [isOpen]);
1272
+ (0, import_react9.useEffect)(() => {
1273
+ if (!isOpen) return;
1274
+ const handlePointerDown = (e) => {
1275
+ if (!containerRef.current?.contains(e.target)) close();
1276
+ };
1277
+ const handleKeyDown = (e) => {
1278
+ if (e.key === "Escape") close();
1279
+ };
1280
+ document.addEventListener("pointerdown", handlePointerDown);
1281
+ document.addEventListener("keydown", handleKeyDown);
1282
+ return () => {
1283
+ document.removeEventListener("pointerdown", handlePointerDown);
1284
+ document.removeEventListener("keydown", handleKeyDown);
1285
+ };
1286
+ }, [isOpen]);
1287
+ const handleItemKeyDown = (e, index) => {
1288
+ const enabledIndexes = items.map((item, i) => ({ item, i })).filter(({ item }) => !item.disabled).map(({ i }) => i);
1289
+ const pos = enabledIndexes.indexOf(index);
1290
+ if (e.key === "ArrowDown") {
1291
+ e.preventDefault();
1292
+ itemRefs.current[enabledIndexes[(pos + 1) % enabledIndexes.length]]?.focus();
1293
+ } else if (e.key === "ArrowUp") {
1294
+ e.preventDefault();
1295
+ itemRefs.current[enabledIndexes[(pos - 1 + enabledIndexes.length) % enabledIndexes.length]]?.focus();
1296
+ } else if (e.key === "Home") {
1297
+ e.preventDefault();
1298
+ itemRefs.current[enabledIndexes[0]]?.focus();
1299
+ } else if (e.key === "End") {
1300
+ e.preventDefault();
1301
+ itemRefs.current[enabledIndexes[enabledIndexes.length - 1]]?.focus();
1302
+ } else if (e.key === "Tab") {
1303
+ close();
1304
+ }
1305
+ };
1306
+ const triggerEl = (0, import_react9.isValidElement)(trigger) ? (0, import_react9.cloneElement)(trigger, {
1307
+ "aria-haspopup": "menu",
1308
+ "aria-expanded": isOpen,
1309
+ "aria-controls": menuId,
1310
+ onClick: (e) => {
1311
+ if (isOpen) {
1312
+ close();
1313
+ } else {
1314
+ open();
1315
+ }
1316
+ const existingOnClick = trigger.props.onClick;
1317
+ if (typeof existingOnClick === "function") existingOnClick(e);
1318
+ }
1319
+ }) : trigger;
1320
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { ref: containerRef, className: (0, import_design_system_foundation25.cn)(DropdownMenu_default.wrapper, className), children: [
1321
+ triggerEl,
1322
+ isOpen && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
1323
+ "ul",
1324
+ {
1325
+ id: menuId,
1326
+ role: "menu",
1327
+ className: (0, import_design_system_foundation25.cn)(DropdownMenu_default.menu, DropdownMenu_default[`--placement_${placement}`]),
1328
+ children: items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("li", { role: "presentation", children: [
1329
+ item.separator && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("hr", { className: DropdownMenu_default.separator, role: "separator" }),
1330
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
1331
+ "button",
1332
+ {
1333
+ ref: (el) => {
1334
+ itemRefs.current[index] = el;
1335
+ },
1336
+ type: "button",
1337
+ role: "menuitem",
1338
+ disabled: item.disabled,
1339
+ className: DropdownMenu_default.item,
1340
+ onClick: () => {
1341
+ item.onClick?.();
1342
+ close();
1343
+ },
1344
+ onKeyDown: (e) => handleItemKeyDown(e, index),
1345
+ children: [
1346
+ item.icon && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { className: DropdownMenu_default.icon, "aria-hidden": "true", children: item.icon }),
1347
+ item.label
1348
+ ]
1349
+ }
1350
+ )
1351
+ ] }, item.id))
1352
+ }
1353
+ )
1354
+ ] });
1355
+ }
1356
+
1357
+ // src/components/interaction/Popover/Popover.tsx
1358
+ var import_react10 = require("react");
1359
+
1360
+ // src/components/interaction/Popover/Popover.module.css
1361
+ var Popover_default = {};
1362
+
1363
+ // src/components/interaction/Popover/Popover.tsx
1364
+ var import_design_system_foundation26 = require("@boostdev/design-system-foundation");
1365
+ var import_jsx_runtime27 = require("react/jsx-runtime");
1366
+ function Popover({
1367
+ children,
1368
+ content,
1369
+ placement = "bottom",
1370
+ className
1371
+ }) {
1372
+ const [isOpen, setIsOpen] = (0, import_react10.useState)(false);
1373
+ const containerRef = (0, import_react10.useRef)(null);
1374
+ const panelId = (0, import_react10.useId)();
1375
+ (0, import_react10.useEffect)(() => {
1376
+ if (!isOpen) return;
1377
+ const handlePointerDown = (e) => {
1378
+ if (!containerRef.current?.contains(e.target)) {
1379
+ setIsOpen(false);
1380
+ }
1381
+ };
1382
+ const handleKeyDown = (e) => {
1383
+ if (e.key === "Escape") setIsOpen(false);
1384
+ };
1385
+ document.addEventListener("pointerdown", handlePointerDown);
1386
+ document.addEventListener("keydown", handleKeyDown);
1387
+ return () => {
1388
+ document.removeEventListener("pointerdown", handlePointerDown);
1389
+ document.removeEventListener("keydown", handleKeyDown);
1390
+ };
1391
+ }, [isOpen]);
1392
+ const trigger = (0, import_react10.isValidElement)(children) ? (0, import_react10.cloneElement)(children, {
1393
+ "aria-expanded": isOpen,
1394
+ "aria-controls": panelId,
1395
+ onClick: (e) => {
1396
+ setIsOpen((prev) => !prev);
1397
+ const existingOnClick = children.props.onClick;
1398
+ if (typeof existingOnClick === "function") existingOnClick(e);
1399
+ }
1400
+ }) : children;
1401
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("span", { ref: containerRef, className: (0, import_design_system_foundation26.cn)(Popover_default.wrapper, className), children: [
1402
+ trigger,
1403
+ isOpen && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
1404
+ "div",
1405
+ {
1406
+ id: panelId,
1407
+ role: "dialog",
1408
+ "aria-modal": "false",
1409
+ className: (0, import_design_system_foundation26.cn)(Popover_default.panel, Popover_default[`--placement_${placement}`]),
1410
+ children: content
1411
+ }
1412
+ )
1413
+ ] });
1414
+ }
1415
+
1416
+ // src/components/interaction/Rating/Rating.module.css
1417
+ var Rating_default = {};
1418
+
1419
+ // src/components/interaction/Rating/Rating.tsx
1420
+ var import_design_system_foundation27 = require("@boostdev/design-system-foundation");
1421
+ var import_jsx_runtime28 = require("react/jsx-runtime");
1422
+ function Rating({ value, max = 5, className }) {
1423
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
1424
+ "div",
1425
+ {
1426
+ className: (0, import_design_system_foundation27.cn)(Rating_default.rating, className),
1427
+ role: "img",
1428
+ "aria-label": `${value} out of ${max} stars`,
1429
+ children: Array.from({ length: max }).map((_, i) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
1430
+ "svg",
1431
+ {
1432
+ "aria-hidden": "true",
1433
+ className: (0, import_design_system_foundation27.cn)(Rating_default.star, i < value && Rating_default["--filled"]),
1434
+ fill: "currentColor",
1435
+ viewBox: "0 0 24 24",
1436
+ children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("path", { d: "M12 17.27L18.18 21l-1.64-7.03L22 9.24l-7.19-.61L12 2 9.19 8.63 2 9.24l5.46 4.73L5.82 21z" })
1437
+ },
1438
+ i
1439
+ ))
1440
+ }
1441
+ );
1442
+ }
1443
+
1444
+ // src/components/interaction/Toast/Toast.tsx
1445
+ var import_react11 = require("react");
1446
+
1447
+ // src/components/interaction/Toast/Toast.module.css
1448
+ var Toast_default = {};
1449
+
1450
+ // src/components/interaction/Toast/Toast.tsx
1451
+ var import_design_system_foundation28 = require("@boostdev/design-system-foundation");
1452
+ var import_jsx_runtime29 = require("react/jsx-runtime");
1453
+ var ToastContext = (0, import_react11.createContext)(void 0);
1454
+ function ToastProvider({ children }) {
1455
+ const [toasts, setToasts] = (0, import_react11.useState)([]);
1456
+ const showToast = (0, import_react11.useCallback)((message, variant) => {
1457
+ const id = Math.random().toString(36).substring(2, 9);
1458
+ setToasts((prev) => [...prev, { id, message, variant }]);
1459
+ }, []);
1460
+ const removeToast = (0, import_react11.useCallback)((id) => {
1461
+ setToasts((prev) => prev.filter((toast) => toast.id !== id));
1462
+ }, []);
1463
+ const value = (0, import_react11.useMemo)(() => ({ showToast }), [showToast]);
1464
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(ToastContext.Provider, { value, children: [
1465
+ children,
1466
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: Toast_default.toastContainer, children: toasts.map((toast) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
1467
+ ToastItem,
1468
+ {
1469
+ toast,
1470
+ onRemove: () => removeToast(toast.id)
1471
+ },
1472
+ toast.id
1473
+ )) })
1474
+ ] });
1475
+ }
1476
+ function ToastItem({ toast, onRemove }) {
1477
+ (0, import_react11.useEffect)(() => {
1478
+ const timer = setTimeout(onRemove, 5e3);
1479
+ return () => clearTimeout(timer);
1480
+ }, [onRemove]);
1481
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { className: (0, import_design_system_foundation28.cn)(Toast_default.toast, Toast_default[`--variant_${toast.variant}`]), children: toast.message });
1482
+ }
1483
+ function useToast() {
1484
+ const context = (0, import_react11.useContext)(ToastContext);
1485
+ if (!context) {
1486
+ throw new Error("useToast must be used within a ToastProvider");
1487
+ }
1488
+ return context;
1489
+ }
1490
+
1491
+ // src/components/interaction/form/Checkbox/Checkbox.tsx
1492
+ var import_react12 = require("react");
1493
+
1494
+ // src/components/interaction/form/Checkbox/Checkbox.module.css
1495
+ var Checkbox_default = {};
1496
+
1497
+ // src/components/interaction/form/atoms/Message.module.css
1498
+ var Message_default = {};
1499
+
1500
+ // src/components/interaction/form/atoms/Message.tsx
1501
+ var import_jsx_runtime30 = require("react/jsx-runtime");
1502
+ var Message = ({ message, type, inputId }) => {
1503
+ if (!message) return null;
1504
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("label", { id: inputId + type, htmlFor: inputId, className: Message_default[type], children: message });
1505
+ };
1506
+
1507
+ // src/components/interaction/form/atoms/Label.module.css
1508
+ var Label_default = {};
1509
+
1510
+ // src/components/interaction/form/atoms/Label.tsx
1511
+ var import_jsx_runtime31 = require("react/jsx-runtime");
1512
+ var Label = ({ label, id }) => {
1513
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("label", { htmlFor: id, className: Label_default.label, children: label });
1514
+ };
1515
+
1516
+ // src/components/interaction/form/Checkbox/Checkbox.tsx
1517
+ var import_design_system_foundation30 = require("@boostdev/design-system-foundation");
1518
+
1519
+ // src/components/interaction/form/atoms/InputContainer.module.css
1520
+ var InputContainer_default = {};
1521
+
1522
+ // src/components/interaction/form/atoms/InputContainer.tsx
1523
+ var import_design_system_foundation29 = require("@boostdev/design-system-foundation");
1524
+ var import_jsx_runtime32 = require("react/jsx-runtime");
1525
+ var InputContainer = ({ children, className }) => {
1526
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)("div", { className: (0, import_design_system_foundation29.cn)(InputContainer_default.container, className), children });
1527
+ };
1528
+
1529
+ // src/components/interaction/form/Checkbox/Checkbox.tsx
1530
+ var import_jsx_runtime33 = require("react/jsx-runtime");
1531
+ function Checkbox({ label, name, error, hint, className, ...props }) {
1532
+ const id = name + (0, import_react12.useId)();
1533
+ const hintId = id + "hint";
1534
+ const errorId = id + "error";
1535
+ const describedBy = !!error ? errorId : hintId;
1536
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(InputContainer, { className: (0, import_design_system_foundation30.cn)(Checkbox_default.checkboxGroup, className), children: [
1537
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)("div", { className: Checkbox_default.inputWrapper, children: [
1538
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
1539
+ "input",
1540
+ {
1541
+ "aria-describedby": describedBy,
1542
+ type: "checkbox",
1543
+ id,
1544
+ name,
1545
+ className: `${Checkbox_default.checkbox} ${error ? Checkbox_default.checkboxError : ""}`,
1546
+ ...props
1547
+ }
1548
+ ),
1549
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Label, { id, label })
1550
+ ] }),
1551
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Message, { inputId: id, type: "error", message: error }),
1552
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Message, { inputId: id, type: "hint", message: hint })
1553
+ ] });
1554
+ }
1555
+
1556
+ // src/components/interaction/form/Combobox/Combobox.tsx
1557
+ var import_react13 = require("react");
1558
+
1559
+ // src/components/interaction/form/Combobox/Combobox.module.css
1560
+ var Combobox_default = {};
1561
+
1562
+ // src/components/interaction/form/Combobox/Combobox.tsx
1563
+ var import_design_system_foundation31 = require("@boostdev/design-system-foundation");
1564
+ var import_jsx_runtime34 = require("react/jsx-runtime");
1565
+ function Combobox({
1566
+ label,
1567
+ name,
1568
+ options,
1569
+ placeholder,
1570
+ value,
1571
+ onChange,
1572
+ error,
1573
+ hint,
1574
+ className
1575
+ }) {
1576
+ const id = name + (0, import_react13.useId)();
1577
+ const listboxId = id + "listbox";
1578
+ const hintId = id + "hint";
1579
+ const errorId = id + "error";
1580
+ const describedBy = error ? errorId : hintId;
1581
+ const selectedOption = options.find((o) => o.value === value);
1582
+ const [inputValue, setInputValue] = (0, import_react13.useState)(selectedOption?.label ?? "");
1583
+ const [isOpen, setIsOpen] = (0, import_react13.useState)(false);
1584
+ const [highlightedIndex, setHighlightedIndex] = (0, import_react13.useState)(-1);
1585
+ const containerRef = (0, import_react13.useRef)(null);
1586
+ const inputRef = (0, import_react13.useRef)(null);
1587
+ const filtered = options.filter(
1588
+ (o) => o.label.toLowerCase().includes(inputValue.toLowerCase())
1589
+ );
1590
+ const getOptionId = (index) => `${id}-option-${index}`;
1591
+ (0, import_react13.useEffect)(() => {
1592
+ if (!isOpen) return;
1593
+ const handlePointerDown = (e) => {
1594
+ if (!containerRef.current?.contains(e.target)) setIsOpen(false);
1595
+ };
1596
+ document.addEventListener("pointerdown", handlePointerDown);
1597
+ return () => document.removeEventListener("pointerdown", handlePointerDown);
1598
+ }, [isOpen]);
1599
+ const selectOption = (option) => {
1600
+ setInputValue(option.label);
1601
+ setIsOpen(false);
1602
+ setHighlightedIndex(-1);
1603
+ onChange?.(option.value);
1604
+ };
1605
+ const handleInputChange = (e) => {
1606
+ setInputValue(e.target.value);
1607
+ setIsOpen(true);
1608
+ setHighlightedIndex(-1);
1609
+ };
1610
+ const handleKeyDown = (e) => {
1611
+ const enabledIndexes = filtered.map((opt, i) => ({ opt, i })).filter(({ opt }) => !opt.disabled).map(({ i }) => i);
1612
+ if (e.key === "ArrowDown") {
1613
+ e.preventDefault();
1614
+ if (!isOpen) {
1615
+ setIsOpen(true);
1616
+ return;
1617
+ }
1618
+ const pos = enabledIndexes.indexOf(highlightedIndex);
1619
+ setHighlightedIndex(enabledIndexes[(pos + 1) % enabledIndexes.length] ?? 0);
1620
+ } else if (e.key === "ArrowUp") {
1621
+ e.preventDefault();
1622
+ const pos = enabledIndexes.indexOf(highlightedIndex);
1623
+ setHighlightedIndex(
1624
+ enabledIndexes[(pos - 1 + enabledIndexes.length) % enabledIndexes.length] ?? 0
1625
+ );
1626
+ } else if (e.key === "Enter") {
1627
+ e.preventDefault();
1628
+ if (highlightedIndex >= 0 && filtered[highlightedIndex]) {
1629
+ selectOption(filtered[highlightedIndex]);
1630
+ }
1631
+ } else if (e.key === "Escape") {
1632
+ setIsOpen(false);
1633
+ setHighlightedIndex(-1);
1634
+ } else if (e.key === "Tab") {
1635
+ setIsOpen(false);
1636
+ }
1637
+ };
1638
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(InputContainer, { className: (0, import_design_system_foundation31.cn)(Combobox_default.formGroup, className), children: [
1639
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Label, { id, label }),
1640
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)("div", { ref: containerRef, className: Combobox_default.inputWrapper, children: [
1641
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
1642
+ "input",
1643
+ {
1644
+ ref: inputRef,
1645
+ id,
1646
+ name,
1647
+ type: "text",
1648
+ role: "combobox",
1649
+ "aria-expanded": isOpen,
1650
+ "aria-haspopup": "listbox",
1651
+ "aria-autocomplete": "list",
1652
+ "aria-controls": listboxId,
1653
+ "aria-activedescendant": highlightedIndex >= 0 ? getOptionId(highlightedIndex) : void 0,
1654
+ "aria-invalid": !!error,
1655
+ "aria-describedby": describedBy,
1656
+ autoComplete: "off",
1657
+ placeholder,
1658
+ value: inputValue,
1659
+ className: (0, import_design_system_foundation31.cn)(Combobox_default.input, error ? Combobox_default.inputError : void 0),
1660
+ onChange: handleInputChange,
1661
+ onKeyDown: handleKeyDown,
1662
+ onFocus: () => setIsOpen(true)
1663
+ }
1664
+ ),
1665
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("span", { className: Combobox_default.chevron, "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6 9l6 6 6-6" }) }) }),
1666
+ isOpen && filtered.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
1667
+ "ul",
1668
+ {
1669
+ id: listboxId,
1670
+ role: "listbox",
1671
+ "aria-label": String(label),
1672
+ className: Combobox_default.listbox,
1673
+ children: filtered.map((option, index) => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
1674
+ "li",
1675
+ {
1676
+ id: getOptionId(index),
1677
+ role: "option",
1678
+ "aria-selected": option.value === value,
1679
+ "aria-disabled": option.disabled,
1680
+ className: (0, import_design_system_foundation31.cn)(
1681
+ Combobox_default.option,
1682
+ index === highlightedIndex ? Combobox_default["--highlighted"] : void 0,
1683
+ option.value === value ? Combobox_default["--selected"] : void 0,
1684
+ option.disabled ? Combobox_default["--disabled"] : void 0
1685
+ ),
1686
+ onPointerDown: (e) => {
1687
+ e.preventDefault();
1688
+ if (!option.disabled) selectOption(option);
1689
+ },
1690
+ children: option.label
1691
+ },
1692
+ option.value
1693
+ ))
1694
+ }
1695
+ )
1696
+ ] }),
1697
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Message, { inputId: id, type: "error", message: error }),
1698
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Message, { inputId: id, type: "hint", message: hint })
1699
+ ] });
1700
+ }
1701
+
1702
+ // src/components/interaction/form/FileInput/FileInput.tsx
1703
+ var import_react14 = require("react");
1704
+
1705
+ // src/components/interaction/form/FileInput/FileInput.module.css
1706
+ var FileInput_default = {};
1707
+
1708
+ // src/components/interaction/form/FileInput/FileInput.tsx
1709
+ var import_design_system_foundation32 = require("@boostdev/design-system-foundation");
1710
+ var import_jsx_runtime35 = require("react/jsx-runtime");
1711
+ function FileInput({
1712
+ label,
1713
+ name,
1714
+ accept,
1715
+ multiple = false,
1716
+ disabled = false,
1717
+ error,
1718
+ hint,
1719
+ onChange,
1720
+ className
1721
+ }) {
1722
+ const uid = name + (0, import_react14.useId)();
1723
+ const hintId = uid + "hint";
1724
+ const errorId = uid + "error";
1725
+ const describedBy = error ? errorId : hintId;
1726
+ const inputRef = (0, import_react14.useRef)(null);
1727
+ const [isDragging, setIsDragging] = (0, import_react14.useState)(false);
1728
+ const [fileNames, setFileNames] = (0, import_react14.useState)([]);
1729
+ const handleFiles = (files) => {
1730
+ if (!files) return;
1731
+ setFileNames(Array.from(files).map((f) => f.name));
1732
+ onChange?.(files);
1733
+ };
1734
+ const handleChange = (e) => handleFiles(e.target.files);
1735
+ const handleDrop = (e) => {
1736
+ e.preventDefault();
1737
+ setIsDragging(false);
1738
+ if (disabled) return;
1739
+ handleFiles(e.dataTransfer.files);
1740
+ };
1741
+ const handleDragOver = (e) => {
1742
+ e.preventDefault();
1743
+ if (!disabled) setIsDragging(true);
1744
+ };
1745
+ const handleDragLeave = () => setIsDragging(false);
1746
+ return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(InputContainer, { className: (0, import_design_system_foundation32.cn)(FileInput_default.formGroup, className), children: [
1747
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Label, { id: uid, label }),
1748
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(
1749
+ "label",
1750
+ {
1751
+ htmlFor: uid,
1752
+ className: (0, import_design_system_foundation32.cn)(FileInput_default.dropZone, isDragging && FileInput_default.isDragging, error && FileInput_default.hasError, disabled && FileInput_default.isDisabled),
1753
+ onDrop: handleDrop,
1754
+ onDragOver: handleDragOver,
1755
+ onDragLeave: handleDragLeave,
1756
+ children: [
1757
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("svg", { "aria-hidden": "true", className: FileInput_default.icon, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", children: /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M3 16.5v2.25A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75V16.5m-13.5-9L12 3m0 0l4.5 4.5M12 3v13.5" }) }),
1758
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: FileInput_default.prompt, children: fileNames.length > 0 ? fileNames.join(", ") : /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_jsx_runtime35.Fragment, { children: [
1759
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("strong", { children: "Click to upload" }),
1760
+ " or drag and drop"
1761
+ ] }) }),
1762
+ accept && /* @__PURE__ */ (0, import_jsx_runtime35.jsx)("span", { className: FileInput_default.acceptHint, children: accept }),
1763
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
1764
+ "input",
1765
+ {
1766
+ ref: inputRef,
1767
+ id: uid,
1768
+ type: "file",
1769
+ name,
1770
+ accept,
1771
+ multiple,
1772
+ disabled,
1773
+ "aria-invalid": !!error,
1774
+ "aria-describedby": describedBy,
1775
+ className: FileInput_default.hiddenInput,
1776
+ onChange: handleChange
1777
+ }
1778
+ )
1779
+ ]
1780
+ }
1781
+ ),
1782
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Message, { inputId: uid, type: "error", message: error }),
1783
+ /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(Message, { inputId: uid, type: "hint", message: hint })
1784
+ ] });
1785
+ }
1786
+
1787
+ // src/components/interaction/form/FormInput/FormInput.tsx
1788
+ var import_react15 = require("react");
1789
+
1790
+ // src/components/interaction/form/FormInput/FormInput.module.css
1791
+ var FormInput_default = {};
1792
+
1793
+ // src/components/interaction/form/FormInput/FormInput.tsx
1794
+ var import_design_system_foundation33 = require("@boostdev/design-system-foundation");
1795
+ var import_jsx_runtime36 = require("react/jsx-runtime");
1796
+ function FormInput({
1797
+ label,
1798
+ name,
1799
+ ariaLabel,
1800
+ error,
1801
+ hint,
1802
+ className,
1803
+ ...props
1804
+ }) {
1805
+ const id = name + (0, import_react15.useId)();
1806
+ const hintId = id + "hint";
1807
+ const errorId = id + "error";
1808
+ const describedBy = !!error ? errorId : hintId;
1809
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(InputContainer, { className: (0, import_design_system_foundation33.cn)(FormInput_default.formGroup, className), children: [
1810
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Label, { id, label }),
1811
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
1812
+ "input",
1813
+ {
1814
+ "aria-invalid": !!error,
1815
+ "aria-describedby": describedBy,
1816
+ "aria-label": ariaLabel,
1817
+ id,
1818
+ name,
1819
+ className: `${FormInput_default.input} ${error ? FormInput_default.inputError : ""}`,
1820
+ ...props
1821
+ }
1822
+ ),
1823
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Message, { inputId: id, type: "error", message: error }),
1824
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Message, { inputId: id, type: "hint", message: hint })
1825
+ ] });
1826
+ }
1827
+
1828
+ // src/components/interaction/form/NumberInput/NumberInput.tsx
1829
+ var import_react16 = require("react");
1830
+
1831
+ // src/components/interaction/form/NumberInput/NumberInput.module.css
1832
+ var NumberInput_default = {};
1833
+
1834
+ // src/components/interaction/form/NumberInput/NumberInput.tsx
1835
+ var import_design_system_foundation34 = require("@boostdev/design-system-foundation");
1836
+ var import_jsx_runtime37 = require("react/jsx-runtime");
1837
+ function NumberInput({
1838
+ label,
1839
+ name,
1840
+ value,
1841
+ defaultValue,
1842
+ min,
1843
+ max,
1844
+ step = 1,
1845
+ disabled = false,
1846
+ error,
1847
+ hint,
1848
+ onChange,
1849
+ className
1850
+ }) {
1851
+ const uid = name + (0, import_react16.useId)();
1852
+ const hintId = uid + "hint";
1853
+ const errorId = uid + "error";
1854
+ const describedBy = error ? errorId : hintId;
1855
+ const inputRef = (0, import_react16.useRef)(null);
1856
+ const clamp = (v) => {
1857
+ const withMin = min !== void 0 ? Math.max(min, v) : v;
1858
+ const withMax = max !== void 0 ? Math.min(max, withMin) : withMin;
1859
+ return withMax;
1860
+ };
1861
+ const adjust = (delta) => {
1862
+ if (!inputRef.current) return;
1863
+ const current = parseFloat(inputRef.current.value) || 0;
1864
+ const next = clamp(current + delta);
1865
+ inputRef.current.value = String(next);
1866
+ onChange?.(next);
1867
+ };
1868
+ return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(InputContainer, { className: (0, import_design_system_foundation34.cn)(NumberInput_default.formGroup, className), children: [
1869
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Label, { id: uid, label }),
1870
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { className: NumberInput_default.inputRow, children: [
1871
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
1872
+ "button",
1873
+ {
1874
+ type: "button",
1875
+ className: NumberInput_default.stepper,
1876
+ "aria-label": "Decrease",
1877
+ disabled: disabled || min !== void 0 && (value ?? defaultValue ?? 0) <= min,
1878
+ onClick: () => adjust(-step),
1879
+ tabIndex: -1,
1880
+ children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M5 12h14" }) })
1881
+ }
1882
+ ),
1883
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
1884
+ "input",
1885
+ {
1886
+ ref: inputRef,
1887
+ id: uid,
1888
+ type: "number",
1889
+ name,
1890
+ defaultValue,
1891
+ value,
1892
+ min,
1893
+ max,
1894
+ step,
1895
+ disabled,
1896
+ "aria-invalid": !!error,
1897
+ "aria-describedby": describedBy,
1898
+ className: (0, import_design_system_foundation34.cn)(NumberInput_default.input, error ? NumberInput_default.inputError : void 0),
1899
+ onChange: (e) => onChange?.(parseFloat(e.target.value))
1900
+ }
1901
+ ),
1902
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
1903
+ "button",
1904
+ {
1905
+ type: "button",
1906
+ className: NumberInput_default.stepper,
1907
+ "aria-label": "Increase",
1908
+ disabled: disabled || max !== void 0 && (value ?? defaultValue ?? 0) >= max,
1909
+ onClick: () => adjust(step),
1910
+ tabIndex: -1,
1911
+ children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2.5", children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M12 5v14M5 12h14" }) })
1912
+ }
1913
+ )
1914
+ ] }),
1915
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Message, { inputId: uid, type: "error", message: error }),
1916
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Message, { inputId: uid, type: "hint", message: hint })
1917
+ ] });
1918
+ }
1919
+
1920
+ // src/components/interaction/form/Radio/Radio.tsx
1921
+ var import_react17 = require("react");
1922
+
1923
+ // src/components/interaction/form/Radio/Radio.module.css
1924
+ var Radio_default = {};
1925
+
1926
+ // src/components/interaction/form/Radio/Radio.tsx
1927
+ var import_design_system_foundation35 = require("@boostdev/design-system-foundation");
1928
+ var import_jsx_runtime38 = require("react/jsx-runtime");
1929
+ function Radio({ label, name, error, hint, className, ...props }) {
1930
+ const id = name + (0, import_react17.useId)();
1931
+ const hintId = id + "hint";
1932
+ const errorId = id + "error";
1933
+ const describedBy = !!error ? errorId : hintId;
1934
+ return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(InputContainer, { className: (0, import_design_system_foundation35.cn)(Radio_default.radioGroup, className), children: [
1935
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: Radio_default.inputWrapper, children: [
1936
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
1937
+ "input",
1938
+ {
1939
+ "aria-describedby": describedBy,
1940
+ type: "radio",
1941
+ id,
1942
+ name,
1943
+ className: `${Radio_default.radio} ${error ? Radio_default.radioError : ""}`,
1944
+ ...props
1945
+ }
1946
+ ),
1947
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Label, { id, label })
1948
+ ] }),
1949
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Message, { inputId: id, type: "error", message: error }),
1950
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Message, { inputId: id, type: "hint", message: hint })
1951
+ ] });
1952
+ }
1953
+
1954
+ // src/components/interaction/form/Select/Select.tsx
1955
+ var import_react18 = require("react");
1956
+
1957
+ // src/components/interaction/form/Select/Select.module.css
1958
+ var Select_default = {};
1959
+
1960
+ // src/components/interaction/form/Select/Select.tsx
1961
+ var import_design_system_foundation36 = require("@boostdev/design-system-foundation");
1962
+ var import_jsx_runtime39 = require("react/jsx-runtime");
1963
+ function Select({
1964
+ label,
1965
+ name,
1966
+ options,
1967
+ placeholder,
1968
+ error,
1969
+ hint,
1970
+ className,
1971
+ ...props
1972
+ }) {
1973
+ const id = name + (0, import_react18.useId)();
1974
+ const hintId = id + "hint";
1975
+ const errorId = id + "error";
1976
+ const describedBy = error ? errorId : hintId;
1977
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(InputContainer, { className: (0, import_design_system_foundation36.cn)(Select_default.formGroup, className), children: [
1978
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Label, { id, label }),
1979
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { className: Select_default.selectWrapper, children: [
1980
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(
1981
+ "select",
1982
+ {
1983
+ id,
1984
+ name,
1985
+ "aria-invalid": !!error,
1986
+ "aria-describedby": describedBy,
1987
+ className: (0, import_design_system_foundation36.cn)(Select_default.select, error ? Select_default.selectError : void 0),
1988
+ ...props,
1989
+ children: [
1990
+ placeholder && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("option", { value: "", disabled: true, children: placeholder }),
1991
+ options.map(({ value, label: optLabel, disabled }) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("option", { value, disabled, children: optLabel }, value))
1992
+ ]
1993
+ }
1994
+ ),
1995
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { className: Select_default.chevron, "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6 9l6 6 6-6" }) }) })
1996
+ ] }),
1997
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Message, { inputId: id, type: "error", message: error }),
1998
+ /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Message, { inputId: id, type: "hint", message: hint })
1999
+ ] });
2000
+ }
2001
+
2002
+ // src/components/interaction/form/Slider/Slider.tsx
2003
+ var import_react19 = require("react");
2004
+
2005
+ // src/components/interaction/form/Slider/Slider.module.css
2006
+ var Slider_default = {};
2007
+
2008
+ // src/components/interaction/form/Slider/Slider.tsx
2009
+ var import_design_system_foundation37 = require("@boostdev/design-system-foundation");
2010
+ var import_jsx_runtime40 = require("react/jsx-runtime");
2011
+ function Slider({
2012
+ label,
2013
+ name,
2014
+ min = 0,
2015
+ max = 100,
2016
+ showValue = false,
2017
+ error,
2018
+ hint,
2019
+ className,
2020
+ onChange,
2021
+ ...props
2022
+ }) {
2023
+ const id = name + (0, import_react19.useId)();
2024
+ const hintId = id + "hint";
2025
+ const errorId = id + "error";
2026
+ const describedBy = error ? errorId : hintId;
2027
+ const initialValue = Number(props.value ?? props.defaultValue ?? min);
2028
+ const [currentValue, setCurrentValue] = (0, import_react19.useState)(initialValue);
2029
+ const fillPct = (currentValue - min) / (max - min) * 100;
2030
+ const handleChange = (e) => {
2031
+ setCurrentValue(Number(e.target.value));
2032
+ onChange?.(e);
2033
+ };
2034
+ return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(InputContainer, { className: (0, import_design_system_foundation37.cn)(Slider_default.formGroup, className), children: [
2035
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("div", { className: Slider_default.labelRow, children: [
2036
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Label, { id, label }),
2037
+ showValue && /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: Slider_default.value, children: currentValue })
2038
+ ] }),
2039
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
2040
+ "input",
2041
+ {
2042
+ type: "range",
2043
+ id,
2044
+ name,
2045
+ min,
2046
+ max,
2047
+ "aria-describedby": describedBy,
2048
+ "aria-valuemin": min,
2049
+ "aria-valuemax": max,
2050
+ "aria-valuenow": currentValue,
2051
+ className: (0, import_design_system_foundation37.cn)(Slider_default.slider, error ? Slider_default.sliderError : void 0),
2052
+ style: { "--slider_fill": `${fillPct}%` },
2053
+ onChange: handleChange,
2054
+ ...props
2055
+ }
2056
+ ),
2057
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Message, { inputId: id, type: "error", message: error }),
2058
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Message, { inputId: id, type: "hint", message: hint })
2059
+ ] });
2060
+ }
2061
+
2062
+ // src/components/interaction/form/Switch/Switch.tsx
2063
+ var import_react20 = require("react");
2064
+
2065
+ // src/components/interaction/form/Switch/Switch.module.css
2066
+ var Switch_default = {};
2067
+
2068
+ // src/components/interaction/form/Switch/Switch.tsx
2069
+ var import_design_system_foundation38 = require("@boostdev/design-system-foundation");
2070
+ var import_jsx_runtime41 = require("react/jsx-runtime");
2071
+ function Switch({
2072
+ label,
2073
+ name,
2074
+ size = "medium",
2075
+ error,
2076
+ hint,
2077
+ className,
2078
+ ...props
2079
+ }) {
2080
+ const id = name + (0, import_react20.useId)();
2081
+ const hintId = id + "hint";
2082
+ const errorId = id + "error";
2083
+ const describedBy = error ? errorId : hintId;
2084
+ return /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(InputContainer, { className: (0, import_design_system_foundation38.cn)(Switch_default.switchGroup, Switch_default[`--size_${size}`], className), children: [
2085
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: Switch_default.inputWrapper, children: [
2086
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)("div", { className: Switch_default.trackWrapper, children: [
2087
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
2088
+ "input",
2089
+ {
2090
+ type: "checkbox",
2091
+ role: "switch",
2092
+ id,
2093
+ name,
2094
+ "aria-describedby": describedBy,
2095
+ className: (0, import_design_system_foundation38.cn)(Switch_default.switch, error ? Switch_default.switchError : void 0),
2096
+ ...props
2097
+ }
2098
+ ),
2099
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: Switch_default.track, "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)("span", { className: Switch_default.thumb }) })
2100
+ ] }),
2101
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Label, { id, label })
2102
+ ] }),
2103
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Message, { inputId: id, type: "error", message: error }),
2104
+ /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(Message, { inputId: id, type: "hint", message: hint })
2105
+ ] });
2106
+ }
2107
+
2108
+ // src/components/interaction/form/Textarea/Textarea.tsx
2109
+ var import_react21 = require("react");
2110
+
2111
+ // src/components/interaction/form/Textarea/Textarea.module.css
2112
+ var Textarea_default = {};
2113
+
2114
+ // src/components/interaction/form/Textarea/Textarea.tsx
2115
+ var import_design_system_foundation39 = require("@boostdev/design-system-foundation");
2116
+ var import_jsx_runtime42 = require("react/jsx-runtime");
2117
+ function Textarea({
2118
+ label,
2119
+ name,
2120
+ error,
2121
+ hint,
2122
+ className,
2123
+ ...props
2124
+ }) {
2125
+ const id = name + (0, import_react21.useId)();
2126
+ const hintId = id + "hint";
2127
+ const errorId = id + "error";
2128
+ const describedBy = error ? errorId : hintId;
2129
+ return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(InputContainer, { className: (0, import_design_system_foundation39.cn)(Textarea_default.formGroup, className), children: [
2130
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Label, { id, label }),
2131
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
2132
+ "textarea",
2133
+ {
2134
+ id,
2135
+ name,
2136
+ "aria-invalid": !!error,
2137
+ "aria-describedby": describedBy,
2138
+ className: (0, import_design_system_foundation39.cn)(Textarea_default.textarea, error ? Textarea_default.textareaError : void 0),
2139
+ ...props
2140
+ }
2141
+ ),
2142
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Message, { inputId: id, type: "error", message: error }),
2143
+ /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Message, { inputId: id, type: "hint", message: hint })
2144
+ ] });
2145
+ }
2146
+
2147
+ // src/components/layout/ButtonGroup/ButtonGroup.module.css
2148
+ var ButtonGroup_default = {};
2149
+
2150
+ // src/components/layout/ButtonGroup/ButtonGroup.tsx
2151
+ var import_design_system_foundation40 = require("@boostdev/design-system-foundation");
2152
+ var import_jsx_runtime43 = require("react/jsx-runtime");
2153
+ function ButtonGroup({ children, className, variant }) {
2154
+ return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: (0, import_design_system_foundation40.cn)(ButtonGroup_default.buttonGroup, className, variant && ButtonGroup_default[`--variant__${variant}`]), children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)("div", { className: ButtonGroup_default.container, children }) });
2155
+ }
2156
+
2157
+ // src/components/layout/Card/Card.module.css
2158
+ var Card_default = {};
2159
+
2160
+ // src/components/layout/Card/Card.tsx
2161
+ var import_design_system_foundation41 = require("@boostdev/design-system-foundation");
2162
+ var import_jsx_runtime44 = require("react/jsx-runtime");
2163
+ function Card({
2164
+ children,
2165
+ className,
2166
+ variant = "default",
2167
+ padding = "medium",
2168
+ textAlign = "start",
2169
+ style,
2170
+ onClick
2171
+ }) {
2172
+ const classNames = (0, import_design_system_foundation41.cn)(
2173
+ Card_default.card,
2174
+ Card_default[`--${variant}`],
2175
+ Card_default[`--padding-${padding}`],
2176
+ Card_default[`--text-${textAlign}`],
2177
+ onClick && Card_default["--clickable"],
2178
+ className
2179
+ );
2180
+ const Component = onClick ? "button" : "div";
2181
+ return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
2182
+ Component,
2183
+ {
2184
+ className: classNames,
2185
+ onClick,
2186
+ style,
2187
+ ...onClick && { type: "button" },
2188
+ children
2189
+ }
2190
+ );
2191
+ }
2192
+
2193
+ // src/components/layout/SectionHeader/SectionHeader.module.css
2194
+ var SectionHeader_default = {};
2195
+
2196
+ // src/components/layout/SectionHeader/SectionHeader.tsx
2197
+ var import_design_system_foundation42 = require("@boostdev/design-system-foundation");
2198
+ var import_jsx_runtime45 = require("react/jsx-runtime");
2199
+ function SectionHeader({
2200
+ title,
2201
+ subtitle,
2202
+ className,
2203
+ alignment = "start",
2204
+ size = "medium",
2205
+ titleAs = "h2"
2206
+ }) {
2207
+ const Title = titleAs;
2208
+ return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)("header", { className: (0, import_design_system_foundation42.cn)(SectionHeader_default.sectionHeader, SectionHeader_default[`--${alignment}`], SectionHeader_default[`--${size}`], className), children: [
2209
+ /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Title, { className: SectionHeader_default.title, children: title }),
2210
+ subtitle && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("p", { className: SectionHeader_default.subtitle, children: subtitle })
2211
+ ] });
2212
+ }
2213
+
2214
+ // src/components/layout/IconWrapper/IconWrapper.module.css
2215
+ var IconWrapper_default = {};
2216
+
2217
+ // src/components/layout/IconWrapper/IconWrapper.tsx
2218
+ var import_design_system_foundation43 = require("@boostdev/design-system-foundation");
2219
+ var import_jsx_runtime46 = require("react/jsx-runtime");
2220
+ function IconWrapper({ children, className }) {
2221
+ return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { className: (0, import_design_system_foundation43.cn)(className, IconWrapper_default.wrapper), children });
2222
+ }
2223
+
2224
+ // src/index.ts
2225
+ var import_design_system_foundation44 = require("@boostdev/design-system-foundation");
2226
+ // Annotate the CommonJS export names for ESM import in node:
2227
+ 0 && (module.exports = {
2228
+ Accordion,
2229
+ Alert,
2230
+ Avatar,
2231
+ Badge,
2232
+ Breadcrumb,
2233
+ Button,
2234
+ ButtonGroup,
2235
+ Calendar,
2236
+ Card,
2237
+ Carousel,
2238
+ Checkbox,
2239
+ Combobox,
2240
+ Command,
2241
+ DescriptionList,
2242
+ Dialog,
2243
+ Drawer,
2244
+ DropdownMenu,
2245
+ FileInput,
2246
+ FormInput,
2247
+ IconWrapper,
2248
+ Link,
2249
+ Loading,
2250
+ NotificationBanner,
2251
+ NumberInput,
2252
+ Pagination,
2253
+ Popover,
2254
+ Progress,
2255
+ ProgressCircle,
2256
+ Radio,
2257
+ Rating,
2258
+ SectionHeader,
2259
+ Select,
2260
+ Separator,
2261
+ Skeleton,
2262
+ SkipLink,
2263
+ Slider,
2264
+ Switch,
2265
+ Table,
2266
+ Tabs,
2267
+ Textarea,
2268
+ ToastProvider,
2269
+ Tooltip,
2270
+ Typography,
2271
+ cn,
2272
+ useToast
2273
+ });