@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
|
@@ -1,19 +1,44 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import Input from '@shopgate/pwa-common/components/Input';
|
|
4
|
-
import
|
|
4
|
+
import { makeStyles } from '@shopgate/engage/styles';
|
|
5
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
+
const useStyles = makeStyles()({
|
|
7
|
+
input: {
|
|
8
|
+
position: 'relative',
|
|
9
|
+
padding: 0,
|
|
10
|
+
width: '100%',
|
|
11
|
+
marginTop: 24,
|
|
12
|
+
outline: 0,
|
|
13
|
+
fontSize: 16,
|
|
14
|
+
lineHeight: '19px'
|
|
15
|
+
},
|
|
16
|
+
multiLine: {
|
|
17
|
+
position: 'relative',
|
|
18
|
+
marginTop: 24,
|
|
19
|
+
marginBottom: 3,
|
|
20
|
+
padding: 0,
|
|
21
|
+
width: '100%',
|
|
22
|
+
outline: 0,
|
|
23
|
+
height: 19,
|
|
24
|
+
minHeight: 19,
|
|
25
|
+
lineHeight: '19px',
|
|
26
|
+
verticalAlign: 'top'
|
|
27
|
+
}
|
|
28
|
+
});
|
|
5
29
|
|
|
6
30
|
/**
|
|
7
31
|
* Creates an input or a multiLine based on the type prop.
|
|
8
32
|
* @param {Object} props The props.
|
|
9
33
|
* @returns {JSX.Element}
|
|
10
34
|
*/
|
|
11
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
35
|
const FormElement = props => {
|
|
13
|
-
const
|
|
36
|
+
const {
|
|
37
|
+
classes
|
|
38
|
+
} = useStyles();
|
|
14
39
|
return /*#__PURE__*/_jsx(Input, {
|
|
15
40
|
...props,
|
|
16
|
-
className:
|
|
41
|
+
className: props.multiLine ? classes.multiLine : classes.input,
|
|
17
42
|
validateOnBlur: true
|
|
18
43
|
});
|
|
19
44
|
};
|
|
@@ -1,8 +1,30 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
3
|
+
import { I18n } from '@shopgate/engage/components';
|
|
4
|
+
import { themeConfig } from '@shopgate/pwa-common/helpers/config';
|
|
5
|
+
import { makeStyles } from '@shopgate/engage/styles';
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
+
const easing = '450ms cubic-bezier(0.23, 1, 0.32, 1)';
|
|
8
|
+
const ellipsisLine = {
|
|
9
|
+
overflow: 'hidden',
|
|
10
|
+
width: '100%',
|
|
11
|
+
whiteSpace: 'nowrap',
|
|
12
|
+
textOverflow: 'ellipsis'
|
|
13
|
+
};
|
|
14
|
+
const useStyles = makeStyles()({
|
|
15
|
+
hint: {
|
|
16
|
+
position: 'absolute',
|
|
17
|
+
pointerEvents: 'none',
|
|
18
|
+
bottom: 12,
|
|
19
|
+
color: themeConfig.colors.shade4,
|
|
20
|
+
willChange: 'transform',
|
|
21
|
+
transition: `opacity ${easing}`,
|
|
22
|
+
...ellipsisLine
|
|
23
|
+
},
|
|
24
|
+
hintInactive: {
|
|
25
|
+
opacity: 0
|
|
26
|
+
}
|
|
27
|
+
});
|
|
6
28
|
|
|
7
29
|
/**
|
|
8
30
|
* The form element hint component.
|
|
@@ -10,16 +32,23 @@ import styles from "./style";
|
|
|
10
32
|
* @param {boolean} visible Sets the hint visibility.
|
|
11
33
|
* @return {JSX}
|
|
12
34
|
*/
|
|
13
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
35
|
const Hint = ({
|
|
15
36
|
hintText,
|
|
16
37
|
visible
|
|
17
|
-
}) =>
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
})
|
|
22
|
-
|
|
38
|
+
}) => {
|
|
39
|
+
const {
|
|
40
|
+
classes,
|
|
41
|
+
cx
|
|
42
|
+
} = useStyles();
|
|
43
|
+
return /*#__PURE__*/_jsx("div", {
|
|
44
|
+
className: cx(classes.hint, {
|
|
45
|
+
[classes.hintInactive]: !visible
|
|
46
|
+
}, 'hint'),
|
|
47
|
+
children: /*#__PURE__*/_jsx(I18n.Text, {
|
|
48
|
+
string: hintText
|
|
49
|
+
})
|
|
50
|
+
});
|
|
51
|
+
};
|
|
23
52
|
Hint.defaultProps = {
|
|
24
53
|
hintText: '',
|
|
25
54
|
visible: false
|
|
@@ -1,24 +1,61 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
3
|
+
import { I18n } from '@shopgate/engage/components';
|
|
4
|
+
import { makeStyles } from '@shopgate/engage/styles';
|
|
5
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
+
const easing = '450ms cubic-bezier(0.23, 1, 0.32, 1)';
|
|
7
|
+
const ellipsisLine = {
|
|
8
|
+
overflow: 'hidden',
|
|
9
|
+
width: '100%',
|
|
10
|
+
whiteSpace: 'nowrap',
|
|
11
|
+
textOverflow: 'ellipsis'
|
|
12
|
+
};
|
|
13
|
+
const useStyles = makeStyles()(theme => ({
|
|
14
|
+
label: {
|
|
15
|
+
position: 'absolute',
|
|
16
|
+
left: 0,
|
|
17
|
+
top: 24,
|
|
18
|
+
lineHeight: '19px',
|
|
19
|
+
pointerEvents: 'none',
|
|
20
|
+
userSelect: 'none',
|
|
21
|
+
color: 'var(--color-text-medium-emphasis)',
|
|
22
|
+
transformOrigin: 'left top 0px',
|
|
23
|
+
willChange: 'transform, color',
|
|
24
|
+
transition: `transform ${easing}, color ${easing}`,
|
|
25
|
+
...ellipsisLine
|
|
26
|
+
},
|
|
27
|
+
labelFloating: {
|
|
28
|
+
transform: 'translate3d(0, -22px, 0) scale3d(0.75, 0.75, 0.75)'
|
|
29
|
+
},
|
|
30
|
+
labelRegular: {
|
|
31
|
+
color: 'var(--color-text-medium-emphasis)'
|
|
32
|
+
},
|
|
33
|
+
labelError: {
|
|
34
|
+
color: theme.palette.error.main
|
|
35
|
+
}
|
|
36
|
+
}));
|
|
6
37
|
|
|
7
38
|
/**
|
|
8
39
|
* Renders the label element.
|
|
9
40
|
* @param {Object} props The component props.
|
|
10
41
|
* @return {JSX}
|
|
11
42
|
*/
|
|
12
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
43
|
const Label = props => {
|
|
14
|
-
const
|
|
44
|
+
const {
|
|
45
|
+
classes,
|
|
46
|
+
cx
|
|
47
|
+
} = useStyles();
|
|
15
48
|
return (
|
|
16
49
|
/*#__PURE__*/
|
|
17
50
|
// eslint-disable-next-line jsx-a11y/label-has-associated-control
|
|
18
51
|
_jsx("label", {
|
|
19
52
|
htmlFor: props.name,
|
|
20
53
|
"aria-hidden": true,
|
|
21
|
-
className:
|
|
54
|
+
className: cx(classes.label, {
|
|
55
|
+
[classes.labelFloating]: props.isFloating,
|
|
56
|
+
[classes.labelRegular]: !props.isFocused,
|
|
57
|
+
[classes.labelError]: props.hasErrorMessage && props.isFocused
|
|
58
|
+
}, 'label', {
|
|
22
59
|
floating: props.isFloating
|
|
23
60
|
}),
|
|
24
61
|
children: /*#__PURE__*/_jsx(I18n.Text, {
|
|
@@ -1,22 +1,73 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import
|
|
4
|
-
import
|
|
3
|
+
import color from 'color';
|
|
4
|
+
import { getCSSCustomProp, makeStyles, useTheme } from '@shopgate/engage/styles';
|
|
5
|
+
import { themeConfig } from '@shopgate/pwa-common/helpers/config';
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
+
const {
|
|
8
|
+
colors
|
|
9
|
+
} = themeConfig;
|
|
10
|
+
const easing = '450ms cubic-bezier(0.23, 1, 0.32, 1)';
|
|
11
|
+
const useStyles = makeStyles()({
|
|
12
|
+
underlineWrapper: {
|
|
13
|
+
position: 'relative',
|
|
14
|
+
width: '100%',
|
|
15
|
+
borderBottom: `1px solid ${colors.shade12}`,
|
|
16
|
+
marginTop: 2,
|
|
17
|
+
marginBottom: 7
|
|
18
|
+
},
|
|
19
|
+
underline: {
|
|
20
|
+
position: 'relative',
|
|
21
|
+
width: '100%',
|
|
22
|
+
top: 1,
|
|
23
|
+
borderBottomWidth: 2,
|
|
24
|
+
borderBottomStyle: 'solid',
|
|
25
|
+
willChange: 'transform',
|
|
26
|
+
transition: `transform ${easing}`
|
|
27
|
+
}
|
|
28
|
+
});
|
|
5
29
|
|
|
6
30
|
/**
|
|
7
|
-
*
|
|
8
|
-
* @param {
|
|
31
|
+
* Returns the underline inline style.
|
|
32
|
+
* @param {boolean} focused Is focused set or not.
|
|
33
|
+
* @param {boolean} hasError Has error set or not.
|
|
34
|
+
* @param {string} errorColor Theme error main color.
|
|
35
|
+
* @return {Object} style
|
|
36
|
+
*/
|
|
37
|
+
const getUnderlineStyle = (focused, hasError, errorColor) => {
|
|
38
|
+
const primaryColor = getCSSCustomProp('--color-primary') || colors.primary;
|
|
39
|
+
let focusColor = '--color-primary';
|
|
40
|
+
if (color(primaryColor).luminosity() >= 0.8) {
|
|
41
|
+
focusColor = '--color-secondary';
|
|
42
|
+
}
|
|
43
|
+
return {
|
|
44
|
+
borderBottomColor: hasError ? errorColor : `var(${focusColor}, ${colors.focus})`,
|
|
45
|
+
...(!focused && !hasError && {
|
|
46
|
+
transform: 'scale3d(0,1,1)'
|
|
47
|
+
})
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Renders the underline element.
|
|
53
|
+
* @param {Object} props The component props.
|
|
9
54
|
* @return {JSX}
|
|
10
55
|
*/
|
|
11
|
-
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
56
|
+
const Underline = props => {
|
|
57
|
+
const theme = useTheme();
|
|
58
|
+
const {
|
|
59
|
+
classes,
|
|
60
|
+
cx
|
|
61
|
+
} = useStyles();
|
|
62
|
+
return /*#__PURE__*/_jsx("div", {
|
|
63
|
+
className: cx(classes.underlineWrapper, 'underline'),
|
|
64
|
+
"aria-hidden": true,
|
|
65
|
+
children: /*#__PURE__*/_jsx("div", {
|
|
66
|
+
className: classes.underline,
|
|
67
|
+
style: getUnderlineStyle(props.isFocused, props.hasErrorMessage, theme.palette.error.main)
|
|
68
|
+
})
|
|
69
|
+
});
|
|
70
|
+
};
|
|
20
71
|
Underline.defaultProps = {
|
|
21
72
|
isFocused: false,
|
|
22
73
|
hasErrorMessage: false
|
package/TextField/index.js
CHANGED
|
@@ -1,196 +1,182 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import React, { Component } from 'react';
|
|
1
|
+
import "core-js/modules/es.array.includes.js";
|
|
2
|
+
import React, { useState, useCallback, useMemo, useRef } from 'react';
|
|
4
3
|
import PropTypes from 'prop-types';
|
|
5
|
-
import
|
|
4
|
+
import { makeStyles } from '@shopgate/engage/styles';
|
|
6
5
|
import Label from "./components/Label";
|
|
7
6
|
import Underline from "./components/Underline";
|
|
8
7
|
import ErrorText from "./components/ErrorText";
|
|
9
8
|
import Hint from "./components/Hint";
|
|
10
|
-
import styles from "./style";
|
|
11
9
|
import FormElement from "./components/FormElement/index";
|
|
10
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
11
|
+
const bluredDateSelector = 'input[type="date"]:in-range:not(:focus)';
|
|
12
|
+
const webkitDateFields = ['::-webkit-datetime-edit-year-field', '::-webkit-datetime-edit-month-field', '::-webkit-datetime-edit-day-field', '::-webkit-datetime-edit-text'].map(suffix => `${bluredDateSelector}${suffix}`).join(', ');
|
|
13
|
+
const useStyles = makeStyles()(theme => ({
|
|
14
|
+
input: {
|
|
15
|
+
position: 'relative',
|
|
16
|
+
paddingBottom: theme.spacing(2),
|
|
17
|
+
width: '100%',
|
|
18
|
+
'& input[type="date"]': {
|
|
19
|
+
minHeight: '1.3rem',
|
|
20
|
+
appearance: 'none',
|
|
21
|
+
paddingLeft: 0,
|
|
22
|
+
marginLeft: 0
|
|
23
|
+
},
|
|
24
|
+
[`& ${webkitDateFields}`]: {
|
|
25
|
+
padding: 0,
|
|
26
|
+
color: 'transparent'
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
multiLine: {
|
|
30
|
+
position: 'relative',
|
|
31
|
+
width: '100%'
|
|
32
|
+
}
|
|
33
|
+
}));
|
|
12
34
|
|
|
13
35
|
/**
|
|
14
36
|
* A component that provides a styled text field for user input in material design.
|
|
37
|
+
* @param {Object} props Props.
|
|
38
|
+
* @returns {JSX.Element}
|
|
15
39
|
*/
|
|
16
|
-
|
|
17
|
-
|
|
40
|
+
const TextField = ({
|
|
41
|
+
name,
|
|
42
|
+
className,
|
|
43
|
+
disabled,
|
|
44
|
+
errorText,
|
|
45
|
+
hintText,
|
|
46
|
+
inputComponent,
|
|
47
|
+
isControlled,
|
|
48
|
+
label,
|
|
49
|
+
multiLine,
|
|
50
|
+
onChange,
|
|
51
|
+
onFocusChange,
|
|
52
|
+
onSanitize,
|
|
53
|
+
onValidate,
|
|
54
|
+
password,
|
|
55
|
+
required,
|
|
56
|
+
setRef,
|
|
57
|
+
showErrorText,
|
|
58
|
+
translateErrorText,
|
|
59
|
+
type,
|
|
60
|
+
value
|
|
61
|
+
}) => {
|
|
62
|
+
const {
|
|
63
|
+
classes,
|
|
64
|
+
cx
|
|
65
|
+
} = useStyles();
|
|
66
|
+
const [isFocused, setIsFocused] = useState(false);
|
|
67
|
+
const [validationError, setValidationError] = useState(null);
|
|
18
68
|
/**
|
|
19
|
-
*
|
|
20
|
-
*
|
|
69
|
+
* Mirrors validation errors set during initial validate (Input constructor) without setState,
|
|
70
|
+
* so Underline / ErrorText (rendered after FormElement) still see the message in the same pass.
|
|
21
71
|
*/
|
|
22
|
-
|
|
23
|
-
var _this;
|
|
24
|
-
_this = _Component.call(this, props) || this;
|
|
25
|
-
/**
|
|
26
|
-
* Internal focus event handler.
|
|
27
|
-
* @param {boolean} isFocused Whether the input component is focused.
|
|
28
|
-
*/
|
|
29
|
-
_this.handleFocusChange = isFocused => {
|
|
30
|
-
_this.setState({
|
|
31
|
-
isFocused
|
|
32
|
-
});
|
|
33
|
-
_this.props.onFocusChange(isFocused);
|
|
34
|
-
};
|
|
35
|
-
/**
|
|
36
|
-
* Updates the state if the input value has been changed.
|
|
37
|
-
* @param {string} value The entered text.
|
|
38
|
-
* @param {Object} event The original event object.
|
|
39
|
-
*/
|
|
40
|
-
_this.handleChange = (value, event) => {
|
|
41
|
-
_this.props.onChange(value, event);
|
|
42
|
-
};
|
|
43
|
-
/**
|
|
44
|
-
* Updates the validation error text if required.
|
|
45
|
-
* @param {string} value The entered text.
|
|
46
|
-
* @param {boolean} isInitial Whether this is the initial value of the input field.
|
|
47
|
-
* @return {boolean} Whether the validation was successful.
|
|
48
|
-
*/
|
|
49
|
-
_this.handleValidate = (value, isInitial) => {
|
|
50
|
-
const validationError = _this.props.onValidate(value);
|
|
51
|
-
if (validationError !== true && validationError) {
|
|
52
|
-
/**
|
|
53
|
-
* An error message was returned by the validation callback. Update the state.
|
|
54
|
-
* Because the validation is performed when the component is constructed, we need to make
|
|
55
|
-
* sure we're not calling setState() in this situation.
|
|
56
|
-
*/
|
|
57
|
-
if (!isInitial) {
|
|
58
|
-
_this.setState({
|
|
59
|
-
validationError
|
|
60
|
-
});
|
|
61
|
-
} else {
|
|
62
|
-
_this.state.validationError = validationError;
|
|
63
|
-
}
|
|
64
|
-
} else if (_this.state.validationError) {
|
|
65
|
-
// There was no error, clear the state variable.
|
|
66
|
-
_this.setState({
|
|
67
|
-
validationError: null
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
// Forward the boolean result to the input field.
|
|
72
|
-
return validationError === true;
|
|
73
|
-
};
|
|
74
|
-
_this.state = {
|
|
75
|
-
isFocused: false,
|
|
76
|
-
validationError: null
|
|
77
|
-
};
|
|
78
|
-
return _this;
|
|
79
|
-
}
|
|
72
|
+
const syncValidationErrorRef = useRef(null);
|
|
80
73
|
|
|
81
74
|
/**
|
|
82
|
-
*
|
|
75
|
+
* Internal focus event handler.
|
|
76
|
+
* @param {boolean} focused Whether the input component is focused.
|
|
83
77
|
*/
|
|
84
|
-
|
|
85
|
-
|
|
78
|
+
const handleFocusChange = useCallback(focused => {
|
|
79
|
+
setIsFocused(focused);
|
|
80
|
+
onFocusChange(focused);
|
|
81
|
+
}, [onFocusChange]);
|
|
82
|
+
|
|
86
83
|
/**
|
|
87
|
-
*
|
|
88
|
-
* @
|
|
84
|
+
* Updates the state if the input value has been changed.
|
|
85
|
+
* @param {string} v The entered text.
|
|
86
|
+
* @param {Object} event The original event object.
|
|
89
87
|
*/
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
const {
|
|
94
|
-
multiLine,
|
|
95
|
-
className,
|
|
96
|
-
disabled,
|
|
97
|
-
hintText,
|
|
98
|
-
name,
|
|
99
|
-
label,
|
|
100
|
-
setRef,
|
|
101
|
-
onSanitize,
|
|
102
|
-
password,
|
|
103
|
-
type,
|
|
104
|
-
value,
|
|
105
|
-
isControlled,
|
|
106
|
-
inputComponent,
|
|
107
|
-
showErrorText,
|
|
108
|
-
errorText,
|
|
109
|
-
translateErrorText,
|
|
110
|
-
required
|
|
111
|
-
} = this.props;
|
|
112
|
-
return /*#__PURE__*/_jsxs("div", {
|
|
113
|
-
className: classNames(style, className, 'textField', 'ui-shared__text-field', {
|
|
114
|
-
disabled
|
|
115
|
-
}),
|
|
116
|
-
children: [/*#__PURE__*/_jsx(Hint, {
|
|
117
|
-
visible: this.isHintVisible,
|
|
118
|
-
hintText: hintText
|
|
119
|
-
}), /*#__PURE__*/_jsx(Label, {
|
|
120
|
-
name: name,
|
|
121
|
-
label: label,
|
|
122
|
-
isFocused: this.isFocused,
|
|
123
|
-
isFloating: this.isLabelFloating,
|
|
124
|
-
hasErrorMessage: this.hasErrorMessage
|
|
125
|
-
}), /*#__PURE__*/_jsx(FormElement, {
|
|
126
|
-
id: name,
|
|
127
|
-
multiLine: multiLine,
|
|
128
|
-
name: name,
|
|
129
|
-
setRef: setRef,
|
|
130
|
-
onFocusChange: this.handleFocusChange,
|
|
131
|
-
onChange: this.handleChange,
|
|
132
|
-
onSanitize: onSanitize,
|
|
133
|
-
onValidate: this.handleValidate,
|
|
134
|
-
password: password,
|
|
135
|
-
type: type,
|
|
136
|
-
value: value,
|
|
137
|
-
isControlled: isControlled,
|
|
138
|
-
inputComponent: inputComponent,
|
|
139
|
-
disabled: disabled,
|
|
140
|
-
required: required,
|
|
141
|
-
attributes: {
|
|
142
|
-
'aria-invalid': !!errorText,
|
|
143
|
-
'aria-describedby': this.hasErrorMessage ? `ariaError-${name}` : null
|
|
144
|
-
}
|
|
145
|
-
}), /*#__PURE__*/_jsx(Underline, {
|
|
146
|
-
isFocused: this.isFocused,
|
|
147
|
-
hasErrorMessage: this.hasErrorMessage
|
|
148
|
-
}), showErrorText && /*#__PURE__*/_jsx(ErrorText, {
|
|
149
|
-
validationError: this.state.validationError,
|
|
150
|
-
errorText: errorText,
|
|
151
|
-
translate: translateErrorText,
|
|
152
|
-
elementName: name
|
|
153
|
-
})]
|
|
154
|
-
});
|
|
155
|
-
};
|
|
156
|
-
return _createClass(TextField, [{
|
|
157
|
-
key: "isFocused",
|
|
158
|
-
get: function () {
|
|
159
|
-
return this.state.isFocused;
|
|
160
|
-
}
|
|
88
|
+
const handleChange = useCallback((v, event) => {
|
|
89
|
+
onChange(v, event);
|
|
90
|
+
}, [onChange]);
|
|
161
91
|
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
92
|
+
/**
|
|
93
|
+
* Updates the validation error text if required.
|
|
94
|
+
* @param {string} enteredValue The entered text.
|
|
95
|
+
* @param {boolean} isInitial Whether this is the initial value of the input field.
|
|
96
|
+
* @returns {boolean} Whether the validation was successful.
|
|
97
|
+
*/
|
|
98
|
+
const handleValidate = useCallback((enteredValue, isInitial) => {
|
|
99
|
+
const validationErr = onValidate(enteredValue);
|
|
100
|
+
if (validationErr !== true && validationErr) {
|
|
101
|
+
syncValidationErrorRef.current = validationErr;
|
|
102
|
+
/**
|
|
103
|
+
* An error message was returned by the validation callback. Update the state.
|
|
104
|
+
* Because the validation is performed when the component is constructed, we need to make
|
|
105
|
+
* sure we're not calling setState() in this situation.
|
|
106
|
+
*/
|
|
107
|
+
if (!isInitial) {
|
|
108
|
+
setValidationError(validationErr);
|
|
171
109
|
}
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
110
|
+
} else {
|
|
111
|
+
// There was no error, clear the state variable.
|
|
112
|
+
setValidationError(prev => {
|
|
113
|
+
const hadSyncError = syncValidationErrorRef.current !== null;
|
|
114
|
+
if (prev !== null || hadSyncError) {
|
|
115
|
+
syncValidationErrorRef.current = null;
|
|
116
|
+
return null;
|
|
117
|
+
}
|
|
118
|
+
return prev;
|
|
119
|
+
});
|
|
182
120
|
}
|
|
183
121
|
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
return
|
|
122
|
+
// Forward the boolean result to the input field.
|
|
123
|
+
return validationErr === true;
|
|
124
|
+
}, [onValidate]);
|
|
125
|
+
const isLabelFloating = useMemo(() => {
|
|
126
|
+
// On Firefox empty date inputs always show a placeholder with date pattern
|
|
127
|
+
if (typeof navigator !== 'undefined' && navigator.userAgent.includes('Firefox') && type === 'date') {
|
|
128
|
+
return true;
|
|
191
129
|
}
|
|
192
|
-
|
|
193
|
-
}
|
|
130
|
+
return isFocused || !!value;
|
|
131
|
+
}, [isFocused, value, type]);
|
|
132
|
+
const isHintVisible = isFocused && !value;
|
|
133
|
+
const displayValidationError = validationError || syncValidationErrorRef.current;
|
|
134
|
+
const hasErrorMessage = !!(displayValidationError || errorText);
|
|
135
|
+
const containerClass = multiLine ? classes.multiLine : classes.input;
|
|
136
|
+
return /*#__PURE__*/_jsxs("div", {
|
|
137
|
+
className: cx(containerClass, className, 'textField', 'ui-shared__text-field', {
|
|
138
|
+
disabled
|
|
139
|
+
}),
|
|
140
|
+
children: [/*#__PURE__*/_jsx(Hint, {
|
|
141
|
+
visible: isHintVisible,
|
|
142
|
+
hintText: hintText
|
|
143
|
+
}), /*#__PURE__*/_jsx(Label, {
|
|
144
|
+
name: name,
|
|
145
|
+
label: label,
|
|
146
|
+
isFocused: isFocused,
|
|
147
|
+
isFloating: isLabelFloating,
|
|
148
|
+
hasErrorMessage: hasErrorMessage
|
|
149
|
+
}), /*#__PURE__*/_jsx(FormElement, {
|
|
150
|
+
id: name,
|
|
151
|
+
multiLine: multiLine,
|
|
152
|
+
name: name,
|
|
153
|
+
setRef: setRef,
|
|
154
|
+
onFocusChange: handleFocusChange,
|
|
155
|
+
onChange: handleChange,
|
|
156
|
+
onSanitize: onSanitize,
|
|
157
|
+
onValidate: handleValidate,
|
|
158
|
+
password: password,
|
|
159
|
+
type: type,
|
|
160
|
+
value: value,
|
|
161
|
+
isControlled: isControlled,
|
|
162
|
+
inputComponent: inputComponent,
|
|
163
|
+
disabled: disabled,
|
|
164
|
+
required: required,
|
|
165
|
+
attributes: {
|
|
166
|
+
'aria-invalid': !!errorText,
|
|
167
|
+
'aria-describedby': hasErrorMessage ? `ariaError-${name}` : null
|
|
168
|
+
}
|
|
169
|
+
}), /*#__PURE__*/_jsx(Underline, {
|
|
170
|
+
isFocused: isFocused,
|
|
171
|
+
hasErrorMessage: hasErrorMessage
|
|
172
|
+
}), showErrorText && /*#__PURE__*/_jsx(ErrorText, {
|
|
173
|
+
validationError: displayValidationError,
|
|
174
|
+
errorText: errorText,
|
|
175
|
+
translate: translateErrorText,
|
|
176
|
+
elementName: name
|
|
177
|
+
})]
|
|
178
|
+
});
|
|
179
|
+
};
|
|
194
180
|
TextField.defaultProps = {
|
|
195
181
|
className: '',
|
|
196
182
|
errorText: '',
|
package/TextField/spec.js
CHANGED
|
@@ -87,11 +87,13 @@ describe('<TextField />', () => {
|
|
|
87
87
|
}));
|
|
88
88
|
const input = wrapper.find('input');
|
|
89
89
|
expect(wrapper).toMatchSnapshot();
|
|
90
|
-
expect(
|
|
90
|
+
expect(onFocusMock).toHaveBeenCalledTimes(0);
|
|
91
91
|
input.simulate('focus');
|
|
92
|
-
expect(
|
|
92
|
+
expect(onFocusMock).toHaveBeenCalledTimes(1);
|
|
93
|
+
expect(onFocusMock).toHaveBeenCalledWith(true);
|
|
93
94
|
input.simulate('blur');
|
|
94
|
-
expect(
|
|
95
|
+
expect(onFocusMock).toHaveBeenCalledTimes(2);
|
|
96
|
+
expect(onFocusMock).toHaveBeenCalledWith(false);
|
|
95
97
|
});
|
|
96
98
|
it('should show the error message', () => {
|
|
97
99
|
const errorText = 'This is an error here';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { IconProps } from '@shopgate/pwa-common/components/Icon';
|
|
2
|
+
/**
|
|
3
|
+
* The account box icon component.
|
|
4
|
+
*/
|
|
5
|
+
declare const AccountBox: (props: Omit<IconProps, "content">) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export default AccountBox;
|
|
7
|
+
//# sourceMappingURL=AccountBoxIcon.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AccountBoxIcon.d.ts","sourceRoot":"","sources":["../../icons/AccountBoxIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAC;AAItE;;GAEG;AACH,QAAA,MAAM,UAAU,GAAI,OAAO,IAAI,CAAC,SAAS,EAAE,SAAS,CAAC,4CACQ,CAAC;AAE9D,eAAe,UAAU,CAAC"}
|
package/icons/AccountBoxIcon.js
CHANGED
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import Icon from '@shopgate/pwa-common/components/Icon';
|
|
3
2
|
import { themeConfig } from '@shopgate/pwa-common/helpers/config';
|
|
4
3
|
|
|
5
4
|
/**
|
|
6
|
-
* The
|
|
7
|
-
* @param {Object} props The icon component properties.
|
|
8
|
-
* @returns {JSX}
|
|
5
|
+
* The account box icon component.
|
|
9
6
|
*/
|
|
10
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
8
|
const AccountBox = props => /*#__PURE__*/_jsx(Icon, {
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { IconProps } from '@shopgate/pwa-common/components/Icon';
|
|
2
|
+
/**
|
|
3
|
+
* The add more icon component.
|
|
4
|
+
*/
|
|
5
|
+
declare const AddMore: (props: Omit<IconProps, "content">) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export default AddMore;
|
|
7
|
+
//# sourceMappingURL=AddMoreIcon.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AddMoreIcon.d.ts","sourceRoot":"","sources":["../../icons/AddMoreIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sCAAsC,CAAC;AAItE;;GAEG;AACH,QAAA,MAAM,OAAO,GAAI,OAAO,IAAI,CAAC,SAAS,EAAE,SAAS,CAAC,4CACQ,CAAC;AAE3D,eAAe,OAAO,CAAC"}
|