@servicetitan/anvil2 2.0.4 → 2.2.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 (225) hide show
  1. package/CHANGELOG.md +56 -0
  2. package/dist/{Calendar-jO-0jbbt.js → Calendar-D0CczOpQ.js} +3 -835
  3. package/dist/Calendar-D0CczOpQ.js.map +1 -0
  4. package/dist/{Calendar-DxLrWESu.js → Calendar-oNlBgZKB.js} +2 -2
  5. package/dist/{Calendar-DxLrWESu.js.map → Calendar-oNlBgZKB.js.map} +1 -1
  6. package/dist/Calendar.js +2 -2
  7. package/dist/{Checkbox-9VbydUcM.js → Checkbox-DIY-6agd.js} +12 -12
  8. package/dist/Checkbox-DIY-6agd.js.map +1 -0
  9. package/dist/{Checkbox-ZXftLNwB.js → Checkbox-DuzAqrE7.js} +2 -2
  10. package/dist/{Checkbox-ZXftLNwB.js.map → Checkbox-DuzAqrE7.js.map} +1 -1
  11. package/dist/Checkbox.js +1 -1
  12. package/dist/{Combobox-CNObHLjp.js → Combobox-CSGn20KQ.js} +14 -7
  13. package/dist/Combobox-CSGn20KQ.js.map +1 -0
  14. package/dist/Combobox.js +1 -1
  15. package/dist/{DataTable-CQpySyDq.js → DataTable-D30sE1Xt.js} +223 -19
  16. package/dist/DataTable-D30sE1Xt.js.map +1 -0
  17. package/dist/{DateFieldRange-BG86w0pX.js → DateFieldRange-DBOiqaML.js} +46 -36
  18. package/dist/DateFieldRange-DBOiqaML.js.map +1 -0
  19. package/dist/DateFieldRange.js +1 -1
  20. package/dist/{DateFieldSingle-Byu_jyye.js → DateFieldSingle-C4hU55MP.js} +38 -29
  21. package/dist/DateFieldSingle-C4hU55MP.js.map +1 -0
  22. package/dist/DateFieldSingle.js +1 -1
  23. package/dist/{DateFieldYearless-Dw1k3_PY.js → DateFieldYearless-BXkUiHIR.js} +14 -13
  24. package/dist/DateFieldYearless-BXkUiHIR.js.map +1 -0
  25. package/dist/DateFieldYearless.js +1 -1
  26. package/dist/{DateFieldYearlessRange--plyld10.js → DateFieldYearlessRange-CGffFnVT.js} +14 -13
  27. package/dist/DateFieldYearlessRange-CGffFnVT.js.map +1 -0
  28. package/dist/DateFieldYearlessRange.js +1 -1
  29. package/dist/{DaysOfTheWeek-vE310Rjp.js → DaysOfTheWeek-DJEDopC9.js} +9 -5
  30. package/dist/DaysOfTheWeek-DJEDopC9.js.map +1 -0
  31. package/dist/DaysOfTheWeek.js +1 -1
  32. package/dist/{Dialog-DZPaz84r.js → Dialog-BbsZMnCA.js} +4 -4
  33. package/dist/{Dialog-DZPaz84r.js.map → Dialog-BbsZMnCA.js.map} +1 -1
  34. package/dist/Dialog.js +1 -1
  35. package/dist/{Drawer-pMQOa2jH.js → Drawer-Dhq76ot3.js} +4 -4
  36. package/dist/{Drawer-pMQOa2jH.js.map → Drawer-Dhq76ot3.js.map} +1 -1
  37. package/dist/Drawer.js +1 -1
  38. package/dist/DrillDown.js +1 -1
  39. package/dist/{FieldDialog-Be54L3E-.js → FieldDialog-CAuhkCZY.js} +541 -142
  40. package/dist/FieldDialog-CAuhkCZY.js.map +1 -0
  41. package/dist/FieldDialog.css +58 -28
  42. package/dist/{FieldLabel-DSrHbw9U.js → FieldLabel-DL0D6fvc.js} +2 -2
  43. package/dist/{FieldLabel-DSrHbw9U.js.map → FieldLabel-DL0D6fvc.js.map} +1 -1
  44. package/dist/FieldLabel.js +1 -1
  45. package/dist/FieldMessage-DS0COrjp.js +132 -0
  46. package/dist/FieldMessage-DS0COrjp.js.map +1 -0
  47. package/dist/FieldMessage.css +18 -4
  48. package/dist/FieldMessage.js +2 -1
  49. package/dist/FieldMessage.js.map +1 -1
  50. package/dist/{Helper-CK-XjpR3.js → Helper-PNGm_U2X.js} +7 -4
  51. package/dist/Helper-PNGm_U2X.js.map +1 -0
  52. package/dist/{InputMask-DoqWRi3t.js → InputMask-Ds0W2fKy.js} +2 -2
  53. package/dist/{InputMask-DoqWRi3t.js.map → InputMask-Ds0W2fKy.js.map} +1 -1
  54. package/dist/InputMask.js +1 -1
  55. package/dist/{ListView-CtRhYAls.js → ListView-MMmJDM--.js} +2 -2
  56. package/dist/{ListView-CtRhYAls.js.map → ListView-MMmJDM--.js.map} +1 -1
  57. package/dist/ListView.js +1 -1
  58. package/dist/MultiSelectField.js +1 -1
  59. package/dist/{MultiSelectFieldSync-xj7jXas-.js → MultiSelectFieldSync-Bey99LzJ.js} +178 -58
  60. package/dist/MultiSelectFieldSync-Bey99LzJ.js.map +1 -0
  61. package/dist/NumberField-CDkEUfXW.js +237 -0
  62. package/dist/NumberField-CDkEUfXW.js.map +1 -0
  63. package/dist/NumberField.js +1 -1
  64. package/dist/{Page-vc7zs4tn.js → Page-BVxybI-j.js} +6 -6
  65. package/dist/{Page-vc7zs4tn.js.map → Page-BVxybI-j.js.map} +1 -1
  66. package/dist/Page.js +1 -1
  67. package/dist/{Popover-OOLK0hUz.js → Popover-4C5IVk8T.js} +7 -6
  68. package/dist/{Popover-OOLK0hUz.js.map → Popover-4C5IVk8T.js.map} +1 -1
  69. package/dist/Popover.css +15 -14
  70. package/dist/Popover.js +1 -1
  71. package/dist/{ProgressBar-HA9RPZfC.js → ProgressBar-BGwp-qnf.js} +16 -11
  72. package/dist/ProgressBar-BGwp-qnf.js.map +1 -0
  73. package/dist/ProgressBar.js +1 -1
  74. package/dist/{Radio-31wKzlZ4.js → Radio-BRcpSu-d.js} +12 -12
  75. package/dist/Radio-BRcpSu-d.js.map +1 -0
  76. package/dist/{Radio-BwWDJuLF.js → Radio-D7hNws2b.js} +2 -2
  77. package/dist/{Radio-BwWDJuLF.js.map → Radio-D7hNws2b.js.map} +1 -1
  78. package/dist/Radio.js +1 -1
  79. package/dist/{SelectCard-C91twG1S.js → SelectCard-Bag44PmE.js} +3 -3
  80. package/dist/{SelectCard-C91twG1S.js.map → SelectCard-Bag44PmE.js.map} +1 -1
  81. package/dist/SelectCard.js +1 -1
  82. package/dist/SelectField.js +1 -1
  83. package/dist/{SelectFieldSync-BFsJssdD.js → SelectFieldSync-CigqXq3T.js} +67 -50
  84. package/dist/SelectFieldSync-CigqXq3T.js.map +1 -0
  85. package/dist/{SelectTrigger-Cxhx9IVo.js → SelectTrigger-DgsvUfyl.js} +2 -2
  86. package/dist/{SelectTrigger-Cxhx9IVo.js.map → SelectTrigger-DgsvUfyl.js.map} +1 -1
  87. package/dist/SelectTrigger.js +1 -1
  88. package/dist/{SelectTriggerBase-aaOWep-V.js → SelectTriggerBase-OxfNqdIq.js} +12 -7
  89. package/dist/SelectTriggerBase-OxfNqdIq.js.map +1 -0
  90. package/dist/{Stepper-Jv9A3Ned.js → Stepper-D8lkCP8Y.js} +11 -2
  91. package/dist/Stepper-D8lkCP8Y.js.map +1 -0
  92. package/dist/Stepper.js +1 -1
  93. package/dist/{Switch-DQICcdAv.js → Switch-D0zwZCg4.js} +2 -2
  94. package/dist/{Switch-DQICcdAv.js.map → Switch-D0zwZCg4.js.map} +1 -1
  95. package/dist/Switch.js +1 -1
  96. package/dist/Table.js +1 -1
  97. package/dist/{TextField-CDiiYSlT.js → TextField-BycenT6H.js} +13 -12
  98. package/dist/TextField-BycenT6H.js.map +1 -0
  99. package/dist/{TextField-CnYxS52Y.js → TextField-Dfzn2HeL.js} +2 -2
  100. package/dist/{TextField-CnYxS52Y.js.map → TextField-Dfzn2HeL.js.map} +1 -1
  101. package/dist/TextField.js +1 -1
  102. package/dist/{Textarea-BnHIDj2P.js → Textarea-BwbwJP6z.js} +13 -12
  103. package/dist/Textarea-BwbwJP6z.js.map +1 -0
  104. package/dist/Textarea.js +1 -1
  105. package/dist/{TimeField-ChqK40k_.js → TimeField-B0WSzSfJ.js} +4 -4
  106. package/dist/{TimeField-ChqK40k_.js.map → TimeField-B0WSzSfJ.js.map} +1 -1
  107. package/dist/TimeField.js +1 -1
  108. package/dist/TimezoneMessage-Cnsl4cHT.js +84 -0
  109. package/dist/TimezoneMessage-Cnsl4cHT.js.map +1 -0
  110. package/dist/TimezoneMessage.css +7 -0
  111. package/dist/Toast.js +2 -2
  112. package/dist/{Toaster-BlycAc63.js → Toaster-9Q_yaKGu.js} +18 -18
  113. package/dist/Toaster-9Q_yaKGu.js.map +1 -0
  114. package/dist/{Toaster-DW_bi2L9.js → Toaster-DHo8dnWH.js} +2 -2
  115. package/dist/{Toaster-DW_bi2L9.js.map → Toaster-DHo8dnWH.js.map} +1 -1
  116. package/dist/{Toolbar-vBomnRKG.js → Toolbar-CVOenuCF.js} +70 -23
  117. package/dist/Toolbar-CVOenuCF.js.map +1 -0
  118. package/dist/Toolbar.js +1 -1
  119. package/dist/{Tooltip-CUiAJXak.js → Tooltip-Bt62hC5J.js} +5 -5
  120. package/dist/{Tooltip-CUiAJXak.js.map → Tooltip-Bt62hC5J.js.map} +1 -1
  121. package/dist/Tooltip.css +9 -8
  122. package/dist/Tooltip.js +1 -1
  123. package/dist/{YearlessDateInputWithPicker-DZSb8sPf.js → YearlessDateInputWithPicker-ztozRk-X.js} +3 -3
  124. package/dist/{YearlessDateInputWithPicker-DZSb8sPf.js.map → YearlessDateInputWithPicker-ztozRk-X.js.map} +1 -1
  125. package/dist/beta/components/MultiSelectField/MultiSelectField.d.ts +2 -0
  126. package/dist/beta/components/MultiSelectField/MultiSelectFieldSync.d.ts +43 -4
  127. package/dist/beta/components/MultiSelectField/internal/MultiSelectFieldList.d.ts +5 -5
  128. package/dist/beta/components/MultiSelectField/internal/useComboMultiple.d.ts +13 -2
  129. package/dist/beta/components/MultiSelectField/stories/MultiSelectField.stories.data.d.ts +1 -0
  130. package/dist/beta/components/MultiSelectField/types.d.ts +52 -8
  131. package/dist/beta/components/SelectField/SelectFieldSync.d.ts +10 -3
  132. package/dist/beta/components/SelectField/internal/FieldListBase.d.ts +6 -5
  133. package/dist/beta/components/SelectField/internal/SelectFieldList.d.ts +4 -2
  134. package/dist/beta/components/SelectField/internal/SelectFieldListItem.d.ts +2 -1
  135. package/dist/beta/components/SelectField/internal/VirtualizedFieldListBase.d.ts +2 -0
  136. package/dist/beta/components/SelectField/internal/useCombo.d.ts +3 -1
  137. package/dist/beta/components/SelectField/internal/useFieldListSections.d.ts +55 -0
  138. package/dist/beta/components/SelectField/stories/SelectField.stories.data.d.ts +1 -0
  139. package/dist/beta/components/SelectField/types.d.ts +24 -6
  140. package/dist/beta/components/Table/DataTable/internal/editable-cells/DataTableEditableNumberCell.d.ts +7 -0
  141. package/dist/beta/components/Table/DataTable/internal/util/getTanStackColumnDef.d.ts +1 -0
  142. package/dist/beta/components/Table/DataTable/stories/DataTable.story-data.d.ts +1 -0
  143. package/dist/beta/components/Table/createColumnHelper.d.ts +36 -9
  144. package/dist/beta/components/Table/types.d.ts +54 -4
  145. package/dist/beta/components/Toolbar/Filters/internal/utils/filter-state.d.ts +1 -0
  146. package/dist/beta.js +7 -7
  147. package/dist/components/ButtonToggle/ButtonToggle.d.ts +1 -1
  148. package/dist/components/Checkbox/Checkbox.d.ts +2 -1
  149. package/dist/components/Checkbox/CheckboxGroup.d.ts +16 -8
  150. package/dist/components/Checkbox/internal/Checkbox.d.ts +1 -1
  151. package/dist/components/DateFieldRange/DateFieldRange.d.ts +8 -1
  152. package/dist/components/DateFieldRange/internal/DateFieldRangeCalendar.d.ts +3 -1
  153. package/dist/components/DateFieldSingle/DateFieldSingle.d.ts +8 -1
  154. package/dist/components/DateFieldSingle/internal/DateFieldSingleCalendar.d.ts +3 -1
  155. package/dist/components/DateFieldSingle/internal/TimezoneMessage.d.ts +6 -0
  156. package/dist/components/DateFieldSingle/internal/utils.d.ts +11 -0
  157. package/dist/components/DateFieldYearless/DateFieldYearless.d.ts +8 -3
  158. package/dist/components/DateFieldYearlessRange/DateFieldYearlessRange.d.ts +12 -1
  159. package/dist/components/DaysOfTheWeek/DaysOfTheWeek.d.ts +20 -6
  160. package/dist/components/Dialog/internal/useInitialFocus.d.ts +5 -1
  161. package/dist/components/FieldMessage/FieldMessage.d.ts +39 -20
  162. package/dist/components/FieldMessage/index.d.ts +1 -0
  163. package/dist/components/FieldMessage/utils.d.ts +7 -0
  164. package/dist/components/NumberField/NumberField.d.ts +24 -2
  165. package/dist/components/Page/Page.d.ts +2 -2
  166. package/dist/components/ProgressBar/ProgressBar.d.ts +8 -3
  167. package/dist/components/Radio/Radio.d.ts +2 -1
  168. package/dist/components/Radio/RadioGroup.d.ts +16 -8
  169. package/dist/components/SelectTrigger/internal/SelectTriggerBase.d.ts +1 -1
  170. package/dist/components/Stepper/Stepper.d.ts +6 -2
  171. package/dist/components/TextField/internal/TextField.d.ts +12 -1
  172. package/dist/components/Textarea/Textarea.d.ts +8 -5
  173. package/dist/index-DXeGMe23.js +836 -0
  174. package/dist/index-DXeGMe23.js.map +1 -0
  175. package/dist/{index.esm-BMOZFPwN.js → index.esm-C2ZhC_8d.js} +2 -2
  176. package/dist/{index.esm-BMOZFPwN.js.map → index.esm-C2ZhC_8d.js.map} +1 -1
  177. package/dist/{useOnClickOutside-Cyqbe1n3.js → index.esm-K9kxJhLx.js} +88 -94
  178. package/dist/index.esm-K9kxJhLx.js.map +1 -0
  179. package/dist/index.js +31 -30
  180. package/dist/index.js.map +1 -1
  181. package/dist/internal/components/Helper/Helper.d.ts +12 -3
  182. package/dist/internal/components/StatusIcon/StatusIcon.d.ts +45 -0
  183. package/dist/internal/components/StatusIcon/index.d.ts +1 -0
  184. package/dist/internal/functions/index.d.ts +1 -0
  185. package/dist/internal/functions/warnOnce.d.ts +5 -0
  186. package/dist/internal/hooks/useNumberField/useNumberField.d.ts +1 -1
  187. package/dist/{useDrilldown-lAdB3FFW.js → useDrilldown-jbU4Cs5l.js} +2 -598
  188. package/dist/useDrilldown-jbU4Cs5l.js.map +1 -0
  189. package/dist/{useInitialFocus-nOW12jQ5.js → useInitialFocus-BRRbylek.js} +2 -2
  190. package/dist/{useInitialFocus-nOW12jQ5.js.map → useInitialFocus-BRRbylek.js.map} +1 -1
  191. package/dist/{NumberField-W1k8V5Qq.js → useNumberField-eMyk7MB8.js} +5 -235
  192. package/dist/useNumberField-eMyk7MB8.js.map +1 -0
  193. package/dist/useOnClickOutside-Zw5vzxSq.js +71 -0
  194. package/dist/useOnClickOutside-Zw5vzxSq.js.map +1 -0
  195. package/dist/utils-pudAMGnO.js +25 -0
  196. package/dist/utils-pudAMGnO.js.map +1 -0
  197. package/package.json +9 -8
  198. package/dist/Calendar-jO-0jbbt.js.map +0 -1
  199. package/dist/Checkbox-9VbydUcM.js.map +0 -1
  200. package/dist/Combobox-CNObHLjp.js.map +0 -1
  201. package/dist/DataTable-CQpySyDq.js.map +0 -1
  202. package/dist/DateFieldRange-BG86w0pX.js.map +0 -1
  203. package/dist/DateFieldSingle-Byu_jyye.js.map +0 -1
  204. package/dist/DateFieldYearless-Dw1k3_PY.js.map +0 -1
  205. package/dist/DateFieldYearlessRange--plyld10.js.map +0 -1
  206. package/dist/DaysOfTheWeek-vE310Rjp.js.map +0 -1
  207. package/dist/FieldDialog-Be54L3E-.js.map +0 -1
  208. package/dist/FieldMessage-tEr6rWXS.js +0 -54
  209. package/dist/FieldMessage-tEr6rWXS.js.map +0 -1
  210. package/dist/Helper-CK-XjpR3.js.map +0 -1
  211. package/dist/MultiSelectFieldSync-xj7jXas-.js.map +0 -1
  212. package/dist/NumberField-W1k8V5Qq.js.map +0 -1
  213. package/dist/ProgressBar-HA9RPZfC.js.map +0 -1
  214. package/dist/Radio-31wKzlZ4.js.map +0 -1
  215. package/dist/SelectFieldSync-BFsJssdD.js.map +0 -1
  216. package/dist/SelectTriggerBase-aaOWep-V.js.map +0 -1
  217. package/dist/Stepper-Jv9A3Ned.js.map +0 -1
  218. package/dist/TextField-CDiiYSlT.js.map +0 -1
  219. package/dist/Textarea-BnHIDj2P.js.map +0 -1
  220. package/dist/Toaster-BlycAc63.js.map +0 -1
  221. package/dist/Toolbar-vBomnRKG.js.map +0 -1
  222. package/dist/useDrilldown-lAdB3FFW.js.map +0 -1
  223. package/dist/useOnClickOutside-Cyqbe1n3.js.map +0 -1
  224. package/dist/utils-BHKRoLps.js +0 -60
  225. package/dist/utils-BHKRoLps.js.map +0 -1
