@iyulab/modern-app 0.2.5 → 0.3.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 +45 -0
- package/README.md +18 -0
- package/dist/App.d.ts +9 -6
- package/dist/App.js +30 -28
- package/dist/components/SidebarButton.d.ts +4 -5
- package/dist/components/SidebarButton.js +12 -14
- package/dist/components/SidebarButton.styles.js +15 -18
- package/dist/components/SidebarGroup.d.ts +7 -6
- package/dist/components/SidebarGroup.js +45 -46
- package/dist/components/SidebarGroup.styles.js +39 -44
- package/dist/components/SidebarLink.d.ts +5 -10
- package/dist/components/SidebarLink.js +29 -39
- package/dist/components/SidebarLink.styles.js +9 -9
- package/dist/components/SidebarSection.d.ts +6 -7
- package/dist/components/SidebarSection.js +18 -22
- package/dist/components/SidebarSection.styles.js +9 -14
- package/dist/index.d.ts +2 -3
- package/dist/internals/ScreenObserver.d.ts +43 -0
- package/dist/internals/ScreenObserver.js +37 -0
- package/dist/internals/StyledElement.d.ts +24 -0
- package/dist/internals/{ExtendedBaseElement.js → StyledElement.js} +13 -14
- package/dist/layouts/SidebarLayout.d.ts +29 -21
- package/dist/layouts/SidebarLayout.js +143 -111
- package/dist/layouts/SidebarLayout.styles.js +82 -42
- package/dist/layouts/SidebarLayout.types.d.ts +14 -12
- package/dist/types/AppConfigs.d.ts +12 -7
- package/dist/types/AppOptions.d.ts +1 -1
- package/package.json +9 -11
- package/dist/components/SidebarLogo.d.ts +0 -33
- package/dist/components/SidebarLogo.js +0 -60
- package/dist/components/SidebarLogo.styles.d.ts +0 -1
- package/dist/components/SidebarLogo.styles.js +0 -57
- package/dist/internals/ExtendedBaseElement.d.ts +0 -22
- package/dist/internals/observables.d.ts +0 -7
- package/dist/internals/observables.js +0 -5
- package/dist/types/AppTypes.d.ts +0 -4
package/package.json
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@iyulab/modern-app",
|
|
3
|
-
"description": "web-framework by iyulab based on
|
|
4
|
-
"version": "0.
|
|
3
|
+
"description": "web-framework by iyulab based on lit-element",
|
|
4
|
+
"version": "0.3.1",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"iyulab",
|
|
7
7
|
"web-framework",
|
|
8
|
-
"react",
|
|
9
8
|
"lit-element"
|
|
10
9
|
],
|
|
11
10
|
"license": "MIT",
|
|
@@ -34,20 +33,19 @@
|
|
|
34
33
|
}
|
|
35
34
|
},
|
|
36
35
|
"scripts": {
|
|
37
|
-
"
|
|
36
|
+
"test": "vite",
|
|
38
37
|
"build": "vite build"
|
|
39
38
|
},
|
|
40
39
|
"dependencies": {
|
|
41
|
-
"@iyulab/components": "^0.
|
|
42
|
-
"@iyulab/router": "^0.
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"i18next": "^25.7.3"
|
|
40
|
+
"@iyulab/components": "^0.4.0",
|
|
41
|
+
"@iyulab/router": "^0.7.4",
|
|
42
|
+
"i18next": "^25.8.13",
|
|
43
|
+
"lit": "^3.3.2"
|
|
46
44
|
},
|
|
47
45
|
"devDependencies": {
|
|
48
|
-
"@types/node": "^25.
|
|
46
|
+
"@types/node": "^25.3.2",
|
|
49
47
|
"typescript": "^5.9.3",
|
|
50
|
-
"vite": "^7.3.
|
|
48
|
+
"vite": "^7.3.1",
|
|
51
49
|
"vite-plugin-dts": "^4.5.4"
|
|
52
50
|
}
|
|
53
51
|
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { DirectiveResult } from 'lit/directive.js';
|
|
2
|
-
import { BaseElement } from '@iyulab/components/dist/components/BaseElement.js';
|
|
3
|
-
import { ExtendedBaseElement } from '../internals/ExtendedBaseElement.js';
|
|
4
|
-
import { StyleMap } from '../types/AppTypes.js';
|
|
5
|
-
type ElementParts = 'host' | 'container' | 'image' | 'icon' | 'label';
|
|
6
|
-
/** 로고 설정 */
|
|
7
|
-
export interface SidebarLogoConfig {
|
|
8
|
-
type: 'image' | 'icon';
|
|
9
|
-
image?: string;
|
|
10
|
-
icon?: string;
|
|
11
|
-
label?: string | DirectiveResult;
|
|
12
|
-
styles?: StyleMap<ElementParts>;
|
|
13
|
-
onClick?: (e: MouseEvent) => void;
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* SidebarLogo 컴포넌트는 사이드바에 표시되는 로고를 나타냅니다.
|
|
17
|
-
*/
|
|
18
|
-
export declare class SidebarLogo extends ExtendedBaseElement<ElementParts> {
|
|
19
|
-
static styles: import('lit').CSSResultGroup[];
|
|
20
|
-
static dependencies: Record<string, typeof BaseElement>;
|
|
21
|
-
/** 콤팩트 모드 여부 */
|
|
22
|
-
compact: boolean;
|
|
23
|
-
/** 로고 타입 */
|
|
24
|
-
type: 'image' | 'icon';
|
|
25
|
-
/** 로고 이미지 URL */
|
|
26
|
-
image?: string;
|
|
27
|
-
/** 로고 아이콘 svg 이름 */
|
|
28
|
-
icon?: string;
|
|
29
|
-
/** 로고 아이콘 텍스트 */
|
|
30
|
-
label?: string | DirectiveResult;
|
|
31
|
-
render(): import('lit-html').TemplateResult<1>;
|
|
32
|
-
}
|
|
33
|
-
export {};
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { nothing as m, html as s } from "lit";
|
|
2
|
-
import { property as e } from "lit/decorators.js";
|
|
3
|
-
import { UIcon as l } from "@iyulab/components/dist/components/icon/UIcon.component.js";
|
|
4
|
-
import { ExtendedBaseElement as h } from "../internals/ExtendedBaseElement.js";
|
|
5
|
-
import { styles as y } from "./SidebarLogo.styles.js";
|
|
6
|
-
var d = Object.defineProperty, i = (r, n, a, g) => {
|
|
7
|
-
for (var t = void 0, p = r.length - 1, c; p >= 0; p--)
|
|
8
|
-
(c = r[p]) && (t = c(n, a, t) || t);
|
|
9
|
-
return t && d(n, a, t), t;
|
|
10
|
-
};
|
|
11
|
-
class o extends h {
|
|
12
|
-
constructor() {
|
|
13
|
-
super(...arguments), this.compact = !1, this.type = "icon";
|
|
14
|
-
}
|
|
15
|
-
static {
|
|
16
|
-
this.styles = [super.styles, y];
|
|
17
|
-
}
|
|
18
|
-
static {
|
|
19
|
-
this.dependencies = {
|
|
20
|
-
"u-icon": l
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
render() {
|
|
24
|
-
return s`
|
|
25
|
-
<div class="container" part="container">
|
|
26
|
-
${this.type === "image" && this.image ? s`
|
|
27
|
-
<img part="image"
|
|
28
|
-
?compact=${this.compact}
|
|
29
|
-
src=${this.image}
|
|
30
|
-
alt="App Logo"
|
|
31
|
-
/>` : this.type === "icon" && this.icon ? s`
|
|
32
|
-
<u-icon part="icon"
|
|
33
|
-
.name=${this.icon}
|
|
34
|
-
></u-icon>` : m}
|
|
35
|
-
<span part="label"
|
|
36
|
-
?hidden=${this.compact || !this.label}>
|
|
37
|
-
${this.label}
|
|
38
|
-
</span>
|
|
39
|
-
</div>
|
|
40
|
-
`;
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
i([
|
|
44
|
-
e({ type: Boolean })
|
|
45
|
-
], o.prototype, "compact");
|
|
46
|
-
i([
|
|
47
|
-
e({ type: String })
|
|
48
|
-
], o.prototype, "type");
|
|
49
|
-
i([
|
|
50
|
-
e({ type: String })
|
|
51
|
-
], o.prototype, "image");
|
|
52
|
-
i([
|
|
53
|
-
e({ type: String })
|
|
54
|
-
], o.prototype, "icon");
|
|
55
|
-
i([
|
|
56
|
-
e({ type: String })
|
|
57
|
-
], o.prototype, "label");
|
|
58
|
-
export {
|
|
59
|
-
o as SidebarLogo
|
|
60
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const styles: import('lit').CSSResult;
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { css as o } from "lit";
|
|
2
|
-
const e = o`
|
|
3
|
-
:host {
|
|
4
|
-
display: block;
|
|
5
|
-
min-width: 0;
|
|
6
|
-
font-size: 32px;
|
|
7
|
-
color: var(--u-txt-color);
|
|
8
|
-
user-select: none;
|
|
9
|
-
cursor: pointer;
|
|
10
|
-
transition: all 0.2s ease;
|
|
11
|
-
}
|
|
12
|
-
:host(:hover) {
|
|
13
|
-
color: var(--u-txt-color-hover);
|
|
14
|
-
}
|
|
15
|
-
:host(:active) {
|
|
16
|
-
color: var(--u-txt-color-active);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.container {
|
|
20
|
-
display: flex;
|
|
21
|
-
flex-direction: row;
|
|
22
|
-
align-items: center;
|
|
23
|
-
justify-content: flex-start;
|
|
24
|
-
overflow: hidden;
|
|
25
|
-
gap: 8px;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
img {
|
|
29
|
-
width: auto;
|
|
30
|
-
height: 1em;
|
|
31
|
-
object-fit: contain;
|
|
32
|
-
flex-shrink: 0;
|
|
33
|
-
}
|
|
34
|
-
img[compact] {
|
|
35
|
-
width: 1em;
|
|
36
|
-
height: auto;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
u-icon {
|
|
40
|
-
font-size: 1em;
|
|
41
|
-
color: inherit;
|
|
42
|
-
flex-shrink: 0;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
span {
|
|
46
|
-
font-size: 0.75em;
|
|
47
|
-
font-weight: 600;
|
|
48
|
-
line-height: inherit;
|
|
49
|
-
color: inherit;
|
|
50
|
-
overflow: hidden;
|
|
51
|
-
white-space: nowrap;
|
|
52
|
-
text-overflow: ellipsis;
|
|
53
|
-
}
|
|
54
|
-
`;
|
|
55
|
-
export {
|
|
56
|
-
e as styles
|
|
57
|
-
};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { PropertyValues } from 'lit';
|
|
2
|
-
import { BaseElement } from '@iyulab/components/dist/components/BaseElement.js';
|
|
3
|
-
import { StyleMap } from '../types/AppTypes';
|
|
4
|
-
/**
|
|
5
|
-
* ExtendedBaseElement - BaseElement를 확장한 클래스
|
|
6
|
-
* - 부분별 스타일링 지원
|
|
7
|
-
*/
|
|
8
|
-
export declare class ExtendedBaseElement<T extends string> extends BaseElement {
|
|
9
|
-
static styles: import('lit').CSSResultGroup;
|
|
10
|
-
static dependencies: Record<string, typeof BaseElement>;
|
|
11
|
-
/** 부분별 스타일 구성 */
|
|
12
|
-
styles?: StyleMap<T>;
|
|
13
|
-
protected updated(changedProperties: PropertyValues): void;
|
|
14
|
-
/**
|
|
15
|
-
* 현재 스타일 구성을 각 파트에 적용, host 포함
|
|
16
|
-
*/
|
|
17
|
-
private applyToParts;
|
|
18
|
-
/**
|
|
19
|
-
* 스타일 객체를 개별 프로퍼티 단위로 적용 (camelCase / kebab-case / custom props 처리)
|
|
20
|
-
*/
|
|
21
|
-
private assignToObject;
|
|
22
|
-
}
|
package/dist/types/AppTypes.d.ts
DELETED