use-scroll-animate 2.7.0 → 2.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.
- package/CHANGELOG.md +34 -0
- package/README.md +4 -4
- package/README_ja.md +2 -2
- package/README_zh.md +3 -3
- package/dist/chunks/{base-BR6fYLBA.cjs → base-BkQcvoSG.cjs} +29 -1
- package/dist/chunks/{base-BR6fYLBA.cjs.map → base-BkQcvoSG.cjs.map} +1 -1
- package/dist/chunks/{base-D6zLiNGH.js → base-CB8gChoe.js} +29 -2
- package/dist/chunks/{base-D6zLiNGH.js.map → base-CB8gChoe.js.map} +1 -1
- package/dist/chunks/{core-B_J4rXbC.cjs → core-C1cEwjJj.cjs} +11 -2
- package/dist/chunks/core-C1cEwjJj.cjs.map +1 -0
- package/dist/chunks/{core-BP-a1iNc.js → core-J_KM443q.js} +12 -3
- package/dist/chunks/core-J_KM443q.js.map +1 -0
- package/dist/chunks/index-tags-BEM98giN.cjs +20 -0
- package/dist/chunks/index-tags-BEM98giN.cjs.map +1 -0
- package/dist/chunks/index-tags-f37txHmb.js +18 -0
- package/dist/chunks/index-tags-f37txHmb.js.map +1 -0
- package/dist/chunks/{spring-DyHe1Hfa.cjs → spring-7U9MC6yQ.cjs} +2 -2
- package/dist/chunks/{spring-DyHe1Hfa.cjs.map → spring-7U9MC6yQ.cjs.map} +1 -1
- package/dist/chunks/{spring-C2Megtcf.js → spring-ka0YJ_ZR.js} +2 -2
- package/dist/chunks/{spring-C2Megtcf.js.map → spring-ka0YJ_ZR.js.map} +1 -1
- package/dist/chunks/{stagger-DTv_WiUQ.js → stagger-CGF18oNs.js} +2 -2
- package/dist/chunks/{stagger-DTv_WiUQ.js.map → stagger-CGF18oNs.js.map} +1 -1
- package/dist/chunks/{stagger-DHw0ExuR.cjs → stagger-DtKKS6GP.cjs} +2 -2
- package/dist/chunks/{stagger-DHw0ExuR.cjs.map → stagger-DtKKS6GP.cjs.map} +1 -1
- package/dist/chunks/variants-Ce9CboVc.js +35 -0
- package/dist/chunks/variants-Ce9CboVc.js.map +1 -0
- package/dist/chunks/variants-PsCXbQ5h.cjs +39 -0
- package/dist/chunks/variants-PsCXbQ5h.cjs.map +1 -0
- package/dist/components/background.cjs +277 -11
- package/dist/components/background.cjs.map +1 -1
- package/dist/components/background.css +3 -1
- package/dist/components/background.d.cts +64 -3
- package/dist/components/background.d.ts +64 -3
- package/dist/components/background.js +274 -13
- package/dist/components/background.js.map +1 -1
- package/dist/components/cards.cjs +2 -2
- package/dist/components/cards.js +3 -3
- package/dist/components/click.cjs +2 -2
- package/dist/components/click.js +3 -3
- package/dist/components/feedback.cjs +15 -8
- package/dist/components/feedback.cjs.map +1 -1
- package/dist/components/feedback.d.cts +4 -1
- package/dist/components/feedback.d.ts +4 -1
- package/dist/components/feedback.js +16 -9
- package/dist/components/feedback.js.map +1 -1
- package/dist/components/interaction.cjs +1 -1
- package/dist/components/interaction.js +2 -2
- package/dist/components/jsx.cjs +3 -0
- package/dist/components/jsx.cjs.map +1 -0
- package/dist/components/jsx.d.cts +45 -0
- package/dist/components/jsx.d.ts +45 -0
- package/dist/components/jsx.js +2 -0
- package/dist/components/jsx.js.map +1 -0
- package/dist/components/lazy.cjs +84 -0
- package/dist/components/lazy.cjs.map +1 -0
- package/dist/components/lazy.d.cts +40 -0
- package/dist/components/lazy.d.ts +40 -0
- package/dist/components/lazy.js +79 -0
- package/dist/components/lazy.js.map +1 -0
- package/dist/components/page.cjs +2 -2
- package/dist/components/page.js +3 -3
- package/dist/components/physics.cjs +2 -2
- package/dist/components/physics.js +4 -4
- package/dist/components/react.cjs +96 -0
- package/dist/components/react.cjs.map +1 -0
- package/dist/components/react.d.cts +18 -0
- package/dist/components/react.d.ts +18 -0
- package/dist/components/react.js +91 -0
- package/dist/components/react.js.map +1 -0
- package/dist/components/reveal.cjs +1 -1
- package/dist/components/reveal.js +2 -2
- package/dist/components/text.cjs +180 -11
- package/dist/components/text.cjs.map +1 -1
- package/dist/components/text.css +1 -0
- package/dist/components/text.d.cts +54 -2
- package/dist/components/text.d.ts +54 -2
- package/dist/components/text.js +177 -13
- package/dist/components/text.js.map +1 -1
- package/dist/components/transitions.cjs +3 -4
- package/dist/components/transitions.cjs.map +1 -1
- package/dist/components/transitions.js +4 -5
- package/dist/components/transitions.js.map +1 -1
- package/dist/components/ui.cjs +18 -48
- package/dist/components/ui.cjs.map +1 -1
- package/dist/components/ui.js +6 -35
- package/dist/components/ui.js.map +1 -1
- package/dist/components/vue.cjs +51 -0
- package/dist/components/vue.cjs.map +1 -0
- package/dist/components/vue.d.cts +1344 -0
- package/dist/components/vue.d.ts +1344 -0
- package/dist/components/vue.js +48 -0
- package/dist/components/vue.js.map +1 -0
- package/dist/components.cjs +19 -21
- package/dist/components.cjs.map +1 -1
- package/dist/components.css +4 -1
- package/dist/components.d.cts +123 -6
- package/dist/components.d.ts +123 -6
- package/dist/components.js +11 -22
- package/dist/components.js.map +1 -1
- package/dist/components.umd.js +2 -2
- package/dist/components.umd.js.map +1 -1
- package/dist/element.cjs +1 -1
- package/dist/element.js +1 -1
- package/dist/element.umd.js +1 -1
- package/dist/element.umd.js.map +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.js +3 -3
- package/dist/index.umd.js +2 -2
- package/dist/index.umd.js.map +1 -1
- package/dist/react.cjs +2 -2
- package/dist/react.js +2 -2
- package/dist/solid.cjs +2 -2
- package/dist/solid.js +2 -2
- package/dist/svelte.cjs +2 -2
- package/dist/svelte.js +2 -2
- package/dist/vue.cjs +2 -2
- package/dist/vue.js +2 -2
- package/docs/accessibility.md +32 -0
- package/docs/components.md +45 -6
- package/docs/frameworks-ssr.md +64 -0
- package/docs/upgrading-3.md +20 -0
- package/docs/windows-apps.md +13 -2
- package/package.json +42 -1
- package/dist/chunks/core-BP-a1iNc.js.map +0 -1
- package/dist/chunks/core-B_J4rXbC.cjs.map +0 -1
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { defineComponents } from '../components.js';
|
|
2
|
+
import './reveal.js';
|
|
3
|
+
import '../chunks/base-CB8gChoe.js';
|
|
4
|
+
import './text.js';
|
|
5
|
+
import './interaction.js';
|
|
6
|
+
import './feedback.js';
|
|
7
|
+
import './background.js';
|
|
8
|
+
import '../chunks/variants-Ce9CboVc.js';
|
|
9
|
+
import './transitions.js';
|
|
10
|
+
import './physics.js';
|
|
11
|
+
import '../chunks/spring-ka0YJ_ZR.js';
|
|
12
|
+
import './cards.js';
|
|
13
|
+
import './click.js';
|
|
14
|
+
import './ui.js';
|
|
15
|
+
import './page.js';
|
|
16
|
+
import '../chunks/index-tags-f37txHmb.js';
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* use-scroll-animate/components/vue — Vue integration (v2.9).
|
|
20
|
+
*
|
|
21
|
+
* ```js
|
|
22
|
+
* // vite.config.js
|
|
23
|
+
* import vue from '@vitejs/plugin-vue';
|
|
24
|
+
* import { isUsaElement } from 'use-scroll-animate/components/vue';
|
|
25
|
+
* export default { plugins: [vue({ template: { compilerOptions: { isCustomElement: isUsaElement } } })] };
|
|
26
|
+
*
|
|
27
|
+
* // main.js
|
|
28
|
+
* import { UsaPlugin } from 'use-scroll-animate/components/vue';
|
|
29
|
+
* app.use(UsaPlugin, { categories: ['click', 'cards'] });
|
|
30
|
+
* ```
|
|
31
|
+
* In templates, listen with `@usa:change="…"` and bind properties with
|
|
32
|
+
* `.prop`: `<usa-toggle :checked.prop="on" @usa:change="on = $event.detail.checked">`.
|
|
33
|
+
*/
|
|
34
|
+
/** `compilerOptions.isCustomElement` predicate for every `<usa-*>` tag. */
|
|
35
|
+
const isUsaElement = (tag) => tag.startsWith('usa-');
|
|
36
|
+
/** Vue plugin: registers the `<usa-*>` elements (client only) and sets `isCustomElement` at runtime. */
|
|
37
|
+
const UsaPlugin = {
|
|
38
|
+
install(app, options = {}) {
|
|
39
|
+
var _a;
|
|
40
|
+
const co = ((_a = app.config).compilerOptions || (_a.compilerOptions = {}));
|
|
41
|
+
const prev = co.isCustomElement;
|
|
42
|
+
co.isCustomElement = (t) => isUsaElement(t) || !!prev?.(t);
|
|
43
|
+
defineComponents(options.categories);
|
|
44
|
+
},
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
export { UsaPlugin, isUsaElement };
|
|
48
|
+
//# sourceMappingURL=vue.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vue.js","sources":["../../src/components/frameworks/vue.ts"],"sourcesContent":["/**\n * use-scroll-animate/components/vue — Vue integration (v2.9).\n *\n * ```js\n * // vite.config.js\n * import vue from '@vitejs/plugin-vue';\n * import { isUsaElement } from 'use-scroll-animate/components/vue';\n * export default { plugins: [vue({ template: { compilerOptions: { isCustomElement: isUsaElement } } })] };\n *\n * // main.js\n * import { UsaPlugin } from 'use-scroll-animate/components/vue';\n * app.use(UsaPlugin, { categories: ['click', 'cards'] });\n * ```\n * In templates, listen with `@usa:change=\"…\"` and bind properties with\n * `.prop`: `<usa-toggle :checked.prop=\"on\" @usa:change=\"on = $event.detail.checked\">`.\n */\nimport { defineComponents, type ComponentCategory } from '../index';\n\n/** `compilerOptions.isCustomElement` predicate for every `<usa-*>` tag. */\nexport const isUsaElement = (tag: string): boolean => tag.startsWith('usa-');\n\nexport interface UsaPluginOptions {\n /** Only register these categories (default: all). */\n categories?: ComponentCategory[];\n}\n\n/** Vue plugin: registers the `<usa-*>` elements (client only) and sets `isCustomElement` at runtime. */\nexport const UsaPlugin = {\n install(app: { config: { compilerOptions?: { isCustomElement?: (t: string) => boolean } } }, options: UsaPluginOptions = {}): void {\n const co = (app.config.compilerOptions ||= {});\n const prev = co.isCustomElement;\n co.isCustomElement = (t: string) => isUsaElement(t) || !!prev?.(t);\n defineComponents(options.categories);\n },\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;AAeG;AAGH;AACO,MAAM,YAAY,GAAG,CAAC,GAAW,KAAc,GAAG,CAAC,UAAU,CAAC,MAAM;AAO3E;AACO,MAAM,SAAS,GAAG;AACvB,IAAA,OAAO,CAAC,GAAmF,EAAE,OAAA,GAA4B,EAAE,EAAA;;AACzH,QAAA,MAAM,EAAE,IAAG,CAAA,EAAA,GAAC,GAAG,CAAC,MAAM,EAAC,eAAe,KAAA,EAAA,CAAf,eAAe,GAAK,EAAE,EAAC;AAC9C,QAAA,MAAM,IAAI,GAAG,EAAE,CAAC,eAAe;QAC/B,EAAE,CAAC,eAAe,GAAG,CAAC,CAAS,KAAK,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC;AAClE,QAAA,gBAAgB,CAAC,OAAO,CAAC,UAAU,CAAC;IACtC,CAAC;;;;;"}
|
package/dist/components.cjs
CHANGED
|
@@ -11,8 +11,10 @@ var components_cards = require('./components/cards.cjs');
|
|
|
11
11
|
var components_click = require('./components/click.cjs');
|
|
12
12
|
var components_ui = require('./components/ui.cjs');
|
|
13
13
|
var components_page = require('./components/page.cjs');
|
|
14
|
-
var
|
|
15
|
-
var
|
|
14
|
+
var variants = require('./chunks/variants-PsCXbQ5h.cjs');
|
|
15
|
+
var base = require('./chunks/base-BkQcvoSG.cjs');
|
|
16
|
+
var indexTags = require('./chunks/index-tags-BEM98giN.cjs');
|
|
17
|
+
var spring = require('./chunks/spring-7U9MC6yQ.cjs');
|
|
16
18
|
|
|
17
19
|
/**
|
|
18
20
|
* use-scroll-animate/components
|
|
@@ -34,20 +36,6 @@ var spring = require('./chunks/spring-DyHe1Hfa.cjs');
|
|
|
34
36
|
*
|
|
35
37
|
* @license MIT
|
|
36
38
|
*/
|
|
37
|
-
/** The component categories and their default tags. */
|
|
38
|
-
const COMPONENT_CATEGORIES = {
|
|
39
|
-
reveal: ['usa-reveal', 'usa-stagger', 'usa-scroll-progress', 'usa-scrolly'],
|
|
40
|
-
text: ['usa-typewriter', 'usa-split-text', 'usa-scramble', 'usa-counter', 'usa-shimmer-text', 'usa-text-rotate'],
|
|
41
|
-
interaction: ['usa-ripple', 'usa-magnetic', 'usa-tilt', 'usa-spotlight', 'usa-press', 'usa-toggle'],
|
|
42
|
-
feedback: ['usa-spinner', 'usa-skeleton', 'usa-progress', 'usa-toaster', 'usa-check'],
|
|
43
|
-
background: ['usa-aurora', 'usa-particles', 'usa-grain', 'usa-marquee', 'usa-acrylic'],
|
|
44
|
-
transitions: ['usa-dialog', 'usa-accordion', 'usa-flip-list', 'usa-view-switch'],
|
|
45
|
-
physics: ['usa-spring', 'usa-draggable', 'usa-overscroll'],
|
|
46
|
-
cards: ['usa-card', 'usa-card-stack', 'usa-sticky-stack', 'usa-carousel-3d'],
|
|
47
|
-
click: ['usa-click', 'usa-button', 'usa-icon-morph', 'usa-like', 'usa-hold', 'usa-double-tap', 'usa-checkbox'],
|
|
48
|
-
ui: ['usa-tabs', 'usa-drawer', 'usa-bottom-sheet', 'usa-pull-refresh', 'usa-fab', 'usa-navbar', 'usa-slider', 'usa-rating', 'usa-tooltip', 'usa-popover', 'usa-badge', 'usa-avatar-stack'],
|
|
49
|
-
page: ['usa-cursor', 'usa-fullpage', 'usa-loading-bar', 'usa-back-to-top', 'usa-ambient', 'usa-splash', 'usa-auto-skeleton', 'usa-motion-switch'],
|
|
50
|
-
};
|
|
51
39
|
const BY_CATEGORY = {
|
|
52
40
|
reveal: components_reveal.defineRevealComponents,
|
|
53
41
|
text: components_text.defineTextComponents,
|
|
@@ -67,7 +55,7 @@ const BY_CATEGORY = {
|
|
|
67
55
|
*/
|
|
68
56
|
function defineComponents(categories) {
|
|
69
57
|
if (base.canDefine())
|
|
70
|
-
|
|
58
|
+
variants.adoptVariants();
|
|
71
59
|
(categories || Object.keys(BY_CATEGORY)).forEach((c) => BY_CATEGORY[c]?.());
|
|
72
60
|
}
|
|
73
61
|
|
|
@@ -80,12 +68,17 @@ exports.defineStagger = components_reveal.defineStagger;
|
|
|
80
68
|
exports.readScrollProgress = components_reveal.readScrollProgress;
|
|
81
69
|
exports.revealKeyframes = components_reveal.revealKeyframes;
|
|
82
70
|
exports.defineCounter = components_text.defineCounter;
|
|
71
|
+
exports.defineGlitch = components_text.defineGlitch;
|
|
72
|
+
exports.defineGradientText = components_text.defineGradientText;
|
|
73
|
+
exports.defineHandwriting = components_text.defineHandwriting;
|
|
83
74
|
exports.defineScramble = components_text.defineScramble;
|
|
75
|
+
exports.defineScrollHighlight = components_text.defineScrollHighlight;
|
|
84
76
|
exports.defineShimmerText = components_text.defineShimmerText;
|
|
85
77
|
exports.defineSplitText = components_text.defineSplitText;
|
|
86
78
|
exports.defineTextComponents = components_text.defineTextComponents;
|
|
87
79
|
exports.defineTextRotate = components_text.defineTextRotate;
|
|
88
80
|
exports.defineTypewriter = components_text.defineTypewriter;
|
|
81
|
+
exports.defineWaveText = components_text.defineWaveText;
|
|
89
82
|
exports.easeOutExpo = components_text.easeOutExpo;
|
|
90
83
|
exports.scrambleFrame = components_text.scrambleFrame;
|
|
91
84
|
exports.defineInteractionComponents = components_interaction.defineInteractionComponents;
|
|
@@ -106,9 +99,14 @@ exports.toast = components_feedback.toast;
|
|
|
106
99
|
exports.defineAcrylic = components_background.defineAcrylic;
|
|
107
100
|
exports.defineAurora = components_background.defineAurora;
|
|
108
101
|
exports.defineBackgroundComponents = components_background.defineBackgroundComponents;
|
|
102
|
+
exports.defineBlobs = components_background.defineBlobs;
|
|
103
|
+
exports.defineDotNetwork = components_background.defineDotNetwork;
|
|
109
104
|
exports.defineGrain = components_background.defineGrain;
|
|
105
|
+
exports.defineGridGlow = components_background.defineGridGlow;
|
|
110
106
|
exports.defineMarquee = components_background.defineMarquee;
|
|
111
107
|
exports.defineParticles = components_background.defineParticles;
|
|
108
|
+
exports.defineWaterRipple = components_background.defineWaterRipple;
|
|
109
|
+
exports.fluentPreset = components_background.fluentPreset;
|
|
112
110
|
exports.connectedAnimation = components_transitions.connectedAnimation;
|
|
113
111
|
exports.defineAccordion = components_transitions.defineAccordion;
|
|
114
112
|
exports.defineDialog = components_transitions.defineDialog;
|
|
@@ -145,8 +143,6 @@ exports.defineLike = components_click.defineLike;
|
|
|
145
143
|
exports.haptic = components_click.haptic;
|
|
146
144
|
exports.morphPath = components_click.morphPath;
|
|
147
145
|
exports.shake = components_click.shake;
|
|
148
|
-
exports.VARIANTS = components_ui.VARIANTS;
|
|
149
|
-
exports.adoptVariants = components_ui.adoptVariants;
|
|
150
146
|
exports.defineAvatarStack = components_ui.defineAvatarStack;
|
|
151
147
|
exports.defineBadge = components_ui.defineBadge;
|
|
152
148
|
exports.defineBottomSheet = components_ui.defineBottomSheet;
|
|
@@ -160,7 +156,6 @@ exports.defineSlider = components_ui.defineSlider;
|
|
|
160
156
|
exports.defineTabs = components_ui.defineTabs;
|
|
161
157
|
exports.defineTooltip = components_ui.defineTooltip;
|
|
162
158
|
exports.defineUiComponents = components_ui.defineUiComponents;
|
|
163
|
-
exports.setVariant = components_ui.setVariant;
|
|
164
159
|
exports.AMBIENT_EFFECTS = components_page.AMBIENT_EFFECTS;
|
|
165
160
|
exports.CURSOR_MODES = components_page.CURSOR_MODES;
|
|
166
161
|
exports.PAGE_EFFECTS = components_page.PAGE_EFFECTS;
|
|
@@ -182,10 +177,14 @@ exports.setMotionIntensity = components_page.setMotionIntensity;
|
|
|
182
177
|
exports.smoothScroll = components_page.smoothScroll;
|
|
183
178
|
exports.supportsViewTransitions = components_page.supportsViewTransitions;
|
|
184
179
|
exports.themeTransition = components_page.themeTransition;
|
|
180
|
+
exports.VARIANTS = variants.VARIANTS;
|
|
181
|
+
exports.adoptVariants = variants.adoptVariants;
|
|
182
|
+
exports.setVariant = variants.setVariant;
|
|
185
183
|
exports.MOTION_SCALE = base.MOTION_SCALE;
|
|
186
184
|
exports.configureComponents = base.configureComponents;
|
|
187
185
|
exports.getMotionIntensity = base.getMotionIntensity;
|
|
188
186
|
exports.prefersReducedMotion = base.prefersReducedMotion;
|
|
187
|
+
exports.COMPONENT_CATEGORIES = indexTags.COMPONENT_CATEGORIES;
|
|
189
188
|
exports.SPRING_PRESETS = spring.SPRING_PRESETS;
|
|
190
189
|
exports.createSpring = spring.createSpring;
|
|
191
190
|
exports.linearEasing = spring.linearEasing;
|
|
@@ -198,6 +197,5 @@ exports.springEasing = spring.springEasing;
|
|
|
198
197
|
exports.springSamples = spring.springSamples;
|
|
199
198
|
exports.stepSpring = spring.stepSpring;
|
|
200
199
|
exports.supportsLinearEasing = spring.supportsLinearEasing;
|
|
201
|
-
exports.COMPONENT_CATEGORIES = COMPONENT_CATEGORIES;
|
|
202
200
|
exports.defineComponents = defineComponents;
|
|
203
201
|
//# sourceMappingURL=components.cjs.map
|
package/dist/components.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components.cjs","sources":["../src/components/index.ts"],"sourcesContent":["/**\n * use-scroll-animate/components\n *\n * Framework-agnostic, dependency-free animated UI components built on\n * Custom Elements + CSS + the Web Animations API. They run in any browser\n * and in Windows desktop apps that render with a web view: Electron, Tauri\n * (WebView2), WinUI 3 / WPF / WinForms with WebView2, and installed PWAs.\n *\n * ```js\n * import { defineComponents } from 'use-scroll-animate/components';\n * defineComponents(); // registers every <usa-*> element\n * // or only what you use (tree-shakable):\n * import { defineTypewriter } from 'use-scroll-animate/components/text';\n * ```\n *\n * Importing has no side effects and is SSR-safe; nothing is registered\n * until a `define*()` function runs in a browser.\n *\n * @license MIT\n */\nimport { defineRevealComponents } from './reveal/index';\nimport { defineTextComponents } from './text/index';\nimport { defineInteractionComponents } from './interaction/index';\nimport { defineFeedbackComponents } from './feedback/index';\nimport { defineBackgroundComponents } from './background/index';\nimport { defineTransitionComponents } from './transitions/index';\nimport { definePhysicsComponents } from './physics/index';\nimport { defineCardComponents } from './cards/index';\nimport { defineClickComponents } from './click/index';\nimport { defineUiComponents } from './ui/index';\nimport { definePageComponents } from './page/index';\nimport { adoptVariants } from './ui/variants';\nimport { canDefine } from './base';\n\nexport * from './reveal/index';\nexport * from './text/index';\nexport * from './interaction/index';\nexport * from './feedback/index';\nexport * from './background/index';\nexport * from './transitions/index';\nexport * from './physics/index';\nexport * from './cards/index';\nexport * from './click/index';\nexport * from './ui/index';\nexport * from './page/index';\n\
|
|
1
|
+
{"version":3,"file":"components.cjs","sources":["../src/components/index.ts"],"sourcesContent":["/**\n * use-scroll-animate/components\n *\n * Framework-agnostic, dependency-free animated UI components built on\n * Custom Elements + CSS + the Web Animations API. They run in any browser\n * and in Windows desktop apps that render with a web view: Electron, Tauri\n * (WebView2), WinUI 3 / WPF / WinForms with WebView2, and installed PWAs.\n *\n * ```js\n * import { defineComponents } from 'use-scroll-animate/components';\n * defineComponents(); // registers every <usa-*> element\n * // or only what you use (tree-shakable):\n * import { defineTypewriter } from 'use-scroll-animate/components/text';\n * ```\n *\n * Importing has no side effects and is SSR-safe; nothing is registered\n * until a `define*()` function runs in a browser.\n *\n * @license MIT\n */\nimport { defineRevealComponents } from './reveal/index';\nimport { defineTextComponents } from './text/index';\nimport { defineInteractionComponents } from './interaction/index';\nimport { defineFeedbackComponents } from './feedback/index';\nimport { defineBackgroundComponents } from './background/index';\nimport { defineTransitionComponents } from './transitions/index';\nimport { definePhysicsComponents } from './physics/index';\nimport { defineCardComponents } from './cards/index';\nimport { defineClickComponents } from './click/index';\nimport { defineUiComponents } from './ui/index';\nimport { definePageComponents } from './page/index';\nimport { adoptVariants } from './ui/variants';\nimport { canDefine } from './base';\n\nexport * from './reveal/index';\nexport * from './text/index';\nexport * from './interaction/index';\nexport * from './feedback/index';\nexport * from './background/index';\nexport * from './transitions/index';\nexport * from './physics/index';\nexport * from './cards/index';\nexport * from './click/index';\nexport * from './ui/index';\nexport * from './page/index';\n\nexport { COMPONENT_CATEGORIES } from './index-tags';\nexport type { ComponentCategory } from './index-tags';\nimport { COMPONENT_CATEGORIES, type ComponentCategory } from './index-tags';\n\nconst BY_CATEGORY: Record<ComponentCategory, () => void> = {\n reveal: defineRevealComponents,\n text: defineTextComponents,\n interaction: defineInteractionComponents,\n feedback: defineFeedbackComponents,\n background: defineBackgroundComponents,\n transitions: defineTransitionComponents,\n physics: definePhysicsComponents,\n cards: defineCardComponents,\n click: defineClickComponents,\n ui: defineUiComponents,\n page: definePageComponents,\n};\n\n/**\n * Register every `<usa-*>` component (or only the given categories).\n * Safe to call more than once and on the server (no-op without DOM).\n */\nexport function defineComponents(categories?: ComponentCategory[]): void {\n if (canDefine()) adoptVariants();\n (categories || (Object.keys(BY_CATEGORY) as ComponentCategory[])).forEach((c) => BY_CATEGORY[c]?.());\n}\n"],"names":["defineRevealComponents","defineTextComponents","defineInteractionComponents","defineFeedbackComponents","defineBackgroundComponents","defineTransitionComponents","definePhysicsComponents","defineCardComponents","defineClickComponents","defineUiComponents","definePageComponents","canDefine","adoptVariants"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;AAmBG;AA+BH,MAAM,WAAW,GAA0C;AACzD,IAAA,MAAM,EAAEA,wCAAsB;AAC9B,IAAA,IAAI,EAAEC,oCAAoB;AAC1B,IAAA,WAAW,EAAEC,kDAA2B;AACxC,IAAA,QAAQ,EAAEC,4CAAwB;AAClC,IAAA,UAAU,EAAEC,gDAA0B;AACtC,IAAA,WAAW,EAAEC,iDAA0B;AACvC,IAAA,OAAO,EAAEC,0CAAuB;AAChC,IAAA,KAAK,EAAEC,qCAAoB;AAC3B,IAAA,KAAK,EAAEC,sCAAqB;AAC5B,IAAA,EAAE,EAAEC,gCAAkB;AACtB,IAAA,IAAI,EAAEC,oCAAoB;CAC3B;AAED;;;AAGG;AACG,SAAU,gBAAgB,CAAC,UAAgC,EAAA;AAC/D,IAAA,IAAIC,cAAS,EAAE;AAAE,QAAAC,sBAAa,EAAE;IAChC,CAAC,UAAU,IAAK,MAAM,CAAC,IAAI,CAAC,WAAW,CAAyB,EAAE,OAAO,CAAC,CAAC,CAAC,KAAK,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC;AACtG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/components.css
CHANGED
|
@@ -6,6 +6,7 @@ usa-scrolly{display:block;position:relative}usa-scrolly [data-sticky]{position:s
|
|
|
6
6
|
usa-counter{font-variant-numeric:tabular-nums}
|
|
7
7
|
usa-shimmer-text{--usa-shimmer-color:currentColor;--usa-shimmer-shine:#fff;background:linear-gradient(var(--usa-shimmer-angle,110deg),var(--usa-shimmer-color) 35%,var(--usa-shimmer-shine) 50%,var(--usa-shimmer-color) 65%) 0 0 / 250% 100%;-webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;color:transparent;animation:usa-shimmer var(--usa-shimmer-duration,2600ms) linear infinite}@keyframes usa-shimmer{from{background-position:100% 0}to{background-position:-150% 0}}
|
|
8
8
|
usa-split-text .usa-split-word{display:inline-block;white-space:nowrap}usa-split-text .usa-split-unit{display:inline-block;white-space:pre}usa-split-text[data-state="hidden"] .usa-split-unit{opacity:0}usa-split-text[data-state="play"] .usa-split-unit{animation:usa-split-rise var(--usa-split-duration,620ms) cubic-bezier(0.22,1,0.36,1) both;animation-delay:calc(var(--usa-split-delay,0ms) + var(--i,0) * var(--usa-split-stagger,28ms))}usa-split-text[effect="fade"][data-state="play"] .usa-split-unit{animation-name:usa-split-fade}usa-split-text[effect="blur"][data-state="play"] .usa-split-unit{animation-name:usa-split-blur}usa-split-text[effect="flip"][data-state="play"] .usa-split-unit{animation-name:usa-split-flip;transform-origin:50% 100%}usa-split-text[effect="pop"][data-state="play"] .usa-split-unit{animation-name:usa-split-pop;animation-timing-function:cubic-bezier(0.34,1.56,0.64,1)}@keyframes usa-split-rise{from{opacity:0;transform:translate3d(0,0.6em,0)}to{opacity:1;transform:none}}@keyframes usa-split-fade{from{opacity:0}to{opacity:1}}@keyframes usa-split-blur{from{opacity:0;filter:blur(8px)}to{opacity:1;filter:none}}@keyframes usa-split-flip{from{opacity:0;transform:perspective(500px) rotateX(-80deg)}to{opacity:1;transform:none}}@keyframes usa-split-pop{from{opacity:0;transform:scale(0.3)}to{opacity:1;transform:none}}@media (prefers-reduced-motion:reduce){usa-split-text .usa-split-unit{animation:none !important;opacity:1 !important}}
|
|
9
|
+
usa-wave-text .usa-word,usa-scroll-highlight .usa-word{display:inline-block;white-space:nowrap}usa-wave-text .usa-char{display:inline-block;animation:usa-wave var(--usa-wave-s,1.6s) ease-in-out infinite;animation-delay:calc(var(--i) * var(--usa-wave-d,0.06s))}@keyframes usa-wave{0%,60%,100%{transform:translateY(0)}30%{transform:translateY(calc(var(--usa-wave-a,0.25em) * -1))}}usa-glitch{position:relative;display:inline-block}usa-glitch::before,usa-glitch::after{content:attr(data-text);position:absolute;inset:0;pointer-events:none}usa-glitch::before{color:#ff2bd6;transform:translate(calc(var(--usa-glitch-i,3px) * -1),0);clip-path:inset(0 0 55% 0);mix-blend-mode:screen;animation:usa-glitch-a 2.4s steps(2,end) infinite}usa-glitch::after{color:#00f0ff;transform:translate(var(--usa-glitch-i,3px),0);clip-path:inset(50% 0 0 0);mix-blend-mode:screen;animation:usa-glitch-b 1.9s steps(2,end) infinite}usa-glitch[trigger="hover"]::before,usa-glitch[trigger="hover"]::after{animation-play-state:paused;opacity:0}usa-glitch[trigger="hover"]:hover::before,usa-glitch[trigger="hover"]:hover::after{animation-play-state:running;opacity:1}@keyframes usa-glitch-a{0%{clip-path:inset(0 0 80% 0)}20%{clip-path:inset(30% 0 40% 0)}40%{clip-path:inset(70% 0 5% 0)}60%{clip-path:inset(10% 0 60% 0)}80%{clip-path:inset(50% 0 30% 0)}100%{clip-path:inset(0 0 80% 0)}}@keyframes usa-glitch-b{0%{clip-path:inset(60% 0 10% 0)}25%{clip-path:inset(15% 0 70% 0)}50%{clip-path:inset(80% 0 2% 0)}75%{clip-path:inset(40% 0 35% 0)}100%{clip-path:inset(60% 0 10% 0)}}usa-gradient-text{background:var(--usa-grad) 0 50% / 300% 100%;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent;animation:usa-grad-flow var(--usa-grad-s,6s) linear infinite}@keyframes usa-grad-flow{to{background-position:150% 50%}}usa-handwriting{--usa-hw-stroke:currentColor;display:inline-block;line-height:0}usa-handwriting svg{max-width:100%;height:auto;overflow:visible}usa-handwriting text{fill:transparent;stroke:var(--usa-hw-stroke);stroke-width:1.2;stroke-dasharray:1600;stroke-dashoffset:1600;font-family:"Segoe Script","Brush Script MT","Snell Roundhand",cursive}usa-handwriting[data-state="drawing"] text{animation:usa-hw-draw var(--usa-hw-d,2400ms) cubic-bezier(0.55,0,0.45,1) forwards,usa-hw-fill 0.6s ease calc(var(--usa-hw-d,2400ms) * 0.8) forwards}usa-handwriting[data-state="done"] text{stroke-dashoffset:0;fill:currentColor}@keyframes usa-hw-draw{to{stroke-dashoffset:0}}@keyframes usa-hw-fill{to{fill:currentColor}}usa-scroll-highlight .usa-hl-word{opacity:var(--usa-hl-dim,0.2);transition:opacity 0.35s ease}usa-scroll-highlight .usa-hl-word[data-on]{opacity:1}usa-scroll-highlight[mode="marker"]{--usa-hl-color:color-mix(in srgb,#facc15 55%,transparent);background:linear-gradient(var(--usa-hl-color),var(--usa-hl-color)) 0 88% / 0% 40% no-repeat;transition:background-size 1s cubic-bezier(0.65,0,0.35,1);-webkit-box-decoration-break:clone;box-decoration-break:clone}usa-scroll-highlight[mode="marker"][data-lit]{background-size:100% 40%}@media (prefers-reduced-motion:reduce){usa-wave-text .usa-char,usa-glitch::before,usa-glitch::after,usa-gradient-text{animation:none !important}usa-glitch::before,usa-glitch::after{display:none}usa-scroll-highlight .usa-hl-word,usa-scroll-highlight[mode="marker"]{transition:none}}
|
|
9
10
|
usa-text-rotate{display:inline-grid;vertical-align:bottom;overflow:hidden;padding-block:0.08em}usa-text-rotate .usa-rotate-word{grid-area:1 / 1;white-space:nowrap}usa-text-rotate .usa-rotate-word[data-hidden]{opacity:0}
|
|
10
11
|
usa-typewriter{white-space:pre-wrap}usa-typewriter .usa-tw-caret{display:inline-block;width:var(--usa-caret-width,0.08em);height:1.05em;margin-left:0.06em;vertical-align:-0.12em;background:var(--usa-caret-color,currentColor);animation:usa-caret 1.06s steps(1) infinite}usa-typewriter[data-typing] .usa-tw-caret{animation:none}usa-typewriter[data-no-cursor] .usa-tw-caret{display:none}@keyframes usa-caret{50%{opacity:0}}@media (prefers-reduced-motion:reduce){usa-typewriter .usa-tw-caret,usa-shimmer-text{animation:none}}
|
|
11
12
|
usa-magnetic{display:inline-block}usa-magnetic>*{transform:translate3d(var(--usa-mx,0px),var(--usa-my,0px),0);transition:transform 0.6s cubic-bezier(0.34,1.56,0.64,1)}usa-magnetic[data-active]>*{transition-duration:0.15s;transition-timing-function:ease-out}@media (prefers-reduced-motion:reduce){usa-magnetic>*,usa-tilt,usa-toggle .usa-toggle-knob{transition:none}}
|
|
@@ -19,8 +20,10 @@ usa-progress{--usa-progress-color:var(--usa-accent,#7c5cff);--usa-progress-track
|
|
|
19
20
|
usa-skeleton{display:block;--usa-skeleton-base:color-mix(in srgb,currentColor 10%,transparent);--usa-skeleton-shine:color-mix(in srgb,currentColor 9%,transparent);--usa-skeleton-radius:8px}usa-skeleton[loading]>:not(.usa-skeleton-ph){display:none !important}usa-skeleton .usa-skeleton-ph{display:flex;gap:14px;align-items:flex-start}usa-skeleton .usa-bone-lines{flex:1;display:grid;gap:10px;min-width:0}usa-skeleton .usa-bone{position:relative;display:block;overflow:hidden;height:0.9em;border-radius:var(--usa-skeleton-radius);background:var(--usa-skeleton-base)}usa-skeleton .usa-bone-last{width:62%}usa-skeleton .usa-bone-block{height:120px}usa-skeleton .usa-bone-circle{border-radius:50%;flex:none}usa-skeleton .usa-bone-avatar{width:44px;height:44px}usa-skeleton .usa-bone::after{content:"";position:absolute;inset:0;transform:translateX(-100%);background:linear-gradient(90deg,transparent,var(--usa-skeleton-shine),transparent);animation:usa-skeleton 1.5s ease-in-out infinite}@keyframes usa-skeleton{to{transform:translateX(100%)}}@media (prefers-reduced-motion:reduce){usa-skeleton .usa-bone::after{animation:none}}
|
|
20
21
|
usa-spinner{--usa-spinner-size:32px;--usa-spinner-color:currentColor;position:relative;display:inline-block;vertical-align:middle;flex:none;width:var(--usa-spinner-size);height:var(--usa-spinner-size);color:var(--usa-spinner-color)}usa-spinner i{position:absolute;display:block}usa-spinner[paused] *,usa-spinner[paused] *::after{animation-play-state:paused !important}usa-spinner svg{width:100%;height:100%;animation:usa-spin 2s linear infinite;overflow:visible}usa-spinner svg circle{fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-dasharray:0.5 100;stroke-dashoffset:0;animation:usa-ring-arc 1.6s ease-in-out infinite}@keyframes usa-spin{to{transform:rotate(360deg)}}@keyframes usa-ring-arc{0%{stroke-dasharray:0.5 100;stroke-dashoffset:0}50%{stroke-dasharray:62 100;stroke-dashoffset:-20}100%{stroke-dasharray:0.5 100;stroke-dashoffset:-99}}usa-spinner[data-variant="windows"] i{inset:0;opacity:0;animation:usa-orbit 5.5s infinite}usa-spinner[data-variant="windows"] i::after{content:"";position:absolute;left:50%;top:0;width:12%;height:12%;margin-left:-6%;border-radius:50%;background:currentColor}usa-spinner[data-variant="windows"] i:nth-child(2){animation-delay:240ms;--n:1}usa-spinner[data-variant="windows"] i:nth-child(3){animation-delay:480ms;--n:2}usa-spinner[data-variant="windows"] i:nth-child(4){animation-delay:720ms;--n:3}usa-spinner[data-variant="windows"] i:nth-child(5){animation-delay:960ms;--n:4}@keyframes usa-orbit{0%{transform:rotate(225deg);opacity:1;animation-timing-function:ease-out}7%{transform:rotate(345deg);animation-timing-function:linear}30%{transform:rotate(455deg);animation-timing-function:ease-in-out}39%{transform:rotate(690deg);animation-timing-function:linear}70%{transform:rotate(815deg);opacity:1;animation-timing-function:ease-out}75%{transform:rotate(945deg);animation-timing-function:ease-out}76%,100%{transform:rotate(945deg);opacity:0}}usa-spinner[data-variant="ring"] i{inset:0;border-radius:50%;border:calc(var(--usa-spinner-size) / 9) solid color-mix(in srgb,currentColor 20%,transparent);border-top-color:currentColor;animation:usa-spin 0.8s linear infinite}usa-spinner[data-variant="dots"]{display:inline-flex;align-items:center;justify-content:space-between;height:calc(var(--usa-spinner-size) / 2.5)}usa-spinner[data-variant="dots"] i{position:static;width:22%;aspect-ratio:1;border-radius:50%;background:currentColor;animation:usa-dot 1.2s ease-in-out infinite}usa-spinner[data-variant="dots"] i:nth-child(2){animation-delay:0.15s}usa-spinner[data-variant="dots"] i:nth-child(3){animation-delay:0.3s}@keyframes usa-dot{0%,60%,100%{transform:translateY(0);opacity:0.35}30%{transform:translateY(-70%);opacity:1}}usa-spinner[data-variant="pulse"] i{inset:0;border-radius:50%;background:currentColor;opacity:0;animation:usa-pulse 1.6s cubic-bezier(0.22,1,0.36,1) infinite}usa-spinner[data-variant="pulse"] i:nth-child(2){animation-delay:0.8s}@keyframes usa-pulse{from{transform:scale(0.1);opacity:0.8}to{transform:scale(1);opacity:0}}usa-spinner[data-variant="bars"]{display:inline-flex;align-items:center;justify-content:space-between}usa-spinner[data-variant="bars"] i{position:static;width:16%;height:100%;border-radius:2px;background:currentColor;transform:scaleY(0.35);animation:usa-bar 1s ease-in-out infinite}usa-spinner[data-variant="bars"] i:nth-child(2){animation-delay:0.12s}usa-spinner[data-variant="bars"] i:nth-child(3){animation-delay:0.24s}usa-spinner[data-variant="bars"] i:nth-child(4){animation-delay:0.36s}@keyframes usa-bar{0%,100%{transform:scaleY(0.35)}40%{transform:scaleY(1)}}@media (prefers-reduced-motion:reduce){usa-spinner svg,usa-spinner i,usa-spinner i::after{animation:usa-calm 2.4s ease-in-out infinite !important}usa-spinner[data-variant="windows"] i{transform:rotate(calc(var(--n,0) * 72deg))}usa-spinner svg circle{animation:none;stroke-dasharray:30 100}}@keyframes usa-calm{0%,100%{opacity:1}50%{opacity:0.4}}
|
|
21
22
|
usa-toaster{position:fixed;z-index:2147483000;right:16px;bottom:16px;display:flex;flex-direction:column;gap:10px;width:min(360px,calc(100vw - 32px));pointer-events:none}usa-toaster[position^="top"]{bottom:auto;top:16px}usa-toaster[position$="left"]{right:auto;left:16px}usa-toaster[position$="center"]{right:auto;left:50%;translate:-50% 0}usa-toaster .usa-toast{--usa-toast-accent:#0078d4;pointer-events:auto;display:flex;align-items:flex-start;gap:10px;padding:12px 12px 12px 14px;border-radius:10px;background:var(--usa-toast-bg,color-mix(in srgb,Canvas 92%,transparent));color:var(--usa-toast-fg,CanvasText);border:1px solid color-mix(in srgb,CanvasText 12%,transparent);border-left:3px solid var(--usa-toast-accent);box-shadow:0 8px 28px -8px rgb(0 0 0 / 0.35);font:inherit;font-size:14px;line-height:1.4;-webkit-backdrop-filter:blur(20px) saturate(1.4);backdrop-filter:blur(20px) saturate(1.4)}usa-toaster .usa-toast[data-type="success"]{--usa-toast-accent:#0f9d58}usa-toaster .usa-toast[data-type="warning"]{--usa-toast-accent:#c19c00}usa-toaster .usa-toast[data-type="error"]{--usa-toast-accent:#d13438}usa-toaster .usa-toast-icon{flex:none;width:20px;height:20px;fill:none;stroke:var(--usa-toast-accent);stroke-width:2;stroke-linecap:round;stroke-linejoin:round}usa-toaster .usa-toast-msg{flex:1;min-width:0;padding-top:1px;overflow-wrap:anywhere}usa-toaster .usa-toast-action,usa-toaster .usa-toast-close{flex:none;border:0;background:transparent;color:inherit;font:inherit;cursor:pointer;border-radius:6px;padding:2px 6px}usa-toaster .usa-toast-action{color:var(--usa-toast-accent);font-weight:600}usa-toaster .usa-toast-close{opacity:0.6;line-height:0;padding:3px}usa-toaster .usa-toast-close svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}usa-toaster .usa-toast-action:hover,usa-toaster .usa-toast-close:hover{background:color-mix(in srgb,currentColor 10%,transparent);opacity:1}
|
|
22
|
-
usa-acrylic{--usa-acrylic-tint:#f3f3f3;--usa-acrylic-opacity:55%;--usa-acrylic-blur:30px;position:relative;display:block;isolation:isolate;overflow:hidden;background-color:color-mix(in srgb,var(--usa-acrylic-tint) var(--usa-acrylic-opacity),transparent);-webkit-backdrop-filter:blur(var(--usa-acrylic-blur)) saturate(1.6);backdrop-filter:blur(var(--usa-acrylic-blur)) saturate(1.6);border:1px solid color-mix(in srgb,#fff 22%,transparent)}@media (prefers-color-scheme:dark){usa-acrylic{--usa-acrylic-tint:#2c2c2c}}usa-acrylic::before{content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;opacity:0.035;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='128' height='128'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E")}usa-acrylic::after{content:"";position:absolute;inset:0;z-index:1;pointer-events:none;transform:translateX(-120%);background:linear-gradient(105deg,transparent 30%,rgb(255 255 255 / 0.28) 50%,transparent 70%)}usa-acrylic[shimmer="hover"]:hover::after,usa-acrylic[data-shine]::after{animation:usa-acrylic-shine 1.1s cubic-bezier(0.22,1,0.36,1) both}@keyframes usa-acrylic-shine{from{transform:translateX(-120%)}to{transform:translateX(120%)}}usa-acrylic[variant="mica"]{--usa-acrylic-opacity:80%;-webkit-backdrop-filter:none;backdrop-filter:none;background:linear-gradient(color-mix(in srgb,var(--usa-acrylic-tint) var(--usa-acrylic-opacity),transparent),color-mix(in srgb,var(--usa-acrylic-tint) var(--usa-acrylic-opacity),transparent)),var(--usa-mica-source,linear-gradient(135deg,#b8c6ff,#ffd6e8));border-color:transparent}@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){usa-acrylic{background-color:var(--usa-acrylic-tint)}}@media (prefers-reduced-transparency:reduce){usa-acrylic{background:var(--usa-acrylic-tint);-webkit-backdrop-filter:none;backdrop-filter:none}}@media (forced-colors:active){usa-acrylic{background:Canvas;-webkit-backdrop-filter:none;backdrop-filter:none;border-color:CanvasText}usa-acrylic::before,usa-acrylic::after{display:none}}
|
|
23
|
+
usa-acrylic{--usa-acrylic-tint:#f3f3f3;--usa-acrylic-opacity:55%;--usa-acrylic-blur:30px;position:relative;display:block;isolation:isolate;overflow:hidden;background-color:color-mix(in srgb,var(--usa-acrylic-tint) var(--usa-acrylic-opacity),transparent);-webkit-backdrop-filter:blur(var(--usa-acrylic-blur)) saturate(1.6);backdrop-filter:blur(var(--usa-acrylic-blur)) saturate(1.6);border:1px solid color-mix(in srgb,#fff 22%,transparent)}@media (prefers-color-scheme:dark){usa-acrylic{--usa-acrylic-tint:#2c2c2c}}usa-acrylic::before{content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;opacity:0.035;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='128' height='128'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E")}usa-acrylic::after{content:"";position:absolute;inset:0;z-index:1;pointer-events:none;transform:translateX(-120%);background:linear-gradient(105deg,transparent 30%,rgb(255 255 255 / 0.28) 50%,transparent 70%)}usa-acrylic[shimmer="hover"]:hover::after,usa-acrylic[data-shine]::after{animation:usa-acrylic-shine 1.1s cubic-bezier(0.22,1,0.36,1) both}@keyframes usa-acrylic-shine{from{transform:translateX(-120%)}to{transform:translateX(120%)}}usa-acrylic:is([kind="mica"],[variant="mica"]){--usa-acrylic-opacity:80%;-webkit-backdrop-filter:none;backdrop-filter:none;background:linear-gradient(color-mix(in srgb,var(--usa-acrylic-tint) var(--usa-acrylic-opacity),transparent),color-mix(in srgb,var(--usa-acrylic-tint) var(--usa-acrylic-opacity),transparent)),var(--usa-mica-source,linear-gradient(135deg,#b8c6ff,#ffd6e8));border-color:transparent}@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){usa-acrylic{background-color:var(--usa-acrylic-tint)}}@media (prefers-reduced-transparency:reduce){usa-acrylic{background:var(--usa-acrylic-tint);-webkit-backdrop-filter:none;backdrop-filter:none}}@media (forced-colors:active){usa-acrylic{background:Canvas;-webkit-backdrop-filter:none;backdrop-filter:none;border-color:CanvasText}usa-acrylic::before,usa-acrylic::after{display:none}}
|
|
23
24
|
usa-aurora{position:relative;display:block;isolation:isolate;overflow:hidden}usa-aurora .usa-aurora-layer{position:absolute;inset:0;z-index:-1;pointer-events:none;opacity:var(--usa-aurora-opacity,0.7);overflow:hidden;contain:strict}usa-aurora .usa-aurora-layer i{position:absolute;display:block;width:70%;aspect-ratio:1;border-radius:50%;background:radial-gradient(closest-side,var(--c),transparent);will-change:transform;animation:usa-aurora-a var(--usa-aurora-speed,18s) ease-in-out infinite alternate}usa-aurora .usa-aurora-layer i:nth-child(1){left:-15%;top:-30%}usa-aurora .usa-aurora-layer i:nth-child(2){right:-20%;top:-10%;animation-name:usa-aurora-b;animation-duration:calc(var(--usa-aurora-speed,18s) * 1.3)}usa-aurora .usa-aurora-layer i:nth-child(3){left:10%;bottom:-45%;animation-name:usa-aurora-c;animation-duration:calc(var(--usa-aurora-speed,18s) * 0.9)}usa-aurora .usa-aurora-layer i:nth-child(4){right:0;bottom:-30%;width:50%;animation-name:usa-aurora-b;animation-direction:alternate-reverse}usa-aurora[paused] .usa-aurora-layer i,usa-aurora[data-offscreen] .usa-aurora-layer i{animation-play-state:paused}@keyframes usa-aurora-a{from{transform:translate3d(0,0,0) scale(1)}to{transform:translate3d(30%,20%,0) scale(1.25)}}@keyframes usa-aurora-b{from{transform:translate3d(0,0,0) scale(1.1)}to{transform:translate3d(-35%,25%,0) scale(0.85)}}@keyframes usa-aurora-c{from{transform:translate3d(0,0,0) rotate(0deg) scale(1)}to{transform:translate3d(25%,-30%,0) rotate(40deg) scale(1.2)}}@media (prefers-reduced-motion:reduce){usa-aurora .usa-aurora-layer i,usa-grain .usa-grain-layer,usa-acrylic::after{animation:none !important}}
|
|
25
|
+
usa-grid-glow,usa-blobs,usa-water-ripple,usa-dot-network{position:relative;display:block;isolation:isolate;overflow:hidden}usa-grid-glow{--usa-grid:32px;--usa-grid-r:220px;--usa-grid-color:var(--usa-accent,#7c5cff);--usa-grid-x:50%;--usa-grid-y:50%}usa-grid-glow::before,usa-grid-glow::after{content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;background-image:linear-gradient(to right,var(--l) 1px,transparent 1px),linear-gradient(to bottom,var(--l) 1px,transparent 1px);background-size:var(--usa-grid) var(--usa-grid)}usa-grid-glow::before{--l:color-mix(in srgb,currentColor 9%,transparent)}usa-grid-glow::after{--l:var(--usa-grid-color);-webkit-mask:radial-gradient(var(--usa-grid-r) circle at var(--usa-grid-x) var(--usa-grid-y),#000,transparent 70%);mask:radial-gradient(var(--usa-grid-r) circle at var(--usa-grid-x) var(--usa-grid-y),#000,transparent 70%)}usa-blobs .usa-blobs-layer{position:absolute;inset:-20%;z-index:-1;filter:blur(var(--usa-blobs-blur,60px)) saturate(1.3);pointer-events:none}usa-blobs .usa-blobs-layer i{position:absolute;width:45%;aspect-ratio:1;border-radius:42% 58% 60% 40% / 45% 45% 55% 55%;background:var(--c);opacity:0.75;left:calc(10% + var(--i) * 18%);top:calc(10% + var(--i) * 14%);animation:usa-blob calc(14s / var(--usa-blobs-speed,1)) ease-in-out infinite alternate;animation-delay:calc(var(--i) * -3.5s)}@keyframes usa-blob{0%{transform:translate(0,0) rotate(0) scale(1);border-radius:42% 58% 60% 40% / 45% 45% 55% 55%}50%{transform:translate(18%,-12%) rotate(120deg) scale(1.15);border-radius:60% 40% 35% 65% / 55% 60% 40% 45%}100%{transform:translate(-14%,14%) rotate(240deg) scale(0.9);border-radius:38% 62% 55% 45% / 62% 38% 62% 38%}}usa-water-ripple .usa-bg-canvas{position:absolute;inset:0;z-index:1;pointer-events:none;mix-blend-mode:screen}usa-dot-network .usa-bg-canvas{position:absolute;inset:0;z-index:-1;pointer-events:none}@media (prefers-reduced-motion:reduce){usa-blobs .usa-blobs-layer i{animation:none}}
|
|
26
|
+
.usa-fluent{font-family:"Segoe UI Variable","Segoe UI",system-ui,sans-serif;accent-color:var(--usa-accent,#0067c0)}.usa-fluent-mica body{background:linear-gradient(135deg,color-mix(in srgb,var(--usa-accent,#0067c0) 8%,#f3f3f3),#f3f3f3 60%)}@media (prefers-color-scheme:dark){.usa-fluent-mica body{background:linear-gradient(135deg,color-mix(in srgb,var(--usa-accent,#4cc2ff) 10%,#202020),#202020 60%)}}.usa-fluent :is(.usa-acrylic,[data-acrylic]){background:color-mix(in srgb,var(--usa-surface) 70%,transparent);-webkit-backdrop-filter:blur(30px) saturate(1.25);backdrop-filter:blur(30px) saturate(1.25);border:var(--usa-border);border-radius:var(--usa-radius)}.usa-fluent :is(button,[role="button"],[data-fluent-reveal],.usa-fluent-item){position:relative}.usa-fluent [data-reveal]::after{content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;padding:1px;background:radial-gradient(90px circle at var(--usa-reveal-x) var(--usa-reveal-y),rgb(255 255 255 / 0.55),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-fluent [data-reveal]{background-image:radial-gradient(120px circle at var(--usa-reveal-x) var(--usa-reveal-y),rgb(255 255 255 / 0.1),transparent 70%)}@media (prefers-reduced-transparency:reduce),(forced-colors:active){.usa-fluent :is(.usa-acrylic,[data-acrylic]){background:var(--usa-surface);-webkit-backdrop-filter:none;backdrop-filter:none}}
|
|
24
27
|
usa-grain{position:relative;display:block;isolation:isolate;overflow:hidden}usa-grain .usa-grain-layer{position:absolute;inset:-100%;z-index:1;pointer-events:none}usa-grain[animated] .usa-grain-layer{animation:usa-grain 0.8s steps(10) infinite}@keyframes usa-grain{0%,100%{transform:translate(0,0)}10%{transform:translate(-5%,-8%)}20%{transform:translate(-12%,4%)}30%{transform:translate(6%,-16%)}40%{transform:translate(-4%,18%)}50%{transform:translate(-12%,8%)}60%{transform:translate(14%,0)}70%{transform:translate(0,12%)}80%{transform:translate(3%,25%)}90%{transform:translate(-8%,8%)}}
|
|
25
28
|
usa-marquee{--usa-marquee-gap:32px;display:block;overflow:hidden;contain:content}usa-marquee[fade]{-webkit-mask:linear-gradient(90deg,transparent,#000 10%,#000 90%,transparent);mask:linear-gradient(90deg,transparent,#000 10%,#000 90%,transparent)}usa-marquee[fade][data-vertical]{-webkit-mask:linear-gradient(180deg,transparent,#000 12%,#000 88%,transparent);mask:linear-gradient(180deg,transparent,#000 12%,#000 88%,transparent)}usa-marquee .usa-marquee-track{display:flex;width:max-content;gap:var(--usa-marquee-gap);will-change:transform}usa-marquee .usa-marquee-group{display:flex;flex:none;align-items:center;gap:var(--usa-marquee-gap)}usa-marquee[data-vertical] .usa-marquee-track,usa-marquee[data-vertical] .usa-marquee-group{flex-direction:column;width:auto}usa-marquee[data-vertical]{height:var(--usa-marquee-height,240px)}usa-marquee[data-static]{overflow:auto;scrollbar-width:thin}
|
|
26
29
|
usa-particles{position:relative;display:block;min-height:120px;overflow:hidden}usa-particles>canvas{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
|
package/dist/components.d.cts
CHANGED
|
@@ -245,6 +245,53 @@ interface UsaTextRotateElement extends UsaElement {
|
|
|
245
245
|
}
|
|
246
246
|
declare function defineTextRotate(tag?: string): CustomElementConstructor | undefined;
|
|
247
247
|
|
|
248
|
+
/**
|
|
249
|
+
* `<usa-wave-text>` — letters bob in a travelling wave.
|
|
250
|
+
* Attributes: `amplitude` (em, 0.25), `speed` (s per cycle, 1.6), `stagger`
|
|
251
|
+
* (s between letters, 0.06). Reduced motion: still text.
|
|
252
|
+
*/
|
|
253
|
+
interface UsaWaveTextElement extends UsaElement {
|
|
254
|
+
}
|
|
255
|
+
declare function defineWaveText(tag?: string): CustomElementConstructor | undefined;
|
|
256
|
+
/**
|
|
257
|
+
* `<usa-glitch>` — an RGB-split glitch on its text (`trigger="always"`
|
|
258
|
+
* default, or `hover`). Attributes: `intensity` (px, 3), `trigger`.
|
|
259
|
+
* Reduced motion: no animation (plain text).
|
|
260
|
+
*/
|
|
261
|
+
interface UsaGlitchElement extends UsaElement {
|
|
262
|
+
}
|
|
263
|
+
declare function defineGlitch(tag?: string): CustomElementConstructor | undefined;
|
|
264
|
+
/**
|
|
265
|
+
* `<usa-gradient-text>` — text filled with a flowing multi-colour gradient.
|
|
266
|
+
* Attributes: `colors` (comma list), `speed` (s, 6), `angle` (deg, 90).
|
|
267
|
+
* Reduced motion: a static gradient.
|
|
268
|
+
*/
|
|
269
|
+
interface UsaGradientTextElement extends UsaElement {
|
|
270
|
+
}
|
|
271
|
+
declare function defineGradientText(tag?: string): CustomElementConstructor | undefined;
|
|
272
|
+
/**
|
|
273
|
+
* `<usa-handwriting>` — the text draws itself stroke by stroke (SVG text
|
|
274
|
+
* outline), then fills in, when it scrolls into view.
|
|
275
|
+
* Attributes: `text`, `duration` (ms, 2400), `stroke` (colour), `size` (px,
|
|
276
|
+
* 64), `font` (family; a script font looks best). Events: `usa:complete`.
|
|
277
|
+
* Reduced motion: the filled text appears at once.
|
|
278
|
+
*/
|
|
279
|
+
interface UsaHandwritingElement extends UsaElement {
|
|
280
|
+
play(): void;
|
|
281
|
+
}
|
|
282
|
+
declare function defineHandwriting(tag?: string): CustomElementConstructor | undefined;
|
|
283
|
+
/**
|
|
284
|
+
* `<usa-scroll-highlight>` — reading highlight: words light up one by one
|
|
285
|
+
* as the paragraph scrolls through the viewport (`mode="words"`, default),
|
|
286
|
+
* or a highlighter marker sweeps behind the text on enter (`mode="marker"`).
|
|
287
|
+
* Attributes: `mode`, `color` (marker), `dim` (opacity of unread words,
|
|
288
|
+
* 0.2). Reduced motion: fully highlighted text.
|
|
289
|
+
*/
|
|
290
|
+
interface UsaScrollHighlightElement extends UsaElement {
|
|
291
|
+
readonly progress: number;
|
|
292
|
+
}
|
|
293
|
+
declare function defineScrollHighlight(tag?: string): CustomElementConstructor | undefined;
|
|
294
|
+
|
|
248
295
|
/**
|
|
249
296
|
* use-scroll-animate/components/text — text effects.
|
|
250
297
|
* `<usa-typewriter>`, `<usa-split-text>`, `<usa-scramble>`, `<usa-counter>`,
|
|
@@ -255,6 +302,11 @@ declare function defineTextRotate(tag?: string): CustomElementConstructor | unde
|
|
|
255
302
|
declare function defineTextComponents(): void;
|
|
256
303
|
declare global {
|
|
257
304
|
interface HTMLElementTagNameMap {
|
|
305
|
+
'usa-wave-text': UsaWaveTextElement;
|
|
306
|
+
'usa-glitch': UsaGlitchElement;
|
|
307
|
+
'usa-gradient-text': UsaGradientTextElement;
|
|
308
|
+
'usa-handwriting': UsaHandwritingElement;
|
|
309
|
+
'usa-scroll-highlight': UsaScrollHighlightElement;
|
|
258
310
|
'usa-typewriter': UsaTypewriterElement;
|
|
259
311
|
'usa-split-text': UsaSplitTextElement;
|
|
260
312
|
'usa-scramble': UsaScrambleElement;
|
|
@@ -373,7 +425,7 @@ type SpinnerVariant = (typeof SPINNER_VARIANTS)[number];
|
|
|
373
425
|
* `<usa-spinner>` — indeterminate loading indicators, pure CSS animations
|
|
374
426
|
* of `transform` / `opacity` (plus an SVG stroke for `fluent`).
|
|
375
427
|
*
|
|
376
|
-
*
|
|
428
|
+
* Kinds (`kind`; `variant` is a deprecated alias until 3.0): `fluent` (default — the WinUI / Windows 11
|
|
377
429
|
* ProgressRing arc), `windows` (the Windows 10 boot "orbiting dots"),
|
|
378
430
|
* `ring` (classic border spinner), `dots` (three bouncing dots / typing
|
|
379
431
|
* indicator), `pulse` (expanding ripple), `bars` (equalizer).
|
|
@@ -383,6 +435,9 @@ type SpinnerVariant = (typeof SPINNER_VARIANTS)[number];
|
|
|
383
435
|
* a slow opacity pulse instead of movement.
|
|
384
436
|
*/
|
|
385
437
|
interface UsaSpinnerElement extends UsaElement {
|
|
438
|
+
/** Spinner kind (`kind` attribute). */
|
|
439
|
+
kind: SpinnerVariant;
|
|
440
|
+
/** @deprecated alias of `kind`, removed in 3.0. */
|
|
386
441
|
variant: SpinnerVariant;
|
|
387
442
|
}
|
|
388
443
|
declare function defineSpinner(tag?: string): CustomElementConstructor | undefined;
|
|
@@ -564,7 +619,7 @@ declare function defineMarquee(tag?: string): CustomElementConstructor | undefin
|
|
|
564
619
|
* tints from `--usa-mica-source`, a gradient you control). Optional
|
|
565
620
|
* `shimmer` adds a light sweep when it appears or on hover.
|
|
566
621
|
*
|
|
567
|
-
* Attributes: `
|
|
622
|
+
* Attributes: `kind` (`acrylic` default | `mica`; `variant` is a deprecated alias until 3.0), `tint` (colour),
|
|
568
623
|
* `tint-opacity` (0–1, 0.55), `blur` (px, 30), `shimmer`
|
|
569
624
|
* (`hover` | `load` | `none`, default `none`). Falls back to a solid tint
|
|
570
625
|
* without `backdrop-filter` and under `prefers-reduced-transparency` or
|
|
@@ -573,6 +628,63 @@ declare function defineMarquee(tag?: string): CustomElementConstructor | undefin
|
|
|
573
628
|
type UsaAcrylicElement = UsaElement;
|
|
574
629
|
declare function defineAcrylic(tag?: string): CustomElementConstructor | undefined;
|
|
575
630
|
|
|
631
|
+
/**
|
|
632
|
+
* `<usa-grid-glow>` — a line grid behind its content that lights up around
|
|
633
|
+
* the pointer. Attributes: `size` (cell px, 32), `color`, `radius` (px, 220).
|
|
634
|
+
* Reduced motion: the grid stays, a soft static glow in the centre.
|
|
635
|
+
*/
|
|
636
|
+
interface UsaGridGlowElement extends UsaElement {
|
|
637
|
+
}
|
|
638
|
+
declare function defineGridGlow(tag?: string): CustomElementConstructor | undefined;
|
|
639
|
+
/**
|
|
640
|
+
* `<usa-blobs>` — soft, slowly morphing colour blobs (fluid gradient
|
|
641
|
+
* backdrop). Attributes: `colors` (comma list), `speed` (1), `blur` (px, 60).
|
|
642
|
+
* Reduced motion: still blobs.
|
|
643
|
+
*/
|
|
644
|
+
interface UsaBlobsElement extends UsaElement {
|
|
645
|
+
}
|
|
646
|
+
declare function defineBlobs(tag?: string): CustomElementConstructor | undefined;
|
|
647
|
+
/**
|
|
648
|
+
* `<usa-water-ripple>` — interactive water ripples on a canvas over its
|
|
649
|
+
* content (pointer moves and taps disturb the surface). Low-resolution height
|
|
650
|
+
* map, paused off-screen. Attributes: `damping` (0.96), `strength` (1),
|
|
651
|
+
* `color` (highlight). Reduced motion: nothing is drawn.
|
|
652
|
+
*/
|
|
653
|
+
interface UsaWaterRippleElement extends UsaElement {
|
|
654
|
+
drop(x: number, y: number, strength?: number): void;
|
|
655
|
+
}
|
|
656
|
+
declare function defineWaterRipple(tag?: string): CustomElementConstructor | undefined;
|
|
657
|
+
/**
|
|
658
|
+
* `<usa-dot-network>` — a grid of dots that swell and link up with lines
|
|
659
|
+
* around the pointer (a living network backdrop). Attributes: `gap` (px,
|
|
660
|
+
* 28), `color`, `radius` (px of influence, 140). Reduced motion: a static
|
|
661
|
+
* dot grid.
|
|
662
|
+
*/
|
|
663
|
+
interface UsaDotNetworkElement extends UsaElement {
|
|
664
|
+
}
|
|
665
|
+
declare function defineDotNetwork(tag?: string): CustomElementConstructor | undefined;
|
|
666
|
+
|
|
667
|
+
interface FluentPresetOptions {
|
|
668
|
+
/** Root to apply to (default `document.documentElement`). */
|
|
669
|
+
root?: HTMLElement;
|
|
670
|
+
/** Reveal highlight on interactive elements (default `true`). */
|
|
671
|
+
reveal?: boolean;
|
|
672
|
+
/** Reveal targets (default buttons, links, `[data-fluent-reveal]`). */
|
|
673
|
+
selector?: string;
|
|
674
|
+
/** Mica-style tinted window background on `<body>` (default `true`). */
|
|
675
|
+
mica?: boolean;
|
|
676
|
+
}
|
|
677
|
+
/**
|
|
678
|
+
* Windows 11 **Fluent preset** (v2.8): applies the `fluent` variant
|
|
679
|
+
* (Segoe UI Variable, Windows accent, 8 px radii), a Mica-style tinted
|
|
680
|
+
* window background, Acrylic on `.usa-acrylic` / `[data-acrylic]`, and
|
|
681
|
+
* Reveal highlight (a light following the pointer on borders and
|
|
682
|
+
* backgrounds of interactive elements). Ideal for WebView2 / Electron /
|
|
683
|
+
* Tauri apps on Windows. Returns a function that removes it.
|
|
684
|
+
* Respects reduced motion / transparency (no Reveal tracking; solid materials).
|
|
685
|
+
*/
|
|
686
|
+
declare function fluentPreset(options?: FluentPresetOptions): () => void;
|
|
687
|
+
|
|
576
688
|
/**
|
|
577
689
|
* use-scroll-animate/components/background — backgrounds & decoration.
|
|
578
690
|
* `<usa-aurora>`, `<usa-particles>`, `<usa-grain>`, `<usa-marquee>`,
|
|
@@ -583,6 +695,10 @@ declare function defineAcrylic(tag?: string): CustomElementConstructor | undefin
|
|
|
583
695
|
declare function defineBackgroundComponents(): void;
|
|
584
696
|
declare global {
|
|
585
697
|
interface HTMLElementTagNameMap {
|
|
698
|
+
'usa-grid-glow': UsaGridGlowElement;
|
|
699
|
+
'usa-blobs': UsaBlobsElement;
|
|
700
|
+
'usa-water-ripple': UsaWaterRippleElement;
|
|
701
|
+
'usa-dot-network': UsaDotNetworkElement;
|
|
586
702
|
'usa-aurora': UsaAuroraElement;
|
|
587
703
|
'usa-particles': UsaParticlesElement;
|
|
588
704
|
'usa-grain': UsaGrainElement;
|
|
@@ -1663,10 +1779,10 @@ declare global {
|
|
|
1663
1779
|
/** The component categories and their default tags. */
|
|
1664
1780
|
declare const COMPONENT_CATEGORIES: {
|
|
1665
1781
|
readonly reveal: readonly ["usa-reveal", "usa-stagger", "usa-scroll-progress", "usa-scrolly"];
|
|
1666
|
-
readonly text: readonly ["usa-typewriter", "usa-split-text", "usa-scramble", "usa-counter", "usa-shimmer-text", "usa-text-rotate"];
|
|
1782
|
+
readonly text: readonly ["usa-typewriter", "usa-split-text", "usa-scramble", "usa-counter", "usa-shimmer-text", "usa-text-rotate", "usa-wave-text", "usa-glitch", "usa-gradient-text", "usa-handwriting", "usa-scroll-highlight"];
|
|
1667
1783
|
readonly interaction: readonly ["usa-ripple", "usa-magnetic", "usa-tilt", "usa-spotlight", "usa-press", "usa-toggle"];
|
|
1668
1784
|
readonly feedback: readonly ["usa-spinner", "usa-skeleton", "usa-progress", "usa-toaster", "usa-check"];
|
|
1669
|
-
readonly background: readonly ["usa-aurora", "usa-particles", "usa-grain", "usa-marquee", "usa-acrylic"];
|
|
1785
|
+
readonly background: readonly ["usa-aurora", "usa-particles", "usa-grain", "usa-marquee", "usa-acrylic", "usa-grid-glow", "usa-blobs", "usa-water-ripple", "usa-dot-network"];
|
|
1670
1786
|
readonly transitions: readonly ["usa-dialog", "usa-accordion", "usa-flip-list", "usa-view-switch"];
|
|
1671
1787
|
readonly physics: readonly ["usa-spring", "usa-draggable", "usa-overscroll"];
|
|
1672
1788
|
readonly cards: readonly ["usa-card", "usa-card-stack", "usa-sticky-stack", "usa-carousel-3d"];
|
|
@@ -1675,11 +1791,12 @@ declare const COMPONENT_CATEGORIES: {
|
|
|
1675
1791
|
readonly page: readonly ["usa-cursor", "usa-fullpage", "usa-loading-bar", "usa-back-to-top", "usa-ambient", "usa-splash", "usa-auto-skeleton", "usa-motion-switch"];
|
|
1676
1792
|
};
|
|
1677
1793
|
type ComponentCategory = keyof typeof COMPONENT_CATEGORIES;
|
|
1794
|
+
|
|
1678
1795
|
/**
|
|
1679
1796
|
* Register every `<usa-*>` component (or only the given categories).
|
|
1680
1797
|
* Safe to call more than once and on the server (no-op without DOM).
|
|
1681
1798
|
*/
|
|
1682
1799
|
declare function defineComponents(categories?: ComponentCategory[]): void;
|
|
1683
1800
|
|
|
1684
|
-
export { AMBIENT_EFFECTS, BUTTON_DEFORMS, CARD_EFFECTS, CLICK_EFFECTS, COMPONENT_CATEGORIES, CURSOR_MODES, MORPH_ICONS, MOTION_SCALE, PAGE_EFFECTS, REVEAL_EFFECTS, SPINNER_VARIANTS, SPRING_EFFECTS, SPRING_PRESETS, VARIANTS, adoptVariants, burst, confetti, configureComponents, connectedAnimation, createSpring, defineAccordion, defineAcrylic, defineAmbient, defineAurora, defineAutoSkeleton, defineAvatarStack, defineBackToTop, defineBackgroundComponents, defineBadge, defineBottomSheet, defineButton, defineCard, defineCardComponents, defineCardStack, defineCarousel3d, defineCheck, defineCheckbox, defineClick, defineClickComponents, defineComponents, defineCounter, defineCursor, defineDialog, defineDoubleTap, defineDraggable, defineDrawer, defineFab, defineFeedbackComponents, defineFlipList, defineFullpage, defineGrain, defineHold, defineIconMorph, defineInteractionComponents, defineLike, defineLoadingBar, defineMagnetic, defineMarquee, defineMotionSwitch, defineNavbar, defineOverscroll, definePageComponents, defineParticles, definePhysicsComponents, definePopover, definePress, defineProgress, definePullRefresh, defineRating, defineReveal, defineRevealComponents, defineRipple, defineScramble, defineScrollProgress, defineScrolly, defineShimmerText, defineSkeleton, defineSlider, defineSpinner, defineSplash, defineSplitText, defineSpotlight, defineSpring, defineStagger, defineStickyStack, defineTabs, defineTextComponents, defineTextRotate, defineTilt, defineToaster, defineToggle, defineTooltip, defineTransitionComponents, defineTypewriter, defineUiComponents, defineViewSwitch, easeOutExpo, enableMpaTransitions, flip, getMotionIntensity, haptic, linearEasing, loadingBar, morphPath, pageTransition, prefersReducedMotion, projectInertia, readScrollProgress, resolveSpring, restoreMotionIntensity, revealKeyframes, rubberBand, scrambleFrame, scrollToTarget, setMotionIntensity, setVariant, shake, smoothScroll, snapTo, spring, springEasing, springEffectKeyframes, springSamples, stepSpring, supportsLinearEasing, supportsViewTransitions, themeTransition, toast, viewTransition };
|
|
1685
|
-
export type { AmbientEffect, BurstOptions, ButtonDeform, ButtonShape, ButtonState, CardEffect, ClickEffect, ComponentCategory, ComponentsConfig, ConfettiOptions, ConnectedOptions, CursorMode, DialogVariant, FlipOptions, MotionIntensity, PageEffect, PageTransitionOptions, Placement, RevealEffect, SmoothScrollOptions, SpinnerVariant, SpringConfig, SpringEffect, SpringInput, SpringPreset, SpringValue, SpringValueOptions, ToastHandle, ToastOptions, ToastType, UsaAccordionElement, UsaAcrylicElement, UsaAmbientElement, UsaAuroraElement, UsaAutoSkeletonElement, UsaAvatarStackElement, UsaBackToTopElement, UsaBadgeElement, UsaBottomSheetElement, UsaButtonElement, UsaCardElement, UsaCardStackElement, UsaCarousel3dElement, UsaCheckElement, UsaCheckboxElement, UsaClickElement, UsaCounterElement, UsaCursorElement, UsaDialogElement, UsaDoubleTapElement, UsaDraggableElement, UsaDrawerElement, UsaElement, UsaFabElement, UsaFlipListElement, UsaFullpageElement, UsaGrainElement, UsaHoldElement, UsaIconMorphElement, UsaLikeElement, UsaLoadingBarElement, UsaMagneticElement, UsaMarqueeElement, UsaMotionSwitchElement, UsaNavbarElement, UsaOverscrollElement, UsaParticlesElement, UsaPopoverElement, UsaPressElement, UsaProgressElement, UsaPullRefreshElement, UsaRatingElement, UsaRevealElement, UsaRippleElement, UsaScrambleElement, UsaScrollProgressElement, UsaScrollyElement, UsaShimmerTextElement, UsaSkeletonElement, UsaSliderElement, UsaSpinnerElement, UsaSplashElement, UsaSplitTextElement, UsaSpotlightElement, UsaSpringElement, UsaStaggerElement, UsaStickyStackElement, UsaTabsElement, UsaTextRotateElement, UsaTiltElement, UsaToasterElement, UsaToggleElement, UsaTooltipElement, UsaTypewriterElement, UsaViewSwitchElement, Variant, ViewTransitionOptions };
|
|
1801
|
+
export { AMBIENT_EFFECTS, BUTTON_DEFORMS, CARD_EFFECTS, CLICK_EFFECTS, COMPONENT_CATEGORIES, CURSOR_MODES, MORPH_ICONS, MOTION_SCALE, PAGE_EFFECTS, REVEAL_EFFECTS, SPINNER_VARIANTS, SPRING_EFFECTS, SPRING_PRESETS, VARIANTS, adoptVariants, burst, confetti, configureComponents, connectedAnimation, createSpring, defineAccordion, defineAcrylic, defineAmbient, defineAurora, defineAutoSkeleton, defineAvatarStack, defineBackToTop, defineBackgroundComponents, defineBadge, defineBlobs, defineBottomSheet, defineButton, defineCard, defineCardComponents, defineCardStack, defineCarousel3d, defineCheck, defineCheckbox, defineClick, defineClickComponents, defineComponents, defineCounter, defineCursor, defineDialog, defineDotNetwork, defineDoubleTap, defineDraggable, defineDrawer, defineFab, defineFeedbackComponents, defineFlipList, defineFullpage, defineGlitch, defineGradientText, defineGrain, defineGridGlow, defineHandwriting, defineHold, defineIconMorph, defineInteractionComponents, defineLike, defineLoadingBar, defineMagnetic, defineMarquee, defineMotionSwitch, defineNavbar, defineOverscroll, definePageComponents, defineParticles, definePhysicsComponents, definePopover, definePress, defineProgress, definePullRefresh, defineRating, defineReveal, defineRevealComponents, defineRipple, defineScramble, defineScrollHighlight, defineScrollProgress, defineScrolly, defineShimmerText, defineSkeleton, defineSlider, defineSpinner, defineSplash, defineSplitText, defineSpotlight, defineSpring, defineStagger, defineStickyStack, defineTabs, defineTextComponents, defineTextRotate, defineTilt, defineToaster, defineToggle, defineTooltip, defineTransitionComponents, defineTypewriter, defineUiComponents, defineViewSwitch, defineWaterRipple, defineWaveText, easeOutExpo, enableMpaTransitions, flip, fluentPreset, getMotionIntensity, haptic, linearEasing, loadingBar, morphPath, pageTransition, prefersReducedMotion, projectInertia, readScrollProgress, resolveSpring, restoreMotionIntensity, revealKeyframes, rubberBand, scrambleFrame, scrollToTarget, setMotionIntensity, setVariant, shake, smoothScroll, snapTo, spring, springEasing, springEffectKeyframes, springSamples, stepSpring, supportsLinearEasing, supportsViewTransitions, themeTransition, toast, viewTransition };
|
|
1802
|
+
export type { AmbientEffect, BurstOptions, ButtonDeform, ButtonShape, ButtonState, CardEffect, ClickEffect, ComponentCategory, ComponentsConfig, ConfettiOptions, ConnectedOptions, CursorMode, DialogVariant, FlipOptions, FluentPresetOptions, MotionIntensity, PageEffect, PageTransitionOptions, Placement, RevealEffect, SmoothScrollOptions, SpinnerVariant, SpringConfig, SpringEffect, SpringInput, SpringPreset, SpringValue, SpringValueOptions, ToastHandle, ToastOptions, ToastType, UsaAccordionElement, UsaAcrylicElement, UsaAmbientElement, UsaAuroraElement, UsaAutoSkeletonElement, UsaAvatarStackElement, UsaBackToTopElement, UsaBadgeElement, UsaBlobsElement, UsaBottomSheetElement, UsaButtonElement, UsaCardElement, UsaCardStackElement, UsaCarousel3dElement, UsaCheckElement, UsaCheckboxElement, UsaClickElement, UsaCounterElement, UsaCursorElement, UsaDialogElement, UsaDotNetworkElement, UsaDoubleTapElement, UsaDraggableElement, UsaDrawerElement, UsaElement, UsaFabElement, UsaFlipListElement, UsaFullpageElement, UsaGlitchElement, UsaGradientTextElement, UsaGrainElement, UsaGridGlowElement, UsaHandwritingElement, UsaHoldElement, UsaIconMorphElement, UsaLikeElement, UsaLoadingBarElement, UsaMagneticElement, UsaMarqueeElement, UsaMotionSwitchElement, UsaNavbarElement, UsaOverscrollElement, UsaParticlesElement, UsaPopoverElement, UsaPressElement, UsaProgressElement, UsaPullRefreshElement, UsaRatingElement, UsaRevealElement, UsaRippleElement, UsaScrambleElement, UsaScrollHighlightElement, UsaScrollProgressElement, UsaScrollyElement, UsaShimmerTextElement, UsaSkeletonElement, UsaSliderElement, UsaSpinnerElement, UsaSplashElement, UsaSplitTextElement, UsaSpotlightElement, UsaSpringElement, UsaStaggerElement, UsaStickyStackElement, UsaTabsElement, UsaTextRotateElement, UsaTiltElement, UsaToasterElement, UsaToggleElement, UsaTooltipElement, UsaTypewriterElement, UsaViewSwitchElement, UsaWaterRippleElement, UsaWaveTextElement, Variant, ViewTransitionOptions };
|