@soroush.tech/styled-system 5.9.0-alpha.0 → 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.
- package/dist/background.d.cts +2 -2
- package/dist/background.d.mts +2 -2
- package/dist/border.d.cts +2 -2
- package/dist/border.d.mts +2 -2
- package/dist/color.d.cts +2 -2
- package/dist/color.d.mts +2 -2
- package/dist/core.cjs +24 -21
- package/dist/core.d.cts +3 -3
- package/dist/core.d.mts +3 -3
- package/dist/core.mjs +21 -22
- package/dist/{css-CunBKyMl.mjs → css-Ba4jdXOq.mjs} +26 -18
- package/dist/{css-BnnO16Cw.cjs → css-D1zAlDVz.cjs} +26 -18
- package/dist/css.cjs +1 -1
- package/dist/css.d.cts +1 -1
- package/dist/css.d.mts +1 -1
- package/dist/css.mjs +1 -1
- package/dist/flexbox.d.cts +2 -2
- package/dist/flexbox.d.mts +2 -2
- package/dist/grid-BlMUPDJM.cjs +156 -0
- package/dist/grid-CYjL4-gb.mjs +126 -0
- package/dist/grid.cjs +5 -1
- package/dist/grid.d.cts +3 -3
- package/dist/grid.d.mts +3 -3
- package/dist/grid.mjs +2 -2
- package/dist/index-90_abc05.d.mts +6 -0
- package/dist/{index-wKeENlqd.d.mts → index-BQPI7z-B.d.mts} +2 -2
- package/dist/index-BmyL5qR7.d.cts +6 -0
- package/dist/index-Bwpwvg1h.d.cts +6 -0
- package/dist/index-Bxh1FNcS.d.cts +6 -0
- package/dist/index-ByDfI1go.d.cts +6 -0
- package/dist/index-C1IdMVtQ.d.mts +6 -0
- package/dist/index-CQWZd4iQ.d.mts +6 -0
- package/dist/index-CQyvhO-h.d.cts +6 -0
- package/dist/index-CXK27dY_.d.cts +42 -0
- package/dist/{index-Bq7teef_.d.cts → index-CgJzEbXW.d.cts} +2 -2
- package/dist/{index-BKofCDzL.d.mts → index-ClbGlQxq.d.mts} +2 -2
- package/dist/{index-DzcXmzdT.d.cts → index-Csbxj8Yo.d.cts} +2 -2
- package/dist/index-D1mRMWDm.d.cts +6 -0
- package/dist/index-D2v_oJEm.d.cts +6 -0
- package/dist/index-D5xp7RWT.d.cts +6 -0
- package/dist/index-D7IZ8-Zq.d.mts +42 -0
- package/dist/index-DKz4zEeT.d.mts +6 -0
- package/dist/{index-BXP1-da3.d.mts → index-IulNhyDt.d.mts} +2 -2
- package/dist/index-MbcUN6uf.d.mts +6 -0
- package/dist/index-aRomguCQ.d.mts +6 -0
- package/dist/{index-BYkO78Xl.d.cts → index-iVqAMF2L.d.cts} +2 -2
- package/dist/index-nfjmLzHF.d.mts +6 -0
- package/dist/index-pzogdlkS.d.mts +6 -0
- package/dist/index.cjs +12 -4
- package/dist/index.d.cts +15 -15
- package/dist/index.d.mts +15 -15
- package/dist/index.mjs +5 -5
- package/dist/{layout-kqQ2OsL5.cjs → layout-D3pG7vBp.cjs} +3 -1
- package/dist/{layout-lG3i5mWZ.mjs → layout-DF83ooFn.mjs} +3 -1
- package/dist/layout.cjs +1 -1
- package/dist/layout.d.cts +3 -3
- package/dist/layout.d.mts +3 -3
- package/dist/layout.mjs +1 -1
- package/dist/media-Bho3l7WK.mjs +85 -0
- package/dist/media-CfYDomHt.d.cts +54 -0
- package/dist/media-CfYDomHt.d.mts +54 -0
- package/dist/media-DSJdRy_k.cjs +120 -0
- package/dist/position.d.cts +2 -2
- package/dist/position.d.mts +2 -2
- package/dist/{presets-CV_TIXQ4.mjs → presets-DsxPfpSE.mjs} +4 -4
- package/dist/{presets-CCvtQotd.cjs → presets-KURYP1_7.cjs} +4 -4
- package/dist/prop-types.cjs +3 -3
- package/dist/prop-types.mjs +3 -3
- package/dist/props.cjs +1 -1
- package/dist/props.mjs +1 -1
- package/dist/shadow.d.cts +2 -2
- package/dist/shadow.d.mts +2 -2
- package/dist/should-forward-prop.cjs +1 -1
- package/dist/should-forward-prop.mjs +1 -1
- package/dist/space.d.cts +2 -2
- package/dist/space.d.mts +2 -2
- package/dist/{types-B0SNbm6V.d.cts → types-Cv5WjcVA.d.cts} +36 -7
- package/dist/{types-B0SNbm6V.d.mts → types-Cv5WjcVA.d.mts} +36 -7
- package/dist/typography.d.cts +2 -2
- package/dist/typography.d.mts +2 -2
- package/dist/{variant-DdSForfI.cjs → variant-BSPTyRcQ.cjs} +1 -1
- package/dist/{variant-DfRW-ZJe.mjs → variant-D1u5rSqm.mjs} +1 -1
- package/dist/variant.cjs +1 -1
- package/dist/variant.d.cts +2 -2
- package/dist/variant.d.mts +2 -2
- package/dist/variant.mjs +1 -1
- package/package.json +1 -1
- package/dist/grid-Bpk-QjhF.mjs +0 -41
- package/dist/grid-CpvRIng4.cjs +0 -47
- package/dist/index-0k2kzlK5.d.cts +0 -6
- package/dist/index-BReBwT6c.d.mts +0 -6
- package/dist/index-BhbWZw53.d.mts +0 -6
- package/dist/index-C-B6-_Ku.d.mts +0 -6
- package/dist/index-C9CxJ5Zn.d.cts +0 -6
- package/dist/index-CIccdXWj.d.cts +0 -6
- package/dist/index-CJT-n3Vq.d.mts +0 -6
- package/dist/index-CcorN1bQ.d.mts +0 -6
- package/dist/index-Cd_CcxMh.d.cts +0 -6
- package/dist/index-Co0JY1hd.d.cts +0 -6
- package/dist/index-D9dwDAhC.d.mts +0 -6
- package/dist/index-DP40bJIa.d.cts +0 -6
- package/dist/index-DQhcFrR9.d.mts +0 -6
- package/dist/index-DcRfFIAZ.d.mts +0 -6
- package/dist/index-Dsc6RgbZ.d.cts +0 -6
- package/dist/index-Q8q5VND1.d.cts +0 -6
- package/dist/index-UGE-V15i.d.cts +0 -6
- package/dist/index-sk97pkUE.d.mts +0 -6
- package/dist/media-B8UpEDpY.mjs +0 -18
- package/dist/media-BoIPXBPV.cjs +0 -29
- package/dist/media-np0uvO4C.d.cts +0 -14
- package/dist/media-np0uvO4C.d.mts +0 -14
package/dist/space.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { i as space, n as margin, r as padding, t as gap } from "./index-
|
|
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
|
-
|
|
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,10 +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
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
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; });
|
|
35
41
|
interface MarginProps<ThemeType extends Theme = RequiredTheme, TVal = ThemeValue<'space', ThemeType>> {
|
|
36
42
|
m?: ResponsiveValue<TVal, ThemeType>;
|
|
37
43
|
margin?: ResponsiveValue<TVal, ThemeType>;
|
|
@@ -113,7 +119,12 @@ interface VerticalAlignProps<ThemeType extends Theme = RequiredTheme, TVal = CSS
|
|
|
113
119
|
interface AspectRatioProps<ThemeType extends Theme = RequiredTheme> {
|
|
114
120
|
aspectRatio?: ResponsiveValue<CSS.Property.AspectRatio, ThemeType>;
|
|
115
121
|
}
|
|
116
|
-
|
|
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> {}
|
|
117
128
|
interface FontFamilyProps<ThemeType extends Theme = RequiredTheme> {
|
|
118
129
|
fontFamily?: ResponsiveValue<CSS.Property.FontFamily, ThemeType>;
|
|
119
130
|
}
|
|
@@ -328,6 +339,24 @@ interface GridTemplateAreasProps<ThemeType extends Theme = RequiredTheme> {
|
|
|
328
339
|
interface GridAreaProps<ThemeType extends Theme = RequiredTheme> {
|
|
329
340
|
gridArea?: ResponsiveValue<CSS.Property.GridArea, ThemeType>;
|
|
330
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
|
+
}
|
|
331
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> {}
|
|
332
361
|
interface BoxShadowProps<ThemeType extends Theme = RequiredTheme> {
|
|
333
362
|
boxShadow?: ResponsiveValue<CSS.Property.BoxShadow | string | number, ThemeType>;
|
|
@@ -346,4 +375,4 @@ interface ColorStyleProps<ThemeType extends Theme = RequiredTheme> {
|
|
|
346
375
|
colors?: ResponsiveValue<string, ThemeType>;
|
|
347
376
|
}
|
|
348
377
|
//#endregion
|
|
349
|
-
export {
|
|
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
|
-
|
|
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,10 +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
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
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; });
|
|
35
41
|
interface MarginProps<ThemeType extends Theme = RequiredTheme, TVal = ThemeValue<'space', ThemeType>> {
|
|
36
42
|
m?: ResponsiveValue<TVal, ThemeType>;
|
|
37
43
|
margin?: ResponsiveValue<TVal, ThemeType>;
|
|
@@ -113,7 +119,12 @@ interface VerticalAlignProps<ThemeType extends Theme = RequiredTheme, TVal = CSS
|
|
|
113
119
|
interface AspectRatioProps<ThemeType extends Theme = RequiredTheme> {
|
|
114
120
|
aspectRatio?: ResponsiveValue<CSS.Property.AspectRatio, ThemeType>;
|
|
115
121
|
}
|
|
116
|
-
|
|
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> {}
|
|
117
128
|
interface FontFamilyProps<ThemeType extends Theme = RequiredTheme> {
|
|
118
129
|
fontFamily?: ResponsiveValue<CSS.Property.FontFamily, ThemeType>;
|
|
119
130
|
}
|
|
@@ -328,6 +339,24 @@ interface GridTemplateAreasProps<ThemeType extends Theme = RequiredTheme> {
|
|
|
328
339
|
interface GridAreaProps<ThemeType extends Theme = RequiredTheme> {
|
|
329
340
|
gridArea?: ResponsiveValue<CSS.Property.GridArea, ThemeType>;
|
|
330
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
|
+
}
|
|
331
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> {}
|
|
332
361
|
interface BoxShadowProps<ThemeType extends Theme = RequiredTheme> {
|
|
333
362
|
boxShadow?: ResponsiveValue<CSS.Property.BoxShadow | string | number, ThemeType>;
|
|
@@ -346,4 +375,4 @@ interface ColorStyleProps<ThemeType extends Theme = RequiredTheme> {
|
|
|
346
375
|
colors?: ResponsiveValue<string, ThemeType>;
|
|
347
376
|
}
|
|
348
377
|
//#endregion
|
|
349
|
-
export {
|
|
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 };
|
package/dist/typography.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as typography } from "./index-
|
|
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 };
|
package/dist/typography.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as typography } from "./index-
|
|
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-
|
|
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-
|
|
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-
|
|
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;
|
package/dist/variant.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as textStyle, i as colorStyle, n as VariantOptions, o as variant, r as buttonStyle, t as VariantArgs } from "./index-
|
|
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 };
|
package/dist/variant.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as textStyle, i as colorStyle, n as VariantOptions, o as variant, r as buttonStyle, t as VariantArgs } from "./index-
|
|
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-
|
|
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": "
|
|
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",
|
package/dist/grid-Bpk-QjhF.mjs
DELETED
|
@@ -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 };
|
package/dist/grid-CpvRIng4.cjs
DELETED
|
@@ -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
|
-
});
|
package/dist/media-B8UpEDpY.mjs
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
//#region src/core/media.ts
|
|
2
|
-
const isLength = (value) => /^[\d.+-]|^(calc|min|max|clamp)\(/.test(value);
|
|
3
|
-
/**
|
|
4
|
-
* The `@media` rule for one breakpoint value. A length is a min-width (a number
|
|
5
|
-
* gets `px`); a string starting with `@media` is used as written; anything else
|
|
6
|
-
* is a media query list - a condition like `(600px <= width < 1200px)` or
|
|
7
|
-
* `(orientation: landscape)`, or a media type - and follows `@media `.
|
|
8
|
-
*/
|
|
9
|
-
const createMediaQuery = (value) => {
|
|
10
|
-
if (typeof value === "number") return `@media screen and (min-width: ${value}px)`;
|
|
11
|
-
if (value.startsWith("@media")) return value;
|
|
12
|
-
if (isLength(value)) return `@media screen and (min-width: ${value})`;
|
|
13
|
-
return `@media ${value}`;
|
|
14
|
-
};
|
|
15
|
-
/** Each breakpoint's `@media` rule, in declared order, keyed by its name (or array index). */
|
|
16
|
-
const breakpointQueries = (breakpoints) => Object.entries(breakpoints).map(([key, value]) => [key, createMediaQuery(value)]);
|
|
17
|
-
//#endregion
|
|
18
|
-
export { createMediaQuery as n, breakpointQueries as t };
|
package/dist/media-BoIPXBPV.cjs
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
//#region src/core/media.ts
|
|
2
|
-
const isLength = (value) => /^[\d.+-]|^(calc|min|max|clamp)\(/.test(value);
|
|
3
|
-
/**
|
|
4
|
-
* The `@media` rule for one breakpoint value. A length is a min-width (a number
|
|
5
|
-
* gets `px`); a string starting with `@media` is used as written; anything else
|
|
6
|
-
* is a media query list - a condition like `(600px <= width < 1200px)` or
|
|
7
|
-
* `(orientation: landscape)`, or a media type - and follows `@media `.
|
|
8
|
-
*/
|
|
9
|
-
const createMediaQuery = (value) => {
|
|
10
|
-
if (typeof value === "number") return `@media screen and (min-width: ${value}px)`;
|
|
11
|
-
if (value.startsWith("@media")) return value;
|
|
12
|
-
if (isLength(value)) return `@media screen and (min-width: ${value})`;
|
|
13
|
-
return `@media ${value}`;
|
|
14
|
-
};
|
|
15
|
-
/** Each breakpoint's `@media` rule, in declared order, keyed by its name (or array index). */
|
|
16
|
-
const breakpointQueries = (breakpoints) => Object.entries(breakpoints).map(([key, value]) => [key, createMediaQuery(value)]);
|
|
17
|
-
//#endregion
|
|
18
|
-
Object.defineProperty(exports, "breakpointQueries", {
|
|
19
|
-
enumerable: true,
|
|
20
|
-
get: function() {
|
|
21
|
-
return breakpointQueries;
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
Object.defineProperty(exports, "createMediaQuery", {
|
|
25
|
-
enumerable: true,
|
|
26
|
-
get: function() {
|
|
27
|
-
return createMediaQuery;
|
|
28
|
-
}
|
|
29
|
-
});
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
//#region src/core/media.d.ts
|
|
2
|
-
/** `theme.breakpoints`: an ascending list, or named breakpoints in their declared order. */
|
|
3
|
-
type Breakpoints = readonly (string | number)[] | Record<string, string | number>;
|
|
4
|
-
/**
|
|
5
|
-
* The `@media` rule for one breakpoint value. A length is a min-width (a number
|
|
6
|
-
* gets `px`); a string starting with `@media` is used as written; anything else
|
|
7
|
-
* is a media query list - a condition like `(600px <= width < 1200px)` or
|
|
8
|
-
* `(orientation: landscape)`, or a media type - and follows `@media `.
|
|
9
|
-
*/
|
|
10
|
-
declare const createMediaQuery: (value: string | number) => string;
|
|
11
|
-
/** Each breakpoint's `@media` rule, in declared order, keyed by its name (or array index). */
|
|
12
|
-
declare const breakpointQueries: (breakpoints: Breakpoints) => [string, string][];
|
|
13
|
-
//#endregion
|
|
14
|
-
export { breakpointQueries as n, createMediaQuery as r, Breakpoints as t };
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
//#region src/core/media.d.ts
|
|
2
|
-
/** `theme.breakpoints`: an ascending list, or named breakpoints in their declared order. */
|
|
3
|
-
type Breakpoints = readonly (string | number)[] | Record<string, string | number>;
|
|
4
|
-
/**
|
|
5
|
-
* The `@media` rule for one breakpoint value. A length is a min-width (a number
|
|
6
|
-
* gets `px`); a string starting with `@media` is used as written; anything else
|
|
7
|
-
* is a media query list - a condition like `(600px <= width < 1200px)` or
|
|
8
|
-
* `(orientation: landscape)`, or a media type - and follows `@media `.
|
|
9
|
-
*/
|
|
10
|
-
declare const createMediaQuery: (value: string | number) => string;
|
|
11
|
-
/** Each breakpoint's `@media` rule, in declared order, keyed by its name (or array index). */
|
|
12
|
-
declare const breakpointQueries: (breakpoints: Breakpoints) => [string, string][];
|
|
13
|
-
//#endregion
|
|
14
|
-
export { breakpointQueries as n, createMediaQuery as r, Breakpoints as t };
|