formica-ui-lib 1.0.220 → 1.0.221
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/dist/componentProps/molecules/selectors/segmentedcontrol/SegmentedControlProps.d.ts +2 -0
- package/dist/componentProps/organisms/account/AccountAccessPanelProps.d.ts +59 -0
- package/dist/componentProps/organisms/cart/carttotalspanel/CartTotalsPanelProps.d.ts +3 -0
- package/dist/componentProps/organisms/cart/checkoutsteppanel/CheckoutAccountStepProps.d.ts +30 -2
- package/dist/componentProps/organisms/navigation/TopNavBarProps.d.ts +1 -0
- package/dist/componentProps/templates/cartshippingtemplate/CartShippingTemplateProps.d.ts +0 -1
- package/dist/componentProps/templates/logintemplate/LoginTemplateProps.d.ts +9 -0
- package/dist/index.cjs +8 -8
- package/dist/index.d.ts +4 -0
- package/dist/index.js +508 -240
- package/dist/stories/organisms/account/AccountAccessPanel/AccountAccessPanel.d.ts +4 -0
- package/dist/stories/organisms/account/AccountAccessPanel/AccountAccessPanel.test.d.ts +1 -0
- package/dist/stories/templates/logintemplate/LoginTemplate.d.ts +4 -0
- package/dist/stories/templates/logintemplate/LoginTemplate.test.d.ts +1 -0
- package/dist/tailwind.css +1 -1
- package/package.json +1 -1
|
@@ -3,10 +3,12 @@ export type SegmentedControlItem = {
|
|
|
3
3
|
label: string;
|
|
4
4
|
disabled?: boolean;
|
|
5
5
|
};
|
|
6
|
+
export type SegmentedControlLayoutVariant = "content" | "equalWidth";
|
|
6
7
|
export type SegmentedControlProps = {
|
|
7
8
|
items: SegmentedControlItem[];
|
|
8
9
|
selectedId?: string;
|
|
9
10
|
onSelect?: (id: string) => void;
|
|
11
|
+
layoutVariant?: SegmentedControlLayoutVariant;
|
|
10
12
|
className?: string;
|
|
11
13
|
buttonClassName?: string;
|
|
12
14
|
disabled?: boolean;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export type AccountAccessPanelMode = "signIn" | "createAccount";
|
|
3
|
+
export type AccountAccessPanelUserTypeValue = "architectDesigner" | "builderConstruction" | "dealerRetailer" | "distributor" | "fabricator" | "generalContractor" | "homeowner" | "mediaPress" | "other" | "postformer";
|
|
4
|
+
export type AccountAccessPanelUserTypeOption = {
|
|
5
|
+
label: string;
|
|
6
|
+
value: AccountAccessPanelUserTypeValue;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
};
|
|
9
|
+
export type AccountAccessPanelErrors = {
|
|
10
|
+
email?: string;
|
|
11
|
+
password?: string;
|
|
12
|
+
firstName?: string;
|
|
13
|
+
phoneNumber?: string;
|
|
14
|
+
userType?: string;
|
|
15
|
+
confirmPassword?: string;
|
|
16
|
+
termsAccepted?: string;
|
|
17
|
+
};
|
|
18
|
+
export type AccountAccessPanelData = {
|
|
19
|
+
mode?: AccountAccessPanelMode;
|
|
20
|
+
email?: string;
|
|
21
|
+
password?: string;
|
|
22
|
+
firstName?: string;
|
|
23
|
+
lastName?: string;
|
|
24
|
+
phoneNumber?: string;
|
|
25
|
+
userType?: AccountAccessPanelUserTypeValue | "";
|
|
26
|
+
confirmPassword?: string;
|
|
27
|
+
marketingOptIn?: boolean;
|
|
28
|
+
termsAccepted?: boolean;
|
|
29
|
+
passwordRequirementsText?: string;
|
|
30
|
+
userTypeOptions?: AccountAccessPanelUserTypeOption[];
|
|
31
|
+
errors?: AccountAccessPanelErrors;
|
|
32
|
+
};
|
|
33
|
+
export type AccountAccessPanelActionLabels = {
|
|
34
|
+
signInPrimary?: string;
|
|
35
|
+
createAccountPrimary?: string;
|
|
36
|
+
secondary?: string;
|
|
37
|
+
};
|
|
38
|
+
export type AccountAccessPanelProps = {
|
|
39
|
+
data: AccountAccessPanelData;
|
|
40
|
+
actionLabels?: AccountAccessPanelActionLabels;
|
|
41
|
+
onModeChange?: (mode: AccountAccessPanelMode) => void;
|
|
42
|
+
onEmailChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
43
|
+
onPasswordChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
44
|
+
onFirstNameChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
45
|
+
onLastNameChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
46
|
+
onPhoneNumberChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
47
|
+
onUserTypeChange?: (value: AccountAccessPanelUserTypeValue) => void;
|
|
48
|
+
onConfirmPasswordChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
49
|
+
onMarketingOptInChange?: (checked: boolean) => void;
|
|
50
|
+
onTermsAcceptedChange?: (checked: boolean) => void;
|
|
51
|
+
onEmailBlur?: (event: React.FocusEvent<HTMLInputElement>) => void;
|
|
52
|
+
onPasswordBlur?: (event: React.FocusEvent<HTMLInputElement>) => void;
|
|
53
|
+
onForgotPasswordClick?: (event: React.MouseEvent<HTMLAnchorElement>) => void;
|
|
54
|
+
onTermsClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
55
|
+
onPrivacyClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
56
|
+
onSignInClick?: () => void;
|
|
57
|
+
onCreateAccountClick?: () => void;
|
|
58
|
+
onSecondaryClick?: () => void;
|
|
59
|
+
};
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
export type CartDiscountCodeStatus = "idle" | "success" | "error";
|
|
2
3
|
export interface CartTotalsPanelProps {
|
|
3
4
|
discountCode?: string;
|
|
5
|
+
discountCodeStatus?: CartDiscountCodeStatus;
|
|
6
|
+
discountCodeMessage?: string;
|
|
4
7
|
subtotalLabel?: string;
|
|
5
8
|
discountLabel?: string;
|
|
6
9
|
taxLabel?: string;
|
|
@@ -1,20 +1,48 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
import type { AccountAccessPanelMode, AccountAccessPanelUserTypeValue } from "../../account/AccountAccessPanelProps";
|
|
2
3
|
export interface CheckoutAccountStepProps {
|
|
3
4
|
currentStep?: number;
|
|
4
5
|
steps?: string[];
|
|
5
|
-
activeMode?:
|
|
6
|
+
activeMode?: AccountAccessPanelMode;
|
|
6
7
|
email?: string;
|
|
7
8
|
password?: string;
|
|
9
|
+
firstName?: string;
|
|
10
|
+
lastName?: string;
|
|
11
|
+
phoneNumber?: string;
|
|
12
|
+
userType?: AccountAccessPanelUserTypeValue | "";
|
|
13
|
+
confirmPassword?: string;
|
|
14
|
+
marketingOptIn?: boolean;
|
|
15
|
+
termsAccepted?: boolean;
|
|
16
|
+
passwordRequirementsText?: string;
|
|
8
17
|
emailError?: string;
|
|
9
18
|
passwordError?: string;
|
|
19
|
+
firstNameError?: string;
|
|
20
|
+
phoneNumberError?: string;
|
|
21
|
+
userTypeError?: string;
|
|
22
|
+
confirmPasswordError?: string;
|
|
23
|
+
termsAcceptedError?: string;
|
|
10
24
|
emailHasError?: boolean;
|
|
11
25
|
passwordHasError?: boolean;
|
|
12
|
-
|
|
26
|
+
firstNameHasError?: boolean;
|
|
27
|
+
phoneNumberHasError?: boolean;
|
|
28
|
+
userTypeHasError?: boolean;
|
|
29
|
+
confirmPasswordHasError?: boolean;
|
|
30
|
+
termsAcceptedHasError?: boolean;
|
|
31
|
+
onModeChange?: (mode: AccountAccessPanelMode) => void;
|
|
13
32
|
onEmailChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
14
33
|
onPasswordChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
34
|
+
onFirstNameChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
35
|
+
onLastNameChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
36
|
+
onPhoneNumberChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
37
|
+
onUserTypeChange?: (value: AccountAccessPanelUserTypeValue) => void;
|
|
38
|
+
onConfirmPasswordChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
39
|
+
onMarketingOptInChange?: (checked: boolean) => void;
|
|
40
|
+
onTermsAcceptedChange?: (checked: boolean) => void;
|
|
15
41
|
onEmailBlur?: (event: React.FocusEvent<HTMLInputElement>) => void;
|
|
16
42
|
onPasswordBlur?: (event: React.FocusEvent<HTMLInputElement>) => void;
|
|
17
43
|
onForgotPasswordClick?: (event: React.MouseEvent<HTMLAnchorElement>) => void;
|
|
44
|
+
onTermsClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
45
|
+
onPrivacyClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
18
46
|
onContinue?: () => void;
|
|
19
47
|
onContinueAsGuest?: () => void;
|
|
20
48
|
className?: string;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { AccountAccessPanelData, AccountAccessPanelErrors, AccountAccessPanelMode, AccountAccessPanelProps, AccountAccessPanelUserTypeOption, AccountAccessPanelUserTypeValue } from "../../organisms/account/AccountAccessPanelProps";
|
|
2
|
+
export type LoginTemplateMode = AccountAccessPanelMode;
|
|
3
|
+
export type LoginTemplateUserTypeValue = AccountAccessPanelUserTypeValue;
|
|
4
|
+
export type LoginTemplateUserTypeOption = AccountAccessPanelUserTypeOption;
|
|
5
|
+
export type LoginTemplateErrors = AccountAccessPanelErrors;
|
|
6
|
+
export type LoginTemplateData = AccountAccessPanelData;
|
|
7
|
+
export type LoginTemplateProps = Omit<AccountAccessPanelProps, "actionLabels" | "onSecondaryClick"> & {
|
|
8
|
+
onCancelClick?: () => void;
|
|
9
|
+
};
|