@gusto/embedded-react-sdk 0.8.0 → 0.8.2

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 (498) hide show
  1. package/CHANGELOG.md +20 -3
  2. package/dist/components/Base/Base.d.ts +6 -5
  3. package/dist/components/Base/Base.js +40 -39
  4. package/dist/components/Base/Base.js.map +1 -1
  5. package/dist/components/Base/index.d.ts +1 -0
  6. package/dist/components/Common/ActionsLayout/index.d.ts +1 -0
  7. package/dist/components/Common/DataView/DataCards/DataCards.module.scss.js +5 -3
  8. package/dist/components/Common/DataView/DataCards/DataCards.module.scss.js.map +1 -1
  9. package/dist/components/Common/DataView/DataCards/index.d.ts +1 -0
  10. package/dist/components/Common/DataView/index.d.ts +1 -0
  11. package/dist/components/Common/DocumentList/index.d.ts +1 -0
  12. package/dist/components/Common/DocumentViewer/index.d.ts +1 -0
  13. package/dist/components/Common/FadeIn/FadeIn.module.scss.js +4 -4
  14. package/dist/components/Common/{UI/FieldCaption → FieldCaption}/FieldCaption.js +1 -1
  15. package/dist/components/Common/FieldCaption/FieldCaption.js.map +1 -0
  16. package/dist/components/Common/{UI/FieldCaption → FieldCaption}/index.d.ts +1 -0
  17. package/dist/components/Common/{UI/FieldDescription → FieldDescription}/FieldDescription.js +1 -1
  18. package/dist/components/Common/FieldDescription/FieldDescription.js.map +1 -0
  19. package/dist/components/Common/{UI/FieldDescription → FieldDescription}/index.d.ts +1 -0
  20. package/dist/components/Common/{UI/FieldErrorMessage → FieldErrorMessage}/FieldErrorMessage.js +1 -1
  21. package/dist/components/Common/FieldErrorMessage/FieldErrorMessage.js.map +1 -0
  22. package/dist/components/Common/{UI/FieldErrorMessage → FieldErrorMessage}/index.d.ts +1 -0
  23. package/dist/components/Common/{UI/FieldLayout → FieldLayout}/FieldLayout.js +1 -1
  24. package/dist/components/Common/FieldLayout/FieldLayout.js.map +1 -0
  25. package/dist/components/Common/FieldLayout/FieldLayoutTypes.d.ts +52 -0
  26. package/dist/components/Common/{UI/FieldLayout → FieldLayout}/index.d.ts +1 -0
  27. package/dist/components/Common/Fields/CheckboxField/index.d.ts +1 -0
  28. package/dist/components/Common/Fields/CheckboxGroupField/index.d.ts +1 -0
  29. package/dist/components/Common/Fields/ComboBoxField/index.d.ts +1 -0
  30. package/dist/components/Common/Fields/DatePickerField/index.d.ts +1 -0
  31. package/dist/components/Common/Fields/NumberInputField/index.d.ts +1 -0
  32. package/dist/components/Common/Fields/RadioGroupField/index.d.ts +1 -0
  33. package/dist/components/Common/Fields/SelectField/index.d.ts +1 -0
  34. package/dist/components/Common/Fields/SwitchField/index.d.ts +1 -0
  35. package/dist/components/Common/Fields/TextInputField/index.d.ts +1 -0
  36. package/dist/components/Common/{UI/Fieldset → Fieldset}/Fieldset.js +1 -1
  37. package/dist/components/Common/Fieldset/Fieldset.js.map +1 -0
  38. package/dist/components/Common/{UI/Fieldset → Fieldset}/index.d.ts +1 -0
  39. package/dist/components/Common/Flex/index.d.ts +1 -0
  40. package/dist/components/Common/Form/index.d.ts +1 -0
  41. package/dist/components/Common/HamburgerMenu/index.d.ts +1 -0
  42. package/dist/components/Common/{UI/HorizontalFieldLayout → HorizontalFieldLayout}/HorizontalFieldLayout.js +2 -2
  43. package/dist/components/Common/HorizontalFieldLayout/HorizontalFieldLayout.js.map +1 -0
  44. package/dist/components/Common/{UI/HorizontalFieldLayout → HorizontalFieldLayout}/index.d.ts +1 -0
  45. package/dist/components/Common/PaginationControl/index.d.ts +1 -0
  46. package/dist/components/Common/ReorderableList/index.d.ts +1 -0
  47. package/dist/components/Common/SignatureForm/SignatureForm.d.ts +12 -6
  48. package/dist/components/Common/SignatureForm/SignatureForm.js +10 -10
  49. package/dist/components/Common/SignatureForm/SignatureForm.js.map +1 -1
  50. package/dist/components/Common/SignatureForm/index.d.ts +1 -0
  51. package/dist/components/Common/TaxInputs/index.d.ts +1 -0
  52. package/dist/components/Common/UI/Alert/Alert.d.ts +1 -1
  53. package/dist/components/Common/UI/Alert/Alert.js +13 -12
  54. package/dist/components/Common/UI/Alert/Alert.js.map +1 -1
  55. package/dist/components/Common/UI/Alert/AlertTypes.d.ts +16 -4
  56. package/dist/components/Common/UI/Alert/index.d.ts +1 -0
  57. package/dist/components/Common/UI/Badge/BadgeTypes.d.ts +6 -0
  58. package/dist/components/Common/UI/Button/Button.js +28 -27
  59. package/dist/components/Common/UI/Button/Button.js.map +1 -1
  60. package/dist/components/Common/UI/Button/Button.module.scss.js +1 -1
  61. package/dist/components/Common/UI/Button/ButtonTypes.d.ts +29 -4
  62. package/dist/components/Common/UI/Button/index.d.ts +1 -0
  63. package/dist/components/Common/UI/CalendarPreview/CalendarPreviewTypes.d.ts +24 -0
  64. package/dist/components/Common/UI/CalendarPreview/index.d.ts +1 -0
  65. package/dist/components/Common/UI/Card/Card.module.scss.js +1 -1
  66. package/dist/components/Common/UI/Card/CardTypes.d.ts +12 -4
  67. package/dist/components/Common/UI/Checkbox/Checkbox.js +4 -4
  68. package/dist/components/Common/UI/Checkbox/Checkbox.js.map +1 -1
  69. package/dist/components/Common/UI/Checkbox/CheckboxTypes.d.ts +16 -1
  70. package/dist/components/Common/UI/Checkbox/index.d.ts +1 -0
  71. package/dist/components/Common/UI/CheckboxGroup/CheckboxGroup.js +4 -4
  72. package/dist/components/Common/UI/CheckboxGroup/CheckboxGroup.js.map +1 -1
  73. package/dist/components/Common/UI/CheckboxGroup/CheckboxGroupTypes.d.ts +33 -3
  74. package/dist/components/Common/UI/CheckboxGroup/index.d.ts +1 -0
  75. package/dist/components/Common/UI/ComboBox/ComboBox.js +8 -8
  76. package/dist/components/Common/UI/ComboBox/ComboBox.js.map +1 -1
  77. package/dist/components/Common/UI/ComboBox/ComboBoxTypes.d.ts +31 -1
  78. package/dist/components/Common/UI/DatePicker/DatePicker.js +13 -13
  79. package/dist/components/Common/UI/DatePicker/DatePicker.js.map +1 -1
  80. package/dist/components/Common/UI/DatePicker/DatePickerTypes.d.ts +25 -1
  81. package/dist/components/Common/UI/DatePicker/index.d.ts +1 -0
  82. package/dist/components/Common/UI/Heading/HeadingTypes.d.ts +12 -0
  83. package/dist/components/Common/UI/Heading/index.d.ts +1 -0
  84. package/dist/components/Common/UI/Input/index.d.ts +1 -0
  85. package/dist/components/Common/UI/Link/LinkTypes.d.ts +53 -1
  86. package/dist/components/Common/UI/Link/index.d.ts +1 -0
  87. package/dist/components/Common/UI/List/ListTypes.d.ts +3 -5
  88. package/dist/components/Common/UI/List/index.d.ts +1 -0
  89. package/dist/components/Common/UI/Menu/MenuTypes.d.ts +30 -0
  90. package/dist/components/Common/UI/Menu/index.d.ts +1 -0
  91. package/dist/components/Common/UI/NumberInput/NumberInput.js +4 -4
  92. package/dist/components/Common/UI/NumberInput/NumberInput.js.map +1 -1
  93. package/dist/components/Common/UI/NumberInput/NumberInputTypes.d.ts +34 -1
  94. package/dist/components/Common/UI/NumberInput/index.d.ts +1 -0
  95. package/dist/components/Common/UI/ProgressBar/ProgressBarTypes.d.ts +12 -0
  96. package/dist/components/Common/UI/ProgressBar/index.d.ts +1 -0
  97. package/dist/components/Common/UI/Radio/Radio.js +1 -1
  98. package/dist/components/Common/UI/Radio/Radio.js.map +1 -1
  99. package/dist/components/Common/UI/Radio/RadioTypes.d.ts +16 -1
  100. package/dist/components/Common/UI/Radio/index.d.ts +1 -0
  101. package/dist/components/Common/UI/RadioGroup/RadioGroup.js +4 -4
  102. package/dist/components/Common/UI/RadioGroup/RadioGroup.js.map +1 -1
  103. package/dist/components/Common/UI/RadioGroup/RadioGroupTypes.d.ts +33 -3
  104. package/dist/components/Common/UI/RadioGroup/index.d.ts +1 -0
  105. package/dist/components/Common/UI/Select/Select.js +8 -8
  106. package/dist/components/Common/UI/Select/Select.js.map +1 -1
  107. package/dist/components/Common/UI/Select/SelectTypes.d.ts +34 -1
  108. package/dist/components/Common/UI/Select/index.d.ts +1 -0
  109. package/dist/components/Common/UI/Switch/Switch.js +1 -1
  110. package/dist/components/Common/UI/Switch/Switch.js.map +1 -1
  111. package/dist/components/Common/UI/Switch/SwitchTypes.d.ts +25 -1
  112. package/dist/components/Common/UI/Switch/index.d.ts +1 -0
  113. package/dist/components/Common/UI/Table/TableTypes.d.ts +21 -0
  114. package/dist/components/Common/UI/Table/index.d.ts +1 -0
  115. package/dist/components/Common/UI/Text/TextTypes.d.ts +18 -0
  116. package/dist/components/Common/UI/Text/index.d.ts +1 -0
  117. package/dist/components/Common/UI/TextInput/TextInput.js +1 -1
  118. package/dist/components/Common/UI/TextInput/TextInput.js.map +1 -1
  119. package/dist/components/Common/UI/TextInput/TextInputTypes.d.ts +22 -1
  120. package/dist/components/Common/UI/TextInput/index.d.ts +1 -0
  121. package/dist/components/Common/VisuallyHidden/index.d.ts +1 -0
  122. package/dist/components/Common/index.d.ts +1 -0
  123. package/dist/components/Company/AssignSignatory/AssignSignatory.d.ts +3 -3
  124. package/dist/components/Company/AssignSignatory/AssignSignatory.js +26 -25
  125. package/dist/components/Company/AssignSignatory/AssignSignatory.js.map +1 -1
  126. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js +7 -7
  127. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js.map +1 -1
  128. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.d.ts +2 -2
  129. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js.map +1 -1
  130. package/dist/components/Company/AssignSignatory/CreateSignatory/Schema.d.ts +41 -15
  131. package/dist/components/Company/AssignSignatory/CreateSignatory/Schema.js +17 -20
  132. package/dist/components/Company/AssignSignatory/CreateSignatory/Schema.js.map +1 -1
  133. package/dist/components/Company/AssignSignatory/CreateSignatory/index.d.ts +1 -0
  134. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +3 -4
  135. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
  136. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js +10 -10
  137. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js.map +1 -1
  138. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.d.ts +17 -11
  139. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +42 -45
  140. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js.map +1 -1
  141. package/dist/components/Company/AssignSignatory/InviteSignatory/index.d.ts +1 -0
  142. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +3 -4
  143. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
  144. package/dist/components/Company/AssignSignatory/index.d.ts +1 -0
  145. package/dist/components/Company/AssignSignatory/useAssignSignatory.js +5 -6
  146. package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
  147. package/dist/components/Company/BankAccount/BankAccount.d.ts +10 -0
  148. package/dist/components/Company/BankAccount/BankAccount.js +32 -0
  149. package/dist/components/Company/BankAccount/BankAccount.js.map +1 -0
  150. package/dist/components/Company/BankAccount/BankAccountForm/BankAccountForm.js +6 -6
  151. package/dist/components/Company/BankAccount/BankAccountForm/BankAccountForm.js.map +1 -1
  152. package/dist/components/Company/BankAccount/BankAccountForm/Form.d.ts +12 -6
  153. package/dist/components/Company/BankAccount/BankAccountForm/Form.js +2 -2
  154. package/dist/components/Company/BankAccount/BankAccountForm/Form.js.map +1 -1
  155. package/dist/components/Company/BankAccount/BankAccountForm/context.js +3 -4
  156. package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
  157. package/dist/components/Company/BankAccount/BankAccountVerify/BankAccountVerify.js +10 -10
  158. package/dist/components/Company/BankAccount/BankAccountVerify/BankAccountVerify.js.map +1 -1
  159. package/dist/components/Company/BankAccount/BankAccountVerify/Form.d.ts +12 -6
  160. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js +17 -17
  161. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js.map +1 -1
  162. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js.map +1 -0
  163. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.d.ts +13 -0
  164. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js +63 -0
  165. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js.map +1 -0
  166. package/dist/components/Company/DocumentSigner/DocumentList/Head.js.map +1 -0
  167. package/dist/components/Company/DocumentSigner/DocumentList/List.js.map +1 -0
  168. package/dist/components/Company/DocumentSigner/DocumentList/ManageSignatories.js.map +1 -0
  169. package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/DocumentList/index.d.ts +1 -0
  170. package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/DocumentList/useDocumentList.js +3 -4
  171. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -0
  172. package/dist/components/Company/DocumentSigner/DocumentSigner.d.ts +12 -0
  173. package/dist/components/Company/DocumentSigner/DocumentSigner.js +41 -0
  174. package/dist/components/Company/DocumentSigner/DocumentSigner.js.map +1 -0
  175. package/dist/components/Company/DocumentSigner/SignatureForm/Actions.js.map +1 -0
  176. package/dist/components/Company/DocumentSigner/SignatureForm/Form.js.map +1 -0
  177. package/dist/components/Company/DocumentSigner/SignatureForm/Head.js.map +1 -0
  178. package/dist/components/Company/DocumentSigner/SignatureForm/Preview.js.map +1 -0
  179. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.d.ts +14 -0
  180. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +72 -0
  181. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -0
  182. package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/SignatureForm/index.d.ts +1 -0
  183. package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/SignatureForm/useSignatureForm.js +3 -4
  184. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -0
  185. package/dist/components/Company/DocumentSigner/assignSignatoryState.js.map +1 -0
  186. package/dist/components/Company/DocumentSigner/documentSignerStateMachine.js.map +1 -0
  187. package/dist/components/Company/DocumentSigner/index.d.ts +2 -0
  188. package/dist/components/Company/DocumentSigner/stateMachine.js.map +1 -0
  189. package/dist/components/Company/FederalTaxes/FederalTaxes.d.ts +1 -4
  190. package/dist/components/Company/FederalTaxes/FederalTaxes.js +31 -31
  191. package/dist/components/Company/FederalTaxes/FederalTaxes.js.map +1 -1
  192. package/dist/components/Company/FederalTaxes/index.d.ts +1 -0
  193. package/dist/components/Company/FederalTaxes/useFederalTaxes.d.ts +18 -8
  194. package/dist/components/Company/FederalTaxes/useFederalTaxes.js +10 -15
  195. package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
  196. package/dist/components/Company/Industry/Context.js +6 -7
  197. package/dist/components/Company/Industry/Context.js.map +1 -1
  198. package/dist/components/Company/Industry/Industry.d.ts +1 -1
  199. package/dist/components/Company/Industry/Industry.js +29 -28
  200. package/dist/components/Company/Industry/Industry.js.map +1 -1
  201. package/dist/components/Company/Industry/index.d.ts +1 -0
  202. package/dist/components/Company/Locations/LocationForm/Form.d.ts +27 -11
  203. package/dist/components/Company/Locations/LocationForm/Form.js +24 -24
  204. package/dist/components/Company/Locations/LocationForm/Form.js.map +1 -1
  205. package/dist/components/Company/Locations/LocationForm/LocationForm.js +24 -24
  206. package/dist/components/Company/Locations/LocationForm/LocationForm.js.map +1 -1
  207. package/dist/components/Company/Locations/LocationForm/useLocationForm.js +3 -4
  208. package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
  209. package/dist/components/Company/Locations/Locations.d.ts +9 -0
  210. package/dist/components/Company/Locations/Locations.js +27 -0
  211. package/dist/components/Company/Locations/Locations.js.map +1 -0
  212. package/dist/components/Company/Locations/LocationsList/LocationsList.d.ts +3 -3
  213. package/dist/components/Company/Locations/LocationsList/LocationsList.js +27 -32
  214. package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
  215. package/dist/components/Company/Locations/LocationsList/index.d.ts +1 -0
  216. package/dist/components/Company/Locations/LocationsList/useLocationsList.js +3 -4
  217. package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
  218. package/dist/components/Company/OnboardingFlow/OnboardingFlowComponents.d.ts +2 -2
  219. package/dist/components/Company/OnboardingFlow/OnboardingFlowComponents.js +13 -13
  220. package/dist/components/Company/OnboardingFlow/OnboardingFlowComponents.js.map +1 -1
  221. package/dist/components/Company/OnboardingFlow/onboardingStateMachine.js +3 -3
  222. package/dist/components/Company/OnboardingFlow/onboardingStateMachine.js.map +1 -1
  223. package/dist/components/Company/OnboardingOverview/OnboardingOverview.d.ts +1 -1
  224. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js +15 -15
  225. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js.map +1 -1
  226. package/dist/components/Company/OnboardingOverview/context.js +3 -4
  227. package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
  228. package/dist/components/Company/PaySchedule/PaySchedule.d.ts +2 -2
  229. package/dist/components/Company/PaySchedule/PaySchedule.js +68 -67
  230. package/dist/components/Company/PaySchedule/PaySchedule.js.map +1 -1
  231. package/dist/components/Company/PaySchedule/_parts/List.js +28 -31
  232. package/dist/components/Company/PaySchedule/_parts/List.js.map +1 -1
  233. package/dist/components/Company/PaySchedule/_parts/List.module.scss.js +8 -0
  234. package/dist/components/Company/PaySchedule/_parts/List.module.scss.js.map +1 -0
  235. package/dist/components/Company/PaySchedule/_parts/index.d.ts +1 -0
  236. package/dist/components/Company/PaySchedule/index.d.ts +1 -0
  237. package/dist/components/Company/PaySchedule/usePaySchedule.d.ts +31 -13
  238. package/dist/components/Company/PaySchedule/usePaySchedule.js +13 -19
  239. package/dist/components/Company/PaySchedule/usePaySchedule.js.map +1 -1
  240. package/dist/components/Company/StateTaxes/StateTaxes.d.ts +9 -0
  241. package/dist/components/Company/StateTaxes/StateTaxes.js +27 -0
  242. package/dist/components/Company/StateTaxes/StateTaxes.js.map +1 -0
  243. package/dist/components/Company/StateTaxes/{StateTaxesFlowComponents.js → StateTaxesComponents.js} +1 -1
  244. package/dist/components/Company/StateTaxes/StateTaxesComponents.js.map +1 -0
  245. package/dist/components/Company/StateTaxes/StateTaxesForm/Form.d.ts +3 -3
  246. package/dist/components/Company/StateTaxes/StateTaxesForm/Form.js +3 -3
  247. package/dist/components/Company/StateTaxes/StateTaxesForm/Form.js.map +1 -1
  248. package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js +66 -77
  249. package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js.map +1 -1
  250. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +3 -4
  251. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
  252. package/dist/components/Company/StateTaxes/StateTaxesList/StateTaxesList.d.ts +3 -3
  253. package/dist/components/Company/StateTaxes/StateTaxesList/StateTaxesList.js.map +1 -1
  254. package/dist/components/Company/StateTaxes/StateTaxesList/context.js +3 -4
  255. package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
  256. package/dist/components/Company/StateTaxes/stateTaxesStateMachine.js +1 -1
  257. package/dist/components/Company/StateTaxes/stateTaxesStateMachine.js.map +1 -1
  258. package/dist/components/Company/index.d.ts +7 -6
  259. package/dist/components/Company/index.js +18 -18
  260. package/dist/components/Employee/Compensation/Compensation.d.ts +1 -1
  261. package/dist/components/Employee/Compensation/Compensation.js +48 -47
  262. package/dist/components/Employee/Compensation/Compensation.js.map +1 -1
  263. package/dist/components/Employee/Compensation/Edit.js +17 -16
  264. package/dist/components/Employee/Compensation/Edit.js.map +1 -1
  265. package/dist/components/Employee/Compensation/List.js +10 -10
  266. package/dist/components/Employee/Compensation/List.js.map +1 -1
  267. package/dist/components/Employee/Compensation/index.d.ts +1 -0
  268. package/dist/components/Employee/Compensation/useCompensation.d.ts +53 -45
  269. package/dist/components/Employee/Compensation/useCompensation.js +59 -68
  270. package/dist/components/Employee/Compensation/useCompensation.js.map +1 -1
  271. package/dist/components/Employee/Deductions/Deductions.d.ts +11 -7
  272. package/dist/components/Employee/Deductions/Deductions.js +76 -74
  273. package/dist/components/Employee/Deductions/Deductions.js.map +1 -1
  274. package/dist/components/Employee/Deductions/index.d.ts +1 -0
  275. package/dist/components/Employee/Deductions/useDeductions.d.ts +34 -14
  276. package/dist/components/Employee/Deductions/useDeductions.js +10 -29
  277. package/dist/components/Employee/Deductions/useDeductions.js.map +1 -1
  278. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +3 -4
  279. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  280. package/dist/components/Employee/DocumentSigner/DocumentSigner.d.ts +11 -0
  281. package/dist/components/Employee/DocumentSigner/DocumentSigner.js +27 -0
  282. package/dist/components/Employee/DocumentSigner/DocumentSigner.js.map +1 -0
  283. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js +1 -1
  284. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
  285. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js +3 -4
  286. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
  287. package/dist/components/Employee/DocumentSigner/index.d.ts +2 -1
  288. package/dist/components/Employee/EmployeeList/EmployeeList.d.ts +1 -1
  289. package/dist/components/Employee/EmployeeList/EmployeeList.js +38 -38
  290. package/dist/components/Employee/EmployeeList/EmployeeList.js.map +1 -1
  291. package/dist/components/Employee/EmployeeList/useEmployeeList.js +3 -4
  292. package/dist/components/Employee/EmployeeList/useEmployeeList.js.map +1 -1
  293. package/dist/components/Employee/Landing/Landing.d.ts +1 -1
  294. package/dist/components/Employee/Landing/Landing.js +5 -5
  295. package/dist/components/Employee/Landing/Landing.js.map +1 -1
  296. package/dist/components/Employee/Landing/index.d.ts +1 -0
  297. package/dist/components/Employee/OnboardingFlow/OnboardingFlow.d.ts +27 -0
  298. package/dist/components/Employee/OnboardingFlow/OnboardingFlow.js +29 -0
  299. package/dist/components/Employee/OnboardingFlow/OnboardingFlow.js.map +1 -0
  300. package/dist/components/Employee/OnboardingFlow/onboardingStateMachine.js +107 -0
  301. package/dist/components/Employee/OnboardingFlow/onboardingStateMachine.js.map +1 -0
  302. package/dist/components/Employee/OnboardingSummary/OnboardingSummary.d.ts +1 -1
  303. package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +30 -30
  304. package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js.map +1 -1
  305. package/dist/components/Employee/OnboardingSummary/index.d.ts +1 -0
  306. package/dist/components/Employee/PaymentMethod/BankAccount.d.ts +22 -10
  307. package/dist/components/Employee/PaymentMethod/BankAccount.js +9 -9
  308. package/dist/components/Employee/PaymentMethod/BankAccount.js.map +1 -1
  309. package/dist/components/Employee/PaymentMethod/PaymentMethod.d.ts +1 -1
  310. package/dist/components/Employee/PaymentMethod/PaymentMethod.js +74 -74
  311. package/dist/components/Employee/PaymentMethod/PaymentMethod.js.map +1 -1
  312. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.d.ts +10 -6
  313. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js +8 -8
  314. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js.map +1 -1
  315. package/dist/components/Employee/PaymentMethod/index.d.ts +1 -0
  316. package/dist/components/Employee/PaymentMethod/usePaymentMethod.d.ts +92 -37
  317. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +31 -39
  318. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +1 -1
  319. package/dist/components/Employee/Profile/AdminPersonalDetails.d.ts +68 -31
  320. package/dist/components/Employee/Profile/AdminPersonalDetails.js +33 -46
  321. package/dist/components/Employee/Profile/AdminPersonalDetails.js.map +1 -1
  322. package/dist/components/Employee/Profile/HomeAddress.d.ts +33 -13
  323. package/dist/components/Employee/Profile/HomeAddress.js +39 -38
  324. package/dist/components/Employee/Profile/HomeAddress.js.map +1 -1
  325. package/dist/components/Employee/Profile/PersonalDetailsInputs.d.ts +81 -32
  326. package/dist/components/Employee/Profile/PersonalDetailsInputs.js +60 -74
  327. package/dist/components/Employee/Profile/PersonalDetailsInputs.js.map +1 -1
  328. package/dist/components/Employee/Profile/Profile.d.ts +1 -1
  329. package/dist/components/Employee/Profile/Profile.js +69 -72
  330. package/dist/components/Employee/Profile/Profile.js.map +1 -1
  331. package/dist/components/Employee/Profile/SelfPersonalDetails.d.ts +44 -15
  332. package/dist/components/Employee/Profile/SelfPersonalDetails.js +18 -21
  333. package/dist/components/Employee/Profile/SelfPersonalDetails.js.map +1 -1
  334. package/dist/components/Employee/Profile/index.d.ts +1 -0
  335. package/dist/components/Employee/Profile/useProfile.js +3 -4
  336. package/dist/components/Employee/Profile/useProfile.js.map +1 -1
  337. package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingComponents.d.ts +17 -0
  338. package/dist/components/{Flow/EmployeeSelfOnboardingFlow/EmployeeSelfOnboardingComponents.js → Employee/SelfOnboardingFlow/SelfOnboardingComponents.js} +7 -7
  339. package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingComponents.js.map +1 -0
  340. package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingFlow.d.ts +2 -0
  341. package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingFlow.js +22 -0
  342. package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingFlow.js.map +1 -0
  343. package/dist/components/{Flow/StateMachines/employeeSelfOnboarding.js → Employee/SelfOnboardingFlow/selfOnboardingMachine.js} +4 -4
  344. package/dist/components/Employee/SelfOnboardingFlow/selfOnboardingMachine.js.map +1 -0
  345. package/dist/components/Employee/Taxes/FederalForm.d.ts +28 -12
  346. package/dist/components/Employee/Taxes/FederalForm.js +28 -28
  347. package/dist/components/Employee/Taxes/FederalForm.js.map +1 -1
  348. package/dist/components/Employee/Taxes/StateForm.d.ts +9 -5
  349. package/dist/components/Employee/Taxes/StateForm.js +6 -6
  350. package/dist/components/Employee/Taxes/StateForm.js.map +1 -1
  351. package/dist/components/Employee/Taxes/Taxes.d.ts +1 -1
  352. package/dist/components/Employee/Taxes/Taxes.js +78 -77
  353. package/dist/components/Employee/Taxes/Taxes.js.map +1 -1
  354. package/dist/components/Employee/Taxes/index.d.ts +1 -0
  355. package/dist/components/Employee/Taxes/useTaxes.js +3 -4
  356. package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
  357. package/dist/components/Employee/index.d.ts +4 -1
  358. package/dist/components/Employee/index.js +20 -16
  359. package/dist/components/Employee/index.js.map +1 -1
  360. package/dist/components/Flow/useFlow.d.ts +2 -1
  361. package/dist/components/Flow/useFlow.js.map +1 -1
  362. package/dist/components/index.d.ts +1 -1
  363. package/dist/contexts/ApiProvider/ApiProvider.d.ts +5 -0
  364. package/dist/contexts/ApiProvider/ApiProvider.js +34 -0
  365. package/dist/contexts/ApiProvider/ApiProvider.js.map +1 -0
  366. package/dist/contexts/GustoApiProvider/index.d.ts +1 -0
  367. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.d.ts +2 -7
  368. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +26 -24
  369. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
  370. package/dist/contexts/GustoProvider/index.d.ts +2 -1
  371. package/dist/contexts/LocaleProvider/index.d.ts +1 -0
  372. package/dist/contexts/ThemeProvider/index.d.ts +1 -0
  373. package/dist/contexts/index.d.ts +1 -0
  374. package/dist/helpers/validations.d.ts +6 -5
  375. package/dist/helpers/validations.js +10 -17
  376. package/dist/helpers/validations.js.map +1 -1
  377. package/dist/hooks/useForkRef/index.d.ts +1 -0
  378. package/dist/i18n/I18n.d.ts +2 -0
  379. package/dist/i18n/I18n.js +27 -21
  380. package/dist/i18n/I18n.js.map +1 -1
  381. package/dist/i18n/index.d.ts +1 -0
  382. package/dist/index.d.ts +1 -2
  383. package/dist/index.js +7 -13
  384. package/dist/index.js.map +1 -1
  385. package/dist/shared/constants.d.ts +1 -1
  386. package/dist/shared/constants.js +1 -1
  387. package/dist/shared/constants.js.map +1 -1
  388. package/dist/style.css +1 -1
  389. package/dist/types/Helpers.d.ts +14 -0
  390. package/dist/types/i18next.d.ts +60 -61
  391. package/package.json +7 -4
  392. package/dist/components/Common/UI/FieldCaption/FieldCaption.js.map +0 -1
  393. package/dist/components/Common/UI/FieldDescription/FieldDescription.js.map +0 -1
  394. package/dist/components/Common/UI/FieldErrorMessage/FieldErrorMessage.js.map +0 -1
  395. package/dist/components/Common/UI/FieldLayout/FieldLayout.js.map +0 -1
  396. package/dist/components/Common/UI/FieldLayout/FieldLayoutTypes.d.ts +0 -19
  397. package/dist/components/Common/UI/Fieldset/Fieldset.js.map +0 -1
  398. package/dist/components/Common/UI/HorizontalFieldLayout/HorizontalFieldLayout.js.map +0 -1
  399. package/dist/components/Company/BankAccount/BankAccountFlow.d.ts +0 -5
  400. package/dist/components/Company/BankAccount/BankAccountFlow.js +0 -24
  401. package/dist/components/Company/BankAccount/BankAccountFlow.js.map +0 -1
  402. package/dist/components/Company/DocumentSignerFlow/DocumentList/Actions.js.map +0 -1
  403. package/dist/components/Company/DocumentSignerFlow/DocumentList/DocumentList.d.ts +0 -13
  404. package/dist/components/Company/DocumentSignerFlow/DocumentList/DocumentList.js +0 -69
  405. package/dist/components/Company/DocumentSignerFlow/DocumentList/DocumentList.js.map +0 -1
  406. package/dist/components/Company/DocumentSignerFlow/DocumentList/Head.js.map +0 -1
  407. package/dist/components/Company/DocumentSignerFlow/DocumentList/List.js.map +0 -1
  408. package/dist/components/Company/DocumentSignerFlow/DocumentList/ManageSignatories.js.map +0 -1
  409. package/dist/components/Company/DocumentSignerFlow/DocumentList/useDocumentList.js.map +0 -1
  410. package/dist/components/Company/DocumentSignerFlow/DocumentSignerFlow.d.ts +0 -6
  411. package/dist/components/Company/DocumentSignerFlow/DocumentSignerFlow.js +0 -35
  412. package/dist/components/Company/DocumentSignerFlow/DocumentSignerFlow.js.map +0 -1
  413. package/dist/components/Company/DocumentSignerFlow/SignatureForm/Actions.js.map +0 -1
  414. package/dist/components/Company/DocumentSignerFlow/SignatureForm/Form.js.map +0 -1
  415. package/dist/components/Company/DocumentSignerFlow/SignatureForm/Head.js.map +0 -1
  416. package/dist/components/Company/DocumentSignerFlow/SignatureForm/Preview.js.map +0 -1
  417. package/dist/components/Company/DocumentSignerFlow/SignatureForm/SignatureForm.d.ts +0 -17
  418. package/dist/components/Company/DocumentSignerFlow/SignatureForm/SignatureForm.js +0 -78
  419. package/dist/components/Company/DocumentSignerFlow/SignatureForm/SignatureForm.js.map +0 -1
  420. package/dist/components/Company/DocumentSignerFlow/SignatureForm/useSignatureForm.js.map +0 -1
  421. package/dist/components/Company/DocumentSignerFlow/assignSignatoryState.js.map +0 -1
  422. package/dist/components/Company/DocumentSignerFlow/documentSignerStateMachine.js.map +0 -1
  423. package/dist/components/Company/DocumentSignerFlow/index.d.ts +0 -1
  424. package/dist/components/Company/DocumentSignerFlow/stateMachine.js.map +0 -1
  425. package/dist/components/Company/Locations/LocationsFlow.d.ts +0 -5
  426. package/dist/components/Company/Locations/LocationsFlow.js +0 -21
  427. package/dist/components/Company/Locations/LocationsFlow.js.map +0 -1
  428. package/dist/components/Company/StateTaxes/StateTaxesFlow.d.ts +0 -5
  429. package/dist/components/Company/StateTaxes/StateTaxesFlow.js +0 -21
  430. package/dist/components/Company/StateTaxes/StateTaxesFlow.js.map +0 -1
  431. package/dist/components/Company/StateTaxes/StateTaxesFlowComponents.js.map +0 -1
  432. package/dist/components/Employee/DocumentSigner/DocumentSignerFlow.d.ts +0 -5
  433. package/dist/components/Employee/DocumentSigner/DocumentSignerFlow.js +0 -21
  434. package/dist/components/Employee/DocumentSigner/DocumentSignerFlow.js.map +0 -1
  435. package/dist/components/Flow/EmployeeOnboardingFlow.d.ts +0 -27
  436. package/dist/components/Flow/EmployeeOnboardingFlow.js +0 -29
  437. package/dist/components/Flow/EmployeeOnboardingFlow.js.map +0 -1
  438. package/dist/components/Flow/EmployeeSelfOnboardingFlow/EmployeeSelfOnboardingComponents.d.ts +0 -5
  439. package/dist/components/Flow/EmployeeSelfOnboardingFlow/EmployeeSelfOnboardingComponents.js.map +0 -1
  440. package/dist/components/Flow/EmployeeSelfOnboardingFlow/EmployeeSelfOnboardingFlow.d.ts +0 -13
  441. package/dist/components/Flow/EmployeeSelfOnboardingFlow/EmployeeSelfOnboardingFlow.js +0 -26
  442. package/dist/components/Flow/EmployeeSelfOnboardingFlow/EmployeeSelfOnboardingFlow.js.map +0 -1
  443. package/dist/components/Flow/StateMachines/employeeOnboarding.js +0 -136
  444. package/dist/components/Flow/StateMachines/employeeOnboarding.js.map +0 -1
  445. package/dist/components/Flow/StateMachines/employeeSelfOnboarding.js.map +0 -1
  446. package/dist/components/Flow/StateMachines/index.d.ts +0 -2
  447. package/dist/components/Flow/index.d.ts +0 -2
  448. package/dist/components/Flow/index.js +0 -7
  449. package/dist/components/Flow/index.js.map +0 -1
  450. /package/dist/components/Common/{UI/FieldCaption → FieldCaption}/FieldCaption.d.ts +0 -0
  451. /package/dist/components/Common/{UI/FieldCaption → FieldCaption}/FieldCaption.module.scss.js +0 -0
  452. /package/dist/components/Common/{UI/FieldCaption → FieldCaption}/FieldCaption.module.scss.js.map +0 -0
  453. /package/dist/components/Common/{UI/FieldDescription → FieldDescription}/FieldDescription.d.ts +0 -0
  454. /package/dist/components/Common/{UI/FieldDescription → FieldDescription}/FieldDescription.module.scss.js +0 -0
  455. /package/dist/components/Common/{UI/FieldDescription → FieldDescription}/FieldDescription.module.scss.js.map +0 -0
  456. /package/dist/components/Common/{UI/FieldErrorMessage → FieldErrorMessage}/FieldErrorMessage.d.ts +0 -0
  457. /package/dist/components/Common/{UI/FieldErrorMessage → FieldErrorMessage}/FieldErrorMessage.module.scss.js +0 -0
  458. /package/dist/components/Common/{UI/FieldErrorMessage → FieldErrorMessage}/FieldErrorMessage.module.scss.js.map +0 -0
  459. /package/dist/components/Common/{UI/FieldLayout → FieldLayout}/FieldLayout.d.ts +0 -0
  460. /package/dist/components/Common/{UI/FieldLayout → FieldLayout}/FieldLayout.module.scss.js +0 -0
  461. /package/dist/components/Common/{UI/FieldLayout → FieldLayout}/FieldLayout.module.scss.js.map +0 -0
  462. /package/dist/components/Common/{UI/Fieldset → Fieldset}/Fieldset.d.ts +0 -0
  463. /package/dist/components/Common/{UI/Fieldset → Fieldset}/Fieldset.module.scss.js +0 -0
  464. /package/dist/components/Common/{UI/Fieldset → Fieldset}/Fieldset.module.scss.js.map +0 -0
  465. /package/dist/components/Common/{UI/HorizontalFieldLayout → HorizontalFieldLayout}/HorizontalFieldLayout.d.ts +0 -0
  466. /package/dist/components/Common/{UI/HorizontalFieldLayout → HorizontalFieldLayout}/HorizontalFieldLayout.module.scss.js +0 -0
  467. /package/dist/components/Common/{UI/HorizontalFieldLayout → HorizontalFieldLayout}/HorizontalFieldLayout.module.scss.js.map +0 -0
  468. /package/dist/components/Common/{UI/HorizontalFieldLayout → HorizontalFieldLayout}/HorizontalFieldLayoutTypes.d.ts +0 -0
  469. /package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/DocumentList/Actions.d.ts +0 -0
  470. /package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/DocumentList/Actions.js +0 -0
  471. /package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/DocumentList/Head.d.ts +0 -0
  472. /package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/DocumentList/Head.js +0 -0
  473. /package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/DocumentList/List.d.ts +0 -0
  474. /package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/DocumentList/List.js +0 -0
  475. /package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/DocumentList/ManageSignatories.d.ts +0 -0
  476. /package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/DocumentList/ManageSignatories.js +0 -0
  477. /package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/DocumentList/ManageSignatories.module.scss.js +0 -0
  478. /package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/DocumentList/ManageSignatories.module.scss.js.map +0 -0
  479. /package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/DocumentList/useDocumentList.d.ts +0 -0
  480. /package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/SignatureForm/Actions.d.ts +0 -0
  481. /package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/SignatureForm/Actions.js +0 -0
  482. /package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/SignatureForm/Form.d.ts +0 -0
  483. /package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/SignatureForm/Form.js +0 -0
  484. /package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/SignatureForm/Head.d.ts +0 -0
  485. /package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/SignatureForm/Head.js +0 -0
  486. /package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/SignatureForm/Preview.d.ts +0 -0
  487. /package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/SignatureForm/Preview.js +0 -0
  488. /package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/SignatureForm/useSignatureForm.d.ts +0 -0
  489. /package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/assignSignatoryState.d.ts +0 -0
  490. /package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/assignSignatoryState.js +0 -0
  491. /package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/documentSignerStateMachine.d.ts +0 -0
  492. /package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/documentSignerStateMachine.js +0 -0
  493. /package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/stateMachine.d.ts +0 -0
  494. /package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/stateMachine.js +0 -0
  495. /package/dist/components/Company/{DocumentSignerFlow/useDocumentSignerFlow.d.ts → DocumentSigner/useDocumentSigner.d.ts} +0 -0
  496. /package/dist/components/Company/StateTaxes/{StateTaxesFlowComponents.d.ts → StateTaxesComponents.d.ts} +0 -0
  497. /package/dist/components/{Flow/StateMachines/employeeOnboarding.d.ts → Employee/OnboardingFlow/onboardingStateMachine.d.ts} +0 -0
  498. /package/dist/components/{Flow/StateMachines/employeeSelfOnboarding.d.ts → Employee/SelfOnboardingFlow/selfOnboardingMachine.d.ts} +0 -0
