formica-ui-lib 1.0.69 → 1.0.71
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/README.md +21 -19
- package/dist/componentProps/atoms/icon/IconProps.d.ts +3 -3
- package/dist/componentProps/molecules/card/featureproductcard/FeaturedProductCardProps.d.ts +8 -0
- package/dist/componentProps/molecules/card/swatchquantitycard/SwatchQuantityCardProps.d.ts +13 -0
- package/dist/componentProps/molecules/carousel/minicarousel/MiniCarouselProps.d.ts +2 -0
- package/dist/componentProps/molecules/selectors/breadcrumb/BreadcrumbProps.d.ts +9 -0
- package/dist/componentProps/molecules/selectors/verticaltablist/VerticalTabListProps.d.ts +10 -0
- package/dist/componentProps/organisms/banner/featurebanner/FeatureBannerProps.d.ts +1 -1
- package/dist/componentProps/organisms/banner/standardcopyhero/StandardCopyHeroProps.d.ts +3 -0
- package/dist/componentProps/organisms/carousels/featureproductcarousel/FeaturedProductsCarouselProps.d.ts +13 -0
- package/dist/componentProps/organisms/section/productinformationsection/ProductInformationSectionProps.d.ts +46 -0
- package/dist/componentProps/page/productdetailpage/ProductDetailPageProps.d.ts +10 -0
- package/dist/componentProps/templates/productdetailpagetemplate/ProductDetailPageTemplateProps.d.ts +200 -0
- package/dist/index.cjs +8 -8
- package/dist/index.d.ts +32 -31
- package/dist/index.js +1393 -1041
- package/dist/stories/atoms/icon/Icon.d.ts +4 -4
- package/dist/stories/molecules/card/featureproductcard/FeaturedProductCard.d.ts +4 -0
- package/dist/stories/molecules/card/swatchquantitycard/SwatchQuantityCard.d.ts +4 -0
- package/dist/stories/molecules/card/swatchquantitycard/SwatchQuantityCard.test.d.ts +1 -0
- package/dist/stories/molecules/carousel/minicarousel/MiniCarousel.d.ts +1 -1
- package/dist/stories/molecules/mediaLinks/footerImageLink/FooterImageLink.stories.d.ts +1 -1
- package/dist/stories/molecules/radioButtons/RadioButtons.d.ts +1 -1
- package/dist/stories/molecules/selectors/breadcrumb/Breadcrumb.d.ts +4 -0
- package/dist/stories/molecules/selectors/verticaltablist/VerticalTabList.d.ts +4 -0
- package/dist/stories/organisms/banner/featurebanner/FeatureBanner.d.ts +1 -1
- package/dist/stories/organisms/carousels/featuredproductcarousel/FeaturedProductsCarousel.d.ts +4 -0
- package/dist/stories/organisms/section/productinformationsection/ProductInformationSection.d.ts +4 -0
- package/dist/stories/organisms/section/productinformationsection/parts/ProductDetailsPane.d.ts +6 -0
- package/dist/stories/organisms/section/productinformationsection/parts/SizeAndGradePane.d.ts +6 -0
- package/dist/stories/organisms/section/productinformationsection/parts/TexturePane.d.ts +6 -0
- package/dist/stories/page/productDetailPage/ProductDetailPage.d.ts +1 -12
- package/dist/stories/template/productdetailpagetemplate/ProductDetailPageTemplate.d.ts +4 -0
- package/package.json +86 -80
- package/dist/vite.svg +0 -1
package/README.md
CHANGED
|
@@ -1,19 +1,21 @@
|
|
|
1
|
-
# formicaui
|
|
2
|
-
|
|
3
|
-
This is the home of Formica's Storybook components for the UI
|
|
4
|
-
|
|
5
|
-
## Branching / Git Workflow
|
|
6
|
-
|
|
7
|
-
⚠️ **Direct commits to `main` are not allowed.** All work must be done in a feature branch created from `dev`.
|
|
8
|
-
|
|
9
|
-
### Create a feature branch from `dev`
|
|
10
|
-
|
|
11
|
-
1. Checkout `dev` and pull the latest changes
|
|
12
|
-
2. Create a new feature branch named `feature/YourFeature`
|
|
13
|
-
|
|
14
|
-
**Commands:**
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
git
|
|
18
|
-
git
|
|
19
|
-
git
|
|
1
|
+
# formicaui
|
|
2
|
+
|
|
3
|
+
This is the home of Formica's Storybook components for the UI
|
|
4
|
+
|
|
5
|
+
## Branching / Git Workflow
|
|
6
|
+
|
|
7
|
+
⚠️ **Direct commits to `main` are not allowed.** All work must be done in a feature branch created from `dev`.
|
|
8
|
+
|
|
9
|
+
### Create a feature branch from `dev`
|
|
10
|
+
|
|
11
|
+
1. Checkout `dev` and pull the latest changes
|
|
12
|
+
2. Create a new feature branch named `feature/YourFeature`
|
|
13
|
+
|
|
14
|
+
**Commands:**
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
git fetch
|
|
18
|
+
git checkout dev
|
|
19
|
+
git pull
|
|
20
|
+
git checkout -b feature/YourFeature
|
|
21
|
+
```
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { IconDefinition } from
|
|
2
|
-
export type IconSize =
|
|
3
|
-
export type IconColor =
|
|
1
|
+
import type { IconDefinition } from "@fortawesome/fontawesome-svg-core";
|
|
2
|
+
export type IconSize = "base" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "5xl";
|
|
3
|
+
export type IconColor = "inherit" | "primary" | "secondary" | "secondaryHover" | "accent";
|
|
4
4
|
export type IconProps = {
|
|
5
5
|
icon?: IconDefinition;
|
|
6
6
|
alt?: string;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export type SwatchQuantityCardProps = {
|
|
2
|
+
imageSrc: string;
|
|
3
|
+
imageAlt: string;
|
|
4
|
+
title: string;
|
|
5
|
+
brand: string;
|
|
6
|
+
decorNumber: number;
|
|
7
|
+
swatchType: string;
|
|
8
|
+
initialQuantity?: number;
|
|
9
|
+
minQuantity?: number;
|
|
10
|
+
maxQuantity?: number;
|
|
11
|
+
onQuantityChange?: (quantity: number) => void;
|
|
12
|
+
onRemoveItem?: () => void;
|
|
13
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export type FeaturedProductItem = {
|
|
2
|
+
id: string;
|
|
3
|
+
imageSrc: string;
|
|
4
|
+
imageAlt: string;
|
|
5
|
+
title: string;
|
|
6
|
+
brand: string;
|
|
7
|
+
decorNumber: string | number;
|
|
8
|
+
href?: string;
|
|
9
|
+
};
|
|
10
|
+
export type FeaturedProductsCarouselProps = {
|
|
11
|
+
title?: string;
|
|
12
|
+
items: FeaturedProductItem[];
|
|
13
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export type ProductInformationTabKey = "details" | "texture" | "sizeAndGrade";
|
|
3
|
+
export type ProductDetailsData = {
|
|
4
|
+
summary?: string;
|
|
5
|
+
content?: React.ReactNode;
|
|
6
|
+
};
|
|
7
|
+
export type TextureItem = {
|
|
8
|
+
key: string;
|
|
9
|
+
title?: string;
|
|
10
|
+
imageSrc?: string;
|
|
11
|
+
imageAlt?: string;
|
|
12
|
+
description?: string;
|
|
13
|
+
};
|
|
14
|
+
export type TextureGroup = {
|
|
15
|
+
id: string;
|
|
16
|
+
title: string;
|
|
17
|
+
items: TextureItem[];
|
|
18
|
+
};
|
|
19
|
+
export type TextureData = {
|
|
20
|
+
groups?: TextureGroup[];
|
|
21
|
+
};
|
|
22
|
+
export type SizeAndGradeCardData = {
|
|
23
|
+
id: string;
|
|
24
|
+
title: string;
|
|
25
|
+
subtitle?: string;
|
|
26
|
+
items?: string[];
|
|
27
|
+
tone?: "filled" | "outlined";
|
|
28
|
+
};
|
|
29
|
+
export type SizeAndGradeData = {
|
|
30
|
+
summary?: string;
|
|
31
|
+
cards?: SizeAndGradeCardData[];
|
|
32
|
+
content?: React.ReactNode;
|
|
33
|
+
};
|
|
34
|
+
export type ProductInformationRange = {
|
|
35
|
+
id: string;
|
|
36
|
+
label: string;
|
|
37
|
+
details?: ProductDetailsData;
|
|
38
|
+
texture?: TextureData;
|
|
39
|
+
sizeAndGrade?: SizeAndGradeData;
|
|
40
|
+
};
|
|
41
|
+
export type ProductInformationSectionProps = {
|
|
42
|
+
ranges: ProductInformationRange[];
|
|
43
|
+
defaultTab?: ProductInformationTabKey;
|
|
44
|
+
defaultRangeId?: string;
|
|
45
|
+
className?: string;
|
|
46
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { BrandNavBarProps } from "../../organisms/navigation/BrandNavBarProps";
|
|
2
|
+
import type { TopNavBarProps } from "../../organisms/navigation/TopNavBarProps";
|
|
3
|
+
import type { FooterProps } from "../../organisms/footer/FooterProps";
|
|
4
|
+
import { ProductDetailPageTemplateProps } from "../../templates/productdetailpagetemplate/ProductDetailPageTemplateProps";
|
|
5
|
+
export type ProductDetailPageProps = {
|
|
6
|
+
brandNavBarProps: BrandNavBarProps;
|
|
7
|
+
topNavBarProps: TopNavBarProps;
|
|
8
|
+
productDetailPageTemplateProps: ProductDetailPageTemplateProps;
|
|
9
|
+
footerProps?: FooterProps;
|
|
10
|
+
};
|
package/dist/componentProps/templates/productdetailpagetemplate/ProductDetailPageTemplateProps.d.ts
ADDED
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
import { BreadcrumbsProps } from "../../molecules/selectors/breadcrumb/BreadcrumbsProps";
|
|
2
|
+
import { ProductInformationTabKey } from "../../organisms/section/productinformationsection/ProductInformationSectionProps";
|
|
3
|
+
export type ProductDetailSimpleOption = {
|
|
4
|
+
id: string;
|
|
5
|
+
label: string;
|
|
6
|
+
value: string;
|
|
7
|
+
code?: string;
|
|
8
|
+
title?: string;
|
|
9
|
+
widthIn?: string;
|
|
10
|
+
lengthIn?: string;
|
|
11
|
+
};
|
|
12
|
+
export type ProductDetailImage = {
|
|
13
|
+
id: string;
|
|
14
|
+
type?: string;
|
|
15
|
+
src: string;
|
|
16
|
+
alt?: string;
|
|
17
|
+
thumbnailSrc?: string;
|
|
18
|
+
thumbnailAlt?: string;
|
|
19
|
+
};
|
|
20
|
+
export type ProductDetailPrice = {
|
|
21
|
+
value: number;
|
|
22
|
+
label: string;
|
|
23
|
+
};
|
|
24
|
+
export type ProductDetailProduct = {
|
|
25
|
+
parentId?: string;
|
|
26
|
+
decor?: string;
|
|
27
|
+
collection?: string;
|
|
28
|
+
title?: string;
|
|
29
|
+
description?: string;
|
|
30
|
+
sku?: string;
|
|
31
|
+
patternRepeat?: string;
|
|
32
|
+
currency?: string;
|
|
33
|
+
price?: ProductDetailPrice;
|
|
34
|
+
};
|
|
35
|
+
export type ProductDetailContent = {
|
|
36
|
+
defaultPurchaseTab?: string;
|
|
37
|
+
defaultInfoTab?: ProductInformationTabKey;
|
|
38
|
+
defaultRangeId?: string;
|
|
39
|
+
availabilityLabel?: string;
|
|
40
|
+
availabilityHref?: string;
|
|
41
|
+
returnPolicyLabel?: string;
|
|
42
|
+
returnPolicyHref?: string;
|
|
43
|
+
notReturnableText?: string;
|
|
44
|
+
sampleDisclaimer?: string;
|
|
45
|
+
sampleSizeNote?: string;
|
|
46
|
+
};
|
|
47
|
+
export type ProductDetailDownloadLink = {
|
|
48
|
+
label?: string;
|
|
49
|
+
href?: string;
|
|
50
|
+
};
|
|
51
|
+
export type ProductDetailDownloads = {
|
|
52
|
+
swatch?: ProductDetailDownloadLink;
|
|
53
|
+
fullSheet?: ProductDetailDownloadLink;
|
|
54
|
+
};
|
|
55
|
+
export type ProductDetailTextureItem = {
|
|
56
|
+
key: string;
|
|
57
|
+
title: string;
|
|
58
|
+
imageSrc?: string;
|
|
59
|
+
imageAlt?: string;
|
|
60
|
+
description?: string;
|
|
61
|
+
};
|
|
62
|
+
export type ProductDetailTextureGroup = {
|
|
63
|
+
id: string;
|
|
64
|
+
title: string;
|
|
65
|
+
items: ProductDetailTextureItem[];
|
|
66
|
+
};
|
|
67
|
+
export type ProductDetailRange = {
|
|
68
|
+
id: string;
|
|
69
|
+
label: string;
|
|
70
|
+
details?: {
|
|
71
|
+
summary?: string;
|
|
72
|
+
content?: string;
|
|
73
|
+
};
|
|
74
|
+
texture?: {
|
|
75
|
+
groups?: ProductDetailTextureGroup[];
|
|
76
|
+
};
|
|
77
|
+
sizeAndGrade?: {
|
|
78
|
+
summary?: string;
|
|
79
|
+
cards?: Array<{
|
|
80
|
+
id: string;
|
|
81
|
+
title: string;
|
|
82
|
+
subtitle?: string;
|
|
83
|
+
tone?: "filled" | "outlined";
|
|
84
|
+
items: string[];
|
|
85
|
+
}>;
|
|
86
|
+
content?: string;
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
export type ProductDetailPurchaseTabOptionIds = {
|
|
90
|
+
productOptionIds?: string[];
|
|
91
|
+
textureOptionIds?: string[];
|
|
92
|
+
sizeOptionIds?: string[];
|
|
93
|
+
};
|
|
94
|
+
export type ProductDetailPurchase = {
|
|
95
|
+
defaults?: {
|
|
96
|
+
product?: string | null;
|
|
97
|
+
texture?: string | null;
|
|
98
|
+
size?: string | null;
|
|
99
|
+
quantity?: number;
|
|
100
|
+
minQuantity?: number;
|
|
101
|
+
maxQuantity?: number;
|
|
102
|
+
};
|
|
103
|
+
tabOptions?: {
|
|
104
|
+
Sample?: ProductDetailPurchaseTabOptionIds;
|
|
105
|
+
"Buy Now"?: ProductDetailPurchaseTabOptionIds;
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
export type ProductDetailVariant = {
|
|
109
|
+
id: string;
|
|
110
|
+
sku: string;
|
|
111
|
+
rangeId: string;
|
|
112
|
+
decor?: string;
|
|
113
|
+
title?: string;
|
|
114
|
+
textureId?: string;
|
|
115
|
+
thicknessId?: string;
|
|
116
|
+
sizeId?: string;
|
|
117
|
+
finish?: string;
|
|
118
|
+
grade?: string;
|
|
119
|
+
isWebEnabled?: boolean;
|
|
120
|
+
};
|
|
121
|
+
export type ProductDetailSizeAndGradeGuideRow = {
|
|
122
|
+
textureId?: string;
|
|
123
|
+
thicknessId?: string;
|
|
124
|
+
finish?: string;
|
|
125
|
+
grade?: string;
|
|
126
|
+
sizes?: Array<{
|
|
127
|
+
sizeId: string;
|
|
128
|
+
label: string;
|
|
129
|
+
skuIds?: string[];
|
|
130
|
+
}>;
|
|
131
|
+
};
|
|
132
|
+
export type ProductDetailStandardCopyHero = {
|
|
133
|
+
imageSrc?: string;
|
|
134
|
+
imageAlt?: string;
|
|
135
|
+
heading?: string;
|
|
136
|
+
subheading?: string;
|
|
137
|
+
body?: string;
|
|
138
|
+
linkLabel?: string;
|
|
139
|
+
linkHref?: string;
|
|
140
|
+
};
|
|
141
|
+
export type ProductDetailFeaturedProduct = {
|
|
142
|
+
id: string;
|
|
143
|
+
imageSrc: string;
|
|
144
|
+
imageAlt: string;
|
|
145
|
+
title: string;
|
|
146
|
+
brand: string;
|
|
147
|
+
decorNumber: string | number;
|
|
148
|
+
href?: string;
|
|
149
|
+
};
|
|
150
|
+
export type ProductDetailData = {
|
|
151
|
+
id?: string;
|
|
152
|
+
meta?: {
|
|
153
|
+
source?: string;
|
|
154
|
+
cacheKey?: string;
|
|
155
|
+
productType?: string;
|
|
156
|
+
};
|
|
157
|
+
product?: ProductDetailProduct;
|
|
158
|
+
content?: ProductDetailContent;
|
|
159
|
+
downloads?: ProductDetailDownloads;
|
|
160
|
+
images?: ProductDetailImage[];
|
|
161
|
+
ranges?: ProductDetailRange[];
|
|
162
|
+
optionSets?: {
|
|
163
|
+
purchaseTabs?: string[];
|
|
164
|
+
sampleSizes?: ProductDetailSimpleOption[];
|
|
165
|
+
ranges?: ProductDetailSimpleOption[];
|
|
166
|
+
thicknesses?: ProductDetailSimpleOption[];
|
|
167
|
+
textures?: ProductDetailSimpleOption[];
|
|
168
|
+
sizes?: ProductDetailSimpleOption[];
|
|
169
|
+
};
|
|
170
|
+
purchase?: ProductDetailPurchase;
|
|
171
|
+
variants?: ProductDetailVariant[];
|
|
172
|
+
sizeAndGradeGuide?: {
|
|
173
|
+
rows?: ProductDetailSizeAndGradeGuideRow[];
|
|
174
|
+
};
|
|
175
|
+
standardCopyHero?: ProductDetailStandardCopyHero;
|
|
176
|
+
featuredProducts?: ProductDetailFeaturedProduct[];
|
|
177
|
+
};
|
|
178
|
+
export type ProductDetailPageTemplateProps = {
|
|
179
|
+
breadcrumbsProps?: BreadcrumbsProps;
|
|
180
|
+
productData?: ProductDetailData;
|
|
181
|
+
onDownloadSwatch?: (data: ProductDetailData) => void;
|
|
182
|
+
onDownloadFullSheet?: (data: ProductDetailData) => void;
|
|
183
|
+
onAddToWishlist?: (payload: {
|
|
184
|
+
sku?: string;
|
|
185
|
+
decor?: string;
|
|
186
|
+
}, data: ProductDetailData) => void;
|
|
187
|
+
onAddToCart?: (order: {
|
|
188
|
+
type: string;
|
|
189
|
+
sku?: string;
|
|
190
|
+
decor?: string;
|
|
191
|
+
product: string | null;
|
|
192
|
+
texture: string | null;
|
|
193
|
+
size: string | null;
|
|
194
|
+
quantity: number;
|
|
195
|
+
priceValue?: number;
|
|
196
|
+
priceLabel?: string;
|
|
197
|
+
currency?: string;
|
|
198
|
+
}, data: ProductDetailData) => void;
|
|
199
|
+
onNavigate?: (href: string) => void;
|
|
200
|
+
};
|