@instructure/ui-drilldown 8.36.1-snapshot-8 → 8.36.1-snapshot-18
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/Drilldown/index.js +14 -0
- package/lib/Drilldown/DrilldownGroup/index.js +24 -0
- package/lib/Drilldown/DrilldownLocator.js +1 -5
- package/lib/Drilldown/DrilldownOption/index.js +24 -0
- package/lib/Drilldown/DrilldownSeparator/index.js +24 -0
- package/lib/Drilldown/__examples__/Drilldown.examples.js +23 -0
- package/lib/Drilldown/index.js +38 -0
- package/package.json +21 -21
- package/tsconfig.build.tsbuildinfo +1 -1
- package/types/Drilldown/DrilldownGroup/index.d.ts +2 -2
- package/types/Drilldown/DrilldownOption/index.d.ts +4 -4
- package/types/Drilldown/DrilldownPage/index.d.ts +2 -2
- package/types/Drilldown/DrilldownSeparator/index.d.ts +2 -2
- package/types/Drilldown/index.d.ts +2 -2
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
|
-
## [8.36.1-snapshot-
|
|
6
|
+
## [8.36.1-snapshot-18](https://github.com/instructure/instructure-ui/compare/v8.36.0...v8.36.1-snapshot-18) (2023-04-17)
|
|
7
7
|
|
|
8
8
|
**Note:** Version bump only for package @instructure/ui-drilldown
|
|
9
9
|
|
package/es/Drilldown/index.js
CHANGED
|
@@ -47,6 +47,14 @@ import { DrilldownPage } from './DrilldownPage';
|
|
|
47
47
|
import generateStyle from './styles';
|
|
48
48
|
import generateComponentTheme from './theme';
|
|
49
49
|
import { propTypes, allowedProps } from './props';
|
|
50
|
+
|
|
51
|
+
// Additional data we need to track on the Options,
|
|
52
|
+
// but shouldn't be settable via props
|
|
53
|
+
// Contains the Option ComponentElement and the extra data we need track on it,
|
|
54
|
+
// but don't want to expose as props
|
|
55
|
+
// Contains the props object of the Page
|
|
56
|
+
// with the `children` transformed into an array
|
|
57
|
+
// An object with the mapped Pages with their id as keys
|
|
50
58
|
/**
|
|
51
59
|
---
|
|
52
60
|
category: components
|
|
@@ -629,6 +637,9 @@ let Drilldown = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyle,
|
|
|
629
637
|
const optionElement = container === null || container === void 0 ? void 0 : container.querySelector(`[id="${id}"]`);
|
|
630
638
|
optionElement === null || optionElement === void 0 ? void 0 : optionElement.focus();
|
|
631
639
|
}
|
|
640
|
+
|
|
641
|
+
// Navigates to the page and also returns the new and old pageIds
|
|
642
|
+
|
|
632
643
|
handleGroupOptionSelected(event, selectedOption) {
|
|
633
644
|
this.setState(oldState => {
|
|
634
645
|
var _oldState$selectedGro;
|
|
@@ -686,6 +697,9 @@ let Drilldown = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyle,
|
|
|
686
697
|
}
|
|
687
698
|
});
|
|
688
699
|
}
|
|
700
|
+
|
|
701
|
+
// Setting extra logic for keyboard navigation.
|
|
702
|
+
// Enter, Esc and up/down/home/end keys are handled by Selectable.
|
|
689
703
|
renderList(getOptionProps, getDisabledOptionProps) {
|
|
690
704
|
const currentPage = this.currentPage,
|
|
691
705
|
headerChildren = this.headerChildren;
|
|
@@ -9,6 +9,30 @@ var _emotion = require("@instructure/emotion");
|
|
|
9
9
|
var _uiOptions = require("@instructure/ui-options");
|
|
10
10
|
var _props = require("./props");
|
|
11
11
|
var _dec, _class, _class2;
|
|
12
|
+
/*
|
|
13
|
+
* The MIT License (MIT)
|
|
14
|
+
*
|
|
15
|
+
* Copyright (c) 2015 - present Instructure, Inc.
|
|
16
|
+
*
|
|
17
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
18
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
19
|
+
* in the Software without restriction, including without limitation the rights
|
|
20
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
21
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
22
|
+
* furnished to do so, subject to the following conditions:
|
|
23
|
+
*
|
|
24
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
25
|
+
* copies or substantial portions of the Software.
|
|
26
|
+
*
|
|
27
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
28
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
29
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
30
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
31
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
32
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
33
|
+
* SOFTWARE.
|
|
34
|
+
*/
|
|
35
|
+
/** @jsx jsx */
|
|
12
36
|
/**
|
|
13
37
|
---
|
|
14
38
|
parent: Drilldown
|
|
@@ -33,13 +33,9 @@ var _index = require("./index");
|
|
|
33
33
|
* SOFTWARE.
|
|
34
34
|
*/
|
|
35
35
|
|
|
36
|
-
/* eslint-disable no-restricted-imports */
|
|
36
|
+
/* eslint-disable no-restricted-imports */ // @ts-expect-error bypass no type definition found error
|
|
37
37
|
// @ts-expect-error bypass no type definition found error
|
|
38
|
-
|
|
39
|
-
// @ts-expect-error bypass no type definition found error
|
|
40
|
-
|
|
41
38
|
/* eslint-enable no-restricted-imports */
|
|
42
|
-
|
|
43
39
|
const customMethods = {
|
|
44
40
|
// return the wrapper Option.Items
|
|
45
41
|
findAllOptions: async function () {
|
|
@@ -9,6 +9,30 @@ var _emotion = require("@instructure/emotion");
|
|
|
9
9
|
var _uiOptions = require("@instructure/ui-options");
|
|
10
10
|
var _props = require("./props");
|
|
11
11
|
var _dec, _class, _class2;
|
|
12
|
+
/*
|
|
13
|
+
* The MIT License (MIT)
|
|
14
|
+
*
|
|
15
|
+
* Copyright (c) 2015 - present Instructure, Inc.
|
|
16
|
+
*
|
|
17
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
18
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
19
|
+
* in the Software without restriction, including without limitation the rights
|
|
20
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
21
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
22
|
+
* furnished to do so, subject to the following conditions:
|
|
23
|
+
*
|
|
24
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
25
|
+
* copies or substantial portions of the Software.
|
|
26
|
+
*
|
|
27
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
28
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
29
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
30
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
31
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
32
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
33
|
+
* SOFTWARE.
|
|
34
|
+
*/
|
|
35
|
+
/** @jsx jsx */
|
|
12
36
|
/**
|
|
13
37
|
---
|
|
14
38
|
parent: Drilldown
|
|
@@ -9,6 +9,30 @@ var _emotion = require("@instructure/emotion");
|
|
|
9
9
|
var _uiOptions = require("@instructure/ui-options");
|
|
10
10
|
var _props = require("./props");
|
|
11
11
|
var _dec, _class, _class2;
|
|
12
|
+
/*
|
|
13
|
+
* The MIT License (MIT)
|
|
14
|
+
*
|
|
15
|
+
* Copyright (c) 2015 - present Instructure, Inc.
|
|
16
|
+
*
|
|
17
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
18
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
19
|
+
* in the Software without restriction, including without limitation the rights
|
|
20
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
21
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
22
|
+
* furnished to do so, subject to the following conditions:
|
|
23
|
+
*
|
|
24
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
25
|
+
* copies or substantial portions of the Software.
|
|
26
|
+
*
|
|
27
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
28
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
29
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
30
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
31
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
32
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
33
|
+
* SOFTWARE.
|
|
34
|
+
*/
|
|
35
|
+
/** @jsx jsx */
|
|
12
36
|
/**
|
|
13
37
|
---
|
|
14
38
|
parent: Drilldown
|
|
@@ -8,6 +8,29 @@ exports.default = void 0;
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _index = require("../index");
|
|
10
10
|
var _Drilldown$Page, _Drilldown$Page2, _Drilldown$Page3, _Drilldown$Page4, _Drilldown$Option, _Drilldown$Option2, _Drilldown$Option3, _Drilldown$Option4, _br, _br2, _br3, _Drilldown$Option5;
|
|
11
|
+
/*
|
|
12
|
+
* The MIT License (MIT)
|
|
13
|
+
*
|
|
14
|
+
* Copyright (c) 2015 - present Instructure, Inc.
|
|
15
|
+
*
|
|
16
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
17
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
18
|
+
* in the Software without restriction, including without limitation the rights
|
|
19
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
20
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
21
|
+
* furnished to do so, subject to the following conditions:
|
|
22
|
+
*
|
|
23
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
24
|
+
* copies or substantial portions of the Software.
|
|
25
|
+
*
|
|
26
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
27
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
28
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
29
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
30
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
31
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
32
|
+
* SOFTWARE.
|
|
33
|
+
*/
|
|
11
34
|
const triggerButton = /*#__PURE__*/_react.default.createElement("button", {
|
|
12
35
|
key: 1,
|
|
13
36
|
style: {
|
package/lib/Drilldown/index.js
CHANGED
|
@@ -36,6 +36,38 @@ const _excluded = ["groupProps"],
|
|
|
36
36
|
_excluded2 = ["groupProps"],
|
|
37
37
|
_excluded3 = ["id", "themeOverride"];
|
|
38
38
|
var _dec, _dec2, _dec3, _class, _class2, _IconArrowOpenEndSoli, _IconArrowOpenStartSo, _Options$Separator, _Options$Separator2;
|
|
39
|
+
/*
|
|
40
|
+
* The MIT License (MIT)
|
|
41
|
+
*
|
|
42
|
+
* Copyright (c) 2015 - present Instructure, Inc.
|
|
43
|
+
*
|
|
44
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
45
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
46
|
+
* in the Software without restriction, including without limitation the rights
|
|
47
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
48
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
49
|
+
* furnished to do so, subject to the following conditions:
|
|
50
|
+
*
|
|
51
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
52
|
+
* copies or substantial portions of the Software.
|
|
53
|
+
*
|
|
54
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
55
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
56
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
57
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
58
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
59
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
60
|
+
* SOFTWARE.
|
|
61
|
+
*/
|
|
62
|
+
/** @jsx jsx */
|
|
63
|
+
/** @jsxFrag React.Fragment */
|
|
64
|
+
// Additional data we need to track on the Options,
|
|
65
|
+
// but shouldn't be settable via props
|
|
66
|
+
// Contains the Option ComponentElement and the extra data we need track on it,
|
|
67
|
+
// but don't want to expose as props
|
|
68
|
+
// Contains the props object of the Page
|
|
69
|
+
// with the `children` transformed into an array
|
|
70
|
+
// An object with the mapped Pages with their id as keys
|
|
39
71
|
/**
|
|
40
72
|
---
|
|
41
73
|
category: components
|
|
@@ -618,6 +650,9 @@ let Drilldown = (_dec = (0, _withDeterministicId.withDeterministicId)(), _dec2 =
|
|
|
618
650
|
const optionElement = container === null || container === void 0 ? void 0 : container.querySelector(`[id="${id}"]`);
|
|
619
651
|
optionElement === null || optionElement === void 0 ? void 0 : optionElement.focus();
|
|
620
652
|
}
|
|
653
|
+
|
|
654
|
+
// Navigates to the page and also returns the new and old pageIds
|
|
655
|
+
|
|
621
656
|
handleGroupOptionSelected(event, selectedOption) {
|
|
622
657
|
this.setState(oldState => {
|
|
623
658
|
var _oldState$selectedGro;
|
|
@@ -675,6 +710,9 @@ let Drilldown = (_dec = (0, _withDeterministicId.withDeterministicId)(), _dec2 =
|
|
|
675
710
|
}
|
|
676
711
|
});
|
|
677
712
|
}
|
|
713
|
+
|
|
714
|
+
// Setting extra logic for keyboard navigation.
|
|
715
|
+
// Enter, Esc and up/down/home/end keys are handled by Selectable.
|
|
678
716
|
renderList(getOptionProps, getDisabledOptionProps) {
|
|
679
717
|
const currentPage = this.currentPage,
|
|
680
718
|
headerChildren = this.headerChildren;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-drilldown",
|
|
3
|
-
"version": "8.36.1-snapshot-
|
|
3
|
+
"version": "8.36.1-snapshot-18",
|
|
4
4
|
"description": "A drilldown menu component",
|
|
5
5
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
6
6
|
"module": "./es/index.js",
|
|
@@ -23,29 +23,29 @@
|
|
|
23
23
|
},
|
|
24
24
|
"license": "MIT",
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@babel/runtime": "^7.
|
|
27
|
-
"@instructure/console": "8.36.1-snapshot-
|
|
28
|
-
"@instructure/emotion": "8.36.1-snapshot-
|
|
29
|
-
"@instructure/shared-types": "8.36.1-snapshot-
|
|
30
|
-
"@instructure/ui-dom-utils": "8.36.1-snapshot-
|
|
31
|
-
"@instructure/ui-icons": "8.36.1-snapshot-
|
|
32
|
-
"@instructure/ui-options": "8.36.1-snapshot-
|
|
33
|
-
"@instructure/ui-popover": "8.36.1-snapshot-
|
|
34
|
-
"@instructure/ui-position": "8.36.1-snapshot-
|
|
35
|
-
"@instructure/ui-prop-types": "8.36.1-snapshot-
|
|
36
|
-
"@instructure/ui-react-utils": "8.36.1-snapshot-
|
|
37
|
-
"@instructure/ui-selectable": "8.36.1-snapshot-
|
|
38
|
-
"@instructure/ui-testable": "8.36.1-snapshot-
|
|
39
|
-
"@instructure/ui-utils": "8.36.1-snapshot-
|
|
40
|
-
"@instructure/ui-view": "8.36.1-snapshot-
|
|
26
|
+
"@babel/runtime": "^7.21.0",
|
|
27
|
+
"@instructure/console": "8.36.1-snapshot-18",
|
|
28
|
+
"@instructure/emotion": "8.36.1-snapshot-18",
|
|
29
|
+
"@instructure/shared-types": "8.36.1-snapshot-18",
|
|
30
|
+
"@instructure/ui-dom-utils": "8.36.1-snapshot-18",
|
|
31
|
+
"@instructure/ui-icons": "8.36.1-snapshot-18",
|
|
32
|
+
"@instructure/ui-options": "8.36.1-snapshot-18",
|
|
33
|
+
"@instructure/ui-popover": "8.36.1-snapshot-18",
|
|
34
|
+
"@instructure/ui-position": "8.36.1-snapshot-18",
|
|
35
|
+
"@instructure/ui-prop-types": "8.36.1-snapshot-18",
|
|
36
|
+
"@instructure/ui-react-utils": "8.36.1-snapshot-18",
|
|
37
|
+
"@instructure/ui-selectable": "8.36.1-snapshot-18",
|
|
38
|
+
"@instructure/ui-testable": "8.36.1-snapshot-18",
|
|
39
|
+
"@instructure/ui-utils": "8.36.1-snapshot-18",
|
|
40
|
+
"@instructure/ui-view": "8.36.1-snapshot-18",
|
|
41
41
|
"prop-types": "^15.8.1"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@instructure/ui-babel-preset": "8.36.1-snapshot-
|
|
45
|
-
"@instructure/ui-color-utils": "8.36.1-snapshot-
|
|
46
|
-
"@instructure/ui-test-locator": "8.36.1-snapshot-
|
|
47
|
-
"@instructure/ui-test-utils": "8.36.1-snapshot-
|
|
48
|
-
"@instructure/ui-themes": "8.36.1-snapshot-
|
|
44
|
+
"@instructure/ui-babel-preset": "8.36.1-snapshot-18",
|
|
45
|
+
"@instructure/ui-color-utils": "8.36.1-snapshot-18",
|
|
46
|
+
"@instructure/ui-test-locator": "8.36.1-snapshot-18",
|
|
47
|
+
"@instructure/ui-test-utils": "8.36.1-snapshot-18",
|
|
48
|
+
"@instructure/ui-themes": "8.36.1-snapshot-18"
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|
|
51
51
|
"react": ">=16.8 <=18"
|