@instructure/ui-select 11.7.3 → 11.7.4-pr-snapshot-1781695314229

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 (54) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/LICENSE.md +1 -0
  3. package/{lib/Select/v2/Group/props.js → babel.config.cjs} +12 -7
  4. package/es/Select/v1/Group/index.js +3 -2
  5. package/es/Select/v1/Option/index.js +3 -2
  6. package/es/Select/v1/index.js +6 -6
  7. package/es/Select/v2/Group/index.js +3 -2
  8. package/es/Select/v2/Option/index.js +3 -2
  9. package/es/Select/v2/index.js +5 -5
  10. package/es/exports/a.js +4 -3
  11. package/es/exports/b.js +4 -3
  12. package/package.json +21 -26
  13. package/src/Select/v1/Group/index.tsx +2 -1
  14. package/src/Select/v1/Option/index.tsx +2 -1
  15. package/src/Select/v1/index.tsx +6 -5
  16. package/src/Select/v2/Group/index.tsx +2 -1
  17. package/src/Select/v2/Option/index.tsx +2 -1
  18. package/src/Select/v2/index.tsx +5 -4
  19. package/src/exports/a.ts +3 -3
  20. package/src/exports/b.ts +3 -3
  21. package/tsconfig.build.tsbuildinfo +1 -1
  22. package/types/Select/v1/Group/index.d.ts +1 -0
  23. package/types/Select/v1/Group/index.d.ts.map +1 -1
  24. package/types/Select/v1/Option/index.d.ts +1 -0
  25. package/types/Select/v1/Option/index.d.ts.map +1 -1
  26. package/types/Select/v1/index.d.ts +3 -2
  27. package/types/Select/v1/index.d.ts.map +1 -1
  28. package/types/Select/v2/Group/index.d.ts +1 -0
  29. package/types/Select/v2/Group/index.d.ts.map +1 -1
  30. package/types/Select/v2/Option/index.d.ts +1 -0
  31. package/types/Select/v2/Option/index.d.ts.map +1 -1
  32. package/types/Select/v2/index.d.ts +3 -2
  33. package/types/Select/v2/index.d.ts.map +1 -1
  34. package/types/exports/a.d.ts +3 -3
  35. package/types/exports/a.d.ts.map +1 -1
  36. package/types/exports/b.d.ts +3 -3
  37. package/types/exports/b.d.ts.map +1 -1
  38. package/lib/Select/v1/Group/index.js +0 -54
  39. package/lib/Select/v1/Group/props.js +0 -31
  40. package/lib/Select/v1/Option/index.js +0 -58
  41. package/lib/Select/v1/Option/props.js +0 -31
  42. package/lib/Select/v1/index.js +0 -711
  43. package/lib/Select/v1/props.js +0 -40
  44. package/lib/Select/v1/styles.js +0 -72
  45. package/lib/Select/v1/theme.js +0 -56
  46. package/lib/Select/v2/Group/index.js +0 -54
  47. package/lib/Select/v2/Option/index.js +0 -58
  48. package/lib/Select/v2/Option/props.js +0 -31
  49. package/lib/Select/v2/index.js +0 -721
  50. package/lib/Select/v2/props.js +0 -40
  51. package/lib/Select/v2/styles.js +0 -46
  52. package/lib/exports/a.js +0 -26
  53. package/lib/exports/b.js +0 -26
  54. package/lib/package.json +0 -1
