@soroush.tech/styled-system 5.8.3 → 5.9.0-alpha.0

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 (97) hide show
  1. package/dist/background.d.cts +2 -2
  2. package/dist/background.d.mts +2 -2
  3. package/dist/border.d.cts +2 -2
  4. package/dist/border.d.mts +2 -2
  5. package/dist/color.d.cts +2 -2
  6. package/dist/color.d.mts +2 -2
  7. package/dist/core.cjs +17 -16
  8. package/dist/core.d.cts +3 -2
  9. package/dist/core.d.mts +3 -2
  10. package/dist/core.mjs +15 -16
  11. package/dist/{css-CeNnKyGm.cjs → css-BnnO16Cw.cjs} +3 -1
  12. package/dist/{css-BTuRmXCo.mjs → css-CunBKyMl.mjs} +3 -1
  13. package/dist/css.cjs +1 -1
  14. package/dist/css.d.cts +2 -1
  15. package/dist/css.d.mts +2 -1
  16. package/dist/css.mjs +1 -1
  17. package/dist/flexbox.d.cts +2 -2
  18. package/dist/flexbox.d.mts +2 -2
  19. package/dist/grid.d.cts +2 -2
  20. package/dist/grid.d.mts +2 -2
  21. package/dist/index-0k2kzlK5.d.cts +6 -0
  22. package/dist/{index-DbknCBOx.d.mts → index-BKofCDzL.d.mts} +2 -2
  23. package/dist/index-BReBwT6c.d.mts +6 -0
  24. package/dist/{index-C0SM54dQ.d.cts → index-BXP1-da3.d.mts} +4 -3
  25. package/dist/{index-C0SM54dQ.d.mts → index-BYkO78Xl.d.cts} +4 -3
  26. package/dist/index-BhbWZw53.d.mts +6 -0
  27. package/dist/{index-O6xVfQo3.d.cts → index-Bq7teef_.d.cts} +2 -2
  28. package/dist/index-C-B6-_Ku.d.mts +6 -0
  29. package/dist/index-C9CxJ5Zn.d.cts +6 -0
  30. package/dist/index-CIccdXWj.d.cts +6 -0
  31. package/dist/index-CJT-n3Vq.d.mts +6 -0
  32. package/dist/index-CcorN1bQ.d.mts +6 -0
  33. package/dist/index-Cd_CcxMh.d.cts +6 -0
  34. package/dist/index-Co0JY1hd.d.cts +6 -0
  35. package/dist/index-D9dwDAhC.d.mts +6 -0
  36. package/dist/index-DP40bJIa.d.cts +6 -0
  37. package/dist/index-DQhcFrR9.d.mts +6 -0
  38. package/dist/index-DcRfFIAZ.d.mts +6 -0
  39. package/dist/index-Dsc6RgbZ.d.cts +6 -0
  40. package/dist/{index-bHspW0eP.d.cts → index-DzcXmzdT.d.cts} +2 -2
  41. package/dist/index-Q8q5VND1.d.cts +6 -0
  42. package/dist/index-UGE-V15i.d.cts +6 -0
  43. package/dist/index-sk97pkUE.d.mts +6 -0
  44. package/dist/{index-6cAxfKIl.d.mts → index-wKeENlqd.d.mts} +2 -2
  45. package/dist/index.cjs +4 -1
  46. package/dist/index.d.cts +15 -14
  47. package/dist/index.d.mts +15 -14
  48. package/dist/index.mjs +3 -2
  49. package/dist/layout.d.cts +2 -2
  50. package/dist/layout.d.mts +2 -2
  51. package/dist/media-B8UpEDpY.mjs +18 -0
  52. package/dist/media-BoIPXBPV.cjs +29 -0
  53. package/dist/media-np0uvO4C.d.cts +14 -0
  54. package/dist/media-np0uvO4C.d.mts +14 -0
  55. package/dist/position.d.cts +2 -2
  56. package/dist/position.d.mts +2 -2
  57. package/dist/{presets-B2nFh_Zn.cjs → presets-CCvtQotd.cjs} +1 -1
  58. package/dist/{presets-Dg3yjRZU.mjs → presets-CV_TIXQ4.mjs} +1 -1
  59. package/dist/prop-types.cjs +1 -1
  60. package/dist/prop-types.mjs +1 -1
  61. package/dist/props.cjs +1 -1
  62. package/dist/props.mjs +1 -1
  63. package/dist/shadow.d.cts +2 -2
  64. package/dist/shadow.d.mts +2 -2
  65. package/dist/should-forward-prop.cjs +1 -1
  66. package/dist/should-forward-prop.mjs +1 -1
  67. package/dist/space.d.cts +2 -2
  68. package/dist/space.d.mts +2 -2
  69. package/dist/{types-B52XAdkx.d.cts → types-B0SNbm6V.d.cts} +4 -1
  70. package/dist/{types-B52XAdkx.d.mts → types-B0SNbm6V.d.mts} +4 -1
  71. package/dist/typography.d.cts +2 -2
  72. package/dist/typography.d.mts +2 -2
  73. package/dist/{variant-BSwNEY5l.cjs → variant-DdSForfI.cjs} +1 -1
  74. package/dist/{variant-NupmzzRg.mjs → variant-DfRW-ZJe.mjs} +1 -1
  75. package/dist/variant.cjs +1 -1
  76. package/dist/variant.d.cts +2 -2
  77. package/dist/variant.d.mts +2 -2
  78. package/dist/variant.mjs +1 -1
  79. package/package.json +4 -4
  80. package/dist/index-B89zA95f.d.mts +0 -6
  81. package/dist/index-BBuQfHYC.d.cts +0 -6
  82. package/dist/index-BNnm8JPL.d.mts +0 -6
  83. package/dist/index-B_swWveU.d.cts +0 -6
  84. package/dist/index-Bqj29Szo.d.mts +0 -6
  85. package/dist/index-C-8kLZ_X.d.mts +0 -6
  86. package/dist/index-ClSRfFkX.d.cts +0 -6
  87. package/dist/index-CpDyBw8z.d.cts +0 -6
  88. package/dist/index-D11y4gdv.d.mts +0 -6
  89. package/dist/index-DLQzYvfH.d.mts +0 -6
  90. package/dist/index-DOmnNWoA.d.cts +0 -6
  91. package/dist/index-Daclwf93.d.cts +0 -6
  92. package/dist/index-DdlTo1c6.d.mts +0 -6
  93. package/dist/index-DluQIAXz.d.cts +0 -6
  94. package/dist/index-DuI1XGHT.d.mts +0 -6
  95. package/dist/index-NT55TmXe.d.cts +0 -6
  96. package/dist/index-RXhfbqjT.d.cts +0 -6
  97. package/dist/index-yC71Yo0d.d.mts +0 -6
