@instructure/ui-global-nav 0.0.0-stage → 11.7.10

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.
Files changed (139) hide show
  1. package/CHANGELOG.md +0 -0
  2. package/LICENSE.md +28 -0
  3. package/README.md +25 -2
  4. package/es/GlobalNav/v1/CollapseButton/index.js +80 -0
  5. package/es/GlobalNav/v1/CollapseButton/props.js +1 -0
  6. package/es/GlobalNav/v1/CollapseButton/styles.js +64 -0
  7. package/es/GlobalNav/v1/CollapsedSubNav/index.js +59 -0
  8. package/es/GlobalNav/v1/CollapsedSubNav/props.js +1 -0
  9. package/es/GlobalNav/v1/CollapsedSubNav/styles.js +82 -0
  10. package/es/GlobalNav/v1/InstitutionLogo/index.js +93 -0
  11. package/es/GlobalNav/v1/InstitutionLogo/props.js +1 -0
  12. package/es/GlobalNav/v1/InstitutionLogo/styles.js +69 -0
  13. package/es/GlobalNav/v1/MainNavItem/index.js +129 -0
  14. package/es/GlobalNav/v1/MainNavItem/props.js +1 -0
  15. package/es/GlobalNav/v1/MainNavItem/styles.js +117 -0
  16. package/es/GlobalNav/v1/SubNav/index.js +121 -0
  17. package/es/GlobalNav/v1/SubNav/props.js +1 -0
  18. package/es/GlobalNav/v1/SubNav/styles.js +52 -0
  19. package/es/GlobalNav/v1/SubNavItem/index.js +78 -0
  20. package/es/GlobalNav/v1/SubNavItem/props.js +1 -0
  21. package/es/GlobalNav/v1/SubNavItem/styles.js +94 -0
  22. package/es/GlobalNav/v1/SubNavLevel/index.js +160 -0
  23. package/es/GlobalNav/v1/SubNavLevel/props.js +1 -0
  24. package/es/GlobalNav/v1/SubNavLevel/styles.js +94 -0
  25. package/es/GlobalNav/v1/index.js +222 -0
  26. package/es/GlobalNav/v1/props.js +28 -0
  27. package/es/GlobalNav/v1/styles.js +110 -0
  28. package/es/GlobalNav/v1/utils/getItemElementProps.js +64 -0
  29. package/es/exports/a.js +24 -0
  30. package/lib/GlobalNav/v1/CollapseButton/index.js +85 -0
  31. package/lib/GlobalNav/v1/CollapseButton/props.js +5 -0
  32. package/lib/GlobalNav/v1/CollapseButton/styles.js +70 -0
  33. package/lib/GlobalNav/v1/CollapsedSubNav/index.js +64 -0
  34. package/lib/GlobalNav/v1/CollapsedSubNav/props.js +5 -0
  35. package/lib/GlobalNav/v1/CollapsedSubNav/styles.js +88 -0
  36. package/lib/GlobalNav/v1/InstitutionLogo/index.js +98 -0
  37. package/lib/GlobalNav/v1/InstitutionLogo/props.js +5 -0
  38. package/lib/GlobalNav/v1/InstitutionLogo/styles.js +75 -0
  39. package/lib/GlobalNav/v1/MainNavItem/index.js +134 -0
  40. package/lib/GlobalNav/v1/MainNavItem/props.js +5 -0
  41. package/lib/GlobalNav/v1/MainNavItem/styles.js +123 -0
  42. package/lib/GlobalNav/v1/SubNav/index.js +128 -0
  43. package/lib/GlobalNav/v1/SubNav/props.js +5 -0
  44. package/lib/GlobalNav/v1/SubNav/styles.js +58 -0
  45. package/lib/GlobalNav/v1/SubNavItem/index.js +83 -0
  46. package/lib/GlobalNav/v1/SubNavItem/props.js +5 -0
  47. package/lib/GlobalNav/v1/SubNavItem/styles.js +100 -0
  48. package/lib/GlobalNav/v1/SubNavLevel/index.js +165 -0
  49. package/lib/GlobalNav/v1/SubNavLevel/props.js +5 -0
  50. package/lib/GlobalNav/v1/SubNavLevel/styles.js +100 -0
  51. package/lib/GlobalNav/v1/index.js +228 -0
  52. package/lib/GlobalNav/v1/props.js +33 -0
  53. package/lib/GlobalNav/v1/styles.js +116 -0
  54. package/lib/GlobalNav/v1/utils/getItemElementProps.js +70 -0
  55. package/lib/exports/a.js +12 -0
  56. package/lib/package.json +1 -0
  57. package/package.json +77 -3
  58. package/src/GlobalNav/v1/CollapseButton/index.tsx +87 -0
  59. package/src/GlobalNav/v1/CollapseButton/props.ts +64 -0
  60. package/src/GlobalNav/v1/CollapseButton/styles.ts +76 -0
  61. package/src/GlobalNav/v1/CollapsedSubNav/index.tsx +60 -0
  62. package/src/GlobalNav/v1/CollapsedSubNav/props.ts +42 -0
  63. package/src/GlobalNav/v1/CollapsedSubNav/styles.ts +92 -0
  64. package/src/GlobalNav/v1/InstitutionLogo/index.tsx +86 -0
  65. package/src/GlobalNav/v1/InstitutionLogo/props.ts +42 -0
  66. package/src/GlobalNav/v1/InstitutionLogo/styles.ts +82 -0
  67. package/src/GlobalNav/v1/MainNavItem/index.tsx +132 -0
  68. package/src/GlobalNav/v1/MainNavItem/props.ts +65 -0
  69. package/src/GlobalNav/v1/MainNavItem/styles.ts +137 -0
  70. package/src/GlobalNav/v1/README.md +234 -0
  71. package/src/GlobalNav/v1/SubNav/index.tsx +132 -0
  72. package/src/GlobalNav/v1/SubNav/props.ts +81 -0
  73. package/src/GlobalNav/v1/SubNav/styles.ts +58 -0
  74. package/src/GlobalNav/v1/SubNavItem/index.tsx +79 -0
  75. package/src/GlobalNav/v1/SubNavItem/props.ts +48 -0
  76. package/src/GlobalNav/v1/SubNavItem/styles.ts +110 -0
  77. package/src/GlobalNav/v1/SubNavLevel/index.tsx +193 -0
  78. package/src/GlobalNav/v1/SubNavLevel/props.ts +75 -0
  79. package/src/GlobalNav/v1/SubNavLevel/styles.ts +103 -0
  80. package/src/GlobalNav/v1/index.tsx +256 -0
  81. package/src/GlobalNav/v1/props.ts +328 -0
  82. package/src/GlobalNav/v1/styles.ts +132 -0
  83. package/src/GlobalNav/v1/utils/getItemElementProps.ts +80 -0
  84. package/src/exports/a.ts +35 -0
  85. package/tsconfig.build.json +53 -0
  86. package/tsconfig.build.tsbuildinfo +1 -0
  87. package/tsconfig.json +4 -0
  88. package/types/GlobalNav/v1/CollapseButton/index.d.ts +11 -0
  89. package/types/GlobalNav/v1/CollapseButton/index.d.ts.map +1 -0
  90. package/types/GlobalNav/v1/CollapseButton/props.d.ts +31 -0
  91. package/types/GlobalNav/v1/CollapseButton/props.d.ts.map +1 -0
  92. package/types/GlobalNav/v1/CollapseButton/styles.d.ts +22 -0
  93. package/types/GlobalNav/v1/CollapseButton/styles.d.ts.map +1 -0
  94. package/types/GlobalNav/v1/CollapsedSubNav/index.d.ts +11 -0
  95. package/types/GlobalNav/v1/CollapsedSubNav/index.d.ts.map +1 -0
  96. package/types/GlobalNav/v1/CollapsedSubNav/props.d.ts +15 -0
  97. package/types/GlobalNav/v1/CollapsedSubNav/props.d.ts.map +1 -0
  98. package/types/GlobalNav/v1/CollapsedSubNav/styles.d.ts +14 -0
  99. package/types/GlobalNav/v1/CollapsedSubNav/styles.d.ts.map +1 -0
  100. package/types/GlobalNav/v1/InstitutionLogo/index.d.ts +11 -0
  101. package/types/GlobalNav/v1/InstitutionLogo/index.d.ts.map +1 -0
  102. package/types/GlobalNav/v1/InstitutionLogo/props.d.ts +15 -0
  103. package/types/GlobalNav/v1/InstitutionLogo/props.d.ts.map +1 -0
  104. package/types/GlobalNav/v1/InstitutionLogo/styles.d.ts +20 -0
  105. package/types/GlobalNav/v1/InstitutionLogo/styles.d.ts.map +1 -0
  106. package/types/GlobalNav/v1/MainNavItem/index.d.ts +11 -0
  107. package/types/GlobalNav/v1/MainNavItem/index.d.ts.map +1 -0
  108. package/types/GlobalNav/v1/MainNavItem/props.d.ts +32 -0
  109. package/types/GlobalNav/v1/MainNavItem/props.d.ts.map +1 -0
  110. package/types/GlobalNav/v1/MainNavItem/styles.d.ts +19 -0
  111. package/types/GlobalNav/v1/MainNavItem/styles.d.ts.map +1 -0
  112. package/types/GlobalNav/v1/SubNav/index.d.ts +11 -0
  113. package/types/GlobalNav/v1/SubNav/index.d.ts.map +1 -0
  114. package/types/GlobalNav/v1/SubNav/props.d.ts +52 -0
  115. package/types/GlobalNav/v1/SubNav/props.d.ts.map +1 -0
  116. package/types/GlobalNav/v1/SubNav/styles.d.ts +13 -0
  117. package/types/GlobalNav/v1/SubNav/styles.d.ts.map +1 -0
  118. package/types/GlobalNav/v1/SubNavItem/index.d.ts +11 -0
  119. package/types/GlobalNav/v1/SubNavItem/index.d.ts.map +1 -0
  120. package/types/GlobalNav/v1/SubNavItem/props.d.ts +20 -0
  121. package/types/GlobalNav/v1/SubNavItem/props.d.ts.map +1 -0
  122. package/types/GlobalNav/v1/SubNavItem/styles.d.ts +18 -0
  123. package/types/GlobalNav/v1/SubNavItem/styles.d.ts.map +1 -0
  124. package/types/GlobalNav/v1/SubNavLevel/index.d.ts +11 -0
  125. package/types/GlobalNav/v1/SubNavLevel/index.d.ts.map +1 -0
  126. package/types/GlobalNav/v1/SubNavLevel/props.d.ts +45 -0
  127. package/types/GlobalNav/v1/SubNavLevel/props.d.ts.map +1 -0
  128. package/types/GlobalNav/v1/SubNavLevel/styles.d.ts +14 -0
  129. package/types/GlobalNav/v1/SubNavLevel/styles.d.ts.map +1 -0
  130. package/types/GlobalNav/v1/index.d.ts +59 -0
  131. package/types/GlobalNav/v1/index.d.ts.map +1 -0
  132. package/types/GlobalNav/v1/props.d.ts +247 -0
  133. package/types/GlobalNav/v1/props.d.ts.map +1 -0
  134. package/types/GlobalNav/v1/styles.d.ts +23 -0
  135. package/types/GlobalNav/v1/styles.d.ts.map +1 -0
  136. package/types/GlobalNav/v1/utils/getItemElementProps.d.ts +37 -0
  137. package/types/GlobalNav/v1/utils/getItemElementProps.d.ts.map +1 -0
  138. package/types/exports/a.d.ts +3 -0
  139. package/types/exports/a.d.ts.map +1 -0
