motionary 6.9.0 → 7.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 +16 -0
- package/README.md +2 -2
- package/README_ja.md +2 -2
- package/README_zh.md +2 -2
- package/dist/chunks/{base-D5MHqeDd.js → base-DchG4q_S.js} +2 -2
- package/dist/chunks/{base-D5MHqeDd.js.map → base-DchG4q_S.js.map} +1 -1
- package/dist/chunks/{core-ZGo4hOEk.js → core-D2vF8kZb.js} +2 -2
- package/dist/chunks/{core-ZGo4hOEk.js.map → core-D2vF8kZb.js.map} +1 -1
- package/dist/chunks/{core-DyJu5r5a.js → core-DVyTlo9Q.js} +2 -2
- package/dist/chunks/{core-DyJu5r5a.js.map → core-DVyTlo9Q.js.map} +1 -1
- package/dist/chunks/{fx-DlGRMJ-Z.js → fx-DUMVKSvg.js} +2 -2
- package/dist/chunks/{fx-DlGRMJ-Z.js.map → fx-DUMVKSvg.js.map} +1 -1
- package/dist/chunks/{gpu-DPhMkJq6.js → gpu-Bkw605Ds.js} +183 -11
- package/dist/chunks/gpu-Bkw605Ds.js.map +1 -0
- package/dist/chunks/{gpu-C2D4T9Q-.cjs → gpu-Dx0H875w.cjs} +185 -9
- package/dist/chunks/gpu-Dx0H875w.cjs.map +1 -0
- package/dist/chunks/{index-tags-wv0R_vkO.cjs → index-tags-BTMwrfgV.cjs} +3 -3
- package/dist/chunks/index-tags-BTMwrfgV.cjs.map +1 -0
- package/dist/chunks/{index-tags-DucKMQr_.js → index-tags-C04JP8g4.js} +3 -3
- package/dist/chunks/index-tags-C04JP8g4.js.map +1 -0
- package/dist/chunks/{player-DH3TIz-t.js → player-C-TwEEy6.js} +4 -4
- package/dist/chunks/{player-DH3TIz-t.js.map → player-C-TwEEy6.js.map} +1 -1
- package/dist/chunks/{registry-CTLWeg-J.js → registry-D23neB4M.js} +2 -2
- package/dist/chunks/{registry-CTLWeg-J.js.map → registry-D23neB4M.js.map} +1 -1
- package/dist/chunks/{spring-B-9MZOrW.js → spring-BhoT09Qb.js} +2 -2
- package/dist/chunks/{spring-B-9MZOrW.js.map → spring-BhoT09Qb.js.map} +1 -1
- package/dist/chunks/{variants-CoZn3k_5.js → variants-C_hv_s23.js} +2 -2
- package/dist/chunks/{variants-CoZn3k_5.js.map → variants-C_hv_s23.js.map} +1 -1
- package/dist/components/a11y.cjs +1 -1
- package/dist/components/a11y.d.cts +2 -2
- package/dist/components/a11y.d.ts +2 -2
- package/dist/components/a11y.js +3 -3
- package/dist/components/angular.cjs +2 -2
- package/dist/components/angular.cjs.map +1 -1
- package/dist/components/angular.d.cts +5 -36
- package/dist/components/angular.d.ts +5 -36
- package/dist/components/angular.js +9 -9
- package/dist/components/angular.js.map +1 -1
- package/dist/components/background.js +2 -2
- package/dist/components/bridge.js +1 -1
- package/dist/components/cards.js +2 -2
- package/dist/components/click.js +3 -3
- package/dist/components/depth.js +3 -3
- package/dist/components/effects.js +6 -6
- package/dist/components/feedback.js +1 -1
- package/dist/components/fx-3d.cjs +1 -7
- package/dist/components/fx-3d.cjs.map +1 -1
- package/dist/components/fx-3d.d.cts +1 -3
- package/dist/components/fx-3d.d.ts +1 -3
- package/dist/components/fx-3d.js +3 -8
- package/dist/components/fx-3d.js.map +1 -1
- package/dist/components/fx-focus.js +2 -2
- package/dist/components/fx-gpu.cjs +2 -3
- package/dist/components/fx-gpu.cjs.map +1 -1
- package/dist/components/fx-gpu.d.cts +1 -3
- package/dist/components/fx-gpu.d.ts +1 -3
- package/dist/components/fx-gpu.js +3 -3
- package/dist/components/fx-light.cjs +1 -7
- package/dist/components/fx-light.cjs.map +1 -1
- package/dist/components/fx-light.d.cts +1 -3
- package/dist/components/fx-light.d.ts +1 -3
- package/dist/components/fx-light.js +3 -8
- package/dist/components/fx-light.js.map +1 -1
- package/dist/components/fx-morph.cjs +1 -7
- package/dist/components/fx-morph.cjs.map +1 -1
- package/dist/components/fx-morph.d.cts +1 -3
- package/dist/components/fx-morph.d.ts +1 -3
- package/dist/components/fx-morph.js +3 -8
- package/dist/components/fx-morph.js.map +1 -1
- package/dist/components/fx-physics.cjs +1 -7
- package/dist/components/fx-physics.cjs.map +1 -1
- package/dist/components/fx-physics.d.cts +1 -3
- package/dist/components/fx-physics.d.ts +1 -3
- package/dist/components/fx-physics.js +3 -8
- package/dist/components/fx-physics.js.map +1 -1
- package/dist/components/fx-text.cjs +1 -7
- package/dist/components/fx-text.cjs.map +1 -1
- package/dist/components/fx-text.d.cts +1 -3
- package/dist/components/fx-text.d.ts +1 -3
- package/dist/components/fx-text.js +3 -8
- package/dist/components/fx-text.js.map +1 -1
- package/dist/components/fx-transitions.cjs +1 -7
- package/dist/components/fx-transitions.cjs.map +1 -1
- package/dist/components/fx-transitions.d.cts +1 -3
- package/dist/components/fx-transitions.d.ts +1 -3
- package/dist/components/fx-transitions.js +4 -9
- package/dist/components/fx-transitions.js.map +1 -1
- package/dist/components/fx-weather.cjs +1 -7
- package/dist/components/fx-weather.cjs.map +1 -1
- package/dist/components/fx-weather.d.cts +1 -3
- package/dist/components/fx-weather.d.ts +1 -3
- package/dist/components/fx-weather.js +3 -8
- package/dist/components/fx-weather.js.map +1 -1
- package/dist/components/fx.js +5 -5
- package/dist/components/fx2.cjs +7 -19
- package/dist/components/fx2.cjs.map +1 -1
- package/dist/components/fx2.d.cts +39 -22
- package/dist/components/fx2.d.ts +39 -22
- package/dist/components/fx2.js +11 -19
- package/dist/components/fx2.js.map +1 -1
- package/dist/components/gesture.js +4 -4
- package/dist/components/interaction.cjs +11 -95
- package/dist/components/interaction.cjs.map +1 -1
- package/dist/components/interaction.css +0 -1
- package/dist/components/interaction.d.cts +3 -21
- package/dist/components/interaction.d.ts +3 -21
- package/dist/components/interaction.js +13 -96
- package/dist/components/interaction.js.map +1 -1
- package/dist/components/jsx.d.cts +2 -2
- package/dist/components/jsx.d.ts +2 -2
- package/dist/components/layout.js +1 -1
- package/dist/components/lazy.cjs +1 -1
- package/dist/components/lazy.d.cts +2 -2
- package/dist/components/lazy.d.ts +2 -2
- package/dist/components/lazy.js +1 -1
- package/dist/components/lite.cjs +115 -258
- package/dist/components/lite.cjs.map +1 -1
- package/dist/components/lite.js +116 -257
- package/dist/components/lite.js.map +1 -1
- package/dist/components/marketplace.js +2 -2
- package/dist/components/packs.js +1 -1
- package/dist/components/page.js +3 -3
- package/dist/components/perf.cjs +1 -1
- package/dist/components/perf.d.cts +2 -2
- package/dist/components/perf.d.ts +2 -2
- package/dist/components/perf.js +3 -3
- package/dist/components/physics.js +3 -3
- package/dist/components/react.cjs +2 -2
- package/dist/components/react.cjs.map +1 -1
- package/dist/components/react.js +2 -2
- package/dist/components/react.js.map +1 -1
- package/dist/components/reveal.js +1 -1
- package/dist/components/solid.cjs +2 -2
- package/dist/components/solid.cjs.map +1 -1
- package/dist/components/solid.d.cts +4 -35
- package/dist/components/solid.d.ts +4 -35
- package/dist/components/solid.js +9 -9
- package/dist/components/solid.js.map +1 -1
- package/dist/components/svelte.cjs +2 -2
- package/dist/components/svelte.cjs.map +1 -1
- package/dist/components/svelte.d.cts +5 -36
- package/dist/components/svelte.d.ts +5 -36
- package/dist/components/svelte.js +9 -9
- package/dist/components/svelte.js.map +1 -1
- package/dist/components/svg.js +1 -1
- package/dist/components/text.js +2 -2
- package/dist/components/timeline.js +3 -3
- package/dist/components/transitions.js +1 -1
- package/dist/components/ui.cjs +16 -75
- package/dist/components/ui.cjs.map +1 -1
- package/dist/components/ui.css +0 -1
- package/dist/components/ui.d.cts +3 -18
- package/dist/components/ui.d.ts +3 -18
- package/dist/components/ui.js +21 -79
- package/dist/components/ui.js.map +1 -1
- package/dist/components/vue.cjs +2 -2
- package/dist/components/vue.cjs.map +1 -1
- package/dist/components/vue.d.cts +5 -36
- package/dist/components/vue.d.ts +5 -36
- package/dist/components/vue.js +9 -9
- package/dist/components/vue.js.map +1 -1
- package/dist/components/webgl.js +1 -1
- package/dist/components/widgets.js +5 -5
- package/dist/components.cjs +1 -3
- package/dist/components.cjs.map +1 -1
- package/dist/components.css +0 -2
- package/dist/components.d.cts +6 -39
- package/dist/components.d.ts +6 -39
- package/dist/components.js +12 -12
- package/dist/components.umd.js +2 -2
- package/dist/components.umd.js.map +1 -1
- package/dist/index.js +2 -2
- package/dist/widgets.umd.js +1 -1
- package/dist/widgets.umd.js.map +1 -1
- package/docs/ROADMAP.md +12 -12
- package/docs/accessibility.md +2 -2
- package/docs/components.md +13 -2
- package/docs/frameworks-ssr.md +4 -4
- package/docs/hybrid-apps.md +2 -2
- package/docs/upgrading-7.md +11 -1
- package/docs/windows-apps.md +1 -1
- package/package.json +111 -1
- package/dist/chunks/gpu-C2D4T9Q-.cjs.map +0 -1
- package/dist/chunks/gpu-DPhMkJq6.js.map +0 -1
- package/dist/chunks/index-tags-DucKMQr_.js.map +0 -1
- package/dist/chunks/index-tags-wv0R_vkO.cjs.map +0 -1
|
@@ -393,26 +393,10 @@ interface UsaPressElement extends UsaElement {
|
|
|
393
393
|
readonly pressed: boolean;
|
|
394
394
|
}
|
|
395
395
|
|
|
396
|
-
/**
|
|
397
|
-
* `<usa-toggle>` — an accessible switch whose knob stretches while pressed
|
|
398
|
-
* and glides across (the Windows 11 / iOS toggle). `role="switch"`,
|
|
399
|
-
* keyboard (Space / Enter), and form-associated where `ElementInternals`
|
|
400
|
-
* exists (submits `value`, default `"on"`, under `name` when checked).
|
|
401
|
-
*
|
|
402
|
-
* Attributes: `checked`, `disabled`, `name`, `value`, `label`
|
|
403
|
-
* (accessible name if there is no `aria-label` / `<label>`). Events:
|
|
404
|
-
* `change` and `usa:change` (`detail.checked`). Reduced motion: no glide.
|
|
405
|
-
*/
|
|
406
|
-
interface UsaToggleElement extends UsaElement {
|
|
407
|
-
checked: boolean;
|
|
408
|
-
disabled: boolean;
|
|
409
|
-
toggle(force?: boolean): void;
|
|
410
|
-
}
|
|
411
|
-
|
|
412
396
|
/**
|
|
413
397
|
* motionary/components/interaction — micro-interactions.
|
|
414
398
|
* `<usa-ripple>`, `<usa-magnetic>`, `<usa-tilt>`, `<usa-spotlight>`,
|
|
415
|
-
* `<usa-press
|
|
399
|
+
* `<usa-press>`.
|
|
416
400
|
*/
|
|
417
401
|
|
|
418
402
|
declare global {
|
|
@@ -422,7 +406,6 @@ declare global {
|
|
|
422
406
|
'usa-tilt': UsaTiltElement;
|
|
423
407
|
'usa-spotlight': UsaSpotlightElement;
|
|
424
408
|
'usa-press': UsaPressElement;
|
|
425
|
-
'usa-toggle': UsaToggleElement;
|
|
426
409
|
}
|
|
427
410
|
}
|
|
428
411
|
|
|
@@ -1152,19 +1135,6 @@ interface UsaRatingElement extends UsaElement {
|
|
|
1152
1135
|
value: number;
|
|
1153
1136
|
}
|
|
1154
1137
|
|
|
1155
|
-
/**
|
|
1156
|
-
* `<usa-tooltip text="…">` — a tooltip for the element it wraps, shown on
|
|
1157
|
-
* hover (after `delay` ms, 300) and on keyboard focus, hidden on Esc / blur.
|
|
1158
|
-
* It springs in from its placement side and flips to stay on screen; the
|
|
1159
|
-
* trigger gets `aria-describedby`.
|
|
1160
|
-
* Attributes: `text`, `placement` (`top` default, `bottom`, `left`, `right`),
|
|
1161
|
-
* `delay`, `variant`. Reduced motion: fades only.
|
|
1162
|
-
*/
|
|
1163
|
-
interface UsaTooltipElement extends UsaElement {
|
|
1164
|
-
show(): void;
|
|
1165
|
-
hide(): void;
|
|
1166
|
-
}
|
|
1167
|
-
|
|
1168
1138
|
/**
|
|
1169
1139
|
* `<usa-popover>` — a click-to-open popover: the first element child is the
|
|
1170
1140
|
* trigger, `[data-popover]` is the content. Springs open from the trigger,
|
|
@@ -1203,7 +1173,7 @@ interface UsaAvatarStackElement extends UsaElement {
|
|
|
1203
1173
|
* motionary/components/ui — animated UI components + style variants (v2.6).
|
|
1204
1174
|
* `<usa-tabs>`, `<usa-drawer>`, `<usa-bottom-sheet>`, `<usa-pull-refresh>`,
|
|
1205
1175
|
* `<usa-fab>`, `<usa-navbar>`, `<usa-slider>`, `<usa-rating>`,
|
|
1206
|
-
* `<usa-
|
|
1176
|
+
* `<usa-popover>`, `<usa-badge>`, `<usa-avatar-stack>`,
|
|
1207
1177
|
* and `variant="minimal | neon | glass | brutalist | fluent | material"`
|
|
1208
1178
|
* design tokens (`setVariant()`, `VARIANTS`).
|
|
1209
1179
|
*/
|
|
@@ -1218,7 +1188,6 @@ declare global {
|
|
|
1218
1188
|
'usa-navbar': UsaNavbarElement;
|
|
1219
1189
|
'usa-slider': UsaSliderElement;
|
|
1220
1190
|
'usa-rating': UsaRatingElement;
|
|
1221
|
-
'usa-tooltip': UsaTooltipElement;
|
|
1222
1191
|
'usa-popover': UsaPopoverElement;
|
|
1223
1192
|
'usa-badge': UsaBadgeElement;
|
|
1224
1193
|
'usa-avatar-stack': UsaAvatarStackElement;
|
|
@@ -1638,14 +1607,14 @@ declare global {
|
|
|
1638
1607
|
declare const COMPONENT_CATEGORIES: {
|
|
1639
1608
|
readonly reveal: readonly ["usa-reveal", "usa-stagger", "usa-scroll-progress", "usa-scrolly"];
|
|
1640
1609
|
readonly text: readonly ["usa-typewriter", "usa-split-text", "usa-scramble", "usa-counter", "usa-shimmer-text", "usa-text-rotate", "usa-wave-text", "usa-glitch", "usa-gradient-text", "usa-handwriting", "usa-scroll-highlight"];
|
|
1641
|
-
readonly interaction: readonly ["usa-ripple", "usa-magnetic", "usa-tilt", "usa-spotlight", "usa-press"
|
|
1610
|
+
readonly interaction: readonly ["usa-ripple", "usa-magnetic", "usa-tilt", "usa-spotlight", "usa-press"];
|
|
1642
1611
|
readonly feedback: readonly ["usa-spinner", "usa-skeleton", "usa-progress", "usa-toaster", "usa-check"];
|
|
1643
1612
|
readonly background: readonly ["usa-aurora", "usa-particles", "usa-grain", "usa-marquee", "usa-acrylic", "usa-grid-glow", "usa-blobs", "usa-water-ripple", "usa-dot-network"];
|
|
1644
1613
|
readonly transitions: readonly ["usa-dialog", "usa-accordion", "usa-view-switch"];
|
|
1645
1614
|
readonly physics: readonly ["usa-spring", "usa-draggable", "usa-overscroll"];
|
|
1646
1615
|
readonly cards: readonly ["usa-card", "usa-card-stack", "usa-sticky-stack", "usa-carousel-3d"];
|
|
1647
1616
|
readonly click: readonly ["usa-click", "usa-button", "usa-icon-morph", "usa-like", "usa-hold", "usa-double-tap", "usa-checkbox"];
|
|
1648
|
-
readonly ui: readonly ["usa-tabs", "usa-drawer", "usa-bottom-sheet", "usa-pull-refresh", "usa-fab", "usa-navbar", "usa-slider", "usa-rating", "usa-
|
|
1617
|
+
readonly ui: readonly ["usa-tabs", "usa-drawer", "usa-bottom-sheet", "usa-pull-refresh", "usa-fab", "usa-navbar", "usa-slider", "usa-rating", "usa-popover", "usa-badge", "usa-avatar-stack"];
|
|
1649
1618
|
readonly page: readonly ["usa-cursor", "usa-fullpage", "usa-loading-bar", "usa-back-to-top", "usa-ambient", "usa-splash", "usa-auto-skeleton", "usa-motion-switch"];
|
|
1650
1619
|
readonly timeline: readonly ["usa-timeline"];
|
|
1651
1620
|
readonly gesture: readonly ["usa-swipeable", "usa-pinch-zoom"];
|
|
@@ -1716,7 +1685,7 @@ declare function bindUsa(el: HTMLElement, binding?: UsaBinding): {
|
|
|
1716
1685
|
* onMount(() => defineUsa(['click', 'ui']));
|
|
1717
1686
|
* let on = false;
|
|
1718
1687
|
* </script>
|
|
1719
|
-
* <usa-
|
|
1688
|
+
* <usa-switch use:usa={{ props: { checked: on }, on: { change: (e) => (on = e.detail.checked) } }}></usa-switch>
|
|
1720
1689
|
* ```
|
|
1721
1690
|
* Plain `on:usa:change` does not compile in Svelte 3/4 (colon); use the action or `onusa:change` in Svelte 5.
|
|
1722
1691
|
*/
|
|
@@ -393,26 +393,10 @@ interface UsaPressElement extends UsaElement {
|
|
|
393
393
|
readonly pressed: boolean;
|
|
394
394
|
}
|
|
395
395
|
|
|
396
|
-
/**
|
|
397
|
-
* `<usa-toggle>` — an accessible switch whose knob stretches while pressed
|
|
398
|
-
* and glides across (the Windows 11 / iOS toggle). `role="switch"`,
|
|
399
|
-
* keyboard (Space / Enter), and form-associated where `ElementInternals`
|
|
400
|
-
* exists (submits `value`, default `"on"`, under `name` when checked).
|
|
401
|
-
*
|
|
402
|
-
* Attributes: `checked`, `disabled`, `name`, `value`, `label`
|
|
403
|
-
* (accessible name if there is no `aria-label` / `<label>`). Events:
|
|
404
|
-
* `change` and `usa:change` (`detail.checked`). Reduced motion: no glide.
|
|
405
|
-
*/
|
|
406
|
-
interface UsaToggleElement extends UsaElement {
|
|
407
|
-
checked: boolean;
|
|
408
|
-
disabled: boolean;
|
|
409
|
-
toggle(force?: boolean): void;
|
|
410
|
-
}
|
|
411
|
-
|
|
412
396
|
/**
|
|
413
397
|
* motionary/components/interaction — micro-interactions.
|
|
414
398
|
* `<usa-ripple>`, `<usa-magnetic>`, `<usa-tilt>`, `<usa-spotlight>`,
|
|
415
|
-
* `<usa-press
|
|
399
|
+
* `<usa-press>`.
|
|
416
400
|
*/
|
|
417
401
|
|
|
418
402
|
declare global {
|
|
@@ -422,7 +406,6 @@ declare global {
|
|
|
422
406
|
'usa-tilt': UsaTiltElement;
|
|
423
407
|
'usa-spotlight': UsaSpotlightElement;
|
|
424
408
|
'usa-press': UsaPressElement;
|
|
425
|
-
'usa-toggle': UsaToggleElement;
|
|
426
409
|
}
|
|
427
410
|
}
|
|
428
411
|
|
|
@@ -1152,19 +1135,6 @@ interface UsaRatingElement extends UsaElement {
|
|
|
1152
1135
|
value: number;
|
|
1153
1136
|
}
|
|
1154
1137
|
|
|
1155
|
-
/**
|
|
1156
|
-
* `<usa-tooltip text="…">` — a tooltip for the element it wraps, shown on
|
|
1157
|
-
* hover (after `delay` ms, 300) and on keyboard focus, hidden on Esc / blur.
|
|
1158
|
-
* It springs in from its placement side and flips to stay on screen; the
|
|
1159
|
-
* trigger gets `aria-describedby`.
|
|
1160
|
-
* Attributes: `text`, `placement` (`top` default, `bottom`, `left`, `right`),
|
|
1161
|
-
* `delay`, `variant`. Reduced motion: fades only.
|
|
1162
|
-
*/
|
|
1163
|
-
interface UsaTooltipElement extends UsaElement {
|
|
1164
|
-
show(): void;
|
|
1165
|
-
hide(): void;
|
|
1166
|
-
}
|
|
1167
|
-
|
|
1168
1138
|
/**
|
|
1169
1139
|
* `<usa-popover>` — a click-to-open popover: the first element child is the
|
|
1170
1140
|
* trigger, `[data-popover]` is the content. Springs open from the trigger,
|
|
@@ -1203,7 +1173,7 @@ interface UsaAvatarStackElement extends UsaElement {
|
|
|
1203
1173
|
* motionary/components/ui — animated UI components + style variants (v2.6).
|
|
1204
1174
|
* `<usa-tabs>`, `<usa-drawer>`, `<usa-bottom-sheet>`, `<usa-pull-refresh>`,
|
|
1205
1175
|
* `<usa-fab>`, `<usa-navbar>`, `<usa-slider>`, `<usa-rating>`,
|
|
1206
|
-
* `<usa-
|
|
1176
|
+
* `<usa-popover>`, `<usa-badge>`, `<usa-avatar-stack>`,
|
|
1207
1177
|
* and `variant="minimal | neon | glass | brutalist | fluent | material"`
|
|
1208
1178
|
* design tokens (`setVariant()`, `VARIANTS`).
|
|
1209
1179
|
*/
|
|
@@ -1218,7 +1188,6 @@ declare global {
|
|
|
1218
1188
|
'usa-navbar': UsaNavbarElement;
|
|
1219
1189
|
'usa-slider': UsaSliderElement;
|
|
1220
1190
|
'usa-rating': UsaRatingElement;
|
|
1221
|
-
'usa-tooltip': UsaTooltipElement;
|
|
1222
1191
|
'usa-popover': UsaPopoverElement;
|
|
1223
1192
|
'usa-badge': UsaBadgeElement;
|
|
1224
1193
|
'usa-avatar-stack': UsaAvatarStackElement;
|
|
@@ -1638,14 +1607,14 @@ declare global {
|
|
|
1638
1607
|
declare const COMPONENT_CATEGORIES: {
|
|
1639
1608
|
readonly reveal: readonly ["usa-reveal", "usa-stagger", "usa-scroll-progress", "usa-scrolly"];
|
|
1640
1609
|
readonly text: readonly ["usa-typewriter", "usa-split-text", "usa-scramble", "usa-counter", "usa-shimmer-text", "usa-text-rotate", "usa-wave-text", "usa-glitch", "usa-gradient-text", "usa-handwriting", "usa-scroll-highlight"];
|
|
1641
|
-
readonly interaction: readonly ["usa-ripple", "usa-magnetic", "usa-tilt", "usa-spotlight", "usa-press"
|
|
1610
|
+
readonly interaction: readonly ["usa-ripple", "usa-magnetic", "usa-tilt", "usa-spotlight", "usa-press"];
|
|
1642
1611
|
readonly feedback: readonly ["usa-spinner", "usa-skeleton", "usa-progress", "usa-toaster", "usa-check"];
|
|
1643
1612
|
readonly background: readonly ["usa-aurora", "usa-particles", "usa-grain", "usa-marquee", "usa-acrylic", "usa-grid-glow", "usa-blobs", "usa-water-ripple", "usa-dot-network"];
|
|
1644
1613
|
readonly transitions: readonly ["usa-dialog", "usa-accordion", "usa-view-switch"];
|
|
1645
1614
|
readonly physics: readonly ["usa-spring", "usa-draggable", "usa-overscroll"];
|
|
1646
1615
|
readonly cards: readonly ["usa-card", "usa-card-stack", "usa-sticky-stack", "usa-carousel-3d"];
|
|
1647
1616
|
readonly click: readonly ["usa-click", "usa-button", "usa-icon-morph", "usa-like", "usa-hold", "usa-double-tap", "usa-checkbox"];
|
|
1648
|
-
readonly ui: readonly ["usa-tabs", "usa-drawer", "usa-bottom-sheet", "usa-pull-refresh", "usa-fab", "usa-navbar", "usa-slider", "usa-rating", "usa-
|
|
1617
|
+
readonly ui: readonly ["usa-tabs", "usa-drawer", "usa-bottom-sheet", "usa-pull-refresh", "usa-fab", "usa-navbar", "usa-slider", "usa-rating", "usa-popover", "usa-badge", "usa-avatar-stack"];
|
|
1649
1618
|
readonly page: readonly ["usa-cursor", "usa-fullpage", "usa-loading-bar", "usa-back-to-top", "usa-ambient", "usa-splash", "usa-auto-skeleton", "usa-motion-switch"];
|
|
1650
1619
|
readonly timeline: readonly ["usa-timeline"];
|
|
1651
1620
|
readonly gesture: readonly ["usa-swipeable", "usa-pinch-zoom"];
|
|
@@ -1716,7 +1685,7 @@ declare function bindUsa(el: HTMLElement, binding?: UsaBinding): {
|
|
|
1716
1685
|
* onMount(() => defineUsa(['click', 'ui']));
|
|
1717
1686
|
* let on = false;
|
|
1718
1687
|
* </script>
|
|
1719
|
-
* <usa-
|
|
1688
|
+
* <usa-switch use:usa={{ props: { checked: on }, on: { change: (e) => (on = e.detail.checked) } }}></usa-switch>
|
|
1720
1689
|
* ```
|
|
1721
1690
|
* Plain `on:usa:change` does not compile in Svelte 3/4 (colon); use the action or `onusa:change` in Svelte 5.
|
|
1722
1691
|
*/
|
|
@@ -2,34 +2,34 @@ import { defineComponents } from '../components.js';
|
|
|
2
2
|
import { b as bindUsa } from '../chunks/bind-B_CTL6Qn.js';
|
|
3
3
|
export { u as usaEventName } from '../chunks/bind-B_CTL6Qn.js';
|
|
4
4
|
import './reveal.js';
|
|
5
|
-
import '../chunks/base-
|
|
5
|
+
import '../chunks/base-DchG4q_S.js';
|
|
6
6
|
import './text.js';
|
|
7
|
-
import '../chunks/core-
|
|
7
|
+
import '../chunks/core-DVyTlo9Q.js';
|
|
8
8
|
import './tokens.js';
|
|
9
9
|
import './interaction.js';
|
|
10
10
|
import './feedback.js';
|
|
11
11
|
import './background.js';
|
|
12
|
-
import '../chunks/variants-
|
|
12
|
+
import '../chunks/variants-C_hv_s23.js';
|
|
13
13
|
import './transitions.js';
|
|
14
14
|
import './physics.js';
|
|
15
|
-
import '../chunks/spring-
|
|
15
|
+
import '../chunks/spring-BhoT09Qb.js';
|
|
16
16
|
import './cards.js';
|
|
17
17
|
import './click.js';
|
|
18
|
-
import '../chunks/fx-
|
|
18
|
+
import '../chunks/fx-DUMVKSvg.js';
|
|
19
19
|
import './ui.js';
|
|
20
20
|
import './page.js';
|
|
21
21
|
import './timeline.js';
|
|
22
22
|
import './gesture.js';
|
|
23
|
-
import '../chunks/core-
|
|
23
|
+
import '../chunks/core-D2vF8kZb.js';
|
|
24
24
|
import './svg.js';
|
|
25
25
|
import './webgl.js';
|
|
26
26
|
import './depth.js';
|
|
27
27
|
import './layout.js';
|
|
28
28
|
import './packs.js';
|
|
29
29
|
import './fx.js';
|
|
30
|
-
import '../chunks/registry-
|
|
30
|
+
import '../chunks/registry-D23neB4M.js';
|
|
31
31
|
import './a11y.js';
|
|
32
|
-
import '../chunks/index-tags-
|
|
32
|
+
import '../chunks/index-tags-C04JP8g4.js';
|
|
33
33
|
import './perf.js';
|
|
34
34
|
import './bridge.js';
|
|
35
35
|
|
|
@@ -46,7 +46,7 @@ import './bridge.js';
|
|
|
46
46
|
* onMount(() => defineUsa(['click', 'ui']));
|
|
47
47
|
* let on = false;
|
|
48
48
|
* </script>
|
|
49
|
-
* <usa-
|
|
49
|
+
* <usa-switch use:usa={{ props: { checked: on }, on: { change: (e) => (on = e.detail.checked) } }}></usa-switch>
|
|
50
50
|
* ```
|
|
51
51
|
* Plain `on:usa:change` does not compile in Svelte 3/4 (colon); use the action or `onusa:change` in Svelte 5.
|
|
52
52
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"svelte.js","sources":["../../src/components/frameworks/svelte.ts"],"sourcesContent":["/**\n * motionary/components/svelte — Svelte integration (v3.8).\n * Svelte (3, 4, 5) renders `<usa-*>` tags natively; `use:usa` sets\n * **properties** and `usa:*` listeners in one place, and `defineUsa()`\n * registers the elements on the client only (safe in SvelteKit SSR).\n *\n * ```svelte\n * <script>\n * import { usa, defineUsa } from 'motionary/components/svelte';\n * import { onMount } from 'svelte';\n * onMount(() => defineUsa(['click', 'ui']));\n * let on = false;\n * </script>\n * <usa-
|
|
1
|
+
{"version":3,"file":"svelte.js","sources":["../../src/components/frameworks/svelte.ts"],"sourcesContent":["/**\n * motionary/components/svelte — Svelte integration (v3.8).\n * Svelte (3, 4, 5) renders `<usa-*>` tags natively; `use:usa` sets\n * **properties** and `usa:*` listeners in one place, and `defineUsa()`\n * registers the elements on the client only (safe in SvelteKit SSR).\n *\n * ```svelte\n * <script>\n * import { usa, defineUsa } from 'motionary/components/svelte';\n * import { onMount } from 'svelte';\n * onMount(() => defineUsa(['click', 'ui']));\n * let on = false;\n * </script>\n * <usa-switch use:usa={{ props: { checked: on }, on: { change: (e) => (on = e.detail.checked) } }}></usa-switch>\n * ```\n * Plain `on:usa:change` does not compile in Svelte 3/4 (colon); use the action or `onusa:change` in Svelte 5.\n */\nimport { defineComponents, type ComponentCategory } from '../index';\nimport { bindUsa, type UsaBinding } from './bind';\n\nexport { bindUsa, usaEventName } from './bind';\nexport type { UsaBinding } from './bind';\n\n/** Svelte action: `use:usa={{ props, on }}`. */\nexport function usa(node: HTMLElement, binding: UsaBinding = {}): { update(b: UsaBinding): void; destroy(): void } {\n return bindUsa(node, binding);\n}\n\n/** Register the elements (all, or some categories) — call from `onMount` for SSR apps. */\nexport function defineUsa(categories?: ComponentCategory[]): void {\n if (typeof window !== 'undefined') defineComponents(categories);\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;AAgBG;AAOH;SACgB,GAAG,CAAC,IAAiB,EAAE,UAAsB,EAAE,EAAA;AAC7D,IAAA,OAAO,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC;AAC/B;AAEA;AACM,SAAU,SAAS,CAAC,UAAgC,EAAA;IACxD,IAAI,OAAO,MAAM,KAAK,WAAW;QAAE,gBAAgB,CAAC,UAAU,CAAC;AACjE;;;;"}
|
package/dist/components/svg.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { k as clamp, m as motionScale, l as caf, p as prefersReducedMotion, q as now, r as raf, y as defineElement, z as EASE_OUT } from '../chunks/base-
|
|
1
|
+
import { k as clamp, m as motionScale, l as caf, p as prefersReducedMotion, q as now, r as raf, y as defineElement, z as EASE_OUT } from '../chunks/base-DchG4q_S.js';
|
|
2
2
|
|
|
3
3
|
const NUM = /-?(?:\d+\.?\d*|\.\d+)(?:e[-+]?\d+)?/gi;
|
|
4
4
|
/** `true` when two path strings share the same commands (so their numbers can be interpolated). */
|
package/dist/components/text.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { y as defineElement,
|
|
2
|
-
import { t as timeline } from '../chunks/core-
|
|
1
|
+
import { y as defineElement, u as srText, l as caf, q as now, r as raf, z as EASE_OUT, E as EASE_SPRING, k as clamp } from '../chunks/base-DchG4q_S.js';
|
|
2
|
+
import { t as timeline } from '../chunks/core-DVyTlo9Q.js';
|
|
3
3
|
import './tokens.js';
|
|
4
4
|
|
|
5
5
|
var css$5 = "usa-typewriter{white-space:pre-wrap}usa-typewriter .usa-tw-caret{display:inline-block;width:var(--usa-caret-width,0.08em);height:1.05em;margin-left:0.06em;vertical-align:-0.12em;background:var(--usa-caret-color,currentColor);animation:usa-caret 1.06s steps(1) infinite}usa-typewriter[data-typing] .usa-tw-caret{animation:none}usa-typewriter[data-no-cursor] .usa-tw-caret{display:none}@keyframes usa-caret{50%{opacity:0}}@media (prefers-reduced-motion:reduce){usa-typewriter .usa-tw-caret,usa-shimmer-text{animation:none}}";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { y as defineElement } from '../chunks/base-
|
|
2
|
-
import { t as timeline, T as TIMELINE_PRESETS } from '../chunks/core-
|
|
3
|
-
export { r as resolvePosition, s as supportsNativeScrub } from '../chunks/core-
|
|
1
|
+
import { y as defineElement } from '../chunks/base-DchG4q_S.js';
|
|
2
|
+
import { t as timeline, T as TIMELINE_PRESETS } from '../chunks/core-DVyTlo9Q.js';
|
|
3
|
+
export { r as resolvePosition, s as supportsNativeScrub } from '../chunks/core-DVyTlo9Q.js';
|
|
4
4
|
import './tokens.js';
|
|
5
5
|
|
|
6
6
|
var css = "usa-timeline{display:block}usa-timeline[scrub]{position:relative}@media (prefers-reduced-motion:reduce){usa-timeline [data-tl]{opacity:1 !important;transform:none !important;filter:none !important;clip-path:none !important}}";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { y as defineElement, A as kindOf, B as shadowStyles, z as EASE_OUT, F as FLUENT_DECELERATE, p as prefersReducedMotion } from '../chunks/base-
|
|
1
|
+
import { y as defineElement, A as kindOf, B as shadowStyles, z as EASE_OUT, F as FLUENT_DECELERATE, p as prefersReducedMotion } from '../chunks/base-DchG4q_S.js';
|
|
2
2
|
|
|
3
3
|
var shadowCss = ":host{display:contents}dialog{position:fixed;inset:0;width:100%;height:100%;max-width:none;max-height:none;margin:0;padding:0;border:0;background:transparent;color:inherit;overflow:hidden}dialog:not([open]){display:none}dialog::backdrop{background:transparent}[part=\"backdrop\"]{position:absolute;inset:0;background:var(--usa-dialog-backdrop,rgb(0 0 0 / 0.42))}[part=\"panel\"]{position:absolute;left:50%;top:50%;translate:-50% -50%;box-sizing:border-box;width:min(var(--usa-dialog-width,480px),calc(100vw - 32px));max-height:calc(100vh - 32px);overflow:auto;padding:var(--usa-dialog-padding,24px);border-radius:var(--usa-dialog-radius,12px);background:var(--usa-dialog-bg,Canvas);color:var(--usa-dialog-fg,CanvasText);box-shadow:0 32px 64px -12px rgb(0 0 0 / 0.45),0 0 0 1px rgb(127 127 127 / 0.18)}dialog[data-kind^=\"drawer\"] [part=\"panel\"]{top:0;bottom:0;translate:none;max-height:none;height:100%;border-radius:0;width:min(var(--usa-dialog-width,380px),88vw)}dialog[data-kind=\"drawer-start\"] [part=\"panel\"]{left:0}dialog[data-kind=\"drawer-end\"] [part=\"panel\"]{left:auto;right:0}dialog[data-kind=\"drawer-bottom\"] [part=\"panel\"],dialog[data-kind=\"sheet\"] [part=\"panel\"]{top:auto;bottom:0;left:0;right:0;translate:none;width:100%;height:auto;max-height:85vh;border-radius:var(--usa-dialog-radius,16px) var(--usa-dialog-radius,16px) 0 0}dialog[data-kind=\"sheet\"] [part=\"panel\"]{left:50%;translate:-50% 0;width:min(var(--usa-dialog-width,560px),100vw)}";
|
|
4
4
|
|
package/dist/components/ui.cjs
CHANGED
|
@@ -36,7 +36,7 @@ function place(floating, anchor, placement = 'top', gap = 8) {
|
|
|
36
36
|
let uid = 0;
|
|
37
37
|
const nextId = (prefix) => `${prefix}-${++uid}`;
|
|
38
38
|
|
|
39
|
-
var css$
|
|
39
|
+
var css$9 = "usa-tabs{display:block;font-family:var(--usa-font)}usa-tabs .usa-tabs-list{position:relative;display:flex;gap:4px;border-bottom:1px solid color-mix(in srgb,currentColor 14%,transparent)}usa-tabs [role=\"tab\"]{position:relative;z-index:1;padding:10px 14px;border:0;background:none;color:inherit;font:inherit;cursor:pointer;opacity:0.7;transition:opacity 0.2s ease,color 0.2s ease;border-radius:calc(var(--usa-radius,14px) / 2)}usa-tabs [role=\"tab\"][aria-selected=\"true\"]{opacity:1;color:var(--usa-accent,#7c5cff)}usa-tabs [role=\"tab\"]:focus-visible{outline:2px solid var(--usa-accent,#7c5cff);outline-offset:-2px}usa-tabs .usa-tabs-indicator{position:absolute;left:0;bottom:-1px;height:3px;width:0;border-radius:3px;background:var(--usa-accent,#7c5cff);pointer-events:none}usa-tabs[indicator=\"pill\"] .usa-tabs-list{border-bottom:0;padding:4px;border-radius:999px;background:color-mix(in srgb,currentColor 8%,transparent)}usa-tabs[indicator=\"pill\"] .usa-tabs-indicator{top:4px;bottom:4px;height:auto;border-radius:999px;opacity:0.18}usa-tabs [role=\"tabpanel\"]{padding:14px 2px}usa-tabs [role=\"tabpanel\"]:focus-visible{outline:2px solid var(--usa-accent,#7c5cff);outline-offset:2px;border-radius:6px}";
|
|
40
40
|
|
|
41
41
|
function defineTabs(tag = 'usa-tabs') {
|
|
42
42
|
variants.adoptVariants();
|
|
@@ -139,10 +139,10 @@ function defineTabs(tag = 'usa-tabs') {
|
|
|
139
139
|
this.motion(p, [{ opacity: 0, transform: `translateX(${i > prev ? 16 : -16}px)` }, { opacity: 1, transform: 'none' }], { duration: 280, easing: 'cubic-bezier(0.22, 1, 0.36, 1)' });
|
|
140
140
|
this.emit('change', { index: i });
|
|
141
141
|
}
|
|
142
|
-
}, { id: 'tabs', text: css$
|
|
142
|
+
}, { id: 'tabs', text: css$9 });
|
|
143
143
|
}
|
|
144
144
|
|
|
145
|
-
var css$
|
|
145
|
+
var css$8 = "usa-drawer,usa-bottom-sheet{position:fixed;z-index:1001;box-sizing:border-box;overflow:auto;overscroll-behavior:contain;touch-action:pan-y;will-change:transform;outline:none}usa-drawer{top:0;bottom:0;left:0;width:min(86vw,360px);border-radius:0 var(--usa-radius,14px) var(--usa-radius,14px) 0;padding:20px}usa-drawer[side=\"right\"]{left:auto;right:0;border-radius:var(--usa-radius,14px) 0 0 var(--usa-radius,14px)}usa-drawer[side=\"top\"],usa-drawer[side=\"bottom\"]{left:0;right:0;width:auto;bottom:auto;max-height:80vh;border-radius:0 0 var(--usa-radius,14px) var(--usa-radius,14px);touch-action:pan-x}usa-drawer[side=\"bottom\"]{top:auto;bottom:0;border-radius:var(--usa-radius,14px) var(--usa-radius,14px) 0 0}usa-bottom-sheet{left:0;right:0;bottom:0;margin:0 auto;max-width:640px;border-radius:22px 22px 0 0;padding:8px 20px 24px;touch-action:none}usa-bottom-sheet .usa-sheet-handle{width:40px;height:5px;border-radius:3px;margin:4px auto 14px;background:color-mix(in srgb,currentColor 35%,transparent);cursor:grab}usa-drawer[hidden],usa-bottom-sheet[hidden]{display:none}.usa-panel-backdrop{position:fixed;inset:0;z-index:1000;background:rgb(0 0 0 / 0.45)}";
|
|
146
146
|
|
|
147
147
|
/** Shared machinery of `<usa-drawer>` and `<usa-bottom-sheet>`: backdrop, focus, Esc, drag-to-dismiss. */
|
|
148
148
|
function makePanel(Base, kind) {
|
|
@@ -299,7 +299,7 @@ function makePanel(Base, kind) {
|
|
|
299
299
|
}
|
|
300
300
|
function defineDrawer(tag = 'usa-drawer') {
|
|
301
301
|
variants.adoptVariants();
|
|
302
|
-
return base.defineElement(tag, (Base) => makePanel(Base, 'drawer'), { id: 'sheet', text: css$
|
|
302
|
+
return base.defineElement(tag, (Base) => makePanel(Base, 'drawer'), { id: 'sheet', text: css$8 });
|
|
303
303
|
}
|
|
304
304
|
function defineBottomSheet(tag = 'usa-bottom-sheet') {
|
|
305
305
|
variants.adoptVariants();
|
|
@@ -342,10 +342,10 @@ function defineBottomSheet(tag = 'usa-bottom-sheet') {
|
|
|
342
342
|
super.render(v);
|
|
343
343
|
}
|
|
344
344
|
};
|
|
345
|
-
}, { id: 'sheet', text: css$
|
|
345
|
+
}, { id: 'sheet', text: css$8 });
|
|
346
346
|
}
|
|
347
347
|
|
|
348
|
-
var css$
|
|
348
|
+
var css$7 = "usa-pull-refresh{position:relative;display:block;overflow:auto;overscroll-behavior-y:contain;touch-action:pan-x pan-down}usa-pull-refresh>:not(.usa-pull-indicator):not(.usa-sr){transform:translateY(var(--usa-pull,0px))}usa-pull-refresh .usa-pull-indicator{position:absolute;left:50%;top:0;width:34px;height:34px;margin-left:-17px;z-index:2;display:grid;place-items:center;border-radius:50%;background:var(--usa-surface,#1b1e27);box-shadow:var(--usa-shadow);color:var(--usa-accent,#7c5cff);transform:translateY(calc(var(--usa-pull,0px) - 40px)) rotate(calc(var(--usa-pull-p,0) * 270deg));opacity:var(--usa-pull-p,0);pointer-events:none}usa-pull-refresh .usa-pull-indicator svg{width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:3;stroke-linecap:round}usa-pull-refresh .usa-pull-indicator circle{stroke-dasharray:calc(var(--usa-pull-p,0) * 75) 100}usa-pull-refresh[data-armed] .usa-pull-indicator{background:var(--usa-accent,#7c5cff);color:var(--usa-accent-text,#fff)}usa-pull-refresh[data-refreshing] .usa-pull-indicator{opacity:1;animation:usa-pull-spin 0.8s linear infinite}usa-pull-refresh[data-refreshing] .usa-pull-indicator circle{stroke-dasharray:60 100}@keyframes usa-pull-spin{from{transform:translateY(calc(var(--usa-pull,0px) - 40px)) rotate(0)}to{transform:translateY(calc(var(--usa-pull,0px) - 40px)) rotate(360deg)}}@media (prefers-reduced-motion:reduce){usa-pull-refresh[data-refreshing] .usa-pull-indicator{animation-duration:2.4s;transform:translateY(8px)}}";
|
|
349
349
|
|
|
350
350
|
function definePullRefresh(tag = 'usa-pull-refresh') {
|
|
351
351
|
variants.adoptVariants();
|
|
@@ -444,10 +444,10 @@ function definePullRefresh(tag = 'usa-pull-refresh') {
|
|
|
444
444
|
Promise.resolve(fn(ev)).then(done, done);
|
|
445
445
|
});
|
|
446
446
|
}
|
|
447
|
-
}, { id: 'pull-refresh', text: css$
|
|
447
|
+
}, { id: 'pull-refresh', text: css$7 });
|
|
448
448
|
}
|
|
449
449
|
|
|
450
|
-
var css$
|
|
450
|
+
var css$6 = "usa-fab{position:fixed;right:max(20px,env(safe-area-inset-right));bottom:max(20px,env(safe-area-inset-bottom));z-index:900;display:grid;place-items:center}usa-fab[position=\"bottom-left\"]{right:auto;left:max(20px,env(safe-area-inset-left))}usa-fab[position=\"inline\"]{position:relative;right:auto;bottom:auto;display:inline-grid}usa-fab>*{grid-area:1 / 1}usa-fab .usa-fab-main{position:relative;z-index:1;width:56px;height:56px;border-radius:min(var(--usa-radius,14px) * 1.2,28px);border:0;display:grid;place-items:center;font-size:24px;cursor:pointer;background:var(--usa-accent,#7c5cff);color:var(--usa-accent-text,#fff);box-shadow:var(--usa-shadow);transition:transform 0.35s cubic-bezier(0.34,1.56,0.64,1)}usa-fab[open] .usa-fab-main{transform:rotate(45deg)}usa-fab .usa-fab-action{width:44px;height:44px;border-radius:50%;display:grid;place-items:center;opacity:0;transform:scale(0.4);will-change:transform,opacity}usa-fab .usa-fab-main:focus-visible,usa-fab .usa-fab-action:focus-visible{outline:2px solid var(--usa-accent,#7c5cff);outline-offset:3px}@media (prefers-reduced-motion:reduce){usa-fab .usa-fab-main{transition:none}}";
|
|
451
451
|
|
|
452
452
|
function defineFab(tag = 'usa-fab') {
|
|
453
453
|
variants.adoptVariants();
|
|
@@ -533,10 +533,10 @@ function defineFab(tag = 'usa-fab') {
|
|
|
533
533
|
this.apply(true);
|
|
534
534
|
this.emit('toggle', { open: next });
|
|
535
535
|
}
|
|
536
|
-
}, { id: 'fab', text: css$
|
|
536
|
+
}, { id: 'fab', text: css$6 });
|
|
537
537
|
}
|
|
538
538
|
|
|
539
|
-
var css$
|
|
539
|
+
var css$5 = "usa-navbar{position:sticky;top:0;z-index:800;display:block;transition:transform 0.35s cubic-bezier(0.22,1,0.36,1),padding 0.25s ease,box-shadow 0.25s ease;will-change:transform}usa-navbar[data-hidden]{transform:translateY(-100%)}usa-navbar[data-scrolled]{box-shadow:var(--usa-shadow,0 6px 20px -10px rgb(0 0 0 / 0.4))}usa-navbar[shrink][data-scrolled]{padding-block:4px}@media (prefers-reduced-motion:reduce){usa-navbar{transition:none}}";
|
|
540
540
|
|
|
541
541
|
function defineNavbar(tag = 'usa-navbar') {
|
|
542
542
|
variants.adoptVariants();
|
|
@@ -589,10 +589,10 @@ function defineNavbar(tag = 'usa-navbar') {
|
|
|
589
589
|
this.removeAttribute('data-hidden');
|
|
590
590
|
this.emit('show');
|
|
591
591
|
}
|
|
592
|
-
}, { id: 'navbar', text: css$
|
|
592
|
+
}, { id: 'navbar', text: css$5 });
|
|
593
593
|
}
|
|
594
594
|
|
|
595
|
-
var css$
|
|
595
|
+
var css$4 = "usa-slider{--usa-slider:0;position:relative;display:block;height:28px;min-width:120px;touch-action:none;cursor:pointer;-webkit-tap-highlight-color:transparent}usa-slider .usa-slider-track{position:absolute;left:0;right:0;top:50%;height:6px;margin-top:-3px;border-radius:3px;background:color-mix(in srgb,currentColor 16%,transparent);overflow:hidden}usa-slider .usa-slider-fill{position:absolute;inset:0;background:var(--usa-accent,#7c5cff);transform-origin:0 50%;transform:scaleX(var(--usa-slider))}usa-slider .usa-slider-thumb{position:absolute;top:50%;left:calc(var(--usa-slider) * 100%);width:20px;height:20px;margin:-10px 0 0 -10px;border-radius:50%;background:#fff;box-shadow:0 1px 4px rgb(0 0 0 / 0.35),0 0 0 4px color-mix(in srgb,var(--usa-accent,#7c5cff) 0%,transparent);transition:transform 0.25s cubic-bezier(0.34,1.56,0.64,1),box-shadow 0.2s ease}usa-slider:hover .usa-slider-thumb,usa-slider:focus-visible .usa-slider-thumb{box-shadow:0 1px 4px rgb(0 0 0 / 0.35),0 0 0 6px color-mix(in srgb,var(--usa-accent,#7c5cff) 25%,transparent)}usa-slider[data-dragging] .usa-slider-thumb{transform:scale(1.25)}usa-slider .usa-slider-bubble{position:absolute;bottom:150%;left:50%;transform:translateX(-50%) scale(0.6);opacity:0;padding:2px 8px;border-radius:8px;font:600 12px/1.6 system-ui,sans-serif;color:var(--usa-accent-text,#fff);background:var(--usa-accent,#7c5cff);white-space:nowrap;pointer-events:none;transition:opacity 0.15s ease,transform 0.25s cubic-bezier(0.34,1.56,0.64,1)}usa-slider[bubble][data-dragging] .usa-slider-bubble,usa-slider[bubble]:focus-visible .usa-slider-bubble{opacity:1;transform:translateX(-50%) scale(1)}usa-slider:focus-visible{outline:none}usa-slider[disabled]{opacity:0.45;cursor:not-allowed}@media (prefers-reduced-motion:reduce){usa-slider .usa-slider-thumb,usa-slider .usa-slider-bubble{transition:none}}";
|
|
596
596
|
|
|
597
597
|
function defineSlider(tag = 'usa-slider') {
|
|
598
598
|
variants.adoptVariants();
|
|
@@ -713,10 +713,10 @@ function defineSlider(tag = 'usa-slider') {
|
|
|
713
713
|
}
|
|
714
714
|
UsaSlider.formAssociated = true;
|
|
715
715
|
return UsaSlider;
|
|
716
|
-
}, { id: 'slider', text: css$
|
|
716
|
+
}, { id: 'slider', text: css$4 });
|
|
717
717
|
}
|
|
718
718
|
|
|
719
|
-
var css$
|
|
719
|
+
var css$3 = "usa-rating{--usa-rating-on:#f5b301;display:inline-flex;gap:2px;font-size:1.5em;line-height:1;cursor:pointer;user-select:none;-webkit-tap-highlight-color:transparent}usa-rating[readonly]{cursor:default}usa-rating .usa-rating-star{display:inline-block;color:color-mix(in srgb,currentColor 22%,transparent);transition:color 0.15s ease,transform 0.2s ease}usa-rating .usa-rating-star[data-on]{color:var(--usa-rating-on)}usa-rating[data-previewing] .usa-rating-star{color:color-mix(in srgb,currentColor 22%,transparent)}usa-rating[data-previewing] .usa-rating-star[data-preview]{color:var(--usa-rating-on);transform:scale(1.12)}usa-rating:focus-visible{outline:2px solid var(--usa-accent,#7c5cff);outline-offset:3px;border-radius:6px}@media (prefers-reduced-motion:reduce){usa-rating .usa-rating-star{transition:none;transform:none !important}}";
|
|
720
720
|
|
|
721
721
|
function defineRating(tag = 'usa-rating') {
|
|
722
722
|
variants.adoptVariants();
|
|
@@ -801,64 +801,7 @@ function defineRating(tag = 'usa-rating') {
|
|
|
801
801
|
}
|
|
802
802
|
UsaRating.formAssociated = true;
|
|
803
803
|
return UsaRating;
|
|
804
|
-
}, { id: 'rating', text: css$
|
|
805
|
-
}
|
|
806
|
-
|
|
807
|
-
var css$3 = "usa-tooltip{display:inline-block}usa-tooltip .usa-tooltip-bubble{position:fixed;z-index:2000;max-width:260px;padding:6px 10px;font-size:0.85rem;line-height:1.4;pointer-events:none;--usa-radius:8px;white-space:normal}usa-tooltip .usa-tooltip-bubble[hidden]{display:none}";
|
|
808
|
-
|
|
809
|
-
function defineTooltip(tag = 'usa-tooltip') {
|
|
810
|
-
variants.adoptVariants();
|
|
811
|
-
return base.defineElement(tag, (Base) => class UsaTooltip extends Base {
|
|
812
|
-
constructor() {
|
|
813
|
-
super(...arguments);
|
|
814
|
-
this._tip = null;
|
|
815
|
-
}
|
|
816
|
-
static get observedAttributes() {
|
|
817
|
-
return ['text'];
|
|
818
|
-
}
|
|
819
|
-
mount() {
|
|
820
|
-
base.deprecate('usa-tooltip', '<usa-tooltip> is deprecated since 6.9 and removed in 7.0 — use <usa-tip> (motionary/components/widgets; npx usa-codemod-7).');
|
|
821
|
-
const trigger = this.firstElementChild || this;
|
|
822
|
-
const tip = document.createElement('span');
|
|
823
|
-
tip.className = 'usa-tooltip-bubble usa-surface';
|
|
824
|
-
tip.setAttribute('role', 'tooltip');
|
|
825
|
-
tip.id = nextId('usa-tip');
|
|
826
|
-
tip.textContent = this.str('text');
|
|
827
|
-
tip.hidden = true;
|
|
828
|
-
this.append(tip);
|
|
829
|
-
this._tip = tip;
|
|
830
|
-
trigger.setAttribute('aria-describedby', tip.id);
|
|
831
|
-
const later = () => {
|
|
832
|
-
clearTimeout(this._t);
|
|
833
|
-
this._t = setTimeout(() => this.show(), this.num('delay', 300));
|
|
834
|
-
};
|
|
835
|
-
this.listen(this, 'pointerenter', later);
|
|
836
|
-
this.listen(this, 'pointerleave', () => this.hide());
|
|
837
|
-
this.listen(this, 'focusin', () => this.show());
|
|
838
|
-
this.listen(this, 'focusout', () => this.hide());
|
|
839
|
-
this.listen(document, 'keydown', (e) => e.key === 'Escape' && this.hide());
|
|
840
|
-
this.onCleanup(() => {
|
|
841
|
-
clearTimeout(this._t);
|
|
842
|
-
tip.remove();
|
|
843
|
-
trigger.removeAttribute('aria-describedby');
|
|
844
|
-
});
|
|
845
|
-
}
|
|
846
|
-
show() {
|
|
847
|
-
const tip = this._tip;
|
|
848
|
-
if (!tip || !tip.hidden || !this.str('text'))
|
|
849
|
-
return;
|
|
850
|
-
clearTimeout(this._t);
|
|
851
|
-
tip.hidden = false;
|
|
852
|
-
const p = place(tip, this.firstElementChild || this, this.str('placement', 'top'));
|
|
853
|
-
const d = { top: [0, 6], bottom: [0, -6], left: [6, 0], right: [-6, 0] }[p];
|
|
854
|
-
this.motion(tip, this.reduced ? [{ opacity: 0 }, { opacity: 1 }] : [{ opacity: 0, transform: `translate(${d[0]}px, ${d[1]}px) scale(0.85)` }, { opacity: 1, transform: 'none' }], this.reduced ? { duration: 120 } : spring.springEasing('stiff'));
|
|
855
|
-
}
|
|
856
|
-
hide() {
|
|
857
|
-
clearTimeout(this._t);
|
|
858
|
-
if (this._tip)
|
|
859
|
-
this._tip.hidden = true;
|
|
860
|
-
}
|
|
861
|
-
}, { id: 'tooltip', text: css$3 });
|
|
804
|
+
}, { id: 'rating', text: css$3 });
|
|
862
805
|
}
|
|
863
806
|
|
|
864
807
|
var css$2 = "usa-popover{display:inline-block}usa-popover .usa-popover-panel{position:fixed;z-index:1500;min-width:180px;max-width:min(92vw,360px);padding:12px 14px;outline:none}usa-popover .usa-popover-panel[hidden]{display:none}";
|
|
@@ -1012,7 +955,7 @@ function defineAvatarStack(tag = 'usa-avatar-stack') {
|
|
|
1012
955
|
* motionary/components/ui — animated UI components + style variants (v2.6).
|
|
1013
956
|
* `<usa-tabs>`, `<usa-drawer>`, `<usa-bottom-sheet>`, `<usa-pull-refresh>`,
|
|
1014
957
|
* `<usa-fab>`, `<usa-navbar>`, `<usa-slider>`, `<usa-rating>`,
|
|
1015
|
-
* `<usa-
|
|
958
|
+
* `<usa-popover>`, `<usa-badge>`, `<usa-avatar-stack>`,
|
|
1016
959
|
* and `variant="minimal | neon | glass | brutalist | fluent | material"`
|
|
1017
960
|
* design tokens (`setVariant()`, `VARIANTS`).
|
|
1018
961
|
*/
|
|
@@ -1026,7 +969,6 @@ function defineUiComponents() {
|
|
|
1026
969
|
defineNavbar();
|
|
1027
970
|
defineSlider();
|
|
1028
971
|
defineRating();
|
|
1029
|
-
defineTooltip();
|
|
1030
972
|
definePopover();
|
|
1031
973
|
defineBadge();
|
|
1032
974
|
defineAvatarStack();
|
|
@@ -1046,6 +988,5 @@ exports.definePullRefresh = definePullRefresh;
|
|
|
1046
988
|
exports.defineRating = defineRating;
|
|
1047
989
|
exports.defineSlider = defineSlider;
|
|
1048
990
|
exports.defineTabs = defineTabs;
|
|
1049
|
-
exports.defineTooltip = defineTooltip;
|
|
1050
991
|
exports.defineUiComponents = defineUiComponents;
|
|
1051
992
|
//# sourceMappingURL=ui.cjs.map
|