@salutejs/plasma-new-hope 0.175.0-canary.1504.11549657359.0 → 0.175.1-canary.1497.11552145733.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (221) hide show
  1. package/cjs/components/Combobox/ComboboxNew/Combobox.css +10 -10
  2. package/cjs/components/Combobox/ComboboxNew/ui/Inner/Inner.css +10 -10
  3. package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.css +10 -10
  4. package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +1 -2
  5. package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js.map +1 -1
  6. package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.styles.js +6 -20
  7. package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.styles.js.map +1 -1
  8. package/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/{Item.styles_1us8jz1.css → Item.styles_y71664.css} +1 -1
  9. package/cjs/components/Combobox/ComboboxOld/Combobox.css +28 -14
  10. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxDivider/ComboboxDivider.css +32 -18
  11. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxFooter/ComboboxFooter.css +32 -18
  12. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxGroup/ComboboxGroup.css +32 -18
  13. package/cjs/components/Combobox/ComboboxOld/ui/ComboboxHeader/ComboboxHeader.css +32 -18
  14. package/cjs/components/Dropdown/Dropdown.css +30 -16
  15. package/cjs/components/Dropdown/Dropdown.js +60 -37
  16. package/cjs/components/Dropdown/Dropdown.js.map +1 -1
  17. package/cjs/components/Dropdown/Dropdown.styles.js +14 -26
  18. package/cjs/components/Dropdown/Dropdown.styles.js.map +1 -1
  19. package/cjs/components/Dropdown/Dropdown.styles_1ix6io8.css +2 -0
  20. package/cjs/components/Dropdown/Dropdown.tokens.js +24 -1
  21. package/cjs/components/Dropdown/Dropdown.tokens.js.map +1 -1
  22. package/cjs/components/Dropdown/FloatingPopover.js +104 -0
  23. package/cjs/components/Dropdown/FloatingPopover.js.map +1 -0
  24. package/cjs/components/Dropdown/ui/DropdownInner/DropdownInner.js +17 -51
  25. package/cjs/components/Dropdown/ui/DropdownInner/DropdownInner.js.map +1 -1
  26. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.css +46 -6
  27. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js +29 -18
  28. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js.map +1 -1
  29. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +25 -31
  30. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js.map +1 -1
  31. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles_17va0nk.css +5 -0
  32. package/cjs/components/Dropdown/ui/DropdownItemOld/DropdownItem.styles.js +1 -1
  33. package/{es/components/Dropdown/ui/DropdownItemOld/DropdownItem.styles_12e50g5.css → cjs/components/Dropdown/ui/DropdownItemOld/DropdownItem.styles_1lyg81y.css} +1 -1
  34. package/cjs/components/Dropdown/ui/DropdownItemOld/DropdownItemOld.css +4 -4
  35. package/cjs/components/Dropdown/utils/getItemByFocused.js +13 -0
  36. package/cjs/components/Dropdown/utils/getItemByFocused.js.map +1 -0
  37. package/cjs/components/Dropdown/utils/getItemId.js +10 -0
  38. package/cjs/components/Dropdown/utils/getItemId.js.map +1 -0
  39. package/cjs/components/Dropdown/utils/getPlacement.js +16 -0
  40. package/cjs/components/Dropdown/utils/getPlacement.js.map +1 -0
  41. package/cjs/components/Dropdown/utils/index.js.map +1 -1
  42. package/cjs/components/Select/Select.js +1 -1
  43. package/cjs/components/Select/utils/getCorrectHeight.js.map +1 -1
  44. package/cjs/hooks/useOutsideClick.js +1 -1
  45. package/cjs/hooks/useOutsideClick.js.map +1 -1
  46. package/cjs/index.css +20 -22
  47. package/emotion/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +1 -2
  48. package/emotion/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.styles.js +14 -20
  49. package/emotion/cjs/components/Dropdown/Dropdown.js +58 -37
  50. package/emotion/cjs/components/Dropdown/Dropdown.styles.js +9 -25
  51. package/emotion/cjs/components/Dropdown/Dropdown.tokens.js +36 -2
  52. package/emotion/cjs/components/Dropdown/FloatingPopover.js +109 -0
  53. package/emotion/cjs/components/Dropdown/ui/DropdownInner/DropdownInner.js +17 -51
  54. package/emotion/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js +29 -18
  55. package/emotion/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +21 -41
  56. package/emotion/cjs/components/Dropdown/utils/getItemByFocused.js +12 -0
  57. package/emotion/cjs/components/Dropdown/utils/getItemId.js +9 -0
  58. package/emotion/cjs/components/Dropdown/utils/getPlacement.js +15 -0
  59. package/emotion/cjs/components/Dropdown/utils/index.js +23 -1
  60. package/emotion/cjs/examples/plasma_b2c/components/Combobox/Combobox.config.js +12 -12
  61. package/emotion/cjs/examples/plasma_b2c/components/Dropdown/Dropdown.config.js +5 -5
  62. package/emotion/cjs/examples/plasma_b2c/components/Dropdown/Dropdown.stories.tsx +6 -5
  63. package/emotion/cjs/examples/plasma_web/components/Combobox/Combobox.config.js +12 -12
  64. package/emotion/cjs/examples/plasma_web/components/Dropdown/Dropdown.config.js +5 -5
  65. package/emotion/cjs/examples/plasma_web/components/Dropdown/Dropdown.stories.tsx +6 -5
  66. package/emotion/cjs/hooks/useOutsideClick.js +1 -1
  67. package/emotion/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +1 -2
  68. package/emotion/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.styles.js +14 -20
  69. package/emotion/es/components/Dropdown/Dropdown.js +60 -40
  70. package/emotion/es/components/Dropdown/Dropdown.styles.js +9 -25
  71. package/emotion/es/components/Dropdown/Dropdown.tokens.js +35 -1
  72. package/emotion/es/components/Dropdown/FloatingPopover.js +102 -0
  73. package/emotion/es/components/Dropdown/ui/DropdownInner/DropdownInner.js +18 -52
  74. package/emotion/es/components/Dropdown/ui/DropdownItem/DropdownItem.js +31 -20
  75. package/emotion/es/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +22 -42
  76. package/emotion/es/components/Dropdown/utils/getItemByFocused.js +6 -0
  77. package/emotion/es/components/Dropdown/utils/getItemId.js +3 -0
  78. package/emotion/es/components/Dropdown/utils/getPlacement.js +9 -0
  79. package/emotion/es/components/Dropdown/utils/index.js +4 -1
  80. package/emotion/es/examples/plasma_b2c/components/Combobox/Combobox.config.js +12 -12
  81. package/emotion/es/examples/plasma_b2c/components/Dropdown/Dropdown.config.js +6 -6
  82. package/emotion/es/examples/plasma_b2c/components/Dropdown/Dropdown.stories.tsx +6 -5
  83. package/emotion/es/examples/plasma_web/components/Combobox/Combobox.config.js +12 -12
  84. package/emotion/es/examples/plasma_web/components/Dropdown/Dropdown.config.js +6 -6
  85. package/emotion/es/examples/plasma_web/components/Dropdown/Dropdown.stories.tsx +6 -5
  86. package/emotion/es/hooks/useOutsideClick.js +1 -1
  87. package/es/components/Combobox/ComboboxNew/Combobox.css +10 -10
  88. package/es/components/Combobox/ComboboxNew/ui/Inner/Inner.css +10 -10
  89. package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.css +10 -10
  90. package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +1 -2
  91. package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js.map +1 -1
  92. package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.styles.js +6 -20
  93. package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.styles.js.map +1 -1
  94. package/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/{Item.styles_1us8jz1.css → Item.styles_y71664.css} +1 -1
  95. package/es/components/Combobox/ComboboxOld/Combobox.css +28 -14
  96. package/es/components/Combobox/ComboboxOld/ui/ComboboxDivider/ComboboxDivider.css +32 -18
  97. package/es/components/Combobox/ComboboxOld/ui/ComboboxFooter/ComboboxFooter.css +32 -18
  98. package/es/components/Combobox/ComboboxOld/ui/ComboboxGroup/ComboboxGroup.css +32 -18
  99. package/es/components/Combobox/ComboboxOld/ui/ComboboxHeader/ComboboxHeader.css +32 -18
  100. package/es/components/Dropdown/Dropdown.css +30 -16
  101. package/es/components/Dropdown/Dropdown.js +62 -40
  102. package/es/components/Dropdown/Dropdown.js.map +1 -1
  103. package/es/components/Dropdown/Dropdown.styles.js +15 -26
  104. package/es/components/Dropdown/Dropdown.styles.js.map +1 -1
  105. package/es/components/Dropdown/Dropdown.styles_1ix6io8.css +2 -0
  106. package/es/components/Dropdown/Dropdown.tokens.js +24 -1
  107. package/es/components/Dropdown/Dropdown.tokens.js.map +1 -1
  108. package/es/components/Dropdown/FloatingPopover.js +100 -0
  109. package/es/components/Dropdown/FloatingPopover.js.map +1 -0
  110. package/es/components/Dropdown/ui/DropdownInner/DropdownInner.js +18 -52
  111. package/es/components/Dropdown/ui/DropdownInner/DropdownInner.js.map +1 -1
  112. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.css +46 -6
  113. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.js +31 -20
  114. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.js.map +1 -1
  115. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +24 -29
  116. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js.map +1 -1
  117. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.styles_17va0nk.css +5 -0
  118. package/es/components/Dropdown/ui/DropdownItemOld/DropdownItem.styles.js +1 -1
  119. package/{cjs/components/Dropdown/ui/DropdownItemOld/DropdownItem.styles_12e50g5.css → es/components/Dropdown/ui/DropdownItemOld/DropdownItem.styles_1lyg81y.css} +1 -1
  120. package/es/components/Dropdown/ui/DropdownItemOld/DropdownItemOld.css +4 -4
  121. package/es/components/Dropdown/utils/getItemByFocused.js +9 -0
  122. package/es/components/Dropdown/utils/getItemByFocused.js.map +1 -0
  123. package/es/components/Dropdown/utils/getItemId.js +6 -0
  124. package/es/components/Dropdown/utils/getItemId.js.map +1 -0
  125. package/es/components/Dropdown/utils/getPlacement.js +12 -0
  126. package/es/components/Dropdown/utils/getPlacement.js.map +1 -0
  127. package/es/components/Dropdown/utils/index.js.map +1 -1
  128. package/es/components/Select/Select.js +1 -1
  129. package/es/components/Select/utils/getCorrectHeight.js.map +1 -1
  130. package/es/hooks/useOutsideClick.js +1 -1
  131. package/es/hooks/useOutsideClick.js.map +1 -1
  132. package/es/index.css +20 -22
  133. package/package.json +2 -2
  134. package/styled-components/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +1 -2
  135. package/styled-components/cjs/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.styles.js +4 -10
  136. package/styled-components/cjs/components/Dropdown/Dropdown.js +58 -37
  137. package/styled-components/cjs/components/Dropdown/Dropdown.styles.js +9 -15
  138. package/styled-components/cjs/components/Dropdown/Dropdown.tokens.js +36 -2
  139. package/styled-components/cjs/components/Dropdown/FloatingPopover.js +109 -0
  140. package/styled-components/cjs/components/Dropdown/ui/DropdownInner/DropdownInner.js +17 -51
  141. package/styled-components/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.js +29 -18
  142. package/styled-components/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +17 -19
  143. package/styled-components/cjs/components/Dropdown/utils/getItemByFocused.js +12 -0
  144. package/styled-components/cjs/components/Dropdown/utils/getItemId.js +9 -0
  145. package/styled-components/cjs/components/Dropdown/utils/getPlacement.js +15 -0
  146. package/styled-components/cjs/components/Dropdown/utils/index.js +23 -1
  147. package/styled-components/cjs/examples/plasma_b2c/components/Combobox/Combobox.config.js +4 -4
  148. package/styled-components/cjs/examples/plasma_b2c/components/Dropdown/Dropdown.config.js +5 -5
  149. package/styled-components/cjs/examples/plasma_b2c/components/Dropdown/Dropdown.stories.tsx +6 -5
  150. package/styled-components/cjs/examples/plasma_web/components/Combobox/Combobox.config.js +4 -4
  151. package/styled-components/cjs/examples/plasma_web/components/Dropdown/Dropdown.config.js +5 -5
  152. package/styled-components/cjs/examples/plasma_web/components/Dropdown/Dropdown.stories.tsx +6 -5
  153. package/styled-components/cjs/hooks/useOutsideClick.js +1 -1
  154. package/styled-components/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.js +1 -2
  155. package/styled-components/es/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.styles.js +4 -10
  156. package/styled-components/es/components/Dropdown/Dropdown.js +60 -40
  157. package/styled-components/es/components/Dropdown/Dropdown.styles.js +9 -15
  158. package/styled-components/es/components/Dropdown/Dropdown.tokens.js +35 -1
  159. package/styled-components/es/components/Dropdown/FloatingPopover.js +102 -0
  160. package/styled-components/es/components/Dropdown/ui/DropdownInner/DropdownInner.js +18 -52
  161. package/styled-components/es/components/Dropdown/ui/DropdownItem/DropdownItem.js +31 -20
  162. package/styled-components/es/components/Dropdown/ui/DropdownItem/DropdownItem.styles.js +18 -20
  163. package/styled-components/es/components/Dropdown/utils/getItemByFocused.js +6 -0
  164. package/styled-components/es/components/Dropdown/utils/getItemId.js +3 -0
  165. package/styled-components/es/components/Dropdown/utils/getPlacement.js +9 -0
  166. package/styled-components/es/components/Dropdown/utils/index.js +4 -1
  167. package/styled-components/es/examples/plasma_b2c/components/Combobox/Combobox.config.js +4 -4
  168. package/styled-components/es/examples/plasma_b2c/components/Dropdown/Dropdown.config.js +6 -6
  169. package/styled-components/es/examples/plasma_b2c/components/Dropdown/Dropdown.stories.tsx +6 -5
  170. package/styled-components/es/examples/plasma_web/components/Combobox/Combobox.config.js +4 -4
  171. package/styled-components/es/examples/plasma_web/components/Dropdown/Dropdown.config.js +6 -6
  172. package/styled-components/es/examples/plasma_web/components/Dropdown/Dropdown.stories.tsx +6 -5
  173. package/styled-components/es/hooks/useOutsideClick.js +1 -1
  174. package/types/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.d.ts.map +1 -1
  175. package/types/components/Combobox/ComboboxNew/ui/Inner/ui/Item/Item.styles.d.ts.map +1 -1
  176. package/types/components/Combobox/ComboboxOld/Combobox.types.d.ts +2 -1
  177. package/types/components/Combobox/ComboboxOld/Combobox.types.d.ts.map +1 -1
  178. package/types/components/Dropdown/Dropdown.d.ts +2 -1
  179. package/types/components/Dropdown/Dropdown.d.ts.map +1 -1
  180. package/types/components/Dropdown/Dropdown.styles.d.ts +1 -6
  181. package/types/components/Dropdown/Dropdown.styles.d.ts.map +1 -1
  182. package/types/components/Dropdown/Dropdown.tokens.d.ts +25 -0
  183. package/types/components/Dropdown/Dropdown.tokens.d.ts.map +1 -1
  184. package/types/components/Dropdown/Dropdown.types.d.ts +30 -4
  185. package/types/components/Dropdown/Dropdown.types.d.ts.map +1 -1
  186. package/types/components/Dropdown/FloatingPopover.d.ts +5 -0
  187. package/types/components/Dropdown/FloatingPopover.d.ts.map +1 -0
  188. package/types/components/Dropdown/index.d.ts +1 -1
  189. package/types/components/Dropdown/index.d.ts.map +1 -1
  190. package/types/components/Dropdown/ui/DropdownInner/DropdownInner.d.ts.map +1 -1
  191. package/types/components/Dropdown/ui/DropdownInner/DropdownInner.type.d.ts +1 -12
  192. package/types/components/Dropdown/ui/DropdownInner/DropdownInner.type.d.ts.map +1 -1
  193. package/types/components/Dropdown/ui/DropdownItem/DropdownItem.d.ts.map +1 -1
  194. package/types/components/Dropdown/ui/DropdownItem/DropdownItem.styles.d.ts +32 -3
  195. package/types/components/Dropdown/ui/DropdownItem/DropdownItem.styles.d.ts.map +1 -1
  196. package/types/components/Dropdown/ui/DropdownItem/DropdownItem.type.d.ts +1 -14
  197. package/types/components/Dropdown/ui/DropdownItem/DropdownItem.type.d.ts.map +1 -1
  198. package/types/components/Dropdown/utils/getItemByFocused.d.ts +4 -0
  199. package/types/components/Dropdown/utils/getItemByFocused.d.ts.map +1 -0
  200. package/types/components/Dropdown/utils/getItemId.d.ts +2 -0
  201. package/types/components/Dropdown/utils/getItemId.d.ts.map +1 -0
  202. package/types/components/Dropdown/utils/getPlacement.d.ts +3 -0
  203. package/types/components/Dropdown/utils/getPlacement.d.ts.map +1 -0
  204. package/types/components/Dropdown/utils/index.d.ts +3 -0
  205. package/types/components/Dropdown/utils/index.d.ts.map +1 -1
  206. package/types/components/Select/utils/getCorrectHeight.d.ts +2 -2
  207. package/types/components/Select/utils/getCorrectHeight.d.ts.map +1 -1
  208. package/types/examples/plasma_b2c/components/Dropdown/Dropdown.config.d.ts +3 -3
  209. package/types/examples/plasma_b2c/components/Dropdown/Dropdown.config.d.ts.map +1 -1
  210. package/types/examples/plasma_b2c/components/Dropdown/Dropdown.d.ts +4 -4
  211. package/types/examples/plasma_b2c/components/Dropdown/Dropdown.d.ts.map +1 -1
  212. package/types/examples/plasma_web/components/Dropdown/Dropdown.config.d.ts +3 -3
  213. package/types/examples/plasma_web/components/Dropdown/Dropdown.config.d.ts.map +1 -1
  214. package/types/examples/plasma_web/components/Dropdown/Dropdown.d.ts +4 -4
  215. package/types/examples/plasma_web/components/Dropdown/Dropdown.d.ts.map +1 -1
  216. package/types/hooks/useOutsideClick.d.ts +1 -1
  217. package/types/hooks/useOutsideClick.d.ts.map +1 -1
  218. package/cjs/components/Dropdown/Dropdown.styles_1tihqkp.css +0 -3
  219. package/cjs/components/Dropdown/ui/DropdownItem/DropdownItem.styles_blclup.css +0 -6
  220. package/es/components/Dropdown/Dropdown.styles_1tihqkp.css +0 -3
  221. package/es/components/Dropdown/ui/DropdownItem/DropdownItem.styles_blclup.css +0 -6
