@stokelp/styled-system 2.93.0 → 2.95.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (141) hide show
  1. package/css/conditions.mjs +1 -1
  2. package/css/css.mjs +1 -1
  3. package/css/sva.mjs +9 -4
  4. package/helpers.mjs +12 -20
  5. package/jsx/create-style-context.d.ts +54 -0
  6. package/jsx/create-style-context.mjs +98 -0
  7. package/jsx/factory.mjs +14 -5
  8. package/jsx/index.d.ts +1 -0
  9. package/jsx/index.mjs +1 -0
  10. package/jsx/is-valid-prop.mjs +1 -1
  11. package/package.json +1 -1
  12. package/panda.buildinfo.json +12 -10
  13. package/patterns/aspect-ratio.d.ts +0 -1
  14. package/patterns/bleed.d.ts +0 -1
  15. package/patterns/box.d.ts +0 -1
  16. package/patterns/center.d.ts +0 -1
  17. package/patterns/circle.d.ts +0 -1
  18. package/patterns/container.d.ts +0 -1
  19. package/patterns/cq.d.ts +0 -1
  20. package/patterns/divider.d.ts +0 -1
  21. package/patterns/flex.d.ts +0 -1
  22. package/patterns/float.d.ts +0 -1
  23. package/patterns/grid-item.d.ts +0 -1
  24. package/patterns/grid.d.ts +0 -1
  25. package/patterns/grid.mjs +1 -1
  26. package/patterns/hstack.d.ts +0 -1
  27. package/patterns/hstack.mjs +1 -1
  28. package/patterns/link-overlay.d.ts +0 -1
  29. package/patterns/spacer.d.ts +0 -1
  30. package/patterns/square.d.ts +0 -1
  31. package/patterns/stack.d.ts +0 -1
  32. package/patterns/stack.mjs +1 -1
  33. package/patterns/visually-hidden.d.ts +0 -1
  34. package/patterns/vstack.d.ts +0 -1
  35. package/patterns/vstack.mjs +1 -1
  36. package/patterns/wrap.d.ts +0 -1
  37. package/patterns/wrap.mjs +1 -1
  38. package/recipes/accordion.d.ts +4 -1
  39. package/recipes/accordion.mjs +1 -0
  40. package/recipes/action-card.d.ts +4 -3
  41. package/recipes/action-card.mjs +1 -0
  42. package/recipes/alert.d.ts +4 -3
  43. package/recipes/alert.mjs +1 -0
  44. package/recipes/app-navigation-language-select.d.ts +4 -1
  45. package/recipes/app-navigation-language-select.mjs +1 -0
  46. package/recipes/app-navigation.d.ts +4 -3
  47. package/recipes/app-navigation.mjs +1 -0
  48. package/recipes/avatar-group.d.ts +3 -0
  49. package/recipes/avatar.d.ts +4 -1
  50. package/recipes/avatar.mjs +1 -0
  51. package/recipes/breadcrumb.d.ts +4 -1
  52. package/recipes/breadcrumb.mjs +1 -0
  53. package/recipes/button-filter.d.ts +3 -2
  54. package/recipes/button.d.ts +3 -2
  55. package/recipes/chat-document-message.d.ts +3 -2
  56. package/recipes/chat-message.d.ts +3 -2
  57. package/recipes/chat-profile-avatar.d.ts +3 -2
  58. package/recipes/chat-text-input.d.ts +3 -2
  59. package/recipes/chat.d.ts +4 -3
  60. package/recipes/chat.mjs +1 -0
  61. package/recipes/checkbox-card.d.ts +4 -1
  62. package/recipes/checkbox-card.mjs +1 -0
  63. package/recipes/checkbox-group.d.ts +3 -0
  64. package/recipes/checkbox.d.ts +4 -1
  65. package/recipes/checkbox.mjs +1 -0
  66. package/recipes/chip.d.ts +4 -3
  67. package/recipes/chip.mjs +1 -0
  68. package/recipes/collapsible.d.ts +4 -1
  69. package/recipes/collapsible.mjs +1 -0
  70. package/recipes/combobox.d.ts +4 -1
  71. package/recipes/combobox.mjs +1 -0
  72. package/recipes/datepicker.d.ts +4 -1
  73. package/recipes/datepicker.mjs +1 -0
  74. package/recipes/dialog.d.ts +4 -1
  75. package/recipes/dialog.mjs +1 -0
  76. package/recipes/drawer.d.ts +4 -1
  77. package/recipes/drawer.mjs +1 -0
  78. package/recipes/flag.d.ts +3 -0
  79. package/recipes/form-control.d.ts +3 -2
  80. package/recipes/form-helper-text.d.ts +3 -2
  81. package/recipes/form-label.d.ts +4 -3
  82. package/recipes/form-label.mjs +1 -0
  83. package/recipes/heading.d.ts +3 -0
  84. package/recipes/highlighted-input.d.ts +33 -0
  85. package/recipes/highlighted-input.mjs +45 -0
  86. package/recipes/icon-button.d.ts +3 -2
  87. package/recipes/icon.d.ts +3 -0
  88. package/recipes/illustration.d.ts +3 -2
  89. package/recipes/index.d.ts +2 -1
  90. package/recipes/index.mjs +2 -1
  91. package/recipes/input-addon.d.ts +3 -2
  92. package/recipes/input-group.d.ts +3 -2
  93. package/recipes/input.d.ts +3 -2
  94. package/recipes/menu.d.ts +4 -1
  95. package/recipes/menu.mjs +1 -0
  96. package/recipes/pagination.d.ts +4 -3
  97. package/recipes/pagination.mjs +1 -0
  98. package/recipes/phone-number-input.d.ts +3 -2
  99. package/recipes/popover.d.ts +4 -1
  100. package/recipes/popover.mjs +1 -0
  101. package/recipes/price-tag.d.ts +4 -1
  102. package/recipes/price-tag.mjs +1 -0
  103. package/recipes/product-card-catalog.d.ts +4 -3
  104. package/recipes/product-card-catalog.mjs +1 -0
  105. package/recipes/radio-button-group.d.ts +4 -1
  106. package/recipes/radio-button-group.mjs +1 -0
  107. package/recipes/radio-card-group.d.ts +4 -1
  108. package/recipes/radio-card-group.mjs +1 -0
  109. package/recipes/radio-group.d.ts +4 -1
  110. package/recipes/radio-group.mjs +1 -0
  111. package/recipes/select-language.d.ts +4 -1
  112. package/recipes/select-language.mjs +1 -0
  113. package/recipes/select.d.ts +4 -1
  114. package/recipes/select.mjs +1 -0
  115. package/recipes/status-tag-select.d.ts +4 -1
  116. package/recipes/status-tag-select.mjs +1 -0
  117. package/recipes/switch-card.d.ts +4 -1
  118. package/recipes/switch-card.mjs +1 -0
  119. package/recipes/switch-recipe.d.ts +4 -1
  120. package/recipes/switch-recipe.mjs +1 -0
  121. package/recipes/table-container.d.ts +3 -0
  122. package/recipes/table-empty-row.d.ts +3 -0
  123. package/recipes/table-group-title.d.ts +3 -0
  124. package/recipes/table.d.ts +4 -1
  125. package/recipes/table.mjs +1 -0
  126. package/recipes/tabs-chip.d.ts +3 -2
  127. package/recipes/tabs.d.ts +4 -1
  128. package/recipes/tabs.mjs +1 -0
  129. package/recipes/tag.d.ts +4 -3
  130. package/recipes/tag.mjs +1 -0
  131. package/recipes/text.d.ts +3 -0
  132. package/recipes/textarea.d.ts +3 -0
  133. package/recipes/tooltip.d.ts +4 -1
  134. package/recipes/tooltip.mjs +1 -0
  135. package/tokens/tokens.d.ts +1 -1
  136. package/types/composition.d.ts +83 -23
  137. package/types/conditions.d.ts +11 -7
  138. package/types/jsx.d.ts +25 -10
  139. package/types/prop-type.d.ts +10 -2
  140. package/types/style-props.d.ts +15 -4
  141. package/types/system-types.d.ts +76 -0
