@ensi-platform/admin-ui 0.12.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 (268) hide show
  1. package/dist/{Component-eoUrqznD.js → Component-B6OSgrmp.js} +3 -3
  2. package/dist/Component-B6OSgrmp.js.map +1 -0
  3. package/dist/{Component-CDURmZCP.js → Component-BBzbDcdq.js} +2 -2
  4. package/dist/{Component-CDURmZCP.js.map → Component-BBzbDcdq.js.map} +1 -1
  5. package/dist/Component-BJc8tKRD.js +169 -0
  6. package/dist/Component-BJc8tKRD.js.map +1 -0
  7. package/dist/Component-BhZC1r4b.js +134 -0
  8. package/dist/Component-BhZC1r4b.js.map +1 -0
  9. package/dist/{Component-dmSX0Khf.js → Component-BoAQ166N.js} +3 -3
  10. package/dist/{Component-dmSX0Khf.js.map → Component-BoAQ166N.js.map} +1 -1
  11. package/dist/{Component-jzDbWkuj.js → Component-CMdJyqc-.js} +2 -2
  12. package/dist/{Component-jzDbWkuj.js.map → Component-CMdJyqc-.js.map} +1 -1
  13. package/dist/{Component-DWp04UBh.js → Component-CS-9-L8S.js} +3 -3
  14. package/dist/Component-CS-9-L8S.js.map +1 -0
  15. package/dist/{Component-D_c3xBcb.js → Component-CiwX3wP8.js} +2 -2
  16. package/dist/{Component-D_c3xBcb.js.map → Component-CiwX3wP8.js.map} +1 -1
  17. package/dist/{Component-DhE4a93B.js → Component-DV6H96-0.js} +37 -35
  18. package/dist/Component-DV6H96-0.js.map +1 -0
  19. package/dist/{Component-CBnhxD86.js → Component-DmKmX7so.js} +3 -4
  20. package/dist/{Component-CBnhxD86.js.map → Component-DmKmX7so.js.map} +1 -1
  21. package/dist/Component-kqMyROjC.js +162 -0
  22. package/dist/Component-kqMyROjC.js.map +1 -0
  23. package/dist/EyeOff-gqqijMR1.js +57 -0
  24. package/dist/EyeOff-gqqijMR1.js.map +1 -0
  25. package/dist/action-popup/index.js +2 -2
  26. package/dist/active-filters/index.js +2 -2
  27. package/dist/arrangement-settings/index.js +3 -3
  28. package/dist/assets/Component13.css +1 -1
  29. package/dist/assets/Component16.css +1 -1
  30. package/dist/assets/Component5.css +1 -1
  31. package/dist/assets/Component9.css +1 -1
  32. package/dist/assets/index.css +1 -1
  33. package/dist/assets/index10.css +1 -1
  34. package/dist/assets/index11.css +1 -1
  35. package/dist/assets/index12.css +1 -1
  36. package/dist/assets/index13.css +1 -1
  37. package/dist/assets/index14.css +1 -1
  38. package/dist/assets/index15.css +1 -1
  39. package/dist/assets/index16.css +1 -1
  40. package/dist/assets/index17.css +1 -1
  41. package/dist/assets/index18.css +1 -1
  42. package/dist/assets/index19.css +1 -1
  43. package/dist/assets/index20.css +1 -1
  44. package/dist/assets/index21.css +1 -1
  45. package/dist/assets/index22.css +1 -1
  46. package/dist/assets/index23.css +1 -1
  47. package/dist/assets/index24.css +1 -1
  48. package/dist/assets/index25.css +1 -1
  49. package/dist/assets/index26.css +1 -1
  50. package/dist/assets/index27.css +1 -1
  51. package/dist/assets/index28.css +1 -1
  52. package/dist/assets/index29.css +1 -1
  53. package/dist/assets/index3.css +1 -1
  54. package/dist/assets/index30.css +1 -1
  55. package/dist/assets/index31.css +1 -1
  56. package/dist/assets/index32.css +1 -1
  57. package/dist/assets/index33.css +1 -1
  58. package/dist/assets/index34.css +1 -0
  59. package/dist/assets/index4.css +1 -1
  60. package/dist/assets/index5.css +1 -1
  61. package/dist/assets/index6.css +1 -1
  62. package/dist/assets/index7.css +1 -1
  63. package/dist/assets/index8.css +1 -1
  64. package/dist/assets/index9.css +1 -1
  65. package/dist/assets/theme2.css +1 -1
  66. package/dist/autocomplete/index.js +2 -2
  67. package/dist/autocomplete/types.d.ts +1 -1
  68. package/dist/autocomplete/types.d.ts.map +1 -1
  69. package/dist/autocomplete/utils.d.ts +1 -3
  70. package/dist/autocomplete/utils.d.ts.map +1 -1
  71. package/dist/autocomplete-async/index.js +2 -2
  72. package/dist/avatar/index.js +1 -1
  73. package/dist/badge/index.js +1 -1
  74. package/dist/bottom-sheet/index.js +2 -2
  75. package/dist/cascade-menu/index.d.ts +0 -3
  76. package/dist/cascade-menu/index.d.ts.map +1 -1
  77. package/dist/cascade-menu/index.js +255 -283
  78. package/dist/cascade-menu/index.js.map +1 -1
  79. package/dist/checkbox/index.js +1 -1
  80. package/dist/checkbox-group/index.js +2 -2
  81. package/dist/color-field/Component.d.ts +1 -1
  82. package/dist/color-field/Component.d.ts.map +1 -1
  83. package/dist/color-field/index.js +60 -59
  84. package/dist/color-field/index.js.map +1 -1
  85. package/dist/color-field/types.d.ts +2 -4
  86. package/dist/color-field/types.d.ts.map +1 -1
  87. package/dist/color-picker/Component.d.ts +1 -1
  88. package/dist/color-picker/Component.d.ts.map +1 -1
  89. package/dist/color-picker/index.js +1 -1
  90. package/dist/color-picker/types.d.ts +2 -4
  91. package/dist/color-picker/types.d.ts.map +1 -1
  92. package/dist/combobox/index.d.ts +0 -2
  93. package/dist/combobox/index.d.ts.map +1 -1
  94. package/dist/combobox/index.js +15 -17
  95. package/dist/copy-button/index.js +1 -1
  96. package/dist/data-table/index.js +3 -3
  97. package/dist/date-picker/index.js +4 -4
  98. package/dist/date-picker/types.d.ts +1 -6
  99. package/dist/date-picker/types.d.ts.map +1 -1
  100. package/dist/date-range-picker/index.js +4 -4
  101. package/dist/date-range-picker/types.d.ts +1 -6
  102. package/dist/date-range-picker/types.d.ts.map +1 -1
  103. package/dist/drawer/index.js +1 -1
  104. package/dist/dropzone/index.js +3 -3
  105. package/dist/field/components/Hint/index.d.ts.map +1 -1
  106. package/dist/field/components/Hint/theme.d.ts +0 -1
  107. package/dist/field/components/Hint/theme.d.ts.map +1 -1
  108. package/dist/field/components/Label/index.d.ts.map +1 -1
  109. package/dist/field/components/Label/theme.d.ts +0 -1
  110. package/dist/field/components/Label/theme.d.ts.map +1 -1
  111. package/dist/field/index.js +1 -1
  112. package/dist/filters/index.js +1 -1
  113. package/dist/flex-layout/Component.d.ts +1 -1
  114. package/dist/flex-layout/Component.d.ts.map +1 -1
  115. package/dist/flex-layout/index.js +41 -43
  116. package/dist/flex-layout/index.js.map +1 -1
  117. package/dist/flex-layout/types.d.ts +0 -2
  118. package/dist/flex-layout/types.d.ts.map +1 -1
  119. package/dist/grid-layout/Component.d.ts +1 -1
  120. package/dist/grid-layout/Component.d.ts.map +1 -1
  121. package/dist/grid-layout/index.js +34 -36
  122. package/dist/grid-layout/index.js.map +1 -1
  123. package/dist/grid-layout/types.d.ts +0 -2
  124. package/dist/grid-layout/types.d.ts.map +1 -1
  125. package/dist/{hooks-CekMiYbX.js → hooks-Di5rgHTG.js} +6 -4
  126. package/dist/hooks-Di5rgHTG.js.map +1 -0
  127. package/dist/icons/Eye.d.ts +8 -0
  128. package/dist/icons/Eye.d.ts.map +1 -0
  129. package/dist/icons/EyeOff.d.ts +8 -0
  130. package/dist/icons/EyeOff.d.ts.map +1 -0
  131. package/dist/icons/index.d.ts +2 -0
  132. package/dist/icons/index.d.ts.map +1 -1
  133. package/dist/icons/index.js +26 -23
  134. package/dist/icons/index.js.map +1 -1
  135. package/dist/{index-BccXGF9t.js → index-BAFoUNz-.js} +2 -2
  136. package/dist/{index-BccXGF9t.js.map → index-BAFoUNz-.js.map} +1 -1
  137. package/dist/{index-C_oo7Xm5.js → index-BHUJOcwj.js} +3 -3
  138. package/dist/{index-C_oo7Xm5.js.map → index-BHUJOcwj.js.map} +1 -1
  139. package/dist/{index-DxsuVBkE.js → index-Co6mzXrw.js} +5 -7
  140. package/dist/{index-DxsuVBkE.js.map → index-Co6mzXrw.js.map} +1 -1
  141. package/dist/index-DvSNcGG6.js +45 -0
  142. package/dist/index-DvSNcGG6.js.map +1 -0
  143. package/dist/input/Component.d.ts +8 -1
  144. package/dist/input/Component.d.ts.map +1 -1
  145. package/dist/input/components/Addon/index.d.ts +17 -0
  146. package/dist/input/components/Addon/index.d.ts.map +1 -0
  147. package/dist/input/index.js +2 -2
  148. package/dist/input/types.d.ts +10 -3
  149. package/dist/input/types.d.ts.map +1 -1
  150. package/dist/loader/index.js +2 -2
  151. package/dist/mask/index.js +2 -2
  152. package/dist/menu-list/index.js +1 -1
  153. package/dist/{metrics-Cv_jrA15.js → metrics-CaN_sENu.js} +2 -2
  154. package/dist/{metrics-Cv_jrA15.js.map → metrics-CaN_sENu.js.map} +1 -1
  155. package/dist/modal/index.js +1 -1
  156. package/dist/modal-hub/{ModalHub.d.ts → Component.d.ts} +1 -1
  157. package/dist/modal-hub/Component.d.ts.map +1 -0
  158. package/dist/modal-hub/index.d.ts +1 -1
  159. package/dist/modal-hub/index.d.ts.map +1 -1
  160. package/dist/modal-hub/index.js.map +1 -1
  161. package/dist/multi-autocomplete/index.js +2 -2
  162. package/dist/multi-autocomplete/types.d.ts +1 -1
  163. package/dist/multi-autocomplete/types.d.ts.map +1 -1
  164. package/dist/multi-autocomplete-async/index.js +2 -2
  165. package/dist/multi-select/index.js +4 -4
  166. package/dist/multi-select/index.js.map +1 -1
  167. package/dist/multi-select/types.d.ts +8 -4
  168. package/dist/multi-select/types.d.ts.map +1 -1
  169. package/dist/multi-select/utils.d.ts +1 -5
  170. package/dist/multi-select/utils.d.ts.map +1 -1
  171. package/dist/number-input/Component.d.ts +8 -1
  172. package/dist/number-input/Component.d.ts.map +1 -1
  173. package/dist/number-input/index.js +2 -2
  174. package/dist/number-input/types.d.ts +4 -9
  175. package/dist/number-input/types.d.ts.map +1 -1
  176. package/dist/number-range/index.js +3 -3
  177. package/dist/password/Component.d.ts +5 -0
  178. package/dist/password/Component.d.ts.map +1 -0
  179. package/dist/password/FormPassword.d.ts +6 -0
  180. package/dist/password/FormPassword.d.ts.map +1 -0
  181. package/dist/password/index.d.ts +4 -0
  182. package/dist/password/index.d.ts.map +1 -0
  183. package/dist/password/index.js +95 -0
  184. package/dist/password/index.js.map +1 -0
  185. package/dist/password/types.d.ts +11 -0
  186. package/dist/password/types.d.ts.map +1 -0
  187. package/dist/provider/context.d.ts.map +1 -1
  188. package/dist/provider/index.js +3 -3
  189. package/dist/provider/types.d.ts +4 -0
  190. package/dist/provider/types.d.ts.map +1 -1
  191. package/dist/select/index.js +2 -2
  192. package/dist/select/types.d.ts +7 -3
  193. package/dist/select/types.d.ts.map +1 -1
  194. package/dist/select/utils.d.ts +0 -2
  195. package/dist/select/utils.d.ts.map +1 -1
  196. package/dist/slider/index.js +2 -2
  197. package/dist/suggest-checklist/index.js +4 -4
  198. package/dist/switch/index.js +2 -2
  199. package/dist/table/index.d.ts +0 -1
  200. package/dist/table/index.d.ts.map +1 -1
  201. package/dist/table/index.js +24 -25
  202. package/dist/tabs/index.js +1 -1
  203. package/dist/tag/index.js +1 -1
  204. package/dist/textarea/Component.d.ts +8 -1
  205. package/dist/textarea/Component.d.ts.map +1 -1
  206. package/dist/textarea/index.js +111 -106
  207. package/dist/textarea/index.js.map +1 -1
  208. package/dist/textarea/types.d.ts +3 -2
  209. package/dist/textarea/types.d.ts.map +1 -1
  210. package/dist/time-field/index.js +3 -3
  211. package/dist/time-field/types.d.ts +1 -6
  212. package/dist/time-field/types.d.ts.map +1 -1
  213. package/dist/toast/index.js +2 -2
  214. package/dist/typography/index.js +1 -1
  215. package/dist/{utils-DrTtzDsS.js → utils-qHAuIhao.js} +3 -3
  216. package/dist/{utils-DrTtzDsS.js.map → utils-qHAuIhao.js.map} +1 -1
  217. package/dist/vertical-tabs/index.js +1 -1
  218. package/package.json +5 -1
  219. package/src/autocomplete/types.ts +1 -1
  220. package/src/cascade-menu/docs/Example.md +1 -1
  221. package/src/cascade-menu/docs/cssVariables.ts +5 -0
  222. package/src/color-field/types.ts +3 -4
  223. package/src/color-picker/docs/Description.md +1 -0
  224. package/src/color-picker/types.ts +6 -4
  225. package/src/combobox/docs/Description.md +10 -10
  226. package/src/data-table/docs/cssVariables.ts +9 -0
  227. package/src/date-picker/types.ts +1 -6
  228. package/src/date-range-picker/types.ts +1 -6
  229. package/src/dropzone/docs/cssVariables.ts +1 -0
  230. package/src/ds/typography/docs/Description.md +0 -7
  231. package/src/ds/typography/docs/Example.md +6 -0
  232. package/src/field/docs/cssVariables.ts +14 -1
  233. package/src/flex-layout/docs/Description.md +8 -9
  234. package/src/flex-layout/types.ts +0 -2
  235. package/src/grid-layout/docs/Description.md +0 -1
  236. package/src/grid-layout/types.ts +0 -2
  237. package/src/input/docs/Description.md +12 -10
  238. package/src/input/docs/cssVariables.ts +1 -0
  239. package/src/input/types.ts +11 -3
  240. package/src/multi-autocomplete/types.ts +1 -1
  241. package/src/multi-select/types.ts +10 -4
  242. package/src/number-input/docs/Description.md +2 -2
  243. package/src/number-input/types.ts +4 -9
  244. package/src/password/docs/Description.md +39 -0
  245. package/src/password/docs/Example.md +10 -0
  246. package/src/password/types.ts +11 -0
  247. package/src/provider/types.ts +4 -0
  248. package/src/select/types.ts +9 -3
  249. package/src/suggest-checklist/docs/cssVariables.ts +4 -0
  250. package/src/table/docs/cssVariables.ts +3 -0
  251. package/src/textarea/docs/Description.md +11 -9
  252. package/src/textarea/docs/cssVariables.ts +1 -0
  253. package/src/textarea/types.ts +3 -2
  254. package/src/time-field/types.ts +1 -6
  255. package/src/toast/docs/Description.md +1 -1
  256. package/src/toast/docs/Example.md +1 -1
  257. package/src/toast/docs/cssVariables.ts +1 -0
  258. package/dist/Component-BPAXqDXt.js +0 -155
  259. package/dist/Component-BPAXqDXt.js.map +0 -1
  260. package/dist/Component-BPN5FgKq.js +0 -179
  261. package/dist/Component-BPN5FgKq.js.map +0 -1
  262. package/dist/Component-BuFsNZAH.js +0 -128
  263. package/dist/Component-BuFsNZAH.js.map +0 -1
  264. package/dist/Component-DWp04UBh.js.map +0 -1
  265. package/dist/Component-DhE4a93B.js.map +0 -1
  266. package/dist/Component-eoUrqznD.js.map +0 -1
  267. package/dist/hooks-CekMiYbX.js.map +0 -1
  268. package/dist/modal-hub/ModalHub.d.ts.map +0 -1
