@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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shopgate/pwa-common",
3
- "version": "7.30.3",
3
+ "version": "7.31.0-alpha.1",
4
4
  "description": "Common library for the Shopgate Connect PWA.",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Shopgate <support@shopgate.com>",
@@ -17,7 +17,7 @@
17
17
  "dependencies": {
18
18
  "@redux-devtools/extension": "^3.3.0",
19
19
  "@sentry/browser": "6.0.1",
20
- "@shopgate/pwa-benchmark": "7.30.3",
20
+ "@shopgate/pwa-benchmark": "7.31.0-alpha.1",
21
21
  "@virtuous/conductor": "~2.5.0",
22
22
  "@virtuous/react-conductor": "~2.5.0",
23
23
  "@virtuous/redux-persister": "1.1.0-beta.7",
@@ -40,7 +40,8 @@
40
40
  "swiper": "12.1.0"
41
41
  },
42
42
  "devDependencies": {
43
- "@shopgate/pwa-core": "7.30.3",
43
+ "@shopgate/pwa-core": "7.31.0-alpha.1",
44
+ "@types/lodash": "^4.17.24",
44
45
  "@types/react-portal": "^3.0.9",
45
46
  "lodash": "^4.17.23",
46
47
  "prop-types": "~15.8.1",
@@ -1,3 +1,4 @@
1
+ import "core-js/modules/es.array.includes.js";
1
2
  import { createSelector } from 'reselect';
2
3
  import MobileDetect from 'mobile-detect';
3
4
  import { hasSGJavaScriptBridge } from '@shopgate/pwa-core/helpers';
@@ -2,62 +2,57 @@
2
2
  * @deprecated used @shopgate/engage/styles instead
3
3
  */
4
4
 
5
- import { css } from 'glamor';
5
+ import { injectGlobal } from '@shopgate/engage/styles';
6
6
 
7
7
  /**
8
8
  * 1. Correct the inability to style clickable types in iOS and Safari.
9
- */
10
- css.global('button, html [type="button"], [type="reset"], [type="submit"]', {
11
- WebkitAppearance: 'button'
12
- });
13
-
14
- // since iOS 15 button has a default color of blue rgb(0, 122, 255);
15
- css.global('button', {
16
- color: 'inherit'
17
- });
18
-
19
- /**
9
+ * since iOS 15 button has a default color of blue rgb(0, 122, 255);
10
+ *
20
11
  * 1. Change font properties to `inherit` in Safari.
21
12
  * 2. Correct the inability to style clickable types in iOS and Safari.
22
- */
23
- css.global('::-webkit-file-upload-button', {
24
- font: 'inherit',
25
- WebkitAppearance: 'button'
26
- });
27
-
28
- /**
13
+ *
29
14
  * Remove the inner padding and cancel buttons in Chrome and Safari for OS X.
30
15
  */
31
- css.global('::-webkit-search-cancel-button, ::-webkit-search-decoration', {
32
- WebkitAppearance: 'none'
33
- });
34
- css.global('button, input, select, textarea', {
35
- background: 'transparent',
36
- border: 0,
37
- fontSize: '1em',
38
- margin: 0
39
- });
40
- css.global('input, select, textarea', {
41
- fontFamily: 'inherit'
42
- });
43
- css.global('button, textarea', {
44
- fontFamily: 'inherit',
45
- lineHeight: 'inherit'
46
- });
47
- css.global('button', {
48
- borderRadius: 0
49
- });
50
- css.global('button, label, [type="checkbox"], [type="radio"]', {
51
- cursor: 'pointer'
52
- });
53
- css.global('label', {
54
- display: 'inline-block'
55
- });
56
- css.global('textarea', {
57
- minHeight: '5em',
58
- maxWidth: '100%',
59
- resize: 'none'
60
- });
61
- css.global('[type="search"]', {
62
- WebkitAppearance: 'textfield'
16
+ injectGlobal({
17
+ 'button, html [type="button"], [type="reset"], [type="submit"]': {
18
+ WebkitAppearance: 'button'
19
+ },
20
+ button: {
21
+ color: 'inherit',
22
+ borderRadius: 0
23
+ },
24
+ '::-webkit-file-upload-button': {
25
+ font: 'inherit',
26
+ WebkitAppearance: 'button'
27
+ },
28
+ '::-webkit-search-cancel-button, ::-webkit-search-decoration': {
29
+ WebkitAppearance: 'none'
30
+ },
31
+ 'button, input, select, textarea': {
32
+ background: 'transparent',
33
+ border: 0,
34
+ fontSize: '1em',
35
+ margin: 0
36
+ },
37
+ 'input, select, textarea': {
38
+ fontFamily: 'inherit'
39
+ },
40
+ 'button, textarea': {
41
+ fontFamily: 'inherit',
42
+ lineHeight: 'inherit'
43
+ },
44
+ 'button, label, [type="checkbox"], [type="radio"]': {
45
+ cursor: 'pointer'
46
+ },
47
+ label: {
48
+ display: 'inline-block'
49
+ },
50
+ textarea: {
51
+ minHeight: '5em',
52
+ maxWidth: '100%',
53
+ resize: 'none'
54
+ },
55
+ '[type="search"]': {
56
+ WebkitAppearance: 'textfield'
57
+ }
63
58
  });
@@ -2,23 +2,25 @@
2
2
  * @deprecated used @shopgate/engage/styles/reset instead
3
3
  */
4
4
 
5
- import { css } from 'glamor';
6
- css.global('audio:not([controls])', {
7
- display: 'none',
8
- height: 0
9
- });
10
- css.global('figure', {
11
- margin: 0
12
- });
13
- css.global('iframe', {
14
- border: 0,
15
- display: 'block',
16
- width: '100%'
17
- });
18
- css.global('img, svg', {
19
- display: 'block',
20
- maxWidth: '100%'
21
- });
22
- css.global('progress', {
23
- verticalAlign: 'baseline'
5
+ import { injectGlobal } from '@shopgate/engage/styles';
6
+ injectGlobal({
7
+ 'audio:not([controls])': {
8
+ display: 'none',
9
+ height: 0
10
+ },
11
+ figure: {
12
+ margin: 0
13
+ },
14
+ iframe: {
15
+ border: 0,
16
+ display: 'block',
17
+ width: '100%'
18
+ },
19
+ 'img, svg': {
20
+ display: 'block',
21
+ maxWidth: '100%'
22
+ },
23
+ progress: {
24
+ verticalAlign: 'baseline'
25
+ }
24
26
  });
@@ -2,34 +2,36 @@
2
2
  * @deprecated used @shopgate/engage/styles instead
3
3
  */
4
4
 
5
- import { css } from 'glamor';
5
+ import { injectGlobal } from '@shopgate/engage/styles';
6
6
  import { themeConfig } from "../../helpers/config";
7
7
  const {
8
8
  typography
9
9
  } = themeConfig;
10
- css.global('*, *:before, *:after', {
11
- boxSizing: 'border-box'
12
- });
13
- css.global('html, body', {
14
- WebkitTapHighlightColor: 'transparent',
15
- width: '100%',
16
- height: '100%'
17
- });
18
- css.global('html', {
19
- overflow: 'hidden',
20
- MozOsxFontSmoothing: 'grayscale',
21
- WebkitFontSmoothing: 'antialiased',
22
- MsTextSizeAdjust: '100%',
23
- WebkitTextSizeAdjust: '100%',
24
- minHeight: '100%'
25
- });
26
- css.global('body', {
27
- font: `${typography.rootSize}px/${typography.lineHeight} ${typography.family}`,
28
- overflow: 'auto',
29
- margin: 0,
30
- WebkitOverflowScrolling: 'touch',
31
- WebkitUserSelect: 'none'
32
- });
33
- css.global('[data-pattern]', {
34
- height: '100% !important'
10
+ injectGlobal({
11
+ '*, *:before, *:after': {
12
+ boxSizing: 'border-box'
13
+ },
14
+ 'html, body': {
15
+ WebkitTapHighlightColor: 'transparent',
16
+ width: '100%',
17
+ height: '100%'
18
+ },
19
+ html: {
20
+ overflow: 'hidden',
21
+ MozOsxFontSmoothing: 'grayscale',
22
+ WebkitFontSmoothing: 'antialiased',
23
+ MsTextSizeAdjust: '100%',
24
+ WebkitTextSizeAdjust: '100%',
25
+ minHeight: '100%'
26
+ },
27
+ body: {
28
+ font: `${typography.rootSize}px/${typography.lineHeight} ${typography.family}`,
29
+ overflow: 'auto',
30
+ margin: 0,
31
+ WebkitOverflowScrolling: 'touch',
32
+ WebkitUserSelect: 'none'
33
+ },
34
+ '[data-pattern]': {
35
+ height: '100% !important'
36
+ }
35
37
  });
@@ -2,11 +2,13 @@
2
2
  * @deprecated used @shopgate/engage/styles instead
3
3
  */
4
4
 
5
- import { css } from 'glamor';
6
- css.global('table', {
7
- borderCollapse: 'collapse',
8
- minWidth: '100%'
9
- });
10
- css.global('td, th', {
11
- verticalAlign: 'top'
5
+ import { injectGlobal } from '@shopgate/engage/styles';
6
+ injectGlobal({
7
+ table: {
8
+ borderCollapse: 'collapse',
9
+ minWidth: '100%'
10
+ },
11
+ 'td, th': {
12
+ verticalAlign: 'top'
13
+ }
12
14
  });
@@ -2,27 +2,29 @@
2
2
  * @deprecated used @shopgate/engage/styles instead
3
3
  */
4
4
 
5
- import { css } from 'glamor';
5
+ import { injectGlobal } from '@shopgate/engage/styles';
6
6
  import { rem } from "../../helpers/style";
7
- css.global('a', {
8
- color: 'inherit',
9
- textDecoration: 'none',
10
- WebkitTextDecorationSkip: 'objects'
11
- });
12
- css.global('a:hover, a:focus, a:active, [tabindex]', {
13
- outline: 0
14
- });
15
- css.global('ol, ul', {
16
- listStyle: 'none',
17
- margin: 0,
18
- paddingLeft: 0
19
- });
20
- css.global('b, strong', {
21
- fontWeight: 700
22
- });
23
- css.global('small', {
24
- fontSize: rem(13)
25
- });
26
- css.global('sub, sup', {
27
- lineHeight: 0
7
+ injectGlobal({
8
+ a: {
9
+ color: 'inherit',
10
+ textDecoration: 'none',
11
+ WebkitTextDecorationSkip: 'objects'
12
+ },
13
+ 'a:hover, a:focus, a:active, [tabindex]': {
14
+ outline: 0
15
+ },
16
+ 'ol, ul': {
17
+ listStyle: 'none',
18
+ margin: 0,
19
+ paddingLeft: 0
20
+ },
21
+ 'b, strong': {
22
+ fontWeight: 700
23
+ },
24
+ small: {
25
+ fontSize: rem(13)
26
+ },
27
+ 'sub, sup': {
28
+ lineHeight: 0
29
+ }
28
30
  });
@@ -1,3 +1,4 @@
1
+ import "core-js/modules/es.array.includes.js";
1
2
  import after from 'lodash/after';
2
3
  import before from 'lodash/before';
3
4
  import over from 'lodash/over';
@@ -1,3 +1,4 @@
1
+ import "core-js/modules/es.array.includes.js";
1
2
  import "core-js/modules/web.url.js";
2
3
  import "core-js/modules/web.url.to-json.js";
3
4
  import "core-js/modules/web.url-search-params.js";
@@ -1,3 +1,4 @@
1
+ import "core-js/modules/es.array.includes.js";
1
2
  import "core-js/modules/es.string.replace.js";
2
3
  import "core-js/modules/web.url.js";
3
4
  import "core-js/modules/web.url.to-json.js";
@@ -0,0 +1,16 @@
1
+ {
2
+ "extends": "@shopgate/engage/tsconfig.build.json",
3
+ "compilerOptions": {
4
+ "outDir": "./dist",
5
+ "rootDir": "."
6
+ },
7
+ "include": ["**/*.ts", "**/*.tsx"],
8
+ "exclude": [
9
+ "dist",
10
+ "node_modules",
11
+ "**/*.spec.*",
12
+ "**/__tests__/**",
13
+ "**/__snapshots__/**",
14
+ "coverage"
15
+ ]
16
+ }
package/tsconfig.json ADDED
@@ -0,0 +1,3 @@
1
+ {
2
+ "extends": "@shopgate/engage/tsconfig.json",
3
+ }
@@ -1,11 +0,0 @@
1
- import { css } from 'glamor';
2
- export default css({
3
- position: 'fixed',
4
- top: 0,
5
- right: 0,
6
- bottom: 0,
7
- left: 0,
8
- // Prevents that content behind the backdrop is clickable
9
- pointerEvents: 'all',
10
- touchAction: 'none'
11
- });
@@ -1,6 +0,0 @@
1
- import { css } from 'glamor';
2
- export default css({
3
- ':focus': {
4
- outline: 0
5
- }
6
- }).toString();
@@ -1,37 +0,0 @@
1
- import { css } from 'glamor';
2
- const duration = 150;
3
- const easing = 'ease';
4
- const slideInBaseDrawer = css.keyframes({
5
- '0%': {
6
- transform: 'translateY(100%)'
7
- },
8
- '100%': {
9
- transform: 'translateY(0)'
10
- }
11
- });
12
- const slideOutBaseDrawer = css.keyframes({
13
- '0%': {
14
- transform: 'translateY(0)'
15
- },
16
- '100%': {
17
- transform: 'translateY(100%)'
18
- }
19
- });
20
- const container = css({
21
- position: 'fixed',
22
- bottom: 0,
23
- left: 0,
24
- zIndex: 5
25
- }).toString();
26
- const animation = {
27
- in: css({
28
- animation: `${slideInBaseDrawer} ${duration}ms 1 forwards ${easing}`
29
- }).toString(),
30
- out: css({
31
- animation: `${slideOutBaseDrawer} ${duration}ms 1 forwards ${easing}`
32
- }).toString()
33
- };
34
- export default {
35
- container,
36
- animation
37
- };
@@ -1,4 +0,0 @@
1
- import { css } from 'glamor';
2
- export default css({
3
- overflow: 'hidden'
4
- }).toString();
@@ -1,23 +0,0 @@
1
- import { css } from 'glamor';
2
-
3
- /**
4
- * Creates a class name for the flex-grow property
5
- * @param {number} [value=0] The value for the flex-grow property
6
- * @return {string} The class name
7
- */
8
- const grow = (value = 0) => css({
9
- flexGrow: value
10
- }).toString();
11
-
12
- /**
13
- * Creates a class name for the flex-shrink property
14
- * @param {number} [value=0] The value for the flex-shrink property
15
- * @return {string} The class name
16
- */
17
- const shrink = (value = 1) => css({
18
- flexShrink: value
19
- }).toString();
20
- export default {
21
- grow,
22
- shrink
23
- };
@@ -1,14 +0,0 @@
1
- import { css } from 'glamor';
2
-
3
- /**
4
- * Creates a class name for the flex-wrap property
5
- * @param {boolean} [value=false] TRUE for 'wrap', FALSE for 'nowrap'
6
- * @return {string} The class name
7
- */
8
- export const wrap = (value = false) => css({
9
- flexWrap: value ? 'wrap' : 'nowrap'
10
- }).toString();
11
- export default css({
12
- display: 'flex',
13
- minWidth: '100%'
14
- }).toString();
@@ -1,6 +0,0 @@
1
- import { css } from 'glamor';
2
- export default css({
3
- fill: 'currentColor',
4
- width: '1em',
5
- height: '1em'
6
- }).toString();
@@ -1,32 +0,0 @@
1
- import { css } from 'glamor';
2
- import { themeColors } from '@shopgate/pwa-common/helpers/config';
3
-
4
- /**
5
- * @param {string} [background=themeColors.placeholder] The background color.
6
- * @param {string} [paddingTop='100%'] The padding top value.
7
- * @returns {string} The compiled class names.
8
- */
9
- const container = (background = themeColors.placeholder, paddingTop = '100%') => css({
10
- background,
11
- position: 'relative',
12
- zIndex: 0,
13
- ':before': {
14
- display: 'block',
15
- content: '""',
16
- width: '100%',
17
- paddingTop
18
- }
19
- }).toString();
20
- const image = css({
21
- position: 'absolute',
22
- top: 0,
23
- left: 0,
24
- width: '100%',
25
- maxHeight: '100%',
26
- WebkitTouchCallout: 'none',
27
- fontSize: 0
28
- }).toString();
29
- export default {
30
- container,
31
- image
32
- };
@@ -1,10 +0,0 @@
1
- import { css } from 'glamor';
2
- export default css({
3
- padding: 0,
4
- margin: 0,
5
- border: 'none',
6
- textAlign: 'left',
7
- alignItems: 'stretch',
8
- width: '100%',
9
- cursor: 'pointer'
10
- }).toString();
@@ -1,16 +0,0 @@
1
- import { css } from 'glamor';
2
- const item = css({
3
- display: 'block',
4
- position: 'relative'
5
- }).toString();
6
- const unselected = css({
7
- zIndex: 1
8
- }).toString();
9
- const selected = css({
10
- zIndex: 2
11
- }).toString();
12
- export default {
13
- item,
14
- selected,
15
- unselected
16
- };
@@ -1,36 +0,0 @@
1
- import { css } from 'glamor';
2
- import { responsiveMediaQuery } from '@shopgate/engage/styles';
3
- const container = css({
4
- position: 'fixed',
5
- top: 0,
6
- bottom: 0,
7
- left: 0,
8
- right: 0,
9
- overflow: 'hidden',
10
- zIndex: 2000
11
- }).toString();
12
- const layout = css({
13
- display: 'flex',
14
- flexDirection: 'column',
15
- alignItems: 'center',
16
- justifyContent: 'center',
17
- height: '100%'
18
- }).toString();
19
- const content = css({
20
- position: 'relative',
21
- maxWidth: '100vw',
22
- maxHeight: '100vh',
23
- paddingTop: 'var(--safe-area-inset-top)',
24
- paddingBottom: 'var(--safe-area-inset-bottom)',
25
- overflowY: 'scroll',
26
- [responsiveMediaQuery('>xs', {
27
- webOnly: true
28
- })]: {
29
- overflowY: 'initial'
30
- }
31
- }).toString();
32
- export default {
33
- container,
34
- layout,
35
- content
36
- };
@@ -1,42 +0,0 @@
1
- import React from 'react';
2
- import PropTypes from 'prop-types';
3
- import styles from "./style";
4
-
5
- /**
6
- * The default button for the Picker component.
7
- * @returns {JSX} The button component.
8
- */
9
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
10
- const PickerButton = ({
11
- value,
12
- label,
13
- openList
14
- }) => {
15
- if (value !== null) {
16
- return /*#__PURE__*/_jsxs("button", {
17
- className: styles.button,
18
- onClick: openList,
19
- type: "button",
20
- children: [/*#__PURE__*/_jsx("span", {
21
- className: styles.label,
22
- children: label
23
- }), /*#__PURE__*/_jsx("span", {
24
- className: styles.value,
25
- children: value
26
- })]
27
- });
28
- }
29
- return /*#__PURE__*/_jsx("button", {
30
- className: styles.button,
31
- onClick: openList,
32
- type: "button",
33
- children: /*#__PURE__*/_jsx("span", {
34
- className: styles.label,
35
- children: label
36
- })
37
- });
38
- };
39
- PickerButton.defaultProps = {
40
- value: null
41
- };
42
- export default PickerButton;
@@ -1,19 +0,0 @@
1
- import { css } from 'glamor';
2
- const button = css({
3
- display: 'block',
4
- width: '100%',
5
- textAlign: 'left',
6
- padding: '10px 20px'
7
- }).toString();
8
- const label = css({
9
- display: 'block'
10
- }).toString();
11
- const value = css({
12
- display: 'block',
13
- fontWeight: 'bold'
14
- }).toString();
15
- export default {
16
- button,
17
- label,
18
- value
19
- };