@stokelp/styled-system 2.127.0 → 3.0.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 (387) hide show
  1. package/css/conditions.d.ts +7 -0
  2. package/css/conditions.js +32 -0
  3. package/css/css.d.ts +6 -6
  4. package/css/css.js +63 -0
  5. package/css/cva.d.ts +3 -4
  6. package/css/cva.js +51 -0
  7. package/css/cx.d.ts +5 -4
  8. package/css/{cx.mjs → cx.js} +5 -4
  9. package/css/first-that-works.d.ts +22 -0
  10. package/css/first-that-works.js +1 -0
  11. package/css/index.d.ts +8 -5
  12. package/css/index.js +8 -0
  13. package/css/keyframes.d.ts +5 -0
  14. package/css/keyframes.js +8 -0
  15. package/css/position-try.d.ts +5 -0
  16. package/css/position-try.js +11 -0
  17. package/css/sva.d.ts +2 -3
  18. package/css/sva.js +49 -0
  19. package/css/view-transition.d.ts +7 -0
  20. package/css/view-transition.js +18 -0
  21. package/dist/panda/buildinfo.json +20580 -0
  22. package/dist/panda/lib.json +15 -0
  23. package/dist/panda/preset.mjs +9505 -0
  24. package/helpers.d.ts +67 -0
  25. package/helpers.js +624 -0
  26. package/jsx/aspect-ratio.d.ts +5 -8
  27. package/jsx/aspect-ratio.js +11 -0
  28. package/jsx/bleed.d.ts +6 -9
  29. package/jsx/bleed.js +11 -0
  30. package/jsx/box.d.ts +6 -9
  31. package/jsx/box.js +11 -0
  32. package/jsx/center.d.ts +6 -9
  33. package/jsx/center.js +11 -0
  34. package/jsx/circle.d.ts +6 -9
  35. package/jsx/circle.js +11 -0
  36. package/jsx/container.d.ts +6 -9
  37. package/jsx/container.js +11 -0
  38. package/jsx/cq.d.ts +6 -9
  39. package/jsx/cq.js +11 -0
  40. package/jsx/create-recipe-context.d.ts +31 -0
  41. package/jsx/create-recipe-context.js +38 -0
  42. package/jsx/create-slot-recipe-context.d.ts +49 -0
  43. package/jsx/create-slot-recipe-context.js +124 -0
  44. package/jsx/divider.d.ts +6 -9
  45. package/jsx/divider.js +11 -0
  46. package/jsx/factory.d.ts +3 -3
  47. package/jsx/factory.js +91 -0
  48. package/jsx/flex.d.ts +6 -9
  49. package/jsx/flex.js +11 -0
  50. package/jsx/float.d.ts +6 -9
  51. package/jsx/float.js +11 -0
  52. package/jsx/grid-item.d.ts +6 -9
  53. package/jsx/grid-item.js +11 -0
  54. package/jsx/grid.d.ts +6 -9
  55. package/jsx/grid.js +11 -0
  56. package/jsx/helper.d.ts +34 -0
  57. package/jsx/helper.js +92 -0
  58. package/jsx/hstack.d.ts +6 -9
  59. package/jsx/hstack.js +11 -0
  60. package/jsx/index.d.ts +25 -25
  61. package/jsx/index.js +24 -0
  62. package/jsx/is-valid-prop.d.ts +5 -10
  63. package/jsx/is-valid-prop.js +12 -0
  64. package/jsx/link-overlay.d.ts +6 -9
  65. package/jsx/link-overlay.js +11 -0
  66. package/jsx/spacer.d.ts +6 -9
  67. package/jsx/spacer.js +11 -0
  68. package/jsx/square.d.ts +6 -9
  69. package/jsx/square.js +11 -0
  70. package/jsx/stack.d.ts +6 -9
  71. package/jsx/stack.js +11 -0
  72. package/jsx/visually-hidden.d.ts +6 -9
  73. package/jsx/visually-hidden.js +11 -0
  74. package/jsx/vstack.d.ts +6 -9
  75. package/jsx/vstack.js +11 -0
  76. package/jsx/wrap.d.ts +6 -9
  77. package/jsx/wrap.js +11 -0
  78. package/package.json +32 -18
  79. package/patterns/aspect-ratio.d.ts +8 -9
  80. package/patterns/aspect-ratio.js +37 -0
  81. package/patterns/bleed.d.ts +9 -10
  82. package/patterns/bleed.js +30 -0
  83. package/patterns/box.d.ts +8 -11
  84. package/patterns/box.js +16 -0
  85. package/patterns/center.d.ts +8 -9
  86. package/patterns/center.js +22 -0
  87. package/patterns/circle.d.ts +8 -9
  88. package/patterns/circle.js +26 -0
  89. package/patterns/container.d.ts +8 -11
  90. package/patterns/container.js +26 -0
  91. package/patterns/cq.d.ts +10 -10
  92. package/patterns/cq.js +24 -0
  93. package/patterns/divider.d.ts +11 -11
  94. package/patterns/divider.js +31 -0
  95. package/patterns/flex.d.ts +14 -15
  96. package/patterns/flex.js +27 -0
  97. package/patterns/float.d.ts +12 -12
  98. package/patterns/float.js +78 -0
  99. package/patterns/grid-item.d.ts +13 -14
  100. package/patterns/grid-item.js +26 -0
  101. package/patterns/grid.d.ts +13 -13
  102. package/patterns/grid.js +30 -0
  103. package/patterns/hstack.d.ts +9 -10
  104. package/patterns/hstack.js +27 -0
  105. package/patterns/index.d.ts +20 -21
  106. package/patterns/index.js +20 -0
  107. package/patterns/link-overlay.d.ts +8 -11
  108. package/patterns/link-overlay.js +25 -0
  109. package/patterns/runtime.js +25 -0
  110. package/patterns/spacer.d.ts +9 -9
  111. package/patterns/spacer.js +25 -0
  112. package/patterns/square.d.ts +8 -9
  113. package/patterns/square.js +25 -0
  114. package/patterns/stack.d.ts +11 -12
  115. package/patterns/stack.js +30 -0
  116. package/patterns/visually-hidden.d.ts +8 -11
  117. package/patterns/visually-hidden.js +19 -0
  118. package/patterns/vstack.d.ts +9 -10
  119. package/patterns/vstack.js +27 -0
  120. package/patterns/wrap.d.ts +12 -13
  121. package/patterns/wrap.js +26 -0
  122. package/recipes/accordion.d.ts +10 -26
  123. package/recipes/accordion.js +5 -0
  124. package/recipes/action-card.d.ts +9 -26
  125. package/recipes/action-card.js +5 -0
  126. package/recipes/alert.d.ts +10 -28
  127. package/recipes/alert.js +5 -0
  128. package/recipes/app-navigation-language-select.d.ts +12 -34
  129. package/recipes/app-navigation-language-select.js +5 -0
  130. package/recipes/app-navigation.d.ts +10 -28
  131. package/recipes/app-navigation.js +5 -0
  132. package/recipes/avatar-group.d.ts +8 -26
  133. package/recipes/avatar-group.js +5 -0
  134. package/recipes/avatar.d.ts +11 -30
  135. package/recipes/avatar.js +5 -0
  136. package/recipes/breadcrumb.d.ts +9 -24
  137. package/recipes/breadcrumb.js +5 -0
  138. package/recipes/button-filter.d.ts +8 -27
  139. package/recipes/button-filter.js +5 -0
  140. package/recipes/button.d.ts +10 -37
  141. package/recipes/button.js +5 -0
  142. package/recipes/chat-document-message.d.ts +8 -27
  143. package/recipes/chat-document-message.js +5 -0
  144. package/recipes/chat-message.d.ts +10 -33
  145. package/recipes/chat-message.js +5 -0
  146. package/recipes/chat-profile-avatar.d.ts +9 -29
  147. package/recipes/chat-profile-avatar.js +5 -0
  148. package/recipes/chat-text-input.d.ts +8 -27
  149. package/recipes/chat-text-input.js +5 -0
  150. package/recipes/chat.d.ts +9 -26
  151. package/recipes/chat.js +5 -0
  152. package/recipes/checkbox-card.d.ts +10 -26
  153. package/recipes/checkbox-card.js +5 -0
  154. package/recipes/checkbox-group.d.ts +7 -24
  155. package/recipes/checkbox-group.js +5 -0
  156. package/recipes/checkbox.d.ts +10 -26
  157. package/recipes/checkbox.js +5 -0
  158. package/recipes/chip.d.ts +11 -32
  159. package/recipes/chip.js +5 -0
  160. package/recipes/collapsible.d.ts +9 -24
  161. package/recipes/collapsible.js +5 -0
  162. package/recipes/combobox.d.ts +11 -27
  163. package/recipes/combobox.js +5 -0
  164. package/recipes/datepicker.d.ts +9 -24
  165. package/recipes/datepicker.js +5 -0
  166. package/recipes/dialog.d.ts +9 -24
  167. package/recipes/dialog.js +5 -0
  168. package/recipes/drawer.d.ts +10 -26
  169. package/recipes/drawer.js +5 -0
  170. package/recipes/flag.d.ts +8 -26
  171. package/recipes/flag.js +5 -0
  172. package/recipes/form-control.d.ts +8 -27
  173. package/recipes/form-control.js +5 -0
  174. package/recipes/form-helper-text.d.ts +8 -27
  175. package/recipes/form-helper-text.js +5 -0
  176. package/recipes/form-label.d.ts +10 -28
  177. package/recipes/form-label.js +5 -0
  178. package/recipes/heading.d.ts +10 -28
  179. package/recipes/heading.js +5 -0
  180. package/recipes/highlighted-input.d.ts +9 -26
  181. package/recipes/highlighted-input.js +5 -0
  182. package/recipes/icon-button.d.ts +10 -37
  183. package/recipes/icon-button.js +5 -0
  184. package/recipes/icon.d.ts +8 -26
  185. package/recipes/icon.js +5 -0
  186. package/recipes/illustration.d.ts +9 -29
  187. package/recipes/illustration.js +5 -0
  188. package/recipes/index.d.ts +62 -63
  189. package/recipes/index.js +62 -0
  190. package/recipes/input-addon.d.ts +8 -27
  191. package/recipes/input-addon.js +5 -0
  192. package/recipes/input-group.d.ts +8 -27
  193. package/recipes/input-group.js +5 -0
  194. package/recipes/input.d.ts +9 -29
  195. package/recipes/input.js +5 -0
  196. package/recipes/menu.d.ts +10 -26
  197. package/recipes/menu.js +5 -0
  198. package/recipes/mobile-navigation.d.ts +10 -28
  199. package/recipes/mobile-navigation.js +5 -0
  200. package/recipes/pagination.d.ts +9 -26
  201. package/recipes/pagination.js +5 -0
  202. package/recipes/phone-number-input.d.ts +9 -29
  203. package/recipes/phone-number-input.js +5 -0
  204. package/recipes/popover.d.ts +9 -24
  205. package/recipes/popover.js +5 -0
  206. package/recipes/price-tag.d.ts +10 -26
  207. package/recipes/price-tag.js +5 -0
  208. package/recipes/product-card-catalog.d.ts +9 -26
  209. package/recipes/product-card-catalog.js +5 -0
  210. package/recipes/radio-button-group.d.ts +10 -26
  211. package/recipes/radio-button-group.js +5 -0
  212. package/recipes/radio-card-group.d.ts +10 -26
  213. package/recipes/radio-card-group.js +5 -0
  214. package/recipes/radio-group.d.ts +10 -26
  215. package/recipes/radio-group.js +5 -0
  216. package/recipes/runtime.js +133 -0
  217. package/recipes/select-language.d.ts +10 -26
  218. package/recipes/select-language.js +5 -0
  219. package/recipes/select.d.ts +11 -27
  220. package/recipes/select.js +5 -0
  221. package/recipes/status-tag-select.d.ts +11 -30
  222. package/recipes/status-tag-select.js +5 -0
  223. package/recipes/steps.d.ts +9 -24
  224. package/recipes/steps.js +5 -0
  225. package/recipes/switch-card.d.ts +10 -26
  226. package/recipes/switch-card.js +5 -0
  227. package/recipes/switch-recipe.d.ts +10 -26
  228. package/recipes/switch-recipe.js +5 -0
  229. package/recipes/table-container.d.ts +7 -24
  230. package/recipes/table-container.js +5 -0
  231. package/recipes/table-empty-row.d.ts +7 -24
  232. package/recipes/table-empty-row.js +5 -0
  233. package/recipes/table-group-title.d.ts +8 -26
  234. package/recipes/table-group-title.js +5 -0
  235. package/recipes/table.d.ts +9 -24
  236. package/recipes/table.js +5 -0
  237. package/recipes/tabs-chip.d.ts +9 -29
  238. package/recipes/tabs-chip.js +5 -0
  239. package/recipes/tabs.d.ts +11 -30
  240. package/recipes/tabs.js +5 -0
  241. package/recipes/tag.d.ts +11 -32
  242. package/recipes/tag.js +5 -0
  243. package/recipes/text.d.ts +12 -30
  244. package/recipes/text.js +5 -0
  245. package/recipes/textarea.d.ts +7 -24
  246. package/recipes/textarea.js +5 -0
  247. package/recipes/tooltip.d.ts +9 -24
  248. package/recipes/tooltip.js +5 -0
  249. package/tokens/index.d.ts +4 -5
  250. package/tokens/index.js +18 -0
  251. package/types/index.d.ts +6 -8
  252. package/types/jsx.d.ts +37 -28
  253. package/types/pattern.d.ts +18 -70
  254. package/types/recipe.d.ts +58 -150
  255. package/types/register.d.ts +40 -0
  256. package/types/system.d.ts +1816 -0
  257. package/types/tokens.d.ts +72 -0
  258. package/css/conditions.mjs +0 -36
  259. package/css/css.mjs +0 -45
  260. package/css/cva.mjs +0 -87
  261. package/css/index.mjs +0 -4
  262. package/css/sva.mjs +0 -46
  263. package/helpers.mjs +0 -328
  264. package/jsx/aspect-ratio.mjs +0 -14
  265. package/jsx/bleed.mjs +0 -14
  266. package/jsx/box.mjs +0 -14
  267. package/jsx/center.mjs +0 -14
  268. package/jsx/circle.mjs +0 -14
  269. package/jsx/container.mjs +0 -14
  270. package/jsx/cq.mjs +0 -14
  271. package/jsx/create-style-context.d.ts +0 -54
  272. package/jsx/create-style-context.mjs +0 -118
  273. package/jsx/divider.mjs +0 -14
  274. package/jsx/factory-helper.mjs +0 -22
  275. package/jsx/factory.mjs +0 -89
  276. package/jsx/flex.mjs +0 -14
  277. package/jsx/float.mjs +0 -14
  278. package/jsx/grid-item.mjs +0 -14
  279. package/jsx/grid.mjs +0 -14
  280. package/jsx/hstack.mjs +0 -14
  281. package/jsx/index.mjs +0 -23
  282. package/jsx/is-valid-prop.mjs +0 -17
  283. package/jsx/link-overlay.mjs +0 -14
  284. package/jsx/spacer.mjs +0 -14
  285. package/jsx/square.mjs +0 -14
  286. package/jsx/stack.mjs +0 -14
  287. package/jsx/visually-hidden.mjs +0 -14
  288. package/jsx/vstack.mjs +0 -14
  289. package/jsx/wrap.mjs +0 -14
  290. package/panda.buildinfo.json +0 -471
  291. package/patterns/aspect-ratio.mjs +0 -38
  292. package/patterns/bleed.mjs +0 -24
  293. package/patterns/box.mjs +0 -15
  294. package/patterns/center.mjs +0 -21
  295. package/patterns/circle.mjs +0 -25
  296. package/patterns/container.mjs +0 -21
  297. package/patterns/cq.mjs +0 -21
  298. package/patterns/divider.mjs +0 -25
  299. package/patterns/flex.mjs +0 -26
  300. package/patterns/float.mjs +0 -52
  301. package/patterns/grid-item.mjs +0 -25
  302. package/patterns/grid.mjs +0 -27
  303. package/patterns/hstack.mjs +0 -24
  304. package/patterns/index.mjs +0 -20
  305. package/patterns/link-overlay.mjs +0 -24
  306. package/patterns/spacer.mjs +0 -25
  307. package/patterns/square.mjs +0 -24
  308. package/patterns/stack.mjs +0 -24
  309. package/patterns/visually-hidden.mjs +0 -18
  310. package/patterns/vstack.mjs +0 -24
  311. package/patterns/wrap.mjs +0 -25
  312. package/recipes/accordion.mjs +0 -57
  313. package/recipes/action-card.mjs +0 -45
  314. package/recipes/alert.mjs +0 -57
  315. package/recipes/app-navigation-language-select.mjs +0 -109
  316. package/recipes/app-navigation.mjs +0 -84
  317. package/recipes/avatar-group.mjs +0 -32
  318. package/recipes/avatar.mjs +0 -57
  319. package/recipes/breadcrumb.mjs +0 -45
  320. package/recipes/button-filter.mjs +0 -24
  321. package/recipes/button.mjs +0 -212
  322. package/recipes/chat-document-message.mjs +0 -24
  323. package/recipes/chat-message.mjs +0 -36
  324. package/recipes/chat-profile-avatar.mjs +0 -31
  325. package/recipes/chat-text-input.mjs +0 -24
  326. package/recipes/chat.mjs +0 -45
  327. package/recipes/checkbox-card.mjs +0 -73
  328. package/recipes/checkbox-group.mjs +0 -24
  329. package/recipes/checkbox.mjs +0 -57
  330. package/recipes/chip.mjs +0 -76
  331. package/recipes/collapsible.mjs +0 -45
  332. package/recipes/combobox.mjs +0 -101
  333. package/recipes/create-recipe.mjs +0 -82
  334. package/recipes/datepicker.mjs +0 -133
  335. package/recipes/dialog.mjs +0 -69
  336. package/recipes/drawer.mjs +0 -78
  337. package/recipes/flag.mjs +0 -33
  338. package/recipes/form-control.mjs +0 -24
  339. package/recipes/form-helper-text.mjs +0 -24
  340. package/recipes/form-label.mjs +0 -50
  341. package/recipes/heading.mjs +0 -41
  342. package/recipes/highlighted-input.mjs +0 -45
  343. package/recipes/icon-button.mjs +0 -233
  344. package/recipes/icon.mjs +0 -34
  345. package/recipes/illustration.mjs +0 -37
  346. package/recipes/index.mjs +0 -62
  347. package/recipes/input-addon.mjs +0 -24
  348. package/recipes/input-group.mjs +0 -24
  349. package/recipes/input.mjs +0 -30
  350. package/recipes/menu.mjs +0 -93
  351. package/recipes/mobile-navigation.mjs +0 -56
  352. package/recipes/pagination.mjs +0 -41
  353. package/recipes/phone-number-input.mjs +0 -30
  354. package/recipes/popover.mjs +0 -69
  355. package/recipes/price-tag.mjs +0 -51
  356. package/recipes/product-card-catalog.mjs +0 -73
  357. package/recipes/radio-button-group.mjs +0 -62
  358. package/recipes/radio-card-group.mjs +0 -77
  359. package/recipes/radio-group.mjs +0 -61
  360. package/recipes/select-language.mjs +0 -98
  361. package/recipes/select.mjs +0 -101
  362. package/recipes/status-tag-select.mjs +0 -108
  363. package/recipes/steps.mjs +0 -69
  364. package/recipes/switch-card.mjs +0 -69
  365. package/recipes/switch-recipe.mjs +0 -53
  366. package/recipes/table-container.mjs +0 -24
  367. package/recipes/table-empty-row.mjs +0 -24
  368. package/recipes/table-group-title.mjs +0 -32
  369. package/recipes/table.mjs +0 -61
  370. package/recipes/tabs-chip.mjs +0 -35
  371. package/recipes/tabs.mjs +0 -63
  372. package/recipes/tag.mjs +0 -61
  373. package/recipes/text.mjs +0 -41
  374. package/recipes/textarea.mjs +0 -24
  375. package/recipes/tooltip.mjs +0 -49
  376. package/tokens/index.mjs +0 -1728
  377. package/tokens/tokens.d.ts +0 -63
  378. package/types/composition.d.ts +0 -227
  379. package/types/conditions.d.ts +0 -300
  380. package/types/csstype.d.ts +0 -22570
  381. package/types/global.d.ts +0 -20
  382. package/types/parts.d.ts +0 -8
  383. package/types/prop-type.d.ts +0 -251
  384. package/types/selectors.d.ts +0 -59
  385. package/types/static-css.d.ts +0 -56
  386. package/types/style-props.d.ts +0 -8089
  387. package/types/system-types.d.ts +0 -151
