use-scroll-animate 6.5.0 → 6.7.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 +28 -0
- package/dist/chunks/{gpu-EjV49FQk.js → gpu-CsP2ZB3x.js} +2 -2
- package/dist/chunks/{gpu-EjV49FQk.js.map → gpu-CsP2ZB3x.js.map} +1 -1
- package/dist/chunks/{registry-Bu5NrAyA.js → registry-D23neB4M.js} +2 -2
- package/dist/chunks/{registry-Bu5NrAyA.js.map → registry-D23neB4M.js.map} +1 -1
- package/dist/components/angular.js +1 -1
- package/dist/components/effects.js +1 -1
- package/dist/components/fx-3d.js +1 -1
- package/dist/components/fx-gpu.js +2 -2
- package/dist/components/fx-light.js +1 -1
- package/dist/components/fx-morph.cjs +292 -0
- package/dist/components/fx-morph.cjs.map +1 -0
- package/dist/components/fx-morph.d.cts +71 -0
- package/dist/components/fx-morph.d.ts +71 -0
- package/dist/components/fx-morph.js +287 -0
- package/dist/components/fx-morph.js.map +1 -0
- package/dist/components/fx-text.js +1 -1
- package/dist/components/fx-transitions.cjs +249 -0
- package/dist/components/fx-transitions.cjs.map +1 -0
- package/dist/components/fx-transitions.d.cts +77 -0
- package/dist/components/fx-transitions.d.ts +77 -0
- package/dist/components/fx-transitions.js +244 -0
- package/dist/components/fx-transitions.js.map +1 -0
- package/dist/components/fx.js +2 -2
- package/dist/components/fx2.cjs +14 -0
- package/dist/components/fx2.cjs.map +1 -1
- package/dist/components/fx2.d.cts +61 -1
- package/dist/components/fx2.d.ts +61 -1
- package/dist/components/fx2.js +12 -4
- package/dist/components/fx2.js.map +1 -1
- package/dist/components/solid.js +1 -1
- package/dist/components/svelte.js +1 -1
- package/dist/components/vue.js +1 -1
- package/dist/components/widgets.cjs +847 -29
- package/dist/components/widgets.cjs.map +1 -1
- package/dist/components/widgets.d.cts +140 -2
- package/dist/components/widgets.d.ts +140 -2
- package/dist/components/widgets.js +834 -30
- package/dist/components/widgets.js.map +1 -1
- package/dist/components.js +1 -1
- package/dist/widgets.umd.js +1 -1
- package/dist/widgets.umd.js.map +1 -1
- package/docs/ROADMAP.md +2 -2
- package/docs/components.md +48 -0
- package/package.json +21 -1
|
@@ -292,6 +292,136 @@ interface UsaCubeGalleryElement extends UsaElement {
|
|
|
292
292
|
}
|
|
293
293
|
declare function defineCubeGallery(tag?: string): CustomElementConstructor | undefined;
|
|
294
294
|
|
|
295
|
+
/**
|
|
296
|
+
* `<usa-dock>` (6.6) — a macOS-style dock: items magnify with a smooth
|
|
297
|
+
* cosine falloff as the pointer moves along it, neighbours make room, and a
|
|
298
|
+
* click bounces the item (`bounce`). Children are the items (`<a>` /
|
|
299
|
+
* `<button>`, each with an accessible name); `data-label` shows a tooltip
|
|
300
|
+
* label above the hovered item. Attributes: `magnify` (max scale, 1.9),
|
|
301
|
+
* `range` (px of influence, 140), `orientation="horizontal | vertical"`.
|
|
302
|
+
* Keyboard focus magnifies the focused item. Reduced motion: no
|
|
303
|
+
* magnification or bounce (labels still show).
|
|
304
|
+
*/
|
|
305
|
+
interface UsaDockElement extends UsaElement {
|
|
306
|
+
readonly items: HTMLElement[];
|
|
307
|
+
}
|
|
308
|
+
declare function defineDock(tag?: string): CustomElementConstructor | undefined;
|
|
309
|
+
|
|
310
|
+
/**
|
|
311
|
+
* `<usa-nav-morph>` (6.6) — navigation links with an indicator that morphs
|
|
312
|
+
* between them: it follows the hovered / focused link (stretching from the
|
|
313
|
+
* old one, leading edge first) and settles back on the current page
|
|
314
|
+
* (`aria-current="page"`, `active` index, or a click). `indicator="underline |
|
|
315
|
+
* pill | blob | dot"`. Arrow keys move focus across links. Event
|
|
316
|
+
* `usa:change` (`{ index }`). Reduced motion: the indicator jumps.
|
|
317
|
+
*/
|
|
318
|
+
interface UsaNavMorphElement extends UsaElement {
|
|
319
|
+
active: number;
|
|
320
|
+
}
|
|
321
|
+
declare const NAV_INDICATORS: readonly ["underline", "pill", "blob", "dot"];
|
|
322
|
+
declare function defineNavMorph(tag?: string): CustomElementConstructor | undefined;
|
|
323
|
+
|
|
324
|
+
/**
|
|
325
|
+
* `<usa-menu-toggle>` (6.6) — the hamburger button that morphs into its
|
|
326
|
+
* "open" icon: `variant="cross"` (✕, default), `arrow` (←), `minus` (—) or
|
|
327
|
+
* `plus-x` (+ turning into ✕). It is a real `<button>`-like control
|
|
328
|
+
* (`role="button"`, Space / Enter, `aria-expanded`); `for="<id>"` sets
|
|
329
|
+
* `aria-controls` and toggles the `hidden` attribute (or `.open()` /
|
|
330
|
+
* `.close()` / `.show()`) of that element. `pressed` reflects the state.
|
|
331
|
+
* Event `usa:toggle` (`{ open }`). Reduced motion: the icon switches without
|
|
332
|
+
* the morph.
|
|
333
|
+
*/
|
|
334
|
+
interface UsaMenuToggleElement extends UsaElement {
|
|
335
|
+
open: boolean;
|
|
336
|
+
toggle(force?: boolean): void;
|
|
337
|
+
}
|
|
338
|
+
declare const TOGGLE_VARIANTS: readonly ["cross", "arrow", "minus", "plus-x"];
|
|
339
|
+
declare function defineMenuToggle(tag?: string): CustomElementConstructor | undefined;
|
|
340
|
+
|
|
341
|
+
/**
|
|
342
|
+
* `<usa-tip>` (6.6) — tooltip / popover 2.0. Wrap the trigger; the tip
|
|
343
|
+
* content is the `text` attribute or a child with `[slot="tip"]` / `[data-tip]`
|
|
344
|
+
* (rich content). It springs out of the trigger with its arrow,
|
|
345
|
+
* auto-flips to stay inside the viewport and shifts along the edge.
|
|
346
|
+
* `placement="top | bottom | left | right"`, `trigger="hover | click"`
|
|
347
|
+
* (`click` = popover: toggles, Esc / outside click close), `delay` (ms).
|
|
348
|
+
* Hover tips also open on keyboard focus and close on Esc (WCAG 1.4.13).
|
|
349
|
+
* Events `usa:open`, `usa:close`. Reduced motion: a short fade.
|
|
350
|
+
*/
|
|
351
|
+
interface UsaTipElement extends UsaElement {
|
|
352
|
+
readonly opened: boolean;
|
|
353
|
+
show(): void;
|
|
354
|
+
hide(): void;
|
|
355
|
+
}
|
|
356
|
+
declare const TIP_PLACEMENTS: readonly ["top", "bottom", "left", "right"];
|
|
357
|
+
declare function defineTip(tag?: string): CustomElementConstructor | undefined;
|
|
358
|
+
|
|
359
|
+
/**
|
|
360
|
+
* `<usa-stepper>` (6.7) — a step indicator / wizard. Each child is a step
|
|
361
|
+
* (its text is the label). `value` is the current step (0-based); finished
|
|
362
|
+
* steps pop a check mark, the connecting rail fills toward the current step
|
|
363
|
+
* and the current step pulses once. `orientation="vertical"` stacks the
|
|
364
|
+
* steps. `next()` / `prev()` / `value`; event `usa:change` (`{ value }`).
|
|
365
|
+
* The list is an ordered list with `aria-current="step"`. Reduced motion: no
|
|
366
|
+
* pop or pulse, the rail jumps.
|
|
367
|
+
*/
|
|
368
|
+
interface UsaStepperElement extends UsaElement {
|
|
369
|
+
value: number;
|
|
370
|
+
readonly steps: HTMLElement[];
|
|
371
|
+
next(): void;
|
|
372
|
+
prev(): void;
|
|
373
|
+
}
|
|
374
|
+
declare function defineStepper(tag?: string): CustomElementConstructor | undefined;
|
|
375
|
+
|
|
376
|
+
/**
|
|
377
|
+
* `<usa-pagination>` (6.7) — page buttons with a sliding "ink" that springs
|
|
378
|
+
* to the current page (squashing as it travels) and numbers that slide in
|
|
379
|
+
* from the direction of travel when the window of pages shifts. Attributes
|
|
380
|
+
* `total`, `page` (1-based), `siblings` (pages each side, 1). Prev / next
|
|
381
|
+
* buttons, ellipses, `aria-current="page"`; event `usa:change` (`{ page }`).
|
|
382
|
+
* Reduced motion: the ink jumps and numbers do not slide.
|
|
383
|
+
*/
|
|
384
|
+
interface UsaPaginationElement extends UsaElement {
|
|
385
|
+
page: number;
|
|
386
|
+
readonly total: number;
|
|
387
|
+
}
|
|
388
|
+
/** The visible page list: numbers and `'…'` gaps (1-based). */
|
|
389
|
+
declare function pageWindow(page: number, total: number, siblings?: number): (number | '…')[];
|
|
390
|
+
declare function definePagination(tag?: string): CustomElementConstructor | undefined;
|
|
391
|
+
|
|
392
|
+
/**
|
|
393
|
+
* `<usa-segmented>` (6.7) — a segmented control (iOS style): a thumb slides
|
|
394
|
+
* under the chosen segment with a spring and stretches while it travels;
|
|
395
|
+
* the chosen label scales up slightly. Children are the segments (buttons
|
|
396
|
+
* or any element). It is a radio group (`role="radiogroup"`, arrow keys,
|
|
397
|
+
* Home / End, roving tabindex). `value` is the selected index; `usa:change`
|
|
398
|
+
* (`{ value, label }`). `variant="ios | pill | outline"`. Reduced motion:
|
|
399
|
+
* the thumb jumps.
|
|
400
|
+
*/
|
|
401
|
+
interface UsaSegmentedElement extends UsaElement {
|
|
402
|
+
value: number;
|
|
403
|
+
readonly segments: HTMLElement[];
|
|
404
|
+
}
|
|
405
|
+
declare const SEGMENTED_VARIANTS: readonly ["ios", "pill", "outline"];
|
|
406
|
+
declare function defineSegmented(tag?: string): CustomElementConstructor | undefined;
|
|
407
|
+
|
|
408
|
+
/**
|
|
409
|
+
* `<usa-switch>` (6.7) — toggle switch variants: `ios` (the thumb stretches
|
|
410
|
+
* while pressed and slides), `daynight` (sun → moon with stars and
|
|
411
|
+
* clouds), `bounce` (the thumb squashes and bounces at the end) and
|
|
412
|
+
* `liquid` (a gooey fill pours behind the thumb). A real switch:
|
|
413
|
+
* `role="switch"`, `aria-checked`, Space / Enter, `disabled`; `checked`
|
|
414
|
+
* property / attribute; inside a `<form>` with `name` it submits `value`
|
|
415
|
+
* ("on") when checked. Event `usa:change` (`{ checked }`). Reduced motion:
|
|
416
|
+
* no squash, bounce or pour — it just switches.
|
|
417
|
+
*/
|
|
418
|
+
interface UsaSwitchElement extends UsaElement {
|
|
419
|
+
checked: boolean;
|
|
420
|
+
toggle(force?: boolean): void;
|
|
421
|
+
}
|
|
422
|
+
declare const SWITCH_VARIANTS: readonly ["ios", "daynight", "bounce", "liquid"];
|
|
423
|
+
declare function defineSwitch(tag?: string): CustomElementConstructor | undefined;
|
|
424
|
+
|
|
295
425
|
/**
|
|
296
426
|
* motionary/components/widgets — the 6.x animated UI widgets, in their own
|
|
297
427
|
* entry so `motionary/components` and `components/lite` keep their size
|
|
@@ -329,8 +459,16 @@ declare global {
|
|
|
329
459
|
'usa-masonry-flow': UsaMasonryFlowElement;
|
|
330
460
|
'usa-compare': UsaCompareElement;
|
|
331
461
|
'usa-cube-gallery': UsaCubeGalleryElement;
|
|
462
|
+
'usa-dock': UsaDockElement;
|
|
463
|
+
'usa-nav-morph': UsaNavMorphElement;
|
|
464
|
+
'usa-menu-toggle': UsaMenuToggleElement;
|
|
465
|
+
'usa-tip': UsaTipElement;
|
|
466
|
+
'usa-stepper': UsaStepperElement;
|
|
467
|
+
'usa-pagination': UsaPaginationElement;
|
|
468
|
+
'usa-segmented': UsaSegmentedElement;
|
|
469
|
+
'usa-switch': UsaSwitchElement;
|
|
332
470
|
}
|
|
333
471
|
}
|
|
334
472
|
|
|
335
|
-
export { CAROUSEL_EFFECTS, MENU_EFFECTS, MODAL_EFFECTS, PROGRESS_VARIANTS, SHEET_SIDES, SKELETON_VARIANTS, TAB_INDICATORS, TOAST_POSITIONS, WIDGETS, WIDGET_TAGS, defineCarousel, defineCompare, defineCubeGallery, defineDisclosure, defineMasonryFlow, defineMenu, defineMilestones, defineModal, defineOdometer, defineProgressRing, defineSheet, defineSkeletonReveal, defineStarRating, defineStories, defineTabBar, defineToastStack, defineWidgets, stackToast };
|
|
336
|
-
export type { StackToastOptions, UsaCarouselElement, UsaCompareElement, UsaCubeGalleryElement, UsaDisclosureElement, UsaMasonryFlowElement, UsaMenuElement, UsaMilestonesElement, UsaModalElement, UsaOdometerElement, UsaProgressRingElement, UsaSheetElement, UsaSkeletonRevealElement, UsaStarRatingElement, UsaStoriesElement, UsaTabBarElement, UsaToastStackElement };
|
|
473
|
+
export { CAROUSEL_EFFECTS, MENU_EFFECTS, MODAL_EFFECTS, NAV_INDICATORS, PROGRESS_VARIANTS, SEGMENTED_VARIANTS, SHEET_SIDES, SKELETON_VARIANTS, SWITCH_VARIANTS, TAB_INDICATORS, TIP_PLACEMENTS, TOAST_POSITIONS, TOGGLE_VARIANTS, WIDGETS, WIDGET_TAGS, defineCarousel, defineCompare, defineCubeGallery, defineDisclosure, defineDock, defineMasonryFlow, defineMenu, defineMenuToggle, defineMilestones, defineModal, defineNavMorph, defineOdometer, definePagination, defineProgressRing, defineSegmented, defineSheet, defineSkeletonReveal, defineStarRating, defineStepper, defineStories, defineSwitch, defineTabBar, defineTip, defineToastStack, defineWidgets, pageWindow, stackToast };
|
|
474
|
+
export type { StackToastOptions, UsaCarouselElement, UsaCompareElement, UsaCubeGalleryElement, UsaDisclosureElement, UsaDockElement, UsaMasonryFlowElement, UsaMenuElement, UsaMenuToggleElement, UsaMilestonesElement, UsaModalElement, UsaNavMorphElement, UsaOdometerElement, UsaPaginationElement, UsaProgressRingElement, UsaSegmentedElement, UsaSheetElement, UsaSkeletonRevealElement, UsaStarRatingElement, UsaStepperElement, UsaStoriesElement, UsaSwitchElement, UsaTabBarElement, UsaTipElement, UsaToastStackElement };
|
|
@@ -292,6 +292,136 @@ interface UsaCubeGalleryElement extends UsaElement {
|
|
|
292
292
|
}
|
|
293
293
|
declare function defineCubeGallery(tag?: string): CustomElementConstructor | undefined;
|
|
294
294
|
|
|
295
|
+
/**
|
|
296
|
+
* `<usa-dock>` (6.6) — a macOS-style dock: items magnify with a smooth
|
|
297
|
+
* cosine falloff as the pointer moves along it, neighbours make room, and a
|
|
298
|
+
* click bounces the item (`bounce`). Children are the items (`<a>` /
|
|
299
|
+
* `<button>`, each with an accessible name); `data-label` shows a tooltip
|
|
300
|
+
* label above the hovered item. Attributes: `magnify` (max scale, 1.9),
|
|
301
|
+
* `range` (px of influence, 140), `orientation="horizontal | vertical"`.
|
|
302
|
+
* Keyboard focus magnifies the focused item. Reduced motion: no
|
|
303
|
+
* magnification or bounce (labels still show).
|
|
304
|
+
*/
|
|
305
|
+
interface UsaDockElement extends UsaElement {
|
|
306
|
+
readonly items: HTMLElement[];
|
|
307
|
+
}
|
|
308
|
+
declare function defineDock(tag?: string): CustomElementConstructor | undefined;
|
|
309
|
+
|
|
310
|
+
/**
|
|
311
|
+
* `<usa-nav-morph>` (6.6) — navigation links with an indicator that morphs
|
|
312
|
+
* between them: it follows the hovered / focused link (stretching from the
|
|
313
|
+
* old one, leading edge first) and settles back on the current page
|
|
314
|
+
* (`aria-current="page"`, `active` index, or a click). `indicator="underline |
|
|
315
|
+
* pill | blob | dot"`. Arrow keys move focus across links. Event
|
|
316
|
+
* `usa:change` (`{ index }`). Reduced motion: the indicator jumps.
|
|
317
|
+
*/
|
|
318
|
+
interface UsaNavMorphElement extends UsaElement {
|
|
319
|
+
active: number;
|
|
320
|
+
}
|
|
321
|
+
declare const NAV_INDICATORS: readonly ["underline", "pill", "blob", "dot"];
|
|
322
|
+
declare function defineNavMorph(tag?: string): CustomElementConstructor | undefined;
|
|
323
|
+
|
|
324
|
+
/**
|
|
325
|
+
* `<usa-menu-toggle>` (6.6) — the hamburger button that morphs into its
|
|
326
|
+
* "open" icon: `variant="cross"` (✕, default), `arrow` (←), `minus` (—) or
|
|
327
|
+
* `plus-x` (+ turning into ✕). It is a real `<button>`-like control
|
|
328
|
+
* (`role="button"`, Space / Enter, `aria-expanded`); `for="<id>"` sets
|
|
329
|
+
* `aria-controls` and toggles the `hidden` attribute (or `.open()` /
|
|
330
|
+
* `.close()` / `.show()`) of that element. `pressed` reflects the state.
|
|
331
|
+
* Event `usa:toggle` (`{ open }`). Reduced motion: the icon switches without
|
|
332
|
+
* the morph.
|
|
333
|
+
*/
|
|
334
|
+
interface UsaMenuToggleElement extends UsaElement {
|
|
335
|
+
open: boolean;
|
|
336
|
+
toggle(force?: boolean): void;
|
|
337
|
+
}
|
|
338
|
+
declare const TOGGLE_VARIANTS: readonly ["cross", "arrow", "minus", "plus-x"];
|
|
339
|
+
declare function defineMenuToggle(tag?: string): CustomElementConstructor | undefined;
|
|
340
|
+
|
|
341
|
+
/**
|
|
342
|
+
* `<usa-tip>` (6.6) — tooltip / popover 2.0. Wrap the trigger; the tip
|
|
343
|
+
* content is the `text` attribute or a child with `[slot="tip"]` / `[data-tip]`
|
|
344
|
+
* (rich content). It springs out of the trigger with its arrow,
|
|
345
|
+
* auto-flips to stay inside the viewport and shifts along the edge.
|
|
346
|
+
* `placement="top | bottom | left | right"`, `trigger="hover | click"`
|
|
347
|
+
* (`click` = popover: toggles, Esc / outside click close), `delay` (ms).
|
|
348
|
+
* Hover tips also open on keyboard focus and close on Esc (WCAG 1.4.13).
|
|
349
|
+
* Events `usa:open`, `usa:close`. Reduced motion: a short fade.
|
|
350
|
+
*/
|
|
351
|
+
interface UsaTipElement extends UsaElement {
|
|
352
|
+
readonly opened: boolean;
|
|
353
|
+
show(): void;
|
|
354
|
+
hide(): void;
|
|
355
|
+
}
|
|
356
|
+
declare const TIP_PLACEMENTS: readonly ["top", "bottom", "left", "right"];
|
|
357
|
+
declare function defineTip(tag?: string): CustomElementConstructor | undefined;
|
|
358
|
+
|
|
359
|
+
/**
|
|
360
|
+
* `<usa-stepper>` (6.7) — a step indicator / wizard. Each child is a step
|
|
361
|
+
* (its text is the label). `value` is the current step (0-based); finished
|
|
362
|
+
* steps pop a check mark, the connecting rail fills toward the current step
|
|
363
|
+
* and the current step pulses once. `orientation="vertical"` stacks the
|
|
364
|
+
* steps. `next()` / `prev()` / `value`; event `usa:change` (`{ value }`).
|
|
365
|
+
* The list is an ordered list with `aria-current="step"`. Reduced motion: no
|
|
366
|
+
* pop or pulse, the rail jumps.
|
|
367
|
+
*/
|
|
368
|
+
interface UsaStepperElement extends UsaElement {
|
|
369
|
+
value: number;
|
|
370
|
+
readonly steps: HTMLElement[];
|
|
371
|
+
next(): void;
|
|
372
|
+
prev(): void;
|
|
373
|
+
}
|
|
374
|
+
declare function defineStepper(tag?: string): CustomElementConstructor | undefined;
|
|
375
|
+
|
|
376
|
+
/**
|
|
377
|
+
* `<usa-pagination>` (6.7) — page buttons with a sliding "ink" that springs
|
|
378
|
+
* to the current page (squashing as it travels) and numbers that slide in
|
|
379
|
+
* from the direction of travel when the window of pages shifts. Attributes
|
|
380
|
+
* `total`, `page` (1-based), `siblings` (pages each side, 1). Prev / next
|
|
381
|
+
* buttons, ellipses, `aria-current="page"`; event `usa:change` (`{ page }`).
|
|
382
|
+
* Reduced motion: the ink jumps and numbers do not slide.
|
|
383
|
+
*/
|
|
384
|
+
interface UsaPaginationElement extends UsaElement {
|
|
385
|
+
page: number;
|
|
386
|
+
readonly total: number;
|
|
387
|
+
}
|
|
388
|
+
/** The visible page list: numbers and `'…'` gaps (1-based). */
|
|
389
|
+
declare function pageWindow(page: number, total: number, siblings?: number): (number | '…')[];
|
|
390
|
+
declare function definePagination(tag?: string): CustomElementConstructor | undefined;
|
|
391
|
+
|
|
392
|
+
/**
|
|
393
|
+
* `<usa-segmented>` (6.7) — a segmented control (iOS style): a thumb slides
|
|
394
|
+
* under the chosen segment with a spring and stretches while it travels;
|
|
395
|
+
* the chosen label scales up slightly. Children are the segments (buttons
|
|
396
|
+
* or any element). It is a radio group (`role="radiogroup"`, arrow keys,
|
|
397
|
+
* Home / End, roving tabindex). `value` is the selected index; `usa:change`
|
|
398
|
+
* (`{ value, label }`). `variant="ios | pill | outline"`. Reduced motion:
|
|
399
|
+
* the thumb jumps.
|
|
400
|
+
*/
|
|
401
|
+
interface UsaSegmentedElement extends UsaElement {
|
|
402
|
+
value: number;
|
|
403
|
+
readonly segments: HTMLElement[];
|
|
404
|
+
}
|
|
405
|
+
declare const SEGMENTED_VARIANTS: readonly ["ios", "pill", "outline"];
|
|
406
|
+
declare function defineSegmented(tag?: string): CustomElementConstructor | undefined;
|
|
407
|
+
|
|
408
|
+
/**
|
|
409
|
+
* `<usa-switch>` (6.7) — toggle switch variants: `ios` (the thumb stretches
|
|
410
|
+
* while pressed and slides), `daynight` (sun → moon with stars and
|
|
411
|
+
* clouds), `bounce` (the thumb squashes and bounces at the end) and
|
|
412
|
+
* `liquid` (a gooey fill pours behind the thumb). A real switch:
|
|
413
|
+
* `role="switch"`, `aria-checked`, Space / Enter, `disabled`; `checked`
|
|
414
|
+
* property / attribute; inside a `<form>` with `name` it submits `value`
|
|
415
|
+
* ("on") when checked. Event `usa:change` (`{ checked }`). Reduced motion:
|
|
416
|
+
* no squash, bounce or pour — it just switches.
|
|
417
|
+
*/
|
|
418
|
+
interface UsaSwitchElement extends UsaElement {
|
|
419
|
+
checked: boolean;
|
|
420
|
+
toggle(force?: boolean): void;
|
|
421
|
+
}
|
|
422
|
+
declare const SWITCH_VARIANTS: readonly ["ios", "daynight", "bounce", "liquid"];
|
|
423
|
+
declare function defineSwitch(tag?: string): CustomElementConstructor | undefined;
|
|
424
|
+
|
|
295
425
|
/**
|
|
296
426
|
* motionary/components/widgets — the 6.x animated UI widgets, in their own
|
|
297
427
|
* entry so `motionary/components` and `components/lite` keep their size
|
|
@@ -329,8 +459,16 @@ declare global {
|
|
|
329
459
|
'usa-masonry-flow': UsaMasonryFlowElement;
|
|
330
460
|
'usa-compare': UsaCompareElement;
|
|
331
461
|
'usa-cube-gallery': UsaCubeGalleryElement;
|
|
462
|
+
'usa-dock': UsaDockElement;
|
|
463
|
+
'usa-nav-morph': UsaNavMorphElement;
|
|
464
|
+
'usa-menu-toggle': UsaMenuToggleElement;
|
|
465
|
+
'usa-tip': UsaTipElement;
|
|
466
|
+
'usa-stepper': UsaStepperElement;
|
|
467
|
+
'usa-pagination': UsaPaginationElement;
|
|
468
|
+
'usa-segmented': UsaSegmentedElement;
|
|
469
|
+
'usa-switch': UsaSwitchElement;
|
|
332
470
|
}
|
|
333
471
|
}
|
|
334
472
|
|
|
335
|
-
export { CAROUSEL_EFFECTS, MENU_EFFECTS, MODAL_EFFECTS, PROGRESS_VARIANTS, SHEET_SIDES, SKELETON_VARIANTS, TAB_INDICATORS, TOAST_POSITIONS, WIDGETS, WIDGET_TAGS, defineCarousel, defineCompare, defineCubeGallery, defineDisclosure, defineMasonryFlow, defineMenu, defineMilestones, defineModal, defineOdometer, defineProgressRing, defineSheet, defineSkeletonReveal, defineStarRating, defineStories, defineTabBar, defineToastStack, defineWidgets, stackToast };
|
|
336
|
-
export type { StackToastOptions, UsaCarouselElement, UsaCompareElement, UsaCubeGalleryElement, UsaDisclosureElement, UsaMasonryFlowElement, UsaMenuElement, UsaMilestonesElement, UsaModalElement, UsaOdometerElement, UsaProgressRingElement, UsaSheetElement, UsaSkeletonRevealElement, UsaStarRatingElement, UsaStoriesElement, UsaTabBarElement, UsaToastStackElement };
|
|
473
|
+
export { CAROUSEL_EFFECTS, MENU_EFFECTS, MODAL_EFFECTS, NAV_INDICATORS, PROGRESS_VARIANTS, SEGMENTED_VARIANTS, SHEET_SIDES, SKELETON_VARIANTS, SWITCH_VARIANTS, TAB_INDICATORS, TIP_PLACEMENTS, TOAST_POSITIONS, TOGGLE_VARIANTS, WIDGETS, WIDGET_TAGS, defineCarousel, defineCompare, defineCubeGallery, defineDisclosure, defineDock, defineMasonryFlow, defineMenu, defineMenuToggle, defineMilestones, defineModal, defineNavMorph, defineOdometer, definePagination, defineProgressRing, defineSegmented, defineSheet, defineSkeletonReveal, defineStarRating, defineStepper, defineStories, defineSwitch, defineTabBar, defineTip, defineToastStack, defineWidgets, pageWindow, stackToast };
|
|
474
|
+
export type { StackToastOptions, UsaCarouselElement, UsaCompareElement, UsaCubeGalleryElement, UsaDisclosureElement, UsaDockElement, UsaMasonryFlowElement, UsaMenuElement, UsaMenuToggleElement, UsaMilestonesElement, UsaModalElement, UsaNavMorphElement, UsaOdometerElement, UsaPaginationElement, UsaProgressRingElement, UsaSegmentedElement, UsaSheetElement, UsaSkeletonRevealElement, UsaStarRatingElement, UsaStepperElement, UsaStoriesElement, UsaSwitchElement, UsaTabBarElement, UsaTipElement, UsaToastStackElement };
|