@salutejs/plasma-new-hope 0.324.1-canary.1996.15273628835.0 → 0.324.1-canary.1998.15294767801.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. package/cjs/components/Notification/Notification.css +12 -12
  2. package/cjs/components/Notification/Notification.js +5 -1
  3. package/cjs/components/Notification/Notification.js.map +1 -1
  4. package/cjs/components/Notification/Notification.styles.js +63 -48
  5. package/cjs/components/Notification/Notification.styles.js.map +1 -1
  6. package/cjs/components/Notification/{Notification.styles_1yt699o.css → Notification.styles_1uyb7ob.css} +1 -1
  7. package/cjs/components/Notification/Notification.types.js.map +1 -1
  8. package/cjs/components/Notification/NotificationsProvider.css +11 -11
  9. package/cjs/components/Notification/variations/_layout/base.js +1 -1
  10. package/cjs/components/Notification/variations/_layout/base.js.map +1 -1
  11. package/cjs/components/Notification/variations/_layout/base_1g9g70c.css +1 -0
  12. package/cjs/components/NumberFormat/NumberFormat.js +2 -7
  13. package/cjs/components/NumberFormat/NumberFormat.js.map +1 -1
  14. package/cjs/index.css +12 -12
  15. package/emotion/cjs/components/Notification/Notification.js +5 -1
  16. package/emotion/cjs/components/Notification/Notification.styles.js +43 -36
  17. package/emotion/cjs/components/Notification/Notification.template-doc.mdx +44 -0
  18. package/emotion/cjs/components/Notification/variations/_layout/base.js +1 -1
  19. package/emotion/cjs/components/NumberFormat/NumberFormat.js +2 -7
  20. package/emotion/cjs/components/TextField/TextField.template-doc.mdx +16 -1
  21. package/emotion/cjs/examples/fixtures/Notification.js +1 -1
  22. package/emotion/cjs/examples/plasma_b2c/components/Notification/Notification.stories.tsx +5 -1
  23. package/emotion/cjs/examples/plasma_b2c/components/TextField/TextField.config.js +23 -22
  24. package/emotion/cjs/examples/plasma_b2c/components/TextField/TextField.stories.tsx +9 -4
  25. package/emotion/cjs/examples/plasma_web/components/Notification/Notification.stories.tsx +5 -1
  26. package/emotion/cjs/examples/plasma_web/components/TextField/TextField.config.js +23 -22
  27. package/emotion/cjs/examples/plasma_web/components/TextField/TextField.stories.tsx +10 -5
  28. package/emotion/es/components/Notification/Notification.js +5 -1
  29. package/emotion/es/components/Notification/Notification.styles.js +43 -36
  30. package/emotion/es/components/Notification/Notification.template-doc.mdx +44 -0
  31. package/emotion/es/components/Notification/variations/_layout/base.js +1 -1
  32. package/emotion/es/components/NumberFormat/NumberFormat.js +2 -7
  33. package/emotion/es/components/TextField/TextField.template-doc.mdx +16 -1
  34. package/emotion/es/examples/fixtures/Notification.js +1 -1
  35. package/emotion/es/examples/plasma_b2c/components/Notification/Notification.stories.tsx +5 -1
  36. package/emotion/es/examples/plasma_b2c/components/TextField/TextField.config.js +23 -22
  37. package/emotion/es/examples/plasma_b2c/components/TextField/TextField.stories.tsx +9 -4
  38. package/emotion/es/examples/plasma_web/components/Notification/Notification.stories.tsx +5 -1
  39. package/emotion/es/examples/plasma_web/components/TextField/TextField.config.js +23 -22
  40. package/emotion/es/examples/plasma_web/components/TextField/TextField.stories.tsx +10 -5
  41. package/es/components/Notification/Notification.css +12 -12
  42. package/es/components/Notification/Notification.js +5 -1
  43. package/es/components/Notification/Notification.js.map +1 -1
  44. package/es/components/Notification/Notification.styles.js +63 -48
  45. package/es/components/Notification/Notification.styles.js.map +1 -1
  46. package/es/components/Notification/{Notification.styles_1yt699o.css → Notification.styles_1uyb7ob.css} +1 -1
  47. package/es/components/Notification/Notification.types.js.map +1 -1
  48. package/es/components/Notification/NotificationsProvider.css +11 -11
  49. package/es/components/Notification/variations/_layout/base.js +1 -1
  50. package/es/components/Notification/variations/_layout/base.js.map +1 -1
  51. package/es/components/Notification/variations/_layout/base_1g9g70c.css +1 -0
  52. package/es/components/NumberFormat/NumberFormat.js +2 -7
  53. package/es/components/NumberFormat/NumberFormat.js.map +1 -1
  54. package/es/index.css +12 -12
  55. package/package.json +4 -4
  56. package/styled-components/cjs/components/Notification/Notification.js +5 -1
  57. package/styled-components/cjs/components/Notification/Notification.styles.js +33 -26
  58. package/styled-components/cjs/components/Notification/Notification.template-doc.mdx +44 -0
  59. package/styled-components/cjs/components/Notification/variations/_layout/base.js +1 -1
  60. package/styled-components/cjs/components/NumberFormat/NumberFormat.js +2 -7
  61. package/styled-components/cjs/components/TextField/TextField.template-doc.mdx +16 -1
  62. package/styled-components/cjs/examples/fixtures/Notification.js +1 -1
  63. package/styled-components/cjs/examples/plasma_b2c/components/Notification/Notification.stories.tsx +5 -1
  64. package/styled-components/cjs/examples/plasma_b2c/components/TextField/TextField.config.js +2 -1
  65. package/styled-components/cjs/examples/plasma_b2c/components/TextField/TextField.stories.tsx +9 -4
  66. package/styled-components/cjs/examples/plasma_web/components/Notification/Notification.stories.tsx +5 -1
  67. package/styled-components/cjs/examples/plasma_web/components/TextField/TextField.config.js +7 -6
  68. package/styled-components/cjs/examples/plasma_web/components/TextField/TextField.stories.tsx +10 -5
  69. package/styled-components/es/components/Notification/Notification.js +5 -1
  70. package/styled-components/es/components/Notification/Notification.styles.js +33 -26
  71. package/styled-components/es/components/Notification/Notification.template-doc.mdx +44 -0
  72. package/styled-components/es/components/Notification/variations/_layout/base.js +1 -1
  73. package/styled-components/es/components/NumberFormat/NumberFormat.js +2 -7
  74. package/styled-components/es/components/TextField/TextField.template-doc.mdx +16 -1
  75. package/styled-components/es/examples/fixtures/Notification.js +1 -1
  76. package/styled-components/es/examples/plasma_b2c/components/Notification/Notification.stories.tsx +5 -1
  77. package/styled-components/es/examples/plasma_b2c/components/TextField/TextField.config.js +2 -1
  78. package/styled-components/es/examples/plasma_b2c/components/TextField/TextField.stories.tsx +9 -4
  79. package/styled-components/es/examples/plasma_web/components/Notification/Notification.stories.tsx +5 -1
  80. package/styled-components/es/examples/plasma_web/components/TextField/TextField.config.js +7 -6
  81. package/styled-components/es/examples/plasma_web/components/TextField/TextField.stories.tsx +10 -5
  82. package/types/components/Notification/Notification.d.ts.map +1 -1
  83. package/types/components/Notification/Notification.styles.d.ts +3 -1
  84. package/types/components/Notification/Notification.styles.d.ts.map +1 -1
  85. package/types/components/Notification/Notification.types.d.ts +9 -0
  86. package/types/components/Notification/Notification.types.d.ts.map +1 -1
  87. package/types/components/NumberFormat/NumberFormat.d.ts.map +1 -1
  88. package/cjs/components/Notification/variations/_layout/base_qkc3i4.css +0 -1
  89. package/es/components/Notification/variations/_layout/base_qkc3i4.css +0 -1