@@ -2,7 +2,7 @@ import { C } from "../Component-uzbYiLD9.js";
2
2
  import { jsxs as k, jsx as e } from "react/jsx-runtime";
3
3
  import "react";
4
4
  import { s as v } from "../index-h8z54aFR.js";
5
- import { F as t, u as g } from "../Component-BPN5FgKq.js";
5
+ import { F as t, u as g } from "../Component-BJc8tKRD.js";
6
6
  import { u as y, g as B } from "../useFieldHook-o47pjrRg.js";
7
7
  const H = v((o) => {
8
8
  const { controlProps: r, size: i, invalid: a, disabled: s } = g(), { id: d, "aria-describedby": l, "aria-invalid": n } = r;
@@ -3,9 +3,9 @@ import g from "classnames";
3
3
  import { CheckboxGroup as y } from "react-aria-components";
4
4
  import { s as b } from "../index-h8z54aFR.js";
5
5
  import "react";
6
- import { F as d, u as B } from "../Component-BPN5FgKq.js";
6
+ import { F as d, u as B } from "../Component-BJc8tKRD.js";
7
7
  import { u as H, g as N } from "../useFieldHook-o47pjrRg.js";
8
- import '../assets/index7.css';const _ = "aub_styles-module_root_6f354", j = {
8
+ import '../assets/index8.css';const _ = "aub_styles-module_root_6f354", j = {
9
9
  root: _
10
10
  }, h = b(
11
11
  ({
@@ -1,5 +1,5 @@
1
1
  import { IColorFieldProps } from './types';
2
- export declare const ColorField: (({ ref, inputRef, size, variant, block, invalid, disabled, clear, presets, value, defaultValue, onChange, onBlur, className, dataTestId, id, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, "aria-describedby": ariaDescribedby, "aria-invalid": ariaInvalid, }: IColorFieldProps) => import("react").JSX.Element) & {
2
+ export declare const ColorField: (({ ref, inputRef, size, variant, block, invalid, disabled, clear, presets, value, defaultValue, onChange, onBlur, className, dataTestId, id, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, "aria-describedby": ariaDescribedby, "aria-invalid": ariaInvalid, ...domProps }: IColorFieldProps) => 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/color-field/Component.tsx"],"names":[],"mappings":"AAYA,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAKhD,eAAO,MAAM,UAAU,iRAsBhB,gBAAgB;;CAwLtB,CAAC"}
1
+ {"version":3,"file":"Component.d.ts","sourceRoot":"","sources":["../../../src/color-field/Component.tsx"],"names":[],"mappings":"AAYA,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAKhD,eAAO,MAAM,UAAU,6RAuBhB,gBAAgB;;CAwLtB,CAAC"}
@@ -1,31 +1,31 @@
1
1
  import { jsx as l, jsxs as z } from "react/jsx-runtime";
2
- import { useState as h, useRef as w, useCallback as fe, useEffect as M } from "react";
2
+ import { useState as h, useRef as w, useCallback as pe, useEffect as M } from "react";
3
3
  import k from "classnames";
4
- import { DialogTrigger as pe, Button as U, ColorSwatch as be, Popover as ge, Dialog as he } from "react-aria-components";
5
- import { s as _e } from "../index-h8z54aFR.js";
6
- import { t as Y, C as ye } from "../Component-DhE4a93B.js";
7
- import { C as Ce } from "../Clear-DcxADxz6.js";
8
- import { u as ve } from "../hooks-CekMiYbX.js";
9
- import { cva as xe } from "class-variance-authority";
4
+ import { DialogTrigger as be, Button as U, ColorSwatch as ge, Popover as he, Dialog as _e } from "react-aria-components";
5
+ import { s as ye } from "../index-h8z54aFR.js";
6
+ import { t as Y, C as Ce } from "../Component-DV6H96-0.js";
7
+ import { C as ve } from "../Clear-DcxADxz6.js";
8
+ import { u as xe } from "../hooks-Di5rgHTG.js";
9
+ import { cva as we } from "class-variance-authority";
10
10
  import { typographyStyles as E } from "../typography/index.js";
11
- import { F, u as we } from "../Component-BPN5FgKq.js";
12
- import { u as Fe, g as ke } from "../useFieldHook-o47pjrRg.js";
13
- import '../assets/index15.css';const Ne = "aub_styles-module_root_2023e", Pe = "aub_styles-module_block_88782", Re = "aub_styles-module_group_4501d", He = "aub_styles-module_swatch_7c309", Se = "aub_styles-module_clear_36c5c", $e = "aub_styles-module_sm_27b98", Be = "aub_styles-module_md_2abd6", De = "aub_styles-module_lg_f2dbc", Ee = "aub_styles-module_primary_fed91", ze = "aub_styles-module_swatchColor_8141a", Te = "aub_styles-module_hex_169fb", Le = "aub_styles-module_icon_5c0c1", Ve = "aub_styles-module_popover_24de0", Ge = "aub_styles-module_dialog_788ed", o = {
14
- root: Ne,
15
- block: Pe,
16
- group: Re,
17
- swatch: He,
18
- clear: Se,
19
- sm: $e,
20
- md: Be,
21
- lg: De,
22
- primary: Ee,
23
- swatchColor: ze,
24
- hex: Te,
25
- icon: Le,
26
- popover: Ve,
27
- dialog: Ge
28
- }, Ie = xe(o.group, {
11
+ import { F, u as Fe } from "../Component-BJc8tKRD.js";
12
+ import { u as ke, g as Ne } from "../useFieldHook-o47pjrRg.js";
13
+ import '../assets/index16.css';const Pe = "aub_styles-module_root_2023e", Re = "aub_styles-module_block_88782", He = "aub_styles-module_group_4501d", Se = "aub_styles-module_swatch_7c309", $e = "aub_styles-module_clear_36c5c", Be = "aub_styles-module_sm_27b98", De = "aub_styles-module_md_2abd6", Ee = "aub_styles-module_lg_f2dbc", ze = "aub_styles-module_primary_fed91", Te = "aub_styles-module_swatchColor_8141a", Le = "aub_styles-module_hex_169fb", Ve = "aub_styles-module_icon_5c0c1", Ge = "aub_styles-module_popover_24de0", Ie = "aub_styles-module_dialog_788ed", o = {
14
+ root: Pe,
15
+ block: Re,
16
+ group: He,
17
+ swatch: Se,
18
+ clear: $e,
19
+ sm: Be,
20
+ md: De,
21
+ lg: Ee,
22
+ primary: ze,
23
+ swatchColor: Te,
24
+ hex: Le,
25
+ icon: Ve,
26
+ popover: Ge,
27
+ dialog: Ie
28
+ }, Oe = we(o.group, {
29
29
  variants: {
30
30
  size: {
31
31
  sm: k(o.sm, E.bodyS),
@@ -45,11 +45,11 @@ import '../assets/index15.css';const Ne = "aub_styles-module_root_2023e", Pe = "
45
45
  variant: "primary",
46
46
  block: !0
47
47
  }
48
- }), Oe = /^[0-9a-fA-F]+$/, je = /^(rgb|rgba|hsl|hsla|hsb|hsba)\([^)]+\)$/i, W = (t, r) => {
48
+ }), je = /^[0-9a-fA-F]+$/, Ae = /^(rgb|rgba|hsl|hsla|hsb|hsba)\([^)]+\)$/i, W = (t, r) => {
49
49
  const s = t.trim();
50
50
  if (!s) return r === "settle" ? "" : null;
51
51
  const i = s.startsWith("#") ? s.slice(1) : s;
52
- if (Oe.test(i)) {
52
+ if (je.test(i)) {
53
53
  if (i.length === 6) return `#${i.toLowerCase()}`;
54
54
  if (r === "settle" && i.length === 3) {
55
55
  const [u, a, d] = i.toLowerCase();
@@ -58,13 +58,13 @@ import '../assets/index15.css';const Ne = "aub_styles-module_root_2023e", Pe = "
58
58
  return null;
59
59
  }
60
60
  const c = Y(s);
61
- return !c || r === "live" && !je.test(s) ? null : c;
61
+ return !c || r === "live" && !Ae.test(s) ? null : c;
62
62
  }, X = (t) => {
63
63
  if (t == null || t.trim() === "")
64
64
  return { text: "", hex: null, unrecognized: !1 };
65
65
  const r = Y(t);
66
66
  return r ? { text: r, hex: r, unrecognized: !1 } : { text: "", hex: null, unrecognized: !0 };
67
- }, q = _e(
67
+ }, q = ye(
68
68
  ({
69
69
  ref: t,
70
70
  inputRef: r,
@@ -85,9 +85,10 @@ import '../assets/index15.css';const Ne = "aub_styles-module_root_2023e", Pe = "
85
85
  "aria-label": C,
86
86
  "aria-labelledby": T,
87
87
  "aria-describedby": Q,
88
- "aria-invalid": L
88
+ "aria-invalid": L,
89
+ ...Z
89
90
  }) => {
90
- const { clear: Z, openPalette: ee, colorCode: te, colorPalette: oe } = ve(), V = f !== void 0, [re, le] = h(P ?? ""), p = V ? f : re, m = X(p), [G, b] = h(m.text), [se, g] = h(null), [ae, ne] = h(void 0), [I, ie] = h(0), O = w(null), ce = fe(
91
+ const { clear: ee, openPalette: te, colorCode: oe, colorPalette: re } = xe(), V = f !== void 0, [le, se] = h(P ?? ""), p = V ? f : le, m = X(p), [G, b] = h(m.text), [ae, g] = h(null), [ne, ie] = h(void 0), [I, ce] = h(0), O = w(null), ue = pe(
91
92
  (e) => {
92
93
  if (O.current = e, typeof t == "function") {
93
94
  t(e);
@@ -96,7 +97,7 @@ import '../assets/index15.css';const Ne = "aub_styles-module_root_2023e", Pe = "
96
97
  t && (t.current = e);
97
98
  },
98
99
  [t]
99
- ), $ = w(!1), v = w(!1), B = w(p), j = u || L === !0 || L === "true" || m.unrecognized, D = se ?? m.hex, ue = d && !a && (G !== "" || !!m.hex);
100
+ ), $ = w(!1), v = w(!1), B = w(p), j = u || L === !0 || L === "true" || m.unrecognized, D = ae ?? m.hex, de = d && !a && (G !== "" || !!m.hex);
100
101
  M(() => {
101
102
  B.current = p;
102
103
  }, [p, I]), M(() => {
@@ -105,7 +106,7 @@ import '../assets/index15.css';const Ne = "aub_styles-module_root_2023e", Pe = "
105
106
  b(e.text), g(null);
106
107
  }, [p, I]);
107
108
  const x = (e, n) => {
108
- v.current = !1, g(e || null), b(n !== void 0 && n.toLowerCase() === e ? n : e), B.current !== e && (B.current = e, V || le(e), e !== p && R?.(e));
109
+ v.current = !1, g(e || null), b(n !== void 0 && n.toLowerCase() === e ? n : e), B.current !== e && (B.current = e, V || se(e), e !== p && R?.(e));
109
110
  }, A = (e) => {
110
111
  if (!v.current && e === m.text) return;
111
112
  const n = W(e, "settle");
@@ -114,25 +115,25 @@ import '../assets/index15.css';const Ne = "aub_styles-module_root_2023e", Pe = "
114
115
  return;
115
116
  }
116
117
  x(n);
117
- }, de = (e) => {
118
+ }, me = (e) => {
118
119
  const n = e.target.value;
119
120
  v.current = !0, b(n), g(null);
120
121
  const K = W(n, "live");
121
122
  K && x(K, n);
122
- }, me = (e) => {
123
+ }, fe = (e) => {
123
124
  e.key === "Enter" && (e.preventDefault(), e.stopPropagation(), A(e.currentTarget.value));
124
125
  };
125
- return /* @__PURE__ */ l("div", { className: k(o.root, c && o.block, H), children: /* @__PURE__ */ z(
126
+ return /* @__PURE__ */ l("div", { ...Z, className: k(o.root, c && o.block, H), children: /* @__PURE__ */ z(
126
127
  "div",
127
128
  {
128
- ref: ce,
129
- className: Ie({ size: s, variant: i, block: c }),
129
+ ref: ue,
130
+ className: Oe({ size: s, variant: i, block: c }),
130
131
  "data-invalid": j || void 0,
131
132
  "data-disabled": a || void 0,
132
133
  "data-test-id": y,
133
134
  children: [
134
135
  /* @__PURE__ */ z(
135
- pe,
136
+ be,
136
137
  {
137
138
  onOpenChange: (e) => {
138
139
  e || _?.();
@@ -142,27 +143,27 @@ import '../assets/index15.css';const Ne = "aub_styles-module_root_2023e", Pe = "
142
143
  U,
143
144
  {
144
145
  className: o.swatch,
145
- "aria-label": ee,
146
+ "aria-label": te,
146
147
  isDisabled: a,
147
148
  "data-empty": D ? void 0 : !0,
148
149
  "data-test-id": "color-field-trigger",
149
- children: D ? /* @__PURE__ */ l(be, { className: o.swatchColor, color: D }) : null
150
+ children: D ? /* @__PURE__ */ l(ge, { className: o.swatchColor, color: D }) : null
150
151
  }
151
152
  ),
152
- /* @__PURE__ */ l(ge, { className: o.popover, placement: "bottom start", triggerRef: O, children: /* @__PURE__ */ l(
153
- he,
153
+ /* @__PURE__ */ l(he, { className: o.popover, placement: "bottom start", triggerRef: O, children: /* @__PURE__ */ l(
154
+ _e,
154
155
  {
155
156
  className: o.dialog,
156
- "aria-label": oe,
157
+ "aria-label": re,
157
158
  "data-test-id": "color-field-dialog",
158
159
  children: /* @__PURE__ */ l(
159
- ye,
160
+ Ce,
160
161
  {
161
162
  value: m.hex ?? "",
162
- hue: ae,
163
+ hue: ne,
163
164
  presets: N,
164
165
  disabled: a,
165
- onHueChange: ne,
166
+ onHueChange: ie,
166
167
  onPreview: (e) => {
167
168
  g(e), b(e);
168
169
  },
@@ -180,7 +181,7 @@ import '../assets/index15.css';const Ne = "aub_styles-module_root_2023e", Pe = "
180
181
  ref: r,
181
182
  id: S,
182
183
  className: o.hex,
183
- "aria-label": T ? void 0 : C ?? te,
184
+ "aria-label": T ? void 0 : C ?? oe,
184
185
  "aria-labelledby": T,
185
186
  "aria-describedby": Q,
186
187
  "aria-invalid": j || void 0,
@@ -193,22 +194,22 @@ import '../assets/index15.css';const Ne = "aub_styles-module_root_2023e", Pe = "
193
194
  onFocus: () => {
194
195
  $.current = !0;
195
196
  },
196
- onChange: de,
197
+ onChange: me,
197
198
  onBlur: (e) => {
198
- $.current = !1, A(e.target.value), ie((n) => n + 1), _?.();
199
+ $.current = !1, A(e.target.value), ce((n) => n + 1), _?.();
199
200
  },
200
- onKeyDown: me
201
+ onKeyDown: fe
201
202
  }
202
203
  ),
203
- ue ? /* @__PURE__ */ l(
204
+ de ? /* @__PURE__ */ l(
204
205
  U,
205
206
  {
206
207
  className: o.clear,
207
- "aria-label": Z,
208
+ "aria-label": ee,
208
209
  "data-test-id": "color-field-clear",
209
210
  excludeFromTabOrder: !0,
210
211
  onPress: () => x(""),
211
- children: /* @__PURE__ */ l(Ce, { className: o.icon })
212
+ children: /* @__PURE__ */ l(ve, { className: o.icon })
212
213
  }
213
214
  ) : null
214
215
  ]
@@ -218,7 +219,7 @@ import '../assets/index15.css';const Ne = "aub_styles-module_root_2023e", Pe = "
218
219
  );
219
220
  q.displayName = "ColorField";
220
221
  const J = ({ value: t, onChange: r, onBlur: s, ...i }) => {
221
- const { controlProps: c, size: u, invalid: a, disabled: d } = we();
222
+ const { controlProps: c, size: u, invalid: a, disabled: d } = Fe();
222
223
  return /* @__PURE__ */ l(
223
224
  q,
224
225
  {
@@ -234,7 +235,7 @@ const J = ({ value: t, onChange: r, onBlur: s, ...i }) => {
234
235
  );
235
236
  };
236
237
  J.displayName = "FormColorFieldControl";
237
- const Ae = ({
238
+ const Ke = ({
238
239
  name: t,
239
240
  label: r,
240
241
  hint: s,
@@ -245,7 +246,7 @@ const Ae = ({
245
246
  dataTestId: d,
246
247
  ...N
247
248
  }) => {
248
- const { field: f, fieldState: P, inputProps: R, onChange: _, onBlurHandler: H } = Fe({ name: t }), y = ke(P.error)?.message, S = u ?? R.disabled;
249
+ const { field: f, fieldState: P, inputProps: R, onChange: _, onBlurHandler: H } = ke({ name: t }), y = Ne(P.error)?.message, S = u ?? R.disabled;
249
250
  return /* @__PURE__ */ z(
250
251
  F,
251
252
  {
@@ -276,9 +277,9 @@ const Ae = ({
276
277
  }
277
278
  );
278
279
  };
279
- Ae.displayName = "FormColorField";
280
+ Ke.displayName = "FormColorField";
280
281
  export {
281
282
  q as ColorField,
282
- Ae as FormColorField
283
+ Ke as FormColorField
283
284
  };
284
285
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../src/color-field/theme.ts","../../src/color-field/utils.ts","../../src/color-field/Component.tsx","../../src/color-field/FormColorField.tsx"],"sourcesContent":["import { cva } from 'class-variance-authority';\nimport cn from 'classnames';\n\nimport { typographyStyles } from '@ds/typography';\n\nimport styles from './styles.module.css';\n\nexport const colorFieldGroupVariants = cva(styles.group, {\n variants: {\n size: {\n sm: cn(styles.sm, typographyStyles.bodyS),\n md: cn(styles.md, typographyStyles.bodyS),\n lg: cn(styles.lg, typographyStyles.bodyM),\n },\n variant: {\n primary: styles.primary,\n },\n block: {\n true: styles.block,\n false: null,\n },\n },\n defaultVariants: {\n size: 'md',\n variant: 'primary',\n block: true,\n },\n});\n","import { toHexColor } from '@/color-picker';\n\nexport type TCommitMode = 'live' | 'settle';\n\nconst HEX_BODY = /^[0-9a-fA-F]+$/;\nconst COMPLETE_CSS = /^(rgb|rgba|hsl|hsla|hsb|hsba)\\([^)]+\\)$/i;\n\n/**\n * Hex to publish.\n * `''` clears on settle. `null` means \"keep typing\" or \"not a color\".\n * Three-digit hex expands only on settle, so `#abcdef` can be typed.\n */\nexport const commitHexInput = (raw: string, mode: TCommitMode): string | null => {\n const trimmed = raw.trim();\n\n if (!trimmed) return mode === 'settle' ? '' : null;\n\n const body = trimmed.startsWith('#') ? trimmed.slice(1) : trimmed;\n\n if (HEX_BODY.test(body)) {\n if (body.length === 6) return `#${body.toLowerCase()}`;\n\n if (mode === 'settle' && body.length === 3) {\n const [red, green, blue] = body.toLowerCase();\n\n return `#${red}${red}${green}${green}${blue}${blue}`;\n }\n\n return null;\n }\n\n const parsed = toHexColor(trimmed);\n\n if (!parsed) return null;\n\n if (mode === 'live' && !COMPLETE_CSS.test(trimmed)) return null;\n\n return parsed;\n};\n\n/** How a stored string should look in the field before the user edits it. */\nexport const describeColorValue = (\n value: string | null | undefined\n): { text: string; hex: string | null; unrecognized: boolean } => {\n if (value == null || value.trim() === '') {\n return { text: '', hex: null, unrecognized: false };\n }\n\n const hex = toHexColor(value);\n\n if (!hex) return { text: '', hex: null, unrecognized: true };\n\n return { text: hex, hex, unrecognized: false };\n};\n","import { type ChangeEvent, type KeyboardEvent, useCallback, useEffect, useRef, useState } from 'react';\n\nimport cn from 'classnames';\nimport { Button as RacButton, ColorSwatch, Dialog, DialogTrigger, Popover } from 'react-aria-components';\n\nimport { supportRef } from '@ds/common/support-ref';\n\nimport { ColorPicker } from '@/color-picker';\nimport { Clear } from '@/icons';\nimport { useAuiLabels } from '@/provider';\n\nimport { colorFieldGroupVariants } from './theme';\nimport { type IColorFieldProps } from './types';\nimport { commitHexInput, describeColorValue } from './utils';\n\nimport styles from './styles.module.css';\n\nexport const ColorField = supportRef(\n ({\n ref,\n inputRef,\n size = 'md',\n variant = 'primary',\n block = true,\n invalid = false,\n disabled = false,\n clear = false,\n presets,\n value,\n defaultValue,\n onChange,\n onBlur,\n className,\n dataTestId,\n id,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n 'aria-describedby': ariaDescribedby,\n 'aria-invalid': ariaInvalid,\n }: IColorFieldProps) => {\n const { clear: clearLabel, openPalette, colorCode, colorPalette } = useAuiLabels();\n const isControlled = value !== undefined;\n const [uncontrolledValue, setUncontrolledValue] = useState(defaultValue ?? '');\n const current = isControlled ? value : uncontrolledValue;\n const display = describeColorValue(current);\n const [text, setText] = useState(display.text);\n const [previewHex, setPreviewHex] = useState<string | null>(null);\n const [hue, setHue] = useState<number | undefined>(undefined);\n /** Forces a resync after blur when the parent rejected the change and `current` did not move. */\n const [settledTick, setSettledTick] = useState(0);\n const groupRef = useRef<HTMLDivElement>(null);\n const setGroupRef = useCallback(\n (node: HTMLDivElement | null) => {\n groupRef.current = node;\n\n if (typeof ref === 'function') {\n ref(node);\n\n return;\n }\n\n if (ref) ref.current = node;\n },\n [ref]\n );\n const focusedRef = useRef(false);\n const dirtyRef = useRef(false);\n const lastEmittedRef = useRef(current);\n const markedInvalid = invalid || ariaInvalid === true || ariaInvalid === 'true' || display.unrecognized;\n const swatchColor = previewHex ?? display.hex;\n const showClear = clear && !disabled && (text !== '' || Boolean(display.hex));\n\n useEffect(() => {\n lastEmittedRef.current = current;\n }, [current, settledTick]);\n\n useEffect(() => {\n if (focusedRef.current) return;\n\n const next = describeColorValue(current);\n\n setText(next.text);\n setPreviewHex(null);\n }, [current, settledTick]);\n\n const emit = (hex: string, typed?: string) => {\n dirtyRef.current = false;\n setPreviewHex(hex || null);\n setText(typed !== undefined && typed.toLowerCase() === hex ? typed : hex);\n\n if (lastEmittedRef.current === hex) return;\n\n lastEmittedRef.current = hex;\n\n if (!isControlled) setUncontrolledValue(hex);\n\n if (hex === current) return;\n\n onChange?.(hex);\n };\n\n const settle = (raw: string) => {\n if (!dirtyRef.current && raw === display.text) return;\n\n const committed = commitHexInput(raw, 'settle');\n\n dirtyRef.current = false;\n\n if (committed == null) {\n setText(display.text);\n setPreviewHex(display.hex);\n\n return;\n }\n\n emit(committed);\n };\n\n const onInputChange = (event: ChangeEvent<HTMLInputElement>) => {\n const next = event.target.value;\n\n dirtyRef.current = true;\n setText(next);\n setPreviewHex(null);\n\n const committed = commitHexInput(next, 'live');\n\n if (committed) emit(committed, next);\n };\n\n const onInputKeyDown = (event: KeyboardEvent<HTMLInputElement>) => {\n if (event.key !== 'Enter') return;\n\n event.preventDefault();\n event.stopPropagation();\n settle(event.currentTarget.value);\n };\n\n return (\n <div className={cn(styles.root, block && styles.block, className)}>\n <div\n ref={setGroupRef}\n className={colorFieldGroupVariants({ size, variant, block })}\n data-invalid={markedInvalid || undefined}\n data-disabled={disabled || undefined}\n data-test-id={dataTestId}\n >\n <DialogTrigger\n onOpenChange={open => {\n if (!open) onBlur?.();\n }}\n >\n <RacButton\n className={styles.swatch}\n aria-label={openPalette}\n isDisabled={disabled}\n data-empty={swatchColor ? undefined : true}\n data-test-id=\"color-field-trigger\"\n >\n {swatchColor ? <ColorSwatch className={styles.swatchColor} color={swatchColor} /> : null}\n </RacButton>\n <Popover className={styles.popover} placement=\"bottom start\" triggerRef={groupRef}>\n <Dialog\n className={styles.dialog}\n aria-label={colorPalette}\n data-test-id=\"color-field-dialog\"\n >\n <ColorPicker\n value={display.hex ?? ''}\n hue={hue}\n presets={presets}\n disabled={disabled}\n onHueChange={setHue}\n onPreview={hex => {\n setPreviewHex(hex);\n setText(hex);\n }}\n onChange={emit}\n />\n </Dialog>\n </Popover>\n </DialogTrigger>\n <input\n ref={inputRef}\n id={id}\n className={styles.hex}\n aria-label={ariaLabelledby ? undefined : (ariaLabel ?? colorCode)}\n aria-labelledby={ariaLabelledby}\n aria-describedby={ariaDescribedby}\n aria-invalid={markedInvalid || undefined}\n placeholder=\"#RRGGBB\"\n spellCheck={false}\n autoComplete=\"off\"\n disabled={disabled}\n value={text}\n data-test-id=\"color-field-input\"\n onFocus={() => {\n focusedRef.current = true;\n }}\n onChange={onInputChange}\n onBlur={event => {\n focusedRef.current = false;\n settle(event.target.value);\n setSettledTick(tick => tick + 1);\n onBlur?.();\n }}\n onKeyDown={onInputKeyDown}\n />\n {showClear ? (\n <RacButton\n className={styles.clear}\n aria-label={clearLabel}\n data-test-id=\"color-field-clear\"\n excludeFromTabOrder\n onPress={() => emit('')}\n >\n <Clear className={styles.icon} />\n </RacButton>\n ) : null}\n </div>\n </div>\n );\n }\n);\n\nColorField.displayName = 'ColorField';\n","import { Field, useField } from '@/field';\nimport { useFieldHook } from '@/form/hooks/useFieldHook';\nimport { getError } from '@/form/utils';\n\nimport { ColorField } from './Component';\nimport { type IColorFieldProps, type IFormColorFieldProps } from './types';\n\ntype TFormColorFieldControlProps = Omit<IColorFieldProps, 'size' | 'invalid' | 'disabled' | 'value' | 'onChange'> & {\n value: string;\n onChange: (value: string) => void;\n};\n\nconst FormColorFieldControl = ({ value, onChange, onBlur, ...props }: TFormColorFieldControlProps) => {\n const { controlProps, size, invalid, disabled } = useField();\n\n return (\n <ColorField\n {...controlProps}\n {...props}\n size={size}\n invalid={invalid}\n disabled={disabled}\n value={value}\n onChange={onChange}\n onBlur={onBlur}\n />\n );\n};\n\nFormColorFieldControl.displayName = 'FormColorFieldControl';\n\nexport const FormColorField = ({\n name,\n label,\n hint,\n size = 'md',\n block = true,\n disabled,\n className,\n dataTestId,\n ...inputProps\n}: IFormColorFieldProps) => {\n const { field, fieldState, inputProps: rhfInputProps, onChange, 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 <FormColorFieldControl\n {...inputProps}\n block={block}\n inputRef={field.ref}\n value={typeof field.value === 'string' ? field.value : ''}\n onChange={next => {\n field.onChange(next);\n onChange(name, next as never);\n }}\n onBlur={() => onBlurHandler()}\n />\n {hint ? <Field.Hint>{hint}</Field.Hint> : null}\n <Field.Error>{error}</Field.Error>\n </Field>\n );\n};\n\nFormColorField.displayName = 'FormColorField';\n"],"names":["colorFieldGroupVariants","cva","styles","cn","typographyStyles","HEX_BODY","COMPLETE_CSS","commitHexInput","raw","mode","trimmed","body","red","green","blue","parsed","toHexColor","describeColorValue","value","hex","ColorField","supportRef","ref","inputRef","size","variant","block","invalid","disabled","clear","presets","defaultValue","onChange","onBlur","className","dataTestId","id","ariaLabel","ariaLabelledby","ariaDescribedby","ariaInvalid","clearLabel","openPalette","colorCode","colorPalette","useAuiLabels","isControlled","uncontrolledValue","setUncontrolledValue","useState","current","display","text","setText","previewHex","setPreviewHex","hue","setHue","settledTick","setSettledTick","groupRef","useRef","setGroupRef","useCallback","node","focusedRef","dirtyRef","lastEmittedRef","markedInvalid","swatchColor","showClear","useEffect","next","emit","typed","settle","committed","onInputChange","event","onInputKeyDown","jsx","jsxs","DialogTrigger","open","RacButton","ColorSwatch","Popover","Dialog","ColorPicker","tick","Clear","FormColorFieldControl","props","controlProps","useField","FormColorField","name","label","hint","inputProps","field","fieldState","rhfInputProps","onBlurHandler","useFieldHook","error","getError","isDisabled","Field"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;GAOaA,KAA0BC,GAAIC,EAAO,OAAO;AAAA,EACrD,UAAU;AAAA,IACN,MAAM;AAAA,MACF,IAAIC,EAAGD,EAAO,IAAIE,EAAiB,KAAK;AAAA,MACxC,IAAID,EAAGD,EAAO,IAAIE,EAAiB,KAAK;AAAA,MACxC,IAAID,EAAGD,EAAO,IAAIE,EAAiB,KAAK;AAAA,IAAA;AAAA,IAE5C,SAAS;AAAA,MACL,SAASF,EAAO;AAAA,IAAA;AAAA,IAEpB,OAAO;AAAA,MACH,MAAMA,EAAO;AAAA,MACb,OAAO;AAAA,IAAA;AAAA,EACX;AAAA,EAEJ,iBAAiB;AAAA,IACb,MAAM;AAAA,IACN,SAAS;AAAA,IACT,OAAO;AAAA,EAAA;AAEf,CAAC,GCvBKG,KAAW,kBACXC,KAAe,4CAORC,IAAiB,CAACC,GAAaC,MAAqC;AAC7E,QAAMC,IAAUF,EAAI,KAAA;AAEpB,MAAI,CAACE,EAAS,QAAOD,MAAS,WAAW,KAAK;AAE9C,QAAME,IAAOD,EAAQ,WAAW,GAAG,IAAIA,EAAQ,MAAM,CAAC,IAAIA;AAE1D,MAAIL,GAAS,KAAKM,CAAI,GAAG;AACrB,QAAIA,EAAK,WAAW,UAAU,IAAIA,EAAK,aAAa;AAEpD,QAAIF,MAAS,YAAYE,EAAK,WAAW,GAAG;AACxC,YAAM,CAACC,GAAKC,GAAOC,CAAI,IAAIH,EAAK,YAAA;AAEhC,aAAO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AAuE,MAAkBC,GAAa,EAAE,MAAAR,GAAM,GACjGS,IAAQC,GAASL,EAAW,KAAK,GAAG,SACpCM,IAAa/E,KAAY0E,EAAc;AAE7C,SACI,gBAAArB;AAAA,IAAC2B;AAAA,IAAA;AAAA,MACG,SAAS,EAAQH;AAAA,MACjB,UAAUE;AAAA,MACV,MAAAnF;AAAA,MACA,OAAAE;AAAA,MACA,WAAAQ;AAAA,MACA,YAAAC;AAAA,MAEC,UAAA;AAAA,QAAA8D,IAAQ,gBAAAjB,EAAC4B,EAAM,OAAN,EAAa,aAAM,IAAiB;AAAA,QAC9C,gBAAA5B;AAAA,UAACW;AAAA,UAAA;AAAA,YACI,GAAGQ;AAAA,YACJ,OAAAzE;AAAA,YACA,UAAU0E,EAAM;AAAA,YAChB,OAAO,OAAOA,EAAM,SAAU,WAAWA,EAAM,QAAQ;AAAA,YACvD,UAAU,CAAA5B,MAAQ;AACd,cAAA4B,EAAM,SAAS5B,CAAI,GACnBxC,EAASgE,GAAMxB,CAAa;AAAA,YAChC;AAAA,YACA,QAAQ,MAAM+B,EAAA;AAAA,UAAc;AAAA,QAAA;AAAA,QAE/BL,IAAO,gBAAAlB,EAAC4B,EAAM,MAAN,EAAY,aAAK,IAAgB;AAAA,QAC1C,gBAAA5B,EAAC4B,EAAM,OAAN,EAAa,UAAAH,EAAA,CAAM;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGhC;AAEAV,GAAe,cAAc;"}
1
+ {"version":3,"file":"index.js","sources":["../../src/color-field/theme.ts","../../src/color-field/utils.ts","../../src/color-field/Component.tsx","../../src/color-field/FormColorField.tsx"],"sourcesContent":["import { cva } from 'class-variance-authority';\nimport cn from 'classnames';\n\nimport { typographyStyles } from '@ds/typography';\n\nimport styles from './styles.module.css';\n\nexport const colorFieldGroupVariants = cva(styles.group, {\n variants: {\n size: {\n sm: cn(styles.sm, typographyStyles.bodyS),\n md: cn(styles.md, typographyStyles.bodyS),\n lg: cn(styles.lg, typographyStyles.bodyM),\n },\n variant: {\n primary: styles.primary,\n },\n block: {\n true: styles.block,\n false: null,\n },\n },\n defaultVariants: {\n size: 'md',\n variant: 'primary',\n block: true,\n },\n});\n","import { toHexColor } from '@/color-picker';\n\nexport type TCommitMode = 'live' | 'settle';\n\nconst HEX_BODY = /^[0-9a-fA-F]+$/;\nconst COMPLETE_CSS = /^(rgb|rgba|hsl|hsla|hsb|hsba)\\([^)]+\\)$/i;\n\n/**\n * Hex to publish.\n * `''` clears on settle. `null` means \"keep typing\" or \"not a color\".\n * Three-digit hex expands only on settle, so `#abcdef` can be typed.\n */\nexport const commitHexInput = (raw: string, mode: TCommitMode): string | null => {\n const trimmed = raw.trim();\n\n if (!trimmed) return mode === 'settle' ? '' : null;\n\n const body = trimmed.startsWith('#') ? trimmed.slice(1) : trimmed;\n\n if (HEX_BODY.test(body)) {\n if (body.length === 6) return `#${body.toLowerCase()}`;\n\n if (mode === 'settle' && body.length === 3) {\n const [red, green, blue] = body.toLowerCase();\n\n return `#${red}${red}${green}${green}${blue}${blue}`;\n }\n\n return null;\n }\n\n const parsed = toHexColor(trimmed);\n\n if (!parsed) return null;\n\n if (mode === 'live' && !COMPLETE_CSS.test(trimmed)) return null;\n\n return parsed;\n};\n\n/** How a stored string should look in the field before the user edits it. */\nexport const describeColorValue = (\n value: string | null | undefined\n): { text: string; hex: string | null; unrecognized: boolean } => {\n if (value == null || value.trim() === '') {\n return { text: '', hex: null, unrecognized: false };\n }\n\n const hex = toHexColor(value);\n\n if (!hex) return { text: '', hex: null, unrecognized: true };\n\n return { text: hex, hex, unrecognized: false };\n};\n","import { type ChangeEvent, type KeyboardEvent, useCallback, useEffect, useRef, useState } from 'react';\n\nimport cn from 'classnames';\nimport { Button as RacButton, ColorSwatch, Dialog, DialogTrigger, Popover } from 'react-aria-components';\n\nimport { supportRef } from '@ds/common/support-ref';\n\nimport { ColorPicker } from '@/color-picker';\nimport { Clear } from '@/icons';\nimport { useAuiLabels } from '@/provider';\n\nimport { colorFieldGroupVariants } from './theme';\nimport { type IColorFieldProps } from './types';\nimport { commitHexInput, describeColorValue } from './utils';\n\nimport styles from './styles.module.css';\n\nexport const ColorField = supportRef(\n ({\n ref,\n inputRef,\n size = 'md',\n variant = 'primary',\n block = true,\n invalid = false,\n disabled = false,\n clear = false,\n presets,\n value,\n defaultValue,\n onChange,\n onBlur,\n className,\n dataTestId,\n id,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n 'aria-describedby': ariaDescribedby,\n 'aria-invalid': ariaInvalid,\n ...domProps\n }: IColorFieldProps) => {\n const { clear: clearLabel, openPalette, colorCode, colorPalette } = useAuiLabels();\n const isControlled = value !== undefined;\n const [uncontrolledValue, setUncontrolledValue] = useState(defaultValue ?? '');\n const current = isControlled ? value : uncontrolledValue;\n const display = describeColorValue(current);\n const [text, setText] = useState(display.text);\n const [previewHex, setPreviewHex] = useState<string | null>(null);\n const [hue, setHue] = useState<number | undefined>(undefined);\n /** Forces a resync after blur when the parent rejected the change and `current` did not move. */\n const [settledTick, setSettledTick] = useState(0);\n const groupRef = useRef<HTMLDivElement>(null);\n const setGroupRef = useCallback(\n (node: HTMLDivElement | null) => {\n groupRef.current = node;\n\n if (typeof ref === 'function') {\n ref(node);\n\n return;\n }\n\n if (ref) ref.current = node;\n },\n [ref]\n );\n const focusedRef = useRef(false);\n const dirtyRef = useRef(false);\n const lastEmittedRef = useRef(current);\n const markedInvalid = invalid || ariaInvalid === true || ariaInvalid === 'true' || display.unrecognized;\n const swatchColor = previewHex ?? display.hex;\n const showClear = clear && !disabled && (text !== '' || Boolean(display.hex));\n\n useEffect(() => {\n lastEmittedRef.current = current;\n }, [current, settledTick]);\n\n useEffect(() => {\n if (focusedRef.current) return;\n\n const next = describeColorValue(current);\n\n setText(next.text);\n setPreviewHex(null);\n }, [current, settledTick]);\n\n const emit = (hex: string, typed?: string) => {\n dirtyRef.current = false;\n setPreviewHex(hex || null);\n setText(typed !== undefined && typed.toLowerCase() === hex ? typed : hex);\n\n if (lastEmittedRef.current === hex) return;\n\n lastEmittedRef.current = hex;\n\n if (!isControlled) setUncontrolledValue(hex);\n\n if (hex === current) return;\n\n onChange?.(hex);\n };\n\n const settle = (raw: string) => {\n if (!dirtyRef.current && raw === display.text) return;\n\n const committed = commitHexInput(raw, 'settle');\n\n dirtyRef.current = false;\n\n if (committed == null) {\n setText(display.text);\n setPreviewHex(display.hex);\n\n return;\n }\n\n emit(committed);\n };\n\n const onInputChange = (event: ChangeEvent<HTMLInputElement>) => {\n const next = event.target.value;\n\n dirtyRef.current = true;\n setText(next);\n setPreviewHex(null);\n\n const committed = commitHexInput(next, 'live');\n\n if (committed) emit(committed, next);\n };\n\n const onInputKeyDown = (event: KeyboardEvent<HTMLInputElement>) => {\n if (event.key !== 'Enter') return;\n\n event.preventDefault();\n event.stopPropagation();\n settle(event.currentTarget.value);\n };\n\n return (\n <div {...domProps} className={cn(styles.root, block && styles.block, className)}>\n <div\n ref={setGroupRef}\n className={colorFieldGroupVariants({ size, variant, block })}\n data-invalid={markedInvalid || undefined}\n data-disabled={disabled || undefined}\n data-test-id={dataTestId}\n >\n <DialogTrigger\n onOpenChange={open => {\n if (!open) onBlur?.();\n }}\n >\n <RacButton\n className={styles.swatch}\n aria-label={openPalette}\n isDisabled={disabled}\n data-empty={swatchColor ? undefined : true}\n data-test-id=\"color-field-trigger\"\n >\n {swatchColor ? <ColorSwatch className={styles.swatchColor} color={swatchColor} /> : null}\n </RacButton>\n <Popover className={styles.popover} placement=\"bottom start\" triggerRef={groupRef}>\n <Dialog\n className={styles.dialog}\n aria-label={colorPalette}\n data-test-id=\"color-field-dialog\"\n >\n <ColorPicker\n value={display.hex ?? ''}\n hue={hue}\n presets={presets}\n disabled={disabled}\n onHueChange={setHue}\n onPreview={hex => {\n setPreviewHex(hex);\n setText(hex);\n }}\n onChange={emit}\n />\n </Dialog>\n </Popover>\n </DialogTrigger>\n <input\n ref={inputRef}\n id={id}\n className={styles.hex}\n aria-label={ariaLabelledby ? undefined : (ariaLabel ?? colorCode)}\n aria-labelledby={ariaLabelledby}\n aria-describedby={ariaDescribedby}\n aria-invalid={markedInvalid || undefined}\n placeholder=\"#RRGGBB\"\n spellCheck={false}\n autoComplete=\"off\"\n disabled={disabled}\n value={text}\n data-test-id=\"color-field-input\"\n onFocus={() => {\n focusedRef.current = true;\n }}\n onChange={onInputChange}\n onBlur={event => {\n focusedRef.current = false;\n settle(event.target.value);\n setSettledTick(tick => tick + 1);\n onBlur?.();\n }}\n onKeyDown={onInputKeyDown}\n />\n {showClear ? (\n <RacButton\n className={styles.clear}\n aria-label={clearLabel}\n data-test-id=\"color-field-clear\"\n excludeFromTabOrder\n onPress={() => emit('')}\n >\n <Clear className={styles.icon} />\n </RacButton>\n ) : null}\n </div>\n </div>\n );\n }\n);\n\nColorField.displayName = 'ColorField';\n","import { Field, useField } from '@/field';\nimport { useFieldHook } from '@/form/hooks/useFieldHook';\nimport { getError } from '@/form/utils';\n\nimport { ColorField } from './Component';\nimport { type IColorFieldProps, type IFormColorFieldProps } from './types';\n\ntype TFormColorFieldControlProps = Omit<IColorFieldProps, 'size' | 'invalid' | 'disabled' | 'value' | 'onChange'> & {\n value: string;\n onChange: (value: string) => void;\n};\n\nconst FormColorFieldControl = ({ value, onChange, onBlur, ...props }: TFormColorFieldControlProps) => {\n const { controlProps, size, invalid, disabled } = useField();\n\n return (\n <ColorField\n {...controlProps}\n {...props}\n size={size}\n invalid={invalid}\n disabled={disabled}\n value={value}\n onChange={onChange}\n onBlur={onBlur}\n />\n );\n};\n\nFormColorFieldControl.displayName = 'FormColorFieldControl';\n\nexport const FormColorField = ({\n name,\n label,\n hint,\n size = 'md',\n block = true,\n disabled,\n className,\n dataTestId,\n ...inputProps\n}: IFormColorFieldProps) => {\n const { field, fieldState, inputProps: rhfInputProps, onChange, 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 <FormColorFieldControl\n {...inputProps}\n block={block}\n inputRef={field.ref}\n value={typeof field.value === 'string' ? field.value : ''}\n onChange={next => {\n field.onChange(next);\n onChange(name, next as never);\n }}\n onBlur={() => onBlurHandler()}\n />\n {hint ? <Field.Hint>{hint}</Field.Hint> : null}\n <Field.Error>{error}</Field.Error>\n </Field>\n );\n};\n\nFormColorField.displayName = 'FormColorField';\n"],"names":["colorFieldGroupVariants","cva","styles","cn","typographyStyles","HEX_BODY","COMPLETE_CSS","commitHexInput","raw","mode","trimmed","body","red","green","blue","parsed","toHexColor","describeColorValue","value","hex","ColorField","supportRef","ref","inputRef","size","variant","block","invalid","disabled","clear","presets","defaultValue","onChange","onBlur","className","dataTestId","id","ariaLabel","ariaLabelledby","ariaDescribedby","ariaInvalid","domProps","clearLabel","openPalette","colorCode","colorPalette","useAuiLabels","isControlled","uncontrolledValue","setUncontrolledValue","useState","current","display","text","setText","previewHex","setPreviewHex","hue","setHue","settledTick","setSettledTick","groupRef","useRef","setGroupRef","useCallback","node","focusedRef","dirtyRef","lastEmittedRef","markedInvalid","swatchColor","showClear","useEffect","next","emit","typed","settle","committed","onInputChange","event","onInputKeyDown","jsx","jsxs","DialogTrigger","open","RacButton","ColorSwatch","Popover","Dialog","ColorPicker","tick","Clear","FormColorFieldControl","props","controlProps","useField","FormColorField","name","label","hint","inputProps","field","fieldState","rhfInputProps","onBlurHandler","useFieldHook","error","getError","isDisabled","Field"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;GAOaA,KAA0BC,GAAIC,EAAO,OAAO;AAAA,EACrD,UAAU;AAAA,IACN,MAAM;AAAA,MACF,IAAIC,EAAGD,EAAO,IAAIE,EAAiB,KAAK;AAAA,MACxC,IAAID,EAAGD,EAAO,IAAIE,EAAiB,KAAK;AAAA,MACxC,IAAID,EAAGD,EAAO,IAAIE,EAAi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AM,QAAQ;AAAA,YACvD,UAAU,CAAA5B,MAAQ;AACd,cAAA4B,EAAM,SAAS5B,CAAI,GACnBzC,EAASiE,GAAMxB,CAAa;AAAA,YAChC;AAAA,YACA,QAAQ,MAAM+B,EAAA;AAAA,UAAc;AAAA,QAAA;AAAA,QAE/BL,IAAO,gBAAAlB,EAAC4B,EAAM,MAAN,EAAY,aAAK,IAAgB;AAAA,QAC1C,gBAAA5B,EAAC4B,EAAM,OAAN,EAAa,UAAAH,EAAA,CAAM;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGhC;AAEAV,GAAe,cAAc;"}
@@ -1,4 +1,4 @@
1
- import { Ref } from 'react';
1
+ import { ComponentPropsWithRef, Ref } from 'react';
2
2
  import { IDataTestIdProps } from '../ds/common/index.js';
3
3
  import { IFieldStateProps } from '../field/types';
4
4
  import { IFormFieldLayoutProps } from '../form/types';
@@ -22,8 +22,6 @@ export interface IColorFieldOwnProps extends IDataTestIdProps {
22
22
  * Values that are not colors are dropped. No row when empty.
23
23
  */
24
24
  presets?: string[];
25
- /** Class name on the root. */
26
- className?: string;
27
25
  /** Ref to the field group (React 19 prop). */
28
26
  ref?: Ref<HTMLDivElement>;
29
27
  /** Ref to the hex input (React 19 prop). */
@@ -46,7 +44,7 @@ export interface IColorFieldControlProps {
46
44
  }
47
45
  export interface IColorFieldBaseProps extends IColorFieldThemeProps, IFieldStateProps, IColorFieldOwnProps, IColorFieldControlProps {
48
46
  }
49
- export interface IColorFieldProps extends IColorFieldBaseProps {
47
+ export interface IColorFieldProps extends Omit<ComponentPropsWithRef<'div'>, keyof IColorFieldBaseProps | 'children'>, IColorFieldBaseProps {
50
48
  }
51
49
  /** Content slice for FormColorField. */
52
50
  export interface IColorFieldContentProps {
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/color-field/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,GAAG,EAAE,MAAM,OAAO,CAAC;AAEjC,O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IAC9C,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;IAC1B,4CAA4C;IAC5C,QAAQ,CAAC,EAAE,GAAG,CAAC,gBAAgB,CAAC,CAAC;IACjC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,cAAc,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC;CAC/C;AAED,0CAA0C;AAC1C,MAAM,WAAW,uBAAuB;IACpC,yBAAyB;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,yBAAyB;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,mCAAmC;IACnC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB;AAED,MAAM,WAAW,oBACb,SAAQ,qBAAqB,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,uBAAuB;CAAG;AAEpG,MAAM,WAAW,gBACb,SAAQ,IAAI,CAAC,qBAAqB,CAAC,KAAK,CAAC,EAAE,MAAM,oBAAoB,GAAG,UAAU,CAAC,EAAE,oBAAoB;CAAG;AAEhH,wCAAwC;AACxC,MAAM,WAAW,uBAAuB;IACpC,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACtB;AAED,MAAM,WAAW,oBACb,SAAQ,qBAAqB,EAAE,IAAI,CAAC,qBAAqB,EAAE,SAAS,CAAC,EAAE,uBAAuB;CAAG"}
@@ -1,5 +1,5 @@
1
1
  import { IColorPickerProps } from './types';
2
- export declare const ColorPicker: (({ ref, value, defaultValue, onChange, onPreview, onHueChange, hue, presets, disabled, className, dataTestId, "aria-label": ariaLabel, }: IColorPickerProps) => import("react").JSX.Element) & {
2
+ export declare const ColorPicker: (({ ref, value, defaultValue, onChange, onPreview, onHueChange, hue, presets, disabled, className, dataTestId, "aria-label": ariaLabel, ...domProps }: IColorPickerProps) => 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/color-picker/Component.tsx"],"names":[],"mappings":"AAmBA,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAUjD,eAAO,MAAM,WAAW,6IAcjB,iBAAiB;;CAgIvB,CAAC"}
1
+ {"version":3,"file":"Component.d.ts","sourceRoot":"","sources":["../../../src/color-picker/Component.tsx"],"names":[],"mappings":"AAmBA,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAUjD,eAAO,MAAM,WAAW,yJAejB,iBAAiB;;CAiIvB,CAAC"}
@@ -1,4 +1,4 @@
1
- import { C as e, t } from "../Component-DhE4a93B.js";
1
+ import { C as e, t } from "../Component-DV6H96-0.js";
2
2
  export {
3
3
  e as ColorPicker,
4
4
  t as toHexColor
@@ -1,4 +1,4 @@
1
- import { Ref } from 'react';
1
+ import { ComponentPropsWithRef, Ref } from 'react';
2
2
  import { IDataTestIdProps } from '../ds/common/index.js';
3
3
  /** Own / chrome props (not from RAC). */
4
4
  export interface IColorPickerOwnProps extends IDataTestIdProps {
@@ -12,8 +12,6 @@ export interface IColorPickerOwnProps extends IDataTestIdProps {
12
12
  * The field keeps it so the slider survives a closed popover.
13
13
  */
14
14
  hue?: number;
15
- /** Class name on the palette root. */
16
- className?: string;
17
15
  /** Ref to the palette root (React 19 prop). */
18
16
  ref?: Ref<HTMLDivElement>;
19
17
  'aria-label'?: string;
@@ -32,6 +30,6 @@ export interface IColorPickerControlProps {
32
30
  onHueChange?: (hue: number) => void;
33
31
  disabled?: boolean;
34
32
  }
35
- export interface IColorPickerProps extends IColorPickerOwnProps, IColorPickerControlProps {
33
+ export interface IColorPickerProps extends Omit<ComponentPropsWithRef<'div'>, keyof IColorPickerOwnProps | keyof IColorPickerControlProps | 'children'>, IColorPickerOwnProps, IColorPickerControlProps {
36
34
  }
37
35
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/color-picker/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,GAAG,EAAE,MAAM,OAAO,CAAC;AAEjC,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEnD,yCAAyC;AACzC,MAAM,WAAW,oBAAqB,SAAQ,gBAAgB;IAC1D;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,sCAAsC;IACtC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,+CAA+C;IAC/C,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,0CAA0C;AAC1C,MAAM,WAAW,wBAAwB;IACrC,sEAAsE;IACtE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,yBAAyB;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,mDAAmD;IACnD,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,8DAA8D;IAC9D,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,0CAA0C;IAC1C,WAAW,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,WAAW,iBAAkB,SAAQ,oBAAoB,EAAE,wBAAwB;CAAG"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/color-picker/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,qBAAqB,EAAE,KAAK,GAAG,EAAE,MAAM,OAAO,CAAC;AAE7D,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEnD,yCAAyC;AACzC,MAAM,WAAW,oBAAqB,SAAQ,gBAAgB;IAC1D;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,+CAA+C;IAC/C,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,0CAA0C;AAC1C,MAAM,WAAW,wBAAwB;IACrC,sEAAsE;IACtE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,yBAAyB;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,mDAAmD;IACnD,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,8DAA8D;IAC9D,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,0CAA0C;IAC1C,WAAW,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,WAAW,iBACb,SACI,IAAI,CAAC,qBAAqB,CAAC,KAAK,CAAC,EAAE,MAAM,oBAAoB,GAAG,MAAM,wBAAwB,GAAG,UAAU,CAAC,EAC5G,oBAAoB,EACpB,wBAAwB;CAAG"}
@@ -5,8 +5,6 @@ export { ComboboxListStatus, type IComboboxListStatusProps } from './components/
5
5
  export { ComboboxMultiTrigger, type IComboboxMultiTriggerProps } from './components/MultiTrigger';
6
6
  export { ComboboxPopover, type IComboboxPopoverProps } from './components/Popover';
7
7
  export { ComboboxTrigger, type IComboboxTriggerProps } from './components/Trigger';
8
- export { useSelectedOptionsCache } from './hooks/useSelectedOptionsCache';
9
- export { useTagOverflow } from './hooks/useTagOverflow';
10
8
  export type { IComboboxOption, TComboboxSize, TComboboxValue, TComboboxVariant } from './types';
11
9
  export { isInteractiveTarget, resolveSelectedOptions, toKeyList } from './utils';
12
10
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/combobox/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAC9E,OAAO,EAAE,YAAY,EAAE,KAAK,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAC1E,OAAO,EAAE,SAAS,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAC9E,OAAO,EAAE,kBAAkB,EAAE,KAAK,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AAC5F,OAAO,EAAE,oBAAoB,EAAE,KAAK,0BAA0B,EAAE,MAAM,2BAA2B,CAAC;AAClG,OAAO,EAAE,eAAe,EAAE,KAAK,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AACnF,OAAO,EAAE,eAAe,EAAE,KAAK,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AACnF,OAAO,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAC1E,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,YAAY,EAAE,eAAe,EAAE,aAAa,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAChG,OAAO,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/combobox/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAC9E,OAAO,EAAE,YAAY,EAAE,KAAK,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAC1E,OAAO,EAAE,SAAS,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAC9E,OAAO,EAAE,kBAAkB,EAAE,KAAK,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AAC5F,OAAO,EAAE,oBAAoB,EAAE,KAAK,0BAA0B,EAAE,MAAM,2BAA2B,CAAC;AAClG,OAAO,EAAE,eAAe,EAAE,KAAK,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AACnF,OAAO,EAAE,eAAe,EAAE,KAAK,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AACnF,YAAY,EAAE,eAAe,EAAE,aAAa,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAChG,OAAO,EAAE,mBAAmB,EAAE,sBAAsB,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC"}
@@ -1,21 +1,19 @@
1
- import { C as e, a as t, b as a, c as r, i as b, r as i, t as m } from "../utils-DrTtzDsS.js";
2
- import { C as x, r as c, u as p } from "../metrics-Cv_jrA15.js";
3
- import { C as g, u as n, a as f } from "../index-DxsuVBkE.js";
4
- import { C as v } from "../index-C_oo7Xm5.js";
1
+ import { C as t, a as e, b as r, c as a, i as b, r as m, t as i } from "../utils-qHAuIhao.js";
2
+ import { C, r as p, u as c } from "../metrics-CaN_sENu.js";
3
+ import { C as n } from "../index-Co6mzXrw.js";
4
+ import { C as u } from "../index-BHUJOcwj.js";
5
5
  export {
6
- e as ComboboxItemContent,
7
- t as ComboboxList,
8
- x as ComboboxListStatus,
9
- g as ComboboxMultiTrigger,
10
- a as ComboboxPopover,
11
- v as ComboboxTrigger,
12
- r as comboboxItemVariants,
6
+ t as ComboboxItemContent,
7
+ e as ComboboxList,
8
+ C as ComboboxListStatus,
9
+ n as ComboboxMultiTrigger,
10
+ r as ComboboxPopover,
11
+ u as ComboboxTrigger,
12
+ a as comboboxItemVariants,
13
13
  b as isInteractiveTarget,
14
- c as readCssPx,
15
- i as resolveSelectedOptions,
16
- m as toKeyList,
17
- p as useComboboxListMetrics,
18
- n as useSelectedOptionsCache,
19
- f as useTagOverflow
14
+ p as readCssPx,
15
+ m as resolveSelectedOptions,
16
+ i as toKeyList,
17
+ c as useComboboxListMetrics
20
18
  };
21
19
  //# sourceMappingURL=index.js.map
@@ -5,7 +5,7 @@ import { s as L } from "../index-h8z54aFR.js";
5
5
  import { typographyStyles as $ } from "../typography/index.js";
6
6
  import { C as D } from "../Check-deng4Zns.js";
7
7
  import { C as V } from "../Copy-DBU7bgFo.js";
8
- import { u as q } from "../hooks-CekMiYbX.js";
8
+ import { u as q } from "../hooks-Di5rgHTG.js";
9
9
  import { T as y } from "../Component-uHkw3SDR.js";
10
10
  import '../assets/index2.css';const z = "aub_styles-module_root_c67e4", G = "aub_styles-module_icon_e7237", g = {
11
11
  root: z,
@@ -1,11 +1,11 @@
1
1
  import { jsxs as C, jsx as r } from "react/jsx-runtime";
2
2
  import { useContext as x, createContext as N, Children as y, isValidElement as h, useMemo as _ } from "react";
3
3
  import { s as F } from "../index-h8z54aFR.js";
4
- import { T as t } from "../Component-CBnhxD86.js";
4
+ import { T as t } from "../Component-DmKmX7so.js";
5
5
  import A from "classnames";
6
6
  import { M as P } from "../SortDescending-DziKhSYN.js";
7
- import { u as R } from "../hooks-CekMiYbX.js";
8
- import '../assets/index24.css';const S = "aub_styles-module_trigger_f9d5f", k = "aub_styles-module_icon_fcb5d", w = "aub_styles-module_visuallyHidden_14779", b = {
7
+ import { u as R } from "../hooks-Di5rgHTG.js";
8
+ import '../assets/index25.css';const S = "aub_styles-module_trigger_f9d5f", k = "aub_styles-module_icon_fcb5d", w = "aub_styles-module_visuallyHidden_14779", b = {
9
9
  trigger: S,
10
10
  icon: k,
11
11
  visuallyHidden: w
@@ -4,15 +4,15 @@ import { CalendarDate as z } from "@internationalized/date";
4
4
  import E from "classnames";
5
5
  import { DatePickerStateContext as Z, useSlottedContext as ee, CalendarContext as ae, DatePicker as oe, Group as te, DateInput as le, DateSegment as ne, Button as Y, Popover as re, Dialog as se } from "react-aria-components";
6
6
  import { s as j } from "../index-h8z54aFR.js";
7
- import { u as ce, t as M, a as ie, M as ue, b as de, D as me, c as pe } from "../index-BccXGF9t.js";
7
+ import { u as ce, t as M, a as ie, M as ue, b as de, D as me, c as pe } from "../index-BAFoUNz-.js";
8
8
  import { C as be } from "../Calendar-CMg4K4oF.js";
9
9
  import { C as _e } from "../Clear-DcxADxz6.js";
10
- import { u as ye } from "../hooks-CekMiYbX.js";
10
+ import { u as ye } from "../hooks-Di5rgHTG.js";
11
11
  import { cva as fe } from "class-variance-authority";
12
12
  import { typographyStyles as O } from "../typography/index.js";
13
- import { F as N, u as he } from "../Component-BPN5FgKq.js";
13
+ import { F as N, u as he } from "../Component-BJc8tKRD.js";
14
14
  import { u as De, g as ge } from "../useFieldHook-o47pjrRg.js";
15
- import '../assets/index16.css';const K = ({ scrollToDate: o, className: r, autoFocusDay: s = !1 }) => {
15
+ import '../assets/index17.css';const K = ({ scrollToDate: o, className: r, autoFocusDay: s = !1 }) => {
16
16
  const { months: m, viewportRef: c, setMonthEl: d, scrollToMonth: p } = ce(o), i = Q(Z), t = ee(ae), b = M(i?.value ?? t?.value ?? null), y = M(t?.minValue ?? null), f = M(t?.maxValue ?? null), v = !!t?.isDisabled, h = t?.isDateUnavailable ? (n) => !!t.isDateUnavailable?.(n) : void 0, _ = (n) => {
17
17
  if (t?.onChange) {
18
18
  t.onChange(n);