@salutejs/plasma-new-hope 0.176.1-canary.1510.11572230988.0 → 0.176.1-canary.1517.11571952534.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 +2 -2
- package/cjs/components/Notification/Notification.js.map +1 -1
- package/cjs/components/Notification/Notification.styles.js +2 -11
- package/cjs/components/Notification/Notification.styles.js.map +1 -1
- package/cjs/components/Notification/{Notification.styles_e6274r.css → Notification.styles_7h8hp0.css} +2 -2
- package/cjs/components/Notification/Notification.tokens.js +1 -2
- 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 +4 -8
- package/cjs/components/Notification/NotificationsPortal.js.map +1 -1
- package/cjs/components/Notification/NotificationsProvider.css +11 -11
- package/cjs/components/Notification/NotificationsProvider.js +1 -3
- package/cjs/components/Notification/NotificationsProvider.js.map +1 -1
- package/cjs/components/Pagination/Pagination.css +12 -12
- package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +12 -12
- package/cjs/components/Select/Select.css +12 -12
- package/cjs/components/Select/Select.tokens.js +1 -2
- package/cjs/components/Select/Select.tokens.js.map +1 -1
- package/cjs/components/Select/ui/Inner/Inner.css +12 -12
- package/cjs/components/Select/ui/Inner/ui/Item/Item.css +12 -12
- package/cjs/components/Select/ui/Target/Target.css +12 -12
- package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.css +12 -12
- package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +1 -1
- package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.styles.js.map +1 -1
- package/{es/components/Select/ui/Target/ui/Textfield/Textfield.styles_jzeap2.css → cjs/components/Select/ui/Target/ui/Textfield/Textfield.styles_11yj58s.css} +1 -1
- package/cjs/components/Steps/Steps.css +9 -9
- package/cjs/components/Steps/Steps.tokens.js +1 -0
- package/cjs/components/Steps/Steps.tokens.js.map +1 -1
- package/cjs/components/Steps/ui/StepItem/StepItem.css +9 -9
- package/cjs/components/Steps/ui/StepItem/StepItem.js +29 -7
- package/cjs/components/Steps/ui/StepItem/StepItem.js.map +1 -1
- package/cjs/components/Steps/ui/StepItem/StepItem.styles.js +6 -6
- package/cjs/components/Steps/ui/StepItem/StepItem.styles.js.map +1 -1
- package/cjs/components/Steps/ui/StepItem/StepItem.styles_1oh5gqm.css +9 -0
- package/cjs/index.css +31 -31
- package/cjs/index.js +1 -1
- package/emotion/cjs/components/Notification/Notification.js +2 -2
- package/emotion/cjs/components/Notification/Notification.styles.js +19 -14
- package/emotion/cjs/components/Notification/Notification.template-doc.mdx +8 -17
- package/emotion/cjs/components/Notification/Notification.tokens.js +1 -2
- package/emotion/cjs/components/Notification/NotificationsPortal.js +5 -9
- package/emotion/cjs/components/Notification/NotificationsProvider.js +1 -3
- package/emotion/cjs/components/Notification/index.js +4 -4
- package/emotion/cjs/components/Select/Select.tokens.js +1 -2
- package/emotion/cjs/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +21 -12
- package/emotion/cjs/components/Steps/Steps.tokens.js +1 -0
- package/emotion/cjs/components/Steps/ui/StepItem/StepItem.js +29 -7
- package/emotion/cjs/components/Steps/ui/StepItem/StepItem.styles.js +17 -11
- package/emotion/cjs/examples/plasma_b2c/components/Notification/Notification.js +3 -5
- package/emotion/cjs/examples/plasma_b2c/components/Notification/Notification.stories.tsx +4 -25
- package/emotion/cjs/examples/plasma_b2c/components/Steps/Steps.config.js +5 -5
- package/emotion/cjs/examples/plasma_b2c/components/Steps/Steps.stories.tsx +1 -1
- package/emotion/cjs/examples/plasma_web/components/Notification/Notification.js +3 -5
- package/emotion/cjs/examples/plasma_web/components/Notification/Notification.stories.tsx +4 -25
- package/emotion/cjs/examples/plasma_web/components/Steps/Steps.config.js +5 -5
- package/emotion/cjs/examples/plasma_web/components/Steps/Steps.stories.tsx +1 -1
- package/emotion/es/components/Notification/Notification.js +1 -1
- package/emotion/es/components/Notification/Notification.styles.js +19 -14
- package/emotion/es/components/Notification/Notification.template-doc.mdx +8 -17
- package/emotion/es/components/Notification/Notification.tokens.js +1 -2
- package/emotion/es/components/Notification/NotificationsPortal.js +5 -9
- package/emotion/es/components/Notification/NotificationsProvider.js +1 -3
- package/emotion/es/components/Notification/index.js +1 -1
- package/emotion/es/components/Select/Select.tokens.js +1 -2
- package/emotion/es/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +21 -12
- package/emotion/es/components/Steps/Steps.tokens.js +1 -0
- package/emotion/es/components/Steps/ui/StepItem/StepItem.js +29 -7
- package/emotion/es/components/Steps/ui/StepItem/StepItem.styles.js +17 -11
- package/emotion/es/examples/plasma_b2c/components/Notification/Notification.js +4 -6
- package/emotion/es/examples/plasma_b2c/components/Notification/Notification.stories.tsx +4 -25
- package/emotion/es/examples/plasma_b2c/components/Steps/Steps.config.js +5 -5
- package/emotion/es/examples/plasma_b2c/components/Steps/Steps.stories.tsx +1 -1
- package/emotion/es/examples/plasma_web/components/Notification/Notification.js +4 -6
- package/emotion/es/examples/plasma_web/components/Notification/Notification.stories.tsx +4 -25
- package/emotion/es/examples/plasma_web/components/Steps/Steps.config.js +5 -5
- package/emotion/es/examples/plasma_web/components/Steps/Steps.stories.tsx +1 -1
- package/es/components/Notification/Notification.css +11 -11
- package/es/components/Notification/Notification.js +2 -2
- package/es/components/Notification/Notification.js.map +1 -1
- package/es/components/Notification/Notification.styles.js +2 -11
- package/es/components/Notification/Notification.styles.js.map +1 -1
- package/es/components/Notification/{Notification.styles_e6274r.css → Notification.styles_7h8hp0.css} +2 -2
- package/es/components/Notification/Notification.tokens.js +1 -2
- 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 +4 -8
- package/es/components/Notification/NotificationsPortal.js.map +1 -1
- package/es/components/Notification/NotificationsProvider.css +11 -11
- package/es/components/Notification/NotificationsProvider.js +1 -3
- package/es/components/Notification/NotificationsProvider.js.map +1 -1
- package/es/components/Pagination/Pagination.css +12 -12
- package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +12 -12
- package/es/components/Select/Select.css +12 -12
- package/es/components/Select/Select.tokens.js +1 -2
- package/es/components/Select/Select.tokens.js.map +1 -1
- package/es/components/Select/ui/Inner/Inner.css +12 -12
- package/es/components/Select/ui/Inner/ui/Item/Item.css +12 -12
- package/es/components/Select/ui/Target/Target.css +12 -12
- package/es/components/Select/ui/Target/ui/Textfield/Textfield.css +12 -12
- package/es/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +1 -1
- package/es/components/Select/ui/Target/ui/Textfield/Textfield.styles.js.map +1 -1
- package/{cjs/components/Select/ui/Target/ui/Textfield/Textfield.styles_jzeap2.css → es/components/Select/ui/Target/ui/Textfield/Textfield.styles_11yj58s.css} +1 -1
- package/es/components/Steps/Steps.css +9 -9
- package/es/components/Steps/Steps.tokens.js +1 -0
- package/es/components/Steps/Steps.tokens.js.map +1 -1
- package/es/components/Steps/ui/StepItem/StepItem.css +9 -9
- package/es/components/Steps/ui/StepItem/StepItem.js +30 -8
- package/es/components/Steps/ui/StepItem/StepItem.js.map +1 -1
- package/es/components/Steps/ui/StepItem/StepItem.styles.js +6 -6
- package/es/components/Steps/ui/StepItem/StepItem.styles.js.map +1 -1
- package/es/components/Steps/ui/StepItem/StepItem.styles_1oh5gqm.css +9 -0
- package/es/index.css +31 -31
- package/es/index.js +1 -1
- package/package.json +2 -2
- package/styled-components/cjs/components/Notification/Notification.js +2 -2
- package/styled-components/cjs/components/Notification/Notification.styles.js +2 -5
- package/styled-components/cjs/components/Notification/Notification.template-doc.mdx +8 -17
- package/styled-components/cjs/components/Notification/Notification.tokens.js +1 -2
- package/styled-components/cjs/components/Notification/NotificationsPortal.js +4 -8
- package/styled-components/cjs/components/Notification/NotificationsProvider.js +1 -3
- package/styled-components/cjs/components/Notification/index.js +4 -4
- package/styled-components/cjs/components/Select/Select.tokens.js +1 -2
- package/styled-components/cjs/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +1 -1
- package/styled-components/cjs/components/Steps/Steps.tokens.js +1 -0
- package/styled-components/cjs/components/Steps/ui/StepItem/StepItem.js +29 -7
- package/styled-components/cjs/components/Steps/ui/StepItem/StepItem.styles.js +12 -6
- package/styled-components/cjs/examples/plasma_b2c/components/Notification/Notification.js +3 -5
- package/styled-components/cjs/examples/plasma_b2c/components/Notification/Notification.stories.tsx +4 -25
- package/styled-components/cjs/examples/plasma_b2c/components/Steps/Steps.config.js +1 -1
- package/styled-components/cjs/examples/plasma_b2c/components/Steps/Steps.stories.tsx +1 -1
- package/styled-components/cjs/examples/plasma_web/components/Notification/Notification.js +3 -5
- package/styled-components/cjs/examples/plasma_web/components/Notification/Notification.stories.tsx +4 -25
- package/styled-components/cjs/examples/plasma_web/components/Steps/Steps.config.js +1 -1
- package/styled-components/cjs/examples/plasma_web/components/Steps/Steps.stories.tsx +1 -1
- package/styled-components/es/components/Notification/Notification.js +1 -1
- package/styled-components/es/components/Notification/Notification.styles.js +2 -5
- package/styled-components/es/components/Notification/Notification.template-doc.mdx +8 -17
- package/styled-components/es/components/Notification/Notification.tokens.js +1 -2
- package/styled-components/es/components/Notification/NotificationsPortal.js +4 -8
- package/styled-components/es/components/Notification/NotificationsProvider.js +1 -3
- package/styled-components/es/components/Notification/index.js +1 -1
- package/styled-components/es/components/Select/Select.tokens.js +1 -2
- package/styled-components/es/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +1 -1
- package/styled-components/es/components/Steps/Steps.tokens.js +1 -0
- package/styled-components/es/components/Steps/ui/StepItem/StepItem.js +29 -7
- package/styled-components/es/components/Steps/ui/StepItem/StepItem.styles.js +12 -6
- package/styled-components/es/examples/plasma_b2c/components/Notification/Notification.js +4 -6
- package/styled-components/es/examples/plasma_b2c/components/Notification/Notification.stories.tsx +4 -25
- package/styled-components/es/examples/plasma_b2c/components/Steps/Steps.config.js +1 -1
- package/styled-components/es/examples/plasma_b2c/components/Steps/Steps.stories.tsx +1 -1
- package/styled-components/es/examples/plasma_web/components/Notification/Notification.js +4 -6
- package/styled-components/es/examples/plasma_web/components/Notification/Notification.stories.tsx +4 -25
- package/styled-components/es/examples/plasma_web/components/Steps/Steps.config.js +1 -1
- package/styled-components/es/examples/plasma_web/components/Steps/Steps.stories.tsx +1 -1
- package/types/components/Notification/Notification.d.ts +3 -3
- package/types/components/Notification/Notification.d.ts.map +1 -1
- package/types/components/Notification/Notification.styles.d.ts +2 -4
- 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 +5 -11
- package/types/components/Notification/Notification.types.d.ts.map +1 -1
- package/types/components/Notification/NotificationsPortal.d.ts.map +1 -1
- package/types/components/Notification/NotificationsProvider.d.ts +3 -4
- package/types/components/Notification/NotificationsProvider.d.ts.map +1 -1
- package/types/components/Notification/index.d.ts +2 -2
- package/types/components/Notification/index.d.ts.map +1 -1
- package/types/components/Select/Select.tokens.d.ts +0 -1
- package/types/components/Select/Select.tokens.d.ts.map +1 -1
- package/types/components/Select/ui/Target/ui/Textfield/Textfield.styles.d.ts.map +1 -1
- package/types/components/Steps/Steps.tokens.d.ts +1 -0
- package/types/components/Steps/Steps.tokens.d.ts.map +1 -1
- package/types/components/Steps/ui/StepItem/StepItem.d.ts.map +1 -1
- package/types/components/Steps/ui/StepItem/StepItem.styles.d.ts +2 -2
- package/types/components/Steps/ui/StepItem/StepItem.styles.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Notification/Notification.d.ts +2 -4
- package/types/examples/plasma_b2c/components/Notification/Notification.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Steps/Steps.config.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Notification/Notification.d.ts +13 -4
- package/types/examples/plasma_web/components/Notification/Notification.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Steps/Steps.config.d.ts.map +1 -1
- package/cjs/components/Steps/ui/StepItem/StepItem.styles_sp9rcd.css +0 -9
- package/es/components/Steps/ui/StepItem/StepItem.styles_sp9rcd.css +0 -9
@@ -43,6 +43,7 @@ export var StepItem = function StepItem(_ref) {
|
|
43
43
|
var prevItem = items[index - 1];
|
44
44
|
var nextItem = items[index + 1];
|
45
45
|
var isActive = status === 'active';
|
46
|
+
var isNextActive = (nextItem === null || nextItem === void 0 ? void 0 : nextItem.status) === 'active';
|
46
47
|
var isInactive = status === 'inactive';
|
47
48
|
var isPrevInactive = prevItem && !(prevItem !== null && prevItem !== void 0 && prevItem.status) || (prevItem === null || prevItem === void 0 ? void 0 : prevItem.status) === 'inactive';
|
48
49
|
var isNextInactive = !(nextItem !== null && nextItem !== void 0 && nextItem.status) || (nextItem === null || nextItem === void 0 ? void 0 : nextItem.status) === 'inactive';
|
@@ -80,8 +81,31 @@ export var StepItem = function StepItem(_ref) {
|
|
80
81
|
setIsHovered(false);
|
81
82
|
}
|
82
83
|
}, [isDisabled]);
|
84
|
+
if (isSimple) {
|
85
|
+
var _cls;
|
86
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(StepItemStyled, {
|
87
|
+
className: cls((_cls = {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_cls, classes.simple, isSimple), classes.active, isActive), classes.hovered, isHovered && !isActive), classes.inactive, isInactive), classes.centered, isCentered), classes.disabled, isDisabled), classes.clickable, clickable && !isActive), classes.hasIndicator, hasIndicator), classes.verticalOrientation, isVertical), "isFirst", isFirst), _defineProperty(_defineProperty(_defineProperty(_cls, "isLast", isLast), "isPrevInactive", isPrevInactive), "isNextInactive", isNextInactive)))
|
88
|
+
}, /*#__PURE__*/React.createElement(BulletIndicatorWrapper, {
|
89
|
+
className: cls(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, classes.verticalOrientation, isVertical), classes.centered, isCentered), classes.simple, isSimple), classes.hasIndicator, hasIndicator)),
|
90
|
+
onClick: onClickHandler,
|
91
|
+
onFocus: onMouseOver,
|
92
|
+
onBlur: onMouseOut,
|
93
|
+
onMouseOver: onMouseOver,
|
94
|
+
onMouseOut: onMouseOut
|
95
|
+
}, hasLoader && /*#__PURE__*/React.createElement(SpinnerStyled, {
|
96
|
+
hasIndicator: hasIndicator
|
97
|
+
}), !hasLoader && /*#__PURE__*/React.createElement(BulletNode, {
|
98
|
+
className: cls(_defineProperty(_defineProperty({}, classes.active, isActive), classes.inactive, isInactive))
|
99
|
+
}, typeof indicator === 'function' && indicator({
|
100
|
+
status: status,
|
101
|
+
item: item,
|
102
|
+
size: size
|
103
|
+
}), typeof indicator !== 'function' && indicator))), !isLast && /*#__PURE__*/React.createElement(StepItemDivider, {
|
104
|
+
className: cls(classes.simple, _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, classes.verticalOrientation, isVertical), classes.transparentDivider, !hasLine), classes.active, isActive), classes.inactive, isInactive || isNextInactive))
|
105
|
+
}));
|
106
|
+
}
|
83
107
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(StepItemStyled, {
|
84
|
-
className: cls(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, classes.simple, isSimple), classes.active, isActive), classes.hovered, isHovered && !isActive), classes.inactive, isInactive), classes.centered, isCentered), classes.disabled, isDisabled), classes.clickable, clickable && !isActive), classes.hasIndicator, hasIndicator), classes.verticalOrientation, isVertical))
|
108
|
+
className: cls(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, classes.simple, isSimple), classes.active, isActive), classes.hovered, isHovered && !isActive), classes.inactive, isInactive), classes.centered, isCentered), classes.disabled, isDisabled), classes.clickable, clickable && !isActive), classes.hasIndicator, hasIndicator), classes.verticalOrientation, isVertical), "isNextActive", isNextActive))
|
85
109
|
}, /*#__PURE__*/React.createElement(BulletIndicatorWrapper, {
|
86
110
|
className: cls(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, classes.verticalOrientation, isVertical), classes.centered, isCentered), classes.simple, isSimple), classes.hasIndicator, hasIndicator)),
|
87
111
|
onClick: onClickHandler,
|
@@ -91,7 +115,7 @@ export var StepItem = function StepItem(_ref) {
|
|
91
115
|
onMouseOut: onMouseOut
|
92
116
|
}, contentAlign === 'center' && !isSimple && /*#__PURE__*/React.createElement(StepItemDivider, {
|
93
117
|
className: cls(_defineProperty(_defineProperty(_defineProperty({}, classes.simple, isSimple), classes.transparentDivider, !hasLine || isFirst), classes.inactive, isInactive || isPrevInactive))
|
94
|
-
}), isVertical &&
|
118
|
+
}), isVertical && /*#__PURE__*/React.createElement(StepItemDivider, {
|
95
119
|
className: cls(classes.indentDivider, _defineProperty(_defineProperty(_defineProperty({}, classes.simple, isSimple), classes.transparentDivider, !hasLine || isFirst), classes.inactive, isInactive || isPrevInactive)),
|
96
120
|
indentToken: indentToken
|
97
121
|
}), hasLoader && /*#__PURE__*/React.createElement(SpinnerStyled, {
|
@@ -102,9 +126,9 @@ export var StepItem = function StepItem(_ref) {
|
|
102
126
|
status: status,
|
103
127
|
item: item,
|
104
128
|
size: size
|
105
|
-
}), typeof indicator !== 'function' && indicator),
|
129
|
+
}), typeof indicator !== 'function' && indicator), /*#__PURE__*/React.createElement(StepItemDivider, {
|
106
130
|
className: cls(_defineProperty(_defineProperty(_defineProperty({}, classes.simple, isSimple), classes.transparentDivider, !hasLine || isLast), classes.inactive, isInactive || isNextInactive))
|
107
|
-
})),
|
131
|
+
})), /*#__PURE__*/React.createElement(StepItemContentWrapper, {
|
108
132
|
className: cls(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, classes.verticalOrientation, isVertical), classes.centered, isCentered), classes.active, isActive), classes.hasIndicator, hasIndicator))
|
109
133
|
}, /*#__PURE__*/React.createElement(StepItemTitle, {
|
110
134
|
onClick: onClickHandler,
|
@@ -112,7 +136,5 @@ export var StepItem = function StepItem(_ref) {
|
|
112
136
|
onBlur: onMouseOut,
|
113
137
|
onMouseOver: onMouseOver,
|
114
138
|
onMouseOut: onMouseOut
|
115
|
-
}, title), content && /*#__PURE__*/React.createElement(StepItemContent, null, typeof content === 'function' ? content(status, index, items) : content)))
|
116
|
-
className: cls(classes.simple, _defineProperty(_defineProperty(_defineProperty({}, classes.verticalOrientation, isVertical), classes.transparentDivider, !hasLine), classes.inactive, isInactive || isNextInactive))
|
117
|
-
}));
|
139
|
+
}, title), content && /*#__PURE__*/React.createElement(StepItemContent, null, typeof content === 'function' ? content(status, index, items) : content))));
|
118
140
|
};
|
@@ -2,6 +2,7 @@ import styled from 'styled-components';
|
|
2
2
|
import { classes, tokens } from '../../Steps.tokens';
|
3
3
|
import { component, mergeConfig } from '../../../../engines';
|
4
4
|
import { spinnerConfig, spinnerTokens } from '../../../Spinner';
|
5
|
+
import { addFocus } from '../../../../mixins';
|
5
6
|
var mergedConfig = /*#__PURE__*/mergeConfig(spinnerConfig);
|
6
7
|
var Spinner = /*#__PURE__*/component(mergedConfig);
|
7
8
|
export var SpinnerStyled = /*#__PURE__*/styled(Spinner).withConfig({
|
@@ -18,16 +19,21 @@ export var StepItemContent = /*#__PURE__*/styled.div.withConfig({
|
|
18
19
|
})(["padding-top:var(", ");padding-right:var(", ");font-family:var(", ");font-size:var(", ");font-style:var(", ");font-weight:var(", ");letter-spacing:var(", ");line-height:var(", ");word-break:break-word;color:var(", ");"], tokens.contentPaddingTop, tokens.contentSidePadding, tokens.contentFontFamily, tokens.contentFontSize, tokens.contentFontStyle, tokens.contentFontWeight, tokens.contentLetterSpacing, tokens.contentLineHeight, tokens.contentColor);
|
19
20
|
export var BulletIndicatorWrapper = /*#__PURE__*/styled.div.withConfig({
|
20
21
|
componentId: "plasma-new-hope__sc-bjma6z-3"
|
21
|
-
})(["display:flex;align-items:center;&:not(.", "){flex:0;&.", "{width:100%;min-height:var(", ");}&:not(.", "){width:100%;min-height:var(", ");}&.", "{padding-right:var(", ");}}&.", "{flex-direction:column;align-items:center;justify-content:center;min-height:100%;&.", "{min-width:var(", ");}&:not(.", "){min-width:var(", ");}}&.", "{justify-content:center;}"], classes.simple, classes.hasIndicator, tokens.activeIndicatorSize, classes.hasIndicator, tokens.activeBulletSize, classes.verticalOrientation, tokens.verticalContentPaddingLeft, classes.verticalOrientation, classes.hasIndicator, tokens.activeIndicatorSize, classes.hasIndicator, tokens.activeBulletSize, classes.centered);
|
22
|
-
export var BulletIndicator = /*#__PURE__*/styled.
|
22
|
+
})(["display:flex;align-items:center;&:not(.", "){flex:0;&.", "{width:100%;min-height:var(", ");}&:not(.", "){width:100%;min-height:var(", ");}&.", "{padding-right:var(", ");}}&.", "{flex:0;justify-content:center;&.", "{width:var(", ");min-height:var(", ");}&:not(.", "){width:var(", ");min-height:var(", ");}}&.", "{flex-direction:column;align-items:center;justify-content:center;min-height:100%;&.", "{min-width:var(", ");}&:not(.", "){min-width:var(", ");}}&.", "{justify-content:center;}"], classes.simple, classes.hasIndicator, tokens.activeIndicatorSize, classes.hasIndicator, tokens.activeBulletSize, classes.verticalOrientation, tokens.verticalContentPaddingLeft, classes.simple, classes.hasIndicator, tokens.activeIndicatorSize, tokens.activeIndicatorSize, classes.hasIndicator, tokens.activeBulletSize, tokens.activeBulletSize, classes.verticalOrientation, classes.hasIndicator, tokens.activeIndicatorSize, classes.hasIndicator, tokens.activeBulletSize, classes.centered);
|
23
|
+
export var BulletIndicator = /*#__PURE__*/styled.button.withConfig({
|
23
24
|
componentId: "plasma-new-hope__sc-bjma6z-4"
|
24
|
-
})(["display:flex;align-items:center;justify-content:center;width:var(", ");height:var(", ");border-radius:50%;box-sizing:border-box;position:relative;color:var(", ");background-color:var(", ");font-family:var(", ");font-size:var(", ");font-style:var(", ");font-weight:var(", ");letter-spacing:var(", ");line-height:var(", ")
|
25
|
+
})(["display:flex;align-items:center;justify-content:center;width:var(", ");height:var(", ");border-radius:50%;box-sizing:border-box;position:relative;outline:none;padding:0;margin:0;border:none;color:var(", ");background-color:var(", ");font-family:var(", ");font-size:var(", ");font-style:var(", ");font-weight:var(", ");letter-spacing:var(", ");line-height:var(", ");", " &.", "{width:var(", ");height:var(", ");border:var(", ") var(", ");font-family:var(", ");font-size:var(", ");font-style:var(", ");font-weight:var(", ");letter-spacing:var(", ");line-height:var(", ");color:var(", ");background:var(", ");}&.", "{color:var(", ");background:var(", ");&.", "{&:before,&:after{background:var(", ");}}}"], tokens.indicatorSize, tokens.indicatorSize, tokens.completedIndicatorColor, tokens.completedIndicatorBackground, tokens.indicatorFontFamily, tokens.indicatorFontSize, tokens.indicatorFontStyle, tokens.indicatorFontWeight, tokens.indicatorLetterSpacing, tokens.indicatorLineHeight, /*#__PURE__*/addFocus({
|
26
|
+
outlineOffset: '-0.1875rem',
|
27
|
+
outlineSize: '0.0625rem',
|
28
|
+
outlineRadius: '50%',
|
29
|
+
outlineColor: /*#__PURE__*/"var(".concat(tokens.focusColor, ")")
|
30
|
+
}), classes.active, tokens.activeIndicatorSize, tokens.activeIndicatorSize, tokens.dividerThickness, tokens.activeIndicatorBorder, tokens.activeIndicatorFontFamily, tokens.activeIndicatorFontSize, tokens.activeIndicatorFontStyle, tokens.activeIndicatorFontWeight, tokens.activeIndicatorLetterSpacing, tokens.activeIndicatorLineHeight, tokens.activeIndicatorColor, tokens.activeIndicatorBackground, classes.inactive, tokens.inactiveIndicatorColor, tokens.inactiveIndicatorBackground, classes.simple, tokens.inactiveIndicatorBackground);
|
25
31
|
export var Bullet = /*#__PURE__*/styled(BulletIndicator).withConfig({
|
26
32
|
componentId: "plasma-new-hope__sc-bjma6z-5"
|
27
|
-
})(["width:var(", ");height:var(", ");&.", "{width:var(", ");height:var(", ");border:var(", ") var(", ");background
|
33
|
+
})(["width:var(", ");height:var(", ");&.", "{width:var(", ");height:var(", ");border:var(", ") var(", ");background:var(", ");}"], tokens.bulletSize, tokens.bulletSize, classes.active, tokens.activeBulletSize, tokens.activeBulletSize, tokens.dividerThickness, tokens.activeIndicatorBorder, tokens.activeIndicatorBackground);
|
28
34
|
export var StepItemDivider = /*#__PURE__*/styled.div.withConfig({
|
29
35
|
componentId: "plasma-new-hope__sc-bjma6z-6"
|
30
|
-
})(["width:100%;height:var(", ");flex:1;background
|
36
|
+
})(["width:100%;height:var(", ");flex:1;background:var(", ");&.", "{background:var(", ");}&.", "{background:transparent;}&.", "{width:var(", ");height:100%;}&.", "{height:", ";min-height:", ";max-height:", ";&.", "{height:auto;max-height:none;}}"], tokens.dividerThickness, tokens.activeIndicatorColor, classes.inactive, tokens.inactiveIndicatorBackground, classes.transparentDivider, classes.verticalOrientation, tokens.dividerThickness, classes.indentDivider, function (_ref2) {
|
31
37
|
var indentToken = _ref2.indentToken;
|
32
38
|
return indentToken || '';
|
33
39
|
}, function (_ref3) {
|
@@ -42,4 +48,4 @@ export var StepItemContentWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
42
48
|
})(["&.", "{", "{padding-top:var(", ");padding-right:0;}", "{padding-top:var(", ");padding-bottom:var(", ");padding-right:0;}}"], classes.verticalOrientation, StepItemTitle, tokens.contentVerticalPadding, StepItemContent, tokens.contentVerticalPadding, tokens.contentVerticalPadding);
|
43
49
|
export var StepItemStyled = /*#__PURE__*/styled.div.withConfig({
|
44
50
|
componentId: "plasma-new-hope__sc-bjma6z-8"
|
45
|
-
})(["display:flex;flex-direction:column;align-items:flex-start;flex:1;&.", "{flex-direction:row;align-items:stretch;", "{width:var(", ");height:100%;}}&.", "{", "{color:var(", ");}}&.", "{", "{color:var(", ");}}&.", "{&:not(.", "){", "{cursor:pointer;color:var(", ");}", ",", "{color:var(", ");background:var(", ");}}&.", "{", "{color:var(", ");}", ",", "{color:var(", ");background:var(", ");}}", "{cursor:pointer;}}&.", "{align-items:center;", "{display:flex;flex-direction:column;align-items:center;padding-left:calc(var(", ") / 2);padding-right:calc(var(", ") / 2);", "{width:100%;}", ",", "{padding-right:0;text-align:center;}}}&.", "{
|
51
|
+
})(["position:relative;display:flex;flex-direction:column;align-items:flex-start;flex:1;color:var(", ");&.", "{flex-direction:row;align-items:stretch;", "{width:var(", ");height:100%;}}&.", "{", "{color:var(", ");}}&.", "{color:var(", ");", "{color:var(", ");}}&.", "{flex:0;align-items:center;justify-content:center;&.", "{min-width:var(", ");}&:not(.", "){min-width:var(", ");}&.", ",&:not(.", "){&:before,&:after{position:absolute;top:0;bottom:0;left:0;content:'';display:flex;align-self:center;width:calc((var(", ") - var(", ")) / 2);height:var(", ");background:var(", ");}&:after{left:auto;right:0;}&.", "{&:before,&:after{width:var(", ");height:calc((var(", ") - var(", ")) / 2);margin:0 auto;align-self:auto;}&:before{top:0;left:0;right:0;}&:after{top:auto;left:0;right:0;bottom:0;margin:0 auto;}}&.isFirst{&:before{display:none;}}&.isLast{&:after{display:none;}}}&.", "{&:after,&:before{background:var(", ");}}&.isPrevInactive{&:before{background:var(", ");}}&.isNextInactive{&:after{background:var(", ");}}}&:not(.", "):not(.", "){&.isNextActive{", "{width:calc(100% - (var(", ") - var(", ")) / 2);}}&.", "{", "{margin-left:calc((var(", ") - var(", ")) / -2);width:calc(100% + (var(", ") - var(", ")) / 2);}}}&.", "{&:not(.", "){", "{cursor:pointer;color:var(", ");}", ",", "{color:var(", ");background:var(", ");}}&.", "{", "{color:var(", ");}", ",", "{color:var(", ");background:var(", ");}}", "{cursor:pointer;}}&.", "{align-items:center;", "{display:flex;flex-direction:column;align-items:center;padding-left:calc(var(", ") / 2);padding-right:calc(var(", ") / 2);", "{width:100%;}", ",", "{padding-right:0;text-align:center;}}}&.", "{opacity:var(", ");}"], tokens.activeIndicatorColor, classes.verticalOrientation, StepItemDivider, tokens.dividerThickness, classes.active, StepItemTitle, tokens.activeTitleColor, classes.inactive, tokens.inactiveIndicatorColor, StepItemTitle, tokens.inactiveTitleColor, classes.simple, classes.hasIndicator, tokens.activeIndicatorSize, classes.hasIndicator, tokens.activeBulletSize, classes.inactive, classes.active, tokens.activeIndicatorSize, tokens.indicatorSize, tokens.dividerThickness, tokens.activeIndicatorColor, classes.verticalOrientation, tokens.dividerThickness, tokens.activeIndicatorSize, tokens.indicatorSize, classes.inactive, tokens.inactiveIndicatorBackground, tokens.inactiveIndicatorBackground, tokens.inactiveIndicatorBackground, classes.simple, classes.verticalOrientation, BulletIndicatorWrapper, tokens.activeIndicatorSize, tokens.indicatorSize, classes.active, BulletIndicatorWrapper, tokens.activeIndicatorSize, tokens.indicatorSize, tokens.activeIndicatorSize, tokens.indicatorSize, classes.hovered, classes.active, StepItemTitle, tokens.activeTitleColorHover, BulletIndicator, Bullet, tokens.completedIndicatorColorHover, tokens.completedIndicatorBackgroundHover, classes.inactive, StepItemTitle, tokens.inactiveTitleColorHover, BulletIndicator, Bullet, tokens.inactiveIndicatorColorHover, tokens.inactiveIndicatorBackgroundHover, BulletIndicatorWrapper, classes.centered, StepItemContentWrapper, tokens.contentSidePadding, tokens.contentSidePadding, StepItemTitle, StepItemTitle, StepItemContent, classes.disabled, tokens.disabledOpacity);
|
@@ -1,18 +1,16 @@
|
|
1
1
|
import React from 'react';
|
2
|
-
import {
|
2
|
+
import { noticationConfig, NotificationsProvider as Provider } from '../../../../components/Notification';
|
3
3
|
import { component, mergeConfig } from '../../../../engines';
|
4
4
|
import { config } from './Notification.config';
|
5
5
|
export { modalClasses } from '../../../../components/Modal';
|
6
|
-
var mergedConfig = /*#__PURE__*/mergeConfig(
|
6
|
+
var mergedConfig = /*#__PURE__*/mergeConfig(noticationConfig, config);
|
7
7
|
export var Notification = /*#__PURE__*/component(mergedConfig);
|
8
8
|
export var NotificationsProvider = function NotificationsProvider(_ref) {
|
9
9
|
var children = _ref.children,
|
10
10
|
_ref$frame = _ref.frame,
|
11
|
-
frame = _ref$frame === void 0 ? 'theme-root' : _ref$frame
|
12
|
-
placement = _ref.placement;
|
11
|
+
frame = _ref$frame === void 0 ? 'theme-root' : _ref$frame;
|
13
12
|
return /*#__PURE__*/React.createElement(Provider, {
|
14
13
|
config: mergedConfig,
|
15
|
-
frame: frame
|
16
|
-
placement: placement
|
14
|
+
frame: frame
|
17
15
|
}, children);
|
18
16
|
};
|
package/styled-components/es/examples/plasma_b2c/components/Notification/Notification.stories.tsx
CHANGED
@@ -5,7 +5,6 @@ import type { StoryObj, Meta } from '@storybook/react';
|
|
5
5
|
import { Button } from '../Button/Button';
|
6
6
|
import { Modal } from '../Modal/Modal';
|
7
7
|
import {
|
8
|
-
NotificationPlacement,
|
9
8
|
NotificationIconPlacement,
|
10
9
|
NotificationLayout,
|
11
10
|
addNotification,
|
@@ -21,7 +20,6 @@ const titles = ['Выполнено', 'Внимание', 'Ошибка'];
|
|
21
20
|
const texts = ['SSH ключ успешно скопирован', 'Нельзя скопировать SSH ключ', 'Не удалось скопировать SSH ключ'];
|
22
21
|
const size = ['xs', 'xxs'];
|
23
22
|
const iconPlacement = ['top', 'left'];
|
24
|
-
const notificationsPlacements = ['bottom-right', 'bottom-left'];
|
25
23
|
|
26
24
|
const longText = `JavaScript frameworks are an essential part of modern front-end web development,
|
27
25
|
providing developers with proven tools for building scalable, interactive web applications.
|
@@ -51,7 +49,6 @@ interface StoryDefaultProps {
|
|
51
49
|
layout: NotificationLayout;
|
52
50
|
size: 'xs' | 'xxs';
|
53
51
|
iconPlacement: NotificationIconPlacement;
|
54
|
-
placement?: NotificationPlacement;
|
55
52
|
}
|
56
53
|
|
57
54
|
const StoryDefault = ({ title, children, iconPlacement, size, layout, showLeftIcon, ...rest }: StoryDefaultProps) => {
|
@@ -114,10 +111,9 @@ type StoryLiveDemoProps = ComponentProps<typeof Notification> & {
|
|
114
111
|
layout: NotificationLayout;
|
115
112
|
size: 'xs' | 'xxs';
|
116
113
|
iconPlacement: NotificationIconPlacement;
|
117
|
-
placement?: NotificationPlacement;
|
118
114
|
};
|
119
115
|
|
120
|
-
const StoryLiveDemo = ({ timeout,
|
116
|
+
const StoryLiveDemo = ({ timeout, ...rest }: StoryLiveDemoProps) => {
|
121
117
|
const count = useRef(0);
|
122
118
|
const handleClick = useCallback(() => {
|
123
119
|
addNotification({ icon: <IconDisclosureRight />, ...rest, ...getNotificationProps(count.current) }, timeout);
|
@@ -125,7 +121,7 @@ const StoryLiveDemo = ({ timeout, placement, ...rest }: StoryLiveDemoProps) => {
|
|
125
121
|
}, [count, rest]);
|
126
122
|
|
127
123
|
return (
|
128
|
-
<NotificationsProvider
|
124
|
+
<NotificationsProvider>
|
129
125
|
<Button text="Добавить уведомление" onClick={handleClick} />
|
130
126
|
</NotificationsProvider>
|
131
127
|
);
|
@@ -139,28 +135,20 @@ export const LiveDemo: StoryObj<StoryLiveDemoProps> = {
|
|
139
135
|
type: 'select',
|
140
136
|
},
|
141
137
|
},
|
142
|
-
placement: {
|
143
|
-
options: notificationsPlacements,
|
144
|
-
control: {
|
145
|
-
type: 'select',
|
146
|
-
},
|
147
|
-
},
|
148
138
|
},
|
149
139
|
args: {
|
150
140
|
timeout: 3000,
|
151
141
|
role: 'alert',
|
152
142
|
layout: 'vertical',
|
153
|
-
placement: 'bottom-right',
|
154
143
|
},
|
155
144
|
render: (args) => <StoryLiveDemo {...args} />,
|
156
145
|
};
|
157
146
|
|
158
147
|
type StoryWithModalProps = ComponentProps<typeof Notification> & {
|
159
148
|
timeout: number;
|
160
|
-
placement?: NotificationPlacement;
|
161
149
|
};
|
162
150
|
|
163
|
-
const StoryWithModal = ({ timeout
|
151
|
+
const StoryWithModal = ({ timeout }: StoryWithModalProps) => {
|
164
152
|
const [isModalOpen, setIsModalOpen] = useState(false);
|
165
153
|
const count = useRef(0);
|
166
154
|
const handleClick = useCallback(() => {
|
@@ -169,7 +157,7 @@ const StoryWithModal = ({ timeout, placement }: StoryWithModalProps) => {
|
|
169
157
|
}, [count]);
|
170
158
|
|
171
159
|
return (
|
172
|
-
<NotificationsProvider
|
160
|
+
<NotificationsProvider>
|
173
161
|
<PopupProvider>
|
174
162
|
<Button text="Open modal" onClick={() => setIsModalOpen(true)} />
|
175
163
|
<Modal frame="theme-root" opened={isModalOpen} onClose={() => setIsModalOpen(false)}>
|
@@ -184,15 +172,6 @@ const StoryWithModal = ({ timeout, placement }: StoryWithModalProps) => {
|
|
184
172
|
export const WithModal: StoryObj<StoryLiveDemoProps> = {
|
185
173
|
args: {
|
186
174
|
timeout: 3500,
|
187
|
-
placement: 'bottom-right',
|
188
|
-
},
|
189
|
-
argTypes: {
|
190
|
-
placement: {
|
191
|
-
options: notificationsPlacements,
|
192
|
-
control: {
|
193
|
-
type: 'select',
|
194
|
-
},
|
195
|
-
},
|
196
175
|
},
|
197
176
|
render: (args) => <StoryWithModal {...args} />,
|
198
177
|
};
|
@@ -7,7 +7,7 @@ export var config = {
|
|
7
7
|
},
|
8
8
|
variations: {
|
9
9
|
view: {
|
10
|
-
"default": /*#__PURE__*/css(["", ":var(--text-primary);", ":var(--text-primary-hover);", ":solid var(--surface-solid-default);", ":var(--text-primary);", ":var(--surface-clear);", ":var(--inverse-text-primary);", ":var(--inverse-text-primary);", ":var(--surface-solid-default);", ":var(--surface-solid-default-hover);", ":var(--text-secondary);", ":var(--text-secondary-hover);", ":var(--text-secondary);", ":var(--text-secondary);", ":var(--surface-transparent-secondary);", ":var(--surface-transparent-secondary-hover);", ":var(--text-secondary);", ":0.4;"], tokens.activeTitleColor, tokens.activeTitleColorHover, tokens.activeIndicatorBorder, tokens.activeIndicatorColor, tokens.activeIndicatorBackground, tokens.completedIndicatorColor, tokens.completedIndicatorColorHover, tokens.completedIndicatorBackground, tokens.completedIndicatorBackgroundHover, tokens.inactiveTitleColor, tokens.inactiveTitleColorHover, tokens.inactiveIndicatorColor, tokens.inactiveIndicatorColorHover, tokens.inactiveIndicatorBackground, tokens.inactiveIndicatorBackgroundHover, tokens.contentColor, tokens.disabledOpacity)
|
10
|
+
"default": /*#__PURE__*/css(["", ":var(--text-primary);", ":var(--text-primary-hover);", ":solid var(--surface-solid-default);", ":var(--text-primary);", ":var(--surface-clear);", ":var(--inverse-text-primary);", ":var(--inverse-text-primary);", ":var(--surface-solid-default);", ":var(--surface-solid-default-hover);", ":var(--text-secondary);", ":var(--text-secondary-hover);", ":var(--text-secondary);", ":var(--text-secondary);", ":var(--surface-transparent-secondary);", ":var(--surface-transparent-secondary-hover);", ":var(--text-secondary);", ":var(--surface-accent);", ":0.4;"], tokens.activeTitleColor, tokens.activeTitleColorHover, tokens.activeIndicatorBorder, tokens.activeIndicatorColor, tokens.activeIndicatorBackground, tokens.completedIndicatorColor, tokens.completedIndicatorColorHover, tokens.completedIndicatorBackground, tokens.completedIndicatorBackgroundHover, tokens.inactiveTitleColor, tokens.inactiveTitleColorHover, tokens.inactiveIndicatorColor, tokens.inactiveIndicatorColorHover, tokens.inactiveIndicatorBackground, tokens.inactiveIndicatorBackgroundHover, tokens.contentColor, tokens.focusColor, tokens.disabledOpacity)
|
11
11
|
},
|
12
12
|
size: {
|
13
13
|
l: /*#__PURE__*/css(["", ":1.5rem;", ":2.25rem;", ":0.5rem;", ":1rem;", ":0.75rem;", ":0.375rem;", ":2rem;", ":1.0625rem;", ":0.75rem;", ":1rem;", ":0.625rem;", ":1.5rem;", ":1.25rem;", ":var(--plasma-typo-body-xs-font-family);", ":var(--plasma-typo-body-xs-font-size);", ":var(--plasma-typo-body-xs-font-style);", ":var(--plasma-typo-body-xs-font-weight);", ":var(--plasma-typo-body-xs-letter-spacing);", ":var(--plasma-typo-body-xs-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-font-weight);", ":var(--plasma-typo-body-s-letter-spacing);", ":var(--plasma-typo-body-s-line-height);", ":var(--plasma-typo-body-l-font-family);", ":var(--plasma-typo-body-l-font-size);", ":var(--plasma-typo-body-l-font-style);", ":var(--plasma-typo-body-l-font-weight);", ":var(--plasma-typo-body-l-letter-spacing);", ":var(--plasma-typo-body-l-line-height);", ":var(--plasma-typo-body-m-font-family);", ":var(--plasma-typo-body-m-font-size);", ":var(--plasma-typo-body-m-font-style);", ":var(--plasma-typo-body-m-font-weight);", ":var(--plasma-typo-body-m-letter-spacing);", ":var(--plasma-typo-body-m-line-height);", ":0.125rem;"], tokens.indicatorSize, tokens.activeIndicatorSize, tokens.bulletSize, tokens.activeBulletSize, tokens.titlePaddingTop, tokens.contentPaddingTop, tokens.contentSidePadding, tokens.contentVerticalPadding, tokens.verticalContentPaddingLeft, tokens.smallIndicatorIndentHeight, tokens.largeIndicatorIndentHeight, tokens.smallBulletIndentHeight, tokens.largeBulletIndentHeight, tokens.indicatorFontFamily, tokens.indicatorFontSize, tokens.indicatorFontStyle, tokens.indicatorFontWeight, tokens.indicatorLetterSpacing, tokens.indicatorLineHeight, tokens.activeIndicatorFontFamily, tokens.activeIndicatorFontSize, tokens.activeIndicatorFontStyle, tokens.activeIndicatorFontWeight, tokens.activeIndicatorLetterSpacing, tokens.activeIndicatorLineHeight, tokens.titleFontFamily, tokens.titleFontSize, tokens.titleFontStyle, tokens.titleFontWeight, tokens.titleLetterSpacing, tokens.titleLineHeight, tokens.contentFontFamily, tokens.contentFontSize, tokens.contentFontStyle, tokens.contentFontWeight, tokens.contentLetterSpacing, tokens.contentLineHeight, tokens.dividerThickness),
|
@@ -1,18 +1,16 @@
|
|
1
1
|
import React from 'react';
|
2
|
-
import {
|
2
|
+
import { noticationConfig, NotificationsProvider as Provider } from '../../../../components/Notification';
|
3
3
|
import { component, mergeConfig } from '../../../../engines';
|
4
4
|
import { config } from './Notification.config';
|
5
5
|
export { modalClasses } from '../../../../components/Modal';
|
6
|
-
var mergedConfig = /*#__PURE__*/mergeConfig(
|
6
|
+
var mergedConfig = /*#__PURE__*/mergeConfig(noticationConfig, config);
|
7
7
|
export var Notification = /*#__PURE__*/component(mergedConfig);
|
8
8
|
export var NotificationsProvider = function NotificationsProvider(_ref) {
|
9
9
|
var children = _ref.children,
|
10
10
|
_ref$frame = _ref.frame,
|
11
|
-
frame = _ref$frame === void 0 ? 'theme-root' : _ref$frame
|
12
|
-
placement = _ref.placement;
|
11
|
+
frame = _ref$frame === void 0 ? 'theme-root' : _ref$frame;
|
13
12
|
return /*#__PURE__*/React.createElement(Provider, {
|
14
13
|
config: mergedConfig,
|
15
|
-
frame: frame
|
16
|
-
placement: placement
|
14
|
+
frame: frame
|
17
15
|
}, children);
|
18
16
|
};
|
package/styled-components/es/examples/plasma_web/components/Notification/Notification.stories.tsx
CHANGED
@@ -5,7 +5,6 @@ import type { StoryObj, Meta } from '@storybook/react';
|
|
5
5
|
import { Button } from '../Button/Button';
|
6
6
|
import { Modal } from '../Modal/Modal';
|
7
7
|
import {
|
8
|
-
NotificationPlacement,
|
9
8
|
NotificationIconPlacement,
|
10
9
|
NotificationLayout,
|
11
10
|
addNotification,
|
@@ -21,7 +20,6 @@ const titles = ['Выполнено', 'Внимание', 'Ошибка'];
|
|
21
20
|
const texts = ['SSH ключ успешно скопирован', 'Нельзя скопировать SSH ключ', 'Не удалось скопировать SSH ключ'];
|
22
21
|
const size = ['xs', 'xxs'];
|
23
22
|
const iconPlacement = ['top', 'left'];
|
24
|
-
const notificationsPlacements = ['bottom-right', 'bottom-left'];
|
25
23
|
|
26
24
|
const longText = `JavaScript frameworks are an essential part of modern front-end web development,
|
27
25
|
providing developers with proven tools for building scalable, interactive web applications.
|
@@ -51,7 +49,6 @@ interface StoryDefaultProps {
|
|
51
49
|
layout: NotificationLayout;
|
52
50
|
size: 'xs' | 'xxs';
|
53
51
|
iconPlacement: NotificationIconPlacement;
|
54
|
-
placement?: NotificationPlacement;
|
55
52
|
}
|
56
53
|
|
57
54
|
const StoryDefault = ({ title, children, iconPlacement, size, layout, showLeftIcon, ...rest }: StoryDefaultProps) => {
|
@@ -114,10 +111,9 @@ type StoryLiveDemoProps = ComponentProps<typeof Notification> & {
|
|
114
111
|
layout: NotificationLayout;
|
115
112
|
size: 'xs' | 'xxs';
|
116
113
|
iconPlacement: NotificationIconPlacement;
|
117
|
-
placement?: NotificationPlacement;
|
118
114
|
};
|
119
115
|
|
120
|
-
const StoryLiveDemo = ({ timeout,
|
116
|
+
const StoryLiveDemo = ({ timeout, ...rest }: StoryLiveDemoProps) => {
|
121
117
|
const count = useRef(0);
|
122
118
|
const handleClick = useCallback(() => {
|
123
119
|
addNotification({ icon: <IconDisclosureRight />, ...rest, ...getNotificationProps(count.current) }, timeout);
|
@@ -125,7 +121,7 @@ const StoryLiveDemo = ({ timeout, placement, ...rest }: StoryLiveDemoProps) => {
|
|
125
121
|
}, [count, rest]);
|
126
122
|
|
127
123
|
return (
|
128
|
-
<NotificationsProvider
|
124
|
+
<NotificationsProvider>
|
129
125
|
<Button text="Добавить уведомление" onClick={handleClick} />
|
130
126
|
</NotificationsProvider>
|
131
127
|
);
|
@@ -139,28 +135,20 @@ export const LiveDemo: StoryObj<StoryLiveDemoProps> = {
|
|
139
135
|
type: 'select',
|
140
136
|
},
|
141
137
|
},
|
142
|
-
placement: {
|
143
|
-
options: notificationsPlacements,
|
144
|
-
control: {
|
145
|
-
type: 'select',
|
146
|
-
},
|
147
|
-
},
|
148
138
|
},
|
149
139
|
args: {
|
150
140
|
timeout: 3000,
|
151
141
|
role: 'alert',
|
152
142
|
layout: 'vertical',
|
153
|
-
placement: 'bottom-right',
|
154
143
|
},
|
155
144
|
render: (args) => <StoryLiveDemo {...args} />,
|
156
145
|
};
|
157
146
|
|
158
147
|
type StoryWithModalProps = ComponentProps<typeof Notification> & {
|
159
148
|
timeout: number;
|
160
|
-
placement?: NotificationPlacement;
|
161
149
|
};
|
162
150
|
|
163
|
-
const StoryWithModal = ({ timeout
|
151
|
+
const StoryWithModal = ({ timeout }: StoryWithModalProps) => {
|
164
152
|
const [isModalOpen, setIsModalOpen] = useState(false);
|
165
153
|
const count = useRef(0);
|
166
154
|
const handleClick = useCallback(() => {
|
@@ -169,7 +157,7 @@ const StoryWithModal = ({ timeout, placement }: StoryWithModalProps) => {
|
|
169
157
|
}, [count]);
|
170
158
|
|
171
159
|
return (
|
172
|
-
<NotificationsProvider
|
160
|
+
<NotificationsProvider>
|
173
161
|
<PopupProvider>
|
174
162
|
<Button text="Open modal" onClick={() => setIsModalOpen(true)} />
|
175
163
|
<Modal frame="theme-root" opened={isModalOpen} onClose={() => setIsModalOpen(false)}>
|
@@ -184,15 +172,6 @@ const StoryWithModal = ({ timeout, placement }: StoryWithModalProps) => {
|
|
184
172
|
export const WithModal: StoryObj<StoryLiveDemoProps> = {
|
185
173
|
args: {
|
186
174
|
timeout: 3500,
|
187
|
-
placement: 'bottom-right',
|
188
|
-
},
|
189
|
-
argTypes: {
|
190
|
-
placement: {
|
191
|
-
options: notificationsPlacements,
|
192
|
-
control: {
|
193
|
-
type: 'select',
|
194
|
-
},
|
195
|
-
},
|
196
175
|
},
|
197
176
|
render: (args) => <StoryWithModal {...args} />,
|
198
177
|
};
|
@@ -7,7 +7,7 @@ export var config = {
|
|
7
7
|
},
|
8
8
|
variations: {
|
9
9
|
view: {
|
10
|
-
"default": /*#__PURE__*/css(["", ":var(--text-primary);", ":var(--text-primary-hover);", ":solid var(--surface-solid-default);", ":var(--text-primary);", ":var(--surface-clear);", ":var(--inverse-text-primary);", ":var(--inverse-text-primary);", ":var(--surface-solid-default);", ":var(--surface-solid-default-hover);", ":var(--text-secondary);", ":var(--text-secondary-hover);", ":var(--text-secondary);", ":var(--text-secondary);", ":var(--surface-transparent-secondary);", ":var(--surface-transparent-secondary-hover);", ":var(--text-secondary);", ":0.4;"], tokens.activeTitleColor, tokens.activeTitleColorHover, tokens.activeIndicatorBorder, tokens.activeIndicatorColor, tokens.activeIndicatorBackground, tokens.completedIndicatorColor, tokens.completedIndicatorColorHover, tokens.completedIndicatorBackground, tokens.completedIndicatorBackgroundHover, tokens.inactiveTitleColor, tokens.inactiveTitleColorHover, tokens.inactiveIndicatorColor, tokens.inactiveIndicatorColorHover, tokens.inactiveIndicatorBackground, tokens.inactiveIndicatorBackgroundHover, tokens.contentColor, tokens.disabledOpacity)
|
10
|
+
"default": /*#__PURE__*/css(["", ":var(--text-primary);", ":var(--text-primary-hover);", ":solid var(--surface-solid-default);", ":var(--text-primary);", ":var(--surface-clear);", ":var(--inverse-text-primary);", ":var(--inverse-text-primary);", ":var(--surface-solid-default);", ":var(--surface-solid-default-hover);", ":var(--text-secondary);", ":var(--text-secondary-hover);", ":var(--text-secondary);", ":var(--text-secondary);", ":var(--surface-transparent-secondary);", ":var(--surface-transparent-secondary-hover);", ":var(--text-secondary);", ":var(--surface-accent);", ":0.4;"], tokens.activeTitleColor, tokens.activeTitleColorHover, tokens.activeIndicatorBorder, tokens.activeIndicatorColor, tokens.activeIndicatorBackground, tokens.completedIndicatorColor, tokens.completedIndicatorColorHover, tokens.completedIndicatorBackground, tokens.completedIndicatorBackgroundHover, tokens.inactiveTitleColor, tokens.inactiveTitleColorHover, tokens.inactiveIndicatorColor, tokens.inactiveIndicatorColorHover, tokens.inactiveIndicatorBackground, tokens.inactiveIndicatorBackgroundHover, tokens.contentColor, tokens.focusColor, tokens.disabledOpacity)
|
11
11
|
},
|
12
12
|
size: {
|
13
13
|
l: /*#__PURE__*/css(["", ":1.5rem;", ":2.25rem;", ":0.5rem;", ":1rem;", ":0.75rem;", ":0.375rem;", ":2rem;", ":1.0625rem;", ":0.75rem;", ":1rem;", ":0.625rem;", ":1.5rem;", ":1.25rem;", ":var(--plasma-typo-body-xs-font-family);", ":var(--plasma-typo-body-xs-font-size);", ":var(--plasma-typo-body-xs-font-style);", ":var(--plasma-typo-body-xs-font-weight);", ":var(--plasma-typo-body-xs-letter-spacing);", ":var(--plasma-typo-body-xs-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-font-weight);", ":var(--plasma-typo-body-s-letter-spacing);", ":var(--plasma-typo-body-s-line-height);", ":var(--plasma-typo-body-l-font-family);", ":var(--plasma-typo-body-l-font-size);", ":var(--plasma-typo-body-l-font-style);", ":var(--plasma-typo-body-l-font-weight);", ":var(--plasma-typo-body-l-letter-spacing);", ":var(--plasma-typo-body-l-line-height);", ":var(--plasma-typo-body-m-font-family);", ":var(--plasma-typo-body-m-font-size);", ":var(--plasma-typo-body-m-font-style);", ":var(--plasma-typo-body-m-font-weight);", ":var(--plasma-typo-body-m-letter-spacing);", ":var(--plasma-typo-body-m-line-height);", ":0.125rem;"], tokens.indicatorSize, tokens.activeIndicatorSize, tokens.bulletSize, tokens.activeBulletSize, tokens.titlePaddingTop, tokens.contentPaddingTop, tokens.contentSidePadding, tokens.contentVerticalPadding, tokens.verticalContentPaddingLeft, tokens.smallIndicatorIndentHeight, tokens.largeIndicatorIndentHeight, tokens.smallBulletIndentHeight, tokens.largeBulletIndentHeight, tokens.indicatorFontFamily, tokens.indicatorFontSize, tokens.indicatorFontStyle, tokens.indicatorFontWeight, tokens.indicatorLetterSpacing, tokens.indicatorLineHeight, tokens.activeIndicatorFontFamily, tokens.activeIndicatorFontSize, tokens.activeIndicatorFontStyle, tokens.activeIndicatorFontWeight, tokens.activeIndicatorLetterSpacing, tokens.activeIndicatorLineHeight, tokens.titleFontFamily, tokens.titleFontSize, tokens.titleFontStyle, tokens.titleFontWeight, tokens.titleLetterSpacing, tokens.titleLineHeight, tokens.contentFontFamily, tokens.contentFontSize, tokens.contentFontStyle, tokens.contentFontWeight, tokens.contentLetterSpacing, tokens.contentLineHeight, tokens.dividerThickness),
|
@@ -4,11 +4,11 @@ import { NotificationProps } from './Notification.types';
|
|
4
4
|
/**
|
5
5
|
* Компонент для небольших уведомлений пользователя
|
6
6
|
*/
|
7
|
-
export declare const notificationRoot: (Root: RootProps<HTMLDivElement,
|
8
|
-
export declare const
|
7
|
+
export declare const notificationRoot: (Root: RootProps<HTMLDivElement, NotificationProps>) => React.ForwardRefExoticComponent<NotificationProps & React.RefAttributes<HTMLDivElement>>;
|
8
|
+
export declare const noticationConfig: {
|
9
9
|
name: string;
|
10
10
|
tag: string;
|
11
|
-
layout: (Root: RootProps<HTMLDivElement,
|
11
|
+
layout: (Root: RootProps<HTMLDivElement, NotificationProps>) => React.ForwardRefExoticComponent<NotificationProps & React.RefAttributes<HTMLDivElement>>;
|
12
12
|
base: import("@linaria/core").LinariaClassName;
|
13
13
|
variations: {
|
14
14
|
layout: {
|
@@ -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;AAQ1C,OAAO,EAAsB,iBAAiB,EAAW,MAAM,sBAAsB,CAAC;AActF;;GAEG;AACH,eAAO,MAAM,gBAAgB,SAAU,UAAU,cAAc,EAAE,
|
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;AAQ1C,OAAO,EAAsB,iBAAiB,EAAW,MAAM,sBAAsB,CAAC;AActF;;GAEG;AACH,eAAO,MAAM,gBAAgB,SAAU,UAAU,cAAc,EAAE,iBAAiB,CAAC,6FAwF7E,CAAC;AAEP,eAAO,MAAM,gBAAgB;;;mBA1FU,UAAU,cAAc,EAAE,iBAAiB,CAAC;;;;;;;;;;;;;;;;;;CA+GlF,CAAC"}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/// <reference types="react" />
|
2
|
-
import { CloseIconType, IconPlacementType
|
2
|
+
import { CloseIconType, IconPlacementType } from './Notification.types';
|
3
3
|
export declare const StyledNotification: import("@linaria/core").LinariaClassName;
|
4
4
|
export declare const CloseIconWrapper: import("@linaria/react").StyledMeta & import("react").FunctionComponent<import("../../engines/types").PropsType<import("../../engines/types").Variants> & ((Omit<import("react").ButtonHTMLAttributes<HTMLElement>, "value"> & Omit<import("react").AnchorHTMLAttributes<HTMLElement>, "type"> & import("../../types").AsProps<any> & {
|
5
5
|
text?: string | undefined;
|
@@ -54,7 +54,5 @@ export declare const StyledContent: import("@linaria/react").StyledComponent<imp
|
|
54
54
|
export declare const StyledItemWrapper: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
|
55
55
|
isHidden: boolean;
|
56
56
|
}>;
|
57
|
-
export declare const StyledRoot: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> &
|
58
|
-
placement?: NotificationPlacement | undefined;
|
59
|
-
}>;
|
57
|
+
export declare const StyledRoot: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
|
60
58
|
//# sourceMappingURL=Notification.styles.d.ts.map
|
@@ -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,
|
1
|
+
{"version":3,"file":"Notification.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Notification/Notification.styles.ts"],"names":[],"mappings":";AAQA,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAc,MAAM,sBAAsB,CAAC;AAEpF,eAAO,MAAM,kBAAkB,0CAE9B,CAAC;AAKF,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uDAc5B,CAAC;AAEF,eAAO,MAAM,OAAO,qKAYnB,CAAC;AAEF,eAAO,MAAM,cAAc,gKAS1B,CAAC;AAEF,eAAO,MAAM,WAAW,gKAavB,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;EAmC9D,CAAC;AAEF,eAAO,MAAM,UAAU,qKAOtB,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
|
1
|
+
{"version":3,"file":"Notification.tokens.d.ts","sourceRoot":"","sources":["../../../src/components/Notification/Notification.tokens.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;CAkBnB,CAAC;AAEF,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0DlB,CAAC"}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import type { AsProps } from '@salutejs/plasma-core';
|
2
|
-
import { HTMLAttributes, ReactNode } from 'react';
|
2
|
+
import { HTMLAttributes, ReactNode, RefAttributes } from 'react';
|
3
3
|
import { ComponentConfig, PropsType, Variants } from '../../engines/types';
|
4
4
|
export declare const layouts: {
|
5
5
|
horizontal: string;
|
@@ -11,7 +11,6 @@ export declare const placements: {
|
|
11
11
|
left: string;
|
12
12
|
};
|
13
13
|
export declare type NotificationIconPlacement = keyof typeof placements;
|
14
|
-
export declare type NotificationPlacement = 'bottom-right' | 'bottom-left';
|
15
14
|
export declare type LayoutType = {
|
16
15
|
layout?: NotificationLayout;
|
17
16
|
};
|
@@ -21,11 +20,11 @@ export declare type IconPlacementType = {
|
|
21
20
|
export declare type CloseIconType = {
|
22
21
|
showCloseIcon?: boolean;
|
23
22
|
};
|
24
|
-
export interface NotificationProps extends AsProps,
|
23
|
+
export interface NotificationProps extends AsProps, HTMLAttributes<HTMLDivElement> {
|
25
24
|
/**
|
26
25
|
* Заголовок.
|
27
26
|
*/
|
28
|
-
title?:
|
27
|
+
title?: string;
|
29
28
|
/**
|
30
29
|
* Контент под заголовком.
|
31
30
|
*/
|
@@ -71,19 +70,14 @@ export interface NotificationProps extends AsProps, Omit<HTMLAttributes<HTMLDivE
|
|
71
70
|
*/
|
72
71
|
size?: string;
|
73
72
|
}
|
74
|
-
export interface NotificationPortalProps extends
|
73
|
+
export interface NotificationPortalProps extends HTMLAttributes<HTMLDivElement> {
|
75
74
|
/**
|
76
75
|
* Конфиг компонента Notification.
|
77
76
|
*/
|
78
|
-
config: ComponentConfig<string, Variants, PropsType<Variants>, NotificationProps &
|
77
|
+
config: ComponentConfig<string, Variants, PropsType<Variants>, NotificationProps & RefAttributes<HTMLDivElement>>;
|
79
78
|
/**
|
80
79
|
* В каком контейнере позиционируется(по умолчанию document), можно также указать id элемента или ref для него.
|
81
80
|
*/
|
82
81
|
frame?: string;
|
83
|
-
/**
|
84
|
-
* Расположение компонента Notification во frame
|
85
|
-
* @default bottom-right
|
86
|
-
*/
|
87
|
-
placement?: NotificationPlacement;
|
88
82
|
}
|
89
83
|
//# sourceMappingURL=Notification.types.d.ts.map
|
@@ -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;
|
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,aAAa,EAAE,MAAM,OAAO,CAAC;AAEjE,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;AAEhE,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,cAAc,CAAC,cAAc,CAAC;IAC9E;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;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;CACjB;AAED,MAAM,WAAW,uBAAwB,SAAQ,cAAc,CAAC,cAAc,CAAC;IAC3E;;OAEG;IACH,MAAM,EAAE,eAAe,CAAC,MAAM,EAAE,QAAQ,EAAE,SAAS,CAAC,QAAQ,CAAC,EAAE,iBAAiB,GAAG,aAAa,CAAC,cAAc,CAAC,CAAC,CAAC;IAClH;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB"}
|
@@ -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,CAkC3D,CAAC"}
|
@@ -1,11 +1,10 @@
|
|
1
|
-
import { FC,
|
1
|
+
import { FC, ReactNode, RefAttributes } from 'react';
|
2
2
|
import { ComponentConfig } from '../../engines';
|
3
3
|
import { PropsType, Variants } from '../../engines/types';
|
4
|
-
import {
|
4
|
+
import { NotificationProps } from './Notification.types';
|
5
5
|
export declare const NotificationsProvider: FC<{
|
6
6
|
children: ReactNode;
|
7
|
-
config: ComponentConfig<string, Variants, PropsType<Variants>, NotificationProps &
|
7
|
+
config: ComponentConfig<string, Variants, PropsType<Variants>, NotificationProps & RefAttributes<HTMLDivElement>>;
|
8
8
|
frame?: string;
|
9
|
-
placement?: NotificationPlacement;
|
10
9
|
}>;
|
11
10
|
//# sourceMappingURL=NotificationsProvider.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"NotificationsProvider.d.ts","sourceRoot":"","sources":["../../../src/components/Notification/NotificationsProvider.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,
|
1
|
+
{"version":3,"file":"NotificationsProvider.d.ts","sourceRoot":"","sources":["../../../src/components/Notification/NotificationsProvider.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAG5D,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAI1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAEzD,eAAO,MAAM,qBAAqB,EAAE,EAAE,CAAC;IACnC,QAAQ,EAAE,SAAS,CAAC;IACpB,MAAM,EAAE,eAAe,CAAC,MAAM,EAAE,QAAQ,EAAE,SAAS,CAAC,QAAQ,CAAC,EAAE,iBAAiB,GAAG,aAAa,CAAC,cAAc,CAAC,CAAC,CAAC;IAClH,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB,CAOA,CAAC"}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
export { NotificationsProvider } from './NotificationsProvider';
|
2
|
-
export { notificationRoot,
|
2
|
+
export { notificationRoot, noticationConfig } from './Notification';
|
3
3
|
export { addNotification, closeNotification } from './NotificationsStore';
|
4
4
|
export { classes as notificationClasses, tokens as notificationTokens } from './Notification.tokens';
|
5
|
-
export type { NotificationProps, NotificationPortalProps, NotificationLayout, NotificationIconPlacement,
|
5
|
+
export type { NotificationProps, NotificationPortalProps, NotificationLayout, NotificationIconPlacement, } from './Notification.types';
|
6
6
|
//# sourceMappingURL=index.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Notification/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Notification/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACpE,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAC1E,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,IAAI,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AACrG,YAAY,EACR,iBAAiB,EACjB,uBAAuB,EACvB,kBAAkB,EAClB,yBAAyB,GAC5B,MAAM,sBAAsB,CAAC"}
|