declarative-forms 2.1.0 → 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.0",
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 */
@@ -1238,10 +1238,24 @@
1238
1238
  fill: var(--dl-accent);
1239
1239
  }
1240
1240
 
1241
+ /*
1242
+ * The shimmer itself lives in the component's injected styles, but this theme
1243
+ * paints `.input-wrapper` from a more specific selector (`.dl-form dl-select
1244
+ * .input-wrapper`), which would otherwise win and leave the skeleton animating
1245
+ * a flat colour — a blank field instead of a loading one. Repeat the gradient
1246
+ * here so the theme's own background does not swallow it.
1247
+ */
1241
1248
  .dl-form dl-select.dl-select-loading .input-wrapper,
1242
1249
  .dl-modal dl-select.dl-select-loading .input-wrapper {
1243
1250
  width: 100%;
1244
1251
  border-radius: var(--dl-radius-sm);
1252
+ background-image: linear-gradient(
1253
+ to right,
1254
+ var(--dl-select-loading-col1) 10%,
1255
+ var(--dl-select-loading-col2) 18%,
1256
+ var(--dl-select-loading-col1) 33%
1257
+ );
1258
+ background-size: 800px 104px;
1245
1259
  }
1246
1260
 
1247
1261
  /* The popup is portalled to <body>, so it cannot be scoped to `.dl-form`. */