@@ -1,40 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.allowedProps = void 0;
7
- /*
8
- * The MIT License (MIT)
9
- *
10
- * Copyright (c) 2015 - present Instructure, Inc.
11
- *
12
- * Permission is hereby granted, free of charge, to any person obtaining a copy
13
- * of this software and associated documentation files (the "Software"), to deal
14
- * in the Software without restriction, including without limitation the rights
15
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
16
- * copies of the Software, and to permit persons to whom the Software is
17
- * furnished to do so, subject to the following conditions:
18
- *
19
- * The above copyright notice and this permission notice shall be included in all
20
- * copies or substantial portions of the Software.
21
- *
22
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
25
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
27
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
28
- * SOFTWARE.
29
- */
30
-
31
- // These props are directly passed to Selectable
32
- // TODO: import these from Selectable once TS types can be imported
33
-
34
- // These props are directly passed to TextInput
35
- // TODO: import these from TextInput once TS types can be imported
36
-
37
- // These props are directly passed to Popover
38
- // TODO: import these from Popover once TS types can be imported
39
-
40
- const allowedProps = exports.allowedProps = ['renderLabel', 'inputValue', 'isShowingOptions', 'id', 'size', 'assistiveText', 'placeholder', 'interaction', 'isRequired', 'isInline', 'width', 'htmlSize', 'visibleOptionsCount', 'isOptionContentAppliedToInput', 'optionsMaxHeight', 'optionsMaxWidth', 'messages', 'placement', 'constrain', 'mountNode', 'onFocus', 'onBlur', 'onInputChange', 'onRequestShowOptions', 'onRequestHideOptions', 'onRequestHighlightOption', 'onRequestSelectOption', 'inputRef', 'listRef', 'renderBeforeInput', 'renderAfterInput', 'children', 'shouldNotWrap', 'scrollToHighlightedOption', 'layout'];
@@ -1,72 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- /*
8
- * The MIT License (MIT)
9
- *
10
- * Copyright (c) 2015 - present Instructure, Inc.
11
- *
12
- * Permission is hereby granted, free of charge, to any person obtaining a copy
13
- * of this software and associated documentation files (the "Software"), to deal
14
- * in the Software without restriction, including without limitation the rights
15
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
16
- * copies of the Software, and to permit persons to whom the Software is
17
- * furnished to do so, subject to the following conditions:
18
- *
19
- * The above copyright notice and this permission notice shall be included in all
20
- * copies or substantial portions of the Software.
21
- *
22
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
25
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
27
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
28
- * SOFTWARE.
29
- */
30
-
31
- /**
32
- * Generates the style object from the theme and provided additional information
33
- * @param {Object} componentTheme The theme variable object.
34
- * @param {Object} props the props of the component, the style is applied to
35
- * @param {Object} state the state of the component, the style is applied to
36
- * @return {Object} The final style object, which will be used in the component
37
- */
38
- const generateStyle = (componentTheme, props) => {
39
- const {
40
- size
41
- } = props;
42
- const iconSizeVariants = {
43
- small: {
44
- fontSize: componentTheme.smallIconSize
45
- },
46
- medium: {
47
- fontSize: componentTheme.mediumIconSize
48
- },
49
- large: {
50
- fontSize: componentTheme.largeIconSize
51
- }
52
- };
53
- return {
54
- select: {
55
- label: 'select',
56
- fontSize: componentTheme.fontSize,
57
- fontFamily: componentTheme.fontFamily,
58
- fontWeight: componentTheme.fontWeight,
59
- color: componentTheme.color
60
- },
61
- icon: {
62
- label: 'select__icon',
63
- ...iconSizeVariants[size]
64
- },
65
- assistiveText: {
66
- label: 'select__assistiveText',
67
- display: 'none'
68
- },
69
- popoverBorderWidth: componentTheme.popoverBorderWidth
70
- };
71
- };
72
- var _default = exports.default = generateStyle;
@@ -1,56 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- /*
8
- * The MIT License (MIT)
9
- *
10
- * Copyright (c) 2015 - present Instructure, Inc.
11
- *
12
- * Permission is hereby granted, free of charge, to any person obtaining a copy
13
- * of this software and associated documentation files (the "Software"), to deal
14
- * in the Software without restriction, including without limitation the rights
15
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
16
- * copies of the Software, and to permit persons to whom the Software is
17
- * furnished to do so, subject to the following conditions:
18
- *
19
- * The above copyright notice and this permission notice shall be included in all
20
- * copies or substantial portions of the Software.
21
- *
22
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
25
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
27
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
28
- * SOFTWARE.
29
- */
30
-
31
- /**
32
- * Generates the theme object for the component from the theme and provided additional information
33
- * @param {Object} theme The actual theme object.
34
- * @return {Object} The final theme object with the overrides and component variables
35
- */
36
- const generateComponentTheme = theme => {
37
- const {
38
- colors,
39
- typography
40
- } = theme;
41
- const componentVariables = {
42
- fontSize: typography?.fontSizeMedium,
43
- fontFamily: typography?.fontFamily,
44
- fontWeight: typography?.fontWeightNormal,
45
- smallIconSize: typography?.fontSizeXSmall,
46
- mediumIconSize: typography?.fontSizeSmall,
47
- largeIconSize: typography?.fontSizeMedium,
48
- color: colors?.contrasts?.grey125125,
49
- background: colors?.contrasts?.white1010,
50
- popoverBorderWidth: 'small'
51
- };
52
- return {
53
- ...componentVariables
54
- };
55
- };
56
- var _default = exports.default = generateComponentTheme;
@@ -1,54 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = exports.Group = void 0;
7
- var _react = require("react");
8
- var _props = require("./props");
9
- /*
10
- * The MIT License (MIT)
11
- *
12
- * Copyright (c) 2015 - present Instructure, Inc.
13
- *
14
- * Permission is hereby granted, free of charge, to any person obtaining a copy
15
- * of this software and associated documentation files (the "Software"), to deal
16
- * in the Software without restriction, including without limitation the rights
17
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
18
- * copies of the Software, and to permit persons to whom the Software is
19
- * furnished to do so, subject to the following conditions:
20
- *
21
- * The above copyright notice and this permission notice shall be included in all
22
- * copies or substantial portions of the Software.
23
- *
24
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
25
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
26
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
27
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
28
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
29
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
30
- * SOFTWARE.
31
- */
32
-
33
- /**
34
- ---
35
- parent: Select
36
- id: Select.Group
37
- ---
38
- @module Group
39
- **/
40
- class Group extends _react.Component {
41
- static displayName = "Group";
42
- static componentId = 'Select.Group';
43
- static allowedProps = _props.allowedProps;
44
- static defaultProps = {};
45
-
46
- /* istanbul ignore next */
47
- render() {
48
- // this component is only used for prop validation. Select.Group children
49
- // are parsed in Select and rendered as Options components
50
- return null;
51
- }
52
- }
53
- exports.Group = Group;
54
- var _default = exports.default = Group;
@@ -1,58 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = exports.Option = void 0;
7
- var _react = require("react");
8
- var _props = require("./props");
9
- /*
10
- * The MIT License (MIT)
11
- *
12
- * Copyright (c) 2015 - present Instructure, Inc.
13
- *
14
- * Permission is hereby granted, free of charge, to any person obtaining a copy
15
- * of this software and associated documentation files (the "Software"), to deal
16
- * in the Software without restriction, including without limitation the rights
17
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
18
- * copies of the Software, and to permit persons to whom the Software is
19
- * furnished to do so, subject to the following conditions:
20
- *
21
- * The above copyright notice and this permission notice shall be included in all
22
- * copies or substantial portions of the Software.
23
- *
24
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
25
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
26
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
27
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
28
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
29
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
30
- * SOFTWARE.
31
- */
32
-
33
- /**
34
- ---
35
- parent: Select
36
- id: Select.Option
37
- ---
38
- @module Option
39
- **/
40
- class Option extends _react.Component {
41
- static displayName = "Option";
42
- static componentId = 'Select.Option';
43
- static allowedProps = _props.allowedProps;
44
- static defaultProps = {
45
- isHighlighted: false,
46
- isSelected: false,
47
- isDisabled: false
48
- };
49
-
50
- /* istanbul ignore next */
51
- render() {
52
- // this component is only used for prop validation. Select.Option children
53
- // are parsed in Select and rendered as Options.Item components
54
- return null;
55
- }
56
- }
57
- exports.Option = Option;
58
- var _default = exports.default = Option;
@@ -1,31 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.allowedProps = void 0;
7
- /*
8
- * The MIT License (MIT)
9
- *
10
- * Copyright (c) 2015 - present Instructure, Inc.
11
- *
12
- * Permission is hereby granted, free of charge, to any person obtaining a copy
13
- * of this software and associated documentation files (the "Software"), to deal
14
- * in the Software without restriction, including without limitation the rights
15
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
16
- * copies of the Software, and to permit persons to whom the Software is
17
- * furnished to do so, subject to the following conditions:
18
- *
19
- * The above copyright notice and this permission notice shall be included in all
20
- * copies or substantial portions of the Software.
21
- *
22
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
25
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
27
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
28
- * SOFTWARE.
29
- */
30
-
31
- const allowedProps = exports.allowedProps = ['id', 'isHighlighted', 'isSelected', 'isDisabled', 'renderBeforeLabel', 'renderAfterLabel', 'children'];