@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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stokelp/styled-system",
3
- "version": "2.127.0",
3
+ "version": "3.0.0",
4
4
  "description": "Stokelp UI styled-system",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -11,6 +11,7 @@
11
11
  "release:dry": "semantic-release -e semantic-release-monorepo --dry-run"
12
12
  },
13
13
  "files": [
14
+ "dist",
14
15
  "css",
15
16
  "jsx",
16
17
  "patterns",
@@ -18,45 +19,58 @@
18
19
  "tokens",
19
20
  "types",
20
21
  "styles.css",
21
- "helpers.mjs",
22
- "panda.buildinfo.json"
22
+ "helpers.js",
23
+ "helpers.d.ts"
23
24
  ],
24
25
  "exports": {
25
26
  "./css": {
26
27
  "types": "./css/index.d.ts",
27
- "require": "./css/index.mjs",
28
- "import": "./css/index.mjs"
28
+ "default": "./css/index.js"
29
29
  },
30
30
  "./jsx": {
31
31
  "types": "./jsx/index.d.ts",
32
- "require": "./jsx/index.mjs",
33
- "import": "./jsx/index.mjs"
32
+ "default": "./jsx/index.js"
34
33
  },
35
34
  "./patterns": {
36
35
  "types": "./patterns/index.d.ts",
37
- "require": "./patterns/index.mjs",
38
- "import": "./patterns/index.mjs"
36
+ "default": "./patterns/index.js"
39
37
  },
40
38
  "./recipes": {
41
39
  "types": "./recipes/index.d.ts",
42
- "require": "./recipes/index.mjs",
43
- "import": "./recipes/index.mjs"
40
+ "default": "./recipes/index.js"
44
41
  },
45
42
  "./tokens": {
46
43
  "types": "./tokens/index.d.ts",
47
- "require": "./tokens/index.mjs",
48
- "import": "./tokens/index.mjs"
44
+ "default": "./tokens/index.js"
49
45
  },
50
46
  "./types": {
51
- "types": "./types/index.d.ts",
52
- "require": "./types/index.mjs",
53
- "import": "./types/index.mjs"
47
+ "types": "./types/index.d.ts"
54
48
  },
55
49
  "./styles.css": "./styles.css",
56
- "./panda.buildinfo.json": "./panda.buildinfo.json"
50
+ "./panda/*": "./dist/panda/*",
51
+ "./css/*": {
52
+ "types": "./css/*.d.ts",
53
+ "default": "./css/*.js"
54
+ },
55
+ "./recipes/*": {
56
+ "types": "./recipes/*.d.ts",
57
+ "default": "./recipes/*.js"
58
+ },
59
+ "./patterns/*": {
60
+ "types": "./patterns/*.d.ts",
61
+ "default": "./patterns/*.js"
62
+ },
63
+ "./jsx/*": {
64
+ "types": "./jsx/*.d.ts",
65
+ "default": "./jsx/*.js"
66
+ },
67
+ "./helpers": {
68
+ "types": "./helpers.d.ts",
69
+ "default": "./helpers.js"
70
+ }
57
71
  },
58
72
  "devDependencies": {
59
- "@pandacss/dev": "^1.11.1"
73
+ "@pandacss/dev": "^2.0.0"
60
74
  },
