@salutejs/plasma-new-hope 0.190.0-canary.1552.11794692529.0 → 0.190.1-canary.1532.11798057558.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (105) 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/Combobox/ComboboxNew/Combobox.css +0 -2
  7. package/cjs/components/Combobox/ComboboxNew/Combobox.js +6 -31
  8. package/cjs/components/Combobox/ComboboxNew/Combobox.js.map +1 -1
  9. package/cjs/components/Combobox/ComboboxNew/ui/Inner/Inner.css +0 -2
  10. package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.css +0 -2
  11. package/cjs/components/Dropdown/Dropdown.js +6 -4
  12. package/cjs/components/Dropdown/Dropdown.js.map +1 -1
  13. package/cjs/index.css +3 -5
  14. package/emotion/cjs/components/Breadcrumbs/Breadcrumbs.styles.js +8 -11
  15. package/emotion/cjs/components/Combobox/ComboboxNew/Combobox.js +7 -32
  16. package/emotion/cjs/components/Dropdown/Dropdown.js +6 -4
  17. package/emotion/cjs/examples/plasma_b2c/components/Combobox/Combobox.stories.tsx +1 -1
  18. package/emotion/cjs/examples/plasma_b2c/components/Dropdown/Dropdown.stories.tsx +9 -0
  19. package/emotion/cjs/examples/plasma_b2c/components/Tabs/Tabs.stories.tsx +15 -13
  20. package/emotion/cjs/examples/plasma_web/components/Dropdown/Dropdown.stories.tsx +9 -0
  21. package/emotion/cjs/examples/plasma_web/components/Tabs/Tabs.stories.tsx +14 -12
  22. package/emotion/es/components/Breadcrumbs/Breadcrumbs.styles.js +8 -11
  23. package/emotion/es/components/Combobox/ComboboxNew/Combobox.js +7 -33
  24. package/emotion/es/components/Dropdown/Dropdown.js +6 -4
  25. package/emotion/es/examples/plasma_b2c/components/Combobox/Combobox.stories.tsx +1 -1
  26. package/emotion/es/examples/plasma_b2c/components/Dropdown/Dropdown.stories.tsx +9 -0
  27. package/emotion/es/examples/plasma_b2c/components/Tabs/Tabs.stories.tsx +15 -13
  28. package/emotion/es/examples/plasma_web/components/Dropdown/Dropdown.stories.tsx +9 -0
  29. package/emotion/es/examples/plasma_web/components/Tabs/Tabs.stories.tsx +14 -12
  30. package/es/components/Breadcrumbs/Breadcrumbs.css +3 -3
  31. package/es/components/Breadcrumbs/Breadcrumbs.styles.js +7 -14
  32. package/es/components/Breadcrumbs/Breadcrumbs.styles.js.map +1 -1
  33. package/es/components/Breadcrumbs/{Breadcrumbs.styles_19b6ey4.css → Breadcrumbs.styles_1icsgdr.css} +1 -1
  34. package/es/components/Breadcrumbs/utils/index.css +3 -3
  35. package/es/components/Combobox/ComboboxNew/Combobox.css +0 -2
  36. package/es/components/Combobox/ComboboxNew/Combobox.js +8 -33
  37. package/es/components/Combobox/ComboboxNew/Combobox.js.map +1 -1
  38. package/es/components/Combobox/ComboboxNew/ui/Inner/Inner.css +0 -2
  39. package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.css +0 -2
  40. package/es/components/Dropdown/Dropdown.js +6 -4
  41. package/es/components/Dropdown/Dropdown.js.map +1 -1
  42. package/es/index.css +3 -5
  43. package/package.json +2 -2
  44. package/styled-components/cjs/components/Breadcrumbs/Breadcrumbs.styles.js +5 -8
  45. package/styled-components/cjs/components/Combobox/ComboboxNew/Combobox.js +7 -32
  46. package/styled-components/cjs/components/Dropdown/Dropdown.js +6 -4
  47. package/styled-components/cjs/examples/plasma_b2c/components/Combobox/Combobox.stories.tsx +1 -1
  48. package/styled-components/cjs/examples/plasma_b2c/components/Dropdown/Dropdown.stories.tsx +9 -0
  49. package/styled-components/cjs/examples/plasma_b2c/components/Tabs/Tabs.stories.tsx +15 -13
  50. package/styled-components/cjs/examples/plasma_web/components/Dropdown/Dropdown.stories.tsx +9 -0
  51. package/styled-components/cjs/examples/plasma_web/components/Tabs/Tabs.stories.tsx +14 -12
  52. package/styled-components/es/components/Breadcrumbs/Breadcrumbs.styles.js +5 -8
  53. package/styled-components/es/components/Combobox/ComboboxNew/Combobox.js +7 -33
  54. package/styled-components/es/components/Dropdown/Dropdown.js +6 -4
  55. package/styled-components/es/examples/plasma_b2c/components/Combobox/Combobox.stories.tsx +1 -1
  56. package/styled-components/es/examples/plasma_b2c/components/Dropdown/Dropdown.stories.tsx +9 -0
  57. package/styled-components/es/examples/plasma_b2c/components/Tabs/Tabs.stories.tsx +15 -13
  58. package/styled-components/es/examples/plasma_web/components/Dropdown/Dropdown.stories.tsx +9 -0
  59. package/styled-components/es/examples/plasma_web/components/Tabs/Tabs.stories.tsx +14 -12
  60. package/types/components/Breadcrumbs/Breadcrumbs.styles.d.ts.map +1 -1
  61. package/types/components/Combobox/ComboboxNew/Combobox.d.ts +2 -2
  62. package/types/components/Combobox/ComboboxNew/Combobox.d.ts.map +1 -1
  63. package/types/components/Combobox/ComboboxNew/Combobox.types.d.ts +2 -24
  64. package/types/components/Combobox/ComboboxNew/Combobox.types.d.ts.map +1 -1
  65. package/types/components/Dropdown/Dropdown.d.ts.map +1 -1
  66. package/types/components/Dropdown/Dropdown.types.d.ts +4 -0
  67. package/types/components/Dropdown/Dropdown.types.d.ts.map +1 -1
  68. package/types/examples/plasma_b2c/components/Combobox/Combobox.d.ts +120 -1080
  69. package/types/examples/plasma_b2c/components/Combobox/Combobox.d.ts.map +1 -1
  70. package/types/examples/plasma_web/components/Combobox/Combobox.d.ts +120 -1080
  71. package/types/examples/plasma_web/components/Combobox/Combobox.d.ts.map +1 -1
  72. package/cjs/components/Combobox/ComboboxNew/ui/Form/Form.css +0 -1
  73. package/cjs/components/Combobox/ComboboxNew/ui/Form/Form.js +0 -37
  74. package/cjs/components/Combobox/ComboboxNew/ui/Form/Form.js.map +0 -1
  75. package/cjs/components/Combobox/ComboboxNew/ui/Form/Form.styles.js +0 -15
  76. package/cjs/components/Combobox/ComboboxNew/ui/Form/Form.styles.js.map +0 -1
  77. package/cjs/components/Combobox/ComboboxNew/ui/Form/Form.styles_22v2s5.css +0 -1
  78. package/cjs/utils/syntheticEvent.js +0 -55
  79. package/cjs/utils/syntheticEvent.js.map +0 -1
  80. package/emotion/cjs/components/Combobox/ComboboxNew/ui/Form/Form.js +0 -38
  81. package/emotion/cjs/components/Combobox/ComboboxNew/ui/Form/Form.styles.js +0 -13
  82. package/emotion/cjs/utils/syntheticEvent.js +0 -53
  83. package/emotion/es/components/Combobox/ComboboxNew/ui/Form/Form.js +0 -29
  84. package/emotion/es/components/Combobox/ComboboxNew/ui/Form/Form.styles.js +0 -6
  85. package/emotion/es/utils/syntheticEvent.js +0 -47
  86. package/es/components/Combobox/ComboboxNew/ui/Form/Form.css +0 -1
  87. package/es/components/Combobox/ComboboxNew/ui/Form/Form.js +0 -33
  88. package/es/components/Combobox/ComboboxNew/ui/Form/Form.js.map +0 -1
  89. package/es/components/Combobox/ComboboxNew/ui/Form/Form.styles.js +0 -11
  90. package/es/components/Combobox/ComboboxNew/ui/Form/Form.styles.js.map +0 -1
  91. package/es/components/Combobox/ComboboxNew/ui/Form/Form.styles_22v2s5.css +0 -1
  92. package/es/utils/syntheticEvent.js +0 -50
  93. package/es/utils/syntheticEvent.js.map +0 -1
  94. package/styled-components/cjs/components/Combobox/ComboboxNew/ui/Form/Form.js +0 -38
  95. package/styled-components/cjs/components/Combobox/ComboboxNew/ui/Form/Form.styles.js +0 -12
  96. package/styled-components/cjs/utils/syntheticEvent.js +0 -53
  97. package/styled-components/es/components/Combobox/ComboboxNew/ui/Form/Form.js +0 -29
  98. package/styled-components/es/components/Combobox/ComboboxNew/ui/Form/Form.styles.js +0 -5
  99. package/styled-components/es/utils/syntheticEvent.js +0 -47
  100. package/types/components/Combobox/ComboboxNew/ui/Form/Form.d.ts +0 -6
  101. package/types/components/Combobox/ComboboxNew/ui/Form/Form.d.ts.map +0 -1
  102. package/types/components/Combobox/ComboboxNew/ui/Form/Form.styles.d.ts +0 -3
  103. package/types/components/Combobox/ComboboxNew/ui/Form/Form.styles.d.ts.map +0 -1
  104. package/types/utils/syntheticEvent.d.ts +0 -4
  105. package/types/utils/syntheticEvent.d.ts.map +0 -1
