@gusto/embedded-react-sdk 0.25.0 → 0.26.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 (404) hide show
  1. package/CHANGELOG.md +49 -0
  2. package/dist/assets/icons/icon-file-jpg.svg.js +10 -0
  3. package/dist/assets/icons/icon-file-jpg.svg.js.map +1 -0
  4. package/dist/assets/icons/icon-file-pdf.svg.js +10 -0
  5. package/dist/assets/icons/icon-file-pdf.svg.js.map +1 -0
  6. package/dist/assets/icons/icon-file-png.svg.js +10 -0
  7. package/dist/assets/icons/icon-file-png.svg.js.map +1 -0
  8. package/dist/assets/icons/icon-trashcan.svg.js +10 -0
  9. package/dist/assets/icons/icon-trashcan.svg.js.map +1 -0
  10. package/dist/components/Base/Base.js +12 -13
  11. package/dist/components/Base/Base.js.map +1 -1
  12. package/dist/components/Common/SignatureForm/SignatureForm.js +10 -12
  13. package/dist/components/Common/SignatureForm/SignatureForm.js.map +1 -1
  14. package/dist/components/Common/SignatureForm/SignatureFormActions.js +3 -4
  15. package/dist/components/Common/SignatureForm/SignatureFormActions.js.map +1 -1
  16. package/dist/components/Common/SignatureForm/SignatureFormFields.js +6 -7
  17. package/dist/components/Common/SignatureForm/SignatureFormFields.js.map +1 -1
  18. package/dist/components/Common/UI/Alert/Alert.js +10 -10
  19. package/dist/components/Common/UI/Alert/Alert.js.map +1 -1
  20. package/dist/components/Common/UI/Alert/Alert.module.scss.js +14 -14
  21. package/dist/components/Common/UI/Badge/Badge.module.scss.js +1 -1
  22. package/dist/components/Common/UI/Banner/Banner.module.scss.js +4 -4
  23. package/dist/components/Common/UI/ComboBox/ComboBox.module.scss.js +6 -6
  24. package/dist/components/Common/UI/FileInput/FileInput.js +105 -106
  25. package/dist/components/Common/UI/FileInput/FileInput.js.map +1 -1
  26. package/dist/components/Common/UI/FileInput/FileInput.module.scss.js +30 -28
  27. package/dist/components/Common/UI/FileInput/FileInput.module.scss.js.map +1 -1
  28. package/dist/components/Common/UI/Input/Input.module.scss.js +7 -7
  29. package/dist/components/Common/UI/List/List.module.scss.js +1 -1
  30. package/dist/components/Common/UI/Modal/Modal.js +41 -40
  31. package/dist/components/Common/UI/Modal/Modal.js.map +1 -1
  32. package/dist/components/Common/UI/Modal/Modal.module.scss.js +4 -4
  33. package/dist/components/Common/UI/Select/Select.module.scss.js +6 -6
  34. package/dist/components/Common/UI/TextArea/TextArea.module.scss.js +4 -4
  35. package/dist/components/Company/AssignSignatory/AssignSignatory.js +2 -3
  36. package/dist/components/Company/AssignSignatory/AssignSignatory.js.map +1 -1
  37. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js +2 -3
  38. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js.map +1 -1
  39. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js +2 -3
  40. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js.map +1 -1
  41. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js +1 -1
  42. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js +5 -6
  43. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js.map +1 -1
  44. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +1 -1
  45. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js +2 -3
  46. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js.map +1 -1
  47. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js +1 -1
  48. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +4 -5
  49. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js.map +1 -1
  50. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +1 -1
  51. package/dist/components/Company/AssignSignatory/TitleSelect.js +3 -4
  52. package/dist/components/Company/AssignSignatory/TitleSelect.js.map +1 -1
  53. package/dist/components/Company/AssignSignatory/useAssignSignatory.js +1 -1
  54. package/dist/components/Company/BankAccount/BankAccountForm/Actions.js +8 -9
  55. package/dist/components/Company/BankAccount/BankAccountForm/Actions.js.map +1 -1
  56. package/dist/components/Company/BankAccount/BankAccountForm/Form.js +4 -6
  57. package/dist/components/Company/BankAccount/BankAccountForm/Form.js.map +1 -1
  58. package/dist/components/Company/BankAccount/BankAccountForm/context.js +1 -1
  59. package/dist/components/Company/BankAccount/BankAccountList/Actions.js +2 -3
  60. package/dist/components/Company/BankAccount/BankAccountList/Actions.js.map +1 -1
  61. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js +6 -7
  62. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js.map +1 -1
  63. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js +4 -6
  64. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js.map +1 -1
  65. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js +2 -3
  66. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js.map +1 -1
  67. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js +8 -9
  68. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  69. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +1 -1
  70. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +3 -4
  71. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
  72. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js +1 -1
  73. package/dist/components/Company/FederalTaxes/Actions.js +6 -7
  74. package/dist/components/Company/FederalTaxes/Actions.js.map +1 -1
  75. package/dist/components/Company/FederalTaxes/FederalTaxes.js +3 -4
  76. package/dist/components/Company/FederalTaxes/FederalTaxes.js.map +1 -1
  77. package/dist/components/Company/FederalTaxes/Form.js +2 -4
  78. package/dist/components/Company/FederalTaxes/Form.js.map +1 -1
  79. package/dist/components/Company/FederalTaxes/useFederalTaxes.js +1 -1
  80. package/dist/components/Company/Industry/Actions.js +7 -8
  81. package/dist/components/Company/Industry/Actions.js.map +1 -1
  82. package/dist/components/Company/Industry/Context.js +1 -1
  83. package/dist/components/Company/Industry/Edit.js +2 -3
  84. package/dist/components/Company/Industry/Edit.js.map +1 -1
  85. package/dist/components/Company/Locations/LocationForm/Actions.js +6 -7
  86. package/dist/components/Company/Locations/LocationForm/Actions.js.map +1 -1
  87. package/dist/components/Company/Locations/LocationForm/Form.js +4 -5
  88. package/dist/components/Company/Locations/LocationForm/Form.js.map +1 -1
  89. package/dist/components/Company/Locations/LocationForm/LocationForm.js +3 -4
  90. package/dist/components/Company/Locations/LocationForm/LocationForm.js.map +1 -1
  91. package/dist/components/Company/Locations/LocationForm/useLocationForm.js +1 -1
  92. package/dist/components/Company/Locations/LocationsList/Actions.js +2 -3
  93. package/dist/components/Company/Locations/LocationsList/Actions.js.map +1 -1
  94. package/dist/components/Company/Locations/LocationsList/List.js +6 -7
  95. package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
  96. package/dist/components/Company/Locations/LocationsList/LocationsList.js +7 -8
  97. package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
  98. package/dist/components/Company/Locations/LocationsList/useLocationsList.js +1 -1
  99. package/dist/components/Company/OnboardingOverview/Completed.js +10 -12
  100. package/dist/components/Company/OnboardingOverview/Completed.js.map +1 -1
  101. package/dist/components/Company/OnboardingOverview/MissingRequirements.js +6 -8
  102. package/dist/components/Company/OnboardingOverview/MissingRequirements.js.map +1 -1
  103. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js +7 -8
  104. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js.map +1 -1
  105. package/dist/components/Company/OnboardingOverview/context.js +1 -1
  106. package/dist/components/Company/PaySchedule/PaySchedule.js +3 -4
  107. package/dist/components/Company/PaySchedule/PaySchedule.js.map +1 -1
  108. package/dist/components/Company/PaySchedule/_parts/Actions.js +2 -3
  109. package/dist/components/Company/PaySchedule/_parts/Actions.js.map +1 -1
  110. package/dist/components/Company/PaySchedule/_parts/Edit.js +9 -10
  111. package/dist/components/Company/PaySchedule/_parts/Edit.js.map +1 -1
  112. package/dist/components/Company/PaySchedule/_parts/Head.js +11 -13
  113. package/dist/components/Company/PaySchedule/_parts/Head.js.map +1 -1
  114. package/dist/components/Company/PaySchedule/_parts/List.js +13 -15
  115. package/dist/components/Company/PaySchedule/_parts/List.js.map +1 -1
  116. package/dist/components/Company/PaySchedule/usePaySchedule.js +1 -1
  117. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js +2 -3
  118. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js.map +1 -1
  119. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +1 -1
  120. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js +2 -3
  121. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js.map +1 -1
  122. package/dist/components/Company/StateTaxes/StateTaxesList/List.js +2 -3
  123. package/dist/components/Company/StateTaxes/StateTaxesList/List.js.map +1 -1
  124. package/dist/components/Company/StateTaxes/StateTaxesList/context.js +1 -1
  125. package/dist/components/Contractor/Address/Address.js +4 -5
  126. package/dist/components/Contractor/Address/Address.js.map +1 -1
  127. package/dist/components/Contractor/Address/Form.js +6 -7
  128. package/dist/components/Contractor/Address/Form.js.map +1 -1
  129. package/dist/components/Contractor/Address/useAddress.js +1 -1
  130. package/dist/components/Contractor/ContractorList/index.js +31 -32
  131. package/dist/components/Contractor/ContractorList/index.js.map +1 -1
  132. package/dist/components/Contractor/NewHireReport/NewHireReport.js +13 -14
  133. package/dist/components/Contractor/NewHireReport/NewHireReport.js.map +1 -1
  134. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js +10 -11
  135. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js.map +1 -1
  136. package/dist/components/Contractor/PaymentMethod/PaymentMethod.js +2 -3
  137. package/dist/components/Contractor/PaymentMethod/PaymentMethod.js.map +1 -1
  138. package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js +2 -3
  139. package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js.map +1 -1
  140. package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js +102 -88
  141. package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js.map +1 -1
  142. package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js +2 -4
  143. package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js.map +1 -1
  144. package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js +13 -14
  145. package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js.map +1 -1
  146. package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.d.ts +8 -0
  147. package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js +58 -0
  148. package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js.map +1 -0
  149. package/dist/components/Contractor/Payments/CreatePayment/GenericBlocker.d.ts +6 -0
  150. package/dist/components/Contractor/Payments/CreatePayment/GenericBlocker.js +18 -0
  151. package/dist/components/Contractor/Payments/CreatePayment/GenericBlocker.js.map +1 -0
  152. package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.d.ts +3 -1
  153. package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js +86 -56
  154. package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js.map +1 -1
  155. package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.d.ts +2 -0
  156. package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.js +35 -22
  157. package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.js.map +1 -1
  158. package/dist/components/Contractor/Payments/PaymentFlow/paymentStateMachine.d.ts +1 -0
  159. package/dist/components/Contractor/Payments/PaymentFlow/paymentStateMachine.js +82 -65
  160. package/dist/components/Contractor/Payments/PaymentFlow/paymentStateMachine.js.map +1 -1
  161. package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js +9 -11
  162. package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js.map +1 -1
  163. package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js +6 -8
  164. package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js.map +1 -1
  165. package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummary.d.ts +8 -0
  166. package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummary.js +45 -0
  167. package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummary.js.map +1 -0
  168. package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.d.ts +15 -0
  169. package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js +125 -0
  170. package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js.map +1 -0
  171. package/dist/components/Contractor/Payments/PaymentSummary/index.d.ts +3 -0
  172. package/dist/components/Contractor/Payments/PaymentsList/PaymentsList.js +37 -28
  173. package/dist/components/Contractor/Payments/PaymentsList/PaymentsList.js.map +1 -1
  174. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.d.ts +5 -1
  175. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js +52 -49
  176. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js.map +1 -1
  177. package/dist/components/Contractor/Profile/useContractorProfile.js +2 -3
  178. package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
  179. package/dist/components/Contractor/Submit/Submit.js +20 -21
  180. package/dist/components/Contractor/Submit/Submit.js.map +1 -1
  181. package/dist/components/Employee/Compensation/Actions.js +12 -13
  182. package/dist/components/Employee/Compensation/Actions.js.map +1 -1
  183. package/dist/components/Employee/Compensation/Edit.js +2 -3
  184. package/dist/components/Employee/Compensation/Edit.js.map +1 -1
  185. package/dist/components/Employee/Compensation/List.js +22 -23
  186. package/dist/components/Employee/Compensation/List.js.map +1 -1
  187. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js +2 -2
  188. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js +2 -2
  189. package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js +2 -2
  190. package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js +3 -4
  191. package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js.map +1 -1
  192. package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js +2 -3
  193. package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js.map +1 -1
  194. package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js +2 -3
  195. package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js.map +1 -1
  196. package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js +2 -3
  197. package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  198. package/dist/components/Employee/DocumentSigner/DocumentList/List.js +2 -4
  199. package/dist/components/Employee/DocumentSigner/DocumentList/List.js.map +1 -1
  200. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +1 -1
  201. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js +2 -3
  202. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
  203. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js +1 -1
  204. package/dist/components/Employee/EmployeeList/Actions.js +6 -7
  205. package/dist/components/Employee/EmployeeList/Actions.js.map +1 -1
  206. package/dist/components/Employee/EmployeeList/EmployeeList.js +3 -4
  207. package/dist/components/Employee/EmployeeList/EmployeeList.js.map +1 -1
  208. package/dist/components/Employee/EmployeeList/Head.js +5 -7
  209. package/dist/components/Employee/EmployeeList/Head.js.map +1 -1
  210. package/dist/components/Employee/EmployeeList/List.js +2 -3
  211. package/dist/components/Employee/EmployeeList/List.js.map +1 -1
  212. package/dist/components/Employee/EmployeeList/useEmployeeList.js +1 -1
  213. package/dist/components/Employee/EmploymentEligibility/EmploymentEligibility.d.ts +3 -0
  214. package/dist/components/Employee/EmploymentEligibility/EmploymentEligibilityPresentation.d.ts +37 -0
  215. package/dist/components/Employee/EmploymentEligibility/index.d.ts +4 -0
  216. package/dist/components/Employee/FederalTaxes/Actions.js +5 -6
  217. package/dist/components/Employee/FederalTaxes/Actions.js.map +1 -1
  218. package/dist/components/Employee/FederalTaxes/FederalForm.js +4 -5
  219. package/dist/components/Employee/FederalTaxes/FederalForm.js.map +1 -1
  220. package/dist/components/Employee/FederalTaxes/useFederalTaxes.js +1 -1
  221. package/dist/components/Employee/Landing/Landing.js +10 -11
  222. package/dist/components/Employee/Landing/Landing.js.map +1 -1
  223. package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +7 -7
  224. package/dist/components/Employee/PaymentMethod/Actions.js +5 -6
  225. package/dist/components/Employee/PaymentMethod/Actions.js.map +1 -1
  226. package/dist/components/Employee/PaymentMethod/BankAccountEdit.js +2 -3
  227. package/dist/components/Employee/PaymentMethod/BankAccountEdit.js.map +1 -1
  228. package/dist/components/Employee/PaymentMethod/BankAccountsList.js +2 -3
  229. package/dist/components/Employee/PaymentMethod/BankAccountsList.js.map +1 -1
  230. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js +5 -6
  231. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js.map +1 -1
  232. package/dist/components/Employee/PaymentMethod/Split.js +2 -3
  233. package/dist/components/Employee/PaymentMethod/Split.js.map +1 -1
  234. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +1 -1
  235. package/dist/components/Employee/Profile/Actions.js +5 -6
  236. package/dist/components/Employee/Profile/Actions.js.map +1 -1
  237. package/dist/components/Employee/Profile/AdminPersonalDetails.js +4 -5
  238. package/dist/components/Employee/Profile/AdminPersonalDetails.js.map +1 -1
  239. package/dist/components/Employee/Profile/HomeAddress.js +8 -9
  240. package/dist/components/Employee/Profile/HomeAddress.js.map +1 -1
  241. package/dist/components/Employee/Profile/PersonalDetailsInputs.js +8 -9
  242. package/dist/components/Employee/Profile/PersonalDetailsInputs.js.map +1 -1
  243. package/dist/components/Employee/Profile/useProfile.js +1 -1
  244. package/dist/components/Employee/StateTaxes/Actions.js +5 -6
  245. package/dist/components/Employee/StateTaxes/Actions.js.map +1 -1
  246. package/dist/components/Employee/StateTaxes/useStateTaxes.js +1 -1
  247. package/dist/components/Employee/Taxes/Actions.js +6 -7
  248. package/dist/components/Employee/Taxes/Actions.js.map +1 -1
  249. package/dist/components/Employee/Taxes/FederalForm.js +6 -7
  250. package/dist/components/Employee/Taxes/FederalForm.js.map +1 -1
  251. package/dist/components/Employee/Taxes/useTaxes.js +1 -1
  252. package/dist/components/Flow/Flow.js +7 -9
  253. package/dist/components/Flow/Flow.js.map +1 -1
  254. package/dist/components/{Payroll/InformationRequests → InformationRequests}/InformationRequestForm/InformationRequestForm.d.ts +4 -4
  255. package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js +162 -0
  256. package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js.map +1 -0
  257. package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.module.scss.js +20 -0
  258. package/dist/components/{Payroll/InformationRequests → InformationRequests}/InformationRequestForm/InformationRequestForm.module.scss.js.map +1 -1
  259. package/dist/components/{Payroll/InformationRequests → InformationRequests}/InformationRequestList/InformationRequestList.d.ts +3 -2
  260. package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js +96 -0
  261. package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js.map +1 -0
  262. package/dist/components/InformationRequests/InformationRequests.d.ts +7 -0
  263. package/dist/components/InformationRequests/InformationRequests.js +68 -0
  264. package/dist/components/InformationRequests/InformationRequests.js.map +1 -0
  265. package/dist/components/{Payroll/InformationRequests → InformationRequests}/InformationRequestsComponents.d.ts +4 -4
  266. package/dist/components/{Payroll/InformationRequests → InformationRequests}/InformationRequestsComponents.js +2 -2
  267. package/dist/components/InformationRequests/InformationRequestsComponents.js.map +1 -0
  268. package/dist/components/InformationRequests/index.d.ts +4 -0
  269. package/dist/components/InformationRequests/index.js +9 -0
  270. package/dist/components/InformationRequests/index.js.map +1 -0
  271. package/dist/components/{Payroll/InformationRequests → InformationRequests}/informationRequestsStateMachine.d.ts +1 -1
  272. package/dist/components/{Payroll/InformationRequests → InformationRequests}/informationRequestsStateMachine.js +1 -1
  273. package/dist/components/InformationRequests/informationRequestsStateMachine.js.map +1 -0
  274. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsBanner/ConfirmWireDetailsBanner.js +69 -59
  275. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsBanner/ConfirmWireDetailsBanner.js.map +1 -1
  276. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js +0 -1
  277. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js.map +1 -1
  278. package/dist/components/Payroll/ConfirmWireDetails/WireInstructions/WireInstructions.js +61 -52
  279. package/dist/components/Payroll/ConfirmWireDetails/WireInstructions/WireInstructions.js.map +1 -1
  280. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js +22 -24
  281. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js.map +1 -1
  282. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.d.ts +5 -13
  283. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js +102 -28
  284. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js.map +1 -1
  285. package/dist/components/Payroll/PayrollBlocker/index.d.ts +0 -1
  286. package/dist/components/Payroll/PayrollBlocker/payrollHelpers.js +14 -14
  287. package/dist/components/Payroll/PayrollBlocker/payrollHelpers.js.map +1 -1
  288. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.d.ts +1 -1
  289. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js +132 -131
  290. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
  291. package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.d.ts +1 -1
  292. package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.js.map +1 -1
  293. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +2 -3
  294. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js.map +1 -1
  295. package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js +14 -16
  296. package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js.map +1 -1
  297. package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.d.ts +1 -0
  298. package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.js +45 -38
  299. package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.js.map +1 -1
  300. package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js +54 -40
  301. package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js.map +1 -1
  302. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js +36 -38
  303. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js.map +1 -1
  304. package/dist/components/Payroll/PayrollLanding/PayrollLanding.d.ts +2 -1
  305. package/dist/components/Payroll/PayrollLanding/PayrollLanding.js +26 -24
  306. package/dist/components/Payroll/PayrollLanding/PayrollLanding.js.map +1 -1
  307. package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.d.ts +2 -0
  308. package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.js +70 -48
  309. package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.js.map +1 -1
  310. package/dist/components/Payroll/PayrollLanding/payrollLandingStateMachine.js +72 -36
  311. package/dist/components/Payroll/PayrollLanding/payrollLandingStateMachine.js.map +1 -1
  312. package/dist/components/Payroll/PayrollList/PayrollList.js +14 -17
  313. package/dist/components/Payroll/PayrollList/PayrollList.js.map +1 -1
  314. package/dist/components/Payroll/PayrollList/PayrollListPresentation.d.ts +1 -2
  315. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +89 -96
  316. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
  317. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js +29 -30
  318. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js.map +1 -1
  319. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.d.ts +3 -3
  320. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +242 -243
  321. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
  322. package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.d.ts +2 -2
  323. package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js +2 -4
  324. package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js.map +1 -1
  325. package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/GenericBlocker.d.ts +2 -2
  326. package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/GenericBlocker.js.map +1 -1
  327. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js +2 -3
  328. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js.map +1 -1
  329. package/dist/components/Payroll/RecoveryCases/RecoveryCaseErrorCode.module.scss.js +8 -0
  330. package/dist/components/Payroll/RecoveryCases/RecoveryCaseErrorCode.module.scss.js.map +1 -0
  331. package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js +83 -52
  332. package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js.map +1 -1
  333. package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.module.scss.js +2 -4
  334. package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.module.scss.js.map +1 -1
  335. package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js +59 -36
  336. package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js.map +1 -1
  337. package/dist/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.d.ts +7 -0
  338. package/dist/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.js +65 -0
  339. package/dist/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.js.map +1 -0
  340. package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfigurationContext.d.ts +1 -1
  341. package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfigurationContext.js.map +1 -1
  342. package/dist/components/Payroll/helpers.js.map +1 -1
  343. package/dist/components/Payroll/index.d.ts +1 -2
  344. package/dist/components/Payroll/index.js +8 -10
  345. package/dist/components/Payroll/index.js.map +1 -1
  346. package/dist/components/Payroll/usePreparedPayrollData.d.ts +1 -1
  347. package/dist/components/Payroll/usePreparedPayrollData.js +1 -1
  348. package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
  349. package/dist/components/index.d.ts +1 -0
  350. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +1 -1
  351. package/dist/contexts/ThemeProvider/theme.js +5 -5
  352. package/dist/contexts/ThemeProvider/theme.js.map +1 -1
  353. package/dist/helpers/formattedStrings.js +12 -11
  354. package/dist/helpers/formattedStrings.js.map +1 -1
  355. package/dist/i18n/I18n.js +8 -8
  356. package/dist/i18n/I18n.js.map +1 -1
  357. package/dist/i18n/en/Contractor.Payments.CreatePayment.json.js +30 -26
  358. package/dist/i18n/en/Contractor.Payments.CreatePayment.json.js.map +1 -1
  359. package/dist/i18n/en/Contractor.Payments.PaymentSummary.json.js +58 -0
  360. package/dist/i18n/en/Contractor.Payments.PaymentSummary.json.js.map +1 -0
  361. package/dist/i18n/en/Employee.EmploymentEligibility.json.js +28 -0
  362. package/dist/i18n/en/Employee.EmploymentEligibility.json.js.map +1 -0
  363. package/dist/i18n/en/InformationRequests.InformationRequestForm.json.js +20 -0
  364. package/dist/i18n/en/InformationRequests.InformationRequestForm.json.js.map +1 -0
  365. package/dist/i18n/en/{Payroll.InformationRequestList.json.js → InformationRequests.InformationRequestList.json.js} +6 -6
  366. package/dist/i18n/en/InformationRequests.InformationRequestList.json.js.map +1 -0
  367. package/dist/i18n/en/Payroll.ConfirmWireDetailsBanner.json.js +1 -1
  368. package/dist/i18n/en/Payroll.PayrollBlocker.json.js +24 -20
  369. package/dist/i18n/en/Payroll.PayrollBlocker.json.js.map +1 -1
  370. package/dist/i18n/en/Payroll.PayrollLanding.json.js +5 -3
  371. package/dist/i18n/en/Payroll.PayrollLanding.json.js.map +1 -1
  372. package/dist/i18n/en/Payroll.RecoveryCasesList.json.js +14 -10
  373. package/dist/i18n/en/Payroll.RecoveryCasesList.json.js.map +1 -1
  374. package/dist/i18n/en/Payroll.RecoveryCasesResubmit.json.js +5 -3
  375. package/dist/i18n/en/Payroll.RecoveryCasesResubmit.json.js.map +1 -1
  376. package/dist/i18n/en/Payroll.WireInstructions.json.js +20 -16
  377. package/dist/i18n/en/Payroll.WireInstructions.json.js.map +1 -1
  378. package/dist/index.js +10 -8
  379. package/dist/index.js.map +1 -1
  380. package/dist/shared/constants.d.ts +6 -0
  381. package/dist/shared/constants.js +12 -9
  382. package/dist/shared/constants.js.map +1 -1
  383. package/dist/style.css +1 -1
  384. package/dist/types/i18next.d.ts +248 -46
  385. package/package.json +16 -16
  386. package/dist/components/Payroll/InformationRequests/InformationRequestForm/InformationRequestForm.js +0 -142
  387. package/dist/components/Payroll/InformationRequests/InformationRequestForm/InformationRequestForm.js.map +0 -1
  388. package/dist/components/Payroll/InformationRequests/InformationRequestForm/InformationRequestForm.module.scss.js +0 -18
  389. package/dist/components/Payroll/InformationRequests/InformationRequestList/InformationRequestList.js +0 -88
  390. package/dist/components/Payroll/InformationRequests/InformationRequestList/InformationRequestList.js.map +0 -1
  391. package/dist/components/Payroll/InformationRequests/InformationRequests.d.ts +0 -6
  392. package/dist/components/Payroll/InformationRequests/InformationRequests.js +0 -55
  393. package/dist/components/Payroll/InformationRequests/InformationRequests.js.map +0 -1
  394. package/dist/components/Payroll/InformationRequests/InformationRequestsComponents.js.map +0 -1
  395. package/dist/components/Payroll/InformationRequests/index.d.ts +0 -3
  396. package/dist/components/Payroll/InformationRequests/informationRequestsStateMachine.js.map +0 -1
  397. package/dist/components/Payroll/PayrollBlocker/PayrollBlocker.d.ts +0 -6
  398. package/dist/components/Payroll/PayrollBlocker/PayrollBlocker.js +0 -32
  399. package/dist/components/Payroll/PayrollBlocker/PayrollBlocker.js.map +0 -1
  400. package/dist/i18n/en/Payroll.InformationRequestForm.json.js +0 -18
  401. package/dist/i18n/en/Payroll.InformationRequestForm.json.js.map +0 -1
  402. package/dist/i18n/en/Payroll.InformationRequestList.json.js.map +0 -1
  403. /package/dist/components/{Payroll/InformationRequests → InformationRequests}/InformationRequestForm/index.d.ts +0 -0
  404. /package/dist/components/{Payroll/InformationRequests → InformationRequests}/InformationRequestList/index.d.ts +0 -0
