@semcore/dropdown-menu 4.45.1 → 4.45.2-prerelease.11

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 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.45.2] - 2025-02-22
6
+
7
+ ### Added
8
+
9
+ - Support for virtual list.
10
+
5
11
  ## [4.45.1] - 2025-02-05
6
12
 
7
13
  ### 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__*/".___SDropdownMenuList_1q7u9_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_1q7u9_gg_ .___SShadowHorizontal_1q7u9_gg_:after,.___SDropdownMenuList_1q7u9_gg_ .___SShadowHorizontal_1q7u9_gg_:before{width:16px;height:100%;border-radius:var(--intergalactic-control-rounded, 6px)}.___SDropdownMenuList_1q7u9_gg_ .___SShadowHorizontal_1q7u9_gg_._position_median_1q7u9_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_1q7u9_gg_ .___SShadowHorizontal_1q7u9_gg_._position_median_1q7u9_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_1q7u9_gg_ .___SShadowHorizontal_1q7u9_gg_._position_start_1q7u9_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_1q7u9_gg_ .___SShadowHorizontal_1q7u9_gg_._position_end_1q7u9_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_1q7u9_gg_ .___SShadowVertical_1q7u9_gg_:after,.___SDropdownMenuList_1q7u9_gg_ .___SShadowVertical_1q7u9_gg_:before{width:100%;height:16px;border-radius:var(--intergalactic-control-rounded, 6px)}.___SDropdownMenuList_1q7u9_gg_ .___SShadowVertical_1q7u9_gg_._position_median_1q7u9_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_1q7u9_gg_ .___SShadowVertical_1q7u9_gg_._position_median_1q7u9_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_1q7u9_gg_ .___SShadowVertical_1q7u9_gg_._position_start_1q7u9_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_1q7u9_gg_ .___SShadowVertical_1q7u9_gg_._position_end_1q7u9_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_1q7u9_gg_.__nesting-trigger_1q7u9_gg_{justify-content:space-between}.___SDropdownMenuItemAddon_1q7u9_gg_,.___SItemContentText_1q7u9_gg_{display:inline-flex;margin-left:var(--intergalactic-spacing-1x, 4px);margin-right:var(--intergalactic-spacing-1x, 4px)}.___SDropdownMenuItemAddon_1q7u9_gg_:first-child,.___SItemContentText_1q7u9_gg_:first-child{margin-left:0}.___SDropdownMenuItemAddon_1q7u9_gg_:last-child,.___SItemContentText_1q7u9_gg_:last-child{margin-right:0}.___SDropdownMenuNesting_1q7u9_gg_,.___SDropdownMenuNesting_1q7u9_gg_._size_l_1q7u9_gg_,.___SDropdownMenuNesting_1q7u9_gg_._size_m_1q7u9_gg_{padding:0}.___SDropdownMenuNesting_1q7u9_gg_.__highlighted_1q7u9_gg_{z-index:1;box-shadow:var(--intergalactic-keyboard-focus, 0px 0px 0px 3px rgba(0, 143, 248, 0.5)) inset}.___SDropdownNestingItem_1q7u9_gg_._size_l_1q7u9_gg_,.___SDropdownNestingItem_1q7u9_gg_._size_m_1q7u9_gg_{padding-right:0}.___SDropdownNestingItem_1q7u9_gg_ .___SDropdownMenuItemContainer_1q7u9_gg_{width:auto;padding-top:0;padding-bottom:0;padding-left:0;min-height:auto}.___SItemContent_1q7u9_gg_:focus{outline:0}.___SItemHint_1q7u9_gg_{color:var(--intergalactic-text-secondary, #6c6e79)}" /*__inner_css_end__*/, "1q7u9_gg_") /*__reshadow_css_end__*/, {
40
- "__SDropdownMenuItemContainer": "___SDropdownMenuItemContainer_1q7u9_gg_",
41
- "_nesting-trigger": "__nesting-trigger_1q7u9_gg_",
42
- "__SDropdownMenuNesting": "___SDropdownMenuNesting_1q7u9_gg_",
43
- "_size_l": "_size_l_1q7u9_gg_",
44
- "_size_m": "_size_m_1q7u9_gg_",
45
- "_highlighted": "__highlighted_1q7u9_gg_",
46
- "__SDropdownNestingItem": "___SDropdownNestingItem_1q7u9_gg_",
47
- "__SItemContent": "___SItemContent_1q7u9_gg_",
48
- "__SItemHint": "___SItemHint_1q7u9_gg_",
49
- "__SDropdownMenuList": "___SDropdownMenuList_1q7u9_gg_",
50
- "__SShadowHorizontal": "___SShadowHorizontal_1q7u9_gg_",
51
- "_position_median": "_position_median_1q7u9_gg_",
52
- "_position_start": "_position_start_1q7u9_gg_",
53
- "_position_end": "_position_end_1q7u9_gg_",
54
- "__SShadowVertical": "___SShadowVertical_1q7u9_gg_",
55
- "__SDropdownMenuItemAddon": "___SDropdownMenuItemAddon_1q7u9_gg_",
56
- "__SItemContentText": "___SItemContentText_1q7u9_gg_"
39
+ var style = ( /*__reshadow_css_start__*/_index.sstyled.insert( /*__inner_css_start__*/".___SDropdownMenuList_1qypv_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_1qypv_gg_ .___SShadowHorizontal_1qypv_gg_:after,.___SDropdownMenuList_1qypv_gg_ .___SShadowHorizontal_1qypv_gg_:before{width:16px;height:100%;border-radius:var(--intergalactic-control-rounded, 6px)}.___SDropdownMenuList_1qypv_gg_ .___SShadowHorizontal_1qypv_gg_._position_median_1qypv_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_1qypv_gg_ .___SShadowHorizontal_1qypv_gg_._position_median_1qypv_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_1qypv_gg_ .___SShadowHorizontal_1qypv_gg_._position_start_1qypv_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_1qypv_gg_ .___SShadowHorizontal_1qypv_gg_._position_end_1qypv_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_1qypv_gg_ .___SShadowVertical_1qypv_gg_:after,.___SDropdownMenuList_1qypv_gg_ .___SShadowVertical_1qypv_gg_:before{width:100%;height:16px;border-radius:var(--intergalactic-control-rounded, 6px)}.___SDropdownMenuList_1qypv_gg_ .___SShadowVertical_1qypv_gg_._position_median_1qypv_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_1qypv_gg_ .___SShadowVertical_1qypv_gg_._position_median_1qypv_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_1qypv_gg_ .___SShadowVertical_1qypv_gg_._position_start_1qypv_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_1qypv_gg_ .___SShadowVertical_1qypv_gg_._position_end_1qypv_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_1qypv_gg_.__nesting-trigger_1qypv_gg_{justify-content:space-between}.___SDropdownMenuItemAddon_1qypv_gg_,.___SItemContentText_1qypv_gg_{display:inline-flex;margin-left:var(--intergalactic-spacing-1x, 4px);margin-right:var(--intergalactic-spacing-1x, 4px)}.___SDropdownMenuItemAddon_1qypv_gg_:first-child,.___SItemContentText_1qypv_gg_:first-child{margin-left:0}.___SDropdownMenuItemAddon_1qypv_gg_:last-child,.___SItemContentText_1qypv_gg_:last-child{margin-right:0}.___SDropdownMenuNesting_1qypv_gg_,.___SDropdownMenuNesting_1qypv_gg_._size_l_1qypv_gg_,.___SDropdownMenuNesting_1qypv_gg_._size_m_1qypv_gg_{padding:0}.___SDropdownMenuNesting_1qypv_gg_.__highlighted_1qypv_gg_{z-index:1;box-shadow:var(--intergalactic-keyboard-focus, 0px 0px 0px 3px rgba(0, 143, 248, 0.5)) inset}.___SDropdownNestingItem_1qypv_gg_._size_l_1qypv_gg_,.___SDropdownNestingItem_1qypv_gg_._size_m_1qypv_gg_{padding-right:0}.___SDropdownNestingItem_1qypv_gg_ .___SDropdownMenuItemContainer_1qypv_gg_{width:auto;padding-top:0;padding-bottom:0;padding-left:0;min-height:auto}.___SItemContent_1qypv_gg_:focus{outline:0}.___SItemHint_1qypv_gg_{color:var(--intergalactic-text-secondary, #6c6e79)}" /*__inner_css_end__*/, "1qypv_gg_") /*__reshadow_css_end__*/, {
40
+ "__SDropdownMenuItemContainer": "___SDropdownMenuItemContainer_1qypv_gg_",
41
+ "_nesting-trigger": "__nesting-trigger_1qypv_gg_",
42
+ "__SDropdownMenuNesting": "___SDropdownMenuNesting_1qypv_gg_",
43
+ "_size_l": "_size_l_1qypv_gg_",
44
+ "_size_m": "_size_m_1qypv_gg_",
45
+ "_highlighted": "__highlighted_1qypv_gg_",
46
+ "__SDropdownNestingItem": "___SDropdownNestingItem_1qypv_gg_",
47
+ "__SItemContent": "___SItemContent_1qypv_gg_",
48
+ "__SItemHint": "___SItemHint_1qypv_gg_",
49
+ "__SDropdownMenuList": "___SDropdownMenuList_1qypv_gg_",
50
+ "__SShadowHorizontal": "___SShadowHorizontal_1qypv_gg_",
51
+ "_position_median": "_position_median_1qypv_gg_",
52
+ "_position_start": "_position_start_1qypv_gg_",
53
+ "_position_end": "_position_end_1qypv_gg_",
54
+ "__SShadowVertical": "___SShadowVertical_1qypv_gg_",
55
+ "__SDropdownMenuItemAddon": "___SDropdownMenuItemAddon_1qypv_gg_",
56
+ "__SItemContentText": "___SItemContentText_1qypv_gg_"
57
57
  });
