@diwauhris/ui 1.0.0

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 (272) hide show
  1. package/README.md +75 -0
  2. package/lib/assets/ui.css +154 -0
  3. package/lib/index.cjs +183 -0
  4. package/lib/index.mjs +65 -0
  5. package/lib/index10.cjs +33 -0
  6. package/lib/index10.cjs.map +1 -0
  7. package/lib/index10.mjs +33 -0
  8. package/lib/index10.mjs.map +1 -0
  9. package/lib/index11.cjs +16 -0
  10. package/lib/index11.cjs.map +1 -0
  11. package/lib/index11.mjs +16 -0
  12. package/lib/index11.mjs.map +1 -0
  13. package/lib/index12.cjs +16 -0
  14. package/lib/index12.cjs.map +1 -0
  15. package/lib/index12.mjs +15 -0
  16. package/lib/index12.mjs.map +1 -0
  17. package/lib/index13.cjs +57 -0
  18. package/lib/index13.cjs.map +1 -0
  19. package/lib/index13.mjs +57 -0
  20. package/lib/index13.mjs.map +1 -0
  21. package/lib/index14.cjs +10 -0
  22. package/lib/index14.cjs.map +1 -0
  23. package/lib/index14.mjs +10 -0
  24. package/lib/index14.mjs.map +1 -0
  25. package/lib/index15.cjs +30 -0
  26. package/lib/index15.cjs.map +1 -0
  27. package/lib/index15.mjs +30 -0
  28. package/lib/index15.mjs.map +1 -0
  29. package/lib/index16.cjs +28 -0
  30. package/lib/index16.cjs.map +1 -0
  31. package/lib/index16.mjs +26 -0
  32. package/lib/index16.mjs.map +1 -0
  33. package/lib/index17.cjs +43 -0
  34. package/lib/index17.cjs.map +1 -0
  35. package/lib/index17.mjs +43 -0
  36. package/lib/index17.mjs.map +1 -0
  37. package/lib/index18.cjs +59 -0
  38. package/lib/index18.cjs.map +1 -0
  39. package/lib/index18.mjs +59 -0
  40. package/lib/index18.mjs.map +1 -0
  41. package/lib/index19.cjs +67 -0
  42. package/lib/index19.cjs.map +1 -0
  43. package/lib/index19.mjs +67 -0
  44. package/lib/index19.mjs.map +1 -0
  45. package/lib/index2.cjs +33 -0
  46. package/lib/index2.mjs +13 -0
  47. package/lib/index20.cjs +79 -0
  48. package/lib/index20.cjs.map +1 -0
  49. package/lib/index20.mjs +79 -0
  50. package/lib/index20.mjs.map +1 -0
  51. package/lib/index21.cjs +105 -0
  52. package/lib/index21.cjs.map +1 -0
  53. package/lib/index21.mjs +104 -0
  54. package/lib/index21.mjs.map +1 -0
  55. package/lib/index22.cjs +50 -0
  56. package/lib/index22.cjs.map +1 -0
  57. package/lib/index22.mjs +50 -0
  58. package/lib/index22.mjs.map +1 -0
  59. package/lib/index23.cjs +143 -0
  60. package/lib/index23.cjs.map +1 -0
  61. package/lib/index23.mjs +143 -0
  62. package/lib/index23.mjs.map +1 -0
  63. package/lib/index25.cjs +177 -0
  64. package/lib/index25.cjs.map +1 -0
  65. package/lib/index25.mjs +175 -0
  66. package/lib/index25.mjs.map +1 -0
  67. package/lib/index26.cjs +108 -0
  68. package/lib/index26.cjs.map +1 -0
  69. package/lib/index26.mjs +108 -0
  70. package/lib/index26.mjs.map +1 -0
  71. package/lib/index27.cjs +120 -0
  72. package/lib/index27.cjs.map +1 -0
  73. package/lib/index27.mjs +120 -0
  74. package/lib/index27.mjs.map +1 -0
  75. package/lib/index28.cjs +54 -0
  76. package/lib/index28.cjs.map +1 -0
  77. package/lib/index28.mjs +54 -0
  78. package/lib/index28.mjs.map +1 -0
  79. package/lib/index29.cjs +100 -0
  80. package/lib/index29.cjs.map +1 -0
  81. package/lib/index29.mjs +100 -0
  82. package/lib/index29.mjs.map +1 -0
  83. package/lib/index3.cjs +38 -0
  84. package/lib/index3.cjs.map +1 -0
  85. package/lib/index3.mjs +38 -0
  86. package/lib/index3.mjs.map +1 -0
  87. package/lib/index30.cjs +27 -0
  88. package/lib/index30.cjs.map +1 -0
  89. package/lib/index30.mjs +27 -0
  90. package/lib/index30.mjs.map +1 -0
  91. package/lib/index31.cjs +72 -0
  92. package/lib/index31.cjs.map +1 -0
  93. package/lib/index31.mjs +72 -0
  94. package/lib/index31.mjs.map +1 -0
  95. package/lib/index32.cjs +19 -0
  96. package/lib/index32.cjs.map +1 -0
  97. package/lib/index32.mjs +19 -0
  98. package/lib/index32.mjs.map +1 -0
  99. package/lib/index33.cjs +25 -0
  100. package/lib/index33.cjs.map +1 -0
  101. package/lib/index33.mjs +25 -0
  102. package/lib/index33.mjs.map +1 -0
  103. package/lib/index34.cjs +55 -0
  104. package/lib/index34.cjs.map +1 -0
  105. package/lib/index34.mjs +51 -0
  106. package/lib/index34.mjs.map +1 -0
  107. package/lib/index35.cjs +25 -0
  108. package/lib/index35.cjs.map +1 -0
  109. package/lib/index35.mjs +25 -0
  110. package/lib/index35.mjs.map +1 -0
  111. package/lib/index36.cjs +54 -0
  112. package/lib/index36.cjs.map +1 -0
  113. package/lib/index36.mjs +49 -0
  114. package/lib/index36.mjs.map +1 -0
  115. package/lib/index37.cjs +130 -0
  116. package/lib/index37.cjs.map +1 -0
  117. package/lib/index37.mjs +128 -0
  118. package/lib/index37.mjs.map +1 -0
  119. package/lib/index38.cjs +106 -0
  120. package/lib/index38.cjs.map +1 -0
  121. package/lib/index38.mjs +102 -0
  122. package/lib/index38.mjs.map +1 -0
  123. package/lib/index39.cjs +137 -0
  124. package/lib/index39.cjs.map +1 -0
  125. package/lib/index39.mjs +137 -0
  126. package/lib/index39.mjs.map +1 -0
  127. package/lib/index4.cjs +24 -0
  128. package/lib/index4.cjs.map +1 -0
  129. package/lib/index4.mjs +24 -0
  130. package/lib/index4.mjs.map +1 -0
  131. package/lib/index40.cjs +130 -0
  132. package/lib/index40.cjs.map +1 -0
  133. package/lib/index40.mjs +126 -0
  134. package/lib/index40.mjs.map +1 -0
  135. package/lib/index41.cjs +60 -0
  136. package/lib/index41.cjs.map +1 -0
  137. package/lib/index41.mjs +58 -0
  138. package/lib/index41.mjs.map +1 -0
  139. package/lib/index42.cjs +105 -0
  140. package/lib/index42.cjs.map +1 -0
  141. package/lib/index42.mjs +105 -0
  142. package/lib/index42.mjs.map +1 -0
  143. package/lib/index43.cjs +47 -0
  144. package/lib/index43.cjs.map +1 -0
  145. package/lib/index43.mjs +42 -0
  146. package/lib/index43.mjs.map +1 -0
  147. package/lib/index44.cjs +40 -0
  148. package/lib/index44.cjs.map +1 -0
  149. package/lib/index44.mjs +35 -0
  150. package/lib/index44.mjs.map +1 -0
  151. package/lib/index45.cjs +91 -0
  152. package/lib/index45.cjs.map +1 -0
  153. package/lib/index45.mjs +91 -0
  154. package/lib/index45.mjs.map +1 -0
  155. package/lib/index46.cjs +180 -0
  156. package/lib/index46.cjs.map +1 -0
  157. package/lib/index46.mjs +180 -0
  158. package/lib/index46.mjs.map +1 -0
  159. package/lib/index47.cjs +61 -0
  160. package/lib/index47.cjs.map +1 -0
  161. package/lib/index47.mjs +61 -0
  162. package/lib/index47.mjs.map +1 -0
  163. package/lib/index48.cjs +165 -0
  164. package/lib/index48.cjs.map +1 -0
  165. package/lib/index48.mjs +161 -0
  166. package/lib/index48.mjs.map +1 -0
  167. package/lib/index49.cjs +83 -0
  168. package/lib/index49.cjs.map +1 -0
  169. package/lib/index49.mjs +83 -0
  170. package/lib/index49.mjs.map +1 -0
  171. package/lib/index5.cjs +39 -0
  172. package/lib/index5.cjs.map +1 -0
  173. package/lib/index5.mjs +39 -0
  174. package/lib/index5.mjs.map +1 -0
  175. package/lib/index50.cjs +100 -0
  176. package/lib/index50.cjs.map +1 -0
  177. package/lib/index50.mjs +100 -0
  178. package/lib/index50.mjs.map +1 -0
  179. package/lib/index51.cjs +116 -0
  180. package/lib/index51.cjs.map +1 -0
  181. package/lib/index51.mjs +113 -0
  182. package/lib/index51.mjs.map +1 -0
  183. package/lib/index52.cjs +93 -0
  184. package/lib/index52.cjs.map +1 -0
  185. package/lib/index52.mjs +93 -0
  186. package/lib/index52.mjs.map +1 -0
  187. package/lib/index53.cjs +120 -0
  188. package/lib/index53.cjs.map +1 -0
  189. package/lib/index53.mjs +120 -0
  190. package/lib/index53.mjs.map +1 -0
  191. package/lib/index54.cjs +53 -0
  192. package/lib/index54.cjs.map +1 -0
  193. package/lib/index54.mjs +50 -0
  194. package/lib/index54.mjs.map +1 -0
  195. package/lib/index55.cjs +130 -0
  196. package/lib/index55.cjs.map +1 -0
  197. package/lib/index55.mjs +127 -0
  198. package/lib/index55.mjs.map +1 -0
  199. package/lib/index56.cjs +36 -0
  200. package/lib/index56.cjs.map +1 -0
  201. package/lib/index56.mjs +35 -0
  202. package/lib/index56.mjs.map +1 -0
  203. package/lib/index57.cjs +47 -0
  204. package/lib/index57.cjs.map +1 -0
  205. package/lib/index57.mjs +47 -0
  206. package/lib/index57.mjs.map +1 -0
  207. package/lib/index58.cjs +97 -0
  208. package/lib/index58.cjs.map +1 -0
  209. package/lib/index58.mjs +97 -0
  210. package/lib/index58.mjs.map +1 -0
  211. package/lib/index59.cjs +120 -0
  212. package/lib/index59.cjs.map +1 -0
  213. package/lib/index59.mjs +116 -0
  214. package/lib/index59.mjs.map +1 -0
  215. package/lib/index6.cjs +29 -0
  216. package/lib/index6.cjs.map +1 -0
  217. package/lib/index6.mjs +29 -0
  218. package/lib/index6.mjs.map +1 -0
  219. package/lib/index60.cjs +34 -0
  220. package/lib/index60.cjs.map +1 -0
  221. package/lib/index60.mjs +34 -0
  222. package/lib/index60.mjs.map +1 -0
  223. package/lib/index61.cjs +62 -0
  224. package/lib/index61.cjs.map +1 -0
  225. package/lib/index61.mjs +62 -0
  226. package/lib/index61.mjs.map +1 -0
  227. package/lib/index62.cjs +213 -0
  228. package/lib/index62.cjs.map +1 -0
  229. package/lib/index62.mjs +213 -0
  230. package/lib/index62.mjs.map +1 -0
  231. package/lib/index63.cjs +42 -0
  232. package/lib/index63.cjs.map +1 -0
  233. package/lib/index63.mjs +42 -0
  234. package/lib/index63.mjs.map +1 -0
  235. package/lib/index64.cjs +86 -0
  236. package/lib/index64.cjs.map +1 -0
  237. package/lib/index64.mjs +86 -0
  238. package/lib/index64.mjs.map +1 -0
  239. package/lib/index65.cjs +156 -0
  240. package/lib/index65.cjs.map +1 -0
  241. package/lib/index65.mjs +156 -0
  242. package/lib/index65.mjs.map +1 -0
  243. package/lib/index66.cjs +107 -0
  244. package/lib/index66.cjs.map +1 -0
  245. package/lib/index66.mjs +106 -0
  246. package/lib/index66.mjs.map +1 -0
  247. package/lib/index67.cjs +52 -0
  248. package/lib/index67.cjs.map +1 -0
  249. package/lib/index67.mjs +52 -0
  250. package/lib/index67.mjs.map +1 -0
  251. package/lib/index68.cjs +125 -0
  252. package/lib/index68.cjs.map +1 -0
  253. package/lib/index68.mjs +115 -0
  254. package/lib/index68.mjs.map +1 -0
  255. package/lib/index69.cjs +34 -0
  256. package/lib/index69.cjs.map +1 -0
  257. package/lib/index69.mjs +29 -0
  258. package/lib/index69.mjs.map +1 -0
  259. package/lib/index7.cjs +17 -0
  260. package/lib/index7.cjs.map +1 -0
  261. package/lib/index7.mjs +17 -0
  262. package/lib/index7.mjs.map +1 -0
  263. package/lib/index8.cjs +86 -0
  264. package/lib/index8.cjs.map +1 -0
  265. package/lib/index8.mjs +86 -0
  266. package/lib/index8.mjs.map +1 -0
  267. package/lib/index9.cjs +29 -0
  268. package/lib/index9.cjs.map +1 -0
  269. package/lib/index9.mjs +29 -0
  270. package/lib/index9.mjs.map +1 -0
  271. package/lib/types/index.d.ts +1 -0
  272. package/package.json +68 -0
