@hellboy/ds 0.1.2 → 0.2.7

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 (298) hide show
  1. package/README.md +568 -71
  2. package/{src/style/components/badge → dist/components}/badge.css +9 -25
  3. package/dist/components/badge.d.mts +12 -0
  4. package/dist/components/badge.d.ts +12 -0
  5. package/dist/components/badge.js +42 -0
  6. package/dist/components/badge.mjs +15 -0
  7. package/dist/components/banner.css +280 -0
  8. package/dist/components/banner.d.mts +12 -0
  9. package/dist/components/banner.d.ts +12 -0
  10. package/dist/components/banner.js +184 -0
  11. package/dist/components/banner.mjs +147 -0
  12. package/dist/components/button-group.css +289 -0
  13. package/dist/components/button-group.d.mts +81 -0
  14. package/dist/components/button-group.d.ts +81 -0
  15. package/dist/components/button-group.js +180 -0
  16. package/dist/components/button-group.mjs +143 -0
  17. package/{src/style/components/button → dist/components}/button.css +59 -62
  18. package/dist/components/button.d.mts +57 -0
  19. package/dist/components/button.d.ts +57 -0
  20. package/dist/components/button.js +129 -0
  21. package/dist/components/button.mjs +92 -0
  22. package/{src/style/components/card → dist/components}/card.css +9 -30
  23. package/dist/components/card.d.mts +31 -0
  24. package/dist/components/card.d.ts +31 -0
  25. package/dist/components/card.js +59 -0
  26. package/dist/components/card.mjs +32 -0
  27. package/{src/style → dist}/components/checkbox.css +51 -43
  28. package/dist/components/checkbox.d.mts +31 -0
  29. package/dist/components/checkbox.d.ts +31 -0
  30. package/dist/components/checkbox.js +130 -0
  31. package/dist/components/checkbox.mjs +93 -0
  32. package/{src/style/components/code-block → dist/components}/code-block.css +3 -7
  33. package/dist/components/code-block.d.mts +24 -0
  34. package/dist/components/code-block.d.ts +24 -0
  35. package/dist/components/code-block.js +43 -0
  36. package/dist/components/code-block.mjs +16 -0
  37. package/dist/components/color-control.css +285 -0
  38. package/dist/components/color-control.d.mts +5 -0
  39. package/dist/components/color-control.d.ts +5 -0
  40. package/dist/components/color-control.js +534 -0
  41. package/dist/components/color-control.mjs +497 -0
  42. package/dist/components/dialog.css +930 -0
  43. package/dist/components/dialog.d.mts +32 -0
  44. package/dist/components/dialog.d.ts +32 -0
  45. package/dist/components/dialog.js +1111 -0
  46. package/dist/components/dialog.mjs +1074 -0
  47. package/dist/components/divider.css +356 -0
  48. package/dist/components/divider.d.mts +32 -0
  49. package/dist/components/divider.d.ts +32 -0
  50. package/dist/components/divider.js +344 -0
  51. package/dist/components/divider.mjs +307 -0
  52. package/{src/style/components/drag-handle → dist/components}/drag-handle.css +3 -18
  53. package/dist/components/drag-handle.d.mts +11 -0
  54. package/dist/components/drag-handle.d.ts +11 -0
  55. package/dist/components/drag-handle.js +103 -0
  56. package/dist/components/drag-handle.mjs +66 -0
  57. package/dist/components/drawer.css +1027 -0
  58. package/dist/components/drawer.d.mts +14 -0
  59. package/dist/components/drawer.d.ts +14 -0
  60. package/dist/components/drawer.js +1072 -0
  61. package/dist/components/drawer.mjs +1035 -0
  62. package/dist/components/floating-bar.css +17 -0
  63. package/dist/components/floating-bar.d.mts +25 -0
  64. package/dist/components/floating-bar.d.ts +25 -0
  65. package/dist/components/floating-bar.js +52 -0
  66. package/dist/components/floating-bar.mjs +25 -0
  67. package/dist/components/footer.css +40 -0
  68. package/dist/components/footer.d.mts +8 -0
  69. package/dist/components/footer.d.ts +8 -0
  70. package/dist/components/footer.js +44 -0
  71. package/dist/components/footer.mjs +17 -0
  72. package/dist/components/grid.css +47 -0
  73. package/dist/components/grid.d.mts +27 -0
  74. package/dist/components/grid.d.ts +27 -0
  75. package/dist/components/grid.js +52 -0
  76. package/dist/components/grid.mjs +25 -0
  77. package/dist/components/header.css +1075 -0
  78. package/dist/components/header.d.mts +35 -0
  79. package/dist/components/header.d.ts +35 -0
  80. package/dist/components/header.js +1402 -0
  81. package/dist/components/header.mjs +1365 -0
  82. package/dist/components/hero.css +121 -0
  83. package/dist/components/hero.d.mts +111 -0
  84. package/dist/components/hero.d.ts +111 -0
  85. package/dist/components/hero.js +285 -0
  86. package/dist/components/hero.mjs +248 -0
  87. package/{src/style/components/icons → dist/components}/icons.css +14 -15
  88. package/dist/components/icons.d.mts +104 -0
  89. package/dist/components/icons.d.ts +104 -0
  90. package/dist/components/icons.js +239 -0
  91. package/dist/components/icons.mjs +203 -0
  92. package/{src/style/components/input → dist/components}/input.css +189 -102
  93. package/dist/components/input.d.mts +114 -0
  94. package/dist/components/input.d.ts +114 -0
  95. package/dist/components/input.js +926 -0
  96. package/dist/components/input.mjs +879 -0
  97. package/dist/components/layout.css +551 -0
  98. package/dist/components/layout.d.mts +16 -0
  99. package/dist/components/layout.d.ts +16 -0
  100. package/dist/components/layout.js +387 -0
  101. package/dist/components/layout.mjs +352 -0
  102. package/{src/style/components/list → dist/components}/list.css +47 -41
  103. package/dist/components/list.d.mts +46 -0
  104. package/dist/components/list.d.ts +46 -0
  105. package/dist/components/list.js +124 -0
  106. package/dist/components/list.mjs +96 -0
  107. package/dist/components/navbar.css +706 -0
  108. package/dist/components/navbar.d.mts +56 -0
  109. package/dist/components/navbar.d.ts +56 -0
  110. package/dist/components/navbar.js +994 -0
  111. package/dist/components/navbar.mjs +952 -0
  112. package/{src/style/components/page-index → dist/components}/page-index.css +2 -47
  113. package/dist/components/page-index.d.mts +25 -0
  114. package/dist/components/page-index.d.ts +25 -0
  115. package/dist/components/page-index.js +239 -0
  116. package/dist/components/page-index.mjs +202 -0
  117. package/{src/style/components/page → dist/components}/page.css +4 -15
  118. package/dist/components/page.d.mts +30 -0
  119. package/dist/components/page.d.ts +30 -0
  120. package/dist/components/page.js +40 -0
  121. package/dist/components/page.mjs +13 -0
  122. package/dist/components/popover.css +87 -0
  123. package/dist/components/popover.d.mts +22 -0
  124. package/dist/components/popover.d.ts +22 -0
  125. package/dist/components/popover.js +243 -0
  126. package/dist/components/popover.mjs +206 -0
  127. package/{src/style → dist}/components/radio.css +8 -51
  128. package/dist/components/radio.d.mts +59 -0
  129. package/dist/components/radio.d.ts +59 -0
  130. package/dist/components/radio.js +133 -0
  131. package/dist/components/radio.mjs +95 -0
  132. package/dist/components/section.css +993 -0
  133. package/dist/components/section.d.mts +33 -0
  134. package/dist/components/section.d.ts +33 -0
  135. package/dist/components/section.js +1401 -0
  136. package/dist/components/section.mjs +1364 -0
  137. package/dist/components/select.css +391 -0
  138. package/dist/components/select.d.mts +63 -0
  139. package/dist/components/select.d.ts +63 -0
  140. package/dist/components/select.js +452 -0
  141. package/dist/components/select.mjs +415 -0
  142. package/{src/style/components/slider → dist/components}/slider.css +55 -33
  143. package/dist/components/slider.d.mts +69 -0
  144. package/dist/components/slider.d.ts +69 -0
  145. package/dist/components/slider.js +254 -0
  146. package/dist/components/slider.mjs +217 -0
  147. package/dist/components/switch.css +1081 -0
  148. package/dist/components/switch.d.mts +33 -0
  149. package/dist/components/switch.d.ts +33 -0
  150. package/dist/components/switch.js +1092 -0
  151. package/dist/components/switch.mjs +1055 -0
  152. package/{src/style/components/table → dist/components}/table.css +3 -28
  153. package/dist/components/table.d.mts +42 -0
  154. package/dist/components/table.d.ts +42 -0
  155. package/dist/components/table.js +108 -0
  156. package/dist/components/table.mjs +76 -0
  157. package/dist/components/tag.css +97 -0
  158. package/dist/components/tag.d.mts +12 -0
  159. package/dist/components/tag.d.ts +12 -0
  160. package/dist/components/tag.js +42 -0
  161. package/dist/components/tag.mjs +15 -0
  162. package/dist/components/textarea.css +1359 -0
  163. package/dist/components/textarea.d.mts +84 -0
  164. package/dist/components/textarea.d.ts +84 -0
  165. package/dist/components/textarea.js +1962 -0
  166. package/dist/components/textarea.mjs +1924 -0
  167. package/{src/style/components/theme-control → dist/components}/theme-control.css +3 -7
  168. package/dist/components/theme-control.d.mts +9 -0
  169. package/dist/components/theme-control.d.ts +9 -0
  170. package/dist/components/theme-control.js +235 -0
  171. package/dist/components/theme-control.mjs +200 -0
  172. package/{src/style/components/tooltip → dist/components}/tooltip.css +5 -13
  173. package/dist/components/tooltip.d.mts +12 -0
  174. package/dist/components/tooltip.d.ts +12 -0
  175. package/dist/components/tooltip.js +200 -0
  176. package/dist/components/tooltip.mjs +163 -0
  177. package/dist/icons-Czahnf-r.d.mts +15 -0
  178. package/dist/icons-Czahnf-r.d.ts +15 -0
  179. package/dist/index.css +2915 -2068
  180. package/dist/index.d.mts +144 -721
  181. package/dist/index.d.ts +144 -721
  182. package/dist/index.js +4076 -2282
  183. package/dist/index.mjs +4132 -2366
  184. package/dist/theme.css +34 -34
  185. package/package.json +27 -8
  186. package/dist/index.css.map +0 -1
  187. package/dist/index.js.map +0 -1
  188. package/dist/index.mjs.map +0 -1
  189. package/hellboy-ds-0.1.2.tgz +0 -0
  190. package/src/components/badge/Badge.tsx +0 -29
  191. package/src/components/badge/index.ts +0 -1
  192. package/src/components/banner/Banner.tsx +0 -48
  193. package/src/components/banner/banner.css +0 -44
  194. package/src/components/banner/index.ts +0 -1
  195. package/src/components/button/button.tsx +0 -127
  196. package/src/components/button/index.ts +0 -1
  197. package/src/components/card/card.tsx +0 -57
  198. package/src/components/card/index.ts +0 -1
  199. package/src/components/checkbox/Checkbox.tsx +0 -98
  200. package/src/components/checkbox/index.ts +0 -1
  201. package/src/components/code-block/code-block.tsx +0 -44
  202. package/src/components/code-block/index.ts +0 -1
  203. package/src/components/color-control/color-control.tsx +0 -322
  204. package/src/components/color-control/index.ts +0 -1
  205. package/src/components/drag-handle/DragHandle.tsx +0 -78
  206. package/src/components/drag-handle/index.ts +0 -1
  207. package/src/components/drawer/drawer.tsx +0 -82
  208. package/src/components/drawer/index.ts +0 -1
  209. package/src/components/floating-bar/floating-bar.tsx +0 -52
  210. package/src/components/floating-bar/index.ts +0 -2
  211. package/src/components/footer/footer.tsx +0 -28
  212. package/src/components/footer/index.ts +0 -1
  213. package/src/components/grid/Grid.tsx +0 -53
  214. package/src/components/grid/index.ts +0 -1
  215. package/src/components/header/header.tsx +0 -57
  216. package/src/components/header/index.ts +0 -1
  217. package/src/components/icons/icons.tsx +0 -44
  218. package/src/components/icons/index.ts +0 -1
  219. package/src/components/index.ts +0 -29
  220. package/src/components/input/DatePicker.tsx +0 -133
  221. package/src/components/input/Input.tsx +0 -220
  222. package/src/components/input/InputDate.tsx +0 -10
  223. package/src/components/input/InputDateTime.tsx +0 -10
  224. package/src/components/input/InputEmail.tsx +0 -10
  225. package/src/components/input/InputField.tsx +0 -137
  226. package/src/components/input/InputNumber.tsx +0 -10
  227. package/src/components/input/InputPassword.tsx +0 -10
  228. package/src/components/input/InputSearch.tsx +0 -10
  229. package/src/components/input/InputTel.tsx +0 -10
  230. package/src/components/input/InputText.tsx +0 -10
  231. package/src/components/input/InputTime.tsx +0 -10
  232. package/src/components/input/InputUrl.tsx +0 -10
  233. package/src/components/input/TimePicker.tsx +0 -151
  234. package/src/components/input/index.ts +0 -11
  235. package/src/components/layout/Layout.tsx +0 -244
  236. package/src/components/layout/index.ts +0 -1
  237. package/src/components/list/List.tsx +0 -159
  238. package/src/components/list/index.ts +0 -1
  239. package/src/components/navbar/MenuCategory.tsx +0 -20
  240. package/src/components/navbar/MenuGroup.tsx +0 -288
  241. package/src/components/navbar/MenuItem.tsx +0 -65
  242. package/src/components/navbar/Navbar.tsx +0 -23
  243. package/src/components/navbar/index.ts +0 -4
  244. package/src/components/page/index.ts +0 -1
  245. package/src/components/page/page.tsx +0 -46
  246. package/src/components/page-index/PageIndex.tsx +0 -275
  247. package/src/components/page-index/index.ts +0 -1
  248. package/src/components/popover/index.ts +0 -1
  249. package/src/components/popover/popover.tsx +0 -199
  250. package/src/components/radio/Radio.tsx +0 -176
  251. package/src/components/radio/index.ts +0 -1
  252. package/src/components/section/index.ts +0 -1
  253. package/src/components/section/section.tsx +0 -66
  254. package/src/components/select/Select.tsx +0 -212
  255. package/src/components/select/index.ts +0 -1
  256. package/src/components/slider/Slider.tsx +0 -267
  257. package/src/components/slider/index.ts +0 -1
  258. package/src/components/switch/index.ts +0 -1
  259. package/src/components/switch/switch.tsx +0 -99
  260. package/src/components/table/Table.tsx +0 -147
  261. package/src/components/table/index.ts +0 -1
  262. package/src/components/theme-control/index.ts +0 -1
  263. package/src/components/theme-control/theme-control.tsx +0 -78
  264. package/src/components/tooltip/index.ts +0 -1
  265. package/src/components/tooltip/tooltip.tsx +0 -207
  266. package/src/contexts/NavbarTooltipContext.tsx +0 -48
  267. package/src/contexts/index.ts +0 -1
  268. package/src/foundations/motion.md +0 -136
  269. package/src/index.ts +0 -40
  270. package/src/style/_shared/field.css +0 -69
  271. package/src/style/components/color-control/color-control.css +0 -126
  272. package/src/style/components/drawer/drawer.css +0 -210
  273. package/src/style/components/floating-bar/floating-bar.css +0 -39
  274. package/src/style/components/footer/footer.css +0 -108
  275. package/src/style/components/grid/grid.css +0 -33
  276. package/src/style/components/header/header.css +0 -44
  277. package/src/style/components/layout/layout.css +0 -205
  278. package/src/style/components/navbar/navbar.css +0 -342
  279. package/src/style/components/popover/popover.css +0 -44
  280. package/src/style/components/section/section.css +0 -67
  281. package/src/style/components/select/select.css +0 -143
  282. package/src/style/components/switch/switch.css +0 -267
  283. package/src/style/foundations/global.css +0 -316
  284. package/src/style/foundations/motion.css +0 -164
  285. package/src/style/foundations/spacing.css +0 -51
  286. package/src/style/foundations/typography.css +0 -39
  287. package/src/style/foundations/z-index.css +0 -81
  288. package/src/style/modes/dark.css +0 -146
  289. package/src/style/modes/light.css +0 -147
  290. package/src/style/semantic.css +0 -52
  291. package/src/style/styles.css +0 -51
  292. package/src/style/themes/theme.json +0 -37
  293. package/src/utils/README.md +0 -305
  294. package/src/utils/USER_PREFERENCES.md +0 -558
  295. package/src/utils/theme.ts +0 -127
  296. package/src/utils/user-preferences.ts +0 -577
  297. package/tsconfig.json +0 -25
  298. package/tsup.config.ts +0 -52
