qstd 0.2.17 → 0.2.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/block/fns.d.ts +1 -0
- package/dist/block/fns.d.ts.map +1 -1
- package/dist/block/index.d.ts +6 -2
- package/dist/block/index.d.ts.map +1 -1
- package/dist/react/index.cjs +25 -13
- package/dist/react/index.js +25 -13
- package/package.json +2 -1
- package/styled-system/css/conditions.mjs +36 -0
- package/styled-system/css/css.d.ts +22 -0
- package/styled-system/css/css.mjs +45 -0
- package/styled-system/css/cva.d.ts +6 -0
- package/styled-system/css/cva.mjs +87 -0
- package/styled-system/css/cx.d.ts +5 -0
- package/styled-system/css/cx.mjs +15 -0
- package/styled-system/css/index.d.ts +5 -0
- package/styled-system/css/index.mjs +4 -0
- package/styled-system/css/sva.d.ts +4 -0
- package/styled-system/css/sva.mjs +46 -0
- package/styled-system/helpers.mjs +328 -0
- package/styled-system/jsx/aspect-ratio.d.ts +10 -0
- package/styled-system/jsx/aspect-ratio.mjs +14 -0
- package/styled-system/jsx/bleed.d.ts +10 -0
- package/styled-system/jsx/bleed.mjs +14 -0
- package/styled-system/jsx/box.d.ts +10 -0
- package/styled-system/jsx/box.mjs +14 -0
- package/styled-system/jsx/center.d.ts +10 -0
- package/styled-system/jsx/center.mjs +14 -0
- package/styled-system/jsx/circle.d.ts +10 -0
- package/styled-system/jsx/circle.mjs +14 -0
- package/styled-system/jsx/container.d.ts +10 -0
- package/styled-system/jsx/container.mjs +14 -0
- package/styled-system/jsx/cq.d.ts +10 -0
- package/styled-system/jsx/cq.mjs +14 -0
- package/styled-system/jsx/create-style-context.d.ts +54 -0
- package/styled-system/jsx/create-style-context.mjs +98 -0
- package/styled-system/jsx/divider.d.ts +10 -0
- package/styled-system/jsx/divider.mjs +14 -0
- package/styled-system/jsx/factory-helper.mjs +22 -0
- package/styled-system/jsx/factory.d.ts +3 -0
- package/styled-system/jsx/factory.mjs +89 -0
- package/styled-system/jsx/flex.d.ts +10 -0
- package/styled-system/jsx/flex.mjs +14 -0
- package/styled-system/jsx/float.d.ts +10 -0
- package/styled-system/jsx/float.mjs +14 -0
- package/styled-system/jsx/grid-item.d.ts +10 -0
- package/styled-system/jsx/grid-item.mjs +14 -0
- package/styled-system/jsx/grid.d.ts +10 -0
- package/styled-system/jsx/grid.mjs +14 -0
- package/styled-system/jsx/hstack.d.ts +10 -0
- package/styled-system/jsx/hstack.mjs +14 -0
- package/styled-system/jsx/index.d.ts +25 -0
- package/styled-system/jsx/index.mjs +23 -0
- package/styled-system/jsx/is-valid-prop.d.ts +11 -0
- package/styled-system/jsx/is-valid-prop.mjs +17 -0
- package/styled-system/jsx/link-overlay.d.ts +10 -0
- package/styled-system/jsx/link-overlay.mjs +14 -0
- package/styled-system/jsx/spacer.d.ts +10 -0
- package/styled-system/jsx/spacer.mjs +14 -0
- package/styled-system/jsx/square.d.ts +10 -0
- package/styled-system/jsx/square.mjs +14 -0
- package/styled-system/jsx/stack.d.ts +10 -0
- package/styled-system/jsx/stack.mjs +14 -0
- package/styled-system/jsx/visually-hidden.d.ts +10 -0
- package/styled-system/jsx/visually-hidden.mjs +14 -0
- package/styled-system/jsx/vstack.d.ts +10 -0
- package/styled-system/jsx/vstack.mjs +14 -0
- package/styled-system/jsx/wrap.d.ts +10 -0
- package/styled-system/jsx/wrap.mjs +14 -0
- package/styled-system/patterns/aspect-ratio.d.ts +20 -0
- package/styled-system/patterns/aspect-ratio.mjs +38 -0
- package/styled-system/patterns/bleed.d.ts +21 -0
- package/styled-system/patterns/bleed.mjs +24 -0
- package/styled-system/patterns/box.d.ts +20 -0
- package/styled-system/patterns/box.mjs +15 -0
- package/styled-system/patterns/center.d.ts +20 -0
- package/styled-system/patterns/center.mjs +21 -0
- package/styled-system/patterns/circle.d.ts +20 -0
- package/styled-system/patterns/circle.mjs +25 -0
- package/styled-system/patterns/container.d.ts +20 -0
- package/styled-system/patterns/container.mjs +21 -0
- package/styled-system/patterns/cq.d.ts +21 -0
- package/styled-system/patterns/cq.mjs +21 -0
- package/styled-system/patterns/divider.d.ts +22 -0
- package/styled-system/patterns/divider.mjs +25 -0
- package/styled-system/patterns/flex.d.ts +26 -0
- package/styled-system/patterns/flex.mjs +26 -0
- package/styled-system/patterns/float.d.ts +23 -0
- package/styled-system/patterns/float.mjs +52 -0
- package/styled-system/patterns/grid-item.d.ts +25 -0
- package/styled-system/patterns/grid-item.mjs +25 -0
- package/styled-system/patterns/grid.d.ts +24 -0
- package/styled-system/patterns/grid.mjs +27 -0
- package/styled-system/patterns/hstack.d.ts +21 -0
- package/styled-system/patterns/hstack.mjs +24 -0
- package/styled-system/patterns/index.d.ts +21 -0
- package/styled-system/patterns/index.mjs +20 -0
- package/styled-system/patterns/link-overlay.d.ts +20 -0
- package/styled-system/patterns/link-overlay.mjs +24 -0
- package/styled-system/patterns/spacer.d.ts +20 -0
- package/styled-system/patterns/spacer.mjs +21 -0
- package/styled-system/patterns/square.d.ts +20 -0
- package/styled-system/patterns/square.mjs +24 -0
- package/styled-system/patterns/stack.d.ts +23 -0
- package/styled-system/patterns/stack.mjs +24 -0
- package/styled-system/patterns/visually-hidden.d.ts +20 -0
- package/styled-system/patterns/visually-hidden.mjs +18 -0
- package/styled-system/patterns/vstack.d.ts +21 -0
- package/styled-system/patterns/vstack.mjs +24 -0
- package/styled-system/patterns/wrap.d.ts +24 -0
- package/styled-system/patterns/wrap.mjs +25 -0
- package/styled-system/styles.css +1733 -0
- package/styled-system/tokens/index.d.ts +9 -0
- package/styled-system/tokens/index.mjs +1976 -0
- package/styled-system/tokens/tokens.d.ts +60 -0
- package/styled-system/types/composition.d.ts +224 -0
- package/styled-system/types/conditions.d.ts +348 -0
- package/styled-system/types/csstype.d.ts +21298 -0
- package/styled-system/types/global.d.ts +20 -0
- package/styled-system/types/index.d.ts +8 -0
- package/styled-system/types/jsx.d.ts +67 -0
- package/styled-system/types/parts.d.ts +8 -0
- package/styled-system/types/pattern.d.ts +78 -0
- package/styled-system/types/prop-type.d.ts +277 -0
- package/styled-system/types/recipe.d.ts +181 -0
- package/styled-system/types/selectors.d.ts +59 -0
- package/styled-system/types/static-css.d.ts +56 -0
- package/styled-system/types/style-props.d.ts +7639 -0
- package/styled-system/types/system-types.d.ts +269 -0
|
@@ -0,0 +1,269 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import type { ConditionalValue, Nested } from './conditions';
|
|
3
|
+
import type { AtRule, Globals, PropertiesFallback } from './csstype';
|
|
4
|
+
import type { SystemProperties, CssVarProperties } from './style-props';
|
|
5
|
+
|
|
6
|
+
type String = string & {}
|
|
7
|
+
type Number = number & {}
|
|
8
|
+
|
|
9
|
+
export type Pretty<T> = { [K in keyof T]: T[K] } & {}
|
|
10
|
+
|
|
11
|
+
export type DistributiveOmit<T, K extends keyof any> = T extends unknown ? Omit<T, K> : never
|
|
12
|
+
|
|
13
|
+
export type DistributiveUnion<T, U> = {
|
|
14
|
+
[K in keyof T]: K extends keyof U ? U[K] | T[K] : T[K]
|
|
15
|
+
} & DistributiveOmit<U, keyof T>
|
|
16
|
+
|
|
17
|
+
export type Assign<T, U> = {
|
|
18
|
+
[K in keyof T]: K extends keyof U ? U[K] : T[K]
|
|
19
|
+
} & U
|
|
20
|
+
|
|
21
|
+
/* -----------------------------------------------------------------------------
|
|
22
|
+
* Native css properties
|
|
23
|
+
* -----------------------------------------------------------------------------*/
|
|
24
|
+
|
|
25
|
+
type DashedIdent = `--${string}`
|
|
26
|
+
|
|
27
|
+
type StringToMultiple<T extends string> = T | `${T}, ${T}`
|
|
28
|
+
|
|
29
|
+
export type PositionAreaAxis =
|
|
30
|
+
| 'left'
|
|
31
|
+
| 'center'
|
|
32
|
+
| 'right'
|
|
33
|
+
| 'x-start'
|
|
34
|
+
| 'x-end'
|
|
35
|
+
| 'span-x-start'
|
|
36
|
+
| 'span-x-end'
|
|
37
|
+
| 'x-self-start'
|
|
38
|
+
| 'x-self-end'
|
|
39
|
+
| 'span-x-self-start'
|
|
40
|
+
| 'span-x-self-end'
|
|
41
|
+
| 'span-all'
|
|
42
|
+
| 'top'
|
|
43
|
+
| 'bottom'
|
|
44
|
+
| 'span-top'
|
|
45
|
+
| 'span-bottom'
|
|
46
|
+
| 'y-start'
|
|
47
|
+
| 'y-end'
|
|
48
|
+
| 'span-y-start'
|
|
49
|
+
| 'span-y-end'
|
|
50
|
+
| 'y-self-start'
|
|
51
|
+
| 'y-self-end'
|
|
52
|
+
| 'span-y-self-start'
|
|
53
|
+
| 'span-y-self-end'
|
|
54
|
+
| 'block-start'
|
|
55
|
+
| 'block-end'
|
|
56
|
+
| 'span-block-start'
|
|
57
|
+
| 'span-block-end'
|
|
58
|
+
| 'inline-start'
|
|
59
|
+
| 'inline-end'
|
|
60
|
+
| 'span-inline-start'
|
|
61
|
+
| 'span-inline-end'
|
|
62
|
+
| 'self-block-start'
|
|
63
|
+
| 'self-block-end'
|
|
64
|
+
| 'span-self-block-start'
|
|
65
|
+
| 'span-self-block-end'
|
|
66
|
+
| 'self-inline-start'
|
|
67
|
+
| 'self-inline-end'
|
|
68
|
+
| 'span-self-inline-start'
|
|
69
|
+
| 'span-self-inline-end'
|
|
70
|
+
| 'start'
|
|
71
|
+
| 'end'
|
|
72
|
+
| 'span-start'
|
|
73
|
+
| 'span-end'
|
|
74
|
+
| 'self-start'
|
|
75
|
+
| 'self-end'
|
|
76
|
+
| 'span-self-start'
|
|
77
|
+
| 'span-self-end'
|
|
78
|
+
|
|
79
|
+
type PositionTry =
|
|
80
|
+
| 'normal'
|
|
81
|
+
| 'flip-block'
|
|
82
|
+
| 'flip-inline'
|
|
83
|
+
| 'top'
|
|
84
|
+
| 'bottom'
|
|
85
|
+
| 'left'
|
|
86
|
+
| 'right'
|
|
87
|
+
| 'block-start'
|
|
88
|
+
| 'block-end'
|
|
89
|
+
| 'inline-start'
|
|
90
|
+
| 'inline-end'
|
|
91
|
+
| DashedIdent
|
|
92
|
+
|
|
93
|
+
export interface ModernCssProperties {
|
|
94
|
+
/**
|
|
95
|
+
* Defines a name for the anchor element that can be referenced by positioned elements.
|
|
96
|
+
*/
|
|
97
|
+
anchorName?: Globals | 'none' | DashedIdent | StringToMultiple<DashedIdent>
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Defines the scope of anchor names within the element.
|
|
101
|
+
*/
|
|
102
|
+
anchorScope?: Globals | 'none' | 'all' | DashedIdent | StringToMultiple<DashedIdent>
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Controls how form elements size themselves.
|
|
106
|
+
*/
|
|
107
|
+
fieldSizing?: Globals | 'fixed' | 'content'
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Controls whether interpolation of size values should allow keywords.
|
|
111
|
+
*/
|
|
112
|
+
interpolateSize?: Globals | 'allow-keywords' | 'numeric-only'
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Specifies the anchor element that this positioned element should be positioned relative to.
|
|
116
|
+
*/
|
|
117
|
+
positionAnchor?: Globals | 'auto' | DashedIdent
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Specifies the area within the anchor element where this positioned element should be placed.
|
|
121
|
+
*/
|
|
122
|
+
positionArea?: Globals | 'auto' | PositionAreaAxis | `${PositionAreaAxis} ${PositionAreaAxis}` | String
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* Specifies the position try options for the element.
|
|
126
|
+
*/
|
|
127
|
+
positionTry?: Globals | StringToMultiple<PositionTry> | String
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* Specifies fallback position try options when the primary position fails.
|
|
131
|
+
*/
|
|
132
|
+
positionTryFallback?: Globals | 'none' | StringToMultiple<PositionTry> | String
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* Specifies the order in which position try options should be attempted.
|
|
136
|
+
*/
|
|
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
|
+
*/
|
|
142
|
+
positionVisibility?: Globals | 'always' | 'anchors-visible' | 'no-overflow'
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* Controls whether text should wrap or not.
|
|
146
|
+
*/
|
|
147
|
+
textWrapMode?: Globals | 'wrap' | 'nowrap'
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* Controls trimming of spacing in text.
|
|
151
|
+
*/
|
|
152
|
+
textSpacingTrim?: Globals | 'normal' | 'space-all' | 'space-first' | 'trim-start'
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* Controls the style of text wrapping.
|
|
156
|
+
*/
|
|
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'
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
export type CssProperty = keyof PropertiesFallback
|
|
186
|
+
|
|
187
|
+
export interface CssProperties extends PropertiesFallback<String | Number>, CssVarProperties, ModernCssProperties {}
|
|
188
|
+
|
|
189
|
+
export interface CssKeyframes {
|
|
190
|
+
[name: string]: {
|
|
191
|
+
[time: string]: CssProperties
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
/* -----------------------------------------------------------------------------
|
|
196
|
+
* Conditional css properties
|
|
197
|
+
* -----------------------------------------------------------------------------*/
|
|
198
|
+
|
|
199
|
+
interface GenericProperties {
|
|
200
|
+
[key: string]: ConditionalValue<String | Number | boolean>
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
/* -----------------------------------------------------------------------------
|
|
204
|
+
* Native css props
|
|
205
|
+
* -----------------------------------------------------------------------------*/
|
|
206
|
+
|
|
207
|
+
export type NestedCssProperties = Nested<CssProperties>
|
|
208
|
+
|
|
209
|
+
export type SystemStyleObject = Omit<Nested<SystemProperties & CssVarProperties>, 'base'>
|
|
210
|
+
|
|
211
|
+
export interface GlobalStyleObject {
|
|
212
|
+
[selector: string]: SystemStyleObject
|
|
213
|
+
}
|
|
214
|
+
export interface ExtendableGlobalStyleObject {
|
|
215
|
+
[selector: string]: SystemStyleObject | undefined
|
|
216
|
+
extend?: GlobalStyleObject | undefined
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
/* -----------------------------------------------------------------------------
|
|
220
|
+
* Composition (text styles, layer styles)
|
|
221
|
+
* -----------------------------------------------------------------------------*/
|
|
222
|
+
|
|
223
|
+
type FilterStyleObject<P extends string> = {
|
|
224
|
+
[K in P]?: K extends keyof SystemStyleObject ? SystemStyleObject[K] : unknown
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
export type CompositionStyleObject<Property extends string> = Nested<FilterStyleObject<Property> & CssVarProperties>
|
|
228
|
+
|
|
229
|
+
/* -----------------------------------------------------------------------------
|
|
230
|
+
* Font face
|
|
231
|
+
* -----------------------------------------------------------------------------*/
|
|
232
|
+
|
|
233
|
+
export type GlobalFontfaceRule = Omit<AtRule.FontFaceFallback, 'src'> & Required<Pick<AtRule.FontFaceFallback, 'src'>>
|
|
234
|
+
|
|
235
|
+
export type FontfaceRule = Omit<GlobalFontfaceRule, 'fontFamily'>
|
|
236
|
+
|
|
237
|
+
export interface GlobalFontface {
|
|
238
|
+
[name: string]: FontfaceRule | FontfaceRule[]
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
export interface ExtendableGlobalFontface {
|
|
242
|
+
[name: string]: FontfaceRule | FontfaceRule[] | GlobalFontface | undefined
|
|
243
|
+
extend?: GlobalFontface | undefined
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
/* -----------------------------------------------------------------------------
|
|
247
|
+
* Jsx style props
|
|
248
|
+
* -----------------------------------------------------------------------------*/
|
|
249
|
+
interface WithCss {
|
|
250
|
+
css?: SystemStyleObject | SystemStyleObject[]
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
export type JsxStyleProps = SystemStyleObject & WithCss
|
|
254
|
+
|
|
255
|
+
export interface PatchedHTMLProps {
|
|
256
|
+
htmlWidth?: string | number
|
|
257
|
+
htmlHeight?: string | number
|
|
258
|
+
htmlTranslate?: 'yes' | 'no' | undefined
|
|
259
|
+
htmlContent?: string
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
export type OmittedHTMLProps = 'color' | 'translate' | 'transition' | 'width' | 'height' | 'content'
|
|
263
|
+
|
|
264
|
+
type WithHTMLProps<T> = DistributiveOmit<T, OmittedHTMLProps> & PatchedHTMLProps
|
|
265
|
+
|
|
266
|
+
export type JsxHTMLProps<T extends Record<string, any>, P extends Record<string, any> = {}> = Assign<
|
|
267
|
+
WithHTMLProps<T>,
|
|
268
|
+
P
|
|
269
|
+
>
|