@@ -1,13 +1,14 @@
1
1
  import React, { ComponentProps, useState } from 'react';
2
2
  import type { StoryObj, Meta } from '@storybook/react';
3
3
  import { action } from '@storybook/addon-actions';
4
- import { IconPlaceholder } from '@salutejs/plasma-sb-utils';
4
+ import { IconPlaceholder, getConfigVariations } from '@salutejs/plasma-sb-utils';
5
5
 
6
6
  import { WithTheme } from '../../../_helpers';
7
7
  import { IconCross, IconLock } from '../../../../components/_Icon';
8
8
  import type { PopoverPlacement } from '../Popover/Popover';
9
9
 
10
10
  import { TextField } from './TextField';
11
+ import { config } from './TextField.config';
11
12
 
12
13
  const onChange = action('onChange');
13
14
  const onFocus = action('onFocus');
@@ -15,14 +16,14 @@ const onBlur = action('onBlur');
15
16
  const onSearch = action('onSearch');
16
17
  const onChipsChange = action('onChipsChange');
17
18
 
18
- const sizes = ['l', 'm', 's', 'xs'];
19
- const views = ['default', 'positive', 'warning', 'negative'];
19
+ const { views, sizes } = getConfigVariations(config);
20
+
20
21
  const chipViews = ['default', 'secondary', 'accent', 'positive', 'warning', 'negative'];