@@ -0,0 +1,1055 @@
1
+ // src/components/switch/switch.tsx
2
+ import React21 from "react";
3
+
4
+ // src/components/_shared/Backdrop.tsx
5
+ import * as React from "react";
6
+ import { jsx } from "react/jsx-runtime";
7
+ var Backdrop = React.forwardRef(
8
+ ({ className = "", blur = true, style, ...props }, ref) => {
9
+ return /* @__PURE__ */ jsx(
10
+ "div",
11
+ {
12
+ ref,
13
+ className: `backdrop ${blur ? "backdrop--blur" : ""} ${className}`,
14
+ style,
15
+ "aria-hidden": "true",
16
+ ...props
17
+ }
18
+ );
19
+ }
20
+ );
21
+ Backdrop.displayName = "Backdrop";
22
+
23
+ // src/components/icons/icons.tsx
24
+ import { Icon as IconifyIcon } from "@iconify/react";
25
+ import { jsx as jsx2 } from "react/jsx-runtime";
26
+ var Icon = ({ name, size = 24, className, loading = false, ...rest }) => {
27
+ const iconName = name.includes(":") ? name : `heroicons:${name}`;
28
+ const classes = ["icon", className].filter(Boolean).join(" ");
29
+ if (loading) {
30
+ const style = { width: size, height: size };
31
+ return /* @__PURE__ */ jsx2(
32
+ "span",
33
+ {
34
+ className: `${classes} icon--skeleton`,
35
+ style,
36
+ "aria-hidden": rest["aria-label"] ? "false" : "true",
37
+ ...rest["aria-label"] ? { "aria-label": rest["aria-label"] } : {}
38
+ }
39
+ );
40
+ }
41
+ return /* @__PURE__ */ jsx2(
42
+ IconifyIcon,
43
+ {
44
+ icon: iconName,
45
+ width: size,
46
+ height: size,
47
+ className: classes,
48
+ ...rest
49
+ }
50
+ );
51
+ };
52
+
53
+ // src/components/icons/iconConstants.ts
54
+ var INPUT_TYPE_ICONS = {
55
+ // Standard HTML input types
56
+ email: "envelope-solid",
57
+ password: "lock-closed-solid",
58
+ search: "magnifying-glass-solid",
59
+ date: "calendar-days-solid",
60
+ time: "clock-solid",
61
+ "datetime-local": "calendar-days-solid",
62
+ tel: "phone-solid",
63
+ url: "link-solid",
64
+ number: "hashtag-solid",
65
+ // Additional semantic types
66
+ username: "user-solid",
67
+ name: "user-solid",
68
+ firstname: "user-solid",
69
+ lastname: "user-solid",
70
+ address: "map-pin-solid",
71
+ city: "building-solid",
72
+ state: "map-solid",
73
+ zip: "map-pin-solid",
74
+ "zip-code": "map-pin-solid",
75
+ country: "globe-americas-solid",
76
+ creditcard: "credit-card-solid",
77
+ card: "credit-card-solid",
78
+ cvv: "lock-closed-solid",
79
+ expiry: "calendar-days-solid",
80
+ "expiration-date": "calendar-days-solid",
81
+ // File and media types
82
+ file: "document-solid",
83
+ image: "photo-solid",
84
+ video: "video-camera-solid",
85
+ audio: "microphone-solid",
86
+ // Communication
87
+ message: "chat-bubble-left-solid",
88
+ comment: "chat-bubble-left-solid",
89
+ feedback: "chat-bubble-left-solid",
90
+ // Actions and states
91
+ submit: "paper-airplane-solid",
92
+ send: "paper-airplane-solid",
93
+ save: "floppy-disk-solid",
94
+ edit: "pencil-solid",
95
+ delete: "trash-solid",
96
+ remove: "x-mark-solid",
97
+ add: "plus-solid",
98
+ create: "plus-solid",
99
+ upload: "arrow-up-tray-solid",
100
+ download: "arrow-down-tray-solid",
101
+ refresh: "arrow-path-solid",
102
+ reload: "arrow-path-solid",
103
+ settings: "cog-solid",
104
+ config: "cog-solid",
105
+ filter: "funnel-solid",
106
+ sort: "bars-arrow-up-solid"
107
+ };
108
+ var ACTION_ICONS = {
109
+ close: "x-mark-solid",
110
+ back: "arrow-left-solid",
111
+ forward: "arrow-right-solid",
112
+ up: "arrow-up-solid",
113
+ down: "arrow-down-solid",
114
+ expand: "chevron-down-solid",
115
+ collapse: "chevron-up-solid",
116
+ menu: "bars-3-solid",
117
+ more: "ellipsis-horizontal-solid",
118
+ check: "check-solid",
119
+ cross: "x-mark-solid",
120
+ plus: "plus-solid",
121
+ minus: "minus-solid",
122
+ search: "magnifying-glass-solid",
123
+ clear: "x-mark-solid",
124
+ loading: "arrow-path-solid",
125
+ error: "exclamation-triangle-solid",
126
+ warning: "exclamation-triangle-solid",
127
+ info: "information-circle-solid",
128
+ success: "check-circle-solid"
129
+ };
130
+
131
+ // src/components/_shared/Thumb.tsx
132
+ import { jsx as jsx3, jsxs } from "react/jsx-runtime";
133
+ var Thumb = ({
134
+ icon,
135
+ iconSize = 16,
136
+ className = "",
137
+ style,
138
+ children,
139
+ hover = false,
140
+ active = false,
141
+ disabled = false,
142
+ checked = false
143
+ }) => {
144
+ const thumbClasses = [
145
+ "thumb",
146
+ hover && "thumb--hover",
147
+ active && "thumb--active",
148
+ disabled && "thumb--disabled",
149
+ checked && "thumb--checked",
150
+ className
151
+ ].filter(Boolean).join(" ");
152
+ return /* @__PURE__ */ jsxs("span", { className: thumbClasses, style, children: [
153
+ icon && /* @__PURE__ */ jsx3(Icon, { name: icon, size: iconSize }),
154
+ children
155
+ ] });
156
+ };
157
+
158
+ // src/components/_shared/HeadingAnchor.tsx
159
+ import { useState as useState6, useMemo } from "react";
160
+
161
+ // src/components/dialog/Dialog.tsx
162
+ import * as React3 from "react";
163
+ import { createPortal } from "react-dom";
164
+
165
+ // src/components/button/button.tsx
166
+ import React2 from "react";
167
+ import { Button as AriakitButton } from "@ariakit/react";
168
+ import { Fragment, jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
169
+ var Button = React2.forwardRef(
170
+ ({
171
+ variant = "primary",
172
+ size = "md",
173
+ children,
174
+ isLoading = false,
175
+ disabled = false,
176
+ fullWidth = false,
177
+ startIcon,
178
+ endIcon,
179
+ iconOnly = false,
180
+ href,
181
+ active = false,
182
+ className,
183
+ onClick,
184
+ ...props
185
+ }, ref) => {
186
+ const buttonClasses = [
187
+ "btn",
188
+ `btn--${variant}`,
189
+ `btn--${size}`,
190
+ fullWidth && "btn--full-width",
191
+ iconOnly && "btn--icon-only",
192
+ active && "btn--active",
193
+ className
194
+ ].filter(Boolean).join(" ");
195
+ const iconSize = size === "xs" ? 14 : size === "sm" ? 16 : size === "lg" ? 24 : 20;
196
+ const buttonContent = /* @__PURE__ */ jsxs2(Fragment, { children: [
197
+ isLoading && /* @__PURE__ */ jsx4("span", { className: "btn__spinner" }),
198
+ startIcon && (isLoading ? /* @__PURE__ */ jsx4("span", { className: "btn__icon-placeholder", style: { width: iconSize, height: iconSize } }) : /* @__PURE__ */ jsx4(Icon, { name: startIcon, size: iconSize, className: "btn__icon" })),
199
+ !iconOnly && children,
200
+ endIcon && /* @__PURE__ */ jsx4(Icon, { name: endIcon, size: iconSize, className: "btn__icon" })
201
+ ] });
202
+ const handleClick = (e) => {
203
+ if (href && !isLoading && !disabled) {
204
+ window.location.href = href;
205
+ }
206
+ onClick?.(e);
207
+ };
208
+ return /* @__PURE__ */ jsx4(
209
+ AriakitButton,
210
+ {
211
+ ref,
212
+ disabled: disabled || isLoading,
213
+ className: buttonClasses,
214
+ onClick: handleClick,
215
+ ...props,
216
+ children: buttonContent
217
+ }
218
+ );
219
+ }
220
+ );
221
+ Button.displayName = "Button";
222
+
223
+ // src/components/dialog/Dialog.tsx
224
+ import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
225
+
226
+ // src/components/input/InputText.tsx
227
+ import React9 from "react";
228
+
229
+ // src/components/input/Input.tsx
230
+ import * as React8 from "react";
231
+
232
+ // src/components/input/InputField.tsx
233
+ import * as React4 from "react";
234
+ import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
235
+ var InputField = React4.forwardRef(
236
+ ({
237
+ type = "text",
238
+ label,
239
+ helperText,
240
+ error,
241
+ icon,
242
+ iconRight,
243
+ fullWidth = false,
244
+ size = "md",
245
+ className = "",
246
+ disabled,
247
+ id,
248
+ onRightIconClick,
249
+ ...props
250
+ }, ref) => {
251
+ const inputId = id || `input-${React4.useId()}`;
252
+ const containerClasses = [
253
+ "input-container",
254
+ fullWidth && "input-container--full-width",
255
+ className
256
+ ].filter(Boolean).join(" ");
257
+ const inputClasses = [
258
+ "input",
259
+ `input--${size}`,
260
+ error && "input--error",
261
+ disabled && "input--disabled",
262
+ icon && "input--has-icon-left",
263
+ iconRight && "input--has-icon-right"
264
+ ].filter(Boolean).join(" ");
265
+ return /* @__PURE__ */ jsxs4("div", { className: containerClasses, children: [
266
+ label && /* @__PURE__ */ jsx6("label", { htmlFor: inputId, className: "input__label", children: label }),
267
+ /* @__PURE__ */ jsxs4("div", { className: "input__wrapper", children: [
268
+ icon && /* @__PURE__ */ jsx6("span", { className: "input__icon input__icon--left", "aria-hidden": "true", children: /* @__PURE__ */ jsx6(Icon, { name: icon, size: 16 }) }),
269
+ /* @__PURE__ */ jsx6(
270
+ "input",
271
+ {
272
+ ref,
273
+ type,
274
+ id: inputId,
275
+ className: inputClasses,
276
+ disabled,
277
+ ...props
278
+ }
279
+ ),
280
+ iconRight && /* @__PURE__ */ jsx6(
281
+ "button",
282
+ {
283
+ type: "button",
284
+ className: "input__icon input__icon--right",
285
+ onClick: onRightIconClick,
286
+ tabIndex: -1,
287
+ "aria-label": "Icon action",
288
+ children: /* @__PURE__ */ jsx6(Icon, { name: iconRight, size: 16 })
289
+ }
290
+ )
291
+ ] }),
292
+ error && /* @__PURE__ */ jsx6("p", { className: "input__message input__message--error", children: error }),
293
+ helperText && !error && /* @__PURE__ */ jsx6("p", { className: "input__message", children: helperText })
294
+ ] });
295
+ }
296
+ );
297
+
298
+ // src/components/popover/popover.tsx
299
+ import * as React5 from "react";
300
+ import * as ReactDOM from "react-dom";
301
+ import { Fragment as Fragment2, jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
302
+ var Popover = ({
303
+ trigger,
304
+ children,
305
+ isOpen,
306
+ onToggle,
307
+ placement = "bottom",
308
+ align = "start",
309
+ offset = 8,
310
+ flip = true,
311
+ closeOnEscape = true,
312
+ closeOnClickOutside = true
313
+ }) => {
314
+ const [internalOpen, setInternalOpen] = React5.useState(false);
315
+ const triggerRef = React5.useRef(null);
316
+ const popoverRef = React5.useRef(null);
317
+ const [popoverStyle, setPopoverStyle] = React5.useState({});
318
+ const [resolvedPlacement, setResolvedPlacement] = React5.useState(placement);
319
+ const isControlled = isOpen !== void 0;
320
+ const open = isControlled ? isOpen : internalOpen;
321
+ const toggle = React5.useCallback(() => {
322
+ if (isControlled) {
323
+ onToggle?.();
324
+ } else {
325
+ setInternalOpen((prev) => !prev);
326
+ }
327
+ }, [isControlled, onToggle]);
328
+ React5.useEffect(() => {
329
+ const handleClickOutside = (event) => {
330
+ if (closeOnClickOutside && triggerRef.current && !triggerRef.current.contains(event.target) && popoverRef.current && !popoverRef.current.contains(event.target)) {
331
+ toggle();
332
+ }
333
+ };
334
+ if (open) {
335
+ document.addEventListener("mousedown", handleClickOutside);
336
+ }
337
+ return () => {
338
+ document.removeEventListener("mousedown", handleClickOutside);
339
+ };
340
+ }, [open, toggle, closeOnClickOutside]);
341
+ React5.useEffect(() => {
342
+ const handleEscapeKey = (event) => {
343
+ if (closeOnEscape && event.key === "Escape" && open) {
344
+ toggle();
345
+ }
346
+ };
347
+ if (open) {
348
+ document.addEventListener("keydown", handleEscapeKey);
349
+ }
350
+ return () => {
351
+ document.removeEventListener("keydown", handleEscapeKey);
352
+ };
353
+ }, [open, toggle, closeOnEscape]);
354
+ React5.useEffect(() => {
355
+ if (!open || !triggerRef.current || !popoverRef.current) {
356
+ return;
357
+ }
358
+ const updatePosition = () => {
359
+ if (!triggerRef.current || !popoverRef.current) {
360
+ return;
361
+ }
362
+ const triggerRect = triggerRef.current.getBoundingClientRect();
363
+ const popoverRect = popoverRef.current.getBoundingClientRect();
364
+ const viewportWidth = window.innerWidth;
365
+ const viewportHeight = window.innerHeight;
366
+ const spaceTop = triggerRect.top;
367
+ const spaceBottom = viewportHeight - triggerRect.bottom;
368
+ const spaceLeft = triggerRect.left;
369
+ const spaceRight = viewportWidth - triggerRect.right;
370
+ let finalPlacement = placement;
371
+ if (flip) {
372
+ if (placement === "right" && spaceRight < popoverRect.width + offset) {
373
+ finalPlacement = spaceLeft >= popoverRect.width + offset ? "left" : "bottom";
374
+ } else if (placement === "left" && spaceLeft < popoverRect.width + offset) {
375
+ finalPlacement = spaceRight >= popoverRect.width + offset ? "right" : "bottom";
376
+ } else if (placement === "bottom" && spaceBottom < popoverRect.height + offset) {
377
+ finalPlacement = spaceTop >= popoverRect.height + offset ? "top" : "bottom";
378
+ } else if (placement === "top" && spaceTop < popoverRect.height + offset) {
379
+ finalPlacement = spaceBottom >= popoverRect.height + offset ? "bottom" : "top";
380
+ }
381
+ }
382
+ setResolvedPlacement(finalPlacement);
383
+ const newStyle = {
384
+ position: "fixed",
385
+ zIndex: "var(--z-popover)",
386
+ opacity: 1,
387
+ visibility: "visible",
388
+ pointerEvents: "auto"
389
+ };
390
+ const getAlignmentOffset = () => {
391
+ let alignmentOffset = 0;
392
+ if (finalPlacement === "left" || finalPlacement === "right") {
393
+ switch (align) {
394
+ case "center":
395
+ alignmentOffset = (triggerRect.height - popoverRect.height) / 2;
396
+ break;
397
+ case "end":
398
+ alignmentOffset = triggerRect.height - popoverRect.height;
399
+ break;
400
+ case "start":
401
+ default:
402
+ alignmentOffset = 0;
403
+ }
404
+ } else {
405
+ switch (align) {
406
+ case "center":
407
+ alignmentOffset = (triggerRect.width - popoverRect.width) / 2;
408
+ break;
409
+ case "end":
410
+ alignmentOffset = triggerRect.width - popoverRect.width;
411
+ break;
412
+ case "start":
413
+ default:
414
+ alignmentOffset = 0;
415
+ }
416
+ }
417
+ return alignmentOffset;
418
+ };
419
+ switch (finalPlacement) {
420
+ case "right":
421
+ newStyle.top = triggerRect.top + getAlignmentOffset();
422
+ newStyle.left = triggerRect.right + offset;
423
+ break;
424
+ case "left":
425
+ newStyle.top = triggerRect.top + getAlignmentOffset();
426
+ newStyle.left = triggerRect.left - popoverRect.width - offset;
427
+ break;
428
+ case "top":
429
+ newStyle.top = triggerRect.top - popoverRect.height - offset;
430
+ newStyle.left = triggerRect.left + getAlignmentOffset();
431
+ break;
432
+ case "bottom":
433
+ default:
434
+ newStyle.top = triggerRect.bottom + offset;
435
+ newStyle.left = triggerRect.left + getAlignmentOffset();
436
+ }
437
+ if (typeof newStyle.left === "number") {
438
+ if (newStyle.left + popoverRect.width > viewportWidth - offset) {
439
+ newStyle.left = viewportWidth - popoverRect.width - offset;
440
+ }
441
+ if (newStyle.left < offset) {
442
+ newStyle.left = offset;
443
+ }
444
+ }
445
+ if (typeof newStyle.top === "number") {
446
+ if (newStyle.top + popoverRect.height > viewportHeight - offset) {
447
+ newStyle.top = viewportHeight - popoverRect.height - offset;
448
+ }
449
+ if (newStyle.top < offset) {
450
+ newStyle.top = offset;
451
+ }
452
+ }
453
+ setPopoverStyle(newStyle);
454
+ };
455
+ requestAnimationFrame(updatePosition);
456
+ window.addEventListener("resize", updatePosition);
457
+ window.addEventListener("scroll", updatePosition, true);
458
+ return () => {
459
+ window.removeEventListener("resize", updatePosition);
460
+ window.removeEventListener("scroll", updatePosition, true);
461
+ };
462
+ }, [open, placement, align, offset, flip]);
463
+ const handleTriggerClick = React5.useCallback(() => {
464
+ toggle();
465
+ }, [toggle]);
466
+ return /* @__PURE__ */ jsxs5(Fragment2, { children: [
467
+ /* @__PURE__ */ jsx7(
468
+ "div",
469
+ {
470
+ ref: triggerRef,
471
+ onClick: handleTriggerClick,
472
+ style: { display: "inline-block", position: "relative" },
473
+ children: React5.isValidElement(trigger) ? React5.cloneElement(trigger, {
474
+ onClick: (e) => {
475
+ e.stopPropagation();
476
+ handleTriggerClick();
477
+ trigger.props?.onClick?.(e);
478
+ }
479
+ }) : trigger
480
+ }
481
+ ),
482
+ open && ReactDOM.createPortal(
483
+ /* @__PURE__ */ jsx7(
484
+ "div",
485
+ {
486
+ ref: popoverRef,
487
+ className: `popover popover--${resolvedPlacement}`,
488
+ style: {
489
+ ...popoverStyle,
490
+ // Start with opacity 0 and visibility hidden to prevent initial flash
491
+ opacity: popoverStyle.top !== void 0 ? 1 : 0,
492
+ visibility: popoverStyle.top !== void 0 ? "visible" : "hidden"
493
+ },
494
+ children: /* @__PURE__ */ jsx7("div", { className: "popover__content", children })
495
+ }
496
+ ),
497
+ document.body
498
+ )
499
+ ] });
500
+ };
501
+
502
+ // src/components/input/DatePicker.tsx
503
+ import * as React6 from "react";
504
+ import { jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
505
+ var MONTHS = [
506
+ "January",
507
+ "February",
508
+ "March",
509
+ "April",
510
+ "May",
511
+ "June",
512
+ "July",
513
+ "August",
514
+ "September",
515
+ "October",
516
+ "November",
517
+ "December"
518
+ ];
519
+ var DAYS_OF_WEEK = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"];
520
+ var DatePicker = ({ value, onChange, disabled }) => {
521
+ const parseDate = (dateStr) => {
522
+ if (!dateStr) {
523
+ const today = /* @__PURE__ */ new Date();
524
+ return { year: today.getFullYear(), month: today.getMonth(), day: today.getDate() };
525
+ }
526
+ const [year, month, day] = dateStr.split("-").map(Number);
527
+ return { year, month: month - 1, day };
528
+ };
529
+ const { year: initialYear, month: initialMonth, day: selectedDay } = parseDate(value);
530
+ const [currentYear, setCurrentYear] = React6.useState(initialYear);
531
+ const [currentMonth, setCurrentMonth] = React6.useState(initialMonth);
532
+ const getDaysInMonth = (year, month) => {
533
+ return new Date(year, month + 1, 0).getDate();
534
+ };
535
+ const getFirstDayOfMonth = (year, month) => {
536
+ return new Date(year, month, 1).getDay();
537
+ };
538
+ const handleDateSelect = (day) => {
539
+ if (disabled) return;
540
+ const formattedDate = `${currentYear}-${String(currentMonth + 1).padStart(2, "0")}-${String(day).padStart(2, "0")}`;
541
+ onChange(formattedDate);
542
+ };
543
+ const handlePrevMonth = () => {
544
+ if (currentMonth === 0) {
545
+ setCurrentMonth(11);
546
+ setCurrentYear(currentYear - 1);
547
+ } else {
548
+ setCurrentMonth(currentMonth - 1);
549
+ }
550
+ };
551
+ const handleNextMonth = () => {
552
+ if (currentMonth === 11) {
553
+ setCurrentMonth(0);
554
+ setCurrentYear(currentYear + 1);
555
+ } else {
556
+ setCurrentMonth(currentMonth + 1);
557
+ }
558
+ };
559
+ const daysInMonth = getDaysInMonth(currentYear, currentMonth);
560
+ const firstDay = getFirstDayOfMonth(currentYear, currentMonth);
561
+ const days = [
562
+ ...Array(firstDay).fill(null),
563
+ ...Array.from({ length: daysInMonth }, (_, i) => i + 1)
564
+ ];
565
+ return /* @__PURE__ */ jsxs6("div", { className: "date-picker", children: [
566
+ /* @__PURE__ */ jsxs6("div", { className: "date-picker__header", children: [
567
+ /* @__PURE__ */ jsx8(
568
+ "button",
569
+ {
570
+ type: "button",
571
+ className: "date-picker__nav",
572
+ onClick: handlePrevMonth,
573
+ disabled,
574
+ "aria-label": "Previous month",
575
+ children: "\u2039"
576
+ }
577
+ ),
578
+ /* @__PURE__ */ jsxs6("div", { className: "date-picker__title", children: [
579
+ /* @__PURE__ */ jsx8(
580
+ "select",
581
+ {
582
+ className: "date-picker__select",
583
+ value: currentMonth,
584
+ onChange: (e) => setCurrentMonth(Number(e.target.value)),
585
+ disabled,
586
+ children: MONTHS.map((month, idx) => /* @__PURE__ */ jsx8("option", { value: idx, children: month }, month))
587
+ }
588
+ ),
589
+ /* @__PURE__ */ jsx8(
590
+ "select",
591
+ {
592
+ className: "date-picker__select",
593
+ value: currentYear,
594
+ onChange: (e) => setCurrentYear(Number(e.target.value)),
595
+ disabled,
596
+ children: Array.from({ length: 100 }, (_, i) => currentYear - 50 + i).map((year) => /* @__PURE__ */ jsx8("option", { value: year, children: year }, year))
597
+ }
598
+ )
599
+ ] }),
600
+ /* @__PURE__ */ jsx8(
601
+ "button",
602
+ {
603
+ type: "button",
604
+ className: "date-picker__nav",
605
+ onClick: handleNextMonth,
606
+ disabled,
607
+ "aria-label": "Next month",
608
+ children: "\u203A"
609
+ }
610
+ )
611
+ ] }),
612
+ /* @__PURE__ */ jsx8("div", { className: "date-picker__weekdays", children: DAYS_OF_WEEK.map((day) => /* @__PURE__ */ jsx8("div", { className: "date-picker__weekday", children: day }, day)) }),
613
+ /* @__PURE__ */ jsx8("div", { className: "date-picker__days", children: days.map((day, idx) => /* @__PURE__ */ jsx8(
614
+ "button",
615
+ {
616
+ type: "button",
617
+ className: `date-picker__day ${day === selectedDay ? "date-picker__day--selected" : ""} ${!day ? "date-picker__day--empty" : ""}`,
618
+ onClick: () => day && handleDateSelect(day),
619
+ disabled: !day || disabled,
620
+ children: day || ""
621
+ },
622
+ idx
623
+ )) })
624
+ ] });
625
+ };
626
+
627
+ // src/components/input/TimePicker.tsx
628
+ import * as React7 from "react";
629
+ import { jsx as jsx9, jsxs as jsxs7 } from "react/jsx-runtime";
630
+ var parseTime = (timeStr) => {
631
+ if (!timeStr) return { hours: 0, minutes: 0, seconds: 0, milliseconds: 0 };
632
+ const parts = timeStr.split(":");
633
+ const hours = parseInt(parts[0] || "0", 10);
634
+ const minutes = parseInt(parts[1] || "0", 10);
635
+ const secondsParts = (parts[2] || "0").split(".");
636
+ const seconds = parseInt(secondsParts[0] || "0", 10);
637
+ const milliseconds = parseInt(secondsParts[1] || "0", 10);
638
+ return { hours, minutes, seconds, milliseconds };
639
+ };
640
+ var TimeColumn = ({
641
+ label,
642
+ value,
643
+ max,
644
+ field,
645
+ step,
646
+ disabled,
647
+ onChange
648
+ }) => {
649
+ const items = Array.from({ length: Math.floor(max / step) + 1 }, (_, i) => i * step);
650
+ const columnRef = React7.useRef(null);
651
+ React7.useEffect(() => {
652
+ if (columnRef.current) {
653
+ const selected = columnRef.current.querySelector(".time-picker__item--selected");
654
+ if (selected) {
655
+ selected.scrollIntoView({ block: "center", behavior: "smooth" });
656
+ }
657
+ }
658
+ }, [value]);
659
+ return /* @__PURE__ */ jsxs7("div", { className: "time-picker__column", children: [
660
+ /* @__PURE__ */ jsx9("div", { className: "time-picker__label", children: label }),
661
+ /* @__PURE__ */ jsx9("div", { className: "time-picker__scroll scrollable", ref: columnRef, children: items.map((item) => /* @__PURE__ */ jsx9(
662
+ "button",
663
+ {
664
+ type: "button",
665
+ className: `time-picker__item ${item === value ? "time-picker__item--selected" : ""}`,
666
+ onClick: () => onChange(field, item),
667
+ disabled,
668
+ children: String(item).padStart(field === "milliseconds" ? 3 : 2, "0")
669
+ },
670
+ item
671
+ )) })
672
+ ] });
673
+ };
674
+ var TimePicker = ({
675
+ value,
676
+ onChange,
677
+ disabled,
678
+ showMilliseconds = false,
679
+ minuteStep = 1
680
+ }) => {
681
+ const [internalTime, setInternalTime] = React7.useState(value);
682
+ React7.useEffect(() => {
683
+ setInternalTime(value);
684
+ }, [value]);
685
+ const { hours, minutes, seconds, milliseconds } = parseTime(internalTime);
686
+ const handleChange = (field, newValue) => {
687
+ if (disabled) return;
688
+ const currentParsed = parseTime(internalTime);
689
+ const updated = { ...currentParsed, [field]: newValue };
690
+ let formattedTime = `${String(updated.hours).padStart(2, "0")}:${String(updated.minutes).padStart(2, "0")}:${String(updated.seconds).padStart(2, "0")}`;
691
+ if (showMilliseconds && updated.milliseconds > 0) {
692
+ formattedTime += `.${String(updated.milliseconds).padStart(3, "0")}`;
693
+ }
694
+ setInternalTime(formattedTime);
695
+ onChange(formattedTime);
696
+ };
697
+ return /* @__PURE__ */ jsxs7("div", { className: "time-picker", children: [
698
+ /* @__PURE__ */ jsx9(
699
+ TimeColumn,
700
+ {
701
+ label: "Hours",
702
+ value: hours,
703
+ max: 23,
704
+ field: "hours",
705
+ step: 1,
706
+ disabled,
707
+ onChange: handleChange
708
+ }
709
+ ),
710
+ /* @__PURE__ */ jsx9(
711
+ TimeColumn,
712
+ {
713
+ label: "Minutes",
714
+ value: minutes,
715
+ max: 59,
716
+ field: "minutes",
717
+ step: minuteStep,
718
+ disabled,
719
+ onChange: handleChange
720
+ }
721
+ ),
722
+ /* @__PURE__ */ jsx9(
723
+ TimeColumn,
724
+ {
725
+ label: "Seconds",
726
+ value: seconds,
727
+ max: 59,
728
+ field: "seconds",
729
+ step: 1,
730
+ disabled,
731
+ onChange: handleChange
732
+ }
733
+ ),
734
+ showMilliseconds && /* @__PURE__ */ jsx9(
735
+ TimeColumn,
736
+ {
737
+ label: "ms",
738
+ value: milliseconds,
739
+ max: 999,
740
+ field: "milliseconds",
741
+ step: 1,
742
+ disabled,
743
+ onChange: handleChange
744
+ }
745
+ )
746
+ ] });
747
+ };
748
+
749
+ // src/components/input/Input.tsx
750
+ import { jsx as jsx10, jsxs as jsxs8 } from "react/jsx-runtime";
751
+ var TYPE_ICON_MAP = INPUT_TYPE_ICONS;
752
+ var formatDisplayValue = (val, inputType) => {
753
+ if (!val) return "";
754
+ if (inputType === "date") {
755
+ const [year, month, day] = val.split("-");
756
+ return `${day}/${month}/${year}`;
757
+ }
758
+ if (inputType === "time") {
759
+ return val;
760
+ }
761
+ if (inputType === "datetime-local") {
762
+ const [datePart, timePart] = val.split("T");
763
+ if (datePart && timePart) {
764
+ const [year, month, day] = datePart.split("-");
765
+ return `${day}/${month}/${year} ${timePart}`;
766
+ }
767
+ return val;
768
+ }
769
+ return val;
770
+ };
771
+ var Input = React8.forwardRef(
772
+ ({
773
+ type = "text",
774
+ label,
775
+ helperText,
776
+ error,
777
+ icon,
778
+ fullWidth = false,
779
+ size = "md",
780
+ className = "",
781
+ disabled,
782
+ id,
783
+ showMilliseconds = false,
784
+ minuteStep = 1,
785
+ showClear = true,
786
+ ...props
787
+ }, ref) => {
788
+ const [showPassword, setShowPassword] = React8.useState(false);
789
+ const [showDateTimePicker, setShowDateTimePicker] = React8.useState(false);
790
+ const inputRef = React8.useRef(null);
791
+ const leftIcon = icon || TYPE_ICON_MAP[type];
792
+ const isPasswordType = type === "password";
793
+ const actualType = isPasswordType && showPassword ? "text" : type !== "date" && type !== "time" && type !== "datetime-local" ? type : "text";
794
+ const isDateTimeType = type === "date" || type === "time" || type === "datetime-local";
795
+ const isSearchType = type === "search";
796
+ const hasValue = props.value && String(props.value).length > 0;
797
+ const rightIconName = isPasswordType ? showPassword ? "heroicons:eye-slash-solid" : "heroicons:eye-solid" : isDateTimeType ? "heroicons:chevron-down-solid" : isSearchType && hasValue && showClear ? ACTION_ICONS.clear : void 0;
798
+ const handleRightIconClick = () => {
799
+ if (isPasswordType) {
800
+ setShowPassword(!showPassword);
801
+ } else if (isDateTimeType) {
802
+ setShowDateTimePicker(!showDateTimePicker);
803
+ } else if (isSearchType && hasValue && showClear) {
804
+ if (props.onChange) {
805
+ props.onChange({ target: { value: "" } });
806
+ }
807
+ }
808
+ };
809
+ const handleDateTimeChange = (newValue) => {
810
+ if (props.onChange) {
811
+ props.onChange({ target: { value: newValue } });
812
+ }
813
+ };
814
+ if (!isDateTimeType) {
815
+ return /* @__PURE__ */ jsx10(
816
+ InputField,
817
+ {
818
+ ref: ref || inputRef,
819
+ type: actualType,
820
+ label,
821
+ helperText,
822
+ error,
823
+ icon: leftIcon,
824
+ iconRight: rightIconName,
825
+ onRightIconClick: handleRightIconClick,
826
+ fullWidth,
827
+ size,
828
+ className,
829
+ disabled,
830
+ id,
831
+ ...props
832
+ }
833
+ );
834
+ }
835
+ return /* @__PURE__ */ jsxs8("div", { className: `input-container ${fullWidth ? "input-container--full-width" : ""} ${className}`.trim(), children: [
836
+ label && /* @__PURE__ */ jsx10("label", { htmlFor: id, className: "input__label", children: label }),
837
+ /* @__PURE__ */ jsx10(
838
+ Popover,
839
+ {
840
+ trigger: /* @__PURE__ */ jsx10(
841
+ InputField,
842
+ {
843
+ ref: ref || inputRef,
844
+ type: "text",
845
+ icon: leftIcon,
846
+ iconRight: rightIconName,
847
+ onRightIconClick: () => setShowDateTimePicker(!showDateTimePicker),
848
+ fullWidth,
849
+ size,
850
+ disabled,
851
+ id,
852
+ value: formatDisplayValue(String(props.value || ""), type),
853
+ placeholder: props.placeholder,
854
+ readOnly: true
855
+ }
856
+ ),
857
+ isOpen: showDateTimePicker,
858
+ onToggle: () => setShowDateTimePicker(!showDateTimePicker),
859
+ placement: "bottom",
860
+ children: /* @__PURE__ */ jsxs8("div", { style: { padding: "1rem" }, children: [
861
+ (type === "date" || type === "datetime-local") && /* @__PURE__ */ jsx10(
862
+ DatePicker,
863
+ {
864
+ value: String(props.value || "").split("T")[0],
865
+ onChange: (newDate) => {
866
+ if (type === "datetime-local") {
867
+ const time = String(props.value || "").split("T")[1] || "00:00:00";
868
+ handleDateTimeChange(`${newDate}T${time}`);
869
+ } else {
870
+ handleDateTimeChange(newDate);
871
+ setShowDateTimePicker(false);
872
+ }
873
+ },
874
+ disabled
875
+ }
876
+ ),
877
+ (type === "time" || type === "datetime-local") && /* @__PURE__ */ jsx10(
878
+ TimePicker,
879
+ {
880
+ value: String(props.value || "").split("T")[1] || "00:00:00",
881
+ onChange: (newTime) => {
882
+ if (type === "datetime-local") {
883
+ const date = String(props.value || "").split("T")[0] || (/* @__PURE__ */ new Date()).toISOString().split("T")[0];
884
+ handleDateTimeChange(`${date}T${newTime}`);
885
+ } else {
886
+ handleDateTimeChange(newTime);
887
+ }
888
+ },
889
+ disabled,
890
+ showMilliseconds,
891
+ minuteStep
892
+ }
893
+ )
894
+ ] })
895
+ }
896
+ ),
897
+ error && /* @__PURE__ */ jsx10("p", { className: "input__message input__message--error", children: error }),
898
+ helperText && !error && /* @__PURE__ */ jsx10("p", { className: "input__message", children: helperText })
899
+ ] });
900
+ }
901
+ );
902
+ Input.displayName = "Input";
903
+
904
+ // src/components/input/InputText.tsx
905
+ import { jsx as jsx11 } from "react/jsx-runtime";
906
+ var InputText = React9.forwardRef((props, ref) => {
907
+ return /* @__PURE__ */ jsx11(Input, { ref, ...props, type: "text" });
908
+ });
909
+ InputText.displayName = "InputText";
910
+
911
+ // src/components/input/InputEmail.tsx
912
+ import React10 from "react";
913
+ import { jsx as jsx12 } from "react/jsx-runtime";
914
+ var InputEmail = React10.forwardRef((props, ref) => {
915
+ return /* @__PURE__ */ jsx12(Input, { ref, ...props, type: "email" });
916
+ });
917
+ InputEmail.displayName = "InputEmail";
918
+
919
+ // src/components/input/InputPassword.tsx
920
+ import React11 from "react";
921
+ import { jsx as jsx13 } from "react/jsx-runtime";
922
+ var InputPassword = React11.forwardRef((props, ref) => {
923
+ return /* @__PURE__ */ jsx13(Input, { ref, ...props, type: "password" });
924
+ });
925
+ InputPassword.displayName = "InputPassword";
926
+
927
+ // src/components/input/InputSearch.tsx
928
+ import React12 from "react";
929
+ import { jsx as jsx14 } from "react/jsx-runtime";
930
+ var InputSearch = React12.forwardRef((props, ref) => {
931
+ return /* @__PURE__ */ jsx14(Input, { ref, ...props, type: "search" });
932
+ });
933
+ InputSearch.displayName = "InputSearch";
934
+
935
+ // src/components/input/InputTel.tsx
936
+ import React13 from "react";
937
+ import { jsx as jsx15 } from "react/jsx-runtime";
938
+ var InputTel = React13.forwardRef((props, ref) => {
939
+ return /* @__PURE__ */ jsx15(Input, { ref, ...props, type: "tel" });
940
+ });
941
+ InputTel.displayName = "InputTel";
942
+
943
+ // src/components/input/InputUrl.tsx
944
+ import React14 from "react";
945
+ import { jsx as jsx16 } from "react/jsx-runtime";
946
+ var InputUrl = React14.forwardRef((props, ref) => {
947
+ return /* @__PURE__ */ jsx16(Input, { ref, ...props, type: "url" });
948
+ });
949
+ InputUrl.displayName = "InputUrl";
950
+
951
+ // src/components/input/InputNumber.tsx
952
+ import React15 from "react";
953
+ import { jsx as jsx17 } from "react/jsx-runtime";
954
+ var InputNumber = React15.forwardRef((props, ref) => {
955
+ return /* @__PURE__ */ jsx17(Input, { ref, ...props, type: "number" });
956
+ });
957
+ InputNumber.displayName = "InputNumber";
958
+
959
+ // src/components/input/InputDate.tsx
960
+ import React16 from "react";
961
+ import { jsx as jsx18 } from "react/jsx-runtime";
962
+ var InputDate = React16.forwardRef((props, ref) => {
963
+ return /* @__PURE__ */ jsx18(Input, { ref, ...props, type: "date" });
964
+ });
965
+ InputDate.displayName = "InputDate";
966
+
967
+ // src/components/input/InputTime.tsx
968
+ import React17 from "react";
969
+ import { jsx as jsx19 } from "react/jsx-runtime";
970
+ var InputTime = React17.forwardRef((props, ref) => {
971
+ return /* @__PURE__ */ jsx19(Input, { ref, ...props, type: "time" });
972
+ });
973
+ InputTime.displayName = "InputTime";
974
+
975
+ // src/components/input/InputDateTime.tsx
976
+ import React18 from "react";
977
+ import { jsx as jsx20 } from "react/jsx-runtime";
978
+ var InputDateTime = React18.forwardRef((props, ref) => {
979
+ return /* @__PURE__ */ jsx20(Input, { ref, ...props, type: "datetime-local" });
980
+ });
981
+ InputDateTime.displayName = "InputDateTime";
982
+
983
+ // src/components/tooltip/tooltip.tsx
984
+ import * as React19 from "react";
985
+ import * as ReactDOM2 from "react-dom";
986
+ import { Fragment as Fragment3, jsx as jsx21, jsxs as jsxs9 } from "react/jsx-runtime";
987
+
988
+ // src/components/_shared/HeadingAnchor.tsx
989
+ import { Fragment as Fragment4, jsx as jsx22, jsxs as jsxs10 } from "react/jsx-runtime";
990
+
991
+ // src/components/switch/switch.tsx
992
+ import { jsx as jsx23, jsxs as jsxs11 } from "react/jsx-runtime";
993
+ var Switch = React21.forwardRef(
994
+ ({
995
+ size = "md",
996
+ label,
997
+ onIcon,
998
+ offIcon,
999
+ error,
1000
+ helperText,
1001
+ disabled = false,
1002
+ className,
1003
+ checked,
1004
+ ...props
1005
+ }, ref) => {
1006
+ const switchClasses = [
1007
+ "switch",
1008
+ `switch--${size}`,
1009
+ checked && "switch--checked",
1010
+ disabled && "switch--disabled",
1011
+ error && "switch--error",
1012
+ className
1013
+ ].filter(Boolean).join(" ");
1014
+ const displayIcon = checked ? onIcon : offIcon;
1015
+ const iconSizes = {
1016
+ sm: 12,
1017
+ md: 16,
1018
+ lg: 20
1019
+ };
1020
+ return /* @__PURE__ */ jsxs11("div", { className: "switch__wrapper", children: [
1021
+ /* @__PURE__ */ jsxs11("label", { className: "switch__label", children: [
1022
+ /* @__PURE__ */ jsx23(
1023
+ "input",
1024
+ {
1025
+ type: "checkbox",
1026
+ ref,
1027
+ checked,
1028
+ disabled,
1029
+ className: "switch__input",
1030
+ ...props
1031
+ }
1032
+ ),
1033
+ /* @__PURE__ */ jsx23("span", { className: switchClasses, children: /* @__PURE__ */ jsx23("span", { className: "switch__track", children: /* @__PURE__ */ jsx23(
1034
+ Thumb,
1035
+ {
1036
+ icon: displayIcon,
1037
+ iconSize: iconSizes[size],
1038
+ className: "switch__thumb",
1039
+ checked,
1040
+ disabled
1041
+ }
1042
+ ) }) }),
1043
+ label && /* @__PURE__ */ jsx23("span", { className: "switch__text", children: label })
1044
+ ] }),
1045
+ (error || helperText) && /* @__PURE__ */ jsxs11("div", { className: "switch__message", children: [
1046
+ error && /* @__PURE__ */ jsx23("span", { className: "switch__error-text", children: error }),
1047
+ helperText && !error && /* @__PURE__ */ jsx23("span", { className: "switch__helper-text", children: helperText })
1048
+ ] })
1049
+ ] });
1050
+ }
1051
+ );
1052
+ Switch.displayName = "Switch";
1053
+ export {
1054
+ Switch
1055
+ };