@@ -1,3 +1,3 @@
1
- import { t as background } from "./index-BBuQfHYC.cjs";
2
- import { c as BackgroundProps, l as BackgroundRepeatProps, o as BackgroundImageProps, s as BackgroundPositionProps, u as BackgroundSizeProps } from "./types-B52XAdkx.cjs";
1
+ import { t as background } from "./index-Q8q5VND1.cjs";
2
+ import { c as BackgroundProps, l as BackgroundRepeatProps, o as BackgroundImageProps, s as BackgroundPositionProps, u as BackgroundSizeProps } from "./types-B0SNbm6V.cjs";
3
3
  export { type BackgroundImageProps, type BackgroundPositionProps, type BackgroundProps, type BackgroundRepeatProps, type BackgroundSizeProps, background, background as default };
@@ -1,3 +1,3 @@
1
- import { t as background } from "./index-yC71Yo0d.mjs";
2
- import { c as BackgroundProps, l as BackgroundRepeatProps, o as BackgroundImageProps, s as BackgroundPositionProps, u as BackgroundSizeProps } from "./types-B52XAdkx.mjs";
1
+ import { t as background } from "./index-C-B6-_Ku.mjs";
2
+ import { c as BackgroundProps, l as BackgroundRepeatProps, o as BackgroundImageProps, s as BackgroundPositionProps, u as BackgroundSizeProps } from "./types-B0SNbm6V.mjs";
3
3
  export { type BackgroundImageProps, type BackgroundPositionProps, type BackgroundProps, type BackgroundRepeatProps, type BackgroundSizeProps, background, background as default };
package/dist/border.d.cts CHANGED
@@ -1,3 +1,3 @@
1
- import { _ as BorderStyleProps, d as BorderBottomProps, f as BorderColorProps, g as BorderRightProps, h as BorderRadiusProps, m as BorderProps, p as BorderLeftProps, v as BorderTopProps, y as BorderWidthProps } from "./types-B52XAdkx.cjs";
2
- import { t as border } from "./index-Daclwf93.cjs";
1
+ import { _ as BorderStyleProps, d as BorderBottomProps, f as BorderColorProps, g as BorderRightProps, h as BorderRadiusProps, m as BorderProps, p as BorderLeftProps, v as BorderTopProps, y as BorderWidthProps } from "./types-B0SNbm6V.cjs";
2
+ import { t as border } from "./index-C9CxJ5Zn.cjs";
3
3
  export { type BorderBottomProps, type BorderColorProps, type BorderLeftProps, type BorderProps, type BorderRadiusProps, type BorderRightProps, type BorderStyleProps, type BorderTopProps, type BorderWidthProps, border, border as default };
package/dist/border.d.mts CHANGED
@@ -1,3 +1,3 @@
1
- import { _ as BorderStyleProps, d as BorderBottomProps, f as BorderColorProps, g as BorderRightProps, h as BorderRadiusProps, m as BorderProps, p as BorderLeftProps, v as BorderTopProps, y as BorderWidthProps } from "./types-B52XAdkx.mjs";
2
- import { t as border } from "./index-DdlTo1c6.mjs";
1
+ import { _ as BorderStyleProps, d as BorderBottomProps, f as BorderColorProps, g as BorderRightProps, h as BorderRadiusProps, m as BorderProps, p as BorderLeftProps, v as BorderTopProps, y as BorderWidthProps } from "./types-B0SNbm6V.mjs";
2
+ import { t as border } from "./index-D9dwDAhC.mjs";
3
3
  export { type BorderBottomProps, type BorderColorProps, type BorderLeftProps, type BorderProps, type BorderRadiusProps, type BorderRightProps, type BorderStyleProps, type BorderTopProps, type BorderWidthProps, border, border as default };
package/dist/color.d.cts CHANGED
@@ -1,3 +1,3 @@
1
- import { C as ColorProps, Ot as TextColorProps, a as BackgroundColorProps, ft as OpacityProps } from "./types-B52XAdkx.cjs";
2
- import { t as color } from "./index-RXhfbqjT.cjs";
1
+ import { C as ColorProps, Ot as TextColorProps, a as BackgroundColorProps, ft as OpacityProps } from "./types-B0SNbm6V.cjs";
2
+ import { t as color } from "./index-Cd_CcxMh.cjs";
3
3
  export { type BackgroundColorProps, type ColorProps, type OpacityProps, type TextColorProps, color, color as default };
