@instructure/ui-navigation 8.26.2 → 8.26.4-snapshot-3

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,6 +3,21 @@
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.26.4-snapshot-3](https://github.com/instructure/instructure-ui/compare/v8.26.3...v8.26.4-snapshot-3) (2022-07-18)
7
+
8
+
9
+ ### Features
10
+
11
+ * support React 18 ([0a2bf0c](https://github.com/instructure/instructure-ui/commit/0a2bf0cdd4d8bcec6e42a7ccf28a787e4a35bc40))
12
+
13
+
14
+
15
+
16
+
17
+ ## [8.26.3](https://github.com/instructure/instructure-ui/compare/v8.26.2...v8.26.3) (2022-07-14)
18
+
19
+ **Note:** Version bump only for package @instructure/ui-navigation
20
+
6
21
  ## [8.26.2](https://github.com/instructure/instructure-ui/compare/v8.26.1...v8.26.2) (2022-07-11)
7
22
 
8
23
  **Note:** Version bump only for package @instructure/ui-navigation
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/ui-navigation",
3
- "version": "8.26.2",
3
+ "version": "8.26.4-snapshot-3",
4
4
  "description": "Main and application level navigational components",
5
5
  "author": "Instructure, Inc. Engineering and Product Design",
6
6
  "module": "./es/index.js",
@@ -23,35 +23,35 @@
23
23
  },
24
24
  "license": "MIT",
25
25
  "devDependencies": {
26
- "@instructure/ui-babel-preset": "8.26.2",
27
- "@instructure/ui-color-utils": "8.26.2",
28
- "@instructure/ui-test-locator": "8.26.2",
29
- "@instructure/ui-test-utils": "8.26.2",
30
- "@instructure/ui-themes": "8.26.2"
26
+ "@instructure/ui-babel-preset": "8.26.4-snapshot-3",
27
+ "@instructure/ui-color-utils": "8.26.4-snapshot-3",
28
+ "@instructure/ui-test-locator": "8.26.4-snapshot-3",
29
+ "@instructure/ui-test-utils": "8.26.4-snapshot-3",
30
+ "@instructure/ui-themes": "8.26.4-snapshot-3"
31
31
  },
32
32
  "dependencies": {
33
33
  "@babel/runtime": "^7.13.10",
34
- "@instructure/console": "8.26.2",
35
- "@instructure/debounce": "8.26.2",
36
- "@instructure/emotion": "8.26.2",
37
- "@instructure/shared-types": "8.26.2",
38
- "@instructure/ui-a11y-content": "8.26.2",
39
- "@instructure/ui-a11y-utils": "8.26.2",
40
- "@instructure/ui-badge": "8.26.2",
41
- "@instructure/ui-dom-utils": "8.26.2",
42
- "@instructure/ui-focusable": "8.26.2",
43
- "@instructure/ui-icons": "8.26.2",
44
- "@instructure/ui-menu": "8.26.2",
45
- "@instructure/ui-prop-types": "8.26.2",
46
- "@instructure/ui-react-utils": "8.26.2",
47
- "@instructure/ui-testable": "8.26.2",
48
- "@instructure/ui-tooltip": "8.26.2",
49
- "@instructure/ui-utils": "8.26.2",
50
- "@instructure/ui-view": "8.26.2",
34
+ "@instructure/console": "8.26.4-snapshot-3",
35
+ "@instructure/debounce": "8.26.4-snapshot-3",
36
+ "@instructure/emotion": "8.26.4-snapshot-3",
37
+ "@instructure/shared-types": "8.26.4-snapshot-3",
38
+ "@instructure/ui-a11y-content": "8.26.4-snapshot-3",
39
+ "@instructure/ui-a11y-utils": "8.26.4-snapshot-3",
40
+ "@instructure/ui-badge": "8.26.4-snapshot-3",
41
+ "@instructure/ui-dom-utils": "8.26.4-snapshot-3",
42
+ "@instructure/ui-focusable": "8.26.4-snapshot-3",
43
+ "@instructure/ui-icons": "8.26.4-snapshot-3",
44
+ "@instructure/ui-menu": "8.26.4-snapshot-3",
45
+ "@instructure/ui-prop-types": "8.26.4-snapshot-3",
46
+ "@instructure/ui-react-utils": "8.26.4-snapshot-3",
47
+ "@instructure/ui-testable": "8.26.4-snapshot-3",
48
+ "@instructure/ui-tooltip": "8.26.4-snapshot-3",
49
+ "@instructure/ui-utils": "8.26.4-snapshot-3",
50
+ "@instructure/ui-view": "8.26.4-snapshot-3",
51
51
  "prop-types": "^15"
52
52
  },
53
53
  "peerDependencies": {
54
- "react": ">=16.8 <=17"
54
+ "react": ">=16.8 <=18"
55
55
  },
56
56
  "publishConfig": {
57
57
  "access": "public"
@@ -35,6 +35,7 @@ import {
35
35
  import { testable } from '@instructure/ui-testable'
36
36
 
37
37
  import { View } from '@instructure/ui-view'
38
+ import type { ViewOwnProps } from '@instructure/ui-view'
38
39
  import { ScreenReaderContent } from '@instructure/ui-a11y-content'
39
40
  import type { ScreenReaderContentProps } from '@instructure/ui-a11y-content'
40
41
 
@@ -88,7 +89,7 @@ class Item extends Component<AppNavItemProps> {
88
89
  }
89
90
  }
90
91
 
91
- handleClick = (e: React.MouseEvent<Element>) => {
92
+ handleClick = (e: React.MouseEvent<ViewOwnProps, MouseEvent>) => {
92
93
  const { isDisabled, onClick } = this.props
93
94
 
94
95
  if (isDisabled) {
@@ -32,21 +32,23 @@ import type {
32
32
  import type { WithStyleProps, ComponentStyle } from '@instructure/emotion'
33
33
  import type { Cursor } from '@instructure/ui-prop-types'
34
34
  import React from 'react'
35
+ import type { ViewOwnProps } from '@instructure/ui-view'
36
+ import { Renderable } from '@instructure/shared-types'
35
37
 
36
38
  type AppNavItemOwnProps = {
37
39
  /**
38
40
  * The text to display. If the `icon` prop is used, label text must be wrapped
39
41
  * in `ScreenReaderContent`.
40
42
  */
41
- renderLabel: React.ReactNode | (() => React.ReactNode)
43
+ renderLabel: Renderable
42
44
  /**
43
45
  * Content to display after the renderLabel text, such as a badge
44
46
  */
45
- renderAfter?: React.ReactNode | (() => React.ReactNode)
47
+ renderAfter?: Renderable
46
48
  /**
47
49
  * The visual to display (ex. an Image, Logo, Avatar, or Icon)
48
50
  */
49
- renderIcon?: React.ReactNode | (() => React.ReactNode)
51
+ renderIcon?: Renderable
50
52
  /**
51
53
  * If the item goes to a new page, pass an href
52
54
  */
@@ -54,7 +56,7 @@ type AppNavItemOwnProps = {
54
56
  /**
55
57
  * If the item does not go to a new page, pass an onClick
56
58
  */
57
- onClick?: (event: React.MouseEvent<Element>) => void
59
+ onClick?: (event: React.MouseEvent<ViewOwnProps>) => void
58
60
  /**
59
61
  * Denotes which item is currently selected
60
62
  */
@@ -39,6 +39,7 @@ import type {
39
39
  AppNavTheme,
40
40
  OtherHTMLAttributes
41
41
  } from '@instructure/shared-types'
42
+ import { Renderable } from '@instructure/shared-types'
42
43
 
43
44
  type AppNavOwnProps = {
44
45
  /**
@@ -53,12 +54,12 @@ type AppNavOwnProps = {
53
54
  /**
54
55
  * Content to display before the navigation items, such as a logo
55
56
  */
56
- renderBeforeItems?: React.ReactNode | (() => React.ReactNode)
57
+ renderBeforeItems?: Renderable
57
58
  /**
58
59
  * Content to display after the navigation items, aligned to the far end
59
60
  * of the navigation
60
61
  */
61
- renderAfterItems?: React.ReactNode | (() => React.ReactNode)
62
+ renderAfterItems?: Renderable
62
63
  /**
63
64
  * Valid values are `0`, `none`, `auto`, `xxx-small`, `xx-small`, `x-small`,
64
65
  * `small`, `medium`, `large`, `x-large`, `xx-large`. Apply these values via
@@ -73,7 +74,7 @@ type AppNavOwnProps = {
73
74
  * Customize the text displayed in the menu trigger when links overflow
74
75
  * the overall nav width.
75
76
  */
76
- renderTruncateLabel?: React.ReactNode | (() => React.ReactNode)
77
+ renderTruncateLabel?: Renderable
77
78
  /**
78
79
  * Called whenever the navigation items are updated or the size of
79
80
  * the navigation changes. Passes in the `visibleItemsCount` as