@gusto/embedded-react-sdk 0.47.0 → 0.47.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +23 -0
- package/dist/components/Common/ActionsLayout/ActionsLayout.d.ts +1 -0
- package/dist/components/Common/ActionsLayout/ActionsLayout.js.map +1 -1
- package/dist/components/Common/Alert/Alert.d.ts +2 -0
- package/dist/components/Common/DataView/DataCards/DataCards.d.ts +2 -0
- package/dist/components/Common/DataView/DataCards/DataCards.js.map +1 -1
- package/dist/components/Common/DataView/DataTable/DataTable.d.ts +2 -0
- package/dist/components/Common/DataView/DataTable/DataTable.js.map +1 -1
- package/dist/components/Common/DataView/DataView.d.ts +2 -0
- package/dist/components/Common/DataView/DataView.js.map +1 -1
- package/dist/components/Common/DataView/useDataView.d.ts +4 -0
- package/dist/components/Common/DataView/useDataView.js.map +1 -1
- package/dist/components/Common/DataView/useSelectionState.d.ts +1 -0
- package/dist/components/Common/DataView/useSelectionState.js.map +1 -1
- package/dist/components/Common/DateRangeFilter/DateRangeFilter.d.ts +1 -0
- package/dist/components/Common/DateRangeFilter/DateRangeFilter.js.map +1 -1
- package/dist/components/Common/DetailViewLayout/DetailViewLayout.d.ts +1 -0
- package/dist/components/Common/DetailViewLayout/DetailViewLayout.js.map +1 -1
- package/dist/components/Common/DetailViewLayout/DetailViewLayoutTypes.d.ts +1 -0
- package/dist/components/Common/DocumentList/DocumentList.d.ts +6 -0
- package/dist/components/Common/DocumentList/DocumentList.js.map +1 -1
- package/dist/components/Common/DocumentViewer/DocumentViewer.d.ts +1 -0
- package/dist/components/Common/DocumentViewer/DocumentViewer.js.map +1 -1
- package/dist/components/Common/EmptyData/EmptyData.d.ts +1 -0
- package/dist/components/Common/EmptyData/EmptyData.js.map +1 -1
- package/dist/components/Common/FadeIn/FadeIn.d.ts +1 -0
- package/dist/components/Common/FadeIn/FadeIn.js.map +1 -1
- package/dist/components/Common/FieldCaption/FieldCaption.d.ts +8 -0
- package/dist/components/Common/FieldCaption/FieldCaption.js.map +1 -1
- package/dist/components/Common/FieldDescription/FieldDescription.d.ts +5 -0
- package/dist/components/Common/FieldDescription/FieldDescription.js.map +1 -1
- package/dist/components/Common/FieldErrorMessage/FieldErrorMessage.d.ts +5 -0
- package/dist/components/Common/FieldErrorMessage/FieldErrorMessage.js.map +1 -1
- package/dist/components/Common/FieldLayout/FieldLayout.d.ts +5 -0
- package/dist/components/Common/FieldLayout/FieldLayout.js.map +1 -1
- package/dist/components/Common/FieldLayout/FieldLayoutTypes.d.ts +15 -0
- package/dist/components/Common/Fieldset/Fieldset.d.ts +2 -0
- package/dist/components/Common/Fieldset/Fieldset.js.map +1 -1
- package/dist/components/Common/Flex/Flex.d.ts +4 -0
- package/dist/components/Common/Flex/Flex.js.map +1 -1
- package/dist/components/Common/FlowBreadcrumbs/FlowBreadcrumbs.d.ts +20 -0
- package/dist/components/Common/FlowBreadcrumbs/FlowBreadcrumbs.js.map +1 -1
- package/dist/components/Common/FlowBreadcrumbs/FlowBreadcrumbsTypes.d.ts +33 -7
- package/dist/components/Common/FlowBreadcrumbs/breadcrumbTransitionHelpers.d.ts +16 -0
- package/dist/components/Common/FlowBreadcrumbs/breadcrumbTransitionHelpers.js.map +1 -1
- package/dist/components/Common/Form/Form.d.ts +2 -0
- package/dist/components/Common/Form/Form.js.map +1 -1
- package/dist/components/Common/Grid/Grid.d.ts +2 -0
- package/dist/components/Common/Grid/Grid.js.map +1 -1
- package/dist/components/Common/HamburgerMenu/HamburgerMenu.d.ts +7 -0
- package/dist/components/Common/HamburgerMenu/HamburgerMenu.js.map +1 -1
- package/dist/components/Common/HamburgerMenu/HamburgerMenuTypes.d.ts +11 -0
- package/dist/components/Common/HorizontalFieldLayout/HorizontalFieldLayout.d.ts +7 -0
- package/dist/components/Common/HorizontalFieldLayout/HorizontalFieldLayout.js.map +1 -1
- package/dist/components/Common/HorizontalFieldLayout/HorizontalFieldLayoutTypes.d.ts +14 -0
- package/dist/components/Common/InlineSpinner/InlineSpinner.d.ts +1 -0
- package/dist/components/Common/InlineSpinner/InlineSpinner.js.map +1 -1
- package/dist/components/Common/InternalError/InternalError.d.ts +1 -0
- package/dist/components/Common/InternalError/InternalError.js.map +1 -1
- package/dist/components/Common/Loading/Loading.d.ts +2 -0
- package/dist/components/Common/Loading/Loading.js.map +1 -1
- package/dist/components/Common/OnboardingStatusBadge/index.d.ts +3 -0
- package/dist/components/Common/OnboardingStatusBadge/index.js.map +1 -1
- package/dist/components/Common/ReorderableList/DropZone.d.ts +1 -0
- package/dist/components/Common/ReorderableList/DropZone.js.map +1 -1
- package/dist/components/Common/ReorderableList/ReorderableItem.d.ts +1 -3
- package/dist/components/Common/ReorderableList/ReorderableItem.js.map +1 -1
- package/dist/components/Common/ReorderableList/ReorderableList.d.ts +1 -0
- package/dist/components/Common/ReorderableList/ReorderableList.js.map +1 -1
- package/dist/components/Common/ReorderableList/ReorderableListTypes.d.ts +4 -0
- package/dist/components/Common/ReorderableList/constants.d.ts +1 -3
- package/dist/components/Common/ReorderableList/constants.js.map +1 -1
- package/dist/components/Common/RequirementsList/RequirementsList.d.ts +1 -0
- package/dist/components/Common/RequirementsList/RequirementsList.js.map +1 -1
- package/dist/components/Common/TaxInputs/TaxInputs.d.ts +7 -0
- package/dist/components/Common/TaxInputs/TaxInputs.js.map +1 -1
- package/dist/components/Common/Toast/Toast.d.ts +1 -0
- package/dist/components/Common/VisuallyHidden/VisuallyHidden.d.ts +2 -0
- package/dist/components/Common/VisuallyHidden/VisuallyHidden.js.map +1 -1
- package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js +6 -7
- package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js +8 -9
- package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js.map +1 -1
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +3 -5
- package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js +6 -7
- package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js.map +1 -1
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +3 -5
- package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js +5 -7
- package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountForm/Actions.js +6 -6
- package/dist/components/Company/BankAccount/BankAccountForm/context.js +3 -5
- package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountList/Actions.js +6 -7
- package/dist/components/Company/BankAccount/BankAccountList/Actions.js.map +1 -1
- package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js +7 -8
- package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/Actions.js +5 -6
- package/dist/components/Company/DocumentSigner/DocumentList/Actions.js.map +1 -1
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +3 -5
- package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Company/FederalTaxes/Actions.js +6 -7
- package/dist/components/Company/FederalTaxes/Actions.js.map +1 -1
- package/dist/components/Company/FederalTaxes/Form.js +1 -1
- package/dist/components/Company/FederalTaxes/Form.js.map +1 -1
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js +8 -10
- package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
- package/dist/components/Company/Industry/Actions.js +5 -6
- package/dist/components/Company/Industry/Actions.js.map +1 -1
- package/dist/components/Company/Industry/Context.js +6 -8
- package/dist/components/Company/Industry/Context.js.map +1 -1
- package/dist/components/Company/Industry/Edit.js +10 -11
- package/dist/components/Company/Industry/Edit.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/Actions.js +2 -3
- package/dist/components/Company/Locations/LocationForm/Actions.js.map +1 -1
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js +3 -5
- package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/Actions.js +2 -3
- package/dist/components/Company/Locations/LocationsList/Actions.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/List.js +2 -3
- package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js +3 -5
- package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
- package/dist/components/Company/OnboardingOverview/context.js +3 -5
- package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js +5 -6
- package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +3 -5
- package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js +6 -7
- package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js.map +1 -1
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js +3 -5
- package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
- package/dist/components/Contractor/Address/Form.js +4 -4
- package/dist/components/Contractor/Address/useAddress.js +5 -7
- package/dist/components/Contractor/Address/useAddress.js.map +1 -1
- package/dist/components/Employee/Deductions/management/DeductionsCard/DeductionsCard.js +1 -1
- package/dist/components/Employee/Documents/management/DocumentsCard/DocumentsCard.js +12 -12
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/Actions.js +4 -5
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/Actions.js.map +1 -1
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js +3 -5
- package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
- package/dist/components/Employee/FederalTaxes/management/FederalTaxesEditForm.js +1 -1
- package/dist/components/Employee/FederalTaxes/onboarding/FederalTaxes.js +1 -1
- package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +4 -4
- package/dist/components/Employee/PaymentMethod/onboarding/ListView.js +13 -13
- package/dist/components/Employee/PaymentMethod/shared/BankFormBody/BankFormBody.js +2 -3
- package/dist/components/Employee/PaymentMethod/shared/BankFormBody/BankFormBody.js.map +1 -1
- package/dist/components/Employee/PaymentMethod/shared/SplitPaymentsFormBody/SplitPaymentsFormBody.js +1 -1
- package/dist/components/Employee/Paystubs/management/PaystubsCard/PaystubsCard.js +6 -6
- package/dist/components/Employee/Profile/management/ProfileCard/ProfileCard.js +12 -12
- package/dist/components/Employee/Profile/management/ProfileEditForm.js +1 -1
- package/dist/components/Employee/Profile/onboarding/EmployeeProfile.js +1 -1
- package/dist/components/Employee/StateTaxes/management/StateTaxesEditForm.js +1 -1
- package/dist/components/Employee/StateTaxes/onboarding/StateTaxes.js +1 -1
- package/dist/components/Employee/Taxes/Actions.js +7 -8
- package/dist/components/Employee/Taxes/Actions.js.map +1 -1
- package/dist/components/Employee/Taxes/useTaxes.js +3 -5
- package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
- package/dist/components/Employee/exports/employeeManagement.d.ts +0 -2
- package/dist/components/Employee/exports/employeeManagement.js +50 -52
- package/dist/components/Employee/exports/employeeManagement.js.map +1 -1
- package/dist/components/Employee/exports/employeeOnboarding.d.ts +1 -0
- package/dist/components/Employee/exports/employeeOnboarding.js +20 -18
- package/dist/components/Employee/exports/employeeOnboarding.js.map +1 -1
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.js +10 -11
- package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.js.map +1 -1
- package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js +0 -1
- package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js.map +1 -1
- package/dist/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModal.js +2 -3
- package/dist/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModal.js.map +1 -1
- package/dist/components/Payroll/usePreparedPayrollData.js +8 -10
- package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
- package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetailPresentation.js +2 -3
- package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetailPresentation.js.map +1 -1
- package/dist/components/TimeOff/shared/PolicyDetailLayout/PolicyDetailLayout.js +24 -25
- package/dist/components/TimeOff/shared/PolicyDetailLayout/PolicyDetailLayout.js.map +1 -1
- package/dist/contexts/GustoProvider/GustoProvider.d.ts +34 -1
- package/dist/contexts/GustoProvider/GustoProvider.js.map +1 -1
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.d.ts +42 -2
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +2 -3
- package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
- package/dist/contexts/GustoProvider/SDKI18next.d.ts +1 -1
- package/dist/contexts/GustoProvider/SDKI18next.js.map +1 -1
- package/dist/contexts/GustoProvider/index.d.ts +0 -2
- package/dist/contexts/ThemeProvider/ThemeProvider.d.ts +5 -1
- package/dist/contexts/ThemeProvider/ThemeProvider.js.map +1 -1
- package/dist/contexts/ThemeProvider/customRender.d.ts +1 -0
- package/dist/contexts/ThemeProvider/index.d.ts +0 -1
- package/dist/contexts/ThemeProvider/theme.d.ts +7 -101
- package/dist/contexts/ThemeProvider/theme.js +58 -64
- package/dist/contexts/ThemeProvider/theme.js.map +1 -1
- package/dist/contexts/ThemeProvider/types.d.ts +181 -0
- package/dist/contexts/ThemeProvider/useTheme.d.ts +4 -0
- package/dist/contexts/ThemeProvider/useTheme.js.map +1 -1
- package/dist/contexts/index.d.ts +1 -0
- package/dist/index.d.ts +3 -2
- package/dist/index.js +145 -141
- package/dist/partner-hook-utils/form/fields/CheckboxHookField.js +6 -7
- package/dist/partner-hook-utils/form/fields/CheckboxHookField.js.map +1 -1
- package/dist/partner-hook-utils/form/fields/NumberInputHookField.js +6 -7
- package/dist/partner-hook-utils/form/fields/NumberInputHookField.js.map +1 -1
- package/dist/partner-hook-utils/form/fields/RadioGroupHookField.js +8 -9
- package/dist/partner-hook-utils/form/fields/RadioGroupHookField.js.map +1 -1
- package/dist/partner-hook-utils/form/fields/SelectHookField.js +2 -3
- package/dist/partner-hook-utils/form/fields/SelectHookField.js.map +1 -1
- package/dist/partner-hook-utils/form/fields/SwitchHookField.js +12 -13
- package/dist/partner-hook-utils/form/fields/SwitchHookField.js.map +1 -1
- package/dist/partner-hook-utils/form/fields/TextInputHookField.js +8 -9
- package/dist/partner-hook-utils/form/fields/TextInputHookField.js.map +1 -1
- package/dist/partner-hook-utils/form/fields/index.d.ts +2 -0
- package/dist/partner-hook-utils/form/index.d.ts +1 -1
- package/docs/reference/endpoint-inventory.json +16 -16
- package/package.json +7 -6
|
@@ -1,102 +1,8 @@
|
|
|
1
|
+
import { GustoSDKTheme, GustoSDKThemeColors } from './types';
|
|
2
|
+
export type { GustoSDKTheme, GustoSDKThemeColors };
|
|
3
|
+
/** @internal */
|
|
1
4
|
export declare const transitionDuration = 200;
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
colorBodySubContent: string;
|
|
7
|
-
colorPrimary: string;
|
|
8
|
-
colorPrimaryAccent: string;
|
|
9
|
-
colorPrimaryContent: string;
|
|
10
|
-
colorSecondary: string;
|
|
11
|
-
colorSecondaryAccent: string;
|
|
12
|
-
colorSecondaryContent: string;
|
|
13
|
-
colorInfo: string;
|
|
14
|
-
colorInfoAccent: string;
|
|
15
|
-
colorInfoContent: string;
|
|
16
|
-
colorWarning: string;
|
|
17
|
-
colorWarningAccent: string;
|
|
18
|
-
colorWarningContent: string;
|
|
19
|
-
colorError: string;
|
|
20
|
-
colorErrorAccent: string;
|
|
21
|
-
colorErrorContent: string;
|
|
22
|
-
colorSuccess: string;
|
|
23
|
-
colorSuccessAccent: string;
|
|
24
|
-
colorSuccessContent: string;
|
|
25
|
-
colorBorderPrimary: string;
|
|
26
|
-
colorBorderSecondary: string;
|
|
27
|
-
colorButtonIcon: string;
|
|
28
|
-
};
|
|
29
|
-
export type GustoSDKThemeColors = Partial<typeof defaultThemeColors>;
|
|
30
|
-
export declare const createTheme: (colors?: GustoSDKThemeColors) => {
|
|
31
|
-
inputBackgroundColor: string | undefined;
|
|
32
|
-
inputBorderColor: string;
|
|
33
|
-
inputContentColor: string | undefined;
|
|
34
|
-
inputBorderWidth: string;
|
|
35
|
-
inputPlaceholderColor: string | undefined;
|
|
36
|
-
inputAdornmentColor: string | undefined;
|
|
37
|
-
inputDisabledBackgroundColor: string | undefined;
|
|
38
|
-
inputLabelColor: string | undefined;
|
|
39
|
-
inputLabelFontSize: string;
|
|
40
|
-
inputLabelFontWeight: string;
|
|
41
|
-
inputDescriptionColor: string | undefined;
|
|
42
|
-
inputErrorColor: string | undefined;
|
|
43
|
-
inputRadius: string;
|
|
44
|
-
buttonRadius: string;
|
|
45
|
-
cardRadius: string;
|
|
46
|
-
badgeRadius: string;
|
|
47
|
-
bannerRadius: string;
|
|
48
|
-
boxRadius: string;
|
|
49
|
-
fontSizeRoot: string;
|
|
50
|
-
fontFamily: string;
|
|
51
|
-
fontLineHeightLarge: string;
|
|
52
|
-
fontLineHeightRegular: string;
|
|
53
|
-
fontLineHeightSmall: string;
|
|
54
|
-
fontLineHeightExtraSmall: string;
|
|
55
|
-
fontSizeExtraSmall: string;
|
|
56
|
-
fontSizeSmall: string;
|
|
57
|
-
fontSizeRegular: string;
|
|
58
|
-
fontSizeLarge: string;
|
|
59
|
-
fontSizeHeading1: string;
|
|
60
|
-
fontSizeHeading2: string;
|
|
61
|
-
fontSizeHeading3: string;
|
|
62
|
-
fontSizeHeading4: string;
|
|
63
|
-
fontSizeHeading5: string;
|
|
64
|
-
fontSizeHeading6: string;
|
|
65
|
-
fontWeightRegular: string;
|
|
66
|
-
fontWeightMedium: string;
|
|
67
|
-
fontWeightSemibold: string;
|
|
68
|
-
fontWeightBold: string;
|
|
69
|
-
transitionDuration: string;
|
|
70
|
-
shadowResting: string;
|
|
71
|
-
shadowTopmost: string;
|
|
72
|
-
focusRingColor: string | undefined;
|
|
73
|
-
focusRingWidth: string;
|
|
74
|
-
colorBody: string;
|
|
75
|
-
colorBodyAccent: string;
|
|
76
|
-
colorBodyContent: string;
|
|
77
|
-
colorBodySubContent: string;
|
|
78
|
-
colorPrimary: string;
|
|
79
|
-
colorPrimaryAccent: string;
|
|
80
|
-
colorPrimaryContent: string;
|
|
81
|
-
colorSecondary: string;
|
|
82
|
-
colorSecondaryAccent: string;
|
|
83
|
-
colorSecondaryContent: string;
|
|
84
|
-
colorInfo: string;
|
|
85
|
-
colorInfoAccent: string;
|
|
86
|
-
colorInfoContent: string;
|
|
87
|
-
colorWarning: string;
|
|
88
|
-
colorWarningAccent: string;
|
|
89
|
-
colorWarningContent: string;
|
|
90
|
-
colorError: string;
|
|
91
|
-
colorErrorAccent: string;
|
|
92
|
-
colorErrorContent: string;
|
|
93
|
-
colorSuccess: string;
|
|
94
|
-
colorSuccessAccent: string;
|
|
95
|
-
colorSuccessContent: string;
|
|
96
|
-
colorBorderPrimary: string;
|
|
97
|
-
colorBorderSecondary: string;
|
|
98
|
-
colorButtonIcon: string;
|
|
99
|
-
};
|
|
100
|
-
export type GustoSDKTheme = Partial<ReturnType<typeof createTheme>>;
|
|
101
|
-
export declare const mergePartnerTheme: (partnerTheme: GustoSDKTheme) => GustoSDKTheme;
|
|
102
|
-
export {};
|
|
5
|
+
/** @internal */
|
|
6
|
+
export declare const createTheme: (colors?: Partial<GustoSDKThemeColors>) => GustoSDKTheme;
|
|
7
|
+
/** @internal */
|
|
8
|
+
export declare const mergePartnerTheme: (partnerTheme: Partial<GustoSDKTheme>) => GustoSDKTheme;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { toRem as n, getRootFontSize as
|
|
1
|
+
import { toRem as n, getRootFontSize as a } from "../../helpers/rem.js";
|
|
2
2
|
const o = {
|
|
3
3
|
neutral: {
|
|
4
4
|
25: "#FFFFFF",
|
|
@@ -31,7 +31,7 @@ const o = {
|
|
|
31
31
|
500: "#DCDCDC",
|
|
32
32
|
800: "#1C1C1C"
|
|
33
33
|
}
|
|
34
|
-
}, u = 200,
|
|
34
|
+
}, u = 200, e = {
|
|
35
35
|
colorBody: o.neutral[25],
|
|
36
36
|
colorBodyAccent: o.neutral[100],
|
|
37
37
|
colorBodyContent: o.neutral[1e3],
|
|
@@ -57,73 +57,67 @@ const o = {
|
|
|
57
57
|
colorBorderPrimary: o.neutral[300],
|
|
58
58
|
colorBorderSecondary: o.neutral[200],
|
|
59
59
|
colorButtonIcon: o.neutral[400]
|
|
60
|
-
},
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
focusRingColor: r.colorPrimary,
|
|
113
|
-
focusRingWidth: "2px"
|
|
114
|
-
}), C = (r) => {
|
|
115
|
-
const a = Object.entries(i).reduce(
|
|
116
|
-
(t, [e, c]) => (t[e] = r[e] || c, t),
|
|
117
|
-
{}
|
|
60
|
+
}, s = (t = {}) => {
|
|
61
|
+
const r = { ...e, ...t };
|
|
62
|
+
return {
|
|
63
|
+
...r,
|
|
64
|
+
inputBackgroundColor: r.colorBody,
|
|
65
|
+
inputBorderColor: o.neutral[300],
|
|
66
|
+
inputContentColor: r.colorBodyContent,
|
|
67
|
+
inputBorderWidth: "1px",
|
|
68
|
+
inputPlaceholderColor: r.colorBodySubContent,
|
|
69
|
+
inputAdornmentColor: r.colorBodySubContent,
|
|
70
|
+
inputDisabledBackgroundColor: r.colorBodyAccent,
|
|
71
|
+
inputLabelColor: r.colorBodyContent,
|
|
72
|
+
inputLabelFontSize: n(16),
|
|
73
|
+
inputLabelFontWeight: "500",
|
|
74
|
+
inputDescriptionColor: r.colorBodySubContent,
|
|
75
|
+
inputErrorColor: r.colorErrorAccent,
|
|
76
|
+
inputRadius: n(8),
|
|
77
|
+
buttonRadius: n(8),
|
|
78
|
+
cardRadius: n(8),
|
|
79
|
+
badgeRadius: n(6),
|
|
80
|
+
bannerRadius: n(8),
|
|
81
|
+
boxRadius: n(8),
|
|
82
|
+
fontSizeRoot: a(),
|
|
83
|
+
fontFamily: 'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',
|
|
84
|
+
fontLineHeightLarge: n(28),
|
|
85
|
+
fontLineHeightRegular: n(24),
|
|
86
|
+
fontLineHeightSmall: n(20),
|
|
87
|
+
fontLineHeightExtraSmall: n(18),
|
|
88
|
+
fontSizeExtraSmall: n(12),
|
|
89
|
+
fontSizeSmall: n(14),
|
|
90
|
+
fontSizeRegular: n(16),
|
|
91
|
+
fontSizeLarge: n(18),
|
|
92
|
+
fontSizeHeading1: n(32),
|
|
93
|
+
fontSizeHeading2: n(24),
|
|
94
|
+
fontSizeHeading3: n(20),
|
|
95
|
+
fontSizeHeading4: n(18),
|
|
96
|
+
fontSizeHeading5: n(16),
|
|
97
|
+
fontSizeHeading6: n(14),
|
|
98
|
+
fontWeightRegular: "400",
|
|
99
|
+
fontWeightMedium: "500",
|
|
100
|
+
fontWeightSemibold: "600",
|
|
101
|
+
fontWeightBold: "700",
|
|
102
|
+
transitionDuration: `${u}ms`,
|
|
103
|
+
shadowResting: "0px 1px 2px 0px rgba(10, 13, 18, 0.05)",
|
|
104
|
+
shadowTopmost: "0px 4px 6px 0px rgba(28, 28, 28, 0.05), 0px 10px 15px 0px rgba(28, 28, 28, 0.10)",
|
|
105
|
+
focusRingColor: r.colorPrimary,
|
|
106
|
+
focusRingWidth: "2px"
|
|
107
|
+
};
|
|
108
|
+
}, g = (t) => {
|
|
109
|
+
const r = Object.entries(e).reduce(
|
|
110
|
+
(i, [c, l]) => (i[c] = t[c] || l, i),
|
|
111
|
+
{ ...e }
|
|
118
112
|
);
|
|
119
113
|
return {
|
|
120
|
-
...
|
|
121
|
-
...
|
|
114
|
+
...s(r),
|
|
115
|
+
...t
|
|
122
116
|
};
|
|
123
117
|
};
|
|
124
118
|
export {
|
|
125
|
-
|
|
126
|
-
|
|
119
|
+
s as createTheme,
|
|
120
|
+
g as mergePartnerTheme,
|
|
127
121
|
u as transitionDuration
|
|
128
122
|
};
|
|
129
123
|
//# sourceMappingURL=theme.js.map
|
|
@@ -1 +1 @@
|
|
|
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 25: '#FFFFFF',\n 50: '#FAFAFA',\n 100: '#F5F5F5',\n 200: '#E9EAEB',\n 300: '#D5D7DA',\n 400: '#A4A7AE',\n 500: '#717680',\n 600: '#535862',\n 700: '#414651',\n 800: '#252B37',\n 900: '#181D27',\n 1000: '#0A0D12',\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 transitionDuration = 200\n\nconst defaultThemeColors = {\n colorBody: baseColors.neutral[25],\n colorBodyAccent: baseColors.neutral[100],\n colorBodyContent: baseColors.neutral[1000],\n colorBodySubContent: baseColors.neutral[700],\n colorPrimary: baseColors.neutral[1000],\n colorPrimaryAccent: baseColors.neutral[900],\n colorPrimaryContent: baseColors.neutral[100],\n colorSecondary: baseColors.neutral[25],\n colorSecondaryAccent: baseColors.neutral[100],\n colorSecondaryContent: baseColors.neutral[600],\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 colorBorderPrimary: baseColors.neutral[300],\n colorBorderSecondary: baseColors.neutral[200],\n colorButtonIcon: baseColors.neutral[400],\n}\n\
|
|
1
|
+
{"version":3,"file":"theme.js","sources":["../../../src/contexts/ThemeProvider/theme.ts"],"sourcesContent":["import type { GustoSDKTheme, GustoSDKThemeColors } from './types'\nimport { getRootFontSize, toRem } from '@/helpers/rem'\n\nexport type { GustoSDKTheme, GustoSDKThemeColors }\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 25: '#FFFFFF',\n 50: '#FAFAFA',\n 100: '#F5F5F5',\n 200: '#E9EAEB',\n 300: '#D5D7DA',\n 400: '#A4A7AE',\n 500: '#717680',\n 600: '#535862',\n 700: '#414651',\n 800: '#252B37',\n 900: '#181D27',\n 1000: '#0A0D12',\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\n/** @internal */\nexport const transitionDuration = 200\n\nconst defaultThemeColors: GustoSDKThemeColors = {\n colorBody: baseColors.neutral[25],\n colorBodyAccent: baseColors.neutral[100],\n colorBodyContent: baseColors.neutral[1000],\n colorBodySubContent: baseColors.neutral[700],\n colorPrimary: baseColors.neutral[1000],\n colorPrimaryAccent: baseColors.neutral[900],\n colorPrimaryContent: baseColors.neutral[100],\n colorSecondary: baseColors.neutral[25],\n colorSecondaryAccent: baseColors.neutral[100],\n colorSecondaryContent: baseColors.neutral[600],\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 colorBorderPrimary: baseColors.neutral[300],\n colorBorderSecondary: baseColors.neutral[200],\n colorButtonIcon: baseColors.neutral[400],\n}\n\n/** @internal */\nexport const createTheme = (colors: Partial<GustoSDKThemeColors> = {}): GustoSDKTheme => {\n const mergedColors = { ...defaultThemeColors, ...colors }\n\n return {\n ...mergedColors,\n inputBackgroundColor: mergedColors.colorBody,\n inputBorderColor: baseColors.neutral[300],\n inputContentColor: mergedColors.colorBodyContent,\n inputBorderWidth: '1px',\n inputPlaceholderColor: mergedColors.colorBodySubContent,\n inputAdornmentColor: mergedColors.colorBodySubContent,\n inputDisabledBackgroundColor: mergedColors.colorBodyAccent,\n inputLabelColor: mergedColors.colorBodyContent,\n inputLabelFontSize: toRem(16),\n inputLabelFontWeight: '500',\n inputDescriptionColor: mergedColors.colorBodySubContent,\n inputErrorColor: mergedColors.colorErrorAccent,\n inputRadius: toRem(8),\n buttonRadius: toRem(8),\n cardRadius: toRem(8),\n badgeRadius: toRem(6),\n bannerRadius: toRem(8),\n boxRadius: toRem(8),\n fontSizeRoot: getRootFontSize(),\n fontFamily: 'system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif',\n fontLineHeightLarge: toRem(28),\n fontLineHeightRegular: toRem(24),\n fontLineHeightSmall: toRem(20),\n fontLineHeightExtraSmall: toRem(18),\n fontSizeExtraSmall: toRem(12),\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 transitionDuration: `${transitionDuration}ms`,\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 focusRingColor: mergedColors.colorPrimary,\n focusRingWidth: '2px',\n }\n}\n\n/** @internal */\nexport const mergePartnerTheme = (partnerTheme: Partial<GustoSDKTheme>): GustoSDKTheme => {\n const colors = Object.entries(defaultThemeColors).reduce(\n (acc, [key, value]) => {\n acc[key as keyof GustoSDKThemeColors] =\n partnerTheme[key as keyof GustoSDKThemeColors] || value\n return acc\n },\n { ...defaultThemeColors },\n )\n\n return {\n ...createTheme(colors),\n ...partnerTheme,\n }\n}\n"],"names":["baseColors","transitionDuration","defaultThemeColors","createTheme","colors","mergedColors","toRem","getRootFontSize","mergePartnerTheme","partnerTheme","acc","key","value"],"mappings":"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"}
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Color tokens that can be overridden to customize the SDK's visual theme.
|
|
3
|
+
* Pass a `Partial<GustoSDKThemeColors>` when constructing a `Partial<GustoSDKTheme>`
|
|
4
|
+
* to supply to `ThemeProvider`.
|
|
5
|
+
*
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export interface GustoSDKThemeColors {
|
|
9
|
+
/** Background color of the main content area. */
|
|
10
|
+
colorBody: string;
|
|
11
|
+
/** Subtle accent background, used for hover states and alternating rows. */
|
|
12
|
+
colorBodyAccent: string;
|
|
13
|
+
/** Primary text color rendered on body backgrounds. */
|
|
14
|
+
colorBodyContent: string;
|
|
15
|
+
/** Secondary/muted text color for supporting copy and labels. */
|
|
16
|
+
colorBodySubContent: string;
|
|
17
|
+
/** Brand primary color, used for primary buttons and active states. */
|
|
18
|
+
colorPrimary: string;
|
|
19
|
+
/** Hover/pressed tint for primary elements. */
|
|
20
|
+
colorPrimaryAccent: string;
|
|
21
|
+
/** Text or icon color rendered on primary backgrounds. */
|
|
22
|
+
colorPrimaryContent: string;
|
|
23
|
+
/** Brand secondary color, used for secondary buttons and surfaces. */
|
|
24
|
+
colorSecondary: string;
|
|
25
|
+
/** Hover/pressed tint for secondary elements. */
|
|
26
|
+
colorSecondaryAccent: string;
|
|
27
|
+
/** Text or icon color rendered on secondary backgrounds. */
|
|
28
|
+
colorSecondaryContent: string;
|
|
29
|
+
/** Background for informational banners and callouts. */
|
|
30
|
+
colorInfo: string;
|
|
31
|
+
/** Border or icon accent inside informational surfaces. */
|
|
32
|
+
colorInfoAccent: string;
|
|
33
|
+
/** Text color rendered on informational surfaces. */
|
|
34
|
+
colorInfoContent: string;
|
|
35
|
+
/** Background for warning banners and callouts. */
|
|
36
|
+
colorWarning: string;
|
|
37
|
+
/** Border or icon accent inside warning surfaces. */
|
|
38
|
+
colorWarningAccent: string;
|
|
39
|
+
/** Text color rendered on warning surfaces. */
|
|
40
|
+
colorWarningContent: string;
|
|
41
|
+
/** Background for error banners and inline validation states. */
|
|
42
|
+
colorError: string;
|
|
43
|
+
/** Border, icon accent, and field error indicator inside error surfaces. */
|
|
44
|
+
colorErrorAccent: string;
|
|
45
|
+
/** Text color rendered on error surfaces. */
|
|
46
|
+
colorErrorContent: string;
|
|
47
|
+
/** Background for success banners and confirmation states. */
|
|
48
|
+
colorSuccess: string;
|
|
49
|
+
/** Border or icon accent inside success surfaces. */
|
|
50
|
+
colorSuccessAccent: string;
|
|
51
|
+
/** Text color rendered on success surfaces. */
|
|
52
|
+
colorSuccessContent: string;
|
|
53
|
+
/** Color of primary borders (inputs, cards, dividers). */
|
|
54
|
+
colorBorderPrimary: string;
|
|
55
|
+
/** Color of secondary/subtle borders. */
|
|
56
|
+
colorBorderSecondary: string;
|
|
57
|
+
/** Color of icon-only buttons. */
|
|
58
|
+
colorButtonIcon: string;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Complete set of design tokens that control the SDK's visual theme. Pass a
|
|
62
|
+
* `Partial<GustoSDKTheme>` to `ThemeProvider` to override specific tokens; any
|
|
63
|
+
* token not supplied falls back to the SDK default.
|
|
64
|
+
*
|
|
65
|
+
* @public
|
|
66
|
+
*/
|
|
67
|
+
export interface GustoSDKTheme extends GustoSDKThemeColors {
|
|
68
|
+
/**
|
|
69
|
+
* Background color of text inputs and selects.
|
|
70
|
+
* @defaultValue `colorBody`
|
|
71
|
+
*/
|
|
72
|
+
inputBackgroundColor: string;
|
|
73
|
+
/** Border color of text inputs and selects. */
|
|
74
|
+
inputBorderColor: string;
|
|
75
|
+
/**
|
|
76
|
+
* Text color inside text inputs and selects.
|
|
77
|
+
* @defaultValue `colorBodyContent`
|
|
78
|
+
*/
|
|
79
|
+
inputContentColor: string;
|
|
80
|
+
/** Border width of text inputs and selects. */
|
|
81
|
+
inputBorderWidth: string;
|
|
82
|
+
/**
|
|
83
|
+
* Placeholder text color inside inputs.
|
|
84
|
+
* @defaultValue `colorBodySubContent`
|
|
85
|
+
*/
|
|
86
|
+
inputPlaceholderColor: string;
|
|
87
|
+
/**
|
|
88
|
+
* Color of leading/trailing adornment icons in inputs.
|
|
89
|
+
* @defaultValue `colorBodySubContent`
|
|
90
|
+
*/
|
|
91
|
+
inputAdornmentColor: string;
|
|
92
|
+
/**
|
|
93
|
+
* Background color of disabled inputs.
|
|
94
|
+
* @defaultValue `colorBodyAccent`
|
|
95
|
+
*/
|
|
96
|
+
inputDisabledBackgroundColor: string;
|
|
97
|
+
/**
|
|
98
|
+
* Color of form field labels.
|
|
99
|
+
* @defaultValue `colorBodyContent`
|
|
100
|
+
*/
|
|
101
|
+
inputLabelColor: string;
|
|
102
|
+
/** Font size of form field labels. */
|
|
103
|
+
inputLabelFontSize: string;
|
|
104
|
+
/** Font weight of form field labels. */
|
|
105
|
+
inputLabelFontWeight: string;
|
|
106
|
+
/**
|
|
107
|
+
* Color of form field description/hint text.
|
|
108
|
+
* @defaultValue `colorBodySubContent`
|
|
109
|
+
*/
|
|
110
|
+
inputDescriptionColor: string;
|
|
111
|
+
/**
|
|
112
|
+
* Color of inline field error messages.
|
|
113
|
+
* @defaultValue `colorErrorAccent`
|
|
114
|
+
*/
|
|
115
|
+
inputErrorColor: string;
|
|
116
|
+
/** Border radius of text inputs and selects. */
|
|
117
|
+
inputRadius: string;
|
|
118
|
+
/** Border radius of buttons. */
|
|
119
|
+
buttonRadius: string;
|
|
120
|
+
/** Border radius of card surfaces. */
|
|
121
|
+
cardRadius: string;
|
|
122
|
+
/** Border radius of badges. */
|
|
123
|
+
badgeRadius: string;
|
|
124
|
+
/** Border radius of banners. */
|
|
125
|
+
bannerRadius: string;
|
|
126
|
+
/** Border radius of box/panel surfaces. */
|
|
127
|
+
boxRadius: string;
|
|
128
|
+
/** Root document font size as a numeric string (no `px` suffix). Used as the rem base. */
|
|
129
|
+
fontSizeRoot: string;
|
|
130
|
+
/** Font family stack applied to all SDK text. */
|
|
131
|
+
fontFamily: string;
|
|
132
|
+
/** Line height for large text. */
|
|
133
|
+
fontLineHeightLarge: string;
|
|
134
|
+
/** Line height for regular/body text. */
|
|
135
|
+
fontLineHeightRegular: string;
|
|
136
|
+
/** Line height for small text. */
|
|
137
|
+
fontLineHeightSmall: string;
|
|
138
|
+
/** Line height for extra-small text. */
|
|
139
|
+
fontLineHeightExtraSmall: string;
|
|
140
|
+
/** Font size for extra-small text. */
|
|
141
|
+
fontSizeExtraSmall: string;
|
|
142
|
+
/** Font size for small text. */
|
|
143
|
+
fontSizeSmall: string;
|
|
144
|
+
/** Font size for regular/body text. */
|
|
145
|
+
fontSizeRegular: string;
|
|
146
|
+
/** Font size for large text. */
|
|
147
|
+
fontSizeLarge: string;
|
|
148
|
+
/** Font size for H1 headings. */
|
|
149
|
+
fontSizeHeading1: string;
|
|
150
|
+
/** Font size for H2 headings. */
|
|
151
|
+
fontSizeHeading2: string;
|
|
152
|
+
/** Font size for H3 headings. */
|
|
153
|
+
fontSizeHeading3: string;
|
|
154
|
+
/** Font size for H4 headings. */
|
|
155
|
+
fontSizeHeading4: string;
|
|
156
|
+
/** Font size for H5 headings. */
|
|
157
|
+
fontSizeHeading5: string;
|
|
158
|
+
/** Font size for H6 headings. */
|
|
159
|
+
fontSizeHeading6: string;
|
|
160
|
+
/** Font weight for regular text. */
|
|
161
|
+
fontWeightRegular: string;
|
|
162
|
+
/** Font weight for medium-emphasis text. */
|
|
163
|
+
fontWeightMedium: string;
|
|
164
|
+
/** Font weight for semibold text. */
|
|
165
|
+
fontWeightSemibold: string;
|
|
166
|
+
/** Font weight for bold text. */
|
|
167
|
+
fontWeightBold: string;
|
|
168
|
+
/** Duration of UI transitions, e.g. `"200ms"`. */
|
|
169
|
+
transitionDuration: string;
|
|
170
|
+
/** Box shadow for resting/default elevation. */
|
|
171
|
+
shadowResting: string;
|
|
172
|
+
/** Box shadow for elevated/topmost surfaces such as dropdowns and modals. */
|
|
173
|
+
shadowTopmost: string;
|
|
174
|
+
/**
|
|
175
|
+
* Color of the keyboard focus ring.
|
|
176
|
+
* @defaultValue `colorPrimary`
|
|
177
|
+
*/
|
|
178
|
+
focusRingColor: string;
|
|
179
|
+
/** Width of the keyboard focus ring. */
|
|
180
|
+
focusRingWidth: string;
|
|
181
|
+
}
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
+
/** @internal */
|
|
1
2
|
export interface ThemeContextProps {
|
|
3
|
+
/** Ref to the element used as the portal container for SDK overlays. */
|
|
2
4
|
container: React.RefObject<HTMLElement | null>;
|
|
3
5
|
}
|
|
6
|
+
/** @internal */
|
|
4
7
|
export declare const ThemeContext: import('react').Context<ThemeContextProps>;
|
|
8
|
+
/** @internal */
|
|
5
9
|
export declare const useTheme: () => ThemeContextProps;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTheme.js","sources":["../../../src/contexts/ThemeProvider/useTheme.ts"],"sourcesContent":["import { createContext, useContext } from 'react'\n\nexport interface ThemeContextProps {\n container: React.RefObject<HTMLElement | null>\n}\nexport const ThemeContext = createContext({} as ThemeContextProps)\n\nexport const useTheme = () => useContext(ThemeContext)\n"],"names":["ThemeContext","createContext","useTheme","useContext"],"mappings":";
|
|
1
|
+
{"version":3,"file":"useTheme.js","sources":["../../../src/contexts/ThemeProvider/useTheme.ts"],"sourcesContent":["import { createContext, useContext } from 'react'\n\n/** @internal */\nexport interface ThemeContextProps {\n /** Ref to the element used as the portal container for SDK overlays. */\n container: React.RefObject<HTMLElement | null>\n}\n/** @internal */\nexport const ThemeContext = createContext({} as ThemeContextProps)\n\n/** @internal */\nexport const useTheme = () => useContext(ThemeContext)\n"],"names":["ThemeContext","createContext","useTheme","useContext"],"mappings":";AAQO,MAAMA,IAAeC,EAAc,CAAA,CAAuB,GAGpDC,IAAW,MAAMC,EAAWH,CAAY;"}
|
package/dist/contexts/index.d.ts
CHANGED
|
@@ -9,3 +9,4 @@ export type { ComponentsContextType } from './ComponentAdapter/useComponentConte
|
|
|
9
9
|
export * from './ComponentAdapter/componentAdapterTypes';
|
|
10
10
|
export { ObservabilityProvider, useObservability } from './ObservabilityProvider';
|
|
11
11
|
export type { ObservabilityProviderProps, ObservabilityContextValue } from './ObservabilityProvider';
|
|
12
|
+
export type { GustoSDKTheme, GustoSDKThemeColors } from './ThemeProvider/theme';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import "./types/i18next.d.ts"
|
|
2
2
|
export * from './components';
|
|
3
3
|
export * from './contexts';
|
|
4
|
-
export { componentEvents } from './shared/constants';
|
|
4
|
+
export { componentEvents, EmployeeOnboardingStatus, EmployeeSelfOnboardingStatuses, ContractorOnboardingStatus, ContractorSelfOnboardingStatuses, } from './shared/constants';
|
|
5
|
+
export type { EventType } from './shared/constants';
|
|
5
6
|
export type { BeforeCreateRequestHook, BeforeRequestHook, AfterSuccessHook, AfterErrorHook, BeforeCreateRequestContext, BeforeRequestContext, AfterSuccessContext, AfterErrorContext, SDKHooks, } from './types/hooks';
|
|
6
7
|
export type { SDKError, SDKErrorCategory, SDKFieldError } from './types/sdkError';
|
|
7
8
|
export { normalizeToSDKError, SDKInternalError } from './types/sdkError';
|
|
8
9
|
export type { ObservabilityHook, ObservabilityError, ObservabilityMetric, ObservabilityMetricUnit, SanitizationConfig, } from './types/observability';
|
|
9
10
|
export type { ConfirmWireDetailsProps, ConfirmWireDetailsComponentType, } from './components/Payroll/ConfirmWireDetails';
|
|
10
11
|
export { composeErrorHandler, collectErrors, SDKFormProvider, composeSubmitHandler, useFieldErrorMessage, useDeriveFieldsMetadata, withOptions, FormFieldsMetadataProvider, TextInputHookField, SelectHookField, CheckboxHookField, NumberInputHookField, DatePickerHookField, RadioGroupHookField, SwitchHookField, } from './partner-hook-utils';
|
|
11
|
-
export type { MixedErrorSource, SubmitStateForErrorHandling, HookFormInternals, HookLoadingResult, HookSubmitResult, HookErrorHandling, BaseHookReady, BaseFormHookReady, FormHookResult, FieldMetadata, FieldMetadataWithOptions, FieldsMetadata, ValidationMessages, BaseFieldProps, HookFieldProps, TextInputHookFieldProps, SelectHookFieldProps, CheckboxHookFieldProps, NumberInputHookFieldProps, DatePickerHookFieldProps, RadioGroupHookFieldProps, SwitchHookFieldProps, TextInputProps, SelectProps, SelectOption, CheckboxProps, NumberInputProps, DatePickerProps, RadioGroupProps, RadioGroupOption, SwitchProps, FormFieldsMetadataContextValue, } from './partner-hook-utils';
|
|
12
|
+
export type { MixedErrorSource, SubmitStateForErrorHandling, HookFormInternals, HookLoadingResult, HookSubmitResult, HookErrorHandling, BaseHookReady, BaseFormHookReady, FormHookResult, FieldMetadata, FieldMetadataWithOptions, FieldsMetadata, ValidationMessages, BaseFieldProps, HookFieldProps, TextInputHookFieldProps, SelectHookFieldProps, CheckboxHookFieldProps, NumberInputHookFieldProps, DatePickerHookFieldProps, RadioGroupHookFieldProps, SwitchHookFieldProps, SharedFieldLayoutProps, SharedHorizontalFieldLayoutProps, TextInputProps, SelectProps, SelectOption, CheckboxProps, NumberInputProps, DatePickerProps, RadioGroupProps, RadioGroupOption, SwitchProps, FormFieldsMetadataContextValue, } from './partner-hook-utils';
|
|
12
13
|
export { useDeductionForm, DeductionFormErrorCodes, createDeductionFormSchema, } from './components/Employee/Deductions/shared/useDeductionForm';
|
|
13
14
|
export type { UseDeductionFormProps, UseDeductionFormResult, UseDeductionFormReady, DeductionFormFields, DeductionFormFieldsMetadata, DeductionFormErrorCode, DeductionFormOptionalFieldsToRequire, DeductionFormData, DeductionFormOutputs, DeductionFormRequiredValidation, DeductionFormNegativeAmountValidation, DeductionFormAmountValidation, DeductionFormCapValidation, DescriptionFieldProps, RecurringFieldProps, DeductAsPercentageFieldProps, AmountFieldProps as DeductionAmountFieldProps, TotalAmountFieldProps, AnnualMaximumFieldProps, GarnishmentTypeFieldProps, } from './components/Employee/Deductions/shared/useDeductionForm';
|
|
14
15
|
export { useChildSupportGarnishmentForm, ChildSupportGarnishmentFormErrorCodes, createChildSupportGarnishmentFormSchema, getRequiredAttrKeys, SUPPORTED_REQUIRED_ATTR_KEYS, } from './components/Employee/Deductions/shared/useChildSupportGarnishmentForm';
|