@shopgate/pwa-common 7.30.3 → 7.31.0-alpha.1

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 (112) hide show
  1. package/App.js +0 -2
  2. package/actions/app/handleLink.js +1 -0
  3. package/collections/AuthRoutes.js +1 -0
  4. package/collections/PersistedReducers.js +1 -0
  5. package/collections/media-providers/Vimeo.js +1 -1
  6. package/collections/media-providers/style.js +1 -1
  7. package/components/Backdrop/index.js +18 -3
  8. package/components/Button/index.js +40 -52
  9. package/components/Checkbox/index.js +1 -1
  10. package/components/Drawer/index.js +118 -132
  11. package/components/Drawer/spec.js +4 -2
  12. package/components/Dropdown/index.js +52 -68
  13. package/components/Grid/components/Item/index.js +37 -40
  14. package/components/Grid/index.js +36 -34
  15. package/components/HtmlSanitizer/index.js +60 -7
  16. package/components/I18n/components/FormatNumber/spec.js +1 -0
  17. package/components/Icon/index.d.ts +36 -0
  18. package/components/Icon/index.d.ts.map +1 -0
  19. package/components/Icon/index.js +39 -28
  20. package/components/Image/Image.js +27 -6
  21. package/components/Image/ImageInner.js +32 -25
  22. package/components/InfiniteContainer/index.js +5 -7
  23. package/components/InfiniteContainer/spec.js +13 -17
  24. package/components/Link/index.js +75 -84
  25. package/components/List/components/Item/index.js +19 -10
  26. package/components/List/spec.js +1 -3
  27. package/components/Loading/index.d.ts +6 -0
  28. package/components/Loading/index.d.ts.map +1 -0
  29. package/components/Modal/index.js +41 -7
  30. package/components/Picker/index.js +18 -194
  31. package/components/Portal/index.d.ts +50 -0
  32. package/components/Portal/index.d.ts.map +1 -0
  33. package/components/ProductCharacteristics/index.js +14 -276
  34. package/components/RangeSlider/index.js +15 -258
  35. package/components/Select/components/Item/index.js +18 -7
  36. package/components/Select/index.js +108 -144
  37. package/components/Select/spec.js +49 -16
  38. package/components/SelectBox/components/Item/index.js +49 -51
  39. package/components/SelectBox/index.js +140 -160
  40. package/components/SurroundPortals/index.d.ts +24 -0
  41. package/components/SurroundPortals/index.d.ts.map +1 -0
  42. package/components/SurroundPortals/index.js +3 -13
  43. package/components/Swiper/components/SwiperItem/index.js +13 -4
  44. package/components/Swiper/components/SwiperItem/spec.js +3 -2
  45. package/components/Swiper/index.js +80 -12
  46. package/components/Widgets/components/Widget/index.js +54 -56
  47. package/components/Widgets/components/Widget/spec.js +12 -8
  48. package/components/Widgets/components/WidgetGrid/index.js +39 -53
  49. package/components/Widgets/components/WidgetGrid/spec.js +12 -8
  50. package/constants/Configuration.js +2 -1
  51. package/constants/Portals.d.ts +101 -0
  52. package/constants/Portals.d.ts.map +1 -0
  53. package/helpers/config/index.d.ts +94 -0
  54. package/helpers/config/index.d.ts.map +1 -0
  55. package/helpers/config/mock.d.ts +23 -0
  56. package/helpers/config/mock.d.ts.map +1 -0
  57. package/helpers/config/theme.d.ts +7 -0
  58. package/helpers/config/theme.d.ts.map +1 -0
  59. package/helpers/data/index.d.ts +35 -0
  60. package/helpers/data/index.d.ts.map +1 -0
  61. package/helpers/data/index.js +1 -0
  62. package/helpers/html/handleDOM.js +1 -0
  63. package/helpers/portals/portalCollection.d.ts +30 -0
  64. package/helpers/portals/portalCollection.d.ts.map +1 -0
  65. package/helpers/style/index.js +1 -0
  66. package/helpers/validation/index.d.ts +10 -0
  67. package/helpers/validation/index.d.ts.map +1 -0
  68. package/package.json +4 -3
  69. package/selectors/client.js +1 -0
  70. package/styles/reset/form.js +46 -51
  71. package/styles/reset/media.js +21 -19
  72. package/styles/reset/root.js +28 -26
  73. package/styles/reset/table.js +9 -7
  74. package/styles/reset/typography.js +24 -22
  75. package/subscriptions/error.js +1 -0
  76. package/subscriptions/helpers/handleLinks.js +1 -0
  77. package/subscriptions/router.js +1 -0
  78. package/tsconfig.build.json +16 -0
  79. package/tsconfig.json +3 -0
  80. package/components/Backdrop/style.js +0 -11
  81. package/components/Button/style.js +0 -6
  82. package/components/Drawer/style.js +0 -37
  83. package/components/Dropdown/style.js +0 -4
  84. package/components/Grid/components/Item/style.js +0 -23
  85. package/components/Grid/style.js +0 -14
  86. package/components/Icon/style.js +0 -6
  87. package/components/Image/style.js +0 -32
  88. package/components/Link/style.js +0 -10
  89. package/components/List/components/Item/style.js +0 -16
  90. package/components/Modal/style.js +0 -36
  91. package/components/Picker/components/Button/index.js +0 -42
  92. package/components/Picker/components/Button/style.js +0 -19
  93. package/components/Picker/components/List/index.js +0 -38
  94. package/components/Picker/components/List/style.js +0 -17
  95. package/components/Picker/components/Modal/index.js +0 -76
  96. package/components/Picker/components/Modal/style.js +0 -78
  97. package/components/Picker/spec.js +0 -88
  98. package/components/ProductCharacteristics/connector.js +0 -41
  99. package/components/ProductCharacteristics/context.js +0 -2
  100. package/components/ProductCharacteristics/helpers/index.js +0 -162
  101. package/components/RangeSlider/components/Handle/index.js +0 -34
  102. package/components/RangeSlider/components/Handle/style.js +0 -14
  103. package/components/RangeSlider/helper.js +0 -85
  104. package/components/RangeSlider/style.js +0 -14
  105. package/components/Select/components/Item/style.js +0 -4
  106. package/components/Select/style.js +0 -17
  107. package/components/SelectBox/components/Item/style.js +0 -7
  108. package/components/SelectBox/style.js +0 -18
  109. package/components/Swiper/components/SwiperItem/styles.js +0 -5
  110. package/components/Swiper/styles.js +0 -76
  111. package/components/Widgets/components/Widget/style.js +0 -27
  112. package/components/Widgets/components/WidgetGrid/style.js +0 -8
