@salutejs/plasma-new-hope 0.189.0-canary.1551.11792996525.0 → 0.189.1-canary.1532.11793947290.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. package/cjs/components/Breadcrumbs/Breadcrumbs.css +3 -3
  2. package/cjs/components/Breadcrumbs/Breadcrumbs.styles.js +7 -14
  3. package/cjs/components/Breadcrumbs/Breadcrumbs.styles.js.map +1 -1
  4. package/cjs/components/Breadcrumbs/{Breadcrumbs.styles_19b6ey4.css → Breadcrumbs.styles_1icsgdr.css} +1 -1
  5. package/cjs/components/Breadcrumbs/utils/index.css +3 -3
  6. package/cjs/components/TextArea/TextArea.js +1 -1
  7. package/cjs/components/TextArea/TextArea.js.map +1 -1
  8. package/cjs/components/TextArea/hooks/useAutoResize.js +3 -3
  9. package/cjs/components/TextArea/hooks/useAutoResize.js.map +1 -1
  10. package/cjs/index.css +3 -3
  11. package/emotion/cjs/components/Breadcrumbs/Breadcrumbs.styles.js +8 -11
  12. package/emotion/cjs/components/TextArea/TextArea.js +2 -2
  13. package/emotion/cjs/components/TextArea/hooks/useAutoResize.js +3 -3
  14. package/emotion/cjs/examples/plasma_b2c/components/Tabs/Tabs.stories.tsx +15 -13
  15. package/emotion/cjs/examples/plasma_b2c/components/TextField/TextField.config.js +16 -16
  16. package/emotion/cjs/examples/plasma_web/components/Tabs/Tabs.stories.tsx +14 -12
  17. package/emotion/es/components/Breadcrumbs/Breadcrumbs.styles.js +8 -11
  18. package/emotion/es/components/TextArea/TextArea.js +2 -2
  19. package/emotion/es/components/TextArea/hooks/useAutoResize.js +3 -3
  20. package/emotion/es/examples/plasma_b2c/components/Tabs/Tabs.stories.tsx +15 -13
  21. package/emotion/es/examples/plasma_b2c/components/TextField/TextField.config.js +16 -16
  22. package/emotion/es/examples/plasma_web/components/Tabs/Tabs.stories.tsx +14 -12
  23. package/es/components/Breadcrumbs/Breadcrumbs.css +3 -3
  24. package/es/components/Breadcrumbs/Breadcrumbs.styles.js +7 -14
  25. package/es/components/Breadcrumbs/Breadcrumbs.styles.js.map +1 -1
  26. package/es/components/Breadcrumbs/{Breadcrumbs.styles_19b6ey4.css → Breadcrumbs.styles_1icsgdr.css} +1 -1
  27. package/es/components/Breadcrumbs/utils/index.css +3 -3
  28. package/es/components/TextArea/TextArea.js +1 -1
  29. package/es/components/TextArea/TextArea.js.map +1 -1
  30. package/es/components/TextArea/hooks/useAutoResize.js +3 -3
  31. package/es/components/TextArea/hooks/useAutoResize.js.map +1 -1
  32. package/es/index.css +3 -3
  33. package/package.json +2 -2
  34. package/styled-components/cjs/components/Breadcrumbs/Breadcrumbs.styles.js +5 -8
  35. package/styled-components/cjs/components/TextArea/TextArea.js +1 -1
  36. package/styled-components/cjs/components/TextArea/hooks/useAutoResize.js +3 -3
  37. package/styled-components/cjs/examples/plasma_b2c/components/Tabs/Tabs.stories.tsx +15 -13
  38. package/styled-components/cjs/examples/plasma_b2c/components/TextField/TextField.config.js +4 -4
  39. package/styled-components/cjs/examples/plasma_web/components/Tabs/Tabs.stories.tsx +14 -12
  40. package/styled-components/es/components/Breadcrumbs/Breadcrumbs.styles.js +5 -8
  41. package/styled-components/es/components/TextArea/TextArea.js +1 -1
  42. package/styled-components/es/components/TextArea/hooks/useAutoResize.js +3 -3
  43. package/styled-components/es/examples/plasma_b2c/components/Tabs/Tabs.stories.tsx +15 -13
  44. package/styled-components/es/examples/plasma_b2c/components/TextField/TextField.config.js +4 -4
  45. package/styled-components/es/examples/plasma_web/components/Tabs/Tabs.stories.tsx +14 -12
  46. package/types/components/Breadcrumbs/Breadcrumbs.styles.d.ts.map +1 -1
  47. package/types/components/TextArea/hooks/useAutoResize.d.ts +1 -1
  48. package/types/components/TextArea/hooks/useAutoResize.d.ts.map +1 -1
  49. package/types/examples/plasma_b2c/components/TextField/TextField.config.d.ts.map +1 -1
