@semcore/dropdown-menu 4.25.0 → 4.26.0

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,18 @@
2
2
 
3
3
  CHANGELOG.md standards are inspired by [keepachangelog.com](https://keepachangelog.com/en/1.0.0/).
4
4
 
5
+ ## [4.26.0] - 2024-04-03
6
+
7
+ ### Added
8
+
9
+ - `DropdownMenu.Nesting.Item` for more granular control over nested dropdown menus.
10
+
11
+ ## [4.25.1] - 2024-04-03
12
+
13
+ ### Fixed
14
+
15
+ - Menu item was displaying highlighted ring when dropdown is opened by mouse interaction.
16
+
5
17
  ## [4.25.0] - 2024-03-27
6
18
 
7
19
  ### Changed
@@ -31,23 +31,25 @@ var _styleScrollArea = _interopRequireDefault(require("./styleScrollArea"));
31
31
  var _setFocus = require("@semcore/utils/lib/focus-lock/setFocus");
32
32
  var _isFocusInside = require("@semcore/utils/lib/focus-lock/isFocusInside");
33
33
  var _getFocusableIn = require("@semcore/utils/lib/focus-lock/getFocusableIn");
34
+ var _keyboardFocusEnhance = _interopRequireDefault(require("@semcore/utils/lib/enhances/keyboardFocusEnhance"));
34
35
  var _excluded = ["className"];
35
36
  /*__reshadow-styles__:"./style/dropdown-menu.shadow.css"*/
36
- var style = ( /*__reshadow_css_start__*/_core.sstyled.insert( /*__inner_css_start__*/".___SDropdownMenuItem_1c4hq_gg_,.___SDropdownMenuList_1c4hq_gg_{position:relative;color:var(--intergalactic-text-primary, #191b23)}.___SDropdownMenuList_1c4hq_gg_{max-height:240px;padding:var(--intergalactic-spacing-1x, 4px)0;min-height:26px;min-width:32px;box-sizing:content-box;z-index:0}.___SDropdownMenuItem_1c4hq_gg_{display:flex;align-items:center;-webkit-text-decoration:none;text-decoration:none;box-sizing:border-box;cursor:pointer;width:100%;text-align:left;line-height:normal}@media (hover:hover){.___SDropdownMenuItem_1c4hq_gg_:hover{background-color:var(--intergalactic-dropdown-menu-item-hover, #f4f5f9)}}.___SDropdownMenuItem_1c4hq_gg_:focus{outline:0}.___SDropdownMenuItem_1c4hq_gg_.__selected_1c4hq_gg_{background-color:var(--intergalactic-dropdown-menu-item-selected, rgba(196, 229, 254, 0.7));box-shadow:2px 0 0 0 var(--intergalactic-control-primary-info, #008ff8) inset}@media (hover:hover){.___SDropdownMenuItem_1c4hq_gg_.__selected_1c4hq_gg_:hover{background-color:var(--intergalactic-dropdown-menu-item-selected-hover, #c4e5fe)}}.___SDropdownMenuItem_1c4hq_gg_.__highlighted_1c4hq_gg_:not(:focus-within){z-index:1;box-shadow:var(--intergalactic-keyboard-focus, 0px 0px 0px 3px rgba(0, 143, 248, 0.5)) inset}.___SDropdownMenuItem_1c4hq_gg_.__disabled_1c4hq_gg_{opacity:var(--intergalactic-disabled-opacity, 0.3);cursor:default;pointer-events:none}.___SDropdownMenuItem_1c4hq_gg_._size_l_1c4hq_gg_{font-size:var(--intergalactic-fs-300, 16px);line-height:var(--intergalactic-lh-300, 150%);padding:var(--intergalactic-spacing-2x, 8px) var(--intergalactic-spacing-3x, 12px);min-height:40px}.___SDropdownMenuItem_1c4hq_gg_._size_m_1c4hq_gg_{font-size:var(--intergalactic-fs-200, 14px);line-height:var(--intergalactic-lh-200, 142%);padding:calc(var(--intergalactic-spacing-1x, 4px) + var(--intergalactic-spacing-05x, 2px)) var(--intergalactic-spacing-2x, 8px);min-height:32px}.___SDropdownMenuItem_1c4hq_gg_.__notInteractive_1c4hq_gg_{cursor:default}@media (hover:hover){.___SDropdownMenuItem_1c4hq_gg_.__notInteractive_1c4hq_gg_:hover{background:0 0}}.___SDropdownMenuItem_1c4hq_gg_._variant_hint_1c4hq_gg_{color:var(--intergalactic-text-secondary, #6c6e79);cursor:default}@media (hover:hover){.___SDropdownMenuItem_1c4hq_gg_._variant_hint_1c4hq_gg_:hover{background:0 0}}.___SDropdownMenuItem_1c4hq_gg_._variant_title_1c4hq_gg_{font-weight:var(--intergalactic-bold, 700);cursor:default}@media (hover:hover){.___SDropdownMenuItem_1c4hq_gg_._variant_title_1c4hq_gg_:hover{background:0 0}}.___SDropdownMenuItem_1c4hq_gg_.__visible_1c4hq_gg_{background-color:var(--intergalactic-dropdown-menu-item-hover, #f4f5f9)}.___SDropdownMenuItem_1c4hq_gg_.__nesting-trigger_1c4hq_gg_{justify-content:space-between}.___SDropdownMenuItemAddon_1c4hq_gg_{display:inline-flex;margin-left:var(--intergalactic-spacing-2x, 8px);margin-right:var(--intergalactic-spacing-2x, 8px)}.___SDropdownMenuItemAddon_1c4hq_gg_:first-child{margin-left:0}.___SDropdownMenuItemAddon_1c4hq_gg_:last-child{margin-right:0}.___SDropdownMenuNesting_1c4hq_gg_,.___SDropdownMenuNesting_1c4hq_gg_._size_l_1c4hq_gg_,.___SDropdownMenuNesting_1c4hq_gg_._size_m_1c4hq_gg_{padding:0}.___SDropdownMenuNesting_1c4hq_gg_.__highlighted_1c4hq_gg_{z-index:1;box-shadow:var(--intergalactic-keyboard-focus, 0px 0px 0px 3px rgba(0, 143, 248, 0.5)) inset}" /*__inner_css_end__*/, "1c4hq_gg_") /*__reshadow_css_end__*/, {
37
- "__SDropdownMenuList": "___SDropdownMenuList_1c4hq_gg_",
38
- "__SDropdownMenuItem": "___SDropdownMenuItem_1c4hq_gg_",
39
- "_highlighted": "__highlighted_1c4hq_gg_",
40
- "_disabled": "__disabled_1c4hq_gg_",
41
- "_size_l": "_size_l_1c4hq_gg_",
42
- "_size_m": "_size_m_1c4hq_gg_",
43
- "_visible": "__visible_1c4hq_gg_",
44
- "_nesting-trigger": "__nesting-trigger_1c4hq_gg_",
45
- "__SDropdownMenuNesting": "___SDropdownMenuNesting_1c4hq_gg_",
46
- "_selected": "__selected_1c4hq_gg_",
47
- "_notInteractive": "__notInteractive_1c4hq_gg_",
48
- "_variant_hint": "_variant_hint_1c4hq_gg_",
49
- "_variant_title": "_variant_title_1c4hq_gg_",
50
- "__SDropdownMenuItemAddon": "___SDropdownMenuItemAddon_1c4hq_gg_"
37
+ var style = ( /*__reshadow_css_start__*/_core.sstyled.insert( /*__inner_css_start__*/".___SDropdownMenuItem_1w8a3_gg_,.___SDropdownMenuList_1w8a3_gg_{position:relative;color:var(--intergalactic-text-primary, #191b23)}.___SDropdownMenuList_1w8a3_gg_{max-height:240px;padding:var(--intergalactic-spacing-1x, 4px)0;min-height:26px;min-width:32px;box-sizing:content-box;z-index:0}.___SDropdownMenuItem_1w8a3_gg_{display:flex;align-items:center;-webkit-text-decoration:none;text-decoration:none;box-sizing:border-box;cursor:pointer;width:100%;text-align:left;line-height:normal}@media (hover:hover){.___SDropdownMenuItem_1w8a3_gg_:hover{background-color:var(--intergalactic-dropdown-menu-item-hover, #f4f5f9)}}.___SDropdownMenuItem_1w8a3_gg_:focus{outline:0}.___SDropdownMenuItem_1w8a3_gg_.__selected_1w8a3_gg_{background-color:var(--intergalactic-dropdown-menu-item-selected, rgba(196, 229, 254, 0.7));box-shadow:2px 0 0 0 var(--intergalactic-control-primary-info, #008ff8) inset}@media (hover:hover){.___SDropdownMenuItem_1w8a3_gg_.__selected_1w8a3_gg_:hover{background-color:var(--intergalactic-dropdown-menu-item-selected-hover, #c4e5fe)}}.___SDropdownMenuItem_1w8a3_gg_.__highlighted_1w8a3_gg_:not(:focus-within){z-index:1;box-shadow:var(--intergalactic-keyboard-focus, 0px 0px 0px 3px rgba(0, 143, 248, 0.5)) inset}.___SDropdownMenuItem_1w8a3_gg_.__disabled_1w8a3_gg_{opacity:var(--intergalactic-disabled-opacity, 0.3);cursor:default;pointer-events:none}.___SDropdownMenuItem_1w8a3_gg_._size_l_1w8a3_gg_{font-size:var(--intergalactic-fs-300, 16px);line-height:var(--intergalactic-lh-300, 150%);padding:var(--intergalactic-spacing-2x, 8px) var(--intergalactic-spacing-3x, 12px);min-height:40px}.___SDropdownMenuItem_1w8a3_gg_._size_m_1w8a3_gg_{font-size:var(--intergalactic-fs-200, 14px);line-height:var(--intergalactic-lh-200, 142%);padding:calc(var(--intergalactic-spacing-1x, 4px) + var(--intergalactic-spacing-05x, 2px)) var(--intergalactic-spacing-2x, 8px);min-height:32px}.___SDropdownMenuItem_1w8a3_gg_.__notInteractive_1w8a3_gg_{cursor:default}@media (hover:hover){.___SDropdownMenuItem_1w8a3_gg_.__notInteractive_1w8a3_gg_:hover{background:0 0}}.___SDropdownMenuItem_1w8a3_gg_._variant_hint_1w8a3_gg_{color:var(--intergalactic-text-secondary, #6c6e79);cursor:default}@media (hover:hover){.___SDropdownMenuItem_1w8a3_gg_._variant_hint_1w8a3_gg_:hover{background:0 0}}.___SDropdownMenuItem_1w8a3_gg_._variant_title_1w8a3_gg_{font-weight:var(--intergalactic-bold, 700);cursor:default}@media (hover:hover){.___SDropdownMenuItem_1w8a3_gg_._variant_title_1w8a3_gg_:hover{background:0 0}}.___SDropdownMenuItem_1w8a3_gg_.__visible_1w8a3_gg_{background-color:var(--intergalactic-dropdown-menu-item-hover, #f4f5f9)}.___SDropdownMenuItem_1w8a3_gg_.__nesting-trigger_1w8a3_gg_{justify-content:space-between}.___SDropdownMenuItemAddon_1w8a3_gg_{display:inline-flex;margin-left:var(--intergalactic-spacing-2x, 8px);margin-right:var(--intergalactic-spacing-2x, 8px)}.___SDropdownMenuItemAddon_1w8a3_gg_:first-child{margin-left:0}.___SDropdownMenuItemAddon_1w8a3_gg_:last-child{margin-right:0}.___SDropdownMenuNesting_1w8a3_gg_,.___SDropdownMenuNesting_1w8a3_gg_._size_l_1w8a3_gg_,.___SDropdownMenuNesting_1w8a3_gg_._size_m_1w8a3_gg_{padding:0}.___SDropdownMenuNesting_1w8a3_gg_.__highlighted_1w8a3_gg_{z-index:1;box-shadow:var(--intergalactic-keyboard-focus, 0px 0px 0px 3px rgba(0, 143, 248, 0.5)) inset}.___SDropdownNestingItem_1w8a3_gg_._size_l_1w8a3_gg_,.___SDropdownNestingItem_1w8a3_gg_._size_m_1w8a3_gg_{padding-right:0}.___SDropdownNestingItem_1w8a3_gg_ .___SDropdownMenuItem_1w8a3_gg_{width:auto;padding-top:0;padding-bottom:0;padding-left:0;min-height:auto}" /*__inner_css_end__*/, "1w8a3_gg_") /*__reshadow_css_end__*/, {
38
+ "__SDropdownMenuList": "___SDropdownMenuList_1w8a3_gg_",
39
+ "__SDropdownMenuItem": "___SDropdownMenuItem_1w8a3_gg_",
40
+ "_highlighted": "__highlighted_1w8a3_gg_",
41
+ "_disabled": "__disabled_1w8a3_gg_",
42
+ "_size_l": "_size_l_1w8a3_gg_",
43
+ "_size_m": "_size_m_1w8a3_gg_",
44
+ "_visible": "__visible_1w8a3_gg_",
45
+ "_nesting-trigger": "__nesting-trigger_1w8a3_gg_",
46
+ "__SDropdownMenuNesting": "___SDropdownMenuNesting_1w8a3_gg_",
47
+ "__SDropdownNestingItem": "___SDropdownNestingItem_1w8a3_gg_",
48
+ "_selected": "__selected_1w8a3_gg_",
49
+ "_notInteractive": "__notInteractive_1w8a3_gg_",
50
+ "_variant_hint": "_variant_hint_1w8a3_gg_",
51
+ "_variant_title": "_variant_title_1w8a3_gg_",
52
+ "__SDropdownMenuItemAddon": "___SDropdownMenuItemAddon_1w8a3_gg_"
51
53
  });
52
54
  var DropdownMenuRoot = /*#__PURE__*/function (_Component) {
53
55
  (0, _inherits2["default"])(DropdownMenuRoot, _Component);
@@ -60,7 +62,8 @@ var DropdownMenuRoot = /*#__PURE__*/function (_Component) {
60
62
  }
61
63
  _this = _super.call.apply(_super, [this].concat(args));
62
64
  (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "state", {
63
- focusLockItemIndex: null
65
+ focusLockItemIndex: null,
66
+ keyboardFocused: false
64
67
  });
65
68
  (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "popperRef", /*#__PURE__*/_react["default"].createRef());
66
69
  (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "triggerRef", /*#__PURE__*/_react["default"].createRef());
@@ -199,6 +202,11 @@ var DropdownMenuRoot = /*#__PURE__*/function (_Component) {
199
202
  (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "handleTriggerKeyboardFocus", function () {
200
203
  if (_this.ignoreTriggerKeyboardFocusUntil > Date.now()) return false;
201
204
  });
205
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "handleTriggerKeyboardFocusedStateChange", function (keyboardFocused) {
206
+ _this.setState({
207
+ keyboardFocused: keyboardFocused
208
+ });
209
+ });
202
210
  (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "handleItemFocusOut", function (event) {
203
211
  if (event.relatedTarget === _this.popperRef.current) return;
204
212
  var focused = event.relatedTarget;
@@ -252,6 +260,9 @@ var DropdownMenuRoot = /*#__PURE__*/function (_Component) {
252
260
  onNestedVisibleChange: _this.handleNestedVisibleChange
253
261
  };
254
262
  });
263
+ (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "getNestingItemProps", function () {
264
+ return _this.getNestingTriggerProps();
265
+ });
255
266
  (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "scrollToNode", function (node) {
256
267
  if (node) {
257
268
  _this.highlightedItemRef.current = node;
@@ -310,7 +321,8 @@ var DropdownMenuRoot = /*#__PURE__*/function (_Component) {
310
321
  'aria-activedescendant': visible && highlightedIndex !== null ? "igc-".concat(uid, "-option-").concat(highlightedIndex) : undefined,
311
322
  onKeyDown: this.bindHandlerKeyDown('trigger'),
312
323
  ref: this.triggerRef,
313
- onKeyboardFocus: this.handleTriggerKeyboardFocus
324
+ onKeyboardFocus: this.handleTriggerKeyboardFocus,
325
+ onKeyboardFocusedStateChange: this.handleTriggerKeyboardFocusedStateChange
314
326
  };
315
327
  }
316
328
  }, {
@@ -372,7 +384,8 @@ var DropdownMenuRoot = /*#__PURE__*/function (_Component) {
372
384
  triggerRef: this.triggerRef,
373
385
  ref: ref,
374
386
  index: index,
375
- handleFocusOut: this.handleItemFocusOut
387
+ handleFocusOut: this.handleItemFocusOut,
388
+ keyboardFocused: this.state.keyboardFocused
376
389
  };
377
390
  }
378
391
  }, {
@@ -462,10 +475,10 @@ var DropdownMenuRoot = /*#__PURE__*/function (_Component) {
462
475
  });
463
476
  function List(props) {
464
477
  var _ref2 = arguments[0],
465
- _ref10;
478
+ _ref11;
466
479
  var SDropdownMenuList = _scrollArea["default"];
467
480
  var uid = props.uid;
468
- return _ref10 = (0, _core.sstyled)(props.styles), /*#__PURE__*/_react["default"].createElement(SDropdownMenuList, _ref10.cn("SDropdownMenuList", (0, _objectSpread2["default"])({}, (0, _core.assignProps)({
481
+ return _ref11 = (0, _core.sstyled)(props.styles), /*#__PURE__*/_react["default"].createElement(SDropdownMenuList, _ref11.cn("SDropdownMenuList", (0, _objectSpread2["default"])({}, (0, _core.assignProps)({
469
482
  "tabIndex": null,
470
483
  "role": 'menu',
471
484
  "aria-labelledby": "igc-".concat(uid, "-trigger"),
@@ -493,33 +506,34 @@ function Menu(props) {
493
506
  };
494
507
  return /*#__PURE__*/_react["default"].createElement(DropdownMenu.Popper, popperProps, /*#__PURE__*/_react["default"].createElement(DropdownMenu.List, (0, _core.assignProps)({}, _ref3)));
495
508
  }
496
- function Item(_ref16) {
509
+ function Item(_ref18) {
497
510
  var _ref4 = arguments[0],
498
- _ref11;
499
- var styles = _ref16.styles,
500
- label = _ref16.label,
501
- triggerRef = _ref16.triggerRef,
502
- focusLock = _ref16.focusLock,
503
- disabled = _ref16.disabled,
504
- highlighted = _ref16.highlighted,
505
- handleFocusOut = _ref16.handleFocusOut;
511
+ _ref12;
512
+ var styles = _ref18.styles,
513
+ label = _ref18.label,
514
+ triggerRef = _ref18.triggerRef,
515
+ focusLock = _ref18.focusLock,
516
+ disabled = _ref18.disabled,
517
+ highlighted = _ref18.highlighted,
518
+ handleFocusOut = _ref18.handleFocusOut,
519
+ keyboardFocused = _ref18.keyboardFocused;
506
520
  var SDropdownMenuItem = _flexBox.Flex;
507
521
  var ref = _react["default"].useRef();
508
522
  (0, _useFocusLock.useFocusLock)(ref, false, triggerRef, !focusLock || disabled, true, handleFocusOut);
509
- return _ref11 = (0, _core.sstyled)(styles), /*#__PURE__*/_react["default"].createElement(SDropdownMenuItem, _ref11.cn("SDropdownMenuItem", (0, _objectSpread2["default"])({}, (0, _core.assignProps)({
523
+ return _ref12 = (0, _core.sstyled)(styles), /*#__PURE__*/_react["default"].createElement(SDropdownMenuItem, _ref12.cn("SDropdownMenuItem", (0, _objectSpread2["default"])({}, (0, _core.assignProps)({
510
524
  "ref": ref,
511
525
  "role": 'menuitem',
512
526
  "tabIndex": -1,
513
527
  "id": label,
514
- "use:highlighted": !disabled && highlighted
528
+ "use:highlighted": !disabled && highlighted && keyboardFocused
515
529
  }, _ref4))));
516
530
  }
517
531
  var NestingContext = /*#__PURE__*/_react["default"].createContext(null);
518
- function Nesting(_ref17) {
532
+ function Nesting(_ref19) {
519
533
  var _ref5 = arguments[0],
520
- _ref12;
521
- var styles = _ref17.styles,
522
- disabled = _ref17.disabled;
534
+ _ref13;
535
+ var styles = _ref19.styles,
536
+ disabled = _ref19.disabled;
523
537
  var SDropdownMenuNesting = DropdownMenu.Item;
524
538
  var contextValue = _react["default"].useMemo(function () {
525
539
  return {
@@ -528,13 +542,13 @@ function Nesting(_ref17) {
528
542
  }, [disabled]);
529
543
  return /*#__PURE__*/_react["default"].createElement(NestingContext.Provider, {
530
544
  value: contextValue
531
- }, (_ref12 = (0, _core.sstyled)(styles), /*#__PURE__*/_react["default"].createElement(SDropdownMenuNesting, _ref12.cn("SDropdownMenuNesting", (0, _objectSpread2["default"])({}, (0, _core.assignProps)({
545
+ }, (_ref13 = (0, _core.sstyled)(styles), /*#__PURE__*/_react["default"].createElement(SDropdownMenuNesting, _ref13.cn("SDropdownMenuNesting", (0, _objectSpread2["default"])({}, (0, _core.assignProps)({
532
546
  "aria-haspopup": 'true'
533
547
  }, _ref5))))));
534
548
  }
535
549
  function NestingTrigger(props) {
536
550
  var _ref6 = arguments[0],
537
- _ref13;
551
+ _ref14;
538
552
  var styles = props.styles,
539
553
  visible = props.visible,
540
554
  onNestedVisibleChange = props.onNestedVisibleChange;
@@ -569,11 +583,20 @@ function NestingTrigger(props) {
569
583
  }, []);
570
584
  return /*#__PURE__*/_react["default"].createElement(NestingContext.Provider, {
571
585
  value: null
572
- }, (_ref13 = (0, _core.sstyled)(styles), /*#__PURE__*/_react["default"].createElement(SDropdownMenuItem, _ref13.cn("SDropdownMenuItem", (0, _objectSpread2["default"])({}, (0, _core.assignProps)({
586
+ }, (_ref14 = (0, _core.sstyled)(styles), /*#__PURE__*/_react["default"].createElement(SDropdownMenuItem, _ref14.cn("SDropdownMenuItem", (0, _objectSpread2["default"])({}, (0, _core.assignProps)({
573
587
  "nesting-trigger": true,
574
588
  "tabIndex": !disabled ? 0 : undefined
575
589
  }, _ref6))))));
576
590
  }
591
+ function NestingItem(props) {
592
+ var _ref7 = arguments[0],
593
+ _ref15;
594
+ var styles = props.styles;
595
+ var SDropdownNestingItem = NestingTrigger;
596
+ return _ref15 = (0, _core.sstyled)(styles), /*#__PURE__*/_react["default"].createElement(SDropdownNestingItem, _ref15.cn("SDropdownNestingItem", (0, _objectSpread2["default"])({}, (0, _core.assignProps)({
597
+ "tabIndex": -1
598
+ }, _ref7))));
599
+ }
577
600
  function Addon(props) {
578
601
  var _useBox = (0, _flexBox.useBox)(props, props.forwardRef),
579
602
  _useBox2 = (0, _slicedToArray2["default"])(_useBox, 2),
@@ -587,27 +610,33 @@ function Addon(props) {
587
610
  }, other));
588
611
  }
589
612
  function Hint(props) {
590
- var _ref7 = arguments[0],
591
- _ref14;
613
+ var _ref8 = arguments[0],
614
+ _ref16;
592
615
  var SDropdownMenuItem = _flexBox.Flex;
593
- return _ref14 = (0, _core.sstyled)(props.styles), /*#__PURE__*/_react["default"].createElement(SDropdownMenuItem, _ref14.cn("SDropdownMenuItem", (0, _objectSpread2["default"])({}, (0, _core.assignProps)({
616
+ return _ref16 = (0, _core.sstyled)(props.styles), /*#__PURE__*/_react["default"].createElement(SDropdownMenuItem, _ref16.cn("SDropdownMenuItem", (0, _objectSpread2["default"])({}, (0, _core.assignProps)({
594
617
  "variant": 'hint'
595
- }, _ref7))));
618
+ }, _ref8))));
596
619
  }
597
620
  function Title(props) {
598
- var _ref8 = arguments[0],
599
- _ref15;
621
+ var _ref9 = arguments[0],
622
+ _ref17;
600
623
  var SDropdownMenuItem = _flexBox.Flex;
601
- return _ref15 = (0, _core.sstyled)(props.styles), /*#__PURE__*/_react["default"].createElement(SDropdownMenuItem, _ref15.cn("SDropdownMenuItem", (0, _objectSpread2["default"])({}, (0, _core.assignProps)({
624
+ return _ref17 = (0, _core.sstyled)(props.styles), /*#__PURE__*/_react["default"].createElement(SDropdownMenuItem, _ref17.cn("SDropdownMenuItem", (0, _objectSpread2["default"])({}, (0, _core.assignProps)({
602
625
  "variant": 'title'
603
- }, _ref8))));
626
+ }, _ref9))));
604
627
  }
605
- function Trigger() {
606
- var _ref9 = arguments[0];
628
+ function Trigger(_ref20) {
629
+ var _ref10 = arguments[0];
630
+ var keyboardFocused = _ref20.keyboardFocused,
631
+ onKeyboardFocusedStateChange = _ref20.onKeyboardFocusedStateChange;
632
+ _react["default"].useEffect(function () {
633
+ return onKeyboardFocusedStateChange(keyboardFocused);
634
+ }, [keyboardFocused, onKeyboardFocusedStateChange]);
607
635
  return /*#__PURE__*/_react["default"].createElement(_dropdown["default"].Trigger, (0, _core.assignProps)({
608
636
  "aria-haspopup": 'true'
609
- }, _ref9));
637
+ }, _ref10));
610
638
  }
639
+ Trigger.enhance = [(0, _keyboardFocusEnhance["default"])(false)];
611
640
  var DropdownMenu = (0, _core["default"])(DropdownMenuRoot, {
612
641
  Trigger: Trigger,
613
642
  Popper: _dropdown["default"].Popper,
@@ -618,7 +647,8 @@ var DropdownMenu = (0, _core["default"])(DropdownMenuRoot, {
618
647
  }],
619
648
  Nesting: [Nesting, {
620
649
  Trigger: NestingTrigger,
621
- Addon: Addon
650
+ Addon: Addon,
651
+ Item: NestingItem
622
652
  }],
623
653
  ItemTitle: Title,
624
654
  ItemHint: Hint
@@ -1 +1 @@
1
- {"version":3,"file":"DropdownMenu.js","names":["_core","_interopRequireWildcard","require","_react","_interopRequireDefault","_classnames","_dropdown","_flexBox","_scrollArea","_uniqueID","_i18nEnhance","_intergalacticDynamicLocales","_useFocusLock","_hasParent","_styleScrollArea","_setFocus","_isFocusInside","_getFocusableIn","_excluded","style","sstyled","insert","DropdownMenuRoot","_Component","_inherits2","_super","_createSuper2","_this","_classCallCheck2","_len","arguments","length","args","Array","_key","call","apply","concat","_defineProperty2","_assertThisInitialized2","focusLockItemIndex","React","createRef","trigger","triggerRef","current","isFocusInside","setFocus","place","e","amount","shiftKey","targetTagName","target","tagName","_this$asProps","asProps","visible","highlightedIndex","placement","key","includes","item","itemRefs","getFocusableIn","setState","handlers","state","verticalPlacement","startsWith","preventDefault","show","hide","visibleChanged","stopPropagation","focusable","focusedIndex","indexOf","document","activeElement","nextFocused","focus","prevFocused","moveHighlightedIndex","popperRef","focusTrigger","highlightedItemRef","click","ignoreTriggerKeyboardFocusUntil","Date","now","event","relatedTarget","focused","hasParent","_focusable$","itemIndex","currentTarget","handleNestingClick","size","onClick","onKeyDown","handleNestingKeyDown","lastUserInteraction","_this$asProps2","onNestedVisibleChange","handleNestedVisibleChange","node","setTimeout","scrollIntoView","prevHighlightedIndex","block","inline","_createClass2","value","uncontrolledProps","_this2","selectedItemIndex","itemProps","findIndex","selected","getTriggerProps","_this$asProps3","uid","disablePortal","getI18nText","id","focusHint","undefined","bindHandlerKeyDown","ref","onKeyboardFocus","handleTriggerKeyboardFocus","getListProps","_this$asProps4","index","getPopperProps","_this$asProps5","ignorePortalsStacking","interaction","tabIndex","focusMaster","hideFocus","getItemProps","props","_this3","_this$asProps6","highlighted","scrollToNode","focusLock","handleFocusOut","handleItemFocusOut","getItemHintProps","getItemTitleProps","_this$itemProps$newIn","itemsLastIndex","selectedIndex","newIndex","disabled","componentDidUpdate","_this4","render","_ref","Children","createElement","Dropdown","assignProps","Component","uniqueIDEnhancement","i18nEnhance","localizedMessages","defaultVisible","defaultHighlightedIndex","i18n","locale","List","_ref2","arguments[0]","_ref10","SDropdownMenuList","ScrollAreaComponent","styles","cn","_objectSpread2","scrollStyles","Menu","_ref3","disableEnforceFocus","autoFocus","animationsDisabled","popperProps","DropdownMenu","Popper","Item","_ref16","_ref4","_ref11","label","SDropdownMenuItem","Flex","useRef","useFocusLock","NestingContext","createContext","Nesting","_ref17","_ref5","_ref12","SDropdownMenuNesting","contextValue","useMemo","Provider","NestingTrigger","_ref6","_ref13","nestingContext","useContext","lastUserInteractionRef","useEffect","handleMouseEvent","useCallback","handleKeyboardEvent","addEventListener","capture","removeEventListener","Addon","_useBox","useBox","forwardRef","_useBox2","_slicedToArray2","SDropdownMenuItemAddon","_useBox2$","className","other","_objectWithoutProperties2","_extends2","Hint","_ref7","_ref14","Title","_ref8","_ref15","Trigger","_ref9","createComponent","ItemTitle","ItemHint","parent","_default","exports"],"sources":["../../src/DropdownMenu.jsx"],"sourcesContent":["import React from 'react';\nimport cn from 'classnames';\nimport createComponent, { Component, sstyled, Root } from '@semcore/core';\nimport Dropdown from '@semcore/dropdown';\nimport { Flex, useBox } from '@semcore/flex-box';\nimport ScrollAreaComponent from '@semcore/scroll-area';\nimport uniqueIDEnhancement from '@semcore/utils/lib/uniqueID';\nimport i18nEnhance from '@semcore/utils/lib/enhances/i18nEnhance';\nimport { localizedMessages } from './translations/__intergalactic-dynamic-locales';\nimport { useFocusLock } from '@semcore/utils/lib/use/useFocusLock';\nimport { hasParent } from '@semcore/utils/lib/hasParent';\n\nimport scrollStyles from './styleScrollArea';\nimport style from './style/dropdown-menu.shadow.css';\nimport { setFocus } from '@semcore/utils/lib/focus-lock/setFocus';\nimport { isFocusInside } from '@semcore/utils/lib/focus-lock/isFocusInside';\nimport { getFocusableIn } from '@semcore/utils/lib/focus-lock/getFocusableIn';\n\nclass DropdownMenuRoot extends Component {\n static displayName = 'DropdownMenu';\n static style = style;\n static enhance = [uniqueIDEnhancement(), i18nEnhance(localizedMessages)];\n\n static defaultProps = {\n size: 'm',\n defaultVisible: false,\n defaultHighlightedIndex: null,\n i18n: localizedMessages,\n locale: 'en',\n interaction: 'click',\n };\n\n state = {\n focusLockItemIndex: null,\n };\n\n popperRef = React.createRef();\n triggerRef = React.createRef();\n\n itemProps = [];\n itemRefs = [];\n\n highlightedItemRef = React.createRef();\n\n ignoreTriggerKeyboardFocusUntil = 0;\n prevHighlightedIndex = null;\n\n uncontrolledProps() {\n return {\n highlightedIndex: null,\n visible: [\n null,\n (visible) => {\n if (!visible) {\n this.ignoreTriggerKeyboardFocusUntil = Date.now() + 100;\n } else {\n setTimeout(() => {\n const selectedItemIndex = this.itemProps.findIndex((item) => item.selected);\n if (selectedItemIndex === -1 || this.asProps.highlightedIndex !== null) return;\n this.handlers.highlightedIndex(selectedItemIndex);\n }, 0);\n }\n },\n ],\n };\n }\n\n focusTrigger = () => {\n const trigger = this.triggerRef.current;\n if (!trigger) return;\n if (isFocusInside(trigger)) return;\n setFocus(trigger);\n };\n\n bindHandlerKeyDown = (place) => (e) => {\n const amount = e.shiftKey ? 5 : 1;\n const targetTagName = e.target.tagName;\n\n const { visible, highlightedIndex, placement } = this.asProps;\n\n if (e.key === ' ' && ['INPUT', 'TEXTAREA'].includes(targetTagName)) return;\n if (e.key === 'Enter' && targetTagName === 'TEXTAREA') return;\n if (\n place === 'popper' &&\n (e.key === ' ' || e.key === 'Enter') &&\n (targetTagName === 'BUTTON' || targetTagName === 'A')\n )\n return;\n\n if (visible && e.key === 'Tab') {\n const item = highlightedIndex !== null && this.itemRefs[highlightedIndex];\n if (item && getFocusableIn(item).length !== 0) {\n this.setState({ focusLockItemIndex: highlightedIndex });\n } else {\n this.handlers.highlightedIndex(null);\n }\n return;\n }\n\n if (e.key === 'Escape' && this.state.focusLockItemIndex !== null) {\n this.setState({ focusLockItemIndex: null });\n return false;\n }\n\n const verticalPlacement =\n !placement || placement.startsWith('top') || placement.startsWith('bottom');\n\n if (['ArrowDown', 'ArrowUp'].includes(e.key) && verticalPlacement) {\n e.preventDefault();\n this.handlers.visible(true);\n }\n if (['ArrowLeft', 'ArrowRight'].includes(e.key) && !verticalPlacement) {\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 const visibleChanged = (visible && hide) || (!visible && show);\n if (show) {\n this.handlers.visible(true);\n } else if (hide) {\n this.handlers.visible(false);\n }\n if (visibleChanged) {\n e.preventDefault();\n e.stopPropagation();\n return;\n }\n }\n if (['ArrowLeft', 'ArrowRight'].includes(e.key)) {\n const item = highlightedIndex !== null && this.itemRefs[highlightedIndex];\n const focusable = getFocusableIn(item);\n if (focusable.length > 0 && item) {\n const focusedIndex = focusable.indexOf(document.activeElement);\n if (e.key === 'ArrowRight') {\n if (focusedIndex === -1) {\n this.setState({ focusLockItemIndex: highlightedIndex });\n }\n const nextFocused = focusable[focusedIndex + 1];\n if (nextFocused) {\n e.preventDefault();\n e.stopPropagation();\n nextFocused.focus();\n }\n } else if (e.key === 'ArrowLeft') {\n if (focusedIndex === 0) {\n this.setState({ focusLockItemIndex: null });\n }\n const prevFocused = focusable[focusedIndex - 1];\n if (prevFocused) {\n e.preventDefault();\n e.stopPropagation();\n prevFocused.focus();\n }\n }\n }\n }\n\n switch (e.key) {\n case 'ArrowDown': {\n if (visible) {\n this.moveHighlightedIndex(amount, e);\n if (isFocusInside(this.popperRef.current)) {\n this.focusTrigger();\n }\n e.preventDefault();\n e.stopPropagation();\n }\n break;\n }\n case 'ArrowUp': {\n if (visible) {\n this.moveHighlightedIndex(-amount, e);\n if (isFocusInside(this.popperRef.current)) {\n this.focusTrigger();\n }\n e.preventDefault();\n e.stopPropagation();\n }\n break;\n }\n case ' ':\n case 'Enter':\n if (this.highlightedItemRef.current && highlightedIndex !== null) {\n e.stopPropagation();\n e.preventDefault();\n this.highlightedItemRef.current.click();\n } else {\n if (place === 'trigger') {\n this.handlers.visible(false);\n\n e.preventDefault();\n }\n }\n break;\n }\n };\n\n handleTriggerKeyboardFocus = () => {\n if (this.ignoreTriggerKeyboardFocusUntil > Date.now()) return false;\n };\n\n getTriggerProps() {\n const { size, uid, disablePortal, visible, getI18nText, highlightedIndex } = this.asProps;\n\n return {\n size,\n id: `igc-${uid}-trigger`,\n 'aria-controls': `igc-${uid}-popper`,\n focusHint: visible && !disablePortal ? getI18nText('triggerHint') : undefined,\n 'aria-expanded': visible ? 'true' : 'false',\n 'aria-activedescendant':\n visible && highlightedIndex !== null ? `igc-${uid}-option-${highlightedIndex}` : undefined,\n onKeyDown: this.bindHandlerKeyDown('trigger'),\n ref: this.triggerRef,\n onKeyboardFocus: this.handleTriggerKeyboardFocus,\n };\n }\n\n getListProps() {\n const { size, uid } = this.asProps;\n return {\n size,\n uid,\n index: this.asProps.highlightedIndex,\n };\n }\n\n getPopperProps() {\n const { uid, disablePortal, ignorePortalsStacking, interaction, highlightedIndex } =\n this.asProps;\n\n return {\n ref: this.popperRef,\n tabIndex: 0,\n onKeyDown: this.bindHandlerKeyDown('popper'),\n id: `igc-${uid}-popper`,\n disablePortal,\n ignorePortalsStacking,\n focusMaster: interaction === 'click',\n hideFocus: highlightedIndex !== null,\n };\n }\n\n getItemProps(props, index) {\n const { size, highlightedIndex, uid } = this.asProps;\n const highlighted = index === highlightedIndex;\n let ref = (node) => {\n this.itemRefs[index] = node;\n };\n this.itemProps[index] = props;\n if (highlighted) {\n ref = (node) => {\n this.itemRefs[index] = node;\n this.scrollToNode(node);\n };\n }\n\n return {\n id: `igc-${uid}-option-${index}`,\n size,\n highlighted,\n focusLock: this.state.focusLockItemIndex === index,\n triggerRef: this.triggerRef,\n ref,\n index,\n handleFocusOut: this.handleItemFocusOut,\n };\n }\n\n handleItemFocusOut = (event) => {\n if (event.relatedTarget === this.popperRef.current) return;\n const focused = event.relatedTarget;\n\n if (hasParent(focused, this.popperRef.current)) {\n this.handlers.highlightedIndex(null);\n this.setState({ focusLockItemIndex: null });\n focused.focus();\n }\n };\n\n handleNestingClick = (event) => {\n const itemIndex = this.itemRefs.indexOf(event.currentTarget);\n if (itemIndex === -1) return;\n const focusable = getFocusableIn(event.currentTarget);\n focusable[0]?.focus();\n if (focusable[0] && this.state.focusLockItemIndex === null) {\n this.setState({ focusLockItemIndex: null });\n event.preventDefault();\n event.stopPropagation();\n }\n };\n handleNestingKeyDown = (event) => {\n if (event.key === ' ') {\n this.handleNestingClick(event);\n }\n };\n getNestingProps = () => {\n const { size } = this.asProps;\n return {\n size,\n onClick: this.handleNestingClick,\n onKeyDown: this.handleNestingKeyDown,\n };\n };\n handleNestedVisibleChange = (lastUserInteraction) => {\n if (\n this.asProps.visible &&\n this.asProps.highlightedIndex === null &&\n lastUserInteraction === 'keyboard'\n ) {\n this.handlers.highlightedIndex(0);\n }\n };\n getNestingTriggerProps = () => {\n const { size, visible } = this.asProps;\n return {\n size,\n visible,\n onNestedVisibleChange: this.handleNestedVisibleChange,\n };\n };\n\n getItemHintProps() {\n const { size } = this.asProps;\n return {\n size,\n };\n }\n\n getItemTitleProps() {\n const { size } = this.asProps;\n return {\n size,\n };\n }\n\n scrollToNode = (node) => {\n if (node) {\n this.highlightedItemRef.current = node;\n }\n setTimeout(() => {\n if (node?.scrollIntoView) {\n if (this.asProps.highlightedIndex !== this.prevHighlightedIndex) {\n this.prevHighlightedIndex = this.asProps.highlightedIndex;\n node.scrollIntoView({\n block: 'nearest',\n inline: 'nearest',\n });\n }\n }\n }, 0);\n };\n\n moveHighlightedIndex(amount, e) {\n let { highlightedIndex } = this.asProps;\n const itemsLastIndex = this.itemProps.length - 1;\n const selectedIndex = this.itemProps.findIndex((item) => item.selected);\n\n if (itemsLastIndex < 0) return;\n\n if (highlightedIndex == null) {\n if (selectedIndex !== -1) {\n highlightedIndex = selectedIndex;\n } else if (this.highlightedItemRef.current) {\n highlightedIndex = this.prevHighlightedIndex;\n } else {\n highlightedIndex = amount < 0 ? 0 : itemsLastIndex;\n }\n }\n\n let newIndex = highlightedIndex + amount;\n if (newIndex < 0) {\n newIndex = amount + itemsLastIndex + 1;\n } else if (newIndex > itemsLastIndex) {\n newIndex = newIndex - itemsLastIndex - 1;\n }\n\n if (this.itemProps[newIndex]?.disabled) {\n this.moveHighlightedIndex(amount < 0 ? amount - 1 : amount + 1, e);\n } else {\n this.handlers.highlightedIndex(newIndex, e);\n }\n }\n\n componentDidUpdate() {\n if (!this.asProps.visible) {\n this.handlers.highlightedIndex(null);\n this.highlightedItemRef.current = null;\n }\n if (\n (this.state.focusLockItemIndex !== this.asProps.highlightedIndex || !this.asProps.visible) &&\n this.state.focusLockItemIndex !== null\n ) {\n setTimeout(() => {\n this.setState({ focusLockItemIndex: null });\n }, 0);\n }\n }\n\n render() {\n const { Children } = this.asProps;\n\n this.itemProps = [];\n\n return (\n <Root render={Dropdown}>\n <Children />\n </Root>\n );\n }\n}\n\nfunction List(props) {\n const SDropdownMenuList = Root;\n const { uid } = props;\n\n return sstyled(props.styles)(\n <SDropdownMenuList\n render={ScrollAreaComponent}\n tabIndex={null}\n role='menu'\n aria-labelledby={`igc-${uid}-trigger`}\n shadow={true}\n styles={scrollStyles}\n />,\n );\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 <DropdownMenu.Popper {...popperProps}>\n <Root render={DropdownMenu.List} />\n </DropdownMenu.Popper>\n );\n}\n\nfunction Item({ styles, label, triggerRef, focusLock, disabled, highlighted, handleFocusOut }) {\n const SDropdownMenuItem = Root;\n const ref = React.useRef();\n\n useFocusLock(ref, false, triggerRef, !focusLock || disabled, true, handleFocusOut);\n\n return sstyled(styles)(\n <SDropdownMenuItem\n ref={ref}\n render={Flex}\n role='menuitem'\n tabIndex={-1}\n id={label}\n use:highlighted={!disabled && highlighted}\n />,\n );\n}\n\nconst NestingContext = React.createContext(null);\n\nfunction Nesting({ styles, disabled }) {\n const SDropdownMenuNesting = Root;\n const contextValue = React.useMemo(() => ({ disabled }), [disabled]);\n\n return (\n <NestingContext.Provider value={contextValue}>\n {sstyled(styles)(<SDropdownMenuNesting aria-haspopup='true' render={DropdownMenu.Item} />)}\n </NestingContext.Provider>\n );\n}\n\nfunction NestingTrigger(props) {\n const { styles, visible, onNestedVisibleChange } = props;\n const SDropdownMenuItem = Root;\n const nestingContext = React.useContext(NestingContext);\n const disabled = props.disabled || nestingContext?.disabled;\n\n const lastUserInteractionRef = React.useRef(undefined);\n React.useEffect(() => {\n onNestedVisibleChange(lastUserInteractionRef.current);\n }, [visible]);\n\n const handleMouseEvent = React.useCallback(() => {\n lastUserInteractionRef.current = 'mouse';\n }, []);\n const handleKeyboardEvent = React.useCallback(() => {\n lastUserInteractionRef.current = 'keyboard';\n }, []);\n\n React.useEffect(() => {\n document.addEventListener('mouseover', handleMouseEvent, { capture: true });\n document.addEventListener('keydown', handleKeyboardEvent, { capture: true });\n return () => {\n document.removeEventListener('mouseover', handleMouseEvent, { capture: true });\n document.removeEventListener('keydown', handleKeyboardEvent, { capture: true });\n };\n }, []);\n\n return (\n <NestingContext.Provider value={null}>\n {sstyled(styles)(\n <SDropdownMenuItem nesting-trigger tabIndex={!disabled ? 0 : undefined} render={Flex} />,\n )}\n </NestingContext.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 Hint(props) {\n const SDropdownMenuItem = Root;\n return sstyled(props.styles)(<SDropdownMenuItem render={Flex} variant='hint' />);\n}\n\nfunction Title(props) {\n const SDropdownMenuItem = Root;\n return sstyled(props.styles)(<SDropdownMenuItem render={Flex} variant='title' />);\n}\n\nfunction Trigger() {\n return <Root render={Dropdown.Trigger} aria-haspopup='true' />;\n}\n\nconst DropdownMenu = createComponent(\n DropdownMenuRoot,\n {\n Trigger,\n Popper: Dropdown.Popper,\n List,\n Menu,\n Item: [Item, { Addon }],\n Nesting: [Nesting, { Trigger: NestingTrigger, Addon }],\n ItemTitle: Title,\n ItemHint: Hint,\n },\n {\n parent: [Dropdown],\n },\n);\n\nexport default DropdownMenu;\n"],"mappings":";;;;;;;;;;;;;;;;;;AAEA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AAFA,IAAAC,MAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,WAAA,GAAAD,sBAAA,CAAAF,OAAA;AAEA,IAAAI,SAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,QAAA,GAAAL,OAAA;AACA,IAAAM,WAAA,GAAAJ,sBAAA,CAAAF,OAAA;AACA,IAAAO,SAAA,GAAAL,sBAAA,CAAAF,OAAA;AACA,IAAAQ,YAAA,GAAAN,sBAAA,CAAAF,OAAA;AACA,IAAAS,4BAAA,GAAAT,OAAA;AACA,IAAAU,aAAA,GAAAV,OAAA;AACA,IAAAW,UAAA,GAAAX,OAAA;AAEA,IAAAY,gBAAA,GAAAV,sBAAA,CAAAF,OAAA;AAEA,IAAAa,SAAA,GAAAb,OAAA;AACA,IAAAc,cAAA,GAAAd,OAAA;AACA,IAAAe,eAAA,GAAAf,OAAA;AAA8E,IAAAgB,SAAA;AAAA;AAAA,IAAAC,KAAA,+BAAAnB,KAAA,CAAAoB,OAAA,CAAAC,MAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;AAAA;AAAA,IAExEC,gBAAgB,0BAAAC,UAAA;EAAA,IAAAC,UAAA,aAAAF,gBAAA,EAAAC,UAAA;EAAA,IAA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cC,oBAAQ,CAAC8E,OAAO,MAAAnP,KAAA,CAAAsK,WAAA;IAAA,iBAAgB;EAAM,GAAA8E,KAAA,EAAG;AAChE;AAEA,IAAMrD,YAAY,GAAG,IAAAsD,gBAAe,EAClC/N,gBAAgB,EAChB;EACE6N,OAAO,EAAPA,OAAO;EACPnD,MAAM,EAAE3B,oBAAQ,CAAC2B,MAAM;EACvBjB,IAAI,EAAJA,IAAI;EACJU,IAAI,EAAJA,IAAI;EACJQ,IAAI,EAAE,CAACA,IAAI,EAAE;IAAEgC,KAAK,EAALA;EAAM,CAAC,CAAC;EACvBrB,OAAO,EAAE,CAACA,OAAO,EAAE;IAAEuC,OAAO,EAAE/B,cAAc;IAAEa,KAAK,EAALA;EAAM,CAAC,CAAC;EACtDqB,SAAS,EAAEN,KAAK;EAChBO,QAAQ,EAAEV;AACZ,CAAC,EACD;EACEW,MAAM,EAAE,CAACnF,oBAAQ;AACnB,CAAC,CACF;AAAC,IAAAoF,QAAA,GAEa1D,YAAY;AAAA2D,OAAA,cAAAD,QAAA"}
1
+ {"version":3,"file":"DropdownMenu.js","names":["_core","_interopRequireWildcard","require","_react","_interopRequireDefault","_classnames","_dropdown","_flexBox","_scrollArea","_uniqueID","_i18nEnhance","_intergalacticDynamicLocales","_useFocusLock","_hasParent","_styleScrollArea","_setFocus","_isFocusInside","_getFocusableIn","_keyboardFocusEnhance","_excluded","style","sstyled","insert","DropdownMenuRoot","_Component","_inherits2","_super","_createSuper2","_this","_classCallCheck2","_len","arguments","length","args","Array","_key","call","apply","concat","_defineProperty2","_assertThisInitialized2","focusLockItemIndex","keyboardFocused","React","createRef","trigger","triggerRef","current","isFocusInside","setFocus","place","e","amount","shiftKey","targetTagName","target","tagName","_this$asProps","asProps","visible","highlightedIndex","placement","key","includes","item","itemRefs","getFocusableIn","setState","handlers","state","verticalPlacement","startsWith","preventDefault","show","hide","visibleChanged","stopPropagation","focusable","focusedIndex","indexOf","document","activeElement","nextFocused","focus","prevFocused","moveHighlightedIndex","popperRef","focusTrigger","highlightedItemRef","click","ignoreTriggerKeyboardFocusUntil","Date","now","event","relatedTarget","focused","hasParent","_focusable$","itemIndex","currentTarget","handleNestingClick","size","onClick","onKeyDown","handleNestingKeyDown","lastUserInteraction","_this$asProps2","onNestedVisibleChange","handleNestedVisibleChange","getNestingTriggerProps","node","setTimeout","scrollIntoView","prevHighlightedIndex","block","inline","_createClass2","value","uncontrolledProps","_this2","selectedItemIndex","itemProps","findIndex","selected","getTriggerProps","_this$asProps3","uid","disablePortal","getI18nText","id","focusHint","undefined","bindHandlerKeyDown","ref","onKeyboardFocus","handleTriggerKeyboardFocus","onKeyboardFocusedStateChange","handleTriggerKeyboardFocusedStateChange","getListProps","_this$asProps4","index","getPopperProps","_this$asProps5","ignorePortalsStacking","interaction","tabIndex","focusMaster","hideFocus","getItemProps","props","_this3","_this$asProps6","highlighted","scrollToNode","focusLock","handleFocusOut","handleItemFocusOut","getItemHintProps","getItemTitleProps","_this$itemProps$newIn","itemsLastIndex","selectedIndex","newIndex","disabled","componentDidUpdate","_this4","render","_ref","Children","createElement","Dropdown","assignProps","Component","uniqueIDEnhancement","i18nEnhance","localizedMessages","defaultVisible","defaultHighlightedIndex","i18n","locale","List","_ref2","arguments[0]","_ref11","SDropdownMenuList","ScrollAreaComponent","styles","cn","_objectSpread2","scrollStyles","Menu","_ref3","disableEnforceFocus","autoFocus","animationsDisabled","popperProps","DropdownMenu","Popper","Item","_ref18","_ref4","_ref12","label","SDropdownMenuItem","Flex","useRef","useFocusLock","NestingContext","createContext","Nesting","_ref19","_ref5","_ref13","SDropdownMenuNesting","contextValue","useMemo","Provider","NestingTrigger","_ref6","_ref14","nestingContext","useContext","lastUserInteractionRef","useEffect","handleMouseEvent","useCallback","handleKeyboardEvent","addEventListener","capture","removeEventListener","NestingItem","_ref7","_ref15","SDropdownNestingItem","Addon","_useBox","useBox","forwardRef","_useBox2","_slicedToArray2","SDropdownMenuItemAddon","_useBox2$","className","other","_objectWithoutProperties2","_extends2","Hint","_ref8","_ref16","Title","_ref9","_ref17","Trigger","_ref20","_ref10","enhance","keyboardFocusEnhance","createComponent","ItemTitle","ItemHint","parent","_default","exports"],"sources":["../../src/DropdownMenu.jsx"],"sourcesContent":["import React from 'react';\nimport cn from 'classnames';\nimport createComponent, { Component, sstyled, Root } from '@semcore/core';\nimport Dropdown from '@semcore/dropdown';\nimport { Flex, useBox } from '@semcore/flex-box';\nimport ScrollAreaComponent from '@semcore/scroll-area';\nimport uniqueIDEnhancement from '@semcore/utils/lib/uniqueID';\nimport i18nEnhance from '@semcore/utils/lib/enhances/i18nEnhance';\nimport { localizedMessages } from './translations/__intergalactic-dynamic-locales';\nimport { useFocusLock } from '@semcore/utils/lib/use/useFocusLock';\nimport { hasParent } from '@semcore/utils/lib/hasParent';\n\nimport scrollStyles from './styleScrollArea';\nimport style from './style/dropdown-menu.shadow.css';\nimport { setFocus } from '@semcore/utils/lib/focus-lock/setFocus';\nimport { isFocusInside } from '@semcore/utils/lib/focus-lock/isFocusInside';\nimport { getFocusableIn } from '@semcore/utils/lib/focus-lock/getFocusableIn';\nimport keyboardFocusEnhance from '@semcore/utils/lib/enhances/keyboardFocusEnhance';\n\nclass DropdownMenuRoot extends Component {\n static displayName = 'DropdownMenu';\n static style = style;\n static enhance = [uniqueIDEnhancement(), i18nEnhance(localizedMessages)];\n\n static defaultProps = {\n size: 'm',\n defaultVisible: false,\n defaultHighlightedIndex: null,\n i18n: localizedMessages,\n locale: 'en',\n interaction: 'click',\n };\n\n state = {\n focusLockItemIndex: null,\n keyboardFocused: false,\n };\n\n popperRef = React.createRef();\n triggerRef = React.createRef();\n\n itemProps = [];\n itemRefs = [];\n\n highlightedItemRef = React.createRef();\n\n ignoreTriggerKeyboardFocusUntil = 0;\n prevHighlightedIndex = null;\n\n uncontrolledProps() {\n return {\n highlightedIndex: null,\n visible: [\n null,\n (visible) => {\n if (!visible) {\n this.ignoreTriggerKeyboardFocusUntil = Date.now() + 100;\n } else {\n setTimeout(() => {\n const selectedItemIndex = this.itemProps.findIndex((item) => item.selected);\n if (selectedItemIndex === -1 || this.asProps.highlightedIndex !== null) return;\n this.handlers.highlightedIndex(selectedItemIndex);\n }, 0);\n }\n },\n ],\n };\n }\n\n focusTrigger = () => {\n const trigger = this.triggerRef.current;\n if (!trigger) return;\n if (isFocusInside(trigger)) return;\n setFocus(trigger);\n };\n\n bindHandlerKeyDown = (place) => (e) => {\n const amount = e.shiftKey ? 5 : 1;\n const targetTagName = e.target.tagName;\n\n const { visible, highlightedIndex, placement } = this.asProps;\n\n if (e.key === ' ' && ['INPUT', 'TEXTAREA'].includes(targetTagName)) return;\n if (e.key === 'Enter' && targetTagName === 'TEXTAREA') return;\n if (\n place === 'popper' &&\n (e.key === ' ' || e.key === 'Enter') &&\n (targetTagName === 'BUTTON' || targetTagName === 'A')\n )\n return;\n\n if (visible && e.key === 'Tab') {\n const item = highlightedIndex !== null && this.itemRefs[highlightedIndex];\n if (item && getFocusableIn(item).length !== 0) {\n this.setState({ focusLockItemIndex: highlightedIndex });\n } else {\n this.handlers.highlightedIndex(null);\n }\n return;\n }\n\n if (e.key === 'Escape' && this.state.focusLockItemIndex !== null) {\n this.setState({ focusLockItemIndex: null });\n return false;\n }\n\n const verticalPlacement =\n !placement || placement.startsWith('top') || placement.startsWith('bottom');\n\n if (['ArrowDown', 'ArrowUp'].includes(e.key) && verticalPlacement) {\n e.preventDefault();\n this.handlers.visible(true);\n }\n if (['ArrowLeft', 'ArrowRight'].includes(e.key) && !verticalPlacement) {\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 const visibleChanged = (visible && hide) || (!visible && show);\n if (show) {\n this.handlers.visible(true);\n } else if (hide) {\n this.handlers.visible(false);\n }\n if (visibleChanged) {\n e.preventDefault();\n e.stopPropagation();\n return;\n }\n }\n if (['ArrowLeft', 'ArrowRight'].includes(e.key)) {\n const item = highlightedIndex !== null && this.itemRefs[highlightedIndex];\n const focusable = getFocusableIn(item);\n if (focusable.length > 0 && item) {\n const focusedIndex = focusable.indexOf(document.activeElement);\n if (e.key === 'ArrowRight') {\n if (focusedIndex === -1) {\n this.setState({ focusLockItemIndex: highlightedIndex });\n }\n const nextFocused = focusable[focusedIndex + 1];\n if (nextFocused) {\n e.preventDefault();\n e.stopPropagation();\n nextFocused.focus();\n }\n } else if (e.key === 'ArrowLeft') {\n if (focusedIndex === 0) {\n this.setState({ focusLockItemIndex: null });\n }\n const prevFocused = focusable[focusedIndex - 1];\n if (prevFocused) {\n e.preventDefault();\n e.stopPropagation();\n prevFocused.focus();\n }\n }\n }\n }\n\n switch (e.key) {\n case 'ArrowDown': {\n if (visible) {\n this.moveHighlightedIndex(amount, e);\n if (isFocusInside(this.popperRef.current)) {\n this.focusTrigger();\n }\n e.preventDefault();\n e.stopPropagation();\n }\n break;\n }\n case 'ArrowUp': {\n if (visible) {\n this.moveHighlightedIndex(-amount, e);\n if (isFocusInside(this.popperRef.current)) {\n this.focusTrigger();\n }\n e.preventDefault();\n e.stopPropagation();\n }\n break;\n }\n case ' ':\n case 'Enter':\n if (this.highlightedItemRef.current && highlightedIndex !== null) {\n e.stopPropagation();\n e.preventDefault();\n this.highlightedItemRef.current.click();\n } else {\n if (place === 'trigger') {\n this.handlers.visible(false);\n\n e.preventDefault();\n }\n }\n break;\n }\n };\n\n handleTriggerKeyboardFocus = () => {\n if (this.ignoreTriggerKeyboardFocusUntil > Date.now()) return false;\n };\n handleTriggerKeyboardFocusedStateChange = (keyboardFocused) => {\n this.setState({ keyboardFocused });\n };\n\n getTriggerProps() {\n const { size, uid, disablePortal, visible, getI18nText, highlightedIndex } = this.asProps;\n\n return {\n size,\n id: `igc-${uid}-trigger`,\n 'aria-controls': `igc-${uid}-popper`,\n focusHint: visible && !disablePortal ? getI18nText('triggerHint') : undefined,\n 'aria-expanded': visible ? 'true' : 'false',\n 'aria-activedescendant':\n visible && highlightedIndex !== null ? `igc-${uid}-option-${highlightedIndex}` : undefined,\n onKeyDown: this.bindHandlerKeyDown('trigger'),\n ref: this.triggerRef,\n onKeyboardFocus: this.handleTriggerKeyboardFocus,\n onKeyboardFocusedStateChange: this.handleTriggerKeyboardFocusedStateChange,\n };\n }\n\n getListProps() {\n const { size, uid } = this.asProps;\n return {\n size,\n uid,\n index: this.asProps.highlightedIndex,\n };\n }\n\n getPopperProps() {\n const { uid, disablePortal, ignorePortalsStacking, interaction, highlightedIndex } =\n this.asProps;\n\n return {\n ref: this.popperRef,\n tabIndex: 0,\n onKeyDown: this.bindHandlerKeyDown('popper'),\n id: `igc-${uid}-popper`,\n disablePortal,\n ignorePortalsStacking,\n focusMaster: interaction === 'click',\n hideFocus: highlightedIndex !== null,\n };\n }\n\n getItemProps(props, index) {\n const { size, highlightedIndex, uid } = this.asProps;\n const highlighted = index === highlightedIndex;\n let ref = (node) => {\n this.itemRefs[index] = node;\n };\n this.itemProps[index] = props;\n if (highlighted) {\n ref = (node) => {\n this.itemRefs[index] = node;\n this.scrollToNode(node);\n };\n }\n\n return {\n id: `igc-${uid}-option-${index}`,\n size,\n highlighted,\n focusLock: this.state.focusLockItemIndex === index,\n triggerRef: this.triggerRef,\n ref,\n index,\n handleFocusOut: this.handleItemFocusOut,\n keyboardFocused: this.state.keyboardFocused,\n };\n }\n\n handleItemFocusOut = (event) => {\n if (event.relatedTarget === this.popperRef.current) return;\n const focused = event.relatedTarget;\n\n if (hasParent(focused, this.popperRef.current)) {\n this.handlers.highlightedIndex(null);\n this.setState({ focusLockItemIndex: null });\n focused.focus();\n }\n };\n\n handleNestingClick = (event) => {\n const itemIndex = this.itemRefs.indexOf(event.currentTarget);\n if (itemIndex === -1) return;\n const focusable = getFocusableIn(event.currentTarget);\n focusable[0]?.focus();\n if (focusable[0] && this.state.focusLockItemIndex === null) {\n this.setState({ focusLockItemIndex: null });\n event.preventDefault();\n event.stopPropagation();\n }\n };\n handleNestingKeyDown = (event) => {\n if (event.key === ' ') {\n this.handleNestingClick(event);\n }\n };\n getNestingProps = () => {\n const { size } = this.asProps;\n return {\n size,\n onClick: this.handleNestingClick,\n onKeyDown: this.handleNestingKeyDown,\n };\n };\n handleNestedVisibleChange = (lastUserInteraction) => {\n if (\n this.asProps.visible &&\n this.asProps.highlightedIndex === null &&\n lastUserInteraction === 'keyboard'\n ) {\n this.handlers.highlightedIndex(0);\n }\n };\n getNestingTriggerProps = () => {\n const { size, visible } = this.asProps;\n return {\n size,\n visible,\n onNestedVisibleChange: this.handleNestedVisibleChange,\n };\n };\n getNestingItemProps = () => {\n return this.getNestingTriggerProps();\n };\n\n getItemHintProps() {\n const { size } = this.asProps;\n return {\n size,\n };\n }\n\n getItemTitleProps() {\n const { size } = this.asProps;\n return {\n size,\n };\n }\n\n scrollToNode = (node) => {\n if (node) {\n this.highlightedItemRef.current = node;\n }\n setTimeout(() => {\n if (node?.scrollIntoView) {\n if (this.asProps.highlightedIndex !== this.prevHighlightedIndex) {\n this.prevHighlightedIndex = this.asProps.highlightedIndex;\n node.scrollIntoView({\n block: 'nearest',\n inline: 'nearest',\n });\n }\n }\n }, 0);\n };\n\n moveHighlightedIndex(amount, e) {\n let { highlightedIndex } = this.asProps;\n const itemsLastIndex = this.itemProps.length - 1;\n const selectedIndex = this.itemProps.findIndex((item) => item.selected);\n\n if (itemsLastIndex < 0) return;\n\n if (highlightedIndex == null) {\n if (selectedIndex !== -1) {\n highlightedIndex = selectedIndex;\n } else if (this.highlightedItemRef.current) {\n highlightedIndex = this.prevHighlightedIndex;\n } else {\n highlightedIndex = amount < 0 ? 0 : itemsLastIndex;\n }\n }\n\n let newIndex = highlightedIndex + amount;\n if (newIndex < 0) {\n newIndex = amount + itemsLastIndex + 1;\n } else if (newIndex > itemsLastIndex) {\n newIndex = newIndex - itemsLastIndex - 1;\n }\n\n if (this.itemProps[newIndex]?.disabled) {\n this.moveHighlightedIndex(amount < 0 ? amount - 1 : amount + 1, e);\n } else {\n this.handlers.highlightedIndex(newIndex, e);\n }\n }\n\n componentDidUpdate() {\n if (!this.asProps.visible) {\n this.handlers.highlightedIndex(null);\n this.highlightedItemRef.current = null;\n }\n if (\n (this.state.focusLockItemIndex !== this.asProps.highlightedIndex || !this.asProps.visible) &&\n this.state.focusLockItemIndex !== null\n ) {\n setTimeout(() => {\n this.setState({ focusLockItemIndex: null });\n }, 0);\n }\n }\n\n render() {\n const { Children } = this.asProps;\n\n this.itemProps = [];\n\n return (\n <Root render={Dropdown}>\n <Children />\n </Root>\n );\n }\n}\n\nfunction List(props) {\n const SDropdownMenuList = Root;\n const { uid } = props;\n\n return sstyled(props.styles)(\n <SDropdownMenuList\n render={ScrollAreaComponent}\n tabIndex={null}\n role='menu'\n aria-labelledby={`igc-${uid}-trigger`}\n shadow={true}\n styles={scrollStyles}\n />,\n );\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 <DropdownMenu.Popper {...popperProps}>\n <Root render={DropdownMenu.List} />\n </DropdownMenu.Popper>\n );\n}\n\nfunction Item({\n styles,\n label,\n triggerRef,\n focusLock,\n disabled,\n highlighted,\n handleFocusOut,\n keyboardFocused,\n}) {\n const SDropdownMenuItem = Root;\n const ref = React.useRef();\n\n useFocusLock(ref, false, triggerRef, !focusLock || disabled, true, handleFocusOut);\n\n return sstyled(styles)(\n <SDropdownMenuItem\n ref={ref}\n render={Flex}\n role='menuitem'\n tabIndex={-1}\n id={label}\n use:highlighted={!disabled && highlighted && keyboardFocused}\n />,\n );\n}\n\nconst NestingContext = React.createContext(null);\n\nfunction Nesting({ styles, disabled }) {\n const SDropdownMenuNesting = Root;\n const contextValue = React.useMemo(() => ({ disabled }), [disabled]);\n\n return (\n <NestingContext.Provider value={contextValue}>\n {sstyled(styles)(<SDropdownMenuNesting aria-haspopup='true' render={DropdownMenu.Item} />)}\n </NestingContext.Provider>\n );\n}\n\nfunction NestingTrigger(props) {\n const { styles, visible, onNestedVisibleChange } = props;\n const SDropdownMenuItem = Root;\n const nestingContext = React.useContext(NestingContext);\n const disabled = props.disabled || nestingContext?.disabled;\n\n const lastUserInteractionRef = React.useRef(undefined);\n React.useEffect(() => {\n onNestedVisibleChange(lastUserInteractionRef.current);\n }, [visible]);\n\n const handleMouseEvent = React.useCallback(() => {\n lastUserInteractionRef.current = 'mouse';\n }, []);\n const handleKeyboardEvent = React.useCallback(() => {\n lastUserInteractionRef.current = 'keyboard';\n }, []);\n\n React.useEffect(() => {\n document.addEventListener('mouseover', handleMouseEvent, { capture: true });\n document.addEventListener('keydown', handleKeyboardEvent, { capture: true });\n return () => {\n document.removeEventListener('mouseover', handleMouseEvent, { capture: true });\n document.removeEventListener('keydown', handleKeyboardEvent, { capture: true });\n };\n }, []);\n\n return (\n <NestingContext.Provider value={null}>\n {sstyled(styles)(\n <SDropdownMenuItem nesting-trigger tabIndex={!disabled ? 0 : undefined} render={Flex} />,\n )}\n </NestingContext.Provider>\n );\n}\n\nfunction NestingItem(props) {\n const { styles } = props;\n const SDropdownNestingItem = Root;\n\n return sstyled(styles)(<SDropdownNestingItem render={NestingTrigger} tabIndex={-1} />);\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 Hint(props) {\n const SDropdownMenuItem = Root;\n return sstyled(props.styles)(<SDropdownMenuItem render={Flex} variant='hint' />);\n}\n\nfunction Title(props) {\n const SDropdownMenuItem = Root;\n return sstyled(props.styles)(<SDropdownMenuItem render={Flex} variant='title' />);\n}\n\nfunction Trigger({ keyboardFocused, onKeyboardFocusedStateChange }) {\n React.useEffect(\n () => onKeyboardFocusedStateChange(keyboardFocused),\n [keyboardFocused, onKeyboardFocusedStateChange],\n );\n\n return <Root render={Dropdown.Trigger} aria-haspopup='true' />;\n}\nTrigger.enhance = [keyboardFocusEnhance(false)];\n\nconst DropdownMenu = createComponent(\n DropdownMenuRoot,\n {\n Trigger,\n Popper: Dropdown.Popper,\n List,\n Menu,\n Item: [Item, { Addon }],\n Nesting: [Nesting, { Trigger: NestingTrigger, Addon, Item: NestingItem }],\n ItemTitle: Title,\n ItemHint: Hint,\n },\n {\n parent: [Dropdown],\n },\n);\n\nexport default DropdownMenu;\n"],"mappings":";;;;;;;;;;;;;;;;;;AAEA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AAFA,IAAAC,MAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,WAAA,GAAAD,sBAAA,CAAAF,OAAA;AAEA,IAAAI,SAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,QAAA,GAAAL,OAAA;AACA,IAAAM,WAAA,GAAAJ,sBAAA,CAAAF,OAAA;AACA,IAAAO,SAAA,GAAAL,sBAAA,CAAAF,OAAA;AACA,IAAAQ,YAAA,GAAAN,sBAAA,CAAAF,OAAA;AACA,IAAAS,4BAAA,GAAAT,OAAA;AACA,IAAAU,aAAA,GAAAV,OAAA;AACA,IAAAW,UAAA,GAAAX,OAAA;AAEA,IAAAY,gBAAA,GAAAV,sBAAA,CAAAF,OAAA;AAEA,IAAAa,SAAA,GAAAb,OAAA;AACA,IAAAc,cAAA,GAAAd,OAAA;AACA,IAAAe,eAAA,GAAAf,OAAA;AACA,IAAAgB,qBAAA,GAAAd,sBAAA,CAAAF,OAAA;AAAoF,IAAAiB,SAAA;AAAA;AAAA,IAAAC,KAAA,+BAAApB,KAAA,CAAAqB,OAAA,CAAAC,MAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAA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K,aAAA,CAAcC,oBAAQ,CAACkF,OAAO,MAAA5P,KAAA,CAAA2K,WAAA;IAAA,iBAAgB;EAAM,GAAAmF,MAAA,EAAG;AAChE;AACAF,OAAO,CAACG,OAAO,GAAG,CAAC,IAAAC,gCAAoB,EAAC,KAAK,CAAC,CAAC;AAE/C,IAAM5D,YAAY,GAAG,IAAA6D,gBAAe,EAClC1O,gBAAgB,EAChB;EACEqO,OAAO,EAAPA,OAAO;EACPvD,MAAM,EAAE3B,oBAAQ,CAAC2B,MAAM;EACvBjB,IAAI,EAAJA,IAAI;EACJU,IAAI,EAAJA,IAAI;EACJQ,IAAI,EAAE,CAACA,IAAI,EAAE;IAAEoC,KAAK,EAALA;EAAM,CAAC,CAAC;EACvBzB,OAAO,EAAE,CAACA,OAAO,EAAE;IAAE2C,OAAO,EAAEnC,cAAc;IAAEiB,KAAK,EAALA,KAAK;IAAEpC,IAAI,EAAEgC;EAAY,CAAC,CAAC;EACzE4B,SAAS,EAAET,KAAK;EAChBU,QAAQ,EAAEb;AACZ,CAAC,EACD;EACEc,MAAM,EAAE,CAAC1F,oBAAQ;AACnB,CAAC,CACF;AAAC,IAAA2F,QAAA,GAEajE,YAAY;AAAAkE,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} from '@semcore/dropdown';\nimport { Box, BoxProps, FlexProps } from '@semcore/flex-box';\nimport { ScrollAreaProps } from '@semcore/scroll-area';\n\nexport type DropdownMenuSize = 'm' | 'l';\n\n/** @deprecated */\nexport interface IDropdownMenuProps extends DropdownMenuProps, UnknownProperties {}\nexport type DropdownMenuProps = DropdownProps & {\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;\n /**\n * Index of the selected item\n */\n highlightedIndex?: number;\n /**\n * Callback for highlightedIndex change\n * highlightedIndex - Index of the selected item\n */\n onHighlightedIndexChange?: (highlightedIndex: number) => void;\n locale?: string;\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\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>;\n List: Intergalactic.Component<\n 'div',\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 'div',\n DropdownMenuItemProps,\n DropdownMenuContext,\n [handlers: DropdownMenuHandlers]\n > & {\n Addon: typeof Box;\n };\n ItemTitle: Intergalactic.Component<'div', DropdownMenuItemTitleProps>;\n ItemHint: Intergalactic.Component<'div', DropdownMenuItemHintProps>;\n Nesting: Intergalactic.Component<\n 'div',\n DropdownMenuItemProps,\n DropdownMenuContext,\n [handlers: DropdownMenuHandlers]\n > & {\n Trigger: Intergalactic.Component<'div', DropdownMenuItemProps>;\n Addon: typeof Box;\n };\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} from '@semcore/dropdown';\nimport { Box, BoxProps, FlexProps } from '@semcore/flex-box';\nimport { ScrollAreaProps } from '@semcore/scroll-area';\n\nexport type DropdownMenuSize = 'm' | 'l';\n\n/** @deprecated */\nexport interface IDropdownMenuProps extends DropdownMenuProps, UnknownProperties {}\nexport type DropdownMenuProps = DropdownProps & {\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;\n /**\n * Index of the selected item\n */\n highlightedIndex?: number;\n /**\n * Callback for highlightedIndex change\n * highlightedIndex - Index of the selected item\n */\n onHighlightedIndexChange?: (highlightedIndex: number) => void;\n locale?: string;\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\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>;\n List: Intergalactic.Component<\n 'div',\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 'div',\n DropdownMenuItemProps,\n DropdownMenuContext,\n [handlers: DropdownMenuHandlers]\n > & {\n Addon: typeof Box;\n };\n ItemTitle: Intergalactic.Component<'div', DropdownMenuItemTitleProps>;\n ItemHint: Intergalactic.Component<'div', DropdownMenuItemHintProps>;\n Nesting: Intergalactic.Component<\n 'div',\n DropdownMenuItemProps,\n DropdownMenuContext,\n [handlers: DropdownMenuHandlers]\n > & {\n Trigger: Intergalactic.Component<'div', DropdownMenuItemProps>;\n Item: Intergalactic.Component<'div', DropdownMenuItemProps>;\n Addon: typeof Box;\n };\n};\n\nexport default DropdownMenu;\n"],"mappings":""}
@@ -122,4 +122,17 @@ SDropdownMenuNesting[size='m'] {
122
122
  SDropdownMenuNesting[highlighted] {
123
123
  z-index: 1;
124
124
  box-shadow: var(--intergalactic-keyboard-focus, 0px 0px 0px 3px rgba(0, 143, 248, 0.5)) inset;
125
+ }
126
+
127
+ SDropdownNestingItem[size='l'],
128
+ SDropdownNestingItem[size='m'] {
129
+ padding-right: 0;
130
+ }
131
+
132
+ SDropdownNestingItem SDropdownMenuItem {
133
+ width: auto;
134
+ padding-top: 0;
135
+ padding-bottom: 0;
136
+ padding-left: 0;
137
+ min-height: auto;
125
138
  }
@@ -11,12 +11,12 @@ var _core = require("@semcore/core");
11
11
  *
12
12
  * We will figure out what to do with it and remove it.
13
13
  * */
14
- var scrollStyles = ( /*__reshadow_css_start__*/_core.sstyled.insert( /*__inner_css_start__*/".___SShadowHorizontal_16s5v_gg_:after,.___SShadowHorizontal_16s5v_gg_:before{width:16px;height:100%;border-radius:var(--intergalactic-control-rounded, 6px)}.___SShadowHorizontal_16s5v_gg_._position_median_16s5v_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 )}.___SShadowHorizontal_16s5v_gg_._position_median_16s5v_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 )}.___SShadowHorizontal_16s5v_gg_._position_start_16s5v_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 )}.___SShadowHorizontal_16s5v_gg_._position_end_16s5v_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 )}.___SShadowVertical_16s5v_gg_:after,.___SShadowVertical_16s5v_gg_:before{width:100%;height:16px;border-radius:var(--intergalactic-control-rounded, 6px)}.___SShadowVertical_16s5v_gg_._position_median_16s5v_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 )}.___SShadowVertical_16s5v_gg_._position_median_16s5v_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 )}.___SShadowVertical_16s5v_gg_._position_start_16s5v_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 )}.___SShadowVertical_16s5v_gg_._position_end_16s5v_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 )}" /*__inner_css_end__*/, "16s5v_gg_") /*__reshadow_css_end__*/, {
15
- "__SShadowHorizontal": "___SShadowHorizontal_16s5v_gg_",
16
- "_position_median": "_position_median_16s5v_gg_",
17
- "_position_start": "_position_start_16s5v_gg_",
18
- "_position_end": "_position_end_16s5v_gg_",
19
- "__SShadowVertical": "___SShadowVertical_16s5v_gg_"
14
+ var scrollStyles = ( /*__reshadow_css_start__*/_core.sstyled.insert( /*__inner_css_start__*/".___SShadowHorizontal_48om1_gg_:after,.___SShadowHorizontal_48om1_gg_:before{width:16px;height:100%;border-radius:var(--intergalactic-control-rounded, 6px)}.___SShadowHorizontal_48om1_gg_._position_median_48om1_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 )}.___SShadowHorizontal_48om1_gg_._position_median_48om1_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 )}.___SShadowHorizontal_48om1_gg_._position_start_48om1_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 )}.___SShadowHorizontal_48om1_gg_._position_end_48om1_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 )}.___SShadowVertical_48om1_gg_:after,.___SShadowVertical_48om1_gg_:before{width:100%;height:16px;border-radius:var(--intergalactic-control-rounded, 6px)}.___SShadowVertical_48om1_gg_._position_median_48om1_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 )}.___SShadowVertical_48om1_gg_._position_median_48om1_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 )}.___SShadowVertical_48om1_gg_._position_start_48om1_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 )}.___SShadowVertical_48om1_gg_._position_end_48om1_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 )}" /*__inner_css_end__*/, "48om1_gg_") /*__reshadow_css_end__*/, {
15
+ "__SShadowHorizontal": "___SShadowHorizontal_48om1_gg_",
16
+ "_position_median": "_position_median_48om1_gg_",
17
+ "_position_start": "_position_start_48om1_gg_",
18
+ "_position_end": "_position_end_48om1_gg_",
19
+ "__SShadowVertical": "___SShadowVertical_48om1_gg_"
20
20
  });
21
21
  var _default = scrollStyles;
22
22
  exports["default"] = _default;
@@ -9,6 +9,7 @@ import _inherits from "@babel/runtime/helpers/inherits";
9
9
  import _createSuper from "@babel/runtime/helpers/createSuper";
10
10
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
11
11
  import { sstyled as _sstyled } from "@semcore/core";
12
+ import { assignProps as _assignProps10 } from "@semcore/core";
12
13
  import { assignProps as _assignProps9 } from "@semcore/core";
13
14
  import { assignProps as _assignProps8 } from "@semcore/core";
14
15
  import { assignProps as _assignProps7 } from "@semcore/core";
@@ -32,25 +33,27 @@ import { useFocusLock } from '@semcore/utils/lib/use/useFocusLock';
32
33
  import { hasParent } from '@semcore/utils/lib/hasParent';
33
34
  import scrollStyles from './styleScrollArea';
34
35
  /*__reshadow-styles__:"./style/dropdown-menu.shadow.css"*/
35
- var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SDropdownMenuItem_1c4hq_gg_,.___SDropdownMenuList_1c4hq_gg_{position:relative;color:var(--intergalactic-text-primary, #191b23)}.___SDropdownMenuList_1c4hq_gg_{max-height:240px;padding:var(--intergalactic-spacing-1x, 4px)0;min-height:26px;min-width:32px;box-sizing:content-box;z-index:0}.___SDropdownMenuItem_1c4hq_gg_{display:flex;align-items:center;-webkit-text-decoration:none;text-decoration:none;box-sizing:border-box;cursor:pointer;width:100%;text-align:left;line-height:normal}@media (hover:hover){.___SDropdownMenuItem_1c4hq_gg_:hover{background-color:var(--intergalactic-dropdown-menu-item-hover, #f4f5f9)}}.___SDropdownMenuItem_1c4hq_gg_:focus{outline:0}.___SDropdownMenuItem_1c4hq_gg_.__selected_1c4hq_gg_{background-color:var(--intergalactic-dropdown-menu-item-selected, rgba(196, 229, 254, 0.7));box-shadow:2px 0 0 0 var(--intergalactic-control-primary-info, #008ff8) inset}@media (hover:hover){.___SDropdownMenuItem_1c4hq_gg_.__selected_1c4hq_gg_:hover{background-color:var(--intergalactic-dropdown-menu-item-selected-hover, #c4e5fe)}}.___SDropdownMenuItem_1c4hq_gg_.__highlighted_1c4hq_gg_:not(:focus-within){z-index:1;box-shadow:var(--intergalactic-keyboard-focus, 0px 0px 0px 3px rgba(0, 143, 248, 0.5)) inset}.___SDropdownMenuItem_1c4hq_gg_.__disabled_1c4hq_gg_{opacity:var(--intergalactic-disabled-opacity, 0.3);cursor:default;pointer-events:none}.___SDropdownMenuItem_1c4hq_gg_._size_l_1c4hq_gg_{font-size:var(--intergalactic-fs-300, 16px);line-height:var(--intergalactic-lh-300, 150%);padding:var(--intergalactic-spacing-2x, 8px) var(--intergalactic-spacing-3x, 12px);min-height:40px}.___SDropdownMenuItem_1c4hq_gg_._size_m_1c4hq_gg_{font-size:var(--intergalactic-fs-200, 14px);line-height:var(--intergalactic-lh-200, 142%);padding:calc(var(--intergalactic-spacing-1x, 4px) + var(--intergalactic-spacing-05x, 2px)) var(--intergalactic-spacing-2x, 8px);min-height:32px}.___SDropdownMenuItem_1c4hq_gg_.__notInteractive_1c4hq_gg_{cursor:default}@media (hover:hover){.___SDropdownMenuItem_1c4hq_gg_.__notInteractive_1c4hq_gg_:hover{background:0 0}}.___SDropdownMenuItem_1c4hq_gg_._variant_hint_1c4hq_gg_{color:var(--intergalactic-text-secondary, #6c6e79);cursor:default}@media (hover:hover){.___SDropdownMenuItem_1c4hq_gg_._variant_hint_1c4hq_gg_:hover{background:0 0}}.___SDropdownMenuItem_1c4hq_gg_._variant_title_1c4hq_gg_{font-weight:var(--intergalactic-bold, 700);cursor:default}@media (hover:hover){.___SDropdownMenuItem_1c4hq_gg_._variant_title_1c4hq_gg_:hover{background:0 0}}.___SDropdownMenuItem_1c4hq_gg_.__visible_1c4hq_gg_{background-color:var(--intergalactic-dropdown-menu-item-hover, #f4f5f9)}.___SDropdownMenuItem_1c4hq_gg_.__nesting-trigger_1c4hq_gg_{justify-content:space-between}.___SDropdownMenuItemAddon_1c4hq_gg_{display:inline-flex;margin-left:var(--intergalactic-spacing-2x, 8px);margin-right:var(--intergalactic-spacing-2x, 8px)}.___SDropdownMenuItemAddon_1c4hq_gg_:first-child{margin-left:0}.___SDropdownMenuItemAddon_1c4hq_gg_:last-child{margin-right:0}.___SDropdownMenuNesting_1c4hq_gg_,.___SDropdownMenuNesting_1c4hq_gg_._size_l_1c4hq_gg_,.___SDropdownMenuNesting_1c4hq_gg_._size_m_1c4hq_gg_{padding:0}.___SDropdownMenuNesting_1c4hq_gg_.__highlighted_1c4hq_gg_{z-index:1;box-shadow:var(--intergalactic-keyboard-focus, 0px 0px 0px 3px rgba(0, 143, 248, 0.5)) inset}" /*__inner_css_end__*/, "1c4hq_gg_") /*__reshadow_css_end__*/, {
36
- "__SDropdownMenuList": "___SDropdownMenuList_1c4hq_gg_",
37
- "__SDropdownMenuItem": "___SDropdownMenuItem_1c4hq_gg_",
38
- "_highlighted": "__highlighted_1c4hq_gg_",
39
- "_disabled": "__disabled_1c4hq_gg_",
40
- "_size_l": "_size_l_1c4hq_gg_",
41
- "_size_m": "_size_m_1c4hq_gg_",
42
- "_visible": "__visible_1c4hq_gg_",
43
- "_nesting-trigger": "__nesting-trigger_1c4hq_gg_",
44
- "__SDropdownMenuNesting": "___SDropdownMenuNesting_1c4hq_gg_",
45
- "_selected": "__selected_1c4hq_gg_",
46
- "_notInteractive": "__notInteractive_1c4hq_gg_",
47
- "_variant_hint": "_variant_hint_1c4hq_gg_",
48
- "_variant_title": "_variant_title_1c4hq_gg_",
49
- "__SDropdownMenuItemAddon": "___SDropdownMenuItemAddon_1c4hq_gg_"
36
+ var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SDropdownMenuItem_1w8a3_gg_,.___SDropdownMenuList_1w8a3_gg_{position:relative;color:var(--intergalactic-text-primary, #191b23)}.___SDropdownMenuList_1w8a3_gg_{max-height:240px;padding:var(--intergalactic-spacing-1x, 4px)0;min-height:26px;min-width:32px;box-sizing:content-box;z-index:0}.___SDropdownMenuItem_1w8a3_gg_{display:flex;align-items:center;-webkit-text-decoration:none;text-decoration:none;box-sizing:border-box;cursor:pointer;width:100%;text-align:left;line-height:normal}@media (hover:hover){.___SDropdownMenuItem_1w8a3_gg_:hover{background-color:var(--intergalactic-dropdown-menu-item-hover, #f4f5f9)}}.___SDropdownMenuItem_1w8a3_gg_:focus{outline:0}.___SDropdownMenuItem_1w8a3_gg_.__selected_1w8a3_gg_{background-color:var(--intergalactic-dropdown-menu-item-selected, rgba(196, 229, 254, 0.7));box-shadow:2px 0 0 0 var(--intergalactic-control-primary-info, #008ff8) inset}@media (hover:hover){.___SDropdownMenuItem_1w8a3_gg_.__selected_1w8a3_gg_:hover{background-color:var(--intergalactic-dropdown-menu-item-selected-hover, #c4e5fe)}}.___SDropdownMenuItem_1w8a3_gg_.__highlighted_1w8a3_gg_:not(:focus-within){z-index:1;box-shadow:var(--intergalactic-keyboard-focus, 0px 0px 0px 3px rgba(0, 143, 248, 0.5)) inset}.___SDropdownMenuItem_1w8a3_gg_.__disabled_1w8a3_gg_{opacity:var(--intergalactic-disabled-opacity, 0.3);cursor:default;pointer-events:none}.___SDropdownMenuItem_1w8a3_gg_._size_l_1w8a3_gg_{font-size:var(--intergalactic-fs-300, 16px);line-height:var(--intergalactic-lh-300, 150%);padding:var(--intergalactic-spacing-2x, 8px) var(--intergalactic-spacing-3x, 12px);min-height:40px}.___SDropdownMenuItem_1w8a3_gg_._size_m_1w8a3_gg_{font-size:var(--intergalactic-fs-200, 14px);line-height:var(--intergalactic-lh-200, 142%);padding:calc(var(--intergalactic-spacing-1x, 4px) + var(--intergalactic-spacing-05x, 2px)) var(--intergalactic-spacing-2x, 8px);min-height:32px}.___SDropdownMenuItem_1w8a3_gg_.__notInteractive_1w8a3_gg_{cursor:default}@media (hover:hover){.___SDropdownMenuItem_1w8a3_gg_.__notInteractive_1w8a3_gg_:hover{background:0 0}}.___SDropdownMenuItem_1w8a3_gg_._variant_hint_1w8a3_gg_{color:var(--intergalactic-text-secondary, #6c6e79);cursor:default}@media (hover:hover){.___SDropdownMenuItem_1w8a3_gg_._variant_hint_1w8a3_gg_:hover{background:0 0}}.___SDropdownMenuItem_1w8a3_gg_._variant_title_1w8a3_gg_{font-weight:var(--intergalactic-bold, 700);cursor:default}@media (hover:hover){.___SDropdownMenuItem_1w8a3_gg_._variant_title_1w8a3_gg_:hover{background:0 0}}.___SDropdownMenuItem_1w8a3_gg_.__visible_1w8a3_gg_{background-color:var(--intergalactic-dropdown-menu-item-hover, #f4f5f9)}.___SDropdownMenuItem_1w8a3_gg_.__nesting-trigger_1w8a3_gg_{justify-content:space-between}.___SDropdownMenuItemAddon_1w8a3_gg_{display:inline-flex;margin-left:var(--intergalactic-spacing-2x, 8px);margin-right:var(--intergalactic-spacing-2x, 8px)}.___SDropdownMenuItemAddon_1w8a3_gg_:first-child{margin-left:0}.___SDropdownMenuItemAddon_1w8a3_gg_:last-child{margin-right:0}.___SDropdownMenuNesting_1w8a3_gg_,.___SDropdownMenuNesting_1w8a3_gg_._size_l_1w8a3_gg_,.___SDropdownMenuNesting_1w8a3_gg_._size_m_1w8a3_gg_{padding:0}.___SDropdownMenuNesting_1w8a3_gg_.__highlighted_1w8a3_gg_{z-index:1;box-shadow:var(--intergalactic-keyboard-focus, 0px 0px 0px 3px rgba(0, 143, 248, 0.5)) inset}.___SDropdownNestingItem_1w8a3_gg_._size_l_1w8a3_gg_,.___SDropdownNestingItem_1w8a3_gg_._size_m_1w8a3_gg_{padding-right:0}.___SDropdownNestingItem_1w8a3_gg_ .___SDropdownMenuItem_1w8a3_gg_{width:auto;padding-top:0;padding-bottom:0;padding-left:0;min-height:auto}" /*__inner_css_end__*/, "1w8a3_gg_") /*__reshadow_css_end__*/, {
37
+ "__SDropdownMenuList": "___SDropdownMenuList_1w8a3_gg_",
38
+ "__SDropdownMenuItem": "___SDropdownMenuItem_1w8a3_gg_",
39
+ "_highlighted": "__highlighted_1w8a3_gg_",
40
+ "_disabled": "__disabled_1w8a3_gg_",
41
+ "_size_l": "_size_l_1w8a3_gg_",
42
+ "_size_m": "_size_m_1w8a3_gg_",
43
+ "_visible": "__visible_1w8a3_gg_",
44
+ "_nesting-trigger": "__nesting-trigger_1w8a3_gg_",
45
+ "__SDropdownMenuNesting": "___SDropdownMenuNesting_1w8a3_gg_",
46
+ "__SDropdownNestingItem": "___SDropdownNestingItem_1w8a3_gg_",
47
+ "_selected": "__selected_1w8a3_gg_",
48
+ "_notInteractive": "__notInteractive_1w8a3_gg_",
49
+ "_variant_hint": "_variant_hint_1w8a3_gg_",
50
+ "_variant_title": "_variant_title_1w8a3_gg_",
51
+ "__SDropdownMenuItemAddon": "___SDropdownMenuItemAddon_1w8a3_gg_"
50
52
  });
51
53
  import { setFocus } from '@semcore/utils/lib/focus-lock/setFocus';
52
54
  import { isFocusInside } from '@semcore/utils/lib/focus-lock/isFocusInside';
53
55
  import { getFocusableIn } from '@semcore/utils/lib/focus-lock/getFocusableIn';
56
+ import keyboardFocusEnhance from '@semcore/utils/lib/enhances/keyboardFocusEnhance';
54
57
  var DropdownMenuRoot = /*#__PURE__*/function (_Component) {
55
58
  _inherits(DropdownMenuRoot, _Component);
56
59
  var _super = _createSuper(DropdownMenuRoot);
@@ -62,7 +65,8 @@ var DropdownMenuRoot = /*#__PURE__*/function (_Component) {
62
65
  }
63
66
  _this = _super.call.apply(_super, [this].concat(args));
64
67
  _defineProperty(_assertThisInitialized(_this), "state", {
65
- focusLockItemIndex: null
68
+ focusLockItemIndex: null,
69
+ keyboardFocused: false
66
70
  });
67
71
  _defineProperty(_assertThisInitialized(_this), "popperRef", /*#__PURE__*/React.createRef());
68
72
  _defineProperty(_assertThisInitialized(_this), "triggerRef", /*#__PURE__*/React.createRef());
@@ -201,6 +205,11 @@ var DropdownMenuRoot = /*#__PURE__*/function (_Component) {
201
205
  _defineProperty(_assertThisInitialized(_this), "handleTriggerKeyboardFocus", function () {
202
206
  if (_this.ignoreTriggerKeyboardFocusUntil > Date.now()) return false;
203
207
  });
208
+ _defineProperty(_assertThisInitialized(_this), "handleTriggerKeyboardFocusedStateChange", function (keyboardFocused) {
209
+ _this.setState({
210
+ keyboardFocused: keyboardFocused
211
+ });
212
+ });
204
213
  _defineProperty(_assertThisInitialized(_this), "handleItemFocusOut", function (event) {
205
214
  if (event.relatedTarget === _this.popperRef.current) return;
206
215
  var focused = event.relatedTarget;
@@ -254,6 +263,9 @@ var DropdownMenuRoot = /*#__PURE__*/function (_Component) {
254
263
  onNestedVisibleChange: _this.handleNestedVisibleChange
255
264
  };
256
265
  });
266
+ _defineProperty(_assertThisInitialized(_this), "getNestingItemProps", function () {
267
+ return _this.getNestingTriggerProps();
268
+ });
257
269
  _defineProperty(_assertThisInitialized(_this), "scrollToNode", function (node) {
258
270
  if (node) {
259
271
  _this.highlightedItemRef.current = node;
@@ -312,7 +324,8 @@ var DropdownMenuRoot = /*#__PURE__*/function (_Component) {
312
324
  'aria-activedescendant': visible && highlightedIndex !== null ? "igc-".concat(uid, "-option-").concat(highlightedIndex) : undefined,
313
325
  onKeyDown: this.bindHandlerKeyDown('trigger'),
314
326
  ref: this.triggerRef,
315
- onKeyboardFocus: this.handleTriggerKeyboardFocus
327
+ onKeyboardFocus: this.handleTriggerKeyboardFocus,
328
+ onKeyboardFocusedStateChange: this.handleTriggerKeyboardFocusedStateChange
316
329
  };
317
330
  }
318
331
  }, {
@@ -374,7 +387,8 @@ var DropdownMenuRoot = /*#__PURE__*/function (_Component) {
374
387
  triggerRef: this.triggerRef,
375
388
  ref: ref,
376
389
  index: index,
377
- handleFocusOut: this.handleItemFocusOut
390
+ handleFocusOut: this.handleItemFocusOut,
391
+ keyboardFocused: this.state.keyboardFocused
378
392
  };
379
393
  }
380
394
  }, {
@@ -464,10 +478,10 @@ _defineProperty(DropdownMenuRoot, "defaultProps", {
464
478
  });
465
479
  function List(props) {
466
480
  var _ref2 = arguments[0],
467
- _ref10;
481
+ _ref11;
468
482
  var SDropdownMenuList = ScrollAreaComponent;
469
483
  var uid = props.uid;
470
- return _ref10 = sstyled(props.styles), /*#__PURE__*/React.createElement(SDropdownMenuList, _ref10.cn("SDropdownMenuList", _objectSpread({}, _assignProps2({
484
+ return _ref11 = sstyled(props.styles), /*#__PURE__*/React.createElement(SDropdownMenuList, _ref11.cn("SDropdownMenuList", _objectSpread({}, _assignProps2({
471
485
  "tabIndex": null,
472
486
  "role": 'menu',
473
487
  "aria-labelledby": "igc-".concat(uid, "-trigger"),
@@ -495,33 +509,34 @@ function Menu(props) {
495
509
  };
496
510
  return /*#__PURE__*/React.createElement(DropdownMenu.Popper, popperProps, /*#__PURE__*/React.createElement(DropdownMenu.List, _assignProps3({}, _ref3)));
497
511
  }
498
- function Item(_ref16) {
512
+ function Item(_ref18) {
499
513
  var _ref4 = arguments[0],
500
- _ref11;
501
- var styles = _ref16.styles,
502
- label = _ref16.label,
503
- triggerRef = _ref16.triggerRef,
504
- focusLock = _ref16.focusLock,
505
- disabled = _ref16.disabled,
506
- highlighted = _ref16.highlighted,
507
- handleFocusOut = _ref16.handleFocusOut;
514
+ _ref12;
515
+ var styles = _ref18.styles,
516
+ label = _ref18.label,
517
+ triggerRef = _ref18.triggerRef,
518
+ focusLock = _ref18.focusLock,
519
+ disabled = _ref18.disabled,
520
+ highlighted = _ref18.highlighted,
521
+ handleFocusOut = _ref18.handleFocusOut,
522
+ keyboardFocused = _ref18.keyboardFocused;
508
523
  var SDropdownMenuItem = Flex;
509
524
  var ref = React.useRef();
510
525
  useFocusLock(ref, false, triggerRef, !focusLock || disabled, true, handleFocusOut);
511
- return _ref11 = sstyled(styles), /*#__PURE__*/React.createElement(SDropdownMenuItem, _ref11.cn("SDropdownMenuItem", _objectSpread({}, _assignProps4({
526
+ return _ref12 = sstyled(styles), /*#__PURE__*/React.createElement(SDropdownMenuItem, _ref12.cn("SDropdownMenuItem", _objectSpread({}, _assignProps4({
512
527
  "ref": ref,
513
528
  "role": 'menuitem',
514
529
  "tabIndex": -1,
515
530
  "id": label,
516
- "use:highlighted": !disabled && highlighted
531
+ "use:highlighted": !disabled && highlighted && keyboardFocused
517
532
  }, _ref4))));
518
533
  }
519
534
  var NestingContext = /*#__PURE__*/React.createContext(null);
520
- function Nesting(_ref17) {
535
+ function Nesting(_ref19) {
521
536
  var _ref5 = arguments[0],
522
- _ref12;
523
- var styles = _ref17.styles,
524
- disabled = _ref17.disabled;
537
+ _ref13;
538
+ var styles = _ref19.styles,
539
+ disabled = _ref19.disabled;
525
540
  var SDropdownMenuNesting = DropdownMenu.Item;
526
541
  var contextValue = React.useMemo(function () {
527
542
  return {
@@ -530,13 +545,13 @@ function Nesting(_ref17) {
530
545
  }, [disabled]);
531
546
  return /*#__PURE__*/React.createElement(NestingContext.Provider, {
532
547
  value: contextValue
533
- }, (_ref12 = sstyled(styles), /*#__PURE__*/React.createElement(SDropdownMenuNesting, _ref12.cn("SDropdownMenuNesting", _objectSpread({}, _assignProps5({
548
+ }, (_ref13 = sstyled(styles), /*#__PURE__*/React.createElement(SDropdownMenuNesting, _ref13.cn("SDropdownMenuNesting", _objectSpread({}, _assignProps5({
534
549
  "aria-haspopup": 'true'
535
550
  }, _ref5))))));
536
551
  }
537
552
  function NestingTrigger(props) {
538
553
  var _ref6 = arguments[0],
539
- _ref13;
554
+ _ref14;
540
555
  var styles = props.styles,
541
556
  visible = props.visible,
542
557
  onNestedVisibleChange = props.onNestedVisibleChange;
@@ -571,11 +586,20 @@ function NestingTrigger(props) {
571
586
  }, []);
572
587
  return /*#__PURE__*/React.createElement(NestingContext.Provider, {
573
588
  value: null
574
- }, (_ref13 = sstyled(styles), /*#__PURE__*/React.createElement(SDropdownMenuItem, _ref13.cn("SDropdownMenuItem", _objectSpread({}, _assignProps6({
589
+ }, (_ref14 = sstyled(styles), /*#__PURE__*/React.createElement(SDropdownMenuItem, _ref14.cn("SDropdownMenuItem", _objectSpread({}, _assignProps6({
575
590
  "nesting-trigger": true,
576
591
  "tabIndex": !disabled ? 0 : undefined
577
592
  }, _ref6))))));
578
593
  }
594
+ function NestingItem(props) {
595
+ var _ref7 = arguments[0],
596
+ _ref15;
597
+ var styles = props.styles;
598
+ var SDropdownNestingItem = NestingTrigger;
599
+ return _ref15 = sstyled(styles), /*#__PURE__*/React.createElement(SDropdownNestingItem, _ref15.cn("SDropdownNestingItem", _objectSpread({}, _assignProps7({
600
+ "tabIndex": -1
601
+ }, _ref7))));
602
+ }
579
603
  function Addon(props) {
580
604
  var _useBox = useBox(props, props.forwardRef),
581
605
  _useBox2 = _slicedToArray(_useBox, 2),
@@ -589,27 +613,33 @@ function Addon(props) {
589
613
  }, other));
590
614
  }
591
615
  function Hint(props) {
592
- var _ref7 = arguments[0],
593
- _ref14;
616
+ var _ref8 = arguments[0],
617
+ _ref16;
594
618
  var SDropdownMenuItem = Flex;
595
- return _ref14 = sstyled(props.styles), /*#__PURE__*/React.createElement(SDropdownMenuItem, _ref14.cn("SDropdownMenuItem", _objectSpread({}, _assignProps7({
619
+ return _ref16 = sstyled(props.styles), /*#__PURE__*/React.createElement(SDropdownMenuItem, _ref16.cn("SDropdownMenuItem", _objectSpread({}, _assignProps8({
596
620
  "variant": 'hint'
597
- }, _ref7))));
621
+ }, _ref8))));
598
622
  }
599
623
  function Title(props) {
600
- var _ref8 = arguments[0],
601
- _ref15;
624
+ var _ref9 = arguments[0],
625
+ _ref17;
602
626
  var SDropdownMenuItem = Flex;
603
- return _ref15 = sstyled(props.styles), /*#__PURE__*/React.createElement(SDropdownMenuItem, _ref15.cn("SDropdownMenuItem", _objectSpread({}, _assignProps8({
627
+ return _ref17 = sstyled(props.styles), /*#__PURE__*/React.createElement(SDropdownMenuItem, _ref17.cn("SDropdownMenuItem", _objectSpread({}, _assignProps9({
604
628
  "variant": 'title'
605
- }, _ref8))));
629
+ }, _ref9))));
606
630
  }
607
- function Trigger() {
608
- var _ref9 = arguments[0];
609
- return /*#__PURE__*/React.createElement(Dropdown.Trigger, _assignProps9({
631
+ function Trigger(_ref20) {
632
+ var _ref10 = arguments[0];
633
+ var keyboardFocused = _ref20.keyboardFocused,
634
+ onKeyboardFocusedStateChange = _ref20.onKeyboardFocusedStateChange;
635
+ React.useEffect(function () {
636
+ return onKeyboardFocusedStateChange(keyboardFocused);
637
+ }, [keyboardFocused, onKeyboardFocusedStateChange]);
638
+ return /*#__PURE__*/React.createElement(Dropdown.Trigger, _assignProps10({
610
639
  "aria-haspopup": 'true'
611
- }, _ref9));
640
+ }, _ref10));
612
641
  }
642
+ Trigger.enhance = [keyboardFocusEnhance(false)];
613
643
  var DropdownMenu = createComponent(DropdownMenuRoot, {
614
644
  Trigger: Trigger,
615
645
  Popper: Dropdown.Popper,
@@ -620,7 +650,8 @@ var DropdownMenu = createComponent(DropdownMenuRoot, {
620
650
  }],
621
651
  Nesting: [Nesting, {
622
652
  Trigger: NestingTrigger,
623
- Addon: Addon
653
+ Addon: Addon,
654
+ Item: NestingItem
624
655
  }],
625
656
  ItemTitle: Title,
626
657
  ItemHint: Hint
@@ -1 +1 @@
1
- {"version":3,"file":"DropdownMenu.js","names":["React","cn","createComponent","Component","sstyled","Root","Dropdown","Flex","useBox","ScrollAreaComponent","uniqueIDEnhancement","i18nEnhance","localizedMessages","useFocusLock","hasParent","scrollStyles","style","_sstyled","insert","setFocus","isFocusInside","getFocusableIn","DropdownMenuRoot","_Component","_inherits","_super","_createSuper","_this","_classCallCheck","_len","arguments","length","args","Array","_key","call","apply","concat","_defineProperty","_assertThisInitialized","focusLockItemIndex","createRef","trigger","triggerRef","current","place","e","amount","shiftKey","targetTagName","target","tagName","_this$asProps","asProps","visible","highlightedIndex","placement","key","includes","item","itemRefs","setState","handlers","state","verticalPlacement","startsWith","preventDefault","show","hide","visibleChanged","stopPropagation","focusable","focusedIndex","indexOf","document","activeElement","nextFocused","focus","prevFocused","moveHighlightedIndex","popperRef","focusTrigger","highlightedItemRef","click","ignoreTriggerKeyboardFocusUntil","Date","now","event","relatedTarget","focused","_focusable$","itemIndex","currentTarget","handleNestingClick","size","onClick","onKeyDown","handleNestingKeyDown","lastUserInteraction","_this$asProps2","onNestedVisibleChange","handleNestedVisibleChange","node","setTimeout","scrollIntoView","prevHighlightedIndex","block","inline","_createClass","value","uncontrolledProps","_this2","selectedItemIndex","itemProps","findIndex","selected","getTriggerProps","_this$asProps3","uid","disablePortal","getI18nText","id","focusHint","undefined","bindHandlerKeyDown","ref","onKeyboardFocus","handleTriggerKeyboardFocus","getListProps","_this$asProps4","index","getPopperProps","_this$asProps5","ignorePortalsStacking","interaction","tabIndex","focusMaster","hideFocus","getItemProps","props","_this3","_this$asProps6","highlighted","scrollToNode","focusLock","handleFocusOut","handleItemFocusOut","getItemHintProps","getItemTitleProps","_this$itemProps$newIn","itemsLastIndex","selectedIndex","newIndex","disabled","componentDidUpdate","_this4","render","_ref","Children","createElement","_assignProps","defaultVisible","defaultHighlightedIndex","i18n","locale","List","_ref2","arguments[0]","_ref10","SDropdownMenuList","styles","_objectSpread","_assignProps2","Menu","_ref3","disableEnforceFocus","autoFocus","animationsDisabled","popperProps","DropdownMenu","Popper","_assignProps3","Item","_ref16","_ref4","_ref11","label","SDropdownMenuItem","useRef","_assignProps4","NestingContext","createContext","Nesting","_ref17","_ref5","_ref12","SDropdownMenuNesting","contextValue","useMemo","Provider","_assignProps5","NestingTrigger","_ref6","_ref13","nestingContext","useContext","lastUserInteractionRef","useEffect","handleMouseEvent","useCallback","handleKeyboardEvent","addEventListener","capture","removeEventListener","_assignProps6","Addon","_useBox","forwardRef","_useBox2","_slicedToArray","SDropdownMenuItemAddon","_useBox2$","className","other","_objectWithoutProperties","_excluded","_extends","Hint","_ref7","_ref14","_assignProps7","Title","_ref8","_ref15","_assignProps8","Trigger","_ref9","_assignProps9","ItemTitle","ItemHint","parent"],"sources":["../../src/DropdownMenu.jsx"],"sourcesContent":["import React from 'react';\nimport cn from 'classnames';\nimport createComponent, { Component, sstyled, Root } from '@semcore/core';\nimport Dropdown from '@semcore/dropdown';\nimport { Flex, useBox } from '@semcore/flex-box';\nimport ScrollAreaComponent from '@semcore/scroll-area';\nimport uniqueIDEnhancement from '@semcore/utils/lib/uniqueID';\nimport i18nEnhance from '@semcore/utils/lib/enhances/i18nEnhance';\nimport { localizedMessages } from './translations/__intergalactic-dynamic-locales';\nimport { useFocusLock } from '@semcore/utils/lib/use/useFocusLock';\nimport { hasParent } from '@semcore/utils/lib/hasParent';\n\nimport scrollStyles from './styleScrollArea';\nimport style from './style/dropdown-menu.shadow.css';\nimport { setFocus } from '@semcore/utils/lib/focus-lock/setFocus';\nimport { isFocusInside } from '@semcore/utils/lib/focus-lock/isFocusInside';\nimport { getFocusableIn } from '@semcore/utils/lib/focus-lock/getFocusableIn';\n\nclass DropdownMenuRoot extends Component {\n static displayName = 'DropdownMenu';\n static style = style;\n static enhance = [uniqueIDEnhancement(), i18nEnhance(localizedMessages)];\n\n static defaultProps = {\n size: 'm',\n defaultVisible: false,\n defaultHighlightedIndex: null,\n i18n: localizedMessages,\n locale: 'en',\n interaction: 'click',\n };\n\n state = {\n focusLockItemIndex: null,\n };\n\n popperRef = React.createRef();\n triggerRef = React.createRef();\n\n itemProps = [];\n itemRefs = [];\n\n highlightedItemRef = React.createRef();\n\n ignoreTriggerKeyboardFocusUntil = 0;\n prevHighlightedIndex = null;\n\n uncontrolledProps() {\n return {\n highlightedIndex: null,\n visible: [\n null,\n (visible) => {\n if (!visible) {\n this.ignoreTriggerKeyboardFocusUntil = Date.now() + 100;\n } else {\n setTimeout(() => {\n const selectedItemIndex = this.itemProps.findIndex((item) => item.selected);\n if (selectedItemIndex === -1 || this.asProps.highlightedIndex !== null) return;\n this.handlers.highlightedIndex(selectedItemIndex);\n }, 0);\n }\n },\n ],\n };\n }\n\n focusTrigger = () => {\n const trigger = this.triggerRef.current;\n if (!trigger) return;\n if (isFocusInside(trigger)) return;\n setFocus(trigger);\n };\n\n bindHandlerKeyDown = (place) => (e) => {\n const amount = e.shiftKey ? 5 : 1;\n const targetTagName = e.target.tagName;\n\n const { visible, highlightedIndex, placement } = this.asProps;\n\n if (e.key === ' ' && ['INPUT', 'TEXTAREA'].includes(targetTagName)) return;\n if (e.key === 'Enter' && targetTagName === 'TEXTAREA') return;\n if (\n place === 'popper' &&\n (e.key === ' ' || e.key === 'Enter') &&\n (targetTagName === 'BUTTON' || targetTagName === 'A')\n )\n return;\n\n if (visible && e.key === 'Tab') {\n const item = highlightedIndex !== null && this.itemRefs[highlightedIndex];\n if (item && getFocusableIn(item).length !== 0) {\n this.setState({ focusLockItemIndex: highlightedIndex });\n } else {\n this.handlers.highlightedIndex(null);\n }\n return;\n }\n\n if (e.key === 'Escape' && this.state.focusLockItemIndex !== null) {\n this.setState({ focusLockItemIndex: null });\n return false;\n }\n\n const verticalPlacement =\n !placement || placement.startsWith('top') || placement.startsWith('bottom');\n\n if (['ArrowDown', 'ArrowUp'].includes(e.key) && verticalPlacement) {\n e.preventDefault();\n this.handlers.visible(true);\n }\n if (['ArrowLeft', 'ArrowRight'].includes(e.key) && !verticalPlacement) {\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 const visibleChanged = (visible && hide) || (!visible && show);\n if (show) {\n this.handlers.visible(true);\n } else if (hide) {\n this.handlers.visible(false);\n }\n if (visibleChanged) {\n e.preventDefault();\n e.stopPropagation();\n return;\n }\n }\n if (['ArrowLeft', 'ArrowRight'].includes(e.key)) {\n const item = highlightedIndex !== null && this.itemRefs[highlightedIndex];\n const focusable = getFocusableIn(item);\n if (focusable.length > 0 && item) {\n const focusedIndex = focusable.indexOf(document.activeElement);\n if (e.key === 'ArrowRight') {\n if (focusedIndex === -1) {\n this.setState({ focusLockItemIndex: highlightedIndex });\n }\n const nextFocused = focusable[focusedIndex + 1];\n if (nextFocused) {\n e.preventDefault();\n e.stopPropagation();\n nextFocused.focus();\n }\n } else if (e.key === 'ArrowLeft') {\n if (focusedIndex === 0) {\n this.setState({ focusLockItemIndex: null });\n }\n const prevFocused = focusable[focusedIndex - 1];\n if (prevFocused) {\n e.preventDefault();\n e.stopPropagation();\n prevFocused.focus();\n }\n }\n }\n }\n\n switch (e.key) {\n case 'ArrowDown': {\n if (visible) {\n this.moveHighlightedIndex(amount, e);\n if (isFocusInside(this.popperRef.current)) {\n this.focusTrigger();\n }\n e.preventDefault();\n e.stopPropagation();\n }\n break;\n }\n case 'ArrowUp': {\n if (visible) {\n this.moveHighlightedIndex(-amount, e);\n if (isFocusInside(this.popperRef.current)) {\n this.focusTrigger();\n }\n e.preventDefault();\n e.stopPropagation();\n }\n break;\n }\n case ' ':\n case 'Enter':\n if (this.highlightedItemRef.current && highlightedIndex !== null) {\n e.stopPropagation();\n e.preventDefault();\n this.highlightedItemRef.current.click();\n } else {\n if (place === 'trigger') {\n this.handlers.visible(false);\n\n e.preventDefault();\n }\n }\n break;\n }\n };\n\n handleTriggerKeyboardFocus = () => {\n if (this.ignoreTriggerKeyboardFocusUntil > Date.now()) return false;\n };\n\n getTriggerProps() {\n const { size, uid, disablePortal, visible, getI18nText, highlightedIndex } = this.asProps;\n\n return {\n size,\n id: `igc-${uid}-trigger`,\n 'aria-controls': `igc-${uid}-popper`,\n focusHint: visible && !disablePortal ? getI18nText('triggerHint') : undefined,\n 'aria-expanded': visible ? 'true' : 'false',\n 'aria-activedescendant':\n visible && highlightedIndex !== null ? `igc-${uid}-option-${highlightedIndex}` : undefined,\n onKeyDown: this.bindHandlerKeyDown('trigger'),\n ref: this.triggerRef,\n onKeyboardFocus: this.handleTriggerKeyboardFocus,\n };\n }\n\n getListProps() {\n const { size, uid } = this.asProps;\n return {\n size,\n uid,\n index: this.asProps.highlightedIndex,\n };\n }\n\n getPopperProps() {\n const { uid, disablePortal, ignorePortalsStacking, interaction, highlightedIndex } =\n this.asProps;\n\n return {\n ref: this.popperRef,\n tabIndex: 0,\n onKeyDown: this.bindHandlerKeyDown('popper'),\n id: `igc-${uid}-popper`,\n disablePortal,\n ignorePortalsStacking,\n focusMaster: interaction === 'click',\n hideFocus: highlightedIndex !== null,\n };\n }\n\n getItemProps(props, index) {\n const { size, highlightedIndex, uid } = this.asProps;\n const highlighted = index === highlightedIndex;\n let ref = (node) => {\n this.itemRefs[index] = node;\n };\n this.itemProps[index] = props;\n if (highlighted) {\n ref = (node) => {\n this.itemRefs[index] = node;\n this.scrollToNode(node);\n };\n }\n\n return {\n id: `igc-${uid}-option-${index}`,\n size,\n highlighted,\n focusLock: this.state.focusLockItemIndex === index,\n triggerRef: this.triggerRef,\n ref,\n index,\n handleFocusOut: this.handleItemFocusOut,\n };\n }\n\n handleItemFocusOut = (event) => {\n if (event.relatedTarget === this.popperRef.current) return;\n const focused = event.relatedTarget;\n\n if (hasParent(focused, this.popperRef.current)) {\n this.handlers.highlightedIndex(null);\n this.setState({ focusLockItemIndex: null });\n focused.focus();\n }\n };\n\n handleNestingClick = (event) => {\n const itemIndex = this.itemRefs.indexOf(event.currentTarget);\n if (itemIndex === -1) return;\n const focusable = getFocusableIn(event.currentTarget);\n focusable[0]?.focus();\n if (focusable[0] && this.state.focusLockItemIndex === null) {\n this.setState({ focusLockItemIndex: null });\n event.preventDefault();\n event.stopPropagation();\n }\n };\n handleNestingKeyDown = (event) => {\n if (event.key === ' ') {\n this.handleNestingClick(event);\n }\n };\n getNestingProps = () => {\n const { size } = this.asProps;\n return {\n size,\n onClick: this.handleNestingClick,\n onKeyDown: this.handleNestingKeyDown,\n };\n };\n handleNestedVisibleChange = (lastUserInteraction) => {\n if (\n this.asProps.visible &&\n this.asProps.highlightedIndex === null &&\n lastUserInteraction === 'keyboard'\n ) {\n this.handlers.highlightedIndex(0);\n }\n };\n getNestingTriggerProps = () => {\n const { size, visible } = this.asProps;\n return {\n size,\n visible,\n onNestedVisibleChange: this.handleNestedVisibleChange,\n };\n };\n\n getItemHintProps() {\n const { size } = this.asProps;\n return {\n size,\n };\n }\n\n getItemTitleProps() {\n const { size } = this.asProps;\n return {\n size,\n };\n }\n\n scrollToNode = (node) => {\n if (node) {\n this.highlightedItemRef.current = node;\n }\n setTimeout(() => {\n if (node?.scrollIntoView) {\n if (this.asProps.highlightedIndex !== this.prevHighlightedIndex) {\n this.prevHighlightedIndex = this.asProps.highlightedIndex;\n node.scrollIntoView({\n block: 'nearest',\n inline: 'nearest',\n });\n }\n }\n }, 0);\n };\n\n moveHighlightedIndex(amount, e) {\n let { highlightedIndex } = this.asProps;\n const itemsLastIndex = this.itemProps.length - 1;\n const selectedIndex = this.itemProps.findIndex((item) => item.selected);\n\n if (itemsLastIndex < 0) return;\n\n if (highlightedIndex == null) {\n if (selectedIndex !== -1) {\n highlightedIndex = selectedIndex;\n } else if (this.highlightedItemRef.current) {\n highlightedIndex = this.prevHighlightedIndex;\n } else {\n highlightedIndex = amount < 0 ? 0 : itemsLastIndex;\n }\n }\n\n let newIndex = highlightedIndex + amount;\n if (newIndex < 0) {\n newIndex = amount + itemsLastIndex + 1;\n } else if (newIndex > itemsLastIndex) {\n newIndex = newIndex - itemsLastIndex - 1;\n }\n\n if (this.itemProps[newIndex]?.disabled) {\n this.moveHighlightedIndex(amount < 0 ? amount - 1 : amount + 1, e);\n } else {\n this.handlers.highlightedIndex(newIndex, e);\n }\n }\n\n componentDidUpdate() {\n if (!this.asProps.visible) {\n this.handlers.highlightedIndex(null);\n this.highlightedItemRef.current = null;\n }\n if (\n (this.state.focusLockItemIndex !== this.asProps.highlightedIndex || !this.asProps.visible) &&\n this.state.focusLockItemIndex !== null\n ) {\n setTimeout(() => {\n this.setState({ focusLockItemIndex: null });\n }, 0);\n }\n }\n\n render() {\n const { Children } = this.asProps;\n\n this.itemProps = [];\n\n return (\n <Root render={Dropdown}>\n <Children />\n </Root>\n );\n }\n}\n\nfunction List(props) {\n const SDropdownMenuList = Root;\n const { uid } = props;\n\n return sstyled(props.styles)(\n <SDropdownMenuList\n render={ScrollAreaComponent}\n tabIndex={null}\n role='menu'\n aria-labelledby={`igc-${uid}-trigger`}\n shadow={true}\n styles={scrollStyles}\n />,\n );\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 <DropdownMenu.Popper {...popperProps}>\n <Root render={DropdownMenu.List} />\n </DropdownMenu.Popper>\n );\n}\n\nfunction Item({ styles, label, triggerRef, focusLock, disabled, highlighted, handleFocusOut }) {\n const SDropdownMenuItem = Root;\n const ref = React.useRef();\n\n useFocusLock(ref, false, triggerRef, !focusLock || disabled, true, handleFocusOut);\n\n return sstyled(styles)(\n <SDropdownMenuItem\n ref={ref}\n render={Flex}\n role='menuitem'\n tabIndex={-1}\n id={label}\n use:highlighted={!disabled && highlighted}\n />,\n );\n}\n\nconst NestingContext = React.createContext(null);\n\nfunction Nesting({ styles, disabled }) {\n const SDropdownMenuNesting = Root;\n const contextValue = React.useMemo(() => ({ disabled }), [disabled]);\n\n return (\n <NestingContext.Provider value={contextValue}>\n {sstyled(styles)(<SDropdownMenuNesting aria-haspopup='true' render={DropdownMenu.Item} />)}\n </NestingContext.Provider>\n );\n}\n\nfunction NestingTrigger(props) {\n const { styles, visible, onNestedVisibleChange } = props;\n const SDropdownMenuItem = Root;\n const nestingContext = React.useContext(NestingContext);\n const disabled = props.disabled || nestingContext?.disabled;\n\n const lastUserInteractionRef = React.useRef(undefined);\n React.useEffect(() => {\n onNestedVisibleChange(lastUserInteractionRef.current);\n }, [visible]);\n\n const handleMouseEvent = React.useCallback(() => {\n lastUserInteractionRef.current = 'mouse';\n }, []);\n const handleKeyboardEvent = React.useCallback(() => {\n lastUserInteractionRef.current = 'keyboard';\n }, []);\n\n React.useEffect(() => {\n document.addEventListener('mouseover', handleMouseEvent, { capture: true });\n document.addEventListener('keydown', handleKeyboardEvent, { capture: true });\n return () => {\n document.removeEventListener('mouseover', handleMouseEvent, { capture: true });\n document.removeEventListener('keydown', handleKeyboardEvent, { capture: true });\n };\n }, []);\n\n return (\n <NestingContext.Provider value={null}>\n {sstyled(styles)(\n <SDropdownMenuItem nesting-trigger tabIndex={!disabled ? 0 : undefined} render={Flex} />,\n )}\n </NestingContext.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 Hint(props) {\n const SDropdownMenuItem = Root;\n return sstyled(props.styles)(<SDropdownMenuItem render={Flex} variant='hint' />);\n}\n\nfunction Title(props) {\n const SDropdownMenuItem = Root;\n return sstyled(props.styles)(<SDropdownMenuItem render={Flex} variant='title' />);\n}\n\nfunction Trigger() {\n return <Root render={Dropdown.Trigger} aria-haspopup='true' />;\n}\n\nconst DropdownMenu = createComponent(\n DropdownMenuRoot,\n {\n Trigger,\n Popper: Dropdown.Popper,\n List,\n Menu,\n Item: [Item, { Addon }],\n Nesting: [Nesting, { Trigger: NestingTrigger, Addon }],\n ItemTitle: Title,\n ItemHint: Hint,\n },\n {\n parent: [Dropdown],\n },\n);\n\nexport default DropdownMenu;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,EAAE,MAAM,YAAY;AAC3B,OAAOC,eAAe,IAAIC,SAAS,EAAEC,OAAO,EAAEC,IAAI,QAAQ,eAAe;AACzE,OAAOC,QAAQ,MAAM,mBAAmB;AACxC,SAASC,IAAI,EAAEC,MAAM,QAAQ,mBAAmB;AAChD,OAAOC,mBAAmB,MAAM,sBAAsB;AACtD,OAAOC,mBAAmB,MAAM,6BAA6B;AAC7D,OAAOC,WAAW,MAAM,yCAAyC;AACjE,SAASC,iBAAiB,QAAQ,gDAAgD;AAClF,SAASC,YAAY,QAAQ,qCAAqC;AAClE,SAASC,SAAS,QAAQ,8BAA8B;AAExD,OAAOC,YAAY,MAAM,mBAAmB;AAAC;AAAA,IAAAC,KAAA,+BAAAC,QAAA,CAAAC,MAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;AAAA;AAE7C,SAASC,QAAQ,QAAQ,wCAAwC;AACjE,SAASC,aAAa,QAAQ,6CAA6C;AAC3E,SAASC,cAAc,QAAQ,8CAA8C;AAAC,IAExEC,gBAAgB,0BAAAC,UAAA;EAAAC,SAAA,CAAAF,gBAAA,EAAAC,UAAA;EAAA,IAAAE,MAAA,GAAAC,YAAA,CAAAJ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EZ;AACZ,CAAC,EACD;EACEa,MAAM,EAAE,CAAC1O,QAAQ;AACnB,CAAC,CACF;AAED,eAAe6K,YAAY"}
1
+ {"version":3,"file":"DropdownMenu.js","names":["React","cn","createComponent","Component","sstyled","Root","Dropdown","Flex","useBox","ScrollAreaComponent","uniqueIDEnhancement","i18nEnhance","localizedMessages","useFocusLock","hasParent","scrollStyles","style","_sstyled","insert","setFocus","isFocusInside","getFocusableIn","keyboardFocusEnhance","DropdownMenuRoot","_Component","_inherits","_super","_createSuper","_this","_classCallCheck","_len","arguments","length","args","Array","_key","call","apply","concat","_defineProperty","_assertThisInitialized","focusLockItemIndex","keyboardFocused","createRef","trigger","triggerRef","current","place","e","amount","shiftKey","targetTagName","target","tagName","_this$asProps","asProps","visible","highlightedIndex","placement","key","includes","item","itemRefs","setState","handlers","state","verticalPlacement","startsWith","preventDefault","show","hide","visibleChanged","stopPropagation","focusable","focusedIndex","indexOf","document","activeElement","nextFocused","focus","prevFocused","moveHighlightedIndex","popperRef","focusTrigger","highlightedItemRef","click","ignoreTriggerKeyboardFocusUntil","Date","now","event","relatedTarget","focused","_focusable$","itemIndex","currentTarget","handleNestingClick","size","onClick","onKeyDown","handleNestingKeyDown","lastUserInteraction","_this$asProps2","onNestedVisibleChange","handleNestedVisibleChange","getNestingTriggerProps","node","setTimeout","scrollIntoView","prevHighlightedIndex","block","inline","_createClass","value","uncontrolledProps","_this2","selectedItemIndex","itemProps","findIndex","selected","getTriggerProps","_this$asProps3","uid","disablePortal","getI18nText","id","focusHint","undefined","bindHandlerKeyDown","ref","onKeyboardFocus","handleTriggerKeyboardFocus","onKeyboardFocusedStateChange","handleTriggerKeyboardFocusedStateChange","getListProps","_this$asProps4","index","getPopperProps","_this$asProps5","ignorePortalsStacking","interaction","tabIndex","focusMaster","hideFocus","getItemProps","props","_this3","_this$asProps6","highlighted","scrollToNode","focusLock","handleFocusOut","handleItemFocusOut","getItemHintProps","getItemTitleProps","_this$itemProps$newIn","itemsLastIndex","selectedIndex","newIndex","disabled","componentDidUpdate","_this4","render","_ref","Children","createElement","_assignProps","defaultVisible","defaultHighlightedIndex","i18n","locale","List","_ref2","arguments[0]","_ref11","SDropdownMenuList","styles","_objectSpread","_assignProps2","Menu","_ref3","disableEnforceFocus","autoFocus","animationsDisabled","popperProps","DropdownMenu","Popper","_assignProps3","Item","_ref18","_ref4","_ref12","label","SDropdownMenuItem","useRef","_assignProps4","NestingContext","createContext","Nesting","_ref19","_ref5","_ref13","SDropdownMenuNesting","contextValue","useMemo","Provider","_assignProps5","NestingTrigger","_ref6","_ref14","nestingContext","useContext","lastUserInteractionRef","useEffect","handleMouseEvent","useCallback","handleKeyboardEvent","addEventListener","capture","removeEventListener","_assignProps6","NestingItem","_ref7","_ref15","SDropdownNestingItem","_assignProps7","Addon","_useBox","forwardRef","_useBox2","_slicedToArray","SDropdownMenuItemAddon","_useBox2$","className","other","_objectWithoutProperties","_excluded","_extends","Hint","_ref8","_ref16","_assignProps8","Title","_ref9","_ref17","_assignProps9","Trigger","_ref20","_ref10","_assignProps10","enhance","ItemTitle","ItemHint","parent"],"sources":["../../src/DropdownMenu.jsx"],"sourcesContent":["import React from 'react';\nimport cn from 'classnames';\nimport createComponent, { Component, sstyled, Root } from '@semcore/core';\nimport Dropdown from '@semcore/dropdown';\nimport { Flex, useBox } from '@semcore/flex-box';\nimport ScrollAreaComponent from '@semcore/scroll-area';\nimport uniqueIDEnhancement from '@semcore/utils/lib/uniqueID';\nimport i18nEnhance from '@semcore/utils/lib/enhances/i18nEnhance';\nimport { localizedMessages } from './translations/__intergalactic-dynamic-locales';\nimport { useFocusLock } from '@semcore/utils/lib/use/useFocusLock';\nimport { hasParent } from '@semcore/utils/lib/hasParent';\n\nimport scrollStyles from './styleScrollArea';\nimport style from './style/dropdown-menu.shadow.css';\nimport { setFocus } from '@semcore/utils/lib/focus-lock/setFocus';\nimport { isFocusInside } from '@semcore/utils/lib/focus-lock/isFocusInside';\nimport { getFocusableIn } from '@semcore/utils/lib/focus-lock/getFocusableIn';\nimport keyboardFocusEnhance from '@semcore/utils/lib/enhances/keyboardFocusEnhance';\n\nclass DropdownMenuRoot extends Component {\n static displayName = 'DropdownMenu';\n static style = style;\n static enhance = [uniqueIDEnhancement(), i18nEnhance(localizedMessages)];\n\n static defaultProps = {\n size: 'm',\n defaultVisible: false,\n defaultHighlightedIndex: null,\n i18n: localizedMessages,\n locale: 'en',\n interaction: 'click',\n };\n\n state = {\n focusLockItemIndex: null,\n keyboardFocused: false,\n };\n\n popperRef = React.createRef();\n triggerRef = React.createRef();\n\n itemProps = [];\n itemRefs = [];\n\n highlightedItemRef = React.createRef();\n\n ignoreTriggerKeyboardFocusUntil = 0;\n prevHighlightedIndex = null;\n\n uncontrolledProps() {\n return {\n highlightedIndex: null,\n visible: [\n null,\n (visible) => {\n if (!visible) {\n this.ignoreTriggerKeyboardFocusUntil = Date.now() + 100;\n } else {\n setTimeout(() => {\n const selectedItemIndex = this.itemProps.findIndex((item) => item.selected);\n if (selectedItemIndex === -1 || this.asProps.highlightedIndex !== null) return;\n this.handlers.highlightedIndex(selectedItemIndex);\n }, 0);\n }\n },\n ],\n };\n }\n\n focusTrigger = () => {\n const trigger = this.triggerRef.current;\n if (!trigger) return;\n if (isFocusInside(trigger)) return;\n setFocus(trigger);\n };\n\n bindHandlerKeyDown = (place) => (e) => {\n const amount = e.shiftKey ? 5 : 1;\n const targetTagName = e.target.tagName;\n\n const { visible, highlightedIndex, placement } = this.asProps;\n\n if (e.key === ' ' && ['INPUT', 'TEXTAREA'].includes(targetTagName)) return;\n if (e.key === 'Enter' && targetTagName === 'TEXTAREA') return;\n if (\n place === 'popper' &&\n (e.key === ' ' || e.key === 'Enter') &&\n (targetTagName === 'BUTTON' || targetTagName === 'A')\n )\n return;\n\n if (visible && e.key === 'Tab') {\n const item = highlightedIndex !== null && this.itemRefs[highlightedIndex];\n if (item && getFocusableIn(item).length !== 0) {\n this.setState({ focusLockItemIndex: highlightedIndex });\n } else {\n this.handlers.highlightedIndex(null);\n }\n return;\n }\n\n if (e.key === 'Escape' && this.state.focusLockItemIndex !== null) {\n this.setState({ focusLockItemIndex: null });\n return false;\n }\n\n const verticalPlacement =\n !placement || placement.startsWith('top') || placement.startsWith('bottom');\n\n if (['ArrowDown', 'ArrowUp'].includes(e.key) && verticalPlacement) {\n e.preventDefault();\n this.handlers.visible(true);\n }\n if (['ArrowLeft', 'ArrowRight'].includes(e.key) && !verticalPlacement) {\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 const visibleChanged = (visible && hide) || (!visible && show);\n if (show) {\n this.handlers.visible(true);\n } else if (hide) {\n this.handlers.visible(false);\n }\n if (visibleChanged) {\n e.preventDefault();\n e.stopPropagation();\n return;\n }\n }\n if (['ArrowLeft', 'ArrowRight'].includes(e.key)) {\n const item = highlightedIndex !== null && this.itemRefs[highlightedIndex];\n const focusable = getFocusableIn(item);\n if (focusable.length > 0 && item) {\n const focusedIndex = focusable.indexOf(document.activeElement);\n if (e.key === 'ArrowRight') {\n if (focusedIndex === -1) {\n this.setState({ focusLockItemIndex: highlightedIndex });\n }\n const nextFocused = focusable[focusedIndex + 1];\n if (nextFocused) {\n e.preventDefault();\n e.stopPropagation();\n nextFocused.focus();\n }\n } else if (e.key === 'ArrowLeft') {\n if (focusedIndex === 0) {\n this.setState({ focusLockItemIndex: null });\n }\n const prevFocused = focusable[focusedIndex - 1];\n if (prevFocused) {\n e.preventDefault();\n e.stopPropagation();\n prevFocused.focus();\n }\n }\n }\n }\n\n switch (e.key) {\n case 'ArrowDown': {\n if (visible) {\n this.moveHighlightedIndex(amount, e);\n if (isFocusInside(this.popperRef.current)) {\n this.focusTrigger();\n }\n e.preventDefault();\n e.stopPropagation();\n }\n break;\n }\n case 'ArrowUp': {\n if (visible) {\n this.moveHighlightedIndex(-amount, e);\n if (isFocusInside(this.popperRef.current)) {\n this.focusTrigger();\n }\n e.preventDefault();\n e.stopPropagation();\n }\n break;\n }\n case ' ':\n case 'Enter':\n if (this.highlightedItemRef.current && highlightedIndex !== null) {\n e.stopPropagation();\n e.preventDefault();\n this.highlightedItemRef.current.click();\n } else {\n if (place === 'trigger') {\n this.handlers.visible(false);\n\n e.preventDefault();\n }\n }\n break;\n }\n };\n\n handleTriggerKeyboardFocus = () => {\n if (this.ignoreTriggerKeyboardFocusUntil > Date.now()) return false;\n };\n handleTriggerKeyboardFocusedStateChange = (keyboardFocused) => {\n this.setState({ keyboardFocused });\n };\n\n getTriggerProps() {\n const { size, uid, disablePortal, visible, getI18nText, highlightedIndex } = this.asProps;\n\n return {\n size,\n id: `igc-${uid}-trigger`,\n 'aria-controls': `igc-${uid}-popper`,\n focusHint: visible && !disablePortal ? getI18nText('triggerHint') : undefined,\n 'aria-expanded': visible ? 'true' : 'false',\n 'aria-activedescendant':\n visible && highlightedIndex !== null ? `igc-${uid}-option-${highlightedIndex}` : undefined,\n onKeyDown: this.bindHandlerKeyDown('trigger'),\n ref: this.triggerRef,\n onKeyboardFocus: this.handleTriggerKeyboardFocus,\n onKeyboardFocusedStateChange: this.handleTriggerKeyboardFocusedStateChange,\n };\n }\n\n getListProps() {\n const { size, uid } = this.asProps;\n return {\n size,\n uid,\n index: this.asProps.highlightedIndex,\n };\n }\n\n getPopperProps() {\n const { uid, disablePortal, ignorePortalsStacking, interaction, highlightedIndex } =\n this.asProps;\n\n return {\n ref: this.popperRef,\n tabIndex: 0,\n onKeyDown: this.bindHandlerKeyDown('popper'),\n id: `igc-${uid}-popper`,\n disablePortal,\n ignorePortalsStacking,\n focusMaster: interaction === 'click',\n hideFocus: highlightedIndex !== null,\n };\n }\n\n getItemProps(props, index) {\n const { size, highlightedIndex, uid } = this.asProps;\n const highlighted = index === highlightedIndex;\n let ref = (node) => {\n this.itemRefs[index] = node;\n };\n this.itemProps[index] = props;\n if (highlighted) {\n ref = (node) => {\n this.itemRefs[index] = node;\n this.scrollToNode(node);\n };\n }\n\n return {\n id: `igc-${uid}-option-${index}`,\n size,\n highlighted,\n focusLock: this.state.focusLockItemIndex === index,\n triggerRef: this.triggerRef,\n ref,\n index,\n handleFocusOut: this.handleItemFocusOut,\n keyboardFocused: this.state.keyboardFocused,\n };\n }\n\n handleItemFocusOut = (event) => {\n if (event.relatedTarget === this.popperRef.current) return;\n const focused = event.relatedTarget;\n\n if (hasParent(focused, this.popperRef.current)) {\n this.handlers.highlightedIndex(null);\n this.setState({ focusLockItemIndex: null });\n focused.focus();\n }\n };\n\n handleNestingClick = (event) => {\n const itemIndex = this.itemRefs.indexOf(event.currentTarget);\n if (itemIndex === -1) return;\n const focusable = getFocusableIn(event.currentTarget);\n focusable[0]?.focus();\n if (focusable[0] && this.state.focusLockItemIndex === null) {\n this.setState({ focusLockItemIndex: null });\n event.preventDefault();\n event.stopPropagation();\n }\n };\n handleNestingKeyDown = (event) => {\n if (event.key === ' ') {\n this.handleNestingClick(event);\n }\n };\n getNestingProps = () => {\n const { size } = this.asProps;\n return {\n size,\n onClick: this.handleNestingClick,\n onKeyDown: this.handleNestingKeyDown,\n };\n };\n handleNestedVisibleChange = (lastUserInteraction) => {\n if (\n this.asProps.visible &&\n this.asProps.highlightedIndex === null &&\n lastUserInteraction === 'keyboard'\n ) {\n this.handlers.highlightedIndex(0);\n }\n };\n getNestingTriggerProps = () => {\n const { size, visible } = this.asProps;\n return {\n size,\n visible,\n onNestedVisibleChange: this.handleNestedVisibleChange,\n };\n };\n getNestingItemProps = () => {\n return this.getNestingTriggerProps();\n };\n\n getItemHintProps() {\n const { size } = this.asProps;\n return {\n size,\n };\n }\n\n getItemTitleProps() {\n const { size } = this.asProps;\n return {\n size,\n };\n }\n\n scrollToNode = (node) => {\n if (node) {\n this.highlightedItemRef.current = node;\n }\n setTimeout(() => {\n if (node?.scrollIntoView) {\n if (this.asProps.highlightedIndex !== this.prevHighlightedIndex) {\n this.prevHighlightedIndex = this.asProps.highlightedIndex;\n node.scrollIntoView({\n block: 'nearest',\n inline: 'nearest',\n });\n }\n }\n }, 0);\n };\n\n moveHighlightedIndex(amount, e) {\n let { highlightedIndex } = this.asProps;\n const itemsLastIndex = this.itemProps.length - 1;\n const selectedIndex = this.itemProps.findIndex((item) => item.selected);\n\n if (itemsLastIndex < 0) return;\n\n if (highlightedIndex == null) {\n if (selectedIndex !== -1) {\n highlightedIndex = selectedIndex;\n } else if (this.highlightedItemRef.current) {\n highlightedIndex = this.prevHighlightedIndex;\n } else {\n highlightedIndex = amount < 0 ? 0 : itemsLastIndex;\n }\n }\n\n let newIndex = highlightedIndex + amount;\n if (newIndex < 0) {\n newIndex = amount + itemsLastIndex + 1;\n } else if (newIndex > itemsLastIndex) {\n newIndex = newIndex - itemsLastIndex - 1;\n }\n\n if (this.itemProps[newIndex]?.disabled) {\n this.moveHighlightedIndex(amount < 0 ? amount - 1 : amount + 1, e);\n } else {\n this.handlers.highlightedIndex(newIndex, e);\n }\n }\n\n componentDidUpdate() {\n if (!this.asProps.visible) {\n this.handlers.highlightedIndex(null);\n this.highlightedItemRef.current = null;\n }\n if (\n (this.state.focusLockItemIndex !== this.asProps.highlightedIndex || !this.asProps.visible) &&\n this.state.focusLockItemIndex !== null\n ) {\n setTimeout(() => {\n this.setState({ focusLockItemIndex: null });\n }, 0);\n }\n }\n\n render() {\n const { Children } = this.asProps;\n\n this.itemProps = [];\n\n return (\n <Root render={Dropdown}>\n <Children />\n </Root>\n );\n }\n}\n\nfunction List(props) {\n const SDropdownMenuList = Root;\n const { uid } = props;\n\n return sstyled(props.styles)(\n <SDropdownMenuList\n render={ScrollAreaComponent}\n tabIndex={null}\n role='menu'\n aria-labelledby={`igc-${uid}-trigger`}\n shadow={true}\n styles={scrollStyles}\n />,\n );\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 <DropdownMenu.Popper {...popperProps}>\n <Root render={DropdownMenu.List} />\n </DropdownMenu.Popper>\n );\n}\n\nfunction Item({\n styles,\n label,\n triggerRef,\n focusLock,\n disabled,\n highlighted,\n handleFocusOut,\n keyboardFocused,\n}) {\n const SDropdownMenuItem = Root;\n const ref = React.useRef();\n\n useFocusLock(ref, false, triggerRef, !focusLock || disabled, true, handleFocusOut);\n\n return sstyled(styles)(\n <SDropdownMenuItem\n ref={ref}\n render={Flex}\n role='menuitem'\n tabIndex={-1}\n id={label}\n use:highlighted={!disabled && highlighted && keyboardFocused}\n />,\n );\n}\n\nconst NestingContext = React.createContext(null);\n\nfunction Nesting({ styles, disabled }) {\n const SDropdownMenuNesting = Root;\n const contextValue = React.useMemo(() => ({ disabled }), [disabled]);\n\n return (\n <NestingContext.Provider value={contextValue}>\n {sstyled(styles)(<SDropdownMenuNesting aria-haspopup='true' render={DropdownMenu.Item} />)}\n </NestingContext.Provider>\n );\n}\n\nfunction NestingTrigger(props) {\n const { styles, visible, onNestedVisibleChange } = props;\n const SDropdownMenuItem = Root;\n const nestingContext = React.useContext(NestingContext);\n const disabled = props.disabled || nestingContext?.disabled;\n\n const lastUserInteractionRef = React.useRef(undefined);\n React.useEffect(() => {\n onNestedVisibleChange(lastUserInteractionRef.current);\n }, [visible]);\n\n const handleMouseEvent = React.useCallback(() => {\n lastUserInteractionRef.current = 'mouse';\n }, []);\n const handleKeyboardEvent = React.useCallback(() => {\n lastUserInteractionRef.current = 'keyboard';\n }, []);\n\n React.useEffect(() => {\n document.addEventListener('mouseover', handleMouseEvent, { capture: true });\n document.addEventListener('keydown', handleKeyboardEvent, { capture: true });\n return () => {\n document.removeEventListener('mouseover', handleMouseEvent, { capture: true });\n document.removeEventListener('keydown', handleKeyboardEvent, { capture: true });\n };\n }, []);\n\n return (\n <NestingContext.Provider value={null}>\n {sstyled(styles)(\n <SDropdownMenuItem nesting-trigger tabIndex={!disabled ? 0 : undefined} render={Flex} />,\n )}\n </NestingContext.Provider>\n );\n}\n\nfunction NestingItem(props) {\n const { styles } = props;\n const SDropdownNestingItem = Root;\n\n return sstyled(styles)(<SDropdownNestingItem render={NestingTrigger} tabIndex={-1} />);\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 Hint(props) {\n const SDropdownMenuItem = Root;\n return sstyled(props.styles)(<SDropdownMenuItem render={Flex} variant='hint' />);\n}\n\nfunction Title(props) {\n const SDropdownMenuItem = Root;\n return sstyled(props.styles)(<SDropdownMenuItem render={Flex} variant='title' />);\n}\n\nfunction Trigger({ keyboardFocused, onKeyboardFocusedStateChange }) {\n React.useEffect(\n () => onKeyboardFocusedStateChange(keyboardFocused),\n [keyboardFocused, onKeyboardFocusedStateChange],\n );\n\n return <Root render={Dropdown.Trigger} aria-haspopup='true' />;\n}\nTrigger.enhance = [keyboardFocusEnhance(false)];\n\nconst DropdownMenu = createComponent(\n DropdownMenuRoot,\n {\n Trigger,\n Popper: Dropdown.Popper,\n List,\n Menu,\n Item: [Item, { Addon }],\n Nesting: [Nesting, { Trigger: NestingTrigger, Addon, Item: NestingItem }],\n ItemTitle: Title,\n ItemHint: Hint,\n },\n {\n parent: [Dropdown],\n },\n);\n\nexport default DropdownMenu;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,EAAE,MAAM,YAAY;AAC3B,OAAOC,eAAe,IAAIC,SAAS,EAAEC,OAAO,EAAEC,IAAI,QAAQ,eAAe;AACzE,OAAOC,QAAQ,MAAM,mBAAmB;AACxC,SAASC,IAAI,EAAEC,MAAM,QAAQ,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ChD;EAED,oBAAOnI,KAAA,CAAAoK,aAAA,CAAc9J,QAAQ,CAAC+O,OAAO,EAAAG,cAAA;IAAA,iBAAgB;EAAM,GAAAD,MAAA,EAAG;AAChE;AACAF,OAAO,CAACI,OAAO,GAAG,CAACnO,oBAAoB,CAAC,KAAK,CAAC,CAAC;AAE/C,IAAMkK,YAAY,GAAGtL,eAAe,CAClCqB,gBAAgB,EAChB;EACE8N,OAAO,EAAPA,OAAO;EACP5D,MAAM,EAAEnL,QAAQ,CAACmL,MAAM;EACvBf,IAAI,EAAJA,IAAI;EACJQ,IAAI,EAAJA,IAAI;EACJS,IAAI,EAAE,CAACA,IAAI,EAAE;IAAEsC,KAAK,EAALA;EAAM,CAAC,CAAC;EACvB5B,OAAO,EAAE,CAACA,OAAO,EAAE;IAAEgD,OAAO,EAAEvC,cAAc;IAAEmB,KAAK,EAALA,KAAK;IAAEtC,IAAI,EAAEiC;EAAY,CAAC,CAAC;EACzE8B,SAAS,EAAET,KAAK;EAChBU,QAAQ,EAAEd;AACZ,CAAC,EACD;EACEe,MAAM,EAAE,CAACtP,QAAQ;AACnB,CAAC,CACF;AAED,eAAekL,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} from '@semcore/dropdown';\nimport { Box, BoxProps, FlexProps } from '@semcore/flex-box';\nimport { ScrollAreaProps } from '@semcore/scroll-area';\n\nexport type DropdownMenuSize = 'm' | 'l';\n\n/** @deprecated */\nexport interface IDropdownMenuProps extends DropdownMenuProps, UnknownProperties {}\nexport type DropdownMenuProps = DropdownProps & {\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;\n /**\n * Index of the selected item\n */\n highlightedIndex?: number;\n /**\n * Callback for highlightedIndex change\n * highlightedIndex - Index of the selected item\n */\n onHighlightedIndexChange?: (highlightedIndex: number) => void;\n locale?: string;\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\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>;\n List: Intergalactic.Component<\n 'div',\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 'div',\n DropdownMenuItemProps,\n DropdownMenuContext,\n [handlers: DropdownMenuHandlers]\n > & {\n Addon: typeof Box;\n };\n ItemTitle: Intergalactic.Component<'div', DropdownMenuItemTitleProps>;\n ItemHint: Intergalactic.Component<'div', DropdownMenuItemHintProps>;\n Nesting: Intergalactic.Component<\n 'div',\n DropdownMenuItemProps,\n DropdownMenuContext,\n [handlers: DropdownMenuHandlers]\n > & {\n Trigger: Intergalactic.Component<'div', DropdownMenuItemProps>;\n Addon: typeof Box;\n };\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} from '@semcore/dropdown';\nimport { Box, BoxProps, FlexProps } from '@semcore/flex-box';\nimport { ScrollAreaProps } from '@semcore/scroll-area';\n\nexport type DropdownMenuSize = 'm' | 'l';\n\n/** @deprecated */\nexport interface IDropdownMenuProps extends DropdownMenuProps, UnknownProperties {}\nexport type DropdownMenuProps = DropdownProps & {\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;\n /**\n * Index of the selected item\n */\n highlightedIndex?: number;\n /**\n * Callback for highlightedIndex change\n * highlightedIndex - Index of the selected item\n */\n onHighlightedIndexChange?: (highlightedIndex: number) => void;\n locale?: string;\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\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>;\n List: Intergalactic.Component<\n 'div',\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 'div',\n DropdownMenuItemProps,\n DropdownMenuContext,\n [handlers: DropdownMenuHandlers]\n > & {\n Addon: typeof Box;\n };\n ItemTitle: Intergalactic.Component<'div', DropdownMenuItemTitleProps>;\n ItemHint: Intergalactic.Component<'div', DropdownMenuItemHintProps>;\n Nesting: Intergalactic.Component<\n 'div',\n DropdownMenuItemProps,\n DropdownMenuContext,\n [handlers: DropdownMenuHandlers]\n > & {\n Trigger: Intergalactic.Component<'div', DropdownMenuItemProps>;\n Item: Intergalactic.Component<'div', DropdownMenuItemProps>;\n Addon: typeof Box;\n };\n};\n\nexport default DropdownMenu;\n"],"mappings":""}
@@ -122,4 +122,17 @@ SDropdownMenuNesting[size='m'] {
122
122
  SDropdownMenuNesting[highlighted] {
123
123
  z-index: 1;
124
124
  box-shadow: var(--intergalactic-keyboard-focus, 0px 0px 0px 3px rgba(0, 143, 248, 0.5)) inset;
125
+ }
126
+
127
+ SDropdownNestingItem[size='l'],
128
+ SDropdownNestingItem[size='m'] {
129
+ padding-right: 0;
130
+ }
131
+
132
+ SDropdownNestingItem SDropdownMenuItem {
133
+ width: auto;
134
+ padding-top: 0;
135
+ padding-bottom: 0;
136
+ padding-left: 0;
137
+ min-height: auto;
125
138
  }
@@ -5,12 +5,12 @@ import { sstyled as _sstyled } from "@semcore/core";
5
5
  *
6
6
  * We will figure out what to do with it and remove it.
7
7
  * */
8
- var scrollStyles = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SShadowHorizontal_16s5v_gg_:after,.___SShadowHorizontal_16s5v_gg_:before{width:16px;height:100%;border-radius:var(--intergalactic-control-rounded, 6px)}.___SShadowHorizontal_16s5v_gg_._position_median_16s5v_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 )}.___SShadowHorizontal_16s5v_gg_._position_median_16s5v_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 )}.___SShadowHorizontal_16s5v_gg_._position_start_16s5v_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 )}.___SShadowHorizontal_16s5v_gg_._position_end_16s5v_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 )}.___SShadowVertical_16s5v_gg_:after,.___SShadowVertical_16s5v_gg_:before{width:100%;height:16px;border-radius:var(--intergalactic-control-rounded, 6px)}.___SShadowVertical_16s5v_gg_._position_median_16s5v_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 )}.___SShadowVertical_16s5v_gg_._position_median_16s5v_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 )}.___SShadowVertical_16s5v_gg_._position_start_16s5v_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 )}.___SShadowVertical_16s5v_gg_._position_end_16s5v_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 )}" /*__inner_css_end__*/, "16s5v_gg_") /*__reshadow_css_end__*/, {
9
- "__SShadowHorizontal": "___SShadowHorizontal_16s5v_gg_",
10
- "_position_median": "_position_median_16s5v_gg_",
11
- "_position_start": "_position_start_16s5v_gg_",
12
- "_position_end": "_position_end_16s5v_gg_",
13
- "__SShadowVertical": "___SShadowVertical_16s5v_gg_"
8
+ var scrollStyles = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SShadowHorizontal_48om1_gg_:after,.___SShadowHorizontal_48om1_gg_:before{width:16px;height:100%;border-radius:var(--intergalactic-control-rounded, 6px)}.___SShadowHorizontal_48om1_gg_._position_median_48om1_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 )}.___SShadowHorizontal_48om1_gg_._position_median_48om1_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 )}.___SShadowHorizontal_48om1_gg_._position_start_48om1_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 )}.___SShadowHorizontal_48om1_gg_._position_end_48om1_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 )}.___SShadowVertical_48om1_gg_:after,.___SShadowVertical_48om1_gg_:before{width:100%;height:16px;border-radius:var(--intergalactic-control-rounded, 6px)}.___SShadowVertical_48om1_gg_._position_median_48om1_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 )}.___SShadowVertical_48om1_gg_._position_median_48om1_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 )}.___SShadowVertical_48om1_gg_._position_start_48om1_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 )}.___SShadowVertical_48om1_gg_._position_end_48om1_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 )}" /*__inner_css_end__*/, "48om1_gg_") /*__reshadow_css_end__*/, {
9
+ "__SShadowHorizontal": "___SShadowHorizontal_48om1_gg_",
10
+ "_position_median": "_position_median_48om1_gg_",
11
+ "_position_start": "_position_start_48om1_gg_",
12
+ "_position_end": "_position_end_48om1_gg_",
13
+ "__SShadowVertical": "___SShadowVertical_48om1_gg_"
14
14
  });
15
15
  export default scrollStyles;
16
16
  //# sourceMappingURL=styleScrollArea.js.map
@@ -153,6 +153,7 @@ declare const DropdownMenu: Intergalactic.Component<
153
153
  [handlers: DropdownMenuHandlers]
154
154
  > & {
155
155
  Trigger: Intergalactic.Component<'div', DropdownMenuItemProps>;
156
+ Item: Intergalactic.Component<'div', DropdownMenuItemProps>;
156
157
  Addon: typeof Box;
157
158
  };
158
159
  };
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.25.0",
4
+ "version": "4.26.0",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/es6/index.js",
7
7
  "typings": "lib/types/index.d.ts",
@@ -9,10 +9,10 @@
9
9
  "author": "UI-kit team <ui-kit-team@semrush.com>",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
- "@semcore/dropdown": "4.23.0",
13
- "@semcore/flex-box": "5.21.0",
14
- "@semcore/scroll-area": "5.23.0",
15
- "@semcore/utils": "4.22.0",
12
+ "@semcore/dropdown": "4.23.1",
13
+ "@semcore/flex-box": "5.21.1",
14
+ "@semcore/scroll-area": "5.23.1",
15
+ "@semcore/utils": "4.22.1",
16
16
  "classnames": "2.2.6"
17
17
  },
18
18
  "peerDependencies": {
@@ -33,7 +33,7 @@
33
33
  "@semcore/testing-utils": "1.0.0",
34
34
  "@semcore/base-trigger": "4.26.1",
35
35
  "@semcore/icon": "4.26.0",
36
- "@semcore/button": "5.22.0"
36
+ "@semcore/button": "5.22.1"
37
37
  },
38
38
  "scripts": {
39
39
  "build": "pnpm semcore-builder --source=js"