formica-ui-lib 1.0.281 → 1.0.283

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/cards/cartItemCard/CartItemCardProps.d.ts +4 -0
  2. package/dist/componentProps/molecules/cards/quantitycheckoutcard/QuantityCheckoutCardProps.d.ts +3 -0
  3. package/dist/componentProps/molecules/cart/cartactions/CartActionsProps.d.ts +2 -0
  4. package/dist/componentProps/molecules/selectors/filterbar/FilterBarProps.d.ts +1 -2
  5. package/dist/componentProps/organisms/account/AccountAccessPanelProps.d.ts +27 -0
  6. package/dist/componentProps/organisms/cart/cartflyout/CartFlyoutProps.d.ts +11 -0
  7. package/dist/componentProps/organisms/cart/cartsummary/CartSummaryProps.d.ts +7 -0
  8. package/dist/componentProps/organisms/cart/carttotalspanel/CartTotalsPanelProps.d.ts +3 -0
  9. package/dist/componentProps/organisms/cart/checkoutsteppanel/CheckoutAccountStepProps.d.ts +3 -1
  10. package/dist/componentProps/organisms/cart/purchasepanel/PurchasePanelLeftPanelProps.d.ts +5 -0
  11. package/dist/componentProps/organisms/cart/purchasepanel/PurchasePanelProps.d.ts +17 -0
  12. package/dist/componentProps/organisms/sections/locationmap/LocationMapProps.d.ts +1 -0
  13. package/dist/componentProps/organisms/sections/productinformationsection/ProductInformationSectionProps.d.ts +2 -0
  14. package/dist/componentProps/templates/categorypagetemplate/CategoryPageTemplateProps.d.ts +0 -1
  15. package/dist/componentProps/templates/gallerytemplate/GalleryTemplateProps.d.ts +0 -4
  16. package/dist/componentProps/templates/productdetailpagetemplate/ProductDetailPageTemplateProps.d.ts +6 -1
  17. package/dist/componentProps/templates/wheretobuytemplate/WhereToBuyTemplateProps.d.ts +1 -0
  18. package/dist/index.cjs +3 -3
  19. package/dist/index.d.ts +6 -4
  20. package/dist/index.js +1397 -1361
  21. package/dist/stories/molecules/cards/quantitycheckoutcard/QuantityCheckoutCard.d.ts +1 -1
  22. package/dist/tailwind.css +1 -1
  23. package/package.json +1 -1
@@ -19,6 +19,10 @@ export type CartItemCardProps = {
19
19
  status?: CartItemStatus;
20
20
  minQuantity?: number;
21
21
  maxQuantity?: number;
22
+ freeLabel?: string;
23
+ removeItemLabel?: string;
24
+ decreaseQuantityLabel?: string;
25
+ increaseQuantityLabel?: string;
22
26
  onQuantityChange?: (quantity: number) => void;
23
27
  onRemoveItem?: () => void;
24
28
  };
@@ -25,6 +25,9 @@ export interface QuantityCheckoutCardProps {
25
25
  minQuantity?: number;
26
26
  maxQuantity?: number;
27
27
  isReadOnly?: boolean;
28
+ removeItemLabel?: string;
29
+ decreaseQuantityLabel?: string;
30
+ increaseQuantityLabel?: string;
28
31
  onQuantityChange?: (quantity: number) => void;
29
32
  onRemoveItem?: () => void;
30
33
  }
