@asantemedia-org/leybold-design-system 1.0.11 → 1.0.12
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/index.esm.js +10 -120
- package/dist/index.esm.js.map +1 -1
- package/dist/index.esm.scss +0 -263
- package/dist/index.js +8 -119
- package/dist/index.js.map +1 -1
- package/dist/index.scss +0 -263
- package/dist/src/index.d.ts +0 -2
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import React, {
|
|
1
|
+
import React, { useMemo, useState, useCallback, useRef, useEffect } from 'react';
|
|
2
2
|
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
|
3
3
|
import { faArrowLeft, faArrowLeftLong, faArrowRight, faArrowRightLong, faChevronRight, faChevronLeft, faArrowUpRightFromSquare, faGlobe } from '@fortawesome/free-solid-svg-icons';
|
|
4
|
-
import Slider from 'react-slick';
|
|
5
4
|
import { faInstagram, faYoutube, faLinkedinIn, faXTwitter, faFacebookF } from '@fortawesome/free-brands-svg-icons';
|
|
6
5
|
import { ProductDetailsCard, AlgoliaDynamicSearchRaw, QrForm } from '@asantemedia-org/edwardsvacuum-design-system';
|
|
7
6
|
|
|
@@ -15,7 +14,7 @@ function _extends() {
|
|
|
15
14
|
}, _extends.apply(null, arguments);
|
|
16
15
|
}
|
|
17
16
|
|
|
18
|
-
var styles$
|
|
17
|
+
var styles$g = {"button":"Button-module__button___18Bed","button--primary":"Button-module__button--primary___VuF-P","button--default":"Button-module__button--default___MDa35","button--disabled":"Button-module__button--disabled___IuOY8","button--secondary":"Button-module__button--secondary___lD5E3","button--solid-red":"Button-module__button--solid-red___YPpnL","button--solid-grey":"Button-module__button--solid-grey___oRbEy","button--solid-black":"Button-module__button--solid-black___1Ma5K","button--solid-white":"Button-module__button--solid-white___bE-Z0","button--outlined-red":"Button-module__button--outlined-red___cgZXa","button--outlined-grey":"Button-module__button--outlined-grey___xWGbB","button--outlined-black":"Button-module__button--outlined-black___qfX5o","button--outlined-white":"Button-module__button--outlined-white___QLXNP","button--link-text":"Button-module__button--link-text___R2kun","button__icon":"Button-module__button__icon___hlcHo","button--link-text-alt":"Button-module__button--link-text-alt___1p7wH","button--external-link":"Button-module__button--external-link___Mhxuk","button--carousel-arrow-left":"Button-module__button--carousel-arrow-left___Wx-Jo","button--carousel-arrow-right":"Button-module__button--carousel-arrow-right___3ZtgT","button__icon__default":"Button-module__button__icon__default___0qlF1","button__icon__hover":"Button-module__button__icon__hover___3xPGT","button--extra-small":"Button-module__button--extra-small___R0QTM","button--small":"Button-module__button--small___ADJQe","button--medium":"Button-module__button--medium___ZuR4Z","button--large":"Button-module__button--large___-FaV5","button__icon--left":"Button-module__button__icon--left___wMCeH","button__icon--right":"Button-module__button__icon--right___-pGHl"};
|
|
19
18
|
|
|
20
19
|
function getDefaultExportFromCjs (x) {
|
|
21
20
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
@@ -193,10 +192,10 @@ const Button = ({
|
|
|
193
192
|
const isIconOnly = variant === "carousel-arrow-left" || variant === "carousel-arrow-right";
|
|
194
193
|
const isCarouselLeft = variant === "carousel-arrow-left";
|
|
195
194
|
const isCarouselRight = variant === "carousel-arrow-right";
|
|
196
|
-
const buttonClasses = classNames(styles$
|
|
197
|
-
[styles$
|
|
195
|
+
const buttonClasses = classNames(styles$g.button, styles$g[`button--${cssVariant}`], styles$g[`button--${size}`], {
|
|
196
|
+
[styles$g["button--disabled"]]: disabled
|
|
198
197
|
}, className);
|
|
199
|
-
const iconClasses = classNames(styles$
|
|
198
|
+
const iconClasses = classNames(styles$g.button__icon, styles$g[`button__icon--${iconPosition}`]);
|
|
200
199
|
|
|
201
200
|
// Generate accessible label for icon-only buttons
|
|
202
201
|
const accessibleLabel = ariaLabel || (isIconOnly ? variant === "carousel-arrow-left" ? "Previous" : "Next" : undefined);
|
|
@@ -211,132 +210,23 @@ const Button = ({
|
|
|
211
210
|
className: iconClasses
|
|
212
211
|
}, /*#__PURE__*/React.createElement(FontAwesomeIcon, {
|
|
213
212
|
icon: faArrowLeft,
|
|
214
|
-
className: styles$
|
|
213
|
+
className: styles$g.button__icon__default
|
|
215
214
|
}), /*#__PURE__*/React.createElement(FontAwesomeIcon, {
|
|
216
215
|
icon: faArrowLeftLong,
|
|
217
|
-
className: styles$
|
|
216
|
+
className: styles$g.button__icon__hover
|
|
218
217
|
})), isCarouselRight && /*#__PURE__*/React.createElement("span", {
|
|
219
218
|
className: iconClasses
|
|
220
219
|
}, /*#__PURE__*/React.createElement(FontAwesomeIcon, {
|
|
221
220
|
icon: faArrowRight,
|
|
222
|
-
className: styles$
|
|
221
|
+
className: styles$g.button__icon__default
|
|
223
222
|
}), /*#__PURE__*/React.createElement(FontAwesomeIcon, {
|
|
224
223
|
icon: faArrowRightLong,
|
|
225
|
-
className: styles$
|
|
224
|
+
className: styles$g.button__icon__hover
|
|
226
225
|
})), !isIconOnly && iconElement && /*#__PURE__*/React.createElement("span", {
|
|
227
226
|
className: iconClasses
|
|
228
227
|
}, iconElement));
|
|
229
228
|
};
|
|
230
229
|
|
|
231
|
-
var styles$g = {"carousel":"Carousel-module__carousel___hkXkF","carousel__header":"Carousel-module__carousel__header___IMcN5","carousel__headerContent":"Carousel-module__carousel__headerContent___9uU-H","carousel__title":"Carousel-module__carousel__title___CCgcY","carousel__subtitle":"Carousel-module__carousel__subtitle___aj4q1","carousel__slider":"Carousel-module__carousel__slider___b27-P","carousel__slideWrapper":"Carousel-module__carousel__slideWrapper___PjXgD","carousel__card":"Carousel-module__carousel__card___lga-D","carousel__cardContent":"Carousel-module__carousel__cardContent___v0jc-","carousel__cardImageWrapper":"Carousel-module__carousel__cardImageWrapper___aFqXD","carousel__cardImage":"Carousel-module__carousel__cardImage___4MrRU","carousel__cardTitle":"Carousel-module__carousel__cardTitle___z-mMo","carousel__navigation":"Carousel-module__carousel__navigation___dMbcP","carousel__arrows":"Carousel-module__carousel__arrows___uj5nF","carousel__dotsList":"Carousel-module__carousel__dotsList___upZ7L","carousel__dot":"Carousel-module__carousel__dot___HwZc0","carousel__dot--active":"Carousel-module__carousel__dot--active___NxRvq"};
|
|
232
|
-
|
|
233
|
-
/**
|
|
234
|
-
* Carousel component for displaying multiple content cards in a sliding format.
|
|
235
|
-
* Supports responsive layouts with 3 cards on desktop and 1 card on mobile.
|
|
236
|
-
*/
|
|
237
|
-
const Carousel = ({
|
|
238
|
-
title,
|
|
239
|
-
subtitle,
|
|
240
|
-
buttonText,
|
|
241
|
-
buttonUrl,
|
|
242
|
-
cards,
|
|
243
|
-
showDots = true,
|
|
244
|
-
showArrows = true,
|
|
245
|
-
className
|
|
246
|
-
}) => {
|
|
247
|
-
const sliderRef = useRef(null);
|
|
248
|
-
const [currentSlide, setCurrentSlide] = useState(0);
|
|
249
|
-
|
|
250
|
-
// Uses document.documentElement.clientWidth to work correctly in iframes (Storybook)
|
|
251
|
-
const [isMobile, setIsMobile] = useState(() => {
|
|
252
|
-
if (typeof window !== 'undefined') {
|
|
253
|
-
return document.documentElement.clientWidth < 768;
|
|
254
|
-
}
|
|
255
|
-
return false;
|
|
256
|
-
});
|
|
257
|
-
useEffect(() => {
|
|
258
|
-
const handleResize = () => {
|
|
259
|
-
setIsMobile(document.documentElement.clientWidth < 768);
|
|
260
|
-
};
|
|
261
|
-
window.addEventListener('resize', handleResize);
|
|
262
|
-
return () => window.removeEventListener('resize', handleResize);
|
|
263
|
-
}, []);
|
|
264
|
-
const handlePrev = () => sliderRef.current?.slickPrev();
|
|
265
|
-
const handleNext = () => sliderRef.current?.slickNext();
|
|
266
|
-
const goToSlide = index => sliderRef.current?.slickGoTo(index);
|
|
267
|
-
const settings = {
|
|
268
|
-
dots: false,
|
|
269
|
-
infinite: true,
|
|
270
|
-
speed: 500,
|
|
271
|
-
slidesToShow: isMobile ? 1 : 3,
|
|
272
|
-
slidesToScroll: 1,
|
|
273
|
-
arrows: false,
|
|
274
|
-
beforeChange: (_, next) => setCurrentSlide(next)
|
|
275
|
-
};
|
|
276
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
277
|
-
className: classNames(styles$g.carousel, className)
|
|
278
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
279
|
-
className: styles$g.carousel__header
|
|
280
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
281
|
-
className: styles$g.carousel__headerContent
|
|
282
|
-
}, /*#__PURE__*/React.createElement("h2", {
|
|
283
|
-
className: styles$g.carousel__title
|
|
284
|
-
}, title), subtitle && /*#__PURE__*/React.createElement("p", {
|
|
285
|
-
className: styles$g.carousel__subtitle
|
|
286
|
-
}, subtitle)), buttonText && buttonUrl && /*#__PURE__*/React.createElement(Button, {
|
|
287
|
-
variant: "outlined-black",
|
|
288
|
-
onClick: () => window.location.href = buttonUrl,
|
|
289
|
-
style: {
|
|
290
|
-
minWidth: '215px',
|
|
291
|
-
minHeight: '56px'
|
|
292
|
-
}
|
|
293
|
-
}, buttonText)), /*#__PURE__*/React.createElement(Slider, _extends({
|
|
294
|
-
ref: sliderRef
|
|
295
|
-
}, settings, {
|
|
296
|
-
className: styles$g.carousel__slider
|
|
297
|
-
}), cards.map((card, index) => /*#__PURE__*/React.createElement("div", {
|
|
298
|
-
key: index,
|
|
299
|
-
className: styles$g.carousel__slideWrapper
|
|
300
|
-
}, /*#__PURE__*/React.createElement("a", {
|
|
301
|
-
href: card.linkUrl,
|
|
302
|
-
className: styles$g.carousel__card,
|
|
303
|
-
"aria-label": `${card.title} - ${card.linkText}`
|
|
304
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
305
|
-
className: styles$g.carousel__cardImageWrapper
|
|
306
|
-
}, /*#__PURE__*/React.createElement("img", {
|
|
307
|
-
src: card.imageUrl,
|
|
308
|
-
alt: card.imageAlt,
|
|
309
|
-
className: styles$g.carousel__cardImage
|
|
310
|
-
})), /*#__PURE__*/React.createElement("div", {
|
|
311
|
-
className: styles$g.carousel__cardContent
|
|
312
|
-
}, /*#__PURE__*/React.createElement("h3", {
|
|
313
|
-
className: styles$g.carousel__cardTitle
|
|
314
|
-
}, card.title), /*#__PURE__*/React.createElement(Button, {
|
|
315
|
-
variant: "link-text-alt",
|
|
316
|
-
icon: "arrow-right"
|
|
317
|
-
}, card.linkText)))))), /*#__PURE__*/React.createElement("div", {
|
|
318
|
-
className: styles$g.carousel__navigation
|
|
319
|
-
}, !isMobile && showDots && /*#__PURE__*/React.createElement("div", {
|
|
320
|
-
className: styles$g.carousel__dotsList
|
|
321
|
-
}, cards.map((_, index) => /*#__PURE__*/React.createElement("button", {
|
|
322
|
-
key: index,
|
|
323
|
-
type: "button",
|
|
324
|
-
className: classNames(styles$g.carousel__dot, currentSlide === index && styles$g['carousel__dot--active']),
|
|
325
|
-
onClick: () => goToSlide(index),
|
|
326
|
-
"aria-label": `Go to slide ${index + 1}`
|
|
327
|
-
}))), showArrows && /*#__PURE__*/React.createElement("div", {
|
|
328
|
-
className: styles$g.carousel__arrows
|
|
329
|
-
}, /*#__PURE__*/React.createElement(Button, {
|
|
330
|
-
variant: "carousel-arrow-left",
|
|
331
|
-
onClick: handlePrev,
|
|
332
|
-
ariaLabel: "Previous"
|
|
333
|
-
}), /*#__PURE__*/React.createElement(Button, {
|
|
334
|
-
variant: "carousel-arrow-right",
|
|
335
|
-
onClick: handleNext,
|
|
336
|
-
ariaLabel: "Next"
|
|
337
|
-
}))));
|
|
338
|
-
};
|
|
339
|
-
|
|
340
230
|
var styles$f = {"footer":"Footer-module__footer___Oavyx","footer--mobile":"Footer-module__footer--mobile___9HQC-","footer__container":"Footer-module__footer__container___ohvnm","footer__links":"Footer-module__footer__links___DdVK8","footer__linkGroup":"Footer-module__footer__linkGroup___1B7JA","footer__linkList":"Footer-module__footer__linkList___j-DWF","footer__linkHeading":"Footer-module__footer__linkHeading___LtE6X","footer__link":"Footer-module__footer__link___G5HPW","footer__cta":"Footer-module__footer__cta___MRJLr","footer__socialIcons":"Footer-module__footer__socialIcons___j0aRp","footer__socialIcon":"Footer-module__footer__socialIcon___1uVTm","footer__countrySelector":"Footer-module__footer__countrySelector___pVtN5","footer__bottom":"Footer-module__footer__bottom___77bPL","footer__bottomLeft":"Footer-module__footer__bottomLeft___tlst1","footer__bottomLinks":"Footer-module__footer__bottomLinks___s22h7","footer__bottomLink":"Footer-module__footer__bottomLink___SLzwY","footer__copyright":"Footer-module__footer__copyright___4bZOF","footer__brandSection":"Footer-module__footer__brandSection___BBr5f","footer__logo":"Footer-module__footer__logo___mv-9M","footer__leftCol":"Footer-module__footer__leftCol___vmKNN","footer__motto":"Footer-module__footer__motto___QtB2m","footer__main":"Footer-module__footer__main___NSU9d","footer__badge":"Footer-module__footer__badge___faejb","footer__badgeIcon":"Footer-module__footer__badgeIcon___xJ519","footer__badgeText":"Footer-module__footer__badgeText___imXgG","footer__linkText":"Footer-module__footer__linkText___Gc18Z","footer__linkIcon":"Footer-module__footer__linkIcon___IZzJM","footer__countrySelectorIcon":"Footer-module__footer__countrySelectorIcon___hhEd4"};
|
|
341
231
|
|
|
342
232
|
/**
|
|
@@ -2326,5 +2216,5 @@ const SearchTriggerButton = ({
|
|
|
2326
2216
|
}, label));
|
|
2327
2217
|
};
|
|
2328
2218
|
|
|
2329
|
-
export { AlgoliaDynamicSearchLeybold as AlgoliaDynamicSearch, AlgoliaDynamicSearchLeybold, AppliedFilterTag, AppliedFilters, Button,
|
|
2219
|
+
export { AlgoliaDynamicSearchLeybold as AlgoliaDynamicSearch, AlgoliaDynamicSearchLeybold, AppliedFilterTag, AppliedFilters, Button, ContentCardHorizontal, FederatedInstantResultsLayout, FederatedResultsView, FederatedSearchExperience, FilterAccordion, FilterItem, FilterSearch, FiltersPanel, Footer, FooterBottom, FooterLink, FooterLinkGroup, FooterSocialIcon, FooterSocialIcons, ModalCloseButton, Pagination, PaginationButton, PaginationEllipsis, PaginationItem, ProductCardHorizontal, QrFormLeybold as QrForm, QrFormLeybold, ResultsColumn, ResultsCount, ResultsList, SearchBar, SearchIcon, SearchInput, SearchModal, SearchSubmitButton, SearchTriggerButton, SeeAllLinkButton };
|
|
2330
2220
|
//# sourceMappingURL=index.esm.js.map
|