58
58
  var ListBoxContextProvider = function ListBoxContextProvider(_ref22) {
59
59
  var children = _ref22.children;
@@ -87,8 +87,8 @@ var DropdownMenuRoot = /*#__PURE__*/function (_AbstractDropdown) {
87
87
  var _this2$menuRef$curren, _this2$menuRef$curren2;
88
88
  var options = (_this2$menuRef$curren = _this2.menuRef.current) === null || _this2$menuRef$curren === void 0 ? void 0 : _this2$menuRef$curren.querySelectorAll('[role="menuitemcheckbox"], [role="menuitemradio"]');
89
89
  var selected = (_this2$menuRef$curren2 = _this2.menuRef.current) === null || _this2$menuRef$curren2 === void 0 ? void 0 : _this2$menuRef$curren2.querySelector('[aria-checked="true"]');
90
- if (selected && options) {
91
- _this2.scrollToNode(selected);
90
+ if (selected && options && _this2.asProps.itemsCount === undefined) {
91
+ _this2.scrollToNode(selected, true);
92
92
  for (var i = 0; i < options.length; i++) {
93
93
  if (options[i] === selected) {
94
94
  _this2.handlers.highlightedIndex(i);
@@ -151,15 +151,17 @@ var DropdownMenuRoot = /*#__PURE__*/function (_AbstractDropdown) {
151
151
  }, {
152
152
  key: "getItemProps",
153
153
  value: function getItemProps(props, index) {
154
- var _this3 = this;
154
+ var _props$index,
155
+ _this3 = this;
155
156
  var _this$asProps2 = this.asProps,
156
157
  highlightedIndex = _this$asProps2.highlightedIndex,
157
158
  visible = _this$asProps2.visible;
158
- var isHighlighted = index === highlightedIndex;
159
- var itemProps = (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, (0, _get2["default"])((0, _getPrototypeOf2["default"])(DropdownMenuRoot.prototype), "getItemProps", this).call(this, props, index)), {}, {
159
+ var realIndex = (_props$index = props.index) !== null && _props$index !== void 0 ? _props$index : index;
160
+ var isHighlighted = realIndex === highlightedIndex;
161
+ var itemProps = (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, (0, _get2["default"])((0, _getPrototypeOf2["default"])(DropdownMenuRoot.prototype), "getItemProps", this).call(this, props, realIndex)), {}, {
160
162
  tabIndex: isHighlighted && visible ? 0 : -1,
161
163
  ref: function ref(node) {
162
- return _this3.itemRef(props, index, node);
164
+ return _this3.itemRef(props, realIndex, node);
163
165
  },
164
166
  actionsRef: this.actionsRef
165
167
  });
@@ -1 +1 @@
1
- {"version":3,"file":"DropdownMenu.js","names":["_core","_interopRequireWildcard","require","_react","_interopRequireDefault","_classnames","_dropdown","_flexBox","_scrollArea","_uniqueID","_intergalacticDynamicLocales","_keyboardFocusEnhance","_findComponent","_ref31","_assignProps14","_button","_typography","_excluded","style","_index","sstyled","insert","ListBoxContextProvider","_ref22","children","createElement","hideScrollBarsFromScreenReadersContext","Provider","value","menuItemContext","React","createContext","DropdownMenuRoot","_AbstractDropdown","_inherits2","_super","_createSuper2","_this","_classCallCheck2","_len","arguments","length","args","Array","_key","call","apply","concat","_defineProperty2","_assertThisInitialized2","createRef","_createClass2","key","uncontrolledProps","_this2","_objectSpread2","_get2","_getPrototypeOf2","prototype","visible","setTimeout","_this2$menuRef$curren","_this2$menuRef$curren2","options","menuRef","current","querySelectorAll","selected","querySelector","scrollToNode","i","handlers","highlightedIndex","itemRef","props","index","node","document","activeElement","getTriggerProps","_this$asProps","asProps","Children","uid","hasMenu","isAdvanceMode","DropdownMenu","Menu","displayName","ariaControls","onKeyDown","callAllEventHandlers","handlePreventCommonKeyDown","bind","handleOpenKeyDown","handleKeyDownForMenu","undefined","getListProps","handleArrowKeyDown","getPopperProps","handlePreventPopperKeyDown","getActionsProps","ref","actionsRef","handlePreventTabOnActions","getItemProps","_this3","_this$asProps2","isHighlighted","itemProps","tabIndex","tag","ButtonComponent","_props$use","_props$theme","_props$size","use","theme","size","onClick","place","_this4","e","_this4$menuRef$curren","_e$target$getAttribut","_this4$asProps","placement","inlineActions","contains","target","stopPropagation","show","startsWith","hide","isMenuItem","getAttribute","_this4$itemRefs$highl","itemRefs","focus","preventDefault","_this4$triggerRef$cur","triggerRef","render","_ref","_this$asProps3","selectedIndex","interaction","timeout","selectedIndexContext","Dropdown","assignProps","AbstractDropdown","Object","values","enhance","defaultVisible","defaultHighlightedIndex","defaultSelectedIndex","i18n","localizedMessages","locale","trigger","popper","List","_ref23","_ref2","arguments[0]","_ref14","styles","SDropdownMenuList","ScrollAreaComponent","cn","Container","Bar","orientation","Actions","_ref24","_ref3","_ref15","SDropdownMenuActions","Flex","_ref4","disablePortal","ignorePortalsStacking","disableEnforceFocus","autoFocus","animationsDisabled","popperProps","Popper","_extends2","role","Item","_ref25","_ref5","_ref16","id","disabled","forwardRef","ariaChecked","SDropdownMenuItemContainer","useRef","_React$useState","useState","_React$useState2","_slicedToArray2","highlighted","setHighlighted","menuItemContextValue","contentId","forkRef","ariaDescribes","hasSubMenu","hasHint","Hint","advancedMode","Content","hintId","useUID","push","useEffect","onFocus","onBlur","addEventListener","capture","removeEventListener","focusSourceRef","useFocusSource","Addon","_useBox","useBox","_useBox2","SDropdownMenuItemAddon","_useBox2$","className","other","_objectWithoutProperties2","Trigger","_ref6","ItemContent","_ref26","_ref7","_ref17","SItemContent","menuItemCtxValue","useContext","subMenu","_React$useState3","Set","_React$useState4","describedby","setDescribedby","element","parent","parentElement","prev","add","_toConsumableArray2","join","ItemContentText","_ref27","_ref8","_ref18","SItemContentText","Text","ItemHint","_ref28","_ref9","_ref19","SItemHint","_React$useContext","_ref10","_ref20","Title","_ref11","_ref21","Nesting","_ref29","_ref12","NestingTrigger","_ref30","_ref13","createComponent","ItemTitle","Group","_default","exports"],"sources":["../../src/DropdownMenu.jsx"],"sourcesContent":["import React from 'react';\nimport cn from 'classnames';\nimport createComponent, { sstyled, Root } from '@semcore/core';\nimport Dropdown, { AbstractDropdown, selectedIndexContext, enhance } from '@semcore/dropdown';\nimport { Flex, useBox } from '@semcore/flex-box';\nimport ScrollAreaComponent, { hideScrollBarsFromScreenReadersContext } from '@semcore/scroll-area';\nimport { useUID } from '@semcore/utils/lib/uniqueID';\nimport { localizedMessages } from './translations/__intergalactic-dynamic-locales';\nimport style from './style/dropdown-menu.shadow.css';\nimport { useFocusSource } from '@semcore/utils/lib/enhances/keyboardFocusEnhance';\nimport { isAdvanceMode } from '@semcore/utils/lib/findComponent';\nimport { forkRef } from '@semcore/utils/lib/ref';\nimport { callAllEventHandlers } from '@semcore/utils/lib/assignProps';\nimport ButtonComponent from '@semcore/button';\nimport { Text } from '@semcore/typography';\n\nconst ListBoxContextProvider = ({ children }) => (\n <hideScrollBarsFromScreenReadersContext.Provider value={true}>\n {children}\n </hideScrollBarsFromScreenReadersContext.Provider>\n);\n\nconst menuItemContext = React.createContext({});\n\nclass DropdownMenuRoot extends AbstractDropdown {\n static displayName = 'DropdownMenu';\n static style = style;\n static enhance = Object.values(enhance);\n\n static defaultProps = {\n size: 'm',\n defaultVisible: false,\n defaultHighlightedIndex: 0,\n defaultSelectedIndex: 0,\n i18n: localizedMessages,\n locale: 'en',\n interaction: 'click',\n inlineActions: false,\n placement: 'bottom-start',\n timeout: 0,\n };\n\n static nestedMenuInteraction = {\n trigger: [\n ['onClick', 'onMouseEnter'],\n ['onClick', 'onMouseLeave'],\n ],\n popper: [['onMouseEnter'], ['onMouseLeave']],\n };\n\n actionsRef = React.createRef();\n role = 'menu';\n\n uncontrolledProps() {\n return {\n ...super.uncontrolledProps(),\n visible: [\n null,\n (visible) => {\n if (visible === true) {\n setTimeout(() => {\n const options = this.menuRef.current?.querySelectorAll(\n '[role=\"menuitemcheckbox\"], [role=\"menuitemradio\"]',\n );\n const selected = this.menuRef.current?.querySelector('[aria-checked=\"true\"]');\n\n if (selected && options) {\n this.scrollToNode(selected);\n\n for (let i = 0; i < options.length; i++) {\n if (options[i] === selected) {\n this.handlers.highlightedIndex(i);\n break;\n }\n }\n }\n // for some reason, Google Chrome optimizes this timeout with 0 value with previous render (when we set aria-selected)\n // and that's why its skip scrollToNodes. We selected the appropriate timeout manually.\n }, 30);\n }\n },\n ],\n };\n }\n\n itemRef(props, index, node) {\n super.itemRef(props, index, node);\n\n if (node === document.activeElement) {\n super.scrollToNode(node);\n }\n }\n\n getTriggerProps() {\n const { Children, uid, visible } = this.asProps;\n const hasMenu = isAdvanceMode(Children, [DropdownMenu.Menu.displayName]);\n const ariaControls = hasMenu ? `igc-${uid}-list` : `igc-${uid}-popper`;\n\n return {\n ...super.getTriggerProps(),\n onKeyDown: callAllEventHandlers(\n this.handlePreventCommonKeyDown.bind(this),\n this.handleOpenKeyDown.bind(this),\n this.handleKeyDownForMenu('trigger'),\n ),\n 'aria-controls': visible ? ariaControls : undefined,\n 'aria-haspopup': hasMenu ? 'true' : 'dialog',\n };\n }\n\n getListProps() {\n return {\n ...super.getListProps(),\n onKeyDown: callAllEventHandlers(\n this.handlePreventCommonKeyDown.bind(this),\n this.handleKeyDownForMenu('list'),\n this.handleArrowKeyDown.bind(this),\n ),\n };\n }\n\n getPopperProps() {\n return {\n ...super.getPopperProps(),\n onKeyDown: callAllEventHandlers(\n this.handlePreventCommonKeyDown.bind(this),\n this.handlePreventPopperKeyDown.bind(this),\n ),\n };\n }\n\n getActionsProps() {\n return {\n ...this.getListProps(),\n ref: this.actionsRef,\n onKeyDown: callAllEventHandlers(\n this.handlePreventTabOnActions.bind(this),\n this.handlePreventCommonKeyDown.bind(this),\n this.handleKeyDownForMenu('list'),\n this.handleArrowKeyDown.bind(this),\n ),\n };\n }\n\n getItemProps(props, index) {\n const { highlightedIndex, visible } = this.asProps;\n const isHighlighted = index === highlightedIndex;\n const itemProps = {\n ...super.getItemProps(props, index),\n tabIndex: isHighlighted && visible ? 0 : -1,\n ref: (node) => this.itemRef(props, index, node),\n actionsRef: this.actionsRef,\n };\n\n if (props.tag === ButtonComponent) {\n itemProps.use = props.use ?? 'tertiary';\n itemProps.theme = props.theme ?? 'muted';\n itemProps.size = props.size ?? 's';\n }\n\n if (props.selected) {\n itemProps['aria-checked'] = true;\n }\n\n if (super.childRole === 'menuitemradio') {\n itemProps.onClick = () => {\n this.handlers.visible(false);\n };\n }\n\n return itemProps;\n }\n\n handleKeyDownForMenu(place) {\n return (e) => {\n const { visible, placement, inlineActions } = this.asProps;\n\n // stop propagation keyboard events if it calls not on DropdownMenu.Items\n if (place === 'list' && !this.menuRef.current?.contains(e.target) && !inlineActions) {\n e.stopPropagation();\n return false;\n }\n\n const show =\n (e.key === 'ArrowRight' && placement?.startsWith('right')) ||\n (e.key === 'ArrowLeft' && placement?.startsWith('left'));\n const hide =\n (e.key === 'ArrowLeft' && placement?.startsWith('right')) ||\n (e.key === 'ArrowRight' && placement?.startsWith('left')) ||\n e.key === 'Escape';\n const isMenuItem = e.target.getAttribute('role')?.startsWith(super.childRole);\n\n if (place === 'trigger' && (!visible || inlineActions) && show && isMenuItem) {\n this.handlers.visible(true);\n this.handlers.highlightedIndex(0);\n setTimeout(() => {\n const { highlightedIndex } = this.asProps;\n this.itemRefs[highlightedIndex]?.focus();\n }, 0);\n\n e.preventDefault();\n e.stopPropagation();\n return false;\n }\n if (place === 'list' && visible && hide && isMenuItem) {\n if (\n !inlineActions ||\n (inlineActions && (e.key === 'Escape' || this.asProps.highlightedIndex === 0))\n ) {\n this.handlers.visible(false);\n this.triggerRef.current?.focus();\n\n e.preventDefault();\n e.stopPropagation();\n return false;\n }\n }\n };\n }\n\n handlePreventTabOnActions(e) {\n if (e.key === 'Tab') {\n e.stopPropagation();\n e.preventDefault();\n return false;\n }\n }\n\n render() {\n const { Children, selectedIndex, interaction, timeout } = this.asProps;\n\n this.itemProps = [];\n\n return (\n <selectedIndexContext.Provider value={selectedIndex}>\n <Root\n render={Dropdown}\n timeout={timeout || (interaction === 'hover' ? [0, 100] : undefined)}\n >\n <Children />\n </Root>\n </selectedIndexContext.Provider>\n );\n }\n}\n\nfunction List({ styles, Children }) {\n const SDropdownMenuList = Root;\n\n return sstyled(styles)(\n <ListBoxContextProvider>\n <SDropdownMenuList render={ScrollAreaComponent} shadow={true}>\n <ScrollAreaComponent.Container tabIndex={undefined}>\n <Children />\n </ScrollAreaComponent.Container>\n <ScrollAreaComponent.Bar orientation='horizontal' />\n <ScrollAreaComponent.Bar orientation='vertical' />\n </SDropdownMenuList>\n </ListBoxContextProvider>,\n );\n}\nfunction Actions({ styles }) {\n const SDropdownMenuActions = Root;\n\n return sstyled(styles)(<SDropdownMenuActions render={Flex} />);\n}\n\nfunction Menu(props) {\n const {\n visible,\n disablePortal,\n ignorePortalsStacking,\n disableEnforceFocus,\n interaction,\n autoFocus,\n animationsDisabled,\n } = props;\n const popperProps = {\n visible,\n disablePortal,\n ignorePortalsStacking,\n disableEnforceFocus,\n interaction,\n autoFocus,\n animationsDisabled,\n };\n return (\n <ListBoxContextProvider>\n <DropdownMenu.Popper {...popperProps} role={null}>\n <Root render={DropdownMenu.List} />\n </DropdownMenu.Popper>\n </ListBoxContextProvider>\n );\n}\n\nfunction Item({\n id,\n styles,\n disabled,\n Children,\n forwardRef,\n role,\n tabIndex,\n actionsRef,\n 'aria-checked': ariaChecked,\n}) {\n const SDropdownMenuItemContainer = Root;\n const itemRef = React.useRef();\n\n const [highlighted, setHighlighted] = React.useState(false);\n\n const menuItemContextValue = {\n contentId: id,\n ref: forkRef(forwardRef, itemRef),\n role,\n tabIndex,\n ariaChecked,\n };\n const ariaDescribes = [];\n\n const hasSubMenu = isAdvanceMode(Children, [DropdownMenu.displayName], true);\n const hasHint = isAdvanceMode(Children, [DropdownMenu.Item.Hint.displayName], true);\n const advancedMode =\n isAdvanceMode(Children, [DropdownMenu.Item.Content.displayName], true) || hasSubMenu || hasHint;\n\n if (hasHint) {\n const hintId = `igc-${useUID()}-option-hint`;\n\n menuItemContextValue.hintId = hintId;\n ariaDescribes.push(hintId);\n }\n\n if (hasSubMenu) {\n menuItemContextValue.hasSubMenu = true;\n }\n\n menuItemContextValue.ariaDescribes = ariaDescribes;\n\n React.useEffect(() => {\n const onFocus = (e) => {\n if (e.target === itemRef.current) {\n setHighlighted(true);\n\n if (hasSubMenu) {\n e.stopPropagation();\n }\n }\n };\n const onBlur = (e) => {\n if (e.target === itemRef.current) {\n setHighlighted(false);\n\n if (actionsRef.current) {\n itemRef.current.tabIndex = -1;\n }\n }\n };\n\n document.addEventListener('focus', onFocus, { capture: true });\n document.addEventListener('blur', onBlur, { capture: true });\n\n return () => {\n document.removeEventListener('focus', onFocus, { capture: true });\n document.removeEventListener('blur', onBlur, { capture: true });\n };\n }, [itemRef.current]);\n\n const focusSourceRef = useFocusSource();\n\n return sstyled(styles)(\n <menuItemContext.Provider value={menuItemContextValue}>\n <SDropdownMenuItemContainer\n render={Dropdown.Item}\n ref={advancedMode ? undefined : menuItemContextValue.ref}\n use:highlighted={!disabled && highlighted && focusSourceRef.current === 'keyboard'}\n use:role={advancedMode ? undefined : role}\n use:id={advancedMode ? undefined : id}\n use:tabIndex={advancedMode ? undefined : tabIndex}\n use:aria-checked={advancedMode ? undefined : ariaChecked}\n >\n <Children />\n </SDropdownMenuItemContainer>\n </menuItemContext.Provider>,\n );\n}\n\nfunction Addon(props) {\n const [SDropdownMenuItemAddon, { className, ...other }] = useBox(props, props.forwardRef);\n const styles = sstyled(props.styles);\n return (\n <SDropdownMenuItemAddon\n className={cn(styles.cn('SDropdownMenuItemAddon', props).className, className) || undefined}\n {...other}\n />\n );\n}\n\nfunction Trigger() {\n return <Root render={Dropdown.Trigger} />;\n}\n\nfunction ItemContent({ styles }) {\n const SItemContent = Root;\n const ref = React.useRef();\n const menuItemCtxValue = React.useContext(menuItemContext);\n\n let subMenu = undefined;\n\n if (menuItemCtxValue.hasSubMenu) {\n subMenu = 'true';\n }\n\n const [describedby, setDescribedby] = React.useState(new Set(menuItemCtxValue.ariaDescribes));\n\n React.useEffect(() => {\n const element = ref.current;\n const parent = element?.parentElement;\n\n if (\n parent.getAttribute('aria-haspopup') === 'true' &&\n parent.getAttribute('aria-describedby')\n ) {\n setDescribedby((prev) => {\n prev.add(parent.getAttribute('aria-describedby'));\n\n return new Set(prev);\n });\n }\n }, [menuItemCtxValue.ariaDescribes]);\n\n return sstyled(styles)(\n <SItemContent\n render={Flex}\n role={menuItemCtxValue.role}\n id={menuItemCtxValue.contentId}\n tabIndex={menuItemCtxValue.tabIndex}\n ref={forkRef(menuItemCtxValue.ref, ref)}\n use:aria-describedby={[...describedby].join(' ')}\n aria-haspopup={menuItemCtxValue.hasSubMenu ? 'true' : undefined}\n aria-expanded={subMenu}\n aria-checked={menuItemCtxValue.ariaChecked}\n alignItems='center'\n justifyContent={menuItemCtxValue.hasSubMenu ? 'space-between' : undefined}\n />,\n );\n}\n\nfunction ItemContentText({ styles }) {\n const SItemContentText = Root;\n return sstyled(styles)(<SItemContentText render={Text} />);\n}\n\nfunction ItemHint({ styles }) {\n const SItemHint = Root;\n const { hintId } = React.useContext(menuItemContext);\n\n return sstyled(styles)(<SItemHint render={Flex} id={hintId} aria-hidden={'true'} />);\n}\n\n/**\n * @deprecated Use Item hint\n */\nfunction Hint(props) {\n const SDropdownMenuItemContainer = Root;\n return sstyled(props.styles)(\n <SDropdownMenuItemContainer render={Dropdown.Item} variant='hint' />,\n );\n}\n/**\n * @deprecated Use Group with title prop\n */\nfunction Title(props) {\n const SDropdownMenuItemContainer = Root;\n return sstyled(props.styles)(\n <SDropdownMenuItemContainer render={Dropdown.Item} variant='title' />,\n );\n}\n\n/**\n * @deprecated\n */\nfunction Nesting({ forwardRef }) {\n return <Root render={DropdownMenu.Item} ref={forwardRef} />;\n}\n\n/**\n * @deprecated\n */\nfunction NestingTrigger({ forwardRef }) {\n return (\n <Root\n render={DropdownMenu.Item.Content}\n tag={DropdownMenu.Trigger}\n ref={forwardRef}\n use:role={'menuitem'}\n />\n );\n}\n\nconst DropdownMenu = createComponent(\n DropdownMenuRoot,\n {\n Trigger,\n Popper: Dropdown.Popper,\n List,\n Actions,\n Menu,\n Item: [Item, { Addon, Content: ItemContent, Text: ItemContentText, Hint: ItemHint }],\n /**\n * @deprecated. Use just Item. See examples on\n */\n Nesting: [Nesting, { Trigger: NestingTrigger, Addon }],\n ItemTitle: Title,\n ItemHint: Hint,\n Group: Dropdown.Group,\n },\n {\n parent: [Dropdown],\n },\n);\n\nDropdownMenu.selectedIndexContext = selectedIndexContext;\n\nexport default DropdownMenu;\n"],"mappings":";;;;;;;;;;;;;;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"}
1
+ {"version":3,"file":"DropdownMenu.js","names":["_core","_interopRequireWildcard","require","_react","_interopRequireDefault","_classnames","_dropdown","_flexBox","_scrollArea","_uniqueID","_intergalacticDynamicLocales","_keyboardFocusEnhance","_findComponent","_ref31","_assignProps14","_button","_typography","_excluded","style","_index","sstyled","insert","ListBoxContextProvider","_ref22","children","createElement","hideScrollBarsFromScreenReadersContext","Provider","value","menuItemContext","React","createContext","DropdownMenuRoot","_AbstractDropdown","_inherits2","_super","_createSuper2","_this","_classCallCheck2","_len","arguments","length","args","Array","_key","call","apply","concat","_defineProperty2","_assertThisInitialized2","createRef","_createClass2","key","uncontrolledProps","_this2","_objectSpread2","_get2","_getPrototypeOf2","prototype","visible","setTimeout","_this2$menuRef$curren","_this2$menuRef$curren2","options","menuRef","current","querySelectorAll","selected","querySelector","asProps","itemsCount","undefined","scrollToNode","i","handlers","highlightedIndex","itemRef","props","index","node","document","activeElement","getTriggerProps","_this$asProps","Children","uid","hasMenu","isAdvanceMode","DropdownMenu","Menu","displayName","ariaControls","onKeyDown","callAllEventHandlers","handlePreventCommonKeyDown","bind","handleOpenKeyDown","handleKeyDownForMenu","getListProps","handleArrowKeyDown","getPopperProps","handlePreventPopperKeyDown","getActionsProps","ref","actionsRef","handlePreventTabOnActions","getItemProps","_props$index","_this3","_this$asProps2","realIndex","isHighlighted","itemProps","tabIndex","tag","ButtonComponent","_props$use","_props$theme","_props$size","use","theme","size","onClick","place","_this4","e","_this4$menuRef$curren","_e$target$getAttribut","_this4$asProps","placement","inlineActions","contains","target","stopPropagation","show","startsWith","hide","isMenuItem","getAttribute","_this4$itemRefs$highl","itemRefs","focus","preventDefault","_this4$triggerRef$cur","triggerRef","render","_ref","_this$asProps3","selectedIndex","interaction","timeout","selectedIndexContext","Dropdown","assignProps","AbstractDropdown","Object","values","enhance","defaultVisible","defaultHighlightedIndex","defaultSelectedIndex","i18n","localizedMessages","locale","trigger","popper","List","_ref23","_ref2","arguments[0]","_ref14","styles","SDropdownMenuList","ScrollAreaComponent","cn","Container","Bar","orientation","Actions","_ref24","_ref3","_ref15","SDropdownMenuActions","Flex","_ref4","disablePortal","ignorePortalsStacking","disableEnforceFocus","autoFocus","animationsDisabled","popperProps","Popper","_extends2","role","Item","_ref25","_ref5","_ref16","id","disabled","forwardRef","ariaChecked","SDropdownMenuItemContainer","useRef","_React$useState","useState","_React$useState2","_slicedToArray2","highlighted","setHighlighted","menuItemContextValue","contentId","forkRef","ariaDescribes","hasSubMenu","hasHint","Hint","advancedMode","Content","hintId","useUID","push","useEffect","onFocus","onBlur","addEventListener","capture","removeEventListener","focusSourceRef","useFocusSource","Addon","_useBox","useBox","_useBox2","SDropdownMenuItemAddon","_useBox2$","className","other","_objectWithoutProperties2","Trigger","_ref6","ItemContent","_ref26","_ref7","_ref17","SItemContent","menuItemCtxValue","useContext","subMenu","_React$useState3","Set","_React$useState4","describedby","setDescribedby","element","parent","parentElement","prev","add","_toConsumableArray2","join","ItemContentText","_ref27","_ref8","_ref18","SItemContentText","Text","ItemHint","_ref28","_ref9","_ref19","SItemHint","_React$useContext","_ref10","_ref20","Title","_ref11","_ref21","Nesting","_ref29","_ref12","NestingTrigger","_ref30","_ref13","createComponent","ItemTitle","Group","_default","exports"],"sources":["../../src/DropdownMenu.jsx"],"sourcesContent":["import React from 'react';\nimport cn from 'classnames';\nimport createComponent, { sstyled, Root } from '@semcore/core';\nimport Dropdown, { AbstractDropdown, selectedIndexContext, enhance } from '@semcore/dropdown';\nimport { Flex, useBox } from '@semcore/flex-box';\nimport ScrollAreaComponent, { hideScrollBarsFromScreenReadersContext } from '@semcore/scroll-area';\nimport { useUID } from '@semcore/utils/lib/uniqueID';\nimport { localizedMessages } from './translations/__intergalactic-dynamic-locales';\nimport style from './style/dropdown-menu.shadow.css';\nimport { useFocusSource } from '@semcore/utils/lib/enhances/keyboardFocusEnhance';\nimport { isAdvanceMode } from '@semcore/utils/lib/findComponent';\nimport { forkRef } from '@semcore/utils/lib/ref';\nimport { callAllEventHandlers } from '@semcore/utils/lib/assignProps';\nimport ButtonComponent from '@semcore/button';\nimport { Text } from '@semcore/typography';\n\nconst ListBoxContextProvider = ({ children }) => (\n <hideScrollBarsFromScreenReadersContext.Provider value={true}>\n {children}\n </hideScrollBarsFromScreenReadersContext.Provider>\n);\n\nconst menuItemContext = React.createContext({});\n\nclass DropdownMenuRoot extends AbstractDropdown {\n static displayName = 'DropdownMenu';\n static style = style;\n static enhance = Object.values(enhance);\n\n static defaultProps = {\n size: 'm',\n defaultVisible: false,\n defaultHighlightedIndex: 0,\n defaultSelectedIndex: 0,\n i18n: localizedMessages,\n locale: 'en',\n interaction: 'click',\n inlineActions: false,\n placement: 'bottom-start',\n timeout: 0,\n };\n\n static nestedMenuInteraction = {\n trigger: [\n ['onClick', 'onMouseEnter'],\n ['onClick', 'onMouseLeave'],\n ],\n popper: [['onMouseEnter'], ['onMouseLeave']],\n };\n\n actionsRef = React.createRef();\n role = 'menu';\n\n uncontrolledProps() {\n return {\n ...super.uncontrolledProps(),\n visible: [\n null,\n (visible) => {\n if (visible === true) {\n setTimeout(() => {\n const options = this.menuRef.current?.querySelectorAll(\n '[role=\"menuitemcheckbox\"], [role=\"menuitemradio\"]',\n );\n const selected = this.menuRef.current?.querySelector('[aria-checked=\"true\"]');\n\n if (selected && options && this.asProps.itemsCount === undefined) {\n this.scrollToNode(selected, true);\n\n for (let i = 0; i < options.length; i++) {\n if (options[i] === selected) {\n this.handlers.highlightedIndex(i);\n break;\n }\n }\n }\n // for some reason, Google Chrome optimizes this timeout with 0 value with previous render (when we set aria-selected)\n // and that's why its skip scrollToNodes. We selected the appropriate timeout manually.\n }, 30);\n }\n },\n ],\n };\n }\n\n itemRef(props, index, node) {\n super.itemRef(props, index, node);\n\n if (node === document.activeElement) {\n super.scrollToNode(node);\n }\n }\n\n getTriggerProps() {\n const { Children, uid, visible } = this.asProps;\n const hasMenu = isAdvanceMode(Children, [DropdownMenu.Menu.displayName]);\n const ariaControls = hasMenu ? `igc-${uid}-list` : `igc-${uid}-popper`;\n\n return {\n ...super.getTriggerProps(),\n onKeyDown: callAllEventHandlers(\n this.handlePreventCommonKeyDown.bind(this),\n this.handleOpenKeyDown.bind(this),\n this.handleKeyDownForMenu('trigger'),\n ),\n 'aria-controls': visible ? ariaControls : undefined,\n 'aria-haspopup': hasMenu ? 'true' : 'dialog',\n };\n }\n\n getListProps() {\n return {\n ...super.getListProps(),\n onKeyDown: callAllEventHandlers(\n this.handlePreventCommonKeyDown.bind(this),\n this.handleKeyDownForMenu('list'),\n this.handleArrowKeyDown.bind(this),\n ),\n };\n }\n\n getPopperProps() {\n return {\n ...super.getPopperProps(),\n onKeyDown: callAllEventHandlers(\n this.handlePreventCommonKeyDown.bind(this),\n this.handlePreventPopperKeyDown.bind(this),\n ),\n };\n }\n\n getActionsProps() {\n return {\n ...this.getListProps(),\n ref: this.actionsRef,\n onKeyDown: callAllEventHandlers(\n this.handlePreventTabOnActions.bind(this),\n this.handlePreventCommonKeyDown.bind(this),\n this.handleKeyDownForMenu('list'),\n this.handleArrowKeyDown.bind(this),\n ),\n };\n }\n\n getItemProps(props, index) {\n const { highlightedIndex, visible } = this.asProps;\n const realIndex = props.index ?? index;\n const isHighlighted = realIndex === highlightedIndex;\n const itemProps = {\n ...super.getItemProps(props, realIndex),\n tabIndex: isHighlighted && visible ? 0 : -1,\n ref: (node) => this.itemRef(props, realIndex, node),\n actionsRef: this.actionsRef,\n };\n\n if (props.tag === ButtonComponent) {\n itemProps.use = props.use ?? 'tertiary';\n itemProps.theme = props.theme ?? 'muted';\n itemProps.size = props.size ?? 's';\n }\n\n if (props.selected) {\n itemProps['aria-checked'] = true;\n }\n\n if (super.childRole === 'menuitemradio') {\n itemProps.onClick = () => {\n this.handlers.visible(false);\n };\n }\n\n return itemProps;\n }\n\n handleKeyDownForMenu(place) {\n return (e) => {\n const { visible, placement, inlineActions } = this.asProps;\n\n // stop propagation keyboard events if it calls not on DropdownMenu.Items\n if (place === 'list' && !this.menuRef.current?.contains(e.target) && !inlineActions) {\n e.stopPropagation();\n return false;\n }\n\n const show =\n (e.key === 'ArrowRight' && placement?.startsWith('right')) ||\n (e.key === 'ArrowLeft' && placement?.startsWith('left'));\n const hide =\n (e.key === 'ArrowLeft' && placement?.startsWith('right')) ||\n (e.key === 'ArrowRight' && placement?.startsWith('left')) ||\n e.key === 'Escape';\n const isMenuItem = e.target.getAttribute('role')?.startsWith(super.childRole);\n\n if (place === 'trigger' && (!visible || inlineActions) && show && isMenuItem) {\n this.handlers.visible(true);\n this.handlers.highlightedIndex(0);\n setTimeout(() => {\n const { highlightedIndex } = this.asProps;\n this.itemRefs[highlightedIndex]?.focus();\n }, 0);\n\n e.preventDefault();\n e.stopPropagation();\n return false;\n }\n if (place === 'list' && visible && hide && isMenuItem) {\n if (\n !inlineActions ||\n (inlineActions && (e.key === 'Escape' || this.asProps.highlightedIndex === 0))\n ) {\n this.handlers.visible(false);\n this.triggerRef.current?.focus();\n\n e.preventDefault();\n e.stopPropagation();\n return false;\n }\n }\n };\n }\n\n handlePreventTabOnActions(e) {\n if (e.key === 'Tab') {\n e.stopPropagation();\n e.preventDefault();\n return false;\n }\n }\n\n render() {\n const { Children, selectedIndex, interaction, timeout } = this.asProps;\n\n this.itemProps = [];\n\n return (\n <selectedIndexContext.Provider value={selectedIndex}>\n <Root\n render={Dropdown}\n timeout={timeout || (interaction === 'hover' ? [0, 100] : undefined)}\n >\n <Children />\n </Root>\n </selectedIndexContext.Provider>\n );\n }\n}\n\nfunction List({ styles, Children }) {\n const SDropdownMenuList = Root;\n\n return sstyled(styles)(\n <ListBoxContextProvider>\n <SDropdownMenuList render={ScrollAreaComponent} shadow={true}>\n <ScrollAreaComponent.Container tabIndex={undefined}>\n <Children />\n </ScrollAreaComponent.Container>\n <ScrollAreaComponent.Bar orientation='horizontal' />\n <ScrollAreaComponent.Bar orientation='vertical' />\n </SDropdownMenuList>\n </ListBoxContextProvider>,\n );\n}\nfunction Actions({ styles }) {\n const SDropdownMenuActions = Root;\n\n return sstyled(styles)(<SDropdownMenuActions render={Flex} />);\n}\n\nfunction Menu(props) {\n const {\n visible,\n disablePortal,\n ignorePortalsStacking,\n disableEnforceFocus,\n interaction,\n autoFocus,\n animationsDisabled,\n } = props;\n const popperProps = {\n visible,\n disablePortal,\n ignorePortalsStacking,\n disableEnforceFocus,\n interaction,\n autoFocus,\n animationsDisabled,\n };\n return (\n <ListBoxContextProvider>\n <DropdownMenu.Popper {...popperProps} role={null}>\n <Root render={DropdownMenu.List} />\n </DropdownMenu.Popper>\n </ListBoxContextProvider>\n );\n}\n\nfunction Item({\n id,\n styles,\n disabled,\n Children,\n forwardRef,\n role,\n tabIndex,\n actionsRef,\n 'aria-checked': ariaChecked,\n}) {\n const SDropdownMenuItemContainer = Root;\n const itemRef = React.useRef();\n\n const [highlighted, setHighlighted] = React.useState(false);\n\n const menuItemContextValue = {\n contentId: id,\n ref: forkRef(forwardRef, itemRef),\n role,\n tabIndex,\n ariaChecked,\n };\n const ariaDescribes = [];\n\n const hasSubMenu = isAdvanceMode(Children, [DropdownMenu.displayName], true);\n const hasHint = isAdvanceMode(Children, [DropdownMenu.Item.Hint.displayName], true);\n const advancedMode =\n isAdvanceMode(Children, [DropdownMenu.Item.Content.displayName], true) || hasSubMenu || hasHint;\n\n if (hasHint) {\n const hintId = `igc-${useUID()}-option-hint`;\n\n menuItemContextValue.hintId = hintId;\n ariaDescribes.push(hintId);\n }\n\n if (hasSubMenu) {\n menuItemContextValue.hasSubMenu = true;\n }\n\n menuItemContextValue.ariaDescribes = ariaDescribes;\n\n React.useEffect(() => {\n const onFocus = (e) => {\n if (e.target === itemRef.current) {\n setHighlighted(true);\n\n if (hasSubMenu) {\n e.stopPropagation();\n }\n }\n };\n const onBlur = (e) => {\n if (e.target === itemRef.current) {\n setHighlighted(false);\n\n if (actionsRef.current) {\n itemRef.current.tabIndex = -1;\n }\n }\n };\n\n document.addEventListener('focus', onFocus, { capture: true });\n document.addEventListener('blur', onBlur, { capture: true });\n\n return () => {\n document.removeEventListener('focus', onFocus, { capture: true });\n document.removeEventListener('blur', onBlur, { capture: true });\n };\n }, [itemRef.current]);\n\n const focusSourceRef = useFocusSource();\n\n return sstyled(styles)(\n <menuItemContext.Provider value={menuItemContextValue}>\n <SDropdownMenuItemContainer\n render={Dropdown.Item}\n ref={advancedMode ? undefined : menuItemContextValue.ref}\n use:highlighted={!disabled && highlighted && focusSourceRef.current === 'keyboard'}\n use:role={advancedMode ? undefined : role}\n use:id={advancedMode ? undefined : id}\n use:tabIndex={advancedMode ? undefined : tabIndex}\n use:aria-checked={advancedMode ? undefined : ariaChecked}\n >\n <Children />\n </SDropdownMenuItemContainer>\n </menuItemContext.Provider>,\n );\n}\n\nfunction Addon(props) {\n const [SDropdownMenuItemAddon, { className, ...other }] = useBox(props, props.forwardRef);\n const styles = sstyled(props.styles);\n return (\n <SDropdownMenuItemAddon\n className={cn(styles.cn('SDropdownMenuItemAddon', props).className, className) || undefined}\n {...other}\n />\n );\n}\n\nfunction Trigger() {\n return <Root render={Dropdown.Trigger} />;\n}\n\nfunction ItemContent({ styles }) {\n const SItemContent = Root;\n const ref = React.useRef();\n const menuItemCtxValue = React.useContext(menuItemContext);\n\n let subMenu = undefined;\n\n if (menuItemCtxValue.hasSubMenu) {\n subMenu = 'true';\n }\n\n const [describedby, setDescribedby] = React.useState(new Set(menuItemCtxValue.ariaDescribes));\n\n React.useEffect(() => {\n const element = ref.current;\n const parent = element?.parentElement;\n\n if (\n parent.getAttribute('aria-haspopup') === 'true' &&\n parent.getAttribute('aria-describedby')\n ) {\n setDescribedby((prev) => {\n prev.add(parent.getAttribute('aria-describedby'));\n\n return new Set(prev);\n });\n }\n }, [menuItemCtxValue.ariaDescribes]);\n\n return sstyled(styles)(\n <SItemContent\n render={Flex}\n role={menuItemCtxValue.role}\n id={menuItemCtxValue.contentId}\n tabIndex={menuItemCtxValue.tabIndex}\n ref={forkRef(menuItemCtxValue.ref, ref)}\n use:aria-describedby={[...describedby].join(' ')}\n aria-haspopup={menuItemCtxValue.hasSubMenu ? 'true' : undefined}\n aria-expanded={subMenu}\n aria-checked={menuItemCtxValue.ariaChecked}\n alignItems='center'\n justifyContent={menuItemCtxValue.hasSubMenu ? 'space-between' : undefined}\n />,\n );\n}\n\nfunction ItemContentText({ styles }) {\n const SItemContentText = Root;\n return sstyled(styles)(<SItemContentText render={Text} />);\n}\n\nfunction ItemHint({ styles }) {\n const SItemHint = Root;\n const { hintId } = React.useContext(menuItemContext);\n\n return sstyled(styles)(<SItemHint render={Flex} id={hintId} aria-hidden={'true'} />);\n}\n\n/**\n * @deprecated Use Item hint\n */\nfunction Hint(props) {\n const SDropdownMenuItemContainer = Root;\n return sstyled(props.styles)(\n <SDropdownMenuItemContainer render={Dropdown.Item} variant='hint' />,\n );\n}\n/**\n * @deprecated Use Group with title prop\n */\nfunction Title(props) {\n const SDropdownMenuItemContainer = Root;\n return sstyled(props.styles)(\n <SDropdownMenuItemContainer render={Dropdown.Item} variant='title' />,\n );\n}\n\n/**\n * @deprecated\n */\nfunction Nesting({ forwardRef }) {\n return <Root render={DropdownMenu.Item} ref={forwardRef} />;\n}\n\n/**\n * @deprecated\n */\nfunction NestingTrigger({ forwardRef }) {\n return (\n <Root\n render={DropdownMenu.Item.Content}\n tag={DropdownMenu.Trigger}\n ref={forwardRef}\n use:role={'menuitem'}\n />\n );\n}\n\nconst DropdownMenu = createComponent(\n DropdownMenuRoot,\n {\n Trigger,\n Popper: Dropdown.Popper,\n List,\n Actions,\n Menu,\n Item: [Item, { Addon, Content: ItemContent, Text: ItemContentText, Hint: ItemHint }],\n /**\n * @deprecated. Use just Item. See examples on\n */\n Nesting: [Nesting, { Trigger: NestingTrigger, Addon }],\n ItemTitle: Title,\n ItemHint: Hint,\n Group: Dropdown.Group,\n },\n {\n parent: [Dropdown],\n },\n);\n\nDropdownMenu.selectedIndexContext = selectedIndexContext;\n\nexport default DropdownMenu;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAEA,IAAAA,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ACsI;AAClB,CAAC,EACD;EACE/B,MAAM,EAAE,CAACvG,oBAAQ;AACnB,CAAC,CACF;AAEDhE,YAAY,CAAC+D,oBAAoB,GAAGA,8BAAoB;AAAC,IAAAwI,QAAA,GAE1CvM,YAAY;AAAAwM,OAAA,cAAAD,QAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import { PropGetterFn, UnknownProperties, Intergalactic } from '@semcore/core';\nimport Dropdown, {\n DropdownContext,\n DropdownProps,\n DropdownHandlers,\n DropdownTriggerProps,\n DropdownPopperAriaProps,\n} from '@semcore/dropdown';\nimport { Box, BoxProps, FlexProps, Flex } from '@semcore/flex-box';\nimport { ScrollAreaProps } from '@semcore/scroll-area';\nimport { Text } from '@semcore/typography';\nimport { eventInteraction } from '@semcore/popper';\n\nexport type DropdownMenuSize = 'm' | 'l';\n\n/** @deprecated */\nexport interface IDropdownMenuProps extends DropdownMenuProps, UnknownProperties {}\nexport type DropdownMenuProps = DropdownProps & {\n /**\n * Set role `menuitemradio` (or `menuitemcheckbox` if `multiselect`) for Dropdown.Item\n */\n selectable?: boolean;\n /**\n * Multiple select\n */\n multiselect?: boolean;\n /**\n * Size of the menu\n * @default m\n */\n size?: DropdownMenuSize;\n /**\n * Index of the element selected by default\n */\n defaultHighlightedIndex?: number | null;\n /**\n * Index of the selected item\n */\n highlightedIndex?: number | null;\n /**\n * Callback for highlightedIndex change\n * highlightedIndex - Index of the selected item\n */\n onHighlightedIndexChange?: (highlightedIndex: number | null) => void;\n locale?: string;\n /**\n * Flag for menu that using as actions on DropdownMenu.Item\n */\n inlineActions?: boolean;\n};\n\n/** @deprecated */\nexport interface IDropdownMenuListProps extends DropdownMenuListProps, UnknownProperties {}\nexport type DropdownMenuListProps = BoxProps &\n ScrollAreaProps & {\n /**\n * Size of the menu\n * @default m\n */\n size?: DropdownMenuSize;\n };\n\n/** @deprecated */\nexport interface IDropdownMenuMenuProps extends DropdownMenuMenuProps, UnknownProperties {}\nexport type DropdownMenuMenuProps = DropdownMenuListProps & {};\n\n/** @deprecated */\nexport interface IDropdownMenuItemProps extends DropdownMenuItemProps, UnknownProperties {}\nexport type DropdownMenuItemProps = FlexProps & {\n /**\n * Enables selected state. For selectable dropdowns only.\n */\n selected?: boolean;\n /**\n * Disables item\n */\n disabled?: boolean;\n /**\n * Adds focus styles around\n */\n highlighted?: boolean;\n /**\n * Disables hover state\n * @deprecated use `disabled` instead\n */\n notInteractive?: boolean;\n /**\n * Size of the component\n * @default m\n */\n size?: DropdownMenuSize;\n};\n\n/** @deprecated */\nexport interface IDropdownMenuItemHintProps extends DropdownMenuItemHintProps, UnknownProperties {}\nexport type DropdownMenuItemHintProps = FlexProps & {\n /**\n * Size of the component\n * @default m\n */\n size?: DropdownMenuSize;\n};\n\n/** @deprecated */\nexport interface IDropdownMenuItemTitleProps\n extends DropdownMenuItemTitleProps,\n UnknownProperties {}\nexport type DropdownMenuItemTitleProps = FlexProps & {\n /**\n * Size of the component\n * @default m\n */\n size?: DropdownMenuSize;\n};\n\n/** @deprecated */\nexport interface IDropdownMenuContext extends DropdownMenuContext, UnknownProperties {}\nexport type DropdownMenuContext = DropdownContext & {\n highlightedIndex?: number;\n getListProps: PropGetterFn;\n getItemProps: PropGetterFn;\n getItemHintProps: PropGetterFn;\n getItemTitleProps: PropGetterFn;\n};\n\n/** @deprecated */\nexport interface IDropdownMenuHandlers extends DropdownMenuHandlers, UnknownProperties {}\nexport type DropdownMenuHandlers = DropdownHandlers & {\n highlightedIndex: (index: number) => void;\n};\n\nexport type DropdownMenuTriggerProps = DropdownTriggerProps;\n\ndeclare const DropdownMenu: Intergalactic.Component<\n 'div',\n DropdownMenuProps,\n DropdownMenuContext,\n [handlers: DropdownMenuHandlers]\n> & {\n Trigger: typeof Dropdown.Trigger;\n Popper: Intergalactic.Component<'div', DropdownMenuProps & DropdownPopperAriaProps>;\n List: Intergalactic.Component<\n 'div',\n DropdownMenuListProps,\n DropdownMenuContext,\n [handlers: DropdownMenuHandlers]\n >;\n Actions: Intergalactic.Component<\n typeof Flex,\n DropdownMenuListProps,\n DropdownMenuContext,\n [handlers: DropdownMenuHandlers]\n >;\n Menu: Intergalactic.Component<\n 'div',\n DropdownMenuMenuProps,\n DropdownMenuContext,\n [handlers: DropdownMenuHandlers]\n >;\n Item: Intergalactic.Component<\n typeof Dropdown.Item,\n DropdownMenuItemProps,\n DropdownMenuContext,\n [handlers: DropdownMenuHandlers]\n > & {\n Addon: typeof Box;\n Content: typeof Flex;\n Text: typeof Text;\n Hint: typeof Flex;\n };\n /**\n * @deprecated Use Group with title prop\n */\n ItemTitle: Intergalactic.Component<'div', DropdownMenuItemTitleProps>;\n /**\n * @deprecated Use prop subTitle on Group or Item component\n */\n ItemHint: Intergalactic.Component<'div', DropdownMenuItemHintProps>;\n Group: typeof Dropdown.Group;\n /**\n * @deprecated Use Item instead of Nesting\n */\n Nesting: Intergalactic.Component<\n 'div',\n DropdownMenuItemProps,\n DropdownMenuContext,\n [handlers: DropdownMenuHandlers]\n > & {\n /**\n * @deprecated Use Item instead of Nesting\n */\n Trigger: Intergalactic.Component<'div', DropdownMenuItemProps>;\n /**\n * @deprecated Use Item instead of Nesting\n */\n Item: Intergalactic.Component<'div', DropdownMenuItemProps>;\n /**\n * @deprecated Use Item instead of Nesting\n */\n Addon: typeof Box;\n };\n\n selectedIndexContext: React.Context<number>;\n nestedMenuInteraction: eventInteraction;\n};\n\nexport default DropdownMenu;\n"],"mappings":""}
1
+ {"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import { PropGetterFn, UnknownProperties, Intergalactic } from '@semcore/core';\nimport Dropdown, {\n DropdownContext,\n DropdownProps,\n DropdownHandlers,\n DropdownTriggerProps,\n DropdownPopperAriaProps,\n} from '@semcore/dropdown';\nimport { Box, BoxProps, FlexProps, Flex } from '@semcore/flex-box';\nimport { ScrollAreaProps } from '@semcore/scroll-area';\nimport { Text } from '@semcore/typography';\nimport { eventInteraction } from '@semcore/popper';\n\nexport type DropdownMenuSize = 'm' | 'l';\n\n/** @deprecated */\nexport interface IDropdownMenuProps extends DropdownMenuProps, UnknownProperties {}\nexport type DropdownMenuProps = DropdownProps & {\n /**\n * Set role `menuitemradio` (or `menuitemcheckbox` if `multiselect`) for Dropdown.Item\n */\n selectable?: boolean;\n /**\n * Multiple select\n */\n multiselect?: boolean;\n /**\n * Size of the menu\n * @default m\n */\n size?: DropdownMenuSize;\n /**\n * Index of the element selected by default\n */\n defaultHighlightedIndex?: number | null;\n /**\n * Index of the selected item\n */\n highlightedIndex?: number | null;\n /**\n * Callback for highlightedIndex change\n * highlightedIndex - Index of the selected item\n */\n onHighlightedIndexChange?: (highlightedIndex: number | null) => void;\n locale?: string;\n /**\n * Flag for menu that using as actions on DropdownMenu.Item\n */\n inlineActions?: boolean;\n\n /**\n * Count of menu items (for virtual lists only)\n */\n itemsCount?: number;\n};\n\n/** @deprecated */\nexport interface IDropdownMenuListProps extends DropdownMenuListProps, UnknownProperties {}\nexport type DropdownMenuListProps = BoxProps &\n ScrollAreaProps & {\n /**\n * Size of the menu\n * @default m\n */\n size?: DropdownMenuSize;\n };\n\n/** @deprecated */\nexport interface IDropdownMenuMenuProps extends DropdownMenuMenuProps, UnknownProperties {}\nexport type DropdownMenuMenuProps = DropdownMenuListProps & {};\n\n/** @deprecated */\nexport interface IDropdownMenuItemProps extends DropdownMenuItemProps, UnknownProperties {}\nexport type DropdownMenuItemProps = FlexProps & {\n /**\n * Enables selected state. For selectable dropdowns only.\n */\n selected?: boolean;\n /**\n * Disables item\n */\n disabled?: boolean;\n /**\n * Adds focus styles around\n */\n highlighted?: boolean;\n /**\n * Disables hover state\n * @deprecated use `disabled` instead\n */\n notInteractive?: boolean;\n /**\n * Size of the component\n * @default m\n */\n size?: DropdownMenuSize;\n /**\n * Index of item (used in virtualized lists)\n */\n index?: number;\n};\n\n/** @deprecated */\nexport interface IDropdownMenuItemHintProps extends DropdownMenuItemHintProps, UnknownProperties {}\nexport type DropdownMenuItemHintProps = FlexProps & {\n /**\n * Size of the component\n * @default m\n */\n size?: DropdownMenuSize;\n};\n\n/** @deprecated */\nexport interface IDropdownMenuItemTitleProps\n extends DropdownMenuItemTitleProps,\n UnknownProperties {}\nexport type DropdownMenuItemTitleProps = FlexProps & {\n /**\n * Size of the component\n * @default m\n */\n size?: DropdownMenuSize;\n};\n\n/** @deprecated */\nexport interface IDropdownMenuContext extends DropdownMenuContext, UnknownProperties {}\nexport type DropdownMenuContext = DropdownContext & {\n highlightedIndex?: number;\n getListProps: PropGetterFn;\n getItemProps: PropGetterFn;\n getItemHintProps: PropGetterFn;\n getItemTitleProps: PropGetterFn;\n};\n\n/** @deprecated */\nexport interface IDropdownMenuHandlers extends DropdownMenuHandlers, UnknownProperties {}\nexport type DropdownMenuHandlers = DropdownHandlers & {\n highlightedIndex: (index: number) => void;\n};\n\nexport type DropdownMenuTriggerProps = DropdownTriggerProps;\n\ndeclare const DropdownMenu: Intergalactic.Component<\n 'div',\n DropdownMenuProps,\n DropdownMenuContext,\n [handlers: DropdownMenuHandlers]\n> & {\n Trigger: typeof Dropdown.Trigger;\n Popper: Intergalactic.Component<'div', DropdownMenuProps & DropdownPopperAriaProps>;\n List: Intergalactic.Component<\n 'div',\n DropdownMenuListProps,\n DropdownMenuContext,\n [handlers: DropdownMenuHandlers]\n >;\n Actions: Intergalactic.Component<\n typeof Flex,\n DropdownMenuListProps,\n DropdownMenuContext,\n [handlers: DropdownMenuHandlers]\n >;\n Menu: Intergalactic.Component<\n 'div',\n DropdownMenuMenuProps,\n DropdownMenuContext,\n [handlers: DropdownMenuHandlers]\n >;\n Item: Intergalactic.Component<\n typeof Dropdown.Item,\n DropdownMenuItemProps,\n DropdownMenuContext,\n [handlers: DropdownMenuHandlers]\n > & {\n Addon: typeof Box;\n Content: typeof Flex;\n Text: typeof Text;\n Hint: typeof Flex;\n };\n /**\n * @deprecated Use Group with title prop\n */\n ItemTitle: Intergalactic.Component<'div', DropdownMenuItemTitleProps>;\n /**\n * @deprecated Use prop subTitle on Group or Item component\n */\n ItemHint: Intergalactic.Component<'div', DropdownMenuItemHintProps>;\n Group: typeof Dropdown.Group;\n /**\n * @deprecated Use Item instead of Nesting\n */\n Nesting: Intergalactic.Component<\n 'div',\n DropdownMenuItemProps,\n DropdownMenuContext,\n [handlers: DropdownMenuHandlers]\n > & {\n /**\n * @deprecated Use Item instead of Nesting\n */\n Trigger: Intergalactic.Component<'div', DropdownMenuItemProps>;\n /**\n * @deprecated Use Item instead of Nesting\n */\n Item: Intergalactic.Component<'div', DropdownMenuItemProps>;\n /**\n * @deprecated Use Item instead of Nesting\n */\n Addon: typeof Box;\n };\n\n selectedIndexContext: React.Context<number>;\n nestedMenuInteraction: eventInteraction;\n};\n\nexport default DropdownMenu;\n"],"mappings":""}
@@ -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__*/".___SDropdownMenuList_1q7u9_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_1q7u9_gg_ .___SShadowHorizontal_1q7u9_gg_:after,.___SDropdownMenuList_1q7u9_gg_ .___SShadowHorizontal_1q7u9_gg_:before{width:16px;height:100%;border-radius:var(--intergalactic-control-rounded, 6px)}.___SDropdownMenuList_1q7u9_gg_ .___SShadowHorizontal_1q7u9_gg_._position_median_1q7u9_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_1q7u9_gg_ .___SShadowHorizontal_1q7u9_gg_._position_median_1q7u9_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_1q7u9_gg_ .___SShadowHorizontal_1q7u9_gg_._position_start_1q7u9_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_1q7u9_gg_ .___SShadowHorizontal_1q7u9_gg_._position_end_1q7u9_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_1q7u9_gg_ .___SShadowVertical_1q7u9_gg_:after,.___SDropdownMenuList_1q7u9_gg_ .___SShadowVertical_1q7u9_gg_:before{width:100%;height:16px;border-radius:var(--intergalactic-control-rounded, 6px)}.___SDropdownMenuList_1q7u9_gg_ .___SShadowVertical_1q7u9_gg_._position_median_1q7u9_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_1q7u9_gg_ .___SShadowVertical_1q7u9_gg_._position_median_1q7u9_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_1q7u9_gg_ .___SShadowVertical_1q7u9_gg_._position_start_1q7u9_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_1q7u9_gg_ .___SShadowVertical_1q7u9_gg_._position_end_1q7u9_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_1q7u9_gg_.__nesting-trigger_1q7u9_gg_{justify-content:space-between}.___SDropdownMenuItemAddon_1q7u9_gg_,.___SItemContentText_1q7u9_gg_{display:inline-flex;margin-left:var(--intergalactic-spacing-1x, 4px);margin-right:var(--intergalactic-spacing-1x, 4px)}.___SDropdownMenuItemAddon_1q7u9_gg_:first-child,.___SItemContentText_1q7u9_gg_:first-child{margin-left:0}.___SDropdownMenuItemAddon_1q7u9_gg_:last-child,.___SItemContentText_1q7u9_gg_:last-child{margin-right:0}.___SDropdownMenuNesting_1q7u9_gg_,.___SDropdownMenuNesting_1q7u9_gg_._size_l_1q7u9_gg_,.___SDropdownMenuNesting_1q7u9_gg_._size_m_1q7u9_gg_{padding:0}.___SDropdownMenuNesting_1q7u9_gg_.__highlighted_1q7u9_gg_{z-index:1;box-shadow:var(--intergalactic-keyboard-focus, 0px 0px 0px 3px rgba(0, 143, 248, 0.5)) inset}.___SDropdownNestingItem_1q7u9_gg_._size_l_1q7u9_gg_,.___SDropdownNestingItem_1q7u9_gg_._size_m_1q7u9_gg_{padding-right:0}.___SDropdownNestingItem_1q7u9_gg_ .___SDropdownMenuItemContainer_1q7u9_gg_{width:auto;padding-top:0;padding-bottom:0;padding-left:0;min-height:auto}.___SItemContent_1q7u9_gg_:focus{outline:0}.___SItemHint_1q7u9_gg_{color:var(--intergalactic-text-secondary, #6c6e79)}" /*__inner_css_end__*/, "1q7u9_gg_") /*__reshadow_css_end__*/, {
39
- "__SDropdownMenuItemContainer": "___SDropdownMenuItemContainer_1q7u9_gg_",
40
- "_nesting-trigger": "__nesting-trigger_1q7u9_gg_",
41
- "__SDropdownMenuNesting": "___SDropdownMenuNesting_1q7u9_gg_",
42
- "_size_l": "_size_l_1q7u9_gg_",
43
- "_size_m": "_size_m_1q7u9_gg_",
44
- "_highlighted": "__highlighted_1q7u9_gg_",
45
- "__SDropdownNestingItem": "___SDropdownNestingItem_1q7u9_gg_",
46
- "__SItemContent": "___SItemContent_1q7u9_gg_",
47
- "__SItemHint": "___SItemHint_1q7u9_gg_",
48
- "__SDropdownMenuList": "___SDropdownMenuList_1q7u9_gg_",
49
- "__SShadowHorizontal": "___SShadowHorizontal_1q7u9_gg_",
50
- "_position_median": "_position_median_1q7u9_gg_",
51
- "_position_start": "_position_start_1q7u9_gg_",
52
- "_position_end": "_position_end_1q7u9_gg_",
53
- "__SShadowVertical": "___SShadowVertical_1q7u9_gg_",
54
- "__SDropdownMenuItemAddon": "___SDropdownMenuItemAddon_1q7u9_gg_",
55
- "__SItemContentText": "___SItemContentText_1q7u9_gg_"
38
+ var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SDropdownMenuList_1qypv_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_1qypv_gg_ .___SShadowHorizontal_1qypv_gg_:after,.___SDropdownMenuList_1qypv_gg_ .___SShadowHorizontal_1qypv_gg_:before{width:16px;height:100%;border-radius:var(--intergalactic-control-rounded, 6px)}.___SDropdownMenuList_1qypv_gg_ .___SShadowHorizontal_1qypv_gg_._position_median_1qypv_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_1qypv_gg_ .___SShadowHorizontal_1qypv_gg_._position_median_1qypv_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_1qypv_gg_ .___SShadowHorizontal_1qypv_gg_._position_start_1qypv_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_1qypv_gg_ .___SShadowHorizontal_1qypv_gg_._position_end_1qypv_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_1qypv_gg_ .___SShadowVertical_1qypv_gg_:after,.___SDropdownMenuList_1qypv_gg_ .___SShadowVertical_1qypv_gg_:before{width:100%;height:16px;border-radius:var(--intergalactic-control-rounded, 6px)}.___SDropdownMenuList_1qypv_gg_ .___SShadowVertical_1qypv_gg_._position_median_1qypv_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_1qypv_gg_ .___SShadowVertical_1qypv_gg_._position_median_1qypv_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_1qypv_gg_ .___SShadowVertical_1qypv_gg_._position_start_1qypv_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_1qypv_gg_ .___SShadowVertical_1qypv_gg_._position_end_1qypv_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_1qypv_gg_.__nesting-trigger_1qypv_gg_{justify-content:space-between}.___SDropdownMenuItemAddon_1qypv_gg_,.___SItemContentText_1qypv_gg_{display:inline-flex;margin-left:var(--intergalactic-spacing-1x, 4px);margin-right:var(--intergalactic-spacing-1x, 4px)}.___SDropdownMenuItemAddon_1qypv_gg_:first-child,.___SItemContentText_1qypv_gg_:first-child{margin-left:0}.___SDropdownMenuItemAddon_1qypv_gg_:last-child,.___SItemContentText_1qypv_gg_:last-child{margin-right:0}.___SDropdownMenuNesting_1qypv_gg_,.___SDropdownMenuNesting_1qypv_gg_._size_l_1qypv_gg_,.___SDropdownMenuNesting_1qypv_gg_._size_m_1qypv_gg_{padding:0}.___SDropdownMenuNesting_1qypv_gg_.__highlighted_1qypv_gg_{z-index:1;box-shadow:var(--intergalactic-keyboard-focus, 0px 0px 0px 3px rgba(0, 143, 248, 0.5)) inset}.___SDropdownNestingItem_1qypv_gg_._size_l_1qypv_gg_,.___SDropdownNestingItem_1qypv_gg_._size_m_1qypv_gg_{padding-right:0}.___SDropdownNestingItem_1qypv_gg_ .___SDropdownMenuItemContainer_1qypv_gg_{width:auto;padding-top:0;padding-bottom:0;padding-left:0;min-height:auto}.___SItemContent_1qypv_gg_:focus{outline:0}.___SItemHint_1qypv_gg_{color:var(--intergalactic-text-secondary, #6c6e79)}" /*__inner_css_end__*/, "1qypv_gg_") /*__reshadow_css_end__*/, {
39
+ "__SDropdownMenuItemContainer": "___SDropdownMenuItemContainer_1qypv_gg_",
40
+ "_nesting-trigger": "__nesting-trigger_1qypv_gg_",
41
+ "__SDropdownMenuNesting": "___SDropdownMenuNesting_1qypv_gg_",
42
+ "_size_l": "_size_l_1qypv_gg_",
43
+ "_size_m": "_size_m_1qypv_gg_",
44
+ "_highlighted": "__highlighted_1qypv_gg_",
45
+ "__SDropdownNestingItem": "___SDropdownNestingItem_1qypv_gg_",
46
+ "__SItemContent": "___SItemContent_1qypv_gg_",
47
+ "__SItemHint": "___SItemHint_1qypv_gg_",
48
+ "__SDropdownMenuList": "___SDropdownMenuList_1qypv_gg_",
49
+ "__SShadowHorizontal": "___SShadowHorizontal_1qypv_gg_",
50
+ "_position_median": "_position_median_1qypv_gg_",
51
+ "_position_start": "_position_start_1qypv_gg_",
52
+ "_position_end": "_position_end_1qypv_gg_",
53
+ "__SShadowVertical": "___SShadowVertical_1qypv_gg_",
54
+ "__SDropdownMenuItemAddon": "___SDropdownMenuItemAddon_1qypv_gg_",
55
+ "__SItemContentText": "___SItemContentText_1qypv_gg_"
56
56
  });
57
57
  import { useFocusSource } from '@semcore/utils/lib/enhances/keyboardFocusEnhance';
58
58
  import { isAdvanceMode } from '@semcore/utils/lib/findComponent';
@@ -92,8 +92,8 @@ var DropdownMenuRoot = /*#__PURE__*/function (_AbstractDropdown) {
92
92
  var _this2$menuRef$curren, _this2$menuRef$curren2;
93
93
  var options = (_this2$menuRef$curren = _this2.menuRef.current) === null || _this2$menuRef$curren === void 0 ? void 0 : _this2$menuRef$curren.querySelectorAll('[role="menuitemcheckbox"], [role="menuitemradio"]');
94
94
  var selected = (_this2$menuRef$curren2 = _this2.menuRef.current) === null || _this2$menuRef$curren2 === void 0 ? void 0 : _this2$menuRef$curren2.querySelector('[aria-checked="true"]');
95
- if (selected && options) {
96
- _this2.scrollToNode(selected);
95
+ if (selected && options && _this2.asProps.itemsCount === undefined) {
96
+ _this2.scrollToNode(selected, true);
97
97
  for (var i = 0; i < options.length; i++) {
98
98
  if (options[i] === selected) {
99
99
  _this2.handlers.highlightedIndex(i);
@@ -156,15 +156,17 @@ var DropdownMenuRoot = /*#__PURE__*/function (_AbstractDropdown) {
156
156
  }, {
157
157
  key: "getItemProps",
158
158
  value: function getItemProps(props, index) {
159
- var _this3 = this;
159
+ var _props$index,
160
+ _this3 = this;
160
161
  var _this$asProps2 = this.asProps,
161
162
  highlightedIndex = _this$asProps2.highlightedIndex,
162
163
  visible = _this$asProps2.visible;
163
- var isHighlighted = index === highlightedIndex;
164
- var itemProps = _objectSpread(_objectSpread({}, _get(_getPrototypeOf(DropdownMenuRoot.prototype), "getItemProps", this).call(this, props, index)), {}, {
164
+ var realIndex = (_props$index = props.index) !== null && _props$index !== void 0 ? _props$index : index;
165
+ var isHighlighted = realIndex === highlightedIndex;
166
+ var itemProps = _objectSpread(_objectSpread({}, _get(_getPrototypeOf(DropdownMenuRoot.prototype), "getItemProps", this).call(this, props, realIndex)), {}, {
165
167
  tabIndex: isHighlighted && visible ? 0 : -1,
166
168
  ref: function ref(node) {
167
- return _this3.itemRef(props, index, node);
169
+ return _this3.itemRef(props, realIndex, node);
168
170
  },
169
171
  actionsRef: this.actionsRef
170
172
  });
@@ -1 +1 @@
1
- {"version":3,"file":"DropdownMenu.js","names":["React","cn","createComponent","sstyled","Root","Dropdown","AbstractDropdown","selectedIndexContext","enhance","Flex","useBox","ScrollAreaComponent","hideScrollBarsFromScreenReadersContext","useUID","localizedMessages","style","_sstyled","insert","useFocusSource","isAdvanceMode","forkRef","callAllEventHandlers","ButtonComponent","Text","ListBoxContextProvider","_ref22","children","createElement","Provider","value","menuItemContext","createContext","DropdownMenuRoot","_AbstractDropdown","_inherits","_super","_createSuper","_this","_classCallCheck","_len","arguments","length","args","Array","_key","call","apply","concat","_defineProperty","_assertThisInitialized","createRef","_createClass","key","uncontrolledProps","_this2","_objectSpread","_get","_getPrototypeOf","prototype","visible","setTimeout","_this2$menuRef$curren","_this2$menuRef$curren2","options","menuRef","current","querySelectorAll","selected","querySelector","scrollToNode","i","handlers","highlightedIndex","itemRef","props","index","node","document","activeElement","getTriggerProps","_this$asProps","asProps","Children","uid","hasMenu","DropdownMenu","Menu","displayName","ariaControls","onKeyDown","handlePreventCommonKeyDown","bind","handleOpenKeyDown","handleKeyDownForMenu","undefined","getListProps","handleArrowKeyDown","getPopperProps","handlePreventPopperKeyDown","getActionsProps","ref","actionsRef","handlePreventTabOnActions","getItemProps","_this3","_this$asProps2","isHighlighted","itemProps","tabIndex","tag","_props$use","_props$theme","_props$size","use","theme","size","onClick","place","_this4","e","_this4$menuRef$curren","_e$target$getAttribut","_this4$asProps","placement","inlineActions","contains","target","stopPropagation","show","startsWith","hide","isMenuItem","getAttribute","_this4$itemRefs$highl","itemRefs","focus","preventDefault","_this4$triggerRef$cur","triggerRef","render","_ref","_this$asProps3","selectedIndex","interaction","timeout","_assignProps","Object","values","defaultVisible","defaultHighlightedIndex","defaultSelectedIndex","i18n","locale","trigger","popper","List","_ref23","_ref2","arguments[0]","_ref14","styles","SDropdownMenuList","_assignProps2","Container","Bar","orientation","Actions","_ref24","_ref3","_ref15","SDropdownMenuActions","_assignProps3","_ref4","disablePortal","ignorePortalsStacking","disableEnforceFocus","autoFocus","animationsDisabled","popperProps","Popper","_extends","role","_assignProps4","Item","_ref25","_ref5","_ref16","id","disabled","forwardRef","ariaChecked","SDropdownMenuItemContainer","useRef","_React$useState","useState","_React$useState2","_slicedToArray","highlighted","setHighlighted","menuItemContextValue","contentId","ariaDescribes","hasSubMenu","hasHint","Hint","advancedMode","Content","hintId","push","useEffect","onFocus","onBlur","addEventListener","capture","removeEventListener","focusSourceRef","_assignProps5","Addon","_useBox","_useBox2","SDropdownMenuItemAddon","_useBox2$","className","other","_objectWithoutProperties","_excluded","Trigger","_ref6","_assignProps6","ItemContent","_ref26","_ref7","_ref17","SItemContent","menuItemCtxValue","useContext","subMenu","_React$useState3","Set","_React$useState4","describedby","setDescribedby","element","parent","parentElement","prev","add","_assignProps7","_toConsumableArray","join","ItemContentText","_ref27","_ref8","_ref18","SItemContentText","_assignProps8","ItemHint","_ref28","_ref9","_ref19","SItemHint","_React$useContext","_assignProps9","_ref10","_ref20","_assignProps10","Title","_ref11","_ref21","_assignProps11","Nesting","_ref29","_ref12","_assignProps12","NestingTrigger","_ref30","_ref13","_assignProps13","ItemTitle","Group"],"sources":["../../src/DropdownMenu.jsx"],"sourcesContent":["import React from 'react';\nimport cn from 'classnames';\nimport createComponent, { sstyled, Root } from '@semcore/core';\nimport Dropdown, { AbstractDropdown, selectedIndexContext, enhance } from '@semcore/dropdown';\nimport { Flex, useBox } from '@semcore/flex-box';\nimport ScrollAreaComponent, { hideScrollBarsFromScreenReadersContext } from '@semcore/scroll-area';\nimport { useUID } from '@semcore/utils/lib/uniqueID';\nimport { localizedMessages } from './translations/__intergalactic-dynamic-locales';\nimport style from './style/dropdown-menu.shadow.css';\nimport { useFocusSource } from '@semcore/utils/lib/enhances/keyboardFocusEnhance';\nimport { isAdvanceMode } from '@semcore/utils/lib/findComponent';\nimport { forkRef } from '@semcore/utils/lib/ref';\nimport { callAllEventHandlers } from '@semcore/utils/lib/assignProps';\nimport ButtonComponent from '@semcore/button';\nimport { Text } from '@semcore/typography';\n\nconst ListBoxContextProvider = ({ children }) => (\n <hideScrollBarsFromScreenReadersContext.Provider value={true}>\n {children}\n </hideScrollBarsFromScreenReadersContext.Provider>\n);\n\nconst menuItemContext = React.createContext({});\n\nclass DropdownMenuRoot extends AbstractDropdown {\n static displayName = 'DropdownMenu';\n static style = style;\n static enhance = Object.values(enhance);\n\n static defaultProps = {\n size: 'm',\n defaultVisible: false,\n defaultHighlightedIndex: 0,\n defaultSelectedIndex: 0,\n i18n: localizedMessages,\n locale: 'en',\n interaction: 'click',\n inlineActions: false,\n placement: 'bottom-start',\n timeout: 0,\n };\n\n static nestedMenuInteraction = {\n trigger: [\n ['onClick', 'onMouseEnter'],\n ['onClick', 'onMouseLeave'],\n ],\n popper: [['onMouseEnter'], ['onMouseLeave']],\n };\n\n actionsRef = React.createRef();\n role = 'menu';\n\n uncontrolledProps() {\n return {\n ...super.uncontrolledProps(),\n visible: [\n null,\n (visible) => {\n if (visible === true) {\n setTimeout(() => {\n const options = this.menuRef.current?.querySelectorAll(\n '[role=\"menuitemcheckbox\"], [role=\"menuitemradio\"]',\n );\n const selected = this.menuRef.current?.querySelector('[aria-checked=\"true\"]');\n\n if (selected && options) {\n this.scrollToNode(selected);\n\n for (let i = 0; i < options.length; i++) {\n if (options[i] === selected) {\n this.handlers.highlightedIndex(i);\n break;\n }\n }\n }\n // for some reason, Google Chrome optimizes this timeout with 0 value with previous render (when we set aria-selected)\n // and that's why its skip scrollToNodes. We selected the appropriate timeout manually.\n }, 30);\n }\n },\n ],\n };\n }\n\n itemRef(props, index, node) {\n super.itemRef(props, index, node);\n\n if (node === document.activeElement) {\n super.scrollToNode(node);\n }\n }\n\n getTriggerProps() {\n const { Children, uid, visible } = this.asProps;\n const hasMenu = isAdvanceMode(Children, [DropdownMenu.Menu.displayName]);\n const ariaControls = hasMenu ? `igc-${uid}-list` : `igc-${uid}-popper`;\n\n return {\n ...super.getTriggerProps(),\n onKeyDown: callAllEventHandlers(\n this.handlePreventCommonKeyDown.bind(this),\n this.handleOpenKeyDown.bind(this),\n this.handleKeyDownForMenu('trigger'),\n ),\n 'aria-controls': visible ? ariaControls : undefined,\n 'aria-haspopup': hasMenu ? 'true' : 'dialog',\n };\n }\n\n getListProps() {\n return {\n ...super.getListProps(),\n onKeyDown: callAllEventHandlers(\n this.handlePreventCommonKeyDown.bind(this),\n this.handleKeyDownForMenu('list'),\n this.handleArrowKeyDown.bind(this),\n ),\n };\n }\n\n getPopperProps() {\n return {\n ...super.getPopperProps(),\n onKeyDown: callAllEventHandlers(\n this.handlePreventCommonKeyDown.bind(this),\n this.handlePreventPopperKeyDown.bind(this),\n ),\n };\n }\n\n getActionsProps() {\n return {\n ...this.getListProps(),\n ref: this.actionsRef,\n onKeyDown: callAllEventHandlers(\n this.handlePreventTabOnActions.bind(this),\n this.handlePreventCommonKeyDown.bind(this),\n this.handleKeyDownForMenu('list'),\n this.handleArrowKeyDown.bind(this),\n ),\n };\n }\n\n getItemProps(props, index) {\n const { highlightedIndex, visible } = this.asProps;\n const isHighlighted = index === highlightedIndex;\n const itemProps = {\n ...super.getItemProps(props, index),\n tabIndex: isHighlighted && visible ? 0 : -1,\n ref: (node) => this.itemRef(props, index, node),\n actionsRef: this.actionsRef,\n };\n\n if (props.tag === ButtonComponent) {\n itemProps.use = props.use ?? 'tertiary';\n itemProps.theme = props.theme ?? 'muted';\n itemProps.size = props.size ?? 's';\n }\n\n if (props.selected) {\n itemProps['aria-checked'] = true;\n }\n\n if (super.childRole === 'menuitemradio') {\n itemProps.onClick = () => {\n this.handlers.visible(false);\n };\n }\n\n return itemProps;\n }\n\n handleKeyDownForMenu(place) {\n return (e) => {\n const { visible, placement, inlineActions } = this.asProps;\n\n // stop propagation keyboard events if it calls not on DropdownMenu.Items\n if (place === 'list' && !this.menuRef.current?.contains(e.target) && !inlineActions) {\n e.stopPropagation();\n return false;\n }\n\n const show =\n (e.key === 'ArrowRight' && placement?.startsWith('right')) ||\n (e.key === 'ArrowLeft' && placement?.startsWith('left'));\n const hide =\n (e.key === 'ArrowLeft' && placement?.startsWith('right')) ||\n (e.key === 'ArrowRight' && placement?.startsWith('left')) ||\n e.key === 'Escape';\n const isMenuItem = e.target.getAttribute('role')?.startsWith(super.childRole);\n\n if (place === 'trigger' && (!visible || inlineActions) && show && isMenuItem) {\n this.handlers.visible(true);\n this.handlers.highlightedIndex(0);\n setTimeout(() => {\n const { highlightedIndex } = this.asProps;\n this.itemRefs[highlightedIndex]?.focus();\n }, 0);\n\n e.preventDefault();\n e.stopPropagation();\n return false;\n }\n if (place === 'list' && visible && hide && isMenuItem) {\n if (\n !inlineActions ||\n (inlineActions && (e.key === 'Escape' || this.asProps.highlightedIndex === 0))\n ) {\n this.handlers.visible(false);\n this.triggerRef.current?.focus();\n\n e.preventDefault();\n e.stopPropagation();\n return false;\n }\n }\n };\n }\n\n handlePreventTabOnActions(e) {\n if (e.key === 'Tab') {\n e.stopPropagation();\n e.preventDefault();\n return false;\n }\n }\n\n render() {\n const { Children, selectedIndex, interaction, timeout } = this.asProps;\n\n this.itemProps = [];\n\n return (\n <selectedIndexContext.Provider value={selectedIndex}>\n <Root\n render={Dropdown}\n timeout={timeout || (interaction === 'hover' ? [0, 100] : undefined)}\n >\n <Children />\n </Root>\n </selectedIndexContext.Provider>\n );\n }\n}\n\nfunction List({ styles, Children }) {\n const SDropdownMenuList = Root;\n\n return sstyled(styles)(\n <ListBoxContextProvider>\n <SDropdownMenuList render={ScrollAreaComponent} shadow={true}>\n <ScrollAreaComponent.Container tabIndex={undefined}>\n <Children />\n </ScrollAreaComponent.Container>\n <ScrollAreaComponent.Bar orientation='horizontal' />\n <ScrollAreaComponent.Bar orientation='vertical' />\n </SDropdownMenuList>\n </ListBoxContextProvider>,\n );\n}\nfunction Actions({ styles }) {\n const SDropdownMenuActions = Root;\n\n return sstyled(styles)(<SDropdownMenuActions render={Flex} />);\n}\n\nfunction Menu(props) {\n const {\n visible,\n disablePortal,\n ignorePortalsStacking,\n disableEnforceFocus,\n interaction,\n autoFocus,\n animationsDisabled,\n } = props;\n const popperProps = {\n visible,\n disablePortal,\n ignorePortalsStacking,\n disableEnforceFocus,\n interaction,\n autoFocus,\n animationsDisabled,\n };\n return (\n <ListBoxContextProvider>\n <DropdownMenu.Popper {...popperProps} role={null}>\n <Root render={DropdownMenu.List} />\n </DropdownMenu.Popper>\n </ListBoxContextProvider>\n );\n}\n\nfunction Item({\n id,\n styles,\n disabled,\n Children,\n forwardRef,\n role,\n tabIndex,\n actionsRef,\n 'aria-checked': ariaChecked,\n}) {\n const SDropdownMenuItemContainer = Root;\n const itemRef = React.useRef();\n\n const [highlighted, setHighlighted] = React.useState(false);\n\n const menuItemContextValue = {\n contentId: id,\n ref: forkRef(forwardRef, itemRef),\n role,\n tabIndex,\n ariaChecked,\n };\n const ariaDescribes = [];\n\n const hasSubMenu = isAdvanceMode(Children, [DropdownMenu.displayName], true);\n const hasHint = isAdvanceMode(Children, [DropdownMenu.Item.Hint.displayName], true);\n const advancedMode =\n isAdvanceMode(Children, [DropdownMenu.Item.Content.displayName], true) || hasSubMenu || hasHint;\n\n if (hasHint) {\n const hintId = `igc-${useUID()}-option-hint`;\n\n menuItemContextValue.hintId = hintId;\n ariaDescribes.push(hintId);\n }\n\n if (hasSubMenu) {\n menuItemContextValue.hasSubMenu = true;\n }\n\n menuItemContextValue.ariaDescribes = ariaDescribes;\n\n React.useEffect(() => {\n const onFocus = (e) => {\n if (e.target === itemRef.current) {\n setHighlighted(true);\n\n if (hasSubMenu) {\n e.stopPropagation();\n }\n }\n };\n const onBlur = (e) => {\n if (e.target === itemRef.current) {\n setHighlighted(false);\n\n if (actionsRef.current) {\n itemRef.current.tabIndex = -1;\n }\n }\n };\n\n document.addEventListener('focus', onFocus, { capture: true });\n document.addEventListener('blur', onBlur, { capture: true });\n\n return () => {\n document.removeEventListener('focus', onFocus, { capture: true });\n document.removeEventListener('blur', onBlur, { capture: true });\n };\n }, [itemRef.current]);\n\n const focusSourceRef = useFocusSource();\n\n return sstyled(styles)(\n <menuItemContext.Provider value={menuItemContextValue}>\n <SDropdownMenuItemContainer\n render={Dropdown.Item}\n ref={advancedMode ? undefined : menuItemContextValue.ref}\n use:highlighted={!disabled && highlighted && focusSourceRef.current === 'keyboard'}\n use:role={advancedMode ? undefined : role}\n use:id={advancedMode ? undefined : id}\n use:tabIndex={advancedMode ? undefined : tabIndex}\n use:aria-checked={advancedMode ? undefined : ariaChecked}\n >\n <Children />\n </SDropdownMenuItemContainer>\n </menuItemContext.Provider>,\n );\n}\n\nfunction Addon(props) {\n const [SDropdownMenuItemAddon, { className, ...other }] = useBox(props, props.forwardRef);\n const styles = sstyled(props.styles);\n return (\n <SDropdownMenuItemAddon\n className={cn(styles.cn('SDropdownMenuItemAddon', props).className, className) || undefined}\n {...other}\n />\n );\n}\n\nfunction Trigger() {\n return <Root render={Dropdown.Trigger} />;\n}\n\nfunction ItemContent({ styles }) {\n const SItemContent = Root;\n const ref = React.useRef();\n const menuItemCtxValue = React.useContext(menuItemContext);\n\n let subMenu = undefined;\n\n if (menuItemCtxValue.hasSubMenu) {\n subMenu = 'true';\n }\n\n const [describedby, setDescribedby] = React.useState(new Set(menuItemCtxValue.ariaDescribes));\n\n React.useEffect(() => {\n const element = ref.current;\n const parent = element?.parentElement;\n\n if (\n parent.getAttribute('aria-haspopup') === 'true' &&\n parent.getAttribute('aria-describedby')\n ) {\n setDescribedby((prev) => {\n prev.add(parent.getAttribute('aria-describedby'));\n\n return new Set(prev);\n });\n }\n }, [menuItemCtxValue.ariaDescribes]);\n\n return sstyled(styles)(\n <SItemContent\n render={Flex}\n role={menuItemCtxValue.role}\n id={menuItemCtxValue.contentId}\n tabIndex={menuItemCtxValue.tabIndex}\n ref={forkRef(menuItemCtxValue.ref, ref)}\n use:aria-describedby={[...describedby].join(' ')}\n aria-haspopup={menuItemCtxValue.hasSubMenu ? 'true' : undefined}\n aria-expanded={subMenu}\n aria-checked={menuItemCtxValue.ariaChecked}\n alignItems='center'\n justifyContent={menuItemCtxValue.hasSubMenu ? 'space-between' : undefined}\n />,\n );\n}\n\nfunction ItemContentText({ styles }) {\n const SItemContentText = Root;\n return sstyled(styles)(<SItemContentText render={Text} />);\n}\n\nfunction ItemHint({ styles }) {\n const SItemHint = Root;\n const { hintId } = React.useContext(menuItemContext);\n\n return sstyled(styles)(<SItemHint render={Flex} id={hintId} aria-hidden={'true'} />);\n}\n\n/**\n * @deprecated Use Item hint\n */\nfunction Hint(props) {\n const SDropdownMenuItemContainer = Root;\n return sstyled(props.styles)(\n <SDropdownMenuItemContainer render={Dropdown.Item} variant='hint' />,\n );\n}\n/**\n * @deprecated Use Group with title prop\n */\nfunction Title(props) {\n const SDropdownMenuItemContainer = Root;\n return sstyled(props.styles)(\n <SDropdownMenuItemContainer render={Dropdown.Item} variant='title' />,\n );\n}\n\n/**\n * @deprecated\n */\nfunction Nesting({ forwardRef }) {\n return <Root render={DropdownMenu.Item} ref={forwardRef} />;\n}\n\n/**\n * @deprecated\n */\nfunction NestingTrigger({ forwardRef }) {\n return (\n <Root\n render={DropdownMenu.Item.Content}\n tag={DropdownMenu.Trigger}\n ref={forwardRef}\n use:role={'menuitem'}\n />\n );\n}\n\nconst DropdownMenu = createComponent(\n DropdownMenuRoot,\n {\n Trigger,\n Popper: Dropdown.Popper,\n List,\n Actions,\n Menu,\n Item: [Item, { Addon, Content: ItemContent, Text: ItemContentText, Hint: ItemHint }],\n /**\n * @deprecated. Use just Item. See examples on\n */\n Nesting: [Nesting, { Trigger: NestingTrigger, Addon }],\n ItemTitle: Title,\n ItemHint: Hint,\n Group: Dropdown.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AA,OACpBrC,UAAU;IAAA,YACL;EAAU,GAAAuF,MAAA,EACpB;AAEN;AAEA,IAAM/L,YAAY,GAAGnF,eAAe,CAClC8B,gBAAgB,EAChB;EACEkM,OAAO,EAAPA,OAAO;EACP/C,MAAM,EAAE9K,QAAQ,CAAC8K,MAAM;EACvBxB,IAAI,EAAJA,IAAI;EACJW,OAAO,EAAPA,OAAO;EACPhF,IAAI,EAAJA,IAAI;EACJiG,IAAI,EAAE,CAACA,IAAI,EAAE;IAAEkC,KAAK,EAALA,KAAK;IAAEX,OAAO,EAAEuB,WAAW;IAAE9M,IAAI,EAAEmO,eAAe;IAAE9C,IAAI,EAAEoD;EAAS,CAAC,CAAC;EACpF;AACJ;AACA;EACIc,OAAO,EAAE,CAACA,OAAO,EAAE;IAAE5C,OAAO,EAAEgD,cAAc;IAAEzD,KAAK,EAALA;EAAM,CAAC,CAAC;EACtD6D,SAAS,EAAEZ,KAAK;EAChBV,QAAQ,EAAEpD,IAAI;EACd2E,KAAK,EAAElR,QAAQ,CAACkR;AAClB,CAAC,EACD;EACEpC,MAAM,EAAE,CAAC9O,QAAQ;AACnB,CAAC,CACF;AAEDgF,YAAY,CAAC9E,oBAAoB,GAAGA,oBAAoB;AAExD,eAAe8E,YAAY"}
1
+ {"version":3,"file":"DropdownMenu.js","names":["React","cn","createComponent","sstyled","Root","Dropdown","AbstractDropdown","selectedIndexContext","enhance","Flex","useBox","ScrollAreaComponent","hideScrollBarsFromScreenReadersContext","useUID","localizedMessages","style","_sstyled","insert","useFocusSource","isAdvanceMode","forkRef","callAllEventHandlers","ButtonComponent","Text","ListBoxContextProvider","_ref22","children","createElement","Provider","value","menuItemContext","createContext","DropdownMenuRoot","_AbstractDropdown","_inherits","_super","_createSuper","_this","_classCallCheck","_len","arguments","length","args","Array","_key","call","apply","concat","_defineProperty","_assertThisInitialized","createRef","_createClass","key","uncontrolledProps","_this2","_objectSpread","_get","_getPrototypeOf","prototype","visible","setTimeout","_this2$menuRef$curren","_this2$menuRef$curren2","options","menuRef","current","querySelectorAll","selected","querySelector","asProps","itemsCount","undefined","scrollToNode","i","handlers","highlightedIndex","itemRef","props","index","node","document","activeElement","getTriggerProps","_this$asProps","Children","uid","hasMenu","DropdownMenu","Menu","displayName","ariaControls","onKeyDown","handlePreventCommonKeyDown","bind","handleOpenKeyDown","handleKeyDownForMenu","getListProps","handleArrowKeyDown","getPopperProps","handlePreventPopperKeyDown","getActionsProps","ref","actionsRef","handlePreventTabOnActions","getItemProps","_props$index","_this3","_this$asProps2","realIndex","isHighlighted","itemProps","tabIndex","tag","_props$use","_props$theme","_props$size","use","theme","size","onClick","place","_this4","e","_this4$menuRef$curren","_e$target$getAttribut","_this4$asProps","placement","inlineActions","contains","target","stopPropagation","show","startsWith","hide","isMenuItem","getAttribute","_this4$itemRefs$highl","itemRefs","focus","preventDefault","_this4$triggerRef$cur","triggerRef","render","_ref","_this$asProps3","selectedIndex","interaction","timeout","_assignProps","Object","values","defaultVisible","defaultHighlightedIndex","defaultSelectedIndex","i18n","locale","trigger","popper","List","_ref23","_ref2","arguments[0]","_ref14","styles","SDropdownMenuList","_assignProps2","Container","Bar","orientation","Actions","_ref24","_ref3","_ref15","SDropdownMenuActions","_assignProps3","_ref4","disablePortal","ignorePortalsStacking","disableEnforceFocus","autoFocus","animationsDisabled","popperProps","Popper","_extends","role","_assignProps4","Item","_ref25","_ref5","_ref16","id","disabled","forwardRef","ariaChecked","SDropdownMenuItemContainer","useRef","_React$useState","useState","_React$useState2","_slicedToArray","highlighted","setHighlighted","menuItemContextValue","contentId","ariaDescribes","hasSubMenu","hasHint","Hint","advancedMode","Content","hintId","push","useEffect","onFocus","onBlur","addEventListener","capture","removeEventListener","focusSourceRef","_assignProps5","Addon","_useBox","_useBox2","SDropdownMenuItemAddon","_useBox2$","className","other","_objectWithoutProperties","_excluded","Trigger","_ref6","_assignProps6","ItemContent","_ref26","_ref7","_ref17","SItemContent","menuItemCtxValue","useContext","subMenu","_React$useState3","Set","_React$useState4","describedby","setDescribedby","element","parent","parentElement","prev","add","_assignProps7","_toConsumableArray","join","ItemContentText","_ref27","_ref8","_ref18","SItemContentText","_assignProps8","ItemHint","_ref28","_ref9","_ref19","SItemHint","_React$useContext","_assignProps9","_ref10","_ref20","_assignProps10","Title","_ref11","_ref21","_assignProps11","Nesting","_ref29","_ref12","_assignProps12","NestingTrigger","_ref30","_ref13","_assignProps13","ItemTitle","Group"],"sources":["../../src/DropdownMenu.jsx"],"sourcesContent":["import React from 'react';\nimport cn from 'classnames';\nimport createComponent, { sstyled, Root } from '@semcore/core';\nimport Dropdown, { AbstractDropdown, selectedIndexContext, enhance } from '@semcore/dropdown';\nimport { Flex, useBox } from '@semcore/flex-box';\nimport ScrollAreaComponent, { hideScrollBarsFromScreenReadersContext } from '@semcore/scroll-area';\nimport { useUID } from '@semcore/utils/lib/uniqueID';\nimport { localizedMessages } from './translations/__intergalactic-dynamic-locales';\nimport style from './style/dropdown-menu.shadow.css';\nimport { useFocusSource } from '@semcore/utils/lib/enhances/keyboardFocusEnhance';\nimport { isAdvanceMode } from '@semcore/utils/lib/findComponent';\nimport { forkRef } from '@semcore/utils/lib/ref';\nimport { callAllEventHandlers } from '@semcore/utils/lib/assignProps';\nimport ButtonComponent from '@semcore/button';\nimport { Text } from '@semcore/typography';\n\nconst ListBoxContextProvider = ({ children }) => (\n <hideScrollBarsFromScreenReadersContext.Provider value={true}>\n {children}\n </hideScrollBarsFromScreenReadersContext.Provider>\n);\n\nconst menuItemContext = React.createContext({});\n\nclass DropdownMenuRoot extends AbstractDropdown {\n static displayName = 'DropdownMenu';\n static style = style;\n static enhance = Object.values(enhance);\n\n static defaultProps = {\n size: 'm',\n defaultVisible: false,\n defaultHighlightedIndex: 0,\n defaultSelectedIndex: 0,\n i18n: localizedMessages,\n locale: 'en',\n interaction: 'click',\n inlineActions: false,\n placement: 'bottom-start',\n timeout: 0,\n };\n\n static nestedMenuInteraction = {\n trigger: [\n ['onClick', 'onMouseEnter'],\n ['onClick', 'onMouseLeave'],\n ],\n popper: [['onMouseEnter'], ['onMouseLeave']],\n };\n\n actionsRef = React.createRef();\n role = 'menu';\n\n uncontrolledProps() {\n return {\n ...super.uncontrolledProps(),\n visible: [\n null,\n (visible) => {\n if (visible === true) {\n setTimeout(() => {\n const options = this.menuRef.current?.querySelectorAll(\n '[role=\"menuitemcheckbox\"], [role=\"menuitemradio\"]',\n );\n const selected = this.menuRef.current?.querySelector('[aria-checked=\"true\"]');\n\n if (selected && options && this.asProps.itemsCount === undefined) {\n this.scrollToNode(selected, true);\n\n for (let i = 0; i < options.length; i++) {\n if (options[i] === selected) {\n this.handlers.highlightedIndex(i);\n break;\n }\n }\n }\n // for some reason, Google Chrome optimizes this timeout with 0 value with previous render (when we set aria-selected)\n // and that's why its skip scrollToNodes. We selected the appropriate timeout manually.\n }, 30);\n }\n },\n ],\n };\n }\n\n itemRef(props, index, node) {\n super.itemRef(props, index, node);\n\n if (node === document.activeElement) {\n super.scrollToNode(node);\n }\n }\n\n getTriggerProps() {\n const { Children, uid, visible } = this.asProps;\n const hasMenu = isAdvanceMode(Children, [DropdownMenu.Menu.displayName]);\n const ariaControls = hasMenu ? `igc-${uid}-list` : `igc-${uid}-popper`;\n\n return {\n ...super.getTriggerProps(),\n onKeyDown: callAllEventHandlers(\n this.handlePreventCommonKeyDown.bind(this),\n this.handleOpenKeyDown.bind(this),\n this.handleKeyDownForMenu('trigger'),\n ),\n 'aria-controls': visible ? ariaControls : undefined,\n 'aria-haspopup': hasMenu ? 'true' : 'dialog',\n };\n }\n\n getListProps() {\n return {\n ...super.getListProps(),\n onKeyDown: callAllEventHandlers(\n this.handlePreventCommonKeyDown.bind(this),\n this.handleKeyDownForMenu('list'),\n this.handleArrowKeyDown.bind(this),\n ),\n };\n }\n\n getPopperProps() {\n return {\n ...super.getPopperProps(),\n onKeyDown: callAllEventHandlers(\n this.handlePreventCommonKeyDown.bind(this),\n this.handlePreventPopperKeyDown.bind(this),\n ),\n };\n }\n\n getActionsProps() {\n return {\n ...this.getListProps(),\n ref: this.actionsRef,\n onKeyDown: callAllEventHandlers(\n this.handlePreventTabOnActions.bind(this),\n this.handlePreventCommonKeyDown.bind(this),\n this.handleKeyDownForMenu('list'),\n this.handleArrowKeyDown.bind(this),\n ),\n };\n }\n\n getItemProps(props, index) {\n const { highlightedIndex, visible } = this.asProps;\n const realIndex = props.index ?? index;\n const isHighlighted = realIndex === highlightedIndex;\n const itemProps = {\n ...super.getItemProps(props, realIndex),\n tabIndex: isHighlighted && visible ? 0 : -1,\n ref: (node) => this.itemRef(props, realIndex, node),\n actionsRef: this.actionsRef,\n };\n\n if (props.tag === ButtonComponent) {\n itemProps.use = props.use ?? 'tertiary';\n itemProps.theme = props.theme ?? 'muted';\n itemProps.size = props.size ?? 's';\n }\n\n if (props.selected) {\n itemProps['aria-checked'] = true;\n }\n\n if (super.childRole === 'menuitemradio') {\n itemProps.onClick = () => {\n this.handlers.visible(false);\n };\n }\n\n return itemProps;\n }\n\n handleKeyDownForMenu(place) {\n return (e) => {\n const { visible, placement, inlineActions } = this.asProps;\n\n // stop propagation keyboard events if it calls not on DropdownMenu.Items\n if (place === 'list' && !this.menuRef.current?.contains(e.target) && !inlineActions) {\n e.stopPropagation();\n return false;\n }\n\n const show =\n (e.key === 'ArrowRight' && placement?.startsWith('right')) ||\n (e.key === 'ArrowLeft' && placement?.startsWith('left'));\n const hide =\n (e.key === 'ArrowLeft' && placement?.startsWith('right')) ||\n (e.key === 'ArrowRight' && placement?.startsWith('left')) ||\n e.key === 'Escape';\n const isMenuItem = e.target.getAttribute('role')?.startsWith(super.childRole);\n\n if (place === 'trigger' && (!visible || inlineActions) && show && isMenuItem) {\n this.handlers.visible(true);\n this.handlers.highlightedIndex(0);\n setTimeout(() => {\n const { highlightedIndex } = this.asProps;\n this.itemRefs[highlightedIndex]?.focus();\n }, 0);\n\n e.preventDefault();\n e.stopPropagation();\n return false;\n }\n if (place === 'list' && visible && hide && isMenuItem) {\n if (\n !inlineActions ||\n (inlineActions && (e.key === 'Escape' || this.asProps.highlightedIndex === 0))\n ) {\n this.handlers.visible(false);\n this.triggerRef.current?.focus();\n\n e.preventDefault();\n e.stopPropagation();\n return false;\n }\n }\n };\n }\n\n handlePreventTabOnActions(e) {\n if (e.key === 'Tab') {\n e.stopPropagation();\n e.preventDefault();\n return false;\n }\n }\n\n render() {\n const { Children, selectedIndex, interaction, timeout } = this.asProps;\n\n this.itemProps = [];\n\n return (\n <selectedIndexContext.Provider value={selectedIndex}>\n <Root\n render={Dropdown}\n timeout={timeout || (interaction === 'hover' ? [0, 100] : undefined)}\n >\n <Children />\n </Root>\n </selectedIndexContext.Provider>\n );\n }\n}\n\nfunction List({ styles, Children }) {\n const SDropdownMenuList = Root;\n\n return sstyled(styles)(\n <ListBoxContextProvider>\n <SDropdownMenuList render={ScrollAreaComponent} shadow={true}>\n <ScrollAreaComponent.Container tabIndex={undefined}>\n <Children />\n </ScrollAreaComponent.Container>\n <ScrollAreaComponent.Bar orientation='horizontal' />\n <ScrollAreaComponent.Bar orientation='vertical' />\n </SDropdownMenuList>\n </ListBoxContextProvider>,\n );\n}\nfunction Actions({ styles }) {\n const SDropdownMenuActions = Root;\n\n return sstyled(styles)(<SDropdownMenuActions render={Flex} />);\n}\n\nfunction Menu(props) {\n const {\n visible,\n disablePortal,\n ignorePortalsStacking,\n disableEnforceFocus,\n interaction,\n autoFocus,\n animationsDisabled,\n } = props;\n const popperProps = {\n visible,\n disablePortal,\n ignorePortalsStacking,\n disableEnforceFocus,\n interaction,\n autoFocus,\n animationsDisabled,\n };\n return (\n <ListBoxContextProvider>\n <DropdownMenu.Popper {...popperProps} role={null}>\n <Root render={DropdownMenu.List} />\n </DropdownMenu.Popper>\n </ListBoxContextProvider>\n );\n}\n\nfunction Item({\n id,\n styles,\n disabled,\n Children,\n forwardRef,\n role,\n tabIndex,\n actionsRef,\n 'aria-checked': ariaChecked,\n}) {\n const SDropdownMenuItemContainer = Root;\n const itemRef = React.useRef();\n\n const [highlighted, setHighlighted] = React.useState(false);\n\n const menuItemContextValue = {\n contentId: id,\n ref: forkRef(forwardRef, itemRef),\n role,\n tabIndex,\n ariaChecked,\n };\n const ariaDescribes = [];\n\n const hasSubMenu = isAdvanceMode(Children, [DropdownMenu.displayName], true);\n const hasHint = isAdvanceMode(Children, [DropdownMenu.Item.Hint.displayName], true);\n const advancedMode =\n isAdvanceMode(Children, [DropdownMenu.Item.Content.displayName], true) || hasSubMenu || hasHint;\n\n if (hasHint) {\n const hintId = `igc-${useUID()}-option-hint`;\n\n menuItemContextValue.hintId = hintId;\n ariaDescribes.push(hintId);\n }\n\n if (hasSubMenu) {\n menuItemContextValue.hasSubMenu = true;\n }\n\n menuItemContextValue.ariaDescribes = ariaDescribes;\n\n React.useEffect(() => {\n const onFocus = (e) => {\n if (e.target === itemRef.current) {\n setHighlighted(true);\n\n if (hasSubMenu) {\n e.stopPropagation();\n }\n }\n };\n const onBlur = (e) => {\n if (e.target === itemRef.current) {\n setHighlighted(false);\n\n if (actionsRef.current) {\n itemRef.current.tabIndex = -1;\n }\n }\n };\n\n document.addEventListener('focus', onFocus, { capture: true });\n document.addEventListener('blur', onBlur, { capture: true });\n\n return () => {\n document.removeEventListener('focus', onFocus, { capture: true });\n document.removeEventListener('blur', onBlur, { capture: true });\n };\n }, [itemRef.current]);\n\n const focusSourceRef = useFocusSource();\n\n return sstyled(styles)(\n <menuItemContext.Provider value={menuItemContextValue}>\n <SDropdownMenuItemContainer\n render={Dropdown.Item}\n ref={advancedMode ? undefined : menuItemContextValue.ref}\n use:highlighted={!disabled && highlighted && focusSourceRef.current === 'keyboard'}\n use:role={advancedMode ? undefined : role}\n use:id={advancedMode ? undefined : id}\n use:tabIndex={advancedMode ? undefined : tabIndex}\n use:aria-checked={advancedMode ? undefined : ariaChecked}\n >\n <Children />\n </SDropdownMenuItemContainer>\n </menuItemContext.Provider>,\n );\n}\n\nfunction Addon(props) {\n const [SDropdownMenuItemAddon, { className, ...other }] = useBox(props, props.forwardRef);\n const styles = sstyled(props.styles);\n return (\n <SDropdownMenuItemAddon\n className={cn(styles.cn('SDropdownMenuItemAddon', props).className, className) || undefined}\n {...other}\n />\n );\n}\n\nfunction Trigger() {\n return <Root render={Dropdown.Trigger} />;\n}\n\nfunction ItemContent({ styles }) {\n const SItemContent = Root;\n const ref = React.useRef();\n const menuItemCtxValue = React.useContext(menuItemContext);\n\n let subMenu = undefined;\n\n if (menuItemCtxValue.hasSubMenu) {\n subMenu = 'true';\n }\n\n const [describedby, setDescribedby] = React.useState(new Set(menuItemCtxValue.ariaDescribes));\n\n React.useEffect(() => {\n const element = ref.current;\n const parent = element?.parentElement;\n\n if (\n parent.getAttribute('aria-haspopup') === 'true' &&\n parent.getAttribute('aria-describedby')\n ) {\n setDescribedby((prev) => {\n prev.add(parent.getAttribute('aria-describedby'));\n\n return new Set(prev);\n });\n }\n }, [menuItemCtxValue.ariaDescribes]);\n\n return sstyled(styles)(\n <SItemContent\n render={Flex}\n role={menuItemCtxValue.role}\n id={menuItemCtxValue.contentId}\n tabIndex={menuItemCtxValue.tabIndex}\n ref={forkRef(menuItemCtxValue.ref, ref)}\n use:aria-describedby={[...describedby].join(' ')}\n aria-haspopup={menuItemCtxValue.hasSubMenu ? 'true' : undefined}\n aria-expanded={subMenu}\n aria-checked={menuItemCtxValue.ariaChecked}\n alignItems='center'\n justifyContent={menuItemCtxValue.hasSubMenu ? 'space-between' : undefined}\n />,\n );\n}\n\nfunction ItemContentText({ styles }) {\n const SItemContentText = Root;\n return sstyled(styles)(<SItemContentText render={Text} />);\n}\n\nfunction ItemHint({ styles }) {\n const SItemHint = Root;\n const { hintId } = React.useContext(menuItemContext);\n\n return sstyled(styles)(<SItemHint render={Flex} id={hintId} aria-hidden={'true'} />);\n}\n\n/**\n * @deprecated Use Item hint\n */\nfunction Hint(props) {\n const SDropdownMenuItemContainer = Root;\n return sstyled(props.styles)(\n <SDropdownMenuItemContainer render={Dropdown.Item} variant='hint' />,\n );\n}\n/**\n * @deprecated Use Group with title prop\n */\nfunction Title(props) {\n const SDropdownMenuItemContainer = Root;\n return sstyled(props.styles)(\n <SDropdownMenuItemContainer render={Dropdown.Item} variant='title' />,\n );\n}\n\n/**\n * @deprecated\n */\nfunction Nesting({ forwardRef }) {\n return <Root render={DropdownMenu.Item} ref={forwardRef} />;\n}\n\n/**\n * @deprecated\n */\nfunction NestingTrigger({ forwardRef }) {\n return (\n <Root\n render={DropdownMenu.Item.Content}\n tag={DropdownMenu.Trigger}\n ref={forwardRef}\n use:role={'menuitem'}\n />\n );\n}\n\nconst DropdownMenu = createComponent(\n DropdownMenuRoot,\n {\n Trigger,\n Popper: Dropdown.Popper,\n List,\n Actions,\n Menu,\n Item: [Item, { Addon, Content: ItemContent, Text: ItemContentText, Hint: ItemHint }],\n /**\n * @deprecated. Use just Item. See examples on\n */\n Nesting: [Nesting, { Trigger: NestingTrigger, Addon }],\n ItemTitle: Title,\n ItemHint: Hint,\n Group: Dropdown.Group,\n },\n {\n parent: [Dropdown],\n },\n);\n\nDropdownMenu.selectedIndexContext = selectedIndexContext;\n\nexport default DropdownMenu;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,EAAE,MAAM,YAAY;AAC3B,OAAOC,eAAe,IAAIC,OAAO,EAAEC,IAAI,QAAQ,eAAe;AAC9D,OAAOC,QAAQ,IAAIC,gBAAgB,EAAEC,oBAAoB,EAAEC,OAAO,QAAQ,mBAAmB;AAC7F,SAASC,IAAI,EAAEC,MAAM,QAAQ,mBAAmB;AAChD,OAAOC,mBAAmB,IAAIC,sCAAsC,QAAQ,sBAAsB;AAClG,SAASC,MAAM,QAAQ,6BAA6B;AACpD,SAASC,iBAAiB,QAAQ,gDAAgD;AAAC;AAAA,IAAAC,KAAA,+BAAAC,QAAA,CAAAC,MAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EA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OAAO,EAAE;IAAE5C,OAAO,EAAEgD,cAAc;IAAEzD,KAAK,EAALA;EAAM,CAAC,CAAC;EACtD6D,SAAS,EAAEZ,KAAK;EAChBV,QAAQ,EAAEpD,IAAI;EACd2E,KAAK,EAAErR,QAAQ,CAACqR;AAClB,CAAC,EACD;EACEpC,MAAM,EAAE,CAACjP,QAAQ;AACnB,CAAC,CACF;AAEDkF,YAAY,CAAChF,oBAAoB,GAAGA,oBAAoB;AAExD,eAAegF,YAAY"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import { PropGetterFn, UnknownProperties, Intergalactic } from '@semcore/core';\nimport Dropdown, {\n DropdownContext,\n DropdownProps,\n DropdownHandlers,\n DropdownTriggerProps,\n DropdownPopperAriaProps,\n} from '@semcore/dropdown';\nimport { Box, BoxProps, FlexProps, Flex } from '@semcore/flex-box';\nimport { ScrollAreaProps } from '@semcore/scroll-area';\nimport { Text } from '@semcore/typography';\nimport { eventInteraction } from '@semcore/popper';\n\nexport type DropdownMenuSize = 'm' | 'l';\n\n/** @deprecated */\nexport interface IDropdownMenuProps extends DropdownMenuProps, UnknownProperties {}\nexport type DropdownMenuProps = DropdownProps & {\n /**\n * Set role `menuitemradio` (or `menuitemcheckbox` if `multiselect`) for Dropdown.Item\n */\n selectable?: boolean;\n /**\n * Multiple select\n */\n multiselect?: boolean;\n /**\n * Size of the menu\n * @default m\n */\n size?: DropdownMenuSize;\n /**\n * Index of the element selected by default\n */\n defaultHighlightedIndex?: number | null;\n /**\n * Index of the selected item\n */\n highlightedIndex?: number | null;\n /**\n * Callback for highlightedIndex change\n * highlightedIndex - Index of the selected item\n */\n onHighlightedIndexChange?: (highlightedIndex: number | null) => void;\n locale?: string;\n /**\n * Flag for menu that using as actions on DropdownMenu.Item\n */\n inlineActions?: boolean;\n};\n\n/** @deprecated */\nexport interface IDropdownMenuListProps extends DropdownMenuListProps, UnknownProperties {}\nexport type DropdownMenuListProps = BoxProps &\n ScrollAreaProps & {\n /**\n * Size of the menu\n * @default m\n */\n size?: DropdownMenuSize;\n };\n\n/** @deprecated */\nexport interface IDropdownMenuMenuProps extends DropdownMenuMenuProps, UnknownProperties {}\nexport type DropdownMenuMenuProps = DropdownMenuListProps & {};\n\n/** @deprecated */\nexport interface IDropdownMenuItemProps extends DropdownMenuItemProps, UnknownProperties {}\nexport type DropdownMenuItemProps = FlexProps & {\n /**\n * Enables selected state. For selectable dropdowns only.\n */\n selected?: boolean;\n /**\n * Disables item\n */\n disabled?: boolean;\n /**\n * Adds focus styles around\n */\n highlighted?: boolean;\n /**\n * Disables hover state\n * @deprecated use `disabled` instead\n */\n notInteractive?: boolean;\n /**\n * Size of the component\n * @default m\n */\n size?: DropdownMenuSize;\n};\n\n/** @deprecated */\nexport interface IDropdownMenuItemHintProps extends DropdownMenuItemHintProps, UnknownProperties {}\nexport type DropdownMenuItemHintProps = FlexProps & {\n /**\n * Size of the component\n * @default m\n */\n size?: DropdownMenuSize;\n};\n\n/** @deprecated */\nexport interface IDropdownMenuItemTitleProps\n extends DropdownMenuItemTitleProps,\n UnknownProperties {}\nexport type DropdownMenuItemTitleProps = FlexProps & {\n /**\n * Size of the component\n * @default m\n */\n size?: DropdownMenuSize;\n};\n\n/** @deprecated */\nexport interface IDropdownMenuContext extends DropdownMenuContext, UnknownProperties {}\nexport type DropdownMenuContext = DropdownContext & {\n highlightedIndex?: number;\n getListProps: PropGetterFn;\n getItemProps: PropGetterFn;\n getItemHintProps: PropGetterFn;\n getItemTitleProps: PropGetterFn;\n};\n\n/** @deprecated */\nexport interface IDropdownMenuHandlers extends DropdownMenuHandlers, UnknownProperties {}\nexport type DropdownMenuHandlers = DropdownHandlers & {\n highlightedIndex: (index: number) => void;\n};\n\nexport type DropdownMenuTriggerProps = DropdownTriggerProps;\n\ndeclare const DropdownMenu: Intergalactic.Component<\n 'div',\n DropdownMenuProps,\n DropdownMenuContext,\n [handlers: DropdownMenuHandlers]\n> & {\n Trigger: typeof Dropdown.Trigger;\n Popper: Intergalactic.Component<'div', DropdownMenuProps & DropdownPopperAriaProps>;\n List: Intergalactic.Component<\n 'div',\n DropdownMenuListProps,\n DropdownMenuContext,\n [handlers: DropdownMenuHandlers]\n >;\n Actions: Intergalactic.Component<\n typeof Flex,\n DropdownMenuListProps,\n DropdownMenuContext,\n [handlers: DropdownMenuHandlers]\n >;\n Menu: Intergalactic.Component<\n 'div',\n DropdownMenuMenuProps,\n DropdownMenuContext,\n [handlers: DropdownMenuHandlers]\n >;\n Item: Intergalactic.Component<\n typeof Dropdown.Item,\n DropdownMenuItemProps,\n DropdownMenuContext,\n [handlers: DropdownMenuHandlers]\n > & {\n Addon: typeof Box;\n Content: typeof Flex;\n Text: typeof Text;\n Hint: typeof Flex;\n };\n /**\n * @deprecated Use Group with title prop\n */\n ItemTitle: Intergalactic.Component<'div', DropdownMenuItemTitleProps>;\n /**\n * @deprecated Use prop subTitle on Group or Item component\n */\n ItemHint: Intergalactic.Component<'div', DropdownMenuItemHintProps>;\n Group: typeof Dropdown.Group;\n /**\n * @deprecated Use Item instead of Nesting\n */\n Nesting: Intergalactic.Component<\n 'div',\n DropdownMenuItemProps,\n DropdownMenuContext,\n [handlers: DropdownMenuHandlers]\n > & {\n /**\n * @deprecated Use Item instead of Nesting\n */\n Trigger: Intergalactic.Component<'div', DropdownMenuItemProps>;\n /**\n * @deprecated Use Item instead of Nesting\n */\n Item: Intergalactic.Component<'div', DropdownMenuItemProps>;\n /**\n * @deprecated Use Item instead of Nesting\n */\n Addon: typeof Box;\n };\n\n selectedIndexContext: React.Context<number>;\n nestedMenuInteraction: eventInteraction;\n};\n\nexport default DropdownMenu;\n"],"mappings":""}
1
+ {"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import { PropGetterFn, UnknownProperties, Intergalactic } from '@semcore/core';\nimport Dropdown, {\n DropdownContext,\n DropdownProps,\n DropdownHandlers,\n DropdownTriggerProps,\n DropdownPopperAriaProps,\n} from '@semcore/dropdown';\nimport { Box, BoxProps, FlexProps, Flex } from '@semcore/flex-box';\nimport { ScrollAreaProps } from '@semcore/scroll-area';\nimport { Text } from '@semcore/typography';\nimport { eventInteraction } from '@semcore/popper';\n\nexport type DropdownMenuSize = 'm' | 'l';\n\n/** @deprecated */\nexport interface IDropdownMenuProps extends DropdownMenuProps, UnknownProperties {}\nexport type DropdownMenuProps = DropdownProps & {\n /**\n * Set role `menuitemradio` (or `menuitemcheckbox` if `multiselect`) for Dropdown.Item\n */\n selectable?: boolean;\n /**\n * Multiple select\n */\n multiselect?: boolean;\n /**\n * Size of the menu\n * @default m\n */\n size?: DropdownMenuSize;\n /**\n * Index of the element selected by default\n */\n defaultHighlightedIndex?: number | null;\n /**\n * Index of the selected item\n */\n highlightedIndex?: number | null;\n /**\n * Callback for highlightedIndex change\n * highlightedIndex - Index of the selected item\n */\n onHighlightedIndexChange?: (highlightedIndex: number | null) => void;\n locale?: string;\n /**\n * Flag for menu that using as actions on DropdownMenu.Item\n */\n inlineActions?: boolean;\n\n /**\n * Count of menu items (for virtual lists only)\n */\n itemsCount?: number;\n};\n\n/** @deprecated */\nexport interface IDropdownMenuListProps extends DropdownMenuListProps, UnknownProperties {}\nexport type DropdownMenuListProps = BoxProps &\n ScrollAreaProps & {\n /**\n * Size of the menu\n * @default m\n */\n size?: DropdownMenuSize;\n };\n\n/** @deprecated */\nexport interface IDropdownMenuMenuProps extends DropdownMenuMenuProps, UnknownProperties {}\nexport type DropdownMenuMenuProps = DropdownMenuListProps & {};\n\n/** @deprecated */\nexport interface IDropdownMenuItemProps extends DropdownMenuItemProps, UnknownProperties {}\nexport type DropdownMenuItemProps = FlexProps & {\n /**\n * Enables selected state. For selectable dropdowns only.\n */\n selected?: boolean;\n /**\n * Disables item\n */\n disabled?: boolean;\n /**\n * Adds focus styles around\n */\n highlighted?: boolean;\n /**\n * Disables hover state\n * @deprecated use `disabled` instead\n */\n notInteractive?: boolean;\n /**\n * Size of the component\n * @default m\n */\n size?: DropdownMenuSize;\n /**\n * Index of item (used in virtualized lists)\n */\n index?: number;\n};\n\n/** @deprecated */\nexport interface IDropdownMenuItemHintProps extends DropdownMenuItemHintProps, UnknownProperties {}\nexport type DropdownMenuItemHintProps = FlexProps & {\n /**\n * Size of the component\n * @default m\n */\n size?: DropdownMenuSize;\n};\n\n/** @deprecated */\nexport interface IDropdownMenuItemTitleProps\n extends DropdownMenuItemTitleProps,\n UnknownProperties {}\nexport type DropdownMenuItemTitleProps = FlexProps & {\n /**\n * Size of the component\n * @default m\n */\n size?: DropdownMenuSize;\n};\n\n/** @deprecated */\nexport interface IDropdownMenuContext extends DropdownMenuContext, UnknownProperties {}\nexport type DropdownMenuContext = DropdownContext & {\n highlightedIndex?: number;\n getListProps: PropGetterFn;\n getItemProps: PropGetterFn;\n getItemHintProps: PropGetterFn;\n getItemTitleProps: PropGetterFn;\n};\n\n/** @deprecated */\nexport interface IDropdownMenuHandlers extends DropdownMenuHandlers, UnknownProperties {}\nexport type DropdownMenuHandlers = DropdownHandlers & {\n highlightedIndex: (index: number) => void;\n};\n\nexport type DropdownMenuTriggerProps = DropdownTriggerProps;\n\ndeclare const DropdownMenu: Intergalactic.Component<\n 'div',\n DropdownMenuProps,\n DropdownMenuContext,\n [handlers: DropdownMenuHandlers]\n> & {\n Trigger: typeof Dropdown.Trigger;\n Popper: Intergalactic.Component<'div', DropdownMenuProps & DropdownPopperAriaProps>;\n List: Intergalactic.Component<\n 'div',\n DropdownMenuListProps,\n DropdownMenuContext,\n [handlers: DropdownMenuHandlers]\n >;\n Actions: Intergalactic.Component<\n typeof Flex,\n DropdownMenuListProps,\n DropdownMenuContext,\n [handlers: DropdownMenuHandlers]\n >;\n Menu: Intergalactic.Component<\n 'div',\n DropdownMenuMenuProps,\n DropdownMenuContext,\n [handlers: DropdownMenuHandlers]\n >;\n Item: Intergalactic.Component<\n typeof Dropdown.Item,\n DropdownMenuItemProps,\n DropdownMenuContext,\n [handlers: DropdownMenuHandlers]\n > & {\n Addon: typeof Box;\n Content: typeof Flex;\n Text: typeof Text;\n Hint: typeof Flex;\n };\n /**\n * @deprecated Use Group with title prop\n */\n ItemTitle: Intergalactic.Component<'div', DropdownMenuItemTitleProps>;\n /**\n * @deprecated Use prop subTitle on Group or Item component\n */\n ItemHint: Intergalactic.Component<'div', DropdownMenuItemHintProps>;\n Group: typeof Dropdown.Group;\n /**\n * @deprecated Use Item instead of Nesting\n */\n Nesting: Intergalactic.Component<\n 'div',\n DropdownMenuItemProps,\n DropdownMenuContext,\n [handlers: DropdownMenuHandlers]\n > & {\n /**\n * @deprecated Use Item instead of Nesting\n */\n Trigger: Intergalactic.Component<'div', DropdownMenuItemProps>;\n /**\n * @deprecated Use Item instead of Nesting\n */\n Item: Intergalactic.Component<'div', DropdownMenuItemProps>;\n /**\n * @deprecated Use Item instead of Nesting\n */\n Addon: typeof Box;\n };\n\n selectedIndexContext: React.Context<number>;\n nestedMenuInteraction: eventInteraction;\n};\n\nexport default DropdownMenu;\n"],"mappings":""}
@@ -47,6 +47,11 @@ export type DropdownMenuProps = DropdownProps & {
47
47
  * Flag for menu that using as actions on DropdownMenu.Item
48
48
  */
49
49
  inlineActions?: boolean;
50
+
51
+ /**
52
+ * Count of menu items (for virtual lists only)
53
+ */
54
+ itemsCount?: number;
50
55
  };
51
56
 
52
57
  /** @deprecated */
@@ -89,6 +94,10 @@ export type DropdownMenuItemProps = FlexProps & {
89
94
  * @default m
90
95
  */
91
96
  size?: DropdownMenuSize;
97
+ /**
98
+ * Index of item (used in virtualized lists)
99
+ */
100
+ index?: number;
92
101
  };
93
102
 
94
103
  /** @deprecated */
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.45.1",
4
+ "version": "4.45.2-prerelease.11",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/es6/index.js",
7
7
  "typings": "lib/types/index.d.ts",
@@ -9,16 +9,16 @@
9
9
  "author": "UI-kit team <ui-kit-team@semrush.com>",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
- "@semcore/dropdown": "4.42.3",
13
- "@semcore/flex-box": "5.40.1",
14
- "@semcore/scroll-area": "5.44.1",
15
- "@semcore/utils": "4.45.1",
16
- "@semcore/icon": "4.57.1",
17
- "@semcore/typography": "5.51.1",
12
+ "@semcore/dropdown": "4.42.4-prerelease.11",
13
+ "@semcore/flex-box": "5.41.0-prerelease.11",
14
+ "@semcore/scroll-area": "5.45.0-prerelease.11",
15
+ "@semcore/utils": "4.47.1-prerelease.11",
16
+ "@semcore/icon": "4.58.0-prerelease.11",
17
+ "@semcore/typography": "5.52.0-prerelease.11",
18
18
  "classnames": "2.2.6"
19
19
  },
20
20
  "peerDependencies": {
21
- "@semcore/core": "^2.17.5",
21
+ "@semcore/core": "^2.39.0-prerelease.11",
22
22
  "react": "16.8 - 18",
23
23
  "react-dom": "16.8 - 18"
24
24
  },
@@ -32,8 +32,8 @@
32
32
  "@types/classnames": "2.2.6",
33
33
  "@semcore/testing-utils": "1.0.0",
34
34
  "@semcore/base-trigger": "4.26.1",
35
- "@semcore/icon": "4.57.1",
36
- "@semcore/button": "5.41.2"
35
+ "@semcore/icon": "4.58.0-prerelease.11",
36
+ "@semcore/button": "5.42.0-prerelease.11"
37
37
  },
38
38
  "scripts": {
39
39
  "build": "pnpm semcore-builder --source=js"