use-scroll-animate 6.6.0 → 6.8.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 +29 -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.js +1 -1
- package/dist/components/fx-physics.cjs +344 -0
- package/dist/components/fx-physics.cjs.map +1 -0
- package/dist/components/fx-physics.d.cts +92 -0
- package/dist/components/fx-physics.d.ts +92 -0
- package/dist/components/fx-physics.js +340 -0
- package/dist/components/fx-physics.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-weather.cjs +265 -0
- package/dist/components/fx-weather.cjs.map +1 -0
- package/dist/components/fx-weather.d.cts +70 -0
- package/dist/components/fx-weather.d.ts +70 -0
- package/dist/components/fx-weather.js +261 -0
- package/dist/components/fx-weather.js.map +1 -0
- package/dist/components/fx.js +2 -2
- package/dist/components/fx2.cjs +19 -0
- package/dist/components/fx2.cjs.map +1 -1
- package/dist/components/fx2.d.cts +107 -1
- package/dist/components/fx2.d.ts +107 -1
- package/dist/components/fx2.js +16 -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 +1033 -37
- package/dist/components/widgets.cjs.map +1 -1
- package/dist/components/widgets.d.cts +143 -2
- package/dist/components/widgets.d.ts +143 -2
- package/dist/components/widgets.js +1022 -38
- 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 +50 -0
- package/package.json +31 -1
|
@@ -356,6 +356,139 @@ interface UsaTipElement extends UsaElement {
|
|
|
356
356
|
declare const TIP_PLACEMENTS: readonly ["top", "bottom", "left", "right"];
|
|
357
357
|
declare function defineTip(tag?: string): CustomElementConstructor | undefined;
|
|
358
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
|
+
|
|
425
|
+
/**
|
|
426
|
+
* `<usa-kanban>` (6.8) — a kanban board with drag-sort. Children are the
|
|
427
|
+
* columns (any element; a `[data-title]` attribute or its first heading is
|
|
428
|
+
* the title); the column's `[data-card]` children (or `<li>`s) are cards.
|
|
429
|
+
* Drag a card (pointer or touch): it lifts and tilts toward the drag
|
|
430
|
+
* direction, a placeholder opens where it will land, and the other cards
|
|
431
|
+
* glide out of the way (FLIP). Keyboard: Space / Enter picks a card up,
|
|
432
|
+
* arrows move it (← → between columns, ↑ ↓ within), Space drops, Esc cancels;
|
|
433
|
+
* moves are announced politely. Event `usa:move` (`{ card, from, to, index }`).
|
|
434
|
+
* Reduced motion: no tilt or glide.
|
|
435
|
+
*/
|
|
436
|
+
interface UsaKanbanElement extends UsaElement {
|
|
437
|
+
readonly columns: HTMLElement[];
|
|
438
|
+
cardsOf(col: HTMLElement): HTMLElement[];
|
|
439
|
+
move(card: HTMLElement, to: HTMLElement, index: number): void;
|
|
440
|
+
}
|
|
441
|
+
declare function defineKanban(tag?: string): CustomElementConstructor | undefined;
|
|
442
|
+
|
|
443
|
+
/**
|
|
444
|
+
* `<usa-swipe-deck>` (6.8) — a stack of swipe cards (Tinder style). Drag the
|
|
445
|
+
* top card: it follows the pointer and rotates, "LIKE" / "NOPE" stamps fade
|
|
446
|
+
* in, and past `threshold` px (or a fast fling) it flies off; otherwise it
|
|
447
|
+
* springs back. The next card scales up from behind. Buttons / keys:
|
|
448
|
+
* `like()`, `nope()`, ← / →, and `undo()` brings the last card back.
|
|
449
|
+
* Event `usa:swipe` (`{ card, dir: 'left' | 'right', index }`) and
|
|
450
|
+
* `usa:empty`. Reduced motion: cards fade instead of flying.
|
|
451
|
+
*/
|
|
452
|
+
interface UsaSwipeDeckElement extends UsaElement {
|
|
453
|
+
readonly cards: HTMLElement[];
|
|
454
|
+
readonly top: HTMLElement | null;
|
|
455
|
+
like(): void;
|
|
456
|
+
nope(): void;
|
|
457
|
+
undo(): void;
|
|
458
|
+
}
|
|
459
|
+
declare function defineSwipeDeck(tag?: string): CustomElementConstructor | undefined;
|
|
460
|
+
|
|
461
|
+
/**
|
|
462
|
+
* `<usa-weather-card>` (6.8) — an animated weather widget. `condition`
|
|
463
|
+
* (`clear | cloudy | rain | snow | storm | fog | night`) picks an animated
|
|
464
|
+
* icon and sky (sun rays turn, clouds drift, rain and snow fall, a gentle —
|
|
465
|
+
* flash-safe — bolt, fog bands, twinkling stars); `temp` counts up to the
|
|
466
|
+
* value, `unit` (°), `place` and `label` fill the text. Changing `condition`
|
|
467
|
+
* cross-fades the scene. Reduced motion: static icon, no count-up. The scene
|
|
468
|
+
* is decorative; the text is the accessible summary (`role="group"` with an
|
|
469
|
+
* `aria-label` like "Rain, 12°, Lisbon").
|
|
470
|
+
*/
|
|
471
|
+
interface UsaWeatherCardElement extends UsaElement {
|
|
472
|
+
condition: string;
|
|
473
|
+
}
|
|
474
|
+
declare const WEATHER_CONDITIONS: readonly ["clear", "cloudy", "rain", "snow", "storm", "fog", "night"];
|
|
475
|
+
declare function defineWeatherCard(tag?: string): CustomElementConstructor | undefined;
|
|
476
|
+
|
|
477
|
+
/**
|
|
478
|
+
* `<usa-pull-cord>` (6.8) — a lamp pull-cord switch. Drag the handle down
|
|
479
|
+
* (or click / Space / Enter): the cord stretches, and when released past
|
|
480
|
+
* `threshold` px it toggles `on` with a click-bounce; the cord swings back on
|
|
481
|
+
* a damped spring (simulated, drawn as an SVG curve). The lamp shade above
|
|
482
|
+
* glows when on (CSS custom property `--usa-pc-glow`). A real switch:
|
|
483
|
+
* `role="switch"`, `aria-checked`; event `usa:change` (`{ on }`). Reduced
|
|
484
|
+
* motion: no swing — it just toggles.
|
|
485
|
+
*/
|
|
486
|
+
interface UsaPullCordElement extends UsaElement {
|
|
487
|
+
on: boolean;
|
|
488
|
+
toggle(force?: boolean): void;
|
|
489
|
+
}
|
|
490
|
+
declare function definePullCord(tag?: string): CustomElementConstructor | undefined;
|
|
491
|
+
|
|
359
492
|
/**
|
|
360
493
|
* motionary/components/widgets — the 6.x animated UI widgets, in their own
|
|
361
494
|
* entry so `motionary/components` and `components/lite` keep their size
|
|
@@ -397,8 +530,16 @@ declare global {
|
|
|
397
530
|
'usa-nav-morph': UsaNavMorphElement;
|
|
398
531
|
'usa-menu-toggle': UsaMenuToggleElement;
|
|
399
532
|
'usa-tip': UsaTipElement;
|
|
533
|
+
'usa-stepper': UsaStepperElement;
|
|
534
|
+
'usa-pagination': UsaPaginationElement;
|
|
535
|
+
'usa-segmented': UsaSegmentedElement;
|
|
536
|
+
'usa-switch': UsaSwitchElement;
|
|
537
|
+
'usa-kanban': UsaKanbanElement;
|
|
538
|
+
'usa-swipe-deck': UsaSwipeDeckElement;
|
|
539
|
+
'usa-weather-card': UsaWeatherCardElement;
|
|
540
|
+
'usa-pull-cord': UsaPullCordElement;
|
|
400
541
|
}
|
|
401
542
|
}
|
|
402
543
|
|
|
403
|
-
export { CAROUSEL_EFFECTS, MENU_EFFECTS, MODAL_EFFECTS, NAV_INDICATORS, PROGRESS_VARIANTS, SHEET_SIDES, SKELETON_VARIANTS, TAB_INDICATORS, TIP_PLACEMENTS, TOAST_POSITIONS, TOGGLE_VARIANTS, WIDGETS, WIDGET_TAGS, defineCarousel, defineCompare, defineCubeGallery, defineDisclosure, defineDock, defineMasonryFlow, defineMenu, defineMenuToggle, defineMilestones, defineModal, defineNavMorph, defineOdometer, defineProgressRing, defineSheet, defineSkeletonReveal, defineStarRating, defineStories, defineTabBar, defineTip, defineToastStack, defineWidgets, stackToast };
|
|
404
|
-
export type { StackToastOptions, UsaCarouselElement, UsaCompareElement, UsaCubeGalleryElement, UsaDisclosureElement, UsaDockElement, UsaMasonryFlowElement, UsaMenuElement, UsaMenuToggleElement, UsaMilestonesElement, UsaModalElement, UsaNavMorphElement, UsaOdometerElement, UsaProgressRingElement, UsaSheetElement, UsaSkeletonRevealElement, UsaStarRatingElement, UsaStoriesElement, UsaTabBarElement, UsaTipElement, UsaToastStackElement };
|
|
544
|
+
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, WEATHER_CONDITIONS, WIDGETS, WIDGET_TAGS, defineCarousel, defineCompare, defineCubeGallery, defineDisclosure, defineDock, defineKanban, defineMasonryFlow, defineMenu, defineMenuToggle, defineMilestones, defineModal, defineNavMorph, defineOdometer, definePagination, defineProgressRing, definePullCord, defineSegmented, defineSheet, defineSkeletonReveal, defineStarRating, defineStepper, defineStories, defineSwipeDeck, defineSwitch, defineTabBar, defineTip, defineToastStack, defineWeatherCard, defineWidgets, pageWindow, stackToast };
|
|
545
|
+
export type { StackToastOptions, UsaCarouselElement, UsaCompareElement, UsaCubeGalleryElement, UsaDisclosureElement, UsaDockElement, UsaKanbanElement, UsaMasonryFlowElement, UsaMenuElement, UsaMenuToggleElement, UsaMilestonesElement, UsaModalElement, UsaNavMorphElement, UsaOdometerElement, UsaPaginationElement, UsaProgressRingElement, UsaPullCordElement, UsaSegmentedElement, UsaSheetElement, UsaSkeletonRevealElement, UsaStarRatingElement, UsaStepperElement, UsaStoriesElement, UsaSwipeDeckElement, UsaSwitchElement, UsaTabBarElement, UsaTipElement, UsaToastStackElement, UsaWeatherCardElement };
|
|
@@ -356,6 +356,139 @@ interface UsaTipElement extends UsaElement {
|
|
|
356
356
|
declare const TIP_PLACEMENTS: readonly ["top", "bottom", "left", "right"];
|
|
357
357
|
declare function defineTip(tag?: string): CustomElementConstructor | undefined;
|
|
358
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
|
+
|
|
425
|
+
/**
|
|
426
|
+
* `<usa-kanban>` (6.8) — a kanban board with drag-sort. Children are the
|
|
427
|
+
* columns (any element; a `[data-title]` attribute or its first heading is
|
|
428
|
+
* the title); the column's `[data-card]` children (or `<li>`s) are cards.
|
|
429
|
+
* Drag a card (pointer or touch): it lifts and tilts toward the drag
|
|
430
|
+
* direction, a placeholder opens where it will land, and the other cards
|
|
431
|
+
* glide out of the way (FLIP). Keyboard: Space / Enter picks a card up,
|
|
432
|
+
* arrows move it (← → between columns, ↑ ↓ within), Space drops, Esc cancels;
|
|
433
|
+
* moves are announced politely. Event `usa:move` (`{ card, from, to, index }`).
|
|
434
|
+
* Reduced motion: no tilt or glide.
|
|
435
|
+
*/
|
|
436
|
+
interface UsaKanbanElement extends UsaElement {
|
|
437
|
+
readonly columns: HTMLElement[];
|
|
438
|
+
cardsOf(col: HTMLElement): HTMLElement[];
|
|
439
|
+
move(card: HTMLElement, to: HTMLElement, index: number): void;
|
|
440
|
+
}
|
|
441
|
+
declare function defineKanban(tag?: string): CustomElementConstructor | undefined;
|
|
442
|
+
|
|
443
|
+
/**
|
|
444
|
+
* `<usa-swipe-deck>` (6.8) — a stack of swipe cards (Tinder style). Drag the
|
|
445
|
+
* top card: it follows the pointer and rotates, "LIKE" / "NOPE" stamps fade
|
|
446
|
+
* in, and past `threshold` px (or a fast fling) it flies off; otherwise it
|
|
447
|
+
* springs back. The next card scales up from behind. Buttons / keys:
|
|
448
|
+
* `like()`, `nope()`, ← / →, and `undo()` brings the last card back.
|
|
449
|
+
* Event `usa:swipe` (`{ card, dir: 'left' | 'right', index }`) and
|
|
450
|
+
* `usa:empty`. Reduced motion: cards fade instead of flying.
|
|
451
|
+
*/
|
|
452
|
+
interface UsaSwipeDeckElement extends UsaElement {
|
|
453
|
+
readonly cards: HTMLElement[];
|
|
454
|
+
readonly top: HTMLElement | null;
|
|
455
|
+
like(): void;
|
|
456
|
+
nope(): void;
|
|
457
|
+
undo(): void;
|
|
458
|
+
}
|
|
459
|
+
declare function defineSwipeDeck(tag?: string): CustomElementConstructor | undefined;
|
|
460
|
+
|
|
461
|
+
/**
|
|
462
|
+
* `<usa-weather-card>` (6.8) — an animated weather widget. `condition`
|
|
463
|
+
* (`clear | cloudy | rain | snow | storm | fog | night`) picks an animated
|
|
464
|
+
* icon and sky (sun rays turn, clouds drift, rain and snow fall, a gentle —
|
|
465
|
+
* flash-safe — bolt, fog bands, twinkling stars); `temp` counts up to the
|
|
466
|
+
* value, `unit` (°), `place` and `label` fill the text. Changing `condition`
|
|
467
|
+
* cross-fades the scene. Reduced motion: static icon, no count-up. The scene
|
|
468
|
+
* is decorative; the text is the accessible summary (`role="group"` with an
|
|
469
|
+
* `aria-label` like "Rain, 12°, Lisbon").
|
|
470
|
+
*/
|
|
471
|
+
interface UsaWeatherCardElement extends UsaElement {
|
|
472
|
+
condition: string;
|
|
473
|
+
}
|
|
474
|
+
declare const WEATHER_CONDITIONS: readonly ["clear", "cloudy", "rain", "snow", "storm", "fog", "night"];
|
|
475
|
+
declare function defineWeatherCard(tag?: string): CustomElementConstructor | undefined;
|
|
476
|
+
|
|
477
|
+
/**
|
|
478
|
+
* `<usa-pull-cord>` (6.8) — a lamp pull-cord switch. Drag the handle down
|
|
479
|
+
* (or click / Space / Enter): the cord stretches, and when released past
|
|
480
|
+
* `threshold` px it toggles `on` with a click-bounce; the cord swings back on
|
|
481
|
+
* a damped spring (simulated, drawn as an SVG curve). The lamp shade above
|
|
482
|
+
* glows when on (CSS custom property `--usa-pc-glow`). A real switch:
|
|
483
|
+
* `role="switch"`, `aria-checked`; event `usa:change` (`{ on }`). Reduced
|
|
484
|
+
* motion: no swing — it just toggles.
|
|
485
|
+
*/
|
|
486
|
+
interface UsaPullCordElement extends UsaElement {
|
|
487
|
+
on: boolean;
|
|
488
|
+
toggle(force?: boolean): void;
|
|
489
|
+
}
|
|
490
|
+
declare function definePullCord(tag?: string): CustomElementConstructor | undefined;
|
|
491
|
+
|
|
359
492
|
/**
|
|
360
493
|
* motionary/components/widgets — the 6.x animated UI widgets, in their own
|
|
361
494
|
* entry so `motionary/components` and `components/lite` keep their size
|
|
@@ -397,8 +530,16 @@ declare global {
|
|
|
397
530
|
'usa-nav-morph': UsaNavMorphElement;
|
|
398
531
|
'usa-menu-toggle': UsaMenuToggleElement;
|
|
399
532
|
'usa-tip': UsaTipElement;
|
|
533
|
+
'usa-stepper': UsaStepperElement;
|
|
534
|
+
'usa-pagination': UsaPaginationElement;
|
|
535
|
+
'usa-segmented': UsaSegmentedElement;
|
|
536
|
+
'usa-switch': UsaSwitchElement;
|
|
537
|
+
'usa-kanban': UsaKanbanElement;
|
|
538
|
+
'usa-swipe-deck': UsaSwipeDeckElement;
|
|
539
|
+
'usa-weather-card': UsaWeatherCardElement;
|
|
540
|
+
'usa-pull-cord': UsaPullCordElement;
|
|
400
541
|
}
|
|
401
542
|
}
|
|
402
543
|
|
|
403
|
-
export { CAROUSEL_EFFECTS, MENU_EFFECTS, MODAL_EFFECTS, NAV_INDICATORS, PROGRESS_VARIANTS, SHEET_SIDES, SKELETON_VARIANTS, TAB_INDICATORS, TIP_PLACEMENTS, TOAST_POSITIONS, TOGGLE_VARIANTS, WIDGETS, WIDGET_TAGS, defineCarousel, defineCompare, defineCubeGallery, defineDisclosure, defineDock, defineMasonryFlow, defineMenu, defineMenuToggle, defineMilestones, defineModal, defineNavMorph, defineOdometer, defineProgressRing, defineSheet, defineSkeletonReveal, defineStarRating, defineStories, defineTabBar, defineTip, defineToastStack, defineWidgets, stackToast };
|
|
404
|
-
export type { StackToastOptions, UsaCarouselElement, UsaCompareElement, UsaCubeGalleryElement, UsaDisclosureElement, UsaDockElement, UsaMasonryFlowElement, UsaMenuElement, UsaMenuToggleElement, UsaMilestonesElement, UsaModalElement, UsaNavMorphElement, UsaOdometerElement, UsaProgressRingElement, UsaSheetElement, UsaSkeletonRevealElement, UsaStarRatingElement, UsaStoriesElement, UsaTabBarElement, UsaTipElement, UsaToastStackElement };
|
|
544
|
+
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, WEATHER_CONDITIONS, WIDGETS, WIDGET_TAGS, defineCarousel, defineCompare, defineCubeGallery, defineDisclosure, defineDock, defineKanban, defineMasonryFlow, defineMenu, defineMenuToggle, defineMilestones, defineModal, defineNavMorph, defineOdometer, definePagination, defineProgressRing, definePullCord, defineSegmented, defineSheet, defineSkeletonReveal, defineStarRating, defineStepper, defineStories, defineSwipeDeck, defineSwitch, defineTabBar, defineTip, defineToastStack, defineWeatherCard, defineWidgets, pageWindow, stackToast };
|
|
545
|
+
export type { StackToastOptions, UsaCarouselElement, UsaCompareElement, UsaCubeGalleryElement, UsaDisclosureElement, UsaDockElement, UsaKanbanElement, UsaMasonryFlowElement, UsaMenuElement, UsaMenuToggleElement, UsaMilestonesElement, UsaModalElement, UsaNavMorphElement, UsaOdometerElement, UsaPaginationElement, UsaProgressRingElement, UsaPullCordElement, UsaSegmentedElement, UsaSheetElement, UsaSkeletonRevealElement, UsaStarRatingElement, UsaStepperElement, UsaStoriesElement, UsaSwipeDeckElement, UsaSwitchElement, UsaTabBarElement, UsaTipElement, UsaToastStackElement, UsaWeatherCardElement };
|