@gusto/embedded-react-sdk 0.19.0 → 0.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (405) hide show
  1. package/CHANGELOG.md +48 -0
  2. package/dist/UNSTABLE_Hooks.d.ts +1 -0
  3. package/dist/UNSTABLE_Hooks.js +9 -0
  4. package/dist/UNSTABLE_Hooks.js.map +1 -0
  5. package/dist/assets/icons/coins-hand.svg.js +10 -0
  6. package/dist/assets/icons/coins-hand.svg.js.map +1 -0
  7. package/dist/components/Base/Base.d.ts +19 -4
  8. package/dist/components/Base/Base.js +68 -61
  9. package/dist/components/Base/Base.js.map +1 -1
  10. package/dist/components/Base/useBase.d.ts +1 -1
  11. package/dist/components/Base/useBase.js.map +1 -1
  12. package/dist/components/Base/useBaseSubmit.d.ts +10 -0
  13. package/dist/components/Base/useBaseSubmit.js +33 -0
  14. package/dist/components/Base/useBaseSubmit.js.map +1 -0
  15. package/dist/components/Common/Fields/TextAreaField/TextAreaField.d.ts +5 -0
  16. package/dist/components/Common/Fields/TextAreaField/TextAreaField.js +34 -0
  17. package/dist/components/Common/Fields/TextAreaField/TextAreaField.js.map +1 -0
  18. package/dist/components/Common/Fields/TextAreaField/index.d.ts +3 -0
  19. package/dist/components/Common/FlowBreadcrumbs/FlowBreadcrumbs.js +10 -10
  20. package/dist/components/Common/FlowBreadcrumbs/FlowBreadcrumbs.js.map +1 -1
  21. package/dist/components/Common/SignatureForm/SignatureForm.js +15 -10
  22. package/dist/components/Common/SignatureForm/SignatureForm.js.map +1 -1
  23. package/dist/components/Common/SignatureForm/SignatureFormActions.js +14 -10
  24. package/dist/components/Common/SignatureForm/SignatureFormActions.js.map +1 -1
  25. package/dist/components/Common/SignatureForm/SignatureFormFields.js +19 -14
  26. package/dist/components/Common/SignatureForm/SignatureFormFields.js.map +1 -1
  27. package/dist/components/Common/UI/Alert/Alert.js +23 -22
  28. package/dist/components/Common/UI/Alert/Alert.js.map +1 -1
  29. package/dist/components/Common/UI/Alert/AlertTypes.d.ts +4 -0
  30. package/dist/components/Common/UI/Alert/AlertTypes.js.map +1 -1
  31. package/dist/components/Common/UI/DatePicker/DatePicker.d.ts +1 -1
  32. package/dist/components/Common/UI/DatePicker/DatePicker.js +38 -37
  33. package/dist/components/Common/UI/DatePicker/DatePicker.js.map +1 -1
  34. package/dist/components/Common/UI/DatePicker/DatePickerTypes.d.ts +4 -0
  35. package/dist/components/Common/UI/Modal/Modal.module.scss.js +17 -17
  36. package/dist/components/Common/UI/Select/Select.d.ts +1 -1
  37. package/dist/components/Common/UI/Select/Select.js +27 -26
  38. package/dist/components/Common/UI/Select/Select.js.map +1 -1
  39. package/dist/components/Common/UI/Select/SelectTypes.d.ts +4 -0
  40. package/dist/components/Common/UI/TextArea/TextArea.d.ts +2 -0
  41. package/dist/components/Common/UI/TextArea/TextArea.js +79 -0
  42. package/dist/components/Common/UI/TextArea/TextArea.js.map +1 -0
  43. package/dist/components/Common/UI/TextArea/TextArea.module.scss.js +12 -0
  44. package/dist/components/Common/UI/TextArea/TextArea.module.scss.js.map +1 -0
  45. package/dist/components/Common/UI/TextArea/TextAreaTypes.d.ts +37 -0
  46. package/dist/components/Common/UI/TextArea/TextAreaTypes.js +9 -0
  47. package/dist/components/Common/UI/TextArea/TextAreaTypes.js.map +1 -0
  48. package/dist/components/Common/UI/TextArea/index.d.ts +4 -0
  49. package/dist/components/Company/AssignSignatory/AssignSignatory.js +11 -7
  50. package/dist/components/Company/AssignSignatory/AssignSignatory.js.map +1 -1
  51. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js +10 -6
  52. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js.map +1 -1
  53. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js +11 -8
  54. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js.map +1 -1
  55. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js +9 -6
  56. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js.map +1 -1
  57. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js +14 -13
  58. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js.map +1 -1
  59. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +6 -4
  60. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
  61. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js +9 -6
  62. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js.map +1 -1
  63. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js +13 -10
  64. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js.map +1 -1
  65. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +14 -13
  66. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js.map +1 -1
  67. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +6 -4
  68. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
  69. package/dist/components/Company/AssignSignatory/TitleSelect.js +10 -7
  70. package/dist/components/Company/AssignSignatory/TitleSelect.js.map +1 -1
  71. package/dist/components/Company/AssignSignatory/useAssignSignatory.js +8 -6
  72. package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
  73. package/dist/components/Company/BankAccount/BankAccountForm/Actions.js +11 -9
  74. package/dist/components/Company/BankAccount/BankAccountForm/Actions.js.map +1 -1
  75. package/dist/components/Company/BankAccount/BankAccountForm/Form.js +13 -9
  76. package/dist/components/Company/BankAccount/BankAccountForm/Form.js.map +1 -1
  77. package/dist/components/Company/BankAccount/BankAccountForm/context.js +6 -4
  78. package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
  79. package/dist/components/Company/BankAccount/BankAccountList/Actions.js +13 -10
  80. package/dist/components/Company/BankAccount/BankAccountList/Actions.js.map +1 -1
  81. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js +15 -12
  82. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js.map +1 -1
  83. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js +8 -4
  84. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js.map +1 -1
  85. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js +8 -5
  86. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js.map +1 -1
  87. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js +15 -11
  88. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  89. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +6 -4
  90. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  91. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +15 -11
  92. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
  93. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js +6 -4
  94. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
  95. package/dist/components/Company/FederalTaxes/Actions.js +11 -8
  96. package/dist/components/Company/FederalTaxes/Actions.js.map +1 -1
  97. package/dist/components/Company/FederalTaxes/FederalTaxes.js +19 -15
  98. package/dist/components/Company/FederalTaxes/FederalTaxes.js.map +1 -1
  99. package/dist/components/Company/FederalTaxes/Form.js +8 -6
  100. package/dist/components/Company/FederalTaxes/Form.js.map +1 -1
  101. package/dist/components/Company/FederalTaxes/useFederalTaxes.js +11 -9
  102. package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
  103. package/dist/components/Company/Industry/Actions.js +11 -8
  104. package/dist/components/Company/Industry/Actions.js.map +1 -1
  105. package/dist/components/Company/Industry/Context.js +9 -7
  106. package/dist/components/Company/Industry/Context.js.map +1 -1
  107. package/dist/components/Company/Industry/Edit.js +14 -10
  108. package/dist/components/Company/Industry/Edit.js.map +1 -1
  109. package/dist/components/Company/Locations/LocationForm/Actions.js +11 -8
  110. package/dist/components/Company/Locations/LocationForm/Actions.js.map +1 -1
  111. package/dist/components/Company/Locations/LocationForm/Form.js +7 -5
  112. package/dist/components/Company/Locations/LocationForm/Form.js.map +1 -1
  113. package/dist/components/Company/Locations/LocationForm/LocationForm.js +19 -15
  114. package/dist/components/Company/Locations/LocationForm/LocationForm.js.map +1 -1
  115. package/dist/components/Company/Locations/LocationForm/useLocationForm.js +6 -4
  116. package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
  117. package/dist/components/Company/Locations/LocationsList/Actions.js +9 -6
  118. package/dist/components/Company/Locations/LocationsList/Actions.js.map +1 -1
  119. package/dist/components/Company/Locations/LocationsList/List.js +17 -15
  120. package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
  121. package/dist/components/Company/Locations/LocationsList/LocationsList.js +15 -12
  122. package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
  123. package/dist/components/Company/Locations/LocationsList/useLocationsList.js +6 -4
  124. package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
  125. package/dist/components/Company/OnboardingOverview/Completed.js +15 -12
  126. package/dist/components/Company/OnboardingOverview/Completed.js.map +1 -1
  127. package/dist/components/Company/OnboardingOverview/MissingRequirements.js +12 -9
  128. package/dist/components/Company/OnboardingOverview/MissingRequirements.js.map +1 -1
  129. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js +10 -6
  130. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js.map +1 -1
  131. package/dist/components/Company/OnboardingOverview/context.js +6 -4
  132. package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
  133. package/dist/components/Company/PaySchedule/PaySchedule.js +36 -33
  134. package/dist/components/Company/PaySchedule/PaySchedule.js.map +1 -1
  135. package/dist/components/Company/PaySchedule/_parts/Actions.js +13 -10
  136. package/dist/components/Company/PaySchedule/_parts/Actions.js.map +1 -1
  137. package/dist/components/Company/PaySchedule/_parts/Edit.js +15 -15
  138. package/dist/components/Company/PaySchedule/_parts/Head.js +14 -11
  139. package/dist/components/Company/PaySchedule/_parts/Head.js.map +1 -1
  140. package/dist/components/Company/PaySchedule/_parts/List.js +21 -19
  141. package/dist/components/Company/PaySchedule/_parts/List.js.map +1 -1
  142. package/dist/components/Company/PaySchedule/usePaySchedule.js +8 -6
  143. package/dist/components/Company/PaySchedule/usePaySchedule.js.map +1 -1
  144. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js +8 -5
  145. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js.map +1 -1
  146. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +6 -4
  147. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
  148. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js +9 -6
  149. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js.map +1 -1
  150. package/dist/components/Company/StateTaxes/StateTaxesList/List.js +8 -5
  151. package/dist/components/Company/StateTaxes/StateTaxesList/List.js.map +1 -1
  152. package/dist/components/Company/StateTaxes/StateTaxesList/context.js +6 -4
  153. package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
  154. package/dist/components/Contractor/Address/Address.js +8 -4
  155. package/dist/components/Contractor/Address/Address.js.map +1 -1
  156. package/dist/components/Contractor/Address/Form.js +8 -6
  157. package/dist/components/Contractor/Address/Form.js.map +1 -1
  158. package/dist/components/Contractor/Address/useAddress.js +8 -6
  159. package/dist/components/Contractor/Address/useAddress.js.map +1 -1
  160. package/dist/components/Contractor/ContractorList/index.js +29 -28
  161. package/dist/components/Contractor/ContractorList/index.js.map +1 -1
  162. package/dist/components/Contractor/NewHireReport/NewHireReport.js +14 -13
  163. package/dist/components/Contractor/NewHireReport/NewHireReport.js.map +1 -1
  164. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js +14 -10
  165. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js.map +1 -1
  166. package/dist/components/Contractor/PaymentMethod/PaymentMethod.js +3 -2
  167. package/dist/components/Contractor/PaymentMethod/PaymentMethod.js.map +1 -1
  168. package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js +5 -2
  169. package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js.map +1 -1
  170. package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.d.ts +15 -0
  171. package/dist/components/Contractor/Payments/Detail/DetailPresentation.d.ts +19 -0
  172. package/dist/components/Contractor/Payments/Overview/OverviewPresentation.d.ts +18 -0
  173. package/dist/components/Contractor/Payments/PaymentEdit/PaymentEditPresentation.d.ts +6 -0
  174. package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.d.ts +18 -0
  175. package/dist/components/Contractor/Payments/types.d.ts +4 -0
  176. package/dist/components/Contractor/Profile/ContractorProfileForm.js +13 -13
  177. package/dist/components/Contractor/Profile/useContractorProfile.js +4 -3
  178. package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
  179. package/dist/components/Contractor/Submit/Submit.js +22 -20
  180. package/dist/components/Contractor/Submit/Submit.js.map +1 -1
  181. package/dist/components/Employee/Compensation/Actions.js +14 -12
  182. package/dist/components/Employee/Compensation/Actions.js.map +1 -1
  183. package/dist/components/Employee/Compensation/Edit.js +17 -16
  184. package/dist/components/Employee/Compensation/Edit.js.map +1 -1
  185. package/dist/components/Employee/Compensation/List.js +25 -23
  186. package/dist/components/Employee/Compensation/List.js.map +1 -1
  187. package/dist/components/Employee/Deductions/Deductions.d.ts +1 -1
  188. package/dist/components/Employee/Deductions/Deductions.js +10 -10
  189. package/dist/components/Employee/Deductions/Deductions.js.map +1 -1
  190. package/dist/components/Employee/Deductions/DeductionsComponents.d.ts +2 -0
  191. package/dist/components/Employee/Deductions/DeductionsComponents.js +6 -6
  192. package/dist/components/Employee/Deductions/DeductionsComponents.js.map +1 -1
  193. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js +222 -0
  194. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js.map +1 -0
  195. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.module.scss.js +8 -0
  196. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.module.scss.js.map +1 -0
  197. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.d.ts +2 -2
  198. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js +165 -0
  199. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js.map +1 -0
  200. package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.d.ts +0 -34
  201. package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js +90 -126
  202. package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js.map +1 -1
  203. package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.module.scss.js +14 -0
  204. package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.module.scss.js.map +1 -0
  205. package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js +56 -55
  206. package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js.map +1 -1
  207. package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.d.ts +6 -0
  208. package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js +53 -0
  209. package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js.map +1 -0
  210. package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.module.scss.js +14 -0
  211. package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.module.scss.js.map +1 -0
  212. package/dist/components/Employee/Deductions/stateMachine.js +49 -29
  213. package/dist/components/Employee/Deductions/stateMachine.js.map +1 -1
  214. package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js +9 -6
  215. package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js.map +1 -1
  216. package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js +13 -9
  217. package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  218. package/dist/components/Employee/DocumentSigner/DocumentList/List.js +6 -2
  219. package/dist/components/Employee/DocumentSigner/DocumentList/List.js.map +1 -1
  220. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +6 -4
  221. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  222. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js +15 -11
  223. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
  224. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js +6 -4
  225. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
  226. package/dist/components/Employee/EmployeeList/Actions.js +9 -6
  227. package/dist/components/Employee/EmployeeList/Actions.js.map +1 -1
  228. package/dist/components/Employee/EmployeeList/EmployeeList.js +6 -3
  229. package/dist/components/Employee/EmployeeList/EmployeeList.js.map +1 -1
  230. package/dist/components/Employee/EmployeeList/Head.js +8 -5
  231. package/dist/components/Employee/EmployeeList/Head.js.map +1 -1
  232. package/dist/components/Employee/EmployeeList/List.js +17 -16
  233. package/dist/components/Employee/EmployeeList/List.js.map +1 -1
  234. package/dist/components/Employee/EmployeeList/useEmployeeList.js +6 -4
  235. package/dist/components/Employee/EmployeeList/useEmployeeList.js.map +1 -1
  236. package/dist/components/Employee/FederalTaxes/Actions.js +10 -7
  237. package/dist/components/Employee/FederalTaxes/Actions.js.map +1 -1
  238. package/dist/components/Employee/FederalTaxes/FederalForm.js +14 -11
  239. package/dist/components/Employee/FederalTaxes/FederalForm.js.map +1 -1
  240. package/dist/components/Employee/FederalTaxes/useFederalTaxes.js +6 -4
  241. package/dist/components/Employee/FederalTaxes/useFederalTaxes.js.map +1 -1
  242. package/dist/components/Employee/Landing/Landing.js +15 -13
  243. package/dist/components/Employee/Landing/Landing.js.map +1 -1
  244. package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +7 -7
  245. package/dist/components/Employee/PaymentMethod/Actions.js +11 -8
  246. package/dist/components/Employee/PaymentMethod/Actions.js.map +1 -1
  247. package/dist/components/Employee/PaymentMethod/BankAccountEdit.js +8 -5
  248. package/dist/components/Employee/PaymentMethod/BankAccountEdit.js.map +1 -1
  249. package/dist/components/Employee/PaymentMethod/BankAccountsList.js +13 -11
  250. package/dist/components/Employee/PaymentMethod/BankAccountsList.js.map +1 -1
  251. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js +10 -7
  252. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js.map +1 -1
  253. package/dist/components/Employee/PaymentMethod/Split.js +10 -9
  254. package/dist/components/Employee/PaymentMethod/Split.js.map +1 -1
  255. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +8 -6
  256. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +1 -1
  257. package/dist/components/Employee/Profile/Actions.js +11 -8
  258. package/dist/components/Employee/Profile/Actions.js.map +1 -1
  259. package/dist/components/Employee/Profile/AdminPersonalDetails.js +11 -8
  260. package/dist/components/Employee/Profile/AdminPersonalDetails.js.map +1 -1
  261. package/dist/components/Employee/Profile/HomeAddress.js +8 -7
  262. package/dist/components/Employee/Profile/HomeAddress.js.map +1 -1
  263. package/dist/components/Employee/Profile/PersonalDetailsInputs.js +31 -28
  264. package/dist/components/Employee/Profile/PersonalDetailsInputs.js.map +1 -1
  265. package/dist/components/Employee/Profile/useProfile.js +6 -4
  266. package/dist/components/Employee/Profile/useProfile.js.map +1 -1
  267. package/dist/components/Employee/StateTaxes/Actions.js +11 -8
  268. package/dist/components/Employee/StateTaxes/Actions.js.map +1 -1
  269. package/dist/components/Employee/StateTaxes/useStateTaxes.js +6 -4
  270. package/dist/components/Employee/StateTaxes/useStateTaxes.js.map +1 -1
  271. package/dist/components/Employee/Taxes/Actions.js +11 -8
  272. package/dist/components/Employee/Taxes/Actions.js.map +1 -1
  273. package/dist/components/Employee/Taxes/FederalForm.js +15 -12
  274. package/dist/components/Employee/Taxes/FederalForm.js.map +1 -1
  275. package/dist/components/Employee/Taxes/useTaxes.js +6 -4
  276. package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
  277. package/dist/components/Flow/Flow.js +30 -27
  278. package/dist/components/Flow/Flow.js.map +1 -1
  279. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetails.d.ts +1 -1
  280. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetails.js +58 -36
  281. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetails.js.map +1 -1
  282. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsBanner/ConfirmWireDetailsBanner.d.ts +2 -0
  283. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsBanner/ConfirmWireDetailsBanner.js +71 -54
  284. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsBanner/ConfirmWireDetailsBanner.js.map +1 -1
  285. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsComponents.d.ts +23 -0
  286. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsComponents.js +27 -15
  287. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsComponents.js.map +1 -1
  288. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.d.ts +25 -2
  289. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js +153 -23
  290. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js.map +1 -1
  291. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.module.scss.js +10 -0
  292. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.module.scss.js.map +1 -0
  293. package/dist/components/Payroll/ConfirmWireDetails/WireInstructions/WireInstructions.d.ts +9 -1
  294. package/dist/components/Payroll/ConfirmWireDetails/WireInstructions/WireInstructions.js +195 -22
  295. package/dist/components/Payroll/ConfirmWireDetails/WireInstructions/WireInstructions.js.map +1 -1
  296. package/dist/components/Payroll/ConfirmWireDetails/WireInstructions/WireInstructions.module.scss.js +18 -0
  297. package/dist/components/Payroll/ConfirmWireDetails/WireInstructions/WireInstructions.module.scss.js.map +1 -0
  298. package/dist/components/Payroll/ConfirmWireDetails/confirmWireDetailsStateMachine.d.ts +10 -2
  299. package/dist/components/Payroll/ConfirmWireDetails/confirmWireDetailsStateMachine.js +39 -25
  300. package/dist/components/Payroll/ConfirmWireDetails/confirmWireDetailsStateMachine.js.map +1 -1
  301. package/dist/components/Payroll/ConfirmWireDetails/index.d.ts +1 -0
  302. package/dist/components/Payroll/ConfirmWireDetails/types.d.ts +5 -0
  303. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js +16 -13
  304. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js.map +1 -1
  305. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js +8 -6
  306. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js.map +1 -1
  307. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js +15 -15
  308. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
  309. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +27 -27
  310. package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js +13 -11
  311. package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js.map +1 -1
  312. package/dist/components/Payroll/PayrollHistory/PayrollHistory.d.ts +0 -12
  313. package/dist/components/Payroll/PayrollHistory/PayrollHistory.js +44 -52
  314. package/dist/components/Payroll/PayrollHistory/PayrollHistory.js.map +1 -1
  315. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.d.ts +9 -6
  316. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js +97 -93
  317. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js.map +1 -1
  318. package/dist/components/Payroll/PayrollList/PayrollList.js +58 -59
  319. package/dist/components/Payroll/PayrollList/PayrollList.js.map +1 -1
  320. package/dist/components/Payroll/PayrollList/PayrollListPresentation.d.ts +4 -6
  321. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +82 -72
  322. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
  323. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js +3 -2
  324. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js.map +1 -1
  325. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +11 -10
  326. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
  327. package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchThresholdExceeded.js +8 -5
  328. package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchThresholdExceeded.js.map +1 -1
  329. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js +3 -2
  330. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js.map +1 -1
  331. package/dist/components/Payroll/PayrollStatusBadges/PayrollStatusBadges.d.ts +7 -0
  332. package/dist/components/Payroll/PayrollStatusBadges/PayrollStatusBadges.js +19 -0
  333. package/dist/components/Payroll/PayrollStatusBadges/PayrollStatusBadges.js.map +1 -0
  334. package/dist/components/Payroll/PayrollStatusBadges/PayrollStatusBadges.module.scss.js +10 -0
  335. package/dist/components/Payroll/PayrollStatusBadges/PayrollStatusBadges.module.scss.js.map +1 -0
  336. package/dist/components/Payroll/PayrollStatusBadges/index.d.ts +4 -0
  337. package/dist/components/Payroll/PayrollStatusBadges/payrollStatusConfig.d.ts +33 -0
  338. package/dist/components/Payroll/PayrollStatusBadges/payrollStatusConfig.js +161 -0
  339. package/dist/components/Payroll/PayrollStatusBadges/payrollStatusConfig.js.map +1 -0
  340. package/dist/components/Payroll/PayrollStatusBadges/usePayrollStatusBadges.d.ts +3 -0
  341. package/dist/components/Payroll/PayrollStatusBadges/usePayrollStatusBadges.js +17 -0
  342. package/dist/components/Payroll/PayrollStatusBadges/usePayrollStatusBadges.js.map +1 -0
  343. package/dist/components/Payroll/PayrollStatusBadges/usePayrollStatusBadges.test.d.ts +1 -0
  344. package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfiguration.d.ts +6 -0
  345. package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfiguration.js +70 -0
  346. package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfiguration.js.map +1 -0
  347. package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfigurationContext.d.ts +7 -0
  348. package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfigurationContext.js +6 -0
  349. package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfigurationContext.js.map +1 -0
  350. package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfigurationProvider.d.ts +9 -0
  351. package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfigurationProvider.js +40 -0
  352. package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfigurationProvider.js.map +1 -0
  353. package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/index.d.ts +5 -0
  354. package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/usePayrollConfiguration.d.ts +2 -0
  355. package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/usePayrollConfiguration.js +12 -0
  356. package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/usePayrollConfiguration.js.map +1 -0
  357. package/dist/components/Payroll/UNSTABLE_PayrollHooks/index.d.ts +2 -0
  358. package/dist/components/Payroll/helpers.d.ts +0 -5
  359. package/dist/components/Payroll/helpers.js +106 -112
  360. package/dist/components/Payroll/helpers.js.map +1 -1
  361. package/dist/components/Payroll/usePreparedPayrollData.js +10 -8
  362. package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
  363. package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js +48 -46
  364. package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js.map +1 -1
  365. package/dist/contexts/ComponentAdapter/useComponentContext.d.ts +2 -0
  366. package/dist/contexts/ComponentAdapter/useComponentContext.js +3 -3
  367. package/dist/contexts/ComponentAdapter/useComponentContext.js.map +1 -1
  368. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +9 -5
  369. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
  370. package/dist/helpers/dateFormatting.d.ts +9 -0
  371. package/dist/helpers/dateFormatting.js +65 -52
  372. package/dist/helpers/dateFormatting.js.map +1 -1
  373. package/dist/helpers/formattedStrings.js +12 -11
  374. package/dist/helpers/formattedStrings.js.map +1 -1
  375. package/dist/helpers/validations.js +1 -1
  376. package/dist/helpers/validations.js.map +1 -1
  377. package/dist/i18n/I18n.js +10 -10
  378. package/dist/i18n/I18n.js.map +1 -1
  379. package/dist/i18n/en/ContractorPayment.ContractorPaymentCreatePayment.json.js +32 -0
  380. package/dist/i18n/en/ContractorPayment.ContractorPaymentCreatePayment.json.js.map +1 -0
  381. package/dist/i18n/en/ContractorPayment.ContractorPaymentDetail.json.js +24 -0
  382. package/dist/i18n/en/ContractorPayment.ContractorPaymentDetail.json.js.map +1 -0
  383. package/dist/i18n/en/ContractorPayment.ContractorPaymentOverview.json.js +32 -0
  384. package/dist/i18n/en/ContractorPayment.ContractorPaymentOverview.json.js.map +1 -0
  385. package/dist/i18n/en/ContractorPayment.ContractorPaymentPaymentHistory.json.js +32 -0
  386. package/dist/i18n/en/ContractorPayment.ContractorPaymentPaymentHistory.json.js.map +1 -0
  387. package/dist/i18n/en/Payroll.Common.json.js +8 -0
  388. package/dist/i18n/en/Payroll.Common.json.js.map +1 -0
  389. package/dist/i18n/en/Payroll.ConfirmWireDetailsForm.json.js +25 -5
  390. package/dist/i18n/en/Payroll.ConfirmWireDetailsForm.json.js.map +1 -1
  391. package/dist/i18n/en/Payroll.PayrollList.json.js +14 -16
  392. package/dist/i18n/en/Payroll.PayrollList.json.js.map +1 -1
  393. package/dist/i18n/en/Payroll.WireInstructions.json.js +22 -6
  394. package/dist/i18n/en/Payroll.WireInstructions.json.js.map +1 -1
  395. package/dist/shared/constants.d.ts +6 -0
  396. package/dist/shared/constants.js +15 -12
  397. package/dist/shared/constants.js.map +1 -1
  398. package/dist/style.css +1 -1
  399. package/dist/types/i18next.d.ts +183 -8
  400. package/package.json +13 -9
  401. package/dist/components/Employee/Deductions/DeductionsForm/UNSTABLE_DeductionsForm.d.ts +0 -7
  402. package/dist/components/Employee/Deductions/EmptyState/EmptyState.d.ts +0 -6
  403. package/dist/components/Employee/Deductions/IncludeDeductionsForm/IncludeDeductionsForm.d.ts +0 -15
  404. package/dist/components/Employee/Deductions/IncludeDeductionsForm/IncludeDeductionsForm.js +0 -48
  405. package/dist/components/Employee/Deductions/IncludeDeductionsForm/IncludeDeductionsForm.js.map +0 -1
