@iyulab/modern-app 0.2.4 → 0.3.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.
Files changed (33) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/dist/App.d.ts +53 -0
  3. package/dist/App.js +28 -28
  4. package/dist/components/SidebarButton.d.ts +2 -3
  5. package/dist/components/SidebarButton.js +12 -14
  6. package/dist/components/SidebarButton.styles.js +14 -16
  7. package/dist/components/SidebarGroup.d.ts +5 -4
  8. package/dist/components/SidebarGroup.js +45 -46
  9. package/dist/components/SidebarGroup.styles.js +39 -44
  10. package/dist/components/SidebarLink.d.ts +2 -7
  11. package/dist/components/SidebarLink.js +29 -39
  12. package/dist/components/SidebarLink.styles.js +9 -9
  13. package/dist/components/SidebarSection.d.ts +4 -5
  14. package/dist/components/SidebarSection.js +18 -22
  15. package/dist/components/SidebarSection.styles.js +9 -14
  16. package/dist/index.d.ts +2 -3
  17. package/dist/internals/ScreenObserver.d.ts +43 -0
  18. package/dist/internals/ScreenObserver.js +37 -0
  19. package/dist/internals/{ExtendedBaseElement.d.ts → StyledElement.d.ts} +6 -4
  20. package/dist/internals/{ExtendedBaseElement.js → StyledElement.js} +13 -14
  21. package/dist/layouts/SidebarLayout.d.ts +27 -19
  22. package/dist/layouts/SidebarLayout.js +140 -108
  23. package/dist/layouts/SidebarLayout.styles.js +82 -42
  24. package/dist/layouts/SidebarLayout.types.d.ts +14 -12
  25. package/dist/types/AppConfigs.d.ts +11 -6
  26. package/package.json +8 -9
  27. package/dist/components/SidebarLogo.d.ts +0 -33
  28. package/dist/components/SidebarLogo.js +0 -60
  29. package/dist/components/SidebarLogo.styles.d.ts +0 -1
  30. package/dist/components/SidebarLogo.styles.js +0 -57
  31. package/dist/internals/observables.d.ts +0 -7
  32. package/dist/internals/observables.js +0 -5
  33. package/dist/types/AppTypes.d.ts +0 -4
@@ -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,7 +0,0 @@
1
- import { IObservableValue } from 'mobx';
2
- /** 화면 크기 타입 */
3
- export type ScreenSize = 'small' | 'medium' | 'large';
4
- /**
5
- * 현재 화면 크기 상태
6
- */
7
- export declare const screen: IObservableValue<ScreenSize>;
@@ -1,5 +0,0 @@
1
- import { observable as e } from "mobx";
2
- const r = e.box("large");
3
- export {
4
- r as screen
5
- };
@@ -1,4 +0,0 @@
1
- /** 스타일 값 타입 */
2
- export type StyleValue = Record<string, string> | Partial<CSSStyleDeclaration>;
3
- /** 스타일 맵 타입 */
4
- export type StyleMap<T extends string> = Partial<Record<T, StyleValue>>;