@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,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Location item for the language selector
|
|
3
|
+
*/
|
|
4
|
+
export interface Location {
|
|
5
|
+
/** Display name of the location */
|
|
6
|
+
name: string;
|
|
7
|
+
/** URL to navigate to when selected */
|
|
8
|
+
href: string;
|
|
9
|
+
/** Whether this location is currently selected */
|
|
10
|
+
isSelected?: boolean;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Language item for the language selector
|
|
14
|
+
*/
|
|
15
|
+
export interface Language {
|
|
16
|
+
/** Display name of the language */
|
|
17
|
+
name: string;
|
|
18
|
+
/** Optional language/region code (e.g., 'ES', 'MX', 'FR') */
|
|
19
|
+
code?: string;
|
|
20
|
+
/** URL to navigate to when selected */
|
|
21
|
+
href: string;
|
|
22
|
+
/** Whether this language is currently selected */
|
|
23
|
+
isSelected?: boolean;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Props for the LocationDropdown sub-component (mobile)
|
|
27
|
+
*/
|
|
28
|
+
export interface LocationDropdownProps {
|
|
29
|
+
/** Array of available locations */
|
|
30
|
+
locations: Location[];
|
|
31
|
+
/** Currently selected location name */
|
|
32
|
+
selectedLocation?: string;
|
|
33
|
+
/** Whether the dropdown is open */
|
|
34
|
+
isOpen: boolean;
|
|
35
|
+
/** Toggle dropdown open/closed */
|
|
36
|
+
onToggle: () => void;
|
|
37
|
+
/** Handler when a location is selected */
|
|
38
|
+
onSelect: (location: Location) => void;
|
|
39
|
+
/** Additional CSS class */
|
|
40
|
+
className?: string;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Props for the main LanguageSelector component
|
|
44
|
+
*/
|
|
45
|
+
export interface LanguageSelectorProps {
|
|
46
|
+
/** Array of available locations */
|
|
47
|
+
locations: Location[];
|
|
48
|
+
/** Array of available languages */
|
|
49
|
+
languages: Language[];
|
|
50
|
+
/** Heading text for the location section */
|
|
51
|
+
locationHeading?: string;
|
|
52
|
+
/** Heading text for the language section (desktop) */
|
|
53
|
+
languageHeadingDesktop?: string;
|
|
54
|
+
/** Heading text for the language section (mobile) */
|
|
55
|
+
languageHeadingMobile?: string;
|
|
56
|
+
/** Handler when a location is selected */
|
|
57
|
+
onLocationSelect?: (location: Location) => void;
|
|
58
|
+
/** Handler when a language is selected */
|
|
59
|
+
onLanguageSelect?: (language: Language) => void;
|
|
60
|
+
/** Handler when close button is clicked */
|
|
61
|
+
onClose?: () => void;
|
|
62
|
+
/** Additional CSS class */
|
|
63
|
+
className?: string;
|
|
64
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface LanguageSelectorLinkProps {
|
|
3
|
+
/** Display label for the link */
|
|
4
|
+
label: string;
|
|
5
|
+
/** Optional secondary label (e.g., language code) */
|
|
6
|
+
secondaryLabel?: string;
|
|
7
|
+
/** URL to navigate to */
|
|
8
|
+
href: string;
|
|
9
|
+
/** Whether the link is currently selected */
|
|
10
|
+
isSelected?: boolean;
|
|
11
|
+
/** Click handler */
|
|
12
|
+
onClick?: (event: React.MouseEvent<HTMLAnchorElement>) => void;
|
|
13
|
+
/** Additional CSS class */
|
|
14
|
+
className?: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Language selector link component
|
|
18
|
+
* Selected state: Red background with white text and white checkmark
|
|
19
|
+
*/
|
|
20
|
+
export declare const LanguageSelectorLink: React.FC<LanguageSelectorLinkProps>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface LocationSelectorLinkProps {
|
|
3
|
+
/** Display label for the link */
|
|
4
|
+
label: string;
|
|
5
|
+
/** URL to navigate to */
|
|
6
|
+
href: string;
|
|
7
|
+
/** Whether the link is currently selected */
|
|
8
|
+
isSelected?: boolean;
|
|
9
|
+
/** Click handler */
|
|
10
|
+
onClick?: (event: React.MouseEvent<HTMLAnchorElement>) => void;
|
|
11
|
+
/** Keyboard handler */
|
|
12
|
+
onKeyDown?: (event: React.KeyboardEvent<HTMLAnchorElement>) => void;
|
|
13
|
+
/** Additional CSS class */
|
|
14
|
+
className?: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Location selector link component
|
|
18
|
+
* Selected state: Black bold text with red checkmark (no background)
|
|
19
|
+
*/
|
|
20
|
+
export declare const LocationSelectorLink: React.FC<LocationSelectorLinkProps>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { LanguageSelector } from './LanguageSelector';
|
|
2
|
+
export { LocationSelectorLink } from './LocationSelectorLink';
|
|
3
|
+
export type { LocationSelectorLinkProps } from './LocationSelectorLink';
|
|
4
|
+
export { LanguageSelectorLink } from './LanguageSelectorLink';
|
|
5
|
+
export type { LanguageSelectorLinkProps } from './LanguageSelectorLink';
|
|
6
|
+
export { LocationDropdown } from './LocationDropdown';
|
|
7
|
+
export type { Location, Language, LanguageSelectorProps, LocationDropdownProps, } from './LanguageSelector.types';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import { Pagination } from "./Pagination";
|
|
3
|
+
declare const meta: Meta<typeof Pagination>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Pagination>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const FewPages: Story;
|
|
8
|
+
export declare const ManyPages: Story;
|
|
9
|
+
export declare const MiddlePage: Story;
|
|
10
|
+
export declare const LastPage: Story;
|
|
11
|
+
export declare const WithEllipsis: Story;
|
|
12
|
+
export declare const WithoutPreviousNext: Story;
|
|
13
|
+
export declare const CustomLabels: Story;
|
|
14
|
+
export declare const CustomMaxVisible: Story;
|
|
15
|
+
export declare const SinglePage: Story;
|
|
16
|
+
export declare const Playground: Story;
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
export interface PaginationProps {
|
|
2
|
+
/**
|
|
3
|
+
* Current active page number (1-based)
|
|
4
|
+
*/
|
|
5
|
+
currentPage: number;
|
|
6
|
+
/**
|
|
7
|
+
* Total number of pages
|
|
8
|
+
*/
|
|
9
|
+
totalPages: number;
|
|
10
|
+
/**
|
|
11
|
+
* Callback when page changes
|
|
12
|
+
*/
|
|
13
|
+
onPageChange: (page: number) => void;
|
|
14
|
+
/**
|
|
15
|
+
* Number of page buttons to show (excluding ellipsis)
|
|
16
|
+
* @default 10
|
|
17
|
+
*/
|
|
18
|
+
maxVisiblePages?: number;
|
|
19
|
+
/**
|
|
20
|
+
* Show previous button
|
|
21
|
+
* @default true
|
|
22
|
+
*/
|
|
23
|
+
showPrevious?: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Show next button
|
|
26
|
+
* @default true
|
|
27
|
+
*/
|
|
28
|
+
showNext?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Label for previous button
|
|
31
|
+
* @default "Previous"
|
|
32
|
+
*/
|
|
33
|
+
previousLabel?: string;
|
|
34
|
+
/**
|
|
35
|
+
* Label for next button
|
|
36
|
+
* @default "Next"
|
|
37
|
+
*/
|
|
38
|
+
nextLabel?: string;
|
|
39
|
+
/**
|
|
40
|
+
* Additional CSS class
|
|
41
|
+
*/
|
|
42
|
+
className?: string;
|
|
43
|
+
/**
|
|
44
|
+
* Accessible label for the pagination navigation
|
|
45
|
+
* @default "Pagination"
|
|
46
|
+
*/
|
|
47
|
+
ariaLabel?: string;
|
|
48
|
+
}
|
|
49
|
+
export interface PaginationItemProps {
|
|
50
|
+
/**
|
|
51
|
+
* Page number to display
|
|
52
|
+
*/
|
|
53
|
+
page: number;
|
|
54
|
+
/**
|
|
55
|
+
* Whether this page is currently active
|
|
56
|
+
*/
|
|
57
|
+
isActive: boolean;
|
|
58
|
+
/**
|
|
59
|
+
* Click handler
|
|
60
|
+
*/
|
|
61
|
+
onClick: (page: number) => void;
|
|
62
|
+
/**
|
|
63
|
+
* Additional CSS class
|
|
64
|
+
*/
|
|
65
|
+
className?: string;
|
|
66
|
+
}
|
|
67
|
+
export interface PaginationButtonProps {
|
|
68
|
+
/**
|
|
69
|
+
* Button label
|
|
70
|
+
*/
|
|
71
|
+
label: string;
|
|
72
|
+
/**
|
|
73
|
+
* Whether button is disabled
|
|
74
|
+
*/
|
|
75
|
+
disabled: boolean;
|
|
76
|
+
/**
|
|
77
|
+
* Click handler
|
|
78
|
+
*/
|
|
79
|
+
onClick: () => void;
|
|
80
|
+
/**
|
|
81
|
+
* Direction of navigation
|
|
82
|
+
*/
|
|
83
|
+
direction: "previous" | "next";
|
|
84
|
+
/**
|
|
85
|
+
* Additional CSS class
|
|
86
|
+
*/
|
|
87
|
+
className?: string;
|
|
88
|
+
/**
|
|
89
|
+
* Accessible label
|
|
90
|
+
*/
|
|
91
|
+
ariaLabel?: string;
|
|
92
|
+
}
|
|
93
|
+
export interface PaginationEllipsisProps {
|
|
94
|
+
/**
|
|
95
|
+
* Additional CSS class
|
|
96
|
+
*/
|
|
97
|
+
className?: string;
|
|
98
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { Pagination } from "./Pagination";
|
|
2
|
+
export { PaginationItem } from "./PaginationItem";
|
|
3
|
+
export { PaginationButton } from "./PaginationButton";
|
|
4
|
+
export { PaginationEllipsis } from "./PaginationEllipsis";
|
|
5
|
+
export type { PaginationProps, PaginationItemProps, PaginationButtonProps, PaginationEllipsisProps, } from "./Pagination.types";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import { ProductCardDetails } from "./ProductCardDetails";
|
|
3
|
+
declare const meta: Meta<typeof ProductCardDetails>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof ProductCardDetails>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const WithSpares: Story;
|
|
8
|
+
export declare const WithoutSpares: Story;
|
|
9
|
+
export declare const MinimalFacets: Story;
|
|
10
|
+
export declare const NoImage: Story;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import { ProductCardHorizontal, ProductCardHorizontalParts } from "./ProductCardHorizontal";
|
|
3
|
+
declare const meta: Meta<typeof ProductCardHorizontal>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof ProductCardHorizontal>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const WithoutImage: Story;
|
|
8
|
+
export declare const WithoutPrice: Story;
|
|
9
|
+
export declare const LongTitle: Story;
|
|
10
|
+
export declare const ProductCardHorizontalPartsDefault: StoryObj<typeof ProductCardHorizontalParts>;
|
|
11
|
+
export declare const ProductCardHorizontalPartsWithoutImage: StoryObj<typeof ProductCardHorizontalParts>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ProductCardVerticalProps } from './ProductCardVertical.types';
|
|
3
|
+
/**
|
|
4
|
+
* ProductCardVertical - Vertical product card for grid layouts
|
|
5
|
+
*
|
|
6
|
+
* Used in full results view with 4-column grid (desktop) or 2-column grid (mobile).
|
|
7
|
+
* Figma spec: Default (no shadow) → Hover (shadow + grey button) → Focus (border + shadow)
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```tsx
|
|
11
|
+
* <ProductCardVertical
|
|
12
|
+
* title="TURBOVAC i - High vacuum turbopump"
|
|
13
|
+
* url="/products/turbovac-i"
|
|
14
|
+
* imageUrl="/assets/search-product.png"
|
|
15
|
+
* productId="21312VISH"
|
|
16
|
+
* description="Premium high-performance turbomolecular pump"
|
|
17
|
+
* buttonLabel="BUY ONLINE"
|
|
18
|
+
* />
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
export declare const ProductCardVertical: React.FC<ProductCardVerticalProps>;
|
|
22
|
+
export default ProductCardVertical;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Props for ProductCardVertical component
|
|
3
|
+
*/
|
|
4
|
+
export interface ProductCardVerticalProps {
|
|
5
|
+
/**
|
|
6
|
+
* Unique product identifier
|
|
7
|
+
*/
|
|
8
|
+
id?: string;
|
|
9
|
+
/**
|
|
10
|
+
* Product title/name
|
|
11
|
+
*/
|
|
12
|
+
title: string;
|
|
13
|
+
/**
|
|
14
|
+
* Product page URL
|
|
15
|
+
*/
|
|
16
|
+
url: string;
|
|
17
|
+
/**
|
|
18
|
+
* Product image URL
|
|
19
|
+
*/
|
|
20
|
+
imageUrl?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Product SKU/ID code
|
|
23
|
+
*/
|
|
24
|
+
productId?: string;
|
|
25
|
+
/**
|
|
26
|
+
* Product description
|
|
27
|
+
*/
|
|
28
|
+
description?: string;
|
|
29
|
+
/**
|
|
30
|
+
* CTA button label
|
|
31
|
+
*/
|
|
32
|
+
buttonLabel?: string;
|
|
33
|
+
/**
|
|
34
|
+
* Button click handler
|
|
35
|
+
*/
|
|
36
|
+
onButtonClick?: () => void;
|
|
37
|
+
/**
|
|
38
|
+
* Additional CSS classes
|
|
39
|
+
*/
|
|
40
|
+
className?: string;
|
|
41
|
+
/**
|
|
42
|
+
* Layout variant - desktop (224.5px) or mobile (140px width)
|
|
43
|
+
*/
|
|
44
|
+
variant?: 'desktop' | 'mobile';
|
|
45
|
+
/**
|
|
46
|
+
* Force a specific state for Storybook showcase
|
|
47
|
+
* @internal
|
|
48
|
+
*/
|
|
49
|
+
'data-force-state'?: 'hover' | 'focus';
|
|
50
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { FederatedResultsView } from './FederatedResultsView';
|
|
3
|
+
declare const meta: Meta<typeof FederatedResultsView>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof FederatedResultsView>;
|
|
6
|
+
export declare const AllResults: Story;
|
|
7
|
+
export declare const ProductsTab: Story;
|
|
8
|
+
export declare const ContentTab: Story;
|
|
9
|
+
export declare const Loading: Story;
|
|
10
|
+
export declare const NoResults: Story;
|
|
11
|
+
export declare const WithError: Story;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { SearchBar } from './SearchBar';
|
|
3
|
+
declare const meta: Meta<typeof SearchBar>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof SearchBar>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const WithValue: Story;
|
|
8
|
+
export declare const CustomPlaceholder: Story;
|
|
9
|
+
export declare const AutoFocus: Story;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface SearchInputProps {
|
|
3
|
+
value: string;
|
|
4
|
+
onChange(value: string): void;
|
|
5
|
+
onKeyDown?(event: React.KeyboardEvent<HTMLInputElement>): void;
|
|
6
|
+
placeholder?: string;
|
|
7
|
+
autoFocus?: boolean;
|
|
8
|
+
className?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const SearchInput: React.FC<SearchInputProps>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface SearchSubmitButtonProps {
|
|
3
|
+
onClick(): void;
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
ariaLabel?: string;
|
|
6
|
+
label?: string;
|
|
7
|
+
variant?: 'instant' | 'results';
|
|
8
|
+
className?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const SearchSubmitButton: React.FC<SearchSubmitButtonProps>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { SearchBar } from './SearchBar';
|
|
2
|
+
export { SearchIcon } from './SearchIcon';
|
|
3
|
+
export { SearchInput } from './SearchInput';
|
|
4
|
+
export { SearchSubmitButton } from './SearchSubmitButton';
|
|
5
|
+
export type { SearchBarProps } from '../../types/search';
|
|
6
|
+
export type { SearchIconProps } from './SearchIcon';
|
|
7
|
+
export type { SearchInputProps } from './SearchInput';
|
|
8
|
+
export type { SearchSubmitButtonProps } from './SearchSubmitButton';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { SearchModal } from './SearchModal';
|
|
3
|
+
declare const meta: Meta<typeof SearchModal>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof SearchModal>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const CustomTitle: Story;
|
|
8
|
+
export declare const WithLongContent: Story;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { SearchTriggerButton } from './SearchTriggerButton';
|
|
3
|
+
declare const meta: Meta<typeof SearchTriggerButton>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof SearchTriggerButton>;
|
|
6
|
+
export declare const IconOnly: Story;
|
|
7
|
+
export declare const WithLabel: Story;
|
|
8
|
+
export declare const CustomLabel: Story;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface CarouselCardData {
|
|
3
|
+
/** Card image URL */
|
|
4
|
+
imageUrl: string;
|
|
5
|
+
/** Card image alt text */
|
|
6
|
+
imageAlt: string;
|
|
7
|
+
/** Card title */
|
|
8
|
+
title: string;
|
|
9
|
+
/** Card link text (e.g., "LEARN MORE") */
|
|
10
|
+
linkText: string;
|
|
11
|
+
/** Card link URL */
|
|
12
|
+
linkUrl: string;
|
|
13
|
+
}
|
|
14
|
+
export interface CarouselProps {
|
|
15
|
+
/** Section title (displayed in italic bold) */
|
|
16
|
+
title: string;
|
|
17
|
+
/** Section subtitle/description */
|
|
18
|
+
subtitle?: string;
|
|
19
|
+
/** CTA button text */
|
|
20
|
+
buttonText?: string;
|
|
21
|
+
/** CTA button URL */
|
|
22
|
+
buttonUrl?: string;
|
|
23
|
+
/** Array of carousel cards */
|
|
24
|
+
cards: CarouselCardData[];
|
|
25
|
+
/** Show pagination dots (desktop only) */
|
|
26
|
+
showDots?: boolean;
|
|
27
|
+
/** Show navigation arrows */
|
|
28
|
+
showArrows?: boolean;
|
|
29
|
+
/** Additional CSS class */
|
|
30
|
+
className?: string;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Carousel component for displaying multiple content cards in a sliding format.
|
|
34
|
+
* Supports responsive layouts with 3 cards on desktop and 1 card on mobile.
|
|
35
|
+
*/
|
|
36
|
+
export declare const Carousel: React.FC<CarouselProps>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { Carousel } from './Carousel';
|
|
3
|
+
declare const meta: Meta<typeof Carousel>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Carousel>;
|
|
6
|
+
export declare const Desktop: Story;
|
|
7
|
+
export declare const Mobile: Story;
|