@asante-org/leybold-design-system 1.2.0
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 +163 -0
- package/dist/.next/types/app/layout.d.ts +9 -0
- package/dist/.next/types/app/page.d.ts +9 -0
- package/dist/.storybook/algoliaProvider.d.ts +42 -0
- package/dist/assets/.gitkeep +2 -0
- package/dist/assets/ai-banner-desktop.png +0 -0
- package/dist/assets/ai-banner-mobile.png +0 -0
- package/dist/assets/carousel-card.png +0 -0
- package/dist/assets/desktop-layout-alt.svg +27 -0
- package/dist/assets/desktop-layout.svg +29 -0
- package/dist/assets/globe.svg +7 -0
- package/dist/assets/language-selector-bg.png +0 -0
- package/dist/assets/leybold-footer-logo.svg +19 -0
- package/dist/assets/leybold-white.svg +19 -0
- package/dist/assets/list-card-alt.png +0 -0
- package/dist/assets/list-card.png +0 -0
- package/dist/assets/list-link-a.png +0 -0
- package/dist/assets/list-link-b.png +0 -0
- package/dist/assets/list-link-c.png +0 -0
- package/dist/assets/list-product-overlay-tip-active.svg +3 -0
- package/dist/assets/list-product-overlay-tip.svg +3 -0
- package/dist/assets/list-product.png +0 -0
- package/dist/assets/logo-example.svg +9 -0
- package/dist/assets/logo.svg +19 -0
- package/dist/assets/phone-layout.svg +14 -0
- package/dist/assets/red-tip.svg +10 -0
- package/dist/assets/search-product.png +0 -0
- package/dist/assets/tablet-layout.svg +28 -0
- package/dist/fonts/calibri.ttf +0 -0
- package/dist/fonts/calibrib.ttf +0 -0
- package/dist/fonts/calibril.ttf +0 -0
- package/dist/index.esm.js +2859 -0
- package/dist/index.esm.js.map +1 -0
- package/dist/index.esm.scss +5602 -0
- package/dist/index.js +2858 -0
- package/dist/index.js.map +1 -0
- package/dist/index.scss +5602 -0
- package/dist/src/app/layout.d.ts +9 -0
- package/dist/src/app/page.d.ts +2 -0
- package/dist/src/components/AIBanner/AIBanner.d.ts +15 -0
- package/dist/src/components/AIBanner/AIBanner.stories.d.ts +7 -0
- package/dist/src/components/AIBanner/index.d.ts +2 -0
- package/dist/src/components/Button/Button.d.ts +80 -0
- package/dist/src/components/Button/Button.stories.d.ts +25 -0
- package/dist/src/components/Button/index.d.ts +2 -0
- package/dist/src/components/ContentCardHorizontal/ContentCardHorizontal.d.ts +3 -0
- package/dist/src/components/ContentCardHorizontal/ContentCardHorizontal.stories.d.ts +10 -0
- package/dist/src/components/ContentCardHorizontal/index.d.ts +2 -0
- package/dist/src/components/Filters/AppliedFilterTag.d.ts +27 -0
- package/dist/src/components/Filters/AppliedFilters.d.ts +24 -0
- package/dist/src/components/Filters/Filter.types.d.ts +204 -0
- package/dist/src/components/Filters/FilterAccordion.d.ts +6 -0
- package/dist/src/components/Filters/FilterItem.d.ts +6 -0
- package/dist/src/components/Filters/FilterSearch.d.ts +6 -0
- package/dist/src/components/Filters/Filters.stories.d.ts +24 -0
- package/dist/src/components/Filters/FiltersPanel.d.ts +10 -0
- package/dist/src/components/Filters/index.d.ts +7 -0
- package/dist/src/components/Image/Image.d.ts +4 -0
- package/dist/src/components/Image/Image.stories.d.ts +16 -0
- package/dist/src/components/Image/Image.types.d.ts +34 -0
- package/dist/src/components/Image/index.d.ts +2 -0
- package/dist/src/components/InstantResults/FederatedInstantResultsLayout.d.ts +3 -0
- package/dist/src/components/InstantResults/FederatedInstantResultsLayout.stories.d.ts +13 -0
- package/dist/src/components/InstantResults/index.d.ts +9 -0
- package/dist/src/components/LanguageSelector/LanguageSelector.d.ts +7 -0
- package/dist/src/components/LanguageSelector/LanguageSelector.stories.d.ts +32 -0
- package/dist/src/components/LanguageSelector/LanguageSelector.types.d.ts +64 -0
- package/dist/src/components/LanguageSelector/LanguageSelectorLink.d.ts +20 -0
- package/dist/src/components/LanguageSelector/LocationDropdown.d.ts +6 -0
- package/dist/src/components/LanguageSelector/LocationSelectorLink.d.ts +20 -0
- package/dist/src/components/LanguageSelector/index.d.ts +7 -0
- package/dist/src/components/Pagination/Pagination.d.ts +3 -0
- package/dist/src/components/Pagination/Pagination.stories.d.ts +16 -0
- package/dist/src/components/Pagination/Pagination.types.d.ts +98 -0
- package/dist/src/components/Pagination/PaginationButton.d.ts +3 -0
- package/dist/src/components/Pagination/PaginationEllipsis.d.ts +3 -0
- package/dist/src/components/Pagination/PaginationItem.d.ts +3 -0
- package/dist/src/components/Pagination/index.d.ts +5 -0
- package/dist/src/components/ProductCardDetails/ProductCardDetails.d.ts +4 -0
- package/dist/src/components/ProductCardDetails/ProductCardDetails.stories.d.ts +10 -0
- package/dist/src/components/ProductCardDetails/index.d.ts +2 -0
- package/dist/src/components/ProductCardHorizontal/ProductCardHorizontal.d.ts +4 -0
- package/dist/src/components/ProductCardHorizontal/ProductCardHorizontal.stories.d.ts +11 -0
- package/dist/src/components/ProductCardHorizontal/index.d.ts +2 -0
- package/dist/src/components/ProductCardVertical/ProductCardVertical.d.ts +22 -0
- package/dist/src/components/ProductCardVertical/ProductCardVertical.types.d.ts +50 -0
- package/dist/src/components/ProductCardVertical/index.d.ts +2 -0
- package/dist/src/components/ResultsColumn/ResultsColumn.d.ts +3 -0
- package/dist/src/components/ResultsColumn/index.d.ts +2 -0
- package/dist/src/components/ResultsCount/ResultsCount.d.ts +7 -0
- package/dist/src/components/ResultsCount/index.d.ts +2 -0
- package/dist/src/components/ResultsView/FederatedResultsView.d.ts +3 -0
- package/dist/src/components/ResultsView/FederatedResultsView.stories.d.ts +11 -0
- package/dist/src/components/ResultsView/ResultsList.d.ts +3 -0
- package/dist/src/components/ResultsView/index.d.ts +3 -0
- package/dist/src/components/SearchBar/SearchBar.d.ts +3 -0
- package/dist/src/components/SearchBar/SearchBar.stories.d.ts +9 -0
- package/dist/src/components/SearchBar/SearchIcon.d.ts +5 -0
- package/dist/src/components/SearchBar/SearchInput.d.ts +10 -0
- package/dist/src/components/SearchBar/SearchSubmitButton.d.ts +10 -0
- package/dist/src/components/SearchBar/index.d.ts +8 -0
- package/dist/src/components/SearchModal/ModalCloseButton.d.ts +7 -0
- package/dist/src/components/SearchModal/SearchModal.d.ts +3 -0
- package/dist/src/components/SearchModal/SearchModal.stories.d.ts +8 -0
- package/dist/src/components/SearchModal/index.d.ts +4 -0
- package/dist/src/components/SearchTriggerButton/SearchTriggerButton.d.ts +3 -0
- package/dist/src/components/SearchTriggerButton/SearchTriggerButton.stories.d.ts +8 -0
- package/dist/src/components/SearchTriggerButton/index.d.ts +2 -0
- package/dist/src/components/SeeAllLinkButton/SeeAllLinkButton.d.ts +7 -0
- package/dist/src/components/SeeAllLinkButton/index.d.ts +2 -0
- package/dist/src/experience/Carousel/Carousel.d.ts +36 -0
- package/dist/src/experience/Carousel/Carousel.stories.d.ts +7 -0
- package/dist/src/experience/Carousel/index.d.ts +2 -0
- package/dist/src/experience/Footer/Footer.d.ts +201 -0
- package/dist/src/experience/Footer/Footer.stories.d.ts +28 -0
- package/dist/src/experience/Footer/icons/AtlasCopcoIcon.d.ts +10 -0
- package/dist/src/experience/Footer/icons/ExternalLinkIcon.d.ts +10 -0
- package/dist/src/experience/Footer/icons/index.d.ts +2 -0
- package/dist/src/experience/Footer/index.d.ts +2 -0
- package/dist/src/experience/GeneratedList/GeneratedList.d.ts +40 -0
- package/dist/src/experience/GeneratedList/GeneratedList.stories.d.ts +7 -0
- package/dist/src/experience/GeneratedList/GeneratedList.types.d.ts +131 -0
- package/dist/src/experience/GeneratedList/GeneratedListExternalLink.stories.d.ts +7 -0
- package/dist/src/experience/GeneratedList/GeneratedListList.stories.d.ts +9 -0
- package/dist/src/experience/GeneratedList/GeneratedListProduct.stories.d.ts +7 -0
- package/dist/src/experience/GeneratedList/_Card.d.ts +8 -0
- package/dist/src/experience/GeneratedList/_CardMobile.d.ts +8 -0
- package/dist/src/experience/GeneratedList/_ExternalLink.d.ts +8 -0
- package/dist/src/experience/GeneratedList/_List.d.ts +8 -0
- package/dist/src/experience/GeneratedList/_Product.d.ts +9 -0
- package/dist/src/experience/GeneratedList/index.d.ts +2 -0
- package/dist/src/experience/Header/Header.d.ts +20 -0
- package/dist/src/experience/Header/Header.stories.d.ts +9 -0
- package/dist/src/experience/Header/HeaderNavButton.d.ts +9 -0
- package/dist/src/experience/Header/MegaMenu.d.ts +10 -0
- package/dist/src/experience/Header/MenuLink.d.ts +8 -0
- package/dist/src/experience/Header/MobileHeader.stories.d.ts +6 -0
- package/dist/src/experience/Header/MobileMenu.d.ts +9 -0
- package/dist/src/experience/Header/MobileNavBar.d.ts +13 -0
- package/dist/src/experience/Header/index.d.ts +6 -0
- package/dist/src/experience/algolia-dynamic-search/AlgoliaDynamicSearch.d.ts +4 -0
- package/dist/src/experience/algolia-dynamic-search/AlgoliaDynamicSearch.stories.d.ts +7 -0
- package/dist/src/experience/algolia-dynamic-search/index.d.ts +3 -0
- package/dist/src/experience/federated-search/FederatedSearchExperience.d.ts +39 -0
- package/dist/src/experience/federated-search/FederatedSearchExperience.stories.d.ts +10 -0
- package/dist/src/experience/federated-search/FederatedSearchWithAlgolia.stories.d.ts +7 -0
- package/dist/src/experience/federated-search/components/AssistanceBanner/AssistanceBanner.d.ts +22 -0
- package/dist/src/experience/federated-search/components/AssistanceBanner/AssistanceBanner.types.d.ts +29 -0
- package/dist/src/experience/federated-search/components/AssistanceBanner/AssistanceIcon.d.ts +2 -0
- package/dist/src/experience/federated-search/components/AssistanceBanner/index.d.ts +3 -0
- package/dist/src/experience/federated-search/components/FilterDrawer/FilterDrawer.d.ts +24 -0
- package/dist/src/experience/federated-search/components/FilterDrawer/FilterDrawer.types.d.ts +22 -0
- package/dist/src/experience/federated-search/components/FilterDrawer/index.d.ts +2 -0
- package/dist/src/experience/federated-search/components/TabButton/TabButton.d.ts +31 -0
- package/dist/src/experience/federated-search/components/TabButton/TabButton.types.d.ts +32 -0
- package/dist/src/experience/federated-search/components/TabButton/index.d.ts +2 -0
- package/dist/src/experience/federated-search/index.d.ts +2 -0
- package/dist/src/experience/qr-form-journey/QrFormJourney.d.ts +3 -0
- package/dist/src/experience/qr-form-journey/QrFormJourney.stories.d.ts +8 -0
- package/dist/src/experience/qr-form-journey/index.d.ts +1 -0
- package/dist/src/hooks/useFederatedSearchMock.d.ts +36 -0
- package/dist/src/index.d.ts +29 -0
- package/dist/src/stories/foundation/Buttons/ButtonComponents.d.ts +56 -0
- package/dist/src/stories/foundation/Typography/TypographyComponents.d.ts +46 -0
- package/dist/src/stories/foundation/_components/StoryLayout.d.ts +11 -0
- package/dist/src/types/buttons.d.ts +4 -0
- package/dist/src/types/cards.d.ts +50 -0
- package/dist/src/types/search.d.ts +139 -0
- package/dist/src/utils/styles/index.d.ts +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +115 -0
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface FooterLinkItem {
|
|
3
|
+
/**
|
|
4
|
+
* Link text label
|
|
5
|
+
*/
|
|
6
|
+
label: string;
|
|
7
|
+
/**
|
|
8
|
+
* Link URL
|
|
9
|
+
*/
|
|
10
|
+
href: string;
|
|
11
|
+
/**
|
|
12
|
+
* Whether this is an external link (shows external icon)
|
|
13
|
+
*/
|
|
14
|
+
external?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Optional click handler (useful for cookie settings etc.)
|
|
17
|
+
*/
|
|
18
|
+
onClick?: () => void;
|
|
19
|
+
}
|
|
20
|
+
export interface SocialLinkItem {
|
|
21
|
+
/**
|
|
22
|
+
* Social media platform
|
|
23
|
+
*/
|
|
24
|
+
platform: 'facebook' | 'x' | 'linkedin' | 'youtube' | 'instagram';
|
|
25
|
+
/**
|
|
26
|
+
* Link URL
|
|
27
|
+
*/
|
|
28
|
+
href: string;
|
|
29
|
+
/**
|
|
30
|
+
* Accessible label for screen readers
|
|
31
|
+
*/
|
|
32
|
+
ariaLabel: string;
|
|
33
|
+
}
|
|
34
|
+
export interface FooterLogoProps {
|
|
35
|
+
/**
|
|
36
|
+
* Logo image source URL
|
|
37
|
+
*/
|
|
38
|
+
src: string;
|
|
39
|
+
/**
|
|
40
|
+
* Logo alt text
|
|
41
|
+
*/
|
|
42
|
+
alt: string;
|
|
43
|
+
/**
|
|
44
|
+
* Optional link URL for logo
|
|
45
|
+
*/
|
|
46
|
+
href?: string;
|
|
47
|
+
}
|
|
48
|
+
export interface FooterProps {
|
|
49
|
+
/**
|
|
50
|
+
* Layout variant - 'desktop' (logo top) or 'mobile' (logo bottom)
|
|
51
|
+
*/
|
|
52
|
+
variant?: 'desktop' | 'mobile';
|
|
53
|
+
/**
|
|
54
|
+
* Logo configuration
|
|
55
|
+
*/
|
|
56
|
+
logo: FooterLogoProps;
|
|
57
|
+
/**
|
|
58
|
+
* Brand motto/tagline
|
|
59
|
+
*/
|
|
60
|
+
motto: string;
|
|
61
|
+
/**
|
|
62
|
+
* Atlas Copco badge configuration
|
|
63
|
+
*/
|
|
64
|
+
atlasCopcoBadge?: {
|
|
65
|
+
text: string;
|
|
66
|
+
showIcon?: boolean;
|
|
67
|
+
};
|
|
68
|
+
/**
|
|
69
|
+
* Quick links section
|
|
70
|
+
*/
|
|
71
|
+
quickLinks: FooterLinkItem[];
|
|
72
|
+
/**
|
|
73
|
+
* Quick links section heading
|
|
74
|
+
*/
|
|
75
|
+
quickLinksHeading?: string;
|
|
76
|
+
/**
|
|
77
|
+
* Contact links section
|
|
78
|
+
*/
|
|
79
|
+
contactLinks: FooterLinkItem[];
|
|
80
|
+
/**
|
|
81
|
+
* Contact section heading
|
|
82
|
+
*/
|
|
83
|
+
contactHeading?: string;
|
|
84
|
+
/**
|
|
85
|
+
* Social media links
|
|
86
|
+
*/
|
|
87
|
+
socialLinks: SocialLinkItem[];
|
|
88
|
+
/**
|
|
89
|
+
* Contact form CTA button (mobile only)
|
|
90
|
+
*/
|
|
91
|
+
contactFormButton?: {
|
|
92
|
+
label: string;
|
|
93
|
+
href: string;
|
|
94
|
+
};
|
|
95
|
+
/**
|
|
96
|
+
* Bottom navigation links
|
|
97
|
+
*/
|
|
98
|
+
bottomLinks: FooterLinkItem[];
|
|
99
|
+
/**
|
|
100
|
+
* Copyright text
|
|
101
|
+
*/
|
|
102
|
+
copyright: string;
|
|
103
|
+
/**
|
|
104
|
+
* Country selector configuration
|
|
105
|
+
*/
|
|
106
|
+
countrySelector?: {
|
|
107
|
+
label: string;
|
|
108
|
+
href?: string;
|
|
109
|
+
showIcon?: boolean;
|
|
110
|
+
};
|
|
111
|
+
/**
|
|
112
|
+
* Additional CSS classes
|
|
113
|
+
*/
|
|
114
|
+
className?: string;
|
|
115
|
+
}
|
|
116
|
+
export interface FooterLinkProps {
|
|
117
|
+
/**
|
|
118
|
+
* Link item data
|
|
119
|
+
*/
|
|
120
|
+
item: FooterLinkItem;
|
|
121
|
+
/**
|
|
122
|
+
* Additional CSS classes
|
|
123
|
+
*/
|
|
124
|
+
className?: string;
|
|
125
|
+
/**
|
|
126
|
+
* Variant style
|
|
127
|
+
*/
|
|
128
|
+
variant?: 'default' | 'bottom';
|
|
129
|
+
}
|
|
130
|
+
export declare const FooterLink: React.FC<FooterLinkProps>;
|
|
131
|
+
export interface FooterLinkGroupProps {
|
|
132
|
+
/**
|
|
133
|
+
* Section heading
|
|
134
|
+
*/
|
|
135
|
+
heading: string;
|
|
136
|
+
/**
|
|
137
|
+
* Array of links
|
|
138
|
+
*/
|
|
139
|
+
links: FooterLinkItem[];
|
|
140
|
+
/**
|
|
141
|
+
* Additional CSS classes
|
|
142
|
+
*/
|
|
143
|
+
className?: string;
|
|
144
|
+
/**
|
|
145
|
+
* Children to render after links (e.g., social icons)
|
|
146
|
+
*/
|
|
147
|
+
children?: React.ReactNode;
|
|
148
|
+
}
|
|
149
|
+
export declare const FooterLinkGroup: React.FC<FooterLinkGroupProps>;
|
|
150
|
+
export interface FooterSocialIconsProps {
|
|
151
|
+
/**
|
|
152
|
+
* Array of social links
|
|
153
|
+
*/
|
|
154
|
+
links: SocialLinkItem[];
|
|
155
|
+
/**
|
|
156
|
+
* Additional CSS classes
|
|
157
|
+
*/
|
|
158
|
+
className?: string;
|
|
159
|
+
}
|
|
160
|
+
export declare const FooterSocialIcons: React.FC<FooterSocialIconsProps>;
|
|
161
|
+
export interface FooterSocialIconProps {
|
|
162
|
+
/**
|
|
163
|
+
* Social media platform
|
|
164
|
+
*/
|
|
165
|
+
platform: SocialLinkItem['platform'];
|
|
166
|
+
/**
|
|
167
|
+
* Additional CSS classes
|
|
168
|
+
*/
|
|
169
|
+
className?: string;
|
|
170
|
+
}
|
|
171
|
+
export declare const FooterSocialIcon: React.FC<FooterSocialIconProps>;
|
|
172
|
+
export interface FooterBottomProps {
|
|
173
|
+
/**
|
|
174
|
+
* Bottom navigation links
|
|
175
|
+
*/
|
|
176
|
+
links: FooterLinkItem[];
|
|
177
|
+
/**
|
|
178
|
+
* Copyright text
|
|
179
|
+
*/
|
|
180
|
+
copyright: string;
|
|
181
|
+
/**
|
|
182
|
+
* Country selector configuration
|
|
183
|
+
*/
|
|
184
|
+
countrySelector?: {
|
|
185
|
+
label: string;
|
|
186
|
+
href?: string;
|
|
187
|
+
showIcon?: boolean;
|
|
188
|
+
};
|
|
189
|
+
/**
|
|
190
|
+
* Additional CSS classes
|
|
191
|
+
*/
|
|
192
|
+
className?: string;
|
|
193
|
+
}
|
|
194
|
+
export declare const FooterBottom: React.FC<FooterBottomProps>;
|
|
195
|
+
/**
|
|
196
|
+
* Footer component with brand identity, navigation links, social icons, and legal information.
|
|
197
|
+
* Supports two layout variants:
|
|
198
|
+
* - desktop: Logo at top, 3-column main content
|
|
199
|
+
* - mobile: Logo at bottom, stacked layout with CTA button
|
|
200
|
+
*/
|
|
201
|
+
export declare const Footer: React.FC<FooterProps>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { Footer } from './Footer';
|
|
3
|
+
declare const meta: Meta<typeof Footer>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Footer>;
|
|
6
|
+
/**
|
|
7
|
+
* Desktop footer layout with logo at top, 3-column main content area.
|
|
8
|
+
* - Left column: Motto + Atlas Copco badge
|
|
9
|
+
* - Middle column: Quick links (6 items including Leybold blog)
|
|
10
|
+
* - Right column: Contact links (3 items) + Social icons (24×24px)
|
|
11
|
+
*
|
|
12
|
+
* **Interactive demonstrations:**
|
|
13
|
+
* - Use the Pseudo States toolbar button (above canvas) to toggle hover/focus states
|
|
14
|
+
* - Click play button in Interactions panel to see focus state animations
|
|
15
|
+
*/
|
|
16
|
+
export declare const Desktop: Story;
|
|
17
|
+
/**
|
|
18
|
+
* Mobile footer layout with logo at BOTTOM.
|
|
19
|
+
* Order from top to bottom:
|
|
20
|
+
* 1. Quick links (7 items, no Leybold blog, has Suppliers + Whistleblower)
|
|
21
|
+
* 2. Contact us (2 items)
|
|
22
|
+
* 3. Contact Form CTA button (red)
|
|
23
|
+
* 4. Social icons (55×55px)
|
|
24
|
+
* 5. Country selector (International / EN)
|
|
25
|
+
* 6. Bottom links + copyright
|
|
26
|
+
* 7. Logo + Motto + Atlas Copco badge (AT BOTTOM)
|
|
27
|
+
*/
|
|
28
|
+
export declare const Mobile: Story;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface ExternalLinkIconProps {
|
|
3
|
+
className?: string;
|
|
4
|
+
size?: number;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* External link icon (↗) for footer links that open in new tabs
|
|
8
|
+
*/
|
|
9
|
+
export declare const ExternalLinkIcon: React.FC<ExternalLinkIconProps>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { Footer, FooterLink, FooterLinkGroup, FooterSocialIcons, FooterSocialIcon, FooterBottom, } from './Footer';
|
|
2
|
+
export type { FooterProps, FooterLinkItem, SocialLinkItem, FooterLogoProps, FooterLinkProps, FooterLinkGroupProps, FooterSocialIconsProps, FooterSocialIconProps, FooterBottomProps, } from './Footer';
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { GeneratedListProps } from './GeneratedList.types';
|
|
3
|
+
/**
|
|
4
|
+
* GeneratedList component for displaying content in a responsive grid.
|
|
5
|
+
*
|
|
6
|
+
* **Variants:**
|
|
7
|
+
* - Cards: Content cards with image, title, description, and CTA button
|
|
8
|
+
* - Products: Product cards with image and title (entire card clickable)
|
|
9
|
+
* - External Links: White cards with image, title, description, and external link button
|
|
10
|
+
* - List: Marketing section with heading and two columns of clickable links
|
|
11
|
+
*
|
|
12
|
+
* **Card Layout:**
|
|
13
|
+
* - Mobile (<768px): Single column overlay cards, stacked tight (no gap)
|
|
14
|
+
* - Tablet (768px-1023px): 2 columns horizontal standard cards
|
|
15
|
+
* - Desktop (≥1024px): 3 or 4 columns horizontal based on `columns` prop
|
|
16
|
+
*
|
|
17
|
+
* **Product Layout:**
|
|
18
|
+
* - Mobile (<768px): 2 columns horizontal white cards, 20px gap
|
|
19
|
+
* - Tablet (768px-1023px): 2 columns adaptive
|
|
20
|
+
* - Desktop (≥1024px): 3 or 4 columns horizontal based on `columns` prop
|
|
21
|
+
*
|
|
22
|
+
* **External Link Layout:**
|
|
23
|
+
* - Mobile (<1024px): Single column vertical white cards, 20px gap
|
|
24
|
+
* - Desktop (≥1024px): 3 columns horizontal (fixed 423px width), 20px gap
|
|
25
|
+
*
|
|
26
|
+
* **List Layout:**
|
|
27
|
+
* - Mobile (<1024px): 2 sections stacked vertically, 12px gap
|
|
28
|
+
* - Desktop (≥1024px): 2 columns side-by-side (311px each), 32px gap
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```tsx
|
|
32
|
+
* <GeneratedList
|
|
33
|
+
* variant="card"
|
|
34
|
+
* items={cardData}
|
|
35
|
+
* columns={3}
|
|
36
|
+
* title="Latest Insights"
|
|
37
|
+
* />
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
export declare const GeneratedList: React.FC<GeneratedListProps>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import { GeneratedList } from "./GeneratedList";
|
|
3
|
+
declare const meta: Meta<typeof GeneratedList>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof GeneratedList>;
|
|
6
|
+
export declare const Desktop: Story;
|
|
7
|
+
export declare const Mobile: Story;
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
export interface CardItem {
|
|
2
|
+
/** Unique identifier for React key */
|
|
3
|
+
id: string;
|
|
4
|
+
/** Card image URL */
|
|
5
|
+
imageUrl: string;
|
|
6
|
+
/** Card image alt text for accessibility */
|
|
7
|
+
imageAlt: string;
|
|
8
|
+
/** Card title - Inter Bold 24px */
|
|
9
|
+
title: string;
|
|
10
|
+
/** Card description - Inter Regular 18px */
|
|
11
|
+
description: string;
|
|
12
|
+
/** Target URL for card CTA */
|
|
13
|
+
linkUrl: string;
|
|
14
|
+
/** Optional custom link text (defaults to "READ MORE") */
|
|
15
|
+
linkText?: string;
|
|
16
|
+
/** Optional overlay color for mobile cards (defaults to blue) */
|
|
17
|
+
overlayColor?: string;
|
|
18
|
+
}
|
|
19
|
+
export interface ProductItem {
|
|
20
|
+
/** Unique identifier for React key */
|
|
21
|
+
id: string;
|
|
22
|
+
/** Product image URL */
|
|
23
|
+
imageUrl: string;
|
|
24
|
+
/** Product image alt text for accessibility */
|
|
25
|
+
imageAlt: string;
|
|
26
|
+
/** Product name/title - Inter Bold 24px, centered */
|
|
27
|
+
title: string;
|
|
28
|
+
/** Target URL for product page */
|
|
29
|
+
linkUrl: string;
|
|
30
|
+
}
|
|
31
|
+
export interface ExternalLinkItem {
|
|
32
|
+
/** Unique identifier for React key */
|
|
33
|
+
id: string;
|
|
34
|
+
/** External link card image URL */
|
|
35
|
+
imageUrl: string;
|
|
36
|
+
/** External link card image alt text for accessibility */
|
|
37
|
+
imageAlt: string;
|
|
38
|
+
/** Card title - Inter Bold 18px (H5) */
|
|
39
|
+
title: string;
|
|
40
|
+
/** Card description - Inter Regular 18px (Body) */
|
|
41
|
+
description: string;
|
|
42
|
+
/** Target URL for external link */
|
|
43
|
+
linkUrl: string;
|
|
44
|
+
/** Optional custom link text (defaults to "GO TO E-SHOP") */
|
|
45
|
+
linkText?: string;
|
|
46
|
+
}
|
|
47
|
+
export interface ListItem {
|
|
48
|
+
/** Unique identifier for React key */
|
|
49
|
+
id: string;
|
|
50
|
+
/** Link text displayed to user */
|
|
51
|
+
text: string;
|
|
52
|
+
/** Target URL for the link */
|
|
53
|
+
url: string;
|
|
54
|
+
}
|
|
55
|
+
/** Base props shared across all variants */
|
|
56
|
+
interface BaseGeneratedListProps {
|
|
57
|
+
/** Number of columns (3=348px, 4=256px). Defaults to 3. */
|
|
58
|
+
columns?: 3 | 4;
|
|
59
|
+
/** Optional section title */
|
|
60
|
+
title?: string;
|
|
61
|
+
/** Additional CSS class */
|
|
62
|
+
className?: string;
|
|
63
|
+
}
|
|
64
|
+
/** Card variant props */
|
|
65
|
+
interface CardVariantProps extends BaseGeneratedListProps {
|
|
66
|
+
/** Variant type - defaults to card */
|
|
67
|
+
variant?: 'card';
|
|
68
|
+
/** Array of card items to display */
|
|
69
|
+
items: CardItem[];
|
|
70
|
+
}
|
|
71
|
+
/** Product variant props */
|
|
72
|
+
interface ProductVariantProps extends BaseGeneratedListProps {
|
|
73
|
+
/** Variant type - product */
|
|
74
|
+
variant: 'product';
|
|
75
|
+
/** Array of product items to display */
|
|
76
|
+
items: ProductItem[];
|
|
77
|
+
}
|
|
78
|
+
/** External Link variant props */
|
|
79
|
+
interface ExternalLinkVariantProps extends BaseGeneratedListProps {
|
|
80
|
+
/** Variant type - external-link */
|
|
81
|
+
variant: 'external-link';
|
|
82
|
+
/** Array of external link items to display */
|
|
83
|
+
items: ExternalLinkItem[];
|
|
84
|
+
/** External Link variant always uses 3 columns on desktop - columns prop not allowed */
|
|
85
|
+
columns?: never;
|
|
86
|
+
}
|
|
87
|
+
/** List variant props */
|
|
88
|
+
interface ListVariantProps extends Omit<BaseGeneratedListProps, 'title' | 'columns'> {
|
|
89
|
+
/** Variant type - list */
|
|
90
|
+
variant: 'list';
|
|
91
|
+
/** Marketing headline (required for list variant) */
|
|
92
|
+
heading: string;
|
|
93
|
+
/** Array of link items */
|
|
94
|
+
items: ListItem[];
|
|
95
|
+
/** Color scheme (required for list variant) */
|
|
96
|
+
colorScheme: 'red' | 'grey';
|
|
97
|
+
/** List variant doesn't use title or columns props */
|
|
98
|
+
title?: never;
|
|
99
|
+
columns?: never;
|
|
100
|
+
}
|
|
101
|
+
/** Union type for GeneratedList props with discriminated variant */
|
|
102
|
+
export type GeneratedListProps = CardVariantProps | ProductVariantProps | ExternalLinkVariantProps | ListVariantProps;
|
|
103
|
+
/** @private Internal use only */
|
|
104
|
+
export interface CardProps {
|
|
105
|
+
item: CardItem;
|
|
106
|
+
columns: 3 | 4;
|
|
107
|
+
className?: string;
|
|
108
|
+
}
|
|
109
|
+
/** @private Internal use only */
|
|
110
|
+
export interface ProductProps {
|
|
111
|
+
item: ProductItem;
|
|
112
|
+
columns: 3 | 4;
|
|
113
|
+
className?: string;
|
|
114
|
+
}
|
|
115
|
+
/** @private Internal use only */
|
|
116
|
+
export interface ExternalLinkProps {
|
|
117
|
+
item: ExternalLinkItem;
|
|
118
|
+
className?: string;
|
|
119
|
+
}
|
|
120
|
+
/** @private Internal use only */
|
|
121
|
+
export interface ListProps {
|
|
122
|
+
/** Marketing headline text */
|
|
123
|
+
heading: string;
|
|
124
|
+
/** Array of link items to display */
|
|
125
|
+
items: ListItem[];
|
|
126
|
+
/** Color scheme: red or grey */
|
|
127
|
+
colorScheme: 'red' | 'grey';
|
|
128
|
+
/** Optional CSS class */
|
|
129
|
+
className?: string;
|
|
130
|
+
}
|
|
131
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import { GeneratedList } from "./GeneratedList";
|
|
3
|
+
declare const meta: Meta<typeof GeneratedList>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof GeneratedList>;
|
|
6
|
+
export declare const Desktop: Story;
|
|
7
|
+
export declare const Mobile: Story;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import { GeneratedList } from "./GeneratedList";
|
|
3
|
+
declare const meta: Meta<typeof GeneratedList>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof GeneratedList>;
|
|
6
|
+
export declare const RedDesktop: Story;
|
|
7
|
+
export declare const RedMobile: Story;
|
|
8
|
+
export declare const GreyDesktop: Story;
|
|
9
|
+
export declare const GreyMobile: Story;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import { GeneratedList } from "./GeneratedList";
|
|
3
|
+
declare const meta: Meta<typeof GeneratedList>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof GeneratedList>;
|
|
6
|
+
export declare const Desktop: Story;
|
|
7
|
+
export declare const Mobile: Story;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { CardProps } from './GeneratedList.types';
|
|
3
|
+
/**
|
|
4
|
+
* Private Card component for GeneratedList
|
|
5
|
+
* Renders a single content card with image, title, description, and CTA
|
|
6
|
+
* @private
|
|
7
|
+
*/
|
|
8
|
+
export declare const Card: React.FC<CardProps>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { CardProps } from './GeneratedList.types';
|
|
3
|
+
/**
|
|
4
|
+
* Private Mobile Card component for GeneratedList
|
|
5
|
+
* Full-width overlay card with centered text on image
|
|
6
|
+
* @private
|
|
7
|
+
*/
|
|
8
|
+
export declare const CardMobile: React.FC<CardProps>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ExternalLinkProps } from './GeneratedList.types';
|
|
3
|
+
/**
|
|
4
|
+
* Private ExternalLink component for GeneratedList
|
|
5
|
+
* White card with image, title, description, and external link button
|
|
6
|
+
* @private
|
|
7
|
+
*/
|
|
8
|
+
export declare const ExternalLink: React.FC<ExternalLinkProps>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ListProps } from './GeneratedList.types';
|
|
3
|
+
/**
|
|
4
|
+
* Private List component for GeneratedList
|
|
5
|
+
* Marketing section with heading and two columns of clickable links
|
|
6
|
+
* @private
|
|
7
|
+
*/
|
|
8
|
+
export declare const List: React.FC<ListProps>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ProductProps } from './GeneratedList.types';
|
|
3
|
+
/**
|
|
4
|
+
* Private Product component for GeneratedList
|
|
5
|
+
* White card with square product image and centered title
|
|
6
|
+
* Entire card is clickable (uses <a> tag wrapper)
|
|
7
|
+
* @private
|
|
8
|
+
*/
|
|
9
|
+
export declare const Product: React.FC<ProductProps>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface NavMenuItem {
|
|
3
|
+
id: string;
|
|
4
|
+
label: string;
|
|
5
|
+
menuLinks?: Array<{
|
|
6
|
+
label: string;
|
|
7
|
+
href?: string;
|
|
8
|
+
}>;
|
|
9
|
+
}
|
|
10
|
+
export interface HeaderProps {
|
|
11
|
+
className?: string;
|
|
12
|
+
navItems?: NavMenuItem[];
|
|
13
|
+
hoverDelay?: number;
|
|
14
|
+
menuOpen?: boolean;
|
|
15
|
+
menuLinks?: Array<{
|
|
16
|
+
label: string;
|
|
17
|
+
href?: string;
|
|
18
|
+
}>;
|
|
19
|
+
}
|
|
20
|
+
export declare function Header({ className, navItems, hoverDelay, menuOpen, menuLinks, }: HeaderProps): JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { Header } from './Header';
|
|
3
|
+
declare const meta: Meta<typeof Header>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Header>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const OneColumn: Story;
|
|
8
|
+
export declare const TwoColumn: Story;
|
|
9
|
+
export declare const ThreeColumn: Story;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface HeaderNavButtonProps {
|
|
3
|
+
children: string;
|
|
4
|
+
hasDropdown?: boolean;
|
|
5
|
+
onClick?: (e: React.MouseEvent) => void;
|
|
6
|
+
'data-force-state'?: 'hover' | 'focus';
|
|
7
|
+
className?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare function HeaderNavButton({ children, hasDropdown, onClick, className, ...props }: HeaderNavButtonProps): JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface MegaMenuProps {
|
|
3
|
+
isOpen: boolean;
|
|
4
|
+
links?: Array<{
|
|
5
|
+
label: string;
|
|
6
|
+
href?: string;
|
|
7
|
+
}>;
|
|
8
|
+
className?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare function MegaMenu({ isOpen, links, className }: MegaMenuProps): JSX.Element | null;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface MenuLinkProps {
|
|
3
|
+
children: string;
|
|
4
|
+
onClick?: (e: React.MouseEvent) => void;
|
|
5
|
+
'data-force-state'?: 'hover' | 'focus';
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare function MenuLink({ children, onClick, className, ...props }: MenuLinkProps): JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { NavMenuItem } from './Header';
|
|
3
|
+
export interface MobileMenuProps {
|
|
4
|
+
isOpen: boolean;
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
navItems: NavMenuItem[];
|
|
7
|
+
className?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare function MobileMenu({ isOpen, onClose, navItems, className, }: MobileMenuProps): JSX.Element | null;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface MobileNavBarProps {
|
|
3
|
+
className?: string;
|
|
4
|
+
items?: Array<{
|
|
5
|
+
id: string;
|
|
6
|
+
label: string;
|
|
7
|
+
icon?: string;
|
|
8
|
+
isHighlighted?: boolean;
|
|
9
|
+
}>;
|
|
10
|
+
onItemClick?: (id: string) => void;
|
|
11
|
+
onMoreClick?: () => void;
|
|
12
|
+
}
|
|
13
|
+
export declare function MobileNavBar({ className, items, onItemClick, onMoreClick, }: MobileNavBarProps): JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { Header } from './Header';
|
|
2
|
+
export type { HeaderProps, NavMenuItem } from './Header';
|
|
3
|
+
export { MobileNavBar } from './MobileNavBar';
|
|
4
|
+
export type { MobileNavBarProps } from './MobileNavBar';
|
|
5
|
+
export { MobileMenu } from './MobileMenu';
|
|
6
|
+
export type { MobileMenuProps } from './MobileMenu';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import AlgoliaDynamicSearchLeybold from "./AlgoliaDynamicSearch";
|
|
3
|
+
declare const meta: Meta<typeof AlgoliaDynamicSearchLeybold>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof AlgoliaDynamicSearchLeybold>;
|
|
6
|
+
export declare const Products: Story;
|
|
7
|
+
export declare const ProductDetails: Story;
|