use-scroll-animate 6.1.1 → 6.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (114) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/dist/chunks/{base-Yno7N2eC.js → base-DchG4q_S.js} +2 -2
  3. package/dist/chunks/{base-Yno7N2eC.js.map → base-DchG4q_S.js.map} +1 -1
  4. package/dist/chunks/{core-BIOaYdgN.js → core-D2vF8kZb.js} +2 -2
  5. package/dist/chunks/{core-BIOaYdgN.js.map → core-D2vF8kZb.js.map} +1 -1
  6. package/dist/chunks/{core-CUGCsMsJ.js → core-DVyTlo9Q.js} +2 -2
  7. package/dist/chunks/{core-CUGCsMsJ.js.map → core-DVyTlo9Q.js.map} +1 -1
  8. package/dist/chunks/{fx-BqDeFywO.js → fx-DUMVKSvg.js} +2 -2
  9. package/dist/chunks/{fx-BqDeFywO.js.map → fx-DUMVKSvg.js.map} +1 -1
  10. package/dist/chunks/generative-BHIj-NU0.cjs +295 -0
  11. package/dist/chunks/generative-BHIj-NU0.cjs.map +1 -0
  12. package/dist/chunks/generative-BRUZaIsX.js +290 -0
  13. package/dist/chunks/generative-BRUZaIsX.js.map +1 -0
  14. package/dist/chunks/gpu-BBRLgEzM.cjs +388 -0
  15. package/dist/chunks/gpu-BBRLgEzM.cjs.map +1 -0
  16. package/dist/chunks/gpu-XHWzeNb5.js +381 -0
  17. package/dist/chunks/gpu-XHWzeNb5.js.map +1 -0
  18. package/dist/chunks/registry-Bu5NrAyA.js +121 -0
  19. package/dist/chunks/registry-Bu5NrAyA.js.map +1 -0
  20. package/dist/chunks/registry-DehBVRDV.cjs +131 -0
  21. package/dist/chunks/registry-DehBVRDV.cjs.map +1 -0
  22. package/dist/chunks/shared-eweTlzxv.js +50 -0
  23. package/dist/chunks/shared-eweTlzxv.js.map +1 -0
  24. package/dist/chunks/shared-jkgRH-Hx.cjs +58 -0
  25. package/dist/chunks/shared-jkgRH-Hx.cjs.map +1 -0
  26. package/dist/chunks/{spring-DfQO5USi.js → spring-BhoT09Qb.js} +2 -2
  27. package/dist/chunks/{spring-DfQO5USi.js.map → spring-BhoT09Qb.js.map} +1 -1
  28. package/dist/chunks/{variants-VNscPeTD.js → variants-C_hv_s23.js} +2 -2
  29. package/dist/chunks/{variants-VNscPeTD.js.map → variants-C_hv_s23.js.map} +1 -1
  30. package/dist/components/a11y.js +2 -2
  31. package/dist/components/angular.cjs +1 -0
  32. package/dist/components/angular.cjs.map +1 -1
  33. package/dist/components/angular.js +7 -6
  34. package/dist/components/angular.js.map +1 -1
  35. package/dist/components/background.js +2 -2
  36. package/dist/components/bridge.js +1 -1
  37. package/dist/components/cards.js +2 -2
  38. package/dist/components/click.js +3 -3
  39. package/dist/components/depth.js +3 -3
  40. package/dist/components/effects.cjs +72 -403
  41. package/dist/components/effects.cjs.map +1 -1
  42. package/dist/components/effects.js +9 -339
  43. package/dist/components/effects.js.map +1 -1
  44. package/dist/components/feedback.js +1 -1
  45. package/dist/components/fx-gpu.cjs +13 -0
  46. package/dist/components/fx-gpu.cjs.map +1 -0
  47. package/dist/components/fx-gpu.d.cts +63 -0
  48. package/dist/components/fx-gpu.d.ts +63 -0
  49. package/dist/components/fx-gpu.js +6 -0
  50. package/dist/components/fx-gpu.js.map +1 -0
  51. package/dist/components/fx-text.cjs +267 -0
  52. package/dist/components/fx-text.cjs.map +1 -0
  53. package/dist/components/fx-text.d.cts +70 -0
  54. package/dist/components/fx-text.d.ts +70 -0
  55. package/dist/components/fx-text.js +263 -0
  56. package/dist/components/fx-text.js.map +1 -0
  57. package/dist/components/fx.cjs +13 -133
  58. package/dist/components/fx.cjs.map +1 -1
  59. package/dist/components/fx.js +6 -125
  60. package/dist/components/fx.js.map +1 -1
  61. package/dist/components/fx2.cjs +32 -0
  62. package/dist/components/fx2.cjs.map +1 -0
  63. package/dist/components/fx2.d.cts +162 -0
  64. package/dist/components/fx2.d.ts +162 -0
  65. package/dist/components/fx2.js +22 -0
  66. package/dist/components/fx2.js.map +1 -0
  67. package/dist/components/gesture.js +4 -4
  68. package/dist/components/interaction.js +1 -1
  69. package/dist/components/layout.js +1 -1
  70. package/dist/components/lite.cjs +5 -9
  71. package/dist/components/lite.cjs.map +1 -1
  72. package/dist/components/lite.js +5 -9
  73. package/dist/components/lite.js.map +1 -1
  74. package/dist/components/packs.js +1 -1
  75. package/dist/components/page.js +3 -3
  76. package/dist/components/perf.js +2 -2
  77. package/dist/components/physics.js +3 -3
  78. package/dist/components/reveal.js +1 -1
  79. package/dist/components/solid.cjs +1 -0
  80. package/dist/components/solid.cjs.map +1 -1
  81. package/dist/components/solid.js +7 -6
  82. package/dist/components/solid.js.map +1 -1
  83. package/dist/components/svelte.cjs +1 -0
  84. package/dist/components/svelte.cjs.map +1 -1
  85. package/dist/components/svelte.js +7 -6
  86. package/dist/components/svelte.js.map +1 -1
  87. package/dist/components/svg.js +1 -1
  88. package/dist/components/text.js +2 -2
  89. package/dist/components/timeline.js +3 -3
  90. package/dist/components/transitions.js +1 -1
  91. package/dist/components/ui.js +4 -4
  92. package/dist/components/vue.cjs +1 -0
  93. package/dist/components/vue.cjs.map +1 -1
  94. package/dist/components/vue.js +7 -6
  95. package/dist/components/vue.js.map +1 -1
  96. package/dist/components/webgl.js +1 -1
  97. package/dist/components/widgets.cjs +1174 -0
  98. package/dist/components/widgets.cjs.map +1 -0
  99. package/dist/components/widgets.d.cts +206 -0
  100. package/dist/components/widgets.d.ts +206 -0
  101. package/dist/components/widgets.js +1155 -0
  102. package/dist/components/widgets.js.map +1 -0
  103. package/dist/components.cjs +10 -9
  104. package/dist/components.cjs.map +1 -1
  105. package/dist/components.js +10 -9
  106. package/dist/components.js.map +1 -1
  107. package/dist/components.umd.js +2 -2
  108. package/dist/components.umd.js.map +1 -1
  109. package/dist/index.js +2 -2
  110. package/dist/widgets.umd.js +2 -0
  111. package/dist/widgets.umd.js.map +1 -0
  112. package/docs/ROADMAP.md +10 -11
  113. package/docs/components.md +61 -0
  114. package/package.json +41 -1
