@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.
Files changed (123) hide show
  1. package/components/card/card.js +1 -1
  2. package/components/nav-group/nav-group.css +2 -0
  3. package/components/nav-item/nav-item.css +2 -1
  4. package/components/row/row.js +1 -1
  5. package/package.json +2 -2
  6. package/styles/README.md +286 -0
  7. package/traits/{active-state.js → active-state/active-state.js} +1 -1
  8. package/traits/{active-state.test.js → active-state/active-state.test.js} +1 -1
  9. package/traits/{anchor-positioning.js → anchor-positioning/anchor-positioning.js} +1 -1
  10. package/traits/{anchor-positioning.test.js → anchor-positioning/anchor-positioning.test.js} +1 -1
  11. package/traits/{announcer.js → announcer/announcer.js} +1 -1
  12. package/traits/{announcer.test.js → announcer/announcer.test.js} +1 -1
  13. package/traits/{arrow-grid-nav.js → arrow-grid-nav/arrow-grid-nav.js} +1 -1
  14. package/traits/{arrow-grid-nav.test.js → arrow-grid-nav/arrow-grid-nav.test.js} +1 -1
  15. package/traits/{attention-pulse.js → attention-pulse/attention-pulse.js} +2 -2
  16. package/traits/{attention-pulse.test.js → attention-pulse/attention-pulse.test.js} +1 -1
  17. package/traits/{confetti.js → confetti/confetti.js} +2 -2
  18. package/traits/{confetti.test.js → confetti/confetti.test.js} +1 -1
  19. package/traits/{confetti-burst.js → confetti-burst/confetti-burst.js} +3 -3
  20. package/traits/{confetti-burst.test.js → confetti-burst/confetti-burst.test.js} +2 -2
  21. package/traits/{count-up.js → count-up/count-up.js} +2 -2
  22. package/traits/{count-up.test.js → count-up/count-up.test.js} +1 -1
  23. package/traits/declarative.test.js +3 -3
  24. package/traits/{dirty-state.js → dirty-state/dirty-state.js} +1 -1
  25. package/traits/{dirty-state.test.js → dirty-state/dirty-state.test.js} +1 -1
  26. package/traits/{drag-ghost.js → drag-ghost/drag-ghost.js} +1 -1
  27. package/traits/{drag-ghost.test.js → drag-ghost/drag-ghost.test.js} +1 -1
  28. package/traits/{draggable.js → draggable/draggable.js} +1 -1
  29. package/traits/{draggable.test.js → draggable/draggable.test.js} +1 -1
  30. package/traits/{draggable-list-item.js → draggable-list-item/draggable-list-item.js} +2 -2
  31. package/traits/{draggable-list-item.test.js → draggable-list-item/draggable-list-item.test.js} +1 -1
  32. package/traits/{drop-target.js → drop-target/drop-target.js} +1 -1
  33. package/traits/{drop-target.test.js → drop-target/drop-target.test.js} +1 -1
  34. package/traits/{droppable.js → droppable/droppable.js} +1 -1
  35. package/traits/{droppable.test.js → droppable/droppable.test.js} +1 -1
  36. package/traits/{droppable-collection.js → droppable-collection/droppable-collection.js} +1 -1
  37. package/traits/{droppable-collection.test.js → droppable-collection/droppable-collection.test.js} +1 -1
  38. package/traits/{error-shake.js → error-shake/error-shake.js} +2 -2
  39. package/traits/{error-shake.test.js → error-shake/error-shake.test.js} +1 -1
  40. package/traits/{fade-presence.js → fade-presence/fade-presence.js} +1 -1
  41. package/traits/{fade-presence.test.js → fade-presence/fade-presence.test.js} +1 -1
  42. package/traits/{focus-restore.js → focus-restore/focus-restore.js} +1 -1
  43. package/traits/{focus-restore.test.js → focus-restore/focus-restore.test.js} +1 -1
  44. package/traits/{focus-trap.js → focus-trap/focus-trap.js} +1 -1
  45. package/traits/{focus-trap.test.js → focus-trap/focus-trap.test.js} +1 -1
  46. package/traits/{focusable.js → focusable/focusable.js} +1 -1
  47. package/traits/{focusable.test.js → focusable/focusable.test.js} +1 -1
  48. package/traits/{glow-focus.js → glow-focus/glow-focus.js} +2 -2
  49. package/traits/{glow-focus.test.js → glow-focus/glow-focus.test.js} +1 -1
  50. package/traits/{gradient-shift.js → gradient-shift/gradient-shift.js} +2 -2
  51. package/traits/{gradient-shift.test.js → gradient-shift/gradient-shift.test.js} +1 -1
  52. package/traits/{haptic-feedback.js → haptic-feedback/haptic-feedback.js} +1 -1
  53. package/traits/{haptic-feedback.test.js → haptic-feedback/haptic-feedback.test.js} +1 -1
  54. package/traits/{hotkey.js → hotkey/hotkey.js} +1 -1
  55. package/traits/{hotkey.test.js → hotkey/hotkey.test.js} +1 -1
  56. package/traits/{hoverable.js → hoverable/hoverable.js} +1 -1
  57. package/traits/{hoverable.test.js → hoverable/hoverable.test.js} +1 -1
  58. package/traits/index.js +56 -56
  59. package/traits/{inertia-drag.js → inertia-drag/inertia-drag.js} +1 -1
  60. package/traits/{inertia-drag.test.js → inertia-drag/inertia-drag.test.js} +1 -1
  61. package/traits/{input-mask.js → input-mask/input-mask.js} +1 -1
  62. package/traits/{input-mask.test.js → input-mask/input-mask.test.js} +1 -1
  63. package/traits/{intersection-observer.js → intersection-observer/intersection-observer.js} +1 -1
  64. package/traits/{intersection-observer.test.js → intersection-observer/intersection-observer.test.js} +1 -1
  65. package/traits/{keyboard-nav.js → keyboard-nav/keyboard-nav.js} +1 -1
  66. package/traits/{keyboard-nav.test.js → keyboard-nav/keyboard-nav.test.js} +1 -1
  67. package/traits/{keyboard-reorderable.js → keyboard-reorderable/keyboard-reorderable.js} +2 -2
  68. package/traits/{keyboard-reorderable.test.js → keyboard-reorderable/keyboard-reorderable.test.js} +1 -1
  69. package/traits/{layout-animation.js → layout-animation/layout-animation.js} +2 -2
  70. package/traits/{layout-animation.test.js → layout-animation/layout-animation.test.js} +1 -1
  71. package/traits/{long-press.js → long-press/long-press.js} +1 -1
  72. package/traits/{long-press.test.js → long-press/long-press.test.js} +1 -1
  73. package/traits/{magnetic-hover.js → magnetic-hover/magnetic-hover.js} +2 -2
  74. package/traits/{magnetic-hover.test.js → magnetic-hover/magnetic-hover.test.js} +1 -1
  75. package/traits/{noise-texture.js → noise-texture/noise-texture.js} +1 -1
  76. package/traits/{noise-texture.test.js → noise-texture/noise-texture.test.js} +1 -1
  77. package/traits/{parallax.js → parallax/parallax.js} +2 -2
  78. package/traits/{parallax.test.js → parallax/parallax.test.js} +1 -1
  79. package/traits/{portal.js → portal/portal.js} +1 -1
  80. package/traits/{portal.test.js → portal/portal.test.js} +1 -1
  81. package/traits/{pressable.js → pressable/pressable.js} +1 -1
  82. package/traits/{pressable.test.js → pressable/pressable.test.js} +1 -1
  83. package/traits/{resettable.js → resettable/resettable.js} +1 -1
  84. package/traits/{resettable.test.js → resettable/resettable.test.js} +1 -1
  85. package/traits/{resizable.js → resizable/resizable.js} +1 -1
  86. package/traits/{resizable.test.js → resizable/resizable.test.js} +1 -1
  87. package/traits/{resize-observer.js → resize-observer/resize-observer.js} +1 -1
  88. package/traits/{resize-observer.test.js → resize-observer/resize-observer.test.js} +1 -1
  89. package/traits/{ripple.js → ripple/ripple.js} +2 -2
  90. package/traits/{ripple.test.js → ripple/ripple.test.js} +1 -1
  91. package/traits/{roving-tabindex.js → roving-tabindex/roving-tabindex.js} +1 -1
  92. package/traits/{roving-tabindex.test.js → roving-tabindex/roving-tabindex.test.js} +1 -1
  93. package/traits/{scale-press.js → scale-press/scale-press.js} +1 -1
  94. package/traits/{scale-press.test.js → scale-press/scale-press.test.js} +1 -1
  95. package/traits/{scroll-lock.js → scroll-lock/scroll-lock.js} +1 -1
  96. package/traits/{scroll-lock.test.js → scroll-lock/scroll-lock.test.js} +1 -1
  97. package/traits/{scroll-progress.js → scroll-progress/scroll-progress.js} +1 -1
  98. package/traits/{scroll-progress.test.js → scroll-progress/scroll-progress.test.js} +1 -1
  99. package/traits/{shimmer-loading.js → shimmer-loading/shimmer-loading.js} +2 -2
  100. package/traits/{shimmer-loading.test.js → shimmer-loading/shimmer-loading.test.js} +1 -1
  101. package/traits/{snap-to-grid.js → snap-to-grid/snap-to-grid.js} +1 -1
  102. package/traits/{snap-to-grid.test.js → snap-to-grid/snap-to-grid.test.js} +1 -1
  103. package/traits/{sound-feedback.js → sound-feedback/sound-feedback.js} +1 -1
  104. package/traits/{sound-feedback.test.js → sound-feedback/sound-feedback.test.js} +1 -1
  105. package/traits/{spring-animate.js → spring-animate/spring-animate.js} +1 -1
  106. package/traits/{spring-animate.test.js → spring-animate/spring-animate.test.js} +1 -1
  107. package/traits/{success-checkmark.js → success-checkmark/success-checkmark.js} +2 -2
  108. package/traits/{success-checkmark.test.js → success-checkmark/success-checkmark.test.js} +1 -1
  109. package/traits/{tilt-hover.js → tilt-hover/tilt-hover.js} +2 -2
  110. package/traits/{tilt-hover.test.js → tilt-hover/tilt-hover.test.js} +1 -1
  111. package/traits/{tossable.js → tossable/tossable.js} +1 -1
  112. package/traits/{tossable.test.js → tossable/tossable.test.js} +1 -1
  113. package/traits/traits-host.test.js +2 -2
  114. package/traits/{typeahead.js → typeahead/typeahead.js} +1 -1
  115. package/traits/{typeahead.test.js → typeahead/typeahead.test.js} +1 -1
  116. package/traits/{typewriter.js → typewriter/typewriter.js} +2 -2
  117. package/traits/{typewriter.test.js → typewriter/typewriter.test.js} +1 -1
  118. package/traits/{validation.js → validation/validation.js} +1 -1
  119. package/traits/{validation.test.js → validation/validation.test.js} +1 -1
  120. package/traits/{view-transition.js → view-transition/view-transition.js} +2 -2
  121. package/traits/{view-transition.test.js → view-transition/view-transition.test.js} +2 -2
  122. /package/traits/{announcer-stage.js → announcer/announcer-stage.js} +0 -0
  123. /package/traits/{confetti-stage.js → confetti/confetti-stage.js} +0 -0
