@semcore/dropdown-menu 4.46.0 → 4.46.1-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 +162 -162
- package/package.json +12 -12
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.46.1] - 2025-03-18
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
|
|
9
|
+
- Version patch update due to children dependencies update (`@semcore/button` [5.42.0 ~> 5.42.1], `@semcore/dropdown` [4.43.0 ~> 4.43.1], `@semcore/utils` [4.48.0 ~> 4.48.1], `@semcore/icon` [4.60.0 ~> 4.60.1], `@semcore/core` [2.39.0 ~> 2.39.1]).
|
|
10
|
+
|
|
5
11
|
## [4.46.0] - 2025-03-14
|
|
6
12
|
|
|
7
13
|
### Added
|
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_1xqfd_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_1xqfd_gg_ .___SShadowHorizontal_1xqfd_gg_:after,.___SDropdownMenuList_1xqfd_gg_ .___SShadowHorizontal_1xqfd_gg_:before{width:16px;height:100%;border-radius:var(--intergalactic-control-rounded, 6px)}.___SDropdownMenuList_1xqfd_gg_ .___SShadowHorizontal_1xqfd_gg_._position_median_1xqfd_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_1xqfd_gg_ .___SShadowHorizontal_1xqfd_gg_._position_median_1xqfd_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_1xqfd_gg_ .___SShadowHorizontal_1xqfd_gg_._position_start_1xqfd_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_1xqfd_gg_ .___SShadowHorizontal_1xqfd_gg_._position_end_1xqfd_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_1xqfd_gg_ .___SShadowVertical_1xqfd_gg_:after,.___SDropdownMenuList_1xqfd_gg_ .___SShadowVertical_1xqfd_gg_:before{width:100%;height:16px;border-radius:var(--intergalactic-control-rounded, 6px)}.___SDropdownMenuList_1xqfd_gg_ .___SShadowVertical_1xqfd_gg_._position_median_1xqfd_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_1xqfd_gg_ .___SShadowVertical_1xqfd_gg_._position_median_1xqfd_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_1xqfd_gg_ .___SShadowVertical_1xqfd_gg_._position_start_1xqfd_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_1xqfd_gg_ .___SShadowVertical_1xqfd_gg_._position_end_1xqfd_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_1xqfd_gg_.__nesting-trigger_1xqfd_gg_{justify-content:space-between}.___SDropdownMenuItemAddon_1xqfd_gg_,.___SItemContentText_1xqfd_gg_{display:inline-flex;margin-left:var(--intergalactic-spacing-1x, 4px);margin-right:var(--intergalactic-spacing-1x, 4px)}.___SDropdownMenuItemAddon_1xqfd_gg_:first-child,.___SItemContentText_1xqfd_gg_:first-child{margin-left:0}.___SDropdownMenuItemAddon_1xqfd_gg_:last-child,.___SItemContentText_1xqfd_gg_:last-child{margin-right:0}.___SDropdownMenuNesting_1xqfd_gg_,.___SDropdownMenuNesting_1xqfd_gg_._size_l_1xqfd_gg_,.___SDropdownMenuNesting_1xqfd_gg_._size_m_1xqfd_gg_{padding:0}.___SDropdownMenuNesting_1xqfd_gg_.__highlighted_1xqfd_gg_{z-index:1;box-shadow:var(--intergalactic-keyboard-focus, 0px 0px 0px 3px rgba(0, 143, 248, 0.5)) inset}.___SDropdownNestingItem_1xqfd_gg_._size_l_1xqfd_gg_,.___SDropdownNestingItem_1xqfd_gg_._size_m_1xqfd_gg_{padding-right:0}.___SDropdownNestingItem_1xqfd_gg_ .___SDropdownMenuItemContainer_1xqfd_gg_{width:auto;padding-top:0;padding-bottom:0;padding-left:0;min-height:auto}.___SItemContent_1xqfd_gg_:focus{outline:0}.___SItemHint_1xqfd_gg_{color:var(--intergalactic-text-secondary, #6c6e79)}" /*__inner_css_end__*/, "1xqfd_gg_") /*__reshadow_css_end__*/, {
|
|
40
|
+
"__SDropdownMenuItemContainer": "___SDropdownMenuItemContainer_1xqfd_gg_",
|
|
41
|
+
"_nesting-trigger": "__nesting-trigger_1xqfd_gg_",
|
|
42
|
+
"__SDropdownMenuNesting": "___SDropdownMenuNesting_1xqfd_gg_",
|
|
43
|
+
"_size_l": "_size_l_1xqfd_gg_",
|
|
44
|
+
"_size_m": "_size_m_1xqfd_gg_",
|
|
45
|
+
"_highlighted": "__highlighted_1xqfd_gg_",
|
|
46
|
+
"__SDropdownNestingItem": "___SDropdownNestingItem_1xqfd_gg_",
|
|
47
|
+
"__SItemContent": "___SItemContent_1xqfd_gg_",
|
|
48
|
+
"__SItemHint": "___SItemHint_1xqfd_gg_",
|
|
49
|
+
"__SDropdownMenuList": "___SDropdownMenuList_1xqfd_gg_",
|
|
50
|
+
"__SShadowHorizontal": "___SShadowHorizontal_1xqfd_gg_",
|
|
51
|
+
"_position_median": "_position_median_1xqfd_gg_",
|
|
52
|
+
"_position_start": "_position_start_1xqfd_gg_",
|
|
53
|
+
"_position_end": "_position_end_1xqfd_gg_",
|
|
54
|
+
"__SShadowVertical": "___SShadowVertical_1xqfd_gg_",
|
|
55
|
+
"__SDropdownMenuItemAddon": "___SDropdownMenuItemAddon_1xqfd_gg_",
|
|
56
|
+
"__SItemContentText": "___SItemContentText_1xqfd_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_1xqfd_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_1xqfd_gg_ .___SShadowHorizontal_1xqfd_gg_:after,.___SDropdownMenuList_1xqfd_gg_ .___SShadowHorizontal_1xqfd_gg_:before{width:16px;height:100%;border-radius:var(--intergalactic-control-rounded, 6px)}.___SDropdownMenuList_1xqfd_gg_ .___SShadowHorizontal_1xqfd_gg_._position_median_1xqfd_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_1xqfd_gg_ .___SShadowHorizontal_1xqfd_gg_._position_median_1xqfd_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_1xqfd_gg_ .___SShadowHorizontal_1xqfd_gg_._position_start_1xqfd_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_1xqfd_gg_ .___SShadowHorizontal_1xqfd_gg_._position_end_1xqfd_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_1xqfd_gg_ .___SShadowVertical_1xqfd_gg_:after,.___SDropdownMenuList_1xqfd_gg_ .___SShadowVertical_1xqfd_gg_:before{width:100%;height:16px;border-radius:var(--intergalactic-control-rounded, 6px)}.___SDropdownMenuList_1xqfd_gg_ .___SShadowVertical_1xqfd_gg_._position_median_1xqfd_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_1xqfd_gg_ .___SShadowVertical_1xqfd_gg_._position_median_1xqfd_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_1xqfd_gg_ .___SShadowVertical_1xqfd_gg_._position_start_1xqfd_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_1xqfd_gg_ .___SShadowVertical_1xqfd_gg_._position_end_1xqfd_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_1xqfd_gg_.__nesting-trigger_1xqfd_gg_{justify-content:space-between}.___SDropdownMenuItemAddon_1xqfd_gg_,.___SItemContentText_1xqfd_gg_{display:inline-flex;margin-left:var(--intergalactic-spacing-1x, 4px);margin-right:var(--intergalactic-spacing-1x, 4px)}.___SDropdownMenuItemAddon_1xqfd_gg_:first-child,.___SItemContentText_1xqfd_gg_:first-child{margin-left:0}.___SDropdownMenuItemAddon_1xqfd_gg_:last-child,.___SItemContentText_1xqfd_gg_:last-child{margin-right:0}.___SDropdownMenuNesting_1xqfd_gg_,.___SDropdownMenuNesting_1xqfd_gg_._size_l_1xqfd_gg_,.___SDropdownMenuNesting_1xqfd_gg_._size_m_1xqfd_gg_{padding:0}.___SDropdownMenuNesting_1xqfd_gg_.__highlighted_1xqfd_gg_{z-index:1;box-shadow:var(--intergalactic-keyboard-focus, 0px 0px 0px 3px rgba(0, 143, 248, 0.5)) inset}.___SDropdownNestingItem_1xqfd_gg_._size_l_1xqfd_gg_,.___SDropdownNestingItem_1xqfd_gg_._size_m_1xqfd_gg_{padding-right:0}.___SDropdownNestingItem_1xqfd_gg_ .___SDropdownMenuItemContainer_1xqfd_gg_{width:auto;padding-top:0;padding-bottom:0;padding-left:0;min-height:auto}.___SItemContent_1xqfd_gg_:focus{outline:0}.___SItemHint_1xqfd_gg_{color:var(--intergalactic-text-secondary, #6c6e79)}" /*__inner_css_end__*/, "1xqfd_gg_") /*__reshadow_css_end__*/, {
|
|
39
|
+
"__SDropdownMenuItemContainer": "___SDropdownMenuItemContainer_1xqfd_gg_",
|
|
40
|
+
"_nesting-trigger": "__nesting-trigger_1xqfd_gg_",
|
|
41
|
+
"__SDropdownMenuNesting": "___SDropdownMenuNesting_1xqfd_gg_",
|
|
42
|
+
"_size_l": "_size_l_1xqfd_gg_",
|
|
43
|
+
"_size_m": "_size_m_1xqfd_gg_",
|
|
44
|
+
"_highlighted": "__highlighted_1xqfd_gg_",
|
|
45
|
+
"__SDropdownNestingItem": "___SDropdownNestingItem_1xqfd_gg_",
|
|
46
|
+
"__SItemContent": "___SItemContent_1xqfd_gg_",
|
|
47
|
+
"__SItemHint": "___SItemHint_1xqfd_gg_",
|
|
48
|
+
"__SDropdownMenuList": "___SDropdownMenuList_1xqfd_gg_",
|
|
49
|
+
"__SShadowHorizontal": "___SShadowHorizontal_1xqfd_gg_",
|
|
50
|
+
"_position_median": "_position_median_1xqfd_gg_",
|
|
51
|
+
"_position_start": "_position_start_1xqfd_gg_",
|
|
52
|
+
"_position_end": "_position_end_1xqfd_gg_",
|
|
53
|
+
"__SShadowVertical": "___SShadowVertical_1xqfd_gg_",
|
|
54
|
+
"__SDropdownMenuItemAddon": "___SDropdownMenuItemAddon_1xqfd_gg_",
|
|
55
|
+
"__SItemContentText": "___SItemContentText_1xqfd_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,23 +1,23 @@
|
|
|
1
1
|
import X from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
2
2
|
import Y from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
3
|
import T from "@babel/runtime/helpers/esm/slicedToArray";
|
|
4
|
-
import
|
|
4
|
+
import O from "@babel/runtime/helpers/esm/extends";
|
|
5
5
|
import u 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
8
|
import V from "@babel/runtime/helpers/esm/assertThisInitialized";
|
|
9
|
-
import
|
|
10
|
-
import
|
|
9
|
+
import w from "@babel/runtime/helpers/esm/get";
|
|
10
|
+
import I from "@babel/runtime/helpers/esm/getPrototypeOf";
|
|
11
11
|
import te from "@babel/runtime/helpers/esm/inherits";
|
|
12
|
-
import
|
|
12
|
+
import re from "@babel/runtime/helpers/esm/createSuper";
|
|
13
13
|
import C from "@babel/runtime/helpers/esm/defineProperty";
|
|
14
|
-
import { sstyled as
|
|
15
|
-
import oe, { assignProps as
|
|
14
|
+
import { sstyled as ne } from "@semcore/utils/lib/core/index";
|
|
15
|
+
import oe, { assignProps as m, sstyled as y } 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 k, { hideScrollBarsFromScreenReadersContext as
|
|
18
|
+
import D, { enhance as ae, selectedIndexContext as W, AbstractDropdown as _e } from "@semcore/dropdown";
|
|
19
|
+
import { useBox as de, Flex as N } from "@semcore/flex-box";
|
|
20
|
+
import k, { hideScrollBarsFromScreenReadersContext as se } from "@semcore/scroll-area";
|
|
21
21
|
import { useUID as le } from "@semcore/utils/lib/uniqueID";
|
|
22
22
|
import { localizedMessages as ge } from "./translations/__intergalactic-dynamic-locales.mjs";
|
|
23
23
|
import { useFocusSource as ue } from "@semcore/utils/lib/enhances/keyboardFocusEnhance";
|
|
@@ -25,76 +25,76 @@ import { isAdvanceMode as A } from "@semcore/utils/lib/findComponent";
|
|
|
25
25
|
import { forkRef as G } from "@semcore/utils/lib/ref";
|
|
26
26
|
import { callAllEventHandlers as E } from "@semcore/utils/lib/assignProps";
|
|
27
27
|
import ce from "@semcore/button";
|
|
28
|
-
import { Text as
|
|
29
|
-
var
|
|
28
|
+
import { Text as fe } from "@semcore/typography";
|
|
29
|
+
var me = ["className"], he = (
|
|
30
30
|
/*__reshadow_css_start__*/
|
|
31
|
-
(
|
|
31
|
+
(ne.insert(
|
|
32
32
|
/*__inner_css_start__*/
|
|
33
|
-
`.
|
|
33
|
+
`.___SDropdownMenuList_1xqfd_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_1xqfd_gg_ .___SShadowHorizontal_1xqfd_gg_:after,.___SDropdownMenuList_1xqfd_gg_ .___SShadowHorizontal_1xqfd_gg_:before{width:16px;height:100%;border-radius:var(--intergalactic-control-rounded, 6px)}.___SDropdownMenuList_1xqfd_gg_ .___SShadowHorizontal_1xqfd_gg_._position_median_1xqfd_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_1xqfd_gg_ .___SShadowHorizontal_1xqfd_gg_._position_median_1xqfd_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_1xqfd_gg_ .___SShadowHorizontal_1xqfd_gg_._position_start_1xqfd_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_1xqfd_gg_ .___SShadowHorizontal_1xqfd_gg_._position_end_1xqfd_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_1xqfd_gg_ .___SShadowVertical_1xqfd_gg_:after,.___SDropdownMenuList_1xqfd_gg_ .___SShadowVertical_1xqfd_gg_:before{width:100%;height:16px;border-radius:var(--intergalactic-control-rounded, 6px)}.___SDropdownMenuList_1xqfd_gg_ .___SShadowVertical_1xqfd_gg_._position_median_1xqfd_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_1xqfd_gg_ .___SShadowVertical_1xqfd_gg_._position_median_1xqfd_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_1xqfd_gg_ .___SShadowVertical_1xqfd_gg_._position_start_1xqfd_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_1xqfd_gg_ .___SShadowVertical_1xqfd_gg_._position_end_1xqfd_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_1xqfd_gg_.__nesting-trigger_1xqfd_gg_{justify-content:space-between}.___SDropdownMenuItemAddon_1xqfd_gg_,.___SItemContentText_1xqfd_gg_{display:inline-flex;margin-left:var(--intergalactic-spacing-1x, 4px);margin-right:var(--intergalactic-spacing-1x, 4px)}.___SDropdownMenuItemAddon_1xqfd_gg_:first-child,.___SItemContentText_1xqfd_gg_:first-child{margin-left:0}.___SDropdownMenuItemAddon_1xqfd_gg_:last-child,.___SItemContentText_1xqfd_gg_:last-child{margin-right:0}.___SDropdownMenuNesting_1xqfd_gg_,.___SDropdownMenuNesting_1xqfd_gg_._size_l_1xqfd_gg_,.___SDropdownMenuNesting_1xqfd_gg_._size_m_1xqfd_gg_{padding:0}.___SDropdownMenuNesting_1xqfd_gg_.__highlighted_1xqfd_gg_{z-index:1;box-shadow:var(--intergalactic-keyboard-focus, 0px 0px 0px 3px rgba(0, 143, 248, 0.5)) inset}.___SDropdownNestingItem_1xqfd_gg_._size_l_1xqfd_gg_,.___SDropdownNestingItem_1xqfd_gg_._size_m_1xqfd_gg_{padding-right:0}.___SDropdownNestingItem_1xqfd_gg_ .___SDropdownMenuItemContainer_1xqfd_gg_{width:auto;padding-top:0;padding-bottom:0;padding-left:0;min-height:auto}.___SItemContent_1xqfd_gg_:focus{outline:0}.___SItemHint_1xqfd_gg_{color:var(--intergalactic-text-secondary, #6c6e79)}`,
|
|
50
|
+
"1xqfd_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_1xqfd_gg_",
|
|
53
|
+
"_nesting-trigger": "__nesting-trigger_1xqfd_gg_",
|
|
54
|
+
__SDropdownMenuNesting: "___SDropdownMenuNesting_1xqfd_gg_",
|
|
55
|
+
_size_l: "_size_l_1xqfd_gg_",
|
|
56
|
+
_size_m: "_size_m_1xqfd_gg_",
|
|
57
|
+
_highlighted: "__highlighted_1xqfd_gg_",
|
|
58
|
+
__SDropdownNestingItem: "___SDropdownNestingItem_1xqfd_gg_",
|
|
59
|
+
__SItemContent: "___SItemContent_1xqfd_gg_",
|
|
60
|
+
__SItemHint: "___SItemHint_1xqfd_gg_",
|
|
61
|
+
__SDropdownMenuList: "___SDropdownMenuList_1xqfd_gg_",
|
|
62
|
+
__SShadowHorizontal: "___SShadowHorizontal_1xqfd_gg_",
|
|
63
|
+
_position_median: "_position_median_1xqfd_gg_",
|
|
64
|
+
_position_start: "_position_start_1xqfd_gg_",
|
|
65
|
+
_position_end: "_position_end_1xqfd_gg_",
|
|
66
|
+
__SShadowVertical: "___SShadowVertical_1xqfd_gg_",
|
|
67
|
+
__SDropdownMenuItemAddon: "___SDropdownMenuItemAddon_1xqfd_gg_",
|
|
68
|
+
__SItemContentText: "___SItemContentText_1xqfd_gg_"
|
|
69
69
|
})
|
|
70
70
|
), U = function(_) {
|
|
71
71
|
var t = _.children;
|
|
72
|
-
return /* @__PURE__ */ i.createElement(
|
|
72
|
+
return /* @__PURE__ */ i.createElement(se.Provider, {
|
|
73
73
|
value: !0
|
|
74
74
|
}, t);
|
|
75
|
-
}, z = /* @__PURE__ */ i.createContext({}), M = /* @__PURE__ */ function(
|
|
76
|
-
te(t,
|
|
77
|
-
var _ =
|
|
75
|
+
}, z = /* @__PURE__ */ i.createContext({}), M = /* @__PURE__ */ function(n) {
|
|
76
|
+
te(t, n);
|
|
77
|
+
var _ = re(t);
|
|
78
78
|
function t() {
|
|
79
79
|
var a;
|
|
80
80
|
Z(this, t);
|
|
81
|
-
for (var
|
|
81
|
+
for (var r = arguments.length, o = new Array(r), e = 0; e < r; e++)
|
|
82
82
|
o[e] = arguments[e];
|
|
83
83
|
return a = _.call.apply(_, [this].concat(o)), C(V(a), "actionsRef", /* @__PURE__ */ i.createRef()), C(V(a), "role", "menu"), a;
|
|
84
84
|
}
|
|
85
85
|
return ee(t, [{
|
|
86
86
|
key: "uncontrolledProps",
|
|
87
87
|
value: function() {
|
|
88
|
-
var
|
|
89
|
-
return u(u({}, I(
|
|
88
|
+
var r = this;
|
|
89
|
+
return u(u({}, w(I(t.prototype), "uncontrolledProps", this).call(this)), {}, {
|
|
90
90
|
visible: [null, function(o) {
|
|
91
91
|
o === !0 && setTimeout(function() {
|
|
92
|
-
var e,
|
|
93
|
-
if (l &&
|
|
94
|
-
|
|
95
|
-
for (var
|
|
96
|
-
if (
|
|
97
|
-
|
|
92
|
+
var e, d, s = (e = r.menuRef.current) === null || e === void 0 ? void 0 : e.querySelectorAll('[role="menuitemcheckbox"], [role="menuitemradio"]'), l = (d = r.menuRef.current) === null || d === void 0 ? void 0 : d.querySelector('[aria-checked="true"]');
|
|
93
|
+
if (l && s && r.asProps.itemsCount === void 0) {
|
|
94
|
+
r.scrollToNode(l, !0);
|
|
95
|
+
for (var f = 0; f < s.length; f++)
|
|
96
|
+
if (s[f] === l) {
|
|
97
|
+
r.handlers.highlightedIndex(f);
|
|
98
98
|
break;
|
|
99
99
|
}
|
|
100
100
|
}
|
|
@@ -104,30 +104,30 @@ var he = ["className"], pe = (
|
|
|
104
104
|
}
|
|
105
105
|
}, {
|
|
106
106
|
key: "itemRef",
|
|
107
|
-
value: function(
|
|
108
|
-
I(
|
|
107
|
+
value: function(r, o, e) {
|
|
108
|
+
w(I(t.prototype), "itemRef", this).call(this, r, o, e), e === document.activeElement && w(I(t.prototype), "scrollToNode", this).call(this, e);
|
|
109
109
|
}
|
|
110
110
|
}, {
|
|
111
111
|
key: "getTriggerProps",
|
|
112
112
|
value: function() {
|
|
113
|
-
var
|
|
114
|
-
return u(u({}, I(
|
|
113
|
+
var r = this.asProps, o = r.Children, e = r.uid, d = r.visible, s = A(o, [v.Menu.displayName]), l = s ? "igc-".concat(e, "-list") : "igc-".concat(e, "-popper");
|
|
114
|
+
return u(u({}, w(I(t.prototype), "getTriggerProps", this).call(this)), {}, {
|
|
115
115
|
onKeyDown: E(this.handlePreventCommonKeyDown.bind(this), this.handleOpenKeyDown.bind(this), this.handleKeyDownForMenu("trigger")),
|
|
116
|
-
"aria-controls":
|
|
117
|
-
"aria-haspopup":
|
|
116
|
+
"aria-controls": d ? l : void 0,
|
|
117
|
+
"aria-haspopup": s ? "true" : "dialog"
|
|
118
118
|
});
|
|
119
119
|
}
|
|
120
120
|
}, {
|
|
121
121
|
key: "getListProps",
|
|
122
122
|
value: function() {
|
|
123
|
-
return u(u({}, I(
|
|
123
|
+
return u(u({}, w(I(t.prototype), "getListProps", this).call(this)), {}, {
|
|
124
124
|
onKeyDown: E(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 u(u({}, I(
|
|
130
|
+
return u(u({}, w(I(t.prototype), "getPopperProps", this).call(this)), {}, {
|
|
131
131
|
onKeyDown: E(this.handlePreventCommonKeyDown.bind(this), this.handlePreventPopperKeyDown.bind(this))
|
|
132
132
|
});
|
|
133
133
|
}
|
|
@@ -141,62 +141,62 @@ var he = ["className"], pe = (
|
|
|
141
141
|
}
|
|
142
142
|
}, {
|
|
143
143
|
key: "getItemProps",
|
|
144
|
-
value: function(
|
|
145
|
-
var e,
|
|
146
|
-
tabIndex:
|
|
147
|
-
ref: function(
|
|
148
|
-
return
|
|
144
|
+
value: function(r, o) {
|
|
145
|
+
var e, d = this, s = this.asProps, l = s.highlightedIndex, f = s.visible, g = (e = r.index) !== null && e !== void 0 ? e : o, h = g === l, c = u(u({}, w(I(t.prototype), "getItemProps", this).call(this, r, g)), {}, {
|
|
146
|
+
tabIndex: h && f ? 0 : -1,
|
|
147
|
+
ref: function(S) {
|
|
148
|
+
return d.itemRef(r, g, S);
|
|
149
149
|
},
|
|
150
150
|
actionsRef: this.actionsRef
|
|
151
151
|
});
|
|
152
|
-
if (
|
|
153
|
-
var
|
|
154
|
-
c.use = (
|
|
152
|
+
if (r.tag === ce) {
|
|
153
|
+
var p, x, b;
|
|
154
|
+
c.use = (p = r.use) !== null && p !== void 0 ? p : "tertiary", c.theme = (x = r.theme) !== null && x !== void 0 ? x : "muted", c.size = (b = r.size) !== null && b !== void 0 ? b : "s";
|
|
155
155
|
}
|
|
156
|
-
return
|
|
157
|
-
|
|
156
|
+
return r.selected && (c["aria-checked"] = !0), w(I(t.prototype), "childRole", this) === "menuitemradio" && (c.onClick = function() {
|
|
157
|
+
d.handlers.visible(!1);
|
|
158
158
|
}), c;
|
|
159
159
|
}
|
|
160
160
|
}, {
|
|
161
161
|
key: "handleKeyDownForMenu",
|
|
162
|
-
value: function(
|
|
162
|
+
value: function(r) {
|
|
163
163
|
var o = this;
|
|
164
164
|
return function(e) {
|
|
165
|
-
var
|
|
166
|
-
if (
|
|
165
|
+
var d, s, l = o.asProps, f = l.visible, g = l.placement, h = l.inlineActions;
|
|
166
|
+
if (r === "list" && !((d = o.menuRef.current) !== null && d !== void 0 && d.contains(e.target)) && !h)
|
|
167
167
|
return e.stopPropagation(), !1;
|
|
168
|
-
var c = e.key === "ArrowRight" && (g == null ? void 0 : g.startsWith("right")) || e.key === "ArrowLeft" && (g == null ? void 0 : g.startsWith("left")),
|
|
169
|
-
if (
|
|
168
|
+
var c = e.key === "ArrowRight" && (g == null ? void 0 : g.startsWith("right")) || e.key === "ArrowLeft" && (g == null ? void 0 : g.startsWith("left")), p = e.key === "ArrowLeft" && (g == null ? void 0 : g.startsWith("right")) || e.key === "ArrowRight" && (g == null ? void 0 : g.startsWith("left")) || e.key === "Escape", x = (s = e.target.getAttribute("role")) === null || s === void 0 ? void 0 : s.startsWith(w(I(t.prototype), "childRole", o));
|
|
169
|
+
if (r === "trigger" && (!f || h) && c && x)
|
|
170
170
|
return o.handlers.visible(!0), o.handlers.highlightedIndex(0), setTimeout(function() {
|
|
171
|
-
var
|
|
172
|
-
(
|
|
171
|
+
var q, S = o.asProps.highlightedIndex;
|
|
172
|
+
(q = o.itemRefs[S]) === null || q === void 0 || q.focus();
|
|
173
173
|
}, 0), e.preventDefault(), e.stopPropagation(), !1;
|
|
174
|
-
if (
|
|
175
|
-
var
|
|
176
|
-
return o.handlers.visible(!1), (
|
|
174
|
+
if (r === "list" && f && p && x && (!h || h && (e.key === "Escape" || o.asProps.highlightedIndex === 0))) {
|
|
175
|
+
var b;
|
|
176
|
+
return o.handlers.visible(!1), (b = o.triggerRef.current) === null || b === void 0 || b.focus(), e.preventDefault(), e.stopPropagation(), !1;
|
|
177
177
|
}
|
|
178
178
|
};
|
|
179
179
|
}
|
|
180
180
|
}, {
|
|
181
181
|
key: "handlePreventTabOnActions",
|
|
182
|
-
value: function(
|
|
183
|
-
if (
|
|
184
|
-
return
|
|
182
|
+
value: function(r) {
|
|
183
|
+
if (r.key === "Tab")
|
|
184
|
+
return r.stopPropagation(), r.preventDefault(), !1;
|
|
185
185
|
}
|
|
186
186
|
}, {
|
|
187
187
|
key: "render",
|
|
188
188
|
value: function() {
|
|
189
|
-
var
|
|
190
|
-
return this.itemProps = [], /* @__PURE__ */ i.createElement(
|
|
191
|
-
value:
|
|
192
|
-
}, /* @__PURE__ */ i.createElement(D,
|
|
193
|
-
timeout: l || (
|
|
194
|
-
},
|
|
189
|
+
var r = this.asProps, o = this.asProps, e = o.Children, d = o.selectedIndex, s = o.interaction, l = o.timeout;
|
|
190
|
+
return this.itemProps = [], /* @__PURE__ */ i.createElement(W.Provider, {
|
|
191
|
+
value: d
|
|
192
|
+
}, /* @__PURE__ */ i.createElement(D, m({
|
|
193
|
+
timeout: l || (s === "hover" ? [0, 100] : void 0)
|
|
194
|
+
}, r), /* @__PURE__ */ i.createElement(e, null)));
|
|
195
195
|
}
|
|
196
196
|
}]), t;
|
|
197
197
|
}(_e);
|
|
198
198
|
C(M, "displayName", "DropdownMenu");
|
|
199
|
-
C(M, "style",
|
|
199
|
+
C(M, "style", he);
|
|
200
200
|
C(M, "enhance", Object.values(ae));
|
|
201
201
|
C(M, "defaultProps", {
|
|
202
202
|
size: "m",
|
|
@@ -214,53 +214,53 @@ C(M, "nestedMenuInteraction", {
|
|
|
214
214
|
trigger: [["onClick", "onMouseEnter"], ["onClick", "onMouseLeave"]],
|
|
215
215
|
popper: [["onMouseEnter"], ["onMouseLeave"]]
|
|
216
216
|
});
|
|
217
|
-
function
|
|
218
|
-
var _ = arguments[0], t, a =
|
|
219
|
-
return t =
|
|
217
|
+
function pe(n) {
|
|
218
|
+
var _ = arguments[0], t, a = n.styles, r = n.Children, o = k;
|
|
219
|
+
return t = y(a), /* @__PURE__ */ i.createElement(U, t.cn("ListBoxContextProvider", {}), /* @__PURE__ */ i.createElement(o, t.cn("SDropdownMenuList", u({}, m({
|
|
220
220
|
shadow: !0
|
|
221
221
|
}, _))), /* @__PURE__ */ i.createElement(k.Container, {
|
|
222
222
|
tabIndex: void 0
|
|
223
|
-
}, /* @__PURE__ */ i.createElement(
|
|
223
|
+
}, /* @__PURE__ */ i.createElement(r, t.cn("Children", {}))), /* @__PURE__ */ i.createElement(k.Bar, {
|
|
224
224
|
orientation: "horizontal"
|
|
225
225
|
}), /* @__PURE__ */ i.createElement(k.Bar, {
|
|
226
226
|
orientation: "vertical"
|
|
227
227
|
})));
|
|
228
228
|
}
|
|
229
|
-
function ve(
|
|
230
|
-
var _ = arguments[0], t, a =
|
|
231
|
-
return t =
|
|
229
|
+
function ve(n) {
|
|
230
|
+
var _ = arguments[0], t, a = n.styles, r = N;
|
|
231
|
+
return t = y(a), /* @__PURE__ */ i.createElement(r, t.cn("SDropdownMenuActions", u({}, m({}, _))));
|
|
232
232
|
}
|
|
233
|
-
function
|
|
234
|
-
var _ = arguments[0], t =
|
|
233
|
+
function xe(n) {
|
|
234
|
+
var _ = arguments[0], t = n.visible, a = n.disablePortal, r = n.ignorePortalsStacking, o = n.disableEnforceFocus, e = n.interaction, d = n.autoFocus, s = n.animationsDisabled, l = {
|
|
235
235
|
visible: t,
|
|
236
236
|
disablePortal: a,
|
|
237
|
-
ignorePortalsStacking:
|
|
237
|
+
ignorePortalsStacking: r,
|
|
238
238
|
disableEnforceFocus: o,
|
|
239
239
|
interaction: e,
|
|
240
|
-
autoFocus:
|
|
241
|
-
animationsDisabled:
|
|
240
|
+
autoFocus: d,
|
|
241
|
+
animationsDisabled: s
|
|
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, O({}, l, {
|
|
244
244
|
role: null
|
|
245
|
-
}), /* @__PURE__ */ i.createElement(v.List,
|
|
245
|
+
}), /* @__PURE__ */ i.createElement(v.List, m({}, _))));
|
|
246
246
|
}
|
|
247
|
-
function
|
|
248
|
-
var _ = arguments[0], t, a =
|
|
247
|
+
function be(n) {
|
|
248
|
+
var _ = arguments[0], t, a = n.id, r = n.styles, o = n.disabled, e = n.Children, d = n.forwardRef, s = n.role, l = n.tabIndex, f = n.actionsRef, g = n["aria-checked"], h = D.Item, c = i.useRef(), p = i.useState(!1), x = T(p, 2), b = x[0], q = x[1], S = {
|
|
249
249
|
contentId: a,
|
|
250
|
-
ref: G(
|
|
251
|
-
role:
|
|
250
|
+
ref: G(d, c),
|
|
251
|
+
role: s,
|
|
252
252
|
tabIndex: l,
|
|
253
253
|
ariaChecked: g
|
|
254
254
|
}, H = [], L = A(e, [v.displayName], !0), K = A(e, [v.Item.Hint.displayName], !0), P = A(e, [v.Item.Content.displayName], !0) || L || K;
|
|
255
255
|
if (K) {
|
|
256
256
|
var F = "igc-".concat(le(), "-option-hint");
|
|
257
|
-
|
|
257
|
+
S.hintId = F, H.push(F);
|
|
258
258
|
}
|
|
259
|
-
L && (
|
|
259
|
+
L && (S.hasSubMenu = !0), S.ariaDescribes = H, i.useEffect(function() {
|
|
260
260
|
var B = function(R) {
|
|
261
|
-
R.target === c.current && (
|
|
261
|
+
R.target === c.current && (q(!0), L && R.stopPropagation());
|
|
262
262
|
}, $ = function(R) {
|
|
263
|
-
R.target === c.current && (
|
|
263
|
+
R.target === c.current && (q(!1), f.current && (c.current.tabIndex = -1));
|
|
264
264
|
};
|
|
265
265
|
return document.addEventListener("focus", B, {
|
|
266
266
|
capture: !0
|
|
@@ -275,112 +275,112 @@ function Se(r) {
|
|
|
275
275
|
};
|
|
276
276
|
}, [c.current]);
|
|
277
277
|
var J = ue();
|
|
278
|
-
return t =
|
|
279
|
-
value:
|
|
280
|
-
}, /* @__PURE__ */ i.createElement(
|
|
281
|
-
ref: P ? void 0 :
|
|
282
|
-
"use:highlighted": !o &&
|
|
283
|
-
"use:role": P ? void 0 :
|
|
278
|
+
return t = y(r), /* @__PURE__ */ i.createElement(z.Provider, {
|
|
279
|
+
value: S
|
|
280
|
+
}, /* @__PURE__ */ i.createElement(h, t.cn("SDropdownMenuItemContainer", u({}, m({
|
|
281
|
+
ref: P ? void 0 : S.ref,
|
|
282
|
+
"use:highlighted": !o && b && J.current === "keyboard",
|
|
283
|
+
"use:role": P ? void 0 : s,
|
|
284
284
|
"use:id": P ? void 0 : a,
|
|
285
285
|
"use:tabIndex": P ? void 0 : l,
|
|
286
286
|
"use:aria-checked": P ? void 0 : g
|
|
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 j(n) {
|
|
290
|
+
var _ = de(n, n.forwardRef), t = T(_, 2), a = t[0], r = t[1], o = r.className, e = Y(r, me), d = y(n.styles);
|
|
291
|
+
return /* @__PURE__ */ i.createElement(a, O({
|
|
292
|
+
className: ie(d.cn("SDropdownMenuItemAddon", n).className, o) || void 0
|
|
293
293
|
}, e));
|
|
294
294
|
}
|
|
295
|
-
function
|
|
296
|
-
var
|
|
297
|
-
return /* @__PURE__ */ i.createElement(D.Trigger,
|
|
295
|
+
function Se() {
|
|
296
|
+
var n = arguments[0];
|
|
297
|
+
return /* @__PURE__ */ i.createElement(D.Trigger, m({}, n));
|
|
298
298
|
}
|
|
299
|
-
function
|
|
300
|
-
var _ = arguments[0], t, a =
|
|
301
|
-
e.hasSubMenu && (
|
|
302
|
-
var
|
|
299
|
+
function we(n) {
|
|
300
|
+
var _ = arguments[0], t, a = n.styles, r = N, o = i.useRef(), e = i.useContext(z), d = void 0;
|
|
301
|
+
e.hasSubMenu && (d = "true");
|
|
302
|
+
var s = i.useState(new Set(e.ariaDescribes)), l = T(s, 2), f = l[0], g = l[1];
|
|
303
303
|
return i.useEffect(function() {
|
|
304
|
-
var
|
|
305
|
-
c.getAttribute("aria-haspopup") === "true" && c.getAttribute("aria-describedby") && g(function(
|
|
306
|
-
return
|
|
304
|
+
var h = o.current, c = h == null ? void 0 : h.parentElement;
|
|
305
|
+
c.getAttribute("aria-haspopup") === "true" && c.getAttribute("aria-describedby") && g(function(p) {
|
|
306
|
+
return p.add(c.getAttribute("aria-describedby")), new Set(p);
|
|
307
307
|
});
|
|
308
|
-
}, [e.ariaDescribes]), t =
|
|
308
|
+
}, [e.ariaDescribes]), t = y(a), /* @__PURE__ */ i.createElement(r, t.cn("SItemContent", u({}, 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(f).join(" "),
|
|
314
314
|
"aria-haspopup": e.hasSubMenu ? "true" : void 0,
|
|
315
|
-
"aria-expanded":
|
|
315
|
+
"aria-expanded": d,
|
|
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
|
|
322
|
-
var _ = arguments[0], t, a =
|
|
323
|
-
return t =
|
|
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
324
|
}
|
|
325
|
-
function
|
|
326
|
-
var _ = arguments[0], t, a =
|
|
327
|
-
return t =
|
|
325
|
+
function ye(n) {
|
|
326
|
+
var _ = arguments[0], t, a = n.styles, r = N, o = i.useContext(z), e = o.hintId;
|
|
327
|
+
return t = y(a), /* @__PURE__ */ i.createElement(r, t.cn("SItemHint", u({}, m({
|
|
328
328
|
id: e,
|
|
329
329
|
"aria-hidden": "true"
|
|
330
330
|
}, _))));
|
|
331
331
|
}
|
|
332
|
-
function De(
|
|
332
|
+
function De(n) {
|
|
333
333
|
var _ = arguments[0], t, a = D.Item;
|
|
334
|
-
return t =
|
|
334
|
+
return t = y(n.styles), /* @__PURE__ */ i.createElement(a, t.cn("SDropdownMenuItemContainer", u({}, m({
|
|
335
335
|
variant: "hint"
|
|
336
336
|
}, _))));
|
|
337
337
|
}
|
|
338
|
-
function
|
|
338
|
+
function qe(n) {
|
|
339
339
|
var _ = arguments[0], t, a = D.Item;
|
|
340
|
-
return t =
|
|
340
|
+
return t = y(n.styles), /* @__PURE__ */ i.createElement(a, t.cn("SDropdownMenuItemContainer", u({}, m({
|
|
341
341
|
variant: "title"
|
|
342
342
|
}, _))));
|
|
343
343
|
}
|
|
344
|
-
function Ce(
|
|
345
|
-
var _ = arguments[0], t =
|
|
346
|
-
return /* @__PURE__ */ i.createElement(v.Item,
|
|
344
|
+
function Ce(n) {
|
|
345
|
+
var _ = arguments[0], t = n.forwardRef;
|
|
346
|
+
return /* @__PURE__ */ i.createElement(v.Item, m({
|
|
347
347
|
ref: t
|
|
348
348
|
}, _));
|
|
349
349
|
}
|
|
350
|
-
function Me(
|
|
351
|
-
var _ = arguments[0], t =
|
|
352
|
-
return /* @__PURE__ */ i.createElement(v.Item.Content,
|
|
350
|
+
function Me(n) {
|
|
351
|
+
var _ = arguments[0], t = n.forwardRef;
|
|
352
|
+
return /* @__PURE__ */ i.createElement(v.Item.Content, m({
|
|
353
353
|
tag: v.Trigger,
|
|
354
354
|
ref: t,
|
|
355
355
|
"use:role": "menuitem"
|
|
356
356
|
}, _));
|
|
357
357
|
}
|
|
358
358
|
var v = oe(M, {
|
|
359
|
-
Trigger:
|
|
359
|
+
Trigger: Se,
|
|
360
360
|
Popper: D.Popper,
|
|
361
|
-
List:
|
|
361
|
+
List: pe,
|
|
362
362
|
Actions: ve,
|
|
363
|
-
Menu:
|
|
364
|
-
Item: [
|
|
365
|
-
Addon:
|
|
366
|
-
Content:
|
|
367
|
-
Text:
|
|
368
|
-
Hint:
|
|
363
|
+
Menu: xe,
|
|
364
|
+
Item: [be, {
|
|
365
|
+
Addon: j,
|
|
366
|
+
Content: we,
|
|
367
|
+
Text: Ie,
|
|
368
|
+
Hint: ye
|
|
369
369
|
}],
|
|
370
370
|
/**
|
|
371
371
|
* @deprecated. Use just Item. See examples on
|
|
372
372
|
*/
|
|
373
373
|
Nesting: [Ce, {
|
|
374
374
|
Trigger: Me,
|
|
375
|
-
Addon:
|
|
375
|
+
Addon: j
|
|
376
376
|
}],
|
|
377
|
-
ItemTitle:
|
|
377
|
+
ItemTitle: qe,
|
|
378
378
|
ItemHint: De,
|
|
379
379
|
Group: D.Group
|
|
380
380
|
}, {
|
|
381
381
|
parent: [D]
|
|
382
382
|
});
|
|
383
|
-
v.selectedIndexContext =
|
|
383
|
+
v.selectedIndexContext = W;
|
|
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.46.
|
|
4
|
+
"version": "4.46.1-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,18 +14,18 @@
|
|
|
14
14
|
"types": "./lib/types/index.d.ts"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@semcore/button": "5.42.
|
|
18
|
-
"@semcore/dropdown": "4.43.
|
|
19
|
-
"@semcore/flex-box": "5.41.
|
|
20
|
-
"@semcore/scroll-area": "5.45.
|
|
21
|
-
"@semcore/utils": "4.48.
|
|
22
|
-
"@semcore/icon": "4.60.
|
|
23
|
-
"@semcore/typography": "5.52.
|
|
24
|
-
"@semcore/popper": "5.46.
|
|
17
|
+
"@semcore/button": "5.42.1-prerelease.2",
|
|
18
|
+
"@semcore/dropdown": "4.43.1-prerelease.2",
|
|
19
|
+
"@semcore/flex-box": "5.41.1-prerelease.2",
|
|
20
|
+
"@semcore/scroll-area": "5.45.1-prerelease.2",
|
|
21
|
+
"@semcore/utils": "4.48.1-prerelease.2",
|
|
22
|
+
"@semcore/icon": "4.60.1-prerelease.2",
|
|
23
|
+
"@semcore/typography": "5.52.1-prerelease.2",
|
|
24
|
+
"@semcore/popper": "5.46.1-prerelease.2",
|
|
25
25
|
"classnames": "2.2.6"
|
|
26
26
|
},
|
|
27
27
|
"peerDependencies": {
|
|
28
|
-
"@semcore/core": "^2.
|
|
28
|
+
"@semcore/core": "^2.39.1-prerelease.2",
|
|
29
29
|
"react": "16.8 - 18",
|
|
30
30
|
"react-dom": "16.8 - 18"
|
|
31
31
|
},
|
|
@@ -39,8 +39,8 @@
|
|
|
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/icon": "4.60.
|
|
43
|
-
"@semcore/button": "5.42.
|
|
42
|
+
"@semcore/icon": "4.60.1-prerelease.2",
|
|
43
|
+
"@semcore/button": "5.42.1-prerelease.2"
|
|
44
44
|
},
|
|
45
45
|
"scripts": {
|
|
46
46
|
"build": "pnpm semcore-builder --source=js && pnpm vite build"
|