@instructure/ui-drilldown 8.21.1-snapshot.10

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.
Files changed (89) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/LICENSE.md +27 -0
  3. package/README.md +30 -0
  4. package/es/Drilldown/DrilldownGroup/index.js +56 -0
  5. package/es/Drilldown/DrilldownGroup/props.js +42 -0
  6. package/es/Drilldown/DrilldownLocator.js +144 -0
  7. package/es/Drilldown/DrilldownOption/index.js +59 -0
  8. package/es/Drilldown/DrilldownOption/props.js +46 -0
  9. package/es/Drilldown/DrilldownPage/index.js +56 -0
  10. package/es/Drilldown/DrilldownPage/props.js +41 -0
  11. package/es/Drilldown/DrilldownSeparator/index.js +52 -0
  12. package/es/Drilldown/DrilldownSeparator/props.js +30 -0
  13. package/es/Drilldown/__examples__/Drilldown.examples.js +299 -0
  14. package/es/Drilldown/index.js +1241 -0
  15. package/es/Drilldown/locator.js +26 -0
  16. package/es/Drilldown/props.js +67 -0
  17. package/es/Drilldown/styles.js +82 -0
  18. package/es/Drilldown/theme.js +43 -0
  19. package/es/index.js +24 -0
  20. package/lib/Drilldown/DrilldownGroup/index.js +42 -0
  21. package/lib/Drilldown/DrilldownGroup/props.js +56 -0
  22. package/lib/Drilldown/DrilldownLocator.js +157 -0
  23. package/lib/Drilldown/DrilldownOption/index.js +45 -0
  24. package/lib/Drilldown/DrilldownOption/props.js +57 -0
  25. package/lib/Drilldown/DrilldownPage/index.js +66 -0
  26. package/lib/Drilldown/DrilldownPage/props.js +56 -0
  27. package/lib/Drilldown/DrilldownSeparator/index.js +38 -0
  28. package/lib/Drilldown/DrilldownSeparator/props.js +41 -0
  29. package/lib/Drilldown/__examples__/Drilldown.examples.js +289 -0
  30. package/lib/Drilldown/index.js +1253 -0
  31. package/lib/Drilldown/locator.js +40 -0
  32. package/lib/Drilldown/props.js +83 -0
  33. package/lib/Drilldown/styles.js +90 -0
  34. package/lib/Drilldown/theme.js +51 -0
  35. package/lib/index.js +13 -0
  36. package/lib/package.json +1 -0
  37. package/package.json +58 -0
  38. package/src/Drilldown/DrilldownGroup/index.tsx +64 -0
  39. package/src/Drilldown/DrilldownGroup/props.ts +149 -0
  40. package/src/Drilldown/DrilldownLocator.ts +101 -0
  41. package/src/Drilldown/DrilldownOption/index.tsx +68 -0
  42. package/src/Drilldown/DrilldownOption/props.ts +224 -0
  43. package/src/Drilldown/DrilldownPage/index.tsx +58 -0
  44. package/src/Drilldown/DrilldownPage/props.ts +129 -0
  45. package/src/Drilldown/DrilldownSeparator/index.tsx +60 -0
  46. package/src/Drilldown/DrilldownSeparator/props.ts +65 -0
  47. package/src/Drilldown/README.md +1515 -0
  48. package/src/Drilldown/__examples__/Drilldown.examples.tsx +318 -0
  49. package/src/Drilldown/index.tsx +1492 -0
  50. package/src/Drilldown/locator.ts +28 -0
  51. package/src/Drilldown/props.ts +378 -0
  52. package/src/Drilldown/styles.ts +95 -0
  53. package/src/Drilldown/theme.ts +47 -0
  54. package/src/index.ts +26 -0
  55. package/tsconfig.build.json +30 -0
  56. package/tsconfig.build.tsbuildinfo +1 -0
  57. package/tsconfig.json +4 -0
  58. package/types/Drilldown/DrilldownGroup/index.d.ts +59 -0
  59. package/types/Drilldown/DrilldownGroup/index.d.ts.map +1 -0
  60. package/types/Drilldown/DrilldownGroup/props.d.ts +65 -0
  61. package/types/Drilldown/DrilldownGroup/props.d.ts.map +1 -0
  62. package/types/Drilldown/DrilldownLocator.d.ts +652 -0
  63. package/types/Drilldown/DrilldownLocator.d.ts.map +1 -0
  64. package/types/Drilldown/DrilldownOption/index.d.ts +134 -0
  65. package/types/Drilldown/DrilldownOption/index.d.ts.map +1 -0
  66. package/types/Drilldown/DrilldownOption/props.d.ts +116 -0
  67. package/types/Drilldown/DrilldownOption/props.d.ts.map +1 -0
  68. package/types/Drilldown/DrilldownPage/index.d.ts +45 -0
  69. package/types/Drilldown/DrilldownPage/index.d.ts.map +1 -0
  70. package/types/Drilldown/DrilldownPage/props.d.ts +51 -0
  71. package/types/Drilldown/DrilldownPage/props.d.ts.map +1 -0
  72. package/types/Drilldown/DrilldownSeparator/index.d.ts +27 -0
  73. package/types/Drilldown/DrilldownSeparator/index.d.ts.map +1 -0
  74. package/types/Drilldown/DrilldownSeparator/props.d.ts +18 -0
  75. package/types/Drilldown/DrilldownSeparator/props.d.ts.map +1 -0
  76. package/types/Drilldown/__examples__/Drilldown.examples.d.ts +5 -0
  77. package/types/Drilldown/__examples__/Drilldown.examples.d.ts.map +1 -0
  78. package/types/Drilldown/index.d.ts +246 -0
  79. package/types/Drilldown/index.d.ts.map +1 -0
  80. package/types/Drilldown/locator.d.ts +4 -0
  81. package/types/Drilldown/locator.d.ts.map +1 -0
  82. package/types/Drilldown/props.d.ts +189 -0
  83. package/types/Drilldown/props.d.ts.map +1 -0
  84. package/types/Drilldown/styles.d.ts +15 -0
  85. package/types/Drilldown/styles.d.ts.map +1 -0
  86. package/types/Drilldown/theme.d.ts +10 -0
  87. package/types/Drilldown/theme.d.ts.map +1 -0
  88. package/types/index.d.ts +3 -0
  89. package/types/index.d.ts.map +1 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,36 @@
