@adia-ai/web-components 0.3.0 → 0.3.2
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/components/card/card.js +1 -1
- package/components/nav-group/nav-group.css +2 -0
- package/components/nav-item/nav-item.css +2 -1
- package/components/row/row.js +1 -1
- package/package.json +2 -2
- package/styles/README.md +286 -0
- package/traits/{active-state.js → active-state/active-state.js} +1 -1
- package/traits/{active-state.test.js → active-state/active-state.test.js} +1 -1
- package/traits/{anchor-positioning.js → anchor-positioning/anchor-positioning.js} +1 -1
- package/traits/{anchor-positioning.test.js → anchor-positioning/anchor-positioning.test.js} +1 -1
- package/traits/{announcer.js → announcer/announcer.js} +1 -1
- package/traits/{announcer.test.js → announcer/announcer.test.js} +1 -1
- package/traits/{arrow-grid-nav.js → arrow-grid-nav/arrow-grid-nav.js} +1 -1
- package/traits/{arrow-grid-nav.test.js → arrow-grid-nav/arrow-grid-nav.test.js} +1 -1
- package/traits/{attention-pulse.js → attention-pulse/attention-pulse.js} +2 -2
- package/traits/{attention-pulse.test.js → attention-pulse/attention-pulse.test.js} +1 -1
- package/traits/{confetti.js → confetti/confetti.js} +2 -2
- package/traits/{confetti.test.js → confetti/confetti.test.js} +1 -1
- package/traits/{confetti-burst.js → confetti-burst/confetti-burst.js} +3 -3
- package/traits/{confetti-burst.test.js → confetti-burst/confetti-burst.test.js} +2 -2
- package/traits/{count-up.js → count-up/count-up.js} +2 -2
- package/traits/{count-up.test.js → count-up/count-up.test.js} +1 -1
- package/traits/declarative.test.js +3 -3
- package/traits/{dirty-state.js → dirty-state/dirty-state.js} +1 -1
- package/traits/{dirty-state.test.js → dirty-state/dirty-state.test.js} +1 -1
- package/traits/{drag-ghost.js → drag-ghost/drag-ghost.js} +1 -1
- package/traits/{drag-ghost.test.js → drag-ghost/drag-ghost.test.js} +1 -1
- package/traits/{draggable.js → draggable/draggable.js} +1 -1
- package/traits/{draggable.test.js → draggable/draggable.test.js} +1 -1
- package/traits/{draggable-list-item.js → draggable-list-item/draggable-list-item.js} +2 -2
- package/traits/{draggable-list-item.test.js → draggable-list-item/draggable-list-item.test.js} +1 -1
- package/traits/{drop-target.js → drop-target/drop-target.js} +1 -1
- package/traits/{drop-target.test.js → drop-target/drop-target.test.js} +1 -1
- package/traits/{droppable.js → droppable/droppable.js} +1 -1
- package/traits/{droppable.test.js → droppable/droppable.test.js} +1 -1
- package/traits/{droppable-collection.js → droppable-collection/droppable-collection.js} +1 -1
- package/traits/{droppable-collection.test.js → droppable-collection/droppable-collection.test.js} +1 -1
- package/traits/{error-shake.js → error-shake/error-shake.js} +2 -2
- package/traits/{error-shake.test.js → error-shake/error-shake.test.js} +1 -1
- package/traits/{fade-presence.js → fade-presence/fade-presence.js} +1 -1
- package/traits/{fade-presence.test.js → fade-presence/fade-presence.test.js} +1 -1
- package/traits/{focus-restore.js → focus-restore/focus-restore.js} +1 -1
- package/traits/{focus-restore.test.js → focus-restore/focus-restore.test.js} +1 -1
- package/traits/{focus-trap.js → focus-trap/focus-trap.js} +1 -1
- package/traits/{focus-trap.test.js → focus-trap/focus-trap.test.js} +1 -1
- package/traits/{focusable.js → focusable/focusable.js} +1 -1
- package/traits/{focusable.test.js → focusable/focusable.test.js} +1 -1
- package/traits/{glow-focus.js → glow-focus/glow-focus.js} +2 -2
- package/traits/{glow-focus.test.js → glow-focus/glow-focus.test.js} +1 -1
- package/traits/{gradient-shift.js → gradient-shift/gradient-shift.js} +2 -2
- package/traits/{gradient-shift.test.js → gradient-shift/gradient-shift.test.js} +1 -1
- package/traits/{haptic-feedback.js → haptic-feedback/haptic-feedback.js} +1 -1
- package/traits/{haptic-feedback.test.js → haptic-feedback/haptic-feedback.test.js} +1 -1
- package/traits/{hotkey.js → hotkey/hotkey.js} +1 -1
- package/traits/{hotkey.test.js → hotkey/hotkey.test.js} +1 -1
- package/traits/{hoverable.js → hoverable/hoverable.js} +1 -1
- package/traits/{hoverable.test.js → hoverable/hoverable.test.js} +1 -1
- package/traits/index.js +56 -56
- package/traits/{inertia-drag.js → inertia-drag/inertia-drag.js} +1 -1
- package/traits/{inertia-drag.test.js → inertia-drag/inertia-drag.test.js} +1 -1
- package/traits/{input-mask.js → input-mask/input-mask.js} +1 -1
- package/traits/{input-mask.test.js → input-mask/input-mask.test.js} +1 -1
- package/traits/{intersection-observer.js → intersection-observer/intersection-observer.js} +1 -1
- package/traits/{intersection-observer.test.js → intersection-observer/intersection-observer.test.js} +1 -1
- package/traits/{keyboard-nav.js → keyboard-nav/keyboard-nav.js} +1 -1
- package/traits/{keyboard-nav.test.js → keyboard-nav/keyboard-nav.test.js} +1 -1
- package/traits/{keyboard-reorderable.js → keyboard-reorderable/keyboard-reorderable.js} +2 -2
- package/traits/{keyboard-reorderable.test.js → keyboard-reorderable/keyboard-reorderable.test.js} +1 -1
- package/traits/{layout-animation.js → layout-animation/layout-animation.js} +2 -2
- package/traits/{layout-animation.test.js → layout-animation/layout-animation.test.js} +1 -1
- package/traits/{long-press.js → long-press/long-press.js} +1 -1
- package/traits/{long-press.test.js → long-press/long-press.test.js} +1 -1
- package/traits/{magnetic-hover.js → magnetic-hover/magnetic-hover.js} +2 -2
- package/traits/{magnetic-hover.test.js → magnetic-hover/magnetic-hover.test.js} +1 -1
- package/traits/{noise-texture.js → noise-texture/noise-texture.js} +1 -1
- package/traits/{noise-texture.test.js → noise-texture/noise-texture.test.js} +1 -1
- package/traits/{parallax.js → parallax/parallax.js} +2 -2
- package/traits/{parallax.test.js → parallax/parallax.test.js} +1 -1
- package/traits/{portal.js → portal/portal.js} +1 -1
- package/traits/{portal.test.js → portal/portal.test.js} +1 -1
- package/traits/{pressable.js → pressable/pressable.js} +1 -1
- package/traits/{pressable.test.js → pressable/pressable.test.js} +1 -1
- package/traits/{resettable.js → resettable/resettable.js} +1 -1
- package/traits/{resettable.test.js → resettable/resettable.test.js} +1 -1
- package/traits/{resizable.js → resizable/resizable.js} +1 -1
- package/traits/{resizable.test.js → resizable/resizable.test.js} +1 -1
- package/traits/{resize-observer.js → resize-observer/resize-observer.js} +1 -1
- package/traits/{resize-observer.test.js → resize-observer/resize-observer.test.js} +1 -1
- package/traits/{ripple.js → ripple/ripple.js} +2 -2
- package/traits/{ripple.test.js → ripple/ripple.test.js} +1 -1
- package/traits/{roving-tabindex.js → roving-tabindex/roving-tabindex.js} +1 -1
- package/traits/{roving-tabindex.test.js → roving-tabindex/roving-tabindex.test.js} +1 -1
- package/traits/{scale-press.js → scale-press/scale-press.js} +1 -1
- package/traits/{scale-press.test.js → scale-press/scale-press.test.js} +1 -1
- package/traits/{scroll-lock.js → scroll-lock/scroll-lock.js} +1 -1
- package/traits/{scroll-lock.test.js → scroll-lock/scroll-lock.test.js} +1 -1
- package/traits/{scroll-progress.js → scroll-progress/scroll-progress.js} +1 -1
- package/traits/{scroll-progress.test.js → scroll-progress/scroll-progress.test.js} +1 -1
- package/traits/{shimmer-loading.js → shimmer-loading/shimmer-loading.js} +2 -2
- package/traits/{shimmer-loading.test.js → shimmer-loading/shimmer-loading.test.js} +1 -1
- package/traits/{snap-to-grid.js → snap-to-grid/snap-to-grid.js} +1 -1
- package/traits/{snap-to-grid.test.js → snap-to-grid/snap-to-grid.test.js} +1 -1
- package/traits/{sound-feedback.js → sound-feedback/sound-feedback.js} +1 -1
- package/traits/{sound-feedback.test.js → sound-feedback/sound-feedback.test.js} +1 -1
- package/traits/{spring-animate.js → spring-animate/spring-animate.js} +1 -1
- package/traits/{spring-animate.test.js → spring-animate/spring-animate.test.js} +1 -1
- package/traits/{success-checkmark.js → success-checkmark/success-checkmark.js} +2 -2
- package/traits/{success-checkmark.test.js → success-checkmark/success-checkmark.test.js} +1 -1
- package/traits/{tilt-hover.js → tilt-hover/tilt-hover.js} +2 -2
- package/traits/{tilt-hover.test.js → tilt-hover/tilt-hover.test.js} +1 -1
- package/traits/{tossable.js → tossable/tossable.js} +1 -1
- package/traits/{tossable.test.js → tossable/tossable.test.js} +1 -1
- package/traits/traits-host.test.js +2 -2
- package/traits/{typeahead.js → typeahead/typeahead.js} +1 -1
- package/traits/{typeahead.test.js → typeahead/typeahead.test.js} +1 -1
- package/traits/{typewriter.js → typewriter/typewriter.js} +2 -2
- package/traits/{typewriter.test.js → typewriter/typewriter.test.js} +1 -1
- package/traits/{validation.js → validation/validation.js} +1 -1
- package/traits/{validation.test.js → validation/validation.test.js} +1 -1
- package/traits/{view-transition.js → view-transition/view-transition.js} +2 -2
- package/traits/{view-transition.test.js → view-transition/view-transition.test.js} +2 -2
- /package/traits/{announcer-stage.js → announcer/announcer-stage.js} +0 -0
- /package/traits/{confetti-stage.js → confetti/confetti-stage.js} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineTrait } from '
|
|
2
|
-
import { prefersReducedMotion } from '
|
|
1
|
+
import { defineTrait } from '../define.js';
|
|
2
|
+
import { prefersReducedMotion } from '../motion.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* `error-shake` — horizontal lateral oscillation on validation failure.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { describe, it, expect, beforeEach } from 'vitest';
|
|
2
2
|
import { errorShake } from './error-shake.js';
|
|
3
|
-
import { mountHost, connectTrait, spyEvent, resetDOM, wait } from '
|
|
3
|
+
import { mountHost, connectTrait, spyEvent, resetDOM, wait } from '../test-helpers.js';
|
|
4
4
|
|
|
5
5
|
describe('error-shake', () => {
|
|
6
6
|
beforeEach(resetDOM);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { describe, it, expect, beforeEach } from 'vitest';
|
|
2
2
|
import { fadePresence } from './fade-presence.js';
|
|
3
|
-
import { mountHost, connectTrait, resetDOM } from '
|
|
3
|
+
import { mountHost, connectTrait, resetDOM } from '../test-helpers.js';
|
|
4
4
|
|
|
5
5
|
describe('fade-presence', () => {
|
|
6
6
|
beforeEach(resetDOM);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { describe, it, expect, beforeEach } from 'vitest';
|
|
2
2
|
import { focusRestore } from './focus-restore.js';
|
|
3
|
-
import { mountHost, connectTrait, spyEvent, resetDOM } from '
|
|
3
|
+
import { mountHost, connectTrait, spyEvent, resetDOM } from '../test-helpers.js';
|
|
4
4
|
|
|
5
5
|
function focusableTrigger(label = 'Trigger') {
|
|
6
6
|
const btn = document.createElement('button');
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineTrait } from '
|
|
1
|
+
import { defineTrait } from '../define.js';
|
|
2
2
|
|
|
3
3
|
const FOCUSABLE_SELECTOR = 'a[href], [role="button"][tabindex], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"]), [contenteditable]';
|
|
4
4
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { describe, it, expect, beforeEach } from 'vitest';
|
|
2
2
|
import { focusTrap } from './focus-trap.js';
|
|
3
|
-
import { mountHost, connectTrait, spyEvent, resetDOM } from '
|
|
3
|
+
import { mountHost, connectTrait, spyEvent, resetDOM } from '../test-helpers.js';
|
|
4
4
|
|
|
5
5
|
function focusableChild(host, label) {
|
|
6
6
|
const btn = document.createElement('button');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { describe, it, expect, beforeEach } from 'vitest';
|
|
2
2
|
import { focusable } from './focusable.js';
|
|
3
|
-
import { mountHost, connectTrait, resetDOM } from '
|
|
3
|
+
import { mountHost, connectTrait, resetDOM } from '../test-helpers.js';
|
|
4
4
|
|
|
5
5
|
describe('focusable', () => {
|
|
6
6
|
beforeEach(resetDOM);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { describe, it, expect, beforeEach } from 'vitest';
|
|
2
2
|
import { glowFocus } from './glow-focus.js';
|
|
3
|
-
import { mountHost, connectTrait, resetDOM } from '
|
|
3
|
+
import { mountHost, connectTrait, resetDOM } from '../test-helpers.js';
|
|
4
4
|
|
|
5
5
|
describe('glow-focus', () => {
|
|
6
6
|
beforeEach(resetDOM);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineTrait } from '
|
|
2
|
-
import { prefersReducedMotion } from '
|
|
1
|
+
import { defineTrait } from '../define.js';
|
|
2
|
+
import { prefersReducedMotion } from '../motion.js';
|
|
3
3
|
|
|
4
4
|
export const gradientShift = defineTrait({
|
|
5
5
|
name: 'gradient-shift',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { describe, it, expect, beforeEach } from 'vitest';
|
|
2
2
|
import { gradientShift } from './gradient-shift.js';
|
|
3
|
-
import { mountHost, connectTrait, resetDOM } from '
|
|
3
|
+
import { mountHost, connectTrait, resetDOM } from '../test-helpers.js';
|
|
4
4
|
|
|
5
5
|
describe('gradient-shift', () => {
|
|
6
6
|
beforeEach(resetDOM);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { describe, it, expect, beforeEach, vi, afterEach } from 'vitest';
|
|
2
2
|
import { hapticFeedback } from './haptic-feedback.js';
|
|
3
|
-
import { mountHost, connectTrait, resetDOM } from '
|
|
3
|
+
import { mountHost, connectTrait, resetDOM } from '../test-helpers.js';
|
|
4
4
|
|
|
5
5
|
describe('haptic-feedback', () => {
|
|
6
6
|
let originalVibrate;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { describe, it, expect, beforeEach } from 'vitest';
|
|
2
2
|
import { hotkey } from './hotkey.js';
|
|
3
|
-
import { mountHost, connectTrait, spyEvent, resetDOM } from '
|
|
3
|
+
import { mountHost, connectTrait, spyEvent, resetDOM } from '../test-helpers.js';
|
|
4
4
|
|
|
5
5
|
describe('hotkey', () => {
|
|
6
6
|
beforeEach(resetDOM);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { describe, it, expect, beforeEach } from 'vitest';
|
|
2
2
|
import { hoverable } from './hoverable.js';
|
|
3
|
-
import { mountHost, connectTrait, resetDOM } from '
|
|
3
|
+
import { mountHost, connectTrait, resetDOM } from '../test-helpers.js';
|
|
4
4
|
|
|
5
5
|
describe('hoverable', () => {
|
|
6
6
|
beforeEach(resetDOM);
|
package/traits/index.js
CHANGED
|
@@ -9,75 +9,75 @@
|
|
|
9
9
|
import './traits-host.js';
|
|
10
10
|
|
|
11
11
|
// input-interaction
|
|
12
|
-
export { pressable } from './pressable.js';
|
|
13
|
-
export { focusable } from './focusable.js';
|
|
14
|
-
export { hoverable } from './hoverable.js';
|
|
15
|
-
export { activeState } from './active-state.js';
|
|
16
|
-
export { longPress } from './long-press.js';
|
|
17
|
-
export { droppable } from './droppable.js';
|
|
18
|
-
export { droppableCollection } from './droppable-collection.js';
|
|
12
|
+
export { pressable } from './pressable/pressable.js';
|
|
13
|
+
export { focusable } from './focusable/focusable.js';
|
|
14
|
+
export { hoverable } from './hoverable/hoverable.js';
|
|
15
|
+
export { activeState } from './active-state/active-state.js';
|
|
16
|
+
export { longPress } from './long-press/long-press.js';
|
|
17
|
+
export { droppable } from './droppable/droppable.js';
|
|
18
|
+
export { droppableCollection } from './droppable-collection/droppable-collection.js';
|
|
19
19
|
|
|
20
20
|
// keyboard-navigation
|
|
21
|
-
export { keyboardNav } from './keyboard-nav.js';
|
|
22
|
-
export { rovingTabindex } from './roving-tabindex.js';
|
|
23
|
-
export { typeahead } from './typeahead.js';
|
|
24
|
-
export { hotkey } from './hotkey.js';
|
|
25
|
-
export { focusTrap } from './focus-trap.js';
|
|
26
|
-
export { focusRestore } from './focus-restore.js';
|
|
27
|
-
export { arrowGridNav } from './arrow-grid-nav.js';
|
|
28
|
-
export { keyboardReorderable } from './keyboard-reorderable.js';
|
|
21
|
+
export { keyboardNav } from './keyboard-nav/keyboard-nav.js';
|
|
22
|
+
export { rovingTabindex } from './roving-tabindex/roving-tabindex.js';
|
|
23
|
+
export { typeahead } from './typeahead/typeahead.js';
|
|
24
|
+
export { hotkey } from './hotkey/hotkey.js';
|
|
25
|
+
export { focusTrap } from './focus-trap/focus-trap.js';
|
|
26
|
+
export { focusRestore } from './focus-restore/focus-restore.js';
|
|
27
|
+
export { arrowGridNav } from './arrow-grid-nav/arrow-grid-nav.js';
|
|
28
|
+
export { keyboardReorderable } from './keyboard-reorderable/keyboard-reorderable.js';
|
|
29
29
|
|
|
30
30
|
// forms-data
|
|
31
|
-
export { validation } from './validation.js';
|
|
32
|
-
export { dirtyState } from './dirty-state.js';
|
|
33
|
-
export { resettable } from './resettable.js';
|
|
34
|
-
export { inputMask } from './input-mask.js';
|
|
31
|
+
export { validation } from './validation/validation.js';
|
|
32
|
+
export { dirtyState } from './dirty-state/dirty-state.js';
|
|
33
|
+
export { resettable } from './resettable/resettable.js';
|
|
34
|
+
export { inputMask } from './input-mask/input-mask.js';
|
|
35
35
|
|
|
36
36
|
// layout-measurement
|
|
37
|
-
export { resizeObserver } from './resize-observer.js';
|
|
38
|
-
export { intersectionObserver } from './intersection-observer.js';
|
|
39
|
-
export { anchorPositioning } from './anchor-positioning.js';
|
|
40
|
-
export { portal } from './portal.js';
|
|
41
|
-
export { scrollLock } from './scroll-lock.js';
|
|
42
|
-
export { scrollProgress } from './scroll-progress.js';
|
|
37
|
+
export { resizeObserver } from './resize-observer/resize-observer.js';
|
|
38
|
+
export { intersectionObserver } from './intersection-observer/intersection-observer.js';
|
|
39
|
+
export { anchorPositioning } from './anchor-positioning/anchor-positioning.js';
|
|
40
|
+
export { portal } from './portal/portal.js';
|
|
41
|
+
export { scrollLock } from './scroll-lock/scroll-lock.js';
|
|
42
|
+
export { scrollProgress } from './scroll-progress/scroll-progress.js';
|
|
43
43
|
|
|
44
44
|
// motion-positioning
|
|
45
|
-
export { draggable } from './draggable.js';
|
|
46
|
-
export { tossable } from './tossable.js';
|
|
47
|
-
export { resizable } from './resizable.js';
|
|
48
|
-
export { inertiaDrag } from './inertia-drag.js';
|
|
49
|
-
export { snapToGrid } from './snap-to-grid.js';
|
|
50
|
-
export { dragGhost } from './drag-ghost.js';
|
|
51
|
-
export { dropTarget } from './drop-target.js';
|
|
52
|
-
export { layoutAnimation } from './layout-animation.js';
|
|
53
|
-
export { viewTransition } from './view-transition.js';
|
|
54
|
-
export { draggableListItem } from './draggable-list-item.js';
|
|
45
|
+
export { draggable } from './draggable/draggable.js';
|
|
46
|
+
export { tossable } from './tossable/tossable.js';
|
|
47
|
+
export { resizable } from './resizable/resizable.js';
|
|
48
|
+
export { inertiaDrag } from './inertia-drag/inertia-drag.js';
|
|
49
|
+
export { snapToGrid } from './snap-to-grid/snap-to-grid.js';
|
|
50
|
+
export { dragGhost } from './drag-ghost/drag-ghost.js';
|
|
51
|
+
export { dropTarget } from './drop-target/drop-target.js';
|
|
52
|
+
export { layoutAnimation } from './layout-animation/layout-animation.js';
|
|
53
|
+
export { viewTransition } from './view-transition/view-transition.js';
|
|
54
|
+
export { draggableListItem } from './draggable-list-item/draggable-list-item.js';
|
|
55
55
|
|
|
56
56
|
// animation-feedback
|
|
57
|
-
export { ripple } from './ripple.js';
|
|
58
|
-
export { springAnimate } from './spring-animate.js';
|
|
59
|
-
export { fadePresence } from './fade-presence.js';
|
|
60
|
-
export { scalePress } from './scale-press.js';
|
|
61
|
-
export { tiltHover } from './tilt-hover.js';
|
|
62
|
-
export { errorShake } from './error-shake.js';
|
|
63
|
-
export { successCheckmark } from './success-checkmark.js';
|
|
57
|
+
export { ripple } from './ripple/ripple.js';
|
|
58
|
+
export { springAnimate } from './spring-animate/spring-animate.js';
|
|
59
|
+
export { fadePresence } from './fade-presence/fade-presence.js';
|
|
60
|
+
export { scalePress } from './scale-press/scale-press.js';
|
|
61
|
+
export { tiltHover } from './tilt-hover/tilt-hover.js';
|
|
62
|
+
export { errorShake } from './error-shake/error-shake.js';
|
|
63
|
+
export { successCheckmark } from './success-checkmark/success-checkmark.js';
|
|
64
64
|
|
|
65
65
|
// visual-dynamics
|
|
66
|
-
export { glowFocus } from './glow-focus.js';
|
|
67
|
-
export { gradientShift } from './gradient-shift.js';
|
|
68
|
-
export { parallax } from './parallax.js';
|
|
69
|
-
export { shimmerLoading } from './shimmer-loading.js';
|
|
70
|
-
export { noiseTexture } from './noise-texture.js';
|
|
66
|
+
export { glowFocus } from './glow-focus/glow-focus.js';
|
|
67
|
+
export { gradientShift } from './gradient-shift/gradient-shift.js';
|
|
68
|
+
export { parallax } from './parallax/parallax.js';
|
|
69
|
+
export { shimmerLoading } from './shimmer-loading/shimmer-loading.js';
|
|
70
|
+
export { noiseTexture } from './noise-texture/noise-texture.js';
|
|
71
71
|
|
|
72
72
|
// interaction-delight
|
|
73
|
-
export { magneticHover } from './magnetic-hover.js';
|
|
74
|
-
export { confetti } from './confetti.js';
|
|
75
|
-
export { confettiBurst } from './confetti-burst.js';
|
|
73
|
+
export { magneticHover } from './magnetic-hover/magnetic-hover.js';
|
|
74
|
+
export { confetti } from './confetti/confetti.js';
|
|
75
|
+
export { confettiBurst } from './confetti-burst/confetti-burst.js';
|
|
76
76
|
|
|
77
77
|
// audio-haptics-sensory
|
|
78
|
-
export { soundFeedback } from './sound-feedback.js';
|
|
79
|
-
export { hapticFeedback } from './haptic-feedback.js';
|
|
80
|
-
export { typewriter } from './typewriter.js';
|
|
81
|
-
export { countUp } from './count-up.js';
|
|
82
|
-
export { attentionPulse } from './attention-pulse.js';
|
|
83
|
-
export { announcer } from './announcer.js';
|
|
78
|
+
export { soundFeedback } from './sound-feedback/sound-feedback.js';
|
|
79
|
+
export { hapticFeedback } from './haptic-feedback/haptic-feedback.js';
|
|
80
|
+
export { typewriter } from './typewriter/typewriter.js';
|
|
81
|
+
export { countUp } from './count-up/count-up.js';
|
|
82
|
+
export { attentionPulse } from './attention-pulse/attention-pulse.js';
|
|
83
|
+
export { announcer } from './announcer/announcer.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { describe, it, expect, beforeEach } from 'vitest';
|
|
2
2
|
import { inertiaDrag } from './inertia-drag.js';
|
|
3
|
-
import { mountHost, connectTrait, resetDOM } from '
|
|
3
|
+
import { mountHost, connectTrait, resetDOM } from '../test-helpers.js';
|
|
4
4
|
|
|
5
5
|
function pointer(host, type, x, y) {
|
|
6
6
|
host.dispatchEvent(new PointerEvent(type, { clientX: x, clientY: y, pointerId: 1, bubbles: true }));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { describe, it, expect, beforeEach } from 'vitest';
|
|
2
2
|
import { inputMask } from './input-mask.js';
|
|
3
|
-
import { mountHost, connectTrait, spyEvent, resetDOM } from '
|
|
3
|
+
import { mountHost, connectTrait, spyEvent, resetDOM } from '../test-helpers.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Drive an `input` event with a new value and a caret-position guess.
|
package/traits/{intersection-observer.test.js → intersection-observer/intersection-observer.test.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { describe, it, expect, beforeEach, vi, afterEach } from 'vitest';
|
|
2
2
|
import { intersectionObserver } from './intersection-observer.js';
|
|
3
|
-
import { mountHost, connectTrait, resetDOM } from '
|
|
3
|
+
import { mountHost, connectTrait, resetDOM } from '../test-helpers.js';
|
|
4
4
|
|
|
5
5
|
describe('intersection-observer', () => {
|
|
6
6
|
let originalIO;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { describe, it, expect, beforeEach } from 'vitest';
|
|
2
2
|
import { keyboardNav } from './keyboard-nav.js';
|
|
3
|
-
import { mountHost, connectTrait, spyEvent, resetDOM } from '
|
|
3
|
+
import { mountHost, connectTrait, spyEvent, resetDOM } from '../test-helpers.js';
|
|
4
4
|
|
|
5
5
|
describe('keyboard-nav', () => {
|
|
6
6
|
beforeEach(resetDOM);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineTrait } from '
|
|
1
|
+
import { defineTrait } from '../define.js';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* `keyboard-reorderable` — keyboard alternative to `draggable-list-item`.
|
|
@@ -28,7 +28,7 @@ import { defineTrait } from './define.js';
|
|
|
28
28
|
* narrations.
|
|
29
29
|
*/
|
|
30
30
|
|
|
31
|
-
import { announce } from '
|
|
31
|
+
import { announce } from '../announcer/announcer-stage.js';
|
|
32
32
|
|
|
33
33
|
// Same debounce gate as draggable-list-item — module-private throttle
|
|
34
34
|
// for drop-target-change announcements; immediate calls supersede.
|
package/traits/{keyboard-reorderable.test.js → keyboard-reorderable/keyboard-reorderable.test.js}
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { describe, it, expect, beforeEach } from 'vitest';
|
|
2
2
|
import { keyboardReorderable } from './keyboard-reorderable.js';
|
|
3
|
-
import { mountHost, connectTrait, resetDOM } from '
|
|
3
|
+
import { mountHost, connectTrait, resetDOM } from '../test-helpers.js';
|
|
4
4
|
|
|
5
5
|
// Minimal smoke coverage. Keyboard-reorderable is the WCAG 2.5.7 +
|
|
6
6
|
// ARIA 1.1 alternative to draggable-list-item for the
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineTrait } from '
|
|
2
|
-
import { prefersReducedMotion } from '
|
|
1
|
+
import { defineTrait } from '../define.js';
|
|
2
|
+
import { prefersReducedMotion } from '../motion.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* layout-animation — FLIP (First / Last / Invert / Play) layout transitions.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { describe, it, expect, beforeEach } from 'vitest';
|
|
2
2
|
import { layoutAnimation } from './layout-animation.js';
|
|
3
|
-
import { mountHost, connectTrait, spyEvent, resetDOM, raf } from '
|
|
3
|
+
import { mountHost, connectTrait, spyEvent, resetDOM, raf } from '../test-helpers.js';
|
|
4
4
|
|
|
5
5
|
describe('layout-animation', () => {
|
|
6
6
|
beforeEach(resetDOM);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { describe, it, expect, beforeEach, vi } from 'vitest';
|
|
2
2
|
import { longPress } from './long-press.js';
|
|
3
|
-
import { mountHost, connectTrait, spyEvent, resetDOM, wait } from '
|
|
3
|
+
import { mountHost, connectTrait, spyEvent, resetDOM, wait } from '../test-helpers.js';
|
|
4
4
|
|
|
5
5
|
function pointerDown(host, x = 0, y = 0) {
|
|
6
6
|
host.dispatchEvent(new PointerEvent('pointerdown', { clientX: x, clientY: y, bubbles: true }));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineTrait } from '
|
|
2
|
-
import { prefersReducedMotion } from '
|
|
1
|
+
import { defineTrait } from '../define.js';
|
|
2
|
+
import { prefersReducedMotion } from '../motion.js';
|
|
3
3
|
|
|
4
4
|
export const magneticHover = defineTrait({
|
|
5
5
|
name: 'magnetic-hover',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { describe, it, expect, beforeEach } from 'vitest';
|
|
2
2
|
import { magneticHover } from './magnetic-hover.js';
|
|
3
|
-
import { mountHost, connectTrait, resetDOM } from '
|
|
3
|
+
import { mountHost, connectTrait, resetDOM } from '../test-helpers.js';
|
|
4
4
|
|
|
5
5
|
describe('magnetic-hover', () => {
|
|
6
6
|
beforeEach(resetDOM);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { describe, it, expect, beforeEach } from 'vitest';
|
|
2
2
|
import { noiseTexture } from './noise-texture.js';
|
|
3
|
-
import { mountHost, connectTrait, resetDOM } from '
|
|
3
|
+
import { mountHost, connectTrait, resetDOM } from '../test-helpers.js';
|
|
4
4
|
|
|
5
5
|
describe('noise-texture', () => {
|
|
6
6
|
beforeEach(resetDOM);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { describe, it, expect, beforeEach } from 'vitest';
|
|
2
2
|
import { parallax } from './parallax.js';
|
|
3
|
-
import { mountHost, connectTrait, resetDOM } from '
|
|
3
|
+
import { mountHost, connectTrait, resetDOM } from '../test-helpers.js';
|
|
4
4
|
|
|
5
5
|
describe('parallax', () => {
|
|
6
6
|
beforeEach(resetDOM);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { describe, it, expect, beforeEach } from 'vitest';
|
|
2
2
|
import { portal } from './portal.js';
|
|
3
|
-
import { mountHost, connectTrait, resetDOM } from '
|
|
3
|
+
import { mountHost, connectTrait, resetDOM } from '../test-helpers.js';
|
|
4
4
|
|
|
5
5
|
describe('portal', () => {
|
|
6
6
|
beforeEach(resetDOM);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { describe, it, expect, beforeEach } from 'vitest';
|
|
2
2
|
import { pressable } from './pressable.js';
|
|
3
|
-
import { mountHost, connectTrait, spyEvent, resetDOM } from '
|
|
3
|
+
import { mountHost, connectTrait, spyEvent, resetDOM } from '../test-helpers.js';
|
|
4
4
|
|
|
5
5
|
describe('pressable', () => {
|
|
6
6
|
beforeEach(resetDOM);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { describe, it, expect, beforeEach } from 'vitest';
|
|
2
2
|
import { resettable } from './resettable.js';
|
|
3
|
-
import { mountHost, connectTrait, spyEvent, resetDOM } from '
|
|
3
|
+
import { mountHost, connectTrait, spyEvent, resetDOM } from '../test-helpers.js';
|
|
4
4
|
|
|
5
5
|
function mountInForm(initialValue = 'initial') {
|
|
6
6
|
const form = document.createElement('form');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { describe, it, expect, beforeEach } from 'vitest';
|
|
2
2
|
import { resizable } from './resizable.js';
|
|
3
|
-
import { mountHost, connectTrait, resetDOM } from '
|
|
3
|
+
import { mountHost, connectTrait, resetDOM } from '../test-helpers.js';
|
|
4
4
|
|
|
5
5
|
describe('resizable', () => {
|
|
6
6
|
beforeEach(resetDOM);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { describe, it, expect, beforeEach, vi, afterEach } from 'vitest';
|
|
2
2
|
import { resizeObserver } from './resize-observer.js';
|
|
3
|
-
import { mountHost, connectTrait, resetDOM } from '
|
|
3
|
+
import { mountHost, connectTrait, resetDOM } from '../test-helpers.js';
|
|
4
4
|
|
|
5
5
|
describe('resize-observer', () => {
|
|
6
6
|
let originalRO;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { describe, it, expect, beforeEach } from 'vitest';
|
|
2
2
|
import { ripple } from './ripple.js';
|
|
3
|
-
import { mountHost, connectTrait, resetDOM } from '
|
|
3
|
+
import { mountHost, connectTrait, resetDOM } from '../test-helpers.js';
|
|
4
4
|
|
|
5
5
|
describe('ripple', () => {
|
|
6
6
|
beforeEach(resetDOM);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { describe, it, expect, beforeEach } from 'vitest';
|
|
2
2
|
import { rovingTabindex } from './roving-tabindex.js';
|
|
3
|
-
import { mountHost, connectTrait, resetDOM } from '
|
|
3
|
+
import { mountHost, connectTrait, resetDOM } from '../test-helpers.js';
|
|
4
4
|
|
|
5
5
|
function tabbableChild(host) {
|
|
6
6
|
const btn = document.createElement('button');
|