formica-ui-lib 1.0.83 → 1.0.85

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.
@@ -19,15 +19,29 @@ export type TextureGroup = {
19
19
  export type TextureData = {
20
20
  groups?: TextureGroup[];
21
21
  };
22
+ export type SizeAndGradeDefinition = {
23
+ id: string;
24
+ grade: string;
25
+ text: string;
26
+ };
27
+ export type SizeAndGradeItem = {
28
+ id: string;
29
+ label: string;
30
+ isMTO?: boolean;
31
+ };
22
32
  export type SizeAndGradeCardData = {
23
33
  id: string;
24
34
  title: string;
35
+ grade?: string;
36
+ thickness?: string;
25
37
  subtitle?: string;
26
- items?: string[];
38
+ items?: SizeAndGradeItem[];
27
39
  tone?: "filled" | "outlined";
28
40
  };
29
41
  export type SizeAndGradeData = {
30
42
  summary?: string;
43
+ grade?: string;
44
+ definitions?: SizeAndGradeDefinition[];
31
45
  cards?: SizeAndGradeCardData[];
32
46
  content?: React.ReactNode;
33
47
  };
@@ -3,13 +3,18 @@ export type SwatchPurchasePanelTab = "Sample" | "Buy Now" | string;
3
3
  export type SwatchOption = ButtonGridItem & {
4
4
  id: string;
5
5
  label: string;
6
+ value: string;
6
7
  disabled?: boolean;
7
8
  active?: boolean;
8
9
  onClick?: () => void;
9
10
  };
11
+ export type SwatchPurchasePanelLeftPanelNavigateMeta = {
12
+ kind: "availability" | "returnPolicy";
13
+ };
10
14
  export type SwatchPurchasePanelLeftPanelProps = {
11
15
  sku?: string;
12
16
  title?: string;
17
+ decor?: string;
13
18
  description?: string;
14
19
  patternRepeat?: string;
15
20
  onDownloadSwatch?: () => void;
@@ -18,20 +23,23 @@ export type SwatchPurchasePanelLeftPanelProps = {
18
23
  activeTab: SwatchPurchasePanelTab;
19
24
  onTabChange: (tab: SwatchPurchasePanelTab) => void;
20
25
  productOptions?: SwatchOption[];
26
+ gradeOptions?: SwatchOption[];
21
27
  textureOptions?: SwatchOption[];
22
28
  sizeOptions?: SwatchOption[];
29
+ selectedProduct?: string | null;
30
+ selectedGrade?: string | null;
31
+ selectedTexture?: string | null;
32
+ selectedSize?: string | null;
23
33
  availabilityHref?: string;
24
34
  availabilityLabel?: string;
25
35
  notReturnableText?: string;
26
36
  returnPolicyHref?: string;
27
37
  returnPolicyLabel?: string;
38
+ onNavigate?: (href: string, meta?: SwatchPurchasePanelLeftPanelNavigateMeta) => void;
28
39
  priceLabel?: string;
29
40
  initialQuantity?: number;
30
41
  minQuantity?: number;
31
42
  maxQuantity?: number;
32
- selectedProduct?: string | null;
33
- selectedTexture?: string | null;
34
- selectedSize?: string | null;
35
43
  onQuantityChange?: (quantity: number) => void;
36
44
  onAddToWishlist: () => void;
37
45
  onAddToCart: (quantity: number) => void;
@@ -2,6 +2,15 @@ export type SwatchPurchasePanelTab = "Sample" | "Buy Now" | string;
2
2
  export type SwatchPurchasePanelNavigateMeta = {
3
3
  kind: "availability" | "returnPolicy";
4
4
  };
5
+ export type SwatchPurchasePanelCarouselProps = {
6
+ slides: any[];
7
+ initialIndex?: number;
8
+ text?: string;
9
+ };
10
+ export type AddToFavoritesPayloadProps = {
11
+ sku?: string;
12
+ decor?: string;
13
+ };
5
14
  export type SwatchPurchasePanelOptionProps = {
6
15
  id: string;
7
16
  label: string;
@@ -15,6 +24,7 @@ export type CartOrderProps = {
15
24
  sku?: string;
16
25
  decor?: string;
17
26
  product: string | null;
27
+ grade: string | null;
18
28
  texture: string | null;
19
29
  size: string | null;
20
30
  quantity: number;
@@ -22,24 +32,17 @@ export type CartOrderProps = {
22
32
  priceLabel?: string;
23
33
  currency?: string;
24
34
  };
25
- export type SwatchPurchasePanelCarouselProps = {
26
- slides: any[];
27
- initialIndex?: number;
28
- text?: string;
29
- };
30
35
  export type SwatchPurchasePanelTabOptionGroups = {
31
36
  productOptions?: SwatchPurchasePanelOptionProps[];
37
+ gradeOptions?: SwatchPurchasePanelOptionProps[];
32
38
  textureOptions?: SwatchPurchasePanelOptionProps[];
33
39
  sizeOptions?: SwatchPurchasePanelOptionProps[];
34
40
  };
35
- export type AddToFavoritesPayloadProps = {
36
- sku?: string;
37
- decor?: string;
38
- };
39
41
  export type ProductVariantProps = {
40
42
  id: string;
41
43
  sku: string;
42
44
  productName?: string;
45
+ rangeId?: string;
43
46
  texture?: string;
44
47
  thicknessIn?: string;
45
48
  widthIn?: string;
@@ -53,19 +56,19 @@ export type ProductVariantProps = {
53
56
  isWebEnabled?: boolean;
54
57
  };
55
58
  export type SwatchPurchasePanelProps = {
56
- className?: string;
57
59
  sku?: string;
58
60
  decor?: string;
59
- title?: string;
61
+ title: string;
60
62
  description?: string;
61
63
  patternRepeat?: string;
62
64
  onDownloadSwatch?: () => void;
63
65
  onDownloadFullSheet?: () => void;
64
- carousel?: SwatchPurchasePanelCarouselProps;
66
+ carousel: SwatchPurchasePanelCarouselProps;
65
67
  tabs?: SwatchPurchasePanelTab[];
66
68
  initialTab?: SwatchPurchasePanelTab;
67
- tabOptions?: Partial<Record<SwatchPurchasePanelTab, SwatchPurchasePanelTabOptionGroups>>;
69
+ tabOptions?: Record<SwatchPurchasePanelTab, SwatchPurchasePanelTabOptionGroups>;
68
70
  productOptions?: SwatchPurchasePanelOptionProps[];
71
+ gradeOptions?: SwatchPurchasePanelOptionProps[];
69
72
  textureOptions?: SwatchPurchasePanelOptionProps[];
70
73
  sizeOptions?: SwatchPurchasePanelOptionProps[];
71
74
  variants?: ProductVariantProps[];
@@ -84,5 +87,5 @@ export type SwatchPurchasePanelProps = {
84
87
  notReturnableText?: string;
85
88
  onNavigate?: (href: string, meta?: SwatchPurchasePanelNavigateMeta) => void;
86
89
  };
87
- export type GroupName = "product" | "texture" | "size";
90
+ export type GroupName = "product" | "grade" | "texture" | "size";
88
91
  export type SelectedState = Record<GroupName, string | null>;
@@ -1,8 +1,8 @@
1
- export type SwatchPurchasePanelCarouselProps = {
1
+ export type SwatchPurchasePanelCarousel = {
2
2
  slides: any[];
3
3
  initialIndex?: number;
4
4
  text?: string;
5
5
  };
6
6
  export type SwatchPurchasePanelRightPanelProps = {
7
- carousel?: SwatchPurchasePanelCarouselProps;
7
+ carousel?: SwatchPurchasePanelCarousel;
8
8
  };
@@ -1,5 +1,5 @@
1
1
  import { BreadcrumbsProps } from "../../molecules/selectors/breadcrumb/BreadcrumbsProps";
2
- import { ProductInformationTabKey } from "../../organisms/section/productinformationsection/ProductInformationSectionProps";
2
+ import { ProductInformationTabKey, SizeAndGradeDefinition } from "../../organisms/section/productinformationsection/ProductInformationSectionProps";
3
3
  export type ProductDetailSimpleOption = {
4
4
  id: string;
5
5
  label: string;
@@ -76,12 +76,14 @@ export type ProductDetailRange = {
76
76
  };
77
77
  sizeAndGrade?: {
78
78
  summary?: string;
79
+ definitions?: SizeAndGradeDefinition[];
79
80
  cards?: Array<{
80
81
  id: string;
81
82
  title: string;
82
83
  subtitle?: string;
83
84
  tone?: "filled" | "outlined";
84
85
  items: string[];
86
+ mtoItems?: string[];
85
87
  }>;
86
88
  content?: string;
87
89
  };
@@ -109,20 +111,20 @@ export type ProductDetailVariant = {
109
111
  id: string;
110
112
  sku: string;
111
113
  productName?: string;
114
+ brand?: string;
112
115
  rangeId?: string;
113
116
  decor?: string;
114
- title?: string;
115
117
  texture?: string;
116
- textureId?: string;
117
118
  thicknessIn?: string;
118
- thicknessId?: string;
119
119
  widthIn?: string;
120
120
  lengthIn?: string;
121
- sizeId?: string;
122
121
  price?: ProductDetailPrice;
123
122
  finish?: string;
124
123
  grade?: string;
125
- isWebEnabled?: boolean;
124
+ isEcomm?: boolean;
125
+ isMTO?: boolean;
126
+ publishDate: string;
127
+ unpublishDate: string;
126
128
  };
127
129
  export type ProductDetailSizeAndGradeGuideRow = {
128
130
  textureId?: string;
@@ -133,6 +135,7 @@ export type ProductDetailSizeAndGradeGuideRow = {
133
135
  sizeId: string;
134
136
  label: string;
135
137
  skuIds?: string[];
138
+ isMTO?: boolean;
136
139
  }>;
137
140
  };
138
141
  export type ProductDetailStandardCopyHero = {