@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.
- package/App.js +0 -2
- package/actions/app/handleLink.js +1 -0
- package/collections/AuthRoutes.js +1 -0
- package/collections/PersistedReducers.js +1 -0
- package/collections/media-providers/Vimeo.js +1 -1
- package/collections/media-providers/style.js +1 -1
- package/components/Backdrop/index.js +18 -3
- package/components/Button/index.js +40 -52
- package/components/Checkbox/index.js +1 -1
- package/components/Drawer/index.js +118 -132
- package/components/Drawer/spec.js +4 -2
- package/components/Dropdown/index.js +52 -68
- package/components/Grid/components/Item/index.js +37 -40
- package/components/Grid/index.js +36 -34
- package/components/HtmlSanitizer/index.js +60 -7
- package/components/I18n/components/FormatNumber/spec.js +1 -0
- package/components/Icon/index.d.ts +36 -0
- package/components/Icon/index.d.ts.map +1 -0
- package/components/Icon/index.js +39 -28
- package/components/Image/Image.js +27 -6
- package/components/Image/ImageInner.js +32 -25
- package/components/InfiniteContainer/index.js +5 -7
- package/components/InfiniteContainer/spec.js +13 -17
- package/components/Link/index.js +75 -84
- package/components/List/components/Item/index.js +19 -10
- package/components/List/spec.js +1 -3
- package/components/Loading/index.d.ts +6 -0
- package/components/Loading/index.d.ts.map +1 -0
- package/components/Modal/index.js +41 -7
- package/components/Picker/index.js +18 -194
- package/components/Portal/index.d.ts +50 -0
- package/components/Portal/index.d.ts.map +1 -0
- package/components/ProductCharacteristics/index.js +14 -276
- package/components/RangeSlider/index.js +15 -258
- package/components/Select/components/Item/index.js +18 -7
- package/components/Select/index.js +108 -144
- package/components/Select/spec.js +49 -16
- package/components/SelectBox/components/Item/index.js +49 -51
- package/components/SelectBox/index.js +140 -160
- package/components/SurroundPortals/index.d.ts +24 -0
- package/components/SurroundPortals/index.d.ts.map +1 -0
- package/components/SurroundPortals/index.js +3 -13
- package/components/Swiper/components/SwiperItem/index.js +13 -4
- package/components/Swiper/components/SwiperItem/spec.js +3 -2
- package/components/Swiper/index.js +80 -12
- package/components/Widgets/components/Widget/index.js +54 -56
- package/components/Widgets/components/Widget/spec.js +12 -8
- package/components/Widgets/components/WidgetGrid/index.js +39 -53
- package/components/Widgets/components/WidgetGrid/spec.js +12 -8
- package/constants/Configuration.js +2 -1
- package/constants/Portals.d.ts +101 -0
- package/constants/Portals.d.ts.map +1 -0
- package/helpers/config/index.d.ts +94 -0
- package/helpers/config/index.d.ts.map +1 -0
- package/helpers/config/mock.d.ts +23 -0
- package/helpers/config/mock.d.ts.map +1 -0
- package/helpers/config/theme.d.ts +7 -0
- package/helpers/config/theme.d.ts.map +1 -0
- package/helpers/data/index.d.ts +35 -0
- package/helpers/data/index.d.ts.map +1 -0
- package/helpers/data/index.js +1 -0
- package/helpers/html/handleDOM.js +1 -0
- package/helpers/portals/portalCollection.d.ts +30 -0
- package/helpers/portals/portalCollection.d.ts.map +1 -0
- package/helpers/style/index.js +1 -0
- package/helpers/validation/index.d.ts +10 -0
- package/helpers/validation/index.d.ts.map +1 -0
- package/package.json +4 -3
- package/selectors/client.js +1 -0
- package/styles/reset/form.js +46 -51
- package/styles/reset/media.js +21 -19
- package/styles/reset/root.js +28 -26
- package/styles/reset/table.js +9 -7
- package/styles/reset/typography.js +24 -22
- package/subscriptions/error.js +1 -0
- package/subscriptions/helpers/handleLinks.js +1 -0
- package/subscriptions/router.js +1 -0
- package/tsconfig.build.json +16 -0
- package/tsconfig.json +3 -0
- package/components/Backdrop/style.js +0 -11
- package/components/Button/style.js +0 -6
- package/components/Drawer/style.js +0 -37
- package/components/Dropdown/style.js +0 -4
- package/components/Grid/components/Item/style.js +0 -23
- package/components/Grid/style.js +0 -14
- package/components/Icon/style.js +0 -6
- package/components/Image/style.js +0 -32
- package/components/Link/style.js +0 -10
- package/components/List/components/Item/style.js +0 -16
- package/components/Modal/style.js +0 -36
- package/components/Picker/components/Button/index.js +0 -42
- package/components/Picker/components/Button/style.js +0 -19
- package/components/Picker/components/List/index.js +0 -38
- package/components/Picker/components/List/style.js +0 -17
- package/components/Picker/components/Modal/index.js +0 -76
- package/components/Picker/components/Modal/style.js +0 -78
- package/components/Picker/spec.js +0 -88
- package/components/ProductCharacteristics/connector.js +0 -41
- package/components/ProductCharacteristics/context.js +0 -2
- package/components/ProductCharacteristics/helpers/index.js +0 -162
- package/components/RangeSlider/components/Handle/index.js +0 -34
- package/components/RangeSlider/components/Handle/style.js +0 -14
- package/components/RangeSlider/helper.js +0 -85
- package/components/RangeSlider/style.js +0 -14
- package/components/Select/components/Item/style.js +0 -4
- package/components/Select/style.js +0 -17
- package/components/SelectBox/components/Item/style.js +0 -7
- package/components/SelectBox/style.js +0 -18
- package/components/Swiper/components/SwiperItem/styles.js +0 -5
- package/components/Swiper/styles.js +0 -76
- package/components/Widgets/components/Widget/style.js +0 -27
- 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.
|
|
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.
|
|
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.
|
|
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",
|
package/selectors/client.js
CHANGED
package/styles/reset/form.js
CHANGED
|
@@ -2,62 +2,57 @@
|
|
|
2
2
|
* @deprecated used @shopgate/engage/styles instead
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import {
|
|
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
|
-
|
|
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
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
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
|
});
|
package/styles/reset/media.js
CHANGED
|
@@ -2,23 +2,25 @@
|
|
|
2
2
|
* @deprecated used @shopgate/engage/styles/reset instead
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
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
|
});
|
package/styles/reset/root.js
CHANGED
|
@@ -2,34 +2,36 @@
|
|
|
2
2
|
* @deprecated used @shopgate/engage/styles instead
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { injectGlobal } from '@shopgate/engage/styles';
|
|
6
6
|
import { themeConfig } from "../../helpers/config";
|
|
7
7
|
const {
|
|
8
8
|
typography
|
|
9
9
|
} = themeConfig;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
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
|
});
|
package/styles/reset/table.js
CHANGED
|
@@ -2,11 +2,13 @@
|
|
|
2
2
|
* @deprecated used @shopgate/engage/styles instead
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
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 {
|
|
5
|
+
import { injectGlobal } from '@shopgate/engage/styles';
|
|
6
6
|
import { rem } from "../../helpers/style";
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
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
|
});
|
package/subscriptions/error.js
CHANGED
package/subscriptions/router.js
CHANGED
|
@@ -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
|
@@ -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,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
|
-
};
|
package/components/Grid/style.js
DELETED
|
@@ -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();
|
package/components/Icon/style.js
DELETED
|
@@ -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
|
-
};
|
package/components/Link/style.js
DELETED
|
@@ -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
|
-
};
|