@ensi-platform/admin-ui 0.11.0 → 0.13.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 (337) hide show
  1. package/ai/skills/admin-ui/SKILL.md +1 -0
  2. package/dist/{Component-MSGhHMYk.js → Component-B1piMJHv.js} +2 -2
  3. package/dist/{Component-MSGhHMYk.js.map → Component-B1piMJHv.js.map} +1 -1
  4. package/dist/{Component-DOlDNQnu.js → Component-B6OSgrmp.js} +4 -4
  5. package/dist/Component-B6OSgrmp.js.map +1 -0
  6. package/dist/{Component-BH5skHn_.js → Component-BBzbDcdq.js} +3 -3
  7. package/dist/{Component-BH5skHn_.js.map → Component-BBzbDcdq.js.map} +1 -1
  8. package/dist/Component-BJc8tKRD.js +169 -0
  9. package/dist/Component-BJc8tKRD.js.map +1 -0
  10. package/dist/Component-BhZC1r4b.js +134 -0
  11. package/dist/Component-BhZC1r4b.js.map +1 -0
  12. package/dist/{Component-C4vHIDMZ.js → Component-BoAQ166N.js} +4 -4
  13. package/dist/{Component-C4vHIDMZ.js.map → Component-BoAQ166N.js.map} +1 -1
  14. package/dist/{Component-6rieHJdg.js → Component-CMdJyqc-.js} +4 -4
  15. package/dist/{Component-6rieHJdg.js.map → Component-CMdJyqc-.js.map} +1 -1
  16. package/dist/{Component-Dq7pvkWP.js → Component-CQyBQxAb.js} +2 -2
  17. package/dist/{Component-Dq7pvkWP.js.map → Component-CQyBQxAb.js.map} +1 -1
  18. package/dist/{Component-DH7wdC3G.js → Component-CS-9-L8S.js} +4 -4
  19. package/dist/Component-CS-9-L8S.js.map +1 -0
  20. package/dist/{Component-CkazNd13.js → Component-CiwX3wP8.js} +3 -3
  21. package/dist/{Component-CkazNd13.js.map → Component-CiwX3wP8.js.map} +1 -1
  22. package/dist/{Component-DGze6SVb.js → Component-D92F9hx-.js} +2 -2
  23. package/dist/{Component-DGze6SVb.js.map → Component-D92F9hx-.js.map} +1 -1
  24. package/dist/Component-DV6H96-0.js +140 -0
  25. package/dist/Component-DV6H96-0.js.map +1 -0
  26. package/dist/Component-DlBYWjUa.js +107 -0
  27. package/dist/Component-DlBYWjUa.js.map +1 -0
  28. package/dist/{Component-IFlvrceZ.js → Component-DmKmX7so.js} +6 -7
  29. package/dist/{Component-IFlvrceZ.js.map → Component-DmKmX7so.js.map} +1 -1
  30. package/dist/Component-kqMyROjC.js +162 -0
  31. package/dist/Component-kqMyROjC.js.map +1 -0
  32. package/dist/{Component-CzwTENBM.js → Component-uHkw3SDR.js} +2 -2
  33. package/dist/{Component-CzwTENBM.js.map → Component-uHkw3SDR.js.map} +1 -1
  34. package/dist/EyeOff-gqqijMR1.js +57 -0
  35. package/dist/EyeOff-gqqijMR1.js.map +1 -0
  36. package/dist/action-popup/index.js +3 -3
  37. package/dist/active-filters/index.js +4 -4
  38. package/dist/arrangement-settings/index.js +4 -4
  39. package/dist/assets/Component.css +1 -1
  40. package/dist/assets/Component10.css +1 -1
  41. package/dist/assets/Component11.css +1 -1
  42. package/dist/assets/Component12.css +1 -1
  43. package/dist/assets/Component13.css +1 -1
  44. package/dist/assets/Component14.css +1 -1
  45. package/dist/assets/Component15.css +1 -1
  46. package/dist/assets/Component16.css +1 -0
  47. package/dist/assets/Component2.css +1 -1
  48. package/dist/assets/Component3.css +1 -1
  49. package/dist/assets/Component4.css +1 -1
  50. package/dist/assets/Component5.css +1 -1
  51. package/dist/assets/Component6.css +1 -1
  52. package/dist/assets/Component7.css +1 -1
  53. package/dist/assets/Component8.css +1 -1
  54. package/dist/assets/Component9.css +1 -1
  55. package/dist/assets/index.css +1 -1
  56. package/dist/assets/index10.css +1 -1
  57. package/dist/assets/index11.css +1 -1
  58. package/dist/assets/index12.css +1 -1
  59. package/dist/assets/index13.css +1 -1
  60. package/dist/assets/index14.css +1 -1
  61. package/dist/assets/index15.css +1 -1
  62. package/dist/assets/index16.css +1 -1
  63. package/dist/assets/index17.css +1 -1
  64. package/dist/assets/index18.css +1 -1
  65. package/dist/assets/index19.css +1 -1
  66. package/dist/assets/index20.css +1 -1
  67. package/dist/assets/index21.css +1 -1
  68. package/dist/assets/index22.css +1 -1
  69. package/dist/assets/index23.css +1 -1
  70. package/dist/assets/index24.css +1 -1
  71. package/dist/assets/index25.css +1 -1
  72. package/dist/assets/index26.css +1 -1
  73. package/dist/assets/index27.css +1 -1
  74. package/dist/assets/index28.css +1 -1
  75. package/dist/assets/index29.css +1 -1
  76. package/dist/assets/index3.css +1 -1
  77. package/dist/assets/index30.css +1 -1
  78. package/dist/assets/index31.css +1 -1
  79. package/dist/assets/index32.css +1 -1
  80. package/dist/assets/index33.css +1 -1
  81. package/dist/assets/index34.css +1 -0
  82. package/dist/assets/index4.css +1 -1
  83. package/dist/assets/index5.css +1 -1
  84. package/dist/assets/index6.css +1 -1
  85. package/dist/assets/index7.css +1 -1
  86. package/dist/assets/index8.css +1 -1
  87. package/dist/assets/index9.css +1 -1
  88. package/dist/assets/theme2.css +1 -1
  89. package/dist/autocomplete/index.js +2 -2
  90. package/dist/autocomplete/types.d.ts +1 -1
  91. package/dist/autocomplete/types.d.ts.map +1 -1
  92. package/dist/autocomplete/utils.d.ts +1 -3
  93. package/dist/autocomplete/utils.d.ts.map +1 -1
  94. package/dist/autocomplete-async/index.js +2 -2
  95. package/dist/avatar/index.js +1 -1
  96. package/dist/badge/index.js +1 -1
  97. package/dist/bottom-sheet/index.js +2 -2
  98. package/dist/button/Component.d.ts +1 -1
  99. package/dist/button/Component.d.ts.map +1 -1
  100. package/dist/button/index.js +1 -1
  101. package/dist/button/types.d.ts +2 -0
  102. package/dist/button/types.d.ts.map +1 -1
  103. package/dist/cascade-menu/index.d.ts +0 -3
  104. package/dist/cascade-menu/index.d.ts.map +1 -1
  105. package/dist/cascade-menu/index.js +256 -284
  106. package/dist/cascade-menu/index.js.map +1 -1
  107. package/dist/checkbox/index.js +1 -1
  108. package/dist/checkbox-group/index.js +2 -2
  109. package/dist/color-field/Component.d.ts +5 -0
  110. package/dist/color-field/Component.d.ts.map +1 -0
  111. package/dist/color-field/FormColorField.d.ts +6 -0
  112. package/dist/color-field/FormColorField.d.ts.map +1 -0
  113. package/dist/color-field/index.d.ts +4 -0
  114. package/dist/color-field/index.d.ts.map +1 -0
  115. package/dist/color-field/index.js +285 -0
  116. package/dist/color-field/index.js.map +1 -0
  117. package/dist/{color-picker → color-field}/theme.d.ts +1 -1
  118. package/dist/color-field/theme.d.ts.map +1 -0
  119. package/dist/color-field/types.d.ts +56 -0
  120. package/dist/color-field/types.d.ts.map +1 -0
  121. package/dist/color-field/utils.d.ts +14 -0
  122. package/dist/color-field/utils.d.ts.map +1 -0
  123. package/dist/color-picker/Component.d.ts +1 -1
  124. package/dist/color-picker/Component.d.ts.map +1 -1
  125. package/dist/color-picker/index.d.ts +2 -2
  126. package/dist/color-picker/index.d.ts.map +1 -1
  127. package/dist/color-picker/index.js +3 -344
  128. package/dist/color-picker/index.js.map +1 -1
  129. package/dist/color-picker/types.d.ts +16 -39
  130. package/dist/color-picker/types.d.ts.map +1 -1
  131. package/dist/color-picker/utils.d.ts +7 -14
  132. package/dist/color-picker/utils.d.ts.map +1 -1
  133. package/dist/combobox/index.d.ts +0 -2
  134. package/dist/combobox/index.d.ts.map +1 -1
  135. package/dist/combobox/index.js +15 -17
  136. package/dist/context-menu/index.js +1 -1
  137. package/dist/copy-button/index.js +2 -2
  138. package/dist/data-table/index.js +3 -3
  139. package/dist/date-picker/index.js +4 -4
  140. package/dist/date-picker/types.d.ts +1 -6
  141. package/dist/date-picker/types.d.ts.map +1 -1
  142. package/dist/date-range-picker/index.js +4 -4
  143. package/dist/date-range-picker/types.d.ts +1 -6
  144. package/dist/date-range-picker/types.d.ts.map +1 -1
  145. package/dist/drawer/index.js +1 -1
  146. package/dist/dropzone/index.js +4 -4
  147. package/dist/field/components/Hint/index.d.ts.map +1 -1
  148. package/dist/field/components/Hint/theme.d.ts +0 -1
  149. package/dist/field/components/Hint/theme.d.ts.map +1 -1
  150. package/dist/field/components/Label/index.d.ts.map +1 -1
  151. package/dist/field/components/Label/theme.d.ts +0 -1
  152. package/dist/field/components/Label/theme.d.ts.map +1 -1
  153. package/dist/field/index.js +1 -1
  154. package/dist/filters/index.js +1 -1
  155. package/dist/flex-layout/Component.d.ts +1 -1
  156. package/dist/flex-layout/Component.d.ts.map +1 -1
  157. package/dist/flex-layout/index.js +41 -43
  158. package/dist/flex-layout/index.js.map +1 -1
  159. package/dist/flex-layout/types.d.ts +0 -2
  160. package/dist/flex-layout/types.d.ts.map +1 -1
  161. package/dist/grid-layout/Component.d.ts +1 -1
  162. package/dist/grid-layout/Component.d.ts.map +1 -1
  163. package/dist/grid-layout/index.js +34 -36
  164. package/dist/grid-layout/index.js.map +1 -1
  165. package/dist/grid-layout/types.d.ts +0 -2
  166. package/dist/grid-layout/types.d.ts.map +1 -1
  167. package/dist/{hooks-CekMiYbX.js → hooks-Di5rgHTG.js} +6 -4
  168. package/dist/hooks-Di5rgHTG.js.map +1 -0
  169. package/dist/icons/Eye.d.ts +8 -0
  170. package/dist/icons/Eye.d.ts.map +1 -0
  171. package/dist/icons/EyeOff.d.ts +8 -0
  172. package/dist/icons/EyeOff.d.ts.map +1 -0
  173. package/dist/icons/index.d.ts +2 -0
  174. package/dist/icons/index.d.ts.map +1 -1
  175. package/dist/icons/index.js +26 -23
  176. package/dist/icons/index.js.map +1 -1
  177. package/dist/{index-BccXGF9t.js → index-BAFoUNz-.js} +2 -2
  178. package/dist/{index-BccXGF9t.js.map → index-BAFoUNz-.js.map} +1 -1
  179. package/dist/{index-C_oo7Xm5.js → index-BHUJOcwj.js} +3 -3
  180. package/dist/{index-C_oo7Xm5.js.map → index-BHUJOcwj.js.map} +1 -1
  181. package/dist/{index-DxsuVBkE.js → index-Co6mzXrw.js} +5 -7
  182. package/dist/{index-DxsuVBkE.js.map → index-Co6mzXrw.js.map} +1 -1
  183. package/dist/index-DvSNcGG6.js +45 -0
  184. package/dist/index-DvSNcGG6.js.map +1 -0
  185. package/dist/input/Component.d.ts +8 -1
  186. package/dist/input/Component.d.ts.map +1 -1
  187. package/dist/input/components/Addon/index.d.ts +17 -0
  188. package/dist/input/components/Addon/index.d.ts.map +1 -0
  189. package/dist/input/index.js +2 -2
  190. package/dist/input/types.d.ts +10 -3
  191. package/dist/input/types.d.ts.map +1 -1
  192. package/dist/link/index.js +1 -1
  193. package/dist/loader/index.js +2 -2
  194. package/dist/mask/Component.d.ts +5 -0
  195. package/dist/mask/Component.d.ts.map +1 -0
  196. package/dist/mask/FormMask.d.ts +6 -0
  197. package/dist/mask/FormMask.d.ts.map +1 -0
  198. package/dist/mask/index.d.ts +4 -0
  199. package/dist/mask/index.d.ts.map +1 -0
  200. package/dist/mask/index.js +104 -0
  201. package/dist/mask/index.js.map +1 -0
  202. package/dist/mask/types.d.ts +20 -0
  203. package/dist/mask/types.d.ts.map +1 -0
  204. package/dist/menu-list/index.js +1 -1
  205. package/dist/{metrics-Cv_jrA15.js → metrics-CaN_sENu.js} +2 -2
  206. package/dist/{metrics-Cv_jrA15.js.map → metrics-CaN_sENu.js.map} +1 -1
  207. package/dist/modal/index.js +1 -1
  208. package/dist/modal-hub/{ModalHub.d.ts → Component.d.ts} +1 -1
  209. package/dist/modal-hub/Component.d.ts.map +1 -0
  210. package/dist/modal-hub/index.d.ts +1 -1
  211. package/dist/modal-hub/index.d.ts.map +1 -1
  212. package/dist/modal-hub/index.js.map +1 -1
  213. package/dist/multi-autocomplete/index.js +2 -2
  214. package/dist/multi-autocomplete/types.d.ts +1 -1
  215. package/dist/multi-autocomplete/types.d.ts.map +1 -1
  216. package/dist/multi-autocomplete-async/index.js +2 -2
  217. package/dist/multi-select/index.js +4 -4
  218. package/dist/multi-select/index.js.map +1 -1
  219. package/dist/multi-select/types.d.ts +8 -4
  220. package/dist/multi-select/types.d.ts.map +1 -1
  221. package/dist/multi-select/utils.d.ts +1 -5
  222. package/dist/multi-select/utils.d.ts.map +1 -1
  223. package/dist/number-input/Component.d.ts +8 -1
  224. package/dist/number-input/Component.d.ts.map +1 -1
  225. package/dist/number-input/index.js +2 -2
  226. package/dist/number-input/types.d.ts +4 -9
  227. package/dist/number-input/types.d.ts.map +1 -1
  228. package/dist/number-range/index.js +3 -3
  229. package/dist/password/Component.d.ts +5 -0
  230. package/dist/password/Component.d.ts.map +1 -0
  231. package/dist/password/FormPassword.d.ts +6 -0
  232. package/dist/password/FormPassword.d.ts.map +1 -0
  233. package/dist/password/index.d.ts +4 -0
  234. package/dist/password/index.d.ts.map +1 -0
  235. package/dist/password/index.js +95 -0
  236. package/dist/password/index.js.map +1 -0
  237. package/dist/password/types.d.ts +11 -0
  238. package/dist/password/types.d.ts.map +1 -0
  239. package/dist/popover/index.js +1 -1
  240. package/dist/provider/context.d.ts.map +1 -1
  241. package/dist/provider/index.js +3 -3
  242. package/dist/provider/types.d.ts +4 -0
  243. package/dist/provider/types.d.ts.map +1 -1
  244. package/dist/select/index.js +2 -2
  245. package/dist/select/types.d.ts +7 -3
  246. package/dist/select/types.d.ts.map +1 -1
  247. package/dist/select/utils.d.ts +0 -2
  248. package/dist/select/utils.d.ts.map +1 -1
  249. package/dist/slider/index.js +2 -2
  250. package/dist/suggest-checklist/index.js +4 -4
  251. package/dist/switch/index.js +2 -2
  252. package/dist/table/index.d.ts +0 -1
  253. package/dist/table/index.d.ts.map +1 -1
  254. package/dist/table/index.js +24 -25
  255. package/dist/tabs/index.js +1 -1
  256. package/dist/tag/index.js +1 -1
  257. package/dist/textarea/Component.d.ts +8 -1
  258. package/dist/textarea/Component.d.ts.map +1 -1
  259. package/dist/textarea/index.js +111 -106
  260. package/dist/textarea/index.js.map +1 -1
  261. package/dist/textarea/types.d.ts +3 -2
  262. package/dist/textarea/types.d.ts.map +1 -1
  263. package/dist/time-field/index.js +3 -3
  264. package/dist/time-field/types.d.ts +1 -6
  265. package/dist/time-field/types.d.ts.map +1 -1
  266. package/dist/toast/index.js +2 -2
  267. package/dist/tooltip/index.js +1 -1
  268. package/dist/typography/index.js +1 -1
  269. package/dist/{utils-DrTtzDsS.js → utils-qHAuIhao.js} +3 -3
  270. package/dist/{utils-DrTtzDsS.js.map → utils-qHAuIhao.js.map} +1 -1
  271. package/dist/vertical-tabs/index.js +1 -1
  272. package/package.json +15 -1
  273. package/src/autocomplete/types.ts +1 -1
  274. package/src/button/docs/Description.md +9 -8
  275. package/src/button/docs/cssVariables.ts +1 -0
  276. package/src/button/types.ts +2 -0
  277. package/src/cascade-menu/docs/Example.md +1 -1
  278. package/src/cascade-menu/docs/cssVariables.ts +5 -0
  279. package/src/color-field/docs/Description.md +46 -0
  280. package/src/color-field/docs/Example.md +5 -0
  281. package/src/color-field/docs/cssVariables.ts +34 -0
  282. package/src/color-field/types.ts +66 -0
  283. package/src/color-picker/docs/Description.md +18 -36
  284. package/src/color-picker/docs/Example.md +1 -1
  285. package/src/color-picker/docs/cssVariables.ts +4 -32
  286. package/src/color-picker/types.ts +20 -46
  287. package/src/combobox/docs/Description.md +10 -10
  288. package/src/data-table/docs/cssVariables.ts +9 -0
  289. package/src/date-picker/types.ts +1 -6
  290. package/src/date-range-picker/types.ts +1 -6
  291. package/src/dropzone/docs/cssVariables.ts +1 -0
  292. package/src/ds/typography/docs/Description.md +0 -7
  293. package/src/ds/typography/docs/Example.md +6 -0
  294. package/src/field/docs/cssVariables.ts +14 -1
  295. package/src/flex-layout/docs/Description.md +8 -9
  296. package/src/flex-layout/types.ts +0 -2
  297. package/src/grid-layout/docs/Description.md +0 -1
  298. package/src/grid-layout/types.ts +0 -2
  299. package/src/input/docs/Description.md +12 -10
  300. package/src/input/docs/cssVariables.ts +1 -0
  301. package/src/input/types.ts +11 -3
  302. package/src/mask/docs/Description.md +48 -0
  303. package/src/mask/docs/Example.md +12 -0
  304. package/src/mask/types.ts +21 -0
  305. package/src/multi-autocomplete/types.ts +1 -1
  306. package/src/multi-select/types.ts +10 -4
  307. package/src/number-input/docs/Description.md +2 -2
  308. package/src/number-input/types.ts +4 -9
  309. package/src/password/docs/Description.md +39 -0
  310. package/src/password/docs/Example.md +10 -0
  311. package/src/password/types.ts +11 -0
  312. package/src/provider/types.ts +4 -0
  313. package/src/select/types.ts +9 -3
  314. package/src/suggest-checklist/docs/cssVariables.ts +4 -0
  315. package/src/table/docs/cssVariables.ts +3 -0
  316. package/src/textarea/docs/Description.md +11 -9
  317. package/src/textarea/docs/cssVariables.ts +1 -0
  318. package/src/textarea/types.ts +3 -2
  319. package/src/time-field/types.ts +1 -6
  320. package/src/toast/docs/Description.md +1 -1
  321. package/src/toast/docs/Example.md +1 -1
  322. package/src/toast/docs/cssVariables.ts +1 -0
  323. package/dist/Component-BZqLGwzc.js +0 -128
  324. package/dist/Component-BZqLGwzc.js.map +0 -1
  325. package/dist/Component-C24OpTxW.js +0 -92
  326. package/dist/Component-C24OpTxW.js.map +0 -1
  327. package/dist/Component-DH7wdC3G.js.map +0 -1
  328. package/dist/Component-DOlDNQnu.js.map +0 -1
  329. package/dist/Component-DSAL6avh.js +0 -179
  330. package/dist/Component-DSAL6avh.js.map +0 -1
  331. package/dist/Component-DpACJ8IJ.js +0 -155
  332. package/dist/Component-DpACJ8IJ.js.map +0 -1
  333. package/dist/color-picker/FormColorPicker.d.ts +0 -6
  334. package/dist/color-picker/FormColorPicker.d.ts.map +0 -1
  335. package/dist/color-picker/theme.d.ts.map +0 -1
  336. package/dist/hooks-CekMiYbX.js.map +0 -1
  337. package/dist/modal-hub/ModalHub.d.ts.map +0 -1
