formica-ui-lib 1.0.213 → 1.0.215
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/cards/locationcard/LocationCardProps.d.ts +53 -0
- package/dist/componentProps/organisms/banners/wheretobuysearchbanner/WhereToBuySearchBannerProps.d.ts +21 -0
- package/dist/componentProps/organisms/collections/featurecardcollection/FeatureCardCollectionProps.d.ts +2 -0
- package/dist/componentProps/organisms/collections/locationcardcollection/LocationCardCollectionProps.d.ts +16 -0
- package/dist/componentProps/organisms/sections/locationmap/LocationMapProps.d.ts +14 -0
- package/dist/componentProps/templates/categorypagetemplate/CategoryPageTemplateProps.d.ts +3 -3
- package/dist/componentProps/templates/productdetailpagetemplate/ProductDetailPageTemplateProps.d.ts +2 -0
- package/dist/componentProps/templates/wheretobuytemplate/WhereToBuyTemplateProps.d.ts +63 -0
- package/dist/index.cjs +8 -8
- package/dist/index.d.ts +11 -0
- package/dist/index.js +1534 -1151
- package/dist/stories/molecules/cards/locationcard/LocationCard.d.ts +4 -0
- package/dist/stories/molecules/cards/locationcard/LocationCard.test.d.ts +1 -0
- package/dist/stories/organisms/banners/wheretobuysearchbanner/WhereToBuySearchBanner.d.ts +4 -0
- package/dist/stories/organisms/banners/wheretobuysearchbanner/WhereToBuySearchBanner.test.d.ts +1 -0
- package/dist/stories/organisms/collections/locationcardcollection/LocationCardCollection.d.ts +4 -0
- package/dist/stories/organisms/collections/locationcardcollection/LocationCardCollection.test.d.ts +1 -0
- package/dist/stories/organisms/sections/locationmap/LocationMap.d.ts +4 -0
- package/dist/stories/organisms/sections/locationmap/LocationMap.test.d.ts +1 -0
- package/dist/stories/templates/wheretobuytemplate/WhereToBuyTemplate.d.ts +4 -0
- package/dist/stories/templates/wheretobuytemplate/WhereToBuyTemplate.test.d.ts +1 -0
- package/dist/tailwind.css +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
export type WhereToBuyLocationType = "distributor" | "sales-rep" | "retailer";
|
|
2
|
+
export type WhereToBuyLocationAddress = {
|
|
3
|
+
lines: string[];
|
|
4
|
+
city: string;
|
|
5
|
+
region: string;
|
|
6
|
+
postalCode: string;
|
|
7
|
+
country?: string;
|
|
8
|
+
};
|
|
9
|
+
export type WhereToBuyLocationCoordinates = {
|
|
10
|
+
lat: number;
|
|
11
|
+
lng: number;
|
|
12
|
+
};
|
|
13
|
+
export type WhereToBuyLocationDistance = {
|
|
14
|
+
value: number;
|
|
15
|
+
unit: "mi" | "km";
|
|
16
|
+
label?: string;
|
|
17
|
+
};
|
|
18
|
+
export type WhereToBuyStockedProduct = {
|
|
19
|
+
id: string;
|
|
20
|
+
label: string;
|
|
21
|
+
};
|
|
22
|
+
export type WhereToBuyLocation = {
|
|
23
|
+
id: string;
|
|
24
|
+
externalId?: string;
|
|
25
|
+
type: WhereToBuyLocationType;
|
|
26
|
+
name: string;
|
|
27
|
+
address: WhereToBuyLocationAddress;
|
|
28
|
+
websiteUrl?: string;
|
|
29
|
+
phone?: string;
|
|
30
|
+
phoneHref?: string;
|
|
31
|
+
email?: string;
|
|
32
|
+
emailHref?: string;
|
|
33
|
+
coordinates: WhereToBuyLocationCoordinates;
|
|
34
|
+
stockedProducts: WhereToBuyStockedProduct[];
|
|
35
|
+
distance?: WhereToBuyLocationDistance;
|
|
36
|
+
isPreferred?: boolean;
|
|
37
|
+
directionsUrl?: string;
|
|
38
|
+
};
|
|
39
|
+
export type LocationCardActionPayload = {
|
|
40
|
+
location: WhereToBuyLocation;
|
|
41
|
+
href?: string;
|
|
42
|
+
};
|
|
43
|
+
export type LocationCardProps = {
|
|
44
|
+
location: WhereToBuyLocation;
|
|
45
|
+
stockedProductsLabel?: string;
|
|
46
|
+
preferredLabel?: string;
|
|
47
|
+
websiteLabel?: string;
|
|
48
|
+
directionsLabel?: string;
|
|
49
|
+
onWebsiteClick?: (payload: LocationCardActionPayload) => void;
|
|
50
|
+
onDirectionsClick?: (payload: LocationCardActionPayload) => void;
|
|
51
|
+
onPhoneClick?: (payload: LocationCardActionPayload) => void;
|
|
52
|
+
onEmailClick?: (payload: LocationCardActionPayload) => void;
|
|
53
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { DropdownProps } from "../../../atoms/dropdown/DropdownProps";
|
|
2
|
+
import type { SearchBarProps } from "../../../molecules/searchbar/SearchBarProps";
|
|
3
|
+
export type WhereToBuyProductDropdownProps = Omit<DropdownProps, "onChange" | "onBlur">;
|
|
4
|
+
export type WhereToBuySearchInputProps = Omit<SearchBarProps, "onChange" | "onBlur" | "onFocus">;
|
|
5
|
+
export type WhereToBuySearchSubmitPayload = {
|
|
6
|
+
productValue: string;
|
|
7
|
+
searchValue: string;
|
|
8
|
+
};
|
|
9
|
+
export type WhereToBuyProductChangePayload = {
|
|
10
|
+
productValue: string;
|
|
11
|
+
};
|
|
12
|
+
export type WhereToBuySearchBannerProps = {
|
|
13
|
+
imageSrc: string;
|
|
14
|
+
imageAlt?: string;
|
|
15
|
+
heading: string;
|
|
16
|
+
productDropdownProps?: WhereToBuyProductDropdownProps;
|
|
17
|
+
searchInputProps: WhereToBuySearchInputProps;
|
|
18
|
+
searchButtonLabel?: string;
|
|
19
|
+
onProductChange?: (payload: WhereToBuyProductChangePayload) => void;
|
|
20
|
+
onSearchSubmit?: (payload: WhereToBuySearchSubmitPayload) => void;
|
|
21
|
+
};
|
|
@@ -4,10 +4,12 @@ export type FeatureCardCollectionFooterButtonPayload = {
|
|
|
4
4
|
buttonLabel: string;
|
|
5
5
|
buttonHref?: string;
|
|
6
6
|
};
|
|
7
|
+
export type FeatureCardCollectionSpacing = "default" | "underBanner";
|
|
7
8
|
export type FeatureCardCollectionProps = {
|
|
8
9
|
title?: string;
|
|
9
10
|
body?: string;
|
|
10
11
|
cards?: FeatureCardCollectionItem[];
|
|
12
|
+
spacing?: FeatureCardCollectionSpacing;
|
|
11
13
|
footerBlurb?: string;
|
|
12
14
|
footerButtonLabel?: string;
|
|
13
15
|
footerButtonHref?: string;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ContentGridColumns } from "../../../atoms/layout/ContentGridProps";
|
|
2
|
+
import type { LocationCardActionPayload, WhereToBuyLocation } from "../../../molecules/cards/locationcard/LocationCardProps";
|
|
3
|
+
export type LocationCardCollectionDesktopColumns = Extract<ContentGridColumns, 2 | 3 | 4>;
|
|
4
|
+
export type LocationCardCollectionProps = {
|
|
5
|
+
locations: WhereToBuyLocation[];
|
|
6
|
+
selectedLocationId?: string;
|
|
7
|
+
desktopColumns?: LocationCardCollectionDesktopColumns;
|
|
8
|
+
stockedProductsLabel?: string;
|
|
9
|
+
preferredLabel?: string;
|
|
10
|
+
websiteLabel?: string;
|
|
11
|
+
directionsLabel?: string;
|
|
12
|
+
onWebsiteClick?: (payload: LocationCardActionPayload) => void;
|
|
13
|
+
onDirectionsClick?: (payload: LocationCardActionPayload) => void;
|
|
14
|
+
onPhoneClick?: (payload: LocationCardActionPayload) => void;
|
|
15
|
+
onEmailClick?: (payload: LocationCardActionPayload) => void;
|
|
16
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { WhereToBuyLocation, WhereToBuyLocationCoordinates } from "../../../molecules/cards/locationcard/LocationCardProps";
|
|
2
|
+
export type LocationMapMarkerClickPayload = {
|
|
3
|
+
location: WhereToBuyLocation;
|
|
4
|
+
};
|
|
5
|
+
export type LocationMapProps = {
|
|
6
|
+
googleMapsApiKey?: string;
|
|
7
|
+
mapId?: string;
|
|
8
|
+
locations: WhereToBuyLocation[];
|
|
9
|
+
center?: WhereToBuyLocationCoordinates;
|
|
10
|
+
zoom?: number;
|
|
11
|
+
selectedLocationId?: string;
|
|
12
|
+
legendLabel?: string;
|
|
13
|
+
onLocationSelect?: (payload: LocationMapMarkerClickPayload) => void;
|
|
14
|
+
};
|
|
@@ -38,7 +38,7 @@ export type CategoryPageFilterLabels = {
|
|
|
38
38
|
};
|
|
39
39
|
export type CategoryPageData = {
|
|
40
40
|
hero: StandardCopyHeroProps;
|
|
41
|
-
tabs
|
|
41
|
+
tabs?: {
|
|
42
42
|
options: MultiButtonBarOption[];
|
|
43
43
|
selectedValue?: string;
|
|
44
44
|
};
|
|
@@ -52,8 +52,8 @@ export type CategoryPageData = {
|
|
|
52
52
|
mobileLabel?: string;
|
|
53
53
|
className?: string;
|
|
54
54
|
};
|
|
55
|
-
sort
|
|
56
|
-
search
|
|
55
|
+
sort?: Omit<DropdownProps, "onChange" | "onBlur">;
|
|
56
|
+
search?: Omit<SearchBarProps, "onChange" | "onBlur" | "onFocus">;
|
|
57
57
|
panel?: CategoryPageFilterPanelData;
|
|
58
58
|
};
|
|
59
59
|
decorGrid: {
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import type { LocationCardActionPayload, WhereToBuyLocation } from "../../molecules/cards/locationcard/LocationCardProps";
|
|
2
|
+
import type { WhereToBuyProductChangePayload, WhereToBuyProductDropdownProps, WhereToBuySearchInputProps, WhereToBuySearchSubmitPayload } from "../../organisms/banners/wheretobuysearchbanner/WhereToBuySearchBannerProps";
|
|
3
|
+
import type { LocationMapMarkerClickPayload } from "../../organisms/sections/locationmap/LocationMapProps";
|
|
4
|
+
import type { LocationCardCollectionDesktopColumns } from "../../organisms/collections/locationcardcollection/LocationCardCollectionProps";
|
|
5
|
+
export type WhereToBuyTabOption = {
|
|
6
|
+
label: string;
|
|
7
|
+
value?: string;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
};
|
|
10
|
+
export type WhereToBuyTabSelectPayload = {
|
|
11
|
+
label: string;
|
|
12
|
+
value?: string;
|
|
13
|
+
};
|
|
14
|
+
export type WhereToBuyTemplateData = {
|
|
15
|
+
banner: {
|
|
16
|
+
imageSrc: string;
|
|
17
|
+
imageAlt?: string;
|
|
18
|
+
heading: string;
|
|
19
|
+
productDropdownProps: WhereToBuyProductDropdownProps;
|
|
20
|
+
searchInputProps: WhereToBuySearchInputProps;
|
|
21
|
+
searchButtonLabel?: string;
|
|
22
|
+
};
|
|
23
|
+
tabs: {
|
|
24
|
+
options: WhereToBuyTabOption[];
|
|
25
|
+
selectedValue?: string;
|
|
26
|
+
};
|
|
27
|
+
map: {
|
|
28
|
+
googleMapsApiKey?: string;
|
|
29
|
+
mapId?: string;
|
|
30
|
+
center?: {
|
|
31
|
+
lat: number;
|
|
32
|
+
lng: number;
|
|
33
|
+
};
|
|
34
|
+
zoom?: number;
|
|
35
|
+
selectedLocationId?: string;
|
|
36
|
+
legendLabel?: string;
|
|
37
|
+
};
|
|
38
|
+
locations: WhereToBuyLocation[];
|
|
39
|
+
results: {
|
|
40
|
+
selectedLocationId?: string;
|
|
41
|
+
desktopColumns?: LocationCardCollectionDesktopColumns;
|
|
42
|
+
stockedProductsLabel?: string;
|
|
43
|
+
preferredLabel?: string;
|
|
44
|
+
websiteLabel?: string;
|
|
45
|
+
directionsLabel?: string;
|
|
46
|
+
};
|
|
47
|
+
emptyState?: {
|
|
48
|
+
heading?: string;
|
|
49
|
+
body?: string;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
export type WhereToBuyTemplateProps = {
|
|
53
|
+
data: WhereToBuyTemplateData;
|
|
54
|
+
className?: string;
|
|
55
|
+
onProductChange?: (payload: WhereToBuyProductChangePayload, data: WhereToBuyTemplateData) => void;
|
|
56
|
+
onSearchSubmit?: (payload: WhereToBuySearchSubmitPayload, data: WhereToBuyTemplateData) => void;
|
|
57
|
+
onTabChange?: (payload: WhereToBuyTabSelectPayload, data: WhereToBuyTemplateData) => void;
|
|
58
|
+
onLocationSelect?: (payload: LocationMapMarkerClickPayload, data: WhereToBuyTemplateData) => void;
|
|
59
|
+
onWebsiteClick?: (payload: LocationCardActionPayload, data: WhereToBuyTemplateData) => void;
|
|
60
|
+
onDirectionsClick?: (payload: LocationCardActionPayload, data: WhereToBuyTemplateData) => void;
|
|
61
|
+
onPhoneClick?: (payload: LocationCardActionPayload, data: WhereToBuyTemplateData) => void;
|
|
62
|
+
onEmailClick?: (payload: LocationCardActionPayload, data: WhereToBuyTemplateData) => void;
|
|
63
|
+
};
|