@@ -4,6 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var _rollupPluginBabelHelpers = require('../../_virtual/_rollupPluginBabelHelpers.js');
6
6
  var React = require('react');
7
+ var plasmaCore = require('@salutejs/plasma-core');
7
8
  var index$1 = require('../../utils/index.js');
8
9
  var pathReducer = require('./reducers/pathReducer.js');
9
10
  var focusedPathReducer = require('./reducers/focusedPathReducer.js');
@@ -14,22 +15,26 @@ var index = require('./utils/index.js');
14
15
  var Dropdown_tokens = require('./Dropdown.tokens.js');
15
16
  var useKeyboardNavigation = require('./hooks/useKeyboardNavigation.js');
16
17
  var useHashMaps = require('./hooks/useHashMaps.js');
17
- var getPopoverPlacement = require('../../utils/getPopoverPlacement.js');
18
+ var FloatingPopover = require('./FloatingPopover.js');
19
+ var getItemByFocused = require('./utils/getItemByFocused.js');
20
+ var useOutsideClick = require('../../hooks/useOutsideClick.js');
21
+ var getPlacement = require('./utils/getPlacement.js');
22
+ var getItemId = require('./utils/getItemId.js');
18
23
  var DropdownInner = require('./ui/DropdownInner/DropdownInner.js');
19
24
 
20
25
  var _excluded = ["items", "children", "placement", "offset", "closeOnOverlayClick", "onToggle", "size", "view", "itemRole", "className", "listWidth", "listHeight", "listOverflow", "closeOnSelect", "onHover", "onItemSelect", "onItemClick", "trigger", "variant", "hasArrow", "portal"];
26
+ var Context = /*#__PURE__*/React.createContext({});
21
27
 
22
28
  /**
23
29
  * Выпадающий список.
24
30
  */
25
31
  var dropdownRoot = function dropdownRoot(Root) {
26
32
  return /*#__PURE__*/React.forwardRef(function (_ref, ref) {
33
+ var _getItemByFocused;
27
34
  var items = _ref.items,
28
35
  children = _ref.children,
29
- _ref$placement = _ref.placement,
30
- placement = _ref$placement === void 0 ? 'bottom' : _ref$placement,
31
- _ref$offset = _ref.offset,
32
- offset = _ref$offset === void 0 ? [0, 0] : _ref$offset,
36
+ placement = _ref.placement,
37
+ offset = _ref.offset,
33
38
  _ref$closeOnOverlayCl = _ref.closeOnOverlayClick,
34
39
  closeOnOverlayClick = _ref$closeOnOverlayCl === void 0 ? true : _ref$closeOnOverlayCl,
35
40
  onToggle = _ref.onToggle,
@@ -66,6 +71,25 @@ var dropdownRoot = function dropdownRoot(Root) {
66
71
  _useHashMaps2 = _rollupPluginBabelHelpers.slicedToArray(_useHashMaps, 2),
67
72
  pathMap = _useHashMaps2[0],
68
73
  focusedToValueMap = _useHashMaps2[1];
74
+ var activeDescendantItemValue = ((_getItemByFocused = getItemByFocused.getItemByFocused(focusedPath, focusedToValueMap)) === null || _getItemByFocused === void 0 ? void 0 : _getItemByFocused.value) || '';
75
+ var floatingPopoverRef = React.useRef(null);
76
+ var treeId = plasmaCore.safeUseId();
77
+
78
+ // Логика работы при клике за пределами выпадающего списка
79
+ var targetRef = useOutsideClick.useOutsideClick(function (event) {
80
+ if (!isCurrentListOpen || !closeOnOverlayClick) {
81
+ return;
82
+ }
83
+ dispatchPath({
84
+ type: 'reset'
85
+ });
86
+ dispatchFocusedPath({
87
+ type: 'reset'
88
+ });
89
+ if (onToggle) {
90
+ onToggle(false, event);
91
+ }
92
+ }, floatingPopoverRef);
69
93
  var handleGlobalToggle = function handleGlobalToggle(opened, event) {
70
94
  if (opened) {
71
95
  dispatchPath({
@@ -97,66 +121,64 @@ var dropdownRoot = function dropdownRoot(Root) {
97
121
  }),
98
122
  onKeyDown = _useKeyNavigation.onKeyDown;
99
123
  var isCurrentListOpen = Boolean(path[0]);
100
- var getActiveDescendant = function getActiveDescendant() {
101
- var _focusedToValueMap$ge;
102
- var focusedPathAsString = focusedPath.reduce(function (acc, n) {
103
- return "".concat(acc, "/").concat(n);
104
- }, '').replace(/^(\/)/, '');
105
- return focusedToValueMap === null || focusedToValueMap === void 0 || (_focusedToValueMap$ge = focusedToValueMap.get(focusedPathAsString)) === null || _focusedToValueMap$ge === void 0 ? void 0 : _focusedToValueMap$ge.value.toString();
106
- };
107
- return /*#__PURE__*/React.createElement(Dropdown_styles.StyledPopover, {
124
+ return /*#__PURE__*/React.createElement(Context.Provider, {
125
+ value: {
126
+ focusedPath: focusedPath,
127
+ size: size,
128
+ variant: variant,
129
+ itemRole: itemRole,
130
+ handleGlobalToggle: handleGlobalToggle,
131
+ closeOnSelect: closeOnSelect,
132
+ onHover: onHover,
133
+ onItemClick: onItemClick,
134
+ onItemSelect: onItemSelect,
135
+ hasArrow: hasArrow,
136
+ treeId: treeId
137
+ }
138
+ }, /*#__PURE__*/React.createElement(FloatingPopover.FloatingPopover, {
139
+ ref: floatingPopoverRef,
108
140
  opened: isCurrentListOpen,
109
141
  onToggle: handleGlobalToggle,
142
+ placement: getPlacement.getPlacement(placement),
110
143
  offset: offset,
111
- placement: getPopoverPlacement.getPlacements(placement),
144
+ portal: portal,
112
145
  trigger: trigger,
113
- closeOnOverlayClick: closeOnOverlayClick,
114
- isFocusTrapped: false,
115
146
  target: index.childrenWithProps(children, {
116
147
  role: 'combobox',
117
- 'aria-controls': 'tree_level_1',
148
+ 'aria-controls': "".concat(treeId, "_tree_level_1"),
118
149
  'aria-expanded': isCurrentListOpen,
119
- 'aria-activedescendant': getActiveDescendant(),
150
+ 'aria-activedescendant': activeDescendantItemValue ? getItemId.getItemId(treeId, activeDescendantItemValue.toString()) : '',
120
151
  onKeyDown: onKeyDown
121
- }),
122
- preventOverflow: false,
123
- usePortal: Boolean(portal),
124
- frame: portal
152
+ })
125
153
  }, /*#__PURE__*/React.createElement(Root, _rollupPluginBabelHelpers.extends({
126
154
  className: index$1.cx(className, Dropdown_tokens.classes.dropdownRoot),
127
155
  ref: ref,
128
156
  view: view,
129
- size: size
157
+ size: size,
158
+ style: {
159
+ display: 'inline-block'
160
+ }
130
161
  }, rest), /*#__PURE__*/React.createElement(Dropdown_styles.Ul, {
162
+ ref: targetRef,
163
+ id: "".concat(treeId, "_tree_level_1"),
164
+ role: "tree",
131
165
  listHeight: listHeight,
132
166
  listOverflow: listOverflow,
133
- role: "tree",
134
- id: "tree_level_1",
135
167
  listWidth: listWidth
136
168
  }, items.map(function (item, index) {
137
169
  return /*#__PURE__*/React.createElement(DropdownInner.DropdownInner, {
138
170
  key: "".concat(index, "/0"),
139
171
  item: item,
140
172
  currentLevel: 0,
141
- focusedPath: focusedPath,
142
173
  trigger: trigger,
143
174
  path: path,
144
175
  dispatchPath: dispatchPath,
145
176
  index: index,
146
- itemRole: itemRole,
147
177
  listHeight: listHeight,
148
178
  listOverflow: listOverflow,
149
- handleGlobalToggle: handleGlobalToggle,
150
- closeOnSelect: closeOnSelect,
151
- onHover: onHover,
152
- onItemSelect: onItemSelect,
153
- onItemClick: onItemClick,
154
- listWidth: listWidth,
155
- variant: variant,
156
- hasArrow: hasArrow,
157
- size: size
179
+ listWidth: listWidth
158
180
  });
159
- }))));
181
+ })))));
160
182
  });