@@ -1,67 +1,41 @@
1
- import { type Ref } from 'react';
1
+ import { type ComponentPropsWithRef, type Ref } from 'react';
2
2
 
3
3
  import { type IDataTestIdProps } from '@ds/common';
4
4
 
5
- import { type IFieldStateProps } from '@/field/types';
6
- import { type IFormFieldLayoutProps } from '@/form/types';
7
-
8
- /** ColorPicker size. */
9
- export type TColorPickerSize = 'sm' | 'md' | 'lg';
10
-
11
- /** Visual variant. */
12
- export type TColorPickerVariant = 'primary';
13
-
14
- /** Theme inputs. */
15
- export interface IColorPickerThemeProps {
16
- /** Control size. Inside Field, inherits `Field.size` when omitted. */
17
- size?: TColorPickerSize;
18
- /** Visual variant. */
19
- variant?: TColorPickerVariant;
20
- }
21
-
22
5
  /** Own / chrome props (not from RAC). */
23
6
  export interface IColorPickerOwnProps extends IDataTestIdProps {
24
- /** Clear button for the current value. */
25
- clear?: boolean;
26
7
  /**
27
- * Preset swatches inside the popover.
8
+ * Preset swatches.
28
9
  * Values that are not colors are dropped. No row when empty.
29
10
  */
30
11
  presets?: string[];
31
- /** Class name on the root. */
32
- className?: string;
33
- /** Ref to the field group (React 19 prop). */
12
+ /**
13
+ * Hue in degrees for a gray color.
14
+ * The field keeps it so the slider survives a closed popover.
15
+ */
16
+ hue?: number;
17
+ /** Ref to the palette root (React 19 prop). */
34
18
  ref?: Ref<HTMLDivElement>;
35
- /** Ref to the hex input (React 19 prop). */
36
- inputRef?: Ref<HTMLInputElement>;
37
- id?: string;
38
19
  'aria-label'?: string;
39
- 'aria-labelledby'?: string;
40
- 'aria-describedby'?: string;
41
- 'aria-invalid'?: boolean | 'true' | 'false';
42
20
  }
