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