@gusto/embedded-react-sdk 0.11.2 → 0.11.3-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (153) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/dist/components/Common/DataView/DataCards/DataCards.module.scss.js +1 -1
  3. package/dist/components/Common/DocumentList/DocumentList.module.scss.js +1 -1
  4. package/dist/components/Common/DocumentViewer/DocumentViewer.module.scss.js +1 -1
  5. package/dist/components/Common/EmptyData/EmptyData.module.scss.js +1 -1
  6. package/dist/components/Common/FieldErrorMessage/FieldErrorMessage.module.scss.js +1 -1
  7. package/dist/components/Common/FieldLayout/FieldLayout.module.scss.js +6 -6
  8. package/dist/components/Common/Flex/Flex.d.ts +2 -2
  9. package/dist/components/Common/Flex/Flex.js +5 -5
  10. package/dist/components/Common/Flex/Flex.js.map +1 -1
  11. package/dist/components/Common/Form/Form.module.scss.js +2 -2
  12. package/dist/components/Common/Grid/Grid.d.ts +2 -2
  13. package/dist/components/Common/Grid/Grid.js +13 -13
  14. package/dist/components/Common/Grid/Grid.js.map +1 -1
  15. package/dist/components/Common/HorizontalFieldLayout/HorizontalFieldLayout.module.scss.js +12 -12
  16. package/dist/components/Common/InternalError/InternalError.module.scss.js +1 -1
  17. package/dist/components/Common/Loading/Loading.module.scss.js +1 -1
  18. package/dist/components/Common/PaginationControl/PaginationControl.module.scss.js +1 -1
  19. package/dist/components/Common/ReorderableList/ReorderableList.module.scss.js +15 -15
  20. package/dist/components/Common/RequirementsList/RequirementsList.module.scss.js +1 -1
  21. package/dist/components/Common/SignatureForm/SignatureForm.module.scss.js +6 -6
  22. package/dist/components/Common/UI/Alert/Alert.module.scss.js +1 -1
  23. package/dist/components/Common/UI/Badge/Badge.module.scss.js +1 -1
  24. package/dist/components/Common/UI/Button/Button.module.scss.js +1 -1
  25. package/dist/components/Common/UI/Button/ButtonIcon.module.scss.js +1 -1
  26. package/dist/components/Common/UI/CalendarPreview/CalendarPreview.module.scss.js +5 -5
  27. package/dist/components/Common/UI/Card/Card.module.scss.js +1 -1
  28. package/dist/components/Common/UI/Checkbox/Checkbox.module.scss.js +8 -8
  29. package/dist/components/Common/UI/CheckboxGroup/CheckboxGroup.module.scss.js +1 -1
  30. package/dist/components/Common/UI/ComboBox/ComboBox.module.scss.js +1 -1
  31. package/dist/components/Common/UI/DatePicker/DatePicker.module.scss.js +5 -5
  32. package/dist/components/Common/UI/Input/Input.module.scss.js +7 -7
  33. package/dist/components/Common/UI/Link/Link.module.scss.js +1 -1
  34. package/dist/components/Common/UI/List/List.module.scss.js +1 -1
  35. package/dist/components/Common/UI/Menu/Menu.module.scss.js +5 -5
  36. package/dist/components/Common/UI/NumberInput/NumberInput.js +36 -38
  37. package/dist/components/Common/UI/NumberInput/NumberInput.js.map +1 -1
  38. package/dist/components/Common/UI/ProgressBar/ProgressBar.module.scss.js +1 -1
  39. package/dist/components/Common/UI/Radio/Radio.module.scss.js +1 -1
  40. package/dist/components/Common/UI/RadioGroup/RadioGroup.module.scss.js +1 -1
  41. package/dist/components/Common/UI/Select/Select.module.scss.js +1 -1
  42. package/dist/components/Common/UI/Switch/Switch.module.scss.js +4 -4
  43. package/dist/components/Common/UI/Table/Table.module.scss.js +1 -1
  44. package/dist/components/Common/UI/Text/Text.module.scss.js +14 -14
  45. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +4 -3
  46. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
  47. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +4 -3
  48. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
  49. package/dist/components/Company/AssignSignatory/useAssignSignatory.js +6 -5
  50. package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
  51. package/dist/components/Company/BankAccount/BankAccountForm/context.js +4 -3
  52. package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
  53. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +4 -3
  54. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  55. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js +4 -3
  56. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
  57. package/dist/components/Company/FederalTaxes/useFederalTaxes.js +6 -5
  58. package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
  59. package/dist/components/Company/Industry/Context.js +7 -6
  60. package/dist/components/Company/Industry/Context.js.map +1 -1
  61. package/dist/components/Company/Locations/LocationForm/useLocationForm.js +4 -3
  62. package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
  63. package/dist/components/Company/Locations/LocationsList/useLocationsList.js +4 -3
  64. package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
  65. package/dist/components/Company/OnboardingOverview/context.js +4 -3
  66. package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
  67. package/dist/components/Company/PaySchedule/_parts/Edit.module.scss.js +1 -1
  68. package/dist/components/Company/PaySchedule/usePaySchedule.js +6 -5
  69. package/dist/components/Company/PaySchedule/usePaySchedule.js.map +1 -1
  70. package/dist/components/Company/StateTaxes/StateTaxesForm/Form.js +8 -8
  71. package/dist/components/Company/StateTaxes/StateTaxesForm/Form.js.map +1 -1
  72. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +4 -3
  73. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
  74. package/dist/components/Company/StateTaxes/StateTaxesList/context.js +4 -3
  75. package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
  76. package/dist/components/Contractor/Address/useAddress.js +6 -5
  77. package/dist/components/Contractor/Address/useAddress.js.map +1 -1
  78. package/dist/components/Contractor/Profile/useContractorProfile.js +3 -2
  79. package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
  80. package/dist/components/Contractor/Submit/index.module.scss.js +2 -2
  81. package/dist/components/Employee/Deductions/Deductions.d.ts +8 -14
  82. package/dist/components/Employee/Deductions/Deductions.js +47 -140
  83. package/dist/components/Employee/Deductions/Deductions.js.map +1 -1
  84. package/dist/components/Employee/Deductions/DeductionsComponents.d.ts +23 -0
  85. package/dist/components/Employee/Deductions/DeductionsComponents.js +31 -0
  86. package/dist/components/Employee/Deductions/DeductionsComponents.js.map +1 -0
  87. package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.d.ts +41 -0
  88. package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js +135 -0
  89. package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js.map +1 -0
  90. package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.d.ts +6 -0
  91. package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js +99 -0
  92. package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js.map +1 -0
  93. package/dist/components/Employee/Deductions/IncludeDeductionsForm/IncludeDeductionsForm.d.ts +15 -0
  94. package/dist/components/Employee/Deductions/IncludeDeductionsForm/IncludeDeductionsForm.js +49 -0
  95. package/dist/components/Employee/Deductions/IncludeDeductionsForm/IncludeDeductionsForm.js.map +1 -0
  96. package/dist/components/Employee/Deductions/stateMachine.d.ts +7 -0
  97. package/dist/components/Employee/Deductions/stateMachine.js +107 -0
  98. package/dist/components/Employee/Deductions/stateMachine.js.map +1 -0
  99. package/dist/components/Employee/Deductions/useDeductions.d.ts +2 -2
  100. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +4 -3
  101. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  102. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js +4 -3
  103. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
  104. package/dist/components/Employee/EmployeeList/useEmployeeList.js +4 -3
  105. package/dist/components/Employee/EmployeeList/useEmployeeList.js.map +1 -1
  106. package/dist/components/Employee/OnboardingSummary/OnboardingSummary.module.scss.js +6 -6
  107. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +6 -5
  108. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +1 -1
  109. package/dist/components/Employee/Profile/useProfile.js +4 -3
  110. package/dist/components/Employee/Profile/useProfile.js.map +1 -1
  111. package/dist/components/Employee/Taxes/useTaxes.js +4 -3
  112. package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
  113. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.d.ts +3 -3
  114. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
  115. package/dist/contexts/ThemeProvider/ThemeProvider.d.ts +1 -5
  116. package/dist/contexts/ThemeProvider/ThemeProvider.js +18 -60
  117. package/dist/contexts/ThemeProvider/ThemeProvider.js.map +1 -1
  118. package/dist/contexts/ThemeProvider/theme.d.ts +42 -11
  119. package/dist/contexts/ThemeProvider/theme.js +31 -15
  120. package/dist/contexts/ThemeProvider/theme.js.map +1 -1
  121. package/dist/helpers/responsive.d.ts +0 -3
  122. package/dist/helpers/responsive.js +20 -34
  123. package/dist/helpers/responsive.js.map +1 -1
  124. package/dist/i18n/en/Employee.Deductions.json.js +49 -51
  125. package/dist/i18n/en/Employee.Deductions.json.js.map +1 -1
  126. package/dist/shared/constants.d.ts +8 -0
  127. package/dist/shared/constants.js +9 -5
  128. package/dist/shared/constants.js.map +1 -1
  129. package/dist/style.css +1 -1
  130. package/dist/types/i18next.d.ts +0 -1
  131. package/package.json +1 -1
  132. package/dist/components/Common/UI/NumberInput/NumberInput.module.scss.js +0 -8
  133. package/dist/components/Common/UI/NumberInput/NumberInput.module.scss.js.map +0 -1
  134. package/dist/components/Employee/Deductions/Actions.js +0 -27
  135. package/dist/components/Employee/Deductions/Actions.js.map +0 -1
  136. package/dist/components/Employee/Deductions/DeductionForm.d.ts +0 -1
  137. package/dist/components/Employee/Deductions/DeductionForm.js +0 -78
  138. package/dist/components/Employee/Deductions/DeductionForm.js.map +0 -1
  139. package/dist/components/Employee/Deductions/DeductionsList.d.ts +0 -2
  140. package/dist/components/Employee/Deductions/DeductionsList.js +0 -60
  141. package/dist/components/Employee/Deductions/DeductionsList.js.map +0 -1
  142. package/dist/components/Employee/Deductions/Head.js +0 -13
  143. package/dist/components/Employee/Deductions/Head.js.map +0 -1
  144. package/dist/components/Employee/Deductions/IncludeDeductionsForm.d.ts +0 -1
  145. package/dist/components/Employee/Deductions/IncludeDeductionsForm.js +0 -27
  146. package/dist/components/Employee/Deductions/IncludeDeductionsForm.js.map +0 -1
  147. package/dist/components/Employee/Deductions/useDeductions.js +0 -33
  148. package/dist/components/Employee/Deductions/useDeductions.js.map +0 -1
  149. package/dist/contexts/ThemeProvider/createTheme.d.ts +0 -21
  150. package/dist/contexts/ThemeProvider/createTheme.js +0 -269
  151. package/dist/contexts/ThemeProvider/createTheme.js.map +0 -1
  152. package/dist/types/GTheme.d.ts +0 -254
  153. /package/dist/contexts/ThemeProvider/{createTheme.test.d.ts → theme.test.d.ts} +0 -0
