@mekari/pixel3-styled-system 0.1.5-dev.0 → 0.1.5-dev.1
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/CHANGELOG.md +6 -0
- package/css/conditions.mjs +4 -2
- package/css/css.mjs +1 -1
- package/helpers.mjs +18 -5
- package/jsx/factory.mjs +5 -3
- package/jsx/is-valid-prop.mjs +2 -2
- package/package.json +1 -1
- package/patterns/aspect-ratio.d.ts +0 -1
- package/patterns/bleed.d.ts +0 -1
- package/patterns/box.d.ts +0 -1
- package/patterns/center.d.ts +0 -1
- package/patterns/circle.d.ts +0 -1
- package/patterns/container.d.ts +0 -1
- package/patterns/cq.d.ts +0 -1
- package/patterns/divider.d.ts +0 -1
- package/patterns/flex.d.ts +0 -1
- package/patterns/float.d.ts +0 -1
- package/patterns/grid-item.d.ts +0 -1
- package/patterns/grid.d.ts +0 -1
- package/patterns/hstack.d.ts +0 -1
- package/patterns/link-overlay.d.ts +0 -1
- package/patterns/spacer.d.ts +0 -1
- package/patterns/square.d.ts +0 -1
- package/patterns/stack.d.ts +0 -1
- package/patterns/visually-hidden.d.ts +0 -1
- package/patterns/vstack.d.ts +0 -1
- package/patterns/wrap.d.ts +0 -1
- package/recipes/modal-slot-recipe.d.ts +0 -2
- package/themes/index.mjs +1 -1
- package/themes/theme-next.json +5 -0
- package/tokens/tokens.d.ts +2 -2
- package/types/composition.d.ts +26 -0
- package/types/conditions.d.ts +40 -10
- package/types/global.d.ts +1 -0
- package/types/prop-type.d.ts +5 -4
- package/types/selectors.d.ts +1 -1
- package/types/static-css.d.ts +9 -4
- package/types/style-props.d.ts +228 -205
- package/types/system-types.d.ts +86 -2
package/types/composition.d.ts
CHANGED
|
@@ -132,7 +132,33 @@ export type LayerStyle = CompositionStyleObject<LayerStyleProperty>
|
|
|
132
132
|
|
|
133
133
|
export type LayerStyles = Recursive<Token<LayerStyle>>
|
|
134
134
|
|
|
135
|
+
/* -----------------------------------------------------------------------------
|
|
136
|
+
* Motion styles
|
|
137
|
+
* -----------------------------------------------------------------------------*/
|
|
138
|
+
|
|
139
|
+
type AnimationStyleProperty =
|
|
140
|
+
| 'animation'
|
|
141
|
+
| 'animationComposition'
|
|
142
|
+
| 'animationDelay'
|
|
143
|
+
| 'animationDirection'
|
|
144
|
+
| 'animationDuration'
|
|
145
|
+
| 'animationFillMode'
|
|
146
|
+
| 'animationIterationCount'
|
|
147
|
+
| 'animationName'
|
|
148
|
+
| 'animationPlayState'
|
|
149
|
+
| 'animationTimingFunction'
|
|
150
|
+
| 'animationRange'
|
|
151
|
+
| 'animationRangeStart'
|
|
152
|
+
| 'animationRangeEnd'
|
|
153
|
+
| 'animationTimeline'
|
|
154
|
+
| 'transformOrigin'
|
|
155
|
+
|
|
156
|
+
export type AnimationStyle = CompositionStyleObject<AnimationStyleProperty>
|
|
157
|
+
|
|
158
|
+
export type AnimationStyles = Recursive<Token<AnimationStyle>>
|
|
159
|
+
|
|
135
160
|
export interface CompositionStyles {
|
|
136
161
|
textStyles: TextStyles
|
|
137
162
|
layerStyles: LayerStyles
|
|
163
|
+
animationStyles: AnimationStyles
|
|
138
164
|
}
|
package/types/conditions.d.ts
CHANGED
|
@@ -18,7 +18,7 @@ export interface Conditions {
|
|
|
18
18
|
"_visited": string
|
|
19
19
|
/** `&:target` */
|
|
20
20
|
"_target": string
|
|
21
|
-
/** `&:is(:read-only, [data-read-only])` */
|
|
21
|
+
/** `&:is(:read-only, [data-read-only], [aria-readonly=true])` */
|
|
22
22
|
"_readOnly": string
|
|
23
23
|
/** `&:read-write` */
|
|
24
24
|
"_readWrite": string
|
|
@@ -32,6 +32,12 @@ export interface Conditions {
|
|
|
32
32
|
"_expanded": string
|
|
33
33
|
/** `&[data-highlighted]` */
|
|
34
34
|
"_highlighted": string
|
|
35
|
+
/** `&[data-complete]` */
|
|
36
|
+
"_complete": string
|
|
37
|
+
/** `&[data-incomplete]` */
|
|
38
|
+
"_incomplete": string
|
|
39
|
+
/** `&[data-dragging]` */
|
|
40
|
+
"_dragging": string
|
|
35
41
|
/** `&::before` */
|
|
36
42
|
"_before": string
|
|
37
43
|
/** `&::after` */
|
|
@@ -74,7 +80,7 @@ export interface Conditions {
|
|
|
74
80
|
"_peerFocusWithin": string
|
|
75
81
|
/** `.peer:is(:focus-visible, [data-focus-visible]) ~ &` */
|
|
76
82
|
"_peerFocusVisible": string
|
|
77
|
-
/** `.peer:is(:disabled, [disabled], [data-disabled]) ~ &` */
|
|
83
|
+
/** `.peer:is(:disabled, [disabled], [data-disabled], [aria-disabled=true]) ~ &` */
|
|
78
84
|
"_peerDisabled": string
|
|
79
85
|
/** `.peer:is(:checked, [data-checked], [aria-checked=true], [data-state="checked"]) ~ &` */
|
|
80
86
|
"_peerChecked": string
|
|
@@ -94,13 +100,13 @@ export interface Conditions {
|
|
|
94
100
|
"_groupFocusWithin": string
|
|
95
101
|
/** `.group:is(:focus-visible, [data-focus-visible]) &` */
|
|
96
102
|
"_groupFocusVisible": string
|
|
97
|
-
/** `.group:is(:disabled, [disabled], [data-disabled]) &` */
|
|
103
|
+
/** `.group:is(:disabled, [disabled], [data-disabled], [aria-disabled=true]) &` */
|
|
98
104
|
"_groupDisabled": string
|
|
99
105
|
/** `.group:is(:checked, [data-checked], [aria-checked=true], [data-state="checked"]) &` */
|
|
100
106
|
"_groupChecked": string
|
|
101
107
|
/** `.group:is([aria-expanded=true], [data-expanded], [data-state="expanded"]) &` */
|
|
102
108
|
"_groupExpanded": string
|
|
103
|
-
/** `.group:invalid &` */
|
|
109
|
+
/** `.group:is(:invalid, [data-invalid], [aria-invalid=true]) &` */
|
|
104
110
|
"_groupInvalid": string
|
|
105
111
|
/** `&:is(:indeterminate, [data-indeterminate], [aria-checked=mixed], [data-state=indeterminate])` */
|
|
106
112
|
"_indeterminate": string
|
|
@@ -112,9 +118,9 @@ export interface Conditions {
|
|
|
112
118
|
"_invalid": string
|
|
113
119
|
/** `&:autofill` */
|
|
114
120
|
"_autofill": string
|
|
115
|
-
/** `&:in-range` */
|
|
121
|
+
/** `&:is(:in-range, [data-in-range])` */
|
|
116
122
|
"_inRange": string
|
|
117
|
-
/** `&:out-of-range` */
|
|
123
|
+
/** `&:is(:out-of-range, [data-outside-range])` */
|
|
118
124
|
"_outOfRange": string
|
|
119
125
|
/** `&::placeholder, &[data-placeholder]` */
|
|
120
126
|
"_placeholder": string
|
|
@@ -124,6 +130,14 @@ export interface Conditions {
|
|
|
124
130
|
"_pressed": string
|
|
125
131
|
/** `&:is([aria-selected=true], [data-selected])` */
|
|
126
132
|
"_selected": string
|
|
133
|
+
/** `&:is([aria-grabbed=true], [data-grabbed])` */
|
|
134
|
+
"_grabbed": string
|
|
135
|
+
/** `&[data-state=under-value]` */
|
|
136
|
+
"_underValue": string
|
|
137
|
+
/** `&[data-state=over-value]` */
|
|
138
|
+
"_overValue": string
|
|
139
|
+
/** `&[data-state=at-value]` */
|
|
140
|
+
"_atValue": string
|
|
127
141
|
/** `&:default` */
|
|
128
142
|
"_default": string
|
|
129
143
|
/** `&:optional` */
|
|
@@ -132,14 +146,30 @@ export interface Conditions {
|
|
|
132
146
|
"_open": string
|
|
133
147
|
/** `&:is([data-state=closed])` */
|
|
134
148
|
"_closed": string
|
|
135
|
-
/** `&:fullscreen` */
|
|
149
|
+
/** `&:is(:fullscreen, [data-fullscreen])` */
|
|
136
150
|
"_fullscreen": string
|
|
137
151
|
/** `& > [data-loading=true], &:is([data-loading], [aria-busy=true])` */
|
|
138
152
|
"_loading": string
|
|
153
|
+
/** `&:is([hidden])` */
|
|
154
|
+
"_hidden": string
|
|
155
|
+
/** `&:is([aria-current=true], [data-current])` */
|
|
156
|
+
"_current": string
|
|
139
157
|
/** `&[aria-current=page]` */
|
|
140
158
|
"_currentPage": string
|
|
141
159
|
/** `&[aria-current=step]` */
|
|
142
160
|
"_currentStep": string
|
|
161
|
+
/** `&[data-today]` */
|
|
162
|
+
"_today": string
|
|
163
|
+
/** `&[data-unavailable]` */
|
|
164
|
+
"_unavailable": string
|
|
165
|
+
/** `&[data-range-start]` */
|
|
166
|
+
"_rangeStart": string
|
|
167
|
+
/** `&[data-range-end]` */
|
|
168
|
+
"_rangeEnd": string
|
|
169
|
+
/** `&[data-now]` */
|
|
170
|
+
"_now": string
|
|
171
|
+
/** `&[data-topmost]` */
|
|
172
|
+
"_topmost": string
|
|
143
173
|
/** `@media (prefers-reduced-motion: reduce)` */
|
|
144
174
|
"_motionReduce": string
|
|
145
175
|
/** `@media (prefers-reduced-motion: no-preference)` */
|
|
@@ -178,10 +208,10 @@ export interface Conditions {
|
|
|
178
208
|
"_horizontal": string
|
|
179
209
|
/** `&[data-orientation=vertical]` */
|
|
180
210
|
"_vertical": string
|
|
211
|
+
/** `& :where(svg)` */
|
|
212
|
+
"_icon": string
|
|
181
213
|
/** `@starting-style` */
|
|
182
214
|
"_starting": string
|
|
183
|
-
/** `&:is([hidden])` */
|
|
184
|
-
"_hidden": string
|
|
185
215
|
/** `&:is([aria-collapsed=true], [data-collapsed], [data-state="collapsed"])` */
|
|
186
216
|
"_collapsed": string
|
|
187
217
|
/** `&[data-has-icon=true]` */
|
|
@@ -238,7 +268,7 @@ export interface Conditions {
|
|
|
238
268
|
"mdToXl": string
|
|
239
269
|
/** `@media screen and (min-width: 64rem) and (max-width: 79.9975rem)` */
|
|
240
270
|
"lgToXl": string
|
|
241
|
-
/**
|
|
271
|
+
/** `[data-panda-theme=next] &` */
|
|
242
272
|
"_themeNext": string
|
|
243
273
|
/** The base (=no conditions) styles to apply */
|
|
244
274
|
"base": string
|
package/types/global.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ declare module '@pandacss/dev' {
|
|
|
13
13
|
export function defineStyles(definition: SystemStyleObject): SystemStyleObject
|
|
14
14
|
export function defineGlobalStyles(definition: GlobalStyleObject): Panda.GlobalStyleObject
|
|
15
15
|
export function defineTextStyles(definition: CompositionStyles['textStyles']): Panda.TextStyles
|
|
16
|
+
export function defineAnimationStyles(definition: CompositionStyles['animationStyles']): Panda.AnimationStyles
|
|
16
17
|
export function defineLayerStyles(definition: CompositionStyles['layerStyles']): Panda.LayerStyles
|
|
17
18
|
export function definePattern<T extends PatternProperties>(config: PatternConfig<T>): Panda.PatternConfig
|
|
18
19
|
export function defineParts<T extends Parts>(parts: T): (config: Partial<Record<keyof T, SystemStyleObject>>) => Partial<Record<keyof T, SystemStyleObject>>
|
package/types/prop-type.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ export interface UtilityValues {
|
|
|
19
19
|
float: "start" | "end" | CssProperties["float"];
|
|
20
20
|
hideFrom: Tokens["breakpoints"];
|
|
21
21
|
hideBelow: Tokens["breakpoints"];
|
|
22
|
-
flexBasis: Tokens["
|
|
22
|
+
flexBasis: Tokens["sizes"] | "1/2" | "1/3" | "2/3" | "1/4" | "2/4" | "3/4" | "1/5" | "2/5" | "3/5" | "4/5" | "1/6" | "2/6" | "3/6" | "4/6" | "5/6" | "1/12" | "2/12" | "3/12" | "4/12" | "5/12" | "6/12" | "7/12" | "8/12" | "9/12" | "10/12" | "11/12" | "full";
|
|
23
23
|
flex: "1" | "auto" | "initial" | "none";
|
|
24
24
|
gridTemplateColumns: "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12";
|
|
25
25
|
gridTemplateRows: "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12";
|
|
@@ -117,6 +117,8 @@ export interface UtilityValues {
|
|
|
117
117
|
borderLeftWidth: Tokens["borderWidths"];
|
|
118
118
|
borderRightWidth: Tokens["borderWidths"];
|
|
119
119
|
borderBottomWidth: Tokens["borderWidths"];
|
|
120
|
+
borderBlockStartWidth: Tokens["borderWidths"];
|
|
121
|
+
borderBlockEndWidth: Tokens["borderWidths"];
|
|
120
122
|
borderColor: Tokens["colors"];
|
|
121
123
|
borderInlineWidth: Tokens["borderWidths"];
|
|
122
124
|
borderInlineColor: Tokens["colors"];
|
|
@@ -159,7 +161,6 @@ export interface UtilityValues {
|
|
|
159
161
|
caretColor: Tokens["colors"];
|
|
160
162
|
scrollbar: "visible" | "hidden";
|
|
161
163
|
scrollbarColor: Tokens["colors"];
|
|
162
|
-
scrollbarGutter: Tokens["spacing"];
|
|
163
164
|
scrollbarWidth: Tokens["sizes"];
|
|
164
165
|
scrollMargin: Tokens["spacing"];
|
|
165
166
|
scrollMarginLeft: Tokens["spacing"];
|
|
@@ -202,12 +203,12 @@ export interface UtilityValues {
|
|
|
202
203
|
|
|
203
204
|
|
|
204
205
|
|
|
205
|
-
type WithColorOpacityModifier<T> = T extends string ? `${T}/${string}` :
|
|
206
|
+
type WithColorOpacityModifier<T> = [T] extends [string] ? `${T}/${string}` & { __colorOpacityModifier?: true } : never
|
|
206
207
|
|
|
207
208
|
type ImportantMark = "!" | "!important"
|
|
208
209
|
type WhitespaceImportant = ` ${ImportantMark}`
|
|
209
210
|
type Important = ImportantMark | WhitespaceImportant
|
|
210
|
-
type WithImportant<T> = T extends string ? `${T}${Important}` & { __important?: true } :
|
|
211
|
+
type WithImportant<T> = [T] extends [string] ? `${T}${Important}` & { __important?: true } : never
|
|
211
212
|
|
|
212
213
|
/**
|
|
213
214
|
* Only relevant when using `strictTokens` or `strictPropertyValues` in your config.
|
package/types/selectors.d.ts
CHANGED
|
@@ -53,7 +53,7 @@ type DataAttributes =
|
|
|
53
53
|
type AttributeSelector = `&${Pseudos | DataAttributes | AriaAttributes}`
|
|
54
54
|
type ParentSelector = `${DataAttributes | AriaAttributes} &`
|
|
55
55
|
|
|
56
|
-
type AtRuleType = 'media' | 'layer' | 'container' | 'supports' | 'page'
|
|
56
|
+
type AtRuleType = 'media' | 'layer' | 'container' | 'supports' | 'page' | 'scope' | 'starting-style'
|
|
57
57
|
|
|
58
58
|
export type AnySelector = `${string}&` | `&${string}` | `@${AtRuleType}${string}`
|
|
59
59
|
export type Selectors = AttributeSelector | ParentSelector
|
package/types/static-css.d.ts
CHANGED
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
|
-
interface
|
|
2
|
+
interface ConditionOptions {
|
|
3
3
|
/**
|
|
4
|
-
* The
|
|
4
|
+
* The conditions to generate for the rule.
|
|
5
5
|
* @example ['hover', 'focus']
|
|
6
6
|
*/
|
|
7
7
|
conditions?: string[]
|
|
8
|
+
/**
|
|
9
|
+
* Whether to generate responsive styles for the rule.
|
|
10
|
+
*/
|
|
8
11
|
responsive?: boolean
|
|
9
12
|
}
|
|
10
13
|
|
|
11
|
-
export interface CssRule extends
|
|
14
|
+
export interface CssRule extends ConditionOptions {
|
|
12
15
|
/**
|
|
13
16
|
* The css properties to generate utilities for.
|
|
14
17
|
* @example ['margin', 'padding']
|
|
@@ -22,7 +25,9 @@ interface RecipeRuleVariants {
|
|
|
22
25
|
[variant: string]: boolean | string[]
|
|
23
26
|
}
|
|
24
27
|
|
|
25
|
-
export type
|
|
28
|
+
export type RecipeRuleObject = RecipeRuleVariants & ConditionOptions
|
|
29
|
+
export type RecipeRule = '*' | RecipeRuleObject
|
|
30
|
+
|
|
26
31
|
export type PatternRule = '*' | CssRule
|
|
27
32
|
|
|
28
33
|
export interface StaticCssOptions {
|