@salutejs/plasma-new-hope 0.179.0-canary.1519.11587412765.0 → 0.179.0-dev.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (125) hide show
  1. package/cjs/components/Counter/Counter.css +1 -1
  2. package/cjs/components/Counter/Counter.js +13 -3
  3. package/cjs/components/Counter/Counter.js.map +1 -1
  4. package/cjs/components/Counter/Counter.tokens.js +4 -0
  5. package/cjs/components/Counter/Counter.tokens.js.map +1 -1
  6. package/cjs/components/Counter/variations/_size/base.js +1 -1
  7. package/cjs/components/Counter/variations/_size/base.js.map +1 -1
  8. package/cjs/components/Counter/variations/_size/{base_1z0ohiy.css → base_4mz17d.css} +1 -1
  9. package/cjs/components/Pagination/Pagination.css +12 -12
  10. package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +12 -12
  11. package/cjs/components/Popup/Popup.js +2 -2
  12. package/cjs/components/Popup/Popup.js.map +1 -1
  13. package/cjs/components/Popup/PopupContext.js +1 -1
  14. package/cjs/components/Popup/PopupContext.js.map +1 -1
  15. package/cjs/components/Portal/Portal.js +4 -0
  16. package/cjs/components/Portal/Portal.js.map +1 -1
  17. package/cjs/components/Select/Select.css +12 -12
  18. package/cjs/components/Select/Select.tokens.js +1 -2
  19. package/cjs/components/Select/Select.tokens.js.map +1 -1
  20. package/cjs/components/Select/ui/Inner/Inner.css +12 -12
  21. package/cjs/components/Select/ui/Inner/ui/Item/Item.css +12 -12
  22. package/cjs/components/Select/ui/Target/Target.css +12 -12
  23. package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.css +12 -12
  24. package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +1 -1
  25. package/cjs/components/Select/ui/Target/ui/Textfield/Textfield.styles.js.map +1 -1
  26. package/cjs/components/Select/ui/Target/ui/Textfield/{Textfield.styles_1damf5p.css → Textfield.styles_11yj58s.css} +1 -1
  27. package/cjs/index.css +13 -13
  28. package/emotion/cjs/components/Counter/Counter.js +13 -3
  29. package/emotion/cjs/components/Counter/Counter.template-doc.mdx +2 -2
  30. package/emotion/cjs/components/Counter/Counter.tokens.js +4 -1
  31. package/emotion/cjs/components/Counter/variations/_size/base.js +1 -1
  32. package/emotion/cjs/components/Popup/Popup.js +1 -1
  33. package/emotion/cjs/components/Popup/PopupContext.js +1 -1
  34. package/emotion/cjs/components/Portal/Portal.js +4 -0
  35. package/emotion/cjs/components/Select/Select.tokens.js +1 -2
  36. package/emotion/cjs/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +21 -12
  37. package/emotion/cjs/examples/plasma_b2c/components/Counter/Counter.config.js +12 -9
  38. package/emotion/cjs/examples/plasma_b2c/components/Counter/Counter.stories.tsx +7 -5
  39. package/emotion/cjs/examples/plasma_web/components/Counter/Counter.config.js +12 -9
  40. package/emotion/cjs/examples/plasma_web/components/Counter/Counter.stories.tsx +7 -5
  41. package/emotion/es/components/Counter/Counter.js +13 -3
  42. package/emotion/es/components/Counter/Counter.template-doc.mdx +2 -2
  43. package/emotion/es/components/Counter/Counter.tokens.js +3 -0
  44. package/emotion/es/components/Counter/variations/_size/base.js +2 -2
  45. package/emotion/es/components/Popup/Popup.js +1 -1
  46. package/emotion/es/components/Popup/PopupContext.js +1 -1
  47. package/emotion/es/components/Portal/Portal.js +4 -0
  48. package/emotion/es/components/Select/Select.tokens.js +1 -2
  49. package/emotion/es/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +21 -12
  50. package/emotion/es/examples/plasma_b2c/components/Counter/Counter.config.js +12 -9
  51. package/emotion/es/examples/plasma_b2c/components/Counter/Counter.stories.tsx +7 -5
  52. package/emotion/es/examples/plasma_web/components/Counter/Counter.config.js +12 -9
  53. package/emotion/es/examples/plasma_web/components/Counter/Counter.stories.tsx +7 -5
  54. package/es/components/Counter/Counter.css +1 -1
  55. package/es/components/Counter/Counter.js +13 -3
  56. package/es/components/Counter/Counter.js.map +1 -1
  57. package/es/components/Counter/Counter.tokens.js +4 -1
  58. package/es/components/Counter/Counter.tokens.js.map +1 -1
  59. package/es/components/Counter/variations/_size/base.js +1 -1
  60. package/es/components/Counter/variations/_size/base.js.map +1 -1
  61. package/es/components/Counter/variations/_size/{base_1z0ohiy.css → base_4mz17d.css} +1 -1
  62. package/es/components/Pagination/Pagination.css +12 -12
  63. package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +12 -12
  64. package/es/components/Popup/Popup.js +2 -2
  65. package/es/components/Popup/Popup.js.map +1 -1
  66. package/es/components/Popup/PopupContext.js +1 -1
  67. package/es/components/Popup/PopupContext.js.map +1 -1
  68. package/es/components/Portal/Portal.js +4 -0
  69. package/es/components/Portal/Portal.js.map +1 -1
  70. package/es/components/Select/Select.css +12 -12
  71. package/es/components/Select/Select.tokens.js +1 -2
  72. package/es/components/Select/Select.tokens.js.map +1 -1
  73. package/es/components/Select/ui/Inner/Inner.css +12 -12
  74. package/es/components/Select/ui/Inner/ui/Item/Item.css +12 -12
  75. package/es/components/Select/ui/Target/Target.css +12 -12
  76. package/es/components/Select/ui/Target/ui/Textfield/Textfield.css +12 -12
  77. package/es/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +1 -1
  78. package/es/components/Select/ui/Target/ui/Textfield/Textfield.styles.js.map +1 -1
  79. package/es/components/Select/ui/Target/ui/Textfield/{Textfield.styles_1damf5p.css → Textfield.styles_11yj58s.css} +1 -1
  80. package/es/index.css +13 -13
  81. package/package.json +2 -2
  82. package/styled-components/cjs/components/Counter/Counter.js +13 -3
  83. package/styled-components/cjs/components/Counter/Counter.template-doc.mdx +2 -2
  84. package/styled-components/cjs/components/Counter/Counter.tokens.js +4 -1
  85. package/styled-components/cjs/components/Counter/variations/_size/base.js +1 -1
  86. package/styled-components/cjs/components/Popup/Popup.js +1 -1
  87. package/styled-components/cjs/components/Popup/PopupContext.js +1 -1
  88. package/styled-components/cjs/components/Portal/Portal.js +4 -0
  89. package/styled-components/cjs/components/Select/Select.tokens.js +1 -2
  90. package/styled-components/cjs/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +1 -1
  91. package/styled-components/cjs/examples/plasma_b2c/components/Counter/Counter.config.js +5 -2
  92. package/styled-components/cjs/examples/plasma_b2c/components/Counter/Counter.stories.tsx +7 -5
  93. package/styled-components/cjs/examples/plasma_web/components/Counter/Counter.config.js +5 -2
  94. package/styled-components/cjs/examples/plasma_web/components/Counter/Counter.stories.tsx +7 -5
  95. package/styled-components/es/components/Counter/Counter.js +13 -3
  96. package/styled-components/es/components/Counter/Counter.template-doc.mdx +2 -2
  97. package/styled-components/es/components/Counter/Counter.tokens.js +3 -0
  98. package/styled-components/es/components/Counter/variations/_size/base.js +2 -2
  99. package/styled-components/es/components/Popup/Popup.js +1 -1
  100. package/styled-components/es/components/Popup/PopupContext.js +1 -1
  101. package/styled-components/es/components/Portal/Portal.js +4 -0
  102. package/styled-components/es/components/Select/Select.tokens.js +1 -2
  103. package/styled-components/es/components/Select/ui/Target/ui/Textfield/Textfield.styles.js +1 -1
  104. package/styled-components/es/examples/plasma_b2c/components/Counter/Counter.config.js +5 -2
  105. package/styled-components/es/examples/plasma_b2c/components/Counter/Counter.stories.tsx +7 -5
  106. package/styled-components/es/examples/plasma_web/components/Counter/Counter.config.js +5 -2
  107. package/styled-components/es/examples/plasma_web/components/Counter/Counter.stories.tsx +7 -5
  108. package/types/components/Counter/Counter.d.ts.map +1 -1
  109. package/types/components/Counter/Counter.tokens.d.ts +3 -0
  110. package/types/components/Counter/Counter.tokens.d.ts.map +1 -1
  111. package/types/components/Counter/Counter.types.d.ts +2 -2
  112. package/types/components/Counter/variations/_size/base.d.ts.map +1 -1
  113. package/types/components/Popup/PopupContext.d.ts.map +1 -1
  114. package/types/components/Portal/Portal.d.ts.map +1 -1
  115. package/types/components/Select/Select.tokens.d.ts +0 -1
  116. package/types/components/Select/Select.tokens.d.ts.map +1 -1
  117. package/types/components/Select/ui/Target/ui/Textfield/Textfield.styles.d.ts.map +1 -1
  118. package/types/examples/plasma_b2c/components/Counter/Counter.config.d.ts +3 -0
  119. package/types/examples/plasma_b2c/components/Counter/Counter.config.d.ts.map +1 -1
  120. package/types/examples/plasma_b2c/components/Counter/Counter.d.ts +3 -0
  121. package/types/examples/plasma_b2c/components/Counter/Counter.d.ts.map +1 -1
  122. package/types/examples/plasma_web/components/Counter/Counter.config.d.ts +3 -0
  123. package/types/examples/plasma_web/components/Counter/Counter.config.d.ts.map +1 -1
  124. package/types/examples/plasma_web/components/Counter/Counter.d.ts +3 -0
  125. package/types/examples/plasma_web/components/Counter/Counter.d.ts.map +1 -1
