declarative-forms 2.0.0 → 2.0.1

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
@@ -7,6 +7,38 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ The next release is a **major** one: the stylesheet you get by default changes.
11
+
12
+ ### Changed
13
+
14
+ - **Breaking: `declarative-forms/styles.css` is now the modern theme.** It was
15
+ the v1 look; the modern light/dark redesign that 2.0 shipped as an opt-in
16
+ `theme.css` is what a plain `styles.css` import renders from now on. A first
17
+ install should look current without having to find a second import.
18
+ - **The v1 look moved to `declarative-forms/classic.css`.** It is byte-for-byte
19
+ the same stylesheet, still tokenised, still shipped. Installations whose
20
+ overrides were written against it need a one-word import change.
21
+ - `declarative-forms/assets/default.css` — the v1 export path — now maps to
22
+ `classic.css`, which is the file it always rendered. A migration that kept
23
+ that path sees no change at all.
24
+ - `declarative-forms/theme.css` still resolves, now to the same file as
25
+ `styles.css`, so a 2.0 opt-in import keeps working. Prefer `styles.css`.
26
+ - Consequently, **checkboxes are keyboard-reachable by default**: the input is
27
+ styled with `appearance: none` rather than hidden behind a pseudo-element.
28
+ `classic.css` keeps the old, unreachable markup.
29
+
30
+ ### Migration
31
+
32
+ - Want the new look: change nothing.
33
+ - Want the old look: `import 'declarative-forms/classic.css'` instead of
34
+ `styles.css`.
35
+ - Overrides that assumed the classic geometry (400px fields, 416px dialogs) or
36
+ painted the checkbox pseudo-element need either `classic.css` or the
37
+ `--dl-field-width` / `--dl-modal-width` tokens. See
38
+ [Themes](https://wolfoo2931.github.io/declarative-forms/guide/theme).
39
+
40
+ ## [2.0.0] — 2026-08-16
41
+
10
42
  ### Added
11
43
 
12
44
  - A second stylesheet, `declarative-forms/theme.css`: a modern redesign with
@@ -111,5 +143,6 @@ keep working. See the [migration guide](https://wolfoo2931.github.io/declarative
111
143
  - Buttons flashed disabled on every keystroke, and a well-timed click could be
112
144
  dropped.
113
145
 
114
- [Unreleased]: https://github.com/wolfoo2931/declarative-forms/compare/v2.0.0-alpha.0...HEAD
146
+ [Unreleased]: https://github.com/wolfoo2931/declarative-forms/compare/v2.0.0...HEAD
147
+ [2.0.0]: https://github.com/wolfoo2931/declarative-forms/compare/v2.0.0-alpha.0...v2.0.0
115
148
  [2.0.0-alpha.0]: https://github.com/wolfoo2931/declarative-forms/releases/tag/v2.0.0-alpha.0
package/README.md CHANGED
@@ -104,12 +104,17 @@ This is why the project feels more like a small “form engine” than a typical
104
104
  npm install declarative-forms
105
105
  ```
106
106
 
107
- And include the default CSS:
107
+ And include the stylesheet:
108
108
 
109
109
  ```ts
110
110
  import 'declarative-forms/styles.css';
111
111
  ```
112
112
 
113
+ That is the default look — a modern theme that follows the operating system's
114
+ light/dark setting. The v1 look is still shipped as
115
+ `declarative-forms/classic.css` for installations with overrides written
116
+ against it.
117
+
113
118
  ## Example: modal form
114
119
 
115
120
  ```ts
@@ -186,7 +191,7 @@ Full documentation is at **[wolfoo2931.github.io/declarative-forms](https://wolf
186
191
 
187
192
  Worth knowing before you adopt it:
188
193
 
189
- - **Accessibility is a work in progress.** Labels, ids and focusable buttons are correct; dialog semantics, combobox ARIA and keyboard-reachable checkboxes are not there yet. The [accessibility page](https://wolfoo2931.github.io/declarative-forms/accessibility) lists every known gap.
194
+ - **Accessibility is a work in progress.** Labels, ids, focusable buttons and — under the default stylesheet — keyboard-reachable checkboxes are correct; dialog semantics and combobox ARIA are not there yet. The [accessibility page](https://wolfoo2931.github.io/declarative-forms/accessibility) lists every known gap.
190
195
  - **There is no validation framework.** `isActive` handles conditional fields and button predicates gate submission, but there is no rule engine or error-message system.
191
196
  - **The rendered DOM is a frozen contract.** Class names, ids and structure are stable across the v1 → v2 rewrite, so existing stylesheets keep working. See the [DOM contract](https://wolfoo2931.github.io/declarative-forms/dom-contract).
192
197
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "declarative-forms",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "description": "Declarative, data-driven form dialogs for the web. Zero dependencies, framework agnostic, with async options, cross-field reactivity, tabs and modal stacking.",
5
5
  "type": "module",
6
6
  "sideEffects": [
@@ -17,8 +17,9 @@
17
17
  "require": "./dist/index.cjs"
18
18
  },
19
19
  "./styles.css": "./styles/declarative-forms.css",
20
- "./theme.css": "./styles/theme.css",
21
- "./assets/default.css": "./styles/declarative-forms.css",
20
+ "./theme.css": "./styles/declarative-forms.css",
21
+ "./classic.css": "./styles/classic.css",
22
+ "./assets/default.css": "./styles/classic.css",
22
23
  "./package.json": "./package.json"
23
24
  },
24
25
  "files": [