@instructure/ui-top-nav-bar 8.48.1-snapshot-1 → 8.48.1-snapshot-2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,7 +3,7 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
- ## [8.48.1-snapshot-1](https://github.com/instructure/instructure-ui/compare/v8.48.0...v8.48.1-snapshot-1) (2023-11-15)
6
+ ## [8.48.1-snapshot-2](https://github.com/instructure/instructure-ui/compare/v8.48.0...v8.48.1-snapshot-2) (2023-11-15)
7
7
 
8
8
  **Note:** Version bump only for package @instructure/ui-top-nav-bar
9
9
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/ui-top-nav-bar",
3
- "version": "8.48.1-snapshot-1",
3
+ "version": "8.48.1-snapshot-2",
4
4
  "description": "A UI component library made by Instructure Inc.",
5
5
  "author": "Instructure, Inc. Engineering and Product Design",
6
6
  "module": "./es/index.js",
@@ -24,37 +24,37 @@
24
24
  "license": "MIT",
25
25
  "dependencies": {
26
26
  "@babel/runtime": "^7.23.2",
27
- "@instructure/console": "8.48.1-snapshot-1",
28
- "@instructure/emotion": "8.48.1-snapshot-1",
29
- "@instructure/shared-types": "8.48.1-snapshot-1",
30
- "@instructure/ui-a11y-content": "8.48.1-snapshot-1",
31
- "@instructure/ui-avatar": "8.48.1-snapshot-1",
32
- "@instructure/ui-breadcrumb": "8.48.1-snapshot-1",
33
- "@instructure/ui-buttons": "8.48.1-snapshot-1",
34
- "@instructure/ui-dialog": "8.48.1-snapshot-1",
35
- "@instructure/ui-dom-utils": "8.48.1-snapshot-1",
36
- "@instructure/ui-drilldown": "8.48.1-snapshot-1",
37
- "@instructure/ui-icons": "8.48.1-snapshot-1",
38
- "@instructure/ui-link": "8.48.1-snapshot-1",
39
- "@instructure/ui-popover": "8.48.1-snapshot-1",
40
- "@instructure/ui-prop-types": "8.48.1-snapshot-1",
41
- "@instructure/ui-react-utils": "8.48.1-snapshot-1",
42
- "@instructure/ui-responsive": "8.48.1-snapshot-1",
43
- "@instructure/ui-testable": "8.48.1-snapshot-1",
44
- "@instructure/ui-tooltip": "8.48.1-snapshot-1",
45
- "@instructure/ui-tray": "8.48.1-snapshot-1",
46
- "@instructure/ui-truncate-list": "8.48.1-snapshot-1",
47
- "@instructure/ui-utils": "8.48.1-snapshot-1",
48
- "@instructure/ui-view": "8.48.1-snapshot-1",
27
+ "@instructure/console": "8.48.1-snapshot-2",
28
+ "@instructure/emotion": "8.48.1-snapshot-2",
29
+ "@instructure/shared-types": "8.48.1-snapshot-2",
30
+ "@instructure/ui-a11y-content": "8.48.1-snapshot-2",
31
+ "@instructure/ui-avatar": "8.48.1-snapshot-2",
32
+ "@instructure/ui-breadcrumb": "8.48.1-snapshot-2",
33
+ "@instructure/ui-buttons": "8.48.1-snapshot-2",
34
+ "@instructure/ui-dialog": "8.48.1-snapshot-2",
35
+ "@instructure/ui-dom-utils": "8.48.1-snapshot-2",
36
+ "@instructure/ui-drilldown": "8.48.1-snapshot-2",
37
+ "@instructure/ui-icons": "8.48.1-snapshot-2",
38
+ "@instructure/ui-link": "8.48.1-snapshot-2",
39
+ "@instructure/ui-popover": "8.48.1-snapshot-2",
40
+ "@instructure/ui-prop-types": "8.48.1-snapshot-2",
41
+ "@instructure/ui-react-utils": "8.48.1-snapshot-2",
42
+ "@instructure/ui-responsive": "8.48.1-snapshot-2",
43
+ "@instructure/ui-testable": "8.48.1-snapshot-2",
44
+ "@instructure/ui-tooltip": "8.48.1-snapshot-2",
45
+ "@instructure/ui-tray": "8.48.1-snapshot-2",
46
+ "@instructure/ui-truncate-list": "8.48.1-snapshot-2",
47
+ "@instructure/ui-utils": "8.48.1-snapshot-2",
48
+ "@instructure/ui-view": "8.48.1-snapshot-2",
49
49
  "prop-types": "^15.8.1"
50
50
  },
