@instructure/emotion 11.7.8 → 11.7.9-pr-snapshot-1792147648392

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 (47) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/es/EmotionTypes.js +1 -1
  3. package/es/InstUISettingsProvider/index.js +23 -65
  4. package/es/getComponentThemeOverride.js +20 -65
  5. package/es/getTheme.js +33 -81
  6. package/es/index.js +1 -26
  7. package/es/styleUtils/ThemeablePropValues.js +60 -117
  8. package/es/styleUtils/applyColorModifiers.js +31 -86
  9. package/es/styleUtils/calcFocusOutlineStyles.js +38 -67
  10. package/es/styleUtils/calcSpacingFromShorthand.js +35 -108
  11. package/es/styleUtils/getShorthandPropValue.js +22 -72
  12. package/es/styleUtils/index.js +1 -25
  13. package/es/styleUtils/makeThemeVars.js +6 -41
  14. package/es/styleUtils/mirrorShorthand.js +37 -87
  15. package/es/styleUtils/mirrorShorthandCorners.js +1 -24
  16. package/es/styleUtils/mirrorShorthandEdges.js +1 -24
  17. package/es/useComputedTheme.js +16 -51
  18. package/es/useStyle.js +12 -51
  19. package/es/useStyleNew.js +29 -78
  20. package/es/useTheme.js +10 -41
  21. package/es/withStyle.js +53 -107
  22. package/es/withStyleNew.js +73 -157
  23. package/package.json +13 -16
  24. package/tsconfig.build.json +0 -3
  25. package/tsconfig.build.tsbuildinfo +1 -1
  26. package/lib/EmotionTypes.js +0 -5
  27. package/lib/InstUISettingsProvider/index.js +0 -79
  28. package/lib/getComponentThemeOverride.js +0 -74
  29. package/lib/getTheme.js +0 -93
  30. package/lib/index.js +0 -140
  31. package/lib/package.json +0 -1
  32. package/lib/styleUtils/ThemeablePropValues.js +0 -124
  33. package/lib/styleUtils/applyColorModifiers.js +0 -99
  34. package/lib/styleUtils/calcFocusOutlineStyles.js +0 -77
  35. package/lib/styleUtils/calcSpacingFromShorthand.js +0 -118
  36. package/lib/styleUtils/getShorthandPropValue.js +0 -84
  37. package/lib/styleUtils/index.js +0 -61
  38. package/lib/styleUtils/makeThemeVars.js +0 -51
  39. package/lib/styleUtils/mirrorShorthand.js +0 -97
  40. package/lib/styleUtils/mirrorShorthandCorners.js +0 -37
  41. package/lib/styleUtils/mirrorShorthandEdges.js +0 -37
  42. package/lib/useComputedTheme.js +0 -59
  43. package/lib/useStyle.js +0 -60
  44. package/lib/useStyleNew.js +0 -88
  45. package/lib/useTheme.js +0 -53
  46. package/lib/withStyle.js +0 -125
  47. package/lib/withStyleNew.js +0 -176
