@czi-sds/mcp 0.3.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/data/component-props/Accordion.json +14 -15
- package/data/component-props/Alert.json +2 -44
- package/data/component-props/Autocomplete.json +14 -32
- package/data/component-props/Banner.json +11 -12
- package/data/component-props/Button.json +17 -82
- package/data/component-props/ButtonDropdown.json +26 -0
- package/data/component-props/ButtonIcon.json +4 -60
- package/data/component-props/ButtonToggle.json +2 -66
- package/data/component-props/Callout.json +11 -65
- package/data/component-props/CellBasic.json +28 -56
- package/data/component-props/CellComponent.json +4 -32
- package/data/component-props/CellHeader.json +13 -49
- package/data/component-props/ComplexFilter.json +24 -4
- package/data/component-props/ContentCard.json +66 -2
- package/data/component-props/Dialog.json +26 -0
- package/data/component-props/Dropdown.json +29 -67
- package/data/component-props/DropdownMenu.json +16 -56
- package/data/component-props/HeatmapChart.json +6 -87
- package/data/component-props/Icon.json +3 -8
- package/data/component-props/InputCheckbox.json +5 -53
- package/data/component-props/InputDropdown.json +11 -33
- package/data/component-props/InputRadio.json +5 -53
- package/data/component-props/InputSearch.json +6 -70
- package/data/component-props/InputSlider.json +21 -35
- package/data/component-props/InputText.json +7 -63
- package/data/component-props/InputToggle.json +5 -54
- package/data/component-props/Link.json +18 -0
- package/data/component-props/LoadingIndicator.json +1 -2
- package/data/component-props/MenuItem.json +11 -41
- package/data/component-props/MenuSelect.json +4 -67
- package/data/component-props/NavigationFooter.json +0 -8
- package/data/component-props/NavigationHeader.json +14 -65
- package/data/component-props/NavigationJumpTo.json +0 -40
- package/data/component-props/Notification.json +14 -58
- package/data/component-props/Pagination.json +8 -33
- package/data/component-props/Panel.json +4 -54
- package/data/component-props/SegmentedControl.json +0 -55
- package/data/component-props/TableRow.json +10 -38
- package/data/component-props/Tabs.json +18 -0
- package/data/component-props/Tag.json +10 -56
- package/data/component-props/TagFilter.json +0 -47
- package/data/component-props/Tooltip.json +12 -61
- package/data/component-props/TooltipCondensed.json +18 -0
- package/data/component-props/TooltipTable.json +0 -4
- package/data/zeroheight-exports/Accordion.md +167 -125
- package/data/zeroheight-exports/Banner.md +71 -48
- package/data/zeroheight-exports/Borders.md +72 -73
- package/data/zeroheight-exports/Buttons.md +375 -330
- package/data/zeroheight-exports/Callout.md +138 -116
- package/data/zeroheight-exports/Colors.md +254 -255
- package/data/zeroheight-exports/Content-Card.md +36 -37
- package/data/zeroheight-exports/Contributing-to-SDS.md +34 -35
- package/data/zeroheight-exports/Control-Inputs.md +289 -234
- package/data/zeroheight-exports/Corners.md +63 -64
- package/data/zeroheight-exports/Cover-page.md +0 -1
- package/data/zeroheight-exports/Dialog.md +237 -179
- package/data/zeroheight-exports/Downloads.md +10 -11
- package/data/zeroheight-exports/Drop-Shadows.md +40 -41
- package/data/zeroheight-exports/Dropdown-Input.md +158 -127
- package/data/zeroheight-exports/Dropdown-Menu.md +814 -718
- package/data/zeroheight-exports/Element-Status-Tracker.md +191 -192
- package/data/zeroheight-exports/Field-Inputs.md +149 -130
- package/data/zeroheight-exports/Filters.md +114 -94
- package/data/zeroheight-exports/Getting-Started.md +112 -249
- package/data/zeroheight-exports/Hero.md +43 -37
- package/data/zeroheight-exports/Icons.md +205 -206
- package/data/zeroheight-exports/Intent.md +6 -7
- package/data/zeroheight-exports/Introduction-to-Bases.md +8 -9
- package/data/zeroheight-exports/Introduction-to-Cells.md +11 -12
- package/data/zeroheight-exports/Introduction-to-DNA.md +8 -9
- package/data/zeroheight-exports/Introduction-to-Genes.md +8 -9
- package/data/zeroheight-exports/Introduction.md +52 -53
- package/data/zeroheight-exports/Link.md +50 -37
- package/data/zeroheight-exports/Lists.md +78 -63
- package/data/zeroheight-exports/Loading-Indicator.md +7 -8
- package/data/zeroheight-exports/Navigation.md +163 -142
- package/data/zeroheight-exports/Notification.md +132 -102
- package/data/zeroheight-exports/Panel.md +231 -115
- package/data/zeroheight-exports/Responsive-Design.md +35 -32
- package/data/zeroheight-exports/Search-Input.md +9 -10
- package/data/zeroheight-exports/Search.md +87 -104
- package/data/zeroheight-exports/Segmented-Control.md +68 -45
- package/data/zeroheight-exports/Spacing.md +210 -211
- package/data/zeroheight-exports/Table.md +414 -302
- package/data/zeroheight-exports/Tabs.md +126 -98
- package/data/zeroheight-exports/Tags.md +148 -118
- package/data/zeroheight-exports/Text-Link.md +32 -33
- package/data/zeroheight-exports/Theming.md +48 -29
- package/data/zeroheight-exports/Tooltips.md +253 -237
- package/data/zeroheight-exports/Typography.md +463 -464
- package/dist/stdio.js +44 -132
- package/package.json +3 -4
- package/data/component-props/Chip.json +0 -73
- package/data/component-props/List.json +0 -43
- package/data/component-props/Menu.json +0 -48
- package/data/component-props/Table.json +0 -26
- package/data/component-props-storybook/Accordion-storybook.json +0 -45
- package/data/component-props-storybook/Alert-storybook.json +0 -30
- package/data/component-props-storybook/Autocomplete-storybook.json +0 -67
- package/data/component-props-storybook/Banner-storybook.json +0 -78
- package/data/component-props-storybook/Button-storybook.json +0 -115
- package/data/component-props-storybook/ButtonDropdown-storybook.json +0 -73
- package/data/component-props-storybook/ButtonIcon-storybook.json +0 -60
- package/data/component-props-storybook/ButtonToggle-storybook.json +0 -68
- package/data/component-props-storybook/Callout-storybook.json +0 -90
- package/data/component-props-storybook/CellBasic-storybook.json +0 -138
- package/data/component-props-storybook/CellComponent-storybook.json +0 -48
- package/data/component-props-storybook/CellHeader-storybook.json +0 -71
- package/data/component-props-storybook/Chip-storybook.json +0 -26
- package/data/component-props-storybook/ComplexFilter-storybook.json +0 -60
- package/data/component-props-storybook/ContentCard-storybook.json +0 -175
- package/data/component-props-storybook/Dialog-storybook.json +0 -56
- package/data/component-props-storybook/Dropdown-storybook.json +0 -93
- package/data/component-props-storybook/DropdownMenu-storybook.json +0 -73
- package/data/component-props-storybook/HeatmapChart-storybook.json +0 -55
- package/data/component-props-storybook/Icon-storybook.json +0 -75
- package/data/component-props-storybook/InputCheckbox-storybook.json +0 -57
- package/data/component-props-storybook/InputDropdown-storybook.json +0 -80
- package/data/component-props-storybook/InputRadio-storybook.json +0 -56
- package/data/component-props-storybook/InputSearch-storybook.json +0 -55
- package/data/component-props-storybook/InputSlider-storybook.json +0 -55
- package/data/component-props-storybook/InputText-storybook.json +0 -59
- package/data/component-props-storybook/InputToggle-storybook.json +0 -42
- package/data/component-props-storybook/Link-storybook.json +0 -50
- package/data/component-props-storybook/List-storybook.json +0 -26
- package/data/component-props-storybook/LoadingIndicator-storybook.json +0 -34
- package/data/component-props-storybook/Menu-storybook.json +0 -26
- package/data/component-props-storybook/MenuItem-storybook.json +0 -74
- package/data/component-props-storybook/MenuSelect-storybook.json +0 -38
- package/data/component-props-storybook/NavigationFooter-storybook.json +0 -67
- package/data/component-props-storybook/NavigationHeader-storybook.json +0 -115
- package/data/component-props-storybook/NavigationJumpTo-storybook.json +0 -41
- package/data/component-props-storybook/Notification-storybook.json +0 -89
- package/data/component-props-storybook/Pagination-storybook.json +0 -50
- package/data/component-props-storybook/Panel-storybook.json +0 -52
- package/data/component-props-storybook/SegmentedControl-storybook.json +0 -30
- package/data/component-props-storybook/Table-storybook.json +0 -26
- package/data/component-props-storybook/TableHeader-storybook.json +0 -26
- package/data/component-props-storybook/TableRow-storybook.json +0 -62
- package/data/component-props-storybook/Tabs-storybook.json +0 -45
- package/data/component-props-storybook/Tag-storybook.json +0 -78
- package/data/component-props-storybook/TagFilter-storybook.json +0 -30
- package/data/component-props-storybook/Tooltip-storybook.json +0 -85
- package/data/component-props-storybook/TooltipCondensed-storybook.json +0 -38
- package/data/component-props-storybook/TooltipTable-storybook.json +0 -47
|
@@ -6,13 +6,13 @@ Navigation components enable users to move around an application, either between
|
|
|
6
6
|
|
|
7
7
|
## Jump-to Navigation
|
|
8
8
|
|
|
9
|
-
|
|
|
10
|
-
| --- |
|
|
9
|
+
| | In Figma | | | Meets Accessibility | | | In napari hub + .org Codebases |
|
|
10
|
+
| --- | -------- | --- | --- | ------------------- | --- | --- | ------------------------------ |
|
|
11
11
|
|
|
12
12
|
The Jump-to Navigation component can contain as many Nav Items as necessary though must have a minimum of two. Each Nav Item is tied to a a section of the page and functions as a jump link to that page section. It is positioned on the right side of the page, anchored to the top of the page’s first paragraph and remains sticky on the page as the user scrolls; once the user scrolls into a new section, the active indicator on that section is highlighted until the user scrolls beyond it and into the next (or previous) at which point the indictor moves again. When the user clicks on any of the Nav Items, the page will smooth scroll to that section of the page.
|
|
13
13
|
|
|
14
14
|
| **Default / Active** | **Hover** |
|
|
15
|
-
|
|
|
15
|
+
| -------------------- | --------- |
|
|
16
16
|
|
|
17
17
|
---
|
|
18
18
|
|
|
@@ -20,24 +20,24 @@ The Jump-to Navigation component can contain as many Nav Items as necessary thou
|
|
|
20
20
|
|
|
21
21
|
These rules establish how much margin should exist between and around elements.
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
|
|
24
24
|
|
|
25
25
|
## Code
|
|
26
26
|
|
|
27
27
|
## Jump-to Navigation Component
|
|
28
28
|
|
|
29
|
-
| Below you will find an interactive Storybook iframe for the Jump-to Navigation.
|
|
30
|
-
|
|
|
29
|
+
| Below you will find an interactive Storybook iframe for the Jump-to Navigation. Tabs within each iframe provide a different set of tools: The Controls tab allows you to see and adjust all available props. The Actions tab shows you data displayed by event handler arguments. | | **Jump to component:** NavigationJumpTo |
|
|
30
|
+
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --- | --------------------------------------- |
|
|
31
31
|
|
|
32
32
|
---
|
|
33
33
|
|
|
34
|
-
>This component appears as it is in the default SDS codebase. Once imported into the napari hub or napari.org codebases, use a theme file to enable the napari visual appearance customization.
|
|
34
|
+
> This component appears as it is in the default SDS codebase. Once imported into the napari hub or napari.org codebases, use a theme file to enable the napari visual appearance customization.
|
|
35
35
|
|
|
36
36
|
### NavigationJumpTo
|
|
37
37
|
|
|
38
38
|
Default
|
|
39
39
|
|
|
40
|
-
|
|
40
|
+
|
|
41
41
|
|
|
42
42
|
---
|
|
43
43
|
|
|
@@ -47,15 +47,15 @@ Navigation components enable users to move around an application, either between
|
|
|
47
47
|
|
|
48
48
|
## Jump-to Navigation
|
|
49
49
|
|
|
50
|
-
|
|
|
51
|
-
| --- |
|
|
50
|
+
| | In Figma | | | Meets Accessibility | | | In CZ ID Codebase |
|
|
51
|
+
| --- | -------- | --- | --- | ------------------- | --- | --- | ----------------- |
|
|
52
52
|
|
|
53
53
|
The Jump-to Navigation component can contain as many Nav Items as necessary though must have a minimum of two. Each Nav Item is tied to a a section of the page and functions as a jump link to that page section. It is positioned on the right side of the page, anchored to the top of the page’s first paragraph and remains sticky on the page as the user scrolls; once the user scrolls into a new section, the active indicator on that section is highlighted until the user scrolls beyond it and into the next (or previous) at which point the indictor moves again. When the user clicks on any of the Nav Items, the page will smooth scroll to that section of the page.
|
|
54
54
|
|
|
55
55
|
Use a positive pixel value in the `offset` prop to adjust where on the page the user is navigated to in relation to the top of each section.
|
|
56
56
|
|
|
57
57
|
| **Default / Active** | **Hover** |
|
|
58
|
-
|
|
|
58
|
+
| -------------------- | --------- |
|
|
59
59
|
|
|
60
60
|
---
|
|
61
61
|
|
|
@@ -63,7 +63,7 @@ Use a positive pixel value in the `offset` prop to adjust where on the page the
|
|
|
63
63
|
|
|
64
64
|
These rules establish how much margin should exist between and around elements.
|
|
65
65
|
|
|
66
|
-
|
|
66
|
+
|
|
67
67
|
|
|
68
68
|
---
|
|
69
69
|
|
|
@@ -74,17 +74,17 @@ The color of the position indicator can be adjusted using the `indicatorColor` p
|
|
|
74
74
|
Each color option is demonstrated below:
|
|
75
75
|
|
|
76
76
|
| **Beta** | **Error** | **Gray** | **Info** |
|
|
77
|
-
|
|
|
77
|
+
| -------- | --------- | -------- | -------- |
|
|
78
78
|
|
|
79
79
|
| **Primary** | **Success** | **Warning** |
|
|
80
|
-
|
|
|
80
|
+
| ----------- | ----------- | ----------- |
|
|
81
81
|
|
|
82
82
|
## Code
|
|
83
83
|
|
|
84
84
|
## Jump-to Navigation Component
|
|
85
85
|
|
|
86
|
-
| Below you will find an interactive Storybook iframe for the Jump-to Navigation.
|
|
87
|
-
|
|
|
86
|
+
| Below you will find an interactive Storybook iframe for the Jump-to Navigation. Tabs within each iframe provide a different set of tools: The Controls tab allows you to see and adjust all available props. The Actions tab shows you data displayed by event handler arguments. | | **Jump to component:** NavigationJumpTo |
|
|
87
|
+
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --- | --------------------------------------- |
|
|
88
88
|
|
|
89
89
|
---
|
|
90
90
|
|
|
@@ -100,8 +100,8 @@ Navigation components enable users to move around an application, either between
|
|
|
100
100
|
|
|
101
101
|
## Navigation Components
|
|
102
102
|
|
|
103
|
-
| Header and Footer Navigation provide the primary means for users to move between the top-level pages of an application as well as access important sections and links to relevant external content; they always sit at the top and bottom of the page respectively.
|
|
104
|
-
|
|
|
103
|
+
| Header and Footer Navigation provide the primary means for users to move between the top-level pages of an application as well as access important sections and links to relevant external content; they always sit at the top and bottom of the page respectively. Jump-to Navigation enables users to move between main sections on a single page, making it easy for users to traverse large amounts of content. | | **Jump to component:** Header Navigation Footer Navigation Jump-to Navigation |
|
|
104
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --- | ----------------------------------------------------------------------------- |
|
|
105
105
|
|
|
106
106
|
### Visual Preview
|
|
107
107
|
|
|
@@ -109,8 +109,8 @@ Navigation components enable users to move around an application, either between
|
|
|
109
109
|
|
|
110
110
|
## Header Navigation
|
|
111
111
|
|
|
112
|
-
|
|
|
113
|
-
| --- |
|
|
112
|
+
| | In Figma | | | Meets Accessibility | | | In Code |
|
|
113
|
+
| --- | -------- | --- | --- | ------------------- | --- | --- | ------- |
|
|
114
114
|
|
|
115
115
|
### Live Instance
|
|
116
116
|
|
|
@@ -124,12 +124,12 @@ Default
|
|
|
124
124
|
|
|
125
125
|
Header Navigation contains the following elements:
|
|
126
126
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
127
|
+
- Logo – when clicked, brings users back to the main landing page of the application
|
|
128
|
+
- Primary navigation group – contains navigation items that serve as the way users move between the main pages of the application
|
|
129
|
+
- Secondary navigation group – contains navigation items that are used to link out to relevant external sites, help or FAQ pages, tutorials, additional resources, etc.
|
|
130
|
+
- Optionally, secondary navigation items can display sub-navigation items when additional navigation options within the same category are needed
|
|
131
|
+
- Buttons – can be used for application-level tasks, account login and management, etc.
|
|
132
|
+
- Search Input – searches across the entire application
|
|
133
133
|
|
|
134
134
|
All elements besides the logo section are optional and their usage should be determined by the application's information architecture.
|
|
135
135
|
|
|
@@ -154,17 +154,17 @@ Use Wide when pages are being displayed at a **Large** or **Medium** breakpoint
|
|
|
154
154
|
The arrangement of the primary navigation group and the Search Input can be flipped depending on the application's navigation needs.
|
|
155
155
|
|
|
156
156
|
| Default | Default (inverted) |
|
|
157
|
-
|
|
|
157
|
+
| ------- | ------------------ |
|
|
158
158
|
|
|
159
159
|
#### Primary Navigation Items
|
|
160
160
|
|
|
161
161
|
| Default | Default (expandable) | Hover | Hover (expandable) | Selected | Open (expandable) |
|
|
162
|
-
|
|
|
162
|
+
| ------- | -------------------- | ----- | ------------------ | -------- | ----------------- |
|
|
163
163
|
|
|
164
164
|
#### Secondary Navigation Items
|
|
165
165
|
|
|
166
166
|
| Default | Default (expandable) | Hover | Hover (expandable) | Pressed | Open (expandable) |
|
|
167
|
-
|
|
|
167
|
+
| ------- | -------------------- | ----- | ------------------ | ------- | ----------------- |
|
|
168
168
|
|
|
169
169
|
---
|
|
170
170
|
|
|
@@ -173,34 +173,34 @@ The arrangement of the primary navigation group and the Search Input can be flip
|
|
|
173
173
|
Use Narrow when pages are being displayed at a **Small** breakpoint (though in some cases a Header Navigation – Narrow may be preferable for Medium breakpoints; see Responsive Design for more information).
|
|
174
174
|
|
|
175
175
|
| Default (closed) | Default (closed; inverted) | Default (open) | Default (open; inverted) |
|
|
176
|
-
|
|
|
176
|
+
| ---------------- | -------------------------- | -------------- | ------------------------ |
|
|
177
177
|
|
|
178
178
|
#### Primary Navigation Items
|
|
179
179
|
|
|
180
180
|
| Default | Default (collapsed) | Default (expanded) | Hover | Hover (collapsed) | Hover (expanded) | Active |
|
|
181
|
-
|
|
|
181
|
+
| ------- | ------------------- | ------------------ | ----- | ----------------- | ---------------- | ------ |
|
|
182
182
|
|
|
183
183
|
#### Primary Sub-navigation Items
|
|
184
184
|
|
|
185
185
|
| Default | Hover |
|
|
186
|
-
|
|
|
186
|
+
| ------- | ----- |
|
|
187
187
|
|
|
188
188
|
#### Secondary Navigation Items
|
|
189
189
|
|
|
190
190
|
| Default | Default (collapsed) | Default (expanded) | Hover | Hover (collapsed) | Hover (expanded) |
|
|
191
|
-
|
|
|
191
|
+
| ------- | ------------------- | ------------------ | ----- | ----------------- | ---------------- |
|
|
192
192
|
|
|
193
193
|
#### Secondary Sub-navigation Items
|
|
194
194
|
|
|
195
195
|
| Default | Hover |
|
|
196
|
-
|
|
|
196
|
+
| ------- | ----- |
|
|
197
197
|
|
|
198
198
|
---
|
|
199
199
|
|
|
200
200
|
## Footer Navigation
|
|
201
201
|
|
|
202
|
-
|
|
|
203
|
-
| --- |
|
|
202
|
+
| | In Figma | | | Meets Accessibility | | | In Code |
|
|
203
|
+
| --- | -------- | --- | --- | ------------------- | --- | --- | ------- |
|
|
204
204
|
|
|
205
205
|
### Live Instance
|
|
206
206
|
|
|
@@ -214,11 +214,11 @@ Default
|
|
|
214
214
|
|
|
215
215
|
Footer Navigation contains the following elements:
|
|
216
216
|
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
217
|
+
- Primary logo – when clicked, brings users back to the main landing page of the application
|
|
218
|
+
- Secondary logo group – for logos of partner institutions or other entities
|
|
219
|
+
- Navigation group – contains navigation items that serve as the way users move between the pages of the application
|
|
220
|
+
- It is recommended, though not required, that the Navigation Items in Navigation Footer match the Navigation Items found in the Primary Navigation group in Navigation Header, making for unified navigation across the application
|
|
221
|
+
- Link group – contains links to tertiary pages like Terms of Service, Privacy Policies, etc.
|
|
222
222
|
|
|
223
223
|
All elements besides the logo section are optional and their usage should be determined by the application's information architecture.
|
|
224
224
|
|
|
@@ -241,43 +241,43 @@ Once implemented into an application, the Footer Navigation type displayed will
|
|
|
241
241
|
Use Wide when pages are being displayed at a **Large** or **Medium** breakpoint (though in some cases Footer Navigation – Narrow may be preferable for Medium breakpoints; see Responsive Design for more information).
|
|
242
242
|
|
|
243
243
|
| Default | Default (inverted) |
|
|
244
|
-
|
|
|
244
|
+
| ------- | ------------------ |
|
|
245
245
|
|
|
246
246
|
#### Navigation Items
|
|
247
247
|
|
|
248
248
|
| Default | Hover | Pressed |
|
|
249
|
-
|
|
|
249
|
+
| ------- | ----- | ------- |
|
|
250
250
|
|
|
251
251
|
#### Link Items
|
|
252
252
|
|
|
253
253
|
| Default | Hover | Pressed |
|
|
254
|
-
|
|
|
254
|
+
| ------- | ----- | ------- |
|
|
255
255
|
|
|
256
256
|
---
|
|
257
257
|
|
|
258
258
|
### Footer Navigation – Narrow
|
|
259
259
|
|
|
260
|
-
Use Narrow when pages are being displayed at a **Small** breakpoint
|
|
260
|
+
Use Narrow when pages are being displayed at a **Small** breakpoint (though in some cases a Footer Navigation – Narrow may be preferable for Medium breakpoints; see Responsive Design for more information).
|
|
261
261
|
|
|
262
262
|
| Default | Default (inverted) |
|
|
263
|
-
|
|
|
263
|
+
| ------- | ------------------ |
|
|
264
264
|
|
|
265
265
|
#### Navigation Items
|
|
266
266
|
|
|
267
267
|
| Default | Hover | Pressed |
|
|
268
|
-
|
|
|
268
|
+
| ------- | ----- | ------- |
|
|
269
269
|
|
|
270
270
|
#### Link Items
|
|
271
271
|
|
|
272
272
|
| Default | Hover | Pressed |
|
|
273
|
-
|
|
|
273
|
+
| ------- | ----- | ------- |
|
|
274
274
|
|
|
275
275
|
---
|
|
276
276
|
|
|
277
277
|
## Jump-to Navigation
|
|
278
278
|
|
|
279
|
-
|
|
|
280
|
-
| --- |
|
|
279
|
+
| | In Figma | | | Meets Accessibility | | | In Code |
|
|
280
|
+
| --- | -------- | --- | --- | ------------------- | --- | --- | ------- |
|
|
281
281
|
|
|
282
282
|
### Live Instance
|
|
283
283
|
|
|
@@ -292,7 +292,7 @@ Default
|
|
|
292
292
|
The Jump-to Navigation component can contain as many Nav Items as necessary though must have a minimum of two. Each Nav Item is tied to a a section of the page and functions as a jump link to that page section. It is positioned on the right side of the page, anchored to the top of the page’s first paragraph and remains sticky on the page as the user scrolls; once the user scrolls into a new section, the active indicator on that section is highlighted until the user scrolls beyond it and into the next (or previous) at which point the indictor moves again. When the user clicks on any of the Nav Items, the page will smooth scroll to that section of the page.
|
|
293
293
|
|
|
294
294
|
| Default / Active | Hover |
|
|
295
|
-
|
|
|
295
|
+
| ---------------- | ----- |
|
|
296
296
|
|
|
297
297
|
---
|
|
298
298
|
|
|
@@ -304,12 +304,12 @@ These rules establish how much margin should exist between and around elements.
|
|
|
304
304
|
|
|
305
305
|
## Navigation Components
|
|
306
306
|
|
|
307
|
-
| Header and Footer Navigation provide the primary means for users to move between the top-level pages of an application as well as access important sections and links to relevant external content; they always sit at the top and bottom of the page respectively.
|
|
308
|
-
|
|
|
307
|
+
| Header and Footer Navigation provide the primary means for users to move between the top-level pages of an application as well as access important sections and links to relevant external content; they always sit at the top and bottom of the page respectively. Jump-to Navigation enables users to move between main sections on a single page, making it easy for users to traverse large amounts of content. | | **Jump to component:** NavigationHeader NavigationFooter NavigationJumpTo |
|
|
308
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --- | ------------------------------------------------------------------------- |
|
|
309
309
|
|
|
310
310
|
### Visual Preview
|
|
311
311
|
|
|
312
|
-
|
|
312
|
+
> **Note:** The code examples below must install dependencies before displaying and may take extra time to load
|
|
313
313
|
|
|
314
314
|
---
|
|
315
315
|
|
|
@@ -323,36 +323,36 @@ The component's source code in the SDS codebase can be found here.
|
|
|
323
323
|
|
|
324
324
|
Any custom SDS props and MUI props required for implementation are found on the table below. See the MUI documentation for additional optional props.
|
|
325
325
|
|
|
326
|
-
| Name
|
|
327
|
-
|
|
|
328
|
-
| `activePrimaryNavKey`
|
|
329
|
-
| `setActivePrimaryNavKey` | `(key: string) => void`
|
|
330
|
-
| `buttons`
|
|
331
|
-
| `hasInvertedStyle`
|
|
332
|
-
| `logo`
|
|
333
|
-
| `logoUrl`
|
|
334
|
-
| `logoLinkComponent`
|
|
335
|
-
| `logoLinkProps`
|
|
336
|
-
| `primaryNavItems`
|
|
337
|
-
| `primaryNavPosition`
|
|
338
|
-
| `position`
|
|
339
|
-
| `showSearch`
|
|
340
|
-
| `searchProps`
|
|
341
|
-
| `secondaryNavItems`
|
|
342
|
-
| `scrollElevation`
|
|
343
|
-
| `tag`
|
|
344
|
-
| `tagColor` |
|
|
345
|
-
| `title`
|
|
346
|
-
|
|
347
|
-
|
|
326
|
+
| Name | Type | Default | Description |
|
|
327
|
+
| ------------------------ | ------------------------------------- | ---------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------- | ------------ | --------- | ------------------- | ------------------------- | --------- | --------------------------- |
|
|
328
|
+
| `activePrimaryNavKey` | `string` | - | The key of the currently active primary navigation item. |
|
|
329
|
+
| `setActivePrimaryNavKey` | `(key: string) => void` | - | Callback function to set the active primary navigation key. |
|
|
330
|
+
| `buttons` | `ButtonProps[]` | - | An array of buttons displayed in the header. |
|
|
331
|
+
| `hasInvertedStyle` | `boolean` | `false` | When set to `true`, applies an inverted color scheme to the header component. |
|
|
332
|
+
| `logo` | `ReactNode` | - | The logo displayed in the header. Can be an image, icon, svg or any ReactNode. |
|
|
333
|
+
| `logoUrl` | `string` | - | URL for the logo link. If provided, clicking the logo navigates to this URL. |
|
|
334
|
+
| `logoLinkComponent` | `ElementType` | `a` | Specifies the component to use for the logo link. |
|
|
335
|
+
| `logoLinkProps` | `LinkProps` | - | Props to pass to the logo link component. |
|
|
336
|
+
| `primaryNavItems` | `NavigationHeaderPrimaryNavItem<T>[]` | - | List of items for the primary navigation section. |
|
|
337
|
+
| `primaryNavPosition` | `"left"` | `"right"` | `"left"` | Position of the primaryNavItems list. If set to `"left"`, the items appear to the left of the search bar. If set to `"right"`, they are positioned next to the secondaryNavItems on the right. |
|
|
338
|
+
| `position` | `string` | `"sticky"` | Specifies the CSS position value for the NavigationHeader. Accepts any valid CSS position value (e.g., "relative", "absolute", "fixed"). By default, it uses "sticky" to keep the header fixed at the top of the page while scrolling. |
|
|
339
|
+
| `showSearch` | `boolean` | `true` | Whether to display the search input in the header. |
|
|
340
|
+
| `searchProps` | `Partial<InputSearchProps>` | - | Props passed to the search input component. |
|
|
341
|
+
| `secondaryNavItems` | `NavigationHeaderSecondaryNavItem[]` | - | List of items for the secondary navigation section. |
|
|
342
|
+
| `scrollElevation` | `boolean` | `true` | Controls whether a shadow is shown under the Nav when scrolling. |
|
|
343
|
+
| `tag` | `string` | - | A small label displayed next to the title. |
|
|
344
|
+
| `tagColor` | ` | "info"` ` | "positive"` ` | "notice"` ` | "negative"` ` | "neutral"` ` | "beta"` ` | [string, string]` ` | [string, string, string]` | `neutral` | The color of the tag label. |
|
|
345
|
+
| `title` | `string` | - | The main title displayed in the header. |
|
|
346
|
+
|
|
347
|
+
> **Important Note!**
|
|
348
348
|
>
|
|
349
|
-
>The NavigationHeader component automatically switches to a mobile-friendly version when there isn’t enough space to display the full header.
|
|
349
|
+
> The NavigationHeader component automatically switches to a mobile-friendly version when there isn’t enough space to display the full header.
|
|
350
350
|
|
|
351
351
|
### Code examples
|
|
352
352
|
|
|
353
353
|
The example below shows a NavigationHeader component with all the possible sections available.
|
|
354
354
|
|
|
355
|
-
|
|
355
|
+
> **Note:** Due to a bug in Zeroheight we are unable to publish code examples at this time; we will update this section once a fix is released.
|
|
356
356
|
|
|
357
357
|
---
|
|
358
358
|
|
|
@@ -366,41 +366,41 @@ The component's source code in the SDS codebase can be found here.
|
|
|
366
366
|
|
|
367
367
|
Any custom SDS props and MUI props required for implementation are found on the table below. See the MUI documentation for additional optional props.
|
|
368
368
|
|
|
369
|
-
| Name
|
|
370
|
-
|
|
|
371
|
-
| `hasInvertedStyle` | `boolean`
|
|
372
|
-
| `images`
|
|
373
|
-
| `logo`
|
|
374
|
-
| `logoUrl`
|
|
375
|
-
| `logoComponent`
|
|
376
|
-
| `logoLinkProps`
|
|
377
|
-
| `navItems`
|
|
378
|
-
| `navLinks`
|
|
379
|
-
| `tag`
|
|
380
|
-
| `tagColor`
|
|
381
|
-
| `title`
|
|
369
|
+
| Name | Type | Default | Description |
|
|
370
|
+
| ------------------ | --------------------------- | ----------- | ---------------------------------------------------------------------------------------------------------- |
|
|
371
|
+
| `hasInvertedStyle` | `boolean` | `false` | If true, applies an inverted (dark-on-light) color scheme to the footer. |
|
|
372
|
+
| `images` | `FooterImage[]` | `-` | An array of images displayed in the footer. Each item includes an image, optional link URL, and component. |
|
|
373
|
+
| `logo` | `ReactNode` | `-` | The logo displayed in the footer. Can be any valid React node such as an image, icon, or SVG. |
|
|
374
|
+
| `logoUrl` | `string` | `-` | If provided, clicking the logo will navigate to this URL. |
|
|
375
|
+
| `logoComponent` | `ElementType` | `"a"` | Specifies the component to use for the logo link. Defaults to an anchor tag. |
|
|
376
|
+
| `logoLinkProps` | `Record<string, unknown>` | `-` | Additional props passed to the logo link component. |
|
|
377
|
+
| `navItems` | `NavigationFooterNavItem[]` | `-` | List of navigation items displayed next to the logo. |
|
|
378
|
+
| `navLinks` | `NavigationFooterNavItem[]` | `-` | List of secondary links shown at the bottom section of the footer. |
|
|
379
|
+
| `tag` | `string` | `-` | A small label displayed next to the title. |
|
|
380
|
+
| `tagColor` | `TagProps["tagColor"]` | `"neutral"` | The color of the tag. Accepts predefined tag color values from the Tag component. |
|
|
381
|
+
| `title` | `string` | `-` | The main title displayed in the footer. |
|
|
382
382
|
|
|
383
383
|
### FooterImage
|
|
384
384
|
|
|
385
|
-
| Name
|
|
386
|
-
|
|
|
387
|
-
| `image`
|
|
388
|
-
| `url`
|
|
389
|
-
| `component` | `ElementType`
|
|
390
|
-
| `linkProps` | `Record<string, unknown>` | `-`
|
|
385
|
+
| Name | Type | Default | Description |
|
|
386
|
+
| ----------- | ------------------------- | ------- | -------------------------------------------------------------------------------- |
|
|
387
|
+
| `image` | `ReactNode` | `-` | The image element to be displayed. Can be an icon, image, SVG, or any ReactNode. |
|
|
388
|
+
| `url` | `string` | `-` | Optional URL to navigate to when the image is clicked. |
|
|
389
|
+
| `component` | `ElementType` | `"a"` | Custom link component to use for navigation (e.g., a router link). |
|
|
390
|
+
| `linkProps` | `Record<string, unknown>` | `-` | Additional props passed to the link component. |
|
|
391
391
|
|
|
392
392
|
### NavigationFooterNavItem
|
|
393
393
|
|
|
394
|
-
| Name
|
|
395
|
-
|
|
|
396
|
-
| `label`
|
|
397
|
-
| `url`
|
|
398
|
-
| `component` | `ElementType`
|
|
399
|
-
| `linkProps` | `Record<string, unknown>` | `-`
|
|
394
|
+
| Name | Type | Default | Description |
|
|
395
|
+
| ----------- | ------------------------- | ------- | --------------------------------------------------------- |
|
|
396
|
+
| `label` | `string` | `-` | The text label displayed for the navigation item. |
|
|
397
|
+
| `url` | `string` | `-` | Optional URL the item links to. |
|
|
398
|
+
| `component` | `ElementType` | `"a"` | Custom component to render the link (e.g., Next.js Link). |
|
|
399
|
+
| `linkProps` | `Record<string, unknown>` | `-` | Props forwarded to the link component. |
|
|
400
400
|
|
|
401
401
|
### Code examples
|
|
402
402
|
|
|
403
|
-
|
|
403
|
+
> **Note:** Due to a bug in Zeroheight we are unable to publish code examples at this time; we will update this section once a fix is released.
|
|
404
404
|
|
|
405
405
|
---
|
|
406
406
|
|
|
@@ -412,15 +412,15 @@ The component's source code in the SDS codebase can be found here.
|
|
|
412
412
|
|
|
413
413
|
### SDS vs MUI
|
|
414
414
|
|
|
415
|
-
SDS's `NavigationJumpTo` uses MUI's `Tab`
|
|
415
|
+
SDS's `NavigationJumpTo` uses MUI's `Tab` component under the hood. `NavigationJumpTo` acts as an indicator of where a user is on a page as well as allowing them to navigate to different page sections. It differs from MUI's `Tab` component in a few main ways:
|
|
416
416
|
|
|
417
|
-
**`orientation
|
|
417
|
+
**`orientation`\*\***:\*\* SDS's `NavigationJumpTo` design only supports `orientation="vertical"`, which is baked into its code by default, whereas the default `orientation` value for MUI's `Tab` component is `horizontal`. Setting `orientation="horizontal"` on `NaviagationJumpTo` is not recommended.
|
|
418
418
|
|
|
419
|
-
**`textColor
|
|
419
|
+
**`textColor`\*\***:\*\* Changing the text color of a tab within `NavigationJumpTo` is not currently supported. However, you can still change the `indicatorColor`; it will take any of the SDS colors (`beta`, `error`, `gray`, `info`, `primary`, `success`, `warning`).
|
|
420
420
|
|
|
421
|
-
**`icon
|
|
421
|
+
**`icon`\*\***:\*\* `NavigationJumpTo` does not support the inclusion of icons.
|
|
422
422
|
|
|
423
|
-
**`offsetTop
|
|
423
|
+
**`offsetTop`\*\***:\*\* This prop is exclusive to `NavigationJumpTo` and takes a number between 0 to 100. It means that a section indicator will turn on when the top of that section is the specified number of pixels below the top of the window. This is used to adjust when the section indicator moves to a different section based on the preference of a team.
|
|
424
424
|
|
|
425
425
|
### MUI Documentation
|
|
426
426
|
|
|
@@ -430,11 +430,11 @@ Documentation for the underlying MUI component can be found here.
|
|
|
430
430
|
|
|
431
431
|
Any custom SDS props and MUI props required for implementation are found on the table below. See the MUI documentation for additional optional props.
|
|
432
432
|
|
|
433
|
-
| Name
|
|
434
|
-
|
|
|
435
|
-
| `items`
|
|
436
|
-
| `offsetTop` | `number`
|
|
437
|
-
| `onChange`
|
|
433
|
+
| Name | Type | Default | Description |
|
|
434
|
+
| ----------- | -------------------------------------------------------------------------- | --------------------- | -------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------- |
|
|
435
|
+
| `items` | `Array<{` `title: string;` `elementRef: React.MutableRefObject<HTMLElement | null>;` `}>;` | `-` | An array of items to be displayed in the NavigationJumpTo component. |
|
|
436
|
+
| `offsetTop` | `number` | `-` | The top offset for scrolling, measured in pixels comes before the target element during scrolling. |
|
|
437
|
+
| `onChange` | `(` `value: number,` `event?: React.SyntheticEvent,` `type?: "click" | "scroll"``) => void;` | `-` | Defines the action to be taken when the value changes. |
|
|
438
438
|
|
|
439
439
|
### Code examples
|
|
440
440
|
|
|
@@ -467,13 +467,11 @@ h1 {
|
|
|
467
467
|
|
|
468
468
|
```json
|
|
469
469
|
{
|
|
470
|
-
"include": [
|
|
471
|
-
"./**/*"
|
|
472
|
-
],
|
|
470
|
+
"include": ["./**/*"],
|
|
473
471
|
"compilerOptions": {
|
|
474
472
|
"strict": true,
|
|
475
473
|
"esModuleInterop": true,
|
|
476
|
-
"lib": [
|
|
474
|
+
"lib": ["dom", "es2015"],
|
|
477
475
|
"jsx": "react-jsx"
|
|
478
476
|
}
|
|
479
477
|
}
|
|
@@ -488,13 +486,15 @@ import "./styles.css";
|
|
|
488
486
|
function App() {
|
|
489
487
|
return (
|
|
490
488
|
<div className="app">
|
|
491
|
-
<NavigationJumpTo
|
|
492
|
-
{
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
489
|
+
<NavigationJumpTo
|
|
490
|
+
items={[
|
|
491
|
+
{ elementRef: { current: null }, title: "Item 1" },
|
|
492
|
+
{ elementRef: { current: null }, title: "Item 2" },
|
|
493
|
+
{ elementRef: { current: null }, title: "Item 3" },
|
|
494
|
+
{ elementRef: { current: null }, title: "Item 4" },
|
|
495
|
+
{ elementRef: { current: null }, title: "Item 5" },
|
|
496
|
+
]}
|
|
497
|
+
/>
|
|
498
498
|
</div>
|
|
499
499
|
);
|
|
500
500
|
}
|
|
@@ -539,13 +539,12 @@ root.render(
|
|
|
539
539
|
<RootApp />
|
|
540
540
|
</React.StrictMode>
|
|
541
541
|
);
|
|
542
|
-
|
|
543
542
|
```
|
|
544
543
|
|
|
545
544
|
**/public/index.html**
|
|
546
545
|
|
|
547
546
|
```html
|
|
548
|
-
<!
|
|
547
|
+
<!doctype html>
|
|
549
548
|
<html lang="en">
|
|
550
549
|
<head>
|
|
551
550
|
<meta charset="UTF-8" />
|
|
@@ -566,13 +565,24 @@ root.render(
|
|
|
566
565
|
<div id="root"></div>
|
|
567
566
|
</body>
|
|
568
567
|
</html>
|
|
569
|
-
|
|
570
568
|
```
|
|
571
569
|
|
|
572
570
|
**/package.json**
|
|
573
571
|
|
|
574
572
|
```json
|
|
575
|
-
{
|
|
573
|
+
{
|
|
574
|
+
"dependencies": {
|
|
575
|
+
"react": "^18.0.0",
|
|
576
|
+
"react-dom": "^18.0.0",
|
|
577
|
+
"react-scripts": "^4.0.0"
|
|
578
|
+
},
|
|
579
|
+
"devDependencies": {
|
|
580
|
+
"@types/react": "^18.0.0",
|
|
581
|
+
"@types/react-dom": "^18.0.0",
|
|
582
|
+
"typescript": "^4.0.0"
|
|
583
|
+
},
|
|
584
|
+
"main": "/index.tsx"
|
|
585
|
+
}
|
|
576
586
|
```
|
|
577
587
|
|
|
578
588
|
---
|
|
@@ -606,13 +616,11 @@ h1 {
|
|
|
606
616
|
|
|
607
617
|
```json
|
|
608
618
|
{
|
|
609
|
-
"include": [
|
|
610
|
-
"./**/*"
|
|
611
|
-
],
|
|
619
|
+
"include": ["./**/*"],
|
|
612
620
|
"compilerOptions": {
|
|
613
621
|
"strict": true,
|
|
614
622
|
"esModuleInterop": true,
|
|
615
|
-
"lib": [
|
|
623
|
+
"lib": ["dom", "es2015"],
|
|
616
624
|
"jsx": "react-jsx"
|
|
617
625
|
}
|
|
618
626
|
}
|
|
@@ -622,7 +630,11 @@ h1 {
|
|
|
622
630
|
|
|
623
631
|
```tsx
|
|
624
632
|
import { forwardRef, useState, useRef } from "react";
|
|
625
|
-
import {
|
|
633
|
+
import {
|
|
634
|
+
InputSlider,
|
|
635
|
+
NavigationJumpTo,
|
|
636
|
+
getSemanticColors,
|
|
637
|
+
} from "@czi-sds/components";
|
|
626
638
|
import { useTheme } from "@mui/material";
|
|
627
639
|
import { Box } from "@mui/material";
|
|
628
640
|
import "./styles.css";
|
|
@@ -635,8 +647,8 @@ const TabPanel = forwardRef<HTMLDivElement, TabPanelPropsExtra>(
|
|
|
635
647
|
(props, ref) => {
|
|
636
648
|
const { children, sdsDemoHeight, ...other } = props;
|
|
637
649
|
const theme = useTheme();
|
|
638
|
-
const semanticColors = getSemanticColors({theme});
|
|
639
|
-
|
|
650
|
+
const semanticColors = getSemanticColors({ theme });
|
|
651
|
+
|
|
640
652
|
return (
|
|
641
653
|
<div
|
|
642
654
|
ref={ref}
|
|
@@ -668,7 +680,7 @@ const TabPanel = forwardRef<HTMLDivElement, TabPanelPropsExtra>(
|
|
|
668
680
|
);
|
|
669
681
|
|
|
670
682
|
function App() {
|
|
671
|
-
|
|
683
|
+
const [navPanelHeight, setNavPanelHeight] = useState(100);
|
|
672
684
|
const sectionRef0 = useRef(null);
|
|
673
685
|
const sectionRef1 = useRef(null);
|
|
674
686
|
const sectionRef2 = useRef(null);
|
|
@@ -813,13 +825,12 @@ root.render(
|
|
|
813
825
|
<RootApp />
|
|
814
826
|
</React.StrictMode>
|
|
815
827
|
);
|
|
816
|
-
|
|
817
828
|
```
|
|
818
829
|
|
|
819
830
|
**/public/index.html**
|
|
820
831
|
|
|
821
832
|
```html
|
|
822
|
-
<!
|
|
833
|
+
<!doctype html>
|
|
823
834
|
<html lang="en">
|
|
824
835
|
<head>
|
|
825
836
|
<meta charset="UTF-8" />
|
|
@@ -840,14 +851,24 @@ root.render(
|
|
|
840
851
|
<div id="root"></div>
|
|
841
852
|
</body>
|
|
842
853
|
</html>
|
|
843
|
-
|
|
844
854
|
```
|
|
845
855
|
|
|
846
856
|
**/package.json**
|
|
847
857
|
|
|
848
858
|
```json
|
|
849
|
-
{
|
|
859
|
+
{
|
|
860
|
+
"dependencies": {
|
|
861
|
+
"react": "^18.0.0",
|
|
862
|
+
"react-dom": "^18.0.0",
|
|
863
|
+
"react-scripts": "^4.0.0"
|
|
864
|
+
},
|
|
865
|
+
"devDependencies": {
|
|
866
|
+
"@types/react": "^18.0.0",
|
|
867
|
+
"@types/react-dom": "^18.0.0",
|
|
868
|
+
"typescript": "^4.0.0"
|
|
869
|
+
},
|
|
870
|
+
"main": "/index.tsx"
|
|
871
|
+
}
|
|
850
872
|
```
|
|
851
873
|
|
|
852
874
|
---
|
|
853
|
-
|