package/dist/color.d.mts CHANGED
@@ -1,3 +1,3 @@
1
- import { C as ColorProps, Ot as TextColorProps, a as BackgroundColorProps, ft as OpacityProps } from "./types-B52XAdkx.mjs";
2
- import { t as color } from "./index-BNnm8JPL.mjs";
1
+ import { C as ColorProps, Ot as TextColorProps, a as BackgroundColorProps, ft as OpacityProps } from "./types-B0SNbm6V.mjs";
2
+ import { t as color } from "./index-CJT-n3Vq.mjs";
3
3
  export { type BackgroundColorProps, type ColorProps, type OpacityProps, type TextColorProps, color, color as default };
package/dist/core.cjs CHANGED
@@ -1,4 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_media = require("./media-BoIPXBPV.cjs");
2
3
  //#region src/core/core.ts
3
4
  const merge = (a, b) => {
4
5
  const result = {
@@ -11,14 +12,10 @@ const merge = (a, b) => {
11
12
  }
12
13
  return result;
13
14
  };
14
- const sort = (obj) => {
15
+ const sort = (obj, media) => {
15
16
  const next = {};
16
- Object.keys(obj).sort((a, b) => a.localeCompare(b, void 0, {
17
- numeric: true,
18
- sensitivity: "base"
19
- })).forEach((key) => {
20
- next[key] = obj[key];
21
- });
17
+ for (const key in obj) if (!media.includes(key)) next[key] = obj[key];
18
+ for (const key of media) if (key && key in obj) next[key] = obj[key];
22
19
  return next;
23
20
  };
24
21
  const defaults = { breakpoints: [
@@ -26,7 +23,6 @@ const defaults = { breakpoints: [
26
23
  52,
27
24
  64
28
25
  ].map((n) => n + "em") };
29
- const createMediaQuery = (n) => `@media screen and (min-width: ${n})`;
30
26
  const getValue = (n, scale) => get(scale, n, n);
31
27
  const get = (obj, key, def, p = 0, undef) => {
32
28
  const path = typeof key === "string" ? key.split(".") : [key];
@@ -50,11 +46,11 @@ const parseResponsiveStyle = (mediaQueries, sx, scale, raw, props) => {
50
46
  const parseResponsiveObject = (breakpoints, sx, scale, raw, props) => {
51
47
  const styles = {};
52
48
  for (const key in raw) {
53
- const breakpoint = breakpoints[key];
49
+ const breakpoint = Object.hasOwn(breakpoints, key) ? breakpoints[key] : void 0;
54
50
  const value = raw[key];
55
51
  const style = sx(value, scale, props);
56
- if (breakpoint) {
57
- const media = createMediaQuery(breakpoint);
52
+ if (breakpoint !== void 0) {
53
+ const media = require_media.createMediaQuery(breakpoint);
58
54
  Object.assign(styles, { [media]: {
59
55
  ...styles[media],
60
56
  ...style
@@ -64,7 +60,7 @@ const parseResponsiveObject = (breakpoints, sx, scale, raw, props) => {
64
60
  return styles;
65
61
  };
66
62
  const createParser = (config) => {
67
- const cache = {};
63
+ const cache = { media: [] };
68
64
  const parse = ((props) => {
69
65
  let styles = {};
70
66
  let shouldSort = false;
@@ -75,21 +71,24 @@ const createParser = (config) => {
75
71
  const raw = props[key];
76
72
  const scale = get(props.theme, sx.scale, sx.defaults);
77
73
  if (typeof raw === "object") {
78
- cache.breakpoints = !isCacheDisabled && cache.breakpoints || get(props.theme, "breakpoints", defaults.breakpoints);
74
+ const breakpoints = get(props.theme, "breakpoints", defaults.breakpoints);
75
+ if (isCacheDisabled || cache.breakpoints !== breakpoints) {
76
+ cache.breakpoints = breakpoints;
77
+ cache.media = [null, ...Object.values(breakpoints).map(require_media.createMediaQuery)];
78
+ }
79
79
  if (Array.isArray(raw)) {
80
- cache.media = !isCacheDisabled && cache.media || [null, ...cache.breakpoints.map(createMediaQuery)];
81
80
  styles = merge(styles, parseResponsiveStyle(cache.media, sx, scale, raw, props));
82
81
  continue;
83
82
  }
84
83
  if (raw !== null) {
85
- styles = merge(styles, parseResponsiveObject(cache.breakpoints, sx, scale, raw, props));
84
+ styles = merge(styles, parseResponsiveObject(breakpoints, sx, scale, raw, props));
86
85
  shouldSort = true;
87
86
  }
88
87
  continue;
89
88
  }
90
89
  Object.assign(styles, sx(raw, scale, props));
91
90
  }
92
- if (shouldSort) styles = sort(styles);
91
+ if (shouldSort) styles = sort(styles, cache.media);
93
92
  return styles;
94
93
  });
95
94
  parse.config = config;
@@ -144,7 +143,9 @@ const compose = (...parsers) => {
144
143
  return createParser(config);
145
144
  };
146
145
  //#endregion
146
+ exports.breakpointQueries = require_media.breakpointQueries;
147
147
  exports.compose = compose;
148
+ exports.createMediaQuery = require_media.createMediaQuery;
148
149
  exports.createParser = createParser;
149
150
  exports.createStyleFunction = createStyleFunction;
150
151
  exports.get = get;
package/dist/core.d.cts CHANGED
@@ -1,2 +1,3 @@
1
- import { _ as merge, a as Parser, c as StyleFn, d as Theme, f as Transform, g as get, h as createStyleFunction, i as ConfigStyle, l as StyleObject, m as createParser, n as Config, o as ParserConfig, p as compose, r as ConfigFunction, s as Props, t as CSSObject, u as SystemConfig, v as styleFn, y as system } from "./index-C0SM54dQ.cjs";
2
- export { CSSObject, Config, ConfigFunction, ConfigStyle, Parser, ParserConfig, Props, StyleFn, StyleObject, SystemConfig, Theme, Transform, compose, createParser, createStyleFunction, get, merge, styleFn, system };
1
+ import { n as breakpointQueries, r as createMediaQuery, t as Breakpoints } from "./media-np0uvO4C.cjs";
2
+ import { _ as merge, a as Parser, c as StyleFn, d as Theme, f as Transform, g as get, h as createStyleFunction, i as ConfigStyle, l as StyleObject, m as createParser, n as Config, o as ParserConfig, p as compose, r as ConfigFunction, s as Props, t as CSSObject, u as SystemConfig, v as styleFn, y as system } from "./index-BYkO78Xl.cjs";
3
+ export { Breakpoints, CSSObject, Config, ConfigFunction, ConfigStyle, Parser, ParserConfig, Props, StyleFn, StyleObject, SystemConfig, Theme, Transform, breakpointQueries, compose, createMediaQuery, createParser, createStyleFunction, get, merge, styleFn, system };
package/dist/core.d.mts CHANGED
@@ -1,2 +1,3 @@
1
- import { _ as merge, a as Parser, c as StyleFn, d as Theme, f as Transform, g as get, h as createStyleFunction, i as ConfigStyle, l as StyleObject, m as createParser, n as Config, o as ParserConfig, p as compose, r as ConfigFunction, s as Props, t as CSSObject, u as SystemConfig, v as styleFn, y as system } from "./index-C0SM54dQ.mjs";
2
- export { CSSObject, Config, ConfigFunction, ConfigStyle, Parser, ParserConfig, Props, StyleFn, StyleObject, SystemConfig, Theme, Transform, compose, createParser, createStyleFunction, get, merge, styleFn, system };
1
+ import { n as breakpointQueries, r as createMediaQuery, t as Breakpoints } from "./media-np0uvO4C.mjs";
2
+ import { _ as merge, a as Parser, c as StyleFn, d as Theme, f as Transform, g as get, h as createStyleFunction, i as ConfigStyle, l as StyleObject, m as createParser, n as Config, o as ParserConfig, p as compose, r as ConfigFunction, s as Props, t as CSSObject, u as SystemConfig, v as styleFn, y as system } from "./index-BXP1-da3.mjs";
3
+ export { Breakpoints, CSSObject, Config, ConfigFunction, ConfigStyle, Parser, ParserConfig, Props, StyleFn, StyleObject, SystemConfig, Theme, Transform, breakpointQueries, compose, createMediaQuery, createParser, createStyleFunction, get, merge, styleFn, system };
package/dist/core.mjs CHANGED
@@ -1,3 +1,4 @@
1
+ import { n as createMediaQuery, t as breakpointQueries } from "./media-B8UpEDpY.mjs";
1
2
  //#region src/core/core.ts
2
3
  const merge = (a, b) => {
3
4
  const result = {
@@ -10,14 +11,10 @@ const merge = (a, b) => {
10
11
  }
11
12
  return result;
12
13
  };
13
- const sort = (obj) => {
14
+ const sort = (obj, media) => {
14
15
  const next = {};
15
- Object.keys(obj).sort((a, b) => a.localeCompare(b, void 0, {
16
- numeric: true,
17
- sensitivity: "base"
18
- })).forEach((key) => {
19
- next[key] = obj[key];
20
- });
16
+ for (const key in obj) if (!media.includes(key)) next[key] = obj[key];
17
+ for (const key of media) if (key && key in obj) next[key] = obj[key];
21
18
  return next;
22
19
  };
23
20
  const defaults = { breakpoints: [
@@ -25,7 +22,6 @@ const defaults = { breakpoints: [
25
22
  52,
26
23
  64
27
24
  ].map((n) => n + "em") };
28
- const createMediaQuery = (n) => `@media screen and (min-width: ${n})`;
29
25
  const getValue = (n, scale) => get(scale, n, n);
30
26
  const get = (obj, key, def, p = 0, undef) => {
31
27
  const path = typeof key === "string" ? key.split(".") : [key];
@@ -49,10 +45,10 @@ const parseResponsiveStyle = (mediaQueries, sx, scale, raw, props) => {
49
45
  const parseResponsiveObject = (breakpoints, sx, scale, raw, props) => {
50
46
  const styles = {};
51
47
  for (const key in raw) {
52
- const breakpoint = breakpoints[key];
48
+ const breakpoint = Object.hasOwn(breakpoints, key) ? breakpoints[key] : void 0;
53
49
  const value = raw[key];
54
50
  const style = sx(value, scale, props);
55
- if (breakpoint) {
51
+ if (breakpoint !== void 0) {
56
52
  const media = createMediaQuery(breakpoint);
57
53
  Object.assign(styles, { [media]: {
58
54
  ...styles[media],
@@ -63,7 +59,7 @@ const parseResponsiveObject = (breakpoints, sx, scale, raw, props) => {
63
59
  return styles;
64
60
  };
65
61
  const createParser = (config) => {
66
- const cache = {};
62
+ const cache = { media: [] };
67
63
  const parse = ((props) => {
68
64
  let styles = {};
69
65
  let shouldSort = false;
@@ -74,21 +70,24 @@ const createParser = (config) => {
74
70
  const raw = props[key];
75
71
  const scale = get(props.theme, sx.scale, sx.defaults);
76
72
  if (typeof raw === "object") {
77
- cache.breakpoints = !isCacheDisabled && cache.breakpoints || get(props.theme, "breakpoints", defaults.breakpoints);
73
+ const breakpoints = get(props.theme, "breakpoints", defaults.breakpoints);
74
+ if (isCacheDisabled || cache.breakpoints !== breakpoints) {
75
+ cache.breakpoints = breakpoints;
76
+ cache.media = [null, ...Object.values(breakpoints).map(createMediaQuery)];
77
+ }
78
78
  if (Array.isArray(raw)) {
79
- cache.media = !isCacheDisabled && cache.media || [null, ...cache.breakpoints.map(createMediaQuery)];
80
79
  styles = merge(styles, parseResponsiveStyle(cache.media, sx, scale, raw, props));
81
80
  continue;
82
81
  }
83
82
  if (raw !== null) {
84
- styles = merge(styles, parseResponsiveObject(cache.breakpoints, sx, scale, raw, props));
83
+ styles = merge(styles, parseResponsiveObject(breakpoints, sx, scale, raw, props));
85
84
  shouldSort = true;
86
85
  }
87
86
  continue;
88
87
  }
89
88
  Object.assign(styles, sx(raw, scale, props));
90
89
  }
91
- if (shouldSort) styles = sort(styles);
90
+ if (shouldSort) styles = sort(styles, cache.media);
92
91
  return styles;
93
92
  });
94
93
  parse.config = config;
@@ -143,4 +142,4 @@ const compose = (...parsers) => {
143
142
  return createParser(config);
144
143
  };
145
144
  //#endregion
146
- export { compose, createParser, createStyleFunction, get, merge, system };
145
+ export { breakpointQueries, compose, createMediaQuery, createParser, createStyleFunction, get, merge, system };
@@ -1,3 +1,4 @@
1
+ const require_media = require("./media-BoIPXBPV.cjs");
1
2
  //#region src/css/css.ts
2
3
  const get = (obj, key, def, p = 0, undef) => {
3
4
  const path = typeof key === "string" ? key.split(".") : [key];
@@ -156,7 +157,8 @@ const transforms = [
156
157
  }), {});
157
158
  const responsive = (styles) => (theme) => {
158
159
  const next = {};
159
- const mediaQueries = [null, ...get(theme, "breakpoints", defaultBreakpoints).map((n) => `@media screen and (min-width: ${n})`)];
160
+ const breakpoints = get(theme, "breakpoints", defaultBreakpoints);
161
+ const mediaQueries = [null, ...Object.values(breakpoints).map(require_media.createMediaQuery)];
160
162
  for (const key in styles) {
161
163
  const value = typeof styles[key] === "function" ? styles[key](theme) : styles[key];
162
164
  if (value == null) continue;
@@ -1,3 +1,4 @@
1
+ import { n as createMediaQuery } from "./media-B8UpEDpY.mjs";
1
2
  //#region src/css/css.ts
2
3
  const get = (obj, key, def, p = 0, undef) => {
3
4
  const path = typeof key === "string" ? key.split(".") : [key];
@@ -156,7 +157,8 @@ const transforms = [
156
157
  }), {});
157
158
  const responsive = (styles) => (theme) => {
158
159
  const next = {};
159
- const mediaQueries = [null, ...get(theme, "breakpoints", defaultBreakpoints).map((n) => `@media screen and (min-width: ${n})`)];
160
+ const breakpoints = get(theme, "breakpoints", defaultBreakpoints);
161
+ const mediaQueries = [null, ...Object.values(breakpoints).map(createMediaQuery)];
160
162
  for (const key in styles) {
161
163
  const value = typeof styles[key] === "function" ? styles[key](theme) : styles[key];
162
164
  if (value == null) continue;
package/dist/css.cjs CHANGED
@@ -2,7 +2,7 @@ Object.defineProperties(exports, {
2
2
  __esModule: { value: true },
3
3
  [Symbol.toStringTag]: { value: "Module" }
4
4
  });
5
- const require_css = require("./css-CeNnKyGm.cjs");
5
+ const require_css = require("./css-BnnO16Cw.cjs");
6
6
  exports.css = require_css.css;
7
7
  exports.default = require_css.css;
8
8
  exports.get = require_css.get;
package/dist/css.d.cts CHANGED
@@ -1,7 +1,8 @@
1
+ import { t as Breakpoints } from "./media-np0uvO4C.cjs";
1
2
  //#region src/css/css.d.ts
2
3
  type CSSObject = Record<string, unknown>;
3
4
  interface CssTheme {
4
- breakpoints?: (string | number)[];
5
+ breakpoints?: Breakpoints;
5
6
  [key: string]: unknown;
6
7
  }
7
8
  type CssArg = CSSObject | ((theme: CssTheme) => CSSObject);
package/dist/css.d.mts CHANGED
@@ -1,7 +1,8 @@
1
+ import { t as Breakpoints } from "./media-np0uvO4C.mjs";
1
2
  //#region src/css/css.d.ts
2
3
  type CSSObject = Record<string, unknown>;
3
4
  interface CssTheme {
4
- breakpoints?: (string | number)[];
5
+ breakpoints?: Breakpoints;
5
6
  [key: string]: unknown;
6
7
  }
7
8
  type CssArg = CSSObject | ((theme: CssTheme) => CSSObject);
package/dist/css.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import { n as get, r as responsive, t as css } from "./css-BTuRmXCo.mjs";
1
+ import { n as get, r as responsive, t as css } from "./css-CunBKyMl.mjs";
2
2
  export { css, css as default, get, responsive };
@@ -1,3 +1,3 @@
1
- import { $ as JustifyContentProps, A as FlexProps, D as FlexBasisProps, M as FlexWrapProps, N as FlexboxProps, O as FlexDirectionProps, et as JustifyItemsProps, j as FlexShrinkProps, k as FlexGrowProps, n as AlignItemsProps, pt as OrderProps, r as AlignSelfProps, t as AlignContentProps, tt as JustifySelfProps } from "./types-B52XAdkx.cjs";
2
- import { t as flexbox } from "./index-CpDyBw8z.cjs";
1
+ import { $ as JustifyContentProps, A as FlexProps, D as FlexBasisProps, M as FlexWrapProps, N as FlexboxProps, O as FlexDirectionProps, et as JustifyItemsProps, j as FlexShrinkProps, k as FlexGrowProps, n as AlignItemsProps, pt as OrderProps, r as AlignSelfProps, t as AlignContentProps, tt as JustifySelfProps } from "./types-B0SNbm6V.cjs";
2
+ import { t as flexbox } from "./index-CIccdXWj.cjs";
3
3
  export { type AlignContentProps, type AlignItemsProps, type AlignSelfProps, type FlexBasisProps, type FlexDirectionProps, type FlexGrowProps, type FlexProps, type FlexShrinkProps, type FlexWrapProps, type FlexboxProps, type JustifyContentProps, type JustifyItemsProps, type JustifySelfProps, type OrderProps, flexbox as default, flexbox };
@@ -1,3 +1,3 @@
1
- import { $ as JustifyContentProps, A as FlexProps, D as FlexBasisProps, M as FlexWrapProps, N as FlexboxProps, O as FlexDirectionProps, et as JustifyItemsProps, j as FlexShrinkProps, k as FlexGrowProps, n as AlignItemsProps, pt as OrderProps, r as AlignSelfProps, t as AlignContentProps, tt as JustifySelfProps } from "./types-B52XAdkx.mjs";
2
- import { t as flexbox } from "./index-DuI1XGHT.mjs";
1
+ import { $ as JustifyContentProps, A as FlexProps, D as FlexBasisProps, M as FlexWrapProps, N as FlexboxProps, O as FlexDirectionProps, et as JustifyItemsProps, j as FlexShrinkProps, k as FlexGrowProps, n as AlignItemsProps, pt as OrderProps, r as AlignSelfProps, t as AlignContentProps, tt as JustifySelfProps } from "./types-B0SNbm6V.mjs";
2
+ import { t as flexbox } from "./index-DcRfFIAZ.mjs";
3
3
  export { type AlignContentProps, type AlignItemsProps, type AlignSelfProps, type FlexBasisProps, type FlexDirectionProps, type FlexGrowProps, type FlexProps, type FlexShrinkProps, type FlexWrapProps, type FlexboxProps, type JustifyContentProps, type JustifyItemsProps, type JustifySelfProps, type OrderProps, flexbox as default, flexbox };
package/dist/grid.d.cts CHANGED
@@ -1,3 +1,3 @@
1
- import { B as GridAutoColumnsProps, G as GridGapProps, H as GridAutoRowsProps, J as GridRowProps, K as GridProps, U as GridColumnGapProps, V as GridAutoFlowProps, W as GridColumnProps, X as GridTemplateColumnsProps, Y as GridTemplateAreasProps, Z as GridTemplateRowsProps, q as GridRowGapProps, z as GridAreaProps } from "./types-B52XAdkx.cjs";
2
- import { t as grid } from "./index-ClSRfFkX.cjs";
1
+ import { B as GridAutoColumnsProps, G as GridGapProps, H as GridAutoRowsProps, J as GridRowProps, K as GridProps, U as GridColumnGapProps, V as GridAutoFlowProps, W as GridColumnProps, X as GridTemplateColumnsProps, Y as GridTemplateAreasProps, Z as GridTemplateRowsProps, q as GridRowGapProps, z as GridAreaProps } from "./types-B0SNbm6V.cjs";
2
+ import { t as grid } from "./index-0k2kzlK5.cjs";
3
3
  export { type GridAreaProps, type GridAutoColumnsProps, type GridAutoFlowProps, type GridAutoRowsProps, type GridColumnGapProps, type GridColumnProps, type GridGapProps, type GridProps, type GridRowGapProps, type GridRowProps, type GridTemplateAreasProps, type GridTemplateColumnsProps, type GridTemplateRowsProps, grid as default, grid };
package/dist/grid.d.mts CHANGED
@@ -1,3 +1,3 @@
1
- import { B as GridAutoColumnsProps, G as GridGapProps, H as GridAutoRowsProps, J as GridRowProps, K as GridProps, U as GridColumnGapProps, V as GridAutoFlowProps, W as GridColumnProps, X as GridTemplateColumnsProps, Y as GridTemplateAreasProps, Z as GridTemplateRowsProps, q as GridRowGapProps, z as GridAreaProps } from "./types-B52XAdkx.mjs";
2
- import { t as grid } from "./index-Bqj29Szo.mjs";
1
+ import { B as GridAutoColumnsProps, G as GridGapProps, H as GridAutoRowsProps, J as GridRowProps, K as GridProps, U as GridColumnGapProps, V as GridAutoFlowProps, W as GridColumnProps, X as GridTemplateColumnsProps, Y as GridTemplateAreasProps, Z as GridTemplateRowsProps, q as GridRowGapProps, z as GridAreaProps } from "./types-B0SNbm6V.mjs";
2
+ import { t as grid } from "./index-DQhcFrR9.mjs";
3
3
  export { type GridAreaProps, type GridAutoColumnsProps, type GridAutoFlowProps, type GridAutoRowsProps, type GridColumnGapProps, type GridColumnProps, type GridGapProps, type GridProps, type GridRowGapProps, type GridRowProps, type GridTemplateAreasProps, type GridTemplateColumnsProps, type GridTemplateRowsProps, grid as default, grid };
@@ -0,0 +1,6 @@
1
+ import { a as Parser } from "./index-BYkO78Xl.cjs";
2
+ import "./types-B0SNbm6V.cjs";
3
+ //#region src/grid/grid.d.ts
4
+ declare const grid: Parser;
5
+ //#endregion
6
+ export { grid as t };
@@ -1,5 +1,5 @@
1
- import { a as Parser } from "./index-C0SM54dQ.mjs";
2
- import "./types-B52XAdkx.mjs";
1
+ import { a as Parser } from "./index-BXP1-da3.mjs";
2
+ import "./types-B0SNbm6V.mjs";
3
3
  //#region src/variant/variant.d.ts
4
4
  interface VariantOptions {
5
5
  scale?: string;
@@ -0,0 +1,6 @@
1
+ import { a as Parser } from "./index-BXP1-da3.mjs";
2
+ import "./types-B0SNbm6V.mjs";
3
+ //#region src/typography/typography.d.ts
4
+ declare const typography: Parser;
5
+ //#endregion
6
+ export { typography as t };
@@ -1,3 +1,4 @@
1
+ import { t as Breakpoints } from "./media-np0uvO4C.mjs";
1
2
  import * as CSS from "csstype";
2
3
  //#region src/core/core.d.ts
3
4
  type StyleObject = Record<string, any>;
@@ -12,7 +13,7 @@ interface CSSObject extends CSS.Properties<CSSLength>, CSS.PropertiesHyphen<CSSL
12
13
  [selectorOrAtRule: string]: CSSObject | string | number | undefined;
13
14
  }
14
15
  interface Theme {
15
- breakpoints?: readonly (string | number)[] | Record<string, string | number>;
16
+ breakpoints?: Breakpoints;
16
17
  disableStyledSystemCache?: boolean;
17
18
  [key: string]: any;
18
19
  }
@@ -39,8 +40,8 @@ type styleFn = Parser;
39
40
  type Config = SystemConfig;
40
41
  type ConfigFunction = StyleFn;
41
42
  interface ParserCache {
42
- breakpoints?: readonly (string | number)[] | Record<string, string | number>;
43
- media?: (string | null)[];
43
+ breakpoints?: Breakpoints;
44
+ media: (string | null)[];
44
45
  }
45
46
  interface Parser {
46
47
  (...args: any[]): any;
@@ -1,3 +1,4 @@
1
+ import { t as Breakpoints } from "./media-np0uvO4C.cjs";
1
2
  import * as CSS from "csstype";
2
3
  //#region src/core/core.d.ts
3
4
  type StyleObject = Record<string, any>;
@@ -12,7 +13,7 @@ interface CSSObject extends CSS.Properties<CSSLength>, CSS.PropertiesHyphen<CSSL
12
13
  [selectorOrAtRule: string]: CSSObject | string | number | undefined;
13
14
  }
14
15
  interface Theme {
15
- breakpoints?: readonly (string | number)[] | Record<string, string | number>;
16
+ breakpoints?: Breakpoints;
16
17
  disableStyledSystemCache?: boolean;
17
18
  [key: string]: any;
18
19
  }
@@ -39,8 +40,8 @@ type styleFn = Parser;
39
40
  type Config = SystemConfig;
40
41
  type ConfigFunction = StyleFn;
41
42
  interface ParserCache {
42
- breakpoints?: readonly (string | number)[] | Record<string, string | number>;
43
- media?: (string | null)[];
43
+ breakpoints?: Breakpoints;
44
+ media: (string | null)[];
44
45
  }
45
46
  interface Parser {
46
47
  (...args: any[]): any;
@@ -0,0 +1,6 @@
1
+ import { a as Parser } from "./index-BXP1-da3.mjs";
2
+ import "./types-B0SNbm6V.mjs";
3
+ //#region src/position/position.d.ts
4
+ declare const position: Parser;
5
+ //#endregion
6
+ export { position as t };
@@ -1,5 +1,5 @@
1
- import { a as Parser } from "./index-C0SM54dQ.cjs";
2
- import "./types-B52XAdkx.cjs";
1
+ import { a as Parser } from "./index-BYkO78Xl.cjs";
2
+ import "./types-B0SNbm6V.cjs";
3
3
  //#region src/space/space.d.ts
4
4
  declare const margin: Parser;
5
5
  declare const padding: Parser;
@@ -0,0 +1,6 @@
1
+ import { a as Parser } from "./index-BXP1-da3.mjs";
2
+ import "./types-B0SNbm6V.mjs";
3
+ //#region src/background/background.d.ts
4
+ declare const background: Parser;
5
+ //#endregion
6
+ export { background as t };
@@ -0,0 +1,6 @@
1
+ import { a as Parser } from "./index-BYkO78Xl.cjs";
2
+ import "./types-B0SNbm6V.cjs";
3
+ //#region src/border/border.d.ts
4
+ declare const border: Parser;
5
+ //#endregion
6
+ export { border as t };
@@ -0,0 +1,6 @@
1
+ import { a as Parser } from "./index-BYkO78Xl.cjs";
2
+ import "./types-B0SNbm6V.cjs";
3
+ //#region src/flexbox/flexbox.d.ts
4
+ declare const flexbox: Parser;
5
+ //#endregion
6
+ export { flexbox as t };
@@ -0,0 +1,6 @@
1
+ import { a as Parser } from "./index-BXP1-da3.mjs";
2
+ import "./types-B0SNbm6V.mjs";
3
+ //#region src/color/color.d.ts
4
+ declare const color: Parser;
5
+ //#endregion
6
+ export { color as t };
@@ -0,0 +1,6 @@
1
+ import { a as Parser } from "./index-BXP1-da3.mjs";
2
+ import "./types-B0SNbm6V.mjs";
3
+ //#region src/shadow/shadow.d.ts
4
+ declare const shadow: Parser;
5
+ //#endregion
6
+ export { shadow as t };
@@ -0,0 +1,6 @@
1
+ import { a as Parser } from "./index-BYkO78Xl.cjs";
2
+ import "./types-B0SNbm6V.cjs";
3
+ //#region src/color/color.d.ts
4
+ declare const color: Parser;
5
+ //#endregion
6
+ export { color as t };
@@ -0,0 +1,6 @@
1
+ import { a as Parser } from "./index-BYkO78Xl.cjs";
2
+ import "./types-B0SNbm6V.cjs";
3
+ //#region src/shadow/shadow.d.ts
4
+ declare const shadow: Parser;
5
+ //#endregion
6
+ export { shadow as t };
@@ -0,0 +1,6 @@
1
+ import { a as Parser } from "./index-BXP1-da3.mjs";
2
+ import "./types-B0SNbm6V.mjs";
3
+ //#region src/border/border.d.ts
4
+ declare const border: Parser;
5
+ //#endregion
6
+ export { border as t };
@@ -0,0 +1,6 @@
1
+ import { a as Parser } from "./index-BYkO78Xl.cjs";
2
+ import "./types-B0SNbm6V.cjs";
3
+ //#region src/layout/layout.d.ts
4
+ declare const layout: Parser;
5
+ //#endregion
6
+ export { layout as t };
@@ -0,0 +1,6 @@
1
+ import { a as Parser } from "./index-BXP1-da3.mjs";
2
+ import "./types-B0SNbm6V.mjs";
3
+ //#region src/grid/grid.d.ts
4
+ declare const grid: Parser;
5
+ //#endregion
6
+ export { grid as t };
@@ -0,0 +1,6 @@
1
+ import { a as Parser } from "./index-BXP1-da3.mjs";
2
+ import "./types-B0SNbm6V.mjs";
3
+ //#region src/flexbox/flexbox.d.ts
4
+ declare const flexbox: Parser;
5
+ //#endregion
6
+ export { flexbox as t };
@@ -0,0 +1,6 @@
1
+ import { a as Parser } from "./index-BYkO78Xl.cjs";
2
+ import "./types-B0SNbm6V.cjs";
3
+ //#region src/position/position.d.ts
4
+ declare const position: Parser;
5
+ //#endregion
6
+ export { position as t };
@@ -1,5 +1,5 @@
1
- import { a as Parser } from "./index-C0SM54dQ.cjs";
2
- import "./types-B52XAdkx.cjs";
1
+ import { a as Parser } from "./index-BYkO78Xl.cjs";
2
+ import "./types-B0SNbm6V.cjs";
3
3
  //#region src/variant/variant.d.ts
4
4
  interface VariantOptions {
5
5
  scale?: string;
@@ -0,0 +1,6 @@
1
+ import { a as Parser } from "./index-BYkO78Xl.cjs";
2
+ import "./types-B0SNbm6V.cjs";
3
+ //#region src/background/background.d.ts
4
+ declare const background: Parser;
5
+ //#endregion
6
+ export { background as t };
@@ -0,0 +1,6 @@
1
+ import { a as Parser } from "./index-BYkO78Xl.cjs";
2
+ import "./types-B0SNbm6V.cjs";
3
+ //#region src/typography/typography.d.ts
4
+ declare const typography: Parser;
5
+ //#endregion
6
+ export { typography as t };
@@ -0,0 +1,6 @@
1
+ import { a as Parser } from "./index-BXP1-da3.mjs";
2
+ import "./types-B0SNbm6V.mjs";
3
+ //#region src/layout/layout.d.ts
4
+ declare const layout: Parser;
5
+ //#endregion
6
+ export { layout as t };
@@ -1,5 +1,5 @@
1
- import { a as Parser } from "./index-C0SM54dQ.mjs";
2
- import "./types-B52XAdkx.mjs";
1
+ import { a as Parser } from "./index-BXP1-da3.mjs";
2
+ import "./types-B0SNbm6V.mjs";
3
3
  //#region src/space/space.d.ts
4
4
  declare const margin: Parser;
5
5
  declare const padding: Parser;
package/dist/index.cjs CHANGED
@@ -1,4 +1,5 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_media = require("./media-BoIPXBPV.cjs");
2
3
  const require_core = require("./core.cjs");
3
4
  const require_background = require("./background-wugr6cG7.cjs");
4
5
  const require_border = require("./border-UuT-fTpy.cjs");
@@ -10,7 +11,7 @@ const require_position = require("./position-zWvCE4hD.cjs");
10
11
  const require_typography = require("./typography-7jHZXqtc.cjs");
11
12
  const require_space = require("./space-Q-1mECZz.cjs");
12
13
  const require_shadow = require("./shadow-BrDnaQQl.cjs");
13
- const require_variant = require("./variant-BSwNEY5l.cjs");
14
+ const require_variant = require("./variant-DdSForfI.cjs");
14
15
  //#region src/style/style.ts
15
16
  const style = ({ prop, cssProperty, alias, key, transformValue, scale, properties }) => {
16
17
  const config = {};
@@ -125,10 +126,12 @@ exports.borderWidth = borderWidth;
125
126
  exports.borders = require_border.border;
126
127
  exports.bottom = bottom;
127
128
  exports.boxShadow = require_shadow.shadow;
129
+ exports.breakpointQueries = require_media.breakpointQueries;
128
130
  exports.buttonStyle = require_variant.buttonStyle;
129
131
  exports.color = require_color.color;
130
132
  exports.colorStyle = require_variant.colorStyle;
131
133
  exports.compose = require_core.compose;
134
+ exports.createMediaQuery = require_media.createMediaQuery;
132
135
  exports.createParser = require_core.createParser;
133
136
  exports.createStyleFunction = require_core.createStyleFunction;
134
137
  exports.display = display;