@@ -0,0 +1,247 @@
1
+ import type { AnchorHTMLAttributes, ChangeEvent, MouseEvent, SyntheticEvent } from 'react';
2
+ import type { ComponentStyle, NewThemeOverrideProp } from '@instructure/emotion';
3
+ import type { OtherHTMLAttributes, Renderable } from '@instructure/shared-types';
4
+ import type { NewComponentTypes } from '@instructure/ui-themes';
5
+ type GlobalNavCountLabel = string | ((count: number) => string);
6
+ type GlobalNavElementProps = Pick<AnchorHTMLAttributes<HTMLElement>, 'id' | 'className' | 'target' | 'rel'> & {
7
+ [key: `data-${string}`]: string | number | boolean | undefined;
8
+ };
9
+ type GlobalNavSubNavItem = {
10
+ /**
11
+ * Identifies the item in `openSubNav` and is its React key, but isn't rendered to the DOM.
12
+ */
13
+ itemID: string;
14
+ /**
15
+ * The visible text and accessible name of the item.
16
+ */
17
+ label: string;
18
+ /**
19
+ * The URL of the page, ignored for items with a `subNav`.
20
+ */
21
+ href?: string;
22
+ /**
23
+ * Called when the user activates the item, also when it opens a deeper level.
24
+ */
25
+ onClick?: (event: MouseEvent<HTMLElement>) => void;
26
+ /**
27
+ * Whether the item is the current page, which sets `aria-current="page"`.
28
+ */
29
+ current?: boolean;
30
+ /**
31
+ * The deeper level that the item opens as a disclosure button.
32
+ */
33
+ subNav?: GlobalNavSubNav;
34
+ /**
35
+ * HTML attributes for the item's link or button: `id`, `className`, `target`, `rel` and `data-*`.
36
+ */
37
+ elementProps?: GlobalNavElementProps;
38
+ };
39
+ type GlobalNavMainNavItem = GlobalNavSubNavItem & {
40
+ /**
41
+ * The icon of the rail item.
42
+ */
43
+ icon: Renderable;
44
+ /**
45
+ * The number in the badge, which is hidden when it is 0 or missing.
46
+ */
47
+ badgeCount?: number;
48
+ /**
49
+ * Screen reader text of the badge.
50
+ */
51
+ badgeLabel?: GlobalNavCountLabel;
52
+ };
53
+ type GlobalNavSubNavWithItems = {
54
+ /**
55
+ * The heading of the panel.
56
+ */
57
+ title: string;
58
+ /**
59
+ * The links of the panel, and buttons that open a deeper level.
60
+ */
61
+ items?: GlobalNavSubNavItem[];
62
+ renderContent?: never;
63
+ };
64
+ type GlobalNavSubNavWithContent = {
65
+ /**
66
+ * The heading of the panel.
67
+ */
68
+ title: string;
69
+ /**
70
+ * Any content in place of `items`, inside the panel frame.
71
+ */
72
+ renderContent: Renderable;
73
+ items?: never;
74
+ };
75
+ type GlobalNavSubNav = GlobalNavSubNavWithItems | GlobalNavSubNavWithContent;
76
+ type GlobalNavLogo = {
77
+ /**
78
+ * The URL of the logo image.
79
+ */
80
+ src?: string;
81
+ /**
82
+ * The name of the institution or product, shown next to the image or used as the alternative text of a wordmark.
83
+ */
84
+ name: string;
85
+ /**
86
+ * Whether to show `name` as text. Set it to `false` when `src` is a wide logo that already shows the name, for example a product wordmark. Defaults to `true`.
87
+ */
88
+ showName?: boolean;
89
+ /**
90
+ * The URL that the logo links to.
91
+ */
92
+ href?: string;
93
+ };
94
+ type GlobalNavToggle = {
95
+ /**
96
+ * Identifies the toggle and is its React key.
97
+ */
98
+ itemID: string;
99
+ /**
100
+ * The icon before the label.
101
+ */
102
+ icon?: Renderable;
103
+ /**
104
+ * The visible text and accessible name of the toggle.
105
+ */
106
+ label: string;
107
+ /**
108
+ * Whether the toggle is on.
109
+ */
110
+ checked: boolean;
111
+ /**
112
+ * Called when the user switches the toggle, with the new `checked` value.
113
+ */
114
+ onChange: (event: ChangeEvent<HTMLInputElement>, checked: boolean) => void;
115
+ };
116
+ type GlobalNavAccount = {
117
+ /**
118
+ * Identifies the account panel in `openSubNav`.
119
+ */
120
+ itemID: string;
121
+ /**
122
+ * The heading of the account panel.
123
+ */
124
+ label: string;
125
+ /**
126
+ * The user's name, shown on the rail item and in the panel.
127
+ */
128
+ name: string;
129
+ /**
130
+ * The URL of the user's avatar.
131
+ */
132
+ avatarSrc?: string;
133
+ /**
134
+ * The text of the role pill.
135
+ */
136
+ userType?: string;
137
+ /**
138
+ * The name of the user's institution.
139
+ */
140
+ institution?: string;
141
+ /**
142
+ * The number in the badge of the rail item, which is hidden when it is 0 or missing.
143
+ */
144
+ badgeCount?: number;
145
+ /**
146
+ * Screen reader text of the badge.
147
+ */
148
+ badgeLabel?: GlobalNavCountLabel;
149
+ /**
150
+ * Whether the panel items are loading.
151
+ */
152
+ loading?: boolean;
153
+ /**
154
+ * Screen reader text of the loading spinner.
155
+ */
156
+ loadingLabel?: string;
157
+ /**
158
+ * The links of the panel.
159
+ */
160
+ items?: GlobalNavSubNavItem[];
161
+ /**
162
+ * A section of toggles with a heading, for example user interface settings.
163
+ */
164
+ toggles?: {
165
+ label: string;
166
+ items: GlobalNavToggle[];
167
+ };
168
+ /**
169
+ * Any content, rendered after the toggles.
170
+ */
171
+ renderContent?: Renderable;
172
+ /**
173
+ * The log out button at the end of the panel.
174
+ */
175
+ logout?: {
176
+ label: string;
177
+ href?: string;
178
+ onClick?: (event: MouseEvent<HTMLElement>) => void;
179
+ };
180
+ };
181
+ type GlobalNavOwnProps = {
182
+ /**
183
+ * Accessible name of the navigation landmark, read by screen readers.
184
+ */
185
+ label: string;
186
+ /**
187
+ * Whether the rail is collapsed, a state that the app updates in `onCollapse`.
188
+ */
189
+ collapsed: boolean;
190
+ /**
191
+ * Called when the user clicks the collapse button, with the new `collapsed` value.
192
+ */
193
+ onCollapse: (event: SyntheticEvent, collapsed: boolean) => void;
194
+ /**
195
+ * Screen reader text of the collapse button when the rail is expanded.
196
+ */
197
+ collapseLabel: string;
198
+ /**
199
+ * Screen reader text of the collapse button when the rail is collapsed.
200
+ */
201
+ expandLabel: string;
202
+ /**
203
+ * Screen reader text of the back button in a deeper SubNav level, from the title of the level it returns to.
204
+ */
205
+ backLabel: (parentTitle: string) => string;
206
+ /**
207
+ * Screen reader text of the button that closes a SubNav.
208
+ */
209
+ closeSubNavLabel: string;
210
+ /**
211
+ * Screen reader text of the handle that collapses the current page's SubNav to the strip, `closeSubNavLabel` if not set.
212
+ */
213
+ collapseSubNavLabel?: string;
214
+ /**
215
+ * Screen reader text of the button that opens the SubNav of the current page again.
216
+ */
217
+ expandSubNavLabel: string;
218
+ /**
219
+ * The `itemID` of the item or account whose SubNav is open, or `undefined` when none is open.
220
+ */
221
+ openSubNav?: string;
222
+ /**
223
+ * Called when the user opens or closes a SubNav, with the `itemID` of the item or `undefined`.
224
+ */
225
+ onSubNavChange?: (event: SyntheticEvent, itemID: string | undefined) => void;
226
+ /**
227
+ * The rail items, top to bottom.
228
+ */
229
+ items: GlobalNavMainNavItem[];
230
+ /**
231
+ * The institution logo at the top of the rail.
232
+ */
233
+ logo: GlobalNavLogo;
234
+ /**
235
+ * The account item of the rail and its panel.
236
+ */
237
+ account?: GlobalNavAccount;
238
+ };
239
+ type PropKeys = keyof GlobalNavOwnProps;
240
+ type AllowedPropKeys = Readonly<Array<PropKeys>>;
241
+ type GlobalNavProps = GlobalNavOwnProps & NewThemeOverrideProp<ReturnType<NewComponentTypes['GlobalNav']>> & OtherHTMLAttributes<GlobalNavOwnProps>;
242
+ type GlobalNavStyle = ComponentStyle<'globalNav' | 'rail'>;
243
+ type MainNavStyle = ComponentStyle<'mainNav' | 'header' | 'items' | 'divider'>;
244
+ declare const allowedProps: AllowedPropKeys;
245
+ export type { GlobalNavProps, GlobalNavStyle, MainNavStyle, GlobalNavMainNavItem, GlobalNavSubNav, GlobalNavSubNavItem, GlobalNavLogo, GlobalNavAccount, GlobalNavToggle, GlobalNavCountLabel, GlobalNavElementProps };
246
+ export { allowedProps };
247
+ //# sourceMappingURL=props.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../../src/GlobalNav/v1/props.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EACV,oBAAoB,EACpB,WAAW,EACX,UAAU,EACV,cAAc,EACf,MAAM,OAAO,CAAA;AAEd,OAAO,KAAK,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAA;AAChF,OAAO,KAAK,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAA;AAChF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAE/D,KAAK,mBAAmB,GAAG,MAAM,GAAG,CAAC,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC,CAAA;AAE/D,KAAK,qBAAqB,GAAG,IAAI,CAC/B,oBAAoB,CAAC,WAAW,CAAC,EACjC,IAAI,GAAG,WAAW,GAAG,QAAQ,GAAG,KAAK,CACtC,GAAG;IAEF,CAAC,GAAG,EAAE,QAAQ,MAAM,EAAE,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAA;CAC/D,CAAA;AAED,KAAK,mBAAmB,GAAG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,EAAE,eAenB,CAAA;AAED,YAAY,EACV,cAAc,EACd,cAAc,EACd,YAAY,EACZ,oBAAoB,EACpB,eAAe,EACf,mBAAmB,EACnB,aAAa,EACb,gBAAgB,EAChB,eAAe,EACf,mBAAmB,EACnB,qBAAqB,EACtB,CAAA;AACD,OAAO,EAAE,YAAY,EAAE,CAAA"}
@@ -0,0 +1,23 @@
1
+ import type { NewComponentTypes } from '@instructure/ui-themes';
2
+ import type { GlobalNavStyle, MainNavStyle } from './props.js';
3
+ type StyleParams = {
4
+ collapsed: boolean;
5
+ subNavOpen: boolean;
6
+ };
7
+ /**
8
+ * ---
9
+ * private: true
10
+ * ---
11
+ * Generates the style object from the theme and provided additional information
12
+ * @param componentTheme The theme variable object.
13
+ * @param params Additional parameters to customize the style.
14
+ * @return The final style object, which will be used in the component
15
+ */
16
+ declare const generateStyle: (componentTheme: ReturnType<NewComponentTypes['GlobalNav']>, params: StyleParams) => GlobalNavStyle;
17
+ /**
18
+ * Generates the style object of the main column from the `MainNav` tokens
19
+ */
20
+ declare const generateMainNavStyle: (componentTheme: ReturnType<NewComponentTypes['MainNav']>, params: Pick<StyleParams, 'collapsed'>) => MainNavStyle;
21
+ export default generateStyle;
22
+ export { generateMainNavStyle };
23
+ //# sourceMappingURL=styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/GlobalNav/v1/styles.ts"],"names":[],"mappings":"AAyBA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAC/D,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAE9D,KAAK,WAAW,GAAG;IACjB,SAAS,EAAE,OAAO,CAAA;IAClB,UAAU,EAAE,OAAO,CAAA;CACpB,CAAA;AAED;;;;;;;;GAQG;AACH,QAAA,MAAM,aAAa,mBACD,UAAU,CAAC,iBAAiB,CAAC,WAAW,CAAC,CAAC,UAClD,WAAW,KAClB,cAmCF,CAAA;AAED;;GAEG;AACH,QAAA,MAAM,oBAAoB,mBACR,UAAU,CAAC,iBAAiB,CAAC,SAAS,CAAC,CAAC,UAChD,IAAI,CAAC,WAAW,EAAE,WAAW,CAAC,KACrC,YAwCF,CAAA;eAEc,aAAa;AAC5B,OAAO,EAAE,oBAAoB,EAAE,CAAA"}
@@ -0,0 +1,37 @@
1
+ import type { MouseEvent } from 'react';
2
+ import type { GlobalNavSubNavItem } from '../props.js';
3
+ type DisclosureProps = {
4
+ 'aria-expanded': boolean;
5
+ 'aria-controls'?: string;
6
+ };
7
+ /**
8
+ * ---
9
+ * private: true
10
+ * ---
11
+ * Returns the props of the item's `<a>` or `<button>`, and `isLink` to tell which one to render
12
+ */
13
+ declare const getItemElementProps: (item: GlobalNavSubNavItem, onActivate?: (event: MouseEvent<HTMLElement>) => void, disclosureProps?: DisclosureProps) => {
14
+ isLink: boolean;
15
+ props: {
16
+ className?: string | undefined;
17
+ id?: string | undefined;
18
+ href: string | undefined;
19
+ target: string | undefined;
20
+ rel: string | undefined;
21
+ onClick: (event: MouseEvent<HTMLElement>) => void;
22
+ 'aria-current': "page" | undefined;
23
+ } | {
24
+ className?: string | undefined;
25
+ id?: string | undefined;
26
+ rel?: string | undefined;
27
+ target?: import("react").HTMLAttributeAnchorTarget | undefined;
28
+ 'aria-expanded'?: boolean | undefined;
29
+ 'aria-controls'?: string;
30
+ type: 'button';
31
+ onClick: (event: MouseEvent<HTMLElement>) => void;
32
+ 'aria-current': "page" | undefined;
33
+ };
34
+ };
35
+ export default getItemElementProps;
36
+ export { getItemElementProps };
37
+ //# sourceMappingURL=getItemElementProps.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getItemElementProps.d.ts","sourceRoot":"","sources":["../../../../src/GlobalNav/v1/utils/getItemElementProps.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAIvC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAA;AAEtD,KAAK,eAAe,GAAG;IACrB,eAAe,EAAE,OAAO,CAAA;IACxB,eAAe,CAAC,EAAE,MAAM,CAAA;CACzB,CAAA;AAED;;;;;GAKG;AACH,QAAA,MAAM,mBAAmB,SACjB,mBAAmB,eACZ,CAAC,KAAK,EAAE,UAAU,CAAC,WAAW,CAAC,KAAK,IAAI,oBACnC,eAAe;;;;;;;;yBAIL,UAAU,CAAC,WAAW,CAAC;;;;;;;;0BAhBjC,MAAM;cAiCZ,QAAQ;;;;CAWrB,CAAA;eAEc,mBAAmB;AAClC,OAAO,EAAE,mBAAmB,EAAE,CAAA"}
@@ -0,0 +1,3 @@
1
+ export { GlobalNav } from '../GlobalNav/v1/index.js';
2
+ export type { GlobalNavProps, GlobalNavMainNavItem, GlobalNavSubNav, GlobalNavSubNavItem, GlobalNavLogo, GlobalNavAccount, GlobalNavToggle, GlobalNavCountLabel, GlobalNavElementProps } from '../GlobalNav/v1/props';
3
+ //# sourceMappingURL=a.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"a.d.ts","sourceRoot":"","sources":["../../src/exports/a.ts"],"names":[],"mappings":"AAuBA,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAA;AACpD,YAAY,EACV,cAAc,EACd,oBAAoB,EACpB,eAAe,EACf,mBAAmB,EACnB,aAAa,EACb,gBAAgB,EAChB,eAAe,EACf,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,uBAAuB,CAAA"}