@gusto/embedded-react-sdk 0.11.3 → 0.12.1
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 +181 -0
- package/dist/components/Base/Base.js +18 -19
- package/dist/components/Base/Base.js.map +1 -1
- package/dist/components/Common/DataView/DataCards/DataCards.module.scss.js +1 -1
- package/dist/components/Common/DocumentList/DocumentList.module.scss.js +1 -1
- package/dist/components/Common/DocumentViewer/DocumentViewer.module.scss.js +1 -1
- package/dist/components/Common/EmptyData/EmptyData.module.scss.js +1 -1
- package/dist/components/Common/FieldErrorMessage/FieldErrorMessage.module.scss.js +1 -1
- package/dist/components/Common/FieldLayout/FieldLayout.module.scss.js +6 -6
- package/dist/components/Common/Flex/Flex.d.ts +2 -2
- package/dist/components/Common/Flex/Flex.js +5 -5
- package/dist/components/Common/Flex/Flex.js.map +1 -1
- package/dist/components/Common/Form/Form.module.scss.js +2 -2
- package/dist/components/Common/Grid/Grid.d.ts +2 -2
- package/dist/components/Common/Grid/Grid.js +13 -13
- package/dist/components/Common/Grid/Grid.js.map +1 -1
- package/dist/components/Common/HorizontalFieldLayout/HorizontalFieldLayout.module.scss.js +12 -12
- package/dist/components/Common/InternalError/InternalError.module.scss.js +1 -1
- package/dist/components/Common/Loading/Loading.module.scss.js +1 -1
- package/dist/components/Common/PaginationControl/PaginationControl.module.scss.js +1 -1
- package/dist/components/Common/ReorderableList/ReorderableList.module.scss.js +15 -15
- package/dist/components/Common/RequirementsList/RequirementsList.module.scss.js +1 -1
- package/dist/components/Common/SignatureForm/SignatureForm.js +4 -6
- package/dist/components/Common/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Common/SignatureForm/SignatureForm.module.scss.js +6 -6
- package/dist/components/Common/SignatureForm/SignatureFormActions.js +10 -12
- package/dist/components/Common/SignatureForm/SignatureFormActions.js.map +1 -1
- package/dist/components/Common/SignatureForm/SignatureFormFields.js +6 -8
- package/dist/components/Common/SignatureForm/SignatureFormFields.js.map +1 -1
- package/dist/components/Common/UI/Alert/Alert.module.scss.js +1 -1
- package/dist/components/Common/UI/Badge/Badge.module.scss.js +1 -1
- package/dist/components/Common/UI/Button/Button.module.scss.js +1 -1
- package/dist/components/Common/UI/Button/ButtonIcon.module.scss.js +1 -1
- package/dist/components/Common/UI/CalendarPreview/CalendarPreview.module.scss.js +5 -5
- package/dist/components/Common/UI/Card/Card.module.scss.js +1 -1
- package/dist/components/Common/UI/Checkbox/Checkbox.module.scss.js +8 -8
- package/dist/components/Common/UI/CheckboxGroup/CheckboxGroup.module.scss.js +1 -1
- package/dist/components/Common/UI/ComboBox/ComboBox.module.scss.js +1 -1
- package/dist/components/Common/UI/DatePicker/DatePicker.module.scss.js +5 -5
- package/dist/components/Common/UI/Input/Input.module.scss.js +7 -7
- package/dist/components/Common/UI/Link/Link.module.scss.js +1 -1
- package/dist/components/Common/UI/List/List.module.scss.js +1 -1
- package/dist/components/Common/UI/Menu/Menu.module.scss.js +5 -5
- package/dist/components/Common/UI/NumberInput/NumberInput.js +36 -38
- package/dist/components/Common/UI/NumberInput/NumberInput.js.map +1 -1
- package/dist/components/Common/UI/ProgressBar/ProgressBar.d.ts +1 -1
- package/dist/components/Common/UI/ProgressBar/ProgressBar.js +19 -9
- package/dist/components/Common/UI/ProgressBar/ProgressBar.js.map +1 -1
- package/dist/components/Common/UI/ProgressBar/ProgressBar.module.scss.js +1 -1
- package/dist/components/Common/UI/ProgressBar/ProgressBarTypes.d.ts +4 -0
- package/dist/components/Common/UI/Radio/Radio.module.scss.js +1 -1
- package/dist/components/Common/UI/RadioGroup/RadioGroup.module.scss.js +1 -1
- package/dist/components/Common/UI/Select/Select.module.scss.js +1 -1
- package/dist/components/Common/UI/Switch/Switch.module.scss.js +4 -4
- package/dist/components/Common/UI/Table/Table.module.scss.js +1 -1
- package/dist/components/Common/UI/Text/Text.module.scss.js +14 -14
- 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 +6 -8
- package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js +8 -10
- package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js +11 -11
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js +6 -8
- package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +1 -1
- package/dist/components/Company/AssignSignatory/TitleSelect.js +7 -8
- package/dist/components/Company/AssignSignatory/TitleSelect.js.map +1 -1
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js +1 -1
- package/dist/components/Company/BankAccount/BankAccount.js +6 -6
- package/dist/components/Company/BankAccount/BankAccount.js.map +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/BankAccountForm.js +7 -7
- package/dist/components/Company/BankAccount/BankAccountForm/BankAccountForm.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/Form.js +9 -11
- 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 +10 -12
- package/dist/components/Company/BankAccount/BankAccountList/Actions.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountList/BankAccountList.js +3 -3
- package/dist/components/Company/BankAccount/BankAccountList/BankAccountList.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js +11 -13
- 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 +5 -7
- package/dist/components/Company/DocumentSigner/DocumentList/Actions.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js +6 -7
- 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 +2 -3
- 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 +7 -9
- package/dist/components/Company/FederalTaxes/Actions.js.map +1 -1
- package/dist/components/Company/FederalTaxes/FederalTaxes.js +6 -7
- package/dist/components/Company/FederalTaxes/FederalTaxes.js.map +1 -1
- package/dist/components/Company/FederalTaxes/Form.js +3 -5
- 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 +5 -7
- 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 +10 -12
- package/dist/components/Company/Industry/Edit.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/Actions.js +6 -8
- package/dist/components/Company/Locations/LocationForm/Actions.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/Form.js +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 +6 -8
- package/dist/components/Company/Locations/LocationsList/Actions.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/List.js +2 -4
- package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/LocationsList.js +8 -9
- 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 +12 -14
- 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 +2 -3
- 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 +10 -12
- package/dist/components/Company/PaySchedule/_parts/Actions.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/Edit.js +14 -14
- package/dist/components/Company/PaySchedule/_parts/Edit.module.scss.js +1 -1
- package/dist/components/Company/PaySchedule/_parts/Head.js +6 -8
- 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 +5 -7
- package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/Form.js +8 -8
- package/dist/components/Company/StateTaxes/StateTaxesForm/Form.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js +6 -8
- package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/List.js +5 -7
- 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 +1 -1
- package/dist/components/Contractor/Address/useAddress.js +1 -1
- package/dist/components/Contractor/ContractorList/index.d.ts +16 -0
- package/dist/components/Contractor/ContractorList/index.js +124 -0
- package/dist/components/Contractor/ContractorList/index.js.map +1 -0
- package/dist/components/Contractor/{List → ContractorList}/useContractorList.d.ts +1 -3
- package/dist/components/Contractor/{List → ContractorList}/useContractorList.js +9 -10
- package/dist/components/Contractor/ContractorList/useContractorList.js.map +1 -0
- package/dist/components/Contractor/NewHireReport/NewHireReport.js +16 -17
- package/dist/components/Contractor/NewHireReport/NewHireReport.js.map +1 -1
- package/dist/components/Contractor/OnboardingFlow/OnboardingFlow.d.ts +2 -0
- package/dist/components/Contractor/OnboardingFlow/OnboardingFlow.js +26 -0
- package/dist/components/Contractor/OnboardingFlow/OnboardingFlow.js.map +1 -0
- package/dist/components/Contractor/OnboardingFlow/OnboardingFlowComponents.d.ts +27 -0
- package/dist/components/Contractor/OnboardingFlow/OnboardingFlowComponents.js +91 -0
- package/dist/components/Contractor/OnboardingFlow/OnboardingFlowComponents.js.map +1 -0
- package/dist/components/Contractor/OnboardingFlow/onboardingStateMachine.d.ts +9 -0
- package/dist/components/Contractor/OnboardingFlow/onboardingStateMachine.js +137 -0
- package/dist/components/Contractor/OnboardingFlow/onboardingStateMachine.js.map +1 -0
- package/dist/components/Contractor/PaymentMethod/BankAccountForm.js +5 -7
- 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/Profile/ContractorProfile.js +38 -17
- package/dist/components/Contractor/Profile/ContractorProfile.js.map +1 -1
- package/dist/components/Contractor/Profile/ContractorProfileForm.d.ts +3 -1
- package/dist/components/Contractor/Profile/ContractorProfileForm.js +73 -74
- package/dist/components/Contractor/Profile/ContractorProfileForm.js.map +1 -1
- package/dist/components/Contractor/Profile/useContractorProfile.d.ts +29 -28
- package/dist/components/Contractor/Profile/useContractorProfile.js +158 -151
- package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
- package/dist/components/Contractor/Submit/Submit.d.ts +7 -0
- package/dist/components/Contractor/Submit/Submit.js +76 -0
- package/dist/components/Contractor/Submit/Submit.js.map +1 -0
- package/dist/components/Contractor/Submit/SubmitDone.js +11 -11
- package/dist/components/Contractor/Submit/SubmitDone.js.map +1 -1
- package/dist/components/Contractor/index.d.ts +3 -2
- package/dist/components/Contractor/index.js +10 -8
- package/dist/components/Contractor/index.js.map +1 -1
- package/dist/components/Employee/Compensation/Actions.js +5 -6
- package/dist/components/Employee/Compensation/Actions.js.map +1 -1
- package/dist/components/Employee/Compensation/Edit.js +14 -15
- package/dist/components/Employee/Compensation/Edit.js.map +1 -1
- package/dist/components/Employee/Compensation/List.js +23 -25
- package/dist/components/Employee/Compensation/List.js.map +1 -1
- package/dist/components/Employee/Deductions/Deductions.d.ts +8 -14
- package/dist/components/Employee/Deductions/Deductions.js +47 -140
- package/dist/components/Employee/Deductions/Deductions.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsComponents.d.ts +23 -0
- package/dist/components/Employee/Deductions/DeductionsComponents.js +31 -0
- package/dist/components/Employee/Deductions/DeductionsComponents.js.map +1 -0
- package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.d.ts +41 -0
- package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js +134 -0
- package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js.map +1 -0
- package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.d.ts +6 -0
- package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js +98 -0
- package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js.map +1 -0
- package/dist/components/Employee/Deductions/IncludeDeductionsForm/IncludeDeductionsForm.d.ts +15 -0
- package/dist/components/Employee/Deductions/IncludeDeductionsForm/IncludeDeductionsForm.js +48 -0
- package/dist/components/Employee/Deductions/IncludeDeductionsForm/IncludeDeductionsForm.js.map +1 -0
- package/dist/components/Employee/Deductions/stateMachine.d.ts +7 -0
- package/dist/components/Employee/Deductions/stateMachine.js +107 -0
- package/dist/components/Employee/Deductions/stateMachine.js.map +1 -0
- package/dist/components/Employee/Deductions/useDeductions.d.ts +2 -2
- package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js +6 -8
- package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js +6 -7
- 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 +7 -8
- 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 +4 -6
- 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 +14 -15
- package/dist/components/Employee/EmployeeList/List.js.map +1 -1
- package/dist/components/Employee/EmployeeList/useEmployeeList.js +1 -1
- package/dist/components/Employee/Landing/Landing.js +12 -13
- package/dist/components/Employee/Landing/Landing.js.map +1 -1
- package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +7 -7
- package/dist/components/Employee/OnboardingSummary/OnboardingSummary.module.scss.js +6 -6
- package/dist/components/Employee/PaymentMethod/Actions.js +7 -9
- package/dist/components/Employee/PaymentMethod/Actions.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/BankAccountEdit.js +5 -6
- package/dist/components/Employee/PaymentMethod/BankAccountEdit.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/BankAccountsList.js +8 -10
- package/dist/components/Employee/PaymentMethod/BankAccountsList.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js +2 -3
- package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/Split.js +10 -11
- 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 +7 -9
- package/dist/components/Employee/Profile/Actions.js.map +1 -1
- package/dist/components/Employee/Profile/AdminPersonalDetails.d.ts +6 -6
- package/dist/components/Employee/Profile/AdminPersonalDetails.js +9 -10
- package/dist/components/Employee/Profile/AdminPersonalDetails.js.map +1 -1
- package/dist/components/Employee/Profile/HomeAddress.js +1 -1
- package/dist/components/Employee/Profile/PersonalDetailsInputs.d.ts +2 -2
- package/dist/components/Employee/Profile/PersonalDetailsInputs.js +2 -2
- package/dist/components/Employee/Profile/useProfile.js +1 -1
- package/dist/components/Employee/Taxes/Actions.js +8 -10
- package/dist/components/Employee/Taxes/Actions.js.map +1 -1
- package/dist/components/Employee/Taxes/FederalForm.js +12 -14
- 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 +15 -13
- package/dist/components/Flow/Flow.js.map +1 -1
- package/dist/components/Flow/useFlow.d.ts +1 -0
- package/dist/components/Flow/useFlow.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.d.ts +6 -0
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js +41 -0
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js.map +1 -0
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.d.ts +11 -0
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js +78 -0
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -0
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.d.ts +6 -0
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js +19 -0
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js.map +1 -0
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.d.ts +5 -0
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +21 -0
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js.map +1 -0
- package/dist/components/Payroll/PayrollList/PayrollList.d.ts +6 -0
- package/dist/components/Payroll/PayrollList/PayrollList.js +17 -0
- package/dist/components/Payroll/PayrollList/PayrollList.js.map +1 -0
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.d.ts +9 -0
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +49 -0
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -0
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.d.ts +7 -0
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.js +32 -0
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.js.map +1 -0
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.d.ts +6 -0
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +68 -0
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -0
- package/dist/components/Payroll/RunPayrollFlow/RunPayroll.d.ts +16 -0
- package/dist/components/Payroll/RunPayrollFlow/RunPayroll.js +55 -0
- package/dist/components/Payroll/RunPayrollFlow/RunPayroll.js.map +1 -0
- package/dist/components/Payroll/RunPayrollFlow/RunPayrollFlow.d.ts +6 -0
- package/dist/components/Payroll/RunPayrollFlow/RunPayrollFlow.js +20 -0
- package/dist/components/Payroll/RunPayrollFlow/RunPayrollFlow.js.map +1 -0
- package/dist/components/Payroll/index.d.ts +6 -0
- package/dist/components/Payroll/index.js +13 -0
- package/dist/components/Payroll/index.js.map +1 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.d.ts +3 -3
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +5 -7
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
- package/dist/contexts/ThemeProvider/ThemeProvider.d.ts +1 -5
- package/dist/contexts/ThemeProvider/ThemeProvider.js +18 -60
- package/dist/contexts/ThemeProvider/ThemeProvider.js.map +1 -1
- package/dist/contexts/ThemeProvider/theme.d.ts +42 -11
- package/dist/contexts/ThemeProvider/theme.js +31 -15
- package/dist/contexts/ThemeProvider/theme.js.map +1 -1
- package/dist/helpers/responsive.d.ts +0 -3
- package/dist/helpers/responsive.js +20 -34
- package/dist/helpers/responsive.js.map +1 -1
- package/dist/i18n/I18n.js +1 -1
- package/dist/i18n/I18n.js.map +1 -1
- package/dist/i18n/en/Contractor.ContractorList.json.js +16 -10
- package/dist/i18n/en/Contractor.ContractorList.json.js.map +1 -1
- package/dist/i18n/en/Contractor.Profile.json.js +1 -1
- package/dist/i18n/en/Contractor.Submit.json.js +22 -0
- package/dist/i18n/en/Contractor.Submit.json.js.map +1 -0
- package/dist/i18n/en/Employee.Deductions.json.js +49 -51
- package/dist/i18n/en/Employee.Deductions.json.js.map +1 -1
- package/dist/index.js +11 -9
- package/dist/index.js.map +1 -1
- package/dist/shared/constants.d.ts +46 -2
- package/dist/shared/constants.js +82 -45
- package/dist/shared/constants.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/i18next.d.ts +27 -17
- package/package.json +9 -8
- package/dist/components/Common/UI/NumberInput/NumberInput.module.scss.js +0 -8
- package/dist/components/Common/UI/NumberInput/NumberInput.module.scss.js.map +0 -1
- package/dist/components/Contractor/List/index.d.ts +0 -25
- package/dist/components/Contractor/List/index.js +0 -81
- package/dist/components/Contractor/List/index.js.map +0 -1
- package/dist/components/Contractor/List/useContractorList.js.map +0 -1
- package/dist/components/Contractor/Submit/ContractorSubmitWithApi.d.ts +0 -6
- package/dist/components/Contractor/Submit/ContractorSubmitWithApi.js +0 -27
- package/dist/components/Contractor/Submit/ContractorSubmitWithApi.js.map +0 -1
- package/dist/components/Contractor/Submit/index.d.ts +0 -6
- package/dist/components/Contractor/Submit/index.js +0 -20
- package/dist/components/Contractor/Submit/index.js.map +0 -1
- package/dist/components/Contractor/Submit/index.module.scss.js +0 -8
- package/dist/components/Contractor/Submit/index.module.scss.js.map +0 -1
- package/dist/components/Employee/Deductions/Actions.js +0 -27
- package/dist/components/Employee/Deductions/Actions.js.map +0 -1
- package/dist/components/Employee/Deductions/DeductionForm.d.ts +0 -1
- package/dist/components/Employee/Deductions/DeductionForm.js +0 -78
- package/dist/components/Employee/Deductions/DeductionForm.js.map +0 -1
- package/dist/components/Employee/Deductions/DeductionsList.d.ts +0 -2
- package/dist/components/Employee/Deductions/DeductionsList.js +0 -60
- package/dist/components/Employee/Deductions/DeductionsList.js.map +0 -1
- package/dist/components/Employee/Deductions/Head.js +0 -13
- package/dist/components/Employee/Deductions/Head.js.map +0 -1
- package/dist/components/Employee/Deductions/IncludeDeductionsForm.d.ts +0 -1
- package/dist/components/Employee/Deductions/IncludeDeductionsForm.js +0 -27
- package/dist/components/Employee/Deductions/IncludeDeductionsForm.js.map +0 -1
- package/dist/components/Employee/Deductions/useDeductions.js +0 -33
- package/dist/components/Employee/Deductions/useDeductions.js.map +0 -1
- package/dist/contexts/ThemeProvider/createTheme.d.ts +0 -21
- package/dist/contexts/ThemeProvider/createTheme.js +0 -269
- package/dist/contexts/ThemeProvider/createTheme.js.map +0 -1
- package/dist/i18n/en/Contractor.ContractorSubmit.json.js +0 -18
- package/dist/i18n/en/Contractor.ContractorSubmit.json.js.map +0 -1
- package/dist/types/GTheme.d.ts +0 -254
- /package/dist/contexts/ThemeProvider/{createTheme.test.d.ts → theme.test.d.ts} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,186 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.12.0
|
|
4
|
+
|
|
5
|
+
### Updated theming
|
|
6
|
+
|
|
7
|
+
We have updated our theming approach for the SDK which is a breaking change. See the breaking changes section for this release below for more information.
|
|
8
|
+
|
|
9
|
+
### Features & Enhancements
|
|
10
|
+
|
|
11
|
+
- Expose Speakeasy hooks to consumers of SDK for enhanced API interaction capabilities
|
|
12
|
+
- Navigate to add mode when payschedule list is empty
|
|
13
|
+
- Use virtualization to optimize comboboxes with long lists
|
|
14
|
+
- Update Button styling and variants
|
|
15
|
+
|
|
16
|
+
### Fixes
|
|
17
|
+
|
|
18
|
+
- Fix deductions state machine flow and auto-redirect behavior
|
|
19
|
+
- Fix deductions copy and export components
|
|
20
|
+
- Fix pay schedule preview component registration to react-hook-form
|
|
21
|
+
- Fix DatePicker timezone issue
|
|
22
|
+
- Fix react-aria select onChange behavior
|
|
23
|
+
- Fix vite CSS file name requirement on v6
|
|
24
|
+
- Fix console issues in readme publish and type issue in select
|
|
25
|
+
- Fix dependencies to satisfy dependabot
|
|
26
|
+
- Fix only update onboarding status for admin
|
|
27
|
+
- Fix eliminate flash between datacards and datatable
|
|
28
|
+
- Fix mark required fields as required to prevent optional label display
|
|
29
|
+
|
|
30
|
+
### Chores & Maintenance
|
|
31
|
+
|
|
32
|
+
- Update theming infrastructure and migrate all components to use new flat theme variables
|
|
33
|
+
- Change timeout for long running e2e test to 20s
|
|
34
|
+
- Add cursor rule files for AI assistance
|
|
35
|
+
- Fix docs publishing issues
|
|
36
|
+
|
|
37
|
+
### Breaking changes
|
|
38
|
+
|
|
39
|
+
> Note: We are pre alpha and are regularly iterating on the SDK as we learn more about our consumers and their needs which sometimes involves breaking changes. [Read more about our current versioning strategy here](./docs/04/01/versioning.md).
|
|
40
|
+
|
|
41
|
+
#### Legacy theming infrastructure has been removed in favor of simplified flat theme approach
|
|
42
|
+
|
|
43
|
+
The legacy theming system with nested objects and complex component-specific themes has been updated. The new system uses a flat theme object that is more straightforward and easier to use.
|
|
44
|
+
|
|
45
|
+
See the following docs for more context:
|
|
46
|
+
|
|
47
|
+
- [Theming overview](./docs/theming/theming.md)
|
|
48
|
+
- [Theme variables inventory](./docs/theming/theme-variables.md)
|
|
49
|
+
|
|
50
|
+
The following example provides a before and after with a mapping of the old theme object to the new equivalent.
|
|
51
|
+
|
|
52
|
+
**Before (nested structure):**
|
|
53
|
+
|
|
54
|
+
```tsx
|
|
55
|
+
<GustoProvider
|
|
56
|
+
theme={{
|
|
57
|
+
typography: {
|
|
58
|
+
font: 'Geist', // Maps to fontFamily
|
|
59
|
+
fontWeight: {
|
|
60
|
+
regular: 400, // Maps to fontWeightRegular
|
|
61
|
+
medium: 500, // Maps to fontWeightMedium
|
|
62
|
+
semibold: 600, // Maps to fontWeightSemibold
|
|
63
|
+
bold: 700, // Maps to fontWeightBold
|
|
64
|
+
},
|
|
65
|
+
fontSize: {
|
|
66
|
+
small: '14px', // Maps to fontSizeSmall
|
|
67
|
+
regular: '16px', // Maps to fontSizeRegular
|
|
68
|
+
medium: '18px', // Maps to fontSizeLarge
|
|
69
|
+
},
|
|
70
|
+
headings: {
|
|
71
|
+
1: '32px', // Maps to fontSizeHeading1
|
|
72
|
+
2: '24px', // Maps to fontSizeHeading2
|
|
73
|
+
3: '20px', // Maps to fontSizeHeading3
|
|
74
|
+
4: '18px', // Maps to fontSizeHeading4
|
|
75
|
+
5: '16px', // Maps to fontSizeHeading5
|
|
76
|
+
6: '14px', // Maps to fontSizeHeading6
|
|
77
|
+
},
|
|
78
|
+
textColor: '#1C1C1C', // Maps to colorBodyContent
|
|
79
|
+
},
|
|
80
|
+
colors: {
|
|
81
|
+
gray: {
|
|
82
|
+
100: '#FFFFFF', // Maps to colorBody
|
|
83
|
+
200: '#FBFAFA', // Maps to colorBodyAccent
|
|
84
|
+
300: '#F4F4F3', // Maps to colorBodyAccent
|
|
85
|
+
400: '#EAEAEA', // Maps to colorBorder
|
|
86
|
+
500: '#DCDCDC', // Maps to inputBorderColor
|
|
87
|
+
600: '#BABABC', // Maps to colorBodySubContent
|
|
88
|
+
700: '#919197', // Maps to colorBodySubContent
|
|
89
|
+
800: '#6C6C72', // Maps to colorBodySubContent
|
|
90
|
+
900: '#525257', // Maps to colorPrimaryAccent
|
|
91
|
+
1000: '#1C1C1C', // Maps to colorPrimary & colorBodyContent
|
|
92
|
+
},
|
|
93
|
+
error: {
|
|
94
|
+
100: '#FFF7F5', // Maps to colorError
|
|
95
|
+
500: '#D5351F', // Maps to colorErrorAccent
|
|
96
|
+
800: '#B41D08', // Maps to colorErrorContent
|
|
97
|
+
},
|
|
98
|
+
},
|
|
99
|
+
input: {
|
|
100
|
+
fontSize: '14px', // Maps to inputLabelFontSize
|
|
101
|
+
radius: '8px', // Maps to inputRadius
|
|
102
|
+
textColor: '#1C1C1C', // Maps to inputContentColor
|
|
103
|
+
borderColor: '#DCDCDC', // Maps to inputBorderColor
|
|
104
|
+
background: '#FFFFFF', // Maps to inputBackgroundColor
|
|
105
|
+
},
|
|
106
|
+
button: {
|
|
107
|
+
fontSize: '14px', // Maps to fontSizeSmall
|
|
108
|
+
fontWeight: 500, // Maps to fontWeightMedium
|
|
109
|
+
borderRadius: '6px', // Maps to buttonRadius
|
|
110
|
+
primary: {
|
|
111
|
+
color: '#FFFFFF', // Maps to colorPrimaryContent
|
|
112
|
+
bg: '#1C1C1C', // Maps to colorPrimary
|
|
113
|
+
borderColor: '#1C1C1C', // Maps to colorPrimary
|
|
114
|
+
},
|
|
115
|
+
},
|
|
116
|
+
focus: {
|
|
117
|
+
color: '#1C1C1C', // Maps to focusRingColor
|
|
118
|
+
borderWidth: '2px', // Maps to focusRingWidth
|
|
119
|
+
},
|
|
120
|
+
shadow: {
|
|
121
|
+
100: '0px 1px 2px 0px rgba(10, 13, 18, 0.05)', // Maps to shadowResting
|
|
122
|
+
200: '0px 4px 6px 0px rgba(28, 28, 28, 0.05), 0px 10px 15px 0px rgba(28, 28, 28, 0.10)', // Maps to shadowTopmost
|
|
123
|
+
},
|
|
124
|
+
badge: {
|
|
125
|
+
borderRadius: '16px', // Maps to badgeRadius
|
|
126
|
+
},
|
|
127
|
+
radius: '6px', // Maps to buttonRadius (default)
|
|
128
|
+
transitionDuration: '200ms', // Maps to transitionDuration
|
|
129
|
+
}}
|
|
130
|
+
>
|
|
131
|
+
{children}
|
|
132
|
+
</GustoProvider>
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
**After (simplified flat structure):**
|
|
136
|
+
|
|
137
|
+
```tsx
|
|
138
|
+
<GustoProvider
|
|
139
|
+
theme={{
|
|
140
|
+
fontFamily: 'Geist',
|
|
141
|
+
fontWeightRegular: '400',
|
|
142
|
+
fontWeightMedium: '500',
|
|
143
|
+
fontWeightSemibold: '600',
|
|
144
|
+
fontWeightBold: '700',
|
|
145
|
+
fontSizeSmall: '14px',
|
|
146
|
+
fontSizeRegular: '16px',
|
|
147
|
+
fontSizeLarge: '18px',
|
|
148
|
+
fontSizeHeading1: '32px',
|
|
149
|
+
fontSizeHeading2: '24px',
|
|
150
|
+
fontSizeHeading3: '20px',
|
|
151
|
+
fontSizeHeading4: '18px',
|
|
152
|
+
fontSizeHeading5: '16px',
|
|
153
|
+
fontSizeHeading6: '14px',
|
|
154
|
+
colorBody: '#FFFFFF',
|
|
155
|
+
colorBodyAccent: '#F4F4F3',
|
|
156
|
+
colorBodyContent: '#1C1C1C',
|
|
157
|
+
colorBodySubContent: '#6C6C72',
|
|
158
|
+
colorBorder: '#EAEAEA',
|
|
159
|
+
colorPrimary: '#1C1C1C',
|
|
160
|
+
colorPrimaryAccent: '#525257',
|
|
161
|
+
colorPrimaryContent: '#FFFFFF',
|
|
162
|
+
colorError: '#FFF7F5',
|
|
163
|
+
colorErrorAccent: '#D5351F',
|
|
164
|
+
colorErrorContent: '#B41D08',
|
|
165
|
+
inputRadius: '8px',
|
|
166
|
+
inputBackgroundColor: '#FFFFFF',
|
|
167
|
+
inputBorderColor: '#DCDCDC',
|
|
168
|
+
inputContentColor: '#1C1C1C',
|
|
169
|
+
inputLabelFontSize: '16px',
|
|
170
|
+
buttonRadius: '8px',
|
|
171
|
+
focusRingColor: '#1C1C1C',
|
|
172
|
+
focusRingWidth: '2px',
|
|
173
|
+
shadowResting: '0px 1px 2px 0px rgba(10, 13, 18, 0.05)',
|
|
174
|
+
shadowTopmost:
|
|
175
|
+
'0px 4px 6px 0px rgba(28, 28, 28, 0.05), 0px 10px 15px 0px rgba(28, 28, 28, 0.10)',
|
|
176
|
+
badgeRadius: '16px',
|
|
177
|
+
transitionDuration: '200ms',
|
|
178
|
+
}}
|
|
179
|
+
>
|
|
180
|
+
{children}
|
|
181
|
+
</GustoProvider>
|
|
182
|
+
```
|
|
183
|
+
|
|
3
184
|
## 0.11.3
|
|
4
185
|
|
|
5
186
|
- Minor release to assist in docs publishing
|
|
@@ -10,40 +10,39 @@ import { FadeIn as _ } from "../Common/FadeIn/FadeIn.js";
|
|
|
10
10
|
import { BaseContext as j } from "./useBase.js";
|
|
11
11
|
import { componentEvents as F } from "../../shared/constants.js";
|
|
12
12
|
import { useAsyncError as K } from "../Common/hooks/useAsyncError.js";
|
|
13
|
-
import "classnames";
|
|
14
13
|
import { InternalError as P } from "../Common/InternalError/InternalError.js";
|
|
15
14
|
import { snakeCaseToCamelCase as w } from "../../helpers/formattedStrings.js";
|
|
16
15
|
import { useComponentContext as M } from "../../contexts/ComponentAdapter/useComponentContext.js";
|
|
17
16
|
import { useLoadingIndicator as O } from "../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
|
|
18
|
-
const U = (
|
|
17
|
+
const U = (e) => e.map((n) => n.message ? /* @__PURE__ */ o("li", { children: n.message }, n.key) : null), k = (e, n) => {
|
|
19
18
|
const m = n ? n + "." : "";
|
|
20
|
-
if (
|
|
19
|
+
if (e.category === "invalid_attribute_value" || e.category === "invalid_operation")
|
|
21
20
|
return [
|
|
22
21
|
{
|
|
23
|
-
key: w(m +
|
|
24
|
-
message:
|
|
22
|
+
key: w(m + e.errorKey),
|
|
23
|
+
message: e.message ?? ""
|
|
25
24
|
}
|
|
26
25
|
];
|
|
27
|
-
if (
|
|
26
|
+
if (e.category === "nested_errors" && e.errors !== void 0) {
|
|
28
27
|
let s = "";
|
|
29
|
-
return
|
|
28
|
+
return e.metadata?.key && typeof e.metadata.key == "string" ? s = e.metadata.key : e.metadata?.state && typeof e.metadata.state == "string" ? s = e.metadata.state : e.errorKey && (s = e.errorKey), e.errors.flatMap((r) => k(r, m + s));
|
|
30
29
|
}
|
|
31
30
|
return [];
|
|
32
|
-
},
|
|
33
|
-
children:
|
|
31
|
+
}, re = ({
|
|
32
|
+
children: e,
|
|
34
33
|
FallbackComponent: n = P,
|
|
35
34
|
LoaderComponent: m,
|
|
36
35
|
onEvent: s
|
|
37
36
|
}) => {
|
|
38
|
-
const [r, l] = y(null), [c, f] = y(null), p = K(), { t: x } = B(), d = M(), { LoadingIndicator: b } = O(), v = m ?? b, I = E((
|
|
39
|
-
l(
|
|
40
|
-
}, []), A = (
|
|
41
|
-
l(
|
|
37
|
+
const [r, l] = y(null), [c, f] = y(null), p = K(), { t: x } = B(), d = M(), { LoadingIndicator: b } = O(), v = m ?? b, I = E((t) => {
|
|
38
|
+
l(t), t || f(null);
|
|
39
|
+
}, []), A = (t) => {
|
|
40
|
+
l(t), t instanceof h && Array.isArray(t.errors) && f(t.errors.flatMap((a) => k(a)));
|
|
42
41
|
}, L = E(
|
|
43
|
-
async (
|
|
42
|
+
async (t, a) => {
|
|
44
43
|
l(null), f(null);
|
|
45
44
|
try {
|
|
46
|
-
await a(
|
|
45
|
+
await a(t);
|
|
47
46
|
} catch (i) {
|
|
48
47
|
i instanceof g || i instanceof C || i instanceof h ? A(i) : p(i);
|
|
49
48
|
}
|
|
@@ -60,11 +59,11 @@ const U = (t) => t.map((n) => n.message ? /* @__PURE__ */ o("li", { children: n.
|
|
|
60
59
|
throwError: p,
|
|
61
60
|
baseSubmitHandler: L
|
|
62
61
|
},
|
|
63
|
-
children: /* @__PURE__ */ o(T, { children: ({ reset:
|
|
62
|
+
children: /* @__PURE__ */ o(T, { children: ({ reset: t }) => /* @__PURE__ */ u(
|
|
64
63
|
S,
|
|
65
64
|
{
|
|
66
65
|
FallbackComponent: n,
|
|
67
|
-
onReset:
|
|
66
|
+
onReset: t,
|
|
68
67
|
onError: (a) => {
|
|
69
68
|
s(F.ERROR, a);
|
|
70
69
|
},
|
|
@@ -74,7 +73,7 @@ const U = (t) => t.map((n) => n.message ? /* @__PURE__ */ o("li", { children: n.
|
|
|
74
73
|
r && r instanceof g && /* @__PURE__ */ o(d.Text, { children: r.message }),
|
|
75
74
|
r && r instanceof C && /* @__PURE__ */ o(d.Text, { as: "pre", children: r.pretty() })
|
|
76
75
|
] }),
|
|
77
|
-
/* @__PURE__ */ o(R, { fallback: /* @__PURE__ */ o(v, {}), children: /* @__PURE__ */ o(_, { children:
|
|
76
|
+
/* @__PURE__ */ o(R, { fallback: /* @__PURE__ */ o(v, {}), children: /* @__PURE__ */ o(_, { children: e }) })
|
|
78
77
|
]
|
|
79
78
|
}
|
|
80
79
|
) })
|
|
@@ -82,6 +81,6 @@ const U = (t) => t.map((n) => n.message ? /* @__PURE__ */ o("li", { children: n.
|
|
|
82
81
|
);
|
|
83
82
|
};
|
|
84
83
|
export {
|
|
85
|
-
|
|
84
|
+
re as BaseComponent
|
|
86
85
|
};
|
|
87
86
|
//# sourceMappingURL=Base.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Base.js","sources":["../../../src/components/Base/Base.tsx"],"sourcesContent":["import type { ReactNode, JSX } from 'react'\nimport { Suspense, useState, useCallback } from 'react'\nimport type { FallbackProps } from 'react-error-boundary'\nimport { ErrorBoundary } from 'react-error-boundary'\nimport { useTranslation } from 'react-i18next'\nimport { APIError } from '@gusto/embedded-api/models/errors/apierror'\nimport { SDKValidationError } from '@gusto/embedded-api/models/errors/sdkvalidationerror'\nimport { UnprocessableEntityErrorObject } from '@gusto/embedded-api/models/errors/unprocessableentityerrorobject'\nimport type { EntityErrorObject } from '@gusto/embedded-api/models/components/entityerrorobject'\nimport { QueryErrorResetBoundary } from '@tanstack/react-query'\nimport { FadeIn } from '../Common/FadeIn/FadeIn'\nimport { BaseContext, type FieldError, type KnownErrors, type OnEventType } from './useBase'\nimport { componentEvents, type EventType } from '@/shared/constants'\nimport { InternalError, useAsyncError } from '@/components/Common'\nimport { snakeCaseToCamelCase } from '@/helpers/formattedStrings'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport type { ResourceDictionary, Resources } from '@/types/Helpers'\nimport { useLoadingIndicator } from '@/contexts/LoadingIndicatorProvider/useLoadingIndicator'\nimport type { LoadingIndicatorContextProps } from '@/contexts/LoadingIndicatorProvider/useLoadingIndicator'\n\nexport interface CommonComponentInterface<TResourceKey extends keyof Resources = keyof Resources> {\n children?: ReactNode\n className?: string\n defaultValues?: unknown\n dictionary?: ResourceDictionary<TResourceKey>\n}\n\n// Base component wrapper with error and suspense handling\nexport interface BaseComponentInterface<TResourceKey extends keyof Resources = keyof Resources>\n extends CommonComponentInterface<TResourceKey> {\n FallbackComponent?: (props: FallbackProps) => JSX.Element\n LoaderComponent?: LoadingIndicatorContextProps['LoadingIndicator']\n onEvent: OnEventType<EventType, unknown>\n}\n\n/**Traverses errorList and finds items with message properties */\nconst renderErrorList = (errorList: FieldError[]): React.ReactNode[] => {\n return errorList.map(errorFromList => {\n if (errorFromList.message) {\n return <li key={errorFromList.key}>{errorFromList.message}</li>\n }\n return null\n })\n}\n/**Recuresively parses error list and constructs an array of objects containing attribute value error messages associated with form fields. Nested errors construct '.' separated keys\n * metadata.state is a special case for state taxes validation errors\n */\nconst getFieldErrors = (\n error: EntityErrorObject,\n parentKey?: string,\n): { key: string; message: string }[] => {\n const keyPrefix = parentKey ? parentKey + '.' : ''\n if (error.category === 'invalid_attribute_value' || error.category === 'invalid_operation') {\n return [\n {\n key: snakeCaseToCamelCase(keyPrefix + error.errorKey),\n message: error.message ?? '',\n },\n ]\n }\n if (error.category === 'nested_errors' && error.errors !== undefined) {\n //TODO: clean this up once Metadata type is fixed in openapi spec\n let keySuffix = ''\n //@ts-expect-error: Metadata in speakeasy is incorrectly typed\n if (error.metadata?.key && typeof error.metadata.key === 'string') {\n //@ts-expect-error: Metadata in speakeasy is incorrectly typed\n keySuffix = error.metadata.key as string\n //@ts-expect-error: Metadata in speakeasy is incorrectly typed\n } else if (error.metadata?.state && typeof error.metadata.state === 'string') {\n //@ts-expect-error: Metadata in speakeasy is incorrectly typed\n keySuffix = error.metadata.state as string\n } else if (error.errorKey) {\n keySuffix = error.errorKey\n }\n return error.errors.flatMap(err => getFieldErrors(err, keyPrefix + keySuffix))\n }\n return []\n}\n\ntype SubmitHandler<T> = (data: T) => Promise<void>\n\nexport const BaseComponent = <TResourceKey extends keyof Resources = keyof Resources>({\n children,\n FallbackComponent = InternalError,\n LoaderComponent: LoadingIndicatorFromProps,\n onEvent,\n}: BaseComponentInterface<TResourceKey>) => {\n const [error, setError] = useState<KnownErrors | null>(null)\n const [fieldErrors, setFieldErrors] = useState<FieldError[] | null>(null)\n const throwError = useAsyncError()\n const { t } = useTranslation()\n const Components = useComponentContext()\n\n const { LoadingIndicator: LoadingIndicatorFromContext } = useLoadingIndicator()\n\n const LoaderComponent = LoadingIndicatorFromProps ?? LoadingIndicatorFromContext\n\n // Enhanced setError that also clears fieldErrors when error is cleared\n const setErrorWithFieldsClear = useCallback((error: KnownErrors | null) => {\n setError(error)\n if (!error) {\n setFieldErrors(null)\n }\n }, [])\n\n const processError = (error: KnownErrors) => {\n setError(error)\n //422\tapplication/json - content relaited error\n if (error instanceof UnprocessableEntityErrorObject && Array.isArray(error.errors)) {\n setFieldErrors(error.errors.flatMap(err => getFieldErrors(err)))\n }\n }\n\n const baseSubmitHandler = useCallback(\n async <T,>(data: T, componentHandler: SubmitHandler<T>) => {\n setError(null)\n setFieldErrors(null)\n try {\n await componentHandler(data)\n } catch (err) {\n if (\n err instanceof APIError ||\n err instanceof SDKValidationError ||\n err instanceof UnprocessableEntityErrorObject\n ) {\n processError(err)\n } else throwError(err)\n }\n },\n [setError, throwError],\n )\n\n return (\n <BaseContext.Provider\n value={{\n fieldErrors,\n setError: setErrorWithFieldsClear,\n onEvent,\n throwError,\n baseSubmitHandler,\n }}\n >\n <QueryErrorResetBoundary>\n {({ reset: resetQueries }) => (\n <ErrorBoundary\n FallbackComponent={FallbackComponent}\n onReset={resetQueries}\n onError={err => {\n onEvent(componentEvents.ERROR, err)\n }}\n >\n {(error || fieldErrors) && (\n <Components.Alert label={t('status.errorEncountered')} status=\"error\">\n {fieldErrors && <Components.UnorderedList items={renderErrorList(fieldErrors)} />}\n {error && error instanceof APIError && (\n <Components.Text>{error.message}</Components.Text>\n )}\n {error && error instanceof SDKValidationError && (\n <Components.Text as=\"pre\">{error.pretty()}</Components.Text>\n )}\n </Components.Alert>\n )}\n <Suspense fallback={<LoaderComponent />}>\n <FadeIn>{children}</FadeIn>\n </Suspense>\n </ErrorBoundary>\n )}\n </QueryErrorResetBoundary>\n </BaseContext.Provider>\n )\n}\n"],"names":["renderErrorList","errorList","errorFromList","jsx","getFieldErrors","error","parentKey","keyPrefix","snakeCaseToCamelCase","keySuffix","err","BaseComponent","children","FallbackComponent","InternalError","LoadingIndicatorFromProps","onEvent","setError","useState","fieldErrors","setFieldErrors","throwError","useAsyncError","t","useTranslation","Components","useComponentContext","LoadingIndicatorFromContext","useLoadingIndicator","LoaderComponent","setErrorWithFieldsClear","useCallback","processError","UnprocessableEntityErrorObject","baseSubmitHandler","data","componentHandler","APIError","SDKValidationError","BaseContext","QueryErrorResetBoundary","resetQueries","jsxs","ErrorBoundary","componentEvents","Suspense","FadeIn"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"Base.js","sources":["../../../src/components/Base/Base.tsx"],"sourcesContent":["import type { ReactNode, JSX } from 'react'\nimport { Suspense, useState, useCallback } from 'react'\nimport type { FallbackProps } from 'react-error-boundary'\nimport { ErrorBoundary } from 'react-error-boundary'\nimport { useTranslation } from 'react-i18next'\nimport { APIError } from '@gusto/embedded-api/models/errors/apierror'\nimport { SDKValidationError } from '@gusto/embedded-api/models/errors/sdkvalidationerror'\nimport { UnprocessableEntityErrorObject } from '@gusto/embedded-api/models/errors/unprocessableentityerrorobject'\nimport type { EntityErrorObject } from '@gusto/embedded-api/models/components/entityerrorobject'\nimport { QueryErrorResetBoundary } from '@tanstack/react-query'\nimport { FadeIn } from '../Common/FadeIn/FadeIn'\nimport { BaseContext, type FieldError, type KnownErrors, type OnEventType } from './useBase'\nimport { componentEvents, type EventType } from '@/shared/constants'\nimport { InternalError, useAsyncError } from '@/components/Common'\nimport { snakeCaseToCamelCase } from '@/helpers/formattedStrings'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport type { ResourceDictionary, Resources } from '@/types/Helpers'\nimport { useLoadingIndicator } from '@/contexts/LoadingIndicatorProvider/useLoadingIndicator'\nimport type { LoadingIndicatorContextProps } from '@/contexts/LoadingIndicatorProvider/useLoadingIndicator'\n\nexport interface CommonComponentInterface<TResourceKey extends keyof Resources = keyof Resources> {\n children?: ReactNode\n className?: string\n defaultValues?: unknown\n dictionary?: ResourceDictionary<TResourceKey>\n}\n\n// Base component wrapper with error and suspense handling\nexport interface BaseComponentInterface<TResourceKey extends keyof Resources = keyof Resources>\n extends CommonComponentInterface<TResourceKey> {\n FallbackComponent?: (props: FallbackProps) => JSX.Element\n LoaderComponent?: LoadingIndicatorContextProps['LoadingIndicator']\n onEvent: OnEventType<EventType, unknown>\n}\n\n/**Traverses errorList and finds items with message properties */\nconst renderErrorList = (errorList: FieldError[]): React.ReactNode[] => {\n return errorList.map(errorFromList => {\n if (errorFromList.message) {\n return <li key={errorFromList.key}>{errorFromList.message}</li>\n }\n return null\n })\n}\n/**Recuresively parses error list and constructs an array of objects containing attribute value error messages associated with form fields. Nested errors construct '.' separated keys\n * metadata.state is a special case for state taxes validation errors\n */\nconst getFieldErrors = (\n error: EntityErrorObject,\n parentKey?: string,\n): { key: string; message: string }[] => {\n const keyPrefix = parentKey ? parentKey + '.' : ''\n if (error.category === 'invalid_attribute_value' || error.category === 'invalid_operation') {\n return [\n {\n key: snakeCaseToCamelCase(keyPrefix + error.errorKey),\n message: error.message ?? '',\n },\n ]\n }\n if (error.category === 'nested_errors' && error.errors !== undefined) {\n //TODO: clean this up once Metadata type is fixed in openapi spec\n let keySuffix = ''\n //@ts-expect-error: Metadata in speakeasy is incorrectly typed\n if (error.metadata?.key && typeof error.metadata.key === 'string') {\n //@ts-expect-error: Metadata in speakeasy is incorrectly typed\n keySuffix = error.metadata.key as string\n //@ts-expect-error: Metadata in speakeasy is incorrectly typed\n } else if (error.metadata?.state && typeof error.metadata.state === 'string') {\n //@ts-expect-error: Metadata in speakeasy is incorrectly typed\n keySuffix = error.metadata.state as string\n } else if (error.errorKey) {\n keySuffix = error.errorKey\n }\n return error.errors.flatMap(err => getFieldErrors(err, keyPrefix + keySuffix))\n }\n return []\n}\n\ntype SubmitHandler<T> = (data: T) => Promise<void>\n\nexport const BaseComponent = <TResourceKey extends keyof Resources = keyof Resources>({\n children,\n FallbackComponent = InternalError,\n LoaderComponent: LoadingIndicatorFromProps,\n onEvent,\n}: BaseComponentInterface<TResourceKey>) => {\n const [error, setError] = useState<KnownErrors | null>(null)\n const [fieldErrors, setFieldErrors] = useState<FieldError[] | null>(null)\n const throwError = useAsyncError()\n const { t } = useTranslation()\n const Components = useComponentContext()\n\n const { LoadingIndicator: LoadingIndicatorFromContext } = useLoadingIndicator()\n\n const LoaderComponent = LoadingIndicatorFromProps ?? LoadingIndicatorFromContext\n\n // Enhanced setError that also clears fieldErrors when error is cleared\n const setErrorWithFieldsClear = useCallback((error: KnownErrors | null) => {\n setError(error)\n if (!error) {\n setFieldErrors(null)\n }\n }, [])\n\n const processError = (error: KnownErrors) => {\n setError(error)\n //422\tapplication/json - content relaited error\n if (error instanceof UnprocessableEntityErrorObject && Array.isArray(error.errors)) {\n setFieldErrors(error.errors.flatMap(err => getFieldErrors(err)))\n }\n }\n\n const baseSubmitHandler = useCallback(\n async <T,>(data: T, componentHandler: SubmitHandler<T>) => {\n setError(null)\n setFieldErrors(null)\n try {\n await componentHandler(data)\n } catch (err) {\n if (\n err instanceof APIError ||\n err instanceof SDKValidationError ||\n err instanceof UnprocessableEntityErrorObject\n ) {\n processError(err)\n } else throwError(err)\n }\n },\n [setError, throwError],\n )\n\n return (\n <BaseContext.Provider\n value={{\n fieldErrors,\n setError: setErrorWithFieldsClear,\n onEvent,\n throwError,\n baseSubmitHandler,\n }}\n >\n <QueryErrorResetBoundary>\n {({ reset: resetQueries }) => (\n <ErrorBoundary\n FallbackComponent={FallbackComponent}\n onReset={resetQueries}\n onError={err => {\n onEvent(componentEvents.ERROR, err)\n }}\n >\n {(error || fieldErrors) && (\n <Components.Alert label={t('status.errorEncountered')} status=\"error\">\n {fieldErrors && <Components.UnorderedList items={renderErrorList(fieldErrors)} />}\n {error && error instanceof APIError && (\n <Components.Text>{error.message}</Components.Text>\n )}\n {error && error instanceof SDKValidationError && (\n <Components.Text as=\"pre\">{error.pretty()}</Components.Text>\n )}\n </Components.Alert>\n )}\n <Suspense fallback={<LoaderComponent />}>\n <FadeIn>{children}</FadeIn>\n </Suspense>\n </ErrorBoundary>\n )}\n </QueryErrorResetBoundary>\n </BaseContext.Provider>\n )\n}\n"],"names":["renderErrorList","errorList","errorFromList","jsx","getFieldErrors","error","parentKey","keyPrefix","snakeCaseToCamelCase","keySuffix","err","BaseComponent","children","FallbackComponent","InternalError","LoadingIndicatorFromProps","onEvent","setError","useState","fieldErrors","setFieldErrors","throwError","useAsyncError","t","useTranslation","Components","useComponentContext","LoadingIndicatorFromContext","useLoadingIndicator","LoaderComponent","setErrorWithFieldsClear","useCallback","processError","UnprocessableEntityErrorObject","baseSubmitHandler","data","componentHandler","APIError","SDKValidationError","BaseContext","QueryErrorResetBoundary","resetQueries","jsxs","ErrorBoundary","componentEvents","Suspense","FadeIn"],"mappings":"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"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const t = "
|
|
1
|
+
const t = "_documentList_y7zef_1", o = "_formTitle_y7zef_8", s = "_formDescription_y7zef_12", e = "_statusCell_y7zef_16", r = "_documentListError_y7zef_20", c = {
|
|
2
2
|
documentList: t,
|
|
3
3
|
formTitle: o,
|
|
4
4
|
formDescription: s,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const n = "
|
|
1
|
+
const n = "_container_1ux7f_1", d = "_embedPdf_1ux7f_4", e = "_smallEmbedPdfContainer_1ux7f_9", o = "_smallEmbedPdf_1ux7f_9", s = "_heading_1ux7f_23", t = "_downloadInstructions_1ux7f_26", a = {
|
|
2
2
|
container: n,
|
|
3
3
|
embedPdf: d,
|
|
4
4
|
smallEmbedPdfContainer: e,
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
const
|
|
2
|
-
root:
|
|
3
|
-
labelAndDescription:
|
|
1
|
+
const i = "_root_kyliw_1", e = "_labelAndDescription_kyliw_7", s = "_withVisibleLabel_kyliw_11", t = "_withDescription_kyliw_14", o = "_errorMessage_kyliw_18", l = {
|
|
2
|
+
root: i,
|
|
3
|
+
labelAndDescription: e,
|
|
4
4
|
withVisibleLabel: s,
|
|
5
5
|
withDescription: t,
|
|
6
6
|
errorMessage: o
|
|
7
7
|
};
|
|
8
8
|
export {
|
|
9
|
-
|
|
9
|
+
l as default,
|
|
10
10
|
o as errorMessage,
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
e as labelAndDescription,
|
|
12
|
+
i as root,
|
|
13
13
|
t as withDescription,
|
|
14
14
|
s as withVisibleLabel
|
|
15
15
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Responsive,
|
|
1
|
+
import { Responsive, CustomPropertyValue } from '../../../helpers/responsive';
|
|
2
2
|
export interface FlexProps {
|
|
3
3
|
children: React.ReactNode;
|
|
4
4
|
flexDirection?: Responsive<'row' | 'column'>;
|
|
5
5
|
justifyContent?: Responsive<'space-between' | 'center' | 'flex-start' | 'flex-end' | 'space-around' | 'space-evenly' | 'normal'>;
|
|
6
6
|
alignItems?: Responsive<'center' | 'flex-start' | 'flex-end' | 'stretch'>;
|
|
7
|
-
gap?:
|
|
7
|
+
gap?: Responsive<CustomPropertyValue>;
|
|
8
8
|
}
|
|
9
9
|
export declare function Flex({ children, flexDirection, justifyContent, alignItems, gap, }: FlexProps): import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
export interface FlexItemProps {
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import t from "./Flex.module.scss.js";
|
|
3
|
-
import { setResponsiveCustomProperties as
|
|
4
|
-
function
|
|
3
|
+
import { setResponsiveCustomProperties as m } from "../../../helpers/responsive.js";
|
|
4
|
+
function c({
|
|
5
5
|
children: r,
|
|
6
6
|
flexDirection: o = "row",
|
|
7
7
|
justifyContent: s = "normal",
|
|
8
8
|
alignItems: i = "flex-start",
|
|
9
9
|
gap: n = 24
|
|
10
10
|
}) {
|
|
11
|
-
const l =
|
|
11
|
+
const l = m({
|
|
12
12
|
"flex-direction": o,
|
|
13
13
|
"justify-content": s,
|
|
14
14
|
"align-items": i,
|
|
15
|
-
gap:
|
|
15
|
+
gap: n
|
|
16
16
|
});
|
|
17
17
|
return /* @__PURE__ */ e("div", { className: t.flexContainer, children: /* @__PURE__ */ e("div", { className: t.flex, style: l, children: r }) });
|
|
18
18
|
}
|
|
19
19
|
export {
|
|
20
|
-
|
|
20
|
+
c as Flex
|
|
21
21
|
};
|
|
22
22
|
//# sourceMappingURL=Flex.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Flex.js","sources":["../../../../src/components/Common/Flex/Flex.tsx"],"sourcesContent":["import style from './Flex.module.scss'\nimport {\n setResponsiveCustomProperties,\n
|
|
1
|
+
{"version":3,"file":"Flex.js","sources":["../../../../src/components/Common/Flex/Flex.tsx"],"sourcesContent":["import style from './Flex.module.scss'\nimport {\n setResponsiveCustomProperties,\n type Responsive,\n type CustomPropertyValue,\n} from '@/helpers/responsive'\n\nexport interface FlexProps {\n children: React.ReactNode\n flexDirection?: Responsive<'row' | 'column'>\n justifyContent?: Responsive<\n | 'space-between'\n | 'center'\n | 'flex-start'\n | 'flex-end'\n | 'space-around'\n | 'space-evenly'\n | 'normal'\n >\n alignItems?: Responsive<'center' | 'flex-start' | 'flex-end' | 'stretch'>\n gap?: Responsive<CustomPropertyValue>\n}\n\nexport function Flex({\n children,\n flexDirection = 'row',\n justifyContent = 'normal',\n alignItems = 'flex-start',\n gap = 24,\n}: FlexProps) {\n const properties = setResponsiveCustomProperties({\n 'flex-direction': flexDirection,\n 'justify-content': justifyContent,\n 'align-items': alignItems,\n gap,\n })\n\n return (\n <div className={style.flexContainer}>\n <div className={style.flex} style={properties}>\n {children}\n </div>\n </div>\n )\n}\n\nexport interface FlexItemProps {\n flexGrow?: number | 'initial'\n children: React.ReactNode\n}\n\nexport function FlexItem({ flexGrow = 'initial', children }: FlexItemProps) {\n return <div style={{ flexGrow: flexGrow }}>{children}</div>\n}\n"],"names":["Flex","children","flexDirection","justifyContent","alignItems","gap","properties","setResponsiveCustomProperties","jsx","style"],"mappings":";;;AAuBO,SAASA,EAAK;AAAA,EACnB,UAAAC;AAAA,EACA,eAAAC,IAAgB;AAAA,EAChB,gBAAAC,IAAiB;AAAA,EACjB,YAAAC,IAAa;AAAA,EACb,KAAAC,IAAM;AACR,GAAc;AACZ,QAAMC,IAAaC,EAA8B;AAAA,IAC/C,kBAAkBL;AAAA,IAClB,mBAAmBC;AAAA,IACnB,eAAeC;AAAA,IACf,KAAAC;AAAA,EAAA,CACD;AAED,SACE,gBAAAG,EAAC,OAAA,EAAI,WAAWC,EAAM,eACpB,UAAA,gBAAAD,EAAC,OAAA,EAAI,WAAWC,EAAM,MAAM,OAAOH,GAChC,UAAAL,GACH,GACF;AAEJ;"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import { CustomPropertyValue, Responsive
|
|
2
|
+
import { CustomPropertyValue, Responsive } from '../../../helpers/responsive';
|
|
3
3
|
type Flow = 'row' | 'column' | 'row dense' | 'column dense';
|
|
4
4
|
type Alignment = 'start' | 'end' | 'center' | 'stretch';
|
|
5
5
|
export interface GridProps {
|
|
6
6
|
children: ReactNode;
|
|
7
|
-
gap?:
|
|
7
|
+
gap?: Responsive<CustomPropertyValue>;
|
|
8
8
|
gridTemplateColumns?: Responsive<CustomPropertyValue | CustomPropertyValue[]>;
|
|
9
9
|
gridTemplateRows?: Responsive<CustomPropertyValue | CustomPropertyValue[]>;
|
|
10
10
|
gridTemplateAreas?: Responsive<string>;
|
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import c from "classnames";
|
|
3
3
|
import r from "./Grid.module.scss.js";
|
|
4
|
-
import { setResponsiveCustomProperties as g
|
|
5
|
-
function
|
|
6
|
-
children:
|
|
4
|
+
import { setResponsiveCustomProperties as g } from "../../../helpers/responsive.js";
|
|
5
|
+
function N({
|
|
6
|
+
children: e,
|
|
7
7
|
gap: s = 24,
|
|
8
8
|
gridTemplateColumns: i = ["1fr"],
|
|
9
9
|
gridTemplateRows: o,
|
|
10
10
|
gridTemplateAreas: m,
|
|
11
11
|
gridAutoFlow: a,
|
|
12
|
-
alignItems:
|
|
13
|
-
justifyItems:
|
|
14
|
-
justifyContent:
|
|
12
|
+
alignItems: l,
|
|
13
|
+
justifyItems: n,
|
|
14
|
+
justifyContent: p,
|
|
15
15
|
className: d
|
|
16
16
|
}) {
|
|
17
17
|
const f = g({
|
|
18
|
-
gap:
|
|
18
|
+
gap: s,
|
|
19
19
|
"grid-template-columns": i,
|
|
20
20
|
"grid-template-rows": o,
|
|
21
21
|
"grid-template-areas": m,
|
|
22
22
|
"grid-auto-flow": a,
|
|
23
|
-
"align-items":
|
|
24
|
-
"justify-items":
|
|
25
|
-
"justify-content":
|
|
23
|
+
"align-items": l,
|
|
24
|
+
"justify-items": n,
|
|
25
|
+
"justify-content": p
|
|
26
26
|
});
|
|
27
|
-
return /* @__PURE__ */
|
|
27
|
+
return /* @__PURE__ */ t("div", { className: c(r.gridContainer, d), children: /* @__PURE__ */ t("div", { className: r.grid, style: f, children: e }) });
|
|
28
28
|
}
|
|
29
29
|
export {
|
|
30
|
-
|
|
30
|
+
N as Grid
|
|
31
31
|
};
|
|
32
32
|
//# sourceMappingURL=Grid.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Grid.js","sources":["../../../../src/components/Common/Grid/Grid.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\nimport cn from 'classnames'\nimport styles from './Grid.module.scss'\nimport {\n setResponsiveCustomProperties,\n
|
|
1
|
+
{"version":3,"file":"Grid.js","sources":["../../../../src/components/Common/Grid/Grid.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\nimport cn from 'classnames'\nimport styles from './Grid.module.scss'\nimport {\n setResponsiveCustomProperties,\n type CustomPropertyValue,\n type Responsive,\n} from '@/helpers/responsive'\n\ntype Flow = 'row' | 'column' | 'row dense' | 'column dense'\ntype Alignment = 'start' | 'end' | 'center' | 'stretch'\n\nexport interface GridProps {\n children: ReactNode\n gap?: Responsive<CustomPropertyValue>\n gridTemplateColumns?: Responsive<CustomPropertyValue | CustomPropertyValue[]>\n gridTemplateRows?: Responsive<CustomPropertyValue | CustomPropertyValue[]>\n gridTemplateAreas?: Responsive<string>\n gridAutoFlow?: Responsive<Flow>\n alignItems?: Responsive<Alignment>\n justifyItems?: Responsive<Alignment>\n justifyContent?: Responsive<\n 'start' | 'end' | 'center' | 'stretch' | 'space-between' | 'space-around' | 'space-evenly'\n >\n className?: string\n}\n\nexport function Grid({\n children,\n gap = 24,\n gridTemplateColumns = ['1fr'],\n gridTemplateRows,\n gridTemplateAreas,\n gridAutoFlow,\n alignItems,\n justifyItems,\n justifyContent,\n className,\n}: GridProps) {\n const properties = setResponsiveCustomProperties({\n gap,\n 'grid-template-columns': gridTemplateColumns,\n 'grid-template-rows': gridTemplateRows,\n 'grid-template-areas': gridTemplateAreas,\n 'grid-auto-flow': gridAutoFlow,\n 'align-items': alignItems,\n 'justify-items': justifyItems,\n 'justify-content': justifyContent,\n })\n\n return (\n <div className={cn(styles.gridContainer, className)}>\n <div className={styles.grid} style={properties}>\n {children}\n </div>\n </div>\n )\n}\n"],"names":["Grid","children","gap","gridTemplateColumns","gridTemplateRows","gridTemplateAreas","gridAutoFlow","alignItems","justifyItems","justifyContent","className","properties","setResponsiveCustomProperties","cn","styles","jsx"],"mappings":";;;;AA2BO,SAASA,EAAK;AAAA,EACnB,UAAAC;AAAA,EACA,KAAAC,IAAM;AAAA,EACN,qBAAAC,IAAsB,CAAC,KAAK;AAAA,EAC5B,kBAAAC;AAAA,EACA,mBAAAC;AAAA,EACA,cAAAC;AAAA,EACA,YAAAC;AAAA,EACA,cAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,WAAAC;AACF,GAAc;AACZ,QAAMC,IAAaC,EAA8B;AAAA,IAC/C,KAAAV;AAAA,IACA,yBAAyBC;AAAA,IACzB,sBAAsBC;AAAA,IACtB,uBAAuBC;AAAA,IACvB,kBAAkBC;AAAA,IAClB,eAAeC;AAAA,IACf,iBAAiBC;AAAA,IACjB,mBAAmBC;AAAA,EAAA,CACpB;AAED,2BACG,OAAA,EAAI,WAAWI,EAAGC,EAAO,eAAeJ,CAAS,GAChD,UAAA,gBAAAK,EAAC,OAAA,EAAI,WAAWD,EAAO,MAAM,OAAOH,GACjC,UAAAV,GACH,GACF;AAEJ;"}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
const i = "
|
|
1
|
+
const i = "_root_1lhin_1", e = "_withoutVisibleLabel_1lhin_9", l = "_withOnlyChildren_1lhin_12", n = "_children_1lhin_18", t = "_label_1lhin_25", o = "_description_1lhin_36", s = "_errorMessage_1lhin_40", r = {
|
|
2
2
|
root: i,
|
|
3
3
|
withoutVisibleLabel: e,
|
|
4
|
-
withOnlyChildren:
|
|
5
|
-
children:
|
|
6
|
-
label:
|
|
7
|
-
description:
|
|
8
|
-
errorMessage:
|
|
4
|
+
withOnlyChildren: l,
|
|
5
|
+
children: n,
|
|
6
|
+
label: t,
|
|
7
|
+
description: o,
|
|
8
|
+
errorMessage: s
|
|
9
9
|
};
|
|
10
10
|
export {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
n as children,
|
|
12
|
+
r as default,
|
|
13
|
+
o as description,
|
|
14
|
+
s as errorMessage,
|
|
15
|
+
t as label,
|
|
16
16
|
i as root,
|
|
17
|
-
|
|
17
|
+
l as withOnlyChildren,
|
|
18
18
|
e as withoutVisibleLabel
|
|
19
19
|
};
|
|
20
20
|
//# sourceMappingURL=HorizontalFieldLayout.module.scss.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const r = "
|
|
1
|
+
const r = "_internalErrorCardTitle_nf5ok_1", e = "_internalErrorCard_nf5ok_1", n = "_errorMessage_nf5ok_19", a = {
|
|
2
2
|
internalErrorCardTitle: r,
|
|
3
3
|
internalErrorCard: e,
|
|
4
4
|
errorMessage: n
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const o = "
|
|
1
|
+
const o = "_paginationControl_1g8dg_1", n = "_paginationControlCount_1g8dg_6", t = "_paginationControlButtons_1g8dg_11", a = {
|
|
2
2
|
paginationControl: o,
|
|
3
3
|
paginationControlCount: n,
|
|
4
4
|
paginationControlButtons: t
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
const e = "
|
|
1
|
+
const e = "_reorderableList_q2syr_1", r = "_disabled_q2syr_10", o = "_reorderableItem_q2syr_10", n = "_contentContainer_q2syr_16", t = "_dragging_q2syr_37", s = "_reordering_q2syr_40", d = "_dragHandle_q2syr_45", _ = "_dropZoneContainer_q2syr_71", i = "_dropZone_q2syr_71", a = "_isHighlighted_q2syr_89", g = "_activeDropZone_q2syr_89", c = {
|
|
2
2
|
reorderableList: e,
|
|
3
|
-
disabled:
|
|
4
|
-
reorderableItem:
|
|
3
|
+
disabled: r,
|
|
4
|
+
reorderableItem: o,
|
|
5
5
|
contentContainer: n,
|
|
6
6
|
dragging: t,
|
|
7
|
-
reordering:
|
|
8
|
-
dragHandle:
|
|
9
|
-
dropZoneContainer:
|
|
10
|
-
dropZone:
|
|
11
|
-
isHighlighted:
|
|
7
|
+
reordering: s,
|
|
8
|
+
dragHandle: d,
|
|
9
|
+
dropZoneContainer: _,
|
|
10
|
+
dropZone: i,
|
|
11
|
+
isHighlighted: a,
|
|
12
12
|
activeDropZone: g
|
|
13
13
|
};
|
|
14
14
|
export {
|
|
15
15
|
g as activeDropZone,
|
|
16
16
|
n as contentContainer,
|
|
17
17
|
c as default,
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
r as disabled,
|
|
19
|
+
d as dragHandle,
|
|
20
20
|
t as dragging,
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
i as dropZone,
|
|
22
|
+
_ as dropZoneContainer,
|
|
23
|
+
a as isHighlighted,
|
|
24
|
+
o as reorderableItem,
|
|
25
25
|
e as reorderableList,
|
|
26
|
-
|
|
26
|
+
s as reordering
|
|
27
27
|
};
|
|
28
28
|
//# sourceMappingURL=ReorderableList.module.scss.js.map
|