@prestack/thread-ui 0.0.1

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 (408) hide show
  1. package/CHANGELOG.md +348 -0
  2. package/dist/attach.d.ts +1 -0
  3. package/dist/attach.js +1 -0
  4. package/dist/ui/animations/anm_appear.d.ts +16 -0
  5. package/dist/ui/animations/anm_appear.js +10 -0
  6. package/dist/ui/animations/anm_blur_in.d.ts +22 -0
  7. package/dist/ui/animations/anm_blur_in.js +16 -0
  8. package/dist/ui/animations/anm_blur_out.d.ts +22 -0
  9. package/dist/ui/animations/anm_blur_out.js +16 -0
  10. package/dist/ui/animations/anm_dismiss.d.ts +22 -0
  11. package/dist/ui/animations/anm_dismiss.js +16 -0
  12. package/dist/ui/animations/anm_drop.d.ts +22 -0
  13. package/dist/ui/animations/anm_drop.js +16 -0
  14. package/dist/ui/animations/anm_fall.d.ts +22 -0
  15. package/dist/ui/animations/anm_fall.js +16 -0
  16. package/dist/ui/animations/anm_flash.d.ts +19 -0
  17. package/dist/ui/animations/anm_flash.js +16 -0
  18. package/dist/ui/animations/anm_glow.d.ts +16 -0
  19. package/dist/ui/animations/anm_glow.js +14 -0
  20. package/dist/ui/animations/anm_lift.d.ts +16 -0
  21. package/dist/ui/animations/anm_lift.js +14 -0
  22. package/dist/ui/animations/anm_nudge.d.ts +16 -0
  23. package/dist/ui/animations/anm_nudge.js +14 -0
  24. package/dist/ui/animations/anm_pop_in.d.ts +29 -0
  25. package/dist/ui/animations/anm_pop_in.js +20 -0
  26. package/dist/ui/animations/anm_pop_out.d.ts +29 -0
  27. package/dist/ui/animations/anm_pop_out.js +20 -0
  28. package/dist/ui/animations/anm_press.d.ts +19 -0
  29. package/dist/ui/animations/anm_press.js +10 -0
  30. package/dist/ui/animations/anm_pulse.d.ts +20 -0
  31. package/dist/ui/animations/anm_pulse.js +11 -0
  32. package/dist/ui/animations/anm_rise.d.ts +22 -0
  33. package/dist/ui/animations/anm_rise.js +16 -0
  34. package/dist/ui/animations/anm_shake.d.ts +23 -0
  35. package/dist/ui/animations/anm_shake.js +11 -0
  36. package/dist/ui/animations/anm_slide_in_left.d.ts +22 -0
  37. package/dist/ui/animations/anm_slide_in_left.js +16 -0
  38. package/dist/ui/animations/anm_slide_in_right.d.ts +22 -0
  39. package/dist/ui/animations/anm_slide_in_right.js +16 -0
  40. package/dist/ui/animations/anm_slide_out_left.d.ts +22 -0
  41. package/dist/ui/animations/anm_slide_out_left.js +16 -0
  42. package/dist/ui/animations/anm_slide_out_right.d.ts +22 -0
  43. package/dist/ui/animations/anm_slide_out_right.js +16 -0
  44. package/dist/ui/animations/anm_spin.d.ts +16 -0
  45. package/dist/ui/animations/anm_spin.js +10 -0
  46. package/dist/ui/animations/anm_swell.d.ts +16 -0
  47. package/dist/ui/animations/anm_swell.js +14 -0
  48. package/dist/ui/animations/anm_wobble.d.ts +27 -0
  49. package/dist/ui/animations/anm_wobble.js +22 -0
  50. package/dist/ui/animations/anm_zoom_in.d.ts +22 -0
  51. package/dist/ui/animations/anm_zoom_in.js +16 -0
  52. package/dist/ui/animations/anm_zoom_out.d.ts +22 -0
  53. package/dist/ui/animations/anm_zoom_out.js +16 -0
  54. package/dist/ui/animations.d.ts +59 -0
  55. package/dist/ui/animations.js +227 -0
  56. package/dist/ui/attach.d.ts +3 -0
  57. package/dist/ui/attach.js +497 -0
  58. package/dist/ui/charts.d.ts +32 -0
  59. package/dist/ui/charts.js +35 -0
  60. package/dist/ui/checked.d.ts +19 -0
  61. package/dist/ui/checked.js +3 -0
  62. package/dist/ui/collector.d.ts +32 -0
  63. package/dist/ui/collector.js +75 -0
  64. package/dist/ui/compositions.d.ts +21 -0
  65. package/dist/ui/compositions.js +305 -0
  66. package/dist/ui/consent.d.ts +22 -0
  67. package/dist/ui/consent.js +44 -0
  68. package/dist/ui/content.d.ts +9 -0
  69. package/dist/ui/content.js +11 -0
  70. package/dist/ui/contrast.d.ts +3 -0
  71. package/dist/ui/contrast.js +23 -0
  72. package/dist/ui/controls.d.ts +14 -0
  73. package/dist/ui/controls.js +2 -0
  74. package/dist/ui/disclosure.d.ts +14 -0
  75. package/dist/ui/disclosure.js +2 -0
  76. package/dist/ui/dismiss-layer.d.ts +14 -0
  77. package/dist/ui/dismiss-layer.js +66 -0
  78. package/dist/ui/door.d.ts +40 -0
  79. package/dist/ui/door.js +100 -0
  80. package/dist/ui/drag.d.ts +82 -0
  81. package/dist/ui/drag.js +212 -0
  82. package/dist/ui/elements/accordion.d.ts +12 -0
  83. package/dist/ui/elements/accordion.js +16 -0
  84. package/dist/ui/elements/accordion.works.d.ts +22 -0
  85. package/dist/ui/elements/accordion.works.js +44 -0
  86. package/dist/ui/elements/aspect-ratio.d.ts +10 -0
  87. package/dist/ui/elements/aspect-ratio.js +9 -0
  88. package/dist/ui/elements/aspect-ratio.works.d.ts +2 -0
  89. package/dist/ui/elements/aspect-ratio.works.js +3 -0
  90. package/dist/ui/elements/avatar.d.ts +11 -0
  91. package/dist/ui/elements/avatar.js +10 -0
  92. package/dist/ui/elements/avatar.works.d.ts +4 -0
  93. package/dist/ui/elements/avatar.works.js +16 -0
  94. package/dist/ui/elements/badge.d.ts +11 -0
  95. package/dist/ui/elements/badge.js +10 -0
  96. package/dist/ui/elements/badge.works.d.ts +5 -0
  97. package/dist/ui/elements/badge.works.js +6 -0
  98. package/dist/ui/elements/bars.d.ts +14 -0
  99. package/dist/ui/elements/bars.js +17 -0
  100. package/dist/ui/elements/bars.works.d.ts +12 -0
  101. package/dist/ui/elements/bars.works.js +20 -0
  102. package/dist/ui/elements/box.d.ts +12 -0
  103. package/dist/ui/elements/box.js +11 -0
  104. package/dist/ui/elements/breadcrumb.d.ts +10 -0
  105. package/dist/ui/elements/breadcrumb.js +12 -0
  106. package/dist/ui/elements/breadcrumb.works.d.ts +7 -0
  107. package/dist/ui/elements/breadcrumb.works.js +21 -0
  108. package/dist/ui/elements/button.d.ts +17 -0
  109. package/dist/ui/elements/button.js +16 -0
  110. package/dist/ui/elements/button.works.d.ts +17 -0
  111. package/dist/ui/elements/button.works.js +34 -0
  112. package/dist/ui/elements/column.d.ts +9 -0
  113. package/dist/ui/elements/column.js +8 -0
  114. package/dist/ui/elements/consent.d.ts +13 -0
  115. package/dist/ui/elements/consent.js +21 -0
  116. package/dist/ui/elements/consent.works.d.ts +41 -0
  117. package/dist/ui/elements/consent.works.js +79 -0
  118. package/dist/ui/elements/donut.d.ts +13 -0
  119. package/dist/ui/elements/donut.js +16 -0
  120. package/dist/ui/elements/donut.works.d.ts +11 -0
  121. package/dist/ui/elements/donut.works.js +28 -0
  122. package/dist/ui/elements/each.d.ts +14 -0
  123. package/dist/ui/elements/each.js +9 -0
  124. package/dist/ui/elements/each.works.d.ts +3 -0
  125. package/dist/ui/elements/each.works.js +68 -0
  126. package/dist/ui/elements/empty.d.ts +9 -0
  127. package/dist/ui/elements/empty.js +12 -0
  128. package/dist/ui/elements/field.d.ts +16 -0
  129. package/dist/ui/elements/field.js +15 -0
  130. package/dist/ui/elements/field.works.d.ts +17 -0
  131. package/dist/ui/elements/field.works.js +45 -0
  132. package/dist/ui/elements/funnel.d.ts +14 -0
  133. package/dist/ui/elements/funnel.js +17 -0
  134. package/dist/ui/elements/funnel.works.d.ts +12 -0
  135. package/dist/ui/elements/funnel.works.js +23 -0
  136. package/dist/ui/elements/gauge.d.ts +12 -0
  137. package/dist/ui/elements/gauge.js +15 -0
  138. package/dist/ui/elements/gauge.works.d.ts +11 -0
  139. package/dist/ui/elements/gauge.works.js +31 -0
  140. package/dist/ui/elements/glyph.d.ts +10 -0
  141. package/dist/ui/elements/glyph.js +9 -0
  142. package/dist/ui/elements/glyph.works.d.ts +5 -0
  143. package/dist/ui/elements/glyph.works.js +16 -0
  144. package/dist/ui/elements/grid.d.ts +9 -0
  145. package/dist/ui/elements/grid.js +8 -0
  146. package/dist/ui/elements/heatmap.d.ts +15 -0
  147. package/dist/ui/elements/heatmap.js +17 -0
  148. package/dist/ui/elements/heatmap.works.d.ts +11 -0
  149. package/dist/ui/elements/heatmap.works.js +11 -0
  150. package/dist/ui/elements/hit-box.d.ts +19 -0
  151. package/dist/ui/elements/hit-box.js +15 -0
  152. package/dist/ui/elements/hit-box.works.d.ts +87 -0
  153. package/dist/ui/elements/hit-box.works.js +451 -0
  154. package/dist/ui/elements/image.d.ts +10 -0
  155. package/dist/ui/elements/image.js +9 -0
  156. package/dist/ui/elements/line-chart.d.ts +13 -0
  157. package/dist/ui/elements/line-chart.js +16 -0
  158. package/dist/ui/elements/line-chart.works.d.ts +12 -0
  159. package/dist/ui/elements/line-chart.works.js +27 -0
  160. package/dist/ui/elements/link.d.ts +12 -0
  161. package/dist/ui/elements/link.js +15 -0
  162. package/dist/ui/elements/link.works.d.ts +10 -0
  163. package/dist/ui/elements/link.works.js +15 -0
  164. package/dist/ui/elements/media.d.ts +11 -0
  165. package/dist/ui/elements/media.js +22 -0
  166. package/dist/ui/elements/menu.d.ts +12 -0
  167. package/dist/ui/elements/menu.js +18 -0
  168. package/dist/ui/elements/menu.works.d.ts +50 -0
  169. package/dist/ui/elements/menu.works.js +100 -0
  170. package/dist/ui/elements/money.d.ts +10 -0
  171. package/dist/ui/elements/money.js +9 -0
  172. package/dist/ui/elements/money.works.d.ts +4 -0
  173. package/dist/ui/elements/money.works.js +4 -0
  174. package/dist/ui/elements/pagination.d.ts +11 -0
  175. package/dist/ui/elements/pagination.js +12 -0
  176. package/dist/ui/elements/pagination.works.d.ts +5 -0
  177. package/dist/ui/elements/pagination.works.js +15 -0
  178. package/dist/ui/elements/progress.d.ts +11 -0
  179. package/dist/ui/elements/progress.js +11 -0
  180. package/dist/ui/elements/progress.works.d.ts +2 -0
  181. package/dist/ui/elements/progress.works.js +6 -0
  182. package/dist/ui/elements/radio-group.d.ts +15 -0
  183. package/dist/ui/elements/radio-group.js +16 -0
  184. package/dist/ui/elements/radio-group.works.d.ts +10 -0
  185. package/dist/ui/elements/radio-group.works.js +22 -0
  186. package/dist/ui/elements/row.d.ts +9 -0
  187. package/dist/ui/elements/row.js +8 -0
  188. package/dist/ui/elements/scatter.d.ts +13 -0
  189. package/dist/ui/elements/scatter.js +15 -0
  190. package/dist/ui/elements/scatter.works.d.ts +11 -0
  191. package/dist/ui/elements/scatter.works.js +24 -0
  192. package/dist/ui/elements/select.d.ts +13 -0
  193. package/dist/ui/elements/select.js +11 -0
  194. package/dist/ui/elements/select.works.d.ts +4 -0
  195. package/dist/ui/elements/select.works.js +3 -0
  196. package/dist/ui/elements/separator.d.ts +10 -0
  197. package/dist/ui/elements/separator.js +9 -0
  198. package/dist/ui/elements/skeleton.d.ts +8 -0
  199. package/dist/ui/elements/skeleton.js +9 -0
  200. package/dist/ui/elements/slider.d.ts +14 -0
  201. package/dist/ui/elements/slider.js +10 -0
  202. package/dist/ui/elements/slider.works.d.ts +4 -0
  203. package/dist/ui/elements/slider.works.js +3 -0
  204. package/dist/ui/elements/sparkline.d.ts +10 -0
  205. package/dist/ui/elements/sparkline.js +15 -0
  206. package/dist/ui/elements/sparkline.works.d.ts +10 -0
  207. package/dist/ui/elements/sparkline.works.js +19 -0
  208. package/dist/ui/elements/spinner.d.ts +9 -0
  209. package/dist/ui/elements/spinner.js +12 -0
  210. package/dist/ui/elements/stack.d.ts +9 -0
  211. package/dist/ui/elements/stack.js +8 -0
  212. package/dist/ui/elements/stat.d.ts +12 -0
  213. package/dist/ui/elements/stat.js +10 -0
  214. package/dist/ui/elements/stat.works.d.ts +3 -0
  215. package/dist/ui/elements/stat.works.js +10 -0
  216. package/dist/ui/elements/surface.d.ts +9 -0
  217. package/dist/ui/elements/surface.js +15 -0
  218. package/dist/ui/elements/surface.works.d.ts +7 -0
  219. package/dist/ui/elements/surface.works.js +4 -0
  220. package/dist/ui/elements/table.d.ts +13 -0
  221. package/dist/ui/elements/table.js +16 -0
  222. package/dist/ui/elements/table.works.d.ts +11 -0
  223. package/dist/ui/elements/table.works.js +15 -0
  224. package/dist/ui/elements/tabs.d.ts +12 -0
  225. package/dist/ui/elements/tabs.js +16 -0
  226. package/dist/ui/elements/tabs.works.d.ts +25 -0
  227. package/dist/ui/elements/tabs.works.js +53 -0
  228. package/dist/ui/elements/text.d.ts +13 -0
  229. package/dist/ui/elements/text.js +9 -0
  230. package/dist/ui/elements/textarea.d.ts +14 -0
  231. package/dist/ui/elements/textarea.js +11 -0
  232. package/dist/ui/elements/textarea.works.d.ts +4 -0
  233. package/dist/ui/elements/textarea.works.js +3 -0
  234. package/dist/ui/elements/time.d.ts +11 -0
  235. package/dist/ui/elements/time.js +14 -0
  236. package/dist/ui/elements/time.works.d.ts +11 -0
  237. package/dist/ui/elements/time.works.js +16 -0
  238. package/dist/ui/elements/toggle.d.ts +11 -0
  239. package/dist/ui/elements/toggle.js +10 -0
  240. package/dist/ui/elements/toggle.works.d.ts +4 -0
  241. package/dist/ui/elements/toggle.works.js +3 -0
  242. package/dist/ui/elements/tooltip.d.ts +12 -0
  243. package/dist/ui/elements/tooltip.js +15 -0
  244. package/dist/ui/elements/tooltip.works.d.ts +28 -0
  245. package/dist/ui/elements/tooltip.works.js +54 -0
  246. package/dist/ui/elements/value.d.ts +12 -0
  247. package/dist/ui/elements/value.js +9 -0
  248. package/dist/ui/elements/value.works.d.ts +4 -0
  249. package/dist/ui/elements/value.works.js +4 -0
  250. package/dist/ui/elements.d.ts +1143 -0
  251. package/dist/ui/elements.js +68 -0
  252. package/dist/ui/focus-scope.d.ts +7 -0
  253. package/dist/ui/focus-scope.js +109 -0
  254. package/dist/ui/fonts.d.ts +103 -0
  255. package/dist/ui/fonts.js +243 -0
  256. package/dist/ui/generators/dev.d.ts +2 -0
  257. package/dist/ui/generators/dev.js +61 -0
  258. package/dist/ui/generators/elements.d.ts +31 -0
  259. package/dist/ui/generators/elements.js +520 -0
  260. package/dist/ui/generators/i18n.d.ts +5 -0
  261. package/dist/ui/generators/i18n.js +264 -0
  262. package/dist/ui/generators/icons.d.ts +1 -0
  263. package/dist/ui/generators/icons.js +187 -0
  264. package/dist/ui/generators/react.d.ts +26 -0
  265. package/dist/ui/generators/react.js +218 -0
  266. package/dist/ui/generators/routes.d.ts +11 -0
  267. package/dist/ui/generators/routes.js +597 -0
  268. package/dist/ui/generators/show.d.ts +1 -0
  269. package/dist/ui/generators/show.js +231 -0
  270. package/dist/ui/generators/styles.d.ts +1 -0
  271. package/dist/ui/generators/styles.js +502 -0
  272. package/dist/ui/generators/variants.d.ts +12 -0
  273. package/dist/ui/generators/variants.js +162 -0
  274. package/dist/ui/i18n/catalogs/en.d.ts +172 -0
  275. package/dist/ui/i18n/catalogs/en.js +148 -0
  276. package/dist/ui/i18n/format.d.ts +13 -0
  277. package/dist/ui/i18n/format.js +161 -0
  278. package/dist/ui/i18n/locales.d.ts +9 -0
  279. package/dist/ui/i18n/locales.js +20 -0
  280. package/dist/ui/i18n/parse.d.ts +45 -0
  281. package/dist/ui/i18n/parse.js +249 -0
  282. package/dist/ui/i18n/translator.d.ts +10 -0
  283. package/dist/ui/i18n/translator.js +22 -0
  284. package/dist/ui/i18n/types.d.ts +33 -0
  285. package/dist/ui/i18n/types.js +9 -0
  286. package/dist/ui/icons.d.ts +67 -0
  287. package/dist/ui/icons.js +249 -0
  288. package/dist/ui/islands/map.d.ts +33 -0
  289. package/dist/ui/islands/map.js +44 -0
  290. package/dist/ui/localizations.d.ts +33 -0
  291. package/dist/ui/localizations.js +51 -0
  292. package/dist/ui/makers/message.d.ts +1 -0
  293. package/dist/ui/makers/message.js +230 -0
  294. package/dist/ui/material.d.ts +83 -0
  295. package/dist/ui/material.js +95 -0
  296. package/dist/ui/materials/mat_bordered.d.ts +22 -0
  297. package/dist/ui/materials/mat_bordered.js +12 -0
  298. package/dist/ui/materials/mat_ceramic.d.ts +22 -0
  299. package/dist/ui/materials/mat_ceramic.js +12 -0
  300. package/dist/ui/materials/mat_clay.d.ts +22 -0
  301. package/dist/ui/materials/mat_clay.js +12 -0
  302. package/dist/ui/materials/mat_elevated.d.ts +32 -0
  303. package/dist/ui/materials/mat_elevated.js +23 -0
  304. package/dist/ui/materials/mat_flat.d.ts +50 -0
  305. package/dist/ui/materials/mat_flat.js +33 -0
  306. package/dist/ui/materials/mat_glass.d.ts +32 -0
  307. package/dist/ui/materials/mat_glass.js +19 -0
  308. package/dist/ui/materials/mat_lit.d.ts +22 -0
  309. package/dist/ui/materials/mat_lit.js +12 -0
  310. package/dist/ui/materials/mat_moulded.d.ts +16 -0
  311. package/dist/ui/materials/mat_moulded.js +10 -0
  312. package/dist/ui/materials.d.ts +56 -0
  313. package/dist/ui/materials.js +175 -0
  314. package/dist/ui/modes.d.ts +25 -0
  315. package/dist/ui/modes.js +25 -0
  316. package/dist/ui/navigation.d.ts +3 -0
  317. package/dist/ui/navigation.js +24 -0
  318. package/dist/ui/positioning.d.ts +24 -0
  319. package/dist/ui/positioning.js +48 -0
  320. package/dist/ui/presented.d.ts +10 -0
  321. package/dist/ui/presented.js +81 -0
  322. package/dist/ui/provider.d.ts +31 -0
  323. package/dist/ui/provider.js +104 -0
  324. package/dist/ui/render-loop.d.ts +12 -0
  325. package/dist/ui/render-loop.js +94 -0
  326. package/dist/ui/roving-focus.d.ts +15 -0
  327. package/dist/ui/roving-focus.js +143 -0
  328. package/dist/ui/screens.d.ts +17 -0
  329. package/dist/ui/screens.js +112 -0
  330. package/dist/ui/scroll-lock.d.ts +2 -0
  331. package/dist/ui/scroll-lock.js +24 -0
  332. package/dist/ui/series.d.ts +9 -0
  333. package/dist/ui/series.js +67 -0
  334. package/dist/ui/signals.d.ts +120 -0
  335. package/dist/ui/signals.js +286 -0
  336. package/dist/ui/styleguide.d.ts +27 -0
  337. package/dist/ui/styleguide.js +138 -0
  338. package/dist/ui/styleguides.d.ts +11 -0
  339. package/dist/ui/styleguides.js +299 -0
  340. package/dist/ui/themes.d.ts +5 -0
  341. package/dist/ui/themes.js +16 -0
  342. package/dist/ui/token.d.ts +16 -0
  343. package/dist/ui/token.js +37 -0
  344. package/dist/ui/tokens/shadow.d.ts +6 -0
  345. package/dist/ui/tokens/shadow.js +17 -0
  346. package/dist/ui/tokens.d.ts +180 -0
  347. package/dist/ui/tokens.js +200 -0
  348. package/dist/ui/validators.d.ts +37 -0
  349. package/dist/ui/validators.js +184 -0
  350. package/dist/ui/variant.d.ts +122 -0
  351. package/dist/ui/variant.js +201 -0
  352. package/dist/ui/variants/var_avatar-round.d.ts +23 -0
  353. package/dist/ui/variants/var_avatar-round.js +13 -0
  354. package/dist/ui/variants/var_bubble-me.d.ts +21 -0
  355. package/dist/ui/variants/var_bubble-me.js +13 -0
  356. package/dist/ui/variants/var_bubble-them.d.ts +18 -0
  357. package/dist/ui/variants/var_bubble-them.js +12 -0
  358. package/dist/ui/variants/var_button-border.d.ts +116 -0
  359. package/dist/ui/variants/var_button-border.js +75 -0
  360. package/dist/ui/variants/var_button-cta.d.ts +116 -0
  361. package/dist/ui/variants/var_button-cta.js +75 -0
  362. package/dist/ui/variants/var_button-destructive-ghost.d.ts +113 -0
  363. package/dist/ui/variants/var_button-destructive-ghost.js +71 -0
  364. package/dist/ui/variants/var_button-destructive.d.ts +116 -0
  365. package/dist/ui/variants/var_button-destructive.js +75 -0
  366. package/dist/ui/variants/var_button-fill.d.ts +116 -0
  367. package/dist/ui/variants/var_button-fill.js +75 -0
  368. package/dist/ui/variants/var_button-ghost.d.ts +113 -0
  369. package/dist/ui/variants/var_button-ghost.js +71 -0
  370. package/dist/ui/variants/var_button-glass.d.ts +84 -0
  371. package/dist/ui/variants/var_button-glass.js +54 -0
  372. package/dist/ui/variants/var_button-normal.d.ts +116 -0
  373. package/dist/ui/variants/var_button-normal.js +75 -0
  374. package/dist/ui/variants/var_button-quiet.d.ts +119 -0
  375. package/dist/ui/variants/var_button-quiet.js +73 -0
  376. package/dist/ui/variants/var_card.d.ts +30 -0
  377. package/dist/ui/variants/var_card.js +16 -0
  378. package/dist/ui/variants/var_chip.d.ts +18 -0
  379. package/dist/ui/variants/var_chip.js +12 -0
  380. package/dist/ui/variants/var_choice.d.ts +26 -0
  381. package/dist/ui/variants/var_choice.js +14 -0
  382. package/dist/ui/variants/var_framed.d.ts +11 -0
  383. package/dist/ui/variants/var_framed.js +9 -0
  384. package/dist/ui/variants/var_glyph-plain.d.ts +14 -0
  385. package/dist/ui/variants/var_glyph-plain.js +10 -0
  386. package/dist/ui/variants/var_input.d.ts +61 -0
  387. package/dist/ui/variants/var_input.js +42 -0
  388. package/dist/ui/variants/var_link-inline.d.ts +39 -0
  389. package/dist/ui/variants/var_link-inline.js +28 -0
  390. package/dist/ui/variants/var_list-row.d.ts +47 -0
  391. package/dist/ui/variants/var_list-row.js +33 -0
  392. package/dist/ui/variants/var_rule.d.ts +11 -0
  393. package/dist/ui/variants/var_rule.js +9 -0
  394. package/dist/ui/variants/var_skeleton-block.d.ts +17 -0
  395. package/dist/ui/variants/var_skeleton-block.js +11 -0
  396. package/dist/ui/variants/var_spinner-turning.d.ts +17 -0
  397. package/dist/ui/variants/var_spinner-turning.js +11 -0
  398. package/dist/ui/variants/var_stat-tile.d.ts +18 -0
  399. package/dist/ui/variants/var_stat-tile.js +12 -0
  400. package/dist/ui/variants/var_tab-bar.d.ts +24 -0
  401. package/dist/ui/variants/var_tab-bar.js +14 -0
  402. package/dist/ui/variants/var_tap-target.d.ts +33 -0
  403. package/dist/ui/variants/var_tap-target.js +24 -0
  404. package/dist/ui/variants.d.ts +174 -0
  405. package/dist/ui/variants.js +50 -0
  406. package/dist/ui/wrappers.d.ts +128 -0
  407. package/dist/ui/wrappers.js +220 -0
  408. package/package.json +16 -0
