@blaze-cms/react-page-builder 0.146.0-node18-core-styles.0 → 0.146.0-node18-core-styles.2

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 (95) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/lib/application/query/index.js +18 -15
  3. package/lib/application/query/index.js.map +1 -1
  4. package/lib/components/Card/Card.js +3 -1
  5. package/lib/components/Card/Card.js.map +1 -1
  6. package/lib/components/ContentGroup/ContentGroupTabs.js +0 -1
  7. package/lib/components/ContentGroup/ContentGroupTabs.js.map +1 -1
  8. package/lib/components/ItemList/ItemListButton/ItemListButton.js +9 -7
  9. package/lib/components/ItemList/ItemListButton/ItemListButton.js.map +1 -1
  10. package/lib/components/ItemList/ItemListCounter/ItemListCounter.js +2 -2
  11. package/lib/components/ItemList/ItemListCounter/ItemListCounter.js.map +1 -1
  12. package/lib/components/ItemList/icons/AddedBookmark.js +41 -0
  13. package/lib/components/ItemList/icons/AddedBookmark.js.map +1 -0
  14. package/lib/components/ItemList/icons/BaseBookmark.js +45 -0
  15. package/lib/components/ItemList/icons/BaseBookmark.js.map +1 -0
  16. package/lib/components/ItemList/icons/HoverBookmark.js +43 -0
  17. package/lib/components/ItemList/icons/HoverBookmark.js.map +1 -0
  18. package/lib/components/ItemList/icons/RemoveBookmark.js +41 -0
  19. package/lib/components/ItemList/icons/RemoveBookmark.js.map +1 -0
  20. package/lib/components/ItemList/icons/index.js +36 -0
  21. package/lib/components/ItemList/icons/index.js.map +1 -0
  22. package/lib/components/List/ListBuilder.js +1 -1
  23. package/lib/components/List/ListBuilder.js.map +1 -1
  24. package/lib/components/List/ListFactory.js +11 -5
  25. package/lib/components/List/ListFactory.js.map +1 -1
  26. package/lib/components/List/components/Full/FullRenderItem.js +32 -29
  27. package/lib/components/List/components/Full/FullRenderItem.js.map +1 -1
  28. package/lib/helpers/build-props-query.js +4 -2
  29. package/lib/helpers/build-props-query.js.map +1 -1
  30. package/lib/index.js +6 -0
  31. package/lib/index.js.map +1 -1
  32. package/lib/variants/LiveBlogList/LiveBlogList.js +116 -0
  33. package/lib/variants/LiveBlogList/LiveBlogList.js.map +1 -0
  34. package/lib/variants/LiveBlogList/index.js +43 -0
  35. package/lib/variants/LiveBlogList/index.js.map +1 -0
  36. package/lib/variants/index.js +3 -1
  37. package/lib/variants/index.js.map +1 -1
  38. package/lib-es/application/query/index.js +9 -1
  39. package/lib-es/application/query/index.js.map +1 -1
  40. package/lib-es/components/Card/Card.js +3 -1
  41. package/lib-es/components/Card/Card.js.map +1 -1
  42. package/lib-es/components/ContentGroup/ContentGroupTabs.js +0 -1
  43. package/lib-es/components/ContentGroup/ContentGroupTabs.js.map +1 -1
  44. package/lib-es/components/ItemList/ItemListButton/ItemListButton.js +9 -7
  45. package/lib-es/components/ItemList/ItemListButton/ItemListButton.js.map +1 -1
  46. package/lib-es/components/ItemList/ItemListCounter/ItemListCounter.js +2 -2
  47. package/lib-es/components/ItemList/ItemListCounter/ItemListCounter.js.map +1 -1
  48. package/lib-es/components/ItemList/icons/AddedBookmark.js +33 -0
  49. package/lib-es/components/ItemList/icons/AddedBookmark.js.map +1 -0
  50. package/lib-es/components/ItemList/icons/BaseBookmark.js +37 -0
  51. package/lib-es/components/ItemList/icons/BaseBookmark.js.map +1 -0
  52. package/lib-es/components/ItemList/icons/HoverBookmark.js +35 -0
  53. package/lib-es/components/ItemList/icons/HoverBookmark.js.map +1 -0
  54. package/lib-es/components/ItemList/icons/RemoveBookmark.js +33 -0
  55. package/lib-es/components/ItemList/icons/RemoveBookmark.js.map +1 -0
  56. package/lib-es/components/ItemList/icons/index.js +5 -0
  57. package/lib-es/components/ItemList/icons/index.js.map +1 -0
  58. package/lib-es/components/List/ListBuilder.js +1 -1
  59. package/lib-es/components/List/ListBuilder.js.map +1 -1
  60. package/lib-es/components/List/ListFactory.js +10 -4
  61. package/lib-es/components/List/ListFactory.js.map +1 -1
  62. package/lib-es/components/List/components/Full/FullRenderItem.js +34 -30
  63. package/lib-es/components/List/components/Full/FullRenderItem.js.map +1 -1
  64. package/lib-es/helpers/build-props-query.js +4 -2
  65. package/lib-es/helpers/build-props-query.js.map +1 -1
  66. package/lib-es/index.js +1 -1
  67. package/lib-es/index.js.map +1 -1
  68. package/lib-es/variants/LiveBlogList/LiveBlogList.js +90 -0
  69. package/lib-es/variants/LiveBlogList/LiveBlogList.js.map +1 -0
  70. package/lib-es/variants/LiveBlogList/index.js +12 -0
  71. package/lib-es/variants/LiveBlogList/index.js.map +1 -0
  72. package/lib-es/variants/index.js +3 -1
  73. package/lib-es/variants/index.js.map +1 -1
  74. package/package.json +6 -6
  75. package/src/application/query/index.js +11 -1
  76. package/src/components/Card/Card.js +2 -1
  77. package/src/components/ContentGroup/ContentGroupTabs.js +0 -1
  78. package/src/components/ItemList/ItemListButton/ItemListButton.js +11 -13
  79. package/src/components/ItemList/ItemListCounter/ItemListCounter.js +2 -2
  80. package/src/components/ItemList/icons/AddedBookmark.js +33 -0
  81. package/src/components/ItemList/icons/BaseBookmark.js +33 -0
  82. package/src/components/ItemList/icons/HoverBookmark.js +33 -0
  83. package/src/components/ItemList/icons/RemoveBookmark.js +33 -0
  84. package/src/components/ItemList/icons/index.js +4 -0
  85. package/src/components/List/ListBuilder.js +1 -1
  86. package/src/components/List/ListFactory.js +13 -4
  87. package/src/components/List/components/Full/FullRenderItem.js +45 -28
  88. package/src/helpers/build-props-query.js +3 -2
  89. package/src/index.js +2 -1
  90. package/src/variants/LiveBlogList/LiveBlogList.js +109 -0
  91. package/src/variants/LiveBlogList/index.js +13 -0
  92. package/src/variants/index.js +3 -1
  93. package/tests/unit/src/components/ItemList/__snapshots__/ItemListButton.test.js.snap +143 -35
  94. package/tests/unit/src/components/ItemList/__snapshots__/ItemListCounter.test.js.snap +37 -7
  95. package/tests/unit/src/helpers/build-props-query.test.js +13 -11
