@salutejs/plasma-core 1.226.1-next-sbcom.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
|
@@ -19,38 +19,38 @@ _export(exports, {
|
|
|
19
19
|
return Display3;
|
|
20
20
|
}
|
|
21
21
|
});
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
const _styledcomponents = /*#__PURE__*/ _interop_require_default(require("styled-components"));
|
|
23
|
+
const _tokens = require("../../tokens");
|
|
24
|
+
const _mixins = require("../../mixins");
|
|
25
25
|
function _interop_require_default(obj) {
|
|
26
26
|
return obj && obj.__esModule ? obj : {
|
|
27
27
|
default: obj
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
|
-
|
|
30
|
+
const Display1 = _styledcomponents.default.div.withConfig({
|
|
31
31
|
displayName: "Display__Display1",
|
|
32
32
|
componentId: "sc-f913b448-0"
|
|
33
33
|
})([
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
34
|
+
``,
|
|
35
|
+
` `,
|
|
36
|
+
` `,
|
|
37
|
+
``
|
|
38
38
|
], _mixins.applyHyphens, _mixins.applySpacing, _tokens.display1);
|
|
39
|
-
|
|
39
|
+
const Display2 = _styledcomponents.default.div.withConfig({
|
|
40
40
|
displayName: "Display__Display2",
|
|
41
41
|
componentId: "sc-f913b448-1"
|
|
42
42
|
})([
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
43
|
+
``,
|
|
44
|
+
` `,
|
|
45
|
+
` `,
|
|
46
|
+
``
|
|
47
47
|
], _mixins.applyHyphens, _mixins.applySpacing, _tokens.display2);
|
|
48
|
-
|
|
48
|
+
const Display3 = _styledcomponents.default.div.withConfig({
|
|
49
49
|
displayName: "Display__Display3",
|
|
50
50
|
componentId: "sc-f913b448-2"
|
|
51
51
|
})([
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
52
|
+
``,
|
|
53
|
+
` `,
|
|
54
|
+
` `,
|
|
55
|
+
``
|
|
56
56
|
], _mixins.applyHyphens, _mixins.applySpacing, _tokens.display3);
|
|
@@ -16,29 +16,29 @@ _export(exports, {
|
|
|
16
16
|
return Footnote2;
|
|
17
17
|
}
|
|
18
18
|
});
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
const _styledcomponents = /*#__PURE__*/ _interop_require_default(require("styled-components"));
|
|
20
|
+
const _tokens = require("../../tokens");
|
|
21
|
+
const _mixins = require("../../mixins");
|
|
22
22
|
function _interop_require_default(obj) {
|
|
23
23
|
return obj && obj.__esModule ? obj : {
|
|
24
24
|
default: obj
|
|
25
25
|
};
|
|
26
26
|
}
|
|
27
|
-
|
|
27
|
+
const Footnote1 = _styledcomponents.default.div.withConfig({
|
|
28
28
|
displayName: "Footnote__Footnote1",
|
|
29
29
|
componentId: "sc-86810250-0"
|
|
30
30
|
})([
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
31
|
+
``,
|
|
32
|
+
` `,
|
|
33
|
+
` `,
|
|
34
|
+
``
|
|
35
35
|
], _mixins.applyHyphens, _mixins.applySpacing, _tokens.footnote1);
|
|
36
|
-
|
|
36
|
+
const Footnote2 = _styledcomponents.default.div.withConfig({
|
|
37
37
|
displayName: "Footnote__Footnote2",
|
|
38
38
|
componentId: "sc-86810250-1"
|
|
39
39
|
})([
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
40
|
+
``,
|
|
41
|
+
` `,
|
|
42
|
+
` `,
|
|
43
|
+
``
|
|
44
44
|
], _mixins.applyHyphens, _mixins.applySpacing, _tokens.footnote2);
|
|
@@ -34,83 +34,83 @@ _export(exports, {
|
|
|
34
34
|
return Headline4;
|
|
35
35
|
}
|
|
36
36
|
});
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
37
|
+
const _styledcomponents = /*#__PURE__*/ _interop_require_default(require("styled-components"));
|
|
38
|
+
const _tokens = require("../../tokens");
|
|
39
|
+
const _mixins = require("../../mixins");
|
|
40
40
|
function _interop_require_default(obj) {
|
|
41
41
|
return obj && obj.__esModule ? obj : {
|
|
42
42
|
default: obj
|
|
43
43
|
};
|
|
44
44
|
}
|
|
45
|
-
|
|
45
|
+
const Headline1 = _styledcomponents.default.div.withConfig({
|
|
46
46
|
displayName: "Headline__Headline1",
|
|
47
47
|
componentId: "sc-ae2aff6b-0"
|
|
48
48
|
})([
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
49
|
+
``,
|
|
50
|
+
` `,
|
|
51
|
+
` `,
|
|
52
|
+
``
|
|
53
53
|
], _mixins.applyHyphens, _mixins.applySpacing, _tokens.headline1);
|
|
54
|
-
|
|
54
|
+
const Headline2 = _styledcomponents.default.div.withConfig({
|
|
55
55
|
displayName: "Headline__Headline2",
|
|
56
56
|
componentId: "sc-ae2aff6b-1"
|
|
57
57
|
})([
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
58
|
+
``,
|
|
59
|
+
` `,
|
|
60
|
+
` `,
|
|
61
|
+
``
|
|
62
62
|
], _mixins.applyHyphens, _mixins.applySpacing, _tokens.headline2);
|
|
63
|
-
|
|
63
|
+
const Headline3 = _styledcomponents.default.div.withConfig({
|
|
64
64
|
displayName: "Headline__Headline3",
|
|
65
65
|
componentId: "sc-ae2aff6b-2"
|
|
66
66
|
})([
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
67
|
+
``,
|
|
68
|
+
` `,
|
|
69
|
+
` `,
|
|
70
|
+
``
|
|
71
71
|
], _mixins.applyHyphens, _mixins.applySpacing, _tokens.headline3);
|
|
72
|
-
|
|
72
|
+
const Headline4 = _styledcomponents.default.div.withConfig({
|
|
73
73
|
displayName: "Headline__Headline4",
|
|
74
74
|
componentId: "sc-ae2aff6b-3"
|
|
75
75
|
})([
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
76
|
+
``,
|
|
77
|
+
` `,
|
|
78
|
+
` `,
|
|
79
|
+
``
|
|
80
80
|
], _mixins.applyHyphens, _mixins.applySpacing, _tokens.headline4);
|
|
81
|
-
|
|
81
|
+
const H1 = _styledcomponents.default.h1.withConfig({
|
|
82
82
|
displayName: "Headline__H1",
|
|
83
83
|
componentId: "sc-ae2aff6b-4"
|
|
84
84
|
})([
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
85
|
+
`margin:0;`,
|
|
86
|
+
` `,
|
|
87
|
+
` `,
|
|
88
|
+
``
|
|
89
89
|
], _mixins.applyHyphens, _mixins.applySpacing, _tokens.headline1);
|
|
90
|
-
|
|
90
|
+
const H2 = _styledcomponents.default.h2.withConfig({
|
|
91
91
|
displayName: "Headline__H2",
|
|
92
92
|
componentId: "sc-ae2aff6b-5"
|
|
93
93
|
})([
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
94
|
+
`margin:0;`,
|
|
95
|
+
` `,
|
|
96
|
+
` `,
|
|
97
|
+
``
|
|
98
98
|
], _mixins.applyHyphens, _mixins.applySpacing, _tokens.headline2);
|
|
99
|
-
|
|
99
|
+
const H3 = _styledcomponents.default.h3.withConfig({
|
|
100
100
|
displayName: "Headline__H3",
|
|
101
101
|
componentId: "sc-ae2aff6b-6"
|
|
102
102
|
})([
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
103
|
+
`margin:0;`,
|
|
104
|
+
` `,
|
|
105
|
+
` `,
|
|
106
|
+
``
|
|
107
107
|
], _mixins.applyHyphens, _mixins.applySpacing, _tokens.headline3);
|
|
108
|
-
|
|
108
|
+
const H4 = _styledcomponents.default.h4.withConfig({
|
|
109
109
|
displayName: "Headline__H4",
|
|
110
110
|
componentId: "sc-ae2aff6b-7"
|
|
111
111
|
})([
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
112
|
+
`margin:0;`,
|
|
113
|
+
` `,
|
|
114
|
+
` `,
|
|
115
|
+
``
|
|
116
116
|
], _mixins.applyHyphens, _mixins.applySpacing, _tokens.headline4);
|
|
@@ -25,48 +25,48 @@ _export(exports, {
|
|
|
25
25
|
return ParagraphText2;
|
|
26
26
|
}
|
|
27
27
|
});
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
const _styledcomponents = /*#__PURE__*/ _interop_require_default(require("styled-components"));
|
|
29
|
+
const _tokens = require("../../tokens");
|
|
30
|
+
const _mixins = require("../../mixins");
|
|
31
31
|
function _interop_require_default(obj) {
|
|
32
32
|
return obj && obj.__esModule ? obj : {
|
|
33
33
|
default: obj
|
|
34
34
|
};
|
|
35
35
|
}
|
|
36
|
-
|
|
36
|
+
const ParagraphText1 = _styledcomponents.default.div.withConfig({
|
|
37
37
|
displayName: "Paragraph__ParagraphText1",
|
|
38
38
|
componentId: "sc-96b4c682-0"
|
|
39
39
|
})([
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
40
|
+
``,
|
|
41
|
+
` `,
|
|
42
|
+
` `,
|
|
43
|
+
``
|
|
44
44
|
], _mixins.applyHyphens, _mixins.applySpacing, _tokens.paragraph1);
|
|
45
|
-
|
|
45
|
+
const ParagraphText2 = _styledcomponents.default.div.withConfig({
|
|
46
46
|
displayName: "Paragraph__ParagraphText2",
|
|
47
47
|
componentId: "sc-96b4c682-1"
|
|
48
48
|
})([
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
49
|
+
``,
|
|
50
|
+
` `,
|
|
51
|
+
` `,
|
|
52
|
+
``
|
|
53
53
|
], _mixins.applyHyphens, _mixins.applySpacing, _tokens.paragraph2);
|
|
54
|
-
|
|
54
|
+
const P1 = _styledcomponents.default.p.withConfig({
|
|
55
55
|
displayName: "Paragraph__P1",
|
|
56
56
|
componentId: "sc-96b4c682-2"
|
|
57
57
|
})([
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
58
|
+
``,
|
|
59
|
+
` `,
|
|
60
|
+
` `,
|
|
61
|
+
` margin:0;`
|
|
62
62
|
], _mixins.applyHyphens, _mixins.applySpacing, _tokens.paragraph1);
|
|
63
|
-
|
|
64
|
-
|
|
63
|
+
const P = P1;
|
|
64
|
+
const P2 = _styledcomponents.default.p.withConfig({
|
|
65
65
|
displayName: "Paragraph__P2",
|
|
66
66
|
componentId: "sc-96b4c682-3"
|
|
67
67
|
})([
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
68
|
+
``,
|
|
69
|
+
` `,
|
|
70
|
+
` `,
|
|
71
|
+
` margin:0;`
|
|
72
72
|
], _mixins.applyHyphens, _mixins.applySpacing, _tokens.paragraph2);
|
|
@@ -8,20 +8,20 @@ Object.defineProperty(exports, "Underline", {
|
|
|
8
8
|
return Underline;
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
const _styledcomponents = /*#__PURE__*/ _interop_require_default(require("styled-components"));
|
|
12
|
+
const _tokens = require("../../tokens");
|
|
13
|
+
const _mixins = require("../../mixins");
|
|
14
14
|
function _interop_require_default(obj) {
|
|
15
15
|
return obj && obj.__esModule ? obj : {
|
|
16
16
|
default: obj
|
|
17
17
|
};
|
|
18
18
|
}
|
|
19
|
-
|
|
19
|
+
const Underline = _styledcomponents.default.div.withConfig({
|
|
20
20
|
displayName: "Underline",
|
|
21
21
|
componentId: "sc-7613e3f0-0"
|
|
22
22
|
})([
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
``,
|
|
24
|
+
` `,
|
|
25
|
+
` `,
|
|
26
|
+
` text-transform:uppercase;`
|
|
27
27
|
], _mixins.applyHyphens, _mixins.applySpacing, _tokens.underline);
|
|
@@ -1,18 +1,15 @@
|
|
|
1
1
|
import styled from 'styled-components';
|
|
2
|
-
|
|
2
|
+
const sizes = {
|
|
3
3
|
xs: 'width: 1rem;height: 1rem;',
|
|
4
4
|
s: 'width: 1.5rem;height: 1.5rem;',
|
|
5
5
|
m: 'width: 2.25rem;height: 2.25rem;',
|
|
6
6
|
l: 'width: 3rem;height: 3rem;',
|
|
7
7
|
xl: 'width: 3.5rem;height: 3.5rem;'
|
|
8
8
|
};
|
|
9
|
-
export
|
|
9
|
+
export const IconPlaceholder = styled.div.withConfig({
|
|
10
10
|
displayName: "IconPlaceholder",
|
|
11
11
|
componentId: "sc-c34b6bd1-0"
|
|
12
12
|
})([
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
],
|
|
16
|
-
var size = param.size;
|
|
17
|
-
return sizes[size || 's'];
|
|
18
|
-
});
|
|
13
|
+
``,
|
|
14
|
+
`;border-radius:50%;background:rgba(0,0,0,0.32);`
|
|
15
|
+
], ({ size })=>sizes[size || 's']);
|
package/es/collectPackageInfo.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/ban-ts-comment, no-underscore-dangle */ // @ts-ignore
|
|
2
2
|
import _package from '@pkg';
|
|
3
|
-
export
|
|
3
|
+
export const collectPackageInfo = (entityName)=>{
|
|
4
4
|
if (typeof window === 'undefined') {
|
|
5
5
|
return;
|
|
6
6
|
}
|
|
7
|
-
|
|
7
|
+
const { name, version } = _package;
|
|
8
8
|
if (!window.__PLASMA_INFO__) {
|
|
9
9
|
window.__PLASMA_INFO__ = {};
|
|
10
10
|
}
|
|
11
11
|
if (!window.__PLASMA_INFO__[name]) {
|
|
12
12
|
window.__PLASMA_INFO__[name] = {
|
|
13
|
-
version
|
|
13
|
+
version,
|
|
14
14
|
entities: [
|
|
15
15
|
entityName
|
|
16
16
|
]
|
|
@@ -1,73 +1,9 @@
|
|
|
1
|
-
function _define_property(obj, key, value) {
|
|
2
|
-
if (key in obj) {
|
|
3
|
-
Object.defineProperty(obj, key, {
|
|
4
|
-
value: value,
|
|
5
|
-
enumerable: true,
|
|
6
|
-
configurable: true,
|
|
7
|
-
writable: true
|
|
8
|
-
});
|
|
9
|
-
} else {
|
|
10
|
-
obj[key] = value;
|
|
11
|
-
}
|
|
12
|
-
return obj;
|
|
13
|
-
}
|
|
14
|
-
function _object_spread(target) {
|
|
15
|
-
for(var i = 1; i < arguments.length; i++){
|
|
16
|
-
var source = arguments[i] != null ? arguments[i] : {};
|
|
17
|
-
var ownKeys = Object.keys(source);
|
|
18
|
-
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
19
|
-
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
20
|
-
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
21
|
-
}));
|
|
22
|
-
}
|
|
23
|
-
ownKeys.forEach(function(key) {
|
|
24
|
-
_define_property(target, key, source[key]);
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
return target;
|
|
28
|
-
}
|
|
29
|
-
function _object_without_properties(source, excluded) {
|
|
30
|
-
if (source == null) return {};
|
|
31
|
-
var target = {}, sourceKeys, key, i;
|
|
32
|
-
if (typeof Reflect !== "undefined" && Reflect.ownKeys) {
|
|
33
|
-
sourceKeys = Reflect.ownKeys(source);
|
|
34
|
-
for(i = 0; i < sourceKeys.length; i++){
|
|
35
|
-
key = sourceKeys[i];
|
|
36
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
37
|
-
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
38
|
-
target[key] = source[key];
|
|
39
|
-
}
|
|
40
|
-
return target;
|
|
41
|
-
}
|
|
42
|
-
target = _object_without_properties_loose(source, excluded);
|
|
43
|
-
if (Object.getOwnPropertySymbols) {
|
|
44
|
-
sourceKeys = Object.getOwnPropertySymbols(source);
|
|
45
|
-
for(i = 0; i < sourceKeys.length; i++){
|
|
46
|
-
key = sourceKeys[i];
|
|
47
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
48
|
-
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
49
|
-
target[key] = source[key];
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
return target;
|
|
53
|
-
}
|
|
54
|
-
function _object_without_properties_loose(source, excluded) {
|
|
55
|
-
if (source == null) return {};
|
|
56
|
-
var target = {}, sourceKeys = Object.getOwnPropertyNames(source), key, i;
|
|
57
|
-
for(i = 0; i < sourceKeys.length; i++){
|
|
58
|
-
key = sourceKeys[i];
|
|
59
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
60
|
-
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
61
|
-
target[key] = source[key];
|
|
62
|
-
}
|
|
63
|
-
return target;
|
|
64
|
-
}
|
|
65
1
|
import React from 'react';
|
|
66
2
|
import styled, { css } from 'styled-components';
|
|
67
3
|
import { caption } from '../../tokens';
|
|
68
4
|
/**
|
|
69
5
|
* Размеры в ремах.
|
|
70
|
-
*/ export
|
|
6
|
+
*/ export const badgeSizes = {
|
|
71
7
|
l: {
|
|
72
8
|
textMarginX: '0.25rem',
|
|
73
9
|
textMarginLeftAfterContent: '0.25rem'
|
|
@@ -77,7 +13,7 @@ import { caption } from '../../tokens';
|
|
|
77
13
|
textMarginLeftAfterContent: '0.125rem'
|
|
78
14
|
}
|
|
79
15
|
};
|
|
80
|
-
export
|
|
16
|
+
export const badgeRootSizes = {
|
|
81
17
|
l: {
|
|
82
18
|
height: '1.5rem',
|
|
83
19
|
padding: '0.25rem',
|
|
@@ -93,52 +29,43 @@ export var badgeRootSizes = {
|
|
|
93
29
|
fontSize: '0.625rem'
|
|
94
30
|
}
|
|
95
31
|
};
|
|
96
|
-
|
|
32
|
+
const StyledText = styled.span.withConfig({
|
|
97
33
|
displayName: "Badge__StyledText",
|
|
98
34
|
componentId: "sc-4f989aef-0"
|
|
99
35
|
})([
|
|
100
|
-
|
|
36
|
+
``
|
|
101
37
|
]);
|
|
102
|
-
|
|
38
|
+
const StyledContent = styled.div.withConfig({
|
|
103
39
|
displayName: "Badge__StyledContent",
|
|
104
40
|
componentId: "sc-4f989aef-1"
|
|
105
41
|
})([
|
|
106
|
-
|
|
42
|
+
`display:flex;`
|
|
107
43
|
]);
|
|
108
|
-
|
|
44
|
+
const StyledBadge = styled.div.withConfig({
|
|
109
45
|
displayName: "Badge__StyledBadge",
|
|
110
46
|
componentId: "sc-4f989aef-2"
|
|
111
47
|
})([
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
], caption,
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
"{margin-left:",
|
|
126
|
-
";}"
|
|
48
|
+
``,
|
|
49
|
+
`;display:inline-flex;align-items:center;box-sizing:border-box;justify-content:center;width:max-content;`,
|
|
50
|
+
`;`
|
|
51
|
+
], caption, ({ size, circled })=>css([
|
|
52
|
+
``,
|
|
53
|
+
`;`,
|
|
54
|
+
` `,
|
|
55
|
+
`{margin-left:`,
|
|
56
|
+
`;margin-right:`,
|
|
57
|
+
`;}`,
|
|
58
|
+
` ~ `,
|
|
59
|
+
`{margin-left:`,
|
|
60
|
+
`;}`
|
|
127
61
|
], badgeRootSizes[size], circled && css([
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
], badgeRootSizes[size].minWidth), StyledText, badgeSizes[size].textMarginX, badgeSizes[size].textMarginX, StyledContent, StyledText, badgeSizes[size].textMarginLeftAfterContent);
|
|
131
|
-
});
|
|
62
|
+
`width:`,
|
|
63
|
+
`;padding-left:0;padding-right:0;`
|
|
64
|
+
], badgeRootSizes[size].minWidth), StyledText, badgeSizes[size].textMarginX, badgeSizes[size].textMarginX, StyledContent, StyledText, badgeSizes[size].textMarginLeftAfterContent));
|
|
132
65
|
/**
|
|
133
66
|
* Небольшая бирка для ячеек и карточек.
|
|
134
67
|
* Компонент может отображаться в нескольких размерах и цветах, может содержать текст и/или иконку.
|
|
135
|
-
*/ export
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
"contentLeft"
|
|
140
|
-
]);
|
|
141
|
-
return /*#__PURE__*/ React.createElement(StyledBadge, _object_spread({
|
|
142
|
-
size: size
|
|
143
|
-
}, rest), contentLeft && /*#__PURE__*/ React.createElement(StyledContent, null, contentLeft), text && /*#__PURE__*/ React.createElement(StyledText, null, text));
|
|
144
|
-
};
|
|
68
|
+
*/ export const Badge = ({ size = 'l', text, contentLeft, ...rest })=>/*#__PURE__*/ React.createElement(StyledBadge, {
|
|
69
|
+
size: size,
|
|
70
|
+
...rest
|
|
71
|
+
}, contentLeft && /*#__PURE__*/ React.createElement(StyledContent, null, contentLeft), text && /*#__PURE__*/ React.createElement(StyledText, null, text));
|
|
@@ -3,65 +3,56 @@ import styled, { css } from 'styled-components';
|
|
|
3
3
|
import { Body1, Footnote1 } from '../Typography';
|
|
4
4
|
import { applyEllipsis, applyNoSelect } from '../../mixins';
|
|
5
5
|
import { secondary } from '../../tokens';
|
|
6
|
-
export
|
|
6
|
+
export const StyledRoot = styled.div.withConfig({
|
|
7
7
|
displayName: "Basebox__StyledRoot",
|
|
8
8
|
componentId: "sc-a5c1d526-0"
|
|
9
9
|
})([
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
``,
|
|
11
|
+
` position:relative;align-items:flex-start;display:flex;cursor:pointer;`
|
|
12
12
|
], applyNoSelect);
|
|
13
|
-
export
|
|
13
|
+
export const StyledContentWrapper = styled.label.withConfig({
|
|
14
14
|
displayName: "Basebox__StyledContentWrapper",
|
|
15
15
|
componentId: "sc-a5c1d526-1"
|
|
16
16
|
})([
|
|
17
|
-
|
|
17
|
+
`position:relative;align-items:flex-start;display:flex;width:100%;cursor:inherit;`
|
|
18
18
|
]);
|
|
19
|
-
export
|
|
19
|
+
export const StyledInput = styled.input.withConfig({
|
|
20
20
|
displayName: "Basebox__StyledInput",
|
|
21
21
|
componentId: "sc-a5c1d526-2"
|
|
22
22
|
})([
|
|
23
|
-
|
|
23
|
+
`position:absolute;&:focus{outline:0 none;}`
|
|
24
24
|
]);
|
|
25
|
-
export
|
|
25
|
+
export const StyledTrigger = styled.div.withConfig({
|
|
26
26
|
displayName: "Basebox__StyledTrigger",
|
|
27
27
|
componentId: "sc-a5c1d526-3"
|
|
28
28
|
})([
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
],
|
|
32
|
-
|
|
33
|
-
return theme.lowPerformance ? 'unset' : 'all 0.1s ease-in-out';
|
|
34
|
-
});
|
|
35
|
-
export var StyledContent = styled.div.withConfig({
|
|
29
|
+
`box-sizing:border-box;position:relative;transition:`,
|
|
30
|
+
`;`
|
|
31
|
+
], ({ theme })=>theme.lowPerformance ? 'unset' : 'all 0.1s ease-in-out');
|
|
32
|
+
export const StyledContent = styled.div.withConfig({
|
|
36
33
|
displayName: "Basebox__StyledContent",
|
|
37
34
|
componentId: "sc-a5c1d526-4"
|
|
38
35
|
})([
|
|
39
|
-
|
|
36
|
+
`display:flex;flex-direction:column;margin-left:0.75rem;`
|
|
40
37
|
]);
|
|
41
|
-
export
|
|
38
|
+
export const StyledLabel = styled(Body1).withConfig({
|
|
42
39
|
displayName: "Basebox__StyledLabel",
|
|
43
40
|
componentId: "sc-a5c1d526-5"
|
|
44
41
|
})([
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
],
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
], applyEllipsis);
|
|
53
|
-
});
|
|
54
|
-
export var StyledDescription = styled(Footnote1).withConfig({
|
|
42
|
+
``,
|
|
43
|
+
``
|
|
44
|
+
], ({ singleLine })=>singleLine && css([
|
|
45
|
+
``,
|
|
46
|
+
``
|
|
47
|
+
], applyEllipsis));
|
|
48
|
+
export const StyledDescription = styled(Footnote1).withConfig({
|
|
55
49
|
displayName: "Basebox__StyledDescription",
|
|
56
50
|
componentId: "sc-a5c1d526-6"
|
|
57
51
|
})([
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
], secondary,
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
""
|
|
66
|
-
], applyEllipsis);
|
|
67
|
-
});
|
|
52
|
+
`color:`,
|
|
53
|
+
`;`,
|
|
54
|
+
``
|
|
55
|
+
], secondary, ({ singleLine })=>singleLine && css([
|
|
56
|
+
``,
|
|
57
|
+
``
|
|
58
|
+
], applyEllipsis));
|