@instructure/ui-options 8.20.0 → 8.20.1-snapshot.19

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/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.
@@ -21,18 +21,16 @@
21
21
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
22
  * SOFTWARE.
23
23
  */
24
- const optionsThemeKeys = ['labelFontWeight', 'background', 'labelColor', 'labelPadding', 'nestedLabelPadding'];
24
+
25
25
  /**
26
26
  * Generates the theme object for the component from the theme and provided additional information
27
27
  * @param {Object} theme The actual theme object.
28
28
  * @return {Object} The final theme object with the overrides and component variables
29
29
  */
30
-
31
30
  const generateComponentTheme = theme => {
32
31
  const colors = theme.colors,
33
32
  typography = theme.typography,
34
- spacing = theme.spacing; // TODO: if updated, update optionsThemeKeys array too
35
-
33
+ spacing = theme.spacing;
36
34
  const componentVariables = {
37
35
  labelFontWeight: typography === null || typography === void 0 ? void 0 : typography.fontWeightBold,
38
36
  background: colors === null || colors === void 0 ? void 0 : colors.backgroundLightest,
@@ -44,5 +42,5 @@ const generateComponentTheme = theme => {
44
42
  };
45
43
  };
46
44
 
47
- export { generateComponentTheme as optionsThemeGenerator, optionsThemeKeys };
45
+ export { generateComponentTheme as optionsThemeGenerator };
48
46
  export default generateComponentTheme;
package/es/index.js CHANGED
@@ -22,6 +22,6 @@
22
22
  * SOFTWARE.
23
23
  */
24
24
  export { Options } from './Options';
25
- export { optionsThemeGenerator, optionsThemeKeys } from './Options/theme';
25
+ export { optionsThemeGenerator } from './Options/theme';
26
26
  export { optionsItemThemeGenerator } from './Options/Item/theme';
27
27
  export { optionsSeparatorThemeGenerator } from './Options/Separator/theme';
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.optionsThemeKeys = exports.optionsThemeGenerator = exports.default = void 0;
6
+ exports.optionsThemeGenerator = exports.default = void 0;
7
7
 
8
8
  /*
9
9
  * The MIT License (MIT)
@@ -28,20 +28,16 @@ exports.optionsThemeKeys = exports.optionsThemeGenerator = exports.default = voi
28
28
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
29
29
  * SOFTWARE.
30
30
  */
31
- const optionsThemeKeys = ['labelFontWeight', 'background', 'labelColor', 'labelPadding', 'nestedLabelPadding'];
31
+
32
32
  /**
33
33
  * Generates the theme object for the component from the theme and provided additional information
34
34
  * @param {Object} theme The actual theme object.
35
35
  * @return {Object} The final theme object with the overrides and component variables
36
36
  */
37
-
38
- exports.optionsThemeKeys = optionsThemeKeys;
39
-
40
37
  const generateComponentTheme = theme => {
41
38
  const colors = theme.colors,
42
39
  typography = theme.typography,
43
- spacing = theme.spacing; // TODO: if updated, update optionsThemeKeys array too
44
-
40
+ spacing = theme.spacing;
45
41
  const componentVariables = {
46
42
  labelFontWeight: typography === null || typography === void 0 ? void 0 : typography.fontWeightBold,
47
43
  background: colors === null || colors === void 0 ? void 0 : colors.backgroundLightest,
package/lib/index.js CHANGED
@@ -27,12 +27,6 @@ Object.defineProperty(exports, "optionsThemeGenerator", {
27
27
  return _theme.optionsThemeGenerator;
28
28
  }
29
29
  });
30
- Object.defineProperty(exports, "optionsThemeKeys", {
31
- enumerable: true,
32
- get: function () {
33
- return _theme.optionsThemeKeys;
34
- }
35
- });
36
30
 
37
31
  var _Options = require("./Options");
38
32
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/ui-options",
3
- "version": "8.20.0",
3
+ "version": "8.20.1-snapshot.19+002505b76",
4
4
  "description": "A view-only component for composing interactive lists and menus.",
5
5
  "author": "Instructure, Inc. Engineering and Product Design",
6
6
  "module": "./es/index.js",
@@ -23,21 +23,21 @@
23
23
  },
24
24
  "license": "MIT",
25
25
  "devDependencies": {
26
- "@instructure/ui-babel-preset": "8.20.0",
27
- "@instructure/ui-color-utils": "8.20.0",
28
- "@instructure/ui-test-locator": "8.20.0",
29
- "@instructure/ui-test-utils": "8.20.0",
30
- "@instructure/ui-themes": "8.20.0"
26
+ "@instructure/ui-babel-preset": "8.20.1-snapshot.19+002505b76",
27
+ "@instructure/ui-color-utils": "8.20.1-snapshot.19+002505b76",
28
+ "@instructure/ui-test-locator": "8.20.1-snapshot.19+002505b76",
29
+ "@instructure/ui-test-utils": "8.20.1-snapshot.19+002505b76",
30
+ "@instructure/ui-themes": "8.20.1-snapshot.19+002505b76"
31
31
  },
32
32
  "dependencies": {
33
33
  "@babel/runtime": "^7.13.10",
34
- "@instructure/emotion": "8.20.0",
35
- "@instructure/shared-types": "8.20.0",
36
- "@instructure/ui-icons": "8.20.0",
37
- "@instructure/ui-prop-types": "8.20.0",
38
- "@instructure/ui-react-utils": "8.20.0",
39
- "@instructure/ui-testable": "8.20.0",
40
- "@instructure/ui-view": "8.20.0",
34
+ "@instructure/emotion": "8.20.1-snapshot.19+002505b76",
35
+ "@instructure/shared-types": "8.20.1-snapshot.19+002505b76",
36
+ "@instructure/ui-icons": "8.20.1-snapshot.19+002505b76",
37
+ "@instructure/ui-prop-types": "8.20.1-snapshot.19+002505b76",
38
+ "@instructure/ui-react-utils": "8.20.1-snapshot.19+002505b76",
39
+ "@instructure/ui-testable": "8.20.1-snapshot.19+002505b76",
40
+ "@instructure/ui-view": "8.20.1-snapshot.19+002505b76",
41
41
  "prop-types": "^15"
42
42
  },
43
43
  "peerDependencies": {
@@ -46,5 +46,6 @@
46
46
  "publishConfig": {
47
47
  "access": "public"
48
48
  },
49
- "sideEffects": false
49
+ "sideEffects": false,
50
+ "gitHead": "002505b762a235d29c27eb3fc8b69bcaff7482c2"
50
51
  }
@@ -25,14 +25,6 @@
25
25
  import type { Theme } from '@instructure/ui-themes'
26
26
  import type { OptionsTheme } from '@instructure/shared-types'
27
27
 
28
- const optionsThemeKeys: (keyof OptionsTheme)[] = [
29
- 'labelFontWeight',
30
- 'background',
31
- 'labelColor',
32
- 'labelPadding',
33
- 'nestedLabelPadding'
34
- ]
35
-
36
28
  /**
37
29
  * Generates the theme object for the component from the theme and provided additional information
38
30
  * @param {Object} theme The actual theme object.
@@ -41,7 +33,6 @@ const optionsThemeKeys: (keyof OptionsTheme)[] = [
41
33
  const generateComponentTheme = (theme: Theme): OptionsTheme => {
42
34
  const { colors, typography, spacing } = theme
43
35
 
44
- // TODO: if updated, update optionsThemeKeys array too
45
36
  const componentVariables: OptionsTheme = {
46
37
  labelFontWeight: typography?.fontWeightBold,
47
38
 
@@ -57,5 +48,5 @@ const generateComponentTheme = (theme: Theme): OptionsTheme => {
57
48
  }
58
49
  }
59
50
 
60
- export { generateComponentTheme as optionsThemeGenerator, optionsThemeKeys }
51
+ export { generateComponentTheme as optionsThemeGenerator }
61
52
  export default generateComponentTheme
package/src/index.ts CHANGED
@@ -24,7 +24,7 @@
24
24
 
25
25
  export { Options } from './Options'
26
26
 
27
- export { optionsThemeGenerator, optionsThemeKeys } from './Options/theme'
27
+ export { optionsThemeGenerator } from './Options/theme'
28
28
  export { optionsItemThemeGenerator } from './Options/Item/theme'
29
29
  export { optionsSeparatorThemeGenerator } from './Options/Separator/theme'
30
30