@gusto/embedded-react-sdk 0.14.1 → 0.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +51 -0
- package/dist/assets/icons/feature-icon-check.svg.js +10 -0
- package/dist/assets/icons/feature-icon-check.svg.js.map +1 -0
- package/dist/components/Common/DataView/DataView.d.ts +2 -1
- package/dist/components/Common/DataView/DataView.js +19 -18
- package/dist/components/Common/DataView/DataView.js.map +1 -1
- package/dist/components/Common/FlowBreadcrumbs/FlowBreadcrumbs.d.ts +2 -0
- package/dist/components/Common/FlowBreadcrumbs/FlowBreadcrumbs.js +52 -0
- package/dist/components/Common/FlowBreadcrumbs/FlowBreadcrumbs.js.map +1 -0
- package/dist/components/Common/FlowBreadcrumbs/FlowBreadcrumbsTypes.d.ts +44 -0
- package/dist/components/Common/FlowBreadcrumbs/index.d.ts +3 -0
- package/dist/components/Common/PaginationControl/PaginationControl.js +36 -36
- package/dist/components/Common/PaginationControl/PaginationControl.js.map +1 -1
- package/dist/components/Common/PaginationControl/PaginationControlTypes.d.ts +3 -1
- package/dist/components/Common/UI/Breadcrumbs/Breadcrumbs.d.ts +2 -0
- package/dist/components/Common/UI/Breadcrumbs/Breadcrumbs.js +38 -0
- package/dist/components/Common/UI/Breadcrumbs/Breadcrumbs.js.map +1 -0
- package/dist/components/Common/UI/Breadcrumbs/Breadcrumbs.module.scss.js +16 -0
- package/dist/components/Common/UI/Breadcrumbs/Breadcrumbs.module.scss.js.map +1 -0
- package/dist/components/Common/UI/Breadcrumbs/BreadcrumbsTypes.d.ts +27 -0
- package/dist/components/Common/UI/Breadcrumbs/index.d.ts +3 -0
- package/dist/components/Common/UI/ProgressBar/ProgressBar.js +4 -4
- package/dist/components/Company/Locations/LocationsList/List.js +28 -26
- package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/LocationsList.js +7 -6
- package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/useLocationsList.d.ts +3 -1
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
- package/dist/components/Company/OnboardingFlow/OnboardingFlow.js +10 -10
- package/dist/components/Company/OnboardingFlow/OnboardingFlow.js.map +1 -1
- package/dist/components/Company/OnboardingFlow/onboardingStateMachine.js +16 -10
- package/dist/components/Company/OnboardingFlow/onboardingStateMachine.js.map +1 -1
- package/dist/components/Company/PaySchedule/_parts/Edit.js +6 -6
- package/dist/components/Company/PaySchedule/_parts/Edit.js.map +1 -1
- package/dist/components/Contractor/ContractorList/index.js +59 -57
- package/dist/components/Contractor/ContractorList/index.js.map +1 -1
- package/dist/components/Contractor/ContractorList/useContractorList.d.ts +3 -1
- package/dist/components/Contractor/ContractorList/useContractorList.js +7 -6
- package/dist/components/Contractor/ContractorList/useContractorList.js.map +1 -1
- package/dist/components/Contractor/OnboardingFlow/onboardingStateMachine.js +37 -37
- package/dist/components/Contractor/OnboardingFlow/onboardingStateMachine.js.map +1 -1
- package/dist/components/Contractor/Profile/ContractorProfileForm.js +11 -11
- package/dist/components/Employee/EmployeeList/EmployeeList.js +11 -10
- package/dist/components/Employee/EmployeeList/EmployeeList.js.map +1 -1
- package/dist/components/Employee/EmployeeList/List.js +45 -43
- package/dist/components/Employee/EmployeeList/List.js.map +1 -1
- package/dist/components/Employee/EmployeeList/useEmployeeList.d.ts +3 -1
- package/dist/components/Employee/EmployeeList/useEmployeeList.js.map +1 -1
- package/dist/components/Flow/Flow.js +44 -24
- package/dist/components/Flow/Flow.js.map +1 -1
- package/dist/components/Flow/useFlow.d.ts +10 -1
- package/dist/components/Flow/useFlow.js.map +1 -1
- package/dist/components/Payroll/PayrollBlocker/PayrollBlocker.d.ts +1 -1
- package/dist/components/Payroll/PayrollBlocker/PayrollBlocker.js +16 -16
- package/dist/components/Payroll/PayrollBlocker/PayrollBlocker.js.map +1 -1
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js +20 -20
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js.map +1 -1
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js +9 -9
- package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js +128 -94
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js.map +1 -1
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.d.ts +3 -1
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js +72 -76
- package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js +42 -42
- package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js.map +1 -1
- package/dist/components/Payroll/PayrollFlow/PayrollFlow.d.ts +1 -1
- package/dist/components/Payroll/PayrollFlow/PayrollFlow.js +20 -19
- package/dist/components/Payroll/PayrollFlow/PayrollFlow.js.map +1 -1
- package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.d.ts +5 -3
- package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.js +65 -45
- package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.js.map +1 -1
- package/dist/components/Payroll/PayrollFlow/index.d.ts +1 -1
- package/dist/components/Payroll/PayrollFlow/payrollStateMachine.d.ts +2 -0
- package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js +233 -96
- package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js.map +1 -1
- package/dist/components/Payroll/PayrollHistory/PayrollHistory.js +21 -20
- package/dist/components/Payroll/PayrollHistory/PayrollHistory.js.map +1 -1
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js +12 -12
- package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.js +8 -9
- package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.js.map +1 -1
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +83 -78
- package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.d.ts +1 -2
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.js +41 -45
- package/dist/components/Payroll/PayrollOverview/PayrollOverview.js.map +1 -1
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.d.ts +1 -2
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +118 -119
- package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
- package/dist/components/Payroll/PayrollReceipts/PayrollReceipts.d.ts +1 -2
- package/dist/components/Payroll/PayrollReceipts/PayrollReceipts.js +12 -26
- package/dist/components/Payroll/PayrollReceipts/PayrollReceipts.js.map +1 -1
- package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.d.ts +1 -2
- package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js +40 -44
- package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js.map +1 -1
- package/dist/components/Payroll/helpers.d.ts +2 -0
- package/dist/components/Payroll/helpers.js +38 -37
- package/dist/components/Payroll/helpers.js.map +1 -1
- package/dist/components/Payroll/usePreparedPayrollData.d.ts +4 -1
- package/dist/components/Payroll/usePreparedPayrollData.js +24 -18
- package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
- package/dist/components/index.d.ts +1 -1
- package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js +41 -39
- package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js.map +1 -1
- package/dist/contexts/ComponentAdapter/componentAdapterTypes.d.ts +1 -0
- package/dist/contexts/ComponentAdapter/useComponentContext.d.ts +2 -0
- package/dist/contexts/ComponentAdapter/useComponentContext.js.map +1 -1
- package/dist/helpers/breadcrumbHelpers.d.ts +33 -0
- package/dist/helpers/breadcrumbHelpers.js +46 -0
- package/dist/helpers/breadcrumbHelpers.js.map +1 -0
- package/dist/helpers/breadcrumbHelpers.test.d.ts +1 -0
- package/dist/i18n/I18n.d.ts +1 -1
- package/dist/i18n/I18n.js +32 -23
- package/dist/i18n/I18n.js.map +1 -1
- package/dist/i18n/en/Company.PaySchedule.json.js +2 -2
- package/dist/i18n/en/Payroll.PayrollBlocker.json.js +28 -0
- package/dist/i18n/en/Payroll.PayrollBlocker.json.js.map +1 -0
- package/dist/i18n/en/Payroll.PayrollConfiguration.json.js +28 -24
- package/dist/i18n/en/Payroll.PayrollConfiguration.json.js.map +1 -1
- package/dist/i18n/en/Payroll.PayrollEditEmployee.json.js +28 -26
- package/dist/i18n/en/Payroll.PayrollEditEmployee.json.js.map +1 -1
- package/dist/i18n/en/Payroll.PayrollFlow.json.js +8 -0
- package/dist/i18n/en/Payroll.PayrollFlow.json.js.map +1 -0
- package/dist/i18n/en/Payroll.PayrollHistory.json.js +9 -9
- package/dist/i18n/en/Payroll.PayrollLanding.json.js +2 -2
- package/dist/i18n/en/Payroll.PayrollOverview.json.js +60 -56
- package/dist/i18n/en/Payroll.PayrollOverview.json.js.map +1 -1
- package/dist/i18n/en/Payroll.PayrollReceipts.json.js +16 -12
- package/dist/i18n/en/Payroll.PayrollReceipts.json.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/shared/constants.d.ts +3 -0
- package/dist/shared/constants.js +11 -9
- package/dist/shared/constants.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/types/i18next.d.ts +157 -150
- package/package.json +12 -12
- package/dist/components/Payroll/RunPayrollFlow/RunPayroll.d.ts +0 -23
- package/dist/components/Payroll/RunPayrollFlow/RunPayrollFlow.d.ts +0 -6
- package/dist/i18n/en/Payroll.RunPayroll.json.js +0 -8
- package/dist/i18n/en/Payroll.RunPayroll.json.js.map +0 -1
- package/dist/i18n/en/PayrollBlocker.json.js +0 -24
- package/dist/i18n/en/PayrollBlocker.json.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,56 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.16.0
|
|
4
|
+
|
|
5
|
+
### Features & Enhancements
|
|
6
|
+
|
|
7
|
+
- Add breadcrumb navigation to payroll flow component
|
|
8
|
+
- Add CTA (Call to Action) functionality to payroll flow breadcrumbs
|
|
9
|
+
- Add translation support for pay schedule names
|
|
10
|
+
- Enable multiple resource file loading in useI18n hook
|
|
11
|
+
|
|
12
|
+
### Fixes
|
|
13
|
+
|
|
14
|
+
- Memoize employee UUID array and switch to API filtering for better performance
|
|
15
|
+
|
|
16
|
+
### Chores & Maintenance
|
|
17
|
+
|
|
18
|
+
- Add missing run payroll documentation
|
|
19
|
+
- Bump react-i18next from 16.0.1 to 16.1.0
|
|
20
|
+
- Bump eslint from 9.37.0 to 9.38.0
|
|
21
|
+
- Bump vite from 6.4.0 to 6.4.1
|
|
22
|
+
- Bump typescript-eslint from 8.46.1 to 8.46.2
|
|
23
|
+
- Bump lint-staged from 16.2.4 to 16.2.5
|
|
24
|
+
- Bump msw from 2.11.5 to 2.11.6
|
|
25
|
+
|
|
26
|
+
## 0.15.0
|
|
27
|
+
|
|
28
|
+
### Features & Enhancements
|
|
29
|
+
|
|
30
|
+
- Remove deprecated payroll flow and unstable prefix - Payroll components are now stable
|
|
31
|
+
- Implement pagination for payroll configuration
|
|
32
|
+
- Add logic to hide skip payroll functionality
|
|
33
|
+
- Add emptyState back to DataView component
|
|
34
|
+
- Sort payroll config by API instead of client for better performance
|
|
35
|
+
|
|
36
|
+
### Fixes
|
|
37
|
+
|
|
38
|
+
- Update PayrollHistory to include correct amount
|
|
39
|
+
- Fix twoPercentShareholder form integration and error handling
|
|
40
|
+
|
|
41
|
+
### Refactoring
|
|
42
|
+
|
|
43
|
+
- Refactor pagination control to uncontrolled component
|
|
44
|
+
|
|
45
|
+
### Chores & Maintenance
|
|
46
|
+
|
|
47
|
+
- Upgrade embedded client to latest 0.8.1
|
|
48
|
+
- Bump dompurify from 3.2.7 to 3.3.0
|
|
49
|
+
- Bump react-hook-form from 7.64.0 to 7.65.0
|
|
50
|
+
- Bump vite from 6.3.6 to 6.4.0
|
|
51
|
+
- Bump typescript-eslint from 8.46.0 to 8.46.1
|
|
52
|
+
- Bump eslint-plugin-react-refresh from 0.4.23 to 0.4.24
|
|
53
|
+
|
|
3
54
|
## 0.14.1
|
|
4
55
|
|
|
5
56
|
### Fixes
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as e from "react";
|
|
2
|
+
const l = ({
|
|
3
|
+
title: t,
|
|
4
|
+
titleId: r,
|
|
5
|
+
...a
|
|
6
|
+
}) => /* @__PURE__ */ e.createElement("svg", { width: 52, height: 52, viewBox: "0 0 52 52", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-labelledby": r, ...a }, t ? /* @__PURE__ */ e.createElement("title", { id: r }, t) : null, /* @__PURE__ */ e.createElement("g", { filter: "url(#filter0_dii_11785_12181)" }, /* @__PURE__ */ e.createElement("path", { d: "M2 11C2 5.47715 6.47715 1 12 1H40C45.5229 1 50 5.47715 50 11V39C50 44.5229 45.5228 49 40 49H12C6.47715 49 2 44.5228 2 39V11Z", fill: "white" }), /* @__PURE__ */ e.createElement("path", { d: "M12 1.5H40C45.2467 1.5 49.5 5.75329 49.5 11V39C49.5 44.2467 45.2467 48.5 40 48.5H12C6.7533 48.5 2.5 44.2467 2.5 39V11C2.5 5.7533 6.75329 1.5 12 1.5Z", stroke: "#D5D7DA" }), /* @__PURE__ */ e.createElement("path", { d: "M34 19L23 30L18 25", stroke: "black", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" })), /* @__PURE__ */ e.createElement("defs", null, /* @__PURE__ */ e.createElement("filter", { id: "filter0_dii_11785_12181", x: 0, y: 0, width: 52, height: 52, filterUnits: "userSpaceOnUse", colorInterpolationFilters: "sRGB" }, /* @__PURE__ */ e.createElement("feFlood", { floodOpacity: 0, result: "BackgroundImageFix" }), /* @__PURE__ */ e.createElement("feColorMatrix", { in: "SourceAlpha", type: "matrix", values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0", result: "hardAlpha" }), /* @__PURE__ */ e.createElement("feOffset", { dy: 1 }), /* @__PURE__ */ e.createElement("feGaussianBlur", { stdDeviation: 1 }), /* @__PURE__ */ e.createElement("feColorMatrix", { type: "matrix", values: "0 0 0 0 0.0392157 0 0 0 0 0.0496732 0 0 0 0 0.0705882 0 0 0 0.05 0" }), /* @__PURE__ */ e.createElement("feBlend", { mode: "normal", in2: "BackgroundImageFix", result: "effect1_dropShadow_11785_12181" }), /* @__PURE__ */ e.createElement("feBlend", { mode: "normal", in: "SourceGraphic", in2: "effect1_dropShadow_11785_12181", result: "shape" }), /* @__PURE__ */ e.createElement("feColorMatrix", { in: "SourceAlpha", type: "matrix", values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0", result: "hardAlpha" }), /* @__PURE__ */ e.createElement("feOffset", { dy: -2 }), /* @__PURE__ */ e.createElement("feComposite", { in2: "hardAlpha", operator: "arithmetic", k2: -1, k3: 1 }), /* @__PURE__ */ e.createElement("feColorMatrix", { type: "matrix", values: "0 0 0 0 0.0392157 0 0 0 0 0.0496732 0 0 0 0 0.0705882 0 0 0 0.05 0" }), /* @__PURE__ */ e.createElement("feBlend", { mode: "normal", in2: "shape", result: "effect2_innerShadow_11785_12181" }), /* @__PURE__ */ e.createElement("feColorMatrix", { in: "SourceAlpha", type: "matrix", values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0", result: "hardAlpha" }), /* @__PURE__ */ e.createElement("feMorphology", { radius: 1, operator: "erode", in: "SourceAlpha", result: "effect3_innerShadow_11785_12181" }), /* @__PURE__ */ e.createElement("feOffset", null), /* @__PURE__ */ e.createElement("feComposite", { in2: "hardAlpha", operator: "arithmetic", k2: -1, k3: 1 }), /* @__PURE__ */ e.createElement("feColorMatrix", { type: "matrix", values: "0 0 0 0 0.0392157 0 0 0 0 0.0496732 0 0 0 0 0.0705882 0 0 0 0.18 0" }), /* @__PURE__ */ e.createElement("feBlend", { mode: "normal", in2: "effect2_innerShadow_11785_12181", result: "effect3_innerShadow_11785_12181" }))));
|
|
7
|
+
export {
|
|
8
|
+
l as default
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=feature-icon-check.svg.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feature-icon-check.svg.js","sources":["../../../src/assets/icons/feature-icon-check.svg?react"],"sourcesContent":["import * as React from \"react\";\nconst SvgFeatureIconCheck = ({\n title,\n titleId,\n ...props\n}) => /* @__PURE__ */ React.createElement(\"svg\", { width: 52, height: 52, viewBox: \"0 0 52 52\", 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(\"g\", { filter: \"url(#filter0_dii_11785_12181)\" }, /* @__PURE__ */ React.createElement(\"path\", { d: \"M2 11C2 5.47715 6.47715 1 12 1H40C45.5229 1 50 5.47715 50 11V39C50 44.5229 45.5228 49 40 49H12C6.47715 49 2 44.5228 2 39V11Z\", fill: \"white\" }), /* @__PURE__ */ React.createElement(\"path\", { d: \"M12 1.5H40C45.2467 1.5 49.5 5.75329 49.5 11V39C49.5 44.2467 45.2467 48.5 40 48.5H12C6.7533 48.5 2.5 44.2467 2.5 39V11C2.5 5.7533 6.75329 1.5 12 1.5Z\", stroke: \"#D5D7DA\" }), /* @__PURE__ */ React.createElement(\"path\", { d: \"M34 19L23 30L18 25\", stroke: \"black\", strokeWidth: 2, strokeLinecap: \"round\", strokeLinejoin: \"round\" })), /* @__PURE__ */ React.createElement(\"defs\", null, /* @__PURE__ */ React.createElement(\"filter\", { id: \"filter0_dii_11785_12181\", x: 0, y: 0, width: 52, height: 52, filterUnits: \"userSpaceOnUse\", colorInterpolationFilters: \"sRGB\" }, /* @__PURE__ */ React.createElement(\"feFlood\", { floodOpacity: 0, result: \"BackgroundImageFix\" }), /* @__PURE__ */ React.createElement(\"feColorMatrix\", { in: \"SourceAlpha\", type: \"matrix\", values: \"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0\", result: \"hardAlpha\" }), /* @__PURE__ */ React.createElement(\"feOffset\", { dy: 1 }), /* @__PURE__ */ React.createElement(\"feGaussianBlur\", { stdDeviation: 1 }), /* @__PURE__ */ React.createElement(\"feColorMatrix\", { type: \"matrix\", values: \"0 0 0 0 0.0392157 0 0 0 0 0.0496732 0 0 0 0 0.0705882 0 0 0 0.05 0\" }), /* @__PURE__ */ React.createElement(\"feBlend\", { mode: \"normal\", in2: \"BackgroundImageFix\", result: \"effect1_dropShadow_11785_12181\" }), /* @__PURE__ */ React.createElement(\"feBlend\", { mode: \"normal\", in: \"SourceGraphic\", in2: \"effect1_dropShadow_11785_12181\", result: \"shape\" }), /* @__PURE__ */ React.createElement(\"feColorMatrix\", { in: \"SourceAlpha\", type: \"matrix\", values: \"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0\", result: \"hardAlpha\" }), /* @__PURE__ */ React.createElement(\"feOffset\", { dy: -2 }), /* @__PURE__ */ React.createElement(\"feComposite\", { in2: \"hardAlpha\", operator: \"arithmetic\", k2: -1, k3: 1 }), /* @__PURE__ */ React.createElement(\"feColorMatrix\", { type: \"matrix\", values: \"0 0 0 0 0.0392157 0 0 0 0 0.0496732 0 0 0 0 0.0705882 0 0 0 0.05 0\" }), /* @__PURE__ */ React.createElement(\"feBlend\", { mode: \"normal\", in2: \"shape\", result: \"effect2_innerShadow_11785_12181\" }), /* @__PURE__ */ React.createElement(\"feColorMatrix\", { in: \"SourceAlpha\", type: \"matrix\", values: \"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0\", result: \"hardAlpha\" }), /* @__PURE__ */ React.createElement(\"feMorphology\", { radius: 1, operator: \"erode\", in: \"SourceAlpha\", result: \"effect3_innerShadow_11785_12181\" }), /* @__PURE__ */ React.createElement(\"feOffset\", null), /* @__PURE__ */ React.createElement(\"feComposite\", { in2: \"hardAlpha\", operator: \"arithmetic\", k2: -1, k3: 1 }), /* @__PURE__ */ React.createElement(\"feColorMatrix\", { type: \"matrix\", values: \"0 0 0 0 0.0392157 0 0 0 0 0.0496732 0 0 0 0 0.0705882 0 0 0 0.18 0\" }), /* @__PURE__ */ React.createElement(\"feBlend\", { mode: \"normal\", in2: \"effect2_innerShadow_11785_12181\", result: \"effect3_innerShadow_11785_12181\" }))));\nexport default SvgFeatureIconCheck;\n"],"names":["SvgFeatureIconCheck","title","titleId","props","React"],"mappings":";AACK,MAACA,IAAsB,CAAC;AAAA,EAC3B,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,KAAK,EAAE,QAAQ,gCAA+B,GAAoB,gBAAAA,EAAM,cAAc,QAAQ,EAAE,GAAG,gIAAgI,MAAM,QAAO,CAAE,GAAmB,gBAAAA,EAAM,cAAc,QAAQ,EAAE,GAAG,wJAAwJ,QAAQ,UAAS,CAAE,GAAmB,gBAAAA,EAAM,cAAc,QAAQ,EAAE,GAAG,sBAAsB,QAAQ,SAAS,aAAa,GAAG,eAAe,SAAS,gBAAgB,QAAO,CAAE,CAAC,GAAmB,gBAAAA,EAAM,cAAc,QAAQ,MAAsB,gBAAAA,EAAM,cAAc,UAAU,EAAE,IAAI,2BAA2B,GAAG,GAAG,GAAG,GAAG,OAAO,IAAI,QAAQ,IAAI,aAAa,kBAAkB,2BAA2B,OAAM,GAAoB,gBAAAA,EAAM,cAAc,WAAW,EAAE,cAAc,GAAG,QAAQ,qBAAoB,CAAE,GAAmB,gBAAAA,EAAM,cAAc,iBAAiB,EAAE,IAAI,eAAe,MAAM,UAAU,QAAQ,6CAA6C,QAAQ,YAAW,CAAE,GAAmB,gBAAAA,EAAM,cAAc,YAAY,EAAE,IAAI,GAAG,GAAmB,gBAAAA,EAAM,cAAc,kBAAkB,EAAE,cAAc,EAAC,CAAE,GAAmB,gBAAAA,EAAM,cAAc,iBAAiB,EAAE,MAAM,UAAU,QAAQ,qEAAoE,CAAE,GAAmB,gBAAAA,EAAM,cAAc,WAAW,EAAE,MAAM,UAAU,KAAK,sBAAsB,QAAQ,iCAAgC,CAAE,GAAmB,gBAAAA,EAAM,cAAc,WAAW,EAAE,MAAM,UAAU,IAAI,iBAAiB,KAAK,kCAAkC,QAAQ,QAAO,CAAE,GAAmB,gBAAAA,EAAM,cAAc,iBAAiB,EAAE,IAAI,eAAe,MAAM,UAAU,QAAQ,6CAA6C,QAAQ,YAAW,CAAE,GAAmB,gBAAAA,EAAM,cAAc,YAAY,EAAE,IAAI,GAAE,CAAE,GAAmB,gBAAAA,EAAM,cAAc,eAAe,EAAE,KAAK,aAAa,UAAU,cAAc,IAAI,IAAI,IAAI,EAAC,CAAE,GAAmB,gBAAAA,EAAM,cAAc,iBAAiB,EAAE,MAAM,UAAU,QAAQ,qEAAoE,CAAE,GAAmB,gBAAAA,EAAM,cAAc,WAAW,EAAE,MAAM,UAAU,KAAK,SAAS,QAAQ,kCAAiC,CAAE,GAAmB,gBAAAA,EAAM,cAAc,iBAAiB,EAAE,IAAI,eAAe,MAAM,UAAU,QAAQ,6CAA6C,QAAQ,YAAW,CAAE,GAAmB,gBAAAA,EAAM,cAAc,gBAAgB,EAAE,QAAQ,GAAG,UAAU,SAAS,IAAI,eAAe,QAAQ,kCAAiC,CAAE,GAAmB,gBAAAA,EAAM,cAAc,YAAY,IAAI,GAAmB,gBAAAA,EAAM,cAAc,eAAe,EAAE,KAAK,aAAa,UAAU,cAAc,IAAI,IAAI,IAAI,EAAC,CAAE,GAAmB,gBAAAA,EAAM,cAAc,iBAAiB,EAAE,MAAM,UAAU,QAAQ,qEAAoE,CAAE,GAAmB,gBAAAA,EAAM,cAAc,WAAW,EAAE,MAAM,UAAU,KAAK,mCAAmC,QAAQ,kCAAiC,CAAE,CAAC,CAAC,CAAC;"}
|
|
@@ -13,5 +13,6 @@ export type DataViewProps<T> = {
|
|
|
13
13
|
footer?: useDataViewPropReturn<T>['footer'];
|
|
14
14
|
isFetching?: boolean;
|
|
15
15
|
variant?: TableProps['variant'];
|
|
16
|
+
emptyState?: useDataViewPropReturn<T>['emptyState'];
|
|
16
17
|
};
|
|
17
|
-
export declare const DataView: <T>({ pagination, isFetching, breakAt, breakpoints: customBreakpoints, footer, variant, ...dataViewProps }: DataViewProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export declare const DataView: <T>({ pagination, isFetching, breakAt, breakpoints: customBreakpoints, footer, variant, emptyState, ...dataViewProps }: DataViewProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,39 +1,40 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useRef as
|
|
3
|
-
import { PaginationControl as
|
|
4
|
-
import
|
|
5
|
-
import { DataTable as
|
|
6
|
-
import { DataCards as
|
|
7
|
-
import { useContainerBreakpoints as
|
|
8
|
-
const
|
|
1
|
+
import { jsxs as b, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as k, useMemo as C } from "react";
|
|
3
|
+
import { PaginationControl as D } from "../PaginationControl/PaginationControl.js";
|
|
4
|
+
import w from "./DataView.module.scss.js";
|
|
5
|
+
import { DataTable as x } from "./DataTable/DataTable.js";
|
|
6
|
+
import { DataCards as h } from "./DataCards/DataCards.js";
|
|
7
|
+
import { useContainerBreakpoints as j } from "../../../hooks/useContainerBreakpoints/useContainerBreakpoints.js";
|
|
8
|
+
const N = ({
|
|
9
9
|
pagination: t,
|
|
10
10
|
isFetching: s,
|
|
11
11
|
breakAt: a = "small",
|
|
12
12
|
breakpoints: i,
|
|
13
13
|
footer: m,
|
|
14
14
|
variant: p,
|
|
15
|
-
|
|
15
|
+
emptyState: c,
|
|
16
|
+
...l
|
|
16
17
|
}) => {
|
|
17
|
-
const e =
|
|
18
|
+
const e = k(null), o = j({
|
|
18
19
|
ref: e,
|
|
19
20
|
breakpoints: i
|
|
20
|
-
}),
|
|
21
|
-
return /* @__PURE__ */
|
|
21
|
+
}), f = o.length > 0, r = !o.includes(a), d = C(() => r ? h : x, [r]);
|
|
22
|
+
return /* @__PURE__ */ b(
|
|
22
23
|
"div",
|
|
23
24
|
{
|
|
24
25
|
"data-testid": "data-view",
|
|
25
|
-
className:
|
|
26
|
-
ref: (
|
|
27
|
-
e.current =
|
|
26
|
+
className: w.dataViewContainer,
|
|
27
|
+
ref: (u) => {
|
|
28
|
+
e.current = u;
|
|
28
29
|
},
|
|
29
30
|
children: [
|
|
30
|
-
|
|
31
|
-
t && /* @__PURE__ */ n(
|
|
31
|
+
f && /* @__PURE__ */ n(d, { ...l, footer: m, variant: p, emptyState: c }),
|
|
32
|
+
t && /* @__PURE__ */ n(D, { ...t, isFetching: s })
|
|
32
33
|
]
|
|
33
34
|
}
|
|
34
35
|
);
|
|
35
36
|
};
|
|
36
37
|
export {
|
|
37
|
-
|
|
38
|
+
N as DataView
|
|
38
39
|
};
|
|
39
40
|
//# sourceMappingURL=DataView.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataView.js","sources":["../../../../src/components/Common/DataView/DataView.tsx"],"sourcesContent":["import { useMemo, useRef } from 'react'\nimport { PaginationControl } from '../PaginationControl/PaginationControl'\nimport type { TableProps } from '../UI/Table/TableTypes'\nimport styles from './DataView.module.scss'\nimport { DataTable } from './DataTable/DataTable'\nimport type { useDataViewPropReturn } from './useDataView'\nimport { DataCards } from './DataCards/DataCards'\nimport type { useContainerBreakpointsProps } from '@/hooks/useContainerBreakpoints/useContainerBreakpoints'\nimport useContainerBreakpoints from '@/hooks/useContainerBreakpoints/useContainerBreakpoints'\n\nexport type DataViewProps<T> = {\n columns: useDataViewPropReturn<T>['columns']\n data: T[]\n pagination?: useDataViewPropReturn<T>['pagination']\n label: string\n itemMenu?: useDataViewPropReturn<T>['itemMenu']\n onSelect?: useDataViewPropReturn<T>['onSelect']\n breakAt?: string\n breakpoints?: useContainerBreakpointsProps['breakpoints']\n footer?: useDataViewPropReturn<T>['footer']\n isFetching?: boolean\n variant?: TableProps['variant']\n}\n\nexport const DataView = <T,>({\n pagination,\n isFetching,\n breakAt = 'small',\n breakpoints: customBreakpoints,\n footer,\n variant,\n ...dataViewProps\n}: DataViewProps<T>) => {\n const containerRef = useRef<HTMLElement | null>(null)\n const breakpoints = useContainerBreakpoints({\n ref: containerRef,\n breakpoints: customBreakpoints,\n })\n\n // Wait for breakpoints to be detected before rendering\n const isBreakpointsDetected = breakpoints.length > 0\n const isMobile = !breakpoints.includes(breakAt)\n\n const Component = useMemo(() => {\n return isMobile ? DataCards : DataTable\n }, [isMobile])\n\n return (\n <div\n data-testid=\"data-view\"\n className={styles.dataViewContainer}\n ref={ref => {\n containerRef.current = ref\n }}\n >\n {isBreakpointsDetected && <Component {...dataViewProps} footer={footer} variant={variant}
|
|
1
|
+
{"version":3,"file":"DataView.js","sources":["../../../../src/components/Common/DataView/DataView.tsx"],"sourcesContent":["import { useMemo, useRef } from 'react'\nimport { PaginationControl } from '../PaginationControl/PaginationControl'\nimport type { TableProps } from '../UI/Table/TableTypes'\nimport styles from './DataView.module.scss'\nimport { DataTable } from './DataTable/DataTable'\nimport type { useDataViewPropReturn } from './useDataView'\nimport { DataCards } from './DataCards/DataCards'\nimport type { useContainerBreakpointsProps } from '@/hooks/useContainerBreakpoints/useContainerBreakpoints'\nimport useContainerBreakpoints from '@/hooks/useContainerBreakpoints/useContainerBreakpoints'\n\nexport type DataViewProps<T> = {\n columns: useDataViewPropReturn<T>['columns']\n data: T[]\n pagination?: useDataViewPropReturn<T>['pagination']\n label: string\n itemMenu?: useDataViewPropReturn<T>['itemMenu']\n onSelect?: useDataViewPropReturn<T>['onSelect']\n breakAt?: string\n breakpoints?: useContainerBreakpointsProps['breakpoints']\n footer?: useDataViewPropReturn<T>['footer']\n isFetching?: boolean\n variant?: TableProps['variant']\n emptyState?: useDataViewPropReturn<T>['emptyState']\n}\n\nexport const DataView = <T,>({\n pagination,\n isFetching,\n breakAt = 'small',\n breakpoints: customBreakpoints,\n footer,\n variant,\n emptyState,\n ...dataViewProps\n}: DataViewProps<T>) => {\n const containerRef = useRef<HTMLElement | null>(null)\n const breakpoints = useContainerBreakpoints({\n ref: containerRef,\n breakpoints: customBreakpoints,\n })\n\n // Wait for breakpoints to be detected before rendering\n const isBreakpointsDetected = breakpoints.length > 0\n const isMobile = !breakpoints.includes(breakAt)\n\n const Component = useMemo(() => {\n return isMobile ? DataCards : DataTable\n }, [isMobile])\n\n return (\n <div\n data-testid=\"data-view\"\n className={styles.dataViewContainer}\n ref={ref => {\n containerRef.current = ref\n }}\n >\n {isBreakpointsDetected && (\n <Component {...dataViewProps} footer={footer} variant={variant} emptyState={emptyState} />\n )}\n {pagination && <PaginationControl {...pagination} isFetching={isFetching} />}\n </div>\n )\n}\n"],"names":["DataView","pagination","isFetching","breakAt","customBreakpoints","footer","variant","emptyState","dataViewProps","containerRef","useRef","breakpoints","useContainerBreakpoints","isBreakpointsDetected","isMobile","Component","useMemo","DataCards","DataTable","jsxs","styles","ref","jsx","PaginationControl"],"mappings":";;;;;;;AAyBO,MAAMA,IAAW,CAAK;AAAA,EAC3B,YAAAC;AAAA,EACA,YAAAC;AAAA,EACA,SAAAC,IAAU;AAAA,EACV,aAAaC;AAAA,EACb,QAAAC;AAAA,EACA,SAAAC;AAAA,EACA,YAAAC;AAAA,EACA,GAAGC;AACL,MAAwB;AACtB,QAAMC,IAAeC,EAA2B,IAAI,GAC9CC,IAAcC,EAAwB;AAAA,IAC1C,KAAKH;AAAA,IACL,aAAaL;AAAA,EAAA,CACd,GAGKS,IAAwBF,EAAY,SAAS,GAC7CG,IAAW,CAACH,EAAY,SAASR,CAAO,GAExCY,IAAYC,EAAQ,MACjBF,IAAWG,IAAYC,GAC7B,CAACJ,CAAQ,CAAC;AAEb,SACE,gBAAAK;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,eAAY;AAAA,MACZ,WAAWC,EAAO;AAAA,MAClB,KAAK,CAAAC,MAAO;AACV,QAAAZ,EAAa,UAAUY;AAAA,MACzB;AAAA,MAEC,UAAA;AAAA,QAAAR,uBACEE,GAAA,EAAW,GAAGP,GAAe,QAAAH,GAAgB,SAAAC,GAAkB,YAAAC,GAAwB;AAAA,QAEzFN,KAAc,gBAAAqB,EAACC,GAAA,EAAmB,GAAGtB,GAAY,YAAAC,EAAA,CAAwB;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGhF;"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { useTranslation as f } from "react-i18next";
|
|
3
|
+
import { useMemo as c } from "react";
|
|
4
|
+
import { useComponentContext as u } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
5
|
+
import { componentEvents as B } from "../../../shared/constants.js";
|
|
6
|
+
import { useI18n as C } from "../../../i18n/I18n.js";
|
|
7
|
+
function V({
|
|
8
|
+
breadcrumbs: o,
|
|
9
|
+
currentBreadcrumbId: l,
|
|
10
|
+
onEvent: a
|
|
11
|
+
}) {
|
|
12
|
+
const { Breadcrumbs: i } = u(), s = o.reduce(
|
|
13
|
+
(e, n) => (n.namespace && e.push(n.namespace), e),
|
|
14
|
+
[]
|
|
15
|
+
);
|
|
16
|
+
C(s);
|
|
17
|
+
const { t } = f(s), p = c(
|
|
18
|
+
() => o.map((e) => {
|
|
19
|
+
const n = e.namespace ? t(e.label, {
|
|
20
|
+
ns: e.namespace,
|
|
21
|
+
defaultValue: e.label,
|
|
22
|
+
...e.variables
|
|
23
|
+
}) : t(e.label, {
|
|
24
|
+
defaultValue: e.label,
|
|
25
|
+
...e.variables
|
|
26
|
+
});
|
|
27
|
+
return {
|
|
28
|
+
id: e.id,
|
|
29
|
+
label: n
|
|
30
|
+
};
|
|
31
|
+
}),
|
|
32
|
+
[o, t]
|
|
33
|
+
);
|
|
34
|
+
return /* @__PURE__ */ r(
|
|
35
|
+
i,
|
|
36
|
+
{
|
|
37
|
+
breadcrumbs: p,
|
|
38
|
+
currentBreadcrumbId: l,
|
|
39
|
+
onClick: (e) => {
|
|
40
|
+
const n = o.find((m) => m.id === e);
|
|
41
|
+
a && n && a(B.BREADCRUMB_NAVIGATE, {
|
|
42
|
+
key: e,
|
|
43
|
+
onNavigate: n.onNavigate
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
export {
|
|
50
|
+
V as FlowBreadcrumbs
|
|
51
|
+
};
|
|
52
|
+
//# sourceMappingURL=FlowBreadcrumbs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FlowBreadcrumbs.js","sources":["../../../../src/components/Common/FlowBreadcrumbs/FlowBreadcrumbs.tsx"],"sourcesContent":["import type { CustomTypeOptions } from 'i18next'\nimport { useTranslation } from 'react-i18next'\nimport { useMemo } from 'react'\nimport type { FlowBreadcrumbsProps } from './FlowBreadcrumbsTypes'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { componentEvents } from '@/shared/constants'\nimport { useI18n } from '@/i18n/I18n'\n\nexport function FlowBreadcrumbs({\n breadcrumbs,\n currentBreadcrumbId,\n onEvent,\n}: FlowBreadcrumbsProps) {\n const { Breadcrumbs } = useComponentContext()\n const namespaces = breadcrumbs.reduce<Array<keyof CustomTypeOptions['resources']>>(\n (acc, breadcrumb) => {\n if (breadcrumb.namespace) {\n acc.push(breadcrumb.namespace as keyof CustomTypeOptions['resources'])\n }\n return acc\n },\n [],\n )\n useI18n(namespaces)\n const { t } = useTranslation(namespaces)\n\n const parsedBreadcrumbs = useMemo(\n () =>\n breadcrumbs.map(breadcrumb => {\n const translatedLabel = breadcrumb.namespace\n ? (t(breadcrumb.label, {\n ns: breadcrumb.namespace,\n defaultValue: breadcrumb.label,\n ...breadcrumb.variables,\n } as never) as unknown as string)\n : (t(breadcrumb.label, {\n defaultValue: breadcrumb.label,\n ...breadcrumb.variables,\n } as never) as unknown as string)\n return {\n id: breadcrumb.id,\n label: translatedLabel,\n }\n }),\n [breadcrumbs, t],\n )\n\n const handleBreadcrumbClick = (breadcrumbId: string) => {\n const breadcrumb = breadcrumbs.find(breadcrumb => breadcrumb.id === breadcrumbId)\n if (onEvent && breadcrumb) {\n onEvent(componentEvents.BREADCRUMB_NAVIGATE, {\n key: breadcrumbId,\n onNavigate: breadcrumb.onNavigate,\n })\n }\n }\n\n return (\n <Breadcrumbs\n breadcrumbs={parsedBreadcrumbs}\n currentBreadcrumbId={currentBreadcrumbId}\n onClick={handleBreadcrumbClick}\n />\n )\n}\n"],"names":["FlowBreadcrumbs","breadcrumbs","currentBreadcrumbId","onEvent","Breadcrumbs","useComponentContext","namespaces","acc","breadcrumb","useI18n","useTranslation","parsedBreadcrumbs","useMemo","translatedLabel","jsx","breadcrumbId","componentEvents"],"mappings":";;;;;;AAQO,SAASA,EAAgB;AAAA,EAC9B,aAAAC;AAAA,EACA,qBAAAC;AAAA,EACA,SAAAC;AACF,GAAyB;AACvB,QAAM,EAAE,aAAAC,EAAA,IAAgBC,EAAA,GAClBC,IAAaL,EAAY;AAAA,IAC7B,CAACM,GAAKC,OACAA,EAAW,aACbD,EAAI,KAAKC,EAAW,SAAiD,GAEhED;AAAA,IAET,CAAA;AAAA,EAAC;AAEH,EAAAE,EAAQH,CAAU;AAClB,QAAM,EAAE,EAAA,IAAMI,EAAeJ,CAAU,GAEjCK,IAAoBC;AAAA,IACxB,MACEX,EAAY,IAAI,CAAAO,MAAc;AAC5B,YAAMK,IAAkBL,EAAW,YAC9B,EAAEA,EAAW,OAAO;AAAA,QACnB,IAAIA,EAAW;AAAA,QACf,cAAcA,EAAW;AAAA,QACzB,GAAGA,EAAW;AAAA,MAAA,CACN,IACT,EAAEA,EAAW,OAAO;AAAA,QACnB,cAAcA,EAAW;AAAA,QACzB,GAAGA,EAAW;AAAA,MAAA,CACN;AACd,aAAO;AAAA,QACL,IAAIA,EAAW;AAAA,QACf,OAAOK;AAAA,MAAA;AAAA,IAEX,CAAC;AAAA,IACH,CAACZ,GAAa,CAAC;AAAA,EAAA;AAajB,SACE,gBAAAa;AAAA,IAACV;AAAA,IAAA;AAAA,MACC,aAAaO;AAAA,MACb,qBAAAT;AAAA,MACA,SAd0B,CAACa,MAAyB;AACtD,cAAMP,IAAaP,EAAY,KAAK,CAAAO,MAAcA,EAAW,OAAOO,CAAY;AAChF,QAAIZ,KAAWK,KACbL,EAAQa,EAAgB,qBAAqB;AAAA,UAC3C,KAAKD;AAAA,UACL,YAAYP,EAAW;AAAA,QAAA,CACxB;AAAA,MAEL;AAAA,IAMa;AAAA,EAAA;AAGf;"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { OnEventType } from '../../Base/useBase';
|
|
2
|
+
import { EventType } from '../../../types/Helpers';
|
|
3
|
+
export interface FlowBreadcrumb {
|
|
4
|
+
/**
|
|
5
|
+
* Unique key for the breadcrumb step
|
|
6
|
+
*/
|
|
7
|
+
id: string;
|
|
8
|
+
/**
|
|
9
|
+
* Translation key for the breadcrumb label
|
|
10
|
+
*/
|
|
11
|
+
label: string;
|
|
12
|
+
/**
|
|
13
|
+
* Optional translation namespace
|
|
14
|
+
*/
|
|
15
|
+
namespace?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Optional variables for the breadcrumb label
|
|
18
|
+
*/
|
|
19
|
+
variables?: Record<string, unknown>;
|
|
20
|
+
/**
|
|
21
|
+
* Event handler for breadcrumb navigation
|
|
22
|
+
*/
|
|
23
|
+
onNavigate?: (context: unknown) => unknown;
|
|
24
|
+
}
|
|
25
|
+
export interface BreadcrumbNode {
|
|
26
|
+
/**
|
|
27
|
+
* Parent node key (null for root nodes)
|
|
28
|
+
*/
|
|
29
|
+
parent: string | null;
|
|
30
|
+
/**
|
|
31
|
+
* The breadcrumb item data
|
|
32
|
+
*/
|
|
33
|
+
item: FlowBreadcrumb;
|
|
34
|
+
}
|
|
35
|
+
export type BreadcrumbNodes = Record<string, BreadcrumbNode>;
|
|
36
|
+
export type BreadcrumbTrail = Record<string, FlowBreadcrumb[]>;
|
|
37
|
+
export interface FlowBreadcrumbsProps {
|
|
38
|
+
breadcrumbs: FlowBreadcrumb[];
|
|
39
|
+
currentBreadcrumbId?: string;
|
|
40
|
+
/**
|
|
41
|
+
* Event handler for breadcrumb navigation
|
|
42
|
+
*/
|
|
43
|
+
onEvent?: OnEventType<EventType, unknown>;
|
|
44
|
+
}
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import { jsx as n, jsxs as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import x from "../../../assets/icons/
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
|
|
12
|
-
const P = ({
|
|
1
|
+
import { jsx as n, jsxs as e } from "react/jsx-runtime";
|
|
2
|
+
import { useTranslation as C } from "react-i18next";
|
|
3
|
+
import { Flex as f } from "../Flex/Flex.js";
|
|
4
|
+
import l from "./PaginationControl.module.scss.js";
|
|
5
|
+
import { useComponentContext as r } from "../../../contexts/ComponentAdapter/useComponentContext.js";
|
|
6
|
+
import v from "../../../assets/icons/pagination_first.svg.js";
|
|
7
|
+
import h from "../../../assets/icons/pagination_previous.svg.js";
|
|
8
|
+
import x from "../../../assets/icons/pagination_next.svg.js";
|
|
9
|
+
import S from "../../../assets/icons/pagination_last.svg.js";
|
|
10
|
+
import { InlineSpinner as I } from "../InlineSpinner/InlineSpinner.js";
|
|
11
|
+
const L = ({
|
|
13
12
|
currentPage: i,
|
|
14
13
|
totalPages: o,
|
|
15
|
-
isFetching:
|
|
16
|
-
handleFirstPage:
|
|
17
|
-
handlePreviousPage:
|
|
18
|
-
handleNextPage:
|
|
14
|
+
isFetching: s,
|
|
15
|
+
handleFirstPage: c,
|
|
16
|
+
handlePreviousPage: m,
|
|
17
|
+
handleNextPage: p,
|
|
19
18
|
handleLastPage: d,
|
|
20
|
-
handleItemsPerPageChange:
|
|
19
|
+
handleItemsPerPageChange: g,
|
|
20
|
+
itemsPerPage: u = 5
|
|
21
21
|
}) => {
|
|
22
|
-
const { t } =
|
|
23
|
-
return o < 2 ? null : /* @__PURE__ */ n("section", { className:
|
|
24
|
-
/* @__PURE__ */ n("div", { className:
|
|
22
|
+
const { t } = C("common"), a = r();
|
|
23
|
+
return o < 2 ? null : /* @__PURE__ */ n("section", { className: l.paginationControl, "data-testid": "pagination-control", children: /* @__PURE__ */ e(f, { justifyContent: "space-between", alignItems: "center", children: [
|
|
24
|
+
/* @__PURE__ */ n("div", { className: l.paginationControlCount, children: /* @__PURE__ */ n("section", { children: /* @__PURE__ */ n(
|
|
25
25
|
a.Select,
|
|
26
26
|
{
|
|
27
27
|
label: t("labels.paginationControllCountLabel"),
|
|
28
28
|
shouldVisuallyHideLabel: !0,
|
|
29
|
-
value:
|
|
30
|
-
onChange: (
|
|
31
|
-
|
|
29
|
+
value: u.toString(),
|
|
30
|
+
onChange: (b) => {
|
|
31
|
+
g(Number(b));
|
|
32
32
|
},
|
|
33
33
|
options: [
|
|
34
34
|
{ value: "5", label: "5" },
|
|
@@ -37,15 +37,15 @@ const P = ({
|
|
|
37
37
|
]
|
|
38
38
|
}
|
|
39
39
|
) }) }),
|
|
40
|
-
/* @__PURE__ */
|
|
41
|
-
|
|
40
|
+
/* @__PURE__ */ e("div", { className: l.paginationControlButtons, children: [
|
|
41
|
+
s && /* @__PURE__ */ n(I, { ariaLabel: t("labels.paginationFetchingLabel") }),
|
|
42
42
|
/* @__PURE__ */ n(
|
|
43
43
|
a.ButtonIcon,
|
|
44
44
|
{
|
|
45
45
|
"aria-label": t("icons.paginationFirst"),
|
|
46
46
|
isDisabled: i === 1,
|
|
47
|
-
onClick:
|
|
48
|
-
children: /* @__PURE__ */ n(
|
|
47
|
+
onClick: c,
|
|
48
|
+
children: /* @__PURE__ */ n(v, {})
|
|
49
49
|
}
|
|
50
50
|
),
|
|
51
51
|
/* @__PURE__ */ n(
|
|
@@ -54,8 +54,8 @@ const P = ({
|
|
|
54
54
|
"aria-label": t("icons.paginationPrev"),
|
|
55
55
|
"data-testid": "pagination-previous",
|
|
56
56
|
isDisabled: i === 1,
|
|
57
|
-
onClick:
|
|
58
|
-
children: /* @__PURE__ */ n(
|
|
57
|
+
onClick: m,
|
|
58
|
+
children: /* @__PURE__ */ n(h, {})
|
|
59
59
|
}
|
|
60
60
|
),
|
|
61
61
|
/* @__PURE__ */ n(
|
|
@@ -64,8 +64,8 @@ const P = ({
|
|
|
64
64
|
"aria-label": t("icons.paginationNext"),
|
|
65
65
|
"data-testid": "pagination-next",
|
|
66
66
|
isDisabled: i === o,
|
|
67
|
-
onClick:
|
|
68
|
-
children: /* @__PURE__ */ n(
|
|
67
|
+
onClick: p,
|
|
68
|
+
children: /* @__PURE__ */ n(x, {})
|
|
69
69
|
}
|
|
70
70
|
),
|
|
71
71
|
/* @__PURE__ */ n(
|
|
@@ -74,16 +74,16 @@ const P = ({
|
|
|
74
74
|
"aria-label": t("icons.paginationLast"),
|
|
75
75
|
isDisabled: i === o,
|
|
76
76
|
onClick: d,
|
|
77
|
-
children: /* @__PURE__ */ n(
|
|
77
|
+
children: /* @__PURE__ */ n(S, {})
|
|
78
78
|
}
|
|
79
79
|
)
|
|
80
80
|
] })
|
|
81
81
|
] }) });
|
|
82
|
-
},
|
|
83
|
-
const o =
|
|
84
|
-
return o.PaginationControl ? /* @__PURE__ */ n(o.PaginationControl, { ...i }) : /* @__PURE__ */ n(
|
|
82
|
+
}, T = (i) => {
|
|
83
|
+
const o = r();
|
|
84
|
+
return o.PaginationControl ? /* @__PURE__ */ n(o.PaginationControl, { ...i }) : /* @__PURE__ */ n(L, { ...i });
|
|
85
85
|
};
|
|
86
86
|
export {
|
|
87
|
-
|
|
87
|
+
T as PaginationControl
|
|
88
88
|
};
|
|
89
89
|
//# sourceMappingURL=PaginationControl.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PaginationControl.js","sources":["../../../../src/components/Common/PaginationControl/PaginationControl.tsx"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"PaginationControl.js","sources":["../../../../src/components/Common/PaginationControl/PaginationControl.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { Flex } from '../Flex/Flex'\nimport { InlineSpinner } from '../InlineSpinner'\nimport style from './PaginationControl.module.scss'\nimport type { PaginationControlProps, PaginationItemsPerPage } from './PaginationControlTypes'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport PaginationFirstIcon from '@/assets/icons/pagination_first.svg?react'\nimport PaginationPrevIcon from '@/assets/icons/pagination_previous.svg?react'\nimport PaginationNextIcon from '@/assets/icons/pagination_next.svg?react'\nimport PaginationLastIcon from '@/assets/icons/pagination_last.svg?react'\n\nconst DefaultPaginationControl = ({\n currentPage,\n totalPages,\n isFetching,\n handleFirstPage,\n handlePreviousPage,\n handleNextPage,\n handleLastPage,\n handleItemsPerPageChange,\n itemsPerPage = 5,\n}: PaginationControlProps) => {\n const { t } = useTranslation('common')\n const Components = useComponentContext()\n\n if (totalPages < 2) {\n return null\n }\n\n return (\n <section className={style.paginationControl} data-testid=\"pagination-control\">\n <Flex justifyContent=\"space-between\" alignItems=\"center\">\n <div className={style.paginationControlCount}>\n <section>\n <Components.Select\n label={t('labels.paginationControllCountLabel')}\n shouldVisuallyHideLabel\n value={itemsPerPage.toString()}\n onChange={n => {\n handleItemsPerPageChange(Number(n) as PaginationItemsPerPage)\n }}\n options={[\n { value: '5', label: '5' },\n { value: '10', label: '10' },\n { value: '50', label: '50' },\n ]}\n />\n </section>\n </div>\n <div className={style.paginationControlButtons}>\n {isFetching && <InlineSpinner ariaLabel={t('labels.paginationFetchingLabel')} />}\n <Components.ButtonIcon\n aria-label={t('icons.paginationFirst')}\n isDisabled={currentPage === 1}\n onClick={handleFirstPage}\n >\n <PaginationFirstIcon />\n </Components.ButtonIcon>\n <Components.ButtonIcon\n aria-label={t('icons.paginationPrev')}\n data-testid=\"pagination-previous\"\n isDisabled={currentPage === 1}\n onClick={handlePreviousPage}\n >\n <PaginationPrevIcon />\n </Components.ButtonIcon>\n <Components.ButtonIcon\n aria-label={t('icons.paginationNext')}\n data-testid=\"pagination-next\"\n isDisabled={currentPage === totalPages}\n onClick={handleNextPage}\n >\n <PaginationNextIcon />\n </Components.ButtonIcon>\n <Components.ButtonIcon\n aria-label={t('icons.paginationLast')}\n isDisabled={currentPage === totalPages}\n onClick={handleLastPage}\n >\n <PaginationLastIcon />\n </Components.ButtonIcon>\n </div>\n </Flex>\n </section>\n )\n}\n\nexport const PaginationControl = (props: PaginationControlProps) => {\n const Components = useComponentContext()\n\n return Components.PaginationControl ? (\n <Components.PaginationControl {...props} />\n ) : (\n <DefaultPaginationControl {...props} />\n )\n}\n"],"names":["DefaultPaginationControl","currentPage","totalPages","isFetching","handleFirstPage","handlePreviousPage","handleNextPage","handleLastPage","handleItemsPerPageChange","itemsPerPage","useTranslation","Components","useComponentContext","jsx","style","jsxs","Flex","n","InlineSpinner","PaginationFirstIcon","PaginationPrevIcon","PaginationNextIcon","PaginationLastIcon","PaginationControl","props"],"mappings":";;;;;;;;;;AAWA,MAAMA,IAA2B,CAAC;AAAA,EAChC,aAAAC;AAAA,EACA,YAAAC;AAAA,EACA,YAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,oBAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,0BAAAC;AAAA,EACA,cAAAC,IAAe;AACjB,MAA8B;AAC5B,QAAM,EAAE,EAAA,IAAMC,EAAe,QAAQ,GAC/BC,IAAaC,EAAA;AAEnB,SAAIV,IAAa,IACR,OAIP,gBAAAW,EAAC,WAAA,EAAQ,WAAWC,EAAM,mBAAmB,eAAY,sBACvD,UAAA,gBAAAC,EAACC,GAAA,EAAK,gBAAe,iBAAgB,YAAW,UAC9C,UAAA;AAAA,IAAA,gBAAAH,EAAC,OAAA,EAAI,WAAWC,EAAM,wBACpB,4BAAC,WAAA,EACC,UAAA,gBAAAD;AAAA,MAACF,EAAW;AAAA,MAAX;AAAA,QACC,OAAO,EAAE,qCAAqC;AAAA,QAC9C,yBAAuB;AAAA,QACvB,OAAOF,EAAa,SAAA;AAAA,QACpB,UAAU,CAAAQ,MAAK;AACb,UAAAT,EAAyB,OAAOS,CAAC,CAA2B;AAAA,QAC9D;AAAA,QACA,SAAS;AAAA,UACP,EAAE,OAAO,KAAK,OAAO,IAAA;AAAA,UACrB,EAAE,OAAO,MAAM,OAAO,KAAA;AAAA,UACtB,EAAE,OAAO,MAAM,OAAO,KAAA;AAAA,QAAK;AAAA,MAC7B;AAAA,IAAA,GAEJ,EAAA,CACF;AAAA,IACA,gBAAAF,EAAC,OAAA,EAAI,WAAWD,EAAM,0BACnB,UAAA;AAAA,MAAAX,KAAc,gBAAAU,EAACK,GAAA,EAAc,WAAW,EAAE,gCAAgC,GAAG;AAAA,MAC9E,gBAAAL;AAAA,QAACF,EAAW;AAAA,QAAX;AAAA,UACC,cAAY,EAAE,uBAAuB;AAAA,UACrC,YAAYV,MAAgB;AAAA,UAC5B,SAASG;AAAA,UAET,4BAACe,GAAA,CAAA,CAAoB;AAAA,QAAA;AAAA,MAAA;AAAA,MAEvB,gBAAAN;AAAA,QAACF,EAAW;AAAA,QAAX;AAAA,UACC,cAAY,EAAE,sBAAsB;AAAA,UACpC,eAAY;AAAA,UACZ,YAAYV,MAAgB;AAAA,UAC5B,SAASI;AAAA,UAET,4BAACe,GAAA,CAAA,CAAmB;AAAA,QAAA;AAAA,MAAA;AAAA,MAEtB,gBAAAP;AAAA,QAACF,EAAW;AAAA,QAAX;AAAA,UACC,cAAY,EAAE,sBAAsB;AAAA,UACpC,eAAY;AAAA,UACZ,YAAYV,MAAgBC;AAAA,UAC5B,SAASI;AAAA,UAET,4BAACe,GAAA,CAAA,CAAmB;AAAA,QAAA;AAAA,MAAA;AAAA,MAEtB,gBAAAR;AAAA,QAACF,EAAW;AAAA,QAAX;AAAA,UACC,cAAY,EAAE,sBAAsB;AAAA,UACpC,YAAYV,MAAgBC;AAAA,UAC5B,SAASK;AAAA,UAET,4BAACe,GAAA,CAAA,CAAmB;AAAA,QAAA;AAAA,MAAA;AAAA,IACtB,EAAA,CACF;AAAA,EAAA,EAAA,CACF,EAAA,CACF;AAEJ,GAEaC,IAAoB,CAACC,MAAkC;AAClE,QAAMb,IAAaC,EAAA;AAEnB,SAAOD,EAAW,oBAChB,gBAAAE,EAACF,EAAW,mBAAX,EAA8B,GAAGa,EAAA,CAAO,IAEzC,gBAAAX,EAACb,GAAA,EAA0B,GAAGwB,EAAA,CAAO;AAEzC;"}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
+
export type PaginationItemsPerPage = 5 | 10 | 50;
|
|
1
2
|
export type PaginationControlProps = {
|
|
2
3
|
handleFirstPage: () => void;
|
|
3
4
|
handlePreviousPage: () => void;
|
|
4
5
|
handleNextPage: () => void;
|
|
5
6
|
handleLastPage: () => void;
|
|
6
|
-
handleItemsPerPageChange: (n:
|
|
7
|
+
handleItemsPerPageChange: (n: PaginationItemsPerPage) => void;
|
|
7
8
|
currentPage: number;
|
|
8
9
|
totalPages: number;
|
|
10
|
+
itemsPerPage: PaginationItemsPerPage;
|
|
9
11
|
isFetching?: boolean;
|
|
10
12
|
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import t from "classnames";
|
|
3
|
+
import i from "./Breadcrumbs.module.scss.js";
|
|
4
|
+
import { Flex as p } from "../../Flex/Flex.js";
|
|
5
|
+
function N({
|
|
6
|
+
className: n,
|
|
7
|
+
breadcrumbs: c,
|
|
8
|
+
currentBreadcrumbId: o,
|
|
9
|
+
"aria-label": m = "Breadcrumbs",
|
|
10
|
+
onClick: r
|
|
11
|
+
}) {
|
|
12
|
+
return /* @__PURE__ */ l(p, { flexDirection: "column", children: /* @__PURE__ */ l("nav", { "aria-label": m, className: t(i.root, n), children: /* @__PURE__ */ l("ol", { className: i.list, children: c.map((e) => {
|
|
13
|
+
const a = e.id === o, s = !a && r;
|
|
14
|
+
return /* @__PURE__ */ l(
|
|
15
|
+
"li",
|
|
16
|
+
{
|
|
17
|
+
className: t(i.item, s && i.clickable),
|
|
18
|
+
"aria-current": a ? "step" : !1,
|
|
19
|
+
children: s ? /* @__PURE__ */ l(
|
|
20
|
+
"button",
|
|
21
|
+
{
|
|
22
|
+
type: "button",
|
|
23
|
+
className: i.link,
|
|
24
|
+
onClick: () => {
|
|
25
|
+
r(e.id);
|
|
26
|
+
},
|
|
27
|
+
children: e.label
|
|
28
|
+
}
|
|
29
|
+
) : /* @__PURE__ */ l("span", { children: e.label })
|
|
30
|
+
},
|
|
31
|
+
e.id
|
|
32
|
+
);
|
|
33
|
+
}) }) }) });
|
|
34
|
+
}
|
|
35
|
+
export {
|
|
36
|
+
N as Breadcrumbs
|
|
37
|
+
};
|
|
38
|
+
//# sourceMappingURL=Breadcrumbs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Breadcrumbs.js","sources":["../../../../../src/components/Common/UI/Breadcrumbs/Breadcrumbs.tsx"],"sourcesContent":["import classnames from 'classnames'\nimport { Flex } from '../../Flex'\nimport type { BreadcrumbsProps } from './BreadcrumbsTypes'\nimport styles from './Breadcrumbs.module.scss'\n\nexport function Breadcrumbs({\n className,\n breadcrumbs,\n currentBreadcrumbId,\n 'aria-label': ariaLabel = 'Breadcrumbs',\n onClick,\n}: BreadcrumbsProps) {\n return (\n <Flex flexDirection=\"column\">\n <nav aria-label={ariaLabel} className={classnames(styles.root, className)}>\n <ol className={styles.list}>\n {breadcrumbs.map(breadcrumb => {\n const isCurrentbreadcrumb = breadcrumb.id === currentBreadcrumbId\n const isClickable = !isCurrentbreadcrumb && onClick\n\n return (\n <li\n key={breadcrumb.id}\n className={classnames(styles.item, isClickable && styles.clickable)}\n aria-current={isCurrentbreadcrumb ? 'step' : false}\n >\n {isClickable ? (\n <button\n type=\"button\"\n className={styles.link}\n onClick={() => {\n onClick(breadcrumb.id)\n }}\n >\n {breadcrumb.label}\n </button>\n ) : (\n <span>{breadcrumb.label}</span>\n )}\n </li>\n )\n })}\n </ol>\n </nav>\n </Flex>\n )\n}\n"],"names":["Breadcrumbs","className","breadcrumbs","currentBreadcrumbId","ariaLabel","onClick","jsx","Flex","classnames","styles","breadcrumb","isCurrentbreadcrumb","isClickable"],"mappings":";;;;AAKO,SAASA,EAAY;AAAA,EAC1B,WAAAC;AAAA,EACA,aAAAC;AAAA,EACA,qBAAAC;AAAA,EACA,cAAcC,IAAY;AAAA,EAC1B,SAAAC;AACF,GAAqB;AACnB,SACE,gBAAAC,EAACC,KAAK,eAAc,UAClB,4BAAC,OAAA,EAAI,cAAYH,GAAW,WAAWI,EAAWC,EAAO,MAAMR,CAAS,GACtE,UAAA,gBAAAK,EAAC,MAAA,EAAG,WAAWG,EAAO,MACnB,UAAAP,EAAY,IAAI,CAAAQ,MAAc;AAC7B,UAAMC,IAAsBD,EAAW,OAAOP,GACxCS,IAAc,CAACD,KAAuBN;AAE5C,WACE,gBAAAC;AAAA,MAAC;AAAA,MAAA;AAAA,QAEC,WAAWE,EAAWC,EAAO,MAAMG,KAAeH,EAAO,SAAS;AAAA,QAClE,gBAAcE,IAAsB,SAAS;AAAA,QAE5C,UAAAC,IACC,gBAAAN;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,MAAK;AAAA,YACL,WAAWG,EAAO;AAAA,YAClB,SAAS,MAAM;AACb,cAAAJ,EAAQK,EAAW,EAAE;AAAA,YACvB;AAAA,YAEC,UAAAA,EAAW;AAAA,UAAA;AAAA,QAAA,IAGd,gBAAAJ,EAAC,QAAA,EAAM,UAAAI,EAAW,MAAA,CAAM;AAAA,MAAA;AAAA,MAfrBA,EAAW;AAAA,IAAA;AAAA,EAmBtB,CAAC,EAAA,CACH,EAAA,CACF,GACF;AAEJ;"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
const t = "_root_czg77_2", c = "_list_czg77_5", _ = "_item_czg77_13", l = "_link_czg77_31", o = "_clickable_czg77_45", i = {
|
|
2
|
+
root: t,
|
|
3
|
+
list: c,
|
|
4
|
+
item: _,
|
|
5
|
+
link: l,
|
|
6
|
+
clickable: o
|
|
7
|
+
};
|
|
8
|
+
export {
|
|
9
|
+
o as clickable,
|
|
10
|
+
i as default,
|
|
11
|
+
_ as item,
|
|
12
|
+
l as link,
|
|
13
|
+
c as list,
|
|
14
|
+
t as root
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=Breadcrumbs.module.scss.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Breadcrumbs.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface Breadcrumb {
|
|
3
|
+
id: string;
|
|
4
|
+
label: ReactNode;
|
|
5
|
+
}
|
|
6
|
+
export interface BreadcrumbsProps {
|
|
7
|
+
/**
|
|
8
|
+
* Array of breadcrumbs
|
|
9
|
+
*/
|
|
10
|
+
breadcrumbs: Breadcrumb[];
|
|
11
|
+
/**
|
|
12
|
+
* Current breadcrumb id
|
|
13
|
+
*/
|
|
14
|
+
currentBreadcrumbId?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Accessibility label for the breadcrumbs
|
|
17
|
+
*/
|
|
18
|
+
'aria-label'?: string;
|
|
19
|
+
/**
|
|
20
|
+
* Additional CSS class name for the breadcrumbs container
|
|
21
|
+
*/
|
|
22
|
+
className?: string;
|
|
23
|
+
/**
|
|
24
|
+
* Event handler for breadcrumb navigation
|
|
25
|
+
*/
|
|
26
|
+
onClick?: (id: string) => void;
|
|
27
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as t, jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import c from "classnames";
|
|
3
|
-
import
|
|
4
|
-
import p from "
|
|
3
|
+
import n from "./ProgressBar.module.scss.js";
|
|
4
|
+
import { Flex as p } from "../../Flex/Flex.js";
|
|
5
5
|
import { VisuallyHidden as d } from "../../VisuallyHidden/VisuallyHidden.js";
|
|
6
6
|
function y({
|
|
7
7
|
className: i,
|
|
@@ -13,9 +13,9 @@ function y({
|
|
|
13
13
|
const s = Math.max(1, Math.min(m, e)), l = {
|
|
14
14
|
"--g-progress-bar-width": `${s * 100 / e}%`
|
|
15
15
|
};
|
|
16
|
-
return /* @__PURE__ */ t(
|
|
16
|
+
return /* @__PURE__ */ t(p, { flexDirection: "column", children: [
|
|
17
17
|
o && /* @__PURE__ */ r(o, {}),
|
|
18
|
-
/* @__PURE__ */ r("div", { className: c(
|
|
18
|
+
/* @__PURE__ */ r("div", { className: c(n.root, i), style: l, children: /* @__PURE__ */ r(d, { children: /* @__PURE__ */ r("progress", { "aria-label": a, value: s, max: e }) }) })
|
|
19
19
|
] });
|
|
20
20
|
}
|
|
21
21
|
export {
|