@@ -1,10 +1,7 @@
1
- /* eslint-disable */
2
- import type { FunctionComponent } from 'react'
3
- import type { GridItemProperties } from '../patterns/grid-item';
4
- import type { HTMLStyledProps } from '../types/jsx';
5
- import type { DistributiveOmit } from '../types/system-types';
1
+ import type { FunctionComponent } from 'react';
2
+ import type { GridItemProperties } from '../patterns/grid-item.js';
3
+ import type { HTMLStyledProps } from '../types/jsx.js';
4
+ import type { DistributiveOmit } from '../types/system.js';
6
5
 
7
- export interface GridItemProps extends GridItemProperties, DistributiveOmit<HTMLStyledProps<'div'>, keyof GridItemProperties > {}
8
-
9
-
10
- export declare const GridItem: FunctionComponent<GridItemProps>
6
+ export interface GridItemProps extends GridItemProperties, DistributiveOmit<HTMLStyledProps<'div'>, keyof GridItemProperties> {}
7
+ export declare const GridItem: FunctionComponent<GridItemProps>;
@@ -0,0 +1,11 @@
1
+ import { createElement, forwardRef } from 'react';
2
+ import { gridItem } from '../patterns/grid-item.js';
3
+ import { splitProps } from '../helpers.js';
4
+ import { styled } from './factory.js';
5
+
6
+ export const GridItem = /* @__PURE__ */ forwardRef(function GridItem(props, ref) {
7
+ const [patternProps, restProps] = splitProps(props, gridItem.propKeys)
8
+ const styleProps = gridItem.raw(patternProps)
9
+ const mergedProps = { ref, ...styleProps, ...restProps }
10
+ return createElement(styled["div"], mergedProps)
11
+ })
package/jsx/grid.d.ts CHANGED
@@ -1,10 +1,7 @@
1
- /* eslint-disable */
2
- import type { FunctionComponent } from 'react'
3
- import type { GridProperties } from '../patterns/grid';
4
- import type { HTMLStyledProps } from '../types/jsx';
5
- import type { DistributiveOmit } from '../types/system-types';
1
+ import type { FunctionComponent } from 'react';
2
+ import type { GridProperties } from '../patterns/grid.js';
3
+ import type { HTMLStyledProps } from '../types/jsx.js';
4
+ import type { DistributiveOmit } from '../types/system.js';
6
5
 