51
51
  "devDependencies": {
52
- "@instructure/ui-axe-check": "8.48.1-snapshot-1",
53
- "@instructure/ui-babel-preset": "8.48.1-snapshot-1",
54
- "@instructure/ui-color-utils": "8.48.1-snapshot-1",
55
- "@instructure/ui-test-locator": "8.48.1-snapshot-1",
56
- "@instructure/ui-test-utils": "8.48.1-snapshot-1",
57
- "@instructure/ui-themes": "8.48.1-snapshot-1",
52
+ "@instructure/ui-axe-check": "8.48.1-snapshot-2",
53
+ "@instructure/ui-babel-preset": "8.48.1-snapshot-2",
54
+ "@instructure/ui-color-utils": "8.48.1-snapshot-2",
55
+ "@instructure/ui-test-locator": "8.48.1-snapshot-2",
56
+ "@instructure/ui-test-utils": "8.48.1-snapshot-2",
57
+ "@instructure/ui-themes": "8.48.1-snapshot-2",
58
58
  "@testing-library/jest-dom": "^6.1.4",
59
59
  "@testing-library/react": "^14.1.0"
60
60
  },
@@ -1230,9 +1230,21 @@ example: true
1230
1230
 
1231
1231
  ##### TopNavBar.Breadcrumb
1232
1232
 
1233
- `<TopNavBar.Breadcrumb>` contains a Breadcrumb component with multiple links/pages.
1233
+ `<TopNavBar.Breadcrumb>` contains a `<Breadcrumb>` component with multiple links and a hamburger icon.
1234
1234
 
1235
- You can't use `<TopNavBar.Breadcrumb>` along with the brand logo or menu items.
1235
+ In order to use `<TopNavBar.Breadcrumb>` in desktop mode, the following conditions must be met:
1236
+
1237
+ 1. `inverseColor` should be set to `true` on `<TopNavBar>`.
1238
+ 2. `renderBrand` property should **not** be set on `<TopNavBar.Layout>`.
1239
+ 3. `renderMenuItems` property should **not** be set `<TopNavBar.Layout>`.
1240
+ 4. `renderBreadcrumb` property should be implemented on `<TopNavBar.Layout>`.
1241
+ 5. (optional) an `onClick` property can be passed to `<TopNavBar.Breadcrumb>` to handle the click event on the hamburger icon.
1242
+
1243
+ In small viewport mode, a link is shown for the last but one element of the `<Breadcrumb>` instead of all the crumbs and the hamburger icon. One has to set the following:
1244
+
1245
+ 1. `inverseColor` should be set to `true` on `<TopNavBar>`.
1246
+ 2. `renderBreadcrumb` property should be implemented on `<TopNavBar.Layout>`.
1247
+ 3. rest of the props starting with render should not be added.
1236
1248
 
1237
1249
  ```js
1238
1250
  ---
@@ -1252,13 +1264,13 @@ example: true
1252
1264
  dropdownMenuLabel: 'Main Menu',
1253
1265
  }}
1254
1266
  renderBreadcrumb={(
1255
- <TopNavBar.Breadcrumb>
1267
+ <TopNavBar.Breadcrumb onClick={console.log("Hamburger icon clicked.")}>
1256
1268
  <Breadcrumb label="You are here:">
1257
- <Breadcrumb.Link>Course page 1</Breadcrumb.Link>
1258
- <Breadcrumb.Link>Course page 2</Breadcrumb.Link>
1259
- <Breadcrumb.Link>Course page 3</Breadcrumb.Link>
1260
- <Breadcrumb.Link>Course page 4</Breadcrumb.Link>
1261
- <Breadcrumb.Link>Course page 5</Breadcrumb.Link>
1269
+ <Breadcrumb.Link href="#">Course page 1</Breadcrumb.Link>
1270
+ <Breadcrumb.Link href="#">Course page 2</Breadcrumb.Link>
1271
+ <Breadcrumb.Link href="#">Course page 3</Breadcrumb.Link>
1272
+ <Breadcrumb.Link href="#">Course page 4</Breadcrumb.Link>
1273
+ <Breadcrumb.Link href="#">Course page 5</Breadcrumb.Link>
1262
1274
  </Breadcrumb>
1263
1275
  </TopNavBar.Breadcrumb>
1264
1276
  )}
@@ -98,6 +98,7 @@ type CommonTopNavBarLayoutProps = {
98
98
  * Displays a hamburger icon with a breadcrumb.
99
99
  *
100
100
  * In __desktop__ mode it renders in the top left corner of the navbar.
101
+ * In __smallViewport__ mode it renders a link of the last but one crumb with a chevron icon.
101
102
  *
102
103
  * Accepts a `<TopNavBar.Breadcrumb>` component.
103
104
  */