accessible-kit 1.0.2 → 1.0.3

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 CHANGED
@@ -5,6 +5,30 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [1.0.3] - 2025-12-20
9
+
10
+ ### Fixed
11
+ - **CSS Architecture**: Fixed inconsistent placement of animations in Offcanvas and Modal components
12
+ - Moved `transition` properties from `theme.css` to `core.css` for Offcanvas component
13
+ - Moved `transition` properties from `theme.css` to `core.css` for Modal component
14
+ - Animations now work out-of-the-box even when using custom themes without importing `theme.css`
15
+
16
+ ### Changed
17
+ - Updated `package.json` exports to include `style` condition for better CSS import compatibility
18
+ - Improved CSS imports documentation for Tailwind CSS and other bundlers
19
+
20
+ ### Details
21
+ All components now follow consistent CSS architecture:
22
+ - **Core CSS** (`*.core.css`): Contains layout, positioning, behavior, and **animations**
23
+ - **Theme CSS** (`*.theme.css`): Contains only visual styling (colors, spacing, borders, shadows)
24
+
25
+ This ensures animations work correctly even when developers create custom themes.
26
+
27
+ ## [1.0.2] - 2025-12-20
28
+
29
+ ### Changed
30
+ - Minor version bump for package.json exports improvements
31
+
8
32
  ## [1.0.1] - 2025-12-20
9
33
 
10
34
  ### Changed
@@ -65,5 +89,7 @@ document.addEventListener('DOMContentLoaded', () => {
65
89
  - Zero dependencies
66
90
  - Full TypeScript-ready exports
67
91
 
92
+ [1.0.3]: https://github.com/5ulo/accessible-kit/compare/v1.0.2...v1.0.3
93
+ [1.0.2]: https://github.com/5ulo/accessible-kit/compare/v1.0.1...v1.0.2
68
94
  [1.0.1]: https://github.com/5ulo/accessible-kit/compare/v1.0.0...v1.0.1
69
95
  [1.0.0]: https://github.com/5ulo/accessible-kit/releases/tag/v1.0.0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "accessible-kit",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "Lightweight, accessible UI component library with full ARIA support. Zero dependencies, vanilla JavaScript.",
5
5
  "main": "src/js/index.js",
6
6
  "type": "module",
@@ -15,6 +15,8 @@
15
15
  justify-content: center;
16
16
  visibility: hidden;
17
17
  opacity: 0;
18
+ transition: opacity var(--a11y-modal-duration, 0.2s) var(--a11y-modal-easing, ease),
19
+ visibility var(--a11y-modal-duration, 0.2s) var(--a11y-modal-easing, ease);
18
20
  }
19
21
 
20
22
  [data-modal][aria-hidden="false"] {
@@ -31,6 +33,7 @@
31
33
  max-width: 90vw;
32
34
  overflow: hidden;
33
35
  transform: scale(0.95);
36
+ transition: transform var(--a11y-modal-duration, 0.2s) var(--a11y-modal-easing, ease);
34
37
  }
35
38
 
36
39
  [data-modal][aria-hidden="false"] [data-modal-dialog] {
@@ -5,8 +5,6 @@
5
5
  /* Modal wrapper */
6
6
  [data-modal] {
7
7
  padding: 1rem;
8
- transition: opacity var(--a11y-modal-duration, 0.2s) var(--a11y-modal-easing, ease),
9
- visibility var(--a11y-modal-duration, 0.2s) var(--a11y-modal-easing, ease);
10
8
  }
11
9
 
12
10
  /* Modal dialog */
@@ -16,7 +14,6 @@
16
14
  border-radius: 0.5rem;
17
15
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1),
18
16
  0 10px 10px -5px rgba(0, 0, 0, 0.04);
19
- transition: transform var(--a11y-modal-duration, 0.2s) var(--a11y-modal-easing, ease);
20
17
  }
21
18
 
22
19
  /* Modal header */
@@ -208,10 +205,8 @@
208
205
  }
209
206
  }
210
207
 
211
- /* Reduced motion support */
208
+ /* Reduced motion support for theme transitions */
212
209
  @media (prefers-reduced-motion: reduce) {
213
- [data-modal],
214
- [data-modal-dialog],
215
210
  [data-modal-close] {
216
211
  transition: none !important;
217
212
  }
@@ -9,6 +9,8 @@
9
9
  visibility: hidden;
10
10
  overflow-y: auto;
11
11
  -webkit-overflow-scrolling: touch;
12
+ transition: transform var(--a11y-offcanvas-duration, 0.3s) var(--a11y-offcanvas-easing, ease),
13
+ visibility var(--a11y-offcanvas-duration, 0.3s) var(--a11y-offcanvas-easing, ease);
12
14
  }
13
15
 
14
16
  [data-offcanvas-panel][aria-hidden="false"] {
@@ -96,6 +98,8 @@
96
98
  z-index: 999;
97
99
  visibility: hidden;
98
100
  opacity: 0;
101
+ transition: opacity var(--a11y-offcanvas-duration, 0.3s) var(--a11y-offcanvas-easing, ease),
102
+ visibility var(--a11y-offcanvas-duration, 0.3s) var(--a11y-offcanvas-easing, ease);
99
103
  }
100
104
 
101
105
  [data-offcanvas-backdrop][aria-hidden="false"] {
@@ -8,8 +8,6 @@
8
8
  max-width: 100%;
9
9
  background: #fff;
10
10
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
11
- transition: transform var(--a11y-offcanvas-duration, 0.3s) var(--a11y-offcanvas-easing, ease),
12
- visibility var(--a11y-offcanvas-duration, 0.3s) var(--a11y-offcanvas-easing, ease);
13
11
  display: flex;
14
12
  flex-direction: column;
15
13
  }
@@ -80,8 +78,6 @@
80
78
  /* Backdrop */
81
79
  [data-offcanvas-backdrop] {
82
80
  background: rgba(0, 0, 0, 0.5);
83
- transition: opacity var(--a11y-offcanvas-duration, 0.3s) var(--a11y-offcanvas-easing, ease),
84
- visibility var(--a11y-offcanvas-duration, 0.3s) var(--a11y-offcanvas-easing, ease);
85
81
  }
86
82
 
87
83
  /* Wide variant */
@@ -160,10 +156,8 @@
160
156
  }
161
157
  }
162
158
 
163
- /* Reduced motion support */
159
+ /* Reduced motion support for theme transitions */
164
160
  @media (prefers-reduced-motion: reduce) {
165
- [data-offcanvas-panel],
166
- [data-offcanvas-backdrop],
167
161
  [data-offcanvas-close] {
168
162
  transition: none !important;
169
163
  }
package/src/js/index.js CHANGED
@@ -2,7 +2,7 @@
2
2
  * a11y-kit
3
3
  * Lightweight, accessible UI component library with full ARIA support
4
4
  *
5
- * @version 1.0.2
5
+ * @version 1.0.3
6
6
  * @license MIT
7
7
  */
8
8