@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,264 @@
1
+ /* components/code-block/code-block.css */
2
+ /* code-block — an editor surface, dark in both modes: a bar with three quiet dots, the file name, the language and a
3
+ glass copy button; mono lines with syntax colours, optional numbers and marked lines. A squared surface (radius 12)
4
+ so long lines never run into a curved corner. */
5
+ .mk-code-block,
6
+ mk-code-block {
7
+ --mk-code-radius: var(--mk-radius-sm, 12px);
8
+ --mk-code-bg: #0e0f11;
9
+ --mk-code-bar: #16171a;
10
+ --mk-code-text: #e6e8ec;
11
+ --mk-code-muted: #8a909b;
12
+ --mk-code-line: rgb(255 255 255 / 0.035);
13
+ --mk-code-mark: rgb(196 165 255 / 0.1);
14
+ --mk-code-keyword: #c4a5ff;
15
+ --mk-code-string: #9fe0b0;
16
+ --mk-code-number: #ffb86b;
17
+ --mk-code-comment: #7d8390;
18
+ --mk-code-function: #82b4ff;
19
+ --mk-code-tag: #ff8f8f;
20
+ --mk-code-attr: #ffd479;
21
+ --mk-code-property: #8fd6ff;
22
+ --mk-code-punctuation: #9aa0aa;
23
+ --mk-code-operator: #c9ced6;
24
+ position: relative;
25
+ display: block;
26
+ overflow: hidden;
27
+ border-radius: var(--mk-code-radius);
28
+ background: var(--mk-code-bg);
29
+ box-shadow:
30
+ inset 0 0 0 1px rgb(255 255 255 / 0.06),
31
+ 0 18px 40px -24px rgb(0 0 0 / 0.55);
32
+ color: var(--mk-code-text);
33
+ color-scheme: dark;
34
+ }
35
+
36
+ :is(.mk-code-block, mk-code-block) [data-mk-code-header] {
37
+ display: flex;
38
+ align-items: center;
39
+ gap: 0.75rem;
40
+ min-height: 3rem;
41
+ padding: 0.4rem 0.45rem 0.4rem 1rem;
42
+ background: var(--mk-code-bar);
43
+ box-shadow: inset 0 -1px 0 rgb(255 255 255 / 0.05);
44
+ font-family: var(--mk-font);
45
+ font-size: 0.8125rem;
46
+ }
47
+
48
+ :is(.mk-code-block, mk-code-block) [data-mk-code-dots] {
49
+ display: inline-flex;
50
+ flex: none;
51
+ gap: 6px;
52
+ }
53
+
54
+ :is(.mk-code-block, mk-code-block) [data-mk-code-dots] i {
55
+ width: 10px;
56
+ height: 10px;
57
+ border-radius: 50%;
58
+ background: rgb(255 255 255 / 0.14);
59
+ }
60
+
61
+ :is(.mk-code-block, mk-code-block) [data-mk-code-title] {
62
+ flex: 1;
63
+ min-width: 0;
64
+ overflow: hidden;
65
+ color: var(--mk-code-text);
66
+ font-weight: 500;
67
+ text-overflow: ellipsis;
68
+ white-space: nowrap;
69
+ }
70
+
71
+ :is(.mk-code-block, mk-code-block) [data-mk-code-language] {
72
+ padding: 0.15rem 0.5rem;
73
+ border-radius: 6px;
74
+ background: rgb(255 255 255 / 0.07);
75
+ color: var(--mk-code-muted);
76
+ font-family: var(--mk-font-mono, ui-monospace, monospace);
77
+ font-size: 0.75rem;
78
+ text-transform: lowercase;
79
+ }
80
+
81
+ :is(.mk-code-block, mk-code-block) pre {
82
+ margin: 0;
83
+ padding: 1rem 0;
84
+ overflow-x: auto;
85
+ font-family: var(--mk-font-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
86
+ font-size: 0.875rem;
87
+ line-height: 1.7;
88
+ tab-size: 2;
89
+ scrollbar-color: rgb(255 255 255 / 0.2) transparent;
90
+ }
91
+
92
+ :is(.mk-code-block, mk-code-block) pre:focus-visible {
93
+ outline: 2px solid var(--mk-code-keyword);
94
+ outline-offset: -4px;
95
+ border-radius: calc(var(--mk-code-radius) - 4px);
96
+ }
97
+
98
+ :is(.mk-code-block, mk-code-block) code {
99
+ display: block;
100
+ min-width: max-content;
101
+ padding: 0 1.25rem;
102
+ font: inherit;
103
+ white-space: pre;
104
+ }
105
+
106
+ /* Highlighted code: block lines (the newlines between them are not rendered in a grid). */
107
+ :is(.mk-code-block, mk-code-block) code:has([data-mk-code-line]) {
108
+ display: grid;
109
+ padding: 0;
110
+ counter-reset: mk-line;
111
+ }
112
+
113
+ :is(.mk-code-block, mk-code-block) [data-mk-code-line] {
114
+ display: block;
115
+ translate: 0 var(--mk-line-y, 0);
116
+ min-height: 1.7em;
117
+ padding: 0 1.25rem;
118
+ transition: background-color 0.15s ease;
119
+ }
120
+
121
+ :is(.mk-code-block, mk-code-block) [data-mk-code-line]:hover {
122
+ background: var(--mk-code-line);
123
+ }
124
+
125
+ :is(.mk-code-block, mk-code-block) [data-mk-code-line][data-mk-highlight] {
126
+ background: var(--mk-code-mark);
127
+ box-shadow: inset 2px 0 0 var(--mk-code-keyword);
128
+ }
129
+
130
+ :is(.mk-code-block, mk-code-block)[data-mk-line-numbers] [data-mk-code-line]::before {
131
+ counter-increment: mk-line;
132
+ content: counter(mk-line);
133
+ display: inline-block;
134
+ width: 2ch;
135
+ margin-right: 1.25rem;
136
+ color: var(--mk-code-muted);
137
+ opacity: 0.55;
138
+ text-align: right;
139
+ user-select: none;
140
+ }
141
+
142
+ :is(.mk-code-block, mk-code-block) [data-mk-token='keyword'] { color: var(--mk-code-keyword); }
143
+ :is(.mk-code-block, mk-code-block) [data-mk-token='string'] { color: var(--mk-code-string); }
144
+ :is(.mk-code-block, mk-code-block) [data-mk-token='number'] { color: var(--mk-code-number); }
145
+ :is(.mk-code-block, mk-code-block) [data-mk-token='comment'] { color: var(--mk-code-comment); font-style: italic; }
146
+ :is(.mk-code-block, mk-code-block) [data-mk-token='function'] { color: var(--mk-code-function); }
147
+ :is(.mk-code-block, mk-code-block) [data-mk-token='tag'] { color: var(--mk-code-tag); }
148
+ :is(.mk-code-block, mk-code-block) [data-mk-token='attr'] { color: var(--mk-code-attr); }
149
+ :is(.mk-code-block, mk-code-block) [data-mk-token='property'] { color: var(--mk-code-property); }
150
+ :is(.mk-code-block, mk-code-block) [data-mk-token='punctuation'] { color: var(--mk-code-punctuation); }
151
+ :is(.mk-code-block, mk-code-block) [data-mk-token='operator'] { color: var(--mk-code-operator); }
152
+
153
+ /* The copy button: glass on the bar, or floating in the corner when authored outside it. */
154
+ :is(.mk-code-block, mk-code-block) [data-mk-code-copy] {
155
+ display: inline-flex;
156
+ flex: none;
157
+ align-items: center;
158
+ justify-content: center;
159
+ gap: 0.4rem;
160
+ min-height: 2.25rem;
161
+ padding: 0 0.9rem;
162
+ overflow: hidden;
163
+ border: 0;
164
+ border-radius: var(--mk-radius-xs, 8px);
165
+ background: rgb(255 255 255 / 0.08);
166
+ box-shadow:
167
+ inset 1px 1px 1px rgb(255 255 255 / 0.08),
168
+ inset -1px -1px 1px rgb(255 255 255 / 0.04);
169
+ color: var(--mk-code-text);
170
+ font-family: var(--mk-font);
171
+ font-size: 0.8125rem;
172
+ font-weight: 500;
173
+ white-space: nowrap;
174
+ cursor: pointer;
175
+ transition:
176
+ background-color 0.2s ease,
177
+ color 0.2s ease;
178
+ }
179
+
180
+ :is(.mk-code-block, mk-code-block) > [data-mk-code-copy] {
181
+ position: absolute;
182
+ top: 3.5rem;
183
+ right: 0.6rem;
184
+ z-index: 1;
185
+ }
186
+
187
+ :is(.mk-code-block, mk-code-block) [data-mk-code-copy]:hover {
188
+ background: rgb(255 255 255 / 0.14);
189
+ }
190
+
191
+ :is(.mk-code-block, mk-code-block) [data-mk-code-copy]:focus-visible {
192
+ outline: 2px solid var(--mk-code-keyword);
193
+ outline-offset: 2px;
194
+ }
195
+
196
+ :is(.mk-code-block, mk-code-block)[data-mk-copied] [data-mk-code-copy] {
197
+ background: #e6e8ec;
198
+ color: #0e0f11;
199
+ }
200
+
201
+ :is(.mk-code-block, mk-code-block)[data-mk-copy-error] [data-mk-code-copy] {
202
+ background: rgb(255 120 120 / 0.18);
203
+ color: #ffb4b4;
204
+ }
205
+
206
+ /* The icon turns into a check (or a cross) with a blur. */
207
+ :is(.mk-code-block, mk-code-block) [data-mk-code-copy] svg {
208
+ flex: none;
209
+ }
210
+
211
+ :is(.mk-code-block, mk-code-block):is([data-mk-copied], [data-mk-copy-error]) [data-mk-code-copy] svg {
212
+ display: none;
213
+ }
214
+
215
+ :is(.mk-code-block, mk-code-block):is([data-mk-copied], [data-mk-copy-error]) [data-mk-code-copy]::before {
216
+ content: '';
217
+ width: 16px;
218
+ height: 16px;
219
+ background: currentColor;
220
+ mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat;
221
+ animation: mk-code-check 0.4s cubic-bezier(0.1, 0.8, 0, 1.1);
222
+ }
223
+
224
+ :is(.mk-code-block, mk-code-block)[data-mk-copy-error] [data-mk-code-copy]::before {
225
+ mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E");
226
+ }
227
+
228
+ /* The button says what happened (the status says it to screen readers). */
229
+ :is(.mk-code-block, mk-code-block) [data-mk-code-copy-text][data-mk-feedback] {
230
+ font-size: 0;
231
+ }
232
+
233
+ :is(.mk-code-block, mk-code-block) [data-mk-code-copy-text][data-mk-feedback]::after {
234
+ content: attr(data-mk-feedback);
235
+ font-size: 0.8125rem;
236
+ }
237
+
238
+ @keyframes mk-code-check {
239
+ from {
240
+ opacity: 0;
241
+ filter: blur(6px);
242
+ transform: scale(0.4) rotate(-20deg);
243
+ }
244
+ }
245
+
246
+ @media (max-width: 520px) {
247
+ :is(.mk-code-block, mk-code-block) [data-mk-code-dots] {
248
+ display: none;
249
+ }
250
+
251
+ :is(.mk-code-block, mk-code-block) pre {
252
+ font-size: 0.8125rem;
253
+ }
254
+ }
255
+
256
+ @media (prefers-reduced-motion: reduce) {
257
+ :is(.mk-code-block, mk-code-block) [data-mk-code-copy]::before {
258
+ animation: none !important;
259
+ }
260
+
261
+ :is(.mk-code-block, mk-code-block) [data-mk-code-line] {
262
+ transition: none;
263
+ }
264
+ }
@@ -0,0 +1,82 @@
1
+ /* components/color-area/color-area.css */
2
+ /* color-area — saturation (x) × brightness (y) at the current hue; 12 px corners; the thumb is a ringed circle that
3
+ grows when grabbed and pops a loupe. The thumb may stand half outside the square: leave room around it. */
4
+ .mk-color-area,
5
+ mk-color-area {
6
+ --mk-color-area-height: 11rem;
7
+ --mk-color-checker: repeating-conic-gradient(#d4d4d4 0 25%, #fff 0 50%) 0 0 / 10px 10px;
8
+ display: block;
9
+ position: relative;
10
+ }
11
+
12
+ :is(.mk-color-area, mk-color-area) [data-mk-color-area-surface] {
13
+ position: relative;
14
+ height: var(--mk-color-area-height);
15
+ border-radius: 12px;
16
+ background: var(--mk-color-area);
17
+ box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.08);
18
+ cursor: crosshair;
19
+ touch-action: none;
20
+ }
21
+
22
+ :is(.mk-color-area, mk-color-area) [data-mk-color-thumb] {
23
+ position: absolute;
24
+ left: calc(clamp(0, var(--mk-color-x, 0), 1) * 100%);
25
+ top: calc(clamp(0, var(--mk-color-y, 0), 1) * 100%);
26
+ width: 1.5rem;
27
+ height: 1.5rem;
28
+ margin: -0.75rem 0 0 -0.75rem;
29
+ border-radius: 50%;
30
+ background: linear-gradient(var(--mk-color-thumb), var(--mk-color-thumb)), var(--mk-color-checker);
31
+ box-shadow: 0 0 0 3px #fff, 0 0 0 4px rgb(0 0 0 / 0.14), 0 4px 12px rgb(0 0 0 / 0.3);
32
+ pointer-events: none;
33
+ }
34
+
35
+ :is(.mk-color-area, mk-color-area):has(input:focus-visible) [data-mk-color-thumb] {
36
+ box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--mk-accent), 0 4px 12px rgb(0 0 0 / 0.3);
37
+ }
38
+
39
+ :is(.mk-color-area, mk-color-area) [data-mk-color-loupe] {
40
+ position: absolute;
41
+ bottom: calc(100% + 10px);
42
+ left: 50%;
43
+ width: 2.75rem;
44
+ height: 2.75rem;
45
+ margin-left: -1.375rem;
46
+ border-radius: 50%;
47
+ background: linear-gradient(var(--mk-color-thumb), var(--mk-color-thumb)), var(--mk-color-checker);
48
+ box-shadow: 0 0 0 3px #fff, 0 8px 20px rgb(0 0 0 / 0.25);
49
+ opacity: 0;
50
+ transform-origin: 50% 100%;
51
+ }
52
+
53
+ /* Near the top edge the loupe flips below the thumb, so a panel or card that clips its content never cuts it. */
54
+ :is(.mk-color-area, mk-color-area)[data-mk-loupe-below] [data-mk-color-loupe] {
55
+ top: calc(100% + 10px);
56
+ bottom: auto;
57
+ transform-origin: 50% 0;
58
+ }
59
+
60
+ @media (prefers-reduced-motion: reduce) {
61
+ :is(.mk-color-area, mk-color-area)[data-mk-grabbing] [data-mk-color-loupe] {
62
+ opacity: 1;
63
+ }
64
+ }
65
+
66
+ :is(.mk-color-area, mk-color-area):has(input:disabled) [data-mk-color-area-surface] {
67
+ opacity: 0.45;
68
+ cursor: not-allowed;
69
+ }
70
+
71
+ /* The two ranges stay readable to assistive tech but take no room (the per-component file does not need base.css). */
72
+ :is(.mk-color-area, mk-color-area) [data-mk-color-input] {
73
+ position: absolute;
74
+ width: 1px;
75
+ height: 1px;
76
+ margin: -1px;
77
+ padding: 0;
78
+ overflow: hidden;
79
+ clip-path: inset(50%);
80
+ white-space: nowrap;
81
+ border: 0;
82
+ }
@@ -0,0 +1,67 @@
1
+ /* components/color-field/color-field.css */
2
+ /* color-field — a 12 px field on surface-3 with a colour swatch (8 px corners, checkerboard under translucent colours)
3
+ and a mono text input; focus draws a 3 px accent ring; an unparsed text dashes the swatch. */
4
+ .mk-color-field,
5
+ mk-color-field {
6
+ --mk-color-checker: repeating-conic-gradient(#d4d4d4 0 25%, #fff 0 50%) 0 0 / 8px 8px;
7
+ display: flex;
8
+ align-items: center;
9
+ gap: 0.6rem;
10
+ min-width: 0;
11
+ height: 2.75rem;
12
+ padding: 0 0.75rem 0 0.5rem;
13
+ border-radius: 12px;
14
+ background: var(--mk-surface-3);
15
+ color: var(--mk-text);
16
+ transition: box-shadow 0.2s ease;
17
+ }
18
+
19
+ :is(.mk-color-field, mk-color-field):focus-within {
20
+ box-shadow: 0 0 0 3px color-mix(in srgb, var(--mk-accent) 35%, transparent);
21
+ }
22
+
23
+ :is(.mk-color-field, mk-color-field) [data-mk-color-swatch] {
24
+ flex: none;
25
+ width: 1.75rem;
26
+ height: 1.75rem;
27
+ border-radius: 8px;
28
+ background: linear-gradient(var(--mk-color-swatch), var(--mk-color-swatch)), var(--mk-color-checker);
29
+ box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--mk-text) 22%, transparent);
30
+ transition: background 0.25s ease;
31
+ }
32
+
33
+ :is(.mk-color-field, mk-color-field)[data-mk-unparsed] [data-mk-color-swatch] {
34
+ outline: 2px dashed var(--mk-muted);
35
+ outline-offset: 2px;
36
+ }
37
+
38
+ :is(.mk-color-field, mk-color-field) [data-mk-color-text] {
39
+ flex: 1;
40
+ min-width: 0;
41
+ border: 0;
42
+ background: transparent;
43
+ color: inherit;
44
+ font: 500 0.9375rem/1 var(--mk-font-mono, ui-monospace, monospace);
45
+ text-overflow: ellipsis;
46
+ outline: none;
47
+ }
48
+
49
+ :is(.mk-color-field, mk-color-field) [data-mk-color-status] {
50
+ position: absolute;
51
+ width: 1px;
52
+ height: 1px;
53
+ margin: -1px;
54
+ overflow: hidden;
55
+ clip-path: inset(50%);
56
+ white-space: nowrap;
57
+ }
58
+
59
+ @media (prefers-reduced-motion: reduce) {
60
+ :is(.mk-color-field, mk-color-field) {
61
+ transition: none;
62
+ }
63
+
64
+ :is(.mk-color-field, mk-color-field) [data-mk-color-swatch] {
65
+ transition: none;
66
+ }
67
+ }
@@ -0,0 +1,131 @@
1
+ /* components/color-picker/color-picker.css */
2
+ /* color-picker — a swatch button (12 px, the hex beside it) that grows into a 20 px panel: area, hue, alpha, field,
3
+ eyedropper and 8 px preset swatches. Inline, the panel sits in place. Needs dialog.css for the popover, and the
4
+ color-area, color-slider and color-field stylesheets for its parts. */
5
+ .mk-color-picker,
6
+ mk-color-picker {
7
+ --mk-color-checker: repeating-conic-gradient(#d4d4d4 0 25%, #fff 0 50%) 0 0 / 8px 8px;
8
+ display: inline-block;
9
+ max-width: 100%;
10
+ }
11
+
12
+ :is(.mk-color-picker, mk-color-picker) [data-mk-color-trigger] {
13
+ display: inline-flex;
14
+ align-items: center;
15
+ gap: 0.6rem;
16
+ height: 2.75rem;
17
+ padding: 0 0.9rem 0 0.4rem;
18
+ border: 0;
19
+ border-radius: 12px;
20
+ background: var(--mk-surface-3);
21
+ color: var(--mk-text);
22
+ font: 500 0.9375rem/1 var(--mk-font-mono, ui-monospace, monospace);
23
+ cursor: pointer;
24
+ }
25
+
26
+ :is(.mk-color-picker, mk-color-picker) [data-mk-color-trigger]:focus-visible {
27
+ outline: 3px solid color-mix(in srgb, var(--mk-accent) 45%, transparent);
28
+ outline-offset: 2px;
29
+ }
30
+
31
+ :is(.mk-color-picker, mk-color-picker) [data-mk-color-trigger]:disabled {
32
+ opacity: 0.5;
33
+ cursor: not-allowed;
34
+ }
35
+
36
+ :is(.mk-color-picker, mk-color-picker) [data-mk-color-trigger] [data-mk-color-swatch],
37
+ [data-mk-color-preset] {
38
+ border-radius: 8px;
39
+ background: linear-gradient(var(--mk-color-swatch), var(--mk-color-swatch)), var(--mk-color-checker, repeating-conic-gradient(#d4d4d4 0 25%, #fff 0 50%) 0 0 / 8px 8px);
40
+ box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--mk-text) 22%, transparent);
41
+ transition: background 0.25s ease;
42
+ }
43
+
44
+ :is(.mk-color-picker, mk-color-picker) [data-mk-color-trigger] [data-mk-color-swatch] {
45
+ width: 2rem;
46
+ height: 2rem;
47
+ }
48
+
49
+ /* Classes, not data attributes: the copy that folds back into the swatch on close keeps only the classes. */
50
+ .mk-dialog.mk-color-panel {
51
+ --mk-dialog-width: 18rem;
52
+ --mk-dialog-radius: 20px;
53
+ --mk-dialog-bg: var(--mk-surface-1);
54
+ }
55
+
56
+ [data-mk-color-panel-body] {
57
+ display: grid;
58
+ gap: 0.9rem;
59
+ padding: 0.9rem;
60
+ }
61
+
62
+ /* The loupes pop above the area and the sliders: the panel leaves them room. */
63
+ .mk-dialog.mk-color-panel [data-mk-color-panel-body] {
64
+ padding-top: 1.1rem;
65
+ }
66
+
67
+ :is(.mk-color-picker, mk-color-picker)[data-mk-inline] [data-mk-color-panel-body] {
68
+ width: min(18rem, 100%);
69
+ box-sizing: border-box;
70
+ border-radius: 20px;
71
+ background: var(--mk-surface-1);
72
+ box-shadow: inset 0 0 0 1px var(--mk-outline-soft, rgb(0 0 0 / 0.08));
73
+ }
74
+
75
+ [data-mk-color-panel-body] .mk-color-slider {
76
+ grid-template-columns: minmax(0, 1fr);
77
+ }
78
+
79
+ [data-mk-color-row] {
80
+ display: flex;
81
+ gap: 0.5rem;
82
+ min-width: 0;
83
+ }
84
+
85
+ [data-mk-color-row] > .mk-color-field {
86
+ flex: 1;
87
+ }
88
+
89
+ [data-mk-color-eyedropper] {
90
+ display: grid;
91
+ flex: none;
92
+ place-items: center;
93
+ width: 2.75rem;
94
+ height: 2.75rem;
95
+ border: 0;
96
+ border-radius: 12px;
97
+ background: var(--mk-surface-3);
98
+ color: var(--mk-text);
99
+ cursor: pointer;
100
+ }
101
+
102
+ [data-mk-color-swatches] {
103
+ display: grid;
104
+ grid-template-columns: repeat(8, minmax(0, 1fr));
105
+ gap: 0.4rem;
106
+ }
107
+
108
+ [data-mk-color-preset] {
109
+ aspect-ratio: 1;
110
+ min-width: 0;
111
+ padding: 0;
112
+ border: 0;
113
+ cursor: pointer;
114
+ }
115
+
116
+ [data-mk-color-preset][aria-pressed='true'] {
117
+ box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--mk-text) 22%, transparent), 0 0 0 2px var(--mk-surface-1), 0 0 0 4px var(--mk-text);
118
+ }
119
+
120
+ [data-mk-color-preset]:focus-visible,
121
+ [data-mk-color-eyedropper]:focus-visible {
122
+ outline: 3px solid color-mix(in srgb, var(--mk-accent) 45%, transparent);
123
+ outline-offset: 2px;
124
+ }
125
+
126
+ @media (prefers-reduced-motion: reduce) {
127
+ :is(.mk-color-picker, mk-color-picker) [data-mk-color-swatch],
128
+ [data-mk-color-preset] {
129
+ transition: none;
130
+ }
131
+ }
@@ -0,0 +1,113 @@
1
+ /* components/color-slider/color-slider.css */
2
+ /* color-slider — one colour channel: a pill track with the channel's gradient (alpha over a checkerboard) and a round
3
+ thumb filled with the colour; grabbing grows it and pops a loupe. The native range is a transparent hit area. */
4
+ .mk-color-slider,
5
+ mk-color-slider {
6
+ --mk-color-size: 1.75rem;
7
+ --mk-color-length: 12rem;
8
+ --mk-color-checker: repeating-conic-gradient(#d4d4d4 0 25%, #fff 0 50%) 0 0 / 10px 10px;
9
+ display: grid;
10
+ grid-template-columns: minmax(0, 1fr) auto;
11
+ align-items: center;
12
+ gap: 0.75rem;
13
+ }
14
+
15
+ :is(.mk-color-slider, mk-color-slider) [data-mk-color-track] {
16
+ position: relative;
17
+ height: var(--mk-color-size);
18
+ border-radius: 999px;
19
+ background: var(--mk-color-track), var(--mk-color-checker);
20
+ box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.08);
21
+ }
22
+
23
+ :is(.mk-color-slider, mk-color-slider) [data-mk-color-input] {
24
+ position: absolute;
25
+ inset: 0;
26
+ width: 100%;
27
+ height: 100%;
28
+ margin: 0;
29
+ opacity: 0;
30
+ cursor: pointer;
31
+ }
32
+
33
+ :is(.mk-color-slider, mk-color-slider) [data-mk-color-thumb] {
34
+ position: absolute;
35
+ top: 50%;
36
+ left: calc(clamp(0, var(--mk-color-pos, 0), 1) * (100% - var(--mk-color-size)));
37
+ width: var(--mk-color-size);
38
+ height: var(--mk-color-size);
39
+ margin-top: calc(var(--mk-color-size) / -2);
40
+ border-radius: 50%;
41
+ background: linear-gradient(var(--mk-color-thumb), var(--mk-color-thumb)), var(--mk-color-checker);
42
+ box-shadow: 0 0 0 3px #fff, 0 0 0 4px rgb(0 0 0 / 0.14), 0 4px 12px rgb(0 0 0 / 0.25);
43
+ pointer-events: none;
44
+ }
45
+
46
+ :is(.mk-color-slider, mk-color-slider) [data-mk-color-track]:has(input:focus-visible) [data-mk-color-thumb] {
47
+ box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--mk-accent), 0 4px 12px rgb(0 0 0 / 0.25);
48
+ }
49
+
50
+ :is(.mk-color-slider, mk-color-slider) [data-mk-color-loupe] {
51
+ position: absolute;
52
+ bottom: calc(100% + 10px);
53
+ left: 50%;
54
+ width: 2.75rem;
55
+ height: 2.75rem;
56
+ margin-left: -1.375rem;
57
+ border-radius: 50%;
58
+ background: linear-gradient(var(--mk-color-thumb), var(--mk-color-thumb)), var(--mk-color-checker);
59
+ box-shadow: 0 0 0 3px #fff, 0 8px 20px rgb(0 0 0 / 0.25);
60
+ opacity: 0;
61
+ transform-origin: 50% 100%;
62
+ }
63
+
64
+ /* Reduced motion: GSAP does not run, the attribute shows the loupe. */
65
+ @media (prefers-reduced-motion: reduce) {
66
+ :is(.mk-color-slider, mk-color-slider)[data-mk-grabbing] [data-mk-color-loupe] {
67
+ opacity: 1;
68
+ }
69
+ }
70
+
71
+ :is(.mk-color-slider, mk-color-slider) [data-mk-color-output] {
72
+ min-width: 3.5ch;
73
+ color: var(--mk-muted);
74
+ font-size: 0.8125rem;
75
+ font-variant-numeric: tabular-nums;
76
+ text-align: end;
77
+ }
78
+
79
+ :is(.mk-color-slider, mk-color-slider) [data-mk-color-track]:has(input:disabled) {
80
+ opacity: 0.45;
81
+ }
82
+
83
+ /* Vertical: the track stands up, bottom is the minimum, the loupe sits on the left. */
84
+ :is(.mk-color-slider, mk-color-slider)[data-mk-orientation='vertical'] {
85
+ grid-template-columns: auto;
86
+ justify-items: center;
87
+ }
88
+
89
+ :is(.mk-color-slider, mk-color-slider)[data-mk-orientation='vertical'] [data-mk-color-track] {
90
+ width: var(--mk-color-size);
91
+ height: var(--mk-color-length);
92
+ }
93
+
94
+ :is(.mk-color-slider, mk-color-slider)[data-mk-orientation='vertical'] [data-mk-color-input] {
95
+ writing-mode: vertical-lr;
96
+ direction: rtl;
97
+ }
98
+
99
+ :is(.mk-color-slider, mk-color-slider)[data-mk-orientation='vertical'] [data-mk-color-thumb] {
100
+ top: auto;
101
+ bottom: calc(clamp(0, var(--mk-color-pos, 0), 1) * (100% - var(--mk-color-size)));
102
+ left: 0;
103
+ margin-top: 0;
104
+ }
105
+
106
+ :is(.mk-color-slider, mk-color-slider)[data-mk-orientation='vertical'] [data-mk-color-loupe] {
107
+ top: 50%;
108
+ right: calc(100% + 10px);
109
+ bottom: auto;
110
+ left: auto;
111
+ margin: -1.375rem 0 0;
112
+ transform-origin: 100% 50%;
113
+ }