@instructure/ui-top-nav-bar 11.7.5 → 11.7.6-snapshot-11

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 (70) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/es/TopNavBar/v1/utils/mapItemsForDrilldown.js +3 -3
  3. package/es/TopNavBar/v2/utils/mapItemsForDrilldown.js +3 -3
  4. package/lib/TopNavBar/v1/utils/mapItemsForDrilldown.js +3 -3
  5. package/lib/TopNavBar/v2/utils/mapItemsForDrilldown.js +3 -3
  6. package/package.json +26 -26
  7. package/src/TopNavBar/v1/utils/mapItemsForDrilldown.tsx +3 -7
  8. package/src/TopNavBar/v2/utils/mapItemsForDrilldown.tsx +3 -7
  9. package/tsconfig.build.tsbuildinfo +1 -1
  10. package/types/TopNavBar/v1/TopNavBarActionItems/index.d.ts.map +1 -1
  11. package/types/TopNavBar/v1/TopNavBarActionItems/styles.d.ts.map +1 -1
  12. package/types/TopNavBar/v1/TopNavBarActionItems/theme.d.ts.map +1 -1
  13. package/types/TopNavBar/v1/TopNavBarBrand/index.d.ts.map +1 -1
  14. package/types/TopNavBar/v1/TopNavBarBrand/styles.d.ts.map +1 -1
  15. package/types/TopNavBar/v1/TopNavBarBrand/theme.d.ts.map +1 -1
  16. package/types/TopNavBar/v1/TopNavBarBreadcrumb/index.d.ts.map +1 -1
  17. package/types/TopNavBar/v1/TopNavBarBreadcrumb/styles.d.ts.map +1 -1
  18. package/types/TopNavBar/v1/TopNavBarContext.d.ts.map +1 -1
  19. package/types/TopNavBar/v1/TopNavBarItem/index.d.ts +3 -3
  20. package/types/TopNavBar/v1/TopNavBarItem/index.d.ts.map +1 -1
  21. package/types/TopNavBar/v1/TopNavBarItem/styles.d.ts.map +1 -1
  22. package/types/TopNavBar/v1/TopNavBarItem/theme.d.ts.map +1 -1
  23. package/types/TopNavBar/v1/TopNavBarLayout/DesktopLayout/index.d.ts +1 -1
  24. package/types/TopNavBar/v1/TopNavBarLayout/DesktopLayout/index.d.ts.map +1 -1
  25. package/types/TopNavBar/v1/TopNavBarLayout/DesktopLayout/styles.d.ts.map +1 -1
  26. package/types/TopNavBar/v1/TopNavBarLayout/DesktopLayout/theme.d.ts.map +1 -1
  27. package/types/TopNavBar/v1/TopNavBarLayout/SmallViewportLayout/index.d.ts.map +1 -1
  28. package/types/TopNavBar/v1/TopNavBarLayout/SmallViewportLayout/styles.d.ts.map +1 -1
  29. package/types/TopNavBar/v1/TopNavBarLayout/SmallViewportLayout/theme.d.ts.map +1 -1
  30. package/types/TopNavBar/v1/TopNavBarLayout/index.d.ts +1 -1
  31. package/types/TopNavBar/v1/TopNavBarLayout/index.d.ts.map +1 -1
  32. package/types/TopNavBar/v1/TopNavBarLayout/theme.d.ts.map +1 -1
  33. package/types/TopNavBar/v1/TopNavBarMenuItems/index.d.ts.map +1 -1
  34. package/types/TopNavBar/v1/TopNavBarMenuItems/styles.d.ts.map +1 -1
  35. package/types/TopNavBar/v1/TopNavBarMenuItems/theme.d.ts.map +1 -1
  36. package/types/TopNavBar/v1/TopNavBarUser/index.d.ts.map +1 -1
  37. package/types/TopNavBar/v1/TopNavBarUser/styles.d.ts.map +1 -1
  38. package/types/TopNavBar/v1/index.d.ts.map +1 -1
  39. package/types/TopNavBar/v1/utils/exampleHelpers.d.ts +14 -14
  40. package/types/TopNavBar/v1/utils/exampleHelpers.d.ts.map +1 -1
  41. package/types/TopNavBar/v1/utils/mapItemsForDrilldown.d.ts.map +1 -1
  42. package/types/TopNavBar/v2/TopNavBarActionItems/index.d.ts.map +1 -1
  43. package/types/TopNavBar/v2/TopNavBarActionItems/styles.d.ts +1 -1
  44. package/types/TopNavBar/v2/TopNavBarActionItems/styles.d.ts.map +1 -1
  45. package/types/TopNavBar/v2/TopNavBarBrand/index.d.ts.map +1 -1
  46. package/types/TopNavBar/v2/TopNavBarBrand/styles.d.ts +1 -1
  47. package/types/TopNavBar/v2/TopNavBarBrand/styles.d.ts.map +1 -1
  48. package/types/TopNavBar/v2/TopNavBarBreadcrumb/index.d.ts.map +1 -1
  49. package/types/TopNavBar/v2/TopNavBarBreadcrumb/styles.d.ts.map +1 -1
  50. package/types/TopNavBar/v2/TopNavBarContext.d.ts.map +1 -1
  51. package/types/TopNavBar/v2/TopNavBarItem/index.d.ts +3 -3
  52. package/types/TopNavBar/v2/TopNavBarItem/index.d.ts.map +1 -1
  53. package/types/TopNavBar/v2/TopNavBarItem/styles.d.ts +1 -1
  54. package/types/TopNavBar/v2/TopNavBarItem/styles.d.ts.map +1 -1
  55. package/types/TopNavBar/v2/TopNavBarLayout/DesktopLayout/index.d.ts.map +1 -1
  56. package/types/TopNavBar/v2/TopNavBarLayout/DesktopLayout/styles.d.ts +1 -1
  57. package/types/TopNavBar/v2/TopNavBarLayout/DesktopLayout/styles.d.ts.map +1 -1
  58. package/types/TopNavBar/v2/TopNavBarLayout/SmallViewportLayout/index.d.ts.map +1 -1
  59. package/types/TopNavBar/v2/TopNavBarLayout/SmallViewportLayout/styles.d.ts +1 -1
  60. package/types/TopNavBar/v2/TopNavBarLayout/SmallViewportLayout/styles.d.ts.map +1 -1
  61. package/types/TopNavBar/v2/TopNavBarLayout/index.d.ts.map +1 -1
  62. package/types/TopNavBar/v2/TopNavBarMenuItems/index.d.ts.map +1 -1
  63. package/types/TopNavBar/v2/TopNavBarMenuItems/styles.d.ts +1 -1
  64. package/types/TopNavBar/v2/TopNavBarMenuItems/styles.d.ts.map +1 -1
  65. package/types/TopNavBar/v2/TopNavBarUser/index.d.ts.map +1 -1
  66. package/types/TopNavBar/v2/TopNavBarUser/styles.d.ts.map +1 -1
  67. package/types/TopNavBar/v2/index.d.ts.map +1 -1
  68. package/types/TopNavBar/v2/utils/exampleHelpers.d.ts +14 -14
  69. package/types/TopNavBar/v2/utils/exampleHelpers.d.ts.map +1 -1
  70. package/types/TopNavBar/v2/utils/mapItemsForDrilldown.d.ts.map +1 -1
