@instructure/ui-position 8.17.1-snapshot.81 → 8.18.1-snapshot.0

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,10 @@
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.18.0](https://github.com/instructure/instructure-ui/compare/v8.17.0...v8.18.0) (2022-02-23)
7
+
8
+ **Note:** Version bump only for package @instructure/ui-position
9
+
6
10
  # [8.17.0](https://github.com/instructure/instructure-ui/compare/v8.16.0...v8.17.0) (2022-02-07)
7
11
 
8
12
  ### Bug Fixes
@@ -104,11 +104,15 @@ let Position = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyle, g
104
104
  }
105
105
 
106
106
  componentDidMount() {
107
+ var _this$props$makeStyle, _this$props;
108
+
107
109
  this.toggleLocatorAttributes(true);
108
- this.props.makeStyles?.();
110
+ (_this$props$makeStyle = (_this$props = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props);
109
111
  }
110
112
 
111
113
  componentDidUpdate(prevProps, prevState) {
114
+ var _this$props$makeStyle2, _this$props2;
115
+
112
116
  this.position();
113
117
  this.toggleLocatorAttributes(true);
114
118
 
@@ -128,7 +132,7 @@ let Position = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyle, g
128
132
  });
129
133
  }
130
134
 
131
- this.props.makeStyles?.();
135
+ (_this$props$makeStyle2 = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props2);
132
136
  }
133
137
 
