@soroush.tech/styled-system 5.8.3 → 6.0.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 (107) 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 +28 -24
  8. package/dist/core.d.cts +3 -2
  9. package/dist/core.d.mts +3 -2
  10. package/dist/core.mjs +23 -25
  11. package/dist/{css-BTuRmXCo.mjs → css-Ba4jdXOq.mjs} +27 -17
  12. package/dist/{css-CeNnKyGm.cjs → css-D1zAlDVz.cjs} +27 -17
  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-BlMUPDJM.cjs +156 -0
  20. package/dist/grid-CYjL4-gb.mjs +126 -0
  21. package/dist/grid.cjs +5 -1
  22. package/dist/grid.d.cts +3 -3
  23. package/dist/grid.d.mts +3 -3
  24. package/dist/grid.mjs +2 -2
  25. package/dist/index-90_abc05.d.mts +6 -0
  26. package/dist/{index-6cAxfKIl.d.mts → index-BQPI7z-B.d.mts} +2 -2
  27. package/dist/index-BmyL5qR7.d.cts +6 -0
  28. package/dist/index-Bwpwvg1h.d.cts +6 -0
  29. package/dist/index-Bxh1FNcS.d.cts +6 -0
  30. package/dist/index-ByDfI1go.d.cts +6 -0
  31. package/dist/index-C1IdMVtQ.d.mts +6 -0
  32. package/dist/index-CQWZd4iQ.d.mts +6 -0
  33. package/dist/index-CQyvhO-h.d.cts +6 -0
  34. package/dist/index-CXK27dY_.d.cts +42 -0
  35. package/dist/{index-O6xVfQo3.d.cts → index-CgJzEbXW.d.cts} +2 -2
  36. package/dist/{index-DbknCBOx.d.mts → index-ClbGlQxq.d.mts} +2 -2
  37. package/dist/{index-bHspW0eP.d.cts → index-Csbxj8Yo.d.cts} +2 -2
  38. package/dist/index-D1mRMWDm.d.cts +6 -0
  39. package/dist/index-D2v_oJEm.d.cts +6 -0
  40. package/dist/index-D5xp7RWT.d.cts +6 -0
  41. package/dist/index-D7IZ8-Zq.d.mts +42 -0
  42. package/dist/index-DKz4zEeT.d.mts +6 -0
  43. package/dist/{index-C0SM54dQ.d.cts → index-IulNhyDt.d.mts} +4 -3
  44. package/dist/index-MbcUN6uf.d.mts +6 -0
  45. package/dist/index-aRomguCQ.d.mts +6 -0
  46. package/dist/{index-C0SM54dQ.d.mts → index-iVqAMF2L.d.cts} +4 -3
  47. package/dist/index-nfjmLzHF.d.mts +6 -0
  48. package/dist/index-pzogdlkS.d.mts +6 -0
  49. package/dist/index.cjs +14 -3
  50. package/dist/index.d.cts +15 -14
  51. package/dist/index.d.mts +15 -14
  52. package/dist/index.mjs +5 -4
  53. package/dist/{layout-kqQ2OsL5.cjs → layout-D3pG7vBp.cjs} +3 -1
  54. package/dist/{layout-lG3i5mWZ.mjs → layout-DF83ooFn.mjs} +3 -1
  55. package/dist/layout.cjs +1 -1
  56. package/dist/layout.d.cts +3 -3
  57. package/dist/layout.d.mts +3 -3
  58. package/dist/layout.mjs +1 -1
  59. package/dist/media-Bho3l7WK.mjs +85 -0
  60. package/dist/media-CfYDomHt.d.cts +54 -0
  61. package/dist/media-CfYDomHt.d.mts +54 -0
  62. package/dist/media-DSJdRy_k.cjs +120 -0
  63. package/dist/position.d.cts +2 -2
  64. package/dist/position.d.mts +2 -2
  65. package/dist/{presets-Dg3yjRZU.mjs → presets-DsxPfpSE.mjs} +4 -4
  66. package/dist/{presets-B2nFh_Zn.cjs → presets-KURYP1_7.cjs} +4 -4
  67. package/dist/prop-types.cjs +3 -3
  68. package/dist/prop-types.mjs +3 -3
  69. package/dist/props.cjs +1 -1
  70. package/dist/props.mjs +1 -1
  71. package/dist/shadow.d.cts +2 -2
  72. package/dist/shadow.d.mts +2 -2
  73. package/dist/should-forward-prop.cjs +1 -1
  74. package/dist/should-forward-prop.mjs +1 -1
  75. package/dist/space.d.cts +2 -2
  76. package/dist/space.d.mts +2 -2
  77. package/dist/{types-B52XAdkx.d.cts → types-Cv5WjcVA.d.cts} +36 -4
  78. package/dist/{types-B52XAdkx.d.mts → types-Cv5WjcVA.d.mts} +36 -4
  79. package/dist/typography.d.cts +2 -2
  80. package/dist/typography.d.mts +2 -2
  81. package/dist/{variant-BSwNEY5l.cjs → variant-BSPTyRcQ.cjs} +1 -1
  82. package/dist/{variant-NupmzzRg.mjs → variant-D1u5rSqm.mjs} +1 -1
  83. package/dist/variant.cjs +1 -1
  84. package/dist/variant.d.cts +2 -2
  85. package/dist/variant.d.mts +2 -2
  86. package/dist/variant.mjs +1 -1
  87. package/package.json +4 -4
  88. package/dist/grid-Bpk-QjhF.mjs +0 -41
  89. package/dist/grid-CpvRIng4.cjs +0 -47
  90. package/dist/index-B89zA95f.d.mts +0 -6
  91. package/dist/index-BBuQfHYC.d.cts +0 -6
  92. package/dist/index-BNnm8JPL.d.mts +0 -6
  93. package/dist/index-B_swWveU.d.cts +0 -6
  94. package/dist/index-Bqj29Szo.d.mts +0 -6
  95. package/dist/index-C-8kLZ_X.d.mts +0 -6
  96. package/dist/index-ClSRfFkX.d.cts +0 -6
  97. package/dist/index-CpDyBw8z.d.cts +0 -6
  98. package/dist/index-D11y4gdv.d.mts +0 -6
  99. package/dist/index-DLQzYvfH.d.mts +0 -6
  100. package/dist/index-DOmnNWoA.d.cts +0 -6
  101. package/dist/index-Daclwf93.d.cts +0 -6
  102. package/dist/index-DdlTo1c6.d.mts +0 -6
  103. package/dist/index-DluQIAXz.d.cts +0 -6
  104. package/dist/index-DuI1XGHT.d.mts +0 -6
  105. package/dist/index-NT55TmXe.d.cts +0 -6
  106. package/dist/index-RXhfbqjT.d.cts +0 -6
  107. package/dist/index-yC71Yo0d.d.mts +0 -6