43
21
 
44
22
  /** Control state (our names, not RAC). */
45
23
  export interface IColorPickerControlProps {
46
- /** `#rrggbb` or `''`. */
24
+ /** `#rrggbb` or `''`. Empty shows a gray draft and is not emitted. */
47
25
  value?: string;
48
26
  /** `#rrggbb` or `''`. */
49
27
  defaultValue?: string;
50
- /** `''` or canonical `#rrggbb`. */
28
+ /** Canonical `#rrggbb`. Empty is never emitted. */
51
29
  onChange?: (value: string) => void;
52
- onBlur?: () => void;
53
- }
54
-
55
- export interface IColorPickerBaseProps
56
- extends IColorPickerThemeProps, IFieldStateProps, IColorPickerOwnProps, IColorPickerControlProps {}
57
-
58
- export interface IColorPickerProps extends IColorPickerBaseProps {}
59
-
60
- /** Content slice for FormColorPicker. */
61
- export interface IColorPickerContentProps {
62
- clear?: boolean;
63
- presets?: string[];
30
+ /** Live `#rrggbb` while the pointer is down. Not a commit. */
31
+ onPreview?: (value: string) => void;
32
+ /** Hue channel after a palette change. */
33
+ onHueChange?: (hue: number) => void;
34
+ disabled?: boolean;
64
35
  }