134
138
  componentWillUnmount() {
@@ -191,13 +195,15 @@ let Position = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyle, g
191
195
  let content = ensureSingleChild(this.props.children);
192
196
 
193
197
  if (content) {
198
+ var _this$props$styles;
199
+
194
200
  content = safeCloneElement(content, {
195
201
  ref: el => {
196
202
  this._content = el;
197
203
  },
198
204
  style: {
199
205
  boxSizing: 'border-box',
200
- zIndex: this.props.styles?.zIndex,
206
+ zIndex: (_this$props$styles = this.props.styles) === null || _this$props$styles === void 0 ? void 0 : _this$props$styles.zIndex,
201
207
  ...content.props.style,
202
208
  ...this.state.style
203
209
  },
@@ -30,7 +30,7 @@
30
30
  const generateComponentTheme = theme => {
31
31
  const stacking = theme.stacking;
32
32
  const componentVariables = {
33
- zIndex: stacking?.topmost
33
+ zIndex: stacking === null || stacking === void 0 ? void 0 : stacking.topmost
34
34
  };
35
35
  return { ...componentVariables
36
36
  };
@@ -288,7 +288,7 @@ class PositionData {
288
288
  left = _addOffsets.left,
289
289
  top = _addOffsets.top;
290
290
 
291
- if (canUseDOM && win?.matchMedia) {
291
+ if (canUseDOM && win !== null && win !== void 0 && win.matchMedia) {
292
292
  const retina = win.matchMedia('only screen and (min-resolution: 1.3dppx)').matches || win.matchMedia('only screen and (-webkit-min-device-pixel-ratio: 1.3)').matches;
293
293
 
294
294
  if (!retina) {
@@ -109,11 +109,15 @@ let Position = (_dec = (0, _withDeterministicId.withDeterministicId)(), _dec2 =
109
109
  }
110
110
 
111
111
  componentDidMount() {
112
+ var _this$props$makeStyle, _this$props;
113
+
112
114
  this.toggleLocatorAttributes(true);
113
- this.props.makeStyles?.();
115
+ (_this$props$makeStyle = (_this$props = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props);
114
116
  }
115
117
 
116
118
  componentDidUpdate(prevProps, prevState) {
119
+ var _this$props$makeStyle2, _this$props2;
120
+
117
121
  this.position();
118
122
  this.toggleLocatorAttributes(true);
119
123
 
@@ -133,7 +137,7 @@ let Position = (_dec = (0, _withDeterministicId.withDeterministicId)(), _dec2 =
133
137
  });
134
138
  }
135
139
 
136
- this.props.makeStyles?.();
140
+ (_this$props$makeStyle2 = (_this$props2 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props2);
137
141
  }
138
142
 
139
143
  componentWillUnmount() {
@@ -196,13 +200,15 @@ let Position = (_dec = (0, _withDeterministicId.withDeterministicId)(), _dec2 =
196
200
  let content = (0, _ensureSingleChild.ensureSingleChild)(this.props.children);
197
201
 
198
202
  if (content) {
203
+ var _this$props$styles;
204
+
199
205
  content = (0, _safeCloneElement.safeCloneElement)(content, {
200
206
  ref: el => {
201
207
  this._content = el;
202
208
  },
203
209
  style: {
204
210
  boxSizing: 'border-box',
205
- zIndex: this.props.styles?.zIndex,
211
+ zIndex: (_this$props$styles = this.props.styles) === null || _this$props$styles === void 0 ? void 0 : _this$props$styles.zIndex,
206
212
  ...content.props.style,
207
213
  ...this.state.style
208
214
  },
@@ -37,7 +37,7 @@ exports.default = void 0;
37
37
  const generateComponentTheme = theme => {
38
38
  const stacking = theme.stacking;
39
39
  const componentVariables = {
40
- zIndex: stacking?.topmost
40
+ zIndex: stacking === null || stacking === void 0 ? void 0 : stacking.topmost
41
41
  };
42
42
  return { ...componentVariables
43
43
  };
@@ -312,7 +312,7 @@ class PositionData {
312
312
  left = _addOffsets.left,
313
313
  top = _addOffsets.top;
314
314
 
315
- if (_canUseDOM.canUseDOM && win?.matchMedia) {
315
+ if (_canUseDOM.canUseDOM && win !== null && win !== void 0 && win.matchMedia) {
316
316
  const retina = win.matchMedia('only screen and (min-resolution: 1.3dppx)').matches || win.matchMedia('only screen and (-webkit-min-device-pixel-ratio: 1.3)').matches;
317
317
 
318
318
  if (!retina) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/ui-position",
3
- "version": "8.17.1-snapshot.81+b39b60872",
3
+ "version": "8.18.1-snapshot.0+435c9ae79",
4
4
  "description": "A component for positioning content with respect to a designated target.",
5
5
  "author": "Instructure, Inc. Engineering and Product Design",
6
6
  "module": "./es/index.js",
@@ -24,24 +24,24 @@
24
24
  "license": "MIT",
25
25
  "dependencies": {
26
26
  "@babel/runtime": "^7.13.10",
27
- "@instructure/debounce": "8.17.1-snapshot.81+b39b60872",
28
- "@instructure/emotion": "8.17.1-snapshot.81+b39b60872",
29
- "@instructure/shared-types": "8.17.1-snapshot.81+b39b60872",
30
- "@instructure/ui-dom-utils": "8.17.1-snapshot.81+b39b60872",
31
- "@instructure/ui-portal": "8.17.1-snapshot.81+b39b60872",
32
- "@instructure/ui-prop-types": "8.17.1-snapshot.81+b39b60872",
33
- "@instructure/ui-react-utils": "8.17.1-snapshot.81+b39b60872",
34
- "@instructure/ui-testable": "8.17.1-snapshot.81+b39b60872",
35
- "@instructure/ui-utils": "8.17.1-snapshot.81+b39b60872",
36
- "@instructure/uid": "8.17.1-snapshot.81+b39b60872",
27
+ "@instructure/debounce": "8.18.1-snapshot.0+435c9ae79",
28
+ "@instructure/emotion": "8.18.1-snapshot.0+435c9ae79",
29
+ "@instructure/shared-types": "8.18.1-snapshot.0+435c9ae79",
30
+ "@instructure/ui-dom-utils": "8.18.1-snapshot.0+435c9ae79",
31
+ "@instructure/ui-portal": "8.18.1-snapshot.0+435c9ae79",
32
+ "@instructure/ui-prop-types": "8.18.1-snapshot.0+435c9ae79",
33
+ "@instructure/ui-react-utils": "8.18.1-snapshot.0+435c9ae79",
34
+ "@instructure/ui-testable": "8.18.1-snapshot.0+435c9ae79",
35
+ "@instructure/ui-utils": "8.18.1-snapshot.0+435c9ae79",
36
+ "@instructure/uid": "8.18.1-snapshot.0+435c9ae79",
37
37
  "prop-types": "^15"
38
38
  },
39
39
  "devDependencies": {
40
- "@instructure/ui-babel-preset": "8.17.1-snapshot.81+b39b60872",
41
- "@instructure/ui-color-utils": "8.17.1-snapshot.81+b39b60872",
42
- "@instructure/ui-test-locator": "8.17.1-snapshot.81+b39b60872",
43
- "@instructure/ui-test-utils": "8.17.1-snapshot.81+b39b60872",
44
- "@instructure/ui-themes": "8.17.1-snapshot.81+b39b60872"
40
+ "@instructure/ui-babel-preset": "8.18.1-snapshot.0+435c9ae79",
41
+ "@instructure/ui-color-utils": "8.18.1-snapshot.0+435c9ae79",
42
+ "@instructure/ui-test-locator": "8.18.1-snapshot.0+435c9ae79",
43
+ "@instructure/ui-test-utils": "8.18.1-snapshot.0+435c9ae79",
44
+ "@instructure/ui-themes": "8.18.1-snapshot.0+435c9ae79"
45
45
  },
46
46
  "peerDependencies": {
47
47
  "react": ">=16.8 <=17"
@@ -50,5 +50,5 @@
50
50
  "access": "public"
51
51
  },
52
52
  "sideEffects": false,
53
- "gitHead": "b39b60872cb51a5e9ba26221adceec498d4ce2fb"
53
+ "gitHead": "435c9ae794c15e2bd103f700f8c4e946d91c1b59"
54
54
  }