@instructure/ui-top-nav-bar 9.2.1-snapshot-15 → 9.2.1-snapshot-16
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 +5 -2
- package/es/TopNavBar/TopNavBarLayout/SmallViewportLayout/index.js +1 -1
- package/es/TopNavBar/TopNavBarLayout/props.js +2 -1
- package/lib/TopNavBar/TopNavBarLayout/SmallViewportLayout/index.js +1 -1
- package/lib/TopNavBar/TopNavBarLayout/props.js +2 -1
- package/package.json +30 -30
- package/src/TopNavBar/TopNavBarLayout/SmallViewportLayout/index.tsx +2 -0
- package/src/TopNavBar/TopNavBarLayout/SmallViewportLayout/props.ts +5 -0
- package/src/TopNavBar/TopNavBarLayout/props.ts +2 -1
- package/tsconfig.build.tsbuildinfo +1 -1
- package/types/TopNavBar/TopNavBarLayout/SmallViewportLayout/index.d.ts.map +1 -1
- package/types/TopNavBar/TopNavBarLayout/SmallViewportLayout/props.d.ts +4 -0
- package/types/TopNavBar/TopNavBarLayout/SmallViewportLayout/props.d.ts.map +1 -1
- package/types/TopNavBar/TopNavBarLayout/props.d.ts.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,9 +3,12 @@
|
|
|
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
|
-
## [9.2.1-snapshot-
|
|
6
|
+
## [9.2.1-snapshot-16](https://github.com/instructure/instructure-ui/compare/v9.2.0...v9.2.1-snapshot-16) (2024-07-16)
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* **ui-top-nav-bar:** add workaround hack for new topnav design with the old api ([e5b34c0](https://github.com/instructure/instructure-ui/commit/e5b34c0298cc6b45c82f5d2ee3b5ce4c9ff07c28))
|
|
9
12
|
|
|
10
13
|
|
|
11
14
|
|
|
@@ -396,7 +396,7 @@ let TopNavBarSmallViewportLayout = (_dec = withDeterministicId(), _dec2 = withSt
|
|
|
396
396
|
css: styles === null || styles === void 0 ? void 0 : styles.navbar
|
|
397
397
|
}, renderBreadcrumb), !this.hasBreadcrumbBlock && !this.isInPlaceDialogOpen && jsx("div", {
|
|
398
398
|
css: styles === null || styles === void 0 ? void 0 : styles.navbar
|
|
399
|
-
}, this.renderMenuTrigger(), this.hasActionItemsBlock(renderActionItems) && renderActionItems), !this.hasBreadcrumbBlock && this.renderInPlaceDialog(), !this.hasBreadcrumbBlock && !trayMountNode && jsx("div", {
|
|
399
|
+
}, this.props.renderNavbarStartDangerousHack && this.props.renderNavbarStartDangerousHack, this.renderMenuTrigger(), this.hasActionItemsBlock(renderActionItems) && renderActionItems), !this.hasBreadcrumbBlock && this.renderInPlaceDialog(), !this.hasBreadcrumbBlock && !trayMountNode && jsx("div", {
|
|
400
400
|
css: styles === null || styles === void 0 ? void 0 : styles.trayContainer,
|
|
401
401
|
id: this._trayContainerId
|
|
402
402
|
}), !this.hasBreadcrumbBlock && this.renderDropdownMenuTray());
|
|
@@ -59,7 +59,8 @@ const smallViewportPropTypes = {
|
|
|
59
59
|
}),
|
|
60
60
|
trayMountNode: PropTypes.oneOfType([element, PropTypes.func]),
|
|
61
61
|
onDropdownMenuToggle: PropTypes.func,
|
|
62
|
-
onDropdownMenuSelect: PropTypes.func
|
|
62
|
+
onDropdownMenuSelect: PropTypes.func,
|
|
63
|
+
renderNavbarStartDangerousHack: PropTypes.node
|
|
63
64
|
};
|
|
64
65
|
const propTypes = {
|
|
65
66
|
...commonPropTypes,
|
|
@@ -409,7 +409,7 @@ let TopNavBarSmallViewportLayout = exports.TopNavBarSmallViewportLayout = (_dec
|
|
|
409
409
|
css: styles === null || styles === void 0 ? void 0 : styles.navbar
|
|
410
410
|
}, renderBreadcrumb), !this.hasBreadcrumbBlock && !this.isInPlaceDialogOpen && (0, _emotion.jsx)("div", {
|
|
411
411
|
css: styles === null || styles === void 0 ? void 0 : styles.navbar
|
|
412
|
-
}, this.renderMenuTrigger(), this.hasActionItemsBlock(renderActionItems) && renderActionItems), !this.hasBreadcrumbBlock && this.renderInPlaceDialog(), !this.hasBreadcrumbBlock && !trayMountNode && (0, _emotion.jsx)("div", {
|
|
412
|
+
}, this.props.renderNavbarStartDangerousHack && this.props.renderNavbarStartDangerousHack, this.renderMenuTrigger(), this.hasActionItemsBlock(renderActionItems) && renderActionItems), !this.hasBreadcrumbBlock && this.renderInPlaceDialog(), !this.hasBreadcrumbBlock && !trayMountNode && (0, _emotion.jsx)("div", {
|
|
413
413
|
css: styles === null || styles === void 0 ? void 0 : styles.trayContainer,
|
|
414
414
|
id: this._trayContainerId
|
|
415
415
|
}), !this.hasBreadcrumbBlock && this.renderDropdownMenuTray());
|
|
@@ -67,7 +67,8 @@ const smallViewportPropTypes = exports.smallViewportPropTypes = {
|
|
|
67
67
|
}),
|
|
68
68
|
trayMountNode: _propTypes.default.oneOfType([_element.element, _propTypes.default.func]),
|
|
69
69
|
onDropdownMenuToggle: _propTypes.default.func,
|
|
70
|
-
onDropdownMenuSelect: _propTypes.default.func
|
|
70
|
+
onDropdownMenuSelect: _propTypes.default.func,
|
|
71
|
+
renderNavbarStartDangerousHack: _propTypes.default.node
|
|
71
72
|
};
|
|
72
73
|
const propTypes = exports.propTypes = {
|
|
73
74
|
...commonPropTypes,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-top-nav-bar",
|
|
3
|
-
"version": "9.2.1-snapshot-
|
|
3
|
+
"version": "9.2.1-snapshot-16",
|
|
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,38 +24,38 @@
|
|
|
24
24
|
"license": "MIT",
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@babel/runtime": "^7.24.5",
|
|
27
|
-
"@instructure/console": "9.2.1-snapshot-
|
|
28
|
-
"@instructure/emotion": "9.2.1-snapshot-
|
|
29
|
-
"@instructure/shared-types": "9.2.1-snapshot-
|
|
30
|
-
"@instructure/ui-a11y-content": "9.2.1-snapshot-
|
|
31
|
-
"@instructure/ui-avatar": "9.2.1-snapshot-
|
|
32
|
-
"@instructure/ui-breadcrumb": "9.2.1-snapshot-
|
|
33
|
-
"@instructure/ui-buttons": "9.2.1-snapshot-
|
|
34
|
-
"@instructure/ui-dialog": "9.2.1-snapshot-
|
|
35
|
-
"@instructure/ui-dom-utils": "9.2.1-snapshot-
|
|
36
|
-
"@instructure/ui-drilldown": "9.2.1-snapshot-
|
|
37
|
-
"@instructure/ui-icons": "9.2.1-snapshot-
|
|
38
|
-
"@instructure/ui-link": "9.2.1-snapshot-
|
|
39
|
-
"@instructure/ui-popover": "9.2.1-snapshot-
|
|
40
|
-
"@instructure/ui-prop-types": "9.2.1-snapshot-
|
|
41
|
-
"@instructure/ui-react-utils": "9.2.1-snapshot-
|
|
42
|
-
"@instructure/ui-responsive": "9.2.1-snapshot-
|
|
43
|
-
"@instructure/ui-testable": "9.2.1-snapshot-
|
|
44
|
-
"@instructure/ui-tooltip": "9.2.1-snapshot-
|
|
45
|
-
"@instructure/ui-tray": "9.2.1-snapshot-
|
|
46
|
-
"@instructure/ui-truncate-list": "9.2.1-snapshot-
|
|
47
|
-
"@instructure/ui-utils": "9.2.1-snapshot-
|
|
48
|
-
"@instructure/ui-view": "9.2.1-snapshot-
|
|
27
|
+
"@instructure/console": "9.2.1-snapshot-16",
|
|
28
|
+
"@instructure/emotion": "9.2.1-snapshot-16",
|
|
29
|
+
"@instructure/shared-types": "9.2.1-snapshot-16",
|
|
30
|
+
"@instructure/ui-a11y-content": "9.2.1-snapshot-16",
|
|
31
|
+
"@instructure/ui-avatar": "9.2.1-snapshot-16",
|
|
32
|
+
"@instructure/ui-breadcrumb": "9.2.1-snapshot-16",
|
|
33
|
+
"@instructure/ui-buttons": "9.2.1-snapshot-16",
|
|
34
|
+
"@instructure/ui-dialog": "9.2.1-snapshot-16",
|
|
35
|
+
"@instructure/ui-dom-utils": "9.2.1-snapshot-16",
|
|
36
|
+
"@instructure/ui-drilldown": "9.2.1-snapshot-16",
|
|
37
|
+
"@instructure/ui-icons": "9.2.1-snapshot-16",
|
|
38
|
+
"@instructure/ui-link": "9.2.1-snapshot-16",
|
|
39
|
+
"@instructure/ui-popover": "9.2.1-snapshot-16",
|
|
40
|
+
"@instructure/ui-prop-types": "9.2.1-snapshot-16",
|
|
41
|
+
"@instructure/ui-react-utils": "9.2.1-snapshot-16",
|
|
42
|
+
"@instructure/ui-responsive": "9.2.1-snapshot-16",
|
|
43
|
+
"@instructure/ui-testable": "9.2.1-snapshot-16",
|
|
44
|
+
"@instructure/ui-tooltip": "9.2.1-snapshot-16",
|
|
45
|
+
"@instructure/ui-tray": "9.2.1-snapshot-16",
|
|
46
|
+
"@instructure/ui-truncate-list": "9.2.1-snapshot-16",
|
|
47
|
+
"@instructure/ui-utils": "9.2.1-snapshot-16",
|
|
48
|
+
"@instructure/ui-view": "9.2.1-snapshot-16",
|
|
49
49
|
"prop-types": "^15.8.1"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
|
-
"@instructure/ui-axe-check": "9.2.1-snapshot-
|
|
53
|
-
"@instructure/ui-babel-preset": "9.2.1-snapshot-
|
|
54
|
-
"@instructure/ui-color-utils": "9.2.1-snapshot-
|
|
55
|
-
"@instructure/ui-scripts": "9.2.1-snapshot-
|
|
56
|
-
"@instructure/ui-test-locator": "9.2.1-snapshot-
|
|
57
|
-
"@instructure/ui-test-utils": "9.2.1-snapshot-
|
|
58
|
-
"@instructure/ui-themes": "9.2.1-snapshot-
|
|
52
|
+
"@instructure/ui-axe-check": "9.2.1-snapshot-16",
|
|
53
|
+
"@instructure/ui-babel-preset": "9.2.1-snapshot-16",
|
|
54
|
+
"@instructure/ui-color-utils": "9.2.1-snapshot-16",
|
|
55
|
+
"@instructure/ui-scripts": "9.2.1-snapshot-16",
|
|
56
|
+
"@instructure/ui-test-locator": "9.2.1-snapshot-16",
|
|
57
|
+
"@instructure/ui-test-utils": "9.2.1-snapshot-16",
|
|
58
|
+
"@instructure/ui-themes": "9.2.1-snapshot-16",
|
|
59
59
|
"@testing-library/jest-dom": "^6.4.6",
|
|
60
60
|
"@testing-library/react": "^15.0.7",
|
|
61
61
|
"@testing-library/user-event": "^14.5.2",
|
|
@@ -601,6 +601,8 @@ class TopNavBarSmallViewportLayout extends Component<
|
|
|
601
601
|
|
|
602
602
|
{!this.hasBreadcrumbBlock && !this.isInPlaceDialogOpen && (
|
|
603
603
|
<div css={styles?.navbar}>
|
|
604
|
+
{this.props.renderNavbarStartDangerousHack &&
|
|
605
|
+
this.props.renderNavbarStartDangerousHack}
|
|
604
606
|
{this.renderMenuTrigger()}
|
|
605
607
|
{this.hasActionItemsBlock(renderActionItems) && renderActionItems}
|
|
606
608
|
</div>
|
|
@@ -113,6 +113,11 @@ type SmallViewportLayoutOwnProps = {
|
|
|
113
113
|
* Callback fired when an item is selected in the dropdown menu
|
|
114
114
|
*/
|
|
115
115
|
onDropdownMenuSelect?: DrilldownProps['onSelect']
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* A way to add generic html/react content to the start (left side) of the nav bar. This is a temporary workaround if you are using a design that is not possible to achive in the TopNavBar normally.
|
|
119
|
+
*/
|
|
120
|
+
renderNavbarStartDangerousHack?: React.ReactNode
|
|
116
121
|
}
|
|
117
122
|
|
|
118
123
|
type TopNavBarSmallViewportLayoutOwnProps = CommonTopNavBarLayoutProps &
|
|
@@ -167,7 +167,8 @@ const smallViewportPropTypes: PropValidators<SmallViewportPropKeys> = {
|
|
|
167
167
|
}),
|
|
168
168
|
trayMountNode: PropTypes.oneOfType([element, PropTypes.func]),
|
|
169
169
|
onDropdownMenuToggle: PropTypes.func,
|
|
170
|
-
onDropdownMenuSelect: PropTypes.func
|
|
170
|
+
onDropdownMenuSelect: PropTypes.func,
|
|
171
|
+
renderNavbarStartDangerousHack: PropTypes.node
|
|
171
172
|
}
|
|
172
173
|
|
|
173
174
|
const propTypes: PropValidators<PropKeys> = {
|