@@ -11,10 +11,11 @@ import "../../../../shared/constants.js";
11
11
  import "classnames";
12
12
  import "dompurify";
13
13
  import "../../../../contexts/ComponentAdapter/useComponentContext.js";
14
+ import "../../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
14
15
  import { createCompoundContext as o } from "../../../Base/createCompoundContext.js";
15
- const [c, d] = o("SignatureFormContext");
16
+ const [d, s] = o("SignatureFormContext");
16
17
  export {
17
- d as SignatureFormProvider,
18
- c as useSignatureForm
18
+ s as SignatureFormProvider,
19
+ d as useSignatureForm
19
20
  };
20
21
  //# sourceMappingURL=useSignatureForm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useSignatureForm.js","sources":["../../../../../src/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.ts"],"sourcesContent":["import type { Form } from '@gusto/embedded-api/models/components/form'\nimport { createCompoundContext } from '@/components/Base'\n\ntype SignatureFormContextType = {\n form: Form\n pdfUrl?: string | null\n handleBack: () => void\n isPending: boolean\n}\n\nconst [useSignatureForm, SignatureFormProvider] =\n createCompoundContext<SignatureFormContextType>('SignatureFormContext')\nexport { useSignatureForm, SignatureFormProvider }\n"],"names":["useSignatureForm","SignatureFormProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;AAUA,MAAM,CAACA,GAAkBC,CAAqB,IAC5CC,EAAgD,sBAAsB;"}
