@iyulab/modern-app 0.53.0 → 0.53.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
@@ -1,5 +1,20 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.53.1] - 2026-10-13
4
+
5
+ ### Fixed
6
+
7
+ - **Group headers and sidebar buttons follow the navigation item tokens.** `--app-sidebar-item-gap`,
8
+ `--app-sidebar-item-padding` and `--app-sidebar-item-radius` were read by links only, and `--app-sidebar-icon-size` by
9
+ links and group headers — a theme that set them got three different label starts in one sidebar (links, group
10
+ headers, and footer buttons such as a theme toggle). All three item kinds now read all four. Without the tokens the
11
+ defaults are unchanged.
12
+
13
+ ### Documentation
14
+
15
+ - The unsaved-changes examples are complete snippets for Lit and React, and hold `UnsavedChangesController` in a
16
+ `readonly` field (a `private` one is flagged by `noUnusedLocals`).
17
+
3
18
  ## [0.53.0] - 2026-10-13
4
19
 
5
20
  ### Added
@@ -7,7 +7,7 @@ var t = e`
7
7
  color: var(--app-sidebar-fg, var(--u-txt-color, #212121));
8
8
  background-color: transparent;
9
9
  border: none;
10
- border-radius: 8px;
10
+ border-radius: var(--app-sidebar-item-radius, 8px);
11
11
  transition: all var(--u-duration-normal, 220ms) ease;
12
12
  cursor: pointer;
13
13
  }
@@ -34,8 +34,9 @@ var t = e`
34
34
  flex-direction: row;
35
35
  align-items: center;
36
36
  justify-content: flex-start;
37
- gap: 12px;
38
- padding: 8px 12px;
37
+
38
+ gap: var(--app-sidebar-item-gap, 12px);
39
+ padding: var(--app-sidebar-item-padding, 8px 12px);
39
40
 
40
41
  min-height: var(--u-target-size, 0px);
41
42
  }
@@ -52,7 +53,7 @@ var t = e`
52
53
  u-icon {
53
54
  flex-shrink: 0;
54
55
  color: inherit;
55
- font-size: 20px;
56
+ font-size: var(--app-sidebar-icon-size, 20px);
56
57
  }
57
58
 
58
59
 
@@ -17,13 +17,14 @@ var t = e`
17
17
  flex-direction: row;
18
18
  align-items: center;
19
19
  justify-content: space-between;
20
- gap: 12px;
21
- padding: 8px 12px;
20
+
21
+ gap: var(--app-sidebar-item-gap, 12px);
22
+ padding: var(--app-sidebar-item-padding, 8px 12px);
22
23
 
23
24
  min-height: var(--u-target-size, 0px);
24
25
  background-color: transparent;
25
26
  border: none;
26
- border-radius: 8px;
27
+ border-radius: var(--app-sidebar-item-radius, 8px);
27
28
  transition: all var(--u-duration-normal, 220ms) ease;
28
29
  cursor: pointer;
29
30
  }
package/dist/unsaved.d.ts CHANGED
@@ -36,7 +36,7 @@ export declare function unsavedChangesGuard(_ctx?: RouteLeaveContext): boolean |
36
36
  * @example
37
37
  * ```ts
38
38
  * class OrderPage extends LitElement {
39
- * private unsaved = new UnsavedChangesController(this, () => this.form.dirty);
39
+ * readonly unsaved = new UnsavedChangesController(this, () => this.form.dirty);
40
40
  * }
41
41
  * ```
42
42
  */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@iyulab/modern-app",
3
3
  "description": "web-framework by iyulab based on lit-element",
4
- "version": "0.53.0",
4
+ "version": "0.53.1",
5
5
  "keywords": [
6
6
  "iyulab",
7
7
  "web-framework",
@@ -244,7 +244,7 @@ Back/Forward included) and the browser asks before the document is left (`before
244
244
  ```ts
245
245
  import { UnsavedChangesController, confirmDiscardChanges } from '@iyulab/modern-app';
246
246
  // Lit
247
- private unsaved = new UnsavedChangesController(this, () => this.form.dirty);
247
+ readonly unsaved = new UnsavedChangesController(this, () => this.form.dirty);
248
248
  // React: useUnsavedChanges(dirty) from '@iyulab/modern-app/react'
249
249
  // Plain: const release = trackUnsavedChanges(() => dirty);
250
250
  // A modal drawer's close is not a navigation — ask from its cancellable `hide` event: