qstd 0.2.16 → 0.2.18

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 (127) hide show
  1. package/dist/block/drawer.d.ts.map +1 -1
  2. package/dist/block/test-types.d.ts.map +1 -1
  3. package/dist/react/index.cjs +40 -25
  4. package/dist/react/index.css +20 -10
  5. package/dist/react/index.js +40 -25
  6. package/package.json +22 -20
  7. package/styled-system/css/conditions.mjs +36 -0
  8. package/styled-system/css/css.d.ts +22 -0
  9. package/styled-system/css/css.mjs +45 -0
  10. package/styled-system/css/cva.d.ts +6 -0
  11. package/styled-system/css/cva.mjs +87 -0
  12. package/styled-system/css/cx.d.ts +5 -0
  13. package/styled-system/css/cx.mjs +15 -0
  14. package/styled-system/css/index.d.ts +5 -0
  15. package/styled-system/css/index.mjs +4 -0
  16. package/styled-system/css/sva.d.ts +4 -0
  17. package/styled-system/css/sva.mjs +46 -0
  18. package/styled-system/helpers.mjs +328 -0
  19. package/styled-system/jsx/aspect-ratio.d.ts +10 -0
  20. package/styled-system/jsx/aspect-ratio.mjs +14 -0
  21. package/styled-system/jsx/bleed.d.ts +10 -0
  22. package/styled-system/jsx/bleed.mjs +14 -0
  23. package/styled-system/jsx/box.d.ts +10 -0
  24. package/styled-system/jsx/box.mjs +14 -0
  25. package/styled-system/jsx/center.d.ts +10 -0
  26. package/styled-system/jsx/center.mjs +14 -0
  27. package/styled-system/jsx/circle.d.ts +10 -0
  28. package/styled-system/jsx/circle.mjs +14 -0
  29. package/styled-system/jsx/container.d.ts +10 -0
  30. package/styled-system/jsx/container.mjs +14 -0
  31. package/styled-system/jsx/cq.d.ts +10 -0
  32. package/styled-system/jsx/cq.mjs +14 -0
  33. package/styled-system/jsx/create-style-context.d.ts +54 -0
  34. package/styled-system/jsx/create-style-context.mjs +98 -0
  35. package/styled-system/jsx/divider.d.ts +10 -0
  36. package/styled-system/jsx/divider.mjs +14 -0
  37. package/styled-system/jsx/factory-helper.mjs +22 -0
  38. package/styled-system/jsx/factory.d.ts +3 -0
  39. package/styled-system/jsx/factory.mjs +89 -0
  40. package/styled-system/jsx/flex.d.ts +10 -0
  41. package/styled-system/jsx/flex.mjs +14 -0
  42. package/styled-system/jsx/float.d.ts +10 -0
  43. package/styled-system/jsx/float.mjs +14 -0
  44. package/styled-system/jsx/grid-item.d.ts +10 -0
  45. package/styled-system/jsx/grid-item.mjs +14 -0
  46. package/styled-system/jsx/grid.d.ts +10 -0
  47. package/styled-system/jsx/grid.mjs +14 -0
  48. package/styled-system/jsx/hstack.d.ts +10 -0
  49. package/styled-system/jsx/hstack.mjs +14 -0
  50. package/styled-system/jsx/index.d.ts +25 -0
  51. package/styled-system/jsx/index.mjs +23 -0
  52. package/styled-system/jsx/is-valid-prop.d.ts +11 -0
  53. package/styled-system/jsx/is-valid-prop.mjs +17 -0
  54. package/styled-system/jsx/link-overlay.d.ts +10 -0
  55. package/styled-system/jsx/link-overlay.mjs +14 -0
  56. package/styled-system/jsx/spacer.d.ts +10 -0
  57. package/styled-system/jsx/spacer.mjs +14 -0
  58. package/styled-system/jsx/square.d.ts +10 -0
  59. package/styled-system/jsx/square.mjs +14 -0
  60. package/styled-system/jsx/stack.d.ts +10 -0
  61. package/styled-system/jsx/stack.mjs +14 -0
  62. package/styled-system/jsx/visually-hidden.d.ts +10 -0
  63. package/styled-system/jsx/visually-hidden.mjs +14 -0
  64. package/styled-system/jsx/vstack.d.ts +10 -0
  65. package/styled-system/jsx/vstack.mjs +14 -0
  66. package/styled-system/jsx/wrap.d.ts +10 -0
  67. package/styled-system/jsx/wrap.mjs +14 -0
  68. package/styled-system/patterns/aspect-ratio.d.ts +20 -0
  69. package/styled-system/patterns/aspect-ratio.mjs +38 -0
  70. package/styled-system/patterns/bleed.d.ts +21 -0
  71. package/styled-system/patterns/bleed.mjs +24 -0
  72. package/styled-system/patterns/box.d.ts +20 -0
  73. package/styled-system/patterns/box.mjs +15 -0
  74. package/styled-system/patterns/center.d.ts +20 -0
  75. package/styled-system/patterns/center.mjs +21 -0
  76. package/styled-system/patterns/circle.d.ts +20 -0
  77. package/styled-system/patterns/circle.mjs +25 -0
  78. package/styled-system/patterns/container.d.ts +20 -0
  79. package/styled-system/patterns/container.mjs +21 -0
  80. package/styled-system/patterns/cq.d.ts +21 -0
  81. package/styled-system/patterns/cq.mjs +21 -0
  82. package/styled-system/patterns/divider.d.ts +22 -0
  83. package/styled-system/patterns/divider.mjs +25 -0
  84. package/styled-system/patterns/flex.d.ts +26 -0
  85. package/styled-system/patterns/flex.mjs +26 -0
  86. package/styled-system/patterns/float.d.ts +23 -0
  87. package/styled-system/patterns/float.mjs +52 -0
  88. package/styled-system/patterns/grid-item.d.ts +25 -0
  89. package/styled-system/patterns/grid-item.mjs +25 -0
  90. package/styled-system/patterns/grid.d.ts +24 -0
  91. package/styled-system/patterns/grid.mjs +27 -0
  92. package/styled-system/patterns/hstack.d.ts +21 -0
  93. package/styled-system/patterns/hstack.mjs +24 -0
  94. package/styled-system/patterns/index.d.ts +21 -0
  95. package/styled-system/patterns/index.mjs +20 -0
  96. package/styled-system/patterns/link-overlay.d.ts +20 -0
  97. package/styled-system/patterns/link-overlay.mjs +24 -0
  98. package/styled-system/patterns/spacer.d.ts +20 -0
  99. package/styled-system/patterns/spacer.mjs +21 -0
  100. package/styled-system/patterns/square.d.ts +20 -0
  101. package/styled-system/patterns/square.mjs +24 -0
  102. package/styled-system/patterns/stack.d.ts +23 -0
  103. package/styled-system/patterns/stack.mjs +24 -0
  104. package/styled-system/patterns/visually-hidden.d.ts +20 -0
  105. package/styled-system/patterns/visually-hidden.mjs +18 -0
  106. package/styled-system/patterns/vstack.d.ts +21 -0
  107. package/styled-system/patterns/vstack.mjs +24 -0
  108. package/styled-system/patterns/wrap.d.ts +24 -0
  109. package/styled-system/patterns/wrap.mjs +25 -0
  110. package/styled-system/styles.css +1749 -0
  111. package/styled-system/tokens/index.d.ts +9 -0
  112. package/styled-system/tokens/index.mjs +1976 -0
  113. package/styled-system/tokens/tokens.d.ts +60 -0
  114. package/styled-system/types/composition.d.ts +224 -0
  115. package/styled-system/types/conditions.d.ts +348 -0
  116. package/styled-system/types/csstype.d.ts +21298 -0
  117. package/styled-system/types/global.d.ts +20 -0
  118. package/styled-system/types/index.d.ts +8 -0
  119. package/styled-system/types/jsx.d.ts +67 -0
  120. package/styled-system/types/parts.d.ts +8 -0
  121. package/styled-system/types/pattern.d.ts +78 -0
  122. package/styled-system/types/prop-type.d.ts +277 -0
  123. package/styled-system/types/recipe.d.ts +181 -0
  124. package/styled-system/types/selectors.d.ts +59 -0
  125. package/styled-system/types/static-css.d.ts +56 -0
  126. package/styled-system/types/style-props.d.ts +7639 -0
  127. 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
+ >