@salutejs/plasma-new-hope 0.271.0-canary.1778.13390888088.0 → 0.271.0-canary.1782.13387584790.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (86) hide show
  1. package/cjs/components/Combobox/ComboboxNew/Combobox.js +5 -1
  2. package/cjs/components/Combobox/ComboboxNew/Combobox.js.map +1 -1
  3. package/cjs/components/Notification/Notification.css +11 -11
  4. package/cjs/components/Notification/Notification.js +3 -7
  5. package/cjs/components/Notification/Notification.js.map +1 -1
  6. package/cjs/components/Notification/Notification.styles.js +26 -42
  7. package/cjs/components/Notification/Notification.styles.js.map +1 -1
  8. package/cjs/components/Notification/{Notification.styles_gk4bgs.css → Notification.styles_1u5gusp.css} +2 -2
  9. package/cjs/components/Notification/Notification.tokens.js +0 -1
  10. package/cjs/components/Notification/Notification.tokens.js.map +1 -1
  11. package/cjs/components/Notification/Notification.types.js.map +1 -1
  12. package/cjs/components/Notification/NotificationsPortal.js +0 -1
  13. package/cjs/components/Notification/NotificationsPortal.js.map +1 -1
  14. package/cjs/components/Notification/NotificationsProvider.css +11 -11
  15. package/cjs/index.css +11 -11
  16. package/emotion/cjs/components/Combobox/ComboboxNew/Combobox.js +5 -1
  17. package/emotion/cjs/components/Notification/Notification.js +3 -7
  18. package/emotion/cjs/components/Notification/Notification.styles.js +26 -32
  19. package/emotion/cjs/components/Notification/Notification.tokens.js +0 -1
  20. package/emotion/cjs/components/Notification/NotificationsPortal.js +1 -2
  21. package/emotion/cjs/examples/plasma_b2c/components/Notification/Notification.config.js +7 -11
  22. package/emotion/cjs/examples/plasma_b2c/components/Notification/Notification.stories.tsx +3 -35
  23. package/emotion/cjs/examples/plasma_web/components/Notification/Notification.config.js +7 -11
  24. package/emotion/cjs/examples/plasma_web/components/Notification/Notification.stories.tsx +2 -18
  25. package/emotion/es/components/Combobox/ComboboxNew/Combobox.js +5 -1
  26. package/emotion/es/components/Notification/Notification.js +3 -7
  27. package/emotion/es/components/Notification/Notification.styles.js +26 -32
  28. package/emotion/es/components/Notification/Notification.tokens.js +0 -1
  29. package/emotion/es/components/Notification/NotificationsPortal.js +1 -2
  30. package/emotion/es/examples/plasma_b2c/components/Notification/Notification.config.js +7 -11
  31. package/emotion/es/examples/plasma_b2c/components/Notification/Notification.stories.tsx +3 -35
  32. package/emotion/es/examples/plasma_web/components/Notification/Notification.config.js +7 -11
  33. package/emotion/es/examples/plasma_web/components/Notification/Notification.stories.tsx +2 -18
  34. package/es/components/Combobox/ComboboxNew/Combobox.js +5 -1
  35. package/es/components/Combobox/ComboboxNew/Combobox.js.map +1 -1
  36. package/es/components/Notification/Notification.css +11 -11
  37. package/es/components/Notification/Notification.js +3 -7
  38. package/es/components/Notification/Notification.js.map +1 -1
  39. package/es/components/Notification/Notification.styles.js +26 -42
  40. package/es/components/Notification/Notification.styles.js.map +1 -1
  41. package/es/components/Notification/{Notification.styles_gk4bgs.css → Notification.styles_1u5gusp.css} +2 -2
  42. package/es/components/Notification/Notification.tokens.js +0 -1
  43. package/es/components/Notification/Notification.tokens.js.map +1 -1
  44. package/es/components/Notification/Notification.types.js.map +1 -1
  45. package/es/components/Notification/NotificationsPortal.js +0 -1
  46. package/es/components/Notification/NotificationsPortal.js.map +1 -1
  47. package/es/components/Notification/NotificationsProvider.css +11 -11
  48. package/es/index.css +11 -11
  49. package/package.json +2 -2
  50. package/styled-components/cjs/components/Combobox/ComboboxNew/Combobox.js +5 -1
  51. package/styled-components/cjs/components/Notification/Notification.js +3 -7
  52. package/styled-components/cjs/components/Notification/Notification.styles.js +15 -21
  53. package/styled-components/cjs/components/Notification/Notification.tokens.js +0 -1
  54. package/styled-components/cjs/components/Notification/NotificationsPortal.js +0 -1
  55. package/styled-components/cjs/examples/plasma_b2c/components/Notification/Notification.config.js +1 -5
  56. package/styled-components/cjs/examples/plasma_b2c/components/Notification/Notification.stories.tsx +3 -35
  57. package/styled-components/cjs/examples/plasma_web/components/Notification/Notification.config.js +1 -5
  58. package/styled-components/cjs/examples/plasma_web/components/Notification/Notification.stories.tsx +2 -18
  59. package/styled-components/es/components/Combobox/ComboboxNew/Combobox.js +5 -1
  60. package/styled-components/es/components/Notification/Notification.js +3 -7
  61. package/styled-components/es/components/Notification/Notification.styles.js +15 -21
  62. package/styled-components/es/components/Notification/Notification.tokens.js +0 -1
  63. package/styled-components/es/components/Notification/NotificationsPortal.js +0 -1
  64. package/styled-components/es/examples/plasma_b2c/components/Notification/Notification.config.js +1 -5
  65. package/styled-components/es/examples/plasma_b2c/components/Notification/Notification.stories.tsx +3 -35
  66. package/styled-components/es/examples/plasma_web/components/Notification/Notification.config.js +1 -5
  67. package/styled-components/es/examples/plasma_web/components/Notification/Notification.stories.tsx +2 -18
  68. package/types/components/Combobox/ComboboxNew/Combobox.d.ts.map +1 -1
  69. package/types/components/Combobox/ComboboxNew/Combobox.types.d.ts +4 -0
  70. package/types/components/Combobox/ComboboxNew/Combobox.types.d.ts.map +1 -1
  71. package/types/components/Notification/Notification.d.ts.map +1 -1
  72. package/types/components/Notification/Notification.styles.d.ts +2 -6
  73. package/types/components/Notification/Notification.styles.d.ts.map +1 -1
  74. package/types/components/Notification/Notification.tokens.d.ts +0 -1
  75. package/types/components/Notification/Notification.tokens.d.ts.map +1 -1
  76. package/types/components/Notification/Notification.types.d.ts +0 -8
  77. package/types/components/Notification/Notification.types.d.ts.map +1 -1
  78. package/types/components/Notification/NotificationsPortal.d.ts.map +1 -1
  79. package/types/examples/plasma_b2c/components/Combobox/Combobox.d.ts +48 -0
  80. package/types/examples/plasma_b2c/components/Combobox/Combobox.d.ts.map +1 -1
  81. package/types/examples/plasma_b2c/components/Notification/Notification.config.d.ts +0 -4
  82. package/types/examples/plasma_b2c/components/Notification/Notification.config.d.ts.map +1 -1
  83. package/types/examples/plasma_web/components/Combobox/Combobox.d.ts +48 -0
  84. package/types/examples/plasma_web/components/Combobox/Combobox.d.ts.map +1 -1
  85. package/types/examples/plasma_web/components/Notification/Notification.config.d.ts +0 -4
  86. package/types/examples/plasma_web/components/Notification/Notification.config.d.ts.map +1 -1
