@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.
- package/CHANGELOG.md +49 -0
- package/dist/assets/icons/icon-file-jpg.svg.js +10 -0
- package/dist/assets/icons/icon-file-jpg.svg.js.map +1 -0
- package/dist/assets/icons/icon-file-pdf.svg.js +10 -0
- package/dist/assets/icons/icon-file-pdf.svg.js.map +1 -0
- package/dist/assets/icons/icon-file-png.svg.js +10 -0
- package/dist/assets/icons/icon-file-png.svg.js.map +1 -0
- package/dist/assets/icons/icon-trashcan.svg.js +10 -0
- package/dist/assets/icons/icon-trashcan.svg.js.map +1 -0
- package/dist/components/Base/Base.js +12 -13
- package/dist/components/Base/Base.js.map +1 -1
- package/dist/components/Common/SignatureForm/SignatureForm.js +10 -12
- package/dist/components/Common/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Common/SignatureForm/SignatureFormActions.js +3 -4
- package/dist/components/Common/SignatureForm/SignatureFormActions.js.map +1 -1
- package/dist/components/Common/SignatureForm/SignatureFormFields.js +6 -7
- package/dist/components/Common/SignatureForm/SignatureFormFields.js.map +1 -1
- package/dist/components/Common/UI/Alert/Alert.js +10 -10
- package/dist/components/Common/UI/Alert/Alert.js.map +1 -1
- package/dist/components/Common/UI/Alert/Alert.module.scss.js +14 -14
- package/dist/components/Common/UI/Badge/Badge.module.scss.js +1 -1
- package/dist/components/Common/UI/Banner/Banner.module.scss.js +4 -4
- package/dist/components/Common/UI/ComboBox/ComboBox.module.scss.js +6 -6
- package/dist/components/Common/UI/FileInput/FileInput.js +105 -106
- package/dist/components/Common/UI/FileInput/FileInput.js.map +1 -1
- package/dist/components/Common/UI/FileInput/FileInput.module.scss.js +30 -28
- package/dist/components/Common/UI/FileInput/FileInput.module.scss.js.map +1 -1
- package/dist/components/Common/UI/Input/Input.module.scss.js +7 -7
- package/dist/components/Common/UI/List/List.module.scss.js +1 -1
- package/dist/components/Common/UI/Modal/Modal.js +41 -40
- package/dist/components/Common/UI/Modal/Modal.js.map +1 -1
- package/dist/components/Common/UI/Modal/Modal.module.scss.js +4 -4
- package/dist/components/Common/UI/Select/Select.module.scss.js +6 -6
- package/dist/components/Common/UI/TextArea/TextArea.module.scss.js +4 -4
- package/dist/components/Company/AssignSignatory/AssignSignatory.js +2 -3
- package/dist/components/Company/AssignSignatory/AssignSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js +2 -3
- package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js +2 -3
- package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js +5 -6
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js +2 -3
- package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +4 -5
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +1 -1
- package/dist/components/Company/AssignSignatory/TitleSelect.js +3 -4
- package/dist/components/Company/AssignSignatory/TitleSelect.js.map +1 -1
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/Actions.js +8 -9
- package/dist/components/Company/BankAccount/BankAccountForm/Actions.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/Form.js +4 -6
- package/dist/components/Company/BankAccount/BankAccountForm/Form.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/context.js +1 -1
- package/dist/components/Company/BankAccount/BankAccountList/Actions.js +2 -3
- package/dist/components/Company/BankAccount/BankAccountList/Actions.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js +6 -7
- package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountVerify/Form.js +4 -6
- package/dist/components/Company/BankAccount/BankAccountVerify/Form.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/Actions.js +2 -3
- package/dist/components/Company/DocumentSigner/DocumentList/Actions.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js +8 -9
- package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +1 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +3 -4
- package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js +1 -1
- package/dist/components/Company/FederalTaxes/Actions.js +6 -7
- package/dist/components/Company/FederalTaxes/Actions.js.map +1 -1
- package/dist/components/Company/FederalTaxes/FederalTaxes.js +3 -4
- package/dist/components/Company/FederalTaxes/FederalTaxes.js.map +1 -1
- package/dist/components/Company/FederalTaxes/Form.js +2 -4
- package/dist/components/Company/FederalTaxes/Form.js.map +1 -1
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js +1 -1
- package/dist/components/Company/Industry/Actions.js +7 -8
- package/dist/components/Company/Industry/Actions.js.map +1 -1
- package/dist/components/Company/Industry/Context.js +1 -1
- package/dist/components/Company/Industry/Edit.js +2 -3
- package/dist/components/Company/Industry/Edit.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/Actions.js +6 -7
- package/dist/components/Company/Locations/LocationForm/Actions.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/Form.js +4 -5
- package/dist/components/Company/Locations/LocationForm/Form.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/LocationForm.js +3 -4
- package/dist/components/Company/Locations/LocationForm/LocationForm.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js +1 -1
- package/dist/components/Company/Locations/LocationsList/Actions.js +2 -3
- package/dist/components/Company/Locations/LocationsList/Actions.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/List.js +6 -7
- package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/LocationsList.js +7 -8
- package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js +1 -1
- package/dist/components/Company/OnboardingOverview/Completed.js +10 -12
- package/dist/components/Company/OnboardingOverview/Completed.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/MissingRequirements.js +6 -8
- package/dist/components/Company/OnboardingOverview/MissingRequirements.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/OnboardingOverview.js +7 -8
- package/dist/components/Company/OnboardingOverview/OnboardingOverview.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/context.js +1 -1
- package/dist/components/Company/PaySchedule/PaySchedule.js +3 -4
- package/dist/components/Company/PaySchedule/PaySchedule.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/Actions.js +2 -3
- package/dist/components/Company/PaySchedule/_parts/Actions.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/Edit.js +9 -10
- package/dist/components/Company/PaySchedule/_parts/Edit.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/Head.js +11 -13
- package/dist/components/Company/PaySchedule/_parts/Head.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/List.js +13 -15
- package/dist/components/Company/PaySchedule/_parts/List.js.map +1 -1
- package/dist/components/Company/PaySchedule/usePaySchedule.js +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js +2 -3
- package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js +2 -3
- package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/List.js +2 -3
- package/dist/components/Company/StateTaxes/StateTaxesList/List.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js +1 -1
- package/dist/components/Contractor/Address/Address.js +4 -5
- package/dist/components/Contractor/Address/Address.js.map +1 -1
- package/dist/components/Contractor/Address/Form.js +6 -7
- package/dist/components/Contractor/Address/Form.js.map +1 -1
- package/dist/components/Contractor/Address/useAddress.js +1 -1
- package/dist/components/Contractor/ContractorList/index.js +31 -32
- package/dist/components/Contractor/ContractorList/index.js.map +1 -1
- package/dist/components/Contractor/NewHireReport/NewHireReport.js +13 -14
- package/dist/components/Contractor/NewHireReport/NewHireReport.js.map +1 -1
- package/dist/components/Contractor/PaymentMethod/BankAccountForm.js +10 -11
- package/dist/components/Contractor/PaymentMethod/BankAccountForm.js.map +1 -1
- package/dist/components/Contractor/PaymentMethod/PaymentMethod.js +2 -3
- package/dist/components/Contractor/PaymentMethod/PaymentMethod.js.map +1 -1
- package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js +2 -3
- package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js +102 -88
- package/dist/components/Contractor/Payments/CreatePayment/CreatePayment.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js +2 -4
- package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js +13 -14
- package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.d.ts +8 -0
- package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js +58 -0
- package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js.map +1 -0
- package/dist/components/Contractor/Payments/CreatePayment/GenericBlocker.d.ts +6 -0
- package/dist/components/Contractor/Payments/CreatePayment/GenericBlocker.js +18 -0
- package/dist/components/Contractor/Payments/CreatePayment/GenericBlocker.js.map +1 -0
- package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.d.ts +3 -1
- package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js +86 -56
- package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.d.ts +2 -0
- package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.js +35 -22
- package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlowComponents.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentFlow/paymentStateMachine.d.ts +1 -0
- package/dist/components/Contractor/Payments/PaymentFlow/paymentStateMachine.js +82 -65
- package/dist/components/Contractor/Payments/PaymentFlow/paymentStateMachine.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js +9 -11
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js +6 -8
- package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummary.d.ts +8 -0
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummary.js +45 -0
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummary.js.map +1 -0
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.d.ts +15 -0
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js +125 -0
- package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js.map +1 -0
- package/dist/components/Contractor/Payments/PaymentSummary/index.d.ts +3 -0
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsList.js +37 -28
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsList.js.map +1 -1
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.d.ts +5 -1
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js +52 -49
- package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js.map +1 -1
- package/dist/components/Contractor/Profile/useContractorProfile.js +2 -3
- package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
- package/dist/components/Contractor/Submit/Submit.js +20 -21
- package/dist/components/Contractor/Submit/Submit.js.map +1 -1
- package/dist/components/Employee/Compensation/Actions.js +12 -13
- package/dist/components/Employee/Compensation/Actions.js.map +1 -1
- package/dist/components/Employee/Compensation/Edit.js +2 -3
- package/dist/components/Employee/Compensation/Edit.js.map +1 -1
- package/dist/components/Employee/Compensation/List.js +22 -23
- package/dist/components/Employee/Compensation/List.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js +2 -2
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js +2 -2
- package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js +2 -2
- package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js +3 -4
- package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js.map +1 -1
- package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js +2 -3
- package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js +2 -3
- package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js +2 -3
- package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/List.js +2 -4
- package/dist/components/Employee/DocumentSigner/DocumentList/List.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +1 -1
- package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js +2 -3
- package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js +1 -1
- package/dist/components/Employee/EmployeeList/Actions.js +6 -7
- package/dist/components/Employee/EmployeeList/Actions.js.map +1 -1
- package/dist/components/Employee/EmployeeList/EmployeeList.js +3 -4
- package/dist/components/Employee/EmployeeList/EmployeeList.js.map +1 -1
- package/dist/components/Employee/EmployeeList/Head.js +5 -7
- package/dist/components/Employee/EmployeeList/Head.js.map +1 -1
- package/dist/components/Employee/EmployeeList/List.js +2 -3
- package/dist/components/Employee/EmployeeList/List.js.map +1 -1
- package/dist/components/Employee/EmployeeList/useEmployeeList.js +1 -1
- package/dist/components/Employee/EmploymentEligibility/EmploymentEligibility.d.ts +3 -0
- package/dist/components/Employee/EmploymentEligibility/EmploymentEligibilityPresentation.d.ts +37 -0
- package/dist/components/Employee/EmploymentEligibility/index.d.ts +4 -0
- package/dist/components/Employee/FederalTaxes/Actions.js +5 -6
- package/dist/components/Employee/FederalTaxes/Actions.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/FederalForm.js +4 -5
- package/dist/components/Employee/FederalTaxes/FederalForm.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/useFederalTaxes.js +1 -1
- package/dist/components/Employee/Landing/Landing.js +10 -11
- package/dist/components/Employee/Landing/Landing.js.map +1 -1
- package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +7 -7
- package/dist/components/Employee/PaymentMethod/Actions.js +5 -6
- package/dist/components/Employee/PaymentMethod/Actions.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/BankAccountEdit.js +2 -3
- package/dist/components/Employee/PaymentMethod/BankAccountEdit.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/BankAccountsList.js +2 -3
- package/dist/components/Employee/PaymentMethod/BankAccountsList.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js +5 -6
- package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/Split.js +2 -3
- package/dist/components/Employee/PaymentMethod/Split.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +1 -1
- package/dist/components/Employee/Profile/Actions.js +5 -6
- package/dist/components/Employee/Profile/Actions.js.map +1 -1
- package/dist/components/Employee/Profile/AdminPersonalDetails.js +4 -5
- package/dist/components/Employee/Profile/AdminPersonalDetails.js.map +1 -1
- package/dist/components/Employee/Profile/HomeAddress.js +8 -9
- package/dist/components/Employee/Profile/HomeAddress.js.map +1 -1
- package/dist/components/Employee/Profile/PersonalDetailsInputs.js +8 -9
- package/dist/components/Employee/Profile/PersonalDetailsInputs.js.map +1 -1
- package/dist/components/Employee/Profile/useProfile.js +1 -1
- package/dist/components/Employee/StateTaxes/Actions.js +5 -6
- package/dist/components/Employee/StateTaxes/Actions.js.map +1 -1
- package/dist/components/Employee/StateTaxes/useStateTaxes.js +1 -1
- package/dist/components/Employee/Taxes/Actions.js +6 -7
- package/dist/components/Employee/Taxes/Actions.js.map +1 -1
- package/dist/components/Employee/Taxes/FederalForm.js +6 -7
- package/dist/components/Employee/Taxes/FederalForm.js.map +1 -1
- package/dist/components/Employee/Taxes/useTaxes.js +1 -1
- package/dist/components/Flow/Flow.js +7 -9
- package/dist/components/Flow/Flow.js.map +1 -1
- package/dist/components/{Payroll/InformationRequests → InformationRequests}/InformationRequestForm/InformationRequestForm.d.ts +4 -4
- package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js +162 -0
- package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js.map +1 -0
- package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.module.scss.js +20 -0
- package/dist/components/{Payroll/InformationRequests → InformationRequests}/InformationRequestForm/InformationRequestForm.module.scss.js.map +1 -1
- package/dist/components/{Payroll/InformationRequests → InformationRequests}/InformationRequestList/InformationRequestList.d.ts +3 -2
- package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js +96 -0
- package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js.map +1 -0
- package/dist/components/InformationRequests/InformationRequests.d.ts +7 -0
- package/dist/components/InformationRequests/InformationRequests.js +68 -0
- package/dist/components/InformationRequests/InformationRequests.js.map +1 -0
- package/dist/components/{Payroll/InformationRequests → InformationRequests}/InformationRequestsComponents.d.ts +4 -4
- package/dist/components/{Payroll/InformationRequests → InformationRequests}/InformationRequestsComponents.js +2 -2
- package/dist/components/InformationRequests/InformationRequestsComponents.js.map +1 -0
- package/dist/components/InformationRequests/index.d.ts +4 -0
- package/dist/components/InformationRequests/index.js +9 -0
- package/dist/components/InformationRequests/index.js.map +1 -0
- package/dist/components/{Payroll/InformationRequests → InformationRequests}/informationRequestsStateMachine.d.ts +1 -1
- package/dist/components/{Payroll/InformationRequests → InformationRequests}/informationRequestsStateMachine.js +1 -1
- package/dist/components/InformationRequests/informationRequestsStateMachine.js.map +1 -0
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsBanner/ConfirmWireDetailsBanner.js +69 -59
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsBanner/ConfirmWireDetailsBanner.js.map +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js +0 -1
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js.map +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/WireInstructions/WireInstructions.js +61 -52
- package/dist/components/Payroll/ConfirmWireDetails/WireInstructions/WireInstructions.js.map +1 -1
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js +22 -24
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js.map +1 -1
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.d.ts +5 -13
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js +102 -28
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js.map +1 -1
- package/dist/components/Payroll/PayrollBlocker/index.d.ts +0 -1
- package/dist/components/Payroll/PayrollBlocker/payrollHelpers.js +14 -14
- package/dist/components/Payroll/PayrollBlocker/payrollHelpers.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.d.ts +1 -1
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js +132 -131
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.d.ts +1 -1
- package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +2 -3
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js +14 -16
- package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js.map +1 -1
- package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.d.ts +1 -0
- package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.js +45 -38
- package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.js.map +1 -1
- package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js +54 -40
- package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js.map +1 -1
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js +36 -38
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollLanding/PayrollLanding.d.ts +2 -1
- package/dist/components/Payroll/PayrollLanding/PayrollLanding.js +26 -24
- package/dist/components/Payroll/PayrollLanding/PayrollLanding.js.map +1 -1
- package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.d.ts +2 -0
- package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.js +70 -48
- package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.js.map +1 -1
- package/dist/components/Payroll/PayrollLanding/payrollLandingStateMachine.js +72 -36
- package/dist/components/Payroll/PayrollLanding/payrollLandingStateMachine.js.map +1 -1
- package/dist/components/Payroll/PayrollList/PayrollList.js +14 -17
- package/dist/components/Payroll/PayrollList/PayrollList.js.map +1 -1
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.d.ts +1 -2
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +89 -96
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.js +29 -30
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.d.ts +3 -3
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +242 -243
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.d.ts +2 -2
- package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js +2 -4
- package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/GenericBlocker.d.ts +2 -2
- package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/GenericBlocker.js.map +1 -1
- package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js +2 -3
- package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js.map +1 -1
- package/dist/components/Payroll/RecoveryCases/RecoveryCaseErrorCode.module.scss.js +8 -0
- package/dist/components/Payroll/RecoveryCases/RecoveryCaseErrorCode.module.scss.js.map +1 -0
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js +83 -52
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js.map +1 -1
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.module.scss.js +2 -4
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.module.scss.js.map +1 -1
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js +59 -36
- package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js.map +1 -1
- package/dist/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.d.ts +7 -0
- package/dist/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.js +65 -0
- package/dist/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.js.map +1 -0
- package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfigurationContext.d.ts +1 -1
- package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfigurationContext.js.map +1 -1
- package/dist/components/Payroll/helpers.js.map +1 -1
- package/dist/components/Payroll/index.d.ts +1 -2
- package/dist/components/Payroll/index.js +8 -10
- package/dist/components/Payroll/index.js.map +1 -1
- package/dist/components/Payroll/usePreparedPayrollData.d.ts +1 -1
- package/dist/components/Payroll/usePreparedPayrollData.js +1 -1
- package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +1 -1
- package/dist/contexts/ThemeProvider/theme.js +5 -5
- package/dist/contexts/ThemeProvider/theme.js.map +1 -1
- package/dist/helpers/formattedStrings.js +12 -11
- package/dist/helpers/formattedStrings.js.map +1 -1
- package/dist/i18n/I18n.js +8 -8
- package/dist/i18n/I18n.js.map +1 -1
- package/dist/i18n/en/Contractor.Payments.CreatePayment.json.js +30 -26
- package/dist/i18n/en/Contractor.Payments.CreatePayment.json.js.map +1 -1
- package/dist/i18n/en/Contractor.Payments.PaymentSummary.json.js +58 -0
- package/dist/i18n/en/Contractor.Payments.PaymentSummary.json.js.map +1 -0
- package/dist/i18n/en/Employee.EmploymentEligibility.json.js +28 -0
- package/dist/i18n/en/Employee.EmploymentEligibility.json.js.map +1 -0
- package/dist/i18n/en/InformationRequests.InformationRequestForm.json.js +20 -0
- package/dist/i18n/en/InformationRequests.InformationRequestForm.json.js.map +1 -0
- package/dist/i18n/en/{Payroll.InformationRequestList.json.js → InformationRequests.InformationRequestList.json.js} +6 -6
- package/dist/i18n/en/InformationRequests.InformationRequestList.json.js.map +1 -0
- package/dist/i18n/en/Payroll.ConfirmWireDetailsBanner.json.js +1 -1
- package/dist/i18n/en/Payroll.PayrollBlocker.json.js +24 -20
- package/dist/i18n/en/Payroll.PayrollBlocker.json.js.map +1 -1
- package/dist/i18n/en/Payroll.PayrollLanding.json.js +5 -3
- package/dist/i18n/en/Payroll.PayrollLanding.json.js.map +1 -1
- package/dist/i18n/en/Payroll.RecoveryCasesList.json.js +14 -10
- package/dist/i18n/en/Payroll.RecoveryCasesList.json.js.map +1 -1
- package/dist/i18n/en/Payroll.RecoveryCasesResubmit.json.js +5 -3
- package/dist/i18n/en/Payroll.RecoveryCasesResubmit.json.js.map +1 -1
- package/dist/i18n/en/Payroll.WireInstructions.json.js +20 -16
- package/dist/i18n/en/Payroll.WireInstructions.json.js.map +1 -1
- package/dist/index.js +10 -8
- package/dist/index.js.map +1 -1
- package/dist/shared/constants.d.ts +6 -0
- package/dist/shared/constants.js +12 -9
- package/dist/shared/constants.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/i18next.d.ts +248 -46
- package/package.json +16 -16
- package/dist/components/Payroll/InformationRequests/InformationRequestForm/InformationRequestForm.js +0 -142
- package/dist/components/Payroll/InformationRequests/InformationRequestForm/InformationRequestForm.js.map +0 -1
- package/dist/components/Payroll/InformationRequests/InformationRequestForm/InformationRequestForm.module.scss.js +0 -18
- package/dist/components/Payroll/InformationRequests/InformationRequestList/InformationRequestList.js +0 -88
- package/dist/components/Payroll/InformationRequests/InformationRequestList/InformationRequestList.js.map +0 -1
- package/dist/components/Payroll/InformationRequests/InformationRequests.d.ts +0 -6
- package/dist/components/Payroll/InformationRequests/InformationRequests.js +0 -55
- package/dist/components/Payroll/InformationRequests/InformationRequests.js.map +0 -1
- package/dist/components/Payroll/InformationRequests/InformationRequestsComponents.js.map +0 -1
- package/dist/components/Payroll/InformationRequests/index.d.ts +0 -3
- package/dist/components/Payroll/InformationRequests/informationRequestsStateMachine.js.map +0 -1
- package/dist/components/Payroll/PayrollBlocker/PayrollBlocker.d.ts +0 -6
- package/dist/components/Payroll/PayrollBlocker/PayrollBlocker.js +0 -32
- package/dist/components/Payroll/PayrollBlocker/PayrollBlocker.js.map +0 -1
- package/dist/i18n/en/Payroll.InformationRequestForm.json.js +0 -18
- package/dist/i18n/en/Payroll.InformationRequestForm.json.js.map +0 -1
- package/dist/i18n/en/Payroll.InformationRequestList.json.js.map +0 -1
- /package/dist/components/{Payroll/InformationRequests → InformationRequests}/InformationRequestForm/index.d.ts +0 -0
- /package/dist/components/{Payroll/InformationRequests → InformationRequests}/InformationRequestList/index.d.ts +0 -0
|
@@ -1,140 +1,139 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
2
|
-
import { DropZone as
|
|
3
|
-
import
|
|
4
|
-
import { useTranslation as
|
|
5
|
-
import { useFieldIds as
|
|
6
|
-
import { FileInputDefaults as
|
|
7
|
-
import
|
|
8
|
-
import { applyMissingDefaults as
|
|
9
|
-
import { FieldLayout as
|
|
10
|
-
import { ButtonIcon as
|
|
11
|
-
import W from "../../../../assets/icons/trashcan.svg.js";
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
|
|
15
|
-
|
|
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
|
|
18
|
-
|
|
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
|
-
|
|
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
|
-
"
|
|
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
|
|
38
|
-
if (!
|
|
39
|
-
const
|
|
40
|
-
return
|
|
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
|
|
43
|
-
const { t:
|
|
44
|
-
label:
|
|
45
|
-
description:
|
|
46
|
-
errorMessage:
|
|
47
|
-
isRequired:
|
|
48
|
-
isInvalid:
|
|
49
|
-
isDisabled:
|
|
50
|
-
id:
|
|
51
|
-
value:
|
|
52
|
-
onChange:
|
|
53
|
-
onBlur:
|
|
54
|
-
accept:
|
|
55
|
-
className:
|
|
56
|
-
"aria-describedby":
|
|
57
|
-
} =
|
|
58
|
-
inputId:
|
|
59
|
-
errorMessage:
|
|
60
|
-
description:
|
|
61
|
-
ariaDescribedBy:
|
|
62
|
-
}),
|
|
63
|
-
const
|
|
64
|
-
|
|
65
|
-
},
|
|
66
|
-
const
|
|
67
|
-
if (
|
|
68
|
-
const
|
|
69
|
-
|
|
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
|
-
},
|
|
72
|
-
|
|
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
|
-
|
|
72
|
+
O,
|
|
76
73
|
{
|
|
77
|
-
label:
|
|
78
|
-
errorMessage:
|
|
79
|
-
isRequired:
|
|
80
|
-
htmlFor:
|
|
81
|
-
errorMessageId:
|
|
82
|
-
descriptionId:
|
|
83
|
-
className:
|
|
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:
|
|
90
|
-
"data-disabled":
|
|
91
|
-
"data-invalid":
|
|
92
|
-
children:
|
|
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:
|
|
96
|
-
children: /* @__PURE__ */
|
|
97
|
-
/* @__PURE__ */ e("div", { className:
|
|
98
|
-
/* @__PURE__ */ e("div", { className:
|
|
99
|
-
/* @__PURE__ */ e("span", { className:
|
|
100
|
-
/* @__PURE__ */ e("span", { className:
|
|
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
|
-
|
|
100
|
+
R,
|
|
104
101
|
{
|
|
105
|
-
"aria-label":
|
|
106
|
-
onClick:
|
|
107
|
-
isDisabled:
|
|
108
|
-
children: /* @__PURE__ */ e(W, { "aria-hidden": "true", className:
|
|
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
|
-
|
|
111
|
+
C,
|
|
115
112
|
{
|
|
116
|
-
onDrop:
|
|
117
|
-
getDropOperation:
|
|
118
|
-
className:
|
|
119
|
-
children: /* @__PURE__ */ e(
|
|
120
|
-
|
|
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:
|
|
123
|
-
isDisabled:
|
|
124
|
-
"aria-describedby":
|
|
125
|
-
onBlur:
|
|
126
|
-
className:
|
|
127
|
-
children: /* @__PURE__ */
|
|
128
|
-
/* @__PURE__ */ e("span", { className:
|
|
129
|
-
|
|
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:
|
|
130
|
+
components: { clickToUpload: /* @__PURE__ */ e("span", { className: n.clickToUpload }) }
|
|
134
131
|
}
|
|
135
132
|
) }),
|
|
136
|
-
|
|
137
|
-
|
|
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
|
-
|
|
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,2EAA2E;AAAA,EAC3E,4BAA4B;AAAA,EAC5B,qEAAqE;AAAA,EACrE,cAAc;AAAA,EACd,YAAY;AACd;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,G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AAA,cACR,kBAAAG;AAAA,cACA,WAAWK,EAAO;AAAA,cAElB,UAAA,gBAAAF,EAACU,GAAA,EAAY,UAAUnB,GAAc,mBAAmB3B,GACtD,UAAA,gBAAAoC;AAAA,gBAACW;AAAAA,gBAAA;AAAA,kBACC,IAAIzB;AAAA,kBACJ,YAAAP;AAAA,kBACA,oBAAkBU;AAAA,kBAClB,QAAAN;AAAA,kBACA,WAAWmB,EAAO;AAAA,kBAElB,UAAA,gBAAAE,EAAC,QAAA,EAAK,WAAWF,EAAO,gBACtB,UAAA;AAAA,oBAAA,gBAAAF,EAAC,QAAA,EAAK,WAAWE,EAAO,aACtB,UAAA,gBAAAF;AAAA,sBAACY;AAAA,sBAAA;AAAA,wBACC,SAAQ;AAAA,wBACR,IAAG;AAAA,wBACH,YAAY,EAAE,eAAe,gBAAAZ,EAAC,UAAK,WAAWE,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,gB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,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
|
|
2
|
-
root:
|
|
3
|
-
dropZone:
|
|
4
|
-
trigger:
|
|
5
|
-
triggerContent:
|
|
6
|
-
triggerText:
|
|
7
|
-
clickToUpload:
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
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:
|
|
16
|
+
removeButton: w
|
|
16
17
|
};
|
|
17
18
|
export {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
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
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
t as
|
|
31
|
-
|
|
32
|
-
|
|
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 = "
|
|
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:
|
|
5
|
-
invalidIcon:
|
|
6
|
-
inputContainer:
|
|
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
|
-
|
|
15
|
+
o as hasAdornmentEnd,
|
|
16
16
|
t as hasAdornmentStart,
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
r as inputContainer,
|
|
18
|
+
a as invalidIcon
|
|
19
19
|
};
|
|
20
20
|
//# sourceMappingURL=Input.module.scss.js.map
|
|
@@ -1,76 +1,77 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { useRef as
|
|
3
|
-
import
|
|
4
|
-
import { ModalDefaults as
|
|
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
|
|
7
|
-
import { useContainerBreakpoints as
|
|
8
|
-
import { useOverflowDetection as
|
|
9
|
-
import { useForkRef as
|
|
10
|
-
import { transitionDuration as
|
|
11
|
-
function
|
|
12
|
-
const h =
|
|
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 =
|
|
14
|
+
}), a = A({
|
|
15
15
|
ref: u
|
|
16
|
-
}), [
|
|
17
|
-
|
|
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
|
|
20
|
+
return t.current && clearTimeout(t.current), i && !e.open ? (e.showModal(), requestAnimationFrame(() => {
|
|
21
21
|
e.setAttribute("data-show", "true");
|
|
22
|
-
})) : !
|
|
22
|
+
})) : !i && e.open && (p(!0), t.current = setTimeout(() => {
|
|
23
23
|
e.close(), e.removeAttribute("data-show"), p(!1);
|
|
24
|
-
},
|
|
25
|
-
|
|
24
|
+
}, j)), () => {
|
|
25
|
+
t.current && clearTimeout(t.current);
|
|
26
26
|
};
|
|
27
|
-
}, [
|
|
28
|
-
const
|
|
29
|
-
e.target === e.currentTarget && v &&
|
|
30
|
-
},
|
|
31
|
-
e.key === "Escape" &&
|
|
32
|
-
},
|
|
33
|
-
|
|
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__ */
|
|
35
|
+
return /* @__PURE__ */ s(
|
|
36
36
|
"dialog",
|
|
37
37
|
{
|
|
38
38
|
ref: m,
|
|
39
39
|
className: o.dialog,
|
|
40
|
-
onClose:
|
|
41
|
-
"data-exiting":
|
|
42
|
-
children: /* @__PURE__ */
|
|
40
|
+
onClose: N,
|
|
41
|
+
"data-exiting": x || void 0,
|
|
42
|
+
children: /* @__PURE__ */ s(
|
|
43
43
|
"div",
|
|
44
44
|
{
|
|
45
45
|
ref: b,
|
|
46
|
-
className:
|
|
46
|
+
className: l(o.backdrop, {
|
|
47
47
|
[o.backdropSmall]: k
|
|
48
48
|
}),
|
|
49
|
-
onClick:
|
|
50
|
-
onKeyDown:
|
|
49
|
+
onClick: y,
|
|
50
|
+
onKeyDown: D,
|
|
51
51
|
role: "presentation",
|
|
52
|
-
children: /* @__PURE__ */
|
|
52
|
+
children: /* @__PURE__ */ O(
|
|
53
53
|
"div",
|
|
54
54
|
{
|
|
55
|
-
ref:
|
|
56
|
-
className:
|
|
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__ */
|
|
61
|
+
c && /* @__PURE__ */ s(
|
|
62
62
|
"div",
|
|
63
63
|
{
|
|
64
|
-
|
|
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__ */
|
|
71
|
+
f && /* @__PURE__ */ s(
|
|
71
72
|
"div",
|
|
72
73
|
{
|
|
73
|
-
className:
|
|
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
|
-
|
|
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:
|
|
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,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,GACtCG,IAAaH,EAAuB,IAAI,GAGxCI,IAAsBC,EAAWJ,GAAqBH,CAAY,GAElEQ,IAAcC,EAAwB;AAAA,IAC1C,KAAKN;AAAA,EAAA,CACN,GAEKO,IAAgBC,EAAqB;AAAA,IACzC,KAAKN;AAAA,EAAA,CACN,GAEK,CAACO,GAAWC,CAAY,IAAIC,E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A,YAAC;AAAA,YAAA;AAAA,cACC,KAAKvB;AAAA,cACL,WAAWsB,EAAWD,EAAO,OAAO;AAAA,gBAClC,CAACA,EAAO,UAAoB,GAAGT;AAAA,gBAC/B,CAACS,EAAO,gBAA0B,GAAGf;AAAA,cAAA,CACtC;AAAA,cAEA,UAAA;AAAA,gBAAAZ,KACC,gBAAA0B;AAAA,kBAAC;AAAA,kBAAA;AAAA,oBACC,KAAKnB;AAAA,oBACL,WAAWqB,EAAWD,EAAO,SAAS;AAAA,sBACpC,CAACA,EAAO,iBAA2B,GAAGf;AAAA,oBAAA,CACvC;AAAA,oBAEA,UAAAZ;AAAA,kBAAA;AAAA,gBAAA;AAAA,gBAGJC,KACC,gBAAAyB;AAAA,kBAAC;AAAA,kBAAA;AAAA,oBACC,WAAWE,EAAWD,EAAO,QAAQ;AAAA,sBACnC,CAACA,EAAO,WAAqB,GAAGf;AAAA,oBAAA,CACjC;AAAA,oBAEA,UAAAX;AAAA,kBAAA;AAAA,gBAAA;AAAA,cACH;AAAA,YAAA;AAAA,UAAA;AAAA,QAEJ;AAAA,MAAA;AAAA,IACF;AAAA,EAAA;AAGN;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const o = "
|
|
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:
|
|
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
|
-
|
|
18
|
+
r as default,
|
|
19
19
|
o as dialog,
|
|
20
20
|
d as footer,
|
|
21
|
-
|
|
21
|
+
b as footerFixed,
|
|
22
22
|
_ as modal,
|
|
23
23
|
c as modalOverflowing,
|
|
24
24
|
a as modalSmall
|