@gusto/embedded-react-sdk 0.25.0 → 0.27.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 (370) hide show
  1. package/CHANGELOG.md +119 -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/assets/icons/plus-circle.svg.js +5 -5
  11. package/dist/assets/icons/plus-circle.svg.js.map +1 -1
  12. package/dist/components/Common/DocumentList/DocumentList.js +23 -23
  13. package/dist/components/Common/DocumentList/DocumentList.js.map +1 -1
  14. package/dist/components/Common/DocumentList/DocumentList.module.scss.js +6 -10
  15. package/dist/components/Common/DocumentList/DocumentList.module.scss.js.map +1 -1
  16. package/dist/components/Common/DocumentViewer/DocumentViewer.module.scss.js +12 -12
  17. package/dist/components/Common/InlineSpinner/InlineSpinner.module.scss.js +1 -1
  18. package/dist/components/Common/InternalError/InternalError.module.scss.js +4 -4
  19. package/dist/components/Common/ReorderableList/ReorderableList.module.scss.js +8 -8
  20. package/dist/components/Common/RequirementsList/RequirementsList.module.scss.js +1 -1
  21. package/dist/components/Common/SignatureForm/SignatureFormActions.js +1 -1
  22. package/dist/components/Common/SignatureForm/SignatureFormFields.js +1 -1
  23. package/dist/components/Common/UI/Alert/Alert.js +10 -10
  24. package/dist/components/Common/UI/Alert/Alert.js.map +1 -1
  25. package/dist/components/Common/UI/Alert/Alert.module.scss.js +10 -10
  26. package/dist/components/Common/UI/Badge/Badge.module.scss.js +1 -1
  27. package/dist/components/Common/UI/Banner/Banner.module.scss.js +4 -4
  28. package/dist/components/Common/UI/Button/Button.module.scss.js +1 -1
  29. package/dist/components/Common/UI/CalendarPreview/CalendarPreview.module.scss.js +4 -4
  30. package/dist/components/Common/UI/Card/Card.module.scss.js +1 -1
  31. package/dist/components/Common/UI/Checkbox/Checkbox.module.scss.js +1 -1
  32. package/dist/components/Common/UI/ComboBox/ComboBox.module.scss.js +6 -6
  33. package/dist/components/Common/UI/DatePicker/DatePicker.module.scss.js +4 -4
  34. package/dist/components/Common/UI/DescriptionList/DescriptionList.module.scss.js +1 -1
  35. package/dist/components/Common/UI/Dialog/Dialog.module.scss.js +2 -2
  36. package/dist/components/Common/UI/FileInput/FileInput.js +105 -106
  37. package/dist/components/Common/UI/FileInput/FileInput.js.map +1 -1
  38. package/dist/components/Common/UI/FileInput/FileInput.module.scss.js +27 -25
  39. package/dist/components/Common/UI/FileInput/FileInput.module.scss.js.map +1 -1
  40. package/dist/components/Common/UI/Input/Input.module.scss.js +8 -8
  41. package/dist/components/Common/UI/List/List.module.scss.js +1 -1
  42. package/dist/components/Common/UI/Modal/Modal.js +41 -40
  43. package/dist/components/Common/UI/Modal/Modal.js.map +1 -1
  44. package/dist/components/Common/UI/Modal/Modal.module.scss.js +12 -12
  45. package/dist/components/Common/UI/Radio/Radio.module.scss.js +6 -6
  46. package/dist/components/Common/UI/Select/Select.module.scss.js +5 -5
  47. package/dist/components/Common/UI/Table/Table.js +1 -1
  48. package/dist/components/Common/UI/Table/Table.js.map +1 -1
  49. package/dist/components/Common/UI/Table/Table.module.scss.js +1 -1
  50. package/dist/components/Common/UI/Tabs/Tabs.module.scss.js +1 -1
  51. package/dist/components/Common/UI/Text/Text.module.scss.js +17 -15
  52. package/dist/components/Common/UI/Text/Text.module.scss.js.map +1 -1
  53. package/dist/components/Common/UI/TextArea/TextArea.module.scss.js +1 -1
  54. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js +1 -1
  55. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js +16 -17
  56. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js.map +1 -1
  57. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +4 -3
  58. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
  59. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +5 -6
  60. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js.map +1 -1
  61. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +4 -3
  62. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
  63. package/dist/components/Company/AssignSignatory/useAssignSignatory.js +6 -5
  64. package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
  65. package/dist/components/Company/BankAccount/BankAccountForm/Form.js +1 -1
  66. package/dist/components/Company/BankAccount/BankAccountForm/context.js +4 -3
  67. package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
  68. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js +1 -1
  69. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +4 -3
  70. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  71. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js +4 -3
  72. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
  73. package/dist/components/Company/FederalTaxes/Form.js +1 -1
  74. package/dist/components/Company/FederalTaxes/useFederalTaxes.js +6 -5
  75. package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
  76. package/dist/components/Company/Industry/Context.js +7 -6
  77. package/dist/components/Company/Industry/Context.js.map +1 -1
  78. package/dist/components/Company/Locations/LocationForm/Form.js +5 -6
  79. package/dist/components/Company/Locations/LocationForm/Form.js.map +1 -1
  80. package/dist/components/Company/Locations/LocationForm/useLocationForm.js +4 -3
  81. package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
  82. package/dist/components/Company/Locations/LocationsList/useLocationsList.js +4 -3
  83. package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
  84. package/dist/components/Company/OnboardingOverview/context.js +4 -3
  85. package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
  86. package/dist/components/Company/PaySchedule/_parts/Edit.js +23 -24
  87. package/dist/components/Company/PaySchedule/_parts/Edit.js.map +1 -1
  88. package/dist/components/Company/PaySchedule/usePaySchedule.js +6 -5
  89. package/dist/components/Company/PaySchedule/usePaySchedule.js.map +1 -1
  90. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +4 -3
  91. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
  92. package/dist/components/Company/StateTaxes/StateTaxesList/context.js +4 -3
  93. package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
  94. package/dist/components/Contractor/Address/Form.js +7 -8
  95. package/dist/components/Contractor/Address/Form.js.map +1 -1
  96. package/dist/components/Contractor/Address/useAddress.js +6 -5
  97. package/dist/components/Contractor/Address/useAddress.js.map +1 -1
  98. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js +2 -2
  99. package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js +1 -1
  100. package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js +102 -88
  101. package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js.map +1 -1
  102. package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js +22 -23
  103. package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js.map +1 -1
  104. package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.d.ts +8 -0
  105. package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js +60 -0
  106. package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js.map +1 -0
  107. package/dist/components/Contractor/Payments/CreatePayment/GenericBlocker.d.ts +6 -0
  108. package/dist/components/Contractor/Payments/CreatePayment/GenericBlocker.js +18 -0
  109. package/dist/components/Contractor/Payments/CreatePayment/GenericBlocker.js.map +1 -0
  110. package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.d.ts +3 -1
  111. package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js +86 -55
  112. package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js.map +1 -1
  113. package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.d.ts +2 -0
  114. package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.js +35 -22
  115. package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.js.map +1 -1
  116. package/dist/components/Contractor/Payments/PaymentFlow/paymentStateMachine.d.ts +1 -0
  117. package/dist/components/Contractor/Payments/PaymentFlow/paymentStateMachine.js +82 -65
  118. package/dist/components/Contractor/Payments/PaymentFlow/paymentStateMachine.js.map +1 -1
  119. package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.module.scss.js +14 -14
  120. package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummary.d.ts +8 -0
  121. package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummary.js +45 -0
  122. package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummary.js.map +1 -0
  123. package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.d.ts +15 -0
  124. package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js +127 -0
  125. package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js.map +1 -0
  126. package/dist/components/Contractor/Payments/PaymentSummary/index.d.ts +3 -0
  127. package/dist/components/Contractor/Payments/PaymentsList/PaymentsList.js +37 -28
  128. package/dist/components/Contractor/Payments/PaymentsList/PaymentsList.js.map +1 -1
  129. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.d.ts +5 -1
  130. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js +52 -47
  131. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js.map +1 -1
  132. package/dist/components/Contractor/Profile/ContractorProfileForm.js +15 -15
  133. package/dist/components/Contractor/Profile/ContractorProfileForm.module.scss.js +1 -1
  134. package/dist/components/Employee/Compensation/Edit.js +14 -14
  135. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.d.ts +3 -1
  136. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js +145 -137
  137. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js.map +1 -1
  138. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.d.ts +2 -1
  139. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js +106 -101
  140. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js.map +1 -1
  141. package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js +90 -87
  142. package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js.map +1 -1
  143. package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.d.ts +2 -1
  144. package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js +110 -104
  145. package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js.map +1 -1
  146. package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js +50 -45
  147. package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js.map +1 -1
  148. package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js +30 -30
  149. package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js.map +1 -1
  150. package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.module.scss.js +4 -8
  151. package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.module.scss.js.map +1 -1
  152. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +4 -3
  153. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  154. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js +4 -3
  155. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
  156. package/dist/components/Employee/EmployeeList/useEmployeeList.js +4 -3
  157. package/dist/components/Employee/EmployeeList/useEmployeeList.js.map +1 -1
  158. package/dist/components/Employee/EmploymentEligibility/EmploymentEligibility.d.ts +3 -0
  159. package/dist/components/Employee/EmploymentEligibility/EmploymentEligibilityPresentation.d.ts +37 -0
  160. package/dist/components/Employee/EmploymentEligibility/index.d.ts +4 -0
  161. package/dist/components/Employee/FederalTaxes/FederalForm.js +7 -7
  162. package/dist/components/Employee/FederalTaxes/useFederalTaxes.js +4 -3
  163. package/dist/components/Employee/FederalTaxes/useFederalTaxes.js.map +1 -1
  164. package/dist/components/Employee/PaymentMethod/BankAccountEdit.js +2 -2
  165. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js +1 -1
  166. package/dist/components/Employee/PaymentMethod/Split.js +8 -8
  167. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +6 -5
  168. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +1 -1
  169. package/dist/components/Employee/Profile/AdminPersonalDetails.js +1 -1
  170. package/dist/components/Employee/Profile/AdminPersonalDetails.module.scss.js +1 -1
  171. package/dist/components/Employee/Profile/HomeAddress.js +9 -10
  172. package/dist/components/Employee/Profile/HomeAddress.js.map +1 -1
  173. package/dist/components/Employee/Profile/PersonalDetailsInputs.js +10 -11
  174. package/dist/components/Employee/Profile/PersonalDetailsInputs.js.map +1 -1
  175. package/dist/components/Employee/Profile/useProfile.js +4 -3
  176. package/dist/components/Employee/Profile/useProfile.js.map +1 -1
  177. package/dist/components/Employee/StateTaxes/useStateTaxes.js +4 -3
  178. package/dist/components/Employee/StateTaxes/useStateTaxes.js.map +1 -1
  179. package/dist/components/Employee/Taxes/FederalForm.js +7 -7
  180. package/dist/components/Employee/Taxes/useTaxes.js +4 -3
  181. package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
  182. package/dist/components/{Payroll/InformationRequests → InformationRequests}/InformationRequestForm/InformationRequestForm.d.ts +4 -4
  183. package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js +163 -0
  184. package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js.map +1 -0
  185. package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.module.scss.js +20 -0
  186. package/dist/components/{Payroll/InformationRequests → InformationRequests}/InformationRequestForm/InformationRequestForm.module.scss.js.map +1 -1
  187. package/dist/components/{Payroll/InformationRequests → InformationRequests}/InformationRequestList/InformationRequestList.d.ts +3 -2
  188. package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js +98 -0
  189. package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js.map +1 -0
  190. package/dist/components/InformationRequests/InformationRequests.d.ts +12 -0
  191. package/dist/components/InformationRequests/InformationRequests.js +101 -0
  192. package/dist/components/InformationRequests/InformationRequests.js.map +1 -0
  193. package/dist/components/{Payroll/InformationRequests → InformationRequests}/InformationRequestsComponents.d.ts +4 -4
  194. package/dist/components/{Payroll/InformationRequests → InformationRequests}/InformationRequestsComponents.js +2 -2
  195. package/dist/components/InformationRequests/InformationRequestsComponents.js.map +1 -0
  196. package/dist/components/InformationRequests/index.d.ts +4 -0
  197. package/dist/components/InformationRequests/index.js +9 -0
  198. package/dist/components/InformationRequests/index.js.map +1 -0
  199. package/dist/components/{Payroll/InformationRequests → InformationRequests}/informationRequestsStateMachine.d.ts +1 -1
  200. package/dist/components/{Payroll/InformationRequests → InformationRequests}/informationRequestsStateMachine.js +1 -1
  201. package/dist/components/InformationRequests/informationRequestsStateMachine.js.map +1 -0
  202. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsBanner/ConfirmWireDetailsBanner.js +69 -59
  203. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsBanner/ConfirmWireDetailsBanner.js.map +1 -1
  204. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js +9 -9
  205. package/dist/components/Payroll/ConfirmWireDetails/WireInstructions/WireInstructions.js +61 -52
  206. package/dist/components/Payroll/ConfirmWireDetails/WireInstructions/WireInstructions.js.map +1 -1
  207. package/dist/components/Payroll/ConfirmWireDetails/WireInstructions/WireInstructions.module.scss.js +10 -10
  208. package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelection.d.ts +2 -0
  209. package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelection.js +33 -0
  210. package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelection.js.map +1 -0
  211. package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.d.ts +7 -0
  212. package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js +39 -0
  213. package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js.map +1 -0
  214. package/dist/components/Payroll/OffCycleReasonSelection/index.d.ts +5 -0
  215. package/dist/components/Payroll/OffCycleReasonSelection/types.d.ts +15 -0
  216. package/dist/components/Payroll/OffCycleReasonSelection/types.js +14 -0
  217. package/dist/components/Payroll/OffCycleReasonSelection/types.js.map +1 -0
  218. package/dist/components/Payroll/PayPeriodDateForm/PayPeriodDateForm.d.ts +2 -0
  219. package/dist/components/Payroll/PayPeriodDateForm/PayPeriodDateForm.js +35 -0
  220. package/dist/components/Payroll/PayPeriodDateForm/PayPeriodDateForm.js.map +1 -0
  221. package/dist/components/Payroll/PayPeriodDateForm/PayPeriodDateFormPresentation.d.ts +2 -0
  222. package/dist/components/Payroll/PayPeriodDateForm/PayPeriodDateFormPresentation.js +65 -0
  223. package/dist/components/Payroll/PayPeriodDateForm/PayPeriodDateFormPresentation.js.map +1 -0
  224. package/dist/components/Payroll/PayPeriodDateForm/PayPeriodDateFormPresentation.module.scss.js +18 -0
  225. package/dist/components/Payroll/PayPeriodDateForm/PayPeriodDateFormPresentation.module.scss.js.map +1 -0
  226. package/dist/components/Payroll/PayPeriodDateForm/PayPeriodDateFormTypes.d.ts +53 -0
  227. package/dist/components/Payroll/PayPeriodDateForm/index.d.ts +3 -0
  228. package/dist/components/Payroll/PayPeriodDateForm/usePayPeriodDateValidation.d.ts +5 -0
  229. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js +22 -22
  230. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js.map +1 -1
  231. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.d.ts +5 -13
  232. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js +103 -28
  233. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js.map +1 -1
  234. package/dist/components/Payroll/PayrollBlocker/index.d.ts +0 -1
  235. package/dist/components/Payroll/PayrollBlocker/payrollHelpers.js +14 -14
  236. package/dist/components/Payroll/PayrollBlocker/payrollHelpers.js.map +1 -1
  237. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.d.ts +1 -1
  238. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js +132 -131
  239. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
  240. package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.d.ts +1 -1
  241. package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.js.map +1 -1
  242. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +38 -39
  243. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js.map +1 -1
  244. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.module.scss.js +5 -5
  245. package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js +6 -6
  246. package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.d.ts +1 -0
  247. package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.js +45 -38
  248. package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.js.map +1 -1
  249. package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js +54 -40
  250. package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js.map +1 -1
  251. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js +29 -29
  252. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js.map +1 -1
  253. package/dist/components/Payroll/PayrollLanding/PayrollLanding.d.ts +2 -1
  254. package/dist/components/Payroll/PayrollLanding/PayrollLanding.js +26 -24
  255. package/dist/components/Payroll/PayrollLanding/PayrollLanding.js.map +1 -1
  256. package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.d.ts +2 -0
  257. package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.js +70 -48
  258. package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.js.map +1 -1
  259. package/dist/components/Payroll/PayrollLanding/payrollLandingStateMachine.js +72 -36
  260. package/dist/components/Payroll/PayrollLanding/payrollLandingStateMachine.js.map +1 -1
  261. package/dist/components/Payroll/PayrollList/PayrollList.js +14 -17
  262. package/dist/components/Payroll/PayrollList/PayrollList.js.map +1 -1
  263. package/dist/components/Payroll/PayrollList/PayrollListPresentation.d.ts +1 -2
  264. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +93 -98
  265. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
  266. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js.map +1 -1
  267. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.d.ts +3 -3
  268. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +242 -243
  269. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
  270. package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.d.ts +2 -2
  271. package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js.map +1 -1
  272. package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/GenericBlocker.d.ts +2 -2
  273. package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/GenericBlocker.js.map +1 -1
  274. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.module.scss.js +18 -18
  275. package/dist/components/Payroll/RecoveryCases/RecoveryCaseErrorCode.module.scss.js +8 -0
  276. package/dist/components/Payroll/RecoveryCases/RecoveryCaseErrorCode.module.scss.js.map +1 -0
  277. package/dist/components/Payroll/RecoveryCases/RecoveryCases.d.ts +4 -1
  278. package/dist/components/Payroll/RecoveryCases/RecoveryCases.js +34 -28
  279. package/dist/components/Payroll/RecoveryCases/RecoveryCases.js.map +1 -1
  280. package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js +82 -51
  281. package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js.map +1 -1
  282. package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.module.scss.js +2 -4
  283. package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.module.scss.js.map +1 -1
  284. package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js +59 -35
  285. package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js.map +1 -1
  286. package/dist/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.d.ts +7 -0
  287. package/dist/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.js +67 -0
  288. package/dist/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.js.map +1 -0
  289. package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfigurationContext.d.ts +1 -1
  290. package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfigurationContext.js.map +1 -1
  291. package/dist/components/Payroll/helpers.js.map +1 -1
  292. package/dist/components/Payroll/index.d.ts +5 -2
  293. package/dist/components/Payroll/index.js +16 -14
  294. package/dist/components/Payroll/index.js.map +1 -1
  295. package/dist/components/Payroll/usePreparedPayrollData.d.ts +1 -1
  296. package/dist/components/Payroll/usePreparedPayrollData.js +3 -2
  297. package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
  298. package/dist/components/index.d.ts +1 -0
  299. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +3 -2
  300. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
  301. package/dist/contexts/ThemeProvider/theme.d.ts +8 -3
  302. package/dist/contexts/ThemeProvider/theme.js +27 -22
  303. package/dist/contexts/ThemeProvider/theme.js.map +1 -1
  304. package/dist/helpers/dateFormatting.d.ts +3 -0
  305. package/dist/helpers/dateFormatting.js.map +1 -1
  306. package/dist/helpers/formattedStrings.js +12 -11
  307. package/dist/helpers/formattedStrings.js.map +1 -1
  308. package/dist/i18n/I18n.js +8 -8
  309. package/dist/i18n/I18n.js.map +1 -1
  310. package/dist/i18n/en/Contractor.Payments.CreatePayment.json.js +30 -26
  311. package/dist/i18n/en/Contractor.Payments.CreatePayment.json.js.map +1 -1
  312. package/dist/i18n/en/Contractor.Payments.PaymentSummary.json.js +58 -0
  313. package/dist/i18n/en/Contractor.Payments.PaymentSummary.json.js.map +1 -0
  314. package/dist/i18n/en/Employee.Deductions.json.js +157 -161
  315. package/dist/i18n/en/Employee.Deductions.json.js.map +1 -1
  316. package/dist/i18n/en/Employee.EmploymentEligibility.json.js +28 -0
  317. package/dist/i18n/en/Employee.EmploymentEligibility.json.js.map +1 -0
  318. package/dist/i18n/en/InformationRequests.InformationRequestForm.json.js +20 -0
  319. package/dist/i18n/en/InformationRequests.InformationRequestForm.json.js.map +1 -0
  320. package/dist/i18n/en/InformationRequests.InformationRequestList.json.js +20 -0
  321. package/dist/i18n/en/InformationRequests.InformationRequestList.json.js.map +1 -0
  322. package/dist/i18n/en/InformationRequests.json.js +8 -0
  323. package/dist/i18n/en/InformationRequests.json.js.map +1 -0
  324. package/dist/i18n/en/Payroll.ConfirmWireDetailsBanner.json.js +1 -1
  325. package/dist/i18n/en/Payroll.OffCycleReasonSelection.json.js +12 -0
  326. package/dist/i18n/en/Payroll.OffCycleReasonSelection.json.js.map +1 -0
  327. package/dist/i18n/en/Payroll.PayPeriodDateForm.json.js +32 -0
  328. package/dist/i18n/en/Payroll.PayPeriodDateForm.json.js.map +1 -0
  329. package/dist/i18n/en/Payroll.PayrollBlocker.json.js +24 -20
  330. package/dist/i18n/en/Payroll.PayrollBlocker.json.js.map +1 -1
  331. package/dist/i18n/en/Payroll.PayrollLanding.json.js +5 -3
  332. package/dist/i18n/en/Payroll.PayrollLanding.json.js.map +1 -1
  333. package/dist/i18n/en/Payroll.RecoveryCasesList.json.js +14 -10
  334. package/dist/i18n/en/Payroll.RecoveryCasesList.json.js.map +1 -1
  335. package/dist/i18n/en/Payroll.RecoveryCasesResubmit.json.js +5 -3
  336. package/dist/i18n/en/Payroll.RecoveryCasesResubmit.json.js.map +1 -1
  337. package/dist/i18n/en/Payroll.WireInstructions.json.js +20 -16
  338. package/dist/i18n/en/Payroll.WireInstructions.json.js.map +1 -1
  339. package/dist/index.js +10 -8
  340. package/dist/index.js.map +1 -1
  341. package/dist/shared/constants.d.ts +10 -0
  342. package/dist/shared/constants.js +22 -17
  343. package/dist/shared/constants.js.map +1 -1
  344. package/dist/style.css +1 -1
  345. package/dist/types/i18next.d.ts +290 -40
  346. package/package.json +17 -17
  347. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.module.scss.js +0 -8
  348. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.module.scss.js.map +0 -1
  349. package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.module.scss.js +0 -14
  350. package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.module.scss.js.map +0 -1
  351. package/dist/components/Payroll/InformationRequests/InformationRequestForm/InformationRequestForm.js +0 -142
  352. package/dist/components/Payroll/InformationRequests/InformationRequestForm/InformationRequestForm.js.map +0 -1
  353. package/dist/components/Payroll/InformationRequests/InformationRequestForm/InformationRequestForm.module.scss.js +0 -18
  354. package/dist/components/Payroll/InformationRequests/InformationRequestList/InformationRequestList.js +0 -88
  355. package/dist/components/Payroll/InformationRequests/InformationRequestList/InformationRequestList.js.map +0 -1
  356. package/dist/components/Payroll/InformationRequests/InformationRequests.d.ts +0 -6
  357. package/dist/components/Payroll/InformationRequests/InformationRequests.js +0 -55
  358. package/dist/components/Payroll/InformationRequests/InformationRequests.js.map +0 -1
  359. package/dist/components/Payroll/InformationRequests/InformationRequestsComponents.js.map +0 -1
  360. package/dist/components/Payroll/InformationRequests/index.d.ts +0 -3
  361. package/dist/components/Payroll/InformationRequests/informationRequestsStateMachine.js.map +0 -1
  362. package/dist/components/Payroll/PayrollBlocker/PayrollBlocker.d.ts +0 -6
  363. package/dist/components/Payroll/PayrollBlocker/PayrollBlocker.js +0 -32
  364. package/dist/components/Payroll/PayrollBlocker/PayrollBlocker.js.map +0 -1
  365. package/dist/i18n/en/Payroll.InformationRequestForm.json.js +0 -18
  366. package/dist/i18n/en/Payroll.InformationRequestForm.json.js.map +0 -1
  367. package/dist/i18n/en/Payroll.InformationRequestList.json.js +0 -18
  368. package/dist/i18n/en/Payroll.InformationRequestList.json.js.map +0 -1
  369. /package/dist/components/{Payroll/InformationRequests → InformationRequests}/InformationRequestForm/index.d.ts +0 -0
  370. /package/dist/components/{Payroll/InformationRequests → InformationRequests}/InformationRequestList/index.d.ts +0 -0
