@asantemedia-org/leybold-design-system 1.0.19 → 1.0.21

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.
Files changed (36) hide show
  1. package/dist/assets/search-product.png +0 -0
  2. package/dist/index.css +5559 -0
  3. package/dist/index.esm.css +5559 -0
  4. package/dist/index.esm.js +1032 -418
  5. package/dist/index.esm.js.map +1 -1
  6. package/dist/index.esm.scss +2562 -1169
  7. package/dist/index.js +1031 -416
  8. package/dist/index.js.map +1 -1
  9. package/dist/index.scss +2562 -1169
  10. package/dist/src/components/Button/Button.d.ts +1 -1
  11. package/dist/src/components/Button/Button.stories.d.ts +0 -4
  12. package/dist/src/components/Filters/Filter.types.d.ts +28 -0
  13. package/dist/src/components/Filters/FiltersPanel.d.ts +4 -0
  14. package/dist/src/components/ProductCardVertical/ProductCardVertical.d.ts +22 -0
  15. package/dist/src/components/ProductCardVertical/ProductCardVertical.types.d.ts +50 -0
  16. package/dist/src/components/ProductCardVertical/index.d.ts +2 -0
  17. package/dist/src/components/SearchBar/SearchSubmitButton.d.ts +1 -0
  18. package/dist/src/experience/algolia-dynamic-search/AlgoliaDynamicSearch.d.ts +0 -1
  19. package/dist/src/experience/federated-search/components/AssistanceBanner/AssistanceBanner.d.ts +22 -0
  20. package/dist/src/experience/federated-search/components/AssistanceBanner/AssistanceBanner.types.d.ts +29 -0
  21. package/dist/src/experience/federated-search/components/AssistanceBanner/AssistanceIcon.d.ts +2 -0
  22. package/dist/src/experience/federated-search/components/AssistanceBanner/index.d.ts +3 -0
  23. package/dist/src/experience/federated-search/components/FilterDrawer/FilterDrawer.d.ts +24 -0
  24. package/dist/src/experience/federated-search/components/FilterDrawer/FilterDrawer.types.d.ts +22 -0
  25. package/dist/src/experience/federated-search/components/FilterDrawer/index.d.ts +2 -0
  26. package/dist/src/experience/federated-search/components/TabButton/TabButton.d.ts +31 -0
  27. package/dist/src/experience/federated-search/components/TabButton/TabButton.types.d.ts +32 -0
  28. package/dist/src/experience/federated-search/components/TabButton/index.d.ts +2 -0
  29. package/dist/src/experience/qr-form-journey/QrFormJourney.d.ts +0 -1
  30. package/dist/src/experience/qr-form-journey/QrFormJourney.stories.d.ts +1 -0
  31. package/dist/src/hooks/useFederatedSearchMock.d.ts +9 -1
  32. package/dist/src/index.d.ts +1 -0
  33. package/dist/src/types/cards.d.ts +2 -0
  34. package/dist/src/types/search.d.ts +12 -4
  35. package/dist/tsconfig.tsbuildinfo +1 -1
  36. package/package.json +1 -1
@@ -2,7 +2,7 @@ import React from "react";
2
2
  /**
3
3
  * Button variant types
4
4
  */
5
- export type ButtonVariant = "default" | "primary" | "secondary" | "solid-red" | "solid-grey" | "solid-black" | "solid-white" | "outlined-red" | "outlined-grey" | "outlined-black" | "outlined-white" | "outline" | "text" | "link-text" | "link-text-alt" | "external-link" | "carousel-arrow-left" | "carousel-arrow-right";
5
+ export type ButtonVariant = "primary" | "secondary" | "solid-grey" | "solid-black" | "solid-white" | "outlined-grey" | "outlined-black" | "outlined-white" | "text" | "link-text" | "link-text-alt" | "external-link" | "carousel-arrow-left" | "carousel-arrow-right";
6
6
  /**
7
7
  * Icon types for button
8
8
  */
@@ -3,11 +3,8 @@ import { Button } from "./Button";
3
3
  declare const meta: Meta<typeof Button>;
4
4
  export default meta;
5
5
  type Story = StoryObj<typeof Button>;
6
- export declare const Default: Story;
7
6
  export declare const Primary: Story;
8
- export declare const SolidRed: Story;
9
7
  export declare const SecondaryDesign: Story;
10
- export declare const OutlinedRed: Story;
11
8
  export declare const SolidWhite: Story;
12
9
  export declare const SolidGrey: Story;
13
10
  export declare const SolidBlack: Story;
@@ -18,7 +15,6 @@ export declare const LinkText: Story;
18
15
  export declare const LinkTextAlt: Story;
19
16
  export declare const CarouselArrows: Story;
20
17
  export declare const ExternalLink: Story;