7
- export interface GridProps extends GridProperties, DistributiveOmit<HTMLStyledProps<'div'>, keyof GridProperties > {}
8
-
9
-
10
- export declare const Grid: FunctionComponent<GridProps>
6
+ export interface GridProps extends GridProperties, DistributiveOmit<HTMLStyledProps<'div'>, keyof GridProperties> {}
7
+ export declare const Grid: FunctionComponent<GridProps>;
package/jsx/grid.js ADDED
@@ -0,0 +1,11 @@
1
+ import { createElement, forwardRef } from 'react';
2
+ import { grid } from '../patterns/grid.js';
3
+ import { splitProps } from '../helpers.js';
4
+ import { styled } from './factory.js';
5
+
6
+ export const Grid = /* @__PURE__ */ forwardRef(function Grid(props, ref) {
7
+ const [patternProps, restProps] = splitProps(props, grid.propKeys)
8
+ const styleProps = grid.raw(patternProps)
9
+ const mergedProps = { ref, ...styleProps, ...restProps }
10
+ return createElement(styled["div"], mergedProps)
11
+ })
@@ -0,0 +1,34 @@
1
+ import type { RecipeCreatorFn } from '../types/recipe.js';
2
+ import type { SystemStyleObject } from '../types/system.js';
3
+
4
+ export type Props = Record<string, unknown>;
5
+ export type ShouldForwardProp = (prop: string, variantKeys?: string[]) => boolean;
6
+ /** A `cva` or config recipe function, as the JSX runtime reads it. */
7
+ export interface JsxRecipeFn {
8
+ (props?: Props, withCompoundVariants?: boolean): string;
9
+ raw(props?: Props): SystemStyleObject;
10
+ merge(other: JsxRecipeFn, cvaFn: RecipeCreatorFn): JsxRecipeFn;
11
+ variantKeys: string[];
12
+ __cva__?: boolean;
13
+ __recipe__?: boolean;
14
+ __name__?: string;
15
+ __memoizedRaw__?: (props?: Props) => SystemStyleObject;
16
+ __getCompoundVariantClasses__?: (props: Props) => string;
17
+ }
18
+ /** Markers the factory sets on the components it creates. */
19
+ export interface StyledMarkers {
20
+ __cva__?: JsxRecipeFn;
21
+ __base__?: unknown;
22
+ __shouldForwardProps__?: ShouldForwardProp;
23
+ }
24
+ export declare const composeShouldForwardProps: (tag: StyledMarkers, shouldForwardProp: ShouldForwardProp) => ShouldForwardProp;
25
+ export declare const composeCvaFn: (cvaA: JsxRecipeFn | undefined, cvaB: JsxRecipeFn) => JsxRecipeFn;
26
+ export declare function mergeDefaultProps(defaultProps: Props, props: Props): Props;
27
+ export declare const getDisplayName: (Component: string | {
28
+ displayName?: string;
29
+ name?: string;
30
+ } | undefined) => string;
31
+ export type SplitJsxProps = [htmlProps: Props | undefined, forwardedProps: Props | undefined, variantProps: Props, propStyles: SystemStyleObject | undefined, cssStyles: SystemStyleObject | undefined, elementProps: Props | undefined];
32
+ export declare function splitJsxProps(props: Props, shouldForwardProp: (prop: string) => boolean, variantSet: Set<string>, isCssProperty: (prop: string) => boolean, skipClass?: boolean): SplitJsxProps;
33
+ export declare function serializeSplitStyles(propStyles: SystemStyleObject | undefined, cssStyles: SystemStyleObject | undefined, baseStyles?: SystemStyleObject): string;
34
+ export declare function splitStyleProps(styleProps: Props): [propStyles: SystemStyleObject | undefined, cssStyles: SystemStyleObject | undefined];
package/jsx/helper.js ADDED
@@ -0,0 +1,92 @@
1
+ import { css, cva } from '../css/index.js';
2
+
3
+ export const composeShouldForwardProps = (tag, shouldForwardProp) => {
4
+ if (!tag.__shouldForwardProps__ || !shouldForwardProp) return shouldForwardProp
5
+ return (prop) => tag.__shouldForwardProps__(prop) && shouldForwardProp(prop)
6
+ }
7
+
8
+ export const composeCvaFn = (cvaA, cvaB) => {
9
+ if (cvaA && !cvaB) return cvaA
10
+ if (!cvaA && cvaB) return cvaB
11
+ if ((cvaA.__cva__ && cvaB.__cva__) || (cvaA.__recipe__ && cvaB.__recipe__)) return cvaA.merge(cvaB, cva)
12
+ const error = new TypeError('Cannot merge cva with recipe. Please use either cva or recipe.')
13
+ TypeError.captureStackTrace?.(error)
14
+ throw error
15
+ }
16
+
17
+ // Like React's defaultProps: an explicit `undefined` keeps the default.
18
+ export function mergeDefaultProps(defaultProps, props) {
19
+ const merged = Object.assign({}, defaultProps)
20
+ for (const key in props) {
21
+ if (props[key] !== undefined) merged[key] = props[key]
22
+ }
23
+ return merged
24
+ }
25
+
26
+ export const getDisplayName = (Component) => {
27
+ if (typeof Component === 'string') return Component
28
+ return Component?.displayName || Component?.name || 'Component'
29
+ }
30
+
31
+ const htmlPropsMap = {
32
+ htmlWidth: 'width',
33
+ htmlHeight: 'height',
34
+ htmlTranslate: 'translate',
35
+ htmlContent: 'content',
36
+ }
37
+ const hasOwn = Object.prototype.hasOwnProperty
38
+
39
+ export function splitJsxProps(props, shouldForwardProp, variantSet, isCssProperty, skipClass) {
40
+ let htmlProps
41
+ let forwardedProps
42
+ let variantProps
43
+ let propStyles
44
+ let cssStyles
45
+ let elementProps
46
+ const keys = Object.keys(props)
47
+ for (let i = 0; i < keys.length; i++) {
48
+ const key = keys[i]
49
+ const value = props[key]
50
+ if (value === void 0) continue
51
+ if (key === 'className' || (skipClass && key === 'class') || key === 'as' || key === 'unstyled' || key === 'children') continue
52
+ if (hasOwn.call(htmlPropsMap, key)) {
53
+ htmlProps ||= Object.create(null)
54
+ htmlProps[htmlPropsMap[key]] = value
55
+ } else if (shouldForwardProp(key)) {
56
+ forwardedProps ||= Object.create(null)
57
+ forwardedProps[key] = value
58
+ } else if (variantSet.has(key)) {
59
+ variantProps ||= Object.create(null)
60
+ variantProps[key] = value
61
+ } else if (key === 'css') {
62
+ cssStyles = value
63
+ } else if (isCssProperty(key)) {
64
+ (propStyles ||= {})[key] = value
65
+ } else {
66
+ elementProps ||= Object.create(null)
67
+ elementProps[key] = value
68
+ }
69
+ }
70
+ return [htmlProps, forwardedProps, variantProps || {}, propStyles, cssStyles, elementProps]
71
+ }
72
+
73
+ export function serializeSplitStyles(propStyles, cssStyles, baseStyles) {
74
+ if (baseStyles !== void 0) {
75
+ return propStyles ? cssStyles !== void 0 ? css(baseStyles, propStyles, cssStyles) : css(baseStyles, propStyles) : css(baseStyles, cssStyles)
76
+ }
77
+ return propStyles ? cssStyles !== void 0 ? css(propStyles, cssStyles) : css(propStyles) : css(cssStyles)
78
+ }
79
+
80
+ export function splitStyleProps(styleProps) {
81
+ let propStyles
82
+ let cssStyles
83
+ const keys = Object.keys(styleProps)
84
+ for (let i = 0; i < keys.length; i++) {
85
+ const key = keys[i]
86
+ const value = styleProps[key]
87
+ if (value === void 0) continue
88
+ if (key === 'css') cssStyles = value
89
+ else (propStyles ||= {})[key] = value
90
+ }
91
+ return [propStyles, cssStyles]
92
+ }
package/jsx/hstack.d.ts CHANGED
@@ -1,10 +1,7 @@
1
- /* eslint-disable */
2
- import type { FunctionComponent } from 'react'
3
- import type { HstackProperties } from '../patterns/hstack';
4
- import type { HTMLStyledProps } from '../types/jsx';
5
- import type { DistributiveOmit } from '../types/system-types';
1
+ import type { FunctionComponent } from 'react';
2
+ import type { HstackProperties } from '../patterns/hstack.js';
3
+ import type { HTMLStyledProps } from '../types/jsx.js';
4
+ import type { DistributiveOmit } from '../types/system.js';
6
5
 
