@yewdiel21/motion-kit 0.0.0-stage → 0.9.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 (391) hide show
  1. package/NOTICE +38 -0
  2. package/README.md +80 -2
  3. package/bin/motion-kit.mjs +242 -0
  4. package/css.d.ts +2 -0
  5. package/dist/auto/index.d.ts +63 -0
  6. package/dist/auto/index.js +207 -0
  7. package/dist/auto/index.js.map +1 -0
  8. package/dist/chunk-2BQGFOA7.js +177 -0
  9. package/dist/chunk-2BQGFOA7.js.map +1 -0
  10. package/dist/chunk-34XYOXHG.js +2374 -0
  11. package/dist/chunk-34XYOXHG.js.map +1 -0
  12. package/dist/chunk-6OJAP6ZL.js +832 -0
  13. package/dist/chunk-6OJAP6ZL.js.map +1 -0
  14. package/dist/chunk-ABNRDDO7.js +28 -0
  15. package/dist/chunk-ABNRDDO7.js.map +1 -0
  16. package/dist/chunk-FS2HJVVY.js +3320 -0
  17. package/dist/chunk-FS2HJVVY.js.map +1 -0
  18. package/dist/chunk-J27KH2A2.js +157 -0
  19. package/dist/chunk-J27KH2A2.js.map +1 -0
  20. package/dist/chunk-KLY5BRRI.js +18 -0
  21. package/dist/chunk-KLY5BRRI.js.map +1 -0
  22. package/dist/chunk-Q4LVFNLN.js +1617 -0
  23. package/dist/chunk-Q4LVFNLN.js.map +1 -0
  24. package/dist/chunk-RFDIZYFX.js +304 -0
  25. package/dist/chunk-RFDIZYFX.js.map +1 -0
  26. package/dist/chunk-TGV27ZWM.js +17 -0
  27. package/dist/chunk-TGV27ZWM.js.map +1 -0
  28. package/dist/confetti-BSX1CLLV.d.ts +41 -0
  29. package/dist/css/components/chat-background.css +87 -0
  30. package/dist/css/components/chat.css +237 -0
  31. package/dist/css/components/cursor.css +178 -0
  32. package/dist/css/components/dialog.css +259 -0
  33. package/dist/css/components/island.css +301 -0
  34. package/dist/css/components/menu.css +105 -0
  35. package/dist/css/components/nav.css +1054 -0
  36. package/dist/css/components/steps.css +50 -0
  37. package/dist/css/components/theme-picker.css +115 -0
  38. package/dist/css/components/toast.css +115 -0
  39. package/dist/css/controls.css +950 -0
  40. package/dist/css/effects.css +587 -0
  41. package/dist/css/fonts.css +3 -0
  42. package/dist/css/themes/black-green.css +126 -0
  43. package/dist/css/themes/black.css +126 -0
  44. package/dist/css/themes/blue.css +126 -0
  45. package/dist/css/themes/brown.css +126 -0
  46. package/dist/css/themes/cold-blue.css +126 -0
  47. package/dist/css/themes/funny.css +126 -0
  48. package/dist/css/themes/gray.css +126 -0
  49. package/dist/css/themes/green.css +126 -0
  50. package/dist/css/themes/modern-1.css +126 -0
  51. package/dist/css/themes/neogreen.css +126 -0
  52. package/dist/css/themes/new.css +126 -0
  53. package/dist/css/themes/new2.css +126 -0
  54. package/dist/css/themes/oled.css +126 -0
  55. package/dist/css/themes/orange.css +126 -0
  56. package/dist/css/themes/pastel-pink.css +126 -0
  57. package/dist/css/themes/pink.css +126 -0
  58. package/dist/css/themes/purple.css +126 -0
  59. package/dist/css/themes/red.css +126 -0
  60. package/dist/css/themes/super-blue.css +126 -0
  61. package/dist/css/themes.css +2431 -0
  62. package/dist/css/tokens.css +452 -0
  63. package/dist/elements/index.d.ts +183 -0
  64. package/dist/elements/index.js +472 -0
  65. package/dist/elements/index.js.map +1 -0
  66. package/dist/engine-CUr9QijM.d.ts +46 -0
  67. package/dist/gl/index.d.ts +61 -0
  68. package/dist/gl/index.js +18 -0
  69. package/dist/gl/index.js.map +1 -0
  70. package/dist/index.css +5296 -0
  71. package/dist/index.d.ts +440 -0
  72. package/dist/index.js +390 -0
  73. package/dist/index.js.map +1 -0
  74. package/dist/react/index.d.ts +476 -0
  75. package/dist/react/index.js +969 -0
  76. package/dist/react/index.js.map +1 -0
  77. package/dist/reduced-BM4Ls0g5.d.ts +566 -0
  78. package/dist/reveal-WFUWDrei.d.ts +416 -0
  79. package/dist/store-Bqy_obnD.d.ts +195 -0
  80. package/dist/theme/generate.d.ts +18 -0
  81. package/dist/theme/generate.js +64 -0
  82. package/dist/theme/generate.js.map +1 -0
  83. package/dist/theme/index.d.ts +17 -0
  84. package/dist/theme/index.js +32 -0
  85. package/dist/theme/index.js.map +1 -0
  86. package/dist/theme-BFMoCzi6.d.ts +158 -0
  87. package/dist/types-BkS_raL8.d.ts +7 -0
  88. package/package.json +114 -3
  89. package/registry.json +469 -0
  90. package/skills/motion-kit/SKILL.md +189 -0
  91. package/skills/motion-kit/reference/components.md +86 -0
  92. package/skills/motion-kit/reference/design.md +92 -0
  93. package/skills/motion-kit/reference/recipes.md +172 -0
  94. package/src/auto/auto-init.ts +151 -0
  95. package/src/auto/index.ts +3 -0
  96. package/src/auto/parse-options.ts +68 -0
  97. package/src/components/chat/README.md +90 -0
  98. package/src/components/chat/chat.css +236 -0
  99. package/src/components/chat/element.ts +98 -0
  100. package/src/components/chat/engine.ts +295 -0
  101. package/src/components/chat/react.tsx +196 -0
  102. package/src/components/chat-background/README.md +50 -0
  103. package/src/components/chat-background/audio.ts +56 -0
  104. package/src/components/chat-background/chat-background.css +86 -0
  105. package/src/components/chat-background/element.ts +31 -0
  106. package/src/components/chat-background/engine.ts +108 -0
  107. package/src/components/chat-background/react.tsx +36 -0
  108. package/src/components/cursor/README.md +53 -0
  109. package/src/components/cursor/cursor.css +177 -0
  110. package/src/components/cursor/element.ts +23 -0
  111. package/src/components/cursor/engine.ts +254 -0
  112. package/src/components/cursor/react.tsx +26 -0
  113. package/src/components/dialog/README.md +106 -0
  114. package/src/components/dialog/dialog.css +258 -0
  115. package/src/components/dialog/element.ts +118 -0
  116. package/src/components/dialog/engine.ts +432 -0
  117. package/src/components/dialog/react.tsx +200 -0
  118. package/src/components/icon.tsx +10 -0
  119. package/src/components/icons.ts +24 -0
  120. package/src/components/island/README.md +91 -0
  121. package/src/components/island/element.ts +45 -0
  122. package/src/components/island/engine.ts +200 -0
  123. package/src/components/island/island.css +300 -0
  124. package/src/components/island/react.tsx +115 -0
  125. package/src/components/menu/README.md +67 -0
  126. package/src/components/menu/element.ts +55 -0
  127. package/src/components/menu/engine.ts +142 -0
  128. package/src/components/menu/menu.css +104 -0
  129. package/src/components/menu/react.tsx +82 -0
  130. package/src/components/nav/README.md +85 -0
  131. package/src/components/nav/element.ts +39 -0
  132. package/src/components/nav/engine.ts +164 -0
  133. package/src/components/nav/nav.css +1053 -0
  134. package/src/components/nav/react.tsx +90 -0
  135. package/src/components/steps/README.md +70 -0
  136. package/src/components/steps/element.ts +43 -0
  137. package/src/components/steps/engine.ts +185 -0
  138. package/src/components/steps/react.tsx +91 -0
  139. package/src/components/steps/steps.css +49 -0
  140. package/src/components/theme-picker/README.md +57 -0
  141. package/src/components/theme-picker/element.ts +20 -0
  142. package/src/components/theme-picker/engine.ts +91 -0
  143. package/src/components/theme-picker/react.tsx +31 -0
  144. package/src/components/theme-picker/theme-picker.css +114 -0
  145. package/src/components/toast/README.md +60 -0
  146. package/src/components/toast/element.ts +25 -0
  147. package/src/components/toast/engine.ts +483 -0
  148. package/src/components/toast/react.tsx +22 -0
  149. package/src/components/toast/store.ts +122 -0
  150. package/src/components/toast/toast.css +114 -0
  151. package/src/core/channels.ts +165 -0
  152. package/src/core/curves.ts +35 -0
  153. package/src/core/frame.ts +12 -0
  154. package/src/core/gsap.ts +65 -0
  155. package/src/core/loop.ts +44 -0
  156. package/src/core/math.ts +9 -0
  157. package/src/core/physics-spring.ts +59 -0
  158. package/src/core/pointer.ts +63 -0
  159. package/src/core/reduced.ts +21 -0
  160. package/src/core/scope.ts +70 -0
  161. package/src/core/scroll-track.ts +106 -0
  162. package/src/core/split.ts +68 -0
  163. package/src/core/spring.ts +22 -0
  164. package/src/core/styles.ts +31 -0
  165. package/src/core/timing.ts +204 -0
  166. package/src/core/types.ts +20 -0
  167. package/src/core/visible.ts +19 -0
  168. package/src/css/base.css +142 -0
  169. package/src/css/controls/README.md +122 -0
  170. package/src/css/controls/burger.css +67 -0
  171. package/src/css/controls/button.css +226 -0
  172. package/src/css/controls/checkbox.css +53 -0
  173. package/src/css/controls/chip.css +85 -0
  174. package/src/css/controls/field.css +124 -0
  175. package/src/css/controls/glass.css +220 -0
  176. package/src/css/controls/icon.css +26 -0
  177. package/src/css/controls/segmented.css +60 -0
  178. package/src/css/controls/switch.css +72 -0
  179. package/src/css/default-theme.css +123 -0
  180. package/src/css/effects/README.md +134 -0
  181. package/src/css/effects/anim.css +224 -0
  182. package/src/css/effects/fade.css +15 -0
  183. package/src/css/effects/float.css +64 -0
  184. package/src/css/effects/frost.css +62 -0
  185. package/src/css/effects/grain.css +58 -0
  186. package/src/css/effects/loading.css +60 -0
  187. package/src/css/effects/success.css +22 -0
  188. package/src/css/effects/text.css +67 -0
  189. package/src/css/fonts.css +3 -0
  190. package/src/css/states.css +51 -0
  191. package/src/css/themes/black-green.css +126 -0
  192. package/src/css/themes/black.css +126 -0
  193. package/src/css/themes/blue.css +126 -0
  194. package/src/css/themes/brown.css +126 -0
  195. package/src/css/themes/cold-blue.css +126 -0
  196. package/src/css/themes/funny.css +126 -0
  197. package/src/css/themes/gray.css +126 -0
  198. package/src/css/themes/green.css +126 -0
  199. package/src/css/themes/modern-1.css +126 -0
  200. package/src/css/themes/neogreen.css +126 -0
  201. package/src/css/themes/new.css +126 -0
  202. package/src/css/themes/new2.css +126 -0
  203. package/src/css/themes/oled.css +126 -0
  204. package/src/css/themes/orange.css +126 -0
  205. package/src/css/themes/pastel-pink.css +126 -0
  206. package/src/css/themes/pink.css +126 -0
  207. package/src/css/themes/purple.css +126 -0
  208. package/src/css/themes/red.css +126 -0
  209. package/src/css/themes/super-blue.css +126 -0
  210. package/src/css/tokens.css +182 -0
  211. package/src/elements/base.ts +76 -0
  212. package/src/elements/index.ts +48 -0
  213. package/src/gl/index.ts +15 -0
  214. package/src/gl/liquid-blend/README.md +23 -0
  215. package/src/gl/liquid-blend/create-liquid-blend.ts +7 -0
  216. package/src/gl/liquid-blend/shader.ts +9 -0
  217. package/src/gl/matcap/README.md +23 -0
  218. package/src/gl/matcap/create-matcap.ts +7 -0
  219. package/src/gl/matcap/shader.ts +16 -0
  220. package/src/gl/particle-hero/README.md +41 -0
  221. package/src/gl/particle-hero/create-particle-hero.ts +544 -0
  222. package/src/gl/particle-hero/particle-hero.css +19 -0
  223. package/src/gl/particle-hero/shaders.ts +84 -0
  224. package/src/gl/shader-blur/README.md +23 -0
  225. package/src/gl/shader-blur/create-shader-blur.ts +7 -0
  226. package/src/gl/shader-blur/shader.ts +11 -0
  227. package/src/gl/shader-grain/README.md +23 -0
  228. package/src/gl/shader-grain/create-shader-grain.ts +7 -0
  229. package/src/gl/shader-grain/shader.ts +6 -0
  230. package/src/gl/shared/create-shader-effect.ts +186 -0
  231. package/src/gl/shared/shader.css +3 -0
  232. package/src/gl/shared/shaders.ts +30 -0
  233. package/src/index.ts +177 -0
  234. package/src/motion/anchor.ts +45 -0
  235. package/src/motion/chat.ts +97 -0
  236. package/src/motion/confetti.ts +130 -0
  237. package/src/motion/count.ts +95 -0
  238. package/src/motion/details.ts +70 -0
  239. package/src/motion/drag-dismiss.ts +231 -0
  240. package/src/motion/effects.ts +81 -0
  241. package/src/motion/entrances.ts +27 -0
  242. package/src/motion/floating.ts +389 -0
  243. package/src/motion/flow.ts +115 -0
  244. package/src/motion/indicator.ts +44 -0
  245. package/src/motion/layout.ts +39 -0
  246. package/src/motion/liquid.ts +227 -0
  247. package/src/motion/morph.ts +540 -0
  248. package/src/motion/reveal.ts +112 -0
  249. package/src/motion/sheet.ts +65 -0
  250. package/src/motion/surface.ts +108 -0
  251. package/src/react/animated-number.tsx +30 -0
  252. package/src/react/flip-group.tsx +44 -0
  253. package/src/react/frost.tsx +33 -0
  254. package/src/react/index.ts +80 -0
  255. package/src/react/slot-text.tsx +44 -0
  256. package/src/react/theme-provider.tsx +42 -0
  257. package/src/react/use-card-dock.ts +9 -0
  258. package/src/react/use-cascade.ts +9 -0
  259. package/src/react/use-contrast.ts +9 -0
  260. package/src/react/use-counter.ts +8 -0
  261. package/src/react/use-curved-carousel.ts +10 -0
  262. package/src/react/use-depth-grid.ts +9 -0
  263. package/src/react/use-details.ts +7 -0
  264. package/src/react/use-dock-pill.ts +10 -0
  265. package/src/react/use-drag-ruler.ts +10 -0
  266. package/src/react/use-fill-text.ts +9 -0
  267. package/src/react/use-fit-text.ts +8 -0
  268. package/src/react/use-flow.ts +8 -0
  269. package/src/react/use-frame-zoom.ts +9 -0
  270. package/src/react/use-infinite-reel.ts +8 -0
  271. package/src/react/use-letters.ts +9 -0
  272. package/src/react/use-liquid-blend.ts +8 -0
  273. package/src/react/use-marquee.ts +9 -0
  274. package/src/react/use-mask-text.ts +9 -0
  275. package/src/react/use-matcap.ts +8 -0
  276. package/src/react/use-parallax.ts +9 -0
  277. package/src/react/use-particle-hero.ts +9 -0
  278. package/src/react/use-pile.ts +8 -0
  279. package/src/react/use-pop.ts +8 -0
  280. package/src/react/use-radial-menu.ts +10 -0
  281. package/src/react/use-recipe.ts +38 -0
  282. package/src/react/use-reflow.ts +9 -0
  283. package/src/react/use-repel-bento.ts +8 -0
  284. package/src/react/use-reveal.ts +8 -0
  285. package/src/react/use-rotator.ts +10 -0
  286. package/src/react/use-shader-blur.ts +8 -0
  287. package/src/react/use-shader-grain.ts +8 -0
  288. package/src/react/use-slot-text.ts +17 -0
  289. package/src/react/use-snap-strip.ts +9 -0
  290. package/src/react/use-sortable.ts +14 -0
  291. package/src/react/use-spring-cards.ts +8 -0
  292. package/src/react/use-stretch-footer.ts +20 -0
  293. package/src/react/use-tabs.ts +10 -0
  294. package/src/react/use-text-roll.ts +9 -0
  295. package/src/react/use-ticket-menu.ts +15 -0
  296. package/src/react/use-words.ts +8 -0
  297. package/src/recipes/card-dock/README.md +36 -0
  298. package/src/recipes/card-dock/card-dock.css +178 -0
  299. package/src/recipes/card-dock/create-card-dock.ts +97 -0
  300. package/src/recipes/cascade/README.md +33 -0
  301. package/src/recipes/cascade/create-cascade.ts +111 -0
  302. package/src/recipes/contrast/README.md +29 -0
  303. package/src/recipes/contrast/create-contrast.ts +68 -0
  304. package/src/recipes/counter/README.md +42 -0
  305. package/src/recipes/counter/create-counter.ts +84 -0
  306. package/src/recipes/curved-carousel/README.md +50 -0
  307. package/src/recipes/curved-carousel/carousel-math.ts +20 -0
  308. package/src/recipes/curved-carousel/create-curved-carousel.ts +257 -0
  309. package/src/recipes/curved-carousel/curved-carousel.css +50 -0
  310. package/src/recipes/depth-grid/README.md +30 -0
  311. package/src/recipes/depth-grid/create-depth-grid.ts +120 -0
  312. package/src/recipes/details/README.md +31 -0
  313. package/src/recipes/details/create-details.ts +27 -0
  314. package/src/recipes/dock-pill/README.md +23 -0
  315. package/src/recipes/dock-pill/create-dock-pill.ts +68 -0
  316. package/src/recipes/dock-pill/dock-pill.css +5 -0
  317. package/src/recipes/drag-ruler/README.md +21 -0
  318. package/src/recipes/drag-ruler/create-drag-ruler.ts +95 -0
  319. package/src/recipes/drag-ruler/drag-ruler.css +16 -0
  320. package/src/recipes/fill-text/README.md +27 -0
  321. package/src/recipes/fill-text/create-fill-text.ts +93 -0
  322. package/src/recipes/fit-text/README.md +37 -0
  323. package/src/recipes/fit-text/create-fit-text.ts +55 -0
  324. package/src/recipes/fit-text/fit-text.css +6 -0
  325. package/src/recipes/flow/README.md +46 -0
  326. package/src/recipes/flow/create-flow.ts +55 -0
  327. package/src/recipes/frame-zoom/README.md +29 -0
  328. package/src/recipes/frame-zoom/create-frame-zoom.ts +91 -0
  329. package/src/recipes/infinite-reel/README.md +23 -0
  330. package/src/recipes/infinite-reel/create-infinite-reel.ts +140 -0
  331. package/src/recipes/infinite-reel/infinite-reel.css +8 -0
  332. package/src/recipes/letters/README.md +30 -0
  333. package/src/recipes/letters/create-letters.ts +113 -0
  334. package/src/recipes/marquee/README.md +32 -0
  335. package/src/recipes/marquee/create-marquee.ts +74 -0
  336. package/src/recipes/marquee/marquee.css +41 -0
  337. package/src/recipes/mask-text/README.md +39 -0
  338. package/src/recipes/mask-text/create-mask-text.ts +134 -0
  339. package/src/recipes/parallax/README.md +31 -0
  340. package/src/recipes/parallax/create-parallax.ts +74 -0
  341. package/src/recipes/pile/README.md +48 -0
  342. package/src/recipes/pile/create-pile.ts +50 -0
  343. package/src/recipes/pile/pile-math.ts +27 -0
  344. package/src/recipes/pile/pile.css +63 -0
  345. package/src/recipes/pill/README.md +30 -0
  346. package/src/recipes/pill/pill.css +48 -0
  347. package/src/recipes/pop/README.md +36 -0
  348. package/src/recipes/pop/create-pop.ts +52 -0
  349. package/src/recipes/radial-menu/README.md +44 -0
  350. package/src/recipes/radial-menu/create-radial-menu.ts +96 -0
  351. package/src/recipes/radial-menu/radial-menu.css +45 -0
  352. package/src/recipes/reflow/README.md +47 -0
  353. package/src/recipes/reflow/create-reflow.ts +49 -0
  354. package/src/recipes/repel-bento/README.md +21 -0
  355. package/src/recipes/repel-bento/create-repel-bento.ts +65 -0
  356. package/src/recipes/repel-bento/repel-bento.css +3 -0
  357. package/src/recipes/reveal/README.md +36 -0
  358. package/src/recipes/reveal/create-reveal.ts +48 -0
  359. package/src/recipes/rotator/README.md +21 -0
  360. package/src/recipes/rotator/create-rotator.ts +66 -0
  361. package/src/recipes/rotator/rotator.css +3 -0
  362. package/src/recipes/slot-text/README.md +44 -0
  363. package/src/recipes/slot-text/create-slot-text.ts +244 -0
  364. package/src/recipes/slot-text/slot-text.css +42 -0
  365. package/src/recipes/snap-strip/README.md +31 -0
  366. package/src/recipes/snap-strip/create-snap-strip.ts +133 -0
  367. package/src/recipes/snap-strip/snap-strip.css +23 -0
  368. package/src/recipes/sortable/README.md +88 -0
  369. package/src/recipes/sortable/create-sortable.ts +863 -0
  370. package/src/recipes/sortable/sortable.css +40 -0
  371. package/src/recipes/spring-cards/README.md +48 -0
  372. package/src/recipes/spring-cards/create-spring-cards.ts +140 -0
  373. package/src/recipes/spring-cards/spring-cards.css +23 -0
  374. package/src/recipes/stretch-footer/README.md +44 -0
  375. package/src/recipes/stretch-footer/create-stretch-footer.ts +69 -0
  376. package/src/recipes/stretch-footer/stretch-footer.css +28 -0
  377. package/src/recipes/tabs/README.md +39 -0
  378. package/src/recipes/tabs/create-tabs.ts +91 -0
  379. package/src/recipes/tabs/tabs.css +19 -0
  380. package/src/recipes/text-roll/README.md +35 -0
  381. package/src/recipes/text-roll/create-text-roll.ts +137 -0
  382. package/src/recipes/text-roll/text-roll.css +21 -0
  383. package/src/recipes/ticket-menu/README.md +24 -0
  384. package/src/recipes/ticket-menu/create-ticket-menu.ts +6 -0
  385. package/src/recipes/words/README.md +43 -0
  386. package/src/recipes/words/create-words.ts +114 -0
  387. package/src/theme/css-format.ts +32 -0
  388. package/src/theme/generate.ts +72 -0
  389. package/src/theme/index.ts +15 -0
  390. package/src/theme/presets.ts +79 -0
  391. package/src/theme/theme.ts +119 -0