@@ -9,6 +9,8 @@ export type CartActionsProps = {
9
9
  /** optional labels */
10
10
  wishlistLabel?: string;
11
11
  cartLabel?: string;
12
+ decreaseQuantityLabel?: string;
13
+ increaseQuantityLabel?: string;
12
14
  showFavorites?: boolean;
13
15
  /** layout hooks */
14
16
  className?: string;
@@ -1,6 +1,5 @@
1
1
  import React from "react";
2
2
  export type FilterBarProps = {
3
3
  children?: React.ReactNode;
4
- className?: string;
5
- barClassName?: string;
4
+ layoutVariant?: "default" | "stacked" | "separator";
6
5
  };
@@ -32,9 +32,36 @@ export type AccountAccessPanelActionLabels = {
32
32
  createAccountPrimary?: string;
33
33
  secondary?: string;
34
34
  };
35
+ export type AccountAccessPanelLabels = {
36
+ modeAriaLabel?: string;
37
+ createAccountMode?: string;
38
+ signInMode?: string;
39
+ firstName?: string;
40
+ firstNamePlaceholder?: string;
41
+ lastName?: string;
42
+ lastNamePlaceholder?: string;
43
+ email?: string;
44
+ emailPlaceholder?: string;
45
+ phoneNumber?: string;
46
+ phoneNumberPlaceholder?: string;
47
+ userType?: string;
48
+ userTypePlaceholder?: string;
49
+ password?: string;
50
+ passwordPlaceholder?: string;
51
+ forgotPassword?: string;
52
+ confirmPassword?: string;
53
+ confirmPasswordPlaceholder?: string;
54
+ marketingOptIn?: string;
55
+ termsConsentAriaLabel?: string;
56
+ termsConsentPrefix?: string;
57
+ termsOfUse?: string;
58
+ termsConsentJoin?: string;
59
+ privacyPolicy?: string;
60
+ };
35
61
  export type AccountAccessPanelProps = {
36
62
  data: AccountAccessPanelData;
37
63
  actionLabels?: AccountAccessPanelActionLabels;
64
+ labels?: AccountAccessPanelLabels;
38
65
  onModeChange?: (mode: AccountAccessPanelMode) => void;
39
66
  onEmailChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
40
67
  onPasswordChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
@@ -7,6 +7,17 @@ export type CartFlyoutProps = {
7
7
  isOpen: boolean;
8
8
  title?: string;
9
9
  projectName?: string;
10
+ projectNamePlaceholder?: string;
11
+ emptyCartText?: string;
12
+ goToCartLabel?: string;
13
+ clearCartLabel?: string;
14
+ freeLabel?: string;
15
+ closeOverlayLabel?: string;
16
+ closeCartLabel?: string;
17
+ flyoutAriaLabel?: string;
18
+ removeItemLabel?: string;
19
+ decreaseQuantityLabel?: string;
20
+ increaseQuantityLabel?: string;
10
21
  items?: ShoppingCartFlyoutItem[];
11
22
  className?: string;
12
23
  onClose?: () => void;
@@ -22,6 +22,13 @@ export interface CartSummaryProps {
22
22
  subtotal: number;
23
23
  shippingCost: number;
24
24
  items: CartSummaryItem[];
25
+ title?: string;
26
+ totalLabel?: string;
27
+ locale?: string;
28
+ currency?: string;
29
+ removeItemLabel?: string;
30
+ decreaseQuantityLabel?: string;
31
+ increaseQuantityLabel?: string;
25
32
  onQuantityChange?: (itemId: string, quantity: number) => void;
26
33
  onRemoveItem?: (itemId: string) => void;
27
34
  }
@@ -15,6 +15,9 @@ export interface CartTotalsPanelProps {
15
15
  shipping?: string;
16
16
  total?: string;
17
17
  continueLabel?: string;
18
+ discountCodePlaceholder?: string;
19
+ applyDiscountLabel?: string;
20
+ notCalculatedLabel?: string;
18
21
  showDiscountCode?: boolean;
19
22
  onDiscountCodeChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
20
23
  onApplyDiscount?: () => void;
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import type { AccountAccessPanelMode, AccountAccessPanelUserTypeValue } from "../../account/AccountAccessPanelProps";
2
+ import type { AccountAccessPanelActionLabels, AccountAccessPanelLabels, AccountAccessPanelMode, AccountAccessPanelUserTypeValue } from "../../account/AccountAccessPanelProps";
3
3
  export interface CheckoutAccountStepProps {
4
4
  currentStep?: number;
5
5
  steps?: string[];
@@ -28,6 +28,8 @@ export interface CheckoutAccountStepProps {
28
28
  userTypeHasError?: boolean;
29
29
  confirmPasswordHasError?: boolean;
30
30
  termsAcceptedHasError?: boolean;
31
+ actionLabels?: AccountAccessPanelActionLabels;
32
+ labels?: AccountAccessPanelLabels;
31
33
  onModeChange?: (mode: AccountAccessPanelMode) => void;
32
34
  onEmailChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
33
35
  onPasswordChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
@@ -2,6 +2,7 @@ import type { ButtonGridItem } from "../../../molecules/buttons/buttongrid/Butto
2
2
  import type { ReactNode } from "react";
3
3
  import type { ColourMatchingChartData } from "../../../molecules/productinformation/colourmatchingchart/ColourMatchingChartProps";
4
4
  import type { ProductContactAction, ProductContactActionClickPayload } from "../../../molecules/cart/productcontactactions/ProductContactActionsProps";
5
+ import type { PurchasePanelLabels, PurchasePanelTabLabels } from "./PurchasePanelProps";
5
6
  export type SwatchPurchasePanelTab = "Sample" | "Buy Now" | string;
6
7
  export type PurchasePanelActionMode = "cart" | "contact";
7
8
  export type SwatchOption = ButtonGridItem & {
@@ -24,7 +25,11 @@ export type PurchasePanelLeftPanelProps = {
24
25
  patternRepeat?: string;
25
26
  onDownloadSwatch?: () => void;
26
27
  onDownloadFullSheet?: () => void;
28
+ downloadSwatchLabel?: string;
29
+ downloadFullSheetLabel?: string;
27
30
  tabs?: SwatchPurchasePanelTab[];
31
+ tabLabels?: PurchasePanelTabLabels;
32
+ labels?: PurchasePanelLabels;
28
33
  activeTab: SwatchPurchasePanelTab;
29
34
  onTabChange: (tab: SwatchPurchasePanelTab) => void;
30
35
  productOptions?: SwatchOption[];
@@ -2,6 +2,19 @@ import type { SwatchPurchasePanelCarousel } from "./PurchasePanelRightPanelProps
2
2
  import type { ColourMatchingChartData } from "../../../molecules/productinformation/colourmatchingchart/ColourMatchingChartProps";
3
3
  import type { ProductContactAction, ProductContactActionClickPayload } from "../../../molecules/cart/productcontactactions/ProductContactActionsProps";
4
4
  export type PurchasePanelTab = "Sample" | "Buy Now" | string;
5
+ export type PurchasePanelTabLabels = Partial<Record<"Sample" | "Buy Now", string>>;
6
+ export type PurchasePanelLabels = {
7
+ product?: string;
8
+ grade?: string;
9
+ texture?: string;
10
+ size?: string;
11
+ patternRepeat?: string;
12
+ addSampleToCart?: string;
13
+ addToCart?: string;
14
+ addToWishlist?: string;
15
+ decreaseQuantity?: string;
16
+ increaseQuantity?: string;
17
+ };
5
18
  export type PurchasePanelActionMode = "cart" | "contact";
6
19
  export type SwatchPurchasePanelNavigateMeta = {
7
20
  kind: "availability" | "returnPolicy";
@@ -78,8 +91,12 @@ export type PurchasePanelProps = {
78
91
  patternRepeat?: string;
79
92
  onDownloadSwatch?: () => void;
80
93
  onDownloadFullSheet?: () => void;
94
+ downloadSwatchLabel?: string;
95
+ downloadFullSheetLabel?: string;
81
96
  carousel: PurchasePanelCarouselProps;
82
97
  tabs?: PurchasePanelTab[];
98
+ tabLabels?: PurchasePanelTabLabels;
99
+ labels?: PurchasePanelLabels;
83
100
  initialTab?: PurchasePanelTab;
84
101
  tabOptions?: Record<PurchasePanelTab, PurchasePanelTabOptionGroups>;
85
102
  productOptions?: PurchasePanelOptionProps[];
@@ -9,6 +9,7 @@ export type LocationMapProps = {
9
9
  center?: WhereToBuyLocationCoordinates;
10
10
  zoom?: number;
11
11
  selectedLocationId?: string;
12
+ ariaLabel?: string;
12
13
  legendLabel?: string;
13
14
  onLocationSelect?: (payload: LocationMapMarkerClickPayload) => void;
14
15
  };
@@ -1,6 +1,7 @@
1
1
  import React from "react";
2
2
  import type { ColourMatchingChartData } from "../../../molecules/productinformation/colourmatchingchart/ColourMatchingChartProps";
3
3
  export type ProductInformationTabKey = "details" | "texture" | "sizeAndGrade";
4
+ export type ProductInformationTabLabels = Partial<Record<ProductInformationTabKey, string>>;
4
5
  export type ProductDetailsData = {
5
6
  summary?: string;
6
7
  content?: React.ReactNode;
@@ -45,6 +46,7 @@ export type SizeAndGradeData = {
45
46
  export type ProductInformationSectionProps = {
46
47
  ranges: ProductInformationRange[];
47
48
  defaultTab?: ProductInformationTabKey;
49
+ tabLabels?: ProductInformationTabLabels;
48
50
  defaultRangeId?: string;
49
51
  selectedGrade?: string;
50
52
  className?: string;
@@ -43,7 +43,6 @@ export type CategoryPageData = {
43
43
  selectedValue?: string;
44
44
  };
45
45
  filters: {
46
- barClassName?: string;
47
46
  labels?: CategoryPageFilterLabels;
48
47
  toggleButton?: {
49
48
  initiallyVisible?: boolean;
@@ -1,12 +1,8 @@
1
1
  import type { StandardCopyHeroProps } from "../../organisms/banners/standardcopyhero/StandardCopyHeroProps";
2
2
  import type { MultiButtonBarProps } from "../../molecules/selectors/multibuttonbar/MultiButtonBarProps";
3
- import type { FilterBarProps } from "../../molecules/selectors/filterbar/FilterBarProps";
4
- import type { DropdownFilterProps } from "../../molecules/selectors/filterbar/DropdownFilterProps";
5
3
  import type { ImageGridProps } from "../../organisms/grids/imagegrid/ImageGridProps";
6
4
  export type GalleryTemplateProps = {
7
5
  standardCopyHeroProps: StandardCopyHeroProps;
8
6
  multiButtonBarProps: MultiButtonBarProps;
9
- filterBarProps: FilterBarProps;
10
- dropdownFilterPropsList: DropdownFilterProps[];
11
7
  imageGridProps: ImageGridProps;
12
8
  };
@@ -1,8 +1,9 @@
1
1
  import { BreadcrumbsProps } from "../../molecules/selectors/breadcrumb/BreadcrumbsProps";
2
- import { ProductInformationTabKey, SizeAndGradeDefinition } from "../../organisms/sections/productinformationsection/ProductInformationSectionProps";
2
+ import { ProductInformationTabLabels, ProductInformationTabKey, SizeAndGradeDefinition } from "../../organisms/sections/productinformationsection/ProductInformationSectionProps";
3
3
  import { CartFlyoutProps } from "../../organisms/cart/cartflyout/CartFlyoutProps";
4
4
  import type { ColourMatchingChartData } from "../../molecules/productinformation/colourmatchingchart/ColourMatchingChartProps";
5
5
  import type { ProductContactAction, ProductContactActionClickPayload } from "../../molecules/cart/productcontactactions/ProductContactActionsProps";
6
+ import type { PurchasePanelLabels } from "../../organisms/cart/purchasepanel/PurchasePanelProps";
6
7
  export type ProductDetailSimpleOption = {
7
8
  id: string;
8
9
  label: string;
@@ -41,7 +42,10 @@ export type ProductDetailProduct = {
41
42
  };
42
43
  export type ProductDetailContent = {
43
44
  defaultPurchaseTab?: string;
45
+ purchaseTabLabels?: Partial<Record<"Sample" | "Buy Now", string>>;
46
+ purchaseLabels?: PurchasePanelLabels;
44
47
  defaultInfoTab?: ProductInformationTabKey;
48
+ productInformationTabLabels?: ProductInformationTabLabels;
45
49
  defaultRangeId?: string;
46
50
  availabilityLabel?: string;
47
51
  availabilityHref?: string;
@@ -207,6 +211,7 @@ export type ProductDetailData = {
207
211
  rows?: ProductDetailSizeAndGradeGuideRow[];
208
212
  };
209
213
  standardCopyHero?: ProductDetailStandardCopyHero;
214
+ featuredProductsTitle?: string;
210
215
  featuredProducts?: ProductDetailFeaturedProduct[];
211
216
  };
212
217
  export type ProductDetailWishlistPayload = {
@@ -33,6 +33,7 @@ export type WhereToBuyTemplateData = {
33
33
  };
34
34
  zoom?: number;
35
35
  selectedLocationId?: string;
36
+ ariaLabel?: string;
36
37
  legendLabel?: string;
37
38
  };
38
39
  locations: WhereToBuyLocation[];