@instructure/ui-tooltip 11.6.0 → 11.6.1-pr-snapshot-1779894247159

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,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.6.1-pr-snapshot-1779894247159](https://github.com/instructure/instructure-ui/compare/v11.6.0...v11.6.1-pr-snapshot-1779894247159) (2026-05-27)
7
+
8
+ **Note:** Version bump only for package @instructure/ui-tooltip
9
+
10
+
11
+
12
+
13
+
6
14
  # [11.6.0](https://github.com/instructure/instructure-ui/compare/v11.5.0...v11.6.0) (2026-02-18)
7
15
 
8
16
  **Note:** Version bump only for package @instructure/ui-tooltip
@@ -1,9 +1,3 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.allowedProps = void 0;
7
1
  /*
8
2
  * The MIT License (MIT)
9
3
  *
@@ -28,6 +22,16 @@ exports.allowedProps = void 0;
28
22
  * SOFTWARE.
29
23
  */
30
24
 
31
- // passes through props for Popover, except the ones set manually
32
-
33
- const allowedProps = exports.allowedProps = ['elementRef', 'children', 'renderTip', 'isShowingContent', 'defaultIsShowingContent', 'as', 'on', 'color', 'placement', 'mountNode', 'constrain', 'offsetX', 'offsetY', 'positionTarget', 'onShowContent', 'onHideContent', 'preventTooltip'];
25
+ module.exports = {
26
+ presets: [
27
+ [
28
+ require('@instructure/ui-babel-preset'),
29
+ {
30
+ coverage: Boolean(process.env.COVERAGE),
31
+ esModules: Boolean(process.env.ES_MODULES),
32
+ removeConsole: process.env.NODE_ENV === 'production',
33
+ transformImports: Boolean(process.env.TRANSFORM_IMPORTS)
34
+ }
35
+ ]
36
+ ]
37
+ }
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@instructure/ui-tooltip",
3
- "version": "11.6.0",
3
+ "version": "11.6.1-pr-snapshot-1779894247159",
4
+ "type": "module",
4
5
  "description": "A component for showing small text-only overlays on hover/focus.",
5
6
  "author": "Instructure, Inc. Engineering and Product Design",
6
7
  "module": "./es/index.js",
7
- "main": "./lib/index.js",
8
8
  "types": "./types/index.d.ts",
9
9
  "repository": {
10
10
  "type": "git",
@@ -15,22 +15,22 @@
15
15
  "license": "MIT",
16
16
  "dependencies": {
17
17
  "@babel/runtime": "^7.27.6",
18
- "@instructure/emotion": "11.6.0",
19
- "@instructure/shared-types": "11.6.0",
20
- "@instructure/ui-popover": "11.6.0",
21
- "@instructure/ui-position": "11.6.0",
22
- "@instructure/ui-react-utils": "11.6.0",
23
- "@instructure/ui-utils": "11.6.0"
18
+ "@instructure/emotion": "11.6.1-pr-snapshot-1779894247159",
19
+ "@instructure/shared-types": "11.6.1-pr-snapshot-1779894247159",
20
+ "@instructure/ui-position": "11.6.1-pr-snapshot-1779894247159",
21
+ "@instructure/ui-popover": "11.6.1-pr-snapshot-1779894247159",
22
+ "@instructure/ui-react-utils": "11.6.1-pr-snapshot-1779894247159",
23
+ "@instructure/ui-utils": "11.6.1-pr-snapshot-1779894247159"
24
24
  },
25
25
  "devDependencies": {
26
26
  "@testing-library/jest-dom": "^6.6.3",
27
27
  "@testing-library/react": "15.0.7",
28
28
  "@testing-library/user-event": "^14.6.1",
29
29
  "vitest": "^3.2.2",
30
- "@instructure/ui-babel-preset": "11.6.0",
31
- "@instructure/ui-themes": "11.6.0",
32
- "@instructure/ui-color-utils": "11.6.0",
33
- "@instructure/ui-scripts": "11.6.0"
30
+ "@instructure/ui-babel-preset": "11.6.1-pr-snapshot-1779894247159",
31
+ "@instructure/ui-color-utils": "11.6.1-pr-snapshot-1779894247159",
32
+ "@instructure/ui-themes": "11.6.1-pr-snapshot-1779894247159",
33
+ "@instructure/ui-scripts": "11.6.1-pr-snapshot-1779894247159"
34
34
  },
35
35
  "peerDependencies": {
36
36
  "react": ">=18 <=19"
@@ -43,10 +43,8 @@
43
43
  ".": {
44
44
  "types": "./types/index.d.ts",
45
45
  "import": "./es/index.js",
46
- "require": "./lib/index.js",
47
46
  "default": "./es/index.js"
48
47
  },
49
- "./lib/*": "./lib/*",
50
48
  "./es/*": "./es/*",
51
49
  "./types/*": "./types/*",
52
50
  "./package.json": "./package.json",
@@ -56,7 +54,7 @@
56
54
  "lint": "ui-scripts lint",
57
55
  "lint:fix": "ui-scripts lint --fix",
58
56
  "clean": "ui-scripts clean",
59
- "build": "ui-scripts build --modules es,cjs",
57
+ "build": "ui-scripts build",
60
58
  "build:watch": "pnpm run ts:check -- --watch & ui-scripts build --watch",
61
59
  "build:types": "tsc -p tsconfig.build.json",
62
60
  "ts:check": "tsc -p tsconfig.build.json --noEmit --emitDeclarationOnly false"
@@ -1,174 +0,0 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.default = exports.Tooltip = void 0;
8
- var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
9
- var _react = require("react");
10
- var _getElementType = require("@instructure/ui-react-utils/lib/getElementType.js");
11
- var _omitProps = require("@instructure/ui-react-utils/lib/omitProps.js");
12
- var _ensureSingleChild = require("@instructure/ui-react-utils/lib/ensureSingleChild.js");
13
- var _passthroughProps = require("@instructure/ui-react-utils/lib/passthroughProps.js");
14
- var _callRenderProp = require("@instructure/ui-react-utils/lib/callRenderProp.js");
15
- var _withDeterministicId = require("@instructure/ui-react-utils/lib/DeterministicIdContext/withDeterministicId.js");
16
- var _Popover = require("@instructure/ui-popover/lib/Popover");
17
- var _emotion = require("@instructure/emotion");
18
- var _styles = _interopRequireDefault(require("./styles"));
19
- var _theme = _interopRequireDefault(require("./theme"));
20
- var _props = require("./props");
21
- var _jsxRuntime = require("@emotion/react/jsx-runtime");
22
- const _excluded = ["renderTip", "isShowingContent", "defaultIsShowingContent", "on", "color", "placement", "mountNode", "constrain", "offsetX", "offsetY", "positionTarget", "onShowContent", "onHideContent", "preventTooltip", "styles"];
23
- var _dec, _dec2, _class, _Tooltip;
24
- /*
25
- * The MIT License (MIT)
26
- *
27
- * Copyright (c) 2015 - present Instructure, Inc.
28
- *
29
- * Permission is hereby granted, free of charge, to any person obtaining a copy
30
- * of this software and associated documentation files (the "Software"), to deal
31
- * in the Software without restriction, including without limitation the rights
32
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
33
- * copies of the Software, and to permit persons to whom the Software is
34
- * furnished to do so, subject to the following conditions:
35
- *
36
- * The above copyright notice and this permission notice shall be included in all
37
- * copies or substantial portions of the Software.
38
- *
39
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
40
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
41
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
42
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
43
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
44
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
45
- * SOFTWARE.
46
- */
47
- /**
48
- ---
49
- category: components
50
- ---
51
- **/
52
- let Tooltip = exports.Tooltip = (_dec = (0, _withDeterministicId.withDeterministicId)(), _dec2 = (0, _emotion.withStyle)(_styles.default, _theme.default), _dec(_class = _dec2(_class = (_Tooltip = class Tooltip extends _react.Component {
53
- constructor(props) {
54
- super(props);
55
- this._id = void 0;
56
- this.ref = null;
57
- this.handleRef = el => {
58
- this.ref = el;
59
- if (typeof this.props.elementRef === 'function') {
60
- this.props.elementRef(el);
61
- }
62
- };
63
- this.handleFocus = () => {
64
- this.setState({
65
- hasFocus: true
66
- });
67
- };
68
- this.handleBlur = () => {
69
- this.setState({
70
- hasFocus: false
71
- });
72
- };
73
- this._id = props.deterministicId();
74
- this.state = {
75
- hasFocus: false
76
- };
77
- }
78
- componentDidMount() {
79
- var _this$props$makeStyle, _this$props;
80
- (_this$props$makeStyle = (_this$props = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props);
81
- }
82
- componentDidUpdate() {
83
- var _this$props$makeStyle2, _this$props2;
84
- (_this$props$makeStyle2 = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props2);
85
- }
86
- renderTrigger() {
87
- const _ref = this.props,
88
- children = _ref.children,
89
- as = _ref.as;
90
- const hasFocus = this.state.hasFocus;
91
- const triggerProps = {
92
- 'aria-describedby': this._id
93
- };
94
- if (as) {
95
- const Trigger = (0, _getElementType.getElementType)(Tooltip, this.props);
96
- const props = (0, _omitProps.omitProps)(this.props, Tooltip.allowedProps);
97
- return (0, _jsxRuntime.jsx)(Trigger, {
98
- ...props,
99
- ...triggerProps,
100
- children: children /*TODO check if it can be TooltipRenderChildren, this might cause a crash*/
101
- });
102
- } else if (typeof children === 'function') {
103
- return children({
104
- focused: hasFocus,
105
- getTriggerProps: props => ({
106
- ...triggerProps,
107
- ...props
108
- })
109
- });
110
- } else {
111
- return (0, _ensureSingleChild.ensureSingleChild)(children, triggerProps);
112
- }
113
- }
114
- render() {
115
- const _this$props3 = this.props,
116
- renderTip = _this$props3.renderTip,
117
- isShowingContent = _this$props3.isShowingContent,
118
- defaultIsShowingContent = _this$props3.defaultIsShowingContent,
119
- on = _this$props3.on,
120
- color = _this$props3.color,
121
- placement = _this$props3.placement,
122
- mountNode = _this$props3.mountNode,
123
- constrain = _this$props3.constrain,
124
- offsetX = _this$props3.offsetX,
125
- offsetY = _this$props3.offsetY,
126
- positionTarget = _this$props3.positionTarget,
127
- onShowContent = _this$props3.onShowContent,
128
- onHideContent = _this$props3.onHideContent,
129
- preventTooltip = _this$props3.preventTooltip,
130
- styles = _this$props3.styles,
131
- rest = (0, _objectWithoutProperties2.default)(_this$props3, _excluded);
132
- return (0, _jsxRuntime.jsx)(_Popover.Popover, {
133
- ...(0, _passthroughProps.passthroughProps)(rest),
134
- isShowingContent: !preventTooltip && isShowingContent,
135
- defaultIsShowingContent: !preventTooltip && defaultIsShowingContent,
136
- on: on,
137
- shouldRenderOffscreen: true,
138
- shouldReturnFocus: false,
139
- placement: placement,
140
- color: color === 'primary' ? 'primary-inverse' : 'primary',
141
- mountNode: mountNode,
142
- constrain: constrain,
143
- shadow: "none",
144
- offsetX: offsetX,
145
- offsetY: offsetY,
146
- positionTarget: positionTarget,
147
- renderTrigger: () => this.renderTrigger(),
148
- onShowContent: onShowContent,
149
- onHideContent: onHideContent,
150
- onFocus: this.handleFocus,
151
- onBlur: this.handleBlur,
152
- elementRef: this.handleRef,
153
- shouldCloseOnDocumentClick: false,
154
- shouldCloseOnEscape: true,
155
- shouldSetAriaExpanded: false,
156
- "data-cid": "Tooltip",
157
- children: !preventTooltip ? (0, _jsxRuntime.jsx)("span", {
158
- id: this._id,
159
- css: styles === null || styles === void 0 ? void 0 : styles.tooltip,
160
- role: "tooltip",
161
- children: (0, _callRenderProp.callRenderProp)(renderTip)
162
- }) : null
163
- });
164
- }
165
- }, _Tooltip.displayName = "Tooltip", _Tooltip.componentId = 'Tooltip', _Tooltip.allowedProps = _props.allowedProps, _Tooltip.defaultProps = {
166
- defaultIsShowingContent: false,
167
- color: 'primary',
168
- placement: 'top',
169
- constrain: 'window',
170
- offsetX: 0,
171
- offsetY: 0,
172
- preventTooltip: false
173
- }, _Tooltip)) || _class) || _class);
174
- var _default = exports.default = Tooltip;
@@ -1,54 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- /*
8
- * The MIT License (MIT)
9
- *
10
- * Copyright (c) 2015 - present Instructure, Inc.
11
- *
12
- * Permission is hereby granted, free of charge, to any person obtaining a copy
13
- * of this software and associated documentation files (the "Software"), to deal
14
- * in the Software without restriction, including without limitation the rights
15
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
16
- * copies of the Software, and to permit persons to whom the Software is
17
- * furnished to do so, subject to the following conditions:
18
- *
19
- * The above copyright notice and this permission notice shall be included in all
20
- * copies or substantial portions of the Software.
21
- *
22
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
25
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
27
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
28
- * SOFTWARE.
29
- */
30
-
31
- /**
32
- * ---
33
- * private: true
34
- * ---
35
- * Generates the style object from the theme and provided additional information
36
- * @param {Object} componentTheme The theme variable object.
37
- * @param {Object} props the props of the component, the style is applied to
38
- * @param {Object} state the state of the component, the style is applied to
39
- * @return {Object} The final style object, which will be used in the component
40
- */
41
- const generateStyle = componentTheme => {
42
- return {
43
- tooltip: {
44
- label: 'tooltip',
45
- fontFamily: componentTheme.fontFamily,
46
- fontWeight: componentTheme.fontWeight,
47
- boxSizing: 'border-box',
48
- display: 'block',
49
- fontSize: componentTheme.fontSize,
50
- padding: componentTheme.padding
51
- }
52
- };
53
- };
54
- var _default = exports.default = generateStyle;
@@ -1,49 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- /*
8
- * The MIT License (MIT)
9
- *
10
- * Copyright (c) 2015 - present Instructure, Inc.
11
- *
12
- * Permission is hereby granted, free of charge, to any person obtaining a copy
13
- * of this software and associated documentation files (the "Software"), to deal
14
- * in the Software without restriction, including without limitation the rights
15
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
16
- * copies of the Software, and to permit persons to whom the Software is
17
- * furnished to do so, subject to the following conditions:
18
- *
19
- * The above copyright notice and this permission notice shall be included in all
20
- * copies or substantial portions of the Software.
21
- *
22
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
25
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
27
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
28
- * SOFTWARE.
29
- */
30
-
31
- /**
32
- * Generates the theme object for the component from the theme and provided additional information
33
- * @param {Object} theme The actual theme object.
34
- * @return {Object} The final theme object with the overrides and component variables
35
- */
36
- const generateComponentTheme = theme => {
37
- const typography = theme.typography,
38
- spacing = theme.spacing;
39
- const componentVariables = {
40
- fontFamily: typography === null || typography === void 0 ? void 0 : typography.fontFamily,
41
- fontWeight: typography === null || typography === void 0 ? void 0 : typography.fontWeightNormal,
42
- fontSize: typography === null || typography === void 0 ? void 0 : typography.fontSizeSmall,
43
- padding: spacing === null || spacing === void 0 ? void 0 : spacing.small
44
- };
45
- return {
46
- ...componentVariables
47
- };
48
- };
49
- var _default = exports.default = generateComponentTheme;
package/lib/index.js DELETED
@@ -1,12 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- Object.defineProperty(exports, "Tooltip", {
7
- enumerable: true,
8
- get: function () {
9
- return _Tooltip.Tooltip;
10
- }
11
- });
12
- var _Tooltip = require("./Tooltip");
package/lib/package.json DELETED
@@ -1 +0,0 @@
1
- {"type":"commonjs"}