@instructure/ui-position 10.2.3-snapshot-13 → 10.2.3-snapshot-15
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 +1 -1
- package/es/Position/__new-tests__/Position.test.js +16 -16
- package/lib/Position/__new-tests__/Position.test.js +16 -16
- package/package.json +19 -19
- package/tsconfig.build.tsbuildinfo +1 -1
- package/types/Position/PositionContentLocator.d.ts +75 -1
- package/types/Position/PositionContentLocator.d.ts.map +1 -1
- package/types/Position/PositionLocator.d.ts +75 -1
- package/types/Position/PositionLocator.d.ts.map +1 -1
- package/types/Position/PositionTargetLocator.d.ts +75 -1
- package/types/Position/PositionTargetLocator.d.ts.map +1 -1
- package/types/Position/index.d.ts +2 -2
- package/types/Position/index.d.ts.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
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
|
-
## [10.2.3-snapshot-
|
|
6
|
+
## [10.2.3-snapshot-15](https://github.com/instructure/instructure-ui/compare/v10.2.2...v10.2.3-snapshot-15) (2024-10-03)
|
|
7
7
|
|
|
8
8
|
**Note:** Version bump only for package @instructure/ui-position
|
|
9
9
|
|
|
@@ -37,7 +37,7 @@ describe('<Position />', () => {
|
|
|
37
37
|
overflow: 'auto'
|
|
38
38
|
};
|
|
39
39
|
it('should render', () => {
|
|
40
|
-
render(
|
|
40
|
+
render(/*#__PURE__*/React.createElement("div", {
|
|
41
41
|
style: {
|
|
42
42
|
padding: '50px'
|
|
43
43
|
}
|
|
@@ -61,7 +61,7 @@ describe('<Position />', () => {
|
|
|
61
61
|
expect(content).toHaveTextContent('Content');
|
|
62
62
|
});
|
|
63
63
|
it('should absolutely position content', () => {
|
|
64
|
-
render(
|
|
64
|
+
render(/*#__PURE__*/React.createElement("div", {
|
|
65
65
|
style: {
|
|
66
66
|
padding: '50px'
|
|
67
67
|
}
|
|
@@ -83,7 +83,7 @@ describe('<Position />', () => {
|
|
|
83
83
|
});
|
|
84
84
|
it('should render right of target', async () => {
|
|
85
85
|
const onPositionChanged = vi.fn();
|
|
86
|
-
render(
|
|
86
|
+
render(/*#__PURE__*/React.createElement("div", {
|
|
87
87
|
style: {
|
|
88
88
|
padding: '50px'
|
|
89
89
|
}
|
|
@@ -111,7 +111,7 @@ describe('<Position />', () => {
|
|
|
111
111
|
});
|
|
112
112
|
it('should render below target', async () => {
|
|
113
113
|
const onPositionChanged = vi.fn();
|
|
114
|
-
render(
|
|
114
|
+
render(/*#__PURE__*/React.createElement("div", {
|
|
115
115
|
style: {
|
|
116
116
|
padding: '50px'
|
|
117
117
|
}
|
|
@@ -139,7 +139,7 @@ describe('<Position />', () => {
|
|
|
139
139
|
});
|
|
140
140
|
it('should render left of target', async () => {
|
|
141
141
|
const onPositionChanged = vi.fn();
|
|
142
|
-
render(
|
|
142
|
+
render(/*#__PURE__*/React.createElement("div", {
|
|
143
143
|
style: {
|
|
144
144
|
padding: '50px'
|
|
145
145
|
}
|
|
@@ -167,7 +167,7 @@ describe('<Position />', () => {
|
|
|
167
167
|
});
|
|
168
168
|
it('should render above target', async () => {
|
|
169
169
|
const onPositionChanged = vi.fn();
|
|
170
|
-
render(
|
|
170
|
+
render(/*#__PURE__*/React.createElement("div", {
|
|
171
171
|
style: {
|
|
172
172
|
padding: '50px'
|
|
173
173
|
}
|
|
@@ -195,7 +195,7 @@ describe('<Position />', () => {
|
|
|
195
195
|
});
|
|
196
196
|
it('should center vertically', async () => {
|
|
197
197
|
const onPositionChanged = vi.fn();
|
|
198
|
-
render(
|
|
198
|
+
render(/*#__PURE__*/React.createElement("div", {
|
|
199
199
|
style: {
|
|
200
200
|
padding: '50px'
|
|
201
201
|
}
|
|
@@ -225,7 +225,7 @@ describe('<Position />', () => {
|
|
|
225
225
|
});
|
|
226
226
|
it('should center horizontally', async () => {
|
|
227
227
|
const onPositionChanged = vi.fn();
|
|
228
|
-
render(
|
|
228
|
+
render(/*#__PURE__*/React.createElement("div", {
|
|
229
229
|
style: {
|
|
230
230
|
padding: '50px'
|
|
231
231
|
}
|
|
@@ -258,7 +258,7 @@ describe('<Position />', () => {
|
|
|
258
258
|
describe('when constrained to scroll-parent', () => {
|
|
259
259
|
it('should re-position below target', async () => {
|
|
260
260
|
const onPositionChanged = vi.fn();
|
|
261
|
-
render(
|
|
261
|
+
render(/*#__PURE__*/React.createElement("div", {
|
|
262
262
|
style: {
|
|
263
263
|
padding: '50px'
|
|
264
264
|
}
|
|
@@ -293,7 +293,7 @@ describe('<Position />', () => {
|
|
|
293
293
|
});
|
|
294
294
|
it('should re-position above target', async () => {
|
|
295
295
|
const onPositionChanged = vi.fn();
|
|
296
|
-
render(
|
|
296
|
+
render(/*#__PURE__*/React.createElement("div", {
|
|
297
297
|
style: {
|
|
298
298
|
padding: '50px'
|
|
299
299
|
}
|
|
@@ -328,7 +328,7 @@ describe('<Position />', () => {
|
|
|
328
328
|
});
|
|
329
329
|
it('should re-position after target', async () => {
|
|
330
330
|
const onPositionChanged = vi.fn();
|
|
331
|
-
render(
|
|
331
|
+
render(/*#__PURE__*/React.createElement("div", {
|
|
332
332
|
style: {
|
|
333
333
|
padding: '50px'
|
|
334
334
|
}
|
|
@@ -363,7 +363,7 @@ describe('<Position />', () => {
|
|
|
363
363
|
});
|
|
364
364
|
it('should re-position before target', async () => {
|
|
365
365
|
const onPositionChanged = vi.fn();
|
|
366
|
-
render(
|
|
366
|
+
render(/*#__PURE__*/React.createElement("div", {
|
|
367
367
|
style: {
|
|
368
368
|
padding: '50px'
|
|
369
369
|
}
|
|
@@ -407,7 +407,7 @@ describe('<Position />', () => {
|
|
|
407
407
|
document.documentElement.style.top = '';
|
|
408
408
|
});
|
|
409
409
|
it('should position correctly', async () => {
|
|
410
|
-
render(
|
|
410
|
+
render(/*#__PURE__*/React.createElement("div", {
|
|
411
411
|
style: {
|
|
412
412
|
padding: '100px'
|
|
413
413
|
}
|
|
@@ -426,7 +426,7 @@ describe('<Position />', () => {
|
|
|
426
426
|
});
|
|
427
427
|
});
|
|
428
428
|
it('should position correctly with mountNode', async () => {
|
|
429
|
-
render(
|
|
429
|
+
render(/*#__PURE__*/React.createElement("div", {
|
|
430
430
|
style: {
|
|
431
431
|
padding: '100px'
|
|
432
432
|
}
|
|
@@ -458,7 +458,7 @@ describe('<Position />', () => {
|
|
|
458
458
|
});
|
|
459
459
|
describe('containerDisplay prop', () => {
|
|
460
460
|
it('should apply "inline-block"', () => {
|
|
461
|
-
const _render = render(
|
|
461
|
+
const _render = render(/*#__PURE__*/React.createElement("div", {
|
|
462
462
|
style: {
|
|
463
463
|
padding: '50px'
|
|
464
464
|
}
|
|
@@ -481,7 +481,7 @@ describe('<Position />', () => {
|
|
|
481
481
|
expect(style.display).toEqual('inline-block');
|
|
482
482
|
});
|
|
483
483
|
it('should apply "block"', () => {
|
|
484
|
-
const _render2 = render(
|
|
484
|
+
const _render2 = render(/*#__PURE__*/React.createElement("div", {
|
|
485
485
|
style: {
|
|
486
486
|
padding: '50px'
|
|
487
487
|
}
|
|
@@ -39,7 +39,7 @@ describe('<Position />', () => {
|
|
|
39
39
|
overflow: 'auto'
|
|
40
40
|
};
|
|
41
41
|
it('should render', () => {
|
|
42
|
-
(0, _react2.render)(
|
|
42
|
+
(0, _react2.render)(/*#__PURE__*/_react.default.createElement("div", {
|
|
43
43
|
style: {
|
|
44
44
|
padding: '50px'
|
|
45
45
|
}
|
|
@@ -63,7 +63,7 @@ describe('<Position />', () => {
|
|
|
63
63
|
expect(content).toHaveTextContent('Content');
|
|
64
64
|
});
|
|
65
65
|
it('should absolutely position content', () => {
|
|
66
|
-
(0, _react2.render)(
|
|
66
|
+
(0, _react2.render)(/*#__PURE__*/_react.default.createElement("div", {
|
|
67
67
|
style: {
|
|
68
68
|
padding: '50px'
|
|
69
69
|
}
|
|
@@ -85,7 +85,7 @@ describe('<Position />', () => {
|
|
|
85
85
|
});
|
|
86
86
|
it('should render right of target', async () => {
|
|
87
87
|
const onPositionChanged = _vitest.vi.fn();
|
|
88
|
-
(0, _react2.render)(
|
|
88
|
+
(0, _react2.render)(/*#__PURE__*/_react.default.createElement("div", {
|
|
89
89
|
style: {
|
|
90
90
|
padding: '50px'
|
|
91
91
|
}
|
|
@@ -113,7 +113,7 @@ describe('<Position />', () => {
|
|
|
113
113
|
});
|
|
114
114
|
it('should render below target', async () => {
|
|
115
115
|
const onPositionChanged = _vitest.vi.fn();
|
|
116
|
-
(0, _react2.render)(
|
|
116
|
+
(0, _react2.render)(/*#__PURE__*/_react.default.createElement("div", {
|
|
117
117
|
style: {
|
|
118
118
|
padding: '50px'
|
|
119
119
|
}
|
|
@@ -141,7 +141,7 @@ describe('<Position />', () => {
|
|
|
141
141
|
});
|
|
142
142
|
it('should render left of target', async () => {
|
|
143
143
|
const onPositionChanged = _vitest.vi.fn();
|
|
144
|
-
(0, _react2.render)(
|
|
144
|
+
(0, _react2.render)(/*#__PURE__*/_react.default.createElement("div", {
|
|
145
145
|
style: {
|
|
146
146
|
padding: '50px'
|
|
147
147
|
}
|
|
@@ -169,7 +169,7 @@ describe('<Position />', () => {
|
|
|
169
169
|
});
|
|
170
170
|
it('should render above target', async () => {
|
|
171
171
|
const onPositionChanged = _vitest.vi.fn();
|
|
172
|
-
(0, _react2.render)(
|
|
172
|
+
(0, _react2.render)(/*#__PURE__*/_react.default.createElement("div", {
|
|
173
173
|
style: {
|
|
174
174
|
padding: '50px'
|
|
175
175
|
}
|
|
@@ -197,7 +197,7 @@ describe('<Position />', () => {
|
|
|
197
197
|
});
|
|
198
198
|
it('should center vertically', async () => {
|
|
199
199
|
const onPositionChanged = _vitest.vi.fn();
|
|
200
|
-
(0, _react2.render)(
|
|
200
|
+
(0, _react2.render)(/*#__PURE__*/_react.default.createElement("div", {
|
|
201
201
|
style: {
|
|
202
202
|
padding: '50px'
|
|
203
203
|
}
|
|
@@ -227,7 +227,7 @@ describe('<Position />', () => {
|
|
|
227
227
|
});
|
|
228
228
|
it('should center horizontally', async () => {
|
|
229
229
|
const onPositionChanged = _vitest.vi.fn();
|
|
230
|
-
(0, _react2.render)(
|
|
230
|
+
(0, _react2.render)(/*#__PURE__*/_react.default.createElement("div", {
|
|
231
231
|
style: {
|
|
232
232
|
padding: '50px'
|
|
233
233
|
}
|
|
@@ -260,7 +260,7 @@ describe('<Position />', () => {
|
|
|
260
260
|
describe('when constrained to scroll-parent', () => {
|
|
261
261
|
it('should re-position below target', async () => {
|
|
262
262
|
const onPositionChanged = _vitest.vi.fn();
|
|
263
|
-
(0, _react2.render)(
|
|
263
|
+
(0, _react2.render)(/*#__PURE__*/_react.default.createElement("div", {
|
|
264
264
|
style: {
|
|
265
265
|
padding: '50px'
|
|
266
266
|
}
|
|
@@ -295,7 +295,7 @@ describe('<Position />', () => {
|
|
|
295
295
|
});
|
|
296
296
|
it('should re-position above target', async () => {
|
|
297
297
|
const onPositionChanged = _vitest.vi.fn();
|
|
298
|
-
(0, _react2.render)(
|
|
298
|
+
(0, _react2.render)(/*#__PURE__*/_react.default.createElement("div", {
|
|
299
299
|
style: {
|
|
300
300
|
padding: '50px'
|
|
301
301
|
}
|
|
@@ -330,7 +330,7 @@ describe('<Position />', () => {
|
|
|
330
330
|
});
|
|
331
331
|
it('should re-position after target', async () => {
|
|
332
332
|
const onPositionChanged = _vitest.vi.fn();
|
|
333
|
-
(0, _react2.render)(
|
|
333
|
+
(0, _react2.render)(/*#__PURE__*/_react.default.createElement("div", {
|
|
334
334
|
style: {
|
|
335
335
|
padding: '50px'
|
|
336
336
|
}
|
|
@@ -365,7 +365,7 @@ describe('<Position />', () => {
|
|
|
365
365
|
});
|
|
366
366
|
it('should re-position before target', async () => {
|
|
367
367
|
const onPositionChanged = _vitest.vi.fn();
|
|
368
|
-
(0, _react2.render)(
|
|
368
|
+
(0, _react2.render)(/*#__PURE__*/_react.default.createElement("div", {
|
|
369
369
|
style: {
|
|
370
370
|
padding: '50px'
|
|
371
371
|
}
|
|
@@ -409,7 +409,7 @@ describe('<Position />', () => {
|
|
|
409
409
|
document.documentElement.style.top = '';
|
|
410
410
|
});
|
|
411
411
|
it('should position correctly', async () => {
|
|
412
|
-
(0, _react2.render)(
|
|
412
|
+
(0, _react2.render)(/*#__PURE__*/_react.default.createElement("div", {
|
|
413
413
|
style: {
|
|
414
414
|
padding: '100px'
|
|
415
415
|
}
|
|
@@ -428,7 +428,7 @@ describe('<Position />', () => {
|
|
|
428
428
|
});
|
|
429
429
|
});
|
|
430
430
|
it('should position correctly with mountNode', async () => {
|
|
431
|
-
(0, _react2.render)(
|
|
431
|
+
(0, _react2.render)(/*#__PURE__*/_react.default.createElement("div", {
|
|
432
432
|
style: {
|
|
433
433
|
padding: '100px'
|
|
434
434
|
}
|
|
@@ -460,7 +460,7 @@ describe('<Position />', () => {
|
|
|
460
460
|
});
|
|
461
461
|
describe('containerDisplay prop', () => {
|
|
462
462
|
it('should apply "inline-block"', () => {
|
|
463
|
-
const _render = (0, _react2.render)(
|
|
463
|
+
const _render = (0, _react2.render)(/*#__PURE__*/_react.default.createElement("div", {
|
|
464
464
|
style: {
|
|
465
465
|
padding: '50px'
|
|
466
466
|
}
|
|
@@ -483,7 +483,7 @@ describe('<Position />', () => {
|
|
|
483
483
|
expect(style.display).toEqual('inline-block');
|
|
484
484
|
});
|
|
485
485
|
it('should apply "block"', () => {
|
|
486
|
-
const _render2 = (0, _react2.render)(
|
|
486
|
+
const _render2 = (0, _react2.render)(/*#__PURE__*/_react.default.createElement("div", {
|
|
487
487
|
style: {
|
|
488
488
|
padding: '50px'
|
|
489
489
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-position",
|
|
3
|
-
"version": "10.2.3-snapshot-
|
|
3
|
+
"version": "10.2.3-snapshot-15",
|
|
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",
|
|
@@ -23,28 +23,28 @@
|
|
|
23
23
|
},
|
|
24
24
|
"license": "MIT",
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@babel/runtime": "^7.
|
|
27
|
-
"@instructure/debounce": "10.2.3-snapshot-
|
|
28
|
-
"@instructure/emotion": "10.2.3-snapshot-
|
|
29
|
-
"@instructure/shared-types": "10.2.3-snapshot-
|
|
30
|
-
"@instructure/ui-dom-utils": "10.2.3-snapshot-
|
|
31
|
-
"@instructure/ui-portal": "10.2.3-snapshot-
|
|
32
|
-
"@instructure/ui-prop-types": "10.2.3-snapshot-
|
|
33
|
-
"@instructure/ui-react-utils": "10.2.3-snapshot-
|
|
34
|
-
"@instructure/ui-testable": "10.2.3-snapshot-
|
|
35
|
-
"@instructure/ui-utils": "10.2.3-snapshot-
|
|
36
|
-
"@instructure/uid": "10.2.3-snapshot-
|
|
26
|
+
"@babel/runtime": "^7.25.6",
|
|
27
|
+
"@instructure/debounce": "10.2.3-snapshot-15",
|
|
28
|
+
"@instructure/emotion": "10.2.3-snapshot-15",
|
|
29
|
+
"@instructure/shared-types": "10.2.3-snapshot-15",
|
|
30
|
+
"@instructure/ui-dom-utils": "10.2.3-snapshot-15",
|
|
31
|
+
"@instructure/ui-portal": "10.2.3-snapshot-15",
|
|
32
|
+
"@instructure/ui-prop-types": "10.2.3-snapshot-15",
|
|
33
|
+
"@instructure/ui-react-utils": "10.2.3-snapshot-15",
|
|
34
|
+
"@instructure/ui-testable": "10.2.3-snapshot-15",
|
|
35
|
+
"@instructure/ui-utils": "10.2.3-snapshot-15",
|
|
36
|
+
"@instructure/uid": "10.2.3-snapshot-15",
|
|
37
37
|
"prop-types": "^15.8.1"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@instructure/ui-babel-preset": "10.2.3-snapshot-
|
|
41
|
-
"@instructure/ui-color-utils": "10.2.3-snapshot-
|
|
42
|
-
"@instructure/ui-test-locator": "10.2.3-snapshot-
|
|
43
|
-
"@instructure/ui-test-utils": "10.2.3-snapshot-
|
|
44
|
-
"@instructure/ui-themes": "10.2.3-snapshot-
|
|
40
|
+
"@instructure/ui-babel-preset": "10.2.3-snapshot-15",
|
|
41
|
+
"@instructure/ui-color-utils": "10.2.3-snapshot-15",
|
|
42
|
+
"@instructure/ui-test-locator": "10.2.3-snapshot-15",
|
|
43
|
+
"@instructure/ui-test-utils": "10.2.3-snapshot-15",
|
|
44
|
+
"@instructure/ui-themes": "10.2.3-snapshot-15",
|
|
45
45
|
"@testing-library/jest-dom": "^6.1.4",
|
|
46
|
-
"@testing-library/react": "^
|
|
47
|
-
"vitest": "^2.
|
|
46
|
+
"@testing-library/react": "^16.0.1",
|
|
47
|
+
"vitest": "^2.1.1"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
50
|
"react": ">=16.8 <=18"
|