161
183
  };
162
184
  var dropdownConfig = {
@@ -178,6 +200,7 @@ var dropdownConfig = {
178
200
  }
179
201
  };
180
202
 
203
+ exports.Context = Context;
181
204
  exports.dropdownConfig = dropdownConfig;
182
205
  exports.dropdownRoot = dropdownRoot;
183
206
  //# sourceMappingURL=Dropdown.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Dropdown.js","sources":["../../../src/components/Dropdown/Dropdown.tsx"],"sourcesContent":["import React, { forwardRef, useReducer } from 'react';\n\nimport { RootProps } from '../../engines';\nimport { cx, getPlacements } from '../../utils';\n\nimport { pathReducer } from './reducers/pathReducer';\nimport { focusedPathReducer } from './reducers/focusedPathReducer';\nimport { DropdownInner } from './ui';\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as sizeCSS } from './variations/_size/base';\nimport { Ul, StyledPopover, base } from './Dropdown.styles';\nimport { childrenWithProps } from './utils';\nimport type { DropdownProps, HandleGlobalToggleType } from './Dropdown.types';\nimport { classes } from './Dropdown.tokens';\nimport { useKeyNavigation } from './hooks/useKeyboardNavigation';\nimport { useHashMaps } from './hooks/useHashMaps';\n\n/**\n * Выпадающий список.\n */\nexport const dropdownRoot = (Root: RootProps<HTMLDivElement, Omit<DropdownProps, 'items'>>) =>\n forwardRef<HTMLDivElement, DropdownProps>(\n (\n {\n items,\n children,\n placement = 'bottom',\n offset = [0, 0],\n closeOnOverlayClick = true,\n onToggle,\n size,\n view,\n itemRole = 'treeitem',\n className,\n listWidth,\n listHeight,\n listOverflow,\n closeOnSelect = true,\n onHover,\n onItemSelect,\n onItemClick,\n trigger = 'click',\n variant = 'normal',\n hasArrow = true,\n portal,\n ...rest\n },\n ref,\n ) => {\n const [path, dispatchPath] = useReducer(pathReducer, []);\n const [focusedPath, dispatchFocusedPath] = useReducer(focusedPathReducer, []);\n\n const [pathMap, focusedToValueMap] = useHashMaps(items);\n\n const handleGlobalToggle: HandleGlobalToggleType = (opened, event) => {\n if (opened) {\n dispatchPath({ type: 'opened_first_level' });\n } else {\n dispatchFocusedPath({ type: 'reset' });\n dispatchPath({ type: 'reset' });\n }\n\n if (onToggle) {\n onToggle(opened, event);\n }\n };\n\n const { onKeyDown } = useKeyNavigation({\n focusedPath,\n dispatchFocusedPath,\n path,\n dispatchPath,\n pathMap,\n focusedToValueMap,\n handleGlobalToggle,\n closeOnSelect,\n onItemSelect,\n onItemClick,\n });\n\n const isCurrentListOpen = Boolean(path[0]);\n\n const getActiveDescendant = () => {\n const focusedPathAsString = focusedPath.reduce((acc, n) => `${acc}/${n}`, '').replace(/^(\\/)/, '');\n return focusedToValueMap?.get(focusedPathAsString)?.value.toString();\n };\n\n return (\n <StyledPopover\n opened={isCurrentListOpen}\n onToggle={handleGlobalToggle}\n offset={offset}\n placement={getPlacements(placement)}\n trigger={trigger}\n closeOnOverlayClick={closeOnOverlayClick}\n isFocusTrapped={false}\n target={childrenWithProps(children, {\n role: 'combobox',\n 'aria-controls': 'tree_level_1',\n 'aria-expanded': isCurrentListOpen,\n 'aria-activedescendant': getActiveDescendant(),\n onKeyDown,\n })}\n preventOverflow={false}\n usePortal={Boolean(portal)}\n frame={portal}\n >\n <Root className={cx(className, classes.dropdownRoot)} ref={ref} view={view} size={size} {...rest}>\n <Ul\n listHeight={listHeight}\n listOverflow={listOverflow}\n role=\"tree\"\n id=\"tree_level_1\"\n listWidth={listWidth}\n >\n {items.map((item, index) => (\n <DropdownInner\n key={`${index}/0`}\n item={item}\n currentLevel={0}\n focusedPath={focusedPath}\n trigger={trigger}\n path={path}\n dispatchPath={dispatchPath}\n index={index}\n itemRole={itemRole}\n listHeight={listHeight}\n listOverflow={listOverflow}\n handleGlobalToggle={handleGlobalToggle}\n closeOnSelect={closeOnSelect}\n onHover={onHover}\n onItemSelect={onItemSelect}\n onItemClick={onItemClick}\n listWidth={listWidth}\n variant={variant}\n hasArrow={hasArrow}\n size={size}\n />\n ))}\n </Ul>\n </Root>\n </StyledPopover>\n );\n },\n );\n\nexport const dropdownConfig = {\n name: 'Dropdown',\n tag: 'div',\n layout: dropdownRoot,\n base,\n variations: {\n view: {\n css: viewCSS,\n },\n size: {\n css: sizeCSS,\n },\n },\n defaults: {\n view: 'default',\n size: 'm',\n },\n};\n"],"names":["dropdownRoot","Root","forwardRef","_ref","ref","items","children","_ref$placement","placement","_ref$offset","offset","_ref$closeOnOverlayCl","closeOnOverlayClick","onToggle","size","view","_ref$itemRole","itemRole","className","listWidth","listHeight","listOverflow","_ref$closeOnSelect","closeOnSelect","onHover","onItemSelect","onItemClick","_ref$trigger","trigger","_ref$variant","variant","_ref$hasArrow","hasArrow","portal","rest","_objectWithoutProperties","_excluded","_useReducer","useReducer","pathReducer","_useReducer2","_slicedToArray","path","dispatchPath","_useReducer3","focusedPathReducer","_useReducer4","focusedPath","dispatchFocusedPath","_useHashMaps","useHashMaps","_useHashMaps2","pathMap","focusedToValueMap","handleGlobalToggle","opened","event","type","_useKeyNavigation","useKeyNavigation","onKeyDown","isCurrentListOpen","Boolean","getActiveDescendant","_focusedToValueMap$ge","focusedPathAsString","reduce","acc","n","concat","replace","get","value","toString","React","createElement","StyledPopover","getPlacements","isFocusTrapped","target","childrenWithProps","role","preventOverflow","usePortal","frame","_extends","cx","classes","Ul","id","map","item","index","DropdownInner","key","currentLevel","dropdownConfig","name","tag","layout","base","variations","css","viewCSS","sizeCSS","defaults"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAiBA;AACA;AACA;IACaA,YAAY,GAAG,SAAfA,YAAYA,CAAIC,IAA6D,EAAA;AAAA,EAAA,oBACtFC,gBAAU,CACN,UAAAC,IAAA,EAyBIC,GAAG,EACF;AAAA,IAAA,IAxBGC,KAAK,GAAAF,IAAA,CAALE,KAAK;MACLC,QAAQ,GAAAH,IAA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GAAG,EAAE,KAAK;AACVC,EAAAA,MAAM,EAAEnG,YAAY;AACpBoG,EAAAA,IAAI,EAAJA,oBAAI;AACJC,EAAAA,UAAU,EAAE;AACRtF,IAAAA,IAAI,EAAE;AACFuF,MAAAA,GAAG,EAAEC,SAAAA;KACR;AACDzF,IAAAA,IAAI,EAAE;AACFwF,MAAAA,GAAG,EAAEE,WAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACN1F,IAAAA,IAAI,EAAE,SAAS;AACfD,IAAAA,IAAI,EAAE,GAAA;AACV,GAAA;AACJ;;;;;"}
