@pandacss/studio 0.35.0 → 0.36.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/package.json +7 -7
- package/src/components/semantic-color.tsx +1 -1
- package/styled-system/patterns/aspect-ratio.d.ts +1 -1
- package/styled-system/patterns/bleed.d.ts +3 -3
- package/styled-system/patterns/box.d.ts +1 -1
- package/styled-system/patterns/center.d.ts +1 -1
- package/styled-system/patterns/circle.d.ts +2 -2
- package/styled-system/patterns/container.d.ts +1 -1
- package/styled-system/patterns/cq.d.ts +2 -2
- package/styled-system/patterns/divider.d.ts +1 -1
- package/styled-system/patterns/flex.d.ts +8 -8
- package/styled-system/patterns/float.d.ts +1 -1
- package/styled-system/patterns/grid-item.d.ts +1 -1
- package/styled-system/patterns/grid.d.ts +4 -4
- package/styled-system/patterns/hstack.d.ts +3 -3
- package/styled-system/patterns/link-box.d.ts +1 -1
- package/styled-system/patterns/link-overlay.d.ts +1 -1
- package/styled-system/patterns/spacer.d.ts +1 -1
- package/styled-system/patterns/square.d.ts +2 -2
- package/styled-system/patterns/stack.d.ts +5 -5
- package/styled-system/patterns/visually-hidden.d.ts +1 -1
- package/styled-system/patterns/vstack.d.ts +3 -3
- package/styled-system/patterns/wrap.d.ts +6 -6
- package/styled-system/types/conditions.d.ts +2 -6
- package/styled-system/types/prop-type.d.ts +34 -206
- package/styled-system/types/static-css.d.ts +4 -0
- package/styled-system/types/style-props.d.ts +7448 -659
- package/styled-system/types/system-types.d.ts +2 -6
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
|
-
import type {
|
|
2
|
+
import type { Conditional } from './conditions';
|
|
3
3
|
import type { CssProperties } from './system-types';
|
|
4
4
|
import type { Tokens } from '../tokens/index';
|
|
5
5
|
|
|
6
|
-
interface
|
|
6
|
+
export interface UtilityValues {
|
|
7
7
|
aspectRatio: Tokens["aspectRatios"];
|
|
8
|
-
zIndex: Tokens["zIndex"];
|
|
9
8
|
top: Tokens["spacing"];
|
|
10
9
|
left: Tokens["spacing"];
|
|
11
10
|
insetInline: Tokens["spacing"];
|
|
@@ -56,7 +55,6 @@ interface PropertyValueTypes {
|
|
|
56
55
|
marginInline: "auto" | Tokens["spacing"];
|
|
57
56
|
marginInlineEnd: "auto" | Tokens["spacing"];
|
|
58
57
|
marginInlineStart: "auto" | Tokens["spacing"];
|
|
59
|
-
outlineWidth: Tokens["borderWidths"];
|
|
60
58
|
outlineColor: Tokens["colors"];
|
|
61
59
|
outline: Tokens["borders"];
|
|
62
60
|
outlineOffset: Tokens["spacing"];
|
|
@@ -94,8 +92,8 @@ interface PropertyValueTypes {
|
|
|
94
92
|
background: Tokens["colors"];
|
|
95
93
|
backgroundColor: Tokens["colors"];
|
|
96
94
|
backgroundImage: Tokens["assets"];
|
|
97
|
-
backgroundGradient:
|
|
98
|
-
textGradient:
|
|
95
|
+
backgroundGradient: "to-t" | "to-tr" | "to-r" | "to-br" | "to-b" | "to-bl" | "to-l" | "to-tl";
|
|
96
|
+
textGradient: "to-t" | "to-tr" | "to-r" | "to-br" | "to-b" | "to-bl" | "to-l" | "to-tl";
|
|
99
97
|
gradientFrom: Tokens["colors"];
|
|
100
98
|
gradientTo: Tokens["colors"];
|
|
101
99
|
gradientVia: Tokens["colors"];
|
|
@@ -115,27 +113,18 @@ interface PropertyValueTypes {
|
|
|
115
113
|
borderEndEndRadius: Tokens["radii"];
|
|
116
114
|
borderEndRadius: Tokens["radii"] | CssProperties["borderRadius"];
|
|
117
115
|
border: Tokens["borders"];
|
|
118
|
-
borderWidth: Tokens["borderWidths"];
|
|
119
|
-
borderTopWidth: Tokens["borderWidths"];
|
|
120
|
-
borderLeftWidth: Tokens["borderWidths"];
|
|
121
|
-
borderRightWidth: Tokens["borderWidths"];
|
|
122
|
-
borderBottomWidth: Tokens["borderWidths"];
|
|
123
116
|
borderColor: Tokens["colors"];
|
|
124
117
|
borderInline: Tokens["borders"];
|
|
125
|
-
borderInlineWidth: Tokens["borderWidths"];
|
|
126
118
|
borderInlineColor: Tokens["colors"];
|
|
127
119
|
borderBlock: Tokens["borders"];
|
|
128
|
-
borderBlockWidth: Tokens["borderWidths"];
|
|
129
120
|
borderBlockColor: Tokens["colors"];
|
|
130
121
|
borderLeft: Tokens["borders"];
|
|
131
122
|
borderLeftColor: Tokens["colors"];
|
|
132
123
|
borderInlineStart: Tokens["borders"];
|
|
133
|
-
borderInlineStartWidth: Tokens["borderWidths"];
|
|
134
124
|
borderInlineStartColor: Tokens["colors"];
|
|
135
125
|
borderRight: Tokens["borders"];
|
|
136
126
|
borderRightColor: Tokens["colors"];
|
|
137
127
|
borderInlineEnd: Tokens["borders"];
|
|
138
|
-
borderInlineEndWidth: Tokens["borderWidths"];
|
|
139
128
|
borderInlineEndColor: Tokens["colors"];
|
|
140
129
|
borderTop: Tokens["borders"];
|
|
141
130
|
borderTopColor: Tokens["colors"];
|
|
@@ -145,11 +134,9 @@ interface PropertyValueTypes {
|
|
|
145
134
|
borderBlockEndColor: Tokens["colors"];
|
|
146
135
|
borderBlockStart: Tokens["borders"];
|
|
147
136
|
borderBlockStartColor: Tokens["colors"];
|
|
148
|
-
opacity: Tokens["opacity"];
|
|
149
137
|
boxShadow: Tokens["shadows"];
|
|
150
138
|
boxShadowColor: Tokens["colors"];
|
|
151
139
|
filter: "auto";
|
|
152
|
-
dropShadow: Tokens["dropShadows"];
|
|
153
140
|
blur: Tokens["blurs"];
|
|
154
141
|
backdropFilter: "auto";
|
|
155
142
|
backdropBlur: Tokens["blurs"];
|
|
@@ -161,7 +148,6 @@ interface PropertyValueTypes {
|
|
|
161
148
|
transitionDuration: Tokens["durations"];
|
|
162
149
|
transition: "all" | "common" | "background" | "colors" | "opacity" | "shadow" | "transform";
|
|
163
150
|
animation: Tokens["animations"];
|
|
164
|
-
animationName: Tokens["animationName"];
|
|
165
151
|
animationDelay: Tokens["durations"];
|
|
166
152
|
scale: "auto" | CssProperties["scale"];
|
|
167
153
|
translate: "auto" | CssProperties["translate"];
|
|
@@ -201,181 +187,15 @@ interface PropertyValueTypes {
|
|
|
201
187
|
scrollSnapMarginRight: Tokens["spacing"];
|
|
202
188
|
fill: Tokens["colors"];
|
|
203
189
|
stroke: Tokens["colors"];
|
|
204
|
-
strokeWidth: Tokens["borderWidths"];
|
|
205
190
|
srOnly: boolean;
|
|
206
191
|
debug: boolean;
|
|
207
|
-
containerName:
|
|
192
|
+
containerName: CssProperties["containerName"];
|
|
208
193
|
colorPalette: "current" | "black" | "white" | "transparent" | "rose" | "pink" | "fuchsia" | "purple" | "violet" | "indigo" | "blue" | "sky" | "cyan" | "teal" | "emerald" | "green" | "lime" | "yellow" | "amber" | "orange" | "red" | "stone" | "zinc" | "gray" | "slate" | "neutral" | "text" | "bg" | "card" | "border" | "accent";
|
|
209
194
|
textStyle: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "6xl" | "7xl" | "8xl" | "9xl";
|
|
210
195
|
}
|
|
211
196
|
|
|
212
197
|
|
|
213
198
|
|
|
214
|
-
type CssValue<T> = T extends keyof CssProperties ? CssProperties[T] : never
|
|
215
|
-
|
|
216
|
-
type Shorthand<T> = T extends keyof PropertyValueTypes ? PropertyValueTypes[T] | CssValue<T> : CssValue<T>
|
|
217
|
-
|
|
218
|
-
export interface PropertyTypes extends PropertyValueTypes {
|
|
219
|
-
|
|
220
|
-
pos: Shorthand<"position">;
|
|
221
|
-
insetX: Shorthand<"insetInline">;
|
|
222
|
-
insetY: Shorthand<"insetBlock">;
|
|
223
|
-
insetEnd: Shorthand<"insetInlineEnd">;
|
|
224
|
-
end: Shorthand<"insetInlineEnd">;
|
|
225
|
-
insetStart: Shorthand<"insetInlineStart">;
|
|
226
|
-
start: Shorthand<"insetInlineStart">;
|
|
227
|
-
flexDir: Shorthand<"flexDirection">;
|
|
228
|
-
p: Shorthand<"padding">;
|
|
229
|
-
pl: Shorthand<"paddingLeft">;
|
|
230
|
-
pr: Shorthand<"paddingRight">;
|
|
231
|
-
pt: Shorthand<"paddingTop">;
|
|
232
|
-
pb: Shorthand<"paddingBottom">;
|
|
233
|
-
py: Shorthand<"paddingBlock">;
|
|
234
|
-
paddingY: Shorthand<"paddingBlock">;
|
|
235
|
-
paddingX: Shorthand<"paddingInline">;
|
|
236
|
-
px: Shorthand<"paddingInline">;
|
|
237
|
-
pe: Shorthand<"paddingInlineEnd">;
|
|
238
|
-
paddingEnd: Shorthand<"paddingInlineEnd">;
|
|
239
|
-
ps: Shorthand<"paddingInlineStart">;
|
|
240
|
-
paddingStart: Shorthand<"paddingInlineStart">;
|
|
241
|
-
ml: Shorthand<"marginLeft">;
|
|
242
|
-
mr: Shorthand<"marginRight">;
|
|
243
|
-
mt: Shorthand<"marginTop">;
|
|
244
|
-
mb: Shorthand<"marginBottom">;
|
|
245
|
-
m: Shorthand<"margin">;
|
|
246
|
-
my: Shorthand<"marginBlock">;
|
|
247
|
-
marginY: Shorthand<"marginBlock">;
|
|
248
|
-
mx: Shorthand<"marginInline">;
|
|
249
|
-
marginX: Shorthand<"marginInline">;
|
|
250
|
-
me: Shorthand<"marginInlineEnd">;
|
|
251
|
-
marginEnd: Shorthand<"marginInlineEnd">;
|
|
252
|
-
ms: Shorthand<"marginInlineStart">;
|
|
253
|
-
marginStart: Shorthand<"marginInlineStart">;
|
|
254
|
-
ringWidth: Shorthand<"outlineWidth">;
|
|
255
|
-
ringColor: Shorthand<"outlineColor">;
|
|
256
|
-
ring: Shorthand<"outline">;
|
|
257
|
-
ringOffset: Shorthand<"outlineOffset">;
|
|
258
|
-
w: Shorthand<"width">;
|
|
259
|
-
minW: Shorthand<"minWidth">;
|
|
260
|
-
maxW: Shorthand<"maxWidth">;
|
|
261
|
-
h: Shorthand<"height">;
|
|
262
|
-
minH: Shorthand<"minHeight">;
|
|
263
|
-
maxH: Shorthand<"maxHeight">;
|
|
264
|
-
textShadowColor: Shorthand<"textShadowColor">;
|
|
265
|
-
bgPosition: Shorthand<"backgroundPosition">;
|
|
266
|
-
bgPositionX: Shorthand<"backgroundPositionX">;
|
|
267
|
-
bgPositionY: Shorthand<"backgroundPositionY">;
|
|
268
|
-
bgAttachment: Shorthand<"backgroundAttachment">;
|
|
269
|
-
bgClip: Shorthand<"backgroundClip">;
|
|
270
|
-
bg: Shorthand<"background">;
|
|
271
|
-
bgColor: Shorthand<"backgroundColor">;
|
|
272
|
-
bgOrigin: Shorthand<"backgroundOrigin">;
|
|
273
|
-
bgImage: Shorthand<"backgroundImage">;
|
|
274
|
-
bgRepeat: Shorthand<"backgroundRepeat">;
|
|
275
|
-
bgBlendMode: Shorthand<"backgroundBlendMode">;
|
|
276
|
-
bgSize: Shorthand<"backgroundSize">;
|
|
277
|
-
bgGradient: Shorthand<"backgroundGradient">;
|
|
278
|
-
rounded: Shorthand<"borderRadius">;
|
|
279
|
-
roundedTopLeft: Shorthand<"borderTopLeftRadius">;
|
|
280
|
-
roundedTopRight: Shorthand<"borderTopRightRadius">;
|
|
281
|
-
roundedBottomRight: Shorthand<"borderBottomRightRadius">;
|
|
282
|
-
roundedBottomLeft: Shorthand<"borderBottomLeftRadius">;
|
|
283
|
-
roundedTop: Shorthand<"borderTopRadius">;
|
|
284
|
-
roundedRight: Shorthand<"borderRightRadius">;
|
|
285
|
-
roundedBottom: Shorthand<"borderBottomRadius">;
|
|
286
|
-
roundedLeft: Shorthand<"borderLeftRadius">;
|
|
287
|
-
roundedStartStart: Shorthand<"borderStartStartRadius">;
|
|
288
|
-
roundedStartEnd: Shorthand<"borderStartEndRadius">;
|
|
289
|
-
roundedStart: Shorthand<"borderStartRadius">;
|
|
290
|
-
roundedEndStart: Shorthand<"borderEndStartRadius">;
|
|
291
|
-
roundedEndEnd: Shorthand<"borderEndEndRadius">;
|
|
292
|
-
roundedEnd: Shorthand<"borderEndRadius">;
|
|
293
|
-
borderX: Shorthand<"borderInline">;
|
|
294
|
-
borderXWidth: Shorthand<"borderInlineWidth">;
|
|
295
|
-
borderXColor: Shorthand<"borderInlineColor">;
|
|
296
|
-
borderY: Shorthand<"borderBlock">;
|
|
297
|
-
borderYWidth: Shorthand<"borderBlockWidth">;
|
|
298
|
-
borderYColor: Shorthand<"borderBlockColor">;
|
|
299
|
-
borderStart: Shorthand<"borderInlineStart">;
|
|
300
|
-
borderStartWidth: Shorthand<"borderInlineStartWidth">;
|
|
301
|
-
borderStartColor: Shorthand<"borderInlineStartColor">;
|
|
302
|
-
borderEnd: Shorthand<"borderInlineEnd">;
|
|
303
|
-
borderEndWidth: Shorthand<"borderInlineEndWidth">;
|
|
304
|
-
borderEndColor: Shorthand<"borderInlineEndColor">;
|
|
305
|
-
shadow: Shorthand<"boxShadow">;
|
|
306
|
-
shadowColor: Shorthand<"boxShadowColor">;
|
|
307
|
-
x: Shorthand<"translateX">;
|
|
308
|
-
y: Shorthand<"translateY">;
|
|
309
|
-
scrollMarginY: Shorthand<"scrollMarginBlock">;
|
|
310
|
-
scrollMarginX: Shorthand<"scrollMarginInline">;
|
|
311
|
-
scrollPaddingY: Shorthand<"scrollPaddingBlock">;
|
|
312
|
-
scrollPaddingX: Shorthand<"scrollPaddingInline">;
|
|
313
|
-
}
|
|
314
|
-
|
|
315
|
-
type StrictableProps =
|
|
316
|
-
| 'alignContent'
|
|
317
|
-
| 'alignItems'
|
|
318
|
-
| 'alignSelf'
|
|
319
|
-
| 'all'
|
|
320
|
-
| 'animationComposition'
|
|
321
|
-
| 'animationDirection'
|
|
322
|
-
| 'animationFillMode'
|
|
323
|
-
| 'appearance'
|
|
324
|
-
| 'backfaceVisibility'
|
|
325
|
-
| 'backgroundAttachment'
|
|
326
|
-
| 'backgroundClip'
|
|
327
|
-
| 'borderCollapse'
|
|
328
|
-
| 'borderBlockEndStyle'
|
|
329
|
-
| 'borderBlockStartStyle'
|
|
330
|
-
| 'borderBlockStyle'
|
|
331
|
-
| 'borderBottomStyle'
|
|
332
|
-
| 'borderInlineEndStyle'
|
|
333
|
-
| 'borderInlineStartStyle'
|
|
334
|
-
| 'borderInlineStyle'
|
|
335
|
-
| 'borderLeftStyle'
|
|
336
|
-
| 'borderRightStyle'
|
|
337
|
-
| 'borderTopStyle'
|
|
338
|
-
| 'boxDecorationBreak'
|
|
339
|
-
| 'boxSizing'
|
|
340
|
-
| 'breakAfter'
|
|
341
|
-
| 'breakBefore'
|
|
342
|
-
| 'breakInside'
|
|
343
|
-
| 'captionSide'
|
|
344
|
-
| 'clear'
|
|
345
|
-
| 'columnFill'
|
|
346
|
-
| 'columnRuleStyle'
|
|
347
|
-
| 'contentVisibility'
|
|
348
|
-
| 'direction'
|
|
349
|
-
| 'display'
|
|
350
|
-
| 'emptyCells'
|
|
351
|
-
| 'flexDirection'
|
|
352
|
-
| 'flexWrap'
|
|
353
|
-
| 'float'
|
|
354
|
-
| 'fontKerning'
|
|
355
|
-
| 'forcedColorAdjust'
|
|
356
|
-
| 'isolation'
|
|
357
|
-
| 'lineBreak'
|
|
358
|
-
| 'mixBlendMode'
|
|
359
|
-
| 'objectFit'
|
|
360
|
-
| 'outlineStyle'
|
|
361
|
-
| 'overflow'
|
|
362
|
-
| 'overflowX'
|
|
363
|
-
| 'overflowY'
|
|
364
|
-
| 'overflowBlock'
|
|
365
|
-
| 'overflowInline'
|
|
366
|
-
| 'overflowWrap'
|
|
367
|
-
| 'pointerEvents'
|
|
368
|
-
| 'position'
|
|
369
|
-
| 'resize'
|
|
370
|
-
| 'scrollBehavior'
|
|
371
|
-
| 'touchAction'
|
|
372
|
-
| 'transformBox'
|
|
373
|
-
| 'transformStyle'
|
|
374
|
-
| 'userSelect'
|
|
375
|
-
| 'visibility'
|
|
376
|
-
| 'wordBreak'
|
|
377
|
-
| 'writingMode'
|
|
378
|
-
|
|
379
199
|
type WithColorOpacityModifier<T> = T extends string ? `${T}/${string}` : T
|
|
380
200
|
|
|
381
201
|
type ImportantMark = "!" | "!important"
|
|
@@ -383,26 +203,34 @@ type WhitespaceImportant = ` ${ImportantMark}`
|
|
|
383
203
|
type Important = ImportantMark | WhitespaceImportant
|
|
384
204
|
type WithImportant<T> = T extends string ? `${T}${Important}${string}` : T
|
|
385
205
|
|
|
386
|
-
|
|
206
|
+
/**
|
|
207
|
+
* Only relevant when using `strictTokens` or `strictPropertyValues` in your config.
|
|
208
|
+
* - Allows you to use an escape hatch (e.g. `[123px]`) to use any string as a value.
|
|
209
|
+
* - Allows you to use a color opacity modifier (e.g. `red/300`) with known color values.
|
|
210
|
+
* - Allows you to use an important mark (e.g. `!` or `!important`) in the value.
|
|
211
|
+
*
|
|
212
|
+
* This is useful when you want to use a value that is not defined in the config or want to opt-out of the defaults.
|
|
213
|
+
*
|
|
214
|
+
* @example
|
|
215
|
+
* css({
|
|
216
|
+
* fontSize: '[123px]', // ⚠️ will not throw even if you haven't defined 123px as a token
|
|
217
|
+
* })
|
|
218
|
+
*
|
|
219
|
+
* @see https://panda-css.com/docs/concepts/writing-styles#stricttokens
|
|
220
|
+
* @see https://panda-css.com/docs/concepts/writing-styles#strictpropertyvalues
|
|
221
|
+
*/
|
|
222
|
+
export type WithEscapeHatch<T> = T | `[${string}]` | (T extends string ? WithColorOpacityModifier<string> | WithImportant<T> : T)
|
|
387
223
|
|
|
388
|
-
|
|
224
|
+
/**
|
|
225
|
+
* Will restrict the value of properties that have predefined values to those values only.
|
|
226
|
+
*
|
|
227
|
+
* @example
|
|
228
|
+
* css({
|
|
229
|
+
* display: 'abc', // ❌ will throw
|
|
230
|
+
* })
|
|
231
|
+
*
|
|
232
|
+
* @see https://panda-css.com/docs/concepts/writing-styles#strictpropertyvalues
|
|
233
|
+
*/
|
|
234
|
+
export type OnlyKnown<Key, Value> = Value extends boolean
|
|
389
235
|
? Value
|
|
390
|
-
:
|
|
391
|
-
? Value extends `${infer _}` ? Value : never
|
|
392
|
-
: Value
|
|
393
|
-
|
|
394
|
-
type PropOrCondition<Key, Value> = ConditionalValue<Value | (string & {})>
|
|
395
|
-
|
|
396
|
-
type PropertyTypeValue<T extends string> = T extends keyof PropertyTypes
|
|
397
|
-
? PropOrCondition<T, PropertyTypes[T] | CssValue<T>>
|
|
398
|
-
: never;
|
|
399
|
-
|
|
400
|
-
type CssPropertyValue<T extends string> = T extends keyof CssProperties
|
|
401
|
-
? PropOrCondition<T, CssProperties[T]>
|
|
402
|
-
: never;
|
|
403
|
-
|
|
404
|
-
export type PropertyValue<T extends string> = T extends keyof PropertyTypes
|
|
405
|
-
? PropertyTypeValue<T>
|
|
406
|
-
: T extends keyof CssProperties
|
|
407
|
-
? CssPropertyValue<T>
|
|
408
|
-
: PropOrCondition<T, string | number>
|
|
236
|
+
: Value extends `${infer _}` ? Value : never
|