@@ -0,0 +1,132 @@
1
+ import { jsx, jsxs } from 'react/jsx-runtime';
2
+ import * as React from 'react';
3
+ import { forwardRef } from 'react';
4
+ import { c as cx } from './index-SvGbrGuT.js';
5
+ import { I as Icon } from './Icon-Bcil6aBo.js';
6
+ import { u as useTheme } from './useTheme-B4i6a3bM.js';
7
+
8
+ import './FieldMessage.css';const messages = "_messages_1opif_1";
9
+ const styles$1 = {
10
+ messages: messages,
11
+ "error-container": "_error-container_1opif_21",
12
+ "warning-container": "_warning-container_1opif_28",
13
+ "status-icon": "_status-icon_1opif_35"
14
+ };
15
+
16
+ const styles = {
17
+ "status-icon": "_status-icon_pq77z_1"
18
+ };
19
+
20
+ const SvgErrorDark = (props) => /* @__PURE__ */ React.createElement("svg", { width: "1em", height: "1em", viewBox: "0 0 16 18", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props }, /* @__PURE__ */ React.createElement("path", { d: "M5.50977 2.02728H10.4814C10.7372 2.02732 10.9832 2.12578 11.1689 2.3017L14.6875 5.6347C14.8868 5.82354 15 6.08573 15 6.36029V11.2079C15 11.4623 14.9027 11.7071 14.7285 11.8925L11.1416 15.7119C10.9527 15.913 10.6891 16.0272 10.4131 16.0273H5.57812C5.30185 16.0271 5.03757 15.9125 4.84863 15.7109L1.27051 11.8935C1.09679 11.7082 1 11.4629 1 11.2089V6.35931C1 6.08506 1.11261 5.82254 1.31152 5.63373L4.82129 2.3017C5.00703 2.12539 5.25368 2.02736 5.50977 2.02728Z", stroke: "#ED6749", strokeWidth: 2 }), /* @__PURE__ */ React.createElement("path", { d: "M4.51778 2.5757C4.89 2.2212 5.38442 2.02363 5.89844 2.02398L10.1016 2.02681C10.6138 2.02715 11.1063 2.22396 11.4776 2.57667L14.3846 5.33773C14.7825 5.71566 15.0076 6.24047 15.0072 6.78924L15.0045 10.8172C15.0041 11.3261 14.8098 11.8157 14.4611 12.1863L11.436 15.4017C11.0581 15.8034 10.531 16.0312 9.97938 16.0312H6.01505C5.46215 16.0312 4.93392 15.8024 4.55581 15.399L1.54358 12.1852C1.19681 11.8152 1.00352 11.3273 1.00282 10.8202L0.997275 6.78846C0.996521 6.24015 1.22091 5.71558 1.61796 5.33743L4.51778 2.5757Z", fill: "#ED6749" }), /* @__PURE__ */ React.createElement("rect", { x: 6.03735, y: 4.59998, width: 3.69733, height: 8.4, fill: "#141414" }), /* @__PURE__ */ React.createElement("path", { d: "M8.12882 2.34454C4.44882 2.34454 1.46216 5.33121 1.46216 9.01121C1.46216 12.6912 4.44882 15.6779 8.12882 15.6779C11.8088 15.6779 14.7955 12.6912 14.7955 9.01121C14.7955 5.33121 11.8088 2.34454 8.12882 2.34454ZM8.12882 9.67788C7.76216 9.67788 7.46216 9.37788 7.46216 9.01121V6.34454C7.46216 5.97788 7.76216 5.67788 8.12882 5.67788C8.49549 5.67788 8.79549 5.97788 8.79549 6.34454V9.01121C8.79549 9.37788 8.49549 9.67788 8.12882 9.67788ZM8.79549 12.3445H7.46216V11.0112H8.79549V12.3445Z", fill: "#ED6749" }));
21
+
22
+ const SvgWarningDark = (props) => /* @__PURE__ */ React.createElement("svg", { width: "1em", height: "1em", viewBox: "0 0 16 18", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props }, /* @__PURE__ */ React.createElement("path", { d: "M6.97705 4.4436C7.42898 3.6633 8.55639 3.66329 9.0083 4.4436L15.3101 15.3333C15.7618 16.1135 15.1985 17.0928 14.2954 17.093H1.68994C0.786874 17.0928 0.223584 16.1135 0.675293 15.3333L6.97705 4.4436ZM6.65576 15.5823H9.32959V12.9084H6.65576V15.5823ZM7.99268 7.88696C7.2562 7.88696 6.65576 8.4874 6.65576 9.22388V10.8977C6.65577 11.6342 7.2562 12.2346 7.99268 12.2346C8.72914 12.2346 9.32958 11.6342 9.32959 10.8977V9.22388C9.32959 8.4874 8.72914 7.88697 7.99268 7.88696Z", stroke: "#FFC902" }), /* @__PURE__ */ React.createElement("rect", { x: 6.51721, y: 8.82703, width: 2.85797, height: 6.30518, fill: "#141414" }), /* @__PURE__ */ React.createElement("path", { d: "M1.66406 16.5977L14.2188 16.6016C14.4375 16.6172 14.7203 16.5167 14.8438 16.3086C15.0234 16.0781 14.9846 15.7698 14.8867 15.5859L8.57422 4.68359C8.52734 4.57031 8.30681 4.36402 7.99609 4.35547C7.68964 4.35547 7.48438 4.54688 7.40234 4.71094L1.09766 15.6016C0.994082 15.7588 0.984801 16.1025 1.11328 16.293C1.23297 16.4704 1.46828 16.5934 1.66406 16.5977ZM7.98002 11.9172C7.58049 11.9172 7.2536 11.5887 7.2536 11.1873V9.72736C7.2536 9.32589 7.58049 8.99741 7.98002 8.99741C8.37955 8.99741 8.70644 9.32589 8.70644 9.72736V11.1873C8.70644 11.5887 8.37955 11.9172 7.98002 11.9172ZM8.70644 14.837H7.2536V13.3771H8.70644V14.837Z", fill: "#FFC902" }));
23
+
24
+ const SvgSuccessDark = (props) => /* @__PURE__ */ React.createElement("svg", { width: "1em", height: "1em", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props }, /* @__PURE__ */ React.createElement("g", { clipPath: "url(#clip0_50_1222)" }, /* @__PURE__ */ React.createElement("path", { d: "M8.00016 1.33333C4.32016 1.33333 1.3335 4.32 1.3335 8C1.3335 11.68 4.32016 14.6667 8.00016 14.6667C11.6802 14.6667 14.6668 11.68 14.6668 8C14.6668 4.32 11.6802 1.33333 8.00016 1.33333ZM6.1935 10.86L3.80016 8.46666C3.73844 8.40494 3.68948 8.33167 3.65608 8.25103C3.62267 8.17038 3.60548 8.08395 3.60548 7.99666C3.60548 7.90938 3.62267 7.82295 3.65608 7.7423C3.68948 7.66166 3.73844 7.58839 3.80016 7.52667C3.86188 7.46494 3.93516 7.41598 4.0158 7.38258C4.09644 7.34918 4.18288 7.33198 4.27016 7.33198C4.35745 7.33198 4.44388 7.34918 4.52452 7.38258C4.60517 7.41598 4.67844 7.46494 4.74016 7.52667L6.66683 9.44666L11.2535 4.86C11.3781 4.73535 11.5472 4.66532 11.7235 4.66532C11.8998 4.66532 12.0688 4.73535 12.1935 4.86C12.3181 4.98465 12.3882 5.15371 12.3882 5.33C12.3882 5.50628 12.3181 5.67535 12.1935 5.8L7.1335 10.86C7.07182 10.9218 6.99856 10.9708 6.91791 11.0043C6.83726 11.0377 6.75081 11.055 6.6635 11.055C6.57618 11.055 6.48973 11.0377 6.40908 11.0043C6.32843 10.9708 6.25517 10.9218 6.1935 10.86Z", fill: "#0BD085" })), /* @__PURE__ */ React.createElement("defs", null, /* @__PURE__ */ React.createElement("clipPath", { id: "clip0_50_1222" }, /* @__PURE__ */ React.createElement("rect", { width: 16, height: 16, fill: "white" }))));
25
+
26
+ const SvgErrorLight = (props) => /* @__PURE__ */ React.createElement("svg", { width: "1em", height: "1em", viewBox: "0 0 16 18", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props }, /* @__PURE__ */ React.createElement("path", { d: "M5.50977 2.02728H10.4814C10.7372 2.02732 10.9832 2.12578 11.1689 2.3017L14.6875 5.6347C14.8868 5.82354 15 6.08573 15 6.36029V11.2079C15 11.4623 14.9027 11.7071 14.7285 11.8925L11.1416 15.7119C10.9527 15.913 10.6891 16.0272 10.4131 16.0273H5.57812C5.30185 16.0271 5.03757 15.9125 4.84863 15.7109L1.27051 11.8935C1.09679 11.7082 1 11.4629 1 11.2089V6.35931C1 6.08506 1.11261 5.82254 1.31152 5.63373L4.82129 2.3017C5.00703 2.12539 5.25368 2.02736 5.50977 2.02728Z", stroke: "#A31900", strokeWidth: 2 }), /* @__PURE__ */ React.createElement("path", { d: "M4.51778 2.5757C4.89 2.2212 5.38442 2.02363 5.89844 2.02398L10.1016 2.02681C10.6138 2.02715 11.1063 2.22396 11.4776 2.57667L14.3846 5.33773C14.7825 5.71566 15.0076 6.24047 15.0072 6.78924L15.0045 10.8172C15.0041 11.3261 14.8098 11.8157 14.4611 12.1863L11.436 15.4017C11.0581 15.8034 10.531 16.0312 9.97938 16.0312H6.01505C5.46215 16.0312 4.93392 15.8024 4.55581 15.399L1.54358 12.1852C1.19681 11.8152 1.00352 11.3273 1.00282 10.8202L0.997275 6.78846C0.996521 6.24015 1.22091 5.71558 1.61796 5.33743L4.51778 2.5757Z", fill: "#D62100" }), /* @__PURE__ */ React.createElement("rect", { x: 6.03735, y: 4.59998, width: 3.69733, height: 8.4, fill: "white" }), /* @__PURE__ */ React.createElement("path", { d: "M8.12882 2.34454C4.44882 2.34454 1.46216 5.33121 1.46216 9.01121C1.46216 12.6912 4.44882 15.6779 8.12882 15.6779C11.8088 15.6779 14.7955 12.6912 14.7955 9.01121C14.7955 5.33121 11.8088 2.34454 8.12882 2.34454ZM8.12882 9.67788C7.76216 9.67788 7.46216 9.37788 7.46216 9.01121V6.34454C7.46216 5.97788 7.76216 5.67788 8.12882 5.67788C8.49549 5.67788 8.79549 5.97788 8.79549 6.34454V9.01121C8.79549 9.37788 8.49549 9.67788 8.12882 9.67788ZM8.79549 12.3445H7.46216V11.0112H8.79549V12.3445Z", fill: "#D62100" }));
27
+
28
+ const SvgWarningLight = (props) => /* @__PURE__ */ React.createElement("svg", { width: "1em", height: "1em", viewBox: "0 0 16 18", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props }, /* @__PURE__ */ React.createElement("path", { d: "M6.97705 4.4436C7.42898 3.6633 8.55639 3.66329 9.0083 4.4436L15.3101 15.3333C15.7618 16.1135 15.1985 17.0928 14.2954 17.093H1.68994C0.786874 17.0928 0.223584 16.1135 0.675293 15.3333L6.97705 4.4436ZM6.65576 15.5823H9.32959V12.9084H6.65576V15.5823ZM7.99268 7.88696C7.2562 7.88696 6.65576 8.4874 6.65576 9.22388V10.8977C6.65577 11.6342 7.2562 12.2346 7.99268 12.2346C8.72914 12.2346 9.32958 11.6342 9.32959 10.8977V9.22388C9.32959 8.4874 8.72914 7.88697 7.99268 7.88696Z", stroke: "#964F00" }), /* @__PURE__ */ React.createElement("rect", { x: 6.51721, y: 8.82703, width: 2.85797, height: 6.30518, fill: "white" }), /* @__PURE__ */ React.createElement("path", { d: "M1.66406 16.5977L14.2188 16.6016C14.4375 16.6172 14.7203 16.5167 14.8438 16.3086C15.0234 16.0781 14.9846 15.7698 14.8867 15.5859L8.57422 4.68359C8.52734 4.57031 8.30681 4.36402 7.99609 4.35547C7.68964 4.35547 7.48438 4.54688 7.40234 4.71094L1.09766 15.6016C0.994082 15.7588 0.984801 16.1025 1.11328 16.293C1.23297 16.4704 1.46828 16.5934 1.66406 16.5977ZM7.98002 11.9172C7.58049 11.9172 7.2536 11.5887 7.2536 11.1873V9.72736C7.2536 9.32589 7.58049 8.99741 7.98002 8.99741C8.37955 8.99741 8.70644 9.32589 8.70644 9.72736V11.1873C8.70644 11.5887 8.37955 11.9172 7.98002 11.9172ZM8.70644 14.837H7.2536V13.3771H8.70644V14.837Z", fill: "#E37700" }));
29
+
30
+ const SvgSuccessLight = (props) => /* @__PURE__ */ React.createElement("svg", { width: "1em", height: "1em", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props }, /* @__PURE__ */ React.createElement("g", { clipPath: "url(#clip0_50_1211)" }, /* @__PURE__ */ React.createElement("path", { d: "M8.00016 1.33333C4.32016 1.33333 1.3335 4.32 1.3335 8C1.3335 11.68 4.32016 14.6667 8.00016 14.6667C11.6802 14.6667 14.6668 11.68 14.6668 8C14.6668 4.32 11.6802 1.33333 8.00016 1.33333ZM6.1935 10.86L3.80016 8.46666C3.73844 8.40494 3.68948 8.33167 3.65608 8.25103C3.62267 8.17038 3.60548 8.08395 3.60548 7.99666C3.60548 7.90938 3.62267 7.82295 3.65608 7.7423C3.68948 7.66166 3.73844 7.58839 3.80016 7.52667C3.86188 7.46494 3.93516 7.41598 4.0158 7.38258C4.09644 7.34918 4.18288 7.33198 4.27016 7.33198C4.35745 7.33198 4.44388 7.34918 4.52452 7.38258C4.60517 7.41598 4.67844 7.46494 4.74016 7.52667L6.66683 9.44666L11.2535 4.86C11.3781 4.73535 11.5472 4.66532 11.7235 4.66532C11.8998 4.66532 12.0688 4.73535 12.1935 4.86C12.3181 4.98465 12.3882 5.15371 12.3882 5.33C12.3882 5.50628 12.3181 5.67535 12.1935 5.8L7.1335 10.86C7.07182 10.9218 6.99856 10.9708 6.91791 11.0043C6.83726 11.0377 6.75081 11.055 6.6635 11.055C6.57618 11.055 6.48973 11.0377 6.40908 11.0043C6.32843 10.9708 6.25517 10.9218 6.1935 10.86Z", fill: "#077E50" })), /* @__PURE__ */ React.createElement("defs", null, /* @__PURE__ */ React.createElement("clipPath", { id: "clip0_50_1211" }, /* @__PURE__ */ React.createElement("rect", { width: 16, height: 16, fill: "white" }))));
31
+
32
+ const iconMap = {
33
+ success: {
34
+ light: SvgSuccessLight,
35
+ dark: SvgSuccessDark
36
+ },
37
+ warning: {
38
+ light: SvgWarningLight,
39
+ dark: SvgWarningDark
40
+ },
41
+ error: {
42
+ light: SvgErrorLight,
43
+ dark: SvgErrorDark
44
+ }
45
+ };
46
+ const StatusIcon = (props) => {
47
+ const { variant, rootProps, className, iconProps } = props;
48
+ const { mode } = useTheme();
49
+ return /* @__PURE__ */ jsx(
50
+ "span",
51
+ {
52
+ ...rootProps,
53
+ className: cx(
54
+ styles["status-icon"],
55
+ styles[variant],
56
+ className,
57
+ rootProps?.className
58
+ ),
59
+ children: /* @__PURE__ */ jsx(Icon, { inherit: true, svg: iconMap[variant][mode ?? "light"], ...iconProps })
60
+ }
61
+ );
62
+ };
63
+ StatusIcon.displayName = "StatusIcon";
64
+
65
+ function normalizeMessages(val) {
66
+ if (val === void 0) return [];
67
+ if (Array.isArray(val)) return val;
68
+ return [val];
69
+ }
70
+ const FieldMessage = forwardRef(
71
+ (props, ref) => {
72
+ const {
73
+ id,
74
+ hint,
75
+ description,
76
+ error,
77
+ warning,
78
+ errorAriaLive: _errorAriaLive,
79
+ errorMessage,
80
+ className,
81
+ ...rest
82
+ } = props;
83
+ const errorMessages = normalizeMessages(error);
84
+ const warningMessages = normalizeMessages(warning);
85
+ const allErrors = errorMessages.length === 0 && errorMessage ? [errorMessage] : errorMessages;
86
+ return /* @__PURE__ */ jsxs(
87
+ "div",
88
+ {
89
+ ...rest,
90
+ className: cx(styles$1["messages"], className),
91
+ ref,
92
+ id,
93
+ children: [
94
+ hint ?? null,
95
+ description ? /* @__PURE__ */ jsx("div", { className: styles$1["description-container"], children: /* @__PURE__ */ jsx("span", { children: description }) }) : null,
96
+ allErrors.map((msg, index) => /* @__PURE__ */ jsxs("div", { className: styles$1["error-container"], children: [
97
+ /* @__PURE__ */ jsx(
98
+ StatusIcon,
99
+ {
100
+ variant: "error",
101
+ rootProps: {
102
+ "aria-hidden": true,
103
+ className: styles$1["status-icon"],
104
+ style: { color: "inherit" }
105
+ }
106
+ }
107
+ ),
108
+ /* @__PURE__ */ jsx("span", { className: styles$1["error-message"], "aria-live": "assertive", children: msg })
109
+ ] }, index)),
110
+ warningMessages.map((msg, index) => /* @__PURE__ */ jsxs("div", { className: styles$1["warning-container"], children: [
111
+ /* @__PURE__ */ jsx(
112
+ StatusIcon,
113
+ {
114
+ variant: "warning",
115
+ rootProps: {
116
+ "aria-hidden": true,
117
+ className: styles$1["status-icon"],
118
+ style: { color: "inherit" }
119
+ }
120
+ }
121
+ ),
122
+ /* @__PURE__ */ jsx("span", { className: styles$1["warning-message"], "aria-live": "polite", children: msg })
123
+ ] }, index))
124
+ ]
125
+ }
126
+ );
127
+ }
128
+ );
129
+ FieldMessage.displayName = "FieldMessage";
130
+
131
+ export { FieldMessage as F };
132
+ //# sourceMappingURL=FieldMessage-DS0COrjp.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FieldMessage-DS0COrjp.js","sources":["../src/internal/components/StatusIcon/svg/error_dark.svg","../src/internal/components/StatusIcon/svg/warning_dark.svg","../src/internal/components/StatusIcon/svg/success_dark.svg","../src/internal/components/StatusIcon/svg/error_light.svg","../src/internal/components/StatusIcon/svg/warning_light.svg","../src/internal/components/StatusIcon/svg/success_light.svg","../src/internal/components/StatusIcon/StatusIcon.tsx","../src/components/FieldMessage/FieldMessage.tsx"],"sourcesContent":["import * as React from \"react\";\nconst SvgErrorDark = (props) => /* @__PURE__ */ React.createElement(\"svg\", { width: \"1em\", height: \"1em\", viewBox: \"0 0 16 18\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\", ...props }, /* @__PURE__ */ React.createElement(\"path\", { d: \"M5.50977 2.02728H10.4814C10.7372 2.02732 10.9832 2.12578 11.1689 2.3017L14.6875 5.6347C14.8868 5.82354 15 6.08573 15 6.36029V11.2079C15 11.4623 14.9027 11.7071 14.7285 11.8925L11.1416 15.7119C10.9527 15.913 10.6891 16.0272 10.4131 16.0273H5.57812C5.30185 16.0271 5.03757 15.9125 4.84863 15.7109L1.27051 11.8935C1.09679 11.7082 1 11.4629 1 11.2089V6.35931C1 6.08506 1.11261 5.82254 1.31152 5.63373L4.82129 2.3017C5.00703 2.12539 5.25368 2.02736 5.50977 2.02728Z\", stroke: \"#ED6749\", strokeWidth: 2 }), /* @__PURE__ */ React.createElement(\"path\", { d: \"M4.51778 2.5757C4.89 2.2212 5.38442 2.02363 5.89844 2.02398L10.1016 2.02681C10.6138 2.02715 11.1063 2.22396 11.4776 2.57667L14.3846 5.33773C14.7825 5.71566 15.0076 6.24047 15.0072 6.78924L15.0045 10.8172C15.0041 11.3261 14.8098 11.8157 14.4611 12.1863L11.436 15.4017C11.0581 15.8034 10.531 16.0312 9.97938 16.0312H6.01505C5.46215 16.0312 4.93392 15.8024 4.55581 15.399L1.54358 12.1852C1.19681 11.8152 1.00352 11.3273 1.00282 10.8202L0.997275 6.78846C0.996521 6.24015 1.22091 5.71558 1.61796 5.33743L4.51778 2.5757Z\", fill: \"#ED6749\" }), /* @__PURE__ */ React.createElement(\"rect\", { x: 6.03735, y: 4.59998, width: 3.69733, height: 8.4, fill: \"#141414\" }), /* @__PURE__ */ React.createElement(\"path\", { d: \"M8.12882 2.34454C4.44882 2.34454 1.46216 5.33121 1.46216 9.01121C1.46216 12.6912 4.44882 15.6779 8.12882 15.6779C11.8088 15.6779 14.7955 12.6912 14.7955 9.01121C14.7955 5.33121 11.8088 2.34454 8.12882 2.34454ZM8.12882 9.67788C7.76216 9.67788 7.46216 9.37788 7.46216 9.01121V6.34454C7.46216 5.97788 7.76216 5.67788 8.12882 5.67788C8.49549 5.67788 8.79549 5.97788 8.79549 6.34454V9.01121C8.79549 9.37788 8.49549 9.67788 8.12882 9.67788ZM8.79549 12.3445H7.46216V11.0112H8.79549V12.3445Z\", fill: \"#ED6749\" }));\nexport default SvgErrorDark;\n","import * as React from \"react\";\nconst SvgWarningDark = (props) => /* @__PURE__ */ React.createElement(\"svg\", { width: \"1em\", height: \"1em\", viewBox: \"0 0 16 18\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\", ...props }, /* @__PURE__ */ React.createElement(\"path\", { d: \"M6.97705 4.4436C7.42898 3.6633 8.55639 3.66329 9.0083 4.4436L15.3101 15.3333C15.7618 16.1135 15.1985 17.0928 14.2954 17.093H1.68994C0.786874 17.0928 0.223584 16.1135 0.675293 15.3333L6.97705 4.4436ZM6.65576 15.5823H9.32959V12.9084H6.65576V15.5823ZM7.99268 7.88696C7.2562 7.88696 6.65576 8.4874 6.65576 9.22388V10.8977C6.65577 11.6342 7.2562 12.2346 7.99268 12.2346C8.72914 12.2346 9.32958 11.6342 9.32959 10.8977V9.22388C9.32959 8.4874 8.72914 7.88697 7.99268 7.88696Z\", stroke: \"#FFC902\" }), /* @__PURE__ */ React.createElement(\"rect\", { x: 6.51721, y: 8.82703, width: 2.85797, height: 6.30518, fill: \"#141414\" }), /* @__PURE__ */ React.createElement(\"path\", { d: \"M1.66406 16.5977L14.2188 16.6016C14.4375 16.6172 14.7203 16.5167 14.8438 16.3086C15.0234 16.0781 14.9846 15.7698 14.8867 15.5859L8.57422 4.68359C8.52734 4.57031 8.30681 4.36402 7.99609 4.35547C7.68964 4.35547 7.48438 4.54688 7.40234 4.71094L1.09766 15.6016C0.994082 15.7588 0.984801 16.1025 1.11328 16.293C1.23297 16.4704 1.46828 16.5934 1.66406 16.5977ZM7.98002 11.9172C7.58049 11.9172 7.2536 11.5887 7.2536 11.1873V9.72736C7.2536 9.32589 7.58049 8.99741 7.98002 8.99741C8.37955 8.99741 8.70644 9.32589 8.70644 9.72736V11.1873C8.70644 11.5887 8.37955 11.9172 7.98002 11.9172ZM8.70644 14.837H7.2536V13.3771H8.70644V14.837Z\", fill: \"#FFC902\" }));\nexport default SvgWarningDark;\n","import * as React from \"react\";\nconst SvgSuccessDark = (props) => /* @__PURE__ */ React.createElement(\"svg\", { width: \"1em\", height: \"1em\", viewBox: \"0 0 16 16\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\", ...props }, /* @__PURE__ */ React.createElement(\"g\", { clipPath: \"url(#clip0_50_1222)\" }, /* @__PURE__ */ React.createElement(\"path\", { d: \"M8.00016 1.33333C4.32016 1.33333 1.3335 4.32 1.3335 8C1.3335 11.68 4.32016 14.6667 8.00016 14.6667C11.6802 14.6667 14.6668 11.68 14.6668 8C14.6668 4.32 11.6802 1.33333 8.00016 1.33333ZM6.1935 10.86L3.80016 8.46666C3.73844 8.40494 3.68948 8.33167 3.65608 8.25103C3.62267 8.17038 3.60548 8.08395 3.60548 7.99666C3.60548 7.90938 3.62267 7.82295 3.65608 7.7423C3.68948 7.66166 3.73844 7.58839 3.80016 7.52667C3.86188 7.46494 3.93516 7.41598 4.0158 7.38258C4.09644 7.34918 4.18288 7.33198 4.27016 7.33198C4.35745 7.33198 4.44388 7.34918 4.52452 7.38258C4.60517 7.41598 4.67844 7.46494 4.74016 7.52667L6.66683 9.44666L11.2535 4.86C11.3781 4.73535 11.5472 4.66532 11.7235 4.66532C11.8998 4.66532 12.0688 4.73535 12.1935 4.86C12.3181 4.98465 12.3882 5.15371 12.3882 5.33C12.3882 5.50628 12.3181 5.67535 12.1935 5.8L7.1335 10.86C7.07182 10.9218 6.99856 10.9708 6.91791 11.0043C6.83726 11.0377 6.75081 11.055 6.6635 11.055C6.57618 11.055 6.48973 11.0377 6.40908 11.0043C6.32843 10.9708 6.25517 10.9218 6.1935 10.86Z\", fill: \"#0BD085\" })), /* @__PURE__ */ React.createElement(\"defs\", null, /* @__PURE__ */ React.createElement(\"clipPath\", { id: \"clip0_50_1222\" }, /* @__PURE__ */ React.createElement(\"rect\", { width: 16, height: 16, fill: \"white\" }))));\nexport default SvgSuccessDark;\n","import * as React from \"react\";\nconst SvgErrorLight = (props) => /* @__PURE__ */ React.createElement(\"svg\", { width: \"1em\", height: \"1em\", viewBox: \"0 0 16 18\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\", ...props }, /* @__PURE__ */ React.createElement(\"path\", { d: \"M5.50977 2.02728H10.4814C10.7372 2.02732 10.9832 2.12578 11.1689 2.3017L14.6875 5.6347C14.8868 5.82354 15 6.08573 15 6.36029V11.2079C15 11.4623 14.9027 11.7071 14.7285 11.8925L11.1416 15.7119C10.9527 15.913 10.6891 16.0272 10.4131 16.0273H5.57812C5.30185 16.0271 5.03757 15.9125 4.84863 15.7109L1.27051 11.8935C1.09679 11.7082 1 11.4629 1 11.2089V6.35931C1 6.08506 1.11261 5.82254 1.31152 5.63373L4.82129 2.3017C5.00703 2.12539 5.25368 2.02736 5.50977 2.02728Z\", stroke: \"#A31900\", strokeWidth: 2 }), /* @__PURE__ */ React.createElement(\"path\", { d: \"M4.51778 2.5757C4.89 2.2212 5.38442 2.02363 5.89844 2.02398L10.1016 2.02681C10.6138 2.02715 11.1063 2.22396 11.4776 2.57667L14.3846 5.33773C14.7825 5.71566 15.0076 6.24047 15.0072 6.78924L15.0045 10.8172C15.0041 11.3261 14.8098 11.8157 14.4611 12.1863L11.436 15.4017C11.0581 15.8034 10.531 16.0312 9.97938 16.0312H6.01505C5.46215 16.0312 4.93392 15.8024 4.55581 15.399L1.54358 12.1852C1.19681 11.8152 1.00352 11.3273 1.00282 10.8202L0.997275 6.78846C0.996521 6.24015 1.22091 5.71558 1.61796 5.33743L4.51778 2.5757Z\", fill: \"#D62100\" }), /* @__PURE__ */ React.createElement(\"rect\", { x: 6.03735, y: 4.59998, width: 3.69733, height: 8.4, fill: \"white\" }), /* @__PURE__ */ React.createElement(\"path\", { d: \"M8.12882 2.34454C4.44882 2.34454 1.46216 5.33121 1.46216 9.01121C1.46216 12.6912 4.44882 15.6779 8.12882 15.6779C11.8088 15.6779 14.7955 12.6912 14.7955 9.01121C14.7955 5.33121 11.8088 2.34454 8.12882 2.34454ZM8.12882 9.67788C7.76216 9.67788 7.46216 9.37788 7.46216 9.01121V6.34454C7.46216 5.97788 7.76216 5.67788 8.12882 5.67788C8.49549 5.67788 8.79549 5.97788 8.79549 6.34454V9.01121C8.79549 9.37788 8.49549 9.67788 8.12882 9.67788ZM8.79549 12.3445H7.46216V11.0112H8.79549V12.3445Z\", fill: \"#D62100\" }));\nexport default SvgErrorLight;\n","import * as React from \"react\";\nconst SvgWarningLight = (props) => /* @__PURE__ */ React.createElement(\"svg\", { width: \"1em\", height: \"1em\", viewBox: \"0 0 16 18\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\", ...props }, /* @__PURE__ */ React.createElement(\"path\", { d: \"M6.97705 4.4436C7.42898 3.6633 8.55639 3.66329 9.0083 4.4436L15.3101 15.3333C15.7618 16.1135 15.1985 17.0928 14.2954 17.093H1.68994C0.786874 17.0928 0.223584 16.1135 0.675293 15.3333L6.97705 4.4436ZM6.65576 15.5823H9.32959V12.9084H6.65576V15.5823ZM7.99268 7.88696C7.2562 7.88696 6.65576 8.4874 6.65576 9.22388V10.8977C6.65577 11.6342 7.2562 12.2346 7.99268 12.2346C8.72914 12.2346 9.32958 11.6342 9.32959 10.8977V9.22388C9.32959 8.4874 8.72914 7.88697 7.99268 7.88696Z\", stroke: \"#964F00\" }), /* @__PURE__ */ React.createElement(\"rect\", { x: 6.51721, y: 8.82703, width: 2.85797, height: 6.30518, fill: \"white\" }), /* @__PURE__ */ React.createElement(\"path\", { d: \"M1.66406 16.5977L14.2188 16.6016C14.4375 16.6172 14.7203 16.5167 14.8438 16.3086C15.0234 16.0781 14.9846 15.7698 14.8867 15.5859L8.57422 4.68359C8.52734 4.57031 8.30681 4.36402 7.99609 4.35547C7.68964 4.35547 7.48438 4.54688 7.40234 4.71094L1.09766 15.6016C0.994082 15.7588 0.984801 16.1025 1.11328 16.293C1.23297 16.4704 1.46828 16.5934 1.66406 16.5977ZM7.98002 11.9172C7.58049 11.9172 7.2536 11.5887 7.2536 11.1873V9.72736C7.2536 9.32589 7.58049 8.99741 7.98002 8.99741C8.37955 8.99741 8.70644 9.32589 8.70644 9.72736V11.1873C8.70644 11.5887 8.37955 11.9172 7.98002 11.9172ZM8.70644 14.837H7.2536V13.3771H8.70644V14.837Z\", fill: \"#E37700\" }));\nexport default SvgWarningLight;\n","import * as React from \"react\";\nconst SvgSuccessLight = (props) => /* @__PURE__ */ React.createElement(\"svg\", { width: \"1em\", height: \"1em\", viewBox: \"0 0 16 16\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\", ...props }, /* @__PURE__ */ React.createElement(\"g\", { clipPath: \"url(#clip0_50_1211)\" }, /* @__PURE__ */ React.createElement(\"path\", { d: \"M8.00016 1.33333C4.32016 1.33333 1.3335 4.32 1.3335 8C1.3335 11.68 4.32016 14.6667 8.00016 14.6667C11.6802 14.6667 14.6668 11.68 14.6668 8C14.6668 4.32 11.6802 1.33333 8.00016 1.33333ZM6.1935 10.86L3.80016 8.46666C3.73844 8.40494 3.68948 8.33167 3.65608 8.25103C3.62267 8.17038 3.60548 8.08395 3.60548 7.99666C3.60548 7.90938 3.62267 7.82295 3.65608 7.7423C3.68948 7.66166 3.73844 7.58839 3.80016 7.52667C3.86188 7.46494 3.93516 7.41598 4.0158 7.38258C4.09644 7.34918 4.18288 7.33198 4.27016 7.33198C4.35745 7.33198 4.44388 7.34918 4.52452 7.38258C4.60517 7.41598 4.67844 7.46494 4.74016 7.52667L6.66683 9.44666L11.2535 4.86C11.3781 4.73535 11.5472 4.66532 11.7235 4.66532C11.8998 4.66532 12.0688 4.73535 12.1935 4.86C12.3181 4.98465 12.3882 5.15371 12.3882 5.33C12.3882 5.50628 12.3181 5.67535 12.1935 5.8L7.1335 10.86C7.07182 10.9218 6.99856 10.9708 6.91791 11.0043C6.83726 11.0377 6.75081 11.055 6.6635 11.055C6.57618 11.055 6.48973 11.0377 6.40908 11.0043C6.32843 10.9708 6.25517 10.9218 6.1935 10.86Z\", fill: \"#077E50\" })), /* @__PURE__ */ React.createElement(\"defs\", null, /* @__PURE__ */ React.createElement(\"clipPath\", { id: \"clip0_50_1211\" }, /* @__PURE__ */ React.createElement(\"rect\", { width: 16, height: 16, fill: \"white\" }))));\nexport default SvgSuccessLight;\n","import cx from \"classnames\";\nimport styles from \"./StatusIcon.module.scss\";\nimport { Icon, IconProps } from \"../../../components/Icon\";\nimport type { PassThroughPropsWithRef } from \"../../../types\";\n\nimport error_dark from \"./svg/error_dark.svg\";\nimport warning_dark from \"./svg/warning_dark.svg\";\nimport success_dark from \"./svg/success_dark.svg\";\nimport error_light from \"./svg/error_light.svg\";\nimport warning_light from \"./svg/warning_light.svg\";\nimport success_light from \"./svg/success_light.svg\";\nimport { useTheme } from \"../../../providers\";\n\nconst iconMap = {\n success: {\n light: success_light,\n dark: success_dark,\n },\n warning: {\n light: warning_light,\n dark: warning_dark,\n },\n error: {\n light: error_light,\n dark: error_dark,\n },\n};\n\n/**\n * The visual variant of the StatusIcon.\n */\nexport type StatusIconVariant = \"success\" | \"warning\" | \"error\";\n\n/**\n * Props for the StatusIcon component\n * @property {StatusIconVariant} variant - The visual variant of the status icon\n */\nexport type StatusIconProps = {\n /**\n * The visual variant of the status icon.\n */\n variant: StatusIconVariant;\n /**\n * Props spread onto the root `<span>` element.\n */\n rootProps?: PassThroughPropsWithRef<\"span\">;\n /**\n * Additional class names to apply to the root `<span>` element.\n */\n className?: string;\n /**\n * Props spread onto the inner `<Icon>` element.\n */\n iconProps?: Omit<IconProps, \"svg\" | \"inherit\" | \"color\">;\n};\n\n/**\n * StatusIcon component for displaying a status indicator icon.\n *\n * Features:\n * - Supports success, warning, and error variants\n * - Uses semantic status colors from design tokens\n * - Lightweight and composable\n *\n * @example\n * <StatusIcon variant=\"success\" />\n * <StatusIcon variant=\"warning\" />\n * <StatusIcon variant=\"error\" />\n */\nexport const StatusIcon = (props: StatusIconProps) => {\n const { variant, rootProps, className, iconProps } = props;\n\n const { mode } = useTheme();\n\n return (\n <span\n {...rootProps}\n className={cx(\n styles[\"status-icon\"],\n styles[variant],\n className,\n rootProps?.className,\n )}\n >\n <Icon inherit svg={iconMap[variant][mode ?? \"light\"]} {...iconProps} />\n </span>\n );\n};\n\nStatusIcon.displayName = \"StatusIcon\";\n","import {\n forwardRef,\n type AriaAttributes,\n type ReactElement,\n type ComponentPropsWithoutRef,\n} from \"react\";\nimport cx from \"classnames\";\nimport styles from \"./FieldMessage.module.scss\";\nimport { StatusIcon } from \"../../internal/components/StatusIcon\";\n\n/**\n * Props for the FieldMessage component\n * @extends ComponentPropsWithoutRef<\"div\">\n */\nexport type FieldMessageProps = ComponentPropsWithoutRef<\"div\"> & {\n /**\n * Unique identifier for the field message container.\n */\n id?: string;\n /**\n * Hint text or element to display. Always visible regardless of error or warning state.\n */\n hint?: ReactElement | string;\n /**\n * Description text or element to display below the hint.\n */\n description?: ReactElement | string;\n /**\n * Error message(s) to display. Supports a single string, an array of strings,\n * or a ReactElement (deprecated).\n * All error messages use `aria-live=\"assertive\"`.\n */\n error?: string | string[] | ReactElement;\n /**\n * Warning message(s) to display. Supports a single string, an array of strings,\n * or a ReactElement (deprecated).\n * All warning messages use `aria-live=\"polite\"`.\n */\n warning?: string | string[] | ReactElement;\n /**\n * Error message or element to display when there's an error.\n * @deprecated Use the `error` prop instead.\n */\n errorMessage?: ReactElement | string;\n /**\n * @deprecated No longer used. Error messages always use `aria-live=\"assertive\"`.\n */\n errorAriaLive?: AriaAttributes[\"aria-live\"];\n};\n\n/** Normalizes a string | string[] | ReactElement into a renderable array. */\nfunction normalizeMessages(\n val: string | string[] | ReactElement | undefined,\n): (string | ReactElement)[] {\n if (val === undefined) return [];\n if (Array.isArray(val)) return val;\n return [val];\n}\n\n/**\n * FieldMessage component for displaying hints, descriptions, error messages, and warning messages for form fields.\n *\n * Features:\n * - Displays hint text that remains visible regardless of error or warning state\n * - Shows one or more error messages with error icon (aria-live=\"assertive\")\n * - Shows one or more warning messages with warning icon (aria-live=\"polite\")\n * - Supports both string and React element content\n * - Optional description text for additional context\n * - Accessible with proper ARIA attributes\n * - Visual error and warning indicators with status icons\n *\n * @example\n * <FieldMessage\n * hint=\"Enter your email address\"\n * description=\"We'll use this to send you updates\"\n * error=\"Please enter a valid email address\"\n * warning=\"This email is associated with another account\"\n * />\n */\nexport const FieldMessage = forwardRef<HTMLDivElement, FieldMessageProps>(\n (props, ref) => {\n const {\n id,\n hint,\n description,\n error,\n warning,\n errorAriaLive: _errorAriaLive,\n errorMessage,\n className,\n ...rest\n } = props;\n\n const errorMessages = normalizeMessages(error);\n const warningMessages = normalizeMessages(warning);\n\n // Backward compatibility: if deprecated errorMessage is provided and new error prop is not\n const allErrors =\n errorMessages.length === 0 && errorMessage\n ? [errorMessage]\n : errorMessages;\n\n return (\n <div\n {...rest}\n className={cx(styles[\"messages\"], className)}\n ref={ref}\n id={id}\n >\n {hint ?? null}\n {description ? (\n <div className={styles[\"description-container\"]}>\n <span>{description}</span>\n </div>\n ) : null}\n {allErrors.map((msg, index) => (\n <div key={index} className={styles[\"error-container\"]}>\n <StatusIcon\n variant=\"error\"\n rootProps={{\n \"aria-hidden\": true,\n className: styles[\"status-icon\"],\n style: { color: \"inherit\" },\n }}\n />\n <span className={styles[\"error-message\"]} aria-live=\"assertive\">\n {msg}\n </span>\n </div>\n ))}\n {warningMessages.map((msg, index) => (\n <div key={index} className={styles[\"warning-container\"]}>\n <StatusIcon\n variant=\"warning\"\n rootProps={{\n \"aria-hidden\": true,\n className: styles[\"status-icon\"],\n style: { color: \"inherit\" },\n }}\n />\n <span className={styles[\"warning-message\"]} aria-live=\"polite\">\n {msg}\n </span>\n </div>\n ))}\n </div>\n );\n },\n);\n\nFieldMessage.displayName = \"FieldMessage\";\n"],"names":["success_light","success_dark","warning_light","warning_dark","error_light","error_dark","styles"],"mappings":";;;;;;;;;;;;;;;;;;;AACA,MAAM,YAAY,GAAG,CAAC,KAAK,qBAAqB,KAAK,CAAC,aAAa,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,4BAA4B,EAAE,GAAG,KAAK,EAAE,kBAAkB,KAAK,CAAC,aAAa,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,8cAA8c,EAAE,MAAM,EAAE,SAAS,EAAE,WAAW,EAAE,CAAC,EAAE,CAAC,kBAAkB,KAAK,CAAC,aAAa,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,ogBAAogB,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,kBAAkB,KAAK,CAAC,aAAa,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,kBAAkB,KAAK,CAAC,aAAa,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,qeAAqe,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,CAAC;;ACAn9D,MAAM,cAAc,GAAG,CAAC,KAAK,qBAAqB,KAAK,CAAC,aAAa,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,4BAA4B,EAAE,GAAG,KAAK,EAAE,kBAAkB,KAAK,CAAC,aAAa,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,sdAAsd,EAAE,MAAM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AAiB,CAAA,EAAG,WAAA,EAAU,UACnD,QAAA,EAAA,GAAA,EACH;AAAA,WAAA,EAAA,EAXQ,KAYV,CACD;AAAA;AAAA;AAAA,KACH;AAAA,EAEJ;AACF;AAEA,YAAA,CAAa,WAAA,GAAc,cAAA;;;;"}
@@ -1,6 +1,8 @@
1
1
  @layer starter, reset, base, state, application;
