motionary 6.7.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 +15 -0
- 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-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/fx2.cjs +12 -0
- package/dist/components/fx2.cjs.map +1 -1
- package/dist/components/fx2.d.cts +74 -1
- package/dist/components/fx2.d.ts +74 -1
- package/dist/components/fx2.js +9 -1
- package/dist/components/fx2.js.map +1 -1
- package/dist/components/widgets.cjs +620 -45
- package/dist/components/widgets.cjs.map +1 -1
- package/dist/components/widgets.d.cts +73 -2
- package/dist/components/widgets.d.ts +73 -2
- package/dist/components/widgets.js +616 -46
- package/dist/components/widgets.js.map +1 -1
- package/dist/widgets.umd.js +1 -1
- package/dist/widgets.umd.js.map +1 -1
- package/docs/ROADMAP.md +1 -1
- package/docs/components.md +27 -0
- package/package.json +21 -1
|
@@ -422,6 +422,73 @@ interface UsaSwitchElement extends UsaElement {
|
|
|
422
422
|
declare const SWITCH_VARIANTS: readonly ["ios", "daynight", "bounce", "liquid"];
|
|
423
423
|
declare function defineSwitch(tag?: string): CustomElementConstructor | undefined;
|
|
424
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
|
+
|
|
425
492
|
/**
|
|
426
493
|
* motionary/components/widgets — the 6.x animated UI widgets, in their own
|
|
427
494
|
* entry so `motionary/components` and `components/lite` keep their size
|
|
@@ -467,8 +534,12 @@ declare global {
|
|
|
467
534
|
'usa-pagination': UsaPaginationElement;
|
|
468
535
|
'usa-segmented': UsaSegmentedElement;
|
|
469
536
|
'usa-switch': UsaSwitchElement;
|
|
537
|
+
'usa-kanban': UsaKanbanElement;
|
|
538
|
+
'usa-swipe-deck': UsaSwipeDeckElement;
|
|
539
|
+
'usa-weather-card': UsaWeatherCardElement;
|
|
540
|
+
'usa-pull-cord': UsaPullCordElement;
|
|
470
541
|
}
|
|
471
542
|
}
|
|
472
543
|
|
|
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 };
|
|
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 };
|
|
@@ -422,6 +422,73 @@ interface UsaSwitchElement extends UsaElement {
|
|
|
422
422
|
declare const SWITCH_VARIANTS: readonly ["ios", "daynight", "bounce", "liquid"];
|
|
423
423
|
declare function defineSwitch(tag?: string): CustomElementConstructor | undefined;
|
|
424
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
|
+
|
|
425
492
|
/**
|
|
426
493
|
* motionary/components/widgets — the 6.x animated UI widgets, in their own
|
|
427
494
|
* entry so `motionary/components` and `components/lite` keep their size
|
|
@@ -467,8 +534,12 @@ declare global {
|
|
|
467
534
|
'usa-pagination': UsaPaginationElement;
|
|
468
535
|
'usa-segmented': UsaSegmentedElement;
|
|
469
536
|
'usa-switch': UsaSwitchElement;
|
|
537
|
+
'usa-kanban': UsaKanbanElement;
|
|
538
|
+
'usa-swipe-deck': UsaSwipeDeckElement;
|
|
539
|
+
'usa-weather-card': UsaWeatherCardElement;
|
|
540
|
+
'usa-pull-cord': UsaPullCordElement;
|
|
470
541
|
}
|
|
471
542
|
}
|
|
472
543
|
|
|
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 };
|
|
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 };
|