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