@instructure/ui-tooltip 11.7.8 → 11.7.9-snapshot-1
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 +8 -0
- package/lib/Tooltip/v1/index.js +7 -12
- package/lib/Tooltip/v2/index.js +7 -12
- package/package.json +11 -11
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
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.9-snapshot-1](https://github.com/instructure/instructure-ui/compare/v11.7.8...v11.7.9-snapshot-1) (2026-10-06)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @instructure/ui-tooltip
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
## [11.7.8](https://github.com/instructure/instructure-ui/compare/v11.7.7...v11.7.8) (2026-10-02)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @instructure/ui-tooltip
|
package/lib/Tooltip/v1/index.js
CHANGED
|
@@ -6,12 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.default = exports.Tooltip = void 0;
|
|
8
8
|
var _react = require("react");
|
|
9
|
-
var
|
|
10
|
-
var _omitProps = require("@instructure/ui-react-utils/lib/omitProps.js");
|
|
11
|
-
var _ensureSingleChild = require("@instructure/ui-react-utils/lib/ensureSingleChild.js");
|
|
12
|
-
var _passthroughProps = require("@instructure/ui-react-utils/lib/passthroughProps.js");
|
|
13
|
-
var _callRenderProp = require("@instructure/ui-react-utils/lib/callRenderProp.js");
|
|
14
|
-
var _withDeterministicId = require("@instructure/ui-react-utils/lib/DeterministicIdContext/withDeterministicId.js");
|
|
9
|
+
var _uiReactUtils = require("@instructure/ui-react-utils");
|
|
15
10
|
var _v11_ = require("@instructure/ui-popover/v11_6");
|
|
16
11
|
var _emotion = require("@instructure/emotion");
|
|
17
12
|
var _styles = _interopRequireDefault(require("./styles.js"));
|
|
@@ -47,7 +42,7 @@ var _dec, _dec2, _class;
|
|
|
47
42
|
category: components
|
|
48
43
|
---
|
|
49
44
|
**/
|
|
50
|
-
let Tooltip = exports.Tooltip = (_dec = (0,
|
|
45
|
+
let Tooltip = exports.Tooltip = (_dec = (0, _uiReactUtils.withDeterministicId)(), _dec2 = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec(_class = _dec2(_class = class Tooltip extends _react.Component {
|
|
51
46
|
static displayName = 'Tooltip';
|
|
52
47
|
static componentId = 'Tooltip';
|
|
53
48
|
static allowedProps = _props.allowedProps;
|
|
@@ -103,8 +98,8 @@ let Tooltip = exports.Tooltip = (_dec = (0, _withDeterministicId.withDeterminist
|
|
|
103
98
|
'aria-describedby': this._id
|
|
104
99
|
};
|
|
105
100
|
if (as) {
|
|
106
|
-
const Trigger = (0,
|
|
107
|
-
const props = (0,
|
|
101
|
+
const Trigger = (0, _uiReactUtils.getElementType)(Tooltip, this.props);
|
|
102
|
+
const props = (0, _uiReactUtils.omitProps)(this.props, Tooltip.allowedProps);
|
|
108
103
|
return (0, _jsxRuntime.jsx)(Trigger, {
|
|
109
104
|
...props,
|
|
110
105
|
...triggerProps,
|
|
@@ -119,7 +114,7 @@ let Tooltip = exports.Tooltip = (_dec = (0, _withDeterministicId.withDeterminist
|
|
|
119
114
|
})
|
|
120
115
|
});
|
|
121
116
|
} else {
|
|
122
|
-
return (0,
|
|
117
|
+
return (0, _uiReactUtils.ensureSingleChild)(children, triggerProps);
|
|
123
118
|
}
|
|
124
119
|
}
|
|
125
120
|
render() {
|
|
@@ -142,7 +137,7 @@ let Tooltip = exports.Tooltip = (_dec = (0, _withDeterministicId.withDeterminist
|
|
|
142
137
|
...rest
|
|
143
138
|
} = this.props;
|
|
144
139
|
return (0, _jsxRuntime.jsx)(_v11_.Popover, {
|
|
145
|
-
...(0,
|
|
140
|
+
...(0, _uiReactUtils.passthroughProps)(rest),
|
|
146
141
|
isShowingContent: !preventTooltip && isShowingContent,
|
|
147
142
|
defaultIsShowingContent: !preventTooltip && defaultIsShowingContent,
|
|
148
143
|
on: on,
|
|
@@ -170,7 +165,7 @@ let Tooltip = exports.Tooltip = (_dec = (0, _withDeterministicId.withDeterminist
|
|
|
170
165
|
id: this._id,
|
|
171
166
|
css: styles?.tooltip,
|
|
172
167
|
role: "tooltip",
|
|
173
|
-
children: (0,
|
|
168
|
+
children: (0, _uiReactUtils.callRenderProp)(renderTip)
|
|
174
169
|
}) : null
|
|
175
170
|
});
|
|
176
171
|
}
|
package/lib/Tooltip/v2/index.js
CHANGED
|
@@ -6,12 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.default = exports.Tooltip = void 0;
|
|
8
8
|
var _react = require("react");
|
|
9
|
-
var
|
|
10
|
-
var _omitProps = require("@instructure/ui-react-utils/lib/omitProps.js");
|
|
11
|
-
var _ensureSingleChild = require("@instructure/ui-react-utils/lib/ensureSingleChild.js");
|
|
12
|
-
var _passthroughProps = require("@instructure/ui-react-utils/lib/passthroughProps.js");
|
|
13
|
-
var _callRenderProp = require("@instructure/ui-react-utils/lib/callRenderProp.js");
|
|
14
|
-
var _withDeterministicId = require("@instructure/ui-react-utils/lib/DeterministicIdContext/withDeterministicId.js");
|
|
9
|
+
var _uiReactUtils = require("@instructure/ui-react-utils");
|
|
15
10
|
var _latest = require("@instructure/ui-popover/latest");
|
|
16
11
|
var _emotion = require("@instructure/emotion");
|
|
17
12
|
var _styles = _interopRequireDefault(require("./styles.js"));
|
|
@@ -46,7 +41,7 @@ var _dec, _dec2, _class;
|
|
|
46
41
|
category: components
|
|
47
42
|
---
|
|
48
43
|
**/
|
|
49
|
-
let Tooltip = exports.Tooltip = (_dec = (0,
|
|
44
|
+
let Tooltip = exports.Tooltip = (_dec = (0, _uiReactUtils.withDeterministicId)(), _dec2 = (0, _emotion.withStyleNew)(_styles.default), _dec(_class = _dec2(_class = class Tooltip extends _react.Component {
|
|
50
45
|
static displayName = 'Tooltip';
|
|
51
46
|
static componentId = 'Tooltip';
|
|
52
47
|
static allowedProps = _props.allowedProps;
|
|
@@ -102,8 +97,8 @@ let Tooltip = exports.Tooltip = (_dec = (0, _withDeterministicId.withDeterminist
|
|
|
102
97
|
'aria-describedby': this._id
|
|
103
98
|
};
|
|
104
99
|
if (as) {
|
|
105
|
-
const Trigger = (0,
|
|
106
|
-
const props = (0,
|
|
100
|
+
const Trigger = (0, _uiReactUtils.getElementType)(Tooltip, this.props);
|
|
101
|
+
const props = (0, _uiReactUtils.omitProps)(this.props, Tooltip.allowedProps);
|
|
107
102
|
return (0, _jsxRuntime.jsx)(Trigger, {
|
|
108
103
|
...props,
|
|
109
104
|
...triggerProps,
|
|
@@ -118,7 +113,7 @@ let Tooltip = exports.Tooltip = (_dec = (0, _withDeterministicId.withDeterminist
|
|
|
118
113
|
})
|
|
119
114
|
});
|
|
120
115
|
} else {
|
|
121
|
-
return (0,
|
|
116
|
+
return (0, _uiReactUtils.ensureSingleChild)(children, triggerProps);
|
|
122
117
|
}
|
|
123
118
|
}
|
|
124
119
|
render() {
|
|
@@ -141,7 +136,7 @@ let Tooltip = exports.Tooltip = (_dec = (0, _withDeterministicId.withDeterminist
|
|
|
141
136
|
...rest
|
|
142
137
|
} = this.props;
|
|
143
138
|
return (0, _jsxRuntime.jsx)(_latest.Popover, {
|
|
144
|
-
...(0,
|
|
139
|
+
...(0, _uiReactUtils.passthroughProps)(rest),
|
|
145
140
|
isShowingContent: !preventTooltip && isShowingContent,
|
|
146
141
|
defaultIsShowingContent: !preventTooltip && defaultIsShowingContent,
|
|
147
142
|
on: on,
|
|
@@ -169,7 +164,7 @@ let Tooltip = exports.Tooltip = (_dec = (0, _withDeterministicId.withDeterminist
|
|
|
169
164
|
id: this._id,
|
|
170
165
|
css: styles?.tooltip,
|
|
171
166
|
role: "tooltip",
|
|
172
|
-
children: (0,
|
|
167
|
+
children: (0, _uiReactUtils.callRenderProp)(renderTip)
|
|
173
168
|
}) : null
|
|
174
169
|
});
|
|
175
170
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-tooltip",
|
|
3
|
-
"version": "11.7.
|
|
3
|
+
"version": "11.7.9-snapshot-1",
|
|
4
4
|
"description": "A component for showing small text-only overlays on hover/focus.",
|
|
5
5
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
6
6
|
"module": "./es/index.js",
|
|
@@ -15,19 +15,19 @@
|
|
|
15
15
|
"license": "MIT",
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@babel/runtime": "^7.29.7",
|
|
18
|
-
"@instructure/emotion": "11.7.
|
|
19
|
-
"@instructure/
|
|
20
|
-
"@instructure/
|
|
21
|
-
"@instructure/ui-
|
|
22
|
-
"@instructure/ui-
|
|
23
|
-
"@instructure/ui-themes": "11.7.
|
|
24
|
-
"@instructure/ui-utils": "11.7.
|
|
18
|
+
"@instructure/emotion": "11.7.9-snapshot-1",
|
|
19
|
+
"@instructure/shared-types": "11.7.9-snapshot-1",
|
|
20
|
+
"@instructure/ui-position": "11.7.9-snapshot-1",
|
|
21
|
+
"@instructure/ui-react-utils": "11.7.9-snapshot-1",
|
|
22
|
+
"@instructure/ui-popover": "11.7.9-snapshot-1",
|
|
23
|
+
"@instructure/ui-themes": "11.7.9-snapshot-1",
|
|
24
|
+
"@instructure/ui-utils": "11.7.9-snapshot-1"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"vitest": "^5.0.0",
|
|
28
|
-
"@instructure/ui-
|
|
29
|
-
"@instructure/ui-color-utils": "11.7.
|
|
30
|
-
"@instructure/ui-
|
|
28
|
+
"@instructure/ui-babel-preset": "11.7.9-snapshot-1",
|
|
29
|
+
"@instructure/ui-color-utils": "11.7.9-snapshot-1",
|
|
30
|
+
"@instructure/ui-scripts": "11.7.9-snapshot-1"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
33
|
"react": ">=18 <=19"
|