@@ -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 color="inherit" /> : ''}
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
 
@@ -1,4 +1,4 @@
1
- var _excluded = ["name", "multiple", "value", "onChange", "defaultValue", "isTargetAmount", "targetAmount", "items", "placement", "label", "placeholder", "helperText", "contentLeft", "textBefore", "textAfter", "variant", "listOverflow", "listHeight", "listWidth", "portal", "renderItem", "view", "size", "labelPlacement", "keepPlaceholder", "readOnly", "disabled", "alwaysOpened", "filter", "closeAfterSelect", "renderValue", "zIndex", "beforeList", "afterList", "virtual", "hintView", "hintSize"];
1
+ var _excluded = ["name", "multiple", "value", "onChange", "defaultValue", "isTargetAmount", "targetAmount", "items", "placement", "label", "placeholder", "helperText", "contentLeft", "textBefore", "textAfter", "variant", "listOverflow", "listHeight", "listWidth", "portal", "renderItem", "view", "size", "labelPlacement", "keepPlaceholder", "readOnly", "disabled", "alwaysOpened", "filter", "closeAfterSelect", "renderValue", "zIndex", "beforeList", "afterList", "virtual", "hintView", "hintSize", "onChangeValue"];
2
2
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
3
3
  function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
4
4
  function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
