@yewdiel21/motion-kit 0.9.1 → 0.14.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 (458) hide show
  1. package/README.md +72 -0
  2. package/dist/auto/index.d.ts +72 -3
  3. package/dist/auto/index.js +139 -3
  4. package/dist/auto/index.js.map +1 -1
  5. package/dist/{chunk-BFC27F2G.js → chunk-6P4P7NU6.js} +2 -218
  6. package/dist/chunk-6P4P7NU6.js.map +1 -0
  7. package/dist/chunk-CU6SXW3E.js +20334 -0
  8. package/dist/chunk-CU6SXW3E.js.map +1 -0
  9. package/dist/{chunk-XDWBVFHQ.js → chunk-EY4BJKC4.js} +1203 -29
  10. package/dist/chunk-EY4BJKC4.js.map +1 -0
  11. package/dist/chunk-QP4QJOEN.js +72 -0
  12. package/dist/chunk-QP4QJOEN.js.map +1 -0
  13. package/dist/css/components/activity-feed.css +240 -0
  14. package/dist/css/components/attachment.css +266 -0
  15. package/dist/css/components/breadcrumb.css +110 -0
  16. package/dist/css/components/calendar.css +159 -0
  17. package/dist/css/components/chart-tooltip.css +168 -0
  18. package/dist/css/components/chart.css +296 -0
  19. package/dist/css/components/code-block.css +264 -0
  20. package/dist/css/components/color-area.css +82 -0
  21. package/dist/css/components/color-field.css +67 -0
  22. package/dist/css/components/color-picker.css +131 -0
  23. package/dist/css/components/color-slider.css +113 -0
  24. package/dist/css/components/command-search.css +252 -0
  25. package/dist/css/components/context-menu.css +23 -0
  26. package/dist/css/components/credit-card.css +288 -0
  27. package/dist/css/components/data-table.css +591 -0
  28. package/dist/css/components/date-range-picker.css +168 -0
  29. package/dist/css/components/date-time-picker.css +178 -0
  30. package/dist/css/components/drawer.css +58 -0
  31. package/dist/css/components/editable-table.css +201 -0
  32. package/dist/css/components/empty-state.css +61 -0
  33. package/dist/css/components/file-explorer.css +633 -0
  34. package/dist/css/components/filter-builder.css +232 -0
  35. package/dist/css/components/hold-confirm.css +87 -0
  36. package/dist/css/components/hover-card.css +20 -0
  37. package/dist/css/components/image-preview.css +195 -0
  38. package/dist/css/components/input-otp.css +10 -0
  39. package/dist/css/components/json-viewer.css +272 -0
  40. package/dist/css/components/like-button.css +78 -0
  41. package/dist/css/components/link-preview.css +275 -0
  42. package/dist/css/components/loading-button.css +77 -0
  43. package/dist/css/components/multi-select.css +267 -0
  44. package/dist/css/components/notification-bell.css +127 -0
  45. package/dist/css/components/pagination.css +11 -0
  46. package/dist/css/components/password-strength.css +183 -0
  47. package/dist/css/components/popover.css +25 -0
  48. package/dist/css/components/progress.css +140 -0
  49. package/dist/css/components/quantity.css +16 -0
  50. package/dist/css/components/questionnaire.css +217 -0
  51. package/dist/css/components/range-calendar.css +186 -0
  52. package/dist/css/components/range-slider.css +192 -0
  53. package/dist/css/components/resizable-panel.css +243 -0
  54. package/dist/css/components/rich-text-editor.css +284 -0
  55. package/dist/css/components/scratch-card.css +75 -0
  56. package/dist/css/components/skeleton.css +108 -0
  57. package/dist/css/components/slot-picker.css +126 -0
  58. package/dist/css/components/split-view.css +19 -0
  59. package/dist/css/components/star-rating.css +80 -0
  60. package/dist/css/components/stat-card.css +164 -0
  61. package/dist/css/components/studio-dock.css +35 -0
  62. package/dist/css/components/swipe-actions.css +105 -0
  63. package/dist/css/components/tag-input.css +244 -0
  64. package/dist/css/components/time-field.css +88 -0
  65. package/dist/css/components/timeline.css +219 -0
  66. package/dist/css/components/tooltip.css +79 -0
  67. package/dist/css/components/trailer.css +37 -0
  68. package/dist/css/components/tree-view.css +210 -0
  69. package/dist/css/components/virtual-list.css +195 -0
  70. package/dist/css/controls.css +65 -0
  71. package/dist/css/tokens.css +185 -181
  72. package/dist/elements/index.d.ts +742 -5
  73. package/dist/elements/index.js +1527 -8
  74. package/dist/elements/index.js.map +1 -1
  75. package/dist/{engine-GDGwQnJE.d.ts → engine-Cn6IhE3z.d.ts} +1 -1
  76. package/dist/engine-QECQnGz1.d.ts +33 -0
  77. package/dist/index.css +10113 -181
  78. package/dist/index.d.ts +89 -5
  79. package/dist/index.js +285 -9
  80. package/dist/index.js.map +1 -1
  81. package/dist/react/index.d.ts +678 -23
  82. package/dist/react/index.js +2389 -7
  83. package/dist/react/index.js.map +1 -1
  84. package/dist/{reduced-B98f8LPs.d.ts → reduced-BBUusld6.d.ts} +206 -2
  85. package/dist/reveal-DEvp6U6T.d.ts +2381 -0
  86. package/dist/{store-pHiUvxP8.d.ts → store-DjkTBX7f.d.ts} +2 -2
  87. package/package.json +1 -1
  88. package/registry.json +583 -104
  89. package/skills/motion-kit/SKILL.md +209 -189
  90. package/src/auto/auto-init.ts +136 -0
  91. package/src/components/activity-feed/README.md +56 -0
  92. package/src/components/activity-feed/activity-feed.css +239 -0
  93. package/src/components/activity-feed/element.ts +36 -0
  94. package/src/components/activity-feed/engine.ts +351 -0
  95. package/src/components/activity-feed/react.tsx +32 -0
  96. package/src/components/attachment/README.md +27 -0
  97. package/src/components/attachment/attachment.css +265 -0
  98. package/src/components/attachment/element.ts +50 -0
  99. package/src/components/attachment/engine.ts +469 -0
  100. package/src/components/attachment/react.tsx +65 -0
  101. package/src/components/breadcrumb/README.md +38 -0
  102. package/src/components/breadcrumb/breadcrumb.css +109 -0
  103. package/src/components/breadcrumb/element.ts +27 -0
  104. package/src/components/breadcrumb/engine.ts +249 -0
  105. package/src/components/breadcrumb/react.tsx +30 -0
  106. package/src/components/calendar/README.md +82 -0
  107. package/src/components/calendar/calendar.css +158 -0
  108. package/src/components/calendar/element.ts +27 -0
  109. package/src/components/calendar/engine.ts +412 -0
  110. package/src/components/calendar/react.tsx +69 -0
  111. package/src/components/chart/README.md +24 -0
  112. package/src/components/chart/chart.css +295 -0
  113. package/src/components/chart/element.ts +41 -0
  114. package/src/components/chart/engine.ts +811 -0
  115. package/src/components/chart/react.tsx +50 -0
  116. package/src/components/chart-tooltip/README.md +53 -0
  117. package/src/components/chart-tooltip/chart-tooltip.css +167 -0
  118. package/src/components/chart-tooltip/element.ts +37 -0
  119. package/src/components/chart-tooltip/engine.ts +442 -0
  120. package/src/components/chart-tooltip/react.tsx +47 -0
  121. package/src/components/code-block/README.md +19 -0
  122. package/src/components/code-block/code-block.css +263 -0
  123. package/src/components/code-block/element.ts +34 -0
  124. package/src/components/code-block/engine.ts +254 -0
  125. package/src/components/code-block/highlight.ts +244 -0
  126. package/src/components/code-block/react.tsx +94 -0
  127. package/src/components/color-area/README.md +50 -0
  128. package/src/components/color-area/color-area.css +81 -0
  129. package/src/components/color-area/element.ts +26 -0
  130. package/src/components/color-area/engine.ts +246 -0
  131. package/src/components/color-area/react.tsx +42 -0
  132. package/src/components/color-field/README.md +43 -0
  133. package/src/components/color-field/color-field.css +66 -0
  134. package/src/components/color-field/element.ts +26 -0
  135. package/src/components/color-field/engine.ts +174 -0
  136. package/src/components/color-field/react.tsx +42 -0
  137. package/src/components/color-picker/README.md +45 -0
  138. package/src/components/color-picker/color-picker.css +130 -0
  139. package/src/components/color-picker/element.ts +45 -0
  140. package/src/components/color-picker/engine.ts +314 -0
  141. package/src/components/color-picker/react.tsx +47 -0
  142. package/src/components/color-slider/README.md +55 -0
  143. package/src/components/color-slider/color-slider.css +112 -0
  144. package/src/components/color-slider/element.ts +26 -0
  145. package/src/components/color-slider/engine.ts +234 -0
  146. package/src/components/color-slider/react.tsx +45 -0
  147. package/src/components/command-search/README.md +15 -0
  148. package/src/components/command-search/command-search.css +251 -0
  149. package/src/components/command-search/element.ts +36 -0
  150. package/src/components/command-search/engine.ts +356 -0
  151. package/src/components/command-search/match.ts +53 -0
  152. package/src/components/command-search/react.tsx +66 -0
  153. package/src/components/context-menu/README.md +31 -0
  154. package/src/components/context-menu/context-menu.css +22 -0
  155. package/src/components/context-menu/element.ts +40 -0
  156. package/src/components/context-menu/engine.ts +153 -0
  157. package/src/components/context-menu/react.tsx +57 -0
  158. package/src/components/credit-card/README.md +20 -0
  159. package/src/components/credit-card/card.ts +77 -0
  160. package/src/components/credit-card/credit-card.css +287 -0
  161. package/src/components/credit-card/element.ts +33 -0
  162. package/src/components/credit-card/engine.ts +410 -0
  163. package/src/components/credit-card/react.tsx +36 -0
  164. package/src/components/data-table/README.md +83 -0
  165. package/src/components/data-table/data-table.css +590 -0
  166. package/src/components/data-table/element.ts +54 -0
  167. package/src/components/data-table/engine.ts +1059 -0
  168. package/src/components/data-table/react.tsx +94 -0
  169. package/src/components/date-range-picker/README.md +51 -0
  170. package/src/components/date-range-picker/date-range-picker.css +167 -0
  171. package/src/components/date-range-picker/element.ts +52 -0
  172. package/src/components/date-range-picker/engine.ts +352 -0
  173. package/src/components/date-range-picker/react.tsx +57 -0
  174. package/src/components/date-time-picker/README.md +48 -0
  175. package/src/components/date-time-picker/date-time-picker.css +177 -0
  176. package/src/components/date-time-picker/element.ts +47 -0
  177. package/src/components/date-time-picker/engine.ts +350 -0
  178. package/src/components/date-time-picker/react.tsx +54 -0
  179. package/src/components/dialog/README.md +103 -102
  180. package/src/components/dialog/element.ts +123 -118
  181. package/src/components/dialog/engine.ts +449 -432
  182. package/src/components/drawer/README.md +28 -0
  183. package/src/components/drawer/drawer.css +57 -0
  184. package/src/components/drawer/element.ts +21 -0
  185. package/src/components/drawer/engine.ts +56 -0
  186. package/src/components/drawer/react.tsx +85 -0
  187. package/src/components/editable-table/README.md +67 -0
  188. package/src/components/editable-table/editable-table.css +200 -0
  189. package/src/components/editable-table/element.ts +45 -0
  190. package/src/components/editable-table/engine.ts +775 -0
  191. package/src/components/editable-table/react.tsx +79 -0
  192. package/src/components/empty-state/README.md +41 -0
  193. package/src/components/empty-state/element.ts +23 -0
  194. package/src/components/empty-state/empty-state.css +60 -0
  195. package/src/components/empty-state/engine.ts +232 -0
  196. package/src/components/empty-state/react.tsx +34 -0
  197. package/src/components/file-explorer/README.md +67 -0
  198. package/src/components/file-explorer/element.ts +39 -0
  199. package/src/components/file-explorer/engine.ts +1307 -0
  200. package/src/components/file-explorer/file-explorer.css +632 -0
  201. package/src/components/file-explorer/react.tsx +77 -0
  202. package/src/components/filter-builder/README.md +47 -0
  203. package/src/components/filter-builder/element.ts +34 -0
  204. package/src/components/filter-builder/engine.ts +365 -0
  205. package/src/components/filter-builder/filter-builder.css +231 -0
  206. package/src/components/filter-builder/react.tsx +36 -0
  207. package/src/components/hold-confirm/README.md +13 -0
  208. package/src/components/hold-confirm/element.ts +24 -0
  209. package/src/components/hold-confirm/engine.ts +216 -0
  210. package/src/components/hold-confirm/hold-confirm.css +86 -0
  211. package/src/components/hold-confirm/react.tsx +28 -0
  212. package/src/components/hover-card/README.md +20 -0
  213. package/src/components/hover-card/element.ts +8 -0
  214. package/src/components/hover-card/engine.ts +131 -0
  215. package/src/components/hover-card/hover-card.css +19 -0
  216. package/src/components/hover-card/react.tsx +19 -0
  217. package/src/components/image-preview/README.md +16 -0
  218. package/src/components/image-preview/element.ts +26 -0
  219. package/src/components/image-preview/engine.ts +325 -0
  220. package/src/components/image-preview/image-preview.css +194 -0
  221. package/src/components/image-preview/react.tsx +43 -0
  222. package/src/components/input-otp/README.md +18 -0
  223. package/src/components/input-otp/element.ts +14 -0
  224. package/src/components/input-otp/engine.ts +106 -0
  225. package/src/components/input-otp/input-otp.css +9 -0
  226. package/src/components/input-otp/react.tsx +21 -0
  227. package/src/components/json-viewer/README.md +56 -0
  228. package/src/components/json-viewer/element.ts +37 -0
  229. package/src/components/json-viewer/engine.ts +440 -0
  230. package/src/components/json-viewer/json-viewer.css +271 -0
  231. package/src/components/json-viewer/react.tsx +56 -0
  232. package/src/components/like-button/README.md +13 -0
  233. package/src/components/like-button/element.ts +47 -0
  234. package/src/components/like-button/engine.ts +145 -0
  235. package/src/components/like-button/like-button.css +77 -0
  236. package/src/components/like-button/react.tsx +39 -0
  237. package/src/components/link-preview/README.md +19 -0
  238. package/src/components/link-preview/element.ts +29 -0
  239. package/src/components/link-preview/engine.ts +192 -0
  240. package/src/components/link-preview/link-preview.css +274 -0
  241. package/src/components/link-preview/react.tsx +101 -0
  242. package/src/components/loading-button/README.md +45 -0
  243. package/src/components/loading-button/element.ts +34 -0
  244. package/src/components/loading-button/engine.ts +201 -0
  245. package/src/components/loading-button/loading-button.css +76 -0
  246. package/src/components/loading-button/react.tsx +43 -0
  247. package/src/components/multi-select/README.md +48 -0
  248. package/src/components/multi-select/element.ts +28 -0
  249. package/src/components/multi-select/engine.ts +294 -0
  250. package/src/components/multi-select/multi-select.css +266 -0
  251. package/src/components/multi-select/react.tsx +39 -0
  252. package/src/components/notification-bell/README.md +14 -0
  253. package/src/components/notification-bell/element.ts +48 -0
  254. package/src/components/notification-bell/engine.ts +202 -0
  255. package/src/components/notification-bell/notification-bell.css +126 -0
  256. package/src/components/notification-bell/react.tsx +57 -0
  257. package/src/components/pagination/README.md +17 -0
  258. package/src/components/pagination/element.ts +14 -0
  259. package/src/components/pagination/engine.ts +102 -0
  260. package/src/components/pagination/pagination.css +10 -0
  261. package/src/components/pagination/react.tsx +22 -0
  262. package/src/components/password-strength/README.md +17 -0
  263. package/src/components/password-strength/element.ts +22 -0
  264. package/src/components/password-strength/engine.ts +212 -0
  265. package/src/components/password-strength/password-strength.css +182 -0
  266. package/src/components/password-strength/react.tsx +36 -0
  267. package/src/components/password-strength/score.ts +62 -0
  268. package/src/components/popover/README.md +44 -0
  269. package/src/components/popover/element.ts +31 -0
  270. package/src/components/popover/engine.ts +114 -0
  271. package/src/components/popover/popover.css +24 -0
  272. package/src/components/popover/react.tsx +50 -0
  273. package/src/components/progress/README.md +17 -0
  274. package/src/components/progress/element.ts +30 -0
  275. package/src/components/progress/engine.ts +173 -0
  276. package/src/components/progress/progress.css +139 -0
  277. package/src/components/progress/react.tsx +35 -0
  278. package/src/components/quantity/README.md +20 -0
  279. package/src/components/quantity/element.ts +14 -0
  280. package/src/components/quantity/engine.ts +85 -0
  281. package/src/components/quantity/quantity.css +15 -0
  282. package/src/components/quantity/react.tsx +21 -0
  283. package/src/components/questionnaire/README.md +32 -0
  284. package/src/components/questionnaire/element.ts +118 -0
  285. package/src/components/questionnaire/engine.ts +255 -0
  286. package/src/components/questionnaire/questionnaire.css +216 -0
  287. package/src/components/questionnaire/react.tsx +140 -0
  288. package/src/components/range-calendar/README.md +58 -0
  289. package/src/components/range-calendar/element.ts +42 -0
  290. package/src/components/range-calendar/engine.ts +390 -0
  291. package/src/components/range-calendar/range-calendar.css +185 -0
  292. package/src/components/range-calendar/react.tsx +56 -0
  293. package/src/components/range-slider/README.md +23 -0
  294. package/src/components/range-slider/element.ts +53 -0
  295. package/src/components/range-slider/engine.ts +316 -0
  296. package/src/components/range-slider/range-slider.css +191 -0
  297. package/src/components/range-slider/react.tsx +66 -0
  298. package/src/components/resizable-panel/README.md +61 -0
  299. package/src/components/resizable-panel/element.ts +36 -0
  300. package/src/components/resizable-panel/engine.ts +551 -0
  301. package/src/components/resizable-panel/react.tsx +74 -0
  302. package/src/components/resizable-panel/resizable-panel.css +242 -0
  303. package/src/components/rich-text-editor/README.md +57 -0
  304. package/src/components/rich-text-editor/element.ts +34 -0
  305. package/src/components/rich-text-editor/engine.ts +673 -0
  306. package/src/components/rich-text-editor/react.tsx +60 -0
  307. package/src/components/rich-text-editor/rich-text-editor.css +283 -0
  308. package/src/components/scratch-card/README.md +15 -0
  309. package/src/components/scratch-card/element.ts +30 -0
  310. package/src/components/scratch-card/engine.ts +257 -0
  311. package/src/components/scratch-card/react.tsx +40 -0
  312. package/src/components/scratch-card/scratch-card.css +74 -0
  313. package/src/components/skeleton/README.md +15 -0
  314. package/src/components/skeleton/element.ts +32 -0
  315. package/src/components/skeleton/engine.ts +104 -0
  316. package/src/components/skeleton/react.tsx +41 -0
  317. package/src/components/skeleton/skeleton.css +107 -0
  318. package/src/components/slot-picker/README.md +68 -0
  319. package/src/components/slot-picker/element.ts +27 -0
  320. package/src/components/slot-picker/engine.ts +412 -0
  321. package/src/components/slot-picker/react.tsx +76 -0
  322. package/src/components/slot-picker/slot-picker.css +125 -0
  323. package/src/components/split-view/README.md +50 -0
  324. package/src/components/split-view/element.ts +34 -0
  325. package/src/components/split-view/engine.ts +114 -0
  326. package/src/components/split-view/react.tsx +63 -0
  327. package/src/components/split-view/split-view.css +18 -0
  328. package/src/components/star-rating/README.md +14 -0
  329. package/src/components/star-rating/element.ts +26 -0
  330. package/src/components/star-rating/engine.ts +217 -0
  331. package/src/components/star-rating/react.tsx +33 -0
  332. package/src/components/star-rating/star-rating.css +79 -0
  333. package/src/components/stat-card/README.md +42 -0
  334. package/src/components/stat-card/element.ts +40 -0
  335. package/src/components/stat-card/engine.ts +283 -0
  336. package/src/components/stat-card/react.tsx +36 -0
  337. package/src/components/stat-card/stat-card.css +163 -0
  338. package/src/components/studio-dock/README.md +44 -0
  339. package/src/components/studio-dock/element.ts +11 -0
  340. package/src/components/studio-dock/engine.ts +212 -0
  341. package/src/components/studio-dock/react.tsx +23 -0
  342. package/src/components/studio-dock/studio-dock.css +34 -0
  343. package/src/components/swipe-actions/README.md +19 -0
  344. package/src/components/swipe-actions/element.ts +26 -0
  345. package/src/components/swipe-actions/engine.ts +260 -0
  346. package/src/components/swipe-actions/react.tsx +80 -0
  347. package/src/components/swipe-actions/swipe-actions.css +104 -0
  348. package/src/components/tag-input/README.md +42 -0
  349. package/src/components/tag-input/element.ts +39 -0
  350. package/src/components/tag-input/engine.ts +313 -0
  351. package/src/components/tag-input/react.tsx +54 -0
  352. package/src/components/tag-input/tag-input.css +243 -0
  353. package/src/components/time-field/README.md +54 -0
  354. package/src/components/time-field/element.ts +38 -0
  355. package/src/components/time-field/engine.ts +110 -0
  356. package/src/components/time-field/react.tsx +45 -0
  357. package/src/components/time-field/time-field.css +87 -0
  358. package/src/components/timeline/README.md +57 -0
  359. package/src/components/timeline/element.ts +31 -0
  360. package/src/components/timeline/engine.ts +300 -0
  361. package/src/components/timeline/react.tsx +59 -0
  362. package/src/components/timeline/timeline.css +218 -0
  363. package/src/components/tooltip/README.md +46 -0
  364. package/src/components/tooltip/element.ts +22 -0
  365. package/src/components/tooltip/engine.ts +288 -0
  366. package/src/components/tooltip/react.tsx +30 -0
  367. package/src/components/tooltip/tooltip.css +78 -0
  368. package/src/components/trailer/README.md +28 -0
  369. package/src/components/trailer/element.ts +13 -0
  370. package/src/components/trailer/engine.ts +189 -0
  371. package/src/components/trailer/react.tsx +16 -0
  372. package/src/components/trailer/trailer.css +36 -0
  373. package/src/components/tree-view/README.md +61 -0
  374. package/src/components/tree-view/element.ts +32 -0
  375. package/src/components/tree-view/engine.ts +569 -0
  376. package/src/components/tree-view/react.tsx +78 -0
  377. package/src/components/tree-view/tree-view.css +209 -0
  378. package/src/components/virtual-list/README.md +81 -0
  379. package/src/components/virtual-list/element.ts +42 -0
  380. package/src/components/virtual-list/engine.ts +678 -0
  381. package/src/components/virtual-list/react.tsx +101 -0
  382. package/src/components/virtual-list/virtual-list.css +194 -0
  383. package/src/core/chips.ts +196 -0
  384. package/src/core/color.ts +304 -0
  385. package/src/core/date-range.ts +67 -0
  386. package/src/core/dates.ts +108 -0
  387. package/src/core/files.ts +107 -0
  388. package/src/core/filter.ts +229 -0
  389. package/src/core/gsap.ts +80 -65
  390. package/src/core/listbox.ts +332 -0
  391. package/src/core/mark.ts +29 -0
  392. package/src/core/position.ts +89 -0
  393. package/src/core/relative-time.ts +77 -0
  394. package/src/core/segment-field.ts +373 -0
  395. package/src/core/segments.ts +153 -0
  396. package/src/core/tree.ts +116 -0
  397. package/src/core/virtual.ts +79 -0
  398. package/src/css/controls/README.md +14 -0
  399. package/src/css/controls/status.css +63 -0
  400. package/src/css/tokens.css +186 -182
  401. package/src/elements/index.ts +171 -0
  402. package/src/index.ts +97 -0
  403. package/src/motion/micro.ts +248 -0
  404. package/src/motion/sheet.ts +88 -65
  405. package/src/motion/surface.ts +9 -0
  406. package/src/react/index.ts +78 -0
  407. package/src/react/use-action-button.ts +6 -0
  408. package/src/react/use-editorial-reveal.ts +7 -0
  409. package/src/react/use-film-hero.ts +6 -0
  410. package/src/react/use-font-cycle.ts +7 -0
  411. package/src/react/use-image-zoom.ts +5 -0
  412. package/src/react/use-joined-cta.ts +5 -0
  413. package/src/react/use-local-clock.ts +5 -0
  414. package/src/react/use-scroll-dock.ts +5 -0
  415. package/src/react/use-sticker.ts +5 -0
  416. package/src/react/use-studio-dock.ts +8 -0
  417. package/src/react/use-thumbnail-nav.ts +7 -0
  418. package/src/react/use-trailer.ts +6 -0
  419. package/src/react/use-weight-hover.ts +5 -0
  420. package/src/recipes/action-button/README.md +31 -0
  421. package/src/recipes/action-button/action-button.css +113 -0
  422. package/src/recipes/action-button/create-action-button.ts +56 -0
  423. package/src/recipes/editorial-reveal/README.md +35 -0
  424. package/src/recipes/editorial-reveal/create-editorial-reveal.ts +91 -0
  425. package/src/recipes/editorial-reveal/editorial-reveal.css +17 -0
  426. package/src/recipes/film-hero/README.md +23 -0
  427. package/src/recipes/film-hero/create-film-hero.ts +65 -0
  428. package/src/recipes/film-hero/film-hero.css +29 -0
  429. package/src/recipes/font-cycle/README.md +11 -0
  430. package/src/recipes/font-cycle/create-font-cycle.ts +126 -0
  431. package/src/recipes/font-cycle/font-cycle.css +36 -0
  432. package/src/recipes/image-zoom/README.md +16 -0
  433. package/src/recipes/image-zoom/create-image-zoom.ts +27 -0
  434. package/src/recipes/image-zoom/image-zoom.css +7 -0
  435. package/src/recipes/joined-cta/README.md +13 -0
  436. package/src/recipes/joined-cta/create-joined-cta.ts +22 -0
  437. package/src/recipes/joined-cta/joined-cta.css +17 -0
  438. package/src/recipes/local-clock/README.md +31 -0
  439. package/src/recipes/local-clock/create-local-clock.ts +61 -0
  440. package/src/recipes/scroll-dock/README.md +46 -0
  441. package/src/recipes/scroll-dock/create-scroll-dock.ts +72 -0
  442. package/src/recipes/scroll-dock/scroll-dock.css +70 -0
  443. package/src/recipes/sticker/README.md +59 -0
  444. package/src/recipes/sticker/create-sticker.ts +490 -0
  445. package/src/recipes/sticker/sticker.css +112 -0
  446. package/src/recipes/thumbnail-nav/README.md +16 -0
  447. package/src/recipes/thumbnail-nav/create-thumbnail-nav.ts +165 -0
  448. package/src/recipes/thumbnail-nav/thumbnail-nav.css +108 -0
  449. package/src/recipes/weight-hover/README.md +37 -0
  450. package/src/recipes/weight-hover/create-weight-hover.ts +136 -0
  451. package/src/recipes/weight-hover/weight-hover.css +7 -0
  452. package/dist/chunk-BFC27F2G.js.map +0 -1
  453. package/dist/chunk-J6OCFNGU.js +0 -177
  454. package/dist/chunk-J6OCFNGU.js.map +0 -1
  455. package/dist/chunk-JQMJQSXD.js +0 -2374
  456. package/dist/chunk-JQMJQSXD.js.map +0 -1
  457. package/dist/chunk-XDWBVFHQ.js.map +0 -1
  458. package/dist/reveal-C0hCDcB_.d.ts +0 -415