7
- export interface HstackProps extends HstackProperties, DistributiveOmit<HTMLStyledProps<'div'>, keyof HstackProperties > {}
8
-
9
-
10
- export declare const HStack: FunctionComponent<HstackProps>
6
+ export interface HstackProps extends HstackProperties, DistributiveOmit<HTMLStyledProps<'div'>, keyof HstackProperties> {}
7
+ export declare const HStack: FunctionComponent<HstackProps>;
package/jsx/hstack.js ADDED
@@ -0,0 +1,11 @@
1
+ import { createElement, forwardRef } from 'react';
2
+ import { hstack } from '../patterns/hstack.js';
3
+ import { splitProps } from '../helpers.js';
4
+ import { styled } from './factory.js';
5
+
6
+ export const HStack = /* @__PURE__ */ forwardRef(function HStack(props, ref) {
7
+ const [patternProps, restProps] = splitProps(props, hstack.propKeys)
8
+ const styleProps = hstack.raw(patternProps)
9
+ const mergedProps = { ref, ...styleProps, ...restProps }
10
+ return createElement(styled["div"], mergedProps)
11
+ })
package/jsx/index.d.ts CHANGED
@@ -1,25 +1,25 @@
1
- /* eslint-disable */
2
- export * from './factory';
3
- export * from './is-valid-prop';
4
- export * from './create-style-context';
5
- export * from './box';
6
- export * from './flex';
7
- export * from './stack';
8
- export * from './vstack';
9
- export * from './hstack';
10
- export * from './spacer';
11
- export * from './square';
12
- export * from './circle';
13
- export * from './center';
14
- export * from './link-overlay';
15
- export * from './aspect-ratio';
16
- export * from './grid';
17
- export * from './grid-item';
18
- export * from './wrap';
19
- export * from './container';
20
- export * from './divider';
21
- export * from './float';
22
- export * from './bleed';
23
- export * from './visually-hidden';
24
- export * from './cq';
25
- export type { HTMLStyledProps, StyledComponent } from '../types/jsx';
1
+ export * from './factory.js';
2
+ export * from './is-valid-prop.js';
3
+ export * from './create-recipe-context.js';
4
+ export * from './create-slot-recipe-context.js';
5
+ export * from './aspect-ratio.js';
6
+ export * from './bleed.js';
7
+ export * from './box.js';
8
+ export * from './center.js';
9
+ export * from './circle.js';
10
+ export * from './container.js';
11
+ export * from './cq.js';
12
+ export * from './divider.js';
13
+ export * from './flex.js';
14
+ export * from './float.js';
15
+ export * from './grid.js';
16
+ export * from './grid-item.js';
17
+ export * from './hstack.js';
18
+ export * from './link-overlay.js';
19
+ export * from './spacer.js';
20
+ export * from './square.js';
21
+ export * from './stack.js';
22
+ export * from './visually-hidden.js';
23
+ export * from './vstack.js';
24
+ export * from './wrap.js';
25
+ export { HTMLStyledProps, StyledComponent, Styled, StyledVariantProps, JsxFactoryOptions, ComponentProps, DataAttrs, AsProps } from '../types/jsx.js';
package/jsx/index.js ADDED
@@ -0,0 +1,24 @@
1
+ export * from './factory.js';
2
+ export * from './is-valid-prop.js';
3
+ export * from './create-recipe-context.js';
4
+ export * from './create-slot-recipe-context.js';
5
+ export * from './aspect-ratio.js';
6
+ export * from './bleed.js';
7
+ export * from './box.js';
8
+ export * from './center.js';
9
+ export * from './circle.js';
10
+ export * from './container.js';
11
+ export * from './cq.js';
12
+ export * from './divider.js';
13
+ export * from './flex.js';
14
+ export * from './float.js';
15
+ export * from './grid.js';
16
+ export * from './grid-item.js';
17
+ export * from './hstack.js';
18
+ export * from './link-overlay.js';
19
+ export * from './spacer.js';
20
+ export * from './square.js';
21
+ export * from './stack.js';
22
+ export * from './visually-hidden.js';
23
+ export * from './vstack.js';
24
+ export * from './wrap.js';
@@ -1,11 +1,6 @@
1
- /* eslint-disable */
2
- import type { DistributiveOmit, HTMLPandaProps, JsxStyleProps, Pretty } from '../types';
1
+ import type { DistributiveOmit, JsxStyleProps } from '../types/system.js';
3
2
 