1
+ # Change Log
2
+
3
+ All notable changes to this project will be documented in this file.
4
+ See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
+
6
+ # [8.21.0](https://github.com/instructure/instructure-ui/compare/v8.20.0...v8.21.0) (2022-03-30)
7
+
8
+ **Note:** Version bump only for package @instructure/ui-drilldown
9
+
10
+ # [8.20.0](https://github.com/instructure/instructure-ui/compare/v8.19.0...v8.20.0) (2022-03-22)
11
+
12
+ **Note:** Version bump only for package @instructure/ui-drilldown
13
+
14
+ # [8.19.0](https://github.com/instructure/instructure-ui/compare/v8.18.0...v8.19.0) (2022-03-16)
15
+
16
+ **Note:** Version bump only for package @instructure/ui-drilldown
17
+
18
+ # [8.18.0](https://github.com/instructure/instructure-ui/compare/v8.17.0...v8.18.0) (2022-02-23)
19
+
20
+ **Note:** Version bump only for package @instructure/ui-drilldown
21
+
22
+ # [8.17.0](https://github.com/instructure/instructure-ui/compare/v8.16.0...v8.17.0) (2022-02-07)
23
+
24
+ ### Bug Fixes
25
+
26
+ - remove type:"commonjs" from package.json files ([0b243be](https://github.com/instructure/instructure-ui/commit/0b243bee389ee14493e6b3dbb30a8b660c295d3d))
27
+
28
+ # [8.16.0](https://github.com/instructure/instructure-ui/compare/v8.15.0...v8.16.0) (2022-02-03)
29
+
30
+ **Note:** Version bump only for package @instructure/ui-drilldown
31
+
32
+ # [8.15.0](https://github.com/instructure/instructure-ui/compare/v8.14.0...v8.15.0) (2022-01-26)
33
+
34
+ **Note:** Version bump only for package @instructure/ui-drilldown
35
+
36
+ See the instructure-ui mono-repo [change log](#CHANGELOG) for past changes.
package/LICENSE.md ADDED
@@ -0,0 +1,27 @@
1
+ ---
2
+ title: The MIT License (MIT)
3
+ category: Getting Started
4
+ order: 9
5
+ ---
6
+
7
+ # The MIT License (MIT)
8
+
9
+ Copyright (c) 2015 Instructure, Inc.
10
+
11
+ **Permission is hereby granted, free of charge, to any person obtaining a copy
12
+ of this software and associated documentation files (the "Software"), to deal
13
+ in the Software without restriction, including without limitation the rights
14
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15
+ copies of the Software, and to permit persons to whom the Software is
16
+ furnished to do so, subject to the following conditions.**
17
+
18
+ The above copyright notice and this permission notice shall be included in all
19
+ copies or substantial portions of the Software.
20
+
21
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
27
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,30 @@
1
+ ---
2
+ category: packages
3
+ ---
4
+
5
+ ## ui-drilldown
6
+
7
+ [![npm][npm]][npm-url] 
8
+ [![MIT License][license-badge]][license] 
9
+ [![Code of Conduct][coc-badge]][coc]
10
+
11
+ A drilldown menu component.
12
+
13
+ ### Components
14
+
15
+ The `ui-drilldown` package contains the following:
16
+
17
+ - [Drilldown](#Drilldown)
18
+
19
+ ### Installation
20
+
21
+ ```sh
22
+ yarn add @instructure/ui-drilldown
23
+ ```
24
+
25
+ [npm]: https://img.shields.io/npm/v/@instructure/ui-drilldown.svg
26
+ [npm-url]: https://npmjs.com/package/@instructure/ui-drilldown
27
+ [license-badge]: https://img.shields.io/npm/l/instructure-ui.svg?style=flat-square
28
+ [license]: https://github.com/instructure/instructure-ui/blob/master/LICENSE
29
+ [coc-badge]: https://img.shields.io/badge/code%20of-conduct-ff69b4.svg?style=flat-square
30
+ [coc]: https://github.com/instructure/instructure-ui/blob/master/CODE_OF_CONDUCT.md
@@ -0,0 +1,56 @@
1
+ var _dec, _class, _class2, _temp;
2
+
3
+ /*
4
+ * The MIT License (MIT)
5
+ *
6
+ * Copyright (c) 2015 - present Instructure, Inc.
7
+ *
8
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
9
+ * of this software and associated documentation files (the "Software"), to deal
10
+ * in the Software without restriction, including without limitation the rights
11
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12
+ * copies of the Software, and to permit persons to whom the Software is
13
+ * furnished to do so, subject to the following conditions:
14
+ *
15
+ * The above copyright notice and this permission notice shall be included in all
16
+ * copies or substantial portions of the Software.
17
+ *
18
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24
+ * SOFTWARE.
25
+ */
26
+
27
+ /** @jsx jsx */
28
+ import { Component } from 'react';
29
+ import { withStyle } from '@instructure/emotion';
30
+ import { optionsThemeGenerator } from '@instructure/ui-options';
31
+ import { propTypes, allowedProps } from './props';
32
+
33
+ /**
34
+ ---
35
+ parent: Drilldown
36
+ id: Drilldown.Group
37
+ ---
38
+ @module DrilldownGroup
39
+ @tsProps
40
+ **/
41
+ // needed for listing the available theme variables on docs page,
42
+ // we pass the themeOverrides to Options
43
+ let DrilldownGroup = (_dec = withStyle(null, optionsThemeGenerator), _dec(_class = (_temp = _class2 = class DrilldownGroup extends Component {
44
+ render() {
45
+ // this component is only used for prop validation.
46
+ // Drilldown.Group is parsed in Drilldown as an Options component.
47
+ return null;
48
+ }
49
+
50
+ }, _class2.displayName = "DrilldownGroup", _class2.componentId = 'Drilldown.Group', _class2.propTypes = propTypes, _class2.allowedProps = allowedProps, _class2.defaultProps = {
51
+ disabled: false,
52
+ withoutSeparators: false,
53
+ role: 'group'
54
+ }, _temp)) || _class);
55
+ export default DrilldownGroup;
56
+ export { DrilldownGroup };
@@ -0,0 +1,42 @@
1
+ /*
2
+ * The MIT License (MIT)
3
+ *
4
+ * Copyright (c) 2015 - present Instructure, Inc.
5
+ *
6
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ * of this software and associated documentation files (the "Software"), to deal
8
+ * in the Software without restriction, including without limitation the rights
9
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ * copies of the Software, and to permit persons to whom the Software is
11
+ * furnished to do so, subject to the following conditions:
12
+ *
13
+ * The above copyright notice and this permission notice shall be included in all
14
+ * copies or substantial portions of the Software.
15
+ *
16
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ * SOFTWARE.
23
+ */
24
+ import PropTypes from 'prop-types';
25
+ import { Children } from '@instructure/ui-prop-types';
26
+ import DrilldownOption from '../DrilldownOption';
27
+ import DrilldownSeparator from '../DrilldownSeparator';
28
+ const propTypes = {
29
+ id: PropTypes.string.isRequired,
30
+ children: Children.oneOf([DrilldownOption, DrilldownSeparator]),
31
+ renderGroupTitle: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
32
+ withoutSeparators: PropTypes.bool,
33
+ disabled: PropTypes.bool,
34
+ role: PropTypes.string,
35
+ as: PropTypes.elementType,
36
+ elementRef: PropTypes.func,
37
+ selectableType: PropTypes.oneOf(['single', 'multiple']),
38
+ defaultSelected: PropTypes.array,
39
+ onSelect: PropTypes.func
40
+ };
41
+ const allowedProps = ['id', 'children', 'renderGroupTitle', 'withoutSeparators', 'disabled', 'role', 'as', 'elementRef', 'selectableType', 'defaultSelected', 'onSelect'];
42
+ export { propTypes, allowedProps };
@@ -0,0 +1,144 @@
1
+ /*
2
+ * The MIT License (MIT)
3
+ *
4
+ * Copyright (c) 2015 - present Instructure, Inc.
5
+ *
6
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ * of this software and associated documentation files (the "Software"), to deal
8
+ * in the Software without restriction, including without limitation the rights
9
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ * copies of the Software, and to permit persons to whom the Software is
11
+ * furnished to do so, subject to the following conditions:
12
+ *
13
+ * The above copyright notice and this permission notice shall be included in all
14
+ * copies or substantial portions of the Software.
15
+ *
16
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ * SOFTWARE.
23
+ */
24
+ import { locator } from '@instructure/ui-test-locator';
25
+ import { find, findAll, parseQueryArguments } from '@instructure/ui-test-utils';
26
+ /* eslint-disable no-restricted-imports */
27
+ // @ts-expect-error bypass no type definition found error
28
+
29
+ import { OptionsItemLocator } from '@instructure/ui-options/es/Options/Item/OptionsItemLocator'; // @ts-expect-error bypass no type definition found error
30
+
31
+ import { PopoverLocator } from '@instructure/ui-popover/es/Popover/PopoverLocator';
32
+ /* eslint-enable no-restricted-imports */
33
+
34
+ import { Drilldown } from './index';
35
+ const customMethods = {
36
+ // return the wrapper Option.Items
37
+ findAllOptions: async function () {
38
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
39
+ args[_key] = arguments[_key];
40
+ }
41
+
42
+ return await findAll('[role^=menuitem]', ...args);
43
+ },
44
+ findAllOptionWrappers: async function () {
45
+ return await OptionsItemLocator.findAll(...arguments);
46
+ },
47
+ findOptionWrapperByOptionId: async function (_element, optionId) {
48
+ for (var _len2 = arguments.length, args = new Array(_len2 > 2 ? _len2 - 2 : 0), _key2 = 2; _key2 < _len2; _key2++) {
49
+ args[_key2 - 2] = arguments[_key2];
50
+ }
51
+
52
+ return OptionsItemLocator.find(`:has(#${optionId})`, ...args);
53
+ },
54
+ findSizableContainer: async function () {
55
+ for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
56
+ args[_key3] = arguments[_key3];
57
+ }
58
+
59
+ return await find('[class$=-drilldown__container]', ...args);
60
+ },
61
+ findSelectableContainer: async function () {
62
+ for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
63
+ args[_key4] = arguments[_key4];
64
+ }
65
+
66
+ return await find('[id^=Selectable_][id$=-list]', ...args);
67
+ },
68
+ findHeaderTitle: async function () {
69
+ for (var _len5 = arguments.length, args = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {
70
+ args[_key5] = arguments[_key5];
71
+ }
72
+
73
+ return await find('[id^=DrilldownHeader-Title]', ...args);
74
+ },
75
+ findHeaderActionOption: async function () {
76
+ for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {
77
+ args[_key6] = arguments[_key6];
78
+ }
79
+
80
+ return await find('[id^=DrilldownHeader-Action]', ...args);
81
+ },
82
+ findHeaderBackOption: async function () {
83
+ for (var _len7 = arguments.length, args = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {
84
+ args[_key7] = arguments[_key7];
85
+ }
86
+
87
+ return await find('[id^=DrilldownHeader-Back]', ...args);
88
+ },
89
+ findHeaderSeparator: async function () {
90
+ for (var _len8 = arguments.length, args = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {
91
+ args[_key8] = arguments[_key8];
92
+ }
93
+
94
+ return await find('[id^=DrilldownHeader-Separator]', ...args);
95
+ },
96
+ findAllSeparators: async function () {
97
+ for (var _len9 = arguments.length, args = new Array(_len9), _key9 = 0; _key9 < _len9; _key9++) {
98
+ args[_key9] = arguments[_key9];
99
+ }
100
+
101
+ return await findAll('[class$=-separator]', ...args);
102
+ },
103
+ findAllGroupLabels: async function () {
104
+ for (var _len10 = arguments.length, args = new Array(_len10), _key10 = 0; _key10 < _len10; _key10++) {
105
+ args[_key10] = arguments[_key10];
106
+ }
107
+
108
+ return await findAll('[class$=-options__label]', ...args);
109
+ },
110
+ findLabelInfo: async function () {
111
+ for (var _len11 = arguments.length, args = new Array(_len11), _key11 = 0; _key11 < _len11; _key11++) {
112
+ args[_key11] = arguments[_key11];
113
+ }
114
+
115
+ return await find('[class$=-drilldown__optionLabelInfo]', ...args);
116
+ },
117
+ findDescription: async function () {
118
+ for (var _len12 = arguments.length, args = new Array(_len12), _key12 = 0; _key12 < _len12; _key12++) {
119
+ args[_key12] = arguments[_key12];
120
+ }
121
+
122
+ return await find('[class$=__description]', ...args);
123
+ },
124
+ findPopoverRoot: function () {
125
+ return PopoverLocator.find(...arguments);
126
+ },
127
+ findPopoverTrigger: function () {
128
+ return PopoverLocator.findTrigger(...arguments);
129
+ },
130
+ findPopoverContent: function () {
131
+ const _parseQueryArguments = parseQueryArguments(...arguments),
132
+ element = _parseQueryArguments.element,
133
+ selector = _parseQueryArguments.selector,
134
+ options = _parseQueryArguments.options;
135
+
136
+ return PopoverLocator.findContent(element, selector, { ...options,
137
+ customMethods: { ...options.customMethods,
138
+ ...customMethods
139
+ }
140
+ });
141
+ }
142
+ }; // @ts-expect-error ts-migrate(2339) FIXME: Property 'selector' does not exist on type 'typeof... Remove this comment to see the full error message
143
+
144
+ export const DrilldownLocator = locator(Drilldown.selector, customMethods);
@@ -0,0 +1,59 @@
1
+ var _dec, _class, _class2, _temp;
2
+
3
+ /*
4
+ * The MIT License (MIT)
5
+ *
6
+ * Copyright (c) 2015 - present Instructure, Inc.
7
+ *
8
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
9
+ * of this software and associated documentation files (the "Software"), to deal
10
+ * in the Software without restriction, including without limitation the rights
11
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12
+ * copies of the Software, and to permit persons to whom the Software is
13
+ * furnished to do so, subject to the following conditions:
14
+ *
15
+ * The above copyright notice and this permission notice shall be included in all
16
+ * copies or substantial portions of the Software.
17
+ *
18
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24
+ * SOFTWARE.
25
+ */
26
+
27
+ /** @jsx jsx */
28
+ import { Component } from 'react';
29
+ import { withStyle } from '@instructure/emotion';
30
+ import { optionsItemThemeGenerator } from '@instructure/ui-options';
31
+ import { propTypes, allowedProps } from './props';
32
+
33
+ /**
34
+ ---
35
+ parent: Drilldown
36
+ id: Drilldown.Option
37
+ ---
38
+ @module DrilldownOption
39
+ @tsProps
40
+ **/
41
+ // needed for listing the available theme variables on docs page,
42
+ // we pass the themeOverrides to Options.Item
43
+ let DrilldownOption = (_dec = withStyle(null, optionsItemThemeGenerator), _dec(_class = (_temp = _class2 = class DrilldownOption extends Component {
44
+ render() {
45
+ // this component is only used for prop validation. Drilldown.Option children
46
+ // are parsed in Drilldown and rendered as Options.Item components
47
+ return null;
48
+ }
49
+
50
+ }, _class2.displayName = "DrilldownOption", _class2.componentId = 'Drilldown.Option', _class2.propTypes = propTypes, _class2.allowedProps = allowedProps, _class2.defaultProps = {
51
+ disabled: false,
52
+ beforeLabelContentVAlign: 'start',
53
+ afterLabelContentVAlign: 'start',
54
+ descriptionRole: 'note',
55
+ as: 'li',
56
+ role: 'menuitem'
57
+ }, _temp)) || _class);
58
+ export default DrilldownOption;
59
+ export { DrilldownOption };
@@ -0,0 +1,46 @@
1
+ /*
2
+ * The MIT License (MIT)
3
+ *
4
+ * Copyright (c) 2015 - present Instructure, Inc.
5
+ *
6
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ * of this software and associated documentation files (the "Software"), to deal
8
+ * in the Software without restriction, including without limitation the rights
9
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ * copies of the Software, and to permit persons to whom the Software is
11
+ * furnished to do so, subject to the following conditions:
12
+ *
13
+ * The above copyright notice and this permission notice shall be included in all
14
+ * copies or substantial portions of the Software.
15
+ *
16
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ * SOFTWARE.
23
+ */
24
+ import PropTypes from 'prop-types';
25
+ const propTypes = {
26
+ id: PropTypes.string.isRequired,
27
+ children: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
28
+ subPageId: PropTypes.string,
29
+ disabled: PropTypes.bool,
30
+ value: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
31
+ href: PropTypes.string,
32
+ as: PropTypes.elementType,
33
+ role: PropTypes.string,
34
+ renderLabelInfo: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
35
+ renderBeforeLabel: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
36
+ renderAfterLabel: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
37
+ beforeLabelContentVAlign: PropTypes.oneOf(['start', 'center', 'end']),
38
+ afterLabelContentVAlign: PropTypes.oneOf(['start', 'center', 'end']),
39
+ description: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
40
+ descriptionRole: PropTypes.string,
41
+ onOptionClick: PropTypes.func,
42
+ defaultSelected: PropTypes.bool,
43
+ elementRef: PropTypes.func
44
+ };
45
+ const allowedProps = ['id', 'children', 'subPageId', 'disabled', 'value', 'href', 'as', 'role', 'renderLabelInfo', 'renderBeforeLabel', 'renderAfterLabel', 'beforeLabelContentVAlign', 'afterLabelContentVAlign', 'description', 'descriptionRole', 'onOptionClick', 'defaultSelected', 'elementRef'];
46
+ export { propTypes, allowedProps };
@@ -0,0 +1,56 @@
1
+ /*
2
+ * The MIT License (MIT)
3
+ *
4
+ * Copyright (c) 2015 - present Instructure, Inc.
5
+ *
6
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ * of this software and associated documentation files (the "Software"), to deal
8
+ * in the Software without restriction, including without limitation the rights
9
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ * copies of the Software, and to permit persons to whom the Software is
11
+ * furnished to do so, subject to the following conditions:
12
+ *
13
+ * The above copyright notice and this permission notice shall be included in all
14
+ * copies or substantial portions of the Software.
15
+ *
16
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ * SOFTWARE.
23
+ */
24
+
25
+ /** @jsx jsx */
26
+ import { Component } from 'react';
27
+ import { propTypes, allowedProps } from './props';
28
+
29
+ /**
30
+ ---
31
+ parent: Drilldown
32
+ id: Drilldown.Page
33
+ ---
34
+ @module DrilldownPage
35
+ @tsProps
36
+ **/
37
+ class DrilldownPage extends Component {
38
+ render() {
39
+ // this component is only used for prop validation.
40
+ // Drilldown.Page children are parsed in Drilldown.
41
+ return null;
42
+ }
43
+
44
+ }
45
+
46
+ DrilldownPage.displayName = "DrilldownPage";
47
+ DrilldownPage.componentId = 'Drilldown.Page';
48
+ DrilldownPage.propTypes = propTypes;
49
+ DrilldownPage.allowedProps = allowedProps;
50
+ DrilldownPage.defaultProps = {
51
+ renderBackButtonLabel: 'Back',
52
+ disabled: false,
53
+ withoutHeaderSeparator: false
54
+ };
55
+ export default DrilldownPage;
56
+ export { DrilldownPage };
@@ -0,0 +1,41 @@
1
+ /*
2
+ * The MIT License (MIT)
3
+ *
4
+ * Copyright (c) 2015 - present Instructure, Inc.
5
+ *
6
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ * of this software and associated documentation files (the "Software"), to deal
8
+ * in the Software without restriction, including without limitation the rights
9
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ * copies of the Software, and to permit persons to whom the Software is
11
+ * furnished to do so, subject to the following conditions:
12
+ *
13
+ * The above copyright notice and this permission notice shall be included in all
14
+ * copies or substantial portions of the Software.
15
+ *
16
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ * SOFTWARE.
23
+ */
24
+ import PropTypes from 'prop-types';
25
+ import { Children } from '@instructure/ui-prop-types';
26
+ import DrilldownGroup from '../DrilldownGroup';
27
+ import DrilldownOption from '../DrilldownOption';
28
+ import DrilldownSeparator from '../DrilldownSeparator';
29
+ const propTypes = {
30
+ id: PropTypes.string.isRequired,
31
+ children: Children.oneOf([DrilldownOption, DrilldownSeparator, DrilldownGroup]),
32
+ renderTitle: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
33
+ renderActionLabel: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
34
+ renderBackButtonLabel: PropTypes.oneOfType([PropTypes.node, PropTypes.func]),
35
+ onHeaderActionClicked: PropTypes.func,
36
+ onBackButtonClicked: PropTypes.func,
37
+ withoutHeaderSeparator: PropTypes.bool,
38
+ disabled: PropTypes.bool
39
+ };
40
+ const allowedProps = ['id', 'children', 'renderTitle', 'renderActionLabel', 'renderBackButtonLabel', 'onHeaderActionClicked', 'onBackButtonClicked', 'withoutHeaderSeparator', 'disabled'];
41
+ export { propTypes, allowedProps };
@@ -0,0 +1,52 @@
1
+ var _dec, _class, _class2, _temp;
2
+
3
+ /*
4
+ * The MIT License (MIT)
5
+ *
6
+ * Copyright (c) 2015 - present Instructure, Inc.
7
+ *
8
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
9
+ * of this software and associated documentation files (the "Software"), to deal
10
+ * in the Software without restriction, including without limitation the rights
11
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12
+ * copies of the Software, and to permit persons to whom the Software is
13
+ * furnished to do so, subject to the following conditions:
14
+ *
15
+ * The above copyright notice and this permission notice shall be included in all
16
+ * copies or substantial portions of the Software.
17
+ *
18
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24
+ * SOFTWARE.
25
+ */
26
+
27
+ /** @jsx jsx */
28
+ import { Component } from 'react';
29
+ import { withStyle } from '@instructure/emotion';
30
+ import { optionsSeparatorThemeGenerator } from '@instructure/ui-options';
31
+ import { propTypes, allowedProps } from './props';
32
+
33
+ /**
34
+ ---
35
+ parent: Drilldown
36
+ id: Drilldown.Separator
37
+ ---
38
+ @module DrilldownSeparator
39
+ @tsProps
40
+ **/
41
+ // needed for listing the available theme variables on docs page,
42
+ // we pass the themeOverrides to Options.Separator
43
+ let DrilldownSeparator = (_dec = withStyle(null, optionsSeparatorThemeGenerator), _dec(_class = (_temp = _class2 = class DrilldownSeparator extends Component {
44
+ render() {
45
+ // this component is only used for prop validation. Drilldown.Separator children
46
+ // are parsed in Drilldown and rendered as Options.Separator components
47
+ return null;
48
+ }
49
+
50
+ }, _class2.displayName = "DrilldownSeparator", _class2.componentId = 'Drilldown.Separator', _class2.propTypes = propTypes, _class2.allowedProps = allowedProps, _class2.defaultProps = {}, _temp)) || _class);
51
+ export default DrilldownSeparator;
52
+ export { DrilldownSeparator };
@@ -0,0 +1,30 @@
1
+ /*
2
+ * The MIT License (MIT)
3
+ *
4
+ * Copyright (c) 2015 - present Instructure, Inc.
5
+ *
6
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ * of this software and associated documentation files (the "Software"), to deal
8
+ * in the Software without restriction, including without limitation the rights
9
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ * copies of the Software, and to permit persons to whom the Software is
11
+ * furnished to do so, subject to the following conditions:
12
+ *
13
+ * The above copyright notice and this permission notice shall be included in all
14
+ * copies or substantial portions of the Software.
15
+ *
16
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ * SOFTWARE.
23
+ */
24
+ import PropTypes from 'prop-types';
25
+ const propTypes = {
26
+ id: PropTypes.string.isRequired,
27
+ as: PropTypes.elementType
28
+ };
29
+ const allowedProps = ['id', 'as'];
30
+ export { propTypes, allowedProps };