21
- export declare const Outline: Story;
22
18
  export declare const Text: Story;
23
19
  export declare const ExtraSmall: Story;
24
20
  export declare const Small: Story;
@@ -44,6 +44,10 @@ export interface Facet {
44
44
  */
45
45
  defaultExpanded?: boolean;
46
46
  }
47
+ /**
48
+ * Filter display variant - desktop or mobile
49
+ */
50
+ export type FilterVariant = 'desktop' | 'mobile';
47
51
  /**
48
52
  * Props for FilterItem component
49
53
  */
@@ -60,6 +64,14 @@ export interface FilterItemProps {
60
64
  * Additional CSS class
61
65
  */
62
66
  className?: string;
67
+ /**
68
+ * Display variant - controls mobile vs desktop rendering
69
+ */
70
+ variant?: FilterVariant;
71
+ /**
72
+ * Whether to show checkbox (Products tab) or plain button (Content tab)
73
+ */
74
+ showCheckbox?: boolean;
63
75
  }
64
76
  /**
65
77
  * Props for FilterSearch component
@@ -106,6 +118,14 @@ export interface FilterAccordionProps {
106
118
  * Additional CSS class
107
119
  */
108
120
  className?: string;
121
+ /**
122
+ * Display variant - controls mobile vs desktop rendering
123
+ */
124
+ variant?: FilterVariant;
125
+ /**
126
+ * Whether to show checkbox (Products tab) or plain button (Content tab)
127
+ */
128
+ showCheckbox?: boolean;
109
129
  }
110
130
  /**
111
131
  * Props for FiltersPanel component
@@ -127,6 +147,14 @@ export interface FiltersPanelProps {
127
147
  * Additional CSS class
128
148
  */
129
149
  className?: string;
150
+ /**
151
+ * Display variant - controls mobile vs desktop rendering
152
+ */
153
+ variant?: FilterVariant;
154
+ /**
155
+ * Whether to show checkbox (Products tab) or plain button (Content tab)
156
+ */
157
+ showCheckbox?: boolean;
130
158
  }
131
159
  /**
132
160
  * Props for AppliedFilters component
@@ -2,5 +2,9 @@ import React from "react";
2
2
  import { FiltersPanelProps } from "./Filter.types";
3
3
  /**
4
4
  * FiltersPanel - Main container for all filters
5
+ *
6
+ * Fully controlled component - renders based on facets prop.
7
+ * When facets change (e.g., after API refetch), component re-renders with new data.
8
+ * Accordion expansion state persists across refetches, with new facets respecting defaultExpanded.
5
9
  */
6
10
  export declare const FiltersPanel: React.FC<FiltersPanelProps>;
@@ -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,2 @@
1
+ export { ProductCardVertical } from './ProductCardVertical';
2
+ export type { ProductCardVerticalProps } from './ProductCardVertical.types';
@@ -4,6 +4,7 @@ export interface SearchSubmitButtonProps {
4
4
  disabled?: boolean;
5
5
  ariaLabel?: string;
6
6
  label?: string;
7
+ variant?: 'instant' | 'results';
7
8
  className?: string;
8
9
  }
9
10
  export declare const SearchSubmitButton: React.FC<SearchSubmitButtonProps>;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  import "./AlgoliaDynamicSearch.scss";
3
2
  export declare const AlgoliaDynamicSearchLeybold: (props: any) => JSX.Element;
4
3
  export default AlgoliaDynamicSearchLeybold;
