@iress-oss/ids-mcp-server 5.15.0 → 5.20.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/generated/docs/components_components-alert-docs.md +496 -0
- package/generated/docs/components_components-autocomplete-docs.md +3429 -0
- package/generated/docs/{components-autocomplete-recipes-docs.md → components_components-autocomplete-recipes-docs.md} +39 -14
- package/generated/docs/{components-badge-docs.md → components_components-badge-docs.md} +222 -30
- package/generated/docs/components_components-button-docs.md +2078 -0
- package/generated/docs/components_components-button-recipes-docs.md +37 -0
- package/generated/docs/components_components-buttongroup-docs.md +1045 -0
- package/generated/docs/components_components-card-docs.md +2290 -0
- package/generated/docs/{components-card-recipes-docs.md → components_components-card-recipes-docs.md} +132 -15
- package/generated/docs/components_components-checkbox-docs.md +1040 -0
- package/generated/docs/{components-checkboxgroup-docs.md → components_components-checkboxgroup-docs.md} +1001 -82
- package/generated/docs/{components-checkboxgroup-recipes-docs.md → components_components-checkboxgroup-recipes-docs.md} +102 -12
- package/generated/docs/{components-col-docs.md → components_components-col-docs.md} +331 -58
- package/generated/docs/components_components-combobox-docs.md +3735 -0
- package/generated/docs/{components-container-docs.md → components_components-container-docs.md} +61 -24
- package/generated/docs/{components-divider-docs.md → components_components-divider-docs.md} +83 -24
- package/generated/docs/{components-expander-docs.md → components_components-expander-docs.md} +266 -33
- package/generated/docs/components_components-field-docs.md +1369 -0
- package/generated/docs/components_components-filter-docs.md +4080 -0
- package/generated/docs/{components-form-docs.md → components_components-form-docs.md} +1556 -360
- package/generated/docs/{components-form-recipes-docs.md → components_components-form-recipes-docs.md} +277 -60
- package/generated/docs/{components-hide-docs.md → components_components-hide-docs.md} +195 -124
- package/generated/docs/components_components-icon-docs.md +1337 -0
- package/generated/docs/{components-inline-docs.md → components_components-inline-docs.md} +462 -42
- package/generated/docs/components_components-input-docs.md +1468 -0
- package/generated/docs/components_components-input-recipes-docs.md +367 -0
- package/generated/docs/components_components-inputcurrency-docs.md +432 -0
- package/generated/docs/{components-inputcurrency-recipes-docs.md → components_components-inputcurrency-recipes-docs.md} +113 -17
- package/generated/docs/components_components-label-docs.md +323 -0
- package/generated/docs/components_components-menu-docs.md +2345 -0
- package/generated/docs/components_components-menu-menuitem-docs.md +633 -0
- package/generated/docs/{components-modal-docs.md → components_components-modal-docs.md} +1640 -231
- package/generated/docs/components_components-navbar-docs.md +1847 -0
- package/generated/docs/{components-navbar-recipes-docs.md → components_components-navbar-recipes-docs.md} +721 -40
- package/generated/docs/{components-panel-docs.md → components_components-panel-docs.md} +754 -57
- package/generated/docs/components_components-placeholder-docs.md +92 -0
- package/generated/docs/components_components-popover-docs.md +1643 -0
- package/generated/docs/components_components-popover-recipes-docs.md +491 -0
- package/generated/docs/components_components-progress-docs.md +115 -0
- package/generated/docs/{components-provider-docs.md → components_components-provider-docs.md} +42 -33
- package/generated/docs/components_components-radio-docs.md +491 -0
- package/generated/docs/{components-radiogroup-docs.md → components_components-radiogroup-docs.md} +927 -75
- package/generated/docs/components_components-readonly-docs.md +263 -0
- package/generated/docs/components_components-richselect-docs.md +6521 -0
- package/generated/docs/{components-row-docs.md → components_components-row-docs.md} +353 -43
- package/generated/docs/{components-select-docs.md → components_components-select-docs.md} +719 -61
- package/generated/docs/components_components-skeleton-docs.md +480 -0
- package/generated/docs/{components-skeleton-recipes-docs.md → components_components-skeleton-recipes-docs.md} +51 -11
- package/generated/docs/{components-skiplink-docs.md → components_components-skiplink-docs.md} +53 -14
- package/generated/docs/components_components-slideout-docs.md +2293 -0
- package/generated/docs/components_components-slider-docs.md +1276 -0
- package/generated/docs/components_components-spinner-docs.md +82 -0
- package/generated/docs/{components-stack-docs.md → components_components-stack-docs.md} +223 -40
- package/generated/docs/components_components-table-docs.md +3658 -0
- package/generated/docs/components_components-tabset-docs.md +772 -0
- package/generated/docs/components_components-tabset-tab-docs.md +262 -0
- package/generated/docs/components_components-tag-docs.md +257 -0
- package/generated/docs/{components-text-docs.md → components_components-text-docs.md} +491 -51
- package/generated/docs/{components-toaster-docs.md → components_components-toaster-docs.md} +187 -85
- package/generated/docs/components_components-toaster-toast-docs.md +634 -0
- package/generated/docs/components_components-toggle-docs.md +461 -0
- package/generated/docs/{components-tooltip-docs.md → components_components-tooltip-docs.md} +286 -41
- package/generated/docs/{components-validationmessage-docs.md → components_components-validationmessage-docs.md} +230 -61
- package/generated/docs/components_contact-us-docs.md +12 -0
- package/generated/docs/{foundations-accessibility-docs.md → components_foundations-accessibility-docs.md} +11 -21
- package/generated/docs/{foundations-colours-docs.md → components_foundations-colour-030-colours.md} +8 -15
- package/generated/docs/{foundations-consistency-docs.md → components_foundations-consistency-docs.md} +12 -20
- package/generated/docs/{foundations-content-docs.md → components_foundations-content-docs.md} +6 -11
- package/generated/docs/components_foundations-introduction-docs.md +15 -0
- package/generated/docs/{foundations-principles-docs.md → components_foundations-principles-docs.md} +14 -24
- package/generated/docs/components_foundations-typography-docs.md +608 -0
- package/generated/docs/{foundations-user-experience-docs.md → components_foundations-user-experience-docs.md} +16 -26
- package/generated/docs/{foundations-visual-design-docs.md → components_foundations-visual-design-docs.md} +10 -17
- package/generated/docs/{frequently-asked-questions-docs.md → components_frequently-asked-questions-docs.md} +14 -23
- package/generated/docs/components_get-started-develop-docs.md +84 -0
- package/generated/docs/components_get-started-using-storybook-docs.md +55 -0
- package/generated/docs/components_introduction-docs.md +15 -0
- package/generated/docs/{patterns-loading-docs.md → components_patterns-loading-docs.md} +798 -153
- package/generated/docs/components_resources-changelog-docs.md +4 -0
- package/generated/docs/{resources-code-katas-docs.md → components_resources-code-katas-docs.md} +5 -9
- package/generated/docs/{resources-migration-guides-from-v4-to-v5-docs.md → components_resources-migration-guides-from-v4-to-v5-docs.md} +54 -239
- package/generated/docs/components_sandbox-docs.md +4 -0
- package/generated/docs/{versions-docs.md → components_versions-docs.md} +5 -8
- package/generated/docs/guidelines.md +484 -200
- package/generated/docs/introduction-docs.md +19 -30
- package/package.json +41 -45
- package/generated/docs/components-alert-docs.md +0 -130
- package/generated/docs/components-autocomplete-docs.md +0 -754
- package/generated/docs/components-button-docs.md +0 -362
- package/generated/docs/components-button-recipes-docs.md +0 -76
- package/generated/docs/components-buttongroup-docs.md +0 -310
- package/generated/docs/components-card-docs.md +0 -494
- package/generated/docs/components-checkbox-docs.md +0 -193
- package/generated/docs/components-combobox-docs.md +0 -1016
- package/generated/docs/components-field-docs.md +0 -675
- package/generated/docs/components-filter-docs.md +0 -1109
- package/generated/docs/components-icon-docs.md +0 -553
- package/generated/docs/components-input-docs.md +0 -335
- package/generated/docs/components-input-recipes-docs.md +0 -140
- package/generated/docs/components-inputcurrency-docs.md +0 -157
- package/generated/docs/components-label-docs.md +0 -135
- package/generated/docs/components-menu-docs.md +0 -704
- package/generated/docs/components-menu-menuitem-docs.md +0 -193
- package/generated/docs/components-navbar-docs.md +0 -291
- package/generated/docs/components-placeholder-docs.md +0 -27
- package/generated/docs/components-popover-docs.md +0 -464
- package/generated/docs/components-popover-recipes-docs.md +0 -245
- package/generated/docs/components-progress-docs.md +0 -104
- package/generated/docs/components-radio-docs.md +0 -107
- package/generated/docs/components-readonly-docs.md +0 -89
- package/generated/docs/components-richselect-docs.md +0 -2433
- package/generated/docs/components-skeleton-docs.md +0 -214
- package/generated/docs/components-slideout-docs.md +0 -538
- package/generated/docs/components-slider-docs.md +0 -346
- package/generated/docs/components-spinner-docs.md +0 -59
- package/generated/docs/components-table-ag-grid-docs.md +0 -1074
- package/generated/docs/components-table-docs.md +0 -1305
- package/generated/docs/components-tabset-docs.md +0 -341
- package/generated/docs/components-tabset-tab-docs.md +0 -86
- package/generated/docs/components-tag-docs.md +0 -115
- package/generated/docs/components-toaster-toast-docs.md +0 -157
- package/generated/docs/components-toggle-docs.md +0 -158
- package/generated/docs/contact-us-docs.md +0 -27
- package/generated/docs/extensions-editor-docs.md +0 -288
- package/generated/docs/extensions-editor-recipes-docs.md +0 -39
- package/generated/docs/foundations-introduction-docs.md +0 -17
- package/generated/docs/foundations-typography-docs.md +0 -191
- package/generated/docs/get-started-develop-docs.md +0 -209
- package/generated/docs/get-started-using-storybook-docs.md +0 -68
- package/generated/docs/resources-changelog-docs.md +0 -6
- package/generated/docs/themes-available-themes-docs.md +0 -66
- package/generated/docs/themes-introduction-docs.md +0 -121
- package/generated/docs/themes-tokens-docs.md +0 -1200
- /package/{LICENSE.txt → LICENSE} +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
Recipes
|
|
2
|
+
=======
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
Custom navbars
|
|
5
|
+
--------------
|
|
6
6
|
|
|
7
7
|
At its essence, the navbar component is a coloured panel. This means you can easily create custom navbars by creating your own content structure and passing everything into the `children` slot.
|
|
8
8
|
|
|
@@ -10,10 +10,12 @@ If you're creating a custom navbar, there are a few things to be aware of. First
|
|
|
10
10
|
|
|
11
11
|
Secondly, you'll need to make sure your content is accessible; for example using a `nav` element with an `aria-label` when you add navigation links.
|
|
12
12
|
|
|
13
|
-
###
|
|
13
|
+
### Custom responsive navbar
|
|
14
14
|
|
|
15
15
|
This example uses existing IDS components to create a custom responsive navbar. On smaller screens the main `nav` in the `IressNavbar` is hidden, and a menu button is shown. The menu button triggers a slideout that contains the nav links.
|
|
16
16
|
|
|
17
|
+
[](./iframe.html?id=components-navbar-recipes--custom-responsive-navbar)
|
|
18
|
+
|
|
17
19
|

