@asantemedia-org/leybold-design-system 1.0.9 → 1.0.10

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.
@@ -323,7 +323,8 @@
323
323
  min-width: 0;
324
324
  }
325
325
 
326
- .ProductCardHorizontal-module__productTitle___xBuu7 {
326
+ .ProductCardHorizontal-module__productTitle___xBuu7,
327
+ h3.ProductCardHorizontal-module__productTitle___xBuu7 {
327
328
  margin: 0 0 0.25rem 0;
328
329
  font-size: clamp(12px, 1.25vw, 14px);
329
330
  font-weight: 600;
package/dist/index.js CHANGED
@@ -1,5 +1,7 @@
1
- import React, { useMemo, useState, useCallback, useRef, useEffect } from 'react';
2
- import { ProductDetailsCard, AlgoliaDynamicSearchRaw, QrForm } from '@asantemedia-org/edwardsvacuum-design-system';
1
+ 'use strict';
2
+
3
+ var React = require('react');
4
+ var edwardsvacuumDesignSystem = require('@asantemedia-org/edwardsvacuum-design-system');
3
5
 
4
6
  function _extends() {
5
7
  return _extends = Object.assign ? Object.assign.bind() : function (n) {
@@ -275,7 +277,7 @@ const Pagination = ({
275
277
  className,
276
278
  ariaLabel = "Pagination"
277
279
  }) => {
278
- const pageNumbers = useMemo(() => generatePageNumbers(currentPage, totalPages, maxVisiblePages), [currentPage, totalPages, maxVisiblePages]);
280
+ const pageNumbers = React.useMemo(() => generatePageNumbers(currentPage, totalPages, maxVisiblePages), [currentPage, totalPages, maxVisiblePages]);
279
281
  const handlePageChange = page => {
280
282
  if (page >= 1 && page <= totalPages && page !== currentPage) {
281
283
  onPageChange(page);
@@ -347,15 +349,15 @@ const Image = ({
347
349
  srcSet,
348
350
  sizes
349
351
  }) => {
350
- const [isLoading, setIsLoading] = useState(true);
351
- const [hasError, setHasError] = useState(false);
352
- const [currentSrc, setCurrentSrc] = useState(src);
353
- const handleLoad = useCallback(() => {
352
+ const [isLoading, setIsLoading] = React.useState(true);
353
+ const [hasError, setHasError] = React.useState(false);
354
+ const [currentSrc, setCurrentSrc] = React.useState(src);
355
+ const handleLoad = React.useCallback(() => {
354
356
  setIsLoading(false);
355
357
  setHasError(false);
356
358
  onLoad?.();
357
359
  }, [onLoad]);
358
- const handleError = useCallback(() => {
360
+ const handleError = React.useCallback(() => {
359
361
  setIsLoading(false);
360
362
  setHasError(true);
361
363
 
@@ -534,7 +536,7 @@ const ProductCardDetails = ({
534
536
  };
535
537
  return /*#__PURE__*/React.createElement("div", {
536
538
  className: styles$b.productDetails
537
- }, /*#__PURE__*/React.createElement(ProductDetailsCard, {
539
+ }, /*#__PURE__*/React.createElement(edwardsvacuumDesignSystem.ProductDetailsCard, {
538
540
  className: `${className}`,
539
541
  title: title,
540
542
  imageUrl: imageUrl,
@@ -613,7 +615,7 @@ const AlgoliaDynamicSearchLeybold = props => {
613
615
  ProductCard: ProductCardAdapter,
614
616
  ProductDetailsCard: ProductCardDetailsAdapter
615
617
  };
616
- return /*#__PURE__*/React.createElement(AlgoliaDynamicSearchRaw, _extends({}, props, {
618
+ return /*#__PURE__*/React.createElement(edwardsvacuumDesignSystem.AlgoliaDynamicSearchRaw, _extends({}, props, {
617
619
  innerComponents: innerComponents
618
620
  }));
619
621
  };
@@ -666,7 +668,7 @@ const QrFormButtonAdapter = ({
666
668
  const QrFormLeybold = props => {
667
669
  return /*#__PURE__*/React.createElement("div", {
668
670
  className: "qr-journey-form-wrapper"
669
- }, /*#__PURE__*/React.createElement(QrForm, _extends({}, props, {
671
+ }, /*#__PURE__*/React.createElement(edwardsvacuumDesignSystem.QrForm, _extends({}, props, {
670
672
  ButtonComponent: QrFormButtonAdapter
671
673
  })));
672
674
  };
@@ -712,9 +714,9 @@ const SearchModal = ({
712
714
  children,
713
715
  className = ''
714
716
  }) => {
715
- const modalRef = useRef(null);
716
- const previouslyFocusedElement = useRef(null);
717
- useEffect(() => {
717
+ const modalRef = React.useRef(null);
718
+ const previouslyFocusedElement = React.useRef(null);
719
+ React.useEffect(() => {
718
720
  if (isOpen) {
719
721
  // Store the previously focused element
720
722
  previouslyFocusedElement.current = document.activeElement;
@@ -739,7 +741,7 @@ const SearchModal = ({
739
741
  document.body.style.overflow = '';
740
742
  };
741
743
  }, [isOpen]);
742
- useEffect(() => {
744
+ React.useEffect(() => {
743
745
  const handleEscape = event => {
744
746
  if (event.key === 'Escape' && isOpen) {
745
747
  onClose();
@@ -750,7 +752,7 @@ const SearchModal = ({
750
752
  }, [isOpen, onClose]);
751
753
 
752
754
  // Focus trap implementation
753
- useEffect(() => {
755
+ React.useEffect(() => {
754
756
  if (!isOpen || !modalRef.current) return;
755
757
  const modal = modalRef.current;
756
758
  const focusableElements = modal.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');
@@ -1167,10 +1169,10 @@ const FilterAccordion = ({
1167
1169
  onValueToggle,
1168
1170
  className
1169
1171
  }) => {
1170
- const [searchQuery, setSearchQuery] = useState("");
1172
+ const [searchQuery, setSearchQuery] = React.useState("");
1171
1173
 
1172
1174
  // Filter facet values based on search query
1173
- const filteredValues = useMemo(() => {
1175
+ const filteredValues = React.useMemo(() => {
1174
1176
  if (!searchQuery.trim()) {
1175
1177
  return facet.values;
1176
1178
  }
@@ -1293,7 +1295,7 @@ const AppliedFilters = ({
1293
1295
  className
1294
1296
  }) => {
1295
1297
  // Extract all refined (selected) filters
1296
- const appliedFilters = useMemo(() => {
1298
+ const appliedFilters = React.useMemo(() => {
1297
1299
  const filters = [];
1298
1300
  facets.forEach(facet => {
1299
1301
  facet.values.forEach(value => {
@@ -1358,7 +1360,7 @@ const FiltersPanel = ({
1358
1360
  className
1359
1361
  }) => {
1360
1362
  // Track which accordions are expanded
1361
- const [expandedAccordions, setExpandedAccordions] = useState(() => {
1363
+ const [expandedAccordions, setExpandedAccordions] = React.useState(() => {
1362
1364
  // Initialize with default expanded facets
1363
1365
  const expanded = new Set();
1364
1366
  facets.forEach(facet => {
@@ -1368,7 +1370,7 @@ const FiltersPanel = ({
1368
1370
  });
1369
1371
  return expanded;
1370
1372
  });
1371
- const handleAccordionToggle = useCallback(facetId => {
1373
+ const handleAccordionToggle = React.useCallback(facetId => {
1372
1374
  setExpandedAccordions(prev => {
1373
1375
  const next = new Set(prev);
1374
1376
  if (next.has(facetId)) {
@@ -1379,13 +1381,13 @@ const FiltersPanel = ({
1379
1381
  return next;
1380
1382
  });
1381
1383
  }, []);
1382
- const handleValueToggle = useCallback((attribute, value) => {
1384
+ const handleValueToggle = React.useCallback((attribute, value) => {
1383
1385
  onFacetToggle(attribute, value);
1384
1386
  }, [onFacetToggle]);
1385
- const handleRemoveFilter = useCallback((attribute, value) => {
1387
+ const handleRemoveFilter = React.useCallback((attribute, value) => {
1386
1388
  onFacetToggle(attribute, value);
1387
1389
  }, [onFacetToggle]);
1388
- const handleClearAll = useCallback(() => {
1390
+ const handleClearAll = React.useCallback(() => {
1389
1391
  // Remove all refined facets
1390
1392
  facets.forEach(facet => {
1391
1393
  facet.values.forEach(value => {
@@ -1773,8 +1775,15 @@ const SearchTriggerButton = ({
1773
1775
  }, label));
1774
1776
  };
1775
1777
 
1776
- export { AlgoliaDynamicSearchLeybold as AlgoliaDynamicSearch, AlgoliaDynamicSearchLeybold, AppliedFilterTag, AppliedFilters, Button, ContentCardHorizontal, FederatedInstantResultsLayout, FederatedResultsView, FederatedSearchExperience, FilterAccordion, FilterItem, FilterSearch, FiltersPanel, ModalCloseButton, Pagination, PaginationButton, PaginationEllipsis, PaginationItem, ProductCardHorizontal, QrFormLeybold as QrForm, QrFormLeybold, ResultsColumn, ResultsCount, ResultsList, SearchBar, SearchIcon, SearchInput, SearchModal, SearchSubmitButton, SearchTriggerButton, SeeAllLinkButton };
1777
- archExperience;
1778
+ exports.AlgoliaDynamicSearch = AlgoliaDynamicSearchLeybold;
1779
+ exports.AlgoliaDynamicSearchLeybold = AlgoliaDynamicSearchLeybold;
1780
+ exports.AppliedFilterTag = AppliedFilterTag;
1781
+ exports.AppliedFilters = AppliedFilters;
1782
+ exports.Button = Button;
1783
+ exports.ContentCardHorizontal = ContentCardHorizontal;
1784
+ exports.FederatedInstantResultsLayout = FederatedInstantResultsLayout;
1785
+ exports.FederatedResultsView = FederatedResultsView;
1786
+ exports.FederatedSearchExperience = FederatedSearchExperience;
1778
1787
  exports.FilterAccordion = FilterAccordion;
1779
1788
  exports.FilterItem = FilterItem;
1780
1789
  exports.FilterSearch = FilterSearch;
package/dist/index.scss CHANGED
@@ -323,7 +323,8 @@
323
323
  min-width: 0;
324
324
  }
325
325
 
326
- .ProductCardHorizontal-module__productTitle___xBuu7 {
326
+ .ProductCardHorizontal-module__productTitle___xBuu7,
327
+ h3.ProductCardHorizontal-module__productTitle___xBuu7 {
327
328
  margin: 0 0 0.25rem 0;
328
329
  font-size: clamp(12px, 1.25vw, 14px);
329
330
  font-weight: 600;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@asantemedia-org/leybold-design-system",
3
- "version": "1.0.9",
3
+ "version": "1.0.10",
4
4
  "description": "Design system for Leybold",
5
5
  "license": "UNLICENSED",
6
6
  "main": "dist/index.js",