@@ -1,18 +0,0 @@
1
- import { css } from 'glamor';
2
- const overlay = css({
3
- position: 'fixed',
4
- top: 0,
5
- left: 0,
6
- width: '100%',
7
- height: '100%',
8
- overflow: 'auto',
9
- zIndex: 1,
10
- outline: 0
11
- }).toString();
12
- const rotatedIcon = css({
13
- transform: 'rotate(180deg)'
14
- }).toString();
15
- export default {
16
- overlay,
17
- rotatedIcon
18
- };
@@ -1,5 +0,0 @@
1
- import { css } from 'glamor';
2
- export const item = css({
3
- position: 'relative',
4
- height: '100%'
5
- }).toString();
@@ -1,76 +0,0 @@
1
- import { css } from 'glamor';
2
- import { themeColors } from '@shopgate/pwa-common/helpers/config';
3
- export const container = css({
4
- position: 'relative',
5
- maxHeight: '100%'
6
- // This needs to be 100vw to compensate a chrome 80 bug - see related ticket / pr. (PWA-2509)
7
- // commented out for now since it causes issues in the responsive layout
8
- // width: '100vw',
9
- }).toString();
10
- export const innerContainer = css({
11
- overflow: 'hidden',
12
- '--swiper-navigation-color': themeColors.gray,
13
- ' .swiper-wrapper': {
14
- alignItems: 'stretch'
15
- },
16
- ' .swiper-slide': {
17
- height: 'auto'
18
- },
19
- ' .swiper-pagination': {
20
- ' .swiper-pagination-bullet': {
21
- background: themeColors.gray,
22
- opacity: '.5',
23
- margin: '0 4px',
24
- transition: 'opacity 300ms cubic-bezier(0.25, 0.1, 0.25, 1)',
25
- border: `1px solid ${themeColors.dark}`
26
- },
27
- ' .swiper-pagination-bullet-active.swiper-pagination-bullet-active-main': {
28
- opacity: 1
29
- }
30
- },
31
- ' .swiper-pagination-fraction': {
32
- top: 'var(--swiper-pagination-fraction-top-offset, 4px)',
33
- left: 'auto',
34
- right: 0,
35
- bottom: 'auto',
36
- fontSize: 12,
37
- background: themeColors.background,
38
- borderRadius: '50px',
39
- width: 'fit-content',
40
- padding: '4px 8px',
41
- margin: '4px 16px',
42
- transition: 'opacity 300ms cubic-bezier(0.25, 0.1, 0.25, 1)'
43
- },
44
- ' .swiper-pagination-progressbar': {
45
- background: themeColors.shade7,
46
- ' .swiper-pagination-progressbar-fill': {
47
- background: themeColors.dark
48
- }
49
- }
50
- }).toString();
51
-
52
- /**
53
- * Prevents a visible shrink animation of swiped out slides which where in a zoomed state before.
54
- */
55
- export const zoomFix = css({
56
- ' .swiper-slide': {
57
- overflow: 'hidden'
58
- }
59
- }).toString();
60
- export const wrapper = css({
61
- flexShrink: 0
62
- });
63
- export const buttonNext = css({
64
- backgroundImage: "url(\"data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M27%2C22L27%2C22L5%2C44l-2.1-2.1L22.8%2C22L2.9%2C2.1L5%2C0L27%2C22L27%2C22z'%20fill%3D'%23808080'%2F%3E%3C%2Fsvg%3E\") !important",
65
- // Hide original SwiperJS chevron
66
- ':after': {
67
- color: 'transparent'
68
- }
69
- }).toString();
70
- export const buttonPrev = css({
71
- backgroundImage: "url(\"data:image/svg+xml;charset=utf-8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%2027%2044'%3E%3Cpath%20d%3D'M0%2C22L22%2C0l2.1%2C2.1L4.2%2C22l19.9%2C19.9L22%2C44L0%2C22L0%2C22L0%2C22z'%20fill%3D'%23808080'%2F%3E%3C%2Fsvg%3E\") !important",
72
- // Hide original SwiperJS chevron
73
- ':after': {
74
- color: 'transparent'
75
- }
76
- }).toString();
@@ -1,27 +0,0 @@
1
- import { css } from 'glamor';
2
-
3
- /**
4
- * Creates a widget cell grid style.
5
- * @param {number} col Col index.
6
- * @param {number} row Row index.
7
- * @param {number} width Width.
8
- * @param {number} height Height.
9
- * @param {boolean} visible Visible.
10
- * @returns {string}
11
- */
12
- function widgetCell({
13
- col,
14
- row,
15
- width,
16
- height
17
- }) {
18
- return css({
19
- gridColumnStart: col + 1,
20
- gridColumnEnd: col + width + 1,
21
- gridRowStart: row + 1,
22
- gridRowEnd: row + height + 1
23
- }).toString();
24
- }
25
- export default {
26
- widgetCell
27
- };
@@ -1,8 +0,0 @@
1
- import { css } from 'glamor';
2
- export default css({
3
- display: 'grid',
4
- gridTemplateColumns: 'repeat(12, 1fr)',
5
- gridAutoRows: 'auto',
6
- gridAutoFlow: 'row dense',
7
- position: 'relative'
8
- });