@semcore/dropdown-menu 18.0.0-prerelease.0 → 18.0.0-prerelease.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1 -1
- package/lib/cjs/DropdownMenu.js +17 -17
- package/lib/cjs/components/VirtualList.js +17 -17
- package/lib/cjs/index.d.js.map +1 -1
- package/lib/cjs/style/dropdown-menu.shadow.css +6 -6
- package/lib/es6/DropdownMenu.js +17 -17
- package/lib/es6/components/VirtualList.js +17 -17
- package/lib/es6/index.d.js.map +1 -1
- package/lib/es6/style/dropdown-menu.shadow.css +6 -6
- package/lib/esm/DropdownMenu.mjs +18 -18
- package/lib/esm/components/VirtualList.mjs +18 -18
- package/lib/esm/style/dropdown-menu.shadow.css +6 -6
- package/lib/types/index.d.ts +2 -2
- package/package.json +11 -11
package/CHANGELOG.md
CHANGED
package/lib/cjs/DropdownMenu.js
CHANGED
|
@@ -24,25 +24,25 @@ var _Context = require("./components/Context");
|
|
|
24
24
|
var _VirtualList = require("./components/VirtualList");
|
|
25
25
|
var _intergalacticDynamicLocales = require("./translations/__intergalactic-dynamic-locales");
|
|
26
26
|
/*!__reshadow-styles__:"./style/dropdown-menu.shadow.css"*/
|
|
27
|
-
const style = (/*__reshadow_css_start__*/_core.sstyled.insert(/*__inner_css_start__*/".
|
|
27
|
+
const style = (/*__reshadow_css_start__*/_core.sstyled.insert(/*__inner_css_start__*/".___SDropdownMenuList_1btbi_gg_{max-height:246px;padding:var(--intergalactic-spacing-1x,4px) 0;position:relative;min-height:26px;min-width:32px;box-sizing:initial;z-index:0;color:var(--intergalactic-text-primary,oklch(.23 .009 245))}.___SDropdownMenuList_1btbi_gg_ .___SBar_1btbi_gg_{z-index:3}.___SDropdownMenuList_1btbi_gg_:not(.___SDropdownMenuList_1btbi_gg_:has([data-ui-name=\"DropdownMenu.Group\"][data-sticky=true])) .___SShadowHorizontal_1btbi_gg_:after,.___SDropdownMenuList_1btbi_gg_:not(.___SDropdownMenuList_1btbi_gg_:has([data-ui-name=\"DropdownMenu.Group\"][data-sticky=true])) .___SShadowHorizontal_1btbi_gg_:before,.___SDropdownMenuList_1btbi_gg_:not(.___SDropdownMenuList_1btbi_gg_:has([data-ui-name=\"DropdownMenu.Group\"][data-sticky=true])) .___SShadowVertical_1btbi_gg_:after,.___SDropdownMenuList_1btbi_gg_:not(.___SDropdownMenuList_1btbi_gg_:has([data-ui-name=\"DropdownMenu.Group\"][data-sticky=true])) .___SShadowVertical_1btbi_gg_:before{border-radius:var(--intergalactic-control-rounded,6px)}.___SDropdownMenuList_1btbi_gg_._size_l_1btbi_gg_{max-height:306px}.___SDropdownMenuItemContainer_1btbi_gg_ .___SItemContent_1btbi_gg_:focus-visible{outline:none}.___SDropdownMenuItemContainer_1btbi_gg_.__nesting-trigger_1btbi_gg_{justify-content:space-between}.___SDropdownMenuItemAddon_1btbi_gg_,.___SItemContentText_1btbi_gg_{display:inline-flex;margin-left:var(--intergalactic-spacing-1x,4px);margin-right:var(--intergalactic-spacing-1x,4px)}.___SDropdownMenuItemAddon_1btbi_gg_:first-child,.___SItemContentText_1btbi_gg_:first-child{margin-left:0;margin-right:var(--intergalactic-spacing-1-5x,6px)}.___SDropdownMenuItemAddon_1btbi_gg_:last-child,.___SItemContentText_1btbi_gg_:last-child{margin-right:0}.___SDropdownMenuNesting_1btbi_gg_,.___SDropdownMenuNesting_1btbi_gg_._size_l_1btbi_gg_,.___SDropdownMenuNesting_1btbi_gg_._size_m_1btbi_gg_{padding:0}.___SDropdownMenuNesting_1btbi_gg_.__highlighted_1btbi_gg_{z-index:1;outline-color:var(--intergalactic-keyboard-focus-outline,oklch(.23 .009 245));outline-style:solid;outline-width:2px;outline-offset:-2px;transition-duration:calc(var(--intergalactic-duration-extra-fast, 100)*1ms);transition-timing-function:ease-in-out;transition-property:outline-color,outline-width,outline-offset}.___SDropdownNestingItem_1btbi_gg_._size_l_1btbi_gg_,.___SDropdownNestingItem_1btbi_gg_._size_m_1btbi_gg_{padding-right:0}.___SDropdownNestingItem_1btbi_gg_ .___SDropdownMenuItemContainer_1btbi_gg_{width:auto;padding-top:0;padding-bottom:0;padding-left:0;min-height:auto}.___SItemHint_1btbi_gg_{color:var(--intergalactic-text-secondary,oklch(.182 .045 244.8/.593))}.___SScrollContainer_1btbi_gg_:has([data-ui-name=\"DropdownMenu.Group\"][data-sticky=true]){overscroll-behavior:none}", /*__inner_css_end__*/"1btbi_gg_"),
|
|
28
28
|
/*__reshadow_css_end__*/
|
|
29
29
|
{
|
|
30
|
-
"__SDropdownMenuList": "
|
|
31
|
-
"_size_l": "
|
|
32
|
-
"__SDropdownMenuItemContainer": "
|
|
33
|
-
"_nesting-trigger": "__nesting-
|
|
34
|
-
"__SDropdownMenuNesting": "
|
|
35
|
-
"_size_m": "
|
|
36
|
-
"_highlighted": "
|
|
37
|
-
"__SDropdownNestingItem": "
|
|
38
|
-
"__SItemHint": "
|
|
39
|
-
"__SBar": "
|
|
40
|
-
"__SShadowHorizontal": "
|
|
41
|
-
"__SShadowVertical": "
|
|
42
|
-
"__SItemContent": "
|
|
43
|
-
"__SDropdownMenuItemAddon": "
|
|
44
|
-
"__SItemContentText": "
|
|
45
|
-
"__SScrollContainer": "
|
|
30
|
+
"__SDropdownMenuList": "___SDropdownMenuList_1btbi_gg_",
|
|
31
|
+
"_size_l": "_size_l_1btbi_gg_",
|
|
32
|
+
"__SDropdownMenuItemContainer": "___SDropdownMenuItemContainer_1btbi_gg_",
|
|
33
|
+
"_nesting-trigger": "__nesting-trigger_1btbi_gg_",
|
|
34
|
+
"__SDropdownMenuNesting": "___SDropdownMenuNesting_1btbi_gg_",
|
|
35
|
+
"_size_m": "_size_m_1btbi_gg_",
|
|
36
|
+
"_highlighted": "__highlighted_1btbi_gg_",
|
|
37
|
+
"__SDropdownNestingItem": "___SDropdownNestingItem_1btbi_gg_",
|
|
38
|
+
"__SItemHint": "___SItemHint_1btbi_gg_",
|
|
39
|
+
"__SBar": "___SBar_1btbi_gg_",
|
|
40
|
+
"__SShadowHorizontal": "___SShadowHorizontal_1btbi_gg_",
|
|
41
|
+
"__SShadowVertical": "___SShadowVertical_1btbi_gg_",
|
|
42
|
+
"__SItemContent": "___SItemContent_1btbi_gg_",
|
|
43
|
+
"__SDropdownMenuItemAddon": "___SDropdownMenuItemAddon_1btbi_gg_",
|
|
44
|
+
"__SItemContentText": "___SItemContentText_1btbi_gg_",
|
|
45
|
+
"__SScrollContainer": "___SScrollContainer_1btbi_gg_"
|
|
46
46
|
});
|
|
47
47
|
const menuItemContext = /*#__PURE__*/_react.default.createContext({});
|
|
48
48
|
class DropdownMenuRoot extends _dropdown.AbstractDropdown {
|
|
@@ -11,25 +11,25 @@ var _baseComponents = require("@semcore/base-components");
|
|
|
11
11
|
var _react = _interopRequireDefault(require("react"));
|
|
12
12
|
var _Context = require("./Context");
|
|
13
13
|
/*!__reshadow-styles__:"../style/dropdown-menu.shadow.css"*/
|
|
14
|
-
const style = (/*__reshadow_css_start__*/_core.sstyled.insert(/*__inner_css_start__*/".
|
|
14
|
+
const style = (/*__reshadow_css_start__*/_core.sstyled.insert(/*__inner_css_start__*/".___SDropdownMenuList_1btbi_gg_{max-height:246px;padding:var(--intergalactic-spacing-1x,4px) 0;position:relative;min-height:26px;min-width:32px;box-sizing:initial;z-index:0;color:var(--intergalactic-text-primary,oklch(.23 .009 245))}.___SDropdownMenuList_1btbi_gg_ .___SBar_1btbi_gg_{z-index:3}.___SDropdownMenuList_1btbi_gg_:not(.___SDropdownMenuList_1btbi_gg_:has([data-ui-name=\"DropdownMenu.Group\"][data-sticky=true])) .___SShadowHorizontal_1btbi_gg_:after,.___SDropdownMenuList_1btbi_gg_:not(.___SDropdownMenuList_1btbi_gg_:has([data-ui-name=\"DropdownMenu.Group\"][data-sticky=true])) .___SShadowHorizontal_1btbi_gg_:before,.___SDropdownMenuList_1btbi_gg_:not(.___SDropdownMenuList_1btbi_gg_:has([data-ui-name=\"DropdownMenu.Group\"][data-sticky=true])) .___SShadowVertical_1btbi_gg_:after,.___SDropdownMenuList_1btbi_gg_:not(.___SDropdownMenuList_1btbi_gg_:has([data-ui-name=\"DropdownMenu.Group\"][data-sticky=true])) .___SShadowVertical_1btbi_gg_:before{border-radius:var(--intergalactic-control-rounded,6px)}.___SDropdownMenuList_1btbi_gg_._size_l_1btbi_gg_{max-height:306px}.___SDropdownMenuItemContainer_1btbi_gg_ .___SItemContent_1btbi_gg_:focus-visible{outline:none}.___SDropdownMenuItemContainer_1btbi_gg_.__nesting-trigger_1btbi_gg_{justify-content:space-between}.___SDropdownMenuItemAddon_1btbi_gg_,.___SItemContentText_1btbi_gg_{display:inline-flex;margin-left:var(--intergalactic-spacing-1x,4px);margin-right:var(--intergalactic-spacing-1x,4px)}.___SDropdownMenuItemAddon_1btbi_gg_:first-child,.___SItemContentText_1btbi_gg_:first-child{margin-left:0;margin-right:var(--intergalactic-spacing-1-5x,6px)}.___SDropdownMenuItemAddon_1btbi_gg_:last-child,.___SItemContentText_1btbi_gg_:last-child{margin-right:0}.___SDropdownMenuNesting_1btbi_gg_,.___SDropdownMenuNesting_1btbi_gg_._size_l_1btbi_gg_,.___SDropdownMenuNesting_1btbi_gg_._size_m_1btbi_gg_{padding:0}.___SDropdownMenuNesting_1btbi_gg_.__highlighted_1btbi_gg_{z-index:1;outline-color:var(--intergalactic-keyboard-focus-outline,oklch(.23 .009 245));outline-style:solid;outline-width:2px;outline-offset:-2px;transition-duration:calc(var(--intergalactic-duration-extra-fast, 100)*1ms);transition-timing-function:ease-in-out;transition-property:outline-color,outline-width,outline-offset}.___SDropdownNestingItem_1btbi_gg_._size_l_1btbi_gg_,.___SDropdownNestingItem_1btbi_gg_._size_m_1btbi_gg_{padding-right:0}.___SDropdownNestingItem_1btbi_gg_ .___SDropdownMenuItemContainer_1btbi_gg_{width:auto;padding-top:0;padding-bottom:0;padding-left:0;min-height:auto}.___SItemHint_1btbi_gg_{color:var(--intergalactic-text-secondary,oklch(.182 .045 244.8/.593))}.___SScrollContainer_1btbi_gg_:has([data-ui-name=\"DropdownMenu.Group\"][data-sticky=true]){overscroll-behavior:none}", /*__inner_css_end__*/"1btbi_gg_"),
|
|
15
15
|
/*__reshadow_css_end__*/
|
|
16
16
|
{
|
|
17
|
-
"__SDropdownMenuList": "
|
|
18
|
-
"_size_l": "
|
|
19
|
-
"__SDropdownMenuItemContainer": "
|
|
20
|
-
"_nesting-trigger": "__nesting-
|
|
21
|
-
"__SDropdownMenuNesting": "
|
|
22
|
-
"_size_m": "
|
|
23
|
-
"_highlighted": "
|
|
24
|
-
"__SDropdownNestingItem": "
|
|
25
|
-
"__SItemHint": "
|
|
26
|
-
"__SBar": "
|
|
27
|
-
"__SShadowHorizontal": "
|
|
28
|
-
"__SShadowVertical": "
|
|
29
|
-
"__SItemContent": "
|
|
30
|
-
"__SDropdownMenuItemAddon": "
|
|
31
|
-
"__SItemContentText": "
|
|
32
|
-
"__SScrollContainer": "
|
|
17
|
+
"__SDropdownMenuList": "___SDropdownMenuList_1btbi_gg_",
|
|
18
|
+
"_size_l": "_size_l_1btbi_gg_",
|
|
19
|
+
"__SDropdownMenuItemContainer": "___SDropdownMenuItemContainer_1btbi_gg_",
|
|
20
|
+
"_nesting-trigger": "__nesting-trigger_1btbi_gg_",
|
|
21
|
+
"__SDropdownMenuNesting": "___SDropdownMenuNesting_1btbi_gg_",
|
|
22
|
+
"_size_m": "_size_m_1btbi_gg_",
|
|
23
|
+
"_highlighted": "__highlighted_1btbi_gg_",
|
|
24
|
+
"__SDropdownNestingItem": "___SDropdownNestingItem_1btbi_gg_",
|
|
25
|
+
"__SItemHint": "___SItemHint_1btbi_gg_",
|
|
26
|
+
"__SBar": "___SBar_1btbi_gg_",
|
|
27
|
+
"__SShadowHorizontal": "___SShadowHorizontal_1btbi_gg_",
|
|
28
|
+
"__SShadowVertical": "___SShadowVertical_1btbi_gg_",
|
|
29
|
+
"__SItemContent": "___SItemContent_1btbi_gg_",
|
|
30
|
+
"__SDropdownMenuItemAddon": "___SDropdownMenuItemAddon_1btbi_gg_",
|
|
31
|
+
"__SItemContentText": "___SItemContentText_1btbi_gg_",
|
|
32
|
+
"__SScrollContainer": "___SScrollContainer_1btbi_gg_"
|
|
33
33
|
});
|
|
34
34
|
class VirtualListRoot extends _core.Component {
|
|
35
35
|
constructor(...args) {
|
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 type { NSBox, NSFlex, NSPopper, NSScrollArea } from '@semcore/base-components';\nimport type { PropGetterFn, Intergalactic } from '@semcore/core';\nimport type {\n DropdownContext,\n DropdownProps,\n DropdownHandlers,\n DropdownTriggerProps,\n DropdownPopperAriaProps,\n StatusItemComponent,\n
|
|
1
|
+
{"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import type { NSBox, NSFlex, NSPopper, NSScrollArea } from '@semcore/base-components';\nimport type { PropGetterFn, Intergalactic } from '@semcore/core';\nimport type {\n DropdownContext,\n DropdownProps,\n DropdownHandlers,\n DropdownTriggerProps,\n DropdownPopperAriaProps,\n StatusItemComponent,\n NSDropdown,\n} from '@semcore/dropdown';\nimport type Dropdown from '@semcore/dropdown';\nimport type { NSText } from '@semcore/typography';\n\nimport type { VirtualList, RenderRowProps } from './components/VirtualList';\n\nexport type DropdownMenuSize = 'm' | 'l';\n\nexport type DropdownMenuProps = DropdownProps & {\n /**\n * Set role `menuitemradio` (or `menuitemcheckbox` if `multiselect`) for Dropdown.Item\n */\n selectable?: boolean;\n /**\n * Multiple select\n */\n multiselect?: boolean;\n /**\n * Size of the menu\n * @default m\n */\n size?: DropdownMenuSize;\n /**\n * Index of the element selected by default\n */\n defaultHighlightedIndex?: number | null;\n /**\n * Index of the selected item\n */\n highlightedIndex?: number | null;\n /**\n * Callback for highlightedIndex change\n * highlightedIndex - Index of the selected item\n */\n onHighlightedIndexChange?: (highlightedIndex: number | null) => void;\n /** Specifies the locale for i18n support */\n locale?: string;\n /**\n * Flag for menu that using as actions on DropdownMenu.Item\n */\n inlineActions?: boolean;\n\n /**\n * Count of menu items (for virtual lists only)\n */\n itemsCount?: number;\n};\n\nexport type DropdownMenuListProps = NSBox.Props &\n NSScrollArea.Props & {\n /**\n * Size of the menu\n * @default m\n */\n size?: DropdownMenuSize;\n };\n\nexport type DropdownMenuMenuProps = DropdownMenuListProps & {};\n\nexport type DropdownMenuItemProps = NSFlex.Props & {\n /**\n * Enables selected state. For selectable dropdowns only.\n */\n selected?: boolean;\n /**\n * Disables item\n */\n disabled?: boolean;\n /**\n * Size of the component\n * @default m\n */\n size?: DropdownMenuSize;\n /**\n * Index of item (used in virtualized lists)\n */\n index?: number;\n};\n\nexport type DropdownMenuContext = DropdownContext & {\n /**\n * Tracks which menu item is currently highlighted/focused for keyboard navigation\n **/\n highlightedIndex?: number;\n /**\n * Returns props for the menu list container\n **/\n getListProps: PropGetterFn;\n /**\n * Returns props for individual menu items\n **/\n getItemProps: PropGetterFn;\n /**\n * Returns props for item hint/description elements\n **/\n getItemHintProps: PropGetterFn;\n /**\n * Returns props for item title elements\n **/\n getItemTitleProps: PropGetterFn;\n};\n\nexport type DropdownMenuHandlers = DropdownHandlers & {\n highlightedIndex: (index: number) => void;\n};\n\nexport type DropdownMenuTriggerProps = DropdownTriggerProps;\n\ndeclare const DropdownMenu: Intergalactic.Component<\n 'div',\n DropdownMenuProps,\n DropdownMenuContext,\n [handlers: DropdownMenuHandlers]\n> & {\n Trigger: typeof Dropdown.Trigger;\n Popper: Intergalactic.Component<'div', DropdownMenuProps & DropdownPopperAriaProps>;\n List: Intergalactic.Component<\n 'div',\n DropdownMenuListProps,\n DropdownMenuContext,\n [handlers: DropdownMenuHandlers]\n >;\n Actions: Intergalactic.Component<\n NSFlex.Component,\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: NSBox.Component;\n Content: NSFlex.Component;\n Text: NSText.Component;\n Hint: NSFlex.Component;\n };\n\n Group: typeof Dropdown.Group;\n StatusItem: StatusItemComponent;\n Notice: NSDropdown.Notice.Component;\n\n VirtualList: typeof VirtualList;\n\n selectedIndexContext: React.Context<number>;\n nestedMenuInteraction: NSPopper.EventInteraction;\n};\n\nexport default DropdownMenu;\n\nexport {\n RenderRowProps,\n};\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
SDropdownMenuList {
|
|
2
2
|
max-height: 246px;
|
|
3
|
-
padding: var(--intergalactic-spacing-
|
|
3
|
+
padding: var(--intergalactic-spacing-1x, 4px) 0;
|
|
4
4
|
position: relative;
|
|
5
5
|
min-height: 26px;
|
|
6
6
|
min-width: 32px;
|
|
7
7
|
box-sizing: content-box;
|
|
8
8
|
z-index: 0;
|
|
9
|
-
color: var(--intergalactic-text-primary, oklch(0.
|
|
9
|
+
color: var(--intergalactic-text-primary, oklch(0.23 0.009 245));
|
|
10
10
|
|
|
11
11
|
SBar {
|
|
12
12
|
z-index: 3;
|
|
@@ -47,12 +47,12 @@ SDropdownMenuItemAddon,
|
|
|
47
47
|
SItemContentText {
|
|
48
48
|
display: inline-flex; /* todo: Brauer Ilia - why? should be changed to inline/inline-block for SItemContentText */
|
|
49
49
|
|
|
50
|
-
margin-left: var(--intergalactic-spacing-
|
|
51
|
-
margin-right: var(--intergalactic-spacing-
|
|
50
|
+
margin-left: var(--intergalactic-spacing-1x, 4px);
|
|
51
|
+
margin-right: var(--intergalactic-spacing-1x, 4px);
|
|
52
52
|
|
|
53
53
|
&:first-child {
|
|
54
54
|
margin-left: 0;
|
|
55
|
-
margin-right: var(--intergalactic-spacing-
|
|
55
|
+
margin-right: var(--intergalactic-spacing-1-5x, 6px);
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
&:last-child {
|
|
@@ -85,7 +85,7 @@ SDropdownNestingItem SDropdownMenuItemContainer {
|
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
SItemHint {
|
|
88
|
-
color: var(--intergalactic-text-secondary, oklch(0.
|
|
88
|
+
color: var(--intergalactic-text-secondary, oklch(0.182 0.045 244.8 / 0.593));
|
|
89
89
|
}
|
|
90
90
|
|
|
91
91
|
SScrollContainer {
|
package/lib/es6/DropdownMenu.js
CHANGED
|
@@ -26,25 +26,25 @@ import React from 'react';
|
|
|
26
26
|
import { ListBoxContextProvider } from './components/Context';
|
|
27
27
|
import { VirtualList } from './components/VirtualList';
|
|
28
28
|
/*!__reshadow-styles__:"./style/dropdown-menu.shadow.css"*/
|
|
29
|
-
const style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".
|
|
29
|
+
const style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".___SDropdownMenuList_1btbi_gg_{max-height:246px;padding:var(--intergalactic-spacing-1x,4px) 0;position:relative;min-height:26px;min-width:32px;box-sizing:initial;z-index:0;color:var(--intergalactic-text-primary,oklch(.23 .009 245))}.___SDropdownMenuList_1btbi_gg_ .___SBar_1btbi_gg_{z-index:3}.___SDropdownMenuList_1btbi_gg_:not(.___SDropdownMenuList_1btbi_gg_:has([data-ui-name=\"DropdownMenu.Group\"][data-sticky=true])) .___SShadowHorizontal_1btbi_gg_:after,.___SDropdownMenuList_1btbi_gg_:not(.___SDropdownMenuList_1btbi_gg_:has([data-ui-name=\"DropdownMenu.Group\"][data-sticky=true])) .___SShadowHorizontal_1btbi_gg_:before,.___SDropdownMenuList_1btbi_gg_:not(.___SDropdownMenuList_1btbi_gg_:has([data-ui-name=\"DropdownMenu.Group\"][data-sticky=true])) .___SShadowVertical_1btbi_gg_:after,.___SDropdownMenuList_1btbi_gg_:not(.___SDropdownMenuList_1btbi_gg_:has([data-ui-name=\"DropdownMenu.Group\"][data-sticky=true])) .___SShadowVertical_1btbi_gg_:before{border-radius:var(--intergalactic-control-rounded,6px)}.___SDropdownMenuList_1btbi_gg_._size_l_1btbi_gg_{max-height:306px}.___SDropdownMenuItemContainer_1btbi_gg_ .___SItemContent_1btbi_gg_:focus-visible{outline:none}.___SDropdownMenuItemContainer_1btbi_gg_.__nesting-trigger_1btbi_gg_{justify-content:space-between}.___SDropdownMenuItemAddon_1btbi_gg_,.___SItemContentText_1btbi_gg_{display:inline-flex;margin-left:var(--intergalactic-spacing-1x,4px);margin-right:var(--intergalactic-spacing-1x,4px)}.___SDropdownMenuItemAddon_1btbi_gg_:first-child,.___SItemContentText_1btbi_gg_:first-child{margin-left:0;margin-right:var(--intergalactic-spacing-1-5x,6px)}.___SDropdownMenuItemAddon_1btbi_gg_:last-child,.___SItemContentText_1btbi_gg_:last-child{margin-right:0}.___SDropdownMenuNesting_1btbi_gg_,.___SDropdownMenuNesting_1btbi_gg_._size_l_1btbi_gg_,.___SDropdownMenuNesting_1btbi_gg_._size_m_1btbi_gg_{padding:0}.___SDropdownMenuNesting_1btbi_gg_.__highlighted_1btbi_gg_{z-index:1;outline-color:var(--intergalactic-keyboard-focus-outline,oklch(.23 .009 245));outline-style:solid;outline-width:2px;outline-offset:-2px;transition-duration:calc(var(--intergalactic-duration-extra-fast, 100)*1ms);transition-timing-function:ease-in-out;transition-property:outline-color,outline-width,outline-offset}.___SDropdownNestingItem_1btbi_gg_._size_l_1btbi_gg_,.___SDropdownNestingItem_1btbi_gg_._size_m_1btbi_gg_{padding-right:0}.___SDropdownNestingItem_1btbi_gg_ .___SDropdownMenuItemContainer_1btbi_gg_{width:auto;padding-top:0;padding-bottom:0;padding-left:0;min-height:auto}.___SItemHint_1btbi_gg_{color:var(--intergalactic-text-secondary,oklch(.182 .045 244.8/.593))}.___SScrollContainer_1btbi_gg_:has([data-ui-name=\"DropdownMenu.Group\"][data-sticky=true]){overscroll-behavior:none}", /*__inner_css_end__*/"1btbi_gg_"),
|
|
30
30
|
/*__reshadow_css_end__*/
|
|
31
31
|
{
|
|
32
|
-
"__SDropdownMenuList": "
|
|
33
|
-
"_size_l": "
|
|
34
|
-
"__SDropdownMenuItemContainer": "
|
|
35
|
-
"_nesting-trigger": "__nesting-
|
|
36
|
-
"__SDropdownMenuNesting": "
|
|
37
|
-
"_size_m": "
|
|
38
|
-
"_highlighted": "
|
|
39
|
-
"__SDropdownNestingItem": "
|
|
40
|
-
"__SItemHint": "
|
|
41
|
-
"__SBar": "
|
|
42
|
-
"__SShadowHorizontal": "
|
|
43
|
-
"__SShadowVertical": "
|
|
44
|
-
"__SItemContent": "
|
|
45
|
-
"__SDropdownMenuItemAddon": "
|
|
46
|
-
"__SItemContentText": "
|
|
47
|
-
"__SScrollContainer": "
|
|
32
|
+
"__SDropdownMenuList": "___SDropdownMenuList_1btbi_gg_",
|
|
33
|
+
"_size_l": "_size_l_1btbi_gg_",
|
|
34
|
+
"__SDropdownMenuItemContainer": "___SDropdownMenuItemContainer_1btbi_gg_",
|
|
35
|
+
"_nesting-trigger": "__nesting-trigger_1btbi_gg_",
|
|
36
|
+
"__SDropdownMenuNesting": "___SDropdownMenuNesting_1btbi_gg_",
|
|
37
|
+
"_size_m": "_size_m_1btbi_gg_",
|
|
38
|
+
"_highlighted": "__highlighted_1btbi_gg_",
|
|
39
|
+
"__SDropdownNestingItem": "___SDropdownNestingItem_1btbi_gg_",
|
|
40
|
+
"__SItemHint": "___SItemHint_1btbi_gg_",
|
|
41
|
+
"__SBar": "___SBar_1btbi_gg_",
|
|
42
|
+
"__SShadowHorizontal": "___SShadowHorizontal_1btbi_gg_",
|
|
43
|
+
"__SShadowVertical": "___SShadowVertical_1btbi_gg_",
|
|
44
|
+
"__SItemContent": "___SItemContent_1btbi_gg_",
|
|
45
|
+
"__SDropdownMenuItemAddon": "___SDropdownMenuItemAddon_1btbi_gg_",
|
|
46
|
+
"__SItemContentText": "___SItemContentText_1btbi_gg_",
|
|
47
|
+
"__SScrollContainer": "___SScrollContainer_1btbi_gg_"
|
|
48
48
|
});
|
|
49
49
|
import { localizedMessages } from './translations/__intergalactic-dynamic-locales';
|
|
50
50
|
const menuItemContext = /*#__PURE__*/React.createContext({});
|
|
@@ -6,25 +6,25 @@ import { Root, Component, createComponent, sstyled } from '@semcore/core';
|
|
|
6
6
|
import React from 'react';
|
|
7
7
|
import { ListBoxContextProvider } from './Context';
|
|
8
8
|
/*!__reshadow-styles__:"../style/dropdown-menu.shadow.css"*/
|
|
9
|
-
const style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".
|
|
9
|
+
const style = (/*__reshadow_css_start__*/_sstyled.insert(/*__inner_css_start__*/".___SDropdownMenuList_1btbi_gg_{max-height:246px;padding:var(--intergalactic-spacing-1x,4px) 0;position:relative;min-height:26px;min-width:32px;box-sizing:initial;z-index:0;color:var(--intergalactic-text-primary,oklch(.23 .009 245))}.___SDropdownMenuList_1btbi_gg_ .___SBar_1btbi_gg_{z-index:3}.___SDropdownMenuList_1btbi_gg_:not(.___SDropdownMenuList_1btbi_gg_:has([data-ui-name=\"DropdownMenu.Group\"][data-sticky=true])) .___SShadowHorizontal_1btbi_gg_:after,.___SDropdownMenuList_1btbi_gg_:not(.___SDropdownMenuList_1btbi_gg_:has([data-ui-name=\"DropdownMenu.Group\"][data-sticky=true])) .___SShadowHorizontal_1btbi_gg_:before,.___SDropdownMenuList_1btbi_gg_:not(.___SDropdownMenuList_1btbi_gg_:has([data-ui-name=\"DropdownMenu.Group\"][data-sticky=true])) .___SShadowVertical_1btbi_gg_:after,.___SDropdownMenuList_1btbi_gg_:not(.___SDropdownMenuList_1btbi_gg_:has([data-ui-name=\"DropdownMenu.Group\"][data-sticky=true])) .___SShadowVertical_1btbi_gg_:before{border-radius:var(--intergalactic-control-rounded,6px)}.___SDropdownMenuList_1btbi_gg_._size_l_1btbi_gg_{max-height:306px}.___SDropdownMenuItemContainer_1btbi_gg_ .___SItemContent_1btbi_gg_:focus-visible{outline:none}.___SDropdownMenuItemContainer_1btbi_gg_.__nesting-trigger_1btbi_gg_{justify-content:space-between}.___SDropdownMenuItemAddon_1btbi_gg_,.___SItemContentText_1btbi_gg_{display:inline-flex;margin-left:var(--intergalactic-spacing-1x,4px);margin-right:var(--intergalactic-spacing-1x,4px)}.___SDropdownMenuItemAddon_1btbi_gg_:first-child,.___SItemContentText_1btbi_gg_:first-child{margin-left:0;margin-right:var(--intergalactic-spacing-1-5x,6px)}.___SDropdownMenuItemAddon_1btbi_gg_:last-child,.___SItemContentText_1btbi_gg_:last-child{margin-right:0}.___SDropdownMenuNesting_1btbi_gg_,.___SDropdownMenuNesting_1btbi_gg_._size_l_1btbi_gg_,.___SDropdownMenuNesting_1btbi_gg_._size_m_1btbi_gg_{padding:0}.___SDropdownMenuNesting_1btbi_gg_.__highlighted_1btbi_gg_{z-index:1;outline-color:var(--intergalactic-keyboard-focus-outline,oklch(.23 .009 245));outline-style:solid;outline-width:2px;outline-offset:-2px;transition-duration:calc(var(--intergalactic-duration-extra-fast, 100)*1ms);transition-timing-function:ease-in-out;transition-property:outline-color,outline-width,outline-offset}.___SDropdownNestingItem_1btbi_gg_._size_l_1btbi_gg_,.___SDropdownNestingItem_1btbi_gg_._size_m_1btbi_gg_{padding-right:0}.___SDropdownNestingItem_1btbi_gg_ .___SDropdownMenuItemContainer_1btbi_gg_{width:auto;padding-top:0;padding-bottom:0;padding-left:0;min-height:auto}.___SItemHint_1btbi_gg_{color:var(--intergalactic-text-secondary,oklch(.182 .045 244.8/.593))}.___SScrollContainer_1btbi_gg_:has([data-ui-name=\"DropdownMenu.Group\"][data-sticky=true]){overscroll-behavior:none}", /*__inner_css_end__*/"1btbi_gg_"),
|
|
10
10
|
/*__reshadow_css_end__*/
|
|
11
11
|
{
|
|
12
|
-
"__SDropdownMenuList": "
|
|
13
|
-
"_size_l": "
|
|
14
|
-
"__SDropdownMenuItemContainer": "
|
|
15
|
-
"_nesting-trigger": "__nesting-
|
|
16
|
-
"__SDropdownMenuNesting": "
|
|
17
|
-
"_size_m": "
|
|
18
|
-
"_highlighted": "
|
|
19
|
-
"__SDropdownNestingItem": "
|
|
20
|
-
"__SItemHint": "
|
|
21
|
-
"__SBar": "
|
|
22
|
-
"__SShadowHorizontal": "
|
|
23
|
-
"__SShadowVertical": "
|
|
24
|
-
"__SItemContent": "
|
|
25
|
-
"__SDropdownMenuItemAddon": "
|
|
26
|
-
"__SItemContentText": "
|
|
27
|
-
"__SScrollContainer": "
|
|
12
|
+
"__SDropdownMenuList": "___SDropdownMenuList_1btbi_gg_",
|
|
13
|
+
"_size_l": "_size_l_1btbi_gg_",
|
|
14
|
+
"__SDropdownMenuItemContainer": "___SDropdownMenuItemContainer_1btbi_gg_",
|
|
15
|
+
"_nesting-trigger": "__nesting-trigger_1btbi_gg_",
|
|
16
|
+
"__SDropdownMenuNesting": "___SDropdownMenuNesting_1btbi_gg_",
|
|
17
|
+
"_size_m": "_size_m_1btbi_gg_",
|
|
18
|
+
"_highlighted": "__highlighted_1btbi_gg_",
|
|
19
|
+
"__SDropdownNestingItem": "___SDropdownNestingItem_1btbi_gg_",
|
|
20
|
+
"__SItemHint": "___SItemHint_1btbi_gg_",
|
|
21
|
+
"__SBar": "___SBar_1btbi_gg_",
|
|
22
|
+
"__SShadowHorizontal": "___SShadowHorizontal_1btbi_gg_",
|
|
23
|
+
"__SShadowVertical": "___SShadowVertical_1btbi_gg_",
|
|
24
|
+
"__SItemContent": "___SItemContent_1btbi_gg_",
|
|
25
|
+
"__SDropdownMenuItemAddon": "___SDropdownMenuItemAddon_1btbi_gg_",
|
|
26
|
+
"__SItemContentText": "___SItemContentText_1btbi_gg_",
|
|
27
|
+
"__SScrollContainer": "___SScrollContainer_1btbi_gg_"
|
|
28
28
|
});
|
|
29
29
|
class VirtualListRoot extends Component {
|
|
30
30
|
constructor(...args) {
|
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 type { NSBox, NSFlex, NSPopper, NSScrollArea } from '@semcore/base-components';\nimport type { PropGetterFn, Intergalactic } from '@semcore/core';\nimport type {\n DropdownContext,\n DropdownProps,\n DropdownHandlers,\n DropdownTriggerProps,\n DropdownPopperAriaProps,\n StatusItemComponent,\n
|
|
1
|
+
{"version":3,"file":"index.d.js","names":[],"sources":["../../src/index.d.ts"],"sourcesContent":["import type { NSBox, NSFlex, NSPopper, NSScrollArea } from '@semcore/base-components';\nimport type { PropGetterFn, Intergalactic } from '@semcore/core';\nimport type {\n DropdownContext,\n DropdownProps,\n DropdownHandlers,\n DropdownTriggerProps,\n DropdownPopperAriaProps,\n StatusItemComponent,\n NSDropdown,\n} from '@semcore/dropdown';\nimport type Dropdown from '@semcore/dropdown';\nimport type { NSText } from '@semcore/typography';\n\nimport type { VirtualList, RenderRowProps } from './components/VirtualList';\n\nexport type DropdownMenuSize = 'm' | 'l';\n\nexport type DropdownMenuProps = DropdownProps & {\n /**\n * Set role `menuitemradio` (or `menuitemcheckbox` if `multiselect`) for Dropdown.Item\n */\n selectable?: boolean;\n /**\n * Multiple select\n */\n multiselect?: boolean;\n /**\n * Size of the menu\n * @default m\n */\n size?: DropdownMenuSize;\n /**\n * Index of the element selected by default\n */\n defaultHighlightedIndex?: number | null;\n /**\n * Index of the selected item\n */\n highlightedIndex?: number | null;\n /**\n * Callback for highlightedIndex change\n * highlightedIndex - Index of the selected item\n */\n onHighlightedIndexChange?: (highlightedIndex: number | null) => void;\n /** Specifies the locale for i18n support */\n locale?: string;\n /**\n * Flag for menu that using as actions on DropdownMenu.Item\n */\n inlineActions?: boolean;\n\n /**\n * Count of menu items (for virtual lists only)\n */\n itemsCount?: number;\n};\n\nexport type DropdownMenuListProps = NSBox.Props &\n NSScrollArea.Props & {\n /**\n * Size of the menu\n * @default m\n */\n size?: DropdownMenuSize;\n };\n\nexport type DropdownMenuMenuProps = DropdownMenuListProps & {};\n\nexport type DropdownMenuItemProps = NSFlex.Props & {\n /**\n * Enables selected state. For selectable dropdowns only.\n */\n selected?: boolean;\n /**\n * Disables item\n */\n disabled?: boolean;\n /**\n * Size of the component\n * @default m\n */\n size?: DropdownMenuSize;\n /**\n * Index of item (used in virtualized lists)\n */\n index?: number;\n};\n\nexport type DropdownMenuContext = DropdownContext & {\n /**\n * Tracks which menu item is currently highlighted/focused for keyboard navigation\n **/\n highlightedIndex?: number;\n /**\n * Returns props for the menu list container\n **/\n getListProps: PropGetterFn;\n /**\n * Returns props for individual menu items\n **/\n getItemProps: PropGetterFn;\n /**\n * Returns props for item hint/description elements\n **/\n getItemHintProps: PropGetterFn;\n /**\n * Returns props for item title elements\n **/\n getItemTitleProps: PropGetterFn;\n};\n\nexport type DropdownMenuHandlers = DropdownHandlers & {\n highlightedIndex: (index: number) => void;\n};\n\nexport type DropdownMenuTriggerProps = DropdownTriggerProps;\n\ndeclare const DropdownMenu: Intergalactic.Component<\n 'div',\n DropdownMenuProps,\n DropdownMenuContext,\n [handlers: DropdownMenuHandlers]\n> & {\n Trigger: typeof Dropdown.Trigger;\n Popper: Intergalactic.Component<'div', DropdownMenuProps & DropdownPopperAriaProps>;\n List: Intergalactic.Component<\n 'div',\n DropdownMenuListProps,\n DropdownMenuContext,\n [handlers: DropdownMenuHandlers]\n >;\n Actions: Intergalactic.Component<\n NSFlex.Component,\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: NSBox.Component;\n Content: NSFlex.Component;\n Text: NSText.Component;\n Hint: NSFlex.Component;\n };\n\n Group: typeof Dropdown.Group;\n StatusItem: StatusItemComponent;\n Notice: NSDropdown.Notice.Component;\n\n VirtualList: typeof VirtualList;\n\n selectedIndexContext: React.Context<number>;\n nestedMenuInteraction: NSPopper.EventInteraction;\n};\n\nexport default DropdownMenu;\n\nexport {\n RenderRowProps,\n};\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
SDropdownMenuList {
|
|
2
2
|
max-height: 246px;
|
|
3
|
-
padding: var(--intergalactic-spacing-
|
|
3
|
+
padding: var(--intergalactic-spacing-1x, 4px) 0;
|
|
4
4
|
position: relative;
|
|
5
5
|
min-height: 26px;
|
|
6
6
|
min-width: 32px;
|
|
7
7
|
box-sizing: content-box;
|
|
8
8
|
z-index: 0;
|
|
9
|
-
color: var(--intergalactic-text-primary, oklch(0.
|
|
9
|
+
color: var(--intergalactic-text-primary, oklch(0.23 0.009 245));
|
|
10
10
|
|
|
11
11
|
SBar {
|
|
12
12
|
z-index: 3;
|
|
@@ -47,12 +47,12 @@ SDropdownMenuItemAddon,
|
|
|
47
47
|
SItemContentText {
|
|
48
48
|
display: inline-flex; /* todo: Brauer Ilia - why? should be changed to inline/inline-block for SItemContentText */
|
|
49
49
|
|
|
50
|
-
margin-left: var(--intergalactic-spacing-
|
|
51
|
-
margin-right: var(--intergalactic-spacing-
|
|
50
|
+
margin-left: var(--intergalactic-spacing-1x, 4px);
|
|
51
|
+
margin-right: var(--intergalactic-spacing-1x, 4px);
|
|
52
52
|
|
|
53
53
|
&:first-child {
|
|
54
54
|
margin-left: 0;
|
|
55
|
-
margin-right: var(--intergalactic-spacing-
|
|
55
|
+
margin-right: var(--intergalactic-spacing-1-5x, 6px);
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
&:last-child {
|
|
@@ -85,7 +85,7 @@ SDropdownNestingItem SDropdownMenuItemContainer {
|
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
SItemHint {
|
|
88
|
-
color: var(--intergalactic-text-secondary, oklch(0.
|
|
88
|
+
color: var(--intergalactic-text-secondary, oklch(0.182 0.045 244.8 / 0.593));
|
|
89
89
|
}
|
|
90
90
|
|
|
91
91
|
SScrollContainer {
|
package/lib/esm/DropdownMenu.mjs
CHANGED
|
@@ -20,27 +20,27 @@ const style = (
|
|
|
20
20
|
/*__reshadow_css_start__*/
|
|
21
21
|
(sstyled.insert(
|
|
22
22
|
/*__inner_css_start__*/
|
|
23
|
-
'.
|
|
23
|
+
'.___SDropdownMenuList_1btbi_gg_{max-height:246px;padding:var(--intergalactic-spacing-1x,4px) 0;position:relative;min-height:26px;min-width:32px;box-sizing:initial;z-index:0;color:var(--intergalactic-text-primary,oklch(.23 .009 245))}.___SDropdownMenuList_1btbi_gg_ .___SBar_1btbi_gg_{z-index:3}.___SDropdownMenuList_1btbi_gg_:not(.___SDropdownMenuList_1btbi_gg_:has([data-ui-name="DropdownMenu.Group"][data-sticky=true])) .___SShadowHorizontal_1btbi_gg_:after,.___SDropdownMenuList_1btbi_gg_:not(.___SDropdownMenuList_1btbi_gg_:has([data-ui-name="DropdownMenu.Group"][data-sticky=true])) .___SShadowHorizontal_1btbi_gg_:before,.___SDropdownMenuList_1btbi_gg_:not(.___SDropdownMenuList_1btbi_gg_:has([data-ui-name="DropdownMenu.Group"][data-sticky=true])) .___SShadowVertical_1btbi_gg_:after,.___SDropdownMenuList_1btbi_gg_:not(.___SDropdownMenuList_1btbi_gg_:has([data-ui-name="DropdownMenu.Group"][data-sticky=true])) .___SShadowVertical_1btbi_gg_:before{border-radius:var(--intergalactic-control-rounded,6px)}.___SDropdownMenuList_1btbi_gg_._size_l_1btbi_gg_{max-height:306px}.___SDropdownMenuItemContainer_1btbi_gg_ .___SItemContent_1btbi_gg_:focus-visible{outline:none}.___SDropdownMenuItemContainer_1btbi_gg_.__nesting-trigger_1btbi_gg_{justify-content:space-between}.___SDropdownMenuItemAddon_1btbi_gg_,.___SItemContentText_1btbi_gg_{display:inline-flex;margin-left:var(--intergalactic-spacing-1x,4px);margin-right:var(--intergalactic-spacing-1x,4px)}.___SDropdownMenuItemAddon_1btbi_gg_:first-child,.___SItemContentText_1btbi_gg_:first-child{margin-left:0;margin-right:var(--intergalactic-spacing-1-5x,6px)}.___SDropdownMenuItemAddon_1btbi_gg_:last-child,.___SItemContentText_1btbi_gg_:last-child{margin-right:0}.___SDropdownMenuNesting_1btbi_gg_,.___SDropdownMenuNesting_1btbi_gg_._size_l_1btbi_gg_,.___SDropdownMenuNesting_1btbi_gg_._size_m_1btbi_gg_{padding:0}.___SDropdownMenuNesting_1btbi_gg_.__highlighted_1btbi_gg_{z-index:1;outline-color:var(--intergalactic-keyboard-focus-outline,oklch(.23 .009 245));outline-style:solid;outline-width:2px;outline-offset:-2px;transition-duration:calc(var(--intergalactic-duration-extra-fast, 100)*1ms);transition-timing-function:ease-in-out;transition-property:outline-color,outline-width,outline-offset}.___SDropdownNestingItem_1btbi_gg_._size_l_1btbi_gg_,.___SDropdownNestingItem_1btbi_gg_._size_m_1btbi_gg_{padding-right:0}.___SDropdownNestingItem_1btbi_gg_ .___SDropdownMenuItemContainer_1btbi_gg_{width:auto;padding-top:0;padding-bottom:0;padding-left:0;min-height:auto}.___SItemHint_1btbi_gg_{color:var(--intergalactic-text-secondary,oklch(.182 .045 244.8/.593))}.___SScrollContainer_1btbi_gg_:has([data-ui-name="DropdownMenu.Group"][data-sticky=true]){overscroll-behavior:none}',
|
|
24
24
|
/*__inner_css_end__*/
|
|
25
|
-
"
|
|
25
|
+
"1btbi_gg_"
|
|
26
26
|
), /*__reshadow_css_end__*/
|
|
27
27
|
{
|
|
28
|
-
"__SDropdownMenuList": "
|
|
29
|
-
"_size_l": "
|
|
30
|
-
"__SDropdownMenuItemContainer": "
|
|
31
|
-
"_nesting-trigger": "__nesting-
|
|
32
|
-
"__SDropdownMenuNesting": "
|
|
33
|
-
"_size_m": "
|
|
34
|
-
"_highlighted": "
|
|
35
|
-
"__SDropdownNestingItem": "
|
|
36
|
-
"__SItemHint": "
|
|
37
|
-
"__SBar": "
|
|
38
|
-
"__SShadowHorizontal": "
|
|
39
|
-
"__SShadowVertical": "
|
|
40
|
-
"__SItemContent": "
|
|
41
|
-
"__SDropdownMenuItemAddon": "
|
|
42
|
-
"__SItemContentText": "
|
|
43
|
-
"__SScrollContainer": "
|
|
28
|
+
"__SDropdownMenuList": "___SDropdownMenuList_1btbi_gg_",
|
|
29
|
+
"_size_l": "_size_l_1btbi_gg_",
|
|
30
|
+
"__SDropdownMenuItemContainer": "___SDropdownMenuItemContainer_1btbi_gg_",
|
|
31
|
+
"_nesting-trigger": "__nesting-trigger_1btbi_gg_",
|
|
32
|
+
"__SDropdownMenuNesting": "___SDropdownMenuNesting_1btbi_gg_",
|
|
33
|
+
"_size_m": "_size_m_1btbi_gg_",
|
|
34
|
+
"_highlighted": "__highlighted_1btbi_gg_",
|
|
35
|
+
"__SDropdownNestingItem": "___SDropdownNestingItem_1btbi_gg_",
|
|
36
|
+
"__SItemHint": "___SItemHint_1btbi_gg_",
|
|
37
|
+
"__SBar": "___SBar_1btbi_gg_",
|
|
38
|
+
"__SShadowHorizontal": "___SShadowHorizontal_1btbi_gg_",
|
|
39
|
+
"__SShadowVertical": "___SShadowVertical_1btbi_gg_",
|
|
40
|
+
"__SItemContent": "___SItemContent_1btbi_gg_",
|
|
41
|
+
"__SDropdownMenuItemAddon": "___SDropdownMenuItemAddon_1btbi_gg_",
|
|
42
|
+
"__SItemContentText": "___SItemContentText_1btbi_gg_",
|
|
43
|
+
"__SScrollContainer": "___SScrollContainer_1btbi_gg_"
|
|
44
44
|
})
|
|
45
45
|
);
|
|
46
46
|
const menuItemContext = /* @__PURE__ */ React.createContext({});
|
|
@@ -8,27 +8,27 @@ const style = (
|
|
|
8
8
|
/*__reshadow_css_start__*/
|
|
9
9
|
(sstyled.insert(
|
|
10
10
|
/*__inner_css_start__*/
|
|
11
|
-
'.
|
|
11
|
+
'.___SDropdownMenuList_1btbi_gg_{max-height:246px;padding:var(--intergalactic-spacing-1x,4px) 0;position:relative;min-height:26px;min-width:32px;box-sizing:initial;z-index:0;color:var(--intergalactic-text-primary,oklch(.23 .009 245))}.___SDropdownMenuList_1btbi_gg_ .___SBar_1btbi_gg_{z-index:3}.___SDropdownMenuList_1btbi_gg_:not(.___SDropdownMenuList_1btbi_gg_:has([data-ui-name="DropdownMenu.Group"][data-sticky=true])) .___SShadowHorizontal_1btbi_gg_:after,.___SDropdownMenuList_1btbi_gg_:not(.___SDropdownMenuList_1btbi_gg_:has([data-ui-name="DropdownMenu.Group"][data-sticky=true])) .___SShadowHorizontal_1btbi_gg_:before,.___SDropdownMenuList_1btbi_gg_:not(.___SDropdownMenuList_1btbi_gg_:has([data-ui-name="DropdownMenu.Group"][data-sticky=true])) .___SShadowVertical_1btbi_gg_:after,.___SDropdownMenuList_1btbi_gg_:not(.___SDropdownMenuList_1btbi_gg_:has([data-ui-name="DropdownMenu.Group"][data-sticky=true])) .___SShadowVertical_1btbi_gg_:before{border-radius:var(--intergalactic-control-rounded,6px)}.___SDropdownMenuList_1btbi_gg_._size_l_1btbi_gg_{max-height:306px}.___SDropdownMenuItemContainer_1btbi_gg_ .___SItemContent_1btbi_gg_:focus-visible{outline:none}.___SDropdownMenuItemContainer_1btbi_gg_.__nesting-trigger_1btbi_gg_{justify-content:space-between}.___SDropdownMenuItemAddon_1btbi_gg_,.___SItemContentText_1btbi_gg_{display:inline-flex;margin-left:var(--intergalactic-spacing-1x,4px);margin-right:var(--intergalactic-spacing-1x,4px)}.___SDropdownMenuItemAddon_1btbi_gg_:first-child,.___SItemContentText_1btbi_gg_:first-child{margin-left:0;margin-right:var(--intergalactic-spacing-1-5x,6px)}.___SDropdownMenuItemAddon_1btbi_gg_:last-child,.___SItemContentText_1btbi_gg_:last-child{margin-right:0}.___SDropdownMenuNesting_1btbi_gg_,.___SDropdownMenuNesting_1btbi_gg_._size_l_1btbi_gg_,.___SDropdownMenuNesting_1btbi_gg_._size_m_1btbi_gg_{padding:0}.___SDropdownMenuNesting_1btbi_gg_.__highlighted_1btbi_gg_{z-index:1;outline-color:var(--intergalactic-keyboard-focus-outline,oklch(.23 .009 245));outline-style:solid;outline-width:2px;outline-offset:-2px;transition-duration:calc(var(--intergalactic-duration-extra-fast, 100)*1ms);transition-timing-function:ease-in-out;transition-property:outline-color,outline-width,outline-offset}.___SDropdownNestingItem_1btbi_gg_._size_l_1btbi_gg_,.___SDropdownNestingItem_1btbi_gg_._size_m_1btbi_gg_{padding-right:0}.___SDropdownNestingItem_1btbi_gg_ .___SDropdownMenuItemContainer_1btbi_gg_{width:auto;padding-top:0;padding-bottom:0;padding-left:0;min-height:auto}.___SItemHint_1btbi_gg_{color:var(--intergalactic-text-secondary,oklch(.182 .045 244.8/.593))}.___SScrollContainer_1btbi_gg_:has([data-ui-name="DropdownMenu.Group"][data-sticky=true]){overscroll-behavior:none}',
|
|
12
12
|
/*__inner_css_end__*/
|
|
13
|
-
"
|
|
13
|
+
"1btbi_gg_"
|
|
14
14
|
), /*__reshadow_css_end__*/
|
|
15
15
|
{
|
|
16
|
-
"__SDropdownMenuList": "
|
|
17
|
-
"_size_l": "
|
|
18
|
-
"__SDropdownMenuItemContainer": "
|
|
19
|
-
"_nesting-trigger": "__nesting-
|
|
20
|
-
"__SDropdownMenuNesting": "
|
|
21
|
-
"_size_m": "
|
|
22
|
-
"_highlighted": "
|
|
23
|
-
"__SDropdownNestingItem": "
|
|
24
|
-
"__SItemHint": "
|
|
25
|
-
"__SBar": "
|
|
26
|
-
"__SShadowHorizontal": "
|
|
27
|
-
"__SShadowVertical": "
|
|
28
|
-
"__SItemContent": "
|
|
29
|
-
"__SDropdownMenuItemAddon": "
|
|
30
|
-
"__SItemContentText": "
|
|
31
|
-
"__SScrollContainer": "
|
|
16
|
+
"__SDropdownMenuList": "___SDropdownMenuList_1btbi_gg_",
|
|
17
|
+
"_size_l": "_size_l_1btbi_gg_",
|
|
18
|
+
"__SDropdownMenuItemContainer": "___SDropdownMenuItemContainer_1btbi_gg_",
|
|
19
|
+
"_nesting-trigger": "__nesting-trigger_1btbi_gg_",
|
|
20
|
+
"__SDropdownMenuNesting": "___SDropdownMenuNesting_1btbi_gg_",
|
|
21
|
+
"_size_m": "_size_m_1btbi_gg_",
|
|
22
|
+
"_highlighted": "__highlighted_1btbi_gg_",
|
|
23
|
+
"__SDropdownNestingItem": "___SDropdownNestingItem_1btbi_gg_",
|
|
24
|
+
"__SItemHint": "___SItemHint_1btbi_gg_",
|
|
25
|
+
"__SBar": "___SBar_1btbi_gg_",
|
|
26
|
+
"__SShadowHorizontal": "___SShadowHorizontal_1btbi_gg_",
|
|
27
|
+
"__SShadowVertical": "___SShadowVertical_1btbi_gg_",
|
|
28
|
+
"__SItemContent": "___SItemContent_1btbi_gg_",
|
|
29
|
+
"__SDropdownMenuItemAddon": "___SDropdownMenuItemAddon_1btbi_gg_",
|
|
30
|
+
"__SItemContentText": "___SItemContentText_1btbi_gg_",
|
|
31
|
+
"__SScrollContainer": "___SScrollContainer_1btbi_gg_"
|
|
32
32
|
})
|
|
33
33
|
);
|
|
34
34
|
class VirtualListRoot extends Component {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
SDropdownMenuList {
|
|
2
2
|
max-height: 246px;
|
|
3
|
-
padding: var(--intergalactic-spacing-
|
|
3
|
+
padding: var(--intergalactic-spacing-1x, 4px) 0;
|
|
4
4
|
position: relative;
|
|
5
5
|
min-height: 26px;
|
|
6
6
|
min-width: 32px;
|
|
7
7
|
box-sizing: content-box;
|
|
8
8
|
z-index: 0;
|
|
9
|
-
color: var(--intergalactic-text-primary, oklch(0.
|
|
9
|
+
color: var(--intergalactic-text-primary, oklch(0.23 0.009 245));
|
|
10
10
|
|
|
11
11
|
SBar {
|
|
12
12
|
z-index: 3;
|
|
@@ -47,12 +47,12 @@ SDropdownMenuItemAddon,
|
|
|
47
47
|
SItemContentText {
|
|
48
48
|
display: inline-flex; /* todo: Brauer Ilia - why? should be changed to inline/inline-block for SItemContentText */
|
|
49
49
|
|
|
50
|
-
margin-left: var(--intergalactic-spacing-
|
|
51
|
-
margin-right: var(--intergalactic-spacing-
|
|
50
|
+
margin-left: var(--intergalactic-spacing-1x, 4px);
|
|
51
|
+
margin-right: var(--intergalactic-spacing-1x, 4px);
|
|
52
52
|
|
|
53
53
|
&:first-child {
|
|
54
54
|
margin-left: 0;
|
|
55
|
-
margin-right: var(--intergalactic-spacing-
|
|
55
|
+
margin-right: var(--intergalactic-spacing-1-5x, 6px);
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
&:last-child {
|
|
@@ -85,7 +85,7 @@ SDropdownNestingItem SDropdownMenuItemContainer {
|
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
SItemHint {
|
|
88
|
-
color: var(--intergalactic-text-secondary, oklch(0.
|
|
88
|
+
color: var(--intergalactic-text-secondary, oklch(0.182 0.045 244.8 / 0.593));
|
|
89
89
|
}
|
|
90
90
|
|
|
91
91
|
SScrollContainer {
|
package/lib/types/index.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ import type {
|
|
|
7
7
|
DropdownTriggerProps,
|
|
8
8
|
DropdownPopperAriaProps,
|
|
9
9
|
StatusItemComponent,
|
|
10
|
-
|
|
10
|
+
NSDropdown,
|
|
11
11
|
} from '@semcore/dropdown';
|
|
12
12
|
import type Dropdown from '@semcore/dropdown';
|
|
13
13
|
import type { NSText } from '@semcore/typography';
|
|
@@ -156,7 +156,7 @@ declare const DropdownMenu: Intergalactic.Component<
|
|
|
156
156
|
|
|
157
157
|
Group: typeof Dropdown.Group;
|
|
158
158
|
StatusItem: StatusItemComponent;
|
|
159
|
-
Notice:
|
|
159
|
+
Notice: NSDropdown.Notice.Component;
|
|
160
160
|
|
|
161
161
|
VirtualList: typeof VirtualList;
|
|
162
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": "18.0.0-prerelease.
|
|
4
|
+
"version": "18.0.0-prerelease.2",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/es6/index.js",
|
|
7
7
|
"typings": "lib/types/index.d.ts",
|
|
@@ -14,14 +14,14 @@
|
|
|
14
14
|
"require": "./lib/cjs/index.js"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@semcore/button": "^18.0.0-prerelease.
|
|
18
|
-
"@semcore/dropdown": "^18.0.0-prerelease.
|
|
19
|
-
"@semcore/typography": "^18.0.0-prerelease.
|
|
17
|
+
"@semcore/button": "^18.0.0-prerelease.2",
|
|
18
|
+
"@semcore/dropdown": "^18.0.0-prerelease.2",
|
|
19
|
+
"@semcore/typography": "^18.0.0-prerelease.2",
|
|
20
20
|
"classnames": "2.2.6"
|
|
21
21
|
},
|
|
22
22
|
"peerDependencies": {
|
|
23
|
-
"@semcore/base-components": "^18.0.0-prerelease.
|
|
24
|
-
"@semcore/icon": "^18.0.0-prerelease.
|
|
23
|
+
"@semcore/base-components": "^18.0.0-prerelease.2",
|
|
24
|
+
"@semcore/icon": "^18.0.0-prerelease.2"
|
|
25
25
|
},
|
|
26
26
|
"repository": {
|
|
27
27
|
"type": "git",
|
|
@@ -30,12 +30,12 @@
|
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@types/classnames": "2.2.6",
|
|
33
|
-
"@semcore/core": "18.0.0-prerelease.
|
|
33
|
+
"@semcore/core": "18.0.0-prerelease.2",
|
|
34
|
+
"@semcore/base-components": "18.0.0-prerelease.2",
|
|
34
35
|
"@semcore/testing-utils": "1.0.0",
|
|
35
|
-
"@semcore/base-trigger": "18.0.0-prerelease.
|
|
36
|
-
"@semcore/button": "18.0.0-prerelease.
|
|
37
|
-
"@semcore/
|
|
38
|
-
"@semcore/icon": "18.0.0-prerelease.0"
|
|
36
|
+
"@semcore/base-trigger": "18.0.0-prerelease.2",
|
|
37
|
+
"@semcore/button": "18.0.0-prerelease.2",
|
|
38
|
+
"@semcore/icon": "18.0.0-prerelease.2"
|
|
39
39
|
},
|
|
40
40
|
"scripts": {
|
|
41
41
|
"build": "pnpm semcore-builder --source=js,ts && pnpm vite build"
|