@gusto/embedded-react-sdk 0.55.1 → 0.55.3

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.
Files changed (161) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/dist/components/Common/FieldLayout/FieldLayout.js +6 -6
  3. package/dist/components/Common/Fieldset/Fieldset.js +6 -6
  4. package/dist/components/Common/HorizontalFieldLayout/HorizontalFieldLayout.js +6 -6
  5. package/dist/components/Common/UI/Breadcrumbs/Breadcrumbs.js +1 -1
  6. package/dist/components/Common/UI/FileInput/FileInput.js +1 -1
  7. package/dist/components/Common/UI/MultiSelectComboBox/MultiSelectComboBox.js +58 -49
  8. package/dist/components/Common/UI/MultiSelectComboBox/MultiSelectComboBox.js.map +1 -1
  9. package/dist/components/Common/UI/MultiSelectComboBox/MultiSelectComboBox.module.scss.js +14 -10
  10. package/dist/components/Common/UI/MultiSelectComboBox/MultiSelectComboBox.module.scss.js.map +1 -1
  11. package/dist/components/Common/UI/MultiSelectComboBox/MultiSelectComboBoxTypes.d.ts +4 -0
  12. package/dist/components/Common/UI/ProgressBar/ProgressBar.js +4 -4
  13. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +6 -3
  14. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
  15. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +6 -3
  16. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
  17. package/dist/components/Company/AssignSignatory/useAssignSignatory.js +8 -5
  18. package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
  19. package/dist/components/Company/BankAccount/BankAccountForm/context.js +6 -3
  20. package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
  21. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.d.ts +4 -0
  22. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  23. package/dist/components/Company/DocumentSigner/DocumentList/List.js +11 -8
  24. package/dist/components/Company/DocumentSigner/DocumentList/List.js.map +1 -1
  25. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +6 -3
  26. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  27. package/dist/components/Company/FederalTaxes/useFederalTaxes.js +11 -8
  28. package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
  29. package/dist/components/Company/Industry/Context.js +9 -6
  30. package/dist/components/Company/Industry/Context.js.map +1 -1
  31. package/dist/components/Company/Locations/LocationForm/useLocationForm.js +6 -3
  32. package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
  33. package/dist/components/Company/Locations/LocationsList/useLocationsList.js +6 -3
  34. package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
  35. package/dist/components/Company/OnboardingOverview/context.js +6 -3
  36. package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
  37. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +6 -3
  38. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
  39. package/dist/components/Company/StateTaxes/StateTaxesList/context.js +6 -3
  40. package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
  41. package/dist/components/Company/StateTaxes/TaxRateManagement/context.js +6 -3
  42. package/dist/components/Company/StateTaxes/TaxRateManagement/context.js.map +1 -1
  43. package/dist/components/Employee/Compensation/shared/useJobForm/useJobForm.js +116 -116
  44. package/dist/components/Employee/Compensation/shared/useJobForm/useJobForm.js.map +1 -1
  45. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/DocumentList.d.ts +4 -0
  46. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/DocumentList.js +19 -19
  47. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  48. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/List.js +16 -13
  49. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/List.js.map +1 -1
  50. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js +6 -3
  51. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  52. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentSigner.d.ts +4 -0
  53. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentSigner.js.map +1 -1
  54. package/dist/components/Employee/FederalTaxes/shared/FederalTaxesView.js +1 -1
  55. package/dist/components/Employee/PaymentMethod/management/PaymentMethodBankForm.js +4 -4
  56. package/dist/components/Employee/PaymentMethod/onboarding/BankForm.js +4 -4
  57. package/dist/components/Flow/Flow.js +1 -1
  58. package/dist/components/Payroll/GrossUpModal/GrossUpModal.js +3 -2
  59. package/dist/components/Payroll/GrossUpModal/GrossUpModal.js.map +1 -1
  60. package/dist/components/Payroll/OffCycleCreation/OffCycleCreation.js +75 -71
  61. package/dist/components/Payroll/OffCycleCreation/OffCycleCreation.js.map +1 -1
  62. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.d.ts +7 -0
  63. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js +202 -165
  64. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js.map +1 -1
  65. package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.d.ts +1 -0
  66. package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.js +88 -82
  67. package/dist/components/Payroll/PayrollConfiguration/usePayrollConfigurationData.js.map +1 -1
  68. package/dist/components/Payroll/PayrollExecutionFlow/PayrollExecutionFlow.d.ts +1 -0
  69. package/dist/components/Payroll/PayrollExecutionFlow/PayrollExecutionFlow.js.map +1 -1
  70. package/dist/components/Payroll/PayrollExecutionFlow/payrollExecutionMachine.js +73 -48
  71. package/dist/components/Payroll/PayrollExecutionFlow/payrollExecutionMachine.js.map +1 -1
  72. package/dist/components/Payroll/PayrollFlow/PayrollFlow.d.ts +1 -1
  73. package/dist/components/Payroll/PayrollFlow/PayrollFlow.js +22 -20
  74. package/dist/components/Payroll/PayrollFlow/PayrollFlow.js.map +1 -1
  75. package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.d.ts +3 -0
  76. package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.js +22 -20
  77. package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.js.map +1 -1
  78. package/dist/components/Payroll/PayrollLanding/PayrollLanding.d.ts +2 -0
  79. package/dist/components/Payroll/PayrollLanding/PayrollLanding.js +34 -26
  80. package/dist/components/Payroll/PayrollLanding/PayrollLanding.js.map +1 -1
  81. package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.d.ts +4 -0
  82. package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.js +51 -43
  83. package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.js.map +1 -1
  84. package/dist/components/Payroll/PayrollList/PayrollList.d.ts +2 -0
  85. package/dist/components/Payroll/PayrollList/PayrollList.js +48 -47
  86. package/dist/components/Payroll/PayrollList/PayrollList.js.map +1 -1
  87. package/dist/components/Payroll/PayrollList/PayrollListPresentation.d.ts +2 -1
  88. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +44 -43
  89. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
  90. package/dist/components/Payroll/PayrollOverview/PayrollOverview.d.ts +15 -1
  91. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js +188 -172
  92. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js.map +1 -1
  93. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.d.ts +3 -1
  94. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +110 -118
  95. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
  96. package/dist/components/Payroll/PayrollReceipts/PayrollReceipts.js +22 -16
  97. package/dist/components/Payroll/PayrollReceipts/PayrollReceipts.js.map +1 -1
  98. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js +58 -49
  99. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js.map +1 -1
  100. package/dist/components/Payroll/PrintChecks/PrintChecks.d.ts +21 -0
  101. package/dist/components/Payroll/PrintChecks/PrintChecks.js +68 -0
  102. package/dist/components/Payroll/PrintChecks/PrintChecks.js.map +1 -0
  103. package/dist/components/Payroll/PrintChecks/PrintChecksBanner/PrintChecksBanner.d.ts +9 -0
  104. package/dist/components/Payroll/PrintChecks/PrintChecksBanner/PrintChecksBanner.js +34 -0
  105. package/dist/components/Payroll/PrintChecks/PrintChecksBanner/PrintChecksBanner.js.map +1 -0
  106. package/dist/components/Payroll/PrintChecks/PrintChecksBanner/index.d.ts +1 -0
  107. package/dist/components/Payroll/PrintChecks/PrintChecksComponents.d.ts +48 -0
  108. package/dist/components/Payroll/PrintChecks/PrintChecksComponents.js +26 -0
  109. package/dist/components/Payroll/PrintChecks/PrintChecksComponents.js.map +1 -0
  110. package/dist/components/Payroll/PrintChecks/PrintChecksFailure/PrintChecksFailure.d.ts +14 -0
  111. package/dist/components/Payroll/PrintChecks/PrintChecksFailure/PrintChecksFailure.js +47 -0
  112. package/dist/components/Payroll/PrintChecks/PrintChecksFailure/PrintChecksFailure.js.map +1 -0
  113. package/dist/components/Payroll/PrintChecks/PrintChecksFailure/index.d.ts +1 -0
  114. package/dist/components/Payroll/PrintChecks/PrintChecksForm/PrintChecksForm.d.ts +16 -0
  115. package/dist/components/Payroll/PrintChecks/PrintChecksForm/PrintChecksForm.js +144 -0
  116. package/dist/components/Payroll/PrintChecks/PrintChecksForm/PrintChecksForm.js.map +1 -0
  117. package/dist/components/Payroll/PrintChecks/PrintChecksForm/index.d.ts +1 -0
  118. package/dist/components/Payroll/PrintChecks/PrintChecksSummary/PrintChecksSummary.d.ts +14 -0
  119. package/dist/components/Payroll/PrintChecks/PrintChecksSummary/PrintChecksSummary.js +39 -0
  120. package/dist/components/Payroll/PrintChecks/PrintChecksSummary/PrintChecksSummary.js.map +1 -0
  121. package/dist/components/Payroll/PrintChecks/PrintChecksSummary/index.d.ts +1 -0
  122. package/dist/components/Payroll/PrintChecks/index.d.ts +2 -0
  123. package/dist/components/Payroll/PrintChecks/printChecksStateMachine.d.ts +33 -0
  124. package/dist/components/Payroll/PrintChecks/printChecksStateMachine.js +93 -0
  125. package/dist/components/Payroll/PrintChecks/printChecksStateMachine.js.map +1 -0
  126. package/dist/components/Payroll/PrintChecks/types.d.ts +14 -0
  127. package/dist/components/Payroll/helpers.d.ts +0 -15
  128. package/dist/components/Payroll/helpers.js +13 -18
  129. package/dist/components/Payroll/helpers.js.map +1 -1
  130. package/dist/components/Payroll/index.d.ts +2 -0
  131. package/dist/components/Payroll/index.js +26 -24
  132. package/dist/components/Payroll/index.js.map +1 -1
  133. package/dist/components/Payroll/usePreparedPayrollData.js +15 -12
  134. package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
  135. package/dist/i18n/I18n.js +4 -0
  136. package/dist/i18n/I18n.js.map +1 -1
  137. package/dist/i18n/en/Company.DocumentList.json.js +34 -32
  138. package/dist/i18n/en/Company.DocumentList.json.js.map +1 -1
  139. package/dist/i18n/en/Employee.DocumentSigner.json.js +24 -22
  140. package/dist/i18n/en/Employee.DocumentSigner.json.js.map +1 -1
  141. package/dist/i18n/en/Payroll.PayrollConfiguration.json.js +9 -9
  142. package/dist/i18n/en/Payroll.PayrollOverview.json.js +36 -36
  143. package/dist/i18n/en/Payroll.PayrollReceipts.json.js +2 -2
  144. package/dist/i18n/en/Payroll.PrintChecksBanner.json.js +14 -0
  145. package/dist/i18n/en/Payroll.PrintChecksBanner.json.js.map +1 -0
  146. package/dist/i18n/en/Payroll.PrintChecksFailure.json.js +12 -0
  147. package/dist/i18n/en/Payroll.PrintChecksFailure.json.js.map +1 -0
  148. package/dist/i18n/en/Payroll.PrintChecksForm.json.js +28 -0
  149. package/dist/i18n/en/Payroll.PrintChecksForm.json.js.map +1 -0
  150. package/dist/i18n/en/Payroll.PrintChecksSummary.json.js +14 -0
  151. package/dist/i18n/en/Payroll.PrintChecksSummary.json.js.map +1 -0
  152. package/dist/i18n/types.d.ts +376 -8
  153. package/dist/models/external.d.ts +3 -0
  154. package/dist/partner-hook-utils/form/buildFormSchema.js +60 -54
  155. package/dist/partner-hook-utils/form/buildFormSchema.js.map +1 -1
  156. package/dist/shared/constants.d.ts +28 -0
  157. package/dist/shared/constants.js +61 -50
  158. package/dist/shared/constants.js.map +1 -1
  159. package/dist/style.css +1 -1
  160. package/docs/guides/endpoint-inventory.json +26 -0
  161. package/package.json +6 -6