@@ -5,11 +5,11 @@ import { useMemo as H } from "react";
5
5
  import d from "classnames";
6
6
  import { useFieldIds as K } from "../hooks/useFieldIds.js";
7
7
  import t from "./ComboBox.module.scss.js";
8
- import { useTheme as M } from "../../../../contexts/ThemeProvider/useTheme.js";
8
+ import { FieldLayout as M } from "../../FieldLayout/FieldLayout.js";
9
+ import { useTheme as U } from "../../../../contexts/ThemeProvider/useTheme.js";
9
10
  /* empty css */
10
- import U from "../../../../assets/icons/alert-circle.svg.js";
11
- import _ from "../../../../assets/icons/caret-down.svg.js";
12
- import { FieldLayout as $ } from "../FieldLayout/FieldLayout.js";
11
+ import _ from "../../../../assets/icons/alert-circle.svg.js";
12
+ import $ from "../../../../assets/icons/caret-down.svg.js";
13
13
  const oo = ({
14
14
  className: p,
15
15
  description: i,
@@ -33,9 +33,9 @@ const oo = ({
33
33
  inputId: f,
34
34
  errorMessage: m,
35
35
  description: i
36
- }), { container: w } = M(), A = H(() => n.map((o) => ({ name: o.label, id: o.value })), [n]);
36
+ }), { container: w } = U(), A = H(() => n.map((o) => ({ name: o.label, id: o.value })), [n]);
37
37
  return /* @__PURE__ */ r(
38
- $,
38
+ M,
39
39
  {
40
40
  label: s,
41
41
  htmlFor: l,
@@ -65,8 +65,8 @@ const oo = ({
65
65
  /* @__PURE__ */ e(T, { children: [
66
66
  /* @__PURE__ */ r(j, { ref: C, placeholder: b, onBlur: B, ...N }),
67
67
  /* @__PURE__ */ e("div", { "aria-hidden": "true", className: t.icons, children: [
68
- a && /* @__PURE__ */ r(U, { fontSize: 16 }),
69
- /* @__PURE__ */ r(_, { title: S("icons.selectArrow") })
68
+ a && /* @__PURE__ */ r(_, { fontSize: 16 }),
69
+ /* @__PURE__ */ r($, { title: S("icons.selectArrow") })
70
70
  ] })
71
71
  ] }),
72
72
  /* @__PURE__ */ r(
@@ -1 +1 @@
1
- {"version":3,"file":"ComboBox.js","sources":["../../../../../src/components/Common/UI/ComboBox/ComboBox.tsx"],"sourcesContent":["import type { Key } from 'react-aria-components'\nimport {\n ComboBox as AriaComboBox,\n Button,\n Input,\n ListBox,\n ListBoxItem,\n Popover,\n} from 'react-aria-components'\nimport { useTranslation } from 'react-i18next'\nimport { useMemo } from 'react'\nimport classNames from 'classnames'\nimport { FieldLayout } from '../FieldLayout'\nimport { useFieldIds } from '../hooks/useFieldIds'\nimport styles from './ComboBox.module.scss'\nimport type { ComboBoxProps } from './ComboBoxTypes'\nimport { useTheme } from '@/contexts/ThemeProvider'\nimport AlertCircle from '@/assets/icons/alert-circle.svg?react'\nimport CaretDown from '@/assets/icons/caret-down.svg?react'\n\nexport const ComboBox = ({\n className,\n description,\n errorMessage,\n id,\n isDisabled,\n isInvalid,\n isRequired,\n label,\n onChange,\n onBlur,\n options,\n placeholder,\n value,\n inputRef,\n shouldVisuallyHideLabel,\n name,\n ...props\n}: ComboBoxProps) => {\n const { t } = useTranslation()\n const { inputId, errorMessageId, descriptionId, ariaDescribedBy } = useFieldIds({\n inputId: id,\n errorMessage,\n description,\n })\n const { container } = useTheme()\n\n const items = useMemo(() => {\n return options.map(option => ({ name: option.label, id: option.value }))\n }, [options])\n\n return (\n <FieldLayout\n label={label}\n htmlFor={inputId}\n errorMessage={errorMessage}\n errorMessageId={errorMessageId}\n descriptionId={descriptionId}\n isRequired={isRequired}\n description={description}\n shouldVisuallyHideLabel={shouldVisuallyHideLabel}\n className={classNames(styles.root, className)}\n withErrorIcon={false}\n >\n <AriaComboBox\n aria-label={label}\n aria-describedby={ariaDescribedBy}\n className={'react-aria-ComboBox-root'}\n isDisabled={isDisabled}\n isInvalid={isInvalid}\n onSelectionChange={key => {\n if (key) {\n onChange?.(key.toString())\n }\n }}\n id={inputId}\n selectedKey={value ? (value as Key) : undefined}\n name={name}\n >\n <Button>\n <Input ref={inputRef} placeholder={placeholder} onBlur={onBlur} {...props} />\n <div aria-hidden=\"true\" className={styles.icons}>\n {isInvalid && <AlertCircle fontSize={16} />}\n <CaretDown title={t('icons.selectArrow')} />\n </div>\n </Button>\n\n <Popover\n className={classNames(styles.popover, 'react-aria-Popover')}\n UNSTABLE_portalContainer={container.current}\n maxHeight={320}\n >\n <ListBox items={items}>\n {item => <ListBoxItem key={item.id}>{item.name}</ListBoxItem>}\n </ListBox>\n </Popover>\n </AriaComboBox>\n </FieldLayout>\n )\n}\n"],"names":["ComboBox","className","description","errorMessage","id","isDisabled","isInvalid","isRequired","label","onChange","onBlur","options","placeholder","value","inputRef","shouldVisuallyHideLabel","name","props","t","useTranslation","inputId","errorMessageId","descriptionId","ariaDescribedBy","useFieldIds","container","useTheme","items","useMemo","option","jsx","FieldLayout","classNames","styles","jsxs","AriaComboBox","key","Button","Input","AlertCircle","CaretDown","Popover","ListBox","item","ListBoxItem"],"mappings":";;;;;;;;;;;;AAoBO,MAAMA,KAAW,CAAC;AAAA,EACvB,WAAAC;AAAA,EACA,aAAAC;AAAA,EACA,cAAAC;AAAA,EACA,IAAAC;AAAA,EACA,YAAAC;AAAA,EACA,WAAAC;AAAA,EACA,YAAAC;AAAA,EACA,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,QAAAC;AAAA,EACA,SAAAC;AAAA,EACA,aAAAC;AAAA,EACA,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,yBAAAC;AAAA,EACA,MAAAC;AAAA,EACA,GAAGC;AACL,MAAqB;AACb,QAAA,EAAE,GAAAC,EAAE,IAAIC,EAAe,GACvB,EAAE,SAAAC,GAAS,gBAAAC,GAAgB,eAAAC,GAAe,iBAAAC,EAAA,IAAoBC,EAAY;AAAA,IAC9E,SAASpB;AAAA,IACT,cAAAD;AAAA,IACA,aAAAD;AAAA,EAAA,CACD,GACK,EAAE,WAAAuB,EAAU,IAAIC,EAAS,GAEzBC,IAAQC,EAAQ,MACbjB,EAAQ,IAAI,CAAAkB,OAAW,EAAE,MAAMA,EAAO,OAAO,IAAIA,EAAO,MAAQ,EAAA,GACtE,CAAClB,CAAO,CAAC;AAGV,SAAA,gBAAAmB;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,OAAAvB;AAAA,MACA,SAASY;AAAA,MACT,cAAAjB;AAAA,MACA,gBAAAkB;AAAA,MACA,eAAAC;AAAA,MACA,YAAAf;AAAA,MACA,aAAAL;AAAA,MACA,yBAAAa;AAAA,MACA,WAAWiB,EAAWC,EAAO,MAAMhC,CAAS;AAAA,MAC5C,eAAe;AAAA,MAEf,UAAA,gBAAAiC;AAAA,QAACC;AAAAA,QAAA;AAAA,UACC,cAAY3B;AAAA,UACZ,oBAAkBe;AAAA,UAClB,WAAW;AAAA,UACX,YAAAlB;AAAA,UACA,WAAAC;AAAA,UACA,mBAAmB,CAAO8B,MAAA;AACxB,YAAIA,KACS3B,IAAA2B,EAAI,UAAU;AAAA,UAE7B;AAAA,UACA,IAAIhB;AAAA,UACJ,aAAaP,KAAyB;AAAA,UACtC,MAAAG;AAAA,UAEA,UAAA;AAAA,YAAA,gBAAAkB,EAACG,GACC,EAAA,UAAA;AAAA,cAAA,gBAAAP,EAACQ,KAAM,KAAKxB,GAAU,aAAAF,GAA0B,QAAAF,GAAiB,GAAGO,GAAO;AAAA,gCAC1E,OAAI,EAAA,eAAY,QAAO,WAAWgB,EAAO,OACvC,UAAA;AAAA,gBAAa3B,KAAA,gBAAAwB,EAACS,GAAY,EAAA,UAAU,GAAI,CAAA;AAAA,gBACxC,gBAAAT,EAAAU,GAAA,EAAU,OAAOtB,EAAE,mBAAmB,EAAG,CAAA;AAAA,cAAA,EAC5C,CAAA;AAAA,YAAA,GACF;AAAA,YAEA,gBAAAY;AAAA,cAACW;AAAA,cAAA;AAAA,gBACC,WAAWT,EAAWC,EAAO,SAAS,oBAAoB;AAAA,gBAC1D,0BAA0BR,EAAU;AAAA,gBACpC,WAAW;AAAA,gBAEX,UAAA,gBAAAK,EAACY,GAAQ,EAAA,OAAAf,GACN,UAAQ,CAAAgB,MAAA,gBAAAb,EAACc,KAA2B,UAAKD,EAAA,KAAA,GAAfA,EAAK,EAAe,EACjD,CAAA;AAAA,cAAA;AAAA,YAAA;AAAA,UACF;AAAA,QAAA;AAAA,MAAA;AAAA,IACF;AAAA,EACF;AAEJ;"}
1
+ {"version":3,"file":"ComboBox.js","sources":["../../../../../src/components/Common/UI/ComboBox/ComboBox.tsx"],"sourcesContent":["import type { Key } from 'react-aria-components'\nimport {\n ComboBox as AriaComboBox,\n Button,\n Input,\n ListBox,\n ListBoxItem,\n Popover,\n} from 'react-aria-components'\nimport { useTranslation } from 'react-i18next'\nimport { useMemo } from 'react'\nimport classNames from 'classnames'\nimport { useFieldIds } from '../hooks/useFieldIds'\nimport styles from './ComboBox.module.scss'\nimport type { ComboBoxProps } from './ComboBoxTypes'\nimport { FieldLayout } from '@/components/Common/FieldLayout'\nimport { useTheme } from '@/contexts/ThemeProvider'\nimport AlertCircle from '@/assets/icons/alert-circle.svg?react'\nimport CaretDown from '@/assets/icons/caret-down.svg?react'\n\nexport const ComboBox = ({\n className,\n description,\n errorMessage,\n id,\n isDisabled,\n isInvalid,\n isRequired,\n label,\n onChange,\n onBlur,\n options,\n placeholder,\n value,\n inputRef,\n shouldVisuallyHideLabel,\n name,\n ...props\n}: ComboBoxProps) => {\n const { t } = useTranslation()\n const { inputId, errorMessageId, descriptionId, ariaDescribedBy } = useFieldIds({\n inputId: id,\n errorMessage,\n description,\n })\n const { container } = useTheme()\n\n const items = useMemo(() => {\n return options.map(option => ({ name: option.label, id: option.value }))\n }, [options])\n\n return (\n <FieldLayout\n label={label}\n htmlFor={inputId}\n errorMessage={errorMessage}\n errorMessageId={errorMessageId}\n descriptionId={descriptionId}\n isRequired={isRequired}\n description={description}\n shouldVisuallyHideLabel={shouldVisuallyHideLabel}\n className={classNames(styles.root, className)}\n withErrorIcon={false}\n >\n <AriaComboBox\n aria-label={label}\n aria-describedby={ariaDescribedBy}\n className={'react-aria-ComboBox-root'}\n isDisabled={isDisabled}\n isInvalid={isInvalid}\n onSelectionChange={key => {\n if (key) {\n onChange?.(key.toString())\n }\n }}\n id={inputId}\n selectedKey={value ? (value as Key) : undefined}\n name={name}\n >\n <Button>\n <Input ref={inputRef} placeholder={placeholder} onBlur={onBlur} {...props} />\n <div aria-hidden=\"true\" className={styles.icons}>\n {isInvalid && <AlertCircle fontSize={16} />}\n <CaretDown title={t('icons.selectArrow')} />\n </div>\n </Button>\n\n <Popover\n className={classNames(styles.popover, 'react-aria-Popover')}\n UNSTABLE_portalContainer={container.current}\n maxHeight={320}\n >\n <ListBox items={items}>\n {item => <ListBoxItem key={item.id}>{item.name}</ListBoxItem>}\n </ListBox>\n </Popover>\n </AriaComboBox>\n </FieldLayout>\n )\n}\n"],"names":["ComboBox","className","description","errorMessage","id","isDisabled","isInvalid","isRequired","label","onChange","onBlur","options","placeholder","value","inputRef","shouldVisuallyHideLabel","name","props","t","useTranslation","inputId","errorMessageId","descriptionId","ariaDescribedBy","useFieldIds","container","useTheme","items","useMemo","option","jsx","FieldLayout","classNames","styles","jsxs","AriaComboBox","key","Button","Input","AlertCircle","CaretDown","Popover","ListBox","item","ListBoxItem"],"mappings":";;;;;;;;;;;;AAoBO,MAAMA,KAAW,CAAC;AAAA,EACvB,WAAAC;AAAA,EACA,aAAAC;AAAA,EACA,cAAAC;AAAA,EACA,IAAAC;AAAA,EACA,YAAAC;AAAA,EACA,WAAAC;AAAA,EACA,YAAAC;AAAA,EACA,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,QAAAC;AAAA,EACA,SAAAC;AAAA,EACA,aAAAC;AAAA,EACA,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,yBAAAC;AAAA,EACA,MAAAC;AAAA,EACA,GAAGC;AACL,MAAqB;AACb,QAAA,EAAE,GAAAC,EAAE,IAAIC,EAAe,GACvB,EAAE,SAAAC,GAAS,gBAAAC,GAAgB,eAAAC,GAAe,iBAAAC,EAAA,IAAoBC,EAAY;AAAA,IAC9E,SAASpB;AAAA,IACT,cAAAD;AAAA,IACA,aAAAD;AAAA,EAAA,CACD,GACK,EAAE,WAAAuB,EAAU,IAAIC,EAAS,GAEzBC,IAAQC,EAAQ,MACbjB,EAAQ,IAAI,CAAAkB,OAAW,EAAE,MAAMA,EAAO,OAAO,IAAIA,EAAO,MAAQ,EAAA,GACtE,CAAClB,CAAO,CAAC;AAGV,SAAA,gBAAAmB;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,OAAAvB;AAAA,MACA,SAASY;AAAA,MACT,cAAAjB;AAAA,MACA,gBAAAkB;AAAA,MACA,eAAAC;AAAA,MACA,YAAAf;AAAA,MACA,aAAAL;AAAA,MACA,yBAAAa;AAAA,MACA,WAAWiB,EAAWC,EAAO,MAAMhC,CAAS;AAAA,MAC5C,eAAe;AAAA,MAEf,UAAA,gBAAAiC;AAAA,QAACC;AAAAA,QAAA;AAAA,UACC,cAAY3B;AAAA,UACZ,oBAAkBe;AAAA,UAClB,WAAW;AAAA,UACX,YAAAlB;AAAA,UACA,WAAAC;AAAA,UACA,mBAAmB,CAAO8B,MAAA;AACxB,YAAIA,KACS3B,IAAA2B,EAAI,UAAU;AAAA,UAE7B;AAAA,UACA,IAAIhB;AAAA,UACJ,aAAaP,KAAyB;AAAA,UACtC,MAAAG;AAAA,UAEA,UAAA;AAAA,YAAA,gBAAAkB,EAACG,GACC,EAAA,UAAA;AAAA,cAAA,gBAAAP,EAACQ,KAAM,KAAKxB,GAAU,aAAAF,GAA0B,QAAAF,GAAiB,GAAGO,GAAO;AAAA,gCAC1E,OAAI,EAAA,eAAY,QAAO,WAAWgB,EAAO,OACvC,UAAA;AAAA,gBAAa3B,KAAA,gBAAAwB,EAACS,GAAY,EAAA,UAAU,GAAI,CAAA;AAAA,gBACxC,gBAAAT,EAAAU,GAAA,EAAU,OAAOtB,EAAE,mBAAmB,EAAG,CAAA;AAAA,cAAA,EAC5C,CAAA;AAAA,YAAA,GACF;AAAA,YAEA,gBAAAY;AAAA,cAACW;AAAA,cAAA;AAAA,gBACC,WAAWT,EAAWC,EAAO,SAAS,oBAAoB;AAAA,gBAC1D,0BAA0BR,EAAU;AAAA,gBACpC,WAAW;AAAA,gBAEX,UAAA,gBAAAK,EAACY,GAAQ,EAAA,OAAAf,GACN,UAAQ,CAAAgB,MAAA,gBAAAb,EAACc,KAA2B,UAAKD,EAAA,KAAA,GAAfA,EAAK,EAAe,EACjD,CAAA;AAAA,cAAA;AAAA,YAAA;AAAA,UACF;AAAA,QAAA;AAAA,MAAA;AAAA,IACF;AAAA,EACF;AAEJ;"}
@@ -1,16 +1,46 @@
1
1
  import { InputHTMLAttributes, Ref, FocusEvent } from 'react';
2
- import { SharedFieldLayoutProps } from '../FieldLayout/FieldLayoutTypes';
2
+ import { SharedFieldLayoutProps } from '../../FieldLayout/FieldLayoutTypes';
3
3
  export interface ComboBoxOption {
4
+ /**
5
+ * Display text for the option
6
+ */
4
7
  label: string;
8
+ /**
9
+ * Value of the option that will be passed to onChange
10
+ */
5
11
  value: string;
6
12
  }
7
13
  export interface ComboBoxProps extends SharedFieldLayoutProps, Pick<InputHTMLAttributes<HTMLInputElement>, 'className' | 'id' | 'name' | 'placeholder'> {
14
+ /**
15
+ * Disables the combo box and prevents interaction
16
+ */
8
17
  isDisabled?: boolean;
18
+ /**
19
+ * Indicates that the field has an error
20
+ */
9
21
  isInvalid?: boolean;
22
+ /**
23
+ * Label text for the combo box field
24
+ */
10
25
  label: string;
26
+ /**
27
+ * Callback when selection changes
28
+ */
11
29
  onChange?: (value: string) => void;
30
+ /**
31
+ * Handler for blur events
32
+ */
12
33
  onBlur?: (e: FocusEvent) => void;
34
+ /**
35
+ * Array of options to display in the dropdown
36
+ */
13
37
  options: ComboBoxOption[];
38
+ /**
39
+ * Currently selected value
40
+ */
14
41
  value?: string;
42
+ /**
43
+ * React ref for the combo box input element
44
+ */
15
45
  inputRef?: Ref<HTMLInputElement>;
16
46
  }
@@ -5,15 +5,15 @@ import u from "classnames";
5
5
  import { parseDate as H } from "@internationalized/date";
6
6
  import { useFieldIds as R } from "../hooks/useFieldIds.js";
7
7
  import i from "./DatePicker.module.scss.js";
8
+ import { FieldLayout as U } from "../../FieldLayout/FieldLayout.js";
8
9
  import "react";
9
- import { useTheme as U } from "../../../../contexts/ThemeProvider/useTheme.js";
10
+ import { useTheme as _ } from "../../../../contexts/ThemeProvider/useTheme.js";
10
11
  /* empty css */
11
- import _ from "../../../../assets/icons/caret-down.svg.js";
12
- import $ from "../../../../assets/icons/caret-right.svg.js";
13
- import q from "../../../../assets/icons/caret-left.svg.js";
14
- import J from "../../../../assets/icons/alert-circle.svg.js";
15
- import { formatDateToStringDate as K } from "../../../../helpers/dateFormatting.js";
16
- import { FieldLayout as O } from "../FieldLayout/FieldLayout.js";
12
+ import $ from "../../../../assets/icons/caret-down.svg.js";
13
+ import q from "../../../../assets/icons/caret-right.svg.js";
14
+ import J from "../../../../assets/icons/caret-left.svg.js";
15
+ import K from "../../../../assets/icons/alert-circle.svg.js";
16
+ import { formatDateToStringDate as O } from "../../../../helpers/dateFormatting.js";
17
17
  function Q(e) {
18
18
  return e ? new Date(
19
19
  e.year,
@@ -41,11 +41,11 @@ const dr = ({
41
41
  inputId: D,
42
42
  errorMessage: l,
43
43
  description: n
44
- }), { container: P } = U(), f = p ? K(p) : "", T = f ? H(f) : null, w = (t) => {
44
+ }), { container: P } = _(), f = p ? O(p) : "", T = f ? H(f) : null, w = (t) => {
45
45
  d && d(Q(t));
46
46
  };
47
47
  return /* @__PURE__ */ r(
48
- O,
48
+ U,
49
49
  {
50
50
  label: s,
51
51
  htmlFor: h,
@@ -71,8 +71,8 @@ const dr = ({
71
71
  /* @__PURE__ */ o(k, { children: [
72
72
  /* @__PURE__ */ r(A, { ref: g, children: (t) => /* @__PURE__ */ r(B, { segment: t }) }),
73
73
  /* @__PURE__ */ o("div", { className: i.icons, children: [
74
- m && /* @__PURE__ */ r(J, { "aria-hidden": "true", fontSize: 16 }),
75
- /* @__PURE__ */ r(c, { onBlur: S, children: /* @__PURE__ */ r(_, { title: a("icons.calendarArrow") }) })
74
+ m && /* @__PURE__ */ r(K, { "aria-hidden": "true", fontSize: 16 }),
75
+ /* @__PURE__ */ r(c, { onBlur: S, children: /* @__PURE__ */ r($, { title: a("icons.calendarArrow") }) })
76
76
  ] })
77
77
  ] }),
78
78
  /* @__PURE__ */ r(
@@ -82,9 +82,9 @@ const dr = ({
82
82
  UNSTABLE_portalContainer: P.current,
83
83
  children: /* @__PURE__ */ r(L, { children: /* @__PURE__ */ o(j, { children: [
84
84
  /* @__PURE__ */ o("header", { children: [
85
- /* @__PURE__ */ r(c, { slot: "previous", children: /* @__PURE__ */ r(q, { title: a("icons.previousMonth") }) }),
85
+ /* @__PURE__ */ r(c, { slot: "previous", children: /* @__PURE__ */ r(J, { title: a("icons.previousMonth") }) }),
86
86
  /* @__PURE__ */ r(E, {}),
87
- /* @__PURE__ */ r(c, { slot: "next", children: /* @__PURE__ */ r($, { title: a("icons.nextMonth") }) })
87
+ /* @__PURE__ */ r(c, { slot: "next", children: /* @__PURE__ */ r(q, { title: a("icons.nextMonth") }) })
88
88
  ] }),
89
89
  /* @__PURE__ */ r(G, { children: (t) => /* @__PURE__ */ r(M, { date: t }) })
90
90
  ] }) })
@@ -1 +1 @@
1
- {"version":3,"file":"DatePicker.js","sources":["../../../../../src/components/Common/UI/DatePicker/DatePicker.tsx"],"sourcesContent":["import {\n DatePicker as AriaDatePicker,\n Button,\n Calendar,\n CalendarCell,\n CalendarGrid,\n DateInput,\n DateSegment,\n Dialog,\n Group,\n Heading,\n Popover,\n type DateValue,\n} from 'react-aria-components'\nimport { useTranslation } from 'react-i18next'\nimport classNames from 'classnames'\nimport { parseDate } from '@internationalized/date'\nimport { FieldLayout } from '../FieldLayout'\nimport { useFieldIds } from '../hooks/useFieldIds'\nimport styles from './DatePicker.module.scss'\nimport type { DatePickerProps } from './DatePickerTypes'\nimport { useTheme } from '@/contexts/ThemeProvider'\nimport CaretDown from '@/assets/icons/caret-down.svg?react'\nimport CaretRight from '@/assets/icons/caret-right.svg?react'\nimport CaretLeft from '@/assets/icons/caret-left.svg?react'\nimport AlertCircle from '@/assets/icons/alert-circle.svg?react'\nimport { formatDateToStringDate } from '@/helpers/dateFormatting'\n\nfunction calendarDateValueToDate(dateValue: DateValue | null): Date | null {\n if (!dateValue) return null\n\n const date = new Date(\n dateValue.year,\n dateValue.month - 1, // DateValue months are 1-indexed\n dateValue.day,\n )\n\n return date\n}\n\nexport const DatePicker = ({\n className,\n description,\n errorMessage,\n id,\n inputRef,\n isDisabled,\n isInvalid,\n isRequired,\n label,\n onChange,\n onBlur,\n value,\n ...props\n}: DatePickerProps) => {\n const { t } = useTranslation()\n const { inputId, errorMessageId, descriptionId, ariaDescribedBy } = useFieldIds({\n inputId: id,\n errorMessage,\n description,\n })\n const { container } = useTheme()\n\n // Convert JavaScript Date to DateValue for internal use\n // Format the date as YYYY-MM-DD for parseDate\n const formattedDate = value ? formatDateToStringDate(value) : ''\n const internalValue = formattedDate ? parseDate(formattedDate) : null\n\n // Handle internal onChange to convert DateValue back to Date\n const handleChange = (dateValue: DateValue | null) => {\n if (onChange) {\n onChange(calendarDateValueToDate(dateValue))\n }\n }\n\n return (\n <FieldLayout\n label={label}\n htmlFor={inputId}\n errorMessage={errorMessage}\n errorMessageId={errorMessageId}\n descriptionId={descriptionId}\n isRequired={isRequired}\n description={description}\n className={classNames(styles.root, className)}\n withErrorIcon={false}\n >\n <div className={styles.container}>\n <AriaDatePicker\n aria-label={label}\n aria-describedby={ariaDescribedBy}\n id={inputId}\n isDisabled={isDisabled}\n isInvalid={isInvalid}\n value={internalValue}\n onChange={handleChange}\n {...props}\n >\n <Group>\n <DateInput ref={inputRef}>{segment => <DateSegment segment={segment} />}</DateInput>\n\n <div className={styles.icons}>\n {isInvalid && <AlertCircle aria-hidden=\"true\" fontSize={16} />}\n <Button onBlur={onBlur}>\n <CaretDown title={t('icons.calendarArrow')} />\n </Button>\n </div>\n </Group>\n <Popover\n className={classNames(styles.popover, 'react-aria-Popover')}\n UNSTABLE_portalContainer={container.current}\n >\n <Dialog>\n <Calendar>\n <header>\n <Button slot=\"previous\">\n <CaretLeft title={t('icons.previousMonth')} />\n </Button>\n <Heading />\n <Button slot=\"next\">\n <CaretRight title={t('icons.nextMonth')} />\n </Button>\n </header>\n <CalendarGrid>{date => <CalendarCell date={date} />}</CalendarGrid>\n </Calendar>\n </Dialog>\n </Popover>\n </AriaDatePicker>\n </div>\n </FieldLayout>\n )\n}\n"],"names":["calendarDateValueToDate","dateValue","DatePicker","className","description","errorMessage","id","inputRef","isDisabled","isInvalid","isRequired","label","onChange","onBlur","value","props","t","useTranslation","inputId","errorMessageId","descriptionId","ariaDescribedBy","useFieldIds","container","useTheme","formattedDate","formatDateToStringDate","internalValue","parseDate","handleChange","jsx","FieldLayout","classNames","styles","jsxs","AriaDatePicker","Group","DateInput","DateSegment","segment","AlertCircle","Button","CaretDown","Popover","Dialog","Calendar","CaretLeft","Heading","CaretRight","CalendarGrid","date","CalendarCell"],"mappings":"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"}
1
+ {"version":3,"file":"DatePicker.js","sources":["../../../../../src/components/Common/UI/DatePicker/DatePicker.tsx"],"sourcesContent":["import {\n DatePicker as AriaDatePicker,\n Button,\n Calendar,\n CalendarCell,\n CalendarGrid,\n DateInput,\n DateSegment,\n Dialog,\n Group,\n Heading,\n Popover,\n type DateValue,\n} from 'react-aria-components'\nimport { useTranslation } from 'react-i18next'\nimport classNames from 'classnames'\nimport { parseDate } from '@internationalized/date'\nimport { useFieldIds } from '../hooks/useFieldIds'\nimport styles from './DatePicker.module.scss'\nimport type { DatePickerProps } from './DatePickerTypes'\nimport { FieldLayout } from '@/components/Common/FieldLayout'\nimport { useTheme } from '@/contexts/ThemeProvider'\nimport CaretDown from '@/assets/icons/caret-down.svg?react'\nimport CaretRight from '@/assets/icons/caret-right.svg?react'\nimport CaretLeft from '@/assets/icons/caret-left.svg?react'\nimport AlertCircle from '@/assets/icons/alert-circle.svg?react'\nimport { formatDateToStringDate } from '@/helpers/dateFormatting'\n\nfunction calendarDateValueToDate(dateValue: DateValue | null): Date | null {\n if (!dateValue) return null\n\n const date = new Date(\n dateValue.year,\n dateValue.month - 1, // DateValue months are 1-indexed\n dateValue.day,\n )\n\n return date\n}\n\nexport const DatePicker = ({\n className,\n description,\n errorMessage,\n id,\n inputRef,\n isDisabled,\n isInvalid,\n isRequired,\n label,\n onChange,\n onBlur,\n value,\n ...props\n}: DatePickerProps) => {\n const { t } = useTranslation()\n const { inputId, errorMessageId, descriptionId, ariaDescribedBy } = useFieldIds({\n inputId: id,\n errorMessage,\n description,\n })\n const { container } = useTheme()\n\n // Convert JavaScript Date to DateValue for internal use\n // Format the date as YYYY-MM-DD for parseDate\n const formattedDate = value ? formatDateToStringDate(value) : ''\n const internalValue = formattedDate ? parseDate(formattedDate) : null\n\n // Handle internal onChange to convert DateValue back to Date\n const handleChange = (dateValue: DateValue | null) => {\n if (onChange) {\n onChange(calendarDateValueToDate(dateValue))\n }\n }\n\n return (\n <FieldLayout\n label={label}\n htmlFor={inputId}\n errorMessage={errorMessage}\n errorMessageId={errorMessageId}\n descriptionId={descriptionId}\n isRequired={isRequired}\n description={description}\n className={classNames(styles.root, className)}\n withErrorIcon={false}\n >\n <div className={styles.container}>\n <AriaDatePicker\n aria-label={label}\n aria-describedby={ariaDescribedBy}\n id={inputId}\n isDisabled={isDisabled}\n isInvalid={isInvalid}\n value={internalValue}\n onChange={handleChange}\n {...props}\n >\n <Group>\n <DateInput ref={inputRef}>{segment => <DateSegment segment={segment} />}</DateInput>\n\n <div className={styles.icons}>\n {isInvalid && <AlertCircle aria-hidden=\"true\" fontSize={16} />}\n <Button onBlur={onBlur}>\n <CaretDown title={t('icons.calendarArrow')} />\n </Button>\n </div>\n </Group>\n <Popover\n className={classNames(styles.popover, 'react-aria-Popover')}\n UNSTABLE_portalContainer={container.current}\n >\n <Dialog>\n <Calendar>\n <header>\n <Button slot=\"previous\">\n <CaretLeft title={t('icons.previousMonth')} />\n </Button>\n <Heading />\n <Button slot=\"next\">\n <CaretRight title={t('icons.nextMonth')} />\n </Button>\n </header>\n <CalendarGrid>{date => <CalendarCell date={date} />}</CalendarGrid>\n </Calendar>\n </Dialog>\n </Popover>\n </AriaDatePicker>\n </div>\n </FieldLayout>\n )\n}\n"],"names":["calendarDateValueToDate","dateValue","DatePicker","className","description","errorMessage","id","inputRef","isDisabled","isInvalid","isRequired","label","onChange","onBlur","value","props","t","useTranslation","inputId","errorMessageId","descriptionId","ariaDescribedBy","useFieldIds","container","useTheme","formattedDate","formatDateToStringDate","internalValue","parseDate","handleChange","jsx","FieldLayout","classNames","styles","jsxs","AriaDatePicker","Group","DateInput","DateSegment","segment","AlertCircle","Button","CaretDown","Popover","Dialog","Calendar","CaretLeft","Heading","CaretRight","CalendarGrid","date","CalendarCell"],"mappings":"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"}
@@ -1,12 +1,36 @@
1
1
  import { InputHTMLAttributes, Ref, FocusEvent } from 'react';
2
- import { SharedFieldLayoutProps } from '../FieldLayout/FieldLayoutTypes';
2
+ import { SharedFieldLayoutProps } from '../../FieldLayout/FieldLayoutTypes';
3
3
  export interface DatePickerProps extends SharedFieldLayoutProps, Pick<InputHTMLAttributes<HTMLInputElement>, 'className' | 'id' | 'name'> {
4
+ /**
5
+ * React ref for the date input element
6
+ */
4
7
  inputRef?: Ref<HTMLInputElement>;
8
+ /**
9
+ * Disables the date picker and prevents interaction
10
+ */
5
11
  isDisabled?: boolean;
12
+ /**
13
+ * Indicates that the field has an error
14
+ */
6
15
  isInvalid?: boolean;
16
+ /**
17
+ * Callback when selected date changes
18
+ */
7
19
  onChange?: (value: Date | null) => void;
20
+ /**
21
+ * Handler for blur events
22
+ */
8
23
  onBlur?: (e: FocusEvent) => void;
24
+ /**
25
+ * Label text for the date picker field
26
+ */
9
27
  label: string;
28
+ /**
29
+ * Currently selected date value
30
+ */
10
31
  value?: Date | null;
32
+ /**
33
+ * Placeholder text when no date is selected
34
+ */
11
35
  placeholder?: string;
12
36
  }
@@ -1 +1,2 @@
1
+ import "./types/i18next.d.ts"
1
2
  export * from './DatePicker';
@@ -1,7 +1,19 @@
1
1
  import { HTMLAttributes, ReactNode } from 'react';
2
2
  export interface HeadingProps extends Pick<HTMLAttributes<HTMLHeadingElement>, 'className'> {
3
+ /**
4
+ * The HTML heading element to render (h1-h6)
5
+ */
3
6
  as: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
7
+ /**
8
+ * Optional visual style to apply, independent of the semantic heading level
9
+ */
4
10
  styledAs?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
11
+ /**
12
+ * Text alignment within the heading
13
+ */
5
14
  textAlign?: 'start' | 'center' | 'end';
15
+ /**
16
+ * Content to be displayed inside the heading
17
+ */
6
18
  children?: ReactNode;
7
19
  }
@@ -1,2 +1,3 @@
1
+ import "./types/i18next.d.ts"
1
2
  export { Heading } from './Heading';
2
3
  export type { HeadingProps } from './HeadingTypes';
@@ -1,2 +1,3 @@
1
+ import "./types/i18next.d.ts"
1
2
  export { Input } from './Input';
2
3
  export type { InputProps } from './InputTypes';
@@ -1,2 +1,54 @@
1
1
  import { AnchorHTMLAttributes } from 'react';
2
- export type LinkProps = Pick<AnchorHTMLAttributes<HTMLAnchorElement>, 'href' | 'target' | 'rel' | 'download' | 'children' | 'className' | 'id' | 'onKeyDown' | 'onKeyUp' | 'aria-label' | 'aria-labelledby' | 'aria-describedby' | 'title'>;
2
+ export type LinkProps = Pick<AnchorHTMLAttributes<HTMLAnchorElement>,
3
+ /**
4
+ * URL that the link points to
5
+ */
6
+ 'href'
7
+ /**
8
+ * Specifies where to open the linked document
9
+ */
10
+ | 'target'
11
+ /**
12
+ * Specifies the relationship between the current document and the linked document
13
+ */
14
+ | 'rel'
15
+ /**
16
+ * Indicates that the link is for downloading a resource
17
+ */
18
+ | 'download'
19
+ /**
20
+ * Content to be displayed inside the link
21
+ */
22
+ | 'children'
23
+ /**
24
+ * Additional CSS class name
25
+ */
26
+ | 'className'
27
+ /**
28
+ * Unique identifier for the link
29
+ */
30
+ | 'id'
31
+ /**
32
+ * Handler for key down events
33
+ */
34
+ | 'onKeyDown'
35
+ /**
36
+ * Handler for key up events
37
+ */
38
+ | 'onKeyUp'
39
+ /**
40
+ * Accessible label for the link
41
+ */
42
+ | 'aria-label'
43
+ /**
44
+ * ID of an element that labels this link
45
+ */
46
+ | 'aria-labelledby'
47
+ /**
48
+ * ID of an element that describes this link
49
+ */
50
+ | 'aria-describedby'
51
+ /**
52
+ * Title text shown on hover
53
+ */
54
+ | 'title'>;
@@ -1 +1,2 @@
1
+ import "./types/i18next.d.ts"
1
2
  export { Link } from './Link';
@@ -1,4 +1,4 @@
1
- import { HTMLAttributes, ReactNode } from 'react';
1
+ import { ReactNode } from 'react';
2
2
  export interface BaseListProps {
3
3
  /**
4
4
  * The list items to render
@@ -21,7 +21,5 @@ export interface BaseListProps {
21
21
  */
22
22
  'aria-describedby'?: string;
23
23
  }
24
- export interface UnorderedListProps extends BaseListProps, HTMLAttributes<HTMLUListElement> {
25
- }
26
- export interface OrderedListProps extends BaseListProps, HTMLAttributes<HTMLOListElement> {
27
- }
24
+ export type UnorderedListProps = BaseListProps;
25
+ export type OrderedListProps = BaseListProps;
@@ -1,3 +1,4 @@
1
+ import "./types/i18next.d.ts"
1
2
  export { OrderedList } from './OrderedList';
2
3
  export { UnorderedList } from './UnorderedList';
3
4
  export type { BaseListProps, OrderedListProps, UnorderedListProps } from './ListTypes';
@@ -1,16 +1,46 @@
1
1
  import { ReactNode, RefObject } from 'react';
2
2
  import { DataAttributes } from '../../../../types/Helpers';
3
3
  export interface MenuItem extends DataAttributes {
4
+ /**
5
+ * Text label for the menu item
6
+ */
4
7
  label: string;
8
+ /**
9
+ * Optional icon to display before the label
10
+ */
5
11
  icon?: ReactNode;
12
+ /**
13
+ * Callback function when the menu item is clicked
14
+ */
6
15
  onClick: () => void;
16
+ /**
17
+ * Disables the menu item and prevents interaction
18
+ */
7
19
  isDisabled?: boolean;
20
+ /**
21
+ * Optional URL to navigate to when clicked
22
+ */
8
23
  href?: string;
9
24
  }
10
25
  export interface MenuProps extends DataAttributes {
26
+ /**
27
+ * Reference to the element that triggers the menu
28
+ */
11
29
  triggerRef?: RefObject<Element | null>;
30
+ /**
31
+ * Array of menu items to display
32
+ */
12
33
  items?: MenuItem[];
34
+ /**
35
+ * Controls whether the menu is currently open
36
+ */
13
37
  isOpen?: boolean;
38
+ /**
39
+ * Callback when the menu is closed
40
+ */
14
41
  onClose?: () => void;
42
+ /**
43
+ * Accessible label describing the menu's purpose
44
+ */
15
45
  'aria-label': string;
16
46
  }
@@ -1 +1,2 @@
1
+ import "./types/i18next.d.ts"
1
2
  export { Menu } from './Menu';
@@ -4,8 +4,8 @@ import { NumberField as P, Group as T } from "react-aria-components";
4
4
  import k from "classnames";
5
5
  import { useFieldIds as z } from "../hooks/useFieldIds.js";
6
6
  import A from "./NumberInput.module.scss.js";
7
- import { useLocale as C } from "../../../../contexts/LocaleProvider/useLocale.js";
8
- import { FieldLayout as H } from "../FieldLayout/FieldLayout.js";
7
+ import { FieldLayout as C } from "../../FieldLayout/FieldLayout.js";
8
+ import { useLocale as H } from "../../../../contexts/LocaleProvider/useLocale.js";
9
9
  import { Input as J } from "../Input/Input.js";
10
10
  function q({
11
11
  name: y,
@@ -32,7 +32,7 @@ function q({
32
32
  minimumFractionDigits: B,
33
33
  ...u
34
34
  }) {
35
- const { locale: a, currency: n } = C(), { inputId: s, errorMessageId: E, descriptionId: L, ariaDescribedBy: S } = z({
35
+ const { locale: a, currency: n } = H(), { inputId: s, errorMessageId: E, descriptionId: L, ariaDescribedBy: S } = z({
36
36
  inputId: p,
37
37
  errorMessage: c,
38
38
  description: i
@@ -41,7 +41,7 @@ function q({
41
41
  currency: n
42
42
  }).formatToParts(0).find((M) => M.type === "currency")?.value, [n, a]);
43
43
  return /* @__PURE__ */ e(
44
- H,
44
+ C,
45
45
  {
46
46
  label: h,
47
47
  description: i,
@@ -1 +1 @@
1
- {"version":3,"file":"NumberInput.js","sources":["../../../../../src/components/Common/UI/NumberInput/NumberInput.tsx"],"sourcesContent":["import { useMemo } from 'react'\nimport { Group, NumberField as AriaNumberField } from 'react-aria-components'\nimport classNames from 'classnames'\nimport { FieldLayout } from '../FieldLayout'\nimport { Input } from '../Input'\nimport { useFieldIds } from '../hooks/useFieldIds'\nimport styles from './NumberInput.module.scss'\nimport type { NumberInputProps } from './NumberInputTypes'\nimport { useLocale } from '@/contexts/LocaleProvider'\n\nexport function NumberInput({\n name,\n format,\n inputRef,\n id,\n value,\n description,\n errorMessage,\n isRequired,\n placeholder,\n isInvalid,\n isDisabled,\n onChange,\n onBlur,\n label,\n min,\n max,\n shouldVisuallyHideLabel,\n adornmentStart,\n adornmentEnd,\n className,\n maximumFractionDigits,\n minimumFractionDigits,\n ...props\n}: NumberInputProps) {\n const { locale, currency } = useLocale()\n const { inputId, errorMessageId, descriptionId, ariaDescribedBy } = useFieldIds({\n inputId: id,\n errorMessage,\n description,\n })\n\n const minValue = typeof min === 'string' ? Number(min) : min\n const maxValue = typeof max === 'string' ? Number(max) : max\n\n const currencySymbol = useMemo(() => {\n return new Intl.NumberFormat(locale, {\n style: 'currency',\n currency,\n })\n .formatToParts(0)\n .find(part => part.type === 'currency')?.value\n }, [currency, locale])\n\n return (\n <FieldLayout\n label={label}\n description={description}\n errorMessage={errorMessage}\n isRequired={isRequired}\n htmlFor={inputId}\n errorMessageId={errorMessageId}\n descriptionId={descriptionId}\n shouldVisuallyHideLabel={shouldVisuallyHideLabel}\n className={classNames(styles.root, className)}\n withErrorIcon={false}\n {...props}\n >\n <AriaNumberField\n value={value}\n name={name}\n formatOptions={{\n style: 'decimal',\n minimumFractionDigits: format === 'currency' ? 2 : minimumFractionDigits,\n maximumFractionDigits: format === 'currency' ? 2 : maximumFractionDigits,\n currency,\n currencyDisplay: 'symbol',\n }}\n isInvalid={isInvalid}\n isDisabled={isDisabled}\n isRequired={isRequired}\n validationBehavior=\"aria\"\n onChange={onChange}\n // This is a hack to silence an unnecessary react-aria warning. The FieldLayout component\n // already associates the label and input with htmlFor + ID. If we include a label id here,\n // the label will get read twice by assistive tech. This evaluates to an empty string which\n // does not get associated with any elements and does not get read.\n aria-labelledby=\" \"\n minValue={minValue}\n maxValue={maxValue}\n {...props}\n >\n <Group>\n <Input\n adornmentStart={adornmentStart || (format === 'currency' ? currencySymbol : null)}\n adornmentEnd={adornmentEnd || (format === 'percent' ? '%' : null)}\n id={inputId}\n inputRef={inputRef}\n onBlur={onBlur}\n placeholder={placeholder}\n aria-describedby={ariaDescribedBy}\n isDisabled={isDisabled}\n />\n </Group>\n </AriaNumberField>\n </FieldLayout>\n )\n}\n"],"names":["NumberInput","name","format","inputRef","id","value","description","errorMessage","isRequired","placeholder","isInvalid","isDisabled","onChange","onBlur","label","min","max","shouldVisuallyHideLabel","adornmentStart","adornmentEnd","className","maximumFractionDigits","minimumFractionDigits","props","locale","currency","useLocale","inputId","errorMessageId","descriptionId","ariaDescribedBy","useFieldIds","minValue","maxValue","currencySymbol","useMemo","part","jsx","FieldLayout","classNames","styles","AriaNumberField","Group","Input"],"mappings":";;;;;;;;;AAUO,SAASA,EAAY;AAAA,EAC1B,MAAAC;AAAA,EACA,QAAAC;AAAA,EACA,UAAAC;AAAA,EACA,IAAAC;AAAA,EACA,OAAAC;AAAA,EACA,aAAAC;AAAA,EACA,cAAAC;AAAA,EACA,YAAAC;AAAA,EACA,aAAAC;AAAA,EACA,WAAAC;AAAA,EACA,YAAAC;AAAA,EACA,UAAAC;AAAA,EACA,QAAAC;AAAA,EACA,OAAAC;AAAA,EACA,KAAAC;AAAA,EACA,KAAAC;AAAA,EACA,yBAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,cAAAC;AAAA,EACA,WAAAC;AAAA,EACA,uBAAAC;AAAA,EACA,uBAAAC;AAAA,EACA,GAAGC;AACL,GAAqB;AACnB,QAAM,EAAE,QAAAC,GAAQ,UAAAC,EAAS,IAAIC,EAAU,GACjC,EAAE,SAAAC,GAAS,gBAAAC,GAAgB,eAAAC,GAAe,iBAAAC,EAAA,IAAoBC,EAAY;AAAA,IAC9E,SAAS3B;AAAA,IACT,cAAAG;AAAA,IACA,aAAAD;AAAA,EAAA,CACD,GAEK0B,IAAW,OAAOjB,KAAQ,WAAW,OAAOA,CAAG,IAAIA,GACnDkB,IAAW,OAAOjB,KAAQ,WAAW,OAAOA,CAAG,IAAIA,GAEnDkB,IAAiBC,EAAQ,MACtB,IAAI,KAAK,aAAaX,GAAQ;AAAA,IACnC,OAAO;AAAA,IACP,UAAAC;AAAA,EAAA,CACD,EACE,cAAc,CAAC,EACf,KAAK,CAAQW,MAAAA,EAAK,SAAS,UAAU,GAAG,OAC1C,CAACX,GAAUD,CAAM,CAAC;AAGnB,SAAA,gBAAAa;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,OAAAxB;AAAA,MACA,aAAAR;AAAA,MACA,cAAAC;AAAA,MACA,YAAAC;AAAA,MACA,SAASmB;AAAA,MACT,gBAAAC;AAAA,MACA,eAAAC;AAAA,MACA,yBAAAZ;AAAA,MACA,WAAWsB,EAAWC,EAAO,MAAMpB,CAAS;AAAA,MAC5C,eAAe;AAAA,MACd,GAAGG;AAAA,MAEJ,UAAA,gBAAAc;AAAA,QAACI;AAAAA,QAAA;AAAA,UACC,OAAApC;AAAA,UACA,MAAAJ;AAAA,UACA,eAAe;AAAA,YACb,OAAO;AAAA,YACP,uBAAuBC,MAAW,aAAa,IAAIoB;AAAA,YACnD,uBAAuBpB,MAAW,aAAa,IAAImB;AAAA,YACnD,UAAAI;AAAA,YACA,iBAAiB;AAAA,UACnB;AAAA,UACA,WAAAf;AAAA,UACA,YAAAC;AAAA,UACA,YAAAH;AAAA,UACA,oBAAmB;AAAA,UACnB,UAAAI;AAAA,UAKA,mBAAgB;AAAA,UAChB,UAAAoB;AAAA,UACA,UAAAC;AAAA,UACC,GAAGV;AAAA,UAEJ,4BAACmB,GACC,EAAA,UAAA,gBAAAL;AAAA,YAACM;AAAA,YAAA;AAAA,cACC,gBAAgBzB,MAAmBhB,MAAW,aAAagC,IAAiB;AAAA,cAC5E,cAAcf,MAAiBjB,MAAW,YAAY,MAAM;AAAA,cAC5D,IAAIyB;AAAA,cACJ,UAAAxB;AAAA,cACA,QAAAU;AAAA,cACA,aAAAJ;AAAA,cACA,oBAAkBqB;AAAA,cAClB,YAAAnB;AAAA,YAAA;AAAA,UAAA,EAEJ,CAAA;AAAA,QAAA;AAAA,MAAA;AAAA,IACF;AAAA,EACF;AAEJ;"}
1
+ {"version":3,"file":"NumberInput.js","sources":["../../../../../src/components/Common/UI/NumberInput/NumberInput.tsx"],"sourcesContent":["import { useMemo } from 'react'\nimport { Group, NumberField as AriaNumberField } from 'react-aria-components'\nimport classNames from 'classnames'\nimport { Input } from '../Input'\nimport { useFieldIds } from '../hooks/useFieldIds'\nimport styles from './NumberInput.module.scss'\nimport type { NumberInputProps } from './NumberInputTypes'\nimport { FieldLayout } from '@/components/Common/FieldLayout'\nimport { useLocale } from '@/contexts/LocaleProvider'\n\nexport function NumberInput({\n name,\n format,\n inputRef,\n id,\n value,\n description,\n errorMessage,\n isRequired,\n placeholder,\n isInvalid,\n isDisabled,\n onChange,\n onBlur,\n label,\n min,\n max,\n shouldVisuallyHideLabel,\n adornmentStart,\n adornmentEnd,\n className,\n maximumFractionDigits,\n minimumFractionDigits,\n ...props\n}: NumberInputProps) {\n const { locale, currency } = useLocale()\n const { inputId, errorMessageId, descriptionId, ariaDescribedBy } = useFieldIds({\n inputId: id,\n errorMessage,\n description,\n })\n\n const minValue = typeof min === 'string' ? Number(min) : min\n const maxValue = typeof max === 'string' ? Number(max) : max\n\n const currencySymbol = useMemo(() => {\n return new Intl.NumberFormat(locale, {\n style: 'currency',\n currency,\n })\n .formatToParts(0)\n .find(part => part.type === 'currency')?.value\n }, [currency, locale])\n\n return (\n <FieldLayout\n label={label}\n description={description}\n errorMessage={errorMessage}\n isRequired={isRequired}\n htmlFor={inputId}\n errorMessageId={errorMessageId}\n descriptionId={descriptionId}\n shouldVisuallyHideLabel={shouldVisuallyHideLabel}\n className={classNames(styles.root, className)}\n withErrorIcon={false}\n {...props}\n >\n <AriaNumberField\n value={value}\n name={name}\n formatOptions={{\n style: 'decimal',\n minimumFractionDigits: format === 'currency' ? 2 : minimumFractionDigits,\n maximumFractionDigits: format === 'currency' ? 2 : maximumFractionDigits,\n currency,\n currencyDisplay: 'symbol',\n }}\n isInvalid={isInvalid}\n isDisabled={isDisabled}\n isRequired={isRequired}\n validationBehavior=\"aria\"\n onChange={onChange}\n // This is a hack to silence an unnecessary react-aria warning. The FieldLayout component\n // already associates the label and input with htmlFor + ID. If we include a label id here,\n // the label will get read twice by assistive tech. This evaluates to an empty string which\n // does not get associated with any elements and does not get read.\n aria-labelledby=\" \"\n minValue={minValue}\n maxValue={maxValue}\n {...props}\n >\n <Group>\n <Input\n adornmentStart={adornmentStart || (format === 'currency' ? currencySymbol : null)}\n adornmentEnd={adornmentEnd || (format === 'percent' ? '%' : null)}\n id={inputId}\n inputRef={inputRef}\n onBlur={onBlur}\n placeholder={placeholder}\n aria-describedby={ariaDescribedBy}\n isDisabled={isDisabled}\n />\n </Group>\n </AriaNumberField>\n </FieldLayout>\n )\n}\n"],"names":["NumberInput","name","format","inputRef","id","value","description","errorMessage","isRequired","placeholder","isInvalid","isDisabled","onChange","onBlur","label","min","max","shouldVisuallyHideLabel","adornmentStart","adornmentEnd","className","maximumFractionDigits","minimumFractionDigits","props","locale","currency","useLocale","inputId","errorMessageId","descriptionId","ariaDescribedBy","useFieldIds","minValue","maxValue","currencySymbol","useMemo","part","jsx","FieldLayout","classNames","styles","AriaNumberField","Group","Input"],"mappings":";;;;;;;;;AAUO,SAASA,EAAY;AAAA,EAC1B,MAAAC;AAAA,EACA,QAAAC;AAAA,EACA,UAAAC;AAAA,EACA,IAAAC;AAAA,EACA,OAAAC;AAAA,EACA,aAAAC;AAAA,EACA,cAAAC;AAAA,EACA,YAAAC;AAAA,EACA,aAAAC;AAAA,EACA,WAAAC;AAAA,EACA,YAAAC;AAAA,EACA,UAAAC;AAAA,EACA,QAAAC;AAAA,EACA,OAAAC;AAAA,EACA,KAAAC;AAAA,EACA,KAAAC;AAAA,EACA,yBAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,cAAAC;AAAA,EACA,WAAAC;AAAA,EACA,uBAAAC;AAAA,EACA,uBAAAC;AAAA,EACA,GAAGC;AACL,GAAqB;AACnB,QAAM,EAAE,QAAAC,GAAQ,UAAAC,EAAS,IAAIC,EAAU,GACjC,EAAE,SAAAC,GAAS,gBAAAC,GAAgB,eAAAC,GAAe,iBAAAC,EAAA,IAAoBC,EAAY;AAAA,IAC9E,SAAS3B;AAAA,IACT,cAAAG;AAAA,IACA,aAAAD;AAAA,EAAA,CACD,GAEK0B,IAAW,OAAOjB,KAAQ,WAAW,OAAOA,CAAG,IAAIA,GACnDkB,IAAW,OAAOjB,KAAQ,WAAW,OAAOA,CAAG,IAAIA,GAEnDkB,IAAiBC,EAAQ,MACtB,IAAI,KAAK,aAAaX,GAAQ;AAAA,IACnC,OAAO;AAAA,IACP,UAAAC;AAAA,EAAA,CACD,EACE,cAAc,CAAC,EACf,KAAK,CAAQW,MAAAA,EAAK,SAAS,UAAU,GAAG,OAC1C,CAACX,GAAUD,CAAM,CAAC;AAGnB,SAAA,gBAAAa;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,OAAAxB;AAAA,MACA,aAAAR;AAAA,MACA,cAAAC;AAAA,MACA,YAAAC;AAAA,MACA,SAASmB;AAAA,MACT,gBAAAC;AAAA,MACA,eAAAC;AAAA,MACA,yBAAAZ;AAAA,MACA,WAAWsB,EAAWC,EAAO,MAAMpB,CAAS;AAAA,MAC5C,eAAe;AAAA,MACd,GAAGG;AAAA,MAEJ,UAAA,gBAAAc;AAAA,QAACI;AAAAA,QAAA;AAAA,UACC,OAAApC;AAAA,UACA,MAAAJ;AAAA,UACA,eAAe;AAAA,YACb,OAAO;AAAA,YACP,uBAAuBC,MAAW,aAAa,IAAIoB;AAAA,YACnD,uBAAuBpB,MAAW,aAAa,IAAImB;AAAA,YACnD,UAAAI;AAAA,YACA,iBAAiB;AAAA,UACnB;AAAA,UACA,WAAAf;AAAA,UACA,YAAAC;AAAA,UACA,YAAAH;AAAA,UACA,oBAAmB;AAAA,UACnB,UAAAI;AAAA,UAKA,mBAAgB;AAAA,UAChB,UAAAoB;AAAA,UACA,UAAAC;AAAA,UACC,GAAGV;AAAA,UAEJ,4BAACmB,GACC,EAAA,UAAA,gBAAAL;AAAA,YAACM;AAAA,YAAA;AAAA,cACC,gBAAgBzB,MAAmBhB,MAAW,aAAagC,IAAiB;AAAA,cAC5E,cAAcf,MAAiBjB,MAAW,YAAY,MAAM;AAAA,cAC5D,IAAIyB;AAAA,cACJ,UAAAxB;AAAA,cACA,QAAAU;AAAA,cACA,aAAAJ;AAAA,cACA,oBAAkBqB;AAAA,cAClB,YAAAnB;AAAA,YAAA;AAAA,UAAA,EAEJ,CAAA;AAAA,QAAA;AAAA,MAAA;AAAA,IACF;AAAA,EACF;AAEJ;"}
@@ -1,16 +1,49 @@
1
1
  import { FocusEventHandler, InputHTMLAttributes, Ref } from 'react';
2
- import { SharedFieldLayoutProps } from '../FieldLayout/FieldLayoutTypes';
3
2
  import { InputProps } from '../Input/InputTypes';
3
+ import { SharedFieldLayoutProps } from '../../FieldLayout/FieldLayoutTypes';
4
4
  export interface NumberInputProps extends SharedFieldLayoutProps, Pick<InputHTMLAttributes<HTMLInputElement>, 'min' | 'max' | 'name' | 'id' | 'placeholder' | 'className'> {
5
+ /**
6
+ * Format type for the number input
7
+ */
5
8
  format?: 'currency' | 'decimal' | 'percent';
9
+ /**
10
+ * React ref for the number input element
11
+ */
6
12
  inputRef?: Ref<HTMLInputElement>;
13
+ /**
14
+ * Current value of the number input
15
+ */
7
16
  value?: number;
17
+ /**
18
+ * Indicates that the field has an error
19
+ */
8
20
  isInvalid?: boolean;
21
+ /**
22
+ * Disables the number input and prevents interaction
23
+ */
9
24
  isDisabled?: boolean;
25
+ /**
26
+ * Callback when number input value changes
27
+ */
10
28
  onChange?: (value: number) => void;
29
+ /**
30
+ * Handler for blur events
31
+ */
11
32
  onBlur?: FocusEventHandler<HTMLElement>;
33
+ /**
34
+ * Element to display at the start of the input
35
+ */
12
36
  adornmentStart?: InputProps['adornmentStart'];
37
+ /**
38
+ * Element to display at the end of the input
39
+ */
13
40
  adornmentEnd?: InputProps['adornmentEnd'];
41
+ /**
42
+ * Minimum number of decimal places to display
43
+ */
14
44
  minimumFractionDigits?: number;
45
+ /**
46
+ * Maximum number of decimal places to display
47
+ */
15
48
  maximumFractionDigits?: number;
16
49
  }
@@ -1 +1,2 @@
1
+ import "./types/i18next.d.ts"
1
2
  export { NumberInput } from './NumberInput';
@@ -1,6 +1,18 @@
1
1
  export interface ProgressBarProps {
2
+ /**
3
+ * Total number of steps in the progress sequence
4
+ */
2
5
  totalSteps: number;
6
+ /**
7
+ * Current step in the progress sequence
8
+ */
3
9
  currentStep: number;
10
+ /**
11
+ * Additional CSS class name for the progress bar container
12
+ */
4
13
  className?: string;
14
+ /**
15
+ * Accessible label describing the progress bar's purpose
16
+ */
5
17
  label: string;
6
18
  }
@@ -1,2 +1,3 @@
1
+ import "./types/i18next.d.ts"
1
2
  export { ProgressBar } from './ProgressBar';
2
3
  export type { ProgressBarProps } from './ProgressBarTypes';
@@ -2,7 +2,7 @@ import { jsx as i, jsxs as x } from "react/jsx-runtime";
2
2
  import F from "classnames";
3
3
  import { useFieldIds as j } from "../hooks/useFieldIds.js";
4
4
  import e from "./Radio.module.scss.js";
5
- import { HorizontalFieldLayout as v } from "../HorizontalFieldLayout/HorizontalFieldLayout.js";
5
+ import { HorizontalFieldLayout as v } from "../../HorizontalFieldLayout/HorizontalFieldLayout.js";
6
6
  const R = ({
7
7
  name: o,
8
8
  label: t,
@@ -1 +1 @@
1
- {"version":3,"file":"Radio.js","sources":["../../../../../src/components/Common/UI/Radio/Radio.tsx"],"sourcesContent":["import type { ChangeEvent } from 'react'\nimport classNames from 'classnames'\nimport { useFieldIds } from '../hooks/useFieldIds'\nimport { HorizontalFieldLayout } from '../HorizontalFieldLayout'\nimport styles from './Radio.module.scss'\nimport type { RadioProps } from './RadioTypes'\n\nexport const Radio = ({\n name,\n label,\n description,\n errorMessage,\n isRequired,\n inputRef,\n value,\n isInvalid = false,\n isDisabled = false,\n id,\n onChange,\n onBlur,\n shouldVisuallyHideLabel,\n className,\n ...props\n}: RadioProps) => {\n const { inputId, errorMessageId, descriptionId, ariaDescribedBy } = useFieldIds({\n inputId: id,\n errorMessage,\n description,\n })\n\n const handleChange = (event: ChangeEvent<HTMLInputElement>) => {\n onChange?.(event.target.checked)\n }\n\n return (\n <HorizontalFieldLayout\n label={label}\n description={description}\n errorMessage={errorMessage}\n isRequired={isRequired}\n htmlFor={inputId}\n errorMessageId={errorMessageId}\n descriptionId={descriptionId}\n shouldVisuallyHideLabel={shouldVisuallyHideLabel}\n className={className}\n {...props}\n >\n <div className={styles.radioWrapper}>\n <input\n type=\"radio\"\n name={name}\n disabled={isDisabled}\n aria-describedby={ariaDescribedBy}\n checked={value}\n id={inputId}\n ref={inputRef}\n onBlur={onBlur}\n onChange={handleChange}\n className={styles.radioInput}\n />\n <div className={classNames(styles.radio, { [styles.checked as string]: value })}>\n {value && <div className={styles.radioDot} />}\n </div>\n </div>\n </HorizontalFieldLayout>\n )\n}\n"],"names":["Radio","name","label","description","errorMessage","isRequired","inputRef","value","isInvalid","isDisabled","id","onChange","onBlur","shouldVisuallyHideLabel","className","props","inputId","errorMessageId","descriptionId","ariaDescribedBy","useFieldIds","handleChange","event","jsx","HorizontalFieldLayout","jsxs","styles","classNames"],"mappings":";;;;;AAOO,MAAMA,IAAQ,CAAC;AAAA,EACpB,MAAAC;AAAA,EACA,OAAAC;AAAA,EACA,aAAAC;AAAA,EACA,cAAAC;AAAA,EACA,YAAAC;AAAA,EACA,UAAAC;AAAA,EACA,OAAAC;AAAA,EACA,WAAAC,IAAY;AAAA,EACZ,YAAAC,IAAa;AAAA,EACb,IAAAC;AAAA,EACA,UAAAC;AAAA,EACA,QAAAC;AAAA,EACA,yBAAAC;AAAA,EACA,WAAAC;AAAA,EACA,GAAGC;AACL,MAAkB;AAChB,QAAM,EAAE,SAAAC,GAAS,gBAAAC,GAAgB,eAAAC,GAAe,iBAAAC,EAAA,IAAoBC,EAAY;AAAA,IAC9E,SAASV;AAAA,IACT,cAAAN;AAAA,IACA,aAAAD;AAAA,EAAA,CACD,GAEKkB,IAAe,CAACC,MAAyC;AAClD,IAAAX,IAAAW,EAAM,OAAO,OAAO;AAAA,EACjC;AAGE,SAAA,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,OAAAtB;AAAA,MACA,aAAAC;AAAA,MACA,cAAAC;AAAA,MACA,YAAAC;AAAA,MACA,SAASW;AAAA,MACT,gBAAAC;AAAA,MACA,eAAAC;AAAA,MACA,yBAAAL;AAAA,MACA,WAAAC;AAAA,MACC,GAAGC;AAAA,MAEJ,UAAC,gBAAAU,EAAA,OAAA,EAAI,WAAWC,EAAO,cACrB,UAAA;AAAA,QAAA,gBAAAH;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,MAAK;AAAA,YACL,MAAAtB;AAAA,YACA,UAAUQ;AAAA,YACV,oBAAkBU;AAAA,YAClB,SAASZ;AAAA,YACT,IAAIS;AAAA,YACJ,KAAKV;AAAA,YACL,QAAAM;AAAA,YACA,UAAUS;AAAA,YACV,WAAWK,EAAO;AAAA,UAAA;AAAA,QACpB;AAAA,QACA,gBAAAH,EAAC,SAAI,WAAWI,EAAWD,EAAO,OAAO,EAAE,CAACA,EAAO,OAAiB,GAAGnB,EAAM,CAAC,GAC3E,UAASA,KAAA,gBAAAgB,EAAC,SAAI,WAAWG,EAAO,UAAU,EAC7C,CAAA;AAAA,MAAA,EACF,CAAA;AAAA,IAAA;AAAA,EACF;AAEJ;"}
1
+ {"version":3,"file":"Radio.js","sources":["../../../../../src/components/Common/UI/Radio/Radio.tsx"],"sourcesContent":["import type { ChangeEvent } from 'react'\nimport classNames from 'classnames'\nimport { useFieldIds } from '../hooks/useFieldIds'\nimport styles from './Radio.module.scss'\nimport type { RadioProps } from './RadioTypes'\nimport { HorizontalFieldLayout } from '@/components/Common/HorizontalFieldLayout'\n\nexport const Radio = ({\n name,\n label,\n description,\n errorMessage,\n isRequired,\n inputRef,\n value,\n isInvalid = false,\n isDisabled = false,\n id,\n onChange,\n onBlur,\n shouldVisuallyHideLabel,\n className,\n ...props\n}: RadioProps) => {\n const { inputId, errorMessageId, descriptionId, ariaDescribedBy } = useFieldIds({\n inputId: id,\n errorMessage,\n description,\n })\n\n const handleChange = (event: ChangeEvent<HTMLInputElement>) => {\n onChange?.(event.target.checked)\n }\n\n return (\n <HorizontalFieldLayout\n label={label}\n description={description}\n errorMessage={errorMessage}\n isRequired={isRequired}\n htmlFor={inputId}\n errorMessageId={errorMessageId}\n descriptionId={descriptionId}\n shouldVisuallyHideLabel={shouldVisuallyHideLabel}\n className={className}\n {...props}\n >\n <div className={styles.radioWrapper}>\n <input\n type=\"radio\"\n name={name}\n disabled={isDisabled}\n aria-describedby={ariaDescribedBy}\n checked={value}\n id={inputId}\n ref={inputRef}\n onBlur={onBlur}\n onChange={handleChange}\n className={styles.radioInput}\n />\n <div className={classNames(styles.radio, { [styles.checked as string]: value })}>\n {value && <div className={styles.radioDot} />}\n </div>\n </div>\n </HorizontalFieldLayout>\n )\n}\n"],"names":["Radio","name","label","description","errorMessage","isRequired","inputRef","value","isInvalid","isDisabled","id","onChange","onBlur","shouldVisuallyHideLabel","className","props","inputId","errorMessageId","descriptionId","ariaDescribedBy","useFieldIds","handleChange","event","jsx","HorizontalFieldLayout","jsxs","styles","classNames"],"mappings":";;;;;AAOO,MAAMA,IAAQ,CAAC;AAAA,EACpB,MAAAC;AAAA,EACA,OAAAC;AAAA,EACA,aAAAC;AAAA,EACA,cAAAC;AAAA,EACA,YAAAC;AAAA,EACA,UAAAC;AAAA,EACA,OAAAC;AAAA,EACA,WAAAC,IAAY;AAAA,EACZ,YAAAC,IAAa;AAAA,EACb,IAAAC;AAAA,EACA,UAAAC;AAAA,EACA,QAAAC;AAAA,EACA,yBAAAC;AAAA,EACA,WAAAC;AAAA,EACA,GAAGC;AACL,MAAkB;AAChB,QAAM,EAAE,SAAAC,GAAS,gBAAAC,GAAgB,eAAAC,GAAe,iBAAAC,EAAA,IAAoBC,EAAY;AAAA,IAC9E,SAASV;AAAA,IACT,cAAAN;AAAA,IACA,aAAAD;AAAA,EAAA,CACD,GAEKkB,IAAe,CAACC,MAAyC;AAClD,IAAAX,IAAAW,EAAM,OAAO,OAAO;AAAA,EACjC;AAGE,SAAA,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,OAAAtB;AAAA,MACA,aAAAC;AAAA,MACA,cAAAC;AAAA,MACA,YAAAC;AAAA,MACA,SAASW;AAAA,MACT,gBAAAC;AAAA,MACA,eAAAC;AAAA,MACA,yBAAAL;AAAA,MACA,WAAAC;AAAA,MACC,GAAGC;AAAA,MAEJ,UAAC,gBAAAU,EAAA,OAAA,EAAI,WAAWC,EAAO,cACrB,UAAA;AAAA,QAAA,gBAAAH;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,MAAK;AAAA,YACL,MAAAtB;AAAA,YACA,UAAUQ;AAAA,YACV,oBAAkBU;AAAA,YAClB,SAASZ;AAAA,YACT,IAAIS;AAAA,YACJ,KAAKV;AAAA,YACL,QAAAM;AAAA,YACA,UAAUS;AAAA,YACV,WAAWK,EAAO;AAAA,UAAA;AAAA,QACpB;AAAA,QACA,gBAAAH,EAAC,SAAI,WAAWI,EAAWD,EAAO,OAAO,EAAE,CAACA,EAAO,OAAiB,GAAGnB,EAAM,CAAC,GAC3E,UAASA,KAAA,gBAAAgB,EAAC,SAAI,WAAWG,EAAO,UAAU,EAC7C,CAAA;AAAA,MAAA,EACF,CAAA;AAAA,IAAA;AAAA,EACF;AAEJ;"}
@@ -1,9 +1,24 @@
1
1
  import { InputHTMLAttributes, Ref } from 'react';
2
- import { SharedHorizontalFieldLayoutProps } from '../HorizontalFieldLayout/HorizontalFieldLayoutTypes';
2
+ import { SharedHorizontalFieldLayoutProps } from '../../HorizontalFieldLayout/HorizontalFieldLayoutTypes';
3
3
  export interface RadioProps extends SharedHorizontalFieldLayoutProps, Pick<InputHTMLAttributes<HTMLInputElement>, 'name' | 'id' | 'className' | 'onBlur'> {
4
+ /**
5
+ * Current checked state of the radio button
6
+ */
4
7
  value?: boolean;
8
+ /**
9
+ * Callback when radio button state changes
10
+ */
5
11
  onChange?: (checked: boolean) => void;
12
+ /**
13
+ * React ref for the radio input element
14
+ */
6
15
  inputRef?: Ref<HTMLInputElement>;
16
+ /**
17
+ * Indicates that the field has an error
18
+ */
7
19
  isInvalid?: boolean;
20
+ /**
21
+ * Disables the radio button and prevents interaction
22
+ */
8
23
  isDisabled?: boolean;
9
24
  }
@@ -1 +1,2 @@
1
+ import "./types/i18next.d.ts"
1
2
  export { Radio } from './Radio';