@semcore/dropdown-menu 4.41.0 → 4.42.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 +6 -0
- package/lib/cjs/DropdownMenu.js +83 -73
- package/lib/cjs/DropdownMenu.js.map +1 -1
- package/lib/cjs/index.d.js.map +1 -1
- package/lib/cjs/style/dropdown-menu.shadow.css +3 -3
- package/lib/es6/DropdownMenu.js +80 -69
- package/lib/es6/DropdownMenu.js.map +1 -1
- package/lib/es6/index.d.js.map +1 -1
- package/lib/es6/style/dropdown-menu.shadow.css +3 -3
- package/lib/types/index.d.ts +2 -0
- package/package.json +8 -7
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
CHANGELOG.md standards are inspired by [keepachangelog.com](https://keepachangelog.com/en/1.0.0/).
|
|
4
4
|
|
|
5
|
+
## [4.42.0] - 2024-10-15
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- New `DropdownMenu.Item.Text` for wrapping text if used with addons.
|
|
10
|
+
|
|
5
11
|
## [4.41.0] - 2024-10-11
|
|
6
12
|
|
|
7
13
|
### Changed
|
package/lib/cjs/DropdownMenu.js
CHANGED
|
@@ -30,31 +30,33 @@ var _uniqueID = require("@semcore/utils/lib/uniqueID");
|
|
|
30
30
|
var _intergalacticDynamicLocales = require("./translations/__intergalactic-dynamic-locales");
|
|
31
31
|
var _keyboardFocusEnhance = require("@semcore/utils/lib/enhances/keyboardFocusEnhance");
|
|
32
32
|
var _findComponent = require("@semcore/utils/lib/findComponent");
|
|
33
|
-
var
|
|
34
|
-
var
|
|
33
|
+
var _ref31 = require("@semcore/utils/lib/ref");
|
|
34
|
+
var _assignProps14 = require("@semcore/utils/lib/assignProps");
|
|
35
35
|
var _button = _interopRequireDefault(require("@semcore/button"));
|
|
36
|
+
var _typography = require("@semcore/typography");
|
|
36
37
|
var _excluded = ["className"];
|
|
37
38
|
/*__reshadow-styles__:"./style/dropdown-menu.shadow.css"*/
|
|
38
|
-
var style = ( /*__reshadow_css_start__*/_index.sstyled.insert( /*__inner_css_start__*/".
|
|
39
|
-
"__SDropdownMenuItemContainer": "
|
|
40
|
-
"_nesting-trigger": "__nesting-
|
|
41
|
-
"__SDropdownMenuNesting": "
|
|
42
|
-
"_size_l": "
|
|
43
|
-
"_size_m": "
|
|
44
|
-
"_highlighted": "
|
|
45
|
-
"__SDropdownNestingItem": "
|
|
46
|
-
"__SItemContent": "
|
|
47
|
-
"__SItemHint": "
|
|
48
|
-
"__SDropdownMenuList": "
|
|
49
|
-
"__SShadowHorizontal": "
|
|
50
|
-
"_position_median": "
|
|
51
|
-
"_position_start": "
|
|
52
|
-
"_position_end": "
|
|
53
|
-
"__SShadowVertical": "
|
|
54
|
-
"__SDropdownMenuItemAddon": "
|
|
39
|
+
var style = ( /*__reshadow_css_start__*/_index.sstyled.insert( /*__inner_css_start__*/".___SDropdownMenuList_1ty9d_gg_{max-height:240px;padding:var(--intergalactic-spacing-1x, 4px)0;position:relative;min-height:26px;min-width:32px;box-sizing:content-box;z-index:0;color:var(--intergalactic-text-primary, #191b23)}.___SDropdownMenuList_1ty9d_gg_ .___SShadowHorizontal_1ty9d_gg_:after,.___SDropdownMenuList_1ty9d_gg_ .___SShadowHorizontal_1ty9d_gg_:before{width:16px;height:100%;border-radius:var(--intergalactic-control-rounded, 6px)}.___SDropdownMenuList_1ty9d_gg_ .___SShadowHorizontal_1ty9d_gg_._position_median_1ty9d_gg_:before{background:var(--intergalactic-scroll-area-dropdown-menu-left,\n linear-gradient(to right, rgba(255, 255, 255, 1) 34.38%, rgba(255, 255, 255, 0) 100%)\n )}.___SDropdownMenuList_1ty9d_gg_ .___SShadowHorizontal_1ty9d_gg_._position_median_1ty9d_gg_:after{background:var(--intergalactic-scroll-area-dropdown-menu-right,\n linear-gradient(to left, rgba(255, 255, 255, 1) 34.38%, rgba(255, 255, 255, 0) 100%)\n )}.___SDropdownMenuList_1ty9d_gg_ .___SShadowHorizontal_1ty9d_gg_._position_start_1ty9d_gg_:before{background:var(--intergalactic-scroll-area-dropdown-menu-left,\n linear-gradient(to right, rgba(255, 255, 255, 1) 34.38%, rgba(255, 255, 255, 0) 100%)\n )}.___SDropdownMenuList_1ty9d_gg_ .___SShadowHorizontal_1ty9d_gg_._position_end_1ty9d_gg_:after{background:var(--intergalactic-scroll-area-dropdown-menu-right,\n linear-gradient(to left, rgba(255, 255, 255, 1) 34.38%, rgba(255, 255, 255, 0) 100%)\n )}.___SDropdownMenuList_1ty9d_gg_ .___SShadowVertical_1ty9d_gg_:after,.___SDropdownMenuList_1ty9d_gg_ .___SShadowVertical_1ty9d_gg_:before{width:100%;height:16px;border-radius:var(--intergalactic-control-rounded, 6px)}.___SDropdownMenuList_1ty9d_gg_ .___SShadowVertical_1ty9d_gg_._position_median_1ty9d_gg_:before{background:var(--intergalactic-scroll-area-dropdown-menu-top,\n linear-gradient(to bottom, rgba(255, 255, 255, 1) 34.38%, rgba(255, 255, 255, 0) 100%)\n )}.___SDropdownMenuList_1ty9d_gg_ .___SShadowVertical_1ty9d_gg_._position_median_1ty9d_gg_:after{background:var(--intergalactic-scroll-area-dropdown-menu-bottom,\n linear-gradient(to top, rgba(255, 255, 255, 1) 34.38%, rgba(255, 255, 255, 0) 100%)\n )}.___SDropdownMenuList_1ty9d_gg_ .___SShadowVertical_1ty9d_gg_._position_start_1ty9d_gg_:before{background:var(--intergalactic-scroll-area-dropdown-menu-top,\n linear-gradient(to bottom, rgba(255, 255, 255, 1) 34.38%, rgba(255, 255, 255, 0) 100%)\n )}.___SDropdownMenuList_1ty9d_gg_ .___SShadowVertical_1ty9d_gg_._position_end_1ty9d_gg_:after{background:var(--intergalactic-scroll-area-dropdown-menu-bottom,\n linear-gradient(to top, rgba(255, 255, 255, 1) 34.38%, rgba(255, 255, 255, 0) 100%)\n )}.___SDropdownMenuItemContainer_1ty9d_gg_.__nesting-trigger_1ty9d_gg_{justify-content:space-between}.___SDropdownMenuItemAddon_1ty9d_gg_,.___SItemContentText_1ty9d_gg_{display:inline-flex;margin-left:var(--intergalactic-spacing-1x, 4px);margin-right:var(--intergalactic-spacing-1x, 4px)}.___SDropdownMenuItemAddon_1ty9d_gg_:first-child,.___SItemContentText_1ty9d_gg_:first-child{margin-left:0}.___SDropdownMenuItemAddon_1ty9d_gg_:last-child,.___SItemContentText_1ty9d_gg_:last-child{margin-right:0}.___SDropdownMenuNesting_1ty9d_gg_,.___SDropdownMenuNesting_1ty9d_gg_._size_l_1ty9d_gg_,.___SDropdownMenuNesting_1ty9d_gg_._size_m_1ty9d_gg_{padding:0}.___SDropdownMenuNesting_1ty9d_gg_.__highlighted_1ty9d_gg_{z-index:1;box-shadow:var(--intergalactic-keyboard-focus, 0px 0px 0px 3px rgba(0, 143, 248, 0.5)) inset}.___SDropdownNestingItem_1ty9d_gg_._size_l_1ty9d_gg_,.___SDropdownNestingItem_1ty9d_gg_._size_m_1ty9d_gg_{padding-right:0}.___SDropdownNestingItem_1ty9d_gg_ .___SDropdownMenuItemContainer_1ty9d_gg_{width:auto;padding-top:0;padding-bottom:0;padding-left:0;min-height:auto}.___SItemContent_1ty9d_gg_:focus{outline:0}.___SItemHint_1ty9d_gg_{color:var(--intergalactic-text-secondary, #6c6e79)}" /*__inner_css_end__*/, "1ty9d_gg_") /*__reshadow_css_end__*/, {
|
|
40
|
+
"__SDropdownMenuItemContainer": "___SDropdownMenuItemContainer_1ty9d_gg_",
|
|
41
|
+
"_nesting-trigger": "__nesting-trigger_1ty9d_gg_",
|
|
42
|
+
"__SDropdownMenuNesting": "___SDropdownMenuNesting_1ty9d_gg_",
|
|
43
|
+
"_size_l": "_size_l_1ty9d_gg_",
|
|
44
|
+
"_size_m": "_size_m_1ty9d_gg_",
|
|
45
|
+
"_highlighted": "__highlighted_1ty9d_gg_",
|
|
46
|
+
"__SDropdownNestingItem": "___SDropdownNestingItem_1ty9d_gg_",
|
|
47
|
+
"__SItemContent": "___SItemContent_1ty9d_gg_",
|
|
48
|
+
"__SItemHint": "___SItemHint_1ty9d_gg_",
|
|
49
|
+
"__SDropdownMenuList": "___SDropdownMenuList_1ty9d_gg_",
|
|
50
|
+
"__SShadowHorizontal": "___SShadowHorizontal_1ty9d_gg_",
|
|
51
|
+
"_position_median": "_position_median_1ty9d_gg_",
|
|
52
|
+
"_position_start": "_position_start_1ty9d_gg_",
|
|
53
|
+
"_position_end": "_position_end_1ty9d_gg_",
|
|
54
|
+
"__SShadowVertical": "___SShadowVertical_1ty9d_gg_",
|
|
55
|
+
"__SDropdownMenuItemAddon": "___SDropdownMenuItemAddon_1ty9d_gg_",
|
|
56
|
+
"__SItemContentText": "___SItemContentText_1ty9d_gg_"
|
|
55
57
|
});
|
|
56
|
-
var ListBoxContextProvider = function ListBoxContextProvider(
|
|
57
|
-
var children =
|
|
58
|
+
var ListBoxContextProvider = function ListBoxContextProvider(_ref22) {
|
|
59
|
+
var children = _ref22.children;
|
|
58
60
|
return /*#__PURE__*/_react["default"].createElement(_scrollArea.hideScrollBarsFromScreenReadersContext.Provider, {
|
|
59
61
|
value: true
|
|
60
62
|
}, children);
|
|
@@ -91,7 +93,7 @@ var DropdownMenuRoot = /*#__PURE__*/function (_AbstractDropdown) {
|
|
|
91
93
|
var hasMenu = (0, _findComponent.isAdvanceMode)(Children, [DropdownMenu.Menu.displayName]);
|
|
92
94
|
var ariaControls = hasMenu ? "igc-".concat(uid, "-list") : "igc-".concat(uid, "-popper");
|
|
93
95
|
return (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, (0, _get2["default"])((0, _getPrototypeOf2["default"])(DropdownMenuRoot.prototype), "getTriggerProps", this).call(this)), {}, {
|
|
94
|
-
onKeyDown: (0,
|
|
96
|
+
onKeyDown: (0, _assignProps14.callAllEventHandlers)(this.handlePreventCommonKeyDown.bind(this), this.handleOpenKeyDown.bind(this), this.handleKeyDownForMenu('trigger')),
|
|
95
97
|
'aria-controls': visible ? ariaControls : undefined,
|
|
96
98
|
'aria-haspopup': hasMenu ? 'true' : 'dialog'
|
|
97
99
|
});
|
|
@@ -100,14 +102,14 @@ var DropdownMenuRoot = /*#__PURE__*/function (_AbstractDropdown) {
|
|
|
100
102
|
key: "getListProps",
|
|
101
103
|
value: function getListProps() {
|
|
102
104
|
return (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, (0, _get2["default"])((0, _getPrototypeOf2["default"])(DropdownMenuRoot.prototype), "getListProps", this).call(this)), {}, {
|
|
103
|
-
onKeyDown: (0,
|
|
105
|
+
onKeyDown: (0, _assignProps14.callAllEventHandlers)(this.handlePreventCommonKeyDown.bind(this), this.handleKeyDownForMenu('list'), this.handleArrowKeyDown.bind(this))
|
|
104
106
|
});
|
|
105
107
|
}
|
|
106
108
|
}, {
|
|
107
109
|
key: "getPopperProps",
|
|
108
110
|
value: function getPopperProps() {
|
|
109
111
|
return (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, (0, _get2["default"])((0, _getPrototypeOf2["default"])(DropdownMenuRoot.prototype), "getPopperProps", this).call(this)), {}, {
|
|
110
|
-
onKeyDown: (0,
|
|
112
|
+
onKeyDown: (0, _assignProps14.callAllEventHandlers)(this.handlePreventCommonKeyDown.bind(this), this.handlePreventPopperKeyDown.bind(this)
|
|
111
113
|
// this.handleKeyDownForPopper.bind(this),
|
|
112
114
|
)
|
|
113
115
|
});
|
|
@@ -207,28 +209,28 @@ var DropdownMenuRoot = /*#__PURE__*/function (_AbstractDropdown) {
|
|
|
207
209
|
placement: 'bottom-start',
|
|
208
210
|
timeout: 0
|
|
209
211
|
});
|
|
210
|
-
function List(
|
|
212
|
+
function List(_ref23) {
|
|
211
213
|
var _ref2 = arguments[0],
|
|
212
|
-
|
|
213
|
-
var styles =
|
|
214
|
-
Children =
|
|
214
|
+
_ref14;
|
|
215
|
+
var styles = _ref23.styles,
|
|
216
|
+
Children = _ref23.Children;
|
|
215
217
|
var SDropdownMenuList = _scrollArea["default"];
|
|
216
|
-
return
|
|
218
|
+
return _ref14 = (0, _core.sstyled)(styles), /*#__PURE__*/_react["default"].createElement(ListBoxContextProvider, _ref14.cn("ListBoxContextProvider", {}), /*#__PURE__*/_react["default"].createElement(SDropdownMenuList, _ref14.cn("SDropdownMenuList", (0, _objectSpread2["default"])({}, (0, _core.assignProps)({
|
|
217
219
|
"shadow": true
|
|
218
220
|
}, _ref2))), /*#__PURE__*/_react["default"].createElement(_scrollArea["default"].Container, {
|
|
219
221
|
tabIndex: undefined
|
|
220
|
-
}, /*#__PURE__*/_react["default"].createElement(Children,
|
|
222
|
+
}, /*#__PURE__*/_react["default"].createElement(Children, _ref14.cn("Children", {}))), /*#__PURE__*/_react["default"].createElement(_scrollArea["default"].Bar, {
|
|
221
223
|
orientation: "horizontal"
|
|
222
224
|
}), /*#__PURE__*/_react["default"].createElement(_scrollArea["default"].Bar, {
|
|
223
225
|
orientation: "vertical"
|
|
224
226
|
})));
|
|
225
227
|
}
|
|
226
|
-
function Actions(
|
|
228
|
+
function Actions(_ref24) {
|
|
227
229
|
var _ref3 = arguments[0],
|
|
228
|
-
|
|
229
|
-
var styles =
|
|
230
|
+
_ref15;
|
|
231
|
+
var styles = _ref24.styles;
|
|
230
232
|
var SDropdownMenuActions = _flexBox.Flex;
|
|
231
|
-
return
|
|
233
|
+
return _ref15 = (0, _core.sstyled)(styles), /*#__PURE__*/_react["default"].createElement(SDropdownMenuActions, _ref15.cn("SDropdownMenuActions", (0, _objectSpread2["default"])({}, (0, _core.assignProps)({}, _ref3))));
|
|
232
234
|
}
|
|
233
235
|
function Menu(props) {
|
|
234
236
|
var _ref4 = arguments[0];
|
|
@@ -252,15 +254,15 @@ function Menu(props) {
|
|
|
252
254
|
role: null
|
|
253
255
|
}), /*#__PURE__*/_react["default"].createElement(DropdownMenu.List, (0, _core.assignProps)({}, _ref4))));
|
|
254
256
|
}
|
|
255
|
-
function Item(
|
|
257
|
+
function Item(_ref25) {
|
|
256
258
|
var _ref5 = arguments[0],
|
|
257
|
-
|
|
258
|
-
var id =
|
|
259
|
-
styles =
|
|
260
|
-
disabled =
|
|
261
|
-
Children =
|
|
262
|
-
forwardRef =
|
|
263
|
-
role =
|
|
259
|
+
_ref16;
|
|
260
|
+
var id = _ref25.id,
|
|
261
|
+
styles = _ref25.styles,
|
|
262
|
+
disabled = _ref25.disabled,
|
|
263
|
+
Children = _ref25.Children,
|
|
264
|
+
forwardRef = _ref25.forwardRef,
|
|
265
|
+
role = _ref25.role;
|
|
264
266
|
var SDropdownMenuItemContainer = _dropdown["default"].Item;
|
|
265
267
|
var itemRef = _react["default"].useRef();
|
|
266
268
|
var _React$useState = _react["default"].useState(false),
|
|
@@ -269,7 +271,7 @@ function Item(_ref23) {
|
|
|
269
271
|
setHighlighted = _React$useState2[1];
|
|
270
272
|
var menuItemContextValue = {
|
|
271
273
|
contentId: id,
|
|
272
|
-
ref: (0,
|
|
274
|
+
ref: (0, _ref31.forkRef)(forwardRef, itemRef),
|
|
273
275
|
role: role
|
|
274
276
|
};
|
|
275
277
|
var ariaDescribes = [];
|
|
@@ -315,15 +317,15 @@ function Item(_ref23) {
|
|
|
315
317
|
};
|
|
316
318
|
}, [itemRef.current]);
|
|
317
319
|
var focusSourceRef = (0, _keyboardFocusEnhance.useFocusSource)();
|
|
318
|
-
return
|
|
320
|
+
return _ref16 = (0, _core.sstyled)(styles), /*#__PURE__*/_react["default"].createElement(menuItemContext.Provider, {
|
|
319
321
|
value: menuItemContextValue
|
|
320
|
-
}, /*#__PURE__*/_react["default"].createElement(SDropdownMenuItemContainer,
|
|
322
|
+
}, /*#__PURE__*/_react["default"].createElement(SDropdownMenuItemContainer, _ref16.cn("SDropdownMenuItemContainer", (0, _objectSpread2["default"])({}, (0, _core.assignProps)({
|
|
321
323
|
"ref": advancedMode ? undefined : menuItemContextValue.ref,
|
|
322
324
|
"use:highlighted": !disabled && highlighted && focusSourceRef.current === 'keyboard',
|
|
323
325
|
"use:role": advancedMode ? undefined : role,
|
|
324
326
|
"use:id": advancedMode ? undefined : id,
|
|
325
327
|
"tabIndex": advancedMode ? undefined : -1
|
|
326
|
-
}, _ref5))), /*#__PURE__*/_react["default"].createElement(Children,
|
|
328
|
+
}, _ref5))), /*#__PURE__*/_react["default"].createElement(Children, _ref16.cn("Children", {}))));
|
|
327
329
|
}
|
|
328
330
|
function Addon(props) {
|
|
329
331
|
var _useBox = (0, _flexBox.useBox)(props, props.forwardRef),
|
|
@@ -341,10 +343,10 @@ function Trigger() {
|
|
|
341
343
|
var _ref6 = arguments[0];
|
|
342
344
|
return /*#__PURE__*/_react["default"].createElement(_dropdown["default"].Trigger, (0, _core.assignProps)({}, _ref6));
|
|
343
345
|
}
|
|
344
|
-
function ItemContent(
|
|
346
|
+
function ItemContent(_ref26) {
|
|
345
347
|
var _ref7 = arguments[0],
|
|
346
|
-
|
|
347
|
-
var styles =
|
|
348
|
+
_ref17;
|
|
349
|
+
var styles = _ref26.styles;
|
|
348
350
|
var SItemContent = _flexBox.Flex;
|
|
349
351
|
var ref = _react["default"].useRef();
|
|
350
352
|
var menuItemCtxValue = _react["default"].useContext(menuItemContext);
|
|
@@ -366,76 +368,83 @@ function ItemContent(_ref24) {
|
|
|
366
368
|
});
|
|
367
369
|
}
|
|
368
370
|
}, [menuItemCtxValue.ariaDescribes]);
|
|
369
|
-
return
|
|
371
|
+
return _ref17 = (0, _core.sstyled)(styles), /*#__PURE__*/_react["default"].createElement(SItemContent, _ref17.cn("SItemContent", (0, _objectSpread2["default"])({}, (0, _core.assignProps)({
|
|
370
372
|
"role": menuItemCtxValue.role,
|
|
371
373
|
"id": menuItemCtxValue.contentId,
|
|
372
374
|
"tabIndex": -1,
|
|
373
|
-
"ref": (0,
|
|
375
|
+
"ref": (0, _ref31.forkRef)(menuItemCtxValue.ref, ref),
|
|
374
376
|
"use:aria-describedby": (0, _toConsumableArray2["default"])(describedby).join(' '),
|
|
375
377
|
"aria-haspopup": menuItemCtxValue.hasSubMenu ? 'true' : undefined,
|
|
376
378
|
"aria-expanded": subMenu,
|
|
377
|
-
"alignItems":
|
|
379
|
+
"alignItems": 'center',
|
|
378
380
|
"justifyContent": menuItemCtxValue.hasSubMenu ? 'space-between' : undefined
|
|
379
381
|
}, _ref7))));
|
|
380
382
|
}
|
|
381
|
-
function
|
|
383
|
+
function ItemContentText(_ref27) {
|
|
382
384
|
var _ref8 = arguments[0],
|
|
383
|
-
|
|
384
|
-
var styles =
|
|
385
|
+
_ref18;
|
|
386
|
+
var styles = _ref27.styles;
|
|
387
|
+
var SItemContentText = _typography.Text;
|
|
388
|
+
return _ref18 = (0, _core.sstyled)(styles), /*#__PURE__*/_react["default"].createElement(SItemContentText, _ref18.cn("SItemContentText", (0, _objectSpread2["default"])({}, (0, _core.assignProps)({}, _ref8))));
|
|
389
|
+
}
|
|
390
|
+
function ItemHint(_ref28) {
|
|
391
|
+
var _ref9 = arguments[0],
|
|
392
|
+
_ref19;
|
|
393
|
+
var styles = _ref28.styles;
|
|
385
394
|
var SItemHint = _flexBox.Flex;
|
|
386
395
|
var _React$useContext = _react["default"].useContext(menuItemContext),
|
|
387
396
|
hintId = _React$useContext.hintId;
|
|
388
|
-
return
|
|
397
|
+
return _ref19 = (0, _core.sstyled)(styles), /*#__PURE__*/_react["default"].createElement(SItemHint, _ref19.cn("SItemHint", (0, _objectSpread2["default"])({}, (0, _core.assignProps)({
|
|
389
398
|
"id": hintId,
|
|
390
399
|
"aria-hidden": 'true'
|
|
391
|
-
},
|
|
400
|
+
}, _ref9))));
|
|
392
401
|
}
|
|
393
402
|
|
|
394
403
|
/**
|
|
395
404
|
* @deprecated Use Item hint
|
|
396
405
|
*/
|
|
397
406
|
function Hint(props) {
|
|
398
|
-
var
|
|
399
|
-
|
|
407
|
+
var _ref10 = arguments[0],
|
|
408
|
+
_ref20;
|
|
400
409
|
var SDropdownMenuItemContainer = _dropdown["default"].Item;
|
|
401
|
-
return
|
|
410
|
+
return _ref20 = (0, _core.sstyled)(props.styles), /*#__PURE__*/_react["default"].createElement(SDropdownMenuItemContainer, _ref20.cn("SDropdownMenuItemContainer", (0, _objectSpread2["default"])({}, (0, _core.assignProps)({
|
|
402
411
|
"variant": 'hint'
|
|
403
|
-
},
|
|
412
|
+
}, _ref10))));
|
|
404
413
|
}
|
|
405
414
|
/**
|
|
406
415
|
* @deprecated Use Group with title prop
|
|
407
416
|
*/
|
|
408
417
|
function Title(props) {
|
|
409
|
-
var
|
|
410
|
-
|
|
418
|
+
var _ref11 = arguments[0],
|
|
419
|
+
_ref21;
|
|
411
420
|
var SDropdownMenuItemContainer = _dropdown["default"].Item;
|
|
412
|
-
return
|
|
421
|
+
return _ref21 = (0, _core.sstyled)(props.styles), /*#__PURE__*/_react["default"].createElement(SDropdownMenuItemContainer, _ref21.cn("SDropdownMenuItemContainer", (0, _objectSpread2["default"])({}, (0, _core.assignProps)({
|
|
413
422
|
"variant": 'title'
|
|
414
|
-
},
|
|
423
|
+
}, _ref11))));
|
|
415
424
|
}
|
|
416
425
|
|
|
417
426
|
/**
|
|
418
427
|
* @deprecated
|
|
419
428
|
*/
|
|
420
|
-
function Nesting(
|
|
421
|
-
var
|
|
422
|
-
var forwardRef =
|
|
429
|
+
function Nesting(_ref29) {
|
|
430
|
+
var _ref12 = arguments[0];
|
|
431
|
+
var forwardRef = _ref29.forwardRef;
|
|
423
432
|
return /*#__PURE__*/_react["default"].createElement(DropdownMenu.Item, (0, _core.assignProps)({
|
|
424
433
|
"ref": forwardRef
|
|
425
|
-
},
|
|
434
|
+
}, _ref12));
|
|
426
435
|
}
|
|
427
436
|
|
|
428
437
|
/**
|
|
429
438
|
* @deprecated
|
|
430
439
|
*/
|
|
431
|
-
function NestingTrigger(
|
|
432
|
-
var
|
|
433
|
-
var forwardRef =
|
|
440
|
+
function NestingTrigger(_ref30) {
|
|
441
|
+
var _ref13 = arguments[0];
|
|
442
|
+
var forwardRef = _ref30.forwardRef;
|
|
434
443
|
return /*#__PURE__*/_react["default"].createElement(DropdownMenu.Item.Content, (0, _core.assignProps)({
|
|
435
444
|
"tag": DropdownMenu.Trigger,
|
|
436
445
|
"ref": forwardRef,
|
|
437
446
|
"use:role": 'menuitem'
|
|
438
|
-
},
|
|
447
|
+
}, _ref13));
|
|
439
448
|
}
|
|
440
449
|
var DropdownMenu = (0, _core["default"])(DropdownMenuRoot, {
|
|
441
450
|
Trigger: Trigger,
|
|
@@ -446,6 +455,7 @@ var DropdownMenu = (0, _core["default"])(DropdownMenuRoot, {
|
|
|
446
455
|
Item: [Item, {
|
|
447
456
|
Addon: Addon,
|
|
448
457
|
Content: ItemContent,
|
|
458
|
+
Text: ItemContentText,
|
|
449
459
|
Hint: ItemHint
|
|
450
460
|
}],
|
|
451
461
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropdownMenu.js","names":["_core","_interopRequireWildcard","require","_react","_interopRequireDefault","_classnames","_dropdown","_flexBox","_scrollArea","_uniqueID","_intergalacticDynamicLocales","_keyboardFocusEnhance","_findComponent","_ref28","_assignProps13","_button","_excluded","style","_index","sstyled","insert","ListBoxContextProvider","_ref20","children","createElement","hideScrollBarsFromScreenReadersContext","Provider","value","menuItemContext","React","createContext","DropdownMenuRoot","_AbstractDropdown","_inherits2","_super","_createSuper2","_this","_classCallCheck2","_len","arguments","length","args","Array","_key","call","apply","concat","_defineProperty2","_assertThisInitialized2","_createClass2","key","itemRef","props","index","node","_get2","_getPrototypeOf2","prototype","document","activeElement","getTriggerProps","_this$asProps","asProps","Children","uid","visible","hasMenu","isAdvanceMode","DropdownMenu","Menu","displayName","ariaControls","_objectSpread2","onKeyDown","callAllEventHandlers","handlePreventCommonKeyDown","bind","handleOpenKeyDown","handleKeyDownForMenu","undefined","getListProps","handleArrowKeyDown","getPopperProps","handlePreventPopperKeyDown","getActionsProps","getItemProps","_this2","highlightedIndex","isHighlighted","itemProps","tabIndex","ref","tag","ButtonComponent","_props$use","_props$theme","_props$size","use","theme","size","place","_this3","e","_this3$asProps","placement","inlineActions","show","startsWith","hide","isMenuItem","target","getAttribute","handlers","setTimeout","_this3$itemRefs$highl","itemRefs","focus","preventDefault","stopPropagation","_this3$triggerRef$cur","triggerRef","current","render","_ref","_this$asProps2","selectedIndex","interaction","timeout","selectedIndexContext","Dropdown","assignProps","AbstractDropdown","Object","values","enhance","defaultVisible","defaultHighlightedIndex","defaultSelectedIndex","i18n","localizedMessages","locale","List","_ref21","_ref2","arguments[0]","_ref13","styles","SDropdownMenuList","ScrollAreaComponent","cn","Container","Bar","orientation","Actions","_ref22","_ref3","_ref14","SDropdownMenuActions","Flex","_ref4","disablePortal","ignorePortalsStacking","disableEnforceFocus","autoFocus","animationsDisabled","popperProps","Popper","_extends2","role","Item","_ref23","_ref5","_ref15","id","disabled","forwardRef","SDropdownMenuItemContainer","useRef","_React$useState","useState","_React$useState2","_slicedToArray2","highlighted","setHighlighted","menuItemContextValue","contentId","forkRef","ariaDescribes","hasSubMenu","hasHint","Hint","advancedMode","Content","hintId","useUID","push","useEffect","onFocus","onBlur","addEventListener","capture","removeEventListener","focusSourceRef","useFocusSource","Addon","_useBox","useBox","_useBox2","SDropdownMenuItemAddon","_useBox2$","className","other","_objectWithoutProperties2","Trigger","_ref6","ItemContent","_ref24","_ref7","_ref16","SItemContent","menuItemCtxValue","useContext","subMenu","_React$useState3","Set","_React$useState4","describedby","setDescribedby","element","parent","parentElement","prev","add","_toConsumableArray2","join","ItemHint","_ref25","_ref8","_ref17","SItemHint","_React$useContext","_ref9","_ref18","Title","_ref10","_ref19","Nesting","_ref26","_ref11","NestingTrigger","_ref27","_ref12","createComponent","ItemTitle","Group","_default","exports"],"sources":["../../src/DropdownMenu.jsx"],"sourcesContent":["import React from 'react';\nimport cn from 'classnames';\nimport createComponent, { sstyled, Root } from '@semcore/core';\nimport Dropdown, { AbstractDropdown, selectedIndexContext, enhance } from '@semcore/dropdown';\nimport { Flex, useBox, Box } from '@semcore/flex-box';\nimport ScrollAreaComponent, { hideScrollBarsFromScreenReadersContext } from '@semcore/scroll-area';\nimport { useUID } from '@semcore/utils/lib/uniqueID';\nimport { localizedMessages } from './translations/__intergalactic-dynamic-locales';\nimport style from './style/dropdown-menu.shadow.css';\nimport { useFocusSource } from '@semcore/utils/lib/enhances/keyboardFocusEnhance';\nimport { isAdvanceMode } from '@semcore/utils/lib/findComponent';\nimport { forkRef } from '@semcore/utils/lib/ref';\nimport { callAllEventHandlers } from '@semcore/utils/lib/assignProps';\nimport ButtonComponent from '@semcore/button';\n\nconst ListBoxContextProvider = ({ children }) => (\n <hideScrollBarsFromScreenReadersContext.Provider value={true}>\n {children}\n </hideScrollBarsFromScreenReadersContext.Provider>\n);\n\nconst menuItemContext = React.createContext({});\n\nclass DropdownMenuRoot extends AbstractDropdown {\n static displayName = 'DropdownMenu';\n static style = style;\n static enhance = Object.values(enhance);\n\n static defaultProps = {\n size: 'm',\n defaultVisible: false,\n defaultHighlightedIndex: 0,\n defaultSelectedIndex: 0,\n i18n: localizedMessages,\n locale: 'en',\n interaction: 'click',\n inlineActions: false,\n placement: 'bottom-start',\n timeout: 0,\n };\n\n role = 'menu';\n\n itemRef(props, index, node) {\n super.itemRef(props, index, node);\n\n if (node === document.activeElement) {\n super.scrollToNode(node);\n }\n }\n\n getTriggerProps() {\n const { Children, uid, visible } = this.asProps;\n const hasMenu = isAdvanceMode(Children, [DropdownMenu.Menu.displayName]);\n const ariaControls = hasMenu ? `igc-${uid}-list` : `igc-${uid}-popper`;\n\n return {\n ...super.getTriggerProps(),\n onKeyDown: callAllEventHandlers(\n this.handlePreventCommonKeyDown.bind(this),\n this.handleOpenKeyDown.bind(this),\n this.handleKeyDownForMenu('trigger'),\n ),\n 'aria-controls': visible ? ariaControls : undefined,\n 'aria-haspopup': hasMenu ? 'true' : 'dialog',\n };\n }\n\n getListProps() {\n return {\n ...super.getListProps(),\n onKeyDown: callAllEventHandlers(\n this.handlePreventCommonKeyDown.bind(this),\n this.handleKeyDownForMenu('list'),\n this.handleArrowKeyDown.bind(this),\n ),\n };\n }\n\n getPopperProps() {\n return {\n ...super.getPopperProps(),\n onKeyDown: callAllEventHandlers(\n this.handlePreventCommonKeyDown.bind(this),\n this.handlePreventPopperKeyDown.bind(this),\n // this.handleKeyDownForPopper.bind(this),\n ),\n };\n }\n\n getActionsProps() {\n return this.getListProps();\n }\n\n getItemProps(props, index) {\n const { highlightedIndex } = this.asProps;\n const isHighlighted = index === highlightedIndex;\n\n const itemProps = {\n ...super.getItemProps(props, index),\n tabIndex: isHighlighted ? 0 : -1,\n ref: (node) => this.itemRef(props, index, node),\n };\n\n if (props.tag === ButtonComponent) {\n itemProps.use = props.use ?? 'tertiary';\n itemProps.theme = props.theme ?? 'muted';\n itemProps.size = props.size ?? 's';\n }\n\n return itemProps;\n }\n\n handleKeyDownForMenu(place) {\n return (e) => {\n const { visible, placement, inlineActions } = this.asProps;\n\n const show =\n (e.key === 'ArrowRight' && placement?.startsWith('right')) ||\n (e.key === 'ArrowLeft' && placement?.startsWith('left'));\n const hide =\n (e.key === 'ArrowLeft' && placement?.startsWith('right')) ||\n (e.key === 'ArrowRight' && placement?.startsWith('left')) ||\n e.key === 'Escape';\n const isMenuItem = e.target.getAttribute('role') === super.childRole;\n\n if (place === 'trigger' && (!visible || inlineActions) && show && isMenuItem) {\n this.handlers.visible(true);\n this.handlers.highlightedIndex(0);\n setTimeout(() => {\n const { highlightedIndex } = this.asProps;\n this.itemRefs[highlightedIndex]?.focus();\n }, 0);\n\n e.preventDefault();\n e.stopPropagation();\n return false;\n }\n if (place === 'list' && visible && hide && isMenuItem) {\n if (\n !inlineActions ||\n (inlineActions && (e.key === 'Escape' || this.asProps.highlightedIndex === 0))\n ) {\n this.handlers.visible(false);\n this.triggerRef.current?.focus();\n\n e.preventDefault();\n e.stopPropagation();\n return false;\n }\n }\n };\n }\n\n render() {\n const { Children, selectedIndex, interaction, timeout } = this.asProps;\n\n this.itemProps = [];\n\n return (\n <selectedIndexContext.Provider value={selectedIndex}>\n <Root\n render={Dropdown}\n timeout={timeout || (interaction === 'hover' ? [0, 100] : undefined)}\n >\n <Children />\n </Root>\n </selectedIndexContext.Provider>\n );\n }\n}\n\nfunction List({ styles, Children }) {\n const SDropdownMenuList = Root;\n\n return sstyled(styles)(\n <ListBoxContextProvider>\n <SDropdownMenuList render={ScrollAreaComponent} shadow={true}>\n <ScrollAreaComponent.Container tabIndex={undefined}>\n <Children />\n </ScrollAreaComponent.Container>\n <ScrollAreaComponent.Bar orientation='horizontal' />\n <ScrollAreaComponent.Bar orientation='vertical' />\n </SDropdownMenuList>\n </ListBoxContextProvider>,\n );\n}\nfunction Actions({ styles }) {\n const SDropdownMenuActions = Root;\n\n return sstyled(styles)(<SDropdownMenuActions render={Flex} />);\n}\n\nfunction Menu(props) {\n const {\n visible,\n disablePortal,\n ignorePortalsStacking,\n disableEnforceFocus,\n interaction,\n autoFocus,\n animationsDisabled,\n } = props;\n const popperProps = {\n visible,\n disablePortal,\n ignorePortalsStacking,\n disableEnforceFocus,\n interaction,\n autoFocus,\n animationsDisabled,\n };\n return (\n <ListBoxContextProvider>\n <DropdownMenu.Popper {...popperProps} role={null}>\n <Root render={DropdownMenu.List} />\n </DropdownMenu.Popper>\n </ListBoxContextProvider>\n );\n}\n\nfunction Item({ id, styles, disabled, Children, forwardRef, role }) {\n const SDropdownMenuItemContainer = Root;\n const itemRef = React.useRef();\n\n const [highlighted, setHighlighted] = React.useState(false);\n\n const menuItemContextValue = {\n contentId: id,\n ref: forkRef(forwardRef, itemRef),\n role,\n };\n const ariaDescribes = [];\n\n const hasSubMenu = isAdvanceMode(Children, [DropdownMenu.displayName], true);\n const hasHint = isAdvanceMode(Children, [DropdownMenu.Item.Hint.displayName], true);\n const advancedMode =\n isAdvanceMode(Children, [DropdownMenu.Item.Content.displayName], true) || hasSubMenu || hasHint;\n\n if (hasHint) {\n const hintId = `igc-${useUID()}-option-hint`;\n\n menuItemContextValue.hintId = hintId;\n ariaDescribes.push(hintId);\n }\n\n if (hasSubMenu) {\n menuItemContextValue.hasSubMenu = true;\n }\n\n menuItemContextValue.ariaDescribes = ariaDescribes;\n\n React.useEffect(() => {\n const onFocus = (e) => {\n if (e.target === itemRef.current) {\n setHighlighted(true);\n\n if (hasSubMenu) {\n e.stopPropagation();\n }\n }\n };\n const onBlur = (e) => {\n if (e.target === itemRef.current) {\n setHighlighted(false);\n }\n };\n\n document.addEventListener('focus', onFocus, { capture: true });\n document.addEventListener('blur', onBlur, { capture: true });\n\n return () => {\n document.removeEventListener('focus', onFocus, { capture: true });\n document.removeEventListener('blur', onBlur, { capture: true });\n };\n }, [itemRef.current]);\n\n const focusSourceRef = useFocusSource();\n\n return sstyled(styles)(\n <menuItemContext.Provider value={menuItemContextValue}>\n <SDropdownMenuItemContainer\n render={Dropdown.Item}\n ref={advancedMode ? undefined : menuItemContextValue.ref}\n use:highlighted={!disabled && highlighted && focusSourceRef.current === 'keyboard'}\n use:role={advancedMode ? undefined : role}\n use:id={advancedMode ? undefined : id}\n tabIndex={advancedMode ? undefined : -1}\n >\n <Children />\n </SDropdownMenuItemContainer>\n </menuItemContext.Provider>,\n );\n}\n\nfunction Addon(props) {\n const [SDropdownMenuItemAddon, { className, ...other }] = useBox(props, props.forwardRef);\n const styles = sstyled(props.styles);\n return (\n <SDropdownMenuItemAddon\n className={cn(styles.cn('SDropdownMenuItemAddon', props).className, className) || undefined}\n {...other}\n />\n );\n}\n\nfunction Trigger() {\n return <Root render={Dropdown.Trigger} />;\n}\n\nfunction ItemContent({ styles }) {\n const SItemContent = Root;\n const ref = React.useRef();\n const menuItemCtxValue = React.useContext(menuItemContext);\n\n let subMenu = undefined;\n\n if (menuItemCtxValue.hasSubMenu) {\n subMenu = 'true';\n }\n\n const [describedby, setDescribedby] = React.useState(new Set(menuItemCtxValue.ariaDescribes));\n\n React.useEffect(() => {\n const element = ref.current;\n const parent = element?.parentElement;\n\n if (\n parent.getAttribute('aria-haspopup') === 'true' &&\n parent.getAttribute('aria-describedby')\n ) {\n setDescribedby((prev) => {\n prev.add(parent.getAttribute('aria-describedby'));\n\n return new Set(prev);\n });\n }\n }, [menuItemCtxValue.ariaDescribes]);\n\n return sstyled(styles)(\n <SItemContent\n render={Flex}\n role={menuItemCtxValue.role}\n id={menuItemCtxValue.contentId}\n tabIndex={-1}\n ref={forkRef(menuItemCtxValue.ref, ref)}\n use:aria-describedby={[...describedby].join(' ')}\n aria-haspopup={menuItemCtxValue.hasSubMenu ? 'true' : undefined}\n aria-expanded={subMenu}\n alignItems={menuItemCtxValue.hasSubMenu ? 'center' : undefined}\n justifyContent={menuItemCtxValue.hasSubMenu ? 'space-between' : undefined}\n />,\n );\n}\n\nfunction ItemHint({ styles }) {\n const SItemHint = Root;\n const { hintId } = React.useContext(menuItemContext);\n\n return sstyled(styles)(<SItemHint render={Flex} id={hintId} aria-hidden={'true'} />);\n}\n\n/**\n * @deprecated Use Item hint\n */\nfunction Hint(props) {\n const SDropdownMenuItemContainer = Root;\n return sstyled(props.styles)(\n <SDropdownMenuItemContainer render={Dropdown.Item} variant='hint' />,\n );\n}\n/**\n * @deprecated Use Group with title prop\n */\nfunction Title(props) {\n const SDropdownMenuItemContainer = Root;\n return sstyled(props.styles)(\n <SDropdownMenuItemContainer render={Dropdown.Item} variant='title' />,\n );\n}\n\n/**\n * @deprecated\n */\nfunction Nesting({ forwardRef }) {\n return <Root render={DropdownMenu.Item} ref={forwardRef} />;\n}\n\n/**\n * @deprecated\n */\nfunction NestingTrigger({ forwardRef }) {\n return (\n <Root\n render={DropdownMenu.Item.Content}\n tag={DropdownMenu.Trigger}\n ref={forwardRef}\n use:role={'menuitem'}\n />\n );\n}\n\nconst DropdownMenu = createComponent(\n DropdownMenuRoot,\n {\n Trigger,\n Popper: Dropdown.Popper,\n List,\n Actions,\n Menu,\n Item: [Item, { Addon, Content: ItemContent, Hint: ItemHint }],\n /**\n * @deprecated. Use just Item. See examples on\n */\n Nesting: [Nesting, { Trigger: NestingTrigger, Addon }],\n ItemTitle: Title,\n ItemHint: Hint,\n Group: Dropdown.Group,\n },\n {\n parent: [Dropdown],\n },\n);\n\nDropd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IAAEjC,OAAO,EAAEoC,cAAc;IAAE7C,KAAK,EAALA;EAAM,CAAC,CAAC;EACtDiD,SAAS,EAAEV,KAAK;EAChBR,QAAQ,EAAE7C,IAAI;EACdgE,KAAK,EAAE7H,oBAAQ,CAAC6H;AAClB,CAAC,EACD;EACEzB,MAAM,EAAE,CAACpG,oBAAQ;AACnB,CAAC,CACF;AAED7D,YAAY,CAAC4D,oBAAoB,GAAGA,8BAAoB;AAAC,IAAA+H,QAAA,GAE1C3L,YAAY;AAAA4L,OAAA,cAAAD,QAAA"}
|
|
1
|
+
{"version":3,"file":"DropdownMenu.js","names":["_core","_interopRequireWildcard","require","_react","_interopRequireDefault","_classnames","_dropdown","_flexBox","_scrollArea","_uniqueID","_intergalacticDynamicLocales","_keyboardFocusEnhance","_findComponent","_ref31","_assignProps14","_button","_typography","_excluded","style","_index","sstyled","insert","ListBoxContextProvider","_ref22","children","createElement","hideScrollBarsFromScreenReadersContext","Provider","value","menuItemContext","React","createContext","DropdownMenuRoot","_AbstractDropdown","_inherits2","_super","_createSuper2","_this","_classCallCheck2","_len","arguments","length","args","Array","_key","call","apply","concat","_defineProperty2","_assertThisInitialized2","_createClass2","key","itemRef","props","index","node","_get2","_getPrototypeOf2","prototype","document","activeElement","getTriggerProps","_this$asProps","asProps","Children","uid","visible","hasMenu","isAdvanceMode","DropdownMenu","Menu","displayName","ariaControls","_objectSpread2","onKeyDown","callAllEventHandlers","handlePreventCommonKeyDown","bind","handleOpenKeyDown","handleKeyDownForMenu","undefined","getListProps","handleArrowKeyDown","getPopperProps","handlePreventPopperKeyDown","getActionsProps","getItemProps","_this2","highlightedIndex","isHighlighted","itemProps","tabIndex","ref","tag","ButtonComponent","_props$use","_props$theme","_props$size","use","theme","size","place","_this3","e","_this3$asProps","placement","inlineActions","show","startsWith","hide","isMenuItem","target","getAttribute","handlers","setTimeout","_this3$itemRefs$highl","itemRefs","focus","preventDefault","stopPropagation","_this3$triggerRef$cur","triggerRef","current","render","_ref","_this$asProps2","selectedIndex","interaction","timeout","selectedIndexContext","Dropdown","assignProps","AbstractDropdown","Object","values","enhance","defaultVisible","defaultHighlightedIndex","defaultSelectedIndex","i18n","localizedMessages","locale","List","_ref23","_ref2","arguments[0]","_ref14","styles","SDropdownMenuList","ScrollAreaComponent","cn","Container","Bar","orientation","Actions","_ref24","_ref3","_ref15","SDropdownMenuActions","Flex","_ref4","disablePortal","ignorePortalsStacking","disableEnforceFocus","autoFocus","animationsDisabled","popperProps","Popper","_extends2","role","Item","_ref25","_ref5","_ref16","id","disabled","forwardRef","SDropdownMenuItemContainer","useRef","_React$useState","useState","_React$useState2","_slicedToArray2","highlighted","setHighlighted","menuItemContextValue","contentId","forkRef","ariaDescribes","hasSubMenu","hasHint","Hint","advancedMode","Content","hintId","useUID","push","useEffect","onFocus","onBlur","addEventListener","capture","removeEventListener","focusSourceRef","useFocusSource","Addon","_useBox","useBox","_useBox2","SDropdownMenuItemAddon","_useBox2$","className","other","_objectWithoutProperties2","Trigger","_ref6","ItemContent","_ref26","_ref7","_ref17","SItemContent","menuItemCtxValue","useContext","subMenu","_React$useState3","Set","_React$useState4","describedby","setDescribedby","element","parent","parentElement","prev","add","_toConsumableArray2","join","ItemContentText","_ref27","_ref8","_ref18","SItemContentText","Text","ItemHint","_ref28","_ref9","_ref19","SItemHint","_React$useContext","_ref10","_ref20","Title","_ref11","_ref21","Nesting","_ref29","_ref12","NestingTrigger","_ref30","_ref13","createComponent","ItemTitle","Group","_default","exports"],"sources":["../../src/DropdownMenu.jsx"],"sourcesContent":["import React from 'react';\nimport cn from 'classnames';\nimport createComponent, { sstyled, Root } from '@semcore/core';\nimport Dropdown, { AbstractDropdown, selectedIndexContext, enhance } from '@semcore/dropdown';\nimport { Flex, useBox } from '@semcore/flex-box';\nimport ScrollAreaComponent, { hideScrollBarsFromScreenReadersContext } from '@semcore/scroll-area';\nimport { useUID } from '@semcore/utils/lib/uniqueID';\nimport { localizedMessages } from './translations/__intergalactic-dynamic-locales';\nimport style from './style/dropdown-menu.shadow.css';\nimport { useFocusSource } from '@semcore/utils/lib/enhances/keyboardFocusEnhance';\nimport { isAdvanceMode } from '@semcore/utils/lib/findComponent';\nimport { forkRef } from '@semcore/utils/lib/ref';\nimport { callAllEventHandlers } from '@semcore/utils/lib/assignProps';\nimport ButtonComponent from '@semcore/button';\nimport { Text } from '@semcore/typography';\n\nconst ListBoxContextProvider = ({ children }) => (\n <hideScrollBarsFromScreenReadersContext.Provider value={true}>\n {children}\n </hideScrollBarsFromScreenReadersContext.Provider>\n);\n\nconst menuItemContext = React.createContext({});\n\nclass DropdownMenuRoot extends AbstractDropdown {\n static displayName = 'DropdownMenu';\n static style = style;\n static enhance = Object.values(enhance);\n\n static defaultProps = {\n size: 'm',\n defaultVisible: false,\n defaultHighlightedIndex: 0,\n defaultSelectedIndex: 0,\n i18n: localizedMessages,\n locale: 'en',\n interaction: 'click',\n inlineActions: false,\n placement: 'bottom-start',\n timeout: 0,\n };\n\n role = 'menu';\n\n itemRef(props, index, node) {\n super.itemRef(props, index, node);\n\n if (node === document.activeElement) {\n super.scrollToNode(node);\n }\n }\n\n getTriggerProps() {\n const { Children, uid, visible } = this.asProps;\n const hasMenu = isAdvanceMode(Children, [DropdownMenu.Menu.displayName]);\n const ariaControls = hasMenu ? `igc-${uid}-list` : `igc-${uid}-popper`;\n\n return {\n ...super.getTriggerProps(),\n onKeyDown: callAllEventHandlers(\n this.handlePreventCommonKeyDown.bind(this),\n this.handleOpenKeyDown.bind(this),\n this.handleKeyDownForMenu('trigger'),\n ),\n 'aria-controls': visible ? ariaControls : undefined,\n 'aria-haspopup': hasMenu ? 'true' : 'dialog',\n };\n }\n\n getListProps() {\n return {\n ...super.getListProps(),\n onKeyDown: callAllEventHandlers(\n this.handlePreventCommonKeyDown.bind(this),\n this.handleKeyDownForMenu('list'),\n this.handleArrowKeyDown.bind(this),\n ),\n };\n }\n\n getPopperProps() {\n return {\n ...super.getPopperProps(),\n onKeyDown: callAllEventHandlers(\n this.handlePreventCommonKeyDown.bind(this),\n this.handlePreventPopperKeyDown.bind(this),\n // this.handleKeyDownForPopper.bind(this),\n ),\n };\n }\n\n getActionsProps() {\n return this.getListProps();\n }\n\n getItemProps(props, index) {\n const { highlightedIndex } = this.asProps;\n const isHighlighted = index === highlightedIndex;\n\n const itemProps = {\n ...super.getItemProps(props, index),\n tabIndex: isHighlighted ? 0 : -1,\n ref: (node) => this.itemRef(props, index, node),\n };\n\n if (props.tag === ButtonComponent) {\n itemProps.use = props.use ?? 'tertiary';\n itemProps.theme = props.theme ?? 'muted';\n itemProps.size = props.size ?? 's';\n }\n\n return itemProps;\n }\n\n handleKeyDownForMenu(place) {\n return (e) => {\n const { visible, placement, inlineActions } = this.asProps;\n\n const show =\n (e.key === 'ArrowRight' && placement?.startsWith('right')) ||\n (e.key === 'ArrowLeft' && placement?.startsWith('left'));\n const hide =\n (e.key === 'ArrowLeft' && placement?.startsWith('right')) ||\n (e.key === 'ArrowRight' && placement?.startsWith('left')) ||\n e.key === 'Escape';\n const isMenuItem = e.target.getAttribute('role') === super.childRole;\n\n if (place === 'trigger' && (!visible || inlineActions) && show && isMenuItem) {\n this.handlers.visible(true);\n this.handlers.highlightedIndex(0);\n setTimeout(() => {\n const { highlightedIndex } = this.asProps;\n this.itemRefs[highlightedIndex]?.focus();\n }, 0);\n\n e.preventDefault();\n e.stopPropagation();\n return false;\n }\n if (place === 'list' && visible && hide && isMenuItem) {\n if (\n !inlineActions ||\n (inlineActions && (e.key === 'Escape' || this.asProps.highlightedIndex === 0))\n ) {\n this.handlers.visible(false);\n this.triggerRef.current?.focus();\n\n e.preventDefault();\n e.stopPropagation();\n return false;\n }\n }\n };\n }\n\n render() {\n const { Children, selectedIndex, interaction, timeout } = this.asProps;\n\n this.itemProps = [];\n\n return (\n <selectedIndexContext.Provider value={selectedIndex}>\n <Root\n render={Dropdown}\n timeout={timeout || (interaction === 'hover' ? [0, 100] : undefined)}\n >\n <Children />\n </Root>\n </selectedIndexContext.Provider>\n );\n }\n}\n\nfunction List({ styles, Children }) {\n const SDropdownMenuList = Root;\n\n return sstyled(styles)(\n <ListBoxContextProvider>\n <SDropdownMenuList render={ScrollAreaComponent} shadow={true}>\n <ScrollAreaComponent.Container tabIndex={undefined}>\n <Children />\n </ScrollAreaComponent.Container>\n <ScrollAreaComponent.Bar orientation='horizontal' />\n <ScrollAreaComponent.Bar orientation='vertical' />\n </SDropdownMenuList>\n </ListBoxContextProvider>,\n );\n}\nfunction Actions({ styles }) {\n const SDropdownMenuActions = Root;\n\n return sstyled(styles)(<SDropdownMenuActions render={Flex} />);\n}\n\nfunction Menu(props) {\n const {\n visible,\n disablePortal,\n ignorePortalsStacking,\n disableEnforceFocus,\n interaction,\n autoFocus,\n animationsDisabled,\n } = props;\n const popperProps = {\n visible,\n disablePortal,\n ignorePortalsStacking,\n disableEnforceFocus,\n interaction,\n autoFocus,\n animationsDisabled,\n };\n return (\n <ListBoxContextProvider>\n <DropdownMenu.Popper {...popperProps} role={null}>\n <Root render={DropdownMenu.List} />\n </DropdownMenu.Popper>\n </ListBoxContextProvider>\n );\n}\n\nfunction Item({ id, styles, disabled, Children, forwardRef, role }) {\n const SDropdownMenuItemContainer = Root;\n const itemRef = React.useRef();\n\n const [highlighted, setHighlighted] = React.useState(false);\n\n const menuItemContextValue = {\n contentId: id,\n ref: forkRef(forwardRef, itemRef),\n role,\n };\n const ariaDescribes = [];\n\n const hasSubMenu = isAdvanceMode(Children, [DropdownMenu.displayName], true);\n const hasHint = isAdvanceMode(Children, [DropdownMenu.Item.Hint.displayName], true);\n const advancedMode =\n isAdvanceMode(Children, [DropdownMenu.Item.Content.displayName], true) || hasSubMenu || hasHint;\n\n if (hasHint) {\n const hintId = `igc-${useUID()}-option-hint`;\n\n menuItemContextValue.hintId = hintId;\n ariaDescribes.push(hintId);\n }\n\n if (hasSubMenu) {\n menuItemContextValue.hasSubMenu = true;\n }\n\n menuItemContextValue.ariaDescribes = ariaDescribes;\n\n React.useEffect(() => {\n const onFocus = (e) => {\n if (e.target === itemRef.current) {\n setHighlighted(true);\n\n if (hasSubMenu) {\n e.stopPropagation();\n }\n }\n };\n const onBlur = (e) => {\n if (e.target === itemRef.current) {\n setHighlighted(false);\n }\n };\n\n document.addEventListener('focus', onFocus, { capture: true });\n document.addEventListener('blur', onBlur, { capture: true });\n\n return () => {\n document.removeEventListener('focus', onFocus, { capture: true });\n document.removeEventListener('blur', onBlur, { capture: true });\n };\n }, [itemRef.current]);\n\n const focusSourceRef = useFocusSource();\n\n return sstyled(styles)(\n <menuItemContext.Provider value={menuItemContextValue}>\n <SDropdownMenuItemContainer\n render={Dropdown.Item}\n ref={advancedMode ? undefined : menuItemContextValue.ref}\n use:highlighted={!disabled && highlighted && focusSourceRef.current === 'keyboard'}\n use:role={advancedMode ? undefined : role}\n use:id={advancedMode ? undefined : id}\n tabIndex={advancedMode ? undefined : -1}\n >\n <Children />\n </SDropdownMenuItemContainer>\n </menuItemContext.Provider>,\n );\n}\n\nfunction Addon(props) {\n const [SDropdownMenuItemAddon, { className, ...other }] = useBox(props, props.forwardRef);\n const styles = sstyled(props.styles);\n return (\n <SDropdownMenuItemAddon\n className={cn(styles.cn('SDropdownMenuItemAddon', props).className, className) || undefined}\n {...other}\n />\n );\n}\n\nfunction Trigger() {\n return <Root render={Dropdown.Trigger} />;\n}\n\nfunction ItemContent({ styles }) {\n const SItemContent = Root;\n const ref = React.useRef();\n const menuItemCtxValue = React.useContext(menuItemContext);\n\n let subMenu = undefined;\n\n if (menuItemCtxValue.hasSubMenu) {\n subMenu = 'true';\n }\n\n const [describedby, setDescribedby] = React.useState(new Set(menuItemCtxValue.ariaDescribes));\n\n React.useEffect(() => {\n const element = ref.current;\n const parent = element?.parentElement;\n\n if (\n parent.getAttribute('aria-haspopup') === 'true' &&\n parent.getAttribute('aria-describedby')\n ) {\n setDescribedby((prev) => {\n prev.add(parent.getAttribute('aria-describedby'));\n\n return new Set(prev);\n });\n }\n }, [menuItemCtxValue.ariaDescribes]);\n\n return sstyled(styles)(\n <SItemContent\n render={Flex}\n role={menuItemCtxValue.role}\n id={menuItemCtxValue.contentId}\n tabIndex={-1}\n ref={forkRef(menuItemCtxValue.ref, ref)}\n use:aria-describedby={[...describedby].join(' ')}\n aria-haspopup={menuItemCtxValue.hasSubMenu ? 'true' : undefined}\n aria-expanded={subMenu}\n alignItems='center'\n justifyContent={menuItemCtxValue.hasSubMenu ? 'space-between' : undefined}\n />,\n );\n}\n\nfunction ItemContentText({ styles }) {\n const SItemContentText = Root;\n return sstyled(styles)(<SItemContentText render={Text} />);\n}\n\nfunction ItemHint({ styles }) {\n const SItemHint = Root;\n const { hintId } = React.useContext(menuItemContext);\n\n return sstyled(styles)(<SItemHint render={Flex} id={hintId} aria-hidden={'true'} />);\n}\n\n/**\n * @deprecated Use Item hint\n */\nfunction Hint(props) {\n const SDropdownMenuItemContainer = Root;\n return sstyled(props.styles)(\n <SDropdownMenuItemContainer render={Dropdown.Item} variant='hint' />,\n );\n}\n/**\n * @deprecated Use Group with title prop\n */\nfunction Title(props) {\n const SDropdownMenuItemContainer = Root;\n return sstyled(props.styles)(\n <SDropdownMenuItemContainer render={Dropdown.Item} variant='title' />,\n );\n}\n\n/**\n * @deprecated\n */\nfunction Nesting({ forwardRef }) {\n return <Root render={DropdownMenu.Item} ref={forwardRef} />;\n}\n\n/**\n * @deprecated\n */\nfunction NestingTrigger({ forwardRef }) {\n return (\n <Root\n render={DropdownMenu.Item.Content}\n tag={DropdownMenu.Trigger}\n ref={forwardRef}\n use:role={'menuitem'}\n />\n );\n}\n\nconst DropdownMenu = createComponent(\n DropdownMenuRoot,\n {\n Trigger,\n Popper: Dropdown.Popper,\n List,\n Actions,\n Menu,\n Item: [Item, { Addon, Content: ItemContent, Text: ItemContentText, Hint: ItemHint }],\n /**\n * @deprecated. Use just Item. See examples on\n */\n Nesting: [Nesting, { Trigger: NestingTrigger, Addon }],\n ItemTitle: Title,\n ItemHint: Hint,\n Group: Dropdown.Group,\n },\n {\n parent: [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AAEA,IAAM7L,YAAY,GAAG,IAAA8L,gBAAe,EAClCnO,gBAAgB,EAChB;EACEsL,OAAO,EAAPA,OAAO;EACP/C,MAAM,EAAErC,oBAAQ,CAACqC,MAAM;EACvBzB,IAAI,EAAJA,IAAI;EACJY,OAAO,EAAPA,OAAO;EACPpF,IAAI,EAAJA,IAAI;EACJoG,IAAI,EAAE,CAACA,IAAI,EAAE;IAAEmC,KAAK,EAALA,KAAK;IAAEZ,OAAO,EAAEuB,WAAW;IAAEyB,IAAI,EAAEL,eAAe;IAAE7C,IAAI,EAAEmD;EAAS,CAAC,CAAC;EACpF;AACJ;AACA;EACIW,OAAO,EAAE,CAACA,OAAO,EAAE;IAAEvC,OAAO,EAAE0C,cAAc;IAAEnD,KAAK,EAALA;EAAM,CAAC,CAAC;EACtDuD,SAAS,EAAEV,KAAK;EAChBR,QAAQ,EAAEnD,IAAI;EACdsE,KAAK,EAAEnI,oBAAQ,CAACmI;AAClB,CAAC,EACD;EACE/B,MAAM,EAAE,CAACpG,oBAAQ;AACnB,CAAC,CACF;AAED7D,YAAY,CAAC4D,oBAAoB,GAAGA,8BAAoB;AAAC,IAAAqI,QAAA,GAE1CjM,YAAY;AAAAkM,OAAA,cAAAD,QAAA"}
|
package/lib/cjs/index.d.js.map
CHANGED
|
@@ -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, Flex } 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 | null;\n /**\n * Index of the selected item\n */\n highlightedIndex?: number | null;\n /**\n * Callback for highlightedIndex change\n * highlightedIndex - Index of the selected item\n */\n onHighlightedIndexChange?: (highlightedIndex: number | null) => void;\n locale?: string;\n /**\n * Flag for menu that using as actions on DropdownMenu.Item\n */\n inlineActions?: boolean;\n};\n\n/** @deprecated */\nexport interface IDropdownMenuListProps extends DropdownMenuListProps, UnknownProperties {}\nexport type DropdownMenuListProps = BoxProps &\n ScrollAreaProps & {\n /**\n * Size of the menu\n * @default m\n */\n size?: DropdownMenuSize;\n };\n\n/** @deprecated */\nexport interface IDropdownMenuMenuProps extends DropdownMenuMenuProps, UnknownProperties {}\nexport type DropdownMenuMenuProps = DropdownMenuListProps & {};\n\n/** @deprecated */\nexport interface IDropdownMenuItemProps extends DropdownMenuItemProps, UnknownProperties {}\nexport type DropdownMenuItemProps = FlexProps & {\n /**\n * Enables selected state\n * @deprecated Dropdown menu item can't have that 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 Actions: Intergalactic.Component<\n typeof Flex,\n DropdownMenuListProps,\n DropdownMenuContext,\n [handlers: DropdownMenuHandlers]\n >;\n Menu: Intergalactic.Component<\n 'div',\n DropdownMenuMenuProps,\n DropdownMenuContext,\n [handlers: DropdownMenuHandlers]\n >;\n Item: Intergalactic.Component<\n typeof Dropdown.Item,\n DropdownMenuItemProps,\n DropdownMenuContext,\n [handlers: DropdownMenuHandlers]\n > & {\n Addon: typeof Box;\n Content: typeof Flex;\n Hint: typeof Flex;\n };\n /**\n * @deprecated Use Group with title prop\n */\n ItemTitle: Intergalactic.Component<'div', DropdownMenuItemTitleProps>;\n /**\n * @deprecated Use prop subTitle on Group or Item component\n */\n ItemHint: Intergalactic.Component<'div', DropdownMenuItemHintProps>;\n Group: typeof Dropdown.Group;\n /**\n * @deprecated Use Item instead of Nesting\n */\n Nesting: Intergalactic.Component<\n 'div',\n DropdownMenuItemProps,\n DropdownMenuContext,\n [handlers: DropdownMenuHandlers]\n > & {\n /**\n * @deprecated Use Item instead of Nesting\n */\n Trigger: Intergalactic.Component<'div', DropdownMenuItemProps>;\n /**\n * @deprecated Use Item instead of Nesting\n */\n Item: Intergalactic.Component<'div', DropdownMenuItemProps>;\n /**\n * @deprecated Use Item instead of Nesting\n */\n Addon: typeof Box;\n };\n\n selectedIndexContext: React.Context<number>;\n};\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, Flex } from '@semcore/flex-box';\nimport { ScrollAreaProps } from '@semcore/scroll-area';\nimport { Text } from '@semcore/typography';\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 | null;\n /**\n * Index of the selected item\n */\n highlightedIndex?: number | null;\n /**\n * Callback for highlightedIndex change\n * highlightedIndex - Index of the selected item\n */\n onHighlightedIndexChange?: (highlightedIndex: number | null) => void;\n locale?: string;\n /**\n * Flag for menu that using as actions on DropdownMenu.Item\n */\n inlineActions?: boolean;\n};\n\n/** @deprecated */\nexport interface IDropdownMenuListProps extends DropdownMenuListProps, UnknownProperties {}\nexport type DropdownMenuListProps = BoxProps &\n ScrollAreaProps & {\n /**\n * Size of the menu\n * @default m\n */\n size?: DropdownMenuSize;\n };\n\n/** @deprecated */\nexport interface IDropdownMenuMenuProps extends DropdownMenuMenuProps, UnknownProperties {}\nexport type DropdownMenuMenuProps = DropdownMenuListProps & {};\n\n/** @deprecated */\nexport interface IDropdownMenuItemProps extends DropdownMenuItemProps, UnknownProperties {}\nexport type DropdownMenuItemProps = FlexProps & {\n /**\n * Enables selected state\n * @deprecated Dropdown menu item can't have that 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 Actions: Intergalactic.Component<\n typeof Flex,\n DropdownMenuListProps,\n DropdownMenuContext,\n [handlers: DropdownMenuHandlers]\n >;\n Menu: Intergalactic.Component<\n 'div',\n DropdownMenuMenuProps,\n DropdownMenuContext,\n [handlers: DropdownMenuHandlers]\n >;\n Item: Intergalactic.Component<\n typeof Dropdown.Item,\n DropdownMenuItemProps,\n DropdownMenuContext,\n [handlers: DropdownMenuHandlers]\n > & {\n Addon: typeof Box;\n Content: typeof Flex;\n Text: typeof Text;\n Hint: typeof Flex;\n };\n /**\n * @deprecated Use Group with title prop\n */\n ItemTitle: Intergalactic.Component<'div', DropdownMenuItemTitleProps>;\n /**\n * @deprecated Use prop subTitle on Group or Item component\n */\n ItemHint: Intergalactic.Component<'div', DropdownMenuItemHintProps>;\n Group: typeof Dropdown.Group;\n /**\n * @deprecated Use Item instead of Nesting\n */\n Nesting: Intergalactic.Component<\n 'div',\n DropdownMenuItemProps,\n DropdownMenuContext,\n [handlers: DropdownMenuHandlers]\n > & {\n /**\n * @deprecated Use Item instead of Nesting\n */\n Trigger: Intergalactic.Component<'div', DropdownMenuItemProps>;\n /**\n * @deprecated Use Item instead of Nesting\n */\n Item: Intergalactic.Component<'div', DropdownMenuItemProps>;\n /**\n * @deprecated Use Item instead of Nesting\n */\n Addon: typeof Box;\n };\n\n selectedIndexContext: React.Context<number>;\n};\n\nexport default DropdownMenu;\n"],"mappings":""}
|
|
@@ -99,10 +99,10 @@ SDropdownMenuItemContainer[nesting-trigger] {
|
|
|
99
99
|
justify-content: space-between;
|
|
100
100
|
}
|
|
101
101
|
|
|
102
|
-
SDropdownMenuItemAddon {
|
|
102
|
+
SDropdownMenuItemAddon, SItemContentText {
|
|
103
103
|
display: inline-flex;
|
|
104
|
-
margin-left: var(--intergalactic-spacing-
|
|
105
|
-
margin-right: var(--intergalactic-spacing-
|
|
104
|
+
margin-left: var(--intergalactic-spacing-1x, 4px);
|
|
105
|
+
margin-right: var(--intergalactic-spacing-1x, 4px);
|
|
106
106
|
|
|
107
107
|
&:first-child {
|
|
108
108
|
margin-left: 0;
|
package/lib/es6/DropdownMenu.js
CHANGED
|
@@ -12,6 +12,7 @@ import _inherits from "@babel/runtime/helpers/inherits";
|
|
|
12
12
|
import _createSuper from "@babel/runtime/helpers/createSuper";
|
|
13
13
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
14
14
|
import { sstyled as _sstyled } from "@semcore/utils/lib/core/index";
|
|
15
|
+
import { assignProps as _assignProps13 } from "@semcore/core";
|
|
15
16
|
import { assignProps as _assignProps12 } from "@semcore/core";
|
|
16
17
|
import { assignProps as _assignProps11 } from "@semcore/core";
|
|
17
18
|
import { assignProps as _assignProps10 } from "@semcore/core";
|
|
@@ -29,36 +30,38 @@ import React from 'react';
|
|
|
29
30
|
import cn from 'classnames';
|
|
30
31
|
import createComponent, { sstyled, Root } from '@semcore/core';
|
|
31
32
|
import Dropdown, { AbstractDropdown, selectedIndexContext, enhance } from '@semcore/dropdown';
|
|
32
|
-
import { Flex, useBox
|
|
33
|
+
import { Flex, useBox } from '@semcore/flex-box';
|
|
33
34
|
import ScrollAreaComponent, { hideScrollBarsFromScreenReadersContext } from '@semcore/scroll-area';
|
|
34
35
|
import { useUID } from '@semcore/utils/lib/uniqueID';
|
|
35
36
|
import { localizedMessages } from './translations/__intergalactic-dynamic-locales';
|
|
36
37
|
/*__reshadow-styles__:"./style/dropdown-menu.shadow.css"*/
|
|
37
|
-
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".
|
|
38
|
-
"__SDropdownMenuItemContainer": "
|
|
39
|
-
"_nesting-trigger": "__nesting-
|
|
40
|
-
"__SDropdownMenuNesting": "
|
|
41
|
-
"_size_l": "
|
|
42
|
-
"_size_m": "
|
|
43
|
-
"_highlighted": "
|
|
44
|
-
"__SDropdownNestingItem": "
|
|
45
|
-
"__SItemContent": "
|
|
46
|
-
"__SItemHint": "
|
|
47
|
-
"__SDropdownMenuList": "
|
|
48
|
-
"__SShadowHorizontal": "
|
|
49
|
-
"_position_median": "
|
|
50
|
-
"_position_start": "
|
|
51
|
-
"_position_end": "
|
|
52
|
-
"__SShadowVertical": "
|
|
53
|
-
"__SDropdownMenuItemAddon": "
|
|
38
|
+
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SDropdownMenuList_1ty9d_gg_{max-height:240px;padding:var(--intergalactic-spacing-1x, 4px)0;position:relative;min-height:26px;min-width:32px;box-sizing:content-box;z-index:0;color:var(--intergalactic-text-primary, #191b23)}.___SDropdownMenuList_1ty9d_gg_ .___SShadowHorizontal_1ty9d_gg_:after,.___SDropdownMenuList_1ty9d_gg_ .___SShadowHorizontal_1ty9d_gg_:before{width:16px;height:100%;border-radius:var(--intergalactic-control-rounded, 6px)}.___SDropdownMenuList_1ty9d_gg_ .___SShadowHorizontal_1ty9d_gg_._position_median_1ty9d_gg_:before{background:var(--intergalactic-scroll-area-dropdown-menu-left,\n linear-gradient(to right, rgba(255, 255, 255, 1) 34.38%, rgba(255, 255, 255, 0) 100%)\n )}.___SDropdownMenuList_1ty9d_gg_ .___SShadowHorizontal_1ty9d_gg_._position_median_1ty9d_gg_:after{background:var(--intergalactic-scroll-area-dropdown-menu-right,\n linear-gradient(to left, rgba(255, 255, 255, 1) 34.38%, rgba(255, 255, 255, 0) 100%)\n )}.___SDropdownMenuList_1ty9d_gg_ .___SShadowHorizontal_1ty9d_gg_._position_start_1ty9d_gg_:before{background:var(--intergalactic-scroll-area-dropdown-menu-left,\n linear-gradient(to right, rgba(255, 255, 255, 1) 34.38%, rgba(255, 255, 255, 0) 100%)\n )}.___SDropdownMenuList_1ty9d_gg_ .___SShadowHorizontal_1ty9d_gg_._position_end_1ty9d_gg_:after{background:var(--intergalactic-scroll-area-dropdown-menu-right,\n linear-gradient(to left, rgba(255, 255, 255, 1) 34.38%, rgba(255, 255, 255, 0) 100%)\n )}.___SDropdownMenuList_1ty9d_gg_ .___SShadowVertical_1ty9d_gg_:after,.___SDropdownMenuList_1ty9d_gg_ .___SShadowVertical_1ty9d_gg_:before{width:100%;height:16px;border-radius:var(--intergalactic-control-rounded, 6px)}.___SDropdownMenuList_1ty9d_gg_ .___SShadowVertical_1ty9d_gg_._position_median_1ty9d_gg_:before{background:var(--intergalactic-scroll-area-dropdown-menu-top,\n linear-gradient(to bottom, rgba(255, 255, 255, 1) 34.38%, rgba(255, 255, 255, 0) 100%)\n )}.___SDropdownMenuList_1ty9d_gg_ .___SShadowVertical_1ty9d_gg_._position_median_1ty9d_gg_:after{background:var(--intergalactic-scroll-area-dropdown-menu-bottom,\n linear-gradient(to top, rgba(255, 255, 255, 1) 34.38%, rgba(255, 255, 255, 0) 100%)\n )}.___SDropdownMenuList_1ty9d_gg_ .___SShadowVertical_1ty9d_gg_._position_start_1ty9d_gg_:before{background:var(--intergalactic-scroll-area-dropdown-menu-top,\n linear-gradient(to bottom, rgba(255, 255, 255, 1) 34.38%, rgba(255, 255, 255, 0) 100%)\n )}.___SDropdownMenuList_1ty9d_gg_ .___SShadowVertical_1ty9d_gg_._position_end_1ty9d_gg_:after{background:var(--intergalactic-scroll-area-dropdown-menu-bottom,\n linear-gradient(to top, rgba(255, 255, 255, 1) 34.38%, rgba(255, 255, 255, 0) 100%)\n )}.___SDropdownMenuItemContainer_1ty9d_gg_.__nesting-trigger_1ty9d_gg_{justify-content:space-between}.___SDropdownMenuItemAddon_1ty9d_gg_,.___SItemContentText_1ty9d_gg_{display:inline-flex;margin-left:var(--intergalactic-spacing-1x, 4px);margin-right:var(--intergalactic-spacing-1x, 4px)}.___SDropdownMenuItemAddon_1ty9d_gg_:first-child,.___SItemContentText_1ty9d_gg_:first-child{margin-left:0}.___SDropdownMenuItemAddon_1ty9d_gg_:last-child,.___SItemContentText_1ty9d_gg_:last-child{margin-right:0}.___SDropdownMenuNesting_1ty9d_gg_,.___SDropdownMenuNesting_1ty9d_gg_._size_l_1ty9d_gg_,.___SDropdownMenuNesting_1ty9d_gg_._size_m_1ty9d_gg_{padding:0}.___SDropdownMenuNesting_1ty9d_gg_.__highlighted_1ty9d_gg_{z-index:1;box-shadow:var(--intergalactic-keyboard-focus, 0px 0px 0px 3px rgba(0, 143, 248, 0.5)) inset}.___SDropdownNestingItem_1ty9d_gg_._size_l_1ty9d_gg_,.___SDropdownNestingItem_1ty9d_gg_._size_m_1ty9d_gg_{padding-right:0}.___SDropdownNestingItem_1ty9d_gg_ .___SDropdownMenuItemContainer_1ty9d_gg_{width:auto;padding-top:0;padding-bottom:0;padding-left:0;min-height:auto}.___SItemContent_1ty9d_gg_:focus{outline:0}.___SItemHint_1ty9d_gg_{color:var(--intergalactic-text-secondary, #6c6e79)}" /*__inner_css_end__*/, "1ty9d_gg_") /*__reshadow_css_end__*/, {
|
|
39
|
+
"__SDropdownMenuItemContainer": "___SDropdownMenuItemContainer_1ty9d_gg_",
|
|
40
|
+
"_nesting-trigger": "__nesting-trigger_1ty9d_gg_",
|
|
41
|
+
"__SDropdownMenuNesting": "___SDropdownMenuNesting_1ty9d_gg_",
|
|
42
|
+
"_size_l": "_size_l_1ty9d_gg_",
|
|
43
|
+
"_size_m": "_size_m_1ty9d_gg_",
|
|
44
|
+
"_highlighted": "__highlighted_1ty9d_gg_",
|
|
45
|
+
"__SDropdownNestingItem": "___SDropdownNestingItem_1ty9d_gg_",
|
|
46
|
+
"__SItemContent": "___SItemContent_1ty9d_gg_",
|
|
47
|
+
"__SItemHint": "___SItemHint_1ty9d_gg_",
|
|
48
|
+
"__SDropdownMenuList": "___SDropdownMenuList_1ty9d_gg_",
|
|
49
|
+
"__SShadowHorizontal": "___SShadowHorizontal_1ty9d_gg_",
|
|
50
|
+
"_position_median": "_position_median_1ty9d_gg_",
|
|
51
|
+
"_position_start": "_position_start_1ty9d_gg_",
|
|
52
|
+
"_position_end": "_position_end_1ty9d_gg_",
|
|
53
|
+
"__SShadowVertical": "___SShadowVertical_1ty9d_gg_",
|
|
54
|
+
"__SDropdownMenuItemAddon": "___SDropdownMenuItemAddon_1ty9d_gg_",
|
|
55
|
+
"__SItemContentText": "___SItemContentText_1ty9d_gg_"
|
|
54
56
|
});
|
|
55
57
|
import { useFocusSource } from '@semcore/utils/lib/enhances/keyboardFocusEnhance';
|
|
56
58
|
import { isAdvanceMode } from '@semcore/utils/lib/findComponent';
|
|
57
59
|
import { forkRef } from '@semcore/utils/lib/ref';
|
|
58
60
|
import { callAllEventHandlers } from '@semcore/utils/lib/assignProps';
|
|
59
61
|
import ButtonComponent from '@semcore/button';
|
|
60
|
-
|
|
61
|
-
|
|
62
|
+
import { Text } from '@semcore/typography';
|
|
63
|
+
var ListBoxContextProvider = function ListBoxContextProvider(_ref22) {
|
|
64
|
+
var children = _ref22.children;
|
|
62
65
|
return /*#__PURE__*/React.createElement(hideScrollBarsFromScreenReadersContext.Provider, {
|
|
63
66
|
value: true
|
|
64
67
|
}, children);
|
|
@@ -211,28 +214,28 @@ _defineProperty(DropdownMenuRoot, "defaultProps", {
|
|
|
211
214
|
placement: 'bottom-start',
|
|
212
215
|
timeout: 0
|
|
213
216
|
});
|
|
214
|
-
function List(
|
|
217
|
+
function List(_ref23) {
|
|
215
218
|
var _ref2 = arguments[0],
|
|
216
|
-
|
|
217
|
-
var styles =
|
|
218
|
-
Children =
|
|
219
|
+
_ref14;
|
|
220
|
+
var styles = _ref23.styles,
|
|
221
|
+
Children = _ref23.Children;
|
|
219
222
|
var SDropdownMenuList = ScrollAreaComponent;
|
|
220
|
-
return
|
|
223
|
+
return _ref14 = sstyled(styles), /*#__PURE__*/React.createElement(ListBoxContextProvider, _ref14.cn("ListBoxContextProvider", {}), /*#__PURE__*/React.createElement(SDropdownMenuList, _ref14.cn("SDropdownMenuList", _objectSpread({}, _assignProps2({
|
|
221
224
|
"shadow": true
|
|
222
225
|
}, _ref2))), /*#__PURE__*/React.createElement(ScrollAreaComponent.Container, {
|
|
223
226
|
tabIndex: undefined
|
|
224
|
-
}, /*#__PURE__*/React.createElement(Children,
|
|
227
|
+
}, /*#__PURE__*/React.createElement(Children, _ref14.cn("Children", {}))), /*#__PURE__*/React.createElement(ScrollAreaComponent.Bar, {
|
|
225
228
|
orientation: "horizontal"
|
|
226
229
|
}), /*#__PURE__*/React.createElement(ScrollAreaComponent.Bar, {
|
|
227
230
|
orientation: "vertical"
|
|
228
231
|
})));
|
|
229
232
|
}
|
|
230
|
-
function Actions(
|
|
233
|
+
function Actions(_ref24) {
|
|
231
234
|
var _ref3 = arguments[0],
|
|
232
|
-
|
|
233
|
-
var styles =
|
|
235
|
+
_ref15;
|
|
236
|
+
var styles = _ref24.styles;
|
|
234
237
|
var SDropdownMenuActions = Flex;
|
|
235
|
-
return
|
|
238
|
+
return _ref15 = sstyled(styles), /*#__PURE__*/React.createElement(SDropdownMenuActions, _ref15.cn("SDropdownMenuActions", _objectSpread({}, _assignProps3({}, _ref3))));
|
|
236
239
|
}
|
|
237
240
|
function Menu(props) {
|
|
238
241
|
var _ref4 = arguments[0];
|
|
@@ -256,15 +259,15 @@ function Menu(props) {
|
|
|
256
259
|
role: null
|
|
257
260
|
}), /*#__PURE__*/React.createElement(DropdownMenu.List, _assignProps4({}, _ref4))));
|
|
258
261
|
}
|
|
259
|
-
function Item(
|
|
262
|
+
function Item(_ref25) {
|
|
260
263
|
var _ref5 = arguments[0],
|
|
261
|
-
|
|
262
|
-
var id =
|
|
263
|
-
styles =
|
|
264
|
-
disabled =
|
|
265
|
-
Children =
|
|
266
|
-
forwardRef =
|
|
267
|
-
role =
|
|
264
|
+
_ref16;
|
|
265
|
+
var id = _ref25.id,
|
|
266
|
+
styles = _ref25.styles,
|
|
267
|
+
disabled = _ref25.disabled,
|
|
268
|
+
Children = _ref25.Children,
|
|
269
|
+
forwardRef = _ref25.forwardRef,
|
|
270
|
+
role = _ref25.role;
|
|
268
271
|
var SDropdownMenuItemContainer = Dropdown.Item;
|
|
269
272
|
var itemRef = React.useRef();
|
|
270
273
|
var _React$useState = React.useState(false),
|
|
@@ -319,15 +322,15 @@ function Item(_ref23) {
|
|
|
319
322
|
};
|
|
320
323
|
}, [itemRef.current]);
|
|
321
324
|
var focusSourceRef = useFocusSource();
|
|
322
|
-
return
|
|
325
|
+
return _ref16 = sstyled(styles), /*#__PURE__*/React.createElement(menuItemContext.Provider, {
|
|
323
326
|
value: menuItemContextValue
|
|
324
|
-
}, /*#__PURE__*/React.createElement(SDropdownMenuItemContainer,
|
|
327
|
+
}, /*#__PURE__*/React.createElement(SDropdownMenuItemContainer, _ref16.cn("SDropdownMenuItemContainer", _objectSpread({}, _assignProps5({
|
|
325
328
|
"ref": advancedMode ? undefined : menuItemContextValue.ref,
|
|
326
329
|
"use:highlighted": !disabled && highlighted && focusSourceRef.current === 'keyboard',
|
|
327
330
|
"use:role": advancedMode ? undefined : role,
|
|
328
331
|
"use:id": advancedMode ? undefined : id,
|
|
329
332
|
"tabIndex": advancedMode ? undefined : -1
|
|
330
|
-
}, _ref5))), /*#__PURE__*/React.createElement(Children,
|
|
333
|
+
}, _ref5))), /*#__PURE__*/React.createElement(Children, _ref16.cn("Children", {}))));
|
|
331
334
|
}
|
|
332
335
|
function Addon(props) {
|
|
333
336
|
var _useBox = useBox(props, props.forwardRef),
|
|
@@ -345,10 +348,10 @@ function Trigger() {
|
|
|
345
348
|
var _ref6 = arguments[0];
|
|
346
349
|
return /*#__PURE__*/React.createElement(Dropdown.Trigger, _assignProps6({}, _ref6));
|
|
347
350
|
}
|
|
348
|
-
function ItemContent(
|
|
351
|
+
function ItemContent(_ref26) {
|
|
349
352
|
var _ref7 = arguments[0],
|
|
350
|
-
|
|
351
|
-
var styles =
|
|
353
|
+
_ref17;
|
|
354
|
+
var styles = _ref26.styles;
|
|
352
355
|
var SItemContent = Flex;
|
|
353
356
|
var ref = React.useRef();
|
|
354
357
|
var menuItemCtxValue = React.useContext(menuItemContext);
|
|
@@ -370,7 +373,7 @@ function ItemContent(_ref24) {
|
|
|
370
373
|
});
|
|
371
374
|
}
|
|
372
375
|
}, [menuItemCtxValue.ariaDescribes]);
|
|
373
|
-
return
|
|
376
|
+
return _ref17 = sstyled(styles), /*#__PURE__*/React.createElement(SItemContent, _ref17.cn("SItemContent", _objectSpread({}, _assignProps7({
|
|
374
377
|
"role": menuItemCtxValue.role,
|
|
375
378
|
"id": menuItemCtxValue.contentId,
|
|
376
379
|
"tabIndex": -1,
|
|
@@ -378,68 +381,75 @@ function ItemContent(_ref24) {
|
|
|
378
381
|
"use:aria-describedby": _toConsumableArray(describedby).join(' '),
|
|
379
382
|
"aria-haspopup": menuItemCtxValue.hasSubMenu ? 'true' : undefined,
|
|
380
383
|
"aria-expanded": subMenu,
|
|
381
|
-
"alignItems":
|
|
384
|
+
"alignItems": 'center',
|
|
382
385
|
"justifyContent": menuItemCtxValue.hasSubMenu ? 'space-between' : undefined
|
|
383
386
|
}, _ref7))));
|
|
384
387
|
}
|
|
385
|
-
function
|
|
388
|
+
function ItemContentText(_ref27) {
|
|
386
389
|
var _ref8 = arguments[0],
|
|
387
|
-
|
|
388
|
-
var styles =
|
|
390
|
+
_ref18;
|
|
391
|
+
var styles = _ref27.styles;
|
|
392
|
+
var SItemContentText = Text;
|
|
393
|
+
return _ref18 = sstyled(styles), /*#__PURE__*/React.createElement(SItemContentText, _ref18.cn("SItemContentText", _objectSpread({}, _assignProps8({}, _ref8))));
|
|
394
|
+
}
|
|
395
|
+
function ItemHint(_ref28) {
|
|
396
|
+
var _ref9 = arguments[0],
|
|
397
|
+
_ref19;
|
|
398
|
+
var styles = _ref28.styles;
|
|
389
399
|
var SItemHint = Flex;
|
|
390
400
|
var _React$useContext = React.useContext(menuItemContext),
|
|
391
401
|
hintId = _React$useContext.hintId;
|
|
392
|
-
return
|
|
402
|
+
return _ref19 = sstyled(styles), /*#__PURE__*/React.createElement(SItemHint, _ref19.cn("SItemHint", _objectSpread({}, _assignProps9({
|
|
393
403
|
"id": hintId,
|
|
394
404
|
"aria-hidden": 'true'
|
|
395
|
-
},
|
|
405
|
+
}, _ref9))));
|
|
396
406
|
}
|
|
397
407
|
|
|
398
408
|
/**
|
|
399
409
|
* @deprecated Use Item hint
|
|
400
410
|
*/
|
|
401
411
|
function Hint(props) {
|
|
402
|
-
var
|
|
403
|
-
|
|
412
|
+
var _ref10 = arguments[0],
|
|
413
|
+
_ref20;
|
|
404
414
|
var SDropdownMenuItemContainer = Dropdown.Item;
|
|
405
|
-
return
|
|
415
|
+
return _ref20 = sstyled(props.styles), /*#__PURE__*/React.createElement(SDropdownMenuItemContainer, _ref20.cn("SDropdownMenuItemContainer", _objectSpread({}, _assignProps10({
|
|
406
416
|
"variant": 'hint'
|
|
407
|
-
},
|
|
417
|
+
}, _ref10))));
|
|
408
418
|
}
|
|
409
419
|
/**
|
|
410
420
|
* @deprecated Use Group with title prop
|
|
411
421
|
*/
|
|
412
422
|
function Title(props) {
|
|
413
|
-
var
|
|
414
|
-
|
|
423
|
+
var _ref11 = arguments[0],
|
|
424
|
+
_ref21;
|
|
415
425
|
var SDropdownMenuItemContainer = Dropdown.Item;
|
|
416
|
-
return
|
|
426
|
+
return _ref21 = sstyled(props.styles), /*#__PURE__*/React.createElement(SDropdownMenuItemContainer, _ref21.cn("SDropdownMenuItemContainer", _objectSpread({}, _assignProps11({
|
|
417
427
|
"variant": 'title'
|
|
418
|
-
},
|
|
428
|
+
}, _ref11))));
|
|
419
429
|
}
|
|
420
430
|
|
|
421
431
|
/**
|
|
422
432
|
* @deprecated
|
|
423
433
|
*/
|
|
424
|
-
function Nesting(
|
|
425
|
-
var
|
|
426
|
-
var forwardRef =
|
|
427
|
-
return /*#__PURE__*/React.createElement(DropdownMenu.Item,
|
|
434
|
+
function Nesting(_ref29) {
|
|
435
|
+
var _ref12 = arguments[0];
|
|
436
|
+
var forwardRef = _ref29.forwardRef;
|
|
437
|
+
return /*#__PURE__*/React.createElement(DropdownMenu.Item, _assignProps12({
|
|
428
438
|
"ref": forwardRef
|
|
429
|
-
},
|
|
439
|
+
}, _ref12));
|
|
430
440
|
}
|
|
431
441
|
|
|
432
442
|
/**
|
|
433
443
|
* @deprecated
|
|
434
444
|
*/
|
|
435
|
-
function NestingTrigger(
|
|
436
|
-
var
|
|
437
|
-
var forwardRef =
|
|
438
|
-
return /*#__PURE__*/React.createElement(DropdownMenu.Item.Content,
|
|
445
|
+
function NestingTrigger(_ref30) {
|
|
446
|
+
var _ref13 = arguments[0];
|
|
447
|
+
var forwardRef = _ref30.forwardRef;
|
|
448
|
+
return /*#__PURE__*/React.createElement(DropdownMenu.Item.Content, _assignProps13({
|
|
439
449
|
"tag": DropdownMenu.Trigger,
|
|
440
450
|
"ref": forwardRef,
|
|
441
451
|
"use:role": 'menuitem'
|
|
442
|
-
},
|
|
452
|
+
}, _ref13));
|
|
443
453
|
}
|
|
444
454
|
var DropdownMenu = createComponent(DropdownMenuRoot, {
|
|
445
455
|
Trigger: Trigger,
|
|
@@ -450,6 +460,7 @@ var DropdownMenu = createComponent(DropdownMenuRoot, {
|
|
|
450
460
|
Item: [Item, {
|
|
451
461
|
Addon: Addon,
|
|
452
462
|
Content: ItemContent,
|
|
463
|
+
Text: ItemContentText,
|
|
453
464
|
Hint: ItemHint
|
|
454
465
|
}],
|
|
455
466
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropdownMenu.js","names":["React","cn","createComponent","sstyled","Root","Dropdown","AbstractDropdown","selectedIndexContext","enhance","Flex","useBox","Box","ScrollAreaComponent","hideScrollBarsFromScreenReadersContext","useUID","localizedMessages","style","_sstyled","insert","useFocusSource","isAdvanceMode","forkRef","callAllEventHandlers","ButtonComponent","ListBoxContextProvider","_ref20","children","createElement","Provider","value","menuItemContext","createContext","DropdownMenuRoot","_AbstractDropdown","_inherits","_super","_createSuper","_this","_classCallCheck","_len","arguments","length","args","Array","_key","call","apply","concat","_defineProperty","_assertThisInitialized","_createClass","key","itemRef","props","index","node","_get","_getPrototypeOf","prototype","document","activeElement","getTriggerProps","_this$asProps","asProps","Children","uid","visible","hasMenu","DropdownMenu","Menu","displayName","ariaControls","_objectSpread","onKeyDown","handlePreventCommonKeyDown","bind","handleOpenKeyDown","handleKeyDownForMenu","undefined","getListProps","handleArrowKeyDown","getPopperProps","handlePreventPopperKeyDown","getActionsProps","getItemProps","_this2","highlightedIndex","isHighlighted","itemProps","tabIndex","ref","tag","_props$use","_props$theme","_props$size","use","theme","size","place","_this3","e","_this3$asProps","placement","inlineActions","show","startsWith","hide","isMenuItem","target","getAttribute","handlers","setTimeout","_this3$itemRefs$highl","itemRefs","focus","preventDefault","stopPropagation","_this3$triggerRef$cur","triggerRef","current","render","_ref","_this$asProps2","selectedIndex","interaction","timeout","_assignProps","Object","values","defaultVisible","defaultHighlightedIndex","defaultSelectedIndex","i18n","locale","List","_ref21","_ref2","arguments[0]","_ref13","styles","SDropdownMenuList","_assignProps2","Container","Bar","orientation","Actions","_ref22","_ref3","_ref14","SDropdownMenuActions","_assignProps3","_ref4","disablePortal","ignorePortalsStacking","disableEnforceFocus","autoFocus","animationsDisabled","popperProps","Popper","_extends","role","_assignProps4","Item","_ref23","_ref5","_ref15","id","disabled","forwardRef","SDropdownMenuItemContainer","useRef","_React$useState","useState","_React$useState2","_slicedToArray","highlighted","setHighlighted","menuItemContextValue","contentId","ariaDescribes","hasSubMenu","hasHint","Hint","advancedMode","Content","hintId","push","useEffect","onFocus","onBlur","addEventListener","capture","removeEventListener","focusSourceRef","_assignProps5","Addon","_useBox","_useBox2","SDropdownMenuItemAddon","_useBox2$","className","other","_objectWithoutProperties","_excluded","Trigger","_ref6","_assignProps6","ItemContent","_ref24","_ref7","_ref16","SItemContent","menuItemCtxValue","useContext","subMenu","_React$useState3","Set","_React$useState4","describedby","setDescribedby","element","parent","parentElement","prev","add","_assignProps7","_toConsumableArray","join","ItemHint","_ref25","_ref8","_ref17","SItemHint","_React$useContext","_assignProps8","_ref9","_ref18","_assignProps9","Title","_ref10","_ref19","_assignProps10","Nesting","_ref26","_ref11","_assignProps11","NestingTrigger","_ref27","_ref12","_assignProps12","ItemTitle","Group"],"sources":["../../src/DropdownMenu.jsx"],"sourcesContent":["import React from 'react';\nimport cn from 'classnames';\nimport createComponent, { sstyled, Root } from '@semcore/core';\nimport Dropdown, { AbstractDropdown, selectedIndexContext, enhance } from '@semcore/dropdown';\nimport { Flex, useBox, Box } from '@semcore/flex-box';\nimport ScrollAreaComponent, { hideScrollBarsFromScreenReadersContext } from '@semcore/scroll-area';\nimport { useUID } from '@semcore/utils/lib/uniqueID';\nimport { localizedMessages } from './translations/__intergalactic-dynamic-locales';\nimport style from './style/dropdown-menu.shadow.css';\nimport { useFocusSource } from '@semcore/utils/lib/enhances/keyboardFocusEnhance';\nimport { isAdvanceMode } from '@semcore/utils/lib/findComponent';\nimport { forkRef } from '@semcore/utils/lib/ref';\nimport { callAllEventHandlers } from '@semcore/utils/lib/assignProps';\nimport ButtonComponent from '@semcore/button';\n\nconst ListBoxContextProvider = ({ children }) => (\n <hideScrollBarsFromScreenReadersContext.Provider value={true}>\n {children}\n </hideScrollBarsFromScreenReadersContext.Provider>\n);\n\nconst menuItemContext = React.createContext({});\n\nclass DropdownMenuRoot extends AbstractDropdown {\n static displayName = 'DropdownMenu';\n static style = style;\n static enhance = Object.values(enhance);\n\n static defaultProps = {\n size: 'm',\n defaultVisible: false,\n defaultHighlightedIndex: 0,\n defaultSelectedIndex: 0,\n i18n: localizedMessages,\n locale: 'en',\n interaction: 'click',\n inlineActions: false,\n placement: 'bottom-start',\n timeout: 0,\n };\n\n role = 'menu';\n\n itemRef(props, index, node) {\n super.itemRef(props, index, node);\n\n if (node === document.activeElement) {\n super.scrollToNode(node);\n }\n }\n\n getTriggerProps() {\n const { Children, uid, visible } = this.asProps;\n const hasMenu = isAdvanceMode(Children, [DropdownMenu.Menu.displayName]);\n const ariaControls = hasMenu ? `igc-${uid}-list` : `igc-${uid}-popper`;\n\n return {\n ...super.getTriggerProps(),\n onKeyDown: callAllEventHandlers(\n this.handlePreventCommonKeyDown.bind(this),\n this.handleOpenKeyDown.bind(this),\n this.handleKeyDownForMenu('trigger'),\n ),\n 'aria-controls': visible ? ariaControls : undefined,\n 'aria-haspopup': hasMenu ? 'true' : 'dialog',\n };\n }\n\n getListProps() {\n return {\n ...super.getListProps(),\n onKeyDown: callAllEventHandlers(\n this.handlePreventCommonKeyDown.bind(this),\n this.handleKeyDownForMenu('list'),\n this.handleArrowKeyDown.bind(this),\n ),\n };\n }\n\n getPopperProps() {\n return {\n ...super.getPopperProps(),\n onKeyDown: callAllEventHandlers(\n this.handlePreventCommonKeyDown.bind(this),\n this.handlePreventPopperKeyDown.bind(this),\n // this.handleKeyDownForPopper.bind(this),\n ),\n };\n }\n\n getActionsProps() {\n return this.getListProps();\n }\n\n getItemProps(props, index) {\n const { highlightedIndex } = this.asProps;\n const isHighlighted = index === highlightedIndex;\n\n const itemProps = {\n ...super.getItemProps(props, index),\n tabIndex: isHighlighted ? 0 : -1,\n ref: (node) => this.itemRef(props, index, node),\n };\n\n if (props.tag === ButtonComponent) {\n itemProps.use = props.use ?? 'tertiary';\n itemProps.theme = props.theme ?? 'muted';\n itemProps.size = props.size ?? 's';\n }\n\n return itemProps;\n }\n\n handleKeyDownForMenu(place) {\n return (e) => {\n const { visible, placement, inlineActions } = this.asProps;\n\n const show =\n (e.key === 'ArrowRight' && placement?.startsWith('right')) ||\n (e.key === 'ArrowLeft' && placement?.startsWith('left'));\n const hide =\n (e.key === 'ArrowLeft' && placement?.startsWith('right')) ||\n (e.key === 'ArrowRight' && placement?.startsWith('left')) ||\n e.key === 'Escape';\n const isMenuItem = e.target.getAttribute('role') === super.childRole;\n\n if (place === 'trigger' && (!visible || inlineActions) && show && isMenuItem) {\n this.handlers.visible(true);\n this.handlers.highlightedIndex(0);\n setTimeout(() => {\n const { highlightedIndex } = this.asProps;\n this.itemRefs[highlightedIndex]?.focus();\n }, 0);\n\n e.preventDefault();\n e.stopPropagation();\n return false;\n }\n if (place === 'list' && visible && hide && isMenuItem) {\n if (\n !inlineActions ||\n (inlineActions && (e.key === 'Escape' || this.asProps.highlightedIndex === 0))\n ) {\n this.handlers.visible(false);\n this.triggerRef.current?.focus();\n\n e.preventDefault();\n e.stopPropagation();\n return false;\n }\n }\n };\n }\n\n render() {\n const { Children, selectedIndex, interaction, timeout } = this.asProps;\n\n this.itemProps = [];\n\n return (\n <selectedIndexContext.Provider value={selectedIndex}>\n <Root\n render={Dropdown}\n timeout={timeout || (interaction === 'hover' ? [0, 100] : undefined)}\n >\n <Children />\n </Root>\n </selectedIndexContext.Provider>\n );\n }\n}\n\nfunction List({ styles, Children }) {\n const SDropdownMenuList = Root;\n\n return sstyled(styles)(\n <ListBoxContextProvider>\n <SDropdownMenuList render={ScrollAreaComponent} shadow={true}>\n <ScrollAreaComponent.Container tabIndex={undefined}>\n <Children />\n </ScrollAreaComponent.Container>\n <ScrollAreaComponent.Bar orientation='horizontal' />\n <ScrollAreaComponent.Bar orientation='vertical' />\n </SDropdownMenuList>\n </ListBoxContextProvider>,\n );\n}\nfunction Actions({ styles }) {\n const SDropdownMenuActions = Root;\n\n return sstyled(styles)(<SDropdownMenuActions render={Flex} />);\n}\n\nfunction Menu(props) {\n const {\n visible,\n disablePortal,\n ignorePortalsStacking,\n disableEnforceFocus,\n interaction,\n autoFocus,\n animationsDisabled,\n } = props;\n const popperProps = {\n visible,\n disablePortal,\n ignorePortalsStacking,\n disableEnforceFocus,\n interaction,\n autoFocus,\n animationsDisabled,\n };\n return (\n <ListBoxContextProvider>\n <DropdownMenu.Popper {...popperProps} role={null}>\n <Root render={DropdownMenu.List} />\n </DropdownMenu.Popper>\n </ListBoxContextProvider>\n );\n}\n\nfunction Item({ id, styles, disabled, Children, forwardRef, role }) {\n const SDropdownMenuItemContainer = Root;\n const itemRef = React.useRef();\n\n const [highlighted, setHighlighted] = React.useState(false);\n\n const menuItemContextValue = {\n contentId: id,\n ref: forkRef(forwardRef, itemRef),\n role,\n };\n const ariaDescribes = [];\n\n const hasSubMenu = isAdvanceMode(Children, [DropdownMenu.displayName], true);\n const hasHint = isAdvanceMode(Children, [DropdownMenu.Item.Hint.displayName], true);\n const advancedMode =\n isAdvanceMode(Children, [DropdownMenu.Item.Content.displayName], true) || hasSubMenu || hasHint;\n\n if (hasHint) {\n const hintId = `igc-${useUID()}-option-hint`;\n\n menuItemContextValue.hintId = hintId;\n ariaDescribes.push(hintId);\n }\n\n if (hasSubMenu) {\n menuItemContextValue.hasSubMenu = true;\n }\n\n menuItemContextValue.ariaDescribes = ariaDescribes;\n\n React.useEffect(() => {\n const onFocus = (e) => {\n if (e.target === itemRef.current) {\n setHighlighted(true);\n\n if (hasSubMenu) {\n e.stopPropagation();\n }\n }\n };\n const onBlur = (e) => {\n if (e.target === itemRef.current) {\n setHighlighted(false);\n }\n };\n\n document.addEventListener('focus', onFocus, { capture: true });\n document.addEventListener('blur', onBlur, { capture: true });\n\n return () => {\n document.removeEventListener('focus', onFocus, { capture: true });\n document.removeEventListener('blur', onBlur, { capture: true });\n };\n }, [itemRef.current]);\n\n const focusSourceRef = useFocusSource();\n\n return sstyled(styles)(\n <menuItemContext.Provider value={menuItemContextValue}>\n <SDropdownMenuItemContainer\n render={Dropdown.Item}\n ref={advancedMode ? undefined : menuItemContextValue.ref}\n use:highlighted={!disabled && highlighted && focusSourceRef.current === 'keyboard'}\n use:role={advancedMode ? undefined : role}\n use:id={advancedMode ? undefined : id}\n tabIndex={advancedMode ? undefined : -1}\n >\n <Children />\n </SDropdownMenuItemContainer>\n </menuItemContext.Provider>,\n );\n}\n\nfunction Addon(props) {\n const [SDropdownMenuItemAddon, { className, ...other }] = useBox(props, props.forwardRef);\n const styles = sstyled(props.styles);\n return (\n <SDropdownMenuItemAddon\n className={cn(styles.cn('SDropdownMenuItemAddon', props).className, className) || undefined}\n {...other}\n />\n );\n}\n\nfunction Trigger() {\n return <Root render={Dropdown.Trigger} />;\n}\n\nfunction ItemContent({ styles }) {\n const SItemContent = Root;\n const ref = React.useRef();\n const menuItemCtxValue = React.useContext(menuItemContext);\n\n let subMenu = undefined;\n\n if (menuItemCtxValue.hasSubMenu) {\n subMenu = 'true';\n }\n\n const [describedby, setDescribedby] = React.useState(new Set(menuItemCtxValue.ariaDescribes));\n\n React.useEffect(() => {\n const element = ref.current;\n const parent = element?.parentElement;\n\n if (\n parent.getAttribute('aria-haspopup') === 'true' &&\n parent.getAttribute('aria-describedby')\n ) {\n setDescribedby((prev) => {\n prev.add(parent.getAttribute('aria-describedby'));\n\n return new Set(prev);\n });\n }\n }, [menuItemCtxValue.ariaDescribes]);\n\n return sstyled(styles)(\n <SItemContent\n render={Flex}\n role={menuItemCtxValue.role}\n id={menuItemCtxValue.contentId}\n tabIndex={-1}\n ref={forkRef(menuItemCtxValue.ref, ref)}\n use:aria-describedby={[...describedby].join(' ')}\n aria-haspopup={menuItemCtxValue.hasSubMenu ? 'true' : undefined}\n aria-expanded={subMenu}\n alignItems={menuItemCtxValue.hasSubMenu ? 'center' : undefined}\n justifyContent={menuItemCtxValue.hasSubMenu ? 'space-between' : undefined}\n />,\n );\n}\n\nfunction ItemHint({ styles }) {\n const SItemHint = Root;\n const { hintId } = React.useContext(menuItemContext);\n\n return sstyled(styles)(<SItemHint render={Flex} id={hintId} aria-hidden={'true'} />);\n}\n\n/**\n * @deprecated Use Item hint\n */\nfunction Hint(props) {\n const SDropdownMenuItemContainer = Root;\n return sstyled(props.styles)(\n <SDropdownMenuItemContainer render={Dropdown.Item} variant='hint' />,\n );\n}\n/**\n * @deprecated Use Group with title prop\n */\nfunction Title(props) {\n const SDropdownMenuItemContainer = Root;\n return sstyled(props.styles)(\n <SDropdownMenuItemContainer render={Dropdown.Item} variant='title' />,\n );\n}\n\n/**\n * @deprecated\n */\nfunction Nesting({ forwardRef }) {\n return <Root render={DropdownMenu.Item} ref={forwardRef} />;\n}\n\n/**\n * @deprecated\n */\nfunction NestingTrigger({ forwardRef }) {\n return (\n <Root\n render={DropdownMenu.Item.Content}\n tag={DropdownMenu.Trigger}\n ref={forwardRef}\n use:role={'menuitem'}\n />\n );\n}\n\nconst DropdownMenu = createComponent(\n DropdownMenuRoot,\n {\n Trigger,\n Popper: Dropdown.Popper,\n List,\n Actions,\n Menu,\n Item: [Item, { Addon, Content: ItemContent, Hint: ItemHint }],\n /**\n * @deprecated. Use just Item. See examples on\n */\n Nesting: [Nesting, { Trigger: NestingTrigger, Addon }],\n ItemTitle: Title,\n ItemHint: Hint,\n Group: Dropdown.Group,\n },\n {\n par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CAAC8F,IAAI,EAAAmF,cAAA;IAAA,OAAO7E;EAAU,GAAA4E,MAAA,EAAI;AAC7D;;AAEA;AACA;AACA;AACA,SAASE,cAAcA,CAAAC,MAAA,EAAiB;EAAA,IAAAC,MAAA,GAAA/G,YAAA;EAAA,IAAd+B,UAAU,GAAA+E,MAAA,CAAV/E,UAAU;EAClC,oBACExK,KAAA,CAAA2B,aAAA,CACUyC,YAAY,CAAC8F,IAAI,CAACsB,OAAO,EAAAiE,cAAA;IAAA,OAC5BrL,YAAY,CAACwI,OAAO;IAAA,OACpBpC,UAAU;IAAA,YACL;EAAU,GAAAgF,MAAA,EACpB;AAEN;AAEA,IAAMpL,YAAY,GAAGlE,eAAe,CAClC8B,gBAAgB,EAChB;EACE4K,OAAO,EAAPA,OAAO;EACP9C,MAAM,EAAEzJ,QAAQ,CAACyJ,MAAM;EACvBxB,IAAI,EAAJA,IAAI;EACJW,OAAO,EAAPA,OAAO;EACP5E,IAAI,EAAJA,IAAI;EACJ6F,IAAI,EAAE,CAACA,IAAI,EAAE;IAAEiC,KAAK,EAALA,KAAK;IAAEX,OAAO,EAAEuB,WAAW;IAAEzB,IAAI,EAAE8C;EAAS,CAAC,CAAC;EAC7D;AACJ;AACA;EACIc,OAAO,EAAE,CAACA,OAAO,EAAE;IAAEtC,OAAO,EAAE0C,cAAc;IAAEnD,KAAK,EAALA;EAAM,CAAC,CAAC;EACtDuD,SAAS,EAAEZ,KAAK;EAChBV,QAAQ,EAAE9C,IAAI;EACdqE,KAAK,EAAEtP,QAAQ,CAACsP;AAClB,CAAC,EACD;EACE9B,MAAM,EAAE,CAACxN,QAAQ;AACnB,CAAC,CACF;AAED+D,YAAY,CAAC7D,oBAAoB,GAAGA,oBAAoB;AAExD,eAAe6D,YAAY"}
|
|
1
|
+
{"version":3,"file":"DropdownMenu.js","names":["React","cn","createComponent","sstyled","Root","Dropdown","AbstractDropdown","selectedIndexContext","enhance","Flex","useBox","ScrollAreaComponent","hideScrollBarsFromScreenReadersContext","useUID","localizedMessages","style","_sstyled","insert","useFocusSource","isAdvanceMode","forkRef","callAllEventHandlers","ButtonComponent","Text","ListBoxContextProvider","_ref22","children","createElement","Provider","value","menuItemContext","createContext","DropdownMenuRoot","_AbstractDropdown","_inherits","_super","_createSuper","_this","_classCallCheck","_len","arguments","length","args","Array","_key","call","apply","concat","_defineProperty","_assertThisInitialized","_createClass","key","itemRef","props","index","node","_get","_getPrototypeOf","prototype","document","activeElement","getTriggerProps","_this$asProps","asProps","Children","uid","visible","hasMenu","DropdownMenu","Menu","displayName","ariaControls","_objectSpread","onKeyDown","handlePreventCommonKeyDown","bind","handleOpenKeyDown","handleKeyDownForMenu","undefined","getListProps","handleArrowKeyDown","getPopperProps","handlePreventPopperKeyDown","getActionsProps","getItemProps","_this2","highlightedIndex","isHighlighted","itemProps","tabIndex","ref","tag","_props$use","_props$theme","_props$size","use","theme","size","place","_this3","e","_this3$asProps","placement","inlineActions","show","startsWith","hide","isMenuItem","target","getAttribute","handlers","setTimeout","_this3$itemRefs$highl","itemRefs","focus","preventDefault","stopPropagation","_this3$triggerRef$cur","triggerRef","current","render","_ref","_this$asProps2","selectedIndex","interaction","timeout","_assignProps","Object","values","defaultVisible","defaultHighlightedIndex","defaultSelectedIndex","i18n","locale","List","_ref23","_ref2","arguments[0]","_ref14","styles","SDropdownMenuList","_assignProps2","Container","Bar","orientation","Actions","_ref24","_ref3","_ref15","SDropdownMenuActions","_assignProps3","_ref4","disablePortal","ignorePortalsStacking","disableEnforceFocus","autoFocus","animationsDisabled","popperProps","Popper","_extends","role","_assignProps4","Item","_ref25","_ref5","_ref16","id","disabled","forwardRef","SDropdownMenuItemContainer","useRef","_React$useState","useState","_React$useState2","_slicedToArray","highlighted","setHighlighted","menuItemContextValue","contentId","ariaDescribes","hasSubMenu","hasHint","Hint","advancedMode","Content","hintId","push","useEffect","onFocus","onBlur","addEventListener","capture","removeEventListener","focusSourceRef","_assignProps5","Addon","_useBox","_useBox2","SDropdownMenuItemAddon","_useBox2$","className","other","_objectWithoutProperties","_excluded","Trigger","_ref6","_assignProps6","ItemContent","_ref26","_ref7","_ref17","SItemContent","menuItemCtxValue","useContext","subMenu","_React$useState3","Set","_React$useState4","describedby","setDescribedby","element","parent","parentElement","prev","add","_assignProps7","_toConsumableArray","join","ItemContentText","_ref27","_ref8","_ref18","SItemContentText","_assignProps8","ItemHint","_ref28","_ref9","_ref19","SItemHint","_React$useContext","_assignProps9","_ref10","_ref20","_assignProps10","Title","_ref11","_ref21","_assignProps11","Nesting","_ref29","_ref12","_assignProps12","NestingTrigger","_ref30","_ref13","_assignProps13","ItemTitle","Group"],"sources":["../../src/DropdownMenu.jsx"],"sourcesContent":["import React from 'react';\nimport cn from 'classnames';\nimport createComponent, { sstyled, Root } from '@semcore/core';\nimport Dropdown, { AbstractDropdown, selectedIndexContext, enhance } from '@semcore/dropdown';\nimport { Flex, useBox } from '@semcore/flex-box';\nimport ScrollAreaComponent, { hideScrollBarsFromScreenReadersContext } from '@semcore/scroll-area';\nimport { useUID } from '@semcore/utils/lib/uniqueID';\nimport { localizedMessages } from './translations/__intergalactic-dynamic-locales';\nimport style from './style/dropdown-menu.shadow.css';\nimport { useFocusSource } from '@semcore/utils/lib/enhances/keyboardFocusEnhance';\nimport { isAdvanceMode } from '@semcore/utils/lib/findComponent';\nimport { forkRef } from '@semcore/utils/lib/ref';\nimport { callAllEventHandlers } from '@semcore/utils/lib/assignProps';\nimport ButtonComponent from '@semcore/button';\nimport { Text } from '@semcore/typography';\n\nconst ListBoxContextProvider = ({ children }) => (\n <hideScrollBarsFromScreenReadersContext.Provider value={true}>\n {children}\n </hideScrollBarsFromScreenReadersContext.Provider>\n);\n\nconst menuItemContext = React.createContext({});\n\nclass DropdownMenuRoot extends AbstractDropdown {\n static displayName = 'DropdownMenu';\n static style = style;\n static enhance = Object.values(enhance);\n\n static defaultProps = {\n size: 'm',\n defaultVisible: false,\n defaultHighlightedIndex: 0,\n defaultSelectedIndex: 0,\n i18n: localizedMessages,\n locale: 'en',\n interaction: 'click',\n inlineActions: false,\n placement: 'bottom-start',\n timeout: 0,\n };\n\n role = 'menu';\n\n itemRef(props, index, node) {\n super.itemRef(props, index, node);\n\n if (node === document.activeElement) {\n super.scrollToNode(node);\n }\n }\n\n getTriggerProps() {\n const { Children, uid, visible } = this.asProps;\n const hasMenu = isAdvanceMode(Children, [DropdownMenu.Menu.displayName]);\n const ariaControls = hasMenu ? `igc-${uid}-list` : `igc-${uid}-popper`;\n\n return {\n ...super.getTriggerProps(),\n onKeyDown: callAllEventHandlers(\n this.handlePreventCommonKeyDown.bind(this),\n this.handleOpenKeyDown.bind(this),\n this.handleKeyDownForMenu('trigger'),\n ),\n 'aria-controls': visible ? ariaControls : undefined,\n 'aria-haspopup': hasMenu ? 'true' : 'dialog',\n };\n }\n\n getListProps() {\n return {\n ...super.getListProps(),\n onKeyDown: callAllEventHandlers(\n this.handlePreventCommonKeyDown.bind(this),\n this.handleKeyDownForMenu('list'),\n this.handleArrowKeyDown.bind(this),\n ),\n };\n }\n\n getPopperProps() {\n return {\n ...super.getPopperProps(),\n onKeyDown: callAllEventHandlers(\n this.handlePreventCommonKeyDown.bind(this),\n this.handlePreventPopperKeyDown.bind(this),\n // this.handleKeyDownForPopper.bind(this),\n ),\n };\n }\n\n getActionsProps() {\n return this.getListProps();\n }\n\n getItemProps(props, index) {\n const { highlightedIndex } = this.asProps;\n const isHighlighted = index === highlightedIndex;\n\n const itemProps = {\n ...super.getItemProps(props, index),\n tabIndex: isHighlighted ? 0 : -1,\n ref: (node) => this.itemRef(props, index, node),\n };\n\n if (props.tag === ButtonComponent) {\n itemProps.use = props.use ?? 'tertiary';\n itemProps.theme = props.theme ?? 'muted';\n itemProps.size = props.size ?? 's';\n }\n\n return itemProps;\n }\n\n handleKeyDownForMenu(place) {\n return (e) => {\n const { visible, placement, inlineActions } = this.asProps;\n\n const show =\n (e.key === 'ArrowRight' && placement?.startsWith('right')) ||\n (e.key === 'ArrowLeft' && placement?.startsWith('left'));\n const hide =\n (e.key === 'ArrowLeft' && placement?.startsWith('right')) ||\n (e.key === 'ArrowRight' && placement?.startsWith('left')) ||\n e.key === 'Escape';\n const isMenuItem = e.target.getAttribute('role') === super.childRole;\n\n if (place === 'trigger' && (!visible || inlineActions) && show && isMenuItem) {\n this.handlers.visible(true);\n this.handlers.highlightedIndex(0);\n setTimeout(() => {\n const { highlightedIndex } = this.asProps;\n this.itemRefs[highlightedIndex]?.focus();\n }, 0);\n\n e.preventDefault();\n e.stopPropagation();\n return false;\n }\n if (place === 'list' && visible && hide && isMenuItem) {\n if (\n !inlineActions ||\n (inlineActions && (e.key === 'Escape' || this.asProps.highlightedIndex === 0))\n ) {\n this.handlers.visible(false);\n this.triggerRef.current?.focus();\n\n e.preventDefault();\n e.stopPropagation();\n return false;\n }\n }\n };\n }\n\n render() {\n const { Children, selectedIndex, interaction, timeout } = this.asProps;\n\n this.itemProps = [];\n\n return (\n <selectedIndexContext.Provider value={selectedIndex}>\n <Root\n render={Dropdown}\n timeout={timeout || (interaction === 'hover' ? [0, 100] : undefined)}\n >\n <Children />\n </Root>\n </selectedIndexContext.Provider>\n );\n }\n}\n\nfunction List({ styles, Children }) {\n const SDropdownMenuList = Root;\n\n return sstyled(styles)(\n <ListBoxContextProvider>\n <SDropdownMenuList render={ScrollAreaComponent} shadow={true}>\n <ScrollAreaComponent.Container tabIndex={undefined}>\n <Children />\n </ScrollAreaComponent.Container>\n <ScrollAreaComponent.Bar orientation='horizontal' />\n <ScrollAreaComponent.Bar orientation='vertical' />\n </SDropdownMenuList>\n </ListBoxContextProvider>,\n );\n}\nfunction Actions({ styles }) {\n const SDropdownMenuActions = Root;\n\n return sstyled(styles)(<SDropdownMenuActions render={Flex} />);\n}\n\nfunction Menu(props) {\n const {\n visible,\n disablePortal,\n ignorePortalsStacking,\n disableEnforceFocus,\n interaction,\n autoFocus,\n animationsDisabled,\n } = props;\n const popperProps = {\n visible,\n disablePortal,\n ignorePortalsStacking,\n disableEnforceFocus,\n interaction,\n autoFocus,\n animationsDisabled,\n };\n return (\n <ListBoxContextProvider>\n <DropdownMenu.Popper {...popperProps} role={null}>\n <Root render={DropdownMenu.List} />\n </DropdownMenu.Popper>\n </ListBoxContextProvider>\n );\n}\n\nfunction Item({ id, styles, disabled, Children, forwardRef, role }) {\n const SDropdownMenuItemContainer = Root;\n const itemRef = React.useRef();\n\n const [highlighted, setHighlighted] = React.useState(false);\n\n const menuItemContextValue = {\n contentId: id,\n ref: forkRef(forwardRef, itemRef),\n role,\n };\n const ariaDescribes = [];\n\n const hasSubMenu = isAdvanceMode(Children, [DropdownMenu.displayName], true);\n const hasHint = isAdvanceMode(Children, [DropdownMenu.Item.Hint.displayName], true);\n const advancedMode =\n isAdvanceMode(Children, [DropdownMenu.Item.Content.displayName], true) || hasSubMenu || hasHint;\n\n if (hasHint) {\n const hintId = `igc-${useUID()}-option-hint`;\n\n menuItemContextValue.hintId = hintId;\n ariaDescribes.push(hintId);\n }\n\n if (hasSubMenu) {\n menuItemContextValue.hasSubMenu = true;\n }\n\n menuItemContextValue.ariaDescribes = ariaDescribes;\n\n React.useEffect(() => {\n const onFocus = (e) => {\n if (e.target === itemRef.current) {\n setHighlighted(true);\n\n if (hasSubMenu) {\n e.stopPropagation();\n }\n }\n };\n const onBlur = (e) => {\n if (e.target === itemRef.current) {\n setHighlighted(false);\n }\n };\n\n document.addEventListener('focus', onFocus, { capture: true });\n document.addEventListener('blur', onBlur, { capture: true });\n\n return () => {\n document.removeEventListener('focus', onFocus, { capture: true });\n document.removeEventListener('blur', onBlur, { capture: true });\n };\n }, [itemRef.current]);\n\n const focusSourceRef = useFocusSource();\n\n return sstyled(styles)(\n <menuItemContext.Provider value={menuItemContextValue}>\n <SDropdownMenuItemContainer\n render={Dropdown.Item}\n ref={advancedMode ? undefined : menuItemContextValue.ref}\n use:highlighted={!disabled && highlighted && focusSourceRef.current === 'keyboard'}\n use:role={advancedMode ? undefined : role}\n use:id={advancedMode ? undefined : id}\n tabIndex={advancedMode ? undefined : -1}\n >\n <Children />\n </SDropdownMenuItemContainer>\n </menuItemContext.Provider>,\n );\n}\n\nfunction Addon(props) {\n const [SDropdownMenuItemAddon, { className, ...other }] = useBox(props, props.forwardRef);\n const styles = sstyled(props.styles);\n return (\n <SDropdownMenuItemAddon\n className={cn(styles.cn('SDropdownMenuItemAddon', props).className, className) || undefined}\n {...other}\n />\n );\n}\n\nfunction Trigger() {\n return <Root render={Dropdown.Trigger} />;\n}\n\nfunction ItemContent({ styles }) {\n const SItemContent = Root;\n const ref = React.useRef();\n const menuItemCtxValue = React.useContext(menuItemContext);\n\n let subMenu = undefined;\n\n if (menuItemCtxValue.hasSubMenu) {\n subMenu = 'true';\n }\n\n const [describedby, setDescribedby] = React.useState(new Set(menuItemCtxValue.ariaDescribes));\n\n React.useEffect(() => {\n const element = ref.current;\n const parent = element?.parentElement;\n\n if (\n parent.getAttribute('aria-haspopup') === 'true' &&\n parent.getAttribute('aria-describedby')\n ) {\n setDescribedby((prev) => {\n prev.add(parent.getAttribute('aria-describedby'));\n\n return new Set(prev);\n });\n }\n }, [menuItemCtxValue.ariaDescribes]);\n\n return sstyled(styles)(\n <SItemContent\n render={Flex}\n role={menuItemCtxValue.role}\n id={menuItemCtxValue.contentId}\n tabIndex={-1}\n ref={forkRef(menuItemCtxValue.ref, ref)}\n use:aria-describedby={[...describedby].join(' ')}\n aria-haspopup={menuItemCtxValue.hasSubMenu ? 'true' : undefined}\n aria-expanded={subMenu}\n alignItems='center'\n justifyContent={menuItemCtxValue.hasSubMenu ? 'space-between' : undefined}\n />,\n );\n}\n\nfunction ItemContentText({ styles }) {\n const SItemContentText = Root;\n return sstyled(styles)(<SItemContentText render={Text} />);\n}\n\nfunction ItemHint({ styles }) {\n const SItemHint = Root;\n const { hintId } = React.useContext(menuItemContext);\n\n return sstyled(styles)(<SItemHint render={Flex} id={hintId} aria-hidden={'true'} />);\n}\n\n/**\n * @deprecated Use Item hint\n */\nfunction Hint(props) {\n const SDropdownMenuItemContainer = Root;\n return sstyled(props.styles)(\n <SDropdownMenuItemContainer render={Dropdown.Item} variant='hint' />,\n );\n}\n/**\n * @deprecated Use Group with title prop\n */\nfunction Title(props) {\n const SDropdownMenuItemContainer = Root;\n return sstyled(props.styles)(\n <SDropdownMenuItemContainer render={Dropdown.Item} variant='title' />,\n );\n}\n\n/**\n * @deprecated\n */\nfunction Nesting({ forwardRef }) {\n return <Root render={DropdownMenu.Item} ref={forwardRef} />;\n}\n\n/**\n * @deprecated\n */\nfunction NestingTrigger({ forwardRef }) {\n return (\n <Root\n render={DropdownMenu.Item.Content}\n tag={DropdownMenu.Trigger}\n ref={forwardRef}\n use:role={'menuitem'}\n />\n );\n}\n\nconst DropdownMenu = createComponent(\n DropdownMenuRoot,\n {\n Trigger,\n Popper: Dropdown.Popper,\n List,\n Actions,\n Menu,\n Item: [Item, { Addon, Content: ItemContent, Text: ItemContentText, Hint: ItemHint }],\n /**\n * @deprecated. Use just Item. See examples on\n */\n Nesting: [Nesting, { Trigger: NestingTrigger, Addon }],\n ItemTitle: Title,\n ItemHint: Hint,\n Group: Dropdown.Group,\n },\n {\n parent: [Dropdown],\n },\n);\n\nDropdownMenu.selectedIndexContext = selectedIndexContext;\n\nexport default DropdownMenu;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,EAAE,MAAM,YAAY;AAC3B,OAAOC,eAAe,IAAIC,OAAO,EAAEC,IAAI,QAAQ,eAAe;AAC9D,OAAOC,QAAQ,IAAIC,gBAAgB,EAAEC,oBAAoB,EAAEC,OAAO,QAAQ,mBAAmB;AAC7F,SAASC,IAAI,EAAEC,MAAM,QAAQ,mBAAmB;AAChD,OAAOC,mBAAmB,IAAIC,sCAAsC,QAAQ,sBAAsB;AAClG,SAASC,MAAM,QAAQ,6BAA6B;AACpD,SAASC,iBAAiB,QAAQ,gDAAgD;AAAC;AAAA,IAAAC,KAAA,+BAAAC,QAAA,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GAAAqF,MAAA,CAAVrF,UAAU;EAClC,oBACExK,KAAA,CAAA2B,aAAA,CACUyC,YAAY,CAAC8F,IAAI,CAACsB,OAAO,EAAAuE,cAAA;IAAA,OAC5B3L,YAAY,CAACwI,OAAO;IAAA,OACpBpC,UAAU;IAAA,YACL;EAAU,GAAAsF,MAAA,EACpB;AAEN;AAEA,IAAM1L,YAAY,GAAGlE,eAAe,CAClC8B,gBAAgB,EAChB;EACE4K,OAAO,EAAPA,OAAO;EACP9C,MAAM,EAAEzJ,QAAQ,CAACyJ,MAAM;EACvBxB,IAAI,EAAJA,IAAI;EACJW,OAAO,EAAPA,OAAO;EACP5E,IAAI,EAAJA,IAAI;EACJ6F,IAAI,EAAE,CAACA,IAAI,EAAE;IAAEiC,KAAK,EAALA,KAAK;IAAEX,OAAO,EAAEuB,WAAW;IAAExL,IAAI,EAAE6M,eAAe;IAAE9C,IAAI,EAAEoD;EAAS,CAAC,CAAC;EACpF;AACJ;AACA;EACIc,OAAO,EAAE,CAACA,OAAO,EAAE;IAAE5C,OAAO,EAAEgD,cAAc;IAAEzD,KAAK,EAALA;EAAM,CAAC,CAAC;EACtD6D,SAAS,EAAEZ,KAAK;EAChBV,QAAQ,EAAEpD,IAAI;EACd2E,KAAK,EAAE5P,QAAQ,CAAC4P;AAClB,CAAC,EACD;EACEpC,MAAM,EAAE,CAACxN,QAAQ;AACnB,CAAC,CACF;AAED+D,YAAY,CAAC7D,oBAAoB,GAAGA,oBAAoB;AAExD,eAAe6D,YAAY"}
|
package/lib/es6/index.d.js.map
CHANGED
|
@@ -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, Flex } 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 | null;\n /**\n * Index of the selected item\n */\n highlightedIndex?: number | null;\n /**\n * Callback for highlightedIndex change\n * highlightedIndex - Index of the selected item\n */\n onHighlightedIndexChange?: (highlightedIndex: number | null) => void;\n locale?: string;\n /**\n * Flag for menu that using as actions on DropdownMenu.Item\n */\n inlineActions?: boolean;\n};\n\n/** @deprecated */\nexport interface IDropdownMenuListProps extends DropdownMenuListProps, UnknownProperties {}\nexport type DropdownMenuListProps = BoxProps &\n ScrollAreaProps & {\n /**\n * Size of the menu\n * @default m\n */\n size?: DropdownMenuSize;\n };\n\n/** @deprecated */\nexport interface IDropdownMenuMenuProps extends DropdownMenuMenuProps, UnknownProperties {}\nexport type DropdownMenuMenuProps = DropdownMenuListProps & {};\n\n/** @deprecated */\nexport interface IDropdownMenuItemProps extends DropdownMenuItemProps, UnknownProperties {}\nexport type DropdownMenuItemProps = FlexProps & {\n /**\n * Enables selected state\n * @deprecated Dropdown menu item can't have that 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 Actions: Intergalactic.Component<\n typeof Flex,\n DropdownMenuListProps,\n DropdownMenuContext,\n [handlers: DropdownMenuHandlers]\n >;\n Menu: Intergalactic.Component<\n 'div',\n DropdownMenuMenuProps,\n DropdownMenuContext,\n [handlers: DropdownMenuHandlers]\n >;\n Item: Intergalactic.Component<\n typeof Dropdown.Item,\n DropdownMenuItemProps,\n DropdownMenuContext,\n [handlers: DropdownMenuHandlers]\n > & {\n Addon: typeof Box;\n Content: typeof Flex;\n Hint: typeof Flex;\n };\n /**\n * @deprecated Use Group with title prop\n */\n ItemTitle: Intergalactic.Component<'div', DropdownMenuItemTitleProps>;\n /**\n * @deprecated Use prop subTitle on Group or Item component\n */\n ItemHint: Intergalactic.Component<'div', DropdownMenuItemHintProps>;\n Group: typeof Dropdown.Group;\n /**\n * @deprecated Use Item instead of Nesting\n */\n Nesting: Intergalactic.Component<\n 'div',\n DropdownMenuItemProps,\n DropdownMenuContext,\n [handlers: DropdownMenuHandlers]\n > & {\n /**\n * @deprecated Use Item instead of Nesting\n */\n Trigger: Intergalactic.Component<'div', DropdownMenuItemProps>;\n /**\n * @deprecated Use Item instead of Nesting\n */\n Item: Intergalactic.Component<'div', DropdownMenuItemProps>;\n /**\n * @deprecated Use Item instead of Nesting\n */\n Addon: typeof Box;\n };\n\n selectedIndexContext: React.Context<number>;\n};\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, Flex } from '@semcore/flex-box';\nimport { ScrollAreaProps } from '@semcore/scroll-area';\nimport { Text } from '@semcore/typography';\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 | null;\n /**\n * Index of the selected item\n */\n highlightedIndex?: number | null;\n /**\n * Callback for highlightedIndex change\n * highlightedIndex - Index of the selected item\n */\n onHighlightedIndexChange?: (highlightedIndex: number | null) => void;\n locale?: string;\n /**\n * Flag for menu that using as actions on DropdownMenu.Item\n */\n inlineActions?: boolean;\n};\n\n/** @deprecated */\nexport interface IDropdownMenuListProps extends DropdownMenuListProps, UnknownProperties {}\nexport type DropdownMenuListProps = BoxProps &\n ScrollAreaProps & {\n /**\n * Size of the menu\n * @default m\n */\n size?: DropdownMenuSize;\n };\n\n/** @deprecated */\nexport interface IDropdownMenuMenuProps extends DropdownMenuMenuProps, UnknownProperties {}\nexport type DropdownMenuMenuProps = DropdownMenuListProps & {};\n\n/** @deprecated */\nexport interface IDropdownMenuItemProps extends DropdownMenuItemProps, UnknownProperties {}\nexport type DropdownMenuItemProps = FlexProps & {\n /**\n * Enables selected state\n * @deprecated Dropdown menu item can't have that 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 Actions: Intergalactic.Component<\n typeof Flex,\n DropdownMenuListProps,\n DropdownMenuContext,\n [handlers: DropdownMenuHandlers]\n >;\n Menu: Intergalactic.Component<\n 'div',\n DropdownMenuMenuProps,\n DropdownMenuContext,\n [handlers: DropdownMenuHandlers]\n >;\n Item: Intergalactic.Component<\n typeof Dropdown.Item,\n DropdownMenuItemProps,\n DropdownMenuContext,\n [handlers: DropdownMenuHandlers]\n > & {\n Addon: typeof Box;\n Content: typeof Flex;\n Text: typeof Text;\n Hint: typeof Flex;\n };\n /**\n * @deprecated Use Group with title prop\n */\n ItemTitle: Intergalactic.Component<'div', DropdownMenuItemTitleProps>;\n /**\n * @deprecated Use prop subTitle on Group or Item component\n */\n ItemHint: Intergalactic.Component<'div', DropdownMenuItemHintProps>;\n Group: typeof Dropdown.Group;\n /**\n * @deprecated Use Item instead of Nesting\n */\n Nesting: Intergalactic.Component<\n 'div',\n DropdownMenuItemProps,\n DropdownMenuContext,\n [handlers: DropdownMenuHandlers]\n > & {\n /**\n * @deprecated Use Item instead of Nesting\n */\n Trigger: Intergalactic.Component<'div', DropdownMenuItemProps>;\n /**\n * @deprecated Use Item instead of Nesting\n */\n Item: Intergalactic.Component<'div', DropdownMenuItemProps>;\n /**\n * @deprecated Use Item instead of Nesting\n */\n Addon: typeof Box;\n };\n\n selectedIndexContext: React.Context<number>;\n};\n\nexport default DropdownMenu;\n"],"mappings":""}
|
|
@@ -99,10 +99,10 @@ SDropdownMenuItemContainer[nesting-trigger] {
|
|
|
99
99
|
justify-content: space-between;
|
|
100
100
|
}
|
|
101
101
|
|
|
102
|
-
SDropdownMenuItemAddon {
|
|
102
|
+
SDropdownMenuItemAddon, SItemContentText {
|
|
103
103
|
display: inline-flex;
|
|
104
|
-
margin-left: var(--intergalactic-spacing-
|
|
105
|
-
margin-right: var(--intergalactic-spacing-
|
|
104
|
+
margin-left: var(--intergalactic-spacing-1x, 4px);
|
|
105
|
+
margin-right: var(--intergalactic-spacing-1x, 4px);
|
|
106
106
|
|
|
107
107
|
&:first-child {
|
|
108
108
|
margin-left: 0;
|
package/lib/types/index.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ import Dropdown, {
|
|
|
7
7
|
} from '@semcore/dropdown';
|
|
8
8
|
import { Box, BoxProps, FlexProps, Flex } from '@semcore/flex-box';
|
|
9
9
|
import { ScrollAreaProps } from '@semcore/scroll-area';
|
|
10
|
+
import { Text } from '@semcore/typography';
|
|
10
11
|
|
|
11
12
|
export type DropdownMenuSize = 'm' | 'l';
|
|
12
13
|
|
|
@@ -155,6 +156,7 @@ declare const DropdownMenu: Intergalactic.Component<
|
|
|
155
156
|
> & {
|
|
156
157
|
Addon: typeof Box;
|
|
157
158
|
Content: typeof Flex;
|
|
159
|
+
Text: typeof Text;
|
|
158
160
|
Hint: typeof Flex;
|
|
159
161
|
};
|
|
160
162
|
/**
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@semcore/dropdown-menu",
|
|
3
3
|
"description": "Semrush DropdownMenu Component",
|
|
4
|
-
"version": "4.
|
|
4
|
+
"version": "4.42.0",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/es6/index.js",
|
|
7
7
|
"typings": "lib/types/index.d.ts",
|
|
@@ -9,11 +9,12 @@
|
|
|
9
9
|
"author": "UI-kit team <ui-kit-team@semrush.com>",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@semcore/dropdown": "4.
|
|
13
|
-
"@semcore/flex-box": "5.
|
|
14
|
-
"@semcore/scroll-area": "5.
|
|
15
|
-
"@semcore/utils": "4.
|
|
16
|
-
"@semcore/icon": "4.
|
|
12
|
+
"@semcore/dropdown": "4.40.0",
|
|
13
|
+
"@semcore/flex-box": "5.36.0",
|
|
14
|
+
"@semcore/scroll-area": "5.40.0",
|
|
15
|
+
"@semcore/utils": "4.41.0",
|
|
16
|
+
"@semcore/icon": "4.50.0",
|
|
17
|
+
"@semcore/typography": "5.45.0",
|
|
17
18
|
"classnames": "2.2.6"
|
|
18
19
|
},
|
|
19
20
|
"peerDependencies": {
|
|
@@ -32,7 +33,7 @@
|
|
|
32
33
|
"@semcore/testing-utils": "1.0.0",
|
|
33
34
|
"@semcore/base-trigger": "4.26.1",
|
|
34
35
|
"@semcore/icon": "4.26.0",
|
|
35
|
-
"@semcore/button": "5.
|
|
36
|
+
"@semcore/button": "5.38.0"
|
|
36
37
|
},
|
|
37
38
|
"scripts": {
|
|
38
39
|
"build": "pnpm semcore-builder --source=js"
|