declarative-forms 2.1.1 → 2.1.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "declarative-forms",
3
- "version": "2.1.1",
3
+ "version": "2.1.2",
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": [
@@ -12,9 +12,14 @@
12
12
  "types": "./dist/index.d.ts",
13
13
  "exports": {
14
14
  ".": {
15
- "types": "./dist/index.d.ts",
16
- "import": "./dist/index.js",
17
- "require": "./dist/index.cjs"
15
+ "import": {
16
+ "types": "./dist/index.d.ts",
17
+ "default": "./dist/index.js"
18
+ },
19
+ "require": {
20
+ "types": "./dist/index.d.cts",
21
+ "default": "./dist/index.cjs"
22
+ }
18
23
  },
19
24
  "./styles.css": "./styles/declarative-forms.css",
20
25
  "./theme.css": "./styles/declarative-forms.css",
@@ -31,6 +36,7 @@
31
36
  ],
32
37
  "scripts": {
33
38
  "build": "tsup",
39
+ "prepare": "npm run build",
34
40
  "typecheck": "tsc --noEmit",
35
41
  "lint": "eslint .",
36
42
  "lint:fix": "eslint . --fix",
@@ -265,18 +265,29 @@
265
265
  background: currentColor;
266
266
  }
267
267
 
268
+ /*
269
+ * Both axes are anchored explicitly. v1 set only one axis per bar and let the
270
+ * other resolve to the static position, which was 0 because .cancelBtn was a
271
+ * <div>. v2 renders it as a <button>, which centres its content, so the unset
272
+ * axis resolved to 6px/8px and the two bars crossed at a corner -- the X
273
+ * rendered as a chevron.
274
+ */
268
275
  .cancelBtn:before {
269
- left: 6px;
276
+ top: 50%;
277
+ left: 50%;
270
278
  width: 2px;
271
- margin-left: -1px;
272
279
  height: 12px;
280
+ margin-top: -6px;
281
+ margin-left: -1px;
273
282
  }
274
283
 
275
284
  .cancelBtn:after {
276
- top: 6px;
285
+ top: 50%;
286
+ left: 50%;
287
+ width: 12px;
277
288
  height: 2px;
278
289
  margin-top: -1px;
279
- width: 12px;
290
+ margin-left: -6px;
280
291
  }
281
292
 
282
293
  /* -------------------------------------------------------------------- form */