@instructure/ui-options 10.20.2-snapshot-5 → 10.20.2-snapshot-7

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.
@@ -1,67 +0,0 @@
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
- import { IconCheckSolid, IconArrowOpenEndSolid } from '@instructure/ui-icons';
26
- export default {
27
- maxExamplesPerPage: 50,
28
- propValues: {
29
- renderAfterLabel: [null, IconArrowOpenEndSolid],
30
- renderBeforeLabel: [null, IconCheckSolid],
31
- href: [void 0, '/hello'],
32
- description: [null, 'Curabitur fringilla, urna ut efficitur molestie, nibh lacus tincidunt elit, ut tempor ipsum nunc sit amet massa. Integer sit amet ante vitae lectus gravida pulvinar.']
33
- },
34
- getComponentProps: props => {
35
- return {
36
- renderAfterLabel: props.renderAfterLabel,
37
- renderBeforeLabel: props.renderBeforeLabel,
38
- children: 'Lorem ipsum dolor sit amet',
39
- role: 'none',
40
- descriptionRole: 'note'
41
- };
42
- },
43
- getExampleProps: () => {
44
- return {
45
- width: '400px'
46
- };
47
- },
48
- filter: props => {
49
- if (props.description) {
50
- if (props.beforeLabelContentVAlign !== 'center' && (!props.renderBeforeLabel || props.renderAfterLabel)) {
51
- return true;
52
- }
53
- if (props.afterLabelContentVAlign !== 'center' && (!props.renderAfterLabel || props.renderBeforeLabel)) {
54
- return true;
55
- }
56
- }
57
- if (!props.description) {
58
- if (props.afterLabelContentVAlign !== 'center' || props.beforeLabelContentVAlign !== 'center') {
59
- return true;
60
- }
61
- }
62
- if (props.href && (props.beforeLabelContentVAlign !== 'center' || props.afterLabelContentVAlign !== 'center' || props.description)) {
63
- return true;
64
- }
65
- return false;
66
- }
67
- };
@@ -1,73 +0,0 @@
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
- import { IconCheckSolid, IconArrowOpenEndSolid } from '@instructure/ui-icons';
26
- import { Options } from '../index';
27
- import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
28
- export default {
29
- maxExamplesPerPage: 50,
30
- propValues: {
31
- children: [[_jsx(Options.Item, {
32
- children: "Option one"
33
- }, "option-1"), _jsx(Options.Item, {
34
- variant: "highlighted",
35
- children: "Option two"
36
- }, "option-2"), _jsx(Options.Item, {
37
- variant: "selected",
38
- children: "Option three"
39
- }, "option-3"), _jsx(Options.Item, {
40
- variant: "disabled",
41
- children: "Option four"
42
- }, "option-4")], [_jsx(Options.Item, {
43
- variant: "highlighted",
44
- renderAfterLabel: IconArrowOpenEndSolid,
45
- children: "Flyout menu option"
46
- }, "option-1"), _jsx(Options.Item, {
47
- children: "Option one"
48
- }, "option-2"), _jsx(Options.Separator, {}, "sep-1"), _jsxs(Options, {
49
- renderLabel: 'Sub list',
50
- children: [_jsx(Options.Item, {
51
- variant: "selected",
52
- children: "Sub option one"
53
- }), _jsx(Options.Item, {
54
- children: "Sub option two"
55
- })]
56
- }, "sub-list"), _jsx(Options.Separator, {}, "sep-2"), _jsxs(Options, {
57
- renderLabel: 'Icon List',
58
- children: [_jsx(Options.Item, {
59
- renderBeforeLabel: IconCheckSolid,
60
- children: "Icon option one"
61
- }), _jsx(Options.Item, {
62
- renderBeforeLabel: _jsx(IconCheckSolid, {
63
- style: {
64
- opacity: 0
65
- }
66
- }),
67
- children: "Icon option two"
68
- })]
69
- }, "icon-list"), _jsx(Options.Separator, {}, "sep-3"), _jsx(Options.Item, {
70
- children: "Option two"
71
- }, "option-3")]]
72
- }
73
- };
@@ -1,72 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- var _uiIcons = require("@instructure/ui-icons");
8
- /*
9
- * The MIT License (MIT)
10
- *
11
- * Copyright (c) 2015 - present Instructure, Inc.
12
- *
13
- * Permission is hereby granted, free of charge, to any person obtaining a copy
14
- * of this software and associated documentation files (the "Software"), to deal
15
- * in the Software without restriction, including without limitation the rights
16
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
17
- * copies of the Software, and to permit persons to whom the Software is
18
- * furnished to do so, subject to the following conditions:
19
- *
20
- * The above copyright notice and this permission notice shall be included in all
21
- * copies or substantial portions of the Software.
22
- *
23
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
24
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
26
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
28
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
29
- * SOFTWARE.
30
- */
31
- var _default = exports.default = {
32
- maxExamplesPerPage: 50,
33
- propValues: {
34
- renderAfterLabel: [null, _uiIcons.IconArrowOpenEndSolid],
35
- renderBeforeLabel: [null, _uiIcons.IconCheckSolid],
36
- href: [void 0, '/hello'],
37
- description: [null, 'Curabitur fringilla, urna ut efficitur molestie, nibh lacus tincidunt elit, ut tempor ipsum nunc sit amet massa. Integer sit amet ante vitae lectus gravida pulvinar.']
38
- },
39
- getComponentProps: props => {
40
- return {
41
- renderAfterLabel: props.renderAfterLabel,
42
- renderBeforeLabel: props.renderBeforeLabel,
43
- children: 'Lorem ipsum dolor sit amet',
44
- role: 'none',
45
- descriptionRole: 'note'
46
- };
47
- },
48
- getExampleProps: () => {
49
- return {
50
- width: '400px'
51
- };
52
- },
53
- filter: props => {
54
- if (props.description) {
55
- if (props.beforeLabelContentVAlign !== 'center' && (!props.renderBeforeLabel || props.renderAfterLabel)) {
56
- return true;
57
- }
58
- if (props.afterLabelContentVAlign !== 'center' && (!props.renderAfterLabel || props.renderBeforeLabel)) {
59
- return true;
60
- }
61
- }
62
- if (!props.description) {
63
- if (props.afterLabelContentVAlign !== 'center' || props.beforeLabelContentVAlign !== 'center') {
64
- return true;
65
- }
66
- }
67
- if (props.href && (props.beforeLabelContentVAlign !== 'center' || props.afterLabelContentVAlign !== 'center' || props.description)) {
68
- return true;
69
- }
70
- return false;
71
- }
72
- };
@@ -1,78 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- var _uiIcons = require("@instructure/ui-icons");
8
- var _index = require("../index");
9
- var _jsxRuntime = require("@emotion/react/jsx-runtime");
10
- /*
11
- * The MIT License (MIT)
12
- *
13
- * Copyright (c) 2015 - present Instructure, Inc.
14
- *
15
- * Permission is hereby granted, free of charge, to any person obtaining a copy
16
- * of this software and associated documentation files (the "Software"), to deal
17
- * in the Software without restriction, including without limitation the rights
18
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
19
- * copies of the Software, and to permit persons to whom the Software is
20
- * furnished to do so, subject to the following conditions:
21
- *
22
- * The above copyright notice and this permission notice shall be included in all
23
- * copies or substantial portions of the Software.
24
- *
25
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
26
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
27
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
28
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
29
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
30
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
31
- * SOFTWARE.
32
- */
33
- var _default = exports.default = {
34
- maxExamplesPerPage: 50,
35
- propValues: {
36
- children: [[(0, _jsxRuntime.jsx)(_index.Options.Item, {
37
- children: "Option one"
38
- }, "option-1"), (0, _jsxRuntime.jsx)(_index.Options.Item, {
39
- variant: "highlighted",
40
- children: "Option two"
41
- }, "option-2"), (0, _jsxRuntime.jsx)(_index.Options.Item, {
42
- variant: "selected",
43
- children: "Option three"
44
- }, "option-3"), (0, _jsxRuntime.jsx)(_index.Options.Item, {
45
- variant: "disabled",
46
- children: "Option four"
47
- }, "option-4")], [(0, _jsxRuntime.jsx)(_index.Options.Item, {
48
- variant: "highlighted",
49
- renderAfterLabel: _uiIcons.IconArrowOpenEndSolid,
50
- children: "Flyout menu option"
51
- }, "option-1"), (0, _jsxRuntime.jsx)(_index.Options.Item, {
52
- children: "Option one"
53
- }, "option-2"), (0, _jsxRuntime.jsx)(_index.Options.Separator, {}, "sep-1"), (0, _jsxRuntime.jsxs)(_index.Options, {
54
- renderLabel: 'Sub list',
55
- children: [(0, _jsxRuntime.jsx)(_index.Options.Item, {
56
- variant: "selected",
57
- children: "Sub option one"
58
- }), (0, _jsxRuntime.jsx)(_index.Options.Item, {
59
- children: "Sub option two"
60
- })]
61
- }, "sub-list"), (0, _jsxRuntime.jsx)(_index.Options.Separator, {}, "sep-2"), (0, _jsxRuntime.jsxs)(_index.Options, {
62
- renderLabel: 'Icon List',
63
- children: [(0, _jsxRuntime.jsx)(_index.Options.Item, {
64
- renderBeforeLabel: _uiIcons.IconCheckSolid,
65
- children: "Icon option one"
66
- }), (0, _jsxRuntime.jsx)(_index.Options.Item, {
67
- renderBeforeLabel: (0, _jsxRuntime.jsx)(_uiIcons.IconCheckSolid, {
68
- style: {
69
- opacity: 0
70
- }
71
- }),
72
- children: "Icon option two"
73
- })]
74
- }, "icon-list"), (0, _jsxRuntime.jsx)(_index.Options.Separator, {}, "sep-3"), (0, _jsxRuntime.jsx)(_index.Options.Item, {
75
- children: "Option two"
76
- }, "option-3")]]
77
- }
78
- };
@@ -1,91 +0,0 @@
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
- import { IconCheckSolid, IconArrowOpenEndSolid } from '@instructure/ui-icons'
26
- import type { StoryConfig } from '@instructure/ui-test-utils'
27
- import type { OptionsItemProps } from '../props'
28
-
29
- export default {
30
- maxExamplesPerPage: 50,
31
- propValues: {
32
- renderAfterLabel: [null, IconArrowOpenEndSolid],
33
- renderBeforeLabel: [null, IconCheckSolid],
34
- href: [undefined, '/hello'],
35
- description: [
36
- null,
37
- 'Curabitur fringilla, urna ut efficitur molestie, nibh lacus tincidunt elit, ut tempor ipsum nunc sit amet massa. Integer sit amet ante vitae lectus gravida pulvinar.'
38
- ]
39
- },
40
- getComponentProps: (props) => {
41
- return {
42
- renderAfterLabel: props.renderAfterLabel,
43
- renderBeforeLabel: props.renderBeforeLabel,
44
- children: 'Lorem ipsum dolor sit amet',
45
- role: 'none',
46
- descriptionRole: 'note'
47
- }
48
- },
49
- getExampleProps: () => {
50
- return {
51
- width: '400px'
52
- }
53
- },
54
- filter: (props) => {
55
- if (props.description) {
56
- if (
57
- props.beforeLabelContentVAlign !== 'center' &&
58
- (!props.renderBeforeLabel || props.renderAfterLabel)
59
- ) {
60
- return true
61
- }
62
-
63
- if (
64
- props.afterLabelContentVAlign !== 'center' &&
65
- (!props.renderAfterLabel || props.renderBeforeLabel)
66
- ) {
67
- return true
68
- }
69
- }
70
-
71
- if (!props.description) {
72
- if (
73
- props.afterLabelContentVAlign !== 'center' ||
74
- props.beforeLabelContentVAlign !== 'center'
75
- ) {
76
- return true
77
- }
78
- }
79
-
80
- if (
81
- props.href &&
82
- (props.beforeLabelContentVAlign !== 'center' ||
83
- props.afterLabelContentVAlign !== 'center' ||
84
- props.description)
85
- ) {
86
- return true
87
- }
88
-
89
- return false
90
- }
91
- } as StoryConfig<OptionsItemProps>
@@ -1,77 +0,0 @@
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
- import { IconCheckSolid, IconArrowOpenEndSolid } from '@instructure/ui-icons'
26
- import { Options } from '../index'
27
-
28
- import type { StoryConfig } from '@instructure/ui-test-utils'
29
- import type { OptionsProps } from '../props'
30
-
31
- export default {
32
- maxExamplesPerPage: 50,
33
- propValues: {
34
- children: [
35
- [
36
- <Options.Item key="option-1">Option one</Options.Item>,
37
- <Options.Item key="option-2" variant="highlighted">
38
- Option two
39
- </Options.Item>,
40
- <Options.Item key="option-3" variant="selected">
41
- Option three
42
- </Options.Item>,
43
- <Options.Item key="option-4" variant="disabled">
44
- Option four
45
- </Options.Item>
46
- ],
47
- [
48
- <Options.Item
49
- key="option-1"
50
- variant="highlighted"
51
- renderAfterLabel={IconArrowOpenEndSolid}
52
- >
53
- Flyout menu option
54
- </Options.Item>,
55
- <Options.Item key="option-2">Option one</Options.Item>,
56
- <Options.Separator key="sep-1" />,
57
- <Options key="sub-list" renderLabel={'Sub list'}>
58
- <Options.Item variant="selected">Sub option one</Options.Item>
59
- <Options.Item>Sub option two</Options.Item>
60
- </Options>,
61
- <Options.Separator key="sep-2" />,
62
- <Options key="icon-list" renderLabel={'Icon List'}>
63
- <Options.Item renderBeforeLabel={IconCheckSolid}>
64
- Icon option one
65
- </Options.Item>
66
- <Options.Item
67
- renderBeforeLabel={<IconCheckSolid style={{ opacity: 0 }} />}
68
- >
69
- Icon option two
70
- </Options.Item>
71
- </Options>,
72
- <Options.Separator key="sep-3" />,
73
- <Options.Item key="option-3">Option two</Options.Item>
74
- ]
75
- ]
76
- }
77
- } as StoryConfig<OptionsProps>
@@ -1,5 +0,0 @@
1
- import type { StoryConfig } from '@instructure/ui-test-utils';
2
- import type { OptionsItemProps } from '../props';
3
- declare const _default: StoryConfig<OptionsItemProps>;
4
- export default _default;
5
- //# sourceMappingURL=Item.examples.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Item.examples.d.ts","sourceRoot":"","sources":["../../../../src/Options/Item/__examples__/Item.examples.ts"],"names":[],"mappings":"AAyBA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AAC7D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAA;wBAgE3C,WAAW,CAAC,gBAAgB,CAAC;AA9DlC,wBA8DkC"}
@@ -1,5 +0,0 @@
1
- import type { StoryConfig } from '@instructure/ui-test-utils';
2
- import type { OptionsProps } from '../props';
3
- declare const _default: StoryConfig<OptionsProps>;
4
- export default _default;
5
- //# sourceMappingURL=Options.examples.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Options.examples.d.ts","sourceRoot":"","sources":["../../../src/Options/__examples__/Options.examples.tsx"],"names":[],"mappings":"AA2BA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AAC7D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;wBAgDvC,WAAW,CAAC,YAAY,CAAC;AA9C9B,wBA8C8B"}