61
75
  "peerDependencies": {
62
76
  "react": "^19.2.0"
@@ -1,20 +1,19 @@
1
- /* eslint-disable */
2
- import type { SystemStyleObject, ConditionalValue } from '../types/index';
3
- import type { Properties } from '../types/csstype';
4
- import type { SystemProperties } from '../types/style-props';
5
- import type { DistributiveOmit } from '../types/system-types';
6
- import type { Tokens } from '../tokens/index';
1
+ import type { ConditionalValue, SystemStyleObject } from '../types/system.js';
7
2
 
8
3
  export interface AspectRatioProperties {
9
- ratio?: ConditionalValue<number>
4
+ ratio?: ConditionalValue<number>
10
5
  }
11
6
 
12
- interface AspectRatioStyles extends AspectRatioProperties, DistributiveOmit<SystemStyleObject, keyof AspectRatioProperties | 'aspectRatio'> {}
7
+ type AspectRatioRestStyles = Omit<SystemStyleObject, keyof AspectRatioProperties | "aspectRatio">
8
+
9
+ interface AspectRatioStyles extends AspectRatioProperties, AspectRatioRestStyles {}
13
10
 
14
11
  interface AspectRatioPatternFn {
15
12
  (styles?: AspectRatioStyles): string
16
13
  raw: (styles?: AspectRatioStyles) => SystemStyleObject
14
+ propKeys: Array<keyof AspectRatioProperties>
17
15
  }
18
16
 
17
+ export declare function aspectRatioRaw(styles?: AspectRatioStyles): SystemStyleObject;
19
18
 
20
- export declare const aspectRatio: AspectRatioPatternFn;
19
+ export declare const aspectRatio: AspectRatioPatternFn;
@@ -0,0 +1,37 @@
1
+ import { getPatternStyles, patternFns } from './runtime.js';
2
+ import { memo } from '../helpers.js';
3
+ import { css } from '../css/index.js';
4
+
5
+ const aspectRatioConfig = { transform(props, { map }) {
6
+ const { ratio = 4 / 3, ...rest } = props;
7
+ return {
8
+ position: "relative",
9
+ _before: {
10
+ content: `""`,
11
+ display: "block",
12
+ height: "0",
13
+ paddingBottom: map(ratio, (r) => `${1 / r * 100}%`)
14
+ },
15
+ "&>*": {
16
+ display: "flex",
17
+ justifyContent: "center",
18
+ alignItems: "center",
19
+ overflow: "hidden",
20
+ position: "absolute",
21
+ inset: "0",
22
+ width: "100%",
23
+ height: "100%"
24
+ },
25
+ "&>img, &>video": { objectFit: "cover" },
26
+ ...rest
27
+ };
28
+ } }
29
+
30
+ export function aspectRatioRaw(styles) {
31
+ const s = getPatternStyles(aspectRatioConfig, styles || {})
32
+ return aspectRatioConfig.transform(s, patternFns)
33
+ }
34
+
35
+ export const aspectRatio = /* @__PURE__ */ Object.assign(/* @__PURE__ */ memo(function aspectRatio(styles = {}) {
36
+ return css(aspectRatioRaw(styles))
37
+ }), { raw: aspectRatioRaw, propKeys: ["ratio"] })
@@ -1,21 +1,20 @@
1
- /* eslint-disable */
2
- import type { SystemStyleObject, ConditionalValue } from '../types/index';
3
- import type { Properties } from '../types/csstype';
4
- import type { SystemProperties } from '../types/style-props';
5
- import type { DistributiveOmit } from '../types/system-types';
6
- import type { Tokens } from '../tokens/index';
1
+ import type { SystemProperties, SystemStyleObject } from '../types/system.js';
7
2
 
8
3
  export interface BleedProperties {
9
- inline?: SystemProperties["marginInline"]
10
- block?: SystemProperties["marginBlock"]
4
+ block?: SystemProperties["marginBlock"]
5
+ inline?: SystemProperties["marginInline"]
11
6
  }
12
7
 
13
- interface BleedStyles extends BleedProperties, DistributiveOmit<SystemStyleObject, keyof BleedProperties > {}
8
+ type BleedRestStyles = Omit<SystemStyleObject, keyof BleedProperties>
9
+
10
+ interface BleedStyles extends BleedProperties, BleedRestStyles {}
14
11
 
15
12
  interface BleedPatternFn {
16
13
  (styles?: BleedStyles): string
17
14
  raw: (styles?: BleedStyles) => SystemStyleObject
15
+ propKeys: Array<keyof BleedProperties>
18
16
  }
19
17
 
18
+ export declare function bleedRaw(styles?: BleedStyles): SystemStyleObject;
20
19
 
21
- export declare const bleed: BleedPatternFn;
20
+ export declare const bleed: BleedPatternFn;
@@ -0,0 +1,30 @@
1
+ import { getPatternStyles, patternFns } from './runtime.js';
2
+ import { memo } from '../helpers.js';
3
+ import { css } from '../css/index.js';
4
+
5
+ const bleedConfig = {
6
+ transform(props, { map, isCssUnit, isCssVar }) {
7
+ const { inline, block, ...rest } = props;
8
+ const valueFn = (v) => isCssUnit(v) || isCssVar(v) ? v : `token(spacing.${v}, ${v})`;
9
+ return {
10
+ "--bleed-x": map(inline, valueFn),
11
+ "--bleed-y": map(block, valueFn),
12
+ marginInline: "calc(var(--bleed-x, 0) * -1)",
13
+ marginBlock: "calc(var(--bleed-y, 0) * -1)",
14
+ ...rest
15
+ };
16
+ },
17
+ defaultValues: {
18
+ inline: "0",
19
+ block: "0"
20
+ }
21
+ }
22
+
23
+ export function bleedRaw(styles) {
24
+ const s = getPatternStyles(bleedConfig, styles || {})
25
+ return bleedConfig.transform(s, patternFns)
26
+ }
27
+
28
+ export const bleed = /* @__PURE__ */ Object.assign(/* @__PURE__ */ memo(function bleed(styles = {}) {
29
+ return css(bleedRaw(styles))
30
+ }), { raw: bleedRaw, propKeys: ["block","inline"] })
package/patterns/box.d.ts CHANGED
@@ -1,20 +1,17 @@
1
- /* eslint-disable */
2
- import type { SystemStyleObject, ConditionalValue } from '../types/index';
3
- import type { Properties } from '../types/csstype';
4
- import type { SystemProperties } from '../types/style-props';
5
- import type { DistributiveOmit } from '../types/system-types';
6
- import type { Tokens } from '../tokens/index';
1
+ import type { SystemStyleObject } from '../types/system.js';
7
2
 
8
- export interface BoxProperties {
9
-
10
- }
3
+ export interface BoxProperties {}
4
+
5
+ type BoxRestStyles = Omit<SystemStyleObject, keyof BoxProperties>
11
6
 
12
- interface BoxStyles extends BoxProperties, DistributiveOmit<SystemStyleObject, keyof BoxProperties > {}
7
+ interface BoxStyles extends BoxProperties, BoxRestStyles {}
13
8
 
14
9
  interface BoxPatternFn {
15
10
  (styles?: BoxStyles): string
16
11
  raw: (styles?: BoxStyles) => SystemStyleObject
12
+ propKeys: Array<keyof BoxProperties>
17
13
  }
18
14
 
15
+ export declare function boxRaw(styles?: BoxStyles): SystemStyleObject;
19
16
 
20
- export declare const box: BoxPatternFn;
17
+ export declare const box: BoxPatternFn;
@@ -0,0 +1,16 @@
1
+ import { getPatternStyles, patternFns } from './runtime.js';
2
+ import { memo } from '../helpers.js';
3
+ import { css } from '../css/index.js';
4
+
5
+ const boxConfig = { transform(props) {
6
+ return props;
7
+ } }
8
+
9
+ export function boxRaw(styles) {
10
+ const s = getPatternStyles(boxConfig, styles || {})
11
+ return boxConfig.transform(s, patternFns)
12
+ }
13
+
14
+ export const box = /* @__PURE__ */ Object.assign(/* @__PURE__ */ memo(function box(styles = {}) {
15
+ return css(boxRaw(styles))
16
+ }), { raw: boxRaw, propKeys: [] })
@@ -1,20 +1,19 @@
1
- /* eslint-disable */
2
- import type { SystemStyleObject, ConditionalValue } from '../types/index';
3
- import type { Properties } from '../types/csstype';
4
- import type { SystemProperties } from '../types/style-props';
5
- import type { DistributiveOmit } from '../types/system-types';
6
- import type { Tokens } from '../tokens/index';
1
+ import type { ConditionalValue, SystemStyleObject } from '../types/system.js';
7
2
 
8
3
  export interface CenterProperties {
9
- inline?: ConditionalValue<boolean>
4
+ inline?: ConditionalValue<boolean>
10
5
  }
11
6
 
12
- interface CenterStyles extends CenterProperties, DistributiveOmit<SystemStyleObject, keyof CenterProperties > {}
7
+ type CenterRestStyles = Omit<SystemStyleObject, keyof CenterProperties>
8
+
9
+ interface CenterStyles extends CenterProperties, CenterRestStyles {}
13
10
 
14
11
  interface CenterPatternFn {
15
12
  (styles?: CenterStyles): string
16
13
  raw: (styles?: CenterStyles) => SystemStyleObject
14
+ propKeys: Array<keyof CenterProperties>
17
15
  }
18
16
 
17
+ export declare function centerRaw(styles?: CenterStyles): SystemStyleObject;
19
18
 
20
- export declare const center: CenterPatternFn;
19
+ export declare const center: CenterPatternFn;
@@ -0,0 +1,22 @@
1
+ import { getPatternStyles, patternFns } from './runtime.js';
2
+ import { memo } from '../helpers.js';
3
+ import { css } from '../css/index.js';
4
+
5
+ const centerConfig = { transform(props) {
6
+ const { inline, ...rest } = props;
7
+ return {
8
+ display: inline ? "inline-flex" : "flex",
9
+ alignItems: "center",
10
+ justifyContent: "center",
11
+ ...rest
12
+ };
13
+ } }
14
+
15
+ export function centerRaw(styles) {
16
+ const s = getPatternStyles(centerConfig, styles || {})
17
+ return centerConfig.transform(s, patternFns)
18
+ }
19
+
20
+ export const center = /* @__PURE__ */ Object.assign(/* @__PURE__ */ memo(function center(styles = {}) {
21
+ return css(centerRaw(styles))
22
+ }), { raw: centerRaw, propKeys: ["inline"] })
@@ -1,20 +1,19 @@
1
- /* eslint-disable */
2
- import type { SystemStyleObject, ConditionalValue } from '../types/index';
3
- import type { Properties } from '../types/csstype';
4
- import type { SystemProperties } from '../types/style-props';
5
- import type { DistributiveOmit } from '../types/system-types';
6
- import type { Tokens } from '../tokens/index';
1
+ import type { SystemProperties, SystemStyleObject } from '../types/system.js';
7
2
 
8
3
  export interface CircleProperties {
9
- size?: SystemProperties["width"]
4
+ size?: SystemProperties["width"]
10
5
  }
11
6
 
12
- interface CircleStyles extends CircleProperties, DistributiveOmit<SystemStyleObject, keyof CircleProperties > {}
7
+ type CircleRestStyles = Omit<SystemStyleObject, keyof CircleProperties>
8
+
9
+ interface CircleStyles extends CircleProperties, CircleRestStyles {}
13
10
 
14
11
  interface CirclePatternFn {
15
12
  (styles?: CircleStyles): string
16
13
  raw: (styles?: CircleStyles) => SystemStyleObject
14
+ propKeys: Array<keyof CircleProperties>
17
15
  }
18
16
 
17
+ export declare function circleRaw(styles?: CircleStyles): SystemStyleObject;
19
18
 
20
- export declare const circle: CirclePatternFn;
19
+ export declare const circle: CirclePatternFn;
@@ -0,0 +1,26 @@
1
+ import { getPatternStyles, patternFns } from './runtime.js';
2
+ import { memo } from '../helpers.js';
3
+ import { css } from '../css/index.js';
4
+
5
+ const circleConfig = { transform(props) {
6
+ const { size, ...rest } = props;
7
+ return {
8
+ display: "flex",
9
+ alignItems: "center",
10
+ justifyContent: "center",
11
+ flex: "0 0 auto",
12
+ width: size,
13
+ height: size,
14
+ borderRadius: "9999px",
15
+ ...rest
16
+ };
17
+ } }
18
+
19
+ export function circleRaw(styles) {
20
+ const s = getPatternStyles(circleConfig, styles || {})
21
+ return circleConfig.transform(s, patternFns)
22
+ }
23
+
24
+ export const circle = /* @__PURE__ */ Object.assign(/* @__PURE__ */ memo(function circle(styles = {}) {
25
+ return css(circleRaw(styles))
26
+ }), { raw: circleRaw, propKeys: ["size"] })
@@ -1,20 +1,17 @@
1
- /* eslint-disable */
2
- import type { SystemStyleObject, ConditionalValue } from '../types/index';
3
- import type { Properties } from '../types/csstype';
4
- import type { SystemProperties } from '../types/style-props';
5
- import type { DistributiveOmit } from '../types/system-types';
6
- import type { Tokens } from '../tokens/index';
1
+ import type { SystemStyleObject } from '../types/system.js';
7
2
 
8
- export interface ContainerProperties {
9
-
10
- }
3
+ export interface ContainerProperties {}
4
+
5
+ type ContainerRestStyles = Omit<SystemStyleObject, keyof ContainerProperties>
11
6
 
12
- interface ContainerStyles extends ContainerProperties, DistributiveOmit<SystemStyleObject, keyof ContainerProperties > {}
7
+ interface ContainerStyles extends ContainerProperties, ContainerRestStyles {}
13
8
 
14
9
  interface ContainerPatternFn {
15
10
  (styles?: ContainerStyles): string
16
11
  raw: (styles?: ContainerStyles) => SystemStyleObject
12
+ propKeys: Array<keyof ContainerProperties>
17
13
  }
18
14
 
15
+ export declare function containerRaw(styles?: ContainerStyles): SystemStyleObject;
19
16
 
20
- export declare const container: ContainerPatternFn;
17
+ export declare const container: ContainerPatternFn;
@@ -0,0 +1,26 @@
1
+ import { getPatternStyles, patternFns } from './runtime.js';
2
+ import { memo } from '../helpers.js';
3
+ import { css } from '../css/index.js';
4
+
5
+ const containerConfig = { transform(props) {
6
+ return {
7
+ position: "relative",
8
+ maxWidth: "8xl",
9
+ mx: "auto",
10
+ px: {
11
+ base: "4",
12
+ md: "6",
13
+ lg: "8"
14
+ },
15
+ ...props
16
+ };
17
+ } }
18
+
19
+ export function containerRaw(styles) {
20
+ const s = getPatternStyles(containerConfig, styles || {})
21
+ return containerConfig.transform(s, patternFns)
22
+ }
23
+
24
+ export const container = /* @__PURE__ */ Object.assign(/* @__PURE__ */ memo(function container(styles = {}) {
25
+ return css(containerRaw(styles))
26
+ }), { raw: containerRaw, propKeys: [] })
package/patterns/cq.d.ts CHANGED
@@ -1,21 +1,21 @@
1
- /* eslint-disable */
2
- import type { SystemStyleObject, ConditionalValue } from '../types/index';
3
- import type { Properties } from '../types/csstype';
4
- import type { SystemProperties } from '../types/style-props';
5
- import type { DistributiveOmit } from '../types/system-types';
6
- import type { Tokens } from '../tokens/index';
1
+ import type { TokenValue } from '../types/tokens.js';
2
+ import type { ConditionalValue, SystemProperties, SystemStyleObject } from '../types/system.js';
7
3
 
8
4
  export interface CqProperties {
9
- name?: ConditionalValue<Tokens["containerNames"] | Properties["containerName"]>
10
- type?: SystemProperties["containerType"]
5
+ name?: ConditionalValue<TokenValue<"containerNames"> | SystemProperties["containerName"]>
6
+ type?: SystemProperties["containerType"]
11
7
  }
12
8
 
13
- interface CqStyles extends CqProperties, DistributiveOmit<SystemStyleObject, keyof CqProperties > {}
9
+ type CqRestStyles = Omit<SystemStyleObject, keyof CqProperties>
10
+
11
+ interface CqStyles extends CqProperties, CqRestStyles {}
14
12
 
15
13
  interface CqPatternFn {
16
14
  (styles?: CqStyles): string
17
15
  raw: (styles?: CqStyles) => SystemStyleObject
16
+ propKeys: Array<keyof CqProperties>
18
17
  }
19
18
 
19
+ export declare function cqRaw(styles?: CqStyles): SystemStyleObject;
20
20
 
21
- export declare const cq: CqPatternFn;
21
+ export declare const cq: CqPatternFn;
package/patterns/cq.js ADDED
@@ -0,0 +1,24 @@
1
+ import { getPatternStyles, patternFns } from './runtime.js';
2
+ import { memo } from '../helpers.js';
3
+ import { css } from '../css/index.js';
4
+
5
+ const cqConfig = {
6
+ transform(props) {
7
+ const { name, type, ...rest } = props;
8
+ return {
9
+ containerType: type,
10
+ containerName: name,
11
+ ...rest
12
+ };
13
+ },
14
+ defaultValues: { type: "inline-size" }
15
+ }
16
+
17
+ export function cqRaw(styles) {
18
+ const s = getPatternStyles(cqConfig, styles || {})
19
+ return cqConfig.transform(s, patternFns)
20
+ }
21
+
22
+ export const cq = /* @__PURE__ */ Object.assign(/* @__PURE__ */ memo(function cq(styles = {}) {
23
+ return css(cqRaw(styles))
24
+ }), { raw: cqRaw, propKeys: ["name","type"] })
@@ -1,22 +1,22 @@
1
- /* eslint-disable */
2
- import type { SystemStyleObject, ConditionalValue } from '../types/index';
3
- import type { Properties } from '../types/csstype';
4
- import type { SystemProperties } from '../types/style-props';
5
- import type { DistributiveOmit } from '../types/system-types';
6
- import type { Tokens } from '../tokens/index';
1
+ import type { TokenValue } from '../types/tokens.js';
2
+ import type { ConditionalValue, SystemProperties, SystemStyleObject } from '../types/system.js';
7
3
 
8
4
  export interface DividerProperties {
9
- orientation?: ConditionalValue<"horizontal" | "vertical">
10
- thickness?: ConditionalValue<Tokens["sizes"] | Properties["borderWidth"]>
11
- color?: ConditionalValue<Tokens["colors"] | Properties["borderColor"]>
5
+ color?: ConditionalValue<TokenValue<"colors"> | SystemProperties["borderColor"]>
6
+ orientation?: ConditionalValue<"horizontal" | "vertical">
7
+ thickness?: ConditionalValue<TokenValue<"sizes"> | SystemProperties["borderWidth"]>
12
8
  }
13
9
 
14
- interface DividerStyles extends DividerProperties, DistributiveOmit<SystemStyleObject, keyof DividerProperties > {}
10
+ type DividerRestStyles = Omit<SystemStyleObject, keyof DividerProperties>
11
+
12
+ interface DividerStyles extends DividerProperties, DividerRestStyles {}
15
13
 
16
14
  interface DividerPatternFn {
17
15
  (styles?: DividerStyles): string
18
16
  raw: (styles?: DividerStyles) => SystemStyleObject
17
+ propKeys: Array<keyof DividerProperties>
19
18
  }
20
19
 
20
+ export declare function dividerRaw(styles?: DividerStyles): SystemStyleObject;
21
21
 
22
- export declare const divider: DividerPatternFn;
22
+ export declare const divider: DividerPatternFn;
@@ -0,0 +1,31 @@
1
+ import { getPatternStyles, patternFns } from './runtime.js';
2
+ import { memo } from '../helpers.js';
3
+ import { css } from '../css/index.js';
4
+
5
+ const dividerConfig = {
6
+ transform(props, { map }) {
7
+ const { orientation, thickness, color: color2, ...rest } = props;
8
+ return {
9
+ "--thickness": thickness,
10
+ width: map(orientation, (v) => v === "vertical" ? void 0 : "100%"),
11
+ height: map(orientation, (v) => v === "horizontal" ? void 0 : "100%"),
12
+ borderBlockEndWidth: map(orientation, (v) => v === "horizontal" ? "var(--thickness)" : void 0),
13
+ borderInlineEndWidth: map(orientation, (v) => v === "vertical" ? "var(--thickness)" : void 0),
14
+ borderColor: color2,
15
+ ...rest
16
+ };
17
+ },
18
+ defaultValues: {
19
+ orientation: "horizontal",
20
+ thickness: "1px"
21
+ }
22
+ }
23
+
24
+ export function dividerRaw(styles) {
25
+ const s = getPatternStyles(dividerConfig, styles || {})
26
+ return dividerConfig.transform(s, patternFns)
27
+ }
28
+
29
+ export const divider = /* @__PURE__ */ Object.assign(/* @__PURE__ */ memo(function divider(styles = {}) {
30
+ return css(dividerRaw(styles))
31
+ }), { raw: dividerRaw, propKeys: ["color","orientation","thickness"] })
@@ -1,26 +1,25 @@
1
- /* eslint-disable */
2
- import type { SystemStyleObject, ConditionalValue } from '../types/index';
3
- import type { Properties } from '../types/csstype';
4
- import type { SystemProperties } from '../types/style-props';
5
- import type { DistributiveOmit } from '../types/system-types';
6
- import type { Tokens } from '../tokens/index';
1
+ import type { SystemProperties, SystemStyleObject } from '../types/system.js';
7
2
 
8
3
  export interface FlexProperties {
9
- align?: SystemProperties["alignItems"]
10
- justify?: SystemProperties["justifyContent"]
11
- direction?: SystemProperties["flexDirection"]
12
- wrap?: SystemProperties["flexWrap"]
13
- basis?: SystemProperties["flexBasis"]
14
- grow?: SystemProperties["flexGrow"]
15
- shrink?: SystemProperties["flexShrink"]
4
+ align?: SystemProperties["alignItems"]
5
+ basis?: SystemProperties["flexBasis"]
6
+ direction?: SystemProperties["flexDirection"]
7
+ grow?: SystemProperties["flexGrow"]
8
+ justify?: SystemProperties["justifyContent"]
9
+ shrink?: SystemProperties["flexShrink"]
10
+ wrap?: SystemProperties["flexWrap"]
16
11
  }
17
12
 
18
- interface FlexStyles extends FlexProperties, DistributiveOmit<SystemStyleObject, keyof FlexProperties > {}
13
+ type FlexRestStyles = Omit<SystemStyleObject, keyof FlexProperties>
14
+
15
+ interface FlexStyles extends FlexProperties, FlexRestStyles {}
19
16
 
20
17
  interface FlexPatternFn {
21
18
  (styles?: FlexStyles): string
22
19
  raw: (styles?: FlexStyles) => SystemStyleObject
20
+ propKeys: Array<keyof FlexProperties>
23
21
  }
24
22
 
23
+ export declare function flexRaw(styles?: FlexStyles): SystemStyleObject;
25
24
 
26
- export declare const flex: FlexPatternFn;
25
+ export declare const flex: FlexPatternFn;
@@ -0,0 +1,27 @@
1
+ import { getPatternStyles, patternFns } from './runtime.js';
2
+ import { memo } from '../helpers.js';
3
+ import { css } from '../css/index.js';
4
+
5
+ const flexConfig = { transform(props) {
6
+ const { direction, align, justify, wrap: wrap2, basis, grow, shrink, ...rest } = props;
7
+ return {
8
+ display: "flex",
9
+ flexDirection: direction,
10
+ alignItems: align,
11
+ justifyContent: justify,
12
+ flexWrap: wrap2,
13
+ flexBasis: basis,
14
+ flexGrow: grow,
15
+ flexShrink: shrink,
16
+ ...rest
17
+ };
18
+ } }
19
+
20
+ export function flexRaw(styles) {
21
+ const s = getPatternStyles(flexConfig, styles || {})
22
+ return flexConfig.transform(s, patternFns)
23
+ }
24
+
25
+ export const flex = /* @__PURE__ */ Object.assign(/* @__PURE__ */ memo(function flex(styles = {}) {
26
+ return css(flexRaw(styles))
27
+ }), { raw: flexRaw, propKeys: ["align","basis","direction","grow","justify","shrink","wrap"] })