|
|
18
20
|
|
|
19
21
|
Custom navbar
|
|
@@ -21,10 +23,22 @@ Custom navbar
|
|
|
21
23
|
|
|
22
24
|
[Link 1](#)[Link 2](#)[Link 3](#)
|
|
23
25
|
|
|
24
|
-
Hide
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
Hide codedrawOpen in CodeSandbox
|
|
27
|
+
|
|
28
|
+
import {
|
|
29
|
+
IressButton,
|
|
30
|
+
IressHide,
|
|
31
|
+
IressIcon,
|
|
32
|
+
IressInline,
|
|
33
|
+
IressMenu,
|
|
34
|
+
IressMenuItem,
|
|
35
|
+
IressNavbar,
|
|
36
|
+
IressSlideout,
|
|
37
|
+
IressSlideoutProvider,
|
|
38
|
+
IressText,
|
|
39
|
+
useSlideout,
|
|
40
|
+
} from '@/main';
|
|
41
|
+
import { useRef } from 'react';
|
|
28
42
|
const Navbar \= () \=> {
|
|
29
43
|
const { showSlideout } \= useSlideout();
|
|
30
44
|
const containerRef \= useRef<HTMLDivElement | null\>(null);
|
|
@@ -79,14 +93,143 @@ export const ResponsiveNavbar \= () \=> (
|
|
|
79
93
|
</IressSlideoutProvider\>
|
|
80
94
|
);
|
|
81
95
|
|
|
82
|
-
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
#### Props
|
|
99
|
+
|
|
100
|
+
| Name | Description | Default | Control |
|
|
101
|
+
| --- | --- | --- | --- |
|
|
102
|
+
| breakpoint |
|
|
103
|
+
Sets the breakpoint at which the main nav content is hidden, and replaced by a hamburger menu. If not set, the navbar won't be responsive.
|
|
104
|
+
|
|
105
|
+
union
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
| \- | Set object |
|
|
110
|
+
| children |
|
|
111
|
+
|
|
112
|
+
Content to be rendered inside the navbar (e.g. navigation links).
|
|
113
|
+
|
|
114
|
+
ReactNode
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
| \- | Set object |
|
|
119
|
+
| fixed |
|
|
120
|
+
|
|
121
|
+
Fixes the navbar with relation to the viewport if true. If false, the navbar will scroll out of view when the user scrolls.
|
|
122
|
+
|
|
123
|
+
boolean
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
|
|
|
128
|
+
|
|
129
|
+
false
|
|
130
|
+
|
|
131
|
+
| Set boolean |
|
|
132
|
+
| handledFocus |
|
|
133
|
+
|
|
134
|
+
When navbar is fixed, elements that are obscured by the fixed navbar are scrolled into view when they receive focus.
|
|
135
|
+
|
|
136
|
+
boolean
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
|
|
|
141
|
+
|
|
142
|
+
false
|
|
143
|
+
|
|
144
|
+
| Set boolean |
|
|
145
|
+
| homeUrl |
|
|
146
|
+
|
|
147
|
+
Sets the url of the home link
|
|
148
|
+
|
|
149
|
+
string
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
|
|
|
154
|
+
|
|
155
|
+
''
|
|
156
|
+
|
|
157
|
+
| Set string |
|
|
158
|
+
| horizontalAlign |
|
|
159
|
+
|
|
160
|
+
Sets the alignment of the nav; either start (all left-aligned), between (children slot left-aligned and nav slot right-aligned) or end (all right-aligned)
|
|
161
|
+
|
|
162
|
+
union
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
| \- | Set object |
|
|
167
|
+
| logo |
|
|
168
|
+
|
|
169
|
+
Content for the logo slot.
|
|
170
|
+
|
|
171
|
+
ReactNode
|
|
172
|
+
|
|
173
|
+
|
|
83
174
|
|
|
84
|
-
|
|
175
|
+
| \- | Set object |
|
|
176
|
+
| logoAltText |
|
|
177
|
+
|
|
178
|
+
Adds alt text to the logo's
|
|
179
|
+
|
|
180
|
+
string
|
|
181
|
+
|
|
182
|
+
<table class="css-ymgjf7"><tbody><tr><td colspan="2"><strong>Deprecated</strong>: Use `logo` instead, and `alt` text to your img.</td></tr></tbody></table>
|
|
183
|
+
|
|
184
|
+
|
|
|
185
|
+
|
|
186
|
+
''
|
|
187
|
+
|
|
188
|
+
| Set string |
|
|
189
|
+
| logoSrc |
|
|
190
|
+
|
|
191
|
+
Sets the source url of the logo
|
|
192
|
+
|
|
193
|
+
string
|
|
194
|
+
|
|
195
|
+
<table class="css-ymgjf7"><tbody><tr><td colspan="2"><strong>Deprecated</strong>: Use `logo` instead with the proper `src` attribute.</td></tr></tbody></table>
|
|
196
|
+
|
|
197
|
+
|
|
|
198
|
+
|
|
199
|
+
''
|
|
200
|
+
|
|
201
|
+
| Set string |
|
|
202
|
+
| nav |
|
|
203
|
+
|
|
204
|
+
Content for the nav slot.
|
|
205
|
+
|
|
206
|
+
ReactNode
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
| \- | \- |
|
|
211
|
+
| navLabel |
|
|
212
|
+
|
|
213
|
+
The name of the nav element (used by screen reader users). The nav element is wrapped around any content in the Nav slot
|
|
214
|
+
|
|
215
|
+
string
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
|
|
|
220
|
+
|
|
221
|
+
'Main navigation'
|
|
222
|
+
|
|
223
|
+
| Set string |
|
|
224
|
+
|
|
225
|
+
### Custom navbar with other IDS components
|
|
85
226
|
|
|
86
227
|
Not all navbars contain navigation links; often they contain global actions or filters. The example below shows a navbar containing a user dropdown, two buttons and a global search field.
|
|
87
228
|
|
|
88
229
|
Because there are no navigation links, we don't need to add a nav element in this example.
|
|
89
230
|
|
|
231
|
+
[](./iframe.html?id=components-navbar-recipes--custom-consuming-navbar)
|
|
232
|
+
|
|
90
233
|

|
|
91
234
|
|
|
92
235
|
Barry George
|
|
@@ -97,9 +240,7 @@ Person 1Person 2Person 3
|
|
|
97
240
|
|
|
98
241
|
**Input**
|
|
99
242
|
|
|
100
|
-
Hide
|
|
101
|
-
|
|
102
|
-
\[data-radix-scroll-area-viewport\] { scrollbar-width: none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch; } \[data-radix-scroll-area-viewport\]::-webkit-scrollbar { display: none; } :where(\[data-radix-scroll-area-viewport\]) { display: flex; flex-direction: column; align-items: stretch; } :where(\[data-radix-scroll-area-content\]) { flex-grow: 1; }
|
|
243
|
+
Hide codedrawOpen in CodeSandbox
|
|
103
244
|
|
|
104
245
|
<IressNavbar horizontalAlign\="between"\>
|
|
105
246
|
<IressInline
|
|
@@ -145,7 +286,7 @@ Hide code
|
|
|
145
286
|
hiddenLabel
|
|
146
287
|
label\="Input"
|
|
147
288
|
\>
|
|
148
|
-
<
|
|
289
|
+
<ForwardedInput
|
|
149
290
|
name\="test-input"
|
|
150
291
|
prepend\={<IressIcon name\="search" />}
|
|
151
292
|
/>
|
|
@@ -154,28 +295,188 @@ Hide code
|
|
|
154
295
|
</IressInline\>
|
|
155
296
|
</IressNavbar\>
|
|
156
297
|
|
|
157
|
-
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
#### Props
|
|
301
|
+
|
|
302
|
+
| Name | Description | Default | Control |
|
|
303
|
+
| --- | --- | --- | --- |
|
|
304
|
+
| breakpoint |
|
|
305
|
+
Sets the breakpoint at which the main nav content is hidden, and replaced by a hamburger menu. If not set, the navbar won't be responsive.
|
|
306
|
+
|
|
307
|
+
union
|
|
308
|
+
|
|
309
|
+
|
|
310
|
+
|
|
311
|
+
| \- | Set object |
|
|
312
|
+
| children |
|
|
313
|
+
|
|
314
|
+
Content to be rendered inside the navbar (e.g. navigation links).
|
|
315
|
+
|
|
316
|
+
ReactNode
|
|
317
|
+
|
|
318
|
+
|
|
319
|
+
|
|
320
|
+
| \- |
|
|
321
|
+
|
|
322
|
+
Edit JSON
|
|
323
|
+
|
|
324
|
+
children :
|
|
325
|
+
|
|
326
|
+
{
|
|
327
|
+
|
|
328
|
+
* $$typeof : Symbol(react.transitional.element)
|
|
329
|
+
* type : ({ children, className, gutter = "none", horizontalAlign = "left", noWrap = false, verticalAlign = "top", ...restProps }) => { const classMap = { \[\`${InlineCssClass.HorizontalAlign}--${horizontalAlign}\`\]: true, \[InlineCssClass.NoWrap\]: noWrap, \[\`${InlineCssClass.VerticalAlign}--${verticalAlign}\`\]: true }; const cssClasses = classNames( className, InlineCssClass.Base, getResponsiveLayoutModifiers(InlineCssClass.Gutter, gutter, "none"), classMap ); return /\* @\_\_PURE\_\_ \*/ jsxDEV("div", { className: cssClasses, ...restProps, children }, void 0, false, { fileName: "/home/runner/work/design-system/design-system/packages/components/src/components/Inline/Inline.tsx", lineNumber: 33, columnNumber: 5 }, this); }
|
|
330
|
+
* key : null
|
|
331
|
+
* props :
|
|
332
|
+
|
|
333
|
+
{...} 3 keys
|
|
334
|
+
|
|
335
|
+
* \_owner : null
|
|
336
|
+
* \_store :
|
|
337
|
+
|
|
338
|
+
{...} 0 keys
|
|
339
|
+
|
|
340
|
+
|
|
341
|
+
}
|
|
342
|
+
|
|
158
343
|
|
|
159
|
-
|
|
160
|
-
|
|
344
|
+
|
|
345
|
+
|
|
346
|
+
|
|
347
|
+
|
|
348
|
+
|
|
349
|
+
|
|
|
350
|
+
| fixed |
|
|
351
|
+
|
|
352
|
+
Fixes the navbar with relation to the viewport if true. If false, the navbar will scroll out of view when the user scrolls.
|
|
353
|
+
|
|
354
|
+
boolean
|
|
355
|
+
|
|
356
|
+
|
|
357
|
+
|
|
358
|
+
|
|
|
359
|
+
|
|
360
|
+
false
|
|
361
|
+
|
|
362
|
+
| Set boolean |
|
|
363
|
+
| handledFocus |
|
|
364
|
+
|
|
365
|
+
When navbar is fixed, elements that are obscured by the fixed navbar are scrolled into view when they receive focus.
|
|
366
|
+
|
|
367
|
+
boolean
|
|
368
|
+
|
|
369
|
+
|
|
370
|
+
|
|
371
|
+
|
|
|
372
|
+
|
|
373
|
+
false
|
|
374
|
+
|
|
375
|
+
| Set boolean |
|
|
376
|
+
| homeUrl |
|
|
377
|
+
|
|
378
|
+
Sets the url of the home link
|
|
379
|
+
|
|
380
|
+
string
|
|
381
|
+
|
|
382
|
+
|
|
383
|
+
|
|
384
|
+
|
|
|
385
|
+
|
|
386
|
+
''
|
|
387
|
+
|
|
388
|
+
| Set string |
|
|
389
|
+
| horizontalAlign |
|
|
390
|
+
|
|
391
|
+
Sets the alignment of the nav; either start (all left-aligned), between (children slot left-aligned and nav slot right-aligned) or end (all right-aligned)
|
|
392
|
+
|
|
393
|
+
union
|
|
394
|
+
|
|
395
|
+
|
|
396
|
+
|
|
397
|
+
| \- |
|
|
398
|
+
|
|
399
|
+
"between"
|
|
400
|
+
|
|
401
|
+
|
|
|
402
|
+
| logo |
|
|
403
|
+
|
|
404
|
+
Content for the logo slot.
|
|
405
|
+
|
|
406
|
+
ReactNode
|
|
407
|
+
|
|
408
|
+
|
|
409
|
+
|
|
410
|
+
| \- | Set object |
|
|
411
|
+
| logoAltText |
|
|
412
|
+
|
|
413
|
+
Adds alt text to the logo's
|
|
414
|
+
|
|
415
|
+
string
|
|
416
|
+
|
|
417
|
+
<table class="css-ymgjf7"><tbody><tr><td colspan="2"><strong>Deprecated</strong>: Use `logo` instead, and `alt` text to your img.</td></tr></tbody></table>
|
|
418
|
+
|
|
419
|
+
|
|
|
420
|
+
|
|
421
|
+
''
|
|
422
|
+
|
|
423
|
+
| Set string |
|
|
424
|
+
| logoSrc |
|
|
425
|
+
|
|
426
|
+
Sets the source url of the logo
|
|
427
|
+
|
|
428
|
+
string
|
|
429
|
+
|
|
430
|
+
<table class="css-ymgjf7"><tbody><tr><td colspan="2"><strong>Deprecated</strong>: Use `logo` instead with the proper `src` attribute.</td></tr></tbody></table>
|
|
431
|
+
|
|
432
|
+
|
|
|
433
|
+
|
|
434
|
+
''
|
|
435
|
+
|
|
436
|
+
| Set string |
|
|
437
|
+
| nav |
|
|
438
|
+
|
|
439
|
+
Content for the nav slot.
|
|
440
|
+
|
|
441
|
+
ReactNode
|
|
442
|
+
|
|
443
|
+
|
|
444
|
+
|
|
445
|
+
| \- | Set object |
|
|
446
|
+
| navLabel |
|
|
447
|
+
|
|
448
|
+
The name of the nav element (used by screen reader users). The nav element is wrapped around any content in the Nav slot
|
|
449
|
+
|
|
450
|
+
string
|
|
451
|
+
|
|
452
|
+
|
|
453
|
+
|
|
454
|
+
|
|
|
455
|
+
|
|
456
|
+
'Main navigation'
|
|
457
|
+
|
|
458
|
+
| Set string |
|
|
459
|
+
|
|
460
|
+
Secondary navigation
|
|
461
|
+
--------------------
|
|
161
462
|
|
|
162
463
|
The Navbar component should only be used for primary navigation.
|
|
163
464
|
|
|
164
465
|
If your site has secondary navigation, you can use the Menu component. Here are a few examples.
|
|
165
466
|
|
|
166
|
-
###
|
|
467
|
+
### Navbar combined with secondary navigation
|
|
167
468
|
|
|
168
469
|
You can use an `IressPanel` component to render the secondary navigation directly below your navbar. Use an `IressMenu` component for the links, and make sure you wrap it in a `nav` element. You'll need to add an `aria-label` to the `nav` element to make sure its purpose is clear to screen reader users.
|
|
169
470
|
|
|
471
|
+
[](./iframe.html?id=components-navbar-recipes--navbar-with-secondary-navigation)
|
|
472
|
+
|
|
170
473
|

|
|
171
474
|
|
|
172
475
|
[Link 1](#)[Link 2](#)[Link 3](#)
|
|
173
476
|
|
|
174
477
|
Secondary link 1Secondary link 2Secondary link 3
|
|
175
478
|
|
|
176
|
-
Hide
|
|
177
|
-
|
|
178
|
-
\[data-radix-scroll-area-viewport\] { scrollbar-width: none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch; } \[data-radix-scroll-area-viewport\]::-webkit-scrollbar { display: none; } :where(\[data-radix-scroll-area-viewport\]) { display: flex; flex-direction: column; align-items: stretch; } :where(\[data-radix-scroll-area-content\]) { flex-grow: 1; }
|
|
479
|
+
Hide codedrawOpen in CodeSandbox
|
|
179
480
|
|
|
180
481
|
<div\>
|
|
181
482
|
<IressNavbar
|
|
@@ -203,18 +504,154 @@ Hide code
|
|
|
203
504
|
</IressPanel\>
|
|
204
505
|
</div\>
|
|
205
506
|
|
|
206
|
-
|
|
507
|
+
```
|
|
508
|
+
|
|
509
|
+
#### Props
|
|
510
|
+
|
|
511
|
+
| Name | Description | Default | Control |
|
|
512
|
+
| --- | --- | --- | --- |
|
|
513
|
+
| breakpoint |
|
|
514
|
+
Sets the breakpoint at which the main nav content is hidden, and replaced by a hamburger menu. If not set, the navbar won't be responsive.
|
|
515
|
+
|
|
516
|
+
union
|
|
517
|
+
|
|
518
|
+
|
|
519
|
+
|
|
520
|
+
| \- | Set object |
|
|
521
|
+
| children |
|
|
522
|
+
|
|
523
|
+
Content to be rendered inside the navbar (e.g. navigation links).
|
|
524
|
+
|
|
525
|
+
ReactNode
|
|
526
|
+
|
|
527
|
+
|
|
528
|
+
|
|
529
|
+
| \- | Set object |
|
|
530
|
+
| fixed |
|
|
531
|
+
|
|
532
|
+
Fixes the navbar with relation to the viewport if true. If false, the navbar will scroll out of view when the user scrolls.
|
|
533
|
+
|
|
534
|
+
boolean
|
|
535
|
+
|
|
536
|
+
|
|
537
|
+
|
|
538
|
+
|
|
|
539
|
+
|
|
540
|
+
false
|
|
541
|
+
|
|
542
|
+
| Set boolean |
|
|
543
|
+
| handledFocus |
|
|
544
|
+
|
|
545
|
+
When navbar is fixed, elements that are obscured by the fixed navbar are scrolled into view when they receive focus.
|
|
546
|
+
|
|
547
|
+
boolean
|
|
548
|
+
|
|
549
|
+
|
|
550
|
+
|
|
551
|
+
|
|
|
207
552
|
|
|
208
|
-
|
|
553
|
+
false
|
|
554
|
+
|
|
555
|
+
| Set boolean |
|
|
556
|
+
| homeUrl |
|
|
557
|
+
|
|
558
|
+
Sets the url of the home link
|
|
559
|
+
|
|
560
|
+
string
|
|
561
|
+
|
|
562
|
+
|
|
563
|
+
|
|
564
|
+
|
|
|
565
|
+
|
|
566
|
+
''
|
|
567
|
+
|
|
568
|
+
| Set string |
|
|
569
|
+
| horizontalAlign |
|
|
570
|
+
|
|
571
|
+
Sets the alignment of the nav; either start (all left-aligned), between (children slot left-aligned and nav slot right-aligned) or end (all right-aligned)
|
|
572
|
+
|
|
573
|
+
union
|
|
574
|
+
|
|
575
|
+
|
|
576
|
+
|
|
577
|
+
| \- | Set object |
|
|
578
|
+
| logo |
|
|
579
|
+
|
|
580
|
+
Content for the logo slot.
|
|
581
|
+
|
|
582
|
+
ReactNode
|
|
583
|
+
|
|
584
|
+
|
|
585
|
+
|
|
586
|
+
| \- | \- |
|
|
587
|
+
| logoAltText |
|
|
588
|
+
|
|
589
|
+
Adds alt text to the logo's
|
|
590
|
+
|
|
591
|
+
string
|
|
592
|
+
|
|
593
|
+
<table class="css-ymgjf7"><tbody><tr><td colspan="2"><strong>Deprecated</strong>: Use `logo` instead, and `alt` text to your img.</td></tr></tbody></table>
|
|
594
|
+
|
|
595
|
+
|
|
|
596
|
+
|
|
597
|
+
''
|
|
598
|
+
|
|
599
|
+
| Set string |
|
|
600
|
+
| logoSrc |
|
|
601
|
+
|
|
602
|
+
Sets the source url of the logo
|
|
603
|
+
|
|
604
|
+
string
|
|
605
|
+
|
|
606
|
+
<table class="css-ymgjf7"><tbody><tr><td colspan="2"><strong>Deprecated</strong>: Use `logo` instead with the proper `src` attribute.</td></tr></tbody></table>
|
|
607
|
+
|
|
608
|
+
|
|
|
609
|
+
|
|
610
|
+
''
|
|
611
|
+
|
|
612
|
+
| Set string |
|
|
613
|
+
| nav |
|
|
614
|
+
|
|
615
|
+
Content for the nav slot.
|
|
616
|
+
|
|
617
|
+
ReactNode
|
|
618
|
+
|
|
619
|
+
|
|
620
|
+
|
|
621
|
+
| \- | \- |
|
|
622
|
+
| navLabel |
|
|
623
|
+
|
|
624
|
+
The name of the nav element (used by screen reader users). The nav element is wrapped around any content in the Nav slot
|
|
625
|
+
|
|
626
|
+
string
|
|
627
|
+
|
|
628
|
+
|
|
629
|
+
|
|
630
|
+
|
|
|
631
|
+
|
|
632
|
+
'Main navigation'
|
|
633
|
+
|
|
634
|
+
| Set string |
|
|
635
|
+
|
|
636
|
+
### Icon strips
|
|
209
637
|
|
|
210
638
|
You can change your secondary navigation to an icon strip by passing in icons to the `IressMenuItem` component. This can be rendered as a vertical strip (default), or a horizontal strip (by setting the `IressMenu` layout to `inline`).
|
|
211
639
|
|
|
212
640
|
The example below has some custom CSS to fix the menu to the side of its container. This includes setting `--iress-initial-offset` on the slideout element to ensure the slideout is correctly positioned next to the icon strip.
|
|
213
641
|
|
|
214
|
-
|
|
642
|
+
[](./iframe.html?id=components-navbar-recipes--icon-strip)
|
|
215
643
|
|
|
216
|
-
|
|
644
|
+
Hide codedrawOpen in CodeSandbox
|
|
217
645
|
|
|
646
|
+
import {
|
|
647
|
+
IressIcon,
|
|
648
|
+
IressMenu,
|
|
649
|
+
IressMenuItem,
|
|
650
|
+
IressNavbar,
|
|
651
|
+
IressSlideout,
|
|
652
|
+
IressTooltip,
|
|
653
|
+
} from '@/main';
|
|
654
|
+
import { useRef, useState } from 'react';
|
|
218
655
|
export const NavbarIconStrip \= () \=> {
|
|
219
656
|
const \[secondary, setSecondary\] \= useState(false);
|
|
220
657
|
const containerRef \= useRef<HTMLDivElement | null\>(null);
|
|
@@ -294,12 +731,141 @@ export const NavbarIconStrip \= () \=> {
|
|
|
294
731
|
);
|
|
295
732
|
};
|
|
296
733
|
|
|
297
|
-
|
|
734
|
+
```
|
|
735
|
+
|
|
736
|
+
#### Props
|
|
737
|
+
|
|
738
|
+
| Name | Description | Default | Control |
|
|
739
|
+
| --- | --- | --- | --- |
|
|
740
|
+
| breakpoint |
|
|
741
|
+
Sets the breakpoint at which the main nav content is hidden, and replaced by a hamburger menu. If not set, the navbar won't be responsive.
|
|
742
|
+
|
|
743
|
+
union
|
|
744
|
+
|
|
745
|
+
|
|
746
|
+
|
|
747
|
+
| \- | Set object |
|
|
748
|
+
| children |
|
|
749
|
+
|
|
750
|
+
Content to be rendered inside the navbar (e.g. navigation links).
|
|
751
|
+
|
|
752
|
+
ReactNode
|
|
753
|
+
|
|
754
|
+
|
|
755
|
+
|
|
756
|
+
| \- | Set object |
|
|
757
|
+
| fixed |
|
|
758
|
+
|
|
759
|
+
Fixes the navbar with relation to the viewport if true. If false, the navbar will scroll out of view when the user scrolls.
|
|
760
|
+
|
|
761
|
+
boolean
|
|
762
|
+
|
|
763
|
+
|
|
764
|
+
|
|
765
|
+
|
|
|
766
|
+
|
|
767
|
+
false
|
|
768
|
+
|
|
769
|
+
| Set boolean |
|
|
770
|
+
| handledFocus |
|
|
771
|
+
|
|
772
|
+
When navbar is fixed, elements that are obscured by the fixed navbar are scrolled into view when they receive focus.
|
|
773
|
+
|
|
774
|
+
boolean
|
|
775
|
+
|
|
776
|
+
|
|
777
|
+
|
|
778
|
+
|
|
|
779
|
+
|
|
780
|
+
false
|
|
781
|
+
|
|
782
|
+
| Set boolean |
|
|
783
|
+
| homeUrl |
|
|
784
|
+
|
|
785
|
+
Sets the url of the home link
|
|
786
|
+
|
|
787
|
+
string
|
|
788
|
+
|
|
789
|
+
|
|
790
|
+
|
|
791
|
+
|
|
|
792
|
+
|
|
793
|
+
''
|
|
794
|
+
|
|
795
|
+
| Set string |
|
|
796
|
+
| horizontalAlign |
|
|
797
|
+
|
|
798
|
+
Sets the alignment of the nav; either start (all left-aligned), between (children slot left-aligned and nav slot right-aligned) or end (all right-aligned)
|
|
799
|
+
|
|
800
|
+
union
|
|
801
|
+
|
|
802
|
+
|
|
803
|
+
|
|
804
|
+
| \- | Set object |
|
|
805
|
+
| logo |
|
|
806
|
+
|
|
807
|
+
Content for the logo slot.
|
|
808
|
+
|
|
809
|
+
ReactNode
|
|
810
|
+
|
|
811
|
+
|
|
812
|
+
|
|
813
|
+
| \- | Set object |
|
|
814
|
+
| logoAltText |
|
|
815
|
+
|
|
816
|
+
Adds alt text to the logo's
|
|
817
|
+
|
|
818
|
+
string
|
|
819
|
+
|
|
820
|
+
<table class="css-ymgjf7"><tbody><tr><td colspan="2"><strong>Deprecated</strong>: Use `logo` instead, and `alt` text to your img.</td></tr></tbody></table>
|
|
298
821
|
|
|
299
|
-
|
|
822
|
+
|
|
|
823
|
+
|
|
824
|
+
''
|
|
825
|
+
|
|
826
|
+
| Set string |
|
|
827
|
+
| logoSrc |
|
|
828
|
+
|
|
829
|
+
Sets the source url of the logo
|
|
830
|
+
|
|
831
|
+
string
|
|
832
|
+
|
|
833
|
+
<table class="css-ymgjf7"><tbody><tr><td colspan="2"><strong>Deprecated</strong>: Use `logo` instead with the proper `src` attribute.</td></tr></tbody></table>
|
|
834
|
+
|
|
835
|
+
|
|
|
836
|
+
|
|
837
|
+
''
|
|
838
|
+
|
|
839
|
+
| Set string |
|
|
840
|
+
| nav |
|
|
841
|
+
|
|
842
|
+
Content for the nav slot.
|
|
843
|
+
|
|
844
|
+
ReactNode
|
|
845
|
+
|
|
846
|
+
|
|
847
|
+
|
|
848
|
+
| \- | Set object |
|
|
849
|
+
| navLabel |
|
|
850
|
+
|
|
851
|
+
The name of the nav element (used by screen reader users). The nav element is wrapped around any content in the Nav slot
|
|
852
|
+
|
|
853
|
+
string
|
|
854
|
+
|
|
855
|
+
|
|
856
|
+
|
|
857
|
+
|
|
|
858
|
+
|
|
859
|
+
'Main navigation'
|
|
860
|
+
|
|
861
|
+
| Set string |
|
|
862
|
+
|
|
863
|
+
### Fixed navigation
|
|
300
864
|
|
|
301
865
|
A common pattern for small screens is to fix navigation links at the bottom of the screen. This can be done by applying some custom CSS to your secondary navigation.
|
|
302
866
|
|
|
867
|
+
[](./iframe.html?id=components-navbar-recipes--fixed-navigation)
|
|
868
|
+
|
|
303
869
|

|
|
304
870
|
|
|
305
871
|
[](#)
|
|
@@ -338,9 +904,7 @@ Messages
|
|
|
338
904
|
|
|
339
905
|
](#)
|
|
340
906
|
|
|
341
|
-
Hide
|
|
342
|
-
|
|
343
|
-
\[data-radix-scroll-area-viewport\] { scrollbar-width: none; -ms-overflow-style: none; -webkit-overflow-scrolling: touch; } \[data-radix-scroll-area-viewport\]::-webkit-scrollbar { display: none; } :where(\[data-radix-scroll-area-viewport\]) { display: flex; flex-direction: column; align-items: stretch; } :where(\[data-radix-scroll-area-content\]) { flex-grow: 1; }
|
|
907
|
+
Hide codedrawOpen in CodeSandbox
|
|
344
908
|
|
|
345
909
|
<div className\="mobile-mockup-wrapper"\>
|
|
346
910
|
<IressNavbar
|
|
@@ -400,14 +964,131 @@ Hide code
|
|
|
400
964
|
</IressPanel\>
|
|
401
965
|
</div\>
|
|
402
966
|
|
|
403
|
-
|
|
967
|
+
```
|
|
968
|
+
|
|
969
|
+
#### Props
|
|
970
|
+
|
|
971
|
+
| Name | Description | Default | Control |
|
|
972
|
+
| --- | --- | --- | --- |
|
|
973
|
+
| breakpoint |
|
|
974
|
+
Sets the breakpoint at which the main nav content is hidden, and replaced by a hamburger menu. If not set, the navbar won't be responsive.
|
|
975
|
+
|
|
976
|
+
union
|
|
977
|
+
|
|
978
|
+
|
|
979
|
+
|
|
980
|
+
| \- | Set object |
|
|
981
|
+
| children |
|
|
982
|
+
|
|
983
|
+
Content to be rendered inside the navbar (e.g. navigation links).
|
|
984
|
+
|
|
985
|
+
ReactNode
|
|
986
|
+
|
|
987
|
+
|
|
988
|
+
|
|
989
|
+
| \- | Set object |
|
|
990
|
+
| fixed |
|
|
991
|
+
|
|
992
|
+
Fixes the navbar with relation to the viewport if true. If false, the navbar will scroll out of view when the user scrolls.
|
|
993
|
+
|
|
994
|
+
boolean
|
|
995
|
+
|
|
996
|
+
|
|
997
|
+
|
|
998
|
+
|
|
|
999
|
+
|
|
1000
|
+
false
|
|
1001
|
+
|
|
1002
|
+
| Set boolean |
|
|
1003
|
+
| handledFocus |
|
|
1004
|
+
|
|
1005
|
+
When navbar is fixed, elements that are obscured by the fixed navbar are scrolled into view when they receive focus.
|
|
1006
|
+
|
|
1007
|
+
boolean
|
|
1008
|
+
|
|
1009
|
+
|
|
1010
|
+
|
|
1011
|
+
|
|
|
1012
|
+
|
|
1013
|
+
false
|
|
1014
|
+
|
|
1015
|
+
| Set boolean |
|
|
1016
|
+
| homeUrl |
|
|
1017
|
+
|
|
1018
|
+
Sets the url of the home link
|
|
1019
|
+
|
|
1020
|
+
string
|
|
1021
|
+
|
|
1022
|
+
|
|
1023
|
+
|
|
1024
|
+
|
|
|
1025
|
+
|
|
1026
|
+
''
|
|
1027
|
+
|
|
1028
|
+
| Set string |
|
|
1029
|
+
| horizontalAlign |
|
|
1030
|
+
|
|
1031
|
+
Sets the alignment of the nav; either start (all left-aligned), between (children slot left-aligned and nav slot right-aligned) or end (all right-aligned)
|
|
1032
|
+
|
|
1033
|
+
union
|
|
1034
|
+
|
|
1035
|
+
|
|
1036
|
+
|
|
1037
|
+
| \- | Set object |
|
|
1038
|
+
| logo |
|
|
1039
|
+
|
|
1040
|
+
Content for the logo slot.
|
|
1041
|
+
|
|
1042
|
+
ReactNode
|
|
1043
|
+
|
|
1044
|
+
|
|
1045
|
+
|
|
1046
|
+
| \- | \- |
|
|
1047
|
+
| logoAltText |
|
|
1048
|
+
|
|
1049
|
+
Adds alt text to the logo's
|
|
1050
|
+
|
|
1051
|
+
string
|
|
1052
|
+
|
|
1053
|
+
<table class="css-ymgjf7"><tbody><tr><td colspan="2"><strong>Deprecated</strong>: Use `logo` instead, and `alt` text to your img.</td></tr></tbody></table>
|
|
1054
|
+
|
|
1055
|
+
|
|
|
1056
|
+
|
|
1057
|
+
''
|
|
1058
|
+
|
|
1059
|
+
| Set string |
|
|
1060
|
+
| logoSrc |
|
|
1061
|
+
|
|
1062
|
+
Sets the source url of the logo
|
|
1063
|
+
|
|
1064
|
+
string
|
|
1065
|
+
|
|
1066
|
+
<table class="css-ymgjf7"><tbody><tr><td colspan="2"><strong>Deprecated</strong>: Use `logo` instead with the proper `src` attribute.</td></tr></tbody></table>
|
|
1067
|
+
|
|
1068
|
+
|
|
|
1069
|
+
|
|
1070
|
+
''
|
|
1071
|
+
|
|
1072
|
+
| Set string |
|
|
1073
|
+
| nav |
|
|
1074
|
+
|
|
1075
|
+
Content for the nav slot.
|
|
1076
|
+
|
|
1077
|
+
ReactNode
|
|
1078
|
+
|
|
1079
|
+
|
|
1080
|
+
|
|
1081
|
+
| \- | \- |
|
|
1082
|
+
| navLabel |
|
|
1083
|
+
|
|
1084
|
+
The name of the nav element (used by screen reader users). The nav element is wrapped around any content in the Nav slot
|
|
1085
|
+
|
|
1086
|
+
string
|
|
1087
|
+
|
|
1088
|
+
|
|
1089
|
+
|
|
1090
|
+
|
|
|
404
1091
|
|
|
405
|
-
|
|
1092
|
+
'Main navigation'
|
|
406
1093
|
|
|
407
|
-
|
|
408
|
-
* [Custom responsive navbar](#custom-responsive-navbar)
|
|
409
|
-
* [Custom navbar with other IDS components](#custom-navbar-with-other-ids-components)
|
|
410
|
-
* [Secondary navigation](#secondary-navigation)
|
|
411
|
-
* [Navbar combined with secondary navigation](#navbar-combined-with-secondary-navigation)
|
|
412
|
-
* [Icon strips](#icon-strips)
|
|
413
|
-
* [Fixed navigation](#fixed-navigation)
|
|
1094
|
+
| Set string |
|