65
36
 
66
- export interface IFormColorPickerProps
67
- extends IFormFieldLayoutProps, Pick<IColorPickerThemeProps, 'variant'>, IColorPickerContentProps {}
37
+ export interface IColorPickerProps
38
+ extends
39
+ Omit<ComponentPropsWithRef<'div'>, keyof IColorPickerOwnProps | keyof IColorPickerControlProps | 'children'>,
40
+ IColorPickerOwnProps,
41
+ IColorPickerControlProps {}
@@ -14,14 +14,14 @@ import { Select } from '@ensi-platform/admin-ui/select';
14
14
 
15
15
  ## API (short)
16
16
 
17
- No props for app code.
17
+ No props for app code. Inside the package: `readCssPx`, `useComboboxListMetrics`, `isInteractiveTarget`, `resolveSelectedOptions`, `toKeyList`.
18
18
 
19
- | Primitive | Import |
20
- | -------------------------- | --------------------------------------------------- |
21
- | `Select` | `@ensi-platform/admin-ui/select` |
22
- | `MultiSelect` | `@ensi-platform/admin-ui/multi-select` |
23
- | `Autocomplete` | `@ensi-platform/admin-ui/autocomplete` |
24
- | `MultiAutocomplete` | `@ensi-platform/admin-ui/multi-autocomplete` |
25
- | `AutocompleteAsync` | `@ensi-platform/admin-ui/autocomplete-async` |
26
- | `MultiAutocompleteAsync` | `@ensi-platform/admin-ui/multi-autocomplete-async` |
27
- | `SuggestChecklist` | `@ensi-platform/admin-ui/suggest-checklist` |
19
+ | Primitive | Import |
20
+ | ------------------------ | -------------------------------------------------- |
21
+ | `Select` | `@ensi-platform/admin-ui/select` |
22
+ | `MultiSelect` | `@ensi-platform/admin-ui/multi-select` |
23
+ | `Autocomplete` | `@ensi-platform/admin-ui/autocomplete` |
24
+ | `MultiAutocomplete` | `@ensi-platform/admin-ui/multi-autocomplete` |
25
+ | `AutocompleteAsync` | `@ensi-platform/admin-ui/autocomplete-async` |
26
+ | `MultiAutocompleteAsync` | `@ensi-platform/admin-ui/multi-autocomplete-async` |
27
+ | `SuggestChecklist` | `@ensi-platform/admin-ui/suggest-checklist` |
@@ -0,0 +1,9 @@
1
+ /** DataTable CSS variables from semantic tokens (--aui-data-table-*). */
2
+ export const docsCssVariables = `/* CSS variables — DataTable (--aui-data-table-*) */
3
+ --aui-data-table-pad-y-utility: var(--aui-table-pad-y-utility); /* utility cell vertical padding */
4
+ --aui-data-table-pad-x-utility: var(--aui-table-pad-x-utility); /* utility cell horizontal padding */
5
+ --aui-data-table-fg-muted: var(--aui-table-fg-muted); /* muted foreground */
6
+ --aui-data-table-fg-primary: var(--aui-table-fg-primary); /* primary foreground */
7
+ --aui-data-table-border-focus: var(--aui-table-border-focus); /* focus border */
8
+ --aui-data-table-duration-fast: var(--aui-table-duration-fast); /* fast transition duration */
9
+ --aui-data-table-ease-out: var(--aui-table-ease-out); /* ease-out curve */`;
@@ -20,18 +20,13 @@ export interface IDatePickerThemeProps {
20
20
  size?: TDatePickerSize;
21
21
  /** Visual variant. */
22
22
  variant?: TDatePickerVariant;
23
- /**
24
- * Stretch to container width.
25
- * @default true
26
- */
27
- block?: boolean;
28
23
  }
