@consta/header 3.0.0 → 3.0.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/__internal__/src/components/ButtonMenu/helpers.d.ts +10 -11
- package/__internal__/src/components/ButtonMenu/types.d.ts +2 -3
- package/__internal__/src/components/ButtonMenu/types.js.map +1 -1
- package/__internal__/src/components/Layout/Layout.d.ts +1 -1
- package/__internal__/src/components/Layout/LayoutRow/LayoutRow.d.ts +1 -1
- package/__internal__/src/components/Layout/LayoutRow/LayoutRow.js.map +1 -1
- package/__internal__/src/components/Layout/types.d.ts +1 -1
- package/__internal__/src/components/Layout/types.js.map +1 -1
- package/__internal__/src/components/MegaMenu/MegaMenu.d.ts +1 -1
- package/__internal__/src/components/MegaMenu/MegaMenuBannerBar/helpers.d.ts +103 -97
- package/__internal__/src/components/MegaMenu/MegaMenuBannerBar/types.d.ts +3 -3
- package/__internal__/src/components/MegaMenu/MegaMenuBannerBar/types.js.map +1 -1
- package/__internal__/src/components/MegaMenu/MegaMenuBox/MegaMenuBox.d.ts +1 -1
- package/__internal__/src/components/MegaMenu/MegaMenuBox/MegaMenuBox.js.map +1 -1
- package/__internal__/src/components/MegaMenu/MegaMenuBox/types.d.ts +1 -2
- package/__internal__/src/components/MegaMenu/MegaMenuBox/types.js.map +1 -1
- package/__internal__/src/components/MegaMenu/MegaMenuGlobal/MegaMenuGlobalGroup/MegaMenuGlobalGroup.js +1 -1
- package/__internal__/src/components/MegaMenu/MegaMenuGlobal/MegaMenuGlobalGroup/MegaMenuGlobalGroup.js.map +1 -1
- package/__internal__/src/components/MegaMenu/MegaMenuGlobal/helper.d.ts +106 -100
- package/__internal__/src/components/MegaMenu/MegaMenuGlobal/types.d.ts +4 -4
- package/__internal__/src/components/MegaMenu/MegaMenuGlobal/types.js.map +1 -1
- package/__internal__/src/components/MegaMenu/MegaMenuNavBar/MegaMenuNavBar.js +1 -1
- package/__internal__/src/components/MegaMenu/MegaMenuNavBar/MegaMenuNavBar.js.map +1 -1
- package/__internal__/src/components/MegaMenu/MegaMenuNavBar/helper.d.ts +14 -5
- package/__internal__/src/components/MegaMenu/MegaMenuNavBar/types.d.ts +3 -3
- package/__internal__/src/components/MegaMenu/MegaMenuNavBar/types.js.map +1 -1
- package/__internal__/src/components/MegaMenu/helper.d.ts +108 -102
- package/__internal__/src/components/MegaMenu/types.d.ts +2 -2
- package/__internal__/src/components/MegaMenu/types.js.map +1 -1
- package/__internal__/src/components/Menu/helpers.d.ts +8 -9
- package/__internal__/src/components/Menu/types.d.ts +2 -3
- package/__internal__/src/components/Menu/types.js.map +1 -1
- package/__internal__/src/components/MobileMenu/types.d.ts +3 -3
- package/__internal__/src/components/MobileMenu/types.js.map +1 -1
- package/__internal__/src/components/Navbar/NavbarArrow/NavbarArrow.d.ts +1 -1
- package/__internal__/src/components/Navbar/NavbarRail/NavbarRail.js +1 -1
- package/__internal__/src/components/Navbar/NavbarRail/NavbarRail.js.map +1 -1
- package/__internal__/src/components/Navbar/NavbarRailItem/NavbarRailItem.d.ts +1 -1
- package/__internal__/src/components/Navbar/helpers.d.ts +8 -9
- package/__internal__/src/components/Navbar/types.d.ts +3 -3
- package/__internal__/src/components/Navbar/types.js.map +1 -1
- package/__internal__/src/components/Notifications/NotificationsActions/helpers.d.ts +4 -5
- package/__internal__/src/components/Notifications/NotificationsActions/types.d.ts +2 -3
- package/__internal__/src/components/Notifications/NotificationsActions/types.js.map +1 -1
- package/__internal__/src/components/Notifications/NotificationsItem/NotificationsItem.d.ts +1 -1
- package/__internal__/src/components/Notifications/NotificationsItem/types.d.ts +1 -1
- package/__internal__/src/components/Notifications/NotificationsItem/types.js.map +1 -1
- package/__internal__/src/components/Notifications/NotificationsItemFooter/types.d.ts +1 -1
- package/__internal__/src/components/Notifications/NotificationsItemFooter/types.js.map +1 -1
- package/__internal__/src/components/Notifications/NotificationsList/helpers.d.ts +3 -60
- package/__internal__/src/components/Notifications/NotificationsList/types.d.ts +2 -3
- package/__internal__/src/components/Notifications/NotificationsList/types.js.map +1 -1
- package/__internal__/src/components/Notifications/types.d.ts +2 -3
- package/__internal__/src/components/Notifications/types.js.map +1 -1
- package/__internal__/src/components/PopoverButton/PopoverButton.d.ts +1 -1
- package/__internal__/src/components/PopoverButton/PopoverButton.js +1 -1
- package/__internal__/src/components/PopoverButton/PopoverButton.js.map +1 -1
- package/__internal__/src/components/SelectMenu/helpers.d.ts +6 -7
- package/__internal__/src/components/SelectMenu/types.d.ts +2 -3
- package/__internal__/src/components/SelectMenu/types.js.map +1 -1
- package/__internal__/src/components/Sidebar/Sidebar.d.ts +1 -1
- package/__internal__/src/components/TileMenu/TileMenuItem/types.d.ts +0 -1
- package/__internal__/src/components/TileMenu/TileMenuList/helpers.d.ts +1 -2
- package/__internal__/src/components/TileMenu/TileMenuList/types.d.ts +2 -3
- package/__internal__/src/components/TileMenu/TileMenuList/types.js.map +1 -1
- package/__internal__/src/components/TileMenu/types.d.ts +2 -3
- package/__internal__/src/components/TileMenu/types.js.map +1 -1
- package/__internal__/src/components/VerticalMenu/helpers.d.ts +3 -4
- package/__internal__/src/components/VerticalMenu/types.d.ts +4 -4
- package/__internal__/src/components/VerticalMenu/types.js.map +1 -1
- package/__internal__/src/helpers/getItemClick.d.ts +1 -2
- package/package.json +6 -3
- package/__internal__/src/utils/types/PropsWithHTMLAttributes.d.ts +0 -3
- package/__internal__/src/utils/types/PropsWithHTMLAttributes.js +0 -2
- package/__internal__/src/utils/types/PropsWithHTMLAttributes.js.map +0 -1
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { MegaMenuBannerBarDefaultItem, MegaMenuBannerBarPropGetItemAs, MegaMenuBannerBarPropGetItemAttributes, MegaMenuBannerBarPropGetItemDescription, MegaMenuBannerBarPropGetItemImage, MegaMenuBannerBarPropGetItemLabel, MegaMenuBannerBarPropGetItemOnClick } from './MegaMenuBannerBar';
|
|
3
2
|
import { MegaMenuDefaultItem, MegaMenuPropGetItemAs, MegaMenuPropGetItemAttributes, MegaMenuPropGetItemIconLeft, MegaMenuPropGetItemKey, MegaMenuPropGetItemLabel, MegaMenuPropGetItemOnClick, MegaMenuPropGetItemSubMenu, MegaMenuProps } from './types';
|
|
4
3
|
export declare const withDefaultGetters: (props: MegaMenuProps) => {
|
|
@@ -17,110 +16,121 @@ export declare const withDefaultGetters: (props: MegaMenuProps) => {
|
|
|
17
16
|
getBannerDescription: MegaMenuBannerBarPropGetItemDescription<MegaMenuBannerBarDefaultItem>;
|
|
18
17
|
banners?: MegaMenuBannerBarDefaultItem[] | undefined;
|
|
19
18
|
items: MegaMenuDefaultItem[];
|
|
20
|
-
menuTitle?: string
|
|
21
|
-
menuShowButtonText?: string
|
|
22
|
-
menuHideButtonText?: string
|
|
23
|
-
menuMaxElements?: number
|
|
24
|
-
bannerPosition?: "right" | "bottom"
|
|
19
|
+
menuTitle?: string;
|
|
20
|
+
menuShowButtonText?: string;
|
|
21
|
+
menuHideButtonText?: string;
|
|
22
|
+
menuMaxElements?: number;
|
|
23
|
+
bannerPosition?: "right" | "bottom";
|
|
25
24
|
onItemClick?: import("./types").MegaMenuPropOnItemClick<MegaMenuDefaultItem> | undefined;
|
|
26
25
|
onBannerClick?: import("./types").MegaMenuPropOnItemClick<MegaMenuBannerBarDefaultItem> | undefined;
|
|
27
|
-
defaultChecked?: boolean | undefined;
|
|
26
|
+
defaultChecked?: boolean | undefined | undefined;
|
|
28
27
|
defaultValue?: string | number | readonly string[] | undefined;
|
|
29
|
-
suppressContentEditableWarning?: boolean | undefined;
|
|
30
|
-
suppressHydrationWarning?: boolean | undefined;
|
|
31
|
-
accessKey?: string | undefined;
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
28
|
+
suppressContentEditableWarning?: boolean | undefined | undefined;
|
|
29
|
+
suppressHydrationWarning?: boolean | undefined | undefined;
|
|
30
|
+
accessKey?: string | undefined | undefined;
|
|
31
|
+
autoCapitalize?: "off" | "none" | "on" | "sentences" | "words" | "characters" | undefined | (string & {}) | undefined;
|
|
32
|
+
autoFocus?: boolean | undefined | undefined;
|
|
33
|
+
className?: string | undefined | undefined;
|
|
34
|
+
contentEditable?: (boolean | "true" | "false") | "inherit" | "plaintext-only" | undefined;
|
|
35
|
+
contextMenu?: string | undefined | undefined;
|
|
36
|
+
dir?: string | undefined | undefined;
|
|
36
37
|
draggable?: (boolean | "true" | "false") | undefined;
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
slot?: string | undefined;
|
|
38
|
+
enterKeyHint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined | undefined;
|
|
39
|
+
hidden?: boolean | undefined | undefined;
|
|
40
|
+
id?: string | undefined | undefined;
|
|
41
|
+
lang?: string | undefined | undefined;
|
|
42
|
+
nonce?: string | undefined | undefined;
|
|
43
|
+
slot?: string | undefined | undefined;
|
|
43
44
|
spellCheck?: (boolean | "true" | "false") | undefined;
|
|
44
45
|
style?: import("react").CSSProperties | undefined;
|
|
45
|
-
tabIndex?: number | undefined;
|
|
46
|
-
title?: string | undefined;
|
|
47
|
-
translate?: "yes" | "no" | undefined;
|
|
48
|
-
radioGroup?: string | undefined;
|
|
46
|
+
tabIndex?: number | undefined | undefined;
|
|
47
|
+
title?: string | undefined | undefined;
|
|
48
|
+
translate?: "yes" | "no" | undefined | undefined;
|
|
49
|
+
radioGroup?: string | undefined | undefined;
|
|
49
50
|
role?: import("react").AriaRole | undefined;
|
|
50
|
-
about?: string | undefined;
|
|
51
|
-
|
|
51
|
+
about?: string | undefined | undefined;
|
|
52
|
+
content?: string | undefined | undefined;
|
|
53
|
+
datatype?: string | undefined | undefined;
|
|
52
54
|
inlist?: any;
|
|
53
|
-
prefix?: string | undefined;
|
|
54
|
-
property?: string | undefined;
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
55
|
+
prefix?: string | undefined | undefined;
|
|
56
|
+
property?: string | undefined | undefined;
|
|
57
|
+
rel?: string | undefined | undefined;
|
|
58
|
+
resource?: string | undefined | undefined;
|
|
59
|
+
rev?: string | undefined | undefined;
|
|
60
|
+
typeof?: string | undefined | undefined;
|
|
61
|
+
vocab?: string | undefined | undefined;
|
|
62
|
+
autoCorrect?: string | undefined | undefined;
|
|
63
|
+
autoSave?: string | undefined | undefined;
|
|
64
|
+
color?: string | undefined | undefined;
|
|
65
|
+
itemProp?: string | undefined | undefined;
|
|
66
|
+
itemScope?: boolean | undefined | undefined;
|
|
67
|
+
itemType?: string | undefined | undefined;
|
|
68
|
+
itemID?: string | undefined | undefined;
|
|
69
|
+
itemRef?: string | undefined | undefined;
|
|
70
|
+
results?: number | undefined | undefined;
|
|
71
|
+
security?: string | undefined | undefined;
|
|
72
|
+
unselectable?: "on" | "off" | undefined | undefined;
|
|
73
|
+
inputMode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | undefined | undefined;
|
|
74
|
+
is?: string | undefined | undefined;
|
|
75
|
+
exportparts?: string | undefined | undefined;
|
|
76
|
+
part?: string | undefined | undefined;
|
|
77
|
+
"aria-activedescendant"?: string | undefined | undefined;
|
|
78
|
+
"aria-atomic"?: (boolean | "true" | "false") | undefined;
|
|
79
|
+
"aria-autocomplete"?: "none" | "inline" | "list" | "both" | undefined | undefined;
|
|
80
|
+
"aria-braillelabel"?: string | undefined | undefined;
|
|
81
|
+
"aria-brailleroledescription"?: string | undefined | undefined;
|
|
82
|
+
"aria-busy"?: (boolean | "true" | "false") | undefined;
|
|
83
|
+
"aria-checked"?: boolean | "false" | "mixed" | "true" | undefined | undefined;
|
|
84
|
+
"aria-colcount"?: number | undefined | undefined;
|
|
85
|
+
"aria-colindex"?: number | undefined | undefined;
|
|
86
|
+
"aria-colindextext"?: string | undefined | undefined;
|
|
87
|
+
"aria-colspan"?: number | undefined | undefined;
|
|
88
|
+
"aria-controls"?: string | undefined | undefined;
|
|
89
|
+
"aria-current"?: boolean | "false" | "true" | "page" | "step" | "location" | "date" | "time" | undefined | undefined;
|
|
90
|
+
"aria-describedby"?: string | undefined | undefined;
|
|
91
|
+
"aria-description"?: string | undefined | undefined;
|
|
92
|
+
"aria-details"?: string | undefined | undefined;
|
|
93
|
+
"aria-disabled"?: (boolean | "true" | "false") | undefined;
|
|
94
|
+
"aria-dropeffect"?: "none" | "copy" | "execute" | "link" | "move" | "popup" | undefined | undefined;
|
|
95
|
+
"aria-errormessage"?: string | undefined | undefined;
|
|
96
|
+
"aria-expanded"?: (boolean | "true" | "false") | undefined;
|
|
97
|
+
"aria-flowto"?: string | undefined | undefined;
|
|
98
|
+
"aria-grabbed"?: (boolean | "true" | "false") | undefined;
|
|
99
|
+
"aria-haspopup"?: boolean | "false" | "true" | "menu" | "listbox" | "tree" | "grid" | "dialog" | undefined | undefined;
|
|
100
|
+
"aria-hidden"?: (boolean | "true" | "false") | undefined;
|
|
101
|
+
"aria-invalid"?: boolean | "false" | "true" | "grammar" | "spelling" | undefined | undefined;
|
|
102
|
+
"aria-keyshortcuts"?: string | undefined | undefined;
|
|
103
|
+
"aria-label"?: string | undefined | undefined;
|
|
104
|
+
"aria-labelledby"?: string | undefined | undefined;
|
|
105
|
+
"aria-level"?: number | undefined | undefined;
|
|
106
|
+
"aria-live"?: "off" | "assertive" | "polite" | undefined | undefined;
|
|
107
|
+
"aria-modal"?: (boolean | "true" | "false") | undefined;
|
|
108
|
+
"aria-multiline"?: (boolean | "true" | "false") | undefined;
|
|
109
|
+
"aria-multiselectable"?: (boolean | "true" | "false") | undefined;
|
|
110
|
+
"aria-orientation"?: "horizontal" | "vertical" | undefined | undefined;
|
|
111
|
+
"aria-owns"?: string | undefined | undefined;
|
|
112
|
+
"aria-placeholder"?: string | undefined | undefined;
|
|
113
|
+
"aria-posinset"?: number | undefined | undefined;
|
|
114
|
+
"aria-pressed"?: boolean | "false" | "mixed" | "true" | undefined | undefined;
|
|
115
|
+
"aria-readonly"?: (boolean | "true" | "false") | undefined;
|
|
116
|
+
"aria-relevant"?: "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text" | "text additions" | "text removals" | undefined | undefined;
|
|
117
|
+
"aria-required"?: (boolean | "true" | "false") | undefined;
|
|
118
|
+
"aria-roledescription"?: string | undefined | undefined;
|
|
119
|
+
"aria-rowcount"?: number | undefined | undefined;
|
|
120
|
+
"aria-rowindex"?: number | undefined | undefined;
|
|
121
|
+
"aria-rowindextext"?: string | undefined | undefined;
|
|
122
|
+
"aria-rowspan"?: number | undefined | undefined;
|
|
123
|
+
"aria-selected"?: (boolean | "true" | "false") | undefined;
|
|
124
|
+
"aria-setsize"?: number | undefined | undefined;
|
|
125
|
+
"aria-sort"?: "none" | "ascending" | "descending" | "other" | undefined | undefined;
|
|
126
|
+
"aria-valuemax"?: number | undefined | undefined;
|
|
127
|
+
"aria-valuemin"?: number | undefined | undefined;
|
|
128
|
+
"aria-valuenow"?: number | undefined | undefined;
|
|
129
|
+
"aria-valuetext"?: string | undefined | undefined;
|
|
120
130
|
children?: import("react").ReactNode;
|
|
121
131
|
dangerouslySetInnerHTML?: {
|
|
122
|
-
__html: string;
|
|
123
|
-
} | undefined;
|
|
132
|
+
__html: string | TrustedHTML;
|
|
133
|
+
} | undefined | undefined;
|
|
124
134
|
onCopy?: import("react").ClipboardEventHandler<HTMLDivElement> | undefined;
|
|
125
135
|
onCopyCapture?: import("react").ClipboardEventHandler<HTMLDivElement> | undefined;
|
|
126
136
|
onCut?: import("react").ClipboardEventHandler<HTMLDivElement> | undefined;
|
|
@@ -139,7 +149,7 @@ export declare const withDefaultGetters: (props: MegaMenuProps) => {
|
|
|
139
149
|
onBlurCapture?: import("react").FocusEventHandler<HTMLDivElement> | undefined;
|
|
140
150
|
onChange?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
141
151
|
onChangeCapture?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
142
|
-
onBeforeInput?: import("react").
|
|
152
|
+
onBeforeInput?: import("react").InputEventHandler<HTMLDivElement> | undefined;
|
|
143
153
|
onBeforeInputCapture?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
144
154
|
onInput?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
145
155
|
onInputCapture?: import("react").FormEventHandler<HTMLDivElement> | undefined;
|
|
@@ -189,8 +199,6 @@ export declare const withDefaultGetters: (props: MegaMenuProps) => {
|
|
|
189
199
|
onProgressCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
190
200
|
onRateChange?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
191
201
|
onRateChangeCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
192
|
-
onResize?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
193
|
-
onResizeCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
194
202
|
onSeeked?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
195
203
|
onSeekedCapture?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
196
204
|
onSeeking?: import("react").ReactEventHandler<HTMLDivElement> | undefined;
|
|
@@ -260,9 +268,7 @@ export declare const withDefaultGetters: (props: MegaMenuProps) => {
|
|
|
260
268
|
onPointerCancel?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
261
269
|
onPointerCancelCapture?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
262
270
|
onPointerEnter?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
263
|
-
onPointerEnterCapture?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
264
271
|
onPointerLeave?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
265
|
-
onPointerLeaveCapture?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
266
272
|
onPointerOver?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
267
273
|
onPointerOverCapture?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
268
274
|
onPointerOut?: import("react").PointerEventHandler<HTMLDivElement> | undefined;
|
|
@@ -283,7 +289,7 @@ export declare const withDefaultGetters: (props: MegaMenuProps) => {
|
|
|
283
289
|
onAnimationIterationCapture?: import("react").AnimationEventHandler<HTMLDivElement> | undefined;
|
|
284
290
|
onTransitionEnd?: import("react").TransitionEventHandler<HTMLDivElement> | undefined;
|
|
285
291
|
onTransitionEndCapture?: import("react").TransitionEventHandler<HTMLDivElement> | undefined;
|
|
286
|
-
ref?: import("react").
|
|
292
|
+
ref?: import("react").LegacyRef<HTMLDivElement> | undefined;
|
|
287
293
|
key?: import("react").Key | null | undefined;
|
|
288
294
|
};
|
|
289
295
|
type Level<ITEM> = Array<{
|
|
@@ -296,6 +302,6 @@ export declare const separateItemsByDepth: <ITEM>(params: {
|
|
|
296
302
|
items: ITEM[];
|
|
297
303
|
getItemSubMenu: MegaMenuPropGetItemSubMenu<ITEM>;
|
|
298
304
|
getItemActive: (item: ITEM) => boolean;
|
|
299
|
-
depth?: number
|
|
305
|
+
depth?: number;
|
|
300
306
|
}) => [Level<ITEM>, Level<ITEM>, Level<ITEM>];
|
|
301
307
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IconComponent } from '@consta/icons/Icon';
|
|
2
2
|
import { AsAttributes, AsTags } from '@consta/uikit/__internal__/src/utils/types/AsTags';
|
|
3
|
+
import { PropsWithHTMLAttributesAndRef } from '@consta/uikit/__internal__/src/utils/types/PropsWithHTMLAttributes';
|
|
3
4
|
import React from 'react';
|
|
4
|
-
import { PropsWithHTMLAttributesAndRef } from "../../utils/types/PropsWithHTMLAttributes";
|
|
5
5
|
import { MegaMenuBannerBarDefaultItem, MegaMenuBannerBarPropGetItemAs, MegaMenuBannerBarPropGetItemAttributes, MegaMenuBannerBarPropGetItemDescription, MegaMenuBannerBarPropGetItemImage, MegaMenuBannerBarPropGetItemLabel, MegaMenuBannerBarPropGetItemOnClick } from './MegaMenuBannerBar';
|
|
6
6
|
export type MegaMenuPropOnItemClick<ITEM> = (item: ITEM, props: {
|
|
7
7
|
e: React.MouseEvent;
|
|
@@ -62,4 +62,4 @@ export type MegaMenuProps<ITEM = MegaMenuDefaultItem, BANNER = MegaMenuBannerBar
|
|
|
62
62
|
} ? {} : {
|
|
63
63
|
getBannerLabel: MegaMenuBannerBarPropGetItemLabel<ITEM>;
|
|
64
64
|
}), HTMLDivElement>;
|
|
65
|
-
export type MegaMenuComponent = <ITEM = MegaMenuDefaultItem, BANNER = MegaMenuBannerBarDefaultItem>(props: MegaMenuProps<ITEM, BANNER>, ref: React.Ref<HTMLDivElement>) => React.
|
|
65
|
+
export type MegaMenuComponent = <ITEM = MegaMenuDefaultItem, BANNER = MegaMenuBannerBarDefaultItem>(props: MegaMenuProps<ITEM, BANNER>, ref: React.Ref<HTMLDivElement>) => React.ReactNode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","names":[],"sources":["../../../../../src/components/MegaMenu/types.ts"],"sourcesContent":["import { IconComponent } from '@consta/icons/Icon';\nimport {\n AsAttributes,\n AsTags,\n} from '@consta/uikit/__internal__/src/utils/types/AsTags';\nimport
|
|
1
|
+
{"version":3,"file":"types.js","names":[],"sources":["../../../../../src/components/MegaMenu/types.ts"],"sourcesContent":["import { IconComponent } from '@consta/icons/Icon';\nimport {\n AsAttributes,\n AsTags,\n} from '@consta/uikit/__internal__/src/utils/types/AsTags';\nimport { PropsWithHTMLAttributesAndRef } from '@consta/uikit/__internal__/src/utils/types/PropsWithHTMLAttributes';\nimport React from 'react';\n\nimport {\n MegaMenuBannerBarDefaultItem,\n MegaMenuBannerBarPropGetItemAs,\n MegaMenuBannerBarPropGetItemAttributes,\n MegaMenuBannerBarPropGetItemDescription,\n MegaMenuBannerBarPropGetItemImage,\n MegaMenuBannerBarPropGetItemLabel,\n MegaMenuBannerBarPropGetItemOnClick,\n} from './MegaMenuBannerBar';\n\nexport type MegaMenuPropOnItemClick<ITEM> = (\n item: ITEM,\n props: {\n e: React.MouseEvent;\n },\n) => void;\n\nexport type MegaMenuDefaultItem = {\n key: string | number;\n label: string;\n iconLeft?: IconComponent;\n as?: AsTags;\n attributes?: AsAttributes;\n subMenu?: MegaMenuDefaultItem[];\n onClick?: React.MouseEventHandler;\n};\n\nexport type MegaMenuPropGetItemKey<ITEM> = (item: ITEM) => string | number;\nexport type MegaMenuPropGetItemLabel<ITEM> = (item: ITEM) => string;\nexport type MegaMenuPropGetItemIconLeft<ITEM> = (\n item: ITEM,\n) => IconComponent | undefined;\nexport type MegaMenuPropGetItemOnClick<ITEM> = (\n item: ITEM,\n) => React.MouseEventHandler | undefined;\nexport type MegaMenuPropGetItemAs<ITEM> = (item: ITEM) => AsTags | undefined;\nexport type MegaMenuPropGetItemAttributes<ITEM> = (\n item: ITEM,\n) => AsAttributes | undefined;\nexport type MegaMenuPropGetItemSubMenu<ITEM> = (\n item: ITEM,\n) => ITEM[] | undefined;\n\nexport type ItemMappers<ITEM = MegaMenuDefaultItem> = {\n getItemKey?: MegaMenuPropGetItemKey<ITEM>;\n getItemLabel?: MegaMenuPropGetItemLabel<ITEM>;\n getItemIconLeft?: MegaMenuPropGetItemIconLeft<ITEM>;\n getItemOnClick?: MegaMenuPropGetItemOnClick<ITEM>;\n getItemAs?: MegaMenuPropGetItemAs<ITEM>;\n getItemAttributes?: MegaMenuPropGetItemAttributes<ITEM>;\n getItemSubMenu?: MegaMenuPropGetItemSubMenu<ITEM>;\n};\n\nexport type BannerMappers<ITEM = MegaMenuBannerBarDefaultItem> = {\n getBannerLabel?: MegaMenuBannerBarPropGetItemLabel<ITEM>;\n getBannerOnClick?: MegaMenuBannerBarPropGetItemOnClick<ITEM>;\n getBannerDescription?: MegaMenuBannerBarPropGetItemDescription<ITEM>;\n getBannerImage?: MegaMenuBannerBarPropGetItemImage<ITEM>;\n getBannerAs?: MegaMenuBannerBarPropGetItemAs<ITEM>;\n getBannerAttributes?: MegaMenuBannerBarPropGetItemAttributes<ITEM>;\n};\n\nexport type MegaMenuProps<\n ITEM = MegaMenuDefaultItem,\n BANNER = MegaMenuBannerBarDefaultItem,\n> = PropsWithHTMLAttributesAndRef<\n {\n banners?: BANNER[];\n items: ITEM[];\n menuTitle?: string;\n menuShowButtonText?: string;\n menuHideButtonText?: string;\n menuMaxElements?: number;\n bannerPosition?: 'right' | 'bottom';\n onItemClick?: MegaMenuPropOnItemClick<ITEM>;\n onBannerClick?: MegaMenuPropOnItemClick<BANNER>;\n } & BannerMappers<BANNER> &\n ItemMappers<ITEM> &\n (ITEM extends { key: MegaMenuDefaultItem['key'] }\n ? {}\n : { getItemKey: MegaMenuPropGetItemKey<ITEM> }) &\n (ITEM extends { label: MegaMenuDefaultItem['label'] }\n ? {}\n : { getItemLabel: MegaMenuPropGetItemLabel<ITEM> }) &\n (BANNER extends { label: MegaMenuBannerBarDefaultItem['label'] | unknown }\n ? {}\n : { getBannerLabel: MegaMenuBannerBarPropGetItemLabel<ITEM> }),\n HTMLDivElement\n>;\n\nexport type MegaMenuComponent = <\n ITEM = MegaMenuDefaultItem,\n BANNER = MegaMenuBannerBarDefaultItem,\n>(\n props: MegaMenuProps<ITEM, BANNER>,\n ref: React.Ref<HTMLDivElement>,\n) => React.ReactNode;\n"],"mappings":""}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { MenuDefaultItem, MenuPropGetItemActive, MenuPropGetItemHref, MenuPropGetItemLabel, MenuPropGetItemOnClick, MenuPropGetItemSubMenu, MenuPropGetItemTarget, MenuProps } from './types';
|
|
3
2
|
export declare const defaultGetItemLabel: MenuPropGetItemLabel<MenuDefaultItem>;
|
|
4
3
|
export declare const defaultGetItemActive: MenuPropGetItemActive<MenuDefaultItem>;
|
|
@@ -7,12 +6,12 @@ export declare const defaultGetItemOnClick: MenuPropGetItemOnClick<MenuDefaultIt
|
|
|
7
6
|
export declare const defaultGetItemTarget: MenuPropGetItemTarget<MenuDefaultItem>;
|
|
8
7
|
export declare const defaultGetItemSubMenu: MenuPropGetItemSubMenu<MenuDefaultItem>;
|
|
9
8
|
export declare const getGetters: <ITEM>(props: {
|
|
10
|
-
getItemLabel?: MenuPropGetItemLabel<ITEM
|
|
11
|
-
getItemActive?: MenuPropGetItemActive<ITEM
|
|
12
|
-
getItemHref?: MenuPropGetItemHref<ITEM
|
|
13
|
-
getItemOnClick?: MenuPropGetItemOnClick<ITEM
|
|
14
|
-
getItemTarget?: MenuPropGetItemTarget<ITEM
|
|
15
|
-
getItemSubMenu?: MenuPropGetItemSubMenu<ITEM
|
|
9
|
+
getItemLabel?: MenuPropGetItemLabel<ITEM>;
|
|
10
|
+
getItemActive?: MenuPropGetItemActive<ITEM>;
|
|
11
|
+
getItemHref?: MenuPropGetItemHref<ITEM>;
|
|
12
|
+
getItemOnClick?: MenuPropGetItemOnClick<ITEM>;
|
|
13
|
+
getItemTarget?: MenuPropGetItemTarget<ITEM>;
|
|
14
|
+
getItemSubMenu?: MenuPropGetItemSubMenu<ITEM>;
|
|
16
15
|
}) => {
|
|
17
16
|
getItemLabel: MenuPropGetItemLabel<MenuDefaultItem> | MenuPropGetItemLabel<ITEM>;
|
|
18
17
|
getItemActive: MenuPropGetItemActive<MenuDefaultItem> | MenuPropGetItemActive<ITEM>;
|
|
@@ -23,7 +22,7 @@ export declare const getGetters: <ITEM>(props: {
|
|
|
23
22
|
};
|
|
24
23
|
export declare function withDefaultGetters<ITEM>(props: MenuProps<ITEM>): {
|
|
25
24
|
items: ITEM[];
|
|
26
|
-
width?: "full"
|
|
25
|
+
width?: "full";
|
|
27
26
|
onItemClick?: import("./types").MenuPropOnItemClick<ITEM> | undefined;
|
|
28
27
|
getItemHref?: MenuPropGetItemHref<ITEM> | undefined;
|
|
29
28
|
getItemLabel?: MenuPropGetItemLabel<ITEM> | undefined;
|
|
@@ -32,7 +31,7 @@ export declare function withDefaultGetters<ITEM>(props: MenuProps<ITEM>): {
|
|
|
32
31
|
getItemOnClick?: MenuPropGetItemOnClick<ITEM> | undefined;
|
|
33
32
|
getItemSubMenu?: MenuPropGetItemSubMenu<ITEM> | undefined;
|
|
34
33
|
} & Omit<import("react").HTMLAttributes<HTMLDivElement>, "css" | "items" | "onItemClick" | "getItemHref" | "getItemLabel" | "getItemTarget" | "getItemOnClick" | "width" | "getItemSubMenu" | "getItemActive"> & import("react").RefAttributes<HTMLDivElement> & (ITEM extends {
|
|
35
|
-
label:
|
|
34
|
+
label: MenuDefaultItem["label"];
|
|
36
35
|
} ? {} : {
|
|
37
36
|
getItemLabel: MenuPropGetItemLabel<ITEM>;
|
|
38
37
|
}) & {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import { PropsWithHTMLAttributesAndRef } from "../../utils/types/PropsWithHTMLAttributes";
|
|
1
|
+
import { PropsWithHTMLAttributesAndRef } from '@consta/uikit/__internal__/src/utils/types/PropsWithHTMLAttributes';
|
|
3
2
|
export type MenuDefaultItem = {
|
|
4
3
|
label: string;
|
|
5
4
|
href?: string;
|
|
@@ -32,4 +31,4 @@ export type MenuProps<ITEM = MenuDefaultItem> = PropsWithHTMLAttributesAndRef<{
|
|
|
32
31
|
} ? {} : {
|
|
33
32
|
getItemLabel: MenuPropGetItemLabel<ITEM>;
|
|
34
33
|
});
|
|
35
|
-
export type MenuComponent = <ITEM = MenuDefaultItem>(props: MenuProps<ITEM>) => React.
|
|
34
|
+
export type MenuComponent = <ITEM = MenuDefaultItem>(props: MenuProps<ITEM>) => React.ReactNode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","names":[],"sources":["../../../../../src/components/Menu/types.ts"],"sourcesContent":["import { PropsWithHTMLAttributesAndRef } from '
|
|
1
|
+
{"version":3,"file":"types.js","names":[],"sources":["../../../../../src/components/Menu/types.ts"],"sourcesContent":["import { PropsWithHTMLAttributesAndRef } from '@consta/uikit/__internal__/src/utils/types/PropsWithHTMLAttributes';\n\nexport type MenuDefaultItem = {\n label: string;\n href?: string;\n target?: string;\n active?: boolean;\n onClick?: React.EventHandler<React.MouseEvent>;\n subMenu?: MenuDefaultItem[];\n};\n\nexport type MenuPropGetItemLabel<ITEM> = (item: ITEM) => string;\nexport type MenuPropGetItemHref<ITEM> = (item: ITEM) => string | undefined;\nexport type MenuPropGetItemTarget<ITEM> = (item: ITEM) => string | undefined;\nexport type MenuPropGetItemActive<ITEM> = (item: ITEM) => boolean | undefined;\nexport type MenuPropGetItemSubMenu<ITEM> = (item: ITEM) => ITEM[] | undefined;\nexport type MenuPropGetItemOnClick<ITEM> = (\n item: ITEM,\n) => React.EventHandler<React.MouseEvent> | undefined;\nexport type MenuPropOnItemClick<ITEM> = (\n item: ITEM,\n props: {\n e: React.MouseEvent;\n },\n) => void;\n\nexport type MenuProps<ITEM = MenuDefaultItem> = PropsWithHTMLAttributesAndRef<\n {\n items: ITEM[];\n width?: 'full';\n onItemClick?: MenuPropOnItemClick<ITEM>;\n getItemHref?: MenuPropGetItemHref<ITEM>;\n getItemLabel?: MenuPropGetItemLabel<ITEM>;\n getItemTarget?: MenuPropGetItemTarget<ITEM>;\n getItemActive?: MenuPropGetItemActive<ITEM>;\n getItemOnClick?: MenuPropGetItemOnClick<ITEM>;\n getItemSubMenu?: MenuPropGetItemSubMenu<ITEM>;\n },\n HTMLDivElement\n> &\n (ITEM extends { label: MenuDefaultItem['label'] }\n ? {}\n : { getItemLabel: MenuPropGetItemLabel<ITEM> });\n\nexport type MenuComponent = <ITEM = MenuDefaultItem>(\n props: MenuProps<ITEM>,\n) => React.ReactNode;\n"],"mappings":""}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { PropsWithHTMLAttributesAndRef } from '@consta/uikit/__internal__/src/utils/types/PropsWithHTMLAttributes';
|
|
1
2
|
import React from 'react';
|
|
2
|
-
import { VerticalMenuDefaultItem, VerticalMenuPropGetItemActive, VerticalMenuPropGetItemGroup, VerticalMenuPropGetItemHref, VerticalMenuPropGetItemLabel, VerticalMenuPropGetItemOnClick, VerticalMenuPropGetItemSubMenu, VerticalMenuPropGetItemTarget, VerticalMenuPropOnItemClick } from
|
|
3
|
-
import { PropsWithHTMLAttributesAndRef } from "../../utils/types/PropsWithHTMLAttributes";
|
|
3
|
+
import { VerticalMenuDefaultItem, VerticalMenuPropGetItemActive, VerticalMenuPropGetItemGroup, VerticalMenuPropGetItemHref, VerticalMenuPropGetItemLabel, VerticalMenuPropGetItemOnClick, VerticalMenuPropGetItemSubMenu, VerticalMenuPropGetItemTarget, VerticalMenuPropOnItemClick } from '../VerticalMenu';
|
|
4
4
|
export type MobileMenuProps<ITEM = VerticalMenuDefaultItem> = PropsWithHTMLAttributesAndRef<{
|
|
5
5
|
items: ITEM[];
|
|
6
6
|
getItemHref?: VerticalMenuPropGetItemHref<ITEM>;
|
|
@@ -20,5 +20,5 @@ export type MobileMenuProps<ITEM = VerticalMenuDefaultItem> = PropsWithHTMLAttri
|
|
|
20
20
|
} ? {} : {
|
|
21
21
|
getItemLabel: VerticalMenuPropGetItemLabel<ITEM>;
|
|
22
22
|
});
|
|
23
|
-
export type MobileMenuComponent = <ITEM = VerticalMenuDefaultItem>(props: MobileMenuProps<ITEM>) => React.
|
|
23
|
+
export type MobileMenuComponent = <ITEM = VerticalMenuDefaultItem>(props: MobileMenuProps<ITEM>) => React.ReactNode;
|
|
24
24
|
export type { VerticalMenuDefaultItem };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","names":[],"sources":["../../../../../src/components/MobileMenu/types.ts"],"sourcesContent":["import React from 'react';\n\nimport {\n VerticalMenuDefaultItem,\n VerticalMenuPropGetItemActive,\n VerticalMenuPropGetItemGroup,\n VerticalMenuPropGetItemHref,\n VerticalMenuPropGetItemLabel,\n VerticalMenuPropGetItemOnClick,\n VerticalMenuPropGetItemSubMenu,\n VerticalMenuPropGetItemTarget,\n VerticalMenuPropOnItemClick,\n} from '##/components/VerticalMenu';\
|
|
1
|
+
{"version":3,"file":"types.js","names":[],"sources":["../../../../../src/components/MobileMenu/types.ts"],"sourcesContent":["import { PropsWithHTMLAttributesAndRef } from '@consta/uikit/__internal__/src/utils/types/PropsWithHTMLAttributes';\nimport React from 'react';\n\nimport {\n VerticalMenuDefaultItem,\n VerticalMenuPropGetItemActive,\n VerticalMenuPropGetItemGroup,\n VerticalMenuPropGetItemHref,\n VerticalMenuPropGetItemLabel,\n VerticalMenuPropGetItemOnClick,\n VerticalMenuPropGetItemSubMenu,\n VerticalMenuPropGetItemTarget,\n VerticalMenuPropOnItemClick,\n} from '##/components/VerticalMenu';\n\nexport type MobileMenuProps<ITEM = VerticalMenuDefaultItem> =\n PropsWithHTMLAttributesAndRef<\n {\n items: ITEM[];\n getItemHref?: VerticalMenuPropGetItemHref<ITEM>;\n getItemLabel?: VerticalMenuPropGetItemLabel<ITEM>;\n getItemTarget?: VerticalMenuPropGetItemTarget<ITEM>;\n getItemActive?: VerticalMenuPropGetItemActive<ITEM>;\n getItemOnClick?: VerticalMenuPropGetItemOnClick<ITEM>;\n getItemSubMenu?: VerticalMenuPropGetItemSubMenu<ITEM>;\n getItemGroup?: VerticalMenuPropGetItemGroup<ITEM>;\n onItemClick?: VerticalMenuPropOnItemClick<ITEM>;\n header?: React.ReactNode;\n sidebarClassName?: string;\n children?: never;\n footer?: React.ReactNode;\n },\n HTMLButtonElement\n > &\n (ITEM extends { label: VerticalMenuDefaultItem['label'] }\n ? {}\n : { getItemLabel: VerticalMenuPropGetItemLabel<ITEM> });\n\nexport type MobileMenuComponent = <ITEM = VerticalMenuDefaultItem>(\n props: MobileMenuProps<ITEM>,\n) => React.ReactNode;\n\nexport type { VerticalMenuDefaultItem };\n"],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import _defineProperty from"@babel/runtime/helpers/defineProperty";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";const _excluded=["items","onItemClick","getItemLabel","getItemIcon","getItemAs","getItemAttributes","getItemActive","getItemRef","getItemAdditionalClassName","size","form","className","getItemStatus","tooltipProps","getItemTooltip"];function ownKeys(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread(a){for(var b,c=1;c<arguments.length;c++)b=null==arguments[c]?{}:arguments[c],c%2?ownKeys(Object(b),!0).forEach(function(c){_defineProperty(a,c,b[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(b)):ownKeys(Object(b)).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))});return a}import React,{forwardRef}from"react";import{withDefaultRailGetters}from"../helpers";import{NavbarRailItem}from"../NavbarRailItem";import{defaultNavbarPropForm,defaultNavbarPropSize}from"../types";const NavbarRailRender=(a,b)=>{const c=withDefaultRailGetters(a),{items:d,onItemClick:f,getItemLabel:g,getItemIcon:h,getItemAs:i,getItemAttributes:j,getItemActive:k,getItemRef:l,getItemAdditionalClassName:m,size:r=defaultNavbarPropSize,form:s=defaultNavbarPropForm,className:n,getItemStatus:o,tooltipProps:p,getItemTooltip:q}=c,t=_objectWithoutProperties(c,_excluded);return React.createElement("div",Object.assign({},t,{ref:b,className:n}),d.map((a,b)=>React.createElement(NavbarRailItem,Object.assign({},(null===j||void 0===j?void 0:j(a))||{},{key:b,as:null===i||void 0===i?void 0:i(a),size:r,form:s,onClick:b=>null===f||void 0===f?void 0:f(a,{e:b}),icon:h(a),ref:null===l||void 0===l?void 0:l(a),label:g(a),tooltipProps:_objectSpread(_objectSpread({},p),{},{
|
|
1
|
+
import _defineProperty from"@babel/runtime/helpers/defineProperty";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";const _excluded=["items","onItemClick","getItemLabel","getItemIcon","getItemAs","getItemAttributes","getItemActive","getItemRef","getItemAdditionalClassName","size","form","className","getItemStatus","tooltipProps","getItemTooltip"];function ownKeys(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread(a){for(var b,c=1;c<arguments.length;c++)b=null==arguments[c]?{}:arguments[c],c%2?ownKeys(Object(b),!0).forEach(function(c){_defineProperty(a,c,b[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(b)):ownKeys(Object(b)).forEach(function(c){Object.defineProperty(a,c,Object.getOwnPropertyDescriptor(b,c))});return a}import React,{forwardRef}from"react";import{withDefaultRailGetters}from"../helpers";import{NavbarRailItem}from"../NavbarRailItem";import{defaultNavbarPropForm,defaultNavbarPropSize}from"../types";const NavbarRailRender=(a,b)=>{const c=withDefaultRailGetters(a),{items:d,onItemClick:f,getItemLabel:g,getItemIcon:h,getItemAs:i,getItemAttributes:j,getItemActive:k,getItemRef:l,getItemAdditionalClassName:m,size:r=defaultNavbarPropSize,form:s=defaultNavbarPropForm,className:n,getItemStatus:o,tooltipProps:p,getItemTooltip:q}=c,t=_objectWithoutProperties(c,_excluded);return React.createElement("div",Object.assign({},t,{ref:b,className:n}),d.map((a,b)=>React.createElement(NavbarRailItem,Object.assign({},(null===j||void 0===j?void 0:j(a))||{},{key:b,as:null===i||void 0===i?void 0:i(a),size:r,form:s,onClick:b=>null===f||void 0===f?void 0:f(a,{e:b}),icon:h(a),ref:null===l||void 0===l?void 0:l(a),label:g(a),tooltipProps:_objectSpread(_objectSpread({},p),{},{tooltipContent:q(a)}),active:k(a),status:o(a)}))))};export const NavbarRail=forwardRef(NavbarRailRender);
|
|
2
2
|
//# sourceMappingURL=NavbarRail.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavbarRail.js","names":["React","forwardRef","withDefaultRailGetters","NavbarRailItem","defaultNavbarPropForm","defaultNavbarPropSize","NavbarRailRender","props","ref","c","items","onItemClick","getItemLabel","getItemIcon","getItemAs","getItemAttributes","getItemActive","getItemRef","getItemAdditionalClassName","size","form","className","getItemStatus","tooltipProps","getItemTooltip","otherProps","_objectWithoutProperties","_excluded","createElement","Object","assign","map","item","index","key","as","onClick","e","icon","label","_objectSpread","
|
|
1
|
+
{"version":3,"file":"NavbarRail.js","names":["React","forwardRef","withDefaultRailGetters","NavbarRailItem","defaultNavbarPropForm","defaultNavbarPropSize","NavbarRailRender","props","ref","c","items","onItemClick","getItemLabel","getItemIcon","getItemAs","getItemAttributes","getItemActive","getItemRef","getItemAdditionalClassName","size","form","className","getItemStatus","tooltipProps","getItemTooltip","otherProps","_objectWithoutProperties","_excluded","createElement","Object","assign","map","item","index","key","as","onClick","e","icon","label","_objectSpread","tooltipContent","active","status","NavbarRail"],"sources":["../../../../../../src/components/Navbar/NavbarRail/NavbarRail.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\n\nimport { withDefaultRailGetters } from '../helpers';\nimport { NavbarRailItem } from '../NavbarRailItem';\nimport {\n defaultNavbarPropForm,\n defaultNavbarPropSize,\n NavbarRailComponent,\n NavbarRailProps,\n} from '../types';\n\nconst NavbarRailRender = (\n props: NavbarRailProps,\n ref: React.Ref<HTMLDivElement>,\n) => {\n const {\n items,\n onItemClick,\n getItemLabel,\n getItemIcon,\n getItemAs,\n getItemAttributes,\n getItemActive,\n getItemRef,\n getItemAdditionalClassName,\n size = defaultNavbarPropSize,\n form = defaultNavbarPropForm,\n className,\n getItemStatus,\n tooltipProps,\n getItemTooltip,\n\n ...otherProps\n } = withDefaultRailGetters(props);\n\n return (\n <div {...otherProps} ref={ref} className={className}>\n {items.map((item, index) => {\n return (\n <NavbarRailItem\n {...((getItemAttributes?.(item) ||\n {}) as JSX.IntrinsicElements['div'])}\n key={index}\n as={getItemAs?.(item)}\n size={size}\n form={form}\n onClick={(e) => onItemClick?.(item, { e })}\n icon={getItemIcon(item)}\n ref={getItemRef?.(item) as React.RefObject<HTMLDivElement>}\n label={getItemLabel(item)}\n tooltipProps={{\n ...tooltipProps,\n tooltipContent: getItemTooltip(item),\n }}\n active={getItemActive(item)}\n status={getItemStatus(item)}\n />\n );\n })}\n </div>\n );\n};\n\nexport const NavbarRail = forwardRef(NavbarRailRender) as NavbarRailComponent;\n"],"mappings":"m+BAAA,MAAO,CAAAA,KAAK,EAAIC,UAAU,KAAQ,OAAO,CAEzC,OAASC,sBAAsB,kBAC/B,OAASC,cAAc,yBACvB,OACEC,qBAAqB,CACrBC,qBAAqB,gBAKvB,KAAM,CAAAC,gBAAgB,CAAGA,CACvBC,CAAsB,CACtBC,CAA8B,GAC3B,CACH,MAAAC,CAAA,CAkBIP,sBAAsB,CAACK,CAAK,CAAC,CAlB3B,CACJG,KAAK,CAALA,CAAK,CACLC,WAAW,CAAXA,CAAW,CACXC,YAAY,CAAZA,CAAY,CACZC,WAAW,CAAXA,CAAW,CACXC,SAAS,CAATA,CAAS,CACTC,iBAAiB,CAAjBA,CAAiB,CACjBC,aAAa,CAAbA,CAAa,CACbC,UAAU,CAAVA,CAAU,CACVC,0BAA0B,CAA1BA,CAA0B,CAC1BC,IAAI,CAAJA,CAAI,CAAGd,qBAAqB,CAC5Be,IAAI,CAAJA,CAAI,CAAGhB,qBAAqB,CAC5BiB,SAAS,CAATA,CAAS,CACTC,aAAa,CAAbA,CAAa,CACbC,YAAY,CAAZA,CAAY,CACZC,cAAc,CAAdA,CAGF,CAAC,CAAAf,CAAA,CADIgB,CAAU,CAAAC,wBAAA,CAAAjB,CAAA,CAAAkB,SAAA,EAGf,MACE,CAAA3B,KAAA,CAAA4B,aAAA,OAAAC,MAAA,CAAAC,MAAA,IAASL,CAAU,EAAEjB,GAAG,CAAEA,CAAI,CAACa,SAAS,CAAEA,CAAU,GACjDX,CAAK,CAACqB,GAAG,CAAC,CAACC,CAAI,CAAEC,CAAK,GAEnBjC,KAAA,CAAA4B,aAAA,CAACzB,cAAc,CAAA0B,MAAA,CAAAC,MAAA,IACP,QAAAf,CAAiB,WAAjBA,CAAiB,QAAjBA,CAAiB,CAAGiB,CAAI,CAAC,GAC7B,CAAC,CAAC,EACJE,GAAG,CAAED,CAAM,CACXE,EAAE,QAAErB,CAAS,WAATA,CAAS,QAATA,CAAS,CAAGkB,CAAI,CAAE,CACtBb,IAAI,CAAEA,CAAK,CACXC,IAAI,CAAEA,CAAK,CACXgB,OAAO,CAAGC,CAAC,SAAK1B,CAAW,WAAXA,CAAW,QAAXA,CAAW,CAAGqB,CAAI,CAAE,CAAEK,CAAC,CAADA,CAAE,CAAC,CAAE,CAC3CC,IAAI,CAAEzB,CAAW,CAACmB,CAAI,CAAE,CACxBxB,GAAG,QAAES,CAAU,WAAVA,CAAU,QAAVA,CAAU,CAAGe,CAAI,CAAqC,CAC3DO,KAAK,CAAE3B,CAAY,CAACoB,CAAI,CAAE,CAC1BT,YAAY,CAAAiB,aAAA,CAAAA,aAAA,IACPjB,CAAY,MACfkB,cAAc,CAAEjB,CAAc,CAACQ,CAAI,CAAC,EACpC,CACFU,MAAM,CAAE1B,CAAa,CAACgB,CAAI,CAAE,CAC5BW,MAAM,CAAErB,CAAa,CAACU,CAAI,CAAE,EAC7B,CAEJ,CACE,CAET,CAAC,CAED,MAAO,MAAM,CAAAY,UAAU,CAAG3C,UAAU,CAACK,gBAAgB,CAAwB"}
|
|
@@ -2,5 +2,5 @@ import './NavbarRailItem.css';
|
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { NavbarRailItemProps } from '../types';
|
|
4
4
|
export declare const NavbarRailItem: import("@consta/uikit/__internal__/src/utils/types/PropsWithAsAttributes").ComponentWithAs<NavbarRailItemProps, "div"> | React.ComponentType<{
|
|
5
|
-
tooltipProps?: import("@consta/uikit/withTooltip").TooltipProps
|
|
5
|
+
tooltipProps?: import("@consta/uikit/withTooltip").TooltipProps;
|
|
6
6
|
}>;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { DefaultNavbarGroup, DefaultNavbarItem, DefaultNavbarRailItem, NavbarPropGetGroupKey, NavbarPropGetGroupLabel, NavbarPropGetGroupRightSide, NavbarPropGetItemActive, NavbarPropGetItemGroupId, NavbarPropGetItemIcon, NavbarPropGetItemLabel, NavbarPropGetItemRightSide, NavbarPropGetItemStatus, NavbarPropGetItemSubMenu, NavbarProps, NavbarRailPropGetItemTooltip, NavbarRailProps } from './types';
|
|
3
2
|
export declare function withDefaultGetters<ITEM = DefaultNavbarItem, GROUP = DefaultNavbarGroup>(props: NavbarProps<ITEM, GROUP>): {
|
|
4
3
|
items: ITEM[];
|
|
5
|
-
size?: "
|
|
6
|
-
form?: "
|
|
4
|
+
size?: import("./types").NavbarPropSize;
|
|
5
|
+
form?: import("./types").NavbarPropForm;
|
|
7
6
|
onItemClick?: import("./types").NavbarPropOnItemClick<ITEM> | undefined;
|
|
8
7
|
getItemLabel?: NavbarPropGetItemLabel<ITEM> | undefined;
|
|
9
8
|
getItemIcon?: NavbarPropGetItemIcon<ITEM> | undefined;
|
|
@@ -23,11 +22,11 @@ export declare function withDefaultGetters<ITEM = DefaultNavbarItem, GROUP = Def
|
|
|
23
22
|
sortGroup?: import("./types").NavbarPropSortGroup<ITEM, GROUP> | undefined;
|
|
24
23
|
getGroupAdditionalClassName?: import("./types").NavbarPropGetGroupAdditionalClassName<GROUP> | undefined;
|
|
25
24
|
} & Omit<import("react").HTMLAttributes<HTMLDivElement>, "css" | "items" | "onItemClick" | "getItemLabel" | "getItemIcon" | "form" | "size" | "getItemAs" | "getItemAttributes" | "groups" | "getItemSubMenu" | "getItemActive" | "getGroupKey" | "getGroupLabel" | "getItemRightSide" | "getItemGroupKey" | "getItemStatus" | "getItemRef" | "getItemAdditionalClassName" | "getGroupRightSide" | "sortGroup" | "getGroupAdditionalClassName"> & import("react").RefAttributes<HTMLDivElement> & (ITEM extends {
|
|
26
|
-
label:
|
|
25
|
+
label: DefaultNavbarItem["label"];
|
|
27
26
|
} ? {} : {
|
|
28
27
|
getItemLabel: NavbarPropGetItemLabel<ITEM>;
|
|
29
28
|
}) & (GROUP extends {
|
|
30
|
-
id:
|
|
29
|
+
id: DefaultNavbarGroup["id"];
|
|
31
30
|
} ? {} : {
|
|
32
31
|
getGroupKey: NavbarPropGetGroupKey<GROUP>;
|
|
33
32
|
}) & {
|
|
@@ -44,8 +43,8 @@ export declare function withDefaultGetters<ITEM = DefaultNavbarItem, GROUP = Def
|
|
|
44
43
|
};
|
|
45
44
|
export declare function withDefaultRailGetters<ITEM = NavbarRailProps>(props: NavbarRailProps<ITEM>): {
|
|
46
45
|
items: ITEM[];
|
|
47
|
-
size?: "
|
|
48
|
-
form?: "
|
|
46
|
+
size?: import("./types").NavbarPropSize;
|
|
47
|
+
form?: import("./types").NavbarPropForm;
|
|
49
48
|
onItemClick?: import("./types").NavbarPropOnItemClick<ITEM> | undefined;
|
|
50
49
|
getItemLabel?: import("./types").NavbarRailPropGetItemLabel<ITEM> | undefined;
|
|
51
50
|
getItemIcon?: import("./types").NavbarRailPropGetItemIcon<ITEM> | undefined;
|
|
@@ -56,9 +55,9 @@ export declare function withDefaultRailGetters<ITEM = NavbarRailProps>(props: Na
|
|
|
56
55
|
getItemRef?: import("./types").NavbarPropGetItemRef<ITEM> | undefined;
|
|
57
56
|
getItemAdditionalClassName?: import("./types").NavbarPropGetItemAdditionalClassName<ITEM> | undefined;
|
|
58
57
|
getItemTooltip?: NavbarRailPropGetItemTooltip<ITEM> | undefined;
|
|
59
|
-
tooltipProps?: Omit<import("@consta/uikit/Tooltip").TooltipProps, "children" | "position" | "
|
|
58
|
+
tooltipProps?: Omit<import("@consta/uikit/Tooltip").TooltipProps, "children" | "position" | "equalAnchorWidth" | "anchorRef">;
|
|
60
59
|
} & Omit<import("react").HTMLAttributes<HTMLDivElement>, "css" | "items" | "onItemClick" | "getItemLabel" | "getItemIcon" | "form" | "size" | "getItemAs" | "getItemAttributes" | "getItemActive" | "getItemStatus" | "getItemRef" | "getItemAdditionalClassName" | "getItemTooltip" | "tooltipProps"> & import("react").RefAttributes<HTMLDivElement> & (ITEM extends {
|
|
61
|
-
icon:
|
|
60
|
+
icon: DefaultNavbarRailItem["icon"];
|
|
62
61
|
} ? {} : {
|
|
63
62
|
getItemIcon: import("./types").NavbarRailPropGetItemIcon<ITEM>;
|
|
64
63
|
}) & {
|
|
@@ -88,7 +88,7 @@ export type NavbarProps<ITEM = DefaultNavbarItem, GROUP = DefaultNavbarGroup> =
|
|
|
88
88
|
} ? {} : {
|
|
89
89
|
getGroupKey: NavbarPropGetGroupKey<GROUP>;
|
|
90
90
|
});
|
|
91
|
-
export type NavbarComponent = <ITEM = DefaultNavbarItem, GROUP = DefaultNavbarGroup>(props: NavbarProps<ITEM, GROUP>) => React.
|
|
91
|
+
export type NavbarComponent = <ITEM = DefaultNavbarItem, GROUP = DefaultNavbarGroup>(props: NavbarProps<ITEM, GROUP>) => React.ReactNode;
|
|
92
92
|
export type NavbarRailProps<ITEM = DefaultNavbarRailItem> = PropsWithHTMLAttributesAndRef<{
|
|
93
93
|
items: ITEM[];
|
|
94
94
|
size?: NavbarPropSize;
|
|
@@ -109,7 +109,7 @@ export type NavbarRailProps<ITEM = DefaultNavbarRailItem> = PropsWithHTMLAttribu
|
|
|
109
109
|
} ? {} : {
|
|
110
110
|
getItemIcon: NavbarRailPropGetItemIcon<ITEM>;
|
|
111
111
|
});
|
|
112
|
-
export type NavbarRailComponent = <ITEM = DefaultNavbarRailItem>(props: NavbarRailProps<ITEM>) => React.
|
|
112
|
+
export type NavbarRailComponent = <ITEM = DefaultNavbarRailItem>(props: NavbarRailProps<ITEM>) => React.ReactNode;
|
|
113
113
|
export type NavbarItemProps<ITEM = DefaultNavbarItem> = PropsWithHTMLAttributesAndRef<{
|
|
114
114
|
size: NavbarPropSize;
|
|
115
115
|
item: ITEM;
|
|
@@ -127,7 +127,7 @@ export type NavbarItemProps<ITEM = DefaultNavbarItem> = PropsWithHTMLAttributesA
|
|
|
127
127
|
getItemAdditionalClassName: NavbarPropGetItemAdditionalClassName<ITEM> | undefined;
|
|
128
128
|
level: number;
|
|
129
129
|
}, HTMLDivElement>;
|
|
130
|
-
export type NavbarItemComponent = <ITEM = DefaultNavbarItem>(props: NavbarItemProps<ITEM>) => React.
|
|
130
|
+
export type NavbarItemComponent = <ITEM = DefaultNavbarItem>(props: NavbarItemProps<ITEM>) => React.ReactNode;
|
|
131
131
|
export type NavbarRailItemProps = PropsWithHTMLAttributesAndRef<{
|
|
132
132
|
size?: NavbarPropSize;
|
|
133
133
|
form?: NavbarPropForm;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","names":["navbarPropSize","defaultNavbarPropSize","navbarPropForm","defaultNavbarPropForm"],"sources":["../../../../../src/components/Navbar/types.ts"],"sourcesContent":["import { IconComponent } from '@consta/icons/Icon';\nimport { Group } from '@consta/uikit/__internal__/src/utils/getGroups';\nimport {\n AsAttributes,\n AsTags,\n} from '@consta/uikit/__internal__/src/utils/types/AsTags';\nimport { PropsWithHTMLAttributesAndRef } from '@consta/uikit/__internal__/src/utils/types/PropsWithHTMLAttributes';\nimport { BadgePropStatus } from '@consta/uikit/Badge';\nimport { TooltipProps } from '@consta/uikit/Tooltip';\nimport React from 'react';\n\nexport const navbarPropSize = ['s', 'm'] as const;\nexport type NavbarPropSize = (typeof navbarPropSize)[number];\nexport const defaultNavbarPropSize: NavbarPropSize = 'm';\n\nexport const navbarPropForm = ['default', 'brick', 'round'] as const;\nexport type NavbarPropForm = (typeof navbarPropForm)[number];\nexport const defaultNavbarPropForm = navbarPropForm[0];\n\nexport type DefaultNavbarGroup = {\n id: string | number;\n label?: string;\n rightSide?: React.ReactNode;\n};\n\nexport type DefaultNavbarItem = {\n label: string;\n status?: BadgePropStatus;\n groupId?: string | number;\n icon?: IconComponent;\n rightSide?: React.ReactNode;\n active?: boolean;\n subMenu?: DefaultNavbarItem[];\n};\n\nexport type DefaultNavbarRailItem = {\n label: string;\n icon: IconComponent;\n status?: BadgePropStatus;\n active?: boolean;\n tooltip?: React.ReactNode;\n};\n\nexport type NavbarPropOnItemClick<ITEM> = (\n item: ITEM,\n params: {\n e: React.MouseEvent;\n },\n) => void;\n\n// ITEMS\n\nexport type NavbarPropGetItemLabel<ITEM> = (item: ITEM) => string;\nexport type NavbarRailPropGetItemLabel<ITEM> = (\n item: ITEM,\n) => string | undefined;\n\nexport type NavbarPropGetItemAdditionalClassName<ITEM> = (item: ITEM) => string;\n\nexport type NavbarPropGetItemDisabled<ITEM> = (\n item: ITEM,\n) => boolean | undefined;\n\nexport type NavbarPropGetItemActive<ITEM> = (item: ITEM) => boolean | undefined;\n\nexport type NavbarPropGetItemGroupId<ITEM> = (\n item: ITEM,\n) => string | number | undefined;\n\nexport type NavbarPropGetItemLeftSide<ITEM> = (\n item: ITEM,\n) => React.ReactNode | undefined;\n\nexport type NavbarPropGetItemIcon<ITEM> = (\n item: ITEM,\n) => IconComponent | undefined;\n\nexport type NavbarRailPropGetItemIcon<ITEM> = (item: ITEM) => IconComponent;\n\nexport type NavbarPropGetItemRightSide<ITEM> = (\n item: ITEM,\n) => React.ReactNode | undefined;\n\nexport type NavbarPropGetItemRightIcon<ITEM> = (\n item: ITEM,\n) => IconComponent | undefined;\n\nexport type NavbarPropGetItemAs<ITEM> = (item: ITEM) => AsTags | undefined;\n\nexport type NavbarPropGetItemAttributes<ITEM> = (\n item: ITEM,\n) => AsAttributes | undefined;\n\nexport type NavbarPropSortGroup<ITEM, GROUP> = (\n a: Group<ITEM, GROUP>,\n b: Group<ITEM, GROUP>,\n) => number;\n\n// GROUPS\nexport type NavbarPropGetGroupKey<GROUP> = (\n item: GROUP,\n) => string | number | undefined;\n\nexport type NavbarPropGetGroupAdditionalClassName<GROUP> = (\n item: GROUP,\n) => string;\n\nexport type NavbarPropGetGroupLabel<GROUP> = (\n item: GROUP,\n) => string | undefined;\nexport type NavbarPropGetGroupRightSide<GROUP> = (\n item: GROUP,\n) => React.ReactNode | undefined;\n\nexport type NavbarPropGetItemRef<ITEM> = (\n item: ITEM,\n) => React.RefObject<HTMLElement> | undefined;\n\nexport type NavbarPropGetItemStatus<ITEM> = (\n item: ITEM,\n) => BadgePropStatus | undefined;\n\nexport type NavbarPropGetItemSubMenu<ITEM> = (item: ITEM) => ITEM[] | undefined;\nexport type NavbarRailPropGetItemTooltip<ITEM> = (\n item: ITEM,\n) => React.ReactNode | undefined;\n\nexport type NavbarProps<\n ITEM = DefaultNavbarItem,\n GROUP = DefaultNavbarGroup,\n> = PropsWithHTMLAttributesAndRef<\n {\n items: ITEM[];\n size?: NavbarPropSize;\n form?: NavbarPropForm;\n onItemClick?: NavbarPropOnItemClick<ITEM>;\n getItemLabel?: NavbarPropGetItemLabel<ITEM>;\n getItemIcon?: NavbarPropGetItemIcon<ITEM>;\n getItemActive?: NavbarPropGetItemActive<ITEM>;\n getItemRightSide?: NavbarPropGetItemRightSide<ITEM>;\n getItemStatus?: NavbarPropGetItemStatus<ITEM>;\n getItemGroupKey?: NavbarPropGetItemGroupId<ITEM>;\n getItemAs?: NavbarPropGetItemAs<ITEM>;\n getItemAttributes?: NavbarPropGetItemAttributes<ITEM>;\n getItemRef?: NavbarPropGetItemRef<ITEM>;\n getItemSubMenu?: NavbarPropGetItemSubMenu<ITEM>;\n getItemAdditionalClassName?: NavbarPropGetItemAdditionalClassName<ITEM>;\n groups?: GROUP[];\n getGroupKey?: NavbarPropGetGroupKey<GROUP>;\n getGroupLabel?: NavbarPropGetGroupLabel<GROUP>;\n getGroupRightSide?: NavbarPropGetGroupRightSide<GROUP>;\n sortGroup?: NavbarPropSortGroup<ITEM, GROUP>;\n getGroupAdditionalClassName?: NavbarPropGetGroupAdditionalClassName<GROUP>;\n },\n HTMLDivElement\n> &\n (ITEM extends { label: DefaultNavbarItem['label'] }\n ? {}\n : { getItemLabel: NavbarPropGetItemLabel<ITEM> }) &\n (GROUP extends { id: DefaultNavbarGroup['id'] }\n ? {}\n : { getGroupKey: NavbarPropGetGroupKey<GROUP> });\n\nexport type NavbarComponent = <\n ITEM = DefaultNavbarItem,\n GROUP = DefaultNavbarGroup,\n>(\n props: NavbarProps<ITEM, GROUP>,\n) => React.
|
|
1
|
+
{"version":3,"file":"types.js","names":["navbarPropSize","defaultNavbarPropSize","navbarPropForm","defaultNavbarPropForm"],"sources":["../../../../../src/components/Navbar/types.ts"],"sourcesContent":["import { IconComponent } from '@consta/icons/Icon';\nimport { Group } from '@consta/uikit/__internal__/src/utils/getGroups';\nimport {\n AsAttributes,\n AsTags,\n} from '@consta/uikit/__internal__/src/utils/types/AsTags';\nimport { PropsWithHTMLAttributesAndRef } from '@consta/uikit/__internal__/src/utils/types/PropsWithHTMLAttributes';\nimport { BadgePropStatus } from '@consta/uikit/Badge';\nimport { TooltipProps } from '@consta/uikit/Tooltip';\nimport React from 'react';\n\nexport const navbarPropSize = ['s', 'm'] as const;\nexport type NavbarPropSize = (typeof navbarPropSize)[number];\nexport const defaultNavbarPropSize: NavbarPropSize = 'm';\n\nexport const navbarPropForm = ['default', 'brick', 'round'] as const;\nexport type NavbarPropForm = (typeof navbarPropForm)[number];\nexport const defaultNavbarPropForm = navbarPropForm[0];\n\nexport type DefaultNavbarGroup = {\n id: string | number;\n label?: string;\n rightSide?: React.ReactNode;\n};\n\nexport type DefaultNavbarItem = {\n label: string;\n status?: BadgePropStatus;\n groupId?: string | number;\n icon?: IconComponent;\n rightSide?: React.ReactNode;\n active?: boolean;\n subMenu?: DefaultNavbarItem[];\n};\n\nexport type DefaultNavbarRailItem = {\n label: string;\n icon: IconComponent;\n status?: BadgePropStatus;\n active?: boolean;\n tooltip?: React.ReactNode;\n};\n\nexport type NavbarPropOnItemClick<ITEM> = (\n item: ITEM,\n params: {\n e: React.MouseEvent;\n },\n) => void;\n\n// ITEMS\n\nexport type NavbarPropGetItemLabel<ITEM> = (item: ITEM) => string;\nexport type NavbarRailPropGetItemLabel<ITEM> = (\n item: ITEM,\n) => string | undefined;\n\nexport type NavbarPropGetItemAdditionalClassName<ITEM> = (item: ITEM) => string;\n\nexport type NavbarPropGetItemDisabled<ITEM> = (\n item: ITEM,\n) => boolean | undefined;\n\nexport type NavbarPropGetItemActive<ITEM> = (item: ITEM) => boolean | undefined;\n\nexport type NavbarPropGetItemGroupId<ITEM> = (\n item: ITEM,\n) => string | number | undefined;\n\nexport type NavbarPropGetItemLeftSide<ITEM> = (\n item: ITEM,\n) => React.ReactNode | undefined;\n\nexport type NavbarPropGetItemIcon<ITEM> = (\n item: ITEM,\n) => IconComponent | undefined;\n\nexport type NavbarRailPropGetItemIcon<ITEM> = (item: ITEM) => IconComponent;\n\nexport type NavbarPropGetItemRightSide<ITEM> = (\n item: ITEM,\n) => React.ReactNode | undefined;\n\nexport type NavbarPropGetItemRightIcon<ITEM> = (\n item: ITEM,\n) => IconComponent | undefined;\n\nexport type NavbarPropGetItemAs<ITEM> = (item: ITEM) => AsTags | undefined;\n\nexport type NavbarPropGetItemAttributes<ITEM> = (\n item: ITEM,\n) => AsAttributes | undefined;\n\nexport type NavbarPropSortGroup<ITEM, GROUP> = (\n a: Group<ITEM, GROUP>,\n b: Group<ITEM, GROUP>,\n) => number;\n\n// GROUPS\nexport type NavbarPropGetGroupKey<GROUP> = (\n item: GROUP,\n) => string | number | undefined;\n\nexport type NavbarPropGetGroupAdditionalClassName<GROUP> = (\n item: GROUP,\n) => string;\n\nexport type NavbarPropGetGroupLabel<GROUP> = (\n item: GROUP,\n) => string | undefined;\nexport type NavbarPropGetGroupRightSide<GROUP> = (\n item: GROUP,\n) => React.ReactNode | undefined;\n\nexport type NavbarPropGetItemRef<ITEM> = (\n item: ITEM,\n) => React.RefObject<HTMLElement> | undefined;\n\nexport type NavbarPropGetItemStatus<ITEM> = (\n item: ITEM,\n) => BadgePropStatus | undefined;\n\nexport type NavbarPropGetItemSubMenu<ITEM> = (item: ITEM) => ITEM[] | undefined;\nexport type NavbarRailPropGetItemTooltip<ITEM> = (\n item: ITEM,\n) => React.ReactNode | undefined;\n\nexport type NavbarProps<\n ITEM = DefaultNavbarItem,\n GROUP = DefaultNavbarGroup,\n> = PropsWithHTMLAttributesAndRef<\n {\n items: ITEM[];\n size?: NavbarPropSize;\n form?: NavbarPropForm;\n onItemClick?: NavbarPropOnItemClick<ITEM>;\n getItemLabel?: NavbarPropGetItemLabel<ITEM>;\n getItemIcon?: NavbarPropGetItemIcon<ITEM>;\n getItemActive?: NavbarPropGetItemActive<ITEM>;\n getItemRightSide?: NavbarPropGetItemRightSide<ITEM>;\n getItemStatus?: NavbarPropGetItemStatus<ITEM>;\n getItemGroupKey?: NavbarPropGetItemGroupId<ITEM>;\n getItemAs?: NavbarPropGetItemAs<ITEM>;\n getItemAttributes?: NavbarPropGetItemAttributes<ITEM>;\n getItemRef?: NavbarPropGetItemRef<ITEM>;\n getItemSubMenu?: NavbarPropGetItemSubMenu<ITEM>;\n getItemAdditionalClassName?: NavbarPropGetItemAdditionalClassName<ITEM>;\n groups?: GROUP[];\n getGroupKey?: NavbarPropGetGroupKey<GROUP>;\n getGroupLabel?: NavbarPropGetGroupLabel<GROUP>;\n getGroupRightSide?: NavbarPropGetGroupRightSide<GROUP>;\n sortGroup?: NavbarPropSortGroup<ITEM, GROUP>;\n getGroupAdditionalClassName?: NavbarPropGetGroupAdditionalClassName<GROUP>;\n },\n HTMLDivElement\n> &\n (ITEM extends { label: DefaultNavbarItem['label'] }\n ? {}\n : { getItemLabel: NavbarPropGetItemLabel<ITEM> }) &\n (GROUP extends { id: DefaultNavbarGroup['id'] }\n ? {}\n : { getGroupKey: NavbarPropGetGroupKey<GROUP> });\n\nexport type NavbarComponent = <\n ITEM = DefaultNavbarItem,\n GROUP = DefaultNavbarGroup,\n>(\n props: NavbarProps<ITEM, GROUP>,\n) => React.ReactNode;\n\nexport type NavbarRailProps<ITEM = DefaultNavbarRailItem> =\n PropsWithHTMLAttributesAndRef<\n {\n items: ITEM[];\n size?: NavbarPropSize;\n form?: NavbarPropForm;\n onItemClick?: NavbarPropOnItemClick<ITEM>;\n getItemLabel?: NavbarRailPropGetItemLabel<ITEM>;\n getItemIcon?: NavbarRailPropGetItemIcon<ITEM>;\n getItemActive?: NavbarPropGetItemActive<ITEM>;\n getItemStatus?: NavbarPropGetItemStatus<ITEM>;\n getItemAs?: NavbarPropGetItemAs<ITEM>;\n getItemAttributes?: NavbarPropGetItemAttributes<ITEM>;\n getItemRef?: NavbarPropGetItemRef<ITEM>;\n getItemAdditionalClassName?: NavbarPropGetItemAdditionalClassName<ITEM>;\n getItemTooltip?: NavbarRailPropGetItemTooltip<ITEM>;\n tooltipProps?: Omit<\n TooltipProps,\n 'children' | 'position' | 'equalAnchorWidth' | 'anchorRef'\n >;\n },\n HTMLDivElement\n > &\n (ITEM extends { icon: DefaultNavbarRailItem['icon'] }\n ? {}\n : { getItemIcon: NavbarRailPropGetItemIcon<ITEM> });\n\nexport type NavbarRailComponent = <ITEM = DefaultNavbarRailItem>(\n props: NavbarRailProps<ITEM>,\n) => React.ReactNode;\n\nexport type NavbarItemProps<ITEM = DefaultNavbarItem> =\n PropsWithHTMLAttributesAndRef<\n {\n size: NavbarPropSize;\n item: ITEM;\n form: NavbarPropForm;\n onItemClick: NavbarPropOnItemClick<ITEM> | undefined;\n getItemLabel: NavbarPropGetItemLabel<ITEM>;\n getItemIcon: NavbarPropGetItemIcon<ITEM>;\n getItemActive: NavbarPropGetItemActive<ITEM>;\n getItemRightSide: NavbarPropGetItemRightSide<ITEM>;\n getItemStatus: NavbarPropGetItemStatus<ITEM> | undefined;\n getItemAs: NavbarPropGetItemAs<ITEM> | undefined;\n getItemAttributes: NavbarPropGetItemAttributes<ITEM> | undefined;\n getItemRef: NavbarPropGetItemRef<ITEM> | undefined;\n getItemSubMenu: NavbarPropGetItemSubMenu<ITEM> | undefined;\n getItemAdditionalClassName:\n | NavbarPropGetItemAdditionalClassName<ITEM>\n | undefined;\n level: number;\n },\n HTMLDivElement\n >;\n\nexport type NavbarItemComponent = <ITEM = DefaultNavbarItem>(\n props: NavbarItemProps<ITEM>,\n) => React.ReactNode;\n\nexport type NavbarRailItemProps = PropsWithHTMLAttributesAndRef<\n {\n size?: NavbarPropSize;\n form?: NavbarPropForm;\n icon?: IconComponent;\n active?: boolean;\n status?: BadgePropStatus;\n label?: string;\n },\n HTMLDivElement\n>;\n"],"mappings":"AAWA,MAAO,MAAM,CAAAA,cAAc,CAAG,CAAC,GAAG,CAAE,GAAG,CAAU,CAEjD,MAAO,MAAM,CAAAC,qBAAqC,CAAG,GAAG,CAExD,MAAO,MAAM,CAAAC,cAAc,CAAG,CAAC,SAAS,CAAE,OAAO,CAAE,OAAO,CAAU,CAEpE,MAAO,MAAM,CAAAC,qBAAqB,CAAGD,cAAc,CAAC,CAAC,CAAC"}
|