@asantemedia-org/leybold-design-system 1.0.4 → 1.0.6

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.
@@ -72,6 +72,11 @@
72
72
  .Button-module__button--text___iZIMo:active:not(.Button-module__button--disabled___IuOY8) {
73
73
  background-color: rgba(226, 0, 26, 0.2);
74
74
  }
75
+ .Button-module__button--extra-small___R0QTM {
76
+ padding: 0.5rem 0.675rem;
77
+ font-size: 0.5rem;
78
+ line-height: 0.5;
79
+ }
75
80
  .Button-module__button--small___ADJQe {
76
81
  padding: 1rem 1.35rem;
77
82
  font-size: 12px;
@@ -438,7 +443,6 @@
438
443
  display: grid;
439
444
  grid-template-columns: repeat(1, 1fr);
440
445
  grid-template-rows: auto;
441
- gap: 10px;
442
446
  }
443
447
  @media (min-width: 992px) {
444
448
  .ProductCardDetails-module__productDetails___-sx2l .cmp-card--type-product_details {
@@ -447,6 +451,7 @@
447
451
  }
448
452
  .ProductCardDetails-module__productDetails___-sx2l .cmp-card--type-product_details__product-info {
449
453
  position: relative;
454
+ max-width: 480px;
450
455
  }
451
456
  .ProductCardDetails-module__productDetails___-sx2l .cmp-card--type-product_details__header {
452
457
  margin-bottom: 1rem;
@@ -576,7 +581,6 @@
576
581
  }
577
582
  @media (min-width: 961px) {
578
583
  .cmpAlgoliaDynamicSearchWidget__container {
579
- width: 80vw;
580
584
  max-width: 1280px;
581
585
  }
582
586
  }
@@ -716,13 +720,37 @@
716
720
  font-size: 21px;
717
721
  font-weight: 700;
718
722
  line-height: 1.6em;
719
- color: #4a4e54;
723
+ color: #e2001a;
720
724
  margin: 1rem 0 0 0;
721
725
  }
722
726
  .qr-journey-form-wrapper .qr-form-page {
723
727
  display: none;
724
728
  position: relative;
725
729
  }
730
+ @media (min-width: 768px) {
731
+ .qr-journey-form-wrapper .qr-form-page-section[data-page="3"] .qr-form-fields {
732
+ display: grid;
733
+ grid-template-columns: repeat(2, 1fr);
734
+ grid-template-rows: repeat(3, 1fr);
735
+ grid-template-areas: "select select" "email tel" "city zip";
736
+ gap: 1rem;
737
+ }
738
+ .qr-journey-form-wrapper .qr-form-page-section[data-page="3"] .qr-form-fields .qr-form-filed-wrapper.select {
739
+ grid-area: select;
740
+ }
741
+ .qr-journey-form-wrapper .qr-form-page-section[data-page="3"] .qr-form-fields .qr-form-filed-wrapper.email {
742
+ grid-area: email;
743
+ }
744
+ .qr-journey-form-wrapper .qr-form-page-section[data-page="3"] .qr-form-fields .qr-form-filed-wrapper.tel {
745
+ grid-area: tel;
746
+ }
747
+ .qr-journey-form-wrapper .qr-form-page-section[data-page="3"] .qr-form-fields .qr-form-filed-wrappertext:first-child {
748
+ grid-area: city;
749
+ }
750
+ .qr-journey-form-wrapper .qr-form-page-section[data-page="3"] .qr-form-fields .qr-form-filed-wrappertext:last-child {
751
+ grid-area: zip;
752
+ }
753
+ }
726
754
  .qr-journey-form-wrapper .qr-form-page.active {
727
755
  display: block;
728
756
  }
@@ -878,12 +906,15 @@
878
906
  .qr-journey-form-wrapper .qr-form-filed-wrapper label select,
879
907
  .qr-journey-form-wrapper .qr-form-filed-wrapper label textarea {
880
908
  line-height: 1em;
881
- padding: 10px 18px;
909
+ padding: 1.5rem 1rem 0 1rem;
882
910
  box-sizing: content-box;
883
911
  }
884
912
  .qr-journey-form-wrapper .qr-form-filed-wrapper label select {
885
913
  padding: 10px 18px;
886
914
  position: relative;
915
+ -webkit-appearance: none;
916
+ -moz-appearance: none;
917
+ appearance: none;
887
918
  }