1
+ {"version":3,"file":"Dropdown.js","sources":["../../../src/components/Dropdown/Dropdown.tsx"],"sourcesContent":["import React, { createContext, forwardRef, useReducer, useRef } from 'react';\nimport { safeUseId } from '@salutejs/plasma-core';\n\nimport { RootProps } from '../../engines';\nimport { cx } from '../../utils';\nimport { useOutsideClick } from '../../hooks';\n\nimport { pathReducer } from './reducers/pathReducer';\nimport { focusedPathReducer } from './reducers/focusedPathReducer';\nimport { DropdownInner } from './ui';\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as sizeCSS } from './variations/_size/base';\nimport { Ul, base } from './Dropdown.styles';\nimport { childrenWithProps, getItemByFocused, getItemId, getPlacement } from './utils';\nimport type { DropdownProps, HandleGlobalToggleType, ItemContext } from './Dropdown.types';\nimport { classes } from './Dropdown.tokens';\nimport { useKeyNavigation } from './hooks/useKeyboardNavigation';\nimport { useHashMaps } from './hooks/useHashMaps';\nimport { FloatingPopover } from './FloatingPopover';\n\nexport const Context = createContext<ItemContext>({} as ItemContext);\n\n/**\n * Выпадающий список.\n */\nexport const dropdownRoot = (Root: RootProps<HTMLDivElement, Omit<DropdownProps, 'items'>>) =>\n forwardRef<HTMLDivElement, DropdownProps>(\n (\n {\n items,\n children,\n placement,\n offset,\n closeOnOverlayClick = true,\n onToggle,\n size,\n view,\n itemRole = 'treeitem',\n className,\n listWidth,\n listHeight,\n listOverflow,\n closeOnSelect = true,\n onHover,\n onItemSelect,\n onItemClick,\n trigger = 'click',\n variant = 'normal',\n hasArrow = true,\n portal,\n ...rest\n },\n ref,\n ) => {\n const [path, dispatchPath] = useReducer(pathReducer, []);\n const [focusedPath, dispatchFocusedPath] = useReducer(focusedPathReducer, []);\n\n const [pathMap, focusedToValueMap] = useHashMaps(items);\n\n const activeDescendantItemValue = getItemByFocused(focusedPath, focusedToValueMap)?.value || '';\n\n const floatingPopoverRef = useRef<HTMLDivElement>(null);\n\n const treeId = safeUseId();\n\n // Логика работы при клике за пределами выпадающего списка\n const targetRef = useOutsideClick<HTMLUListElement>((event) => {\n if (!isCurrentListOpen || !closeOnOverlayClick) {\n return;\n }\n\n dispatchPath({ type: 'reset' });\n dispatchFocusedPath({ type: 'reset' });\n\n if (onToggle) {\n onToggle(false, event);\n }\n }, floatingPopoverRef);\n\n const handleGlobalToggle: HandleGlobalToggleType = (opened, event) => {\n if (opened) {\n dispatchPath({ type: 'opened_first_level' });\n } else {\n dispatchFocusedPath({ type: 'reset' });\n dispatchPath({ type: 'reset' });\n }\n\n if (onToggle) {\n onToggle(opened, event);\n }\n };\n\n const { onKeyDown } = useKeyNavigation({\n focusedPath,\n dispatchFocusedPath,\n path,\n dispatchPath,\n pathMap,\n focusedToValueMap,\n handleGlobalToggle,\n closeOnSelect,\n onItemSelect,\n onItemClick,\n });\n\n const isCurrentListOpen = Boolean(path[0]);\n\n return (\n <Context.Provider\n value={{\n focusedPath,\n size,\n variant,\n itemRole,\n handleGlobalToggle,\n closeOnSelect,\n onHover,\n onItemClick,\n onItemSelect,\n hasArrow,\n treeId,\n }}\n >\n <FloatingPopover\n ref={floatingPopoverRef}\n opened={isCurrentListOpen}\n onToggle={handleGlobalToggle}\n placement={getPlacement(placement)}\n offset={offset}\n portal={portal}\n trigger={trigger}\n target={childrenWithProps(children, {\n role: 'combobox',\n 'aria-controls': `${treeId}_tree_level_1`,\n 'aria-expanded': isCurrentListOpen,\n 'aria-activedescendant': activeDescendantItemValue\n ? getItemId(treeId, activeDescendantItemValue.toString())\n : '',\n onKeyDown,\n })}\n >\n <Root\n className={cx(className, classes.dropdownRoot)}\n ref={ref}\n view={view}\n size={size}\n style={{ display: 'inline-block' }}\n {...rest}\n >\n <Ul\n ref={targetRef}\n id={`${treeId}_tree_level_1`}\n role=\"tree\"\n listHeight={listHeight}\n listOverflow={listOverflow}\n listWidth={listWidth}\n >\n {items.map((item, index) => (\n <DropdownInner\n key={`${index}/0`}\n item={item}\n currentLevel={0}\n trigger={trigger}\n path={path}\n dispatchPath={dispatchPath}\n index={index}\n listHeight={listHeight}\n listOverflow={listOverflow}\n listWidth={listWidth}\n />\n ))}\n </Ul>\n </Root>\n </FloatingPopover>\n </Context.Provider>\n );\n },\n );\n\nexport const dropdownConfig = {\n name: 'Dropdown',\n tag: 'div',\n layout: dropdownRoot,\n base,\n variations: {\n view: {\n css: viewCSS,\n },\n size: {\n css: sizeCSS,\n },\n },\n defaults: {\n view: 'default',\n size: 'm',\n },\n};\n"],"names":["Context","createContext","dropdownRoot","Root","forwardRef","_ref","ref","_getItemByFocused","items","children","placement","offset","_ref$closeOnOverlayCl","closeOnOverlayClick","onToggle","size","view","_ref$itemRole","itemRole","className","listWidth","listHeight","listOverflow","_ref$closeOnSelect","closeOnSelect","onHover","onItemSelect","onItemClick","_ref$trigger","trigger","_ref$variant","variant","_ref$hasArrow","hasArrow","portal","rest","_objectWithoutProperties","_excluded","_useReducer","useReducer","pathReducer","_useReducer2","_slicedToArray","path","dispatchPath","_useReducer3","focusedPathReducer","_useReducer4","focusedPath","dispatchFocusedPath","_useHashMaps","useHashMaps","_useHashMaps2","pathMap","focusedToValueMap","activeDescendantItemValue","getItemByFocused","value","floatingPopoverRef","useRef","treeId","safeUseId","targetRef","useOutsideClick","event","isCurrentListOpen","type","handleGlobalToggle","opened","_useKeyNavigation","useKeyNavigation","onKeyDown","Boolean","React","createElement","Provider","FloatingPopover","getPlacement","target","childrenWithProps","role","concat","getItemId","toString","_extends","cx","classes","style","display","Ul","id","map","item","index","DropdownInner","key","currentLevel","dropdownConfig","name","tag","layout","base","variations","css","viewCSS","sizeCSS","defaults"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;IAoBaA,OAAO,gBAAGC,mBAAa,CAAc,EAAiB,EAAC;;AAEpE;AACA;AACA;IACaC,YAAY,GAAG,SAAfA,YAAYA,CAAIC,IAA6D,EAAA;AAAA,EAAA,oBACtFC,gBAAU,CACN,UAAAC,IAAA,EAyBIC,GAAG,EACF;AAAA,IAAA,IAAAC,iBAAA,CAAA;AAAA,IAAA,IAxBGC,KAAK,GAAAH,IAAA,CAALG,KAAK;MACLC,QAAQ,GAAAJ,IAAA,CAARI,QAAQ;MACRC,SAAS,GAAAL,IAAA,CAATK,SAAS;MACTC,MAAM,GAAAN,IAAA,CAANM,MAAM;MAAAC,qBAAA,GAAAP,IAAA,CACNQ,mBAAmB;AAAnBA,MAAAA,mBAAmB,GAAAD,qBAAA,KAAG,KAAA,CAAA,GAAA,IAAI,GAAAA,qBAAA;MAC1BE,QAAQ,GAAAT,IAAA,CAARS,QAAQ;MACRC,IAAI,GAAAV,IAAA,CAAJU,IAAI;MACJC,IAAI,GAAAX,IAAA,CAAJW,IAAI;MAAAC,aAAA,GAAAZ,IAAA,CACJa,QAAQ;AAARA,MAAAA,QAAQ,GAAAD,aAAA,KAAG,KAAA,CAAA,GAAA,UAAU,GAAAA,aAAA;MACrBE,SAAS,GAAAd,IAAA,CAATc,SAAS;MACTC,SAAS,GAAAf,IAAA,CAATe,SAAS;MACTC,UAAU,GAAAhB,IAAA,CAAVgB,UAAU;MACVC,YAAY,GAAAjB,IAAA,CAAZiB,YAAY;MAAAC,kBAAA,GAAAlB,IAAA,CACZmB,aAAa;AAAbA,MAAAA,aAAa,GAAAD,kBAAA,KAAG,KAAA,CAAA,GAAA,IAAI,GAAAA,kBAAA;MACpBE,OAAO,GAAApB,IAAA,CAAPoB,OAAO;MACPC,YAAY,GAAArB,IAAA,CAAZqB,YAAY;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A,SAAS,EAAEA,SAAAA;AAAU,KAAA,EAEpBZ,KAAK,CAACmF,GAAG,CAAC,UAACC,IAAI,EAAEC,KAAK,EAAA;AAAA,MAAA,oBACnBpB,KAAA,CAAAC,aAAA,CAACoB,2BAAa,EAAA;AACVC,QAAAA,GAAG,EAAAd,EAAAA,CAAAA,MAAA,CAAKY,KAAK,EAAK,IAAA,CAAA;AAClBD,QAAAA,IAAI,EAAEA,IAAK;AACXI,QAAAA,YAAY,EAAE,CAAE;AAChBnE,QAAAA,OAAO,EAAEA,OAAQ;AACjBc,QAAAA,IAAI,EAAEA,IAAK;AACXC,QAAAA,YAAY,EAAEA,YAAa;AAC3BiD,QAAAA,KAAK,EAAEA,KAAM;AACbxE,QAAAA,UAAU,EAAEA,UAAW;AACvBC,QAAAA,YAAY,EAAEA,YAAa;AAC3BF,QAAAA,SAAS,EAAEA,SAAAA;AAAU,OACxB,CAAC,CAAA;AAAA,KACL,CACD,CACF,CACO,CACH,CAAC,CAAA;AAE3B,GACJ,CAAC,CAAA;AAAA,EAAA;AAEE,IAAM6E,cAAc,GAAG;AAC1BC,EAAAA,IAAI,EAAE,UAAU;AAChBC,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,MAAM,EAAElG,YAAY;AACpBmG,EAAAA,IAAI,EAAJA,oBAAI;AACJC,EAAAA,UAAU,EAAE;AACRtF,IAAAA,IAAI,EAAE;AACFuF,MAAAA,GAAG,EAAEC,SAAAA;KACR;AACDzF,IAAAA,IAAI,EAAE;AACFwF,MAAAA,GAAG,EAAEE,WAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACN1F,IAAAA,IAAI,EAAE,SAAS;AACfD,IAAAA,IAAI,EAAE,GAAA;AACV,GAAA;AACJ;;;;;;"}
@@ -1,4 +1,4 @@
1
- import './Dropdown.styles_1tihqkp.css';
1
+ import './Dropdown.styles_1ix6io8.css';
2
2
  'use strict';
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -6,56 +6,44 @@ Object.defineProperty(exports, '__esModule', { value: true });
6
6
  var react = require('@linaria/react');
7
7
  var index = require('./utils/index.js');
8
8
  var Dropdown_tokens = require('./Dropdown.tokens.js');
9
- var common = require('../../engines/common.js');
10
- var Popover$1 = require('../Popover/Popover.js');
11
9
 
12
- var Popover = /*#__PURE__*/common.component(Popover$1.popoverConfig);
13
10
  var _exp = function _exp() {
14
- return Popover;
15
- };
16
- var StyledPopover = /*#__PURE__*/react.styled(_exp())({
17
- name: "StyledPopover",
18
- "class": "sn7uamp",
19
- propsAsIs: true
20
- });
21
- var _exp7 = function _exp7() {
22
11
  return function (_ref) {
23
12
  var listWidth = _ref.listWidth;
24
13
  return listWidth || "var(".concat(Dropdown_tokens.tokens.width, ")");
25
14
  };
26
15
  };
27
- var _exp8 = function _exp8() {
16
+ var _exp2 = function _exp2() {
28
17
  return function (_ref2) {
29
18
  var listHeight = _ref2.listHeight;
30
19
  return listHeight ? index.getCorrectHeight(listHeight) : 'auto';
31
20
  };
32
21
  };
33
- var _exp9 = function _exp9() {
22
+ var _exp3 = function _exp3() {
34
23
  return function (_ref3) {
35
- var listOverflow = _ref3.listOverflow;
36
- return listOverflow || 'initial';
24
+ var isInnerUl = _ref3.isInnerUl;
25
+ return isInnerUl ? "calc(var(".concat(Dropdown_tokens.tokens.padding, ") * -1) 0.125rem 0") : 0;
37
26
  };
38
27
  };
39
- var _exp10 = function _exp10() {
28
+ var _exp5 = function _exp5() {
40
29
  return function (_ref4) {
41
- var isInnerUl = _ref4.isInnerUl;
42
- return isInnerUl ? "calc(var(".concat(Dropdown_tokens.tokens.padding, ") * -1) 0 0 var(").concat(Dropdown_tokens.tokens.padding, ")") : 0;
30
+ var listOverflow = _ref4.listOverflow;
31
+ return listOverflow || 'initial';
43
32
  };
44
33
  };
45
34
  var Ul = /*#__PURE__*/react.styled('ul')({
46
35
  name: "Ul",
47
- "class": "ujr7fmv",
36
+ "class": "un7uamp",
48
37
  propsAsIs: false,
49
38
  vars: {
50
- "ujr7fmv-0": [/*#__PURE__*/_exp7()],
51
- "ujr7fmv-1": [/*#__PURE__*/_exp8()],
52
- "ujr7fmv-2": [/*#__PURE__*/_exp9()],
53
- "ujr7fmv-3": [/*#__PURE__*/_exp10()]
39
+ "un7uamp-0": [/*#__PURE__*/_exp()],
40
+ "un7uamp-1": [/*#__PURE__*/_exp2()],
41
+ "un7uamp-2": [/*#__PURE__*/_exp3()],
42
+ "un7uamp-3": [/*#__PURE__*/_exp5()]
54
43
  }
55
44
  });
56
- var base = "byfocd2";
45
+ var base = "bjr7fmv";
57
46
 
58
- exports.StyledPopover = StyledPopover;
59
47
  exports.Ul = Ul;
60
48
  exports.base = base;
61
49
  //# sourceMappingURL=Dropdown.styles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Dropdown.styles.js","sources":["../../../src/components/Dropdown/Dropdown.styles.ts"],"sourcesContent":["import { styled } from '@linaria/react';\nimport { css } from '@linaria/core';\n\nimport { component } from '../../engines';\nimport { popoverConfig, popoverClasses } from '../Popover';\n\nimport { getCorrectHeight } from './utils';\nimport { DropdownProps } from './Dropdown.types';\nimport { tokens } from './Dropdown.tokens';\n\nconst Popover = component(popoverConfig);\n\nexport const StyledPopover = styled(Popover)`\n .${String(popoverClasses.wrapper)}, .${String(popoverClasses.target)} {\n display: block;\n }\n`;\n\nexport const Ul = styled.ul<{\n listHeight: DropdownProps['listHeight'];\n listOverflow: DropdownProps['listOverflow'];\n isInnerUl?: boolean;\n listWidth?: DropdownProps['listWidth'];\n}>`\n box-sizing: border-box;\n\n background: var(${tokens.background});\n box-shadow: var(${tokens.boxShadow});\n\n border-radius: var(${tokens.borderRadius});\n width: ${({ listWidth }) => listWidth || `var(${tokens.width})`};\n height: ${({ listHeight }) => (listHeight ? getCorrectHeight(listHeight) : 'auto')};\n overflow: ${({ listOverflow }) => listOverflow || 'initial'};\n\n margin: ${({ isInnerUl }) => (isInnerUl ? `calc(var(${tokens.padding}) * -1) 0 0 var(${tokens.padding})` : 0)};\n padding: var(${tokens.padding});\n`;\n\nexport const base = css`\n display: inline-block;\n`;\n"],"names":["Popover","component","popoverConfig","_exp","StyledPopover","styled","name","class","propsAsIs","_exp7","_ref","listWidth","concat","tokens","width","_exp8","_ref2","listHeight","getCorrectHeight","_exp9","_ref3","listOverflow","_exp10","_ref4","isInnerUl","padding","Ul","vars","base"],"mappings":";;;;;;;;;;AAUA,IAAMA,OAAO,gBAAGC,gBAAS,CAACC,uBAAa,CAAC,CAAA;AAAC,IAAAC,IAAA,GATvBA,SASuBA,IAAAA,GAAA;AAAA,EAAA,OAELH,OAAO,CAAA;AAAA,CAAA,CAAA;AAApC,IAAMI,aAAa,gBAAGC,YAAM,CAAAF,IAAA,EAAA,CAAA,CAAA;AAAAG,EAAAA,IAAA,EAAA,eAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,IAAA;AAAA,CAIlC,EAAA;AAAC,IAAAC,KAAA,GAfgBA,SAehBA,KAAAA,GAAA;AAAA,EAAA,OAcW,UAAAC,IAAA,EAAA;AAAA,IAAA,IAAGC,SAAAA,GAAAA,IAAAA,CAAAA,SAAAA,CAAAA;AAAAA,IAAAA,OAAgBA,SAAS,IAAAC,MAAAA,CAAAA,MAAA,CAAWC,sBAAM,CAACC,KAAM,EAAE,GAAA,CAAA,CAAA;AAAA,GAAA,CAAA;AAAA,CAAA,CAAA;AAAA,IAAAC,KAAA,GA7BjDA,SA6BiDA,KAAAA,GAAA;AAAA,EAAA,OACrD,UAAAC,KAAA,EAAA;AAAA,IAAA,IAAGC,UAAAA,GAAAA,KAAAA,CAAAA,UAAAA,CAAAA;AAAAA,IAAAA,OAAkBA,UAAU,GAAGC,sBAAgB,CAACD,UAAU,CAAC,GAAG,MAAO,CAAA;AAAA,GAAA,CAAA;AAAA,CAAA,CAAA;AAAA,IAAAE,KAAA,GA9BpEA,SA8BoEA,KAAAA,GAAA;AAAA,EAAA,OACtE,UAAAC,KAAA,EAAA;AAAA,IAAA,IAAGC,YAAAA,GAAAA,KAAAA,CAAAA,YAAAA,CAAAA;IAAAA,OAAmBA,YAAY,IAAI,SAAS,CAAA;AAAA,GAAA,CAAA;AAAA,CAAA,CAAA;AAAA,IAAAC,MAAA,GA/B7CA,SA+B6CA,MAAAA,GAAA;AAAA,EAAA,OAEjD,UAAAC,KAAA,EAAA;AAAA,IAAA,IAAGC,SAAAA,GAAAA,KAAAA,CAAAA,SAAAA,CAAAA;AAAAA,IAAAA,OAAiBA,SAAS,GAAA,WAAA,CAAAZ,MAAA,CAAeC,sBAAM,CAACY,OAAQ,EAAAb,kBAAAA,CAAAA,CAAAA,MAAA,CAAkBC,sBAAM,CAACY,OAAQ,SAAK,CAAE,CAAA;AAAA,GAAA,CAAA;AAAA,CAAA,CAAA;AAhB1G,IAAMC,EAAE,gBAAGrB,YAAM,CAAA,IAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,IAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAAmB,EAAAA,IAAA,EAAA;AAAA,IAAA,WAAA,EAAA,cAYXlB,KAAsD,EAAA,CAAA;AAAA,IAAA,WAAA,EAAA,cACrDM,KAAwE,EAAA,CAAA;AAAA,IAAA,WAAA,EAAA,cACtEI,KAA+C,EAAA,CAAA;AAAA,IAAA,WAAA,EAAA,cAEjDG,MAAmG,EAAA,CAAA;AAAA,GAAA;AAAA,CAEhH,EAAA;AAEM,IAAMM,IAAI,GAEhB;;;;;;"}
1
+ {"version":3,"file":"Dropdown.styles.js","sources":["../../../src/components/Dropdown/Dropdown.styles.ts"],"sourcesContent":["import { styled } from '@linaria/react';\nimport { css } from '@linaria/core';\n\nimport { getCorrectHeight } from './utils';\nimport { DropdownProps } from './Dropdown.types';\nimport { tokens, constants } from './Dropdown.tokens';\n\nexport const Ul = styled.ul<{\n listHeight: DropdownProps['listHeight'];\n listOverflow: DropdownProps['listOverflow'];\n listWidth?: DropdownProps['listWidth'];\n isInnerUl?: boolean;\n}>`\n box-sizing: border-box;\n width: ${({ listWidth }) => listWidth || `var(${tokens.width})`};\n height: ${({ listHeight }) => (listHeight ? getCorrectHeight(listHeight) : 'auto')};\n margin: ${({ isInnerUl }) => (isInnerUl ? `calc(var(${tokens.padding}) * -1) 0.125rem 0` : 0)};\n padding: var(${tokens.padding}) 0;\n overflow: ${({ listOverflow }) => listOverflow || 'initial'};\n background: var(${constants.background});\n box-shadow: ${constants.boxShadow};\n border-radius: var(${tokens.borderRadius});\n`;\n\nexport const base = css``;\n"],"names":["_exp","_ref","listWidth","concat","tokens","width","_exp2","_ref2","listHeight","getCorrectHeight","_exp3","_ref3","isInnerUl","padding","_exp5","_ref4","listOverflow","Ul","styled","name","class","propsAsIs","vars","base"],"mappings":";;;;;;;;AAKsD,IAAAA,IAAA,GAJpCA,SAIoCA,IAAAA,GAAA;AAAA,EAAA,OASzC,UAAAC,IAAA,EAAA;AAAA,IAAA,IAAGC,SAAAA,GAAAA,IAAAA,CAAAA,SAAAA,CAAAA;AAAAA,IAAAA,OAAgBA,SAAS,IAAAC,MAAAA,CAAAA,MAAA,CAAWC,sBAAM,CAACC,KAAM,EAAE,GAAA,CAAA,CAAA;AAAA,GAAA,CAAA;AAAA,CAAA,CAAA;AAAA,IAAAC,KAAA,GAbjDA,SAaiDA,KAAAA,GAAA;AAAA,EAAA,OACrD,UAAAC,KAAA,EAAA;AAAA,IAAA,IAAGC,UAAAA,GAAAA,KAAAA,CAAAA,UAAAA,CAAAA;AAAAA,IAAAA,OAAkBA,UAAU,GAAGC,sBAAgB,CAACD,UAAU,CAAC,GAAG,MAAO,CAAA;AAAA,GAAA,CAAA;AAAA,CAAA,CAAA;AAAA,IAAAE,KAAA,GAdpEA,SAcoEA,KAAAA,GAAA;AAAA,EAAA,OACxE,UAAAC,KAAA,EAAA;AAAA,IAAA,IAAGC,SAAAA,GAAAA,KAAAA,CAAAA,SAAAA,CAAAA;IAAAA,OAAiBA,SAAS,eAAAT,MAAA,CAAeC,sBAAM,CAACS,OAAQ,0BAAsB,CAAE,CAAA;AAAA,GAAA,CAAA;AAAA,CAAA,CAAA;AAAA,IAAAC,KAAA,GAf/EA,SAe+EA,KAAAA,GAAA;AAAA,EAAA,OAEjF,UAAAC,KAAA,EAAA;AAAA,IAAA,IAAGC,YAAAA,GAAAA,KAAAA,CAAAA,YAAAA,CAAAA;IAAAA,OAAmBA,YAAY,IAAI,SAAS,CAAA;AAAA,GAAA,CAAA;AAAA,CAAA,CAAA;AAXxD,IAAMC,EAAE,gBAAGC,YAAM,CAAA,IAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,IAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAAC,EAAAA,IAAA,EAAA;AAAA,IAAA,WAAA,EAAA,cAOXtB,IAAsD,EAAA,CAAA;AAAA,IAAA,WAAA,EAAA,cACrDM,KAAwE,EAAA,CAAA;AAAA,IAAA,WAAA,EAAA,cACxEI,KAAmF,EAAA,CAAA;AAAA,IAAA,WAAA,EAAA,cAEjFI,KAA+C,EAAA,CAAA;AAAA,GAAA;AAAA,CAI9D,EAAA;AAEM,IAAMS,IAAI,GAAQ;;;;;"}
@@ -0,0 +1,2 @@
1
+ .un7uamp{box-sizing:border-box;width:var(--un7uamp-0);height:var(--un7uamp-1);margin:var(--un7uamp-2);padding:var(--plasma-dropdown-padding) 0;overflow:var(--un7uamp-3);background:var(--surface-solid-card-brightness);box-shadow:0px 4px 14px -4px rgba(8,8,8,0.08),0px 1px 4px -1px rgba(0,0,0,0.04);border-radius:var(--plasma-dropdown-border-radius);}
2
+
@@ -7,7 +7,7 @@ var classes = {
7
7
  dropdownItemIsFocused: 'dropdown-item-is-focused',
8
8
  dropdownItemIsDisabled: 'dropdown-item-is-disabled',
9
9
  dropdownItemIsActive: 'dropdown-item-is-active',
10
- dropdownItemIsSelected: 'dropdownItemIsSelected'
10
+ dropdownItemIsSelected: 'dropdown-item-is-selected'
11
11
  };
12
12
  var tokens = {
13
13
  background: '--plasma-dropdown-background',
@@ -18,6 +18,8 @@ var tokens = {
18
18
  disclosureIconColor: '--plasma-dropdown-disclosure-icon-color',
19
19
  disabledOpacity: '--plasma-dropdown-disabled-opacity',
20
20
  focusColor: '--plasma-dropdown-focus-color',
21
+ // Old
22
+
21
23
  dividerColor: '--plasma-dropdown-divider-color',
22
24
  dividerMarginTop: '--plasma-dropdown-divider-margin-top',
23
25
  dividerMarginTopTight: '--plasma-dropdown-divider-margin-top-tight',
@@ -32,6 +34,7 @@ var tokens = {
32
34
  itemBackgroundSelectedHover: '--plasma-dropdown-item-background-selected-hover',
33
35
  // Old
34
36
  itemColor: '--plasma-dropdown-item-color',
37
+ // Old
35
38
  itemColorSelected: '--plasma-dropdown-item-color-selected',
36
39
  // Old
37
40
  itemColorSelectedHover: '--plasma-dropdown-item-color-selected-hover',
@@ -50,11 +53,17 @@ var tokens = {
50
53
  itemMarginLeft: '--plasma-dropdown-item-margin-left',
51
54
  // Old
52
55
  itemPaddingTop: '--plasma-dropdown-item-padding-top',
56
+ // Old
53
57
  itemPaddingTopTight: '--plasma-dropdown-item-padding-top-tight',
58
+ // Old
54
59
  itemPaddingRight: '--plasma-dropdown-item-padding-right',
60
+ // Old
55
61
  itemPaddingBottom: '--plasma-dropdown-item-padding-bottom',
62
+ // Old
56
63
  itemPaddingBottomTight: '--plasma-dropdown-item-padding-bottom-tight',
64
+ // Old
57
65
  itemPaddingLeft: '--plasma-dropdown-item-padding-left',
66
+ // Old
58
67
  itemContentLeftWidth: '--plasma-dropdown-item-content-left-width',
59
68
  // Old
60
69
  itemContentLeftColor: '--plasma-dropdown-item-content-left-color',
@@ -69,6 +78,20 @@ var tokens = {
69
78
  itemFontWeightBold: '--plasma-dropdown-item-letter-spacing',
70
79
  itemFontLetterSpacing: '--plasma-dropdown-item-line-height',
71
80
  itemFontLineHeight: '--plasma-dropdown-item-font-weight',
81
+ itemPadding: '--plasma-dropdown-item-padding',
82
+ itemPaddingTight: '--plasma-dropdown-item-padding-tight',
83
+ cellPadding: '--plasma-dropdown-cell-padding',
84
+ cellPaddingLeftContent: '--plasma-dropdown-cell-padding-left-content',
85
+ cellPaddingContent: '--plasma-dropdown-cell-padding-content',
86
+ cellPaddingRightContent: '--plasma-dropdown-cell-padding-right-content',
87
+ cellTextboxGap: '--plasma-dropdown-cell-textbox-gap',
88
+ cellGap: '--plasma-dropdown-cell-gap',
89
+ cellTitleFontFamily: '--plasma-dropdown-cell-title-font-family',
90
+ cellTitleFontSize: '--plasma-dropdown-cell-title-font-size',
91
+ cellTitleFontStyle: '--plasma-dropdown-cell-title-font-style',
92
+ cellTitleFontWeight: '--plasma-dropdown-cell-title-font-weight',
93
+ cellTitleLetterSpacing: '--plasma-dropdown-cell-title-letter-spacing',
94
+ cellTitleLineHeight: '--plasma-dropdown-cell-title-line-height',
72
95
  // TODO: Remove below tokens as soon as they are no longer needed
73
96
  footerBackground: '--plasma-dropdown-footer-background',
74
97
  footerWidth: '--plasma-dropdown-footer-width',
@@ -1 +1 @@
1
- {"version":3,"file":"Dropdown.tokens.js","sources":["../../../src/components/Dropdown/Dropdown.tokens.ts"],"sourcesContent":["export const classes = {\n dropdownRoot: 'dropdown-root',\n dropdownItemIsFocused: 'dropdown-item-is-focused',\n dropdownItemIsDisabled: 'dropdown-item-is-disabled',\n dropdownItemIsActive: 'dropdown-item-is-active',\n dropdownItemIsSelected: 'dropdownItemIsSelected',\n};\n\nexport const tokens = {\n background: '--plasma-dropdown-background',\n boxShadow: '--plasma-dropdown-box-shadow',\n width: '--plasma-dropdown-width',\n borderRadius: '--plasma-dropdown-border-radius',\n padding: '--plasma-dropdown-padding',\n disclosureIconColor: '--plasma-dropdown-disclosure-icon-color',\n disabledOpacity: '--plasma-dropdown-disabled-opacity',\n focusColor: '--plasma-dropdown-focus-color',\n\n dividerColor: '--plasma-dropdown-divider-color',\n dividerMarginTop: '--plasma-dropdown-divider-margin-top',\n dividerMarginTopTight: '--plasma-dropdown-divider-margin-top-tight',\n dividerMarginRight: '--plasma-dropdown-divider-margin-right',\n dividerMarginBottom: '--plasma-dropdown-divider-margin-bottom',\n dividerMarginBottomTight: '--plasma-dropdown-divider-margin-bottom-tight',\n dividerMarginLeft: '--plasma-dropdown-divider-margin-left',\n\n itemBackground: '--plasma-dropdown-item-background',\n itemBackgroundHover: '--plasma-dropdown-item-background-hover',\n itemBackgroundSelected: '--plasma-dropdown-item-background-selected', // Old\n itemBackgroundSelectedHover: '--plasma-dropdown-item-background-selected-hover', // Old\n itemColor: '--plasma-dropdown-item-color',\n itemColorSelected: '--plasma-dropdown-item-color-selected', // Old\n itemColorSelectedHover: '--plasma-dropdown-item-color-selected-hover', // Old\n itemBorderRadius: '--plasma-dropdown-item-border-radius',\n itemWidth: '--plasma-dropdown-item-width', // Old\n itemHeight: '--plasma-dropdown-item-height', // Old\n itemMarginTop: '--plasma-dropdown-item-margin-top', // Old\n itemMarginRight: '--plasma-dropdown-item-margin-right', // Old\n itemMarginBottom: '--plasma-dropdown-item-margin-bottom', // Old\n itemMarginLeft: '--plasma-dropdown-item-margin-left', // Old\n itemPaddingTop: '--plasma-dropdown-item-padding-top',\n itemPaddingTopTight: '--plasma-dropdown-item-padding-top-tight',\n itemPaddingRight: '--plasma-dropdown-item-padding-right',\n itemPaddingBottom: '--plasma-dropdown-item-padding-bottom',\n itemPaddingBottomTight: '--plasma-dropdown-item-padding-bottom-tight',\n itemPaddingLeft: '--plasma-dropdown-item-padding-left',\n itemContentLeftWidth: '--plasma-dropdown-item-content-left-width', // Old\n itemContentLeftColor: '--plasma-dropdown-item-content-left-color', // Old\n itemContentRightWidth: '--plasma-dropdown-item-content-right-width', // Old\n itemContentRightColor: '--plasma-dropdown-item-content-right-color', // Old\n itemFontFamily: '--plasma-dropdown-item-font-family',\n itemFontSize: '--plasma-dropdown-item-font-size',\n itemFontStyle: '--plasma-dropdown-item-font-style',\n itemFontWeightBold: '--plasma-dropdown-item-letter-spacing',\n itemFontLetterSpacing: '--plasma-dropdown-item-line-height',\n itemFontLineHeight: '--plasma-dropdown-item-font-weight',\n\n // TODO: Remove below tokens as soon as they are no longer needed\n footerBackground: '--plasma-dropdown-footer-background',\n footerWidth: '--plasma-dropdown-footer-width',\n footerHeight: '--plasma-dropdown-footer-height',\n footerPaddingTop: '--plasma-dropdown-footer-padding-top',\n footerPaddingRight: '--plasma-dropdown-footer-padding-right',\n footerPaddingBottom: '--plasma-dropdown-footer-padding-bottom',\n footerPaddingLeft: '--plasma-dropdown-footer-padding-left',\n footerMarginTop: '--plasma-dropdown-footer-margin-top',\n footerMarginRight: '--plasma-dropdown-footer-margin-right',\n footerMarginBottom: '--plasma-dropdown-footer-margin-bottom',\n footerMarginLeft: '--plasma-dropdown-footer-margin-left',\n footerFontFamily: '--plasma-dropdown-footer-font-family',\n footerFontSize: '--plasma-dropdown-footer-font-size',\n footerFontStyle: '--plasma-dropdown-footer-font-style',\n footerFontWeightBold: '--plasma-dropdown-footer-letter-spacing',\n footerFontLetterSpacing: '--plasma-dropdown-footer-line-height',\n footerFontLineHeight: '--plasma-dropdown-footer-font-weight',\n\n headerBackground: '--plasma-dropdown-header-background',\n headerWidth: '--plasma-dropdown-header-width',\n headerHeight: '--plasma-dropdown-header-height',\n headerPaddingTop: '--plasma-dropdown-header-padding-top',\n headerPaddingRight: '--plasma-dropdown-header-padding-right',\n headerPaddingBottom: '--plasma-dropdown-header-padding-bottom',\n headerPaddingLeft: '--plasma-dropdown-header-padding-left',\n headerMarginTop: '--plasma-dropdown-header-margin-top',\n headerMarginRight: '--plasma-dropdown-header-margin-right',\n headerMarginBottom: '--plasma-dropdown-header-margin-bottom',\n headerMarginLeft: '--plasma-dropdown-header-margin-left',\n headerFontFamily: '--plasma-dropdown-header-font-family',\n headerFontSize: '--plasma-dropdown-header-font-size',\n headerFontStyle: '--plasma-dropdown-header-font-style',\n headerFontWeightBold: '--plasma-dropdown-header-letter-spacing',\n headerFontLetterSpacing: '--plasma-dropdown-header-line-height',\n headerFontLineHeight: '--plasma-dropdown-header-font-weight',\n\n dividerWidth: '--plasma-dropdown-divider-width',\n dividerHeight: '--plasma-dropdown-divider-height',\n\n groupBackground: '--plasma-dropdown-group-background',\n groupWidth: '--plasma-dropdown-group-width',\n groupHeight: '--plasma-dropdown-group-height',\n groupPaddingTop: '--plasma-dropdown-group-padding-top',\n groupPaddingRight: '--plasma-dropdown-group-padding-right',\n groupPaddingBottom: '--plasma-dropdown-group-padding-bottom',\n groupPaddingLeft: '--plasma-dropdown-group-padding-left',\n groupMarginTop: '--plasma-dropdown-group-margin-top',\n groupMarginRight: '--plasma-dropdown-group-margin-right',\n groupMarginBottom: '--plasma-dropdown-group-margin-bottom',\n groupMarginLeft: '--plasma-dropdown-group-margin-left',\n groupLabelColor: '--plasma-dropdown-group-label-color',\n groupLabelFontFamily: '--plasma-dropdown-group-label-font-family',\n groupLabelFontSize: '--plasma-dropdown-group-label-font-size',\n groupLabelFontStyle: '--plasma-dropdown-group-label-font-style',\n groupLabelFontWeight: '--plasma-dropdown-group-label-font-weight',\n groupLabelLetterSpacing: '--plasma-dropdown-group-label-letter-spacing',\n groupLabelLineHeight: '--plasma-dropdown-group-label-line-height',\n groupLabelPaddingTop: '--plasma-dropdown-group-label-padding-top',\n groupLabelPaddingRight: '--plasma-dropdown-group-label-padding-right',\n groupLabelPaddingBottom: '--plasma-dropdown-group-label-padding-bottom',\n groupLabelPaddingLeft: '--plasma-dropdown-group-label-padding-left',\n groupLabelMarginTop: '--plasma-dropdown-group-label-margin-top',\n groupLabelMarginRight: '--plasma-dropdown-group-label-margin-right',\n groupLabelMarginBottom: '--plasma-dropdown-group-label-margin-bottom',\n groupLabelMarginLeft: '--plasma-dropdown-group-label-margin-left',\n};\n"],"names":["classes","dropdownRoot","dropdownItemIsFocused","dropdownItemIsDisabled","dropdownItemIsActive","dropdownItemIsSelected","tokens","background","boxShadow","width","borderRadius","padding","disclosureIconColor","disabledOpacity","focusColor","dividerColor","dividerMarginTop","dividerMarginTopTight","dividerMarginRight","dividerMarginBottom","dividerMarginBottomTight","dividerMarginLeft","itemBackground","itemBackgroundHover","itemBackgroundSelected","itemBackgroundSelectedHover","itemColor","itemColorSelected","itemColorSelectedHover","itemBorderRadius","itemWidth","itemHeight","itemMarginTop","itemMarginRight","itemMarginBottom","itemMarginLeft","itemPaddingTop","itemPaddingTopTight","itemPaddingRight","itemPaddingBottom","itemPaddingBottomTight","itemPaddingLeft","itemContentLeftWidth","itemContentLeftColor","itemContentRightWidth","itemContentRightColor","itemFontFamily","itemFontSize","itemFontStyle","itemFontWeightBold","itemFontLetterSpacing","itemFontLineHeight","footerBackground","footerWidth","footerHeight","footerPaddingTop","footerPaddingRight","footerPaddingBottom","footerPaddingLeft","footerMarginTop","footerMarginRight","footerMarginBottom","footerMarginLeft","footerFontFamily","footerFontSize","footerFontStyle","footerFontWeightBold","footerFontLetterSpacing","footerFontLineHeight","headerBackground","headerWidth","headerHeight","headerPaddingTop","headerPaddingRight","headerPaddingBottom","headerPaddingLeft","headerMarginTop","headerMarginRight","headerMarginBottom","headerMarginLeft","headerFontFamily","headerFontSize","headerFontStyle","headerFontWeightBold","headerFontLetterSpacing","headerFontLineHeight","dividerWidth","dividerHeight","groupBackground","groupWidth","groupHeight","groupPaddingTop","groupPaddingRight","groupPaddingBottom","groupPaddingLeft","groupMarginTop","groupMarginRight","groupMarginBottom","groupMarginLeft","groupLabelColor","groupLabelFontFamily","groupLabelFontSize","groupLabelFontStyle","groupLabelFontWeight","groupLabelLetterSpacing","groupLabelLineHeight","groupLabelPaddingTop","groupLabelPaddingRight","groupLabelPaddingBottom","groupLabelPaddingLeft","groupLabelMarginTop","groupLabelMarginRight","groupLabelMarginBottom","groupLabelMarginLeft"],"mappings":";;;;AAAO,IAAMA,OAAO,GAAG;AACnBC,EAAAA,YAAY,EAAE,eAAe;AAC7BC,EAAAA,qBAAqB,EAAE,0BAA0B;AACjDC,EAAAA,sBAAsB,EAAE,2BAA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AE,yCAAyC;AAC7DC,EAAAA,mBAAmB,EAAE,0CAA0C;AAC/DC,EAAAA,oBAAoB,EAAE,2CAA2C;AACjEC,EAAAA,uBAAuB,EAAE,8CAA8C;AACvEC,EAAAA,oBAAoB,EAAE,2CAA2C;AACjEC,EAAAA,oBAAoB,EAAE,2CAA2C;AACjEC,EAAAA,sBAAsB,EAAE,6CAA6C;AACrEC,EAAAA,uBAAuB,EAAE,8CAA8C;AACvEC,EAAAA,qBAAqB,EAAE,4CAA4C;AACnEC,EAAAA,mBAAmB,EAAE,0CAA0C;AAC/DC,EAAAA,qBAAqB,EAAE,4CAA4C;AACnEC,EAAAA,sBAAsB,EAAE,6CAA6C;AACrEC,EAAAA,oBAAoB,EAAE,2CAAA;AAC1B;;;;;"}
1
+ {"version":3,"file":"Dropdown.tokens.js","sources":["../../../src/components/Dropdown/Dropdown.tokens.ts"],"sourcesContent":["export const classes = {\n dropdownRoot: 'dropdown-root',\n dropdownItemIsFocused: 'dropdown-item-is-focused',\n dropdownItemIsDisabled: 'dropdown-item-is-disabled',\n dropdownItemIsActive: 'dropdown-item-is-active',\n dropdownItemIsSelected: 'dropdown-item-is-selected',\n};\n\nexport const tokens = {\n background: '--plasma-dropdown-background',\n boxShadow: '--plasma-dropdown-box-shadow',\n width: '--plasma-dropdown-width',\n borderRadius: '--plasma-dropdown-border-radius',\n padding: '--plasma-dropdown-padding',\n disclosureIconColor: '--plasma-dropdown-disclosure-icon-color',\n disabledOpacity: '--plasma-dropdown-disabled-opacity',\n focusColor: '--plasma-dropdown-focus-color', // Old\n\n dividerColor: '--plasma-dropdown-divider-color',\n dividerMarginTop: '--plasma-dropdown-divider-margin-top',\n dividerMarginTopTight: '--plasma-dropdown-divider-margin-top-tight',\n dividerMarginRight: '--plasma-dropdown-divider-margin-right',\n dividerMarginBottom: '--plasma-dropdown-divider-margin-bottom',\n dividerMarginBottomTight: '--plasma-dropdown-divider-margin-bottom-tight',\n dividerMarginLeft: '--plasma-dropdown-divider-margin-left',\n\n itemBackground: '--plasma-dropdown-item-background',\n itemBackgroundHover: '--plasma-dropdown-item-background-hover',\n itemBackgroundSelected: '--plasma-dropdown-item-background-selected', // Old\n itemBackgroundSelectedHover: '--plasma-dropdown-item-background-selected-hover', // Old\n itemColor: '--plasma-dropdown-item-color', // Old\n itemColorSelected: '--plasma-dropdown-item-color-selected', // Old\n itemColorSelectedHover: '--plasma-dropdown-item-color-selected-hover', // Old\n itemBorderRadius: '--plasma-dropdown-item-border-radius',\n itemWidth: '--plasma-dropdown-item-width', // Old\n itemHeight: '--plasma-dropdown-item-height', // Old\n itemMarginTop: '--plasma-dropdown-item-margin-top', // Old\n itemMarginRight: '--plasma-dropdown-item-margin-right', // Old\n itemMarginBottom: '--plasma-dropdown-item-margin-bottom', // Old\n itemMarginLeft: '--plasma-dropdown-item-margin-left', // Old\n itemPaddingTop: '--plasma-dropdown-item-padding-top', // Old\n itemPaddingTopTight: '--plasma-dropdown-item-padding-top-tight', // Old\n itemPaddingRight: '--plasma-dropdown-item-padding-right', // Old\n itemPaddingBottom: '--plasma-dropdown-item-padding-bottom', // Old\n itemPaddingBottomTight: '--plasma-dropdown-item-padding-bottom-tight', // Old\n itemPaddingLeft: '--plasma-dropdown-item-padding-left', // Old\n itemContentLeftWidth: '--plasma-dropdown-item-content-left-width', // Old\n itemContentLeftColor: '--plasma-dropdown-item-content-left-color', // Old\n itemContentRightWidth: '--plasma-dropdown-item-content-right-width', // Old\n itemContentRightColor: '--plasma-dropdown-item-content-right-color', // Old\n itemFontFamily: '--plasma-dropdown-item-font-family',\n itemFontSize: '--plasma-dropdown-item-font-size',\n itemFontStyle: '--plasma-dropdown-item-font-style',\n itemFontWeightBold: '--plasma-dropdown-item-letter-spacing',\n itemFontLetterSpacing: '--plasma-dropdown-item-line-height',\n itemFontLineHeight: '--plasma-dropdown-item-font-weight',\n itemPadding: '--plasma-dropdown-item-padding',\n itemPaddingTight: '--plasma-dropdown-item-padding-tight',\n\n cellPadding: '--plasma-dropdown-cell-padding',\n cellPaddingLeftContent: '--plasma-dropdown-cell-padding-left-content',\n cellPaddingContent: '--plasma-dropdown-cell-padding-content',\n cellPaddingRightContent: '--plasma-dropdown-cell-padding-right-content',\n cellTextboxGap: '--plasma-dropdown-cell-textbox-gap',\n cellGap: '--plasma-dropdown-cell-gap',\n cellTitleFontFamily: '--plasma-dropdown-cell-title-font-family',\n cellTitleFontSize: '--plasma-dropdown-cell-title-font-size',\n cellTitleFontStyle: '--plasma-dropdown-cell-title-font-style',\n cellTitleFontWeight: '--plasma-dropdown-cell-title-font-weight',\n cellTitleLetterSpacing: '--plasma-dropdown-cell-title-letter-spacing',\n cellTitleLineHeight: '--plasma-dropdown-cell-title-line-height',\n\n // TODO: Remove below tokens as soon as they are no longer needed\n footerBackground: '--plasma-dropdown-footer-background',\n footerWidth: '--plasma-dropdown-footer-width',\n footerHeight: '--plasma-dropdown-footer-height',\n footerPaddingTop: '--plasma-dropdown-footer-padding-top',\n footerPaddingRight: '--plasma-dropdown-footer-padding-right',\n footerPaddingBottom: '--plasma-dropdown-footer-padding-bottom',\n footerPaddingLeft: '--plasma-dropdown-footer-padding-left',\n footerMarginTop: '--plasma-dropdown-footer-margin-top',\n footerMarginRight: '--plasma-dropdown-footer-margin-right',\n footerMarginBottom: '--plasma-dropdown-footer-margin-bottom',\n footerMarginLeft: '--plasma-dropdown-footer-margin-left',\n footerFontFamily: '--plasma-dropdown-footer-font-family',\n footerFontSize: '--plasma-dropdown-footer-font-size',\n footerFontStyle: '--plasma-dropdown-footer-font-style',\n footerFontWeightBold: '--plasma-dropdown-footer-letter-spacing',\n footerFontLetterSpacing: '--plasma-dropdown-footer-line-height',\n footerFontLineHeight: '--plasma-dropdown-footer-font-weight',\n\n headerBackground: '--plasma-dropdown-header-background',\n headerWidth: '--plasma-dropdown-header-width',\n headerHeight: '--plasma-dropdown-header-height',\n headerPaddingTop: '--plasma-dropdown-header-padding-top',\n headerPaddingRight: '--plasma-dropdown-header-padding-right',\n headerPaddingBottom: '--plasma-dropdown-header-padding-bottom',\n headerPaddingLeft: '--plasma-dropdown-header-padding-left',\n headerMarginTop: '--plasma-dropdown-header-margin-top',\n headerMarginRight: '--plasma-dropdown-header-margin-right',\n headerMarginBottom: '--plasma-dropdown-header-margin-bottom',\n headerMarginLeft: '--plasma-dropdown-header-margin-left',\n headerFontFamily: '--plasma-dropdown-header-font-family',\n headerFontSize: '--plasma-dropdown-header-font-size',\n headerFontStyle: '--plasma-dropdown-header-font-style',\n headerFontWeightBold: '--plasma-dropdown-header-letter-spacing',\n headerFontLetterSpacing: '--plasma-dropdown-header-line-height',\n headerFontLineHeight: '--plasma-dropdown-header-font-weight',\n\n dividerWidth: '--plasma-dropdown-divider-width',\n dividerHeight: '--plasma-dropdown-divider-height',\n\n groupBackground: '--plasma-dropdown-group-background',\n groupWidth: '--plasma-dropdown-group-width',\n groupHeight: '--plasma-dropdown-group-height',\n groupPaddingTop: '--plasma-dropdown-group-padding-top',\n groupPaddingRight: '--plasma-dropdown-group-padding-right',\n groupPaddingBottom: '--plasma-dropdown-group-padding-bottom',\n groupPaddingLeft: '--plasma-dropdown-group-padding-left',\n groupMarginTop: '--plasma-dropdown-group-margin-top',\n groupMarginRight: '--plasma-dropdown-group-margin-right',\n groupMarginBottom: '--plasma-dropdown-group-margin-bottom',\n groupMarginLeft: '--plasma-dropdown-group-margin-left',\n groupLabelColor: '--plasma-dropdown-group-label-color',\n groupLabelFontFamily: '--plasma-dropdown-group-label-font-family',\n groupLabelFontSize: '--plasma-dropdown-group-label-font-size',\n groupLabelFontStyle: '--plasma-dropdown-group-label-font-style',\n groupLabelFontWeight: '--plasma-dropdown-group-label-font-weight',\n groupLabelLetterSpacing: '--plasma-dropdown-group-label-letter-spacing',\n groupLabelLineHeight: '--plasma-dropdown-group-label-line-height',\n groupLabelPaddingTop: '--plasma-dropdown-group-label-padding-top',\n groupLabelPaddingRight: '--plasma-dropdown-group-label-padding-right',\n groupLabelPaddingBottom: '--plasma-dropdown-group-label-padding-bottom',\n groupLabelPaddingLeft: '--plasma-dropdown-group-label-padding-left',\n groupLabelMarginTop: '--plasma-dropdown-group-label-margin-top',\n groupLabelMarginRight: '--plasma-dropdown-group-label-margin-right',\n groupLabelMarginBottom: '--plasma-dropdown-group-label-margin-bottom',\n groupLabelMarginLeft: '--plasma-dropdown-group-label-margin-left',\n};\n\nexport const constants = {\n focusColor: '--surface-accent',\n background: '--surface-solid-card-brightness',\n boxShadow: '0px 4px 14px -4px rgba(8, 8, 8, 0.08), 0px 1px 4px -1px rgba(0, 0, 0, 0.04)',\n disclosureIconColor: '--text-secondary',\n itemBackground: '--plasma-colors-transparent',\n itemBackgroundHover: '--surface-transparent-secondary',\n opacity: '0.4',\n cellTitleColor: '--text-primary',\n cellBackgroundColor: '--plasma-colors-transparent',\n};\n"],"names":["classes","dropdownRoot","dropdownItemIsFocused","dropdownItemIsDisabled","dropdownItemIsActive","dropdownItemIsSelected","tokens","background","boxShadow","width","borderRadius","padding","disclosureIconColor","disabledOpacity","focusColor","dividerColor","dividerMarginTop","dividerMarginTopTight","dividerMarginRight","dividerMarginBottom","dividerMarginBottomTight","dividerMarginLeft","itemBackground","itemBackgroundHover","itemBackgroundSelected","itemBackgroundSelectedHover","itemColor","itemColorSelected","itemColorSelectedHover","itemBorderRadius","itemWidth","itemHeight","itemMarginTop","itemMarginRight","itemMarginBottom","itemMarginLeft","itemPaddingTop","itemPaddingTopTight","itemPaddingRight","itemPaddingBottom","itemPaddingBottomTight","itemPaddingLeft","itemContentLeftWidth","itemContentLeftColor","itemContentRightWidth","itemContentRightColor","itemFontFamily","itemFontSize","itemFontStyle","itemFontWeightBold","itemFontLetterSpacing","itemFontLineHeight","itemPadding","itemPaddingTight","cellPadding","cellPaddingLeftContent","cellPaddingContent","cellPaddingRightContent","cellTextboxGap","cellGap","cellTitleFontFamily","cellTitleFontSize","cellTitleFontStyle","cellTitleFontWeight","cellTitleLetterSpacing","cellTitleLineHeight","footerBackground","footerWidth","footerHeight","footerPaddingTop","footerPaddingRight","footerPaddingBottom","footerPaddingLeft","footerMarginTop","footerMarginRight","footerMarginBottom","footerMarginLeft","footerFontFamily","footerFontSize","footerFontStyle","footerFontWeightBold","footerFontLetterSpacing","footerFontLineHeight","headerBackground","headerWidth","headerHeight","headerPaddingTop","headerPaddingRight","headerPaddingBottom","headerPaddingLeft","headerMarginTop","headerMarginRight","headerMarginBottom","headerMarginLeft","headerFontFamily","headerFontSize","headerFontStyle","headerFontWeightBold","headerFontLetterSpacing","headerFontLineHeight","dividerWidth","dividerHeight","groupBackground","groupWidth","groupHeight","groupPaddingTop","groupPaddingRight","groupPaddingBottom","groupPaddingLeft","groupMarginTop","groupMarginRight","groupMarginBottom","groupMarginLeft","groupLabelColor","groupLabelFontFamily","groupLabelFontSize","groupLabelFontStyle","groupLabelFontWeight","groupLabelLetterSpacing","groupLabelLineHeight","groupLabelPaddingTop","groupLabelPaddingRight","groupLabelPaddingBottom","groupLabelPaddingLeft","groupLabelMarginTop","groupLabelMarginRight","groupLabelMarginBottom","groupLabelMarginLeft"],"mappings":";;;;AAAO,IAAMA,OAAO,GAAG;AACnBC,EAAAA,YAAY,EAAE,eAAe;AAC7BC,EAAAA,qBAAqB,EAAE,0BAA0B;AACjDC,EAAAA,sBAAsB,EAAE,2BAA2B;AACnDC,EAAAA,oBAAoB,EAAE,yBAAyB;AAC/CC,EAAAA,sBAAsB,EAAE,2BAAA;AAC5B,EAAC;AAEM,IAAMC,MAAM,GAAG;AAClBC,EAAAA,UAAU,EAAE,8BAA8B;AAC1CC,EAAAA,SAAS,EAAE,8BAA8B;AACzCC,EAAAA,KAAK,EAAE,yBAAyB;AAChCC,EAAAA,YAAY,EAAE,iCAAiC;AAC/CC,EAAAA,OAAO,EAAE,2BAA2B;AACpCC,EAAAA,mBAAmB,EAAE,yCAAyC;AAC9DC,EAAAA,eAAe,EAAE,oCAAoC;AACrDC,EAAAA,UAAU,EAAE,+BAA+B;AAAE;;AAE7CC,EAAAA,YAAY,EAA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AuC;AAC1DC,EAAAA,eAAe,EAAE,qCAAqC;AACtDC,EAAAA,eAAe,EAAE,qCAAqC;AACtDC,EAAAA,oBAAoB,EAAE,2CAA2C;AACjEC,EAAAA,kBAAkB,EAAE,yCAAyC;AAC7DC,EAAAA,mBAAmB,EAAE,0CAA0C;AAC/DC,EAAAA,oBAAoB,EAAE,2CAA2C;AACjEC,EAAAA,uBAAuB,EAAE,8CAA8C;AACvEC,EAAAA,oBAAoB,EAAE,2CAA2C;AACjEC,EAAAA,oBAAoB,EAAE,2CAA2C;AACjEC,EAAAA,sBAAsB,EAAE,6CAA6C;AACrEC,EAAAA,uBAAuB,EAAE,8CAA8C;AACvEC,EAAAA,qBAAqB,EAAE,4CAA4C;AACnEC,EAAAA,mBAAmB,EAAE,0CAA0C;AAC/DC,EAAAA,qBAAqB,EAAE,4CAA4C;AACnEC,EAAAA,sBAAsB,EAAE,6CAA6C;AACrEC,EAAAA,oBAAoB,EAAE,2CAAA;AAC1B;;;;;"}
@@ -0,0 +1,104 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var _rollupPluginBabelHelpers = require('../../_virtual/_rollupPluginBabelHelpers.js');
6
+ var react = require('@floating-ui/react');
7
+ var React = require('react');
8
+ var plasmaCore = require('@salutejs/plasma-core');
9
+
10
+ var FloatingPopover = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
11
+ var target = _ref.target,
12
+ children = _ref.children,
13
+ opened = _ref.opened,
14
+ onToggle = _ref.onToggle,
15
+ placement = _ref.placement,
16
+ portal = _ref.portal,
17
+ _ref$offset = _ref.offset,
18
+ offset = _ref$offset === void 0 ? [0, 0] : _ref$offset,
19
+ isInner = _ref.isInner,
20
+ trigger = _ref.trigger;
21
+ var _useFloating = react.useFloating({
22
+ placement: placement === 'auto' ? undefined : placement,
23
+ open: opened,
24
+ middleware: [placement === 'auto' && react.autoPlacement(), react.offset({
25
+ mainAxis: offset[1],
26
+ crossAxis: offset[0]
27
+ }), react.flip({
28
+ fallbackAxisSideDirection: 'end'
29
+ }), react.shift()]
30
+ }),
31
+ refs = _useFloating.refs,
32
+ floatingStyles = _useFloating.floatingStyles;
33
+ var wrappedId = plasmaCore.safeUseId();
34
+ var handleTargetClick = function handleTargetClick(event) {
35
+ if (trigger === 'hover') {
36
+ return;
37
+ }
38
+ if (onToggle) {
39
+ onToggle(!opened, event);
40
+ }
41
+ };
42
+ var handleTargetMouseEnter = function handleTargetMouseEnter(event) {
43
+ if (trigger === 'click' || opened) {
44
+ return;
45
+ }
46
+ onToggle(true, event);
47
+ };
48
+ var handleTargetMouseLeave = function handleTargetMouseLeave(event) {
49
+ if (event.relatedTarget instanceof HTMLElement && refs.floating.current instanceof HTMLElement) {
50
+ var _refs$floating$curren;
51
+ if (trigger === 'click' || !opened || event.relatedTarget && refs.floating && (_refs$floating$curren = refs.floating.current) !== null && _refs$floating$curren !== void 0 && _refs$floating$curren.contains(event.relatedTarget)) {
52
+ return;
53
+ }
54
+ onToggle(false, event);
55
+ }
56
+ };
57
+ var handleFloatingMouseLeave = function handleFloatingMouseLeave(event) {
58
+ if (event.relatedTarget instanceof HTMLElement && refs.reference.current instanceof HTMLElement) {
59
+ var _refs$reference$curre;
60
+ if (trigger === 'click' || !opened || event.relatedTarget && refs.reference && (_refs$reference$curre = refs.reference.current) !== null && _refs$reference$curre !== void 0 && _refs$reference$curre.contains(event.relatedTarget)) {
61
+ return;
62
+ }
63
+ onToggle(false, event);
64
+ }
65
+ };
66
+ return /*#__PURE__*/React.createElement("div", {
67
+ id: wrappedId,
68
+ style: {
69
+ display: isInner ? 'block' : 'inline-block'
70
+ },
71
+ ref: ref
72
+ }, /*#__PURE__*/React.createElement("div", {
73
+ ref: refs.setReference,
74
+ onClick: handleTargetClick,
75
+ onMouseEnter: handleTargetMouseEnter,
76
+ onMouseLeave: handleTargetMouseLeave
77
+ }, target), opened && /*#__PURE__*/React.createElement(react.FloatingPortal, getFloatingPortalProps(portal, wrappedId), /*#__PURE__*/React.createElement("div", {
78
+ ref: refs.setFloating,
79
+ onMouseLeave: handleFloatingMouseLeave,
80
+ style: _rollupPluginBabelHelpers.objectSpread2(_rollupPluginBabelHelpers.objectSpread2({}, floatingStyles), {}, {
81
+ zIndex: 1
82
+ })
83
+ }, children)));
84
+ });
85
+ // root - принимает ref контейнера портала.
86
+ // id - если есть портал - не используется, если портала нет - подставляется 'wrappedId'.
87
+ var getFloatingPortalProps = function getFloatingPortalProps(portal, wrappedId) {
88
+ if (!portal) {
89
+ return {
90
+ id: wrappedId
91
+ };
92
+ }
93
+ if (typeof portal === 'string') {
94
+ return {
95
+ id: portal
96
+ };
97
+ }
98
+ return {
99
+ root: portal
100
+ };
101
+ };
102
+
103
+ exports.FloatingPopover = FloatingPopover;
104
+ //# sourceMappingURL=FloatingPopover.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FloatingPopover.js","sources":["../../../src/components/Dropdown/FloatingPopover.tsx"],"sourcesContent":["import {\n flip,\n shift,\n useFloating,\n FloatingPortal,\n offset as offsetMiddleware,\n autoPlacement,\n} from '@floating-ui/react';\nimport React, { forwardRef, MouseEvent } from 'react';\nimport { safeUseId } from '@salutejs/plasma-core';\n\nimport { FloatingPopoverProps } from './Dropdown.types';\n\nconst FloatingPopover = forwardRef<HTMLDivElement, FloatingPopoverProps>(\n ({ target, children, opened, onToggle, placement, portal, offset = [0, 0], isInner, trigger }, ref) => {\n const { refs, floatingStyles } = useFloating({\n placement: placement === 'auto' ? undefined : placement,\n open: opened,\n middleware: [\n placement === 'auto' && autoPlacement(),\n offsetMiddleware({ mainAxis: offset[1], crossAxis: offset[0] }),\n flip({ fallbackAxisSideDirection: 'end' }),\n shift(),\n ],\n });\n const wrappedId = safeUseId();\n\n const handleTargetClick = (event: MouseEvent<HTMLDivElement>) => {\n if (trigger === 'hover') {\n return;\n }\n\n if (onToggle) {\n onToggle(!opened, event);\n }\n };\n\n const handleTargetMouseEnter = (event: MouseEvent<HTMLDivElement>) => {\n if (trigger === 'click' || opened) {\n return;\n }\n\n onToggle(true, event);\n };\n\n const handleTargetMouseLeave = (event: MouseEvent<HTMLDivElement>) => {\n if (event.relatedTarget instanceof HTMLElement && refs.floating.current instanceof HTMLElement) {\n if (\n trigger === 'click' ||\n !opened ||\n (event.relatedTarget && refs.floating && refs.floating.current?.contains(event.relatedTarget))\n ) {\n return;\n }\n\n onToggle(false, event);\n }\n };\n\n const handleFloatingMouseLeave = (event: MouseEvent) => {\n if (event.relatedTarget instanceof HTMLElement && refs.reference.current instanceof HTMLElement) {\n if (\n trigger === 'click' ||\n !opened ||\n (event.relatedTarget && refs.reference && refs.reference.current?.contains(event.relatedTarget))\n ) {\n return;\n }\n\n onToggle(false, event);\n }\n };\n\n return (\n <div\n id={wrappedId}\n style={{\n display: isInner ? 'block' : 'inline-block',\n }}\n ref={ref}\n >\n <div\n ref={refs.setReference}\n onClick={handleTargetClick}\n onMouseEnter={handleTargetMouseEnter}\n onMouseLeave={handleTargetMouseLeave}\n >\n {target}\n </div>\n\n {opened && (\n <FloatingPortal {...getFloatingPortalProps(portal, wrappedId)}>\n <div\n ref={refs.setFloating}\n onMouseLeave={handleFloatingMouseLeave}\n style={{\n ...floatingStyles,\n zIndex: 1,\n }}\n >\n {children}\n </div>\n </FloatingPortal>\n )}\n </div>\n );\n },\n);\n\ntype FloatingPortalReturnedProps = {\n root?: HTMLElement | null | React.MutableRefObject<HTMLElement | null>;\n id?: string;\n};\n\n// root - принимает ref контейнера портала.\n// id - если есть портал - не используется, если портала нет - подставляется 'wrappedId'.\nconst getFloatingPortalProps = (\n portal: FloatingPopoverProps['portal'],\n wrappedId: string,\n): FloatingPortalReturnedProps => {\n if (!portal) {\n return { id: wrappedId };\n }\n\n if (typeof portal === 'string') {\n return { id: portal };\n }\n\n return { root: portal };\n};\n\nexport { FloatingPopover };\n"],"names":["FloatingPopover","forwardRef","_ref","ref","target","children","opened","onToggle","placement","portal","_ref$offset","offset","isInner","trigger","_useFloating","useFloating","undefined","open","middleware","autoPlacement","offsetMiddleware","mainAxis","crossAxis","flip","fallbackAxisSideDirection","shift","refs","floatingStyles","wrappedId","safeUseId","handleTargetClick","event","handleTargetMouseEnter","handleTargetMouseLeave","relatedTarget","HTMLElement","floating","current","_refs$floating$curren","contains","handleFloatingMouseLeave","reference","_refs$reference$curre","React","createElement","id","style","display","setReference","onClick","onMouseEnter","onMouseLeave","FloatingPortal","getFloatingPortalProps","setFloating","_objectSpread","zIndex","root"],"mappings":";;;;;;;;;AAaMA,IAAAA,eAAe,gBAAGC,gBAAU,CAC9B,UAAAC,IAAA,EAA+FC,GAAG,EAAK;AAAA,EAAA,IAApGC,MAAM,GAAAF,IAAA,CAANE,MAAM;IAAEC,QAAQ,GAAAH,IAAA,CAARG,QAAQ;IAAEC,MAAM,GAAAJ,IAAA,CAANI,MAAM;IAAEC,QAAQ,GAAAL,IAAA,CAARK,QAAQ;IAAEC,SAAS,GAAAN,IAAA,CAATM,SAAS;IAAEC,MAAM,GAAAP,IAAA,CAANO,MAAM;IAAAC,WAAA,GAAAR,IAAA,CAAES,MAAM;IAANA,MAAM,GAAAD,WAAA,KAAG,KAAA,CAAA,GAAA,CAAC,CAAC,EAAE,CAAC,CAAC,GAAAA,WAAA;IAAEE,OAAO,GAAAV,IAAA,CAAPU,OAAO;IAAEC,OAAO,GAAAX,IAAA,CAAPW,OAAO,CAAA;EACvF,IAAAC,YAAA,GAAiCC,iBAAW,CAAC;AACzCP,MAAAA,SAAS,EAAEA,SAAS,KAAK,MAAM,GAAGQ,SAAS,GAAGR,SAAS;AACvDS,MAAAA,IAAI,EAAEX,MAAM;MACZY,UAAU,EAAE,CACRV,SAAS,KAAK,MAAM,IAAIW,mBAAa,EAAE,EACvCC,YAAgB,CAAC;AAAEC,QAAAA,QAAQ,EAAEV,MAAM,CAAC,CAAC,CAAC;QAAEW,SAAS,EAAEX,MAAM,CAAC,CAAC,CAAA;OAAG,CAAC,EAC/DY,UAAI,CAAC;AAAEC,QAAAA,yBA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