package/CHANGELOG.md CHANGED
@@ -3,6 +3,17 @@
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
+ ## [11.7.6-snapshot-11](https://github.com/instructure/instructure-ui/compare/v11.7.5...v11.7.6-snapshot-11) (2026-08-31)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **many:** generate deterministic ids with React useId ([83aa25a](https://github.com/instructure/instructure-ui/commit/83aa25aebd41720fd09beac025dbf961e1f413c2))
12
+
13
+
14
+
15
+
16
+
6
17
  ## [11.7.5](https://github.com/instructure/instructure-ui/compare/v11.7.4...v11.7.5) (2026-08-25)
7
18
 
8
19
  **Note:** Version bump only for package @instructure/ui-top-nav-bar
@@ -24,7 +24,6 @@
24
24
 
25
25
  import { Children } from 'react';
26
26
  import { warn } from '@instructure/console';
27
- import { generateId } from '@instructure/ui-utils';
28
27
  import { matchComponentTypes } from '@instructure/ui-react-utils';
29
28
  import { Drilldown } from '@instructure/ui-drilldown/v11_6';
30
29
  import { TopNavBarItem } from '../TopNavBarItem/index.js';
@@ -36,7 +35,6 @@ const mapItemsForDrilldown = (itemList, options = {}) => {
36
35
  currentPageId,
37
36
  renderOptionContent
38
37
  } = options;