@@ -82,7 +82,7 @@ export var PopupProvider = function PopupProvider(_ref) {
82
82
  };
83
83
  return /*#__PURE__*/React.createElement(PopupContext.Provider, {
84
84
  value: context
85
- }, children, /*#__PURE__*/React.createElement(Portal, {
85
+ }, children, canUseDOM && /*#__PURE__*/React.createElement(Portal, {
86
86
  container: document.body
87
87
  }, /*#__PURE__*/React.createElement(StyledPortal, {
88
88
  id: rootId
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
2
  import ReactDOM from 'react-dom';
3
+ import { canUseDOM } from '../../utils';
3
4
  /**
4
5
  * Вспомогательный компонент. Используется в Popup, Popover.
5
6
  * Представляет собой ReactDOM.createPortal() в форме компонента.
@@ -9,6 +10,9 @@ export var Portal = function Portal(_ref) {
9
10
  container = _ref.container,
10
11
  _ref$disabled = _ref.disabled,
11
12
  disabled = _ref$disabled === void 0 ? false : _ref$disabled;
13
+ if (!canUseDOM) {
14
+ return null;
15
+ }
12
16
  var portalContainer = typeof container === 'function' ? container() : container;
13
17
  return /*#__PURE__*/React.createElement(React.Fragment, null, disabled && children, !disabled && /*#__PURE__*/ReactDOM.createPortal(children, portalContainer));
14
18
  };
@@ -93,8 +93,7 @@ export var tokens = {
93
93
  spinnerSize: '--plasma-select-spinner-size',
94
94
  spinnerSizeTight: '--plasma-select-spinner-size-tight',
95
95
  disclosureIconColor: '--plasma-select-disclosure-icon-color',
96
- disclosureIconColorHover: '--plasma-select-disclosure-icon-color-hover',
97
- contentLeftColor: '--plasma-select-content-left-color'
96
+ disclosureIconColorHover: '--plasma-select-disclosure-icon-color-hover'
98
97
  };
99
98
  export var constants = {
100
99
  focusColor: '--surface-accent',
@@ -63,7 +63,7 @@ export var InnerLabel = /*#__PURE__*/styled.label.withConfig({
63
63
  })(["color:var(", ");font-family:var(", ");font-size:var(", ");font-style:var(", ");font-weight:var(", ");letter-spacing:var(", ");line-height:var(", ");text-align:left;"], constants.textfieldInnerLabelColor, constants.fontFamily, constants.fontSize, constants.fontStyle, constants.fontWeight, constants.fontLetterSpacing, constants.fontLineHeight);
64
64
  export var ContentLeftWrapper = /*#__PURE__*/styled.div.withConfig({
65
65
  componentId: "plasma-new-hope__sc-1akl2tk-10"
66
- })(["flex:none;margin-left:-0.125rem;margin-right:0.375rem;line-height:0;color:var(", ",--text-secondary);"], tokens.contentLeftColor);
66
+ })(["flex:none;margin-left:-0.125rem;margin-right:0.375rem;line-height:0;"]);
67
67
  export var Value = /*#__PURE__*/styled.span.withConfig({
68
68
  componentId: "plasma-new-hope__sc-1akl2tk-11"
69
69
  })(["", ""], /*#__PURE__*/applyEllipsis());
@@ -16,8 +16,11 @@ export var config = {
16
16
  light: /*#__PURE__*/css(["", ":var(--on-light-text-primary);", ":var(--on-dark-surface-solid-default);"], counterTokens.color, counterTokens.background)
17
17
  },
18
18
  size: {
19
- xs: /*#__PURE__*/css(["", ":0.5rem;", ":1rem;", ":0.25rem;", ":0.25rem;", ":var(--plasma-typo-body-xxs-font-family);", ":var(--plasma-typo-body-xxs-font-size);", ":var(--plasma-typo-body-xxs-font-style);", ":var(--plasma-typo-body-xxs-font-weight);", ":var(--plasma-typo-body-xxs-letter-spacing);", ":var(--plasma-typo-body-xxs-line-height);"], counterTokens.borderRadius, counterTokens.height, counterTokens.paddingRight, counterTokens.paddingLeft, counterTokens.fontFamily, counterTokens.fontSize, counterTokens.fontStyle, counterTokens.fontWeight, counterTokens.letterSpacing, counterTokens.lineHeight),
20
- xxs: /*#__PURE__*/css(["", ":0.5rem;", ":0.75rem;", ":0.25rem;", ":0.25rem;", ":var(--plasma-typo-body-xxs-font-family);", ":var(--plasma-typo-body-xxs-font-size);", ":var(--plasma-typo-body-xxs-font-style);", ":var(--plasma-typo-body-xxs-font-weight);", ":var(--plasma-typo-body-xxs-letter-spacing);", ":var(--plasma-typo-body-xxs-line-height);"], counterTokens.borderRadius, counterTokens.height, counterTokens.paddingRight, counterTokens.paddingLeft, counterTokens.fontFamily, counterTokens.fontSize, counterTokens.fontStyle, counterTokens.fontWeight, counterTokens.letterSpacing, counterTokens.lineHeight)
19
+ l: /*#__PURE__*/css(["", ":1rem;", ":1.75rem;", ":0.625rem;", ":0.625rem;", ":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);"], counterTokens.borderRadius, counterTokens.height, counterTokens.paddingRight, counterTokens.paddingLeft, counterTokens.fontFamily, counterTokens.fontSize, counterTokens.fontStyle, counterTokens.fontWeight, counterTokens.letterSpacing, counterTokens.lineHeight),
20
+ m: /*#__PURE__*/css(["", ":1rem;", ":1.5rem;", ":0.5rem;", ":0.5rem;", ":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);"], counterTokens.borderRadius, counterTokens.height, counterTokens.paddingRight, counterTokens.paddingLeft, counterTokens.fontFamily, counterTokens.fontSize, counterTokens.fontStyle, counterTokens.fontWeight, counterTokens.letterSpacing, counterTokens.lineHeight),
21
+ s: /*#__PURE__*/css(["", ":1rem;", ":1.25rem;", ":0.375rem;", ":0.375rem;", ":var(--plasma-typo-body-xxs-font-family);", ":var(--plasma-typo-body-xxs-font-size);", ":var(--plasma-typo-body-xxs-font-style);", ":var(--plasma-typo-body-xxs-font-weight);", ":var(--plasma-typo-body-xxs-letter-spacing);", ":var(--plasma-typo-body-xxs-line-height);"], counterTokens.borderRadius, counterTokens.height, counterTokens.paddingRight, counterTokens.paddingLeft, counterTokens.fontFamily, counterTokens.fontSize, counterTokens.fontStyle, counterTokens.fontWeight, counterTokens.letterSpacing, counterTokens.lineHeight),
22
+ xs: /*#__PURE__*/css(["", ":1rem;", ":1rem;", ":0.25rem;", ":0.25rem;", ":var(--plasma-typo-body-xxs-font-family);", ":var(--plasma-typo-body-xxs-font-size);", ":var(--plasma-typo-body-xxs-font-style);", ":var(--plasma-typo-body-xxs-font-weight);", ":var(--plasma-typo-body-xxs-letter-spacing);", ":var(--plasma-typo-body-xxs-line-height);"], counterTokens.borderRadius, counterTokens.height, counterTokens.paddingRight, counterTokens.paddingLeft, counterTokens.fontFamily, counterTokens.fontSize, counterTokens.fontStyle, counterTokens.fontWeight, counterTokens.letterSpacing, counterTokens.lineHeight),
23
+ xxs: /*#__PURE__*/css(["", ":1rem;", ":0.75rem;", ":0.125rem;", ":0.125rem;", ":var(--plasma-typo-body-xxs-font-family);", ":var(--plasma-typo-body-xxs-font-size);", ":var(--plasma-typo-body-xxs-font-style);", ":var(--plasma-typo-body-xxs-font-weight);", ":var(--plasma-typo-body-xxs-letter-spacing);", ":var(--plasma-typo-body-xxs-line-height);"], counterTokens.borderRadius, counterTokens.height, counterTokens.paddingRight, counterTokens.paddingLeft, counterTokens.fontFamily, counterTokens.fontSize, counterTokens.fontStyle, counterTokens.fontWeight, counterTokens.letterSpacing, counterTokens.lineHeight)
21
24
  }
22
25
  }
23
26
  };
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
1
  import { disableProps } from '@salutejs/plasma-sb-utils';
3
2
  import type { StoryObj, Meta } from '@storybook/react';
4
3
 
@@ -6,19 +5,22 @@ import { WithTheme } from '../../../_helpers';
6
5
 
7
6
  import { Counter } from './Counter';
8
7
 
8
+ const sizes = ['l', 'm', 's', 'xs', 'xxs'];
9
+ const views = ['default', 'accent', 'positive', 'warning', 'negative', 'dark', 'light'];
10
+
9
11
  const meta: Meta<typeof Counter> = {
10
12
  title: 'plasma_b2c/Counter',
11
13
  component: Counter,
12
14
  decorators: [WithTheme],
13
15
  argTypes: {
14
16
  size: {
15
- options: ['xs', 'xxs'],
17
+ options: sizes,
16
18
  control: {
17
19
  type: 'select',
18
20
  },
19
21
  },
20
22
  view: {
21
- options: ['default', 'accent', 'positive', 'warning', 'negative', 'dark', 'light'],
23
+ options: views,
22
24
  control: {
23
25
  type: 'select',
24
26
  },
@@ -33,8 +35,8 @@ type Story = StoryObj<typeof Counter>;
33
35
 
34
36
  export const Default: Story = {
35
37
  args: {
36
- count: 25,
37
- maxCount: 100,
38
+ count: 123,
39
+ maxCount: 200,
38
40
  view: 'default',
39
41
  size: 'xs',
40
42
  },
@@ -16,8 +16,11 @@ export var config = {
16
16
  light: /*#__PURE__*/css(["", ":var(--on-light-text-primary);", ":var(--on-dark-surface-solid-default);"], counterTokens.color, counterTokens.background)
17
17
  },
18
18
  size: {
19
- xs: /*#__PURE__*/css(["", ":0.5rem;", ":1rem;", ":0.25rem;", ":0.25rem;", ":var(--plasma-typo-body-xxs-font-family);", ":var(--plasma-typo-body-xxs-font-size);", ":var(--plasma-typo-body-xxs-font-style);", ":var(--plasma-typo-body-xxs-font-weight);", ":var(--plasma-typo-body-xxs-letter-spacing);", ":var(--plasma-typo-body-xxs-line-height);"], counterTokens.borderRadius, counterTokens.height, counterTokens.paddingRight, counterTokens.paddingLeft, counterTokens.fontFamily, counterTokens.fontSize, counterTokens.fontStyle, counterTokens.fontWeight, counterTokens.letterSpacing, counterTokens.lineHeight),
20
- xxs: /*#__PURE__*/css(["", ":0.5rem;", ":0.75rem;", ":0.25rem;", ":0.25rem;", ":var(--plasma-typo-body-xxs-font-family);", ":var(--plasma-typo-body-xxs-font-size);", ":var(--plasma-typo-body-xxs-font-style);", ":var(--plasma-typo-body-xxs-font-weight);", ":var(--plasma-typo-body-xxs-letter-spacing);", ":var(--plasma-typo-body-xxs-line-height);"], counterTokens.borderRadius, counterTokens.height, counterTokens.paddingRight, counterTokens.paddingLeft, counterTokens.fontFamily, counterTokens.fontSize, counterTokens.fontStyle, counterTokens.fontWeight, counterTokens.letterSpacing, counterTokens.lineHeight)
19
+ l: /*#__PURE__*/css(["", ":1rem;", ":1.75rem;", ":0.625rem;", ":0.625rem;", ":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);"], counterTokens.borderRadius, counterTokens.height, counterTokens.paddingRight, counterTokens.paddingLeft, counterTokens.fontFamily, counterTokens.fontSize, counterTokens.fontStyle, counterTokens.fontWeight, counterTokens.letterSpacing, counterTokens.lineHeight),
20
+ m: /*#__PURE__*/css(["", ":1rem;", ":1.5rem;", ":0.5rem;", ":0.5rem;", ":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);"], counterTokens.borderRadius, counterTokens.height, counterTokens.paddingRight, counterTokens.paddingLeft, counterTokens.fontFamily, counterTokens.fontSize, counterTokens.fontStyle, counterTokens.fontWeight, counterTokens.letterSpacing, counterTokens.lineHeight),
21
+ s: /*#__PURE__*/css(["", ":1rem;", ":1.25rem;", ":0.375rem;", ":0.375rem;", ":var(--plasma-typo-body-xxs-font-family);", ":var(--plasma-typo-body-xxs-font-size);", ":var(--plasma-typo-body-xxs-font-style);", ":var(--plasma-typo-body-xxs-font-weight);", ":var(--plasma-typo-body-xxs-letter-spacing);", ":var(--plasma-typo-body-xxs-line-height);"], counterTokens.borderRadius, counterTokens.height, counterTokens.paddingRight, counterTokens.paddingLeft, counterTokens.fontFamily, counterTokens.fontSize, counterTokens.fontStyle, counterTokens.fontWeight, counterTokens.letterSpacing, counterTokens.lineHeight),
22
+ xs: /*#__PURE__*/css(["", ":1rem;", ":1rem;", ":0.25rem;", ":0.25rem;", ":var(--plasma-typo-body-xxs-font-family);", ":var(--plasma-typo-body-xxs-font-size);", ":var(--plasma-typo-body-xxs-font-style);", ":var(--plasma-typo-body-xxs-font-weight);", ":var(--plasma-typo-body-xxs-letter-spacing);", ":var(--plasma-typo-body-xxs-line-height);"], counterTokens.borderRadius, counterTokens.height, counterTokens.paddingRight, counterTokens.paddingLeft, counterTokens.fontFamily, counterTokens.fontSize, counterTokens.fontStyle, counterTokens.fontWeight, counterTokens.letterSpacing, counterTokens.lineHeight),
23
+ xxs: /*#__PURE__*/css(["", ":1rem;", ":0.75rem;", ":0.125rem;", ":0.125rem;", ":var(--plasma-typo-body-xxs-font-family);", ":var(--plasma-typo-body-xxs-font-size);", ":var(--plasma-typo-body-xxs-font-style);", ":var(--plasma-typo-body-xxs-font-weight);", ":var(--plasma-typo-body-xxs-letter-spacing);", ":var(--plasma-typo-body-xxs-line-height);"], counterTokens.borderRadius, counterTokens.height, counterTokens.paddingRight, counterTokens.paddingLeft, counterTokens.fontFamily, counterTokens.fontSize, counterTokens.fontStyle, counterTokens.fontWeight, counterTokens.letterSpacing, counterTokens.lineHeight)
21
24
  }
22
25
  }
23
26
  };
@@ -1,4 +1,3 @@
1
- import React from 'react';
2
1
  import { disableProps } from '@salutejs/plasma-sb-utils';
3
2
  import type { StoryObj, Meta } from '@storybook/react';
4
3
 
@@ -6,19 +5,22 @@ import { WithTheme } from '../../../_helpers';
6
5
 
7
6
  import { Counter } from './Counter';
8
7
 
8
+ const sizes = ['l', 'm', 's', 'xs', 'xxs'];
9
+ const views = ['default', 'accent', 'positive', 'warning', 'negative', 'dark', 'light'];
10
+
9
11
  const meta: Meta<typeof Counter> = {
10
12
  title: 'plasma_web/Counter',
11
13
  component: Counter,
12
14
  decorators: [WithTheme],
13
15
  argTypes: {
14
16
  size: {
15
- options: ['xs', 'xxs'],
17
+ options: sizes,
16
18
  control: {
17
19
  type: 'select',
18
20
  },
19
21
  },
20
22
  view: {
21
- options: ['default', 'accent', 'positive', 'warning', 'negative', 'dark', 'light'],
23
+ options: views,
22
24
  control: {
23
25
  type: 'select',
24
26
  },
@@ -33,8 +35,8 @@ type Story = StoryObj<typeof Counter>;
33
35
 
34
36
  export const Default: Story = {
35
37
  args: {
36
- count: 25,
37
- maxCount: 100,
38
+ count: 123,
39
+ maxCount: 200,
38
40
  view: 'default',
39
41
  size: 'xs',
40
42
  },
@@ -1 +1 @@
1
- {"version":3,"file":"Counter.d.ts","sourceRoot":"","sources":["../../../src/components/Counter/Counter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAE1C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAI/C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAGpD,eAAO,MAAM,WAAW,SAAU,UAAU,cAAc,EAAE,YAAY,CAAC;;;;;wCAWnE,CAAC;AAEP,eAAO,MAAM,aAAa;;;mBAbQ,UAAU,cAAc,EAAE,YAAY,CAAC;;;;;;;;;;;;;;;;;;;CA8BxE,CAAC"}
1
+ {"version":3,"file":"Counter.d.ts","sourceRoot":"","sources":["../../../src/components/Counter/Counter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAE1C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAK/C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAMpD,eAAO,MAAM,WAAW,SAAU,UAAU,cAAc,EAAE,YAAY,CAAC;;;;;wCAmBnE,CAAC;AAEP,eAAO,MAAM,aAAa;;;mBArBQ,UAAU,cAAc,EAAE,YAAY,CAAC;;;;;;;;;;;;;;;;;;;CAsCxE,CAAC"}
@@ -1,3 +1,6 @@
1
+ export declare const classes: {
2
+ round: string;
3
+ };
1
4
  export declare const tokens: {
2
5
  background: string;
3
6
  color: string;
@@ -1 +1 @@
1
- {"version":3,"file":"Counter.tokens.d.ts","sourceRoot":"","sources":["../../../src/components/Counter/Counter.tokens.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;CAiBlB,CAAC"}
1
+ {"version":3,"file":"Counter.tokens.d.ts","sourceRoot":"","sources":["../../../src/components/Counter/Counter.tokens.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO;;CAEnB,CAAC;AAEF,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;CAiBlB,CAAC"}
@@ -1,11 +1,11 @@
1
1
  import type { HTMLAttributes } from 'react';
2
2
  declare type CustomCounterProps = {
3
3
  /**
4
- * Отображаемое число
4
+ * Отображаемое число. Не может быть меньше 1.
5
5
  */
6
6
  count: number;
7
7
  /**
8
- * Максимальное отображаемое число
8
+ * Максимальное отображаемое число. Не может быть меньше 1.
9
9
  */
10
10
  maxCount?: number;
11
11
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../../../src/components/Counter/variations/_size/base.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,IAAI,0CAgBhB,CAAC"}
1
+ {"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../../../src/components/Counter/variations/_size/base.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,IAAI,0CAoBhB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"PopupContext.d.ts","sourceRoot":"","sources":["../../../src/components/Popup/PopupContext.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAuC,EAAE,EAAE,iBAAiB,EAAU,MAAM,OAAO,CAAC;AAMlG,OAAO,KAAK,EAAE,gBAAgB,EAAa,MAAM,eAAe,CAAC;AAGjE,eAAO,MAAM,eAAe,sBAAsB,CAAC;AAiBnD,eAAO,MAAM,eAAe,wBAAiC,CAAC;AAE9D,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,iBAAiB,CA8D/C,CAAC"}
1
+ {"version":3,"file":"PopupContext.d.ts","sourceRoot":"","sources":["../../../src/components/Popup/PopupContext.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAuC,EAAE,EAAE,iBAAiB,EAAU,MAAM,OAAO,CAAC;AAMlG,OAAO,KAAK,EAAE,gBAAgB,EAAa,MAAM,eAAe,CAAC;AAGjE,eAAO,MAAM,eAAe,sBAAsB,CAAC;AAiBnD,eAAO,MAAM,eAAe,wBAAiC,CAAC;AAE9D,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,iBAAiB,CAgE/C,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Portal.d.ts","sourceRoot":"","sources":["../../../src/components/Portal/Portal.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAGlC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C;;;GAGG;AACH,eAAO,MAAM,MAAM,EAAE,EAAE,CAAC,WAAW,CASlC,CAAC"}
1
+ {"version":3,"file":"Portal.d.ts","sourceRoot":"","sources":["../../../src/components/Portal/Portal.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAKlC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C;;;GAGG;AACH,eAAO,MAAM,MAAM,EAAE,EAAE,CAAC,WAAW,CAalC,CAAC"}
@@ -94,7 +94,6 @@ export declare const tokens: {
94
94
  spinnerSizeTight: string;
95
95
  disclosureIconColor: string;
96
96
  disclosureIconColorHover: string;
97
- contentLeftColor: string;
98
97
  };
99
98
  export declare const constants: {
100
99
  focusColor: string;
@@ -1 +1 @@
1
- {"version":3,"file":"Select.tokens.d.ts","sourceRoot":"","sources":["../../../src/components/Select/Select.tokens.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO;;;;;;;;;;;CAWnB,CAAC;AAEF,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoGlB,CAAC;AAEF,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;CAiBrB,CAAC"}
1
+ {"version":3,"file":"Select.tokens.d.ts","sourceRoot":"","sources":["../../../src/components/Select/Select.tokens.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO;;;;;;;;;;;CAWnB,CAAC;AAEF,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkGlB,CAAC;AAEF,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;CAiBrB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Textfield.styles.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/Select/ui/Target/ui/Textfield/Textfield.styles.tsx"],"names":[],"mappings":";AAQA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAKlE,eAAO,MAAM,gBAAgB;YAAwB,OAAO;WAAS,iBAAiB,CAAC,OAAO,CAAC;EA8B9F,CAAC;AAEF,eAAO,MAAM,YAAY;kBAAkC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wDAyBjE,CAAC;AAEF,eAAO,MAAM,WAAW,6GAAuC,CAAC;AAEhE,eAAO,MAAM,gBAAgB,qKAY5B,CAAC;AAEF,eAAO,MAAM,OAAO,qKAUnB,CAAC;AAEF,eAAO,MAAM,WAAW;iBACP,iBAAiB,CAAC,aAAa,CAAC;WACtC,iBAAiB,CAAC,OAAO,CAAC;EAoBpC,CAAC;AAEF,eAAO,MAAM,KAAK,8KAQjB,CAAC;AAEF,eAAO,MAAM,WAAW,qKAQvB,CAAC;AAEF,eAAO,MAAM,iBAAiB,qKAW7B,CAAC;AAEF,eAAO,MAAM,UAAU,8KAStB,CAAC;AAEF,eAAO,MAAM,kBAAkB,qKAM9B,CAAC;AAEF,eAAO,MAAM,KAAK,uKAEjB,CAAC"}
1
+ {"version":3,"file":"Textfield.styles.d.ts","sourceRoot":"","sources":["../../../../../../../src/components/Select/ui/Target/ui/Textfield/Textfield.styles.tsx"],"names":[],"mappings":";AAQA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAKlE,eAAO,MAAM,gBAAgB;YAAwB,OAAO;WAAS,iBAAiB,CAAC,OAAO,CAAC;EA8B9F,CAAC;AAEF,eAAO,MAAM,YAAY;kBAAkC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wDAyBjE,CAAC;AAEF,eAAO,MAAM,WAAW,6GAAuC,CAAC;AAEhE,eAAO,MAAM,gBAAgB,qKAY5B,CAAC;AAEF,eAAO,MAAM,OAAO,qKAUnB,CAAC;AAEF,eAAO,MAAM,WAAW;iBACP,iBAAiB,CAAC,aAAa,CAAC;WACtC,iBAAiB,CAAC,OAAO,CAAC;EAoBpC,CAAC;AAEF,eAAO,MAAM,KAAK,8KAQjB,CAAC;AAEF,eAAO,MAAM,WAAW,qKAQvB,CAAC;AAEF,eAAO,MAAM,iBAAiB,qKAW7B,CAAC;AAEF,eAAO,MAAM,UAAU,8KAStB,CAAC;AAEF,eAAO,MAAM,kBAAkB,qKAK9B,CAAC;AAEF,eAAO,MAAM,KAAK,uKAEjB,CAAC"}
@@ -14,6 +14,9 @@ export declare const config: {
14
14
  light: import("@linaria/core").LinariaClassName;
15
15
  };
16
16
  size: {
17
+ l: import("@linaria/core").LinariaClassName;
18
+ m: import("@linaria/core").LinariaClassName;
19
+ s: import("@linaria/core").LinariaClassName;
17
20
  xs: import("@linaria/core").LinariaClassName;
18
21
  xxs: import("@linaria/core").LinariaClassName;
19
22
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Counter.config.d.ts","sourceRoot":"","sources":["../../../../../src/examples/plasma_b2c/components/Counter/Counter.config.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;CA+DlB,CAAC"}
1
+ {"version":3,"file":"Counter.config.d.ts","sourceRoot":"","sources":["../../../../../src/examples/plasma_b2c/components/Counter/Counter.config.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;CAmGlB,CAAC"}
@@ -10,6 +10,9 @@ export declare const Counter: import("react").FunctionComponent<import("../../..
10
10
  light: import("@linaria/core").LinariaClassName;
11
11
  };
12
12
  size: {
13
+ l: import("@linaria/core").LinariaClassName;
14
+ m: import("@linaria/core").LinariaClassName;
15
+ s: import("@linaria/core").LinariaClassName;
13
16
  xs: import("@linaria/core").LinariaClassName;
14
17
  xxs: import("@linaria/core").LinariaClassName;
15
18
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Counter.d.ts","sourceRoot":"","sources":["../../../../../src/examples/plasma_b2c/components/Counter/Counter.ts"],"names":[],"mappings":";AAOA,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;kDAA0B,CAAC"}
1
+ {"version":3,"file":"Counter.d.ts","sourceRoot":"","sources":["../../../../../src/examples/plasma_b2c/components/Counter/Counter.ts"],"names":[],"mappings":";AAOA,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;kDAA0B,CAAC"}
@@ -14,6 +14,9 @@ export declare const config: {
14
14
  light: import("@linaria/core").LinariaClassName;
15
15
  };
16
16
  size: {
17
+ l: import("@linaria/core").LinariaClassName;
18
+ m: import("@linaria/core").LinariaClassName;
19
+ s: import("@linaria/core").LinariaClassName;
17
20
  xs: import("@linaria/core").LinariaClassName;
18
21
  xxs: import("@linaria/core").LinariaClassName;
19
22
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Counter.config.d.ts","sourceRoot":"","sources":["../../../../../src/examples/plasma_web/components/Counter/Counter.config.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;CA+DlB,CAAC"}
1
+ {"version":3,"file":"Counter.config.d.ts","sourceRoot":"","sources":["../../../../../src/examples/plasma_web/components/Counter/Counter.config.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;CAmGlB,CAAC"}
@@ -10,6 +10,9 @@ export declare const Counter: import("react").FunctionComponent<import("../../..
10
10
  light: import("@linaria/core").LinariaClassName;
11
11
  };
12
12
  size: {
13
+ l: import("@linaria/core").LinariaClassName;
14
+ m: import("@linaria/core").LinariaClassName;
15
+ s: import("@linaria/core").LinariaClassName;
13
16
  xs: import("@linaria/core").LinariaClassName;
14
17
  xxs: import("@linaria/core").LinariaClassName;
15
18
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Counter.d.ts","sourceRoot":"","sources":["../../../../../src/examples/plasma_web/components/Counter/Counter.ts"],"names":[],"mappings":";AAOA,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;kDAA0B,CAAC"}
1
+ {"version":3,"file":"Counter.d.ts","sourceRoot":"","sources":["../../../../../src/examples/plasma_web/components/Counter/Counter.ts"],"names":[],"mappings":";AAOA,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;kDAA0B,CAAC"}