@salutejs/plasma-new-hope 0.189.1-canary.1532.11794626529.0 → 0.190.0-canary.1538.11794569428.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. package/cjs/components/Breadcrumbs/Breadcrumbs.css +3 -3
  2. package/cjs/components/Breadcrumbs/Breadcrumbs.styles.js +14 -7
  3. package/cjs/components/Breadcrumbs/Breadcrumbs.styles.js.map +1 -1
  4. package/cjs/components/Breadcrumbs/{Breadcrumbs.styles_1icsgdr.css → Breadcrumbs.styles_19b6ey4.css} +1 -1
  5. package/cjs/components/Breadcrumbs/utils/index.css +3 -3
  6. package/cjs/components/Dropdown/Dropdown.js +6 -4
  7. package/cjs/components/Dropdown/Dropdown.js.map +1 -1
  8. package/cjs/index.css +3 -3
  9. package/emotion/cjs/components/Breadcrumbs/Breadcrumbs.styles.js +11 -8
  10. package/emotion/cjs/components/Dropdown/Dropdown.js +6 -4
  11. package/emotion/cjs/examples/plasma_b2c/components/Dropdown/Dropdown.stories.tsx +9 -0
  12. package/emotion/cjs/examples/plasma_b2c/components/Tabs/Tabs.stories.tsx +13 -15
  13. package/emotion/cjs/examples/plasma_web/components/Dropdown/Dropdown.stories.tsx +9 -0
  14. package/emotion/cjs/examples/plasma_web/components/Tabs/Tabs.stories.tsx +12 -14
  15. package/emotion/es/components/Breadcrumbs/Breadcrumbs.styles.js +11 -8
  16. package/emotion/es/components/Dropdown/Dropdown.js +6 -4
  17. package/emotion/es/examples/plasma_b2c/components/Dropdown/Dropdown.stories.tsx +9 -0
  18. package/emotion/es/examples/plasma_b2c/components/Tabs/Tabs.stories.tsx +13 -15
  19. package/emotion/es/examples/plasma_web/components/Dropdown/Dropdown.stories.tsx +9 -0
  20. package/emotion/es/examples/plasma_web/components/Tabs/Tabs.stories.tsx +12 -14
  21. package/es/components/Breadcrumbs/Breadcrumbs.css +3 -3
  22. package/es/components/Breadcrumbs/Breadcrumbs.styles.js +14 -7
  23. package/es/components/Breadcrumbs/Breadcrumbs.styles.js.map +1 -1
  24. package/es/components/Breadcrumbs/{Breadcrumbs.styles_1icsgdr.css → Breadcrumbs.styles_19b6ey4.css} +1 -1
  25. package/es/components/Breadcrumbs/utils/index.css +3 -3
  26. package/es/components/Dropdown/Dropdown.js +6 -4
  27. package/es/components/Dropdown/Dropdown.js.map +1 -1
  28. package/es/index.css +3 -3
  29. package/package.json +2 -2
  30. package/styled-components/cjs/components/Breadcrumbs/Breadcrumbs.styles.js +8 -5
  31. package/styled-components/cjs/components/Dropdown/Dropdown.js +6 -4
  32. package/styled-components/cjs/examples/plasma_b2c/components/Dropdown/Dropdown.stories.tsx +9 -0
  33. package/styled-components/cjs/examples/plasma_b2c/components/Tabs/Tabs.stories.tsx +13 -15
  34. package/styled-components/cjs/examples/plasma_web/components/Dropdown/Dropdown.stories.tsx +9 -0
  35. package/styled-components/cjs/examples/plasma_web/components/Tabs/Tabs.stories.tsx +12 -14
  36. package/styled-components/es/components/Breadcrumbs/Breadcrumbs.styles.js +8 -5
  37. package/styled-components/es/components/Dropdown/Dropdown.js +6 -4
  38. package/styled-components/es/examples/plasma_b2c/components/Dropdown/Dropdown.stories.tsx +9 -0
  39. package/styled-components/es/examples/plasma_b2c/components/Tabs/Tabs.stories.tsx +13 -15
  40. package/styled-components/es/examples/plasma_web/components/Dropdown/Dropdown.stories.tsx +9 -0
  41. package/styled-components/es/examples/plasma_web/components/Tabs/Tabs.stories.tsx +12 -14
  42. package/types/components/Breadcrumbs/Breadcrumbs.styles.d.ts.map +1 -1
  43. package/types/components/Dropdown/Dropdown.d.ts.map +1 -1
  44. package/types/components/Dropdown/Dropdown.types.d.ts +4 -0
  45. package/types/components/Dropdown/Dropdown.types.d.ts.map +1 -1