888
919
  .qr-journey-form-wrapper .qr-form-filed-wrapper label select + .select-custom-arrow {
889
920
  position: absolute;
@@ -891,7 +922,6 @@
891
922
  right: 2px;
892
923
  height: calc(100% - 1em - 6px);
893
924
  width: 17px;
894
- background-color: #ffffff;
895
925
  }
896
926
  .qr-journey-form-wrapper .qr-form-filed-wrapper label select + .select-custom-arrow::after, .qr-journey-form-wrapper .qr-form-filed-wrapper label select + .select-custom-arrow::before {
897
927
  content: "";
@@ -947,10 +977,11 @@
947
977
  height: calc(2.3em + 20px);
948
978
  padding: 0 10px;
949
979
  margin: 0;
950
- border: 1px solid #c5c7c4;
980
+ border: 0px;
981
+ border-bottom: 1px solid #c5c7c4;
951
982
  border-right: none;
952
983
  border-radius: 0;
953
- background: #ffffff;
984
+ background: transparent;
954
985
  box-sizing: border-box;
955
986
  cursor: pointer;
956
987
  -webkit-user-select: none;
@@ -987,7 +1018,7 @@
987
1018
  height: calc(2.3em + 20px);
988
1019
  padding: 10px 18px;
989
1020
  margin: 0;
990
- border: 1px solid #c5c7c4;
1021
+ border-bottom: 1px solid #c5c7c4;
991
1022
  border-radius: 0;
992
1023
  font-size: 18px;
993
1024
  font-family: inherit;
@@ -1077,6 +1108,7 @@
1077
1108
  }
1078
1109
  }
1079
1110
  .qr-journey-form-wrapper .disabled-product-fields-section .qr-form-fields .qr-form-filed-wrapper label .label {
1111
+ display: block;
1080
1112
  height: 1em;
1081
1113
  opacity: 1;
1082
1114
  font-weight: 700;
@@ -1089,10 +1121,19 @@
1089
1121
  font-weight: 400;
1090
1122
  background-color: transparent;
1091
1123
  }
1124
+ .qr-journey-form-wrapper .qr-form-page-section[data-page="1"] .qr-form-navigation > div {
1125
+ display: none;
1126
+ }
1092
1127
  .qr-journey-form-wrapper .qr-form-navigation {
1093
1128
  display: grid;
1094
1129
  grid-template-columns: repeat(2, 1fr);
1095
1130
  gap: 1rem;
1131
+ margin: 1rem auto 0 0;
1132
+ }
1133
+ @media (min-width: 768px) {
1134
+ .qr-journey-form-wrapper .qr-form-navigation {
1135
+ width: 65%;
1136
+ }
1096
1137
  }
1097
1138
  .qr-journey-form-wrapper .qr-form-navigation input[type=submit] {
1098
1139
  padding: 18px;
@@ -1227,7 +1268,7 @@
1227
1268
  margin-bottom: 50px;
1228
1269
  border: 1px solid #e2001a;
1229
1270
  border-radius: 50%;
1230
- color: #546672;
1271
+ color: rgba(84, 102, 114, 0.5);
1231
1272
  font-weight: 700;
1232
1273
  }