@@ -81,6 +81,7 @@ export var comboboxRoot = function comboboxRoot(Root) {
81
81
  virtual = _props$virtual === void 0 ? false : _props$virtual,
82
82
  hintView = props.hintView,
83
83
  hintSize = props.hintSize,
84
+ onChangeValue = props.onChangeValue,
84
85
  rest = _objectWithoutProperties(props, _excluded);
85
86
  var transformedItems = useMemo(function () {
86
87
  return initialItemsTransform(items || []);
@@ -206,6 +207,9 @@ export var comboboxRoot = function comboboxRoot(Root) {
206
207
  dispatchFocusedPath({
207
208
  type: 'reset'
208
209
  });
210
+ if (onChangeValue) {
211
+ onChangeValue(e.target.value);
212
+ }
209
213
  };
210
214
 
211
215
  // Обработчик чипов
@@ -1,4 +1,4 @@
1
- var _excluded = ["role", "title", "children", "actions", "view", "size", "iconPlacement", "showCloseIcon", "layout", "icon", "closeIconType", "textColor", "iconColor", "onCloseButtonClick"];
1
+ var _excluded = ["role", "title", "children", "actions", "view", "size", "iconPlacement", "showCloseIcon", "layout", "icon", "closeIconType", "onCloseButtonClick"];
2
2
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
3
3
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
4
4
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
@@ -34,8 +34,6 @@ export var notificationRoot = function notificationRoot(Root) {
34
34
  layout = _props$layout === void 0 ? layouts.vertical : _props$layout,
35
35
  icon = props.icon,
36
36
  closeIconType = props.closeIconType,
37
- textColor = props.textColor,
38
- iconColor = props.iconColor,
39
37
  onCloseButtonClick = props.onCloseButtonClick,
40
38
  rest = _objectWithoutProperties(props, _excluded);
41
39
  var ariaLive = 'polite';
@@ -68,15 +66,13 @@ export var notificationRoot = function notificationRoot(Root) {
68
66
  className: cx(classes.contentBox, getLayoutClass(layout), withoutIconClass)
69
67
  }, icon && /*#__PURE__*/React.createElement(IconWrapper, {
70
68
  iconPlacement: IconPlacementInternal,
71
- className: cx(classes.icon, getLayoutClass(layout)),
72
- iconColor: iconColor
69
+ className: cx(classes.icon, getLayoutClass(layout))
73
70
  }, icon), /*#__PURE__*/React.createElement(TextBox, {
74
71
  iconPlacement: IconPlacementInternal,
75
72
  showCloseIcon: showCloseIcon,
76
73
  className: cx(classes.textbox, getLayoutClass(layout))
77
74
  }, title && /*#__PURE__*/React.createElement(StyledTitle, {
78
- className: classes.title,
79
- textColor: textColor
75
+ className: classes.title
80
76
  }, title), content && /*#__PURE__*/React.createElement(StyledContent, {
81
77
  className: classes.text
82
78
  }, content))), actions && /*#__PURE__*/React.createElement(ButtonsWrapper, {