@salutejs/plasma-new-hope 0.271.0-canary.1778.13392217490.0 → 0.271.0-dev.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cjs/components/Notification/Notification.css +11 -11
- package/cjs/components/Notification/Notification.js +3 -7
- package/cjs/components/Notification/Notification.js.map +1 -1
- package/cjs/components/Notification/Notification.styles.js +26 -42
- package/cjs/components/Notification/Notification.styles.js.map +1 -1
- package/cjs/components/Notification/{Notification.styles_gk4bgs.css → Notification.styles_1u5gusp.css} +2 -2
- package/cjs/components/Notification/Notification.tokens.js +0 -1
- package/cjs/components/Notification/Notification.tokens.js.map +1 -1
- package/cjs/components/Notification/Notification.types.js.map +1 -1
- package/cjs/components/Notification/NotificationsPortal.js +0 -1
- package/cjs/components/Notification/NotificationsPortal.js.map +1 -1
- package/cjs/components/Notification/NotificationsProvider.css +11 -11
- package/cjs/index.css +11 -11
- package/emotion/cjs/components/Notification/Notification.js +3 -7
- package/emotion/cjs/components/Notification/Notification.styles.js +26 -32
- package/emotion/cjs/components/Notification/Notification.tokens.js +0 -1
- package/emotion/cjs/components/Notification/NotificationsPortal.js +1 -2
- package/emotion/cjs/examples/plasma_b2c/components/Notification/Notification.config.js +7 -11
- package/emotion/cjs/examples/plasma_b2c/components/Notification/Notification.stories.tsx +3 -35
- package/emotion/cjs/examples/plasma_b2c/components/Tokens/Tokens.stories.tsx +2 -2
- package/emotion/cjs/examples/plasma_web/components/Notification/Notification.config.js +7 -11
- package/emotion/cjs/examples/plasma_web/components/Notification/Notification.stories.tsx +2 -18
- package/emotion/cjs/examples/plasma_web/components/Tokens/Tokens.stories.tsx +2 -2
- package/emotion/es/components/Notification/Notification.js +3 -7
- package/emotion/es/components/Notification/Notification.styles.js +26 -32
- package/emotion/es/components/Notification/Notification.tokens.js +0 -1
- package/emotion/es/components/Notification/NotificationsPortal.js +1 -2
- package/emotion/es/examples/plasma_b2c/components/Notification/Notification.config.js +7 -11
- package/emotion/es/examples/plasma_b2c/components/Notification/Notification.stories.tsx +3 -35
- package/emotion/es/examples/plasma_b2c/components/Tokens/Tokens.stories.tsx +2 -2
- package/emotion/es/examples/plasma_web/components/Notification/Notification.config.js +7 -11
- package/emotion/es/examples/plasma_web/components/Notification/Notification.stories.tsx +2 -18
- package/emotion/es/examples/plasma_web/components/Tokens/Tokens.stories.tsx +2 -2
- package/es/components/Notification/Notification.css +11 -11
- package/es/components/Notification/Notification.js +3 -7
- package/es/components/Notification/Notification.js.map +1 -1
- package/es/components/Notification/Notification.styles.js +26 -42
- package/es/components/Notification/Notification.styles.js.map +1 -1
- package/es/components/Notification/{Notification.styles_gk4bgs.css → Notification.styles_1u5gusp.css} +2 -2
- package/es/components/Notification/Notification.tokens.js +0 -1
- package/es/components/Notification/Notification.tokens.js.map +1 -1
- package/es/components/Notification/Notification.types.js.map +1 -1
- package/es/components/Notification/NotificationsPortal.js +0 -1
- package/es/components/Notification/NotificationsPortal.js.map +1 -1
- package/es/components/Notification/NotificationsProvider.css +11 -11
- package/es/index.css +11 -11
- package/package.json +2 -2
- package/styled-components/cjs/components/Notification/Notification.js +3 -7
- package/styled-components/cjs/components/Notification/Notification.styles.js +15 -21
- package/styled-components/cjs/components/Notification/Notification.tokens.js +0 -1
- package/styled-components/cjs/components/Notification/NotificationsPortal.js +0 -1
- package/styled-components/cjs/examples/plasma_b2c/components/Notification/Notification.config.js +1 -5
- package/styled-components/cjs/examples/plasma_b2c/components/Notification/Notification.stories.tsx +3 -35
- package/styled-components/cjs/examples/plasma_b2c/components/Tokens/Tokens.stories.tsx +2 -2
- package/styled-components/cjs/examples/plasma_web/components/Notification/Notification.config.js +1 -5
- package/styled-components/cjs/examples/plasma_web/components/Notification/Notification.stories.tsx +2 -18
- package/styled-components/cjs/examples/plasma_web/components/Tokens/Tokens.stories.tsx +2 -2
- package/styled-components/es/components/Notification/Notification.js +3 -7
- package/styled-components/es/components/Notification/Notification.styles.js +15 -21
- package/styled-components/es/components/Notification/Notification.tokens.js +0 -1
- package/styled-components/es/components/Notification/NotificationsPortal.js +0 -1
- package/styled-components/es/examples/plasma_b2c/components/Notification/Notification.config.js +1 -5
- package/styled-components/es/examples/plasma_b2c/components/Notification/Notification.stories.tsx +3 -35
- package/styled-components/es/examples/plasma_b2c/components/Tokens/Tokens.stories.tsx +2 -2
- package/styled-components/es/examples/plasma_web/components/Notification/Notification.config.js +1 -5
- package/styled-components/es/examples/plasma_web/components/Notification/Notification.stories.tsx +2 -18
- package/styled-components/es/examples/plasma_web/components/Tokens/Tokens.stories.tsx +2 -2
- package/types/components/Notification/Notification.d.ts.map +1 -1
- package/types/components/Notification/Notification.styles.d.ts +2 -6
- package/types/components/Notification/Notification.styles.d.ts.map +1 -1
- package/types/components/Notification/Notification.tokens.d.ts +0 -1
- package/types/components/Notification/Notification.tokens.d.ts.map +1 -1
- package/types/components/Notification/Notification.types.d.ts +0 -8
- package/types/components/Notification/Notification.types.d.ts.map +1 -1
- package/types/components/Notification/NotificationsPortal.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Notification/Notification.config.d.ts +0 -4
- package/types/examples/plasma_b2c/components/Notification/Notification.config.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Notification/Notification.config.d.ts +0 -4
- package/types/examples/plasma_web/components/Notification/Notification.config.d.ts.map +1 -1
@@ -24,41 +24,35 @@ export var ButtonsWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
24
24
|
}, tokens.horisontalActionsAlignSelf, classes.horizontal);
|
25
25
|
export var IconWrapper = /*#__PURE__*/styled.div.withConfig({
|
26
26
|
componentId: "plasma-new-hope__sc-1iufy9r-3"
|
27
|
-
})(["width:var(", ");height:var(", ");align-self:var(", ");
|
28
|
-
var
|
29
|
-
return
|
27
|
+
})(["width:var(", ");height:var(", ");align-self:var(", ");margin-right:", ";margin-bottom:", ";&.", "{margin-right:var(", ");margin-bottom:unset;}"], tokens.contentLeftIconSize, tokens.contentLeftIconSize, tokens.horisontalIconLeftAlignSelf, function (_ref2) {
|
28
|
+
var iconPlacement = _ref2.iconPlacement;
|
29
|
+
return iconPlacement === placements.left ? "var(".concat(tokens.contentLeftIconMargin, ")") : 'unset';
|
30
30
|
}, function (_ref3) {
|
31
31
|
var iconPlacement = _ref3.iconPlacement;
|
32
|
-
return iconPlacement === placements.left ? "var(".concat(tokens.contentLeftIconMargin, ")") : 'unset';
|
33
|
-
}, function (_ref4) {
|
34
|
-
var iconPlacement = _ref4.iconPlacement;
|
35
32
|
return iconPlacement === placements.top ? "var(".concat(tokens.contentTopIconMargin, ")") : 'unset';
|
36
33
|
}, classes.horizontal, tokens.horizontalLayoutLeftIconMargin);
|
37
34
|
export var ContentBox = /*#__PURE__*/styled.div.withConfig({
|
38
35
|
componentId: "plasma-new-hope__sc-1iufy9r-4"
|
39
|
-
})(["display:", ";padding-top:", ";&.", "{padding:unset;display:flex;align-items:center;flex-grow:1;}"], function (
|
40
|
-
var iconPlacement =
|
36
|
+
})(["display:", ";padding-top:", ";&.", "{padding:unset;display:flex;align-items:center;flex-grow:1;}"], function (_ref4) {
|
37
|
+
var iconPlacement = _ref4.iconPlacement;
|
41
38
|
return iconPlacement === placements.left ? 'flex' : 'block';
|
42
|
-
}, function (
|
43
|
-
var iconPlacement =
|
39
|
+
}, function (_ref5) {
|
40
|
+
var iconPlacement = _ref5.iconPlacement;
|
44
41
|
return iconPlacement ? "var(".concat(tokens.contentPaddingTop, ")") : "var(".concat(tokens.contentPaddingTopWithoutIcon, ")");
|
45
42
|
}, classes.horizontal);
|
46
43
|
export var TextBox = /*#__PURE__*/styled.div.withConfig({
|
47
44
|
componentId: "plasma-new-hope__sc-1iufy9r-5"
|
48
|
-
})(["padding:var(", ") var(", ") var(", ") var(", ");padding-top:", ";padding-right:", ";display:flex;flex-direction:column;row-gap:var(", ");word-break:break-word;&.", "{padding:unset;}"], tokens.textboxPaddingTop, tokens.textboxPaddingRight, tokens.textboxPaddingBottom, tokens.textboxPaddingLeft, function (
|
49
|
-
var iconPlacement =
|
45
|
+
})(["padding:var(", ") var(", ") var(", ") var(", ");padding-top:", ";padding-right:", ";display:flex;flex-direction:column;row-gap:var(", ");word-break:break-word;&.", "{padding:unset;}"], tokens.textboxPaddingTop, tokens.textboxPaddingRight, tokens.textboxPaddingBottom, tokens.textboxPaddingLeft, function (_ref6) {
|
46
|
+
var iconPlacement = _ref6.iconPlacement;
|
50
47
|
return !iconPlacement || iconPlacement === placements.top ? "var(".concat(tokens.textboxPaddingTopWithTopIcon, ")") : "var(".concat(tokens.textboxPaddingTop, ")");
|
51
|
-
}, function (
|
52
|
-
var showCloseIcon =
|
53
|
-
iconPlacement =
|
48
|
+
}, function (_ref7) {
|
49
|
+
var showCloseIcon = _ref7.showCloseIcon,
|
50
|
+
iconPlacement = _ref7.iconPlacement;
|
54
51
|
return showCloseIcon && iconPlacement !== placements.top ? "var(".concat(tokens.textboxPaddingRightWithCloseIcon, ")") : "var(".concat(tokens.textboxPaddingRight, ")");
|
55
52
|
}, tokens.textboxGap, classes.horizontal);
|
56
53
|
export var StyledTitle = /*#__PURE__*/styled.div.withConfig({
|
57
54
|
componentId: "plasma-new-hope__sc-1iufy9r-6"
|
58
|
-
})(["font-family:var(", ");font-size:var(", ");font-style:var(", ");font-weight:var(", ");letter-spacing:var(", ");line-height:var(", ");", ";
|
59
|
-
var textColor = _ref9.textColor;
|
60
|
-
return textColor || "var(".concat(tokens.titleColor, ")");
|
61
|
-
});
|
55
|
+
})(["font-family:var(", ");font-size:var(", ");font-style:var(", ");font-weight:var(", ");letter-spacing:var(", ");line-height:var(", ");", ";"], tokens.titleFontFamily, tokens.titleFontSize, tokens.titleFontStyle, tokens.titleFontWeight, tokens.titleFontLetterSpacing, tokens.titleFontLineHeight, /*#__PURE__*/String(applyHyphens));
|
62
56
|
export var StyledContent = /*#__PURE__*/styled.div.withConfig({
|
63
57
|
componentId: "plasma-new-hope__sc-1iufy9r-7"
|
64
58
|
})(["font-family:var(", ");font-size:var(", ");font-style:var(", ");font-weight:var(", ");letter-spacing:var(", ");line-height:var(", ");", ";color:var(", ");"], tokens.contentFontFamily, tokens.contentFontSize, tokens.contentFontStyle, tokens.contentFontWeight, tokens.contentFontLetterSpacing, tokens.contentFontLineHeight, /*#__PURE__*/String(applyHyphens), tokens.contentColor);
|
@@ -67,7 +61,7 @@ export var StyledItemWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
67
61
|
})(["margin-top:1rem;opacity:1;&&.", "{animation:0.4s showAnimation ease-out;&.", "{animation:0.4s showLeftToRightAnimation ease-out;}}&&.", "{animation:0.4s hideAnimation ease-out;&.", "{animation:0.4s hideLeftToRightAnimation ease-out;}}@keyframes showLeftToRightAnimation{0%{transform:translateX(-100%);opacity:0;}100%{transform:translateX(0);opacity:1;}}@keyframes hideLeftToRightAnimation{0%{transform:translateX(0);opacity:1;}100%{transform:translateX(-100%);opacity:0;}}@keyframes showAnimation{0%{transform:translateX(100%);opacity:0;}100%{transform:translateX(0);opacity:1;}}@keyframes hideAnimation{0%{transform:translateX(0);opacity:1;}100%{transform:translateX(100%);opacity:0;}}"], classes.notificationItemOpened, classes.notificationLeftToRightAnimation, classes.notificationItemHidden, classes.notificationLeftToRightAnimation);
|
68
62
|
export var StyledRoot = /*#__PURE__*/styled.div.withConfig({
|
69
63
|
componentId: "plasma-new-hope__sc-1iufy9r-9"
|
70
|
-
})(["display:flex;flex-direction:column-reverse;box-sizing:border-box;padding:0 1.5rem 1.5rem;max-height:100%;align-items:", ";"], function (
|
71
|
-
var placement =
|
64
|
+
})(["display:flex;flex-direction:column-reverse;box-sizing:border-box;padding:0 1.5rem 1.5rem;max-height:100%;align-items:", ";"], function (_ref8) {
|
65
|
+
var placement = _ref8.placement;
|
72
66
|
return placement === 'bottom-left' ? 'flex-start' : 'flex-end';
|
73
67
|
});
|
@@ -45,7 +45,6 @@ export var tokens = {
|
|
45
45
|
textboxGap: '--plasma-notification-textbox-gap',
|
46
46
|
buttonsMarginTop: '--plasma-notification-buttons-margin-top',
|
47
47
|
buttonsMarginLeft: '--plasma-notification-buttons-margin-left',
|
48
|
-
contentLeftIconColor: '--plasma-notification-content-left-icon-color',
|
49
48
|
contentLeftIconSize: '--plasma-notification-content-left-icon-size',
|
50
49
|
contentLeftIconMargin: '--plasma-notification-content-left-icon-margin',
|
51
50
|
contentTopIconMargin: '--plasma-notification-content-top-icon-margin',
|
@@ -33,7 +33,6 @@ export var NotificationsPortal = function NotificationsPortal(_ref) {
|
|
33
33
|
var Notification = useMemo(function () {
|
34
34
|
return component(config);
|
35
35
|
}, []);
|
36
|
-
console.log(notifications);
|
37
36
|
return /*#__PURE__*/React.createElement(PopupProvider, {
|
38
37
|
UNSAFE_SSR_ENABLED: UNSAFE_SSR_ENABLED
|
39
38
|
}, notifications.length > 0 && /*#__PURE__*/React.createElement(StyledPopup, {
|
package/styled-components/es/examples/plasma_b2c/components/Notification/Notification.config.js
CHANGED
@@ -7,11 +7,7 @@ export var config = {
|
|
7
7
|
},
|
8
8
|
variations: {
|
9
9
|
view: {
|
10
|
-
"default": /*#__PURE__*/css(["", ":var(--text-
|
11
|
-
negative: /*#__PURE__*/css(["", ":var(--text-negative);", ":var(--text-negative);", ":var(--text-secondary);", ":var(--surface-transparent-card);", ":0.75rem;", ":0.375rem;", ":0.125rem;", ":0.25rem;", ":0rem;", ":0.25rem;", ":0.25rem;", ":1rem;", ":0.1875rem;", ":0.125rem;", ":0.375rem;", ":0.125rem;", ":1.625rem;", ":0.25rem;", ":0.5rem;", ":0.5rem;", ":0.375rem;", ":1.5rem;", ":0.375rem;", ":0.5rem;", ":var(--plasma-typo-body-s-font-family);", ":var(--plasma-typo-body-s-font-size);", ":var(--plasma-typo-body-s-font-style);", ":var(--plasma-typo-body-s-font-weight);", ":var(--plasma-typo-body-s-letter-spacing);", ":var(--plasma-typo-body-s-line-height);", ":var(--plasma-typo-body-s-font-family);", ":var(--plasma-typo-body-s-font-size);", ":var(--plasma-typo-body-s-font-style);", ":var(--plasma-typo-body-s-bold-font-weight);", ":var(--plasma-typo-body-s-letter-spacing);", ":var(--plasma-typo-body-s-line-height);", ":var(--text-tertiary);", ":var(--text-primary);", ":0.375rem;", ":0.75rem;", ":0.8125rem 0.5rem 0.8125rem 0.875rem;"], notificationTokens.titleColor, notificationTokens.contentLeftIconColor, notificationTokens.contentColor, notificationTokens.background, notificationTokens.borderRadius, notificationTokens.padding, notificationTokens.contentPaddingTop, notificationTokens.contentPaddingRight, notificationTokens.contentPaddingBottom, notificationTokens.contentPaddingLeft, notificationTokens.contentPaddingTopWithoutIcon, notificationTokens.horizontalLayoutRightPaddingWithoutCloseIcon, notificationTokens.textboxPaddingTop, notificationTokens.textboxPaddingRight, notificationTokens.textboxPaddingBottom, notificationTokens.textboxPaddingLeft, notificationTokens.textboxPaddingRightWithCloseIcon, notificationTokens.textboxGap, notificationTokens.closeIconTop, notificationTokens.closeIconRight, notificationTokens.buttonsMarginTop, notificationTokens.contentLeftIconSize, notificationTokens.contentLeftIconMargin, notificationTokens.contentTopIconMargin, notificationTokens.contentFontFamily, notificationTokens.contentFontSize, notificationTokens.contentFontStyle, notificationTokens.contentFontWeight, notificationTokens.contentFontLetterSpacing, notificationTokens.contentFontLineHeight, notificationTokens.titleFontFamily, notificationTokens.titleFontSize, notificationTokens.titleFontStyle, notificationTokens.titleFontWeight, notificationTokens.titleFontLetterSpacing, notificationTokens.titleFontLineHeight, notificationTokens.closeIconColor, notificationTokens.closeIconColorOnHover, notificationTokens.horizontalLayoutGap, notificationTokens.horizontalLayoutLeftIconMargin, notificationTokens.paddingOneLineTextbox),
|
12
|
-
positive: /*#__PURE__*/css(["", ":var(--text-positive);", ":var(--text-positive);", ":var(--text-secondary);", ":var(--surface-transparent-card);", ":0.75rem;", ":0.375rem;", ":0.125rem;", ":0.25rem;", ":0rem;", ":0.25rem;", ":0.25rem;", ":1rem;", ":0.1875rem;", ":0.125rem;", ":0.375rem;", ":0.125rem;", ":1.625rem;", ":0.25rem;", ":0.5rem;", ":0.5rem;", ":0.375rem;", ":1.5rem;", ":0.375rem;", ":0.5rem;", ":var(--plasma-typo-body-s-font-family);", ":var(--plasma-typo-body-s-font-size);", ":var(--plasma-typo-body-s-font-style);", ":var(--plasma-typo-body-s-font-weight);", ":var(--plasma-typo-body-s-letter-spacing);", ":var(--plasma-typo-body-s-line-height);", ":var(--plasma-typo-body-s-font-family);", ":var(--plasma-typo-body-s-font-size);", ":var(--plasma-typo-body-s-font-style);", ":var(--plasma-typo-body-s-bold-font-weight);", ":var(--plasma-typo-body-s-letter-spacing);", ":var(--plasma-typo-body-s-line-height);", ":var(--text-tertiary);", ":var(--text-primary);", ":0.375rem;", ":0.75rem;", ":0.8125rem 0.5rem 0.8125rem 0.875rem;"], notificationTokens.titleColor, notificationTokens.contentLeftIconColor, notificationTokens.contentColor, notificationTokens.background, notificationTokens.borderRadius, notificationTokens.padding, notificationTokens.contentPaddingTop, notificationTokens.contentPaddingRight, notificationTokens.contentPaddingBottom, notificationTokens.contentPaddingLeft, notificationTokens.contentPaddingTopWithoutIcon, notificationTokens.horizontalLayoutRightPaddingWithoutCloseIcon, notificationTokens.textboxPaddingTop, notificationTokens.textboxPaddingRight, notificationTokens.textboxPaddingBottom, notificationTokens.textboxPaddingLeft, notificationTokens.textboxPaddingRightWithCloseIcon, notificationTokens.textboxGap, notificationTokens.closeIconTop, notificationTokens.closeIconRight, notificationTokens.buttonsMarginTop, notificationTokens.contentLeftIconSize, notificationTokens.contentLeftIconMargin, notificationTokens.contentTopIconMargin, notificationTokens.contentFontFamily, notificationTokens.contentFontSize, notificationTokens.contentFontStyle, notificationTokens.contentFontWeight, notificationTokens.contentFontLetterSpacing, notificationTokens.contentFontLineHeight, notificationTokens.titleFontFamily, notificationTokens.titleFontSize, notificationTokens.titleFontStyle, notificationTokens.titleFontWeight, notificationTokens.titleFontLetterSpacing, notificationTokens.titleFontLineHeight, notificationTokens.closeIconColor, notificationTokens.closeIconColorOnHover, notificationTokens.horizontalLayoutGap, notificationTokens.horizontalLayoutLeftIconMargin, notificationTokens.paddingOneLineTextbox),
|
13
|
-
warning: /*#__PURE__*/css(["", ":var(--text-warning);", ":var(--text-warning);", ":var(--text-secondary);", ":var(--surface-transparent-card);", ":0.75rem;", ":0.375rem;", ":0.125rem;", ":0.25rem;", ":0rem;", ":0.25rem;", ":0.25rem;", ":1rem;", ":0.1875rem;", ":0.125rem;", ":0.375rem;", ":0.125rem;", ":1.625rem;", ":0.25rem;", ":0.5rem;", ":0.5rem;", ":0.375rem;", ":1.5rem;", ":0.375rem;", ":0.5rem;", ":var(--plasma-typo-body-s-font-family);", ":var(--plasma-typo-body-s-font-size);", ":var(--plasma-typo-body-s-font-style);", ":var(--plasma-typo-body-s-font-weight);", ":var(--plasma-typo-body-s-letter-spacing);", ":var(--plasma-typo-body-s-line-height);", ":var(--plasma-typo-body-s-font-family);", ":var(--plasma-typo-body-s-font-size);", ":var(--plasma-typo-body-s-font-style);", ":var(--plasma-typo-body-s-bold-font-weight);", ":var(--plasma-typo-body-s-letter-spacing);", ":var(--plasma-typo-body-s-line-height);", ":var(--text-tertiary);", ":var(--text-primary);", ":0.375rem;", ":0.75rem;", ":0.8125rem 0.5rem 0.8125rem 0.875rem;"], notificationTokens.titleColor, notificationTokens.contentLeftIconColor, notificationTokens.contentColor, notificationTokens.background, notificationTokens.borderRadius, notificationTokens.padding, notificationTokens.contentPaddingTop, notificationTokens.contentPaddingRight, notificationTokens.contentPaddingBottom, notificationTokens.contentPaddingLeft, notificationTokens.contentPaddingTopWithoutIcon, notificationTokens.horizontalLayoutRightPaddingWithoutCloseIcon, notificationTokens.textboxPaddingTop, notificationTokens.textboxPaddingRight, notificationTokens.textboxPaddingBottom, notificationTokens.textboxPaddingLeft, notificationTokens.textboxPaddingRightWithCloseIcon, notificationTokens.textboxGap, notificationTokens.closeIconTop, notificationTokens.closeIconRight, notificationTokens.buttonsMarginTop, notificationTokens.contentLeftIconSize, notificationTokens.contentLeftIconMargin, notificationTokens.contentTopIconMargin, notificationTokens.contentFontFamily, notificationTokens.contentFontSize, notificationTokens.contentFontStyle, notificationTokens.contentFontWeight, notificationTokens.contentFontLetterSpacing, notificationTokens.contentFontLineHeight, notificationTokens.titleFontFamily, notificationTokens.titleFontSize, notificationTokens.titleFontStyle, notificationTokens.titleFontWeight, notificationTokens.titleFontLetterSpacing, notificationTokens.titleFontLineHeight, notificationTokens.closeIconColor, notificationTokens.closeIconColorOnHover, notificationTokens.horizontalLayoutGap, notificationTokens.horizontalLayoutLeftIconMargin, notificationTokens.paddingOneLineTextbox),
|
14
|
-
info: /*#__PURE__*/css(["", ":var(--text-info);", ":var(--text-info);", ":var(--text-secondary);", ":var(--surface-transparent-card);", ":0.75rem;", ":0.375rem;", ":0.125rem;", ":0.25rem;", ":0rem;", ":0.25rem;", ":0.25rem;", ":1rem;", ":0.1875rem;", ":0.125rem;", ":0.375rem;", ":0.125rem;", ":1.625rem;", ":0.25rem;", ":0.5rem;", ":0.5rem;", ":0.375rem;", ":1.5rem;", ":0.375rem;", ":0.5rem;", ":var(--plasma-typo-body-s-font-family);", ":var(--plasma-typo-body-s-font-size);", ":var(--plasma-typo-body-s-font-style);", ":var(--plasma-typo-body-s-font-weight);", ":var(--plasma-typo-body-s-letter-spacing);", ":var(--plasma-typo-body-s-line-height);", ":var(--plasma-typo-body-s-font-family);", ":var(--plasma-typo-body-s-font-size);", ":var(--plasma-typo-body-s-font-style);", ":var(--plasma-typo-body-s-bold-font-weight);", ":var(--plasma-typo-body-s-letter-spacing);", ":var(--plasma-typo-body-s-line-height);", ":var(--text-tertiary);", ":var(--text-primary);", ":0.375rem;", ":0.75rem;", ":0.8125rem 0.5rem 0.8125rem 0.875rem;"], notificationTokens.titleColor, notificationTokens.contentLeftIconColor, notificationTokens.contentColor, notificationTokens.background, notificationTokens.borderRadius, notificationTokens.padding, notificationTokens.contentPaddingTop, notificationTokens.contentPaddingRight, notificationTokens.contentPaddingBottom, notificationTokens.contentPaddingLeft, notificationTokens.contentPaddingTopWithoutIcon, notificationTokens.horizontalLayoutRightPaddingWithoutCloseIcon, notificationTokens.textboxPaddingTop, notificationTokens.textboxPaddingRight, notificationTokens.textboxPaddingBottom, notificationTokens.textboxPaddingLeft, notificationTokens.textboxPaddingRightWithCloseIcon, notificationTokens.textboxGap, notificationTokens.closeIconTop, notificationTokens.closeIconRight, notificationTokens.buttonsMarginTop, notificationTokens.contentLeftIconSize, notificationTokens.contentLeftIconMargin, notificationTokens.contentTopIconMargin, notificationTokens.contentFontFamily, notificationTokens.contentFontSize, notificationTokens.contentFontStyle, notificationTokens.contentFontWeight, notificationTokens.contentFontLetterSpacing, notificationTokens.contentFontLineHeight, notificationTokens.titleFontFamily, notificationTokens.titleFontSize, notificationTokens.titleFontStyle, notificationTokens.titleFontWeight, notificationTokens.titleFontLetterSpacing, notificationTokens.titleFontLineHeight, notificationTokens.closeIconColor, notificationTokens.closeIconColorOnHover, notificationTokens.horizontalLayoutGap, notificationTokens.horizontalLayoutLeftIconMargin, notificationTokens.paddingOneLineTextbox)
|
10
|
+
"default": /*#__PURE__*/css(["", ":var(--text-secondary);", ":var(--surface-transparent-card);", ":0.75rem;", ":0.375rem;", ":0.125rem;", ":0.25rem;", ":0rem;", ":0.25rem;", ":0.25rem;", ":1rem;", ":0.1875rem;", ":0.125rem;", ":0.375rem;", ":0.125rem;", ":1.625rem;", ":0.25rem;", ":0.5rem;", ":0.5rem;", ":0.375rem;", ":1.5rem;", ":0.375rem;", ":0.5rem;", ":var(--plasma-typo-body-s-font-family);", ":var(--plasma-typo-body-s-font-size);", ":var(--plasma-typo-body-s-font-style);", ":var(--plasma-typo-body-s-font-weight);", ":var(--plasma-typo-body-s-letter-spacing);", ":var(--plasma-typo-body-s-line-height);", ":var(--plasma-typo-body-s-font-family);", ":var(--plasma-typo-body-s-font-size);", ":var(--plasma-typo-body-s-font-style);", ":var(--plasma-typo-body-s-bold-font-weight);", ":var(--plasma-typo-body-s-letter-spacing);", ":var(--plasma-typo-body-s-line-height);", ":var(--text-tertiary);", ":var(--text-primary);", ":0.375rem;", ":0.75rem;", ":0.8125rem 0.5rem 0.8125rem 0.875rem;"], notificationTokens.contentColor, notificationTokens.background, notificationTokens.borderRadius, notificationTokens.padding, notificationTokens.contentPaddingTop, notificationTokens.contentPaddingRight, notificationTokens.contentPaddingBottom, notificationTokens.contentPaddingLeft, notificationTokens.contentPaddingTopWithoutIcon, notificationTokens.horizontalLayoutRightPaddingWithoutCloseIcon, notificationTokens.textboxPaddingTop, notificationTokens.textboxPaddingRight, notificationTokens.textboxPaddingBottom, notificationTokens.textboxPaddingLeft, notificationTokens.textboxPaddingRightWithCloseIcon, notificationTokens.textboxGap, notificationTokens.closeIconTop, notificationTokens.closeIconRight, notificationTokens.buttonsMarginTop, notificationTokens.contentLeftIconSize, notificationTokens.contentLeftIconMargin, notificationTokens.contentTopIconMargin, notificationTokens.contentFontFamily, notificationTokens.contentFontSize, notificationTokens.contentFontStyle, notificationTokens.contentFontWeight, notificationTokens.contentFontLetterSpacing, notificationTokens.contentFontLineHeight, notificationTokens.titleFontFamily, notificationTokens.titleFontSize, notificationTokens.titleFontStyle, notificationTokens.titleFontWeight, notificationTokens.titleFontLetterSpacing, notificationTokens.titleFontLineHeight, notificationTokens.closeIconColor, notificationTokens.closeIconColorOnHover, notificationTokens.horizontalLayoutGap, notificationTokens.horizontalLayoutLeftIconMargin, notificationTokens.paddingOneLineTextbox)
|
15
11
|
},
|
16
12
|
layout: {
|
17
13
|
horizontal: /*#__PURE__*/css(["", ":25rem;", ":1rem 0.5rem 1rem 0.875rem;"], notificationTokens.width, notificationTokens.horizontalLayoutPadding),
|
package/styled-components/es/examples/plasma_b2c/components/Notification/Notification.stories.tsx
CHANGED
@@ -23,7 +23,6 @@ const texts = ['SSH ключ успешно скопирован', 'Нельзя
|
|
23
23
|
const size = ['xs', 'xxs'];
|
24
24
|
const iconPlacement = ['top', 'left'];
|
25
25
|
const notificationsPlacements = ['bottom-right', 'bottom-left'];
|
26
|
-
const views = ['default', 'negative', 'positive', 'warning', 'info'];
|
27
26
|
|
28
27
|
const longText = `JavaScript frameworks are an essential part of modern front-end web development,
|
29
28
|
providing developers with proven tools for building scalable, interactive web applications.
|
@@ -59,25 +58,14 @@ interface StoryDefaultProps {
|
|
59
58
|
closeIconType?: 'default' | 'thin';
|
60
59
|
iconPlacement: NotificationIconPlacement;
|
61
60
|
placement?: NotificationPlacement;
|
62
|
-
view: 'default';
|
63
61
|
}
|
64
62
|
|
65
|
-
const StoryDefault = ({
|
66
|
-
title,
|
67
|
-
children,
|
68
|
-
iconPlacement,
|
69
|
-
size,
|
70
|
-
layout,
|
71
|
-
showLeftIcon,
|
72
|
-
view,
|
73
|
-
...rest
|
74
|
-
}: StoryDefaultProps) => {
|
63
|
+
const StoryDefault = ({ title, children, iconPlacement, size, layout, showLeftIcon, ...rest }: StoryDefaultProps) => {
|
75
64
|
return (
|
76
65
|
<Notification
|
77
66
|
title={title}
|
78
|
-
icon={showLeftIcon ? <IconDisclosureRight
|
67
|
+
icon={showLeftIcon ? <IconDisclosureRight /> : ''}
|
79
68
|
iconPlacement={iconPlacement}
|
80
|
-
view={view}
|
81
69
|
actions={
|
82
70
|
<Button
|
83
71
|
text="text"
|
@@ -120,18 +108,6 @@ export const Default: StoryObj<StoryDefaultProps> = {
|
|
120
108
|
type: 'select',
|
121
109
|
},
|
122
110
|
},
|
123
|
-
view: {
|
124
|
-
options: views,
|
125
|
-
control: {
|
126
|
-
type: 'select',
|
127
|
-
},
|
128
|
-
},
|
129
|
-
textColor: {
|
130
|
-
control: 'color',
|
131
|
-
},
|
132
|
-
iconColor: {
|
133
|
-
control: 'color',
|
134
|
-
},
|
135
111
|
},
|
136
112
|
args: {
|
137
113
|
title: 'Title',
|
@@ -141,7 +117,6 @@ export const Default: StoryObj<StoryDefaultProps> = {
|
|
141
117
|
iconPlacement: 'top',
|
142
118
|
layout: 'vertical',
|
143
119
|
closeIconType: 'default',
|
144
|
-
view: 'default',
|
145
120
|
size: 'xs',
|
146
121
|
},
|
147
122
|
render: (args) => <StoryDefault {...args} />,
|
@@ -158,14 +133,7 @@ type StoryLiveDemoProps = ComponentProps<typeof Notification> & {
|
|
158
133
|
const StoryLiveDemo = ({ timeout, placement, ...rest }: StoryLiveDemoProps) => {
|
159
134
|
const count = useRef(0);
|
160
135
|
const handleClick = useCallback(() => {
|
161
|
-
addNotification(
|
162
|
-
{
|
163
|
-
icon: <IconDisclosureRight color="inherit" />,
|
164
|
-
...rest,
|
165
|
-
...getNotificationProps(count.current),
|
166
|
-
},
|
167
|
-
timeout,
|
168
|
-
);
|
136
|
+
addNotification({ icon: <IconDisclosureRight />, ...rest, ...getNotificationProps(count.current) }, timeout);
|
169
137
|
count.current++;
|
170
138
|
}, [count, rest]);
|
171
139
|
|
@@ -69,11 +69,11 @@ const StoryDemo = ({ context }) => {
|
|
69
69
|
|
70
70
|
return (
|
71
71
|
<>
|
72
|
-
{Object.entries(groupedTokens).map(([category,
|
72
|
+
{Object.entries(groupedTokens).map(([category, subcategories]) => (
|
73
73
|
<CategoryContainer key={category}>
|
74
74
|
<Category>{category}</Category>
|
75
75
|
<Accordion view="clear" size="s" stretching="filled" defaultActiveEventKey={[0]}>
|
76
|
-
{Object.entries(
|
76
|
+
{Object.entries(subcategories).map(([subcategory, subcategoryTokens], index) => (
|
77
77
|
<StyledAccordionItem
|
78
78
|
key={subcategory}
|
79
79
|
eventKey={index}
|
package/styled-components/es/examples/plasma_web/components/Notification/Notification.config.js
CHANGED
@@ -7,11 +7,7 @@ export var config = {
|
|
7
7
|
},
|
8
8
|
variations: {
|
9
9
|
view: {
|
10
|
-
"default": /*#__PURE__*/css(["", ":var(--text-
|
11
|
-
negative: /*#__PURE__*/css(["", ":var(--text-negative);", ":var(--text-negative);", ":var(--text-secondary);", ":var(--surface-transparent-card);", ":0.75rem;", ":0.375rem;", ":0.125rem;", ":0.25rem;", ":0rem;", ":0.25rem;", ":0.25rem;", ":1rem;", ":0.1875rem;", ":0.125rem;", ":0.375rem;", ":0.125rem;", ":1.625rem;", ":0.25rem;", ":0.5rem;", ":0.5rem;", ":0.375rem;", ":1.5rem;", ":0.375rem;", ":0.5rem;", ":var(--plasma-typo-body-s-font-family);", ":var(--plasma-typo-body-s-font-size);", ":var(--plasma-typo-body-s-font-style);", ":var(--plasma-typo-body-s-font-weight);", ":var(--plasma-typo-body-s-letter-spacing);", ":var(--plasma-typo-body-s-line-height);", ":var(--plasma-typo-body-s-font-family);", ":var(--plasma-typo-body-s-font-size);", ":var(--plasma-typo-body-s-font-style);", ":var(--plasma-typo-body-s-bold-font-weight);", ":var(--plasma-typo-body-s-letter-spacing);", ":var(--plasma-typo-body-s-line-height);", ":var(--text-tertiary);", ":var(--text-primary);", ":0.375rem;", ":0.75rem;", ":0.8125rem 0.5rem 0.8125rem 0.875rem;"], notificationTokens.titleColor, notificationTokens.contentLeftIconColor, notificationTokens.contentColor, notificationTokens.background, notificationTokens.borderRadius, notificationTokens.padding, notificationTokens.contentPaddingTop, notificationTokens.contentPaddingRight, notificationTokens.contentPaddingBottom, notificationTokens.contentPaddingLeft, notificationTokens.contentPaddingTopWithoutIcon, notificationTokens.horizontalLayoutRightPaddingWithoutCloseIcon, notificationTokens.textboxPaddingTop, notificationTokens.textboxPaddingRight, notificationTokens.textboxPaddingBottom, notificationTokens.textboxPaddingLeft, notificationTokens.textboxPaddingRightWithCloseIcon, notificationTokens.textboxGap, notificationTokens.closeIconTop, notificationTokens.closeIconRight, notificationTokens.buttonsMarginTop, notificationTokens.contentLeftIconSize, notificationTokens.contentLeftIconMargin, notificationTokens.contentTopIconMargin, notificationTokens.contentFontFamily, notificationTokens.contentFontSize, notificationTokens.contentFontStyle, notificationTokens.contentFontWeight, notificationTokens.contentFontLetterSpacing, notificationTokens.contentFontLineHeight, notificationTokens.titleFontFamily, notificationTokens.titleFontSize, notificationTokens.titleFontStyle, notificationTokens.titleFontWeight, notificationTokens.titleFontLetterSpacing, notificationTokens.titleFontLineHeight, notificationTokens.closeIconColor, notificationTokens.closeIconColorOnHover, notificationTokens.horizontalLayoutGap, notificationTokens.horizontalLayoutLeftIconMargin, notificationTokens.paddingOneLineTextbox),
|
12
|
-
positive: /*#__PURE__*/css(["", ":var(--text-positive);", ":var(--text-positive);", ":var(--text-secondary);", ":var(--surface-transparent-card);", ":0.75rem;", ":0.375rem;", ":0.125rem;", ":0.25rem;", ":0rem;", ":0.25rem;", ":0.25rem;", ":1rem;", ":0.1875rem;", ":0.125rem;", ":0.375rem;", ":0.125rem;", ":1.625rem;", ":0.25rem;", ":0.5rem;", ":0.5rem;", ":0.375rem;", ":1.5rem;", ":0.375rem;", ":0.5rem;", ":var(--plasma-typo-body-s-font-family);", ":var(--plasma-typo-body-s-font-size);", ":var(--plasma-typo-body-s-font-style);", ":var(--plasma-typo-body-s-font-weight);", ":var(--plasma-typo-body-s-letter-spacing);", ":var(--plasma-typo-body-s-line-height);", ":var(--plasma-typo-body-s-font-family);", ":var(--plasma-typo-body-s-font-size);", ":var(--plasma-typo-body-s-font-style);", ":var(--plasma-typo-body-s-bold-font-weight);", ":var(--plasma-typo-body-s-letter-spacing);", ":var(--plasma-typo-body-s-line-height);", ":var(--text-tertiary);", ":var(--text-primary);", ":0.375rem;", ":0.75rem;", ":0.8125rem 0.5rem 0.8125rem 0.875rem;"], notificationTokens.titleColor, notificationTokens.contentLeftIconColor, notificationTokens.contentColor, notificationTokens.background, notificationTokens.borderRadius, notificationTokens.padding, notificationTokens.contentPaddingTop, notificationTokens.contentPaddingRight, notificationTokens.contentPaddingBottom, notificationTokens.contentPaddingLeft, notificationTokens.contentPaddingTopWithoutIcon, notificationTokens.horizontalLayoutRightPaddingWithoutCloseIcon, notificationTokens.textboxPaddingTop, notificationTokens.textboxPaddingRight, notificationTokens.textboxPaddingBottom, notificationTokens.textboxPaddingLeft, notificationTokens.textboxPaddingRightWithCloseIcon, notificationTokens.textboxGap, notificationTokens.closeIconTop, notificationTokens.closeIconRight, notificationTokens.buttonsMarginTop, notificationTokens.contentLeftIconSize, notificationTokens.contentLeftIconMargin, notificationTokens.contentTopIconMargin, notificationTokens.contentFontFamily, notificationTokens.contentFontSize, notificationTokens.contentFontStyle, notificationTokens.contentFontWeight, notificationTokens.contentFontLetterSpacing, notificationTokens.contentFontLineHeight, notificationTokens.titleFontFamily, notificationTokens.titleFontSize, notificationTokens.titleFontStyle, notificationTokens.titleFontWeight, notificationTokens.titleFontLetterSpacing, notificationTokens.titleFontLineHeight, notificationTokens.closeIconColor, notificationTokens.closeIconColorOnHover, notificationTokens.horizontalLayoutGap, notificationTokens.horizontalLayoutLeftIconMargin, notificationTokens.paddingOneLineTextbox),
|
13
|
-
warning: /*#__PURE__*/css(["", ":var(--text-warning);", ":var(--text-warning);", ":var(--text-secondary);", ":var(--surface-transparent-card);", ":0.75rem;", ":0.375rem;", ":0.125rem;", ":0.25rem;", ":0rem;", ":0.25rem;", ":0.25rem;", ":1rem;", ":0.1875rem;", ":0.125rem;", ":0.375rem;", ":0.125rem;", ":1.625rem;", ":0.25rem;", ":0.5rem;", ":0.5rem;", ":0.375rem;", ":1.5rem;", ":0.375rem;", ":0.5rem;", ":var(--plasma-typo-body-s-font-family);", ":var(--plasma-typo-body-s-font-size);", ":var(--plasma-typo-body-s-font-style);", ":var(--plasma-typo-body-s-font-weight);", ":var(--plasma-typo-body-s-letter-spacing);", ":var(--plasma-typo-body-s-line-height);", ":var(--plasma-typo-body-s-font-family);", ":var(--plasma-typo-body-s-font-size);", ":var(--plasma-typo-body-s-font-style);", ":var(--plasma-typo-body-s-bold-font-weight);", ":var(--plasma-typo-body-s-letter-spacing);", ":var(--plasma-typo-body-s-line-height);", ":var(--text-tertiary);", ":var(--text-primary);", ":0.375rem;", ":0.75rem;", ":0.8125rem 0.5rem 0.8125rem 0.875rem;"], notificationTokens.titleColor, notificationTokens.contentLeftIconColor, notificationTokens.contentColor, notificationTokens.background, notificationTokens.borderRadius, notificationTokens.padding, notificationTokens.contentPaddingTop, notificationTokens.contentPaddingRight, notificationTokens.contentPaddingBottom, notificationTokens.contentPaddingLeft, notificationTokens.contentPaddingTopWithoutIcon, notificationTokens.horizontalLayoutRightPaddingWithoutCloseIcon, notificationTokens.textboxPaddingTop, notificationTokens.textboxPaddingRight, notificationTokens.textboxPaddingBottom, notificationTokens.textboxPaddingLeft, notificationTokens.textboxPaddingRightWithCloseIcon, notificationTokens.textboxGap, notificationTokens.closeIconTop, notificationTokens.closeIconRight, notificationTokens.buttonsMarginTop, notificationTokens.contentLeftIconSize, notificationTokens.contentLeftIconMargin, notificationTokens.contentTopIconMargin, notificationTokens.contentFontFamily, notificationTokens.contentFontSize, notificationTokens.contentFontStyle, notificationTokens.contentFontWeight, notificationTokens.contentFontLetterSpacing, notificationTokens.contentFontLineHeight, notificationTokens.titleFontFamily, notificationTokens.titleFontSize, notificationTokens.titleFontStyle, notificationTokens.titleFontWeight, notificationTokens.titleFontLetterSpacing, notificationTokens.titleFontLineHeight, notificationTokens.closeIconColor, notificationTokens.closeIconColorOnHover, notificationTokens.horizontalLayoutGap, notificationTokens.horizontalLayoutLeftIconMargin, notificationTokens.paddingOneLineTextbox),
|
14
|
-
info: /*#__PURE__*/css(["", ":var(--text-info);", ":var(--text-info);", ":var(--text-secondary);", ":var(--surface-transparent-card);", ":0.75rem;", ":0.375rem;", ":0.125rem;", ":0.25rem;", ":0rem;", ":0.25rem;", ":0.25rem;", ":1rem;", ":0.1875rem;", ":0.125rem;", ":0.375rem;", ":0.125rem;", ":1.625rem;", ":0.25rem;", ":0.5rem;", ":0.5rem;", ":0.375rem;", ":1.5rem;", ":0.375rem;", ":0.5rem;", ":var(--plasma-typo-body-s-font-family);", ":var(--plasma-typo-body-s-font-size);", ":var(--plasma-typo-body-s-font-style);", ":var(--plasma-typo-body-s-font-weight);", ":var(--plasma-typo-body-s-letter-spacing);", ":var(--plasma-typo-body-s-line-height);", ":var(--plasma-typo-body-s-font-family);", ":var(--plasma-typo-body-s-font-size);", ":var(--plasma-typo-body-s-font-style);", ":var(--plasma-typo-body-s-bold-font-weight);", ":var(--plasma-typo-body-s-letter-spacing);", ":var(--plasma-typo-body-s-line-height);", ":var(--text-tertiary);", ":var(--text-primary);", ":0.375rem;", ":0.75rem;", ":0.8125rem 0.5rem 0.8125rem 0.875rem;"], notificationTokens.titleColor, notificationTokens.contentLeftIconColor, notificationTokens.contentColor, notificationTokens.background, notificationTokens.borderRadius, notificationTokens.padding, notificationTokens.contentPaddingTop, notificationTokens.contentPaddingRight, notificationTokens.contentPaddingBottom, notificationTokens.contentPaddingLeft, notificationTokens.contentPaddingTopWithoutIcon, notificationTokens.horizontalLayoutRightPaddingWithoutCloseIcon, notificationTokens.textboxPaddingTop, notificationTokens.textboxPaddingRight, notificationTokens.textboxPaddingBottom, notificationTokens.textboxPaddingLeft, notificationTokens.textboxPaddingRightWithCloseIcon, notificationTokens.textboxGap, notificationTokens.closeIconTop, notificationTokens.closeIconRight, notificationTokens.buttonsMarginTop, notificationTokens.contentLeftIconSize, notificationTokens.contentLeftIconMargin, notificationTokens.contentTopIconMargin, notificationTokens.contentFontFamily, notificationTokens.contentFontSize, notificationTokens.contentFontStyle, notificationTokens.contentFontWeight, notificationTokens.contentFontLetterSpacing, notificationTokens.contentFontLineHeight, notificationTokens.titleFontFamily, notificationTokens.titleFontSize, notificationTokens.titleFontStyle, notificationTokens.titleFontWeight, notificationTokens.titleFontLetterSpacing, notificationTokens.titleFontLineHeight, notificationTokens.closeIconColor, notificationTokens.closeIconColorOnHover, notificationTokens.horizontalLayoutGap, notificationTokens.horizontalLayoutLeftIconMargin, notificationTokens.paddingOneLineTextbox)
|
10
|
+
"default": /*#__PURE__*/css(["", ":var(--text-secondary);", ":var(--surface-transparent-card);", ":0.75rem;", ":0.375rem;", ":0.125rem;", ":0.25rem;", ":0rem;", ":0.25rem;", ":0.25rem;", ":1rem;", ":0.1875rem;", ":0.125rem;", ":0.375rem;", ":0.125rem;", ":1.625rem;", ":0.25rem;", ":0.5rem;", ":0.5rem;", ":0.375rem;", ":1.5rem;", ":0.375rem;", ":0.5rem;", ":var(--plasma-typo-body-s-font-family);", ":var(--plasma-typo-body-s-font-size);", ":var(--plasma-typo-body-s-font-style);", ":var(--plasma-typo-body-s-font-weight);", ":var(--plasma-typo-body-s-letter-spacing);", ":var(--plasma-typo-body-s-line-height);", ":var(--plasma-typo-body-s-font-family);", ":var(--plasma-typo-body-s-font-size);", ":var(--plasma-typo-body-s-font-style);", ":var(--plasma-typo-body-s-bold-font-weight);", ":var(--plasma-typo-body-s-letter-spacing);", ":var(--plasma-typo-body-s-line-height);", ":var(--text-tertiary);", ":var(--text-primary);", ":0.375rem;", ":0.75rem;", ":0.8125rem 0.5rem 0.8125rem 0.875rem;"], notificationTokens.contentColor, notificationTokens.background, notificationTokens.borderRadius, notificationTokens.padding, notificationTokens.contentPaddingTop, notificationTokens.contentPaddingRight, notificationTokens.contentPaddingBottom, notificationTokens.contentPaddingLeft, notificationTokens.contentPaddingTopWithoutIcon, notificationTokens.horizontalLayoutRightPaddingWithoutCloseIcon, notificationTokens.textboxPaddingTop, notificationTokens.textboxPaddingRight, notificationTokens.textboxPaddingBottom, notificationTokens.textboxPaddingLeft, notificationTokens.textboxPaddingRightWithCloseIcon, notificationTokens.textboxGap, notificationTokens.closeIconTop, notificationTokens.closeIconRight, notificationTokens.buttonsMarginTop, notificationTokens.contentLeftIconSize, notificationTokens.contentLeftIconMargin, notificationTokens.contentTopIconMargin, notificationTokens.contentFontFamily, notificationTokens.contentFontSize, notificationTokens.contentFontStyle, notificationTokens.contentFontWeight, notificationTokens.contentFontLetterSpacing, notificationTokens.contentFontLineHeight, notificationTokens.titleFontFamily, notificationTokens.titleFontSize, notificationTokens.titleFontStyle, notificationTokens.titleFontWeight, notificationTokens.titleFontLetterSpacing, notificationTokens.titleFontLineHeight, notificationTokens.closeIconColor, notificationTokens.closeIconColorOnHover, notificationTokens.horizontalLayoutGap, notificationTokens.horizontalLayoutLeftIconMargin, notificationTokens.paddingOneLineTextbox)
|
15
11
|
},
|
16
12
|
layout: {
|
17
13
|
horizontal: /*#__PURE__*/css(["", ":25rem;", ":1rem 0.5rem 1rem 0.875rem;"], notificationTokens.width, notificationTokens.horizontalLayoutPadding),
|
package/styled-components/es/examples/plasma_web/components/Notification/Notification.stories.tsx
CHANGED
@@ -23,7 +23,6 @@ const texts = ['SSH ключ успешно скопирован', 'Нельзя
|
|
23
23
|
const size = ['xs', 'xxs'];
|
24
24
|
const iconPlacement = ['top', 'left'];
|
25
25
|
const notificationsPlacements = ['bottom-right', 'bottom-left'];
|
26
|
-
const views = ['default', 'negative', 'positive', 'warning', 'info'];
|
27
26
|
|
28
27
|
const longText = `JavaScript frameworks are an essential part of modern front-end web development,
|
29
28
|
providing developers with proven tools for building scalable, interactive web applications.
|
@@ -65,7 +64,7 @@ const StoryDefault = ({ title, children, iconPlacement, size, layout, showLeftIc
|
|
65
64
|
return (
|
66
65
|
<Notification
|
67
66
|
title={title}
|
68
|
-
icon={showLeftIcon ? <IconDisclosureRight
|
67
|
+
icon={showLeftIcon ? <IconDisclosureRight /> : ''}
|
69
68
|
iconPlacement={iconPlacement}
|
70
69
|
actions={
|
71
70
|
<Button
|
@@ -109,18 +108,6 @@ export const Default: StoryObj<StoryDefaultProps> = {
|
|
109
108
|
type: 'select',
|
110
109
|
},
|
111
110
|
},
|
112
|
-
view: {
|
113
|
-
options: views,
|
114
|
-
control: {
|
115
|
-
type: 'select',
|
116
|
-
},
|
117
|
-
},
|
118
|
-
textColor: {
|
119
|
-
control: 'color',
|
120
|
-
},
|
121
|
-
iconColor: {
|
122
|
-
control: 'color',
|
123
|
-
},
|
124
111
|
},
|
125
112
|
args: {
|
126
113
|
title: 'Title',
|
@@ -146,10 +133,7 @@ type StoryLiveDemoProps = ComponentProps<typeof Notification> & {
|
|
146
133
|
const StoryLiveDemo = ({ timeout, placement, ...rest }: StoryLiveDemoProps) => {
|
147
134
|
const count = useRef(0);
|
148
135
|
const handleClick = useCallback(() => {
|
149
|
-
addNotification(
|
150
|
-
{ icon: <IconDisclosureRight color="inherit" />, ...rest, ...getNotificationProps(count.current) },
|
151
|
-
timeout,
|
152
|
-
);
|
136
|
+
addNotification({ icon: <IconDisclosureRight />, ...rest, ...getNotificationProps(count.current) }, timeout);
|
153
137
|
count.current++;
|
154
138
|
}, [count, rest]);
|
155
139
|
|
@@ -69,11 +69,11 @@ const StoryDemo = ({ context }) => {
|
|
69
69
|
|
70
70
|
return (
|
71
71
|
<>
|
72
|
-
{Object.entries(groupedTokens).map(([category,
|
72
|
+
{Object.entries(groupedTokens).map(([category, subcategories]) => (
|
73
73
|
<CategoryContainer key={category}>
|
74
74
|
<Category>{category}</Category>
|
75
75
|
<Accordion view="clear" size="s" stretching="filled" defaultActiveEventKey={[0]}>
|
76
|
-
{Object.entries(
|
76
|
+
{Object.entries(subcategories).map(([subcategory, subcategoryTokens], index) => (
|
77
77
|
<StyledAccordionItem
|
78
78
|
key={subcategory}
|
79
79
|
eventKey={index}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Notification.d.ts","sourceRoot":"","sources":["../../../src/components/Notification/Notification.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAEnD,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAU1C,OAAO,EAAsB,iBAAiB,EAAW,MAAM,sBAAsB,CAAC;AActF;;GAEG;AACH,eAAO,MAAM,gBAAgB,SAAU,UAAU,cAAc,EAAE,KAAK,iBAAiB,EAAE,OAAO,CAAC,CAAC,
|
1
|
+
{"version":3,"file":"Notification.d.ts","sourceRoot":"","sources":["../../../src/components/Notification/Notification.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAEnD,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAU1C,OAAO,EAAsB,iBAAiB,EAAW,MAAM,sBAAsB,CAAC;AActF;;GAEG;AACH,eAAO,MAAM,gBAAgB,SAAU,UAAU,cAAc,EAAE,KAAK,iBAAiB,EAAE,OAAO,CAAC,CAAC,6FA8F5F,CAAC;AAEP,eAAO,MAAM,kBAAkB;;;mBAhGQ,UAAU,cAAc,EAAE,KAAK,iBAAiB,EAAE,OAAO,CAAC,CAAC;;;;;;;;;;;;;;;;;;;;;;CAyHjG,CAAC"}
|
@@ -46,14 +46,10 @@ export declare const CloseIconWrapper: import("@linaria/react").StyledMeta & imp
|
|
46
46
|
} & import("react").RefAttributes<HTMLButtonElement>))>;
|
47
47
|
export declare const Wrapper: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
48
48
|
export declare const ButtonsWrapper: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & IconPlacementType>;
|
49
|
-
export declare const IconWrapper: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & IconPlacementType
|
50
|
-
iconColor?: string | undefined;
|
51
|
-
}>;
|
49
|
+
export declare const IconWrapper: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & IconPlacementType>;
|
52
50
|
export declare const ContentBox: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & IconPlacementType>;
|
53
51
|
export declare const TextBox: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & CloseIconType & IconPlacementType>;
|
54
|
-
export declare const StyledTitle: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> &
|
55
|
-
textColor?: string | undefined;
|
56
|
-
}>;
|
52
|
+
export declare const StyledTitle: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
57
53
|
export declare const StyledContent: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
58
54
|
export declare const StyledItemWrapper: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
|
59
55
|
isHidden: boolean;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Notification.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Notification/Notification.styles.ts"],"names":[],"mappings":";AAQA,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,qBAAqB,EAAc,MAAM,sBAAsB,CAAC;AAE3G,eAAO,MAAM,kBAAkB,0CAE9B,CAAC;AAKF,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uDAe5B,CAAC;AAEF,eAAO,MAAM,OAAO,qKAanB,CAAC;AAEF,eAAO,MAAM,cAAc,gKAW1B,CAAC;AAEF,eAAO,MAAM,WAAW
|
1
|
+
{"version":3,"file":"Notification.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Notification/Notification.styles.ts"],"names":[],"mappings":";AAQA,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,qBAAqB,EAAc,MAAM,sBAAsB,CAAC;AAE3G,eAAO,MAAM,kBAAkB,0CAE9B,CAAC;AAKF,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uDAe5B,CAAC;AAEF,eAAO,MAAM,OAAO,qKAanB,CAAC;AAEF,eAAO,MAAM,cAAc,gKAW1B,CAAC;AAEF,eAAO,MAAM,WAAW,gKAcvB,CAAC;AAEF,eAAO,MAAM,UAAU,gKActB,CAAC;AAEF,eAAO,MAAM,OAAO,gLAqBnB,CAAC;AAEF,eAAO,MAAM,WAAW,qKAQvB,CAAC;AAEF,eAAO,MAAM,aAAa,qKAUzB,CAAC;AAEF,eAAO,MAAM,iBAAiB;cAA0B,OAAO;EAmE9D,CAAC;AAEF,eAAO,MAAM,UAAU;;EAOtB,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Notification.tokens.d.ts","sourceRoot":"","sources":["../../../src/components/Notification/Notification.tokens.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;CAmBnB,CAAC;AAEF,eAAO,MAAM,MAAM
|
1
|
+
{"version":3,"file":"Notification.tokens.d.ts","sourceRoot":"","sources":["../../../src/components/Notification/Notification.tokens.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;CAmBnB,CAAC;AAEF,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiElB,CAAC"}
|
@@ -78,14 +78,6 @@ export interface NotificationProps extends AsProps, Omit<HTMLAttributes<HTMLDivE
|
|
78
78
|
* @description Только для применения в рамках SSR.
|
79
79
|
*/
|
80
80
|
UNSAFE_SSR_ENABLED?: boolean;
|
81
|
-
/**
|
82
|
-
* Цвет текста (по умолчанию берётся цвет из view)
|
83
|
-
*/
|
84
|
-
textColor?: string;
|
85
|
-
/**
|
86
|
-
* Цвет иконки (по умолчанию берётся цвет из view)
|
87
|
-
*/
|
88
|
-
iconColor?: string;
|
89
81
|
}
|
90
82
|
export interface NotificationPortalProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
|
91
83
|
/**
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Notification.types.d.ts","sourceRoot":"","sources":["../../../src/components/Notification/Notification.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElD,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAE3E,eAAO,MAAM,OAAO;;;CAGnB,CAAC;AAEF,oBAAY,kBAAkB,GAAG,MAAM,OAAO,OAAO,CAAC;AAEtD,eAAO,MAAM,UAAU;;;CAGtB,CAAC;AAEF,oBAAY,yBAAyB,GAAG,MAAM,OAAO,UAAU,CAAC;AAChE,oBAAY,qBAAqB,GAAG,cAAc,GAAG,aAAa,CAAC;AAEnE,oBAAY,UAAU,GAAG;IACrB,MAAM,CAAC,EAAE,kBAAkB,CAAC;CAC/B,CAAC;AAEF,oBAAY,iBAAiB,GAAG;IAC5B,aAAa,CAAC,EAAE,yBAAyB,CAAC;CAC7C,CAAC;AAEF,oBAAY,aAAa,GAAG;IACxB,aAAa,CAAC,EAAE,OAAO,CAAC;CAC3B,CAAC;AAEF,MAAM,WAAW,iBAAkB,SAAQ,OAAO,EAAE,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC;IAC7F;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;OAEG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,MAAM,CAAC,EAAE,kBAAkB,CAAC;IAC5B;;OAEG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB;;OAEG;IACH,aAAa,CAAC,EAAE,yBAAyB,CAAC;IAC1C;;;;OAIG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;OAEG;IACH,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAC;IAChC;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,aAAa,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC;IACnC;;OAEG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;
|
1
|
+
{"version":3,"file":"Notification.types.d.ts","sourceRoot":"","sources":["../../../src/components/Notification/Notification.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElD,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAE3E,eAAO,MAAM,OAAO;;;CAGnB,CAAC;AAEF,oBAAY,kBAAkB,GAAG,MAAM,OAAO,OAAO,CAAC;AAEtD,eAAO,MAAM,UAAU;;;CAGtB,CAAC;AAEF,oBAAY,yBAAyB,GAAG,MAAM,OAAO,UAAU,CAAC;AAChE,oBAAY,qBAAqB,GAAG,cAAc,GAAG,aAAa,CAAC;AAEnE,oBAAY,UAAU,GAAG;IACrB,MAAM,CAAC,EAAE,kBAAkB,CAAC;CAC/B,CAAC;AAEF,oBAAY,iBAAiB,GAAG;IAC5B,aAAa,CAAC,EAAE,yBAAyB,CAAC;CAC7C,CAAC;AAEF,oBAAY,aAAa,GAAG;IACxB,aAAa,CAAC,EAAE,OAAO,CAAC;CAC3B,CAAC;AAEF,MAAM,WAAW,iBAAkB,SAAQ,OAAO,EAAE,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC;IAC7F;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;OAEG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,MAAM,CAAC,EAAE,kBAAkB,CAAC;IAC5B;;OAEG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB;;OAEG;IACH,aAAa,CAAC,EAAE,yBAAyB,CAAC;IAC1C;;;;OAIG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;OAEG;IACH,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAC;IAChC;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,aAAa,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC;IACnC;;OAEG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAChC;AAED,MAAM,WAAW,uBAAwB,SAAQ,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,OAAO,CAAC;IAC1F;;OAEG;IACH,MAAM,EAAE,eAAe,CAAC,MAAM,EAAE,QAAQ,EAAE,SAAS,CAAC,QAAQ,CAAC,EAAE,iBAAiB,GAAG,cAAc,CAAC,cAAc,CAAC,CAAC,CAAC;IACnH;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,SAAS,CAAC,EAAE,qBAAqB,CAAC;IAClC;;OAEG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAChC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"NotificationsPortal.d.ts","sourceRoot":"","sources":["../../../src/components/Notification/NotificationsPortal.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAqD,MAAM,OAAO,CAAC;AAUrF,OAAO,EAAE,uBAAuB,EAAqB,MAAM,sBAAsB,CAAC;AAalF;;GAEG;AACH,eAAO,MAAM,mBAAmB,EAAE,EAAE,CAAC,uBAAuB,
|
1
|
+
{"version":3,"file":"NotificationsPortal.d.ts","sourceRoot":"","sources":["../../../src/components/Notification/NotificationsPortal.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAqD,MAAM,OAAO,CAAC;AAUrF,OAAO,EAAE,uBAAuB,EAAqB,MAAM,sBAAsB,CAAC;AAalF;;GAEG;AACH,eAAO,MAAM,mBAAmB,EAAE,EAAE,CAAC,uBAAuB,CAwC3D,CAAC"}
|
@@ -6,10 +6,6 @@ export declare const config: {
|
|
6
6
|
variations: {
|
7
7
|
view: {
|
8
8
|
default: import("@linaria/core").LinariaClassName;
|
9
|
-
negative: import("@linaria/core").LinariaClassName;
|
10
|
-
positive: import("@linaria/core").LinariaClassName;
|
11
|
-
warning: import("@linaria/core").LinariaClassName;
|
12
|
-
info: import("@linaria/core").LinariaClassName;
|
13
9
|
};
|
14
10
|
layout: {
|
15
11
|
horizontal: import("@linaria/core").LinariaClassName;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Notification.config.d.ts","sourceRoot":"","sources":["../../../../../src/examples/plasma_b2c/components/Notification/Notification.config.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,MAAM
|
1
|
+
{"version":3,"file":"Notification.config.d.ts","sourceRoot":"","sources":["../../../../../src/examples/plasma_b2c/components/Notification/Notification.config.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;CA+GlB,CAAC"}
|
@@ -6,10 +6,6 @@ export declare const config: {
|
|
6
6
|
variations: {
|
7
7
|
view: {
|
8
8
|
default: import("@linaria/core").LinariaClassName;
|
9
|
-
negative: import("@linaria/core").LinariaClassName;
|
10
|
-
positive: import("@linaria/core").LinariaClassName;
|
11
|
-
warning: import("@linaria/core").LinariaClassName;
|
12
|
-
info: import("@linaria/core").LinariaClassName;
|
13
9
|
};
|
14
10
|
layout: {
|
15
11
|
horizontal: import("@linaria/core").LinariaClassName;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Notification.config.d.ts","sourceRoot":"","sources":["../../../../../src/examples/plasma_web/components/Notification/Notification.config.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,MAAM
|
1
|
+
{"version":3,"file":"Notification.config.d.ts","sourceRoot":"","sources":["../../../../../src/examples/plasma_web/components/Notification/Notification.config.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;CA+GlB,CAAC"}
|