@@ -1,140 +1,139 @@
1
- import { jsx as e, jsxs as f } from "react/jsx-runtime";
2
- import { DropZone as G, FileTrigger as j, Button as k } from "react-aria-components";
3
- import E from "classnames";
4
- import { useTranslation as X, Trans as L } from "react-i18next";
5
- import { useFieldIds as O } from "../hooks/useFieldIds.js";
6
- import { FileInputDefaults as q } from "./FileInputTypes.js";
7
- import i from "./FileInput.module.scss.js";
8
- import { applyMissingDefaults as A } from "../../../../helpers/applyMissingDefaults.js";
9
- import { FieldLayout as U } from "../../FieldLayout/FieldLayout.js";
10
- import { ButtonIcon as V } from "../Button/ButtonIcon.js";
11
- import W from "../../../../assets/icons/trashcan.svg.js";
12
- import J from "../../../../assets/icons/icon-file-outline.svg.js";
13
- import { Flex as F } from "../../Flex/Flex.js";
14
- function K(n) {
15
- return n.kind === "file";
1
+ import { jsx as e, jsxs as m } from "react/jsx-runtime";
2
+ import { DropZone as C, FileTrigger as E, Button as G } from "react-aria-components";
3
+ import q from "classnames";
4
+ import { useTranslation as A, Trans as J } from "react-i18next";
5
+ import { useFieldIds as U } from "../hooks/useFieldIds.js";
6
+ import { FileInputDefaults as K } from "./FileInputTypes.js";
7
+ import n from "./FileInput.module.scss.js";
8
+ import { applyMissingDefaults as L } from "../../../../helpers/applyMissingDefaults.js";
9
+ import { FieldLayout as O } from "../../FieldLayout/FieldLayout.js";
10
+ import { ButtonIcon as R } from "../Button/ButtonIcon.js";
11
+ import W from "../../../../assets/icons/icon-trashcan.svg.js";
12
+ import Z from "../../../../assets/icons/icon-file-outline.svg.js";
13
+ import $ from "../../../../assets/icons/icon-file-pdf.svg.js";
14
+ import H from "../../../../assets/icons/icon-file-png.svg.js";
15
+ import V from "../../../../assets/icons/icon-file-jpg.svg.js";
16
+ import { Flex as y } from "../../Flex/Flex.js";
17
+ function Q(i) {
18
+ return i === "application/pdf" ? $ : i === "image/png" ? H : i === "image/jpeg" || i === "image/jpg" ? V : Z;
16
19
  }
17
- function R(n) {
18
- if (n === 0) return "0 Bytes";
19
- const s = 1024, a = ["Bytes", "KB", "MB", "GB"], t = Math.floor(Math.log(n) / Math.log(s));
20
- return `${parseFloat((n / Math.pow(s, t)).toFixed(0))} ${a[t]}`;
20
+ function X(i) {
21
+ return i.kind === "file";
21
22
  }
22
- const Z = {
23
+ function Y(i) {
24
+ if (i === 0) return "0 Bytes";
25
+ const r = 1024, d = ["Bytes", "KB", "MB", "GB"], o = Math.floor(Math.log(i) / Math.log(r));
26
+ return `${parseFloat((i / Math.pow(r, o)).toFixed(0))} ${d[o]}`;
27
+ }
28
+ const _ = {
23
29
  "image/jpeg": "JPG",
24
30
  "image/jpg": "JPG",
25
31
  "image/png": "PNG",
26
- "image/gif": "GIF",
27
- "image/webp": "WEBP",
28
- "image/svg+xml": "SVG",
29
- "application/pdf": "PDF",
30
- "application/msword": "DOC",
31
- "application/vnd.openxmlformats-officedocument.wordprocessingml.document": "DOCX",
32
- "application/vnd.ms-excel": "XLS",
33
- "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": "XLSX",
34
- "text/plain": "TXT",
35
- "text/csv": "CSV"
32
+ "application/pdf": "PDF"
36
33
  };
37
- function N(n) {
38
- if (!n || n.length === 0 || n.includes("*/*")) return null;
39
- const s = n.map((t) => t.startsWith(".") ? t.slice(1).toUpperCase() : Z[t]).filter(Boolean);
40
- return s.length === 0 ? null : [...new Set(s)].join(", ");
34
+ function h(i) {
35
+ if (!i || i.length === 0 || i.includes("*/*")) return null;
36
+ const r = i.map((o) => o.startsWith(".") ? o.slice(1).toUpperCase() : _[o]).filter(Boolean);
37
+ return r.length === 0 ? null : [...new Set(r)].join(", ");
41
38
  }
42
- function le(n) {
43
- const { t: s } = X("common"), a = A(n, q), {
44
- label: t,
45
- description: l,
46
- errorMessage: h,
47
- isRequired: x,
48
- isInvalid: T,
49
- isDisabled: c,
50
- id: D,
51
- value: m,
52
- onChange: p,
53
- onBlur: y,
54
- accept: d,
55
- className: B,
56
- "aria-describedby": b
57
- } = a, { inputId: g, errorMessageId: S, descriptionId: v, ariaDescribedBy: w } = O({
58
- inputId: D,
59
- errorMessage: h,
60
- description: l,
61
- ariaDescribedBy: b
62
- }), M = (o) => {
63
- const r = o?.[0] ?? null;
64
- p(r);
65
- }, P = async (o) => {
66
- const r = o.items.find(K);
67
- if (r) {
68
- const I = await r.getFile();
69
- p(I);
39
+ function ge(i) {
40
+ const { t: r } = A("common"), d = L(i, K), {
41
+ label: o,
42
+ description: s,
43
+ errorMessage: g,
44
+ isRequired: B,
45
+ isInvalid: D,
46
+ isDisabled: p,
47
+ id: T,
48
+ value: a,
49
+ onChange: u,
50
+ onBlur: b,
51
+ accept: l,
52
+ className: x,
53
+ "aria-describedby": S
54
+ } = d, { inputId: I, errorMessageId: P, descriptionId: F, ariaDescribedBy: M } = U({
55
+ inputId: T,
56
+ errorMessage: g,
57
+ description: s,
58
+ ariaDescribedBy: S
59
+ }), j = (t) => {
60
+ const c = t?.[0] ?? null;
61
+ u(c);
62
+ }, z = async (t) => {
63
+ const c = t.items.find(X);
64
+ if (c) {
65
+ const N = await c.getFile();
66
+ u(N);
70
67
  }
71
- }, C = (o) => (d ?? ["*/*"]).some((u) => u === "*/*" ? !0 : u.startsWith(".") ? o.has("application/octet-stream") || o.has("Files") : o.has(u)) ? "copy" : "cancel", z = () => {
72
- p(null);
73
- };
68
+ }, k = (t) => (l ?? ["*/*"]).some((f) => f === "*/*" ? !0 : f.startsWith(".") ? t.has("application/octet-stream") || t.has("Files") : t.has(f)) ? "copy" : "cancel", w = () => {
69
+ u(null);
70
+ }, v = a ? Q(a.type) : null;
74
71
  return /* @__PURE__ */ e(
75
- U,
72
+ O,
76
73
  {
77
- label: t,
78
- errorMessage: h,
79
- isRequired: x,
80
- htmlFor: g,
81
- errorMessageId: S,
82
- descriptionId: v,
83
- className: B,
74
+ label: o,
75
+ errorMessage: g,
76
+ isRequired: B,
77
+ htmlFor: I,
78
+ errorMessageId: P,
79
+ descriptionId: F,
80
+ className: x,
84
81
  shouldVisuallyHideLabel: !0,
85
82
  withErrorIcon: !1,
86
83
  children: /* @__PURE__ */ e(
87
84
  "div",
88
85
  {
89
- className: i.root,
90
- "data-disabled": c || void 0,
91
- "data-invalid": T || void 0,
92
- children: m ? /* @__PURE__ */ e(
86
+ className: n.root,
87
+ "data-disabled": p || void 0,
88
+ "data-invalid": D || void 0,
89
+ children: a ? /* @__PURE__ */ e(
93
90
  "div",
94
91
  {
95
- className: E(i.filePreview, { [i.disabled]: c }),
96
- children: /* @__PURE__ */ f(F, { alignItems: "center", gap: 12, children: [
97
- /* @__PURE__ */ e("div", { className: i.fileIcon, children: /* @__PURE__ */ e(J, { "aria-hidden": "true" }) }),
98
- /* @__PURE__ */ e("div", { className: i.fileInfo, children: /* @__PURE__ */ f(F, { flexDirection: "column", gap: 0, children: [
99
- /* @__PURE__ */ e("span", { className: i.fileName, children: m.name }),
100
- /* @__PURE__ */ e("span", { className: i.fileSize, children: R(m.size) })
92
+ className: q(n.filePreview, { [n.disabled]: p }),
93
+ children: /* @__PURE__ */ m(y, { alignItems: "center", gap: 12, children: [
94
+ /* @__PURE__ */ e("div", { className: n.fileIcon, children: v && /* @__PURE__ */ e(v, { "aria-hidden": "true" }) }),
95
+ /* @__PURE__ */ e("div", { className: n.fileInfo, children: /* @__PURE__ */ m(y, { flexDirection: "column", gap: 0, children: [
96
+ /* @__PURE__ */ e("span", { className: n.fileName, children: a.name }),
97
+ /* @__PURE__ */ e("span", { className: n.fileSize, children: Y(a.size) })
101
98
  ] }) }),
102
99
  /* @__PURE__ */ e(
103
- V,
100
+ R,
104
101
  {
105
- "aria-label": s("fileInput.removeFile"),
106
- onClick: z,
107
- isDisabled: c,
108
- children: /* @__PURE__ */ e(W, { "aria-hidden": "true", className: i.removeButton })
102
+ "aria-label": r("fileInput.removeFile"),
103
+ onClick: w,
104
+ isDisabled: p,
105
+ children: /* @__PURE__ */ e(W, { "aria-hidden": "true", className: n.removeButton })
109
106
  }
110
107
  )
111
108
  ] })
112
109
  }
113
110
  ) : /* @__PURE__ */ e(
114
- G,
111
+ C,
115
112
  {
116
- onDrop: P,
117
- getDropOperation: C,
118
- className: i.dropZone,
119
- children: /* @__PURE__ */ e(j, { onSelect: M, acceptedFileTypes: d, children: /* @__PURE__ */ e(
120
- k,
113
+ onDrop: z,
114
+ getDropOperation: k,
115
+ className: n.dropZone,
116
+ children: /* @__PURE__ */ e(E, { onSelect: j, acceptedFileTypes: l, children: /* @__PURE__ */ e(
117
+ G,
121
118
  {
122
- id: g,
123
- isDisabled: c,
124
- "aria-describedby": w,
125
- onBlur: y,
126
- className: i.trigger,
127
- children: /* @__PURE__ */ f("span", { className: i.triggerContent, children: [
128
- /* @__PURE__ */ e("span", { className: i.triggerText, children: /* @__PURE__ */ e(
129
- L,
119
+ id: I,
120
+ isDisabled: p,
121
+ "aria-describedby": M,
122
+ onBlur: b,
123
+ className: n.trigger,
124
+ children: /* @__PURE__ */ m("span", { className: n.triggerContent, children: [
125
+ /* @__PURE__ */ e("span", { className: n.triggerText, children: /* @__PURE__ */ e(
126
+ J,
130
127
  {
131
128
  i18nKey: "fileInput.uploadInstructions",
132
129
  ns: "common",
133
- components: { clickToUpload: /* @__PURE__ */ e("span", { className: i.clickToUpload }) }
130
+ components: { clickToUpload: /* @__PURE__ */ e("span", { className: n.clickToUpload }) }
134
131
  }
135
132
  ) }),
136
- N(d) && /* @__PURE__ */ e("span", { className: i.hint, children: s("fileInput.acceptedTypes", { types: N(d) }) }),
137
- l && /* @__PURE__ */ e("span", { id: v, className: i.hint, children: l })
133
+ (h(l) || s) && /* @__PURE__ */ m("span", { className: n.hintContainer, children: [
134
+ h(l) && /* @__PURE__ */ e("span", { className: n.hint, children: r("fileInput.acceptedTypes", { types: h(l) }) }),
135
+ s && /* @__PURE__ */ e("span", { id: F, className: n.hint, children: s })
136
+ ] })
138
137
  ] })
139
138
  }
140
139
  ) })
@@ -146,6 +145,6 @@ function le(n) {
146
145
  );
147
146
  }
148
147
  export {
149
- le as FileInput
148
+ ge as FileInput
150
149
  };
151
150
  //# sourceMappingURL=FileInput.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FileInput.js","sources":["../../../../../src/components/Common/UI/FileInput/FileInput.tsx"],"sourcesContent":["import {\n FileTrigger,\n Button as AriaButton,\n DropZone,\n type DropItem,\n type FileDropItem,\n} from 'react-aria-components'\nimport classNames from 'classnames'\nimport { Trans, useTranslation } from 'react-i18next'\nimport { useFieldIds } from '../hooks/useFieldIds'\nimport type { FileInputProps } from './FileInputTypes'\nimport { FileInputDefaults } from './FileInputTypes'\nimport styles from './FileInput.module.scss'\nimport { applyMissingDefaults } from '@/helpers/applyMissingDefaults'\nimport { FieldLayout } from '@/components/Common/FieldLayout'\nimport { Flex } from '@/components/Common/Flex'\nimport { ButtonIcon } from '@/components/Common/UI/Button/ButtonIcon'\nimport TrashCanIcon from '@/assets/icons/trashcan.svg?react'\nimport FileIcon from '@/assets/icons/icon-file-outline.svg?react'\n\nfunction isFileDropItem(item: DropItem): item is FileDropItem {\n return item.kind === 'file'\n}\n\nfunction formatFileSize(bytes: number): string {\n if (bytes === 0) return '0 Bytes'\n const k = 1024\n const sizes = ['Bytes', 'KB', 'MB', 'GB'] as const\n const i = Math.floor(Math.log(bytes) / Math.log(k))\n const size = parseFloat((bytes / Math.pow(k, i)).toFixed(0))\n return `${size} ${sizes[i]}`\n}\n\nconst mimeToExtension: Record<string, string> = {\n 'image/jpeg': 'JPG',\n 'image/jpg': 'JPG',\n 'image/png': 'PNG',\n 'image/gif': 'GIF',\n 'image/webp': 'WEBP',\n 'image/svg+xml': 'SVG',\n 'application/pdf': 'PDF',\n 'application/msword': 'DOC',\n 'application/vnd.openxmlformats-officedocument.wordprocessingml.document': 'DOCX',\n 'application/vnd.ms-excel': 'XLS',\n 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet': 'XLSX',\n 'text/plain': 'TXT',\n 'text/csv': 'CSV',\n}\n\nfunction formatAcceptedTypes(accept: string[] | undefined): string | null {\n if (!accept || accept.length === 0 || accept.includes('*/*')) return null\n\n const extensions = accept\n .map(type => {\n if (type.startsWith('.')) {\n return type.slice(1).toUpperCase()\n }\n return mimeToExtension[type]\n })\n .filter(Boolean)\n\n if (extensions.length === 0) return null\n\n const uniqueExtensions = [...new Set(extensions)]\n return uniqueExtensions.join(', ')\n}\n\nexport function FileInput(rawProps: FileInputProps) {\n const { t } = useTranslation('common')\n const resolvedProps = applyMissingDefaults(rawProps, FileInputDefaults)\n const {\n label,\n description,\n errorMessage,\n isRequired,\n isInvalid,\n isDisabled,\n id,\n value,\n onChange,\n onBlur,\n accept,\n className,\n 'aria-describedby': ariaDescribedByFromProps,\n } = resolvedProps\n\n const { inputId, errorMessageId, descriptionId, ariaDescribedBy } = useFieldIds({\n inputId: id,\n errorMessage,\n description,\n ariaDescribedBy: ariaDescribedByFromProps,\n })\n\n const handleSelect = (files: FileList | null) => {\n const file = files?.[0] ?? null\n onChange(file)\n }\n\n const handleDrop = async (e: { items: DropItem[] }) => {\n const fileItem = e.items.find(isFileDropItem)\n if (fileItem) {\n const file = await fileItem.getFile()\n onChange(file)\n }\n }\n\n const getDropOperation = (types: { has: (type: string) => boolean }) => {\n const acceptedTypes = accept ?? ['*/*']\n const hasAcceptedType = acceptedTypes.some(type => {\n if (type === '*/*') return true\n if (type.startsWith('.')) {\n return types.has('application/octet-stream') || types.has('Files')\n }\n return types.has(type)\n })\n return hasAcceptedType ? 'copy' : 'cancel'\n }\n\n const handleRemove = () => {\n onChange(null)\n }\n\n return (\n <FieldLayout\n label={label}\n errorMessage={errorMessage}\n isRequired={isRequired}\n htmlFor={inputId}\n errorMessageId={errorMessageId}\n descriptionId={descriptionId}\n className={className}\n shouldVisuallyHideLabel\n withErrorIcon={false}\n >\n <div\n className={styles.root}\n data-disabled={isDisabled || undefined}\n data-invalid={isInvalid || undefined}\n >\n {value ? (\n <div\n className={classNames(styles.filePreview, { [styles.disabled as string]: isDisabled })}\n >\n <Flex alignItems=\"center\" gap={12}>\n <div className={styles.fileIcon}>\n <FileIcon aria-hidden=\"true\" />\n </div>\n <div className={styles.fileInfo}>\n <Flex flexDirection=\"column\" gap={0}>\n <span className={styles.fileName}>{value.name}</span>\n <span className={styles.fileSize}>{formatFileSize(value.size)}</span>\n </Flex>\n </div>\n <ButtonIcon\n aria-label={t('fileInput.removeFile')}\n onClick={handleRemove}\n isDisabled={isDisabled}\n >\n <TrashCanIcon aria-hidden=\"true\" className={styles.removeButton} />\n </ButtonIcon>\n </Flex>\n </div>\n ) : (\n <DropZone\n onDrop={handleDrop}\n getDropOperation={getDropOperation}\n className={styles.dropZone}\n >\n <FileTrigger onSelect={handleSelect} acceptedFileTypes={accept}>\n <AriaButton\n id={inputId}\n isDisabled={isDisabled}\n aria-describedby={ariaDescribedBy}\n onBlur={onBlur}\n className={styles.trigger}\n >\n <span className={styles.triggerContent}>\n <span className={styles.triggerText}>\n <Trans\n i18nKey=\"fileInput.uploadInstructions\"\n ns=\"common\"\n components={{ clickToUpload: <span className={styles.clickToUpload} /> }}\n />\n </span>\n {formatAcceptedTypes(accept) && (\n <span className={styles.hint}>\n {t('fileInput.acceptedTypes', { types: formatAcceptedTypes(accept) })}\n </span>\n )}\n {description && (\n <span id={descriptionId} className={styles.hint}>\n {description}\n </span>\n )}\n </span>\n </AriaButton>\n </FileTrigger>\n </DropZone>\n )}\n </div>\n </FieldLayout>\n )\n}\n"],"names":["isFileDropItem","item","formatFileSize","bytes","k","sizes","i","mimeToExtension","formatAcceptedTypes","accept","extensions","type","FileInput","rawProps","t","useTranslation","resolvedProps","applyMissingDefaults","FileInputDefaults","label","description","errorMessage","isRequired","isInvalid","isDisabled","id","value","onChange","onBlur","className","ariaDescribedByFromProps","inputId","errorMessageId","descriptionId","ariaDescribedBy","useFieldIds","handleSelect","files","file","handleDrop","e","fileItem","getDropOperation","types","handleRemove","jsx","FieldLayout","styles","classNames","jsxs","Flex","FileIcon","ButtonIcon","TrashCanIcon","DropZone","FileTrigger","AriaButton","Trans"],"mappings":";;;;;;;;;;;;;AAoBA,SAASA,EAAeC,GAAsC;AAC5D,SAAOA,EAAK,SAAS;AACvB;AAEA,SAASC,EAAeC,GAAuB;AAC7C,MAAIA,MAAU,EAAG,QAAO;AACxB,QAAMC,IAAI,MACJC,IAAQ,CAAC,SAAS,MAAM,MAAM,IAAI,GAClCC,IAAI,KAAK,MAAM,KAAK,IAAIH,CAAK,IAAI,KAAK,IAAIC,CAAC,CAAC;AAElD,SAAO,GADM,YAAYD,IAAQ,KAAK,IAAIC,GAAGE,CAAC,GAAG,QAAQ,CAAC,CAAC,CAC7C,IAAID,EAAMC,CAAC,CAAC;AAC5B;AAEA,MAAMC,IAA0C;AAAA,EAC9C,cAAc;AAAA,EACd,aAAa;AAAA,EACb,aAAa;AAAA,EACb,aAAa;AAAA,EACb,cAAc;AAAA,EACd,iBAAiB;AAAA,EACjB,mBAAmB;AAAA,EACnB,sBAAsB;AAAA,EACtB,2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J;AAAA,gBAAA;AAAA,cAAA,EACF,CACF;AAAA,YAAA;AAAA,UAAA;AAAA,QACF;AAAA,MAAA;AAAA,IAEJ;AAAA,EAAA;AAGN;"}
1
+ {"version":3,"file":"FileInput.js","sources":["../../../../../src/components/Common/UI/FileInput/FileInput.tsx"],"sourcesContent":["import {\n FileTrigger,\n Button as AriaButton,\n DropZone,\n type DropItem,\n type FileDropItem,\n} from 'react-aria-components'\nimport classNames from 'classnames'\nimport { Trans, useTranslation } from 'react-i18next'\nimport { useFieldIds } from '../hooks/useFieldIds'\nimport type { FileInputProps } from './FileInputTypes'\nimport { FileInputDefaults } from './FileInputTypes'\nimport styles from './FileInput.module.scss'\nimport { applyMissingDefaults } from '@/helpers/applyMissingDefaults'\nimport { FieldLayout } from '@/components/Common/FieldLayout'\nimport { Flex } from '@/components/Common/Flex'\nimport { ButtonIcon } from '@/components/Common/UI/Button/ButtonIcon'\nimport TrashCanIcon from '@/assets/icons/icon-trashcan.svg?react'\nimport FileIcon from '@/assets/icons/icon-file-outline.svg?react'\nimport PdfIcon from '@/assets/icons/icon-file-pdf.svg?react'\nimport PngIcon from '@/assets/icons/icon-file-png.svg?react'\nimport JpgIcon from '@/assets/icons/icon-file-jpg.svg?react'\n\nfunction getFileIcon(mimeType: string) {\n if (mimeType === 'application/pdf') {\n return PdfIcon\n }\n\n if (mimeType === 'image/png') {\n return PngIcon\n }\n\n if (mimeType === 'image/jpeg' || mimeType === 'image/jpg') {\n return JpgIcon\n }\n\n return FileIcon\n}\n\nfunction isFileDropItem(item: DropItem): item is FileDropItem {\n return item.kind === 'file'\n}\n\nfunction formatFileSize(bytes: number): string {\n if (bytes === 0) return '0 Bytes'\n const k = 1024\n const sizes = ['Bytes', 'KB', 'MB', 'GB'] as const\n const i = Math.floor(Math.log(bytes) / Math.log(k))\n const size = parseFloat((bytes / Math.pow(k, i)).toFixed(0))\n return `${size} ${sizes[i]}`\n}\n\nconst mimeToExtension: Record<string, string> = {\n 'image/jpeg': 'JPG',\n 'image/jpg': 'JPG',\n 'image/png': 'PNG',\n 'application/pdf': 'PDF',\n}\n\nfunction formatAcceptedTypes(accept: string[] | undefined): string | null {\n if (!accept || accept.length === 0 || accept.includes('*/*')) return null\n\n const extensions = accept\n .map(type => {\n if (type.startsWith('.')) {\n return type.slice(1).toUpperCase()\n }\n return mimeToExtension[type]\n })\n .filter(Boolean)\n\n if (extensions.length === 0) return null\n\n const uniqueExtensions = [...new Set(extensions)]\n return uniqueExtensions.join(', ')\n}\n\nexport function FileInput(rawProps: FileInputProps) {\n const { t } = useTranslation('common')\n const resolvedProps = applyMissingDefaults(rawProps, FileInputDefaults)\n const {\n label,\n description,\n errorMessage,\n isRequired,\n isInvalid,\n isDisabled,\n id,\n value,\n onChange,\n onBlur,\n accept,\n className,\n 'aria-describedby': ariaDescribedByFromProps,\n } = resolvedProps\n\n const { inputId, errorMessageId, descriptionId, ariaDescribedBy } = useFieldIds({\n inputId: id,\n errorMessage,\n description,\n ariaDescribedBy: ariaDescribedByFromProps,\n })\n\n const handleSelect = (files: FileList | null) => {\n const file = files?.[0] ?? null\n onChange(file)\n }\n\n const handleDrop = async (e: { items: DropItem[] }) => {\n const fileItem = e.items.find(isFileDropItem)\n if (fileItem) {\n const file = await fileItem.getFile()\n onChange(file)\n }\n }\n\n const getDropOperation = (types: { has: (type: string) => boolean }) => {\n const acceptedTypes = accept ?? ['*/*']\n const hasAcceptedType = acceptedTypes.some(type => {\n if (type === '*/*') return true\n if (type.startsWith('.')) {\n return types.has('application/octet-stream') || types.has('Files')\n }\n return types.has(type)\n })\n return hasAcceptedType ? 'copy' : 'cancel'\n }\n\n const handleRemove = () => {\n onChange(null)\n }\n\n const FileTypeIcon = value ? getFileIcon(value.type) : null\n\n return (\n <FieldLayout\n label={label}\n errorMessage={errorMessage}\n isRequired={isRequired}\n htmlFor={inputId}\n errorMessageId={errorMessageId}\n descriptionId={descriptionId}\n className={className}\n shouldVisuallyHideLabel\n withErrorIcon={false}\n >\n <div\n className={styles.root}\n data-disabled={isDisabled || undefined}\n data-invalid={isInvalid || undefined}\n >\n {value ? (\n <div\n className={classNames(styles.filePreview, { [styles.disabled as string]: isDisabled })}\n >\n <Flex alignItems=\"center\" gap={12}>\n <div className={styles.fileIcon}>\n {FileTypeIcon && <FileTypeIcon aria-hidden=\"true\" />}\n </div>\n <div className={styles.fileInfo}>\n <Flex flexDirection=\"column\" gap={0}>\n <span className={styles.fileName}>{value.name}</span>\n <span className={styles.fileSize}>{formatFileSize(value.size)}</span>\n </Flex>\n </div>\n <ButtonIcon\n aria-label={t('fileInput.removeFile')}\n onClick={handleRemove}\n isDisabled={isDisabled}\n >\n <TrashCanIcon aria-hidden=\"true\" className={styles.removeButton} />\n </ButtonIcon>\n </Flex>\n </div>\n ) : (\n <DropZone\n onDrop={handleDrop}\n getDropOperation={getDropOperation}\n className={styles.dropZone}\n >\n <FileTrigger onSelect={handleSelect} acceptedFileTypes={accept}>\n <AriaButton\n id={inputId}\n isDisabled={isDisabled}\n aria-describedby={ariaDescribedBy}\n onBlur={onBlur}\n className={styles.trigger}\n >\n <span className={styles.triggerContent}>\n <span className={styles.triggerText}>\n <Trans\n i18nKey=\"fileInput.uploadInstructions\"\n ns=\"common\"\n components={{ clickToUpload: <span className={styles.clickToUpload} /> }}\n />\n </span>\n {(formatAcceptedTypes(accept) || description) && (\n <span className={styles.hintContainer}>\n {formatAcceptedTypes(accept) && (\n <span className={styles.hint}>\n {t('fileInput.acceptedTypes', { types: formatAcceptedTypes(accept) })}\n </span>\n )}\n {description && (\n <span id={descriptionId} className={styles.hint}>\n {description}\n </span>\n )}\n </span>\n )}\n </span>\n </AriaButton>\n </FileTrigger>\n </DropZone>\n )}\n </div>\n </FieldLayout>\n )\n}\n"],"names":["getFileIcon","mimeType","PdfIcon","PngIcon","JpgIcon","FileIcon","isFileDropItem","item","formatFileSize","bytes","k","sizes","i","mimeToExtension","formatAcceptedTypes","accept","extensions","type","FileInput","rawProps","t","useTranslation","resolvedProps","applyMissingDefaults","FileInputDefaults","label","description","errorMessage","isRequired","isInvalid","isDisabled","id","value","onChange","onBlur","className","ariaDescribedByFromProps","inputId","errorMessageId","descriptionId","ariaDescribedBy","useFieldIds","handleSelect","files","file","handleDrop","e","fileItem","getDropOperation","types","handleRemove","FileTypeIcon","jsx","FieldLayout","styles","classNames","jsxs","Flex","ButtonIcon","TrashCanIcon","DropZone","FileTrigger","AriaButton","Trans"],"mappings":";;;;;;;;;;;;;;;;AAuBA,SAASA,EAAYC,GAAkB;AACrC,SAAIA,MAAa,oBACRC,IAGLD,MAAa,cACRE,IAGLF,MAAa,gBAAgBA,MAAa,cACrCG,IAGFC;AACT;AAEA,SAASC,EAAeC,GAAsC;AAC5D,SAAOA,EAAK,SAAS;AACvB;AAEA,SAASC,EAAeC,GAAuB;AAC7C,MAAIA,MAAU,EAAG,QAAO;AACxB,QAAMC,IAAI,MACJC,IAAQ,CAAC,SAAS,MAAM,MAAM,IAAI,GAClCC,IAAI,KAAK,MAAM,KAAK,IAAIH,CAAK,IAAI,KAAK,IAAIC,CAAC,CAAC;AAElD,SAAO,GADM,YAAYD,IAAQ,KAAK,IAAIC,GAAGE,CAAC,GAAG,QAAQ,CAAC,CAAC,CAC7C,IAAID,EAAMC,CAAC,CAAC;AAC5B;AAEA,MAAMC,IAA0C;AAAA,EAC9C,cAAc;AAAA,EACd,aAAa;AAAA,EACb,aAAa;AAAA,EACb,mBAAmB;AACrB;AAEA,SAASC,EAAoBC,GAA6C;AACxE,MAAI,CAACA,KAAUA,EAAO,WAAW,KAAKA,EAAO,SAAS,KAAK,EAAG,QAAO;AAErE,QAAMC,IAAaD,EAChB,IAAI,CAAAE,MACCA,EAAK,WAAW,GAAG,IACdA,EAAK,MAAM,CAAC,EAAE,YAAA,IAEhBJ,EAAgBI,CAAI,CAC5B,EACA,OAAO,OAAO;AAEjB,SAAID,EAAW,WAAW,IAAU,OAEX,CAAC,GAAG,IAAI,IAAIA,CAAU,CAAC,EACxB,KAAK,IAAI;A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AA;AAAA,cACC,QAAQf;AAAA,cACR,kBAAAG;AAAA,cACA,WAAWM,EAAO;AAAA,cAElB,UAAA,gBAAAF,EAACS,GAAA,EAAY,UAAUnB,GAAc,mBAAmB3B,GACtD,UAAA,gBAAAqC;AAAA,gBAACU;AAAAA,gBAAA;AAAA,kBACC,IAAIzB;AAAA,kBACJ,YAAAP;AAAA,kBACA,oBAAkBU;AAAA,kBAClB,QAAAN;AAAA,kBACA,WAAWoB,EAAO;AAAA,kBAElB,UAAA,gBAAAE,EAAC,QAAA,EAAK,WAAWF,EAAO,gBACtB,UAAA;AAAA,oBAAA,gBAAAF,EAAC,QAAA,EAAK,WAAWE,EAAO,aACtB,UAAA,gBAAAF;AAAA,sBAACW;AAAA,sBAAA;AAAA,wBACC,SAAQ;AAAA,wBACR,IAAG;AAAA,wBACH,YAAY,EAAE,eAAe,gBAAAX,EAAC,UAAK,WAAWE,EAAO,eAAe,EAAA;AAAA,sBAAG;AAAA,oBAAA,GAE3E;AAAA,qBACExC,EAAoBC,CAAM,KAAKW,wBAC9B,QAAA,EAAK,WAAW4B,EAAO,eACrB,UAAA;AAAA,sBAAAxC,EAAoBC,CAAM,KACzB,gBAAAqC,EAAC,QAAA,EAAK,WAAWE,EAAO,MACrB,UAAAlC,EAAE,2BAA2B,EAAE,OAAON,EAAoBC,CAAM,EAAA,CAAG,GACtE;AAAA,sBAEDW,uBACE,QAAA,EAAK,IAAIa,GAAe,WAAWe,EAAO,MACxC,UAAA5B,EAAA,CACH;AAAA,oBAAA,EAAA,CAEJ;AAAA,kBAAA,EAAA,CAEJ;AAAA,gBAAA;AAAA,cAAA,EACF,CACF;AAAA,YAAA;AAAA,UAAA;AAAA,QACF;AAAA,MAAA;AAAA,IAEJ;AAAA,EAAA;AAGN;"}
@@ -1,34 +1,36 @@
1
- const e = "_root_1odee_1", o = "_dropZone_1odee_5", t = "_trigger_1odee_12", _ = "_triggerContent_1odee_32", i = "_triggerText_1odee_39", n = "_clickToUpload_1odee_43", r = "_hint_1odee_48", d = "_filePreview_1odee_52", l = "_disabled_1odee_55", c = "_fileIcon_1odee_60", s = "_fileInfo_1odee_72", f = "_fileName_1odee_76", g = "_fileSize_1odee_86", a = "_removeButton_1odee_91", p = {
2
- root: e,
3
- dropZone: o,
4
- trigger: t,
5
- triggerContent: _,
6
- triggerText: i,
7
- clickToUpload: n,
8
- hint: r,
9
- filePreview: d,
10
- disabled: l,
11
- fileIcon: c,
12
- fileInfo: s,
13
- fileName: f,
1
+ const t = "_root_wtxia_1", e = "_dropZone_wtxia_5", i = "_trigger_wtxia_12", o = "_triggerContent_wtxia_34", n = "_triggerText_wtxia_41", _ = "_clickToUpload_wtxia_45", r = "_hintContainer_wtxia_50", a = "_hint_wtxia_50", l = "_filePreview_wtxia_61", c = "_disabled_wtxia_64", s = "_fileIcon_wtxia_69", f = "_fileInfo_wtxia_81", x = "_fileName_wtxia_85", g = "_fileSize_wtxia_95", w = "_removeButton_wtxia_100", d = {
2
+ root: t,
3
+ dropZone: e,
4
+ trigger: i,
5
+ triggerContent: o,
6
+ triggerText: n,
7
+ clickToUpload: _,
8
+ hintContainer: r,
9
+ hint: a,
10
+ filePreview: l,
11
+ disabled: c,
12
+ fileIcon: s,
13
+ fileInfo: f,
14
+ fileName: x,
14
15
  fileSize: g,
15
- removeButton: a
16
+ removeButton: w
16
17
  };
17
18
  export {
18
- n as clickToUpload,
19
- p as default,
20
- l as disabled,
21
- o as dropZone,
22
- c as fileIcon,
23
- s as fileInfo,
24
- f as fileName,
25
- d as filePreview,
19
+ _ as clickToUpload,
20
+ d as default,
21
+ c as disabled,
22
+ e as dropZone,
23
+ s as fileIcon,
24
+ f as fileInfo,
25
+ x as fileName,
26
+ l as filePreview,
26
27
  g as fileSize,
27
- r as hint,
28
- a as removeButton,
29
- e as root,
30
- t as trigger,
31
- _ as triggerContent,
32
- i as triggerText
28
+ a as hint,
29
+ r as hintContainer,
30
+ w as removeButton,
31
+ t as root,
32
+ i as trigger,
33
+ o as triggerContent,
34
+ n as triggerText
33
35
  };
34
36
  //# sourceMappingURL=FileInput.module.scss.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FileInput.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"FileInput.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;"}
@@ -1,9 +1,9 @@
1
- const n = "_container_6gzur_1", t = "_hasAdornmentStart_6gzur_10", r = "_hasAdornmentEnd_6gzur_14", o = "_invalidIcon_6gzur_47", a = "_inputContainer_6gzur_62", d = "_adornmentStart_6gzur_78", e = "_adornmentEnd_6gzur_83", _ = {
1
+ const n = "_container_mov6t_1", t = "_hasAdornmentStart_mov6t_10", o = "_hasAdornmentEnd_mov6t_14", a = "_invalidIcon_mov6t_48", r = "_inputContainer_mov6t_63", d = "_adornmentStart_mov6t_79", e = "_adornmentEnd_mov6t_84", _ = {
2
2
  container: n,
3
3
  hasAdornmentStart: t,
4
- hasAdornmentEnd: r,
5
- invalidIcon: o,
6
- inputContainer: a,
4
+ hasAdornmentEnd: o,
5
+ invalidIcon: a,
6
+ inputContainer: r,
7
7
  adornmentStart: d,
8
8
  adornmentEnd: e
9
9
  };
@@ -12,9 +12,9 @@ export {
12
12
  d as adornmentStart,
13
13
  n as container,
14
14
  _ as default,
15
- r as hasAdornmentEnd,
15
+ o as hasAdornmentEnd,
16
16
  t as hasAdornmentStart,
17
- a as inputContainer,
18
- o as invalidIcon
17
+ r as inputContainer,
18
+ a as invalidIcon
19
19
  };
20
20
  //# sourceMappingURL=Input.module.scss.js.map
@@ -1,4 +1,4 @@
1
- const t = "_list_1tff9_1", s = "_item_1tff9_17", e = {
1
+ const t = "_list_b105q_1", s = "_item_b105q_10", e = {
2
2
  list: t,
3
3
  item: s
4
4
  };
@@ -1,76 +1,77 @@
1
- import { jsx as n, jsxs as N } from "react/jsx-runtime";
2
- import { useRef as s, useState as O, useLayoutEffect as S } from "react";
3
- import i from "classnames";
4
- import { ModalDefaults as T } from "./ModalTypes.js";
1
+ import { jsx as s, jsxs as O } from "react/jsx-runtime";
2
+ import { useRef as r, useState as S, useLayoutEffect as T } from "react";
3
+ import l from "classnames";
4
+ import { ModalDefaults as B } from "./ModalTypes.js";
5
5
  import o from "./Modal.module.scss.js";
6
- import { applyMissingDefaults as B } from "../../../../helpers/applyMissingDefaults.js";
7
- import { useContainerBreakpoints as E } from "../../../../hooks/useContainerBreakpoints/useContainerBreakpoints.js";
8
- import { useOverflowDetection as M } from "../../../../hooks/useOverflowDetection/useOverflowDetection.js";
9
- import { useForkRef as A } from "../../../../hooks/useForkRef/useForkRef.js";
10
- import { transitionDuration as F } from "../../../../contexts/ThemeProvider/theme.js";
11
- function Q(g) {
12
- const h = B(g, T), { isOpen: l, onClose: t, shouldCloseOnBackdropClick: v, children: c, footer: f, containerRef: C } = h, m = s(null), d = s(null), u = s(null), b = A(d, C), w = E({
6
+ import { applyMissingDefaults as E } from "../../../../helpers/applyMissingDefaults.js";
7
+ import { useContainerBreakpoints as M } from "../../../../hooks/useContainerBreakpoints/useContainerBreakpoints.js";
8
+ import { useOverflowDetection as A } from "../../../../hooks/useOverflowDetection/useOverflowDetection.js";
9
+ import { useForkRef as F } from "../../../../hooks/useForkRef/useForkRef.js";
10
+ import { transitionDuration as j } from "../../../../contexts/ThemeProvider/theme.js";
11
+ function U(g) {
12
+ const h = E(g, B), { isOpen: i, onClose: n, shouldCloseOnBackdropClick: v, children: c, footer: f, containerRef: C } = h, m = r(null), d = r(null), R = r(null), u = r(null), b = F(d, C), w = M({
13
13
  ref: d
14
- }), a = M({
14
+ }), a = A({
15
15
  ref: u
16
- }), [R, p] = O(!1), r = s(null), k = w.includes("small");
17
- S(() => {
16
+ }), [x, p] = S(!1), t = r(null), k = w.includes("small");
17
+ T(() => {
18
18
  const e = m.current;
19
19
  if (e)
20
- return r.current && clearTimeout(r.current), l && !e.open ? (e.showModal(), requestAnimationFrame(() => {
20
+ return t.current && clearTimeout(t.current), i && !e.open ? (e.showModal(), requestAnimationFrame(() => {
21
21
  e.setAttribute("data-show", "true");
22
- })) : !l && e.open && (p(!0), r.current = setTimeout(() => {
22
+ })) : !i && e.open && (p(!0), t.current = setTimeout(() => {
23
23
  e.close(), e.removeAttribute("data-show"), p(!1);
24
- }, F)), () => {
25
- r.current && clearTimeout(r.current);
24
+ }, j)), () => {
25
+ t.current && clearTimeout(t.current);
26
26
  };
27
- }, [l]);
28
- const x = (e) => {
29
- e.target === e.currentTarget && v && t?.();
30
- }, y = (e) => {
31
- e.key === "Escape" && t?.();
32
- }, D = () => {
33
- t && t();
27
+ }, [i]);
28
+ const y = (e) => {
29
+ e.target === e.currentTarget && v && n?.();
30
+ }, D = (e) => {
31
+ e.key === "Escape" && n?.();
32
+ }, N = () => {
33
+ n && n();
34
34
  };
35
- return /* @__PURE__ */ n(
35
+ return /* @__PURE__ */ s(
36
36
  "dialog",
37
37
  {
38
38
  ref: m,
39
39
  className: o.dialog,
40
- onClose: D,
41
- "data-exiting": R || void 0,
42
- children: /* @__PURE__ */ n(
40
+ onClose: N,
41
+ "data-exiting": x || void 0,
42
+ children: /* @__PURE__ */ s(
43
43
  "div",
44
44
  {
45
45
  ref: b,
46
- className: i(o.backdrop, {
46
+ className: l(o.backdrop, {
47
47
  [o.backdropSmall]: k
48
48
  }),
49
- onClick: x,
50
- onKeyDown: y,
49
+ onClick: y,
50
+ onKeyDown: D,
51
51
  role: "presentation",
52
- children: /* @__PURE__ */ N(
52
+ children: /* @__PURE__ */ O(
53
53
  "div",
54
54
  {
55
- ref: u,
56
- className: i(o.modal, {
55
+ ref: R,
56
+ className: l(o.modal, {
57
57
  [o.modalSmall]: k,
58
58
  [o.modalOverflowing]: a
59
59
  }),
60
60
  children: [
61
- c && /* @__PURE__ */ n(
61
+ c && /* @__PURE__ */ s(
62
62
  "div",
63
63
  {
64
- className: i(o.content, {
64
+ ref: u,
65
+ className: l(o.content, {
65
66
  [o.contentScrollable]: a
66
67
  }),
67
68
  children: c
68
69
  }
69
70
  ),
70
- f && /* @__PURE__ */ n(
71
+ f && /* @__PURE__ */ s(
71
72
  "div",
72
73
  {
73
- className: i(o.footer, {
74
+ className: l(o.footer, {
74
75
  [o.footerFixed]: a
75
76
  }),
76
77
  children: f
@@ -85,6 +86,6 @@ function Q(g) {
85
86
  );
86
87
  }
87
88
  export {
88
- Q as Modal
89
+ U as Modal
89
90
  };
90
91
  //# sourceMappingURL=Modal.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Modal.js","sources":["../../../../../src/components/Common/UI/Modal/Modal.tsx"],"sourcesContent":["import { useLayoutEffect, useRef, useState } from 'react'\nimport classNames from 'classnames'\nimport { type ModalProps, ModalDefaults } from './ModalTypes'\nimport styles from './Modal.module.scss'\nimport { applyMissingDefaults } from '@/helpers/applyMissingDefaults'\nimport { useContainerBreakpoints } from '@/hooks/useContainerBreakpoints/useContainerBreakpoints'\nimport { useOverflowDetection } from '@/hooks/useOverflowDetection/useOverflowDetection'\nimport { useForkRef } from '@/hooks/useForkRef/useForkRef'\nimport { transitionDuration } from '@/contexts/ThemeProvider/theme'\n\nexport function Modal(rawProps: ModalProps) {\n const resolvedProps = applyMissingDefaults(rawProps, ModalDefaults)\n const { isOpen, onClose, shouldCloseOnBackdropClick, children, footer, containerRef } =\n resolvedProps\n\n const dialogRef = useRef<HTMLDialogElement>(null)\n const internalBackdropRef = useRef<HTMLDivElement>(null)\n const modalRef = useRef<HTMLDivElement>(null)\n\n // Use callback ref to sync both internal and external refs\n const backdropCallbackRef = useForkRef(internalBackdropRef, containerRef)\n\n const breakpoints = useContainerBreakpoints({\n ref: internalBackdropRef,\n })\n\n const isOverflowing = useOverflowDetection({\n ref: modalRef,\n })\n\n const [isExiting, setIsExiting] = useState(false)\n const transitionTimeoutRef = useRef<NodeJS.Timeout | null>(null)\n const isSmallOrLarger = breakpoints.includes('small')\n\n useLayoutEffect(() => {\n const dialog = dialogRef.current\n if (!dialog) return\n\n if (transitionTimeoutRef.current) {\n clearTimeout(transitionTimeoutRef.current)\n }\n\n if (isOpen && !dialog.open) {\n dialog.showModal()\n requestAnimationFrame(() => {\n dialog.setAttribute('data-show', 'true')\n })\n } else if (!isOpen && dialog.open) {\n setIsExiting(true)\n transitionTimeoutRef.current = setTimeout(() => {\n dialog.close()\n dialog.removeAttribute('data-show')\n setIsExiting(false)\n }, transitionDuration)\n }\n\n return () => {\n if (transitionTimeoutRef.current) {\n clearTimeout(transitionTimeoutRef.current)\n }\n }\n }, [isOpen])\n\n const handleBackdropClick = (event: React.MouseEvent<HTMLDivElement>) => {\n if (event.target === event.currentTarget && shouldCloseOnBackdropClick) {\n onClose?.()\n }\n }\n\n const handleKeyDown = (event: React.KeyboardEvent<HTMLDivElement>) => {\n if (event.key === 'Escape') {\n onClose?.()\n }\n }\n\n const handleClose = () => {\n if (onClose) {\n onClose()\n }\n }\n\n return (\n <dialog\n ref={dialogRef}\n className={styles.dialog}\n onClose={handleClose}\n data-exiting={isExiting || undefined}\n >\n <div\n ref={backdropCallbackRef}\n className={classNames(styles.backdrop, {\n [styles.backdropSmall as string]: isSmallOrLarger,\n })}\n onClick={handleBackdropClick}\n onKeyDown={handleKeyDown}\n role=\"presentation\"\n >\n <div\n ref={modalRef}\n className={classNames(styles.modal, {\n [styles.modalSmall as string]: isSmallOrLarger,\n [styles.modalOverflowing as string]: isOverflowing,\n })}\n >\n {children && (\n <div\n className={classNames(styles.content, {\n [styles.contentScrollable as string]: isOverflowing,\n })}\n >\n {children}\n </div>\n )}\n {footer && (\n <div\n className={classNames(styles.footer, {\n [styles.footerFixed as string]: isOverflowing,\n })}\n >\n {footer}\n </div>\n )}\n </div>\n </div>\n </dialog>\n )\n}\n"],"names":["Modal","rawProps","resolvedProps","applyMissingDefaults","ModalDefaults","isOpen","onClose","shouldCloseOnBackdropClick","children","footer","containerRef","dialogRef","useRef","internalBackdropRef","modalRef","backdropCallbackRef","useForkRef","breakpoints","useContainerBreakpoints","isOverflowing","useOverflowDetection","isExiting","setIsExiting","useState","transitionTimeoutRef","isSmallOrLarger","useLayoutEffect","dialog","transitionDuration","handleBackdropClick","event","handleKeyDown","handleClose","jsx","styles","classNames","jsxs"],"mappings":";;;;;;;;;;AAUO,SAASA,EAAMC,GAAsB;AAC1C,QAAMC,IAAgBC,EAAqBF,GAAUG,CAAa,GAC5D,EAAE,QAAAC,GAAQ,SAAAC,GAAS,4BAAAC,GAA4B,UAAAC,GAAU,QAAAC,GAAQ,cAAAC,MACrER,GAEIS,IAAYC,EAA0B,IAAI,GAC1CC,IAAsBD,EAAuB,IAAI,GACjDE,IAAWF,EAAuB,IAAI,GAGtCG,IAAsBC,EAAWH,GAAqBH,CAAY,GAElEO,IAAcC,EAAwB;AAAA,IAC1C,KAAKL;AAAA,EAAA,CACN,GAEKM,IAAgBC,EAAqB;AAAA,IACzC,KAAKN;AAAA,EAAA,CACN,GAEK,CAACO,GAAWC,CAAY,IAAIC,EAAS,EAAK,GAC1CC,IAAuBZ,EAA8B,IAAI,GACzDa,IAAkBR,EAAY,SAAS,OAAO;AAEpD,EAAAS,EAAgB,MAAM;AACpB,UAAMC,IAAShB,EAAU;AACzB,QAAKgB;AAEL,aAAIH,EAAqB,WACvB,aAAaA,EAAqB,OAAO,GAGvCnB,KAAU,CAACsB,EAAO,QACpBA,EAAO,UAAA,GACP,sBAAsB,MAAM;AAC1B,QAAAA,EAAO,aAAa,aAAa,MAAM;AAAA,MACzC,CAAC,KACQ,CAACtB,KAAUsB,EAAO,SAC3BL,EAAa,EAAI,GACjBE,EAAqB,UAAU,WAAW,MAAM;AAC9C,QAAAG,EAAO,MAAA,GACPA,EAAO,gBAAgB,WAAW,GAClCL,EAAa,EAAK;AAAA,MACpB,GAAGM,CAAkB,IAGhB,MAAM;AACX,QAAIJ,EAAqB,WACvB,aAAaA,EAAqB,OAAO;AAAA,MAE7C;AAAA,EACF,GAAG,CAACnB,CAAM,CAAC;AAEX,QAAMwB,IAAsB,CAACC,MAA4C;AACvE,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;AAAA,MAAA;AAAA,IACF;AAAA,EAAA;AAGN;"}
1
+ {"version":3,"file":"Modal.js","sources":["../../../../../src/components/Common/UI/Modal/Modal.tsx"],"sourcesContent":["import { useLayoutEffect, useRef, useState } from 'react'\nimport classNames from 'classnames'\nimport { type ModalProps, ModalDefaults } from './ModalTypes'\nimport styles from './Modal.module.scss'\nimport { applyMissingDefaults } from '@/helpers/applyMissingDefaults'\nimport { useContainerBreakpoints } from '@/hooks/useContainerBreakpoints/useContainerBreakpoints'\nimport { useOverflowDetection } from '@/hooks/useOverflowDetection/useOverflowDetection'\nimport { useForkRef } from '@/hooks/useForkRef/useForkRef'\nimport { transitionDuration } from '@/contexts/ThemeProvider/theme'\n\nexport function Modal(rawProps: ModalProps) {\n const resolvedProps = applyMissingDefaults(rawProps, ModalDefaults)\n const { isOpen, onClose, shouldCloseOnBackdropClick, children, footer, containerRef } =\n resolvedProps\n\n const dialogRef = useRef<HTMLDialogElement>(null)\n const internalBackdropRef = useRef<HTMLDivElement>(null)\n const modalRef = useRef<HTMLDivElement>(null)\n const contentRef = useRef<HTMLDivElement>(null)\n\n // Use callback ref to sync both internal and external refs\n const backdropCallbackRef = useForkRef(internalBackdropRef, containerRef)\n\n const breakpoints = useContainerBreakpoints({\n ref: internalBackdropRef,\n })\n\n const isOverflowing = useOverflowDetection({\n ref: contentRef,\n })\n\n const [isExiting, setIsExiting] = useState(false)\n const transitionTimeoutRef = useRef<NodeJS.Timeout | null>(null)\n const isSmallOrLarger = breakpoints.includes('small')\n\n useLayoutEffect(() => {\n const dialog = dialogRef.current\n if (!dialog) return\n\n if (transitionTimeoutRef.current) {\n clearTimeout(transitionTimeoutRef.current)\n }\n\n if (isOpen && !dialog.open) {\n dialog.showModal()\n requestAnimationFrame(() => {\n dialog.setAttribute('data-show', 'true')\n })\n } else if (!isOpen && dialog.open) {\n setIsExiting(true)\n transitionTimeoutRef.current = setTimeout(() => {\n dialog.close()\n dialog.removeAttribute('data-show')\n setIsExiting(false)\n }, transitionDuration)\n }\n\n return () => {\n if (transitionTimeoutRef.current) {\n clearTimeout(transitionTimeoutRef.current)\n }\n }\n }, [isOpen])\n\n const handleBackdropClick = (event: React.MouseEvent<HTMLDivElement>) => {\n if (event.target === event.currentTarget && shouldCloseOnBackdropClick) {\n onClose?.()\n }\n }\n\n const handleKeyDown = (event: React.KeyboardEvent<HTMLDivElement>) => {\n if (event.key === 'Escape') {\n onClose?.()\n }\n }\n\n const handleClose = () => {\n if (onClose) {\n onClose()\n }\n }\n\n return (\n <dialog\n ref={dialogRef}\n className={styles.dialog}\n onClose={handleClose}\n data-exiting={isExiting || undefined}\n >\n <div\n ref={backdropCallbackRef}\n className={classNames(styles.backdrop, {\n [styles.backdropSmall as string]: isSmallOrLarger,\n })}\n onClick={handleBackdropClick}\n onKeyDown={handleKeyDown}\n role=\"presentation\"\n >\n <div\n ref={modalRef}\n className={classNames(styles.modal, {\n [styles.modalSmall as string]: isSmallOrLarger,\n [styles.modalOverflowing as string]: isOverflowing,\n })}\n >\n {children && (\n <div\n ref={contentRef}\n className={classNames(styles.content, {\n [styles.contentScrollable as string]: isOverflowing,\n })}\n >\n {children}\n </div>\n )}\n {footer && (\n <div\n className={classNames(styles.footer, {\n [styles.footerFixed as string]: isOverflowing,\n })}\n >\n {footer}\n </div>\n )}\n </div>\n </div>\n </dialog>\n )\n}\n"],"names":["Modal","rawProps","resolvedProps","applyMissingDefaults","ModalDefaults","isOpen","onClose","shouldCloseOnBackdropClick","children","footer","containerRef","dialogRef","useRef","internalBackdropRef","modalRef","contentRef","backdropCallbackRef","useForkRef","breakpoints","useContainerBreakpoints","isOverflowing","useOverflowDetection","isExiting","setIsExiting","useState","transitionTimeoutRef","isSmallOrLarger","useLayoutEffect","dialog","transitionDuration","handleBackdropClick","event","handleKeyDown","handleClose","jsx","styles","classNames","jsxs"],"mappings":";;;;;;;;;;AAUO,SAASA,EAAMC,GAAsB;AAC1C,QAAMC,IAAgBC,EAAqBF,GAAUG,CAAa,GAC5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58", c = "_modalOverflowing_19y6l_62", n = "_content_19y6l_66", e = "_contentScrollable_19y6l_73", d = "_footer_19y6l_80", r = "_footerFixed_19y6l_93", m = {
1
+ const o = "_dialog_1hx5b_1", l = "_backdrop_1hx5b_21", t = "_backdropSmall_1hx5b_31", _ = "_modal_1hx5b_35", a = "_modalSmall_1hx5b_58", c = "_modalOverflowing_1hx5b_62", n = "_content_1hx5b_66", e = "_contentScrollable_1hx5b_73", d = "_footer_1hx5b_80", b = "_footerFixed_1hx5b_90", r = {
2
2
  dialog: o,
3
3
  backdrop: l,
4
4
  backdropSmall: t,
@@ -8,17 +8,17 @@ const o = "_dialog_19y6l_1", l = "_backdrop_19y6l_21", t = "_backdropSmall_19y6l
8
8
  content: n,
9
9
  contentScrollable: e,
10
10
  footer: d,
11
- footerFixed: r
11
+ footerFixed: b
12
12
  };
13
13
  export {
14
14
  l as backdrop,
15
15
  t as backdropSmall,
16
16
  n as content,
17
17
  e as contentScrollable,
18
- m as default,
18
+ r as default,
19
19
  o as dialog,
20
20
  d as footer,
21
- r as footerFixed,
21
+ b as footerFixed,
22
22
  _ as modal,
23
23
  c as modalOverflowing,
24
24
  a as modalSmall