@@ -6,13 +6,13 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.useAutoResize = exports.ROOT_FONT_SIZE = void 0;
7
7
  var _react = /*#__PURE__*/require("react");
8
8
  var ROOT_FONT_SIZE = exports.ROOT_FONT_SIZE = 16;
9
- var useAutoResize = exports.useAutoResize = function useAutoResize(active, ref, value, minAuto, maxAuto) {
9
+ var useAutoResize = exports.useAutoResize = function useAutoResize(active, ref, value, minAuto, maxAuto, resize) {
10
10
  var previousHeight = (0, _react.useRef)();
11
11
  (0, _react.useEffect)(function () {
12
12
  if (active && ref && ref.current) {
13
13
  // проверка на пользовательский resize (вручную)
14
14
  var height = ref.current.clientHeight / ROOT_FONT_SIZE;
15
- if (previousHeight.current !== undefined && previousHeight.current !== height) {
15
+ if (resize && resize !== 'none' && previousHeight.current !== undefined && previousHeight.current !== height) {
16
16
  return;
17
17
  }
18
18
  var style = getComputedStyle(ref.current);
@@ -27,5 +27,5 @@ var useAutoResize = exports.useAutoResize = function useAutoResize(active, ref,
27
27
  ref.current.style.height = "".concat(newHeight, "rem");
28
28
  previousHeight.current = newHeight;
29
29
  }
30
- }, [ref, active, value, minAuto, maxAuto]);
30
+ }, [ref, resize, active, value, minAuto, maxAuto]);
31
31
  };
@@ -25,6 +25,7 @@ type CustomStoryTabsProps = {
25
25
  contentRight: string;
26
26
  stretch: boolean;
27
27
  helperText: string;
28
+ maxItemWidth: string;
28
29
  };
29
30
 
30
31
  const contentLeftOptions = ['none', 'icon'];
@@ -59,17 +60,6 @@ const meta: Meta<StoryTabsProps> = {
59
60
  component: Tabs,
60
61
  decorators: [WithTheme],
61
62
  argTypes: {
62
- ...disableProps([
63
- 'orientation',
64
- 'tabItemContentLeft',
65
- 'pilled',
66
- 'animated',
67
- 'view',
68
- 'as',
69
- 'forwardedAs',
70
- 'outsideScroll',
71
- 'index',
72
- ]),
73
63
  contentRight: {
74
64
  options: contentRightOptions,
75
65
  control: {
@@ -83,6 +73,17 @@ const meta: Meta<StoryTabsProps> = {
83
73
  },
84
74
  if: { arg: 'stretch', truthy: false },
85
75
  },
76
+ ...disableProps([
77
+ 'orientation',
78
+ 'tabItemContentLeft',
79
+ 'pilled',
80
+ 'animated',
81
+ 'view',
82
+ 'as',
83
+ 'forwardedAs',
84
+ 'outsideScroll',
85
+ 'index',
86
+ ]),
86
87
  },
87
88
  };
88
89
 
@@ -99,12 +100,13 @@ const StoryHorizontalDefault = (props: HorizontalStoryTabsProps) => {
99
100
  stretch,
100
101
  maxItemWidth,
101
102
  helperText,
103
+ clip,
102
104
  } = props;
103
105
  const items = Array(itemQuantity).fill(0);
104
106
  const [index, setIndex] = useState(0);
105
107
 
106
108
  return (
107
- <Tabs clip="none" view="divider" hasDivider={hasDivider} stretch={stretch} disabled={disabled} size={size}>
109
+ <Tabs clip={clip} view="divider" hasDivider={hasDivider} stretch={stretch} disabled={disabled} size={size}>
108
110
  {items.map((_, i) => {
109
111
  if (helperText !== '') {
110
112
  return (
@@ -651,7 +653,7 @@ const StoryHeaderDefault = (props: HorizontalStoryTabsProps) => {
651
653
  size={size as HeaderSize}
652
654
  maxItemWidth={maxItemWidth}
653
655
  >
654
- {`Label${i + 1}`}
656
+ {`${labels[i % labels.length]} ${i + 1}`}
655
657
  </TabItem>
656
658
  ))}
657
659
  </Tabs>