@iyulab/modern-app 0.6.0 → 0.8.0
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 +65 -0
- package/README.md +10 -1
- package/dist/_virtual/{_@oxc-project_runtime@0.138.0 → _@oxc-project_runtime@0.142.0}/helpers/esm/decorate.js +1 -1
- package/dist/_virtual/{_@oxc-project_runtime@0.138.0 → _@oxc-project_runtime@0.142.0}/helpers/esm/decorateMetadata.js +1 -1
- package/dist/components/SidebarButton.js +2 -2
- package/dist/components/SidebarButton.styles.js +5 -5
- package/dist/components/SidebarGroup.js +2 -2
- package/dist/components/SidebarGroup.styles.js +12 -7
- package/dist/components/SidebarLink.js +2 -2
- package/dist/components/SidebarLink.styles.js +15 -9
- package/dist/components/SidebarSection.js +2 -2
- package/dist/components/SidebarSection.styles.js +7 -2
- package/dist/internals/StyledElement.js +2 -2
- package/dist/layouts/SidebarLayout.js +12 -9
- package/dist/layouts/SidebarLayout.styles.js +18 -19
- package/package.json +12 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,70 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.8.0] - 2026-08-01
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
|
|
7
|
+
- ★**셸을 브랜드 색으로 다시 칠할 수 있다** — 사이드바의 활성 메뉴 색이 파랑 프리미티브
|
|
8
|
+
(`--u-blue-600`)에 하드와이어돼 있었다. 소비자가 브랜드를 다른 색으로 잡아도 **화면에서
|
|
9
|
+
가장 눈에 띄는 좌측 메뉴만 파랑으로 남았고**, 이를 고치는 길이 둘 다 나빴다 — 팔레트를
|
|
10
|
+
덮으면 *진짜 파랑*이 필요한 배지·차트까지 오염되고(팔레트는 이름이 곧 값의 약속이다),
|
|
11
|
+
섀도 DOM 내부 CSS 를 뚫으면 구조 변경에 조용히 깨진다.
|
|
12
|
+
|
|
13
|
+
이제 셸은 역할 토큰을 경유한다. **재브랜딩이 한 줄이다**:
|
|
14
|
+
|
|
15
|
+
```css
|
|
16
|
+
:root { --u-primary-color: #7B1FA2; }
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
- **셸 표면 토큰을 소비자 계약으로 공개했다** — `--app-sidebar-{bg,fg,active-bg,active-fg,width,width-slim}`
|
|
20
|
+
· `--app-header-{bg,fg}`. **전부 선택**이며 미지정 시 역할 토큰에서 파생되므로, 아무것도
|
|
21
|
+
하지 않으면 브랜드를 따라오고 원하면 셸만 따로 조절한다. 문서: [docs/theme.md](docs/theme.md).
|
|
22
|
+
|
|
23
|
+
활성 메뉴의 hover 는 **별도 토큰이 아니라 파생**(`color-mix(… 85%, black)`)이다 — 한쪽만
|
|
24
|
+
덮은 소비자가 어긋난 색 쌍을 얻는 것이 이 계약이 막으려는 결함이기 때문이다.
|
|
25
|
+
|
|
26
|
+
- **브라우저 테스트 프로젝트** — 실제 렌더에서만 드러나는 것을 검증한다
|
|
27
|
+
(`npm run test:browser`). `color-mix` 계산과 커스텀 프로퍼티 캐스케이드는 jsdom 이
|
|
28
|
+
재현하지 못한다.
|
|
29
|
+
|
|
30
|
+
### Fixed
|
|
31
|
+
|
|
32
|
+
- **라우팅 실패 표시가 컴포넌트의 위험색 규약을 따르지 않던 문제 수정** — `u-progress-bar` 의
|
|
33
|
+
API 에 없는 `error` 속성을 세우고 색을 자체 CSS 로 덮고 있었다. 컴포넌트가 제공하는
|
|
34
|
+
`status="error"` 를 쓰도록 고쳤다 — 막대 색이 규약값으로 정정되고, 종전에는 정정되지 않던
|
|
35
|
+
버퍼 색도 함께 따라온다.
|
|
36
|
+
- **진행 표시 트랙 색 지정이 오타로 동작하지 않던 문제 수정** — `--progres-bar-track-color`
|
|
37
|
+
(`s` 누락)라 트랙이 투명해지지 않고 기본 회색으로 남아 있었다.
|
|
38
|
+
- **키보드 포커스 링이 테마를 따르지 않던 문제 수정** — 사이드바 그룹·버튼의 포커스 윤곽선이
|
|
39
|
+
하드코딩된 색(`#6666ff`)이었다. 브랜드와 무관했고 다크 테마에서도 그대로였다.
|
|
40
|
+
|
|
41
|
+
### Changed
|
|
42
|
+
|
|
43
|
+
- ⚠**활성 메뉴 hover 배경이 미세하게 어두워진다** — 고정된 `--u-blue-700`(#1976D2) 대신
|
|
44
|
+
활성 색에서 파생하므로 기본 팔레트에서 #1A74C3 이 된다. 소비자가 브랜드를 바꿔도 hover 가
|
|
45
|
+
함께 따라오게 하려면 파생이어야 한다(고정 단은 따라오지 않는다).
|
|
46
|
+
- ⚠**사이드바 그룹의 강조 텍스트 색이 바뀐다** — 같은 파생식을 쓴다. 대비는 오히려
|
|
47
|
+
올라간다(4.60:1 → 4.85:1, WCAG AA 통과 유지).
|
|
48
|
+
- **사이드바 본문 텍스트가 `--u-neutral-800` 에서 시맨틱 토큰 `--u-txt-color` 로 바뀌었다.**
|
|
49
|
+
소비자의 텍스트 색 지정을 따르게 된다.
|
|
50
|
+
|
|
51
|
+
## [0.7.0] - 2026-08-01
|
|
52
|
+
|
|
53
|
+
### Fixed
|
|
54
|
+
|
|
55
|
+
- ★**토큰 시트를 로드하지 않으면 앱 셸이 깨지던 문제 수정** — 사이드바·레이아웃의 색 선언
|
|
56
|
+
**34곳**이 `@iyulab/components` 의 시트 토큰을 폴백 없이 참조하고 있었다. 시트가 없으면
|
|
57
|
+
`var(--u-*)` 가 무효가 되어 **그 선언이 통째로 버려지므로**, 메뉴 텍스트가 보이지 않고
|
|
58
|
+
사이드바 배경이 투명해졌다. 앱 셸이라 화면 전체가 영향을 받는다.
|
|
59
|
+
|
|
60
|
+
이제 각 참조가 기본 테마 값을 폴백으로 갖는다(`var(--u-txt-color, #212121)`).
|
|
61
|
+
**시트를 로드하는 경우 시각 변화는 없다** — 폴백은 시트가 없을 때만 평가된다.
|
|
62
|
+
리터럴이 업스트림 시트와 어긋나지 않도록 대조 테스트가 강제하며, 폴백은 손으로 쓰지 않고
|
|
63
|
+
생성한다.
|
|
64
|
+
|
|
65
|
+
⚠**폰트(`--u-font-base`)는 예외**다 — 폴백을 배선하지 않았다. 시트가 없으면 브라우저 기본
|
|
66
|
+
폰트로 대체되어 화면이 깨지지 않는다(색은 깨진다).
|
|
67
|
+
|
|
3
68
|
## [0.6.0] - 2026-07-03
|
|
4
69
|
|
|
5
70
|
### Added
|
package/README.md
CHANGED
|
@@ -77,6 +77,15 @@ app.theme.set('dark');
|
|
|
77
77
|
app.theme.isInitialized; // boolean
|
|
78
78
|
```
|
|
79
79
|
|
|
80
|
+
Rebranding the shell is one declaration — the sidebar's active menu follows it:
|
|
81
|
+
|
|
82
|
+
```css
|
|
83
|
+
:root { --u-primary-color: #7B1FA2; }
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Shell surfaces can also be tuned on their own (`--app-sidebar-bg`, `--app-sidebar-width`, …).
|
|
87
|
+
See [theme.md](./docs/theme.md).
|
|
88
|
+
|
|
80
89
|
### Notifications
|
|
81
90
|
|
|
82
91
|
```typescript
|
|
@@ -171,7 +180,7 @@ await app.load({
|
|
|
171
180
|
| [getting-started.md](./docs/getting-started.md) | Bootstrap, architecture, entry point setup |
|
|
172
181
|
| [routing.md](./docs/routing.md) | Route config, URL params, async routes, progress, auth guards |
|
|
173
182
|
| [layout.md](./docs/layout.md) | Sidebar layout, all menu item types, responsive behaviour |
|
|
174
|
-
| [theme.md](./docs/theme.md) | Theme init, runtime switching,
|
|
183
|
+
| [theme.md](./docs/theme.md) | Theme init, runtime switching, token layers, shell surface tokens |
|
|
175
184
|
| [notifications.md](./docs/notifications.md) | Toast methods and options |
|
|
176
185
|
| [i18n.md](./docs/i18n.md) | i18next setup, plugins, lit-i18n usage |
|
|
177
186
|
| [configuration.md](./docs/configuration.md) | Full TypeScript interface reference |
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region \0@oxc-project+runtime@0.
|
|
1
|
+
//#region \0@oxc-project+runtime@0.142.0/helpers/esm/decorate.js
|
|
2
2
|
function e(e, t, n, r) {
|
|
3
3
|
var i = arguments.length, a = i < 3 ? t : r === null ? r = Object.getOwnPropertyDescriptor(t, n) : r, o;
|
|
4
4
|
if (typeof Reflect == "object" && typeof Reflect.decorate == "function") a = Reflect.decorate(e, t, n, r);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region \0@oxc-project+runtime@0.
|
|
1
|
+
//#region \0@oxc-project+runtime@0.142.0/helpers/esm/decorateMetadata.js
|
|
2
2
|
function e(e, t) {
|
|
3
3
|
if (typeof Reflect == "object" && typeof Reflect.metadata == "function") return Reflect.metadata(e, t);
|
|
4
4
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import e from "../_virtual/_@oxc-project_runtime@0.
|
|
2
|
-
import t from "../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import e from "../_virtual/_@oxc-project_runtime@0.142.0/helpers/esm/decorateMetadata.js";
|
|
2
|
+
import t from "../_virtual/_@oxc-project_runtime@0.142.0/helpers/esm/decorate.js";
|
|
3
3
|
import { StyledElement as n } from "../internals/StyledElement.js";
|
|
4
4
|
import { styles as r } from "./SidebarButton.styles.js";
|
|
5
5
|
import { html as i } from "lit";
|
|
@@ -4,7 +4,7 @@ var t = e`
|
|
|
4
4
|
:host {
|
|
5
5
|
display: block;
|
|
6
6
|
width: 100%;
|
|
7
|
-
color: var(--u-txt-color);
|
|
7
|
+
color: var(--app-sidebar-fg, var(--u-txt-color, #212121));
|
|
8
8
|
background-color: transparent;
|
|
9
9
|
border: none;
|
|
10
10
|
border-radius: 8px;
|
|
@@ -12,11 +12,11 @@ var t = e`
|
|
|
12
12
|
cursor: pointer;
|
|
13
13
|
}
|
|
14
14
|
:host(:hover) {
|
|
15
|
-
color: var(--u-txt-color-hover);
|
|
16
|
-
background-color: var(--u-bg-color-hover);
|
|
15
|
+
color: var(--u-txt-color-hover, #1E88E5);
|
|
16
|
+
background-color: var(--u-bg-color-hover, #F5F5F5);
|
|
17
17
|
}
|
|
18
18
|
:host(:active) {
|
|
19
|
-
background-color: var(--u-bg-color-active);
|
|
19
|
+
background-color: var(--u-bg-color-active, #EEEEEE);
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
button {
|
|
@@ -35,7 +35,7 @@ var t = e`
|
|
|
35
35
|
padding: 8px;
|
|
36
36
|
}
|
|
37
37
|
button:focus-visible {
|
|
38
|
-
outline: 2px solid #
|
|
38
|
+
outline: 2px solid var(--u-primary-color-weak, #2196F3);
|
|
39
39
|
outline-offset: 2px;
|
|
40
40
|
}
|
|
41
41
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import e from "../_virtual/_@oxc-project_runtime@0.
|
|
2
|
-
import t from "../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import e from "../_virtual/_@oxc-project_runtime@0.142.0/helpers/esm/decorateMetadata.js";
|
|
2
|
+
import t from "../_virtual/_@oxc-project_runtime@0.142.0/helpers/esm/decorate.js";
|
|
3
3
|
import { StyledElement as n } from "../internals/StyledElement.js";
|
|
4
4
|
import { SidebarLink as r } from "./SidebarLink.js";
|
|
5
5
|
import { styles as i } from "./SidebarGroup.styles.js";
|
|
@@ -2,9 +2,12 @@ import { css as e } from "lit";
|
|
|
2
2
|
//#region src/components/SidebarGroup.styles.ts
|
|
3
3
|
var t = e`
|
|
4
4
|
:host {
|
|
5
|
+
/* SidebarLink 과 같은 원천 — 그룹 강조는 활성 링크와 같은 색 계열이어야 한다 */
|
|
6
|
+
--group-accent: var(--app-sidebar-active-bg, var(--u-primary-color, #1E88E5));
|
|
7
|
+
|
|
5
8
|
display: flex;
|
|
6
9
|
flex-direction: column;
|
|
7
|
-
color: var(--u-
|
|
10
|
+
color: var(--app-sidebar-fg, var(--u-txt-color, #212121));
|
|
8
11
|
}
|
|
9
12
|
|
|
10
13
|
button {
|
|
@@ -28,17 +31,19 @@ var t = e`
|
|
|
28
31
|
padding: 8px;
|
|
29
32
|
}
|
|
30
33
|
button[selected] {
|
|
31
|
-
|
|
34
|
+
/* 패널 위 텍스트라 강조색을 그대로 쓰면 대비가 부족하다(blue-600 = 3.68:1).
|
|
35
|
+
활성 배경과 같은 파생식으로 한 단 어둡게 해 AA 를 넘긴다(4.85:1). */
|
|
36
|
+
color: color-mix(in srgb, var(--group-accent) 85%, black);
|
|
32
37
|
}
|
|
33
38
|
button:hover {
|
|
34
|
-
color: var(--u-txt-color-hover);
|
|
35
|
-
background-color: var(--u-bg-color-hover);
|
|
39
|
+
color: var(--u-txt-color-hover, #1E88E5);
|
|
40
|
+
background-color: var(--u-bg-color-hover, #F5F5F5);
|
|
36
41
|
}
|
|
37
42
|
button:active {
|
|
38
|
-
background-color: var(--u-bg-color-active);
|
|
43
|
+
background-color: var(--u-bg-color-active, #EEEEEE);
|
|
39
44
|
}
|
|
40
45
|
button:focus-visible {
|
|
41
|
-
outline: 2px solid #
|
|
46
|
+
outline: 2px solid var(--u-primary-color-weak, #2196F3);
|
|
42
47
|
outline-offset: 2px;
|
|
43
48
|
}
|
|
44
49
|
|
|
@@ -73,7 +78,7 @@ var t = e`
|
|
|
73
78
|
gap: 4px;
|
|
74
79
|
margin-top: 4px;
|
|
75
80
|
margin-left: 32px;
|
|
76
|
-
border-left: 2px solid var(--u-border-color-weak);
|
|
81
|
+
border-left: 2px solid var(--u-border-color-weak, #EEEEEE);
|
|
77
82
|
padding-left: 8px;
|
|
78
83
|
overflow: hidden;
|
|
79
84
|
transition: all 0.3s ease;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import e from "../_virtual/_@oxc-project_runtime@0.
|
|
2
|
-
import t from "../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import e from "../_virtual/_@oxc-project_runtime@0.142.0/helpers/esm/decorateMetadata.js";
|
|
2
|
+
import t from "../_virtual/_@oxc-project_runtime@0.142.0/helpers/esm/decorate.js";
|
|
3
3
|
import { StyledElement as n } from "../internals/StyledElement.js";
|
|
4
4
|
import { styles as r } from "./SidebarLink.styles.js";
|
|
5
5
|
import { html as i } from "lit";
|
|
@@ -2,26 +2,32 @@ import { css as e } from "lit";
|
|
|
2
2
|
//#region src/components/SidebarLink.styles.ts
|
|
3
3
|
var t = e`
|
|
4
4
|
:host {
|
|
5
|
+
/* 활성 배경의 단일 원천. 소비자는 셸 계약 토큰(--app-sidebar-active-bg) 또는
|
|
6
|
+
역할 토큰(--u-primary-color) 어느 쪽을 덮어도 hover 파생까지 함께 따라온다.
|
|
7
|
+
팔레트(--u-blue-600)를 직접 읽으면 브랜드를 바꾸려는 소비자가 "진짜 파랑"이
|
|
8
|
+
필요한 배지·차트까지 함께 오염시키는 길밖에 없다. */
|
|
9
|
+
--link-active-bg: var(--app-sidebar-active-bg, var(--u-primary-color, #1E88E5));
|
|
10
|
+
|
|
5
11
|
display: block;
|
|
6
|
-
color: var(--u-
|
|
12
|
+
color: var(--app-sidebar-fg, var(--u-txt-color, #212121));
|
|
7
13
|
background-color: transparent;
|
|
8
14
|
border-radius: 8px;
|
|
9
15
|
transition: all 0.2s ease;
|
|
10
16
|
cursor: pointer;
|
|
11
17
|
}
|
|
12
18
|
:host(:hover) {
|
|
13
|
-
color: var(--u-txt-color-hover);
|
|
14
|
-
background-color: var(--u-bg-color-hover);
|
|
19
|
+
color: var(--u-txt-color-hover, #1E88E5);
|
|
20
|
+
background-color: var(--u-bg-color-hover, #F5F5F5);
|
|
15
21
|
}
|
|
16
22
|
:host([selected]) {
|
|
17
|
-
color: var(--u-txt-color-inverse);
|
|
18
|
-
background-color: var(--
|
|
19
|
-
box-shadow: 0 1px 3px var(--u-shadow-color-weak);
|
|
23
|
+
color: var(--app-sidebar-active-fg, var(--u-txt-color-inverse, #FFFFFF));
|
|
24
|
+
background-color: var(--link-active-bg);
|
|
25
|
+
box-shadow: 0 1px 3px var(--u-shadow-color-weak, rgba(0, 0, 0, 0.08));
|
|
20
26
|
}
|
|
21
27
|
:host([selected]:hover) {
|
|
22
|
-
color: var(--u-txt-color-inverse);
|
|
23
|
-
background-color: var(--
|
|
24
|
-
box-shadow: 0 2px 6px var(--u-shadow-color-normal);
|
|
28
|
+
color: var(--app-sidebar-active-fg, var(--u-txt-color-inverse, #FFFFFF));
|
|
29
|
+
background-color: color-mix(in srgb, var(--link-active-bg) 85%, black);
|
|
30
|
+
box-shadow: 0 2px 6px var(--u-shadow-color-normal, rgba(0, 0, 0, 0.12));
|
|
25
31
|
}
|
|
26
32
|
|
|
27
33
|
.container {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import e from "../_virtual/_@oxc-project_runtime@0.
|
|
2
|
-
import t from "../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import e from "../_virtual/_@oxc-project_runtime@0.142.0/helpers/esm/decorateMetadata.js";
|
|
2
|
+
import t from "../_virtual/_@oxc-project_runtime@0.142.0/helpers/esm/decorate.js";
|
|
3
3
|
import { StyledElement as n } from "../internals/StyledElement.js";
|
|
4
4
|
import { styles as r } from "./SidebarSection.styles.js";
|
|
5
5
|
import { html as i } from "lit";
|
|
@@ -14,8 +14,13 @@ var t = e`
|
|
|
14
14
|
padding: 8px 12px 4px;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
+
/* ⚠아래 두 색만 팔레트를 직접 읽는다 — 시맨틱 토큰으로 옮기면 대비가 무너지기 때문이다.
|
|
18
|
+
섹션 제목·부제는 본문(neutral-800)보다 약한 3단 위계를 이루는데, 역할 층의 보조
|
|
19
|
+
텍스트 단은 --u-txt-color-weak 하나뿐이고 그 값은 흰 배경에서 2.68:1 이라
|
|
20
|
+
WCAG AA(4.5:1)에 미달한다. 현행 두 값은 6.19:1 · 4.61:1 로 통과한다.
|
|
21
|
+
⇒ 역할 층에 AA 를 넘는 보조 텍스트 단이 생기면 그때 옮긴다. */
|
|
17
22
|
.title {
|
|
18
|
-
color: var(--u-neutral-700);
|
|
23
|
+
color: var(--u-neutral-700, #616161);
|
|
19
24
|
font-size: 12px;
|
|
20
25
|
font-weight: 700;
|
|
21
26
|
letter-spacing: 0.5px;
|
|
@@ -25,7 +30,7 @@ var t = e`
|
|
|
25
30
|
}
|
|
26
31
|
|
|
27
32
|
.subtitle {
|
|
28
|
-
color: var(--u-neutral-600);
|
|
33
|
+
color: var(--u-neutral-600, #757575);
|
|
29
34
|
font-size: 11px;
|
|
30
35
|
font-weight: 300;
|
|
31
36
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import e from "../_virtual/_@oxc-project_runtime@0.
|
|
2
|
-
import t from "../_virtual/_@oxc-project_runtime@0.
|
|
1
|
+
import e from "../_virtual/_@oxc-project_runtime@0.142.0/helpers/esm/decorateMetadata.js";
|
|
2
|
+
import t from "../_virtual/_@oxc-project_runtime@0.142.0/helpers/esm/decorate.js";
|
|
3
3
|
import { property as n } from "lit/decorators.js";
|
|
4
4
|
import { UElement as r } from "@iyulab/components/dist/components/UElement.js";
|
|
5
5
|
//#region src/internals/StyledElement.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { app as e } from "../App.js";
|
|
2
2
|
import { filterSidebarItems as t } from "./filterSidebarItems.js";
|
|
3
|
-
import n from "../_virtual/_@oxc-project_runtime@0.
|
|
4
|
-
import r from "../_virtual/_@oxc-project_runtime@0.
|
|
3
|
+
import n from "../_virtual/_@oxc-project_runtime@0.142.0/helpers/esm/decorateMetadata.js";
|
|
4
|
+
import r from "../_virtual/_@oxc-project_runtime@0.142.0/helpers/esm/decorate.js";
|
|
5
5
|
import { StyledElement as i } from "../internals/StyledElement.js";
|
|
6
6
|
import "../components/SidebarSection.js";
|
|
7
7
|
import "../components/SidebarLink.js";
|
|
@@ -40,8 +40,8 @@ var g = class extends i {
|
|
|
40
40
|
this.progressBarEl.removeAttribute("visible");
|
|
41
41
|
}, 300), (this.shadowRoot?.querySelector(".main"))?.focus({ preventScroll: !0 });
|
|
42
42
|
}, this.handleRouteError = (e) => {
|
|
43
|
-
this.progressBarEl.
|
|
44
|
-
this.progressBarEl.removeAttribute("visible"), this.progressBarEl.
|
|
43
|
+
this.progressBarEl.status = "error", this.progressBarEl.value = 100, setTimeout(() => {
|
|
44
|
+
this.progressBarEl.removeAttribute("visible"), this.progressBarEl.status = "default";
|
|
45
45
|
}, 300);
|
|
46
46
|
}, this._handleMainKeydown = (e) => {
|
|
47
47
|
let t = e.composedPath()[0];
|
|
@@ -152,7 +152,8 @@ var g = class extends i {
|
|
|
152
152
|
if (e.type === "html") {
|
|
153
153
|
let t = e.render(this.state);
|
|
154
154
|
return typeof t == "string" ? f(t) : o`${t}`;
|
|
155
|
-
}
|
|
155
|
+
}
|
|
156
|
+
if (e.type === "button") return o`
|
|
156
157
|
<u-sidebar-button
|
|
157
158
|
?compact=${this.state === "slim"}
|
|
158
159
|
.icon="${e.icon}"
|
|
@@ -161,7 +162,7 @@ var g = class extends i {
|
|
|
161
162
|
@click="${e.onClick}"
|
|
162
163
|
></u-sidebar-button>
|
|
163
164
|
`;
|
|
164
|
-
|
|
165
|
+
if (e.type === "link") {
|
|
165
166
|
let t = this.isMatchedLink(e.pattern || e.href);
|
|
166
167
|
return o`
|
|
167
168
|
<u-sidebar-link
|
|
@@ -174,7 +175,8 @@ var g = class extends i {
|
|
|
174
175
|
.styles="${e.styles}"
|
|
175
176
|
></u-sidebar-link>
|
|
176
177
|
`;
|
|
177
|
-
}
|
|
178
|
+
}
|
|
179
|
+
if (e.type === "section") return o`
|
|
178
180
|
<u-sidebar-section
|
|
179
181
|
?compact=${this.state === "slim"}
|
|
180
182
|
.mainTitle="${e.title}"
|
|
@@ -183,7 +185,7 @@ var g = class extends i {
|
|
|
183
185
|
${p(e.items, (e, t) => t, (e) => this.renderItem(e))}
|
|
184
186
|
</u-sidebar-section>
|
|
185
187
|
`;
|
|
186
|
-
|
|
188
|
+
if (e.type === "group") {
|
|
187
189
|
let t = e.items.some((e) => this.isMatchedLink(e.pattern || e.href));
|
|
188
190
|
return o`
|
|
189
191
|
<u-sidebar-group
|
|
@@ -196,7 +198,8 @@ var g = class extends i {
|
|
|
196
198
|
${p(e.items, (e, t) => t, (e) => this.renderItem(e))}
|
|
197
199
|
</u-sidebar-group>
|
|
198
200
|
`;
|
|
199
|
-
}
|
|
201
|
+
}
|
|
202
|
+
return s;
|
|
200
203
|
}
|
|
201
204
|
renderLogo() {
|
|
202
205
|
let e = this.config?.logo;
|
|
@@ -16,12 +16,12 @@ var t = e`
|
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
.logo {
|
|
19
|
-
color: var(--u-txt-color);
|
|
19
|
+
color: var(--u-txt-color, #212121);
|
|
20
20
|
font-size: 24px;
|
|
21
21
|
cursor: pointer;
|
|
22
22
|
}
|
|
23
23
|
.logo:hover {
|
|
24
|
-
color: var(--u-txt-color-hover);
|
|
24
|
+
color: var(--u-txt-color-hover, #1E88E5);
|
|
25
25
|
}
|
|
26
26
|
img.logo {
|
|
27
27
|
height: 24px;
|
|
@@ -31,7 +31,7 @@ var t = e`
|
|
|
31
31
|
|
|
32
32
|
.title {
|
|
33
33
|
flex: 1;
|
|
34
|
-
color: var(--u-txt-color);
|
|
34
|
+
color: var(--u-txt-color, #212121);
|
|
35
35
|
font-size: 18px;
|
|
36
36
|
line-height: 24px;
|
|
37
37
|
font-weight: 700;
|
|
@@ -48,7 +48,7 @@ var t = e`
|
|
|
48
48
|
background: transparent;
|
|
49
49
|
}
|
|
50
50
|
.toggler:hover {
|
|
51
|
-
color: var(--u-txt-color-hover);
|
|
51
|
+
color: var(--u-txt-color-hover, #1E88E5);
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
/* Sidebar Container */
|
|
@@ -60,16 +60,17 @@ var t = e`
|
|
|
60
60
|
justify-content: space-between;
|
|
61
61
|
gap: 8px;
|
|
62
62
|
height: 100%;
|
|
63
|
-
background: var(--u-panel-bg-color);
|
|
64
|
-
|
|
63
|
+
background: var(--app-sidebar-bg, var(--u-panel-bg-color, #FFFFFF));
|
|
64
|
+
color: var(--app-sidebar-fg, var(--u-txt-color, #212121));
|
|
65
|
+
border-right: 1px solid var(--u-border-color, #E0E0E0);
|
|
65
66
|
transition: all 0.3s ease;
|
|
66
67
|
}
|
|
67
68
|
/* Sidebar states */
|
|
68
69
|
.sidebar[state="default"] {
|
|
69
|
-
width: 260px;
|
|
70
|
+
width: var(--app-sidebar-width, 260px);
|
|
70
71
|
}
|
|
71
72
|
.sidebar[state="slim"] {
|
|
72
|
-
width: 64px;
|
|
73
|
+
width: var(--app-sidebar-width-slim, 64px);
|
|
73
74
|
}
|
|
74
75
|
.sidebar[state="slim"] .sidebar-header {
|
|
75
76
|
flex-direction: column;
|
|
@@ -77,7 +78,7 @@ var t = e`
|
|
|
77
78
|
padding: 16px;
|
|
78
79
|
}
|
|
79
80
|
.sidebar[state="modal"] {
|
|
80
|
-
width: 260px;
|
|
81
|
+
width: var(--app-sidebar-width, 260px);
|
|
81
82
|
position: absolute;
|
|
82
83
|
top: 0;
|
|
83
84
|
left: 0;
|
|
@@ -107,8 +108,9 @@ var t = e`
|
|
|
107
108
|
justify-content: space-between;
|
|
108
109
|
gap: 12px;
|
|
109
110
|
padding: 16px;
|
|
110
|
-
background: var(--u-panel-bg-color);
|
|
111
|
-
|
|
111
|
+
background: var(--app-header-bg, var(--u-panel-bg-color, #FFFFFF));
|
|
112
|
+
color: var(--app-header-fg, var(--u-txt-color, #212121));
|
|
113
|
+
border-bottom: 1px solid var(--u-border-color-weak, #EEEEEE);
|
|
112
114
|
user-select: none;
|
|
113
115
|
}
|
|
114
116
|
|
|
@@ -120,7 +122,7 @@ var t = e`
|
|
|
120
122
|
justify-content: space-between;
|
|
121
123
|
gap: 12px;
|
|
122
124
|
padding: 16px;
|
|
123
|
-
border-bottom: 1px solid var(--u-border-color-weak);
|
|
125
|
+
border-bottom: 1px solid var(--u-border-color-weak, #EEEEEE);
|
|
124
126
|
user-select: none;
|
|
125
127
|
}
|
|
126
128
|
|
|
@@ -141,7 +143,7 @@ var t = e`
|
|
|
141
143
|
flex-direction: column;
|
|
142
144
|
gap: 4px;
|
|
143
145
|
padding: 8px;
|
|
144
|
-
border-top: 1px solid var(--u-border-color-weak);
|
|
146
|
+
border-top: 1px solid var(--u-border-color-weak, #EEEEEE);
|
|
145
147
|
}
|
|
146
148
|
.sidebar-footer:empty {
|
|
147
149
|
display: none;
|
|
@@ -151,14 +153,14 @@ var t = e`
|
|
|
151
153
|
.main {
|
|
152
154
|
position: relative;
|
|
153
155
|
flex: 1;
|
|
154
|
-
background: var(--u-bg-color);
|
|
156
|
+
background: var(--u-bg-color, #FFFFFF);
|
|
155
157
|
overflow: auto;
|
|
156
158
|
outline: none;
|
|
157
159
|
}
|
|
158
160
|
|
|
159
161
|
.main u-progress-bar {
|
|
160
162
|
--progress-bar-height: 4px;
|
|
161
|
-
--
|
|
163
|
+
--progress-bar-track-color: transparent;
|
|
162
164
|
|
|
163
165
|
position: absolute;
|
|
164
166
|
z-index: 100;
|
|
@@ -174,9 +176,6 @@ var t = e`
|
|
|
174
176
|
opacity: 1;
|
|
175
177
|
transform: translateY(0);
|
|
176
178
|
}
|
|
177
|
-
.main u-progress-bar[error] {
|
|
178
|
-
--progress-bar-color: var(--u-red-500);
|
|
179
|
-
}
|
|
180
179
|
|
|
181
180
|
/* Backdrop for modal mode */
|
|
182
181
|
.backdrop {
|
|
@@ -186,7 +185,7 @@ var t = e`
|
|
|
186
185
|
left: 0;
|
|
187
186
|
right: 0;
|
|
188
187
|
bottom: 0;
|
|
189
|
-
background: var(--u-overlay-bg-color);
|
|
188
|
+
background: var(--u-overlay-bg-color, rgba(0, 0, 0, 0.5));
|
|
190
189
|
}
|
|
191
190
|
`;
|
|
192
191
|
//#endregion
|
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.
|
|
4
|
+
"version": "0.8.0",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"iyulab",
|
|
7
7
|
"web-framework",
|
|
@@ -37,20 +37,22 @@
|
|
|
37
37
|
"test": "vitest run",
|
|
38
38
|
"test:watch": "vitest",
|
|
39
39
|
"start": "vite",
|
|
40
|
-
"build": "vite build"
|
|
40
|
+
"build": "vite build",
|
|
41
|
+
"test:browser": "vitest run --project=browser"
|
|
41
42
|
},
|
|
42
43
|
"dependencies": {
|
|
43
|
-
"@iyulab/components": "^1.
|
|
44
|
-
"@iyulab/router": "^0.10.
|
|
45
|
-
"i18next": "^26.
|
|
44
|
+
"@iyulab/components": "^1.8.0",
|
|
45
|
+
"@iyulab/router": "^0.10.2",
|
|
46
|
+
"i18next": "^26.3.6",
|
|
46
47
|
"lit": "^3.3.3"
|
|
47
48
|
},
|
|
48
49
|
"devDependencies": {
|
|
49
|
-
"@types/node": "^
|
|
50
|
-
"
|
|
50
|
+
"@types/node": "^26.1.1",
|
|
51
|
+
"@vitest/browser-playwright": "^4.1.10",
|
|
52
|
+
"happy-dom": "^20.10.6",
|
|
51
53
|
"typescript": "^5.9.3",
|
|
52
|
-
"vite": "^8.
|
|
53
|
-
"vite-plugin-dts": "^5.0.
|
|
54
|
-
"vitest": "^4.1.
|
|
54
|
+
"vite": "^8.1.4",
|
|
55
|
+
"vite-plugin-dts": "^5.0.3",
|
|
56
|
+
"vitest": "^4.1.10"
|
|
55
57
|
}
|
|
56
58
|
}
|