@react-native-styled-system/core 1.4.2 → 2.1.1

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 (135) hide show
  1. package/lib/commonjs/@types/AnyStyle.js +6 -0
  2. package/lib/commonjs/@types/AnyStyle.js.map +1 -0
  3. package/lib/commonjs/@types/Responsive.js +8 -0
  4. package/lib/commonjs/@types/Responsive.js.map +1 -0
  5. package/lib/commonjs/@types/SxProps.js +9 -0
  6. package/lib/commonjs/@types/SxProps.js.map +1 -1
  7. package/lib/commonjs/@types/ThemedDict.js +400 -2
  8. package/lib/commonjs/@types/ThemedDict.js.map +1 -1
  9. package/lib/commonjs/__testUtils__/testTheme.js +51 -0
  10. package/lib/commonjs/__testUtils__/testTheme.js.map +1 -0
  11. package/lib/commonjs/hook/useSx.js +13 -4
  12. package/lib/commonjs/hook/useSx.js.map +1 -1
  13. package/lib/commonjs/hook/useSxStyle.js +10 -3
  14. package/lib/commonjs/hook/useSxStyle.js.map +1 -1
  15. package/lib/commonjs/hook/useSxTokens.js.map +1 -1
  16. package/lib/commonjs/index.js +22 -0
  17. package/lib/commonjs/index.js.map +1 -1
  18. package/lib/commonjs/internal/TokenParser/RadiiParser.js.map +1 -1
  19. package/lib/commonjs/internal/TokenParser/SizesParser.js.map +1 -1
  20. package/lib/commonjs/internal/TokenParser/SpaceParser.js.map +1 -1
  21. package/lib/commonjs/internal/TokenParser/TypographyParser.js +1 -1
  22. package/lib/commonjs/internal/TokenParser/TypographyParser.js.map +1 -1
  23. package/lib/commonjs/internal/util/StyleHash.js +1 -1
  24. package/lib/commonjs/internal/util/StyleHash.js.map +1 -1
  25. package/lib/commonjs/internal/util/resolveResponsiveValue.js +52 -0
  26. package/lib/commonjs/internal/util/resolveResponsiveValue.js.map +1 -0
  27. package/lib/commonjs/provider/StyledSystemProvider.js +15 -7
  28. package/lib/commonjs/provider/StyledSystemProvider.js.map +1 -1
  29. package/lib/commonjs/util/createSxComponent.js +2 -3
  30. package/lib/commonjs/util/createSxComponent.js.map +1 -1
  31. package/lib/commonjs/util/createTheme.js +43 -0
  32. package/lib/commonjs/util/createTheme.js.map +1 -0
  33. package/lib/commonjs/util/propsToThemedStyle.js +11 -5
  34. package/lib/commonjs/util/propsToThemedStyle.js.map +1 -1
  35. package/lib/module/@types/AnyStyle.js +2 -0
  36. package/lib/module/@types/AnyStyle.js.map +1 -0
  37. package/lib/module/@types/Responsive.js +2 -0
  38. package/lib/module/@types/Responsive.js.map +1 -0
  39. package/lib/module/@types/SxProps.js +9 -0
  40. package/lib/module/@types/SxProps.js.map +1 -1
  41. package/lib/module/@types/ThemedDict.js +398 -1
  42. package/lib/module/@types/ThemedDict.js.map +1 -1
  43. package/lib/module/__testUtils__/testTheme.js +45 -0
  44. package/lib/module/__testUtils__/testTheme.js.map +1 -0
  45. package/lib/module/hook/useSx.js +13 -4
  46. package/lib/module/hook/useSx.js.map +1 -1
  47. package/lib/module/hook/useSxStyle.js +10 -3
  48. package/lib/module/hook/useSxStyle.js.map +1 -1
  49. package/lib/module/hook/useSxTokens.js.map +1 -1
  50. package/lib/module/index.js +2 -0
  51. package/lib/module/index.js.map +1 -1
  52. package/lib/module/internal/TokenParser/RadiiParser.js.map +1 -1
  53. package/lib/module/internal/TokenParser/SizesParser.js.map +1 -1
  54. package/lib/module/internal/TokenParser/SpaceParser.js.map +1 -1
  55. package/lib/module/internal/util/resolveResponsiveValue.js +44 -0
  56. package/lib/module/internal/util/resolveResponsiveValue.js.map +1 -0
  57. package/lib/module/provider/StyledSystemProvider.js +14 -5
  58. package/lib/module/provider/StyledSystemProvider.js.map +1 -1
  59. package/lib/module/util/createSxComponent.js +1 -1
  60. package/lib/module/util/createSxComponent.js.map +1 -1
  61. package/lib/module/util/createTheme.js +37 -0
  62. package/lib/module/util/createTheme.js.map +1 -0
  63. package/lib/module/util/propsToThemedStyle.js +11 -5
  64. package/lib/module/util/propsToThemedStyle.js.map +1 -1
  65. package/lib/typescript/src/@types/AnyStyle.d.ts +3 -0
  66. package/lib/typescript/src/@types/AnyStyle.d.ts.map +1 -0
  67. package/lib/typescript/src/@types/Responsive.d.ts +4 -0
  68. package/lib/typescript/src/@types/Responsive.d.ts.map +1 -0
  69. package/lib/typescript/src/@types/SxProps.d.ts +15 -3
  70. package/lib/typescript/src/@types/SxProps.d.ts.map +1 -1
  71. package/lib/typescript/src/@types/ThemedDict.d.ts +26 -0
  72. package/lib/typescript/src/@types/ThemedDict.d.ts.map +1 -1
  73. package/lib/typescript/src/@types/ThemedTypings.d.ts.map +1 -1
  74. package/lib/typescript/src/@types/Token.d.ts +3 -0
  75. package/lib/typescript/src/@types/Token.d.ts.map +1 -1
  76. package/lib/typescript/src/__testUtils__/testTheme.d.ts +12 -0
  77. package/lib/typescript/src/__testUtils__/testTheme.d.ts.map +1 -0
  78. package/lib/typescript/src/hook/useSx.d.ts +6 -4
  79. package/lib/typescript/src/hook/useSx.d.ts.map +1 -1
  80. package/lib/typescript/src/hook/useSxStyle.d.ts +2 -1
  81. package/lib/typescript/src/hook/useSxStyle.d.ts.map +1 -1
  82. package/lib/typescript/src/hook/useSxTokens.d.ts.map +1 -1
  83. package/lib/typescript/src/index.d.ts +2 -0
  84. package/lib/typescript/src/index.d.ts.map +1 -1
  85. package/lib/typescript/src/internal/TokenParser/ColorsParser.d.ts +1 -1
  86. package/lib/typescript/src/internal/TokenParser/ColorsParser.d.ts.map +1 -1
  87. package/lib/typescript/src/internal/TokenParser/RadiiParser.d.ts +1 -1
  88. package/lib/typescript/src/internal/TokenParser/RadiiParser.d.ts.map +1 -1
  89. package/lib/typescript/src/internal/TokenParser/SizesParser.d.ts +1 -1
  90. package/lib/typescript/src/internal/TokenParser/SizesParser.d.ts.map +1 -1
  91. package/lib/typescript/src/internal/TokenParser/SpaceParser.d.ts +2 -2
  92. package/lib/typescript/src/internal/TokenParser/SpaceParser.d.ts.map +1 -1
  93. package/lib/typescript/src/internal/TokenParser/TokenParser.d.ts +6 -6
  94. package/lib/typescript/src/internal/TokenParser/TokenParser.d.ts.map +1 -1
  95. package/lib/typescript/src/internal/TokenParser/TypographyParser.d.ts +1 -1
  96. package/lib/typescript/src/internal/TokenParser/TypographyParser.d.ts.map +1 -1
  97. package/lib/typescript/src/internal/util/printWarning.d.ts.map +1 -1
  98. package/lib/typescript/src/internal/util/resolveResponsiveValue.d.ts +12 -0
  99. package/lib/typescript/src/internal/util/resolveResponsiveValue.d.ts.map +1 -0
  100. package/lib/typescript/src/provider/StyledSystemProvider.d.ts +3 -1
  101. package/lib/typescript/src/provider/StyledSystemProvider.d.ts.map +1 -1
  102. package/lib/typescript/src/util/createSxComponent.d.ts +6 -6
  103. package/lib/typescript/src/util/createSxComponent.d.ts.map +1 -1
  104. package/lib/typescript/src/util/createTheme.d.ts +4 -0
  105. package/lib/typescript/src/util/createTheme.d.ts.map +1 -0
  106. package/lib/typescript/src/util/propsToThemedStyle.d.ts +8 -6
  107. package/lib/typescript/src/util/propsToThemedStyle.d.ts.map +1 -1
  108. package/package.json +10 -12
  109. package/src/@types/AnyStyle.ts +3 -0
  110. package/src/@types/Responsive.ts +7 -0
  111. package/src/@types/SxProps.ts +36 -7
  112. package/src/@types/ThemedDict.ts +415 -0
  113. package/src/@types/ThemedTypings.ts +3 -0
  114. package/src/@types/Token.ts +3 -0
  115. package/src/__testUtils__/testTheme.ts +43 -0
  116. package/src/hook/useSx.test.ts +118 -39
  117. package/src/hook/useSx.ts +18 -8
  118. package/src/hook/useSxStyle.test.ts +103 -34
  119. package/src/hook/useSxStyle.ts +12 -1
  120. package/src/hook/useSxTokens.test.ts +66 -33
  121. package/src/index.ts +2 -0
  122. package/src/internal/util/resolveResponsiveValue.test.ts +171 -0
  123. package/src/internal/util/resolveResponsiveValue.ts +58 -0
  124. package/src/provider/StyledSystemProvider.tsx +14 -4
  125. package/src/util/createSxComponent.tsx +8 -4
  126. package/src/util/createTheme.test.ts +126 -0
  127. package/src/util/createTheme.ts +29 -0
  128. package/src/util/propsToThemedStyle.ts +17 -8
  129. package/lib/commonjs/internal/util/fillNullishThemeKey.js +0 -18
  130. package/lib/commonjs/internal/util/fillNullishThemeKey.js.map +0 -1
  131. package/lib/module/internal/util/fillNullishThemeKey.js +0 -11
  132. package/lib/module/internal/util/fillNullishThemeKey.js.map +0 -1
  133. package/lib/typescript/src/internal/util/fillNullishThemeKey.d.ts +0 -3
  134. package/lib/typescript/src/internal/util/fillNullishThemeKey.d.ts.map +0 -1
  135. package/src/internal/util/fillNullishThemeKey.ts +0 -12