4
- declare const isCssProperty: (value: string) => boolean;
5
-
6
- type CssPropKey = keyof JsxStyleProps
7
- type OmittedCssProps<T> = Pretty<DistributiveOmit<T, CssPropKey>>
8
-
9
- declare const splitCssProps: <T>(props: T) => [JsxStyleProps, OmittedCssProps<T>]
10
-
11
- export { isCssProperty, splitCssProps };
3
+ export type CssPropKey = keyof JsxStyleProps;
4
+ export type OmittedCssProps<T> = DistributiveOmit<T, CssPropKey>;
5
+ export declare function isCssProperty(value: string): boolean;
6
+ export declare function splitCssProps<T>(props: T): [JsxStyleProps, OmittedCssProps<T>];
@@ -0,0 +1,12 @@
1
+ import { splitProps } from '../helpers.js';
2
+
3
+ const cssPropertySet = new Set(["@/2xl","@/2xlDown","@/2xlOnly","@/2xlTo3xl","@/2xlTo4xl","@/2xlTo5xl","@/2xlTo6xl","@/2xlTo7xl","@/2xlTo8xl","@/3xl","@/3xlDown","@/3xlOnly","@/3xlTo4xl","@/3xlTo5xl","@/3xlTo6xl","@/3xlTo7xl","@/3xlTo8xl","@/4xl","@/4xlDown","@/4xlOnly","@/4xlTo5xl","@/4xlTo6xl","@/4xlTo7xl","@/4xlTo8xl","@/5xl","@/5xlDown","@/5xlOnly","@/5xlTo6xl","@/5xlTo7xl","@/5xlTo8xl","@/6xl","@/6xlDown","@/6xlOnly","@/6xlTo7xl","@/6xlTo8xl","@/7xl","@/7xlDown","@/7xlOnly","@/7xlTo8xl","@/8xl","@/8xlDown","@/8xlOnly","@/lg","@/lgDown","@/lgOnly","@/lgTo2xl","@/lgTo3xl","@/lgTo4xl","@/lgTo5xl","@/lgTo6xl","@/lgTo7xl","@/lgTo8xl","@/lgToXl","@/md","@/mdDown","@/mdOnly","@/mdTo2xl","@/mdTo3xl","@/mdTo4xl","@/mdTo5xl","@/mdTo6xl","@/mdTo7xl","@/mdTo8xl","@/mdToLg","@/mdToXl","@/sm","@/smDown","@/smOnly","@/smTo2xl","@/smTo3xl","@/smTo4xl","@/smTo5xl","@/smTo6xl","@/smTo7xl","@/smTo8xl","@/smToLg","@/smToMd","@/smToXl","@/xl","@/xlDown","@/xlOnly","@/xlTo2xl","@/xlTo3xl","@/xlTo4xl","@/xlTo5xl","@/xlTo6xl","@/xlTo7xl","@/xlTo8xl","@/xs","@/xsDown","@/xsOnly","@/xsTo2xl","@/xsTo3xl","@/xsTo4xl","@/xsTo5xl","@/xsTo6xl","@/xsTo7xl","@/xsTo8xl","@/xsToLg","@/xsToMd","@/xsToSm","@/xsToXl","WebkitAppearance","WebkitBorderBefore","WebkitBorderBeforeColor","WebkitBorderBeforeStyle","WebkitBorderBeforeWidth","WebkitBoxReflect","WebkitLineClamp","WebkitMask","WebkitMaskAttachment","WebkitMaskClip","WebkitMaskComposite","WebkitMaskImage","WebkitMaskOrigin","WebkitMaskPosition","WebkitMaskPositionX","WebkitMaskPositionY","WebkitMaskRepeat","WebkitMaskRepeatX","WebkitMaskRepeatY","WebkitMaskSize","WebkitOverflowScrolling","WebkitTapHighlightColor","WebkitTextFillColor","WebkitTextStroke","WebkitTextStrokeColor","WebkitTextStrokeWidth","WebkitTouchCallout","WebkitUserModify","WebkitUserSelect","_active","_after","_anyPointerCoarse","_anyPointerFine","_anyPointerNone","_atValue","_autofill","_backdrop","_before","_checked","_closed","_collapsed","_complete","_current","_currentPage","_currentStep","_dark","_default","_disabled","_dragging","_empty","_enabled","_even","_expanded","_file","_first","_firstLetter","_firstLine","_firstOfType","_focus","_focusVisible","_focusWithin","_fullscreen","_grabbed","_groupActive","_groupChecked","_groupDisabled","_groupExpanded","_groupFocus","_groupFocusVisible","_groupFocusWithin","_groupHover","_groupInvalid","_hidden","_highContrast","_highlighted","_horizontal","_hover","_icon","_inRange","_incomplete","_indeterminate","_inert","_invalid","_invertedColors","_landscape","_last","_lastOfType","_lessContrast","_light","_liveQuoteTheme","_loading","_ltr","_marker","_moreContrast","_motionReduce","_motionSafe","_noscript","_now","_odd","_only","_onlyOfType","_open","_optional","_osDark","_osLight","_outOfRange","_overValue","_peerActive","_peerChecked","_peerDisabled","_peerExpanded","_peerFocus","_peerFocusVisible","_peerFocusWithin","_peerHover","_peerInvalid","_peerPlaceholderShown","_placeholder","_placeholderShown","_pointerCoarse","_pointerFine","_pointerNone","_portrait","_pressed","_print","_rangeEnd","_rangeStart","_readOnly","_readWrite","_required","_rtl","_scrollbar","_scrollbarThumb","_scrollbarTrack","_selected","_selection","_starting","_target","_today","_topmost","_unavailable","_underValue","_userInvalid","_userValid","_valid","_vertical","_visited","accentColor","alignContent","alignItems","alignSelf","alignTracks","alignmentBaseline","all","anchorName","anchorScope","animation","animationComposition","animationDelay","animationDirection","animationDuration","animationFillMode","animationIterationCount","animationName","animationPlayState","animationRange","animationRangeEnd","animationRangeStart","animationState","animationTimeline","animationTimingFunction","appearance","aspectRatio","backdropBlur","backdropBrightness","backdropContrast","backdropFilter","backdropGrayscale","backdropHueRotate","backdropInvert","backdropOpacity","backdropSaturate","backdropSepia","backfaceVisibility","background","backgroundAttachment","backgroundBlendMode","backgroundClip","backgroundColor","backgroundConic","backgroundGradient","backgroundImage","backgroundLinear","backgroundOrigin","backgroundPosition","backgroundPositionX","backgroundPositionY","backgroundRadial","backgroundRepeat","backgroundSize","base","baselineShift","baselineSource","bg","bgAttachment","bgBlendMode","bgClip","bgColor","bgConic","bgGradient","bgImage","bgLinear","bgOrigin","bgPosition","bgPositionX","bgPositionY","bgRadial","bgRepeat","bgSize","blockSize","blur","border","borderBlock","borderBlockColor","borderBlockEnd","borderBlockEndColor","borderBlockEndStyle","borderBlockEndWidth","borderBlockStart","borderBlockStartColor","borderBlockStartStyle","borderBlockStartWidth","borderBlockStyle","borderBlockWidth","borderBottom","borderBottomColor","borderBottomLeftRadius","borderBottomRadius","borderBottomRightRadius","borderBottomStyle","borderBottomWidth","borderCollapse","borderColor","borderEnd","borderEndColor","borderEndEndRadius","borderEndRadius","borderEndStartRadius","borderEndWidth","borderImage","borderImageOutset","borderImageRepeat","borderImageSlice","borderImageSource","borderImageWidth","borderInline","borderInlineColor","borderInlineEnd","borderInlineEndColor","borderInlineEndStyle","borderInlineEndWidth","borderInlineStart","borderInlineStartColor","borderInlineStartStyle","borderInlineStartWidth","borderInlineStyle","borderInlineWidth","borderLeft","borderLeftColor","borderLeftRadius","borderLeftStyle","borderLeftWidth","borderRadius","borderRight","borderRightColor","borderRightRadius","borderRightStyle","borderRightWidth","borderSpacing","borderSpacingX","borderSpacingY","borderStart","borderStartColor","borderStartEndRadius","borderStartRadius","borderStartStartRadius","borderStartWidth","borderStyle","borderTop","borderTopColor","borderTopLeftRadius","borderTopRadius","borderTopRightRadius","borderTopStyle","borderTopWidth","borderWidth","borderX","borderXColor","borderXWidth","borderY","borderYColor","borderYWidth","bottom","boxAlign","boxDecorationBreak","boxDirection","boxFlex","boxFlexGroup","boxLines","boxOrdinalGroup","boxOrient","boxPack","boxShadow","boxShadowColor","boxSize","boxSizing","breakAfter","breakBefore","breakInside","brightness","captionSide","caret","caretColor","caretShape","clear","clip","clipPath","clipRule","color","colorInterpolation","colorInterpolationFilters","colorPalette","colorRendering","colorScheme","columnCount","columnFill","columnGap","columnRule","columnRuleColor","columnRuleStyle","columnRuleWidth","columnSpan","columnWidth","columns","contain","containIntrinsicBlockSize","containIntrinsicHeight","containIntrinsicInlineSize","containIntrinsicSize","containIntrinsicWidth","container","containerName","containerType","content","contentVisibility","contrast","cornerBlockEndShape","cornerBlockStartShape","cornerBottomLeftShape","cornerBottomRightShape","cornerBottomShape","cornerEndEndShape","cornerEndStartShape","cornerInlineEndShape","cornerInlineStartShape","cornerLeftShape","cornerRightShape","cornerShape","cornerStartEndShape","cornerStartStartShape","cornerTopLeftShape","cornerTopRightShape","cornerTopShape","counterIncrement","counterReset","counterSet","css","cursor","cx","cy","d","debug","direction","display","divideColor","divideStyle","divideX","divideY","dominantBaseline","dropShadow","dynamicRangeLimit","emptyCells","end","fieldSizing","fill","fillOpacity","fillRule","filter","flex","flexBasis","flexDir","flexDirection","flexFlow","flexGrow","flexShrink","flexWrap","float","floodColor","floodOpacity","focusRing","focusRingColor","focusRingOffset","focusRingStyle","focusRingWidth","focusVisibleRing","font","fontFamily","fontFeatureSettings","fontKerning","fontLanguageOverride","fontOpticalSizing","fontPalette","fontSize","fontSizeAdjust","fontSmooth","fontSmoothing","fontStretch","fontStyle","fontSynthesis","fontSynthesisPosition","fontSynthesisSmallCaps","fontSynthesisStyle","fontSynthesisWeight","fontVariant","fontVariantAlternates","fontVariantCaps","fontVariantEastAsian","fontVariantEmoji","fontVariantLigatures","fontVariantNumeric","fontVariantPosition","fontVariationSettings","fontWeight","fontWidth","forcedColorAdjust","gap","glyphOrientationVertical","gradientFrom","gradientFromPosition","gradientTo","gradientToPosition","gradientVia","gradientViaPosition","grayscale","grid","gridArea","gridAutoColumns","gridAutoFlow","gridAutoRows","gridColumn","gridColumnEnd","gridColumnGap","gridColumnStart","gridGap","gridRow","gridRowEnd","gridRowGap","gridRowStart","gridTemplate","gridTemplateAreas","gridTemplateColumns","gridTemplateRows","h","hangingPunctuation","height","hideBelow","hideFrom","hueRotate","hyphenateCharacter","hyphenateLimitChars","hyphens","imageOrientation","imageRendering","imageResolution","imeMode","initialLetter","initialLetterAlign","inlineSize","inset","insetBlock","insetBlockEnd","insetBlockStart","insetEnd","insetInline","insetInlineEnd","insetInlineStart","insetStart","insetX","insetY","interpolateSize","invert","isolation","justifyContent","justifyItems","justifySelf","justifyTracks","left","letterSpacing","lg","lgDown","lgOnly","lgToXl","lightingColor","lineBreak","lineClamp","lineHeight","lineHeightStep","listStyle","listStyleImage","listStylePosition","listStyleType","m","margin","marginBlock","marginBlockEnd","marginBlockStart","marginBottom","marginEnd","marginInline","marginInlineEnd","marginInlineStart","marginLeft","marginRight","marginStart","marginTop","marginTrim","marginX","marginY","marker","markerEnd","markerMid","markerStart","mask","maskBorder","maskBorderMode","maskBorderOutset","maskBorderRepeat","maskBorderSlice","maskBorderSource","maskBorderWidth","maskBottomFrom","maskBottomFromColor","maskBottomTo","maskBottomToColor","maskClip","maskComposite","maskConic","maskConicFrom","maskConicFromColor","maskConicTo","maskConicToColor","maskImage","maskLeftFrom","maskLeftFromColor","maskLeftTo","maskLeftToColor","maskLinear","maskLinearFrom","maskLinearFromColor","maskLinearTo","maskLinearToColor","maskMode","maskOrigin","maskPosition","maskRadial","maskRadialAt","maskRadialFrom","maskRadialFromColor","maskRadialShape","maskRadialSize","maskRadialTo","maskRadialToColor","maskRepeat","maskRightFrom","maskRightFromColor","maskRightTo","maskRightToColor","maskSize","maskTopFrom","maskTopFromColor","maskTopTo","maskTopToColor","maskType","maskXFrom","maskXFromColor","maskXTo","maskXToColor","maskYFrom","maskYFromColor","maskYTo","maskYToColor","masonryAutoFlow","mathDepth","mathShift","mathStyle","maxBlockSize","maxH","maxHeight","maxInlineSize","maxLines","maxW","maxWidth","mb","md","mdDown","mdOnly","mdToLg","mdToXl","me","minBlockSize","minH","minHeight","minInlineSize","minW","minWidth","mixBlendMode","ml","mr","ms","mt","mx","my","objectFit","objectPosition","objectViewBox","offset","offsetAnchor","offsetDistance","offsetPath","offsetPosition","offsetRotate","opacity","order","orphans","outline","outlineColor","outlineOffset","outlineStyle","outlineWidth","overflow","overflowAnchor","overflowBlock","overflowClipBox","overflowClipMargin","overflowInline","overflowWrap","overflowX","overflowY","overlay","overscrollBehavior","overscrollBehaviorBlock","overscrollBehaviorInline","overscrollBehaviorX","overscrollBehaviorY","p","padding","paddingBlock","paddingBlockEnd","paddingBlockStart","paddingBottom","paddingEnd","paddingInline","paddingInlineEnd","paddingInlineStart","paddingLeft","paddingRight","paddingStart","paddingTop","paddingX","paddingY","page","pageBreakAfter","pageBreakBefore","pageBreakInside","paintOrder","pb","pe","perspective","perspectiveOrigin","pl","placeContent","placeItems","placeSelf","pointerEvents","pos","position","positionAnchor","positionArea","positionTry","positionTryFallbacks","positionTryOrder","positionVisibility","pr","printColorAdjust","ps","pt","px","py","quotes","r","resize","right","ring","ringColor","ringOffset","ringWidth","rotate","rotateX","rotateY","rotateZ","rounded","roundedBottom","roundedBottomLeft","roundedBottomRight","roundedEnd","roundedEndEnd","roundedEndStart","roundedLeft","roundedRight","roundedStart","roundedStartEnd","roundedStartStart","roundedTop","roundedTopLeft","roundedTopRight","rowGap","rubyAlign","rubyMerge","rubyOverhang","rubyPosition","rx","ry","saturate","scale","scaleX","scaleY","scrollBehavior","scrollInitialTarget","scrollMargin","scrollMarginBlock","scrollMarginBlockEnd","scrollMarginBlockStart","scrollMarginBottom","scrollMarginInline","scrollMarginInlineEnd","scrollMarginInlineStart","scrollMarginLeft","scrollMarginRight","scrollMarginTop","scrollMarginX","scrollMarginY","scrollPadding","scrollPaddingBlock","scrollPaddingBlockEnd","scrollPaddingBlockStart","scrollPaddingBottom","scrollPaddingInline","scrollPaddingInlineEnd","scrollPaddingInlineStart","scrollPaddingLeft","scrollPaddingRight","scrollPaddingTop","scrollPaddingX","scrollPaddingY","scrollSnapAlign","scrollSnapCoordinate","scrollSnapDestination","scrollSnapMargin","scrollSnapMarginBottom","scrollSnapMarginLeft","scrollSnapMarginRight","scrollSnapMarginTop","scrollSnapPointsX","scrollSnapPointsY","scrollSnapStop","scrollSnapStrictness","scrollSnapType","scrollSnapTypeX","scrollSnapTypeY","scrollTimeline","scrollTimelineAxis","scrollTimelineName","scrollbar","scrollbarColor","scrollbarGutter","scrollbarThumb","scrollbarTrack","scrollbarWidth","sepia","shadow","shadowColor","shapeImageThreshold","shapeMargin","shapeOutside","shapeRendering","sm","smDown","smOnly","smToLg","smToMd","smToXl","spaceX","spaceY","speakAs","srOnly","start","stopColor","stopOpacity","stroke","strokeColor","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","tabSize","tableLayout","textAlign","textAlignLast","textAnchor","textAutospace","textBox","textBoxEdge","textBoxTrim","textCombineUpright","textDecoration","textDecorationColor","textDecorationLine","textDecorationSkip","textDecorationSkipInk","textDecorationStyle","textDecorationThickness","textEmphasis","textEmphasisColor","textEmphasisPosition","textEmphasisStyle","textGradient","textIndent","textJustify","textOrientation","textOverflow","textRendering","textShadow","textShadowColor","textSizeAdjust","textSpacingTrim","textStyle","textTransform","textUnderlineOffset","textUnderlinePosition","textWrap","textWrapMode","textWrapStyle","timelineScope","top","touchAction","transform","transformBox","transformOrigin","transformStyle","transition","transitionBehavior","transitionDelay","transitionDuration","transitionProperty","transitionTimingFunction","translate","translateX","translateY","translateZ","truncate","unicodeBidi","userSelect","vectorEffect","verticalAlign","viewTimeline","viewTimelineAxis","viewTimelineInset","viewTimelineName","viewTransitionClass","viewTransitionName","visibility","w","whiteSpace","whiteSpaceCollapse","widows","width","willChange","wordBreak","wordSpacing","wordWrap","writingMode","x","xl","xlDown","xlOnly","y","z","zIndex","zoom"])
4
+ const cssPropertySelectorRe = /&|@/
5
+
6
+ export function isCssProperty(value) {
7
+ return cssPropertySet.has(value) || value.startsWith("--") || cssPropertySelectorRe.test(value)
8
+ }
9
+
10
+ export function splitCssProps(props) {
11
+ return splitProps(props, isCssProperty)
12
+ }
@@ -1,10 +1,7 @@
1
- /* eslint-disable */
2
- import type { FunctionComponent } from 'react'
3
- import type { LinkOverlayProperties } from '../patterns/link-overlay';
4
- import type { HTMLStyledProps } from '../types/jsx';
5
- import type { DistributiveOmit } from '../types/system-types';
1
+ import type { FunctionComponent } from 'react';
2
+ import type { LinkOverlayProperties } from '../patterns/link-overlay.js';
3
+ import type { HTMLStyledProps } from '../types/jsx.js';
4
+ import type { DistributiveOmit } from '../types/system.js';
6
5
 