package/CHANGELOG.md CHANGED
@@ -3,6 +3,19 @@
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
+ ## [11.7.9-pr-snapshot-1792147648392](https://github.com/instructure/instructure-ui/compare/v11.7.8...v11.7.9-pr-snapshot-1792147648392) (2026-10-16)
7
+
8
+ ### Build System
9
+
10
+ * **many:** replace babel with swc ([7e36c54](https://github.com/instructure/instructure-ui/commit/7e36c54d240b4fa483801c03ab18e7f860f561e2))
11
+
12
+ ### BREAKING CHANGES
13
+
14
+ * **many:** `@instructure/ui-babel-preset` and
15
+ `@instructure/browserslist-config-instui` are removed and will no longer be
16
+ published. Packages depend on `@swc/helpers` instead of `@babel/runtime`.
17
+
18
+
6
19
  ## [11.7.8](https://github.com/instructure/instructure-ui/compare/v11.7.7...v11.7.8) (2026-10-02)
7
20
 
8
21
  **Note:** Version bump only for package @instructure/emotion
@@ -1 +1 @@
1
- export {};
1
+ export { };
@@ -1,73 +1,31 @@
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
-
1
+ import { jsx as _jsx } from "@emotion/react/jsx-runtime";
25
2
  import { useContext } from 'react';
26
3
  import { ThemeProvider } from '@emotion/react';
27
4
  import { TextDirectionContext } from '@instructure/ui-i18n';
28
5
  import { DeterministicIdContextProvider } from '@instructure/ui-react-utils';
29
6
  import { getTheme } from '../getTheme.js';
30
- import { jsx as _jsx } from "@emotion/react/jsx-runtime";
31
- /**
32
- * ---
33
- * category: components
34
- * ---
35
- * @module InstUISettingsProvider
36
- */
37
- function InstUISettingsProvider({
38
- children,
39
- theme = {},
40
- dir,
41
- instanceCounterMap,
42
- themeOverride
43
- }) {
44
- const finalDir = dir || useContext(TextDirectionContext);
45
- if (typeof process !== 'undefined' && (process?.env?.NODE_ENV !== 'production' || process?.env?.GITHUB_PULL_REQUEST_PREVIEW === 'true') && finalDir === 'auto') {}
46
-
47
- /**
48
- * new pattern: if you want to replace a theme inside an InstUISettingsProvider, provide it via the theme prop. It'll
49
- * override everything, replacing the otherwise used theme.
50
- * if you want to apply an override, use the themeOverride prop.
51
- * For backward compatibility reasons, the old way of passing a partial theme to the theme prop is still supported, however only for
52
- * legacy (pre v11_7) components. Overriding the newTheme this way could break the system.
53
- */
54
- let providers = _jsx(DeterministicIdContextProvider, {
55
- instanceCounterMap: instanceCounterMap,
56
- children: _jsx(ThemeProvider, {
57
- theme: getTheme(theme, themeOverride),
58
- children: _jsx(TextDirectionContext.Provider, {
59
- value: finalDir,
60
- children: children
61
- })
62
- })
63
- });
64
- if (dir) {
65
- providers = _jsx("span", {
66
- dir: finalDir,
67
- children: providers
7
+ function InstUISettingsProvider({ children, theme = {}, dir, instanceCounterMap, themeOverride }) {
8
+ const finalDir = dir || useContext(TextDirectionContext);
9
+ if (typeof process !== 'undefined' && (process?.env?.NODE_ENV !== 'production' || process?.env?.GITHUB_PULL_REQUEST_PREVIEW === 'true') && finalDir === 'auto') {
10
+ void 0;
11
+ }
12
+ let providers = /*#__PURE__*/ _jsx(DeterministicIdContextProvider, {
13
+ instanceCounterMap: instanceCounterMap,
14
+ children: /*#__PURE__*/ _jsx(ThemeProvider, {
15
+ theme: getTheme(theme, themeOverride),
16
+ children: /*#__PURE__*/ _jsx(TextDirectionContext.Provider, {
17
+ value: finalDir,
18
+ children: children
19
+ })
20
+ })
68
21
  });
69
- }
70
- return providers;
22
+ if (dir) {
23
+ providers = /*#__PURE__*/ _jsx("span", {
24
+ dir: finalDir,
25
+ children: providers
26
+ });
27
+ }
28
+ return providers;
71
29
  }
72
30
  export default InstUISettingsProvider;
73
- export { InstUISettingsProvider };
31
+ export { InstUISettingsProvider };
@@ -1,68 +1,23 @@
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
- /**
26
- * ---
27
- * private: true
28
- * ---
29
- * This is a utility function which calculates the correct component theme
30
- * based on every possible override there is.
31
-
32
- * @param theme - Theme object
33
- * @param displayName - Name of the component
34
- * @param componentId - componentId of the component
35
- * @param themeOverride - The theme override object
36
- * @param componentTheme - The component's default theme
37
- * @returns The calculated theme override object
38
- */
39
- const getComponentThemeOverride = (theme, displayName, componentId, themeOverride, componentTheme) => {
40
- const name = displayName;
41
- const id = componentId;
42
- const {
43
- componentOverrides
44
- } = theme;
45
- let overridesFromTheme = {};
46
- let overrideFromComponent = {};
47
- if (componentOverrides) {
48
- overridesFromTheme = name && componentOverrides[name] || id && componentOverrides[id] || {};
49
- }
50
- if (themeOverride) {
51
- if (typeof themeOverride === 'function') {
52
- overrideFromComponent = themeOverride(
53
- //TODO type properly when the old theme is gone
54
- componentTheme || {},
55
- // the `theme` technically could be a partial theme / override object too,
56
- // but we want to display all possible options
57
- theme);
58
- } else {
59
- overrideFromComponent = themeOverride;
1
+ const getComponentThemeOverride = (theme, displayName, componentId, themeOverride, componentTheme)=>{
2
+ const name = displayName;
3
+ const id = componentId;
4
+ const { componentOverrides } = theme;
5
+ let overridesFromTheme = {};
6
+ let overrideFromComponent = {};
7
+ if (componentOverrides) {
8
+ overridesFromTheme = name && componentOverrides[name] || id && componentOverrides[id] || {};
60
9
  }
61
- }
62
- return {
63
- ...overridesFromTheme,
64
- ...overrideFromComponent
65
- };
10
+ if (themeOverride) {
11
+ if (typeof themeOverride === 'function') {
12
+ overrideFromComponent = themeOverride(componentTheme || {}, theme);
13
+ } else {
14
+ overrideFromComponent = themeOverride;
15
+ }
16
+ }
17
+ return {
18
+ ...overridesFromTheme,
19
+ ...overrideFromComponent
20
+ };
66
21
  };
67
22
  export default getComponentThemeOverride;
68
- export { getComponentThemeOverride };
23
+ export { getComponentThemeOverride };
package/es/getTheme.js CHANGED
@@ -1,84 +1,36 @@
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
1
  import canvas from '@instructure/ui-themes';
25
2
  import { isBaseTheme, mergeDeep } from '@instructure/ui-utils';
26
- /**
27
- * ---
28
- * private: true
29
- * ---
30
- * Gives back the theme object for the provider.
31
- *
32
- * If a valid InstUI theme is given, it just returns the theme.
33
- *
34
- * If an override object is given, it returns the ancestor theme and
35
- * the overrides merged together.
36
- *
37
- * @param themeOrLegacyOverride - A full theme or an override object
38
- * @param themeOverride - if provided, it means it's a new theming-system override.
39
- * This will be merged into theme.themeOverride and will be treated separately
40
- * from the old way of applying overrides. This override will be applied in the
41
- * `withStyleNew.ts` decorator
42
- * @returns A function that returns with the theme object for the [ThemeProvider](https://emotion.sh/docs/theming#themeprovider-reactcomponenttype)
43
- * This function is called by Emotion on theme provider creation, where
44
- * `ancestorTheme` is a theme object from an ancestor `ThemeProvider`
45
- */
46
- const getTheme = (themeOrLegacyOverride, themeOverride) => (ancestorTheme = {}) => {
47
- // we need to clone the ancestor theme not to override it
48
- const hasAncestorTheme = Object.keys(ancestorTheme).length > 0;
49
- const currentTheme = hasAncestorTheme ? ancestorTheme : canvas;
50
- const resolvedThemeOverride = typeof themeOverride === 'function' ? themeOverride(currentTheme) : themeOverride;
51
- let resolvedLegacyThemeOrOverride = typeof themeOrLegacyOverride === 'function' ? themeOrLegacyOverride(currentTheme) : themeOrLegacyOverride;
52
- try {
53
- // If a valid InstUI theme is given, it just returns the theme.
54
- // in case of the legacy pattern, it's just a simple replacement, in the new system, overrides should be merged into the new theme. Old overrides will be removed because they may make no sense for a different theme
55
- if (isBaseTheme(resolvedLegacyThemeOrOverride)) {
56
- return {
57
- ...resolvedLegacyThemeOrOverride,
58
- ...(resolvedThemeOverride ? {
59
- themeOverride: resolvedThemeOverride
60
- } : {})
61
- };
62
- }
63
- } catch {
64
- // If the prop passed is not an Object, it will throw an error.
65
- // We are using this fail-safe here for the non-TS users,
66
- // because the whole page can break without a theme.
67
- if (typeof process !== 'undefined' && (process?.env?.NODE_ENV !== 'production' || process?.env?.GITHUB_PULL_REQUEST_PREVIEW === 'true')) {}
68
- resolvedLegacyThemeOrOverride = {};
69
- }
70
-
71
- // We only get here if no full theme was given, so the overrides are merged
72
- // into the implicit `canvas` fallback instead of a theme the consumer chose.
73
- if (!hasAncestorTheme && typeof process !== 'undefined' && (process?.env?.NODE_ENV !== 'production' || process?.env?.GITHUB_PULL_REQUEST_PREVIEW === 'true')) {}
74
- const themeName = currentTheme.key;
75
-
76
- // legacy: we pick the overrides for the current theme from the override object
77
- const specificOverrides = resolvedLegacyThemeOrOverride?.themeOverrides;
78
- const currentThemeOverrides = specificOverrides?.[themeName] || specificOverrides || {};
79
- return mergeDeep(currentTheme, resolvedLegacyThemeOrOverride, currentThemeOverrides, ...(resolvedThemeOverride ? [{
80
- themeOverride: resolvedThemeOverride
81
- }] : []));
82
- };
3
+ const getTheme = (themeOrLegacyOverride, themeOverride)=>(ancestorTheme = {})=>{
4
+ const hasAncestorTheme = Object.keys(ancestorTheme).length > 0;
5
+ const currentTheme = hasAncestorTheme ? ancestorTheme : canvas;
6
+ const resolvedThemeOverride = typeof themeOverride === 'function' ? themeOverride(currentTheme) : themeOverride;
7
+ let resolvedLegacyThemeOrOverride = typeof themeOrLegacyOverride === 'function' ? themeOrLegacyOverride(currentTheme) : themeOrLegacyOverride;
8
+ try {
9
+ if (isBaseTheme(resolvedLegacyThemeOrOverride)) {
10
+ return {
11
+ ...resolvedLegacyThemeOrOverride,
12
+ ...resolvedThemeOverride ? {
13
+ themeOverride: resolvedThemeOverride
14
+ } : {}
15
+ };
16
+ }
17
+ } catch {
18
+ if (typeof process !== 'undefined' && (process?.env?.NODE_ENV !== 'production' || process?.env?.GITHUB_PULL_REQUEST_PREVIEW === 'true')) {
19
+ void 0;
20
+ }
21
+ resolvedLegacyThemeOrOverride = {};
22
+ }
23
+ if (!hasAncestorTheme && typeof process !== 'undefined' && (process?.env?.NODE_ENV !== 'production' || process?.env?.GITHUB_PULL_REQUEST_PREVIEW === 'true')) {
24
+ void 0;
25
+ }
26
+ const themeName = currentTheme.key;
27
+ const specificOverrides = resolvedLegacyThemeOrOverride?.themeOverrides;
28
+ const currentThemeOverrides = specificOverrides?.[themeName] || specificOverrides || {};
29
+ return mergeDeep(currentTheme, resolvedLegacyThemeOrOverride, currentThemeOverrides, ...resolvedThemeOverride ? [
30
+ {
31
+ themeOverride: resolvedThemeOverride
32
+ }
33
+ ] : []);
34
+ };
83
35
  export default getTheme;
84
- export { getTheme };
36
+ export { getTheme };
package/es/index.js CHANGED
@@ -1,28 +1,3 @@
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
- /// <reference types="@emotion/react/types/css-prop" />
25
-
26
1
  export * from '@emotion/react';
27
2
  export { useComputedTheme } from './useComputedTheme.js';
28
3
  export { InstUISettingsProvider } from './InstUISettingsProvider/index.js';
@@ -32,4 +7,4 @@ export { withStyleNew } from './withStyleNew.js';
32
7
  export { ThemeablePropValues, makeThemeVars, getShorthandPropValue, mirrorShorthandCorners, mirrorShorthandEdges, calcSpacingFromShorthand, calcFocusOutlineStyles, applyColorModifiers } from './styleUtils/index.js';
33
8
  export { useStyle } from './useStyle.js';
34
9
  export { useStyleNew } from './useStyleNew.js';
35
- export { useTheme } from './useTheme.js';
10
+ export { useTheme } from './useTheme.js';
@@ -1,120 +1,63 @@
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
1
  const ThemeablePropValues = {
26
- SHADOW_TYPES: {
27
- resting: 'resting',
28
- above: 'above',
29
- topmost: 'topmost',
30
- none: 'none',
31
- elevation1: 'elevation1',
32
- elevation2: 'elevation2',
33
- elevation3: 'elevation3',
34
- elevation4: 'elevation4'
35
- },
36
- STACKING_TYPES: {
37
- deepest: 'deepest',
38
- below: 'below',
39
- resting: 'resting',
40
- above: 'above',
41
- topmost: 'topmost'
42
- },
43
- BORDER_WIDTHS: {
44
- 0: '0',
45
- none: 'none',
46
- small: 'small',
47
- medium: 'medium',
48
- large: 'large'
49
- },
50
- BORDER_RADII: {
51
- 0: '0',
52
- none: 'none',
53
- small: 'small',
54
- medium: 'medium',
55
- large: 'large',
56
- circle: 'circle',
57
- pill: 'pill'
58
- },
59
- BACKGROUNDS: {
60
- default: 'default',
61
- inverse: 'inverse',
62
- transparent: 'transparent'
63
- },
64
- SIZES: {
65
- xSmall: 'x-small',
66
- small: 'small',
67
- medium: 'medium',
68
- large: 'large',
69
- xLarge: 'x-large'
70
- },
71
- SPACING: {
72
- 0: '0',
73
- none: 'none',
74
- auto: 'auto',
75
- xxxSmall: 'xxx-small',
76
- xxSmall: 'xx-small',
77
- xSmall: 'x-small',
78
- small: 'small',
79
- mediumSmall: 'mediumSmall',
80
- medium: 'medium',
81
- large: 'large',
82
- xLarge: 'x-large',
83
- xxLarge: 'xx-large'
84
- }
2
+ SHADOW_TYPES: {
3
+ resting: 'resting',
4
+ above: 'above',
5
+ topmost: 'topmost',
6
+ none: 'none',
7
+ elevation1: 'elevation1',
8
+ elevation2: 'elevation2',
9
+ elevation3: 'elevation3',
10
+ elevation4: 'elevation4'
11
+ },
12
+ STACKING_TYPES: {
13
+ deepest: 'deepest',
14
+ below: 'below',
15
+ resting: 'resting',
16
+ above: 'above',
17
+ topmost: 'topmost'
18
+ },
19
+ BORDER_WIDTHS: {
20
+ 0: '0',
21
+ none: 'none',
22
+ small: 'small',
23
+ medium: 'medium',
24
+ large: 'large'
25
+ },
26
+ BORDER_RADII: {
27
+ 0: '0',
28
+ none: 'none',
29
+ small: 'small',
30
+ medium: 'medium',
31
+ large: 'large',
32
+ circle: 'circle',
33
+ pill: 'pill'
34
+ },
35
+ BACKGROUNDS: {
36
+ default: 'default',
37
+ inverse: 'inverse',
38
+ transparent: 'transparent'
39
+ },
40
+ SIZES: {
41
+ xSmall: 'x-small',
42
+ small: 'small',
43
+ medium: 'medium',
44
+ large: 'large',
45
+ xLarge: 'x-large'
46
+ },
47
+ SPACING: {
48
+ 0: '0',
49
+ none: 'none',
50
+ auto: 'auto',
51
+ xxxSmall: 'xxx-small',
52
+ xxSmall: 'xx-small',
53
+ xSmall: 'x-small',
54
+ small: 'small',
55
+ mediumSmall: 'mediumSmall',
56
+ medium: 'medium',
57
+ large: 'large',
58
+ xLarge: 'x-large',
59
+ xxLarge: 'xx-large'
60
+ }
85
61
  };
86
-
87
- // SPACING
88
-
89
- /**
90
- * @deprecated Era-1 (legacy) spacing keywords. Still resolved at runtime, but
91
- * prefer the current `CurrentSpacingValues` dot-path tokens (e.g. `general.spaceMd`).
92
- * See https://instructure.design/layout-spacing.
93
- */
94
-
95
- /**
96
- * @deprecated Era-2 spacing tokens (the `space0`–`space60` and flat semantic set)
97
- * have been phased out. Still resolved at runtime, but prefer the current
98
- * `CurrentSpacingValues` dot-path tokens (e.g. `general.spaceMd`, `gap.cards.md`).
99
- * See https://instructure.design/layout-spacing.
100
- */
101
-
102
- /**
103
- * Current (era-3) spacing tokens. Referenced via dot-path notation and resolved
104
- * against the new theme's `sharedTokens.spacing` map (see
105
- * `@instructure/ui-themes` `newThemeTokens`). These are the recommended values
106
- * for the `margin`/`padding` props. See https://instructure.design/layout-spacing.
107
- */
108
-
109
- // adding `(string & {})` allows to use any string while still allowing specific string values to be suggested by IDEs
110
-
111
- // SHADOW_TYPES
112
-
113
- // STACKING_TYPES
114
-
115
- // BACKGROUNDS
116
-
117
- // BORDER_WIDTHS
118
-
119
62
  export default ThemeablePropValues;
120
- export { ThemeablePropValues };
63
+ export { ThemeablePropValues };