@@ -0,0 +1,22 @@
1
+ import React from 'react';
2
+ import { AssistanceBannerProps } from './AssistanceBanner.types';
3
+ /**
4
+ * AssistanceBanner - Help widget for search sidebar
5
+ *
6
+ * Displays a call-to-action for users who need assistance finding products.
7
+ * Features chat icon, heading, description, and contact link with chevron.
8
+ *
9
+ * Desktop only - hidden on mobile to save space.
10
+ *
11
+ * @example
12
+ * ```tsx
13
+ * <AssistanceBanner
14
+ * title="Need Assistance?"
15
+ * description="Can't find what you're looking for? Our team is ready to help."
16
+ * linkText="Contact support"
17
+ * linkUrl="/contact"
18
+ * />
19
+ * ```
20
+ */
21
+ export declare const AssistanceBanner: React.FC<AssistanceBannerProps>;
22
+ export default AssistanceBanner;
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Props for AssistanceBanner component
3
+ */
4
+ export interface AssistanceBannerProps {
5
+ /**
6
+ * Banner heading text
7
+ */
8
+ title?: string;
9
+ /**
10
+ * Banner description/body text
11
+ */
12
+ description?: string;
13
+ /**
14
+ * Contact link text
15
+ */
16
+ linkText?: string;
17
+ /**
18
+ * Contact link URL
19
+ */
20
+ linkUrl?: string;
21
+ /**
22
+ * Link click handler (optional, for programmatic control)
23
+ */
24
+ onLinkClick?: () => void;
25
+ /**
26
+ * Additional CSS classes
27
+ */
28
+ className?: string;
29
+ }
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const AssistanceIcon: React.FC<React.SVGProps<SVGSVGElement>>;
@@ -0,0 +1,3 @@
1
+ export { AssistanceBanner } from './AssistanceBanner';
2
+ export { AssistanceIcon } from './AssistanceIcon';
3
+ export type { AssistanceBannerProps } from './AssistanceBanner.types';
@@ -0,0 +1,24 @@
1
+ import React from 'react';
2
+ import { FilterDrawerProps } from './FilterDrawer.types';
3
+ /**
4
+ * FilterDrawer - Mobile slide-in filter panel
5
+ *
6
+ * Slides in from the right with a dark overlay. Used on mobile to show filters
7
+ * when screen space is limited. Includes focus trap, escape key handling, and
8
+ * body scroll prevention.
9
+ *
10
+ * Desktop: Hidden (filters shown in sidebar)
11
+ * Mobile: Slide-in drawer overlay
12
+ *
13
+ * @example
14
+ * ```tsx
15
+ * <FilterDrawer
16
+ * isOpen={isFilterDrawerOpen}
17
+ * onClose={() => setIsFilterDrawerOpen(false)}
18
+ * >
19
+ * <FiltersPanel facets={facets} onFacetToggle={handleToggle} />
20
+ * </FilterDrawer>
21
+ * ```
22
+ */
23
+ export declare const FilterDrawer: React.FC<FilterDrawerProps>;
24
+ export default FilterDrawer;
@@ -0,0 +1,22 @@
1
+ /// <reference types="react" />
2
+ /**
3
+ * Props for FilterDrawer component
4
+ */
5
+ export interface FilterDrawerProps {
6
+ /**
7
+ * Whether drawer is currently open/visible
8
+ */
9
+ isOpen: boolean;
10
+ /**
11
+ * Close handler (called on overlay click, Escape key, or X button)
12
+ */
13
+ onClose: () => void;
14
+ /**
15
+ * Drawer content (typically FiltersPanel component)
16
+ */
17
+ children: React.ReactNode;
18
+ /**
19
+ * Additional CSS classes
20
+ */
21
+ className?: string;
22
+ }
@@ -0,0 +1,2 @@
1
+ export { FilterDrawer } from './FilterDrawer';
2
+ export type { FilterDrawerProps } from './FilterDrawer.types';
@@ -0,0 +1,31 @@
1
+ import React from 'react';
2
+ import { TabButtonProps } from './TabButton.types';
3
+ /**
4
+ * TabButton - Tab navigation component with result counts
5
+ *
6
+ * Supports two layout variants:
7
+ * - Desktop: Background colours, top red underline when active, rounded corners
8
+ * - Mobile: Text-only with bottom border underline when active
9
+ *
10
+ * @example
11
+ * ```tsx
12
+ * // Desktop variant
13
+ * <TabButton
14
+ * label="WEB SHOP RESULTS"
15
+ * count={542}
16
+ * isActive={true}
17
+ * onClick={() => setActiveTab('products')}
18
+ * variant="desktop"
19
+ * />
20
+ *
21
+ * // Mobile variant
22
+ * <TabButton
23
+ * label="WEB SHOP"
24
+ * isActive={false}
25
+ * onClick={() => setActiveTab('content')}
26
+ * variant="mobile"
27
+ * />
28
+ * ```
29
+ */
30
+ export declare const TabButton: React.FC<TabButtonProps>;
31
+ export default TabButton;
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Props for TabButton component
3
+ */
4
+ export interface TabButtonProps {
5
+ /**
6
+ * Tab label text (e.g., "WEB SHOP RESULTS", "WEBSITE")
7
+ */
8
+ label: string;
9
+ /**
10
+ * Optional result count to display with label
11
+ * When provided, formats as "{count} {label}"
12
+ */
13
+ count?: number;
14
+ /**
15
+ * Whether this tab is currently active/selected
16
+ */
17
+ isActive: boolean;
18
+ /**
19
+ * Click handler for tab selection
20
+ */
21
+ onClick: () => void;
22
+ /**
23
+ * Layout variant
24
+ * - desktop: Background colours, top underline, rounded corners
25
+ * - mobile: Text-only with bottom border
26
+ */
27
+ variant?: 'desktop' | 'mobile';
28
+ /**
29
+ * Additional CSS classes
30
+ */
31
+ className?: string;
32
+ }
@@ -0,0 +1,2 @@
1
+ export { TabButton } from './TabButton';
2
+ export type { TabButtonProps } from './TabButton.types';
@@ -1,3 +1,2 @@
1
- /// <reference types="react" />
2
1
  import "./QrFormJourney.scss";
