@shopgate/pwa-ui-shared 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/ActionButton/index.js +66 -67
- package/AddToCartButton/index.js +217 -185
- package/Availability/index.js +24 -6
- package/Button/index.js +105 -82
- package/Button/spec.js +3 -4
- package/Card/index.js +26 -7
- package/CardList/components/Item/index.js +15 -3
- package/CartTotalLine/components/Amount/index.js +13 -4
- package/CartTotalLine/components/Hint/index.js +13 -4
- package/CartTotalLine/components/Label/index.js +23 -10
- package/CartTotalLine/index.js +41 -7
- package/Checkbox/index.js +41 -17
- package/Chip/index.js +82 -7
- package/ContextMenu/components/Item/index.js +38 -20
- package/ContextMenu/components/Position/index.js +38 -56
- package/ContextMenu/index.js +64 -28
- package/Dialog/components/BasicDialog/index.js +1 -0
- package/Dialog/components/HtmlContentDialog/spec.js +39 -0
- package/Dialog/components/PipelineErrorDialog/index.js +108 -157
- package/Dialog/components/PipelineErrorDialog/spec.js +12 -18
- package/Dialog/components/TextMessageDialog/index.js +1 -1
- package/Dialog/components/VariantSelectModal/index.js +1 -1
- package/Dialog/index.js +1 -1
- package/DiscountBadge/index.js +48 -15
- package/FavoritesButton/index.js +95 -100
- package/FavoritesButton/spec.js +5 -2
- package/Form/Builder/classes/ActionListener/index.js +1 -0
- package/Form/Checkbox/index.js +64 -56
- package/Form/InfoField/index.js +18 -6
- package/Form/Password/index.js +39 -52
- package/Form/RadioGroup/components/Item/index.js +72 -56
- package/Form/RadioGroup/index.js +79 -90
- package/Form/Select/index.js +108 -130
- package/Form/SelectContextChoices/index.js +30 -8
- package/Form/TextField/index.js +106 -82
- package/Form/TextField/spec.js +4 -3
- package/FormElement/components/ErrorText/index.js +32 -14
- package/FormElement/components/Label/index.js +56 -6
- package/FormElement/components/Placeholder/index.js +44 -11
- package/FormElement/components/Underline/index.js +63 -12
- package/FormElement/index.js +62 -85
- package/Glow/index.js +73 -83
- package/IndicatorCircle/index.js +73 -17
- package/IndicatorCircle/spec.js +2 -5
- package/LoadingIndicator/index.js +34 -12
- package/Manufacturer/index.js +21 -10
- package/MessageBar/index.js +12 -38
- package/NoResults/components/Icon/index.js +30 -14
- package/NoResults/index.js +35 -7
- package/Placeholder/index.js +34 -23
- package/PlaceholderLabel/index.js +17 -3
- package/Price/index.js +34 -21
- package/PriceInfo/index.js +23 -9
- package/PriceStriked/index.js +67 -77
- package/ProgressBar/index.js +112 -77
- package/RadioButton/index.js +29 -11
- package/RatingStars/index.js +122 -137
- package/Ripple/components/RippleAnimation/index.js +13 -3
- package/Ripple/index.js +158 -212
- package/RippleButton/index.js +63 -60
- package/RippleButton/spec.js +15 -9
- package/ScannerOverlay/components/CameraOverlay/index.js +54 -10
- package/ScannerOverlay/components/ScannerBar/components/FlashlightButton/index.js +53 -27
- package/ScannerOverlay/components/ScannerBar/index.js +50 -26
- package/Sheet/components/Header/components/SearchBar/index.js +54 -10
- package/Sheet/components/Header/index.js +96 -76
- package/Sheet/index.js +295 -157
- package/Sheet/spec.js +8 -6
- package/TaxDisclaimer/index.js +17 -4
- package/TaxDisclaimer/spec.js +16 -5
- package/TextField/components/ErrorText/index.js +35 -14
- package/TextField/components/FormElement/index.js +29 -4
- package/TextField/components/Hint/index.js +39 -10
- package/TextField/components/Label/index.js +43 -6
- package/TextField/components/Underline/index.js +64 -13
- package/TextField/index.js +157 -171
- package/TextField/spec.js +5 -3
- package/icons/AccountBoxIcon.d.ts +7 -0
- package/icons/AccountBoxIcon.d.ts.map +1 -0
- package/icons/AccountBoxIcon.js +1 -4
- package/icons/AddMoreIcon.d.ts +7 -0
- package/icons/AddMoreIcon.d.ts.map +1 -0
- package/icons/AddMoreIcon.js +0 -3
- package/icons/ArrowDropIcon.d.ts +7 -0
- package/icons/ArrowDropIcon.d.ts.map +1 -0
- package/icons/ArrowDropIcon.js +0 -3
- package/icons/ArrowIcon.d.ts +10 -0
- package/icons/ArrowIcon.d.ts.map +1 -0
- package/icons/ArrowIcon.js +2 -11
- package/icons/BarcodeScannerIcon.d.ts +7 -0
- package/icons/BarcodeScannerIcon.d.ts.map +1 -0
- package/icons/BarcodeScannerIcon.js +0 -3
- package/icons/BoxIcon.d.ts +7 -0
- package/icons/BoxIcon.d.ts.map +1 -0
- package/icons/BoxIcon.js +0 -3
- package/icons/BrowseIcon.d.ts +7 -0
- package/icons/BrowseIcon.d.ts.map +1 -0
- package/icons/BrowseIcon.js +1 -3
- package/icons/BurgerIcon.d.ts +7 -0
- package/icons/BurgerIcon.d.ts.map +1 -0
- package/icons/BurgerIcon.js +0 -3
- package/icons/CalendarIcon.d.ts +7 -0
- package/icons/CalendarIcon.d.ts.map +1 -0
- package/icons/CalendarIcon.js +0 -2
- package/icons/CartCouponIcon.d.ts +7 -0
- package/icons/CartCouponIcon.d.ts.map +1 -0
- package/icons/CartCouponIcon.js +0 -2
- package/icons/CartIcon.d.ts +7 -0
- package/icons/CartIcon.d.ts.map +1 -0
- package/icons/CartIcon.js +0 -2
- package/icons/CartPlusIcon.d.ts +7 -0
- package/icons/CartPlusIcon.d.ts.map +1 -0
- package/icons/CartPlusIcon.js +0 -2
- package/icons/CheckIcon.d.ts +7 -0
- package/icons/CheckIcon.d.ts.map +1 -0
- package/icons/CheckIcon.js +0 -2
- package/icons/CheckedIcon.d.ts +7 -0
- package/icons/CheckedIcon.d.ts.map +1 -0
- package/icons/CheckedIcon.js +0 -3
- package/icons/ChevronIcon.d.ts +7 -0
- package/icons/ChevronIcon.d.ts.map +1 -0
- package/icons/ChevronIcon.js +0 -2
- package/icons/CreditCardIcon.d.ts +7 -0
- package/icons/CreditCardIcon.d.ts.map +1 -0
- package/icons/CreditCardIcon.js +0 -2
- package/icons/CrossIcon.d.ts +7 -0
- package/icons/CrossIcon.d.ts.map +1 -0
- package/icons/CrossIcon.js +0 -2
- package/icons/DescriptionIcon.d.ts +7 -0
- package/icons/DescriptionIcon.d.ts.map +1 -0
- package/icons/DescriptionIcon.js +0 -2
- package/icons/FilterIcon.d.ts +7 -0
- package/icons/FilterIcon.d.ts.map +1 -0
- package/icons/FilterIcon.js +0 -2
- package/icons/FlashDisabledIcon.d.ts +7 -0
- package/icons/FlashDisabledIcon.d.ts.map +1 -0
- package/icons/FlashDisabledIcon.js +0 -2
- package/icons/FlashEnabledIcon.d.ts +7 -0
- package/icons/FlashEnabledIcon.d.ts.map +1 -0
- package/icons/FlashEnabledIcon.js +0 -2
- package/icons/GridIcon.d.ts +7 -0
- package/icons/GridIcon.d.ts.map +1 -0
- package/icons/GridIcon.js +1 -3
- package/icons/HeartIcon.d.ts +7 -0
- package/icons/HeartIcon.d.ts.map +1 -0
- package/icons/HeartIcon.js +0 -2
- package/icons/HeartOutlineIcon.d.ts +7 -0
- package/icons/HeartOutlineIcon.d.ts.map +1 -0
- package/icons/HeartOutlineIcon.js +1 -3
- package/icons/HeartPlusIcon.d.ts +7 -0
- package/icons/HeartPlusIcon.d.ts.map +1 -0
- package/icons/HeartPlusIcon.js +1 -3
- package/icons/HeartPlusOutlineIcon.d.ts +7 -0
- package/icons/HeartPlusOutlineIcon.d.ts.map +1 -0
- package/icons/HeartPlusOutlineIcon.js +1 -3
- package/icons/HomeIcon.d.ts +7 -0
- package/icons/HomeIcon.d.ts.map +1 -0
- package/icons/HomeIcon.js +0 -2
- package/icons/InfoIcon.d.ts +7 -0
- package/icons/InfoIcon.d.ts.map +1 -0
- package/icons/InfoIcon.js +0 -2
- package/icons/InfoOutlineIcon.d.ts +7 -0
- package/icons/InfoOutlineIcon.d.ts.map +1 -0
- package/icons/InfoOutlineIcon.js +0 -2
- package/icons/ListIcon.d.ts +7 -0
- package/icons/ListIcon.d.ts.map +1 -0
- package/icons/ListIcon.js +0 -2
- package/icons/LocalShippingIcon.d.ts +7 -0
- package/icons/LocalShippingIcon.d.ts.map +1 -0
- package/icons/LocalShippingIcon.js +0 -2
- package/icons/LocationIcon.d.ts +7 -0
- package/icons/LocationIcon.d.ts.map +1 -0
- package/icons/LocationIcon.js +1 -4
- package/icons/LocatorIcon.d.ts +7 -0
- package/icons/LocatorIcon.d.ts.map +1 -0
- package/icons/LocatorIcon.js +1 -3
- package/icons/LockIcon.d.ts +9 -0
- package/icons/LockIcon.d.ts.map +1 -0
- package/icons/LockIcon.js +1 -2
- package/icons/LogoutIcon.d.ts +7 -0
- package/icons/LogoutIcon.d.ts.map +1 -0
- package/icons/LogoutIcon.js +0 -2
- package/icons/MagnifierIcon.d.ts +7 -0
- package/icons/MagnifierIcon.d.ts.map +1 -0
- package/icons/MagnifierIcon.js +0 -2
- package/icons/MapMarkerIcon.d.ts +7 -0
- package/icons/MapMarkerIcon.d.ts.map +1 -0
- package/icons/MapMarkerIcon.js +1 -3
- package/icons/MoreIcon.d.ts +7 -0
- package/icons/MoreIcon.d.ts.map +1 -0
- package/icons/MoreIcon.js +1 -3
- package/icons/MoreVertIcon.d.ts +7 -0
- package/icons/MoreVertIcon.d.ts.map +1 -0
- package/icons/MoreVertIcon.js +1 -3
- package/icons/NotificationIcon.d.ts +7 -0
- package/icons/NotificationIcon.d.ts.map +1 -0
- package/icons/NotificationIcon.js +1 -3
- package/icons/PersonIcon.d.ts +9 -0
- package/icons/PersonIcon.d.ts.map +1 -0
- package/icons/PersonIcon.js +0 -3
- package/icons/PhoneIcon.d.ts +7 -0
- package/icons/PhoneIcon.d.ts.map +1 -0
- package/icons/PhoneIcon.js +1 -4
- package/icons/PlaceholderIcon.d.ts +7 -0
- package/icons/PlaceholderIcon.d.ts.map +1 -0
- package/icons/PlaceholderIcon.js +0 -2
- package/icons/RadioCheckedIcon.d.ts +10 -0
- package/icons/RadioCheckedIcon.d.ts.map +1 -0
- package/icons/RadioCheckedIcon.js +0 -2
- package/icons/RadioUncheckedIcon.d.ts +10 -0
- package/icons/RadioUncheckedIcon.d.ts.map +1 -0
- package/icons/RadioUncheckedIcon.js +0 -2
- package/icons/SecurityIcon.d.ts +7 -0
- package/icons/SecurityIcon.d.ts.map +1 -0
- package/icons/SecurityIcon.js +0 -2
- package/icons/ShippingMethodIcon.d.ts +7 -0
- package/icons/ShippingMethodIcon.d.ts.map +1 -0
- package/icons/ShippingMethodIcon.js +0 -2
- package/icons/ShoppingCartIcon.d.ts +7 -0
- package/icons/ShoppingCartIcon.d.ts.map +1 -0
- package/icons/ShoppingCartIcon.js +0 -2
- package/icons/SortIcon.d.ts +7 -0
- package/icons/SortIcon.d.ts.map +1 -0
- package/icons/SortIcon.js +0 -2
- package/icons/StarHalfIcon.d.ts +7 -0
- package/icons/StarHalfIcon.d.ts.map +1 -0
- package/icons/StarHalfIcon.js +0 -9
- package/icons/StarIcon.d.ts +7 -0
- package/icons/StarIcon.d.ts.map +1 -0
- package/icons/StarIcon.js +0 -9
- package/icons/StarOutlineIcon.d.ts +7 -0
- package/icons/StarOutlineIcon.d.ts.map +1 -0
- package/icons/StarOutlineIcon.js +0 -2
- package/icons/StopIcon.d.ts +7 -0
- package/icons/StopIcon.d.ts.map +1 -0
- package/icons/StopIcon.js +0 -2
- package/icons/TickIcon.d.ts +7 -0
- package/icons/TickIcon.d.ts.map +1 -0
- package/icons/TickIcon.js +0 -2
- package/icons/TimeIcon.d.ts +7 -0
- package/icons/TimeIcon.d.ts.map +1 -0
- package/icons/TimeIcon.js +0 -2
- package/icons/TrashIcon.d.ts +7 -0
- package/icons/TrashIcon.d.ts.map +1 -0
- package/icons/TrashIcon.js +0 -3
- package/icons/TrashOutlineIcon.d.ts +8 -0
- package/icons/TrashOutlineIcon.d.ts.map +1 -0
- package/icons/TrashOutlineIcon.js +0 -2
- package/icons/UncheckedIcon.d.ts +7 -0
- package/icons/UncheckedIcon.d.ts.map +1 -0
- package/icons/UncheckedIcon.js +0 -2
- package/icons/ViewListIcon.d.ts +7 -0
- package/icons/ViewListIcon.d.ts.map +1 -0
- package/icons/ViewListIcon.js +0 -2
- package/icons/VisibilityIcon.d.ts +8 -0
- package/icons/VisibilityIcon.d.ts.map +1 -0
- package/icons/VisibilityIcon.js +2 -4
- package/icons/VisibilityOffIcon.d.ts +8 -0
- package/icons/VisibilityOffIcon.d.ts.map +1 -0
- package/icons/VisibilityOffIcon.js +2 -4
- package/icons/WarningIcon.d.ts +7 -0
- package/icons/WarningIcon.d.ts.map +1 -0
- package/icons/WarningIcon.js +1 -3
- package/package.json +5 -5
- package/tsconfig.build.json +16 -0
- package/tsconfig.json +3 -0
- package/ActionButton/style.js +0 -22
- package/AddToCartButton/style.js +0 -148
- package/Availability/style.js +0 -19
- package/Button/style.js +0 -155
- package/Card/style.js +0 -11
- package/CardList/components/Item/style.js +0 -7
- package/CartTotalLine/components/Amount/style.js +0 -8
- package/CartTotalLine/components/Hint/style.js +0 -12
- package/CartTotalLine/components/Label/style.js +0 -17
- package/CartTotalLine/style.js +0 -31
- package/Checkbox/style.js +0 -18
- package/Chip/style.js +0 -78
- package/ContextMenu/components/Item/style.js +0 -34
- package/ContextMenu/components/Position/style.js +0 -11
- package/ContextMenu/style.js +0 -45
- package/DiscountBadge/style.js +0 -36
- package/FavoritesButton/style.js +0 -26
- package/Form/Checkbox/style.js +0 -25
- package/Form/InfoField/style.js +0 -11
- package/Form/Password/style.js +0 -11
- package/Form/RadioGroup/components/Item/style.js +0 -32
- package/Form/RadioGroup/style.js +0 -20
- package/Form/Select/style.js +0 -27
- package/Form/SelectContextChoices/style.js +0 -23
- package/Form/TextField/style.js +0 -70
- package/FormElement/components/ErrorText/style.js +0 -13
- package/FormElement/components/Label/style.js +0 -89
- package/FormElement/components/Placeholder/style.js +0 -56
- package/FormElement/components/Underline/style.js +0 -60
- package/FormElement/style.js +0 -14
- package/Glow/style.js +0 -18
- package/IndicatorCircle/style.js +0 -65
- package/LoadingIndicator/style.js +0 -20
- package/Manufacturer/style.js +0 -5
- package/MessageBar/spec.js +0 -80
- package/MessageBar/style.js +0 -38
- package/NoResults/components/Icon/style.js +0 -17
- package/NoResults/style.js +0 -31
- package/Placeholder/style.js +0 -11
- package/PlaceholderLabel/style.js +0 -12
- package/Price/style.js +0 -22
- package/PriceInfo/style.js +0 -5
- package/PriceStriked/style.js +0 -36
- package/ProgressBar/style.js +0 -85
- package/RadioButton/style.js +0 -21
- package/RatingStars/style.js +0 -53
- package/Ripple/style.js +0 -18
- package/ScannerOverlay/components/CameraOverlay/style.js +0 -40
- package/ScannerOverlay/components/ScannerBar/components/FlashlightButton/style.js +0 -28
- package/ScannerOverlay/components/ScannerBar/style.js +0 -20
- package/Sheet/components/Header/components/SearchBar/style.js +0 -47
- package/Sheet/components/Header/style.js +0 -50
- package/Sheet/style.js +0 -143
- package/TaxDisclaimer/style.js +0 -9
- package/TextField/components/ErrorText/style.js +0 -27
- package/TextField/components/FormElement/style.js +0 -34
- package/TextField/components/Hint/style.js +0 -46
- package/TextField/components/Label/style.js +0 -80
- package/TextField/components/Underline/style.js +0 -60
- package/TextField/style.js +0 -35
package/ProgressBar/style.js
DELETED
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import { css } from 'glamor';
|
|
2
|
-
import Color from 'color';
|
|
3
|
-
import { themeConfig } from '@shopgate/pwa-common/helpers/config';
|
|
4
|
-
import { getCSSCustomProp } from '@shopgate/engage/styles';
|
|
5
|
-
const {
|
|
6
|
-
colors
|
|
7
|
-
} = themeConfig;
|
|
8
|
-
const progressBarHeight = 4;
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* Dynamically creates the class for the ProgressBar wrapper
|
|
12
|
-
* @returns {string}
|
|
13
|
-
*/
|
|
14
|
-
const wrapper = () => css({
|
|
15
|
-
position: 'absolute',
|
|
16
|
-
bottom: 0,
|
|
17
|
-
background: Color(getCSSCustomProp('--color-secondary') || colors.accent).fade(0.6),
|
|
18
|
-
width: '100%',
|
|
19
|
-
height: progressBarHeight,
|
|
20
|
-
overflow: 'hidden',
|
|
21
|
-
transition: 'transform 150ms cubic-bezier(0.25, 0.1, 0.25, 1)',
|
|
22
|
-
zIndex: '10'
|
|
23
|
-
}).toString();
|
|
24
|
-
const innerElement = css({
|
|
25
|
-
':before': {
|
|
26
|
-
content: '""',
|
|
27
|
-
position: 'absolute',
|
|
28
|
-
background: `var(--color-secondary, ${colors.accent})`,
|
|
29
|
-
top: 0,
|
|
30
|
-
left: 0,
|
|
31
|
-
bottom: 0,
|
|
32
|
-
willChange: 'left, right'
|
|
33
|
-
},
|
|
34
|
-
':after': {
|
|
35
|
-
content: '""',
|
|
36
|
-
position: 'absolute',
|
|
37
|
-
background: `var(--color-secondary, ${colors.accent})`,
|
|
38
|
-
top: 0,
|
|
39
|
-
left: 0,
|
|
40
|
-
bottom: 0,
|
|
41
|
-
willChange: 'left, right'
|
|
42
|
-
}
|
|
43
|
-
}).toString();
|
|
44
|
-
const indeterminateLong = css.keyframes({
|
|
45
|
-
'0%': {
|
|
46
|
-
left: '-35%',
|
|
47
|
-
right: '100%'
|
|
48
|
-
},
|
|
49
|
-
'60%': {
|
|
50
|
-
left: '100%',
|
|
51
|
-
right: '-90%'
|
|
52
|
-
},
|
|
53
|
-
'100%': {
|
|
54
|
-
left: '100%',
|
|
55
|
-
right: '-90%'
|
|
56
|
-
}
|
|
57
|
-
});
|
|
58
|
-
const indeterminateShort = css.keyframes({
|
|
59
|
-
'0%': {
|
|
60
|
-
left: '-200%',
|
|
61
|
-
right: '100%'
|
|
62
|
-
},
|
|
63
|
-
'60%': {
|
|
64
|
-
left: '107%',
|
|
65
|
-
right: '-8%'
|
|
66
|
-
},
|
|
67
|
-
'100%': {
|
|
68
|
-
left: '107%',
|
|
69
|
-
right: '-8%'
|
|
70
|
-
}
|
|
71
|
-
});
|
|
72
|
-
const animating = css({
|
|
73
|
-
':before': {
|
|
74
|
-
animation: `${indeterminateLong} 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite`
|
|
75
|
-
},
|
|
76
|
-
':after': {
|
|
77
|
-
animation: `${indeterminateShort} 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) infinite`,
|
|
78
|
-
animationDelay: '1.15s'
|
|
79
|
-
}
|
|
80
|
-
}).toString();
|
|
81
|
-
export default {
|
|
82
|
-
wrapper,
|
|
83
|
-
innerElement,
|
|
84
|
-
animating
|
|
85
|
-
};
|
package/RadioButton/style.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { css } from 'glamor';
|
|
2
|
-
import { themeConfig } from '@shopgate/pwa-common/helpers/config';
|
|
3
|
-
const {
|
|
4
|
-
colors
|
|
5
|
-
} = themeConfig;
|
|
6
|
-
const baseIcon = {
|
|
7
|
-
width: 24,
|
|
8
|
-
height: 24
|
|
9
|
-
};
|
|
10
|
-
const checkedIcon = css({
|
|
11
|
-
...baseIcon,
|
|
12
|
-
color: `var(--color-secondary, ${colors.accent})`
|
|
13
|
-
}).toString();
|
|
14
|
-
const uncheckedIcon = css({
|
|
15
|
-
...baseIcon,
|
|
16
|
-
color: colors.shade6
|
|
17
|
-
}).toString();
|
|
18
|
-
export default {
|
|
19
|
-
checkedIcon,
|
|
20
|
-
uncheckedIcon
|
|
21
|
-
};
|
package/RatingStars/style.js
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { css } from 'glamor';
|
|
2
|
-
import { themeConfig } from '@shopgate/pwa-common/helpers/config';
|
|
3
|
-
const {
|
|
4
|
-
colors
|
|
5
|
-
} = themeConfig;
|
|
6
|
-
const container = css({
|
|
7
|
-
position: 'relative'
|
|
8
|
-
}).toString();
|
|
9
|
-
const icon = css({
|
|
10
|
-
display: 'inline-block',
|
|
11
|
-
verticalAlign: 'top',
|
|
12
|
-
outline: 0
|
|
13
|
-
}).toString();
|
|
14
|
-
const emptyStars = css({
|
|
15
|
-
color: themeConfig.colors.shade7
|
|
16
|
-
}).toString();
|
|
17
|
-
const filledStars = css({
|
|
18
|
-
position: 'absolute',
|
|
19
|
-
color: `var(--color-primary, ${colors.primary})`,
|
|
20
|
-
top: 0
|
|
21
|
-
}).toString();
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* The rating stars styles that can be selected by passing the style key to the
|
|
25
|
-
* @type {Object}
|
|
26
|
-
*/
|
|
27
|
-
const iconStyles = {
|
|
28
|
-
small: {
|
|
29
|
-
iconSize: '1em',
|
|
30
|
-
iconStyle: css({
|
|
31
|
-
marginRight: '0.1em'
|
|
32
|
-
}).toString()
|
|
33
|
-
},
|
|
34
|
-
big: {
|
|
35
|
-
iconSize: '1.24em',
|
|
36
|
-
iconStyle: css({
|
|
37
|
-
marginRight: '0.12em'
|
|
38
|
-
}).toString()
|
|
39
|
-
},
|
|
40
|
-
large: {
|
|
41
|
-
iconSize: '2.3em',
|
|
42
|
-
iconStyle: css({
|
|
43
|
-
marginRight: '0.23em'
|
|
44
|
-
}).toString()
|
|
45
|
-
}
|
|
46
|
-
};
|
|
47
|
-
export default {
|
|
48
|
-
container,
|
|
49
|
-
icon,
|
|
50
|
-
iconStyles,
|
|
51
|
-
emptyStars,
|
|
52
|
-
filledStars
|
|
53
|
-
};
|
package/Ripple/style.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { css } from 'glamor';
|
|
2
|
-
const ripple = css({
|
|
3
|
-
position: 'absolute',
|
|
4
|
-
borderRadius: '50%',
|
|
5
|
-
transformOrigin: '50% 50% 0'
|
|
6
|
-
}).toString();
|
|
7
|
-
const container = css({
|
|
8
|
-
position: 'absolute',
|
|
9
|
-
zIndex: 0,
|
|
10
|
-
top: 0,
|
|
11
|
-
left: 0,
|
|
12
|
-
width: '100%',
|
|
13
|
-
height: '100%'
|
|
14
|
-
}).toString();
|
|
15
|
-
export default {
|
|
16
|
-
ripple,
|
|
17
|
-
container
|
|
18
|
-
};
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { css } from 'glamor';
|
|
2
|
-
import { themeVariables, themeColors } from '@shopgate/pwa-common/helpers/config';
|
|
3
|
-
const edgeHeight = 45;
|
|
4
|
-
const edgeWidth = 35;
|
|
5
|
-
const edgeBorderWidth = 3;
|
|
6
|
-
const edgeOffsetHorizontal = themeVariables.gap.xbig;
|
|
7
|
-
const edgeOffsetVertical = themeVariables.gap.xxbig;
|
|
8
|
-
export default css({
|
|
9
|
-
height: '90%',
|
|
10
|
-
width: '100%',
|
|
11
|
-
':before,:after,>:before,>:after': {
|
|
12
|
-
display: 'block',
|
|
13
|
-
content: ' ',
|
|
14
|
-
width: edgeWidth,
|
|
15
|
-
height: edgeHeight,
|
|
16
|
-
position: 'absolute',
|
|
17
|
-
borderStyle: 'solid',
|
|
18
|
-
borderColor: themeColors.light
|
|
19
|
-
},
|
|
20
|
-
':before': {
|
|
21
|
-
top: edgeOffsetVertical,
|
|
22
|
-
left: edgeOffsetHorizontal,
|
|
23
|
-
borderWidth: `${edgeBorderWidth}px 0 0 ${edgeBorderWidth}px`
|
|
24
|
-
},
|
|
25
|
-
':after': {
|
|
26
|
-
top: edgeOffsetVertical,
|
|
27
|
-
right: edgeOffsetHorizontal,
|
|
28
|
-
borderWidth: `${edgeBorderWidth}px ${edgeBorderWidth}px 0 0`
|
|
29
|
-
},
|
|
30
|
-
'>:before': {
|
|
31
|
-
bottom: edgeOffsetVertical,
|
|
32
|
-
left: edgeOffsetHorizontal,
|
|
33
|
-
borderWidth: `0 0 ${edgeBorderWidth}px ${edgeBorderWidth}px`
|
|
34
|
-
},
|
|
35
|
-
'>:after': {
|
|
36
|
-
bottom: edgeOffsetVertical,
|
|
37
|
-
right: edgeOffsetHorizontal,
|
|
38
|
-
borderWidth: `0 ${edgeBorderWidth}px ${edgeBorderWidth}px 0`
|
|
39
|
-
}
|
|
40
|
-
}).toString();
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { css } from 'glamor';
|
|
2
|
-
import { themeConfig } from '@shopgate/pwa-common/helpers/config';
|
|
3
|
-
const button = css({
|
|
4
|
-
alignItems: 'center',
|
|
5
|
-
color: 'inherit',
|
|
6
|
-
display: 'flex',
|
|
7
|
-
flexShrink: 0,
|
|
8
|
-
fontSize: 24,
|
|
9
|
-
height: 44,
|
|
10
|
-
justifyContent: 'center',
|
|
11
|
-
outline: 0,
|
|
12
|
-
padding: 0,
|
|
13
|
-
position: 'relative',
|
|
14
|
-
width: 44,
|
|
15
|
-
zIndex: 1
|
|
16
|
-
}).toString();
|
|
17
|
-
const iconWrapper = css({
|
|
18
|
-
width: 72
|
|
19
|
-
}).toString();
|
|
20
|
-
const icon = css({
|
|
21
|
-
boxSizing: 'content-box',
|
|
22
|
-
color: `var(--color-secondary, ${themeConfig.colors.accent})`
|
|
23
|
-
}).toString();
|
|
24
|
-
export default {
|
|
25
|
-
button,
|
|
26
|
-
iconWrapper,
|
|
27
|
-
icon
|
|
28
|
-
};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { css } from 'glamor';
|
|
2
|
-
import { themeShadows, themeColors, themeVariables } from '@shopgate/pwa-common/helpers/config';
|
|
3
|
-
const container = css({
|
|
4
|
-
bottom: 0,
|
|
5
|
-
backgroundColor: themeColors.overlay,
|
|
6
|
-
boxShadow: themeShadows.scannerBar,
|
|
7
|
-
fontSize: 14,
|
|
8
|
-
alignItems: 'center',
|
|
9
|
-
paddingBottom: 'var(--safe-area-inset-bottom)'
|
|
10
|
-
}).toString();
|
|
11
|
-
const column = css({
|
|
12
|
-
margin: `${themeVariables.gap.big}px`,
|
|
13
|
-
':not(:first-child)': {
|
|
14
|
-
marginLeft: 0
|
|
15
|
-
}
|
|
16
|
-
}).toString();
|
|
17
|
-
export default {
|
|
18
|
-
container,
|
|
19
|
-
column
|
|
20
|
-
};
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { css } from 'glamor';
|
|
2
|
-
import { themeColors } from '@shopgate/pwa-common/helpers/config';
|
|
3
|
-
const container = css({
|
|
4
|
-
display: 'flex',
|
|
5
|
-
flexDirection: 'row',
|
|
6
|
-
flexWrap: 'nowrap',
|
|
7
|
-
marginBottom: 4,
|
|
8
|
-
paddingLeft: 16,
|
|
9
|
-
paddingRight: 16,
|
|
10
|
-
paddingTop: 5,
|
|
11
|
-
paddingBottom: 10
|
|
12
|
-
}).toString();
|
|
13
|
-
const inputWrapper = css({
|
|
14
|
-
position: 'relative',
|
|
15
|
-
flexGrow: 1
|
|
16
|
-
}).toString();
|
|
17
|
-
const input = css({
|
|
18
|
-
borderRadius: 10,
|
|
19
|
-
width: '100%',
|
|
20
|
-
padding: '4px 10px 4px 30px',
|
|
21
|
-
lineHeight: '28px',
|
|
22
|
-
outline: 'none',
|
|
23
|
-
background: themeColors.shade7,
|
|
24
|
-
verticalAlign: 'middle',
|
|
25
|
-
WebkitAppearance: 'none'
|
|
26
|
-
}).toString();
|
|
27
|
-
const label = css({
|
|
28
|
-
alignItems: 'center',
|
|
29
|
-
color: themeColors.shade3,
|
|
30
|
-
display: 'flex',
|
|
31
|
-
height: '36px',
|
|
32
|
-
position: 'absolute',
|
|
33
|
-
pointerEvents: 'none',
|
|
34
|
-
width: '100%'
|
|
35
|
-
}).toString();
|
|
36
|
-
const icon = css({
|
|
37
|
-
padding: '0 6px',
|
|
38
|
-
color: themeColors.shade3,
|
|
39
|
-
fontSize: '1.235rem'
|
|
40
|
-
}).toString();
|
|
41
|
-
export default {
|
|
42
|
-
container,
|
|
43
|
-
inputWrapper,
|
|
44
|
-
input,
|
|
45
|
-
label,
|
|
46
|
-
icon
|
|
47
|
-
};
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { css } from 'glamor';
|
|
2
|
-
import { themeConfig } from '@shopgate/pwa-common/helpers/config';
|
|
3
|
-
const wrapper = css({
|
|
4
|
-
position: 'relative',
|
|
5
|
-
zIndex: 2
|
|
6
|
-
}).toString();
|
|
7
|
-
const closePlaceholder = css({
|
|
8
|
-
height: themeConfig.variables.navigator.height,
|
|
9
|
-
padding: 0,
|
|
10
|
-
lineHeight: 1
|
|
11
|
-
});
|
|
12
|
-
const closeButton = css({
|
|
13
|
-
lineHeight: 1,
|
|
14
|
-
outline: 0,
|
|
15
|
-
padding: 0,
|
|
16
|
-
minWidth: themeConfig.variables.navigator.height,
|
|
17
|
-
height: themeConfig.variables.navigator.height,
|
|
18
|
-
position: 'relative',
|
|
19
|
-
zIndex: 2,
|
|
20
|
-
color: 'var(--color-text-high-emphasis)'
|
|
21
|
-
}).toString();
|
|
22
|
-
const closeIcon = css({
|
|
23
|
-
display: 'flex',
|
|
24
|
-
height: '100%',
|
|
25
|
-
width: '100%',
|
|
26
|
-
justifyContent: 'center',
|
|
27
|
-
alignItems: 'center'
|
|
28
|
-
}).toString();
|
|
29
|
-
const title = css({
|
|
30
|
-
fontSize: '1.25rem',
|
|
31
|
-
fontWeight: 500,
|
|
32
|
-
position: 'relative',
|
|
33
|
-
alignItems: 'center',
|
|
34
|
-
padding: `0 ${themeConfig.variables.gap.big}px`,
|
|
35
|
-
overflow: 'hidden',
|
|
36
|
-
textOverflow: 'ellipsis',
|
|
37
|
-
whiteSpace: 'nowrap',
|
|
38
|
-
alignSelf: 'center'
|
|
39
|
-
}).toString();
|
|
40
|
-
const shadow = css({
|
|
41
|
-
boxShadow: themeConfig.shadows.material
|
|
42
|
-
});
|
|
43
|
-
export default {
|
|
44
|
-
wrapper,
|
|
45
|
-
closeButton,
|
|
46
|
-
closePlaceholder,
|
|
47
|
-
closeIcon,
|
|
48
|
-
title,
|
|
49
|
-
shadow
|
|
50
|
-
};
|
package/Sheet/style.js
DELETED
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
import { css } from 'glamor';
|
|
2
|
-
import { themeConfig } from '@shopgate/pwa-common/helpers/config';
|
|
3
|
-
import { responsiveMediaQuery } from '@shopgate/engage/styles';
|
|
4
|
-
const duration = 300;
|
|
5
|
-
const easing = 'cubic-bezier(0.25, 0.1, 0.25, 1)';
|
|
6
|
-
const section = css({
|
|
7
|
-
[responsiveMediaQuery('>sm', {
|
|
8
|
-
webOnly: true
|
|
9
|
-
})]: {
|
|
10
|
-
display: 'flex',
|
|
11
|
-
justifyContent: 'center',
|
|
12
|
-
alignItems: 'center',
|
|
13
|
-
width: '80%',
|
|
14
|
-
position: 'fixed',
|
|
15
|
-
left: 0,
|
|
16
|
-
right: 0,
|
|
17
|
-
top: 0,
|
|
18
|
-
bottom: 0,
|
|
19
|
-
margin: 'auto',
|
|
20
|
-
zIndex: 100
|
|
21
|
-
}
|
|
22
|
-
}).toString();
|
|
23
|
-
const container = css({
|
|
24
|
-
bottom: 0,
|
|
25
|
-
background: themeConfig.colors.light,
|
|
26
|
-
width: '100vw',
|
|
27
|
-
[responsiveMediaQuery('<xl', {
|
|
28
|
-
appOnly: true
|
|
29
|
-
})]: {
|
|
30
|
-
// Max width was introduced in PWA6 CCP-2496
|
|
31
|
-
maxWidth: 640
|
|
32
|
-
},
|
|
33
|
-
left: 0,
|
|
34
|
-
right: 0,
|
|
35
|
-
margin: '0 auto',
|
|
36
|
-
color: `var(--color-text-high-emphasis, ${themeConfig.colors.dark})`,
|
|
37
|
-
[responsiveMediaQuery('>sm', {
|
|
38
|
-
webOnly: true
|
|
39
|
-
})]: {
|
|
40
|
-
position: 'initial'
|
|
41
|
-
},
|
|
42
|
-
[responsiveMediaQuery('>md', {
|
|
43
|
-
webOnly: true
|
|
44
|
-
})]: {
|
|
45
|
-
width: '60%'
|
|
46
|
-
}
|
|
47
|
-
}).toString();
|
|
48
|
-
const containerFullScreen = css({
|
|
49
|
-
height: [`calc(100vh - ${themeConfig.variables.navigator.height}px - 51px)`, `calc(100vh - ${themeConfig.variables.navigator.height}px - 51px - var(--safe-area-inset-top))`]
|
|
50
|
-
});
|
|
51
|
-
const searchBarWrapper = css({
|
|
52
|
-
backgroundColor: 'white',
|
|
53
|
-
height: 52,
|
|
54
|
-
position: 'sticky',
|
|
55
|
-
width: '100%',
|
|
56
|
-
top: 0,
|
|
57
|
-
zIndex: 2
|
|
58
|
-
});
|
|
59
|
-
const progressBarContainer = css({
|
|
60
|
-
position: 'relative'
|
|
61
|
-
}).toString();
|
|
62
|
-
const shadow = css({
|
|
63
|
-
boxShadow: themeConfig.shadows.sheet
|
|
64
|
-
}).toString();
|
|
65
|
-
const content = css({
|
|
66
|
-
maxHeight: [`calc(var(--vh-100, 100vh) - ${themeConfig.variables.navigator.height}px)`, `calc(var(--vh-100, 100vh) - ${themeConfig.variables.navigator.height}px - var(--safe-area-inset-top))`],
|
|
67
|
-
[responsiveMediaQuery('>sm', {
|
|
68
|
-
webOnly: true
|
|
69
|
-
})]: {
|
|
70
|
-
maxHeight: [`calc(var(--vh-80, 80vh) - ${themeConfig.variables.navigator.height}px)`, `calc(var(--vh-80, 80vh) - ${themeConfig.variables.navigator.height}px - var(--safe-area-inset-top))`]
|
|
71
|
-
},
|
|
72
|
-
paddingBottom: ['var(--safe-area-inset-bottom)'],
|
|
73
|
-
overflowY: 'scroll',
|
|
74
|
-
WebkitOverflowScrolling: 'touch'
|
|
75
|
-
}).toString();
|
|
76
|
-
const slideInSheetDrawer = css.keyframes({
|
|
77
|
-
'0%': {
|
|
78
|
-
transform: 'translateY(100%)'
|
|
79
|
-
},
|
|
80
|
-
'100%': {
|
|
81
|
-
transform: 'translateY(0)'
|
|
82
|
-
}
|
|
83
|
-
});
|
|
84
|
-
const fadeInSheetDrawer = css.keyframes({
|
|
85
|
-
'0%': {
|
|
86
|
-
opacity: 0
|
|
87
|
-
},
|
|
88
|
-
'100%': {
|
|
89
|
-
opacity: 1
|
|
90
|
-
}
|
|
91
|
-
});
|
|
92
|
-
const slideOutSheetDrawer = css.keyframes({
|
|
93
|
-
'0%': {
|
|
94
|
-
transform: 'translateY(0)'
|
|
95
|
-
},
|
|
96
|
-
'100%': {
|
|
97
|
-
transform: 'translateY(100%)'
|
|
98
|
-
}
|
|
99
|
-
});
|
|
100
|
-
const fadeOutSheetDrawer = css.keyframes({
|
|
101
|
-
'0%': {
|
|
102
|
-
opacity: 1
|
|
103
|
-
},
|
|
104
|
-
'100%': {
|
|
105
|
-
opacity: 0
|
|
106
|
-
}
|
|
107
|
-
});
|
|
108
|
-
const drawerAnimation = {
|
|
109
|
-
in: css({
|
|
110
|
-
[responsiveMediaQuery('<=sm', {
|
|
111
|
-
appAlways: true
|
|
112
|
-
})]: {
|
|
113
|
-
animation: `${slideInSheetDrawer} ${duration}ms 1 both ${easing}`
|
|
114
|
-
},
|
|
115
|
-
[responsiveMediaQuery('>sm', {
|
|
116
|
-
webOnly: true
|
|
117
|
-
})]: {
|
|
118
|
-
animation: `${fadeInSheetDrawer} ${duration}ms 1 both ${easing}`
|
|
119
|
-
}
|
|
120
|
-
}).toString(),
|
|
121
|
-
out: css({
|
|
122
|
-
[responsiveMediaQuery('<=sm', {
|
|
123
|
-
appAlways: true
|
|
124
|
-
})]: {
|
|
125
|
-
animation: `${slideOutSheetDrawer} ${duration}ms 1 both ${easing}`
|
|
126
|
-
},
|
|
127
|
-
[responsiveMediaQuery('>sm', {
|
|
128
|
-
webOnly: true
|
|
129
|
-
})]: {
|
|
130
|
-
animation: `${fadeOutSheetDrawer} ${duration}ms 1 both ${easing}`
|
|
131
|
-
}
|
|
132
|
-
}).toString()
|
|
133
|
-
};
|
|
134
|
-
export default {
|
|
135
|
-
section,
|
|
136
|
-
container,
|
|
137
|
-
containerFullScreen,
|
|
138
|
-
searchBarWrapper,
|
|
139
|
-
progressBarContainer,
|
|
140
|
-
shadow,
|
|
141
|
-
content,
|
|
142
|
-
drawerAnimation
|
|
143
|
-
};
|
package/TaxDisclaimer/style.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { css } from 'glamor';
|
|
2
|
-
import { themeConfig } from '@shopgate/pwa-common/helpers/config';
|
|
3
|
-
export default css({
|
|
4
|
-
background: themeConfig.colors.background,
|
|
5
|
-
display: 'block',
|
|
6
|
-
fontSize: 12,
|
|
7
|
-
padding: `20px ${themeConfig.variables.gap.big}px`,
|
|
8
|
-
textAlign: 'left'
|
|
9
|
-
}).toString();
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { css } from 'glamor';
|
|
2
|
-
import { themeConfig } from '@shopgate/pwa-common/helpers/config';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* The style object for a one line text element with an ellipsis on overflow.
|
|
6
|
-
*/
|
|
7
|
-
const ellipsisLine = {
|
|
8
|
-
overflow: 'hidden',
|
|
9
|
-
width: '100%',
|
|
10
|
-
whiteSpace: 'nowrap',
|
|
11
|
-
textOverflow: 'ellipsis'
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* The styles for the error message.
|
|
16
|
-
*/
|
|
17
|
-
const error = css({
|
|
18
|
-
position: 'absolute',
|
|
19
|
-
bottom: 2,
|
|
20
|
-
fontSize: 12,
|
|
21
|
-
lineHeight: '14px',
|
|
22
|
-
color: `var(--color-state-alert, ${themeConfig.colors.error})`,
|
|
23
|
-
...ellipsisLine
|
|
24
|
-
}).toString();
|
|
25
|
-
export default {
|
|
26
|
-
error
|
|
27
|
-
};
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { css } from 'glamor';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* The styles for the input field.
|
|
5
|
-
*/
|
|
6
|
-
const input = css({
|
|
7
|
-
position: 'relative',
|
|
8
|
-
padding: 0,
|
|
9
|
-
width: '100%',
|
|
10
|
-
marginTop: 24,
|
|
11
|
-
outline: 0,
|
|
12
|
-
fontSize: 16,
|
|
13
|
-
lineHeight: '19px'
|
|
14
|
-
}).toString();
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* The styles for the multiLine.
|
|
18
|
-
*/
|
|
19
|
-
const multiLine = css({
|
|
20
|
-
position: 'relative',
|
|
21
|
-
marginTop: 24,
|
|
22
|
-
marginBottom: 3,
|
|
23
|
-
padding: 0,
|
|
24
|
-
width: '100%',
|
|
25
|
-
outline: 0,
|
|
26
|
-
height: 19,
|
|
27
|
-
minHeight: 19,
|
|
28
|
-
lineHeight: '19px',
|
|
29
|
-
verticalAlign: 'top' // Important to avoid bottom whitespace.
|
|
30
|
-
}).toString();
|
|
31
|
-
export default {
|
|
32
|
-
input,
|
|
33
|
-
multiLine
|
|
34
|
-
};
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { css } from 'glamor';
|
|
2
|
-
import classNames from 'classnames';
|
|
3
|
-
import { themeConfig } from '@shopgate/pwa-common/helpers/config';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* The style object for a one line text element with an ellipsis on overflow.
|
|
7
|
-
*/
|
|
8
|
-
const ellipsisLine = {
|
|
9
|
-
overflow: 'hidden',
|
|
10
|
-
width: '100%',
|
|
11
|
-
whiteSpace: 'nowrap',
|
|
12
|
-
textOverflow: 'ellipsis'
|
|
13
|
-
};
|
|
14
|
-
const easing = '450ms cubic-bezier(0.23, 1, 0.32, 1)';
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* The styles for the hint text.
|
|
18
|
-
*/
|
|
19
|
-
const hint = css({
|
|
20
|
-
position: 'absolute',
|
|
21
|
-
pointerEvents: 'none',
|
|
22
|
-
bottom: 12,
|
|
23
|
-
color: themeConfig.colors.shade4,
|
|
24
|
-
willChange: 'transform',
|
|
25
|
-
transition: `opacity ${easing}`,
|
|
26
|
-
...ellipsisLine
|
|
27
|
-
}).toString();
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* The styles for the invisible hint text.
|
|
31
|
-
*/
|
|
32
|
-
const hintInactive = css({
|
|
33
|
-
opacity: 0
|
|
34
|
-
}).toString();
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* Gets the style classes for the underline element.
|
|
38
|
-
* @param {boolean} visible Whether the hint is visible.
|
|
39
|
-
* @return {string} The style classes.
|
|
40
|
-
*/
|
|
41
|
-
const hintStyles = (visible = false) => classNames(hint, {
|
|
42
|
-
[hintInactive]: !visible
|
|
43
|
-
});
|
|
44
|
-
export default {
|
|
45
|
-
hintStyles
|
|
46
|
-
};
|