7
- export interface LinkOverlayProps extends LinkOverlayProperties, DistributiveOmit<HTMLStyledProps<'a'>, keyof LinkOverlayProperties > {}
8
-
9
-
10
- export declare const LinkOverlay: FunctionComponent<LinkOverlayProps>
6
+ export interface LinkOverlayProps extends LinkOverlayProperties, DistributiveOmit<HTMLStyledProps<'a'>, keyof LinkOverlayProperties> {}
7
+ export declare const LinkOverlay: FunctionComponent<LinkOverlayProps>;
@@ -0,0 +1,11 @@
1
+ import { createElement, forwardRef } from 'react';
2
+ import { linkOverlay } from '../patterns/link-overlay.js';
3
+ import { splitProps } from '../helpers.js';
4
+ import { styled } from './factory.js';
5
+
6
+ export const LinkOverlay = /* @__PURE__ */ forwardRef(function LinkOverlay(props, ref) {
7
+ const [patternProps, restProps] = splitProps(props, linkOverlay.propKeys)
8
+ const styleProps = linkOverlay.raw(patternProps)
9
+ const mergedProps = { ref, ...styleProps, ...restProps }
10
+ return createElement(styled["a"], mergedProps)
11
+ })
package/jsx/spacer.d.ts CHANGED
@@ -1,10 +1,7 @@
1
- /* eslint-disable */
2
- import type { FunctionComponent } from 'react'
3
- import type { SpacerProperties } from '../patterns/spacer';
4
- import type { HTMLStyledProps } from '../types/jsx';
5
- import type { DistributiveOmit } from '../types/system-types';
1
+ import type { FunctionComponent } from 'react';
2
+ import type { SpacerProperties } from '../patterns/spacer.js';
3
+ import type { HTMLStyledProps } from '../types/jsx.js';
4
+ import type { DistributiveOmit } from '../types/system.js';
6
5
 