@@ -15,6 +15,8 @@ interface Recursive<T> {
15
15
  * -----------------------------------------------------------------------------*/
16
16
 
17
17
  type TextStyleProperty =
18
+ | 'color'
19
+ | 'direction'
18
20
  | 'font'
19
21
  | 'fontFamily'
20
22
  | 'fontFeatureSettings'
@@ -35,6 +37,7 @@ type TextStyleProperty =
35
37
  | 'fontVariantPosition'
36
38
  | 'fontVariationSettings'
37
39
  | 'fontWeight'
40
+ | 'hangingPunctuation'
38
41
  | 'hypens'
39
42
  | 'hyphenateCharacter'
40
43
  | 'hyphenateLimitChars'
@@ -43,11 +46,17 @@ type TextStyleProperty =
43
46
  | 'lineHeight'
44
47
  | 'quotes'
45
48
  | 'overflowWrap'
49
+ | 'tabSize'
50
+ | 'textAlign'
51
+ | 'textAlignLast'
46
52
  | 'textCombineUpright'
47
53
  | 'textDecoration'
48
54
  | 'textDecorationColor'
49
55
  | 'textDecorationLine'
56
+ | 'textDecorationSkip'
57
+ | 'textDecorationSkipBox'
50
58
  | 'textDecorationSkipInk'
59
+ | 'textDecorationSkipInset'
51
60
  | 'textDecorationStyle'
52
61
  | 'textDecorationThickness'
53
62
  | 'textEmphasis'
@@ -60,16 +69,21 @@ type TextStyleProperty =
60
69
  | 'textOverflow'
61
70
  | 'textRendering'
62
71
  | 'textShadow'
72
+ | 'textStroke'
73
+ | 'textStrokeColor'
74
+ | 'textStrokeWidth'
63
75
  | 'textTransform'
64
76
  | 'textUnderlineOffset'
65
77
  | 'textUnderlinePosition'
66
78
  | 'textWrap'
67
79
  | 'textWrapMode'
68
80
  | 'textWrapStyle'
81
+ | 'unicodeBidi'
69
82
  | 'verticalAlign'
70
83
  | 'whiteSpace'
71
84
  | 'wordBreak'
72
85
  | 'wordSpacing'
86
+ | 'writingMode'
73
87
 
74
88
  export type TextStyle = CompositionStyleObject<TextStyleProperty>
75
89
 
@@ -79,17 +93,11 @@ export type TextStyles = Recursive<Token<TextStyle>>
79
93
  * Layer styles
80
94
  * -----------------------------------------------------------------------------*/
81
95
 
82
- type Placement =
83
- | 'Top'
84
- | 'Right'
85
- | 'Bottom'
86
- | 'Left'
87
- | 'Inline'
88
- | 'Block'
89
- | 'InlineStart'
90
- | 'InlineEnd'
91
- | 'BlockStart'
92
- | 'BlockEnd'
96
+ type LogicalPlacement = 'Inline' | 'Block' | 'InlineStart' | 'InlineEnd' | 'BlockStart' | 'BlockEnd'
97
+
98
+ type PhysicalPlacement = 'Top' | 'Right' | 'Bottom' | 'Left'
99
+
100
+ type Placement = PhysicalPlacement | LogicalPlacement
93
101
 
94
102
  type Radius =
95
103
  | `Top${'Right' | 'Left'}`
@@ -98,20 +106,80 @@ type Radius =
98
106
  | `End${'Start' | 'End'}`
99
107
 
100
108
  type LayerStyleProperty =
109
+ | 'aspectRatio'
101
110
  | 'background'
102
111
  | 'backgroundColor'
103
112
  | 'backgroundImage'
104
- | 'borderRadius'
105
113
  | 'border'
106
- | 'borderWidth'
107
114
  | 'borderColor'
115
+ | 'borderImage'
116
+ | 'borderImageOutset'
117
+ | 'borderImageRepeat'
118
+ | 'borderImageSlice'
119
+ | 'borderImageSource'
120
+ | 'borderImageWidth'
121
+ | 'borderRadius'
108
122
  | 'borderStyle'
123
+ | 'borderWidth'
124
+ | `border${Placement}`
125
+ | `border${Placement}Color`
126
+ | `border${Placement}Style`
127
+ | `border${Placement}Width`
128
+ | 'borderRadius'
129
+ | `border${Radius}Radius`
109
130
  | 'boxShadow'
131
+ | 'boxShadowColor'
132
+ | 'clipPath'
133
+ | 'color'
134
+ | 'contain'
135
+ | 'content'
136
+ | 'contentVisibility'
137
+ | 'cursor'
138
+ | 'display'
110
139
  | 'filter'
111
140
  | 'backdropFilter'
112
- | 'transform'
113
- | 'color'
141
+ | 'height'
142
+ | 'width'
143
+ | 'minHeight'
144
+ | 'minWidth'
145
+ | 'maxHeight'
146
+ | 'maxWidth'
147
+ | `margin${Placement}`
148
+ | 'inset'
149
+ | `inset${LogicalPlacement}`
150
+ | Lowercase<PhysicalPlacement>
151
+ | 'isolation'
152
+ | 'mask'
153
+ | 'maskClip'
154
+ | 'maskComposite'
155
+ | 'maskImage'
156
+ | 'maskMode'
157
+ | 'maskOrigin'
158
+ | 'maskPosition'
159
+ | 'maskRepeat'
160
+ | 'maskSize'
161
+ | 'mixBlendMode'
162
+ | 'objectFit'
163
+ | 'objectPosition'
114
164
  | 'opacity'
165
+ | 'outline'
166
+ | 'outlineColor'
167
+ | 'outlineOffset'
168
+ | 'outlineStyle'
169
+ | 'outlineWidth'
170
+ | 'overflow'
171
+ | 'overflowX'
172
+ | 'overflowY'
173
+ | 'padding'
174
+ | `padding${Placement}`
175
+ | 'pointerEvents'
176
+ | 'position'
177
+ | 'resize'
178
+ | 'transform'
179
+ | 'transition'
180
+ | 'visibility'
181
+ | 'willChange'
182
+ | 'zIndex'
115
183
  | 'backgroundBlendMode'
116
184
  | 'backgroundAttachment'
117
185
  | 'backgroundClip'
@@ -119,14 +187,6 @@ type LayerStyleProperty =
119
187
  | 'backgroundPosition'
120
188
  | 'backgroundRepeat'
121
189
  | 'backgroundSize'
122
- | `border${Placement}`
123
- | `border${Placement}Width`
124
- | 'borderRadius'
125
- | `border${Radius}Radius`
126
- | `border${Placement}Color`
127
- | `border${Placement}Style`
128
- | 'padding'
129
- | `padding${Placement}`
130
190
 
131
191
  export type LayerStyle = CompositionStyleObject<LayerStyleProperty>
132
192
 
@@ -20,7 +20,7 @@ export interface Conditions {
20
20
  "_visited": string
21
21
  /** `&:target` */
22
22
  "_target": string
23
- /** `&:is(:read-only, [data-read-only])` */
23
+ /** `&:is(:read-only, [data-read-only], [aria-readonly=true])` */
24
24
  "_readOnly": string
25
25
  /** `&:read-write` */
26
26
  "_readWrite": string
@@ -48,7 +48,7 @@ export interface Conditions {
48
48
  "_firstLetter": string
49
49
  /** `&::first-line` */
50
50
  "_firstLine": string
51
- /** `&::marker` */
51
+ /** `&::marker, &::-webkit-details-marker` */
52
52
  "_marker": string
53
53
  /** `&::selection` */
54
54
  "_selection": string
@@ -82,7 +82,7 @@ export interface Conditions {
82
82
  "_peerFocusWithin": string
83
83
  /** `.peer:is(:focus-visible, [data-focus-visible]) ~ &` */
84
84
  "_peerFocusVisible": string
85
- /** `.peer:is(:disabled, [disabled], [data-disabled]) ~ &` */
85
+ /** `.peer:is(:disabled, [disabled], [data-disabled], [aria-disabled=true]) ~ &` */
86
86
  "_peerDisabled": string
87
87
  /** `.peer:is(:checked, [data-checked], [aria-checked=true], [data-state="checked"]) ~ &` */
88
88
  "_peerChecked": string
@@ -102,13 +102,13 @@ export interface Conditions {
102
102
  "_groupFocusWithin": string
103
103
  /** `.group:is(:focus-visible, [data-focus-visible]) &` */
104
104
  "_groupFocusVisible": string
105
- /** `.group:is(:disabled, [disabled], [data-disabled]) &` */
105
+ /** `.group:is(:disabled, [disabled], [data-disabled], [aria-disabled=true]) &` */
106
106
  "_groupDisabled": string
107
107
  /** `.group:is(:checked, [data-checked], [aria-checked=true], [data-state="checked"]) &` */
108
108
  "_groupChecked": string
109
109
  /** `.group:is([aria-expanded=true], [data-expanded], [data-state="expanded"]) &` */
110
110
  "_groupExpanded": string
111
- /** `.group:is(:invalid, [data-invalid]) &` */
111
+ /** `.group:is(:invalid, [data-invalid], [aria-invalid=true]) &` */
112
112
  "_groupInvalid": string
113
113
  /** `&:where(:indeterminate, [data-indeterminate], [aria-checked=mixed], [data-state=indeterminate])` */
114
114
  "_indeterminate": string
@@ -196,9 +196,9 @@ export interface Conditions {
196
196
  "_lessContrast": string
197
197
  /** `@media (prefers-contrast: more)` */
198
198
  "_moreContrast": string
199
- /** `[dir=ltr] &` */
199
+ /** `:where([dir=ltr], :dir(ltr)) &` */
200
200
  "_ltr": string
201
- /** `[dir=rtl] &` */
201
+ /** `:where([dir=rtl], :dir(rtl)) &` */
202
202
  "_rtl": string
203
203
  /** `&::-webkit-scrollbar` */
204
204
  "_scrollbar": string
@@ -214,6 +214,10 @@ export interface Conditions {
214
214
  "_icon": string
215
215
  /** `@starting-style` */
216
216
  "_starting": string
217
+ /** `@media (scripting: none)` */
218
+ "_noscript": string
219
+ /** `@media (inverted-colors: inverted)` */
220
+ "_invertedColors": string
217
221
  /** `&:where([aria-collapsed=true], [data-collapsed], [data-state="collapsed"])` */
218
222
  "_collapsed": string
219
223
  /** `@media screen and (min-width: 37.5rem)` */
package/types/jsx.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  /* eslint-disable */
2
- import type { ComponentPropsWithoutRef, ElementType, ElementRef, JSX, Ref } from 'react'
2
+ import type { ElementType, JSX, ComponentPropsWithRef, ComponentType, Component } from 'react'
3
3
  import type { RecipeDefinition, RecipeSelection, RecipeVariantRecord } from './recipe';
4
4
  import type { Assign, DistributiveOmit, DistributiveUnion, JsxHTMLProps, JsxStyleProps, Pretty } from './system-types';
5
5
 
@@ -7,26 +7,41 @@ interface Dict {
7
7
  [k: string]: unknown
8
8
  }
9
9
 
10
- export type ComponentProps<T extends ElementType> = DistributiveOmit<ComponentPropsWithoutRef<T>, 'ref'> & {
11
- ref?: Ref<ElementRef<T>>
10
+ export interface UnstyledProps {
11
+ /**
12
+ * Whether to remove recipe styles
13
+ */
14
+ unstyled?: boolean | undefined
12
15
  }
13
16
 
17
+ export interface AsProps {
18
+ /**
19
+ * The element to render as
20
+ */
21
+ as?: ElementType | undefined
22
+ }
23
+
24
+ export type ComponentProps<T extends ElementType> = T extends ComponentType<infer P> | Component<infer P>
25
+ ? JSX.LibraryManagedAttributes<T, P>
26
+ : ComponentPropsWithRef<T>
27
+
14
28
  export interface StyledComponent<T extends ElementType, P extends Dict = {}> {
15
- (props: JsxHTMLProps<ComponentProps<T>, Assign<JsxStyleProps, P>>): JSX.Element
16
- displayName?: string
29
+ (props: JsxHTMLProps<ComponentProps<T> & UnstyledProps & AsProps, Assign<JsxStyleProps, P>>): JSX.Element
30
+ displayName?: string | undefined
17
31
  }
18
32
 
19
33
  interface RecipeFn {
20
34
  __type: any
21
35
  }
22
36
 
23
- interface JsxFactoryOptions<TProps extends Dict> {
37
+ export interface JsxFactoryOptions<TProps extends Dict> {
24
38
  dataAttr?: boolean
25
- defaultProps?: TProps
26
- shouldForwardProp?(prop: string, variantKeys: string[]): boolean
39
+ defaultProps?: Partial<TProps>
40
+ shouldForwardProp?: (prop: string, variantKeys: string[]) => boolean
41
+ forwardProps?: string[]
27
42
  }
28
43
 
29
- export type JsxRecipeProps<T extends ElementType, P extends Dict> = JsxHTMLProps<ComponentProps<T>, P>;
44
+ export type JsxRecipeProps<T extends ElementType, P extends Dict> = JsxHTMLProps<ComponentProps<T> & UnstyledProps & AsProps, P>;
30
45
 
31
46
  export type JsxElement<T extends ElementType, P extends Dict> = T extends StyledComponent<infer A, infer B>
32
47
  ? StyledComponent<A, Pretty<DistributiveUnion<P, B>>>
@@ -47,6 +62,6 @@ export type JsxElements = {
47
62
 
48
63
  export type Styled = JsxFactory & JsxElements
49
64
 
50
- export type HTMLStyledProps<T extends ElementType> = JsxHTMLProps<ComponentProps<T>, JsxStyleProps>
65
+ export type HTMLStyledProps<T extends ElementType> = JsxHTMLProps<ComponentProps<T> & UnstyledProps & AsProps, JsxStyleProps>
51
66
 
52
67
  export type StyledVariantProps<T extends StyledComponent<any, any>> = T extends StyledComponent<any, infer Props> ? Props : never
@@ -57,6 +57,12 @@ export interface UtilityValues {
57
57
  outlineColor: Tokens["colors"];
58
58
  outline: Tokens["borders"];
59
59
  outlineOffset: Tokens["spacing"];
60
+ focusRing: "outside" | "inside" | "mixed" | "none";
61
+ focusVisibleRing: "outside" | "inside" | "mixed" | "none";
62
+ focusRingColor: Tokens["colors"];
63
+ focusRingOffset: Tokens["spacing"];
64
+ focusRingWidth: CssProperties["outlineWidth"];
65
+ focusRingStyle: CssProperties["outlineStyle"];
60
66
  divideColor: Tokens["colors"];
61
67
  divideStyle: CssProperties["borderStyle"];
62
68
  width: "auto" | 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" | "screen";
@@ -71,6 +77,7 @@ export interface UtilityValues {
71
77
  minBlockSize: "auto" | Tokens["sizes"] | "svh" | "lvh" | "dvh" | "screen" | "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";
72
78
  maxHeight: "auto" | Tokens["sizes"] | "svh" | "lvh" | "dvh" | "screen" | "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";
73
79
  maxBlockSize: "auto" | Tokens["sizes"] | "svh" | "lvh" | "dvh" | "screen" | "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";
80
+ boxSize: Tokens["sizes"];
74
81
  color: Tokens["colors"];
75
82
  fontFamily: Tokens["fonts"];
76
83
  fontSize: Tokens["fontSizes"];
@@ -87,6 +94,7 @@ export interface UtilityValues {
87
94
  background: Tokens["colors"];
88
95
  backgroundColor: Tokens["colors"];
89
96
  backgroundGradient: "to-t" | "to-tr" | "to-r" | "to-br" | "to-b" | "to-bl" | "to-l" | "to-tl";
97
+ backgroundLinear: "to-t" | "to-tr" | "to-r" | "to-br" | "to-b" | "to-bl" | "to-l" | "to-tl";
90
98
  textGradient: "to-t" | "to-tr" | "to-r" | "to-br" | "to-b" | "to-bl" | "to-l" | "to-tl";
91
99
  gradientFrom: Tokens["colors"];
92
100
  gradientTo: Tokens["colors"];
@@ -140,7 +148,8 @@ export interface UtilityValues {
140
148
  transitionTimingFunction: Tokens["easings"];
141
149
  transitionDelay: Tokens["durations"];
142
150
  transitionDuration: Tokens["durations"];
143
- transition: "all" | "common" | "background" | "colors" | "opacity" | "shadow" | "transform";
151
+ transitionProperty: "common" | "colors" | "size" | "position" | "background";
152
+ transition: "all" | "common" | "size" | "position" | "background" | "colors" | "opacity" | "shadow" | "transform";
144
153
  animation: Tokens["animations"];
145
154
  animationName: "blob" | "bounce" | "fade-in" | "fade-out" | "slide-from-top" | "slide-from-bottom" | "slide-from-left" | "slide-from-right" | "slide-to-top" | "slide-to-bottom" | "slide-to-left" | "slide-to-right" | "fadeIn" | "fadeInFromRight" | "fadeInFromLeft" | "fadeInFromBottom" | "fadeInSkew" | "fadeOut" | "fadeOutFromRight" | "fadeOutSkew" | "ping" | "pulse" | "skeleton-pulse" | "slide-in" | "slide-in-left" | "slide-in-modal" | "slide-in-top-modal" | "slide-in-right" | "slide-out" | "slide-out-left" | "slide-out-modal" | "slide-out-top-modal" | "slide-out-right" | "slideInFromBottom" | "slideOutToBottom" | "collapse-in" | "collapse-out" | "spin";
146
155
  animationTimingFunction: Tokens["easings"];
@@ -194,7 +203,6 @@ export interface UtilityValues {
194
203
  srOnly: boolean;
195
204
  debug: boolean;
196
205
  containerName: CssProperties["containerName"];
197
- boxSize: Tokens["sizes"];
198
206
  colorPalette: "black" | "current" | "transparent" | "white" | "purple" | "blue" | "grey" | "red" | "green" | "yellow" | "decorative" | "decorative.red" | "decorative.blue" | "decorative.yellow" | "decorative.purple" | "decorative.green" | "decorative.brown" | "typology" | "typology.fish" | "typology.meat" | "typology.fruit" | "typology.vegetable" | "typology.cereal" | "typology.oil" | "typology.aromatic" | "primary" | "secondary" | "error" | "success" | "warning" | "text";
199
207
  textStyle: "body.lg" | "body.md" | "body.sm" | "heading.h1" | "heading.h2" | "heading.h3" | "heading.h4" | "heading.h5" | "heading.h6";
200
208
  }
@@ -8,8 +8,7 @@ type AnyString = (string & {})
8
8
  type CssVars = `var(--${string})`
9
9
  type CssVarValue = ConditionalValue<Token | AnyString | (number & {})>
10
10
 
11
- type CssVarName = | AnyString
12
- type CssVarKeys = `--${CssVarName}`
11
+ type CssVarKeys = `--${string}` & {}
13
12
 
14
13
  export type CssVarProperties = {
15
14
  [key in CssVarKeys]?: CssVarValue
@@ -5908,7 +5907,7 @@ transitionDuration?: ConditionalValue<UtilityValues["transitionDuration"] | CssV
5908
5907
  *
5909
5908
  * @see https://developer.mozilla.org/docs/Web/CSS/transition-property
5910
5909
  */
5911
- transitionProperty?: ConditionalValue<CssProperties["transitionProperty"] | AnyString>
5910
+ transitionProperty?: ConditionalValue<UtilityValues["transitionProperty"] | CssVars | CssProperties["transitionProperty"] | AnyString>
5912
5911
  /**
5913
5912
  * The **`transition-timing-function`** CSS property sets how intermediate values are calculated for CSS properties being affected by a transition effect.
5914
5913
  *
@@ -6993,6 +6992,9 @@ bgBlendMode?: ConditionalValue<CssProperties["backgroundBlendMode"] | AnyString>
6993
6992
  */
6994
6993
  bgSize?: ConditionalValue<CssProperties["backgroundSize"] | AnyString>
6995
6994
  bgGradient?: ConditionalValue<UtilityValues["backgroundGradient"] | CssVars | AnyString>
6995
+ bgLinear?: ConditionalValue<UtilityValues["backgroundLinear"] | CssVars | AnyString>
6996
+ bgRadial?: ConditionalValue<string | number | AnyString>
6997
+ bgConic?: ConditionalValue<string | number | AnyString>
6996
6998
  /**
6997
6999
  * The **`border-radius`** CSS property rounds the corners of an element's outer border edge. You can set a single radius to make circular corners, or two radii to make elliptical corners.
6998
7000
  *
@@ -7360,13 +7362,23 @@ scrollPaddingX?: ConditionalValue<UtilityValues["scrollPaddingInline"] | CssVars
7360
7362
  hideBelow?: ConditionalValue<UtilityValues["hideBelow"] | CssVars | AnyString>
7361
7363
  spaceX?: ConditionalValue<UtilityValues["spaceX"] | CssVars | AnyString>
7362
7364
  spaceY?: ConditionalValue<UtilityValues["spaceY"] | CssVars | AnyString>
7365
+ focusRing?: ConditionalValue<UtilityValues["focusRing"] | CssVars | AnyString>
7366
+ focusVisibleRing?: ConditionalValue<UtilityValues["focusVisibleRing"] | CssVars | AnyString>
7367
+ focusRingColor?: ConditionalValue<UtilityValues["focusRingColor"] | CssVars | AnyString>
7368
+ focusRingOffset?: ConditionalValue<UtilityValues["focusRingOffset"] | CssVars | AnyString>
7369
+ focusRingWidth?: ConditionalValue<UtilityValues["focusRingWidth"] | CssVars | AnyString>
7370
+ focusRingStyle?: ConditionalValue<UtilityValues["focusRingStyle"] | CssVars | AnyString>
7363
7371
  divideX?: ConditionalValue<string | number | AnyString>
7364
7372
  divideY?: ConditionalValue<string | number | AnyString>
7365
7373
  divideColor?: ConditionalValue<UtilityValues["divideColor"] | CssVars | AnyString>
7366
7374
  divideStyle?: ConditionalValue<UtilityValues["divideStyle"] | CssVars | AnyString>
7375
+ boxSize?: ConditionalValue<UtilityValues["boxSize"] | CssVars | AnyString>
7367
7376
  fontSmoothing?: ConditionalValue<UtilityValues["fontSmoothing"] | CssVars | AnyString>
7368
7377
  truncate?: ConditionalValue<UtilityValues["truncate"] | CssVars | AnyString>
7369
7378
  backgroundGradient?: ConditionalValue<UtilityValues["backgroundGradient"] | CssVars | AnyString>
7379
+ backgroundLinear?: ConditionalValue<UtilityValues["backgroundLinear"] | CssVars | AnyString>
7380
+ backgroundRadial?: ConditionalValue<string | number | AnyString>
7381
+ backgroundConic?: ConditionalValue<string | number | AnyString>
7370
7382
  textGradient?: ConditionalValue<UtilityValues["textGradient"] | CssVars | AnyString>
7371
7383
  gradientFromPosition?: ConditionalValue<string | number | AnyString>
7372
7384
  gradientToPosition?: ConditionalValue<string | number | AnyString>
@@ -7487,7 +7499,6 @@ scrollSnapMarginLeft?: ConditionalValue<UtilityValues["scrollSnapMarginLeft"] |
7487
7499
  scrollSnapMarginRight?: ConditionalValue<UtilityValues["scrollSnapMarginRight"] | CssVars | AnyString>
7488
7500
  srOnly?: ConditionalValue<UtilityValues["srOnly"] | CssVars | AnyString>
7489
7501
  debug?: ConditionalValue<UtilityValues["debug"] | CssVars | AnyString>
7490
- boxSize?: ConditionalValue<UtilityValues["boxSize"] | CssVars | AnyString>
7491
7502
  colorPalette?: ConditionalValue<UtilityValues["colorPalette"] | CssVars | AnyString>
7492
7503
  textStyle?: ConditionalValue<UtilityValues["textStyle"] | CssVars | AnyString>
7493
7504
  }
@@ -91,19 +91,95 @@ type PositionTry =
91
91
  | DashedIdent
92
92
 
93
93
  export interface ModernCssProperties {
94
+ /**
95
+ * Defines a name for the anchor element that can be referenced by positioned elements.
96
+ */
94
97
  anchorName?: Globals | 'none' | DashedIdent | StringToMultiple<DashedIdent>
98
+
99
+ /**
100
+ * Defines the scope of anchor names within the element.
101
+ */
95
102
  anchorScope?: Globals | 'none' | 'all' | DashedIdent | StringToMultiple<DashedIdent>
103
+
104
+ /**
105
+ * Controls how form elements size themselves.
106
+ */
96
107
  fieldSizing?: Globals | 'fixed' | 'content'
108
+
109
+ /**
110
+ * Controls whether interpolation of size values should allow keywords.
111
+ */
97
112
  interpolateSize?: Globals | 'allow-keywords' | 'numeric-only'
113
+
114
+ /**
115
+ * Specifies the anchor element that this positioned element should be positioned relative to.
116
+ */
98
117
  positionAnchor?: Globals | 'auto' | DashedIdent
118
+
119
+ /**
120
+ * Specifies the area within the anchor element where this positioned element should be placed.
121
+ */
99
122
  positionArea?: Globals | 'auto' | PositionAreaAxis | `${PositionAreaAxis} ${PositionAreaAxis}` | String
123
+
124
+ /**
125
+ * Specifies the position try options for the element.
126
+ */
100
127
  positionTry?: Globals | StringToMultiple<PositionTry> | String
128
+
129
+ /**
130
+ * Specifies fallback position try options when the primary position fails.
131
+ */
101
132
  positionTryFallback?: Globals | 'none' | StringToMultiple<PositionTry> | String
133
+
134
+ /**
135
+ * Specifies the order in which position try options should be attempted.
136
+ */
102
137
  positionTryOrder?: Globals | 'normal' | 'most-width' | 'most-height' | 'most-block-size' | 'most-inline-size'
138
+
139
+ /**
140
+ * Controls when the positioned element should be visible.
141
+ */
103
142
  positionVisibility?: Globals | 'always' | 'anchors-visible' | 'no-overflow'
143
+
144
+ /**
145
+ * Controls whether text should wrap or not.
146
+ */
104
147
  textWrapMode?: Globals | 'wrap' | 'nowrap'
148
+
149
+ /**
150
+ * Controls trimming of spacing in text.
151
+ */
105
152
  textSpacingTrim?: Globals | 'normal' | 'space-all' | 'space-first' | 'trim-start'
153
+
154
+ /**
155
+ * Controls the style of text wrapping.
156
+ */
106
157
  textWrapStyle?: Globals | 'auto' | 'balance' | 'pretty' | 'stable'
158
+
159
+ /**
160
+ * Controls whether the entire element should be draggable instead of its contents.
161
+ */
162
+ WebkitUserDrag?: Globals | 'auto' | 'element' | 'none'
163
+
164
+ /**
165
+ * Specifies whether an element can be used to drag the entire app window (Electron).
166
+ */
167
+ WebkitAppRegion?: Globals | 'drag' | 'no-drag'
168
+
169
+ /**
170
+ * Sets the horizontal spacing between table borders.
171
+ */
172
+ WebkitBorderHorizontalSpacing?: Globals | String | Number
173
+
174
+ /**
175
+ * Sets the vertical spacing between table borders.
176
+ */
177
+ WebkitBorderVerticalSpacing?: Globals | String | Number
178
+
179
+ /**
180
+ * Controls the display of text content for security purposes (e.g., password fields).
181
+ */
182
+ WebkitTextSecurity?: Globals | 'none' | 'circle' | 'disc' | 'square'
107
183
  }
108
184
 
109
185
  export type CssProperty = keyof PropertiesFallback