@salutejs/plasma-new-hope 0.71.2-canary.1161.8606115048.0 → 0.71.2-canary.1169.8611539398.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (201) hide show
  1. package/cjs/components/Cell/Cell.js +2 -0
  2. package/cjs/components/Cell/Cell.js.map +1 -1
  3. package/cjs/components/Combobox/Combobox.css +10 -10
  4. package/cjs/components/Combobox/Combobox.styles.js +5 -5
  5. package/cjs/components/Combobox/Combobox.styles.js.map +1 -1
  6. package/cjs/components/Combobox/{Combobox.styles_dw6hnk.css → Combobox.styles_17ei5vn.css} +1 -1
  7. package/cjs/components/Combobox/ui/ComboboxDivider/ComboboxDivider.css +4 -4
  8. package/cjs/components/Combobox/ui/ComboboxFooter/ComboboxFooter.css +4 -4
  9. package/cjs/components/Combobox/ui/ComboboxGroup/ComboboxGroup.css +4 -4
  10. package/cjs/components/Combobox/ui/ComboboxHeader/ComboboxHeader.css +4 -4
  11. package/cjs/components/Combobox/ui/ComboboxItem/ComboboxItem.css +4 -4
  12. package/cjs/components/Dropdown/Dropdown.css +4 -4
  13. package/cjs/components/Dropdown/Dropdown.js +1 -0
  14. package/cjs/components/Dropdown/Dropdown.js.map +1 -1
  15. package/cjs/components/Pagination/Pagination.css +4 -4
  16. package/cjs/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +4 -4
  17. package/cjs/components/Popover/Popover.css +4 -4
  18. package/cjs/components/Popover/Popover.js +43 -33
  19. package/cjs/components/Popover/Popover.js.map +1 -1
  20. package/cjs/components/Popover/Popover.styles.js +1 -1
  21. package/cjs/components/Popover/Popover.styles.js.map +1 -1
  22. package/cjs/components/Popover/{Popover.styles_1ggb66y.css → Popover.styles_1rk9t6z.css} +1 -1
  23. package/cjs/components/Select/Select.css +4 -4
  24. package/cjs/components/Select/ui/SelectItem/SelectItem.css +4 -4
  25. package/cjs/components/Select/ui/SelectTarget/SelectTarget.js +1 -2
  26. package/cjs/components/Select/ui/SelectTarget/SelectTarget.js.map +1 -1
  27. package/cjs/index.css +33 -33
  28. package/cjs/index.js +4 -39
  29. package/cjs/index.js.map +1 -1
  30. package/cjs/utils/index.js +1 -13
  31. package/cjs/utils/index.js.map +1 -1
  32. package/cjs/utils/react.js +2 -12
  33. package/cjs/utils/react.js.map +1 -1
  34. package/es/components/Cell/Cell.js +2 -0
  35. package/es/components/Cell/Cell.js.map +1 -1
  36. package/es/components/Combobox/Combobox.css +10 -10
  37. package/es/components/Combobox/Combobox.styles.js +5 -5
  38. package/es/components/Combobox/Combobox.styles.js.map +1 -1
  39. package/es/components/Combobox/{Combobox.styles_dw6hnk.css → Combobox.styles_17ei5vn.css} +1 -1
  40. package/es/components/Combobox/ui/ComboboxDivider/ComboboxDivider.css +4 -4
  41. package/es/components/Combobox/ui/ComboboxFooter/ComboboxFooter.css +4 -4
  42. package/es/components/Combobox/ui/ComboboxGroup/ComboboxGroup.css +4 -4
  43. package/es/components/Combobox/ui/ComboboxHeader/ComboboxHeader.css +4 -4
  44. package/es/components/Combobox/ui/ComboboxItem/ComboboxItem.css +4 -4
  45. package/es/components/Dropdown/Dropdown.css +4 -4
  46. package/es/components/Dropdown/Dropdown.js +1 -0
  47. package/es/components/Dropdown/Dropdown.js.map +1 -1
  48. package/es/components/Pagination/Pagination.css +4 -4
  49. package/es/components/Pagination/ui/PaginationSelectPerPage/PaginationSelectPerPage.css +4 -4
  50. package/es/components/Popover/Popover.css +4 -4
  51. package/es/components/Popover/Popover.js +43 -33
  52. package/es/components/Popover/Popover.js.map +1 -1
  53. package/es/components/Popover/Popover.styles.js +1 -1
  54. package/es/components/Popover/Popover.styles.js.map +1 -1
  55. package/es/components/Popover/{Popover.styles_1ggb66y.css → Popover.styles_1rk9t6z.css} +1 -1
  56. package/es/components/Select/Select.css +4 -4
  57. package/es/components/Select/ui/SelectItem/SelectItem.css +4 -4
  58. package/es/components/Select/ui/SelectTarget/SelectTarget.js +1 -2
  59. package/es/components/Select/ui/SelectTarget/SelectTarget.js.map +1 -1
  60. package/es/index.css +33 -33
  61. package/es/index.js +0 -13
  62. package/es/index.js.map +1 -1
  63. package/es/utils/index.js +2 -11
  64. package/es/utils/index.js.map +1 -1
  65. package/es/utils/react.js +2 -9
  66. package/es/utils/react.js.map +1 -1
  67. package/package.json +2 -2
  68. package/styled-components/cjs/components/Cell/Cell.js +2 -0
  69. package/styled-components/cjs/components/Combobox/Combobox.styles.js +1 -1
  70. package/styled-components/cjs/components/Dropdown/Dropdown.js +1 -0
  71. package/styled-components/cjs/components/Popover/Popover.js +43 -33
  72. package/styled-components/cjs/components/Popover/Popover.styles.js +1 -1
  73. package/styled-components/cjs/components/Select/ui/SelectTarget/SelectTarget.js +1 -2
  74. package/styled-components/cjs/examples/plasma_b2c/components/Popover/Popover.stories.tsx +7 -0
  75. package/styled-components/cjs/index.js +0 -22
  76. package/styled-components/es/components/Cell/Cell.js +2 -0
  77. package/styled-components/es/components/Combobox/Combobox.styles.js +1 -1
  78. package/styled-components/es/components/Dropdown/Dropdown.js +1 -0
  79. package/styled-components/es/components/Popover/Popover.js +43 -33
  80. package/styled-components/es/components/Popover/Popover.styles.js +1 -1
  81. package/styled-components/es/components/Select/ui/SelectTarget/SelectTarget.js +1 -2
  82. package/styled-components/es/examples/plasma_b2c/components/Popover/Popover.stories.tsx +7 -0
  83. package/styled-components/es/index.js +0 -2
  84. package/types/components/Cell/Cell.d.ts.map +1 -1
  85. package/types/components/Combobox/Combobox.styles.d.ts +8 -2
  86. package/types/components/Combobox/Combobox.styles.d.ts.map +1 -1
  87. package/types/components/Dropdown/Dropdown.d.ts.map +1 -1
  88. package/types/components/Dropdown/Dropdown.styles.d.ts +7 -1
  89. package/types/components/Dropdown/Dropdown.styles.d.ts.map +1 -1
  90. package/types/components/Popover/Popover.d.ts +2 -2
  91. package/types/components/Popover/Popover.d.ts.map +1 -1
  92. package/types/components/Popover/Popover.styles.d.ts.map +1 -1
  93. package/types/components/Popover/Popover.types.d.ts +19 -12
  94. package/types/components/Popover/Popover.types.d.ts.map +1 -1
  95. package/types/components/Select/Select.styles.d.ts +8 -2
  96. package/types/components/Select/Select.styles.d.ts.map +1 -1
  97. package/types/components/Select/ui/SelectTarget/SelectTarget.d.ts.map +1 -1
  98. package/types/examples/plasma_b2c/components/Popover/Popover.d.ts +7 -1
  99. package/types/examples/plasma_b2c/components/Popover/Popover.d.ts.map +1 -1
  100. package/types/examples/plasma_web/components/Popover/Popover.d.ts +7 -1
  101. package/types/examples/plasma_web/components/Popover/Popover.d.ts.map +1 -1
  102. package/types/examples/sds_engineer/components/Popover/Popover.d.ts +7 -1
  103. package/types/examples/sds_engineer/components/Popover/Popover.d.ts.map +1 -1
  104. package/types/index.d.ts +0 -2
  105. package/types/index.d.ts.map +1 -1
  106. package/cjs/components/Select/ui/SelectDivider/SelectDivider.css +0 -23
  107. package/cjs/components/Select/ui/SelectDivider/SelectDivider.js +0 -40
  108. package/cjs/components/Select/ui/SelectDivider/SelectDivider.js.map +0 -1
  109. package/cjs/components/Select/ui/SelectDivider/SelectDivider.styles.js +0 -12
  110. package/cjs/components/Select/ui/SelectDivider/SelectDivider.styles.js.map +0 -1
  111. package/cjs/components/Select/ui/SelectDivider/SelectDivider.styles_673hj6.css +0 -1
  112. package/cjs/components/Select/ui/SelectDivider/variations/_size/base.js +0 -9
  113. package/cjs/components/Select/ui/SelectDivider/variations/_size/base.js.map +0 -1
  114. package/cjs/components/Select/ui/SelectDivider/variations/_size/base_x642ct.css +0 -1
  115. package/cjs/components/Select/ui/SelectDivider/variations/_view/base.js +0 -9
  116. package/cjs/components/Select/ui/SelectDivider/variations/_view/base.js.map +0 -1
  117. package/cjs/components/Select/ui/SelectDivider/variations/_view/base_x642ct.css +0 -1
  118. package/cjs/components/Select/ui/SelectFooter/SelectFooter.css +0 -23
  119. package/cjs/components/Select/ui/SelectFooter/SelectFooter.js +0 -40
  120. package/cjs/components/Select/ui/SelectFooter/SelectFooter.js.map +0 -1
  121. package/cjs/components/Select/ui/SelectFooter/SelectFooter.styles.js +0 -12
  122. package/cjs/components/Select/ui/SelectFooter/SelectFooter.styles.js.map +0 -1
  123. package/cjs/components/Select/ui/SelectFooter/SelectFooter.styles_11hk6tt.css +0 -1
  124. package/cjs/components/Select/ui/SelectFooter/variations/_size/base.js +0 -9
  125. package/cjs/components/Select/ui/SelectFooter/variations/_size/base.js.map +0 -1
  126. package/cjs/components/Select/ui/SelectFooter/variations/_size/base_x642ct.css +0 -1
  127. package/cjs/components/Select/ui/SelectFooter/variations/_view/base.js +0 -9
  128. package/cjs/components/Select/ui/SelectFooter/variations/_view/base.js.map +0 -1
  129. package/cjs/components/Select/ui/SelectFooter/variations/_view/base_x642ct.css +0 -1
  130. package/cjs/components/Select/ui/SelectGroup/SelectGroup.css +0 -23
  131. package/cjs/components/Select/ui/SelectGroup/SelectGroup.js +0 -40
  132. package/cjs/components/Select/ui/SelectGroup/SelectGroup.js.map +0 -1
  133. package/cjs/components/Select/ui/SelectGroup/SelectGroup.styles.js +0 -12
  134. package/cjs/components/Select/ui/SelectGroup/SelectGroup.styles.js.map +0 -1
  135. package/cjs/components/Select/ui/SelectGroup/SelectGroup.styles_mktu7e.css +0 -1
  136. package/cjs/components/Select/ui/SelectGroup/variations/_size/base.js +0 -9
  137. package/cjs/components/Select/ui/SelectGroup/variations/_size/base.js.map +0 -1
  138. package/cjs/components/Select/ui/SelectGroup/variations/_size/base_x642ct.css +0 -1
  139. package/cjs/components/Select/ui/SelectGroup/variations/_view/base.js +0 -9
  140. package/cjs/components/Select/ui/SelectGroup/variations/_view/base.js.map +0 -1
  141. package/cjs/components/Select/ui/SelectGroup/variations/_view/base_x642ct.css +0 -1
  142. package/cjs/components/Select/ui/SelectHeader/SelectHeader.css +0 -23
  143. package/cjs/components/Select/ui/SelectHeader/SelectHeader.js +0 -40
  144. package/cjs/components/Select/ui/SelectHeader/SelectHeader.js.map +0 -1
  145. package/cjs/components/Select/ui/SelectHeader/SelectHeader.styles.js +0 -12
  146. package/cjs/components/Select/ui/SelectHeader/SelectHeader.styles.js.map +0 -1
  147. package/cjs/components/Select/ui/SelectHeader/SelectHeader.styles_24gqog.css +0 -1
  148. package/cjs/components/Select/ui/SelectHeader/variations/_size/base.js +0 -9
  149. package/cjs/components/Select/ui/SelectHeader/variations/_size/base.js.map +0 -1
  150. package/cjs/components/Select/ui/SelectHeader/variations/_size/base_x642ct.css +0 -1
  151. package/cjs/components/Select/ui/SelectHeader/variations/_view/base.js +0 -9
  152. package/cjs/components/Select/ui/SelectHeader/variations/_view/base.js.map +0 -1
  153. package/cjs/components/Select/ui/SelectHeader/variations/_view/base_x642ct.css +0 -1
  154. package/es/components/Select/ui/SelectDivider/SelectDivider.css +0 -23
  155. package/es/components/Select/ui/SelectDivider/SelectDivider.js +0 -35
  156. package/es/components/Select/ui/SelectDivider/SelectDivider.js.map +0 -1
  157. package/es/components/Select/ui/SelectDivider/SelectDivider.styles.js +0 -7
  158. package/es/components/Select/ui/SelectDivider/SelectDivider.styles.js.map +0 -1
  159. package/es/components/Select/ui/SelectDivider/SelectDivider.styles_673hj6.css +0 -1
  160. package/es/components/Select/ui/SelectDivider/variations/_size/base.js +0 -5
  161. package/es/components/Select/ui/SelectDivider/variations/_size/base.js.map +0 -1
  162. package/es/components/Select/ui/SelectDivider/variations/_size/base_x642ct.css +0 -1
  163. package/es/components/Select/ui/SelectDivider/variations/_view/base.js +0 -5
  164. package/es/components/Select/ui/SelectDivider/variations/_view/base.js.map +0 -1
  165. package/es/components/Select/ui/SelectDivider/variations/_view/base_x642ct.css +0 -1
  166. package/es/components/Select/ui/SelectFooter/SelectFooter.css +0 -23
  167. package/es/components/Select/ui/SelectFooter/SelectFooter.js +0 -35
  168. package/es/components/Select/ui/SelectFooter/SelectFooter.js.map +0 -1
  169. package/es/components/Select/ui/SelectFooter/SelectFooter.styles.js +0 -7
  170. package/es/components/Select/ui/SelectFooter/SelectFooter.styles.js.map +0 -1
  171. package/es/components/Select/ui/SelectFooter/SelectFooter.styles_11hk6tt.css +0 -1
  172. package/es/components/Select/ui/SelectFooter/variations/_size/base.js +0 -5
  173. package/es/components/Select/ui/SelectFooter/variations/_size/base.js.map +0 -1
  174. package/es/components/Select/ui/SelectFooter/variations/_size/base_x642ct.css +0 -1
  175. package/es/components/Select/ui/SelectFooter/variations/_view/base.js +0 -5
  176. package/es/components/Select/ui/SelectFooter/variations/_view/base.js.map +0 -1
  177. package/es/components/Select/ui/SelectFooter/variations/_view/base_x642ct.css +0 -1
  178. package/es/components/Select/ui/SelectGroup/SelectGroup.css +0 -23
  179. package/es/components/Select/ui/SelectGroup/SelectGroup.js +0 -35
  180. package/es/components/Select/ui/SelectGroup/SelectGroup.js.map +0 -1
  181. package/es/components/Select/ui/SelectGroup/SelectGroup.styles.js +0 -7
  182. package/es/components/Select/ui/SelectGroup/SelectGroup.styles.js.map +0 -1
  183. package/es/components/Select/ui/SelectGroup/SelectGroup.styles_mktu7e.css +0 -1
  184. package/es/components/Select/ui/SelectGroup/variations/_size/base.js +0 -5
  185. package/es/components/Select/ui/SelectGroup/variations/_size/base.js.map +0 -1
  186. package/es/components/Select/ui/SelectGroup/variations/_size/base_x642ct.css +0 -1
  187. package/es/components/Select/ui/SelectGroup/variations/_view/base.js +0 -5
  188. package/es/components/Select/ui/SelectGroup/variations/_view/base.js.map +0 -1
  189. package/es/components/Select/ui/SelectGroup/variations/_view/base_x642ct.css +0 -1
  190. package/es/components/Select/ui/SelectHeader/SelectHeader.css +0 -23
  191. package/es/components/Select/ui/SelectHeader/SelectHeader.js +0 -35
  192. package/es/components/Select/ui/SelectHeader/SelectHeader.js.map +0 -1
  193. package/es/components/Select/ui/SelectHeader/SelectHeader.styles.js +0 -7
  194. package/es/components/Select/ui/SelectHeader/SelectHeader.styles.js.map +0 -1
  195. package/es/components/Select/ui/SelectHeader/SelectHeader.styles_24gqog.css +0 -1
  196. package/es/components/Select/ui/SelectHeader/variations/_size/base.js +0 -5
  197. package/es/components/Select/ui/SelectHeader/variations/_size/base.js.map +0 -1
  198. package/es/components/Select/ui/SelectHeader/variations/_size/base_x642ct.css +0 -1
  199. package/es/components/Select/ui/SelectHeader/variations/_view/base.js +0 -5
  200. package/es/components/Select/ui/SelectHeader/variations/_view/base.js.map +0 -1
  201. package/es/components/Select/ui/SelectHeader/variations/_view/base_x642ct.css +0 -1
