formica-ui-lib 1.0.219 → 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.
Files changed (23) hide show
  1. package/dist/componentProps/molecules/productinformation/colourmatchingchart/ColourMatchingChartProps.d.ts +10 -0
  2. package/dist/componentProps/molecules/selectors/segmentedcontrol/SegmentedControlProps.d.ts +2 -0
  3. package/dist/componentProps/organisms/account/AccountAccessPanelProps.d.ts +59 -0
  4. package/dist/componentProps/organisms/cart/carttotalspanel/CartTotalsPanelProps.d.ts +3 -0
  5. package/dist/componentProps/organisms/cart/checkoutsteppanel/CheckoutAccountStepProps.d.ts +30 -2
  6. package/dist/componentProps/organisms/cart/purchasepanel/PurchasePanelLeftPanelProps.d.ts +2 -0
  7. package/dist/componentProps/organisms/cart/purchasepanel/PurchasePanelProps.d.ts +2 -0
  8. package/dist/componentProps/organisms/navigation/TopNavBarProps.d.ts +1 -0
  9. package/dist/componentProps/organisms/sections/productinformationsection/ProductInformationSectionProps.d.ts +2 -0
  10. package/dist/componentProps/templates/cartshippingtemplate/CartShippingTemplateProps.d.ts +0 -1
  11. package/dist/componentProps/templates/logintemplate/LoginTemplateProps.d.ts +9 -0
  12. package/dist/componentProps/templates/productdetailpagetemplate/ProductDetailPageTemplateProps.d.ts +3 -0
  13. package/dist/index.cjs +8 -8
  14. package/dist/index.d.ts +6 -0
  15. package/dist/index.js +1610 -1281
  16. package/dist/stories/molecules/productinformation/colourmatchingchart/ColourMatchingChart.d.ts +4 -0
  17. package/dist/stories/molecules/productinformation/colourmatchingchart/ColourMatchingChart.test.d.ts +1 -0
  18. package/dist/stories/organisms/account/AccountAccessPanel/AccountAccessPanel.d.ts +4 -0
  19. package/dist/stories/organisms/account/AccountAccessPanel/AccountAccessPanel.test.d.ts +1 -0
  20. package/dist/stories/templates/logintemplate/LoginTemplate.d.ts +4 -0
  21. package/dist/stories/templates/logintemplate/LoginTemplate.test.d.ts +1 -0
  22. package/dist/tailwind.css +1 -1
  23. package/package.json +1 -1
@@ -0,0 +1,10 @@
1
+ export type ColourMatchingChartValue = string | number;
2
+ export type ColourMatchingChartCode = "LRV" | "RAL" | "NCS";
3
+ export type ColourMatchingChartData = {
4
+ lrv?: ColourMatchingChartValue | null;
5
+ ral?: ColourMatchingChartValue | null;
6
+ ncs?: ColourMatchingChartValue | null;
7
+ };
8
+ export type ColourMatchingChartProps = {
9
+ colourMatching?: ColourMatchingChartData;
10
+ };
@@ -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?: "createAccount" | "signIn";
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
- onModeChange?: (mode: "createAccount" | "signIn") => void;
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;
@@ -1,5 +1,6 @@
1
1
  import type { ButtonGridItem } from "../../../molecules/buttons/buttongrid/ButtonGridProps";
2
2
  import type { ReactNode } from "react";
3
+ import type { ColourMatchingChartData } from "../../../molecules/productinformation/colourmatchingchart/ColourMatchingChartProps";
3
4
  export type SwatchPurchasePanelTab = "Sample" | "Buy Now" | string;
4
5
  export type SwatchOption = ButtonGridItem & {
5
6
  id: string;
@@ -17,6 +18,7 @@ export type PurchasePanelLeftPanelProps = {
17
18
  title?: string;
18
19
  decor?: string;
19
20
  description?: string;
21
+ colourMatching?: ColourMatchingChartData;
20
22
  patternRepeat?: string;
21
23
  onDownloadSwatch?: () => void;
22
24
  onDownloadFullSheet?: () => void;
@@ -1,4 +1,5 @@
1
1
  import type { SwatchPurchasePanelCarousel } from "./PurchasePanelRightPanelProps";
2
+ import type { ColourMatchingChartData } from "../../../molecules/productinformation/colourmatchingchart/ColourMatchingChartProps";
2
3
  export type PurchasePanelTab = "Sample" | "Buy Now" | string;
3
4
  export type SwatchPurchasePanelNavigateMeta = {
4
5
  kind: "availability" | "returnPolicy";
@@ -59,6 +60,7 @@ export type PurchasePanelProps = {
59
60
  decor?: string;
60
61
  title: string;
61
62
  description?: string;
63
+ colourMatching?: ColourMatchingChartData;
62
64
  patternRepeat?: string;
63
65
  onDownloadSwatch?: () => void;
64
66
  onDownloadFullSheet?: () => void;
@@ -29,6 +29,7 @@ export type TopNavCartSummary = {
29
29
  export type TopNavLogin = {
30
30
  label: string;
31
31
  href: string;
32
+ loggedIn?: boolean;
32
33
  };
33
34
  export type TopNavLogo = {
34
35
  src?: string;
@@ -1,8 +1,10 @@
1
1
  import React from "react";
2
+ import type { ColourMatchingChartData } from "../../../molecules/productinformation/colourmatchingchart/ColourMatchingChartProps";
2
3
  export type ProductInformationTabKey = "details" | "texture" | "sizeAndGrade";
3
4
  export type ProductDetailsData = {
4
5
  summary?: string;
5
6
  content?: React.ReactNode;
7
+ colourMatching?: ColourMatchingChartData;
6
8
  };
7
9
  export type TextureItem = {
8
10
  key: string;
@@ -11,5 +11,4 @@ export interface CartShippingTemplateProps {
11
11
  sameAsShipping?: boolean;
12
12
  sameAsShippingLabel?: string;
13
13
  onSameAsShippingChange?: (payload: CheckboxChangePayload) => void;
14
- className?: string;
15
14
  }
@@ -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
+ };
@@ -1,6 +1,7 @@
1
1
  import { BreadcrumbsProps } from "../../molecules/selectors/breadcrumb/BreadcrumbsProps";
2
2
  import { ProductInformationTabKey, SizeAndGradeDefinition } from "../../organisms/sections/productinformationsection/ProductInformationSectionProps";
3
3
  import { CartFlyoutProps } from "../../organisms/cart/cartflyout/CartFlyoutProps";
4
+ import type { ColourMatchingChartData } from "../../molecules/productinformation/colourmatchingchart/ColourMatchingChartProps";
4
5
  export type ProductDetailSimpleOption = {
5
6
  id: string;
6
7
  label: string;
@@ -30,6 +31,7 @@ export type ProductDetailProduct = {
30
31
  title?: string;
31
32
  brand?: string;
32
33
  description?: string;
34
+ colourMatching?: ColourMatchingChartData;
33
35
  sku?: string;
34
36
  patternRepeat?: string;
35
37
  currency?: string;
@@ -76,6 +78,7 @@ export type ProductDetailRange = {
76
78
  details?: {
77
79
  summary?: string;
78
80
  content?: string;
81
+ colourMatching?: ColourMatchingChartData;
79
82
  };
80
83
  texture?: {
81
84
  groups?: ProductDetailTextureGroup[];