@gusto/embedded-react-sdk 0.19.0 → 0.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +48 -0
- package/dist/UNSTABLE_Hooks.d.ts +1 -0
- package/dist/UNSTABLE_Hooks.js +9 -0
- package/dist/UNSTABLE_Hooks.js.map +1 -0
- package/dist/assets/icons/coins-hand.svg.js +10 -0
- package/dist/assets/icons/coins-hand.svg.js.map +1 -0
- package/dist/components/Base/Base.d.ts +19 -4
- package/dist/components/Base/Base.js +68 -61
- package/dist/components/Base/Base.js.map +1 -1
- package/dist/components/Base/useBase.d.ts +1 -1
- package/dist/components/Base/useBase.js.map +1 -1
- package/dist/components/Base/useBaseSubmit.d.ts +10 -0
- package/dist/components/Base/useBaseSubmit.js +33 -0
- package/dist/components/Base/useBaseSubmit.js.map +1 -0
- package/dist/components/Common/Fields/TextAreaField/TextAreaField.d.ts +5 -0
- package/dist/components/Common/Fields/TextAreaField/TextAreaField.js +34 -0
- package/dist/components/Common/Fields/TextAreaField/TextAreaField.js.map +1 -0
- package/dist/components/Common/Fields/TextAreaField/index.d.ts +3 -0
- package/dist/components/Common/FlowBreadcrumbs/FlowBreadcrumbs.js +10 -10
- package/dist/components/Common/FlowBreadcrumbs/FlowBreadcrumbs.js.map +1 -1
- package/dist/components/Common/SignatureForm/SignatureForm.js +15 -10
- package/dist/components/Common/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Common/SignatureForm/SignatureFormActions.js +14 -10
- package/dist/components/Common/SignatureForm/SignatureFormActions.js.map +1 -1
- package/dist/components/Common/SignatureForm/SignatureFormFields.js +19 -14
- package/dist/components/Common/SignatureForm/SignatureFormFields.js.map +1 -1
- package/dist/components/Common/UI/Alert/Alert.js +23 -22
- package/dist/components/Common/UI/Alert/Alert.js.map +1 -1
- package/dist/components/Common/UI/Alert/AlertTypes.d.ts +4 -0
- package/dist/components/Common/UI/Alert/AlertTypes.js.map +1 -1
- package/dist/components/Common/UI/DatePicker/DatePicker.d.ts +1 -1
- package/dist/components/Common/UI/DatePicker/DatePicker.js +38 -37
- package/dist/components/Common/UI/DatePicker/DatePicker.js.map +1 -1
- package/dist/components/Common/UI/DatePicker/DatePickerTypes.d.ts +4 -0
- package/dist/components/Common/UI/Modal/Modal.module.scss.js +17 -17
- package/dist/components/Common/UI/Select/Select.d.ts +1 -1
- package/dist/components/Common/UI/Select/Select.js +27 -26
- package/dist/components/Common/UI/Select/Select.js.map +1 -1
- package/dist/components/Common/UI/Select/SelectTypes.d.ts +4 -0
- package/dist/components/Common/UI/TextArea/TextArea.d.ts +2 -0
- package/dist/components/Common/UI/TextArea/TextArea.js +79 -0
- package/dist/components/Common/UI/TextArea/TextArea.js.map +1 -0
- package/dist/components/Common/UI/TextArea/TextArea.module.scss.js +12 -0
- package/dist/components/Common/UI/TextArea/TextArea.module.scss.js.map +1 -0
- package/dist/components/Common/UI/TextArea/TextAreaTypes.d.ts +37 -0
- package/dist/components/Common/UI/TextArea/TextAreaTypes.js +9 -0
- package/dist/components/Common/UI/TextArea/TextAreaTypes.js.map +1 -0
- package/dist/components/Common/UI/TextArea/index.d.ts +4 -0
- package/dist/components/Company/AssignSignatory/AssignSignatory.js +11 -7
- package/dist/components/Company/AssignSignatory/AssignSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js +10 -6
- package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js +11 -8
- package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js +9 -6
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js +14 -13
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +6 -4
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js +9 -6
- package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js +13 -10
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +14 -13
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +6 -4
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/TitleSelect.js +10 -7
- package/dist/components/Company/AssignSignatory/TitleSelect.js.map +1 -1
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js +8 -6
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/Actions.js +11 -9
- package/dist/components/Company/BankAccount/BankAccountForm/Actions.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/Form.js +13 -9
- package/dist/components/Company/BankAccount/BankAccountForm/Form.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/context.js +6 -4
- package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountList/Actions.js +13 -10
- package/dist/components/Company/BankAccount/BankAccountList/Actions.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js +15 -12
- package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountVerify/Form.js +8 -4
- package/dist/components/Company/BankAccount/BankAccountVerify/Form.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/Actions.js +8 -5
- package/dist/components/Company/DocumentSigner/DocumentList/Actions.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js +15 -11
- package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +6 -4
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +15 -11
- package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js +6 -4
- package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
- package/dist/components/Company/FederalTaxes/Actions.js +11 -8
- package/dist/components/Company/FederalTaxes/Actions.js.map +1 -1
- package/dist/components/Company/FederalTaxes/FederalTaxes.js +19 -15
- package/dist/components/Company/FederalTaxes/FederalTaxes.js.map +1 -1
- package/dist/components/Company/FederalTaxes/Form.js +8 -6
- package/dist/components/Company/FederalTaxes/Form.js.map +1 -1
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js +11 -9
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
- package/dist/components/Company/Industry/Actions.js +11 -8
- package/dist/components/Company/Industry/Actions.js.map +1 -1
- package/dist/components/Company/Industry/Context.js +9 -7
- package/dist/components/Company/Industry/Context.js.map +1 -1
- package/dist/components/Company/Industry/Edit.js +14 -10
- package/dist/components/Company/Industry/Edit.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/Actions.js +11 -8
- package/dist/components/Company/Locations/LocationForm/Actions.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/Form.js +7 -5
- package/dist/components/Company/Locations/LocationForm/Form.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/LocationForm.js +19 -15
- package/dist/components/Company/Locations/LocationForm/LocationForm.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js +6 -4
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/Actions.js +9 -6
- package/dist/components/Company/Locations/LocationsList/Actions.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/List.js +17 -15
- package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/LocationsList.js +15 -12
- package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js +6 -4
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/Completed.js +15 -12
- package/dist/components/Company/OnboardingOverview/Completed.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/MissingRequirements.js +12 -9
- package/dist/components/Company/OnboardingOverview/MissingRequirements.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/OnboardingOverview.js +10 -6
- package/dist/components/Company/OnboardingOverview/OnboardingOverview.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/context.js +6 -4
- package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
- package/dist/components/Company/PaySchedule/PaySchedule.js +36 -33
- package/dist/components/Company/PaySchedule/PaySchedule.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/Actions.js +13 -10
- package/dist/components/Company/PaySchedule/_parts/Actions.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/Edit.js +15 -15
- package/dist/components/Company/PaySchedule/_parts/Head.js +14 -11
- package/dist/components/Company/PaySchedule/_parts/Head.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/List.js +21 -19
- package/dist/components/Company/PaySchedule/_parts/List.js.map +1 -1
- package/dist/components/Company/PaySchedule/usePaySchedule.js +8 -6
- package/dist/components/Company/PaySchedule/usePaySchedule.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js +8 -5
- package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +6 -4
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js +9 -6
- package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/List.js +8 -5
- package/dist/components/Company/StateTaxes/StateTaxesList/List.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js +6 -4
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
- package/dist/components/Contractor/Address/Address.js +8 -4
- package/dist/components/Contractor/Address/Address.js.map +1 -1
- package/dist/components/Contractor/Address/Form.js +8 -6
- package/dist/components/Contractor/Address/Form.js.map +1 -1
- package/dist/components/Contractor/Address/useAddress.js +8 -6
- package/dist/components/Contractor/Address/useAddress.js.map +1 -1
- package/dist/components/Contractor/ContractorList/index.js +29 -28
- package/dist/components/Contractor/ContractorList/index.js.map +1 -1
- package/dist/components/Contractor/NewHireReport/NewHireReport.js +14 -13
- package/dist/components/Contractor/NewHireReport/NewHireReport.js.map +1 -1
- package/dist/components/Contractor/PaymentMethod/BankAccountForm.js +14 -10
- package/dist/components/Contractor/PaymentMethod/BankAccountForm.js.map +1 -1
- package/dist/components/Contractor/PaymentMethod/PaymentMethod.js +3 -2
- package/dist/components/Contractor/PaymentMethod/PaymentMethod.js.map +1 -1
- package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js +5 -2
- package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js.map +1 -1
- package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.d.ts +15 -0
- package/dist/components/Contractor/Payments/Detail/DetailPresentation.d.ts +19 -0
- package/dist/components/Contractor/Payments/Overview/OverviewPresentation.d.ts +18 -0
- package/dist/components/Contractor/Payments/PaymentEdit/PaymentEditPresentation.d.ts +6 -0
- package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.d.ts +18 -0
- package/dist/components/Contractor/Payments/types.d.ts +4 -0
- package/dist/components/Contractor/Profile/ContractorProfileForm.js +13 -13
- package/dist/components/Contractor/Profile/useContractorProfile.js +4 -3
- package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
- package/dist/components/Contractor/Submit/Submit.js +22 -20
- package/dist/components/Contractor/Submit/Submit.js.map +1 -1
- package/dist/components/Employee/Compensation/Actions.js +14 -12
- package/dist/components/Employee/Compensation/Actions.js.map +1 -1
- package/dist/components/Employee/Compensation/Edit.js +17 -16
- package/dist/components/Employee/Compensation/Edit.js.map +1 -1
- package/dist/components/Employee/Compensation/List.js +25 -23
- package/dist/components/Employee/Compensation/List.js.map +1 -1
- package/dist/components/Employee/Deductions/Deductions.d.ts +1 -1
- package/dist/components/Employee/Deductions/Deductions.js +10 -10
- package/dist/components/Employee/Deductions/Deductions.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsComponents.d.ts +2 -0
- package/dist/components/Employee/Deductions/DeductionsComponents.js +6 -6
- package/dist/components/Employee/Deductions/DeductionsComponents.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js +222 -0
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js.map +1 -0
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.module.scss.js +8 -0
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.module.scss.js.map +1 -0
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.d.ts +2 -2
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js +165 -0
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js.map +1 -0
- package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.d.ts +0 -34
- package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js +90 -126
- package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.module.scss.js +14 -0
- package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.module.scss.js.map +1 -0
- package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js +56 -55
- package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js.map +1 -1
- package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.d.ts +6 -0
- package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js +53 -0
- package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js.map +1 -0
- package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.module.scss.js +14 -0
- package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.module.scss.js.map +1 -0
- package/dist/components/Employee/Deductions/stateMachine.js +49 -29
- package/dist/components/Employee/Deductions/stateMachine.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js +9 -6
- package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js +13 -9
- package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/List.js +6 -2
- package/dist/components/Employee/DocumentSigner/DocumentList/List.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +6 -4
- package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js +15 -11
- package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js +6 -4
- package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
- package/dist/components/Employee/EmployeeList/Actions.js +9 -6
- package/dist/components/Employee/EmployeeList/Actions.js.map +1 -1
- package/dist/components/Employee/EmployeeList/EmployeeList.js +6 -3
- package/dist/components/Employee/EmployeeList/EmployeeList.js.map +1 -1
- package/dist/components/Employee/EmployeeList/Head.js +8 -5
- package/dist/components/Employee/EmployeeList/Head.js.map +1 -1
- package/dist/components/Employee/EmployeeList/List.js +17 -16
- package/dist/components/Employee/EmployeeList/List.js.map +1 -1
- package/dist/components/Employee/EmployeeList/useEmployeeList.js +6 -4
- package/dist/components/Employee/EmployeeList/useEmployeeList.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/Actions.js +10 -7
- package/dist/components/Employee/FederalTaxes/Actions.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/FederalForm.js +14 -11
- package/dist/components/Employee/FederalTaxes/FederalForm.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/useFederalTaxes.js +6 -4
- package/dist/components/Employee/FederalTaxes/useFederalTaxes.js.map +1 -1
- package/dist/components/Employee/Landing/Landing.js +15 -13
- 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 +11 -8
- package/dist/components/Employee/PaymentMethod/Actions.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/BankAccountEdit.js +8 -5
- package/dist/components/Employee/PaymentMethod/BankAccountEdit.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/BankAccountsList.js +13 -11
- package/dist/components/Employee/PaymentMethod/BankAccountsList.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js +10 -7
- package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/Split.js +10 -9
- package/dist/components/Employee/PaymentMethod/Split.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +8 -6
- package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +1 -1
- package/dist/components/Employee/Profile/Actions.js +11 -8
- package/dist/components/Employee/Profile/Actions.js.map +1 -1
- package/dist/components/Employee/Profile/AdminPersonalDetails.js +11 -8
- package/dist/components/Employee/Profile/AdminPersonalDetails.js.map +1 -1
- package/dist/components/Employee/Profile/HomeAddress.js +8 -7
- package/dist/components/Employee/Profile/HomeAddress.js.map +1 -1
- package/dist/components/Employee/Profile/PersonalDetailsInputs.js +31 -28
- package/dist/components/Employee/Profile/PersonalDetailsInputs.js.map +1 -1
- package/dist/components/Employee/Profile/useProfile.js +6 -4
- package/dist/components/Employee/Profile/useProfile.js.map +1 -1
- package/dist/components/Employee/StateTaxes/Actions.js +11 -8
- package/dist/components/Employee/StateTaxes/Actions.js.map +1 -1
- package/dist/components/Employee/StateTaxes/useStateTaxes.js +6 -4
- package/dist/components/Employee/StateTaxes/useStateTaxes.js.map +1 -1
- package/dist/components/Employee/Taxes/Actions.js +11 -8
- package/dist/components/Employee/Taxes/Actions.js.map +1 -1
- package/dist/components/Employee/Taxes/FederalForm.js +15 -12
- package/dist/components/Employee/Taxes/FederalForm.js.map +1 -1
- package/dist/components/Employee/Taxes/useTaxes.js +6 -4
- package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
- package/dist/components/Flow/Flow.js +30 -27
- package/dist/components/Flow/Flow.js.map +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetails.d.ts +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetails.js +58 -36
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetails.js.map +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsBanner/ConfirmWireDetailsBanner.d.ts +2 -0
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsBanner/ConfirmWireDetailsBanner.js +71 -54
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsBanner/ConfirmWireDetailsBanner.js.map +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsComponents.d.ts +23 -0
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsComponents.js +27 -15
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsComponents.js.map +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.d.ts +25 -2
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js +153 -23
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js.map +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.module.scss.js +10 -0
- package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.module.scss.js.map +1 -0
- package/dist/components/Payroll/ConfirmWireDetails/WireInstructions/WireInstructions.d.ts +9 -1
- package/dist/components/Payroll/ConfirmWireDetails/WireInstructions/WireInstructions.js +195 -22
- package/dist/components/Payroll/ConfirmWireDetails/WireInstructions/WireInstructions.js.map +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/WireInstructions/WireInstructions.module.scss.js +18 -0
- package/dist/components/Payroll/ConfirmWireDetails/WireInstructions/WireInstructions.module.scss.js.map +1 -0
- package/dist/components/Payroll/ConfirmWireDetails/confirmWireDetailsStateMachine.d.ts +10 -2
- package/dist/components/Payroll/ConfirmWireDetails/confirmWireDetailsStateMachine.js +39 -25
- package/dist/components/Payroll/ConfirmWireDetails/confirmWireDetailsStateMachine.js.map +1 -1
- package/dist/components/Payroll/ConfirmWireDetails/index.d.ts +1 -0
- package/dist/components/Payroll/ConfirmWireDetails/types.d.ts +5 -0
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js +16 -13
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js.map +1 -1
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js +8 -6
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js +15 -15
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +27 -27
- package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js +13 -11
- package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js.map +1 -1
- package/dist/components/Payroll/PayrollHistory/PayrollHistory.d.ts +0 -12
- package/dist/components/Payroll/PayrollHistory/PayrollHistory.js +44 -52
- package/dist/components/Payroll/PayrollHistory/PayrollHistory.js.map +1 -1
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.d.ts +9 -6
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js +97 -93
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollList/PayrollList.js +58 -59
- package/dist/components/Payroll/PayrollList/PayrollList.js.map +1 -1
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.d.ts +4 -6
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +82 -72
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.js +3 -2
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +11 -10
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchThresholdExceeded.js +8 -5
- package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchThresholdExceeded.js.map +1 -1
- package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js +3 -2
- package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollStatusBadges/PayrollStatusBadges.d.ts +7 -0
- package/dist/components/Payroll/PayrollStatusBadges/PayrollStatusBadges.js +19 -0
- package/dist/components/Payroll/PayrollStatusBadges/PayrollStatusBadges.js.map +1 -0
- package/dist/components/Payroll/PayrollStatusBadges/PayrollStatusBadges.module.scss.js +10 -0
- package/dist/components/Payroll/PayrollStatusBadges/PayrollStatusBadges.module.scss.js.map +1 -0
- package/dist/components/Payroll/PayrollStatusBadges/index.d.ts +4 -0
- package/dist/components/Payroll/PayrollStatusBadges/payrollStatusConfig.d.ts +33 -0
- package/dist/components/Payroll/PayrollStatusBadges/payrollStatusConfig.js +161 -0
- package/dist/components/Payroll/PayrollStatusBadges/payrollStatusConfig.js.map +1 -0
- package/dist/components/Payroll/PayrollStatusBadges/usePayrollStatusBadges.d.ts +3 -0
- package/dist/components/Payroll/PayrollStatusBadges/usePayrollStatusBadges.js +17 -0
- package/dist/components/Payroll/PayrollStatusBadges/usePayrollStatusBadges.js.map +1 -0
- package/dist/components/Payroll/PayrollStatusBadges/usePayrollStatusBadges.test.d.ts +1 -0
- package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfiguration.d.ts +6 -0
- package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfiguration.js +70 -0
- package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfiguration.js.map +1 -0
- package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfigurationContext.d.ts +7 -0
- package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfigurationContext.js +6 -0
- package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfigurationContext.js.map +1 -0
- package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfigurationProvider.d.ts +9 -0
- package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfigurationProvider.js +40 -0
- package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/PayrollConfigurationProvider.js.map +1 -0
- package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/index.d.ts +5 -0
- package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/usePayrollConfiguration.d.ts +2 -0
- package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/usePayrollConfiguration.js +12 -0
- package/dist/components/Payroll/UNSTABLE_PayrollHooks/PayrollConfiguration/usePayrollConfiguration.js.map +1 -0
- package/dist/components/Payroll/UNSTABLE_PayrollHooks/index.d.ts +2 -0
- package/dist/components/Payroll/helpers.d.ts +0 -5
- package/dist/components/Payroll/helpers.js +106 -112
- package/dist/components/Payroll/helpers.js.map +1 -1
- package/dist/components/Payroll/usePreparedPayrollData.js +10 -8
- package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
- package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js +48 -46
- package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js.map +1 -1
- package/dist/contexts/ComponentAdapter/useComponentContext.d.ts +2 -0
- package/dist/contexts/ComponentAdapter/useComponentContext.js +3 -3
- package/dist/contexts/ComponentAdapter/useComponentContext.js.map +1 -1
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +9 -5
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
- package/dist/helpers/dateFormatting.d.ts +9 -0
- package/dist/helpers/dateFormatting.js +65 -52
- package/dist/helpers/dateFormatting.js.map +1 -1
- package/dist/helpers/formattedStrings.js +12 -11
- package/dist/helpers/formattedStrings.js.map +1 -1
- package/dist/helpers/validations.js +1 -1
- package/dist/helpers/validations.js.map +1 -1
- package/dist/i18n/I18n.js +10 -10
- package/dist/i18n/I18n.js.map +1 -1
- package/dist/i18n/en/ContractorPayment.ContractorPaymentCreatePayment.json.js +32 -0
- package/dist/i18n/en/ContractorPayment.ContractorPaymentCreatePayment.json.js.map +1 -0
- package/dist/i18n/en/ContractorPayment.ContractorPaymentDetail.json.js +24 -0
- package/dist/i18n/en/ContractorPayment.ContractorPaymentDetail.json.js.map +1 -0
- package/dist/i18n/en/ContractorPayment.ContractorPaymentOverview.json.js +32 -0
- package/dist/i18n/en/ContractorPayment.ContractorPaymentOverview.json.js.map +1 -0
- package/dist/i18n/en/ContractorPayment.ContractorPaymentPaymentHistory.json.js +32 -0
- package/dist/i18n/en/ContractorPayment.ContractorPaymentPaymentHistory.json.js.map +1 -0
- package/dist/i18n/en/Payroll.Common.json.js +8 -0
- package/dist/i18n/en/Payroll.Common.json.js.map +1 -0
- package/dist/i18n/en/Payroll.ConfirmWireDetailsForm.json.js +25 -5
- package/dist/i18n/en/Payroll.ConfirmWireDetailsForm.json.js.map +1 -1
- package/dist/i18n/en/Payroll.PayrollList.json.js +14 -16
- package/dist/i18n/en/Payroll.PayrollList.json.js.map +1 -1
- package/dist/i18n/en/Payroll.WireInstructions.json.js +22 -6
- package/dist/i18n/en/Payroll.WireInstructions.json.js.map +1 -1
- package/dist/shared/constants.d.ts +6 -0
- package/dist/shared/constants.js +15 -12
- package/dist/shared/constants.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/i18next.d.ts +183 -8
- package/package.json +13 -9
- package/dist/components/Employee/Deductions/DeductionsForm/UNSTABLE_DeductionsForm.d.ts +0 -7
- package/dist/components/Employee/Deductions/EmptyState/EmptyState.d.ts +0 -6
- package/dist/components/Employee/Deductions/IncludeDeductionsForm/IncludeDeductionsForm.d.ts +0 -15
- package/dist/components/Employee/Deductions/IncludeDeductionsForm/IncludeDeductionsForm.js +0 -48
- package/dist/components/Employee/Deductions/IncludeDeductionsForm/IncludeDeductionsForm.js.map +0 -1
|
@@ -1,19 +1,23 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
1
|
+
import { jsxs as m, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import "../../../shared/constants.js";
|
|
3
|
+
import "classnames";
|
|
4
|
+
import { ActionsLayout as p } from "../ActionsLayout/ActionsLayout.js";
|
|
5
|
+
import "react-i18next";
|
|
6
|
+
import { useComponentContext as s } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
7
|
+
import "react";
|
|
8
|
+
function y({
|
|
5
9
|
onBack: t,
|
|
6
10
|
backLabel: r,
|
|
7
|
-
submitLabel:
|
|
8
|
-
isLoading:
|
|
11
|
+
submitLabel: i,
|
|
12
|
+
isLoading: e = !1
|
|
9
13
|
}) {
|
|
10
|
-
const o =
|
|
11
|
-
return /* @__PURE__ */
|
|
14
|
+
const o = s();
|
|
15
|
+
return /* @__PURE__ */ m(p, { children: [
|
|
12
16
|
t && /* @__PURE__ */ n(o.Button, { variant: "secondary", type: "button", onClick: t, children: r }),
|
|
13
|
-
/* @__PURE__ */ n(o.Button, { type: "submit", isLoading:
|
|
17
|
+
/* @__PURE__ */ n(o.Button, { type: "submit", isLoading: e, children: i })
|
|
14
18
|
] });
|
|
15
19
|
}
|
|
16
20
|
export {
|
|
17
|
-
|
|
21
|
+
y as SignatureFormActions
|
|
18
22
|
};
|
|
19
23
|
//# sourceMappingURL=SignatureFormActions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SignatureFormActions.js","sources":["../../../../src/components/Common/SignatureForm/SignatureFormActions.tsx"],"sourcesContent":["import { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\ninterface SignatureFormActionsProps {\n onBack?: () => void\n backLabel: string\n submitLabel: string\n isLoading?: boolean\n}\n\nexport function SignatureFormActions({\n onBack,\n backLabel,\n submitLabel,\n isLoading = false,\n}: SignatureFormActionsProps) {\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n {onBack && (\n <Components.Button variant=\"secondary\" type=\"button\" onClick={onBack}>\n {backLabel}\n </Components.Button>\n )}\n <Components.Button type=\"submit\" isLoading={isLoading}>\n {submitLabel}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["SignatureFormActions","onBack","backLabel","submitLabel","isLoading","Components","useComponentContext","ActionsLayout","jsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"SignatureFormActions.js","sources":["../../../../src/components/Common/SignatureForm/SignatureFormActions.tsx"],"sourcesContent":["import { ActionsLayout } from '@/components/Common'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\ninterface SignatureFormActionsProps {\n onBack?: () => void\n backLabel: string\n submitLabel: string\n isLoading?: boolean\n}\n\nexport function SignatureFormActions({\n onBack,\n backLabel,\n submitLabel,\n isLoading = false,\n}: SignatureFormActionsProps) {\n const Components = useComponentContext()\n\n return (\n <ActionsLayout>\n {onBack && (\n <Components.Button variant=\"secondary\" type=\"button\" onClick={onBack}>\n {backLabel}\n </Components.Button>\n )}\n <Components.Button type=\"submit\" isLoading={isLoading}>\n {submitLabel}\n </Components.Button>\n </ActionsLayout>\n )\n}\n"],"names":["SignatureFormActions","onBack","backLabel","submitLabel","isLoading","Components","useComponentContext","ActionsLayout","jsx"],"mappings":";;;;;;;AAUO,SAASA,EAAqB;AAAA,EACnC,QAAAC;AAAA,EACA,WAAAC;AAAA,EACA,aAAAC;AAAA,EACA,WAAAC,IAAY;AACd,GAA8B;AAC5B,QAAMC,IAAaC,EAAA;AAEnB,2BACGC,GAAA,EACE,UAAA;AAAA,IAAAN,KACC,gBAAAO,EAACH,EAAW,QAAX,EAAkB,SAAQ,aAAY,MAAK,UAAS,SAASJ,GAC3D,UAAAC,EAAA,CACH;AAAA,sBAEDG,EAAW,QAAX,EAAkB,MAAK,UAAS,WAAAD,GAC9B,UAAAD,EAAA,CACH;AAAA,EAAA,GACF;AAEJ;"}
|
|
@@ -1,36 +1,41 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { jsxs as n, Fragment as s, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import "../../../shared/constants.js";
|
|
3
|
+
import "classnames";
|
|
4
|
+
import { TextInputField as p } from "../Fields/TextInputField/TextInputField.js";
|
|
5
|
+
import "react-i18next";
|
|
6
|
+
import "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
7
|
+
import "react";
|
|
8
|
+
import { CheckboxField as a } from "../Fields/CheckboxField/CheckboxField.js";
|
|
9
|
+
function b({
|
|
10
|
+
signatureLabel: e,
|
|
6
11
|
signatureDescription: i = "",
|
|
7
12
|
signatureError: t = "",
|
|
8
13
|
confirmationLabel: o,
|
|
9
|
-
confirmationError:
|
|
14
|
+
confirmationError: m = ""
|
|
10
15
|
}) {
|
|
11
|
-
return /* @__PURE__ */ s
|
|
12
|
-
/* @__PURE__ */
|
|
13
|
-
|
|
16
|
+
return /* @__PURE__ */ n(s, { children: [
|
|
17
|
+
/* @__PURE__ */ r(
|
|
18
|
+
p,
|
|
14
19
|
{
|
|
15
20
|
name: "signature",
|
|
16
|
-
label:
|
|
21
|
+
label: e,
|
|
17
22
|
description: i,
|
|
18
23
|
errorMessage: t,
|
|
19
24
|
isRequired: !0
|
|
20
25
|
}
|
|
21
26
|
),
|
|
22
|
-
/* @__PURE__ */
|
|
23
|
-
|
|
27
|
+
/* @__PURE__ */ r(
|
|
28
|
+
a,
|
|
24
29
|
{
|
|
25
30
|
name: "confirmSignature",
|
|
26
31
|
isRequired: !0,
|
|
27
32
|
label: o,
|
|
28
|
-
errorMessage:
|
|
33
|
+
errorMessage: m
|
|
29
34
|
}
|
|
30
35
|
)
|
|
31
36
|
] });
|
|
32
37
|
}
|
|
33
38
|
export {
|
|
34
|
-
|
|
39
|
+
b as SignatureFormFields
|
|
35
40
|
};
|
|
36
41
|
//# sourceMappingURL=SignatureFormFields.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SignatureFormFields.js","sources":["../../../../src/components/Common/SignatureForm/SignatureFormFields.tsx"],"sourcesContent":["import { TextInputField, CheckboxField } from '@/components/Common'\n\ninterface SignatureFormFieldsProps {\n signatureLabel: string\n signatureDescription?: string\n signatureError?: string\n confirmationLabel: string\n confirmationError?: string\n}\n\nexport function SignatureFormFields({\n signatureLabel,\n signatureDescription = '',\n signatureError = '',\n confirmationLabel,\n confirmationError = '',\n}: SignatureFormFieldsProps) {\n return (\n <>\n <TextInputField\n name=\"signature\"\n label={signatureLabel}\n description={signatureDescription}\n errorMessage={signatureError}\n isRequired\n />\n <CheckboxField\n name=\"confirmSignature\"\n isRequired\n label={confirmationLabel}\n errorMessage={confirmationError}\n />\n </>\n )\n}\n"],"names":["SignatureFormFields","signatureLabel","signatureDescription","signatureError","confirmationLabel","confirmationError","jsxs","Fragment","jsx","TextInputField","CheckboxField"],"mappings":"
|
|
1
|
+
{"version":3,"file":"SignatureFormFields.js","sources":["../../../../src/components/Common/SignatureForm/SignatureFormFields.tsx"],"sourcesContent":["import { TextInputField, CheckboxField } from '@/components/Common'\n\ninterface SignatureFormFieldsProps {\n signatureLabel: string\n signatureDescription?: string\n signatureError?: string\n confirmationLabel: string\n confirmationError?: string\n}\n\nexport function SignatureFormFields({\n signatureLabel,\n signatureDescription = '',\n signatureError = '',\n confirmationLabel,\n confirmationError = '',\n}: SignatureFormFieldsProps) {\n return (\n <>\n <TextInputField\n name=\"signature\"\n label={signatureLabel}\n description={signatureDescription}\n errorMessage={signatureError}\n isRequired\n />\n <CheckboxField\n name=\"confirmSignature\"\n isRequired\n label={confirmationLabel}\n errorMessage={confirmationError}\n />\n </>\n )\n}\n"],"names":["SignatureFormFields","signatureLabel","signatureDescription","signatureError","confirmationLabel","confirmationError","jsxs","Fragment","jsx","TextInputField","CheckboxField"],"mappings":";;;;;;;;AAUO,SAASA,EAAoB;AAAA,EAClC,gBAAAC;AAAA,EACA,sBAAAC,IAAuB;AAAA,EACvB,gBAAAC,IAAiB;AAAA,EACjB,mBAAAC;AAAA,EACA,mBAAAC,IAAoB;AACtB,GAA6B;AAC3B,SACE,gBAAAC,EAAAC,GAAA,EACE,UAAA;AAAA,IAAA,gBAAAC;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,OAAOR;AAAA,QACP,aAAaC;AAAA,QACb,cAAcC;AAAA,QACd,YAAU;AAAA,MAAA;AAAA,IAAA;AAAA,IAEZ,gBAAAK;AAAA,MAACE;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,YAAU;AAAA,QACV,OAAON;AAAA,QACP,cAAcC;AAAA,MAAA;AAAA,IAAA;AAAA,EAChB,GACF;AAEJ;"}
|
|
@@ -1,39 +1,40 @@
|
|
|
1
|
-
import { jsx as r, jsxs as
|
|
2
|
-
import { useId as
|
|
3
|
-
import
|
|
4
|
-
import { ButtonIcon as
|
|
5
|
-
import { AlertDefaults as
|
|
1
|
+
import { jsx as r, jsxs as n } from "react/jsx-runtime";
|
|
2
|
+
import { useId as p, useRef as v, useEffect as g } from "react";
|
|
3
|
+
import N from "classnames";
|
|
4
|
+
import { ButtonIcon as b } from "../Button/ButtonIcon.js";
|
|
5
|
+
import { AlertDefaults as I } from "./AlertTypes.js";
|
|
6
6
|
import e from "./Alert.module.scss.js";
|
|
7
7
|
import { applyMissingDefaults as S } from "../../../../helpers/applyMissingDefaults.js";
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
function
|
|
14
|
-
const
|
|
15
|
-
return
|
|
16
|
-
s.current && s.current.scrollIntoView({ behavior: "smooth" });
|
|
17
|
-
}, []), /* @__PURE__ */ r("div", { className:
|
|
8
|
+
import w from "../../../../assets/icons/info.svg.js";
|
|
9
|
+
import x from "../../../../assets/icons/success_check.svg.js";
|
|
10
|
+
import y from "../../../../assets/icons/warning.svg.js";
|
|
11
|
+
import C from "../../../../assets/icons/error.svg.js";
|
|
12
|
+
import D from "../../../../assets/icons/close.svg.js";
|
|
13
|
+
function z(l) {
|
|
14
|
+
const c = S(l, I), { label: m, children: d, status: i, icon: f, className: h, onDismiss: o, disableScrollIntoView: a } = c, t = p(), s = v(null), u = i === "info" ? /* @__PURE__ */ r(w, { "aria-hidden": !0 }) : i === "success" ? /* @__PURE__ */ r(x, { "aria-hidden": !0 }) : i === "warning" ? /* @__PURE__ */ r(y, { "aria-hidden": !0 }) : /* @__PURE__ */ r(C, { "aria-hidden": !0 });
|
|
15
|
+
return g(() => {
|
|
16
|
+
!a && s.current && (s.current.scrollIntoView({ behavior: "smooth" }), s.current.focus());
|
|
17
|
+
}, [a]), /* @__PURE__ */ r("div", { className: N(e.root, h), children: /* @__PURE__ */ n(
|
|
18
18
|
"div",
|
|
19
19
|
{
|
|
20
20
|
className: e.alert,
|
|
21
21
|
role: "alert",
|
|
22
|
-
"aria-labelledby":
|
|
22
|
+
"aria-labelledby": t,
|
|
23
23
|
"data-variant": i,
|
|
24
24
|
ref: s,
|
|
25
|
+
tabIndex: -1,
|
|
25
26
|
children: [
|
|
26
|
-
/* @__PURE__ */ r("div", { className: e.header, children: /* @__PURE__ */
|
|
27
|
-
/* @__PURE__ */ r("div", { className: e.icon, children:
|
|
28
|
-
/* @__PURE__ */ r("h6", { id:
|
|
29
|
-
|
|
27
|
+
/* @__PURE__ */ r("div", { className: e.header, children: /* @__PURE__ */ n("div", { className: e.iconLabelContainer, children: [
|
|
28
|
+
/* @__PURE__ */ r("div", { className: e.icon, children: f || u }),
|
|
29
|
+
/* @__PURE__ */ r("h6", { id: t, children: m }),
|
|
30
|
+
o && /* @__PURE__ */ r("div", { className: e.dismiss, children: /* @__PURE__ */ r(b, { variant: "tertiary", onClick: o, "aria-label": "Dismiss alert", children: /* @__PURE__ */ r(D, { width: 36, height: 36 }) }) })
|
|
30
31
|
] }) }),
|
|
31
|
-
/* @__PURE__ */ r("div", { className: e.content, children:
|
|
32
|
+
/* @__PURE__ */ r("div", { className: e.content, children: d })
|
|
32
33
|
]
|
|
33
34
|
}
|
|
34
35
|
) });
|
|
35
36
|
}
|
|
36
37
|
export {
|
|
37
|
-
|
|
38
|
+
z as Alert
|
|
38
39
|
};
|
|
39
40
|
//# sourceMappingURL=Alert.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Alert.js","sources":["../../../../../src/components/Common/UI/Alert/Alert.tsx"],"sourcesContent":["import { useEffect, useId, useRef } from 'react'\nimport classNames from 'classnames'\nimport { ButtonIcon } from '../Button/ButtonIcon'\nimport { type AlertProps, AlertDefaults } from './AlertTypes'\nimport styles from './Alert.module.scss'\nimport { applyMissingDefaults } from '@/helpers/applyMissingDefaults'\nimport InfoIcon from '@/assets/icons/info.svg?react'\nimport SuccessIcon from '@/assets/icons/success_check.svg?react'\nimport WarningIcon from '@/assets/icons/warning.svg?react'\nimport ErrorIcon from '@/assets/icons/error.svg?react'\nimport CloseIcon from '@/assets/icons/close.svg?react'\n\nexport function Alert(rawProps: AlertProps) {\n const resolvedProps = applyMissingDefaults(rawProps, AlertDefaults)\n const { label, children, status, icon, className, onDismiss }
|
|
1
|
+
{"version":3,"file":"Alert.js","sources":["../../../../../src/components/Common/UI/Alert/Alert.tsx"],"sourcesContent":["import { useEffect, useId, useRef } from 'react'\nimport classNames from 'classnames'\nimport { ButtonIcon } from '../Button/ButtonIcon'\nimport { type AlertProps, AlertDefaults } from './AlertTypes'\nimport styles from './Alert.module.scss'\nimport { applyMissingDefaults } from '@/helpers/applyMissingDefaults'\nimport InfoIcon from '@/assets/icons/info.svg?react'\nimport SuccessIcon from '@/assets/icons/success_check.svg?react'\nimport WarningIcon from '@/assets/icons/warning.svg?react'\nimport ErrorIcon from '@/assets/icons/error.svg?react'\nimport CloseIcon from '@/assets/icons/close.svg?react'\n\nexport function Alert(rawProps: AlertProps) {\n const resolvedProps = applyMissingDefaults(rawProps, AlertDefaults)\n const { label, children, status, icon, className, onDismiss, disableScrollIntoView } =\n resolvedProps\n const id = useId()\n const alertRef = useRef<HTMLDivElement>(null)\n const defaultIcon =\n status === 'info' ? (\n <InfoIcon aria-hidden />\n ) : status === 'success' ? (\n <SuccessIcon aria-hidden />\n ) : status === 'warning' ? (\n <WarningIcon aria-hidden />\n ) : (\n <ErrorIcon aria-hidden />\n )\n\n useEffect(() => {\n if (!disableScrollIntoView && alertRef.current) {\n alertRef.current.scrollIntoView({ behavior: 'smooth' })\n alertRef.current.focus()\n }\n }, [disableScrollIntoView])\n\n return (\n <div className={classNames(styles.root, className)}>\n <div\n className={styles.alert}\n role=\"alert\"\n aria-labelledby={id}\n data-variant={status}\n ref={alertRef}\n tabIndex={-1}\n >\n <div className={styles.header}>\n <div className={styles.iconLabelContainer}>\n <div className={styles.icon}>{icon || defaultIcon}</div>\n <h6 id={id}>{label}</h6>\n {onDismiss && (\n <div className={styles.dismiss}>\n <ButtonIcon variant=\"tertiary\" onClick={onDismiss} aria-label=\"Dismiss alert\">\n <CloseIcon width={36} height={36} />\n </ButtonIcon>\n </div>\n )}\n </div>\n </div>\n <div className={styles.content}>{children}</div>\n </div>\n </div>\n )\n}\n"],"names":["Alert","rawProps","resolvedProps","applyMissingDefaults","AlertDefaults","label","children","status","icon","className","onDismiss","disableScrollIntoView","id","useId","alertRef","useRef","defaultIcon","jsx","InfoIcon","SuccessIcon","WarningIcon","ErrorIcon","useEffect","classNames","styles","jsxs","ButtonIcon","CloseIcon"],"mappings":";;;;;;;;;;;;AAYO,SAASA,EAAMC,GAAsB;AAC1C,QAAMC,IAAgBC,EAAqBF,GAAUG,CAAa,GAC5D,EAAE,OAAAC,GAAO,UAAAC,GAAU,QAAAC,GAAQ,MAAAC,GAAM,WAAAC,GAAW,WAAAC,GAAW,uBAAAC,MAC3DT,GACIU,IAAKC,EAAA,GACLC,IAAWC,EAAuB,IAAI,GACtCC,IACJT,MAAW,SACT,gBAAAU,EAACC,GAAA,EAAS,eAAW,GAAA,CAAC,IACpBX,MAAW,YACb,gBAAAU,EAACE,GAAA,EAAY,eAAW,GAAA,CAAC,IACvBZ,MAAW,YACb,gBAAAU,EAACG,GAAA,EAAY,eAAW,GAAA,CAAC,IAEzB,gBAAAH,EAACI,GAAA,EAAU,eAAW,GAAA,CAAC;AAG3B,SAAAC,EAAU,MAAM;AACd,IAAI,CAACX,KAAyBG,EAAS,YACrCA,EAAS,QAAQ,eAAe,EAAE,UAAU,UAAU,GACtDA,EAAS,QAAQ,MAAA;AAAA,EAErB,GAAG,CAACH,CAAqB,CAAC,qBAGvB,OAAA,EAAI,WAAWY,EAAWC,EAAO,MAAMf,CAAS,GAC/C,UAAA,gBAAAgB;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWD,EAAO;AAAA,MAClB,MAAK;AAAA,MACL,mBAAiBZ;AAAA,MACjB,gBAAcL;AAAA,MACd,KAAKO;AAAA,MACL,UAAU;AAAA,MAEV,UAAA;AAAA,QAAA,gBAAAG,EAAC,OAAA,EAAI,WAAWO,EAAO,QACrB,4BAAC,OAAA,EAAI,WAAWA,EAAO,oBACrB,UAAA;AAAA,UAAA,gBAAAP,EAAC,OAAA,EAAI,WAAWO,EAAO,MAAO,eAAQR,GAAY;AAAA,UAClD,gBAAAC,EAAC,MAAA,EAAG,IAAAL,GAAS,UAAAP,EAAA,CAAM;AAAA,UAClBK,uBACE,OAAA,EAAI,WAAWc,EAAO,SACrB,UAAA,gBAAAP,EAACS,KAAW,SAAQ,YAAW,SAAShB,GAAW,cAAW,iBAC5D,UAAA,gBAAAO,EAACU,GAAA,EAAU,OAAO,IAAI,QAAQ,GAAA,CAAI,EAAA,CACpC,EAAA,CACF;AAAA,QAAA,EAAA,CAEJ,EAAA,CACF;AAAA,QACA,gBAAAV,EAAC,OAAA,EAAI,WAAWO,EAAO,SAAU,UAAAlB,EAAA,CAAS;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA,GAE9C;AAEJ;"}
|
|
@@ -24,6 +24,10 @@ export interface AlertProps {
|
|
|
24
24
|
* Optional callback function called when the dismiss button is clicked
|
|
25
25
|
*/
|
|
26
26
|
onDismiss?: () => void;
|
|
27
|
+
/**
|
|
28
|
+
* Whether to disable scrolling the alert into view and focusing it on mount. Set to true when using inside modals.
|
|
29
|
+
*/
|
|
30
|
+
disableScrollIntoView?: boolean;
|
|
27
31
|
}
|
|
28
32
|
/**
|
|
29
33
|
* Default prop values for Alert component.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AlertTypes.js","sources":["../../../../../src/components/Common/UI/Alert/AlertTypes.ts"],"sourcesContent":["import type { ReactNode } from 'react'\n\nexport interface AlertProps {\n /**\n * The visual status that the alert should convey\n */\n status?: 'info' | 'success' | 'warning' | 'error'\n /**\n * The label text for the alert\n */\n label: string\n /**\n * Optional children to be rendered inside the alert\n */\n children?: ReactNode\n /**\n * Optional custom icon component to override the default icon\n */\n icon?: ReactNode\n /**\n * CSS className to be applied\n */\n className?: string\n /**\n * Optional callback function called when the dismiss button is clicked\n */\n onDismiss?: () => void\n}\n\n/**\n * Default prop values for Alert component.\n */\nexport const AlertDefaults = {\n status: 'info',\n} as const satisfies Partial<AlertProps>\n"],"names":["AlertDefaults"],"mappings":"
|
|
1
|
+
{"version":3,"file":"AlertTypes.js","sources":["../../../../../src/components/Common/UI/Alert/AlertTypes.ts"],"sourcesContent":["import type { ReactNode } from 'react'\n\nexport interface AlertProps {\n /**\n * The visual status that the alert should convey\n */\n status?: 'info' | 'success' | 'warning' | 'error'\n /**\n * The label text for the alert\n */\n label: string\n /**\n * Optional children to be rendered inside the alert\n */\n children?: ReactNode\n /**\n * Optional custom icon component to override the default icon\n */\n icon?: ReactNode\n /**\n * CSS className to be applied\n */\n className?: string\n /**\n * Optional callback function called when the dismiss button is clicked\n */\n onDismiss?: () => void\n /**\n * Whether to disable scrolling the alert into view and focusing it on mount. Set to true when using inside modals.\n */\n disableScrollIntoView?: boolean\n}\n\n/**\n * Default prop values for Alert component.\n */\nexport const AlertDefaults = {\n status: 'info',\n} as const satisfies Partial<AlertProps>\n"],"names":["AlertDefaults"],"mappings":"AAoCO,MAAMA,IAAgB;AAAA,EAC3B,QAAQ;AACV;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { DatePickerProps } from './DatePickerTypes';
|
|
2
|
-
export declare const DatePicker: ({ className, description, errorMessage, id, inputRef, isDisabled, isInvalid, isRequired, label, onChange, onBlur, value, ...props }: DatePickerProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare const DatePicker: ({ className, description, errorMessage, id, inputRef, isDisabled, isInvalid, isRequired, label, onChange, onBlur, value, portalContainer, ...props }: DatePickerProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { jsx as r, jsxs as o } from "react/jsx-runtime";
|
|
2
|
-
import { DatePicker as
|
|
3
|
-
import { useTranslation as
|
|
2
|
+
import { DatePicker as k, Group as A, DateInput as B, DateSegment as F, Button as c, Popover as L, Dialog as j, Calendar as E, Heading as G, CalendarGrid as M, CalendarCell as z } from "react-aria-components";
|
|
3
|
+
import { useTranslation as H } from "react-i18next";
|
|
4
4
|
import u from "classnames";
|
|
5
|
-
import { parseDate as
|
|
6
|
-
import { useFieldIds as
|
|
5
|
+
import { parseDate as R } from "@internationalized/date";
|
|
6
|
+
import { useFieldIds as U } from "../hooks/useFieldIds.js";
|
|
7
7
|
import i from "./DatePicker.module.scss.js";
|
|
8
|
-
import { FieldLayout as
|
|
8
|
+
import { FieldLayout as _ } from "../../FieldLayout/FieldLayout.js";
|
|
9
9
|
import "react";
|
|
10
|
-
import { useTheme as
|
|
10
|
+
import { useTheme as $ } from "../../../../contexts/ThemeProvider/useTheme.js";
|
|
11
11
|
/* empty css */
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import { formatDateToStringDate as
|
|
17
|
-
function
|
|
12
|
+
import q from "../../../../assets/icons/caret-down.svg.js";
|
|
13
|
+
import J from "../../../../assets/icons/caret-right.svg.js";
|
|
14
|
+
import K from "../../../../assets/icons/caret-left.svg.js";
|
|
15
|
+
import O from "../../../../assets/icons/alert-circle.svg.js";
|
|
16
|
+
import { formatDateToStringDate as Q } from "../../../../helpers/dateFormatting.js";
|
|
17
|
+
function W(e) {
|
|
18
18
|
return e ? new Date(
|
|
19
19
|
e.year,
|
|
20
20
|
e.month - 1,
|
|
@@ -22,7 +22,7 @@ function Q(e) {
|
|
|
22
22
|
e.day
|
|
23
23
|
) : null;
|
|
24
24
|
}
|
|
25
|
-
const
|
|
25
|
+
const pr = ({
|
|
26
26
|
className: e,
|
|
27
27
|
description: n,
|
|
28
28
|
errorMessage: l,
|
|
@@ -35,58 +35,59 @@ const dr = ({
|
|
|
35
35
|
onChange: d,
|
|
36
36
|
onBlur: S,
|
|
37
37
|
value: p,
|
|
38
|
-
|
|
38
|
+
portalContainer: y,
|
|
39
|
+
...I
|
|
39
40
|
}) => {
|
|
40
|
-
const { t: a } =
|
|
41
|
+
const { t: a } = H(), { inputId: h, errorMessageId: N, descriptionId: x, ariaDescribedBy: P } = U({
|
|
41
42
|
inputId: D,
|
|
42
43
|
errorMessage: l,
|
|
43
44
|
description: n
|
|
44
|
-
}), { container:
|
|
45
|
-
d && d(
|
|
45
|
+
}), { container: T } = $(), f = p ? Q(p) : "", w = f ? R(f) : null, b = (t) => {
|
|
46
|
+
d && d(W(t));
|
|
46
47
|
};
|
|
47
48
|
return /* @__PURE__ */ r(
|
|
48
|
-
|
|
49
|
+
_,
|
|
49
50
|
{
|
|
50
51
|
label: s,
|
|
51
52
|
htmlFor: h,
|
|
52
53
|
errorMessage: l,
|
|
53
|
-
errorMessageId:
|
|
54
|
-
descriptionId:
|
|
54
|
+
errorMessageId: N,
|
|
55
|
+
descriptionId: x,
|
|
55
56
|
isRequired: C,
|
|
56
57
|
description: n,
|
|
57
58
|
className: u(i.root, e),
|
|
58
59
|
withErrorIcon: !1,
|
|
59
60
|
children: /* @__PURE__ */ r("div", { className: i.container, children: /* @__PURE__ */ o(
|
|
60
|
-
|
|
61
|
+
k,
|
|
61
62
|
{
|
|
62
63
|
"aria-label": s,
|
|
63
|
-
"aria-describedby":
|
|
64
|
+
"aria-describedby": P,
|
|
64
65
|
id: h,
|
|
65
66
|
isDisabled: v,
|
|
66
67
|
isInvalid: m,
|
|
67
|
-
value:
|
|
68
|
-
onChange:
|
|
69
|
-
...
|
|
68
|
+
value: w,
|
|
69
|
+
onChange: b,
|
|
70
|
+
...I,
|
|
70
71
|
children: [
|
|
71
|
-
/* @__PURE__ */ o(
|
|
72
|
-
/* @__PURE__ */ r(
|
|
72
|
+
/* @__PURE__ */ o(A, { children: [
|
|
73
|
+
/* @__PURE__ */ r(B, { ref: g, children: (t) => /* @__PURE__ */ r(F, { segment: t }) }),
|
|
73
74
|
/* @__PURE__ */ o("div", { className: i.icons, children: [
|
|
74
|
-
m && /* @__PURE__ */ r(
|
|
75
|
-
/* @__PURE__ */ r(c, { onBlur: S, children: /* @__PURE__ */ r(
|
|
75
|
+
m && /* @__PURE__ */ r(O, { "aria-hidden": "true", fontSize: 16 }),
|
|
76
|
+
/* @__PURE__ */ r(c, { onBlur: S, children: /* @__PURE__ */ r(q, { title: a("icons.calendarArrow") }) })
|
|
76
77
|
] })
|
|
77
78
|
] }),
|
|
78
79
|
/* @__PURE__ */ r(
|
|
79
|
-
|
|
80
|
+
L,
|
|
80
81
|
{
|
|
81
82
|
className: u(i.popover, "react-aria-Popover"),
|
|
82
|
-
UNSTABLE_portalContainer:
|
|
83
|
-
children: /* @__PURE__ */ r(
|
|
83
|
+
UNSTABLE_portalContainer: y || T.current,
|
|
84
|
+
children: /* @__PURE__ */ r(j, { children: /* @__PURE__ */ o(E, { children: [
|
|
84
85
|
/* @__PURE__ */ o("header", { children: [
|
|
85
|
-
/* @__PURE__ */ r(c, { slot: "previous", children: /* @__PURE__ */ r(
|
|
86
|
-
/* @__PURE__ */ r(
|
|
87
|
-
/* @__PURE__ */ r(c, { slot: "next", children: /* @__PURE__ */ r(
|
|
86
|
+
/* @__PURE__ */ r(c, { slot: "previous", children: /* @__PURE__ */ r(K, { title: a("icons.previousMonth") }) }),
|
|
87
|
+
/* @__PURE__ */ r(G, {}),
|
|
88
|
+
/* @__PURE__ */ r(c, { slot: "next", children: /* @__PURE__ */ r(J, { title: a("icons.nextMonth") }) })
|
|
88
89
|
] }),
|
|
89
|
-
/* @__PURE__ */ r(
|
|
90
|
+
/* @__PURE__ */ r(M, { children: (t) => /* @__PURE__ */ r(z, { date: t }) })
|
|
90
91
|
] }) })
|
|
91
92
|
}
|
|
92
93
|
)
|
|
@@ -97,6 +98,6 @@ const dr = ({
|
|
|
97
98
|
);
|
|
98
99
|
};
|
|
99
100
|
export {
|
|
100
|
-
|
|
101
|
+
pr as DatePicker
|
|
101
102
|
};
|
|
102
103
|
//# sourceMappingURL=DatePicker.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DatePicker.js","sources":["../../../../../src/components/Common/UI/DatePicker/DatePicker.tsx"],"sourcesContent":["import {\n DatePicker as AriaDatePicker,\n Button,\n Calendar,\n CalendarCell,\n CalendarGrid,\n DateInput,\n DateSegment,\n Dialog,\n Group,\n Heading,\n Popover,\n type DateValue,\n} from 'react-aria-components'\nimport { useTranslation } from 'react-i18next'\nimport classNames from 'classnames'\nimport { parseDate } from '@internationalized/date'\nimport { useFieldIds } from '../hooks/useFieldIds'\nimport styles from './DatePicker.module.scss'\nimport type { DatePickerProps } from './DatePickerTypes'\nimport { FieldLayout } from '@/components/Common/FieldLayout'\nimport { useTheme } from '@/contexts/ThemeProvider'\nimport CaretDown from '@/assets/icons/caret-down.svg?react'\nimport CaretRight from '@/assets/icons/caret-right.svg?react'\nimport CaretLeft from '@/assets/icons/caret-left.svg?react'\nimport AlertCircle from '@/assets/icons/alert-circle.svg?react'\nimport { formatDateToStringDate } from '@/helpers/dateFormatting'\n\nfunction calendarDateValueToDate(dateValue: DateValue | null): Date | null {\n if (!dateValue) return null\n\n const date = new Date(\n dateValue.year,\n dateValue.month - 1, // DateValue months are 1-indexed\n dateValue.day,\n )\n\n return date\n}\n\nexport const DatePicker = ({\n className,\n description,\n errorMessage,\n id,\n inputRef,\n isDisabled,\n isInvalid,\n isRequired,\n label,\n onChange,\n onBlur,\n value,\n ...props\n}: DatePickerProps) => {\n const { t } = useTranslation()\n const { inputId, errorMessageId, descriptionId, ariaDescribedBy } = useFieldIds({\n inputId: id,\n errorMessage,\n description,\n })\n const { container } = useTheme()\n\n // Convert JavaScript Date to DateValue for internal use\n // Format the date as YYYY-MM-DD for parseDate\n const formattedDate = value ? formatDateToStringDate(value) : ''\n const internalValue = formattedDate ? parseDate(formattedDate) : null\n\n // Handle internal onChange to convert DateValue back to Date\n const handleChange = (dateValue: DateValue | null) => {\n if (onChange) {\n onChange(calendarDateValueToDate(dateValue))\n }\n }\n\n return (\n <FieldLayout\n label={label}\n htmlFor={inputId}\n errorMessage={errorMessage}\n errorMessageId={errorMessageId}\n descriptionId={descriptionId}\n isRequired={isRequired}\n description={description}\n className={classNames(styles.root, className)}\n withErrorIcon={false}\n >\n <div className={styles.container}>\n <AriaDatePicker\n aria-label={label}\n aria-describedby={ariaDescribedBy}\n id={inputId}\n isDisabled={isDisabled}\n isInvalid={isInvalid}\n value={internalValue}\n onChange={handleChange}\n {...props}\n >\n <Group>\n <DateInput ref={inputRef}>{segment => <DateSegment segment={segment} />}</DateInput>\n\n <div className={styles.icons}>\n {isInvalid && <AlertCircle aria-hidden=\"true\" fontSize={16} />}\n <Button onBlur={onBlur}>\n <CaretDown title={t('icons.calendarArrow')} />\n </Button>\n </div>\n </Group>\n <Popover\n className={classNames(styles.popover, 'react-aria-Popover')}\n UNSTABLE_portalContainer={container.current}\n >\n <Dialog>\n <Calendar>\n <header>\n <Button slot=\"previous\">\n <CaretLeft title={t('icons.previousMonth')} />\n </Button>\n <Heading />\n <Button slot=\"next\">\n <CaretRight title={t('icons.nextMonth')} />\n </Button>\n </header>\n <CalendarGrid>{date => <CalendarCell date={date} />}</CalendarGrid>\n </Calendar>\n </Dialog>\n </Popover>\n </AriaDatePicker>\n </div>\n </FieldLayout>\n )\n}\n"],"names":["calendarDateValueToDate","dateValue","DatePicker","className","description","errorMessage","id","inputRef","isDisabled","isInvalid","isRequired","label","onChange","onBlur","value","props","t","useTranslation","inputId","errorMessageId","descriptionId","ariaDescribedBy","useFieldIds","container","useTheme","formattedDate","formatDateToStringDate","internalValue","parseDate","handleChange","jsx","FieldLayout","classNames","styles","jsxs","AriaDatePicker","Group","DateInput","DateSegment","segment","AlertCircle","Button","CaretDown","Popover","Dialog","Calendar","CaretLeft","Heading","CaretRight","CalendarGrid","date","CalendarCell"],"mappings":";;;;;;;;;;;;;;;;AA4BA,SAASA,EAAwBC,GAA0C;AACzE,SAAKA,IAEQ,IAAI;AAAA,IACfA,EAAU;AAAA,IACVA,EAAU,QAAQ;AAAA;AAAA,IAClBA,EAAU;AAAA,EAAA,IALW;AASzB;AAEO,MAAMC,KAAa,CAAC;AAAA,EACzB,WAAAC;AAAA,EACA,aAAAC;AAAA,EACA,cAAAC;AAAA,EACA,IAAAC;AAAA,EACA,UAAAC;AAAA,EACA,YAAAC;AAAA,EACA,WAAAC;AAAA,EACA,YAAAC;AAAA,EACA,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,QAAAC;AAAA,EACA,OAAAC;AAAA,EACA,GAAGC;AACL,MAAuB;AACrB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAA,GACR,EAAE,SAAAC,GAAS,gBAAAC,GAAgB,eAAAC,GAAe,iBAAAC,EAAA,IAAoBC,EAAY;AAAA,IAC9E,
|
|
1
|
+
{"version":3,"file":"DatePicker.js","sources":["../../../../../src/components/Common/UI/DatePicker/DatePicker.tsx"],"sourcesContent":["import {\n DatePicker as AriaDatePicker,\n Button,\n Calendar,\n CalendarCell,\n CalendarGrid,\n DateInput,\n DateSegment,\n Dialog,\n Group,\n Heading,\n Popover,\n type DateValue,\n} from 'react-aria-components'\nimport { useTranslation } from 'react-i18next'\nimport classNames from 'classnames'\nimport { parseDate } from '@internationalized/date'\nimport { useFieldIds } from '../hooks/useFieldIds'\nimport styles from './DatePicker.module.scss'\nimport type { DatePickerProps } from './DatePickerTypes'\nimport { FieldLayout } from '@/components/Common/FieldLayout'\nimport { useTheme } from '@/contexts/ThemeProvider'\nimport CaretDown from '@/assets/icons/caret-down.svg?react'\nimport CaretRight from '@/assets/icons/caret-right.svg?react'\nimport CaretLeft from '@/assets/icons/caret-left.svg?react'\nimport AlertCircle from '@/assets/icons/alert-circle.svg?react'\nimport { formatDateToStringDate } from '@/helpers/dateFormatting'\n\nfunction calendarDateValueToDate(dateValue: DateValue | null): Date | null {\n if (!dateValue) return null\n\n const date = new Date(\n dateValue.year,\n dateValue.month - 1, // DateValue months are 1-indexed\n dateValue.day,\n )\n\n return date\n}\n\nexport const DatePicker = ({\n className,\n description,\n errorMessage,\n id,\n inputRef,\n isDisabled,\n isInvalid,\n isRequired,\n label,\n onChange,\n onBlur,\n value,\n portalContainer,\n ...props\n}: DatePickerProps) => {\n const { t } = useTranslation()\n const { inputId, errorMessageId, descriptionId, ariaDescribedBy } = useFieldIds({\n inputId: id,\n errorMessage,\n description,\n })\n const { container } = useTheme()\n\n // Convert JavaScript Date to DateValue for internal use\n // Format the date as YYYY-MM-DD for parseDate\n const formattedDate = value ? formatDateToStringDate(value) : ''\n const internalValue = formattedDate ? parseDate(formattedDate) : null\n\n // Handle internal onChange to convert DateValue back to Date\n const handleChange = (dateValue: DateValue | null) => {\n if (onChange) {\n onChange(calendarDateValueToDate(dateValue))\n }\n }\n\n return (\n <FieldLayout\n label={label}\n htmlFor={inputId}\n errorMessage={errorMessage}\n errorMessageId={errorMessageId}\n descriptionId={descriptionId}\n isRequired={isRequired}\n description={description}\n className={classNames(styles.root, className)}\n withErrorIcon={false}\n >\n <div className={styles.container}>\n <AriaDatePicker\n aria-label={label}\n aria-describedby={ariaDescribedBy}\n id={inputId}\n isDisabled={isDisabled}\n isInvalid={isInvalid}\n value={internalValue}\n onChange={handleChange}\n {...props}\n >\n <Group>\n <DateInput ref={inputRef}>{segment => <DateSegment segment={segment} />}</DateInput>\n\n <div className={styles.icons}>\n {isInvalid && <AlertCircle aria-hidden=\"true\" fontSize={16} />}\n <Button onBlur={onBlur}>\n <CaretDown title={t('icons.calendarArrow')} />\n </Button>\n </div>\n </Group>\n <Popover\n className={classNames(styles.popover, 'react-aria-Popover')}\n UNSTABLE_portalContainer={portalContainer || container.current}\n >\n <Dialog>\n <Calendar>\n <header>\n <Button slot=\"previous\">\n <CaretLeft title={t('icons.previousMonth')} />\n </Button>\n <Heading />\n <Button slot=\"next\">\n <CaretRight title={t('icons.nextMonth')} />\n </Button>\n </header>\n <CalendarGrid>{date => <CalendarCell date={date} />}</CalendarGrid>\n </Calendar>\n </Dialog>\n </Popover>\n </AriaDatePicker>\n </div>\n </FieldLayout>\n )\n}\n"],"names":["calendarDateValueToDate","dateValue","DatePicker","className","description","errorMessage","id","inputRef","isDisabled","isInvalid","isRequired","label","onChange","onBlur","value","portalContainer","props","t","useTranslation","inputId","errorMessageId","descriptionId","ariaDescribedBy","useFieldIds","container","useTheme","formattedDate","formatDateToStringDate","internalValue","parseDate","handleChange","jsx","FieldLayout","classNames","styles","jsxs","AriaDatePicker","Group","DateInput","DateSegment","segment","AlertCircle","Button","CaretDown","Popover","Dialog","Calendar","CaretLeft","Heading","CaretRight","CalendarGrid","date","CalendarCell"],"mappings":";;;;;;;;;;;;;;;;AA4BA,SAASA,EAAwBC,GAA0C;AACzE,SAAKA,IAEQ,IAAI;AAAA,IACfA,EAAU;AAAA,IACVA,EAAU,QAAQ;AAAA;AAAA,IAClBA,EAAU;AAAA,EAAA,IALW;AASzB;AAEO,MAAMC,KAAa,CAAC;AAAA,EACzB,WAAAC;AAAA,EACA,aAAAC;AAAA,EACA,cAAAC;AAAA,EACA,IAAAC;AAAA,EACA,UAAAC;AAAA,EACA,YAAAC;AAAA,EACA,WAAAC;AAAA,EACA,YAAAC;AAAA,EACA,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,QAAAC;AAAA,EACA,OAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,GAAGC;AACL,MAAuB;AACrB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAA,GACR,EAAE,SAAAC,GAAS,gBAAAC,GAAgB,eAAAC,GAAe,iBAAAC,EAAA,IAAoBC,EAAY;AAAA,IAC9E,SAASjB;AAAA,IACT,cAAAD;AAAA,IACA,aAAAD;AAAA,EAAA,CACD,GACK,EAAE,WAAAoB,EAAA,IAAcC,EAAA,GAIhBC,IAAgBZ,IAAQa,EAAuBb,CAAK,IAAI,IACxDc,IAAgBF,IAAgBG,EAAUH,CAAa,IAAI,MAG3DI,IAAe,CAAC7B,MAAgC;AACpD,IAAIW,KACFA,EAASZ,EAAwBC,CAAS,CAAC;AAAA,EAE/C;AAEA,SACE,gBAAA8B;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,OAAArB;AAAA,MACA,SAASQ;AAAA,MACT,cAAAd;AAAA,MACA,gBAAAe;AAAA,MACA,eAAAC;AAAA,MACA,YAAAX;AAAA,MACA,aAAAN;AAAA,MACA,WAAW6B,EAAWC,EAAO,MAAM/B,CAAS;AAAA,MAC5C,eAAe;AAAA,MAEf,UAAA,gBAAA4B,EAAC,OAAA,EAAI,WAAWG,EAAO,WACrB,UAAA,gBAAAC;AAAA,QAACC;AAAAA,QAAA;AAAA,UACC,cAAYzB;AAAA,UACZ,oBAAkBW;AAAA,UAClB,IAAIH;AAAA,UACJ,YAAAX;AAAA,UACA,WAAAC;AAAA,UACA,OAAOmB;AAAA,UACP,UAAUE;AAAA,UACT,GAAGd;AAAA,UAEJ,UAAA;AAAA,YAAA,gBAAAmB,EAACE,GAAA,EACC,UAAA;AAAA,cAAA,gBAAAN,EAACO,KAAU,KAAK/B,GAAW,iBAAW,gBAAAwB,EAACQ,GAAA,EAAY,SAAAC,GAAkB,EAAA,CAAG;AAAA,cAExE,gBAAAL,EAAC,OAAA,EAAI,WAAWD,EAAO,OACpB,UAAA;AAAA,gBAAAzB,KAAa,gBAAAsB,EAACU,GAAA,EAAY,eAAY,QAAO,UAAU,IAAI;AAAA,gBAC5D,gBAAAV,EAACW,KAAO,QAAA7B,GACN,UAAA,gBAAAkB,EAACY,KAAU,OAAO1B,EAAE,qBAAqB,EAAA,CAAG,EAAA,CAC9C;AAAA,cAAA,EAAA,CACF;AAAA,YAAA,GACF;AAAA,YACA,gBAAAc;AAAA,cAACa;AAAA,cAAA;AAAA,gBACC,WAAWX,EAAWC,EAAO,SAAS,oBAAoB;AAAA,gBAC1D,0BAA0BnB,KAAmBS,EAAU;AAAA,gBAEvD,UAAA,gBAAAO,EAACc,GAAA,EACC,UAAA,gBAAAV,EAACW,GAAA,EACC,UAAA;AAAA,kBAAA,gBAAAX,EAAC,UAAA,EACC,UAAA;AAAA,oBAAA,gBAAAJ,EAACW,GAAA,EAAO,MAAK,YACX,UAAA,gBAAAX,EAACgB,KAAU,OAAO9B,EAAE,qBAAqB,EAAA,CAAG,EAAA,CAC9C;AAAA,sCACC+B,GAAA,EAAQ;AAAA,oBACT,gBAAAjB,EAACW,GAAA,EAAO,MAAK,QACX,UAAA,gBAAAX,EAACkB,KAAW,OAAOhC,EAAE,iBAAiB,EAAA,CAAG,EAAA,CAC3C;AAAA,kBAAA,GACF;AAAA,oCACCiC,GAAA,EAAc,UAAA,CAAAC,MAAQ,gBAAApB,EAACqB,GAAA,EAAa,MAAAD,GAAY,EAAA,CAAG;AAAA,gBAAA,EAAA,CACtD,EAAA,CACF;AAAA,cAAA;AAAA,YAAA;AAAA,UACF;AAAA,QAAA;AAAA,MAAA,EACF,CACF;AAAA,IAAA;AAAA,EAAA;AAGN;"}
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
const o = "
|
|
1
|
+
const o = "_dialog_19y6l_1", l = "_backdrop_19y6l_21", t = "_backdropSmall_19y6l_31", _ = "_modal_19y6l_35", a = "_modalSmall_19y6l_58", c = "_modalOverflowing_19y6l_62", n = "_content_19y6l_66", e = "_contentScrollable_19y6l_73", d = "_footer_19y6l_80", r = "_footerFixed_19y6l_93", m = {
|
|
2
2
|
dialog: o,
|
|
3
3
|
backdrop: l,
|
|
4
|
-
backdropSmall:
|
|
5
|
-
modal:
|
|
6
|
-
modalSmall:
|
|
7
|
-
modalOverflowing:
|
|
8
|
-
content:
|
|
9
|
-
contentScrollable:
|
|
10
|
-
footer:
|
|
11
|
-
footerFixed:
|
|
4
|
+
backdropSmall: t,
|
|
5
|
+
modal: _,
|
|
6
|
+
modalSmall: a,
|
|
7
|
+
modalOverflowing: c,
|
|
8
|
+
content: n,
|
|
9
|
+
contentScrollable: e,
|
|
10
|
+
footer: d,
|
|
11
|
+
footerFixed: r
|
|
12
12
|
};
|
|
13
13
|
export {
|
|
14
14
|
l as backdrop,
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
t as backdropSmall,
|
|
16
|
+
n as content,
|
|
17
|
+
e as contentScrollable,
|
|
18
18
|
m as default,
|
|
19
19
|
o as dialog,
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
20
|
+
d as footer,
|
|
21
|
+
r as footerFixed,
|
|
22
|
+
_ as modal,
|
|
23
|
+
c as modalOverflowing,
|
|
24
|
+
a as modalSmall
|
|
25
25
|
};
|
|
26
26
|
//# sourceMappingURL=Modal.module.scss.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { SelectProps } from './SelectTypes';
|
|
2
|
-
export declare const Select: ({ description, errorMessage, id, isDisabled, isInvalid, isRequired, label, onChange, onBlur, options, placeholder, value, shouldVisuallyHideLabel, name, className, inputRef, ...props }: SelectProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare const Select: ({ description, errorMessage, id, isDisabled, isInvalid, isRequired, label, onChange, onBlur, options, placeholder, value, shouldVisuallyHideLabel, name, className, inputRef, portalContainer, ...props }: SelectProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { jsx as r, jsxs as t } from "react/jsx-runtime";
|
|
2
|
-
import { Select as
|
|
3
|
-
import { useTranslation as
|
|
4
|
-
import { useMemo as
|
|
2
|
+
import { Select as j, Button as D, SelectValue as E, Popover as P, ListBox as z, ListBoxItem as H } from "react-aria-components";
|
|
3
|
+
import { useTranslation as K } from "react-i18next";
|
|
4
|
+
import { useMemo as M } from "react";
|
|
5
5
|
import p from "classnames";
|
|
6
|
-
import { useFieldIds as
|
|
6
|
+
import { useFieldIds as U } from "../hooks/useFieldIds.js";
|
|
7
7
|
import o from "./Select.module.scss.js";
|
|
8
|
-
import { FieldLayout as
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import { useTheme as
|
|
8
|
+
import { FieldLayout as V } from "../../FieldLayout/FieldLayout.js";
|
|
9
|
+
import _ from "../../../../assets/icons/caret-down.svg.js";
|
|
10
|
+
import $ from "../../../../assets/icons/alert-circle.svg.js";
|
|
11
|
+
import { useTheme as q } from "../../../../contexts/ThemeProvider/useTheme.js";
|
|
12
12
|
/* empty css */
|
|
13
|
-
const
|
|
13
|
+
const te = ({
|
|
14
14
|
description: i,
|
|
15
15
|
errorMessage: a,
|
|
16
16
|
id: f,
|
|
@@ -27,29 +27,30 @@ const re = ({
|
|
|
27
27
|
name: I,
|
|
28
28
|
className: g,
|
|
29
29
|
inputRef: B,
|
|
30
|
-
|
|
30
|
+
portalContainer: C,
|
|
31
|
+
...N
|
|
31
32
|
}) => {
|
|
32
|
-
const { t:
|
|
33
|
+
const { t: b } = K(), { container: y } = q(), { inputId: d, errorMessageId: L, descriptionId: w, ariaDescribedBy: A } = U({
|
|
33
34
|
inputId: f,
|
|
34
35
|
errorMessage: a,
|
|
35
36
|
description: i
|
|
36
|
-
}),
|
|
37
|
+
}), F = M(() => s.map((e) => ({ name: e.label, id: e.value })), [s]);
|
|
37
38
|
return /* @__PURE__ */ r(
|
|
38
|
-
|
|
39
|
+
V,
|
|
39
40
|
{
|
|
40
41
|
label: n,
|
|
41
42
|
htmlFor: d,
|
|
42
43
|
errorMessage: a,
|
|
43
|
-
errorMessageId:
|
|
44
|
-
descriptionId:
|
|
44
|
+
errorMessageId: L,
|
|
45
|
+
descriptionId: w,
|
|
45
46
|
isRequired: h,
|
|
46
47
|
description: i,
|
|
47
48
|
shouldVisuallyHideLabel: x,
|
|
48
49
|
className: p(o.root, "react-aria-CustomSelect", g),
|
|
49
50
|
withErrorIcon: !1,
|
|
50
|
-
...
|
|
51
|
+
...N,
|
|
51
52
|
children: /* @__PURE__ */ t(
|
|
52
|
-
|
|
53
|
+
j,
|
|
53
54
|
{
|
|
54
55
|
"aria-label": n,
|
|
55
56
|
isDisabled: u,
|
|
@@ -60,23 +61,23 @@ const re = ({
|
|
|
60
61
|
onBlur: v,
|
|
61
62
|
id: d,
|
|
62
63
|
selectedKey: l || void 0,
|
|
63
|
-
"aria-describedby":
|
|
64
|
+
"aria-describedby": A,
|
|
64
65
|
name: I,
|
|
65
66
|
children: [
|
|
66
|
-
/* @__PURE__ */ t(
|
|
67
|
-
/* @__PURE__ */ r(
|
|
67
|
+
/* @__PURE__ */ t(D, { ref: B, children: [
|
|
68
|
+
/* @__PURE__ */ r(E, { children: ({ defaultChildren: e, isPlaceholder: T }) => T && c ? c : e }),
|
|
68
69
|
/* @__PURE__ */ t("div", { className: o.icons, "aria-hidden": "true", children: [
|
|
69
|
-
m && /* @__PURE__ */ r(
|
|
70
|
-
/* @__PURE__ */ r(
|
|
70
|
+
m && /* @__PURE__ */ r($, { fontSize: 16 }),
|
|
71
|
+
/* @__PURE__ */ r(_, { title: b("icons.selectArrow") })
|
|
71
72
|
] })
|
|
72
73
|
] }),
|
|
73
74
|
/* @__PURE__ */ r(
|
|
74
|
-
|
|
75
|
+
P,
|
|
75
76
|
{
|
|
76
77
|
className: p(o.popover, "react-aria-Popover"),
|
|
77
|
-
UNSTABLE_portalContainer:
|
|
78
|
+
UNSTABLE_portalContainer: C || y.current,
|
|
78
79
|
maxHeight: 320,
|
|
79
|
-
children: /* @__PURE__ */ r(
|
|
80
|
+
children: /* @__PURE__ */ r(z, { items: F, children: (e) => /* @__PURE__ */ r(H, { children: e.name }, e.id) })
|
|
80
81
|
}
|
|
81
82
|
)
|
|
82
83
|
]
|
|
@@ -86,6 +87,6 @@ const re = ({
|
|
|
86
87
|
);
|
|
87
88
|
};
|
|
88
89
|
export {
|
|
89
|
-
|
|
90
|
+
te as Select
|
|
90
91
|
};
|
|
91
92
|
//# sourceMappingURL=Select.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.js","sources":["../../../../../src/components/Common/UI/Select/Select.tsx"],"sourcesContent":["import type { Key } from 'react-aria-components'\nimport {\n Select as AriaSelect,\n Button,\n ListBox,\n ListBoxItem,\n Popover,\n SelectValue,\n} from 'react-aria-components'\nimport { useTranslation } from 'react-i18next'\nimport { useMemo } from 'react'\nimport classNames from 'classnames'\nimport { useFieldIds } from '../hooks/useFieldIds'\nimport styles from './Select.module.scss'\nimport type { SelectProps } from './SelectTypes'\nimport { FieldLayout } from '@/components/Common/FieldLayout'\nimport CaretDown from '@/assets/icons/caret-down.svg?react'\nimport AlertCircle from '@/assets/icons/alert-circle.svg?react'\nimport { useTheme } from '@/contexts/ThemeProvider'\n\nexport const Select = ({\n description,\n errorMessage,\n id,\n isDisabled,\n isInvalid,\n isRequired,\n label,\n onChange,\n onBlur,\n options,\n placeholder,\n value,\n shouldVisuallyHideLabel,\n name,\n className,\n inputRef,\n ...props\n}: SelectProps) => {\n const { t } = useTranslation()\n const { container } = useTheme()\n const { inputId, errorMessageId, descriptionId, ariaDescribedBy } = useFieldIds({\n inputId: id,\n errorMessage,\n description,\n })\n\n const items = useMemo(() => {\n return options.map(o => ({ name: o.label, id: o.value }))\n }, [options])\n\n return (\n <FieldLayout\n label={label}\n htmlFor={inputId}\n errorMessage={errorMessage}\n errorMessageId={errorMessageId}\n descriptionId={descriptionId}\n isRequired={isRequired}\n description={description}\n shouldVisuallyHideLabel={shouldVisuallyHideLabel}\n className={classNames(styles.root, 'react-aria-CustomSelect', className)}\n withErrorIcon={false}\n {...props}\n >\n <AriaSelect\n aria-label={label}\n isDisabled={isDisabled}\n isInvalid={isInvalid}\n onSelectionChange={key => {\n if (key) {\n onChange?.(key.toString())\n }\n }}\n onBlur={onBlur}\n id={inputId}\n selectedKey={value ? (value as Key) : undefined}\n aria-describedby={ariaDescribedBy}\n name={name}\n >\n <Button ref={inputRef}>\n <SelectValue>\n {({ defaultChildren, isPlaceholder }) => {\n return isPlaceholder && placeholder ? placeholder : defaultChildren\n }}\n </SelectValue>\n <div className={styles.icons} aria-hidden=\"true\">\n {isInvalid && <AlertCircle fontSize={16} />}\n <CaretDown title={t('icons.selectArrow')} />\n </div>\n </Button>\n <Popover\n className={classNames(styles.popover, 'react-aria-Popover')}\n UNSTABLE_portalContainer={container.current}\n maxHeight={320}\n >\n <ListBox items={items}>\n {item => <ListBoxItem key={item.id}>{item.name}</ListBoxItem>}\n </ListBox>\n </Popover>\n </AriaSelect>\n </FieldLayout>\n )\n}\n"],"names":["Select","description","errorMessage","id","isDisabled","isInvalid","isRequired","label","onChange","onBlur","options","placeholder","value","shouldVisuallyHideLabel","name","className","inputRef","props","t","useTranslation","container","useTheme","inputId","errorMessageId","descriptionId","ariaDescribedBy","useFieldIds","items","useMemo","o","jsx","FieldLayout","classNames","styles","jsxs","AriaSelect","key","Button","SelectValue","defaultChildren","isPlaceholder","AlertCircle","CaretDown","Popover","ListBox","item","ListBoxItem"],"mappings":";;;;;;;;;;;;AAoBO,MAAMA,KAAS,CAAC;AAAA,EACrB,aAAAC;AAAA,EACA,cAAAC;AAAA,EACA,IAAAC;AAAA,EACA,YAAAC;AAAA,EACA,WAAAC;AAAA,EACA,YAAAC;AAAA,EACA,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,QAAAC;AAAA,EACA,SAAAC;AAAA,EACA,aAAAC;AAAA,EACA,OAAAC;AAAA,EACA,yBAAAC;AAAA,EACA,MAAAC;AAAA,EACA,WAAAC;AAAA,EACA,UAAAC;AAAA,EACA,GAAGC;AACL,MAAmB;AACjB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAA,GACR,EAAE,WAAAC,EAAA,IAAcC,EAAA,GAChB,EAAE,SAAAC,GAAS,gBAAAC,GAAgB,eAAAC,GAAe,iBAAAC,EAAA,IAAoBC,EAAY;AAAA,IAC9E,
|
|
1
|
+
{"version":3,"file":"Select.js","sources":["../../../../../src/components/Common/UI/Select/Select.tsx"],"sourcesContent":["import type { Key } from 'react-aria-components'\nimport {\n Select as AriaSelect,\n Button,\n ListBox,\n ListBoxItem,\n Popover,\n SelectValue,\n} from 'react-aria-components'\nimport { useTranslation } from 'react-i18next'\nimport { useMemo } from 'react'\nimport classNames from 'classnames'\nimport { useFieldIds } from '../hooks/useFieldIds'\nimport styles from './Select.module.scss'\nimport type { SelectProps } from './SelectTypes'\nimport { FieldLayout } from '@/components/Common/FieldLayout'\nimport CaretDown from '@/assets/icons/caret-down.svg?react'\nimport AlertCircle from '@/assets/icons/alert-circle.svg?react'\nimport { useTheme } from '@/contexts/ThemeProvider'\n\nexport const Select = ({\n description,\n errorMessage,\n id,\n isDisabled,\n isInvalid,\n isRequired,\n label,\n onChange,\n onBlur,\n options,\n placeholder,\n value,\n shouldVisuallyHideLabel,\n name,\n className,\n inputRef,\n portalContainer,\n ...props\n}: SelectProps) => {\n const { t } = useTranslation()\n const { container } = useTheme()\n const { inputId, errorMessageId, descriptionId, ariaDescribedBy } = useFieldIds({\n inputId: id,\n errorMessage,\n description,\n })\n\n const items = useMemo(() => {\n return options.map(o => ({ name: o.label, id: o.value }))\n }, [options])\n\n return (\n <FieldLayout\n label={label}\n htmlFor={inputId}\n errorMessage={errorMessage}\n errorMessageId={errorMessageId}\n descriptionId={descriptionId}\n isRequired={isRequired}\n description={description}\n shouldVisuallyHideLabel={shouldVisuallyHideLabel}\n className={classNames(styles.root, 'react-aria-CustomSelect', className)}\n withErrorIcon={false}\n {...props}\n >\n <AriaSelect\n aria-label={label}\n isDisabled={isDisabled}\n isInvalid={isInvalid}\n onSelectionChange={key => {\n if (key) {\n onChange?.(key.toString())\n }\n }}\n onBlur={onBlur}\n id={inputId}\n selectedKey={value ? (value as Key) : undefined}\n aria-describedby={ariaDescribedBy}\n name={name}\n >\n <Button ref={inputRef}>\n <SelectValue>\n {({ defaultChildren, isPlaceholder }) => {\n return isPlaceholder && placeholder ? placeholder : defaultChildren\n }}\n </SelectValue>\n <div className={styles.icons} aria-hidden=\"true\">\n {isInvalid && <AlertCircle fontSize={16} />}\n <CaretDown title={t('icons.selectArrow')} />\n </div>\n </Button>\n <Popover\n className={classNames(styles.popover, 'react-aria-Popover')}\n UNSTABLE_portalContainer={portalContainer || container.current}\n maxHeight={320}\n >\n <ListBox items={items}>\n {item => <ListBoxItem key={item.id}>{item.name}</ListBoxItem>}\n </ListBox>\n </Popover>\n </AriaSelect>\n </FieldLayout>\n )\n}\n"],"names":["Select","description","errorMessage","id","isDisabled","isInvalid","isRequired","label","onChange","onBlur","options","placeholder","value","shouldVisuallyHideLabel","name","className","inputRef","portalContainer","props","t","useTranslation","container","useTheme","inputId","errorMessageId","descriptionId","ariaDescribedBy","useFieldIds","items","useMemo","o","jsx","FieldLayout","classNames","styles","jsxs","AriaSelect","key","Button","SelectValue","defaultChildren","isPlaceholder","AlertCircle","CaretDown","Popover","ListBox","item","ListBoxItem"],"mappings":";;;;;;;;;;;;AAoBO,MAAMA,KAAS,CAAC;AAAA,EACrB,aAAAC;AAAA,EACA,cAAAC;AAAA,EACA,IAAAC;AAAA,EACA,YAAAC;AAAA,EACA,WAAAC;AAAA,EACA,YAAAC;AAAA,EACA,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,QAAAC;AAAA,EACA,SAAAC;AAAA,EACA,aAAAC;AAAA,EACA,OAAAC;AAAA,EACA,yBAAAC;AAAA,EACA,MAAAC;AAAA,EACA,WAAAC;AAAA,EACA,UAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,GAAGC;AACL,MAAmB;AACjB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAA,GACR,EAAE,WAAAC,EAAA,IAAcC,EAAA,GAChB,EAAE,SAAAC,GAAS,gBAAAC,GAAgB,eAAAC,GAAe,iBAAAC,EAAA,IAAoBC,EAAY;AAAA,IAC9E,SAASxB;AAAA,IACT,cAAAD;AAAA,IACA,aAAAD;AAAA,EAAA,CACD,GAEK2B,IAAQC,EAAQ,MACbnB,EAAQ,IAAI,CAAAoB,OAAM,EAAE,MAAMA,EAAE,OAAO,IAAIA,EAAE,MAAA,EAAQ,GACvD,CAACpB,CAAO,CAAC;AAEZ,SACE,gBAAAqB;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,OAAAzB;AAAA,MACA,SAASgB;AAAA,MACT,cAAArB;AAAA,MACA,gBAAAsB;AAAA,MACA,eAAAC;AAAA,MACA,YAAAnB;AAAA,MACA,aAAAL;AAAA,MACA,yBAAAY;AAAA,MACA,WAAWoB,EAAWC,EAAO,MAAM,2BAA2BnB,CAAS;AAAA,MACvE,eAAe;AAAA,MACd,GAAGG;AAAA,MAEJ,UAAA,gBAAAiB;AAAA,QAACC;AAAAA,QAAA;AAAA,UACC,cAAY7B;AAAA,UACZ,YAAAH;AAAA,UACA,WAAAC;AAAA,UACA,mBAAmB,CAAAgC,MAAO;AACxB,YAAIA,KACF7B,IAAW6B,EAAI,UAAU;AAAA,UAE7B;AAAA,UACA,QAAA5B;AAAA,UACA,IAAIc;AAAA,UACJ,aAAaX,KAAyB;AAAA,UACtC,oBAAkBc;AAAA,UAClB,MAAAZ;AAAA,UAEA,UAAA;AAAA,YAAA,gBAAAqB,EAACG,GAAA,EAAO,KAAKtB,GACX,UAAA;AAAA,cAAA,gBAAAe,EAACQ,GAAA,EACE,UAAA,CAAC,EAAE,iBAAAC,GAAiB,eAAAC,QACZA,KAAiB9B,IAAcA,IAAc6B,GAExD;AAAA,gCACC,OAAA,EAAI,WAAWN,EAAO,OAAO,eAAY,QACvC,UAAA;AAAA,gBAAA7B,KAAa,gBAAA0B,EAACW,GAAA,EAAY,UAAU,GAAA,CAAI;AAAA,gBACzC,gBAAAX,EAACY,GAAA,EAAU,OAAOxB,EAAE,mBAAmB,EAAA,CAAG;AAAA,cAAA,EAAA,CAC5C;AAAA,YAAA,GACF;AAAA,YACA,gBAAAY;AAAA,cAACa;AAAA,cAAA;AAAA,gBACC,WAAWX,EAAWC,EAAO,SAAS,oBAAoB;AAAA,gBAC1D,0BAA0BjB,KAAmBI,EAAU;AAAA,gBACvD,WAAW;AAAA,gBAEX,UAAA,gBAAAU,EAACc,GAAA,EAAQ,OAAAjB,GACN,UAAA,CAAAkB,MAAQ,gBAAAf,EAACgB,KAA2B,UAAAD,EAAK,KAAA,GAAfA,EAAK,EAAe,EAAA,CACjD;AAAA,cAAA;AAAA,YAAA;AAAA,UACF;AAAA,QAAA;AAAA,MAAA;AAAA,IACF;AAAA,EAAA;AAGN;"}
|