@soroush.tech/styled-system 5.1.6

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 (121) hide show
  1. package/LICENSE +26 -0
  2. package/README.md +150 -0
  3. package/dist/background-B-jql3jb.mjs +16 -0
  4. package/dist/background-wugr6cG7.cjs +21 -0
  5. package/dist/background.cjs +7 -0
  6. package/dist/background.d.cts +2 -0
  7. package/dist/background.d.mts +2 -0
  8. package/dist/background.mjs +2 -0
  9. package/dist/border-Dder4Dhp.mjs +131 -0
  10. package/dist/border-UuT-fTpy.cjs +136 -0
  11. package/dist/border.cjs +7 -0
  12. package/dist/border.d.cts +2 -0
  13. package/dist/border.d.mts +2 -0
  14. package/dist/border.mjs +2 -0
  15. package/dist/color-BNs17Gw-.cjs +22 -0
  16. package/dist/color-CGmMe8yP.mjs +17 -0
  17. package/dist/color.cjs +7 -0
  18. package/dist/color.d.cts +2 -0
  19. package/dist/color.d.mts +2 -0
  20. package/dist/color.mjs +2 -0
  21. package/dist/core.cjs +144 -0
  22. package/dist/core.d.cts +2 -0
  23. package/dist/core.d.mts +2 -0
  24. package/dist/core.mjs +138 -0
  25. package/dist/css-nzeM_Xnf.cjs +231 -0
  26. package/dist/css-rLZ9Oeye.mjs +214 -0
  27. package/dist/css.cjs +9 -0
  28. package/dist/css.d.cts +12 -0
  29. package/dist/css.d.mts +12 -0
  30. package/dist/css.mjs +2 -0
  31. package/dist/flexbox-CFkO6PrP.cjs +22 -0
  32. package/dist/flexbox-XQnlnfa4.mjs +18 -0
  33. package/dist/flexbox.cjs +7 -0
  34. package/dist/flexbox.d.cts +2 -0
  35. package/dist/flexbox.d.mts +2 -0
  36. package/dist/flexbox.mjs +2 -0
  37. package/dist/grid-Bpk-QjhF.mjs +41 -0
  38. package/dist/grid-CpvRIng4.cjs +47 -0
  39. package/dist/grid.cjs +7 -0
  40. package/dist/grid.d.cts +2 -0
  41. package/dist/grid.d.mts +2 -0
  42. package/dist/grid.mjs +2 -0
  43. package/dist/index-50KH4Mo7.d.cts +8 -0
  44. package/dist/index-8PSQ0vkP.d.cts +15 -0
  45. package/dist/index-9ZhIewzy.d.mts +6 -0
  46. package/dist/index-BBTVE4EM.d.mts +15 -0
  47. package/dist/index-BS9GuhQN.d.cts +6 -0
  48. package/dist/index-BoMacn6F.d.cts +6 -0
  49. package/dist/index-Bx7IxKu-.d.mts +6 -0
  50. package/dist/index-C13YRARN.d.mts +6 -0
  51. package/dist/index-C3_fScux.d.mts +8 -0
  52. package/dist/index-CX2jWEGJ.d.mts +6 -0
  53. package/dist/index-CarHCWLQ.d.cts +6 -0
  54. package/dist/index-Ce09s0FQ.d.cts +6 -0
  55. package/dist/index-CrUx2vIP.d.mts +6 -0
  56. package/dist/index-CsS_gcI9.d.mts +6 -0
  57. package/dist/index-D3t1Lyte.d.mts +6 -0
  58. package/dist/index-D8EyRZ5p.d.cts +62 -0
  59. package/dist/index-D8EyRZ5p.d.mts +62 -0
  60. package/dist/index-DPWkvooj.d.mts +6 -0
  61. package/dist/index-DVR6hZCd.d.cts +6 -0
  62. package/dist/index-DZaFk5pk.d.cts +6 -0
  63. package/dist/index-J3PebPto.d.mts +6 -0
  64. package/dist/index-Nc-10syf.d.cts +6 -0
  65. package/dist/index-j3E1mxCg.d.cts +6 -0
  66. package/dist/index-z86wOHTb.d.cts +6 -0
  67. package/dist/index.cjs +185 -0
  68. package/dist/index.d.cts +281 -0
  69. package/dist/index.d.mts +281 -0
  70. package/dist/index.mjs +98 -0
  71. package/dist/layout-B1-2dfQ9.cjs +48 -0
  72. package/dist/layout-TqD8vcEl.mjs +42 -0
  73. package/dist/layout.cjs +7 -0
  74. package/dist/layout.d.cts +2 -0
  75. package/dist/layout.d.mts +2 -0
  76. package/dist/layout.mjs +2 -0
  77. package/dist/position-jf6VlRyR.mjs +42 -0
  78. package/dist/position-zWvCE4hD.cjs +48 -0
  79. package/dist/position.cjs +7 -0
  80. package/dist/position.d.cts +2 -0
  81. package/dist/position.d.mts +2 -0
  82. package/dist/position.mjs +2 -0
  83. package/dist/presets-DjaCx0dm.mjs +16 -0
  84. package/dist/presets-DlUVOAIL.cjs +21 -0
  85. package/dist/props.cjs +23 -0
  86. package/dist/props.d.cts +5 -0
  87. package/dist/props.d.mts +5 -0
  88. package/dist/props.mjs +21 -0
  89. package/dist/shadow-Bp7lx_41.mjs +14 -0
  90. package/dist/shadow-BrDnaQQl.cjs +18 -0
  91. package/dist/shadow.cjs +7 -0
  92. package/dist/shadow.d.cts +2 -0
  93. package/dist/shadow.d.mts +2 -0
  94. package/dist/shadow.mjs +2 -0
  95. package/dist/should-forward-prop.cjs +47 -0
  96. package/dist/should-forward-prop.d.cts +6 -0
  97. package/dist/should-forward-prop.d.mts +6 -0
  98. package/dist/should-forward-prop.mjs +18 -0
  99. package/dist/space-C14uiNpw.cjs +139 -0
  100. package/dist/space-CNrX-zoo.mjs +122 -0
  101. package/dist/space.cjs +9 -0
  102. package/dist/space.d.cts +2 -0
  103. package/dist/space.d.mts +2 -0
  104. package/dist/space.mjs +2 -0
  105. package/dist/theme-get.cjs +10 -0
  106. package/dist/theme-get.d.cts +6 -0
  107. package/dist/theme-get.d.mts +6 -0
  108. package/dist/theme-get.mjs +5 -0
  109. package/dist/typography-CptBXSy0.mjs +38 -0
  110. package/dist/typography-DD_eWLLx.cjs +42 -0
  111. package/dist/typography.cjs +7 -0
  112. package/dist/typography.d.cts +2 -0
  113. package/dist/typography.d.mts +2 -0
  114. package/dist/typography.mjs +2 -0
  115. package/dist/variant-CWUfe1Cc.mjs +22 -0
  116. package/dist/variant-ChsBzwrI.cjs +45 -0
  117. package/dist/variant.cjs +10 -0
  118. package/dist/variant.d.cts +2 -0
  119. package/dist/variant.d.mts +2 -0
  120. package/dist/variant.mjs +2 -0
  121. package/package.json +255 -0