@@ -1,4 +1,4 @@
1
- const e = "_badge_1h2ej_1", a = {
1
+ const e = "_badge_6p7jj_1", a = {
2
2
  badge: e
3
3
  };
4
4
  export {
@@ -1,13 +1,13 @@
1
- const t = "_banner_tub6c_1", e = "_header_tub6c_12", n = "_title_tub6c_19", c = "_content_tub6c_25", _ = {
1
+ const t = "_banner_1v6k8_1", e = "_header_1v6k8_12", n = "_title_1v6k8_19", _ = "_content_1v6k8_25", o = {
2
2
  banner: t,
3
3
  header: e,
4
4
  title: n,
5
- content: c
5
+ content: _
6
6
  };
7
7
  export {
8
8
  t as banner,
9
- c as content,
10
- _ as default,
9
+ _ as content,
10
+ o as default,
11
11
  e as header,
12
12
  n as title
13
13
  };
@@ -1,4 +1,4 @@
1
- const o = "_root_kyosy_1", t = {
1
+ const o = "_root_1sac1_1", t = {
2
2
  root: o
3
3
  };
4
4
  export {
@@ -1,14 +1,14 @@
1
- const a = "_calendar_1riep_1", e = "_calendarWrapper_1riep_1", r = "_calendarHeader_1riep_5", d = "_dateMarker_1riep_44", c = {
1
+ const a = "_calendar_1uc0m_1", e = "_calendarWrapper_1uc0m_1", r = "_calendarHeader_1uc0m_5", c = "_dateMarker_1uc0m_44", d = {
2
2
  calendar: a,
3
3
  calendarWrapper: e,
4
4
  calendarHeader: r,
5
- dateMarker: d
5
+ dateMarker: c
6
6
  };
7
7
  export {
8
8
  a as calendar,
9
9
  r as calendarHeader,
10
10
  e as calendarWrapper,
11
- d as dateMarker,
12
- c as default
11
+ c as dateMarker,
12
+ d as default
13
13
  };
14
14
  //# sourceMappingURL=CalendarPreview.module.scss.js.map
@@ -1,4 +1,4 @@
1
- const a = "_cardContainer_sq7ek_1", n = {
1
+ const a = "_cardContainer_kjbcm_1", n = {
2
2
  cardContainer: a
3
3
  };
4
4
  export {
@@ -1,4 +1,4 @@
1
- const c = "_checkboxWrapper_wiqs9_1", e = "_checkbox_wiqs9_1", o = "_check_wiqs9_1", h = "_checkboxInput_wiqs9_29", k = {
1
+ const c = "_checkboxWrapper_19uv2_1", e = "_checkbox_19uv2_1", o = "_check_19uv2_1", h = "_checkboxInput_19uv2_29", k = {
2
2
  checkboxWrapper: c,
3
3
  checkbox: e,
4
4
  check: o,
@@ -1,12 +1,12 @@
1
- const o = "_root_wz8lv_1", s = "_icons_wz8lv_66", t = "_popover_wz8lv_76", _ = {
1
+ const o = "_root_8pg76_1", p = "_icons_8pg76_67", s = "_popover_8pg76_77", t = {
2
2
  root: o,
3
- icons: s,
4
- popover: t
3
+ icons: p,
4
+ popover: s
5
5
  };
6
6
  export {
7
- _ as default,
8
- s as icons,
9
- t as popover,
7
+ t as default,
8
+ p as icons,
9
+ s as popover,
10
10
  o as root
11
11
  };
12
12
  //# sourceMappingURL=ComboBox.module.scss.js.map
@@ -1,13 +1,13 @@
1
- const o = "_container_zffe8_1", n = "_root_zffe8_5", t = "_popover_zffe8_99", e = "_icons_zffe8_231", _ = {
1
+ const o = "_container_d7y6b_1", n = "_root_d7y6b_5", t = "_popover_d7y6b_98", _ = "_icons_d7y6b_230", c = {
2
2
  container: o,
3
3
  root: n,
4
4
  popover: t,
5
- icons: e
5
+ icons: _
6
6
  };
7
7
  export {
8
8
  o as container,
9
- _ as default,
10
- e as icons,
9
+ c as default,
10
+ _ as icons,
11
11
  t as popover,
12
12
  n as root
13
13
  };
@@ -1,4 +1,4 @@
1
- const t = "_root_n7k5c_1", o = "_item_n7k5c_4", e = {
1
+ const t = "_root_n8es0_1", o = "_item_n8es0_4", e = {
2
2
  root: t,
3
3
  item: o
4
4
  };
@@ -1,4 +1,4 @@
1
- const t = "_title_1geio_1", o = "_body_1geio_10", s = "_actions_1geio_16", e = {
1
+ const t = "_title_1r3tb_1", o = "_body_1r3tb_10", s = "_actions_1r3tb_16", _ = {
2
2
  title: t,
3
3
  body: o,
4
4
  actions: s
@@ -6,7 +6,7 @@ const t = "_title_1geio_1", o = "_body_1geio_10", s = "_actions_1geio_16", e = {
6
6
  export {
7
7
  s as actions,
8
8
  o as body,
9
- e as default,
9
+ _ as default,
10
10
  t as title
11
11
  };
12
12
  //# sourceMappingURL=Dialog.module.scss.js.map
@@ -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,C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AAWE,EAAO,eAAe,EAAA;AAAA,sBAAG;AAAA,oBAAA,GAE3E;AAAA,oBACCvC,EAAoBC,CAAM,KACzB,gBAAAoC,EAAC,QAAA,EAAK,WAAWE,EAAO,MACrB,UAAAjC,EAAE,2BAA2B,EAAE,OAAON,EAAoBC,CAAM,EAAA,CAAG,GACtE;AAAA,oBAEDW,uBACE,QAAA,EAAK,IAAIa,GAAe,WAAWc,EAAO,MACxC,UAAA3B,EAAA,CACH;AAAA,kBAAA,EAAA,CAEJ;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;AAC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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,
1
+ const t = "_root_17tob_1", o = "_dropZone_17tob_5", e = "_trigger_17tob_12", n = "_triggerContent_17tob_34", i = "_triggerText_17tob_41", _ = "_clickToUpload_17tob_45", r = "_hintContainer_17tob_50", l = "_hint_17tob_50", c = "_filePreview_17tob_61", s = "_disabled_17tob_64", f = "_fileIcon_17tob_69", b = "_fileInfo_17tob_81", g = "_fileName_17tob_85", a = "_fileSize_17tob_95", d = "_removeButton_17tob_100", p = {
2
+ root: t,
3
3
  dropZone: o,
4
- trigger: t,
5
- triggerContent: _,
4
+ trigger: e,
5
+ triggerContent: n,
6
6
  triggerText: i,
7
- clickToUpload: n,
8
- hint: r,
9
- filePreview: d,
10
- disabled: l,
11
- fileIcon: c,
12
- fileInfo: s,
13
- fileName: f,
14
- fileSize: g,
15
- removeButton: a
7
+ clickToUpload: _,
8
+ hintContainer: r,
9
+ hint: l,
10
+ filePreview: c,
11
+ disabled: s,
12
+ fileIcon: f,
13
+ fileInfo: b,
14
+ fileName: g,
15
+ fileSize: a,
16
+ removeButton: d
16
17
  };
17
18
  export {
18
- n as clickToUpload,
19
+ _ as clickToUpload,
19
20
  p as default,
20
- l as disabled,
21
+ s as disabled,
21
22
  o as dropZone,
22
- c as fileIcon,
23
- s as fileInfo,
24
- f as fileName,
25
- d as filePreview,
26
- g as fileSize,
27
- r as hint,
28
- a as removeButton,
29
- e as root,
30
- t as trigger,
31
- _ as triggerContent,
23
+ f as fileIcon,
24
+ b as fileInfo,
25
+ g as fileName,
26
+ c as filePreview,
27
+ a as fileSize,
28
+ l as hint,
29
+ r as hintContainer,
30
+ d as removeButton,
31
+ t as root,
32
+ e as trigger,
33
+ n as triggerContent,
32
34
  i 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,20 +1,20 @@
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_iau15_1", t = "_hasAdornmentStart_iau15_10", a = "_hasAdornmentEnd_iau15_14", o = "_invalidIcon_iau15_48", r = "_inputContainer_iau15_63", d = "_adornmentStart_iau15_79", i = "_adornmentEnd_iau15_84", e = {
2
2
  container: n,
3
3
  hasAdornmentStart: t,
4
- hasAdornmentEnd: r,
4
+ hasAdornmentEnd: a,
5
5
  invalidIcon: o,
6
- inputContainer: a,
6
+ inputContainer: r,
7
7
  adornmentStart: d,
8
- adornmentEnd: e
8
+ adornmentEnd: i
9
9
  };
10
10
  export {
11
- e as adornmentEnd,
11
+ i as adornmentEnd,
12
12
  d as adornmentStart,
13
13
  n as container,
14
- _ as default,
15
- r as hasAdornmentEnd,
14
+ e as default,
15
+ a as hasAdornmentEnd,
16
16
  t as hasAdornmentStart,
17
- a as inputContainer,
17
+ r as inputContainer,
18
18
  o 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
  };