motionary 0.0.0-stage → 6.2.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 (374) hide show
  1. package/CHANGELOG.md +803 -0
  2. package/LICENSE +21 -0
  3. package/README.md +218 -2
  4. package/README_ja.md +219 -0
  5. package/README_zh.md +219 -0
  6. package/bin/usa-codemod-5.mjs +79 -0
  7. package/bin/usa-codemod-6.mjs +146 -0
  8. package/dist/chunks/base-BaQV-2ha.cjs +436 -0
  9. package/dist/chunks/base-BaQV-2ha.cjs.map +1 -0
  10. package/dist/chunks/base-C_3cAoRz.js +404 -0
  11. package/dist/chunks/base-C_3cAoRz.js.map +1 -0
  12. package/dist/chunks/bind-B_CTL6Qn.js +22 -0
  13. package/dist/chunks/bind-B_CTL6Qn.js.map +1 -0
  14. package/dist/chunks/bind-Ui43-n2d.cjs +25 -0
  15. package/dist/chunks/bind-Ui43-n2d.cjs.map +1 -0
  16. package/dist/chunks/core-B5T0dhFH.cjs +920 -0
  17. package/dist/chunks/core-B5T0dhFH.cjs.map +1 -0
  18. package/dist/chunks/core-BGAyaY6L.cjs +265 -0
  19. package/dist/chunks/core-BGAyaY6L.cjs.map +1 -0
  20. package/dist/chunks/core-D7cVumUu.js +909 -0
  21. package/dist/chunks/core-D7cVumUu.js.map +1 -0
  22. package/dist/chunks/core-VEBw36QK.js +260 -0
  23. package/dist/chunks/core-VEBw36QK.js.map +1 -0
  24. package/dist/chunks/core-ps8uvYuN.js +181 -0
  25. package/dist/chunks/core-ps8uvYuN.js.map +1 -0
  26. package/dist/chunks/core-zq17EeCI.cjs +185 -0
  27. package/dist/chunks/core-zq17EeCI.cjs.map +1 -0
  28. package/dist/chunks/fx-Bs6IrV4Q.js +109 -0
  29. package/dist/chunks/fx-Bs6IrV4Q.js.map +1 -0
  30. package/dist/chunks/fx-lBGVtQO1.cjs +114 -0
  31. package/dist/chunks/fx-lBGVtQO1.cjs.map +1 -0
  32. package/dist/chunks/generative-D2YyhaeO.js +336 -0
  33. package/dist/chunks/generative-D2YyhaeO.js.map +1 -0
  34. package/dist/chunks/generative-DzIZq-_g.cjs +348 -0
  35. package/dist/chunks/generative-DzIZq-_g.cjs.map +1 -0
  36. package/dist/chunks/gpu-Bu7qwugO.js +380 -0
  37. package/dist/chunks/gpu-Bu7qwugO.js.map +1 -0
  38. package/dist/chunks/gpu-CenK2l6b.cjs +387 -0
  39. package/dist/chunks/gpu-CenK2l6b.cjs.map +1 -0
  40. package/dist/chunks/index-tags-DucKMQr_.js +26 -0
  41. package/dist/chunks/index-tags-DucKMQr_.js.map +1 -0
  42. package/dist/chunks/index-tags-wv0R_vkO.cjs +28 -0
  43. package/dist/chunks/index-tags-wv0R_vkO.cjs.map +1 -0
  44. package/dist/chunks/presets-BYBVJVeP.js +226 -0
  45. package/dist/chunks/presets-BYBVJVeP.js.map +1 -0
  46. package/dist/chunks/presets-CUHys3sK.cjs +233 -0
  47. package/dist/chunks/presets-CUHys3sK.cjs.map +1 -0
  48. package/dist/chunks/registry-CKNLQpwd.js +121 -0
  49. package/dist/chunks/registry-CKNLQpwd.js.map +1 -0
  50. package/dist/chunks/registry-DehBVRDV.cjs +131 -0
  51. package/dist/chunks/registry-DehBVRDV.cjs.map +1 -0
  52. package/dist/chunks/spring-CbvHfVtP.js +219 -0
  53. package/dist/chunks/spring-CbvHfVtP.js.map +1 -0
  54. package/dist/chunks/spring-Dgx187Vh.cjs +232 -0
  55. package/dist/chunks/spring-Dgx187Vh.cjs.map +1 -0
  56. package/dist/chunks/stagger-CCFyhzSw.cjs +86 -0
  57. package/dist/chunks/stagger-CCFyhzSw.cjs.map +1 -0
  58. package/dist/chunks/stagger-DtMKo2SK.js +84 -0
  59. package/dist/chunks/stagger-DtMKo2SK.js.map +1 -0
  60. package/dist/chunks/variants-BhjyddG8.cjs +39 -0
  61. package/dist/chunks/variants-BhjyddG8.cjs.map +1 -0
  62. package/dist/chunks/variants-DRlKVHvu.js +35 -0
  63. package/dist/chunks/variants-DRlKVHvu.js.map +1 -0
  64. package/dist/components/a11y.cjs +276 -0
  65. package/dist/components/a11y.cjs.map +1 -0
  66. package/dist/components/a11y.d.cts +131 -0
  67. package/dist/components/a11y.d.ts +131 -0
  68. package/dist/components/a11y.js +259 -0
  69. package/dist/components/a11y.js.map +1 -0
  70. package/dist/components/angular.cjs +76 -0
  71. package/dist/components/angular.cjs.map +1 -0
  72. package/dist/components/angular.d.cts +1734 -0
  73. package/dist/components/angular.d.ts +1734 -0
  74. package/dist/components/angular.js +70 -0
  75. package/dist/components/angular.js.map +1 -0
  76. package/dist/components/background.cjs +659 -0
  77. package/dist/components/background.cjs.map +1 -0
  78. package/dist/components/background.css +9 -0
  79. package/dist/components/background.d.cts +166 -0
  80. package/dist/components/background.d.ts +166 -0
  81. package/dist/components/background.js +647 -0
  82. package/dist/components/background.js.map +1 -0
  83. package/dist/components/bridge.cjs +154 -0
  84. package/dist/components/bridge.cjs.map +1 -0
  85. package/dist/components/bridge.d.cts +63 -0
  86. package/dist/components/bridge.d.ts +63 -0
  87. package/dist/components/bridge.js +147 -0
  88. package/dist/components/bridge.js.map +1 -0
  89. package/dist/components/cards.cjs +561 -0
  90. package/dist/components/cards.cjs.map +1 -0
  91. package/dist/components/cards.css +6 -0
  92. package/dist/components/cards.d.cts +115 -0
  93. package/dist/components/cards.d.ts +115 -0
  94. package/dist/components/cards.js +554 -0
  95. package/dist/components/cards.js.map +1 -0
  96. package/dist/components/click.cjs +877 -0
  97. package/dist/components/click.cjs.map +1 -0
  98. package/dist/components/click.css +9 -0
  99. package/dist/components/click.d.cts +218 -0
  100. package/dist/components/click.d.ts +218 -0
  101. package/dist/components/click.js +863 -0
  102. package/dist/components/click.js.map +1 -0
  103. package/dist/components/depth.cjs +250 -0
  104. package/dist/components/depth.cjs.map +1 -0
  105. package/dist/components/depth.css +3 -0
  106. package/dist/components/depth.d.cts +86 -0
  107. package/dist/components/depth.d.ts +86 -0
  108. package/dist/components/depth.js +242 -0
  109. package/dist/components/depth.js.map +1 -0
  110. package/dist/components/effects.cjs +2258 -0
  111. package/dist/components/effects.cjs.map +1 -0
  112. package/dist/components/effects.d.cts +545 -0
  113. package/dist/components/effects.d.ts +545 -0
  114. package/dist/components/effects.js +2200 -0
  115. package/dist/components/effects.js.map +1 -0
  116. package/dist/components/feedback.cjs +442 -0
  117. package/dist/components/feedback.cjs.map +1 -0
  118. package/dist/components/feedback.css +7 -0
  119. package/dist/components/feedback.d.cts +144 -0
  120. package/dist/components/feedback.d.ts +144 -0
  121. package/dist/components/feedback.js +433 -0
  122. package/dist/components/feedback.js.map +1 -0
  123. package/dist/components/fx-gpu.cjs +12 -0
  124. package/dist/components/fx-gpu.cjs.map +1 -0
  125. package/dist/components/fx-gpu.d.cts +63 -0
  126. package/dist/components/fx-gpu.d.ts +63 -0
  127. package/dist/components/fx-gpu.js +5 -0
  128. package/dist/components/fx-gpu.js.map +1 -0
  129. package/dist/components/fx.cjs +169 -0
  130. package/dist/components/fx.cjs.map +1 -0
  131. package/dist/components/fx.css +3 -0
  132. package/dist/components/fx.d.cts +114 -0
  133. package/dist/components/fx.d.ts +114 -0
  134. package/dist/components/fx.js +156 -0
  135. package/dist/components/fx.js.map +1 -0
  136. package/dist/components/fx2.cjs +25 -0
  137. package/dist/components/fx2.cjs.map +1 -0
  138. package/dist/components/fx2.d.cts +136 -0
  139. package/dist/components/fx2.d.ts +136 -0
  140. package/dist/components/fx2.js +17 -0
  141. package/dist/components/fx2.js.map +1 -0
  142. package/dist/components/gesture.cjs +209 -0
  143. package/dist/components/gesture.cjs.map +1 -0
  144. package/dist/components/gesture.css +3 -0
  145. package/dist/components/gesture.d.cts +134 -0
  146. package/dist/components/gesture.d.ts +134 -0
  147. package/dist/components/gesture.js +203 -0
  148. package/dist/components/gesture.js.map +1 -0
  149. package/dist/components/interaction.cjs +424 -0
  150. package/dist/components/interaction.cjs.map +1 -0
  151. package/dist/components/interaction.css +8 -0
  152. package/dist/components/interaction.d.cts +115 -0
  153. package/dist/components/interaction.d.ts +115 -0
  154. package/dist/components/interaction.js +416 -0
  155. package/dist/components/interaction.js.map +1 -0
  156. package/dist/components/jsx.cjs +3 -0
  157. package/dist/components/jsx.cjs.map +1 -0
  158. package/dist/components/jsx.d.cts +53 -0
  159. package/dist/components/jsx.d.ts +53 -0
  160. package/dist/components/jsx.js +2 -0
  161. package/dist/components/jsx.js.map +1 -0
  162. package/dist/components/layout.cjs +257 -0
  163. package/dist/components/layout.cjs.map +1 -0
  164. package/dist/components/layout.css +3 -0
  165. package/dist/components/layout.d.cts +99 -0
  166. package/dist/components/layout.d.ts +99 -0
  167. package/dist/components/layout.js +249 -0
  168. package/dist/components/layout.js.map +1 -0
  169. package/dist/components/lazy.cjs +92 -0
  170. package/dist/components/lazy.cjs.map +1 -0
  171. package/dist/components/lazy.d.cts +48 -0
  172. package/dist/components/lazy.d.ts +48 -0
  173. package/dist/components/lazy.js +87 -0
  174. package/dist/components/lazy.js.map +1 -0
  175. package/dist/components/lite.cjs +11095 -0
  176. package/dist/components/lite.cjs.map +1 -0
  177. package/dist/components/lite.d.cts +4 -0
  178. package/dist/components/lite.d.ts +4 -0
  179. package/dist/components/lite.js +10827 -0
  180. package/dist/components/lite.js.map +1 -0
  181. package/dist/components/packs.cjs +192 -0
  182. package/dist/components/packs.cjs.map +1 -0
  183. package/dist/components/packs.css +3 -0
  184. package/dist/components/packs.d.cts +72 -0
  185. package/dist/components/packs.d.ts +72 -0
  186. package/dist/components/packs.js +184 -0
  187. package/dist/components/packs.js.map +1 -0
  188. package/dist/components/page.cjs +824 -0
  189. package/dist/components/page.cjs.map +1 -0
  190. package/dist/components/page.css +11 -0
  191. package/dist/components/page.d.cts +249 -0
  192. package/dist/components/page.d.ts +249 -0
  193. package/dist/components/page.js +799 -0
  194. package/dist/components/page.js.map +1 -0
  195. package/dist/components/perf.cjs +120 -0
  196. package/dist/components/perf.cjs.map +1 -0
  197. package/dist/components/perf.d.cts +98 -0
  198. package/dist/components/perf.d.ts +98 -0
  199. package/dist/components/perf.js +110 -0
  200. package/dist/components/perf.js.map +1 -0
  201. package/dist/components/physics.cjs +448 -0
  202. package/dist/components/physics.cjs.map +1 -0
  203. package/dist/components/physics.css +5 -0
  204. package/dist/components/physics.d.cts +189 -0
  205. package/dist/components/physics.d.ts +189 -0
  206. package/dist/components/physics.js +430 -0
  207. package/dist/components/physics.js.map +1 -0
  208. package/dist/components/react.cjs +96 -0
  209. package/dist/components/react.cjs.map +1 -0
  210. package/dist/components/react.d.cts +18 -0
  211. package/dist/components/react.d.ts +18 -0
  212. package/dist/components/react.js +91 -0
  213. package/dist/components/react.js.map +1 -0
  214. package/dist/components/reveal.cjs +362 -0
  215. package/dist/components/reveal.cjs.map +1 -0
  216. package/dist/components/reveal.css +5 -0
  217. package/dist/components/reveal.d.cts +105 -0
  218. package/dist/components/reveal.d.ts +105 -0
  219. package/dist/components/reveal.js +353 -0
  220. package/dist/components/reveal.js.map +1 -0
  221. package/dist/components/solid.cjs +86 -0
  222. package/dist/components/solid.cjs.map +1 -0
  223. package/dist/components/solid.d.cts +1751 -0
  224. package/dist/components/solid.d.ts +1751 -0
  225. package/dist/components/solid.js +82 -0
  226. package/dist/components/solid.js.map +1 -0
  227. package/dist/components/svelte.cjs +68 -0
  228. package/dist/components/svelte.cjs.map +1 -0
  229. package/dist/components/svelte.d.cts +1733 -0
  230. package/dist/components/svelte.d.ts +1733 -0
  231. package/dist/components/svelte.js +64 -0
  232. package/dist/components/svelte.js.map +1 -0
  233. package/dist/components/svg.cjs +359 -0
  234. package/dist/components/svg.cjs.map +1 -0
  235. package/dist/components/svg.css +3 -0
  236. package/dist/components/svg.d.cts +113 -0
  237. package/dist/components/svg.d.ts +113 -0
  238. package/dist/components/svg.js +347 -0
  239. package/dist/components/svg.js.map +1 -0
  240. package/dist/components/text.cjs +968 -0
  241. package/dist/components/text.cjs.map +1 -0
  242. package/dist/components/text.css +8 -0
  243. package/dist/components/text.d.cts +342 -0
  244. package/dist/components/text.d.ts +342 -0
  245. package/dist/components/text.js +947 -0
  246. package/dist/components/text.js.map +1 -0
  247. package/dist/components/timeline.cjs +109 -0
  248. package/dist/components/timeline.cjs.map +1 -0
  249. package/dist/components/timeline.css +3 -0
  250. package/dist/components/timeline.d.cts +155 -0
  251. package/dist/components/timeline.d.ts +155 -0
  252. package/dist/components/timeline.js +103 -0
  253. package/dist/components/timeline.js.map +1 -0
  254. package/dist/components/tokens.cjs +226 -0
  255. package/dist/components/tokens.cjs.map +1 -0
  256. package/dist/components/tokens.d.cts +74 -0
  257. package/dist/components/tokens.d.ts +74 -0
  258. package/dist/components/tokens.js +211 -0
  259. package/dist/components/tokens.js.map +1 -0
  260. package/dist/components/transitions.cjs +430 -0
  261. package/dist/components/transitions.cjs.map +1 -0
  262. package/dist/components/transitions.css +5 -0
  263. package/dist/components/transitions.d.cts +126 -0
  264. package/dist/components/transitions.d.ts +126 -0
  265. package/dist/components/transitions.js +423 -0
  266. package/dist/components/transitions.js.map +1 -0
  267. package/dist/components/ui.cjs +1050 -0
  268. package/dist/components/ui.cjs.map +1 -0
  269. package/dist/components/ui.css +14 -0
  270. package/dist/components/ui.d.cts +224 -0
  271. package/dist/components/ui.d.ts +224 -0
  272. package/dist/components/ui.js +1034 -0
  273. package/dist/components/ui.js.map +1 -0
  274. package/dist/components/vue.cjs +67 -0
  275. package/dist/components/vue.cjs.map +1 -0
  276. package/dist/components/vue.d.cts +1722 -0
  277. package/dist/components/vue.d.ts +1722 -0
  278. package/dist/components/vue.js +64 -0
  279. package/dist/components/vue.js.map +1 -0
  280. package/dist/components/webgl.cjs +459 -0
  281. package/dist/components/webgl.cjs.map +1 -0
  282. package/dist/components/webgl.css +3 -0
  283. package/dist/components/webgl.d.cts +133 -0
  284. package/dist/components/webgl.d.ts +133 -0
  285. package/dist/components/webgl.js +442 -0
  286. package/dist/components/webgl.js.map +1 -0
  287. package/dist/components/widgets.cjs +591 -0
  288. package/dist/components/widgets.cjs.map +1 -0
  289. package/dist/components/widgets.d.cts +110 -0
  290. package/dist/components/widgets.d.ts +110 -0
  291. package/dist/components/widgets.js +581 -0
  292. package/dist/components/widgets.js.map +1 -0
  293. package/dist/components.cjs +351 -0
  294. package/dist/components.cjs.map +1 -0
  295. package/dist/components.css +75 -0
  296. package/dist/components.d.cts +2997 -0
  297. package/dist/components.d.ts +2997 -0
  298. package/dist/components.js +106 -0
  299. package/dist/components.js.map +1 -0
  300. package/dist/components.umd.js +23 -0
  301. package/dist/components.umd.js.map +1 -0
  302. package/dist/element.cjs +97 -0
  303. package/dist/element.cjs.map +1 -0
  304. package/dist/element.d.cts +215 -0
  305. package/dist/element.d.ts +215 -0
  306. package/dist/element.js +95 -0
  307. package/dist/element.js.map +1 -0
  308. package/dist/element.umd.js +2 -0
  309. package/dist/element.umd.js.map +1 -0
  310. package/dist/index.cjs +149 -0
  311. package/dist/index.cjs.map +1 -0
  312. package/dist/index.d.cts +425 -0
  313. package/dist/index.d.ts +425 -0
  314. package/dist/index.js +131 -0
  315. package/dist/index.js.map +1 -0
  316. package/dist/index.umd.js +15 -0
  317. package/dist/index.umd.js.map +1 -0
  318. package/dist/presets/extended.cjs +243 -0
  319. package/dist/presets/extended.cjs.map +1 -0
  320. package/dist/presets/extended.d.cts +37 -0
  321. package/dist/presets/extended.d.ts +37 -0
  322. package/dist/presets/extended.js +239 -0
  323. package/dist/presets/extended.js.map +1 -0
  324. package/dist/presets-extended.umd.js +2 -0
  325. package/dist/presets-extended.umd.js.map +1 -0
  326. package/dist/react.cjs +68 -0
  327. package/dist/react.cjs.map +1 -0
  328. package/dist/react.d.cts +158 -0
  329. package/dist/react.d.ts +158 -0
  330. package/dist/react.js +65 -0
  331. package/dist/react.js.map +1 -0
  332. package/dist/solid.cjs +93 -0
  333. package/dist/solid.cjs.map +1 -0
  334. package/dist/solid.d.cts +249 -0
  335. package/dist/solid.d.ts +249 -0
  336. package/dist/solid.js +89 -0
  337. package/dist/solid.js.map +1 -0
  338. package/dist/svelte.cjs +66 -0
  339. package/dist/svelte.cjs.map +1 -0
  340. package/dist/svelte.d.cts +243 -0
  341. package/dist/svelte.d.ts +243 -0
  342. package/dist/svelte.js +63 -0
  343. package/dist/svelte.js.map +1 -0
  344. package/dist/vue.cjs +62 -0
  345. package/dist/vue.cjs.map +1 -0
  346. package/dist/vue.d.cts +158 -0
  347. package/dist/vue.d.ts +158 -0
  348. package/dist/vue.js +60 -0
  349. package/dist/vue.js.map +1 -0
  350. package/dist/widgets.umd.js +2 -0
  351. package/dist/widgets.umd.js.map +1 -0
  352. package/docs/API.md +147 -0
  353. package/docs/ROADMAP.md +14 -0
  354. package/docs/accessibility.md +60 -0
  355. package/docs/components.md +564 -0
  356. package/docs/deprecations.md +30 -0
  357. package/docs/frameworks-ssr.md +100 -0
  358. package/docs/hybrid-apps.md +145 -0
  359. package/docs/images/showcase-detail.png +0 -0
  360. package/docs/images/showcase-grid.png +0 -0
  361. package/docs/images/showcase-mobile.png +0 -0
  362. package/docs/migration-from-aos.md +67 -0
  363. package/docs/migration-from-gsap-scrolltrigger.md +80 -0
  364. package/docs/motion-tokens.css +31 -0
  365. package/docs/motion-tokens.md +46 -0
  366. package/docs/motion.tokens.json +132 -0
  367. package/docs/performance.md +24 -0
  368. package/docs/presets.md +310 -0
  369. package/docs/upgrading-3.md +21 -0
  370. package/docs/upgrading-4.md +65 -0
  371. package/docs/upgrading-5.md +31 -0
  372. package/docs/upgrading-6.md +32 -0
  373. package/docs/windows-apps.md +119 -0
  374. package/package.json +562 -4