2
2
 
3
- ._messages_1hr9l_1 {
3
+ ._messages_1opif_1 {
4
+ --a2-mod-field-message-error-color: var(--foreground-color-danger, #e13212);
5
+ --a2-mod-field-message-warning-color: var(--foreground-color-subdued, #737475);
4
6
  all: unset;
5
7
  font-family: var(--font-family-base, "Nunito Sans", sans-serif);
6
8
  font-size: 100%;
@@ -18,13 +20,25 @@
18
20
  font-size: 0.875rem;
19
21
  }
20
22
 
21
- ._error-container_1hr9l_19 {
23
+ ._error-container_1opif_21 {
22
24
  display: flex;
23
25
  gap: 0.25rem;
24
26
  align-items: flex-start;
25
- color: var(--foreground-color-danger, #e13212);
27
+ color: var(--a2-mod-field-message-error-color);
26
28
  }
27
29
 
28
- ._error-icon_1hr9l_26 {
30
+ ._warning-container_1opif_28 {
31
+ display: flex;
32
+ gap: 0.25rem;
33
+ align-items: flex-start;
34
+ color: var(--a2-mod-field-message-warning-color);
35
+ }
36
+
37
+ ._status-icon_1opif_35 {
29
38
  padding-top: 0.0625rem;
39
+ }@layer starter, reset, base, state, application;
40
+ ._status-icon_pq77z_1 {
41
+ display: inline-flex;
42
+ align-items: center;
43
+ justify-content: center;
30
44
  }
@@ -1,2 +1,3 @@
1
- export { F as FieldMessage, F as default } from './FieldMessage-tEr6rWXS.js';
1
+ export { F as FieldMessage, F as default } from './FieldMessage-DS0COrjp.js';
2
+ export { w as warnDeprecatedErrorUsage } from './utils-pudAMGnO.js';
2
3
  //# sourceMappingURL=FieldMessage.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FieldMessage.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
1
+ {"version":3,"file":"FieldMessage.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1,6 +1,6 @@
1
1
  import { jsxs, jsx } from 'react/jsx-runtime';
2
2
  import { forwardRef } from 'react';
3
- import { F as FieldMessage } from './FieldMessage-tEr6rWXS.js';
3
+ import { F as FieldMessage } from './FieldMessage-DS0COrjp.js';
4
4
  import { S as SrOnly } from './SrOnly-CrdBTl6E.js';
5
5
 
6
6
  import './Helper.css';const helper = "_helper_157uk_1";
@@ -14,7 +14,9 @@ const Helper = forwardRef((props, ref) => {
14
14
  id,
15
15
  hint,
16
16
  description,
17
- errorAriaLive = "assertive",
17
+ error,
18
+ warning,
19
+ errorAriaLive: _errorAriaLive,
18
20
  errorMessage,
19
21
  maxLength,
20
22
  isTyping,
@@ -28,7 +30,8 @@ const Helper = forwardRef((props, ref) => {
28
30
  className: styles["messages"],
29
31
  hint,
30
32
  description,
31
- errorAriaLive,
33
+ error,
34
+ warning,
32
35
  errorMessage
33
36
  }
34
37
  ),
@@ -43,4 +46,4 @@ const Helper = forwardRef((props, ref) => {
43
46
  Helper.displayName = "Helper";
44
47
 
45
48
  export { Helper as H };
46
- //# sourceMappingURL=Helper-CK-XjpR3.js.map
49
+ //# sourceMappingURL=Helper-PNGm_U2X.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Helper-PNGm_U2X.js","sources":["../src/internal/components/Helper/Helper.tsx"],"sourcesContent":["import { forwardRef, AriaAttributes, ReactElement } from \"react\";\nimport styles from \"./Helper.module.scss\";\nimport { FieldMessage } from \"../../../components/FieldMessage\";\nimport { SrOnly } from \"../../../components/SrOnly\";\n\nexport type HelperProps = {\n id?: string;\n // required?: boolean;\n hint?: ReactElement | string;\n description?: ReactElement | string;\n /**\n * Error message(s) to display. Supports a single string or an array of strings.\n */\n error?: string | string[];\n /**\n * Warning message(s) to display. Supports a single string or an array of strings.\n */\n warning?: string | string[];\n /**\n * @deprecated Use the `error` prop instead.\n */\n errorMessage?: ReactElement | string;\n /**\n * @deprecated No longer used. Error messages always use `aria-live=\"assertive\"`.\n */\n errorAriaLive?: AriaAttributes[\"aria-live\"];\n maxLength?: number;\n inputLength?: number;\n isTyping?: boolean;\n showCounter?: boolean;\n};\n\nexport const Helper = forwardRef<HTMLDivElement, HelperProps>((props, ref) => {\n const {\n id,\n hint,\n description,\n error,\n warning,\n errorAriaLive: _errorAriaLive,\n errorMessage,\n maxLength,\n isTyping,\n inputLength = 0,\n showCounter,\n } = props;\n\n return (\n <div className={styles[\"helper\"]} ref={ref} id={id}>\n <FieldMessage\n className={styles[\"messages\"]}\n hint={hint}\n description={description}\n error={error}\n warning={warning}\n errorMessage={errorMessage}\n />\n\n {showCounter ? (\n <div className={styles[\"counter\"]}>\n <span aria-hidden=\"true\">\n {inputLength}/{maxLength}\n </span>\n </div>\n ) : null}\n {isTyping && !!maxLength ? (\n maxLength - inputLength >= 1 ? (\n <SrOnly>\n {/* TODO: potential localization */}\n <span aria-live=\"polite\" aria-atomic=\"true\">{`${\n maxLength - inputLength\n } character${maxLength - inputLength !== 1 ? \"s\" : \"\"} left`}</span>\n </SrOnly>\n ) : (\n <SrOnly>\n {/* TODO: potential localization */}\n <span role=\"alert\">Maximum characters count reached</span>\n </SrOnly>\n )\n ) : null}\n </div>\n );\n});\n\nHelper.displayName = \"Helper\";\n"],"names":[],"mappings":";;;;;;;;;;;AAgCO,MAAM,MAAA,GAAS,UAAA,CAAwC,CAAC,KAAA,EAAO,GAAA,KAAQ;AAC5E,EAAA,MAAM;AAAA,IACJ,EAAA;AAAA,IACA,IAAA;AAAA,IACA,WAAA;AAAA,IACA,KAAA;AAAA,IACA,OAAA;AAAA,IACA,aAAA,EAAe,cAAA;AAAA,IACf,YAAA;AAAA,IACA,SAAA;AAAA,IACA,QAAA;AAAA,IACA,WAAA,GAAc,CAAA;AAAA,IACd;AAAA,GACF,GAAI,KAAA;AAEJ,EAAA,4BACG,KAAA,EAAA,EAAI,SAAA,EAAW,OAAO,QAAQ,CAAA,EAAG,KAAU,EAAA,EAC1C,QAAA,EAAA;AAAA,oBAAA,GAAA;AAAA,MAAC,YAAA;AAAA,MAAA;AAAA,QACC,SAAA,EAAW,OAAO,UAAU,CAAA;AAAA,QAC5B,IAAA;AAAA,QACA,WAAA;AAAA,QACA,KAAA;AAAA,QACA,OAAA;AAAA,QACA;AAAA;AAAA,KACF;AAAA,IAEC,WAAA,mBACC,GAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAW,MAAA,CAAO,SAAS,CAAA,EAC9B,QAAA,kBAAA,IAAA,CAAC,MAAA,EAAA,EAAK,aAAA,EAAY,MAAA,EACf,QAAA,EAAA;AAAA,MAAA,WAAA;AAAA,MAAY,GAAA;AAAA,MAAE;AAAA,KAAA,EACjB,GACF,CAAA,GACE,IAAA;AAAA,IACH,QAAA,IAAY,CAAC,CAAC,SAAA,GACb,YAAY,WAAA,IAAe,CAAA,mBACzB,GAAA,CAAC,MAAA,EAAA,EAEC,8BAAC,MAAA,EAAA,EAAK,WAAA,EAAU,QAAA,EAAS,aAAA,EAAY,QAAQ,QAAA,EAAA,CAAA,EAC3C,SAAA,GAAY,WACd,CAAA,UAAA,EAAa,YAAY,WAAA,KAAgB,CAAA,GAAI,GAAA,GAAM,EAAE,SAAQ,CAAA,EAC/D,CAAA,mBAEA,GAAA,CAAC,MAAA,EAAA,EAEC,8BAAC,MAAA,EAAA,EAAK,IAAA,EAAK,OAAA,EAAQ,QAAA,EAAA,kCAAA,EAAgC,GACrD,CAAA,GAEA;AAAA,GAAA,EACN,CAAA;AAEJ,CAAC;AAED,MAAA,CAAO,WAAA,GAAc,QAAA;;;;"}
@@ -1,7 +1,7 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
2
  import { forwardRef, useRef, useMemo, isValidElement, cloneElement } from 'react';
3
3
  import { u as useMergeRefs } from './floating-ui.react-P5949bpO.js';
4
- import { T as TextField } from './TextField-CDiiYSlT.js';
4
+ import { T as TextField } from './TextField-BycenT6H.js';
5
5
  import { u as useOptionallyControlledState } from './useOptionallyControlledState-DbDuos5L.js';
6
6
  import { c as childrenToString } from './childrenToString-Bz9MqbHb.js';
7
7
  import { useTrackingId } from './useTrackingId.js';
@@ -261,4 +261,4 @@ const InputMask = forwardRef(
261
261
  InputMask.displayName = "InputMask";
262
262
 
263
263
  export { InputMask as I };
264
- //# sourceMappingURL=InputMask-DoqWRi3t.js.map
264
+ //# sourceMappingURL=InputMask-Ds0W2fKy.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"InputMask-DoqWRi3t.js","sources":["../src/components/InputMask/internal/constants.ts","../src/components/InputMask/internal/utils.ts","../src/components/InputMask/InputMask.tsx"],"sourcesContent":["export const MASK_CHARS = [\"a\", \"9\", \"*\"];\n","import { MASK_CHARS } from \"./constants\";\n\n/**\n * This function applies the mask to the input value, returning a new string that matches the mask's format.\n * @param value - a string representing the raw input value (e.g., what the user typed)\n * @param mask - a string representing the desired input mask (e.g., \"99/99/9999\" for a date)\n * @param defaultMaskCharacter - a string representing the default mask character (e.g., \"_\")\n * @returns a string representing the masked value (e.g., \"12/31/2025\" for a date)\n *\n * @example\n * applyMask(\"1234567890\", \"99/99/9999\", \"_\") // \"12/31/2025\"\n * applyMask(\"1234567890\", \"999-999-9999\", \"-\") // \"123-456-7890\"\n * applyMask(\"123\", \"99/99\", \"_\") // \"12/3_\"\n */\nexport function applyMask(\n value: string,\n mask: string,\n defaultMaskCharacter: string,\n) {\n let maskedValue = \"\";\n let valueIndex = 0;\n for (let i = 0; i < mask.length; i++) {\n const maskChar = mask[i];\n if (MASK_CHARS.includes(maskChar)) {\n // Find next acceptable char in value\n while (\n valueIndex < value.length &&\n !isAcceptableChar(value[valueIndex], maskChar)\n ) {\n valueIndex++;\n }\n if (valueIndex < value.length) {\n maskedValue += value[valueIndex];\n valueIndex++;\n } else {\n maskedValue += defaultMaskCharacter;\n }\n } else {\n maskedValue += maskChar;\n }\n }\n return maskedValue;\n}\n/**\n * This function checks if a character is acceptable for a given mask character.\n * @param char - a string representing the character to check\n * @param maskChar - a string representing the mask character\n * @returns a boolean indicating if the character is acceptable\n */\nfunction isAcceptableChar(char: string, maskChar: string) {\n if (maskChar === \"9\") {\n return /\\d/.test(char);\n }\n if (maskChar === \"a\") {\n return /[a-zA-Z]/.test(char);\n }\n if (maskChar === \"*\") {\n return /[a-zA-Z0-9]/.test(char);\n }\n return false;\n}\n/**\n * This function finds the next open character in a given value.\n * @param value - a string representing the value to search\n * @param defaultMaskCharacter - a string representing the default mask character (e.g., \"_\")\n * @returns a number representing the index of the next open character\n */\nexport function getNextOpenCharacterIndex(\n value: string,\n defaultMaskCharacter: string,\n) {\n let idx = value.indexOf(defaultMaskCharacter);\n if (idx < 0) {\n idx = value.length;\n }\n return idx;\n}\n/**\n * This function finds the first non-fixed character in the value.\n * @param startingIndex - a number representing the index to start searching from\n * @param fixedCharacterIndices - an array of numbers representing the indices of the fixed characters\n * @returns a number representing the index of the first non-fixed character\n */\nexport function getFirstNonFixedCharacterIndex(\n startingIndex: number,\n fixedCharacterIndices: number[],\n) {\n let idx = startingIndex;\n while (fixedCharacterIndices.includes(idx)) {\n idx++;\n }\n return idx;\n}\n/**\n * This function finds the last filled character in a given value.\n * @param value - a string representing the value to search\n * @param mask - a string representing the mask\n * @returns a number representing the index of the last filled character\n */\nexport function getLastFilledCharacterIndex(value: string, mask: string) {\n let idx = value\n .split(\"\")\n .findLastIndex((char, i) => isAcceptableChar(char, mask[i]));\n if (idx < 0) {\n idx = 0;\n }\n return idx;\n}\n/**\n * This function finds the first filled character in a given value.\n * @param value - a string representing the value to search\n * @param mask - a string representing the mask\n * @returns a number representing the index of the first filled character\n */\nexport function getFirstFilledCharacterIndex(value: string, mask: string) {\n let idx = value\n .split(\"\")\n .findIndex((char, i) => isAcceptableChar(char, mask[i]));\n if (idx < 0) {\n idx = 0;\n }\n return idx;\n}\n","import {\n ChangeEvent,\n ChangeEventHandler,\n FocusEvent,\n KeyboardEvent,\n InputHTMLAttributes,\n ReactElement,\n cloneElement,\n forwardRef,\n isValidElement,\n useRef,\n useMemo,\n MouseEvent,\n} from \"react\";\nimport { useMergeRefs } from \"@floating-ui/react\";\nimport { useOptionallyControlledState } from \"../../internal/hooks\";\nimport { useTrackingId } from \"../../hooks\";\nimport { TextField, TextFieldProps } from \"../TextField/internal/TextField\";\nimport { childrenToString } from \"../../internal/functions\";\nimport {\n applyMask,\n getLastFilledCharacterIndex,\n getFirstFilledCharacterIndex,\n getFirstNonFixedCharacterIndex,\n getNextOpenCharacterIndex,\n} from \"./internal/utils\";\nimport { MASK_CHARS } from \"./internal/constants\";\nimport { DataTrackingId } from \"../../types\";\n\n/**\n * Props for InputMask when using with children\n */\ninterface InputMaskPropsWithChildren {\n /**\n * Custom input element to be wrapped with mask functionality.\n */\n children: ReactElement<InputHTMLAttributes<HTMLInputElement>>;\n /**\n * Additional props to pass to the input element.\n */\n inputProps?: InputHTMLAttributes<HTMLInputElement>;\n}\n\n/**\n * Props for InputMask when using without children\n */\ninterface InputMaskPropsWithoutChildren {\n /**\n * No children allowed when using default TextField.\n */\n children?: never;\n /**\n * Props to pass to the default TextField component.\n */\n inputProps?: TextFieldProps;\n}\n\n/**\n * Configuration for custom mask handler matching\n */\ninterface ICustomMaskHandlerMatch {\n /**\n * Regular expression pattern to match against input.\n */\n matchPattern: RegExp;\n /**\n * Starting position in the input string.\n */\n startPosition: number;\n /**\n * Ending position in the input string.\n */\n endPosition: number;\n}\n\n/**\n * Configuration for custom mask handler application\n */\ninterface ICustomMaskHandlerApply {\n /**\n * Pattern to apply when match is found.\n */\n applyPattern: string;\n /**\n * Offset to apply to cursor position after transformation.\n */\n caretOffset: number;\n}\n\n/**\n * Custom mask handler for advanced input transformations\n */\ninterface ICustomMaskHandler {\n /**\n * Matching configuration for the handler.\n */\n match: ICustomMaskHandlerMatch;\n /**\n * Application configuration for the handler.\n */\n apply: ICustomMaskHandlerApply;\n}\n\n/**\n * Shared props for InputMask component\n */\ninterface SharedInputMaskProps {\n /**\n * The mask pattern to apply to the input.\n * - \"9\" for digits only\n * - \"a\" for letters only\n * - \"*\" for alphanumeric\n * - Any other character is treated as a fixed character\n */\n mask: string;\n /**\n * Character to display for unfilled mask positions.\n * @default \"_\"\n */\n defaultMaskCharacter?: string;\n /**\n * Controlled value for the input.\n */\n value?: string;\n /**\n * Default value for uncontrolled input.\n */\n defaultValue?: string;\n /**\n * Callback function called when input value changes.\n */\n onChange?: ChangeEventHandler<HTMLInputElement>;\n /**\n * Array of custom mask handlers for advanced transformations.\n */\n customMaskHandler?: ICustomMaskHandler[];\n}\n\ntype SpecialChange = {\n reason: \"Backspace\" | \"Delete\" | \"Edit\";\n start: number;\n end: number;\n};\n\n/**\n * Props for the InputMask component\n * @property {string} mask - The mask pattern to apply to the input (9 for digits, a for letters, * for alphanumeric)\n * @property {string} [defaultMaskCharacter] - Character to display for unfilled mask positions\n * @property {array} [customMaskHandler] - Array of custom mask handlers for advanced transformations\n * @property {object} [inputProps] - Props to pass to the input component\n * @property {ReactElement} [children] - Custom input element to be wrapped with mask functionality\n * @property {string} [data-tracking-id] - Custom tracking ID for analytics\n */\nexport type InputMaskProps = SharedInputMaskProps &\n (InputMaskPropsWithChildren | InputMaskPropsWithoutChildren) &\n DataTrackingId;\n\n/**\n * InputMask component for applying input masks and formatting to text inputs.\n *\n * @deprecated Use the TextField component with custom masking instead. Over time, we intend to release additional components with built-in masking.\n */\nexport const InputMask = forwardRef<HTMLInputElement, InputMaskProps>(\n (\n {\n children,\n mask,\n defaultMaskCharacter = \"_\",\n value,\n defaultValue,\n onChange,\n inputProps,\n \"data-tracking-id\": dataTrackingId,\n },\n ref,\n ) => {\n const [v, setV] = useOptionallyControlledState({\n controlledValue:\n value !== undefined\n ? applyMask(value, mask, defaultMaskCharacter)\n : undefined,\n defaultValue: applyMask(defaultValue || \"\", mask, defaultMaskCharacter),\n // Omitting the onChange handler here because we want to handle it ourselves (i.e. send an event instead of just the value)\n });\n const specialChange = useRef<SpecialChange | null>(null);\n\n const inputRef = useRef<HTMLInputElement>(null);\n\n const passInRef = useMergeRefs([inputRef, ref]);\n\n const currentOpenCharacterCount = useMemo(() => {\n return v.split(\"\").filter((char) => char === defaultMaskCharacter).length;\n }, [v, defaultMaskCharacter]);\n\n const fixedCharacterIndices = useMemo(() => {\n const fixedIndices: number[] = [];\n mask.split(\"\").forEach((char, i) => {\n if (!MASK_CHARS.includes(char)) {\n fixedIndices.push(i);\n }\n });\n return fixedIndices;\n }, [mask]);\n\n const moveCursorTo = (start: number, end: number = start) => {\n requestAnimationFrame(() => {\n inputRef.current?.setSelectionRange(start, end);\n });\n };\n\n const handleChange = (e: ChangeEvent<HTMLInputElement>) => {\n let newVal = applyMask(e.target.value, mask, defaultMaskCharacter);\n if (\n // A single character was backspaced\n specialChange.current?.reason === \"Backspace\" &&\n specialChange.current.start === specialChange.current.end\n ) {\n // If the character before the backspace is a fixed character, we need to remove the filled character before the fixed character\n if (fixedCharacterIndices.includes(specialChange.current.start - 1)) {\n const removeIndex = getLastFilledCharacterIndex(\n newVal.slice(0, specialChange.current.start),\n mask,\n );\n newVal = applyMask(\n newVal.slice(0, removeIndex) + newVal.slice(removeIndex + 1),\n mask,\n defaultMaskCharacter,\n );\n moveCursorTo(removeIndex, removeIndex);\n } else {\n const idx = Math.min(\n getLastFilledCharacterIndex(newVal, mask) + 1,\n specialChange.current.start - 1,\n );\n moveCursorTo(idx, idx);\n }\n } else if (\n // A single character was deleted\n specialChange.current?.reason === \"Delete\" &&\n specialChange.current.start === specialChange.current.end\n ) {\n // If the character after the delete is a fixed character, we need to remove the filled character after the fixed character\n if (fixedCharacterIndices.includes(specialChange.current.start)) {\n const removeIndex = getFirstFilledCharacterIndex(\n newVal.slice(specialChange.current.start + 1),\n mask,\n );\n newVal = applyMask(\n newVal.slice(0, removeIndex) + newVal.slice(removeIndex + 1),\n mask,\n defaultMaskCharacter,\n );\n }\n const firstFilledIdx = getFirstFilledCharacterIndex(newVal, mask);\n const targetIdx = Math.max(firstFilledIdx, specialChange.current.start);\n moveCursorTo(targetIdx, targetIdx);\n } else if (\n specialChange.current?.reason === \"Edit\" &&\n specialChange.current.start === specialChange.current.end // A single character was edited\n ) {\n const firstNonFixedIdx = getFirstNonFixedCharacterIndex(\n specialChange.current.start + 1,\n fixedCharacterIndices,\n );\n moveCursorTo(firstNonFixedIdx, firstNonFixedIdx);\n } else {\n const newIndex = getNextOpenCharacterIndex(\n newVal,\n defaultMaskCharacter,\n );\n moveCursorTo(newIndex, newIndex);\n }\n\n setV(newVal);\n if (inputRef.current) {\n inputRef.current.value = newVal;\n }\n onChange?.({ ...e, target: { ...e.target, value: newVal } });\n };\n\n const handleFocus = (e: FocusEvent<HTMLInputElement>) => {\n requestAnimationFrame(() => {\n if (\n e.target.selectionStart === null ||\n e.target.selectionStart === undefined ||\n e.target.selectionStart >= v.length\n ) {\n const newIndex = getNextOpenCharacterIndex(v, defaultMaskCharacter);\n moveCursorTo(newIndex, newIndex);\n }\n });\n inputProps?.onFocus?.(e);\n };\n\n const handleKeyDown = (e: KeyboardEvent<HTMLInputElement>) => {\n const target = e.target as HTMLInputElement;\n if (target.selectionStart === null || target.selectionEnd === null) {\n return;\n }\n if (e.key === \"Backspace\") {\n specialChange.current = {\n reason: \"Backspace\",\n start: target.selectionStart,\n end: target.selectionEnd,\n };\n } else if (e.key === \"Delete\") {\n specialChange.current = {\n reason: \"Delete\",\n start: target.selectionStart,\n end: target.selectionEnd,\n };\n } else if (currentOpenCharacterCount === 0) {\n specialChange.current = {\n reason: \"Edit\",\n start: target.selectionStart,\n end: target.selectionEnd,\n };\n } else {\n specialChange.current = null;\n }\n inputProps?.onKeyDown?.(e);\n };\n\n const handleClick = (e: MouseEvent<HTMLInputElement>) => {\n // For future use.\n e.preventDefault();\n e.stopPropagation();\n inputProps?.onClick?.(e);\n };\n\n const handleBlur = (e: FocusEvent<HTMLInputElement>) => {\n // For future use.\n e.preventDefault();\n e.stopPropagation();\n inputProps?.onBlur?.(e);\n };\n\n const mergedInputProps = {\n ...inputProps,\n ...(children && isValidElement(children) ? children.props : {}),\n value: v,\n onChange: handleChange,\n onFocus: handleFocus,\n onKeyDown: handleKeyDown,\n onClick: handleClick,\n onBlur: handleBlur,\n ref: passInRef,\n };\n\n const isInputEmpty = useMemo(() => {\n if (v.length === 0) {\n return true;\n }\n return v === applyMask(\"\", mask, defaultMaskCharacter);\n }, [v, defaultMaskCharacter, mask]);\n\n const data = {\n label:\n \"label\" in mergedInputProps\n ? childrenToString(mergedInputProps.label)\n : null,\n labelProps:\n \"labelProps\" in mergedInputProps ? mergedInputProps.labelProps : null,\n prefix: childrenToString(mergedInputProps.prefix),\n hint:\n \"hint\" in mergedInputProps\n ? childrenToString(mergedInputProps.hint)\n : null,\n description:\n \"description\" in mergedInputProps\n ? childrenToString(mergedInputProps.description)\n : null,\n size: mergedInputProps.size,\n type: mergedInputProps.type,\n };\n\n const trackingId = useTrackingId({\n name: \"InputMask\",\n data,\n hasOverride: !!dataTrackingId,\n });\n\n return children && isValidElement(children) && children.type === \"input\" ? (\n cloneElement(children, {\n ...mergedInputProps,\n \"data-tracking-id\": trackingId,\n } as InputHTMLAttributes<HTMLInputElement> & {\n \"data-tracking-id\"?: string;\n })\n ) : (\n <TextField\n data-input-empty={isInputEmpty}\n data-tracking-id={trackingId}\n {...(mergedInputProps as TextFieldProps)}\n />\n );\n },\n);\n\nInputMask.displayName = \"InputMask\";\n"],"names":[],"mappings":";;;;;;;;AAAO,MAAM,UAAA,GAAa,CAAC,GAAA,EAAK,GAAA,EAAK,GAAG,CAAA;;ACcjC,SAAS,SAAA,CACd,KAAA,EACA,IAAA,EACA,oBAAA,EACA;AACA,EAAA,IAAI,WAAA,GAAc,EAAA;AAClB,EAAA,IAAI,UAAA,GAAa,CAAA;AACjB,EAAA,KAAA,IAAS,CAAA,GAAI,CAAA,EAAG,CAAA,GAAI,IAAA,CAAK,QAAQ,CAAA,EAAA,EAAK;AACpC,IAAA,MAAM,QAAA,GAAW,KAAK,CAAC,CAAA;AACvB,IAAA,IAAI,UAAA,CAAW,QA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ACN,aACE,aAAA,IAAiB,gBAAA,GACb,gBAAA,CAAiB,gBAAA,CAAiB,WAAW,CAAA,GAC7C,IAAA;AAAA,MACN,MAAM,gBAAA,CAAiB,IAAA;AAAA,MACvB,MAAM,gBAAA,CAAiB;AAAA,KACzB;AAEA,IAAA,MAAM,aAAa,aAAA,CAAc;AAAA,MAC/B,IAAA,EAAM,WAAA;AAAA,MACN,IAAA;AAAA,MACA,WAAA,EAAa,CAAC,CAAC;AAAA,KAChB,CAAA;AAED,IAAA,OAAO,QAAA,IAAY,eAAe,QAAQ,CAAA,IAAK,SAAS,IAAA,KAAS,OAAA,GAC/D,aAAa,QAAA,EAAU;AAAA,MACrB,GAAG,gBAAA;AAAA,MACH,kBAAA,EAAoB;AAAA,KAGrB,CAAA,mBAED,GAAA;AAAA,MAAC,SAAA;AAAA,MAAA;AAAA,QACC,kBAAA,EAAkB,YAAA;AAAA,QAClB,kBAAA,EAAkB,UAAA;AAAA,QACjB,GAAI;AAAA;AAAA,KACP;AAAA,EAEJ;AACF;AAEA,SAAA,CAAU,WAAA,GAAc,WAAA;;;;"}
1
+ {"version":3,"file":"InputMask-Ds0W2fKy.js","sources":["../src/components/InputMask/internal/constants.ts","../src/components/InputMask/internal/utils.ts","../src/components/InputMask/InputMask.tsx"],"sourcesContent":["export const MASK_CHARS = [\"a\", \"9\", \"*\"];\n","import { MASK_CHARS } from \"./constants\";\n\n/**\n * This function applies the mask to the input value, returning a new string that matches the mask's format.\n * @param value - a string representing the raw input value (e.g., what the user typed)\n * @param mask - a string representing the desired input mask (e.g., \"99/99/9999\" for a date)\n * @param defaultMaskCharacter - a string representing the default mask character (e.g., \"_\")\n * @returns a string representing the masked value (e.g., \"12/31/2025\" for a date)\n *\n * @example\n * applyMask(\"1234567890\", \"99/99/9999\", \"_\") // \"12/31/2025\"\n * applyMask(\"1234567890\", \"999-999-9999\", \"-\") // \"123-456-7890\"\n * applyMask(\"123\", \"99/99\", \"_\") // \"12/3_\"\n */\nexport function applyMask(\n value: string,\n mask: string,\n defaultMaskCharacter: string,\n) {\n let maskedValue = \"\";\n let valueIndex = 0;\n for (let i = 0; i < mask.length; i++) {\n const maskChar = mask[i];\n if (MASK_CHARS.includes(maskChar)) {\n // Find next acceptable char in value\n while (\n valueIndex < value.length &&\n !isAcceptableChar(value[valueIndex], maskChar)\n ) {\n valueIndex++;\n }\n if (valueIndex < value.length) {\n maskedValue += value[valueIndex];\n valueIndex++;\n } else {\n maskedValue += defaultMaskCharacter;\n }\n } else {\n maskedValue += maskChar;\n }\n }\n return maskedValue;\n}\n/**\n * This function checks if a character is acceptable for a given mask character.\n * @param char - a string representing the character to check\n * @param maskChar - a string representing the mask character\n * @returns a boolean indicating if the character is acceptable\n */\nfunction isAcceptableChar(char: string, maskChar: string) {\n if (maskChar === \"9\") {\n return /\\d/.test(char);\n }\n if (maskChar === \"a\") {\n return /[a-zA-Z]/.test(char);\n }\n if (maskChar === \"*\") {\n return /[a-zA-Z0-9]/.test(char);\n }\n return false;\n}\n/**\n * This function finds the next open character in a given value.\n * @param value - a string representing the value to search\n * @param defaultMaskCharacter - a string representing the default mask character (e.g., \"_\")\n * @returns a number representing the index of the next open character\n */\nexport function getNextOpenCharacterIndex(\n value: string,\n defaultMaskCharacter: string,\n) {\n let idx = value.indexOf(defaultMaskCharacter);\n if (idx < 0) {\n idx = value.length;\n }\n return idx;\n}\n/**\n * This function finds the first non-fixed character in the value.\n * @param startingIndex - a number representing the index to start searching from\n * @param fixedCharacterIndices - an array of numbers representing the indices of the fixed characters\n * @returns a number representing the index of the first non-fixed character\n */\nexport function getFirstNonFixedCharacterIndex(\n startingIndex: number,\n fixedCharacterIndices: number[],\n) {\n let idx = startingIndex;\n while (fixedCharacterIndices.includes(idx)) {\n idx++;\n }\n return idx;\n}\n/**\n * This function finds the last filled character in a given value.\n * @param value - a string representing the value to search\n * @param mask - a string representing the mask\n * @returns a number representing the index of the last filled character\n */\nexport function getLastFilledCharacterIndex(value: string, mask: string) {\n let idx = value\n .split(\"\")\n .findLastIndex((char, i) => isAcceptableChar(char, mask[i]));\n if (idx < 0) {\n idx = 0;\n }\n return idx;\n}\n/**\n * This function finds the first filled character in a given value.\n * @param value - a string representing the value to search\n * @param mask - a string representing the mask\n * @returns a number representing the index of the first filled character\n */\nexport function getFirstFilledCharacterIndex(value: string, mask: string) {\n let idx = value\n .split(\"\")\n .findIndex((char, i) => isAcceptableChar(char, mask[i]));\n if (idx < 0) {\n idx = 0;\n }\n return idx;\n}\n","import {\n ChangeEvent,\n ChangeEventHandler,\n FocusEvent,\n KeyboardEvent,\n InputHTMLAttributes,\n ReactElement,\n cloneElement,\n forwardRef,\n isValidElement,\n useRef,\n useMemo,\n MouseEvent,\n} from \"react\";\nimport { useMergeRefs } from \"@floating-ui/react\";\nimport { useOptionallyControlledState } from \"../../internal/hooks\";\nimport { useTrackingId } from \"../../hooks\";\nimport { TextField, TextFieldProps } from \"../TextField/internal/TextField\";\nimport { childrenToString } from \"../../internal/functions\";\nimport {\n applyMask,\n getLastFilledCharacterIndex,\n getFirstFilledCharacterIndex,\n getFirstNonFixedCharacterIndex,\n getNextOpenCharacterIndex,\n} from \"./internal/utils\";\nimport { MASK_CHARS } from \"./internal/constants\";\nimport { DataTrackingId } from \"../../types\";\n\n/**\n * Props for InputMask when using with children\n */\ninterface InputMaskPropsWithChildren {\n /**\n * Custom input element to be wrapped with mask functionality.\n */\n children: ReactElement<InputHTMLAttributes<HTMLInputElement>>;\n /**\n * Additional props to pass to the input element.\n */\n inputProps?: InputHTMLAttributes<HTMLInputElement>;\n}\n\n/**\n * Props for InputMask when using without children\n */\ninterface InputMaskPropsWithoutChildren {\n /**\n * No children allowed when using default TextField.\n */\n children?: never;\n /**\n * Props to pass to the default TextField component.\n */\n inputProps?: TextFieldProps;\n}\n\n/**\n * Configuration for custom mask handler matching\n */\ninterface ICustomMaskHandlerMatch {\n /**\n * Regular expression pattern to match against input.\n */\n matchPattern: RegExp;\n /**\n * Starting position in the input string.\n */\n startPosition: number;\n /**\n * Ending position in the input string.\n */\n endPosition: number;\n}\n\n/**\n * Configuration for custom mask handler application\n */\ninterface ICustomMaskHandlerApply {\n /**\n * Pattern to apply when match is found.\n */\n applyPattern: string;\n /**\n * Offset to apply to cursor position after transformation.\n */\n caretOffset: number;\n}\n\n/**\n * Custom mask handler for advanced input transformations\n */\ninterface ICustomMaskHandler {\n /**\n * Matching configuration for the handler.\n */\n match: ICustomMaskHandlerMatch;\n /**\n * Application configuration for the handler.\n */\n apply: ICustomMaskHandlerApply;\n}\n\n/**\n * Shared props for InputMask component\n */\ninterface SharedInputMaskProps {\n /**\n * The mask pattern to apply to the input.\n * - \"9\" for digits only\n * - \"a\" for letters only\n * - \"*\" for alphanumeric\n * - Any other character is treated as a fixed character\n */\n mask: string;\n /**\n * Character to display for unfilled mask positions.\n * @default \"_\"\n */\n defaultMaskCharacter?: string;\n /**\n * Controlled value for the input.\n */\n value?: string;\n /**\n * Default value for uncontrolled input.\n */\n defaultValue?: string;\n /**\n * Callback function called when input value changes.\n */\n onChange?: ChangeEventHandler<HTMLInputElement>;\n /**\n * Array of custom mask handlers for advanced transformations.\n */\n customMaskHandler?: ICustomMaskHandler[];\n}\n\ntype SpecialChange = {\n reason: \"Backspace\" | \"Delete\" | \"Edit\";\n start: number;\n end: number;\n};\n\n/**\n * Props for the InputMask component\n * @property {string} mask - The mask pattern to apply to the input (9 for digits, a for letters, * for alphanumeric)\n * @property {string} [defaultMaskCharacter] - Character to display for unfilled mask positions\n * @property {array} [customMaskHandler] - Array of custom mask handlers for advanced transformations\n * @property {object} [inputProps] - Props to pass to the input component\n * @property {ReactElement} [children] - Custom input element to be wrapped with mask functionality\n * @property {string} [data-tracking-id] - Custom tracking ID for analytics\n */\nexport type InputMaskProps = SharedInputMaskProps &\n (InputMaskPropsWithChildren | InputMaskPropsWithoutChildren) &\n DataTrackingId;\n\n/**\n * InputMask component for applying input masks and formatting to text inputs.\n *\n * @deprecated Use the TextField component with custom masking instead. Over time, we intend to release additional components with built-in masking.\n */\nexport const InputMask = forwardRef<HTMLInputElement, InputMaskProps>(\n (\n {\n children,\n mask,\n defaultMaskCharacter = \"_\",\n value,\n defaultValue,\n onChange,\n inputProps,\n \"data-tracking-id\": dataTrackingId,\n },\n ref,\n ) => {\n const [v, setV] = useOptionallyControlledState({\n controlledValue:\n value !== undefined\n ? applyMask(value, mask, defaultMaskCharacter)\n : undefined,\n defaultValue: applyMask(defaultValue || \"\", mask, defaultMaskCharacter),\n // Omitting the onChange handler here because we want to handle it ourselves (i.e. send an event instead of just the value)\n });\n const specialChange = useRef<SpecialChange | null>(null);\n\n const inputRef = useRef<HTMLInputElement>(null);\n\n const passInRef = useMergeRefs([inputRef, ref]);\n\n const currentOpenCharacterCount = useMemo(() => {\n return v.split(\"\").filter((char) => char === defaultMaskCharacter).length;\n }, [v, defaultMaskCharacter]);\n\n const fixedCharacterIndices = useMemo(() => {\n const fixedIndices: number[] = [];\n mask.split(\"\").forEach((char, i) => {\n if (!MASK_CHARS.includes(char)) {\n fixedIndices.push(i);\n }\n });\n return fixedIndices;\n }, [mask]);\n\n const moveCursorTo = (start: number, end: number = start) => {\n requestAnimationFrame(() => {\n inputRef.current?.setSelectionRange(start, end);\n });\n };\n\n const handleChange = (e: ChangeEvent<HTMLInputElement>) => {\n let newVal = applyMask(e.target.value, mask, defaultMaskCharacter);\n if (\n // A single character was backspaced\n specialChange.current?.reason === \"Backspace\" &&\n specialChange.current.start === specialChange.current.end\n ) {\n // If the character before the backspace is a fixed character, we need to remove the filled character before the fixed character\n if (fixedCharacterIndices.includes(specialChange.current.start - 1)) {\n const removeIndex = getLastFilledCharacterIndex(\n newVal.slice(0, specialChange.current.start),\n mask,\n );\n newVal = applyMask(\n newVal.slice(0, removeIndex) + newVal.slice(removeIndex + 1),\n mask,\n defaultMaskCharacter,\n );\n moveCursorTo(removeIndex, removeIndex);\n } else {\n const idx = Math.min(\n getLastFilledCharacterIndex(newVal, mask) + 1,\n specialChange.current.start - 1,\n );\n moveCursorTo(idx, idx);\n }\n } else if (\n // A single character was deleted\n specialChange.current?.reason === \"Delete\" &&\n specialChange.current.start === specialChange.current.end\n ) {\n // If the character after the delete is a fixed character, we need to remove the filled character after the fixed character\n if (fixedCharacterIndices.includes(specialChange.current.start)) {\n const removeIndex = getFirstFilledCharacterIndex(\n newVal.slice(specialChange.current.start + 1),\n mask,\n );\n newVal = applyMask(\n newVal.slice(0, removeIndex) + newVal.slice(removeIndex + 1),\n mask,\n defaultMaskCharacter,\n );\n }\n const firstFilledIdx = getFirstFilledCharacterIndex(newVal, mask);\n const targetIdx = Math.max(firstFilledIdx, specialChange.current.start);\n moveCursorTo(targetIdx, targetIdx);\n } else if (\n specialChange.current?.reason === \"Edit\" &&\n specialChange.current.start === specialChange.current.end // A single character was edited\n ) {\n const firstNonFixedIdx = getFirstNonFixedCharacterIndex(\n specialChange.current.start + 1,\n fixedCharacterIndices,\n );\n moveCursorTo(firstNonFixedIdx, firstNonFixedIdx);\n } else {\n const newIndex = getNextOpenCharacterIndex(\n newVal,\n defaultMaskCharacter,\n );\n moveCursorTo(newIndex, newIndex);\n }\n\n setV(newVal);\n if (inputRef.current) {\n inputRef.current.value = newVal;\n }\n onChange?.({ ...e, target: { ...e.target, value: newVal } });\n };\n\n const handleFocus = (e: FocusEvent<HTMLInputElement>) => {\n requestAnimationFrame(() => {\n if (\n e.target.selectionStart === null ||\n e.target.selectionStart === undefined ||\n e.target.selectionStart >= v.length\n ) {\n const newIndex = getNextOpenCharacterIndex(v, defaultMaskCharacter);\n moveCursorTo(newIndex, newIndex);\n }\n });\n inputProps?.onFocus?.(e);\n };\n\n const handleKeyDown = (e: KeyboardEvent<HTMLInputElement>) => {\n const target = e.target as HTMLInputElement;\n if (target.selectionStart === null || target.selectionEnd === null) {\n return;\n }\n if (e.key === \"Backspace\") {\n specialChange.current = {\n reason: \"Backspace\",\n start: target.selectionStart,\n end: target.selectionEnd,\n };\n } else if (e.key === \"Delete\") {\n specialChange.current = {\n reason: \"Delete\",\n start: target.selectionStart,\n end: target.selectionEnd,\n };\n } else if (currentOpenCharacterCount === 0) {\n specialChange.current = {\n reason: \"Edit\",\n start: target.selectionStart,\n end: target.selectionEnd,\n };\n } else {\n specialChange.current = null;\n }\n inputProps?.onKeyDown?.(e);\n };\n\n const handleClick = (e: MouseEvent<HTMLInputElement>) => {\n // For future use.\n e.preventDefault();\n e.stopPropagation();\n inputProps?.onClick?.(e);\n };\n\n const handleBlur = (e: FocusEvent<HTMLInputElement>) => {\n // For future use.\n e.preventDefault();\n e.stopPropagation();\n inputProps?.onBlur?.(e);\n };\n\n const mergedInputProps = {\n ...inputProps,\n ...(children && isValidElement(children) ? children.props : {}),\n value: v,\n onChange: handleChange,\n onFocus: handleFocus,\n onKeyDown: handleKeyDown,\n onClick: handleClick,\n onBlur: handleBlur,\n ref: passInRef,\n };\n\n const isInputEmpty = useMemo(() => {\n if (v.length === 0) {\n return true;\n }\n return v === applyMask(\"\", mask, defaultMaskCharacter);\n }, [v, defaultMaskCharacter, mask]);\n\n const data = {\n label:\n \"label\" in mergedInputProps\n ? childrenToString(mergedInputProps.label)\n : null,\n labelProps:\n \"labelProps\" in mergedInputProps ? mergedInputProps.labelProps : null,\n prefix: childrenToString(mergedInputProps.prefix),\n hint:\n \"hint\" in mergedInputProps\n ? childrenToString(mergedInputProps.hint)\n : null,\n description:\n \"description\" in mergedInputProps\n ? childrenToString(mergedInputProps.description)\n : null,\n size: mergedInputProps.size,\n type: mergedInputProps.type,\n };\n\n const trackingId = useTrackingId({\n name: \"InputMask\",\n data,\n hasOverride: !!dataTrackingId,\n });\n\n return children && isValidElement(children) && children.type === \"input\" ? (\n cloneElement(children, {\n ...mergedInputProps,\n \"data-tracking-id\": trackingId,\n } as InputHTMLAttributes<HTMLInputElement> & {\n \"data-tracking-id\"?: string;\n })\n ) : (\n <TextField\n data-input-empty={isInputEmpty}\n data-tracking-id={trackingId}\n {...(mergedInputProps as TextFieldProps)}\n />\n );\n },\n);\n\nInputMask.displayName =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EAAG,oBAAA,EAAsB,IAAI,CAAC,CAAA;AAElC,IAAA,MAAM,IAAA,GAAO;AAAA,MACX,OACE,OAAA,IAAW,gBAAA,GACP,gBAAA,CAAiB,gBAAA,CAAiB,KAAK,CAAA,GACvC,IAAA;AAAA,MACN,UAAA,EACE,YAAA,IAAgB,gBAAA,GAAmB,gBAAA,CAAiB,UAAA,GAAa,IAAA;AAAA,MACnE,MAAA,EAAQ,gBAAA,CAAiB,gBAAA,CAAiB,MAAM,CAAA;AAAA,MAChD,MACE,MAAA,IAAU,gBAAA,GACN,gBAAA,CAAiB,gBAAA,CAAiB,IAAI,CAAA,GACtC,IAAA;AAAA,MACN,aACE,aAAA,IAAiB,gBAAA,GACb,gBAAA,CAAiB,gBAAA,CAAiB,WAAW,CAAA,GAC7C,IAAA;AAAA,MACN,MAAM,gBAAA,CAAiB,IAAA;AAAA,MACvB,MAAM,gBAAA,CAAiB;AAAA,KACzB;AAEA,IAAA,MAAM,aAAa,aAAA,CAAc;AAAA,MAC/B,IAAA,EAAM,WAAA;AAAA,MACN,IAAA;AAAA,MACA,WAAA,EAAa,CAAC,CAAC;AAAA,KAChB,CAAA;AAED,IAAA,OAAO,QAAA,IAAY,eAAe,QAAQ,CAAA,IAAK,SAAS,IAAA,KAAS,OAAA,GAC/D,aAAa,QAAA,EAAU;AAAA,MACrB,GAAG,gBAAA;AAAA,MACH,kBAAA,EAAoB;AAAA,KAGrB,CAAA,mBAED,GAAA;AAAA,MAAC,SAAA;AAAA,MAAA;AAAA,QACC,kBAAA,EAAkB,YAAA;AAAA,QAClB,kBAAA,EAAkB,UAAA;AAAA,QACjB,GAAI;AAAA;AAAA,KACP;AAAA,EAEJ;AACF;AAEA,SAAA,CAAU,WAAA,GAAc,WAAA;;;;"}
package/dist/InputMask.js CHANGED
@@ -1,2 +1,2 @@
1
- export { I as InputMask, I as default } from './InputMask-DoqWRi3t.js';
1
+ export { I as InputMask, I as default } from './InputMask-Ds0W2fKy.js';
2
2
  //# sourceMappingURL=InputMask.js.map
@@ -1,6 +1,6 @@
1
1
  import { jsxs, jsx } from 'react/jsx-runtime';
2
2
  import { createContext, useContext, forwardRef, useRef, useId, useEffect, useMemo, useState } from 'react';
3
- import { C as Checkbox } from './Checkbox-ZXftLNwB.js';
3
+ import { C as Checkbox } from './Checkbox-DuzAqrE7.js';
4
4
  import { c as cx } from './index-SvGbrGuT.js';
5
5
  import { l as listViewStyles } from './ListView.module-BilDg12y.js';
6
6
  import { u as useMergeRefs } from './useMergeRefs-Dfmtq9cI.js';
@@ -536,4 +536,4 @@ const ListView = Object.assign(
536
536
  );
537
537
 
538
538
  export { ListView as L, ListViewOption as a, ListViewOptionCell as b };
539
- //# sourceMappingURL=ListView-CtRhYAls.js.map
539
+ //# sourceMappingURL=ListView-MMmJDM--.js.map