@semcore/dropdown-menu 4.46.1 → 4.47.0-prerelease.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/lib/cjs/DropdownMenu.js +18 -18
- package/lib/es6/DropdownMenu.js +18 -18
- package/lib/esm/DropdownMenu.mjs +176 -176
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
CHANGELOG.md standards are inspired by [keepachangelog.com](https://keepachangelog.com/en/1.0.0/).
|
|
4
4
|
|
|
5
|
+
## [4.47.0] - 2025-03-28
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
|
|
9
|
+
- Version minor update due to children dependencies update (`@semcore/button` [5.42.1 ~> 5.43.0]).
|
|
10
|
+
|
|
5
11
|
## [4.46.1] - 2025-03-20
|
|
6
12
|
|
|
7
13
|
### Changed
|
package/lib/cjs/DropdownMenu.js
CHANGED
|
@@ -36,24 +36,24 @@ var _button = _interopRequireDefault(require("@semcore/button"));
|
|
|
36
36
|
var _typography = require("@semcore/typography");
|
|
37
37
|
var _excluded = ["className"];
|
|
38
38
|
/*__reshadow-styles__:"./style/dropdown-menu.shadow.css"*/
|
|
39
|
-
var style = ( /*__reshadow_css_start__*/_index.sstyled.insert( /*__inner_css_start__*/".
|
|
40
|
-
"__SDropdownMenuItemContainer": "
|
|
41
|
-
"_nesting-trigger": "__nesting-
|
|
42
|
-
"__SDropdownMenuNesting": "
|
|
43
|
-
"_size_l": "
|
|
44
|
-
"_size_m": "
|
|
45
|
-
"_highlighted": "
|
|
46
|
-
"__SDropdownNestingItem": "
|
|
47
|
-
"__SItemContent": "
|
|
48
|
-
"__SItemHint": "
|
|
49
|
-
"__SDropdownMenuList": "
|
|
50
|
-
"__SShadowHorizontal": "
|
|
51
|
-
"_position_median": "
|
|
52
|
-
"_position_start": "
|
|
53
|
-
"_position_end": "
|
|
54
|
-
"__SShadowVertical": "
|
|
55
|
-
"__SDropdownMenuItemAddon": "
|
|
56
|
-
"__SItemContentText": "
|
|
39
|
+
var style = ( /*__reshadow_css_start__*/_index.sstyled.insert( /*__inner_css_start__*/".___SDropdownMenuList_5h0u9_gg_{max-height:240px;padding:var(--intergalactic-spacing-1x, 4px)0;position:relative;min-height:26px;min-width:32px;box-sizing:content-box;z-index:0;color:var(--intergalactic-text-primary, #191b23)}.___SDropdownMenuList_5h0u9_gg_ .___SShadowHorizontal_5h0u9_gg_:after,.___SDropdownMenuList_5h0u9_gg_ .___SShadowHorizontal_5h0u9_gg_:before{width:16px;height:100%;border-radius:var(--intergalactic-control-rounded, 6px)}.___SDropdownMenuList_5h0u9_gg_ .___SShadowHorizontal_5h0u9_gg_._position_median_5h0u9_gg_:before{background:var(--intergalactic-scroll-area-dropdown-menu-left,\n linear-gradient(to right, rgba(255, 255, 255, 1) 34.38%, rgba(255, 255, 255, 0) 100%)\n )}.___SDropdownMenuList_5h0u9_gg_ .___SShadowHorizontal_5h0u9_gg_._position_median_5h0u9_gg_:after{background:var(--intergalactic-scroll-area-dropdown-menu-right,\n linear-gradient(to left, rgba(255, 255, 255, 1) 34.38%, rgba(255, 255, 255, 0) 100%)\n )}.___SDropdownMenuList_5h0u9_gg_ .___SShadowHorizontal_5h0u9_gg_._position_start_5h0u9_gg_:before{background:var(--intergalactic-scroll-area-dropdown-menu-left,\n linear-gradient(to right, rgba(255, 255, 255, 1) 34.38%, rgba(255, 255, 255, 0) 100%)\n )}.___SDropdownMenuList_5h0u9_gg_ .___SShadowHorizontal_5h0u9_gg_._position_end_5h0u9_gg_:after{background:var(--intergalactic-scroll-area-dropdown-menu-right,\n linear-gradient(to left, rgba(255, 255, 255, 1) 34.38%, rgba(255, 255, 255, 0) 100%)\n )}.___SDropdownMenuList_5h0u9_gg_ .___SShadowVertical_5h0u9_gg_:after,.___SDropdownMenuList_5h0u9_gg_ .___SShadowVertical_5h0u9_gg_:before{width:100%;height:16px;border-radius:var(--intergalactic-control-rounded, 6px)}.___SDropdownMenuList_5h0u9_gg_ .___SShadowVertical_5h0u9_gg_._position_median_5h0u9_gg_:before{background:var(--intergalactic-scroll-area-dropdown-menu-top,\n linear-gradient(to bottom, rgba(255, 255, 255, 1) 34.38%, rgba(255, 255, 255, 0) 100%)\n )}.___SDropdownMenuList_5h0u9_gg_ .___SShadowVertical_5h0u9_gg_._position_median_5h0u9_gg_:after{background:var(--intergalactic-scroll-area-dropdown-menu-bottom,\n linear-gradient(to top, rgba(255, 255, 255, 1) 34.38%, rgba(255, 255, 255, 0) 100%)\n )}.___SDropdownMenuList_5h0u9_gg_ .___SShadowVertical_5h0u9_gg_._position_start_5h0u9_gg_:before{background:var(--intergalactic-scroll-area-dropdown-menu-top,\n linear-gradient(to bottom, rgba(255, 255, 255, 1) 34.38%, rgba(255, 255, 255, 0) 100%)\n )}.___SDropdownMenuList_5h0u9_gg_ .___SShadowVertical_5h0u9_gg_._position_end_5h0u9_gg_:after{background:var(--intergalactic-scroll-area-dropdown-menu-bottom,\n linear-gradient(to top, rgba(255, 255, 255, 1) 34.38%, rgba(255, 255, 255, 0) 100%)\n )}.___SDropdownMenuItemContainer_5h0u9_gg_.__nesting-trigger_5h0u9_gg_{justify-content:space-between}.___SDropdownMenuItemAddon_5h0u9_gg_,.___SItemContentText_5h0u9_gg_{display:inline-flex;margin-left:var(--intergalactic-spacing-1x, 4px);margin-right:var(--intergalactic-spacing-1x, 4px)}.___SDropdownMenuItemAddon_5h0u9_gg_:first-child,.___SItemContentText_5h0u9_gg_:first-child{margin-left:0}.___SDropdownMenuItemAddon_5h0u9_gg_:last-child,.___SItemContentText_5h0u9_gg_:last-child{margin-right:0}.___SDropdownMenuNesting_5h0u9_gg_,.___SDropdownMenuNesting_5h0u9_gg_._size_l_5h0u9_gg_,.___SDropdownMenuNesting_5h0u9_gg_._size_m_5h0u9_gg_{padding:0}.___SDropdownMenuNesting_5h0u9_gg_.__highlighted_5h0u9_gg_{z-index:1;box-shadow:var(--intergalactic-keyboard-focus, 0px 0px 0px 3px rgba(0, 143, 248, 0.5)) inset}.___SDropdownNestingItem_5h0u9_gg_._size_l_5h0u9_gg_,.___SDropdownNestingItem_5h0u9_gg_._size_m_5h0u9_gg_{padding-right:0}.___SDropdownNestingItem_5h0u9_gg_ .___SDropdownMenuItemContainer_5h0u9_gg_{width:auto;padding-top:0;padding-bottom:0;padding-left:0;min-height:auto}.___SItemContent_5h0u9_gg_:focus{outline:0}.___SItemHint_5h0u9_gg_{color:var(--intergalactic-text-secondary, #6c6e79)}" /*__inner_css_end__*/, "5h0u9_gg_") /*__reshadow_css_end__*/, {
|
|
40
|
+
"__SDropdownMenuItemContainer": "___SDropdownMenuItemContainer_5h0u9_gg_",
|
|
41
|
+
"_nesting-trigger": "__nesting-trigger_5h0u9_gg_",
|
|
42
|
+
"__SDropdownMenuNesting": "___SDropdownMenuNesting_5h0u9_gg_",
|
|
43
|
+
"_size_l": "_size_l_5h0u9_gg_",
|
|
44
|
+
"_size_m": "_size_m_5h0u9_gg_",
|
|
45
|
+
"_highlighted": "__highlighted_5h0u9_gg_",
|
|
46
|
+
"__SDropdownNestingItem": "___SDropdownNestingItem_5h0u9_gg_",
|
|
47
|
+
"__SItemContent": "___SItemContent_5h0u9_gg_",
|
|
48
|
+
"__SItemHint": "___SItemHint_5h0u9_gg_",
|
|
49
|
+
"__SDropdownMenuList": "___SDropdownMenuList_5h0u9_gg_",
|
|
50
|
+
"__SShadowHorizontal": "___SShadowHorizontal_5h0u9_gg_",
|
|
51
|
+
"_position_median": "_position_median_5h0u9_gg_",
|
|
52
|
+
"_position_start": "_position_start_5h0u9_gg_",
|
|
53
|
+
"_position_end": "_position_end_5h0u9_gg_",
|
|
54
|
+
"__SShadowVertical": "___SShadowVertical_5h0u9_gg_",
|
|
55
|
+
"__SDropdownMenuItemAddon": "___SDropdownMenuItemAddon_5h0u9_gg_",
|
|
56
|
+
"__SItemContentText": "___SItemContentText_5h0u9_gg_"
|
|
57
57
|
});
|
|
58
58
|
var ListBoxContextProvider = function ListBoxContextProvider(_ref22) {
|
|
59
59
|
var children = _ref22.children;
|
package/lib/es6/DropdownMenu.js
CHANGED
|
@@ -35,24 +35,24 @@ import ScrollAreaComponent, { hideScrollBarsFromScreenReadersContext } from '@se
|
|
|
35
35
|
import { useUID } from '@semcore/utils/lib/uniqueID';
|
|
36
36
|
import { localizedMessages } from './translations/__intergalactic-dynamic-locales';
|
|
37
37
|
/*__reshadow-styles__:"./style/dropdown-menu.shadow.css"*/
|
|
38
|
-
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".
|
|
39
|
-
"__SDropdownMenuItemContainer": "
|
|
40
|
-
"_nesting-trigger": "__nesting-
|
|
41
|
-
"__SDropdownMenuNesting": "
|
|
42
|
-
"_size_l": "
|
|
43
|
-
"_size_m": "
|
|
44
|
-
"_highlighted": "
|
|
45
|
-
"__SDropdownNestingItem": "
|
|
46
|
-
"__SItemContent": "
|
|
47
|
-
"__SItemHint": "
|
|
48
|
-
"__SDropdownMenuList": "
|
|
49
|
-
"__SShadowHorizontal": "
|
|
50
|
-
"_position_median": "
|
|
51
|
-
"_position_start": "
|
|
52
|
-
"_position_end": "
|
|
53
|
-
"__SShadowVertical": "
|
|
54
|
-
"__SDropdownMenuItemAddon": "
|
|
55
|
-
"__SItemContentText": "
|
|
38
|
+
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SDropdownMenuList_5h0u9_gg_{max-height:240px;padding:var(--intergalactic-spacing-1x, 4px)0;position:relative;min-height:26px;min-width:32px;box-sizing:content-box;z-index:0;color:var(--intergalactic-text-primary, #191b23)}.___SDropdownMenuList_5h0u9_gg_ .___SShadowHorizontal_5h0u9_gg_:after,.___SDropdownMenuList_5h0u9_gg_ .___SShadowHorizontal_5h0u9_gg_:before{width:16px;height:100%;border-radius:var(--intergalactic-control-rounded, 6px)}.___SDropdownMenuList_5h0u9_gg_ .___SShadowHorizontal_5h0u9_gg_._position_median_5h0u9_gg_:before{background:var(--intergalactic-scroll-area-dropdown-menu-left,\n linear-gradient(to right, rgba(255, 255, 255, 1) 34.38%, rgba(255, 255, 255, 0) 100%)\n )}.___SDropdownMenuList_5h0u9_gg_ .___SShadowHorizontal_5h0u9_gg_._position_median_5h0u9_gg_:after{background:var(--intergalactic-scroll-area-dropdown-menu-right,\n linear-gradient(to left, rgba(255, 255, 255, 1) 34.38%, rgba(255, 255, 255, 0) 100%)\n )}.___SDropdownMenuList_5h0u9_gg_ .___SShadowHorizontal_5h0u9_gg_._position_start_5h0u9_gg_:before{background:var(--intergalactic-scroll-area-dropdown-menu-left,\n linear-gradient(to right, rgba(255, 255, 255, 1) 34.38%, rgba(255, 255, 255, 0) 100%)\n )}.___SDropdownMenuList_5h0u9_gg_ .___SShadowHorizontal_5h0u9_gg_._position_end_5h0u9_gg_:after{background:var(--intergalactic-scroll-area-dropdown-menu-right,\n linear-gradient(to left, rgba(255, 255, 255, 1) 34.38%, rgba(255, 255, 255, 0) 100%)\n )}.___SDropdownMenuList_5h0u9_gg_ .___SShadowVertical_5h0u9_gg_:after,.___SDropdownMenuList_5h0u9_gg_ .___SShadowVertical_5h0u9_gg_:before{width:100%;height:16px;border-radius:var(--intergalactic-control-rounded, 6px)}.___SDropdownMenuList_5h0u9_gg_ .___SShadowVertical_5h0u9_gg_._position_median_5h0u9_gg_:before{background:var(--intergalactic-scroll-area-dropdown-menu-top,\n linear-gradient(to bottom, rgba(255, 255, 255, 1) 34.38%, rgba(255, 255, 255, 0) 100%)\n )}.___SDropdownMenuList_5h0u9_gg_ .___SShadowVertical_5h0u9_gg_._position_median_5h0u9_gg_:after{background:var(--intergalactic-scroll-area-dropdown-menu-bottom,\n linear-gradient(to top, rgba(255, 255, 255, 1) 34.38%, rgba(255, 255, 255, 0) 100%)\n )}.___SDropdownMenuList_5h0u9_gg_ .___SShadowVertical_5h0u9_gg_._position_start_5h0u9_gg_:before{background:var(--intergalactic-scroll-area-dropdown-menu-top,\n linear-gradient(to bottom, rgba(255, 255, 255, 1) 34.38%, rgba(255, 255, 255, 0) 100%)\n )}.___SDropdownMenuList_5h0u9_gg_ .___SShadowVertical_5h0u9_gg_._position_end_5h0u9_gg_:after{background:var(--intergalactic-scroll-area-dropdown-menu-bottom,\n linear-gradient(to top, rgba(255, 255, 255, 1) 34.38%, rgba(255, 255, 255, 0) 100%)\n )}.___SDropdownMenuItemContainer_5h0u9_gg_.__nesting-trigger_5h0u9_gg_{justify-content:space-between}.___SDropdownMenuItemAddon_5h0u9_gg_,.___SItemContentText_5h0u9_gg_{display:inline-flex;margin-left:var(--intergalactic-spacing-1x, 4px);margin-right:var(--intergalactic-spacing-1x, 4px)}.___SDropdownMenuItemAddon_5h0u9_gg_:first-child,.___SItemContentText_5h0u9_gg_:first-child{margin-left:0}.___SDropdownMenuItemAddon_5h0u9_gg_:last-child,.___SItemContentText_5h0u9_gg_:last-child{margin-right:0}.___SDropdownMenuNesting_5h0u9_gg_,.___SDropdownMenuNesting_5h0u9_gg_._size_l_5h0u9_gg_,.___SDropdownMenuNesting_5h0u9_gg_._size_m_5h0u9_gg_{padding:0}.___SDropdownMenuNesting_5h0u9_gg_.__highlighted_5h0u9_gg_{z-index:1;box-shadow:var(--intergalactic-keyboard-focus, 0px 0px 0px 3px rgba(0, 143, 248, 0.5)) inset}.___SDropdownNestingItem_5h0u9_gg_._size_l_5h0u9_gg_,.___SDropdownNestingItem_5h0u9_gg_._size_m_5h0u9_gg_{padding-right:0}.___SDropdownNestingItem_5h0u9_gg_ .___SDropdownMenuItemContainer_5h0u9_gg_{width:auto;padding-top:0;padding-bottom:0;padding-left:0;min-height:auto}.___SItemContent_5h0u9_gg_:focus{outline:0}.___SItemHint_5h0u9_gg_{color:var(--intergalactic-text-secondary, #6c6e79)}" /*__inner_css_end__*/, "5h0u9_gg_") /*__reshadow_css_end__*/, {
|
|
39
|
+
"__SDropdownMenuItemContainer": "___SDropdownMenuItemContainer_5h0u9_gg_",
|
|
40
|
+
"_nesting-trigger": "__nesting-trigger_5h0u9_gg_",
|
|
41
|
+
"__SDropdownMenuNesting": "___SDropdownMenuNesting_5h0u9_gg_",
|
|
42
|
+
"_size_l": "_size_l_5h0u9_gg_",
|
|
43
|
+
"_size_m": "_size_m_5h0u9_gg_",
|
|
44
|
+
"_highlighted": "__highlighted_5h0u9_gg_",
|
|
45
|
+
"__SDropdownNestingItem": "___SDropdownNestingItem_5h0u9_gg_",
|
|
46
|
+
"__SItemContent": "___SItemContent_5h0u9_gg_",
|
|
47
|
+
"__SItemHint": "___SItemHint_5h0u9_gg_",
|
|
48
|
+
"__SDropdownMenuList": "___SDropdownMenuList_5h0u9_gg_",
|
|
49
|
+
"__SShadowHorizontal": "___SShadowHorizontal_5h0u9_gg_",
|
|
50
|
+
"_position_median": "_position_median_5h0u9_gg_",
|
|
51
|
+
"_position_start": "_position_start_5h0u9_gg_",
|
|
52
|
+
"_position_end": "_position_end_5h0u9_gg_",
|
|
53
|
+
"__SShadowVertical": "___SShadowVertical_5h0u9_gg_",
|
|
54
|
+
"__SDropdownMenuItemAddon": "___SDropdownMenuItemAddon_5h0u9_gg_",
|
|
55
|
+
"__SItemContentText": "___SItemContentText_5h0u9_gg_"
|
|
56
56
|
});
|
|
57
57
|
import { useFocusSource } from '@semcore/utils/lib/enhances/keyboardFocusEnhance';
|
|
58
58
|
import { isAdvanceMode } from '@semcore/utils/lib/findComponent';
|
package/lib/esm/DropdownMenu.mjs
CHANGED
|
@@ -1,78 +1,78 @@
|
|
|
1
1
|
import X from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
2
2
|
import Y from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
3
|
+
import N from "@babel/runtime/helpers/esm/slicedToArray";
|
|
4
|
+
import W from "@babel/runtime/helpers/esm/extends";
|
|
5
|
+
import g from "@babel/runtime/helpers/esm/objectSpread2";
|
|
6
6
|
import Z from "@babel/runtime/helpers/esm/classCallCheck";
|
|
7
7
|
import ee from "@babel/runtime/helpers/esm/createClass";
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
8
|
+
import j from "@babel/runtime/helpers/esm/assertThisInitialized";
|
|
9
|
+
import I from "@babel/runtime/helpers/esm/get";
|
|
10
|
+
import y from "@babel/runtime/helpers/esm/getPrototypeOf";
|
|
11
11
|
import te from "@babel/runtime/helpers/esm/inherits";
|
|
12
12
|
import re from "@babel/runtime/helpers/esm/createSuper";
|
|
13
|
-
import
|
|
13
|
+
import M from "@babel/runtime/helpers/esm/defineProperty";
|
|
14
14
|
import { sstyled as ne } from "@semcore/utils/lib/core/index";
|
|
15
|
-
import oe, { assignProps as m, sstyled as
|
|
15
|
+
import oe, { assignProps as m, sstyled as x } from "@semcore/core";
|
|
16
16
|
import i from "react";
|
|
17
17
|
import ie from "classnames";
|
|
18
|
-
import D, { enhance as ae, selectedIndexContext as
|
|
19
|
-
import { useBox as
|
|
20
|
-
import
|
|
21
|
-
import { useUID as
|
|
22
|
-
import { localizedMessages as
|
|
23
|
-
import { useFocusSource as
|
|
24
|
-
import { isAdvanceMode as
|
|
18
|
+
import D, { enhance as ae, selectedIndexContext as q, AbstractDropdown as _e } from "@semcore/dropdown";
|
|
19
|
+
import { useBox as se, Flex as z } from "@semcore/flex-box";
|
|
20
|
+
import E, { hideScrollBarsFromScreenReadersContext as ue } from "@semcore/scroll-area";
|
|
21
|
+
import { useUID as de } from "@semcore/utils/lib/uniqueID";
|
|
22
|
+
import { localizedMessages as le } from "./translations/__intergalactic-dynamic-locales.mjs";
|
|
23
|
+
import { useFocusSource as ge } from "@semcore/utils/lib/enhances/keyboardFocusEnhance";
|
|
24
|
+
import { isAdvanceMode as L } from "@semcore/utils/lib/findComponent";
|
|
25
25
|
import { forkRef as G } from "@semcore/utils/lib/ref";
|
|
26
|
-
import { callAllEventHandlers as
|
|
26
|
+
import { callAllEventHandlers as A } from "@semcore/utils/lib/assignProps";
|
|
27
27
|
import ce from "@semcore/button";
|
|
28
|
-
import { Text as
|
|
29
|
-
var me = ["className"],
|
|
28
|
+
import { Text as he } from "@semcore/typography";
|
|
29
|
+
var me = ["className"], pe = (
|
|
30
30
|
/*__reshadow_css_start__*/
|
|
31
31
|
(ne.insert(
|
|
32
32
|
/*__inner_css_start__*/
|
|
33
|
-
`.
|
|
33
|
+
`.___SDropdownMenuList_5h0u9_gg_{max-height:240px;padding:var(--intergalactic-spacing-1x, 4px)0;position:relative;min-height:26px;min-width:32px;box-sizing:content-box;z-index:0;color:var(--intergalactic-text-primary, #191b23)}.___SDropdownMenuList_5h0u9_gg_ .___SShadowHorizontal_5h0u9_gg_:after,.___SDropdownMenuList_5h0u9_gg_ .___SShadowHorizontal_5h0u9_gg_:before{width:16px;height:100%;border-radius:var(--intergalactic-control-rounded, 6px)}.___SDropdownMenuList_5h0u9_gg_ .___SShadowHorizontal_5h0u9_gg_._position_median_5h0u9_gg_:before{background:var(--intergalactic-scroll-area-dropdown-menu-left,
|
|
34
34
|
linear-gradient(to right, rgba(255, 255, 255, 1) 34.38%, rgba(255, 255, 255, 0) 100%)
|
|
35
|
-
)}.
|
|
35
|
+
)}.___SDropdownMenuList_5h0u9_gg_ .___SShadowHorizontal_5h0u9_gg_._position_median_5h0u9_gg_:after{background:var(--intergalactic-scroll-area-dropdown-menu-right,
|
|
36
36
|
linear-gradient(to left, rgba(255, 255, 255, 1) 34.38%, rgba(255, 255, 255, 0) 100%)
|
|
37
|
-
)}.
|
|
37
|
+
)}.___SDropdownMenuList_5h0u9_gg_ .___SShadowHorizontal_5h0u9_gg_._position_start_5h0u9_gg_:before{background:var(--intergalactic-scroll-area-dropdown-menu-left,
|
|
38
38
|
linear-gradient(to right, rgba(255, 255, 255, 1) 34.38%, rgba(255, 255, 255, 0) 100%)
|
|
39
|
-
)}.
|
|
39
|
+
)}.___SDropdownMenuList_5h0u9_gg_ .___SShadowHorizontal_5h0u9_gg_._position_end_5h0u9_gg_:after{background:var(--intergalactic-scroll-area-dropdown-menu-right,
|
|
40
40
|
linear-gradient(to left, rgba(255, 255, 255, 1) 34.38%, rgba(255, 255, 255, 0) 100%)
|
|
41
|
-
)}.
|
|
41
|
+
)}.___SDropdownMenuList_5h0u9_gg_ .___SShadowVertical_5h0u9_gg_:after,.___SDropdownMenuList_5h0u9_gg_ .___SShadowVertical_5h0u9_gg_:before{width:100%;height:16px;border-radius:var(--intergalactic-control-rounded, 6px)}.___SDropdownMenuList_5h0u9_gg_ .___SShadowVertical_5h0u9_gg_._position_median_5h0u9_gg_:before{background:var(--intergalactic-scroll-area-dropdown-menu-top,
|
|
42
42
|
linear-gradient(to bottom, rgba(255, 255, 255, 1) 34.38%, rgba(255, 255, 255, 0) 100%)
|
|
43
|
-
)}.
|
|
43
|
+
)}.___SDropdownMenuList_5h0u9_gg_ .___SShadowVertical_5h0u9_gg_._position_median_5h0u9_gg_:after{background:var(--intergalactic-scroll-area-dropdown-menu-bottom,
|
|
44
44
|
linear-gradient(to top, rgba(255, 255, 255, 1) 34.38%, rgba(255, 255, 255, 0) 100%)
|
|
45
|
-
)}.
|
|
45
|
+
)}.___SDropdownMenuList_5h0u9_gg_ .___SShadowVertical_5h0u9_gg_._position_start_5h0u9_gg_:before{background:var(--intergalactic-scroll-area-dropdown-menu-top,
|
|
46
46
|
linear-gradient(to bottom, rgba(255, 255, 255, 1) 34.38%, rgba(255, 255, 255, 0) 100%)
|
|
47
|
-
)}.
|
|
47
|
+
)}.___SDropdownMenuList_5h0u9_gg_ .___SShadowVertical_5h0u9_gg_._position_end_5h0u9_gg_:after{background:var(--intergalactic-scroll-area-dropdown-menu-bottom,
|
|
48
48
|
linear-gradient(to top, rgba(255, 255, 255, 1) 34.38%, rgba(255, 255, 255, 0) 100%)
|
|
49
|
-
)}.
|
|
50
|
-
"
|
|
49
|
+
)}.___SDropdownMenuItemContainer_5h0u9_gg_.__nesting-trigger_5h0u9_gg_{justify-content:space-between}.___SDropdownMenuItemAddon_5h0u9_gg_,.___SItemContentText_5h0u9_gg_{display:inline-flex;margin-left:var(--intergalactic-spacing-1x, 4px);margin-right:var(--intergalactic-spacing-1x, 4px)}.___SDropdownMenuItemAddon_5h0u9_gg_:first-child,.___SItemContentText_5h0u9_gg_:first-child{margin-left:0}.___SDropdownMenuItemAddon_5h0u9_gg_:last-child,.___SItemContentText_5h0u9_gg_:last-child{margin-right:0}.___SDropdownMenuNesting_5h0u9_gg_,.___SDropdownMenuNesting_5h0u9_gg_._size_l_5h0u9_gg_,.___SDropdownMenuNesting_5h0u9_gg_._size_m_5h0u9_gg_{padding:0}.___SDropdownMenuNesting_5h0u9_gg_.__highlighted_5h0u9_gg_{z-index:1;box-shadow:var(--intergalactic-keyboard-focus, 0px 0px 0px 3px rgba(0, 143, 248, 0.5)) inset}.___SDropdownNestingItem_5h0u9_gg_._size_l_5h0u9_gg_,.___SDropdownNestingItem_5h0u9_gg_._size_m_5h0u9_gg_{padding-right:0}.___SDropdownNestingItem_5h0u9_gg_ .___SDropdownMenuItemContainer_5h0u9_gg_{width:auto;padding-top:0;padding-bottom:0;padding-left:0;min-height:auto}.___SItemContent_5h0u9_gg_:focus{outline:0}.___SItemHint_5h0u9_gg_{color:var(--intergalactic-text-secondary, #6c6e79)}`,
|
|
50
|
+
"5h0u9_gg_"
|
|
51
51
|
), {
|
|
52
|
-
__SDropdownMenuItemContainer: "
|
|
53
|
-
"_nesting-trigger": "__nesting-
|
|
54
|
-
__SDropdownMenuNesting: "
|
|
55
|
-
_size_l: "
|
|
56
|
-
_size_m: "
|
|
57
|
-
_highlighted: "
|
|
58
|
-
__SDropdownNestingItem: "
|
|
59
|
-
__SItemContent: "
|
|
60
|
-
__SItemHint: "
|
|
61
|
-
__SDropdownMenuList: "
|
|
62
|
-
__SShadowHorizontal: "
|
|
63
|
-
_position_median: "
|
|
64
|
-
_position_start: "
|
|
65
|
-
_position_end: "
|
|
66
|
-
__SShadowVertical: "
|
|
67
|
-
__SDropdownMenuItemAddon: "
|
|
68
|
-
__SItemContentText: "
|
|
52
|
+
__SDropdownMenuItemContainer: "___SDropdownMenuItemContainer_5h0u9_gg_",
|
|
53
|
+
"_nesting-trigger": "__nesting-trigger_5h0u9_gg_",
|
|
54
|
+
__SDropdownMenuNesting: "___SDropdownMenuNesting_5h0u9_gg_",
|
|
55
|
+
_size_l: "_size_l_5h0u9_gg_",
|
|
56
|
+
_size_m: "_size_m_5h0u9_gg_",
|
|
57
|
+
_highlighted: "__highlighted_5h0u9_gg_",
|
|
58
|
+
__SDropdownNestingItem: "___SDropdownNestingItem_5h0u9_gg_",
|
|
59
|
+
__SItemContent: "___SItemContent_5h0u9_gg_",
|
|
60
|
+
__SItemHint: "___SItemHint_5h0u9_gg_",
|
|
61
|
+
__SDropdownMenuList: "___SDropdownMenuList_5h0u9_gg_",
|
|
62
|
+
__SShadowHorizontal: "___SShadowHorizontal_5h0u9_gg_",
|
|
63
|
+
_position_median: "_position_median_5h0u9_gg_",
|
|
64
|
+
_position_start: "_position_start_5h0u9_gg_",
|
|
65
|
+
_position_end: "_position_end_5h0u9_gg_",
|
|
66
|
+
__SShadowVertical: "___SShadowVertical_5h0u9_gg_",
|
|
67
|
+
__SDropdownMenuItemAddon: "___SDropdownMenuItemAddon_5h0u9_gg_",
|
|
68
|
+
__SItemContentText: "___SItemContentText_5h0u9_gg_"
|
|
69
69
|
})
|
|
70
70
|
), U = function(_) {
|
|
71
71
|
var t = _.children;
|
|
72
|
-
return /* @__PURE__ */ i.createElement(
|
|
72
|
+
return /* @__PURE__ */ i.createElement(ue.Provider, {
|
|
73
73
|
value: !0
|
|
74
74
|
}, t);
|
|
75
|
-
},
|
|
75
|
+
}, H = /* @__PURE__ */ i.createContext({}), P = /* @__PURE__ */ function(n) {
|
|
76
76
|
te(t, n);
|
|
77
77
|
var _ = re(t);
|
|
78
78
|
function t() {
|
|
@@ -80,21 +80,21 @@ var me = ["className"], he = (
|
|
|
80
80
|
Z(this, t);
|
|
81
81
|
for (var r = arguments.length, o = new Array(r), e = 0; e < r; e++)
|
|
82
82
|
o[e] = arguments[e];
|
|
83
|
-
return a = _.call.apply(_, [this].concat(o)),
|
|
83
|
+
return a = _.call.apply(_, [this].concat(o)), M(j(a), "actionsRef", /* @__PURE__ */ i.createRef()), M(j(a), "role", "menu"), a;
|
|
84
84
|
}
|
|
85
85
|
return ee(t, [{
|
|
86
86
|
key: "uncontrolledProps",
|
|
87
87
|
value: function() {
|
|
88
88
|
var r = this;
|
|
89
|
-
return
|
|
89
|
+
return g(g({}, I(y(t.prototype), "uncontrolledProps", this).call(this)), {}, {
|
|
90
90
|
visible: [null, function(o) {
|
|
91
91
|
o === !0 && setTimeout(function() {
|
|
92
|
-
var e,
|
|
93
|
-
if (
|
|
94
|
-
r.scrollToNode(
|
|
95
|
-
for (var
|
|
96
|
-
if (
|
|
97
|
-
r.handlers.highlightedIndex(
|
|
92
|
+
var e, s, u = (e = r.menuRef.current) === null || e === void 0 ? void 0 : e.querySelectorAll('[role="menuitemcheckbox"], [role="menuitemradio"]'), d = (s = r.menuRef.current) === null || s === void 0 ? void 0 : s.querySelector('[aria-checked="true"]');
|
|
93
|
+
if (d && u && r.asProps.itemsCount === void 0) {
|
|
94
|
+
r.scrollToNode(d, !0);
|
|
95
|
+
for (var h = 0; h < u.length; h++)
|
|
96
|
+
if (u[h] === d) {
|
|
97
|
+
r.handlers.highlightedIndex(h);
|
|
98
98
|
break;
|
|
99
99
|
}
|
|
100
100
|
}
|
|
@@ -105,56 +105,56 @@ var me = ["className"], he = (
|
|
|
105
105
|
}, {
|
|
106
106
|
key: "itemRef",
|
|
107
107
|
value: function(r, o, e) {
|
|
108
|
-
|
|
108
|
+
I(y(t.prototype), "itemRef", this).call(this, r, o, e), e === document.activeElement && I(y(t.prototype), "scrollToNode", this).call(this, e);
|
|
109
109
|
}
|
|
110
110
|
}, {
|
|
111
111
|
key: "getTriggerProps",
|
|
112
112
|
value: function() {
|
|
113
|
-
var r = this.asProps, o = r.Children, e = r.uid,
|
|
114
|
-
return
|
|
115
|
-
onKeyDown:
|
|
116
|
-
"aria-controls":
|
|
117
|
-
"aria-haspopup":
|
|
113
|
+
var r = this.asProps, o = r.Children, e = r.uid, s = r.visible, u = L(o, [v.Menu.displayName]), d = u ? "igc-".concat(e, "-list") : "igc-".concat(e, "-popper");
|
|
114
|
+
return g(g({}, I(y(t.prototype), "getTriggerProps", this).call(this)), {}, {
|
|
115
|
+
onKeyDown: A(this.handlePreventCommonKeyDown.bind(this), this.handleOpenKeyDown.bind(this), this.handleKeyDownForMenu("trigger")),
|
|
116
|
+
"aria-controls": s ? d : void 0,
|
|
117
|
+
"aria-haspopup": u ? "true" : "dialog"
|
|
118
118
|
});
|
|
119
119
|
}
|
|
120
120
|
}, {
|
|
121
121
|
key: "getListProps",
|
|
122
122
|
value: function() {
|
|
123
|
-
return
|
|
124
|
-
onKeyDown:
|
|
123
|
+
return g(g({}, I(y(t.prototype), "getListProps", this).call(this)), {}, {
|
|
124
|
+
onKeyDown: A(this.handlePreventCommonKeyDown.bind(this), this.handleKeyDownForMenu("list"), this.handleArrowKeyDown.bind(this))
|
|
125
125
|
});
|
|
126
126
|
}
|
|
127
127
|
}, {
|
|
128
128
|
key: "getPopperProps",
|
|
129
129
|
value: function() {
|
|
130
|
-
return
|
|
131
|
-
onKeyDown:
|
|
130
|
+
return g(g({}, I(y(t.prototype), "getPopperProps", this).call(this)), {}, {
|
|
131
|
+
onKeyDown: A(this.handlePreventCommonKeyDown.bind(this), this.handlePreventPopperKeyDown.bind(this))
|
|
132
132
|
});
|
|
133
133
|
}
|
|
134
134
|
}, {
|
|
135
135
|
key: "getActionsProps",
|
|
136
136
|
value: function() {
|
|
137
|
-
return
|
|
137
|
+
return g(g({}, this.getListProps()), {}, {
|
|
138
138
|
ref: this.actionsRef,
|
|
139
|
-
onKeyDown:
|
|
139
|
+
onKeyDown: A(this.handlePreventTabOnActions.bind(this), this.handlePreventCommonKeyDown.bind(this), this.handleKeyDownForMenu("list"), this.handleArrowKeyDown.bind(this))
|
|
140
140
|
});
|
|
141
141
|
}
|
|
142
142
|
}, {
|
|
143
143
|
key: "getItemProps",
|
|
144
144
|
value: function(r, o) {
|
|
145
|
-
var e,
|
|
146
|
-
tabIndex:
|
|
147
|
-
ref: function(
|
|
148
|
-
return
|
|
145
|
+
var e, s = this, u = this.asProps, d = u.highlightedIndex, h = u.visible, l = (e = r.index) !== null && e !== void 0 ? e : o, p = l === d, c = g(g({}, I(y(t.prototype), "getItemProps", this).call(this, r, l)), {}, {
|
|
146
|
+
tabIndex: p && h ? 0 : -1,
|
|
147
|
+
ref: function(w) {
|
|
148
|
+
return s.itemRef(r, l, w);
|
|
149
149
|
},
|
|
150
150
|
actionsRef: this.actionsRef
|
|
151
151
|
});
|
|
152
152
|
if (r.tag === ce) {
|
|
153
|
-
var
|
|
154
|
-
c.use = (
|
|
153
|
+
var f, b, S;
|
|
154
|
+
c.use = (f = r.use) !== null && f !== void 0 ? f : "tertiary", c.theme = (b = r.theme) !== null && b !== void 0 ? b : "muted", c.size = (S = r.size) !== null && S !== void 0 ? S : "s";
|
|
155
155
|
}
|
|
156
|
-
return r.selected && (c["aria-checked"] = !0),
|
|
157
|
-
|
|
156
|
+
return r.selected && (c["aria-checked"] = !0), I(y(t.prototype), "childRole", this) === "menuitemradio" && (c.onClick = function() {
|
|
157
|
+
s.handlers.visible(!1);
|
|
158
158
|
}), c;
|
|
159
159
|
}
|
|
160
160
|
}, {
|
|
@@ -162,18 +162,18 @@ var me = ["className"], he = (
|
|
|
162
162
|
value: function(r) {
|
|
163
163
|
var o = this;
|
|
164
164
|
return function(e) {
|
|
165
|
-
var
|
|
166
|
-
if (r === "list" && !((
|
|
165
|
+
var s, u, d = o.asProps, h = d.visible, l = d.placement, p = d.inlineActions;
|
|
166
|
+
if (r === "list" && !((s = o.menuRef.current) !== null && s !== void 0 && s.contains(e.target)) && !p)
|
|
167
167
|
return e.stopPropagation(), !1;
|
|
168
|
-
var c = e.key === "ArrowRight" && (
|
|
169
|
-
if (r === "trigger" && (!
|
|
168
|
+
var c = e.key === "ArrowRight" && (l == null ? void 0 : l.startsWith("right")) || e.key === "ArrowLeft" && (l == null ? void 0 : l.startsWith("left")), f = e.key === "ArrowLeft" && (l == null ? void 0 : l.startsWith("right")) || e.key === "ArrowRight" && (l == null ? void 0 : l.startsWith("left")) || e.key === "Escape", b = (u = e.target.getAttribute("role")) === null || u === void 0 ? void 0 : u.startsWith(I(y(t.prototype), "childRole", o));
|
|
169
|
+
if (r === "trigger" && (!h || p) && c && b)
|
|
170
170
|
return o.handlers.visible(!0), o.handlers.highlightedIndex(0), setTimeout(function() {
|
|
171
|
-
var
|
|
172
|
-
(
|
|
171
|
+
var C, w = o.asProps.highlightedIndex;
|
|
172
|
+
(C = o.itemRefs[w]) === null || C === void 0 || C.focus();
|
|
173
173
|
}, 0), e.preventDefault(), e.stopPropagation(), !1;
|
|
174
|
-
if (r === "list" &&
|
|
175
|
-
var
|
|
176
|
-
return o.handlers.visible(!1), (
|
|
174
|
+
if (r === "list" && h && f && b && (!p || p && (e.key === "Escape" || o.asProps.highlightedIndex === 0))) {
|
|
175
|
+
var S;
|
|
176
|
+
return o.handlers.visible(!1), (S = o.triggerRef.current) === null || S === void 0 || S.focus(), e.preventDefault(), e.stopPropagation(), !1;
|
|
177
177
|
}
|
|
178
178
|
};
|
|
179
179
|
}
|
|
@@ -186,168 +186,168 @@ var me = ["className"], he = (
|
|
|
186
186
|
}, {
|
|
187
187
|
key: "render",
|
|
188
188
|
value: function() {
|
|
189
|
-
var r = this.asProps, o = this.asProps, e = o.Children,
|
|
190
|
-
return this.itemProps = [], /* @__PURE__ */ i.createElement(
|
|
191
|
-
value:
|
|
189
|
+
var r = this.asProps, o = this.asProps, e = o.Children, s = o.selectedIndex, u = o.interaction, d = o.timeout;
|
|
190
|
+
return this.itemProps = [], /* @__PURE__ */ i.createElement(q.Provider, {
|
|
191
|
+
value: s
|
|
192
192
|
}, /* @__PURE__ */ i.createElement(D, m({
|
|
193
|
-
timeout:
|
|
193
|
+
timeout: d || (u === "hover" ? [0, 100] : void 0)
|
|
194
194
|
}, r), /* @__PURE__ */ i.createElement(e, null)));
|
|
195
195
|
}
|
|
196
196
|
}]), t;
|
|
197
197
|
}(_e);
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
198
|
+
M(P, "displayName", "DropdownMenu");
|
|
199
|
+
M(P, "style", pe);
|
|
200
|
+
M(P, "enhance", Object.values(ae));
|
|
201
|
+
M(P, "defaultProps", {
|
|
202
202
|
size: "m",
|
|
203
203
|
defaultVisible: !1,
|
|
204
204
|
defaultHighlightedIndex: 0,
|
|
205
205
|
defaultSelectedIndex: 0,
|
|
206
|
-
i18n:
|
|
206
|
+
i18n: le,
|
|
207
207
|
locale: "en",
|
|
208
208
|
interaction: "click",
|
|
209
209
|
inlineActions: !1,
|
|
210
210
|
placement: "bottom-start",
|
|
211
211
|
timeout: 0
|
|
212
212
|
});
|
|
213
|
-
|
|
213
|
+
M(P, "nestedMenuInteraction", {
|
|
214
214
|
trigger: [["onClick", "onMouseEnter"], ["onClick", "onMouseLeave"]],
|
|
215
215
|
popper: [["onMouseEnter"], ["onMouseLeave"]]
|
|
216
216
|
});
|
|
217
|
-
function
|
|
218
|
-
var _ = arguments[0], t, a = n.styles, r = n.Children, o =
|
|
219
|
-
return t =
|
|
217
|
+
function fe(n) {
|
|
218
|
+
var _ = arguments[0], t, a = n.styles, r = n.Children, o = E;
|
|
219
|
+
return t = x(a), /* @__PURE__ */ i.createElement(U, t.cn("ListBoxContextProvider", {}), /* @__PURE__ */ i.createElement(o, t.cn("SDropdownMenuList", g({}, m({
|
|
220
220
|
shadow: !0
|
|
221
|
-
}, _))), /* @__PURE__ */ i.createElement(
|
|
221
|
+
}, _))), /* @__PURE__ */ i.createElement(E.Container, {
|
|
222
222
|
tabIndex: void 0
|
|
223
|
-
}, /* @__PURE__ */ i.createElement(r, t.cn("Children", {}))), /* @__PURE__ */ i.createElement(
|
|
223
|
+
}, /* @__PURE__ */ i.createElement(r, t.cn("Children", {}))), /* @__PURE__ */ i.createElement(E.Bar, {
|
|
224
224
|
orientation: "horizontal"
|
|
225
|
-
}), /* @__PURE__ */ i.createElement(
|
|
225
|
+
}), /* @__PURE__ */ i.createElement(E.Bar, {
|
|
226
226
|
orientation: "vertical"
|
|
227
227
|
})));
|
|
228
228
|
}
|
|
229
229
|
function ve(n) {
|
|
230
|
-
var _ = arguments[0], t, a = n.styles, r =
|
|
231
|
-
return t =
|
|
230
|
+
var _ = arguments[0], t, a = n.styles, r = z;
|
|
231
|
+
return t = x(a), /* @__PURE__ */ i.createElement(r, t.cn("SDropdownMenuActions", g({}, m({}, _))));
|
|
232
232
|
}
|
|
233
|
-
function
|
|
234
|
-
var _ = arguments[0], t = n.visible, a = n.disablePortal, r = n.ignorePortalsStacking, o = n.disableEnforceFocus, e = n.interaction,
|
|
233
|
+
function be(n) {
|
|
234
|
+
var _ = arguments[0], t = n.visible, a = n.disablePortal, r = n.ignorePortalsStacking, o = n.disableEnforceFocus, e = n.interaction, s = n.autoFocus, u = n.animationsDisabled, d = {
|
|
235
235
|
visible: t,
|
|
236
236
|
disablePortal: a,
|
|
237
237
|
ignorePortalsStacking: r,
|
|
238
238
|
disableEnforceFocus: o,
|
|
239
239
|
interaction: e,
|
|
240
|
-
autoFocus:
|
|
241
|
-
animationsDisabled:
|
|
240
|
+
autoFocus: s,
|
|
241
|
+
animationsDisabled: u
|
|
242
242
|
};
|
|
243
|
-
return /* @__PURE__ */ i.createElement(U, null, /* @__PURE__ */ i.createElement(v.Popper,
|
|
243
|
+
return /* @__PURE__ */ i.createElement(U, null, /* @__PURE__ */ i.createElement(v.Popper, W({}, d, {
|
|
244
244
|
role: null
|
|
245
245
|
}), /* @__PURE__ */ i.createElement(v.List, m({}, _))));
|
|
246
246
|
}
|
|
247
|
-
function
|
|
248
|
-
var _ = arguments[0], t, a = n.id, r = n.styles, o = n.disabled, e = n.Children,
|
|
247
|
+
function Se(n) {
|
|
248
|
+
var _ = arguments[0], t, a = n.id, r = n.styles, o = n.disabled, e = n.Children, s = n.forwardRef, u = n.role, d = n.tabIndex, h = n.actionsRef, l = n["aria-checked"], p = D.Item, c = i.useRef(), f = i.useState(!1), b = N(f, 2), S = b[0], C = b[1], w = {
|
|
249
249
|
contentId: a,
|
|
250
|
-
ref: G(
|
|
251
|
-
role:
|
|
252
|
-
tabIndex:
|
|
253
|
-
ariaChecked:
|
|
254
|
-
},
|
|
255
|
-
if (
|
|
256
|
-
var
|
|
257
|
-
|
|
250
|
+
ref: G(s, c),
|
|
251
|
+
role: u,
|
|
252
|
+
tabIndex: d,
|
|
253
|
+
ariaChecked: l
|
|
254
|
+
}, K = [], T = L(e, [v.displayName], !0), F = L(e, [v.Item.Hint.displayName], !0), R = L(e, [v.Item.Content.displayName], !0) || T || F;
|
|
255
|
+
if (F) {
|
|
256
|
+
var B = "igc-".concat(de(), "-option-hint");
|
|
257
|
+
w.hintId = B, K.push(B);
|
|
258
258
|
}
|
|
259
|
-
|
|
260
|
-
var
|
|
261
|
-
|
|
262
|
-
},
|
|
263
|
-
|
|
259
|
+
T && (w.hasSubMenu = !0), w.ariaDescribes = K, i.useEffect(function() {
|
|
260
|
+
var $ = function(k) {
|
|
261
|
+
k.target === c.current && (C(!0), T && k.stopPropagation());
|
|
262
|
+
}, V = function(k) {
|
|
263
|
+
k.target === c.current && (C(!1), h.current && (c.current.tabIndex = -1));
|
|
264
264
|
};
|
|
265
|
-
return document.addEventListener("focus",
|
|
265
|
+
return document.addEventListener("focus", $, {
|
|
266
266
|
capture: !0
|
|
267
|
-
}), document.addEventListener("blur",
|
|
267
|
+
}), document.addEventListener("blur", V, {
|
|
268
268
|
capture: !0
|
|
269
269
|
}), function() {
|
|
270
|
-
document.removeEventListener("focus",
|
|
270
|
+
document.removeEventListener("focus", $, {
|
|
271
271
|
capture: !0
|
|
272
|
-
}), document.removeEventListener("blur",
|
|
272
|
+
}), document.removeEventListener("blur", V, {
|
|
273
273
|
capture: !0
|
|
274
274
|
});
|
|
275
275
|
};
|
|
276
276
|
}, [c.current]);
|
|
277
|
-
var J =
|
|
278
|
-
return t =
|
|
279
|
-
value:
|
|
280
|
-
}, /* @__PURE__ */ i.createElement(
|
|
281
|
-
ref:
|
|
282
|
-
"use:highlighted": !o &&
|
|
283
|
-
"use:role":
|
|
284
|
-
"use:id":
|
|
285
|
-
"use:tabIndex":
|
|
286
|
-
"use:aria-checked":
|
|
277
|
+
var J = ge();
|
|
278
|
+
return t = x(r), /* @__PURE__ */ i.createElement(H.Provider, {
|
|
279
|
+
value: w
|
|
280
|
+
}, /* @__PURE__ */ i.createElement(p, t.cn("SDropdownMenuItemContainer", g({}, m({
|
|
281
|
+
ref: R ? void 0 : w.ref,
|
|
282
|
+
"use:highlighted": !o && S && J.current === "keyboard",
|
|
283
|
+
"use:role": R ? void 0 : u,
|
|
284
|
+
"use:id": R ? void 0 : a,
|
|
285
|
+
"use:tabIndex": R ? void 0 : d,
|
|
286
|
+
"use:aria-checked": R ? void 0 : l
|
|
287
287
|
}, _))), /* @__PURE__ */ i.createElement(e, t.cn("Children", {}))));
|
|
288
288
|
}
|
|
289
|
-
function
|
|
290
|
-
var _ =
|
|
291
|
-
return /* @__PURE__ */ i.createElement(a,
|
|
292
|
-
className: ie(
|
|
289
|
+
function O(n) {
|
|
290
|
+
var _ = se(n, n.forwardRef), t = N(_, 2), a = t[0], r = t[1], o = r.className, e = Y(r, me), s = x(n.styles);
|
|
291
|
+
return /* @__PURE__ */ i.createElement(a, W({
|
|
292
|
+
className: ie(s.cn("SDropdownMenuItemAddon", n).className, o) || void 0
|
|
293
293
|
}, e));
|
|
294
294
|
}
|
|
295
|
-
function
|
|
295
|
+
function we() {
|
|
296
296
|
var n = arguments[0];
|
|
297
297
|
return /* @__PURE__ */ i.createElement(D.Trigger, m({}, n));
|
|
298
298
|
}
|
|
299
|
-
function
|
|
300
|
-
var _ = arguments[0], t, a = n.styles, r =
|
|
301
|
-
e.hasSubMenu && (
|
|
302
|
-
var
|
|
299
|
+
function Ie(n) {
|
|
300
|
+
var _ = arguments[0], t, a = n.styles, r = z, o = i.useRef(), e = i.useContext(H), s = void 0;
|
|
301
|
+
e.hasSubMenu && (s = "true");
|
|
302
|
+
var u = i.useState(new Set(e.ariaDescribes)), d = N(u, 2), h = d[0], l = d[1];
|
|
303
303
|
return i.useEffect(function() {
|
|
304
|
-
var
|
|
305
|
-
c.getAttribute("aria-haspopup") === "true" && c.getAttribute("aria-describedby") &&
|
|
306
|
-
return
|
|
304
|
+
var p = o.current, c = p == null ? void 0 : p.parentElement;
|
|
305
|
+
c.getAttribute("aria-haspopup") === "true" && c.getAttribute("aria-describedby") && l(function(f) {
|
|
306
|
+
return f.add(c.getAttribute("aria-describedby")), new Set(f);
|
|
307
307
|
});
|
|
308
|
-
}, [e.ariaDescribes]), t =
|
|
308
|
+
}, [e.ariaDescribes]), t = x(a), /* @__PURE__ */ i.createElement(r, t.cn("SItemContent", g({}, m({
|
|
309
309
|
role: e.role,
|
|
310
310
|
id: e.contentId,
|
|
311
311
|
tabIndex: e.tabIndex,
|
|
312
312
|
ref: G(e.ref, o),
|
|
313
|
-
"use:aria-describedby": X(
|
|
313
|
+
"use:aria-describedby": X(h).join(" "),
|
|
314
314
|
"aria-haspopup": e.hasSubMenu ? "true" : void 0,
|
|
315
|
-
"aria-expanded":
|
|
315
|
+
"aria-expanded": s,
|
|
316
316
|
"aria-checked": e.ariaChecked,
|
|
317
317
|
alignItems: "center",
|
|
318
318
|
justifyContent: e.hasSubMenu ? "space-between" : void 0
|
|
319
319
|
}, _))));
|
|
320
320
|
}
|
|
321
|
-
function Ie(n) {
|
|
322
|
-
var _ = arguments[0], t, a = n.styles, r = fe;
|
|
323
|
-
return t = y(a), /* @__PURE__ */ i.createElement(r, t.cn("SItemContentText", u({}, m({}, _))));
|
|
324
|
-
}
|
|
325
321
|
function ye(n) {
|
|
326
|
-
var _ = arguments[0], t, a = n.styles, r =
|
|
327
|
-
return t =
|
|
322
|
+
var _ = arguments[0], t, a = n.styles, r = he;
|
|
323
|
+
return t = x(a), /* @__PURE__ */ i.createElement(r, t.cn("SItemContentText", g({}, m({}, _))));
|
|
324
|
+
}
|
|
325
|
+
function xe(n) {
|
|
326
|
+
var _ = arguments[0], t, a = n.styles, r = z, o = i.useContext(H), e = o.hintId;
|
|
327
|
+
return t = x(a), /* @__PURE__ */ i.createElement(r, t.cn("SItemHint", g({}, m({
|
|
328
328
|
id: e,
|
|
329
329
|
"aria-hidden": "true"
|
|
330
330
|
}, _))));
|
|
331
331
|
}
|
|
332
332
|
function De(n) {
|
|
333
333
|
var _ = arguments[0], t, a = D.Item;
|
|
334
|
-
return t =
|
|
334
|
+
return t = x(n.styles), /* @__PURE__ */ i.createElement(a, t.cn("SDropdownMenuItemContainer", g({}, m({
|
|
335
335
|
variant: "hint"
|
|
336
336
|
}, _))));
|
|
337
337
|
}
|
|
338
|
-
function
|
|
338
|
+
function Ce(n) {
|
|
339
339
|
var _ = arguments[0], t, a = D.Item;
|
|
340
|
-
return t =
|
|
340
|
+
return t = x(n.styles), /* @__PURE__ */ i.createElement(a, t.cn("SDropdownMenuItemContainer", g({}, m({
|
|
341
341
|
variant: "title"
|
|
342
342
|
}, _))));
|
|
343
343
|
}
|
|
344
|
-
function
|
|
344
|
+
function Me(n) {
|
|
345
345
|
var _ = arguments[0], t = n.forwardRef;
|
|
346
346
|
return /* @__PURE__ */ i.createElement(v.Item, m({
|
|
347
347
|
ref: t
|
|
348
348
|
}, _));
|
|
349
349
|
}
|
|
350
|
-
function
|
|
350
|
+
function Pe(n) {
|
|
351
351
|
var _ = arguments[0], t = n.forwardRef;
|
|
352
352
|
return /* @__PURE__ */ i.createElement(v.Item.Content, m({
|
|
353
353
|
tag: v.Trigger,
|
|
@@ -355,32 +355,32 @@ function Me(n) {
|
|
|
355
355
|
"use:role": "menuitem"
|
|
356
356
|
}, _));
|
|
357
357
|
}
|
|
358
|
-
var v = oe(
|
|
359
|
-
Trigger:
|
|
358
|
+
var v = oe(P, {
|
|
359
|
+
Trigger: we,
|
|
360
360
|
Popper: D.Popper,
|
|
361
|
-
List:
|
|
361
|
+
List: fe,
|
|
362
362
|
Actions: ve,
|
|
363
|
-
Menu:
|
|
364
|
-
Item: [
|
|
365
|
-
Addon:
|
|
366
|
-
Content:
|
|
367
|
-
Text:
|
|
368
|
-
Hint:
|
|
363
|
+
Menu: be,
|
|
364
|
+
Item: [Se, {
|
|
365
|
+
Addon: O,
|
|
366
|
+
Content: Ie,
|
|
367
|
+
Text: ye,
|
|
368
|
+
Hint: xe
|
|
369
369
|
}],
|
|
370
370
|
/**
|
|
371
371
|
* @deprecated. Use just Item. See examples on
|
|
372
372
|
*/
|
|
373
|
-
Nesting: [
|
|
374
|
-
Trigger:
|
|
375
|
-
Addon:
|
|
373
|
+
Nesting: [Me, {
|
|
374
|
+
Trigger: Pe,
|
|
375
|
+
Addon: O
|
|
376
376
|
}],
|
|
377
|
-
ItemTitle:
|
|
377
|
+
ItemTitle: Ce,
|
|
378
378
|
ItemHint: De,
|
|
379
379
|
Group: D.Group
|
|
380
380
|
}, {
|
|
381
381
|
parent: [D]
|
|
382
382
|
});
|
|
383
|
-
v.selectedIndexContext =
|
|
383
|
+
v.selectedIndexContext = q;
|
|
384
384
|
export {
|
|
385
385
|
v as default
|
|
386
386
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@semcore/dropdown-menu",
|
|
3
3
|
"description": "Semrush DropdownMenu Component",
|
|
4
|
-
"version": "4.
|
|
4
|
+
"version": "4.47.0-prerelease.2",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/es6/index.js",
|
|
7
7
|
"typings": "lib/types/index.d.ts",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"types": "./lib/types/index.d.ts"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@semcore/button": "5.
|
|
17
|
+
"@semcore/button": "5.43.0-prerelease.2",
|
|
18
18
|
"@semcore/dropdown": "4.43.1",
|
|
19
19
|
"@semcore/flex-box": "5.41.1",
|
|
20
20
|
"@semcore/scroll-area": "5.45.1",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"@types/classnames": "2.2.6",
|
|
40
40
|
"@semcore/testing-utils": "1.0.0",
|
|
41
41
|
"@semcore/base-trigger": "4.26.1",
|
|
42
|
-
"@semcore/button": "5.
|
|
42
|
+
"@semcore/button": "5.43.0-prerelease.2",
|
|
43
43
|
"@semcore/icon": "4.60.1"
|
|
44
44
|
},
|
|
45
45
|
"scripts": {
|