@@ -1,6 +1,6 @@
1
1
  import { describe, it, expect, beforeEach } from 'vitest';
2
2
  import { scalePress } from './scale-press.js';
3
- import { mountHost, connectTrait, resetDOM } from './test-helpers.js';
3
+ import { mountHost, connectTrait, resetDOM } from '../test-helpers.js';
4
4
 
5
5
  describe('scale-press', () => {
6
6
  beforeEach(resetDOM);
@@ -1,4 +1,4 @@
1
- import { defineTrait } from './define.js';
1
+ import { defineTrait } from '../define.js';
2
2
 
3
3
  let lockCount = 0;
4
4
  let savedOverflow = '';
@@ -1,6 +1,6 @@
1
1
  import { describe, it, expect, beforeEach } from 'vitest';
2
2
  import { scrollLock } from './scroll-lock.js';
3
- import { mountHost, connectTrait, resetDOM } from './test-helpers.js';
3
+ import { mountHost, connectTrait, resetDOM } from '../test-helpers.js';
4
4
 
5
5
  describe('scroll-lock', () => {
6
6
  beforeEach(() => {
@@ -1,4 +1,4 @@
1
- import { defineTrait } from './define.js';
1
+ import { defineTrait } from '../define.js';
2
2
 
3
3
  /**
4
4
  * scroll-progress — surfaces page or element scroll progress as a 0..1
@@ -1,6 +1,6 @@
1
1
  import { describe, it, expect, beforeEach, vi, afterEach } from 'vitest';
2
2
  import { scrollProgress } from './scroll-progress.js';
3
- import { mountHost, connectTrait, spyEvent, resetDOM } from './test-helpers.js';
3
+ import { mountHost, connectTrait, spyEvent, resetDOM } from '../test-helpers.js';
4
4
 
5
5
  describe('scroll-progress', () => {
6
6
  let originalRAF;
@@ -1,5 +1,5 @@
1
- import { defineTrait } from './define.js';
2
- import { prefersReducedMotion } from './motion.js';
1
+ import { defineTrait } from '../define.js';
2
+ import { prefersReducedMotion } from '../motion.js';
3
3
 
4
4
  export const shimmerLoading = defineTrait({
5
5
  name: 'shimmer-loading',
@@ -1,6 +1,6 @@
1
1
  import { describe, it, expect, beforeEach } from 'vitest';
2
2
  import { shimmerLoading } from './shimmer-loading.js';
3
- import { mountHost, connectTrait, resetDOM } from './test-helpers.js';
3
+ import { mountHost, connectTrait, resetDOM } from '../test-helpers.js';
4
4
 
5
5
  describe('shimmer-loading', () => {
6
6
  beforeEach(resetDOM);
@@ -1,4 +1,4 @@
1
- import { defineTrait } from './define.js';
1
+ import { defineTrait } from '../define.js';
2
2
 
3
3
  export const snapToGrid = defineTrait({
4
4
  name: 'snap-to-grid',
@@ -1,6 +1,6 @@
1
1
  import { describe, it, expect, beforeEach } from 'vitest';
2
2
  import { snapToGrid } from './snap-to-grid.js';
3
- import { mountHost, connectTrait, resetDOM } from './test-helpers.js';
3
+ import { mountHost, connectTrait, resetDOM } from '../test-helpers.js';
4
4
 
5
5
  describe('snap-to-grid', () => {
6
6
  beforeEach(resetDOM);
@@ -1,4 +1,4 @@
1
- import { defineTrait } from './define.js';
1
+ import { defineTrait } from '../define.js';
2
2
 
3
3
  export const soundFeedback = defineTrait({
4
4
  name: 'sound-feedback',
@@ -1,6 +1,6 @@
1
1
  import { describe, it, expect, beforeEach } from 'vitest';
2
2
  import { soundFeedback } from './sound-feedback.js';
3
- import { mountHost, connectTrait, resetDOM } from './test-helpers.js';
3
+ import { mountHost, connectTrait, resetDOM } from '../test-helpers.js';
4
4
 
5
5
  describe('sound-feedback', () => {
6
6
  beforeEach(resetDOM);
@@ -1,4 +1,4 @@
1
- import { defineTrait } from './define.js';
1
+ import { defineTrait } from '../define.js';
2
2
 
3
3
  export const springAnimate = defineTrait({
4
4
  name: 'spring-animate',
@@ -1,6 +1,6 @@
1
1
  import { describe, it, expect, beforeEach } from 'vitest';
2
2
  import { springAnimate } from './spring-animate.js';
3
- import { mountHost, connectTrait, resetDOM } from './test-helpers.js';
3
+ import { mountHost, connectTrait, resetDOM } from '../test-helpers.js';
4
4
 
5
5
  describe('spring-animate', () => {
6
6
  beforeEach(resetDOM);
@@ -1,5 +1,5 @@
1
- import { defineTrait } from './define.js';
2
- import { prefersReducedMotion } from './motion.js';
1
+ import { defineTrait } from '../define.js';
2
+ import { prefersReducedMotion } from '../motion.js';
3
3
 
4
4
  /**
5
5
  * `success-checkmark` — SVG path stroke-draw animation. "I confirmed it
@@ -1,6 +1,6 @@
1
1
  import { describe, it, expect, beforeEach } from 'vitest';
2
2
  import { successCheckmark } from './success-checkmark.js';
3
- import { mountHost, connectTrait, spyEvent, resetDOM, wait } from './test-helpers.js';
3
+ import { mountHost, connectTrait, spyEvent, resetDOM, wait } from '../test-helpers.js';
4
4
 
5
5
  // Helper: query the SVG that the trait stamps. As of the overflow:hidden
6
6
  // fix, the SVG renders at body level (position: fixed) so it can't be
@@ -1,5 +1,5 @@
1
- import { defineTrait } from './define.js';
2
- import { prefersReducedMotion } from './motion.js';
1
+ import { defineTrait } from '../define.js';
2
+ import { prefersReducedMotion } from '../motion.js';
3
3
 
4
4
  export const tiltHover = defineTrait({
5
5
  name: 'tilt-hover',
@@ -1,6 +1,6 @@
1
1
  import { describe, it, expect, beforeEach } from 'vitest';
2
2
  import { tiltHover } from './tilt-hover.js';
3
- import { mountHost, connectTrait, resetDOM } from './test-helpers.js';
3
+ import { mountHost, connectTrait, resetDOM } from '../test-helpers.js';
4
4
 
5
5
  describe('tilt-hover', () => {
6
6
  beforeEach(resetDOM);
@@ -1,4 +1,4 @@
1
- import { defineTrait } from './define.js';
1
+ import { defineTrait } from '../define.js';
2
2
 
3
3
  const FRICTION = 0.92;
4
4
  const BOUNCE_FACTOR = -0.6;
@@ -1,6 +1,6 @@
1
1
  import { describe, it, expect, beforeEach } from 'vitest';
2
2
  import { tossable } from './tossable.js';
3
- import { mountHost, connectTrait, resetDOM } from './test-helpers.js';
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 }));
@@ -8,8 +8,8 @@
8
8
 
9
9
  import { describe, it, expect, beforeEach } from 'vitest';
10
10
  import './traits-host.js';
11
- import './pressable.js';
12
- import './hoverable.js';
11
+ import './pressable/pressable.js';
12
+ import './hoverable/hoverable.js';
13
13
  import { resetDOM } from './test-helpers.js';
14
14
 
15
15
  describe('<traits-host>', () => {
@@ -1,4 +1,4 @@
1
- import { defineTrait } from './define.js';
1
+ import { defineTrait } from '../define.js';
2
2
 
3
3
  const BUFFER_TIMEOUT = 500;
4
4
 
@@ -1,6 +1,6 @@
1
1
  import { describe, it, expect, beforeEach } from 'vitest';
2
2
  import { typeahead } from './typeahead.js';
3
- import { mountHost, connectTrait, spyEvent, resetDOM, wait } from './test-helpers.js';
3
+ import { mountHost, connectTrait, spyEvent, resetDOM, wait } from '../test-helpers.js';
4
4
 
5
5
  function child(host, text) {
6
6
  const li = document.createElement('div');
@@ -1,5 +1,5 @@
1
- import { defineTrait } from './define.js';
2
- import { prefersReducedMotion } from './motion.js';
1
+ import { defineTrait } from '../define.js';
2
+ import { prefersReducedMotion } from '../motion.js';
3
3
 
4
4
  export const typewriter = defineTrait({
5
5
  name: 'typewriter',
@@ -1,6 +1,6 @@
1
1
  import { describe, it, expect, beforeEach } from 'vitest';
2
2
  import { typewriter } from './typewriter.js';
3
- import { mountHost, connectTrait, spyEvent, resetDOM, wait } from './test-helpers.js';
3
+ import { mountHost, connectTrait, spyEvent, resetDOM, wait } from '../test-helpers.js';
4
4
 
5
5
  describe('typewriter', () => {
6
6
  beforeEach(resetDOM);
@@ -1,4 +1,4 @@
1
- import { defineTrait } from './define.js';
1
+ import { defineTrait } from '../define.js';
2
2
 
3
3
  const EMAIL_RE = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
4
4
 
@@ -1,6 +1,6 @@
1
1
  import { describe, it, expect, beforeEach } from 'vitest';
2
2
  import { validation } from './validation.js';
3
- import { mountHost, connectTrait, spyEvent, resetDOM } from './test-helpers.js';
3
+ import { mountHost, connectTrait, spyEvent, resetDOM } from '../test-helpers.js';
4
4
 
5
5
  function setValue(host, value) {
6
6
  host.value = value;
@@ -1,5 +1,5 @@
1
- import { defineTrait } from './define.js';
2
- import { prefersReducedMotion } from './motion.js';
1
+ import { defineTrait } from '../define.js';
2
+ import { prefersReducedMotion } from '../motion.js';
3
3
 
4
4
  /**
5
5
  * `view-transition` — declarative wrapper around the modern
@@ -1,6 +1,6 @@
1
1
  import { describe, it, expect, beforeEach, afterEach, vi } from 'vitest';
2
2
  import { viewTransition } from './view-transition.js';
3
- import { _resetMotionCache } from './motion.js';
3
+ import { _resetMotionCache } from '../motion.js';
4
4
  import {
5
5
  mountHost,
6
6
  connectTrait,
@@ -8,7 +8,7 @@ import {
8
8
  resetDOM,
9
9
  expectValidSchema,
10
10
  wait,
11
- } from './test-helpers.js';
11
+ } from '../test-helpers.js';
12
12
 
13
13
  describe('view-transition', () => {
14
14
  beforeEach(() => {