@@ -1,19 +1,23 @@
1
- import { jsxs as s, jsx as n } from "react/jsx-runtime";
2
- import { ActionsLayout as m } from "../ActionsLayout/ActionsLayout.js";
3
- import { useComponentContext as u } from "../../../contexts/ComponentAdapter/useComponentContext.js";
4
- function f({
1
+ import { jsxs as m, jsx as n } from "react/jsx-runtime";
2
+ import "../../../shared/constants.js";
3
+ import "classnames";
4
+ import { ActionsLayout as p } from "../ActionsLayout/ActionsLayout.js";
5
+ import "react-i18next";
6
+ import { useComponentContext as s } from "../../../contexts/ComponentAdapter/useComponentContext.js";
7
+ import "react";
8
+ function y({
5
9
  onBack: t,
6
10
  backLabel: r,
7
- submitLabel: e,
8
- isLoading: i = !1
11
+ submitLabel: i,
12
+ isLoading: e = !1
9
13
  }) {
10
- const o = u();
11
- return /* @__PURE__ */ s(m, { children: [
14
+ const o = s();
15
+ return /* @__PURE__ */ m(p, { children: [
12
16
  t && /* @__PURE__ */ n(o.Button, { variant: "secondary", type: "button", onClick: t, children: r }),
13
- /* @__PURE__ */ n(o.Button, { type: "submit", isLoading: i, children: e })
17
+ /* @__PURE__ */ n(o.Button, { type: "submit", isLoading: e, children: i })
14
18
  ] });
15
19
  }
16
20
  export {
17
- f as SignatureFormActions
21
+ y as SignatureFormActions
18
22
  };
19
23
  //# sourceMappingURL=SignatureFormActions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SignatureFormActions.js","sources":["../../../../src/components/Common/SignatureForm/SignatureFormActions.tsx"],"sourcesContent":["import { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\ninterface SignatureFormActionsProps {\n onBack?: () => void\n backLabel: string\n submitLabel: string\n isLoading?: boolean\n}\n\nexport function SignatureFormActions({\n onBack,\n backLabel,\n submitLabel,\n isLoading = false,\n}: SignatureFormActionsProps) {\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n {onBack && (\n <Components.Button variant=\"secondary\" type=\"button\" onClick={onBack}>\n {backLabel}\n </Components.Button>\n )}\n <Components.Button type=\"submit\" isLoading={isLoading}>\n {submitLabel}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["SignatureFormActions","onBack","backLabel","submitLabel","isLoading","Components","useComponentContext","ActionsLayout","jsx"],"mappings":";;;AAUO,SAASA,EAAqB;AAAA,EACnC,QAAAC;AAAA,EACA,WAAAC;AAAA,EACA,aAAAC;AAAA,EACA,WAAAC,IAAY;AACd,GAA8B;AAC5B,QAAMC,IAAaC,EAAA;AAEnB,2BACGC,GAAA,EACE,UAAA;AAAA,IAAAN,KACC,gBAAAO,EAACH,EAAW,QAAX,EAAkB,SAAQ,aAAY,MAAK,UAAS,SAASJ,GAC3D,UAAAC,EAAA,CACH;AAAA,sBAEDG,EAAW,QAAX,EAAkB,MAAK,UAAS,WAAAD,GAC9B,UAAAD,EAAA,CACH;AAAA,EAAA,GACF;AAEJ;"}
1
+ {"version":3,"file":"SignatureFormActions.js","sources":["../../../../src/components/Common/SignatureForm/SignatureFormActions.tsx"],"sourcesContent":["import { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\ninterface SignatureFormActionsProps {\n onBack?: () => void\n backLabel: string\n submitLabel: string\n isLoading?: boolean\n}\n\nexport function SignatureFormActions({\n onBack,\n backLabel,\n submitLabel,\n isLoading = false,\n}: SignatureFormActionsProps) {\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n {onBack && (\n <Components.Button variant=\"secondary\" type=\"button\" onClick={onBack}>\n {backLabel}\n </Components.Button>\n )}\n <Components.Button type=\"submit\" isLoading={isLoading}>\n {submitLabel}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["SignatureFormActions","onBack","backLabel","submitLabel","isLoading","Components","useComponentContext","ActionsLayout","jsx"],"mappings":";;;;;;;AAUO,SAASA,EAAqB;AAAA,EACnC,QAAAC;AAAA,EACA,WAAAC;AAAA,EACA,aAAAC;AAAA,EACA,WAAAC,IAAY;AACd,GAA8B;AAC5B,QAAMC,IAAaC,EAAA;AAEnB,2BACGC,GAAA,EACE,UAAA;AAAA,IAAAN,KACC,gBAAAO,EAACH,EAAW,QAAX,EAAkB,SAAQ,aAAY,MAAK,UAAS,SAASJ,GAC3D,UAAAC,EAAA,CACH;AAAA,sBAEDG,EAAW,QAAX,EAAkB,MAAK,UAAS,WAAAD,GAC9B,UAAAD,EAAA,CACH;AAAA,EAAA,GACF;AAEJ;"}
@@ -1,36 +1,41 @@
1
- import { jsxs as s, Fragment as m, jsx as e } from "react/jsx-runtime";
2
- import { TextInputField as a } from "../Fields/TextInputField/TextInputField.js";
3
- import { CheckboxField as u } from "../Fields/CheckboxField/CheckboxField.js";
4
- function p({
5
- signatureLabel: r,
1
+ import { jsxs as n, Fragment as s, jsx as r } from "react/jsx-runtime";
2
+ import "../../../shared/constants.js";
3
+ import "classnames";
4
+ import { TextInputField as p } from "../Fields/TextInputField/TextInputField.js";
5
+ import "react-i18next";
6
+ import "../../../contexts/ComponentAdapter/useComponentContext.js";
7
+ import "react";
8
+ import { CheckboxField as a } from "../Fields/CheckboxField/CheckboxField.js";
9
+ function b({
10
+ signatureLabel: e,
6
11
  signatureDescription: i = "",
7
12
  signatureError: t = "",
8
13
  confirmationLabel: o,
9
- confirmationError: n = ""
14
+ confirmationError: m = ""
10
15
  }) {
11
- return /* @__PURE__ */ s(m, { children: [
12
- /* @__PURE__ */ e(
13
- a,
16
+ return /* @__PURE__ */ n(s, { children: [
17
+ /* @__PURE__ */ r(
18
+ p,
14
19
  {
15
20
  name: "signature",
16
- label: r,
21
+ label: e,
17
22
  description: i,
18
23
  errorMessage: t,
19
24
  isRequired: !0
20
25
  }
21
26
  ),
22
- /* @__PURE__ */ e(
23
- u,
27
+ /* @__PURE__ */ r(
28
+ a,
24
29
  {
25
30
  name: "confirmSignature",
26
31
  isRequired: !0,
27
32
  label: o,
28
- errorMessage: n
33
+ errorMessage: m
29
34
  }
30
35
  )
31
36
  ] });
32
37
  }
33
38
  export {
34
- p as SignatureFormFields
39
+ b as SignatureFormFields
35
40
  };
36
41
  //# sourceMappingURL=SignatureFormFields.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SignatureFormFields.js","sources":["../../../../src/components/Common/SignatureForm/SignatureFormFields.tsx"],"sourcesContent":["import { TextInputField, CheckboxField } from '@/components/Common'\n\ninterface SignatureFormFieldsProps {\n signatureLabel: string\n signatureDescription?: string\n signatureError?: string\n confirmationLabel: string\n confirmationError?: string\n}\n\nexport function SignatureFormFields({\n signatureLabel,\n signatureDescription = '',\n signatureError = '',\n confirmationLabel,\n confirmationError = '',\n}: SignatureFormFieldsProps) {\n return (\n <>\n <TextInputField\n name=\"signature\"\n label={signatureLabel}\n description={signatureDescription}\n errorMessage={signatureError}\n isRequired\n />\n <CheckboxField\n name=\"confirmSignature\"\n isRequired\n label={confirmationLabel}\n errorMessage={confirmationError}\n />\n </>\n )\n}\n"],"names":["SignatureFormFields","signatureLabel","signatureDescription","signatureError","confirmationLabel","confirmationError","jsxs","Fragment","jsx","TextInputField","CheckboxField"],"mappings":";;;AAUO,SAASA,EAAoB;AAAA,EAClC,gBAAAC;AAAA,EACA,sBAAAC,IAAuB;AAAA,EACvB,gBAAAC,IAAiB;AAAA,EACjB,mBAAAC;AAAA,EACA,mBAAAC,IAAoB;AACtB,GAA6B;AAC3B,SACE,gBAAAC,EAAAC,GAAA,EACE,UAAA;AAAA,IAAA,gBAAAC;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,OAAOR;AAAA,QACP,aAAaC;AAAA,QACb,cAAcC;AAAA,QACd,YAAU;AAAA,MAAA;AAAA,IAAA;AAAA,IAEZ,gBAAAK;AAAA,MAACE;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,YAAU;AAAA,QACV,OAAON;AAAA,QACP,cAAcC;AAAA,MAAA;AAAA,IAAA;AAAA,EAChB,GACF;AAEJ;"}
1
+ {"version":3,"file":"SignatureFormFields.js","sources":["../../../../src/components/Common/SignatureForm/SignatureFormFields.tsx"],"sourcesContent":["import { TextInputField, CheckboxField } from '@/components/Common'\n\ninterface SignatureFormFieldsProps {\n signatureLabel: string\n signatureDescription?: string\n signatureError?: string\n confirmationLabel: string\n confirmationError?: string\n}\n\nexport function SignatureFormFields({\n signatureLabel,\n signatureDescription = '',\n signatureError = '',\n confirmationLabel,\n confirmationError = '',\n}: SignatureFormFieldsProps) {\n return (\n <>\n <TextInputField\n name=\"signature\"\n label={signatureLabel}\n description={signatureDescription}\n errorMessage={signatureError}\n isRequired\n />\n <CheckboxField\n name=\"confirmSignature\"\n isRequired\n label={confirmationLabel}\n errorMessage={confirmationError}\n />\n </>\n )\n}\n"],"names":["SignatureFormFields","signatureLabel","signatureDescription","signatureError","confirmationLabel","confirmationError","jsxs","Fragment","jsx","TextInputField","CheckboxField"],"mappings":";;;;;;;;AAUO,SAASA,EAAoB;AAAA,EAClC,gBAAAC;AAAA,EACA,sBAAAC,IAAuB;AAAA,EACvB,gBAAAC,IAAiB;AAAA,EACjB,mBAAAC;AAAA,EACA,mBAAAC,IAAoB;AACtB,GAA6B;AAC3B,SACE,gBAAAC,EAAAC,GAAA,EACE,UAAA;AAAA,IAAA,gBAAAC;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,OAAOR;AAAA,QACP,aAAaC;AAAA,QACb,cAAcC;AAAA,QACd,YAAU;AAAA,MAAA;AAAA,IAAA;AAAA,IAEZ,gBAAAK;AAAA,MAACE;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,YAAU;AAAA,QACV,OAAON;AAAA,QACP,cAAcC;AAAA,MAAA;AAAA,IAAA;AAAA,EAChB,GACF;AAEJ;"}
@@ -1,39 +1,40 @@
1
- import { jsx as r, jsxs as t } from "react/jsx-runtime";
2
- import { useId as u, useRef as p, useEffect as v } from "react";
3
- import g from "classnames";
4
- import { ButtonIcon as N } from "../Button/ButtonIcon.js";
5
- import { AlertDefaults as b } from "./AlertTypes.js";
1
+ import { jsx as r, jsxs as n } from "react/jsx-runtime";
2
+ import { useId as p, useRef as v, useEffect as g } from "react";
3
+ import N from "classnames";
4
+ import { ButtonIcon as b } from "../Button/ButtonIcon.js";
5
+ import { AlertDefaults as I } from "./AlertTypes.js";
6
6
  import e from "./Alert.module.scss.js";
7
7
  import { applyMissingDefaults as S } from "../../../../helpers/applyMissingDefaults.js";
8
- import I from "../../../../assets/icons/info.svg.js";
9
- import y from "../../../../assets/icons/success_check.svg.js";
10
- import C from "../../../../assets/icons/warning.svg.js";
11
- import D from "../../../../assets/icons/error.svg.js";
12
- import w from "../../../../assets/icons/close.svg.js";
13
- function q(n) {
14
- const l = S(n, b), { label: c, children: m, status: i, icon: d, className: f, onDismiss: a } = l, o = u(), s = p(null), h = i === "info" ? /* @__PURE__ */ r(I, { "aria-hidden": !0 }) : i === "success" ? /* @__PURE__ */ r(y, { "aria-hidden": !0 }) : i === "warning" ? /* @__PURE__ */ r(C, { "aria-hidden": !0 }) : /* @__PURE__ */ r(D, { "aria-hidden": !0 });
15
- return v(() => {
16
- s.current && s.current.scrollIntoView({ behavior: "smooth" });
17
- }, []), /* @__PURE__ */ r("div", { className: g(e.root, f), children: /* @__PURE__ */ t(
8
+ import w from "../../../../assets/icons/info.svg.js";
9
+ import x from "../../../../assets/icons/success_check.svg.js";
10
+ import y from "../../../../assets/icons/warning.svg.js";
11
+ import C from "../../../../assets/icons/error.svg.js";
12
+ import D from "../../../../assets/icons/close.svg.js";
13
+ function z(l) {
14
+ const c = S(l, I), { label: m, children: d, status: i, icon: f, className: h, onDismiss: o, disableScrollIntoView: a } = c, t = p(), s = v(null), u = i === "info" ? /* @__PURE__ */ r(w, { "aria-hidden": !0 }) : i === "success" ? /* @__PURE__ */ r(x, { "aria-hidden": !0 }) : i === "warning" ? /* @__PURE__ */ r(y, { "aria-hidden": !0 }) : /* @__PURE__ */ r(C, { "aria-hidden": !0 });
15
+ return g(() => {
16
+ !a && s.current && (s.current.scrollIntoView({ behavior: "smooth" }), s.current.focus());
17
+ }, [a]), /* @__PURE__ */ r("div", { className: N(e.root, h), children: /* @__PURE__ */ n(
18
18
  "div",
19
19
  {
20
20
  className: e.alert,
21
21
  role: "alert",
22
- "aria-labelledby": o,
22
+ "aria-labelledby": t,
23
23
  "data-variant": i,
24
24
  ref: s,
25
+ tabIndex: -1,
25
26
  children: [
26
- /* @__PURE__ */ r("div", { className: e.header, children: /* @__PURE__ */ t("div", { className: e.iconLabelContainer, children: [
27
- /* @__PURE__ */ r("div", { className: e.icon, children: d || h }),
28
- /* @__PURE__ */ r("h6", { id: o, children: c }),
29
- a && /* @__PURE__ */ r("div", { className: e.dismiss, children: /* @__PURE__ */ r(N, { variant: "tertiary", onClick: a, "aria-label": "Dismiss alert", children: /* @__PURE__ */ r(w, { width: 36, height: 36 }) }) })
27
+ /* @__PURE__ */ r("div", { className: e.header, children: /* @__PURE__ */ n("div", { className: e.iconLabelContainer, children: [
28
+ /* @__PURE__ */ r("div", { className: e.icon, children: f || u }),
29
+ /* @__PURE__ */ r("h6", { id: t, children: m }),
30
+ o && /* @__PURE__ */ r("div", { className: e.dismiss, children: /* @__PURE__ */ r(b, { variant: "tertiary", onClick: o, "aria-label": "Dismiss alert", children: /* @__PURE__ */ r(D, { width: 36, height: 36 }) }) })
30
31
  ] }) }),
31
- /* @__PURE__ */ r("div", { className: e.content, children: m })
32
+ /* @__PURE__ */ r("div", { className: e.content, children: d })
32
33
  ]
33
34
  }
34
35
  ) });
35
36
  }
36
37
  export {
37
- q as Alert
38
+ z as Alert
38
39
  };
39
40
  //# sourceMappingURL=Alert.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Alert.js","sources":["../../../../../src/components/Common/UI/Alert/Alert.tsx"],"sourcesContent":["import { useEffect, useId, useRef } from 'react'\nimport classNames from 'classnames'\nimport { ButtonIcon } from '../Button/ButtonIcon'\nimport { type AlertProps, AlertDefaults } from './AlertTypes'\nimport styles from './Alert.module.scss'\nimport { applyMissingDefaults } from '@/helpers/applyMissingDefaults'\nimport InfoIcon from '@/assets/icons/info.svg?react'\nimport SuccessIcon from '@/assets/icons/success_check.svg?react'\nimport WarningIcon from '@/assets/icons/warning.svg?react'\nimport ErrorIcon from '@/assets/icons/error.svg?react'\nimport CloseIcon from '@/assets/icons/close.svg?react'\n\nexport function Alert(rawProps: AlertProps) {\n const resolvedProps = applyMissingDefaults(rawProps, AlertDefaults)\n const { label, children, status, icon, className, onDismiss } = resolvedProps\n const id = useId()\n const alertRef = useRef<HTMLDivElement>(null)\n const defaultIcon =\n status === 'info' ? (\n <InfoIcon aria-hidden />\n ) : status === 'success' ? (\n <SuccessIcon aria-hidden />\n ) : status === 'warning' ? (\n <WarningIcon aria-hidden />\n ) : (\n <ErrorIcon aria-hidden />\n )\n\n useEffect(() => {\n if (alertRef.current) alertRef.current.scrollIntoView({ behavior: 'smooth' })\n }, [])\n\n return (\n <div className={classNames(styles.root, className)}>\n <div\n className={styles.alert}\n role=\"alert\"\n aria-labelledby={id}\n data-variant={status}\n ref={alertRef}\n >\n <div className={styles.header}>\n <div className={styles.iconLabelContainer}>\n <div className={styles.icon}>{icon || defaultIcon}</div>\n <h6 id={id}>{label}</h6>\n {onDismiss && (\n <div className={styles.dismiss}>\n <ButtonIcon variant=\"tertiary\" onClick={onDismiss} aria-label=\"Dismiss alert\">\n <CloseIcon width={36} height={36} />\n </ButtonIcon>\n </div>\n )}\n </div>\n </div>\n <div className={styles.content}>{children}</div>\n </div>\n </div>\n )\n}\n"],"names":["Alert","rawProps","resolvedProps","applyMissingDefaults","AlertDefaults","label","children","status","icon","className","onDismiss","id","useId","alertRef","useRef","defaultIcon","jsx","InfoIcon","SuccessIcon","WarningIcon","ErrorIcon","useEffect","classNames","styles","jsxs","ButtonIcon","CloseIcon"],"mappings":";;;;;;;;;;;;AAYO,SAASA,EAAMC,GAAsB;AAC1C,QAAMC,IAAgBC,EAAqBF,GAAUG,CAAa,GAC5D,EAAE,OAAAC,GAAO,UAAAC,GAAU,QAAAC,GAAQ,MAAAC,GAAM,WAAAC,GAAW,WAAAC,MAAcR,GAC1DS,IAAKC,EAAA,GACLC,IAAWC,EAAuB,IAAI,GACtCC,IACJR,MAAW,SACT,gBAAAS,EAACC,GAAA,EAAS,eAAW,GAAA,CAAC,IACpBV,MAAW,YACb,gBAAAS,EAACE,GAAA,EAAY,eAAW,GAAA,CAAC,IACvBX,MAAW,YACb,gBAAAS,EAACG,GAAA,EAAY,eAAW,GAAA,CAAC,IAEzB,gBAAAH,EAACI,GAAA,EAAU,eAAW,GAAA,CAAC;AAG3B,SAAAC,EAAU,MAAM;AACd,IAAIR,EAAS,WAASA,EAAS,QAAQ,eAAe,EAAE,UAAU,UAAU;AAAA,EAC9E,GAAG,CAAA,CAAE,qBAGF,OAAA,EAAI,WAAWS,EAAWC,EAAO,MAAMd,CAAS,GAC/C,UAAA,gBAAAe;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWD,EAAO;AAAA,MAClB,MAAK;AAAA,MACL,mBAAiBZ;AAAA,MACjB,gBAAcJ;AAAA,MACd,KAAKM;AAAA,MAEL,UAAA;AAAA,QAAA,gBAAAG,EAAC,OAAA,EAAI,WAAWO,EAAO,QACrB,4BAAC,OAAA,EAAI,WAAWA,EAAO,oBACrB,UAAA;AAAA,UAAA,gBAAAP,EAAC,OAAA,EAAI,WAAWO,EAAO,MAAO,eAAQR,GAAY;AAAA,UAClD,gBAAAC,EAAC,MAAA,EAAG,IAAAL,GAAS,UAAAN,EAAA,CAAM;AAAA,UAClBK,uBACE,OAAA,EAAI,WAAWa,EAAO,SACrB,UAAA,gBAAAP,EAACS,KAAW,SAAQ,YAAW,SAASf,GAAW,cAAW,iBAC5D,UAAA,gBAAAM,EAACU,GAAA,EAAU,OAAO,IAAI,QAAQ,GAAA,CAAI,EAAA,CACpC,EAAA,CACF;AAAA,QAAA,EAAA,CAEJ,EAAA,CACF;AAAA,QACA,gBAAAV,EAAC,OAAA,EAAI,WAAWO,EAAO,SAAU,UAAAjB,EAAA,CAAS;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA,GAE9C;AAEJ;"}
1
+ {"version":3,"file":"Alert.js","sources":["../../../../../src/components/Common/UI/Alert/Alert.tsx"],"sourcesContent":["import { useEffect, useId, useRef } from 'react'\nimport classNames from 'classnames'\nimport { ButtonIcon } from '../Button/ButtonIcon'\nimport { type AlertProps, AlertDefaults } from './AlertTypes'\nimport styles from './Alert.module.scss'\nimport { applyMissingDefaults } from '@/helpers/applyMissingDefaults'\nimport InfoIcon from '@/assets/icons/info.svg?react'\nimport SuccessIcon from '@/assets/icons/success_check.svg?react'\nimport WarningIcon from '@/assets/icons/warning.svg?react'\nimport ErrorIcon from '@/assets/icons/error.svg?react'\nimport CloseIcon from '@/assets/icons/close.svg?react'\n\nexport function Alert(rawProps: AlertProps) {\n const resolvedProps = applyMissingDefaults(rawProps, AlertDefaults)\n const { label, children, status, icon, className, onDismiss, disableScrollIntoView } =\n resolvedProps\n const id = useId()\n const alertRef = useRef<HTMLDivElement>(null)\n const defaultIcon =\n status === 'info' ? (\n <InfoIcon aria-hidden />\n ) : status === 'success' ? (\n <SuccessIcon aria-hidden />\n ) : status === 'warning' ? (\n <WarningIcon aria-hidden />\n ) : (\n <ErrorIcon aria-hidden />\n )\n\n useEffect(() => {\n if (!disableScrollIntoView && alertRef.current) {\n alertRef.current.scrollIntoView({ behavior: 'smooth' })\n alertRef.current.focus()\n }\n }, [disableScrollIntoView])\n\n return (\n <div className={classNames(styles.root, className)}>\n <div\n className={styles.alert}\n role=\"alert\"\n aria-labelledby={id}\n data-variant={status}\n ref={alertRef}\n tabIndex={-1}\n >\n <div className={styles.header}>\n <div className={styles.iconLabelContainer}>\n <div className={styles.icon}>{icon || defaultIcon}</div>\n <h6 id={id}>{label}</h6>\n {onDismiss && (\n <div className={styles.dismiss}>\n <ButtonIcon variant=\"tertiary\" onClick={onDismiss} aria-label=\"Dismiss alert\">\n <CloseIcon width={36} height={36} />\n </ButtonIcon>\n </div>\n )}\n </div>\n </div>\n <div className={styles.content}>{children}</div>\n </div>\n </div>\n )\n}\n"],"names":["Alert","rawProps","resolvedProps","applyMissingDefaults","AlertDefaults","label","children","status","icon","className","onDismiss","disableScrollIntoView","id","useId","alertRef","useRef","defaultIcon","jsx","InfoIcon","SuccessIcon","WarningIcon","ErrorIcon","useEffect","classNames","styles","jsxs","ButtonIcon","CloseIcon"],"mappings":";;;;;;;;;;;;AAYO,SAASA,EAAMC,GAAsB;AAC1C,QAAMC,IAAgBC,EAAqBF,GAAUG,CAAa,GAC5D,EAAE,OAAAC,GAAO,UAAAC,GAAU,QAAAC,GAAQ,MAAAC,GAAM,WAAAC,GAAW,WAAAC,GAAW,uBAAAC,MAC3DT,GACIU,IAAKC,EAAA,GACLC,IAAWC,EAAuB,IAAI,GACtCC,IACJT,MAAW,SACT,gBAAAU,EAACC,GAAA,EAAS,eAAW,GAAA,CAAC,IACpBX,MAAW,YACb,gBAAAU,EAACE,GAAA,EAAY,eAAW,GAAA,CAAC,IACvBZ,MAAW,YACb,gBAAAU,EAACG,GAAA,EAAY,eAAW,GAAA,CAAC,IAEzB,gBAAAH,EAACI,GAAA,EAAU,eAAW,GAAA,CAAC;AAG3B,SAAAC,EAAU,MAAM;AACd,IAAI,CAACX,KAAyBG,EAAS,YACrCA,EAAS,QAAQ,eAAe,EAAE,UAAU,UAAU,GACtDA,EAAS,QAAQ,MAAA;AAAA,EAErB,GAAG,CAACH,CAAqB,CAAC,qBAGvB,OAAA,EAAI,WAAWY,EAAWC,EAAO,MAAMf,CAAS,GAC/C,UAAA,gBAAAgB;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWD,EAAO;AAAA,MAClB,MAAK;AAAA,MACL,mBAAiBZ;AAAA,MACjB,gBAAcL;AAAA,MACd,KAAKO;AAAA,MACL,UAAU;AAAA,MAEV,UAAA;AAAA,QAAA,gBAAAG,EAAC,OAAA,EAAI,WAAWO,EAAO,QACrB,4BAAC,OAAA,EAAI,WAAWA,EAAO,oBACrB,UAAA;AAAA,UAAA,gBAAAP,EAAC,OAAA,EAAI,WAAWO,EAAO,MAAO,eAAQR,GAAY;AAAA,UAClD,gBAAAC,EAAC,MAAA,EAAG,IAAAL,GAAS,UAAAP,EAAA,CAAM;AAAA,UAClBK,uBACE,OAAA,EAAI,WAAWc,EAAO,SACrB,UAAA,gBAAAP,EAACS,KAAW,SAAQ,YAAW,SAAShB,GAAW,cAAW,iBAC5D,UAAA,gBAAAO,EAACU,GAAA,EAAU,OAAO,IAAI,QAAQ,GAAA,CAAI,EAAA,CACpC,EAAA,CACF;AAAA,QAAA,EAAA,CAEJ,EAAA,CACF;AAAA,QACA,gBAAAV,EAAC,OAAA,EAAI,WAAWO,EAAO,SAAU,UAAAlB,EAAA,CAAS;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA,GAE9C;AAEJ;"}
@@ -24,6 +24,10 @@ export interface AlertProps {
24
24
  * Optional callback function called when the dismiss button is clicked
25
25
  */
26
26
  onDismiss?: () => void;
27
+ /**
28
+ * Whether to disable scrolling the alert into view and focusing it on mount. Set to true when using inside modals.
29
+ */
30
+ disableScrollIntoView?: boolean;
27
31
  }
28
32
  /**
29
33
  * Default prop values for Alert component.
@@ -1 +1 @@
1
- {"version":3,"file":"AlertTypes.js","sources":["../../../../../src/components/Common/UI/Alert/AlertTypes.ts"],"sourcesContent":["import type { ReactNode } from 'react'\n\nexport interface AlertProps {\n /**\n * The visual status that the alert should convey\n */\n status?: 'info' | 'success' | 'warning' | 'error'\n /**\n * The label text for the alert\n */\n label: string\n /**\n * Optional children to be rendered inside the alert\n */\n children?: ReactNode\n /**\n * Optional custom icon component to override the default icon\n */\n icon?: ReactNode\n /**\n * CSS className to be applied\n */\n className?: string\n /**\n * Optional callback function called when the dismiss button is clicked\n */\n onDismiss?: () => void\n}\n\n/**\n * Default prop values for Alert component.\n */\nexport const AlertDefaults = {\n status: 'info',\n} as const satisfies Partial<AlertProps>\n"],"names":["AlertDefaults"],"mappings":"AAgCO,MAAMA,IAAgB;AAAA,EAC3B,QAAQ;AACV;"}
1
+ {"version":3,"file":"AlertTypes.js","sources":["../../../../../src/components/Common/UI/Alert/AlertTypes.ts"],"sourcesContent":["import type { ReactNode } from 'react'\n\nexport interface AlertProps {\n /**\n * The visual status that the alert should convey\n */\n status?: 'info' | 'success' | 'warning' | 'error'\n /**\n * The label text for the alert\n */\n label: string\n /**\n * Optional children to be rendered inside the alert\n */\n children?: ReactNode\n /**\n * Optional custom icon component to override the default icon\n */\n icon?: ReactNode\n /**\n * CSS className to be applied\n */\n className?: string\n /**\n * Optional callback function called when the dismiss button is clicked\n */\n onDismiss?: () => void\n /**\n * Whether to disable scrolling the alert into view and focusing it on mount. Set to true when using inside modals.\n */\n disableScrollIntoView?: boolean\n}\n\n/**\n * Default prop values for Alert component.\n */\nexport const AlertDefaults = {\n status: 'info',\n} as const satisfies Partial<AlertProps>\n"],"names":["AlertDefaults"],"mappings":"AAoCO,MAAMA,IAAgB;AAAA,EAC3B,QAAQ;AACV;"}
@@ -1,2 +1,2 @@
1
1
  import { DatePickerProps } from './DatePickerTypes';
2
- export declare const DatePicker: ({ className, description, errorMessage, id, inputRef, isDisabled, isInvalid, isRequired, label, onChange, onBlur, value, ...props }: DatePickerProps) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const DatePicker: ({ className, description, errorMessage, id, inputRef, isDisabled, isInvalid, isRequired, label, onChange, onBlur, value, portalContainer, ...props }: DatePickerProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,20 +1,20 @@
1
1
  import { jsx as r, jsxs as o } from "react/jsx-runtime";
2
- import { DatePicker as b, Group as k, DateInput as A, DateSegment as B, Button as c, Popover as F, Dialog as L, Calendar as j, Heading as E, CalendarGrid as G, CalendarCell as M } from "react-aria-components";
3
- import { useTranslation as z } from "react-i18next";
2
+ import { DatePicker as k, Group as A, DateInput as B, DateSegment as F, Button as c, Popover as L, Dialog as j, Calendar as E, Heading as G, CalendarGrid as M, CalendarCell as z } from "react-aria-components";
3
+ import { useTranslation as H } from "react-i18next";
4
4
  import u from "classnames";
5
- import { parseDate as H } from "@internationalized/date";
6
- import { useFieldIds as R } from "../hooks/useFieldIds.js";
5
+ import { parseDate as R } from "@internationalized/date";
6
+ import { useFieldIds as U } from "../hooks/useFieldIds.js";
7
7
  import i from "./DatePicker.module.scss.js";
8
- import { FieldLayout as U } from "../../FieldLayout/FieldLayout.js";
8
+ import { FieldLayout as _ } from "../../FieldLayout/FieldLayout.js";
9
9
  import "react";
10
- import { useTheme as _ } from "../../../../contexts/ThemeProvider/useTheme.js";
10
+ import { useTheme as $ } from "../../../../contexts/ThemeProvider/useTheme.js";
11
11
  /* empty css */
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
- function Q(e) {
12
+ import q from "../../../../assets/icons/caret-down.svg.js";
13
+ import J from "../../../../assets/icons/caret-right.svg.js";
14
+ import K from "../../../../assets/icons/caret-left.svg.js";
15
+ import O from "../../../../assets/icons/alert-circle.svg.js";
16
+ import { formatDateToStringDate as Q } from "../../../../helpers/dateFormatting.js";
17
+ function W(e) {
18
18
  return e ? new Date(
19
19
  e.year,
20
20
  e.month - 1,
@@ -22,7 +22,7 @@ function Q(e) {
22
22
  e.day
23
23
  ) : null;
24
24
  }
25
- const dr = ({
25
+ const pr = ({
26
26
  className: e,
27
27
  description: n,
28
28
  errorMessage: l,
@@ -35,58 +35,59 @@ const dr = ({
35
35
  onChange: d,
36
36
  onBlur: S,
37
37
  value: p,
38
- ...y
38
+ portalContainer: y,
39
+ ...I
39
40
  }) => {
40
- const { t: a } = z(), { inputId: h, errorMessageId: I, descriptionId: N, ariaDescribedBy: x } = R({
41
+ const { t: a } = H(), { inputId: h, errorMessageId: N, descriptionId: x, ariaDescribedBy: P } = U({
41
42
  inputId: D,
42
43
  errorMessage: l,
43
44
  description: n
44
- }), { container: P } = _(), f = p ? O(p) : "", T = f ? H(f) : null, w = (t) => {
45
- d && d(Q(t));
45
+ }), { container: T } = $(), f = p ? Q(p) : "", w = f ? R(f) : null, b = (t) => {
46
+ d && d(W(t));
46
47
  };
47
48
  return /* @__PURE__ */ r(
48
- U,
49
+ _,
49
50
  {
50
51
  label: s,
51
52
  htmlFor: h,
52
53
  errorMessage: l,
53
- errorMessageId: I,
54
- descriptionId: N,
54
+ errorMessageId: N,
55
+ descriptionId: x,
55
56
  isRequired: C,
56
57
  description: n,
57
58
  className: u(i.root, e),
58
59
  withErrorIcon: !1,
59
60
  children: /* @__PURE__ */ r("div", { className: i.container, children: /* @__PURE__ */ o(
60
- b,
61
+ k,
61
62
  {
62
63
  "aria-label": s,
63
- "aria-describedby": x,
64
+ "aria-describedby": P,
64
65
  id: h,
65
66
  isDisabled: v,
66
67
  isInvalid: m,
67
- value: T,
68
- onChange: w,
69
- ...y,
68
+ value: w,
69
+ onChange: b,
70
+ ...I,
70
71
  children: [
71
- /* @__PURE__ */ o(k, { children: [
72
- /* @__PURE__ */ r(A, { ref: g, children: (t) => /* @__PURE__ */ r(B, { segment: t }) }),
72
+ /* @__PURE__ */ o(A, { children: [
73
+ /* @__PURE__ */ r(B, { ref: g, children: (t) => /* @__PURE__ */ r(F, { segment: t }) }),
73
74
  /* @__PURE__ */ o("div", { className: i.icons, children: [
74
- m && /* @__PURE__ */ r(K, { "aria-hidden": "true", fontSize: 16 }),
75
- /* @__PURE__ */ r(c, { onBlur: S, children: /* @__PURE__ */ r($, { title: a("icons.calendarArrow") }) })
75
+ m && /* @__PURE__ */ r(O, { "aria-hidden": "true", fontSize: 16 }),
76
+ /* @__PURE__ */ r(c, { onBlur: S, children: /* @__PURE__ */ r(q, { title: a("icons.calendarArrow") }) })
76
77
  ] })
77
78
  ] }),
78
79
  /* @__PURE__ */ r(
79
- F,
80
+ L,
80
81
  {
81
82
  className: u(i.popover, "react-aria-Popover"),
82
- UNSTABLE_portalContainer: P.current,
83
- children: /* @__PURE__ */ r(L, { children: /* @__PURE__ */ o(j, { children: [
83
+ UNSTABLE_portalContainer: y || T.current,
84
+ children: /* @__PURE__ */ r(j, { children: /* @__PURE__ */ o(E, { children: [
84
85
  /* @__PURE__ */ o("header", { children: [
85
- /* @__PURE__ */ r(c, { slot: "previous", children: /* @__PURE__ */ r(J, { title: a("icons.previousMonth") }) }),
86
- /* @__PURE__ */ r(E, {}),
87
- /* @__PURE__ */ r(c, { slot: "next", children: /* @__PURE__ */ r(q, { title: a("icons.nextMonth") }) })
86
+ /* @__PURE__ */ r(c, { slot: "previous", children: /* @__PURE__ */ r(K, { title: a("icons.previousMonth") }) }),
87
+ /* @__PURE__ */ r(G, {}),
88
+ /* @__PURE__ */ r(c, { slot: "next", children: /* @__PURE__ */ r(J, { title: a("icons.nextMonth") }) })
88
89
  ] }),
89
- /* @__PURE__ */ r(G, { children: (t) => /* @__PURE__ */ r(M, { date: t }) })
90
+ /* @__PURE__ */ r(M, { children: (t) => /* @__PURE__ */ r(z, { date: t }) })
90
91
  ] }) })
91
92
  }
92
93
  )
@@ -97,6 +98,6 @@ const dr = ({
97
98
  );
98
99
  };
99
100
  export {
100
- dr as DatePicker
101
+ pr as DatePicker
101
102
  };
102
103
  //# sourceMappingURL=DatePicker.js.map
@@ -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 { 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
+ {"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 portalContainer,\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={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","portalContainer","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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"}
@@ -33,4 +33,8 @@ export interface DatePickerProps extends SharedFieldLayoutProps, Pick<InputHTMLA
33
33
  * Placeholder text when no date is selected
34
34
  */
35
35
  placeholder?: string;
36
+ /**
37
+ * Element to use as the portal container
38
+ */
39
+ portalContainer?: HTMLElement;
36
40
  }
@@ -1,26 +1,26 @@
1
- const o = "_dialog_6vred_1", l = "_backdrop_6vred_21", e = "_backdropSmall_6vred_31", d = "_modal_6vred_35", t = "_modalSmall_6vred_58", _ = "_modalOverflowing_6vred_62", a = "_content_6vred_66", r = "_contentScrollable_6vred_72", c = "_footer_6vred_79", n = "_footerFixed_6vred_84", m = {
1
+ const o = "_dialog_19y6l_1", l = "_backdrop_19y6l_21", t = "_backdropSmall_19y6l_31", _ = "_modal_19y6l_35", a = "_modalSmall_19y6l_58", c = "_modalOverflowing_19y6l_62", n = "_content_19y6l_66", e = "_contentScrollable_19y6l_73", d = "_footer_19y6l_80", r = "_footerFixed_19y6l_93", m = {
2
2
  dialog: o,
3
3
  backdrop: l,
4
- backdropSmall: e,
5
- modal: d,
6
- modalSmall: t,
7
- modalOverflowing: _,
8
- content: a,
9
- contentScrollable: r,
10
- footer: c,
11
- footerFixed: n
4
+ backdropSmall: t,
5
+ modal: _,
6
+ modalSmall: a,
7
+ modalOverflowing: c,
8
+ content: n,
9
+ contentScrollable: e,
10
+ footer: d,
11
+ footerFixed: r
12
12
  };
13
13
  export {
14
14
  l as backdrop,
15
- e as backdropSmall,
16
- a as content,
17
- r as contentScrollable,
15
+ t as backdropSmall,
16
+ n as content,
17
+ e as contentScrollable,
18
18
  m as default,
19
19
  o as dialog,
20
- c as footer,
21
- n as footerFixed,
22
- d as modal,
23
- _ as modalOverflowing,
24
- t as modalSmall
20
+ d as footer,
21
+ r as footerFixed,
22
+ _ as modal,
23
+ c as modalOverflowing,
24
+ a as modalSmall
25
25
  };
26
26
  //# sourceMappingURL=Modal.module.scss.js.map
@@ -1,2 +1,2 @@
1
1
  import { SelectProps } from './SelectTypes';
2
- export declare const Select: ({ description, errorMessage, id, isDisabled, isInvalid, isRequired, label, onChange, onBlur, options, placeholder, value, shouldVisuallyHideLabel, name, className, inputRef, ...props }: SelectProps) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const Select: ({ description, errorMessage, id, isDisabled, isInvalid, isRequired, label, onChange, onBlur, options, placeholder, value, shouldVisuallyHideLabel, name, className, inputRef, portalContainer, ...props }: SelectProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,16 +1,16 @@
1
1
  import { jsx as r, jsxs as t } from "react/jsx-runtime";
2
- import { Select as T, Button as j, SelectValue as D, Popover as E, ListBox as P, ListBoxItem as z } from "react-aria-components";
3
- import { useTranslation as H } from "react-i18next";
4
- import { useMemo as K } from "react";
2
+ import { Select as j, Button as D, SelectValue as E, Popover as P, ListBox as z, ListBoxItem as H } from "react-aria-components";
3
+ import { useTranslation as K } from "react-i18next";
4
+ import { useMemo as M } from "react";
5
5
  import p from "classnames";
6
- import { useFieldIds as M } from "../hooks/useFieldIds.js";
6
+ import { useFieldIds as U } from "../hooks/useFieldIds.js";
7
7
  import o from "./Select.module.scss.js";
8
- import { FieldLayout as U } from "../../FieldLayout/FieldLayout.js";
9
- import V from "../../../../assets/icons/caret-down.svg.js";
10
- import _ from "../../../../assets/icons/alert-circle.svg.js";
11
- import { useTheme as $ } from "../../../../contexts/ThemeProvider/useTheme.js";
8
+ import { FieldLayout as V } from "../../FieldLayout/FieldLayout.js";
9
+ import _ from "../../../../assets/icons/caret-down.svg.js";
10
+ import $ from "../../../../assets/icons/alert-circle.svg.js";
11
+ import { useTheme as q } from "../../../../contexts/ThemeProvider/useTheme.js";
12
12
  /* empty css */
13
- const re = ({
13
+ const te = ({
14
14
  description: i,
15
15
  errorMessage: a,
16
16
  id: f,
@@ -27,29 +27,30 @@ const re = ({
27
27
  name: I,
28
28
  className: g,
29
29
  inputRef: B,
30
- ...C
30
+ portalContainer: C,
31
+ ...N
31
32
  }) => {
32
- const { t: N } = H(), { container: b } = $(), { inputId: d, errorMessageId: y, descriptionId: L, ariaDescribedBy: w } = M({
33
+ const { t: b } = K(), { container: y } = q(), { inputId: d, errorMessageId: L, descriptionId: w, ariaDescribedBy: A } = U({
33
34
  inputId: f,
34
35
  errorMessage: a,
35
36
  description: i
36
- }), A = K(() => s.map((e) => ({ name: e.label, id: e.value })), [s]);
37
+ }), F = M(() => s.map((e) => ({ name: e.label, id: e.value })), [s]);
37
38
  return /* @__PURE__ */ r(
38
- U,
39
+ V,
39
40
  {
40
41
  label: n,
41
42
  htmlFor: d,
42
43
  errorMessage: a,
43
- errorMessageId: y,
44
- descriptionId: L,
44
+ errorMessageId: L,
45
+ descriptionId: w,
45
46
  isRequired: h,
46
47
  description: i,
47
48
  shouldVisuallyHideLabel: x,
48
49
  className: p(o.root, "react-aria-CustomSelect", g),
49
50
  withErrorIcon: !1,
50
- ...C,
51
+ ...N,
51
52
  children: /* @__PURE__ */ t(
52
- T,
53
+ j,
53
54
  {
54
55
  "aria-label": n,
55
56
  isDisabled: u,
@@ -60,23 +61,23 @@ const re = ({
60
61
  onBlur: v,
61
62
  id: d,
62
63
  selectedKey: l || void 0,
63
- "aria-describedby": w,
64
+ "aria-describedby": A,
64
65
  name: I,
65
66
  children: [
66
- /* @__PURE__ */ t(j, { ref: B, children: [
67
- /* @__PURE__ */ r(D, { children: ({ defaultChildren: e, isPlaceholder: F }) => F && c ? c : e }),
67
+ /* @__PURE__ */ t(D, { ref: B, children: [
68
+ /* @__PURE__ */ r(E, { children: ({ defaultChildren: e, isPlaceholder: T }) => T && c ? c : e }),
68
69
  /* @__PURE__ */ t("div", { className: o.icons, "aria-hidden": "true", children: [
69
- m && /* @__PURE__ */ r(_, { fontSize: 16 }),
70
- /* @__PURE__ */ r(V, { title: N("icons.selectArrow") })
70
+ m && /* @__PURE__ */ r($, { fontSize: 16 }),
71
+ /* @__PURE__ */ r(_, { title: b("icons.selectArrow") })
71
72
  ] })
72
73
  ] }),
73
74
  /* @__PURE__ */ r(
74
- E,
75
+ P,
75
76
  {
76
77
  className: p(o.popover, "react-aria-Popover"),
77
- UNSTABLE_portalContainer: b.current,
78
+ UNSTABLE_portalContainer: C || y.current,
78
79
  maxHeight: 320,
79
- children: /* @__PURE__ */ r(P, { items: A, children: (e) => /* @__PURE__ */ r(z, { children: e.name }, e.id) })
80
+ children: /* @__PURE__ */ r(z, { items: F, children: (e) => /* @__PURE__ */ r(H, { children: e.name }, e.id) })
80
81
  }
81
82
  )
82
83
  ]
@@ -86,6 +87,6 @@ const re = ({
86
87
  );
87
88
  };
88
89
  export {
89
- re as Select
90
+ te as Select
90
91
  };
91
92
  //# sourceMappingURL=Select.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Select.js","sources":["../../../../../src/components/Common/UI/Select/Select.tsx"],"sourcesContent":["import type { Key } from 'react-aria-components'\nimport {\n Select as AriaSelect,\n Button,\n ListBox,\n ListBoxItem,\n Popover,\n SelectValue,\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 './Select.module.scss'\nimport type { SelectProps } from './SelectTypes'\nimport { FieldLayout } from '@/components/Common/FieldLayout'\nimport CaretDown from '@/assets/icons/caret-down.svg?react'\nimport AlertCircle from '@/assets/icons/alert-circle.svg?react'\nimport { useTheme } from '@/contexts/ThemeProvider'\n\nexport const Select = ({\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 shouldVisuallyHideLabel,\n name,\n className,\n inputRef,\n ...props\n}: SelectProps) => {\n const { t } = useTranslation()\n const { container } = useTheme()\n const { inputId, errorMessageId, descriptionId, ariaDescribedBy } = useFieldIds({\n inputId: id,\n errorMessage,\n description,\n })\n\n const items = useMemo(() => {\n return options.map(o => ({ name: o.label, id: o.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, 'react-aria-CustomSelect', className)}\n withErrorIcon={false}\n {...props}\n >\n <AriaSelect\n aria-label={label}\n isDisabled={isDisabled}\n isInvalid={isInvalid}\n onSelectionChange={key => {\n if (key) {\n onChange?.(key.toString())\n }\n }}\n onBlur={onBlur}\n id={inputId}\n selectedKey={value ? (value as Key) : undefined}\n aria-describedby={ariaDescribedBy}\n name={name}\n >\n <Button ref={inputRef}>\n <SelectValue>\n {({ defaultChildren, isPlaceholder }) => {\n return isPlaceholder && placeholder ? placeholder : defaultChildren\n }}\n </SelectValue>\n <div className={styles.icons} aria-hidden=\"true\">\n {isInvalid && <AlertCircle fontSize={16} />}\n <CaretDown title={t('icons.selectArrow')} />\n </div>\n </Button>\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 </AriaSelect>\n </FieldLayout>\n )\n}\n"],"names":["Select","description","errorMessage","id","isDisabled","isInvalid","isRequired","label","onChange","onBlur","options","placeholder","value","shouldVisuallyHideLabel","name","className","inputRef","props","t","useTranslation","container","useTheme","inputId","errorMessageId","descriptionId","ariaDescribedBy","useFieldIds","items","useMemo","o","jsx","FieldLayout","classNames","styles","jsxs","AriaSelect","key","Button","SelectValue","defaultChildren","isPlaceholder","AlertCircle","CaretDown","Popover","ListBox","item","ListBoxItem"],"mappings":";;;;;;;;;;;;AAoBO,MAAMA,KAAS,CAAC;AAAA,EACrB,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,yBAAAC;AAAA,EACA,MAAAC;AAAA,EACA,WAAAC;AAAA,EACA,UAAAC;AAAA,EACA,GAAGC;AACL,MAAmB;AACjB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAA,GACR,EAAE,WAAAC,EAAA,IAAcC,EAAA,GAChB,EAAE,SAAAC,GAAS,gBAAAC,GAAgB,eAAAC,GAAe,iBAAAC,EAAA,IAAoBC,EAAY;AAAA,IAC9E,SAASvB;AAAA,IACT,cAAAD;AAAA,IACA,aAAAD;AAAA,EAAA,CACD,GAEK0B,IAAQC,EAAQ,MACblB,EAAQ,IAAI,CAAAmB,OAAM,EAAE,MAAMA,EAAE,OAAO,IAAIA,EAAE,MAAA,EAAQ,GACvD,CAACnB,CAAO,CAAC;AAEZ,SACE,gBAAAoB;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,OAAAxB;AAAA,MACA,SAASe;AAAA,MACT,cAAApB;AAAA,MACA,gBAAAqB;AAAA,MACA,eAAAC;AAAA,MACA,YAAAlB;AAAA,MACA,aAAAL;AAAA,MACA,yBAAAY;AAAA,MACA,WAAWmB,EAAWC,EAAO,MAAM,2BAA2BlB,CAAS;AAAA,MACvE,eAAe;AAAA,MACd,GAAGE;AAAA,MAEJ,UAAA,gBAAAiB;AAAA,QAACC;AAAAA,QAAA;AAAA,UACC,cAAY5B;AAAA,UACZ,YAAAH;AAAA,UACA,WAAAC;AAAA,UACA,mBAAmB,CAAA+B,MAAO;AACxB,YAAIA,KACF5B,IAAW4B,EAAI,UAAU;AAAA,UAE7B;AAAA,UACA,QAAA3B;AAAA,UACA,IAAIa;AAAA,UACJ,aAAaV,KAAyB;AAAA,UACtC,oBAAkBa;AAAA,UAClB,MAAAX;AAAA,UAEA,UAAA;AAAA,YAAA,gBAAAoB,EAACG,GAAA,EAAO,KAAKrB,GACX,UAAA;AAAA,cAAA,gBAAAc,EAACQ,GAAA,EACE,UAAA,CAAC,EAAE,iBAAAC,GAAiB,eAAAC,QACZA,KAAiB7B,IAAcA,IAAc4B,GAExD;AAAA,gCACC,OAAA,EAAI,WAAWN,EAAO,OAAO,eAAY,QACvC,UAAA;AAAA,gBAAA5B,KAAa,gBAAAyB,EAACW,GAAA,EAAY,UAAU,GAAA,CAAI;AAAA,gBACzC,gBAAAX,EAACY,GAAA,EAAU,OAAOxB,EAAE,mBAAmB,EAAA,CAAG;AAAA,cAAA,EAAA,CAC5C;AAAA,YAAA,GACF;AAAA,YACA,gBAAAY;AAAA,cAACa;AAAA,cAAA;AAAA,gBACC,WAAWX,EAAWC,EAAO,SAAS,oBAAoB;AAAA,gBAC1D,0BAA0Bb,EAAU;AAAA,gBACpC,WAAW;AAAA,gBAEX,UAAA,gBAAAU,EAACc,GAAA,EAAQ,OAAAjB,GACN,UAAA,CAAAkB,MAAQ,gBAAAf,EAACgB,KAA2B,UAAAD,EAAK,KAAA,GAAfA,EAAK,EAAe,EAAA,CACjD;AAAA,cAAA;AAAA,YAAA;AAAA,UACF;AAAA,QAAA;AAAA,MAAA;AAAA,IACF;AAAA,EAAA;AAGN;"}
1
+ {"version":3,"file":"Select.js","sources":["../../../../../src/components/Common/UI/Select/Select.tsx"],"sourcesContent":["import type { Key } from 'react-aria-components'\nimport {\n Select as AriaSelect,\n Button,\n ListBox,\n ListBoxItem,\n Popover,\n SelectValue,\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 './Select.module.scss'\nimport type { SelectProps } from './SelectTypes'\nimport { FieldLayout } from '@/components/Common/FieldLayout'\nimport CaretDown from '@/assets/icons/caret-down.svg?react'\nimport AlertCircle from '@/assets/icons/alert-circle.svg?react'\nimport { useTheme } from '@/contexts/ThemeProvider'\n\nexport const Select = ({\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 shouldVisuallyHideLabel,\n name,\n className,\n inputRef,\n portalContainer,\n ...props\n}: SelectProps) => {\n const { t } = useTranslation()\n const { container } = useTheme()\n const { inputId, errorMessageId, descriptionId, ariaDescribedBy } = useFieldIds({\n inputId: id,\n errorMessage,\n description,\n })\n\n const items = useMemo(() => {\n return options.map(o => ({ name: o.label, id: o.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, 'react-aria-CustomSelect', className)}\n withErrorIcon={false}\n {...props}\n >\n <AriaSelect\n aria-label={label}\n isDisabled={isDisabled}\n isInvalid={isInvalid}\n onSelectionChange={key => {\n if (key) {\n onChange?.(key.toString())\n }\n }}\n onBlur={onBlur}\n id={inputId}\n selectedKey={value ? (value as Key) : undefined}\n aria-describedby={ariaDescribedBy}\n name={name}\n >\n <Button ref={inputRef}>\n <SelectValue>\n {({ defaultChildren, isPlaceholder }) => {\n return isPlaceholder && placeholder ? placeholder : defaultChildren\n }}\n </SelectValue>\n <div className={styles.icons} aria-hidden=\"true\">\n {isInvalid && <AlertCircle fontSize={16} />}\n <CaretDown title={t('icons.selectArrow')} />\n </div>\n </Button>\n <Popover\n className={classNames(styles.popover, 'react-aria-Popover')}\n UNSTABLE_portalContainer={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 </AriaSelect>\n </FieldLayout>\n )\n}\n"],"names":["Select","description","errorMessage","id","isDisabled","isInvalid","isRequired","label","onChange","onBlur","options","placeholder","value","shouldVisuallyHideLabel","name","className","inputRef","portalContainer","props","t","useTranslation","container","useTheme","inputId","errorMessageId","descriptionId","ariaDescribedBy","useFieldIds","items","useMemo","o","jsx","FieldLayout","classNames","styles","jsxs","AriaSelect","key","Button","SelectValue","defaultChildren","isPlaceholder","AlertCircle","CaretDown","Popover","ListBox","item","ListBoxItem"],"mappings":";;;;;;;;;;;;AAoBO,MAAMA,KAAS,CAAC;AAAA,EACrB,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,yBAAAC;AAAA,EACA,MAAAC;AAAA,EACA,WAAAC;AAAA,EACA,UAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,GAAGC;AACL,MAAmB;AACjB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAA,GACR,EAAE,WAAAC,EAAA,IAAcC,EAAA,GAChB,EAAE,SAAAC,GAAS,gBAAAC,GAAgB,eAAAC,GAAe,iBAAAC,EAAA,IAAoBC,EAAY;AAAA,IAC9E,SAASxB;AAAA,IACT,cAAAD;AAAA,IACA,aAAAD;AAAA,EAAA,CACD,GAEK2B,IAAQC,EAAQ,MACbnB,EAAQ,IAAI,CAAAoB,OAAM,EAAE,MAAMA,EAAE,OAAO,IAAIA,EAAE,MAAA,EAAQ,GACvD,CAACpB,CAAO,CAAC;AAEZ,SACE,gBAAAqB;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,OAAAzB;AAAA,MACA,SAASgB;AAAA,MACT,cAAArB;AAAA,MACA,gBAAAsB;AAAA,MACA,eAAAC;AAAA,MACA,YAAAnB;AAAA,MACA,aAAAL;AAAA,MACA,yBAAAY;AAAA,MACA,WAAWoB,EAAWC,EAAO,MAAM,2BAA2BnB,CAAS;AAAA,MACvE,eAAe;AAAA,MACd,GAAGG;AAAA,MAEJ,UAAA,gBAAAiB;AAAA,QAACC;AAAAA,QAAA;AAAA,UACC,cAAY7B;AAAA,UACZ,YAAAH;AAAA,UACA,WAAAC;AAAA,UACA,mBAAmB,CAAAgC,MAAO;AACxB,YAAIA,KACF7B,IAAW6B,EAAI,UAAU;AAAA,UAE7B;AAAA,UACA,QAAA5B;AAAA,UACA,IAAIc;AAAA,UACJ,aAAaX,KAAyB;AAAA,UACtC,oBAAkBc;AAAA,UAClB,MAAAZ;AAAA,UAEA,UAAA;AAAA,YAAA,gBAAAqB,EAACG,GAAA,EAAO,KAAKtB,GACX,UAAA;AAAA,cAAA,gBAAAe,EAACQ,GAAA,EACE,UAAA,CAAC,EAAE,iBAAAC,GAAiB,eAAAC,QACZA,KAAiB9B,IAAcA,IAAc6B,GAExD;AAAA,gCACC,OAAA,EAAI,WAAWN,EAAO,OAAO,eAAY,QACvC,UAAA;AAAA,gBAAA7B,KAAa,gBAAA0B,EAACW,GAAA,EAAY,UAAU,GAAA,CAAI;AAAA,gBACzC,gBAAAX,EAACY,GAAA,EAAU,OAAOxB,EAAE,mBAAmB,EAAA,CAAG;AAAA,cAAA,EAAA,CAC5C;AAAA,YAAA,GACF;AAAA,YACA,gBAAAY;AAAA,cAACa;AAAA,cAAA;AAAA,gBACC,WAAWX,EAAWC,EAAO,SAAS,oBAAoB;AAAA,gBAC1D,0BAA0BjB,KAAmBI,EAAU;AAAA,gBACvD,WAAW;AAAA,gBAEX,UAAA,gBAAAU,EAACc,GAAA,EAAQ,OAAAjB,GACN,UAAA,CAAAkB,MAAQ,gBAAAf,EAACgB,KAA2B,UAAAD,EAAK,KAAA,GAAfA,EAAK,EAAe,EAAA,CACjD;AAAA,cAAA;AAAA,YAAA;AAAA,UACF;AAAA,QAAA;AAAA,MAAA;AAAA,IACF;AAAA,EAAA;AAGN;"}