@@ -31,6 +31,8 @@ import { getItemListId, getItemListIds } from '../ItemList/helpers';
31
31
  import { useGetEntitySchemasAsObj } from '../../hooks';
32
32
  import { AND_OPERATOR, TEXT_SEARCH, ID, AND, FULL } from '../../constants';
33
33
 
34
+ export const VariantContext = React.createContext(null);
35
+
34
36
  const ListFactory = props => {
35
37
  const {
36
38
  entity: legacyEntity,
@@ -46,7 +48,8 @@ const ListFactory = props => {
46
48
  allSearchFilters,
47
49
  operator: filterOperator,
48
50
  sortProperties,
49
- itemListName
51
+ itemListName,
52
+ VariantComponent // extracted from props
50
53
  } = props;
51
54
  const { isPreview } = useContext(MainContext);
52
55
  const router = useRouter();
@@ -175,7 +178,11 @@ const ListFactory = props => {
175
178
  mainSchemas
176
179
  };
177
180
 
178
- return <ListBuilder {...listProps} />;
181
+ return (
182
+ <VariantContext.Provider value={VariantComponent}>
183
+ <ListBuilder {...listProps} />
184
+ </VariantContext.Provider>
185
+ );
179
186
  };
180
187
 
181
188
  ListFactory.propTypes = {
@@ -192,7 +199,8 @@ ListFactory.propTypes = {
192
199
  sort: PropTypes.string,
193
200
  allSearchFilters: PropTypes.array,
194
201
  sortProperties: PropTypes.array,
195
- itemListName: PropTypes.string
202
+ itemListName: PropTypes.string,
203
+ VariantComponent: PropTypes.func
196
204
  };
197
205
 
198
206
  ListFactory.defaultProps = {
@@ -207,7 +215,8 @@ ListFactory.defaultProps = {
207
215
  sort: '',
208
216
  operator: AND,
209
217
  allSearchFilters: [],
210
- itemListName: ''
218
+ itemListName: '',
219
+ VariantComponent: null
211
220
  };
212
221
 
213
222
  export default ListFactory;
@@ -2,35 +2,56 @@ import React, { useContext } from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import { Waypoint } from 'react-waypoint';
4
4
  import { MainContext } from '@blaze-cms/nextjs-components';
5
+ import { VariantContext } from '../../ListFactory';
5
6
  import BuildPBComponents from '../../../../hooks/helpers/buildPBComponents';
6
7
  import Banner from '../../../Banner';
7
8
  import { parsePropsToDisplay, shouldRenderWaypoint } from '../../../../helpers';
8
9
 
9
- const FullRenderItem = ({
10
- isInfinite,
11
- pageBuilderComponents,
12
- entityProps,
13
- propsToDisplay,
14
- entity,
15
- index,
16
- itemId,
17
- listTotal,
18
- initialOffset,
19
- currentListLength,
20
- triggerInfiniteScroll,
21
- parent,
22
- pageBuilderID,
23
- displayCount,
24
- shouldRenderBanner,
25
- bannerProps,
26
- bannerIndex
27
- }) => {
10
+ const FullRenderItem = props => {
11
+ const {
12
+ isInfinite,
13
+ pageBuilderComponents,
14
+ entityProps,
15
+ propsToDisplay,
16
+ entity,
17
+ index,
18
+ itemId,
19
+ listTotal,
20
+ initialOffset,
21
+ currentListLength,
22
+ triggerInfiniteScroll,
23
+ parent,
24
+ pageBuilderID,
25
+ displayCount,
26
+ shouldRenderBanner,
27
+ bannerProps,
28
+ bannerIndex
29
+ } = props;
28
30
  const { hasGTM } = useContext(MainContext);
31
+ const VariantComponent = useContext(VariantContext);
32
+
29
33
  if (!pageBuilderComponents) return null;
30
34
  const parsedPropsToDisplay = parsePropsToDisplay(entityProps, propsToDisplay);
31
35
  const currentItemIndex = initialOffset + index;
32
36
  const renderWaypoint =
33
37
  isInfinite && shouldRenderWaypoint(index, currentListLength, currentItemIndex, listTotal);
38
+
39
+ const defaultContent = (
40
+ <>
41
+ <div className="list__item list__item--full">
42
+ {BuildPBComponents(pageBuilderComponents, {
43
+ parent: { ...parent, itemId, itemEntity: entity },
44
+ hasGTM,
45
+ pageBuilderID
46
+ })}
47
+ </div>
48
+ {!VariantComponent &&
49
+ !!parsedPropsToDisplay.length && (
50
+ <>{parsedPropsToDisplay.map(prop => (prop ? <span key={prop}>{prop}</span> : null))}</>
51
+ )}
52
+ </>
53
+ );
54
+
34
55
  return (
35
56
  <>
36
57
  {renderWaypoint && <Waypoint onEnter={triggerInfiniteScroll} />}
@@ -40,16 +61,12 @@ const FullRenderItem = ({
40
61
  <span className="section-total">/{listTotal}</span>
41
62
  </div>
42
63
  )}
43
- <div className="list__item list__item--full">
44
- {BuildPBComponents(pageBuilderComponents, {
45
- parent: { ...parent, itemId, itemEntity: entity },
46
- hasGTM,
47
- pageBuilderID
48
- })}
49
- </div>
50
- {!!parsedPropsToDisplay.length && (
51
- <>{parsedPropsToDisplay.map(prop => (prop ? <span key={prop}>{prop}</span> : null))}</>
64
+ {VariantComponent ? (
65
+ <VariantComponent {...props}>{defaultContent}</VariantComponent>
66
+ ) : (
67
+ defaultContent
52
68
  )}
69
+
53
70
  {shouldRenderBanner && <Banner {...bannerProps} renderCounter={bannerIndex} />}
54
71
  </>
55
72
  );
@@ -79,7 +79,7 @@ const getTypeBaseProps = (entitySchema, cardOptions, extraPropsHaveCategory) =>
79
79
 
80
80
  const { interfaces, properties, dynamicProperties, relations } = entitySchema;
81
81
 
82
- const isContent = !!interfaces.includes('content/content');
82
+ const isContent = !!interfaces.includes('content/content-base');
83
83
  const hasCategory = checkProps(properties) || checkProps(dynamicProperties);
84
84
  const hasPreheader = properties[PREHEADER_PROP];
85
85
 
@@ -97,7 +97,8 @@ const getTypeBaseProps = (entitySchema, cardOptions, extraPropsHaveCategory) =>
97
97
  return { typeBasedProps, shouldAddCategoryProps };
98
98
  };
99
99
 
100
- const getContentProps = isContent => (isContent ? ['url', 'sponsored', 'featured'] : []);
100
+ // make sure all props are supported by content/content-base interface
101
+ const getContentProps = isContent => (isContent ? ['url', 'sponsored', 'featured', 'live'] : []);
101
102
 
102
103
  const getCategoyProps = (shouldAddCategoryProps, hasCategory, hasPreheader) => {
103
104
  if (!shouldAddCategoryProps) return [];
package/src/index.js CHANGED
@@ -13,7 +13,8 @@ export {
13
13
  generateMultiItemQuery,
14
14
  getEntitySchema,
15
15
  getSingleEntitySchema,
16
- getUser
16
+ getUser,
17
+ getCurrentUser
17
18
  } from './application/query';
18
19
  export {
19
20
  getInheritedFilters,
@@ -0,0 +1,109 @@
1
+ import React, { useRef, useState, useEffect } from 'react';
2
+ import dayjs from 'dayjs';
3
+ import relativeTime from 'dayjs/plugin/relativeTime';
4
+ import Button from '@blaze-react/button';
5
+ import { FaPlus, FaMinus } from 'react-icons/fa';
6
+ import { BsPinAngleFill } from 'react-icons/bs';
7
+
8
+ dayjs.extend(relativeTime);
9
+
10
+ const LiveBlogList = props => {
11
+ const { children, date, published, featured } = props;
12
+ const [isExpanded, setIsExpanded] = useState(false);
13
+ const [shouldShowButton, setShouldShowButton] = useState(false);
14
+ const [{ displayedDate, displayedTime }, setDisplayedDate] = useState({
15
+ displayedDate: '&nbsp;',
16
+ displayTime: ''
17
+ });
18
+ const usedDate = date || published;
19
+
20
+ const contentRef = useRef(null);
21
+
22
+ useEffect(
23
+ () => {
24
+ const timeout = setTimeout(() => {
25
+ if (contentRef.current) {
26
+ const contentHeight = contentRef.current.scrollHeight;
27
+ if (contentHeight > 380) {
28
+ setShouldShowButton(true);
29
+ }
30
+ }
31
+ }, 500); // delay to wait for content load
32
+ // todo: change to use mutation observer
33
+
34
+ return () => {
35
+ clearTimeout(timeout);
36
+ };
37
+ },
38
+ [children]
39
+ );
40
+
41
+ useEffect(
42
+ () => {
43
+ // delay setting time so no SSR issues based on timezone
44
+ let newDate = '';
45
+ if (usedDate) {
46
+ const diffInDays = dayjs().diff(dayjs(usedDate), 'day');
47
+ if (diffInDays < 1) {
48
+ newDate = dayjs(usedDate).fromNow();
49
+ } else if (diffInDays < 365) {
50
+ newDate = dayjs(usedDate).format('DD MMM');
51
+ } else {
52
+ newDate = dayjs(usedDate).format('DD MMM YYYY');
53
+ }
54
+ setDisplayedDate({
55
+ displayedDate: newDate,
56
+ displayedTime: dayjs(usedDate).format('HH:mm')
57
+ });
58
+ }
59
+ },
60
+ [date, published, usedDate]
61
+ );
62
+
63
+ const toggleExpanded = () => {
64
+ setIsExpanded(!isExpanded);
65
+ };
66
+
67
+ const isCollapsed = !isExpanded;
68
+ const baseClass = 'live-blog-container';
69
+ const modifier = featured ? ` ${baseClass}--featured` : '';
70
+ const className = `${baseClass}${modifier}`;
71
+
72
+ return (
73
+ <div className={className}>
74
+ {usedDate && (
75
+ <div className="live-blog-date">
76
+ {featured && <BsPinAngleFill />}
77
+ <span className="live-blog-date--date">{displayedDate}</span>
78
+ <span className="live-blog-date--time">{displayedTime}</span>
79
+ </div>
80
+ )}
81
+
82
+ <div
83
+ ref={contentRef}
84
+ className={`live-blog-content ${
85
+ isCollapsed ? 'live-blog-content--collapsed' : 'live-blog-content--opened'
86
+ }`}>
87
+ {children}
88
+ </div>
89
+
90
+ {shouldShowButton && (
91
+ <div className="live-blog-button-wrapper">
92
+ <Button className="live-blog-toggle" onClick={toggleExpanded} type="button">
93
+ {isExpanded ? (
94
+ <>
95
+ <FaMinus className="toggle-icon" /> Show Less
96
+ </>
97
+ ) : (
98
+ <>
99
+ <FaPlus className="toggle-icon" /> Show More
100
+ </>
101
+ )}
102
+ </Button>
103
+ </div>
104
+ )}
105
+ </div>
106
+ );
107
+ };
108
+
109
+ export default LiveBlogList;
@@ -0,0 +1,13 @@
1
+ import dynamic from 'next/dynamic';
2
+
3
+ const liveBlogList = {
4
+ VariantComponent: dynamic(() =>
5
+ import(/* webpackChunkName: "blazePbliveBlogList" */ './LiveBlogList')
6
+ ),
7
+ getSettings: componentSettings => ({
8
+ ...componentSettings,
9
+ modifier: 'liveBlogList'
10
+ })
11
+ };
12
+
13
+ export default liveBlogList;
@@ -6,6 +6,7 @@ import parallaxImageTextRight from './ParallaxImageTextRight';
6
6
  import thumbnailCarousel from './ThumbnailCarousel';
7
7
  import slideSummary from './SlideSummary';
8
8
  import floatingSideButton from './FloatingSideButton';
9
+ import liveBlogList from './LiveBlogList';
9
10
 
10
11
  export default {
11
12
  heroImage,
@@ -15,5 +16,6 @@ export default {
15
16
  parallaxImageTextRight,
16
17
  thumbnailCarousel,
17
18
  slideSummary,
18
- floatingSideButton
19
+ floatingSideButton,
20
+ liveBlogList
19
21
  };
@@ -3,24 +3,50 @@
3
3
  exports[`ItemListButton component should add and remove item to the list on click 1`] = `
4
4
  <DocumentFragment>
5
5
  <div
6
- aria-label="Add to list_name"
7
6
  class="item-list-button item-list-button--selected modifier"
8
7
  role="button"
8
+ tabindex="0"
9
9
  >
10
10
  <i>
11
11
  <svg
12
- fill="currentColor"
13
12
  height="1em"
14
- stroke="currentColor"
15
- stroke-width="0"
16
- viewBox="0 0 16 16"
13
+ version="1.1"
14
+ viewBox="0 0 24 29"
17
15
  width="1em"
18
16
  xmlns="http://www.w3.org/2000/svg"
19
17
  >
20
- <path
21
- d="M2 15.5V2a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v13.5a.5.5 0 0 1-.74.439L8 13.069l-5.26 2.87A.5.5 0 0 1 2 15.5zm8.854-9.646a.5.5 0 0 0-.708-.708L7.5 7.793 6.354 6.646a.5.5 0 1 0-.708.708l1.5 1.5a.5.5 0 0 0 .708 0l3-3z"
18
+ <title>
19
+ wishlist-button/added
20
+ </title>
21
+ <g
22
+ fill="none"
22
23
  fill-rule="evenodd"
23
- />
24
+ id="Wishlist"
25
+ stroke="none"
26
+ stroke-width="1"
27
+ >
28
+ <g
29
+ id="components"
30
+ transform="translate(-417, -433)"
31
+ >
32
+ <g
33
+ id="wishlist-button/added"
34
+ transform="translate(417, 433.0588)"
35
+ >
36
+ <path
37
+ d="M1.33333333,5.68434189e-14 L22.6666667,5.68434189e-14 C23.4030667,5.68434189e-14 24,0.59696 24,1.33333333 L24,27.0350667 C24,27.4033333 23.7014667,27.7019336 23.3333333,27.7019336 C23.2397333,27.7019336 23.1472,27.682 23.0617333,27.6438667 L12,22.7084 L0.938306667,27.6438667 C0.602066667,27.794 0.20788,27.6429333 0.0578533333,27.3068 C0.0197066667,27.2212 0,27.1286667 0,27.0350667 L0,1.33333333 C0,0.59696 0.59696,5.68434189e-14 1.33333333,5.68434189e-14 Z"
38
+ fill="currentColor"
39
+ fill-rule="nonzero"
40
+ id="Shape"
41
+ />
42
+ <path
43
+ d="M18.6268424,8.17492183 C19.1243859,7.67737836 19.1243859,6.87070105 18.6268424,6.3731576 C18.129299,5.87561415 17.3226216,5.87561413 16.8250782,6.37315756 L10.0913659,13.1094147 L7.1749509,10.1904547 C6.85309671,9.86860055 6.38398401,9.74290217 5.94432301,9.86070898 C5.50466201,9.97851579 5.16124768,10.3219301 5.04344087,10.7615911 C4.92563406,11.2012521 5.05133243,11.6703648 5.37318663,11.992219 L9.19048381,15.8095162 C9.42920298,16.0488396 9.75333852,16.183341 10.0913659,16.183341 C10.4293934,16.183341 10.7535289,16.0488396 10.9922481,15.8095162 L18.6268424,8.17492183 Z"
44
+ fill="#FFFFFF"
45
+ id="Path"
46
+ />
47
+ </g>
48
+ </g>
49
+ </g>
24
50
  </svg>
25
51
  </i>
26
52
  </div>
@@ -30,24 +56,50 @@ exports[`ItemListButton component should add and remove item to the list on clic
30
56
  exports[`ItemListButton component should add and remove item to the list on click 2`] = `
31
57
  <DocumentFragment>
32
58
  <div
33
- aria-label="Add to list_name"
34
59
  class="item-list-button item-list-button--selected modifier"
35
60
  role="button"
61
+ tabindex="0"
36
62
  >
37
63
  <i>
38
64
  <svg
39
- fill="currentColor"
40
65
  height="1em"
41
- stroke="currentColor"
42
- stroke-width="0"
43
- viewBox="0 0 16 16"
66
+ version="1.1"
67
+ viewBox="0 0 24 29"
44
68
  width="1em"
45
69
  xmlns="http://www.w3.org/2000/svg"
46
70
  >
47
- <path
48
- d="M2 15.5V2a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v13.5a.5.5 0 0 1-.74.439L8 13.069l-5.26 2.87A.5.5 0 0 1 2 15.5zm8.854-9.646a.5.5 0 0 0-.708-.708L7.5 7.793 6.354 6.646a.5.5 0 1 0-.708.708l1.5 1.5a.5.5 0 0 0 .708 0l3-3z"
71
+ <title>
72
+ wishlist-button/added
73
+ </title>
74
+ <g
75
+ fill="none"
49
76
  fill-rule="evenodd"
50
- />
77
+ id="Wishlist"
78
+ stroke="none"
79
+ stroke-width="1"
80
+ >
81
+ <g
82
+ id="components"
83
+ transform="translate(-417, -433)"
84
+ >
85
+ <g
86
+ id="wishlist-button/added"
87
+ transform="translate(417, 433.0588)"
88
+ >
89
+ <path
90
+ d="M1.33333333,5.68434189e-14 L22.6666667,5.68434189e-14 C23.4030667,5.68434189e-14 24,0.59696 24,1.33333333 L24,27.0350667 C24,27.4033333 23.7014667,27.7019336 23.3333333,27.7019336 C23.2397333,27.7019336 23.1472,27.682 23.0617333,27.6438667 L12,22.7084 L0.938306667,27.6438667 C0.602066667,27.794 0.20788,27.6429333 0.0578533333,27.3068 C0.0197066667,27.2212 0,27.1286667 0,27.0350667 L0,1.33333333 C0,0.59696 0.59696,5.68434189e-14 1.33333333,5.68434189e-14 Z"
91
+ fill="currentColor"
92
+ fill-rule="nonzero"
93
+ id="Shape"
94
+ />
95
+ <path
96
+ d="M18.6268424,8.17492183 C19.1243859,7.67737836 19.1243859,6.87070105 18.6268424,6.3731576 C18.129299,5.87561415 17.3226216,5.87561413 16.8250782,6.37315756 L10.0913659,13.1094147 L7.1749509,10.1904547 C6.85309671,9.86860055 6.38398401,9.74290217 5.94432301,9.86070898 C5.50466201,9.97851579 5.16124768,10.3219301 5.04344087,10.7615911 C4.92563406,11.2012521 5.05133243,11.6703648 5.37318663,11.992219 L9.19048381,15.8095162 C9.42920298,16.0488396 9.75333852,16.183341 10.0913659,16.183341 C10.4293934,16.183341 10.7535289,16.0488396 10.9922481,15.8095162 L18.6268424,8.17492183 Z"
97
+ fill="#FFFFFF"
98
+ id="Path"
99
+ />
100
+ </g>
101
+ </g>
102
+ </g>
51
103
  </svg>
52
104
  </i>
53
105
  </div>
@@ -57,24 +109,50 @@ exports[`ItemListButton component should add and remove item to the list on clic
57
109
  exports[`ItemListButton component should render button marked selected when current parent is in the list 1`] = `
58
110
  <DocumentFragment>
59
111
  <div
60
- aria-label="Add to list_name"
61
112
  class="item-list-button item-list-button--selected modifier"
62
113
  role="button"
114
+ tabindex="0"
63
115
  >
64
116
  <i>
65
117
  <svg
66
- fill="currentColor"
67
118
  height="1em"
68
- stroke="currentColor"
69
- stroke-width="0"
70
- viewBox="0 0 16 16"
119
+ version="1.1"
120
+ viewBox="0 0 24 29"
71
121
  width="1em"
72
122
  xmlns="http://www.w3.org/2000/svg"
73
123
  >
74
- <path
75
- d="M2 15.5V2a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v13.5a.5.5 0 0 1-.74.439L8 13.069l-5.26 2.87A.5.5 0 0 1 2 15.5zm8.854-9.646a.5.5 0 0 0-.708-.708L7.5 7.793 6.354 6.646a.5.5 0 1 0-.708.708l1.5 1.5a.5.5 0 0 0 .708 0l3-3z"
124
+ <title>
125
+ wishlist-button/added
126
+ </title>
127
+ <g
128
+ fill="none"
76
129
  fill-rule="evenodd"
77
- />
130
+ id="Wishlist"
131
+ stroke="none"
132
+ stroke-width="1"
133
+ >
134
+ <g
135
+ id="components"
136
+ transform="translate(-417, -433)"
137
+ >
138
+ <g
139
+ id="wishlist-button/added"
140
+ transform="translate(417, 433.0588)"
141
+ >
142
+ <path
143
+ d="M1.33333333,5.68434189e-14 L22.6666667,5.68434189e-14 C23.4030667,5.68434189e-14 24,0.59696 24,1.33333333 L24,27.0350667 C24,27.4033333 23.7014667,27.7019336 23.3333333,27.7019336 C23.2397333,27.7019336 23.1472,27.682 23.0617333,27.6438667 L12,22.7084 L0.938306667,27.6438667 C0.602066667,27.794 0.20788,27.6429333 0.0578533333,27.3068 C0.0197066667,27.2212 0,27.1286667 0,27.0350667 L0,1.33333333 C0,0.59696 0.59696,5.68434189e-14 1.33333333,5.68434189e-14 Z"
144
+ fill="currentColor"
145
+ fill-rule="nonzero"
146
+ id="Shape"
147
+ />
148
+ <path
149
+ d="M18.6268424,8.17492183 C19.1243859,7.67737836 19.1243859,6.87070105 18.6268424,6.3731576 C18.129299,5.87561415 17.3226216,5.87561413 16.8250782,6.37315756 L10.0913659,13.1094147 L7.1749509,10.1904547 C6.85309671,9.86860055 6.38398401,9.74290217 5.94432301,9.86070898 C5.50466201,9.97851579 5.16124768,10.3219301 5.04344087,10.7615911 C4.92563406,11.2012521 5.05133243,11.6703648 5.37318663,11.992219 L9.19048381,15.8095162 C9.42920298,16.0488396 9.75333852,16.183341 10.0913659,16.183341 C10.4293934,16.183341 10.7535289,16.0488396 10.9922481,15.8095162 L18.6268424,8.17492183 Z"
150
+ fill="#FFFFFF"
151
+ id="Path"
152
+ />
153
+ </g>
154
+ </g>
155
+ </g>
78
156
  </svg>
79
157
  </i>
80
158
  </div>
@@ -84,26 +162,56 @@ exports[`ItemListButton component should render button marked selected when curr
84
162
  exports[`ItemListButton component should render button not marked selected when current parent is not in the list 1`] = `
85
163
  <DocumentFragment>
86
164
  <div
87
- aria-label="Add to list_name"
88
165
  class="item-list-button modifier"
89
166
  role="button"
167
+ tabindex="0"
90
168
  >
91
169
  <i>
92
170
  <svg
93
- fill="currentColor"
94
171
  height="1em"
95
- stroke="currentColor"
96
- stroke-width="0"
97
- viewBox="0 0 16 16"
172
+ version="1.1"
173
+ viewBox="0 0 26 30"
98
174
  width="1em"
99
175
  xmlns="http://www.w3.org/2000/svg"
100
176
  >
101
- <path
102
- d="M7.84 4.1a.178.178 0 0 1 .32 0l.634 1.285a.178.178 0 0 0 .134.098l1.42.206c.145.021.204.2.098.303L9.42 6.993a.178.178 0 0 0-.051.158l.242 1.414a.178.178 0 0 1-.258.187l-1.27-.668a.178.178 0 0 0-.165 0l-1.27.668a.178.178 0 0 1-.257-.187l.242-1.414a.178.178 0 0 0-.05-.158l-1.03-1.001a.178.178 0 0 1 .098-.303l1.42-.206a.178.178 0 0 0 .134-.098L7.84 4.1z"
103
- />
104
- <path
105
- d="M2 2a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v13.5a.5.5 0 0 1-.777.416L8 13.101l-5.223 2.815A.5.5 0 0 1 2 15.5V2zm2-1a1 1 0 0 0-1 1v12.566l4.723-2.482a.5.5 0 0 1 .554 0L13 14.566V2a1 1 0 0 0-1-1H4z"
106
- />
177
+ <title>
178
+ wishlist-button/base
179
+ </title>
180
+ <g
181
+ fill="none"
182
+ fill-rule="evenodd"
183
+ id="Wishlist"
184
+ stroke="none"
185
+ stroke-width="1"
186
+ >
187
+ <g
188
+ fill-rule="nonzero"
189
+ id="components"
190
+ transform="translate(-416, -236)"
191
+ >
192
+ <g
193
+ id="wishlist-button/base"
194
+ transform="translate(417, 237)"
195
+ >
196
+ <g
197
+ fill="#FFFFFF"
198
+ id="Group"
199
+ stroke="currentColor"
200
+ stroke-width="2"
201
+ >
202
+ <path
203
+ d="M1.33333333,0 L22.6666667,0 C23.4030667,0 24,0.59696 24,1.33333333 L24,27.0350667 C24,27.4033333 23.7014667,27.7019336 23.3333333,27.7019336 C23.2397333,27.7019336 23.1472,27.682 23.0617333,27.6438667 L12,22.7084 L0.938306667,27.6438667 C0.602066667,27.794 0.20788,27.6429333 0.0578533333,27.3068 C0.0197066667,27.2212 0,27.1286667 0,27.0350667 L0,1.33333333 C0,0.59696 0.59696,0 1.33333333,0 Z"
204
+ id="Shape"
205
+ />
206
+ </g>
207
+ <path
208
+ d="M18.5475051,9.70770608 L14.3505774,9.09775478 L12.4744399,5.29423737 C12.4231974,5.19009934 12.3388952,5.10579713 12.2347571,5.05455461 C11.9735856,4.92562182 11.6562126,5.03306581 11.5256268,5.29423737 L9.64948934,9.09775478 L5.4525616,9.70770608 C5.33685268,9.72423592 5.23106167,9.77878441 5.15006543,9.86143364 C4.94616811,10.0710041 4.95060698,10.406139 5.15998334,10.6102356 L8.19651593,13.5707309 L7.47912064,17.7511288 C7.44480011,17.9495157 7.52626118,18.150158 7.68916287,18.2684724 C7.85206456,18.3867868 8.06806465,18.4021884 8.24610546,18.3081846 L12.0000333,16.3345211 L15.7539612,18.3081846 C15.8564463,18.3627331 15.9754612,18.3809159 16.0895171,18.3610801 C16.3771364,18.3114906 16.5705356,18.0387481 16.5209461,17.7511288 L15.8035508,13.5707309 L18.8400834,10.6102356 C18.9227326,10.5292394 18.9772811,10.4234484 18.9938109,10.3077395 C19.0384415,10.0184672 18.8367774,9.75068367 18.5475051,9.70770608 Z"
209
+ fill="currentColor"
210
+ id="Path"
211
+ />
212
+ </g>
213
+ </g>
214
+ </g>
107
215
  </svg>
108
216
  </i>
109
217
  </div>
@@ -9,18 +9,48 @@ exports[`ItemListCounter component should display listItem count and route to ur
9
9
  type="button"
10
10
  >
11
11
  <svg
12
- fill="currentColor"
13
12
  height="1em"
14
- stroke="currentColor"
15
- stroke-width="0"
16
- viewBox="0 0 16 16"
13
+ version="1.1"
14
+ viewBox="0 0 24 29"
17
15
  width="1em"
18
16
  xmlns="http://www.w3.org/2000/svg"
19
17
  >
20
- <path
21
- d="M2 15.5V2a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v13.5a.5.5 0 0 1-.74.439L8 13.069l-5.26 2.87A.5.5 0 0 1 2 15.5zM8.16 4.1a.178.178 0 0 0-.32 0l-.634 1.285a.178.178 0 0 1-.134.098l-1.42.206a.178.178 0 0 0-.098.303L6.58 6.993c.042.041.061.1.051.158L6.39 8.565a.178.178 0 0 0 .258.187l1.27-.668a.178.178 0 0 1 .165 0l1.27.668a.178.178 0 0 0 .257-.187L9.368 7.15a.178.178 0 0 1 .05-.158l1.028-1.001a.178.178 0 0 0-.098-.303l-1.42-.206a.178.178 0 0 1-.134-.098L8.16 4.1z"
18
+ <title>
19
+ wishlist-button/hover
20
+ </title>
21
+ <g
22
+ fill="none"
22
23
  fill-rule="evenodd"
23
- />
24
+ id="Wishlist"
25
+ stroke="none"
26
+ stroke-width="1"
27
+ >
28
+ <g
29
+ fill-rule="nonzero"
30
+ id="components"
31
+ transform="translate(-566, -237)"
32
+ >
33
+ <g
34
+ id="wishlist-button/hover"
35
+ transform="translate(566, 237.3529)"
36
+ >
37
+ <g
38
+ fill="currentColor"
39
+ id="Group"
40
+ >
41
+ <path
42
+ d="M1.33333333,0 L22.6666667,0 C23.4030667,0 24,0.59696 24,1.33333333 L24,27.0350667 C24,27.4033333 23.7014667,27.7019336 23.3333333,27.7019336 C23.2397333,27.7019336 23.1472,27.682 23.0617333,27.6438667 L12,22.7084 L0.938306667,27.6438667 C0.602066667,27.794 0.20788,27.6429333 0.0578533333,27.3068 C0.0197066667,27.2212 0,27.1286667 0,27.0350667 L0,1.33333333 C0,0.59696 0.59696,0 1.33333333,0 Z"
43
+ id="Shape"
44
+ />
45
+ </g>
46
+ <path
47
+ d="M18.5475051,9.70770608 L14.3505774,9.09775478 L12.4744399,5.29423737 C12.4231974,5.19009934 12.3388952,5.10579713 12.2347571,5.05455461 C11.9735856,4.92562182 11.6562126,5.03306581 11.5256268,5.29423737 L9.64948934,9.09775478 L5.4525616,9.70770608 C5.33685268,9.72423592 5.23106167,9.77878441 5.15006543,9.86143364 C4.94616811,10.0710041 4.95060698,10.406139 5.15998334,10.6102356 L8.19651593,13.5707309 L7.47912064,17.7511288 C7.44480011,17.9495157 7.52626118,18.150158 7.68916287,18.2684724 C7.85206456,18.3867868 8.06806465,18.4021884 8.24610546,18.3081846 L12.0000333,16.3345211 L15.7539612,18.3081846 C15.8564463,18.3627331 15.9754612,18.3809159 16.0895171,18.3610801 C16.3771364,18.3114906 16.5705356,18.0387481 16.5209461,17.7511288 L15.8035508,13.5707309 L18.8400834,10.6102356 C18.9227326,10.5292394 18.9772811,10.4234484 18.9938109,10.3077395 C19.0384415,10.0184672 18.8367774,9.75068367 18.5475051,9.70770608 Z"
48
+ fill="#FFFFFF"
49
+ id="Path"
50
+ />
51
+ </g>
52
+ </g>
53
+ </g>
24
54
  </svg>
25
55
  <span
26
56
  class="item-list-counter__badge"