21
22
  const hintViews = ['default'];
22
23
  const hintSizes = ['m', 's'];
23
24
  const hintTriggers = ['hover', 'click'];
24
- const hintTargetPlacements = ['outer', 'inner'];
25
25
  const labelPlacements = ['outer', 'inner'];
26
+ const hintTargetPlacements = ['outer', 'inner'];
26
27
  const placements: Array<PopoverPlacement> = [
27
28
  'top',
28
29
  'top-start',
@@ -63,6 +64,10 @@ const meta: Meta<typeof TextField> = {
63
64
  control: {
64
65
  type: 'select',
65
66
  },
67
+ if: {
68
+ arg: 'optional',
69
+ truthy: false,
70
+ },
66
71
  },
67
72
  required: {
68
73
  control: {
@@ -322,7 +327,7 @@ export const Default: StoryObj<StoryPropsDefault> = {
322
327
  },
323
328
  parameters: {
324
329
  controls: {
325
- exclude: ['chipType'],
330
+ exclude: ['chipType', 'chipView'],
326
331
  },
327
332
  },
328
333
  render: (args) => <StoryDemo {...args} />,
@@ -1,4 +1,4 @@
1
- var _excluded = ["role", "title", "children", "actions", "view", "size", "iconPlacement", "showCloseIcon", "layout", "icon", "closeIconType", "textColor", "titleColor", "backgroundColor", "onCloseButtonClick"];
1
+ var _excluded = ["role", "title", "children", "actions", "view", "size", "iconPlacement", "showCloseIcon", "layout", "icon", "closeIconType", "textColor", "titleColor", "backgroundColor", "width", "maxWidth", "onCloseButtonClick"];
2
2
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
3
3
  function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
4
4
  function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
@@ -37,6 +37,8 @@ export var notificationRoot = function notificationRoot(Root) {
37
37
  textColor = props.textColor,
38
38
  titleColor = props.titleColor,
39
39
  backgroundColor = props.backgroundColor,
40
+ width = props.width,
41
+ maxWidth = props.maxWidth,
40
42
  onCloseButtonClick = props.onCloseButtonClick,
41
43
  rest = _objectWithoutProperties(props, _excluded);
42
44
  var ariaLive = 'polite';
@@ -64,6 +66,8 @@ export var notificationRoot = function notificationRoot(Root) {
64
66
  "aria-atomic": ariaAtomic
65
67
  }, rest), /*#__PURE__*/React.createElement(Wrapper, {
66
68
  backgroundColor: backgroundColor,
69
+ width: width,
70
+ maxWidth: maxWidth,
67
71
  className: cx(classes.wrapper, getLayoutClass(layout), oneLineClass, withoutCloseIconClass)
68
72
  }, /*#__PURE__*/React.createElement(ContentBox, {
69
73
  iconPlacement: IconPlacementInternal,