@gusto/embedded-react-sdk 0.13.3 → 0.13.4
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 +6 -0
- package/dist/assets/icons/hamburger.svg.js +5 -5
- package/dist/assets/icons/hamburger.svg.js.map +1 -1
- package/dist/assets/icons/receipt-check.svg.js +10 -0
- package/dist/assets/icons/receipt-check.svg.js.map +1 -0
- package/dist/components/Common/DataView/DataTable/DataTable.js +29 -28
- package/dist/components/Common/DataView/DataTable/DataTable.js.map +1 -1
- package/dist/components/Common/DocumentViewer/DocumentViewer.d.ts +1 -1
- package/dist/components/Common/DocumentViewer/DocumentViewer.js +9 -9
- package/dist/components/Common/DocumentViewer/DocumentViewer.js.map +1 -1
- package/dist/components/Common/Fields/RadioGroupField/RadioGroupField.d.ts +1 -1
- package/dist/components/Common/Fields/RadioGroupField/RadioGroupField.js.map +1 -1
- package/dist/components/Common/SignatureForm/SignatureForm.js +1 -1
- package/dist/components/Common/SignatureForm/SignatureFormActions.js +1 -1
- package/dist/components/Common/SignatureForm/SignatureFormFields.js +1 -1
- package/dist/components/Common/UI/RadioGroup/RadioGroup.js +33 -31
- package/dist/components/Common/UI/RadioGroup/RadioGroup.js.map +1 -1
- package/dist/components/Common/UI/RadioGroup/RadioGroupTypes.d.ts +4 -0
- package/dist/components/Common/UI/RadioGroup/RadioGroupTypes.js.map +1 -1
- package/dist/components/Common/UI/Table/Table.js +22 -13
- package/dist/components/Common/UI/Table/Table.js.map +1 -1
- package/dist/components/Common/UI/Table/Table.module.scss.js +1 -1
- package/dist/components/Common/UI/Table/TableTypes.d.ts +5 -0
- package/dist/components/Common/UI/Table/TableTypes.js +2 -1
- package/dist/components/Common/UI/Table/TableTypes.js.map +1 -1
- package/dist/components/Common/UI/Text/Text.module.scss.js +15 -14
- package/dist/components/Common/UI/Text/Text.module.scss.js.map +1 -1
- package/dist/components/Common/UI/Text/TextTypes.d.ts +2 -2
- package/dist/components/Common/UI/Text/TextTypes.js.map +1 -1
- package/dist/components/Company/AssignSignatory/AssignSignatory.js +6 -7
- package/dist/components/Company/AssignSignatory/AssignSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js +3 -2
- package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js +3 -2
- package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js +2 -3
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js +13 -14
- package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js +3 -2
- package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js +5 -6
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +10 -11
- package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccount.js +25 -21
- package/dist/components/Company/BankAccount/BankAccount.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/Actions.js +6 -6
- package/dist/components/Company/BankAccount/BankAccountForm/Form.js +9 -8
- package/dist/components/Company/BankAccount/BankAccountForm/Form.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountList/Actions.js +9 -8
- package/dist/components/Company/BankAccount/BankAccountList/Actions.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js +8 -7
- package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountVerify/Form.js +5 -4
- package/dist/components/Company/BankAccount/BankAccountVerify/Form.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/Actions.js +3 -2
- package/dist/components/Company/DocumentSigner/DocumentList/Actions.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js +34 -35
- package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
- package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +6 -7
- package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Company/FederalTaxes/Actions.js +6 -5
- package/dist/components/Company/FederalTaxes/Actions.js.map +1 -1
- package/dist/components/Company/FederalTaxes/FederalTaxes.js +12 -13
- package/dist/components/Company/FederalTaxes/FederalTaxes.js.map +1 -1
- package/dist/components/Company/FederalTaxes/Form.js +4 -3
- package/dist/components/Company/FederalTaxes/Form.js.map +1 -1
- package/dist/components/Company/Industry/Actions.js +3 -2
- package/dist/components/Company/Industry/Actions.js.map +1 -1
- package/dist/components/Company/Industry/Edit.js +5 -4
- package/dist/components/Company/Industry/Edit.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/Actions.js +7 -6
- package/dist/components/Company/Locations/LocationForm/Actions.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/Form.js +5 -6
- package/dist/components/Company/Locations/LocationForm/Form.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/LocationForm.js +10 -11
- package/dist/components/Company/Locations/LocationForm/LocationForm.js.map +1 -1
- package/dist/components/Company/Locations/Locations.js +21 -17
- package/dist/components/Company/Locations/Locations.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/Actions.js +7 -6
- package/dist/components/Company/Locations/LocationsList/Actions.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/List.js +16 -16
- package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/LocationsList.js +6 -7
- package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
- package/dist/components/Company/OnboardingFlow/OnboardingFlow.js +21 -17
- package/dist/components/Company/OnboardingFlow/OnboardingFlow.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/Completed.js +11 -10
- package/dist/components/Company/OnboardingOverview/Completed.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/MissingRequirements.js +7 -6
- 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/PaySchedule/PaySchedule.js +33 -34
- package/dist/components/Company/PaySchedule/PaySchedule.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/Actions.js +10 -9
- package/dist/components/Company/PaySchedule/_parts/Actions.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/Edit.js +16 -17
- package/dist/components/Company/PaySchedule/_parts/Edit.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/Head.js +7 -6
- package/dist/components/Company/PaySchedule/_parts/Head.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/List.js +12 -11
- package/dist/components/Company/PaySchedule/_parts/List.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxes.js +20 -16
- package/dist/components/Company/StateTaxes/StateTaxes.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js +3 -2
- package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js +3 -2
- package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/List.js +3 -2
- package/dist/components/Company/StateTaxes/StateTaxesList/List.js.map +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 +3 -4
- package/dist/components/Contractor/Address/Form.js.map +1 -1
- package/dist/components/Contractor/ContractorList/index.js +17 -17
- package/dist/components/Contractor/OnboardingFlow/OnboardingFlow.js +25 -21
- package/dist/components/Contractor/OnboardingFlow/OnboardingFlow.js.map +1 -1
- package/dist/components/Contractor/PaymentMethod/BankAccountForm.js +6 -5
- package/dist/components/Contractor/PaymentMethod/BankAccountForm.js.map +1 -1
- package/dist/components/Contractor/Profile/ContractorProfileForm.js +13 -13
- package/dist/components/Contractor/Submit/Submit.js +1 -1
- package/dist/components/Employee/Compensation/Actions.js +1 -1
- package/dist/components/Employee/Compensation/Edit.js +12 -12
- package/dist/components/Employee/Compensation/List.js +23 -22
- package/dist/components/Employee/Compensation/List.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsComponents.js +1 -1
- package/dist/components/Employee/Deductions/DeductionsComponents.js.map +1 -1
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.d.ts +55 -0
- package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js +221 -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 +42 -0
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js +132 -0
- package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js.map +1 -0
- package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js +8 -8
- 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/DeductionsForm/UNSTABLE_DeductionsForm.d.ts +7 -0
- package/dist/components/Employee/Deductions/DeductionsForm/UNSTABLE_DeductionsForm.js +98 -0
- package/dist/components/Employee/Deductions/DeductionsForm/UNSTABLE_DeductionsForm.js.map +1 -0
- package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js +1 -1
- package/dist/components/Employee/Deductions/IncludeDeductionsForm/IncludeDeductionsForm.js +8 -8
- package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js +7 -6
- package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js +7 -8
- package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentList/List.js +3 -2
- package/dist/components/Employee/DocumentSigner/DocumentList/List.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/DocumentSigner.js +19 -15
- package/dist/components/Employee/DocumentSigner/DocumentSigner.js.map +1 -1
- package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js +9 -10
- package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
- package/dist/components/Employee/EmployeeList/Actions.js +3 -2
- package/dist/components/Employee/EmployeeList/Actions.js.map +1 -1
- package/dist/components/Employee/EmployeeList/EmployeeList.js +4 -3
- package/dist/components/Employee/EmployeeList/EmployeeList.js.map +1 -1
- package/dist/components/Employee/EmployeeList/Head.js +6 -5
- package/dist/components/Employee/EmployeeList/Head.js.map +1 -1
- package/dist/components/Employee/EmployeeList/List.js +12 -12
- package/dist/components/Employee/FederalTaxes/Actions.js +7 -6
- package/dist/components/Employee/FederalTaxes/Actions.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/FederalForm.js +12 -11
- package/dist/components/Employee/FederalTaxes/FederalForm.js.map +1 -1
- package/dist/components/Employee/Landing/Landing.js +8 -8
- package/dist/components/Employee/OnboardingFlow/OnboardingFlow.js +24 -20
- package/dist/components/Employee/OnboardingFlow/OnboardingFlow.js.map +1 -1
- package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +7 -7
- package/dist/components/Employee/PaymentMethod/Actions.js +6 -5
- package/dist/components/Employee/PaymentMethod/Actions.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/BankAccountEdit.js +1 -1
- package/dist/components/Employee/PaymentMethod/BankAccountsList.js +9 -8
- package/dist/components/Employee/PaymentMethod/BankAccountsList.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/Split.js +8 -8
- package/dist/components/Employee/Profile/Actions.js +7 -6
- package/dist/components/Employee/Profile/Actions.js.map +1 -1
- package/dist/components/Employee/Profile/HomeAddress.js +5 -6
- package/dist/components/Employee/Profile/HomeAddress.js.map +1 -1
- package/dist/components/Employee/Profile/PersonalDetailsInputs.js +21 -22
- package/dist/components/Employee/Profile/PersonalDetailsInputs.js.map +1 -1
- package/dist/components/Employee/Profile/Profile.d.ts +1 -0
- package/dist/components/Employee/Profile/Profile.js +22 -22
- package/dist/components/Employee/Profile/Profile.js.map +1 -1
- package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingFlow.js +17 -13
- package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingFlow.js.map +1 -1
- package/dist/components/Employee/StateTaxes/Actions.js +8 -7
- package/dist/components/Employee/StateTaxes/Actions.js.map +1 -1
- package/dist/components/Employee/Taxes/Actions.js +9 -8
- package/dist/components/Employee/Taxes/Actions.js.map +1 -1
- package/dist/components/Employee/Taxes/FederalForm.js +13 -12
- package/dist/components/Employee/Taxes/FederalForm.js.map +1 -1
- package/dist/components/Payroll/PayrollBlocker/PayrollBlockerAlerts.d.ts +7 -0
- package/dist/components/Payroll/PayrollBlocker/PayrollBlockerList.d.ts +6 -0
- package/dist/components/Payroll/PayrollBlocker/PayrollBlockerTypes.d.ts +101 -0
- package/dist/components/Payroll/PayrollBlocker/index.d.ts +4 -0
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js +64 -56
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js +2 -3
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +65 -66
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js +9 -8
- package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js.map +1 -1
- package/dist/components/Payroll/PayrollFlow/PayrollFlow.d.ts +2 -0
- package/dist/components/Payroll/PayrollFlow/PayrollFlow.js +26 -0
- package/dist/components/Payroll/PayrollFlow/PayrollFlow.js.map +1 -0
- package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.d.ts +25 -0
- package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.js +59 -0
- package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.js.map +1 -0
- package/dist/components/Payroll/PayrollFlow/index.d.ts +3 -0
- package/dist/components/Payroll/PayrollFlow/payrollStateMachine.d.ts +7 -0
- package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js +116 -0
- package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js.map +1 -0
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js +3 -2
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +7 -6
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.d.ts +3 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.js +60 -52
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.d.ts +3 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +97 -96
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollReceipts/PayrollReceipts.d.ts +7 -0
- package/dist/components/Payroll/PayrollReceipts/PayrollReceipts.js +21 -0
- package/dist/components/Payroll/PayrollReceipts/PayrollReceipts.js.map +1 -0
- package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js +220 -0
- package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js.map +1 -0
- package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.module.scss.js +28 -0
- package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.module.scss.js.map +1 -0
- package/dist/components/Payroll/RunPayrollFlow/RunPayroll.js +46 -37
- package/dist/components/Payroll/RunPayrollFlow/RunPayroll.js.map +1 -1
- package/dist/components/Payroll/index.d.ts +2 -0
- package/dist/components/Payroll/index.js +12 -8
- package/dist/components/Payroll/index.js.map +1 -1
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +3 -2
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
- package/dist/contexts/ThemeProvider/theme.d.ts +1 -0
- package/dist/contexts/ThemeProvider/theme.js +2 -1
- package/dist/contexts/ThemeProvider/theme.js.map +1 -1
- package/dist/i18n/I18n.js +1 -1
- package/dist/i18n/I18n.js.map +1 -1
- package/dist/i18n/en/Employee.Deductions.json.js +126 -66
- package/dist/i18n/en/Employee.Deductions.json.js.map +1 -1
- package/dist/i18n/en/Payroll.PayrollConfiguration.json.js +15 -15
- package/dist/i18n/en/Payroll.PayrollOverview.json.js +8 -8
- package/dist/i18n/en/PayrollBlocker.json.js +18 -0
- package/dist/i18n/en/PayrollBlocker.json.js.map +1 -0
- package/dist/shared/constants.d.ts +12 -4
- package/dist/shared/constants.js +37 -33
- package/dist/shared/constants.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/i18next.d.ts +40 -2
- package/package.json +8 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as e from "react";
|
|
2
|
-
const
|
|
2
|
+
const n = ({
|
|
3
3
|
title: t,
|
|
4
|
-
titleId:
|
|
5
|
-
...
|
|
6
|
-
}) => /* @__PURE__ */ e.createElement("svg", {
|
|
4
|
+
titleId: r,
|
|
5
|
+
...o
|
|
6
|
+
}) => /* @__PURE__ */ e.createElement("svg", { width: 20, height: 20, viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-labelledby": r, ...o }, t ? /* @__PURE__ */ e.createElement("title", { id: r }, t) : null, /* @__PURE__ */ e.createElement("path", { d: "M9.99996 10.8333C10.4602 10.8333 10.8333 10.4602 10.8333 9.99999C10.8333 9.53976 10.4602 9.16666 9.99996 9.16666C9.53972 9.16666 9.16663 9.53976 9.16663 9.99999C9.16663 10.4602 9.53972 10.8333 9.99996 10.8333Z", stroke: "#535862", strokeWidth: 1.66667, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ e.createElement("path", { d: "M9.99996 4.99999C10.4602 4.99999 10.8333 4.6269 10.8333 4.16666C10.8333 3.70642 10.4602 3.33333 9.99996 3.33333C9.53972 3.33333 9.16663 3.70642 9.16663 4.16666C9.16663 4.6269 9.53972 4.99999 9.99996 4.99999Z", stroke: "#535862", strokeWidth: 1.66667, strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ e.createElement("path", { d: "M9.99996 16.6667C10.4602 16.6667 10.8333 16.2936 10.8333 15.8333C10.8333 15.3731 10.4602 15 9.99996 15C9.53972 15 9.16663 15.3731 9.16663 15.8333C9.16663 16.2936 9.53972 16.6667 9.99996 16.6667Z", stroke: "#535862", strokeWidth: 1.66667, strokeLinecap: "round", strokeLinejoin: "round" }));
|
|
7
7
|
export {
|
|
8
|
-
|
|
8
|
+
n as default
|
|
9
9
|
};
|
|
10
10
|
//# sourceMappingURL=hamburger.svg.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hamburger.svg.js","sources":["../../../src/assets/icons/hamburger.svg?react"],"sourcesContent":["import * as React from \"react\";\nconst SvgHamburger = ({\n title,\n titleId,\n ...props\n}) => /* @__PURE__ */ React.createElement(\"svg\", {
|
|
1
|
+
{"version":3,"file":"hamburger.svg.js","sources":["../../../src/assets/icons/hamburger.svg?react"],"sourcesContent":["import * as React from \"react\";\nconst SvgHamburger = ({\n title,\n titleId,\n ...props\n}) => /* @__PURE__ */ React.createElement(\"svg\", { width: 20, height: 20, viewBox: \"0 0 20 20\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\", \"aria-labelledby\": titleId, ...props }, title ? /* @__PURE__ */ React.createElement(\"title\", { id: titleId }, title) : null, /* @__PURE__ */ React.createElement(\"path\", { d: \"M9.99996 10.8333C10.4602 10.8333 10.8333 10.4602 10.8333 9.99999C10.8333 9.53976 10.4602 9.16666 9.99996 9.16666C9.53972 9.16666 9.16663 9.53976 9.16663 9.99999C9.16663 10.4602 9.53972 10.8333 9.99996 10.8333Z\", stroke: \"#535862\", strokeWidth: 1.66667, strokeLinecap: \"round\", strokeLinejoin: \"round\" }), /* @__PURE__ */ React.createElement(\"path\", { d: \"M9.99996 4.99999C10.4602 4.99999 10.8333 4.6269 10.8333 4.16666C10.8333 3.70642 10.4602 3.33333 9.99996 3.33333C9.53972 3.33333 9.16663 3.70642 9.16663 4.16666C9.16663 4.6269 9.53972 4.99999 9.99996 4.99999Z\", stroke: \"#535862\", strokeWidth: 1.66667, strokeLinecap: \"round\", strokeLinejoin: \"round\" }), /* @__PURE__ */ React.createElement(\"path\", { d: \"M9.99996 16.6667C10.4602 16.6667 10.8333 16.2936 10.8333 15.8333C10.8333 15.3731 10.4602 15 9.99996 15C9.53972 15 9.16663 15.3731 9.16663 15.8333C9.16663 16.2936 9.53972 16.6667 9.99996 16.6667Z\", stroke: \"#535862\", strokeWidth: 1.66667, strokeLinecap: \"round\", strokeLinejoin: \"round\" }));\nexport default SvgHamburger;\n"],"names":["SvgHamburger","title","titleId","props","React"],"mappings":";AACK,MAACA,IAAe,CAAC;AAAA,EACpB,OAAAC;AAAA,EACA,SAAAC;AAAA,EACA,GAAGC;AACL,MAAsB,gBAAAC,EAAM,cAAc,OAAO,EAAE,OAAO,IAAI,QAAQ,IAAI,SAAS,aAAa,MAAM,QAAQ,OAAO,8BAA8B,mBAAmBF,GAAS,GAAGC,EAAK,GAAIF,IAAwB,gBAAAG,EAAM,cAAc,SAAS,EAAE,IAAIF,EAAO,GAAID,CAAK,IAAI,MAAsB,gBAAAG,EAAM,cAAc,QAAQ,EAAE,GAAG,qNAAqN,QAAQ,WAAW,aAAa,SAAS,eAAe,SAAS,gBAAgB,QAAO,CAAE,GAAmB,gBAAAA,EAAM,cAAc,QAAQ,EAAE,GAAG,mNAAmN,QAAQ,WAAW,aAAa,SAAS,eAAe,SAAS,gBAAgB,QAAO,CAAE,GAAmB,gBAAAA,EAAM,cAAc,QAAQ,EAAE,GAAG,sMAAsM,QAAQ,WAAW,aAAa,SAAS,eAAe,SAAS,gBAAgB,SAAS,CAAC;"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as e from "react";
|
|
2
|
+
const n = ({
|
|
3
|
+
title: t,
|
|
4
|
+
titleId: r,
|
|
5
|
+
...o
|
|
6
|
+
}) => /* @__PURE__ */ e.createElement("svg", { width: 42, height: 42, viewBox: "0 0 42 42", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-labelledby": r, ...o }, t ? /* @__PURE__ */ e.createElement("title", { id: r }, t) : null, /* @__PURE__ */ e.createElement("path", { d: "M15.75 18.375L19.25 21.875L27.125 14M35 36.75V13.65C35 10.7097 35 9.23959 34.4278 8.11655C33.9245 7.1287 33.1213 6.32555 32.1335 5.82222C31.0104 5.25 29.5403 5.25 26.6 5.25H15.4C12.4597 5.25 10.9896 5.25 9.86655 5.82222C8.8787 6.32555 8.07555 7.1287 7.57222 8.11655C7 9.23959 7 10.7097 7 13.65V36.75L11.8125 33.25L16.1875 36.75L21 33.25L25.8125 36.75L30.1875 33.25L35 36.75Z", stroke: "currentColor", strokeWidth: 3, strokeLinecap: "round", strokeLinejoin: "round" }));
|
|
7
|
+
export {
|
|
8
|
+
n as default
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=receipt-check.svg.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"receipt-check.svg.js","sources":["../../../src/assets/icons/receipt-check.svg?react"],"sourcesContent":["import * as React from \"react\";\nconst SvgReceiptCheck = ({\n title,\n titleId,\n ...props\n}) => /* @__PURE__ */ React.createElement(\"svg\", { width: 42, height: 42, viewBox: \"0 0 42 42\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\", \"aria-labelledby\": titleId, ...props }, title ? /* @__PURE__ */ React.createElement(\"title\", { id: titleId }, title) : null, /* @__PURE__ */ React.createElement(\"path\", { d: \"M15.75 18.375L19.25 21.875L27.125 14M35 36.75V13.65C35 10.7097 35 9.23959 34.4278 8.11655C33.9245 7.1287 33.1213 6.32555 32.1335 5.82222C31.0104 5.25 29.5403 5.25 26.6 5.25H15.4C12.4597 5.25 10.9896 5.25 9.86655 5.82222C8.8787 6.32555 8.07555 7.1287 7.57222 8.11655C7 9.23959 7 10.7097 7 13.65V36.75L11.8125 33.25L16.1875 36.75L21 33.25L25.8125 36.75L30.1875 33.25L35 36.75Z\", stroke: \"currentColor\", strokeWidth: 3, strokeLinecap: \"round\", strokeLinejoin: \"round\" }));\nexport default SvgReceiptCheck;\n"],"names":["SvgReceiptCheck","title","titleId","props","React"],"mappings":";AACK,MAACA,IAAkB,CAAC;AAAA,EACvB,OAAAC;AAAA,EACA,SAAAC;AAAA,EACA,GAAGC;AACL,MAAsB,gBAAAC,EAAM,cAAc,OAAO,EAAE,OAAO,IAAI,QAAQ,IAAI,SAAS,aAAa,MAAM,QAAQ,OAAO,8BAA8B,mBAAmBF,GAAS,GAAGC,EAAK,GAAIF,IAAwB,gBAAAG,EAAM,cAAc,SAAS,EAAE,IAAIF,KAAWD,CAAK,IAAI,MAAsB,gBAAAG,EAAM,cAAc,QAAQ,EAAE,GAAG,0XAA0X,QAAQ,gBAAgB,aAAa,GAAG,eAAe,SAAS,gBAAgB,SAAS,CAAC;"}
|
|
@@ -1,55 +1,55 @@
|
|
|
1
1
|
import { jsx as l } from "react/jsx-runtime";
|
|
2
2
|
import { useTranslation as g } from "react-i18next";
|
|
3
3
|
import { useComponentContext as D } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
4
|
-
import { VisuallyHidden as
|
|
5
|
-
function
|
|
4
|
+
import { VisuallyHidden as h } from "../../VisuallyHidden/VisuallyHidden.js";
|
|
5
|
+
function m(s, r) {
|
|
6
6
|
if (r.render)
|
|
7
|
-
return r.render(
|
|
7
|
+
return r.render(s);
|
|
8
8
|
if (r.key) {
|
|
9
9
|
const n = r.key;
|
|
10
|
-
return String(
|
|
10
|
+
return String(s[n] ?? "");
|
|
11
11
|
}
|
|
12
12
|
return "";
|
|
13
13
|
}
|
|
14
14
|
const F = ({
|
|
15
|
-
label:
|
|
15
|
+
label: s,
|
|
16
16
|
data: r,
|
|
17
17
|
columns: n,
|
|
18
|
-
itemMenu:
|
|
19
|
-
onSelect:
|
|
20
|
-
emptyState:
|
|
21
|
-
footer:
|
|
22
|
-
variant:
|
|
18
|
+
itemMenu: c,
|
|
19
|
+
onSelect: a,
|
|
20
|
+
emptyState: d,
|
|
21
|
+
footer: f,
|
|
22
|
+
variant: b
|
|
23
23
|
}) => {
|
|
24
|
-
const p = D(), { t:
|
|
25
|
-
...
|
|
24
|
+
const p = D(), { t: k } = g("common"), u = [
|
|
25
|
+
...a ? [
|
|
26
26
|
{
|
|
27
27
|
key: "select-header",
|
|
28
|
-
content: /* @__PURE__ */ l(
|
|
28
|
+
content: /* @__PURE__ */ l(h, { children: k("table.selectRowHeader") })
|
|
29
29
|
}
|
|
30
30
|
] : [],
|
|
31
31
|
...n.map((t, e) => ({
|
|
32
32
|
key: typeof t.key == "string" ? t.key : `header-${e}`,
|
|
33
33
|
content: t.title
|
|
34
34
|
})),
|
|
35
|
-
...
|
|
35
|
+
...c ? [
|
|
36
36
|
{
|
|
37
37
|
key: "actions-header",
|
|
38
|
-
content: /* @__PURE__ */ l(
|
|
38
|
+
content: /* @__PURE__ */ l(h, { children: k("table.actionsColumnHeader") })
|
|
39
39
|
}
|
|
40
40
|
] : []
|
|
41
41
|
], C = r.map((t, e) => {
|
|
42
42
|
const i = [
|
|
43
|
-
...
|
|
43
|
+
...a ? [
|
|
44
44
|
{
|
|
45
45
|
key: `select-${e}`,
|
|
46
46
|
content: /* @__PURE__ */ l(
|
|
47
47
|
p.Checkbox,
|
|
48
48
|
{
|
|
49
49
|
onChange: (o) => {
|
|
50
|
-
|
|
50
|
+
a(t, o);
|
|
51
51
|
},
|
|
52
|
-
label:
|
|
52
|
+
label: k("table.selectRowLabel"),
|
|
53
53
|
shouldVisuallyHideLabel: !0
|
|
54
54
|
}
|
|
55
55
|
)
|
|
@@ -57,12 +57,12 @@ const F = ({
|
|
|
57
57
|
] : [],
|
|
58
58
|
...n.map((o, y) => ({
|
|
59
59
|
key: typeof o.key == "string" ? o.key : `cell-${y}`,
|
|
60
|
-
content:
|
|
60
|
+
content: m(t, o)
|
|
61
61
|
})),
|
|
62
|
-
...
|
|
62
|
+
...c ? [
|
|
63
63
|
{
|
|
64
64
|
key: `menu-${e}`,
|
|
65
|
-
content:
|
|
65
|
+
content: c(t)
|
|
66
66
|
}
|
|
67
67
|
] : []
|
|
68
68
|
];
|
|
@@ -71,9 +71,9 @@ const F = ({
|
|
|
71
71
|
data: i
|
|
72
72
|
};
|
|
73
73
|
}), $ = (() => {
|
|
74
|
-
if (!
|
|
75
|
-
const t =
|
|
76
|
-
return
|
|
74
|
+
if (!f) return;
|
|
75
|
+
const t = f(), e = [];
|
|
76
|
+
return a && e.push({
|
|
77
77
|
key: "footer-select",
|
|
78
78
|
content: ""
|
|
79
79
|
}), n.forEach((i, o) => {
|
|
@@ -82,7 +82,7 @@ const F = ({
|
|
|
82
82
|
key: `footer-${y}`,
|
|
83
83
|
content: t[y] || ""
|
|
84
84
|
});
|
|
85
|
-
}),
|
|
85
|
+
}), c && e.push({
|
|
86
86
|
key: "footer-actions",
|
|
87
87
|
content: ""
|
|
88
88
|
}), e;
|
|
@@ -90,13 +90,14 @@ const F = ({
|
|
|
90
90
|
return /* @__PURE__ */ l(
|
|
91
91
|
p.Table,
|
|
92
92
|
{
|
|
93
|
-
"aria-label":
|
|
93
|
+
"aria-label": s,
|
|
94
94
|
"data-testid": "data-table",
|
|
95
95
|
headers: u,
|
|
96
96
|
rows: C,
|
|
97
97
|
footer: $,
|
|
98
|
-
emptyState:
|
|
99
|
-
variant:
|
|
98
|
+
emptyState: d ? d() : void 0,
|
|
99
|
+
variant: b,
|
|
100
|
+
hasCheckboxColumn: !!a
|
|
100
101
|
}
|
|
101
102
|
);
|
|
102
103
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataTable.js","sources":["../../../../../src/components/Common/DataView/DataTable/DataTable.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport type { useDataViewPropReturn } from '../useDataView'\nimport type { TableData, TableRow, TableProps } from '../../UI/Table/TableTypes'\nimport { VisuallyHidden } from '../../VisuallyHidden'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport type DataTableProps<T> = {\n label: string\n columns: useDataViewPropReturn<T>['columns']\n data: useDataViewPropReturn<T>['data']\n itemMenu?: useDataViewPropReturn<T>['itemMenu']\n onSelect?: useDataViewPropReturn<T>['onSelect']\n emptyState?: useDataViewPropReturn<T>['emptyState']\n footer?: useDataViewPropReturn<T>['footer']\n variant?: TableProps['variant']\n}\n\nfunction getCellContent<T>(\n item: T,\n column: { key?: string | keyof T; render?: (item: T) => React.ReactNode },\n) {\n if (column.render) {\n return column.render(item)\n }\n\n if (column.key) {\n const key = column.key as keyof T\n return String(item[key] ?? '')\n }\n\n return ''\n}\n\nexport const DataTable = <T,>({\n label,\n data,\n columns,\n itemMenu,\n onSelect,\n emptyState,\n footer,\n variant,\n}: DataTableProps<T>) => {\n const Components = useComponentContext()\n const { t } = useTranslation('common')\n\n const headers: TableData[] = [\n ...(onSelect\n ? [\n {\n key: 'select-header',\n content: <VisuallyHidden>{t('table.selectRowHeader')}</VisuallyHidden>,\n },\n ]\n : []),\n ...columns.map((column, index) => ({\n key: typeof column.key === 'string' ? column.key : `header-${index}`,\n content: column.title,\n })),\n ...(itemMenu\n ? [\n {\n key: 'actions-header',\n content: <VisuallyHidden>{t('table.actionsColumnHeader')}</VisuallyHidden>,\n },\n ]\n : []),\n ]\n\n const rows: TableRow[] = data.map((item, rowIndex) => {\n const rowData: TableData[] = [\n ...(onSelect\n ? [\n {\n key: `select-${rowIndex}`,\n content: (\n <Components.Checkbox\n onChange={(checked: boolean) => {\n onSelect(item, checked)\n }}\n label={t('table.selectRowLabel')}\n shouldVisuallyHideLabel\n />\n ),\n },\n ]\n : []),\n ...columns.map((column, colIndex) => {\n return {\n key: typeof column.key === 'string' ? column.key : `cell-${colIndex}`,\n content: getCellContent(item, column),\n }\n }),\n ...(itemMenu\n ? [\n {\n key: `menu-${rowIndex}`,\n content: itemMenu(item),\n },\n ]\n : []),\n ]\n\n return {\n key: `row-${rowIndex}`,\n data: rowData,\n }\n })\n\n const buildFooterData = () => {\n if (!footer) return undefined\n\n const footerContent = footer()\n const footerCells: TableData[] = []\n\n // Add select column footer (empty)\n if (onSelect) {\n footerCells.push({\n key: 'footer-select',\n content: '',\n })\n }\n\n // Add data column footers\n columns.forEach((column, index) => {\n const columnKey = typeof column.key === 'string' ? column.key : `column-${index}`\n footerCells.push({\n key: `footer-${columnKey}`,\n content: footerContent[columnKey] || '',\n })\n })\n\n // Add actions column footer (empty)\n if (itemMenu) {\n footerCells.push({\n key: 'footer-actions',\n content: '',\n })\n }\n\n return footerCells\n }\n\n const footerData = buildFooterData()\n\n return (\n <Components.Table\n aria-label={label}\n data-testid=\"data-table\"\n headers={headers}\n rows={rows}\n footer={footerData}\n emptyState={emptyState ? emptyState() : undefined}\n variant={variant}\n />\n )\n}\n"],"names":["getCellContent","item","column","key","DataTable","label","data","columns","itemMenu","onSelect","emptyState","footer","variant","Components","useComponentContext","t","useTranslation","headers","jsx","VisuallyHidden","index","rows","rowIndex","rowData","checked","colIndex","footerData","footerContent","footerCells","columnKey"],"mappings":"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
|
|
1
|
+
{"version":3,"file":"DataTable.js","sources":["../../../../../src/components/Common/DataView/DataTable/DataTable.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport type { useDataViewPropReturn } from '../useDataView'\nimport type { TableData, TableRow, TableProps } from '../../UI/Table/TableTypes'\nimport { VisuallyHidden } from '../../VisuallyHidden'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport type DataTableProps<T> = {\n label: string\n columns: useDataViewPropReturn<T>['columns']\n data: useDataViewPropReturn<T>['data']\n itemMenu?: useDataViewPropReturn<T>['itemMenu']\n onSelect?: useDataViewPropReturn<T>['onSelect']\n emptyState?: useDataViewPropReturn<T>['emptyState']\n footer?: useDataViewPropReturn<T>['footer']\n variant?: TableProps['variant']\n}\n\nfunction getCellContent<T>(\n item: T,\n column: { key?: string | keyof T; render?: (item: T) => React.ReactNode },\n) {\n if (column.render) {\n return column.render(item)\n }\n\n if (column.key) {\n const key = column.key as keyof T\n return String(item[key] ?? '')\n }\n\n return ''\n}\n\nexport const DataTable = <T,>({\n label,\n data,\n columns,\n itemMenu,\n onSelect,\n emptyState,\n footer,\n variant,\n}: DataTableProps<T>) => {\n const Components = useComponentContext()\n const { t } = useTranslation('common')\n\n const headers: TableData[] = [\n ...(onSelect\n ? [\n {\n key: 'select-header',\n content: <VisuallyHidden>{t('table.selectRowHeader')}</VisuallyHidden>,\n },\n ]\n : []),\n ...columns.map((column, index) => ({\n key: typeof column.key === 'string' ? column.key : `header-${index}`,\n content: column.title,\n })),\n ...(itemMenu\n ? [\n {\n key: 'actions-header',\n content: <VisuallyHidden>{t('table.actionsColumnHeader')}</VisuallyHidden>,\n },\n ]\n : []),\n ]\n\n const rows: TableRow[] = data.map((item, rowIndex) => {\n const rowData: TableData[] = [\n ...(onSelect\n ? [\n {\n key: `select-${rowIndex}`,\n content: (\n <Components.Checkbox\n onChange={(checked: boolean) => {\n onSelect(item, checked)\n }}\n label={t('table.selectRowLabel')}\n shouldVisuallyHideLabel\n />\n ),\n },\n ]\n : []),\n ...columns.map((column, colIndex) => {\n return {\n key: typeof column.key === 'string' ? column.key : `cell-${colIndex}`,\n content: getCellContent(item, column),\n }\n }),\n ...(itemMenu\n ? [\n {\n key: `menu-${rowIndex}`,\n content: itemMenu(item),\n },\n ]\n : []),\n ]\n\n return {\n key: `row-${rowIndex}`,\n data: rowData,\n }\n })\n\n const buildFooterData = () => {\n if (!footer) return undefined\n\n const footerContent = footer()\n const footerCells: TableData[] = []\n\n // Add select column footer (empty)\n if (onSelect) {\n footerCells.push({\n key: 'footer-select',\n content: '',\n })\n }\n\n // Add data column footers\n columns.forEach((column, index) => {\n const columnKey = typeof column.key === 'string' ? column.key : `column-${index}`\n footerCells.push({\n key: `footer-${columnKey}`,\n content: footerContent[columnKey] || '',\n })\n })\n\n // Add actions column footer (empty)\n if (itemMenu) {\n footerCells.push({\n key: 'footer-actions',\n content: '',\n })\n }\n\n return footerCells\n }\n\n const footerData = buildFooterData()\n\n return (\n <Components.Table\n aria-label={label}\n data-testid=\"data-table\"\n headers={headers}\n rows={rows}\n footer={footerData}\n emptyState={emptyState ? emptyState() : undefined}\n variant={variant}\n hasCheckboxColumn={!!onSelect}\n />\n )\n}\n"],"names":["getCellContent","item","column","key","DataTable","label","data","columns","itemMenu","onSelect","emptyState","footer","variant","Components","useComponentContext","t","useTranslation","headers","jsx","VisuallyHidden","index","rows","rowIndex","rowData","checked","colIndex","footerData","footerContent","footerCells","columnKey"],"mappings":"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"}
|
|
@@ -5,5 +5,5 @@ interface DocumentViewerProps {
|
|
|
5
5
|
viewDocumentLabel: string;
|
|
6
6
|
headingLevel?: 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
7
7
|
}
|
|
8
|
-
export declare function DocumentViewer({ url, title, downloadInstructions, viewDocumentLabel, headingLevel
|
|
8
|
+
export declare function DocumentViewer({ url, title, downloadInstructions, viewDocumentLabel, headingLevel, }: DocumentViewerProps): import("react/jsx-runtime").JSX.Element | null;
|
|
9
9
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
1
|
+
import { jsx as e, jsxs as s } from "react/jsx-runtime";
|
|
2
2
|
import { useRef as p } from "react";
|
|
3
3
|
import { Flex as i } from "../Flex/Flex.js";
|
|
4
4
|
import n from "./DocumentViewer.module.scss.js";
|
|
@@ -7,11 +7,11 @@ import { useComponentContext as u } from "../../../contexts/ComponentAdapter/use
|
|
|
7
7
|
function k({
|
|
8
8
|
url: a,
|
|
9
9
|
title: r,
|
|
10
|
-
downloadInstructions:
|
|
10
|
+
downloadInstructions: m,
|
|
11
11
|
viewDocumentLabel: d,
|
|
12
12
|
headingLevel: l = "h3"
|
|
13
13
|
}) {
|
|
14
|
-
const
|
|
14
|
+
const o = u(), t = p(null), f = h({
|
|
15
15
|
ref: t
|
|
16
16
|
}).includes("small");
|
|
17
17
|
if (!a) return null;
|
|
@@ -20,15 +20,15 @@ function k({
|
|
|
20
20
|
title: r,
|
|
21
21
|
type: "application/pdf"
|
|
22
22
|
};
|
|
23
|
-
return /* @__PURE__ */ e("div", { className: n.container, ref: t, children: f ? /* @__PURE__ */ e("embed", { ...c, className: n.embedPdf }) : /* @__PURE__ */ e("div", { className: n.smallEmbedPdfContainer, children: /* @__PURE__ */
|
|
23
|
+
return /* @__PURE__ */ e("div", { className: n.container, ref: t, children: f ? /* @__PURE__ */ e("embed", { ...c, className: n.embedPdf }) : /* @__PURE__ */ e("div", { className: n.smallEmbedPdfContainer, children: /* @__PURE__ */ s(i, { gap: 20, children: [
|
|
24
24
|
/* @__PURE__ */ e("embed", { ...c, className: n.smallEmbedPdf }),
|
|
25
|
-
/* @__PURE__ */
|
|
26
|
-
/* @__PURE__ */
|
|
27
|
-
r && /* @__PURE__ */ e(
|
|
28
|
-
|
|
25
|
+
/* @__PURE__ */ s(i, { flexDirection: "column", gap: 8, children: [
|
|
26
|
+
/* @__PURE__ */ s("div", { children: [
|
|
27
|
+
r && /* @__PURE__ */ e(o.Heading, { as: l, className: n.heading, children: r }),
|
|
28
|
+
m && /* @__PURE__ */ e(o.Text, { className: n.downloadInstructions, children: m })
|
|
29
29
|
] }),
|
|
30
30
|
/* @__PURE__ */ e(
|
|
31
|
-
|
|
31
|
+
o.Link,
|
|
32
32
|
{
|
|
33
33
|
className: "react-aria-Button",
|
|
34
34
|
"data-variant": "secondary",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DocumentViewer.js","sources":["../../../../src/components/Common/DocumentViewer/DocumentViewer.tsx"],"sourcesContent":["import { useRef } from 'react'\nimport { Flex } from '../Flex/Flex'\nimport styles from './DocumentViewer.module.scss'\nimport { useContainerBreakpoints } from '@/hooks/useContainerBreakpoints/useContainerBreakpoints'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\ninterface DocumentViewerProps {\n url?: string | null\n title?: string\n downloadInstructions?: string\n viewDocumentLabel: string\n headingLevel?: 'h2' | 'h3' | 'h4' | 'h5' | 'h6'\n}\n\nexport function DocumentViewer({\n url,\n title,\n downloadInstructions,\n viewDocumentLabel,\n headingLevel
|
|
1
|
+
{"version":3,"file":"DocumentViewer.js","sources":["../../../../src/components/Common/DocumentViewer/DocumentViewer.tsx"],"sourcesContent":["import { useRef } from 'react'\nimport { Flex } from '../Flex/Flex'\nimport styles from './DocumentViewer.module.scss'\nimport { useContainerBreakpoints } from '@/hooks/useContainerBreakpoints/useContainerBreakpoints'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\ninterface DocumentViewerProps {\n url?: string | null\n title?: string\n downloadInstructions?: string\n viewDocumentLabel: string\n headingLevel?: 'h2' | 'h3' | 'h4' | 'h5' | 'h6'\n}\n\nexport function DocumentViewer({\n url,\n title,\n downloadInstructions,\n viewDocumentLabel,\n headingLevel = 'h3',\n}: DocumentViewerProps) {\n const Components = useComponentContext()\n const containerRef = useRef<HTMLDivElement>(null)\n const matches = useContainerBreakpoints({\n ref: containerRef,\n })\n\n const isContainerWidthSmallOrGreater = matches.includes('small')\n\n if (!url) return null\n\n const commonEmbeddedPdfProps = {\n src: `${url}#toolbar=0&navpanes=0`,\n title,\n type: 'application/pdf',\n }\n\n return (\n <div className={styles.container} ref={containerRef}>\n {isContainerWidthSmallOrGreater ? (\n <embed {...commonEmbeddedPdfProps} className={styles.embedPdf} />\n ) : (\n <div className={styles.smallEmbedPdfContainer}>\n <Flex gap={20}>\n <embed {...commonEmbeddedPdfProps} className={styles.smallEmbedPdf} />\n <Flex flexDirection=\"column\" gap={8}>\n <div>\n {title && (\n <Components.Heading as={headingLevel} className={styles.heading}>\n {title}\n </Components.Heading>\n )}\n {downloadInstructions && (\n <Components.Text className={styles.downloadInstructions}>\n {downloadInstructions}\n </Components.Text>\n )}\n </div>\n <Components.Link\n className=\"react-aria-Button\"\n data-variant=\"secondary\"\n href={url}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n download={`${title || 'document'}.pdf`}\n >\n {viewDocumentLabel}\n </Components.Link>\n </Flex>\n </Flex>\n </div>\n )}\n </div>\n )\n}\n"],"names":["DocumentViewer","url","title","downloadInstructions","viewDocumentLabel","headingLevel","Components","useComponentContext","containerRef","useRef","isContainerWidthSmallOrGreater","useContainerBreakpoints","commonEmbeddedPdfProps","jsx","styles","jsxs","Flex"],"mappings":";;;;;;AAaO,SAASA,EAAe;AAAA,EAC7B,KAAAC;AAAA,EACA,OAAAC;AAAA,EACA,sBAAAC;AAAA,EACA,mBAAAC;AAAA,EACA,cAAAC,IAAe;AACjB,GAAwB;AACtB,QAAMC,IAAaC,EAAA,GACbC,IAAeC,EAAuB,IAAI,GAK1CC,IAJUC,EAAwB;AAAA,IACtC,KAAKH;AAAA,EAAA,CACN,EAE8C,SAAS,OAAO;AAE/D,MAAI,CAACP,EAAK,QAAO;AAEjB,QAAMW,IAAyB;AAAA,IAC7B,KAAK,GAAGX,CAAG;AAAA,IACX,OAAAC;AAAA,IACA,MAAM;AAAA,EAAA;AAGR,SACE,gBAAAW,EAAC,OAAA,EAAI,WAAWC,EAAO,WAAW,KAAKN,GACpC,UAAAE,IACC,gBAAAG,EAAC,SAAA,EAAO,GAAGD,GAAwB,WAAWE,EAAO,SAAA,CAAU,IAE/D,gBAAAD,EAAC,OAAA,EAAI,WAAWC,EAAO,wBACrB,UAAA,gBAAAC,EAACC,GAAA,EAAK,KAAK,IACT,UAAA;AAAA,IAAA,gBAAAH,EAAC,SAAA,EAAO,GAAGD,GAAwB,WAAWE,EAAO,eAAe;AAAA,IACpE,gBAAAC,EAACC,GAAA,EAAK,eAAc,UAAS,KAAK,GAChC,UAAA;AAAA,MAAA,gBAAAD,EAAC,OAAA,EACE,UAAA;AAAA,QAAAb,KACC,gBAAAW,EAACP,EAAW,SAAX,EAAmB,IAAID,GAAc,WAAWS,EAAO,SACrD,UAAAZ,EAAA,CACH;AAAA,QAEDC,uBACEG,EAAW,MAAX,EAAgB,WAAWQ,EAAO,sBAChC,UAAAX,EAAA,CACH;AAAA,MAAA,GAEJ;AAAA,MACA,gBAAAU;AAAA,QAACP,EAAW;AAAA,QAAX;AAAA,UACC,WAAU;AAAA,UACV,gBAAa;AAAA,UACb,MAAML;AAAA,UACN,QAAO;AAAA,UACP,KAAI;AAAA,UACJ,UAAU,GAAGC,KAAS,UAAU;AAAA,UAE/B,UAAAE;AAAA,QAAA;AAAA,MAAA;AAAA,IACH,EAAA,CACF;AAAA,EAAA,EAAA,CACF,GACF,GAEJ;AAEJ;"}
|
|
@@ -2,7 +2,7 @@ import { UseFieldProps } from '../hooks/useField';
|
|
|
2
2
|
import { RadioGroupProps, RadioGroupOption } from '../../UI/RadioGroup/RadioGroupTypes';
|
|
3
3
|
import { OptionWithGenericValue } from '../hooks/useStringifyGenericFieldValue';
|
|
4
4
|
type GenericRadioGroupOption<TValue> = OptionWithGenericValue<TValue, RadioGroupOption>;
|
|
5
|
-
export interface RadioGroupFieldProps<TValue> extends Omit<RadioGroupProps, 'value' | 'onChange' | 'options' | 'isInvalid'>, UseFieldProps<TValue> {
|
|
5
|
+
export interface RadioGroupFieldProps<TValue> extends Omit<RadioGroupProps, 'value' | 'onChange' | 'options' | 'isInvalid' | 'defaultValue'>, UseFieldProps<TValue> {
|
|
6
6
|
options: GenericRadioGroupOption<TValue>[];
|
|
7
7
|
convertValueToString?: (value: TValue) => string;
|
|
8
8
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioGroupField.js","sources":["../../../../../src/components/Common/Fields/RadioGroupField/RadioGroupField.tsx"],"sourcesContent":["import { useField, type UseFieldProps } from '@/components/Common/Fields/hooks/useField'\nimport type {\n RadioGroupProps,\n RadioGroupOption,\n} from '@/components/Common/UI/RadioGroup/RadioGroupTypes'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport {\n useStringifyGenericFieldValue,\n type OptionWithGenericValue,\n} from '@/components/Common/Fields/hooks/useStringifyGenericFieldValue'\n\ntype GenericRadioGroupOption<TValue> = OptionWithGenericValue<TValue, RadioGroupOption>\n\nexport interface RadioGroupFieldProps<TValue>\n extends Omit<RadioGroupProps, 'value' | 'onChange' | 'options' | 'isInvalid'>,\n UseFieldProps<TValue> {\n options: GenericRadioGroupOption<TValue>[]\n convertValueToString?: (value: TValue) => string\n}\n\nexport const RadioGroupField = <TValue = string,>({\n rules,\n defaultValue,\n name,\n errorMessage,\n isRequired,\n onChange: onChangeFromProps,\n transform,\n options,\n convertValueToString,\n description,\n onBlur,\n inputRef,\n ...radioGroupProps\n}: RadioGroupFieldProps<TValue>) => {\n const Components = useComponentContext()\n const { value, onChange, ...fieldProps } = useField<TValue>({\n name,\n rules,\n defaultValue,\n errorMessage,\n isRequired,\n onChange: onChangeFromProps,\n transform,\n description,\n onBlur,\n inputRef,\n })\n\n const stringFieldProps = useStringifyGenericFieldValue<TValue, RadioGroupOption>({\n options,\n value,\n onChange,\n convertValueToString,\n })\n\n return <Components.RadioGroup {...radioGroupProps} {...fieldProps} {...stringFieldProps} />\n}\n"],"names":["RadioGroupField","rules","defaultValue","name","errorMessage","isRequired","onChangeFromProps","transform","options","convertValueToString","description","onBlur","inputRef","radioGroupProps","Components","useComponentContext","value","onChange","fieldProps","useField","stringFieldProps","useStringifyGenericFieldValue","jsx"],"mappings":";;;;AAoBO,MAAMA,IAAkB,CAAmB;AAAA,EAChD,OAAAC;AAAA,EACA,cAAAC;AAAA,EACA,MAAAC;AAAA,EACA,cAAAC;AAAA,EACA,YAAAC;AAAA,EACA,UAAUC;AAAA,EACV,WAAAC;AAAA,EACA,SAAAC;AAAA,EACA,sBAAAC;AAAA,EACA,aAAAC;AAAA,EACA,QAAAC;AAAA,EACA,UAAAC;AAAA,EACA,GAAGC;AACL,MAAoC;AAClC,QAAMC,IAAaC,EAAA,GACb,EAAE,OAAAC,GAAO,UAAAC,GAAU,GAAGC,EAAA,IAAeC,EAAiB;AAAA,IAC1D,MAAAhB;AAAA,IACA,OAAAF;AAAA,IACA,cAAAC;AAAA,IACA,cAAAE;AAAA,IACA,YAAAC;AAAA,IACA,UAAUC;AAAA,IACV,WAAAC;AAAA,IACA,aAAAG;AAAA,IACA,QAAAC;AAAA,IACA,UAAAC;AAAA,EAAA,CACD,GAEKQ,IAAmBC,EAAwD;AAAA,IAC/E,SAAAb;AAAA,IACA,OAAAQ;AAAA,IACA,UAAAC;AAAA,IACA,sBAAAR;AAAA,EAAA,CACD;AAED,SAAO,gBAAAa,EAACR,EAAW,YAAX,EAAuB,GAAGD,GAAkB,GAAGK,GAAa,GAAGE,GAAkB;AAC3F;"}
|
|
1
|
+
{"version":3,"file":"RadioGroupField.js","sources":["../../../../../src/components/Common/Fields/RadioGroupField/RadioGroupField.tsx"],"sourcesContent":["import { useField, type UseFieldProps } from '@/components/Common/Fields/hooks/useField'\nimport type {\n RadioGroupProps,\n RadioGroupOption,\n} from '@/components/Common/UI/RadioGroup/RadioGroupTypes'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport {\n useStringifyGenericFieldValue,\n type OptionWithGenericValue,\n} from '@/components/Common/Fields/hooks/useStringifyGenericFieldValue'\n\ntype GenericRadioGroupOption<TValue> = OptionWithGenericValue<TValue, RadioGroupOption>\n\nexport interface RadioGroupFieldProps<TValue>\n extends Omit<RadioGroupProps, 'value' | 'onChange' | 'options' | 'isInvalid' | 'defaultValue'>,\n UseFieldProps<TValue> {\n options: GenericRadioGroupOption<TValue>[]\n convertValueToString?: (value: TValue) => string\n}\n\nexport const RadioGroupField = <TValue = string,>({\n rules,\n defaultValue,\n name,\n errorMessage,\n isRequired,\n onChange: onChangeFromProps,\n transform,\n options,\n convertValueToString,\n description,\n onBlur,\n inputRef,\n ...radioGroupProps\n}: RadioGroupFieldProps<TValue>) => {\n const Components = useComponentContext()\n const { value, onChange, ...fieldProps } = useField<TValue>({\n name,\n rules,\n defaultValue,\n errorMessage,\n isRequired,\n onChange: onChangeFromProps,\n transform,\n description,\n onBlur,\n inputRef,\n })\n\n const stringFieldProps = useStringifyGenericFieldValue<TValue, RadioGroupOption>({\n options,\n value,\n onChange,\n convertValueToString,\n })\n\n return <Components.RadioGroup {...radioGroupProps} {...fieldProps} {...stringFieldProps} />\n}\n"],"names":["RadioGroupField","rules","defaultValue","name","errorMessage","isRequired","onChangeFromProps","transform","options","convertValueToString","description","onBlur","inputRef","radioGroupProps","Components","useComponentContext","value","onChange","fieldProps","useField","stringFieldProps","useStringifyGenericFieldValue","jsx"],"mappings":";;;;AAoBO,MAAMA,IAAkB,CAAmB;AAAA,EAChD,OAAAC;AAAA,EACA,cAAAC;AAAA,EACA,MAAAC;AAAA,EACA,cAAAC;AAAA,EACA,YAAAC;AAAA,EACA,UAAUC;AAAA,EACV,WAAAC;AAAA,EACA,SAAAC;AAAA,EACA,sBAAAC;AAAA,EACA,aAAAC;AAAA,EACA,QAAAC;AAAA,EACA,UAAAC;AAAA,EACA,GAAGC;AACL,MAAoC;AAClC,QAAMC,IAAaC,EAAA,GACb,EAAE,OAAAC,GAAO,UAAAC,GAAU,GAAGC,EAAA,IAAeC,EAAiB;AAAA,IAC1D,MAAAhB;AAAA,IACA,OAAAF;AAAA,IACA,cAAAC;AAAA,IACA,cAAAE;AAAA,IACA,YAAAC;AAAA,IACA,UAAUC;AAAA,IACV,WAAAC;AAAA,IACA,aAAAG;AAAA,IACA,QAAAC;AAAA,IACA,UAAAC;AAAA,EAAA,CACD,GAEKQ,IAAmBC,EAAwD;AAAA,IAC/E,SAAAb;AAAA,IACA,OAAAQ;AAAA,IACA,UAAAC;AAAA,IACA,sBAAAR;AAAA,EAAA,CACD;AAED,SAAO,gBAAAa,EAACR,EAAW,YAAX,EAAuB,GAAGD,GAAkB,GAAGK,GAAa,GAAGE,GAAkB;AAC3F;"}
|
|
@@ -5,8 +5,8 @@ import { zodResolver as l } from "@hookform/resolvers/zod";
|
|
|
5
5
|
import t from "./SignatureForm.module.scss.js";
|
|
6
6
|
import { Form as u } from "../Form/Form.js";
|
|
7
7
|
import { Flex as c } from "../Flex/Flex.js";
|
|
8
|
-
import "react-i18next";
|
|
9
8
|
import "classnames";
|
|
9
|
+
import "../../../shared/constants.js";
|
|
10
10
|
const f = o.object({
|
|
11
11
|
signature: o.string().min(1),
|
|
12
12
|
confirmSignature: o.literal(!0)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as m, jsx as n } from "react/jsx-runtime";
|
|
2
|
-
import "react-i18next";
|
|
3
2
|
import "classnames";
|
|
3
|
+
import "../../../shared/constants.js";
|
|
4
4
|
import { ActionsLayout as s } from "../ActionsLayout/ActionsLayout.js";
|
|
5
5
|
import { useComponentContext as p } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
6
6
|
function d({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as n, Fragment as s, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import "react-i18next";
|
|
3
2
|
import "classnames";
|
|
3
|
+
import "../../../shared/constants.js";
|
|
4
4
|
import { TextInputField as a } from "../Fields/TextInputField/TextInputField.js";
|
|
5
5
|
import { CheckboxField as u } from "../Fields/CheckboxField/CheckboxField.js";
|
|
6
6
|
function f({
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
-
import { useContext as
|
|
3
|
-
import
|
|
4
|
-
import { RadioGroup as
|
|
2
|
+
import { useContext as y, useRef as G } from "react";
|
|
3
|
+
import x from "classnames";
|
|
4
|
+
import { RadioGroup as V, RadioGroupStateContext as N } from "react-aria-components";
|
|
5
5
|
import { useRadio as P } from "react-aria";
|
|
6
6
|
import { Radio as S } from "../Radio/Radio.js";
|
|
7
|
-
import
|
|
8
|
-
import { RadioGroupDefaults as
|
|
9
|
-
import { applyMissingDefaults as
|
|
10
|
-
import { Fieldset as
|
|
11
|
-
import { useForkRef as
|
|
12
|
-
function
|
|
7
|
+
import A from "./RadioGroup.module.scss.js";
|
|
8
|
+
import { RadioGroupDefaults as F } from "./RadioGroupTypes.js";
|
|
9
|
+
import { applyMissingDefaults as H } from "../../../../helpers/applyMissingDefaults.js";
|
|
10
|
+
import { Fieldset as I } from "../../Fieldset/Fieldset.js";
|
|
11
|
+
import { useForkRef as L } from "../../../../hooks/useForkRef/useForkRef.js";
|
|
12
|
+
function M({
|
|
13
13
|
label: o,
|
|
14
14
|
description: e,
|
|
15
15
|
value: a,
|
|
@@ -17,7 +17,7 @@ function L({
|
|
|
17
17
|
inputRef: n,
|
|
18
18
|
...t
|
|
19
19
|
}) {
|
|
20
|
-
const s =
|
|
20
|
+
const s = G(null), l = L(n, s), { inputProps: d, isSelected: p, isDisabled: u } = P(
|
|
21
21
|
{
|
|
22
22
|
...t,
|
|
23
23
|
value: a,
|
|
@@ -44,12 +44,12 @@ function L({
|
|
|
44
44
|
}
|
|
45
45
|
);
|
|
46
46
|
}
|
|
47
|
-
function
|
|
48
|
-
const e =
|
|
49
|
-
return e ? /* @__PURE__ */ i(
|
|
47
|
+
function j(o) {
|
|
48
|
+
const e = y(N);
|
|
49
|
+
return e ? /* @__PURE__ */ i(M, { groupState: e, ...o }) : null;
|
|
50
50
|
}
|
|
51
|
-
function
|
|
52
|
-
const e =
|
|
51
|
+
function Q(o) {
|
|
52
|
+
const e = H(o, F), {
|
|
53
53
|
label: a,
|
|
54
54
|
description: r,
|
|
55
55
|
errorMessage: n,
|
|
@@ -59,39 +59,41 @@ function O(o) {
|
|
|
59
59
|
options: d,
|
|
60
60
|
shouldVisuallyHideLabel: p,
|
|
61
61
|
value: u,
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
62
|
+
defaultValue: f,
|
|
63
|
+
onChange: m,
|
|
64
|
+
className: R,
|
|
65
|
+
inputRef: h,
|
|
66
|
+
...b
|
|
66
67
|
} = e;
|
|
67
68
|
return /* @__PURE__ */ i(
|
|
68
|
-
|
|
69
|
+
I,
|
|
69
70
|
{
|
|
70
71
|
legend: a,
|
|
71
72
|
description: r,
|
|
72
73
|
errorMessage: n,
|
|
73
74
|
isRequired: t,
|
|
74
75
|
shouldVisuallyHideLegend: p,
|
|
75
|
-
className:
|
|
76
|
-
...
|
|
76
|
+
className: x(A.root, R),
|
|
77
|
+
...b,
|
|
77
78
|
children: /* @__PURE__ */ i(
|
|
78
|
-
|
|
79
|
+
V,
|
|
79
80
|
{
|
|
80
81
|
isInvalid: s,
|
|
81
82
|
isRequired: t,
|
|
82
83
|
validationBehavior: "aria",
|
|
83
84
|
value: u,
|
|
84
|
-
|
|
85
|
+
defaultValue: f,
|
|
86
|
+
onChange: m,
|
|
85
87
|
isDisabled: l,
|
|
86
88
|
"aria-labelledby": " ",
|
|
87
|
-
children: d.map(({ value: c, label:
|
|
88
|
-
|
|
89
|
+
children: d.map(({ value: c, label: g, isDisabled: v, description: C }, D) => /* @__PURE__ */ i(
|
|
90
|
+
j,
|
|
89
91
|
{
|
|
90
|
-
isDisabled:
|
|
92
|
+
isDisabled: v,
|
|
91
93
|
value: c,
|
|
92
|
-
description:
|
|
93
|
-
label:
|
|
94
|
-
inputRef:
|
|
94
|
+
description: C,
|
|
95
|
+
label: g,
|
|
96
|
+
inputRef: D === 0 ? h : void 0
|
|
95
97
|
},
|
|
96
98
|
c
|
|
97
99
|
))
|
|
@@ -101,6 +103,6 @@ function O(o) {
|
|
|
101
103
|
);
|
|
102
104
|
}
|
|
103
105
|
export {
|
|
104
|
-
|
|
106
|
+
Q as RadioGroup
|
|
105
107
|
};
|
|
106
108
|
//# sourceMappingURL=RadioGroup.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioGroup.js","sources":["../../../../../src/components/Common/UI/RadioGroup/RadioGroup.tsx"],"sourcesContent":["import { useContext, useRef } from 'react'\nimport type { Ref } from 'react'\nimport classNames from 'classnames'\nimport {\n RadioGroup as AriaRadioGroup,\n RadioGroupStateContext,\n type RadioGroupRenderProps,\n} from 'react-aria-components'\nimport { useRadio } from 'react-aria'\nimport type { AriaRadioProps } from 'react-aria'\nimport type React from 'react'\nimport { Radio } from '../Radio'\nimport styles from './RadioGroup.module.scss'\nimport type { RadioGroupProps } from './RadioGroupTypes'\nimport { RadioGroupDefaults } from './RadioGroupTypes'\nimport { applyMissingDefaults } from '@/helpers/applyMissingDefaults'\nimport { Fieldset } from '@/components/Common/Fieldset'\nimport { useForkRef } from '@/hooks/useForkRef/useForkRef'\n\n// Radio implementation specific to React Aria to get our radio to connect\n// to their RadioGroup component\ninterface ReactAriaRadioProps extends Omit<AriaRadioProps, 'value'> {\n label: React.ReactNode\n description?: React.ReactNode\n value: string\n groupState: RadioGroupRenderProps['state']\n inputRef?: Ref<HTMLInputElement>\n}\n\nfunction ReactAriaRadio({\n label,\n description,\n value,\n groupState,\n inputRef: inputRefFromProps,\n ...props\n}: ReactAriaRadioProps) {\n const inputRef = useRef<HTMLInputElement>(null)\n const handleInputRef = useForkRef(inputRefFromProps, inputRef)\n\n const { inputProps, isSelected, isDisabled } = useRadio(\n {\n ...props,\n value,\n // Hack to suppress aria-label warning from React Aria. We don't actually\n // use children for the mapping of our radio to React Aria and we already\n // configure a label for our radios.\n children: ' ',\n },\n groupState,\n inputRef,\n )\n\n const handleChange = (checked: boolean) => {\n if (checked) {\n groupState.setSelectedValue(value)\n }\n }\n\n return (\n <Radio\n label={label}\n inputRef={handleInputRef}\n isDisabled={isDisabled}\n description={description}\n onChange={handleChange}\n value={isSelected}\n name={inputProps.name}\n />\n )\n}\n\nfunction ReactAriaRadioWrapper(props: Omit<ReactAriaRadioProps, 'groupState'>) {\n const groupState = useContext(RadioGroupStateContext)\n // We can't render hooks conditionally so we have to use useRadio above but\n // groupState is only defined if the component is rendered within a RadioGroup\n // This wrapper component gets around that by checking if groupState is defined which\n // should always be the case for us since this component is only used within a RadioGroup\n return groupState ? <ReactAriaRadio groupState={groupState} {...props} /> : null\n}\n\nexport function RadioGroup(rawProps: RadioGroupProps) {\n const resolvedProps = applyMissingDefaults(rawProps, RadioGroupDefaults)\n const {\n label,\n description,\n errorMessage,\n isRequired,\n isInvalid,\n isDisabled,\n options,\n shouldVisuallyHideLabel,\n value,\n onChange,\n className,\n inputRef,\n ...otherProps\n } = resolvedProps\n return (\n <Fieldset\n legend={label}\n description={description}\n errorMessage={errorMessage}\n isRequired={isRequired}\n shouldVisuallyHideLegend={shouldVisuallyHideLabel}\n className={classNames(styles.root, className)}\n {...otherProps}\n >\n <AriaRadioGroup\n isInvalid={isInvalid}\n isRequired={isRequired}\n validationBehavior=\"aria\"\n value={value}\n onChange={onChange}\n isDisabled={isDisabled}\n aria-labelledby=\" \"\n >\n {options.map(({ value, label, isDisabled, description }, index) => (\n <ReactAriaRadioWrapper\n isDisabled={isDisabled}\n key={value}\n value={value}\n description={description}\n label={label}\n inputRef={index === 0 ? inputRef : undefined}\n />\n ))}\n </AriaRadioGroup>\n </Fieldset>\n )\n}\n"],"names":["ReactAriaRadio","label","description","value","groupState","inputRefFromProps","props","inputRef","useRef","handleInputRef","useForkRef","inputProps","isSelected","isDisabled","useRadio","jsx","Radio","checked","ReactAriaRadioWrapper","useContext","RadioGroupStateContext","RadioGroup","rawProps","resolvedProps","applyMissingDefaults","RadioGroupDefaults","errorMessage","isRequired","isInvalid","options","shouldVisuallyHideLabel","onChange","className","otherProps","Fieldset","classNames","styles","AriaRadioGroup","index"],"mappings":";;;;;;;;;;;AA6BA,SAASA,EAAe;AAAA,EACtB,OAAAC;AAAA,EACA,aAAAC;AAAA,EACA,OAAAC;AAAA,EACA,YAAAC;AAAA,EACA,UAAUC;AAAA,EACV,GAAGC;AACL,GAAwB;AACtB,QAAMC,IAAWC,EAAyB,IAAI,GACxCC,IAAiBC,EAAWL,GAAmBE,CAAQ,GAEvD,EAAE,YAAAI,GAAY,YAAAC,GAAY,YAAAC,EAAA,IAAeC;AAAA,IAC7C;AAAA,MACE,GAAGR;AAAA,MACH,OAAAH;AAAA;AAAA;AAAA;AAAA,MAIA,UAAU;AAAA,IAAA;AAAA,IAEZC;AAAA,IACAG;AAAA,EAAA;AASF,SACE,gBAAAQ;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,OAAAf;AAAA,MACA,UAAUQ;AAAA,MACV,YAAAI;AAAA,MACA,aAAAX;AAAA,MACA,UAZiB,CAACe,MAAqB;AACzC,QAAIA,KACFb,EAAW,iBAAiBD,CAAK;AAAA,MAErC;AAAA,MASI,OAAOS;AAAA,MACP,MAAMD,EAAW;AAAA,IAAA;AAAA,EAAA;AAGvB;AAEA,SAASO,EAAsBZ,GAAgD;AAC7E,QAAMF,IAAae,EAAWC,CAAsB;AAKpD,SAAOhB,IAAa,gBAAAW,EAACf,GAAA,EAAe,YAAAI,GAAyB,GAAGE,GAAO,IAAK;AAC9E;AAEO,SAASe,EAAWC,GAA2B;AACpD,QAAMC,IAAgBC,EAAqBF,GAAUG,CAAkB,GACjE;AAAA,IACJ,OAAAxB;AAAA,IACA,aAAAC;AAAA,IACA,cAAAwB;AAAA,IACA,YAAAC;AAAA,IACA,WAAAC;AAAA,IACA,YAAAf;AAAA,IACA,SAAAgB;AAAA,IACA,yBAAAC;AAAA,IACA,OAAA3B;AAAA,IACA,
|
|
1
|
+
{"version":3,"file":"RadioGroup.js","sources":["../../../../../src/components/Common/UI/RadioGroup/RadioGroup.tsx"],"sourcesContent":["import { useContext, useRef } from 'react'\nimport type { Ref } from 'react'\nimport classNames from 'classnames'\nimport {\n RadioGroup as AriaRadioGroup,\n RadioGroupStateContext,\n type RadioGroupRenderProps,\n} from 'react-aria-components'\nimport { useRadio } from 'react-aria'\nimport type { AriaRadioProps } from 'react-aria'\nimport type React from 'react'\nimport { Radio } from '../Radio'\nimport styles from './RadioGroup.module.scss'\nimport type { RadioGroupProps } from './RadioGroupTypes'\nimport { RadioGroupDefaults } from './RadioGroupTypes'\nimport { applyMissingDefaults } from '@/helpers/applyMissingDefaults'\nimport { Fieldset } from '@/components/Common/Fieldset'\nimport { useForkRef } from '@/hooks/useForkRef/useForkRef'\n\n// Radio implementation specific to React Aria to get our radio to connect\n// to their RadioGroup component\ninterface ReactAriaRadioProps extends Omit<AriaRadioProps, 'value'> {\n label: React.ReactNode\n description?: React.ReactNode\n value: string\n groupState: RadioGroupRenderProps['state']\n inputRef?: Ref<HTMLInputElement>\n}\n\nfunction ReactAriaRadio({\n label,\n description,\n value,\n groupState,\n inputRef: inputRefFromProps,\n ...props\n}: ReactAriaRadioProps) {\n const inputRef = useRef<HTMLInputElement>(null)\n const handleInputRef = useForkRef(inputRefFromProps, inputRef)\n\n const { inputProps, isSelected, isDisabled } = useRadio(\n {\n ...props,\n value,\n // Hack to suppress aria-label warning from React Aria. We don't actually\n // use children for the mapping of our radio to React Aria and we already\n // configure a label for our radios.\n children: ' ',\n },\n groupState,\n inputRef,\n )\n\n const handleChange = (checked: boolean) => {\n if (checked) {\n groupState.setSelectedValue(value)\n }\n }\n\n return (\n <Radio\n label={label}\n inputRef={handleInputRef}\n isDisabled={isDisabled}\n description={description}\n onChange={handleChange}\n value={isSelected}\n name={inputProps.name}\n />\n )\n}\n\nfunction ReactAriaRadioWrapper(props: Omit<ReactAriaRadioProps, 'groupState'>) {\n const groupState = useContext(RadioGroupStateContext)\n // We can't render hooks conditionally so we have to use useRadio above but\n // groupState is only defined if the component is rendered within a RadioGroup\n // This wrapper component gets around that by checking if groupState is defined which\n // should always be the case for us since this component is only used within a RadioGroup\n return groupState ? <ReactAriaRadio groupState={groupState} {...props} /> : null\n}\n\nexport function RadioGroup(rawProps: RadioGroupProps) {\n const resolvedProps = applyMissingDefaults(rawProps, RadioGroupDefaults)\n const {\n label,\n description,\n errorMessage,\n isRequired,\n isInvalid,\n isDisabled,\n options,\n shouldVisuallyHideLabel,\n value,\n defaultValue,\n onChange,\n className,\n inputRef,\n ...otherProps\n } = resolvedProps\n return (\n <Fieldset\n legend={label}\n description={description}\n errorMessage={errorMessage}\n isRequired={isRequired}\n shouldVisuallyHideLegend={shouldVisuallyHideLabel}\n className={classNames(styles.root, className)}\n {...otherProps}\n >\n <AriaRadioGroup\n isInvalid={isInvalid}\n isRequired={isRequired}\n validationBehavior=\"aria\"\n value={value}\n defaultValue={defaultValue}\n onChange={onChange}\n isDisabled={isDisabled}\n aria-labelledby=\" \"\n >\n {options.map(({ value, label, isDisabled, description }, index) => (\n <ReactAriaRadioWrapper\n isDisabled={isDisabled}\n key={value}\n value={value}\n description={description}\n label={label}\n inputRef={index === 0 ? inputRef : undefined}\n />\n ))}\n </AriaRadioGroup>\n </Fieldset>\n )\n}\n"],"names":["ReactAriaRadio","label","description","value","groupState","inputRefFromProps","props","inputRef","useRef","handleInputRef","useForkRef","inputProps","isSelected","isDisabled","useRadio","jsx","Radio","checked","ReactAriaRadioWrapper","useContext","RadioGroupStateContext","RadioGroup","rawProps","resolvedProps","applyMissingDefaults","RadioGroupDefaults","errorMessage","isRequired","isInvalid","options","shouldVisuallyHideLabel","defaultValue","onChange","className","otherProps","Fieldset","classNames","styles","AriaRadioGroup","index"],"mappings":";;;;;;;;;;;AA6BA,SAASA,EAAe;AAAA,EACtB,OAAAC;AAAA,EACA,aAAAC;AAAA,EACA,OAAAC;AAAA,EACA,YAAAC;AAAA,EACA,UAAUC;AAAA,EACV,GAAGC;AACL,GAAwB;AACtB,QAAMC,IAAWC,EAAyB,IAAI,GACxCC,IAAiBC,EAAWL,GAAmBE,CAAQ,GAEvD,EAAE,YAAAI,GAAY,YAAAC,GAAY,YAAAC,EAAA,IAAeC;AAAA,IAC7C;AAAA,MACE,GAAGR;AAAA,MACH,OAAAH;AAAA;AAAA;AAAA;AAAA,MAIA,UAAU;AAAA,IAAA;AAAA,IAEZC;AAAA,IACAG;AAAA,EAAA;AASF,SACE,gBAAAQ;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,OAAAf;AAAA,MACA,UAAUQ;AAAA,MACV,YAAAI;AAAA,MACA,aAAAX;AAAA,MACA,UAZiB,CAACe,MAAqB;AACzC,QAAIA,KACFb,EAAW,iBAAiBD,CAAK;AAAA,MAErC;AAAA,MASI,OAAOS;AAAA,MACP,MAAMD,EAAW;AAAA,IAAA;AAAA,EAAA;AAGvB;AAEA,SAASO,EAAsBZ,GAAgD;AAC7E,QAAMF,IAAae,EAAWC,CAAsB;AAKpD,SAAOhB,IAAa,gBAAAW,EAACf,GAAA,EAAe,YAAAI,GAAyB,GAAGE,GAAO,IAAK;AAC9E;AAEO,SAASe,EAAWC,GAA2B;AACpD,QAAMC,IAAgBC,EAAqBF,GAAUG,CAAkB,GACjE;AAAA,IACJ,OAAAxB;AAAA,IACA,aAAAC;AAAA,IACA,cAAAwB;AAAA,IACA,YAAAC;AAAA,IACA,WAAAC;AAAA,IACA,YAAAf;AAAA,IACA,SAAAgB;AAAA,IACA,yBAAAC;AAAA,IACA,OAAA3B;AAAA,IACA,cAAA4B;AAAA,IACA,UAAAC;AAAA,IACA,WAAAC;AAAA,IACA,UAAA1B;AAAA,IACA,GAAG2B;AAAA,EAAA,IACDX;AACJ,SACE,gBAAAR;AAAA,IAACoB;AAAA,IAAA;AAAA,MACC,QAAQlC;AAAA,MACR,aAAAC;AAAA,MACA,cAAAwB;AAAA,MACA,YAAAC;AAAA,MACA,0BAA0BG;AAAA,MAC1B,WAAWM,EAAWC,EAAO,MAAMJ,CAAS;AAAA,MAC3C,GAAGC;AAAA,MAEJ,UAAA,gBAAAnB;AAAA,QAACuB;AAAAA,QAAA;AAAA,UACC,WAAAV;AAAA,UACA,YAAAD;AAAA,UACA,oBAAmB;AAAA,UACnB,OAAAxB;AAAA,UACA,cAAA4B;AAAA,UACA,UAAAC;AAAA,UACA,YAAAnB;AAAA,UACA,mBAAgB;AAAA,UAEf,UAAAgB,EAAQ,IAAI,CAAC,EAAE,OAAA1B,GAAO,OAAAF,GAAO,YAAAY,GAAY,aAAAX,EAAAA,GAAeqC,MACvD,gBAAAxB;AAAA,YAACG;AAAA,YAAA;AAAA,cACC,YAAYL;AAAAA,cAEZ,OAAOV;AAAAA,cACP,aAAaD;AAAAA,cACb,OAAOD;AAAAA,cACP,UAAUsC,MAAU,IAAIhC,IAAW;AAAA,YAAA;AAAA,YAJ9BJ;AAAAA,UAAA,CAMR;AAAA,QAAA;AAAA,MAAA;AAAA,IACH;AAAA,EAAA;AAGN;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioGroupTypes.js","sources":["../../../../../src/components/Common/UI/RadioGroup/RadioGroupTypes.ts"],"sourcesContent":["import type { FieldsetHTMLAttributes, Ref } from 'react'\nimport type { SharedFieldLayoutProps } from '@/components/Common/FieldLayout/FieldLayoutTypes'\n\nexport interface RadioGroupOption {\n /**\n * Label text or content for the radio option\n */\n label: React.ReactNode\n /**\n * Value of the option that will be passed to onChange\n */\n value: string\n /**\n * Disables this specific radio option\n */\n isDisabled?: boolean\n /**\n * Optional description text for the radio option\n */\n description?: React.ReactNode\n}\n\nexport interface RadioGroupProps\n extends SharedFieldLayoutProps,\n Pick<FieldsetHTMLAttributes<HTMLFieldSetElement>, 'className'> {\n /**\n * Indicates that the field has an error\n */\n isInvalid?: boolean\n /**\n * Disables all radio options in the group\n */\n isDisabled?: boolean\n /**\n * Array of radio options to display\n */\n options: Array<RadioGroupOption>\n /**\n * Currently selected value\n */\n value?: string\n /**\n * Callback when selection changes\n */\n onChange?: (value: string) => void\n /**\n * React ref for the first radio input element\n */\n inputRef?: Ref<HTMLInputElement>\n}\n\n/**\n * Default prop values for RadioGroup component.\n */\nexport const RadioGroupDefaults = {\n isRequired: false,\n isInvalid: false,\n isDisabled: false,\n shouldVisuallyHideLabel: false,\n} as const satisfies Partial<RadioGroupProps>\n"],"names":["RadioGroupDefaults"],"mappings":"
|
|
1
|
+
{"version":3,"file":"RadioGroupTypes.js","sources":["../../../../../src/components/Common/UI/RadioGroup/RadioGroupTypes.ts"],"sourcesContent":["import type { FieldsetHTMLAttributes, Ref } from 'react'\nimport type { SharedFieldLayoutProps } from '@/components/Common/FieldLayout/FieldLayoutTypes'\n\nexport interface RadioGroupOption {\n /**\n * Label text or content for the radio option\n */\n label: React.ReactNode\n /**\n * Value of the option that will be passed to onChange\n */\n value: string\n /**\n * Disables this specific radio option\n */\n isDisabled?: boolean\n /**\n * Optional description text for the radio option\n */\n description?: React.ReactNode\n}\n\nexport interface RadioGroupProps\n extends SharedFieldLayoutProps,\n Pick<FieldsetHTMLAttributes<HTMLFieldSetElement>, 'className'> {\n /**\n * Indicates that the field has an error\n */\n isInvalid?: boolean\n /**\n * Disables all radio options in the group\n */\n isDisabled?: boolean\n /**\n * Array of radio options to display\n */\n options: Array<RadioGroupOption>\n /**\n * Currently selected value\n */\n value?: string\n /**\n * Initially selected value\n */\n defaultValue?: string\n /**\n * Callback when selection changes\n */\n onChange?: (value: string) => void\n /**\n * React ref for the first radio input element\n */\n inputRef?: Ref<HTMLInputElement>\n}\n\n/**\n * Default prop values for RadioGroup component.\n */\nexport const RadioGroupDefaults = {\n isRequired: false,\n isInvalid: false,\n isDisabled: false,\n shouldVisuallyHideLabel: false,\n} as const satisfies Partial<RadioGroupProps>\n"],"names":["RadioGroupDefaults"],"mappings":"AA0DO,MAAMA,IAAqB;AAAA,EAChC,YAAY;AAAA,EACZ,WAAW;AAAA,EACX,YAAY;AAAA,EACZ,yBAAyB;AAC3B;"}
|
|
@@ -1,20 +1,29 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
2
|
-
import { Table as
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
1
|
+
import { jsx as e, jsxs as m } from "react/jsx-runtime";
|
|
2
|
+
import { Table as y, TableHeader as T, Row as t, Column as v, TableBody as k, Cell as s } from "react-aria-components";
|
|
3
|
+
import x from "classnames";
|
|
4
|
+
import { Text as i } from "../Text/Text.js";
|
|
5
|
+
import { TableDefaults as z } from "./TableTypes.js";
|
|
6
|
+
import C from "./Table.module.scss.js";
|
|
6
7
|
import { applyMissingDefaults as N } from "../../../../helpers/applyMissingDefaults.js";
|
|
7
|
-
function
|
|
8
|
-
const
|
|
9
|
-
return /* @__PURE__ */ e("div", { className:
|
|
10
|
-
/* @__PURE__ */ e(
|
|
11
|
-
/* @__PURE__ */
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
function M(p) {
|
|
9
|
+
const h = N(p, z), { className: f, headers: l, rows: o, footer: n, emptyState: c, variant: g, hasCheckboxColumn: b, ...u } = h;
|
|
10
|
+
return /* @__PURE__ */ e("div", { className: C.root, "data-variant": g, children: /* @__PURE__ */ m(y, { ...u, className: x("react-aria-Table", f), children: [
|
|
11
|
+
/* @__PURE__ */ e(T, { children: /* @__PURE__ */ e(t, { children: l.map((a, r) => /* @__PURE__ */ e(v, { isRowHeader: r === 0, children: /* @__PURE__ */ e(i, { as: "span", weight: "semibold", size: "xs", children: a.content }) }, a.key)) }) }),
|
|
12
|
+
/* @__PURE__ */ m(k, { children: [
|
|
13
|
+
o.length === 0 && c ? /* @__PURE__ */ e(t, { children: /* @__PURE__ */ e(s, { colSpan: l.length, children: c }) }) : o.map((a) => /* @__PURE__ */ e(t, { children: a.data.map((r, d) => /* @__PURE__ */ e(s, { children: /* @__PURE__ */ e(
|
|
14
|
+
i,
|
|
15
|
+
{
|
|
16
|
+
as: "span",
|
|
17
|
+
variant: b ? d === 1 ? "leading" : "supporting" : d === 0 ? "leading" : "supporting",
|
|
18
|
+
size: "xs",
|
|
19
|
+
children: r.content
|
|
20
|
+
}
|
|
21
|
+
) }, r.key)) }, a.key)),
|
|
22
|
+
n && n.length > 0 && /* @__PURE__ */ e(t, { "data-footer": "true", children: n.length === 1 && n[0] ? /* @__PURE__ */ e(s, { colSpan: l.length, children: /* @__PURE__ */ e(i, { as: "span", variant: "leading", size: "sm", children: n[0].content }) }, n[0].key) : n.map((a) => /* @__PURE__ */ e(s, { children: /* @__PURE__ */ e(i, { as: "span", variant: "leading", size: "sm", children: a.content }) }, a.key)) }, "table-footer")
|
|
14
23
|
] })
|
|
15
24
|
] }) });
|
|
16
25
|
}
|
|
17
26
|
export {
|
|
18
|
-
|
|
27
|
+
M as Table
|
|
19
28
|
};
|
|
20
29
|
//# sourceMappingURL=Table.js.map
|