@@ -0,0 +1,57 @@
1
+ const require_FieldContext = require("./index12.cjs");
2
+ let react_jsx_runtime = require("react/jsx-runtime");
3
+ let react = require("react");
4
+ //#region src/ui-library/gallery/field/Field.tsx
5
+ /**
6
+ * Field — Gallery-native form field wrapper.
7
+ * Copied from shared/components/Field.tsx, updated to use gallery-local FieldContext.
8
+ */
9
+ /**
10
+ * Form field wrapper: label + control + inline error.
11
+ *
12
+ * Publishes a FieldContext so that Combobox, DatePicker, and any
13
+ * FieldInput inside this wrapper automatically receive the correct id,
14
+ * aria-required, aria-invalid, and aria-describedby — with no prop threading.
15
+ */
16
+ function Field({ label, required = false, error, children, inputId }) {
17
+ const generatedId = (0, react.useId)();
18
+ const fieldId = inputId ?? generatedId;
19
+ const errorId = `${fieldId}-error`;
20
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_FieldContext.FieldContext, {
21
+ value: {
22
+ inputId: fieldId,
23
+ errorId,
24
+ required,
25
+ invalid: !!error
26
+ },
27
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
28
+ className: `flex flex-col gap-1.5${error ? " shake" : ""}`,
29
+ children: [
30
+ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
31
+ htmlFor: fieldId,
32
+ className: "text-xs font-semibold text-slate-600 select-none",
33
+ children: [label, required && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
34
+ className: "text-rose-500 ml-0.5",
35
+ "aria-hidden": "true",
36
+ children: " *"
37
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
38
+ className: "sr-only",
39
+ children: " (required)"
40
+ })] })]
41
+ }),
42
+ children,
43
+ error && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
44
+ id: errorId,
45
+ role: "alert",
46
+ "aria-live": "polite",
47
+ className: "text-xs font-medium text-rose-500 leading-snug",
48
+ children: error
49
+ })
50
+ ]
51
+ })
52
+ });
53
+ }
54
+ //#endregion
55
+ exports.Field = Field;
56
+
57
+ //# sourceMappingURL=index13.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index13.cjs","names":[],"sources":["../src/ui-library/gallery/field/Field.tsx"],"sourcesContent":["/**\n * Field — Gallery-native form field wrapper.\n * Copied from shared/components/Field.tsx, updated to use gallery-local FieldContext.\n */\nimport { type ReactNode, useId } from 'react';\nimport { FieldContext } from './FieldContext';\n\ninterface FieldProps {\n label: string;\n required?: boolean;\n error?: string;\n children: ReactNode;\n inputId?: string;\n}\n\n/**\n * Form field wrapper: label + control + inline error.\n *\n * Publishes a FieldContext so that Combobox, DatePicker, and any\n * FieldInput inside this wrapper automatically receive the correct id,\n * aria-required, aria-invalid, and aria-describedby — with no prop threading.\n */\nexport function Field({ label, required = false, error, children, inputId }: FieldProps) {\n const generatedId = useId();\n const fieldId = inputId ?? generatedId;\n const errorId = `${fieldId}-error`;\n\n return (\n <FieldContext value={{\n inputId: fieldId,\n errorId,\n required,\n invalid: !!error,\n }}>\n <div className={`flex flex-col gap-1.5${error ? ' shake' : ''}`}>\n {/* Label — sentence case, medium weight, visible but not dominant */}\n <label\n htmlFor={fieldId}\n className=\"text-xs font-semibold text-slate-600 select-none\"\n >\n {label}\n {required && (\n <>\n <span className=\"text-rose-500 ml-0.5\" aria-hidden=\"true\"> *</span>\n <span className=\"sr-only\"> (required)</span>\n </>\n )}\n </label>\n\n {/* Control slot */}\n {children}\n\n {/* Inline validation error */}\n {error && (\n <p\n id={errorId}\n role=\"alert\"\n aria-live=\"polite\"\n className=\"text-xs font-medium text-rose-500 leading-snug\"\n >\n {error}\n </p>\n )}\n </div>\n </FieldContext>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;AAsBA,SAAgB,MAAM,EAAE,OAAO,WAAW,OAAO,OAAO,UAAU,WAAuB;CACvF,MAAM,eAAA,GAAc,MAAA,MAAA,CAAM;CAC1B,MAAM,UAAU,WAAW;CAC3B,MAAM,UAAU,GAAG,QAAQ;CAE3B,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,qBAAA,cAAD;EAAc,OAAO;GACnB,SAAS;GACT;GACA;GACA,SAAS,CAAC,CAAC;EACb;EACE,UAAA,iBAAA,GAAA,kBAAA,KAAA,CAAC,OAAD;GAAK,WAAW,wBAAwB,QAAQ,WAAW;GAA3D,UAAA;IAEE,iBAAA,GAAA,kBAAA,KAAA,CAAC,SAAD;KACE,SAAS;KACT,WAAU;KAFZ,UAAA,CAIG,OACA,YACC,iBAAA,GAAA,kBAAA,KAAA,CAAA,kBAAA,UAAA,EAAA,UAAA,CACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;MAAM,WAAU;MAAuB,eAAY;MAAO,UAAA;KAAQ,CAAA,GAClE,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;MAAM,WAAU;MAAU,UAAA;KAAiB,CAAA,CAC3C,EAAA,CAAA,CAEC;;IAGN;IAGA,SACC,iBAAA,GAAA,kBAAA,IAAA,CAAC,KAAD;KACE,IAAI;KACJ,MAAK;KACL,aAAU;KACV,WAAU;KAET,UAAA;IACA,CAAA;GAEF;;CACO,CAAA;AAElB"}
@@ -0,0 +1,57 @@
1
+ import { FieldContext } from "./index12.mjs";
2
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
3
+ import { useId } from "react";
4
+ //#region src/ui-library/gallery/field/Field.tsx
5
+ /**
6
+ * Field — Gallery-native form field wrapper.
7
+ * Copied from shared/components/Field.tsx, updated to use gallery-local FieldContext.
8
+ */
9
+ /**
10
+ * Form field wrapper: label + control + inline error.
11
+ *
12
+ * Publishes a FieldContext so that Combobox, DatePicker, and any
13
+ * FieldInput inside this wrapper automatically receive the correct id,
14
+ * aria-required, aria-invalid, and aria-describedby — with no prop threading.
15
+ */
16
+ function Field({ label, required = false, error, children, inputId }) {
17
+ const generatedId = useId();
18
+ const fieldId = inputId ?? generatedId;
19
+ const errorId = `${fieldId}-error`;
20
+ return /* @__PURE__ */ jsx(FieldContext, {
21
+ value: {
22
+ inputId: fieldId,
23
+ errorId,
24
+ required,
25
+ invalid: !!error
26
+ },
27
+ children: /* @__PURE__ */ jsxs("div", {
28
+ className: `flex flex-col gap-1.5${error ? " shake" : ""}`,
29
+ children: [
30
+ /* @__PURE__ */ jsxs("label", {
31
+ htmlFor: fieldId,
32
+ className: "text-xs font-semibold text-slate-600 select-none",
33
+ children: [label, required && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("span", {
34
+ className: "text-rose-500 ml-0.5",
35
+ "aria-hidden": "true",
36
+ children: " *"
37
+ }), /* @__PURE__ */ jsx("span", {
38
+ className: "sr-only",
39
+ children: " (required)"
40
+ })] })]
41
+ }),
42
+ children,
43
+ error && /* @__PURE__ */ jsx("p", {
44
+ id: errorId,
45
+ role: "alert",
46
+ "aria-live": "polite",
47
+ className: "text-xs font-medium text-rose-500 leading-snug",
48
+ children: error
49
+ })
50
+ ]
51
+ })
52
+ });
53
+ }
54
+ //#endregion
55
+ export { Field };
56
+
57
+ //# sourceMappingURL=index13.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index13.mjs","names":[],"sources":["../src/ui-library/gallery/field/Field.tsx"],"sourcesContent":["/**\n * Field — Gallery-native form field wrapper.\n * Copied from shared/components/Field.tsx, updated to use gallery-local FieldContext.\n */\nimport { type ReactNode, useId } from 'react';\nimport { FieldContext } from './FieldContext';\n\ninterface FieldProps {\n label: string;\n required?: boolean;\n error?: string;\n children: ReactNode;\n inputId?: string;\n}\n\n/**\n * Form field wrapper: label + control + inline error.\n *\n * Publishes a FieldContext so that Combobox, DatePicker, and any\n * FieldInput inside this wrapper automatically receive the correct id,\n * aria-required, aria-invalid, and aria-describedby — with no prop threading.\n */\nexport function Field({ label, required = false, error, children, inputId }: FieldProps) {\n const generatedId = useId();\n const fieldId = inputId ?? generatedId;\n const errorId = `${fieldId}-error`;\n\n return (\n <FieldContext value={{\n inputId: fieldId,\n errorId,\n required,\n invalid: !!error,\n }}>\n <div className={`flex flex-col gap-1.5${error ? ' shake' : ''}`}>\n {/* Label — sentence case, medium weight, visible but not dominant */}\n <label\n htmlFor={fieldId}\n className=\"text-xs font-semibold text-slate-600 select-none\"\n >\n {label}\n {required && (\n <>\n <span className=\"text-rose-500 ml-0.5\" aria-hidden=\"true\"> *</span>\n <span className=\"sr-only\"> (required)</span>\n </>\n )}\n </label>\n\n {/* Control slot */}\n {children}\n\n {/* Inline validation error */}\n {error && (\n <p\n id={errorId}\n role=\"alert\"\n aria-live=\"polite\"\n className=\"text-xs font-medium text-rose-500 leading-snug\"\n >\n {error}\n </p>\n )}\n </div>\n </FieldContext>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;AAsBA,SAAgB,MAAM,EAAE,OAAO,WAAW,OAAO,OAAO,UAAU,WAAuB;CACvF,MAAM,cAAc,MAAM;CAC1B,MAAM,UAAU,WAAW;CAC3B,MAAM,UAAU,GAAG,QAAQ;CAE3B,OACE,oBAAC,cAAD;EAAc,OAAO;GACnB,SAAS;GACT;GACA;GACA,SAAS,CAAC,CAAC;EACb;EACE,UAAA,qBAAC,OAAD;GAAK,WAAW,wBAAwB,QAAQ,WAAW;GAA3D,UAAA;IAEE,qBAAC,SAAD;KACE,SAAS;KACT,WAAU;KAFZ,UAAA,CAIG,OACA,YACC,qBAAA,UAAA,EAAA,UAAA,CACE,oBAAC,QAAD;MAAM,WAAU;MAAuB,eAAY;MAAO,UAAA;KAAQ,CAAA,GAClE,oBAAC,QAAD;MAAM,WAAU;MAAU,UAAA;KAAiB,CAAA,CAC3C,EAAA,CAAA,CAEC;;IAGN;IAGA,SACC,oBAAC,KAAD;KACE,IAAI;KACJ,MAAK;KACL,aAAU;KACV,WAAU;KAET,UAAA;IACA,CAAA;GAEF;;CACO,CAAA;AAElB"}
@@ -0,0 +1,10 @@
1
+ let clsx = require("clsx");
2
+ let tailwind_merge = require("tailwind-merge");
3
+ //#region src/lib/utils.ts
4
+ function cn(...inputs) {
5
+ return (0, tailwind_merge.twMerge)((0, clsx.clsx)(inputs));
6
+ }
7
+ //#endregion
8
+ exports.cn = cn;
9
+
10
+ //# sourceMappingURL=index14.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index14.cjs","names":[],"sources":["../src/lib/utils.ts"],"sourcesContent":["import { clsx, type ClassValue } from 'clsx';\nimport { twMerge } from 'tailwind-merge';\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n"],"mappings":";;;AAGA,SAAgB,GAAG,GAAG,QAAsB;CAC1C,QAAA,GAAO,eAAA,QAAA,EAAA,GAAQ,KAAA,KAAA,CAAK,MAAM,CAAC;AAC7B"}
@@ -0,0 +1,10 @@
1
+ import { clsx } from "clsx";
2
+ import { twMerge } from "tailwind-merge";
3
+ //#region src/lib/utils.ts
4
+ function cn(...inputs) {
5
+ return twMerge(clsx(inputs));
6
+ }
7
+ //#endregion
8
+ export { cn };
9
+
10
+ //# sourceMappingURL=index14.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index14.mjs","names":[],"sources":["../src/lib/utils.ts"],"sourcesContent":["import { clsx, type ClassValue } from 'clsx';\nimport { twMerge } from 'tailwind-merge';\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n"],"mappings":";;;AAGA,SAAgB,GAAG,GAAG,QAAsB;CAC1C,OAAO,QAAQ,KAAK,MAAM,CAAC;AAC7B"}
@@ -0,0 +1,30 @@
1
+ const require_FieldContext = require("./index12.cjs");
2
+ const require_utils = require("./index14.cjs");
3
+ let react_jsx_runtime = require("react/jsx-runtime");
4
+ //#region src/ui-library/gallery/field-input/FieldInput.tsx
5
+ /**
6
+ * FieldInput — Gallery-native context-aware <input> wrapper.
7
+ * Copied from shared/components/FieldInput.tsx.
8
+ * Updated to import FieldContext from gallery-local field directory
9
+ * and to carry full DIWA visual styling.
10
+ */
11
+ function FieldInput({ id, "aria-required": ariaRequired, "aria-invalid": ariaInvalid, "aria-describedby": ariaDescribedBy, className = "", disabled, ...rest }) {
12
+ const ctx = require_FieldContext.useFieldContext();
13
+ const resolvedId = id ?? ctx?.inputId;
14
+ const resolvedRequired = ariaRequired ?? (ctx?.required ? "true" : void 0);
15
+ const resolvedInvalid = ariaInvalid ?? (ctx?.invalid ? "true" : void 0);
16
+ const resolvedDescribedBy = ariaDescribedBy ?? (ctx?.invalid && ctx?.errorId ? ctx.errorId : void 0);
17
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
18
+ id: resolvedId,
19
+ "aria-required": resolvedRequired,
20
+ "aria-invalid": resolvedInvalid,
21
+ "aria-describedby": resolvedDescribedBy,
22
+ disabled,
23
+ className: require_utils.cn("h-10 w-full rounded-md border bg-white px-3.5 text-sm font-medium text-slate-900", "outline-none transition-all duration-150", "placeholder:text-slate-400", resolvedInvalid === "true" ? "border-rose-300 focus:border-rose-400 focus:ring-2 focus:ring-rose-100" : "border-slate-200 hover:border-slate-300 focus:border-brand-blue/50 focus:ring-2 focus:ring-brand-blue/15", disabled && "cursor-not-allowed bg-slate-50 text-slate-400 opacity-60", className),
24
+ ...rest
25
+ });
26
+ }
27
+ //#endregion
28
+ exports.FieldInput = FieldInput;
29
+
30
+ //# sourceMappingURL=index15.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index15.cjs","names":[],"sources":["../src/ui-library/gallery/field-input/FieldInput.tsx"],"sourcesContent":["/**\n * FieldInput — Gallery-native context-aware <input> wrapper.\n * Copied from shared/components/FieldInput.tsx.\n * Updated to import FieldContext from gallery-local field directory\n * and to carry full DIWA visual styling.\n */\nimport { cn } from '../../../lib/utils';\nimport { useFieldContext } from '../field/FieldContext';\n\ntype FieldInputProps = React.ComponentProps<'input'>;\n\nexport function FieldInput({\n id,\n 'aria-required': ariaRequired,\n 'aria-invalid': ariaInvalid,\n 'aria-describedby': ariaDescribedBy,\n className = '',\n disabled,\n ...rest\n}: FieldInputProps) {\n const ctx = useFieldContext();\n\n const resolvedId = id ?? ctx?.inputId;\n const resolvedRequired = ariaRequired ?? (ctx?.required ? 'true' : undefined);\n const resolvedInvalid = ariaInvalid ?? (ctx?.invalid ? 'true' : undefined);\n const resolvedDescribedBy = ariaDescribedBy ?? (ctx?.invalid && ctx?.errorId ? ctx.errorId : undefined);\n\n const isInvalid = resolvedInvalid === 'true';\n\n return (\n <input\n id={resolvedId}\n aria-required={resolvedRequired}\n aria-invalid={resolvedInvalid}\n aria-describedby={resolvedDescribedBy}\n disabled={disabled}\n className={cn(\n // Layout + sizing\n 'h-10 w-full rounded-md border bg-white px-3.5 text-sm font-medium text-slate-900',\n 'outline-none transition-all duration-150',\n 'placeholder:text-slate-400',\n // Default border + focus ring\n isInvalid\n ? 'border-rose-300 focus:border-rose-400 focus:ring-2 focus:ring-rose-100'\n : 'border-slate-200 hover:border-slate-300 focus:border-brand-blue/50 focus:ring-2 focus:ring-brand-blue/15',\n // Disabled\n disabled && 'cursor-not-allowed bg-slate-50 text-slate-400 opacity-60',\n className,\n )}\n {...rest}\n />\n );\n}\n"],"mappings":";;;;;;;;;;AAWA,SAAgB,WAAW,EACzB,IACA,iBAAiB,cACjB,gBAAgB,aAChB,oBAAoB,iBACpB,YAAY,IACZ,UACA,GAAG,QACe;CAClB,MAAM,MAAM,qBAAA,gBAAgB;CAE5B,MAAM,aAAsB,MAAmB,KAAK;CACpD,MAAM,mBAAsB,iBAAoB,KAAK,WAAW,SAAS,KAAA;CACzE,MAAM,kBAAsB,gBAAoB,KAAK,UAAW,SAAS,KAAA;CACzE,MAAM,sBAAsB,oBAAoB,KAAK,WAAW,KAAK,UAAU,IAAI,UAAU,KAAA;CAI7F,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,SAAD;EACE,IAAI;EACJ,iBAAe;EACf,gBAAc;EACd,oBAAkB;EACR;EACV,WAAW,cAAA,GAET,oFACA,4CACA,8BAbY,oBAAoB,SAgB5B,2EACA,4GAEJ,YAAY,4DACZ,SACF;EACA,GAAI;CACL,CAAA;AAEL"}
@@ -0,0 +1,30 @@
1
+ import { useFieldContext } from "./index12.mjs";
2
+ import { cn } from "./index14.mjs";
3
+ import { jsx } from "react/jsx-runtime";
4
+ //#region src/ui-library/gallery/field-input/FieldInput.tsx
5
+ /**
6
+ * FieldInput — Gallery-native context-aware <input> wrapper.
7
+ * Copied from shared/components/FieldInput.tsx.
8
+ * Updated to import FieldContext from gallery-local field directory
9
+ * and to carry full DIWA visual styling.
10
+ */
11
+ function FieldInput({ id, "aria-required": ariaRequired, "aria-invalid": ariaInvalid, "aria-describedby": ariaDescribedBy, className = "", disabled, ...rest }) {
12
+ const ctx = useFieldContext();
13
+ const resolvedId = id ?? ctx?.inputId;
14
+ const resolvedRequired = ariaRequired ?? (ctx?.required ? "true" : void 0);
15
+ const resolvedInvalid = ariaInvalid ?? (ctx?.invalid ? "true" : void 0);
16
+ const resolvedDescribedBy = ariaDescribedBy ?? (ctx?.invalid && ctx?.errorId ? ctx.errorId : void 0);
17
+ return /* @__PURE__ */ jsx("input", {
18
+ id: resolvedId,
19
+ "aria-required": resolvedRequired,
20
+ "aria-invalid": resolvedInvalid,
21
+ "aria-describedby": resolvedDescribedBy,
22
+ disabled,
23
+ className: cn("h-10 w-full rounded-md border bg-white px-3.5 text-sm font-medium text-slate-900", "outline-none transition-all duration-150", "placeholder:text-slate-400", resolvedInvalid === "true" ? "border-rose-300 focus:border-rose-400 focus:ring-2 focus:ring-rose-100" : "border-slate-200 hover:border-slate-300 focus:border-brand-blue/50 focus:ring-2 focus:ring-brand-blue/15", disabled && "cursor-not-allowed bg-slate-50 text-slate-400 opacity-60", className),
24
+ ...rest
25
+ });
26
+ }
27
+ //#endregion
28
+ export { FieldInput };
29
+
30
+ //# sourceMappingURL=index15.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index15.mjs","names":[],"sources":["../src/ui-library/gallery/field-input/FieldInput.tsx"],"sourcesContent":["/**\n * FieldInput — Gallery-native context-aware <input> wrapper.\n * Copied from shared/components/FieldInput.tsx.\n * Updated to import FieldContext from gallery-local field directory\n * and to carry full DIWA visual styling.\n */\nimport { cn } from '../../../lib/utils';\nimport { useFieldContext } from '../field/FieldContext';\n\ntype FieldInputProps = React.ComponentProps<'input'>;\n\nexport function FieldInput({\n id,\n 'aria-required': ariaRequired,\n 'aria-invalid': ariaInvalid,\n 'aria-describedby': ariaDescribedBy,\n className = '',\n disabled,\n ...rest\n}: FieldInputProps) {\n const ctx = useFieldContext();\n\n const resolvedId = id ?? ctx?.inputId;\n const resolvedRequired = ariaRequired ?? (ctx?.required ? 'true' : undefined);\n const resolvedInvalid = ariaInvalid ?? (ctx?.invalid ? 'true' : undefined);\n const resolvedDescribedBy = ariaDescribedBy ?? (ctx?.invalid && ctx?.errorId ? ctx.errorId : undefined);\n\n const isInvalid = resolvedInvalid === 'true';\n\n return (\n <input\n id={resolvedId}\n aria-required={resolvedRequired}\n aria-invalid={resolvedInvalid}\n aria-describedby={resolvedDescribedBy}\n disabled={disabled}\n className={cn(\n // Layout + sizing\n 'h-10 w-full rounded-md border bg-white px-3.5 text-sm font-medium text-slate-900',\n 'outline-none transition-all duration-150',\n 'placeholder:text-slate-400',\n // Default border + focus ring\n isInvalid\n ? 'border-rose-300 focus:border-rose-400 focus:ring-2 focus:ring-rose-100'\n : 'border-slate-200 hover:border-slate-300 focus:border-brand-blue/50 focus:ring-2 focus:ring-brand-blue/15',\n // Disabled\n disabled && 'cursor-not-allowed bg-slate-50 text-slate-400 opacity-60',\n className,\n )}\n {...rest}\n />\n );\n}\n"],"mappings":";;;;;;;;;;AAWA,SAAgB,WAAW,EACzB,IACA,iBAAiB,cACjB,gBAAgB,aAChB,oBAAoB,iBACpB,YAAY,IACZ,UACA,GAAG,QACe;CAClB,MAAM,MAAM,gBAAgB;CAE5B,MAAM,aAAsB,MAAmB,KAAK;CACpD,MAAM,mBAAsB,iBAAoB,KAAK,WAAW,SAAS,KAAA;CACzE,MAAM,kBAAsB,gBAAoB,KAAK,UAAW,SAAS,KAAA;CACzE,MAAM,sBAAsB,oBAAoB,KAAK,WAAW,KAAK,UAAU,IAAI,UAAU,KAAA;CAI7F,OACE,oBAAC,SAAD;EACE,IAAI;EACJ,iBAAe;EACf,gBAAc;EACd,oBAAkB;EACR;EACV,WAAW,GAET,oFACA,4CACA,8BAbY,oBAAoB,SAgB5B,2EACA,4GAEJ,YAAY,4DACZ,SACF;EACA,GAAI;CACL,CAAA;AAEL"}
@@ -0,0 +1,28 @@
1
+ //#region src/ui-library/gallery/shared/fieldStatus.ts
2
+ /**
3
+ * Border + focus-ring classes for the field wrapper/element.
4
+ * Applied via focus: or focus-within: depending on component structure.
5
+ * Interactive color uses brand-blue per the UHRIS brand identity.
6
+ */
7
+ var FIELD_STATUS_RING_WITHIN = {
8
+ default: "border-slate-200 focus-within:border-brand-blue/50 focus-within:ring-2 focus-within:ring-brand-blue/15",
9
+ error: "border-rose-300 focus-within:border-rose-400 focus-within:ring-2 focus-within:ring-rose-100",
10
+ success: "border-emerald-300 focus-within:border-emerald-400 focus-within:ring-2 focus-within:ring-emerald-100"
11
+ };
12
+ var FIELD_STATUS_RING_DIRECT = {
13
+ default: "border-slate-200 focus:border-brand-blue/50 focus:ring-2 focus:ring-brand-blue/15",
14
+ error: "border-rose-300 focus:border-rose-400 focus:ring-2 focus:ring-rose-100",
15
+ success: "border-emerald-300 focus:border-emerald-400 focus:ring-2 focus:ring-emerald-100"
16
+ };
17
+ /** Helper/error text color */
18
+ var FIELD_HELPER_COLOR = {
19
+ default: "text-slate-400",
20
+ error: "text-rose-500",
21
+ success: "text-emerald-600"
22
+ };
23
+ //#endregion
24
+ exports.FIELD_HELPER_COLOR = FIELD_HELPER_COLOR;
25
+ exports.FIELD_STATUS_RING_DIRECT = FIELD_STATUS_RING_DIRECT;
26
+ exports.FIELD_STATUS_RING_WITHIN = FIELD_STATUS_RING_WITHIN;
27
+
28
+ //# sourceMappingURL=index16.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index16.cjs","names":[],"sources":["../src/ui-library/gallery/shared/fieldStatus.ts"],"sourcesContent":["/**\n * Shared field-status style constants.\n *\n * Used by Input, Textarea, and Select — the three form controls that share\n * an identical status → ring-color and status → helper-text-color mapping.\n *\n * This is an internal utility. It is NOT a public design-system API.\n * Do not import this outside the ui-library/gallery directory.\n */\n\nexport type FieldStatus = 'default' | 'error' | 'success';\n\n/**\n * Border + focus-ring classes for the field wrapper/element.\n * Applied via focus: or focus-within: depending on component structure.\n * Interactive color uses brand-blue per the UHRIS brand identity.\n */\nexport const FIELD_STATUS_RING_WITHIN: Record<FieldStatus, string> = {\n default: 'border-slate-200 focus-within:border-brand-blue/50 focus-within:ring-2 focus-within:ring-brand-blue/15',\n error: 'border-rose-300 focus-within:border-rose-400 focus-within:ring-2 focus-within:ring-rose-100',\n success: 'border-emerald-300 focus-within:border-emerald-400 focus-within:ring-2 focus-within:ring-emerald-100',\n};\n\nexport const FIELD_STATUS_RING_DIRECT: Record<FieldStatus, string> = {\n default: 'border-slate-200 focus:border-brand-blue/50 focus:ring-2 focus:ring-brand-blue/15',\n error: 'border-rose-300 focus:border-rose-400 focus:ring-2 focus:ring-rose-100',\n success: 'border-emerald-300 focus:border-emerald-400 focus:ring-2 focus:ring-emerald-100',\n};\n\n/** Helper/error text color */\nexport const FIELD_HELPER_COLOR: Record<FieldStatus, string> = {\n default: 'text-slate-400',\n error: 'text-rose-500',\n success: 'text-emerald-600',\n};\n"],"mappings":";;;;;;AAiBA,IAAa,2BAAwD;CACnE,SAAS;CACT,OAAS;CACT,SAAS;AACX;AAEA,IAAa,2BAAwD;CACnE,SAAS;CACT,OAAS;CACT,SAAS;AACX;;AAGA,IAAa,qBAAkD;CAC7D,SAAS;CACT,OAAS;CACT,SAAS;AACX"}
@@ -0,0 +1,26 @@
1
+ //#region src/ui-library/gallery/shared/fieldStatus.ts
2
+ /**
3
+ * Border + focus-ring classes for the field wrapper/element.
4
+ * Applied via focus: or focus-within: depending on component structure.
5
+ * Interactive color uses brand-blue per the UHRIS brand identity.
6
+ */
7
+ var FIELD_STATUS_RING_WITHIN = {
8
+ default: "border-slate-200 focus-within:border-brand-blue/50 focus-within:ring-2 focus-within:ring-brand-blue/15",
9
+ error: "border-rose-300 focus-within:border-rose-400 focus-within:ring-2 focus-within:ring-rose-100",
10
+ success: "border-emerald-300 focus-within:border-emerald-400 focus-within:ring-2 focus-within:ring-emerald-100"
11
+ };
12
+ var FIELD_STATUS_RING_DIRECT = {
13
+ default: "border-slate-200 focus:border-brand-blue/50 focus:ring-2 focus:ring-brand-blue/15",
14
+ error: "border-rose-300 focus:border-rose-400 focus:ring-2 focus:ring-rose-100",
15
+ success: "border-emerald-300 focus:border-emerald-400 focus:ring-2 focus:ring-emerald-100"
16
+ };
17
+ /** Helper/error text color */
18
+ var FIELD_HELPER_COLOR = {
19
+ default: "text-slate-400",
20
+ error: "text-rose-500",
21
+ success: "text-emerald-600"
22
+ };
23
+ //#endregion
24
+ export { FIELD_HELPER_COLOR, FIELD_STATUS_RING_DIRECT, FIELD_STATUS_RING_WITHIN };
25
+
26
+ //# sourceMappingURL=index16.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index16.mjs","names":[],"sources":["../src/ui-library/gallery/shared/fieldStatus.ts"],"sourcesContent":["/**\n * Shared field-status style constants.\n *\n * Used by Input, Textarea, and Select — the three form controls that share\n * an identical status → ring-color and status → helper-text-color mapping.\n *\n * This is an internal utility. It is NOT a public design-system API.\n * Do not import this outside the ui-library/gallery directory.\n */\n\nexport type FieldStatus = 'default' | 'error' | 'success';\n\n/**\n * Border + focus-ring classes for the field wrapper/element.\n * Applied via focus: or focus-within: depending on component structure.\n * Interactive color uses brand-blue per the UHRIS brand identity.\n */\nexport const FIELD_STATUS_RING_WITHIN: Record<FieldStatus, string> = {\n default: 'border-slate-200 focus-within:border-brand-blue/50 focus-within:ring-2 focus-within:ring-brand-blue/15',\n error: 'border-rose-300 focus-within:border-rose-400 focus-within:ring-2 focus-within:ring-rose-100',\n success: 'border-emerald-300 focus-within:border-emerald-400 focus-within:ring-2 focus-within:ring-emerald-100',\n};\n\nexport const FIELD_STATUS_RING_DIRECT: Record<FieldStatus, string> = {\n default: 'border-slate-200 focus:border-brand-blue/50 focus:ring-2 focus:ring-brand-blue/15',\n error: 'border-rose-300 focus:border-rose-400 focus:ring-2 focus:ring-rose-100',\n success: 'border-emerald-300 focus:border-emerald-400 focus:ring-2 focus:ring-emerald-100',\n};\n\n/** Helper/error text color */\nexport const FIELD_HELPER_COLOR: Record<FieldStatus, string> = {\n default: 'text-slate-400',\n error: 'text-rose-500',\n success: 'text-emerald-600',\n};\n"],"mappings":";;;;;;AAiBA,IAAa,2BAAwD;CACnE,SAAS;CACT,OAAS;CACT,SAAS;AACX;AAEA,IAAa,2BAAwD;CACnE,SAAS;CACT,OAAS;CACT,SAAS;AACX;;AAGA,IAAa,qBAAkD;CAC7D,SAAS;CACT,OAAS;CACT,SAAS;AACX"}
@@ -0,0 +1,43 @@
1
+ const require_fieldStatus = require("./index16.cjs");
2
+ let react_jsx_runtime = require("react/jsx-runtime");
3
+ //#region src/ui-library/gallery/input/Input.tsx
4
+ function Input({ status = "default", helper, prefix, suffix, disabled, className = "", ...props }) {
5
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
6
+ className: "w-full",
7
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
8
+ className: [
9
+ "flex w-full items-center rounded-md border bg-white transition",
10
+ require_fieldStatus.FIELD_STATUS_RING_WITHIN[status],
11
+ disabled ? "cursor-not-allowed bg-slate-50 opacity-60" : "",
12
+ className
13
+ ].filter(Boolean).join(" "),
14
+ children: [
15
+ prefix && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
16
+ className: "flex shrink-0 items-center pl-3.5 text-slate-400",
17
+ children: prefix
18
+ }),
19
+ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
20
+ disabled,
21
+ className: [
22
+ "w-full bg-transparent py-2.5 text-sm font-medium text-slate-900 outline-none placeholder:text-slate-400",
23
+ prefix ? "pl-2" : "pl-4",
24
+ suffix ? "pr-2" : "pr-4",
25
+ disabled ? "cursor-not-allowed" : ""
26
+ ].filter(Boolean).join(" "),
27
+ ...props
28
+ }),
29
+ suffix && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
30
+ className: "flex shrink-0 items-center pr-3.5 text-slate-400",
31
+ children: suffix
32
+ })
33
+ ]
34
+ }), helper && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
35
+ className: `mt-1.5 text-xs font-medium ${require_fieldStatus.FIELD_HELPER_COLOR[status]}`,
36
+ children: helper
37
+ })]
38
+ });
39
+ }
40
+ //#endregion
41
+ exports.Input = Input;
42
+
43
+ //# sourceMappingURL=index17.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index17.cjs","names":[],"sources":["../src/ui-library/gallery/input/Input.tsx"],"sourcesContent":["/**\n * Input — Design System Component\n *\n * A single-line text entry field. Supports prefix/suffix slots,\n * helper text, validation states, and common input types.\n *\n * The label is NOT included in this component. Use a <label> element\n * or the companion <Field> wrapper from the consuming feature.\n * This keeps Input a pure primitive.\n */\n\nimport type { ReactNode } from 'react';\nimport {\n type FieldStatus,\n FIELD_STATUS_RING_WITHIN,\n FIELD_HELPER_COLOR,\n} from '../shared/fieldStatus';\n\nexport type InputStatus = FieldStatus;\n\nexport interface InputProps extends Omit<React.ComponentProps<'input'>, 'prefix' | 'size'> {\n /** Visual validation state */\n status?: InputStatus;\n /** Helper text shown below the input */\n helper?: string;\n /** Element rendered inside the input on the left (e.g. an icon) */\n prefix?: ReactNode;\n /** Element rendered inside the input on the right (e.g. a unit label or clear button) */\n suffix?: ReactNode;\n}\n\n// ── Component ─────────────────────────────────────────────────────────────────\n\nexport function Input({\n status = 'default',\n helper,\n prefix,\n suffix,\n disabled,\n className = '',\n ...props\n}: InputProps) {\n return (\n <div className=\"w-full\">\n {/* Input wrapper — handles focus-ring as a unit so prefix/suffix are inside the ring */}\n <div\n className={[\n 'flex w-full items-center rounded-md border bg-white transition',\n FIELD_STATUS_RING_WITHIN[status],\n disabled ? 'cursor-not-allowed bg-slate-50 opacity-60' : '',\n className,\n ]\n .filter(Boolean)\n .join(' ')}\n >\n {prefix && (\n <span className=\"flex shrink-0 items-center pl-3.5 text-slate-400\">\n {prefix}\n </span>\n )}\n <input\n disabled={disabled}\n className={[\n 'w-full bg-transparent py-2.5 text-sm font-medium text-slate-900 outline-none placeholder:text-slate-400',\n prefix ? 'pl-2' : 'pl-4',\n suffix ? 'pr-2' : 'pr-4',\n disabled ? 'cursor-not-allowed' : '',\n ]\n .filter(Boolean)\n .join(' ')}\n {...props}\n />\n {suffix && (\n <span className=\"flex shrink-0 items-center pr-3.5 text-slate-400\">\n {suffix}\n </span>\n )}\n </div>\n\n {/* Helper text */}\n {helper && (\n <p className={`mt-1.5 text-xs font-medium ${FIELD_HELPER_COLOR[status]}`}>\n {helper}\n </p>\n )}\n </div>\n );\n}\n"],"mappings":";;;AAiCA,SAAgB,MAAM,EACpB,SAAS,WACT,QACA,QACA,QACA,UACA,YAAY,IACZ,GAAG,SACU;CACb,OACE,iBAAA,GAAA,kBAAA,KAAA,CAAC,OAAD;EAAK,WAAU;EAAf,UAAA,CAEE,iBAAA,GAAA,kBAAA,KAAA,CAAC,OAAD;GACE,WAAW;IACT;IACA,oBAAA,yBAAyB;IACzB,WAAW,8CAA8C;IACzD;GACF,CAAC,CACE,OAAO,OAAO,CAAC,CACf,KAAK,GAAG;GARb,UAAA;IAUG,UACC,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;KAAM,WAAU;KACb,UAAA;IACG,CAAA;IAER,iBAAA,GAAA,kBAAA,IAAA,CAAC,SAAD;KACY;KACV,WAAW;MACT;MACA,SAAU,SAAS;MACnB,SAAU,SAAS;MACnB,WAAW,uBAAuB;KACpC,CAAC,CACE,OAAO,OAAO,CAAC,CACf,KAAK,GAAG;KACX,GAAI;IACL,CAAA;IACA,UACC,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;KAAM,WAAU;KACb,UAAA;IACG,CAAA;GAEL;EAGJ,CAAA,GAAA,UACC,iBAAA,GAAA,kBAAA,IAAA,CAAC,KAAD;GAAG,WAAW,8BAA8B,oBAAA,mBAAmB;GAC5D,UAAA;EACA,CAAA,CAEF;;AAET"}
@@ -0,0 +1,43 @@
1
+ import { FIELD_HELPER_COLOR, FIELD_STATUS_RING_WITHIN } from "./index16.mjs";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ //#region src/ui-library/gallery/input/Input.tsx
4
+ function Input({ status = "default", helper, prefix, suffix, disabled, className = "", ...props }) {
5
+ return /* @__PURE__ */ jsxs("div", {
6
+ className: "w-full",
7
+ children: [/* @__PURE__ */ jsxs("div", {
8
+ className: [
9
+ "flex w-full items-center rounded-md border bg-white transition",
10
+ FIELD_STATUS_RING_WITHIN[status],
11
+ disabled ? "cursor-not-allowed bg-slate-50 opacity-60" : "",
12
+ className
13
+ ].filter(Boolean).join(" "),
14
+ children: [
15
+ prefix && /* @__PURE__ */ jsx("span", {
16
+ className: "flex shrink-0 items-center pl-3.5 text-slate-400",
17
+ children: prefix
18
+ }),
19
+ /* @__PURE__ */ jsx("input", {
20
+ disabled,
21
+ className: [
22
+ "w-full bg-transparent py-2.5 text-sm font-medium text-slate-900 outline-none placeholder:text-slate-400",
23
+ prefix ? "pl-2" : "pl-4",
24
+ suffix ? "pr-2" : "pr-4",
25
+ disabled ? "cursor-not-allowed" : ""
26
+ ].filter(Boolean).join(" "),
27
+ ...props
28
+ }),
29
+ suffix && /* @__PURE__ */ jsx("span", {
30
+ className: "flex shrink-0 items-center pr-3.5 text-slate-400",
31
+ children: suffix
32
+ })
33
+ ]
34
+ }), helper && /* @__PURE__ */ jsx("p", {
35
+ className: `mt-1.5 text-xs font-medium ${FIELD_HELPER_COLOR[status]}`,
36
+ children: helper
37
+ })]
38
+ });
39
+ }
40
+ //#endregion
41
+ export { Input };
42
+
43
+ //# sourceMappingURL=index17.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index17.mjs","names":[],"sources":["../src/ui-library/gallery/input/Input.tsx"],"sourcesContent":["/**\n * Input — Design System Component\n *\n * A single-line text entry field. Supports prefix/suffix slots,\n * helper text, validation states, and common input types.\n *\n * The label is NOT included in this component. Use a <label> element\n * or the companion <Field> wrapper from the consuming feature.\n * This keeps Input a pure primitive.\n */\n\nimport type { ReactNode } from 'react';\nimport {\n type FieldStatus,\n FIELD_STATUS_RING_WITHIN,\n FIELD_HELPER_COLOR,\n} from '../shared/fieldStatus';\n\nexport type InputStatus = FieldStatus;\n\nexport interface InputProps extends Omit<React.ComponentProps<'input'>, 'prefix' | 'size'> {\n /** Visual validation state */\n status?: InputStatus;\n /** Helper text shown below the input */\n helper?: string;\n /** Element rendered inside the input on the left (e.g. an icon) */\n prefix?: ReactNode;\n /** Element rendered inside the input on the right (e.g. a unit label or clear button) */\n suffix?: ReactNode;\n}\n\n// ── Component ─────────────────────────────────────────────────────────────────\n\nexport function Input({\n status = 'default',\n helper,\n prefix,\n suffix,\n disabled,\n className = '',\n ...props\n}: InputProps) {\n return (\n <div className=\"w-full\">\n {/* Input wrapper — handles focus-ring as a unit so prefix/suffix are inside the ring */}\n <div\n className={[\n 'flex w-full items-center rounded-md border bg-white transition',\n FIELD_STATUS_RING_WITHIN[status],\n disabled ? 'cursor-not-allowed bg-slate-50 opacity-60' : '',\n className,\n ]\n .filter(Boolean)\n .join(' ')}\n >\n {prefix && (\n <span className=\"flex shrink-0 items-center pl-3.5 text-slate-400\">\n {prefix}\n </span>\n )}\n <input\n disabled={disabled}\n className={[\n 'w-full bg-transparent py-2.5 text-sm font-medium text-slate-900 outline-none placeholder:text-slate-400',\n prefix ? 'pl-2' : 'pl-4',\n suffix ? 'pr-2' : 'pr-4',\n disabled ? 'cursor-not-allowed' : '',\n ]\n .filter(Boolean)\n .join(' ')}\n {...props}\n />\n {suffix && (\n <span className=\"flex shrink-0 items-center pr-3.5 text-slate-400\">\n {suffix}\n </span>\n )}\n </div>\n\n {/* Helper text */}\n {helper && (\n <p className={`mt-1.5 text-xs font-medium ${FIELD_HELPER_COLOR[status]}`}>\n {helper}\n </p>\n )}\n </div>\n );\n}\n"],"mappings":";;;AAiCA,SAAgB,MAAM,EACpB,SAAS,WACT,QACA,QACA,QACA,UACA,YAAY,IACZ,GAAG,SACU;CACb,OACE,qBAAC,OAAD;EAAK,WAAU;EAAf,UAAA,CAEE,qBAAC,OAAD;GACE,WAAW;IACT;IACA,yBAAyB;IACzB,WAAW,8CAA8C;IACzD;GACF,CAAC,CACE,OAAO,OAAO,CAAC,CACf,KAAK,GAAG;GARb,UAAA;IAUG,UACC,oBAAC,QAAD;KAAM,WAAU;KACb,UAAA;IACG,CAAA;IAER,oBAAC,SAAD;KACY;KACV,WAAW;MACT;MACA,SAAU,SAAS;MACnB,SAAU,SAAS;MACnB,WAAW,uBAAuB;KACpC,CAAC,CACE,OAAO,OAAO,CAAC,CACf,KAAK,GAAG;KACX,GAAI;IACL,CAAA;IACA,UACC,oBAAC,QAAD;KAAM,WAAU;KACb,UAAA;IACG,CAAA;GAEL;EAGJ,CAAA,GAAA,UACC,oBAAC,KAAD;GAAG,WAAW,8BAA8B,mBAAmB;GAC5D,UAAA;EACA,CAAA,CAEF;;AAET"}
@@ -0,0 +1,59 @@
1
+ const require_fieldStatus = require("./index16.cjs");
2
+ let react_jsx_runtime = require("react/jsx-runtime");
3
+ let react = require("react");
4
+ //#region src/ui-library/gallery/textarea/Textarea.tsx
5
+ /**
6
+ * Textarea — Design System Component
7
+ *
8
+ * A multi-line text entry field. Supports validation states,
9
+ * helper text, character count, and resize behavior.
10
+ */
11
+ var RESIZE_CLASS = {
12
+ none: "resize-none",
13
+ vertical: "resize-y",
14
+ both: "resize"
15
+ };
16
+ function Textarea({ status = "default", helper, maxLength, resize = "vertical", disabled, value, defaultValue, onChange, className = "", ...props }) {
17
+ const isControlled = value !== void 0;
18
+ const [uncontrolledLength, setUncontrolledLength] = (0, react.useState)(typeof defaultValue === "string" ? defaultValue.length : 0);
19
+ const currentLength = isControlled ? typeof value === "string" ? value.length : 0 : uncontrolledLength;
20
+ const handleChange = (e) => {
21
+ if (!isControlled) setUncontrolledLength(e.target.value.length);
22
+ onChange?.(e);
23
+ };
24
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
25
+ className: "w-full",
26
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("textarea", {
27
+ maxLength,
28
+ disabled,
29
+ value,
30
+ defaultValue,
31
+ onChange: handleChange,
32
+ className: [
33
+ "w-full rounded-xl border bg-white px-4 py-3 text-sm font-medium text-slate-900 outline-none transition placeholder:text-slate-400",
34
+ require_fieldStatus.FIELD_STATUS_RING_DIRECT[status],
35
+ RESIZE_CLASS[resize],
36
+ disabled ? "cursor-not-allowed bg-slate-50 opacity-60" : "",
37
+ className
38
+ ].filter(Boolean).join(" "),
39
+ ...props
40
+ }), (helper || maxLength !== void 0) && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
41
+ className: "mt-1.5 flex items-start justify-between gap-2",
42
+ children: [helper ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
43
+ className: `text-xs font-medium ${require_fieldStatus.FIELD_HELPER_COLOR[status]}`,
44
+ children: helper
45
+ }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {}), maxLength !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("p", {
46
+ className: "shrink-0 text-xs font-medium text-slate-400",
47
+ children: [
48
+ currentLength,
49
+ " / ",
50
+ maxLength
51
+ ]
52
+ })]
53
+ })]
54
+ });
55
+ }
56
+ //#endregion
57
+ exports.Textarea = Textarea;
58
+
59
+ //# sourceMappingURL=index18.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index18.cjs","names":[],"sources":["../src/ui-library/gallery/textarea/Textarea.tsx"],"sourcesContent":["/**\n * Textarea — Design System Component\n *\n * A multi-line text entry field. Supports validation states,\n * helper text, character count, and resize behavior.\n */\n\nimport { useState } from 'react';\nimport {\n type FieldStatus,\n FIELD_STATUS_RING_DIRECT,\n FIELD_HELPER_COLOR,\n} from '../shared/fieldStatus';\n\nexport type TextareaStatus = FieldStatus;\nexport type TextareaResize = 'none' | 'vertical' | 'both';\n\nexport interface TextareaProps extends Omit<React.ComponentProps<'textarea'>, 'size'> {\n status?: TextareaStatus;\n helper?: string;\n /** Show a character count: \"n / max\" */\n maxLength?: number;\n resize?: TextareaResize;\n}\n\nconst RESIZE_CLASS: Record<TextareaResize, string> = {\n none: 'resize-none',\n vertical: 'resize-y',\n both: 'resize',\n};\n\nexport function Textarea({\n status = 'default',\n helper,\n maxLength,\n resize = 'vertical',\n disabled,\n value,\n defaultValue,\n onChange,\n className = '',\n ...props\n}: TextareaProps) {\n // Track character count for both controlled and uncontrolled modes.\n // For controlled, derive from value. For uncontrolled, maintain local state.\n const isControlled = value !== undefined;\n const [uncontrolledLength, setUncontrolledLength] = useState(\n typeof defaultValue === 'string' ? defaultValue.length : 0,\n );\n const currentLength = isControlled\n ? (typeof value === 'string' ? value.length : 0)\n : uncontrolledLength;\n\n const handleChange = (e: React.ChangeEvent<HTMLTextAreaElement>) => {\n if (!isControlled) setUncontrolledLength(e.target.value.length);\n onChange?.(e);\n };\n\n return (\n <div className=\"w-full\">\n <textarea\n maxLength={maxLength}\n disabled={disabled}\n value={value}\n defaultValue={defaultValue}\n onChange={handleChange}\n className={[\n 'w-full rounded-xl border bg-white px-4 py-3 text-sm font-medium text-slate-900 outline-none transition placeholder:text-slate-400',\n FIELD_STATUS_RING_DIRECT[status],\n RESIZE_CLASS[resize],\n disabled ? 'cursor-not-allowed bg-slate-50 opacity-60' : '',\n className,\n ]\n .filter(Boolean)\n .join(' ')}\n {...props}\n />\n\n {/* Footer row: helper text + char count */}\n {(helper || maxLength !== undefined) && (\n <div className=\"mt-1.5 flex items-start justify-between gap-2\">\n {helper ? (\n <p className={`text-xs font-medium ${FIELD_HELPER_COLOR[status]}`}>{helper}</p>\n ) : (\n <span />\n )}\n {maxLength !== undefined && (\n <p className=\"shrink-0 text-xs font-medium text-slate-400\">\n {currentLength} / {maxLength}\n </p>\n )}\n </div>\n )}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;AAyBA,IAAM,eAA+C;CACnD,MAAU;CACV,UAAU;CACV,MAAU;AACZ;AAEA,SAAgB,SAAS,EACvB,SAAS,WACT,QACA,WACA,SAAS,YACT,UACA,OACA,cACA,UACA,YAAY,IACZ,GAAG,SACa;CAGhB,MAAM,eAAe,UAAU,KAAA;CAC/B,MAAM,CAAC,oBAAoB,0BAAA,GAAyB,MAAA,SAAA,CAClD,OAAO,iBAAiB,WAAW,aAAa,SAAS,CAC3D;CACA,MAAM,gBAAgB,eACjB,OAAO,UAAU,WAAW,MAAM,SAAS,IAC5C;CAEJ,MAAM,gBAAgB,MAA8C;EAClE,IAAI,CAAC,cAAc,sBAAsB,EAAE,OAAO,MAAM,MAAM;EAC9D,WAAW,CAAC;CACd;CAEA,OACE,iBAAA,GAAA,kBAAA,KAAA,CAAC,OAAD;EAAK,WAAU;EAAf,UAAA,CACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,YAAD;GACa;GACD;GACH;GACO;GACd,UAAU;GACV,WAAW;IACT;IACA,oBAAA,yBAAyB;IACzB,aAAa;IACb,WAAW,8CAA8C;IACzD;GACF,CAAC,CACE,OAAO,OAAO,CAAC,CACf,KAAK,GAAG;GACX,GAAI;EACL,CAAA,IAGC,UAAU,cAAc,KAAA,MACxB,iBAAA,GAAA,kBAAA,KAAA,CAAC,OAAD;GAAK,WAAU;GAAf,UAAA,CACG,SACC,iBAAA,GAAA,kBAAA,IAAA,CAAC,KAAD;IAAG,WAAW,uBAAuB,oBAAA,mBAAmB;IAAY,UAAA;GAAU,CAAA,IAE9E,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD,CAAO,CAAA,GAER,cAAc,KAAA,KACb,iBAAA,GAAA,kBAAA,KAAA,CAAC,KAAD;IAAG,WAAU;IAAb,UAAA;KACG;KAAc;KAAI;IAClB;GAEF,CAAA,CAAA;EAEJ,CAAA,CAAA;;AAET"}
@@ -0,0 +1,59 @@
1
+ import { FIELD_HELPER_COLOR, FIELD_STATUS_RING_DIRECT } from "./index16.mjs";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import { useState } from "react";
4
+ //#region src/ui-library/gallery/textarea/Textarea.tsx
5
+ /**
6
+ * Textarea — Design System Component
7
+ *
8
+ * A multi-line text entry field. Supports validation states,
9
+ * helper text, character count, and resize behavior.
10
+ */
11
+ var RESIZE_CLASS = {
12
+ none: "resize-none",
13
+ vertical: "resize-y",
14
+ both: "resize"
15
+ };
16
+ function Textarea({ status = "default", helper, maxLength, resize = "vertical", disabled, value, defaultValue, onChange, className = "", ...props }) {
17
+ const isControlled = value !== void 0;
18
+ const [uncontrolledLength, setUncontrolledLength] = useState(typeof defaultValue === "string" ? defaultValue.length : 0);
19
+ const currentLength = isControlled ? typeof value === "string" ? value.length : 0 : uncontrolledLength;
20
+ const handleChange = (e) => {
21
+ if (!isControlled) setUncontrolledLength(e.target.value.length);
22
+ onChange?.(e);
23
+ };
24
+ return /* @__PURE__ */ jsxs("div", {
25
+ className: "w-full",
26
+ children: [/* @__PURE__ */ jsx("textarea", {
27
+ maxLength,
28
+ disabled,
29
+ value,
30
+ defaultValue,
31
+ onChange: handleChange,
32
+ className: [
33
+ "w-full rounded-xl border bg-white px-4 py-3 text-sm font-medium text-slate-900 outline-none transition placeholder:text-slate-400",
34
+ FIELD_STATUS_RING_DIRECT[status],
35
+ RESIZE_CLASS[resize],
36
+ disabled ? "cursor-not-allowed bg-slate-50 opacity-60" : "",
37
+ className
38
+ ].filter(Boolean).join(" "),
39
+ ...props
40
+ }), (helper || maxLength !== void 0) && /* @__PURE__ */ jsxs("div", {
41
+ className: "mt-1.5 flex items-start justify-between gap-2",
42
+ children: [helper ? /* @__PURE__ */ jsx("p", {
43
+ className: `text-xs font-medium ${FIELD_HELPER_COLOR[status]}`,
44
+ children: helper
45
+ }) : /* @__PURE__ */ jsx("span", {}), maxLength !== void 0 && /* @__PURE__ */ jsxs("p", {
46
+ className: "shrink-0 text-xs font-medium text-slate-400",
47
+ children: [
48
+ currentLength,
49
+ " / ",
50
+ maxLength
51
+ ]
52
+ })]
53
+ })]
54
+ });
55
+ }
56
+ //#endregion
57
+ export { Textarea };
58
+
59
+ //# sourceMappingURL=index18.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index18.mjs","names":[],"sources":["../src/ui-library/gallery/textarea/Textarea.tsx"],"sourcesContent":["/**\n * Textarea — Design System Component\n *\n * A multi-line text entry field. Supports validation states,\n * helper text, character count, and resize behavior.\n */\n\nimport { useState } from 'react';\nimport {\n type FieldStatus,\n FIELD_STATUS_RING_DIRECT,\n FIELD_HELPER_COLOR,\n} from '../shared/fieldStatus';\n\nexport type TextareaStatus = FieldStatus;\nexport type TextareaResize = 'none' | 'vertical' | 'both';\n\nexport interface TextareaProps extends Omit<React.ComponentProps<'textarea'>, 'size'> {\n status?: TextareaStatus;\n helper?: string;\n /** Show a character count: \"n / max\" */\n maxLength?: number;\n resize?: TextareaResize;\n}\n\nconst RESIZE_CLASS: Record<TextareaResize, string> = {\n none: 'resize-none',\n vertical: 'resize-y',\n both: 'resize',\n};\n\nexport function Textarea({\n status = 'default',\n helper,\n maxLength,\n resize = 'vertical',\n disabled,\n value,\n defaultValue,\n onChange,\n className = '',\n ...props\n}: TextareaProps) {\n // Track character count for both controlled and uncontrolled modes.\n // For controlled, derive from value. For uncontrolled, maintain local state.\n const isControlled = value !== undefined;\n const [uncontrolledLength, setUncontrolledLength] = useState(\n typeof defaultValue === 'string' ? defaultValue.length : 0,\n );\n const currentLength = isControlled\n ? (typeof value === 'string' ? value.length : 0)\n : uncontrolledLength;\n\n const handleChange = (e: React.ChangeEvent<HTMLTextAreaElement>) => {\n if (!isControlled) setUncontrolledLength(e.target.value.length);\n onChange?.(e);\n };\n\n return (\n <div className=\"w-full\">\n <textarea\n maxLength={maxLength}\n disabled={disabled}\n value={value}\n defaultValue={defaultValue}\n onChange={handleChange}\n className={[\n 'w-full rounded-xl border bg-white px-4 py-3 text-sm font-medium text-slate-900 outline-none transition placeholder:text-slate-400',\n FIELD_STATUS_RING_DIRECT[status],\n RESIZE_CLASS[resize],\n disabled ? 'cursor-not-allowed bg-slate-50 opacity-60' : '',\n className,\n ]\n .filter(Boolean)\n .join(' ')}\n {...props}\n />\n\n {/* Footer row: helper text + char count */}\n {(helper || maxLength !== undefined) && (\n <div className=\"mt-1.5 flex items-start justify-between gap-2\">\n {helper ? (\n <p className={`text-xs font-medium ${FIELD_HELPER_COLOR[status]}`}>{helper}</p>\n ) : (\n <span />\n )}\n {maxLength !== undefined && (\n <p className=\"shrink-0 text-xs font-medium text-slate-400\">\n {currentLength} / {maxLength}\n </p>\n )}\n </div>\n )}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;AAyBA,IAAM,eAA+C;CACnD,MAAU;CACV,UAAU;CACV,MAAU;AACZ;AAEA,SAAgB,SAAS,EACvB,SAAS,WACT,QACA,WACA,SAAS,YACT,UACA,OACA,cACA,UACA,YAAY,IACZ,GAAG,SACa;CAGhB,MAAM,eAAe,UAAU,KAAA;CAC/B,MAAM,CAAC,oBAAoB,yBAAyB,SAClD,OAAO,iBAAiB,WAAW,aAAa,SAAS,CAC3D;CACA,MAAM,gBAAgB,eACjB,OAAO,UAAU,WAAW,MAAM,SAAS,IAC5C;CAEJ,MAAM,gBAAgB,MAA8C;EAClE,IAAI,CAAC,cAAc,sBAAsB,EAAE,OAAO,MAAM,MAAM;EAC9D,WAAW,CAAC;CACd;CAEA,OACE,qBAAC,OAAD;EAAK,WAAU;EAAf,UAAA,CACE,oBAAC,YAAD;GACa;GACD;GACH;GACO;GACd,UAAU;GACV,WAAW;IACT;IACA,yBAAyB;IACzB,aAAa;IACb,WAAW,8CAA8C;IACzD;GACF,CAAC,CACE,OAAO,OAAO,CAAC,CACf,KAAK,GAAG;GACX,GAAI;EACL,CAAA,IAGC,UAAU,cAAc,KAAA,MACxB,qBAAC,OAAD;GAAK,WAAU;GAAf,UAAA,CACG,SACC,oBAAC,KAAD;IAAG,WAAW,uBAAuB,mBAAmB;IAAY,UAAA;GAAU,CAAA,IAE9E,oBAAC,QAAD,CAAO,CAAA,GAER,cAAc,KAAA,KACb,qBAAC,KAAD;IAAG,WAAU;IAAb,UAAA;KACG;KAAc;KAAI;IAClB;GAEF,CAAA,CAAA;EAEJ,CAAA,CAAA;;AAET"}
@@ -0,0 +1,67 @@
1
+ const require_fieldStatus = require("./index16.cjs");
2
+ let react_jsx_runtime = require("react/jsx-runtime");
3
+ let lucide_react = require("lucide-react");
4
+ //#region src/ui-library/gallery/select/Select.tsx
5
+ /**
6
+ * Select — Design System Component
7
+ *
8
+ * A single-value selection control. Wraps the native <select> element
9
+ * with design-system styling. Accessible by default — keyboard and
10
+ * screen-reader behavior is inherited from the browser.
11
+ *
12
+ * A custom dropdown (non-native) is NOT used here because:
13
+ * - Native <select> provides full keyboard/AT support at zero cost.
14
+ * - Custom dropdowns require significant ARIA authoring to match
15
+ * native behavior, and frequently regress in edge cases.
16
+ * - For searchable/multi-select use cases, use Combobox (Phase 3).
17
+ *
18
+ * The label is NOT included. The consuming feature pairs a <label>.
19
+ */
20
+ function isGroup(item) {
21
+ return "group" in item;
22
+ }
23
+ function Select({ items, placeholder, status = "default", helper, disabled, className = "", ...props }) {
24
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
25
+ className: "w-full",
26
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
27
+ className: "relative",
28
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("select", {
29
+ disabled,
30
+ className: [
31
+ "w-full appearance-none rounded-md border bg-white py-2.5 pl-4 pr-10 text-sm font-medium text-slate-900 outline-none transition",
32
+ require_fieldStatus.FIELD_STATUS_RING_DIRECT[status],
33
+ disabled ? "cursor-not-allowed bg-slate-50 opacity-60" : "cursor-pointer",
34
+ className
35
+ ].filter(Boolean).join(" "),
36
+ ...props,
37
+ children: [placeholder && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
38
+ value: "",
39
+ disabled: true,
40
+ children: placeholder
41
+ }), items.map((item) => isGroup(item) ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("optgroup", {
42
+ label: item.group,
43
+ children: item.options.map((opt) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
44
+ value: opt.value,
45
+ disabled: opt.disabled,
46
+ children: opt.label
47
+ }, opt.value))
48
+ }, item.group) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
49
+ value: item.value,
50
+ disabled: item.disabled,
51
+ children: item.label
52
+ }, item.value))]
53
+ }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
54
+ className: "pointer-events-none absolute right-3.5 top-1/2 -translate-y-1/2 text-slate-400",
55
+ "aria-hidden": "true",
56
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.ChevronDown, { size: 14 })
57
+ })]
58
+ }), helper && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
59
+ className: `mt-1.5 text-xs font-medium ${require_fieldStatus.FIELD_HELPER_COLOR[status]}`,
60
+ children: helper
61
+ })]
62
+ });
63
+ }
64
+ //#endregion
65
+ exports.Select = Select;
66
+
67
+ //# sourceMappingURL=index19.cjs.map