3
2
  export declare const QrFormLeybold: (props: any) => JSX.Element;
@@ -5,3 +5,4 @@ export default meta;
5
5
  type Story = StoryObj<typeof QrFormLeybold>;
6
6
  export declare const Default: Story;
7
7
  export declare const AEM: Story;
8
+ export declare const China: Story;
@@ -1,4 +1,4 @@
1
- import { ProductResult, ContentResult, SearchView, SearchTab } from "../types/search";
1
+ import { ProductResult, ContentResult, SearchView, SearchTab, Facet } from "../types/search";
2
2
  interface UseFederatedSearchMockOptions {
3
3
  debounceMs?: number;
4
4
  simulateDelay?: boolean;
@@ -24,5 +24,13 @@ export declare const useFederatedSearchMock: (options?: UseFederatedSearchMockOp
24
24
  onChangeView: (view: SearchView) => void;
25
25
  activeTab: SearchTab;
26
26
  onTabChange: (tab: SearchTab) => void;
27
+ facets: Facet[];
28
+ onFacetToggle: (attribute: string, value: string) => void;
29
+ currentPage: number;
30
+ totalPages: number;
31
+ onPageChange: (page: number) => void;
32
+ isFilterDrawerOpen: boolean;
33
+ onFilterDrawerToggle: () => void;
34
+ onFilterDrawerClose: () => void;
27
35
  };
28
36
  export {};
@@ -18,6 +18,7 @@ export { ResultsColumn } from "./components/ResultsColumn";
18
18
  export { ResultsCount } from "./components/ResultsCount";
19
19
  export { SeeAllLinkButton } from "./components/SeeAllLinkButton";
20
20
  export { ProductCardHorizontal } from "./components/ProductCardHorizontal";
21
+ export { ProductCardVertical } from "./components/ProductCardVertical";
21
22
  export { ContentCardHorizontal } from "./components/ContentCardHorizontal";
22
23
  export { FederatedResultsView, ResultsList } from "./components/ResultsView";
23
24
  export { FiltersPanel, FilterAccordion, FilterItem, FilterSearch, AppliedFilters, AppliedFilterTag, } from "./components/Filters";
@@ -20,6 +20,7 @@ export interface ContentCardHorizontalProps {
20
20
  excerpt?: string;
21
21
  className?: string;
22
22
  button?: ButtonProps;
23
+ variant?: "instant-view" | "results-view";
23
24
  }
24
25
  export type ProductCardHorizontalPartsProps = ProductCardHorizontalProps;
25
26
  export interface ProductCardDetailsProps {
@@ -45,4 +46,5 @@ export interface ProductCardDetailsProps {
45
46
  img_product: string;
46
47
  url: string;
47
48
  }>;
49
+ hidespares?: string;
48
50
  }
@@ -54,8 +54,11 @@ export interface FederatedSearchProps {
54
54
  currentPage: number;
55
55
  totalPages: number;
56
56
  onPageChange(page: number): void;
57
- facets?: Facet[];
58
- onFacetToggle?(attribute: string, value: string): void;
57
+ facets: Facet[];
58
+ onFacetToggle(attribute: string, value: string): void;
59
+ isFilterDrawerOpen?: boolean;
60
+ onFilterDrawerToggle?: () => void;
61
+ onFilterDrawerClose?: () => void;
59
62
  }
60
63
  export interface SearchTriggerButtonProps {
61
64
  onOpen(): void;
@@ -69,6 +72,7 @@ export interface SearchModalProps {
69
72
  title?: string;
70
73
  children: React.ReactNode;
71
74
  className?: string;
75
+ stickyHeaderContent?: React.ReactNode;
72
76
  }
73
77
  export interface SearchBarProps {
74
78
  value: string;
@@ -77,6 +81,7 @@ export interface SearchBarProps {
77
81
  placeholder?: string;
78
82
  autoFocus?: boolean;
79
83
  className?: string;
84
+ variant?: "instant" | "results";
80
85
  }
81
86
  export interface FederatedInstantResultsLayoutProps {
82
87
  query: string;
@@ -114,8 +119,11 @@ export interface FederatedResultsViewProps {
114
119
  currentPage: number;
115
120
  totalPages: number;
116
121
  onPageChange(page: number): void;
117
- facets?: Facet[];
118
- onFacetToggle?(attribute: string, value: string): void;
122
+ facets: Facet[];
123
+ onFacetToggle(attribute: string, value: string): void;
124
+ isFilterDrawerOpen?: boolean;
125
+ onFilterDrawerToggle?: () => void;
126
+ onFilterDrawerClose?: () => void;
119
127
  }
120
128
  export interface FiltersPanelPropsOld {
121
129
  className?: string;