7
- export interface SpacerProps extends SpacerProperties, DistributiveOmit<HTMLStyledProps<'div'>, keyof SpacerProperties > {}
8
-
9
-
10
- export declare const Spacer: FunctionComponent<SpacerProps>
6
+ export interface SpacerProps extends SpacerProperties, DistributiveOmit<HTMLStyledProps<'div'>, keyof SpacerProperties> {}
7
+ export declare const Spacer: FunctionComponent<SpacerProps>;
package/jsx/spacer.js ADDED
@@ -0,0 +1,11 @@
1
+ import { createElement, forwardRef } from 'react';
2
+ import { spacer } from '../patterns/spacer.js';
3
+ import { splitProps } from '../helpers.js';
4
+ import { styled } from './factory.js';
5
+
6
+ export const Spacer = /* @__PURE__ */ forwardRef(function Spacer(props, ref) {
7
+ const [patternProps, restProps] = splitProps(props, spacer.propKeys)
8
+ const styleProps = spacer.raw(patternProps)
9
+ const mergedProps = { ref, ...styleProps, ...restProps }
10
+ return createElement(styled["div"], mergedProps)
11
+ })
package/jsx/square.d.ts CHANGED
@@ -1,10 +1,7 @@
1
- /* eslint-disable */
2
- import type { FunctionComponent } from 'react'
3
- import type { SquareProperties } from '../patterns/square';
4
- import type { HTMLStyledProps } from '../types/jsx';
5
- import type { DistributiveOmit } from '../types/system-types';
1
+ import type { FunctionComponent } from 'react';
2
+ import type { SquareProperties } from '../patterns/square.js';
3
+ import type { HTMLStyledProps } from '../types/jsx.js';
4
+ import type { DistributiveOmit } from '../types/system.js';
6
5
 