@@ -6,11 +6,13 @@ import type { UseSxOptions } from '../hook/useSx';
6
6
  import { useSx } from '../hook/useSx';
7
7
 
8
8
  export function createSxComponent<Props extends object, Ref>(Base: ComponentType<Props>) {
9
+ type MergedProps = Omit<Props, keyof SxProps> & SxProps;
10
+
9
11
  return ({
10
12
  defaultProps,
11
13
  sxOptions,
12
- }: { defaultProps?: Props & SxProps; sxOptions?: UseSxOptions } = {}) => {
13
- const Transformed = forwardRef<Ref, Props & SxProps>(function (props, ref) {
14
+ }: { defaultProps?: MergedProps; sxOptions?: UseSxOptions } = {}) => {
15
+ const Transformed = forwardRef<Ref, MergedProps>(function (props, ref) {
14
16
  const { filteredProps, getStyle } = useSx({ ...defaultProps, ...props }, sxOptions);
15
17
 
16
18
  return <Base {...(filteredProps as any)} style={getStyle()} ref={ref as any} />;
@@ -23,11 +25,13 @@ export function createSxComponent<Props extends object, Ref>(Base: ComponentType
23
25
  }
24
26
 
25
27
  export function createSxTextComponent<Props extends object, Ref>(Base: ComponentType<Props>) {
28
+ type MergedProps = Omit<Props, keyof TextSxProps> & TextSxProps;
29
+
26
30
  return ({
27
31
  defaultProps,
28
32
  sxOptions,
29
- }: { defaultProps?: Props & TextSxProps; sxOptions?: UseSxOptions } = {}) => {
30
- const Transformed = forwardRef<Ref, Props & TextSxProps>(function (props, ref) {
33
+ }: { defaultProps?: MergedProps; sxOptions?: UseSxOptions } = {}) => {
34
+ const Transformed = forwardRef<Ref, MergedProps>(function (props, ref) {
31
35
  const { filteredProps, getStyle } = useSx(
32
36
  { ...defaultProps, ...props },
33
37
  { styleType: 'TextStyle', ...sxOptions },
@@ -0,0 +1,126 @@
1
+ import type { ThemedDict } from '../@types/ThemedDict';
2
+ import { defaultTheme } from '../@types/ThemedDict';
3
+
4
+ import { createTheme } from './createTheme';
5
+
6
+ describe('createTheme', () => {
7
+ describe('create mode (single argument)', () => {
8
+ it('returns all empty defaults when called without arguments', () => {
9
+ const theme = createTheme();
10
+ expect(theme).toEqual({
11
+ colors: {},
12
+ space: {},
13
+ sizes: {},
14
+ radii: {},
15
+ typography: {},
16
+ breakpoints: [],
17
+ });
18
+ });
19
+
20
+ it('returns all empty defaults when called with empty object', () => {
21
+ const theme = createTheme({});
22
+ expect(theme).toEqual({
23
+ colors: {},
24
+ space: {},
25
+ sizes: {},
26
+ radii: {},
27
+ typography: {},
28
+ breakpoints: [],
29
+ });
30
+ });
31
+
32
+ it('keeps provided groups and fills missing ones with empty defaults', () => {
33
+ const theme = createTheme({
34
+ colors: { primary: '#000' },
35
+ space: { '1': 4 },
36
+ });
37
+ expect(theme.colors).toEqual({ primary: '#000' });
38
+ expect(theme.space).toEqual({ '1': 4 });
39
+ expect(theme.sizes).toEqual({});
40
+ expect(theme.radii).toEqual({});
41
+ expect(theme.typography).toEqual({});
42
+ expect(theme.breakpoints).toEqual([]);
43
+ });
44
+
45
+ it('keeps provided breakpoints', () => {
46
+ const theme = createTheme({ breakpoints: [480, 768] });
47
+ expect(theme.breakpoints).toEqual([480, 768]);
48
+ });
49
+ });
50
+
51
+ describe('extend mode (two arguments)', () => {
52
+ const base: ThemedDict = {
53
+ colors: { red: '#FF0000', blue: '#0000FF' },
54
+ space: { '1': 4, '2': 8 },
55
+ sizes: { sm: 16 },
56
+ radii: { md: 8 },
57
+ typography: { body: { fontSize: 16, lineHeight: 24 } },
58
+ breakpoints: [480, 768],
59
+ };
60
+
61
+ it('returns base as-is when overrides is empty', () => {
62
+ const theme = createTheme(base, {});
63
+ expect(theme).toEqual(base);
64
+ });
65
+
66
+ it('merges colors (keeps existing + adds new)', () => {
67
+ const theme = createTheme(base, { colors: { brand: '#FF6600' } });
68
+ expect(theme.colors).toEqual({ red: '#FF0000', blue: '#0000FF', brand: '#FF6600' });
69
+ });
70
+
71
+ it('overrides existing token values', () => {
72
+ const theme = createTheme(base, { colors: { red: '#CC0000' } });
73
+ expect(theme.colors.red).toBe('#CC0000');
74
+ expect(theme.colors.blue).toBe('#0000FF');
75
+ });
76
+
77
+ it('merges each token group independently', () => {
78
+ const theme = createTheme(base, {
79
+ space: { '3': 12 },
80
+ sizes: { lg: 32 },
81
+ radii: { lg: 16 },
82
+ typography: { h1: { fontSize: 32, fontWeight: 'bold', lineHeight: 40 } },
83
+ });
84
+ expect(theme.space).toEqual({ '1': 4, '2': 8, '3': 12 });
85
+ expect(theme.sizes).toEqual({ sm: 16, lg: 32 });
86
+ expect(theme.radii).toEqual({ md: 8, lg: 16 });
87
+ expect(theme.typography).toEqual({
88
+ body: { fontSize: 16, lineHeight: 24 },
89
+ h1: { fontSize: 32, fontWeight: 'bold', lineHeight: 40 },
90
+ });
91
+ });
92
+
93
+ it('replaces breakpoints when provided in overrides', () => {
94
+ const theme = createTheme(base, { breakpoints: [500, 1024, 1440] });
95
+ expect(theme.breakpoints).toEqual([500, 1024, 1440]);
96
+ });
97
+
98
+ it('falls back to base breakpoints when overrides omits breakpoints', () => {
99
+ const theme = createTheme(base, { colors: { brand: '#000' } });
100
+ expect(theme.breakpoints).toEqual([480, 768]);
101
+ });
102
+
103
+ it('does not mutate base or overrides', () => {
104
+ const baseCopy = JSON.parse(JSON.stringify(base));
105
+ const overrides = { colors: { brand: '#FF6600' } };
106
+ const overridesCopy = JSON.parse(JSON.stringify(overrides));
107
+
108
+ createTheme(base, overrides);
109
+
110
+ expect(base).toEqual(baseCopy);
111
+ expect(overrides).toEqual(overridesCopy);
112
+ });
113
+
114
+ it('works with defaultTheme as base', () => {
115
+ const theme = createTheme(defaultTheme, {
116
+ colors: { brand: '#FF6600' },
117
+ space: { huge: 200 },
118
+ });
119
+ expect(theme.colors.brand).toBe('#FF6600');
120
+ expect(theme.colors.white).toBe('#FFFFFF');
121
+ expect(theme.space.huge).toBe(200);
122
+ expect(theme.space['1']).toBe(4);
123
+ expect(theme.breakpoints).toEqual(defaultTheme.breakpoints);
124
+ });
125
+ });
126
+ });
@@ -0,0 +1,29 @@
1
+ import type { ThemedDict } from '../@types/ThemedDict';
2
+
3
+ export function createTheme(config?: Partial<ThemedDict>): ThemedDict;
4
+ export function createTheme(base: ThemedDict, overrides: Partial<ThemedDict>): ThemedDict;
5
+ export function createTheme(
6
+ baseOrConfig: Partial<ThemedDict> = {},
7
+ overrides?: Partial<ThemedDict>,
8
+ ): ThemedDict {
9
+ if (overrides !== undefined) {
10
+ return {
11
+ colors: { ...baseOrConfig.colors, ...overrides.colors },
12
+ space: { ...baseOrConfig.space, ...overrides.space },
13
+ sizes: { ...baseOrConfig.sizes, ...overrides.sizes },
14
+ radii: { ...baseOrConfig.radii, ...overrides.radii },
15
+ typography: { ...baseOrConfig.typography, ...overrides.typography },
16
+ breakpoints: overrides.breakpoints ?? baseOrConfig.breakpoints ?? [],
17
+ };
18
+ }
19
+
20
+ return {
21
+ colors: {},
22
+ space: {},
23
+ sizes: {},
24
+ radii: {},
25
+ typography: {},
26
+ breakpoints: [],
27
+ ...baseOrConfig,
28
+ };
29
+ }
@@ -1,7 +1,5 @@
1
- /* eslint-disable padding-line-between-statements */
2
- import type { TextStyle } from 'react-native';
3
-
4
- import type { TextSxProps } from '../@types/SxProps';
1
+ import type { AnyStyle } from '../@types/AnyStyle';
2
+ import type { ResolvedTextSxProps, TextSxProps } from '../@types/SxProps';
5
3
  import type { ThemedDict } from '../@types/ThemedDict';
6
4
  import { createTokenParsers } from '../internal/TokenParser/TokenParser';
7
5
  import {
@@ -9,28 +7,36 @@ import {
9
7
  fillViewStyleIfNotNullish,
10
8
  } from '../internal/util/fillStyleIfNotNullish';
11
9
  import { printWarning } from '../internal/util/printWarning';
10
+ import { resolveResponsiveSx } from '../internal/util/resolveResponsiveValue';
12
11
 
13
12
  export type ThemedStyleType = 'ViewStyle' | 'TextStyle';
14
13
  export const propsToThemedStyle = ({
15
14
  theme,
16
- sx,
15
+ sx: rawSx,
17
16
  styleType = 'ViewStyle',
17
+ breakpoints = [],
18
+ screenWidth = 0,
18
19
  }: {
19
20
  theme?: ThemedDict;
20
21
  sx?: TextSxProps;
21
22
  styleType?: ThemedStyleType;
22
- }): TextStyle | undefined => {
23
- const ret: TextStyle = {};
23
+ breakpoints?: number[];
24
+ screenWidth?: number;
25
+ }): AnyStyle | undefined => {
26
+ const ret: AnyStyle = {};
24
27
 
25
28
  if (!theme) {
26
29
  printWarning('theme not found');
30
+
27
31
  return;
28
32
  }
29
33
 
30
- if (!sx) {
34
+ if (!rawSx) {
31
35
  return;
32
36
  }
33
37
 
38
+ const sx: ResolvedTextSxProps = resolveResponsiveSx({ sx: rawSx, breakpoints, screenWidth });
39
+
34
40
  const { colors, radii, sizes, space, spaceAsNumberOnly, typography } = createTokenParsers(theme);
35
41
 
36
42
  // region colors
@@ -82,16 +88,19 @@ export const propsToThemedStyle = ({
82
88
  'borderTopLeftRadius',
83
89
  radii(sx.borderTopLeftRadius ?? sx.topLeftRadius),
84
90
  );
91
+
85
92
  fillViewStyleIfNotNullish(
86
93
  ret,
87
94
  'borderTopRightRadius',
88
95
  radii(sx.borderTopRightRadius ?? sx.topRightRadius),
89
96
  );
97
+
90
98
  fillViewStyleIfNotNullish(
91
99
  ret,
92
100
  'borderBottomLeftRadius',
93
101
  radii(sx.borderBottomLeftRadius ?? sx.bottomLeftRadius),
94
102
  );
103
+
95
104
  fillViewStyleIfNotNullish(
96
105
  ret,
97
106
  'borderBottomRightRadius',
@@ -1,18 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.fillNullishThemeKey = void 0;
7
- const fillNullishThemeKey = theme => {
8
- return {
9
- colors: {},
10
- space: {},
11
- sizes: {},
12
- radii: {},
13
- typography: {},
14
- ...theme
15
- };
16
- };
17
- exports.fillNullishThemeKey = fillNullishThemeKey;
18
- //# sourceMappingURL=fillNullishThemeKey.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["fillNullishThemeKey","theme","colors","space","sizes","radii","typography","exports"],"sourceRoot":"../../../../src","sources":["internal/util/fillNullishThemeKey.ts"],"mappings":";;;;;;AAEO,MAAMA,mBAAmB,GAAIC,KAA0B,IAAiB;EAC7E,OAAO;IACLC,MAAM,EAAE,CAAC,CAAC;IACVC,KAAK,EAAE,CAAC,CAAC;IACTC,KAAK,EAAE,CAAC,CAAC;IACTC,KAAK,EAAE,CAAC,CAAC;IACTC,UAAU,EAAE,CAAC,CAAC;IACd,GAAGL;EACL,CAAC;AACH,CAAC;AAACM,OAAA,CAAAP,mBAAA,GAAAA,mBAAA","ignoreList":[]}
@@ -1,11 +0,0 @@
1
- export const fillNullishThemeKey = theme => {
2
- return {
3
- colors: {},
4
- space: {},
5
- sizes: {},
6
- radii: {},
7
- typography: {},
8
- ...theme
9
- };
10
- };
11
- //# sourceMappingURL=fillNullishThemeKey.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["fillNullishThemeKey","theme","colors","space","sizes","radii","typography"],"sourceRoot":"../../../../src","sources":["internal/util/fillNullishThemeKey.ts"],"mappings":"AAEA,OAAO,MAAMA,mBAAmB,GAAIC,KAA0B,IAAiB;EAC7E,OAAO;IACLC,MAAM,EAAE,CAAC,CAAC;IACVC,KAAK,EAAE,CAAC,CAAC;IACTC,KAAK,EAAE,CAAC,CAAC;IACTC,KAAK,EAAE,CAAC,CAAC;IACTC,UAAU,EAAE,CAAC,CAAC;IACd,GAAGL;EACL,CAAC;AACH,CAAC","ignoreList":[]}
@@ -1,3 +0,0 @@
1
- import type { ThemedDict } from '../../@types/ThemedDict';
2
- export declare const fillNullishThemeKey: (theme: Partial<ThemedDict>) => ThemedDict;
3
- //# sourceMappingURL=fillNullishThemeKey.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"fillNullishThemeKey.d.ts","sourceRoot":"","sources":["../../../../../src/internal/util/fillNullishThemeKey.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAE1D,eAAO,MAAM,mBAAmB,UAAW,QAAQ,UAAU,CAAC,KAAG,UAShE,CAAC"}
@@ -1,12 +0,0 @@
1
- import type { ThemedDict } from '../../@types/ThemedDict';
2
-
3
- export const fillNullishThemeKey = (theme: Partial<ThemedDict>): ThemedDict => {
4
- return {
5
- colors: {},
6
- space: {},
7
- sizes: {},
8
- radii: {},
9
- typography: {},
10
- ...theme,
11
- };
12
- };