@@ -0,0 +1,272 @@
1
+ /* components/json-viewer/json-viewer.css */
2
+ /* json-viewer — the tree in a monospace face inside a 12 px box on surface-2: keys in the text colour, a muted colon,
3
+ values by type (strings green, numbers blue, booleans violet, null muted and italic; colours with a swatch), objects
4
+ and lists as muted brackets and a count. Rows are 1.875rem; the copy button shows on hover or focus (always on touch
5
+ screens). A bar above (search, expand, collapse, copy) and the selected path below. Values that change flash in the
6
+ accent; new keys come in out of a blur. Give it a height with --mk-jv-height. */
7
+ .mk-json-viewer,
8
+ mk-json-viewer {
9
+ --mk-jv-height: none;
10
+ --mk-jv-string: #187a47;
11
+ --mk-jv-number: #2d5fc4;
12
+ --mk-jv-boolean: #8a3fc8;
13
+ display: grid;
14
+ gap: 0.5rem;
15
+ min-width: 0;
16
+ color: var(--mk-text);
17
+ font-family: var(--mk-font-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
18
+ font-size: 0.8125rem;
19
+ }
20
+
21
+ @media (prefers-color-scheme: dark) {
22
+ :where(:root:not([data-mk-mode='light'])) :is(.mk-json-viewer, mk-json-viewer) {
23
+ --mk-jv-string: #62d39b;
24
+ --mk-jv-number: #8db5ff;
25
+ --mk-jv-boolean: #cba0ff;
26
+ }
27
+ }
28
+
29
+ :where(:root[data-mk-mode='dark']) :is(.mk-json-viewer, mk-json-viewer) {
30
+ --mk-jv-string: #62d39b;
31
+ --mk-jv-number: #8db5ff;
32
+ --mk-jv-boolean: #cba0ff;
33
+ }
34
+
35
+ [data-mk-jv-bar] {
36
+ display: flex;
37
+ align-items: center;
38
+ gap: 0.5rem;
39
+ min-width: 0;
40
+ }
41
+
42
+ [data-mk-jv-search] {
43
+ box-sizing: border-box;
44
+ flex: 1 1 auto;
45
+ min-width: 0;
46
+ height: 2.25rem;
47
+ padding: 0 0.75rem;
48
+ border: 0;
49
+ border-radius: 12px;
50
+ outline: none;
51
+ background: var(--mk-surface-3);
52
+ color: inherit;
53
+ font: inherit;
54
+ }
55
+
56
+ [data-mk-jv-search]:focus-visible {
57
+ box-shadow: 0 0 0 3px color-mix(in srgb, var(--mk-accent) 35%, transparent);
58
+ }
59
+
60
+ [data-mk-jv-tools] {
61
+ display: flex;
62
+ flex: none;
63
+ gap: 0.125rem;
64
+ margin-left: auto;
65
+ }
66
+
67
+ [data-mk-jv-tool],
68
+ [data-mk-jv-copy] {
69
+ display: inline-grid;
70
+ flex: none;
71
+ place-items: center;
72
+ width: 2rem;
73
+ height: 2rem;
74
+ padding: 0;
75
+ border: 0;
76
+ border-radius: 8px;
77
+ background: transparent;
78
+ color: var(--mk-muted);
79
+ cursor: pointer;
80
+ transition:
81
+ background-color 0.15s,
82
+ color 0.15s,
83
+ opacity 0.15s;
84
+ }
85
+
86
+ [data-mk-jv-tool]:hover,
87
+ [data-mk-jv-copy]:hover {
88
+ background: color-mix(in srgb, var(--mk-text) 8%, transparent);
89
+ color: var(--mk-text);
90
+ }
91
+
92
+ [data-mk-jv-tool]:focus-visible {
93
+ outline: 2px solid var(--mk-accent);
94
+ outline-offset: 1px;
95
+ }
96
+
97
+ [data-mk-jv-tool][data-mk-copied],
98
+ [data-mk-jv-copy][data-mk-copied] {
99
+ color: var(--mk-accent);
100
+ opacity: 1;
101
+ }
102
+
103
+ [data-mk-jv-tree] {
104
+ max-height: var(--mk-jv-height);
105
+ overflow: auto;
106
+ padding: 0.375rem;
107
+ border: 1px solid var(--mk-outline-soft);
108
+ border-radius: 12px;
109
+ background: var(--mk-surface-2);
110
+ overscroll-behavior: contain;
111
+ }
112
+
113
+ [data-mk-jv-tree] [data-mk-tree-row] {
114
+ min-height: 1.875rem;
115
+ padding-right: 0.25rem;
116
+ }
117
+
118
+ [data-mk-jv-tree] [data-mk-tree-label] {
119
+ display: flex;
120
+ align-items: center;
121
+ gap: 0.375rem;
122
+ }
123
+
124
+ [data-mk-jv-key] {
125
+ flex: 0 0 auto;
126
+ max-width: 45%;
127
+ overflow: hidden;
128
+ text-overflow: ellipsis;
129
+ }
130
+
131
+ [data-mk-jv-key='name'] {
132
+ font-weight: 600;
133
+ }
134
+
135
+ [data-mk-jv-key='index'] {
136
+ color: var(--mk-muted);
137
+ }
138
+
139
+ [data-mk-jv-colon] {
140
+ flex: none;
141
+ margin-left: -0.375rem;
142
+ color: var(--mk-muted);
143
+ }
144
+
145
+ [data-mk-jv-value] {
146
+ flex: 0 1 auto;
147
+ min-width: 0;
148
+ overflow: hidden;
149
+ border-radius: 4px;
150
+ text-overflow: ellipsis;
151
+ }
152
+
153
+ [data-mk-jv-value='string'] {
154
+ color: var(--mk-jv-string);
155
+ }
156
+
157
+ [data-mk-jv-value='number'] {
158
+ color: var(--mk-jv-number);
159
+ }
160
+
161
+ [data-mk-jv-value='boolean'] {
162
+ color: var(--mk-jv-boolean);
163
+ font-weight: 600;
164
+ }
165
+
166
+ [data-mk-jv-value='null'] {
167
+ color: var(--mk-muted);
168
+ font-style: italic;
169
+ }
170
+
171
+ [data-mk-jv-swatch] {
172
+ display: inline-block;
173
+ width: 0.75rem;
174
+ height: 0.75rem;
175
+ margin-right: 0.375rem;
176
+ border-radius: 4px;
177
+ box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--mk-text) 20%, transparent);
178
+ vertical-align: -0.1em;
179
+ }
180
+
181
+ [data-mk-jv-brackets] {
182
+ flex: none;
183
+ color: var(--mk-muted);
184
+ }
185
+
186
+ [data-mk-jv-summary] {
187
+ flex: 0 1 auto;
188
+ min-width: 0;
189
+ overflow: hidden;
190
+ color: var(--mk-muted);
191
+ font-size: 0.75rem;
192
+ text-overflow: ellipsis;
193
+ }
194
+
195
+ [data-mk-jv-copy] {
196
+ width: 1.625rem;
197
+ height: 1.625rem;
198
+ margin-left: auto;
199
+ border-radius: 6px;
200
+ opacity: 0;
201
+ }
202
+
203
+ [data-mk-tree-row]:hover [data-mk-jv-copy],
204
+ [role='treeitem']:focus-visible > [data-mk-tree-row] [data-mk-jv-copy] {
205
+ opacity: 1;
206
+ }
207
+
208
+ @media (hover: none) {
209
+ [data-mk-jv-copy] {
210
+ opacity: 0.7;
211
+ }
212
+ }
213
+
214
+ [data-mk-jv-changed] {
215
+ animation: mk-jv-flash 1.6s cubic-bezier(0.38, 0.49, 0, 1) both;
216
+ }
217
+
218
+ @keyframes mk-jv-flash {
219
+ 0%,
220
+ 30% {
221
+ background: color-mix(in srgb, var(--mk-accent) 26%, transparent);
222
+ box-shadow: 0 0 0 3px color-mix(in srgb, var(--mk-accent) 26%, transparent);
223
+ }
224
+
225
+ 100% {
226
+ background: transparent;
227
+ box-shadow: 0 0 0 3px transparent;
228
+ }
229
+ }
230
+
231
+ [data-mk-jv-added] {
232
+ animation: mk-jv-added 0.55s ease-out both;
233
+ }
234
+
235
+ @keyframes mk-jv-added {
236
+ from {
237
+ opacity: 0;
238
+ filter: blur(6px);
239
+ transform: translateX(-8px);
240
+ }
241
+ }
242
+
243
+ [data-mk-jv-foot] {
244
+ display: flex;
245
+ align-items: center;
246
+ gap: 0.25rem;
247
+ min-width: 0;
248
+ }
249
+
250
+ [data-mk-jv-foot][hidden] {
251
+ display: none;
252
+ }
253
+
254
+ [data-mk-jv-path] {
255
+ min-width: 0;
256
+ overflow: hidden;
257
+ padding: 0.25rem 0.5rem;
258
+ border-radius: 6px;
259
+ background: var(--mk-surface-3);
260
+ color: var(--mk-text);
261
+ font: inherit;
262
+ font-size: 0.75rem;
263
+ text-overflow: ellipsis;
264
+ white-space: nowrap;
265
+ }
266
+
267
+ @media (prefers-reduced-motion: reduce) {
268
+ [data-mk-jv-changed],
269
+ [data-mk-jv-added] {
270
+ animation: none;
271
+ }
272
+ }
@@ -0,0 +1,78 @@
1
+ /* components/like-button/like-button.css */
2
+ /* like-button — a Melonmind tonal pill with a heart and a count; liked, the heart fills with the like colour. */
3
+ .mk-like-button,
4
+ mk-like-button {
5
+ display: inline-flex;
6
+ }
7
+
8
+ [data-mk-like] {
9
+ --mk-like-color: #f43f5e;
10
+ --mk-like-color-2: #fb923c;
11
+ position: relative;
12
+ display: inline-flex;
13
+ align-items: center;
14
+ gap: 0.45rem;
15
+ min-height: 2.75rem;
16
+ padding: 0 1rem 0 0.8rem;
17
+ border: 0;
18
+ border-radius: 64px;
19
+ background: var(--mk-surface-3);
20
+ color: var(--mk-text);
21
+ font: inherit;
22
+ font-weight: 500;
23
+ font-variant-numeric: tabular-nums;
24
+ cursor: pointer;
25
+ transition:
26
+ background-color 0.2s ease,
27
+ padding 400ms cubic-bezier(0.38, 0.49, 0, 2);
28
+ }
29
+
30
+ [data-mk-like]:hover {
31
+ background: var(--mk-surface-4);
32
+ padding-inline: 0.95rem 1.15rem;
33
+ }
34
+
35
+ [data-mk-like][aria-pressed='true'] {
36
+ background: color-mix(in srgb, var(--mk-like-color) 14%, var(--mk-surface-3));
37
+ }
38
+
39
+ [data-mk-like]:focus-visible {
40
+ outline: 2px solid var(--mk-accent);
41
+ outline-offset: 3px;
42
+ }
43
+
44
+ [data-mk-like] [data-mk-like-icon] {
45
+ width: 1.5rem;
46
+ height: 1.5rem;
47
+ overflow: visible;
48
+ }
49
+
50
+ [data-mk-like] [data-mk-part='outline'] {
51
+ fill: none;
52
+ stroke: currentColor;
53
+ stroke-width: 1.8;
54
+ stroke-linejoin: round;
55
+ }
56
+
57
+ [data-mk-like] [data-mk-part='fill'] {
58
+ fill: var(--mk-like-color);
59
+ }
60
+
61
+ [data-mk-like][aria-pressed='true'] [data-mk-part='outline'] {
62
+ stroke: var(--mk-like-color);
63
+ }
64
+
65
+ [data-mk-like] [data-mk-like-count] {
66
+ display: inline-flex;
67
+ min-width: 1ch;
68
+ }
69
+
70
+ [data-mk-like] [data-mk-like-count][hidden] {
71
+ display: none;
72
+ }
73
+
74
+ @media (prefers-reduced-motion: reduce) {
75
+ [data-mk-like] {
76
+ transition: none;
77
+ }
78
+ }
@@ -0,0 +1,275 @@
1
+ /* components/link-preview/link-preview.css */
2
+ /* link-preview — Melonmind content box: a 24 px card with the image on top (16 px inner radius, 8 px inset), favicon and
3
+ site, a two-line title, the description and a round go button that springs on hover. Row: thumbnail beside the text.
4
+ Hover: the card in Melonmind's inverse glass popover. */
5
+ .mk-link-preview,
6
+ mk-link-preview {
7
+ --mk-link-radius: var(--mk-radius-lg, 24px);
8
+ --mk-link-inset: 8px;
9
+ --mk-link-thumb: 5.5rem;
10
+ display: block;
11
+ color: var(--mk-text);
12
+ font-family: var(--mk-font);
13
+ }
14
+
15
+ :is(.mk-link-preview, mk-link-preview)[data-mk-link-variant='hover'] {
16
+ display: inline-flex;
17
+ }
18
+
19
+ :is(.mk-link-preview, mk-link-preview) [data-mk-link-card] {
20
+ position: relative;
21
+ display: grid;
22
+ gap: 0;
23
+ padding: var(--mk-link-inset);
24
+ border-radius: var(--mk-link-radius);
25
+ background: var(--mk-surface-1);
26
+ box-shadow: inset 0 0 0 1px var(--mk-outline-soft);
27
+ color: inherit;
28
+ text-decoration: none;
29
+ transition:
30
+ translate 0.5s var(--mk-ease-signature, cubic-bezier(0.2, 0.8, 0.2, 1)),
31
+ box-shadow 0.3s ease;
32
+ }
33
+
34
+ :is(.mk-link-preview, mk-link-preview) a[data-mk-link-card]:hover {
35
+ translate: 0 -3px;
36
+ box-shadow:
37
+ inset 0 0 0 1px var(--mk-outline-soft),
38
+ 0 18px 40px -22px color-mix(in srgb, var(--mk-shadow-color) 45%, transparent);
39
+ }
40
+
41
+ :is(.mk-link-preview, mk-link-preview) a[data-mk-link-card]:active {
42
+ animation: mk-link-press 500ms cubic-bezier(0.37, 1.42, 0.37, 1);
43
+ }
44
+
45
+ :is(.mk-link-preview, mk-link-preview) a[data-mk-link-card]:focus-visible,
46
+ :is(.mk-link-preview, mk-link-preview) [data-mk-hover-trigger]:focus-visible {
47
+ outline: 2px solid var(--mk-accent);
48
+ outline-offset: 3px;
49
+ }
50
+
51
+ :is(.mk-link-preview, mk-link-preview) [data-mk-part='media'] {
52
+ position: relative;
53
+ display: grid;
54
+ place-items: center;
55
+ overflow: hidden;
56
+ aspect-ratio: 16 / 9;
57
+ border-radius: calc(var(--mk-link-radius) - var(--mk-link-inset));
58
+ background: var(--mk-surface-3);
59
+ color: var(--mk-muted);
60
+ }
61
+
62
+ :is(.mk-link-preview, mk-link-preview) [data-mk-part='fallback'] {
63
+ font-size: clamp(2rem, 8vw, 3.5rem);
64
+ font-weight: 500;
65
+ letter-spacing: -0.04em;
66
+ }
67
+
68
+ :is(.mk-link-preview, mk-link-preview) [data-mk-link-image] {
69
+ position: absolute;
70
+ inset: 0;
71
+ width: 100%;
72
+ height: 100%;
73
+ object-fit: cover;
74
+ transition: scale 0.7s var(--mk-ease-signature, cubic-bezier(0.2, 0.8, 0.2, 1));
75
+ }
76
+
77
+ :is(.mk-link-preview, mk-link-preview) a[data-mk-link-card]:hover [data-mk-link-image] {
78
+ scale: 1.04;
79
+ }
80
+
81
+ :is(.mk-link-preview, mk-link-preview) [data-mk-link-image][hidden] {
82
+ display: none;
83
+ }
84
+
85
+ :is(.mk-link-preview, mk-link-preview) [data-mk-part='text'] {
86
+ display: grid;
87
+ gap: 0.35rem;
88
+ min-width: 0;
89
+ padding: 0.85rem 3.25rem 0.6rem 0.6rem;
90
+ }
91
+
92
+ :is(.mk-link-preview, mk-link-preview) [data-mk-part='meta'] {
93
+ display: flex;
94
+ align-items: center;
95
+ gap: 0.45rem;
96
+ min-width: 0;
97
+ }
98
+
99
+ :is(.mk-link-preview, mk-link-preview) [data-mk-part='favicon'] {
100
+ display: grid;
101
+ flex: none;
102
+ place-items: center;
103
+ width: 1.25rem;
104
+ height: 1.25rem;
105
+ border-radius: 50%;
106
+ background: var(--mk-text);
107
+ color: var(--mk-bg);
108
+ font-size: 0.6875rem;
109
+ font-weight: 600;
110
+ }
111
+
112
+ :is(.mk-link-preview, mk-link-preview) [data-mk-part='site'] {
113
+ overflow: hidden;
114
+ color: var(--mk-muted);
115
+ font-size: 0.8125rem;
116
+ text-overflow: ellipsis;
117
+ white-space: nowrap;
118
+ }
119
+
120
+ :is(.mk-link-preview, mk-link-preview) [data-mk-part='title'] {
121
+ font-size: 1.0625rem;
122
+ font-weight: 500;
123
+ line-height: 1.25;
124
+ letter-spacing: -0.01em;
125
+ display: -webkit-box;
126
+ overflow: hidden;
127
+ -webkit-box-orient: vertical;
128
+ -webkit-line-clamp: 2;
129
+ }
130
+
131
+ :is(.mk-link-preview, mk-link-preview) [data-mk-part='description'] {
132
+ color: var(--mk-muted);
133
+ font-size: 0.875rem;
134
+ line-height: 1.4;
135
+ display: -webkit-box;
136
+ overflow: hidden;
137
+ -webkit-box-orient: vertical;
138
+ -webkit-line-clamp: 2;
139
+ }
140
+
141
+ /* The go button: bottom right, it turns and fills on hover (Melonmind playful curve). */
142
+ :is(.mk-link-preview, mk-link-preview) [data-mk-part='go'] {
143
+ position: absolute;
144
+ right: calc(var(--mk-link-inset) + 0.5rem);
145
+ bottom: calc(var(--mk-link-inset) + 0.5rem);
146
+ display: grid;
147
+ place-items: center;
148
+ width: 2.5rem;
149
+ height: 2.5rem;
150
+ border-radius: 50%;
151
+ background: var(--mk-surface-3);
152
+ color: var(--mk-text);
153
+ rotate: 45deg;
154
+ transition:
155
+ rotate 0.4s cubic-bezier(0.38, 0.49, 0, 2),
156
+ background-color 0.2s ease,
157
+ color 0.2s ease,
158
+ scale 0.4s cubic-bezier(0.38, 0.49, 0, 1.5);
159
+ }
160
+
161
+ :is(.mk-link-preview, mk-link-preview) a[data-mk-link-card]:is(:hover, :focus-visible) [data-mk-part='go'] {
162
+ rotate: 0deg;
163
+ scale: 1.08;
164
+ background: var(--mk-text);
165
+ color: var(--mk-bg);
166
+ }
167
+
168
+ :is(.mk-link-preview, mk-link-preview) span[data-mk-link-card] [data-mk-part='go'] {
169
+ display: none;
170
+ }
171
+
172
+ /* Row: the thumbnail beside the text. */
173
+ :is(.mk-link-preview, mk-link-preview)[data-mk-link-variant='row'] [data-mk-link-card] {
174
+ grid-template-columns: var(--mk-link-thumb) minmax(0, 1fr);
175
+ align-items: center;
176
+ gap: 0.25rem;
177
+ border-radius: var(--mk-radius-md, 16px);
178
+ }
179
+
180
+ :is(.mk-link-preview, mk-link-preview)[data-mk-link-variant='row'] [data-mk-part='media'] {
181
+ aspect-ratio: 1;
182
+ border-radius: 10px;
183
+ }
184
+
185
+ :is(.mk-link-preview, mk-link-preview)[data-mk-link-variant='row'] [data-mk-part='fallback'] {
186
+ font-size: 2rem;
187
+ }
188
+
189
+ :is(.mk-link-preview, mk-link-preview)[data-mk-link-variant='row'] [data-mk-part='text'] {
190
+ padding: 0.25rem 3.25rem 0.25rem 0.75rem;
191
+ }
192
+
193
+ :is(.mk-link-preview, mk-link-preview)[data-mk-link-variant='row'] [data-mk-part='go'] {
194
+ top: 50%;
195
+ bottom: auto;
196
+ margin-top: -1.25rem;
197
+ }
198
+
199
+ /* Hover: an underlined link; the card sits in the inverse glass. */
200
+ :is(.mk-link-preview, mk-link-preview) [data-mk-hover-trigger] {
201
+ color: inherit;
202
+ font-weight: 500;
203
+ text-decoration: underline;
204
+ text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
205
+ text-decoration-thickness: 1.5px;
206
+ text-underline-offset: 0.22em;
207
+ cursor: pointer;
208
+ transition: text-decoration-color 0.2s ease;
209
+ }
210
+
211
+ :is(.mk-link-preview, mk-link-preview) [data-mk-hover-trigger]:hover {
212
+ text-decoration-color: currentColor;
213
+ }
214
+
215
+ :is(.mk-link-preview, mk-link-preview) [data-mk-hover-panel] {
216
+ width: min(20rem, calc(100vw - 1.5rem));
217
+ padding: 0;
218
+ border: 0;
219
+ border-radius: var(--mk-link-radius);
220
+ background: var(--mk-glass-inverse);
221
+ box-shadow: var(--mk-glass-bevel);
222
+ backdrop-filter: blur(16px);
223
+ color: var(--mk-on-glass-inverse);
224
+ }
225
+
226
+ :is(.mk-link-preview, mk-link-preview) [data-mk-hover-panel] [data-mk-link-card] {
227
+ background: transparent;
228
+ box-shadow: none;
229
+ translate: none;
230
+ }
231
+
232
+ :is(.mk-link-preview, mk-link-preview) [data-mk-hover-panel] [data-mk-part='media'] {
233
+ background: color-mix(in srgb, var(--mk-on-glass-inverse) 12%, transparent);
234
+ color: var(--mk-on-glass-inverse);
235
+ }
236
+
237
+ :is(.mk-link-preview, mk-link-preview) [data-mk-hover-panel] :is([data-mk-part='site'], [data-mk-part='description']) {
238
+ color: color-mix(in srgb, var(--mk-on-glass-inverse) 70%, transparent);
239
+ }
240
+
241
+ :is(.mk-link-preview, mk-link-preview) [data-mk-hover-panel] [data-mk-part='favicon'] {
242
+ background: var(--mk-on-glass-inverse);
243
+ color: var(--mk-text);
244
+ }
245
+
246
+ :is(.mk-link-preview, mk-link-preview) [data-mk-hover-panel] [data-mk-part='go'] {
247
+ background: color-mix(in srgb, var(--mk-on-glass-inverse) 14%, transparent);
248
+ color: var(--mk-on-glass-inverse);
249
+ }
250
+
251
+ :is(.mk-link-preview, mk-link-preview) [data-mk-hover-panel] a[data-mk-link-card]:is(:hover, :focus-visible) [data-mk-part='go'] {
252
+ background: var(--mk-on-glass-inverse);
253
+ color: var(--mk-text);
254
+ }
255
+
256
+ @keyframes mk-link-press {
257
+ 50% {
258
+ transform: scale(0.97, 0.95);
259
+ }
260
+ }
261
+
262
+ @media (max-width: 420px) {
263
+ :is(.mk-link-preview, mk-link-preview) {
264
+ --mk-link-thumb: 4.25rem;
265
+ }
266
+ }
267
+
268
+ @media (prefers-reduced-motion: reduce) {
269
+ :is(.mk-link-preview, mk-link-preview) :is([data-mk-link-card], [data-mk-link-image], [data-mk-part='go']) {
270
+ transition: none;
271
+ animation: none !important;
272
+ translate: none !important;
273
+ scale: none !important;
274
+ }
275
+ }
@@ -0,0 +1,77 @@
1
+ /* components/loading-button/loading-button.css */
2
+ /* loading-button — the button keeps its own look (.mk-button or yours); this adds the state colours, the icon slot and
3
+ the spinner. Success uses --mk-loading-success (a green that reads on both modes), error --mk-error. */
4
+ .mk-loading-button,
5
+ mk-loading-button button,
6
+ mk-loading-button {
7
+ --mk-loading-success: #1f9d5b;
8
+ }
9
+
10
+ mk-loading-button {
11
+ display: inline-flex;
12
+ }
13
+
14
+ :is(.mk-loading-button, mk-loading-button button) {
15
+ display: inline-flex;
16
+ align-items: center;
17
+ justify-content: center;
18
+ gap: 0.5rem;
19
+ overflow: hidden;
20
+ white-space: nowrap;
21
+ transition: background-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
22
+ }
23
+
24
+ :is(.mk-loading-button, mk-loading-button button)[data-mk-state='loading'] {
25
+ cursor: progress;
26
+ }
27
+
28
+ /* Working is not disabled: keep the button's colour (beats .mk-button[aria-disabled] whatever the order). */
29
+ :is(.mk-loading-button, mk-loading-button button)[data-mk-state='loading'][aria-busy='true'] {
30
+ opacity: 1;
31
+ }
32
+
33
+ :is(.mk-loading-button, mk-loading-button button)[data-mk-state='success'] {
34
+ background: var(--mk-loading-success);
35
+ color: #fff;
36
+ }
37
+
38
+ :is(.mk-loading-button, mk-loading-button button)[data-mk-state='error'] {
39
+ background: var(--mk-error, #c62828);
40
+ color: var(--mk-on-error, #fff);
41
+ }
42
+
43
+ :is(.mk-loading-button, mk-loading-button button) [data-mk-loading-icon] {
44
+ display: inline-grid;
45
+ place-items: center;
46
+ flex: none;
47
+ width: 20px;
48
+ height: 20px;
49
+ }
50
+
51
+ :is(.mk-loading-button, mk-loading-button button) [data-mk-loading-icon][hidden],
52
+ :is(.mk-loading-button, mk-loading-button button) [data-mk-loading-text][hidden],
53
+ :is(.mk-loading-button, mk-loading-button button) [data-mk-loading-label][hidden] {
54
+ display: none;
55
+ }
56
+
57
+ :is(.mk-loading-button, mk-loading-button button) [data-mk-loading-spinner] {
58
+ transform-origin: 50% 50%;
59
+ animation: mk-loading-spin 0.8s linear infinite;
60
+ }
61
+
62
+ @keyframes mk-loading-spin {
63
+ to {
64
+ transform: rotate(360deg);
65
+ }
66
+ }
67
+
68
+ /* Without motion the spinner stands still: a partial ring still reads as "working". */
69
+ @media (prefers-reduced-motion: reduce) {
70
+ :is(.mk-loading-button, mk-loading-button button) {
71
+ transition: none;
72
+ }
73
+
74
+ :is(.mk-loading-button, mk-loading-button button) [data-mk-loading-spinner] {
75
+ animation: none;
76
+ }
77
+ }