@salutejs/plasma-core 1.226.0-next-platform-ai.0 → 1.227.0-dev.0
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/__helpers/IconPlaceholder.js +6 -9
- package/__helpers/index.js +1 -1
- package/collectPackageInfo.js +4 -4
- package/components/Badge/Badge.js +30 -103
- package/components/Badge/index.js +1 -1
- package/components/Basebox/Basebox.js +33 -42
- package/components/Basebox/index.js +1 -1
- package/components/Button/Button.js +28 -67
- package/components/Button/Button.mixins.js +22 -76
- package/components/Button/Button.props.js +5 -5
- package/components/Button/createButton.js +14 -145
- package/components/Button/index.js +4 -4
- package/components/Card/Card.js +34 -162
- package/components/Card/CardBody.js +4 -4
- package/components/Card/CardContent.js +14 -23
- package/components/Card/CardMedia.js +20 -91
- package/components/Card/CardPrice.js +18 -60
- package/components/Card/CardTypography.js +43 -52
- package/components/Card/index.js +5 -5
- package/components/Carousel/Carousel.js +46 -64
- package/components/Carousel/CarouselItem.js +21 -93
- package/components/Carousel/hooks.js +62 -121
- package/components/Carousel/index.js +3 -3
- package/components/Carousel/utils.js +59 -73
- package/components/Fade/Fade.js +6 -9
- package/components/Fade/index.js +1 -1
- package/components/Field/Field.js +48 -63
- package/components/Field/Field.statuses.js +3 -3
- package/components/Field/index.js +2 -2
- package/components/Image/Image.js +34 -115
- package/components/Image/index.js +1 -1
- package/components/Input/Input.js +7 -7
- package/components/Input/Input.mixins.js +9 -12
- package/components/Input/index.js +1 -1
- package/components/ModalBase/ModalBase.js +22 -100
- package/components/ModalBase/ModalBaseContext.js +6 -9
- package/components/ModalBase/ModalOverlay.js +28 -111
- package/components/ModalBase/hooks.js +15 -43
- package/components/ModalBase/index.js +2 -2
- package/components/PaginationDots/PaginationDot.js +11 -17
- package/components/PaginationDots/PaginationDots.js +4 -7
- package/components/PaginationDots/index.js +3 -3
- package/components/PaginationDots/usePaginationDots.js +10 -11
- package/components/Popup/Popup.js +52 -205
- package/components/Popup/index.js +1 -1
- package/components/PopupBase/PopupBase.js +35 -169
- package/components/PopupBase/PopupBaseContext.js +26 -86
- package/components/PopupBase/PopupBaseRoot.js +31 -169
- package/components/PopupBase/hooks.js +23 -97
- package/components/PopupBase/index.js +3 -3
- package/components/PopupBase/utils.js +32 -78
- package/components/Price/Price.js +15 -90
- package/components/Price/index.js +1 -1
- package/components/RadioGroup/RadioGroup.js +6 -127
- package/components/RadioGroup/index.js +1 -1
- package/components/SSRProvider/SSRProvider.js +4 -5
- package/components/SSRProvider/index.js +1 -1
- package/components/Skeleton/LineSkeleton.js +23 -95
- package/components/Skeleton/RectSkeleton.js +20 -93
- package/components/Skeleton/Skeleton.js +2 -2
- package/components/Skeleton/TextSkeleton.js +11 -55
- package/components/Skeleton/index.js +3 -3
- package/components/Slider/Double.js +52 -203
- package/components/Slider/Handle.js +28 -158
- package/components/Slider/Single.js +29 -177
- package/components/Slider/Slider.js +5 -7
- package/components/Slider/SliderBase.js +39 -48
- package/components/Slider/ThumbBase.js +19 -95
- package/components/Slider/index.js +3 -3
- package/components/Slider/utils.js +2 -2
- package/components/Spinner/Spinner.js +28 -100
- package/components/Spinner/SpinnerSvg.js +9 -78
- package/components/Spinner/index.js +1 -1
- package/components/Switch/Switch.js +49 -220
- package/components/Switch/index.js +1 -1
- package/components/Tabs/TabItem.js +33 -168
- package/components/Tabs/Tabs.js +32 -170
- package/components/Tabs/TabsContext.js +12 -42
- package/components/Tabs/createTabsController.js +33 -168
- package/components/Tabs/index.js +4 -4
- package/components/TextArea/TextArea.js +20 -30
- package/components/TextArea/index.js +1 -1
- package/components/TextField/index.js +3 -3
- package/components/Toast/Toast.js +15 -16
- package/components/Toast/ToastContext.js +4 -8
- package/components/Toast/ToastController.js +44 -101
- package/components/Toast/ToastProvider.js +37 -142
- package/components/Toast/index.js +3 -3
- package/components/Toast/useToast.js +6 -6
- package/components/Typography/Body.js +18 -18
- package/components/Typography/Button.js +13 -13
- package/components/Typography/Caption.js +8 -8
- package/components/Typography/Display.js +18 -18
- package/components/Typography/Footnote.js +13 -13
- package/components/Typography/Headline.js +43 -43
- package/components/Typography/Paragraph.js +24 -24
- package/components/Typography/Underline.js +8 -8
- package/es/__helpers/IconPlaceholder.js +5 -8
- package/es/collectPackageInfo.js +3 -3
- package/es/components/Badge/Badge.js +27 -100
- package/es/components/Basebox/Basebox.js +28 -37
- package/es/components/Button/Button.js +24 -63
- package/es/components/Button/Button.mixins.js +19 -73
- package/es/components/Button/Button.props.js +3 -3
- package/es/components/Button/createButton.js +12 -143
- package/es/components/Card/Card.js +29 -157
- package/es/components/Card/CardBody.js +2 -2
- package/es/components/Card/CardContent.js +12 -21
- package/es/components/Card/CardMedia.js +17 -88
- package/es/components/Card/CardPrice.js +13 -55
- package/es/components/Card/CardTypography.js +43 -52
- package/es/components/Carousel/Carousel.js +45 -63
- package/es/components/Carousel/CarouselItem.js +18 -90
- package/es/components/Carousel/hooks.js +58 -117
- package/es/components/Carousel/utils.js +58 -72
- package/es/components/Fade/Fade.js +5 -8
- package/es/components/Field/Field.js +44 -59
- package/es/components/Field/Field.statuses.js +4 -4
- package/es/components/Image/Image.js +31 -112
- package/es/components/Input/Input.js +4 -4
- package/es/components/Input/Input.mixins.js +6 -9
- package/es/components/ModalBase/ModalBase.js +16 -94
- package/es/components/ModalBase/ModalBaseContext.js +6 -9
- package/es/components/ModalBase/ModalOverlay.js +23 -106
- package/es/components/ModalBase/hooks.js +12 -40
- package/es/components/PaginationDots/PaginationDot.js +9 -15
- package/es/components/PaginationDots/PaginationDots.js +3 -6
- package/es/components/PaginationDots/usePaginationDots.js +9 -10
- package/es/components/Popup/Popup.js +48 -201
- package/es/components/PopupBase/PopupBase.js +27 -161
- package/es/components/PopupBase/PopupBaseContext.js +25 -85
- package/es/components/PopupBase/PopupBaseRoot.js +26 -164
- package/es/components/PopupBase/hooks.js +21 -95
- package/es/components/PopupBase/utils.js +31 -77
- package/es/components/Price/Price.js +12 -87
- package/es/components/RadioGroup/RadioGroup.js +5 -126
- package/es/components/SSRProvider/SSRProvider.js +3 -4
- package/es/components/Skeleton/LineSkeleton.js +18 -90
- package/es/components/Skeleton/RectSkeleton.js +16 -89
- package/es/components/Skeleton/Skeleton.js +2 -2
- package/es/components/Skeleton/TextSkeleton.js +7 -51
- package/es/components/Slider/Double.js +49 -200
- package/es/components/Slider/Handle.js +23 -153
- package/es/components/Slider/Single.js +26 -174
- package/es/components/Slider/Slider.js +2 -4
- package/es/components/Slider/SliderBase.js +36 -45
- package/es/components/Slider/ThumbBase.js +16 -92
- package/es/components/Slider/index.js +1 -1
- package/es/components/Slider/utils.js +2 -2
- package/es/components/Spinner/Spinner.js +23 -95
- package/es/components/Spinner/SpinnerSvg.js +8 -77
- package/es/components/Switch/Switch.js +45 -216
- package/es/components/Tabs/TabItem.js +28 -163
- package/es/components/Tabs/Tabs.js +28 -166
- package/es/components/Tabs/TabsContext.js +11 -41
- package/es/components/Tabs/createTabsController.js +28 -163
- package/es/components/TextArea/TextArea.js +18 -28
- package/es/components/Toast/Toast.js +10 -11
- package/es/components/Toast/ToastContext.js +3 -7
- package/es/components/Toast/ToastController.js +38 -95
- package/es/components/Toast/ToastProvider.js +34 -139
- package/es/components/Toast/useToast.js +4 -4
- package/es/components/Typography/Body.js +15 -15
- package/es/components/Typography/Button.js +10 -10
- package/es/components/Typography/Caption.js +5 -5
- package/es/components/Typography/Display.js +15 -15
- package/es/components/Typography/Footnote.js +10 -10
- package/es/components/Typography/Headline.js +40 -40
- package/es/components/Typography/Paragraph.js +21 -21
- package/es/components/Typography/Underline.js +5 -5
- package/es/hocs/withAutoFocus.js +8 -78
- package/es/hocs/withSkeleton.js +5 -10
- package/es/hooks/useDebouncedFunction.js +4 -36
- package/es/hooks/useFocusTrap.js +18 -21
- package/es/hooks/useForkRef.js +3 -3
- package/es/hooks/useIsomorphicLayoutEffect.js +1 -1
- package/es/hooks/useResizeObserver.js +8 -8
- package/es/hooks/useUniqId.js +6 -52
- package/es/mixins/addFocus.js +17 -22
- package/es/mixins/applyDisabled.js +6 -9
- package/es/mixins/applyEllipsis.js +2 -4
- package/es/mixins/applyMaxLines.js +3 -6
- package/es/mixins/applyNoSelect.js +2 -4
- package/es/mixins/applyOutline.js +2 -4
- package/es/mixins/applyRoundness.js +4 -7
- package/es/mixins/applyScrollSnap.js +4 -7
- package/es/mixins/applySkeletonGradient.js +6 -9
- package/es/mixins/applyView.js +2 -5
- package/es/mixins/blur.js +2 -5
- package/es/mixins/shadows.js +1 -1
- package/es/tokens/colors.js +48 -48
- package/es/tokens/typography.js +18 -18
- package/es/utils/__tests__/formatters.test.js +2 -2
- package/es/utils/animatedScrollTo.js +24 -34
- package/es/utils/canUseDOM.js +1 -1
- package/es/utils/extractTextFrom.js +3 -7
- package/es/utils/focusManager.js +40 -47
- package/es/utils/formatCurrency.js +4 -4
- package/es/utils/formatters.js +6 -14
- package/es/utils/react.js +4 -4
- package/es/utils/roundness.js +2 -4
- package/es/utils/scopeTab.js +5 -5
- package/es/utils/setRef.js +1 -1
- package/es/utils/tabbable.js +16 -25
- package/es/utils/toCssSize.js +1 -3
- package/es/utils/transformStyles.js +5 -60
- package/hocs/index.js +2 -2
- package/hocs/withAutoFocus.js +9 -79
- package/hocs/withSkeleton.js +8 -13
- package/hooks/index.js +6 -6
- package/hooks/useDebouncedFunction.js +5 -37
- package/hooks/useFocusTrap.js +22 -25
- package/hooks/useForkRef.js +5 -5
- package/hooks/useIsomorphicLayoutEffect.js +3 -3
- package/hooks/useResizeObserver.js +9 -9
- package/hooks/useUniqId.js +8 -54
- package/mixins/addFocus.js +19 -24
- package/mixins/applyDisabled.js +7 -10
- package/mixins/applyEllipsis.js +3 -5
- package/mixins/applyMaxLines.js +4 -7
- package/mixins/applyNoSelect.js +3 -5
- package/mixins/applyOutline.js +3 -5
- package/mixins/applyRoundness.js +5 -8
- package/mixins/applyScrollSnap.js +5 -8
- package/mixins/applySkeletonGradient.js +8 -11
- package/mixins/applyView.js +3 -6
- package/mixins/blur.js +2 -5
- package/mixins/index.js +11 -11
- package/mixins/shadows.js +1 -1
- package/package.json +13 -18
- package/tokens/colors.js +48 -48
- package/tokens/typography.js +18 -18
- package/utils/__tests__/formatters.test.js +3 -3
- package/utils/animatedScrollTo.js +24 -34
- package/utils/canUseDOM.js +1 -1
- package/utils/extractTextFrom.js +4 -8
- package/utils/focusManager.js +41 -48
- package/utils/formatCurrency.js +4 -4
- package/utils/formatters.js +6 -14
- package/utils/index.js +10 -10
- package/utils/react.js +7 -7
- package/utils/roundness.js +2 -4
- package/utils/scopeTab.js +6 -6
- package/utils/setRef.js +1 -1
- package/utils/tabbable.js +16 -25
- package/utils/toCssSize.js +1 -3
- package/utils/transformStyles.js +5 -60
|
@@ -8,90 +8,48 @@ Object.defineProperty(exports, "CardPrice", {
|
|
|
8
8
|
return CardPrice;
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
const _react = /*#__PURE__*/ _interop_require_default(require("react"));
|
|
12
|
+
const _styledcomponents = /*#__PURE__*/ _interop_require_default(require("styled-components"));
|
|
13
|
+
const _tokens = require("../../tokens");
|
|
14
|
+
const _Price = require("../Price");
|
|
15
|
+
const _Typography = require("../Typography");
|
|
16
16
|
function _interop_require_default(obj) {
|
|
17
17
|
return obj && obj.__esModule ? obj : {
|
|
18
18
|
default: obj
|
|
19
19
|
};
|
|
20
20
|
}
|
|
21
|
-
|
|
22
|
-
if (source == null) return {};
|
|
23
|
-
var target = {}, sourceKeys, key, i;
|
|
24
|
-
if (typeof Reflect !== "undefined" && Reflect.ownKeys) {
|
|
25
|
-
sourceKeys = Reflect.ownKeys(source);
|
|
26
|
-
for(i = 0; i < sourceKeys.length; i++){
|
|
27
|
-
key = sourceKeys[i];
|
|
28
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
29
|
-
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
30
|
-
target[key] = source[key];
|
|
31
|
-
}
|
|
32
|
-
return target;
|
|
33
|
-
}
|
|
34
|
-
target = _object_without_properties_loose(source, excluded);
|
|
35
|
-
if (Object.getOwnPropertySymbols) {
|
|
36
|
-
sourceKeys = Object.getOwnPropertySymbols(source);
|
|
37
|
-
for(i = 0; i < sourceKeys.length; i++){
|
|
38
|
-
key = sourceKeys[i];
|
|
39
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
40
|
-
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
41
|
-
target[key] = source[key];
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
return target;
|
|
45
|
-
}
|
|
46
|
-
function _object_without_properties_loose(source, excluded) {
|
|
47
|
-
if (source == null) return {};
|
|
48
|
-
var target = {}, sourceKeys = Object.getOwnPropertyNames(source), key, i;
|
|
49
|
-
for(i = 0; i < sourceKeys.length; i++){
|
|
50
|
-
key = sourceKeys[i];
|
|
51
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
52
|
-
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
53
|
-
target[key] = source[key];
|
|
54
|
-
}
|
|
55
|
-
return target;
|
|
56
|
-
}
|
|
57
|
-
var StyledRoot = (0, _styledcomponents.default)(_Typography.Body2).withConfig({
|
|
21
|
+
const StyledRoot = (0, _styledcomponents.default)(_Typography.Body2).withConfig({
|
|
58
22
|
displayName: "CardPrice__StyledRoot",
|
|
59
23
|
componentId: "sc-b9ac85b9-0"
|
|
60
24
|
})([
|
|
61
|
-
|
|
25
|
+
`display:flex;box-sizing:border-box;margin-top:0.75rem;`
|
|
62
26
|
]);
|
|
63
|
-
|
|
27
|
+
const StyledPrice = (0, _styledcomponents.default)(_Price.Price).withConfig({
|
|
64
28
|
displayName: "CardPrice__StyledPrice",
|
|
65
29
|
componentId: "sc-b9ac85b9-1"
|
|
66
30
|
})([
|
|
67
|
-
|
|
68
|
-
|
|
31
|
+
`height:2.5rem;color:`,
|
|
32
|
+
`;`
|
|
69
33
|
], _tokens.primary);
|
|
70
|
-
|
|
34
|
+
const StyledOldPrice = (0, _styledcomponents.default)(_Price.Price).withConfig({
|
|
71
35
|
displayName: "CardPrice__StyledOldPrice",
|
|
72
36
|
componentId: "sc-b9ac85b9-2"
|
|
73
37
|
})([
|
|
74
|
-
|
|
75
|
-
|
|
38
|
+
`height:2.5rem;margin-left:0.5rem;color:`,
|
|
39
|
+
`;`
|
|
76
40
|
], _tokens.tertiary);
|
|
77
|
-
|
|
41
|
+
const StyledCount = (0, _styledcomponents.default)(_Typography.Body2).withConfig({
|
|
78
42
|
displayName: "CardPrice__StyledCount",
|
|
79
43
|
componentId: "sc-b9ac85b9-3"
|
|
80
44
|
})([
|
|
81
|
-
|
|
82
|
-
|
|
45
|
+
`box-sizing:border-box;height:2.5rem;margin-left:0.5rem;color:`,
|
|
46
|
+
`;`
|
|
83
47
|
], _tokens.buttonAccent);
|
|
84
|
-
|
|
85
|
-
var count = _0.count, currency = _0.currency, oldPrice = _0.oldPrice, price = _0.price, rest = _object_without_properties(_0, [
|
|
86
|
-
"count",
|
|
87
|
-
"currency",
|
|
88
|
-
"oldPrice",
|
|
89
|
-
"price"
|
|
90
|
-
]);
|
|
48
|
+
const CardPrice = ({ count, currency, oldPrice, price, ...rest })=>{
|
|
91
49
|
return /*#__PURE__*/ _react.default.createElement(StyledRoot, rest, /*#__PURE__*/ _react.default.createElement(StyledPrice, {
|
|
92
50
|
currency: currency
|
|
93
51
|
}, price), oldPrice && /*#__PURE__*/ _react.default.createElement(StyledOldPrice, {
|
|
94
52
|
currency: currency,
|
|
95
53
|
stroke: true
|
|
96
|
-
}, oldPrice), count ? /*#__PURE__*/ _react.default.createElement(StyledCount, null, "
|
|
54
|
+
}, oldPrice), count ? /*#__PURE__*/ _react.default.createElement(StyledCount, null, "×", count) : '');
|
|
97
55
|
};
|
|
@@ -38,9 +38,9 @@ _export(exports, {
|
|
|
38
38
|
return CardParagraph2;
|
|
39
39
|
}
|
|
40
40
|
});
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
const _styledcomponents = /*#__PURE__*/ _interop_require_wildcard(require("styled-components"));
|
|
42
|
+
const _tokens = require("../../tokens");
|
|
43
|
+
const _Typography = require("../Typography");
|
|
44
44
|
function _getRequireWildcardCache(nodeInterop) {
|
|
45
45
|
if (typeof WeakMap !== "function") return null;
|
|
46
46
|
var cacheBabelInterop = new WeakMap();
|
|
@@ -82,93 +82,84 @@ function _interop_require_wildcard(obj, nodeInterop) {
|
|
|
82
82
|
}
|
|
83
83
|
return newObj;
|
|
84
84
|
}
|
|
85
|
-
|
|
85
|
+
const views = {
|
|
86
86
|
primary: _tokens.primary,
|
|
87
87
|
secondary: _tokens.secondary,
|
|
88
88
|
tertiary: _tokens.tertiary
|
|
89
89
|
};
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
"display:-webkit-box;overflow:hidden;box-sizing:border-box;white-space:normal;-webkit-box-orient:vertical;-webkit-line-clamp:",
|
|
94
|
-
";"
|
|
90
|
+
const linesMixin = ({ lines = 2 })=>(0, _styledcomponents.css)([
|
|
91
|
+
`display:-webkit-box;overflow:hidden;box-sizing:border-box;white-space:normal;-webkit-box-orient:vertical;-webkit-line-clamp:`,
|
|
92
|
+
`;`
|
|
95
93
|
], lines);
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
";"
|
|
103
|
-
], function(param) {
|
|
104
|
-
var theme = param.theme;
|
|
105
|
-
return theme.lowPerformance ? 'unset' : 'color 0.1s ease-in-out';
|
|
106
|
-
}, views[view]);
|
|
107
|
-
};
|
|
108
|
-
var CardHeadline1 = (0, _styledcomponents.default)(_Typography.Headline1).withConfig({
|
|
94
|
+
const viewMixin = ({ view = 'primary' })=>(0, _styledcomponents.css)([
|
|
95
|
+
`transition:`,
|
|
96
|
+
`;color:`,
|
|
97
|
+
`;`
|
|
98
|
+
], ({ theme })=>theme.lowPerformance ? 'unset' : 'color 0.1s ease-in-out', views[view]);
|
|
99
|
+
const CardHeadline1 = (0, _styledcomponents.default)(_Typography.Headline1).withConfig({
|
|
109
100
|
displayName: "CardTypography__CardHeadline1",
|
|
110
101
|
componentId: "sc-ebd1f68e-0"
|
|
111
102
|
})([
|
|
112
|
-
|
|
113
|
-
|
|
103
|
+
``,
|
|
104
|
+
`;`
|
|
114
105
|
], viewMixin);
|
|
115
|
-
|
|
106
|
+
const CardHeadline2 = (0, _styledcomponents.default)(_Typography.Headline2).withConfig({
|
|
116
107
|
displayName: "CardTypography__CardHeadline2",
|
|
117
108
|
componentId: "sc-ebd1f68e-1"
|
|
118
109
|
})([
|
|
119
|
-
|
|
120
|
-
|
|
110
|
+
``,
|
|
111
|
+
`;`
|
|
121
112
|
], viewMixin);
|
|
122
|
-
|
|
113
|
+
const CardHeadline3 = (0, _styledcomponents.default)(_Typography.Headline3).withConfig({
|
|
123
114
|
displayName: "CardTypography__CardHeadline3",
|
|
124
115
|
componentId: "sc-ebd1f68e-2"
|
|
125
116
|
})([
|
|
126
|
-
|
|
127
|
-
|
|
117
|
+
``,
|
|
118
|
+
`;`
|
|
128
119
|
], viewMixin);
|
|
129
|
-
|
|
120
|
+
const CardFootnote1 = (0, _styledcomponents.default)(_Typography.Footnote1).withConfig({
|
|
130
121
|
displayName: "CardTypography__CardFootnote1",
|
|
131
122
|
componentId: "sc-ebd1f68e-3"
|
|
132
123
|
})([
|
|
133
|
-
|
|
134
|
-
|
|
124
|
+
``,
|
|
125
|
+
`;`
|
|
135
126
|
], viewMixin);
|
|
136
|
-
|
|
127
|
+
const CardFootnote2 = (0, _styledcomponents.default)(_Typography.Footnote2).withConfig({
|
|
137
128
|
displayName: "CardTypography__CardFootnote2",
|
|
138
129
|
componentId: "sc-ebd1f68e-4"
|
|
139
130
|
})([
|
|
140
|
-
|
|
141
|
-
|
|
131
|
+
``,
|
|
132
|
+
`;`
|
|
142
133
|
], viewMixin);
|
|
143
|
-
|
|
134
|
+
const CardBody1 = (0, _styledcomponents.default)(_Typography.Body1).withConfig({
|
|
144
135
|
displayName: "CardTypography__CardBody1",
|
|
145
136
|
componentId: "sc-ebd1f68e-5"
|
|
146
137
|
})([
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
138
|
+
``,
|
|
139
|
+
`;`,
|
|
140
|
+
`;`
|
|
150
141
|
], linesMixin, viewMixin);
|
|
151
|
-
|
|
142
|
+
const CardBody2 = (0, _styledcomponents.default)(_Typography.Body2).withConfig({
|
|
152
143
|
displayName: "CardTypography__CardBody2",
|
|
153
144
|
componentId: "sc-ebd1f68e-6"
|
|
154
145
|
})([
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
146
|
+
``,
|
|
147
|
+
`;`,
|
|
148
|
+
`;`
|
|
158
149
|
], linesMixin, viewMixin);
|
|
159
|
-
|
|
150
|
+
const CardParagraph1 = (0, _styledcomponents.default)(_Typography.ParagraphText1).withConfig({
|
|
160
151
|
displayName: "CardTypography__CardParagraph1",
|
|
161
152
|
componentId: "sc-ebd1f68e-7"
|
|
162
153
|
})([
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
154
|
+
``,
|
|
155
|
+
`;`,
|
|
156
|
+
`;`
|
|
166
157
|
], linesMixin, viewMixin);
|
|
167
|
-
|
|
158
|
+
const CardParagraph2 = (0, _styledcomponents.default)(_Typography.ParagraphText2).withConfig({
|
|
168
159
|
displayName: "CardTypography__CardParagraph2",
|
|
169
160
|
componentId: "sc-ebd1f68e-8"
|
|
170
161
|
})([
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
162
|
+
``,
|
|
163
|
+
`;`,
|
|
164
|
+
`;`
|
|
174
165
|
], linesMixin, viewMixin);
|
package/components/Card/index.js
CHANGED
|
@@ -28,11 +28,11 @@ _export(exports, {
|
|
|
28
28
|
return _Card.StyledCard;
|
|
29
29
|
}
|
|
30
30
|
});
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
31
|
+
const _Card = require("./Card");
|
|
32
|
+
const _CardBody = require("./CardBody");
|
|
33
|
+
const _CardContent = require("./CardContent");
|
|
34
|
+
const _CardMedia = require("./CardMedia");
|
|
35
|
+
const _CardPrice = require("./CardPrice");
|
|
36
36
|
_export_star(require("./CardTypography"), exports);
|
|
37
37
|
function _export_star(from, to) {
|
|
38
38
|
Object.keys(from).forEach(function(k) {
|
|
@@ -19,7 +19,7 @@ _export(exports, {
|
|
|
19
19
|
return CarouselTrack;
|
|
20
20
|
}
|
|
21
21
|
});
|
|
22
|
-
|
|
22
|
+
const _styledcomponents = /*#__PURE__*/ _interop_require_wildcard(require("styled-components"));
|
|
23
23
|
function _getRequireWildcardCache(nodeInterop) {
|
|
24
24
|
if (typeof WeakMap !== "function") return null;
|
|
25
25
|
var cacheBabelInterop = new WeakMap();
|
|
@@ -61,85 +61,67 @@ function _interop_require_wildcard(obj, nodeInterop) {
|
|
|
61
61
|
}
|
|
62
62
|
return newObj;
|
|
63
63
|
}
|
|
64
|
-
|
|
64
|
+
const CarouselGridWrapper = _styledcomponents.default.div.withConfig({
|
|
65
65
|
displayName: "Carousel__CarouselGridWrapper",
|
|
66
66
|
componentId: "sc-2bb1b43b-0"
|
|
67
67
|
})([
|
|
68
|
-
|
|
68
|
+
`overflow:hidden;margin-left:calc(var(--plasma-grid-margin) * -1);margin-right:calc(var(--plasma-grid-margin) * -1);`
|
|
69
69
|
]);
|
|
70
|
-
|
|
70
|
+
const Carousel = _styledcomponents.default.div.withConfig({
|
|
71
71
|
displayName: "Carousel",
|
|
72
72
|
componentId: "sc-2bb1b43b-1"
|
|
73
73
|
})([
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
],
|
|
79
|
-
|
|
80
|
-
return axis === 'x' ? (0, _styledcomponents.css)([
|
|
81
|
-
"overflow-x:auto;overflow-y:hidden;"
|
|
74
|
+
`position:relative;margin:0;padding:0;list-style:none;::-webkit-scrollbar{display:none;}`,
|
|
75
|
+
` `,
|
|
76
|
+
` `,
|
|
77
|
+
` &{scroll-padding:0 var(--plasma-grid-margin);padding-left:var(--plasma-grid-margin);}`
|
|
78
|
+
], ({ axis })=>axis === 'x' ? (0, _styledcomponents.css)([
|
|
79
|
+
`overflow-x:auto;overflow-y:hidden;`
|
|
82
80
|
]) : (0, _styledcomponents.css)([
|
|
83
|
-
|
|
84
|
-
])
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
";"
|
|
92
|
-
], function(param) {
|
|
93
|
-
var theme = param.theme;
|
|
94
|
-
return theme.lowPerformance ? 'unset' : 'smooth';
|
|
95
|
-
}, axis, scrollSnapType);
|
|
96
|
-
}, CarouselGridWrapper);
|
|
97
|
-
var CarouselTrack = _styledcomponents.default.div.withConfig({
|
|
81
|
+
`height:100%;overflow-x:hidden;overflow-y:auto;`
|
|
82
|
+
]), ({ scrollSnapType, axis })=>scrollSnapType && scrollSnapType !== 'none' && (0, _styledcomponents.css)([
|
|
83
|
+
`scroll-behavior:`,
|
|
84
|
+
`;scroll-snap-type:`,
|
|
85
|
+
` `,
|
|
86
|
+
`;`
|
|
87
|
+
], ({ theme })=>theme.lowPerformance ? 'unset' : 'smooth', axis, scrollSnapType), CarouselGridWrapper);
|
|
88
|
+
const CarouselTrack = _styledcomponents.default.div.withConfig({
|
|
98
89
|
displayName: "Carousel__CarouselTrack",
|
|
99
90
|
componentId: "sc-2bb1b43b-2"
|
|
100
91
|
})([
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
],
|
|
106
|
-
var virtualSize = param.virtualSize, axis = param.axis;
|
|
107
|
-
return(// для виртуализированной карусели (useVirtual)
|
|
92
|
+
``,
|
|
93
|
+
` `,
|
|
94
|
+
` `,
|
|
95
|
+
``
|
|
96
|
+
], ({ virtualSize, axis })=>// для виртуализированной карусели (useVirtual)
|
|
108
97
|
virtualSize && (0, _styledcomponents.css)([
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
], axis === 'x' ? 'width' : 'height', virtualSize))
|
|
113
|
-
}, function(param) {
|
|
114
|
-
var liteMode = param.liteMode;
|
|
115
|
-
return(// для поддержки CarouselLite
|
|
98
|
+
`position:absolute;`,
|
|
99
|
+
`:`,
|
|
100
|
+
`px;`
|
|
101
|
+
], axis === 'x' ? 'width' : 'height', virtualSize), ({ liteMode })=>// для поддержки CarouselLite
|
|
116
102
|
liteMode && (0, _styledcomponents.css)([
|
|
117
|
-
|
|
118
|
-
]))
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
"display:inline-flex;flex-direction:row;",
|
|
123
|
-
" ",
|
|
124
|
-
""
|
|
103
|
+
`transition-property:transform;transition-duration:0.5s;transform:translate(0px,0px);`
|
|
104
|
+
]), ({ axis, paddingStart, paddingEnd })=>axis === 'x' ? (0, _styledcomponents.css)([
|
|
105
|
+
`display:inline-flex;flex-direction:row;`,
|
|
106
|
+
` `,
|
|
107
|
+
``
|
|
125
108
|
], paddingStart && (0, _styledcomponents.css)([
|
|
126
|
-
|
|
127
|
-
|
|
109
|
+
`padding-left:`,
|
|
110
|
+
`;`
|
|
128
111
|
], paddingStart), paddingEnd ? (0, _styledcomponents.css)([
|
|
129
|
-
|
|
130
|
-
|
|
112
|
+
`padding-right:`,
|
|
113
|
+
`;`
|
|
131
114
|
], paddingEnd) : (0, _styledcomponents.css)([
|
|
132
|
-
|
|
133
|
-
|
|
115
|
+
``,
|
|
116
|
+
` &{padding-right:var(--plasma-grid-margin);}`
|
|
134
117
|
], CarouselGridWrapper)) : (0, _styledcomponents.css)([
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
118
|
+
`display:flex;flex-direction:column;width:100%;`,
|
|
119
|
+
` `,
|
|
120
|
+
``
|
|
138
121
|
], paddingStart && (0, _styledcomponents.css)([
|
|
139
|
-
|
|
140
|
-
|
|
122
|
+
`padding-top:`,
|
|
123
|
+
`;`
|
|
141
124
|
], paddingStart), paddingEnd && (0, _styledcomponents.css)([
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
], paddingEnd));
|
|
145
|
-
});
|
|
125
|
+
`padding-bottom:`,
|
|
126
|
+
`;`
|
|
127
|
+
], paddingEnd)));
|
|
@@ -16,116 +16,44 @@ _export(exports, {
|
|
|
16
16
|
return CarouselItemVirtual;
|
|
17
17
|
}
|
|
18
18
|
});
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
function _define_property(obj, key, value) {
|
|
23
|
-
if (key in obj) {
|
|
24
|
-
Object.defineProperty(obj, key, {
|
|
25
|
-
value: value,
|
|
26
|
-
enumerable: true,
|
|
27
|
-
configurable: true,
|
|
28
|
-
writable: true
|
|
29
|
-
});
|
|
30
|
-
} else {
|
|
31
|
-
obj[key] = value;
|
|
32
|
-
}
|
|
33
|
-
return obj;
|
|
34
|
-
}
|
|
19
|
+
const _react = /*#__PURE__*/ _interop_require_default(require("react"));
|
|
20
|
+
const _styledcomponents = /*#__PURE__*/ _interop_require_default(require("styled-components"));
|
|
21
|
+
const _mixins = require("../../mixins");
|
|
35
22
|
function _interop_require_default(obj) {
|
|
36
23
|
return obj && obj.__esModule ? obj : {
|
|
37
24
|
default: obj
|
|
38
25
|
};
|
|
39
26
|
}
|
|
40
|
-
|
|
41
|
-
for(var i = 1; i < arguments.length; i++){
|
|
42
|
-
var source = arguments[i] != null ? arguments[i] : {};
|
|
43
|
-
var ownKeys = Object.keys(source);
|
|
44
|
-
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
45
|
-
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
46
|
-
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
47
|
-
}));
|
|
48
|
-
}
|
|
49
|
-
ownKeys.forEach(function(key) {
|
|
50
|
-
_define_property(target, key, source[key]);
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
return target;
|
|
54
|
-
}
|
|
55
|
-
function _object_without_properties(source, excluded) {
|
|
56
|
-
if (source == null) return {};
|
|
57
|
-
var target = {}, sourceKeys, key, i;
|
|
58
|
-
if (typeof Reflect !== "undefined" && Reflect.ownKeys) {
|
|
59
|
-
sourceKeys = Reflect.ownKeys(source);
|
|
60
|
-
for(i = 0; i < sourceKeys.length; i++){
|
|
61
|
-
key = sourceKeys[i];
|
|
62
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
63
|
-
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
64
|
-
target[key] = source[key];
|
|
65
|
-
}
|
|
66
|
-
return target;
|
|
67
|
-
}
|
|
68
|
-
target = _object_without_properties_loose(source, excluded);
|
|
69
|
-
if (Object.getOwnPropertySymbols) {
|
|
70
|
-
sourceKeys = Object.getOwnPropertySymbols(source);
|
|
71
|
-
for(i = 0; i < sourceKeys.length; i++){
|
|
72
|
-
key = sourceKeys[i];
|
|
73
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
74
|
-
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
75
|
-
target[key] = source[key];
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
return target;
|
|
79
|
-
}
|
|
80
|
-
function _object_without_properties_loose(source, excluded) {
|
|
81
|
-
if (source == null) return {};
|
|
82
|
-
var target = {}, sourceKeys = Object.getOwnPropertyNames(source), key, i;
|
|
83
|
-
for(i = 0; i < sourceKeys.length; i++){
|
|
84
|
-
key = sourceKeys[i];
|
|
85
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
86
|
-
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
87
|
-
target[key] = source[key];
|
|
88
|
-
}
|
|
89
|
-
return target;
|
|
90
|
-
}
|
|
91
|
-
var StyledItem = _styledcomponents.default.div.withConfig({
|
|
27
|
+
const StyledItem = _styledcomponents.default.div.withConfig({
|
|
92
28
|
displayName: "CarouselItem__StyledItem",
|
|
93
29
|
componentId: "sc-36578ca1-0"
|
|
94
30
|
})([
|
|
95
|
-
|
|
96
|
-
|
|
31
|
+
``,
|
|
32
|
+
``
|
|
97
33
|
], _mixins.applyScrollSnap);
|
|
98
|
-
|
|
34
|
+
const StyledItemVirtual = _styledcomponents.default.div.withConfig({
|
|
99
35
|
displayName: "CarouselItem__StyledItemVirtual",
|
|
100
36
|
componentId: "sc-36578ca1-1"
|
|
101
37
|
})([
|
|
102
|
-
|
|
38
|
+
`position:absolute;`
|
|
103
39
|
]);
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
"scrollSnapAlign",
|
|
107
|
-
"scrollSnapStop",
|
|
108
|
-
"children"
|
|
109
|
-
]);
|
|
110
|
-
return /*#__PURE__*/ _react.default.createElement(StyledItem, _object_spread({
|
|
40
|
+
const CarouselItem = ({ scrollSnapAlign = 'center', scrollSnapStop = 'always', children, ...rest })=>{
|
|
41
|
+
return /*#__PURE__*/ _react.default.createElement(StyledItem, {
|
|
111
42
|
scrollSnapAlign: scrollSnapAlign,
|
|
112
43
|
scrollSnapStop: scrollSnapStop,
|
|
113
44
|
role: "group",
|
|
114
|
-
"aria-roledescription": "slide"
|
|
115
|
-
|
|
45
|
+
"aria-roledescription": "slide",
|
|
46
|
+
...rest
|
|
47
|
+
}, children);
|
|
116
48
|
};
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
"left",
|
|
120
|
-
"top",
|
|
121
|
-
"children",
|
|
122
|
-
"style"
|
|
123
|
-
]);
|
|
124
|
-
return /*#__PURE__*/ _react.default.createElement(StyledItemVirtual, _object_spread({
|
|
49
|
+
const CarouselItemVirtual = ({ left, top, children, style, ...rest })=>{
|
|
50
|
+
return /*#__PURE__*/ _react.default.createElement(StyledItemVirtual, {
|
|
125
51
|
role: "group",
|
|
126
52
|
"aria-roledescription": "slide",
|
|
127
|
-
style:
|
|
128
|
-
transform:
|
|
129
|
-
|
|
130
|
-
|
|
53
|
+
style: {
|
|
54
|
+
transform: `translate(${left ?? 0}px, ${top ?? 0}px)`,
|
|
55
|
+
...style
|
|
56
|
+
},
|
|
57
|
+
...rest
|
|
58
|
+
}, children);
|
|
131
59
|
};
|