package/CHANGELOG.md CHANGED
@@ -1,5 +1,41 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.55.3](https://github.com/Gusto/embedded-react-sdk/compare/v0.55.2...v0.55.3) (2026-08-24)
4
+
5
+ ### Features & Enhancements
6
+
7
+ - Add a `readOnly` prop to `PayrollOverview` to hide the edit and cancel actions while keeping submit and receipt/paystub actions available, for read-only payroll review deep links ([#2616](https://github.com/Gusto/embedded-react-sdk/issues/2616))
8
+ - Increase the default pagination page size from 10 to 25 in `PayrollConfiguration` and `PayrollOverview` employee tables ([#2614](https://github.com/Gusto/embedded-react-sdk/issues/2614))
9
+ - Add partner dictionary overrides for form descriptions ([#2613](https://github.com/Gusto/embedded-react-sdk/issues/2613))
10
+ - Show employee job titles in the off-cycle payroll employee picker ([#2617](https://github.com/Gusto/embedded-react-sdk/issues/2617))
11
+
12
+ ### Fixes
13
+
14
+ - Always show the payroll deadline banner, regardless of payment method ([#2611](https://github.com/Gusto/embedded-react-sdk/issues/2611))
15
+ - Fix a validation error when updating an employee's hire date while a secondary job has a future-dated effective date ([#2628](https://github.com/Gusto/embedded-react-sdk/issues/2628))
16
+
17
+ ### Chores & Maintenance
18
+
19
+ - Bump dev dependencies (`@microsoft/api-extractor`, `@storybook/addon-a11y`, `@vitest/coverage-v8`)
20
+
21
+ ## [0.55.2](https://github.com/Gusto/embedded-react-sdk/compare/v0.55.1...v0.55.2) (2026-08-21)
22
+
23
+ ### Features & Enhancements
24
+
25
+ - Add `PrintChecks` component for generating and printing payroll checks, embedded in `PayrollOverview` with a banner prompt and full form/summary/failure screens ([#2584](https://github.com/Gusto/embedded-react-sdk/issues/2584), [#2585](https://github.com/Gusto/embedded-react-sdk/issues/2585), [#2586](https://github.com/Gusto/embedded-react-sdk/issues/2586), [#2587](https://github.com/Gusto/embedded-react-sdk/issues/2587), [#2588](https://github.com/Gusto/embedded-react-sdk/issues/2588))
26
+ - Add `withOffcyclePayroll` prop to control off-cycle payroll CTA visibility in `PayrollLanding` ([#2612](https://github.com/Gusto/embedded-react-sdk/issues/2612))
27
+ - Make license text in payroll receipts a clickable link ([#2606](https://github.com/Gusto/embedded-react-sdk/issues/2606))
28
+
29
+ ### Fixes
30
+
31
+ - Fix form validation incorrectly running base validators on dynamically excluded fields ([#2602](https://github.com/Gusto/embedded-react-sdk/issues/2602))
32
+ - Show an already-processed banner and cancel-only overview in `PayrollConfiguration` when the payroll has already been processed ([#2605](https://github.com/Gusto/embedded-react-sdk/issues/2605))
33
+ - Sort payroll employee lists alphabetically by last name ([#2607](https://github.com/Gusto/embedded-react-sdk/issues/2607))
34
+
35
+ ### Chores & Maintenance
36
+
37
+ - Bump dev dependencies (`@hookform/resolvers`)
38
+
3
39
  ## [0.55.1](https://github.com/Gusto/embedded-react-sdk/compare/v0.55.0...v0.55.1) (2026-08-20)
4
40
 
5
41
  ### Features & Enhancements
@@ -1,9 +1,9 @@
1
1
  import { jsxs as s, jsx as e } from "react/jsx-runtime";
2
2
  import t from "classnames";
3
- import { FieldCaption as F } from "../FieldCaption/FieldCaption.js";
3
+ import { FieldDescription as F } from "../FieldDescription/FieldDescription.js";
4
+ import { FieldCaption as N } from "../FieldCaption/FieldCaption.js";
4
5
  import r from "./FieldLayout.module.scss.js";
5
- import { getDataProps as N } from "../../../helpers/getDataProps.js";
6
- import { FieldDescription as g } from "../FieldDescription/FieldDescription.js";
6
+ import { getDataProps as g } from "../../../helpers/getDataProps.js";
7
7
  import { FieldErrorMessage as x } from "../FieldErrorMessage/FieldErrorMessage.js";
8
8
  const A = ({
9
9
  label: l,
@@ -18,7 +18,7 @@ const A = ({
18
18
  className: f,
19
19
  withErrorIcon: h = !0,
20
20
  ...D
21
- }) => /* @__PURE__ */ s("div", { className: t(r.root, f), ...N(D), children: [
21
+ }) => /* @__PURE__ */ s("div", { className: t(r.root, f), ...g(D), children: [
22
22
  /* @__PURE__ */ s(
23
23
  "div",
24
24
  {
@@ -28,7 +28,7 @@ const A = ({
28
28
  }),
29
29
  children: [
30
30
  /* @__PURE__ */ e(
31
- F,
31
+ N,
32
32
  {
33
33
  htmlFor: p,
34
34
  isRequired: c,
@@ -36,7 +36,7 @@ const A = ({
36
36
  children: l
37
37
  }
38
38
  ),
39
- /* @__PURE__ */ e(g, { id: a, children: i })
39
+ /* @__PURE__ */ e(F, { id: a, children: i })
40
40
  ]
41
41
  }
42
42
  ),
@@ -1,10 +1,10 @@
1
1
  import { jsxs as a, jsx as r } from "react/jsx-runtime";
2
2
  import { useId as f } from "react";
3
3
  import l from "classnames";
4
+ import { FieldDescription as g } from "../FieldDescription/FieldDescription.js";
4
5
  import e from "./Fieldset.module.scss.js";
5
- import { getDataProps as g } from "../../../helpers/getDataProps.js";
6
- import { FieldCaption as h } from "../FieldCaption/FieldCaption.js";
7
- import { FieldDescription as D } from "../FieldDescription/FieldDescription.js";
6
+ import { getDataProps as h } from "../../../helpers/getDataProps.js";
7
+ import { FieldCaption as D } from "../FieldCaption/FieldCaption.js";
8
8
  import { FieldErrorMessage as F } from "../FieldErrorMessage/FieldErrorMessage.js";
9
9
  const y = ({
10
10
  children: d,
@@ -22,7 +22,7 @@ const y = ({
22
22
  {
23
23
  className: l(e.root, c),
24
24
  "aria-describedby": i ? t : void 0,
25
- ...g(p),
25
+ ...h(p),
26
26
  children: [
27
27
  /* @__PURE__ */ a(
28
28
  "div",
@@ -33,7 +33,7 @@ const y = ({
33
33
  }),
34
34
  children: [
35
35
  /* @__PURE__ */ r(
36
- h,
36
+ D,
37
37
  {
38
38
  as: "legend",
39
39
  isRequired: m,
@@ -41,7 +41,7 @@ const y = ({
41
41
  children: n
42
42
  }
43
43
  ),
44
- /* @__PURE__ */ r(D, { children: s })
44
+ /* @__PURE__ */ r(g, { children: s })
45
45
  ]
46
46
  }
47
47
  ),
@@ -1,9 +1,9 @@
1
1
  import { jsxs as f, jsx as e } from "react/jsx-runtime";
2
2
  import N from "classnames";
3
+ import { FieldDescription as b } from "../FieldDescription/FieldDescription.js";
3
4
  import r from "./HorizontalFieldLayout.module.scss.js";
4
- import { getDataProps as b } from "../../../helpers/getDataProps.js";
5
- import { VisuallyHidden as g } from "../VisuallyHidden/VisuallyHidden.js";
6
- import { FieldDescription as w } from "../FieldDescription/FieldDescription.js";
5
+ import { getDataProps as g } from "../../../helpers/getDataProps.js";
6
+ import { VisuallyHidden as w } from "../VisuallyHidden/VisuallyHidden.js";
7
7
  import { FieldErrorMessage as x } from "../FieldErrorMessage/FieldErrorMessage.js";
8
8
  const M = ({
9
9
  label: m,
@@ -29,11 +29,11 @@ const M = ({
29
29
  },
30
30
  p
31
31
  ),
32
- ...b(h),
32
+ ...g(h),
33
33
  children: [
34
34
  /* @__PURE__ */ e("div", { className: r.children, children: c }),
35
- i ? /* @__PURE__ */ e(g, { children: t }) : t,
36
- /* @__PURE__ */ e(w, { id: a, className: r.description, children: o }),
35
+ i ? /* @__PURE__ */ e(w, { children: t }) : t,
36
+ /* @__PURE__ */ e(b, { id: a, className: r.description, children: o }),
37
37
  /* @__PURE__ */ e(x, { id: n, className: r.errorMessage, children: s })
38
38
  ]
39
39
  }
@@ -1,9 +1,9 @@
1
1
  import { jsx as l } from "react/jsx-runtime";
2
2
  import h from "classnames";
3
- import { Flex as u } from "../../Flex/Flex.js";
4
3
  import { BreadcrumbsDefaults as C } from "./BreadcrumbsTypes.js";
5
4
  import i from "./Breadcrumbs.module.scss.js";
6
5
  import { applyMissingDefaults as x } from "../../../../helpers/applyMissingDefaults.js";
6
+ import { Flex as u } from "../../Flex/Flex.js";
7
7
  function P(f) {
8
8
  const p = x(f, C), {
9
9
  className: s,
@@ -7,13 +7,13 @@ import { FileInputDefaults as K } from "./FileInputTypes.js";
7
7
  import n from "./FileInput.module.scss.js";
8
8
  import { applyMissingDefaults as L } from "../../../../helpers/applyMissingDefaults.js";
9
9
  import { FieldLayout as O } from "../../FieldLayout/FieldLayout.js";
10
- import { Flex as y } from "../../Flex/Flex.js";
11
10
  import { ButtonIcon as R } from "../Button/ButtonIcon.js";
12
11
  import W from "../../../../assets/icons/icon-trashcan.svg.js";
13
12
  import Z from "../../../../assets/icons/icon-file-outline.svg.js";
14
13
  import $ from "../../../../assets/icons/icon-file-pdf.svg.js";
15
14
  import H from "../../../../assets/icons/icon-file-png.svg.js";
16
15
  import V from "../../../../assets/icons/icon-file-jpg.svg.js";
16
+ import { Flex as y } from "../../Flex/Flex.js";
17
17
  function Q(i) {
18
18
  return i === "application/pdf" ? $ : i === "image/png" ? H : i === "image/jpeg" || i === "image/jpg" ? V : Z;
19
19
  }
@@ -1,74 +1,80 @@
1
- import { jsxs as d, jsx as t } from "react/jsx-runtime";
2
- import { useState as Q, useRef as C, useCallback as c, useMemo as m } from "react";
3
- import { ComboBox as W, Input as X, Button as Y, Popover as Z, Virtualizer as $, ListLayout as V, ListBox as ee, ListBoxItem as te } from "react-aria-components";
1
+ import { jsxs as c, jsx as r } from "react/jsx-runtime";
2
+ import { useState as Q, useRef as C, useCallback as m, useMemo as u } from "react";
3
+ import { ComboBox as W, Input as X, Button as Y, Popover as Z, Virtualizer as $, ListLayout as V, ListBox as ee, ListBoxItem as re } from "react-aria-components";
4
4
  import N from "classnames";
5
- import { useTranslation as re } from "react-i18next";
6
- import { useFieldIds as oe } from "../hooks/useFieldIds.js";
7
- import i from "./MultiSelectComboBox.module.scss.js";
8
- import { FieldLayout as ie } from "../../FieldLayout/FieldLayout.js";
9
- import { useComponentContext as ne } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
10
- import { useTheme as le } from "../../../../contexts/ThemeProvider/useTheme.js";
5
+ import { useTranslation as te } from "react-i18next";
6
+ import { useFieldIds as ie } from "../hooks/useFieldIds.js";
7
+ import t from "./MultiSelectComboBox.module.scss.js";
8
+ import { FieldLayout as oe } from "../../FieldLayout/FieldLayout.js";
9
+ import { FieldDescription as ne } from "../../FieldDescription/FieldDescription.js";
10
+ import { useComponentContext as le } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
11
+ import { useTheme as se } from "../../../../contexts/ThemeProvider/useTheme.js";
11
12
  /* empty css */
12
- import { useForkRef as se } from "../../../../hooks/useForkRef/useForkRef.js";
13
- import ae from "../../../../assets/icons/alert-circle.svg.js";
14
- import ce from "../../../../assets/icons/caret-down.svg.js";
15
- function ye({
16
- className: y,
13
+ import { useForkRef as ae } from "../../../../hooks/useForkRef/useForkRef.js";
14
+ import ce from "../../../../assets/icons/alert-circle.svg.js";
15
+ import me from "../../../../assets/icons/caret-down.svg.js";
16
+ function Le({
17
+ className: D,
17
18
  description: F,
18
19
  errorMessage: p,
19
20
  id: L,
20
- inputRef: T,
21
+ inputRef: y,
21
22
  isDisabled: f,
22
23
  isInvalid: h,
23
- isLoading: D,
24
+ isLoading: T,
24
25
  isRequired: R,
25
- label: u,
26
+ label: d,
26
27
  name: w,
27
28
  onBlur: b,
28
29
  onChange: n,
29
30
  options: l,
30
31
  placeholder: A,
31
- value: r = [],
32
+ value: i = [],
32
33
  shouldVisuallyHideLabel: O
33
34
  }) {
34
- const j = ne(), { t: s } = re("common"), { container: z } = le(), [E, v] = Q(""), o = C(null), I = C(null), M = se(T, I), P = c(() => {
35
+ const j = le(), { t: s } = te("common"), { container: z } = se(), [E, v] = Q(""), o = C(null), I = C(null), M = ae(y, I), P = m(() => {
35
36
  o.current = setTimeout(() => {
36
37
  o.current = null, b?.();
37
38
  }, 50);
38
- }, [b]), k = c(() => {
39
+ }, [b]), k = m(() => {
39
40
  o.current && (clearTimeout(o.current), o.current = null);
40
- }, []), a = m(() => new Set(r), [r]), g = m(
41
+ }, []), a = u(() => new Set(i), [i]), x = u(
41
42
  () => l.filter((e) => !a.has(e.value)).map((e) => ({
42
43
  label: e.label,
43
- value: e.value
44
+ value: e.value,
45
+ description: e.description
44
46
  })),
45
47
  [l, a]
46
- ), x = m(
48
+ ), g = u(
47
49
  () => l.filter((e) => a.has(e.value)),
48
50
  [l, a]
49
- ), H = m(
50
- () => g.map((e) => ({ name: e.label, id: e.value })),
51
- [g]
52
- ), K = c(
51
+ ), H = u(
52
+ () => x.map((e) => ({
53
+ name: e.label,
54
+ id: e.value,
55
+ description: e.description
56
+ })),
57
+ [x]
58
+ ), K = m(
53
59
  (e) => {
54
- e && (n?.([...r, e.toString()]), v(""), I.current?.blur());
60
+ e && (n?.([...i, e.toString()]), v(""), I.current?.blur());
55
61
  },
56
- [r, n]
57
- ), U = c(
62
+ [i, n]
63
+ ), U = m(
58
64
  (e) => {
59
- n?.(r.filter((J) => J !== e));
65
+ n?.(i.filter((J) => J !== e));
60
66
  },
61
- [r, n]
62
- ), B = (D ? s("status.loadingOptions") : void 0) ?? F, { inputId: S, errorMessageId: _, descriptionId: q, ariaDescribedBy: G } = oe({
67
+ [i, n]
68
+ ), B = (T ? s("status.loadingOptions") : void 0) ?? F, { inputId: S, errorMessageId: _, descriptionId: q, ariaDescribedBy: G } = ie({
63
69
  inputId: L,
64
70
  errorMessage: p,
65
71
  description: B
66
72
  });
67
- return /* @__PURE__ */ d("div", { className: N(i.root, y), children: [
68
- /* @__PURE__ */ t(
69
- ie,
73
+ return /* @__PURE__ */ c("div", { className: N(t.root, D), children: [
74
+ /* @__PURE__ */ r(
75
+ oe,
70
76
  {
71
- label: u,
77
+ label: d,
72
78
  htmlFor: S,
73
79
  errorMessage: p,
74
80
  errorMessageId: _,
@@ -76,12 +82,12 @@ function ye({
76
82
  isRequired: R,
77
83
  description: B,
78
84
  shouldVisuallyHideLabel: O,
79
- className: i.comboBoxField,
85
+ className: t.comboBoxField,
80
86
  withErrorIcon: !1,
81
- children: /* @__PURE__ */ d(
87
+ children: /* @__PURE__ */ c(
82
88
  W,
83
89
  {
84
- "aria-label": u,
90
+ "aria-label": d,
85
91
  "aria-describedby": G,
86
92
  className: "react-aria-ComboBox-root",
87
93
  isDisabled: f,
@@ -94,7 +100,7 @@ function ye({
94
100
  id: S,
95
101
  name: w,
96
102
  children: [
97
- /* @__PURE__ */ t(
103
+ /* @__PURE__ */ r(
98
104
  X,
99
105
  {
100
106
  ref: M,
@@ -103,17 +109,20 @@ function ye({
103
109
  onFocus: k
104
110
  }
105
111
  ),
106
- /* @__PURE__ */ t(Y, { children: /* @__PURE__ */ d("div", { "aria-hidden": "true", className: i.icons, children: [
107
- h && /* @__PURE__ */ t(ae, { fontSize: 16 }),
108
- /* @__PURE__ */ t(ce, { title: s("icons.selectArrow") })
112
+ /* @__PURE__ */ r(Y, { children: /* @__PURE__ */ c("div", { "aria-hidden": "true", className: t.icons, children: [
113
+ h && /* @__PURE__ */ r(ce, { fontSize: 16 }),
114
+ /* @__PURE__ */ r(me, { title: s("icons.selectArrow") })
109
115
  ] }) }),
110
- /* @__PURE__ */ t(
116
+ /* @__PURE__ */ r(
111
117
  Z,
112
118
  {
113
- className: N(i.popover, "react-aria-Popover"),
119
+ className: N(t.popover, "react-aria-Popover"),
114
120
  UNSTABLE_portalContainer: z.current ?? void 0,
115
121
  maxHeight: 320,
116
- children: /* @__PURE__ */ t($, { layout: V, children: /* @__PURE__ */ t(ee, { items: H, children: (e) => /* @__PURE__ */ t(te, { children: e.name }, e.id) }) })
122
+ children: /* @__PURE__ */ r($, { layout: V, children: /* @__PURE__ */ r(ee, { items: H, children: (e) => /* @__PURE__ */ c(re, { textValue: e.name, children: [
123
+ /* @__PURE__ */ r("div", { className: t.optionLabel, children: e.name }),
124
+ e.description && /* @__PURE__ */ r(ne, { className: t.optionDescription, children: e.description })
125
+ ] }, e.id) }) })
117
126
  }
118
127
  )
119
128
  ]
@@ -121,7 +130,7 @@ function ye({
121
130
  )
122
131
  }
123
132
  ),
124
- x.length > 0 && /* @__PURE__ */ t("div", { className: i.chips, role: "list", "aria-label": s("labels.selectedItems", { label: u }), children: x.map((e) => /* @__PURE__ */ t("span", { role: "listitem", children: /* @__PURE__ */ t(
133
+ g.length > 0 && /* @__PURE__ */ r("div", { className: t.chips, role: "list", "aria-label": s("labels.selectedItems", { label: d }), children: g.map((e) => /* @__PURE__ */ r("span", { role: "listitem", children: /* @__PURE__ */ r(
125
134
  j.Badge,
126
135
  {
127
136
  status: "info",
@@ -136,6 +145,6 @@ function ye({
136
145
  ] });
137
146
  }
138
147
  export {
139
- ye as MultiSelectComboBox
148
+ Le as MultiSelectComboBox
140
149
  };
141
150
  //# sourceMappingURL=MultiSelectComboBox.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"MultiSelectComboBox.js","sources":["../../../../../src/components/Common/UI/MultiSelectComboBox/MultiSelectComboBox.tsx"],"sourcesContent":["import { useCallback, useMemo, useRef, useState } from 'react'\nimport type { Key } from 'react-aria-components'\nimport {\n ComboBox as AriaComboBox,\n Button,\n Input,\n ListBox,\n ListBoxItem,\n ListLayout,\n Popover,\n Virtualizer,\n} from 'react-aria-components'\nimport classNames from 'classnames'\nimport { useTranslation } from 'react-i18next'\nimport { useFieldIds } from '../hooks/useFieldIds'\nimport styles from './MultiSelectComboBox.module.scss'\nimport type { MultiSelectComboBoxProps } from './MultiSelectComboBoxTypes'\nimport { FieldLayout } from '@/components/Common/FieldLayout'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useTheme } from '@/contexts/ThemeProvider'\nimport { useForkRef } from '@/hooks/useForkRef/useForkRef'\nimport AlertCircle from '@/assets/icons/alert-circle.svg?react'\nimport CaretDown from '@/assets/icons/caret-down.svg?react'\n\n/**\n * Combo box that lets the user pick multiple options, rendering each selection as a dismissable chip below the input.\n *\n * @param props - See {@link MultiSelectComboBoxProps}.\n * @returns The rendered multi-select combo box field.\n * @internal\n */\nexport function MultiSelectComboBox({\n className,\n description,\n errorMessage,\n id,\n inputRef: inputRefFromProps,\n isDisabled,\n isInvalid,\n isLoading,\n isRequired,\n label,\n name,\n onBlur,\n onChange,\n options,\n placeholder,\n value: selectedValues = [],\n shouldVisuallyHideLabel,\n}: MultiSelectComboBoxProps) {\n const Components = useComponentContext()\n const { t } = useTranslation('common')\n const { container } = useTheme()\n const [inputValue, setInputValue] = useState('')\n const blurTimeoutRef = useRef<ReturnType<typeof setTimeout> | null>(null)\n const internalInputRef = useRef<HTMLInputElement>(null)\n const inputRef = useForkRef(inputRefFromProps, internalInputRef)\n\n const handleInputBlur = useCallback(() => {\n blurTimeoutRef.current = setTimeout(() => {\n blurTimeoutRef.current = null\n onBlur?.()\n }, 50)\n }, [onBlur])\n\n const handleInputFocus = useCallback(() => {\n if (blurTimeoutRef.current) {\n clearTimeout(blurTimeoutRef.current)\n blurTimeoutRef.current = null\n }\n }, [])\n\n const selectedSet = useMemo(() => new Set(selectedValues), [selectedValues])\n\n const availableOptions = useMemo(\n () =>\n options\n .filter(option => !selectedSet.has(option.value))\n .map(option => ({\n label: option.label,\n value: option.value,\n })),\n [options, selectedSet],\n )\n\n const selectedOptions = useMemo(\n () => options.filter(option => selectedSet.has(option.value)),\n [options, selectedSet],\n )\n\n const items = useMemo(\n () => availableOptions.map(option => ({ name: option.label, id: option.value })),\n [availableOptions],\n )\n\n const handleSelectionChange = useCallback(\n (key: Key | null) => {\n if (!key) return\n onChange?.([...selectedValues, key.toString()])\n setInputValue('')\n internalInputRef.current?.blur()\n },\n [selectedValues, onChange],\n )\n\n const handleDismiss = useCallback(\n (value: string) => {\n onChange?.(selectedValues.filter(v => v !== value))\n },\n [selectedValues, onChange],\n )\n\n const loadingDescription = isLoading ? t('status.loadingOptions') : undefined\n const displayDescription = loadingDescription ?? description\n\n const { inputId, errorMessageId, descriptionId, ariaDescribedBy } = useFieldIds({\n inputId: id,\n errorMessage,\n description: displayDescription,\n })\n\n return (\n <div className={classNames(styles.root, className)}>\n <FieldLayout\n label={label}\n htmlFor={inputId}\n errorMessage={errorMessage}\n errorMessageId={errorMessageId}\n descriptionId={descriptionId}\n isRequired={isRequired}\n description={displayDescription}\n shouldVisuallyHideLabel={shouldVisuallyHideLabel}\n className={styles.comboBoxField}\n withErrorIcon={false}\n >\n <AriaComboBox\n aria-label={label}\n aria-describedby={ariaDescribedBy}\n className={'react-aria-ComboBox-root'}\n isDisabled={isDisabled}\n isInvalid={isInvalid}\n menuTrigger=\"focus\"\n inputValue={inputValue}\n onInputChange={setInputValue}\n selectedKey={null}\n onSelectionChange={handleSelectionChange}\n id={inputId}\n name={name}\n >\n <Input\n ref={inputRef}\n placeholder={placeholder}\n onBlur={handleInputBlur}\n onFocus={handleInputFocus}\n />\n <Button>\n <div aria-hidden=\"true\" className={styles.icons}>\n {isInvalid && <AlertCircle fontSize={16} />}\n <CaretDown title={t('icons.selectArrow')} />\n </div>\n </Button>\n\n <Popover\n className={classNames(styles.popover, 'react-aria-Popover')}\n UNSTABLE_portalContainer={container.current ?? undefined}\n maxHeight={320}\n >\n <Virtualizer layout={ListLayout}>\n <ListBox items={items}>\n {item => <ListBoxItem key={item.id}>{item.name}</ListBoxItem>}\n </ListBox>\n </Virtualizer>\n </Popover>\n </AriaComboBox>\n </FieldLayout>\n\n {selectedOptions.length > 0 && (\n <div className={styles.chips} role=\"list\" aria-label={t('labels.selectedItems', { label })}>\n {selectedOptions.map(option => (\n <span key={option.value} role=\"listitem\">\n <Components.Badge\n status=\"info\"\n onDismiss={() => {\n handleDismiss(option.value)\n }}\n dismissAriaLabel={t('labels.removeItem', { label: option.label })}\n isDisabled={isDisabled}\n >\n {option.label}\n </Components.Badge>\n </span>\n ))}\n </div>\n )}\n </div>\n )\n}\n"],"names":["MultiSelectComboBox","className","description","errorMessage","id","inputRefFromProps","isDisabled","isInvalid","isLoading","isRequired","label","name","onBlur","onChange","options","placeholder","selectedValues","shouldVisuallyHideLabel","Components","useComponentContext","t","useTranslation","container","useTheme","inputValue","setInputValue","useState","blurTimeoutRef","useRef","internalInputRef","inputRef","useForkRef","handleInputBlur","useCallback","handleInputFocus","selectedSet","useMemo","availableOptions","option","selectedOptions","items","handleSelectionChange","key","handleDismiss","value","v","displayDescription","inputId","errorMessageId","descriptionId","ariaDescribedBy","useFieldIds","classNames","styles","jsx","FieldLayout","jsxs","AriaComboBox","Input","Button","AlertCircle","CaretDown","Popover","Virtualizer","ListLayout","ListBox","item","ListBoxItem"],"mappings":";;;;;;;;;;;;;;AA+BO,SAASA,GAAoB;AAAA,EAClC,WAAAC;AAAA,EACA,aAAAC;AAAA,EACA,cAAAC;AAAA,EACA,IAAAC;AAAA,EACA,UAAUC;AAAA,EACV,YAAAC;AAAA,EACA,WAAAC;AAAA,EACA,WAAAC;AAAA,EACA,YAAAC;AAAA,EACA,OAAAC;AAAA,EACA,MAAAC;AAAA,EACA,QAAAC;AAAA,EACA,UAAAC;AAAA,EACA,SAAAC;AAAA,EACA,aAAAC;AAAA,EACA,OAAOC,IAAiB,CAAA;AAAA,EACxB,yBAAAC;AACF,GAA6B;AAC3B,QAAMC,IAAaC,GAAA,GACb,EAAE,GAAAC,EAAA,IAAMC,GAAe,QAAQ,GAC/B,EAAE,WAAAC,EAAA,IAAcC,GAAA,GAChB,CAACC,GAAYC,CAAa,IAAIC,EAAS,EAAE,GACzCC,IAAiBC,EAA6C,IAAI,GAClEC,IAAmBD,EAAyB,IAAI,GAChDE,IAAWC,GAAW1B,GAAmBwB,CAAgB,GAEzDG,IAAkBC,EAAY,MAAM;AACxC,IAAAN,EAAe,UAAU,WAAW,MAAM;AACxC,MAAAA,EAAe,UAAU,MACzBf,IAAA;AAAA,IACF,GAAG,EAAE;AAAA,EACP,GAAG,CAACA,CAAM,CAAC,GAELsB,IAAmBD,EAAY,MAAM;AACzC,IAAIN,EAAe,YACjB,aAAaA,EAAe,OAAO,GACnCA,EAAe,UAA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AAAgC,EAACS,GAAA,EAAY,QAAQC,GACnB,4BAACC,IAAA,EAAQ,OAAAzB,GACN,UAAA,CAAA0B,MAAQ,gBAAAZ,EAACa,MAA2B,UAAAD,EAAK,KAAA,GAAfA,EAAK,EAAe,GACjD,EAAA,CACF;AAAA,gBAAA;AAAA,cAAA;AAAA,YACF;AAAA,UAAA;AAAA,QAAA;AAAA,MACF;AAAA,IAAA;AAAA,IAGD3B,EAAgB,SAAS,KACxB,gBAAAe,EAAC,SAAI,WAAWD,EAAO,OAAO,MAAK,QAAO,cAAYjC,EAAE,wBAAwB,EAAE,OAAAV,EAAA,CAAO,GACtF,UAAA6B,EAAgB,IAAI,CAAAD,MACnB,gBAAAgB,EAAC,QAAA,EAAwB,MAAK,YAC5B,UAAA,gBAAAA;AAAA,MAACpC,EAAW;AAAA,MAAX;AAAA,QACC,QAAO;AAAA,QACP,WAAW,MAAM;AACf,UAAAyB,EAAcL,EAAO,KAAK;AAAA,QAC5B;AAAA,QACA,kBAAkBlB,EAAE,qBAAqB,EAAE,OAAOkB,EAAO,OAAO;AAAA,QAChE,YAAAhC;AAAA,QAEC,UAAAgC,EAAO;AAAA,MAAA;AAAA,IAAA,KATDA,EAAO,KAWlB,CACD,EAAA,CACH;AAAA,EAAA,GAEJ;AAEJ;"}
1
+ {"version":3,"file":"MultiSelectComboBox.js","sources":["../../../../../src/components/Common/UI/MultiSelectComboBox/MultiSelectComboBox.tsx"],"sourcesContent":["import { useCallback, useMemo, useRef, useState } from 'react'\nimport type { Key } from 'react-aria-components'\nimport {\n ComboBox as AriaComboBox,\n Button,\n Input,\n ListBox,\n ListBoxItem,\n ListLayout,\n Popover,\n Virtualizer,\n} from 'react-aria-components'\nimport classNames from 'classnames'\nimport { useTranslation } from 'react-i18next'\nimport { useFieldIds } from '../hooks/useFieldIds'\nimport styles from './MultiSelectComboBox.module.scss'\nimport type { MultiSelectComboBoxProps } from './MultiSelectComboBoxTypes'\nimport { FieldLayout } from '@/components/Common/FieldLayout'\nimport { FieldDescription } from '@/components/Common/FieldDescription'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useTheme } from '@/contexts/ThemeProvider'\nimport { useForkRef } from '@/hooks/useForkRef/useForkRef'\nimport AlertCircle from '@/assets/icons/alert-circle.svg?react'\nimport CaretDown from '@/assets/icons/caret-down.svg?react'\n\n/**\n * Combo box that lets the user pick multiple options, rendering each selection as a dismissable chip below the input.\n *\n * @param props - See {@link MultiSelectComboBoxProps}.\n * @returns The rendered multi-select combo box field.\n * @internal\n */\nexport function MultiSelectComboBox({\n className,\n description,\n errorMessage,\n id,\n inputRef: inputRefFromProps,\n isDisabled,\n isInvalid,\n isLoading,\n isRequired,\n label,\n name,\n onBlur,\n onChange,\n options,\n placeholder,\n value: selectedValues = [],\n shouldVisuallyHideLabel,\n}: MultiSelectComboBoxProps) {\n const Components = useComponentContext()\n const { t } = useTranslation('common')\n const { container } = useTheme()\n const [inputValue, setInputValue] = useState('')\n const blurTimeoutRef = useRef<ReturnType<typeof setTimeout> | null>(null)\n const internalInputRef = useRef<HTMLInputElement>(null)\n const inputRef = useForkRef(inputRefFromProps, internalInputRef)\n\n const handleInputBlur = useCallback(() => {\n blurTimeoutRef.current = setTimeout(() => {\n blurTimeoutRef.current = null\n onBlur?.()\n }, 50)\n }, [onBlur])\n\n const handleInputFocus = useCallback(() => {\n if (blurTimeoutRef.current) {\n clearTimeout(blurTimeoutRef.current)\n blurTimeoutRef.current = null\n }\n }, [])\n\n const selectedSet = useMemo(() => new Set(selectedValues), [selectedValues])\n\n const availableOptions = useMemo(\n () =>\n options\n .filter(option => !selectedSet.has(option.value))\n .map(option => ({\n label: option.label,\n value: option.value,\n description: option.description,\n })),\n [options, selectedSet],\n )\n\n const selectedOptions = useMemo(\n () => options.filter(option => selectedSet.has(option.value)),\n [options, selectedSet],\n )\n\n const items = useMemo(\n () =>\n availableOptions.map(option => ({\n name: option.label,\n id: option.value,\n description: option.description,\n })),\n [availableOptions],\n )\n\n const handleSelectionChange = useCallback(\n (key: Key | null) => {\n if (!key) return\n onChange?.([...selectedValues, key.toString()])\n setInputValue('')\n internalInputRef.current?.blur()\n },\n [selectedValues, onChange],\n )\n\n const handleDismiss = useCallback(\n (value: string) => {\n onChange?.(selectedValues.filter(v => v !== value))\n },\n [selectedValues, onChange],\n )\n\n const loadingDescription = isLoading ? t('status.loadingOptions') : undefined\n const displayDescription = loadingDescription ?? description\n\n const { inputId, errorMessageId, descriptionId, ariaDescribedBy } = useFieldIds({\n inputId: id,\n errorMessage,\n description: displayDescription,\n })\n\n return (\n <div className={classNames(styles.root, className)}>\n <FieldLayout\n label={label}\n htmlFor={inputId}\n errorMessage={errorMessage}\n errorMessageId={errorMessageId}\n descriptionId={descriptionId}\n isRequired={isRequired}\n description={displayDescription}\n shouldVisuallyHideLabel={shouldVisuallyHideLabel}\n className={styles.comboBoxField}\n withErrorIcon={false}\n >\n <AriaComboBox\n aria-label={label}\n aria-describedby={ariaDescribedBy}\n className={'react-aria-ComboBox-root'}\n isDisabled={isDisabled}\n isInvalid={isInvalid}\n menuTrigger=\"focus\"\n inputValue={inputValue}\n onInputChange={setInputValue}\n selectedKey={null}\n onSelectionChange={handleSelectionChange}\n id={inputId}\n name={name}\n >\n <Input\n ref={inputRef}\n placeholder={placeholder}\n onBlur={handleInputBlur}\n onFocus={handleInputFocus}\n />\n <Button>\n <div aria-hidden=\"true\" className={styles.icons}>\n {isInvalid && <AlertCircle fontSize={16} />}\n <CaretDown title={t('icons.selectArrow')} />\n </div>\n </Button>\n\n <Popover\n className={classNames(styles.popover, 'react-aria-Popover')}\n UNSTABLE_portalContainer={container.current ?? undefined}\n maxHeight={320}\n >\n <Virtualizer layout={ListLayout}>\n <ListBox items={items}>\n {item => (\n <ListBoxItem key={item.id} textValue={item.name}>\n <div className={styles.optionLabel}>{item.name}</div>\n {item.description && (\n <FieldDescription className={styles.optionDescription}>\n {item.description}\n </FieldDescription>\n )}\n </ListBoxItem>\n )}\n </ListBox>\n </Virtualizer>\n </Popover>\n </AriaComboBox>\n </FieldLayout>\n\n {selectedOptions.length > 0 && (\n <div className={styles.chips} role=\"list\" aria-label={t('labels.selectedItems', { label })}>\n {selectedOptions.map(option => (\n <span key={option.value} role=\"listitem\">\n <Components.Badge\n status=\"info\"\n onDismiss={() => {\n handleDismiss(option.value)\n }}\n dismissAriaLabel={t('labels.removeItem', { label: option.label })}\n isDisabled={isDisabled}\n >\n {option.label}\n </Components.Badge>\n </span>\n ))}\n </div>\n )}\n </div>\n )\n}\n"],"names":["MultiSelectComboBox","className","description","errorMessage","id","inputRefFromProps","isDisabled","isInvalid","isLoading","isRequired","label","name","onBlur","onChange","options","placeholder","selectedValues","shouldVisuallyHideLabel","Components","useComponentContext","t","useTranslation","container","useTheme","inputValue","setInputValue","useState","blurTimeoutRef","useRef","internalInputRef","inputRef","useForkRef","handleInputBlur","useCallback","handleInputFocus","selectedSet","useMemo","availableOptions","option","selectedOptions","items","handleSelectionChange","key","handleDismiss","value","v","displayDescription","inputId","errorMessageId","descriptionId","ariaDescribedBy","useFieldIds","classNames","styles","jsx","FieldLayout","jsxs","AriaComboBox","Input","Button","AlertCircle","CaretDown","Popover","Virtualizer","ListLayout","ListBox","item","ListBoxItem","FieldDescription"],"mappings":";;;;;;;;;;;;;;;AAgCO,SAASA,GAAoB;AAAA,EAClC,WAAAC;AAAA,EACA,aAAAC;AAAA,EACA,cAAAC;AAAA,EACA,IAAAC;AAAA,EACA,UAAUC;AAAA,EACV,YAAAC;AAAA,EACA,WAAAC;AAAA,EACA,WAAAC;AAAA,EACA,YAAAC;AAAA,EACA,OAAAC;AAAA,EACA,MAAAC;AAAA,EACA,QAAAC;AAAA,EACA,UAAAC;AAAA,EACA,SAAAC;AAAA,EACA,aAAAC;AAAA,EACA,OAAOC,IAAiB,CAAA;AAAA,EACxB,yBAAAC;AACF,GAA6B;AAC3B,QAAMC,IAAaC,GAAA,GACb,EAAE,GAAAC,EAAA,IAAMC,GAAe,QAAQ,GAC/B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,QAAO;AAAA,QACP,WAAW,MAAM;AACf,UAAAyB,EAAcL,EAAO,KAAK;AAAA,QAC5B;AAAA,QACA,kBAAkBlB,EAAE,qBAAqB,EAAE,OAAOkB,EAAO,OAAO;AAAA,QAChE,YAAAhC;AAAA,QAEC,UAAAgC,EAAO;AAAA,MAAA;AAAA,IAAA,KATDA,EAAO,KAWlB,CACD,EAAA,CACH;AAAA,EAAA,GAEJ;AAEJ;"}
@@ -1,16 +1,20 @@
1
- const o = "_root_kyxn6_1", c = "_comboBoxField_kyxn6_5", s = "_icons_kyxn6_71", _ = "_popover_kyxn6_81", n = "_chips_kyxn6_130", t = {
1
+ const o = "_root_1ynwu_1", n = "_comboBoxField_1ynwu_5", t = "_icons_1ynwu_71", i = "_popover_1ynwu_81", _ = "_optionLabel_1ynwu_130", c = "_optionDescription_1ynwu_134", s = "_chips_1ynwu_138", p = {
2
2
  root: o,
3
- comboBoxField: c,
4
- icons: s,
5
- popover: _,
6
- chips: n
3
+ comboBoxField: n,
4
+ icons: t,
5
+ popover: i,
6
+ optionLabel: _,
7
+ optionDescription: c,
8
+ chips: s
7
9
  };
8
10
  export {
9
- n as chips,
10
- c as comboBoxField,
11
- t as default,
12
- s as icons,
13
- _ as popover,
11
+ s as chips,
12
+ n as comboBoxField,
13
+ p as default,
14
+ t as icons,
15
+ c as optionDescription,
16
+ _ as optionLabel,
17
+ i as popover,
14
18
  o as root
15
19
  };
16
20
  //# sourceMappingURL=MultiSelectComboBox.module.scss.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"MultiSelectComboBox.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
1
+ {"version":3,"file":"MultiSelectComboBox.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;"}
@@ -15,6 +15,10 @@ export interface MultiSelectComboBoxOption {
15
15
  * Value of the option that will be passed to onChange
16
16
  */
17
17
  value: string;
18
+ /**
19
+ * Optional secondary text rendered beneath the label in the option list
20
+ */
21
+ description?: string;
18
22
  }
19
23
  /**
20
24
  * Props your `MultiSelectComboBox` implementation must accept from the component adapter.
@@ -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 { Flex as n } from "../../Flex/Flex.js";
4
- import p from "./ProgressBar.module.scss.js";
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(n, { flexDirection: "column", children: [
16
+ return /* @__PURE__ */ t(p, { flexDirection: "column", children: [
17
17
  o && /* @__PURE__ */ r(o, {}),
18
- /* @__PURE__ */ r("div", { className: c(p.root, i), style: l, children: /* @__PURE__ */ r(d, { children: /* @__PURE__ */ r("progress", { "aria-label": a, value: s, max: e }) }) })
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 {
@@ -9,12 +9,15 @@ import "@gusto/embedded-api/models/errors/gustoembeddederror";
9
9
  import "@gusto/embedded-api/models/errors/sdkvalidationerror";
10
10
  import "@gusto/embedded-api/models/errors/unprocessableentityerror";
11
11
  import "@gusto/embedded-api/models/errors/httpclienterrors";
12
+ import "dompurify";
13
+ import "../../../../contexts/LocaleProvider/useLocale.js";
12
14
  import "../../../../shared/constants.js";
13
15
  import "../../../../contexts/ComponentAdapter/useComponentContext.js";
16
+ import "../../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
14
17
  import { createCompoundContext as t } from "../../../Base/createCompoundContext.js";
15
- const [d, s] = t("CreateSignatoryContext");
18
+ const [f, v] = t("CreateSignatoryContext");
16
19
  export {
17
- s as CreateSignatoryProvider,
18
- d as useCreateSignatory
20
+ v as CreateSignatoryProvider,
21
+ f as useCreateSignatory
19
22
  };
20
23
  //# sourceMappingURL=useCreateSignatory.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useCreateSignatory.js","sources":["../../../../../src/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.ts"],"sourcesContent":["import { type Signatory } from '@gusto/embedded-api/models/components/signatory'\nimport { createCompoundContext } from '@/components/Base'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\n\n/**\n * Initial values for the {@link CreateSignatory} form fields. At least one field must be provided.\n *\n * @public\n */\nexport type CreateSignatoryDefaultValues = RequireAtLeastOne<\n Pick<Signatory, 'firstName' | 'lastName' | 'email' | 'title' | 'phone' | 'birthday'> &\n Pick<\n NonNullable<Signatory['homeAddress']>,\n 'street1' | 'street2' | 'city' | 'state' | 'zip'\n > & {\n ssn?: string\n }\n>\ntype CreateSignatoryContextType = {\n isPending: boolean\n currentSignatory?: Signatory\n}\n\nconst [useCreateSignatory, CreateSignatoryProvider] =\n createCompoundContext<CreateSignatoryContextType>('CreateSignatoryContext')\n\nexport {\n /** @internal */\n useCreateSignatory,\n /** @internal */\n CreateSignatoryProvider,\n}\n"],"names":["useCreateSignatory","CreateSignatoryProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;AAuBA,MAAM,CAACA,GAAoBC,CAAuB,IAChDC,EAAkD,wBAAwB;"}
1
+ {"version":3,"file":"useCreateSignatory.js","sources":["../../../../../src/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.ts"],"sourcesContent":["import { type Signatory } from '@gusto/embedded-api/models/components/signatory'\nimport { createCompoundContext } from '@/components/Base'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\n\n/**\n * Initial values for the {@link CreateSignatory} form fields. At least one field must be provided.\n *\n * @public\n */\nexport type CreateSignatoryDefaultValues = RequireAtLeastOne<\n Pick<Signatory, 'firstName' | 'lastName' | 'email' | 'title' | 'phone' | 'birthday'> &\n Pick<\n NonNullable<Signatory['homeAddress']>,\n 'street1' | 'street2' | 'city' | 'state' | 'zip'\n > & {\n ssn?: string\n }\n>\ntype CreateSignatoryContextType = {\n isPending: boolean\n currentSignatory?: Signatory\n}\n\nconst [useCreateSignatory, CreateSignatoryProvider] =\n createCompoundContext<CreateSignatoryContextType>('CreateSignatoryContext')\n\nexport {\n /** @internal */\n useCreateSignatory,\n /** @internal */\n CreateSignatoryProvider,\n}\n"],"names":["useCreateSignatory","CreateSignatoryProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;;;AAuBA,MAAM,CAACA,GAAoBC,CAAuB,IAChDC,EAAkD,wBAAwB;"}
@@ -9,12 +9,15 @@ import "@gusto/embedded-api/models/errors/gustoembeddederror";
9
9
  import "@gusto/embedded-api/models/errors/sdkvalidationerror";
10
10
  import "@gusto/embedded-api/models/errors/unprocessableentityerror";
11
11
  import "@gusto/embedded-api/models/errors/httpclienterrors";
12
+ import "dompurify";
13
+ import "../../../../contexts/LocaleProvider/useLocale.js";
12
14
  import "../../../../shared/constants.js";
13
15
  import "../../../../contexts/ComponentAdapter/useComponentContext.js";
16
+ import "../../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
14
17
  import { createCompoundContext as t } from "../../../Base/createCompoundContext.js";
15
- const [S, c] = t("InviteSignatoryContext");
18
+ const [s, u] = t("InviteSignatoryContext");
16
19
  export {
17
- c as InviteSignatoryProvider,
18
- S as useInviteSignatory
20
+ u as InviteSignatoryProvider,
21
+ s as useInviteSignatory
19
22
  };
20
23
  //# sourceMappingURL=useInviteSignatory.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useInviteSignatory.js","sources":["../../../../../src/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.ts"],"sourcesContent":["import { type Signatory } from '@gusto/embedded-api/models/components/signatory'\nimport { createCompoundContext } from '@/components/Base'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\n\ntype InviteSignatoryContextType = {\n isPending: boolean\n}\n\n/**\n * Default values for the invite signatory form fields: `firstName`, `lastName`, `email`,\n * `confirmEmail`, and `title`. At least one field is required.\n *\n * @public\n */\nexport type InviteSignatoryDefaultValues = RequireAtLeastOne<\n Pick<Signatory, 'firstName' | 'lastName' | 'email' | 'title'> & {\n confirmEmail: string\n }\n>\n\nconst [useInviteSignatory, InviteSignatoryProvider] =\n createCompoundContext<InviteSignatoryContextType>('InviteSignatoryContext')\n\nexport { useInviteSignatory, InviteSignatoryProvider }\n"],"names":["useInviteSignatory","InviteSignatoryProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;AAoBA,MAAM,CAACA,GAAoBC,CAAuB,IAChDC,EAAkD,wBAAwB;"}
1
+ {"version":3,"file":"useInviteSignatory.js","sources":["../../../../../src/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.ts"],"sourcesContent":["import { type Signatory } from '@gusto/embedded-api/models/components/signatory'\nimport { createCompoundContext } from '@/components/Base'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\n\ntype InviteSignatoryContextType = {\n isPending: boolean\n}\n\n/**\n * Default values for the invite signatory form fields: `firstName`, `lastName`, `email`,\n * `confirmEmail`, and `title`. At least one field is required.\n *\n * @public\n */\nexport type InviteSignatoryDefaultValues = RequireAtLeastOne<\n Pick<Signatory, 'firstName' | 'lastName' | 'email' | 'title'> & {\n confirmEmail: string\n }\n>\n\nconst [useInviteSignatory, InviteSignatoryProvider] =\n createCompoundContext<InviteSignatoryContextType>('InviteSignatoryContext')\n\nexport { useInviteSignatory, InviteSignatoryProvider }\n"],"names":["useInviteSignatory","InviteSignatoryProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;;;AAoBA,MAAM,CAACA,GAAoBC,CAAuB,IAChDC,EAAkD,wBAAwB;"}
@@ -9,16 +9,19 @@ import "@gusto/embedded-api/models/errors/gustoembeddederror";
9
9
  import "@gusto/embedded-api/models/errors/sdkvalidationerror";
10
10
  import "@gusto/embedded-api/models/errors/unprocessableentityerror";
11
11
  import "@gusto/embedded-api/models/errors/httpclienterrors";
12
+ import "dompurify";
13
+ import "../../../contexts/LocaleProvider/useLocale.js";
12
14
  import "../../../shared/constants.js";
13
15
  import "../../../contexts/ComponentAdapter/useComponentContext.js";
16
+ import "../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
14
17
  import { createCompoundContext as t } from "../../Base/createCompoundContext.js";
15
- const d = {
18
+ const C = {
16
19
  createSignatory: "createSignatory",
17
20
  inviteSignatory: "inviteSignatory"
18
- }, [v, x] = t("AssignSignatoryContext");
21
+ }, [u, f] = t("AssignSignatoryContext");
19
22
  export {
20
- x as AssignSignatoryProvider,
21
- d as SignatoryAssignmentMode,
22
- v as useAssignSignatory
23
+ f as AssignSignatoryProvider,
24
+ C as SignatoryAssignmentMode,
25
+ u as useAssignSignatory
23
26
  };
24
27
  //# sourceMappingURL=useAssignSignatory.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useAssignSignatory.js","sources":["../../../../src/components/Company/AssignSignatory/useAssignSignatory.ts"],"sourcesContent":["import { type CreateSignatoryDefaultValues } from './CreateSignatory'\nimport { type InviteSignatoryDefaultValues } from './InviteSignatory'\nimport type { BaseComponentInterface } from '@/components/Base'\nimport { createCompoundContext } from '@/components/Base'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\n\n/** @internal */\nexport const SignatoryAssignmentMode = {\n createSignatory: 'createSignatory',\n inviteSignatory: 'inviteSignatory',\n} as const\n\n/**\n * Default values for the create and invite forms rendered by {@link AssignSignatory}.\n *\n * @remarks\n * At least one of `create` or `invite` must be provided.\n *\n * @public\n */\nexport type AssignSignatoryDefaultValues = RequireAtLeastOne<{\n create?: CreateSignatoryDefaultValues\n invite?: InviteSignatoryDefaultValues\n}>\n\ntype AssignSignatoryContextType = {\n companyId: string\n signatoryId?: string\n defaultValues?: AssignSignatoryDefaultValues\n onSignatoryAssignmentModeChange: (mode: string) => void\n onSignatoryFormEvent: BaseComponentInterface['onEvent']\n}\n\nconst [useAssignSignatory, AssignSignatoryProvider] =\n createCompoundContext<AssignSignatoryContextType>('AssignSignatoryContext')\n\nexport { useAssignSignatory, AssignSignatoryProvider }\n"],"names":["SignatoryAssignmentMode","useAssignSignatory","AssignSignatoryProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;AAOO,MAAMA,IAA0B;AAAA,EACrC,iBAAiB;AAAA,EACjB,iBAAiB;AACnB,GAuBM,CAACC,GAAoBC,CAAuB,IAChDC,EAAkD,wBAAwB;"}
1
+ {"version":3,"file":"useAssignSignatory.js","sources":["../../../../src/components/Company/AssignSignatory/useAssignSignatory.ts"],"sourcesContent":["import { type CreateSignatoryDefaultValues } from './CreateSignatory'\nimport { type InviteSignatoryDefaultValues } from './InviteSignatory'\nimport type { BaseComponentInterface } from '@/components/Base'\nimport { createCompoundContext } from '@/components/Base'\nimport type { RequireAtLeastOne } from '@/types/Helpers'\n\n/** @internal */\nexport const SignatoryAssignmentMode = {\n createSignatory: 'createSignatory',\n inviteSignatory: 'inviteSignatory',\n} as const\n\n/**\n * Default values for the create and invite forms rendered by {@link AssignSignatory}.\n *\n * @remarks\n * At least one of `create` or `invite` must be provided.\n *\n * @public\n */\nexport type AssignSignatoryDefaultValues = RequireAtLeastOne<{\n create?: CreateSignatoryDefaultValues\n invite?: InviteSignatoryDefaultValues\n}>\n\ntype AssignSignatoryContextType = {\n companyId: string\n signatoryId?: string\n defaultValues?: AssignSignatoryDefaultValues\n onSignatoryAssignmentModeChange: (mode: string) => void\n onSignatoryFormEvent: BaseComponentInterface['onEvent']\n}\n\nconst [useAssignSignatory, AssignSignatoryProvider] =\n createCompoundContext<AssignSignatoryContextType>('AssignSignatoryContext')\n\nexport { useAssignSignatory, AssignSignatoryProvider }\n"],"names":["SignatoryAssignmentMode","useAssignSignatory","AssignSignatoryProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;;;AAOO,MAAMA,IAA0B;AAAA,EACrC,iBAAiB;AAAA,EACjB,iBAAiB;AACnB,GAuBM,CAACC,GAAoBC,CAAuB,IAChDC,EAAkD,wBAAwB;"}
@@ -9,12 +9,15 @@ import "@gusto/embedded-api/models/errors/gustoembeddederror";
9
9
  import "@gusto/embedded-api/models/errors/sdkvalidationerror";
10
10
  import "@gusto/embedded-api/models/errors/unprocessableentityerror";
11
11
  import "@gusto/embedded-api/models/errors/httpclienterrors";
12
+ import "dompurify";
13
+ import "../../../../contexts/LocaleProvider/useLocale.js";
12
14
  import "../../../../shared/constants.js";
13
15
  import "../../../../contexts/ComponentAdapter/useComponentContext.js";
16
+ import "../../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
14
17
  import { createCompoundContext as o } from "../../../Base/createCompoundContext.js";
15
- const [C, d] = o("BankAccountContext");
18
+ const [F, f] = o("BankAccountContext");
16
19
  export {
17
- d as BankAccountFormProvider,
18
- C as useBankAccountForm
20
+ f as BankAccountFormProvider,
21
+ F as useBankAccountForm
19
22
  };
20
23
  //# sourceMappingURL=context.js.map