@@ -0,0 +1,122 @@
1
+ import { FREE, type Material, type Setting } from './material.ts';
2
+ import type { MATERIALS } from './materials.ts';
3
+ import type { Holds, Token, Wearing } from './token.ts';
4
+ import { holds } from './signals.ts';
5
+ interface Stateful {
6
+ readonly id: string;
7
+ readonly states?: readonly {
8
+ readonly when: readonly string[];
9
+ readonly sets: readonly Setting[];
10
+ }[];
11
+ }
12
+ type SignalId = (typeof holds)[number]['id'] | (string & {});
13
+ type MaterialId = (typeof MATERIALS)['declares'][number]['id'] | (string & {});
14
+ declare const BOUND: {
15
+ readonly background: readonly ["colour", "gradient", "texture", "noise", "img"];
16
+ readonly borderColor: readonly ["colour"];
17
+ readonly color: readonly ["colour"];
18
+ readonly borderRadius: readonly ["radius"];
19
+ readonly borderWidth: readonly ["edge"];
20
+ readonly borderStyle: readonly ["line"];
21
+ readonly boxShadow: readonly ["shadow"];
22
+ readonly cursor: readonly ["cursor"];
23
+ readonly gap: readonly ["space"];
24
+ readonly padding: readonly ["space"];
25
+ readonly outlineOffset: readonly ["space"];
26
+ readonly minHeight: readonly ["control", "space"];
27
+ readonly minWidth: readonly ["space"];
28
+ readonly maxWidth: readonly ["space"];
29
+ readonly opacity: readonly ["opacity"];
30
+ readonly transform: readonly ["transform"];
31
+ readonly animation: readonly ["animation"];
32
+ readonly width: readonly ["icon"];
33
+ readonly height: readonly ["control", "icon"];
34
+ readonly display: readonly ["layout"];
35
+ readonly flexDirection: readonly ["flow"];
36
+ readonly alignItems: readonly ["align"];
37
+ readonly justifyContent: readonly ["align"];
38
+ readonly flexWrap: readonly ["wrap"];
39
+ readonly position: readonly ["position"];
40
+ readonly visibility: readonly ["visibility"];
41
+ readonly pointerEvents: readonly ["reach"];
42
+ readonly userSelect: readonly ["picking"];
43
+ readonly touchAction: readonly ["touch"];
44
+ readonly willChange: readonly ["readying"];
45
+ readonly transformOrigin: readonly ["origin"];
46
+ readonly overflow: readonly ["overflow"];
47
+ readonly zIndex: readonly ["layer"];
48
+ readonly top: readonly ["space"];
49
+ readonly left: readonly ["space"];
50
+ readonly aspectRatio: readonly ["ratio"];
51
+ };
52
+ type Property = keyof typeof BOUND;
53
+ type BoundSettingFor<P extends Property> = {
54
+ readonly property: P;
55
+ readonly is?: string;
56
+ readonly token?: (typeof BOUND)[P][number];
57
+ readonly asks?: Readonly<Record<string, string | number>>;
58
+ };
59
+ type FreeProperty = (typeof FREE)[number];
60
+ type FreeSettingFor<P extends FreeProperty> = {
61
+ readonly property: P;
62
+ readonly is: string;
63
+ };
64
+ type VariantSetting = {
65
+ [P in Property]: BoundSettingFor<P>;
66
+ }[Property] | {
67
+ [P in FreeProperty]: FreeSettingFor<P>;
68
+ }[FreeProperty];
69
+ export interface Variant {
70
+ readonly id: string;
71
+ readonly version?: number;
72
+ readonly material?: MaterialId;
73
+ readonly type?: string;
74
+ readonly icon?: string;
75
+ readonly sets: readonly VariantSetting[];
76
+ readonly states?: readonly {
77
+ readonly when: readonly SignalId[];
78
+ readonly sets: readonly VariantSetting[];
79
+ }[];
80
+ readonly reacts: readonly SignalId[];
81
+ readonly plays?: {
82
+ readonly in?: string;
83
+ readonly out?: string;
84
+ };
85
+ }
86
+ export declare function propertiesHeld(): Readonly<Record<string, readonly string[]>>;
87
+ export declare function freeHeld(): readonly string[];
88
+ export declare const structural: Set<string>;
89
+ export declare function looking(made: Readonly<Record<string, string>>): boolean;
90
+ export declare const variant: <const T extends Variant>(one: T & {
91
+ readonly sets: { readonly [I in keyof T["sets"]]: T["sets"][I] extends {
92
+ readonly is: infer Said;
93
+ } ? {
94
+ readonly is: Wearing<Said & string>;
95
+ } : unknown; };
96
+ } & (T extends {
97
+ readonly states: infer States;
98
+ } ? {
99
+ readonly states: { readonly [S in keyof States]: States[S] extends {
100
+ readonly sets: infer Sets;
101
+ } ? {
102
+ readonly sets: { readonly [I in keyof Sets]: Sets[I] extends {
103
+ readonly is: infer Said;
104
+ } ? {
105
+ readonly is: Wearing<Said & string>;
106
+ } : unknown; };
107
+ } : unknown; };
108
+ } : unknown)) => T;
109
+ export declare function boundHeld(): Readonly<Record<string, readonly string[]>>;
110
+ export declare function classOf(id: string): string;
111
+ export declare function classOfElement(id: string): string;
112
+ export declare function classOfComposition(id: string): string;
113
+ export declare function classOfScreen(id: string): string;
114
+ export declare function unreacted(variant: Variant, materials: Readonly<Record<string, Material>>): readonly string[];
115
+ export declare function complete(variant: Variant, materials: Readonly<Record<string, Material>>, named: ReadonlySet<string>, tokens: Readonly<Record<string, Token>>, kinds: Readonly<Record<string, string>>): Readonly<Record<string, Holds>>;
116
+ export declare function statesOf(variant: Variant, materials: Readonly<Record<string, Material>>): Stateful;
117
+ export declare function under(variant: Stateful, named: ReadonlySet<string>, tokens: Readonly<Record<string, Token>>, kinds: Readonly<Record<string, string>>): readonly {
118
+ readonly marks: string;
119
+ readonly made: Readonly<Record<string, Holds>>;
120
+ }[];
121
+ export declare function undeclaredStates(variant: Stateful): readonly string[];
122
+ export {};
@@ -0,0 +1,201 @@
1
+ import { BOUND as MATERIAL_BOUND, compose, composed, FREE } from "./material.js";
2
+ import { coexist, isSignal, selectorOf, signalNames } from "./signals.js";
3
+ const BOUND = {
4
+ background: ['colour', 'gradient', 'texture', 'noise', 'img'],
5
+ borderColor: ['colour'],
6
+ color: ['colour'],
7
+ borderRadius: ['radius'],
8
+ borderWidth: ['edge'],
9
+ borderStyle: ['line'],
10
+ boxShadow: ['shadow'],
11
+ cursor: ['cursor'],
12
+ gap: ['space'],
13
+ padding: ['space'],
14
+ outlineOffset: ['space'],
15
+ minHeight: ['control', 'space'],
16
+ minWidth: ['space'],
17
+ maxWidth: ['space'],
18
+ opacity: ['opacity'],
19
+ transform: ['transform'],
20
+ animation: ['animation'],
21
+ width: ['icon'],
22
+ height: ['control', 'icon'],
23
+ display: ['layout'],
24
+ flexDirection: ['flow'],
25
+ alignItems: ['align'],
26
+ justifyContent: ['align'],
27
+ flexWrap: ['wrap'],
28
+ position: ['position'],
29
+ visibility: ['visibility'],
30
+ pointerEvents: ['reach'],
31
+ userSelect: ['picking'],
32
+ touchAction: ['touch'],
33
+ willChange: ['readying'],
34
+ transformOrigin: ['origin'],
35
+ overflow: ['overflow'],
36
+ zIndex: ['layer'],
37
+ top: ['space'],
38
+ left: ['space'],
39
+ aspectRatio: ['ratio'],
40
+ };
41
+ export function propertiesHeld() {
42
+ return BOUND;
43
+ }
44
+ export function freeHeld() {
45
+ return FREE;
46
+ }
47
+ export const structural = new Set(['tag', 'shows', 'reads', 'holds', 'each', 'by', 'takes', 'marks', 'gives', 'keyed', 'when']);
48
+ export function looking(made) {
49
+ return Object.keys(made).some((key) => !structural.has(key));
50
+ }
51
+ export const variant = (one) => one;
52
+ export function boundHeld() {
53
+ return BOUND;
54
+ }
55
+ export function classOf(id) {
56
+ return `thread-${id}`;
57
+ }
58
+ export function classOfElement(id) {
59
+ return `e-${id}`;
60
+ }
61
+ export function classOfComposition(id) {
62
+ return `c-${id}`;
63
+ }
64
+ export function classOfScreen(id) {
65
+ return `s-${id}`;
66
+ }
67
+ export function unreacted(variant, materials) {
68
+ const whole = statesOf(variant, materials);
69
+ const described = new Set((whole.states ?? []).flatMap((one) => one.when));
70
+ const claimed = new Set(variant.reacts);
71
+ const missing = [];
72
+ for (const name of [...described].sort()) {
73
+ if (claimed.has(name))
74
+ continue;
75
+ missing.push(`\`${variant.id}\` looks different under "${name}" and does not say it reacts to it. A ` +
76
+ 'variant states what it answers to, so reading one tells you without opening its material.');
77
+ }
78
+ for (const name of [...claimed].sort()) {
79
+ if (!isSignal(name)) {
80
+ missing.push(`\`${variant.id}\` says it reacts to "${name}", and no signal by that name is declared. ` +
81
+ `Declared: ${signalNames().join(' · ')}.`);
82
+ continue;
83
+ }
84
+ if (described.has(name))
85
+ continue;
86
+ missing.push(`\`${variant.id}\` says it reacts to "${name}" and never says how it looks under it, so it ` +
87
+ 'reacts to nothing.');
88
+ }
89
+ return missing;
90
+ }
91
+ export function complete(variant, materials, named, tokens, kinds) {
92
+ const made = {};
93
+ if (variant.material !== undefined) {
94
+ const material = materials[variant.material];
95
+ if (material === undefined) {
96
+ throw new Error(`\`${variant.id}\` is made of \`${variant.material}\`, and no material by that name is ` +
97
+ 'declared. A variant is material plus the rest, so without the material there is no rest.');
98
+ }
99
+ Object.assign(made, compose(material, named, tokens, kinds));
100
+ }
101
+ Object.assign(made, composed(variant.sets, named, tokens, variant.id, kinds, { ...MATERIAL_BOUND, ...BOUND }));
102
+ return made;
103
+ }
104
+ export function statesOf(variant, materials) {
105
+ const material = variant.material === undefined ? undefined : materials[variant.material];
106
+ const merged = new Map();
107
+ for (const state of [...(material?.states ?? []), ...(variant.states ?? [])]) {
108
+ const at = [...state.when].sort((a, b) => (a < b ? -1 : a > b ? 1 : 0)).join('+');
109
+ const already = merged.get(at);
110
+ if (already === undefined)
111
+ merged.set(at, { when: state.when, sets: [...state.sets] });
112
+ else
113
+ already.sets.push(...state.sets);
114
+ }
115
+ return { id: variant.id, states: [...merged.values()] };
116
+ }
117
+ function marked(when) {
118
+ return [...when]
119
+ .sort((a, b) => (a < b ? -1 : a > b ? 1 : 0))
120
+ .map((one) => selectorOf(one) ?? '')
121
+ .join('');
122
+ }
123
+ export function under(variant, named, tokens, kinds) {
124
+ const found = [];
125
+ for (const state of variant.states ?? []) {
126
+ if (state.when.length === 0) {
127
+ throw new Error(`\`${variant.id}\` declares a state that names no signal. A state is the set of truths it ` +
128
+ 'holds under, and the empty set is the resting look, which is already declared.');
129
+ }
130
+ for (const name of state.when) {
131
+ if (isSignal(name))
132
+ continue;
133
+ throw new Error(`\`${variant.id}\` declares a state under \`${name}\`, and no signal by that name is ` +
134
+ `declared. Declared: ${signalNames().join(' · ')}.`);
135
+ }
136
+ found.push({
137
+ marks: marked(state.when),
138
+ made: composed(state.sets, named, tokens, variant.id, kinds, { ...MATERIAL_BOUND, ...BOUND }),
139
+ });
140
+ }
141
+ return found;
142
+ }
143
+ const key = (when) => [...when].sort((a, b) => (a < b ? -1 : a > b ? 1 : 0)).join('+');
144
+ function sized(all, size) {
145
+ if (size === 0)
146
+ return [[]];
147
+ const found = [];
148
+ for (let at = 0; at <= all.length - size; at += 1) {
149
+ const head = all[at];
150
+ if (head === undefined)
151
+ continue;
152
+ for (const rest of sized(all.slice(at + 1), size - 1))
153
+ found.push([head, ...rest]);
154
+ }
155
+ return found;
156
+ }
157
+ function together(all) {
158
+ for (let i = 0; i < all.length; i += 1) {
159
+ for (let j = i + 1; j < all.length; j += 1) {
160
+ if (!coexist(all[i] ?? '', all[j] ?? ''))
161
+ return false;
162
+ }
163
+ }
164
+ return true;
165
+ }
166
+ export function undeclaredStates(variant) {
167
+ const states = variant.states ?? [];
168
+ const declared = new Set(states.map((one) => key(one.when)));
169
+ const named = [...new Set(states.flatMap((one) => one.when))].sort((a, b) => (a < b ? -1 : a > b ? 1 : 0));
170
+ const missing = [];
171
+ for (let size = 2; size <= named.length; size += 1) {
172
+ for (const combination of sized(named, size)) {
173
+ if (!together(combination))
174
+ continue;
175
+ if (declared.has(key(combination)))
176
+ continue;
177
+ const applying = states.filter((one) => one.when.every((name) => combination.includes(name)));
178
+ const deepest = new Map();
179
+ const tied = new Map();
180
+ for (const state of applying) {
181
+ for (const property of new Set(state.sets.map((set) => set.property))) {
182
+ const depth = deepest.get(property) ?? 0;
183
+ if (state.when.length > depth) {
184
+ deepest.set(property, state.when.length);
185
+ tied.set(property, 1);
186
+ }
187
+ else if (state.when.length === depth) {
188
+ tied.set(property, (tied.get(property) ?? 0) + 1);
189
+ }
190
+ }
191
+ }
192
+ const clash = new Set([...tied.entries()].filter(([, held]) => held > 1).map(([property]) => property));
193
+ if (clash.size === 0)
194
+ continue;
195
+ missing.push(`${combination.map((one) => `"${one}"`).join(' and ')} can all hold at once and they all ` +
196
+ `set ${[...clash].sort().join(', ')}, so which one wins would be an accident of file ` +
197
+ `order. "${key(combination)}" is not declared — declare it, or say the signals cannot coexist`);
198
+ }
199
+ }
200
+ return missing;
201
+ }
@@ -0,0 +1,23 @@
1
+ export declare const AVATAR_ROUND: {
2
+ readonly id: "avatar-round";
3
+ readonly sets: readonly [{
4
+ readonly property: "width";
5
+ readonly is: "icon-lg";
6
+ }, {
7
+ readonly property: "height";
8
+ readonly is: "icon-lg";
9
+ }, {
10
+ readonly property: "borderRadius";
11
+ readonly is: "radius-pill";
12
+ }, {
13
+ readonly property: "background";
14
+ readonly is: "colour-sunken";
15
+ }, {
16
+ readonly property: "display";
17
+ readonly is: "layout-flex";
18
+ }, {
19
+ readonly property: "alignItems";
20
+ readonly is: "align-centre";
21
+ }];
22
+ readonly reacts: readonly [];
23
+ };
@@ -0,0 +1,13 @@
1
+ import { variant } from "../variant.js";
2
+ export const AVATAR_ROUND = variant({
3
+ id: 'avatar-round',
4
+ sets: [
5
+ { property: 'width', is: 'icon-lg' },
6
+ { property: 'height', is: 'icon-lg' },
7
+ { property: 'borderRadius', is: 'radius-pill' },
8
+ { property: 'background', is: 'colour-sunken' },
9
+ { property: 'display', is: 'layout-flex' },
10
+ { property: 'alignItems', is: 'align-centre' },
11
+ ],
12
+ reacts: [],
13
+ });
@@ -0,0 +1,21 @@
1
+ export declare const BUBBLE_ME: {
2
+ readonly id: "bubble-me";
3
+ readonly material: "flat";
4
+ readonly sets: readonly [{
5
+ readonly property: "background";
6
+ readonly is: "colour-accent";
7
+ }, {
8
+ readonly property: "color";
9
+ readonly is: "colour-on-accent";
10
+ }, {
11
+ readonly property: "borderRadius";
12
+ readonly is: "radius-lg";
13
+ }, {
14
+ readonly property: "padding";
15
+ readonly is: "space-3 space-4";
16
+ }, {
17
+ readonly property: "gap";
18
+ readonly is: "space-2";
19
+ }];
20
+ readonly reacts: readonly ["focus", "hover"];
21
+ };
@@ -0,0 +1,13 @@
1
+ import { variant } from "../variant.js";
2
+ export const BUBBLE_ME = variant({
3
+ id: 'bubble-me',
4
+ material: 'flat',
5
+ sets: [
6
+ { property: 'background', is: 'colour-accent' },
7
+ { property: 'color', is: 'colour-on-accent' },
8
+ { property: 'borderRadius', is: 'radius-lg' },
9
+ { property: 'padding', is: 'space-3 space-4' },
10
+ { property: 'gap', is: 'space-2' },
11
+ ],
12
+ reacts: ['focus', 'hover'],
13
+ });
@@ -0,0 +1,18 @@
1
+ export declare const BUBBLE_THEM: {
2
+ readonly id: "bubble-them";
3
+ readonly material: "flat";
4
+ readonly sets: readonly [{
5
+ readonly property: "color";
6
+ readonly is: "colour-ink";
7
+ }, {
8
+ readonly property: "borderRadius";
9
+ readonly is: "radius-lg";
10
+ }, {
11
+ readonly property: "padding";
12
+ readonly is: "space-3 space-4";
13
+ }, {
14
+ readonly property: "gap";
15
+ readonly is: "space-2";
16
+ }];
17
+ readonly reacts: readonly ["focus", "hover"];
18
+ };
@@ -0,0 +1,12 @@
1
+ import { variant } from "../variant.js";
2
+ export const BUBBLE_THEM = variant({
3
+ id: 'bubble-them',
4
+ material: 'flat',
5
+ sets: [
6
+ { property: 'color', is: 'colour-ink' },
7
+ { property: 'borderRadius', is: 'radius-lg' },
8
+ { property: 'padding', is: 'space-3 space-4' },
9
+ { property: 'gap', is: 'space-2' },
10
+ ],
11
+ reacts: ['focus', 'hover'],
12
+ });
@@ -0,0 +1,116 @@
1
+ export declare const BUTTON_BORDER: {
2
+ readonly id: "button-border";
3
+ readonly type: "label";
4
+ readonly icon: "md";
5
+ readonly sets: readonly [{
6
+ readonly property: "display";
7
+ readonly is: "layout-flex";
8
+ }, {
9
+ readonly property: "alignItems";
10
+ readonly is: "align-centre";
11
+ }, {
12
+ readonly property: "justifyContent";
13
+ readonly is: "align-centre";
14
+ }, {
15
+ readonly property: "borderRadius";
16
+ readonly is: "control-radius";
17
+ }, {
18
+ readonly property: "height";
19
+ readonly is: "control-md";
20
+ }, {
21
+ readonly property: "padding";
22
+ readonly is: "control-pad-y control-pad-x";
23
+ }, {
24
+ readonly property: "gap";
25
+ readonly is: "control-gap";
26
+ }, {
27
+ readonly property: "cursor";
28
+ readonly is: "cursor-press";
29
+ }, {
30
+ readonly property: "transition";
31
+ readonly is: "motion-quick ease-out";
32
+ }, {
33
+ readonly property: "background";
34
+ readonly is: "colour-clear";
35
+ }, {
36
+ readonly property: "color";
37
+ readonly is: "colour-accent";
38
+ }, {
39
+ readonly property: "borderWidth";
40
+ readonly is: "control-edge";
41
+ }, {
42
+ readonly property: "borderStyle";
43
+ readonly is: "line-solid";
44
+ }, {
45
+ readonly property: "borderColor";
46
+ readonly is: "colour-accent";
47
+ }, {
48
+ readonly property: "boxShadow";
49
+ readonly is: "shadow-0";
50
+ }];
51
+ readonly states: readonly [{
52
+ readonly when: readonly ["hover"];
53
+ readonly sets: readonly [{
54
+ readonly property: "background";
55
+ readonly is: "colour-surface-lit";
56
+ }, {
57
+ readonly property: "transform";
58
+ readonly is: "transform-lift";
59
+ }];
60
+ }, {
61
+ readonly when: readonly ["active"];
62
+ readonly sets: readonly [{
63
+ readonly property: "background";
64
+ readonly is: "colour-surface-lit";
65
+ }, {
66
+ readonly property: "transform";
67
+ readonly is: "transform-press";
68
+ }];
69
+ }, {
70
+ readonly when: readonly ["active", "hover"];
71
+ readonly sets: readonly [{
72
+ readonly property: "background";
73
+ readonly is: "colour-surface-lit";
74
+ }, {
75
+ readonly property: "transform";
76
+ readonly is: "transform-press";
77
+ }];
78
+ }, {
79
+ readonly when: readonly ["focus"];
80
+ readonly sets: readonly [{
81
+ readonly property: "outline";
82
+ readonly is: "control-ring line-solid colour-accent";
83
+ }, {
84
+ readonly property: "outlineOffset";
85
+ readonly is: "control-ring-offset";
86
+ }];
87
+ }, {
88
+ readonly when: readonly ["loading"];
89
+ readonly sets: readonly [{
90
+ readonly property: "opacity";
91
+ readonly is: "opacity-muted";
92
+ }];
93
+ }, {
94
+ readonly when: readonly ["disabled"];
95
+ readonly sets: readonly [{
96
+ readonly property: "cursor";
97
+ readonly is: "cursor-refuse";
98
+ }, {
99
+ readonly property: "borderColor";
100
+ readonly is: "colour-edge";
101
+ }, {
102
+ readonly property: "color";
103
+ readonly is: "colour-ink-faint";
104
+ }];
105
+ }, {
106
+ readonly when: readonly ["disabled", "hover"];
107
+ readonly sets: readonly [{
108
+ readonly property: "background";
109
+ readonly is: "colour-clear";
110
+ }, {
111
+ readonly property: "transform";
112
+ readonly is: "transform-rest";
113
+ }];
114
+ }];
115
+ readonly reacts: readonly ["active", "disabled", "focus", "hover", "loading"];
116
+ };
@@ -0,0 +1,75 @@
1
+ import { variant } from "../variant.js";
2
+ export const BUTTON_BORDER = variant({
3
+ id: 'button-border',
4
+ type: 'label',
5
+ icon: 'md',
6
+ sets: [
7
+ { property: 'display', is: 'layout-flex' },
8
+ { property: 'alignItems', is: 'align-centre' },
9
+ { property: 'justifyContent', is: 'align-centre' },
10
+ { property: 'borderRadius', is: 'control-radius' },
11
+ { property: 'height', is: 'control-md' },
12
+ { property: 'padding', is: 'control-pad-y control-pad-x' },
13
+ { property: 'gap', is: 'control-gap' },
14
+ { property: 'cursor', is: 'cursor-press' },
15
+ { property: 'transition', is: 'motion-quick ease-out' },
16
+ { property: 'background', is: 'colour-clear' },
17
+ { property: 'color', is: 'colour-accent' },
18
+ { property: 'borderWidth', is: 'control-edge' },
19
+ { property: 'borderStyle', is: 'line-solid' },
20
+ { property: 'borderColor', is: 'colour-accent' },
21
+ { property: 'boxShadow', is: 'shadow-0' },
22
+ ],
23
+ states: [
24
+ {
25
+ when: ['hover'],
26
+ sets: [
27
+ { property: 'background', is: 'colour-surface-lit' },
28
+ { property: 'transform', is: 'transform-lift' },
29
+ ],
30
+ },
31
+ {
32
+ when: ['active'],
33
+ sets: [
34
+ { property: 'background', is: 'colour-surface-lit' },
35
+ { property: 'transform', is: 'transform-press' },
36
+ ],
37
+ },
38
+ {
39
+ when: ['active', 'hover'],
40
+ sets: [
41
+ { property: 'background', is: 'colour-surface-lit' },
42
+ { property: 'transform', is: 'transform-press' },
43
+ ],
44
+ },
45
+ {
46
+ when: ['focus'],
47
+ sets: [
48
+ { property: 'outline', is: 'control-ring line-solid colour-accent' },
49
+ { property: 'outlineOffset', is: 'control-ring-offset' },
50
+ ],
51
+ },
52
+ {
53
+ when: ['loading'],
54
+ sets: [
55
+ { property: 'opacity', is: 'opacity-muted' },
56
+ ],
57
+ },
58
+ {
59
+ when: ['disabled'],
60
+ sets: [
61
+ { property: 'cursor', is: 'cursor-refuse' },
62
+ { property: 'borderColor', is: 'colour-edge' },
63
+ { property: 'color', is: 'colour-ink-faint' },
64
+ ],
65
+ },
66
+ {
67
+ when: ['disabled', 'hover'],
68
+ sets: [
69
+ { property: 'background', is: 'colour-clear' },
70
+ { property: 'transform', is: 'transform-rest' },
71
+ ],
72
+ },
73
+ ],
74
+ reacts: ['active', 'disabled', 'focus', 'hover', 'loading'],
75
+ });