@ensi-platform/admin-ui 0.5.0 → 0.6.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 (296) hide show
  1. package/dist/Component-CBWeJZfB.js +92 -0
  2. package/dist/Component-CBWeJZfB.js.map +1 -0
  3. package/dist/Component-DFwWbzFS.js +128 -0
  4. package/dist/Component-DFwWbzFS.js.map +1 -0
  5. package/dist/{Component-Bk0VFhAQ.js → Component-DhhrZEMr.js} +2 -2
  6. package/dist/{Component-Bk0VFhAQ.js.map → Component-DhhrZEMr.js.map} +1 -1
  7. package/dist/Component-Dkvzqo0L.js +155 -0
  8. package/dist/Component-Dkvzqo0L.js.map +1 -0
  9. package/dist/action-popup/index.js +1 -1
  10. package/dist/arrangement-settings/index.js +1 -1
  11. package/dist/assets/Component16.css +1 -1
  12. package/dist/assets/Component5.css +1 -1
  13. package/dist/assets/Component7.css +1 -1
  14. package/dist/assets/Component9.css +1 -1
  15. package/dist/assets/index.css +1 -1
  16. package/dist/assets/index17.css +1 -1
  17. package/dist/assets/index26.css +1 -1
  18. package/dist/assets/index27.css +1 -1
  19. package/dist/autocomplete/index.js +1 -1
  20. package/dist/autocomplete-async/index.js +1 -1
  21. package/dist/button/Component.d.ts +1 -1
  22. package/dist/button/Component.d.ts.map +1 -1
  23. package/dist/button/index.js +1 -1
  24. package/dist/button/theme.d.ts +1 -0
  25. package/dist/button/theme.d.ts.map +1 -1
  26. package/dist/button/types.d.ts +2 -0
  27. package/dist/button/types.d.ts.map +1 -1
  28. package/dist/checkbox/index.js +1 -1
  29. package/dist/checkbox-group/index.js +1 -1
  30. package/dist/data-table/index.js +1 -1
  31. package/dist/date-picker/index.js +1 -1
  32. package/dist/date-range-picker/index.js +1 -1
  33. package/dist/form/Component.d.ts +1 -1
  34. package/dist/form/Component.d.ts.map +1 -1
  35. package/dist/form/context.d.ts +3 -1
  36. package/dist/form/context.d.ts.map +1 -1
  37. package/dist/form/hooks/useFieldHook.d.ts +2 -1
  38. package/dist/form/hooks/useFieldHook.d.ts.map +1 -1
  39. package/dist/form/index.js +84 -74
  40. package/dist/form/index.js.map +1 -1
  41. package/dist/form/types.d.ts +15 -2
  42. package/dist/form/types.d.ts.map +1 -1
  43. package/dist/form/utils.d.ts +3 -0
  44. package/dist/form/utils.d.ts.map +1 -1
  45. package/dist/input/Component.d.ts +1 -1
  46. package/dist/input/Component.d.ts.map +1 -1
  47. package/dist/input/FormInput.d.ts +1 -1
  48. package/dist/input/FormInput.d.ts.map +1 -1
  49. package/dist/input/index.js +27 -25
  50. package/dist/input/index.js.map +1 -1
  51. package/dist/input/types.d.ts +5 -1
  52. package/dist/input/types.d.ts.map +1 -1
  53. package/dist/multi-autocomplete/index.js +1 -1
  54. package/dist/multi-autocomplete-async/index.js +1 -1
  55. package/dist/multi-select/index.js +1 -1
  56. package/dist/number-input/Component.d.ts +1 -1
  57. package/dist/number-input/Component.d.ts.map +1 -1
  58. package/dist/number-input/FormNumberInput.d.ts +1 -1
  59. package/dist/number-input/FormNumberInput.d.ts.map +1 -1
  60. package/dist/number-input/index.js +41 -39
  61. package/dist/number-input/index.js.map +1 -1
  62. package/dist/number-input/types.d.ts +5 -1
  63. package/dist/number-input/types.d.ts.map +1 -1
  64. package/dist/number-range/index.js +2 -2
  65. package/dist/select/index.js +1 -1
  66. package/dist/slider/index.js +1 -1
  67. package/dist/suggest-checklist/index.js +1 -1
  68. package/dist/switch/index.js +1 -1
  69. package/dist/table/index.js +1 -1
  70. package/dist/textarea/Component.d.ts +1 -1
  71. package/dist/textarea/Component.d.ts.map +1 -1
  72. package/dist/textarea/FormTextArea.d.ts +1 -1
  73. package/dist/textarea/FormTextArea.d.ts.map +1 -1
  74. package/dist/textarea/index.js +91 -86
  75. package/dist/textarea/index.js.map +1 -1
  76. package/dist/textarea/types.d.ts +5 -1
  77. package/dist/textarea/types.d.ts.map +1 -1
  78. package/dist/time-field/index.js +1 -1
  79. package/dist/useFieldHook-Bt9nST7g.js +52 -0
  80. package/dist/useFieldHook-Bt9nST7g.js.map +1 -0
  81. package/docs/README.md +3 -4
  82. package/docs/ai.md +42 -28
  83. package/docs/architecture.md +23 -23
  84. package/docs/design-language.md +103 -0
  85. package/docs/skills/SKILL.md +64 -25
  86. package/package.json +10 -6
  87. package/scripts/sync-agents-consumer.ts +2 -1
  88. package/src/button/docs/{Description.en.md → Description.md} +1 -0
  89. package/src/button/types.ts +2 -0
  90. package/src/cascade-menu/docs/cssVariables.ts +2 -1
  91. package/src/combobox/docs/Description.md +27 -0
  92. package/src/combobox/docs/Example.md +11 -0
  93. package/src/docs/ai/Description.md +60 -0
  94. package/src/docs/getting-started/Description.md +81 -0
  95. package/src/ds/tokens/docs/Description.md +30 -0
  96. package/src/ds/typography/docs/{Description.en.md → Description.md} +3 -3
  97. package/src/form/docs/{Description.en.md → Description.md} +2 -1
  98. package/src/form/types.ts +18 -3
  99. package/src/hooks/docs/Description.md +30 -0
  100. package/src/hooks/docs/Example.md +9 -0
  101. package/src/icons/docs/Description.md +23 -0
  102. package/src/icons/docs/Example.md +5 -0
  103. package/src/input/docs/{Description.en.md → Description.md} +3 -1
  104. package/src/input/docs/cssVariables.ts +1 -0
  105. package/src/input/types.ts +5 -1
  106. package/src/link/docs/cssVariables.ts +1 -1
  107. package/src/number-input/docs/{Description.en.md → Description.md} +3 -1
  108. package/src/number-input/docs/cssVariables.ts +1 -0
  109. package/src/number-input/types.ts +5 -0
  110. package/src/table/docs/cssVariables.ts +3 -3
  111. package/src/tabs/docs/{Description.en.md → Description.md} +17 -0
  112. package/src/textarea/docs/{Description.en.md → Description.md} +3 -1
  113. package/src/textarea/docs/cssVariables.ts +1 -0
  114. package/src/textarea/types.ts +5 -1
  115. package/src/toast/docs/cssVariables.ts +1 -1
  116. package/src/tooltip/docs/cssVariables.ts +2 -2
  117. package/dist/Component-BBFBVrTt.js +0 -152
  118. package/dist/Component-BBFBVrTt.js.map +0 -1
  119. package/dist/Component-C4pVS7OW.js +0 -125
  120. package/dist/Component-C4pVS7OW.js.map +0 -1
  121. package/dist/Component-VS3iDpxE.js +0 -85
  122. package/dist/Component-VS3iDpxE.js.map +0 -1
  123. package/dist/utils-CizYZV2a.js +0 -50
  124. package/dist/utils-CizYZV2a.js.map +0 -1
  125. package/docs/skills/evals/evals.json +0 -23
  126. package/src/action-popup/docs/Description.ru.md +0 -40
  127. package/src/action-popup/docs/Example.ru.md +0 -14
  128. package/src/active-filters/docs/Description.ru.md +0 -49
  129. package/src/active-filters/docs/Example.ru.md +0 -15
  130. package/src/arrangement-settings/docs/Description.ru.md +0 -25
  131. package/src/arrangement-settings/docs/Example.ru.md +0 -15
  132. package/src/autocomplete/docs/Description.ru.md +0 -51
  133. package/src/autocomplete/docs/Example.ru.md +0 -17
  134. package/src/autocomplete-async/docs/Description.ru.md +0 -71
  135. package/src/autocomplete-async/docs/Example.ru.md +0 -19
  136. package/src/avatar/docs/Description.ru.md +0 -23
  137. package/src/avatar/docs/Example.ru.md +0 -7
  138. package/src/badge/docs/Description.ru.md +0 -22
  139. package/src/badge/docs/Example.ru.md +0 -8
  140. package/src/bottom-sheet/docs/Description.ru.md +0 -27
  141. package/src/bottom-sheet/docs/Example.ru.md +0 -14
  142. package/src/button/docs/Description.ru.md +0 -24
  143. package/src/button/docs/Example.ru.md +0 -11
  144. package/src/cascade-menu/docs/Description.ru.md +0 -43
  145. package/src/cascade-menu/docs/Example.ru.md +0 -107
  146. package/src/checkbox/docs/Description.ru.md +0 -42
  147. package/src/checkbox/docs/Example.ru.md +0 -13
  148. package/src/checkbox-group/docs/Description.ru.md +0 -39
  149. package/src/checkbox-group/docs/Example.ru.md +0 -17
  150. package/src/context-menu/docs/Description.ru.md +0 -44
  151. package/src/context-menu/docs/Example.ru.md +0 -22
  152. package/src/data-table/docs/Description.ru.md +0 -33
  153. package/src/data-table/docs/Example.ru.md +0 -82
  154. package/src/date-picker/docs/Description.ru.md +0 -43
  155. package/src/date-picker/docs/Example.ru.md +0 -15
  156. package/src/date-range-picker/docs/Description.ru.md +0 -39
  157. package/src/date-range-picker/docs/Example.ru.md +0 -19
  158. package/src/drawer/docs/Description.ru.md +0 -28
  159. package/src/drawer/docs/Example.ru.md +0 -14
  160. package/src/ds/typography/docs/Description.ru.md +0 -35
  161. package/src/field/docs/Description.ru.md +0 -28
  162. package/src/field/docs/Example.ru.md +0 -16
  163. package/src/filters/docs/Description.ru.md +0 -40
  164. package/src/filters/docs/Example.ru.md +0 -21
  165. package/src/form/docs/Description.ru.md +0 -33
  166. package/src/form/docs/Example.ru.md +0 -18
  167. package/src/input/docs/Description.ru.md +0 -41
  168. package/src/input/docs/Example.ru.md +0 -21
  169. package/src/link/docs/Description.ru.md +0 -21
  170. package/src/link/docs/Example.ru.md +0 -16
  171. package/src/loader/docs/Description.ru.md +0 -21
  172. package/src/loader/docs/Example.ru.md +0 -10
  173. package/src/menu-list/docs/Description.ru.md +0 -45
  174. package/src/menu-list/docs/Example.ru.md +0 -14
  175. package/src/modal/docs/Description.ru.md +0 -25
  176. package/src/modal/docs/Example.ru.md +0 -15
  177. package/src/modal-hub/docs/Description.ru.md +0 -35
  178. package/src/modal-hub/docs/Example.ru.md +0 -20
  179. package/src/multi-autocomplete/docs/Description.ru.md +0 -52
  180. package/src/multi-autocomplete/docs/Example.ru.md +0 -12
  181. package/src/multi-autocomplete-async/docs/Description.ru.md +0 -55
  182. package/src/multi-autocomplete-async/docs/Example.ru.md +0 -5
  183. package/src/multi-select/docs/Description.ru.md +0 -46
  184. package/src/multi-select/docs/Example.ru.md +0 -20
  185. package/src/number-input/docs/Description.ru.md +0 -46
  186. package/src/number-input/docs/Example.ru.md +0 -19
  187. package/src/number-range/docs/Description.ru.md +0 -49
  188. package/src/number-range/docs/Example.ru.md +0 -25
  189. package/src/popover/docs/Description.ru.md +0 -33
  190. package/src/popover/docs/Example.ru.md +0 -13
  191. package/src/provider/docs/Description.ru.md +0 -27
  192. package/src/provider/docs/Example.ru.md +0 -10
  193. package/src/select/docs/Description.ru.md +0 -46
  194. package/src/select/docs/Example.ru.md +0 -20
  195. package/src/slider/docs/Description.ru.md +0 -45
  196. package/src/slider/docs/Example.ru.md +0 -17
  197. package/src/suggest-checklist/docs/Description.ru.md +0 -26
  198. package/src/suggest-checklist/docs/Example.ru.md +0 -11
  199. package/src/switch/docs/Description.ru.md +0 -39
  200. package/src/switch/docs/Example.ru.md +0 -13
  201. package/src/table/docs/Description.ru.md +0 -32
  202. package/src/table/docs/Example.ru.md +0 -67
  203. package/src/tabs/docs/Description.ru.md +0 -24
  204. package/src/tabs/docs/Example.ru.md +0 -12
  205. package/src/tag/docs/Description.ru.md +0 -24
  206. package/src/tag/docs/Example.ru.md +0 -6
  207. package/src/textarea/docs/Description.ru.md +0 -40
  208. package/src/textarea/docs/Example.ru.md +0 -21
  209. package/src/time-field/docs/Description.ru.md +0 -41
  210. package/src/time-field/docs/Example.ru.md +0 -9
  211. package/src/toast/docs/Description.ru.md +0 -57
  212. package/src/toast/docs/Example.ru.md +0 -25
  213. package/src/tooltip/docs/Description.ru.md +0 -34
  214. package/src/tooltip/docs/Example.ru.md +0 -10
  215. /package/src/action-popup/docs/{Description.en.md → Description.md} +0 -0
  216. /package/src/action-popup/docs/{Example.en.md → Example.md} +0 -0
  217. /package/src/active-filters/docs/{Description.en.md → Description.md} +0 -0
  218. /package/src/active-filters/docs/{Example.en.md → Example.md} +0 -0
  219. /package/src/arrangement-settings/docs/{Description.en.md → Description.md} +0 -0
  220. /package/src/arrangement-settings/docs/{Example.en.md → Example.md} +0 -0
  221. /package/src/autocomplete/docs/{Description.en.md → Description.md} +0 -0
  222. /package/src/autocomplete/docs/{Example.en.md → Example.md} +0 -0
  223. /package/src/autocomplete-async/docs/{Description.en.md → Description.md} +0 -0
  224. /package/src/autocomplete-async/docs/{Example.en.md → Example.md} +0 -0
  225. /package/src/avatar/docs/{Description.en.md → Description.md} +0 -0
  226. /package/src/avatar/docs/{Example.en.md → Example.md} +0 -0
  227. /package/src/badge/docs/{Description.en.md → Description.md} +0 -0
  228. /package/src/badge/docs/{Example.en.md → Example.md} +0 -0
  229. /package/src/bottom-sheet/docs/{Description.en.md → Description.md} +0 -0
  230. /package/src/bottom-sheet/docs/{Example.en.md → Example.md} +0 -0
  231. /package/src/button/docs/{Example.en.md → Example.md} +0 -0
  232. /package/src/cascade-menu/docs/{Description.en.md → Description.md} +0 -0
  233. /package/src/cascade-menu/docs/{Example.en.md → Example.md} +0 -0
  234. /package/src/checkbox/docs/{Description.en.md → Description.md} +0 -0
  235. /package/src/checkbox/docs/{Example.en.md → Example.md} +0 -0
  236. /package/src/checkbox-group/docs/{Description.en.md → Description.md} +0 -0
  237. /package/src/checkbox-group/docs/{Example.en.md → Example.md} +0 -0
  238. /package/src/context-menu/docs/{Description.en.md → Description.md} +0 -0
  239. /package/src/context-menu/docs/{Example.en.md → Example.md} +0 -0
  240. /package/src/data-table/docs/{Description.en.md → Description.md} +0 -0
  241. /package/src/data-table/docs/{Example.en.md → Example.md} +0 -0
  242. /package/src/date-picker/docs/{Description.en.md → Description.md} +0 -0
  243. /package/src/date-picker/docs/{Example.en.md → Example.md} +0 -0
  244. /package/src/date-range-picker/docs/{Description.en.md → Description.md} +0 -0
  245. /package/src/date-range-picker/docs/{Example.en.md → Example.md} +0 -0
  246. /package/src/drawer/docs/{Description.en.md → Description.md} +0 -0
  247. /package/src/drawer/docs/{Example.en.md → Example.md} +0 -0
  248. /package/src/field/docs/{Description.en.md → Description.md} +0 -0
  249. /package/src/field/docs/{Example.en.md → Example.md} +0 -0
  250. /package/src/filters/docs/{Description.en.md → Description.md} +0 -0
  251. /package/src/filters/docs/{Example.en.md → Example.md} +0 -0
  252. /package/src/form/docs/{Example.en.md → Example.md} +0 -0
  253. /package/src/input/docs/{Example.en.md → Example.md} +0 -0
  254. /package/src/link/docs/{Description.en.md → Description.md} +0 -0
  255. /package/src/link/docs/{Example.en.md → Example.md} +0 -0
  256. /package/src/loader/docs/{Description.en.md → Description.md} +0 -0
  257. /package/src/loader/docs/{Example.en.md → Example.md} +0 -0
  258. /package/src/menu-list/docs/{Description.en.md → Description.md} +0 -0
  259. /package/src/menu-list/docs/{Example.en.md → Example.md} +0 -0
  260. /package/src/modal/docs/{Description.en.md → Description.md} +0 -0
  261. /package/src/modal/docs/{Example.en.md → Example.md} +0 -0
  262. /package/src/modal-hub/docs/{Description.en.md → Description.md} +0 -0
  263. /package/src/modal-hub/docs/{Example.en.md → Example.md} +0 -0
  264. /package/src/multi-autocomplete/docs/{Description.en.md → Description.md} +0 -0
  265. /package/src/multi-autocomplete/docs/{Example.en.md → Example.md} +0 -0
  266. /package/src/multi-autocomplete-async/docs/{Description.en.md → Description.md} +0 -0
  267. /package/src/multi-autocomplete-async/docs/{Example.en.md → Example.md} +0 -0
  268. /package/src/multi-select/docs/{Description.en.md → Description.md} +0 -0
  269. /package/src/multi-select/docs/{Example.en.md → Example.md} +0 -0
  270. /package/src/number-input/docs/{Example.en.md → Example.md} +0 -0
  271. /package/src/number-range/docs/{Description.en.md → Description.md} +0 -0
  272. /package/src/number-range/docs/{Example.en.md → Example.md} +0 -0
  273. /package/src/popover/docs/{Description.en.md → Description.md} +0 -0
  274. /package/src/popover/docs/{Example.en.md → Example.md} +0 -0
  275. /package/src/provider/docs/{Description.en.md → Description.md} +0 -0
  276. /package/src/provider/docs/{Example.en.md → Example.md} +0 -0
  277. /package/src/select/docs/{Description.en.md → Description.md} +0 -0
  278. /package/src/select/docs/{Example.en.md → Example.md} +0 -0
  279. /package/src/slider/docs/{Description.en.md → Description.md} +0 -0
  280. /package/src/slider/docs/{Example.en.md → Example.md} +0 -0
  281. /package/src/suggest-checklist/docs/{Description.en.md → Description.md} +0 -0
  282. /package/src/suggest-checklist/docs/{Example.en.md → Example.md} +0 -0
  283. /package/src/switch/docs/{Description.en.md → Description.md} +0 -0
  284. /package/src/switch/docs/{Example.en.md → Example.md} +0 -0
  285. /package/src/table/docs/{Description.en.md → Description.md} +0 -0
  286. /package/src/table/docs/{Example.en.md → Example.md} +0 -0
  287. /package/src/tabs/docs/{Example.en.md → Example.md} +0 -0
  288. /package/src/tag/docs/{Description.en.md → Description.md} +0 -0
  289. /package/src/tag/docs/{Example.en.md → Example.md} +0 -0
  290. /package/src/textarea/docs/{Example.en.md → Example.md} +0 -0
  291. /package/src/time-field/docs/{Description.en.md → Description.md} +0 -0
  292. /package/src/time-field/docs/{Example.en.md → Example.md} +0 -0
  293. /package/src/toast/docs/{Description.en.md → Description.md} +0 -0
  294. /package/src/toast/docs/{Example.en.md → Example.md} +0 -0
  295. /package/src/tooltip/docs/{Description.en.md → Description.md} +0 -0
  296. /package/src/tooltip/docs/{Example.en.md → Example.md} +0 -0