@@ -0,0 +1,561 @@
1
+ 'use strict';
2
+
3
+ var base = require('../chunks/base-BaQV-2ha.cjs');
4
+ var spring = require('../chunks/spring-Dgx187Vh.cjs');
5
+
6
+ var css$3 = "usa-card{--usa-card-radius:18px;--usa-card-bg:var(--usa-surface,#1b1e27);--usa-card-glow:var(--usa-accent,#7c5cff);--usa-card-x:50%;--usa-card-y:50%;--usa-card-nx:0;--usa-card-ny:0;position:relative;display:block;border-radius:var(--usa-card-radius);isolation:isolate;-webkit-tap-highlight-color:transparent}usa-card:focus-visible{outline:2px solid var(--usa-card-glow);outline-offset:3px}usa-card[effect~=\"lift\"]{transition:transform 0.45s cubic-bezier(0.34,1.56,0.64,1),box-shadow 0.45s ease}usa-card[effect~=\"lift\"][data-hover],usa-card[effect~=\"lift\"]:focus-visible{transform:translateY(-6px) perspective(900px) rotateX(calc(var(--usa-card-ny) * -4deg)) rotateY(calc(var(--usa-card-nx) * 4deg));box-shadow:0 22px 44px -18px rgb(0 0 0 / 0.55)}usa-card[effect~=\"glass\"]{background:color-mix(in srgb,var(--usa-card-bg) 45%,transparent);border:1px solid rgb(255 255 255 / 0.16);-webkit-backdrop-filter:blur(18px) saturate(1.5);backdrop-filter:blur(18px) saturate(1.5)}usa-card[effect~=\"spotlight\"]::before,usa-card[effect~=\"border-glow\"]::after{content:\"\";position:absolute;inset:0;border-radius:inherit;pointer-events:none;opacity:0;transition:opacity 0.3s ease}usa-card[effect~=\"spotlight\"]::before{z-index:-1;background:radial-gradient(260px circle at var(--usa-card-x) var(--usa-card-y),color-mix(in srgb,var(--usa-card-glow) 28%,transparent),transparent 70%)}usa-card[effect~=\"border-glow\"]::after{padding:1.5px;background:radial-gradient(180px circle at var(--usa-card-x) var(--usa-card-y),var(--usa-card-glow),transparent 70%);-webkit-mask:linear-gradient(#000 0 0) content-box exclude,linear-gradient(#000 0 0);mask:linear-gradient(#000 0 0) content-box exclude,linear-gradient(#000 0 0)}usa-card[data-hover]::before,usa-card[data-hover]::after{opacity:1}@property --usa-card-angle{syntax:\"<angle>\";inherits:false;initial-value:0deg}usa-card[effect~=\"conic-border\"]{border:2px solid transparent;background:linear-gradient(var(--usa-card-bg),var(--usa-card-bg)) padding-box,conic-gradient(from var(--usa-card-angle),var(--usa-card-glow),#22d3ee,#f472b6,var(--usa-card-glow)) border-box;animation:usa-card-spin 4s linear infinite}@keyframes usa-card-spin{to{--usa-card-angle:360deg}}usa-card .usa-card-sheen{position:absolute;inset:0;border-radius:inherit;overflow:hidden;pointer-events:none}usa-card .usa-card-sheen::before{content:\"\";position:absolute;top:0;bottom:0;width:45%;left:-60%;transform:skewX(-20deg);background:linear-gradient(90deg,transparent,rgb(255 255 255 / 0.35),transparent)}usa-card[effect~=\"sheen\"]:hover .usa-card-sheen::before,usa-card[effect~=\"sheen\"]:focus-visible .usa-card-sheen::before{left:130%;transition:left 0.8s cubic-bezier(0.22,1,0.36,1)}usa-card .usa-card-holo{position:absolute;inset:0;border-radius:inherit;pointer-events:none;mix-blend-mode:color-dodge;opacity:0.35;background:linear-gradient(115deg,transparent 20%,#ff7ad9 35%,#7af0ff 45%,#ffe27a 55%,transparent 70%) calc(var(--usa-card-x) * 1.4 - 20%) calc(var(--usa-card-y) * 1.4 - 20%) / 220% 220%;transition:opacity 0.3s ease}usa-card[data-hover] .usa-card-holo{opacity:0.7}usa-card[effect~=\"parallax-layers\"] [data-depth]{transition:transform 0.25s ease-out;will-change:transform}usa-card[effect~=\"flip\"]{perspective:1000px;display:grid}usa-card[effect~=\"flip\"]>[data-front],usa-card[effect~=\"flip\"]>[data-back]{grid-area:1 / 1;backface-visibility:hidden;-webkit-backface-visibility:hidden;border-radius:inherit;transition:transform 0.7s cubic-bezier(0.34,1.3,0.64,1),opacity 0.3s ease}usa-card[effect~=\"flip\"]>[data-back]{transform:rotateY(180deg)}usa-card[effect~=\"flip\"][axis=\"x\"]>[data-back]{transform:rotateX(180deg)}usa-card[effect~=\"flip\"][flipped]>[data-front],usa-card[effect~=\"flip\"]:not([trigger=\"click\"]):hover>[data-front]{transform:rotateY(-180deg)}usa-card[effect~=\"flip\"][flipped]>[data-back],usa-card[effect~=\"flip\"]:not([trigger=\"click\"]):hover>[data-back]{transform:rotateY(0deg)}usa-card[effect~=\"flip\"][axis=\"x\"][flipped]>[data-front],usa-card[effect~=\"flip\"][axis=\"x\"]:not([trigger=\"click\"]):hover>[data-front]{transform:rotateX(180deg)}usa-card[effect~=\"flip\"][axis=\"x\"][flipped]>[data-back],usa-card[effect~=\"flip\"][axis=\"x\"]:not([trigger=\"click\"]):hover>[data-back]{transform:rotateX(0deg)}usa-card[effect~=\"flip\"][trigger=\"click\"]{cursor:pointer}usa-card[effect~=\"expand\"]{cursor:zoom-in}usa-card[effect~=\"expand\"]:not([expanded]) [data-detail]{display:none}usa-card[expanded]{position:fixed;inset:6vh max(4vw,calc(50vw - 420px));z-index:1000;overflow:auto;cursor:default;background:var(--usa-card-bg);box-shadow:0 30px 80px -20px rgb(0 0 0 / 0.6)}.usa-card-backdrop{position:fixed;inset:0;z-index:999;background:rgb(0 0 0 / 0.45)}@media (prefers-reduced-motion:reduce){usa-card,usa-card *,usa-card .usa-card-sheen::before{transition-duration:0.01ms !important;animation:none !important}usa-card[effect~=\"lift\"][data-hover]{transform:none}usa-card[effect~=\"flip\"]>[data-front],usa-card[effect~=\"flip\"]>[data-back]{transform:none !important}usa-card[effect~=\"flip\"][flipped]>[data-front],usa-card[effect~=\"flip\"]:not([flipped])>[data-back]{opacity:0;visibility:hidden}usa-card[effect~=\"flip\"]:not([trigger=\"click\"]):hover>[data-front]{opacity:0;visibility:hidden}usa-card[effect~=\"flip\"]:not([trigger=\"click\"]):hover>[data-back]{opacity:1;visibility:visible}}@media (prefers-reduced-transparency:reduce),(forced-colors:active){usa-card[effect~=\"glass\"]{background:var(--usa-card-bg);-webkit-backdrop-filter:none;backdrop-filter:none}}";
7
+
8
+ const CARD_EFFECTS = ['flip', 'holo', 'glass', 'border-glow', 'conic-border', 'lift', 'spotlight', 'sheen', 'parallax-layers', 'expand'];
9
+ /** Effects that follow the pointer (they share one rAF-throttled tracker). */
10
+ const TRACKING = new Set(['holo', 'border-glow', 'spotlight', 'parallax-layers', 'lift']);
11
+ function defineCard(tag = 'usa-card') {
12
+ return base.defineElement(tag, (Base) => class UsaCard extends Base {
13
+ constructor() {
14
+ super(...arguments);
15
+ this._frame = 0;
16
+ this._spacer = null;
17
+ this._backdrop = null;
18
+ this._busy = false;
19
+ }
20
+ static get observedAttributes() {
21
+ return ['effect', 'trigger', 'disabled'];
22
+ }
23
+ get effects() {
24
+ return this.str('effect', 'lift').split(/[\s,]+/).filter(Boolean);
25
+ }
26
+ has(e) {
27
+ return this.effects.includes(e);
28
+ }
29
+ get flipped() {
30
+ return this.flag('flipped');
31
+ }
32
+ set flipped(v) {
33
+ this.setFlag('flipped', v);
34
+ }
35
+ get expanded() {
36
+ return this.flag('expanded');
37
+ }
38
+ mount() {
39
+ if (this.flag('disabled'))
40
+ return;
41
+ const color = this.str('color');
42
+ if (color)
43
+ this.style.setProperty('--usa-card-glow', color);
44
+ if (this.has('sheen') && !this.querySelector(':scope > .usa-card-sheen'))
45
+ this.append(deco('usa-card-sheen'));
46
+ if (this.has('holo') && !this.querySelector(':scope > .usa-card-holo'))
47
+ this.append(deco('usa-card-holo'));
48
+ if (this.has('flip')) {
49
+ const click = this.str('trigger', 'hover') === 'click';
50
+ if (click) {
51
+ if (!this.hasAttribute('tabindex'))
52
+ this.tabIndex = 0;
53
+ this.setAttribute('role', this.getAttribute('role') || 'button');
54
+ this.setAttribute('aria-pressed', String(this.flipped));
55
+ this.listen(this, 'click', (e) => !interactive(e.target, this) && this.flip());
56
+ this.listen(this, 'keydown', (e) => {
57
+ if ((e.key === 'Enter' || e.key === ' ') && e.target === this) {
58
+ e.preventDefault();
59
+ this.flip();
60
+ }
61
+ });
62
+ }
63
+ this.setBackHidden();
64
+ }
65
+ if (this.has('expand')) {
66
+ if (!this.hasAttribute('tabindex'))
67
+ this.tabIndex = 0;
68
+ this.setAttribute('aria-expanded', String(this.expanded));
69
+ this.listen(this, 'click', (e) => {
70
+ const t = e.target;
71
+ if (t.closest?.('[data-close]')) {
72
+ e.stopPropagation();
73
+ this.collapse();
74
+ }
75
+ else if (!this.expanded && !interactive(t, this))
76
+ this.expand();
77
+ });
78
+ this.listen(this, 'keydown', (e) => {
79
+ if (e.key === 'Escape' && this.expanded)
80
+ this.collapse();
81
+ else if ((e.key === 'Enter' || e.key === ' ') && e.target === this && !this.expanded) {
82
+ e.preventDefault();
83
+ this.expand();
84
+ }
85
+ });
86
+ }
87
+ if (!this.effects.some((e) => TRACKING.has(e)) || this.reduced)
88
+ return;
89
+ let rect = null;
90
+ let px = 0.5;
91
+ let py = 0.5;
92
+ const apply = () => {
93
+ this._frame = 0;
94
+ const nx = base.clamp(px * 2 - 1, -1, 1);
95
+ const ny = base.clamp(py * 2 - 1, -1, 1);
96
+ this.style.setProperty('--usa-card-x', `${(px * 100).toFixed(1)}%`);
97
+ this.style.setProperty('--usa-card-y', `${(py * 100).toFixed(1)}%`);
98
+ this.style.setProperty('--usa-card-nx', nx.toFixed(3));
99
+ this.style.setProperty('--usa-card-ny', ny.toFixed(3));
100
+ if (this.has('parallax-layers')) {
101
+ const depth = this.num('depth', 16);
102
+ this.querySelectorAll('[data-depth]').forEach((l) => {
103
+ const d = Number(l.dataset.depth) || 0.5;
104
+ l.style.transform = `translate3d(${(nx * depth * d).toFixed(1)}px, ${(ny * depth * d).toFixed(1)}px, 0)`;
105
+ });
106
+ }
107
+ };
108
+ this.listen(this, 'pointerenter', () => {
109
+ rect = this.getBoundingClientRect();
110
+ this.setAttribute('data-hover', '');
111
+ });
112
+ this.listen(this, 'pointermove', (e) => {
113
+ if (this.expanded)
114
+ return;
115
+ rect = rect || this.getBoundingClientRect();
116
+ px = (e.clientX - rect.left) / (rect.width || 1);
117
+ py = (e.clientY - rect.top) / (rect.height || 1);
118
+ if (!this._frame)
119
+ this._frame = base.raf(apply);
120
+ });
121
+ this.listen(this, 'pointerleave', () => {
122
+ rect = null;
123
+ px = py = 0.5;
124
+ this.removeAttribute('data-hover');
125
+ if (!this._frame)
126
+ this._frame = base.raf(apply);
127
+ });
128
+ }
129
+ unmount() {
130
+ base.caf(this._frame);
131
+ this._frame = 0;
132
+ if (this.expanded)
133
+ this.finishCollapse();
134
+ }
135
+ setBackHidden() {
136
+ const front = this.querySelector(':scope > [data-front]');
137
+ const back = this.querySelector(':scope > [data-back]');
138
+ front?.setAttribute('aria-hidden', String(this.flipped));
139
+ back?.setAttribute('aria-hidden', String(!this.flipped));
140
+ }
141
+ flip(force) {
142
+ const next = force === undefined ? !this.flipped : force;
143
+ if (next === this.flipped)
144
+ return;
145
+ this.flipped = next;
146
+ if (this.hasAttribute('aria-pressed'))
147
+ this.setAttribute('aria-pressed', String(next));
148
+ this.setBackHidden();
149
+ this.emit('flip', { flipped: next });
150
+ }
151
+ async expand() {
152
+ if (this.expanded || this._busy)
153
+ return;
154
+ this._busy = true;
155
+ const first = this.getBoundingClientRect();
156
+ const spacer = document.createElement('div');
157
+ spacer.className = 'usa-card-spacer';
158
+ spacer.style.cssText = `width:${first.width}px;height:${first.height}px`;
159
+ spacer.setAttribute('aria-hidden', 'true');
160
+ this.before(spacer);
161
+ this._spacer = spacer;
162
+ const backdrop = document.createElement('div');
163
+ backdrop.className = 'usa-card-backdrop';
164
+ backdrop.addEventListener('click', () => this.collapse());
165
+ this.before(backdrop);
166
+ this._backdrop = backdrop;
167
+ this.setFlag('expanded', true);
168
+ this.setAttribute('aria-expanded', 'true');
169
+ this.emit('expand');
170
+ const last = this.getBoundingClientRect();
171
+ await this.flipFrom(first, last);
172
+ this.motion(backdrop, [{ opacity: 0 }, { opacity: 1 }], { duration: 250, easing: 'ease-out' });
173
+ this.focus({ preventScroll: true });
174
+ this._busy = false;
175
+ }
176
+ async collapse() {
177
+ if (!this.expanded || this._busy)
178
+ return;
179
+ this._busy = true;
180
+ const first = this.getBoundingClientRect();
181
+ const b = this._backdrop;
182
+ if (b)
183
+ this.motion(b, [{ opacity: 1 }, { opacity: 0 }], { duration: 200, easing: 'ease-in', fill: 'forwards' });
184
+ this.finishCollapse();
185
+ this.emit('collapse');
186
+ const last = this.getBoundingClientRect();
187
+ await this.flipFrom(first, last);
188
+ this._busy = false;
189
+ }
190
+ finishCollapse() {
191
+ this.setFlag('expanded', false);
192
+ this.setAttribute('aria-expanded', 'false');
193
+ this._spacer?.remove();
194
+ this._backdrop?.remove();
195
+ this._spacer = this._backdrop = null;
196
+ }
197
+ async flipFrom(first, last) {
198
+ if (this.reduced) {
199
+ const a = this.motion(this, [{ opacity: 0.4 }, { opacity: 1 }], { duration: 200 });
200
+ await a?.finished.catch(() => undefined);
201
+ return;
202
+ }
203
+ const sx = first.width / (last.width || 1);
204
+ const sy = first.height / (last.height || 1);
205
+ const dx = first.left - last.left;
206
+ const dy = first.top - last.top;
207
+ const { easing, duration } = spring.springEasing('stiff');
208
+ const a = this.motion(this, [{ transformOrigin: '0 0', transform: `translate(${dx}px, ${dy}px) scale(${sx}, ${sy})` }, { transformOrigin: '0 0', transform: 'none' }], { duration: Math.min(duration, 900), easing: easing || base.EASE_OUT });
209
+ await a?.finished.catch(() => undefined);
210
+ }
211
+ }, { id: 'card', text: css$3 });
212
+ }
213
+ function deco(cls) {
214
+ const s = document.createElement('span');
215
+ s.className = cls;
216
+ s.setAttribute('aria-hidden', 'true');
217
+ return s;
218
+ }
219
+ /** Clicks on links, buttons and form fields inside the card keep their own behaviour. */
220
+ function interactive(t, host) {
221
+ const el = t?.closest?.('a, button, input, select, textarea, label, [contenteditable]');
222
+ return !!el && el !== host && host.contains(el);
223
+ }
224
+
225
+ var css$2 = "usa-card-stack{position:relative;display:grid;touch-action:pan-y;user-select:none;-webkit-user-select:none}usa-card-stack>*{grid-area:1 / 1;transform-origin:50% 100%;transition:transform 0.35s cubic-bezier(0.34,1.3,0.64,1),opacity 0.3s ease;will-change:transform}usa-card-stack>[data-top]{cursor:grab}usa-card-stack[data-dragging]>*,usa-card-stack>[data-top]{transition:none}usa-card-stack:focus-visible{outline:2px solid var(--usa-accent,#7c5cff);outline-offset:4px;border-radius:12px}@media (prefers-reduced-motion:reduce){usa-card-stack>*{transition:none}}";
226
+
227
+ function defineCardStack(tag = 'usa-card-stack') {
228
+ return base.defineElement(tag, (Base) => class UsaCardStack extends Base {
229
+ constructor() {
230
+ super(...arguments);
231
+ this._drag = null;
232
+ this._busy = false;
233
+ }
234
+ static get observedAttributes() {
235
+ return ['visible', 'offset', 'disabled'];
236
+ }
237
+ get top() {
238
+ return this.cards()[0] || null;
239
+ }
240
+ cards() {
241
+ return Array.from(this.children).filter((c) => !c.hasAttribute('data-gone'));
242
+ }
243
+ layout(dragX = 0) {
244
+ const visible = this.num('visible', 3);
245
+ const off = this.num('offset', 10);
246
+ const reduced = this.reduced;
247
+ this.cards().forEach((c, i) => {
248
+ c.style.zIndex = String(100 - i);
249
+ c.toggleAttribute('data-top', i === 0);
250
+ c.setAttribute('aria-hidden', String(i !== 0));
251
+ if (i === 0) {
252
+ const rot = reduced ? 0 : dragX / 18;
253
+ c.style.transform = `translate3d(${dragX}px, 0, 0) rotate(${rot.toFixed(2)}deg)`;
254
+ c.style.opacity = '1';
255
+ }
256
+ else {
257
+ const k = Math.min(i, visible);
258
+ const pull = Math.min(1, Math.abs(dragX) / this.num('threshold', 90));
259
+ const kk = Math.max(0, k - pull);
260
+ c.style.transform = `translate3d(0, ${(kk * off).toFixed(1)}px, 0) scale(${(1 - kk * 0.05).toFixed(3)})`;
261
+ c.style.opacity = i > visible ? '0' : '1';
262
+ }
263
+ });
264
+ }
265
+ mount() {
266
+ if (!this.hasAttribute('tabindex'))
267
+ this.tabIndex = 0;
268
+ if (!this.hasAttribute('role'))
269
+ this.setAttribute('role', 'group');
270
+ this.setAttribute('aria-roledescription', 'card stack');
271
+ this._x = spring.createSpring({ spring: 'wobbly', onUpdate: (v) => this.layout(v) });
272
+ this.layout();
273
+ this.listen(this, 'pointerdown', (e) => {
274
+ if (this.flag('disabled') || this._busy || !this.top || !this.top.contains(e.target))
275
+ return;
276
+ this._x.stop();
277
+ this._drag = { id: e.pointerId, x0: e.clientX - this._x.value, t0: e.timeStamp };
278
+ try {
279
+ this.setPointerCapture?.(e.pointerId);
280
+ }
281
+ catch {
282
+ /* synthetic */
283
+ }
284
+ this.setAttribute('data-dragging', '');
285
+ });
286
+ this.listen(this, 'pointermove', (e) => {
287
+ if (!this._drag || e.pointerId !== this._drag.id)
288
+ return;
289
+ this._x.jump(e.clientX - this._drag.x0);
290
+ });
291
+ const up = (e) => {
292
+ if (!this._drag || e.pointerId !== this._drag.id)
293
+ return;
294
+ this._drag = null;
295
+ this.removeAttribute('data-dragging');
296
+ const x = this._x.value;
297
+ if (Math.abs(x) >= this.num('threshold', 90))
298
+ this.swipe(x > 0 ? 'right' : 'left');
299
+ else
300
+ this._x.set(0);
301
+ };
302
+ this.listen(this, 'pointerup', up);
303
+ this.listen(this, 'pointercancel', up);
304
+ this.listen(this, 'keydown', (e) => {
305
+ if (e.key === 'ArrowLeft' || e.key === 'ArrowRight') {
306
+ e.preventDefault();
307
+ this.swipe(e.key === 'ArrowLeft' ? 'left' : 'right');
308
+ }
309
+ });
310
+ const mo = typeof MutationObserver !== 'undefined' ? new MutationObserver(() => this.layout(this._x.value)) : null;
311
+ mo?.observe(this, { childList: true });
312
+ this.onCleanup(() => mo?.disconnect());
313
+ }
314
+ unmount() {
315
+ this._x?.stop();
316
+ }
317
+ async swipe(direction) {
318
+ const card = this.top;
319
+ if (!card || this._busy || this.flag('disabled'))
320
+ return;
321
+ this._busy = true;
322
+ this._x.stop();
323
+ const from = this._x.value;
324
+ const to = (direction === 'left' ? -1 : 1) * Math.max(320, (this.getBoundingClientRect().width || 300) * 1.4);
325
+ card.setAttribute('data-gone', '');
326
+ this._x.jump(0);
327
+ this.layout(0);
328
+ const a = this.reduced
329
+ ? null
330
+ : this.motion(card, [{ transform: `translate3d(${from}px,0,0) rotate(${from / 18}deg)`, opacity: 1 }, { transform: `translate3d(${to}px,0,0) rotate(${to / 14}deg)`, opacity: 0 }], {
331
+ duration: 380,
332
+ easing: 'cubic-bezier(0.3, 0.7, 0.4, 1)',
333
+ fill: 'forwards',
334
+ });
335
+ await a?.finished.catch(() => undefined);
336
+ a?.cancel();
337
+ card.removeAttribute('data-gone');
338
+ if (this.flag('loop'))
339
+ this.append(card);
340
+ else
341
+ card.remove();
342
+ this.layout(0);
343
+ this._busy = false;
344
+ this.emit('swipe', { direction, card });
345
+ if (!this.top)
346
+ this.emit('empty');
347
+ }
348
+ }, { id: 'card-stack', text: css$2 });
349
+ }
350
+
351
+ var css$1 = "usa-sticky-stack{display:grid;gap:28vh;padding-bottom:10vh}usa-sticky-stack>*{position:sticky;transform-origin:50% 0;will-change:transform}";
352
+
353
+ function defineStickyStack(tag = 'usa-sticky-stack') {
354
+ return base.defineElement(tag, (Base) => class UsaStickyStack extends Base {
355
+ constructor() {
356
+ super(...arguments);
357
+ this._frame = 0;
358
+ }
359
+ static get observedAttributes() {
360
+ return ['top', 'gap', 'scale'];
361
+ }
362
+ mount() {
363
+ const top = this.num('top', 80);
364
+ const gap = this.num('gap', 16);
365
+ const cards = Array.from(this.children);
366
+ cards.forEach((c, i) => {
367
+ c.style.top = `${top + i * gap}px`;
368
+ c.style.zIndex = String(i + 1);
369
+ });
370
+ if (this.reduced)
371
+ return;
372
+ const schedule = () => {
373
+ if (!this._frame)
374
+ this._frame = base.raf(() => this.update());
375
+ };
376
+ let active = false;
377
+ this.inView((v) => {
378
+ if (v && !active) {
379
+ active = true;
380
+ window.addEventListener('scroll', schedule, { passive: true });
381
+ window.addEventListener('resize', schedule, { passive: true });
382
+ schedule();
383
+ }
384
+ else if (!v && active) {
385
+ active = false;
386
+ window.removeEventListener('scroll', schedule);
387
+ window.removeEventListener('resize', schedule);
388
+ }
389
+ });
390
+ this.onCleanup(() => {
391
+ window.removeEventListener('scroll', schedule);
392
+ window.removeEventListener('resize', schedule);
393
+ });
394
+ }
395
+ unmount() {
396
+ base.caf(this._frame);
397
+ this._frame = 0;
398
+ }
399
+ update() {
400
+ this._frame = 0;
401
+ const cards = Array.from(this.children);
402
+ const rects = cards.map((c) => c.getBoundingClientRect());
403
+ const shrink = this.num('scale', 0.06);
404
+ cards.forEach((c, i) => {
405
+ let covered = 0;
406
+ for (let j = i + 1; j < cards.length; j++) {
407
+ const h = rects[i].height || 1;
408
+ covered += base.clamp((rects[i].bottom - rects[j].top) / h, 0, 1);
409
+ }
410
+ const s = 1 - Math.min(3, covered) * shrink;
411
+ c.style.transform = covered > 0.001 ? `scale(${s.toFixed(4)})` : '';
412
+ c.style.filter = covered > 0.001 ? `brightness(${(1 - Math.min(0.35, covered * 0.12)).toFixed(3)})` : '';
413
+ });
414
+ }
415
+ }, { id: 'sticky-stack', text: css$1 });
416
+ }
417
+
418
+ var css = "usa-carousel-3d{position:relative;display:grid;place-items:center;perspective:var(--usa-c3d-perspective,1200px);transform-style:preserve-3d;touch-action:pan-y;user-select:none;-webkit-user-select:none;min-height:220px}usa-carousel-3d>*{grid-area:1 / 1;backface-visibility:hidden;transition:opacity 0.3s ease;cursor:pointer}usa-carousel-3d>[aria-current]{cursor:default}usa-carousel-3d:focus-visible{outline:2px solid var(--usa-accent,#7c5cff);outline-offset:4px;border-radius:12px}@media (prefers-reduced-motion:reduce){usa-carousel-3d{perspective:none}usa-carousel-3d>:not([aria-current]){visibility:hidden}}";
419
+
420
+ function defineCarousel3d(tag = 'usa-carousel-3d') {
421
+ return base.defineElement(tag, (Base) => class UsaCarousel3d extends Base {
422
+ constructor() {
423
+ super(...arguments);
424
+ this._i = 0;
425
+ }
426
+ static get observedAttributes() {
427
+ return ['radius', 'perspective', 'autoplay'];
428
+ }
429
+ get index() {
430
+ return this._i;
431
+ }
432
+ set index(v) {
433
+ this.goTo(v);
434
+ }
435
+ items() {
436
+ return Array.from(this.children);
437
+ }
438
+ render(angle) {
439
+ const items = this.items();
440
+ const n = items.length || 1;
441
+ const step = 360 / n;
442
+ const w = items[0]?.offsetWidth || 200;
443
+ const r = this.num('radius', Math.round(w / 2 / Math.tan(Math.PI / n)) + 24);
444
+ const reduced = this.reduced;
445
+ items.forEach((it, i) => {
446
+ const norm = ((((i * step - angle) % 360) + 540) % 360) - 180;
447
+ it.style.transform = reduced ? '' : `rotateY(${norm.toFixed(2)}deg) translateZ(${r}px)`;
448
+ it.style.opacity = reduced ? (i === this._i ? '1' : '0') : String(Math.max(0.25, 1 - Math.abs(norm) / 200));
449
+ });
450
+ }
451
+ mount() {
452
+ this.style.setProperty('--usa-c3d-perspective', `${this.num('perspective', 1200)}px`);
453
+ if (!this.hasAttribute('tabindex'))
454
+ this.tabIndex = 0;
455
+ this.setAttribute('role', 'region');
456
+ this.setAttribute('aria-roledescription', 'carousel');
457
+ this._i = Math.max(0, Math.min(this.items().length - 1, this.num('index', 0)));
458
+ const step = () => 360 / (this.items().length || 1);
459
+ this._angle = spring.createSpring({ value: this._i * step(), spring: 'gentle', onUpdate: (v) => this.render(v) });
460
+ this.render(this._angle.value);
461
+ this.mark();
462
+ this.listen(this, 'keydown', (e) => {
463
+ if (e.key === 'ArrowRight')
464
+ this.next();
465
+ else if (e.key === 'ArrowLeft')
466
+ this.prev();
467
+ else
468
+ return;
469
+ e.preventDefault();
470
+ });
471
+ let x0 = null;
472
+ this.listen(this, 'pointerdown', (e) => (x0 = e.clientX));
473
+ this.listen(this, 'pointerup', (e) => {
474
+ if (x0 === null)
475
+ return;
476
+ const dx = e.clientX - x0;
477
+ x0 = null;
478
+ if (Math.abs(dx) > 40)
479
+ dx < 0 ? this.next() : this.prev();
480
+ });
481
+ this.listen(this, 'click', (e) => {
482
+ const it = this.items().find((c) => c.contains(e.target));
483
+ if (it) {
484
+ const i = this.items().indexOf(it);
485
+ if (i !== this._i)
486
+ this.goTo(i);
487
+ }
488
+ });
489
+ const every = this.num('autoplay', 0);
490
+ if (every > 0 && !this.reduced) {
491
+ let paused = false;
492
+ const pause = () => (paused = true);
493
+ const resume = () => (paused = false);
494
+ this.listen(this, 'pointerenter', pause);
495
+ this.listen(this, 'pointerleave', resume);
496
+ this.listen(this, 'focusin', pause);
497
+ this.listen(this, 'focusout', resume);
498
+ const t = setInterval(() => !paused && !document.hidden && this.next(), every);
499
+ this.onCleanup(() => clearInterval(t));
500
+ }
501
+ }
502
+ unmount() {
503
+ this._angle?.stop();
504
+ }
505
+ mark() {
506
+ this.items().forEach((it, i) => {
507
+ if (i === this._i)
508
+ it.setAttribute('aria-current', 'true');
509
+ else
510
+ it.removeAttribute('aria-current');
511
+ });
512
+ }
513
+ goTo(i) {
514
+ const n = this.items().length;
515
+ if (!n || !this._angle)
516
+ return;
517
+ const step = 360 / n;
518
+ // shortest rotation from the current target
519
+ const cur = this._angle.target;
520
+ const curIdx = Math.round(cur / step);
521
+ let delta = (((i - curIdx) % n) + n) % n;
522
+ if (delta > n / 2)
523
+ delta -= n;
524
+ this._i = ((i % n) + n) % n;
525
+ this._angle.set((curIdx + delta) * step);
526
+ if (this.reduced)
527
+ this.render(this._angle.value);
528
+ this.mark();
529
+ this.emit('change', { index: this._i });
530
+ }
531
+ next() {
532
+ this.goTo(this._i + 1);
533
+ }
534
+ prev() {
535
+ this.goTo(this._i - 1);
536
+ }
537
+ }, { id: 'carousel-3d', text: css });
538
+ }
539
+
540
+ /**
541
+ * motionary/components/cards — card effects (v2.4).
542
+ * `<usa-card effect="flip | holo | glass | border-glow | conic-border | lift |
543
+ * spotlight | sheen | parallax-layers | expand">` (combinable),
544
+ * `<usa-card-stack>` (swipeable deck), `<usa-sticky-stack>` (stacking on
545
+ * scroll) and `<usa-carousel-3d>`.
546
+ */
547
+ /** Register every component of this category under its default tag. */
548
+ function defineCardComponents() {
549
+ defineCard();
550
+ defineCardStack();
551
+ defineStickyStack();
552
+ defineCarousel3d();
553
+ }
554
+
555
+ exports.CARD_EFFECTS = CARD_EFFECTS;
556
+ exports.defineCard = defineCard;
557
+ exports.defineCardComponents = defineCardComponents;
558
+ exports.defineCardStack = defineCardStack;
559
+ exports.defineCarousel3d = defineCarousel3d;
560
+ exports.defineStickyStack = defineStickyStack;
561
+ //# sourceMappingURL=cards.cjs.map