package/dist/space.d.mts CHANGED
@@ -1,3 +1,3 @@
1
- import { R as GapProps, T as ColumnGapProps, bt as RowGapProps, ht as PaddingProps, ot as MarginProps, wt as SpaceProps } from "./types-B52XAdkx.mjs";
2
- import { i as space, n as margin, r as padding, t as gap } from "./index-6cAxfKIl.mjs";
1
+ import { B as GapProps, Ct as RowGapProps, Dt as SpaceProps, E as ColumnGapProps, lt as MarginProps, vt as PaddingProps } from "./types-Cv5WjcVA.mjs";
2
+ import { i as space, n as margin, r as padding, t as gap } from "./index-BQPI7z-B.mjs";
3
3
  export { type ColumnGapProps, type GapProps, type MarginProps, type PaddingProps, type RowGapProps, type SpaceProps, space as default, space, gap, margin, padding };
@@ -4,7 +4,8 @@ type ObjectOrArray<T, K extends keyof any = keyof any> = T[] | Record<K, T | Rec
4
4
  type Scale = ObjectOrArray<number | string>;
5
5
  type TLengthStyledSystem = string | number;
6
6
  interface Theme<TLength = TLengthStyledSystem> {
7
- breakpoints?: ObjectOrArray<number | string | symbol>;
7
+ /** Sizes by name or position; a scale may also carry helper methods, which are not breakpoints. */
8
+ breakpoints?: ObjectOrArray<number | string | symbol> | Record<string, unknown>;
8
9
  mediaQueries?: {
9
10
  [size: string]: string;
10
11
  };
@@ -28,7 +29,15 @@ interface Theme<TLength = TLengthStyledSystem> {
28
29
  }
29
30
  type RequiredTheme = Required<Theme>;
30
31
  type ThemeValue<K extends keyof ThemeType, ThemeType, TVal = any> = NonNullable<ThemeType[K]> extends TVal[] ? number : NonNullable<ThemeType[K]> extends Record<infer E, TVal> ? E : NonNullable<ThemeType[K]> extends ObjectOrArray<infer F> ? F : never;
31
- type ResponsiveValue<T, ThemeType extends Theme = RequiredTheme> = T | null | Array<T | null> | { [key in (ThemeValue<'breakpoints', ThemeType> & string) | number]?: T; };
32
+ type SizeKeys<Scale> = Scale extends readonly unknown[] ? never : { [K in keyof Scale]: Scale[K] extends ((...args: never[]) => unknown) ? never : K; }[keyof Scale] & string;
33
+ /** The theme's breakpoint names (array indexes for a list scale). */
34
+ type BreakpointName<ThemeType extends Theme = RequiredTheme> = SizeKeys<NonNullable<ThemeType['breakpoints']>> | number;
35
+ /**
36
+ * A responsive value: one value; an array mapped by position onto the breakpoints,
37
+ * mobile-first (`null` skips one); or an object keyed by breakpoint name, each from that
38
+ * size up, plus `cq<Name>` keys for the same sizes as container queries.
39
+ */
40
+ type ResponsiveValue<T, ThemeType extends Theme = RequiredTheme> = T | null | Array<T | null> | ({ [key in BreakpointName<ThemeType>]?: T; } & { [key in `cq${Capitalize<SizeKeys<NonNullable<ThemeType['breakpoints']>>>}`]?: T; });
32
41
  interface MarginProps<ThemeType extends Theme = RequiredTheme, TVal = ThemeValue<'space', ThemeType>> {
33
42
  m?: ResponsiveValue<TVal, ThemeType>;
34
43
  margin?: ResponsiveValue<TVal, ThemeType>;
@@ -110,7 +119,12 @@ interface VerticalAlignProps<ThemeType extends Theme = RequiredTheme, TVal = CSS
110
119
  interface AspectRatioProps<ThemeType extends Theme = RequiredTheme> {
111
120
  aspectRatio?: ResponsiveValue<CSS.Property.AspectRatio, ThemeType>;
112
121
  }
113
- interface LayoutProps<ThemeType extends Theme = RequiredTheme> extends WidthProps<ThemeType>, HeightProps<ThemeType>, MinWidthProps<ThemeType>, MinHeightProps<ThemeType>, MaxWidthProps<ThemeType>, MaxHeightProps<ThemeType>, DisplayProps<ThemeType>, VerticalAlignProps<ThemeType>, AspectRatioProps<ThemeType>, SizeProps<ThemeType>, OverflowProps<ThemeType> {}
122
+ /** Not in upstream styled-system: makes the element a query container. */
123
+ interface ContainerProps<ThemeType extends Theme = RequiredTheme> {
124
+ containerType?: ResponsiveValue<CSS.Property.ContainerType, ThemeType>;
125
+ containerName?: ResponsiveValue<CSS.Property.ContainerName, ThemeType>;
126
+ }
127
+ interface LayoutProps<ThemeType extends Theme = RequiredTheme> extends WidthProps<ThemeType>, HeightProps<ThemeType>, MinWidthProps<ThemeType>, MinHeightProps<ThemeType>, MaxWidthProps<ThemeType>, MaxHeightProps<ThemeType>, DisplayProps<ThemeType>, VerticalAlignProps<ThemeType>, AspectRatioProps<ThemeType>, ContainerProps<ThemeType>, SizeProps<ThemeType>, OverflowProps<ThemeType> {}
114
128
  interface FontFamilyProps<ThemeType extends Theme = RequiredTheme> {
115
129
  fontFamily?: ResponsiveValue<CSS.Property.FontFamily, ThemeType>;
116
130
  }
@@ -325,6 +339,24 @@ interface GridTemplateAreasProps<ThemeType extends Theme = RequiredTheme> {
325
339
  interface GridAreaProps<ThemeType extends Theme = RequiredTheme> {
326
340
  gridArea?: ResponsiveValue<CSS.Property.GridArea, ThemeType>;
327
341
  }
342
+ /**
343
+ * Not in upstream styled-system: the layout grid from `theme.layout` on a Grid or Flex - `true`
344
+ * for the theme's, or entries for named breakpoints that replace it there only
345
+ * (`{ lg: { columns: 16 } }`).
346
+ */
347
+ interface LayoutGridProps<ThemeType extends Theme = RequiredTheme> {
348
+ layout?: boolean | { [key in BreakpointName<ThemeType>]?: {
349
+ columns?: number;
350
+ margin?: ThemeValue<'space', ThemeType> | string;
351
+ gutter?: ThemeValue<'space', ThemeType> | string;
352
+ mode?: 'fluid' | 'fixed';
353
+ maxWidth?: string;
354
+ }; };
355
+ }
356
+ /** Not in upstream styled-system: how many layout-grid columns the element takes. */
357
+ interface SpanProps<ThemeType extends Theme = RequiredTheme> {
358
+ span?: ResponsiveValue<number, ThemeType>;
359
+ }
328
360
  interface GridProps<ThemeType extends Theme = RequiredTheme> extends GridGapProps<ThemeType>, GridColumnGapProps<ThemeType>, GridRowGapProps<ThemeType>, GridColumnProps<ThemeType>, GridRowProps<ThemeType>, GridAutoFlowProps<ThemeType>, GridAutoColumnsProps<ThemeType>, GridAutoRowsProps<ThemeType>, GridTemplateColumnsProps<ThemeType>, GridTemplateRowsProps<ThemeType>, GridTemplateAreasProps<ThemeType>, GridAreaProps<ThemeType> {}
329
361
  interface BoxShadowProps<ThemeType extends Theme = RequiredTheme> {
330
362
  boxShadow?: ResponsiveValue<CSS.Property.BoxShadow | string | number, ThemeType>;
@@ -343,4 +375,4 @@ interface ColorStyleProps<ThemeType extends Theme = RequiredTheme> {
343
375
  colors?: ResponsiveValue<string, ThemeType>;
344
376
  }
345
377
  //#endregion
346
- export { JustifyContentProps as $, FlexProps as A, TextDecorationLineProps as At, GridAutoColumnsProps as B, TopProps as Bt, ColorProps as C, SizeProps as Ct, FlexBasisProps as D, TextAlignProps as Dt, DisplayProps as E, TextAlignLastProps as Et, FontSizeProps as F, TextShadowProps as Ft, GridGapProps as G, ZIndexProps as Gt, GridAutoRowsProps as H, VerticalAlignProps as Ht, FontStyleProps as I, TextStyleProps as It, GridRowProps as J, GridProps as K, FontWeightProps as L, TextTransformProps as Lt, FlexWrapProps as M, TextDecorationStyleProps as Mt, FlexboxProps as N, TextDecorationThicknessProps as Nt, FlexDirectionProps as O, TextColorProps as Ot, FontFamilyProps as P, TextOverflowProps as Pt, HeightProps as Q, GapProps as R, Theme as Rt, ButtonStyleProps as S, ShadowProps as St, ColumnGapProps as T, TLengthStyledSystem as Tt, GridColumnGapProps as U, WhiteSpaceProps as Ut, GridAutoFlowProps as V, TypographyProps as Vt, GridColumnProps as W, WidthProps as Wt, GridTemplateColumnsProps as X, GridTemplateAreasProps as Y, GridTemplateRowsProps as Z, BorderStyleProps as _, RequiredTheme as _t, BackgroundColorProps as a, LineHeightProps as at, BottomProps as b, RowGapProps as bt, BackgroundProps as c, MaxWidthProps as ct, BorderBottomProps as d, ObjectOrArray as dt, JustifyItemsProps as et, BorderColorProps as f, OpacityProps as ft, BorderRightProps as g, PositionProps as gt, BorderRadiusProps as h, PaddingProps as ht, AspectRatioProps as i, LetterSpacingProps as it, FlexShrinkProps as j, TextDecorationProps as jt, FlexGrowProps as k, TextDecorationColorProps as kt, BackgroundRepeatProps as l, MinHeightProps as lt, BorderProps as m, OverflowProps as mt, AlignItemsProps as n, LayoutProps as nt, BackgroundImageProps as o, MarginProps as ot, BorderLeftProps as p, OrderProps as pt, GridRowGapProps as q, AlignSelfProps as r, LeftProps as rt, BackgroundPositionProps as s, MaxHeightProps as st, AlignContentProps as t, JustifySelfProps as tt, BackgroundSizeProps as u, MinWidthProps as ut, BorderTopProps as v, ResponsiveValue as vt, ColorStyleProps as w, SpaceProps as wt, BoxShadowProps as x, Scale as xt, BorderWidthProps as y, RightProps as yt, GridAreaProps as z, ThemeValue as zt };
378
+ export { GridTemplateRowsProps as $, FlexDirectionProps as A, TextAlignLastProps as At, GapProps as B, TextStyleProps as Bt, ButtonStyleProps as C, RowGapProps as Ct, ContainerProps as D, SpaceProps as Dt, ColumnGapProps as E, SizeProps as Et, FlexboxProps as F, TextDecorationProps as Ft, GridColumnGapProps as G, TypographyProps as Gt, GridAutoColumnsProps as H, Theme as Ht, FontFamilyProps as I, TextDecorationStyleProps as It, GridProps as J, WidthProps as Jt, GridColumnProps as K, VerticalAlignProps as Kt, FontSizeProps as L, TextDecorationThicknessProps as Lt, FlexProps as M, TextColorProps as Mt, FlexShrinkProps as N, TextDecorationColorProps as Nt, DisplayProps as O, SpanProps as Ot, FlexWrapProps as P, TextDecorationLineProps as Pt, GridTemplateColumnsProps as Q, FontStyleProps as R, TextOverflowProps as Rt, BreakpointName as S, RightProps as St, ColorStyleProps as T, ShadowProps as Tt, GridAutoFlowProps as U, ThemeValue as Ut, GridAreaProps as V, TextTransformProps as Vt, GridAutoRowsProps as W, TopProps as Wt, GridRowProps as X, GridRowGapProps as Y, ZIndexProps as Yt, GridTemplateAreasProps as Z, BorderStyleProps as _, OverflowProps as _t, BackgroundColorProps as a, LayoutProps as at, BottomProps as b, RequiredTheme as bt, BackgroundProps as c, LineHeightProps as ct, BorderBottomProps as d, MaxWidthProps as dt, HeightProps as et, BorderColorProps as f, MinHeightProps as ft, BorderRightProps as g, OrderProps as gt, BorderRadiusProps as h, OpacityProps as ht, AspectRatioProps as i, LayoutGridProps as it, FlexGrowProps as j, TextAlignProps as jt, FlexBasisProps as k, TLengthStyledSystem as kt, BackgroundRepeatProps as l, MarginProps as lt, BorderProps as m, ObjectOrArray as mt, AlignItemsProps as n, JustifyItemsProps as nt, BackgroundImageProps as o, LeftProps as ot, BorderLeftProps as p, MinWidthProps as pt, GridGapProps as q, WhiteSpaceProps as qt, AlignSelfProps as r, JustifySelfProps as rt, BackgroundPositionProps as s, LetterSpacingProps as st, AlignContentProps as t, JustifyContentProps as tt, BackgroundSizeProps as u, MaxHeightProps as ut, BorderTopProps as v, PaddingProps as vt, ColorProps as w, Scale as wt, BoxShadowProps as x, ResponsiveValue as xt, BorderWidthProps as y, PositionProps as yt, FontWeightProps as z, TextShadowProps as zt };
@@ -4,7 +4,8 @@ type ObjectOrArray<T, K extends keyof any = keyof any> = T[] | Record<K, T | Rec
4
4
  type Scale = ObjectOrArray<number | string>;
5
5
  type TLengthStyledSystem = string | number;
6
6
  interface Theme<TLength = TLengthStyledSystem> {
7
- breakpoints?: ObjectOrArray<number | string | symbol>;
7
+ /** Sizes by name or position; a scale may also carry helper methods, which are not breakpoints. */
8
+ breakpoints?: ObjectOrArray<number | string | symbol> | Record<string, unknown>;
8
9
  mediaQueries?: {
9
10
  [size: string]: string;
10
11
  };
@@ -28,7 +29,15 @@ interface Theme<TLength = TLengthStyledSystem> {
28
29
  }
29
30
  type RequiredTheme = Required<Theme>;
30
31
  type ThemeValue<K extends keyof ThemeType, ThemeType, TVal = any> = NonNullable<ThemeType[K]> extends TVal[] ? number : NonNullable<ThemeType[K]> extends Record<infer E, TVal> ? E : NonNullable<ThemeType[K]> extends ObjectOrArray<infer F> ? F : never;
31
- type ResponsiveValue<T, ThemeType extends Theme = RequiredTheme> = T | null | Array<T | null> | { [key in (ThemeValue<'breakpoints', ThemeType> & string) | number]?: T; };
32
+ type SizeKeys<Scale> = Scale extends readonly unknown[] ? never : { [K in keyof Scale]: Scale[K] extends ((...args: never[]) => unknown) ? never : K; }[keyof Scale] & string;
33
+ /** The theme's breakpoint names (array indexes for a list scale). */
34
+ type BreakpointName<ThemeType extends Theme = RequiredTheme> = SizeKeys<NonNullable<ThemeType['breakpoints']>> | number;
35
+ /**
36
+ * A responsive value: one value; an array mapped by position onto the breakpoints,
37
+ * mobile-first (`null` skips one); or an object keyed by breakpoint name, each from that
38
+ * size up, plus `cq<Name>` keys for the same sizes as container queries.
39
+ */
40
+ type ResponsiveValue<T, ThemeType extends Theme = RequiredTheme> = T | null | Array<T | null> | ({ [key in BreakpointName<ThemeType>]?: T; } & { [key in `cq${Capitalize<SizeKeys<NonNullable<ThemeType['breakpoints']>>>}`]?: T; });
32
41
  interface MarginProps<ThemeType extends Theme = RequiredTheme, TVal = ThemeValue<'space', ThemeType>> {
33
42
  m?: ResponsiveValue<TVal, ThemeType>;
34
43
  margin?: ResponsiveValue<TVal, ThemeType>;
@@ -110,7 +119,12 @@ interface VerticalAlignProps<ThemeType extends Theme = RequiredTheme, TVal = CSS
110
119
  interface AspectRatioProps<ThemeType extends Theme = RequiredTheme> {
111
120
  aspectRatio?: ResponsiveValue<CSS.Property.AspectRatio, ThemeType>;
112
121
  }
113
- interface LayoutProps<ThemeType extends Theme = RequiredTheme> extends WidthProps<ThemeType>, HeightProps<ThemeType>, MinWidthProps<ThemeType>, MinHeightProps<ThemeType>, MaxWidthProps<ThemeType>, MaxHeightProps<ThemeType>, DisplayProps<ThemeType>, VerticalAlignProps<ThemeType>, AspectRatioProps<ThemeType>, SizeProps<ThemeType>, OverflowProps<ThemeType> {}
122
+ /** Not in upstream styled-system: makes the element a query container. */
123
+ interface ContainerProps<ThemeType extends Theme = RequiredTheme> {
124
+ containerType?: ResponsiveValue<CSS.Property.ContainerType, ThemeType>;
125
+ containerName?: ResponsiveValue<CSS.Property.ContainerName, ThemeType>;
126
+ }
127
+ interface LayoutProps<ThemeType extends Theme = RequiredTheme> extends WidthProps<ThemeType>, HeightProps<ThemeType>, MinWidthProps<ThemeType>, MinHeightProps<ThemeType>, MaxWidthProps<ThemeType>, MaxHeightProps<ThemeType>, DisplayProps<ThemeType>, VerticalAlignProps<ThemeType>, AspectRatioProps<ThemeType>, ContainerProps<ThemeType>, SizeProps<ThemeType>, OverflowProps<ThemeType> {}
114
128
  interface FontFamilyProps<ThemeType extends Theme = RequiredTheme> {
115
129
  fontFamily?: ResponsiveValue<CSS.Property.FontFamily, ThemeType>;
116
130
  }
@@ -325,6 +339,24 @@ interface GridTemplateAreasProps<ThemeType extends Theme = RequiredTheme> {
325
339
  interface GridAreaProps<ThemeType extends Theme = RequiredTheme> {
326
340
  gridArea?: ResponsiveValue<CSS.Property.GridArea, ThemeType>;
327
341
  }
342
+ /**
343
+ * Not in upstream styled-system: the layout grid from `theme.layout` on a Grid or Flex - `true`
344
+ * for the theme's, or entries for named breakpoints that replace it there only
345
+ * (`{ lg: { columns: 16 } }`).
346
+ */
347
+ interface LayoutGridProps<ThemeType extends Theme = RequiredTheme> {
348
+ layout?: boolean | { [key in BreakpointName<ThemeType>]?: {
349
+ columns?: number;
350
+ margin?: ThemeValue<'space', ThemeType> | string;
351
+ gutter?: ThemeValue<'space', ThemeType> | string;
352
+ mode?: 'fluid' | 'fixed';
353
+ maxWidth?: string;
354
+ }; };
355
+ }
356
+ /** Not in upstream styled-system: how many layout-grid columns the element takes. */
357
+ interface SpanProps<ThemeType extends Theme = RequiredTheme> {
358
+ span?: ResponsiveValue<number, ThemeType>;
359
+ }
328
360
  interface GridProps<ThemeType extends Theme = RequiredTheme> extends GridGapProps<ThemeType>, GridColumnGapProps<ThemeType>, GridRowGapProps<ThemeType>, GridColumnProps<ThemeType>, GridRowProps<ThemeType>, GridAutoFlowProps<ThemeType>, GridAutoColumnsProps<ThemeType>, GridAutoRowsProps<ThemeType>, GridTemplateColumnsProps<ThemeType>, GridTemplateRowsProps<ThemeType>, GridTemplateAreasProps<ThemeType>, GridAreaProps<ThemeType> {}
329
361
  interface BoxShadowProps<ThemeType extends Theme = RequiredTheme> {
330
362
  boxShadow?: ResponsiveValue<CSS.Property.BoxShadow | string | number, ThemeType>;
@@ -343,4 +375,4 @@ interface ColorStyleProps<ThemeType extends Theme = RequiredTheme> {
343
375
  colors?: ResponsiveValue<string, ThemeType>;
344
376
  }
345
377
  //#endregion
346
- export { JustifyContentProps as $, FlexProps as A, TextDecorationLineProps as At, GridAutoColumnsProps as B, TopProps as Bt, ColorProps as C, SizeProps as Ct, FlexBasisProps as D, TextAlignProps as Dt, DisplayProps as E, TextAlignLastProps as Et, FontSizeProps as F, TextShadowProps as Ft, GridGapProps as G, ZIndexProps as Gt, GridAutoRowsProps as H, VerticalAlignProps as Ht, FontStyleProps as I, TextStyleProps as It, GridRowProps as J, GridProps as K, FontWeightProps as L, TextTransformProps as Lt, FlexWrapProps as M, TextDecorationStyleProps as Mt, FlexboxProps as N, TextDecorationThicknessProps as Nt, FlexDirectionProps as O, TextColorProps as Ot, FontFamilyProps as P, TextOverflowProps as Pt, HeightProps as Q, GapProps as R, Theme as Rt, ButtonStyleProps as S, ShadowProps as St, ColumnGapProps as T, TLengthStyledSystem as Tt, GridColumnGapProps as U, WhiteSpaceProps as Ut, GridAutoFlowProps as V, TypographyProps as Vt, GridColumnProps as W, WidthProps as Wt, GridTemplateColumnsProps as X, GridTemplateAreasProps as Y, GridTemplateRowsProps as Z, BorderStyleProps as _, RequiredTheme as _t, BackgroundColorProps as a, LineHeightProps as at, BottomProps as b, RowGapProps as bt, BackgroundProps as c, MaxWidthProps as ct, BorderBottomProps as d, ObjectOrArray as dt, JustifyItemsProps as et, BorderColorProps as f, OpacityProps as ft, BorderRightProps as g, PositionProps as gt, BorderRadiusProps as h, PaddingProps as ht, AspectRatioProps as i, LetterSpacingProps as it, FlexShrinkProps as j, TextDecorationProps as jt, FlexGrowProps as k, TextDecorationColorProps as kt, BackgroundRepeatProps as l, MinHeightProps as lt, BorderProps as m, OverflowProps as mt, AlignItemsProps as n, LayoutProps as nt, BackgroundImageProps as o, MarginProps as ot, BorderLeftProps as p, OrderProps as pt, GridRowGapProps as q, AlignSelfProps as r, LeftProps as rt, BackgroundPositionProps as s, MaxHeightProps as st, AlignContentProps as t, JustifySelfProps as tt, BackgroundSizeProps as u, MinWidthProps as ut, BorderTopProps as v, ResponsiveValue as vt, ColorStyleProps as w, SpaceProps as wt, BoxShadowProps as x, Scale as xt, BorderWidthProps as y, RightProps as yt, GridAreaProps as z, ThemeValue as zt };
378
+ export { GridTemplateRowsProps as $, FlexDirectionProps as A, TextAlignLastProps as At, GapProps as B, TextStyleProps as Bt, ButtonStyleProps as C, RowGapProps as Ct, ContainerProps as D, SpaceProps as Dt, ColumnGapProps as E, SizeProps as Et, FlexboxProps as F, TextDecorationProps as Ft, GridColumnGapProps as G, TypographyProps as Gt, GridAutoColumnsProps as H, Theme as Ht, FontFamilyProps as I, TextDecorationStyleProps as It, GridProps as J, WidthProps as Jt, GridColumnProps as K, VerticalAlignProps as Kt, FontSizeProps as L, TextDecorationThicknessProps as Lt, FlexProps as M, TextColorProps as Mt, FlexShrinkProps as N, TextDecorationColorProps as Nt, DisplayProps as O, SpanProps as Ot, FlexWrapProps as P, TextDecorationLineProps as Pt, GridTemplateColumnsProps as Q, FontStyleProps as R, TextOverflowProps as Rt, BreakpointName as S, RightProps as St, ColorStyleProps as T, ShadowProps as Tt, GridAutoFlowProps as U, ThemeValue as Ut, GridAreaProps as V, TextTransformProps as Vt, GridAutoRowsProps as W, TopProps as Wt, GridRowProps as X, GridRowGapProps as Y, ZIndexProps as Yt, GridTemplateAreasProps as Z, BorderStyleProps as _, OverflowProps as _t, BackgroundColorProps as a, LayoutProps as at, BottomProps as b, RequiredTheme as bt, BackgroundProps as c, LineHeightProps as ct, BorderBottomProps as d, MaxWidthProps as dt, HeightProps as et, BorderColorProps as f, MinHeightProps as ft, BorderRightProps as g, OrderProps as gt, BorderRadiusProps as h, OpacityProps as ht, AspectRatioProps as i, LayoutGridProps as it, FlexGrowProps as j, TextAlignProps as jt, FlexBasisProps as k, TLengthStyledSystem as kt, BackgroundRepeatProps as l, MarginProps as lt, BorderProps as m, ObjectOrArray as mt, AlignItemsProps as n, JustifyItemsProps as nt, BackgroundImageProps as o, LeftProps as ot, BorderLeftProps as p, MinWidthProps as pt, GridGapProps as q, WhiteSpaceProps as qt, AlignSelfProps as r, JustifySelfProps as rt, BackgroundPositionProps as s, LetterSpacingProps as st, AlignContentProps as t, JustifyContentProps as tt, BackgroundSizeProps as u, MaxHeightProps as ut, BorderTopProps as v, PaddingProps as vt, ColorProps as w, Scale as wt, BoxShadowProps as x, ResponsiveValue as xt, BorderWidthProps as y, PositionProps as yt, FontWeightProps as z, TextShadowProps as zt };
@@ -1,3 +1,3 @@
1
- import { Dt as TextAlignProps, F as FontSizeProps, I as FontStyleProps, L as FontWeightProps, P as FontFamilyProps, Pt as TextOverflowProps, Ut as WhiteSpaceProps, Vt as TypographyProps, at as LineHeightProps, it as LetterSpacingProps } from "./types-B52XAdkx.cjs";
2
- import { t as typography } from "./index-DluQIAXz.cjs";
1
+ import { Gt as TypographyProps, I as FontFamilyProps, L as FontSizeProps, R as FontStyleProps, Rt as TextOverflowProps, ct as LineHeightProps, jt as TextAlignProps, qt as WhiteSpaceProps, st as LetterSpacingProps, z as FontWeightProps } from "./types-Cv5WjcVA.cjs";
2
+ import { t as typography } from "./index-BmyL5qR7.cjs";
3
3
  export { type FontFamilyProps, type FontSizeProps, type FontStyleProps, type FontWeightProps, type LetterSpacingProps, type LineHeightProps, type TextAlignProps, type TextOverflowProps, type TypographyProps, type WhiteSpaceProps, typography as default, typography };
@@ -1,3 +1,3 @@
1
- import { Dt as TextAlignProps, F as FontSizeProps, I as FontStyleProps, L as FontWeightProps, P as FontFamilyProps, Pt as TextOverflowProps, Ut as WhiteSpaceProps, Vt as TypographyProps, at as LineHeightProps, it as LetterSpacingProps } from "./types-B52XAdkx.mjs";
2
- import { t as typography } from "./index-B89zA95f.mjs";
1
+ import { Gt as TypographyProps, I as FontFamilyProps, L as FontSizeProps, R as FontStyleProps, Rt as TextOverflowProps, ct as LineHeightProps, jt as TextAlignProps, qt as WhiteSpaceProps, st as LetterSpacingProps, z as FontWeightProps } from "./types-Cv5WjcVA.mjs";
2
+ import { t as typography } from "./index-nfjmLzHF.mjs";
3
3
  export { type FontFamilyProps, type FontSizeProps, type FontStyleProps, type FontWeightProps, type LetterSpacingProps, type LineHeightProps, type TextAlignProps, type TextOverflowProps, type TypographyProps, type WhiteSpaceProps, typography as default, typography };
@@ -1,5 +1,5 @@
1
1
  const require_core = require("./core.cjs");
2
- const require_css = require("./css-CeNnKyGm.cjs");
2
+ const require_css = require("./css-D1zAlDVz.cjs");
3
3
  //#region src/variant/variant.ts
4
4
  const variant = (options = {}) => {
5
5
  const { scale, prop = "variant", variants = {}, key } = options;
@@ -1,5 +1,5 @@
1
1
  import { createParser, get } from "./core.mjs";
2
- import { t as css } from "./css-BTuRmXCo.mjs";
2
+ import { t as css } from "./css-Ba4jdXOq.mjs";
3
3
  //#region src/variant/variant.ts
4
4
  const variant = (options = {}) => {
5
5
  const { scale, prop = "variant", variants = {}, key } = options;
package/dist/variant.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_variant = require("./variant-BSwNEY5l.cjs");
5
+ const require_variant = require("./variant-BSPTyRcQ.cjs");
6
6
  exports.buttonStyle = require_variant.buttonStyle;
7
7
  exports.colorStyle = require_variant.colorStyle;
8
8
  exports.default = require_variant.variant;
@@ -1,3 +1,3 @@
1
- import { It as TextStyleProps, S as ButtonStyleProps, w as ColorStyleProps } from "./types-B52XAdkx.cjs";
2
- import { a as textStyle, i as colorStyle, n as VariantOptions, o as variant, r as buttonStyle, t as VariantArgs } from "./index-bHspW0eP.cjs";
1
+ import { Bt as TextStyleProps, C as ButtonStyleProps, T as ColorStyleProps } from "./types-Cv5WjcVA.cjs";
2
+ import { a as textStyle, i as colorStyle, n as VariantOptions, o as variant, r as buttonStyle, t as VariantArgs } from "./index-Csbxj8Yo.cjs";
3
3
  export { type ButtonStyleProps, type ColorStyleProps, type TextStyleProps, VariantArgs, VariantOptions, buttonStyle, colorStyle, variant as default, variant, textStyle };
@@ -1,3 +1,3 @@
1
- import { It as TextStyleProps, S as ButtonStyleProps, w as ColorStyleProps } from "./types-B52XAdkx.mjs";
2
- import { a as textStyle, i as colorStyle, n as VariantOptions, o as variant, r as buttonStyle, t as VariantArgs } from "./index-DbknCBOx.mjs";
1
+ import { Bt as TextStyleProps, C as ButtonStyleProps, T as ColorStyleProps } from "./types-Cv5WjcVA.mjs";
2
+ import { a as textStyle, i as colorStyle, n as VariantOptions, o as variant, r as buttonStyle, t as VariantArgs } from "./index-ClbGlQxq.mjs";
3
3
  export { type ButtonStyleProps, type ColorStyleProps, type TextStyleProps, VariantArgs, VariantOptions, buttonStyle, colorStyle, variant as default, variant, textStyle };
package/dist/variant.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import { i as variant, n as colorStyle, r as textStyle, t as buttonStyle } from "./variant-NupmzzRg.mjs";
1
+ import { i as variant, n as colorStyle, r as textStyle, t as buttonStyle } from "./variant-D1u5rSqm.mjs";
2
2
  export { buttonStyle, colorStyle, variant as default, variant, textStyle };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@soroush.tech/styled-system",
3
- "version": "5.8.3",
3
+ "version": "6.0.0-alpha.0",
4
4
  "description": "Maintained, first-class-TypeScript rewrite of styled-system - responsive, theme-aware style props for CSS-in-JS. Drop-in replacement for styled-system v5.",
5
5
  "keywords": [
6
6
  "styled-system",
@@ -16,11 +16,11 @@
16
16
  "homepage": "https://soroush.tech/styled-system/",
17
17
  "repository": {
18
18
  "type": "git",
19
- "url": "git+https://github.com/soroush-tech/core.git",
19
+ "url": "git+https://github.com/soroush-tech/design-system.git",
20
20
  "directory": "packages/styled-system"
21
21
  },
22
22
  "bugs": {
23
- "url": "https://github.com/soroush-tech/core/issues"
23
+ "url": "https://github.com/soroush-tech/design-system/issues"
24
24
  },
25
25
  "type": "module",
26
26
  "sideEffects": false,
@@ -233,6 +233,7 @@
233
233
  },
234
234
  "devDependencies": {
235
235
  "@emotion/is-prop-valid": "^1.4.0",
236
+ "@soroush.tech/bench": "^2.2.3",
236
237
  "@types/prop-types": "^15.7.15",
237
238
  "@vitest/coverage-v8": "^4.1.10",
238
239
  "oxlint": "^1.78.0",
@@ -240,7 +241,6 @@
240
241
  "tsdown": "^0.22.14",
241
242
  "typescript": "~7.0.2",
242
243
  "vitest": "^4.1.10",
243
- "@soroush.tech/bench": "2.2.3",
244
244
  "@soroush.tech/eslint-config": "0.0.0"
245
245
  },
246
246
  "scripts": {
@@ -1,41 +0,0 @@
1
- import { system } from "./core.mjs";
2
- //#region src/grid/grid.ts
3
- const spaceScale = [
4
- 0,
5
- 4,
6
- 8,
7
- 16,
8
- 32,
9
- 64,
10
- 128,
11
- 256,
12
- 512
13
- ];
14
- const grid = system({
15
- gridGap: {
16
- property: "gridGap",
17
- scale: "space",
18
- defaultScale: spaceScale
19
- },
20
- gridColumnGap: {
21
- property: "gridColumnGap",
22
- scale: "space",
23
- defaultScale: spaceScale
24
- },
25
- gridRowGap: {
26
- property: "gridRowGap",
27
- scale: "space",
28
- defaultScale: spaceScale
29
- },
30
- gridColumn: true,
31
- gridRow: true,
32
- gridAutoFlow: true,
33
- gridAutoColumns: true,
34
- gridAutoRows: true,
35
- gridTemplateColumns: true,
36
- gridTemplateRows: true,
37
- gridTemplateAreas: true,
38
- gridArea: true
39
- });
40
- //#endregion
41
- export { grid as t };
@@ -1,47 +0,0 @@
1
- const require_core = require("./core.cjs");
2
- //#region src/grid/grid.ts
3
- const spaceScale = [
4
- 0,
5
- 4,
6
- 8,
7
- 16,
8
- 32,
9
- 64,
10
- 128,
11
- 256,
12
- 512
13
- ];
14
- const config = {
15
- gridGap: {
16
- property: "gridGap",
17
- scale: "space",
18
- defaultScale: spaceScale
19
- },
20
- gridColumnGap: {
21
- property: "gridColumnGap",
22
- scale: "space",
23
- defaultScale: spaceScale
24
- },
25
- gridRowGap: {
26
- property: "gridRowGap",
27
- scale: "space",
28
- defaultScale: spaceScale
29
- },
30
- gridColumn: true,
31
- gridRow: true,
32
- gridAutoFlow: true,
33
- gridAutoColumns: true,
34
- gridAutoRows: true,
35
- gridTemplateColumns: true,
36
- gridTemplateRows: true,
37
- gridTemplateAreas: true,
38
- gridArea: true
39
- };
40
- const grid = require_core.system(config);
41
- //#endregion
42
- Object.defineProperty(exports, "grid", {
43
- enumerable: true,
44
- get: function() {
45
- return grid;
46
- }
47
- });
@@ -1,6 +0,0 @@
1
- import { a as Parser } from "./index-C0SM54dQ.mjs";
2
- import "./types-B52XAdkx.mjs";
3
- //#region src/typography/typography.d.ts
4
- declare const typography: Parser;
5
- //#endregion
6
- export { typography as t };
@@ -1,6 +0,0 @@
1
- import { a as Parser } from "./index-C0SM54dQ.cjs";
2
- import "./types-B52XAdkx.cjs";
3
- //#region src/background/background.d.ts
4
- declare const background: Parser;
5
- //#endregion
6
- export { background as t };
@@ -1,6 +0,0 @@
1
- import { a as Parser } from "./index-C0SM54dQ.mjs";
2
- import "./types-B52XAdkx.mjs";
3
- //#region src/color/color.d.ts
4
- declare const color: Parser;
5
- //#endregion
6
- export { color as t };
@@ -1,6 +0,0 @@
1
- import { a as Parser } from "./index-C0SM54dQ.cjs";
2
- import "./types-B52XAdkx.cjs";
3
- //#region src/shadow/shadow.d.ts
4
- declare const shadow: Parser;
5
- //#endregion
6
- export { shadow as t };
@@ -1,6 +0,0 @@
1
- import { a as Parser } from "./index-C0SM54dQ.mjs";
2
- import "./types-B52XAdkx.mjs";
3
- //#region src/grid/grid.d.ts
4
- declare const grid: Parser;
5
- //#endregion
6
- export { grid as t };
@@ -1,6 +0,0 @@
1
- import { a as Parser } from "./index-C0SM54dQ.mjs";
2
- import "./types-B52XAdkx.mjs";
3
- //#region src/layout/layout.d.ts
4
- declare const layout: Parser;
5
- //#endregion
6
- export { layout as t };
@@ -1,6 +0,0 @@
1
- import { a as Parser } from "./index-C0SM54dQ.cjs";
2
- import "./types-B52XAdkx.cjs";
3
- //#region src/grid/grid.d.ts
4
- declare const grid: Parser;
5
- //#endregion
6
- export { grid as t };
@@ -1,6 +0,0 @@
1
- import { a as Parser } from "./index-C0SM54dQ.cjs";
2
- import "./types-B52XAdkx.cjs";
3
- //#region src/flexbox/flexbox.d.ts
4
- declare const flexbox: Parser;
5
- //#endregion
6
- export { flexbox as t };
@@ -1,6 +0,0 @@
1
- import { a as Parser } from "./index-C0SM54dQ.mjs";
2
- import "./types-B52XAdkx.mjs";
3
- //#region src/shadow/shadow.d.ts
4
- declare const shadow: Parser;
5
- //#endregion
6
- export { shadow as t };
@@ -1,6 +0,0 @@
1
- import { a as Parser } from "./index-C0SM54dQ.mjs";
2
- import "./types-B52XAdkx.mjs";
3
- //#region src/position/position.d.ts
4
- declare const position: Parser;
5
- //#endregion
6
- export { position as t };
@@ -1,6 +0,0 @@
1
- import { a as Parser } from "./index-C0SM54dQ.cjs";
2
- import "./types-B52XAdkx.cjs";
3
- //#region src/position/position.d.ts
4
- declare const position: Parser;
5
- //#endregion
6
- export { position as t };
@@ -1,6 +0,0 @@
1
- import { a as Parser } from "./index-C0SM54dQ.cjs";
2
- import "./types-B52XAdkx.cjs";
3
- //#region src/border/border.d.ts
4
- declare const border: Parser;
5
- //#endregion
6
- export { border as t };
@@ -1,6 +0,0 @@
1
- import { a as Parser } from "./index-C0SM54dQ.mjs";
2
- import "./types-B52XAdkx.mjs";
3
- //#region src/border/border.d.ts
4
- declare const border: Parser;
5
- //#endregion
6
- export { border as t };
@@ -1,6 +0,0 @@
1
- import { a as Parser } from "./index-C0SM54dQ.cjs";
2
- import "./types-B52XAdkx.cjs";
3
- //#region src/typography/typography.d.ts
4
- declare const typography: Parser;
5
- //#endregion
6
- export { typography as t };
@@ -1,6 +0,0 @@
1
- import { a as Parser } from "./index-C0SM54dQ.mjs";
2
- import "./types-B52XAdkx.mjs";
3
- //#region src/flexbox/flexbox.d.ts
4
- declare const flexbox: Parser;
5
- //#endregion
6
- export { flexbox as t };
@@ -1,6 +0,0 @@
1
- import { a as Parser } from "./index-C0SM54dQ.cjs";
2
- import "./types-B52XAdkx.cjs";
3
- //#region src/layout/layout.d.ts
4
- declare const layout: Parser;
5
- //#endregion
6
- export { layout as t };
@@ -1,6 +0,0 @@
1
- import { a as Parser } from "./index-C0SM54dQ.cjs";
2
- import "./types-B52XAdkx.cjs";
3
- //#region src/color/color.d.ts
4
- declare const color: Parser;
5
- //#endregion
6
- export { color as t };
@@ -1,6 +0,0 @@
1
- import { a as Parser } from "./index-C0SM54dQ.mjs";
2
- import "./types-B52XAdkx.mjs";
3
- //#region src/background/background.d.ts
4
- declare const background: Parser;
5
- //#endregion
6
- export { background as t };