1
+ {"version":3,"file":"useSignatureForm.js","sources":["../../../../../src/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.ts"],"sourcesContent":["import type { Form } from '@gusto/embedded-api/models/components/form'\nimport { createCompoundContext } from '@/components/Base'\n\ntype SignatureFormContextType = {\n form: Form\n pdfUrl?: string | null\n handleBack: () => void\n isPending: boolean\n}\n\nconst [useSignatureForm, SignatureFormProvider] =\n createCompoundContext<SignatureFormContextType>('SignatureFormContext')\nexport { useSignatureForm, SignatureFormProvider }\n"],"names":["useSignatureForm","SignatureFormProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;AAUA,MAAM,CAACA,GAAkBC,CAAqB,IAC5CC,EAAgD,sBAAsB;"}
@@ -11,10 +11,11 @@ import "../../../shared/constants.js";
11
11
  import "classnames";
12
12
  import "dompurify";
13
13
  import "../../../contexts/ComponentAdapter/useComponentContext.js";
14
+ import "../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
14
15
  import { createCompoundContext as o } from "../../Base/createCompoundContext.js";
15
- const [c, d] = o("EmployeeListContext");
16
+ const [d, u] = o("EmployeeListContext");
16
17
  export {
17
- d as EmployeeListProvider,
18
- c as useEmployeeList
18
+ u as EmployeeListProvider,
19
+ d as useEmployeeList
19
20
  };
20
21
  //# sourceMappingURL=useEmployeeList.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useEmployeeList.js","sources":["../../../../src/components/Employee/EmployeeList/useEmployeeList.ts"],"sourcesContent":["import type { Employee } from '@gusto/embedded-api/models/components/employee'\nimport type { OnboardingStatus } from '@gusto/embedded-api/models/operations/putv1employeesemployeeidonboardingstatus'\nimport { createCompoundContext } from '@/components/Base'\n\n//Interface for context passed down to component slots\ntype EmployeeListContextType = {\n handleEdit: (uuid: string, onboardingStatus?: OnboardingStatus) => void\n handleDelete: (uuid: string) => Promise<void>\n handleCancelSelfOnboarding: (employeeId: string) => Promise<void>\n handleReview: (employeeId: string) => Promise<void>\n handleNew: () => void\n handleSkip: () => void\n handleFirstPage: () => void\n handlePreviousPage: () => void\n handleNextPage: () => void\n handleLastPage: () => void\n handleItemsPerPageChange: (newCount: number) => void\n currentPage: number\n totalPages: number\n employees: Employee[]\n}\n\nconst [useEmployeeList, EmployeeListProvider] =\n createCompoundContext<EmployeeListContextType>('EmployeeListContext')\nexport { useEmployeeList, EmployeeListProvider }\n"],"names":["useEmployeeList","EmployeeListProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;AAsBA,MAAM,CAACA,GAAiBC,CAAoB,IAC1CC,EAA+C,qBAAqB;"}
1
+ {"version":3,"file":"useEmployeeList.js","sources":["../../../../src/components/Employee/EmployeeList/useEmployeeList.ts"],"sourcesContent":["import type { Employee } from '@gusto/embedded-api/models/components/employee'\nimport type { OnboardingStatus } from '@gusto/embedded-api/models/operations/putv1employeesemployeeidonboardingstatus'\nimport { createCompoundContext } from '@/components/Base'\n\n//Interface for context passed down to component slots\ntype EmployeeListContextType = {\n handleEdit: (uuid: string, onboardingStatus?: OnboardingStatus) => void\n handleDelete: (uuid: string) => Promise<void>\n handleCancelSelfOnboarding: (employeeId: string) => Promise<void>\n handleReview: (employeeId: string) => Promise<void>\n handleNew: () => void\n handleSkip: () => void\n handleFirstPage: () => void\n handlePreviousPage: () => void\n handleNextPage: () => void\n handleLastPage: () => void\n handleItemsPerPageChange: (newCount: number) => void\n currentPage: number\n totalPages: number\n employees: Employee[]\n}\n\nconst [useEmployeeList, EmployeeListProvider] =\n createCompoundContext<EmployeeListContextType>('EmployeeListContext')\nexport { useEmployeeList, EmployeeListProvider }\n"],"names":["useEmployeeList","EmployeeListProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;AAsBA,MAAM,CAACA,GAAiBC,CAAoB,IAC1CC,EAA+C,qBAAqB;"}
@@ -1,16 +1,16 @@
1
- const t = "_description_dm8or_1", o = "_list_dm8or_4", s = "_listItem_dm8or_8", e = "_listItemIcon_dm8or_13", i = "_incomplete_dm8or_16", c = {
1
+ const t = "_description_16lxz_1", s = "_list_16lxz_4", l = "_listItem_16lxz_8", e = "_listItemIcon_16lxz_13", i = "_incomplete_16lxz_16", o = {
2
2
  description: t,
3
- list: o,
4
- listItem: s,
3
+ list: s,
4
+ listItem: l,
5
5
  listItemIcon: e,
6
6
  incomplete: i
7
7
  };
8
8
  export {
9
- c as default,
9
+ o as default,
10
10
  t as description,
11
11
  i as incomplete,
12
- o as list,
13
- s as listItem,
12
+ s as list,
13
+ l as listItem,
14
14
  e as listItemIcon
15
15
  };
16
16
  //# sourceMappingURL=OnboardingSummary.module.scss.js.map
@@ -13,8 +13,9 @@ import "../../../shared/constants.js";
13
13
  import "classnames";
14
14
  import "dompurify";
15
15
  import "../../../contexts/ComponentAdapter/useComponentContext.js";
16
+ import "../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
16
17
  import { createCompoundContext as a } from "../../Base/createCompoundContext.js";
17
- const x = t.union([
18
+ const S = t.union([
18
19
  l.extend({
19
20
  type: t.literal("Direct Deposit"),
20
21
  isSplit: t.literal(!1)
@@ -54,10 +55,10 @@ const x = t.union([
54
55
  remainder: t.string()
55
56
  })
56
57
  ])
57
- ]), [S, k] = a("PaymentMethodContext");
58
+ ]), [k, C] = a("PaymentMethodContext");
58
59
  export {
59
- x as CombinedSchema,
60
- k as PaymentMethodProvider,
61
- S as usePaymentMethod
60
+ S as CombinedSchema,
61
+ C as PaymentMethodProvider,
62
+ k as usePaymentMethod
62
63
  };
63
64
  //# sourceMappingURL=usePaymentMethod.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"usePaymentMethod.js","sources":["../../../../src/components/Employee/PaymentMethod/usePaymentMethod.ts"],"sourcesContent":["import type { EmployeeBankAccount } from '@gusto/embedded-api/models/components/employeebankaccount'\nimport type { EmployeePaymentMethod } from '@gusto/embedded-api/models/components/employeepaymentmethod'\nimport { z } from 'zod'\nimport { BankAccountSchema } from './BankAccount'\nimport { createCompoundContext } from '@/components/Base'\n\nexport const CombinedSchema = z.union([\n BankAccountSchema.extend({\n type: z.literal('Direct Deposit'),\n isSplit: z.literal(false),\n }),\n z.object({\n type: z.literal('Direct Deposit'),\n isSplit: z.literal(false),\n hasBankPayload: z.literal(false),\n }),\n z.object({\n type: z.literal('Check'),\n }),\n z.discriminatedUnion('splitBy', [\n z.object({\n type: z.literal('Direct Deposit'),\n isSplit: z.literal(true),\n hasBankPayload: z.literal(false),\n splitBy: z.literal('Percentage'),\n splitAmount: z.record(z.string(), z.number().max(100).min(0)).refine(\n input => Object.values(input).reduce((acc, curr) => acc + curr, 0) === 100,\n input => {\n const total = Object.values(input).reduce((acc, curr) => acc + curr, 0)\n return {\n message: `percentage_split_total_error:${total}`,\n }\n },\n ),\n priority: z.record(z.string(), z.number()),\n }),\n z.object({\n type: z.literal('Direct Deposit'),\n isSplit: z.literal(true),\n hasBankPayload: z.literal(false),\n splitBy: z.literal('Amount'),\n priority: z.record(z.string(), z.number()).refine(input => {\n const arr = Object.values(input)\n return arr.filter((item, index) => arr.indexOf(item) !== index).length === 0\n }),\n splitAmount: z.record(z.string(), z.number().min(0).nullable()),\n remainder: z.string(),\n }),\n ]),\n])\n\nexport type CombinedSchemaInputs = z.input<typeof CombinedSchema>\nexport type CombinedSchemaOutputs = z.output<typeof CombinedSchema>\n\ntype PaymentMethodContextType = {\n bankAccounts: EmployeeBankAccount[]\n isPending: boolean\n watchedType?: string\n mode: MODE\n paymentMethod: EmployeePaymentMethod\n handleAdd: () => void\n handleSplit: () => void\n handleCancel: () => void\n handleDelete: (uuid: string) => void\n}\n\nexport type MODE = 'ADD' | 'LIST' | 'SPLIT' | 'INITIAL'\n\nconst [usePaymentMethod, PaymentMethodProvider] =\n createCompoundContext<PaymentMethodContextType>('PaymentMethodContext')\nexport { usePaymentMethod, PaymentMethodProvider }\n"],"names":["CombinedSchema","z","BankAccountSchema","input","acc","curr","arr","item","index","usePaymentMethod","PaymentMethodProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;;AAMO,MAAMA,IAAiBC,EAAE,MAAM;AAAA,EACpCC,EAAkB,OAAO;AAAA,IACvB,MAAMD,EAAE,QAAQ,gBAAgB;AAAA,IAChC,SAASA,EAAE,QAAQ,EAAK;AAAA,EAAA,CACzB;AAAA,EACDA,EAAE,OAAO;AAAA,IACP,MAAMA,EAAE,QAAQ,gBAAgB;AAAA,IAChC,SAASA,EAAE,QAAQ,EAAK;AAAA,IACxB,gBAAgBA,EAAE,QAAQ,EAAK;AAAA,EAAA,CAChC;AAAA,EACDA,EAAE,OAAO;AAAA,IACP,MAAMA,EAAE,QAAQ,OAAO;AAAA,EAAA,CACxB;AAAA,EACDA,EAAE,mBAAmB,WAAW;AAAA,IAC9BA,EAAE,OAAO;AAAA,MACP,MAAMA,EAAE,QAAQ,gBAAgB;AAAA,MAChC,SAASA,EAAE,QAAQ,EAAI;AAAA,MACvB,gBAAgBA,EAAE,QAAQ,EAAK;AAAA,MAC/B,SAASA,EAAE,QAAQ,YAAY;AAAA,MAC/B,aAAaA,EAAE,OAAOA,EAAE,UAAUA,EAAE,OAAA,EAAS,IAAI,GAAG,EAAE,IAAI,CAAC,CAAC,EAAE;AAAA,QAC5D,CAAAE,MAAS,OAAO,OAAOA,CAAK,EAAE,OAAO,CAACC,GAAKC,MAASD,IAAMC,GAAM,CAAC,MAAM;AAAA,QACvE,CAAAF,OAES;AAAA,UACL,SAAS,gCAFG,OAAO,OAAOA,CAAK,EAAE,OAAO,CAACC,GAAKC,MAASD,IAAMC,GAAM,CAAC,CAEtB;AAAA,QAAA;AAAA,MAElD;AAAA,MAEF,UAAUJ,EAAE,OAAOA,EAAE,UAAUA,EAAE,QAAQ;AAAA,IAAA,CAC1C;AAAA,IACDA,EAAE,OAAO;AAAA,MACP,MAAMA,EAAE,QAAQ,gBAAgB;AAAA,MAChC,SAASA,EAAE,QAAQ,EAAI;AAAA,MACvB,gBAAgBA,EAAE,QAAQ,EAAK;AAAA,MAC/B,SAASA,EAAE,QAAQ,QAAQ;AAAA,MAC3B,UAAUA,EAAE,OAAOA,EAAE,OAAA,GAAUA,EAAE,OAAA,CAAQ,EAAE,OAAO,CAAAE,MAAS;AACzD,cAAMG,IAAM,OAAO,OAAOH,CAAK;AAC/B,eAAOG,EAAI,OAAO,CAACC,GAAMC,MAAUF,EAAI,QAAQC,CAAI,MAAMC,CAAK,EAAE,WAAW;AAAA,MAC7E,CAAC;AAAA,MACD,aAAaP,EAAE,OAAOA,EAAE,OAAA,GAAUA,EAAE,OAAA,EAAS,IAAI,CAAC,EAAE,UAAU;AAAA,MAC9D,WAAWA,EAAE,OAAA;AAAA,IAAO,CACrB;AAAA,EAAA,CACF;AACH,CAAC,GAmBK,CAACQ,GAAkBC,CAAqB,IAC5CC,EAAgD,sBAAsB;"}
1
+ {"version":3,"file":"usePaymentMethod.js","sources":["../../../../src/components/Employee/PaymentMethod/usePaymentMethod.ts"],"sourcesContent":["import type { EmployeeBankAccount } from '@gusto/embedded-api/models/components/employeebankaccount'\nimport type { EmployeePaymentMethod } from '@gusto/embedded-api/models/components/employeepaymentmethod'\nimport { z } from 'zod'\nimport { BankAccountSchema } from './BankAccount'\nimport { createCompoundContext } from '@/components/Base'\n\nexport const CombinedSchema = z.union([\n BankAccountSchema.extend({\n type: z.literal('Direct Deposit'),\n isSplit: z.literal(false),\n }),\n z.object({\n type: z.literal('Direct Deposit'),\n isSplit: z.literal(false),\n hasBankPayload: z.literal(false),\n }),\n z.object({\n type: z.literal('Check'),\n }),\n z.discriminatedUnion('splitBy', [\n z.object({\n type: z.literal('Direct Deposit'),\n isSplit: z.literal(true),\n hasBankPayload: z.literal(false),\n splitBy: z.literal('Percentage'),\n splitAmount: z.record(z.string(), z.number().max(100).min(0)).refine(\n input => Object.values(input).reduce((acc, curr) => acc + curr, 0) === 100,\n input => {\n const total = Object.values(input).reduce((acc, curr) => acc + curr, 0)\n return {\n message: `percentage_split_total_error:${total}`,\n }\n },\n ),\n priority: z.record(z.string(), z.number()),\n }),\n z.object({\n type: z.literal('Direct Deposit'),\n isSplit: z.literal(true),\n hasBankPayload: z.literal(false),\n splitBy: z.literal('Amount'),\n priority: z.record(z.string(), z.number()).refine(input => {\n const arr = Object.values(input)\n return arr.filter((item, index) => arr.indexOf(item) !== index).length === 0\n }),\n splitAmount: z.record(z.string(), z.number().min(0).nullable()),\n remainder: z.string(),\n }),\n ]),\n])\n\nexport type CombinedSchemaInputs = z.input<typeof CombinedSchema>\nexport type CombinedSchemaOutputs = z.output<typeof CombinedSchema>\n\ntype PaymentMethodContextType = {\n bankAccounts: EmployeeBankAccount[]\n isPending: boolean\n watchedType?: string\n mode: MODE\n paymentMethod: EmployeePaymentMethod\n handleAdd: () => void\n handleSplit: () => void\n handleCancel: () => void\n handleDelete: (uuid: string) => void\n}\n\nexport type MODE = 'ADD' | 'LIST' | 'SPLIT' | 'INITIAL'\n\nconst [usePaymentMethod, PaymentMethodProvider] =\n createCompoundContext<PaymentMethodContextType>('PaymentMethodContext')\nexport { usePaymentMethod, PaymentMethodProvider }\n"],"names":["CombinedSchema","z","BankAccountSchema","input","acc","curr","arr","item","index","usePaymentMethod","PaymentMethodProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;;;AAMO,MAAMA,IAAiBC,EAAE,MAAM;AAAA,EACpCC,EAAkB,OAAO;AAAA,IACvB,MAAMD,EAAE,QAAQ,gBAAgB;AAAA,IAChC,SAASA,EAAE,QAAQ,EAAK;AAAA,EAAA,CACzB;AAAA,EACDA,EAAE,OAAO;AAAA,IACP,MAAMA,EAAE,QAAQ,gBAAgB;AAAA,IAChC,SAASA,EAAE,QAAQ,EAAK;AAAA,IACxB,gBAAgBA,EAAE,QAAQ,EAAK;AAAA,EAAA,CAChC;AAAA,EACDA,EAAE,OAAO;AAAA,IACP,MAAMA,EAAE,QAAQ,OAAO;AAAA,EAAA,CACxB;AAAA,EACDA,EAAE,mBAAmB,WAAW;AAAA,IAC9BA,EAAE,OAAO;AAAA,MACP,MAAMA,EAAE,QAAQ,gBAAgB;AAAA,MAChC,SAASA,EAAE,QAAQ,EAAI;AAAA,MACvB,gBAAgBA,EAAE,QAAQ,EAAK;AAAA,MAC/B,SAASA,EAAE,QAAQ,YAAY;AAAA,MAC/B,aAAaA,EAAE,OAAOA,EAAE,UAAUA,EAAE,OAAA,EAAS,IAAI,GAAG,EAAE,IAAI,CAAC,CAAC,EAAE;AAAA,QAC5D,CAAAE,MAAS,OAAO,OAAOA,CAAK,EAAE,OAAO,CAACC,GAAKC,MAASD,IAAMC,GAAM,CAAC,MAAM;AAAA,QACvE,CAAAF,OAES;AAAA,UACL,SAAS,gCAFG,OAAO,OAAOA,CAAK,EAAE,OAAO,CAACC,GAAKC,MAASD,IAAMC,GAAM,CAAC,CAEtB;AAAA,QAAA;AAAA,MAElD;AAAA,MAEF,UAAUJ,EAAE,OAAOA,EAAE,UAAUA,EAAE,QAAQ;AAAA,IAAA,CAC1C;AAAA,IACDA,EAAE,OAAO;AAAA,MACP,MAAMA,EAAE,QAAQ,gBAAgB;AAAA,MAChC,SAASA,EAAE,QAAQ,EAAI;AAAA,MACvB,gBAAgBA,EAAE,QAAQ,EAAK;AAAA,MAC/B,SAASA,EAAE,QAAQ,QAAQ;AAAA,MAC3B,UAAUA,EAAE,OAAOA,EAAE,OAAA,GAAUA,EAAE,OAAA,CAAQ,EAAE,OAAO,CAAAE,MAAS;AACzD,cAAMG,IAAM,OAAO,OAAOH,CAAK;AAC/B,eAAOG,EAAI,OAAO,CAACC,GAAMC,MAAUF,EAAI,QAAQC,CAAI,MAAMC,CAAK,EAAE,WAAW;AAAA,MAC7E,CAAC;AAAA,MACD,aAAaP,EAAE,OAAOA,EAAE,OAAA,GAAUA,EAAE,OAAA,EAAS,IAAI,CAAC,EAAE,UAAU;AAAA,MAC9D,WAAWA,EAAE,OAAA;AAAA,IAAO,CACrB;AAAA,EAAA,CACF;AACH,CAAC,GAmBK,CAACQ,GAAkBC,CAAqB,IAC5CC,EAAgD,sBAAsB;"}
@@ -11,10 +11,11 @@ import "../../../shared/constants.js";
11
11
  import "classnames";
12
12
  import "dompurify";
13
13
  import "../../../contexts/ComponentAdapter/useComponentContext.js";
14
+ import "../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
14
15
  import { createCompoundContext as o } from "../../Base/createCompoundContext.js";
15
- const [s, u] = o("ProfileContext");
16
+ const [u, a] = o("ProfileContext");
16
17
  export {
17
- u as ProfileProvider,
18
- s as useProfile
18
+ a as ProfileProvider,
19
+ u as useProfile
19
20
  };
20
21
  //# sourceMappingURL=useProfile.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useProfile.js","sources":["../../../../src/components/Employee/Profile/useProfile.ts"],"sourcesContent":["import type { Employee } from '@gusto/embedded-api/models/components/employee'\nimport type { EmployeeWorkAddress } from '@gusto/embedded-api/models/components/employeeworkaddress'\nimport { type Location } from '@gusto/embedded-api/models/components/location'\nimport { createCompoundContext } from '@/components/Base'\n\n//Interface for context passed down to component slots\ntype ProfileContextType = {\n companyLocations: Location[]\n workAddresses?: EmployeeWorkAddress[]\n employee?: Employee\n isSelfOnboardingIntended?: boolean\n isPending: boolean\n isAdmin: boolean\n handleCancel: () => void\n isSelfOnboardingEnabled: boolean\n}\n\nconst [useProfile, ProfileProvider] = createCompoundContext<ProfileContextType>('ProfileContext')\nexport { useProfile, ProfileProvider }\n"],"names":["useProfile","ProfileProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;AAiBA,MAAM,CAACA,GAAYC,CAAe,IAAIC,EAA0C,gBAAgB;"}
1
+ {"version":3,"file":"useProfile.js","sources":["../../../../src/components/Employee/Profile/useProfile.ts"],"sourcesContent":["import type { Employee } from '@gusto/embedded-api/models/components/employee'\nimport type { EmployeeWorkAddress } from '@gusto/embedded-api/models/components/employeeworkaddress'\nimport { type Location } from '@gusto/embedded-api/models/components/location'\nimport { createCompoundContext } from '@/components/Base'\n\n//Interface for context passed down to component slots\ntype ProfileContextType = {\n companyLocations: Location[]\n workAddresses?: EmployeeWorkAddress[]\n employee?: Employee\n isSelfOnboardingIntended?: boolean\n isPending: boolean\n isAdmin: boolean\n handleCancel: () => void\n isSelfOnboardingEnabled: boolean\n}\n\nconst [useProfile, ProfileProvider] = createCompoundContext<ProfileContextType>('ProfileContext')\nexport { useProfile, ProfileProvider }\n"],"names":["useProfile","ProfileProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;AAiBA,MAAM,CAACA,GAAYC,CAAe,IAAIC,EAA0C,gBAAgB;"}
@@ -11,10 +11,11 @@ import "../../../shared/constants.js";
11
11
  import "classnames";
12
12
  import "dompurify";
13
13
  import "../../../contexts/ComponentAdapter/useComponentContext.js";
14
+ import "../../../contexts/LoadingIndicatorProvider/useLoadingIndicator.js";
14
15
  import { createCompoundContext as o } from "../../Base/createCompoundContext.js";
15
- const [u, f] = o("TaxesContext");
16
+ const [f, v] = o("TaxesContext");
16
17
  export {
17
- f as TaxesProvider,
18
- u as useTaxes
18
+ v as TaxesProvider,
19
+ f as useTaxes
19
20
  };
20
21
  //# sourceMappingURL=useTaxes.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useTaxes.js","sources":["../../../../src/components/Employee/Taxes/useTaxes.ts"],"sourcesContent":["import type { EmployeeStateTaxesList } from '@gusto/embedded-api/models/components/employeestatetaxeslist'\nimport { createCompoundContext } from '@/components/Base'\n\ntype TaxesContextType = {\n employeeStateTaxes: EmployeeStateTaxesList[]\n isPending: boolean\n isAdmin: boolean\n}\n\nconst [useTaxes, TaxesProvider] = createCompoundContext<TaxesContextType>('TaxesContext')\nexport { useTaxes, TaxesProvider }\n"],"names":["useTaxes","TaxesProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;AASA,MAAM,CAACA,GAAUC,CAAa,IAAIC,EAAwC,cAAc;"}
1
+ {"version":3,"file":"useTaxes.js","sources":["../../../../src/components/Employee/Taxes/useTaxes.ts"],"sourcesContent":["import type { EmployeeStateTaxesList } from '@gusto/embedded-api/models/components/employeestatetaxeslist'\nimport { createCompoundContext } from '@/components/Base'\n\ntype TaxesContextType = {\n employeeStateTaxes: EmployeeStateTaxesList[]\n isPending: boolean\n isAdmin: boolean\n}\n\nconst [useTaxes, TaxesProvider] = createCompoundContext<TaxesContextType>('TaxesContext')\nexport { useTaxes, TaxesProvider }\n"],"names":["useTaxes","TaxesProvider","createCompoundContext"],"mappings":";;;;;;;;;;;;;;;AASA,MAAM,CAACA,GAAUC,CAAa,IAAIC,EAAwC,cAAc;"}
@@ -2,8 +2,8 @@ import { default as React } from 'react';
2
2
  import { QueryClient } from '@tanstack/react-query';
3
3
  import { ComponentsContextType } from '../ComponentAdapter/useComponentContext';
4
4
  import { LoadingIndicatorContextProps } from '../LoadingIndicatorProvider/useLoadingIndicator';
5
- import { GTheme } from '../../types/GTheme';
6
- import { DeepPartial, ResourceDictionary } from '../../types/Helpers';
5
+ import { GustoSDKTheme } from '../ThemeProvider/theme';
6
+ import { ResourceDictionary } from '../../types/Helpers';
7
7
  import { SDKHooks } from '../../types/hooks';
8
8
  export interface APIConfig {
9
9
  baseUrl: string;
@@ -16,7 +16,7 @@ export interface GustoProviderProps {
16
16
  lng?: string;
17
17
  locale?: string;
18
18
  currency?: string;
19
- theme?: DeepPartial<GTheme>;
19
+ theme?: GustoSDKTheme;
20
20
  queryClient?: QueryClient;
21
21
  components: ComponentsContextType;
22
22
  LoaderComponent?: LoadingIndicatorContextProps['LoadingIndicator'];
@@ -1 +1 @@
1
- {"version":3,"file":"GustoProviderCustomUIAdapter.js","sources":["../../../src/contexts/GustoProvider/GustoProviderCustomUIAdapter.tsx"],"sourcesContent":["import type React from 'react'\nimport { ErrorBoundary } from 'react-error-boundary'\nimport { I18nextProvider } from 'react-i18next'\nimport type { QueryClient } from '@tanstack/react-query'\nimport { useEffect } from 'react'\nimport { ComponentsProvider } from '../ComponentAdapter/ComponentsProvider'\nimport type { ComponentsContextType } from '../ComponentAdapter/useComponentContext'\nimport { ApiProvider } from '../ApiProvider/ApiProvider'\nimport { LoadingIndicatorProvider } from '../LoadingIndicatorProvider/LoadingIndicatorProvider'\nimport type { LoadingIndicatorContextProps } from '../LoadingIndicatorProvider/useLoadingIndicator'\nimport { SDKI18next } from './SDKI18next'\nimport { InternalError } from '@/components/Common'\nimport { LocaleProvider } from '@/contexts/LocaleProvider'\nimport { ThemeProvider } from '@/contexts/ThemeProvider'\nimport type { GTheme } from '@/types/GTheme'\nimport type { DeepPartial, ResourceDictionary, SupportedLanguages } from '@/types/Helpers'\nimport type { SDKHooks } from '@/types/hooks'\n\nexport interface APIConfig {\n baseUrl: string\n headers?: HeadersInit\n hooks?: SDKHooks\n}\n\nexport interface GustoProviderProps {\n config: APIConfig\n dictionary?: ResourceDictionary\n lng?: string\n locale?: string\n currency?: string\n theme?: DeepPartial<GTheme>\n queryClient?: QueryClient\n components: ComponentsContextType\n LoaderComponent?: LoadingIndicatorContextProps['LoadingIndicator']\n}\n\nexport interface GustoProviderCustomUIAdapterProps extends GustoProviderProps {\n children?: React.ReactNode\n}\n\n/**\n * A provider that accepts UI component adapters through the components prop\n */\nconst GustoProviderCustomUIAdapter: React.FC<GustoProviderCustomUIAdapterProps> = props => {\n const {\n children,\n config,\n dictionary,\n lng = 'en',\n locale = 'en-US',\n currency = 'USD',\n theme,\n components,\n LoaderComponent,\n } = props\n\n // Handle dictionary resources\n if (dictionary) {\n for (const language in dictionary) {\n const lang = language as SupportedLanguages\n for (const ns in dictionary[lang]) {\n // Adding resources overrides to i18next instance - initial load will override common namespace and add component specific dictionaries provided by partners\n SDKI18next.addResourceBundle(\n lang,\n ns,\n (dictionary[lang] as Record<string, unknown>)[ns],\n true,\n true,\n )\n }\n }\n }\n\n // Handle language change\n useEffect(() => {\n void (async () => {\n await SDKI18next.changeLanguage(lng)\n })()\n }, [lng])\n\n return (\n <ComponentsProvider value={components}>\n <LoadingIndicatorProvider value={LoaderComponent}>\n <ErrorBoundary FallbackComponent={InternalError}>\n <ThemeProvider theme={theme}>\n <LocaleProvider locale={locale} currency={currency}>\n <I18nextProvider i18n={SDKI18next} key={lng}>\n <ApiProvider url={config.baseUrl} headers={config.headers} hooks={config.hooks}>\n {children}\n </ApiProvider>\n </I18nextProvider>\n </LocaleProvider>\n </ThemeProvider>\n </ErrorBoundary>\n </LoadingIndicatorProvider>\n </ComponentsProvider>\n )\n}\n\nexport { GustoProviderCustomUIAdapter }\n"],"names":["GustoProviderCustomUIAdapter","props","children","config","dictionary","lng","locale","currency","theme","components","LoaderComponent","language","lang","ns","SDKI18next","useEffect","ComponentsProvider","jsx","LoadingIndicatorProvider","ErrorBoundary","InternalError","ThemeProvider","LocaleProvider","I18nextProvider","ApiProvider"],"mappings":";;;;;;;;;;;;;AA2CA,MAAMA,IAA4E,CAAAC,MAAS;AACzF,QAAM;AAAA,IACJ,UAAAC;AAAA,IACA,QAAAC;AAAA,IACA,YAAAC;AAAA,IACA,KAAAC,IAAM;AAAA,IACN,QAAAC,IAAS;AAAA,IACT,UAAAC,IAAW;AAAA,IACX,OAAAC;AAAA,IACA,YAAAC;AAAA,IACA,iBAAAC;AAAA,EAAA,IACET;AAGJ,MAAIG;AACF,eAAWO,KAAYP,GAAY;AACjC,YAAMQ,IAAOD;AACb,iBAAWE,KAAMT,EAAWQ,CAAI;AAE9B,QAAAE,EAAW;AAAA,UACTF;AAAA,UACAC;AAAA,UACCT,EAAWQ,CAAI,EAA8BC,CAAE;AAAA,UAChD;AAAA,UACA;AAAA,QAAA;AAAA,IAGN;AAIF,SAAAE,EAAU,MAAM;AACd,KAAM,YACJ,MAAMD,EAAW,eAAeT,CAAG;AAAA,EAEvC,GAAG,CAACA,CAAG,CAAC,qBAGLW,GAAA,EAAmB,OAAOP,GACzB,UAAA,gBAAAQ,EAACC,GAAA,EAAyB,OAAOR,GAC/B,UAAA,gBAAAO,EAACE,GAAA,EAAc,mBAAmBC,GAChC,UAAA,gBAAAH,EAACI,GAAA,EAAc,OAAAb,GACb,UAAA,gBAAAS,EAACK,GAAA,EAAe,QAAAhB,GAAgB,UAAAC,GAC9B,UAAA,gBAAAU,EAACM,GAAA,EAAgB,MAAMT,GACrB,UAAA,gBAAAG,EAACO,GAAA,EAAY,KAAKrB,EAAO,SAAS,SAASA,EAAO,SAAS,OAAOA,EAAO,OACtE,UAAAD,GACH,EAAA,GAHsCG,CAIxC,GACF,EAAA,CACF,GACF,GACF,EAAA,CACF;AAEJ;"}
1
+ {"version":3,"file":"GustoProviderCustomUIAdapter.js","sources":["../../../src/contexts/GustoProvider/GustoProviderCustomUIAdapter.tsx"],"sourcesContent":["import type React from 'react'\nimport { ErrorBoundary } from 'react-error-boundary'\nimport { I18nextProvider } from 'react-i18next'\nimport type { QueryClient } from '@tanstack/react-query'\nimport { useEffect } from 'react'\nimport { ComponentsProvider } from '../ComponentAdapter/ComponentsProvider'\nimport type { ComponentsContextType } from '../ComponentAdapter/useComponentContext'\nimport { ApiProvider } from '../ApiProvider/ApiProvider'\nimport { LoadingIndicatorProvider } from '../LoadingIndicatorProvider/LoadingIndicatorProvider'\nimport type { LoadingIndicatorContextProps } from '../LoadingIndicatorProvider/useLoadingIndicator'\nimport { SDKI18next } from './SDKI18next'\nimport { InternalError } from '@/components/Common'\nimport { LocaleProvider } from '@/contexts/LocaleProvider'\nimport { ThemeProvider } from '@/contexts/ThemeProvider'\nimport type { GustoSDKTheme } from '@/contexts/ThemeProvider/theme'\nimport type { ResourceDictionary, SupportedLanguages } from '@/types/Helpers'\nimport type { SDKHooks } from '@/types/hooks'\n\nexport interface APIConfig {\n baseUrl: string\n headers?: HeadersInit\n hooks?: SDKHooks\n}\n\nexport interface GustoProviderProps {\n config: APIConfig\n dictionary?: ResourceDictionary\n lng?: string\n locale?: string\n currency?: string\n theme?: GustoSDKTheme\n queryClient?: QueryClient\n components: ComponentsContextType\n LoaderComponent?: LoadingIndicatorContextProps['LoadingIndicator']\n}\n\nexport interface GustoProviderCustomUIAdapterProps extends GustoProviderProps {\n children?: React.ReactNode\n}\n\n/**\n * A provider that accepts UI component adapters through the components prop\n */\nconst GustoProviderCustomUIAdapter: React.FC<GustoProviderCustomUIAdapterProps> = props => {\n const {\n children,\n config,\n dictionary,\n lng = 'en',\n locale = 'en-US',\n currency = 'USD',\n theme,\n components,\n LoaderComponent,\n } = props\n\n // Handle dictionary resources\n if (dictionary) {\n for (const language in dictionary) {\n const lang = language as SupportedLanguages\n for (const ns in dictionary[lang]) {\n // Adding resources overrides to i18next instance - initial load will override common namespace and add component specific dictionaries provided by partners\n SDKI18next.addResourceBundle(\n lang,\n ns,\n (dictionary[lang] as Record<string, unknown>)[ns],\n true,\n true,\n )\n }\n }\n }\n\n // Handle language change\n useEffect(() => {\n void (async () => {\n await SDKI18next.changeLanguage(lng)\n })()\n }, [lng])\n\n return (\n <ComponentsProvider value={components}>\n <LoadingIndicatorProvider value={LoaderComponent}>\n <ErrorBoundary FallbackComponent={InternalError}>\n <ThemeProvider theme={theme}>\n <LocaleProvider locale={locale} currency={currency}>\n <I18nextProvider i18n={SDKI18next} key={lng}>\n <ApiProvider url={config.baseUrl} headers={config.headers} hooks={config.hooks}>\n {children}\n </ApiProvider>\n </I18nextProvider>\n </LocaleProvider>\n </ThemeProvider>\n </ErrorBoundary>\n </LoadingIndicatorProvider>\n </ComponentsProvider>\n )\n}\n\nexport { GustoProviderCustomUIAdapter }\n"],"names":["GustoProviderCustomUIAdapter","props","children","config","dictionary","lng","locale","currency","theme","components","LoaderComponent","language","lang","ns","SDKI18next","useEffect","ComponentsProvider","jsx","LoadingIndicatorProvider","ErrorBoundary","InternalError","ThemeProvider","LocaleProvider","I18nextProvider","ApiProvider"],"mappings":";;;;;;;;;;;;;AA2CA,MAAMA,IAA4E,CAAAC,MAAS;AACzF,QAAM;AAAA,IACJ,UAAAC;AAAA,IACA,QAAAC;AAAA,IACA,YAAAC;AAAA,IACA,KAAAC,IAAM;AAAA,IACN,QAAAC,IAAS;AAAA,IACT,UAAAC,IAAW;AAAA,IACX,OAAAC;AAAA,IACA,YAAAC;AAAA,IACA,iBAAAC;AAAA,EAAA,IACET;AAGJ,MAAIG;AACF,eAAWO,KAAYP,GAAY;AACjC,YAAMQ,IAAOD;AACb,iBAAWE,KAAMT,EAAWQ,CAAI;AAE9B,QAAAE,EAAW;AAAA,UACTF;AAAA,UACAC;AAAA,UACCT,EAAWQ,CAAI,EAA8BC,CAAE;AAAA,UAChD;AAAA,UACA;AAAA,QAAA;AAAA,IAGN;AAIF,SAAAE,EAAU,MAAM;AACd,KAAM,YACJ,MAAMD,EAAW,eAAeT,CAAG;AAAA,EAEvC,GAAG,CAACA,CAAG,CAAC,qBAGLW,GAAA,EAAmB,OAAOP,GACzB,UAAA,gBAAAQ,EAACC,GAAA,EAAyB,OAAOR,GAC/B,UAAA,gBAAAO,EAACE,GAAA,EAAc,mBAAmBC,GAChC,UAAA,gBAAAH,EAACI,GAAA,EAAc,OAAAb,GACb,UAAA,gBAAAS,EAACK,GAAA,EAAe,QAAAhB,GAAgB,UAAAC,GAC9B,UAAA,gBAAAU,EAACM,GAAA,EAAgB,MAAMT,GACrB,UAAA,gBAAAG,EAACO,GAAA,EAAY,KAAKrB,EAAO,SAAS,SAASA,EAAO,SAAS,OAAOA,EAAO,OACtE,UAAAD,GACH,EAAA,GAHsCG,CAIxC,GACF,EAAA,CACF,GACF,GACF,EAAA,CACF;AAEJ;"}
@@ -1,11 +1,7 @@
1
1
  import { default as React } from 'react';
2
2
  import { GustoSDKTheme } from './theme';
3
- import { GTheme } from '../../types/GTheme';
4
- import { DeepPartial } from '../../types/Helpers';
5
- type EnhancedTheme = DeepPartial<GTheme> & Partial<GustoSDKTheme>;
6
3
  export interface ThemeProviderProps {
7
- theme?: EnhancedTheme;
4
+ theme?: GustoSDKTheme;
8
5
  children?: React.ReactNode;
9
6
  }
10
7
  export declare const ThemeProvider: React.FC<ThemeProviderProps>;
11
- export {};
@@ -1,75 +1,33 @@
1
- import { jsx as y } from "react/jsx-runtime";
2
- import { useRef as K, useEffect as w } from "react";
3
- import { useTranslation as x } from "react-i18next";
4
- import { createTheme as E } from "./createTheme.js";
5
- import { ThemeContext as N } from "./useTheme.js";
6
- import { gustoSDKTheme as O } from "./theme.js";
1
+ import { jsx as s } from "react/jsx-runtime";
2
+ import { useRef as c, useEffect as u } from "react";
3
+ import { useTranslation as a } from "react-i18next";
4
+ import { ThemeContext as d } from "./useTheme.js";
5
+ import { mergePartnerTheme as l } from "./theme.js";
7
6
  /* empty css */
8
- const B = ({
7
+ const D = ({
9
8
  theme: n = {},
10
9
  children: t
11
10
  }) => {
12
- const e = K(null), { t: r } = x(), o = K(null);
13
- return w(() => {
14
- const {
15
- colors: c,
16
- spacing: s,
17
- typography: a,
18
- radius: i,
19
- transitionDuration: m,
20
- rootFS: u,
21
- focus: d,
22
- shadow: l,
23
- input: h,
24
- button: p,
25
- radio: f,
26
- checkbox: T,
27
- table: S,
28
- calendarPreview: g,
29
- card: b,
30
- link: D,
31
- badge: v,
32
- ...G
33
- } = n, j = {
34
- ...c ? { colors: c } : {},
35
- ...s ? { spacing: s } : {},
36
- ...a ? { typography: a } : {},
37
- ...i ? { radius: i } : {},
38
- ...m ? { transitionDuration: m } : {},
39
- ...u ? { rootFS: u } : {},
40
- ...d ? { focus: d } : {},
41
- ...l ? { shadow: l } : {},
42
- ...h ? { input: h } : {},
43
- ...p ? { button: p } : {},
44
- ...f ? { radio: f } : {},
45
- ...T ? { checkbox: T } : {},
46
- ...S ? { table: S } : {},
47
- ...g ? { calendarPreview: g } : {},
48
- ...b ? { card: b } : {},
49
- ...D ? { link: D } : {},
50
- ...v ? { badge: v } : {}
51
- }, C = E(j), k = {
52
- ...O,
53
- ...G
54
- }, $ = {
55
- ...C,
56
- ...k
57
- };
11
+ const e = c(null), { t: r } = a(), o = c(null);
12
+ return u(() => {
13
+ const i = l(n);
58
14
  e.current && e.current.remove(), e.current = document.createElement("style"), e.current.setAttribute("data-testid", "GSDK"), e.current.appendChild(
59
- document.createTextNode(`.GSDK{
60
- ${P($).join(`
15
+ document.createTextNode(
16
+ `.GSDK{
17
+ ${m(i).join(`
61
18
  `)}
62
- }`)
19
+ }`
20
+ )
63
21
  ), document.head.appendChild(e.current);
64
22
  }, [n, r]), // @ts-expect-error HACK fix mismatch where containerRef allows null
65
- /* @__PURE__ */ y(N.Provider, { value: { container: o }, children: /* @__PURE__ */ y("article", { className: "GSDK", "data-testid": "GSDK", ref: o, children: t }) });
66
- }, P = (n, t) => {
23
+ /* @__PURE__ */ s(d.Provider, { value: { container: o }, children: /* @__PURE__ */ s("article", { className: "GSDK", "data-testid": "GSDK", ref: o, children: t }) });
24
+ }, m = (n, t) => {
67
25
  const e = [];
68
26
  for (const [r, o] of Object.entries(n))
69
- typeof o == "object" ? e.push(...P(o, t ? t + "-" + r : r)) : e.push(`--g-${t ? t + "-" + r : r}: ${String(o)};`);
27
+ typeof o == "object" ? e.push(...m(o, t ? t + "-" + r : r)) : e.push(`--g-${t ? t + "-" + r : r}: ${String(o)};`);
70
28
  return e;
71
29
  };
72
30
  export {
73
- B as ThemeProvider
31
+ D as ThemeProvider
74
32
  };
75
33
  //# sourceMappingURL=ThemeProvider.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ThemeProvider.js","sources":["../../../src/contexts/ThemeProvider/ThemeProvider.tsx"],"sourcesContent":["import type React from 'react'\nimport { useEffect, useRef } from 'react'\nimport { useTranslation } from 'react-i18next'\nimport { createTheme } from './createTheme'\nimport { ThemeContext } from './useTheme'\nimport { gustoSDKTheme, type GustoSDKTheme } from './theme'\nimport type { GTheme } from '@/types/GTheme'\nimport '@/styles/sdk.scss'\nimport type { DeepPartial } from '@/types/Helpers'\n\n// Create a union type that allows both the existing GTheme structure and the new flat structure\ntype EnhancedTheme = DeepPartial<GTheme> & Partial<GustoSDKTheme>\n\nexport interface ThemeProviderProps {\n theme?: EnhancedTheme\n children?: React.ReactNode\n}\n\nexport const ThemeProvider: React.FC<ThemeProviderProps> = ({\n theme: partnerTheme = {},\n children,\n}) => {\n const GThemeVariables = useRef<HTMLStyleElement | null>(null)\n const { t } = useTranslation()\n const containerRef = useRef<HTMLElement>(null)\n\n useEffect(() => {\n // Temporarily supports the legacy theme while we migrate to the new theme. Pulls out the\n // legacy theme entries and merges them with the partner overrides. Once the theming migration\n // is complete, we can remove the legacy theme entries and only support the new theme.\n const {\n colors,\n spacing,\n typography,\n radius,\n transitionDuration,\n rootFS,\n focus,\n shadow,\n input,\n button,\n radio,\n checkbox,\n table,\n calendarPreview,\n card,\n link,\n badge,\n ...gustoSDKPartnerTheme\n } = partnerTheme\n\n const legacyPartnerTheme = {\n ...(colors ? { colors } : {}),\n ...(spacing ? { spacing } : {}),\n ...(typography ? { typography } : {}),\n ...(radius ? { radius } : {}),\n ...(transitionDuration ? { transitionDuration } : {}),\n ...(rootFS ? { rootFS } : {}),\n ...(focus ? { focus } : {}),\n ...(shadow ? { shadow } : {}),\n ...(input ? { input } : {}),\n ...(button ? { button } : {}),\n ...(radio ? { radio } : {}),\n ...(checkbox ? { checkbox } : {}),\n ...(table ? { table } : {}),\n ...(calendarPreview ? { calendarPreview } : {}),\n ...(card ? { card } : {}),\n ...(link ? { link } : {}),\n ...(badge ? { badge } : {}),\n }\n\n const legacyTheme = createTheme(legacyPartnerTheme)\n\n const gustoSDKThemeWithOverrides = {\n ...gustoSDKTheme,\n ...gustoSDKPartnerTheme,\n }\n\n const theme = {\n ...legacyTheme,\n ...gustoSDKThemeWithOverrides,\n }\n\n if (GThemeVariables.current) {\n GThemeVariables.current.remove()\n }\n GThemeVariables.current = document.createElement('style')\n GThemeVariables.current.setAttribute('data-testid', 'GSDK')\n GThemeVariables.current.appendChild(\n document.createTextNode(`.GSDK{\\n${parseThemeToCSS(theme).join('\\n')}\\n}`),\n )\n document.head.appendChild(GThemeVariables.current)\n }, [partnerTheme, t])\n\n return (\n // @ts-expect-error HACK fix mismatch where containerRef allows null\n <ThemeContext.Provider value={{ container: containerRef }}>\n <article className=\"GSDK\" data-testid=\"GSDK\" ref={containerRef}>\n {children}\n </article>\n </ThemeContext.Provider>\n )\n}\n\n/**\n * Recursive flattening of the theme object into css variable format\n */\nconst parseThemeToCSS = (theme: GTheme, prefix?: string): string[] => {\n const cssProps: string[] = []\n for (const [key, value] of Object.entries(theme)) {\n if (typeof value === 'object') {\n cssProps.push(...parseThemeToCSS(value, prefix ? prefix + '-' + key : key))\n } else {\n cssProps.push(`--g-${prefix ? prefix + '-' + key : key}: ${String(value)};`)\n }\n }\n return cssProps\n}\n"],"names":["ThemeProvider","partnerTheme","children","GThemeVariables","useRef","t","useTranslation","containerRef","useEffect","colors","spacing","typography","radius","transitionDuration","rootFS","focus","shadow","input","button","radio","checkbox","table","calendarPreview","card","link","badge","gustoSDKPartnerTheme","legacyPartnerTheme","legacyTheme","createTheme","gustoSDKThemeWithOverrides","gustoSDKTheme","theme","parseThemeToCSS","ThemeContext","jsx","prefix","cssProps","key","value"],"mappings":"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"}
1
+ {"version":3,"file":"ThemeProvider.js","sources":["../../../src/contexts/ThemeProvider/ThemeProvider.tsx"],"sourcesContent":["import type React from 'react'\nimport { useEffect, useRef } from 'react'\nimport { useTranslation } from 'react-i18next'\nimport { ThemeContext } from './useTheme'\nimport { mergePartnerTheme, type GustoSDKTheme } from './theme'\nimport '@/styles/sdk.scss'\n\nexport interface ThemeProviderProps {\n theme?: GustoSDKTheme\n children?: React.ReactNode\n}\n\nexport const ThemeProvider: React.FC<ThemeProviderProps> = ({\n theme: partnerThemeOverrides = {},\n children,\n}) => {\n const GThemeVariables = useRef<HTMLStyleElement | null>(null)\n const { t } = useTranslation()\n const containerRef = useRef<HTMLElement>(null)\n\n useEffect(() => {\n const gustoSDKThemeWithOverrides = mergePartnerTheme(partnerThemeOverrides)\n\n if (GThemeVariables.current) {\n GThemeVariables.current.remove()\n }\n GThemeVariables.current = document.createElement('style')\n GThemeVariables.current.setAttribute('data-testid', 'GSDK')\n GThemeVariables.current.appendChild(\n document.createTextNode(\n `.GSDK{\\n${parseThemeToCSS(gustoSDKThemeWithOverrides).join('\\n')}\\n}`,\n ),\n )\n document.head.appendChild(GThemeVariables.current)\n }, [partnerThemeOverrides, t])\n\n return (\n // @ts-expect-error HACK fix mismatch where containerRef allows null\n <ThemeContext.Provider value={{ container: containerRef }}>\n <article className=\"GSDK\" data-testid=\"GSDK\" ref={containerRef}>\n {children}\n </article>\n </ThemeContext.Provider>\n )\n}\n\n/**\n * Recursive flattening of the theme object into css variable format\n */\nconst parseThemeToCSS = (theme: GustoSDKTheme, prefix?: string): string[] => {\n const cssProps: string[] = []\n for (const [key, value] of Object.entries(theme)) {\n if (typeof value === 'object') {\n cssProps.push(...parseThemeToCSS(value, prefix ? prefix + '-' + key : key))\n } else {\n cssProps.push(`--g-${prefix ? prefix + '-' + key : key}: ${String(value)};`)\n }\n }\n return cssProps\n}\n"],"names":["ThemeProvider","partnerThemeOverrides","children","GThemeVariables","useRef","t","useTranslation","containerRef","useEffect","gustoSDKThemeWithOverrides","mergePartnerTheme","parseThemeToCSS","ThemeContext","jsx","theme","prefix","cssProps","key","value"],"mappings":";;;;;;AAYO,MAAMA,IAA8C,CAAC;AAAA,EAC1D,OAAOC,IAAwB,CAAA;AAAA,EAC/B,UAAAC;AACF,MAAM;AACJ,QAAMC,IAAkBC,EAAgC,IAAI,GACtD,EAAE,GAAAC,EAAA,IAAMC,EAAA,GACRC,IAAeH,EAAoB,IAAI;AAE7C,SAAAI,EAAU,MAAM;AACd,UAAMC,IAA6BC,EAAkBT,CAAqB;AAE1E,IAAIE,EAAgB,WAClBA,EAAgB,QAAQ,OAAA,GAE1BA,EAAgB,UAAU,SAAS,cAAc,OAAO,GACxDA,EAAgB,QAAQ,aAAa,eAAe,MAAM,GAC1DA,EAAgB,QAAQ;AAAA,MACtB,SAAS;AAAA,QACP;AAAA,EAAWQ,EAAgBF,CAA0B,EAAE,KAAK;AAAA,CAAI,CAAC;AAAA;AAAA,MAAA;AAAA,IACnE,GAEF,SAAS,KAAK,YAAYN,EAAgB,OAAO;AAAA,EACnD,GAAG,CAACF,GAAuBI,CAAC,CAAC;AAAA,oBAI1BO,EAAa,UAAb,EAAsB,OAAO,EAAE,WAAWL,EAAA,GACzC,UAAA,gBAAAM,EAAC,WAAA,EAAQ,WAAU,QAAO,eAAY,QAAO,KAAKN,GAC/C,UAAAL,GACH,EAAA,CACF;AAEJ,GAKMS,IAAkB,CAACG,GAAsBC,MAA8B;AAC3E,QAAMC,IAAqB,CAAA;AAC3B,aAAW,CAACC,GAAKC,CAAK,KAAK,OAAO,QAAQJ,CAAK;AAC7C,IAAI,OAAOI,KAAU,WACnBF,EAAS,KAAK,GAAGL,EAAgBO,GAAOH,IAASA,IAAS,MAAME,IAAMA,CAAG,CAAC,IAE1ED,EAAS,KAAK,OAAOD,IAASA,IAAS,MAAME,IAAMA,CAAG,KAAK,OAAOC,CAAK,CAAC,GAAG;AAG/E,SAAOF;AACT;"}
@@ -1,6 +1,8 @@
1
- export declare const gustoSDKTheme: {
1
+ declare const defaultThemeColors: {
2
2
  colorBody: string;
3
+ colorBodyAccent: string;
3
4
  colorBodyContent: string;
5
+ colorBodySubContent: string;
4
6
  colorPrimary: string;
5
7
  colorPrimaryAccent: string;
6
8
  colorPrimaryContent: string;
@@ -19,18 +21,22 @@ export declare const gustoSDKTheme: {
19
21
  colorSuccess: string;
20
22
  colorSuccessAccent: string;
21
23
  colorSuccessContent: string;
22
- inputBackgroundColor: string;
24
+ colorBorder: string;
25
+ };
26
+ export type GustoSDKThemeColors = Partial<typeof defaultThemeColors>;
27
+ export declare const createTheme: (colors?: GustoSDKThemeColors) => {
28
+ inputBackgroundColor: string | undefined;
23
29
  inputBorderColor: string;
24
- inputContentColor: string;
30
+ inputContentColor: string | undefined;
25
31
  inputBorderWidth: string;
26
- inputPlaceholderColor: string;
27
- inputAdornmentColor: string;
28
- inputDisabledBackgroundColor: string;
29
- inputLabelColor: string;
32
+ inputPlaceholderColor: string | undefined;
33
+ inputAdornmentColor: string | undefined;
34
+ inputDisabledBackgroundColor: string | undefined;
35
+ inputLabelColor: string | undefined;
30
36
  inputLabelFontSize: string;
31
37
  inputLabelFontWeight: string;
32
- inputDescriptionColor: string;
33
- inputErrorColor: string;
38
+ inputDescriptionColor: string | undefined;
39
+ inputErrorColor: string | undefined;
34
40
  inputRadius: string;
35
41
  buttonRadius: string;
36
42
  badgeRadius: string;
@@ -53,7 +59,32 @@ export declare const gustoSDKTheme: {
53
59
  transitionDuration: string;
54
60
  shadowResting: string;
55
61
  shadowTopmost: string;
56
- focusRingColor: string;
62
+ focusRingColor: string | undefined;
57
63
  focusRingWidth: string;
64
+ colorBody: string;
65
+ colorBodyAccent: string;
66
+ colorBodyContent: string;
67
+ colorBodySubContent: string;
68
+ colorPrimary: string;
69
+ colorPrimaryAccent: string;
70
+ colorPrimaryContent: string;
71
+ colorSecondary: string;
72
+ colorSecondaryAccent: string;
73
+ colorSecondaryContent: string;
74
+ colorInfo: string;
75
+ colorInfoAccent: string;
76
+ colorInfoContent: string;
77
+ colorWarning: string;
78
+ colorWarningAccent: string;
79
+ colorWarningContent: string;
80
+ colorError: string;
81
+ colorErrorAccent: string;
82
+ colorErrorContent: string;
83
+ colorSuccess: string;
84
+ colorSuccessAccent: string;
85
+ colorSuccessContent: string;
86
+ colorBorder: string;
58
87
  };
59
- export type GustoSDKTheme = typeof gustoSDKTheme;
88
+ export type GustoSDKTheme = Partial<ReturnType<typeof createTheme>>;
89
+ export declare const mergePartnerTheme: (partnerTheme: GustoSDKTheme) => GustoSDKTheme;
90
+ export {};
@@ -1,9 +1,9 @@
1
- /* empty css */
2
- import { toRem as n, getRootFontSize as r } from "../../helpers/rem.js";
1
+ import { toRem as n, getRootFontSize as a } from "../../helpers/rem.js";
3
2
  const o = {
4
3
  neutral: {
5
4
  100: "#FFFFFF",
6
5
  300: "#F4F4F3",
6
+ 400: "#EAEAEA",
7
7
  500: "#DCDCDC",
8
8
  800: "#6C6C72",
9
9
  900: "#525257",
@@ -30,14 +30,15 @@ const o = {
30
30
  800: "#1C1C1C"
31
31
  }
32
32
  }, i = {
33
- // Colors
34
33
  colorBody: o.neutral[100],
34
+ colorBodyAccent: o.neutral[300],
35
35
  colorBodyContent: o.neutral[1e3],
36
+ colorBodySubContent: o.neutral[800],
36
37
  colorPrimary: o.neutral[1e3],
37
38
  colorPrimaryAccent: o.neutral[900],
38
39
  colorPrimaryContent: o.neutral[100],
39
40
  colorSecondary: o.neutral[100],
40
- colorSecondaryAccent: o.neutral[300],
41
+ colorSecondaryAccent: o.neutral[400],
41
42
  colorSecondaryContent: o.neutral[1e3],
42
43
  colorInfo: o.info[100],
43
44
  colorInfoAccent: o.info[500],
@@ -51,26 +52,31 @@ const o = {
51
52
  colorSuccess: o.success[100],
52
53
  colorSuccessAccent: o.success[500],
53
54
  colorSuccessContent: o.success[800],
55
+ colorBorder: o.neutral[400]
56
+ }, u = (r = {}) => ({
57
+ // Colors
58
+ ...i,
59
+ ...r,
54
60
  // Input Colors
55
- inputBackgroundColor: o.neutral[100],
61
+ inputBackgroundColor: r.colorBody,
56
62
  inputBorderColor: o.neutral[500],
57
- inputContentColor: o.neutral[1e3],
63
+ inputContentColor: r.colorBodyContent,
58
64
  inputBorderWidth: "1px",
59
- inputPlaceholderColor: o.neutral[800],
60
- inputAdornmentColor: o.neutral[800],
61
- inputDisabledBackgroundColor: o.neutral[300],
65
+ inputPlaceholderColor: r.colorBodySubContent,
66
+ inputAdornmentColor: r.colorBodySubContent,
67
+ inputDisabledBackgroundColor: r.colorBodyAccent,
62
68
  // Field Colors
63
- inputLabelColor: o.neutral[1e3],
69
+ inputLabelColor: r.colorBodyContent,
64
70
  inputLabelFontSize: n(16),
65
71
  inputLabelFontWeight: "500",
66
- inputDescriptionColor: o.neutral[900],
67
- inputErrorColor: o.error[500],
72
+ inputDescriptionColor: r.colorBodySubContent,
73
+ inputErrorColor: r.colorErrorAccent,
68
74
  // Radius
69
75
  inputRadius: n(8),
70
76
  buttonRadius: n(8),
71
77
  badgeRadius: n(16),
72
78
  // Font
73
- fontSizeRoot: r(),
79
+ fontSizeRoot: a(),
74
80
  fontFamily: "Geist",
75
81
  fontLineHeight: n(24),
76
82
  fontSizeSmall: n(14),
@@ -92,10 +98,20 @@ const o = {
92
98
  shadowResting: "0px 1px 2px 0px rgba(10, 13, 18, 0.05)",
93
99
  shadowTopmost: "0px 4px 6px 0px rgba(28, 28, 28, 0.05), 0px 10px 15px 0px rgba(28, 28, 28, 0.10)",
94
100
  // Focus
95
- focusRingColor: o.neutral[1e3],
101
+ focusRingColor: r.colorPrimary,
96
102
  focusRingWidth: "2px"
103
+ }), s = (r) => {
104
+ const c = Object.entries(i).reduce(
105
+ (e, [t, l]) => (e[t] = r[t] || l, e),
106
+ {}
107
+ );
108
+ return {
109
+ ...u(c),
110
+ ...r
111
+ };
97
112
  };
98
113
  export {
99
- i as gustoSDKTheme
114
+ u as createTheme,
115
+ s as mergePartnerTheme
100
116
  };
101
117
  //# sourceMappingURL=theme.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"theme.js","sources":["../../../src/contexts/ThemeProvider/theme.ts"],"sourcesContent":["import '@/styles/sdk.scss'\nimport { getRootFontSize, toRem } from '@/helpers/rem'\n\n// Colors are for internal use in our theme currently\n// We don't export them for partner use or overrides\nconst colors = {\n neutral: {\n 100: '#FFFFFF',\n 200: '#FBFAFA',\n 300: '#F4F4F3',\n 400: '#EAEAEA',\n 500: '#DCDCDC',\n 600: '#BABABC',\n 700: '#919197',\n 800: '#6C6C72',\n 900: '#525257',\n 1000: '#1C1C1C',\n },\n error: {\n 100: '#FEF3F2',\n 500: '#C5271C',\n 800: '#D92D20',\n },\n warning: {\n 100: '#FFFAF2',\n 500: '#E9B550',\n 700: '#B88023',\n 800: '#B88023',\n },\n success: {\n 100: '#F3FAFB',\n 400: '#2BABAD',\n 500: '#0A8080',\n 800: '#005961',\n },\n info: {\n 100: '#F4F4F3',\n 500: '#DCDCDC',\n 800: '#1C1C1C',\n },\n}\n\nexport const gustoSDKTheme = {\n // Colors\n colorBody: colors.neutral[100],\n colorBodyContent: colors.neutral[1000],\n colorPrimary: colors.neutral[1000],\n colorPrimaryAccent: colors.neutral[900],\n colorPrimaryContent: colors.neutral[100],\n colorSecondary: colors.neutral[100],\n colorSecondaryAccent: colors.neutral[300],\n colorSecondaryContent: colors.neutral[1000],\n colorInfo: colors.info[100],\n colorInfoAccent: colors.info[500],\n colorInfoContent: colors.info[800],\n colorWarning: colors.warning[100],\n colorWarningAccent: colors.warning[500],\n colorWarningContent: colors.warning[800],\n colorError: colors.error[100],\n colorErrorAccent: colors.error[500],\n colorErrorContent: colors.error[800],\n colorSuccess: colors.success[100],\n colorSuccessAccent: colors.success[500],\n colorSuccessContent: colors.success[800],\n // Input Colors\n inputBackgroundColor: colors.neutral[100],\n inputBorderColor: colors.neutral[500],\n inputContentColor: colors.neutral[1000],\n inputBorderWidth: '1px',\n inputPlaceholderColor: colors.neutral[800],\n inputAdornmentColor: colors.neutral[800],\n inputDisabledBackgroundColor: colors.neutral[300],\n // Field Colors\n inputLabelColor: colors.neutral[1000],\n inputLabelFontSize: toRem(16),\n inputLabelFontWeight: '500',\n inputDescriptionColor: colors.neutral[900],\n inputErrorColor: colors.error[500],\n // Radius\n inputRadius: toRem(8),\n buttonRadius: toRem(8),\n badgeRadius: toRem(16),\n // Font\n fontSizeRoot: getRootFontSize(),\n fontFamily: 'Geist',\n fontLineHeight: toRem(24),\n fontSizeSmall: toRem(14),\n fontSizeRegular: toRem(16),\n fontSizeLarge: toRem(18),\n fontSizeHeading1: toRem(32),\n fontSizeHeading2: toRem(24),\n fontSizeHeading3: toRem(20),\n fontSizeHeading4: toRem(18),\n fontSizeHeading5: toRem(16),\n fontSizeHeading6: toRem(14),\n fontWeightRegular: '400',\n fontWeightMedium: '500',\n fontWeightSemibold: '600',\n fontWeightBold: '700',\n // Transitions\n transitionDuration: '200ms',\n // Shadows\n shadowResting: '0px 1px 2px 0px rgba(10, 13, 18, 0.05)',\n shadowTopmost: '0px 4px 6px 0px rgba(28, 28, 28, 0.05), 0px 10px 15px 0px rgba(28, 28, 28, 0.10)',\n // Focus\n focusRingColor: colors.neutral[1000],\n focusRingWidth: '2px',\n}\n\nexport type GustoSDKTheme = typeof gustoSDKTheme\n"],"names":["colors","gustoSDKTheme","toRem","getRootFontSize"],"mappings":";;AAKA,MAAMA,IAAS;AAAA,EACb,SAAS;AAAA,IACP,KAAK;AAAA,IAEL,KAAK;AAAA,IAEL,KAAK;AAAA,IAGL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAM;AAAA,EAAA;AAAA,EAER,OAAO;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,EAAA;AAAA,EAEP,SAAS;AAAA,IACP,KAAK;AAAA,IACL,KAAK;AAAA,IAEL,KAAK;AAAA,EAAA;AAAA,EAEP,SAAS;AAAA,IACP,KAAK;AAAA,IAEL,KAAK;AAAA,IACL,KAAK;AAAA,EAAA;AAAA,EAEP,MAAM;AAAA,IACJ,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,EAAA;AAET,GAEaC,IAAgB;AAAA;AAAA,EAE3B,WAAWD,EAAO,QAAQ,GAAG;AAAA,EAC7B,kBAAkBA,EAAO,QAAQ,GAAI;AAAA,EACrC,cAAcA,EAAO,QAAQ,GAAI;AAAA,EACjC,oBAAoBA,EAAO,QAAQ,GAAG;AAAA,EACtC,qBAAqBA,EAAO,QAAQ,GAAG;AAAA,EACvC,gBAAgBA,EAAO,QAAQ,GAAG;AAAA,EAClC,sBAAsBA,EAAO,QAAQ,GAAG;AAAA,EACxC,uBAAuBA,EAAO,QAAQ,GAAI;AAAA,EAC1C,WAAWA,EAAO,KAAK,GAAG;AAAA,EAC1B,iBAAiBA,EAAO,KAAK,GAAG;AAAA,EAChC,kBAAkBA,EAAO,KAAK,GAAG;AAAA,EACjC,cAAcA,EAAO,QAAQ,GAAG;AAAA,EAChC,oBAAoBA,EAAO,QAAQ,GAAG;AAAA,EACtC,qBAAqBA,EAAO,QAAQ,GAAG;AAAA,EACvC,YAAYA,EAAO,MAAM,GAAG;AAAA,EAC5B,kBAAkBA,EAAO,MAAM,GAAG;AAAA,EAClC,mBAAmBA,EAAO,MAAM,GAAG;AAAA,EACnC,cAAcA,EAAO,QAAQ,GAAG;AAAA,EAChC,oBAAoBA,EAAO,QAAQ,GAAG;AAAA,EACtC,qBAAqBA,EAAO,QAAQ,GAAG;AAAA;AAAA,EAEvC,sBAAsBA,EAAO,QAAQ,GAAG;AAAA,EACxC,kBAAkBA,EAAO,QAAQ,GAAG;AAAA,EACpC,mBAAmBA,EAAO,QAAQ,GAAI;AAAA,EACtC,kBAAkB;AAAA,EAClB,uBAAuBA,EAAO,QAAQ,GAAG;AAAA,EACzC,qBAAqBA,EAAO,QAAQ,GAAG;AAAA,EACvC,8BAA8BA,EAAO,QAAQ,GAAG;AAAA;AAAA,EAEhD,iBAAiBA,EAAO,QAAQ,GAAI;AAAA,EACpC,oBAAoBE,EAAM,EAAE;AAAA,EAC5B,sBAAsB;AAAA,EACtB,uBAAuBF,EAAO,QAAQ,GAAG;AAAA,EACzC,iBAAiBA,EAAO,MAAM,GAAG;AAAA;AAAA,EAEjC,aAAaE,EAAM,CAAC;AAAA,EACpB,cAAcA,EAAM,CAAC;AAAA,EACrB,aAAaA,EAAM,EAAE;AAAA;AAAA,EAErB,cAAcC,EAAA;AAAA,EACd,YAAY;AAAA,EACZ,gBAAgBD,EAAM,EAAE;AAAA,EACxB,eAAeA,EAAM,EAAE;AAAA,EACvB,iBAAiBA,EAAM,EAAE;AAAA,EACzB,eAAeA,EAAM,EAAE;AAAA,EACvB,kBAAkBA,EAAM,EAAE;AAAA,EAC1B,kBAAkBA,EAAM,EAAE;AAAA,EAC1B,kBAAkBA,EAAM,EAAE;AAAA,EAC1B,kBAAkBA,EAAM,EAAE;AAAA,EAC1B,kBAAkBA,EAAM,EAAE;AAAA,EAC1B,kBAAkBA,EAAM,EAAE;AAAA,EAC1B,mBAAmB;AAAA,EACnB,kBAAkB;AAAA,EAClB,oBAAoB;AAAA,EACpB,gBAAgB;AAAA;AAAA,EAEhB,oBAAoB;AAAA;AAAA,EAEpB,eAAe;AAAA,EACf,eAAe;AAAA;AAAA,EAEf,gBAAgBF,EAAO,QAAQ,GAAI;AAAA,EACnC,gBAAgB;AAClB;"}
1
+ {"version":3,"file":"theme.js","sources":["../../../src/contexts/ThemeProvider/theme.ts"],"sourcesContent":["import { getRootFontSize, toRem } from '@/helpers/rem'\n\n// Colors are for internal use in our theme currently\n// We don't export them for partner use or overrides\nconst baseColors = {\n neutral: {\n 100: '#FFFFFF',\n 200: '#FBFAFA',\n 300: '#F4F4F3',\n 400: '#EAEAEA',\n 500: '#DCDCDC',\n 600: '#BABABC',\n 700: '#919197',\n 800: '#6C6C72',\n 900: '#525257',\n 1000: '#1C1C1C',\n },\n error: {\n 100: '#FEF3F2',\n 500: '#C5271C',\n 800: '#D92D20',\n },\n warning: {\n 100: '#FFFAF2',\n 500: '#E9B550',\n 700: '#B88023',\n 800: '#B88023',\n },\n success: {\n 100: '#F3FAFB',\n 400: '#2BABAD',\n 500: '#0A8080',\n 800: '#005961',\n },\n info: {\n 100: '#F4F4F3',\n 500: '#DCDCDC',\n 800: '#1C1C1C',\n },\n}\n\nconst defaultThemeColors = {\n colorBody: baseColors.neutral[100],\n colorBodyAccent: baseColors.neutral[300],\n colorBodyContent: baseColors.neutral[1000],\n colorBodySubContent: baseColors.neutral[800],\n colorPrimary: baseColors.neutral[1000],\n colorPrimaryAccent: baseColors.neutral[900],\n colorPrimaryContent: baseColors.neutral[100],\n colorSecondary: baseColors.neutral[100],\n colorSecondaryAccent: baseColors.neutral[400],\n colorSecondaryContent: baseColors.neutral[1000],\n colorInfo: baseColors.info[100],\n colorInfoAccent: baseColors.info[500],\n colorInfoContent: baseColors.info[800],\n colorWarning: baseColors.warning[100],\n colorWarningAccent: baseColors.warning[500],\n colorWarningContent: baseColors.warning[800],\n colorError: baseColors.error[100],\n colorErrorAccent: baseColors.error[500],\n colorErrorContent: baseColors.error[800],\n colorSuccess: baseColors.success[100],\n colorSuccessAccent: baseColors.success[500],\n colorSuccessContent: baseColors.success[800],\n colorBorder: baseColors.neutral[400],\n}\n\nexport type GustoSDKThemeColors = Partial<typeof defaultThemeColors>\n\nexport const createTheme = (colors: GustoSDKThemeColors = {}) => {\n return {\n // Colors\n ...defaultThemeColors,\n ...colors,\n // Input Colors\n inputBackgroundColor: colors.colorBody,\n inputBorderColor: baseColors.neutral[500],\n inputContentColor: colors.colorBodyContent,\n inputBorderWidth: '1px',\n inputPlaceholderColor: colors.colorBodySubContent,\n inputAdornmentColor: colors.colorBodySubContent,\n inputDisabledBackgroundColor: colors.colorBodyAccent,\n // Field Colors\n inputLabelColor: colors.colorBodyContent,\n inputLabelFontSize: toRem(16),\n inputLabelFontWeight: '500',\n inputDescriptionColor: colors.colorBodySubContent,\n inputErrorColor: colors.colorErrorAccent,\n // Radius\n inputRadius: toRem(8),\n buttonRadius: toRem(8),\n badgeRadius: toRem(16),\n // Font\n fontSizeRoot: getRootFontSize(),\n fontFamily: 'Geist',\n fontLineHeight: toRem(24),\n fontSizeSmall: toRem(14),\n fontSizeRegular: toRem(16),\n fontSizeLarge: toRem(18),\n fontSizeHeading1: toRem(32),\n fontSizeHeading2: toRem(24),\n fontSizeHeading3: toRem(20),\n fontSizeHeading4: toRem(18),\n fontSizeHeading5: toRem(16),\n fontSizeHeading6: toRem(14),\n fontWeightRegular: '400',\n fontWeightMedium: '500',\n fontWeightSemibold: '600',\n fontWeightBold: '700',\n // Transitions\n transitionDuration: '200ms',\n // Shadows\n shadowResting: '0px 1px 2px 0px rgba(10, 13, 18, 0.05)',\n shadowTopmost:\n '0px 4px 6px 0px rgba(28, 28, 28, 0.05), 0px 10px 15px 0px rgba(28, 28, 28, 0.10)',\n // Focus\n focusRingColor: colors.colorPrimary,\n focusRingWidth: '2px',\n }\n}\n\nexport type GustoSDKTheme = Partial<ReturnType<typeof createTheme>>\n\nexport const mergePartnerTheme = (partnerTheme: GustoSDKTheme): GustoSDKTheme => {\n const colors = Object.entries(defaultThemeColors).reduce(\n (acc: GustoSDKThemeColors, [key, value]) => {\n acc[key as keyof typeof defaultThemeColors] =\n partnerTheme[key as keyof typeof defaultThemeColors] || value\n return acc\n },\n {},\n )\n\n const theme = createTheme(colors)\n\n return {\n ...theme,\n ...partnerTheme,\n }\n}\n"],"names":["baseColors","defaultThemeColors","createTheme","colors","toRem","getRootFontSize","mergePartnerTheme","partnerTheme","acc","key","value"],"mappings":"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"}
@@ -1,14 +1,11 @@
1
1
  import { BREAKPOINTS } from '../shared/constants';
2
- import { GThemeSpacing } from '../types/GTheme';
3
2
  type BreakpointKey = (typeof BREAKPOINTS)[keyof typeof BREAKPOINTS];
4
3
  export type Responsive<T> = T | Partial<{
5
4
  [K in BreakpointKey]: T;
6
5
  }>;
7
6
  export type CustomPropertyValue = string | number;
8
- export type ResponsiveSpacing = Responsive<keyof GThemeSpacing | 0>;
9
7
  export declare function isResponsiveValue(value: Responsive<CustomPropertyValue | CustomPropertyValue[]>): boolean;
10
8
  export declare function transformResponsiveValue(value: Responsive<CustomPropertyValue | CustomPropertyValue[]>, transformValue: (value: CustomPropertyValue | CustomPropertyValue[]) => string): Record<string, string>;
11
- export declare function transformResponsiveSpacingValue(responsiveValue: ResponsiveSpacing): Record<string, string>;
12
9
  export declare const toRemIfNumeric: (value: string | number) => string;
13
10
  export declare function createResponsiveCustomProperties(property: string, value?: Responsive<CustomPropertyValue | CustomPropertyValue[]>): Record<string, string>;
14
11
  export declare function setResponsiveCustomProperties(properties?: Record<string, Responsive<CustomPropertyValue | CustomPropertyValue[]> | undefined>): Record<string, string>;