@@ -20,7 +20,7 @@ var _Dropdown2 = /*#__PURE__*/require("./Dropdown.tokens");
20
20
  var _useKeyboardNavigation = /*#__PURE__*/require("./hooks/useKeyboardNavigation");
21
21
  var _useHashMaps3 = /*#__PURE__*/require("./hooks/useHashMaps");
22
22
  var _FloatingPopover = /*#__PURE__*/require("./FloatingPopover");
23
- var _excluded = ["items", "children", "placement", "offset", "closeOnOverlayClick", "onToggle", "size", "view", "itemRole", "className", "listWidth", "listHeight", "listOverflow", "closeOnSelect", "onHover", "onItemSelect", "onItemClick", "trigger", "variant", "hasArrow", "portal"];
23
+ var _excluded = ["items", "children", "placement", "offset", "closeOnOverlayClick", "onToggle", "size", "view", "itemRole", "className", "listWidth", "listHeight", "listOverflow", "closeOnSelect", "onHover", "onItemSelect", "onItemClick", "trigger", "variant", "hasArrow", "alwaysOpened", "portal"];
24
24
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
25
25
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
26
26
  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); }
@@ -66,6 +66,8 @@ var dropdownRoot = exports.dropdownRoot = function dropdownRoot(Root) {
66
66
  variant = _ref$variant === void 0 ? 'normal' : _ref$variant,
67
67
  _ref$hasArrow = _ref.hasArrow,
68
68
  hasArrow = _ref$hasArrow === void 0 ? true : _ref$hasArrow,
69
+ _ref$alwaysOpened = _ref.alwaysOpened,
70
+ alwaysOpened = _ref$alwaysOpened === void 0 ? false : _ref$alwaysOpened,
69
71
  portal = _ref.portal,
70
72
  rest = _objectWithoutProperties(_ref, _excluded);
71
73
  var _useReducer = (0, _react.useReducer)(_pathReducer.pathReducer, []),
@@ -86,7 +88,7 @@ var dropdownRoot = exports.dropdownRoot = function dropdownRoot(Root) {
86
88
 
87
89
  // Логика работы при клике за пределами выпадающего списка
88
90
  var targetRef = (0, _hooks.useOutsideClick)(function (event) {
89
- if (!isCurrentListOpen || !closeOnOverlayClick) {
91
+ if (!isCurrentListOpen || !closeOnOverlayClick || alwaysOpened) {
90
92
  return;
91
93
  }
92
94
  dispatchPath({
@@ -100,7 +102,7 @@ var dropdownRoot = exports.dropdownRoot = function dropdownRoot(Root) {
100
102
  }
101
103
  }, floatingPopoverRef);
102
104
  var handleGlobalToggle = function handleGlobalToggle(opened, event) {
103
- if (opened) {
105
+ if (alwaysOpened || opened) {
104
106
  dispatchPath({
105
107
  type: 'opened_first_level'
106
108
  });
@@ -129,7 +131,7 @@ var dropdownRoot = exports.dropdownRoot = function dropdownRoot(Root) {
129
131
  onItemClick: onItemClick
130
132
  }),
131
133
  onKeyDown = _useKeyNavigation.onKeyDown;
132
- var isCurrentListOpen = Boolean(path[0]);
134
+ var isCurrentListOpen = alwaysOpened || Boolean(path[0]);
133
135
  return /*#__PURE__*/_react["default"].createElement(Context.Provider, {
134
136
  value: {
135
137
  focusedPath: focusedPath,
@@ -45,6 +45,14 @@ const meta: Meta<StoryDropdownProps> = {
45
45
  type: 'select',
46
46
  },
47
47
  },
48
+ closeOnOverlayClick: {
49
+ control: { type: 'boolean' },
50
+ if: { arg: 'alwaysOpened', truthy: false },
51
+ },
52
+ closeOnSelect: {
53
+ control: { type: 'boolean' },
54
+ if: { arg: 'alwaysOpened', truthy: false },
55
+ },
48
56
  },
49
57
  args: {
50
58
  size: 'm',
@@ -54,6 +62,7 @@ const meta: Meta<StoryDropdownProps> = {
54
62
  offset: [0, 0],
55
63
  listWidth: '',
56
64
  hasArrow: true,
65
+ alwaysOpened: false,
57
66
  closeOnOverlayClick: true,
58
67
  closeOnSelect: true,
59
68
  },
@@ -25,7 +25,6 @@ type CustomStoryTabsProps = {
25
25
  contentRight: string;
26
26
  stretch: boolean;
27
27
  helperText: string;
28
- maxItemWidth: string;
29
28
  };
30
29
 
31
30
  const contentLeftOptions = ['none', 'icon'];
@@ -60,6 +59,17 @@ const meta: Meta<StoryTabsProps> = {
60
59
  component: Tabs,
61
60
  decorators: [WithTheme],
62
61
  argTypes: {
62
+ ...disableProps([
63
+ 'orientation',
64
+ 'tabItemContentLeft',
65
+ 'pilled',
66
+ 'animated',
67
+ 'view',
68
+ 'as',
69
+ 'forwardedAs',
70
+ 'outsideScroll',
71
+ 'index',
72
+ ]),
63
73
  contentRight: {
64
74
  options: contentRightOptions,
65
75
  control: {
@@ -73,17 +83,6 @@ const meta: Meta<StoryTabsProps> = {
73
83
  },
74
84
  if: { arg: 'stretch', truthy: false },
75
85
  },
76
- ...disableProps([
77
- 'orientation',
78
- 'tabItemContentLeft',
79
- 'pilled',
80
- 'animated',
81
- 'view',
82
- 'as',
83
- 'forwardedAs',
84
- 'outsideScroll',
85
- 'index',
86
- ]),
87
86
  },
88
87
  };
89
88
 
@@ -100,13 +99,12 @@ const StoryHorizontalDefault = (props: HorizontalStoryTabsProps) => {
100
99
  stretch,
101
100
  maxItemWidth,
102
101
  helperText,
103
- clip,
104
102
  } = props;
105
103
  const items = Array(itemQuantity).fill(0);
106
104
  const [index, setIndex] = useState(0);
107
105
 
108
106
  return (
109
- <Tabs clip={clip} view="divider" hasDivider={hasDivider} stretch={stretch} disabled={disabled} size={size}>
107
+ <Tabs clip="none" view="divider" hasDivider={hasDivider} stretch={stretch} disabled={disabled} size={size}>
110
108
  {items.map((_, i) => {
111
109
  if (helperText !== '') {
112
110
  return (
@@ -653,7 +651,7 @@ const StoryHeaderDefault = (props: HorizontalStoryTabsProps) => {
653
651
  size={size as HeaderSize}
654
652
  maxItemWidth={maxItemWidth}
655
653
  >
656
- {`${labels[i % labels.length]} ${i + 1}`}
654
+ {`Label${i + 1}`}
657
655
  </TabItem>
658
656
  ))}
659
657
  </Tabs>
@@ -45,6 +45,14 @@ const meta: Meta<StoryDropdownProps> = {
45
45
  type: 'select',
46
46
  },
47
47
  },
48
+ closeOnOverlayClick: {
49
+ control: { type: 'boolean' },
50
+ if: { arg: 'alwaysOpened', truthy: false },
51
+ },
52
+ closeOnSelect: {
53
+ control: { type: 'boolean' },
54
+ if: { arg: 'alwaysOpened', truthy: false },
55
+ },
48
56
  },
49
57
  args: {
50
58
  size: 'm',
@@ -54,6 +62,7 @@ const meta: Meta<StoryDropdownProps> = {
54
62
  offset: [0, 0],
55
63
  listWidth: '',
56
64
  hasArrow: true,
65
+ alwaysOpened: false,
57
66
  closeOnOverlayClick: true,
58
67
  closeOnSelect: true,
59
68
  },
@@ -25,7 +25,6 @@ type CustomStoryTabsProps = {
25
25
  contentRight: string;
26
26
  stretch: boolean;
27
27
  helperText: string;
28
- maxItemWidth: string;
29
28
  };
30
29
 
31
30
  const contentLeftOptions = ['none', 'icon'];
@@ -60,6 +59,17 @@ const meta: Meta<StoryTabsProps> = {
60
59
  component: Tabs,
61
60
  decorators: [WithTheme],
62
61
  argTypes: {
62
+ ...disableProps([
63
+ 'orientation',
64
+ 'tabItemContentLeft',
65
+ 'pilled',
66
+ 'animated',
67
+ 'view',
68
+ 'as',
69
+ 'forwardedAs',
70
+ 'outsideScroll',
71
+ 'index',
72
+ ]),
63
73
  contentRight: {
64
74
  options: contentRightOptions,
65
75
  control: {
@@ -73,17 +83,6 @@ const meta: Meta<StoryTabsProps> = {
73
83
  },
74
84
  if: { arg: 'stretch', truthy: false },
75
85
  },
76
- ...disableProps([
77
- 'orientation',
78
- 'tabItemContentLeft',
79
- 'pilled',
80
- 'animated',
81
- 'view',
82
- 'as',
83
- 'forwardedAs',
84
- 'outsideScroll',
85
- 'index',
86
- ]),
87
86
  },
88
87
  };
89
88
 
@@ -100,13 +99,12 @@ const StoryHorizontalDefault = (props: HorizontalStoryTabsProps) => {
100
99
  stretch,
101
100
  maxItemWidth,
102
101
  helperText,
103
- clip,
104
102
  } = props;
105
103
  const items = Array(itemQuantity).fill(0);
106
104
  const [index, setIndex] = useState(0);
107
105
 
108
106
  return (
109
- <Tabs clip={clip} view="divider" hasDivider={hasDivider} stretch={stretch} disabled={disabled} size={size}>
107
+ <Tabs clip="none" view="divider" hasDivider={hasDivider} stretch={stretch} disabled={disabled} size={size}>
110
108
  {items.map((_, i) => {
111
109
  if (helperText !== '') {
112
110
  return (
@@ -9,13 +9,16 @@ var mergedLinkConfig = /*#__PURE__*/mergeConfig(linkConfig);
9
9
  var Link = /*#__PURE__*/component(mergedLinkConfig);
10
10
  export var StyledLink = /*#__PURE__*/styled(Link).withConfig({
11
11
  componentId: "plasma-new-hope__sc-4bjoev-0"
12
- })(["--plasma__private-color:", ";--plasma-link-color:var(--plasma__private-color);--plasma-link-color-hover:var(--plasma__private-color);--plasma-link-color-active:var(--plasma__private-color);--plasma-link-disabled-opacity:var(", ");opacity:", ";cursor:pointer;", ""], function (_ref) {
12
+ })(["opacity:", ";cursor:", ";color:", ";--plasma-link-disabled-opacity:var(", ");", ""], function (_ref) {
13
13
  var isHref = _ref.isHref;
14
- return isHref ? "var(".concat(tokens.breadcrumbsColor, ")") : "var(".concat(tokens.breadcrumbsColorText, ")");
15
- }, tokens.breadcrumbsOpacity, function (_ref2) {
16
- var isHref = _ref2.isHref;
17
14
  return isHref ? 1 : "var(".concat(tokens.breadcrumbsOpacity, ")");
18
- }, /*#__PURE__*/addFocus({
15
+ }, function (_ref2) {
16
+ var isHref = _ref2.isHref;
17
+ return isHref ? 'pointer' : 'auto';
18
+ }, function (_ref3) {
19
+ var isHref = _ref3.isHref;
20
+ return isHref ? "var(".concat(tokens.breadcrumbsColor, ")") : "var(".concat(tokens.breadcrumbsColorText, ")");
21
+ }, tokens.breadcrumbsOpacity, /*#__PURE__*/addFocus({
19
22
  outlineOffset: '0rem',
20
23
  outlineSize: '0.125rem',
21
24
  outlineRadius: '0rem',
@@ -1,4 +1,4 @@
1
- var _excluded = ["items", "children", "placement", "offset", "closeOnOverlayClick", "onToggle", "size", "view", "itemRole", "className", "listWidth", "listHeight", "listOverflow", "closeOnSelect", "onHover", "onItemSelect", "onItemClick", "trigger", "variant", "hasArrow", "portal"];
1
+ var _excluded = ["items", "children", "placement", "offset", "closeOnOverlayClick", "onToggle", "size", "view", "itemRole", "className", "listWidth", "listHeight", "listOverflow", "closeOnSelect", "onHover", "onItemSelect", "onItemClick", "trigger", "variant", "hasArrow", "alwaysOpened", "portal"];
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 _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
4
4
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
@@ -57,6 +57,8 @@ export var dropdownRoot = function dropdownRoot(Root) {
57
57
  variant = _ref$variant === void 0 ? 'normal' : _ref$variant,
58
58
  _ref$hasArrow = _ref.hasArrow,
59
59
  hasArrow = _ref$hasArrow === void 0 ? true : _ref$hasArrow,
60
+ _ref$alwaysOpened = _ref.alwaysOpened,
61
+ alwaysOpened = _ref$alwaysOpened === void 0 ? false : _ref$alwaysOpened,
60
62
  portal = _ref.portal,
61
63
  rest = _objectWithoutProperties(_ref, _excluded);
62
64
  var _useReducer = useReducer(pathReducer, []),
@@ -77,7 +79,7 @@ export var dropdownRoot = function dropdownRoot(Root) {
77
79
 
78
80
  // Логика работы при клике за пределами выпадающего списка
79
81
  var targetRef = useOutsideClick(function (event) {
80
- if (!isCurrentListOpen || !closeOnOverlayClick) {
82
+ if (!isCurrentListOpen || !closeOnOverlayClick || alwaysOpened) {
81
83
  return;
82
84
  }
83
85
  dispatchPath({
@@ -91,7 +93,7 @@ export var dropdownRoot = function dropdownRoot(Root) {
91
93
  }
92
94
  }, floatingPopoverRef);
93
95
  var handleGlobalToggle = function handleGlobalToggle(opened, event) {
94
- if (opened) {
96
+ if (alwaysOpened || opened) {
95
97
  dispatchPath({
96
98
  type: 'opened_first_level'
97
99
  });
@@ -120,7 +122,7 @@ export var dropdownRoot = function dropdownRoot(Root) {
120
122
  onItemClick: onItemClick
121
123
  }),
122
124
  onKeyDown = _useKeyNavigation.onKeyDown;
123
- var isCurrentListOpen = Boolean(path[0]);
125
+ var isCurrentListOpen = alwaysOpened || Boolean(path[0]);
124
126
  return /*#__PURE__*/React.createElement(Context.Provider, {
125
127
  value: {
126
128
  focusedPath: focusedPath,
@@ -45,6 +45,14 @@ const meta: Meta<StoryDropdownProps> = {
45
45
  type: 'select',
46
46
  },
47
47
  },
48
+ closeOnOverlayClick: {
49
+ control: { type: 'boolean' },
50
+ if: { arg: 'alwaysOpened', truthy: false },
51
+ },
52
+ closeOnSelect: {
53
+ control: { type: 'boolean' },
54
+ if: { arg: 'alwaysOpened', truthy: false },
55
+ },
48
56
  },
49
57
  args: {
50
58
  size: 'm',
@@ -54,6 +62,7 @@ const meta: Meta<StoryDropdownProps> = {
54
62
  offset: [0, 0],
55
63
  listWidth: '',
56
64
  hasArrow: true,
65
+ alwaysOpened: false,
57
66
  closeOnOverlayClick: true,
58
67
  closeOnSelect: true,
59
68
  },
@@ -25,7 +25,6 @@ type CustomStoryTabsProps = {
25
25
  contentRight: string;
26
26
  stretch: boolean;
27
27
  helperText: string;
28
- maxItemWidth: string;
29
28
  };
30
29
 
31
30
  const contentLeftOptions = ['none', 'icon'];
@@ -60,6 +59,17 @@ const meta: Meta<StoryTabsProps> = {
60
59
  component: Tabs,
61
60
  decorators: [WithTheme],
62
61
  argTypes: {
62
+ ...disableProps([
63
+ 'orientation',
64
+ 'tabItemContentLeft',
65
+ 'pilled',
66
+ 'animated',
67
+ 'view',
68
+ 'as',
69
+ 'forwardedAs',
70
+ 'outsideScroll',
71
+ 'index',
72
+ ]),
63
73
  contentRight: {
64
74
  options: contentRightOptions,
65
75
  control: {
@@ -73,17 +83,6 @@ const meta: Meta<StoryTabsProps> = {
73
83
  },
74
84
  if: { arg: 'stretch', truthy: false },
75
85
  },
76
- ...disableProps([
77
- 'orientation',
78
- 'tabItemContentLeft',
79
- 'pilled',
80
- 'animated',
81
- 'view',
82
- 'as',
83
- 'forwardedAs',
84
- 'outsideScroll',
85
- 'index',
86
- ]),
87
86
  },
88
87
  };
89
88
 
@@ -100,13 +99,12 @@ const StoryHorizontalDefault = (props: HorizontalStoryTabsProps) => {
100
99
  stretch,
101
100
  maxItemWidth,
102
101
  helperText,
103
- clip,
104
102
  } = props;
105
103
  const items = Array(itemQuantity).fill(0);
106
104
  const [index, setIndex] = useState(0);
107
105
 
108
106
  return (
109
- <Tabs clip={clip} view="divider" hasDivider={hasDivider} stretch={stretch} disabled={disabled} size={size}>
107
+ <Tabs clip="none" view="divider" hasDivider={hasDivider} stretch={stretch} disabled={disabled} size={size}>
110
108
  {items.map((_, i) => {
111
109
  if (helperText !== '') {
112
110
  return (
@@ -653,7 +651,7 @@ const StoryHeaderDefault = (props: HorizontalStoryTabsProps) => {
653
651
  size={size as HeaderSize}
654
652
  maxItemWidth={maxItemWidth}
655
653
  >
656
- {`${labels[i % labels.length]} ${i + 1}`}
654
+ {`Label${i + 1}`}
657
655
  </TabItem>
658
656
  ))}
659
657
  </Tabs>
@@ -45,6 +45,14 @@ const meta: Meta<StoryDropdownProps> = {
45
45
  type: 'select',
46
46
  },
47
47
  },
48
+ closeOnOverlayClick: {
49
+ control: { type: 'boolean' },
50
+ if: { arg: 'alwaysOpened', truthy: false },
51
+ },
52
+ closeOnSelect: {
53
+ control: { type: 'boolean' },
54
+ if: { arg: 'alwaysOpened', truthy: false },
55
+ },
48
56
  },
49
57
  args: {
50
58
  size: 'm',
@@ -54,6 +62,7 @@ const meta: Meta<StoryDropdownProps> = {
54
62
  offset: [0, 0],
55
63
  listWidth: '',
56
64
  hasArrow: true,
65
+ alwaysOpened: false,
57
66
  closeOnOverlayClick: true,
58
67
  closeOnSelect: true,
59
68
  },
@@ -25,7 +25,6 @@ type CustomStoryTabsProps = {
25
25
  contentRight: string;
26
26
  stretch: boolean;
27
27
  helperText: string;
28
- maxItemWidth: string;
29
28
  };
30
29
 
31
30
  const contentLeftOptions = ['none', 'icon'];
@@ -60,6 +59,17 @@ const meta: Meta<StoryTabsProps> = {
60
59
  component: Tabs,
61
60
  decorators: [WithTheme],
62
61
  argTypes: {
62
+ ...disableProps([
63
+ 'orientation',
64
+ 'tabItemContentLeft',
65
+ 'pilled',
66
+ 'animated',
67
+ 'view',
68
+ 'as',
69
+ 'forwardedAs',
70
+ 'outsideScroll',
71
+ 'index',
72
+ ]),
63
73
  contentRight: {
64
74
  options: contentRightOptions,
65
75
  control: {
@@ -73,17 +83,6 @@ const meta: Meta<StoryTabsProps> = {
73
83
  },
74
84
  if: { arg: 'stretch', truthy: false },
75
85
  },
76
- ...disableProps([
77
- 'orientation',
78
- 'tabItemContentLeft',
79
- 'pilled',
80
- 'animated',
81
- 'view',
82
- 'as',
83
- 'forwardedAs',
84
- 'outsideScroll',
85
- 'index',
86
- ]),
87
86
  },
88
87
  };
89
88
 
@@ -100,13 +99,12 @@ const StoryHorizontalDefault = (props: HorizontalStoryTabsProps) => {
100
99
  stretch,
101
100
  maxItemWidth,
102
101
  helperText,
103
- clip,
104
102
  } = props;
105
103
  const items = Array(itemQuantity).fill(0);
106
104
  const [index, setIndex] = useState(0);
107
105
 
108
106
  return (
109
- <Tabs clip={clip} view="divider" hasDivider={hasDivider} stretch={stretch} disabled={disabled} size={size}>
107
+ <Tabs clip="none" view="divider" hasDivider={hasDivider} stretch={stretch} disabled={disabled} size={size}>
110
108
  {items.map((_, i) => {
111
109
  if (helperText !== '') {
112
110
  return (
@@ -1 +1 @@
1
- {"version":3,"file":"Breadcrumbs.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Breadcrumbs/Breadcrumbs.styles.ts"],"names":[],"mappings":";AAaA,eAAO,MAAM,UAAU;YAA0B,OAAO;0OAmBvD,CAAC;AAEF,eAAO,MAAM,IAAI,0CAahB,CAAC;AAEF,eAAO,MAAM,SAAS,iGAGrB,CAAC"}
1
+ {"version":3,"file":"Breadcrumbs.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Breadcrumbs/Breadcrumbs.styles.ts"],"names":[],"mappings":";AAaA,eAAO,MAAM,UAAU;YAA0B,OAAO;0OAavD,CAAC;AAEF,eAAO,MAAM,IAAI,0CAahB,CAAC;AAEF,eAAO,MAAM,SAAS,iGAGrB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Dropdown.d.ts","sourceRoot":"","sources":["../../../src/components/Dropdown/Dropdown.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwD,MAAM,OAAO,CAAC;AAG7E,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAW1C,OAAO,KAAK,EAAE,aAAa,EAA0B,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAM3F,eAAO,MAAM,OAAO,4BAAgD,CAAC;AAErE;;GAEG;AACH,eAAO,MAAM,YAAY,SAAU,UAAU,cAAc,EAAE,KAAK,aAAa,EAAE,OAAO,CAAC,CAAC,yFAwJrF,CAAC;AAEN,eAAO,MAAM,cAAc;;;mBA1JQ,UAAU,cAAc,EAAE,KAAK,aAAa,EAAE,OAAO,CAAC,CAAC;;;;;;;;;;;;;;CA2KzF,CAAC"}
1
+ {"version":3,"file":"Dropdown.d.ts","sourceRoot":"","sources":["../../../src/components/Dropdown/Dropdown.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwD,MAAM,OAAO,CAAC;AAG7E,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAW1C,OAAO,KAAK,EAAE,aAAa,EAA0B,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAM3F,eAAO,MAAM,OAAO,4BAAgD,CAAC;AAErE;;GAEG;AACH,eAAO,MAAM,YAAY,SAAU,UAAU,cAAc,EAAE,KAAK,aAAa,EAAE,OAAO,CAAC,CAAC,yFAyJrF,CAAC;AAEN,eAAO,MAAM,cAAc;;;mBA3JQ,UAAU,cAAc,EAAE,KAAK,aAAa,EAAE,OAAO,CAAC,CAAC;;;;;;;;;;;;;;CA4KzF,CAAC"}
@@ -9,6 +9,10 @@ export interface DropdownProps extends HTMLAttributes<HTMLDivElement> {
9
9
  * Список элементов.
10
10
  */
11
11
  items: Array<DropdownItemOption>;
12
+ /**
13
+ * Дропдаун открыт всегда.
14
+ */
15
+ alwaysOpened?: boolean;
12
16
  /**
13
17
  * Target для открытия.
14
18
  */
@@ -1 +1 @@
1
- {"version":3,"file":"Dropdown.types.d.ts","sourceRoot":"","sources":["../../../src/components/Dropdown/Dropdown.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AACtF,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AAEzE,oBAAY,iBAAiB,GAAG,MAAM,GAAG,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;AAE7E,oBAAY,eAAe,GAAG,OAAO,GAAG,OAAO,CAAC;AAEhD,MAAM,WAAW,aAAc,SAAQ,cAAc,CAAC,cAAc,CAAC;IACjE;;OAEG;IACH,KAAK,EAAE,KAAK,CAAC,kBAAkB,CAAC,CAAC;IACjC;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,E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