@@ -1,45 +1,47 @@
1
- import { I as v } from "../Component-C4pVS7OW.js";
2
- import { jsxs as H, jsx as r } from "react/jsx-runtime";
1
+ import { I as x } from "../Component-DFwWbzFS.js";
2
+ import { jsxs as B, jsx as r } from "react/jsx-runtime";
3
3
  import "react";
4
- import { s as b } from "../index-h8z54aFR.js";
5
- import { F as s, u as x } from "../Component-BPN5FgKq.js";
6
- import { u as B, g as C } from "../utils-CizYZV2a.js";
7
- const P = b((t) => {
8
- const { controlProps: o, size: e, invalid: i, disabled: n } = x();
9
- return /* @__PURE__ */ r(v, { ...o, size: e, invalid: i, disabled: n, ...t });
10
- }), j = ({
11
- name: t,
4
+ import { s as C } from "../index-h8z54aFR.js";
5
+ import { F as s, u as O } from "../Component-BPN5FgKq.js";
6
+ import { u as P, g as j } from "../useFieldHook-Bt9nST7g.js";
7
+ const D = C((i) => {
8
+ const { controlProps: o, size: e, invalid: l, disabled: n } = O();
9
+ return /* @__PURE__ */ r(x, { ...i, ...o, size: e, invalid: l, disabled: n });
10
+ }), E = ({
11
+ name: i,
12
12
  label: o,
13
13
  hint: e,
14
- size: i = "md",
14
+ size: l = "md",
15
15
  block: n = !0,
16
- disabled: p,
17
- className: m,
16
+ disabled: m,
17
+ readOnly: d,
18
+ className: p,
18
19
  dataTestId: f,
19
20
  ...c
20
21
  }) => {
21
- const { field: a, fieldState: F, inputProps: d, onChangeHandler: h, onBlurHandler: I } = B({ name: t }), u = C(F.error)?.message, g = p ?? d.disabled;
22
- return /* @__PURE__ */ H(
22
+ const { field: a, fieldState: h, inputProps: F, onChangeHandler: v, onBlurHandler: I } = P({ name: i }), { disabled: g, readOnly: b, ...y } = F, u = j(h.error)?.message, H = m ?? g, R = d !== void 0 ? d : b;
23
+ return /* @__PURE__ */ B(
23
24
  s,
24
25
  {
25
26
  invalid: !!u,
26
- disabled: g,
27
- size: i,
27
+ disabled: H,
28
+ size: l,
28
29
  block: n,
29
- className: m,
30
+ className: p,
30
31
  dataTestId: f,
31
32
  children: [
32
33
  o ? /* @__PURE__ */ r(s.Label, { children: o }) : null,
33
34
  /* @__PURE__ */ r(
34
- P,
35
+ D,
35
36
  {
36
37
  ...c,
37
- ...d,
38
+ ...y,
39
+ readOnly: R || void 0,
38
40
  block: n,
39
41
  ref: a.ref,
40
42
  value: a.value ?? "",
41
- onChange: (l) => h(l),
42
- onBlur: (l) => I(l)
43
+ onChange: (t) => v(t),
44
+ onBlur: (t) => I(t)
43
45
  }
44
46
  ),
45
47
  e ? /* @__PURE__ */ r(s.Hint, { children: e }) : null,
@@ -48,9 +50,9 @@ const P = b((t) => {
48
50
  }
49
51
  );
50
52
  };
51
- j.displayName = "FormInput";
53
+ E.displayName = "FormInput";
52
54
  export {
53
- j as FormInput,
54
- v as Input
55
+ E as FormInput,
56
+ x as Input
55
57
  };
56
58
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../src/input/FormInput.tsx"],"sourcesContent":["import { type ComponentProps } from 'react';\n\nimport { supportRef } from '@ds/common/support-ref';\n\nimport { Field, useField } from '@/field';\nimport { useFieldHook } from '@/form/hooks/useFieldHook';\nimport { getError } from '@/form/utils';\n\nimport { Input } from './Component';\nimport { type IFormInputProps } from './types';\n\ntype TFormInputControlProps = Omit<ComponentProps<typeof Input>, 'size' | 'invalid' | 'disabled'>;\n\nconst FormInputControl = supportRef((props: TFormInputControlProps) => {\n const { controlProps, size, invalid, disabled } = useField();\n\n return <Input {...controlProps} size={size} invalid={invalid} disabled={disabled} {...props} />;\n});\n\nexport const FormInput = ({\n name,\n label,\n hint,\n size = 'md',\n block = true,\n disabled,\n className,\n dataTestId,\n ...inputProps\n}: IFormInputProps) => {\n const { field, fieldState, inputProps: rhfInputProps, onChangeHandler, onBlurHandler } = useFieldHook({ name });\n const error = getError(fieldState.error)?.message;\n const isDisabled = disabled ?? rhfInputProps.disabled;\n\n return (\n <Field\n invalid={Boolean(error)}\n disabled={isDisabled}\n size={size}\n block={block}\n className={className}\n dataTestId={dataTestId}\n >\n {label ? <Field.Label>{label}</Field.Label> : null}\n <FormInputControl\n {...inputProps}\n {...rhfInputProps}\n block={block}\n ref={field.ref}\n value={field.value ?? ''}\n onChange={e => onChangeHandler(e)}\n onBlur={e => onBlurHandler(e)}\n />\n {hint ? <Field.Hint>{hint}</Field.Hint> : null}\n <Field.Error>{error}</Field.Error>\n </Field>\n );\n};\n\nFormInput.displayName = 'FormInput';\n"],"names":["FormInputControl","supportRef","props","controlProps","size","invalid","disabled","useField","jsx","Input","FormInput","name","label","hint","block","className","dataTestId","inputProps","field","fieldState","rhfInputProps","onChangeHandler","onBlurHandler","useFieldHook","error","getError","isDisabled","jsxs","Field","e"],"mappings":";;;;;;AAaA,MAAMA,IAAmBC,EAAW,CAACC,MAAkC;AACnE,QAAM,EAAE,cAAAC,GAAc,MAAAC,GAAM,SAAAC,GAAS,UAAAC,EAAA,IAAaC,EAAA;AAElD,SAAO,gBAAAC,EAACC,KAAO,GAAGN,GAAc,MAAAC,GAAY,SAAAC,GAAkB,UAAAC,GAAqB,GAAGJ,GAAO;AACjG,CAAC,GAEYQ,IAAY,CAAC;AAAA,EACtB,MAAAC;AAAA,EACA,OAAAC;AAAA,EACA,MAAAC;AAAA,EACA,MAAAT,IAAO;AAAA,EACP,OAAAU,IAAQ;AAAA,EACR,UAAAR;AAAA,EACA,WAAAS;AAAA,EACA,YAAAC;AAAA,EACA,GAAGC;AACP,MAAuB;AACnB,QAAM,EAAE,OAAAC,GAAO,YAAAC,GAAY,YAAYC,GAAe,iBAAAC,GAAiB,eAAAC,MAAkBC,EAAa,EAAE,MAAAZ,GAAM,GACxGa,IAAQC,EAASN,EAAW,KAAK,GAAG,SACpCO,IAAapB,KAAYc,EAAc;AAE7C,SACI,gBAAAO;AAAA,IAACC;AAAA,IAAA;AAAA,MACG,SAAS,EAAQJ;AAAA,MACjB,UAAUE;AAAA,MACV,MAAAtB;AAAA,MACA,OAAAU;AAAA,MACA,WAAAC;AAAA,MACA,YAAAC;AAAA,MAEC,UAAA;AAAA,QAAAJ,IAAQ,gBAAAJ,EAACoB,EAAM,OAAN,EAAa,aAAM,IAAiB;AAAA,QAC9C,gBAAApB;AAAA,UAACR;AAAA,UAAA;AAAA,YACI,GAAGiB;AAAA,YACH,GAAGG;AAAA,YACJ,OAAAN;AAAA,YACA,KAAKI,EAAM;AAAA,YACX,OAAOA,EAAM,SAAS;AAAA,YACtB,UAAU,CAAAW,MAAKR,EAAgBQ,CAAC;AAAA,YAChC,QAAQ,CAAAA,MAAKP,EAAcO,CAAC;AAAA,UAAA;AAAA,QAAA;AAAA,QAE/BhB,IAAO,gBAAAL,EAACoB,EAAM,MAAN,EAAY,aAAK,IAAgB;AAAA,QAC1C,gBAAApB,EAACoB,EAAM,OAAN,EAAa,UAAAJ,EAAA,CAAM;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGhC;AAEAd,EAAU,cAAc;"}
1
+ {"version":3,"file":"index.js","sources":["../../src/input/FormInput.tsx"],"sourcesContent":["import { type ComponentProps } from 'react';\n\nimport { supportRef } from '@ds/common/support-ref';\n\nimport { Field, useField } from '@/field';\nimport { useFieldHook } from '@/form/hooks/useFieldHook';\nimport { getError } from '@/form/utils';\n\nimport { Input } from './Component';\nimport { type IFormInputProps } from './types';\n\ntype TFormInputControlProps = Omit<ComponentProps<typeof Input>, 'size' | 'invalid' | 'disabled'>;\n\nconst FormInputControl = supportRef((props: TFormInputControlProps) => {\n const { controlProps, size, invalid, disabled } = useField();\n\n return <Input {...props} {...controlProps} size={size} invalid={invalid} disabled={disabled} />;\n});\n\nexport const FormInput = ({\n name,\n label,\n hint,\n size = 'md',\n block = true,\n disabled,\n readOnly,\n className,\n dataTestId,\n ...inputProps\n}: IFormInputProps) => {\n const { field, fieldState, inputProps: rhfInputProps, onChangeHandler, onBlurHandler } = useFieldHook({ name });\n const { disabled: formDisabled, readOnly: formReadOnly, ...restRhf } = rhfInputProps;\n const error = getError(fieldState.error)?.message;\n const isDisabled = disabled ?? formDisabled;\n const isReadOnly = readOnly !== undefined ? readOnly : formReadOnly;\n\n return (\n <Field\n invalid={Boolean(error)}\n disabled={isDisabled}\n size={size}\n block={block}\n className={className}\n dataTestId={dataTestId}\n >\n {label ? <Field.Label>{label}</Field.Label> : null}\n <FormInputControl\n {...inputProps}\n {...restRhf}\n readOnly={isReadOnly || undefined}\n block={block}\n ref={field.ref}\n value={field.value ?? ''}\n onChange={e => onChangeHandler(e)}\n onBlur={e => onBlurHandler(e)}\n />\n {hint ? <Field.Hint>{hint}</Field.Hint> : null}\n <Field.Error>{error}</Field.Error>\n </Field>\n );\n};\n\nFormInput.displayName = 'FormInput';\n"],"names":["FormInputControl","supportRef","props","controlProps","size","invalid","disabled","useField","jsx","Input","FormInput","name","label","hint","block","readOnly","className","dataTestId","inputProps","field","fieldState","rhfInputProps","onChangeHandler","onBlurHandler","useFieldHook","formDisabled","formReadOnly","restRhf","error","getError","isDisabled","isReadOnly","jsxs","Field","e"],"mappings":";;;;;;AAaA,MAAMA,IAAmBC,EAAW,CAACC,MAAkC;AACnE,QAAM,EAAE,cAAAC,GAAc,MAAAC,GAAM,SAAAC,GAAS,UAAAC,EAAA,IAAaC,EAAA;AAElD,SAAO,gBAAAC,EAACC,KAAO,GAAGP,GAAQ,GAAGC,GAAc,MAAAC,GAAY,SAAAC,GA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;AAAA,EAAA;AAGhC;AAEAlB,EAAU,cAAc;"}
@@ -16,19 +16,23 @@ export interface IInputThemeProps {
16
16
  export interface IInputOwnProps extends IDataTestIdProps {
17
17
  /** Clear button for the current value. */
18
18
  clear?: boolean;
19
+ /** Visible and copyable, but not editable. Not `disabled`. */
20
+ readOnly?: boolean;
19
21
  /** Ref to the native input (React 19 prop). */
20
22
  ref?: Ref<HTMLInputElement>;
21
23
  }
22
24
  export interface IInputBaseProps extends IInputThemeProps, IFieldStateProps, IInputOwnProps {
23
25
  }
24
26
  /** RAC keys with different names / already in Base. */
25
- export type TInputRacOmit = 'disabled' | 'size' | 'isDisabled' | 'isInvalid';
27
+ export type TInputRacOmit = 'disabled' | 'readOnly' | 'size' | 'isDisabled' | 'isInvalid' | 'isReadOnly';
26
28
  export interface IInputProps extends IInputBaseProps, Omit<RacInputProps, keyof IInputBaseProps | TInputRacOmit> {
27
29
  }
28
30
  /** Passthrough into FormInput (RAC without RHF/shell/theme). className belongs on the Field shell. */
29
31
  export type TInputFormRacOmit = TInputRacOmit | keyof IInputBaseProps | 'value' | 'defaultValue' | 'onChange' | 'onBlur' | 'name' | 'className';
30
32
  export interface IInputContentProps extends Omit<RacInputProps, TInputFormRacOmit> {
31
33
  clear?: boolean;
34
+ /** Visible and copyable, but not editable. Not `disabled`. */
35
+ readOnly?: boolean;
32
36
  }
33
37
  export interface IFormInputProps extends IFormFieldLayoutProps, Pick<IInputThemeProps, 'variant'>, IInputContentProps {
34
38
  }
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/input/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,GAAG,EAAE,MAAM,OAAO,CAAC;AAEjC,OAAO,EAAE,KAAK,UAAU,IAAI,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEzE,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEnD,OAAO,EAAE,KAAK,gBAAgB,EAAE,MA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WAAW,CAAC;AAEpH,MAAM,WAAW,kBAAmB,SAAQ,IAAI,CAAC,aAAa,EAAE,iBAAiB,CAAC;IAC9E,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,8DAA8D;IAC9D,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,WAAW,eAAgB,SAAQ,qBAAqB,EAAE,IAAI,CAAC,gBAAgB,EAAE,SAAS,CAAC,EAAE,kBAAkB;CAAG"}
@@ -2,7 +2,7 @@ import { M as v } from "../Component-CwYbdJhI.js";
2
2
  import { jsxs as A, jsx as e } from "react/jsx-runtime";
3
3
  import "react";
4
4
  import { F as t, u as b } from "../Component-BPN5FgKq.js";
5
- import { u as x, g as B } from "../utils-CizYZV2a.js";
5
+ import { u as x, g as B } from "../useFieldHook-Bt9nST7g.js";
6
6
  const H = (i) => {
7
7
  const { controlProps: o, size: r, invalid: s, disabled: l } = b();
8
8
  return /* @__PURE__ */ e(v, { ...o, size: r, invalid: s, disabled: l, ...i });
@@ -4,7 +4,7 @@ import { u as v, a as B, i as E } from "../useAsyncSuggest-DuIolQ3l.js";
4
4
  import { M as b } from "../Component-CwYbdJhI.js";
5
5
  import "react";
6
6
  import { F as c, u as x } from "../Component-BPN5FgKq.js";
7
- import { u as C, g as H } from "../utils-CizYZV2a.js";
7
+ import { u as C, g as H } from "../useFieldHook-Bt9nST7g.js";
8
8
  const f = L(
9
9
  ({ useSuggest: n, minLength: o = 0, debounceMs: t = 300, disabled: e = !1, ...r }) => {
10
10
  const { inputValue: i, setInputValue: m, debouncedQuery: l } = v(t), d = !e && l.length >= o, { options: p, isLoading: A, isLoadingMore: u, isError: g, hasMore: y, loadMore: a } = B({
@@ -7,7 +7,7 @@ import { a as j } from "../utils-DUOIRqE-.js";
7
7
  import { C as E } from "../index-CVEaKh8K.js";
8
8
  import { cva as P } from "class-variance-authority";
9
9
  import { F as f, u as T } from "../Component-BPN5FgKq.js";
10
- import { u as q, g as w } from "../utils-CizYZV2a.js";
10
+ import { u as q, g as w } from "../useFieldHook-Bt9nST7g.js";
11
11
  import '../assets/index15.css';const z = "aub_styles-module_root_42206", A = "aub_styles-module_block_e0d95", y = {
12
12
  root: z,
13
13
  block: A
@@ -1,5 +1,5 @@
1
1
  import { INumberInputProps } from './types';
2
- export declare const NumberInput: (({ ref, size, variant, block, invalid, disabled, clear, value, defaultValue, onChange, onBlur, min, max, step, prefix, suffix, placeholder, name, id, className, dataTestId, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, "aria-describedby": ariaDescribedby, ...props }: INumberInputProps) => import("react").JSX.Element) & {
2
+ export declare const NumberInput: (({ ref, size, variant, block, invalid, disabled, readOnly, clear, value, defaultValue, onChange, onBlur, min, max, step, prefix, suffix, placeholder, name, id, className, dataTestId, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, "aria-describedby": ariaDescribedby, ...props }: INumberInputProps) => import("react").JSX.Element) & {
3
3
  displayName?: string;
4
4
  };
5
5
  //# sourceMappingURL=Component.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Component.d.ts","sourceRoot":"","sources":["../../../src/number-input/Component.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,SAAS,CAAC;AA+BjD,eAAO,MAAM,WAAW,6RA2BjB,iBAAiB;;CAsEvB,CAAC"}
1
+ {"version":3,"file":"Component.d.ts","sourceRoot":"","sources":["../../../src/number-input/Component.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,SAAS,CAAC;AA+BjD,eAAO,MAAM,WAAW,uSA4BjB,iBAAiB;;CAwEvB,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { IFormNumberInputProps } from './types';
2
2
  export declare const FormNumberInput: {
3
- ({ name, label, hint, size, block, disabled, className, dataTestId, ...inputProps }: IFormNumberInputProps): import("react").JSX.Element;
3
+ ({ name, label, hint, size, block, disabled, readOnly, className, dataTestId, ...inputProps }: IFormNumberInputProps): import("react").JSX.Element;
4
4
  displayName: string;
5
5
  };
6
6
  //# sourceMappingURL=FormNumberInput.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"FormNumberInput.d.ts","sourceRoot":"","sources":["../../../src/number-input/FormNumberInput.tsx"],"names":[],"mappings":"AASA,OAAO,EAAE,KAAK,qBAAqB,EAA0B,MAAM,SAAS,CAAC;AA8B7E,eAAO,MAAM,eAAe;yFAUzB,qBAAqB;;CA8BvB,CAAC"}
1
+ {"version":3,"file":"FormNumberInput.d.ts","sourceRoot":"","sources":["../../../src/number-input/FormNumberInput.tsx"],"names":[],"mappings":"AASA,OAAO,EAAE,KAAK,qBAAqB,EAA0B,MAAM,SAAS,CAAC;AA8B7E,eAAO,MAAM,eAAe;mGAWzB,qBAAqB;;CAgCvB,CAAC"}
@@ -1,21 +1,21 @@
1
- import { N as g } from "../Component-BBFBVrTt.js";
2
- import { jsxs as v, jsx as r } from "react/jsx-runtime";
1
+ import { N as y } from "../Component-Dkvzqo0L.js";
2
+ import { jsxs as x, jsx as r } from "react/jsx-runtime";
3
3
  import "react";
4
- import { s as x } from "../index-h8z54aFR.js";
5
- import { F as s, u as B } from "../Component-BPN5FgKq.js";
6
- import { u as C, g as H } from "../utils-CizYZV2a.js";
7
- const c = x(
8
- ({ ref: l, value: e, onChange: o, onBlur: t, ...n }) => {
9
- const { controlProps: i, size: u, invalid: a, disabled: m } = B();
4
+ import { s as B } from "../index-h8z54aFR.js";
5
+ import { F as l, u as C } from "../Component-BPN5FgKq.js";
6
+ import { u as H, g as P } from "../useFieldHook-Bt9nST7g.js";
7
+ const f = B(
8
+ ({ ref: i, value: e, onChange: o, onBlur: t, ...n }) => {
9
+ const { controlProps: a, size: s, invalid: u, disabled: d } = C();
10
10
  return /* @__PURE__ */ r(
11
- g,
11
+ y,
12
12
  {
13
- ...i,
13
+ ...a,
14
14
  ...n,
15
- ref: l,
16
- size: u,
17
- invalid: a,
18
- disabled: m,
15
+ ref: i,
16
+ size: s,
17
+ invalid: u,
18
+ disabled: d,
19
19
  value: e,
20
20
  onChange: o,
21
21
  onBlur: t
@@ -23,53 +23,55 @@ const c = x(
23
23
  );
24
24
  }
25
25
  );
26
- c.displayName = "FormNumberInputControl";
27
- const P = ({
28
- name: l,
26
+ f.displayName = "FormNumberInputControl";
27
+ const j = ({
28
+ name: i,
29
29
  label: e,
30
30
  hint: o,
31
31
  size: t = "md",
32
32
  block: n = !0,
33
- disabled: i,
33
+ disabled: a,
34
+ readOnly: s,
34
35
  className: u,
35
- dataTestId: a,
36
- ...m
36
+ dataTestId: d,
37
+ ...F
37
38
  }) => {
38
- const { field: d, fieldState: F, inputProps: p, setFieldValue: b, onBlurHandler: N } = C({ name: l }), f = H(F.error)?.message, I = i ?? p.disabled;
39
- return /* @__PURE__ */ v(
40
- s,
39
+ const { field: p, fieldState: b, inputProps: m, setFieldValue: N, onBlurHandler: v } = H({ name: i }), c = P(b.error)?.message, I = a ?? m.disabled, h = s !== void 0 ? s : m.readOnly;
40
+ return /* @__PURE__ */ x(
41
+ l,
41
42
  {
42
- invalid: !!f,
43
+ invalid: !!c,
43
44
  disabled: I,
44
45
  size: t,
45
46
  block: n,
46
47
  className: u,
47
- dataTestId: a,
48
+ dataTestId: d,
48
49
  children: [
49
- e ? /* @__PURE__ */ r(s.Label, { children: e }) : null,
50
+ e ? /* @__PURE__ */ r(l.Label, { children: e }) : null,
50
51
  /* @__PURE__ */ r(
51
- c,
52
+ f,
52
53
  {
53
- ...m,
54
+ ...F,
54
55
  block: n,
55
- name: p.name,
56
- ref: d.ref,
57
- value: d.value ?? null,
58
- onChange: (h) => {
59
- b(h);
56
+ name: m.name,
57
+ readOnly: h || void 0,
58
+ ref: p.ref,
59
+ value: p.value ?? null,
60
+ onChange: (g) => {
61
+ N(g);
60
62
  },
61
- onBlur: () => N()
63
+ onBlur: () => v()
62
64
  }
63
65
  ),
64
- o ? /* @__PURE__ */ r(s.Hint, { children: o }) : null,
65
- /* @__PURE__ */ r(s.Error, { children: f })
66
+ o ? /* @__PURE__ */ r(l.Hint, { children: o }) : null,
67
+ /* @__PURE__ */ r(l.Error, { children: c })
66
68
  ]
67
69
  }
68
70
  );
69
71
  };
70
- P.displayName = "FormNumberInput";
72
+ j.displayName = "FormNumberInput";
71
73
  export {
72
- P as FormNumberInput,
73
- g as NumberInput
74
+ j as FormNumberInput,
75
+ y as NumberInput
74
76
  };
75
77
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../src/number-input/FormNumberInput.tsx"],"sourcesContent":["import { type Ref } from 'react';\n\nimport { supportRef } from '@ds/common/support-ref';\n\nimport { Field, useField } from '@/field';\nimport { useFieldHook } from '@/form/hooks/useFieldHook';\nimport { getError } from '@/form/utils';\n\nimport { NumberInput } from './Component';\nimport { type IFormNumberInputProps, type INumberInputProps } from './types';\n\ntype TFormNumberInputControlProps = Omit<INumberInputProps, 'size' | 'invalid' | 'disabled' | 'value' | 'onChange'> & {\n value: number | null;\n onChange: (value: number | null) => void;\n ref?: Ref<HTMLInputElement>;\n};\n\nconst FormNumberInputControl = supportRef(\n ({ ref, value, onChange, onBlur, ...props }: TFormNumberInputControlProps) => {\n const { controlProps, size, invalid, disabled } = useField();\n\n return (\n <NumberInput\n {...controlProps}\n {...props}\n ref={ref}\n size={size}\n invalid={invalid}\n disabled={disabled}\n value={value}\n onChange={onChange}\n onBlur={onBlur}\n />\n );\n }\n);\n\nFormNumberInputControl.displayName = 'FormNumberInputControl';\n\nexport const FormNumberInput = ({\n name,\n label,\n hint,\n size = 'md',\n block = true,\n disabled,\n className,\n dataTestId,\n ...inputProps\n}: IFormNumberInputProps) => {\n const { field, fieldState, inputProps: rhfInputProps, setFieldValue, onBlurHandler } = useFieldHook({ name });\n const error = getError(fieldState.error)?.message;\n const isDisabled = disabled ?? rhfInputProps.disabled;\n\n return (\n <Field\n invalid={Boolean(error)}\n disabled={isDisabled}\n size={size}\n block={block}\n className={className}\n dataTestId={dataTestId}\n >\n {label ? <Field.Label>{label}</Field.Label> : null}\n <FormNumberInputControl\n {...inputProps}\n block={block}\n name={rhfInputProps.name}\n ref={field.ref}\n value={field.value ?? null}\n onChange={view => {\n setFieldValue(view);\n }}\n onBlur={() => onBlurHandler()}\n />\n {hint ? <Field.Hint>{hint}</Field.Hint> : null}\n <Field.Error>{error}</Field.Error>\n </Field>\n );\n};\n\nFormNumberInput.displayName = 'FormNumberInput';\n"],"names":["FormNumberInputControl","supportRef","ref","value","onChange","onBlur","props","controlProps","size","invalid","disabled","useField","jsx","NumberInput","FormNumberInput","name","label","hint","block","className","dataTestId","inputProps","field","fieldState","rhfInputProps","setFieldValue","onBlurHandler","useFieldHook","error","getError","isDisabled","jsxs","Field","view"],"mappings":";;;;;;AAiBA,MAAMA,IAAyBC;AAAA,EAC3B,CAAC,EAAE,KAAAC,GAAK,OAAAC,GAAO,UAAAC,GAAU,QAAAC,GAAQ,GAAGC,QAA0C;AAC1E,UAAM,EAAE,cAAAC,GAAc,MAAAC,GAAM,SAAAC,GAAS,UAAAC,EAAA,IAAaC,EAAA;AAElD,WACI,gBAAAC;AAAA,MAACC;AAAA,MAAA;AAAA,QACI,GAAGN;AAAA,QACH,GAAGD;AAAA,QACJ,KAAAJ;AAAA,QACA,MAAAM;AAAA,QACA,SAAAC;AAAA,QACA,UAAAC;AAAA,QACA,OAAAP;AAAA,QACA,UAAAC;AAAA,QACA,QAAAC;AAAA,MAAA;AAAA,IAAA;AAAA,EAGZ;AACJ;AAEAL,EAAuB,cAAc;AAE9B,MAAMc,IAAkB,CAAC;AAAA,EAC5B,MAAAC;AAAA,EACA,OAAAC;AAAA,EACA,MAAAC;AAAA,EACA,MAAAT,IAAO;AAAA,EACP,OAAAU,IAAQ;AAAA,EACR,UAAAR;AAAA,EACA,WAAAS;AAAA,EACA,YAAAC;AAAA,EACA,GAAGC;AACP,MAA6B;AACzB,QAAM,EAAE,OAAAC,GAAO,YAAAC,GAAY,YAAYC,GAAe,eAAAC,GAAe,eAAAC,MAAkBC,EAAa,EAAE,MAAAZ,GAAM,GACtGa,IAAQC,EAASN,EAAW,KAAK,GAAG,SACpCO,IAAapB,KAAYc,EAAc;AAE7C,SACI,gBAAAO;AAAA,IAACC;AAAA,IAAA;AAAA,MACG,SAAS,EAAQJ;AAAA,MACjB,UAAUE;AAAA,MACV,MAAAtB;AAAA,MACA,OAAAU;AAAA,MACA,WAAAC;AAAA,MACA,YAAAC;AAAA,MAEC,UAAA;AAAA,QAAAJ,IAAQ,gBAAAJ,EAACoB,EAAM,OAAN,EAAa,aAAM,IAAiB;AAAA,QAC9C,gBAAApB;AAAA,UAACZ;AAAA,UAAA;AAAA,YACI,GAAGqB;AAAA,YACJ,OAAAH;AAAA,YACA,MAAMM,EAAc;AAAA,YACpB,KAAKF,EAAM;AAAA,YACX,OAAOA,EAAM,SAAS;AAAA,YACtB,UAAU,CAAAW,MAAQ;AACd,cAAAR,EAAcQ,CAAI;AAAA,YACtB;AAAA,YACA,QAAQ,MAAMP,EAAA;AAAA,UAAc;AAAA,QAAA;AAAA,QAE/BT,IAAO,gBAAAL,EAACoB,EAAM,MAAN,EAAY,aAAK,IAAgB;AAAA,QAC1C,gBAAApB,EAACoB,EAAM,OAAN,EAAa,UAAAJ,EAAA,CAAM;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGhC;AAEAd,EAAgB,cAAc;"}
1
+ {"version":3,"file":"index.js","sources":["../../src/number-input/FormNumberInput.tsx"],"sourcesContent":["import { type Ref } from 'react';\n\nimport { supportRef } from '@ds/common/support-ref';\n\nimport { Field, useField } from '@/field';\nimport { useFieldHook } from '@/form/hooks/useFieldHook';\nimport { getError } from '@/form/utils';\n\nimport { NumberInput } from './Component';\nimport { type IFormNumberInputProps, type INumberInputProps } from './types';\n\ntype TFormNumberInputControlProps = Omit<INumberInputProps, 'size' | 'invalid' | 'disabled' | 'value' | 'onChange'> & {\n value: number | null;\n onChange: (value: number | null) => void;\n ref?: Ref<HTMLInputElement>;\n};\n\nconst FormNumberInputControl = supportRef(\n ({ ref, value, onChange, onBlur, ...props }: TFormNumberInputControlProps) => {\n const { controlProps, size, invalid, disabled } = useField();\n\n return (\n <NumberInput\n {...controlProps}\n {...props}\n ref={ref}\n size={size}\n invalid={invalid}\n disabled={disabled}\n value={value}\n onChange={onChange}\n onBlur={onBlur}\n />\n );\n }\n);\n\nFormNumberInputControl.displayName = 'FormNumberInputControl';\n\nexport const FormNumberInput = ({\n name,\n label,\n hint,\n size = 'md',\n block = true,\n disabled,\n readOnly,\n className,\n dataTestId,\n ...inputProps\n}: IFormNumberInputProps) => {\n const { field, fieldState, inputProps: rhfInputProps, setFieldValue, onBlurHandler } = useFieldHook({ name });\n const error = getError(fieldState.error)?.message;\n const isDisabled = disabled ?? rhfInputProps.disabled;\n const isReadOnly = readOnly !== undefined ? readOnly : rhfInputProps.readOnly;\n\n return (\n <Field\n invalid={Boolean(error)}\n disabled={isDisabled}\n size={size}\n block={block}\n className={className}\n dataTestId={dataTestId}\n >\n {label ? <Field.Label>{label}</Field.Label> : null}\n <FormNumberInputControl\n {...inputProps}\n block={block}\n name={rhfInputProps.name}\n readOnly={isReadOnly || undefined}\n ref={field.ref}\n value={field.value ?? null}\n onChange={view => {\n setFieldValue(view);\n }}\n onBlur={() => onBlurHandler()}\n />\n {hint ? <Field.Hint>{hint}</Field.Hint> : null}\n <Field.Error>{error}</Field.Error>\n </Field>\n );\n};\n\nFormNumberInput.displayName = 'FormNumberInput';\n"],"names":["FormNumberInputControl","supportRef","ref","value","onChange","onBlur","props","controlProps","size","invalid","disabled","useField","jsx","NumberInput","FormNumberInput","name","label","hint","block","readOnly","className","dataTestId","inputProps","field","fieldState","rhfInputProps","setFieldValue","onBlurHandler","useFieldHook","error","getError","isDisabled","isReadOnly","jsxs","Field","view"],"mappings":";;;;;;AAiBA,MAAMA,IAAyBC;AAAA,EAC3B,CAAC,EAAE,KAAAC,GAAK,OAAAC,GAAO,UAAAC,GAAU,QAAAC,GAAQ,GAAGC,QAA0C;AA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AOA,EAAM,SAAS;AAAA,YACtB,UAAU,CAAAY,MAAQ;AACd,cAAAT,EAAcS,CAAI;AAAA,YACtB;AAAA,YACA,QAAQ,MAAMR,EAAA;AAAA,UAAc;AAAA,QAAA;AAAA,QAE/BV,IAAO,gBAAAL,EAACsB,EAAM,MAAN,EAAY,aAAK,IAAgB;AAAA,QAC1C,gBAAAtB,EAACsB,EAAM,OAAN,EAAa,UAAAL,EAAA,CAAM;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGhC;AAEAf,EAAgB,cAAc;"}
@@ -36,6 +36,8 @@ export interface INumberInputOwnProps extends IDataTestIdProps {
36
36
  suffix?: ReactNode;
37
37
  /** Clear button for the current value. */
38
38
  clear?: boolean;
39
+ /** Visible and copyable, but not editable. Not `disabled`. */
40
+ readOnly?: boolean;
39
41
  /** Placeholder text. */
40
42
  placeholder?: string;
41
43
  /** Native input `name`. */
@@ -52,6 +54,8 @@ export interface INumberInputContentProps {
52
54
  prefix?: ReactNode;
53
55
  suffix?: ReactNode;
54
56
  clear?: boolean;
57
+ /** Visible and copyable, but not editable. Not `disabled`. */
58
+ readOnly?: boolean;
55
59
  placeholder?: string;
56
60
  min?: number;
57
61
  max?: number;
@@ -62,7 +66,7 @@ export interface INumberInputContentProps {
62
66
  export interface INumberInputBaseProps extends INumberInputThemeProps, IFieldStateProps, INumberInputControlProps, INumberInputOwnProps {
63
67
  }
64
68
  /** RAC keys omitted because names differ from ours or already live in Base. */
65
- export type TNumberInputRacOmit = 'children' | 'isDisabled' | 'isInvalid' | 'value' | 'defaultValue' | 'onChange' | 'onBlur' | 'minValue' | 'maxValue' | 'placeholder' | 'name' | 'id' | 'aria-label' | 'aria-labelledby' | 'aria-describedby';
69
+ export type TNumberInputRacOmit = 'children' | 'isDisabled' | 'isReadOnly' | 'isInvalid' | 'value' | 'defaultValue' | 'onChange' | 'onBlur' | 'minValue' | 'maxValue' | 'placeholder' | 'name' | 'id' | 'aria-label' | 'aria-labelledby' | 'aria-describedby';
66
70
  export interface INumberInputProps extends INumberInputBaseProps, Omit<RacNumberFieldProps, keyof INumberInputBaseProps | TNumberInputRacOmit> {
67
71
  }
68
72
  export interface IFormNumberInputProps extends IFormFieldLayoutProps, Pick<INumberInputThemeProps, 'variant'>, INumberInputContentProps {
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/number-input/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,SAAS,EAAE,KAAK,GAAG,EAAE,MAAM,OAAO,CAAC;AAEzE,OAAO,EAAE,KAAK,gBAAgB,IAAI,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAErF,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEnD,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAE1D,MAAM,MAAM,gBAAgB,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAElD,MAAM,MAAM,mBAAmB,GAAG,SAAS,CAAC;AAE5C,oBAAoB;AACpB,MAAM,WAAW,sBAAsB;IACnC,wBAAwB;IACxB,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACxB,sBAAsB;IACtB,OAAO,CAAC,EAAE,mBAAmB,CAAC;CACjC;AAED,0CAA0C;AAC1C,MAAM,WAAW,wBAAwB;IACrC,iDAAiD;IACjD,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,uCAAuC;IACvC,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,iCAAiC;IACjC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IAC1C,MAAM,CAAC,EAAE,iBAAiB,CAAC,gBAAgB,CAAC,CAAC;IAC7C,0BAA0B;IAC1B,GAAG,CAAC,EAAE,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C,mBAAmB,CAAC;CAC5C;AAED,MAAM,WAAW,qBACb,SAAQ,sBAAsB,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,oBAAoB;CAAG;AAEvG,+EAA+E;AAC/E,MAAM,MAAM,mBAAmB,GACzB,UAAU,GACV,YAAY,GACZ,YAAY,GACZ,WAAW,GACX,OAAO,GACP,cAAc,GACd,UAAU,GACV,QAAQ,GACR,UAAU,GACV,UAAU,GACV,aAAa,GACb,MAAM,GACN,IAAI,GACJ,YAAY,GACZ,iBAAiB,GACjB,kBAAkB,CAAC;AAEzB,MAAM,WAAW,iBACb,SAAQ,qBAAqB,EAAE,IAAI,CAAC,mBAAmB,EAAE,MAAM,qBAAqB,GAAG,mBAAmB,CAAC;CAAG;AAElH,MAAM,WAAW,qBACb,SAAQ,qBAAqB,EAAE,IAAI,CAAC,sBAAsB,EAAE,SAAS,CAAC,EAAE,wBAAwB;CAAG"}
@@ -2,9 +2,9 @@ import { jsxs as H, jsx as s } from "react/jsx-runtime";
2
2
  import { useState as L } from "react";
3
3
  import U from "classnames";
4
4
  import { s as j } from "../index-h8z54aFR.js";
5
- import { N as B } from "../Component-BBFBVrTt.js";
5
+ import { N as B } from "../Component-Dkvzqo0L.js";
6
6
  import { F as b, u as $ } from "../Component-BPN5FgKq.js";
7
- import { u as q, g as w } from "../utils-CizYZV2a.js";
7
+ import { u as q, g as w } from "../useFieldHook-Bt9nST7g.js";
8
8
  import '../assets/index10.css';const C = (o) => o == null || Number.isNaN(o) ? null : o, D = (o, n, t) => {
9
9
  const r = C(o.from), l = C(o.to), e = C(t);
10
10
  return e == null ? n === "from" ? { from: null, to: l } : { from: r, to: null } : n === "from" ? { from: e, to: l != null && e > l ? e : l } : { from: r != null && e < r ? e : r, to: e };
@@ -2,7 +2,7 @@ import { S as v } from "../Component-B2_pbcdj.js";
2
2
  import { jsxs as b, jsx as e } from "react/jsx-runtime";
3
3
  import "react";
4
4
  import { F as n, u as x } from "../Component-BPN5FgKq.js";
5
- import { u as B, g as H } from "../utils-CizYZV2a.js";
5
+ import { u as B, g as H } from "../useFieldHook-Bt9nST7g.js";
6
6
  const j = (s) => {
7
7
  const { controlProps: r, size: o, invalid: i, disabled: l } = x();
8
8
  return /* @__PURE__ */ e(v, { ...r, size: o, invalid: i, disabled: l, ...s });
@@ -6,7 +6,7 @@ import { s as D } from "../index-h8z54aFR.js";
6
6
  import { cva as G } from "class-variance-authority";
7
7
  import { typographyStyles as C } from "../typography/index.js";
8
8
  import { F as v, u as J } from "../Component-BPN5FgKq.js";
9
- import { u as K, g as Q } from "../utils-CizYZV2a.js";
9
+ import { u as K, g as Q } from "../useFieldHook-Bt9nST7g.js";
10
10
  import '../assets/index16.css';const U = "aub_styles-module_root_34a37", W = "aub_styles-module_block_87638", X = "aub_styles-module_readout_b6c80", Y = "aub_styles-module_value_52215", Z = "aub_styles-module_detail_aad13", ee = "aub_styles-module_track_47316", le = "aub_styles-module_rail_fad39", ae = "aub_styles-module_fill_7f0d9", re = "aub_styles-module_ticks_24abe", te = "aub_styles-module_tick_60d62", se = "aub_styles-module_thumb_edd9d", ie = "aub_styles-module_invalid_cb4ec", oe = "aub_styles-module_sm_d6a8a", de = "aub_styles-module_md_f78ab", ne = "aub_styles-module_lg_32e42", a = {
11
11
  root: U,
12
12
  block: W,
@@ -4,7 +4,7 @@ import { Virtualizer as H, ListLayout as J, ListBox as K, Collection as T, ListB
4
4
  import { u as Y, a as Z, i as $ } from "../useAsyncSuggest-DuIolQ3l.js";
5
5
  import { C as ee } from "../Component-u6K-ylDb.js";
6
6
  import { u as se, r as M, C as te } from "../metrics-C8FBvbwl.js";
7
- import { I as oe } from "../Component-C4pVS7OW.js";
7
+ import { I as oe } from "../Component-DFwWbzFS.js";
8
8
  import { u as ae } from "../hooks-BAkrGC45.js";
9
9
  import '../assets/index3.css';const le = "aub_styles-module_root_50f42", ne = "aub_styles-module_field_9c54b", re = "aub_styles-module_list_1877b", ce = "aub_styles-module_item_580d9", ie = "aub_styles-module_more_5f92c", l = {
10
10
  root: le,
@@ -6,7 +6,7 @@ import { cva as x } from "class-variance-authority";
6
6
  import { typographyStyles as y } from "../typography/index.js";
7
7
  import "react";
8
8
  import { F as _, u as z } from "../Component-BPN5FgKq.js";
9
- import { u as D, g as H } from "../utils-CizYZV2a.js";
9
+ import { u as D, g as H } from "../useFieldHook-Bt9nST7g.js";
10
10
  import '../assets/index11.css';const V = "aub_styles-module_root_266e7", j = "aub_styles-module_track_88aff", C = "aub_styles-module_thumb_eb2c8", E = "aub_styles-module_label_a0017", I = "aub_styles-module_sm_8ed02", P = "aub_styles-module_md_96718", M = "aub_styles-module_lg_0c078", R = "aub_styles-module_primary_922c6", q = "aub_styles-module_invalid_a628f", a = {
11
11
  root: V,
12
12
  track: j,
@@ -1,4 +1,4 @@
1
- import { T as R, g as U, u as j } from "../Component-Bk0VFhAQ.js";
1
+ import { T as R, g as U, u as j } from "../Component-DhhrZEMr.js";
2
2
  import { useState as y, useCallback as a, useMemo as m } from "react";
3
3
  const x = (t, u) => {
4
4
  const s = new Set(t);
@@ -1,5 +1,5 @@
1
1
  import { ITextAreaProps } from './types';
2
- export declare const TextArea: (({ ref, size, variant, block, invalid, disabled, clear, className, dataTestId, value, defaultValue, onChange, ...props }: ITextAreaProps) => import("react").JSX.Element) & {
2
+ export declare const TextArea: (({ ref, size, variant, block, invalid, disabled, readOnly, clear, className, dataTestId, value, defaultValue, onChange, ...props }: ITextAreaProps) => import("react").JSX.Element) & {
3
3
  displayName?: string;
4
4
  };
5
5
  //# sourceMappingURL=Component.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Component.d.ts","sourceRoot":"","sources":["../../../src/textarea/Component.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,SAAS,CAAC;AAyC9C,eAAO,MAAM,QAAQ,6HAed,cAAc;;CAoDpB,CAAC"}
1
+ {"version":3,"file":"Component.d.ts","sourceRoot":"","sources":["../../../src/textarea/Component.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,SAAS,CAAC;AAyC9C,eAAO,MAAM,QAAQ,uIAgBd,cAAc;;CAsDpB,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { IFormTextAreaProps } from './types';
2
2
  export declare const FormTextArea: {
3
- ({ name, label, hint, size, block, disabled, className, dataTestId, ...textAreaProps }: IFormTextAreaProps): import("react").JSX.Element;
3
+ ({ name, label, hint, size, block, disabled, readOnly, className, dataTestId, ...textAreaProps }: IFormTextAreaProps): import("react").JSX.Element;
4
4
  displayName: string;
5
5
  };
6
6
  //# sourceMappingURL=FormTextArea.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"FormTextArea.d.ts","sourceRoot":"","sources":["../../../src/textarea/FormTextArea.tsx"],"names":[],"mappings":"AASA,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAUlD,eAAO,MAAM,YAAY;4FAUtB,kBAAkB;;CA4BpB,CAAC"}
1
+ {"version":3,"file":"FormTextArea.d.ts","sourceRoot":"","sources":["../../../src/textarea/FormTextArea.tsx"],"names":[],"mappings":"AASA,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAUlD,eAAO,MAAM,YAAY;sGAWtB,kBAAkB;;CA+BpB,CAAC"}