@@ -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,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>
@@ -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,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 (
@@ -9,16 +9,13 @@ 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
- })(["opacity:", ";cursor:", ";color:", ";--plasma-link-disabled-opacity:var(", ");", ""], function (_ref) {
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) {
13
13
  var isHref = _ref.isHref;
14
- return isHref ? 1 : "var(".concat(tokens.breadcrumbsOpacity, ")");
15
- }, function (_ref2) {
16
- var isHref = _ref2.isHref;
17
- return isHref ? 'pointer' : 'auto';
18
- }, function (_ref3) {
19
- var isHref = _ref3.isHref;
20
14
  return isHref ? "var(".concat(tokens.breadcrumbsColor, ")") : "var(".concat(tokens.breadcrumbsColorText, ")");
21
- }, tokens.breadcrumbsOpacity, /*#__PURE__*/addFocus({
15
+ }, tokens.breadcrumbsOpacity, function (_ref2) {
16
+ var isHref = _ref2.isHref;
17
+ return isHref ? 1 : "var(".concat(tokens.breadcrumbsOpacity, ")");
18
+ }, /*#__PURE__*/addFocus({
22
19
  outlineOffset: '0rem',
23
20
  outlineSize: '0.125rem',
24
21
  outlineRadius: '0rem',
@@ -1,6 +1,5 @@
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", "readOnly", "disabled", "alwaysOpened", "filter", "closeAfterSelect", "renderValue"];
1
+ var _excluded = ["multiple", "value", "onChange", "isTargetAmount", "targetAmount", "items", "placement", "label", "placeholder", "helperText", "contentLeft", "textBefore", "textAfter", "variant", "listOverflow", "listHeight", "listWidth", "portal", "renderItem", "view", "size", "labelPlacement", "readOnly", "disabled", "alwaysOpened", "filter", "closeAfterSelect", "renderValue"];
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
- function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
4
3
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
5
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."); }
6
5
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
@@ -9,7 +8,7 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
9
8
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
10
9
  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; }
11
10
  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; }
12
- import React, { forwardRef, useState, useReducer, useMemo, createContext, useLayoutEffect, useRef, useEffect } from 'react';
11
+ import React, { forwardRef, useState, useReducer, useMemo, createContext, useLayoutEffect, useRef } from 'react';
13
12
  import { safeUseId, useForkRef } from '@salutejs/plasma-core';
14
13
  import { isEmpty } from '../../../utils';
15
14
  import { useOutsideClick } from '../../../hooks';
@@ -24,21 +23,17 @@ import { getPathMap, getTreeMaps } from './hooks/getPathMaps';
24
23
  import { Ul, base, StyledArrow, IconArrowWrapper, StyledEmptyState } from './Combobox.styles';
25
24
  import { base as viewCSS } from './variations/_view/base';
26
25
  import { base as sizeCSS } from './variations/_size/base';
27
- import { Form } from './ui/Form/Form';
28
26
  export var Context = /*#__PURE__*/createContext({});
29
27
 
30
28
  /**
31
29
  * Поле ввода с выпадающим списком и возможностью фильтрации и выбора элементов.
32
30
  */
33
-
34
31
  export var comboboxRoot = function comboboxRoot(Root) {
35
32
  return /*#__PURE__*/forwardRef(function (props, ref) {
36
33
  var _valueToItemMap$get, _valueToItemMap$get2, _getItemByFocused;
37
- var name = props.name,
38
- multiple = props.multiple,
34
+ var multiple = props.multiple,
39
35
  outerValue = props.value,
40
36
  outerOnChange = props.onChange,
41
- defaultValue = props.defaultValue,
42
37
  isTargetAmount = props.isTargetAmount,
43
38
  targetAmount = props.targetAmount,
44
39
  items = props.items,
@@ -147,19 +142,9 @@ export var comboboxRoot = function comboboxRoot(Root) {
147
142
  }, floatingPopoverRef);
148
143
  var onChange = function onChange(newValue) {
149
144
  if (outerOnChange) {
150
- if (!name && !multiple && typeof newValue === 'string') {
151
- outerOnChange(newValue);
152
- }
153
- if (!name && multiple && Array.isArray(newValue)) {
154
- outerOnChange(newValue);
155
- }
156
- if (name && _typeof(newValue) === 'object' && !Array.isArray(newValue)) {
157
- outerOnChange(newValue);
158
- }
159
- }
160
- if (typeof newValue === 'string' || Array.isArray(newValue)) {
161
- setInternalValue(newValue);
145
+ outerOnChange(newValue);
162
146
  }
147
+ setInternalValue(newValue);
163
148
  };
164
149
  var handleClickArrow = function handleClickArrow() {
165
150
  if (disabled || readOnly) {
@@ -348,24 +333,13 @@ export var comboboxRoot = function comboboxRoot(Root) {
348
333
  // Т.к. вначале нужно отфильтровать и провалидировать outerValue и результат положить в переменную.
349
334
  // А переменную, содержащую сложные типы данных, нельзя помещать в deps.
350
335
  }, [outerValue, internalValue, items]);
351
- useEffect(function () {
352
- if (defaultValue) {
353
- setInternalValue(defaultValue);
354
- }
355
- }, [defaultValue]);
356
336
  return /*#__PURE__*/React.createElement(Root, {
357
337
  size: size,
358
338
  view: view,
359
339
  labelPlacement: labelPlacement,
360
340
  disabled: disabled,
361
341
  readOnly: readOnly
362
- }, name && /*#__PURE__*/React.createElement(Form, {
363
- name: name,
364
- value: internalValue,
365
- multiple: multiple,
366
- onChange: onChange,
367
- ref: ref
368
- }), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Context.Provider, {
342
+ }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Context.Provider, {
369
343
  value: {
370
344
  focusedPath: focusedPath,
371
345
  checked: checked,
@@ -389,7 +363,7 @@ export var comboboxRoot = function comboboxRoot(Root) {
389
363
  listWidth: listWidth,
390
364
  target: function target(referenceRef) {
391
365
  return /*#__PURE__*/React.createElement(StyledTextField, _extends({
392
- ref: name ? inputRef : inputForkRef,
366
+ ref: inputForkRef,
393
367
  inputWrapperRef: referenceRef,
394
368
  value: textValue,
395
369
  onChange: handleTextValueChange,
@@ -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,
@@ -353,11 +353,11 @@ const items = [
353
353
 
354
354
  const SingleStory = (args: StorySelectProps) => {
355
355
  const [value, setValue] = useState('');
356
+
356
357
  return (
357
358
  <div style={{ width: '400px' }}>
358
359
  <Combobox
359
360
  {...args}
360
- name="mau"
361
361
  items={items}
362
362
  value={value}
363
363
  onChange={setValue}
@@ -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,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>
@@ -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,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 (
@@ -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;0OAavD,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;0OAmBvD,CAAC;AAEF,eAAO,MAAM,IAAI,0CAahB,CAAC;AAEF,eAAO,MAAM,SAAS,iGAGrB,CAAC"}
@@ -5,11 +5,11 @@ export declare const Context: React.Context<ItemContext>;
5
5
  /**
6
6
  * Поле ввода с выпадающим списком и возможностью фильтрации и выбора элементов.
7
7
  */
8
- export declare const comboboxRoot: (Root: RootProps<HTMLInputElement, Omit<ComboboxProps, 'items'>>) => React.ForwardRefExoticComponent<ComboboxProps<import("./ui/Inner/ui/Item/Item.types").ItemOption> & React.RefAttributes<HTMLInputElement | HTMLSelectElement>>;
8
+ export declare const comboboxRoot: (Root: RootProps<HTMLInputElement, Omit<ComboboxProps, 'items'>>) => React.ForwardRefExoticComponent<ComboboxProps<import("./ui/Inner/ui/Item/Item.types").ItemOption> & React.RefAttributes<HTMLInputElement>>;
9
9
  export declare const comboboxConfig: {
10
10
  name: string;
11
11
  tag: string;
12
- layout: (Root: RootProps<HTMLInputElement, Omit<ComboboxProps, 'items'>>) => React.ForwardRefExoticComponent<ComboboxProps<import("./ui/Inner/ui/Item/Item.types").ItemOption> & React.RefAttributes<HTMLInputElement | HTMLSelectElement>>;
12
+ layout: (Root: RootProps<HTMLInputElement, Omit<ComboboxProps, 'items'>>) => React.ForwardRefExoticComponent<ComboboxProps<import("./ui/Inner/ui/Item/Item.types").ItemOption> & React.RefAttributes<HTMLInputElement>>;
13
13
  base: import("@linaria/core").LinariaClassName;
14
14
  variations: {
15
15
  view: {
@@ -1 +1 @@
1
- {"version":3,"file":"Combobox.d.ts","sourceRoot":"","sources":["../../../../src/components/Combobox/ComboboxNew/Combobox.tsx"],"names":[],"mappings":"AAAA,OAAO,KASN,MAAM,OAAO,CAAC;AAIf,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAqB7C,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAMnE,eAAO,MAAM,OAAO,4BAAgD,CAAC;AAErE;;GAEG;AAEH,eAAO,MAAM,YAAY,SAAU,UAAU,gBAAgB,EAAE,KAAK,aAAa,EAAE,OAAO,CAAC,CAAC,mKAyatF,CAAC;AAEP,eAAO,MAAM,cAAc;;;mBA3aQ,UAAU,gBAAgB,EAAE,KAAK,aAAa,EAAE,OAAO,CAAC,CAAC;;;;;;;;;;;;;;;;;;CAgc3F,CAAC"}
1
+ {"version":3,"file":"Combobox.d.ts","sourceRoot":"","sources":["../../../../src/components/Combobox/ComboboxNew/Combobox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4F,MAAM,OAAO,CAAC;AAIjH,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAqB7C,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAKnE,eAAO,MAAM,OAAO,4BAAgD,CAAC;AAErE;;GAEG;AACH,eAAO,MAAM,YAAY,SAAU,UAAU,gBAAgB,EAAE,KAAK,aAAa,EAAE,OAAO,CAAC,CAAC,+IA4YtF,CAAC;AAEP,eAAO,MAAM,cAAc;;;mBA9YQ,UAAU,gBAAgB,EAAE,KAAK,aAAa,EAAE,OAAO,CAAC,CAAC;;;;;;;;;;;;;;;;;;CAma3F,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { CSSProperties, ButtonHTMLAttributes, ChangeEventHandler } from 'react';
1
+ import type { CSSProperties, ButtonHTMLAttributes } from 'react';
2
2
  import React from 'react';
3
3
  import { RequiredProps } from '../../TextField/TextField.types';
4
4
  import { FocusedPathState } from './reducers';
@@ -6,10 +6,8 @@ import { ItemOption, ItemOptionTransformed } from './ui/Inner/ui/Item/Item.types
6
6
  import type { ValueToCheckedMapType, ValueToItemMapType } from './hooks/getPathMaps';
7
7
  declare type Placement = 'top' | 'top-start' | 'top-end' | 'right' | 'right-start' | 'right-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end';
8
8
  declare type IsMultiselect<T extends ItemOption = ItemOption> = {
9
- name?: never;
10
9
  multiple?: false;
11
10
  value?: string;
12
- defaultValue?: never;
13
11
  onChange?: (value: string) => void;
14
12
  /**
15
13
  * Если включено - будет выведено общее количество выбранных элементов вместо перечисления.
@@ -25,7 +23,6 @@ declare type IsMultiselect<T extends ItemOption = ItemOption> = {
25
23
  } | {
26
24
  multiple: true;
27
25
  value?: Array<string>;
28
- defaultValue?: never;
29
26
  onChange?: (value: Array<string>) => void;
30
27
  isTargetAmount?: true;
31
28
  targetAmount?: number;
@@ -33,25 +30,6 @@ declare type IsMultiselect<T extends ItemOption = ItemOption> = {
33
30
  * Callback для кастомной настройки значения в селекте.
34
31
  */
35
32
  renderValue?: (item: T) => string;
36
- name?: never;
37
- } | {
38
- multiple: true;
39
- value?: string[];
40
- defaultValue?: string[];
41
- onChange?: ChangeEventHandler;
42
- isTargetAmount?: never | false;
43
- targetAmount?: never;
44
- renderValue?: never;
45
- name: string;
46
- } | {
47
- multiple?: false;
48
- value?: string;
49
- defaultValue?: string;
50
- onChange?: ChangeEventHandler;
51
- isTargetAmount?: never | false;
52
- targetAmount?: never;
53
- renderValue?: never;
54
- name: string;
55
33
  };
56
34
  declare type ViewStateProps = {
57
35
  /**
@@ -176,7 +154,7 @@ export declare type ComboboxProps<T extends ItemOption = ItemOption> = {
176
154
  * @default outer
177
155
  */
178
156
  labelPlacement?: 'outer' | 'inner';
179
- } & ViewStateProps & IsMultiselect<T> & RequiredProps & Omit<ButtonHTMLAttributes<HTMLInputElement>, 'value' | 'onChange' | 'name' | 'defaultValue'>;
157
+ } & ViewStateProps & IsMultiselect<T> & RequiredProps & Omit<ButtonHTMLAttributes<HTMLInputElement>, 'value' | 'onChange'>;
180
158
  export declare type FloatingPopoverProps = {
181
159
  target: React.ReactNode | ((ref: React.MutableRefObject<HTMLElement | null>) => React.ReactNode);
182
160
  children: React.ReactNode;
@@ -1 +1 @@
1
- {"version":3,"file":"Combobox.types.d.ts","sourceRoot":"","sources":["../../../../src/components/Combobox/ComboboxNew/Combobox.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,OAAO,CAAC;AACrF,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAEhE,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAClF,OAAO,KAAK,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAErF,aAAK,SAAS,GACR,KAAK,GACL,WAAW,GACX,SAAS,GACT,OAAO,GACP,aAAa,GACb,WAAW,GACX,QAAQ,GACR,cAAc,GACd,YAAY,GACZ,MAAM,GACN,YAAY,GACZ,UAAU,CAAC;AAEjB,aAAK,aAAa,CAAC,CAAC,SAAS,UAAU,GAAG,UAAU,IAC9C;IACI,IAAI,CAAC,EAAE,KAAK,CAAC;IACb,QAAQ,CAAC,EAAE,KAAK,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,KAAK,CAAC;IACrB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC;;;OAGG;IACH,cAAc,CAAC,EAAE,KAAK,GAAG,KAAK,CAAC;IAC/B;;;OAGG;IACH,YAAY,CAAC,EAAE,KAAK,CAAC;IACrB,WAAW,CAAC,EAAE,KAAK,CAAC;CACvB,GACD;IACI,QAAQ,EAAE,IAAI,CAAC;IACf,KAAK,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACtB,YAAY,CAAC,EAAE,KAAK,CAAC;IACrB,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a,CAAC,SAAS,CAAC,CAAC;IAClC,UAAU,EAAE,aAAa,CAAC,YAAY,CAAC,CAAC;IACxC,cAAc,EAAE,kBAAkB,CAAC;IACnC,MAAM,EAAE,MAAM,CAAC;CAClB,CAAC"}
1
+ {"version":3,"file":"Combobox.types.d.ts","sourceRoot":"","sources":["../../../../src/components/Combobox/ComboboxNew/Combobox.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAC;AACjE,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAEhE,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAClF,OAAO,KAAK,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAErF,aAAK,SAAS,GACR,KAAK,GACL,WAAW,GACX,SAAS,GACT,OAAO,GACP,aAAa,GACb,WAAW,GACX,QAAQ,GACR,cAAc,GACd,YAAY,GACZ,MAAM,GACN,YAAY,GACZ,UAAU,CAAC;AAEjB,aAAK,aAAa,CAAC,CAAC,SAAS,UAAU,GAAG,UAAU,IAC9C;IACI,QAAQ,CAAC,EAAE,KAAK,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC;;;OAGG;IACH,cAAc,CAAC,EAAE,KAAK,GAAG,KAAK,CAAC;IAC/B;;;OAGG;IACH,YAAY,CAAC,EAAE,KAAK,CAAC;IACrB,WAAW,CAAC,EAAE,KAAK,CAAC;CACvB,GACD;IACI,QAAQ,EAAE,IAAI,CAAC;IACf,KAAK,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACtB,QAAQ,CAAC,EAAE,CAAC,KA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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
  */