@@ -0,0 +1,91 @@
1
+ # island
2
+
3
+ Una isla de cristal esmerilado fija arriba y centrada que crece hasta ser un panel: la fila del contenido pasa de `0fr` a `1fr` (0.6 s `cubic-bezier(.625,.05,0,1)`, 0.125 s después), el radio pasa de 3em a 2em, la página de detrás se oscurece a .4 (0.7 s, 0.1 s después) y las filas del panel suben 3em desde 0.15 s, 25 ms una tras otra. Varios botones comparten la isla: el mismo cierra, otro cambia directamente a su panel. Escape, el fondo, un enlace del panel y hacer scroll después de una rueda o un toque la cierran. Al cargar cae desde −300 % en 1.8 s. En las tarjetas, pasar sobre una baja las demás al 20 % y su imagen crece a 1.04.
4
+
5
+ Origen: iyo.ai, navbar de la home (`nav`/`d3`): cristal `blur(20px)` sobre `#38383899` con gradiente `141deg #a9c2f214 → #62718c24`, ancho 23.5rem (28rem desde 1920 px; a lo ancho con 1rem / 5vw de margen en móvil), botones de 2.5rem. iyo da solo la duración de la entrada, así que se usa la curva por defecto de GSAP (`power1.out`). El icono de nueve puntos es estático, como en iyo.
6
+
7
+ ## HTML / Astro
8
+
9
+ ```html
10
+ <mk-island aria-label="Principal">
11
+ <button type="button" class="mk-island__backdrop" data-mk-island-close tabindex="-1" aria-label="Cerrar"></button>
12
+ <div class="mk-island__shell">
13
+ <div class="mk-island__glass" aria-hidden="true"></div>
14
+ <div class="mk-island__header">
15
+ <a href="/" class="mk-island__brand">Marca</a>
16
+ <div class="mk-island__actions">
17
+ <a href="#producto" class="mk-island__cta">Explorar</a>
18
+ <button type="button" class="mk-island__button" data-mk-island-toggle="menu" aria-label="Menú">
19
+ <span class="mk-island__dots" aria-hidden="true"><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i></span>
20
+ </button>
21
+ <span class="mk-island__separator" aria-hidden="true"></span>
22
+ <button type="button" class="mk-island__button mk-island__button--light" data-mk-island-toggle="cart" aria-label="Carrito">
23
+ …
24
+ </button>
25
+ </div>
26
+ </div>
27
+ <div class="mk-island__content">
28
+ <div>
29
+ <section class="mk-island__panel" data-mk-island-panel="menu" aria-label="Productos">
30
+ <div class="mk-island__row" data-mk-island-item>
31
+ <a class="mk-island-card" href="/uno">Uno <span class="mk-island-card__visual" aria-hidden="true"></span></a>
32
+ <a class="mk-island-card" href="/dos" aria-current="page">Dos</a>
33
+ </div>
34
+ <div class="mk-island__foot" data-mk-island-item><span>Estudio</span><span>2026</span></div>
35
+ </section>
36
+ <section class="mk-island__panel" data-mk-island-panel="cart" aria-label="Carrito">
37
+ <p data-mk-island-item>Vacío</p>
38
+ </section>
39
+ </div>
40
+ </div>
41
+ </div>
42
+ </mk-island>
43
+ <script>
44
+ import { defineElements } from '@yewdiel21/motion-kit/elements';
45
+ defineElements(['mk-island']);
46
+ </script>
47
+ ```
48
+
49
+ Con la clase `mk-island` sirve cualquier etiqueta (`<nav class="mk-island">` + `createIsland(nav)`). `mk-island--contained` la deja (con su fondo) dentro de un padre posicionado en vez de fija sobre la página.
50
+
51
+ ## React
52
+
53
+ ```tsx
54
+ <Island
55
+ brand={<a href="/">Marca</a>}
56
+ cta={{ href: '#producto', label: 'Explorar' }}
57
+ panels={[
58
+ {
59
+ name: 'menu',
60
+ label: 'Menú',
61
+ content: (
62
+ <div className="mk-island__row" data-mk-island-item>
63
+ …
64
+ </div>
65
+ ),
66
+ },
67
+ { name: 'cart', label: 'Carrito', light: true, icon: <CartIcon />, content: <p data-mk-island-item>Vacío</p> },
68
+ ]}
69
+ onChange={(active) => console.log(active)}
70
+ />
71
+ ```
72
+
73
+ ## Opciones
74
+
75
+ | Opción | Atributo | Por defecto | Qué hace |
76
+ | ----------------- | -------------------------- | ----------- | ---------------------------------------------------------- |
77
+ | `entrance` | `entrance="false\|manual"` | `true` | Caer desde −300 % al cargar; `'manual'` espera a `ready()` |
78
+ | `closeOnScroll` | `close-on-scroll` | `true` | Cerrar al moverse la página tras una rueda o un toque |
79
+ | `closeOnNavigate` | `close-on-navigate` | `true` | Cerrar al seguir un enlace del panel |
80
+ | `focusOnOpen` | `focus-on-open` | `true` | Enfocar el primer control del panel (150 ms) |
81
+ | `onChange` | evento `mk:island` | — | Panel abierto o `null` |
82
+
83
+ API: `createIsland(root, options)` → `{ open(name), close(), toggle(name), ready(), active, destroy }`.
84
+
85
+ ## Variables CSS
86
+
87
+ `--mk-island-width`, `--mk-island-top`, `--mk-island-fg`, `--mk-island-glass`, `--mk-island-tint`, `--mk-island-blur`, `--mk-island-button(-active)`, `--mk-island-button-light(-active)`, `--mk-island-line`, `--mk-ease-island`, `--mk-ease-island-radius`, `--mk-ease-island-veil`. Filas del panel: `--mk-island-delay` (la escribe el motor).
88
+
89
+ ## Accesibilidad
90
+
91
+ Navegación no modal: no atrapa el foco ni bloquea el scroll. Los botones llevan `aria-expanded` y `aria-controls`; los paneles cerrados `inert` y `aria-hidden`; el CTA queda `inert` mientras hay un panel abierto. Escape y el fondo devuelven el foco al botón. La tarjeta de la página actual (`aria-current="page"`) queda al 20 % y sin puntero. Con movimiento reducido no hay entrada ni transiciones.
@@ -0,0 +1,45 @@
1
+ import { MkElement, defineElement, type OptionType } from '../../elements/base';
2
+ import { createIsland, type IslandInstance, type IslandOptions } from './engine';
3
+
4
+ /**
5
+ * <mk-island [entrance="false|manual"] [close-on-scroll="false"] [close-on-navigate="false"] [focus-on-open="false"]>
6
+ * <button class="mk-island__backdrop" data-mk-island-close tabindex="-1" aria-label="Cerrar"></button>
7
+ * <div class="mk-island__shell">…header with [data-mk-island-toggle="menu"]…
8
+ * <div class="mk-island__content"><div><section data-mk-island-panel="menu">…</section></div></div>
9
+ * </div>
10
+ * </mk-island>
11
+ * Emits `mk:island` (detail: { active }) when a panel opens or closes.
12
+ */
13
+ export class MkIslandElement extends MkElement<IslandInstance> {
14
+ static options: Record<string, OptionType> = {
15
+ entrance: 'string',
16
+ closeOnScroll: 'boolean',
17
+ closeOnNavigate: 'boolean',
18
+ focusOnOpen: 'boolean',
19
+ };
20
+
21
+ protected create(options: Record<string, unknown>) {
22
+ const entrance: IslandOptions['entrance'] = options.entrance === 'false' ? false : options.entrance === 'manual' ? 'manual' : true;
23
+ return createIsland(this, {
24
+ entrance,
25
+ closeOnScroll: options.closeOnScroll as boolean | undefined,
26
+ closeOnNavigate: options.closeOnNavigate as boolean | undefined,
27
+ focusOnOpen: options.focusOnOpen as boolean | undefined,
28
+ onChange: (active) => this.dispatchEvent(new CustomEvent('mk:island', { detail: { active }, bubbles: true })),
29
+ });
30
+ }
31
+
32
+ open(name?: string) {
33
+ this.instance?.open(name);
34
+ }
35
+
36
+ close() {
37
+ this.instance?.close();
38
+ }
39
+
40
+ ready() {
41
+ this.instance?.ready();
42
+ }
43
+ }
44
+
45
+ export const defineIsland = () => defineElement('mk-island', MkIslandElement);
@@ -0,0 +1,200 @@
1
+ import { gsap, registerMotion } from '../../core/gsap';
2
+ import { entrances, reduced } from '../../core/reduced';
3
+ import { createScope } from '../../core/scope';
4
+ import { TIMING } from '../../core/timing';
5
+ import { inert, warnOnce, type Instance } from '../../core/types';
6
+
7
+ /*
8
+ * iyo.ai's floating navbar: a frosted glass pill centred at the top that grows
9
+ * into a rounded panel (CSS grid rows 0fr → 1fr, 0.6 s cubic-bezier(.625,.05,0,1),
10
+ * 0.125 s late; radius 3em → 2em) while the page behind darkens to .4 and the
11
+ * panel's rows rise in 0.15 s + 0.025 s apart. Several triggers share the shell:
12
+ * the same one closes, another switches straight to its panel. Escape, the
13
+ * backdrop, a link inside and scrolling after a wheel/touch close it. On load it
14
+ * drops in from −300 % over 1.8 s.
15
+ *
16
+ * Markup: [data-mk-island-toggle="name"] buttons, [data-mk-island-panel="name"]
17
+ * sections, [data-mk-island-item] rows, [data-mk-island-close] backdrop,
18
+ * .mk-island__shell and .mk-island__cta (hidden while open).
19
+ */
20
+
21
+ export interface IslandOptions {
22
+ /** Drop in from above on load (true), wait for ready() ('manual') or not at all. */
23
+ entrance?: boolean | 'manual';
24
+ /** Close when the page scrolls after a wheel or touch (iyo). */
25
+ closeOnScroll?: boolean;
26
+ /** Close when a link inside a panel is followed. */
27
+ closeOnNavigate?: boolean;
28
+ /** Focus the first control of the panel that opens. */
29
+ focusOnOpen?: boolean;
30
+ /** The open panel's name, or null when it closes. */
31
+ onChange?: (active: string | null) => void;
32
+ }
33
+
34
+ export interface IslandInstance extends Instance {
35
+ open(name?: string): void;
36
+ close(returnFocus?: boolean): void;
37
+ toggle(name?: string): void;
38
+ /** Play the entrance (entrance: 'manual'). */
39
+ ready(): void;
40
+ readonly active: string | null;
41
+ }
42
+
43
+ let sequence = 0;
44
+ const FOCUSABLE =
45
+ 'a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])';
46
+
47
+ export function createIsland(root: HTMLElement | null, options: IslandOptions = {}): IslandInstance {
48
+ const shell = root?.querySelector<HTMLElement>('.mk-island__shell') ?? null;
49
+ const panels = root ? [...root.querySelectorAll<HTMLElement>('[data-mk-island-panel]')] : [];
50
+ if (!root || !shell || !panels.length) {
51
+ warnOnce('island: needs .mk-island__shell and at least one [data-mk-island-panel]');
52
+ return inert({ open() {}, close() {}, toggle() {}, ready() {}, active: null });
53
+ }
54
+ const t = TIMING.island;
55
+ const { entrance = true, closeOnScroll = true, closeOnNavigate = true, focusOnOpen = true, onChange } = options;
56
+ registerMotion();
57
+ const scope = createScope();
58
+ const toggles = [...root.querySelectorAll<HTMLElement>('[data-mk-island-toggle]')];
59
+ const cta = root.querySelector<HTMLElement>('.mk-island__cta');
60
+ const backdrops = [...root.querySelectorAll<HTMLElement>('[data-mk-island-close]')];
61
+ let active: string | null = null;
62
+ let trigger: HTMLElement | null = null;
63
+ let scrollStart = 0;
64
+ let armed = false;
65
+ let focusTimer: ReturnType<typeof setTimeout> | undefined;
66
+ let entered = false;
67
+ let entry: gsap.core.Tween | null = null;
68
+
69
+ const flag = (el: Element | null, name: string, on: boolean) => {
70
+ if (el) scope.attr(el, name, on ? '' : null);
71
+ };
72
+ const sync = () => {
73
+ for (const panel of panels) {
74
+ const on = panel.dataset.mkIslandPanel === active;
75
+ // A closing panel stays in the collapsing grid for its exit.
76
+ if (active) flag(panel, 'hidden', !on);
77
+ scope.attr(panel, 'aria-hidden', String(!on));
78
+ flag(panel, 'inert', !on);
79
+ }
80
+ for (const button of toggles) scope.attr(button, 'aria-expanded', String(button.dataset.mkIslandToggle === active));
81
+ flag(cta, 'inert', Boolean(active));
82
+ for (const backdrop of backdrops) {
83
+ flag(backdrop, 'inert', !active);
84
+ scope.attr(backdrop, 'aria-hidden', String(!active));
85
+ }
86
+ flag(root, 'data-mk-open', Boolean(active));
87
+ scope.attr(root, 'data-mk-active', active);
88
+ };
89
+ const stagger = (opening: boolean) => {
90
+ root.querySelectorAll<HTMLElement>('[data-mk-island-item]').forEach((item, index) => {
91
+ // Saves the original style once, so destroy() puts it back.
92
+ scope.attr(item, 'style', item.getAttribute('style'));
93
+ item.style.setProperty('--mk-island-delay', opening ? `${Number((t.delay + index * t.step).toFixed(3))}s` : '0s');
94
+ });
95
+ };
96
+
97
+ const close = (returnFocus = true) => {
98
+ if (scope.disposed || !active) return;
99
+ clearTimeout(focusTimer);
100
+ active = null;
101
+ stagger(false);
102
+ sync();
103
+ onChange?.(null);
104
+ if (returnFocus && trigger?.isConnected) trigger.focus({ preventScroll: true });
105
+ };
106
+ const open = (name = panels[0]!.dataset.mkIslandPanel!, source?: HTMLElement) => {
107
+ if (scope.disposed) return;
108
+ const panel = panels.find((el) => el.dataset.mkIslandPanel === name);
109
+ if (!panel) return;
110
+ const wasClosed = !active;
111
+ clearTimeout(focusTimer);
112
+ active = name;
113
+ trigger = source ?? toggles.find((el) => el.dataset.mkIslandToggle === name) ?? trigger;
114
+ if (wasClosed) {
115
+ scrollStart = window.scrollY;
116
+ armed = false;
117
+ stagger(true);
118
+ }
119
+ sync();
120
+ onChange?.(name);
121
+ if (focusOnOpen)
122
+ focusTimer = setTimeout(
123
+ () => {
124
+ if (active !== name) return;
125
+ const first = [...panel.querySelectorAll<HTMLElement>(FOCUSABLE)].find((el) => !el.closest('[hidden], [inert]'));
126
+ (first ?? panel).focus({ preventScroll: true });
127
+ },
128
+ reduced() ? 0 : t.focus,
129
+ );
130
+ };
131
+ const toggle = (name = panels[0]!.dataset.mkIslandPanel!, source?: HTMLElement) => (active === name ? close(false) : open(name, source));
132
+
133
+ for (const panel of panels) {
134
+ if (!panel.id) scope.attr(panel, 'id', `mk-island-panel-${++sequence}`);
135
+ if (!panel.hasAttribute('tabindex')) scope.attr(panel, 'tabindex', '-1');
136
+ if (!panel.hasAttribute('role')) scope.attr(panel, 'role', 'region');
137
+ }
138
+ for (const button of toggles) {
139
+ const panel = panels.find((el) => el.dataset.mkIslandPanel === button.dataset.mkIslandToggle);
140
+ if (panel) scope.attr(button, 'aria-controls', panel.id);
141
+ scope.on(button, 'click', () => toggle(button.dataset.mkIslandToggle, button));
142
+ }
143
+ for (const backdrop of backdrops) scope.on(backdrop, 'click', () => close(true));
144
+ scope.on(document, 'keydown', (event) => {
145
+ if (active && (event as KeyboardEvent).key === 'Escape') {
146
+ event.preventDefault();
147
+ close(true);
148
+ }
149
+ });
150
+ if (closeOnNavigate)
151
+ scope.on(root, 'click', (event) => {
152
+ const link = (event.target as Element | null)?.closest?.('a[href]');
153
+ if (active && link?.closest('[data-mk-island-panel]')) close(false);
154
+ });
155
+ if (closeOnScroll) {
156
+ const arm = () => {
157
+ if (active) armed = true;
158
+ };
159
+ scope.on(window, 'wheel', arm, { passive: true });
160
+ scope.on(window, 'touchmove', arm, { passive: true });
161
+ scope.on(
162
+ window,
163
+ 'scroll',
164
+ () => {
165
+ if (active && armed && Math.abs(window.scrollY - scrollStart) > 1) close(false);
166
+ },
167
+ { passive: true },
168
+ );
169
+ }
170
+ scope.add(() => clearTimeout(focusTimer));
171
+
172
+ // iyo's entrance gives only a duration, so GSAP's default ease (power1.out) applies.
173
+ const moving = entrance !== false && entrances();
174
+ if (moving) gsap.set(shell, { yPercent: t.offset });
175
+ const ready = () => {
176
+ if (scope.disposed || entered || !moving) return;
177
+ entered = true;
178
+ entry = gsap.to(shell, { yPercent: 0, duration: t.entrance });
179
+ };
180
+ scope.add(() => {
181
+ entry?.kill();
182
+ if (moving) gsap.set(shell, { clearProps: 'transform,translate' });
183
+ if (shell.getAttribute('style') === '') shell.removeAttribute('style');
184
+ });
185
+
186
+ sync();
187
+ if (entrance === true) ready();
188
+ scope.attr(root, 'data-mk-ready', '');
189
+
190
+ return {
191
+ open: (name?: string) => open(name),
192
+ close,
193
+ toggle: (name?: string) => toggle(name),
194
+ ready,
195
+ get active() {
196
+ return active;
197
+ },
198
+ destroy: () => scope.dispose(),
199
+ };
200
+ }
@@ -0,0 +1,300 @@
1
+ /*
2
+ * iyo.ai's floating navbar: frosted glass pill at the top that grows into a
3
+ * panel. Fixed over the page by default; .mk-island--contained keeps it (and its
4
+ * backdrop) inside a positioned parent, for previews.
5
+ */
6
+ :is(.mk-island, mk-island) {
7
+ --mk-island-width: 23.5rem;
8
+ --mk-island-top: 2rem;
9
+ --mk-island-fg: #f9f9fb;
10
+ --mk-island-glass: #38383899;
11
+ --mk-island-tint: linear-gradient(141deg, #a9c2f214, #62718c24);
12
+ --mk-island-blur: 20px;
13
+ --mk-island-button: #11111180;
14
+ --mk-island-button-active: #111c;
15
+ --mk-island-button-light: #d9d9d980;
16
+ --mk-island-button-light-active: #d9d9d9cc;
17
+ --mk-island-line: #dddee34d;
18
+ --mk-ease-island: cubic-bezier(0.625, 0.05, 0, 1);
19
+ --mk-ease-island-radius: cubic-bezier(0.4, 0, 0.2, 1);
20
+ --mk-ease-island-veil: cubic-bezier(0.5, 0.5, 0, 1);
21
+ position: fixed;
22
+ inset: 0;
23
+ z-index: 500;
24
+ display: block;
25
+ pointer-events: none;
26
+ color: var(--mk-island-fg);
27
+ }
28
+ .mk-island--contained {
29
+ position: absolute;
30
+ z-index: 2;
31
+ }
32
+ .mk-island__shell {
33
+ position: absolute;
34
+ top: var(--mk-island-top);
35
+ right: 0;
36
+ left: 0;
37
+ width: var(--mk-island-width);
38
+ max-width: calc(100% - 2rem);
39
+ margin-inline: auto;
40
+ border-radius: 3em;
41
+ isolation: isolate;
42
+ transition: border-radius 0.4s var(--mk-ease-island-radius) 0.45s;
43
+ }
44
+ .mk-island__glass {
45
+ position: absolute;
46
+ inset: 0;
47
+ z-index: -1;
48
+ border-radius: inherit;
49
+ background-color: var(--mk-island-glass);
50
+ background-image: var(--mk-island-tint);
51
+ -webkit-backdrop-filter: blur(var(--mk-island-blur));
52
+ backdrop-filter: blur(var(--mk-island-blur));
53
+ pointer-events: none;
54
+ }
55
+ .mk-island__header {
56
+ display: flex;
57
+ align-items: center;
58
+ justify-content: space-between;
59
+ gap: 0.8rem;
60
+ padding: 0.7rem 0.7rem 0.7rem 1.625rem;
61
+ pointer-events: auto;
62
+ }
63
+ .mk-island__brand {
64
+ color: inherit;
65
+ font-size: 1.4rem;
66
+ font-weight: 700;
67
+ letter-spacing: -0.07em;
68
+ text-decoration: none;
69
+ }
70
+ .mk-island__actions {
71
+ display: flex;
72
+ align-items: center;
73
+ gap: 0.55rem;
74
+ }
75
+ .mk-island__button {
76
+ display: grid;
77
+ place-items: center;
78
+ width: 2.5rem;
79
+ height: 2.5rem;
80
+ padding: 0;
81
+ border: 0;
82
+ border-radius: 50%;
83
+ background: var(--mk-island-button);
84
+ color: #fff;
85
+ font: inherit;
86
+ cursor: pointer;
87
+ transition: background-color 0.3s ease;
88
+ }
89
+ .mk-island__button--light {
90
+ background: var(--mk-island-button-light);
91
+ color: #101010;
92
+ }
93
+ :is(.mk-island, mk-island)[data-mk-active] .mk-island__button[aria-expanded='true'] {
94
+ background: var(--mk-island-button-active);
95
+ }
96
+ :is(.mk-island, mk-island)[data-mk-active] .mk-island__button--light[aria-expanded='true'] {
97
+ background: var(--mk-island-button-light-active);
98
+ }
99
+ :is(.mk-island, mk-island) :is(.mk-island__button, a):focus-visible {
100
+ outline: 2px solid currentColor;
101
+ outline-offset: 4px;
102
+ }
103
+ .mk-island__dots {
104
+ display: grid;
105
+ grid-template-columns: repeat(3, 3.5px);
106
+ gap: 2.5px;
107
+ }
108
+ .mk-island__dots > i {
109
+ width: 3.5px;
110
+ height: 3.5px;
111
+ border-radius: 50%;
112
+ background: currentColor;
113
+ }
114
+ .mk-island__separator {
115
+ width: 1px;
116
+ height: 1.2rem;
117
+ background: var(--mk-island-line);
118
+ }
119
+ .mk-island__cta {
120
+ color: inherit;
121
+ font-size: 0.75rem;
122
+ text-decoration: none;
123
+ transition: opacity 0.3s ease-out;
124
+ }
125
+ :is(.mk-island, mk-island)[data-mk-open] .mk-island__cta {
126
+ opacity: 0;
127
+ pointer-events: none;
128
+ }
129
+
130
+ /* The panel: grid rows 0fr → 1fr, 0.125 s after the radius starts to change. */
131
+ .mk-island__content {
132
+ display: grid;
133
+ grid-template-rows: 0fr;
134
+ overflow: hidden;
135
+ transition:
136
+ grid-template-rows 0.6s var(--mk-ease-island),
137
+ border-radius 0.4s var(--mk-ease-island-radius) 0.35s;
138
+ }
139
+ .mk-island__content > * {
140
+ min-height: 0;
141
+ overflow: hidden;
142
+ pointer-events: auto;
143
+ }
144
+ :is(.mk-island, mk-island)[data-mk-open] .mk-island__shell {
145
+ border-radius: 2em;
146
+ transition-delay: 0s;
147
+ }
148
+ :is(.mk-island, mk-island)[data-mk-open] .mk-island__content {
149
+ grid-template-rows: 1fr;
150
+ border-radius: 2em;
151
+ transition-delay: 0.125s, 0s;
152
+ }
153
+ .mk-island__panel {
154
+ max-height: calc(100dvh - 9rem);
155
+ padding: 1rem 2rem 1.5rem;
156
+ overflow: auto;
157
+ overscroll-behavior: contain;
158
+ }
159
+ .mk-island__panel:focus {
160
+ outline: none;
161
+ }
162
+ :is(.mk-island, mk-island) [data-mk-island-panel][hidden] {
163
+ display: none;
164
+ }
165
+ :is(.mk-island, mk-island) [data-mk-island-item] {
166
+ opacity: 0;
167
+ transform: translateY(3em);
168
+ transition:
169
+ transform 0.6s var(--mk-ease-island),
170
+ opacity 0.6s var(--mk-ease-island);
171
+ transition-delay: var(--mk-island-delay, 0s);
172
+ }
173
+ :is(.mk-island, mk-island)[data-mk-open] [data-mk-island-item] {
174
+ opacity: 1;
175
+ transform: none;
176
+ }
177
+ .mk-island__row {
178
+ display: flex;
179
+ gap: 0.35rem;
180
+ margin-bottom: 0.35rem;
181
+ }
182
+ .mk-island__foot {
183
+ display: flex;
184
+ justify-content: space-between;
185
+ gap: 1rem;
186
+ padding-top: 1rem;
187
+ font-size: 0.6rem;
188
+ letter-spacing: 0.07em;
189
+ text-transform: uppercase;
190
+ opacity: 0.55;
191
+ }
192
+
193
+ /* Cards: hovering one dims the others to 20 %; its picture grows to 1.04. */
194
+ .mk-island-card {
195
+ display: flex;
196
+ flex: 1;
197
+ align-items: flex-start;
198
+ justify-content: space-between;
199
+ gap: 0.5rem;
200
+ min-width: 0;
201
+ min-height: 5rem;
202
+ padding: 1rem 0.8rem;
203
+ border-radius: 0.8rem;
204
+ background: linear-gradient(129deg, #fff3e2, #fff);
205
+ color: #101010;
206
+ text-decoration: none;
207
+ overflow: clip;
208
+ transition: opacity 0.15s ease-out;
209
+ }
210
+ .mk-island-card[aria-current='page'] {
211
+ opacity: 0.2;
212
+ pointer-events: none;
213
+ }
214
+ .mk-island-card__visual {
215
+ flex: none;
216
+ display: grid;
217
+ place-items: center;
218
+ width: 3.5rem;
219
+ height: 3.5rem;
220
+ border-radius: 50%;
221
+ background: linear-gradient(150deg, #e0e0ed, #888b96);
222
+ transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
223
+ }
224
+ .mk-island__panel:has(.mk-island-card:is(:hover, :focus-visible)) .mk-island-card {
225
+ opacity: 0.2;
226
+ }
227
+ .mk-island__panel:has(.mk-island-card:is(:hover, :focus-visible)) .mk-island-card:is(:hover, :focus-visible) {
228
+ opacity: 1;
229
+ }
230
+ .mk-island-card:is(:hover, :focus-visible) .mk-island-card__visual {
231
+ transform: scale(1.04);
232
+ transition-duration: 0.4s;
233
+ }
234
+
235
+ /* The page behind darkens to .4. */
236
+ .mk-island__backdrop {
237
+ position: absolute;
238
+ inset: 0;
239
+ width: 100%;
240
+ height: 100%;
241
+ padding: 0;
242
+ border: 0;
243
+ background: #000;
244
+ opacity: 0;
245
+ visibility: hidden;
246
+ pointer-events: auto;
247
+ transition:
248
+ opacity 0.7s var(--mk-ease-island-veil),
249
+ visibility 0.7s;
250
+ }
251
+ :is(.mk-island, mk-island)[data-mk-open] .mk-island__backdrop {
252
+ opacity: 0.4;
253
+ visibility: visible;
254
+ transition-delay: 0.1s;
255
+ }
256
+
257
+ @supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
258
+ .mk-island__glass {
259
+ background-color: #35363ded;
260
+ }
261
+ }
262
+ @media (min-width: 1920px) {
263
+ :is(.mk-island, mk-island) {
264
+ --mk-island-width: 28rem;
265
+ }
266
+ .mk-island__header {
267
+ padding: 0.96em 0.96em 0.96em 1.95em;
268
+ }
269
+ .mk-island__button {
270
+ width: 3.12rem;
271
+ height: 3.12rem;
272
+ }
273
+ }
274
+ @media (max-width: 767px) {
275
+ .mk-island__shell {
276
+ top: 1.5rem;
277
+ right: 1rem;
278
+ left: 1rem;
279
+ width: auto;
280
+ max-width: none;
281
+ margin: 0;
282
+ }
283
+ }
284
+ @media (max-width: 479px) {
285
+ .mk-island__shell {
286
+ top: 6vw;
287
+ right: 5vw;
288
+ left: 5vw;
289
+ }
290
+ .mk-island__panel {
291
+ padding-inline: 1.25rem;
292
+ }
293
+ }
294
+ @media (prefers-reduced-motion: reduce) {
295
+ :is(.mk-island, mk-island) *,
296
+ :is(.mk-island, mk-island) *::before,
297
+ :is(.mk-island, mk-island) *::after {
298
+ transition: none !important;
299
+ }
300
+ }