use-scroll-animate 2.9.0 → 3.0.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 +24 -0
- package/README.md +3 -3
- package/README_zh.md +1 -1
- package/dist/chunks/{base-BkQcvoSG.cjs → base-CXx7jZ-o.cjs} +4 -23
- package/dist/chunks/{base-BkQcvoSG.cjs.map → base-CXx7jZ-o.cjs.map} +1 -1
- package/dist/chunks/{base-CB8gChoe.js → base-Co98Z2iM.js} +4 -23
- package/dist/chunks/{base-CB8gChoe.js.map → base-Co98Z2iM.js.map} +1 -1
- package/dist/chunks/{core-J_KM443q.js → core-mV_TPgG_.js} +2 -52
- package/dist/chunks/core-mV_TPgG_.js.map +1 -0
- package/dist/chunks/{core-C1cEwjJj.cjs → core-qpECfEkb.cjs} +2 -52
- package/dist/chunks/core-qpECfEkb.cjs.map +1 -0
- package/dist/chunks/{spring-7U9MC6yQ.cjs → spring-2OTnYCzm.cjs} +2 -2
- package/dist/chunks/{spring-7U9MC6yQ.cjs.map → spring-2OTnYCzm.cjs.map} +1 -1
- package/dist/chunks/{spring-ka0YJ_ZR.js → spring-YNUpez2g.js} +2 -2
- package/dist/chunks/{spring-ka0YJ_ZR.js.map → spring-YNUpez2g.js.map} +1 -1
- package/dist/chunks/{stagger-CGF18oNs.js → stagger-BFAhKknX.js} +2 -2
- package/dist/chunks/{stagger-CGF18oNs.js.map → stagger-BFAhKknX.js.map} +1 -1
- package/dist/chunks/{stagger-DtKKS6GP.cjs → stagger-CLc3j58T.cjs} +2 -2
- package/dist/chunks/{stagger-DtKKS6GP.cjs.map → stagger-CLc3j58T.cjs.map} +1 -1
- package/dist/chunks/{variants-PsCXbQ5h.cjs → variants-BNIrn4ch.cjs} +2 -2
- package/dist/chunks/{variants-PsCXbQ5h.cjs.map → variants-BNIrn4ch.cjs.map} +1 -1
- package/dist/chunks/{variants-Ce9CboVc.js → variants-Dp_5lJ_J.js} +2 -2
- package/dist/chunks/{variants-Ce9CboVc.js.map → variants-Dp_5lJ_J.js.map} +1 -1
- package/dist/components/background.cjs +3 -3
- package/dist/components/background.cjs.map +1 -1
- package/dist/components/background.css +1 -1
- package/dist/components/background.d.cts +1 -1
- package/dist/components/background.d.ts +1 -1
- package/dist/components/background.js +4 -4
- 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 +9 -16
- package/dist/components/feedback.cjs.map +1 -1
- package/dist/components/feedback.css +2 -2
- package/dist/components/feedback.d.cts +2 -4
- package/dist/components/feedback.d.ts +2 -4
- package/dist/components/feedback.js +10 -17
- 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/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/reveal.cjs +1 -1
- package/dist/components/reveal.js +2 -2
- package/dist/components/text.cjs +1 -1
- package/dist/components/text.js +2 -2
- package/dist/components/transitions.cjs +7 -7
- package/dist/components/transitions.cjs.map +1 -1
- package/dist/components/transitions.d.cts +1 -1
- package/dist/components/transitions.d.ts +1 -1
- package/dist/components/transitions.js +8 -8
- package/dist/components/transitions.js.map +1 -1
- package/dist/components/ui.cjs +3 -3
- package/dist/components/ui.js +5 -5
- package/dist/components/vue.cjs +3 -3
- package/dist/components/vue.d.cts +4 -6
- package/dist/components/vue.d.ts +4 -6
- package/dist/components/vue.js +3 -3
- package/dist/components.cjs +3 -3
- package/dist/components.css +3 -3
- package/dist/components.d.cts +4 -6
- package/dist/components.d.ts +4 -6
- package/dist/components.js +5 -5
- package/dist/components.umd.js +2 -2
- package/dist/components.umd.js.map +1 -1
- package/dist/element.cjs +2 -3
- package/dist/element.cjs.map +1 -1
- package/dist/element.d.cts +4 -19
- package/dist/element.d.ts +4 -19
- package/dist/element.js +2 -3
- package/dist/element.js.map +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.cjs.map +1 -1
- package/dist/index.d.cts +4 -19
- package/dist/index.d.ts +4 -19
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/index.umd.js +2 -2
- package/dist/index.umd.js.map +1 -1
- package/dist/react.cjs +3 -3
- package/dist/react.cjs.map +1 -1
- package/dist/react.d.cts +3 -18
- package/dist/react.d.ts +3 -18
- package/dist/react.js +3 -3
- package/dist/react.js.map +1 -1
- package/dist/solid.cjs +2 -2
- package/dist/solid.d.cts +3 -18
- package/dist/solid.d.ts +3 -18
- package/dist/solid.js +2 -2
- package/dist/svelte.cjs +2 -2
- package/dist/svelte.d.cts +3 -18
- package/dist/svelte.d.ts +3 -18
- package/dist/svelte.js +2 -2
- package/dist/vue.cjs +3 -3
- package/dist/vue.cjs.map +1 -1
- package/dist/vue.d.cts +3 -18
- package/dist/vue.d.ts +3 -18
- package/dist/vue.js +3 -3
- package/dist/vue.js.map +1 -1
- package/docs/API.md +1 -2
- package/docs/components.md +3 -3
- package/docs/upgrading-3.md +1 -0
- package/package.json +2 -2
- package/dist/chunks/core-C1cEwjJj.cjs.map +0 -1
- package/dist/chunks/core-J_KM443q.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transitions.js","sources":["../../src/components/transitions/dialog.ts","../../src/components/transitions/accordion.ts","../../src/components/transitions/flip-list.ts","../../src/components/transitions/view-switch.ts","../../src/components/transitions/helpers.ts","../../src/components/transitions/index.ts"],"sourcesContent":["import { kindOf, defineElement, shadowStyles, EASE_OUT, FLUENT_DECELERATE, type UsaElement } from '../base';\nimport shadowCss from './dialog.shadow.css?raw';\nimport css from './dialog.css?raw';\n\nexport type DialogVariant = 'modal' | 'drawer-start' | 'drawer-end' | 'drawer-bottom' | 'sheet';\n\n/**\n * `<usa-dialog>` — an animated modal or drawer built on the native\n * `<dialog>` (top layer, focus trapping, inert page, Esc to close). Its\n * children are slotted into the panel (they stay in the light DOM, so\n * React / Vue / Svelte keep owning them). Style with `::part(panel)`,\n * `::part(backdrop)` and the `--usa-dialog-*` custom properties.\n *\n * Attributes: `open` (reflects; set/remove to open/close), `variant`\n * (`modal` default — Fluent scale + fade; `drawer-start` / `drawer-end`\n * slide from the side, `drawer-bottom` / `sheet` from below), `label`\n * (accessible name), `no-backdrop-close`, `no-esc`. Elements inside\n * with `data-close` close it. Events: `usa:open`, `usa:close` (cancelable\n * `usa:beforeclose`). Reduced motion: fade only.\n */\nexport interface UsaDialogElement extends UsaElement {\n open: boolean;\n show(): Promise<void>;\n close(returnValue?: string): Promise<void>;\n readonly dialog: HTMLDialogElement | null;\n returnValue: string;\n}\n\nconst FROM: Record<string, string> = {\n modal: 'scale(0.94)',\n 'drawer-start': 'translateX(-100%)',\n 'drawer-end': 'translateX(100%)',\n 'drawer-bottom': 'translateY(100%)',\n sheet: 'translateY(40px)',\n};\n\nexport function defineDialog(tag = 'usa-dialog'): CustomElementConstructor | undefined {\n return defineElement(\n tag,\n (Base) =>\n class UsaDialog extends Base {\n static get observedAttributes(): string[] {\n return ['open', 'kind', 'variant', 'label'];\n }\n\n private _dialog: HTMLDialogElement | null = null;\n private _panel: HTMLElement | null = null;\n private _backdrop: HTMLElement | null = null;\n private _busy: Promise<void> | null = null;\n private _syncing = false;\n returnValue = '';\n\n get dialog(): HTMLDialogElement | null {\n return this._dialog;\n }\n get open(): boolean {\n return this.hasAttribute('open');\n }\n set open(v: boolean) {\n this.toggleAttribute('open', !!v);\n }\n\n private get variant(): string {\n return kindOf(this, FROM, 'modal');\n }\n\n changed(name: string): void {\n if (name === 'open') {\n if (this._syncing) return;\n if (this.open) this.show();\n else this.close();\n } else this.syncAttrs();\n }\n\n private syncAttrs(): void {\n if (!this._dialog) return;\n this._dialog.setAttribute('data-variant', this.variant);\n this._dialog.setAttribute('aria-modal', 'true');\n const label = this.getAttribute('label');\n if (label) this._dialog.setAttribute('aria-label', label);\n }\n\n mount(): void {\n if (!this._dialog) {\n const root = this.shadowRoot || this.attachShadow({ mode: 'open' });\n root.innerHTML = '<dialog part=\"dialog\"><div part=\"backdrop\" aria-hidden=\"true\"></div><div part=\"panel\"><slot></slot></div></dialog>';\n shadowStyles(root, shadowCss);\n this._dialog = root.querySelector('dialog');\n this._backdrop = root.querySelector('[part=backdrop]');\n this._panel = root.querySelector('[part=panel]');\n }\n this.syncAttrs();\n const dlg = this._dialog!;\n this.listen(dlg, 'cancel', (e: Event) => {\n e.preventDefault();\n if (!this.flag('no-esc')) this.close('cancel');\n });\n this.listen(this._backdrop!, 'click', () => !this.flag('no-backdrop-close') && this.close('backdrop'));\n this.listen(this, 'click', (e: Event) => {\n const t = (e.target as Element).closest?.('[data-close]');\n if (t && this.contains(t)) this.close((t as HTMLElement).getAttribute('data-close') || 'close');\n });\n if (this.open && !dlg.open) this.show();\n }\n\n unmount(): void {\n if (this._dialog?.open) this._dialog.close();\n }\n\n private setOpenAttr(on: boolean): void {\n this._syncing = true;\n this.toggleAttribute('open', on);\n this._syncing = false;\n }\n\n async show(): Promise<void> {\n await this._busy;\n const dlg = this._dialog;\n if (!dlg) {\n this.setOpenAttr(true); // opens on connect\n return;\n }\n if (dlg.open) return;\n this.setOpenAttr(true);\n try {\n if (typeof dlg.showModal === 'function') dlg.showModal();\n else dlg.setAttribute('open', '');\n } catch {\n dlg.setAttribute('open', '');\n }\n this.emit('open');\n if (this.reduced) {\n await this.animate2([{ opacity: 0 }, { opacity: 1 }], [{ opacity: 0 }, { opacity: 1 }], 160, EASE_OUT);\n return;\n }\n await this.animate2(\n [{ opacity: 0, transform: FROM[this.variant] }, { opacity: 1, transform: 'none' }],\n [{ opacity: 0 }, { opacity: 1 }],\n this.variant === 'modal' ? 260 : 360,\n FLUENT_DECELERATE\n );\n }\n\n async close(returnValue = ''): Promise<void> {\n await this._busy;\n const dlg = this._dialog;\n if (!dlg || !dlg.open) {\n this.setOpenAttr(false);\n return;\n }\n if (!this.emit('beforeclose', { returnValue })) {\n this.setOpenAttr(true);\n return;\n }\n this.returnValue = returnValue;\n this._busy = (async () => {\n const panelTo = this.reduced ? { opacity: 0 } : { opacity: 0, transform: FROM[this.variant] };\n const panelFrom = this.reduced ? { opacity: 1 } : { opacity: 1, transform: 'none' };\n await this.animate2([panelFrom, panelTo], [{ opacity: 1 }, { opacity: 0 }], this.reduced ? 120 : 200, 'cubic-bezier(0.7, 0, 0.84, 0)', 'forwards');\n try {\n if (typeof dlg.close === 'function') dlg.close(returnValue);\n else dlg.removeAttribute('open');\n } catch {\n dlg.removeAttribute('open');\n }\n dlg.removeAttribute('open');\n this._panel?.getAnimations?.().forEach((a) => a.cancel());\n this._backdrop?.getAnimations?.().forEach((a) => a.cancel());\n this.setOpenAttr(false);\n this.emit('close', { returnValue });\n })();\n await this._busy;\n this._busy = null;\n }\n\n private animate2(panel: Keyframe[], backdrop: Keyframe[], duration: number, easing: string, fill: FillMode = 'none'): Promise<void> {\n const a = this._panel ? this.motion(this._panel, panel, { duration, easing, fill }) : null;\n const b = this._backdrop ? this.motion(this._backdrop, backdrop, { duration, easing: 'linear', fill }) : null;\n return Promise.all([a?.finished, b?.finished].map((p) => p?.catch(() => undefined))).then(() => undefined);\n }\n },\n { id: 'dialog', text: css }\n );\n}\n","import { defineElement, EASE_OUT, type UsaElement } from '../base';\nimport css from './accordion.css?raw';\n\n/**\n * `<usa-accordion>` — smooth expand / collapse for the native `<details>`\n * elements inside it (keeps their semantics, keyboard support and\n * find-in-page, and adds no wrapper elements, so framework-rendered content\n * is left alone). Only one stays open unless `multiple` is set.\n *\n * Attributes: `multiple`, `duration` (ms, 300). Event: `usa:toggle`\n * (`detail.details`, `detail.open`). Reduced motion: instant.\n * Heights are measured once per toggle and animated on the `<details>`.\n */\nexport interface UsaAccordionElement extends UsaElement {\n readonly items: HTMLDetailsElement[];\n toggleItem(details: HTMLDetailsElement, open?: boolean): Promise<void>;\n}\n\nexport function defineAccordion(tag = 'usa-accordion'): CustomElementConstructor | undefined {\n return defineElement(\n tag,\n (Base) =>\n class UsaAccordion extends Base {\n static get observedAttributes(): string[] {\n return [];\n }\n\n private _running = new WeakMap<HTMLDetailsElement, Animation>();\n\n get items(): HTMLDetailsElement[] {\n return Array.from(this.children).filter((c): c is HTMLDetailsElement => c.tagName === 'DETAILS');\n }\n\n mount(): void {\n this.listen(this, 'click', (e: MouseEvent) => {\n const summary = (e.target as Element).closest?.('summary');\n const d = summary?.parentElement;\n if (!summary || !d || d.tagName !== 'DETAILS' || d.parentElement !== this) return;\n e.preventDefault();\n this.toggleItem(d as HTMLDetailsElement);\n });\n }\n\n /** Height of `d` when closed: its summary plus its own padding and border. */\n private closedHeight(d: HTMLDetailsElement): number {\n const summary = d.querySelector(':scope > summary');\n const cs = typeof getComputedStyle === 'function' ? getComputedStyle(d) : null;\n const extra = cs\n ? ['paddingTop', 'paddingBottom', 'borderTopWidth', 'borderBottomWidth'].reduce((n, k) => n + (parseFloat((cs as any)[k]) || 0), 0)\n : 0;\n return (summary ? summary.getBoundingClientRect().height : 0) + extra;\n }\n\n async toggleItem(d: HTMLDetailsElement, open = !d.open || d.hasAttribute('data-closing')): Promise<void> {\n if (open && !this.flag('multiple')) this.items.forEach((o) => o !== d && o.open && this.toggleItem(o, false));\n this._running.get(d)?.cancel();\n this._running.delete(d);\n const duration = this.reduced ? 0 : this.num('duration', 300);\n const startH = d.getBoundingClientRect().height;\n if (open) {\n d.removeAttribute('data-closing');\n d.open = true;\n }\n this.emit('toggle', { details: d, open });\n if (!duration || typeof d.animate !== 'function') {\n if (!open) d.open = false;\n return;\n }\n const endH = open ? d.getBoundingClientRect().height : this.closedHeight(d);\n if (!open) d.setAttribute('data-closing', '');\n d.style.overflow = 'hidden';\n const a = d.animate([{ height: `${startH}px` }, { height: `${endH}px` }], { duration, easing: EASE_OUT });\n this._running.set(d, a);\n await a.finished.catch(() => undefined);\n if (this._running.get(d) !== a) return;\n this._running.delete(d);\n d.style.overflow = '';\n if (!open) {\n d.open = false;\n d.removeAttribute('data-closing');\n }\n }\n },\n { id: 'accordion', text: css }\n );\n}\n","import { defineElement, FLUENT_DECELERATE, type UsaElement } from '../base';\nimport css from './flip-list.css?raw';\n\n/**\n * `<usa-flip-list>` — animates its children to their new places whenever\n * they are added, removed or reordered (FLIP: transforms only). Works with\n * any rendering: plain DOM, React keyed lists, Vue `v-for`, Svelte `{#each}`.\n *\n * Attributes: `duration` (ms, 420), `easing`, `disabled`.\n * Method: `flip(mutate)` for explicit changes (also measures resizes).\n * Reduced motion: no animation.\n */\nexport interface UsaFlipListElement extends UsaElement {\n flip(mutate: () => void | Promise<void>): Promise<void>;\n}\n\nexport function defineFlipList(tag = 'usa-flip-list'): CustomElementConstructor | undefined {\n return defineElement(\n tag,\n (Base) =>\n class UsaFlipList extends Base {\n static get observedAttributes(): string[] {\n return [];\n }\n\n /** Child positions relative to the host, from the last layout we saw. */\n private _pos = new WeakMap<Element, { x: number; y: number }>();\n private _manual = false;\n\n private snapshot(): void {\n const host = this.getBoundingClientRect();\n for (const el of Array.from(this.children)) {\n const r = el.getBoundingClientRect();\n this._pos.set(el, { x: r.left - host.left, y: r.top - host.top });\n }\n }\n\n mount(): void {\n this.snapshot();\n if (typeof MutationObserver !== 'undefined') {\n const mo = new MutationObserver(() => {\n if (!this._manual) this.animateFrom(this._pos);\n });\n mo.observe(this, { childList: true });\n this.onCleanup(() => mo.disconnect());\n }\n if (typeof ResizeObserver !== 'undefined') {\n const ro = new ResizeObserver(() => this.snapshot());\n ro.observe(this);\n this.onCleanup(() => ro.disconnect());\n }\n }\n\n private animateFrom(prev: WeakMap<Element, { x: number; y: number }>): Promise<void> {\n const off = this.reduced || this.flag('disabled');\n const host = this.getBoundingClientRect();\n const kids = Array.from(this.children) as HTMLElement[];\n const now = kids.map((el) => {\n const r = el.getBoundingClientRect();\n return { x: r.left - host.left, y: r.top - host.top };\n });\n const anims: Promise<unknown>[] = [];\n const duration = this.num('duration', 420);\n const easing = this.str('easing', FLUENT_DECELERATE);\n kids.forEach((el, i) => {\n const before = prev.get(el);\n this._pos.set(el, now[i]);\n if (off || typeof el.animate !== 'function') return;\n if (!before) {\n anims.push(el.animate([{ opacity: 0, transform: 'scale(0.92)' }, { opacity: 1, transform: 'none' }], { duration, easing }).finished.catch(() => 0));\n return;\n }\n const dx = before.x - now[i].x;\n const dy = before.y - now[i].y;\n if (Math.abs(dx) < 0.5 && Math.abs(dy) < 0.5) return;\n anims.push(el.animate([{ transform: `translate(${dx}px, ${dy}px)` }, { transform: 'none' }], { duration, easing, composite: 'add' } as KeyframeAnimationOptions).finished.catch(() => 0));\n });\n return Promise.all(anims).then(() => undefined);\n }\n\n async flip(mutate: () => void | Promise<void>): Promise<void> {\n this.snapshot();\n const prev = this._pos;\n this._pos = new WeakMap();\n // Copy the snapshot so the observer does not overwrite it mid-mutation\n for (const el of Array.from(this.children)) {\n const p = prev.get(el);\n if (p) this._pos.set(el, p);\n }\n this._manual = true;\n try {\n await mutate();\n } finally {\n this._manual = false;\n }\n await this.animateFrom(prev);\n }\n },\n { id: 'flip-list', text: css }\n );\n}\n","import { defineElement, EASE_OUT, FLUENT_DECELERATE, type UsaElement } from '../base';\nimport css from './view-switch.css?raw';\n\n/**\n * `<usa-view-switch>` — shows one of its children at a time (tabs, wizard\n * steps, app pages) and animates between them. Children are views; name\n * them with `data-view`, or address them by index.\n *\n * Attributes: `active` (view name or index, default the first),\n * `effect` (`fade` | `slide` (default, direction-aware — Fluent \"page\n * transition\") | `scale` | `drill`), `duration` (ms, 320). Inactive views\n * get `hidden` + `inert`. Event: `usa:change` (`detail.view`,\n * `detail.index`). Reduced motion: a quick fade.\n */\nexport interface UsaViewSwitchElement extends UsaElement {\n active: string;\n readonly views: HTMLElement[];\n show(view: string | number): Promise<void>;\n}\n\nexport function defineViewSwitch(tag = 'usa-view-switch'): CustomElementConstructor | undefined {\n return defineElement(\n tag,\n (Base) =>\n class UsaViewSwitch extends Base {\n static get observedAttributes(): string[] {\n return ['active'];\n }\n\n private _index = -1;\n private _anims: Animation[] = [];\n\n get views(): HTMLElement[] {\n return Array.from(this.children) as HTMLElement[];\n }\n get active(): string {\n return this.str('active', '0');\n }\n set active(v: string) {\n this.setAttribute('active', String(v));\n }\n\n private indexOf(v: string | number): number {\n const views = this.views;\n const byName = views.findIndex((el) => el.dataset.view === String(v));\n if (byName >= 0) return byName;\n const n = Number(v);\n return Number.isInteger(n) && n >= 0 && n < views.length ? n : -1;\n }\n\n changed(): void {\n this.show(this.active);\n }\n\n mount(): void {\n const i = Math.max(0, this.indexOf(this.active));\n this._index = i;\n this.views.forEach((v, j) => this.setVisible(v, j === i));\n }\n\n private setVisible(v: HTMLElement, on: boolean): void {\n v.hidden = !on;\n v.toggleAttribute('inert', !on);\n v.toggleAttribute('data-active', on);\n }\n\n async show(view: string | number): Promise<void> {\n const next = this.indexOf(view);\n const prev = this._index;\n if (next < 0 || next === prev) return;\n const views = this.views;\n const from = views[prev];\n const to = views[next];\n this._index = next;\n const name = to.dataset.view ?? String(next);\n if (this.active !== name && this.active !== String(next)) this.setAttribute('active', name);\n this._anims.splice(0).forEach((a) => a.finish());\n this.setVisible(to, true);\n this.emit('change', { view: to, index: next, name });\n if (!from) return;\n const duration = this.num('duration', 320);\n const effect = this.reduced ? 'fade' : this.str('effect', 'slide');\n const dir = next > prev ? 1 : -1;\n let outF: Keyframe;\n let inF: Keyframe;\n switch (effect) {\n case 'fade':\n outF = { opacity: 0 };\n inF = { opacity: 0 };\n break;\n case 'scale':\n outF = { opacity: 0, transform: 'scale(0.96)' };\n inF = { opacity: 0, transform: 'scale(1.04)' };\n break;\n case 'drill':\n outF = { opacity: 0, transform: `scale(${dir > 0 ? 1.06 : 0.94})` };\n inF = { opacity: 0, transform: `scale(${dir > 0 ? 0.94 : 1.06})` };\n break;\n default:\n outF = { opacity: 0, transform: `translateX(${-dir * 32}px)` };\n inF = { opacity: 0, transform: `translateX(${dir * 48}px)` };\n }\n const neutral = (f: Keyframe): Keyframe => ('transform' in f ? { opacity: 1, transform: 'none' } : { opacity: 1 });\n // Outgoing view stays stacked in the same grid cell while it leaves\n from.setAttribute('data-leaving', '');\n const a = this.motion(from, [neutral(outF), outF], { duration: duration * 0.6, easing: EASE_OUT, fill: 'forwards' });\n const b = this.motion(to, [inF, neutral(inF)], { duration, delay: duration * 0.15, easing: FLUENT_DECELERATE, fill: 'backwards' });\n this._anims = [a, b].filter((x): x is Animation => !!x);\n await Promise.all(this._anims.map((x) => x.finished.catch(() => undefined)));\n from.removeAttribute('data-leaving');\n if (this._index !== prev) this.setVisible(from, false);\n a?.cancel();\n }\n },\n { id: 'view-switch', text: css }\n );\n}\n","import { prefersReducedMotion, EASE_OUT, FLUENT_DECELERATE } from '../base';\n\nexport interface ViewTransitionOptions {\n /**\n * Element to cross-fade when the View Transitions API is missing (default:\n * none — the update is applied without animation).\n */\n fallback?: HTMLElement | null;\n /** Fallback fade duration in ms (default 180 out + 220 in). */\n duration?: number;\n /** View transition types (`document.startViewTransition({ types })`, where supported). */\n types?: string[];\n}\n\n/**\n * Run `update()` (which changes the DOM) inside a view transition:\n * `document.startViewTransition()` where available (Chrome/Edge 111+, so\n * Electron, WebView2 and Tauri on Windows), otherwise a short cross-fade of\n * `options.fallback`. Instant under reduced motion. Resolves when finished.\n *\n * Give elements a `view-transition-name` in CSS for shared-element morphs.\n */\nexport async function viewTransition(update: () => void | Promise<void>, options: ViewTransitionOptions = {}): Promise<void> {\n const doc: any = typeof document !== 'undefined' ? document : null;\n if (!doc || prefersReducedMotion()) {\n await update();\n return;\n }\n if (typeof doc.startViewTransition === 'function') {\n let vt: any;\n try {\n vt = options.types ? doc.startViewTransition({ update, types: options.types }) : doc.startViewTransition(update);\n } catch {\n vt = doc.startViewTransition(update);\n }\n await vt.finished.catch(() => undefined);\n return;\n }\n const el = options.fallback;\n const d = options.duration ?? 200;\n if (!el || typeof el.animate !== 'function') {\n await update();\n return;\n }\n await el.animate([{ opacity: 1 }, { opacity: 0 }], { duration: d * 0.8, easing: 'ease-in', fill: 'forwards' }).finished.catch(() => undefined);\n await update();\n const a = el.animate([{ opacity: 0, transform: 'translateY(6px)' }, { opacity: 1, transform: 'none' }], { duration: d * 1.1, easing: EASE_OUT });\n // remove the forwards fill of the fade-out\n el.getAnimations?.().forEach((x) => x !== a && x.cancel());\n await a.finished.catch(() => undefined);\n}\n\nexport interface FlipOptions {\n duration?: number;\n easing?: string;\n /** Fade/scale in elements that did not exist before (default true). */\n animateEnter?: boolean;\n}\n\ntype Targets = Element | Iterable<Element> | ArrayLike<Element>;\nconst list = (t: Targets): HTMLElement[] =>\n (t instanceof Element ? Array.from(t.children) : Array.from(t as ArrayLike<Element>)) as HTMLElement[];\n\n/**\n * FLIP animation for layout changes (list reorder, filter, grid resize):\n * measures `targets` (an element's children, or a list), runs `mutate()`,\n * then animates each element from its old position to its new one with\n * transforms only. Elements added by `mutate()` fade in.\n *\n * ```js\n * await flip(list, () => list.append(...shuffled));\n * ```\n */\nexport async function flip(targets: Targets, mutate: () => void | Promise<void>, options: FlipOptions = {}): Promise<void> {\n const before = new Map(list(targets).map((el) => [el, el.getBoundingClientRect()]));\n await mutate();\n if (prefersReducedMotion()) return;\n const after = list(targets);\n const duration = options.duration ?? 420;\n const easing = options.easing ?? FLUENT_DECELERATE;\n const anims: Animation[] = [];\n // Read all, then write all\n const rects = after.map((el) => el.getBoundingClientRect());\n after.forEach((el, i) => {\n if (typeof el.animate !== 'function') return;\n const first = before.get(el);\n const last = rects[i];\n if (!first) {\n if (options.animateEnter !== false) anims.push(el.animate([{ opacity: 0, transform: 'scale(0.9)' }, { opacity: 1, transform: 'none' }], { duration, easing }));\n return;\n }\n const dx = first.left - last.left;\n const dy = first.top - last.top;\n const sx = last.width ? first.width / last.width : 1;\n const sy = last.height ? first.height / last.height : 1;\n if (Math.abs(dx) < 0.5 && Math.abs(dy) < 0.5 && Math.abs(sx - 1) < 0.01 && Math.abs(sy - 1) < 0.01) return;\n anims.push(\n el.animate(\n [{ transformOrigin: '0 0', transform: `translate(${dx}px, ${dy}px) scale(${sx}, ${sy})` }, { transformOrigin: '0 0', transform: 'none' }],\n { duration, easing }\n )\n );\n });\n await Promise.all(anims.map((a) => a.finished.catch(() => undefined)));\n}\n\nexport interface ConnectedOptions {\n duration?: number;\n easing?: string;\n /** Hide `from` while the animation runs (default true). */\n hideSource?: boolean;\n}\n\n/**\n * Connected (shared-element) animation, like WinUI's\n * `ConnectedAnimationService`: `to` flies from the position and size of\n * `from` into its own place (e.g. a thumbnail opening into a detail view).\n * Call it right after `to` is shown. Transforms only.\n */\nexport async function connectedAnimation(from: Element, to: HTMLElement, options: ConnectedOptions = {}): Promise<void> {\n if (prefersReducedMotion() || typeof to.animate !== 'function') return;\n const a = from.getBoundingClientRect();\n const b = to.getBoundingClientRect();\n if (!b.width || !b.height) return;\n const hide = options.hideSource !== false && from instanceof HTMLElement;\n const prev = hide ? (from as HTMLElement).style.visibility : '';\n if (hide) (from as HTMLElement).style.visibility = 'hidden';\n const anim = to.animate(\n [\n { transformOrigin: '0 0', transform: `translate(${a.left - b.left}px, ${a.top - b.top}px) scale(${a.width / b.width}, ${a.height / b.height})` },\n { transformOrigin: '0 0', transform: 'none' },\n ],\n { duration: options.duration ?? 480, easing: options.easing ?? FLUENT_DECELERATE }\n );\n await anim.finished.catch(() => undefined);\n if (hide) (from as HTMLElement).style.visibility = prev;\n}\n","/**\n * use-scroll-animate/components/transitions — view & layout transitions.\n * `<usa-dialog>`, `<usa-accordion>`, `<usa-flip-list>`, `<usa-view-switch>`\n * and the `viewTransition()`, `flip()`, `connectedAnimation()` helpers.\n */\nimport { defineDialog, type UsaDialogElement } from './dialog';\nimport { defineAccordion, type UsaAccordionElement } from './accordion';\nimport { defineFlipList, type UsaFlipListElement } from './flip-list';\nimport { defineViewSwitch, type UsaViewSwitchElement } from './view-switch';\n\nexport { defineDialog, defineAccordion, defineFlipList, defineViewSwitch };\nexport { viewTransition, flip, connectedAnimation } from './helpers';\nexport type { ViewTransitionOptions, FlipOptions, ConnectedOptions } from './helpers';\nexport type { DialogVariant } from './dialog';\nexport type { UsaDialogElement, UsaAccordionElement, UsaFlipListElement, UsaViewSwitchElement };\nexport { configureComponents, prefersReducedMotion } from '../base';\nexport type { ComponentsConfig, UsaElement } from '../base';\n\n/** Register every component of this category under its default tag. */\nexport function defineTransitionComponents(): void {\n defineDialog();\n defineAccordion();\n defineFlipList();\n defineViewSwitch();\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'usa-dialog': UsaDialogElement;\n 'usa-accordion': UsaAccordionElement;\n 'usa-flip-list': UsaFlipListElement;\n 'usa-view-switch': UsaViewSwitchElement;\n }\n}\n"],"names":["css"],"mappings":";;;;;;;AA4BA,MAAM,IAAI,GAA2B;AACnC,IAAA,KAAK,EAAE,aAAa;AACpB,IAAA,cAAc,EAAE,mBAAmB;AACnC,IAAA,YAAY,EAAE,kBAAkB;AAChC,IAAA,eAAe,EAAE,kBAAkB;AACnC,IAAA,KAAK,EAAE,kBAAkB;CAC1B;AAEK,SAAU,YAAY,CAAC,GAAG,GAAG,YAAY,EAAA;AAC7C,IAAA,OAAO,aAAa,CAClB,GAAG,EACH,CAAC,IAAI,KACH,MAAM,SAAU,SAAQ,IAAI,CAAA;AAA5B,QAAA,WAAA,GAAA;;YAKU,IAAA,CAAA,OAAO,GAA6B,IAAI;YACxC,IAAA,CAAA,MAAM,GAAuB,IAAI;YACjC,IAAA,CAAA,SAAS,GAAuB,IAAI;YACpC,IAAA,CAAA,KAAK,GAAyB,IAAI;YAClC,IAAA,CAAA,QAAQ,GAAG,KAAK;YACxB,IAAA,CAAA,WAAW,GAAG,EAAE;QAkIlB;AA3IE,QAAA,WAAW,kBAAkB,GAAA;YAC3B,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,CAAC;QAC7C;AASA,QAAA,IAAI,MAAM,GAAA;YACR,OAAO,IAAI,CAAC,OAAO;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e,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE;AAC9C,KAAA,EACD,EAAE,QAAQ,EAAE,OAAO,CAAC,QAAQ,IAAI,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,IAAI,iBAAiB,EAAE,CACnF;IACD,MAAM,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,SAAS,CAAC;AAC1C,IAAA,IAAI,IAAI;AAAG,QAAA,IAAoB,CAAC,KAAK,CAAC,UAAU,GAAG,IAAI;AACzD;;ACxIA;;;;AAIG;AAcH;SACgB,0BAA0B,GAAA;AACxC,IAAA,YAAY,EAAE;AACd,IAAA,eAAe,EAAE;AACjB,IAAA,cAAc,EAAE;AAChB,IAAA,gBAAgB,EAAE;AACpB;;;;"}
|
|
1
|
+
{"version":3,"file":"transitions.js","sources":["../../src/components/transitions/dialog.ts","../../src/components/transitions/accordion.ts","../../src/components/transitions/flip-list.ts","../../src/components/transitions/view-switch.ts","../../src/components/transitions/helpers.ts","../../src/components/transitions/index.ts"],"sourcesContent":["import { kindOf, defineElement, shadowStyles, EASE_OUT, FLUENT_DECELERATE, type UsaElement } from '../base';\nimport shadowCss from './dialog.shadow.css?raw';\nimport css from './dialog.css?raw';\n\nexport type DialogVariant = 'modal' | 'drawer-start' | 'drawer-end' | 'drawer-bottom' | 'sheet';\n\n/**\n * `<usa-dialog>` — an animated modal or drawer built on the native\n * `<dialog>` (top layer, focus trapping, inert page, Esc to close). Its\n * children are slotted into the panel (they stay in the light DOM, so\n * React / Vue / Svelte keep owning them). Style with `::part(panel)`,\n * `::part(backdrop)` and the `--usa-dialog-*` custom properties.\n *\n * Attributes: `open` (reflects; set/remove to open/close), `kind`\n * (`modal` default — Fluent scale + fade; `drawer-start` / `drawer-end`\n * slide from the side, `drawer-bottom` / `sheet` from below), `label`\n * (accessible name), `no-backdrop-close`, `no-esc`. Elements inside\n * with `data-close` close it. Events: `usa:open`, `usa:close` (cancelable\n * `usa:beforeclose`). Reduced motion: fade only.\n */\nexport interface UsaDialogElement extends UsaElement {\n open: boolean;\n show(): Promise<void>;\n close(returnValue?: string): Promise<void>;\n readonly dialog: HTMLDialogElement | null;\n returnValue: string;\n}\n\nconst FROM: Record<string, string> = {\n modal: 'scale(0.94)',\n 'drawer-start': 'translateX(-100%)',\n 'drawer-end': 'translateX(100%)',\n 'drawer-bottom': 'translateY(100%)',\n sheet: 'translateY(40px)',\n};\n\nexport function defineDialog(tag = 'usa-dialog'): CustomElementConstructor | undefined {\n return defineElement(\n tag,\n (Base) =>\n class UsaDialog extends Base {\n static get observedAttributes(): string[] {\n return ['open', 'kind', 'label'];\n }\n\n private _dialog: HTMLDialogElement | null = null;\n private _panel: HTMLElement | null = null;\n private _backdrop: HTMLElement | null = null;\n private _busy: Promise<void> | null = null;\n private _syncing = false;\n returnValue = '';\n\n get dialog(): HTMLDialogElement | null {\n return this._dialog;\n }\n get open(): boolean {\n return this.hasAttribute('open');\n }\n set open(v: boolean) {\n this.toggleAttribute('open', !!v);\n }\n\n private get kind(): string {\n return kindOf(this, FROM, 'modal');\n }\n\n changed(name: string): void {\n if (name === 'open') {\n if (this._syncing) return;\n if (this.open) this.show();\n else this.close();\n } else this.syncAttrs();\n }\n\n private syncAttrs(): void {\n if (!this._dialog) return;\n this._dialog.setAttribute('data-kind', this.kind);\n this._dialog.setAttribute('aria-modal', 'true');\n const label = this.getAttribute('label');\n if (label) this._dialog.setAttribute('aria-label', label);\n }\n\n mount(): void {\n if (!this._dialog) {\n const root = this.shadowRoot || this.attachShadow({ mode: 'open' });\n root.innerHTML = '<dialog part=\"dialog\"><div part=\"backdrop\" aria-hidden=\"true\"></div><div part=\"panel\"><slot></slot></div></dialog>';\n shadowStyles(root, shadowCss);\n this._dialog = root.querySelector('dialog');\n this._backdrop = root.querySelector('[part=backdrop]');\n this._panel = root.querySelector('[part=panel]');\n }\n this.syncAttrs();\n const dlg = this._dialog!;\n this.listen(dlg, 'cancel', (e: Event) => {\n e.preventDefault();\n if (!this.flag('no-esc')) this.close('cancel');\n });\n this.listen(this._backdrop!, 'click', () => !this.flag('no-backdrop-close') && this.close('backdrop'));\n this.listen(this, 'click', (e: Event) => {\n const t = (e.target as Element).closest?.('[data-close]');\n if (t && this.contains(t)) this.close((t as HTMLElement).getAttribute('data-close') || 'close');\n });\n if (this.open && !dlg.open) this.show();\n }\n\n unmount(): void {\n if (this._dialog?.open) this._dialog.close();\n }\n\n private setOpenAttr(on: boolean): void {\n this._syncing = true;\n this.toggleAttribute('open', on);\n this._syncing = false;\n }\n\n async show(): Promise<void> {\n await this._busy;\n const dlg = this._dialog;\n if (!dlg) {\n this.setOpenAttr(true); // opens on connect\n return;\n }\n if (dlg.open) return;\n this.setOpenAttr(true);\n try {\n if (typeof dlg.showModal === 'function') dlg.showModal();\n else dlg.setAttribute('open', '');\n } catch {\n dlg.setAttribute('open', '');\n }\n this.emit('open');\n if (this.reduced) {\n await this.animate2([{ opacity: 0 }, { opacity: 1 }], [{ opacity: 0 }, { opacity: 1 }], 160, EASE_OUT);\n return;\n }\n await this.animate2(\n [{ opacity: 0, transform: FROM[this.kind] }, { opacity: 1, transform: 'none' }],\n [{ opacity: 0 }, { opacity: 1 }],\n this.kind === 'modal' ? 260 : 360,\n FLUENT_DECELERATE\n );\n }\n\n async close(returnValue = ''): Promise<void> {\n await this._busy;\n const dlg = this._dialog;\n if (!dlg || !dlg.open) {\n this.setOpenAttr(false);\n return;\n }\n if (!this.emit('beforeclose', { returnValue })) {\n this.setOpenAttr(true);\n return;\n }\n this.returnValue = returnValue;\n this._busy = (async () => {\n const panelTo = this.reduced ? { opacity: 0 } : { opacity: 0, transform: FROM[this.kind] };\n const panelFrom = this.reduced ? { opacity: 1 } : { opacity: 1, transform: 'none' };\n await this.animate2([panelFrom, panelTo], [{ opacity: 1 }, { opacity: 0 }], this.reduced ? 120 : 200, 'cubic-bezier(0.7, 0, 0.84, 0)', 'forwards');\n try {\n if (typeof dlg.close === 'function') dlg.close(returnValue);\n else dlg.removeAttribute('open');\n } catch {\n dlg.removeAttribute('open');\n }\n dlg.removeAttribute('open');\n this._panel?.getAnimations?.().forEach((a) => a.cancel());\n this._backdrop?.getAnimations?.().forEach((a) => a.cancel());\n this.setOpenAttr(false);\n this.emit('close', { returnValue });\n })();\n await this._busy;\n this._busy = null;\n }\n\n private animate2(panel: Keyframe[], backdrop: Keyframe[], duration: number, easing: string, fill: FillMode = 'none'): Promise<void> {\n const a = this._panel ? this.motion(this._panel, panel, { duration, easing, fill }) : null;\n const b = this._backdrop ? this.motion(this._backdrop, backdrop, { duration, easing: 'linear', fill }) : null;\n return Promise.all([a?.finished, b?.finished].map((p) => p?.catch(() => undefined))).then(() => undefined);\n }\n },\n { id: 'dialog', text: css }\n );\n}\n","import { defineElement, EASE_OUT, type UsaElement } from '../base';\nimport css from './accordion.css?raw';\n\n/**\n * `<usa-accordion>` — smooth expand / collapse for the native `<details>`\n * elements inside it (keeps their semantics, keyboard support and\n * find-in-page, and adds no wrapper elements, so framework-rendered content\n * is left alone). Only one stays open unless `multiple` is set.\n *\n * Attributes: `multiple`, `duration` (ms, 300). Event: `usa:toggle`\n * (`detail.details`, `detail.open`). Reduced motion: instant.\n * Heights are measured once per toggle and animated on the `<details>`.\n */\nexport interface UsaAccordionElement extends UsaElement {\n readonly items: HTMLDetailsElement[];\n toggleItem(details: HTMLDetailsElement, open?: boolean): Promise<void>;\n}\n\nexport function defineAccordion(tag = 'usa-accordion'): CustomElementConstructor | undefined {\n return defineElement(\n tag,\n (Base) =>\n class UsaAccordion extends Base {\n static get observedAttributes(): string[] {\n return [];\n }\n\n private _running = new WeakMap<HTMLDetailsElement, Animation>();\n\n get items(): HTMLDetailsElement[] {\n return Array.from(this.children).filter((c): c is HTMLDetailsElement => c.tagName === 'DETAILS');\n }\n\n mount(): void {\n this.listen(this, 'click', (e: MouseEvent) => {\n const summary = (e.target as Element).closest?.('summary');\n const d = summary?.parentElement;\n if (!summary || !d || d.tagName !== 'DETAILS' || d.parentElement !== this) return;\n e.preventDefault();\n this.toggleItem(d as HTMLDetailsElement);\n });\n }\n\n /** Height of `d` when closed: its summary plus its own padding and border. */\n private closedHeight(d: HTMLDetailsElement): number {\n const summary = d.querySelector(':scope > summary');\n const cs = typeof getComputedStyle === 'function' ? getComputedStyle(d) : null;\n const extra = cs\n ? ['paddingTop', 'paddingBottom', 'borderTopWidth', 'borderBottomWidth'].reduce((n, k) => n + (parseFloat((cs as any)[k]) || 0), 0)\n : 0;\n return (summary ? summary.getBoundingClientRect().height : 0) + extra;\n }\n\n async toggleItem(d: HTMLDetailsElement, open = !d.open || d.hasAttribute('data-closing')): Promise<void> {\n if (open && !this.flag('multiple')) this.items.forEach((o) => o !== d && o.open && this.toggleItem(o, false));\n this._running.get(d)?.cancel();\n this._running.delete(d);\n const duration = this.reduced ? 0 : this.num('duration', 300);\n const startH = d.getBoundingClientRect().height;\n if (open) {\n d.removeAttribute('data-closing');\n d.open = true;\n }\n this.emit('toggle', { details: d, open });\n if (!duration || typeof d.animate !== 'function') {\n if (!open) d.open = false;\n return;\n }\n const endH = open ? d.getBoundingClientRect().height : this.closedHeight(d);\n if (!open) d.setAttribute('data-closing', '');\n d.style.overflow = 'hidden';\n const a = d.animate([{ height: `${startH}px` }, { height: `${endH}px` }], { duration, easing: EASE_OUT });\n this._running.set(d, a);\n await a.finished.catch(() => undefined);\n if (this._running.get(d) !== a) return;\n this._running.delete(d);\n d.style.overflow = '';\n if (!open) {\n d.open = false;\n d.removeAttribute('data-closing');\n }\n }\n },\n { id: 'accordion', text: css }\n );\n}\n","import { defineElement, FLUENT_DECELERATE, type UsaElement } from '../base';\nimport css from './flip-list.css?raw';\n\n/**\n * `<usa-flip-list>` — animates its children to their new places whenever\n * they are added, removed or reordered (FLIP: transforms only). Works with\n * any rendering: plain DOM, React keyed lists, Vue `v-for`, Svelte `{#each}`.\n *\n * Attributes: `duration` (ms, 420), `easing`, `disabled`.\n * Method: `flip(mutate)` for explicit changes (also measures resizes).\n * Reduced motion: no animation.\n */\nexport interface UsaFlipListElement extends UsaElement {\n flip(mutate: () => void | Promise<void>): Promise<void>;\n}\n\nexport function defineFlipList(tag = 'usa-flip-list'): CustomElementConstructor | undefined {\n return defineElement(\n tag,\n (Base) =>\n class UsaFlipList extends Base {\n static get observedAttributes(): string[] {\n return [];\n }\n\n /** Child positions relative to the host, from the last layout we saw. */\n private _pos = new WeakMap<Element, { x: number; y: number }>();\n private _manual = false;\n\n private snapshot(): void {\n const host = this.getBoundingClientRect();\n for (const el of Array.from(this.children)) {\n const r = el.getBoundingClientRect();\n this._pos.set(el, { x: r.left - host.left, y: r.top - host.top });\n }\n }\n\n mount(): void {\n this.snapshot();\n if (typeof MutationObserver !== 'undefined') {\n const mo = new MutationObserver(() => {\n if (!this._manual) this.animateFrom(this._pos);\n });\n mo.observe(this, { childList: true });\n this.onCleanup(() => mo.disconnect());\n }\n if (typeof ResizeObserver !== 'undefined') {\n const ro = new ResizeObserver(() => this.snapshot());\n ro.observe(this);\n this.onCleanup(() => ro.disconnect());\n }\n }\n\n private animateFrom(prev: WeakMap<Element, { x: number; y: number }>): Promise<void> {\n const off = this.reduced || this.flag('disabled');\n const host = this.getBoundingClientRect();\n const kids = Array.from(this.children) as HTMLElement[];\n const now = kids.map((el) => {\n const r = el.getBoundingClientRect();\n return { x: r.left - host.left, y: r.top - host.top };\n });\n const anims: Promise<unknown>[] = [];\n const duration = this.num('duration', 420);\n const easing = this.str('easing', FLUENT_DECELERATE);\n kids.forEach((el, i) => {\n const before = prev.get(el);\n this._pos.set(el, now[i]);\n if (off || typeof el.animate !== 'function') return;\n if (!before) {\n anims.push(el.animate([{ opacity: 0, transform: 'scale(0.92)' }, { opacity: 1, transform: 'none' }], { duration, easing }).finished.catch(() => 0));\n return;\n }\n const dx = before.x - now[i].x;\n const dy = before.y - now[i].y;\n if (Math.abs(dx) < 0.5 && Math.abs(dy) < 0.5) return;\n anims.push(el.animate([{ transform: `translate(${dx}px, ${dy}px)` }, { transform: 'none' }], { duration, easing, composite: 'add' } as KeyframeAnimationOptions).finished.catch(() => 0));\n });\n return Promise.all(anims).then(() => undefined);\n }\n\n async flip(mutate: () => void | Promise<void>): Promise<void> {\n this.snapshot();\n const prev = this._pos;\n this._pos = new WeakMap();\n // Copy the snapshot so the observer does not overwrite it mid-mutation\n for (const el of Array.from(this.children)) {\n const p = prev.get(el);\n if (p) this._pos.set(el, p);\n }\n this._manual = true;\n try {\n await mutate();\n } finally {\n this._manual = false;\n }\n await this.animateFrom(prev);\n }\n },\n { id: 'flip-list', text: css }\n );\n}\n","import { defineElement, EASE_OUT, FLUENT_DECELERATE, type UsaElement } from '../base';\nimport css from './view-switch.css?raw';\n\n/**\n * `<usa-view-switch>` — shows one of its children at a time (tabs, wizard\n * steps, app pages) and animates between them. Children are views; name\n * them with `data-view`, or address them by index.\n *\n * Attributes: `active` (view name or index, default the first),\n * `effect` (`fade` | `slide` (default, direction-aware — Fluent \"page\n * transition\") | `scale` | `drill`), `duration` (ms, 320). Inactive views\n * get `hidden` + `inert`. Event: `usa:change` (`detail.view`,\n * `detail.index`). Reduced motion: a quick fade.\n */\nexport interface UsaViewSwitchElement extends UsaElement {\n active: string;\n readonly views: HTMLElement[];\n show(view: string | number): Promise<void>;\n}\n\nexport function defineViewSwitch(tag = 'usa-view-switch'): CustomElementConstructor | undefined {\n return defineElement(\n tag,\n (Base) =>\n class UsaViewSwitch extends Base {\n static get observedAttributes(): string[] {\n return ['active'];\n }\n\n private _index = -1;\n private _anims: Animation[] = [];\n\n get views(): HTMLElement[] {\n return Array.from(this.children) as HTMLElement[];\n }\n get active(): string {\n return this.str('active', '0');\n }\n set active(v: string) {\n this.setAttribute('active', String(v));\n }\n\n private indexOf(v: string | number): number {\n const views = this.views;\n const byName = views.findIndex((el) => el.dataset.view === String(v));\n if (byName >= 0) return byName;\n const n = Number(v);\n return Number.isInteger(n) && n >= 0 && n < views.length ? n : -1;\n }\n\n changed(): void {\n this.show(this.active);\n }\n\n mount(): void {\n const i = Math.max(0, this.indexOf(this.active));\n this._index = i;\n this.views.forEach((v, j) => this.setVisible(v, j === i));\n }\n\n private setVisible(v: HTMLElement, on: boolean): void {\n v.hidden = !on;\n v.toggleAttribute('inert', !on);\n v.toggleAttribute('data-active', on);\n }\n\n async show(view: string | number): Promise<void> {\n const next = this.indexOf(view);\n const prev = this._index;\n if (next < 0 || next === prev) return;\n const views = this.views;\n const from = views[prev];\n const to = views[next];\n this._index = next;\n const name = to.dataset.view ?? String(next);\n if (this.active !== name && this.active !== String(next)) this.setAttribute('active', name);\n this._anims.splice(0).forEach((a) => a.finish());\n this.setVisible(to, true);\n this.emit('change', { view: to, index: next, name });\n if (!from) return;\n const duration = this.num('duration', 320);\n const effect = this.reduced ? 'fade' : this.str('effect', 'slide');\n const dir = next > prev ? 1 : -1;\n let outF: Keyframe;\n let inF: Keyframe;\n switch (effect) {\n case 'fade':\n outF = { opacity: 0 };\n inF = { opacity: 0 };\n break;\n case 'scale':\n outF = { opacity: 0, transform: 'scale(0.96)' };\n inF = { opacity: 0, transform: 'scale(1.04)' };\n break;\n case 'drill':\n outF = { opacity: 0, transform: `scale(${dir > 0 ? 1.06 : 0.94})` };\n inF = { opacity: 0, transform: `scale(${dir > 0 ? 0.94 : 1.06})` };\n break;\n default:\n outF = { opacity: 0, transform: `translateX(${-dir * 32}px)` };\n inF = { opacity: 0, transform: `translateX(${dir * 48}px)` };\n }\n const neutral = (f: Keyframe): Keyframe => ('transform' in f ? { opacity: 1, transform: 'none' } : { opacity: 1 });\n // Outgoing view stays stacked in the same grid cell while it leaves\n from.setAttribute('data-leaving', '');\n const a = this.motion(from, [neutral(outF), outF], { duration: duration * 0.6, easing: EASE_OUT, fill: 'forwards' });\n const b = this.motion(to, [inF, neutral(inF)], { duration, delay: duration * 0.15, easing: FLUENT_DECELERATE, fill: 'backwards' });\n this._anims = [a, b].filter((x): x is Animation => !!x);\n await Promise.all(this._anims.map((x) => x.finished.catch(() => undefined)));\n from.removeAttribute('data-leaving');\n if (this._index !== prev) this.setVisible(from, false);\n a?.cancel();\n }\n },\n { id: 'view-switch', text: css }\n );\n}\n","import { prefersReducedMotion, EASE_OUT, FLUENT_DECELERATE } from '../base';\n\nexport interface ViewTransitionOptions {\n /**\n * Element to cross-fade when the View Transitions API is missing (default:\n * none — the update is applied without animation).\n */\n fallback?: HTMLElement | null;\n /** Fallback fade duration in ms (default 180 out + 220 in). */\n duration?: number;\n /** View transition types (`document.startViewTransition({ types })`, where supported). */\n types?: string[];\n}\n\n/**\n * Run `update()` (which changes the DOM) inside a view transition:\n * `document.startViewTransition()` where available (Chrome/Edge 111+, so\n * Electron, WebView2 and Tauri on Windows), otherwise a short cross-fade of\n * `options.fallback`. Instant under reduced motion. Resolves when finished.\n *\n * Give elements a `view-transition-name` in CSS for shared-element morphs.\n */\nexport async function viewTransition(update: () => void | Promise<void>, options: ViewTransitionOptions = {}): Promise<void> {\n const doc: any = typeof document !== 'undefined' ? document : null;\n if (!doc || prefersReducedMotion()) {\n await update();\n return;\n }\n if (typeof doc.startViewTransition === 'function') {\n let vt: any;\n try {\n vt = options.types ? doc.startViewTransition({ update, types: options.types }) : doc.startViewTransition(update);\n } catch {\n vt = doc.startViewTransition(update);\n }\n await vt.finished.catch(() => undefined);\n return;\n }\n const el = options.fallback;\n const d = options.duration ?? 200;\n if (!el || typeof el.animate !== 'function') {\n await update();\n return;\n }\n await el.animate([{ opacity: 1 }, { opacity: 0 }], { duration: d * 0.8, easing: 'ease-in', fill: 'forwards' }).finished.catch(() => undefined);\n await update();\n const a = el.animate([{ opacity: 0, transform: 'translateY(6px)' }, { opacity: 1, transform: 'none' }], { duration: d * 1.1, easing: EASE_OUT });\n // remove the forwards fill of the fade-out\n el.getAnimations?.().forEach((x) => x !== a && x.cancel());\n await a.finished.catch(() => undefined);\n}\n\nexport interface FlipOptions {\n duration?: number;\n easing?: string;\n /** Fade/scale in elements that did not exist before (default true). */\n animateEnter?: boolean;\n}\n\ntype Targets = Element | Iterable<Element> | ArrayLike<Element>;\nconst list = (t: Targets): HTMLElement[] =>\n (t instanceof Element ? Array.from(t.children) : Array.from(t as ArrayLike<Element>)) as HTMLElement[];\n\n/**\n * FLIP animation for layout changes (list reorder, filter, grid resize):\n * measures `targets` (an element's children, or a list), runs `mutate()`,\n * then animates each element from its old position to its new one with\n * transforms only. Elements added by `mutate()` fade in.\n *\n * ```js\n * await flip(list, () => list.append(...shuffled));\n * ```\n */\nexport async function flip(targets: Targets, mutate: () => void | Promise<void>, options: FlipOptions = {}): Promise<void> {\n const before = new Map(list(targets).map((el) => [el, el.getBoundingClientRect()]));\n await mutate();\n if (prefersReducedMotion()) return;\n const after = list(targets);\n const duration = options.duration ?? 420;\n const easing = options.easing ?? FLUENT_DECELERATE;\n const anims: Animation[] = [];\n // Read all, then write all\n const rects = after.map((el) => el.getBoundingClientRect());\n after.forEach((el, i) => {\n if (typeof el.animate !== 'function') return;\n const first = before.get(el);\n const last = rects[i];\n if (!first) {\n if (options.animateEnter !== false) anims.push(el.animate([{ opacity: 0, transform: 'scale(0.9)' }, { opacity: 1, transform: 'none' }], { duration, easing }));\n return;\n }\n const dx = first.left - last.left;\n const dy = first.top - last.top;\n const sx = last.width ? first.width / last.width : 1;\n const sy = last.height ? first.height / last.height : 1;\n if (Math.abs(dx) < 0.5 && Math.abs(dy) < 0.5 && Math.abs(sx - 1) < 0.01 && Math.abs(sy - 1) < 0.01) return;\n anims.push(\n el.animate(\n [{ transformOrigin: '0 0', transform: `translate(${dx}px, ${dy}px) scale(${sx}, ${sy})` }, { transformOrigin: '0 0', transform: 'none' }],\n { duration, easing }\n )\n );\n });\n await Promise.all(anims.map((a) => a.finished.catch(() => undefined)));\n}\n\nexport interface ConnectedOptions {\n duration?: number;\n easing?: string;\n /** Hide `from` while the animation runs (default true). */\n hideSource?: boolean;\n}\n\n/**\n * Connected (shared-element) animation, like WinUI's\n * `ConnectedAnimationService`: `to` flies from the position and size of\n * `from` into its own place (e.g. a thumbnail opening into a detail view).\n * Call it right after `to` is shown. Transforms only.\n */\nexport async function connectedAnimation(from: Element, to: HTMLElement, options: ConnectedOptions = {}): Promise<void> {\n if (prefersReducedMotion() || typeof to.animate !== 'function') return;\n const a = from.getBoundingClientRect();\n const b = to.getBoundingClientRect();\n if (!b.width || !b.height) return;\n const hide = options.hideSource !== false && from instanceof HTMLElement;\n const prev = hide ? (from as HTMLElement).style.visibility : '';\n if (hide) (from as HTMLElement).style.visibility = 'hidden';\n const anim = to.animate(\n [\n { transformOrigin: '0 0', transform: `translate(${a.left - b.left}px, ${a.top - b.top}px) scale(${a.width / b.width}, ${a.height / b.height})` },\n { transformOrigin: '0 0', transform: 'none' },\n ],\n { duration: options.duration ?? 480, easing: options.easing ?? FLUENT_DECELERATE }\n );\n await anim.finished.catch(() => undefined);\n if (hide) (from as HTMLElement).style.visibility = prev;\n}\n","/**\n * use-scroll-animate/components/transitions — view & layout transitions.\n * `<usa-dialog>`, `<usa-accordion>`, `<usa-flip-list>`, `<usa-view-switch>`\n * and the `viewTransition()`, `flip()`, `connectedAnimation()` helpers.\n */\nimport { defineDialog, type UsaDialogElement } from './dialog';\nimport { defineAccordion, type UsaAccordionElement } from './accordion';\nimport { defineFlipList, type UsaFlipListElement } from './flip-list';\nimport { defineViewSwitch, type UsaViewSwitchElement } from './view-switch';\n\nexport { defineDialog, defineAccordion, defineFlipList, defineViewSwitch };\nexport { viewTransition, flip, connectedAnimation } from './helpers';\nexport type { ViewTransitionOptions, FlipOptions, ConnectedOptions } from './helpers';\nexport type { DialogVariant } from './dialog';\nexport type { UsaDialogElement, UsaAccordionElement, UsaFlipListElement, UsaViewSwitchElement };\nexport { configureComponents, prefersReducedMotion } from '../base';\nexport type { ComponentsConfig, UsaElement } from '../base';\n\n/** Register every component of this category under its default tag. */\nexport function defineTransitionComponents(): void {\n defineDialog();\n defineAccordion();\n defineFlipList();\n defineViewSwitch();\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'usa-dialog': UsaDialogElement;\n 'usa-accordion': UsaAccordionElement;\n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;AACd,IAAA,eAAe,EAAE;AACjB,IAAA,cAAc,EAAE;AAChB,IAAA,gBAAgB,EAAE;AACpB;;;;"}
|
package/dist/components/ui.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var base = require('../chunks/base-
|
|
4
|
-
var spring = require('../chunks/spring-
|
|
5
|
-
var variants = require('../chunks/variants-
|
|
3
|
+
var base = require('../chunks/base-CXx7jZ-o.cjs');
|
|
4
|
+
var spring = require('../chunks/spring-2OTnYCzm.cjs');
|
|
5
|
+
var variants = require('../chunks/variants-BNIrn4ch.cjs');
|
|
6
6
|
|
|
7
7
|
/** Position a fixed `floating` element next to `anchor`, flipping when it would leave the viewport. */
|
|
8
8
|
function place(floating, anchor, placement = 'top', gap = 8) {
|
package/dist/components/ui.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { f as defineElement, h as clamp, d as caf, r as raf } from '../chunks/base-
|
|
2
|
-
export { a as configureComponents, p as prefersReducedMotion } from '../chunks/base-
|
|
3
|
-
import { d as springEasing, c as createSpring, p as projectInertia, s as snapTo, a as rubberBand } from '../chunks/spring-
|
|
4
|
-
import { a as adoptVariants } from '../chunks/variants-
|
|
5
|
-
export { V as VARIANTS, s as setVariant } from '../chunks/variants-
|
|
1
|
+
import { f as defineElement, h as clamp, d as caf, r as raf } from '../chunks/base-Co98Z2iM.js';
|
|
2
|
+
export { a as configureComponents, p as prefersReducedMotion } from '../chunks/base-Co98Z2iM.js';
|
|
3
|
+
import { d as springEasing, c as createSpring, p as projectInertia, s as snapTo, a as rubberBand } from '../chunks/spring-YNUpez2g.js';
|
|
4
|
+
import { a as adoptVariants } from '../chunks/variants-Dp_5lJ_J.js';
|
|
5
|
+
export { V as VARIANTS, s as setVariant } from '../chunks/variants-Dp_5lJ_J.js';
|
|
6
6
|
|
|
7
7
|
/** Position a fixed `floating` element next to `anchor`, flipping when it would leave the viewport. */
|
|
8
8
|
function place(floating, anchor, placement = 'top', gap = 8) {
|
package/dist/components/vue.cjs
CHANGED
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
var components = require('../components.cjs');
|
|
4
4
|
require('./reveal.cjs');
|
|
5
|
-
require('../chunks/base-
|
|
5
|
+
require('../chunks/base-CXx7jZ-o.cjs');
|
|
6
6
|
require('./text.cjs');
|
|
7
7
|
require('./interaction.cjs');
|
|
8
8
|
require('./feedback.cjs');
|
|
9
9
|
require('./background.cjs');
|
|
10
|
-
require('../chunks/variants-
|
|
10
|
+
require('../chunks/variants-BNIrn4ch.cjs');
|
|
11
11
|
require('./transitions.cjs');
|
|
12
12
|
require('./physics.cjs');
|
|
13
|
-
require('../chunks/spring-
|
|
13
|
+
require('../chunks/spring-2OTnYCzm.cjs');
|
|
14
14
|
require('./cards.cjs');
|
|
15
15
|
require('./click.cjs');
|
|
16
16
|
require('./ui.cjs');
|
|
@@ -353,7 +353,7 @@ type SpinnerVariant = (typeof SPINNER_VARIANTS)[number];
|
|
|
353
353
|
* `<usa-spinner>` — indeterminate loading indicators, pure CSS animations
|
|
354
354
|
* of `transform` / `opacity` (plus an SVG stroke for `fluent`).
|
|
355
355
|
*
|
|
356
|
-
* Kinds (`kind
|
|
356
|
+
* Kinds (`kind`): `fluent` (default — the WinUI / Windows 11
|
|
357
357
|
* ProgressRing arc), `windows` (the Windows 10 boot "orbiting dots"),
|
|
358
358
|
* `ring` (classic border spinner), `dots` (three bouncing dots / typing
|
|
359
359
|
* indicator), `pulse` (expanding ripple), `bars` (equalizer).
|
|
@@ -365,8 +365,6 @@ type SpinnerVariant = (typeof SPINNER_VARIANTS)[number];
|
|
|
365
365
|
interface UsaSpinnerElement extends UsaElement {
|
|
366
366
|
/** Spinner kind (`kind` attribute). */
|
|
367
367
|
kind: SpinnerVariant;
|
|
368
|
-
/** @deprecated alias of `kind`, removed in 3.0. */
|
|
369
|
-
variant: SpinnerVariant;
|
|
370
368
|
}
|
|
371
369
|
|
|
372
370
|
/**
|
|
@@ -439,7 +437,7 @@ interface UsaToasterElement extends UsaElement {
|
|
|
439
437
|
* `<usa-check>` — an animated result icon: the circle draws itself, then the
|
|
440
438
|
* check mark (or cross / exclamation) strokes in with a little pop.
|
|
441
439
|
*
|
|
442
|
-
* Attributes: `
|
|
440
|
+
* Attributes: `kind` (`success` default, `error`, `warning`), `size`
|
|
443
441
|
* (px, 56), `start` (`view` default | `load` | `manual`), `label`
|
|
444
442
|
* (accessible name, e.g. "Payment complete"; the icon is decorative
|
|
445
443
|
* without it). Event: `usa:complete`. Reduced motion: drawn instantly.
|
|
@@ -527,7 +525,7 @@ interface UsaMarqueeElement extends UsaElement {
|
|
|
527
525
|
* tints from `--usa-mica-source`, a gradient you control). Optional
|
|
528
526
|
* `shimmer` adds a light sweep when it appears or on hover.
|
|
529
527
|
*
|
|
530
|
-
* Attributes: `kind` (`acrylic` default | `mica
|
|
528
|
+
* Attributes: `kind` (`acrylic` default | `mica`), `tint` (colour),
|
|
531
529
|
* `tint-opacity` (0–1, 0.55), `blur` (px, 30), `shimmer`
|
|
532
530
|
* (`hover` | `load` | `none`, default `none`). Falls back to a solid tint
|
|
533
531
|
* without `backdrop-filter` and under `prefers-reduced-transparency` or
|
|
@@ -594,7 +592,7 @@ declare global {
|
|
|
594
592
|
* React / Vue / Svelte keep owning them). Style with `::part(panel)`,
|
|
595
593
|
* `::part(backdrop)` and the `--usa-dialog-*` custom properties.
|
|
596
594
|
*
|
|
597
|
-
* Attributes: `open` (reflects; set/remove to open/close), `
|
|
595
|
+
* Attributes: `open` (reflects; set/remove to open/close), `kind`
|
|
598
596
|
* (`modal` default — Fluent scale + fade; `drawer-start` / `drawer-end`
|
|
599
597
|
* slide from the side, `drawer-bottom` / `sheet` from below), `label`
|
|
600
598
|
* (accessible name), `no-backdrop-close`, `no-esc`. Elements inside
|
package/dist/components/vue.d.ts
CHANGED
|
@@ -353,7 +353,7 @@ type SpinnerVariant = (typeof SPINNER_VARIANTS)[number];
|
|
|
353
353
|
* `<usa-spinner>` — indeterminate loading indicators, pure CSS animations
|
|
354
354
|
* of `transform` / `opacity` (plus an SVG stroke for `fluent`).
|
|
355
355
|
*
|
|
356
|
-
* Kinds (`kind
|
|
356
|
+
* Kinds (`kind`): `fluent` (default — the WinUI / Windows 11
|
|
357
357
|
* ProgressRing arc), `windows` (the Windows 10 boot "orbiting dots"),
|
|
358
358
|
* `ring` (classic border spinner), `dots` (three bouncing dots / typing
|
|
359
359
|
* indicator), `pulse` (expanding ripple), `bars` (equalizer).
|
|
@@ -365,8 +365,6 @@ type SpinnerVariant = (typeof SPINNER_VARIANTS)[number];
|
|
|
365
365
|
interface UsaSpinnerElement extends UsaElement {
|
|
366
366
|
/** Spinner kind (`kind` attribute). */
|
|
367
367
|
kind: SpinnerVariant;
|
|
368
|
-
/** @deprecated alias of `kind`, removed in 3.0. */
|
|
369
|
-
variant: SpinnerVariant;
|
|
370
368
|
}
|
|
371
369
|
|
|
372
370
|
/**
|
|
@@ -439,7 +437,7 @@ interface UsaToasterElement extends UsaElement {
|
|
|
439
437
|
* `<usa-check>` — an animated result icon: the circle draws itself, then the
|
|
440
438
|
* check mark (or cross / exclamation) strokes in with a little pop.
|
|
441
439
|
*
|
|
442
|
-
* Attributes: `
|
|
440
|
+
* Attributes: `kind` (`success` default, `error`, `warning`), `size`
|
|
443
441
|
* (px, 56), `start` (`view` default | `load` | `manual`), `label`
|
|
444
442
|
* (accessible name, e.g. "Payment complete"; the icon is decorative
|
|
445
443
|
* without it). Event: `usa:complete`. Reduced motion: drawn instantly.
|
|
@@ -527,7 +525,7 @@ interface UsaMarqueeElement extends UsaElement {
|
|
|
527
525
|
* tints from `--usa-mica-source`, a gradient you control). Optional
|
|
528
526
|
* `shimmer` adds a light sweep when it appears or on hover.
|
|
529
527
|
*
|
|
530
|
-
* Attributes: `kind` (`acrylic` default | `mica
|
|
528
|
+
* Attributes: `kind` (`acrylic` default | `mica`), `tint` (colour),
|
|
531
529
|
* `tint-opacity` (0–1, 0.55), `blur` (px, 30), `shimmer`
|
|
532
530
|
* (`hover` | `load` | `none`, default `none`). Falls back to a solid tint
|
|
533
531
|
* without `backdrop-filter` and under `prefers-reduced-transparency` or
|
|
@@ -594,7 +592,7 @@ declare global {
|
|
|
594
592
|
* React / Vue / Svelte keep owning them). Style with `::part(panel)`,
|
|
595
593
|
* `::part(backdrop)` and the `--usa-dialog-*` custom properties.
|
|
596
594
|
*
|
|
597
|
-
* Attributes: `open` (reflects; set/remove to open/close), `
|
|
595
|
+
* Attributes: `open` (reflects; set/remove to open/close), `kind`
|
|
598
596
|
* (`modal` default — Fluent scale + fade; `drawer-start` / `drawer-end`
|
|
599
597
|
* slide from the side, `drawer-bottom` / `sheet` from below), `label`
|
|
600
598
|
* (accessible name), `no-backdrop-close`, `no-esc`. Elements inside
|
package/dist/components/vue.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { defineComponents } from '../components.js';
|
|
2
2
|
import './reveal.js';
|
|
3
|
-
import '../chunks/base-
|
|
3
|
+
import '../chunks/base-Co98Z2iM.js';
|
|
4
4
|
import './text.js';
|
|
5
5
|
import './interaction.js';
|
|
6
6
|
import './feedback.js';
|
|
7
7
|
import './background.js';
|
|
8
|
-
import '../chunks/variants-
|
|
8
|
+
import '../chunks/variants-Dp_5lJ_J.js';
|
|
9
9
|
import './transitions.js';
|
|
10
10
|
import './physics.js';
|
|
11
|
-
import '../chunks/spring-
|
|
11
|
+
import '../chunks/spring-YNUpez2g.js';
|
|
12
12
|
import './cards.js';
|
|
13
13
|
import './click.js';
|
|
14
14
|
import './ui.js';
|
package/dist/components.cjs
CHANGED
|
@@ -11,10 +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 variants = require('./chunks/variants-
|
|
15
|
-
var base = require('./chunks/base-
|
|
14
|
+
var variants = require('./chunks/variants-BNIrn4ch.cjs');
|
|
15
|
+
var base = require('./chunks/base-CXx7jZ-o.cjs');
|
|
16
16
|
var indexTags = require('./chunks/index-tags-BEM98giN.cjs');
|
|
17
|
-
var spring = require('./chunks/spring-
|
|
17
|
+
var spring = require('./chunks/spring-2OTnYCzm.cjs');
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
20
|
* use-scroll-animate/components
|
package/dist/components.css
CHANGED
|
@@ -15,12 +15,12 @@ usa-ripple{position:relative;display:inline-block;overflow:hidden;isolation:isol
|
|
|
15
15
|
usa-spotlight{display:block;--usa-spot-size:160px;--usa-spot-color:rgb(255 255 255 / 0.55);--usa-spot-border:1px}usa-spotlight .usa-spotlight-item{position:relative;isolation:isolate}usa-spotlight .usa-spotlight-item::before,usa-spotlight .usa-spotlight-item::after{content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;opacity:0;transition:opacity 0.25s ease}usa-spotlight .usa-spotlight-item::before{padding:var(--usa-spot-border);background:radial-gradient(var(--usa-spot-size) circle at var(--usa-spot-x,-999px) var(--usa-spot-y,-999px),var(--usa-spot-color),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-spotlight .usa-spotlight-item::after{z-index:-1;background:radial-gradient(calc(var(--usa-spot-size) * 0.9) circle at var(--usa-spot-x,-999px) var(--usa-spot-y,-999px),color-mix(in srgb,var(--usa-spot-color) 30%,transparent),transparent 70%)}usa-spotlight[data-lit] .usa-spotlight-item::before{opacity:1}usa-spotlight[data-lit] .usa-spotlight-item:hover::after{opacity:1}usa-spotlight[no-fill] .usa-spotlight-item::after{display:none}
|
|
16
16
|
usa-tilt{display:block;position:relative;transform-style:preserve-3d;transition:transform 0.5s cubic-bezier(0.22,1,0.36,1);will-change:transform}usa-tilt[data-active]{transition-duration:0.12s}usa-tilt .usa-tilt-glare{position:absolute;inset:0;border-radius:inherit;pointer-events:none;opacity:0;transition:opacity 0.3s ease;background:radial-gradient(circle at var(--usa-glare-x,50%) var(--usa-glare-y,50%),rgb(255 255 255 / 0.35),transparent 55%);mix-blend-mode:soft-light}usa-tilt[data-active] .usa-tilt-glare{opacity:1}
|
|
17
17
|
usa-toggle{--usa-toggle-w:40px;--usa-toggle-h:20px;--usa-toggle-on:var(--usa-accent,#7c5cff);--usa-toggle-off:transparent;--usa-toggle-line:currentColor;display:inline-flex;align-items:center;gap:0.6em;cursor:pointer;user-select:none;-webkit-tap-highlight-color:transparent;vertical-align:middle}usa-toggle[disabled]{cursor:not-allowed;opacity:0.45}usa-toggle .usa-toggle-track{position:relative;flex:none;width:var(--usa-toggle-w);height:var(--usa-toggle-h);border-radius:999px;box-sizing:border-box;border:1px solid color-mix(in srgb,var(--usa-toggle-line) 60%,transparent);background:var(--usa-toggle-off);transition:background-color 0.2s ease,border-color 0.2s ease}usa-toggle .usa-toggle-knob{position:absolute;top:50%;left:3px;width:calc(var(--usa-toggle-h) - 8px);height:calc(var(--usa-toggle-h) - 8px);margin-top:calc((var(--usa-toggle-h) - 8px) / -2);border-radius:999px;background:color-mix(in srgb,var(--usa-toggle-line) 75%,transparent);transform-origin:left center;transition:transform 0.28s cubic-bezier(0.34,1.4,0.64,1),background-color 0.2s ease}usa-toggle:hover .usa-toggle-knob{transform:scale(1.15)}usa-toggle[data-pressed] .usa-toggle-knob{transform:scaleX(1.45)}usa-toggle[checked] .usa-toggle-track{background:var(--usa-toggle-on);border-color:var(--usa-toggle-on)}usa-toggle[checked] .usa-toggle-knob{background:#fff;transform:translateX(calc(var(--usa-toggle-w) - var(--usa-toggle-h)));transform-origin:right center}usa-toggle[checked]:hover .usa-toggle-knob{transform:translateX(calc(var(--usa-toggle-w) - var(--usa-toggle-h))) scale(1.15)}usa-toggle[checked][data-pressed] .usa-toggle-knob{transform:translateX(calc(var(--usa-toggle-w) - var(--usa-toggle-h) - 4px)) scaleX(1.45)}usa-toggle:focus-visible{outline:none}usa-toggle:focus-visible .usa-toggle-track{outline:2px solid var(--usa-toggle-on);outline-offset:2px}
|
|
18
|
-
usa-check{--usa-check-size:56px;--usa-check-color:#0f9d58;display:inline-block;width:var(--usa-check-size);height:var(--usa-check-size);vertical-align:middle}usa-check[data-
|
|
18
|
+
usa-check{--usa-check-size:56px;--usa-check-color:#0f9d58;display:inline-block;width:var(--usa-check-size);height:var(--usa-check-size);vertical-align:middle}usa-check[data-kind="error"]{--usa-check-color:#d13438}usa-check[data-kind="warning"]{--usa-check-color:#c19c00}usa-check svg{width:100%;height:100%;overflow:visible}usa-check circle,usa-check path{fill:none;stroke:var(--usa-check-color);stroke-width:3.5;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:1 1}usa-check[data-state="idle"] circle,usa-check[data-state="idle"] path{stroke-dashoffset:1}usa-check[data-state="done"] circle,usa-check[data-state="done"] path{stroke-dashoffset:0}
|
|
19
19
|
usa-progress{--usa-progress-color:var(--usa-accent,#7c5cff);--usa-progress-track:color-mix(in srgb,currentColor 14%,transparent);position:relative;display:block;height:var(--usa-progress-height,4px);border-radius:999px;overflow:hidden;background:var(--usa-progress-track);contain:paint}usa-progress .usa-progress-bar{position:absolute;inset:0;border-radius:inherit;background:var(--usa-progress-color);transform:scaleX(0);transform-origin:0 50%;transition:transform 0.45s cubic-bezier(0.22,1,0.36,1)}usa-progress .usa-progress-bar2{display:none}usa-progress[data-indeterminate] .usa-progress-bar{right:auto;width:40%;transform:translateX(-100%);transition:none;animation:usa-indet 2s cubic-bezier(0.4,0,0.6,1) infinite}usa-progress[data-indeterminate] .usa-progress-bar2{display:block;width:60%;animation:usa-indet2 2s cubic-bezier(0.4,0,0.6,1) 1s infinite}usa-progress[state="paused"]{--usa-progress-color:#c19c00}usa-progress[state="error"]{--usa-progress-color:#d13438}usa-progress[state="paused"] .usa-progress-bar,usa-progress[state="error"] .usa-progress-bar{animation-play-state:paused}@keyframes usa-indet{from{transform:translateX(-100%)}to{transform:translateX(250%)}}@keyframes usa-indet2{from{transform:translateX(-100%)}to{transform:translateX(167%)}}@media (prefers-reduced-motion:reduce){usa-progress .usa-progress-bar{transition:none}usa-progress[data-indeterminate] .usa-progress-bar{width:100%;transform:none;animation:usa-calm-bar 2.4s ease-in-out infinite}usa-progress[data-indeterminate] .usa-progress-bar2{display:none}}@keyframes usa-calm-bar{0%,100%{opacity:1}50%{opacity:0.4}}
|
|
20
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}}
|
|
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-
|
|
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-kind="windows"] i{inset:0;opacity:0;animation:usa-orbit 5.5s infinite}usa-spinner[data-kind="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-kind="windows"] i:nth-child(2){animation-delay:240ms;--n:1}usa-spinner[data-kind="windows"] i:nth-child(3){animation-delay:480ms;--n:2}usa-spinner[data-kind="windows"] i:nth-child(4){animation-delay:720ms;--n:3}usa-spinner[data-kind="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-kind="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-kind="dots"]{display:inline-flex;align-items:center;justify-content:space-between;height:calc(var(--usa-spinner-size) / 2.5)}usa-spinner[data-kind="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-kind="dots"] i:nth-child(2){animation-delay:0.15s}usa-spinner[data-kind="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-kind="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-kind="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-kind="bars"]{display:inline-flex;align-items:center;justify-content:space-between}usa-spinner[data-kind="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-kind="bars"] i:nth-child(2){animation-delay:0.12s}usa-spinner[data-kind="bars"] i:nth-child(3){animation-delay:0.24s}usa-spinner[data-kind="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-kind="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}}
|
|
22
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}
|
|
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
|
|
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[kind="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}}
|
|
24
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
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
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}}
|
package/dist/components.d.cts
CHANGED
|
@@ -425,7 +425,7 @@ type SpinnerVariant = (typeof SPINNER_VARIANTS)[number];
|
|
|
425
425
|
* `<usa-spinner>` — indeterminate loading indicators, pure CSS animations
|
|
426
426
|
* of `transform` / `opacity` (plus an SVG stroke for `fluent`).
|
|
427
427
|
*
|
|
428
|
-
* Kinds (`kind
|
|
428
|
+
* Kinds (`kind`): `fluent` (default — the WinUI / Windows 11
|
|
429
429
|
* ProgressRing arc), `windows` (the Windows 10 boot "orbiting dots"),
|
|
430
430
|
* `ring` (classic border spinner), `dots` (three bouncing dots / typing
|
|
431
431
|
* indicator), `pulse` (expanding ripple), `bars` (equalizer).
|
|
@@ -437,8 +437,6 @@ type SpinnerVariant = (typeof SPINNER_VARIANTS)[number];
|
|
|
437
437
|
interface UsaSpinnerElement extends UsaElement {
|
|
438
438
|
/** Spinner kind (`kind` attribute). */
|
|
439
439
|
kind: SpinnerVariant;
|
|
440
|
-
/** @deprecated alias of `kind`, removed in 3.0. */
|
|
441
|
-
variant: SpinnerVariant;
|
|
442
440
|
}
|
|
443
441
|
declare function defineSpinner(tag?: string): CustomElementConstructor | undefined;
|
|
444
442
|
|
|
@@ -524,7 +522,7 @@ declare function toast(message: string, options?: ToastOptions): ToastHandle | n
|
|
|
524
522
|
* `<usa-check>` — an animated result icon: the circle draws itself, then the
|
|
525
523
|
* check mark (or cross / exclamation) strokes in with a little pop.
|
|
526
524
|
*
|
|
527
|
-
* Attributes: `
|
|
525
|
+
* Attributes: `kind` (`success` default, `error`, `warning`), `size`
|
|
528
526
|
* (px, 56), `start` (`view` default | `load` | `manual`), `label`
|
|
529
527
|
* (accessible name, e.g. "Payment complete"; the icon is decorative
|
|
530
528
|
* without it). Event: `usa:complete`. Reduced motion: drawn instantly.
|
|
@@ -619,7 +617,7 @@ declare function defineMarquee(tag?: string): CustomElementConstructor | undefin
|
|
|
619
617
|
* tints from `--usa-mica-source`, a gradient you control). Optional
|
|
620
618
|
* `shimmer` adds a light sweep when it appears or on hover.
|
|
621
619
|
*
|
|
622
|
-
* Attributes: `kind` (`acrylic` default | `mica
|
|
620
|
+
* Attributes: `kind` (`acrylic` default | `mica`), `tint` (colour),
|
|
623
621
|
* `tint-opacity` (0–1, 0.55), `blur` (px, 30), `shimmer`
|
|
624
622
|
* (`hover` | `load` | `none`, default `none`). Falls back to a solid tint
|
|
625
623
|
* without `backdrop-filter` and under `prefers-reduced-transparency` or
|
|
@@ -715,7 +713,7 @@ type DialogVariant = 'modal' | 'drawer-start' | 'drawer-end' | 'drawer-bottom' |
|
|
|
715
713
|
* React / Vue / Svelte keep owning them). Style with `::part(panel)`,
|
|
716
714
|
* `::part(backdrop)` and the `--usa-dialog-*` custom properties.
|
|
717
715
|
*
|
|
718
|
-
* Attributes: `open` (reflects; set/remove to open/close), `
|
|
716
|
+
* Attributes: `open` (reflects; set/remove to open/close), `kind`
|
|
719
717
|
* (`modal` default — Fluent scale + fade; `drawer-start` / `drawer-end`
|
|
720
718
|
* slide from the side, `drawer-bottom` / `sheet` from below), `label`
|
|
721
719
|
* (accessible name), `no-backdrop-close`, `no-esc`. Elements inside
|
package/dist/components.d.ts
CHANGED
|
@@ -425,7 +425,7 @@ type SpinnerVariant = (typeof SPINNER_VARIANTS)[number];
|
|
|
425
425
|
* `<usa-spinner>` — indeterminate loading indicators, pure CSS animations
|
|
426
426
|
* of `transform` / `opacity` (plus an SVG stroke for `fluent`).
|
|
427
427
|
*
|
|
428
|
-
* Kinds (`kind
|
|
428
|
+
* Kinds (`kind`): `fluent` (default — the WinUI / Windows 11
|
|
429
429
|
* ProgressRing arc), `windows` (the Windows 10 boot "orbiting dots"),
|
|
430
430
|
* `ring` (classic border spinner), `dots` (three bouncing dots / typing
|
|
431
431
|
* indicator), `pulse` (expanding ripple), `bars` (equalizer).
|
|
@@ -437,8 +437,6 @@ type SpinnerVariant = (typeof SPINNER_VARIANTS)[number];
|
|
|
437
437
|
interface UsaSpinnerElement extends UsaElement {
|
|
438
438
|
/** Spinner kind (`kind` attribute). */
|
|
439
439
|
kind: SpinnerVariant;
|
|
440
|
-
/** @deprecated alias of `kind`, removed in 3.0. */
|
|
441
|
-
variant: SpinnerVariant;
|
|
442
440
|
}
|
|
443
441
|
declare function defineSpinner(tag?: string): CustomElementConstructor | undefined;
|
|
444
442
|
|
|
@@ -524,7 +522,7 @@ declare function toast(message: string, options?: ToastOptions): ToastHandle | n
|
|
|
524
522
|
* `<usa-check>` — an animated result icon: the circle draws itself, then the
|
|
525
523
|
* check mark (or cross / exclamation) strokes in with a little pop.
|
|
526
524
|
*
|
|
527
|
-
* Attributes: `
|
|
525
|
+
* Attributes: `kind` (`success` default, `error`, `warning`), `size`
|
|
528
526
|
* (px, 56), `start` (`view` default | `load` | `manual`), `label`
|
|
529
527
|
* (accessible name, e.g. "Payment complete"; the icon is decorative
|
|
530
528
|
* without it). Event: `usa:complete`. Reduced motion: drawn instantly.
|
|
@@ -619,7 +617,7 @@ declare function defineMarquee(tag?: string): CustomElementConstructor | undefin
|
|
|
619
617
|
* tints from `--usa-mica-source`, a gradient you control). Optional
|
|
620
618
|
* `shimmer` adds a light sweep when it appears or on hover.
|
|
621
619
|
*
|
|
622
|
-
* Attributes: `kind` (`acrylic` default | `mica
|
|
620
|
+
* Attributes: `kind` (`acrylic` default | `mica`), `tint` (colour),
|
|
623
621
|
* `tint-opacity` (0–1, 0.55), `blur` (px, 30), `shimmer`
|
|
624
622
|
* (`hover` | `load` | `none`, default `none`). Falls back to a solid tint
|
|
625
623
|
* without `backdrop-filter` and under `prefers-reduced-transparency` or
|
|
@@ -715,7 +713,7 @@ type DialogVariant = 'modal' | 'drawer-start' | 'drawer-end' | 'drawer-bottom' |
|
|
|
715
713
|
* React / Vue / Svelte keep owning them). Style with `::part(panel)`,
|
|
716
714
|
* `::part(backdrop)` and the `--usa-dialog-*` custom properties.
|
|
717
715
|
*
|
|
718
|
-
* Attributes: `open` (reflects; set/remove to open/close), `
|
|
716
|
+
* Attributes: `open` (reflects; set/remove to open/close), `kind`
|
|
719
717
|
* (`modal` default — Fluent scale + fade; `drawer-start` / `drawer-end`
|
|
720
718
|
* slide from the side, `drawer-bottom` / `sheet` from below), `label`
|
|
721
719
|
* (accessible name), `no-backdrop-close`, `no-esc`. Elements inside
|
package/dist/components.js
CHANGED
|
@@ -20,12 +20,12 @@ import { defineUiComponents } from './components/ui.js';
|
|
|
20
20
|
export { defineAvatarStack, defineBadge, defineBottomSheet, defineDrawer, defineFab, defineNavbar, definePopover, definePullRefresh, defineRating, defineSlider, defineTabs, defineTooltip } from './components/ui.js';
|
|
21
21
|
import { definePageComponents } from './components/page.js';
|
|
22
22
|
export { AMBIENT_EFFECTS, CURSOR_MODES, PAGE_EFFECTS, defineAmbient, defineAutoSkeleton, defineBackToTop, defineCursor, defineFullpage, defineLoadingBar, defineMotionSwitch, defineSplash, enableMpaTransitions, loadingBar, pageTransition, restoreMotionIntensity, scrollToTarget, setMotionIntensity, smoothScroll, supportsViewTransitions, themeTransition } from './components/page.js';
|
|
23
|
-
import { a as adoptVariants } from './chunks/variants-
|
|
24
|
-
export { V as VARIANTS, s as setVariant } from './chunks/variants-
|
|
25
|
-
import { c as canDefine } from './chunks/base-
|
|
26
|
-
export { M as MOTION_SCALE, a as configureComponents, g as getMotionIntensity, p as prefersReducedMotion } from './chunks/base-
|
|
23
|
+
import { a as adoptVariants } from './chunks/variants-Dp_5lJ_J.js';
|
|
24
|
+
export { V as VARIANTS, s as setVariant } from './chunks/variants-Dp_5lJ_J.js';
|
|
25
|
+
import { c as canDefine } from './chunks/base-Co98Z2iM.js';
|
|
26
|
+
export { M as MOTION_SCALE, a as configureComponents, g as getMotionIntensity, p as prefersReducedMotion } from './chunks/base-Co98Z2iM.js';
|
|
27
27
|
export { C as COMPONENT_CATEGORIES } from './chunks/index-tags-f37txHmb.js';
|
|
28
|
-
export { S as SPRING_PRESETS, c as createSpring, l as linearEasing, p as projectInertia, r as resolveSpring, a as rubberBand, s as snapTo, b as spring, d as springEasing, e as springSamples, f as stepSpring, g as supportsLinearEasing } from './chunks/spring-
|
|
28
|
+
export { S as SPRING_PRESETS, c as createSpring, l as linearEasing, p as projectInertia, r as resolveSpring, a as rubberBand, s as snapTo, b as spring, d as springEasing, e as springSamples, f as stepSpring, g as supportsLinearEasing } from './chunks/spring-YNUpez2g.js';
|
|
29
29
|
|
|
30
30
|
/**
|
|
31
31
|
* use-scroll-animate/components
|