7
- export interface SquareProps extends SquareProperties, DistributiveOmit<HTMLStyledProps<'div'>, keyof SquareProperties > {}
8
-
9
-
10
- export declare const Square: FunctionComponent<SquareProps>
6
+ export interface SquareProps extends SquareProperties, DistributiveOmit<HTMLStyledProps<'div'>, keyof SquareProperties> {}
7
+ export declare const Square: FunctionComponent<SquareProps>;
package/jsx/square.js ADDED
@@ -0,0 +1,11 @@
1
+ import { createElement, forwardRef } from 'react';
2
+ import { square } from '../patterns/square.js';
3
+ import { splitProps } from '../helpers.js';
4
+ import { styled } from './factory.js';
5
+
6
+ export const Square = /* @__PURE__ */ forwardRef(function Square(props, ref) {
7
+ const [patternProps, restProps] = splitProps(props, square.propKeys)
8
+ const styleProps = square.raw(patternProps)
9
+ const mergedProps = { ref, ...styleProps, ...restProps }
10
+ return createElement(styled["div"], mergedProps)
11
+ })
package/jsx/stack.d.ts CHANGED
@@ -1,10 +1,7 @@
1
- /* eslint-disable */
2
- import type { FunctionComponent } from 'react'
3
- import type { StackProperties } from '../patterns/stack';
4
- import type { HTMLStyledProps } from '../types/jsx';
5
- import type { DistributiveOmit } from '../types/system-types';
1
+ import type { FunctionComponent } from 'react';
2
+ import type { StackProperties } from '../patterns/stack.js';
3
+ import type { HTMLStyledProps } from '../types/jsx.js';
4
+ import type { DistributiveOmit } from '../types/system.js';
6
5
 
7
- export interface StackProps extends StackProperties, DistributiveOmit<HTMLStyledProps<'div'>, keyof StackProperties > {}
8
-
9
-
10
- export declare const Stack: FunctionComponent<StackProps>
6
+ export interface StackProps extends StackProperties, DistributiveOmit<HTMLStyledProps<'div'>, keyof StackProperties> {}
7
+ export declare const Stack: FunctionComponent<StackProps>;
package/jsx/stack.js ADDED
@@ -0,0 +1,11 @@
1
+ import { createElement, forwardRef } from 'react';
2
+ import { stack } from '../patterns/stack.js';
3
+ import { splitProps } from '../helpers.js';
4
+ import { styled } from './factory.js';
5
+
6
+ export const Stack = /* @__PURE__ */ forwardRef(function Stack(props, ref) {
7
+ const [patternProps, restProps] = splitProps(props, stack.propKeys)
8
+ const styleProps = stack.raw(patternProps)
9
+ const mergedProps = { ref, ...styleProps, ...restProps }
10
+ return createElement(styled["div"], mergedProps)
11
+ })
@@ -1,10 +1,7 @@
1
- /* eslint-disable */
2
- import type { FunctionComponent } from 'react'
3
- import type { VisuallyHiddenProperties } from '../patterns/visually-hidden';
4
- import type { HTMLStyledProps } from '../types/jsx';
5
- import type { DistributiveOmit } from '../types/system-types';
1
+ import type { FunctionComponent } from 'react';
2
+ import type { VisuallyHiddenProperties } from '../patterns/visually-hidden.js';
3
+ import type { HTMLStyledProps } from '../types/jsx.js';
4
+ import type { DistributiveOmit } from '../types/system.js';
6
5
 
7
- export interface VisuallyHiddenProps extends VisuallyHiddenProperties, DistributiveOmit<HTMLStyledProps<'div'>, keyof VisuallyHiddenProperties > {}
8
-
9
-
10
- export declare const VisuallyHidden: FunctionComponent<VisuallyHiddenProps>
6
+ export interface VisuallyHiddenProps extends VisuallyHiddenProperties, DistributiveOmit<HTMLStyledProps<'div'>, keyof VisuallyHiddenProperties> {}
7
+ export declare const VisuallyHidden: FunctionComponent<VisuallyHiddenProps>;
@@ -0,0 +1,11 @@
1
+ import { createElement, forwardRef } from 'react';
2
+ import { visuallyHidden } from '../patterns/visually-hidden.js';
3
+ import { splitProps } from '../helpers.js';
4
+ import { styled } from './factory.js';
5
+
6
+ export const VisuallyHidden = /* @__PURE__ */ forwardRef(function VisuallyHidden(props, ref) {
7
+ const [patternProps, restProps] = splitProps(props, visuallyHidden.propKeys)
8
+ const styleProps = visuallyHidden.raw(patternProps)
9
+ const mergedProps = { ref, ...styleProps, ...restProps }
10
+ return createElement(styled["div"], mergedProps)
11
+ })
package/jsx/vstack.d.ts CHANGED
@@ -1,10 +1,7 @@
1
- /* eslint-disable */
2
- import type { FunctionComponent } from 'react'
3
- import type { VstackProperties } from '../patterns/vstack';
4
- import type { HTMLStyledProps } from '../types/jsx';
5
- import type { DistributiveOmit } from '../types/system-types';
1
+ import type { FunctionComponent } from 'react';
2
+ import type { VstackProperties } from '../patterns/vstack.js';
3
+ import type { HTMLStyledProps } from '../types/jsx.js';
4
+ import type { DistributiveOmit } from '../types/system.js';
6
5
 
7
- export interface VstackProps extends VstackProperties, DistributiveOmit<HTMLStyledProps<'div'>, keyof VstackProperties > {}
8
-
9
-
10
- export declare const VStack: FunctionComponent<VstackProps>
6
+ export interface VstackProps extends VstackProperties, DistributiveOmit<HTMLStyledProps<'div'>, keyof VstackProperties> {}
7
+ export declare const VStack: FunctionComponent<VstackProps>;
package/jsx/vstack.js ADDED
@@ -0,0 +1,11 @@
1
+ import { createElement, forwardRef } from 'react';
2
+ import { vstack } from '../patterns/vstack.js';
3
+ import { splitProps } from '../helpers.js';
4
+ import { styled } from './factory.js';
5
+
6
+ export const VStack = /* @__PURE__ */ forwardRef(function VStack(props, ref) {
7
+ const [patternProps, restProps] = splitProps(props, vstack.propKeys)
8
+ const styleProps = vstack.raw(patternProps)
9
+ const mergedProps = { ref, ...styleProps, ...restProps }
10
+ return createElement(styled["div"], mergedProps)
11
+ })
package/jsx/wrap.d.ts CHANGED
@@ -1,10 +1,7 @@
1
- /* eslint-disable */
2
- import type { FunctionComponent } from 'react'
3
- import type { WrapProperties } from '../patterns/wrap';
4
- import type { HTMLStyledProps } from '../types/jsx';
5
- import type { DistributiveOmit } from '../types/system-types';
1
+ import type { FunctionComponent } from 'react';
2
+ import type { WrapProperties } from '../patterns/wrap.js';
3
+ import type { HTMLStyledProps } from '../types/jsx.js';
4
+ import type { DistributiveOmit } from '../types/system.js';
6
5
 
7
- export interface WrapProps extends WrapProperties, DistributiveOmit<HTMLStyledProps<'div'>, keyof WrapProperties > {}
8
-
9
-
10
- export declare const Wrap: FunctionComponent<WrapProps>
6
+ export interface WrapProps extends WrapProperties, DistributiveOmit<HTMLStyledProps<'div'>, keyof WrapProperties> {}
7
+ export declare const Wrap: FunctionComponent<WrapProps>;
package/jsx/wrap.js ADDED
@@ -0,0 +1,11 @@
1
+ import { createElement, forwardRef } from 'react';
2
+ import { wrap } from '../patterns/wrap.js';
3
+ import { splitProps } from '../helpers.js';
4
+ import { styled } from './factory.js';
5
+
6
+ export const Wrap = /* @__PURE__ */ forwardRef(function Wrap(props, ref) {
7
+ const [patternProps, restProps] = splitProps(props, wrap.propKeys)
8
+ const styleProps = wrap.raw(patternProps)
9
+ const mergedProps = { ref, ...styleProps, ...restProps }
10
+ return createElement(styled["div"], mergedProps)
11
+ })