@@ -0,0 +1,1174 @@
1
+ 'use strict';
2
+
3
+ var base = require('../chunks/base-BaQV-2ha.cjs');
4
+ var spring = require('../chunks/spring-Dgx187Vh.cjs');
5
+
6
+ /** Helpers shared by the 6.x widgets (`motionary/components/widgets`). */
7
+ const clampN = (v, a, b) => Math.min(b, Math.max(a, v));
8
+ /** Children of `el` that are elements and not created by the widget itself. */
9
+ const ownChildren = (el, skip = '[data-usa-part]') => Array.from(el.children).filter((c) => c instanceof HTMLElement && !c.matches(skip));
10
+ /** Create a part element (marked so re-mounts can find / skip it). */
11
+ function part(tag, cls, attrs = {}, html = '') {
12
+ const n = document.createElement(tag);
13
+ n.className = cls;
14
+ n.setAttribute('data-usa-part', '');
15
+ for (const [k, v] of Object.entries(attrs))
16
+ n.setAttribute(k, v);
17
+ if (html)
18
+ n.innerHTML = html;
19
+ return n;
20
+ }
21
+ /** Remove the parts a previous mount created. */
22
+ const dropParts = (el) => el.querySelectorAll(':scope > [data-usa-part]').forEach((n) => n.remove());
23
+ let uid = 0;
24
+ /** A document-unique id with a prefix. */
25
+ const nextId = (p) => `${p}-${++uid}`;
26
+ /** Roving arrow-key focus over `items` (horizontal or vertical); returns the new index or -1. */
27
+ function arrowIndex(e, i, n, vertical = false) {
28
+ const prev = vertical ? 'ArrowUp' : 'ArrowLeft';
29
+ const next = vertical ? 'ArrowDown' : 'ArrowRight';
30
+ if (e.key === prev)
31
+ return (i - 1 + n) % n;
32
+ if (e.key === next)
33
+ return (i + 1) % n;
34
+ if (e.key === 'Home')
35
+ return 0;
36
+ if (e.key === 'End')
37
+ return n - 1;
38
+ return -1;
39
+ }
40
+
41
+ var css$6 = "usa-carousel{display:block;position:relative;--usa-carousel-dur:520ms;--usa-carousel-ease:cubic-bezier(.22,1,.36,1);overflow:hidden;border-radius:var(--usa-radius,14px);touch-action:pan-y}.usa-carousel-viewport{position:relative;overflow:hidden;height:100%;min-height:inherit}.usa-carousel-track{display:flex;height:100%;transition:transform var(--usa-carousel-dur) var(--usa-carousel-ease);will-change:transform}.usa-carousel-track>*{flex:0 0 100%;min-width:0;box-sizing:border-box}usa-carousel:not([data-effect=\"slide\"]) .usa-carousel-track{display:grid}usa-carousel:not([data-effect=\"slide\"]) .usa-carousel-track>*{grid-area:1/1;transition:opacity var(--usa-carousel-dur) ease,transform var(--usa-carousel-dur) var(--usa-carousel-ease),filter var(--usa-carousel-dur) ease}usa-carousel[data-effect=\"cards\"] .usa-carousel-viewport{perspective:900px}usa-carousel[data-dragging] .usa-carousel-track,usa-carousel[data-dragging] .usa-carousel-track>*{transition:none}.usa-carousel-nav{position:absolute;top:50%;translate:0 -50%;z-index:2;width:36px;height:36px;border-radius:50%;border:0;background:rgba(255,255,255,.85);color:#111;font:600 18px/1 system-ui;cursor:pointer;display:grid;place-items:center;box-shadow:0 4px 14px rgba(0,0,0,.18);transition:transform .2s}.usa-carousel-nav:hover{transform:scale(1.08)}.usa-carousel-nav:focus-visible{outline:2px solid #7c5cff;outline-offset:2px}.usa-carousel-prev{left:10px}.usa-carousel-next{right:10px}.usa-carousel-dots{position:absolute;left:0;right:0;bottom:10px;display:flex;justify-content:center;gap:6px;z-index:2}.usa-carousel-dot{width:8px;height:8px;padding:0;border:0;border-radius:99px;background:rgba(255,255,255,.55);cursor:pointer;transition:width .35s var(--usa-carousel-ease),background .35s}.usa-carousel-dot[aria-current=\"true\"]{width:22px;background:#fff}@media (prefers-reduced-motion:reduce){usa-carousel .usa-carousel-track,usa-carousel .usa-carousel-track>*,.usa-carousel-dot{transition:none!important}}usa-carousel[data-reduced] .usa-carousel-track,usa-carousel[data-reduced] .usa-carousel-track>*{transition:none!important}";
42
+
43
+ const CAROUSEL_EFFECTS = ['slide', 'fade', 'scale', 'cards'];
44
+ function defineCarousel(tag = 'usa-carousel') {
45
+ return base.defineElement(tag, (Base) => {
46
+ class UsaCarousel extends Base {
47
+ constructor() {
48
+ super(...arguments);
49
+ this._i = 0;
50
+ this._slides = [];
51
+ this._track = null;
52
+ this._timer = 0;
53
+ this._hold = false;
54
+ this._dots = [];
55
+ }
56
+ static get observedAttributes() {
57
+ return ['effect', 'autoplay', 'loop', 'no-controls', 'no-dots'];
58
+ }
59
+ get length() {
60
+ return this._slides.length;
61
+ }
62
+ get index() {
63
+ return this._i;
64
+ }
65
+ set index(v) {
66
+ this.goTo(v);
67
+ }
68
+ get effect() {
69
+ const e = this.str('effect', 'slide');
70
+ return CAROUSEL_EFFECTS.includes(e) ? e : 'slide';
71
+ }
72
+ mount() {
73
+ this.dataset.effect = this.effect; // (not the observed attribute: no re-mount loop)
74
+ this.toggleAttribute('data-reduced', this.reduced);
75
+ const old = this.querySelector(':scope > .usa-carousel-viewport');
76
+ this._slides = old ? ownChildren(old.firstElementChild) : ownChildren(this);
77
+ dropParts(this);
78
+ const vp = part('div', 'usa-carousel-viewport', { 'aria-live': this.num('autoplay', 0) ? 'off' : 'polite' });
79
+ const track = part('div', 'usa-carousel-track');
80
+ this._track = track;
81
+ vp.append(track);
82
+ const n = this._slides.length;
83
+ this._slides.forEach((s, i) => {
84
+ s.setAttribute('role', 'group');
85
+ s.setAttribute('aria-roledescription', 'slide');
86
+ s.setAttribute('aria-label', `${i + 1} of ${n}`);
87
+ track.append(s);
88
+ });
89
+ this.prepend(vp);
90
+ this.setAttribute('role', 'region');
91
+ this.setAttribute('aria-roledescription', 'carousel');
92
+ this.setAttribute('aria-label', this.str('label', 'Carousel'));
93
+ if (!this.hasAttribute('tabindex'))
94
+ this.tabIndex = 0;
95
+ if (n > 1 && !this.flag('no-controls')) {
96
+ const prev = part('button', 'usa-carousel-nav usa-carousel-prev', { type: 'button', 'aria-label': 'Previous slide' }, '‹');
97
+ const next = part('button', 'usa-carousel-nav usa-carousel-next', { type: 'button', 'aria-label': 'Next slide' }, '›');
98
+ this.listen(prev, 'click', () => this.prev());
99
+ this.listen(next, 'click', () => this.next());
100
+ this.append(prev, next);
101
+ }
102
+ this._dots = [];
103
+ if (n > 1 && !this.flag('no-dots')) {
104
+ const dots = part('div', 'usa-carousel-dots', { role: 'group', 'aria-label': 'Choose slide' });
105
+ for (let i = 0; i < n; i++) {
106
+ const d = part('button', 'usa-carousel-dot', { type: 'button', 'aria-label': `Slide ${i + 1}` });
107
+ this.listen(d, 'click', () => this.goTo(i));
108
+ this._dots.push(d);
109
+ dots.append(d);
110
+ }
111
+ this.append(dots);
112
+ }
113
+ this._i = clampN(Math.round(this.num('index', 0)), 0, Math.max(0, n - 1));
114
+ this.layout(0);
115
+ this.listen(this, 'keydown', (e) => {
116
+ if (e.key === 'ArrowRight')
117
+ (e.preventDefault(), this.next());
118
+ else if (e.key === 'ArrowLeft')
119
+ (e.preventDefault(), this.prev());
120
+ });
121
+ this.drag(vp);
122
+ const ms = this.num('autoplay', 0);
123
+ if (ms > 0 && n > 1 && !this.reduced) {
124
+ let visible = true;
125
+ this.inView((v) => (visible = v));
126
+ const pause = (on) => () => (this._hold = on);
127
+ this.listen(this, 'pointerenter', pause(true));
128
+ this.listen(this, 'pointerleave', pause(false));
129
+ this.listen(this, 'focusin', pause(true));
130
+ this.listen(this, 'focusout', pause(false));
131
+ this._timer = window.setInterval(() => {
132
+ if (visible && !this._hold && !document.hidden)
133
+ this.next();
134
+ }, Math.max(1200, ms));
135
+ this.onCleanup(() => clearInterval(this._timer));
136
+ }
137
+ }
138
+ drag(vp) {
139
+ let x0 = 0;
140
+ let dx = 0;
141
+ let id = -1;
142
+ this.listen(vp, 'pointerdown', (e) => {
143
+ if (this.length < 2 || e.target.closest('button,a,input'))
144
+ return;
145
+ id = e.pointerId;
146
+ x0 = e.clientX;
147
+ dx = 0;
148
+ this.setAttribute('data-dragging', '');
149
+ });
150
+ this.listen(window, 'pointermove', (e) => {
151
+ if (e.pointerId !== id)
152
+ return;
153
+ dx = e.clientX - x0;
154
+ this.layout(dx / Math.max(1, vp.clientWidth));
155
+ });
156
+ const end = (e) => {
157
+ if (e.pointerId !== id)
158
+ return;
159
+ id = -1;
160
+ this.removeAttribute('data-dragging');
161
+ const w = Math.max(1, vp.clientWidth);
162
+ if (Math.abs(dx) > w * 0.18)
163
+ dx < 0 ? this.next() : this.prev();
164
+ else
165
+ this.layout(0);
166
+ };
167
+ this.listen(window, 'pointerup', end);
168
+ this.listen(window, 'pointercancel', end);
169
+ }
170
+ /** Position the slides (`drag` = fraction of a slide the pointer moved). */
171
+ layout(drag) {
172
+ const n = this.length;
173
+ const i = this._i;
174
+ const fx = this.effect;
175
+ if (this._track)
176
+ this._track.style.transform = fx === 'slide' ? `translateX(${(-i + drag) * 100}%)` : '';
177
+ this._slides.forEach((s, k) => {
178
+ let off = k - i + drag;
179
+ if (this.flag('loop') && n > 2) {
180
+ if (off > n / 2)
181
+ off -= n;
182
+ if (off < -n / 2)
183
+ off += n;
184
+ }
185
+ const active = k === i;
186
+ s.toggleAttribute('data-active', active);
187
+ s.setAttribute('aria-hidden', String(!active));
188
+ s.inert = !active;
189
+ if (fx === 'slide') {
190
+ s.style.transform = s.style.opacity = s.style.zIndex = s.style.filter = '';
191
+ return;
192
+ }
193
+ const a = Math.abs(off);
194
+ if (fx === 'fade') {
195
+ s.style.opacity = String(clampN(1 - a, 0, 1));
196
+ s.style.transform = '';
197
+ }
198
+ else if (fx === 'scale') {
199
+ s.style.opacity = String(clampN(1 - a, 0, 1));
200
+ s.style.transform = `scale(${1 + Math.min(1, a) * (off < 0 ? 0.12 : -0.12)})`;
201
+ }
202
+ else {
203
+ s.style.opacity = a > 2.2 ? '0' : String(1 - Math.min(a, 2) * 0.28);
204
+ s.style.transform = `translateX(${off * 58}%) translateZ(${-a * 140}px) rotateY(${clampN(-off * 38, -60, 60)}deg)`;
205
+ s.style.filter = a > 0.5 ? `brightness(${1 - Math.min(a, 2) * 0.18})` : '';
206
+ }
207
+ s.style.zIndex = String(100 - Math.round(a * 10));
208
+ });
209
+ this._dots.forEach((d, k) => d.setAttribute('aria-current', String(k === i)));
210
+ }
211
+ goTo(to) {
212
+ const n = this.length;
213
+ if (!n)
214
+ return;
215
+ const t = this.flag('loop') ? ((Math.round(to) % n) + n) % n : clampN(Math.round(to), 0, n - 1);
216
+ const from = this._i;
217
+ this._i = t;
218
+ this.layout(0);
219
+ if (t !== from)
220
+ this.emit('change', { index: t, from });
221
+ }
222
+ next() {
223
+ this.goTo(this._i + 1 >= this.length && !this.flag('loop') ? 0 : this._i + 1);
224
+ }
225
+ prev() {
226
+ this.goTo(this._i - 1 < 0 && !this.flag('loop') ? this.length - 1 : this._i - 1);
227
+ }
228
+ }
229
+ return UsaCarousel;
230
+ }, { id: 'carousel', text: css$6 });
231
+ }
232
+
233
+ var css$5 = "usa-tab-bar{display:block;--usa-tab-accent:#7c5cff;--usa-tab-ease:cubic-bezier(.22,1,.36,1)}.usa-tab-bar-list{position:relative;display:flex;gap:4px;padding:4px;border-radius:12px;background:rgba(127,127,127,.12);isolation:isolate;overflow-x:auto;scrollbar-width:none}.usa-tab-bar-list::-webkit-scrollbar{display:none}.usa-tab-bar-list>[role=\"tab\"]{position:relative;z-index:1;flex:1 0 auto;border:0;background:none;color:inherit;font:inherit;font-weight:600;padding:8px 14px;border-radius:9px;cursor:pointer;opacity:.7;transition:opacity .25s,color .25s;white-space:nowrap}.usa-tab-bar-list>[role=\"tab\"][aria-selected=\"true\"]{opacity:1}.usa-tab-bar-list>[role=\"tab\"]:focus-visible{outline:2px solid var(--usa-tab-accent);outline-offset:1px}.usa-tab-bar-ink{position:absolute;z-index:0;left:0;top:4px;bottom:4px;width:0;border-radius:9px;background:var(--usa-tab-accent);pointer-events:none}usa-tab-bar[data-indicator=\"pill\"] [aria-selected=\"true\"]{color:#fff}usa-tab-bar[data-indicator=\"underline\"] .usa-tab-bar-list{background:none;border-bottom:1px solid rgba(127,127,127,.25);border-radius:0}usa-tab-bar[data-indicator=\"underline\"] .usa-tab-bar-ink{top:auto;bottom:0;height:3px;border-radius:3px}usa-tab-bar[data-indicator=\"glow\"] .usa-tab-bar-ink{background:transparent;box-shadow:0 0 0 2px var(--usa-tab-accent),0 0 18px var(--usa-tab-accent)}usa-tab-bar[data-indicator=\"gooey\"] .usa-tab-bar-ink{filter:blur(.5px);border-radius:999px}usa-tab-bar[data-indicator=\"gooey\"] [aria-selected=\"true\"]{color:#fff}.usa-tab-bar-panel{padding:14px 2px}.usa-tab-bar-panel[hidden]{display:none}";
234
+
235
+ const TAB_INDICATORS = ['pill', 'underline', 'glow', 'gooey'];
236
+ function defineTabBar(tag = 'usa-tab-bar') {
237
+ return base.defineElement(tag, (Base) => {
238
+ class UsaTabBar extends Base {
239
+ constructor() {
240
+ super(...arguments);
241
+ this._tabs = [];
242
+ this._panels = [];
243
+ this._ink = null;
244
+ this._i = 0;
245
+ }
246
+ static get observedAttributes() {
247
+ return ['indicator'];
248
+ }
249
+ get selected() {
250
+ return this._i;
251
+ }
252
+ set selected(v) {
253
+ this.select(v);
254
+ }
255
+ mount() {
256
+ const ind = this.str('indicator', 'pill');
257
+ this.dataset.indicator = TAB_INDICATORS.includes(ind) ? ind : 'pill';
258
+ let list = this.querySelector(':scope > .usa-tab-bar-list');
259
+ if (!list) {
260
+ list = part('div', 'usa-tab-bar-list');
261
+ this.prepend(list);
262
+ }
263
+ list.setAttribute('role', 'tablist');
264
+ list.setAttribute('aria-label', this.str('label', 'Tabs'));
265
+ const kids = ownChildren(this);
266
+ this._panels = kids.filter((k) => k.hasAttribute('data-panel'));
267
+ for (const k of kids)
268
+ if (!k.hasAttribute('data-panel') && k.matches('button,[data-tab]'))
269
+ list.append(k);
270
+ this._tabs = Array.from(list.children).filter((c) => c instanceof HTMLElement && !c.classList.contains('usa-tab-bar-ink'));
271
+ this._ink = list.querySelector('.usa-tab-bar-ink') || part('span', 'usa-tab-bar-ink', { 'aria-hidden': 'true' });
272
+ list.prepend(this._ink);
273
+ this._tabs.forEach((t, i) => {
274
+ t.setAttribute('role', 'tab');
275
+ if (t.localName === 'button' && !t.hasAttribute('type'))
276
+ t.setAttribute('type', 'button');
277
+ t.id || (t.id = nextId('usa-tab'));
278
+ const p = this._panels[i];
279
+ if (p) {
280
+ p.id || (p.id = nextId('usa-tabpanel'));
281
+ p.classList.add('usa-tab-bar-panel');
282
+ p.setAttribute('role', 'tabpanel');
283
+ p.setAttribute('aria-labelledby', t.id);
284
+ p.tabIndex = 0;
285
+ t.setAttribute('aria-controls', p.id);
286
+ }
287
+ this.listen(t, 'click', () => this.select(i));
288
+ });
289
+ this.listen(list, 'keydown', (e) => {
290
+ const n = arrowIndex(e, this._i, this._tabs.length);
291
+ if (n < 0)
292
+ return;
293
+ e.preventDefault();
294
+ this.select(n);
295
+ this._tabs[n].focus();
296
+ });
297
+ this._i = Math.min(Math.max(0, Math.round(this.num('selected', 0))), Math.max(0, this._tabs.length - 1));
298
+ this.sync(-1);
299
+ if (typeof ResizeObserver === 'function') {
300
+ const ro = new ResizeObserver(() => this.place());
301
+ ro.observe(list);
302
+ this.onCleanup(() => ro.disconnect());
303
+ }
304
+ }
305
+ rect(i) {
306
+ const t = this._tabs[i];
307
+ return t ? [t.offsetLeft, t.offsetWidth] : [0, 0];
308
+ }
309
+ place() {
310
+ if (!this._ink)
311
+ return;
312
+ const [x, w] = this.rect(this._i);
313
+ this._ink.style.transform = `translateX(${x}px)`;
314
+ this._ink.style.width = `${w}px`;
315
+ }
316
+ sync(from) {
317
+ this._tabs.forEach((t, k) => {
318
+ t.setAttribute('aria-selected', String(k === this._i));
319
+ t.tabIndex = k === this._i ? 0 : -1;
320
+ });
321
+ this._panels.forEach((p, k) => (p.hidden = k !== this._i));
322
+ this.place();
323
+ if (from < 0 || from === this._i || !this._ink || this.reduced)
324
+ return;
325
+ // stretchy travel: the leading edge arrives first, the trailing edge follows
326
+ const [x0, w0] = this.rect(from);
327
+ const [x1, w1] = this.rect(this._i);
328
+ const right = x1 > x0;
329
+ const mid = right ? { transform: `translateX(${x0}px)`, width: `${x1 + w1 - x0}px` } : { transform: `translateX(${x1}px)`, width: `${x0 + w0 - x1}px` };
330
+ this.motion(this._ink, [{ transform: `translateX(${x0}px)`, width: `${w0}px` }, { ...mid, offset: 0.45 }, { transform: `translateX(${x1}px)`, width: `${w1}px` }], { duration: 480, easing: 'cubic-bezier(.22,1,.36,1)' });
331
+ const p = this._panels[this._i];
332
+ if (p)
333
+ this.motion(p, [{ opacity: 0, transform: `translateX(${right ? 24 : -24}px)` }, { opacity: 1, transform: 'none' }], { duration: 320, easing: 'cubic-bezier(.22,1,.36,1)' });
334
+ }
335
+ select(i) {
336
+ const n = Math.min(Math.max(0, Math.round(i)), this._tabs.length - 1);
337
+ if (n === this._i || n < 0)
338
+ return;
339
+ const from = this._i;
340
+ this._i = n;
341
+ this.sync(from);
342
+ this.emit('change', { index: n, from });
343
+ }
344
+ }
345
+ return UsaTabBar;
346
+ }, { id: 'tab-bar', text: css$5 });
347
+ }
348
+
349
+ var css$4 = "usa-disclosure{display:block;--usa-disclosure-accent:#7c5cff}usa-disclosure>details{border-bottom:1px solid rgba(127,127,127,.25);overflow:hidden}usa-disclosure>details>summary{list-style:none;cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 4px;font-weight:600}usa-disclosure>details>summary::-webkit-details-marker{display:none}usa-disclosure>details>summary::after{content:\"\";flex:none;width:9px;height:9px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;rotate:45deg;translate:0 -3px;transition:rotate .35s cubic-bezier(.34,1.56,.64,1),translate .35s}usa-disclosure>details[open]>summary::after{rotate:225deg;translate:0 2px}usa-disclosure>details>summary:focus-visible{outline:2px solid var(--usa-disclosure-accent);outline-offset:2px;border-radius:6px}usa-disclosure>details>:not(summary){padding:0 4px 12px}usa-disclosure[variant=\"cards\"]>details{border:1px solid rgba(127,127,127,.25);border-radius:12px;margin-bottom:8px;padding:0 10px;transition:box-shadow .3s,border-color .3s}usa-disclosure[variant=\"cards\"]>details[open]{border-color:var(--usa-disclosure-accent);box-shadow:0 8px 24px rgba(124,92,255,.16)}@media (prefers-reduced-motion:reduce){usa-disclosure>details>summary::after{transition:none}}";
350
+
351
+ function defineDisclosure(tag = 'usa-disclosure') {
352
+ return base.defineElement(tag, (Base) => {
353
+ class UsaDisclosure extends Base {
354
+ constructor() {
355
+ super(...arguments);
356
+ this._anims = new WeakMap();
357
+ }
358
+ get items() {
359
+ return Array.from(this.children).filter((c) => c.localName === 'details');
360
+ }
361
+ mount() {
362
+ this.listen(this, 'click', (e) => {
363
+ const s = e.target.closest('summary');
364
+ const d = s?.parentElement;
365
+ if (!s || !d || d.parentElement !== this)
366
+ return;
367
+ e.preventDefault();
368
+ this.set(d, !d.open);
369
+ });
370
+ }
371
+ set(d, open) {
372
+ if (open && !this.flag('multiple'))
373
+ for (const o of this.items)
374
+ if (o !== d && o.open)
375
+ this.set(o, false);
376
+ if (d.open === open && !this._anims.get(d))
377
+ return;
378
+ const summary = d.querySelector('summary');
379
+ const closedH = summary ? summary.offsetHeight : 0;
380
+ const startH = d.offsetHeight;
381
+ this._anims.get(d)?.cancel();
382
+ if (open)
383
+ d.open = true;
384
+ const endH = open ? d.scrollHeight : closedH;
385
+ const sp = spring.springEasing(this.str('spring', 'gentle'));
386
+ const a = this.reduced ? null : this.motion(d, [{ height: `${startH}px` }, { height: `${endH}px` }], { duration: Math.min(sp.duration, 700), easing: sp.easing, fill: 'forwards' });
387
+ const body = Array.from(d.children).filter((c) => c.localName !== 'summary');
388
+ if (open && !this.reduced)
389
+ body.forEach((b) => this.motion(b, [{ opacity: 0, transform: 'translateY(-6px)' }, { opacity: 1, transform: 'none' }], { duration: 300, delay: 60, easing: 'ease-out' }));
390
+ const done = () => {
391
+ this._anims.delete(d);
392
+ if (!open)
393
+ d.open = false;
394
+ a?.cancel();
395
+ };
396
+ if (a) {
397
+ this._anims.set(d, a);
398
+ a.finished.then(() => this._anims.get(d) === a && done(), () => undefined);
399
+ }
400
+ else
401
+ done();
402
+ this.emit('toggle', { index: this.items.indexOf(d), open });
403
+ }
404
+ toggle(i, force) {
405
+ const d = this.items[i];
406
+ if (d)
407
+ this.set(d, force ?? !d.open);
408
+ }
409
+ openAll() {
410
+ this.items.forEach((d) => (d.open = true));
411
+ }
412
+ closeAll() {
413
+ this.items.forEach((d) => this.set(d, false));
414
+ }
415
+ }
416
+ return UsaDisclosure;
417
+ }, { id: 'disclosure', text: css$4 });
418
+ }
419
+
420
+ var css$3 = "usa-stories{display:block;position:relative;overflow:hidden;border-radius:var(--usa-radius,16px);background:#111;color:#fff;aspect-ratio:9/14;max-height:520px;user-select:none;-webkit-user-select:none;touch-action:manipulation}usa-stories>:not([data-usa-part]){position:absolute;inset:0;opacity:0;transition:opacity .35s ease,transform .5s cubic-bezier(.22,1,.36,1);transform:scale(1.04);pointer-events:none;box-sizing:border-box}usa-stories>[data-active]:not([data-usa-part]){opacity:1;transform:none;pointer-events:auto}usa-stories>img:not([data-usa-part]){width:100%;height:100%;object-fit:cover}.usa-stories-bars{position:absolute;z-index:3;top:8px;left:8px;right:48px;display:flex;gap:4px}.usa-stories-bar{flex:1;height:3px;border-radius:3px;background:rgba(255,255,255,.35);overflow:hidden}.usa-stories-bar>i{display:block;height:100%;width:100%;background:#fff;transform-origin:left;transform:scaleX(0)}.usa-stories-bar[data-done]>i{transform:scaleX(1)}.usa-stories-toggle{position:absolute;z-index:3;top:2px;right:6px;width:36px;height:30px;border:0;background:none;color:#fff;font:700 14px/1 system-ui;cursor:pointer;border-radius:8px}.usa-stories-toggle:focus-visible{outline:2px solid #fff}@media (prefers-reduced-motion:reduce){usa-stories>*{transition:none!important;transform:none!important}}";
421
+
422
+ function defineStories(tag = 'usa-stories') {
423
+ return base.defineElement(tag, (Base) => {
424
+ class UsaStories extends Base {
425
+ constructor() {
426
+ super(...arguments);
427
+ this._i = 0;
428
+ this._items = [];
429
+ this._bars = [];
430
+ this._fill = null;
431
+ this._btn = null;
432
+ }
433
+ static get observedAttributes() {
434
+ return ['duration', 'loop'];
435
+ }
436
+ get index() {
437
+ return this._i;
438
+ }
439
+ mount() {
440
+ dropParts(this);
441
+ this._items = ownChildren(this);
442
+ const bars = part('div', 'usa-stories-bars', { 'aria-hidden': 'true' });
443
+ this._bars = this._items.map(() => {
444
+ const b = part('div', 'usa-stories-bar', {}, '<i></i>');
445
+ bars.append(b);
446
+ return b;
447
+ });
448
+ this._btn = part('button', 'usa-stories-toggle', { type: 'button' });
449
+ this.listen(this._btn, 'click', (e) => {
450
+ e.stopPropagation();
451
+ this.hasAttribute('paused') ? this.play() : this.pause();
452
+ });
453
+ this.append(bars, this._btn);
454
+ this.setAttribute('role', 'region');
455
+ this.setAttribute('aria-roledescription', 'stories');
456
+ if (!this.hasAttribute('aria-label'))
457
+ this.setAttribute('aria-label', 'Stories');
458
+ if (!this.hasAttribute('tabindex'))
459
+ this.tabIndex = 0;
460
+ if (this.reduced)
461
+ this.setAttribute('paused', '');
462
+ let held = false;
463
+ let downAt = 0;
464
+ this.listen(this, 'pointerdown', (e) => {
465
+ if (e.target.closest('button,a'))
466
+ return;
467
+ downAt = performance.now();
468
+ held = !this.hasAttribute('paused');
469
+ if (held)
470
+ this._fill?.pause();
471
+ });
472
+ this.listen(this, 'pointerup', (e) => {
473
+ if (e.target.closest('button,a') || !downAt)
474
+ return;
475
+ const long = performance.now() - downAt > 350;
476
+ downAt = 0;
477
+ if (held && !this.hasAttribute('paused'))
478
+ this._fill?.play();
479
+ if (long)
480
+ return;
481
+ const r = this.getBoundingClientRect();
482
+ e.clientX - r.left < r.width / 3 ? this.prev() : this.next();
483
+ });
484
+ this.listen(this, 'keydown', (e) => {
485
+ if (e.key === 'ArrowRight')
486
+ this.next();
487
+ else if (e.key === 'ArrowLeft')
488
+ this.prev();
489
+ else if (e.key === ' ')
490
+ (e.preventDefault(), this.hasAttribute('paused') ? this.play() : this.pause());
491
+ });
492
+ this.onCleanup(() => this._fill?.cancel());
493
+ this.goTo(Math.min(this._i, Math.max(0, this._items.length - 1)), true);
494
+ }
495
+ label() {
496
+ if (this._btn) {
497
+ const p = this.hasAttribute('paused');
498
+ this._btn.textContent = p ? '▶' : '❚❚';
499
+ this._btn.setAttribute('aria-label', p ? 'Play stories' : 'Pause stories');
500
+ }
501
+ }
502
+ goTo(i, initial = false) {
503
+ const n = this._items.length;
504
+ if (!n)
505
+ return;
506
+ if (i >= n && !this.flag('loop')) {
507
+ this.emit('end');
508
+ this.pause();
509
+ return;
510
+ }
511
+ const t = ((i % n) + n) % n;
512
+ const changed = t !== this._i || initial;
513
+ this._i = t;
514
+ this._items.forEach((s, k) => {
515
+ s.toggleAttribute('data-active', k === t);
516
+ s.setAttribute('aria-hidden', String(k !== t));
517
+ });
518
+ this._bars.forEach((b, k) => b.toggleAttribute('data-done', k < t));
519
+ this._fill?.cancel();
520
+ const fillEl = this._bars[t]?.firstElementChild;
521
+ this._fill = fillEl ? fillEl.animate?.([{ transform: 'scaleX(0)' }, { transform: 'scaleX(1)' }], { duration: Math.max(800, this.num('duration', 5000)), fill: 'forwards' }) ?? null : null;
522
+ if (this._fill) {
523
+ const a = this._fill;
524
+ a.onfinish = () => this._fill === a && this.goTo(this._i + 1);
525
+ if (this.hasAttribute('paused'))
526
+ a.pause();
527
+ }
528
+ this.label();
529
+ if (changed && !initial)
530
+ this.emit('change', { index: t });
531
+ }
532
+ next() {
533
+ this.goTo(this._i + 1);
534
+ }
535
+ prev() {
536
+ this.goTo(Math.max(0, this._i - 1));
537
+ }
538
+ pause() {
539
+ this.setAttribute('paused', '');
540
+ this._fill?.pause();
541
+ this.label();
542
+ }
543
+ play() {
544
+ this.removeAttribute('paused');
545
+ if (this._fill?.playState === 'finished')
546
+ this.goTo(this._i + 1 >= this._items.length ? 0 : this._i + 1);
547
+ else
548
+ this._fill?.play();
549
+ this.label();
550
+ }
551
+ }
552
+ return UsaStories;
553
+ }, { id: 'stories', text: css$3 });
554
+ }
555
+
556
+ var css$2 = "usa-modal,usa-sheet{display:contents}.usa-ov{border:0;padding:0;margin:auto;color:inherit;background:transparent;max-width:min(92vw,520px);max-height:88vh;overflow:visible}.usa-ov::backdrop{background:rgba(10,12,20,.45);-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px)}.usa-ov-body{box-sizing:border-box;background:var(--usa-ov-bg,#fff);color:var(--usa-ov-fg,#111827);border-radius:var(--usa-ov-radius,18px);padding:var(--usa-ov-pad,22px);box-shadow:0 30px 80px -20px rgba(0,0,0,.45);max-height:88vh;overflow:auto}.usa-sheet-panel{margin:0;max-width:none;max-height:none}usa-sheet[data-side=\"right\"] .usa-sheet-panel{inset:0 0 0 auto;height:100%;width:min(88vw,var(--usa-sheet-size,380px))}usa-sheet[data-side=\"left\"] .usa-sheet-panel{inset:0 auto 0 0;height:100%;width:min(88vw,var(--usa-sheet-size,380px))}usa-sheet[data-side=\"bottom\"] .usa-sheet-panel{inset:auto 0 0 0;width:100%;max-height:85vh}usa-sheet[data-side=\"top\"] .usa-sheet-panel{inset:0 0 auto 0;width:100%;max-height:85vh}usa-sheet .usa-ov-body{height:100%;max-height:inherit;border-radius:0}usa-sheet[data-side=\"bottom\"] .usa-ov-body{border-radius:var(--usa-ov-radius,18px) var(--usa-ov-radius,18px) 0 0;height:auto;max-height:85vh;touch-action:none}usa-sheet[data-side=\"top\"] .usa-ov-body{border-radius:0 0 var(--usa-ov-radius,18px) var(--usa-ov-radius,18px);height:auto}.usa-ov-grab{width:44px;height:5px;border-radius:3px;background:rgba(127,127,127,.45);margin:-8px auto 14px;cursor:grab}@media (prefers-color-scheme:dark){.usa-ov-body{background:var(--usa-ov-bg,#171a23);color:var(--usa-ov-fg,#e5e7eb)}}";
557
+
558
+ const MODAL_EFFECTS = ['scale', 'slide-up', 'flip', 'origin'];
559
+ const SHEET_SIDES = ['right', 'left', 'bottom', 'top'];
560
+ const EASE_OUT = 'cubic-bezier(.22,1,.36,1)';
561
+ // one delegated listener for [data-usa-open] / [data-usa-toast] triggers anywhere on the page
562
+ let delegated = false;
563
+ function delegateTriggers() {
564
+ if (delegated || typeof document === 'undefined')
565
+ return;
566
+ delegated = true;
567
+ document.addEventListener('click', (e) => {
568
+ const t = e.target?.closest?.('[data-usa-open]');
569
+ if (!t)
570
+ return;
571
+ const target = document.getElementById(t.getAttribute('data-usa-open') || '');
572
+ if (target && typeof target.show === 'function') {
573
+ e.preventDefault();
574
+ if (target.opened)
575
+ void target.close?.();
576
+ else
577
+ target.show(t);
578
+ }
579
+ });
580
+ }
581
+ function defineOverlay(tag, kind) {
582
+ delegateTriggers();
583
+ return base.defineElement(tag, (Base) => {
584
+ class UsaOverlay extends Base {
585
+ constructor() {
586
+ super(...arguments);
587
+ this._dlg = null;
588
+ this._panel = null;
589
+ this._open = false;
590
+ this._ret = null;
591
+ this._origin = null;
592
+ this._value = '';
593
+ this._closing = null;
594
+ }
595
+ static get observedAttributes() {
596
+ return kind === 'modal' ? ['effect'] : ['side'];
597
+ }
598
+ get opened() {
599
+ return this._open;
600
+ }
601
+ get returnValue() {
602
+ return this._value;
603
+ }
604
+ mount() {
605
+ let d = this.querySelector(':scope > dialog.usa-ov');
606
+ if (!d) {
607
+ d = part('dialog', `usa-ov usa-${kind}-panel`);
608
+ const body = part('div', 'usa-ov-body');
609
+ body.append(...ownChildren(this));
610
+ d.append(body);
611
+ this.append(d);
612
+ }
613
+ this._dlg = d;
614
+ this._panel = d.querySelector('.usa-ov-body');
615
+ if (kind === 'modal') {
616
+ const ef = this.str('effect', 'scale');
617
+ this.dataset.effect = MODAL_EFFECTS.includes(ef) ? ef : 'scale';
618
+ }
619
+ else {
620
+ const side = this.str('side', 'right');
621
+ this.dataset.side = SHEET_SIDES.includes(side) ? side : 'right';
622
+ if (this.dataset.side === 'bottom' && this._panel && !this._panel.querySelector('[data-handle]'))
623
+ this._panel.prepend(part('div', 'usa-ov-grab', { 'data-handle': '', 'aria-hidden': 'true' }));
624
+ this.drag();
625
+ }
626
+ if (!d.hasAttribute('aria-labelledby'))
627
+ d.setAttribute('aria-label', this.str('label', kind === 'modal' ? 'Dialog' : 'Panel'));
628
+ this.listen(d, 'cancel', (e) => {
629
+ e.preventDefault();
630
+ if (!this.flag('persistent'))
631
+ void this.close();
632
+ });
633
+ this.listen(d, 'click', (e) => {
634
+ const t = e.target;
635
+ const c = t.closest?.('[data-usa-close]');
636
+ if (c)
637
+ return void this.close(c.getAttribute('data-usa-close') || '');
638
+ if (t === d && !this.flag('persistent'))
639
+ void this.close(); // the ::backdrop
640
+ });
641
+ if (this.flag('open') && !this._open)
642
+ this.show();
643
+ }
644
+ unmount() {
645
+ if (this._open && this._dlg?.open)
646
+ this._dlg.close?.();
647
+ this._open = false;
648
+ }
649
+ frames(opening) {
650
+ const fade = [{ opacity: 0 }, { opacity: 1 }];
651
+ if (this.reduced)
652
+ return opening ? fade : [...fade].reverse();
653
+ let f;
654
+ if (kind === 'sheet') {
655
+ const s = this.dataset.side;
656
+ const off = s === 'left' ? 'translateX(-100%)' : s === 'bottom' ? 'translateY(100%)' : s === 'top' ? 'translateY(-100%)' : 'translateX(100%)';
657
+ f = [{ transform: off }, { transform: 'none' }];
658
+ }
659
+ else {
660
+ const e = this.dataset.effect;
661
+ const o = this._origin;
662
+ const r = this._dlg?.getBoundingClientRect();
663
+ if (e === 'origin' && o && r && r.width) {
664
+ const dx = o.left + o.width / 2 - (r.left + r.width / 2);
665
+ const dy = o.top + o.height / 2 - (r.top + r.height / 2);
666
+ f = [{ transform: `translate(${dx}px,${dy}px) scale(${Math.max(0.05, o.width / r.width).toFixed(3)},${Math.max(0.05, o.height / r.height).toFixed(3)})`, opacity: 0, borderRadius: '40px' }, { transform: 'none', opacity: 1 }];
667
+ }
668
+ else if (e === 'slide-up')
669
+ f = [{ transform: 'translateY(48px)', opacity: 0 }, { transform: 'none', opacity: 1 }];
670
+ else if (e === 'flip')
671
+ f = [{ transform: 'perspective(900px) rotateX(-28deg) translateY(30px)', opacity: 0 }, { transform: 'none', opacity: 1 }];
672
+ else
673
+ f = [{ transform: 'scale(.88)', opacity: 0 }, { transform: 'scale(1.015)', opacity: 1, offset: 0.7 }, { transform: 'none', opacity: 1 }];
674
+ }
675
+ return opening ? f : [f[0], f[f.length - 1]].reverse();
676
+ }
677
+ backdrop(opening) {
678
+ if (!this._dlg)
679
+ return;
680
+ const k = [{ opacity: 0 }, { opacity: 1 }];
681
+ try {
682
+ this._dlg.animate?.(opening ? k : k.reverse(), { duration: opening ? 280 : 200, pseudoElement: '::backdrop', fill: 'forwards' });
683
+ }
684
+ catch {
685
+ /* no ::backdrop animation support */
686
+ }
687
+ }
688
+ show(trigger) {
689
+ const d = this._dlg;
690
+ if (!d || this._open)
691
+ return;
692
+ this._open = true;
693
+ this._ret = trigger || document.activeElement;
694
+ this._origin = trigger ? trigger.getBoundingClientRect() : null;
695
+ if (typeof d.showModal === 'function') {
696
+ try {
697
+ d.showModal();
698
+ }
699
+ catch {
700
+ d.setAttribute('open', '');
701
+ }
702
+ }
703
+ else
704
+ d.setAttribute('open', '');
705
+ this.setAttribute('data-open', '');
706
+ this.backdrop(true);
707
+ this.motion(d, this.frames(true), { duration: this.reduced ? 150 : kind === 'sheet' ? 420 : 460, easing: EASE_OUT });
708
+ const f = d.querySelector('[autofocus]') || d.querySelector('button,[href],input,select,textarea,[tabindex]:not([tabindex="-1"])');
709
+ f?.focus?.();
710
+ this.emit('open', { trigger: trigger || null });
711
+ }
712
+ close(value = '') {
713
+ const d = this._dlg;
714
+ if (!d || !this._open)
715
+ return Promise.resolve();
716
+ if (this._closing)
717
+ return this._closing;
718
+ this._value = value;
719
+ this.backdrop(false);
720
+ const a = this.motion(d, this.frames(false), { duration: this.reduced ? 120 : 260, easing: 'cubic-bezier(.4,0,1,1)', fill: 'forwards' });
721
+ const done = () => {
722
+ this._closing = null;
723
+ this._open = false;
724
+ this.removeAttribute('data-open');
725
+ if (d.open && typeof d.close === 'function')
726
+ d.close(value);
727
+ else
728
+ d.removeAttribute('open');
729
+ a?.cancel?.();
730
+ d.style.transform = '';
731
+ this._ret?.focus?.();
732
+ this.emit('close', { value });
733
+ };
734
+ this._closing = a ? a.finished.then(done, done) : Promise.resolve().then(done);
735
+ return this._closing;
736
+ }
737
+ toggle() {
738
+ if (this._open)
739
+ void this.close();
740
+ else
741
+ this.show();
742
+ }
743
+ // bottom sheet: drag down to dismiss, springs back otherwise
744
+ drag() {
745
+ const p = this._panel;
746
+ const d = this._dlg;
747
+ if (!p || !d || this.dataset.side !== 'bottom')
748
+ return;
749
+ let y0 = -1;
750
+ let dy = 0;
751
+ let t0 = 0;
752
+ this.listen(p, 'pointerdown', (e) => {
753
+ if (!e.target.closest('[data-handle]'))
754
+ return;
755
+ y0 = e.clientY;
756
+ dy = 0;
757
+ t0 = performance.now();
758
+ e.target.setPointerCapture?.(e.pointerId);
759
+ });
760
+ this.listen(p, 'pointermove', (e) => {
761
+ if (y0 < 0)
762
+ return;
763
+ dy = Math.max(0, e.clientY - y0);
764
+ d.style.transform = `translateY(${dy}px)`;
765
+ });
766
+ const up = () => {
767
+ if (y0 < 0)
768
+ return;
769
+ y0 = -1;
770
+ const v = dy / Math.max(1, performance.now() - t0);
771
+ if (dy > d.offsetHeight * 0.3 || v > 0.6)
772
+ void this.close();
773
+ else {
774
+ this.motion(d, [{ transform: `translateY(${dy}px)` }, { transform: 'translateY(-6px)', offset: 0.6 }, { transform: 'none' }], { duration: 380, easing: EASE_OUT });
775
+ d.style.transform = '';
776
+ }
777
+ };
778
+ this.listen(p, 'pointerup', up);
779
+ this.listen(p, 'pointercancel', up);
780
+ }
781
+ }
782
+ return UsaOverlay;
783
+ }, { id: 'overlay', text: css$2 });
784
+ }
785
+ const defineModal = (tag = 'usa-modal') => defineOverlay(tag, 'modal');
786
+ const defineSheet = (tag = 'usa-sheet') => defineOverlay(tag, 'sheet');
787
+
788
+ var css$1 = "usa-toast-stack{position:fixed;z-index:2147482000;width:min(360px,calc(100vw - 24px));pointer-events:none;--usa-tstack-bg:#111827;--usa-tstack-fg:#f9fafb}usa-toast-stack[contained]{position:absolute;width:min(360px,calc(100% - 24px))}usa-toast-stack[data-position^=\"bottom\"]{bottom:12px}usa-toast-stack[data-position^=\"top\"]{top:12px}usa-toast-stack[data-position$=\"right\"]{right:12px}usa-toast-stack[data-position$=\"left\"]{left:12px}usa-toast-stack[data-position$=\"center\"]{left:50%;transform:translateX(-50%)}.usa-tstack-list{position:relative;list-style:none;margin:0;padding:0;min-height:1px;transition:height .3s}.usa-tstack{position:absolute;left:0;right:0;display:flex;align-items:center;gap:10px;box-sizing:border-box;padding:12px 12px 12px 14px;border-radius:14px;background:var(--usa-tstack-bg);color:var(--usa-tstack-fg);box-shadow:0 12px 32px -10px rgba(0,0,0,.45);font:500 14px/1.35 system-ui,sans-serif;pointer-events:auto;touch-action:pan-y;transition:transform .38s cubic-bezier(.22,1,.36,1),opacity .3s;user-select:none}usa-toast-stack[data-position^=\"bottom\"] .usa-tstack{bottom:0;transform-origin:50% 100%}usa-toast-stack[data-position^=\"top\"] .usa-tstack{top:0;transform-origin:50% 0}.usa-tstack-icon{flex:none;display:grid;place-items:center;width:22px;height:22px;border-radius:50%;font-size:13px;font-weight:800;background:#3b82f6;color:#fff}.usa-tstack-success .usa-tstack-icon{background:#22c55e}.usa-tstack-warning .usa-tstack-icon{background:#f59e0b}.usa-tstack-error .usa-tstack-icon{background:#ef4444}.usa-tstack-text{flex:1;min-width:0;display:flex;flex-direction:column}.usa-tstack-text strong{font-weight:700}.usa-tstack-action{border:0;border-radius:8px;padding:6px 10px;background:rgba(255,255,255,.14);color:inherit;font:600 13px system-ui,sans-serif;cursor:pointer}.usa-tstack-close{border:0;background:none;color:inherit;opacity:.6;font-size:18px;line-height:1;cursor:pointer;padding:2px 4px}.usa-tstack-close:hover{opacity:1}@media (prefers-reduced-motion:reduce){.usa-tstack,.usa-tstack-list{transition:none}}";
789
+
790
+ const TOAST_POSITIONS = ['bottom-right', 'bottom-left', 'bottom-center', 'top-right', 'top-left', 'top-center'];
791
+ const ICONS = { info: 'ℹ', success: '✓', warning: '!', error: '✕' };
792
+ let tid = 0;
793
+ function defineToastStack(tag = 'usa-toast-stack') {
794
+ installToastTriggers();
795
+ return base.defineElement(tag, (Base) => {
796
+ class UsaToastStack extends Base {
797
+ constructor() {
798
+ super(...arguments);
799
+ this._list = null;
800
+ this._timers = new Map();
801
+ this._hover = false;
802
+ }
803
+ static get observedAttributes() {
804
+ return ['position'];
805
+ }
806
+ get count() {
807
+ return this._list ? this._list.querySelectorAll(':scope > .usa-tstack:not([data-leaving])').length : 0;
808
+ }
809
+ mount() {
810
+ const pos = this.str('position', 'bottom-right');
811
+ this.dataset.position = TOAST_POSITIONS.includes(pos) ? pos : 'bottom-right';
812
+ this.setAttribute('role', 'region');
813
+ if (!this.hasAttribute('aria-label'))
814
+ this.setAttribute('aria-label', 'Notifications');
815
+ this._list = this.querySelector(':scope > .usa-tstack-list') || part('ol', 'usa-tstack-list', { 'aria-live': 'polite', 'aria-relevant': 'additions' });
816
+ if (!this._list.isConnected)
817
+ this.append(this._list);
818
+ const expand = (on) => {
819
+ this._hover = on;
820
+ this.toggleAttribute('data-expanded', on);
821
+ this.layout();
822
+ for (const [id, t] of this._timers)
823
+ on ? this.pause(id, t) : this.resume(id);
824
+ };
825
+ this.listen(this, 'pointerenter', () => expand(true));
826
+ this.listen(this, 'pointerleave', () => expand(false));
827
+ this.listen(this, 'focusin', () => expand(true));
828
+ this.listen(this, 'focusout', (e) => !this.contains(e.relatedTarget) && expand(false));
829
+ this.onCleanup(() => this._timers.forEach((t) => t.h && clearTimeout(t.h)));
830
+ }
831
+ pause(_id, t) {
832
+ if (!t.h)
833
+ return;
834
+ clearTimeout(t.h);
835
+ t.h = 0;
836
+ t.left -= Date.now() - t.start;
837
+ }
838
+ resume(id) {
839
+ const t = this._timers.get(id);
840
+ if (!t || t.h)
841
+ return;
842
+ t.start = Date.now();
843
+ t.h = setTimeout(() => this.dismiss(id, 'timeout'), Math.max(400, t.left));
844
+ }
845
+ show(input) {
846
+ const o = typeof input === 'string' ? { message: input } : input || {};
847
+ const id = `usa-tstack-${++tid}`;
848
+ const type = o.type && ICONS[o.type] ? o.type : 'info';
849
+ const li = part('li', `usa-tstack usa-tstack-${type}`, { id, role: type === 'error' ? 'alert' : 'status' });
850
+ li.append(part('span', 'usa-tstack-icon', { 'aria-hidden': 'true' }, ICONS[type]));
851
+ const txt = part('div', 'usa-tstack-text');
852
+ if (o.title)
853
+ txt.append(Object.assign(document.createElement('strong'), { textContent: o.title }));
854
+ if (o.message)
855
+ txt.append(Object.assign(document.createElement('span'), { textContent: o.message }));
856
+ li.append(txt);
857
+ if (o.action) {
858
+ const b = part('button', 'usa-tstack-action', { type: 'button' });
859
+ b.textContent = o.action.label;
860
+ b.addEventListener('click', () => {
861
+ o.action?.onClick?.();
862
+ this.dismiss(id, 'action');
863
+ });
864
+ li.append(b);
865
+ }
866
+ const x = part('button', 'usa-tstack-close', { type: 'button', 'aria-label': 'Dismiss' }, '×');
867
+ x.addEventListener('click', () => this.dismiss(id, 'close'));
868
+ li.append(x);
869
+ this.swipe(li, id);
870
+ this._list?.prepend(li);
871
+ const top = this.dataset.position?.startsWith('top');
872
+ this.motion(li, this.reduced ? [{ opacity: 0 }, { opacity: 1 }] : [{ opacity: 0, translate: `0 ${top ? -110 : 110}%`, scale: '0.9' }, { opacity: 1, translate: '0 0', scale: '1' }], { duration: this.reduced ? 150 : 420, easing: 'cubic-bezier(.22,1,.36,1)' });
873
+ this.layout();
874
+ const dur = o.duration ?? this.num('duration', 4000);
875
+ if (dur > 0) {
876
+ this._timers.set(id, { left: dur, start: Date.now(), h: 0 });
877
+ if (!this._hover)
878
+ this.resume(id);
879
+ }
880
+ this.emit('show', { id, ...o });
881
+ return id;
882
+ }
883
+ dismiss(id, reason = 'api') {
884
+ const li = this._list?.querySelector(`#${id}`);
885
+ const t = this._timers.get(id);
886
+ if (t?.h)
887
+ clearTimeout(t.h);
888
+ this._timers.delete(id);
889
+ if (!li || li.hasAttribute('data-leaving'))
890
+ return;
891
+ li.setAttribute('data-leaving', '');
892
+ const dx = Number(li.dataset.dx || 0);
893
+ const a = this.motion(li, this.reduced ? [{ opacity: 1 }, { opacity: 0 }] : [{ opacity: 1, transform: `translateX(${dx}px)` }, { opacity: 0, transform: `translateX(${dx >= 0 ? 120 : -120}%)` }], { duration: this.reduced ? 120 : 260, easing: 'cubic-bezier(.4,0,1,1)', fill: 'forwards' });
894
+ const rm = () => {
895
+ li.remove();
896
+ this.layout();
897
+ };
898
+ if (a)
899
+ a.finished.then(rm, rm);
900
+ else
901
+ rm();
902
+ this.emit('dismiss', { id, reason });
903
+ }
904
+ clear() {
905
+ this._list?.querySelectorAll(':scope > .usa-tstack').forEach((li) => this.dismiss(li.id, 'clear'));
906
+ }
907
+ /** Collapsed: newest in front, older ones scaled down peeking behind. Expanded: a list. */
908
+ layout() {
909
+ if (!this._list)
910
+ return;
911
+ const items = Array.from(this._list.querySelectorAll(':scope > .usa-tstack:not([data-leaving])'));
912
+ const max = Math.max(1, this.num('max', 3));
913
+ const dir = this.dataset.position?.startsWith('top') ? 1 : -1;
914
+ let y = 0;
915
+ items.forEach((li, k) => {
916
+ const h = li.offsetHeight || 56;
917
+ const tf = this._hover ? `translateY(${dir * y}px)` : `translateY(${dir * k * 10}px) scale(${(1 - k * 0.05).toFixed(3)})`;
918
+ li.style.transform = tf;
919
+ li.style.zIndex = String(100 - k);
920
+ li.style.opacity = !this._hover && k >= max ? '0' : '';
921
+ li.toggleAttribute('inert', !this._hover && k > 0);
922
+ y += h + 10;
923
+ });
924
+ this._list.style.height = this._hover && items.length ? `${y}px` : '';
925
+ }
926
+ swipe(li, id) {
927
+ let x0 = NaN;
928
+ li.addEventListener('pointerdown', (e) => {
929
+ if (e.target.closest('button'))
930
+ return;
931
+ x0 = e.clientX;
932
+ li.setPointerCapture?.(e.pointerId);
933
+ });
934
+ li.addEventListener('pointermove', (e) => {
935
+ if (Number.isNaN(x0))
936
+ return;
937
+ const dx = e.clientX - x0;
938
+ li.dataset.dx = String(dx);
939
+ li.style.translate = `${dx}px 0`;
940
+ li.style.opacity = String(Math.max(0.2, 1 - Math.abs(dx) / 240));
941
+ });
942
+ const up = () => {
943
+ if (Number.isNaN(x0))
944
+ return;
945
+ x0 = NaN;
946
+ const dx = Number(li.dataset.dx || 0);
947
+ li.style.translate = '';
948
+ li.style.opacity = '';
949
+ if (Math.abs(dx) > 80)
950
+ this.dismiss(id, 'swipe');
951
+ else
952
+ li.dataset.dx = '0';
953
+ };
954
+ li.addEventListener('pointerup', up);
955
+ li.addEventListener('pointercancel', up);
956
+ }
957
+ }
958
+ return UsaToastStack;
959
+ }, { id: 'toast', text: css$1 });
960
+ }
961
+ /** Show a toast on the first `<usa-toast-stack>` of the page (one is created when missing). */
962
+ function stackToast(input, stack) {
963
+ defineToastStack();
964
+ let s = stack || document.querySelector('usa-toast-stack');
965
+ if (!s) {
966
+ s = document.createElement('usa-toast-stack');
967
+ document.body.append(s);
968
+ }
969
+ return s.show(input);
970
+ }
971
+ let trig = false;
972
+ function installToastTriggers() {
973
+ delegateTriggers();
974
+ if (trig || typeof document === 'undefined')
975
+ return;
976
+ trig = true;
977
+ document.addEventListener('click', (e) => {
978
+ const t = e.target?.closest?.('[data-usa-toast]');
979
+ if (!t)
980
+ return;
981
+ const target = t.getAttribute('data-usa-target');
982
+ const s = target ? document.getElementById(target) : null;
983
+ stackToast({ message: t.getAttribute('data-usa-toast') || '', title: t.getAttribute('data-usa-toast-title') || undefined, type: t.getAttribute('data-usa-toast-type') || 'info' }, s);
984
+ });
985
+ }
986
+
987
+ var css = "usa-menu{position:relative;display:inline-block}.usa-menu-list{position:absolute;z-index:50;min-width:180px;max-width:min(280px,90vw);box-sizing:border-box;padding:6px;border-radius:12px;background:var(--usa-menu-bg,#fff);color:var(--usa-menu-fg,#111827);box-shadow:0 18px 44px -12px rgba(0,0,0,.35),0 0 0 1px rgba(127,127,127,.15);display:flex;flex-direction:column;gap:2px;text-align:left}.usa-menu-list[hidden]{display:none}usa-menu[data-placement^=\"bottom\"] .usa-menu-list{top:calc(100% + 6px)}usa-menu[data-placement^=\"top\"] .usa-menu-list{bottom:calc(100% + 6px)}usa-menu[data-placement$=\"start\"] .usa-menu-list{left:0;transform-origin:0 0}usa-menu[data-placement$=\"end\"] .usa-menu-list{right:0;transform-origin:100% 0}usa-menu[data-placement=\"top-start\"] .usa-menu-list{transform-origin:0 100%}usa-menu[data-placement=\"top-end\"] .usa-menu-list{transform-origin:100% 100%}.usa-menu-list>[role=\"menuitem\"]{display:flex;align-items:center;gap:8px;width:100%;box-sizing:border-box;border:0;background:none;color:inherit;font:500 14px/1.3 system-ui,sans-serif;text-align:left;text-decoration:none;padding:8px 10px;border-radius:8px;cursor:pointer}.usa-menu-list>[role=\"menuitem\"]:hover,.usa-menu-list>[role=\"menuitem\"]:focus-visible{background:var(--usa-menu-hover,rgba(124,92,255,.14));outline:none}.usa-menu-list>hr{border:0;border-top:1px solid rgba(127,127,127,.2);margin:4px 2px}@media (prefers-color-scheme:dark){.usa-menu-list{background:var(--usa-menu-bg,#1d2130);color:var(--usa-menu-fg,#e5e7eb)}}";
988
+
989
+ const MENU_EFFECTS = ['scale', 'fold', 'slide'];
990
+ function defineMenu(tag = 'usa-menu') {
991
+ return base.defineElement(tag, (Base) => {
992
+ class UsaMenu extends Base {
993
+ constructor() {
994
+ super(...arguments);
995
+ this._btn = null;
996
+ this._list = null;
997
+ this._items = [];
998
+ this._open = false;
999
+ }
1000
+ static get observedAttributes() {
1001
+ return ['placement', 'effect'];
1002
+ }
1003
+ get opened() {
1004
+ return this._open;
1005
+ }
1006
+ mount() {
1007
+ const kids = ownChildren(this);
1008
+ this._btn = kids.find((k) => k.hasAttribute('data-trigger')) || kids[0] || null;
1009
+ let list = this.querySelector(':scope > .usa-menu-list');
1010
+ if (!list) {
1011
+ list = part('div', 'usa-menu-list', { role: 'menu' });
1012
+ for (const k of kids)
1013
+ if (k !== this._btn)
1014
+ list.append(k);
1015
+ this.append(list);
1016
+ }
1017
+ this._list = list;
1018
+ list.id || (list.id = nextId('usa-menu'));
1019
+ list.hidden = !this._open;
1020
+ const pl = this.str('placement', 'bottom-start');
1021
+ this.dataset.placement = /^(bottom|top)-(start|end)$/.test(pl) ? pl : 'bottom-start';
1022
+ const ef = this.str('effect', 'scale');
1023
+ this.dataset.effect = MENU_EFFECTS.includes(ef) ? ef : 'scale';
1024
+ this._items = Array.from(list.children).filter((c) => c instanceof HTMLElement && !c.matches('hr,[role="separator"]'));
1025
+ list.querySelectorAll('hr').forEach((h) => h.setAttribute('role', 'separator'));
1026
+ this._items.forEach((it, i) => {
1027
+ it.setAttribute('role', 'menuitem');
1028
+ it.tabIndex = -1;
1029
+ if (it.localName === 'button' && !it.hasAttribute('type'))
1030
+ it.setAttribute('type', 'button');
1031
+ this.listen(it, 'click', () => {
1032
+ this.emit('select', { index: i, value: it.dataset.value || (it.textContent || '').trim(), item: it });
1033
+ this.close(true);
1034
+ });
1035
+ });
1036
+ const b = this._btn;
1037
+ if (b) {
1038
+ b.setAttribute('aria-haspopup', 'menu');
1039
+ b.setAttribute('aria-expanded', String(this._open));
1040
+ b.setAttribute('aria-controls', list.id);
1041
+ if (b.localName === 'button' && !b.hasAttribute('type'))
1042
+ b.setAttribute('type', 'button');
1043
+ this.listen(b, 'click', () => this.toggle());
1044
+ this.listen(b, 'keydown', (e) => {
1045
+ if (e.key === 'ArrowDown' || e.key === 'ArrowUp') {
1046
+ e.preventDefault();
1047
+ this.open(e.key === 'ArrowUp' ? 'last' : 'first');
1048
+ }
1049
+ });
1050
+ }
1051
+ this.listen(list, 'keydown', (e) => {
1052
+ const n = this._items.length;
1053
+ const i = this._items.indexOf(document.activeElement);
1054
+ let j = -1;
1055
+ if (e.key === 'ArrowDown')
1056
+ j = (i + 1) % n;
1057
+ else if (e.key === 'ArrowUp')
1058
+ j = (i - 1 + n) % n;
1059
+ else if (e.key === 'Home')
1060
+ j = 0;
1061
+ else if (e.key === 'End')
1062
+ j = n - 1;
1063
+ else if (e.key === 'Escape') {
1064
+ e.preventDefault();
1065
+ return this.close(true);
1066
+ }
1067
+ else if (e.key === 'Tab')
1068
+ return this.close(false);
1069
+ if (j >= 0) {
1070
+ e.preventDefault();
1071
+ this._items[j]?.focus();
1072
+ }
1073
+ });
1074
+ this.listen(document, 'pointerdown', (e) => {
1075
+ if (this._open && !this.contains(e.target))
1076
+ this.close(false);
1077
+ });
1078
+ }
1079
+ open(focus = 'first') {
1080
+ const l = this._list;
1081
+ if (!l || this._open)
1082
+ return;
1083
+ this._open = true;
1084
+ l.hidden = false;
1085
+ this._btn?.setAttribute('aria-expanded', 'true');
1086
+ this.setAttribute('data-open', '');
1087
+ const ef = this.dataset.effect;
1088
+ if (this.reduced)
1089
+ this.motion(l, [{ opacity: 0 }, { opacity: 1 }], { duration: 120 });
1090
+ else {
1091
+ const f = ef === 'fold' ? [{ transform: 'perspective(600px) rotateX(-70deg)', opacity: 0 }, { transform: 'none', opacity: 1 }] : ef === 'slide' ? [{ transform: 'translateY(-10px)', opacity: 0, clipPath: 'inset(0 0 100% 0 round 12px)' }, { transform: 'none', opacity: 1, clipPath: 'inset(0 0 0 0 round 12px)' }] : [{ transform: 'scale(.6)', opacity: 0 }, { transform: 'scale(1.03)', opacity: 1, offset: 0.7 }, { transform: 'none', opacity: 1 }];
1092
+ this.motion(l, f, { duration: 300, easing: 'cubic-bezier(.22,1,.36,1)' });
1093
+ this._items.forEach((it, i) => this.motion(it, [{ opacity: 0, transform: 'translateY(-6px)' }, { opacity: 1, transform: 'none' }], { duration: 260, delay: 40 + i * 35, easing: 'cubic-bezier(.22,1,.36,1)', fill: 'backwards' }));
1094
+ }
1095
+ (focus === 'last' ? this._items[this._items.length - 1] : this._items[0])?.focus();
1096
+ this.emit('open');
1097
+ }
1098
+ close(focusTrigger = false) {
1099
+ const l = this._list;
1100
+ if (!l || !this._open)
1101
+ return;
1102
+ this._open = false;
1103
+ this._btn?.setAttribute('aria-expanded', 'false');
1104
+ this.removeAttribute('data-open');
1105
+ const a = this.motion(l, [{ opacity: 1, transform: 'none' }, { opacity: 0, transform: this.reduced ? 'none' : 'scale(.96)' }], { duration: this.reduced ? 80 : 150, easing: 'ease-in' });
1106
+ const hide = () => {
1107
+ if (!this._open)
1108
+ l.hidden = true;
1109
+ };
1110
+ if (a)
1111
+ a.finished.then(hide, hide);
1112
+ else
1113
+ hide();
1114
+ if (focusTrigger)
1115
+ this._btn?.focus();
1116
+ this.emit('close');
1117
+ }
1118
+ toggle() {
1119
+ if (this._open)
1120
+ this.close(true);
1121
+ else
1122
+ this.open();
1123
+ }
1124
+ }
1125
+ return UsaMenu;
1126
+ }, { id: 'menu', text: css });
1127
+ }
1128
+
1129
+ /**
1130
+ * motionary/components/widgets — the 6.x animated UI widgets, in their own
1131
+ * entry so `motionary/components` and `components/lite` keep their size
1132
+ * budgets. Every widget is reduced-motion safe and keyboard accessible.
1133
+ *
1134
+ * ```ts
1135
+ * import { defineWidgets } from 'motionary/components/widgets';
1136
+ * defineWidgets(); // or defineCarousel(), defineTabBar(), …
1137
+ * ```
1138
+ * No build step: `<script src="https://unpkg.com/motionary@6/dist/widgets.umd.js">`
1139
+ * (registers every widget and every 6.x effect pack; `window.UsaWidgets`).
1140
+ */
1141
+ /** The widgets by release (tag → define function). */
1142
+ const WIDGETS = {
1143
+ '6.2': { 'usa-carousel': defineCarousel, 'usa-tab-bar': defineTabBar, 'usa-disclosure': defineDisclosure, 'usa-stories': defineStories },
1144
+ '6.3': { 'usa-toast-stack': defineToastStack, 'usa-modal': defineModal, 'usa-sheet': defineSheet, 'usa-menu': defineMenu },
1145
+ };
1146
+ /** Every widget tag, in release order. */
1147
+ const WIDGET_TAGS = Object.values(WIDGETS).flatMap((g) => Object.keys(g));
1148
+ /** Register every widget (or only those of one release, e.g. `'6.2'`) under its default tag. */
1149
+ function defineWidgets(release) {
1150
+ for (const [v, group] of Object.entries(WIDGETS))
1151
+ if (!release || release === v)
1152
+ for (const [tag, fn] of Object.entries(group))
1153
+ fn(tag);
1154
+ }
1155
+
1156
+ exports.CAROUSEL_EFFECTS = CAROUSEL_EFFECTS;
1157
+ exports.MENU_EFFECTS = MENU_EFFECTS;
1158
+ exports.MODAL_EFFECTS = MODAL_EFFECTS;
1159
+ exports.SHEET_SIDES = SHEET_SIDES;
1160
+ exports.TAB_INDICATORS = TAB_INDICATORS;
1161
+ exports.TOAST_POSITIONS = TOAST_POSITIONS;
1162
+ exports.WIDGETS = WIDGETS;
1163
+ exports.WIDGET_TAGS = WIDGET_TAGS;
1164
+ exports.defineCarousel = defineCarousel;
1165
+ exports.defineDisclosure = defineDisclosure;
1166
+ exports.defineMenu = defineMenu;
1167
+ exports.defineModal = defineModal;
1168
+ exports.defineSheet = defineSheet;
1169
+ exports.defineStories = defineStories;
1170
+ exports.defineTabBar = defineTabBar;
1171
+ exports.defineToastStack = defineToastStack;
1172
+ exports.defineWidgets = defineWidgets;
1173
+ exports.stackToast = stackToast;
1174
+ //# sourceMappingURL=widgets.cjs.map