39
- const customPopoverIdMap = new Map();
40
38
  Children.forEach(itemList, item => {
41
39
  if (!item || !matchComponentTypes(item, [TopNavBarItem])) return;
42
40
  const {
@@ -80,7 +78,9 @@ const mapItemsForDrilldown = (itemList, options = {}) => {
80
78
 
81
79
  // if still has customPopover...
82
80
  if (customPopover) {
83
- customPopoverId = generateId(`TopNavBarItem__customPopoverOption`, customPopoverIdMap);
81
+ // Derive a stable, unique id from the item's (required) id so it
82
+ // matches across server and client renders without a shared counter.
83
+ customPopoverId = `${id}__customPopoverOption`;
84
84
  optionSubPageId = customPopoverId;
85
85
  submenuPages.push(_jsx(Drilldown.Page, {
86
86
  id: customPopoverId,
@@ -24,7 +24,6 @@
24
24
 
25
25
  import { Children } from 'react';
26
26
  import { warn } from '@instructure/console';
27
- import { generateId } from '@instructure/ui-utils';
28
27
  import { matchComponentTypes } from '@instructure/ui-react-utils';
29
28
  import { Drilldown } from '@instructure/ui-drilldown/latest';
30
29
  import { TopNavBarItem } from '../TopNavBarItem/index.js';
@@ -36,7 +35,6 @@ const mapItemsForDrilldown = (itemList, options = {}) => {
36
35
  currentPageId,
37
36
  renderOptionContent
38
37
  } = options;
39
- const customPopoverIdMap = new Map();
40
38
  Children.forEach(itemList, item => {
41
39
  if (!item || !matchComponentTypes(item, [TopNavBarItem])) return;
42
40
  const {
@@ -80,7 +78,9 @@ const mapItemsForDrilldown = (itemList, options = {}) => {
80
78
 
81
79
  // if still has customPopover...
82
80
  if (customPopover) {
83
- customPopoverId = generateId(`TopNavBarItem__customPopoverOption`, customPopoverIdMap);
81
+ // Derive a stable, unique id from the item's (required) id so it
82
+ // matches across server and client renders without a shared counter.
83
+ customPopoverId = `${id}__customPopoverOption`;
84
84
  optionSubPageId = customPopoverId;
85
85
  submenuPages.push(_jsx(Drilldown.Page, {
86
86
  id: customPopoverId,
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.renderMappedItemsAsDrilldownOptions = exports.renderMappedItemDrilldownSubpages = exports.mapItemsForDrilldown = exports.default = void 0;
7
7
  var _react = require("react");
8
8
  var _console = require("@instructure/console");
9
- var _generateId = require("@instructure/ui-utils/lib/generateId.js");
10
9
  var _matchComponentTypes = require("@instructure/ui-react-utils/lib/matchComponentTypes.js");
11
10
  var _v11_ = require("@instructure/ui-drilldown/v11_6");
12
11
  var _index = require("../TopNavBarItem/index.js");
@@ -42,7 +41,6 @@ const mapItemsForDrilldown = (itemList, options = {}) => {
42
41
  currentPageId,
43
42
  renderOptionContent
44
43
  } = options;
45
- const customPopoverIdMap = new Map();
46
44
  _react.Children.forEach(itemList, item => {
47
45
  if (!item || !(0, _matchComponentTypes.matchComponentTypes)(item, [_index.TopNavBarItem])) return;
48
46
  const {
@@ -86,7 +84,9 @@ const mapItemsForDrilldown = (itemList, options = {}) => {
86
84
 
87
85
  // if still has customPopover...
88
86
  if (customPopover) {
89
- customPopoverId = (0, _generateId.generateId)(`TopNavBarItem__customPopoverOption`, customPopoverIdMap);
87
+ // Derive a stable, unique id from the item's (required) id so it
88
+ // matches across server and client renders without a shared counter.
89
+ customPopoverId = `${id}__customPopoverOption`;
90
90
  optionSubPageId = customPopoverId;
91
91
  submenuPages.push((0, _jsxRuntime.jsx)(_v11_.Drilldown.Page, {
92
92
  id: customPopoverId,
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.renderMappedItemsAsDrilldownOptions = exports.renderMappedItemDrilldownSubpages = exports.mapItemsForDrilldown = exports.default = void 0;
7
7
  var _react = require("react");
8
8
  var _console = require("@instructure/console");
9
- var _generateId = require("@instructure/ui-utils/lib/generateId.js");
10
9
  var _matchComponentTypes = require("@instructure/ui-react-utils/lib/matchComponentTypes.js");
11
10
  var _latest = require("@instructure/ui-drilldown/latest");
12
11
  var _index = require("../TopNavBarItem/index.js");
@@ -42,7 +41,6 @@ const mapItemsForDrilldown = (itemList, options = {}) => {
42
41
  currentPageId,
43
42
  renderOptionContent
44
43
  } = options;
45
- const customPopoverIdMap = new Map();
46
44
  _react.Children.forEach(itemList, item => {
47
45
  if (!item || !(0, _matchComponentTypes.matchComponentTypes)(item, [_index.TopNavBarItem])) return;
48
46
  const {
@@ -86,7 +84,9 @@ const mapItemsForDrilldown = (itemList, options = {}) => {
86
84
 
87
85
  // if still has customPopover...
88
86
  if (customPopover) {
89
- customPopoverId = (0, _generateId.generateId)(`TopNavBarItem__customPopoverOption`, customPopoverIdMap);
87
+ // Derive a stable, unique id from the item's (required) id so it
88
+ // matches across server and client renders without a shared counter.
89
+ customPopoverId = `${id}__customPopoverOption`;
90
90
  optionSubPageId = customPopoverId;
91
91
  submenuPages.push((0, _jsxRuntime.jsx)(_latest.Drilldown.Page, {
92
92
  id: customPopoverId,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/ui-top-nav-bar",
3
- "version": "11.7.5",
3
+ "version": "11.7.6-snapshot-11",
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",
@@ -15,37 +15,37 @@
15
15
  "license": "MIT",
16
16
  "dependencies": {
17
17
  "@babel/runtime": "^7.29.7",
18
- "@instructure/console": "11.7.5",
19
- "@instructure/shared-types": "11.7.5",
20
- "@instructure/emotion": "11.7.5",
21
- "@instructure/ui-a11y-content": "11.7.5",
22
- "@instructure/ui-avatar": "11.7.5",
23
- "@instructure/ui-breadcrumb": "11.7.5",
24
- "@instructure/ui-buttons": "11.7.5",
25
- "@instructure/ui-dom-utils": "11.7.5",
26
- "@instructure/ui-dialog": "11.7.5",
27
- "@instructure/ui-drilldown": "11.7.5",
28
- "@instructure/ui-icons": "11.7.5",
29
- "@instructure/ui-link": "11.7.5",
30
- "@instructure/ui-popover": "11.7.5",
31
- "@instructure/ui-react-utils": "11.7.5",
32
- "@instructure/ui-themes": "11.7.5",
33
- "@instructure/ui-responsive": "11.7.5",
34
- "@instructure/ui-tray": "11.7.5",
35
- "@instructure/ui-truncate-list": "11.7.5",
36
- "@instructure/ui-tooltip": "11.7.5",
37
- "@instructure/ui-view": "11.7.5",
38
- "@instructure/ui-utils": "11.7.5"
18
+ "@instructure/console": "11.7.6-snapshot-11",
19
+ "@instructure/shared-types": "11.7.6-snapshot-11",
20
+ "@instructure/emotion": "11.7.6-snapshot-11",
21
+ "@instructure/ui-a11y-content": "11.7.6-snapshot-11",
22
+ "@instructure/ui-avatar": "11.7.6-snapshot-11",
23
+ "@instructure/ui-breadcrumb": "11.7.6-snapshot-11",
24
+ "@instructure/ui-dialog": "11.7.6-snapshot-11",
25
+ "@instructure/ui-dom-utils": "11.7.6-snapshot-11",
26
+ "@instructure/ui-drilldown": "11.7.6-snapshot-11",
27
+ "@instructure/ui-buttons": "11.7.6-snapshot-11",
28
+ "@instructure/ui-icons": "11.7.6-snapshot-11",
29
+ "@instructure/ui-link": "11.7.6-snapshot-11",
30
+ "@instructure/ui-popover": "11.7.6-snapshot-11",
31
+ "@instructure/ui-responsive": "11.7.6-snapshot-11",
32
+ "@instructure/ui-themes": "11.7.6-snapshot-11",
33
+ "@instructure/ui-react-utils": "11.7.6-snapshot-11",
34
+ "@instructure/ui-tooltip": "11.7.6-snapshot-11",
35
+ "@instructure/ui-tray": "11.7.6-snapshot-11",
36
+ "@instructure/ui-truncate-list": "11.7.6-snapshot-11",
37
+ "@instructure/ui-utils": "11.7.6-snapshot-11",
38
+ "@instructure/ui-view": "11.7.6-snapshot-11"
39
39
  },
40
40
  "devDependencies": {
41
41
  "@testing-library/jest-dom": "^6.9.1",
42
42
  "@testing-library/react": "16.3.2",
43
43
  "@testing-library/user-event": "^14.6.1",
44
44
  "vitest": "^4.1.9",
45
- "@instructure/ui-axe-check": "11.7.5",
46
- "@instructure/ui-babel-preset": "11.7.5",
47
- "@instructure/ui-scripts": "11.7.5",
48
- "@instructure/ui-color-utils": "11.7.5"
45
+ "@instructure/ui-axe-check": "11.7.6-snapshot-11",
46
+ "@instructure/ui-color-utils": "11.7.6-snapshot-11",
47
+ "@instructure/ui-babel-preset": "11.7.6-snapshot-11",
48
+ "@instructure/ui-scripts": "11.7.6-snapshot-11"
49
49
  },
50
50
  "peerDependencies": {
51
51
  "react": ">=18 <=19"
@@ -25,7 +25,6 @@
25
25
  import { Children } from 'react'
26
26
 
27
27
  import { warn } from '@instructure/console'
28
- import { generateId } from '@instructure/ui-utils'
29
28
  import { matchComponentTypes } from '@instructure/ui-react-utils'
30
29
 
31
30
  import { Drilldown } from '@instructure/ui-drilldown/v11_6'
@@ -59,8 +58,6 @@ const mapItemsForDrilldown = (
59
58
  const submenus: ItemMappedForDrilldownOption[] = []
60
59
  const { currentPageId, renderOptionContent } = options
61
60
 
62
- const customPopoverIdMap = new Map<string, number>()
63
-
64
61
  Children.forEach(itemList, (item) => {
65
62
  if (!item || !matchComponentTypes(item, [TopNavBarItem])) return
66
63
 
@@ -124,10 +121,9 @@ const mapItemsForDrilldown = (
124
121
 
125
122
  // if still has customPopover...
126
123
  if (customPopover) {
127
- customPopoverId = generateId(
128
- `TopNavBarItem__customPopoverOption`,
129
- customPopoverIdMap
130
- )
124
+ // Derive a stable, unique id from the item's (required) id so it
125
+ // matches across server and client renders without a shared counter.
126
+ customPopoverId = `${id}__customPopoverOption`
131
127
  optionSubPageId = customPopoverId
132
128
  submenuPages.push(
133
129
  <Drilldown.Page id={customPopoverId} key={customPopoverId}>
@@ -25,7 +25,6 @@
25
25
  import { Children } from 'react'
26
26
 
27
27
  import { warn } from '@instructure/console'
28
- import { generateId } from '@instructure/ui-utils'
29
28
  import { matchComponentTypes } from '@instructure/ui-react-utils'
30
29
 
31
30
  import { Drilldown } from '@instructure/ui-drilldown/latest'
@@ -59,8 +58,6 @@ const mapItemsForDrilldown = (
59
58
  const submenus: ItemMappedForDrilldownOption[] = []
60
59
  const { currentPageId, renderOptionContent } = options
61
60
 
62
- const customPopoverIdMap = new Map<string, number>()
63
-
64
61
  Children.forEach(itemList, (item) => {
65
62
  if (!item || !matchComponentTypes(item, [TopNavBarItem])) return
66
63
 
@@ -124,10 +121,9 @@ const mapItemsForDrilldown = (
124
121
 
125
122
  // if still has customPopover...
126
123
  if (customPopover) {
127
- customPopoverId = generateId(
128
- `TopNavBarItem__customPopoverOption`,
129
- customPopoverIdMap
130
- )
124
+ // Derive a stable, unique id from the item's (required) id so it
125
+ // matches across server and client renders without a shared counter.
126
+ customPopoverId = `${id}__customPopoverOption`
131
127
  optionSubPageId = customPopoverId
132
128
  submenuPages.push(
133
129
  <Drilldown.Page id={customPopoverId} key={customPopoverId}>