@@ -13,7 +13,7 @@ var _utils = /*#__PURE__*/require("../../utils");
13
13
  var _base = /*#__PURE__*/require("./variations/_view/base");
14
14
  var _Popover = /*#__PURE__*/require("./Popover.styles");
15
15
  var _Popover2 = /*#__PURE__*/require("./Popover.tokens");
16
- var _excluded = ["target", "children", "isOpen", "trigger", "hasArrow", "frame", "className", "placement", "offset", "zIndex", "isFocusTrapped", "closeOnEsc", "preventOverflow", "usePortal", "view", "onToggle", "closeOnOverlayClick"];
16
+ var _excluded = ["target", "children", "isOpen", "trigger", "hasArrow", "frame", "className", "placement", "offset", "zIndex", "isFocusTrapped", "closeOnEsc", "preventOverflow", "usePortal", "view", "onToggle"];
17
17
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
18
18
  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); }
19
19
  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 && Object.prototype.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; }
@@ -39,34 +39,41 @@ var POPOVER_PORTAL_ID = exports.POPOVER_PORTAL_ID = 'plasma-popover-root';
39
39
  * и вызова по клику либо ховеру.
40
40
  */
41
41
  var popoverRoot = exports.popoverRoot = function popoverRoot(Root) {
42
- return /*#__PURE__*/(0, _react.forwardRef)(function (_ref, outerRootRef) {
42
+ return /*#__PURE__*/(0, _react.forwardRef)(function (props, outerRootRef) {
43
43
  var _placement$;
44
- var target = _ref.target,
45
- children = _ref.children,
46
- isOpen = _ref.isOpen,
47
- _ref$trigger = _ref.trigger,
48
- trigger = _ref$trigger === void 0 ? 'click' : _ref$trigger,
49
- hasArrow = _ref.hasArrow,
50
- _ref$frame = _ref.frame,
51
- frame = _ref$frame === void 0 ? 'document' : _ref$frame,
52
- className = _ref.className,
53
- _ref$placement = _ref.placement,
54
- placement = _ref$placement === void 0 ? 'auto' : _ref$placement,
55
- _ref$offset = _ref.offset,
56
- offset = _ref$offset === void 0 ? [0, 0] : _ref$offset,
57
- zIndex = _ref.zIndex,
58
- _ref$isFocusTrapped = _ref.isFocusTrapped,
59
- isFocusTrapped = _ref$isFocusTrapped === void 0 ? true : _ref$isFocusTrapped,
60
- _ref$closeOnEsc = _ref.closeOnEsc,
61
- closeOnEsc = _ref$closeOnEsc === void 0 ? true : _ref$closeOnEsc,
62
- _ref$preventOverflow = _ref.preventOverflow,
63
- preventOverflow = _ref$preventOverflow === void 0 ? true : _ref$preventOverflow,
64
- _ref$usePortal = _ref.usePortal,
65
- usePortal = _ref$usePortal === void 0 ? false : _ref$usePortal,
66
- view = _ref.view,
67
- onToggle = _ref.onToggle,
68
- closeOnOverlayClick = _ref.closeOnOverlayClick,
69
- rest = _objectWithoutProperties(_ref, _excluded);
44
+ var target = props.target,
45
+ children = props.children,
46
+ isOpen = props.isOpen,
47
+ _props$trigger = props.trigger,
48
+ trigger = _props$trigger === void 0 ? 'click' : _props$trigger,
49
+ hasArrow = props.hasArrow,
50
+ _props$frame = props.frame,
51
+ frame = _props$frame === void 0 ? 'document' : _props$frame,
52
+ className = props.className,
53
+ _props$placement = props.placement,
54
+ placement = _props$placement === void 0 ? 'auto' : _props$placement,
55
+ _props$offset = props.offset,
56
+ offset = _props$offset === void 0 ? [0, 0] : _props$offset,
57
+ zIndex = props.zIndex,
58
+ _props$isFocusTrapped = props.isFocusTrapped,
59
+ isFocusTrapped = _props$isFocusTrapped === void 0 ? true : _props$isFocusTrapped,
60
+ _props$closeOnEsc = props.closeOnEsc,
61
+ closeOnEsc = _props$closeOnEsc === void 0 ? true : _props$closeOnEsc,
62
+ _props$preventOverflo = props.preventOverflow,
63
+ preventOverflow = _props$preventOverflo === void 0 ? true : _props$preventOverflo,
64
+ _props$usePortal = props.usePortal,
65
+ usePortal = _props$usePortal === void 0 ? false : _props$usePortal,
66
+ view = props.view,
67
+ onToggle = props.onToggle,
68
+ rest = _objectWithoutProperties(props, _excluded);
69
+ var closeOnOverlayClick = true;
70
+ var closeOnBeyondTargetHover = true;
71
+ if (props.trigger === 'click' && props.closeOnOverlayClick === false) {
72
+ closeOnOverlayClick = false;
73
+ }
74
+ if (props.trigger === 'hover' && props.closeOnBeyondTargetHover === false) {
75
+ closeOnBeyondTargetHover = false;
76
+ }
70
77
  var rootRef = (0, _react.useRef)(null);
71
78
  var popoverRef = (0, _react.useRef)(null);
72
79
  var handleRef = (0, _plasmaCore.useForkRef)(rootRef, outerRootRef);
@@ -166,7 +173,7 @@ var popoverRoot = exports.popoverRoot = function popoverRoot(Root) {
166
173
  return function () {
167
174
  return document.removeEventListener('click', onDocumentClick);
168
175
  };
169
- }, [isOpen, onToggle]);
176
+ }, [closeOnOverlayClick, isOpen, onToggle]);
170
177
  (0, _react.useEffect)(function () {
171
178
  window.addEventListener('keydown', onEscape);
172
179
  return function () {
@@ -213,19 +220,22 @@ var popoverRoot = exports.popoverRoot = function popoverRoot(Root) {
213
220
  Promise.resolve().then(forceUpdate);
214
221
  }, [isOpen, children, forceUpdate]);
215
222
  return /*#__PURE__*/_react["default"].createElement(_Popover.StyledWrapper, {
216
- className: _Popover2.classes.wrapper,
217
- onMouseEnter: onMouseEnter,
218
- onMouseLeave: onMouseLeave
223
+ className: _Popover2.classes.wrapper
219
224
  }, /*#__PURE__*/_react["default"].createElement(_Popover.StyledRoot, {
220
225
  ref: handleRef,
221
226
  onClick: onClick,
227
+ onMouseEnter: onMouseEnter,
228
+ onMouseLeave: onMouseLeave,
222
229
  onFocus: onFocus,
223
230
  onBlur: onBlur,
224
231
  className: (0, _utils.cx)(className, _Popover2.classes.target)
225
232
  }, target), children && portalRef.current && /*#__PURE__*/_reactDom["default"].createPortal( /*#__PURE__*/_react["default"].createElement(Root, _extends({
226
233
  view: view,
227
234
  className: className
228
- }, rest), /*#__PURE__*/_react["default"].createElement(_Popover.StyledPopover, _extends({}, attributes.popper, {
235
+ }, rest, {
236
+ onMouseEnter: closeOnBeyondTargetHover ? undefined : onMouseEnter,
237
+ onMouseLeave: closeOnBeyondTargetHover ? undefined : onMouseEnter
238
+ }), /*#__PURE__*/_react["default"].createElement(_Popover.StyledPopover, _extends({}, attributes.popper, {
229
239
  className: _Popover2.classes.root,
230
240
  ref: popoverForkRef,
231
241
  style: _objectSpread(_objectSpread(_objectSpread({}, styles.popper), {
@@ -10,7 +10,7 @@ var _Popover = /*#__PURE__*/require("./Popover.tokens");
10
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
11
11
  var StyledWrapper = exports.StyledWrapper = /*#__PURE__*/_styledComponents["default"].div.withConfig({
12
12
  componentId: "plasma-new-hope__sc-tnpyex-0"
13
- })(["display:inline-block;"]);
13
+ })([""]);
14
14
  var StyledRoot = exports.StyledRoot = /*#__PURE__*/_styledComponents["default"].div.withConfig({
15
15
  componentId: "plasma-new-hope__sc-tnpyex-1"
16
16
  })(["display:inline-flex;box-sizing:border-box;position:relative;"]);
@@ -120,8 +120,7 @@ var SelectTarget = exports.SelectTarget = /*#__PURE__*/(0, _react.forwardRef)(fu
120
120
  "aria-label": label,
121
121
  className: (0, _utils.cx)(withInnerLabelUp, withHasChips, withNoFocus, selectTarget),
122
122
  onWheel: onWheel,
123
- onKeyDown: onKeyDown,
124
- stretching: "filled"
123
+ onKeyDown: onKeyDown
125
124
  }), hasText && (enumerationType === 'comma' || target === 'button-like' ? /*#__PURE__*/_react["default"].createElement(_SelectTarget.StyledText, {
126
125
  className: selectTargeText
127
126
  }, textContent) : /*#__PURE__*/_react["default"].createElement(_SelectTarget.StyledChipsWrapper, {
@@ -33,6 +33,12 @@ const meta: Meta<typeof Popover> = {
33
33
  },
34
34
  table: { defaultValue: { summary: true } },
35
35
  },
36
+ closeOnBeyondTargetHover: {
37
+ control: {
38
+ type: 'boolean',
39
+ },
40
+ table: { defaultValue: { summary: true } },
41
+ },
36
42
  closeOnEsc: {
37
43
  control: {
38
44
  type: 'boolean',
@@ -62,6 +68,7 @@ const meta: Meta<typeof Popover> = {
62
68
  placement: 'bottom',
63
69
  trigger: 'click',
64
70
  closeOnOverlayClick: true,
71
+ closeOnBeyondTargetHover: true,
65
72
  closeOnEsc: true,
66
73
  isFocusTrapped: true,
67
74
  skidding: 0,
@@ -36,17 +36,6 @@ Object.keys(_hooks).forEach(function (key) {
36
36
  }
37
37
  });
38
38
  });
39
- var _utils = /*#__PURE__*/require("./utils");
40
- Object.keys(_utils).forEach(function (key) {
41
- if (key === "default" || key === "__esModule") return;
42
- if (key in exports && exports[key] === _utils[key]) return;
43
- Object.defineProperty(exports, key, {
44
- enumerable: true,
45
- get: function get() {
46
- return _utils[key];
47
- }
48
- });
49
- });
50
39
  var _Button = /*#__PURE__*/require("./components/Button");
51
40
  Object.keys(_Button).forEach(function (key) {
52
41
  if (key === "default" || key === "__esModule") return;
@@ -465,17 +454,6 @@ Object.keys(_Progress).forEach(function (key) {
465
454
  }
466
455
  });
467
456
  });
468
- var _Select = /*#__PURE__*/require("./components/Select");
469
- Object.keys(_Select).forEach(function (key) {
470
- if (key === "default" || key === "__esModule") return;
471
- if (key in exports && exports[key] === _Select[key]) return;
472
- Object.defineProperty(exports, key, {
473
- enumerable: true,
474
- get: function get() {
475
- return _Select[key];
476
- }
477
- });
478
- });
479
457
  var _Divider = /*#__PURE__*/require("./components/Divider");
480
458
  Object.keys(_Divider).forEach(function (key) {
481
459
  if (key === "default" || key === "__esModule") return;
@@ -24,6 +24,8 @@ export var cellRoot = function cellRoot(Root) {
24
24
  _ref$stretching = _ref.stretching,
25
25
  stretching = _ref$stretching === void 0 ? 'filled' : _ref$stretching;
26
26
  var stretchingClass = classes["".concat(stretching, "Stretching")];
27
+
28
+ // Импорт старых свойств
27
29
  var titleText = title || description;
28
30
  var contentLeftDeprecated = contentLeft || content;
29
31
  return /*#__PURE__*/React.createElement(Root, {
@@ -4,7 +4,7 @@ import { popoverClasses, popoverConfig } from '../Popover';
4
4
  import { tokens } from './Combobox.tokens';
5
5
  export var StyledRoot = /*#__PURE__*/styled.div.withConfig({
6
6
  componentId: "plasma-new-hope__sc-gt7m6a-0"
7
- })(["width:100%;position:relative;& .", "{display:block;}"], popoverClasses.wrapper);
7
+ })(["width:100%;position:relative;"]);
8
8
  export var StyledCombobox = /*#__PURE__*/styled.div.withConfig({
9
9
  componentId: "plasma-new-hope__sc-gt7m6a-1"
10
10
  })(["box-sizing:border-box;background:var(", ");box-shadow:var(", ");border-radius:var(", ");width:var(", ");height:var(", ");padding:var(", ") var(", ") var(", ") var(", ");"], tokens.background, tokens.boxShadow, tokens.borderRadius, tokens.width, tokens.height, tokens.paddingTop, tokens.paddingRight, tokens.paddingBottom, tokens.paddingLeft);
@@ -62,6 +62,7 @@ export var dropdownRoot = function dropdownRoot(Root) {
62
62
  placement: getPlacements(placement),
63
63
  trigger: trigger,
64
64
  closeOnOverlayClick: closeOnOverlayClick,
65
+ closeOnBeyondTargetHover: false,
65
66
  closeOnEsc: closeOnEsc,
66
67
  isFocusTrapped: isFocusTrapped,
67
68
  frame: frame
@@ -1,5 +1,5 @@
1
1
  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); }
2
- var _excluded = ["target", "children", "isOpen", "trigger", "hasArrow", "frame", "className", "placement", "offset", "zIndex", "isFocusTrapped", "closeOnEsc", "preventOverflow", "usePortal", "view", "onToggle", "closeOnOverlayClick"];
2
+ var _excluded = ["target", "children", "isOpen", "trigger", "hasArrow", "frame", "className", "placement", "offset", "zIndex", "isFocusTrapped", "closeOnEsc", "preventOverflow", "usePortal", "view", "onToggle"];
3
3
  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); }
4
4
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
5
5
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
@@ -30,34 +30,41 @@ export var POPOVER_PORTAL_ID = 'plasma-popover-root';
30
30
  * и вызова по клику либо ховеру.
31
31
  */
32
32
  export var popoverRoot = function popoverRoot(Root) {
33
- return /*#__PURE__*/forwardRef(function (_ref, outerRootRef) {
33
+ return /*#__PURE__*/forwardRef(function (props, outerRootRef) {
34
34
  var _placement$;
35
- var target = _ref.target,
36
- children = _ref.children,
37
- isOpen = _ref.isOpen,
38
- _ref$trigger = _ref.trigger,
39
- trigger = _ref$trigger === void 0 ? 'click' : _ref$trigger,
40
- hasArrow = _ref.hasArrow,
41
- _ref$frame = _ref.frame,
42
- frame = _ref$frame === void 0 ? 'document' : _ref$frame,
43
- className = _ref.className,
44
- _ref$placement = _ref.placement,
45
- placement = _ref$placement === void 0 ? 'auto' : _ref$placement,
46
- _ref$offset = _ref.offset,
47
- offset = _ref$offset === void 0 ? [0, 0] : _ref$offset,
48
- zIndex = _ref.zIndex,
49
- _ref$isFocusTrapped = _ref.isFocusTrapped,
50
- isFocusTrapped = _ref$isFocusTrapped === void 0 ? true : _ref$isFocusTrapped,
51
- _ref$closeOnEsc = _ref.closeOnEsc,
52
- closeOnEsc = _ref$closeOnEsc === void 0 ? true : _ref$closeOnEsc,
53
- _ref$preventOverflow = _ref.preventOverflow,
54
- preventOverflow = _ref$preventOverflow === void 0 ? true : _ref$preventOverflow,
55
- _ref$usePortal = _ref.usePortal,
56
- usePortal = _ref$usePortal === void 0 ? false : _ref$usePortal,
57
- view = _ref.view,
58
- onToggle = _ref.onToggle,
59
- closeOnOverlayClick = _ref.closeOnOverlayClick,
60
- rest = _objectWithoutProperties(_ref, _excluded);
35
+ var target = props.target,
36
+ children = props.children,
37
+ isOpen = props.isOpen,
38
+ _props$trigger = props.trigger,
39
+ trigger = _props$trigger === void 0 ? 'click' : _props$trigger,
40
+ hasArrow = props.hasArrow,
41
+ _props$frame = props.frame,
42
+ frame = _props$frame === void 0 ? 'document' : _props$frame,
43
+ className = props.className,
44
+ _props$placement = props.placement,
45
+ placement = _props$placement === void 0 ? 'auto' : _props$placement,
46
+ _props$offset = props.offset,
47
+ offset = _props$offset === void 0 ? [0, 0] : _props$offset,
48
+ zIndex = props.zIndex,
49
+ _props$isFocusTrapped = props.isFocusTrapped,
50
+ isFocusTrapped = _props$isFocusTrapped === void 0 ? true : _props$isFocusTrapped,
51
+ _props$closeOnEsc = props.closeOnEsc,
52
+ closeOnEsc = _props$closeOnEsc === void 0 ? true : _props$closeOnEsc,
53
+ _props$preventOverflo = props.preventOverflow,
54
+ preventOverflow = _props$preventOverflo === void 0 ? true : _props$preventOverflo,
55
+ _props$usePortal = props.usePortal,
56
+ usePortal = _props$usePortal === void 0 ? false : _props$usePortal,
57
+ view = props.view,
58
+ onToggle = props.onToggle,
59
+ rest = _objectWithoutProperties(props, _excluded);
60
+ var closeOnOverlayClick = true;
61
+ var closeOnBeyondTargetHover = true;
62
+ if (props.trigger === 'click' && props.closeOnOverlayClick === false) {
63
+ closeOnOverlayClick = false;
64
+ }
65
+ if (props.trigger === 'hover' && props.closeOnBeyondTargetHover === false) {
66
+ closeOnBeyondTargetHover = false;
67
+ }
61
68
  var rootRef = useRef(null);
62
69
  var popoverRef = useRef(null);
63
70
  var handleRef = useForkRef(rootRef, outerRootRef);
@@ -157,7 +164,7 @@ export var popoverRoot = function popoverRoot(Root) {
157
164
  return function () {
158
165
  return document.removeEventListener('click', onDocumentClick);
159
166
  };
160
- }, [isOpen, onToggle]);
167
+ }, [closeOnOverlayClick, isOpen, onToggle]);
161
168
  useEffect(function () {
162
169
  window.addEventListener('keydown', onEscape);
163
170
  return function () {
@@ -204,19 +211,22 @@ export var popoverRoot = function popoverRoot(Root) {
204
211
  Promise.resolve().then(forceUpdate);
205
212
  }, [isOpen, children, forceUpdate]);
206
213
  return /*#__PURE__*/React.createElement(StyledWrapper, {
207
- className: classes.wrapper,
208
- onMouseEnter: onMouseEnter,
209
- onMouseLeave: onMouseLeave
214
+ className: classes.wrapper
210
215
  }, /*#__PURE__*/React.createElement(StyledRoot, {
211
216
  ref: handleRef,
212
217
  onClick: onClick,
218
+ onMouseEnter: onMouseEnter,
219
+ onMouseLeave: onMouseLeave,
213
220
  onFocus: onFocus,
214
221
  onBlur: onBlur,
215
222
  className: cx(className, classes.target)
216
223
  }, target), children && portalRef.current && /*#__PURE__*/ReactDOM.createPortal( /*#__PURE__*/React.createElement(Root, _extends({
217
224
  view: view,
218
225
  className: className
219
- }, rest), /*#__PURE__*/React.createElement(StyledPopover, _extends({}, attributes.popper, {
226
+ }, rest, {
227
+ onMouseEnter: closeOnBeyondTargetHover ? undefined : onMouseEnter,
228
+ onMouseLeave: closeOnBeyondTargetHover ? undefined : onMouseEnter
229
+ }), /*#__PURE__*/React.createElement(StyledPopover, _extends({}, attributes.popper, {
220
230
  className: classes.root,
221
231
  ref: popoverForkRef,
222
232
  style: _objectSpread(_objectSpread(_objectSpread({}, styles.popper), {
@@ -3,7 +3,7 @@ import { DEFAULT_Z_INDEX } from '../Popup/utils';
3
3
  import { classes, tokens } from './Popover.tokens';
4
4
  export var StyledWrapper = /*#__PURE__*/styled.div.withConfig({
5
5
  componentId: "plasma-new-hope__sc-tnpyex-0"
6
- })(["display:inline-block;"]);
6
+ })([""]);
7
7
  export var StyledRoot = /*#__PURE__*/styled.div.withConfig({
8
8
  componentId: "plasma-new-hope__sc-tnpyex-1"
9
9
  })(["display:inline-flex;box-sizing:border-box;position:relative;"]);
@@ -111,8 +111,7 @@ export var SelectTarget = /*#__PURE__*/forwardRef(function (_ref, ref) {
111
111
  "aria-label": label,
112
112
  className: cx(withInnerLabelUp, withHasChips, withNoFocus, selectTarget),
113
113
  onWheel: onWheel,
114
- onKeyDown: onKeyDown,
115
- stretching: "filled"
114
+ onKeyDown: onKeyDown
116
115
  }), hasText && (enumerationType === 'comma' || target === 'button-like' ? /*#__PURE__*/React.createElement(StyledText, {
117
116
  className: selectTargeText
118
117
  }, textContent) : /*#__PURE__*/React.createElement(StyledChipsWrapper, {
@@ -33,6 +33,12 @@ const meta: Meta<typeof Popover> = {
33
33
  },
34
34
  table: { defaultValue: { summary: true } },
35
35
  },
36
+ closeOnBeyondTargetHover: {
37
+ control: {
38
+ type: 'boolean',
39
+ },
40
+ table: { defaultValue: { summary: true } },
41
+ },
36
42
  closeOnEsc: {
37
43
  control: {
38
44
  type: 'boolean',
@@ -62,6 +68,7 @@ const meta: Meta<typeof Popover> = {
62
68
  placement: 'bottom',
63
69
  trigger: 'click',
64
70
  closeOnOverlayClick: true,
71
+ closeOnBeyondTargetHover: true,
65
72
  closeOnEsc: true,
66
73
  isFocusTrapped: true,
67
74
  skidding: 0,
@@ -3,7 +3,6 @@
3
3
  export * from './mixins';
4
4
  export * from './engines';
5
5
  export * from './hooks';
6
- export * from './utils';
7
6
  export * from './components/Button';
8
7
  export * from './components/ButtonGroup';
9
8
  export * from './components/Chip';
@@ -43,6 +42,5 @@ export * from './components/Indicator';
43
42
  export * from './components/ButtonBase';
44
43
  export * from './components/Grid';
45
44
  export * from './components/Progress';
46
- export * from './components/Select';
47
45
  export * from './components/Divider';
48
46
  export * from './components/Toolbar';
@@ -1 +1 @@
1
- {"version":3,"file":"Cell.d.ts","sourceRoot":"","sources":["../../../src/components/Cell/Cell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAE1C,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAG1C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAO9C,eAAO,MAAM,QAAQ,SAAU,UAAU,cAAc,EAAE,SAAS,CAAC,qFAwC9D,CAAC;AAEN,eAAO,MAAM,UAAU;;;mBA1CQ,UAAU,cAAc,EAAE,SAAS,CAAC;;;;;;;;;;;;;;CA2DlE,CAAC"}
1
+ {"version":3,"file":"Cell.d.ts","sourceRoot":"","sources":["../../../src/components/Cell/Cell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAE1C,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAG1C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAO9C,eAAO,MAAM,QAAQ,SAAU,UAAU,cAAc,EAAE,SAAS,CAAC,qFA0C9D,CAAC;AAEN,eAAO,MAAM,UAAU;;;mBA5CQ,UAAU,cAAc,EAAE,SAAS,CAAC;;;;;;;;;;;;;;CA6DlE,CAAC"}
@@ -3,11 +3,17 @@ export declare const StyledRoot: import("@linaria/react").StyledComponent<import
3
3
  export declare const StyledCombobox: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
4
4
  export declare const StyledPopover: import("@linaria/react").StyledComponent<{
5
5
  selectWidth?: number | undefined;
6
- } & import("../../engines/types").PropsType<{
6
+ } & (import("../../engines/types").PropsType<{
7
7
  view: {
8
8
  css: import("@linaria/core").LinariaClassName;
9
9
  };
10
- }> & import("react").HTMLAttributes<HTMLDivElement> & import("../Popover/Popover.types").CustomPopoverProps & import("react").RefAttributes<HTMLDivElement>>;
10
+ }> & ((import("react").HTMLAttributes<HTMLDivElement> & import("../Popover/Popover.types").CustomPopoverProps & {
11
+ trigger?: "click" | undefined;
12
+ closeOnOverlayClick?: boolean | undefined;
13
+ } & import("react").RefAttributes<HTMLDivElement>) | (import("react").HTMLAttributes<HTMLDivElement> & import("../Popover/Popover.types").CustomPopoverProps & {
14
+ trigger?: "hover" | undefined;
15
+ closeOnBeyondTargetHover?: boolean | undefined;
16
+ } & import("react").RefAttributes<HTMLDivElement>)))>;
11
17
  export declare const ComboboxItemNotFound: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
12
18
  export declare const StyledNativeSelect: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLSelectElement> & import("react").SelectHTMLAttributes<HTMLSelectElement> & Record<never, unknown>>;
13
19
  //# sourceMappingURL=Combobox.styles.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Combobox.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Combobox/Combobox.styles.ts"],"names":[],"mappings":";AAOA,eAAO,MAAM,UAAU,qKAOtB,CAAC;AAEF,eAAO,MAAM,cAAc,qKAY1B,CAAC;AAKF,eAAO,MAAM,aAAa;;;;;;4JAMzB,CAAC;AAEF,eAAO,MAAM,oBAAoB,qKAUhC,CAAC;AAEF,eAAO,MAAM,kBAAkB,iLAY9B,CAAC"}
1
+ {"version":3,"file":"Combobox.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Combobox/Combobox.styles.ts"],"names":[],"mappings":";AAOA,eAAO,MAAM,UAAU,qKAGtB,CAAC;AAEF,eAAO,MAAM,cAAc,qKAY1B,CAAC;AAKF,eAAO,MAAM,aAAa;;;;;;;;;;;;qDAMzB,CAAC;AAEF,eAAO,MAAM,oBAAoB,qKAUhC,CAAC;AAEF,eAAO,MAAM,kBAAkB,iLAY9B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Dropdown.d.ts","sourceRoot":"","sources":["../../../src/components/Dropdown/Dropdown.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6B,MAAM,OAAO,CAAC;AAGlD,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAM1C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEtD;;GAEG;AACH,eAAO,MAAM,YAAY,SAAU,UAAU,cAAc,EAAE,aAAa,CAAC,iKA6DtE,CAAC;AAEN,eAAO,MAAM,cAAc;;;mBA/DQ,UAAU,cAAc,EAAE,aAAa,CAAC;;;;;;;;;;;;;;CAgF1E,CAAC"}
1
+ {"version":3,"file":"Dropdown.d.ts","sourceRoot":"","sources":["../../../src/components/Dropdown/Dropdown.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6B,MAAM,OAAO,CAAC;AAGlD,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAM1C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEtD;;GAEG;AACH,eAAO,MAAM,YAAY,SAAU,UAAU,cAAc,EAAE,aAAa,CAAC,iKA8DtE,CAAC;AAEN,eAAO,MAAM,cAAc;;;mBAhEQ,UAAU,cAAc,EAAE,aAAa,CAAC;;;;;;;;;;;;;;CAiF1E,CAAC"}
@@ -3,6 +3,12 @@ export declare const StyledPopover: import("@linaria/react").StyledMeta & import
3
3
  view: {
4
4
  css: import("@linaria/core").LinariaClassName;
5
5
  };
6
- }> & import("react").HTMLAttributes<HTMLDivElement> & import("../Popover/Popover.types").CustomPopoverProps & import("react").RefAttributes<HTMLDivElement>>;
6
+ }> & ((import("react").HTMLAttributes<HTMLDivElement> & import("../Popover/Popover.types").CustomPopoverProps & {
7
+ trigger?: "click" | undefined;
8
+ closeOnOverlayClick?: boolean | undefined;
9
+ } & import("react").RefAttributes<HTMLDivElement>) | (import("react").HTMLAttributes<HTMLDivElement> & import("../Popover/Popover.types").CustomPopoverProps & {
10
+ trigger?: "hover" | undefined;
11
+ closeOnBeyondTargetHover?: boolean | undefined;
12
+ } & import("react").RefAttributes<HTMLDivElement>))>;
7
13
  export declare const StyledDropdown: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
8
14
  //# sourceMappingURL=Dropdown.styles.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Dropdown.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Dropdown/Dropdown.styles.ts"],"names":[],"mappings":";AAUA,eAAO,MAAM,aAAa;;;;4JAIzB,CAAC;AAEF,eAAO,MAAM,cAAc,qKAY1B,CAAC"}
1
+ {"version":3,"file":"Dropdown.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Dropdown/Dropdown.styles.ts"],"names":[],"mappings":";AAUA,eAAO,MAAM,aAAa;;;;;;;;;;oDAIzB,CAAC;AAEF,eAAO,MAAM,cAAc,qKAY1B,CAAC"}
@@ -7,11 +7,11 @@ export declare const POPOVER_PORTAL_ID = "plasma-popover-root";
7
7
  * Всплывающее окно с возможностью позиционирования
8
8
  * и вызова по клику либо ховеру.
9
9
  */
10
- export declare const popoverRoot: (Root: RootProps<HTMLDivElement, PopoverProps>) => React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & import("./Popover.types").CustomPopoverProps & React.RefAttributes<HTMLDivElement>>;
10
+ export declare const popoverRoot: (Root: RootProps<HTMLDivElement, PopoverProps>) => React.ForwardRefExoticComponent<PopoverProps & React.RefAttributes<HTMLDivElement>>;
11
11
  export declare const popoverConfig: {
12
12
  name: string;
13
13
  tag: string;
14
- layout: (Root: RootProps<HTMLDivElement, PopoverProps>) => React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & import("./Popover.types").CustomPopoverProps & React.RefAttributes<HTMLDivElement>>;
14
+ layout: (Root: RootProps<HTMLDivElement, PopoverProps>) => React.ForwardRefExoticComponent<PopoverProps & React.RefAttributes<HTMLDivElement>>;
15
15
  base: string;
16
16
  variations: {
17
17
  view: {
@@ -1 +1 @@
1
- {"version":3,"file":"Popover.d.ts","sourceRoot":"","sources":["../../../src/components/Popover/Popover.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+D,MAAM,OAAO,CAAC;AAMpF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAIrD,OAAO,KAAK,EAAoB,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAItE,eAAO,MAAM,cAAc,KAAK,CAAC;AACjC,eAAO,MAAM,iBAAiB,wBAAwB,CAAC;AAEvD;;;GAGG;AACH,eAAO,MAAM,WAAW,SAAU,UAAU,cAAc,EAAE,YAAY,CAAC,+JAwPpE,CAAC;AAEN,eAAO,MAAM,aAAa;;;mBA1PQ,UAAU,cAAc,EAAE,YAAY,CAAC;;;;;;;;;;CAuQxE,CAAC"}
1
+ {"version":3,"file":"Popover.d.ts","sourceRoot":"","sources":["../../../src/components/Popover/Popover.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+D,MAAM,OAAO,CAAC;AAMpF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAIrD,OAAO,KAAK,EAAoB,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAItE,eAAO,MAAM,cAAc,KAAK,CAAC;AACjC,eAAO,MAAM,iBAAiB,wBAAwB,CAAC;AAEvD;;;GAGG;AACH,eAAO,MAAM,WAAW,SAAU,UAAU,cAAc,EAAE,YAAY,CAAC,wFAsQnE,CAAC;AAEP,eAAO,MAAM,aAAa;;;mBAxQQ,UAAU,cAAc,EAAE,YAAY,CAAC;;;;;;;;;;CAqRxE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Popover.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Popover/Popover.styles.ts"],"names":[],"mappings":";AAKA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,eAAO,MAAM,aAAa,qKAEzB,CAAC;AAEF,eAAO,MAAM,UAAU,qKAItB,CAAC;AAEF,eAAO,MAAM,WAAW,qKAcvB,CAAC;AAEF,eAAO,MAAM,aAAa,2KA8DzB,CAAC"}
1
+ {"version":3,"file":"Popover.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Popover/Popover.styles.ts"],"names":[],"mappings":";AAKA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,eAAO,MAAM,aAAa,qKAAe,CAAC;AAC1C,eAAO,MAAM,UAAU,qKAItB,CAAC;AAEF,eAAO,MAAM,WAAW,qKAcvB,CAAC;AAEF,eAAO,MAAM,aAAa,2KA8DzB,CAAC"}
@@ -2,18 +2,11 @@ import { Placement, ComputedPlacement } from '@popperjs/core';
2
2
  import type { HTMLAttributes, ReactNode, SyntheticEvent } from 'react';
3
3
  export declare type PopoverPlacementBasic = ComputedPlacement;
4
4
  export declare type PopoverPlacement = Placement;
5
- export declare type PopoverTrigger = 'hover' | 'click';
6
5
  export declare type CustomPopoverProps = {
7
6
  /**
8
7
  * Всплывающее окно раскрыто или нет.
9
8
  */
10
9
  isOpen?: boolean;
11
- /**
12
- * Способ открытия всплывающего окна - наведение или клик мышью.
13
- * @default
14
- * click
15
- */
16
- trigger?: PopoverTrigger;
17
10
  /**
18
11
  * Сторона открытия окна относительно target элемента.
19
12
  * @default
@@ -66,10 +59,6 @@ export declare type CustomPopoverProps = {
66
59
  * true
67
60
  */
68
61
  closeOnEsc?: boolean;
69
- /**
70
- * Закрывать окно при нажатии вне области окна. (Если trigger === 'click')
71
- */
72
- closeOnOverlayClick?: boolean;
73
62
  /**
74
63
  * Находится ли в портале.
75
64
  * @default
@@ -78,5 +67,23 @@ export declare type CustomPopoverProps = {
78
67
  usePortal?: boolean;
79
68
  view?: string;
80
69
  };
81
- export declare type PopoverProps = HTMLAttributes<HTMLDivElement> & CustomPopoverProps;
70
+ export declare type PopoverTrigger = {
71
+ /**
72
+ * Способ открытия всплывающего окна - наведение или клик мышью.
73
+ * @default
74
+ * click
75
+ */
76
+ trigger?: 'click';
77
+ /**
78
+ * Закрывать окно при нажатии вне области окна. (Если trigger === 'click')
79
+ */
80
+ closeOnOverlayClick?: boolean;
81
+ } | {
82
+ trigger?: 'hover';
83
+ /**
84
+ * Закрывать окно при наведении вне области target-элемента. (Если trigger === 'hover')
85
+ */
86
+ closeOnBeyondTargetHover?: boolean;
87
+ };
88
+ export declare type PopoverProps = HTMLAttributes<HTMLDivElement> & CustomPopoverProps & PopoverTrigger;
82
89
  //# sourceMappingURL=Popover.types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Popover.types.d.ts","sourceRoot":"","sources":["../../../src/components/Popover/Popover.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAC9D,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAEvE,oBAAY,qBAAqB,GAAG,iBAAiB,CAAC;AACtD,oBAAY,gBAAgB,GAAG,SAAS,CAAC;AAEzC,oBAAY,cAAc,GAAG,OAAO,GAAG,OAAO,CAAC;AAE/C,oBAAY,kBAAkB,GAAG;IAC7B;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;;;OAIG;IACH,OAAO,CAAC,EAAE,cAAc,CAAC;IACzB;;;;OAIG;IACH,SAAS,CAAC,EAAE,gBAAgB,GAAG,KAAK,CAAC,qBAAqB,CAAC,CAAC;IAC5D;;;;OAIG;IACH,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC1B;;OAEG;IACH,KAAK,CAAC,EAAE,UAAU,GAAG,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IAC3D;;OAEG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;OAEG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;;;OAIG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,cAAc,GAAG,KAAK,KAAK,IAAI,CAAC;IACpE;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;OAEG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,oBAAY,YAAY,GAAG,cAAc,CAAC,cAAc,CAAC,GAAG,kBAAkB,CAAC"}
1
+ {"version":3,"file":"Popover.types.d.ts","sourceRoot":"","sources":["../../../src/components/Popover/Popover.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAC9D,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAEvE,oBAAY,qBAAqB,GAAG,iBAAiB,CAAC;AACtD,oBAAY,gBAAgB,GAAG,SAAS,CAAC;AAEzC,oBAAY,kBAAkB,GAAG;IAC7B;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;;;OAIG;IACH,SAAS,CAAC,EAAE,gBAAgB,GAAG,KAAK,CAAC,qBAAqB,CAAC,CAAC;IAC5D;;;;OAIG;IACH,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC1B;;OAEG;IACH,KAAK,CAAC,EAAE,UAAU,GAAG,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IAC3D;;OAEG;IACH,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;OAEG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;;;OAIG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,cAAc,GAAG,KAAK,KAAK,IAAI,CAAC;IACpE;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,oBAAY,cAAc,GACpB;IACI;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;CACjC,GACD;IACI,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,wBAAwB,CAAC,EAAE,OAAO,CAAC;CACtC,CAAC;AAER,oBAAY,YAAY,GAAG,cAAc,CAAC,cAAc,CAAC,GAAG,kBAAkB,GAAG,cAAc,CAAC"}
@@ -3,10 +3,16 @@ export declare const StyledRoot: import("@linaria/react").StyledComponent<import
3
3
  export declare const StyledSelect: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
4
4
  export declare const StyledPopover: import("@linaria/react").StyledComponent<{
5
5
  selectWidth?: number | undefined;
6
- } & import("../../engines/types").PropsType<{
6
+ } & (import("../../engines/types").PropsType<{
7
7
  view: {
8
8
  css: import("@linaria/core").LinariaClassName;
9
9
  };
10
- }> & import("react").HTMLAttributes<HTMLDivElement> & import("../Popover/Popover.types").CustomPopoverProps & import("react").RefAttributes<HTMLDivElement>>;
10
+ }> & ((import("react").HTMLAttributes<HTMLDivElement> & import("../Popover/Popover.types").CustomPopoverProps & {
11
+ trigger?: "click" | undefined;
12
+ closeOnOverlayClick?: boolean | undefined;
13
+ } & import("react").RefAttributes<HTMLDivElement>) | (import("react").HTMLAttributes<HTMLDivElement> & import("../Popover/Popover.types").CustomPopoverProps & {
14
+ trigger?: "hover" | undefined;
15
+ closeOnBeyondTargetHover?: boolean | undefined;
16
+ } & import("react").RefAttributes<HTMLDivElement>)))>;
11
17
  export declare const StyledNativeSelect: import("@linaria/react").StyledComponent<import("react").ClassAttributes<HTMLSelectElement> & import("react").SelectHTMLAttributes<HTMLSelectElement> & Record<never, unknown>>;
12
18
  //# sourceMappingURL=Select.styles.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Select.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Select/Select.styles.ts"],"names":[],"mappings":";AASA,eAAO,MAAM,UAAU,qKAOtB,CAAC;AAEF,eAAO,MAAM,YAAY,qKAaxB,CAAC;AAKF,eAAO,MAAM,aAAa;;;;;;4JAMzB,CAAC;AAEF,eAAO,MAAM,kBAAkB,iLAwB9B,CAAC"}
1
+ {"version":3,"file":"Select.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Select/Select.styles.ts"],"names":[],"mappings":";AASA,eAAO,MAAM,UAAU,qKAOtB,CAAC;AAEF,eAAO,MAAM,YAAY,qKAaxB,CAAC;AAKF,eAAO,MAAM,aAAa;;;;;;;;;;;;qDAMzB,CAAC;AAEF,eAAO,MAAM,kBAAkB,iLAwB9B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"SelectTarget.d.ts","sourceRoot":"","sources":["../../../../../src/components/Select/ui/SelectTarget/SelectTarget.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAgB/D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAa9D;;GAEG;AACH,eAAO,MAAM,YAAY,6FAwIxB,CAAC"}
1
+ {"version":3,"file":"SelectTarget.d.ts","sourceRoot":"","sources":["../../../../../src/components/Select/ui/SelectTarget/SelectTarget.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAgB/D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAa9D;;GAEG;AACH,eAAO,MAAM,YAAY,6FAuIxB,CAAC"}
@@ -4,5 +4,11 @@ export declare const Popover: import("react").FunctionComponent<import("../../..
4
4
  view: {
5
5
  default: import("@linaria/core").LinariaClassName;
6
6
  };
7
- }> & import("react").HTMLAttributes<HTMLDivElement> & import("../../../../components/Popover/Popover.types").CustomPopoverProps & import("react").RefAttributes<HTMLDivElement>>;
7
+ }> & ((import("react").HTMLAttributes<HTMLDivElement> & import("../../../../components/Popover/Popover.types").CustomPopoverProps & {
8
+ trigger?: "click" | undefined;
9
+ closeOnOverlayClick?: boolean | undefined;
10
+ } & import("react").RefAttributes<HTMLDivElement>) | (import("react").HTMLAttributes<HTMLDivElement> & import("../../../../components/Popover/Popover.types").CustomPopoverProps & {
11
+ trigger?: "hover" | undefined;
12
+ closeOnBeyondTargetHover?: boolean | undefined;
13
+ } & import("react").RefAttributes<HTMLDivElement>))>;
8
14
  //# sourceMappingURL=Popover.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Popover.d.ts","sourceRoot":"","sources":["../../../../../src/examples/plasma_b2c/components/Popover/Popover.ts"],"names":[],"mappings":";AAKA,YAAY,EAAE,YAAY,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAIlF,eAAO,MAAM,OAAO;;;;gLAA0B,CAAC"}
1
+ {"version":3,"file":"Popover.d.ts","sourceRoot":"","sources":["../../../../../src/examples/plasma_b2c/components/Popover/Popover.ts"],"names":[],"mappings":";AAKA,YAAY,EAAE,YAAY,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAIlF,eAAO,MAAM,OAAO;;;;;;;;;;oDAA0B,CAAC"}
@@ -4,5 +4,11 @@ export declare const Popover: import("react").FunctionComponent<import("../../..
4
4
  view: {
5
5
  default: import("@linaria/core").LinariaClassName;
6
6
  };
7
- }> & import("react").HTMLAttributes<HTMLDivElement> & import("../../../../components/Popover/Popover.types").CustomPopoverProps & import("react").RefAttributes<HTMLDivElement>>;
7
+ }> & ((import("react").HTMLAttributes<HTMLDivElement> & import("../../../../components/Popover/Popover.types").CustomPopoverProps & {
8
+ trigger?: "click" | undefined;
9
+ closeOnOverlayClick?: boolean | undefined;
10
+ } & import("react").RefAttributes<HTMLDivElement>) | (import("react").HTMLAttributes<HTMLDivElement> & import("../../../../components/Popover/Popover.types").CustomPopoverProps & {
11
+ trigger?: "hover" | undefined;
12
+ closeOnBeyondTargetHover?: boolean | undefined;
13
+ } & import("react").RefAttributes<HTMLDivElement>))>;
8
14
  //# sourceMappingURL=Popover.d.ts.map