@@ -0,0 +1,281 @@
1
+ import { a as Props, c as SystemConfig, d as compose, f as createParser, g as system, i as ParserConfig, m as get, n as ConfigStyle, o as StyleFn, p as createStyleFunction, r as Parser, s as StyleObject, u as Transform } from "./index-D8EyRZ5p.mjs";
2
+ import { t as background } from "./index-9ZhIewzy.mjs";
3
+ import { t as border } from "./index-Bx7IxKu-.mjs";
4
+ import { t as color } from "./index-D3t1Lyte.mjs";
5
+ import { t as flexbox } from "./index-CX2jWEGJ.mjs";
6
+ import { t as grid } from "./index-J3PebPto.mjs";
7
+ import { n as padding, r as space, t as margin } from "./index-C3_fScux.mjs";
8
+ import { t as layout } from "./index-CsS_gcI9.mjs";
9
+ import { t as typography } from "./index-C13YRARN.mjs";
10
+ import { t as position } from "./index-CrUx2vIP.mjs";
11
+ import { t as shadow } from "./index-DPWkvooj.mjs";
12
+ import { a as variant, i as textStyle, n as buttonStyle, r as colorStyle } from "./index-BBTVE4EM.mjs";
13
+ import * as CSS from "csstype";
14
+
15
+ //#region src/style/style.d.ts
16
+ interface StyleOptions {
17
+ prop: string;
18
+ cssProperty?: string;
19
+ alias?: string;
20
+ key?: string;
21
+ transformValue?: Transform;
22
+ scale?: unknown;
23
+ properties?: string[];
24
+ }
25
+ declare const style: ({
26
+ prop,
27
+ cssProperty,
28
+ alias,
29
+ key,
30
+ transformValue,
31
+ scale,
32
+ properties
33
+ }: StyleOptions) => Parser;
34
+ //#endregion
35
+ //#region src/types.d.ts
36
+ type ObjectOrArray<T, K extends keyof never = keyof never> = T[] | Record<K, T | Record<K, T> | T[]>;
37
+ type Scale = ObjectOrArray<number | string>;
38
+ type TLengthStyledSystem = string | 0 | number;
39
+ interface Theme<TLength = TLengthStyledSystem> {
40
+ breakpoints?: ObjectOrArray<number | string | symbol>;
41
+ mediaQueries?: {
42
+ [size: string]: string;
43
+ };
44
+ space?: ObjectOrArray<CSS.Property.Margin<number | string>>;
45
+ fontSizes?: ObjectOrArray<CSS.Property.FontSize<number>>;
46
+ colors?: ObjectOrArray<CSS.Property.Color>;
47
+ fonts?: ObjectOrArray<CSS.Property.FontFamily>;
48
+ fontWeights?: ObjectOrArray<CSS.Property.FontWeight>;
49
+ lineHeights?: ObjectOrArray<CSS.Property.LineHeight<TLength>>;
50
+ letterSpacings?: ObjectOrArray<CSS.Property.LetterSpacing<TLength>>;
51
+ sizes?: ObjectOrArray<CSS.Property.Height<object> | CSS.Property.Width<object>>;
52
+ borders?: ObjectOrArray<CSS.Property.Border<object>>;
53
+ borderStyles?: ObjectOrArray<CSS.Property.Border<object>>;
54
+ borderWidths?: ObjectOrArray<CSS.Property.BorderWidth<TLength>>;
55
+ radii?: ObjectOrArray<CSS.Property.BorderRadius<TLength>>;
56
+ shadows?: ObjectOrArray<CSS.Property.BoxShadow>;
57
+ zIndices?: ObjectOrArray<CSS.Property.ZIndex>;
58
+ buttons?: ObjectOrArray<CSS.StandardProperties>;
59
+ colorStyles?: ObjectOrArray<CSS.StandardProperties>;
60
+ textStyles?: ObjectOrArray<CSS.StandardProperties>;
61
+ }
62
+ type RequiredTheme = Required<Theme>;
63
+ type ThemeValue<K extends keyof ThemeType, ThemeType, TVal = unknown> = NonNullable<ThemeType[K]> extends TVal[] ? number : NonNullable<ThemeType[K]> extends Record<infer E, TVal> ? E : NonNullable<ThemeType[K]> extends ObjectOrArray<infer F> ? F : never;
64
+ type ResponsiveValue<T, ThemeType extends Theme = RequiredTheme> = T | null | Array<T | null> | { [key in (ThemeValue<'breakpoints', ThemeType> & string) | number]?: T };
65
+ type L = TLengthStyledSystem;
66
+ interface SpaceProps<ThemeType extends Theme = RequiredTheme, TVal = ThemeValue<'space', ThemeType>> {
67
+ m?: ResponsiveValue<TVal, ThemeType>;
68
+ margin?: ResponsiveValue<TVal, ThemeType>;
69
+ mt?: ResponsiveValue<TVal, ThemeType>;
70
+ marginTop?: ResponsiveValue<TVal, ThemeType>;
71
+ mr?: ResponsiveValue<TVal, ThemeType>;
72
+ marginRight?: ResponsiveValue<TVal, ThemeType>;
73
+ mb?: ResponsiveValue<TVal, ThemeType>;
74
+ marginBottom?: ResponsiveValue<TVal, ThemeType>;
75
+ ml?: ResponsiveValue<TVal, ThemeType>;
76
+ marginLeft?: ResponsiveValue<TVal, ThemeType>;
77
+ mx?: ResponsiveValue<TVal, ThemeType>;
78
+ marginX?: ResponsiveValue<TVal, ThemeType>;
79
+ my?: ResponsiveValue<TVal, ThemeType>;
80
+ marginY?: ResponsiveValue<TVal, ThemeType>;
81
+ p?: ResponsiveValue<TVal, ThemeType>;
82
+ padding?: ResponsiveValue<TVal, ThemeType>;
83
+ pt?: ResponsiveValue<TVal, ThemeType>;
84
+ paddingTop?: ResponsiveValue<TVal, ThemeType>;
85
+ pr?: ResponsiveValue<TVal, ThemeType>;
86
+ paddingRight?: ResponsiveValue<TVal, ThemeType>;
87
+ pb?: ResponsiveValue<TVal, ThemeType>;
88
+ paddingBottom?: ResponsiveValue<TVal, ThemeType>;
89
+ pl?: ResponsiveValue<TVal, ThemeType>;
90
+ paddingLeft?: ResponsiveValue<TVal, ThemeType>;
91
+ px?: ResponsiveValue<TVal, ThemeType>;
92
+ paddingX?: ResponsiveValue<TVal, ThemeType>;
93
+ py?: ResponsiveValue<TVal, ThemeType>;
94
+ paddingY?: ResponsiveValue<TVal, ThemeType>;
95
+ }
96
+ interface MarginProps<ThemeType extends Theme = RequiredTheme, TVal = ThemeValue<'space', ThemeType>> {
97
+ m?: ResponsiveValue<TVal, ThemeType>;
98
+ margin?: ResponsiveValue<TVal, ThemeType>;
99
+ mt?: ResponsiveValue<TVal, ThemeType>;
100
+ marginTop?: ResponsiveValue<TVal, ThemeType>;
101
+ mr?: ResponsiveValue<TVal, ThemeType>;
102
+ marginRight?: ResponsiveValue<TVal, ThemeType>;
103
+ mb?: ResponsiveValue<TVal, ThemeType>;
104
+ marginBottom?: ResponsiveValue<TVal, ThemeType>;
105
+ ml?: ResponsiveValue<TVal, ThemeType>;
106
+ marginLeft?: ResponsiveValue<TVal, ThemeType>;
107
+ mx?: ResponsiveValue<TVal, ThemeType>;
108
+ marginX?: ResponsiveValue<TVal, ThemeType>;
109
+ my?: ResponsiveValue<TVal, ThemeType>;
110
+ marginY?: ResponsiveValue<TVal, ThemeType>;
111
+ }
112
+ interface PaddingProps<ThemeType extends Theme = RequiredTheme, TVal = ThemeValue<'space', ThemeType>> {
113
+ p?: ResponsiveValue<TVal, ThemeType>;
114
+ padding?: ResponsiveValue<TVal, ThemeType>;
115
+ pt?: ResponsiveValue<TVal, ThemeType>;
116
+ paddingTop?: ResponsiveValue<TVal, ThemeType>;
117
+ pr?: ResponsiveValue<TVal, ThemeType>;
118
+ paddingRight?: ResponsiveValue<TVal, ThemeType>;
119
+ pb?: ResponsiveValue<TVal, ThemeType>;
120
+ paddingBottom?: ResponsiveValue<TVal, ThemeType>;
121
+ pl?: ResponsiveValue<TVal, ThemeType>;
122
+ paddingLeft?: ResponsiveValue<TVal, ThemeType>;
123
+ px?: ResponsiveValue<TVal, ThemeType>;
124
+ paddingX?: ResponsiveValue<TVal, ThemeType>;
125
+ py?: ResponsiveValue<TVal, ThemeType>;
126
+ paddingY?: ResponsiveValue<TVal, ThemeType>;
127
+ }
128
+ interface LayoutProps<ThemeType extends Theme = RequiredTheme> {
129
+ width?: ResponsiveValue<CSS.Property.Width<L>, ThemeType>;
130
+ height?: ResponsiveValue<CSS.Property.Height<L>, ThemeType>;
131
+ minWidth?: ResponsiveValue<CSS.Property.MinWidth<L>, ThemeType>;
132
+ minHeight?: ResponsiveValue<CSS.Property.MinHeight<L>, ThemeType>;
133
+ maxWidth?: ResponsiveValue<CSS.Property.MaxWidth<L>, ThemeType>;
134
+ maxHeight?: ResponsiveValue<CSS.Property.MaxHeight<L>, ThemeType>;
135
+ size?: ResponsiveValue<CSS.Property.Width<L>, ThemeType>;
136
+ overflow?: ResponsiveValue<CSS.Property.Overflow, ThemeType>;
137
+ overflowX?: ResponsiveValue<CSS.Property.OverflowX, ThemeType>;
138
+ overflowY?: ResponsiveValue<CSS.Property.OverflowY, ThemeType>;
139
+ display?: ResponsiveValue<CSS.Property.Display, ThemeType>;
140
+ verticalAlign?: ResponsiveValue<CSS.Property.VerticalAlign<L>, ThemeType>;
141
+ }
142
+ interface TypographyProps<ThemeType extends Theme = RequiredTheme> {
143
+ fontFamily?: ResponsiveValue<CSS.Property.FontFamily, ThemeType>;
144
+ fontSize?: ResponsiveValue<ThemeValue<'fontSizes', ThemeType>, ThemeType>;
145
+ fontWeight?: ResponsiveValue<ThemeValue<'fontWeights', ThemeType> | string, ThemeType>;
146
+ lineHeight?: ResponsiveValue<ThemeValue<'lineHeights', ThemeType>, ThemeType>;
147
+ letterSpacing?: ResponsiveValue<CSS.Property.LetterSpacing<L>, ThemeType>;
148
+ textAlign?: ResponsiveValue<CSS.Property.TextAlign, ThemeType>;
149
+ fontStyle?: ResponsiveValue<CSS.Property.FontStyle, ThemeType>;
150
+ }
151
+ interface FlexboxProps<ThemeType extends Theme = RequiredTheme> {
152
+ alignItems?: ResponsiveValue<CSS.Property.AlignItems, ThemeType>;
153
+ alignContent?: ResponsiveValue<CSS.Property.AlignContent, ThemeType>;
154
+ justifyItems?: ResponsiveValue<CSS.Property.JustifyItems, ThemeType>;
155
+ justifyContent?: ResponsiveValue<CSS.Property.JustifyContent, ThemeType>;
156
+ flexWrap?: ResponsiveValue<CSS.Property.FlexWrap, ThemeType>;
157
+ flexDirection?: ResponsiveValue<CSS.Property.FlexDirection, ThemeType>;
158
+ flex?: ResponsiveValue<CSS.Property.Flex<L>, ThemeType>;
159
+ flexGrow?: ResponsiveValue<CSS.Property.FlexGrow, ThemeType>;
160
+ flexShrink?: ResponsiveValue<CSS.Property.FlexShrink, ThemeType>;
161
+ flexBasis?: ResponsiveValue<CSS.Property.FlexBasis<L>, ThemeType>;
162
+ justifySelf?: ResponsiveValue<CSS.Property.JustifySelf, ThemeType>;
163
+ alignSelf?: ResponsiveValue<CSS.Property.AlignSelf, ThemeType>;
164
+ order?: ResponsiveValue<CSS.Property.Order, ThemeType>;
165
+ }
166
+ interface PositionProps<ThemeType extends Theme = RequiredTheme> {
167
+ position?: ResponsiveValue<CSS.Property.Position, ThemeType>;
168
+ zIndex?: ResponsiveValue<CSS.Property.ZIndex, ThemeType>;
169
+ top?: ResponsiveValue<CSS.Property.Top<L>, ThemeType>;
170
+ right?: ResponsiveValue<CSS.Property.Right<L>, ThemeType>;
171
+ bottom?: ResponsiveValue<CSS.Property.Bottom<L>, ThemeType>;
172
+ left?: ResponsiveValue<CSS.Property.Left<L>, ThemeType>;
173
+ }
174
+ interface ColorProps<ThemeType extends Theme = RequiredTheme, TVal = ThemeValue<'colors', ThemeType>> {
175
+ color?: ResponsiveValue<TVal, ThemeType>;
176
+ backgroundColor?: ResponsiveValue<TVal, ThemeType>;
177
+ bg?: ResponsiveValue<TVal, ThemeType>;
178
+ opacity?: ResponsiveValue<CSS.Property.Opacity, ThemeType>;
179
+ }
180
+ interface BorderProps<ThemeType extends Theme = RequiredTheme> {
181
+ border?: ResponsiveValue<CSS.Property.Border<L>, ThemeType>;
182
+ borderWidth?: ResponsiveValue<CSS.Property.BorderWidth<L>, ThemeType>;
183
+ borderStyle?: ResponsiveValue<CSS.Property.BorderStyle, ThemeType>;
184
+ borderColor?: ResponsiveValue<ThemeValue<'colors', ThemeType>, ThemeType>;
185
+ borderRadius?: ResponsiveValue<ThemeValue<'radii', ThemeType>, ThemeType>;
186
+ borderTop?: ResponsiveValue<CSS.Property.BorderTop<L>, ThemeType>;
187
+ borderRight?: ResponsiveValue<CSS.Property.BorderRight<L>, ThemeType>;
188
+ borderBottom?: ResponsiveValue<CSS.Property.BorderBottom<L>, ThemeType>;
189
+ borderLeft?: ResponsiveValue<CSS.Property.BorderLeft<L>, ThemeType>;
190
+ }
191
+ interface BackgroundProps<ThemeType extends Theme = RequiredTheme> {
192
+ background?: ResponsiveValue<CSS.Property.Background<L>, ThemeType>;
193
+ backgroundImage?: ResponsiveValue<CSS.Property.BackgroundImage, ThemeType>;
194
+ backgroundSize?: ResponsiveValue<CSS.Property.BackgroundSize<L>, ThemeType>;
195
+ backgroundPosition?: ResponsiveValue<CSS.Property.BackgroundPosition<L>, ThemeType>;
196
+ backgroundRepeat?: ResponsiveValue<CSS.Property.BackgroundRepeat, ThemeType>;
197
+ }
198
+ interface GridProps<ThemeType extends Theme = RequiredTheme> {
199
+ gridGap?: ResponsiveValue<CSS.Property.GridGap<L>, ThemeType>;
200
+ gridColumnGap?: ResponsiveValue<CSS.Property.GridColumnGap<L>, ThemeType>;
201
+ gridRowGap?: ResponsiveValue<CSS.Property.GridRowGap<L>, ThemeType>;
202
+ gridColumn?: ResponsiveValue<CSS.Property.GridColumn, ThemeType>;
203
+ gridRow?: ResponsiveValue<CSS.Property.GridRow, ThemeType>;
204
+ gridAutoFlow?: ResponsiveValue<CSS.Property.GridAutoFlow, ThemeType>;
205
+ gridAutoColumns?: ResponsiveValue<CSS.Property.GridAutoColumns<L>, ThemeType>;
206
+ gridAutoRows?: ResponsiveValue<CSS.Property.GridAutoRows<L>, ThemeType>;
207
+ gridTemplateColumns?: ResponsiveValue<CSS.Property.GridTemplateColumns<L>, ThemeType>;
208
+ gridTemplateRows?: ResponsiveValue<CSS.Property.GridTemplateRows<L>, ThemeType>;
209
+ gridTemplateAreas?: ResponsiveValue<CSS.Property.GridTemplateAreas, ThemeType>;
210
+ gridArea?: ResponsiveValue<CSS.Property.GridArea, ThemeType>;
211
+ }
212
+ interface ShadowProps<ThemeType extends Theme = RequiredTheme> {
213
+ boxShadow?: ResponsiveValue<CSS.Property.BoxShadow | string, ThemeType>;
214
+ textShadow?: ResponsiveValue<CSS.Property.TextShadow | string, ThemeType>;
215
+ }
216
+ //#endregion
217
+ //#region src/index.d.ts
218
+ declare const width: Parser;
219
+ declare const height: Parser;
220
+ declare const minWidth: Parser;
221
+ declare const minHeight: Parser;
222
+ declare const maxWidth: Parser;
223
+ declare const maxHeight: Parser;
224
+ declare const size: Parser;
225
+ declare const verticalAlign: Parser;
226
+ declare const display: Parser;
227
+ declare const overflow: Parser;
228
+ declare const overflowX: Parser;
229
+ declare const overflowY: Parser;
230
+ declare const opacity: Parser;
231
+ declare const fontSize: Parser;
232
+ declare const fontFamily: Parser;
233
+ declare const fontWeight: Parser;
234
+ declare const lineHeight: Parser;
235
+ declare const textAlign: Parser;
236
+ declare const fontStyle: Parser;
237
+ declare const letterSpacing: Parser;
238
+ declare const alignItems: Parser;
239
+ declare const alignContent: Parser;
240
+ declare const justifyItems: Parser;
241
+ declare const justifyContent: Parser;
242
+ declare const flexWrap: Parser;
243
+ declare const flexDirection: Parser;
244
+ declare const flex: Parser;
245
+ declare const flexGrow: Parser;
246
+ declare const flexShrink: Parser;
247
+ declare const flexBasis: Parser;
248
+ declare const justifySelf: Parser;
249
+ declare const alignSelf: Parser;
250
+ declare const order: Parser;
251
+ declare const gridGap: Parser;
252
+ declare const gridColumnGap: Parser;
253
+ declare const gridRowGap: Parser;
254
+ declare const gridColumn: Parser;
255
+ declare const gridRow: Parser;
256
+ declare const gridAutoFlow: Parser;
257
+ declare const gridAutoColumns: Parser;
258
+ declare const gridAutoRows: Parser;
259
+ declare const gridTemplateColumns: Parser;
260
+ declare const gridTemplateRows: Parser;
261
+ declare const gridTemplateAreas: Parser;
262
+ declare const gridArea: Parser;
263
+ declare const borderWidth: Parser;
264
+ declare const borderStyle: Parser;
265
+ declare const borderColor: Parser;
266
+ declare const borderTop: Parser;
267
+ declare const borderRight: Parser;
268
+ declare const borderBottom: Parser;
269
+ declare const borderLeft: Parser;
270
+ declare const borderRadius: Parser;
271
+ declare const backgroundImage: Parser;
272
+ declare const backgroundSize: Parser;
273
+ declare const backgroundPosition: Parser;
274
+ declare const backgroundRepeat: Parser;
275
+ declare const zIndex: Parser;
276
+ declare const top: Parser;
277
+ declare const right: Parser;
278
+ declare const bottom: Parser;
279
+ declare const left: Parser;
280
+ //#endregion
281
+ export { BackgroundProps, BorderProps, ColorProps, type ConfigStyle, FlexboxProps, GridProps, LayoutProps, MarginProps, ObjectOrArray, PaddingProps, type Parser, type ParserConfig, PositionProps, type Props, RequiredTheme, ResponsiveValue, Scale, ShadowProps, SpaceProps, type StyleFn, type StyleObject, type SystemConfig, TLengthStyledSystem, Theme, ThemeValue, type Transform, TypographyProps, alignContent, alignItems, alignSelf, background, backgroundImage, backgroundPosition, backgroundRepeat, backgroundSize, border, border as borders, borderBottom, borderColor, borderLeft, borderRadius, borderRight, borderStyle, borderTop, borderWidth, bottom, shadow as boxShadow, shadow, shadow as textShadow, buttonStyle, color, colorStyle, compose, createParser, createStyleFunction, display, flex, flexBasis, flexDirection, flexGrow, flexShrink, flexWrap, flexbox, fontFamily, fontSize, fontStyle, fontWeight, get, grid, gridArea, gridAutoColumns, gridAutoFlow, gridAutoRows, gridColumn, gridColumnGap, gridGap, gridRow, gridRowGap, gridTemplateAreas, gridTemplateColumns, gridTemplateRows, height, justifyContent, justifyItems, justifySelf, layout, left, letterSpacing, lineHeight, margin, maxHeight, maxWidth, minHeight, minWidth, opacity, order, overflow, overflowX, overflowY, padding, position, right, size, space, style, system, textAlign, textStyle, top, typography, variant, verticalAlign, width, zIndex };
package/dist/index.mjs ADDED
@@ -0,0 +1,98 @@
1
+ import { compose, createParser, createStyleFunction, get, system } from "./core.mjs";
2
+ import { t as background } from "./background-B-jql3jb.mjs";
3
+ import { t as border } from "./border-Dder4Dhp.mjs";
4
+ import { t as color } from "./color-CGmMe8yP.mjs";
5
+ import { t as flexbox } from "./flexbox-XQnlnfa4.mjs";
6
+ import { t as grid } from "./grid-Bpk-QjhF.mjs";
7
+ import { t as layout } from "./layout-TqD8vcEl.mjs";
8
+ import { t as position } from "./position-jf6VlRyR.mjs";
9
+ import { t as typography } from "./typography-CptBXSy0.mjs";
10
+ import { n as padding, r as space, t as margin } from "./space-CNrX-zoo.mjs";
11
+ import { t as shadow } from "./shadow-Bp7lx_41.mjs";
12
+ import { i as variant, n as colorStyle, r as textStyle, t as buttonStyle } from "./variant-CWUfe1Cc.mjs";
13
+ //#region src/style/style.ts
14
+ const style = ({ prop, cssProperty, alias, key, transformValue, scale, properties }) => {
15
+ const config = {};
16
+ config[prop] = createStyleFunction({
17
+ properties,
18
+ property: cssProperty || prop,
19
+ scale: key,
20
+ defaultScale: scale,
21
+ transform: transformValue
22
+ });
23
+ if (alias) config[alias] = config[prop];
24
+ return createParser(config);
25
+ };
26
+ //#endregion
27
+ //#region src/index.ts
28
+ const layoutFns = layout;
29
+ const width = layoutFns.width;
30
+ const height = layoutFns.height;
31
+ const minWidth = layoutFns.minWidth;
32
+ const minHeight = layoutFns.minHeight;
33
+ const maxWidth = layoutFns.maxWidth;
34
+ const maxHeight = layoutFns.maxHeight;
35
+ const size = layoutFns.size;
36
+ const verticalAlign = layoutFns.verticalAlign;
37
+ const display = layoutFns.display;
38
+ const overflow = layoutFns.overflow;
39
+ const overflowX = layoutFns.overflowX;
40
+ const overflowY = layoutFns.overflowY;
41
+ const opacity = color.opacity;
42
+ const typographyFns = typography;
43
+ const fontSize = typographyFns.fontSize;
44
+ const fontFamily = typographyFns.fontFamily;
45
+ const fontWeight = typographyFns.fontWeight;
46
+ const lineHeight = typographyFns.lineHeight;
47
+ const textAlign = typographyFns.textAlign;
48
+ const fontStyle = typographyFns.fontStyle;
49
+ const letterSpacing = typographyFns.letterSpacing;
50
+ const flexboxFns = flexbox;
51
+ const alignItems = flexboxFns.alignItems;
52
+ const alignContent = flexboxFns.alignContent;
53
+ const justifyItems = flexboxFns.justifyItems;
54
+ const justifyContent = flexboxFns.justifyContent;
55
+ const flexWrap = flexboxFns.flexWrap;
56
+ const flexDirection = flexboxFns.flexDirection;
57
+ const flex = flexboxFns.flex;
58
+ const flexGrow = flexboxFns.flexGrow;
59
+ const flexShrink = flexboxFns.flexShrink;
60
+ const flexBasis = flexboxFns.flexBasis;
61
+ const justifySelf = flexboxFns.justifySelf;
62
+ const alignSelf = flexboxFns.alignSelf;
63
+ const order = flexboxFns.order;
64
+ const gridFns = grid;
65
+ const gridGap = gridFns.gridGap;
66
+ const gridColumnGap = gridFns.gridColumnGap;
67
+ const gridRowGap = gridFns.gridRowGap;
68
+ const gridColumn = gridFns.gridColumn;
69
+ const gridRow = gridFns.gridRow;
70
+ const gridAutoFlow = gridFns.gridAutoFlow;
71
+ const gridAutoColumns = gridFns.gridAutoColumns;
72
+ const gridAutoRows = gridFns.gridAutoRows;
73
+ const gridTemplateColumns = gridFns.gridTemplateColumns;
74
+ const gridTemplateRows = gridFns.gridTemplateRows;
75
+ const gridTemplateAreas = gridFns.gridTemplateAreas;
76
+ const gridArea = gridFns.gridArea;
77
+ const borderFns = border;
78
+ const borderWidth = borderFns.borderWidth;
79
+ const borderStyle = borderFns.borderStyle;
80
+ const borderColor = borderFns.borderColor;
81
+ const borderTop = borderFns.borderTop;
82
+ const borderRight = borderFns.borderRight;
83
+ const borderBottom = borderFns.borderBottom;
84
+ const borderLeft = borderFns.borderLeft;
85
+ const borderRadius = borderFns.borderRadius;
86
+ const backgroundFns = background;
87
+ const backgroundImage = backgroundFns.backgroundImage;
88
+ const backgroundSize = backgroundFns.backgroundSize;
89
+ const backgroundPosition = backgroundFns.backgroundPosition;
90
+ const backgroundRepeat = backgroundFns.backgroundRepeat;
91
+ const positionFns = position;
92
+ const zIndex = positionFns.zIndex;
93
+ const top = positionFns.top;
94
+ const right = positionFns.right;
95
+ const bottom = positionFns.bottom;
96
+ const left = positionFns.left;
97
+ //#endregion
98
+ export { alignContent, alignItems, alignSelf, background, backgroundImage, backgroundPosition, backgroundRepeat, backgroundSize, border, border as borders, borderBottom, borderColor, borderLeft, borderRadius, borderRight, borderStyle, borderTop, borderWidth, bottom, shadow as boxShadow, shadow, shadow as textShadow, buttonStyle, color, colorStyle, compose, createParser, createStyleFunction, display, flex, flexBasis, flexDirection, flexGrow, flexShrink, flexWrap, flexbox, fontFamily, fontSize, fontStyle, fontWeight, get, grid, gridArea, gridAutoColumns, gridAutoFlow, gridAutoRows, gridColumn, gridColumnGap, gridGap, gridRow, gridRowGap, gridTemplateAreas, gridTemplateColumns, gridTemplateRows, height, justifyContent, justifyItems, justifySelf, layout, left, letterSpacing, lineHeight, margin, maxHeight, maxWidth, minHeight, minWidth, opacity, order, overflow, overflowX, overflowY, padding, position, right, size, space, style, system, textAlign, textStyle, top, typography, variant, verticalAlign, width, zIndex };
@@ -0,0 +1,48 @@
1
+ const require_core = require("./core.cjs");
2
+ //#region src/layout/layout.ts
3
+ const isNumber = (n) => typeof n === "number" && !isNaN(n);
4
+ const getWidth = (n, scale) => require_core.get(scale, n, !isNumber(n) || n > 1 ? n : n * 100 + "%");
5
+ const config = {
6
+ width: {
7
+ property: "width",
8
+ scale: "sizes",
9
+ transform: getWidth
10
+ },
11
+ height: {
12
+ property: "height",
13
+ scale: "sizes"
14
+ },
15
+ minWidth: {
16
+ property: "minWidth",
17
+ scale: "sizes"
18
+ },
19
+ minHeight: {
20
+ property: "minHeight",
21
+ scale: "sizes"
22
+ },
23
+ maxWidth: {
24
+ property: "maxWidth",
25
+ scale: "sizes"
26
+ },
27
+ maxHeight: {
28
+ property: "maxHeight",
29
+ scale: "sizes"
30
+ },
31
+ size: {
32
+ properties: ["width", "height"],
33
+ scale: "sizes"
34
+ },
35
+ overflow: true,
36
+ overflowX: true,
37
+ overflowY: true,
38
+ display: true,
39
+ verticalAlign: true
40
+ };
41
+ const layout = require_core.system(config);
42
+ //#endregion
43
+ Object.defineProperty(exports, "layout", {
44
+ enumerable: true,
45
+ get: function() {
46
+ return layout;
47
+ }
48
+ });
@@ -0,0 +1,42 @@
1
+ import { get, system } from "./core.mjs";
2
+ //#region src/layout/layout.ts
3
+ const isNumber = (n) => typeof n === "number" && !isNaN(n);
4
+ const getWidth = (n, scale) => get(scale, n, !isNumber(n) || n > 1 ? n : n * 100 + "%");
5
+ const layout = system({
6
+ width: {
7
+ property: "width",
8
+ scale: "sizes",
9
+ transform: getWidth
10
+ },
11
+ height: {
12
+ property: "height",
13
+ scale: "sizes"
14
+ },
15
+ minWidth: {
16
+ property: "minWidth",
17
+ scale: "sizes"
18
+ },
19
+ minHeight: {
20
+ property: "minHeight",
21
+ scale: "sizes"
22
+ },
23
+ maxWidth: {
24
+ property: "maxWidth",
25
+ scale: "sizes"
26
+ },
27
+ maxHeight: {
28
+ property: "maxHeight",
29
+ scale: "sizes"
30
+ },
31
+ size: {
32
+ properties: ["width", "height"],
33
+ scale: "sizes"
34
+ },
35
+ overflow: true,
36
+ overflowX: true,
37
+ overflowY: true,
38
+ display: true,
39
+ verticalAlign: true
40
+ });
41
+ //#endregion
42
+ export { layout as t };
@@ -0,0 +1,7 @@
1
+ Object.defineProperties(exports, {
2
+ __esModule: { value: true },
3
+ [Symbol.toStringTag]: { value: "Module" }
4
+ });
5
+ const require_layout = require("./layout-B1-2dfQ9.cjs");
6
+ exports.default = require_layout.layout;
7
+ exports.layout = require_layout.layout;
@@ -0,0 +1,2 @@
1
+ import { t as layout } from "./index-Nc-10syf.cjs";
2
+ export { layout as default, layout };
@@ -0,0 +1,2 @@
1
+ import { t as layout } from "./index-CsS_gcI9.mjs";
2
+ export { layout as default, layout };
@@ -0,0 +1,2 @@
1
+ import { t as layout } from "./layout-TqD8vcEl.mjs";
2
+ export { layout as default, layout };
@@ -0,0 +1,42 @@
1
+ import { system } from "./core.mjs";
2
+ //#region src/position/position.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 position = system({
15
+ position: true,
16
+ zIndex: {
17
+ property: "zIndex",
18
+ scale: "zIndices"
19
+ },
20
+ top: {
21
+ property: "top",
22
+ scale: "space",
23
+ defaultScale: spaceScale
24
+ },
25
+ right: {
26
+ property: "right",
27
+ scale: "space",
28
+ defaultScale: spaceScale
29
+ },
30
+ bottom: {
31
+ property: "bottom",
32
+ scale: "space",
33
+ defaultScale: spaceScale
34
+ },
35
+ left: {
36
+ property: "left",
37
+ scale: "space",
38
+ defaultScale: spaceScale
39
+ }
40
+ });
41
+ //#endregion
42
+ export { position as t };
@@ -0,0 +1,48 @@
1
+ const require_core = require("./core.cjs");
2
+ //#region src/position/position.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
+ position: true,
16
+ zIndex: {
17
+ property: "zIndex",
18
+ scale: "zIndices"
19
+ },
20
+ top: {
21
+ property: "top",
22
+ scale: "space",
23
+ defaultScale: spaceScale
24
+ },
25
+ right: {
26
+ property: "right",
27
+ scale: "space",
28
+ defaultScale: spaceScale
29
+ },
30
+ bottom: {
31
+ property: "bottom",
32
+ scale: "space",
33
+ defaultScale: spaceScale
34
+ },
35
+ left: {
36
+ property: "left",
37
+ scale: "space",
38
+ defaultScale: spaceScale
39
+ }
40
+ };
41
+ const position = require_core.system(config);
42
+ //#endregion
43
+ Object.defineProperty(exports, "position", {
44
+ enumerable: true,
45
+ get: function() {
46
+ return position;
47
+ }
48
+ });
@@ -0,0 +1,7 @@
1
+ Object.defineProperties(exports, {
2
+ __esModule: { value: true },
3
+ [Symbol.toStringTag]: { value: "Module" }
4
+ });
5
+ const require_position = require("./position-zWvCE4hD.cjs");
6
+ exports.default = require_position.position;
7
+ exports.position = require_position.position;
@@ -0,0 +1,2 @@
1
+ import { t as position } from "./index-z86wOHTb.cjs";
2
+ export { position as default, position };
@@ -0,0 +1,2 @@
1
+ import { t as position } from "./index-CrUx2vIP.mjs";
2
+ export { position as default, position };
@@ -0,0 +1,2 @@
1
+ import { t as position } from "./position-jf6VlRyR.mjs";
2
+ export { position as default, position };
@@ -0,0 +1,16 @@
1
+ import { compose } from "./core.mjs";
2
+ import { t as background } from "./background-B-jql3jb.mjs";
3
+ import { t as border } from "./border-Dder4Dhp.mjs";
4
+ import { t as color } from "./color-CGmMe8yP.mjs";
5
+ import { t as flexbox } from "./flexbox-XQnlnfa4.mjs";
6
+ import { t as grid } from "./grid-Bpk-QjhF.mjs";
7
+ import { t as layout } from "./layout-TqD8vcEl.mjs";
8
+ import { t as position } from "./position-jf6VlRyR.mjs";
9
+ import { t as typography } from "./typography-CptBXSy0.mjs";
10
+ import { r as space } from "./space-CNrX-zoo.mjs";
11
+ import { t as shadow } from "./shadow-Bp7lx_41.mjs";
12
+ import { n as colorStyle, r as textStyle, t as buttonStyle } from "./variant-CWUfe1Cc.mjs";
13
+ //#region src/presets/presets.ts
14
+ const all = compose(space, typography, color, layout, flexbox, border, background, position, grid, shadow, buttonStyle, textStyle, colorStyle);
15
+ //#endregion
16
+ export { all as t };
@@ -0,0 +1,21 @@
1
+ const require_core = require("./core.cjs");
2
+ const require_background = require("./background-wugr6cG7.cjs");
3
+ const require_border = require("./border-UuT-fTpy.cjs");
4
+ const require_color = require("./color-BNs17Gw-.cjs");
5
+ const require_flexbox = require("./flexbox-CFkO6PrP.cjs");
6
+ const require_grid = require("./grid-CpvRIng4.cjs");
7
+ const require_layout = require("./layout-B1-2dfQ9.cjs");
8
+ const require_position = require("./position-zWvCE4hD.cjs");
9
+ const require_typography = require("./typography-DD_eWLLx.cjs");
10
+ const require_space = require("./space-C14uiNpw.cjs");
11
+ const require_shadow = require("./shadow-BrDnaQQl.cjs");
12
+ const require_variant = require("./variant-ChsBzwrI.cjs");
13
+ //#region src/presets/presets.ts
14
+ const all = require_core.compose(require_space.space, require_typography.typography, require_color.color, require_layout.layout, require_flexbox.flexbox, require_border.border, require_background.background, require_position.position, require_grid.grid, require_shadow.shadow, require_variant.buttonStyle, require_variant.textStyle, require_variant.colorStyle);
15
+ //#endregion
16
+ Object.defineProperty(exports, "all", {
17
+ enumerable: true,
18
+ get: function() {
19
+ return all;
20
+ }
21
+ });
package/dist/props.cjs ADDED
@@ -0,0 +1,23 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_presets = require("./presets-DlUVOAIL.cjs");
3
+ //#region src/props/props.ts
4
+ const regex = new RegExp(`^(${require_presets.all.propNames.join("|")})$`);
5
+ const omit = (props) => {
6
+ const next = {};
7
+ for (const key in props) {
8
+ if (regex.test(key)) continue;
9
+ next[key] = props[key];
10
+ }
11
+ return next;
12
+ };
13
+ const pick = (props) => {
14
+ const next = {};
15
+ for (const key in props) {
16
+ if (!regex.test(key)) continue;
17
+ next[key] = props[key];
18
+ }
19
+ return next;
20
+ };
21
+ //#endregion
22
+ exports.omit = omit;
23
+ exports.pick = pick;