29
24
 
30
25
  /** Own / chrome props (not from RAC). */
31
26
  export interface IDatePickerOwnProps extends IDataTestIdProps {
32
27
  /** Clear button for the current value. */
33
28
  clear?: boolean;
34
- /** Class name on the DatePicker root. */
29
+ /** Class name string. RAC `className` may be a function, which `cn` cannot join. */
35
30
  className?: string;
36
31
  /** Ref to the group element (React 19 prop). */
37
32
  ref?: Ref<HTMLDivElement>;
@@ -20,18 +20,13 @@ export interface IDateRangePickerThemeProps {
20
20
  size?: TDateRangePickerSize;
21
21
  /** Visual variant. */
22
22
  variant?: TDateRangePickerVariant;
23
- /**
24
- * Stretch to container width.
25
- * @default true
26
- */
27
- block?: boolean;
28
23
  }
29
24
 
30
25
  /** Own / chrome props (not from RAC). */
31
26
  export interface IDateRangePickerOwnProps extends IDataTestIdProps {
32
27
  /** Clear button for the current value. */
33
28
  clear?: boolean;
34
- /** Class name on the DateRangePicker root. */
29
+ /** Class name string. RAC `className` may be a function, which `cn` cannot join. */
35
30
  className?: string;
36
31
  /** Ref to the group element (React 19 prop). */
37
32
  ref?: Ref<HTMLDivElement>;
@@ -27,6 +27,7 @@ export const docsCssVariables = `/* CSS variables — Dropzone (--aui-dropzone-*
27
27
  --aui-dropzone-preview-w: calc(var(--aui-spacing) * 28); /* image preview width */
28
28
  --aui-dropzone-preview-h: var(--aui-dropzone-preview-w); /* image preview height */
29
29
  --aui-dropzone-progress-h: var(--aui-spacing-4); /* upload progress height */
30
+ --aui-dropzone-skeleton-line-h: var(--aui-spacing-8); /* skeleton text line height */
30
31
  --aui-dropzone-duration-fast: var(--aui-input-duration-fast); /* transition duration (fast) */
31
32
  --aui-dropzone-duration-normal: var(--aui-duration-normal); /* row move duration */
32
33
  --aui-dropzone-ease-out: var(--aui-input-ease-out); /* transition easing */`;
@@ -26,10 +26,3 @@ import { typographyStyles } from '@ensi-platform/admin-ui/typography';
26
26
  Tokens: `--aui-font-family`, `--aui-font-size-xs…2xl`, `--aui-font-weight-regular|medium|semibold`, `--aui-line-height-xs…2xl|tight|normal`.
27
27
 
28
28
  `label*` — later.
29
-
30
- ## Example
31
-
32
- ```tsx
33
- <h1 className={typographyStyles.headingM}>Orders</h1>
34
- <p className={typographyStyles.bodyM}>Interface text</p>
35
- ```
@@ -0,0 +1,6 @@
1
+ ## Example
2
+
3
+ ```tsx
4
+ <h1 className={typographyStyles.headingM}>Orders</h1>
5
+ <p className={typographyStyles.bodyM}>Interface text</p>
6
+ ```
@@ -6,4 +6,17 @@ export const docsCssVariables = `/* CSS variables — Field (--aui-field-*) */
6
6
 
7
7
  --aui-field-label-fg: var(--aui-page-fg-primary); /* label foreground */
8
8
  --aui-field-hint-fg: var(--aui-page-fg-muted); /* hint foreground */
9
- --aui-field-error-fg: var(--aui-control-fg-danger); /* error foreground */`;
9
+ --aui-field-error-fg: var(--aui-control-fg-danger); /* error foreground */
10
+
11
+ --aui-field-clear-radius-md: var(--aui-control-radius-sm); /* clear control radius */
12
+ --aui-field-clear-icon-size-sm: var(--aui-combobox-icon-size-sm); /* clear icon sm */
13
+ --aui-field-clear-icon-size-md: var(--aui-combobox-icon-size-md); /* clear icon md */
14
+ --aui-field-clear-icon-size-lg: var(--aui-combobox-icon-size-lg); /* clear icon lg */
15
+ --aui-field-clear-icon-hit-sm: var(--aui-combobox-icon-hit-sm); /* clear hit sm */
16
+ --aui-field-clear-icon-hit-md: var(--aui-combobox-icon-hit-md); /* clear hit md */
17
+ --aui-field-clear-icon-hit-lg: var(--aui-combobox-icon-hit-lg); /* clear hit lg */
18
+ --aui-field-clear-fg-muted: var(--aui-combobox-fg-muted); /* clear icon muted */
19
+ --aui-field-clear-fg-primary: var(--aui-combobox-fg-primary); /* clear icon hover */
20
+ --aui-field-clear-border-focus: var(--aui-combobox-border-focus); /* clear focus ring */
21
+ --aui-field-clear-duration-fast: var(--aui-control-duration-fast); /* clear transition duration */
22
+ --aui-field-clear-ease-out: var(--aui-control-ease-out); /* clear transition easing */`;
@@ -14,14 +14,13 @@ Equal field columns use `GridLayout`.
14
14
 
15
15
  ## API (short)
16
16
 
17
- | Prop | Values | Default | Description |
18
- | ------------ | --------------------------------------------- | --------- | ------------------------------ |
19
- | `direction` | `row` \| `column` | `row` | axis |
20
- | `gap` | `0` \| `4` \| `8` \| `12` \| `16` \| … \| `64` | `16` | gap, a spacing-scale step |
21
- | `align` | `start` \| `center` \| `end` \| `stretch` | `stretch` | cross-axis alignment |
22
- | `justify` | `start` \| `center` \| `end` \| `between` | `start` | main-axis distribution |
23
- | `wrap` | `boolean` | `false` | wrap onto the next line |
24
- | `hidden` | `boolean` | `false` | removes the row from layout |
25
- | `dataTestId` | `string` | — | `data-test-id` for tests |
17
+ | Prop | Values | Default | Description |
18
+ | ------------ | ---------------------------------------------- | --------- | ------------------------- |
19
+ | `direction` | `row` \| `column` | `row` | axis |
20
+ | `gap` | `0` \| `4` \| `8` \| `12` \| `16` \| … \| `64` | `16` | gap, a spacing-scale step |
21
+ | `align` | `start` \| `center` \| `end` \| `stretch` | `stretch` | cross-axis alignment |
22
+ | `justify` | `start` \| `center` \| `end` \| `between` | `start` | main-axis distribution |
23
+ | `wrap` | `boolean` | `false` | wrap onto the next line |
24
+ | `dataTestId` | `string` | — | `data-test-id` for tests |
26
25
 
27
26
  `FlexLayout.Item` `grow` takes the free space on the main axis.
@@ -27,8 +27,6 @@ export interface IFlexLayoutOwnProps extends IDataTestIdProps {
27
27
  justify?: TFlexLayoutJustify;
28
28
  /** Wrap items onto the next line. */
29
29
  wrap?: boolean;
30
- /** Removes the layout from the page. */
31
- hidden?: boolean;
32
30
  /** Ref to the layout (React 19 prop). */
33
31
  ref?: Ref<HTMLDivElement>;
34
32
  }
@@ -19,7 +19,6 @@ import { GridLayout } from '@ensi-platform/admin-ui/grid-layout';
19
19
  | `gap` | `0` \| `4` \| `8` \| `12` \| `16` \| … \| `64` | `16` | gap, a spacing-scale step |
20
20
  | `col` | `number` \| `full` | — | span when nested in another grid |
21
21
  | `align` | `start` \| `center` \| `end` \| `stretch` | `stretch` | cross-axis alignment |
22
- | `hidden` | `boolean` | `false` | removes the grid from layout |
23
22
  | `dataTestId` | `string` | — | `data-test-id` for tests |
24
23
 
25
24
  `GridLayout.Item` `col` is how many columns to take. `full` crosses the grid. A number in `cols` makes equal `minmax(0, 1fr)` columns. A number inside a track list is `Nfr`; a string is used as written (`minmax(0, 1fr)`).
@@ -25,8 +25,6 @@ export interface IGridLayoutOwnProps extends IDataTestIdProps {
25
25
  col?: TGridLayoutCol;
26
26
  /** Cross-axis alignment. */
27
27
  align?: TGridLayoutAlign;
28
- /** Removes the grid from the layout. */
29
- hidden?: boolean;
30
28
  /** Ref to the grid (React 19 prop). */
31
29
  ref?: Ref<HTMLDivElement>;
32
30
  }
@@ -21,23 +21,25 @@ import { Input, FormInput } from '@ensi-platform/admin-ui/input';
21
21
  | `disabled` | `boolean` | `false` | disabled (no focus, no selection) |
22
22
  | `readOnly` | `boolean` | `false` | visible and copyable, not editable |
23
23
  | `clear` | `boolean` | `false` | clear button → `onChange` with `''` |
24
+ | `leftAddon` | `ReactNode` | — | slot before the field; click focuses it |
25
+ | `rightAddon` | `ReactNode` | — | slot after the clear button |
24
26
  | `placeholder` | `string` | — | placeholder |
25
27
  | `type` | HTML `type` | — | input type |
26
28
  | `dataTestId` | `string` | — | `data-test-id` for tests |
27
29
 
28
- No `as` / prefix/suffix.
30
+ `Input.AddonButton` is the in-slot button (`type="button"`). When `disabled`, slots stay visible but ignore clicks.
29
31
 
30
32
  ### FormInput
31
33
 
32
- | Prop | Values | Default | Description |
33
- | ------------ | -------------------- | ------- | ------------------------ |
34
- | `name` | `string` | — | field name in `Form` |
35
- | `label` | `ReactNode` | — | label (`Field.Label`) |
36
- | `hint` | `ReactNode` | — | hint |
37
- | `clear` | `boolean` | — | clear button |
38
- | `size` | `sm` \| `md` \| `lg` | `md` | size (on Field) |
39
- | `disabled` | `boolean` | — | disabled |
34
+ | Prop | Values | Default | Description |
35
+ | ------------ | -------------------- | ------- | ---------------------------------- |
36
+ | `name` | `string` | — | field name in `Form` |
37
+ | `label` | `ReactNode` | — | label (`Field.Label`) |
38
+ | `hint` | `ReactNode` | — | hint |
39
+ | `clear` | `boolean` | — | clear button |
40
+ | `size` | `sm` \| `md` \| `lg` | `md` | size (on Field) |
41
+ | `disabled` | `boolean` | — | disabled |
40
42
  | `readOnly` | `boolean` | — | visible and copyable, not editable |
41
- | `dataTestId` | `string` | — | `data-test-id` for tests |
43
+ | `dataTestId` | `string` | — | `data-test-id` for tests |
42
44
 
43
45
  value / onChange / onBlur / validity come from `Form`.
@@ -12,6 +12,7 @@ export const docsCssVariables = `/* CSS variables — Input (--aui-input-*) */
12
12
  --aui-input-h-sm: var(--aui-control-h-sm); /* height sm */
13
13
  --aui-input-h-md: var(--aui-control-h-md); /* height md */
14
14
  --aui-input-h-lg: var(--aui-control-h-lg); /* height lg */
15
+ --aui-input-gap-md: var(--aui-spacing-8); /* gap between addon and the control */
15
16
  --aui-input-pad-x-sm: var(--aui-spacing-8); /* padding-x sm */
16
17
  --aui-input-pad-x-md: var(--aui-spacing-12); /* padding-x md */
17
18
  --aui-input-pad-x-lg: var(--aui-spacing-16); /* padding-x lg */
@@ -1,4 +1,4 @@
1
- import { type Ref } from 'react';
1
+ import { type ReactNode, type Ref } from 'react';
2
2
 
3
3
  import { type InputProps as RacInputProps } from 'react-aria-components';
4
4
 
@@ -19,8 +19,16 @@ export interface IInputThemeProps {
19
19
  variant?: TInputVariant;
20
20
  }
21
21
 
22
+ /** Slots inside the control row, not the Field shell. */
23
+ export interface IControlAddonProps {
24
+ /** Content before the control. */
25
+ leftAddon?: ReactNode;
26
+ /** Content after the control. Rendered after the clear button. */
27
+ rightAddon?: ReactNode;
28
+ }
29
+
22
30
  /** Own / chrome props (not from RAC). */
23
- export interface IInputOwnProps extends IDataTestIdProps {
31
+ export interface IInputOwnProps extends IDataTestIdProps, IControlAddonProps {
24
32
  /** Clear button for the current value. */
25
33
  clear?: boolean;
26
34
  /** Visible and copyable, but not editable. Not `disabled`. */
@@ -40,7 +48,7 @@ export interface IInputProps extends IInputBaseProps, Omit<RacInputProps, keyof
40
48
  export type TInputFormRacOmit =
41
49
  TInputRacOmit | keyof IInputBaseProps | 'value' | 'defaultValue' | 'onChange' | 'onBlur' | 'name' | 'className';
42
50
 
43
- export interface IInputContentProps extends Omit<RacInputProps, TInputFormRacOmit> {
51
+ export interface IInputContentProps extends Omit<RacInputProps, TInputFormRacOmit>, IControlAddonProps {
44
52
  clear?: boolean;
45
53
  /** Visible and copyable, but not editable. Not `disabled`. */
46
54
  readOnly?: boolean;
@@ -0,0 +1,48 @@
1
+ Single-line field that formats input with an IMask pattern. The mask is passed in from outside via `opts`.
2
+
3
+ ```tsx
4
+ import { Mask, FormMask } from '@ensi-platform/admin-ui/mask';
5
+ ```
6
+
7
+ ## When to use
8
+
9
+ - phone, tax id, code, and other text whose format the app defines
10
+ - a date — see `DatePicker`
11
+ - a number — see `NumberInput`
12
+ - free text — see `Input`
13
+
14
+ ## API (short)
15
+
16
+ `value` and `onChange` carry the string as shown in the field, including mask literals. An empty field is `''`. A partial value is emitted immediately. If the mask rewrites the passed `value`, `onChange` fires once with the normalized string. Until the parent stores it, the field keeps showing `value`.
17
+
18
+ Pass the same `opts` object between renders: a constant or `useMemo`. A new object on every render makes IMask refresh the mask.
19
+
20
+ ### Mask
21
+
22
+ | Prop | Values | Default | Description |
23
+ | ------------ | -------------------- | ------- | ------------------------------------------- |
24
+ | `opts` | `FactoryOpts` | — | IMask options (`mask`, `blocks`, `prepare`) |
25
+ | `size` | `sm` \| `md` \| `lg` | `md` | size; inside Field inherits `Field.size` |
26
+ | `invalid` | `boolean` | `false` | invalid state |
27
+ | `disabled` | `boolean` | `false` | disabled |
28
+ | `readOnly` | `boolean` | `false` | visible and copyable, not editable |
29
+ | `clear` | `boolean` | `false` | clear button → `onChange` with `''` |
30
+ | `dataTestId` | `string` | — | `data-test-id` for tests |
31
+
32
+ Chrome matches `Input`. No `as`.
33
+
34
+ ### FormMask
35
+
36
+ | Prop | Values | Default | Description |
37
+ | ------------ | -------------------- | ------- | ---------------------------------- |
38
+ | `name` | `string` | — | field name in `Form` |
39
+ | `opts` | `FactoryOpts` | — | IMask options |
40
+ | `label` | `ReactNode` | — | label (`Field.Label`) |
41
+ | `hint` | `ReactNode` | — | hint |
42
+ | `clear` | `boolean` | — | clear button |
43
+ | `size` | `sm` \| `md` \| `lg` | `md` | size (on Field) |
44
+ | `disabled` | `boolean` | — | disabled |
45
+ | `readOnly` | `boolean` | — | visible and copyable, not editable |
46
+ | `dataTestId` | `string` | — | `data-test-id` for tests |
47
+
48
+ value / onChange / onBlur / validity come from `Form`.
@@ -0,0 +1,12 @@
1
+ ## Example
2
+
3
+ ```tsx
4
+ const PHONE_MASK = { mask: '+7 (000) 000-00-00' };
5
+
6
+ <Mask aria-label="Phone" opts={PHONE_MASK} clear />
7
+
8
+ <Form initialValues={{ phone: '' }} onSubmit={save}>
9
+ <FormMask name="phone" label="Phone" opts={PHONE_MASK} clear />
10
+ <Button type="submit">Save</Button>
11
+ </Form>
12
+ ```
@@ -0,0 +1,21 @@
1
+ import { type FactoryOpts } from 'imask';
2
+
3
+ import { type IFormFieldLayoutProps } from '@/form/types';
4
+ import { type IInputContentProps, type IInputProps, type IInputThemeProps } from '@/input';
5
+
6
+ /** IMask options. The mask itself is supplied by the caller. */
7
+ export interface IMaskOwnProps {
8
+ /**
9
+ * IMask factory options (`mask`, `blocks`, `prepare`, …).
10
+ * Keep the same object between renders (`useMemo` or a constant). A new object every render makes IMask refresh.
11
+ */
12
+ opts: FactoryOpts;
13
+ }
14
+
15
+ /** `value` and `onChange` always carry the masked string (not the unmasked or typed value). */
16
+ export interface IMaskProps extends IInputProps, IMaskOwnProps {}
17
+
18
+ /** Content slice for FormMask. */
19
+ export interface IMaskContentProps extends IInputContentProps, IMaskOwnProps {}
20
+
21
+ export interface IFormMaskProps extends IFormFieldLayoutProps, Pick<IInputThemeProps, 'variant'>, IMaskContentProps {}
@@ -4,9 +4,9 @@ import { type ComboBoxProps as RacComboBoxProps } from 'react-aria-components';
4
4
 
5
5
  import { type IDataTestIdProps } from '@ds/common';
6
6
 
7
+ import { type IComboboxOption, type TComboboxSize, type TComboboxValue, type TComboboxVariant } from '@/combobox/types';
7
8
  import { type IFieldStateProps } from '@/field/types';
8
9
  import { type IFormFieldLayoutProps } from '@/form/types';
9
- import { type IComboboxOption, type TComboboxSize, type TComboboxValue, type TComboboxVariant } from '@/select/types';
10
10
 
11
11
  export type { IComboboxOption, TComboboxSize, TComboboxValue, TComboboxVariant };
12
12
 
@@ -4,18 +4,24 @@ import { type SelectProps as RacSelectProps } from 'react-aria-components';
4
4
 
5
5
  import { type IDataTestIdProps } from '@ds/common';
6
6
 
7
+ import { type IComboboxOption, type TComboboxSize, type TComboboxValue, type TComboboxVariant } from '@/combobox/types';
7
8
  import { type IFieldStateProps } from '@/field/types';
8
9
  import { type IFormFieldLayoutProps } from '@/form/types';
9
- import { type IComboboxOption, type TComboboxSize, type TComboboxValue, type TComboboxVariant } from '@/select/types';
10
10
 
11
- export type { IComboboxOption, TComboboxSize, TComboboxValue, TComboboxVariant };
11
+ /** MultiSelect size. */
12
+ export type TMultiSelectSize = TComboboxSize;
13
+
14
+ /** Visual variant. */
15
+ export type TMultiSelectVariant = TComboboxVariant;
16
+
17
+ export type { IComboboxOption, TComboboxValue };
12
18
 
13
19
  /** Theme inputs. */
14
20
  export interface IMultiSelectThemeProps {
15
21
  /** MultiSelect size. */
16
- size?: TComboboxSize;
22
+ size?: TMultiSelectSize;
17
23
  /** Visual variant. */
18
- variant?: TComboboxVariant;
24
+ variant?: TMultiSelectVariant;
19
25
  }
20
26
 
21
27
  /** Control state (our names, not RAC). */
@@ -19,7 +19,7 @@ import { NumberInput, FormNumberInput } from '@ensi-platform/admin-ui/number-inp
19
19
  | `value` / `onChange` | `number \| null` | — | controlled; `null` means empty |
20
20
  | `defaultValue` | `number \| null` | — | uncontrolled initial |
21
21
  | `min` / `max` / `step` | `number` | — | bounds and step |
22
- | `prefix` / `suffix` | `ReactNode` | — | content before/after the field |
22
+ | `leftAddon` / `rightAddon` | `ReactNode` | — | slot before the field and after clear |
23
23
  | `clear` | `boolean` | `false` | clear → `onChange(null)` |
24
24
  | `size` | `sm` \| `md` \| `lg` | `md` | size |
25
25
  | `invalid` | `boolean` | `false` | invalid state |
@@ -43,6 +43,6 @@ No stepper in v1.
43
43
  | `disabled` | `boolean` | — | disabled |
44
44
  | `readOnly` | `boolean` | — | visible and copyable, not editable |
45
45
  | `min` / `max` / `step` | `number` | — | bounds and step |
46
- | `prefix` / `suffix` | `ReactNode` | — | content before/after the field |
46
+ | `leftAddon` / `rightAddon` | `ReactNode` | — | slot before the field and after clear |
47
47
  | `formatOptions` | `Intl.NumberFormatOptions` | — | display/parse |
48
48
  | `dataTestId` | `string` | — | `data-test-id` for tests |
@@ -1,4 +1,4 @@
1
- import { type FocusEventHandler, type ReactNode, type Ref } from 'react';
1
+ import { type FocusEventHandler, type Ref } from 'react';
2
2
 
3
3
  import { type NumberFieldProps as RacNumberFieldProps } from 'react-aria-components';
4
4
 
@@ -6,6 +6,7 @@ import { type IDataTestIdProps } from '@ds/common';
6
6
 
7
7
  import { type IFieldStateProps } from '@/field/types';
8
8
  import { type IFormFieldLayoutProps } from '@/form/types';
9
+ import { type IControlAddonProps } from '@/input';
9
10
 
10
11
  export type TNumberInputSize = 'sm' | 'md' | 'lg';
11
12
 
@@ -37,11 +38,7 @@ export interface INumberInputControlProps {
37
38
  }
38
39
 
39
40
  /** Own / chrome props (not from RAC). */
40
- export interface INumberInputOwnProps extends IDataTestIdProps {
41
- /** Content before the input. */
42
- prefix?: ReactNode;
43
- /** Content after the input (currency, unit, …). */
44
- suffix?: ReactNode;
41
+ export interface INumberInputOwnProps extends IDataTestIdProps, IControlAddonProps {
45
42
  /** Clear button for the current value. */
46
43
  clear?: boolean;
47
44
  /** Visible and copyable, but not editable. Not `disabled`. */
@@ -59,9 +56,7 @@ export interface INumberInputOwnProps extends IDataTestIdProps {
59
56
  }
60
57
 
61
58
  /** Content slice for FormNumberInput. */
62
- export interface INumberInputContentProps {
63
- prefix?: ReactNode;
64
- suffix?: ReactNode;
59
+ export interface INumberInputContentProps extends IControlAddonProps {
65
60
  clear?: boolean;
66
61
  /** Visible and copyable, but not editable. Not `disabled`. */
67
62
  readOnly?: boolean;
@@ -0,0 +1,39 @@
1
+ Password field on `Input` with a reveal button.
2
+
3
+ ```tsx
4
+ import { Password, FormPassword } from '@ensi-platform/admin-ui/password';
5
+ ```
6
+
7
+ ## When to use
8
+
9
+ - a secret the user can reveal for a moment
10
+ - plain text — see `Input`
11
+
12
+ ## API (short)
13
+
14
+ ### Password
15
+
16
+ | Prop | Values | Default | Description |
17
+ | -------------- | ----------- | ------------------ | ------------------------------------------ |
18
+ | `leftAddon` | `ReactNode` | — | slot before the field |
19
+ | `rightAddon` | `ReactNode` | — | slot after clear, before the reveal button |
20
+ | `clear` | `boolean` | `false` | clear button before the right slot |
21
+ | `disabled` | `boolean` | `false` | disabled; no reveal button |
22
+ | `readOnly` | `boolean` | `false` | visible and copyable; no reveal button |
23
+ | `autoComplete` | `string` | `current-password` | overridable |
24
+ | `dataTestId` | `string` | — | `data-test-id` for tests |
25
+
26
+ Visibility stays inside the component. There is no `type` prop.
27
+
28
+ ### FormPassword
29
+
30
+ | Prop | Values | Default | Description |
31
+ | ---------- | ----------- | ------- | --------------------- |
32
+ | `name` | `string` | — | field name in `Form` |
33
+ | `label` | `ReactNode` | — | label (`Field.Label`) |
34
+ | `hint` | `ReactNode` | — | hint |
35
+ | `clear` | `boolean` | — | clear button |
36
+ | `disabled` | `boolean` | — | disabled |
37
+ | `readOnly` | `boolean` | — | read-only |
38
+
39
+ value / onChange / onBlur / validity come from `Form`.
@@ -0,0 +1,10 @@
1
+ ## Example
2
+
3
+ ```tsx
4
+ <Password aria-label="Password" />
5
+
6
+ <Form initialValues={{ password: '' }} onSubmit={save}>
7
+ <FormPassword name="password" label="Password" />
8
+ <Button type="submit">Save</Button>
9
+ </Form>
10
+ ```
@@ -0,0 +1,11 @@
1
+ import { type IFormFieldLayoutProps } from '@/form/types';
2
+ import { type IInputContentProps, type IInputProps, type IInputThemeProps } from '@/input';
3
+
4
+ /** Password props. `type` is owned by the visibility toggle. */
5
+ export interface IPasswordProps extends Omit<IInputProps, 'type'> {}
6
+
7
+ /** Content slice for FormPassword. */
8
+ export interface IPasswordContentProps extends Omit<IInputContentProps, 'type'> {}
9
+
10
+ export interface IFormPasswordProps
11
+ extends IFormFieldLayoutProps, Pick<IInputThemeProps, 'variant'>, IPasswordContentProps {}
@@ -34,6 +34,10 @@ export interface IAuiLabels {
34
34
  colorPalette: string;
35
35
  /** ColorPicker: preset swatch list accessible name. */
36
36
  colorPresets: string;
37
+ /** Password: reveal the value. */
38
+ showPassword: string;
39
+ /** Password: hide the value. */
40
+ hidePassword: string;
37
41
  /** Table.PageSize: label before the select. */
38
42
  pageSize: string;
39
43
  /** Table.Pagination: previous-page control label. */
@@ -8,14 +8,20 @@ import { type IComboboxOption, type TComboboxSize, type TComboboxValue, type TCo
8
8
  import { type IFieldStateProps } from '@/field/types';
9
9
  import { type IFormFieldLayoutProps } from '@/form/types';
10
10
 
11
- export type { IComboboxOption, TComboboxSize, TComboboxValue, TComboboxVariant };
11
+ /** Select size. */
12
+ export type TSelectSize = TComboboxSize;
13
+
14
+ /** Visual variant. */
15
+ export type TSelectVariant = TComboboxVariant;
16
+
17
+ export type { IComboboxOption, TComboboxValue };
12
18
 
13
19
  /** Theme inputs. */
14
20
  export interface ISelectThemeProps {
15
21
  /** Select size. */
16
- size?: TComboboxSize;
22
+ size?: TSelectSize;
17
23
  /** Visual variant. */
18
- variant?: TComboboxVariant;
24
+ variant?: TSelectVariant;
19
25
  }
20
26
 
21
27
  /** Control state (our names, not RAC). */