1233
1274
  .qr-journey-form-wrapper.desktop-true .progress-indicator-desktop li .bullet-point::after {
@@ -1258,7 +1299,7 @@
1258
1299
  .qr-journey-form-wrapper.desktop-true .progress-indicator-desktop li h3 {
1259
1300
  flex: 2;
1260
1301
  margin: 0 10px;
1261
- color: #546672;
1302
+ color: rgba(84, 102, 114, 0.5);
1262
1303
  font-size: 1.25rem;
1263
1304
  font-weight: 400;
1264
1305
  line-height: 30px;
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) {
@@ -11,7 +13,7 @@ function _extends() {
11
13
  }, _extends.apply(null, arguments);
12
14
  }
13
15
 
14
- var styles$f = {"button":"Button-module__button___18Bed","button--primary":"Button-module__button--primary___VuF-P","button--disabled":"Button-module__button--disabled___IuOY8","button--secondary":"Button-module__button--secondary___lD5E3","button--outline":"Button-module__button--outline___wB6-g","button--text":"Button-module__button--text___iZIMo","button--small":"Button-module__button--small___ADJQe","button--medium":"Button-module__button--medium___ZuR4Z","button--large":"Button-module__button--large___-FaV5"};
16
+ var styles$f = {"button":"Button-module__button___18Bed","button--primary":"Button-module__button--primary___VuF-P","button--disabled":"Button-module__button--disabled___IuOY8","button--secondary":"Button-module__button--secondary___lD5E3","button--outline":"Button-module__button--outline___wB6-g","button--text":"Button-module__button--text___iZIMo","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"};
15
17
 
16
18
  function getDefaultExportFromCjs (x) {
17
19
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
@@ -93,16 +95,16 @@ var classNames = /*@__PURE__*/getDefaultExportFromCjs(classnamesExports);
93
95
  */
94
96
  const Button = ({
95
97
  children,
96
- variant = 'primary',
97
- size = 'medium',
98
+ variant = "primary",
99
+ size = "medium",
98
100
  disabled = false,
99
101
  onClick,
100
- type = 'button',
102
+ type = "button",
101
103
  className,
102
104
  ...props
103
105
  }) => {
104
106
  const buttonClasses = classNames(styles$f.button, styles$f[`button--${variant}`], styles$f[`button--${size}`], {
105
- [styles$f['button--disabled']]: disabled
107
+ [styles$f["button--disabled"]]: disabled
106
108
  }, className);
107
109
  return /*#__PURE__*/React.createElement("button", _extends({
108
110
  type: type,
@@ -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
 
@@ -482,7 +484,7 @@ const ProductCardHorizontal = ({
482
484
  }, price || " "), button && /*#__PURE__*/React.createElement(Button, {
483
485
  className: styles$d.productButton,
484
486
  onClick: button.onClick,
485
- size: "small"
487
+ size: "extra-small"
486
488
  }, button.label))));
487
489
  };
488
490
 
@@ -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
  };
@@ -664,7 +666,7 @@ const QrFormButtonAdapter = ({
664
666
  const QrFormLeybold = props => {
665
667
  return /*#__PURE__*/React.createElement("div", {
666
668
  className: "qr-journey-form-wrapper"
667
- }, /*#__PURE__*/React.createElement(QrForm, _extends({}, props, {
669
+ }, /*#__PURE__*/React.createElement(edwardsvacuumDesignSystem.QrForm, _extends({}, props, {
668
670
  ButtonComponent: QrFormButtonAdapter
669
671
  })));
670
672
  };
@@ -710,9 +712,9 @@ const SearchModal = ({
710
712
  children,
711
713
  className = ''
712
714
  }) => {
713
- const modalRef = useRef(null);
714
- const previouslyFocusedElement = useRef(null);
715
- useEffect(() => {
715
+ const modalRef = React.useRef(null);
716
+ const previouslyFocusedElement = React.useRef(null);
717
+ React.useEffect(() => {
716
718
  if (isOpen) {
717
719
  // Store the previously focused element
718
720
  previouslyFocusedElement.current = document.activeElement;
@@ -737,7 +739,7 @@ const SearchModal = ({
737
739
  document.body.style.overflow = '';
738
740
  };
739
741
  }, [isOpen]);
740
- useEffect(() => {
742
+ React.useEffect(() => {
741
743
  const handleEscape = event => {
742
744
  if (event.key === 'Escape' && isOpen) {
743
745
  onClose();
@@ -748,7 +750,7 @@ const SearchModal = ({
748
750
  }, [isOpen, onClose]);
749
751
 
750
752
  // Focus trap implementation
751
- useEffect(() => {
753
+ React.useEffect(() => {
752
754
  if (!isOpen || !modalRef.current) return;
753
755
  const modal = modalRef.current;
754
756
  const focusableElements = modal.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');
@@ -1165,10 +1167,10 @@ const FilterAccordion = ({
1165
1167
  onValueToggle,
1166
1168
  className
1167
1169
  }) => {
1168
- const [searchQuery, setSearchQuery] = useState("");
1170
+ const [searchQuery, setSearchQuery] = React.useState("");
1169
1171
 
1170
1172
  // Filter facet values based on search query
1171
- const filteredValues = useMemo(() => {
1173
+ const filteredValues = React.useMemo(() => {
1172
1174
  if (!searchQuery.trim()) {
1173
1175
  return facet.values;
1174
1176
  }
@@ -1291,7 +1293,7 @@ const AppliedFilters = ({
1291
1293
  className
1292
1294
  }) => {
1293
1295
  // Extract all refined (selected) filters
1294
- const appliedFilters = useMemo(() => {
1296
+ const appliedFilters = React.useMemo(() => {
1295
1297
  const filters = [];
1296
1298
  facets.forEach(facet => {
1297
1299
  facet.values.forEach(value => {
@@ -1356,7 +1358,7 @@ const FiltersPanel = ({
1356
1358
  className
1357
1359
  }) => {
1358
1360
  // Track which accordions are expanded
1359
- const [expandedAccordions, setExpandedAccordions] = useState(() => {
1361
+ const [expandedAccordions, setExpandedAccordions] = React.useState(() => {
1360
1362
  // Initialize with default expanded facets
1361
1363
  const expanded = new Set();
1362
1364
  facets.forEach(facet => {
@@ -1366,7 +1368,7 @@ const FiltersPanel = ({
1366
1368
  });
1367
1369
  return expanded;
1368
1370
  });
1369
- const handleAccordionToggle = useCallback(facetId => {
1371
+ const handleAccordionToggle = React.useCallback(facetId => {
1370
1372
  setExpandedAccordions(prev => {
1371
1373
  const next = new Set(prev);
1372
1374
  if (next.has(facetId)) {
@@ -1377,13 +1379,13 @@ const FiltersPanel = ({
1377
1379
  return next;
1378
1380
  });
1379
1381
  }, []);
1380
- const handleValueToggle = useCallback((attribute, value) => {
1382
+ const handleValueToggle = React.useCallback((attribute, value) => {
1381
1383
  onFacetToggle(attribute, value);
1382
1384
  }, [onFacetToggle]);
1383
- const handleRemoveFilter = useCallback((attribute, value) => {
1385
+ const handleRemoveFilter = React.useCallback((attribute, value) => {
1384
1386
  onFacetToggle(attribute, value);
1385
1387
  }, [onFacetToggle]);
1386
- const handleClearAll = useCallback(() => {
1388
+ const handleClearAll = React.useCallback(() => {
1387
1389
  // Remove all refined facets
1388
1390
  facets.forEach(facet => {
1389
1391
  facet.values.forEach(value => {
@@ -1771,8 +1773,15 @@ const SearchTriggerButton = ({
1771
1773
  }, label));
1772
1774
  };
1773
1775
 
1774
- export { AlgoliaDynamicSearchLeybold, AppliedFilterTag, AppliedFilters, Button, ContentCardHorizontal, FederatedInstantResultsLayout, FederatedResultsView, FederatedSearchExperience, FilterAccordion, FilterItem, FilterSearch, FiltersPanel, ModalCloseButton, Pagination, PaginationButton, PaginationEllipsis, PaginationItem, ProductCardHorizontal, QrFormLeybold, ResultsColumn, ResultsCount, ResultsList, SearchBar, SearchIcon, SearchInput, SearchModal, SearchSubmitButton, SearchTriggerButton, SeeAllLinkButton };
1775
- ence = FederatedSearchExperience;
1776
+ exports.AlgoliaDynamicSearch = AlgoliaDynamicSearchLeybold;
1777
+ exports.AlgoliaDynamicSearchLeybold = AlgoliaDynamicSearchLeybold;
1778
+ exports.AppliedFilterTag = AppliedFilterTag;
1779
+ exports.AppliedFilters = AppliedFilters;
1780
+ exports.Button = Button;
1781
+ exports.ContentCardHorizontal = ContentCardHorizontal;
1782
+ exports.FederatedInstantResultsLayout = FederatedInstantResultsLayout;
1783
+ exports.FederatedResultsView = FederatedResultsView;
1784
+ exports.FederatedSearchExperience = FederatedSearchExperience;
1776
1785
  exports.FilterAccordion = FilterAccordion;
1777
1786
  exports.FilterItem = FilterItem;
1778
1787
  exports.FilterSearch = FilterSearch;
@@ -1783,6 +1792,7 @@ exports.PaginationButton = PaginationButton;
1783
1792
  exports.PaginationEllipsis = PaginationEllipsis;
1784
1793
  exports.PaginationItem = PaginationItem;
1785
1794
  exports.ProductCardHorizontal = ProductCardHorizontal;
1795
+ exports.QrForm = QrFormLeybold;
1786
1796
  exports.QrFormLeybold = QrFormLeybold;
1787
1797
  exports.ResultsColumn = ResultsColumn;
1788
1798
  exports.ResultsCount = ResultsCount;