@iyulab/components 0.1.10 → 0.2.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 +52 -0
- package/dist/assets/icons/arrow-repeat.svg.js +3 -0
- package/dist/assets/icons/box-arrow-up-right.svg.js +3 -0
- package/dist/assets/icons/file-earmark.svg.js +3 -0
- package/dist/assets/icons/flag.svg.js +3 -0
- package/dist/assets/icons/globe.svg.js +3 -0
- package/dist/assets/icons/hand-thumbs-down-fill.svg.js +3 -0
- package/dist/assets/icons/hand-thumbs-down.svg.js +3 -0
- package/dist/assets/icons/hand-thumbs-up-fill.svg.js +3 -0
- package/dist/assets/icons/hand-thumbs-up.svg.js +3 -0
- package/dist/assets/icons/share.svg.js +3 -0
- package/dist/assets/icons/stop-circle.svg.js +3 -0
- package/dist/assets/icons/tools.svg.js +3 -0
- package/dist/components/FloatingElement.d.ts +13 -5
- package/dist/components/FloatingElement.js +32 -15
- package/dist/components/FloatingElement.styles.js +0 -4
- package/dist/components/button/UButton.component.d.ts +7 -0
- package/dist/components/button/UButton.component.js +20 -1
- package/dist/components/button/UButton.styles.js +51 -8
- package/dist/components/dialog/UDialog.component.d.ts +2 -0
- package/dist/components/dialog/UDialog.component.js +14 -9
- package/dist/components/divider/UDivider.component.d.ts +3 -18
- package/dist/components/divider/UDivider.component.js +3 -62
- package/dist/components/divider/UDivider.styles.js +11 -43
- package/dist/components/drawer/UDrawer.component.d.ts +2 -0
- package/dist/components/drawer/UDrawer.component.js +14 -9
- package/dist/components/form/UForm.component.js +3 -3
- package/dist/components/icon/UIcon.component.d.ts +4 -1
- package/dist/components/icon/UIcon.component.js +2 -2
- package/dist/components/menu/UMenu.component.d.ts +4 -7
- package/dist/components/menu/UMenu.component.js +94 -83
- package/dist/components/menu/UMenu.styles.js +1 -1
- package/dist/components/menu-item/UMenuItem.component.d.ts +10 -4
- package/dist/components/menu-item/UMenuItem.component.js +37 -26
- package/dist/components/menu-item/UMenuItem.styles.js +4 -4
- package/dist/components/split-panel/USplitPanel.component.d.ts +22 -8
- package/dist/components/split-panel/USplitPanel.component.js +121 -75
- package/dist/components/split-panel/USplitPanel.styles.js +30 -0
- package/dist/components/tag/UTag.component.d.ts +23 -0
- package/dist/components/tag/UTag.component.js +72 -0
- package/dist/components/tag/UTag.d.ts +8 -0
- package/dist/components/tag/UTag.js +5 -0
- package/dist/components/tag/UTag.styles.js +83 -0
- package/dist/components/tooltip/UTooltip.component.d.ts +8 -0
- package/dist/components/tooltip/UTooltip.component.js +59 -17
- package/dist/components/tooltip/UTooltip.styles.js +15 -0
- package/dist/components/tree-item/UTreeItem.component.d.ts +16 -8
- package/dist/components/tree-item/UTreeItem.component.js +69 -31
- package/dist/components/tree-item/UTreeItem.styles.js +8 -3
- package/dist/index.d.ts +4 -3
- package/dist/index.js +5 -4
- package/dist/react-components/UTag.d.ts +8 -0
- package/dist/react-components/UTag.js +10 -0
- package/dist/react-components/index.d.ts +1 -1
- package/dist/react-components/index.js +1 -1
- package/dist/utilities/{icons.d.ts → IconRegistry.d.ts} +20 -26
- package/dist/utilities/{icons.js → IconRegistry.js} +29 -20
- package/dist/utilities/{notifier.d.ts → Notifier.d.ts} +8 -13
- package/dist/utilities/{notifier.js → Notifier.js} +8 -10
- package/dist/utilities/{theme.d.ts → Theme.d.ts} +14 -20
- package/dist/utilities/{theme.js → Theme.js} +39 -35
- package/dist/{internals/attribute-converters.d.ts → utilities/converters.d.ts} +1 -1
- package/dist/{internals/attribute-converters.js → utilities/converters.js} +2 -2
- package/dist/{internals/node-helpers.js → utilities/elements.js} +6 -5
- package/package.json +7 -7
- package/dist/assets/icons/arrow-clockwise.svg.js +0 -3
- package/dist/assets/icons/speedometer.svg.js +0 -3
- package/dist/components/icon-button/UIconButton.component.d.ts +0 -20
- package/dist/components/icon-button/UIconButton.component.js +0 -59
- package/dist/components/icon-button/UIconButton.d.ts +0 -7
- package/dist/components/icon-button/UIconButton.js +0 -5
- package/dist/components/icon-button/UIconButton.styles.js +0 -54
- package/dist/internals/react-wrapper.d.ts +0 -21
- package/dist/react-components/UIconButton.d.ts +0 -8
- package/dist/react-components/UIconButton.js +0 -10
- /package/dist/components/{icon-button/UIconButton.styles.d.ts → tag/UTag.styles.d.ts} +0 -0
- /package/dist/{internals/node-helpers.d.ts → utilities/elements.d.ts} +0 -0
|
@@ -1,13 +1,37 @@
|
|
|
1
1
|
import { html } from 'lit';
|
|
2
|
+
import { property } from 'lit/decorators.js';
|
|
2
3
|
import { FloatingElement } from '../FloatingElement.js';
|
|
3
4
|
import { styles } from './UTooltip.styles.js';
|
|
4
5
|
|
|
6
|
+
var __defProp = Object.defineProperty;
|
|
7
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
8
|
+
var result = void 0 ;
|
|
9
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
10
|
+
if (decorator = decorators[i])
|
|
11
|
+
result = (decorator(target, key, result) ) || result;
|
|
12
|
+
if (result) __defProp(target, key, result);
|
|
13
|
+
return result;
|
|
14
|
+
};
|
|
5
15
|
class UTooltip extends FloatingElement {
|
|
6
16
|
constructor() {
|
|
7
17
|
super(...arguments);
|
|
18
|
+
this.interactive = false;
|
|
8
19
|
/** this 바인딩 이벤트 핸들러 */
|
|
9
|
-
this._show = () =>
|
|
10
|
-
|
|
20
|
+
this._show = (event) => {
|
|
21
|
+
const target = event.currentTarget;
|
|
22
|
+
if (!target) return;
|
|
23
|
+
this.show(target);
|
|
24
|
+
};
|
|
25
|
+
/** this 바인딩 이벤트 핸들러 */
|
|
26
|
+
this._hide = (event) => {
|
|
27
|
+
if (this.interactive) {
|
|
28
|
+
const target = this.target;
|
|
29
|
+
const related = event.relatedTarget;
|
|
30
|
+
if (!target || !related) return;
|
|
31
|
+
if (this.contains(related) || target.contains(related)) return;
|
|
32
|
+
}
|
|
33
|
+
this.hide();
|
|
34
|
+
};
|
|
11
35
|
}
|
|
12
36
|
static {
|
|
13
37
|
this.styles = [super.styles, styles];
|
|
@@ -17,30 +41,48 @@ class UTooltip extends FloatingElement {
|
|
|
17
41
|
}
|
|
18
42
|
updated(changedProperties) {
|
|
19
43
|
super.updated(changedProperties);
|
|
20
|
-
if (changedProperties.has("
|
|
21
|
-
const
|
|
22
|
-
const
|
|
23
|
-
if (
|
|
24
|
-
if (
|
|
44
|
+
if (changedProperties.has("anchors")) {
|
|
45
|
+
const oldAnchors = changedProperties.get("anchors");
|
|
46
|
+
const newAnchors = this.anchors;
|
|
47
|
+
if (oldAnchors) this.unbind(oldAnchors);
|
|
48
|
+
if (newAnchors) this.bind(newAnchors);
|
|
49
|
+
}
|
|
50
|
+
if (changedProperties.has("distance")) {
|
|
51
|
+
if (this.distance > 0) {
|
|
52
|
+
this.style.setProperty("--interactive-area", `${this.distance}px`);
|
|
53
|
+
} else {
|
|
54
|
+
this.style.removeProperty("--interactive-area");
|
|
55
|
+
}
|
|
25
56
|
}
|
|
26
57
|
}
|
|
27
58
|
render() {
|
|
28
59
|
return html`<slot></slot>`;
|
|
29
60
|
}
|
|
30
61
|
/** 바인딩 이벤트 핸들러 */
|
|
31
|
-
bind(
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
62
|
+
bind(anchors) {
|
|
63
|
+
for (const anchor of anchors) {
|
|
64
|
+
anchor.addEventListener("pointerenter", this._show);
|
|
65
|
+
anchor.addEventListener("pointerleave", this._hide);
|
|
66
|
+
anchor.addEventListener("focusin", this._show);
|
|
67
|
+
anchor.addEventListener("focusout", this._hide);
|
|
68
|
+
}
|
|
69
|
+
this.addEventListener("pointerleave", this._hide);
|
|
70
|
+
this.addEventListener("focusout", this._hide);
|
|
36
71
|
}
|
|
37
72
|
/** 바인딩 해제 이벤트 핸들러 */
|
|
38
|
-
unbind(
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
73
|
+
unbind(anchors) {
|
|
74
|
+
for (const anchor of anchors) {
|
|
75
|
+
anchor.removeEventListener("pointerenter", this._show);
|
|
76
|
+
anchor.removeEventListener("pointerleave", this._hide);
|
|
77
|
+
anchor.removeEventListener("focusin", this._show);
|
|
78
|
+
anchor.removeEventListener("focusout", this._hide);
|
|
79
|
+
}
|
|
80
|
+
this.addEventListener("pointerleave", this._hide);
|
|
81
|
+
this.addEventListener("focusout", this._hide);
|
|
43
82
|
}
|
|
44
83
|
}
|
|
84
|
+
__decorateClass([
|
|
85
|
+
property({ type: Boolean, reflect: true })
|
|
86
|
+
], UTooltip.prototype, "interactive");
|
|
45
87
|
|
|
46
88
|
export { UTooltip };
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { css } from 'lit';
|
|
2
2
|
|
|
3
3
|
const styles = css`
|
|
4
|
+
:host {
|
|
5
|
+
--interactive-area: 0px;
|
|
6
|
+
}
|
|
7
|
+
|
|
4
8
|
:host {
|
|
5
9
|
padding: 6px 8px;
|
|
6
10
|
color: var(--u-tooltip-txt-color);
|
|
@@ -18,6 +22,17 @@ const styles = css`
|
|
|
18
22
|
opacity: 0.8;
|
|
19
23
|
transform: scale(1);
|
|
20
24
|
}
|
|
25
|
+
|
|
26
|
+
/* 툴팁을 distance만큼 감싸는 보이지 않는 영역 */
|
|
27
|
+
:host([interactive])::before {
|
|
28
|
+
content: '';
|
|
29
|
+
position: absolute;
|
|
30
|
+
/* 툴팁을 distance만큼 모든 방향으로 확장 */
|
|
31
|
+
inset: calc(var(--interactive-area) * -1);
|
|
32
|
+
background: transparent;
|
|
33
|
+
pointer-events: auto;
|
|
34
|
+
z-index: -1;
|
|
35
|
+
}
|
|
21
36
|
`;
|
|
22
37
|
|
|
23
38
|
export { styles };
|
|
@@ -1,32 +1,40 @@
|
|
|
1
1
|
import { PropertyValues } from 'lit';
|
|
2
2
|
import { BaseElement } from '../BaseElement.js';
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
5
|
-
*
|
|
4
|
+
* UTreeItem 컴포넌트는 트리의 개별 노드를 나타냅니다.
|
|
5
|
+
* UTree 컴포넌트와 함께 사용되며, 중첩된 구조를 지원합니다.
|
|
6
6
|
*/
|
|
7
7
|
export declare class UTreeItem extends BaseElement {
|
|
8
8
|
static styles: import('lit').CSSResultGroup[];
|
|
9
9
|
static dependencies: Record<string, typeof BaseElement>;
|
|
10
|
+
/** DOM 변경 감지를 위한 MutationObserver */
|
|
11
|
+
private mutationObserver?;
|
|
12
|
+
/** 자식 트리 아이템 배열 */
|
|
13
|
+
private _childrenItems;
|
|
14
|
+
/** 자식 트리 아이템 배열 (읽기 전용) */
|
|
15
|
+
get childrenItems(): readonly UTreeItem[];
|
|
10
16
|
headerEl: HTMLElement;
|
|
11
|
-
childrenItems: UTreeItem[];
|
|
12
17
|
/** 트리 항목이 리프 노드인지 여부입니다. */
|
|
13
18
|
leaf: boolean;
|
|
14
19
|
/** 트리 항목의 들여쓰기 레벨입니다. */
|
|
15
20
|
level: number;
|
|
21
|
+
/** 트리 항목이 확장된 상태인지 여부입니다. */
|
|
22
|
+
expanded: boolean;
|
|
16
23
|
/** 트리 항목이 비활성화 상태인지 여부입니다. */
|
|
17
24
|
disabled: boolean;
|
|
25
|
+
/** 로딩 상태 @default false */
|
|
26
|
+
loading: boolean;
|
|
18
27
|
/** 트리 항목이 선택된 상태인지 여부입니다. */
|
|
19
28
|
selected: boolean;
|
|
20
|
-
/** 트리 항목이 확장된 상태인지 여부입니다. */
|
|
21
|
-
expanded: boolean;
|
|
22
29
|
/** 트리 항목의 값입니다. */
|
|
23
30
|
value: string;
|
|
24
31
|
connectedCallback(): void;
|
|
32
|
+
disconnectedCallback(): void;
|
|
25
33
|
protected updated(changedProperties: PropertyValues): void;
|
|
26
34
|
render(): import('lit-html').TemplateResult<1>;
|
|
27
|
-
/**
|
|
28
|
-
private
|
|
29
|
-
/** 자식 슬롯 변경 시
|
|
35
|
+
/** 자식 u-tree-item 요소들에 slot 속성 부여 */
|
|
36
|
+
private processChildren;
|
|
37
|
+
/** 자식 슬롯 변경 시 처리 */
|
|
30
38
|
private handleChildrenSlotChange;
|
|
31
39
|
/** 헤더 클릭 이벤트를 처리합니다. */
|
|
32
40
|
private handleHeaderClick;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { html } from 'lit';
|
|
2
|
-
import { query,
|
|
2
|
+
import { query, state, property } from 'lit/decorators.js';
|
|
3
3
|
import { BaseElement } from '../BaseElement.js';
|
|
4
4
|
import { UIcon } from '../icon/UIcon.component.js';
|
|
5
5
|
import { styles } from './UTreeItem.styles.js';
|
|
6
|
+
import { USpinner } from '../spinner/USpinner.component.js';
|
|
6
7
|
|
|
7
8
|
var __defProp = Object.defineProperty;
|
|
8
9
|
var __decorateClass = (decorators, target, key, kind) => {
|
|
@@ -13,29 +14,27 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
|
13
14
|
if (result) __defProp(target, key, result);
|
|
14
15
|
return result;
|
|
15
16
|
};
|
|
16
|
-
|
|
17
|
+
class UTreeItem extends BaseElement {
|
|
17
18
|
constructor() {
|
|
18
19
|
super(...arguments);
|
|
20
|
+
/** 자식 트리 아이템 배열 */
|
|
21
|
+
this._childrenItems = [];
|
|
19
22
|
this.leaf = true;
|
|
20
23
|
this.level = 0;
|
|
24
|
+
this.expanded = false;
|
|
21
25
|
this.disabled = false;
|
|
26
|
+
this.loading = false;
|
|
22
27
|
this.selected = false;
|
|
23
|
-
this.expanded = false;
|
|
24
28
|
this.value = "";
|
|
25
|
-
/** 슬롯 변경 시
|
|
26
|
-
this.
|
|
29
|
+
/** 자식 슬롯 변경 시 처리 */
|
|
30
|
+
this.handleChildrenSlotChange = (e) => {
|
|
27
31
|
const slot = e.target;
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
};
|
|
35
|
-
/** 자식 슬롯 변경 시 자식 노드 재설정 */
|
|
36
|
-
this.handleChildrenSlotChange = () => {
|
|
37
|
-
this.leaf = this.childrenItems.length === 0;
|
|
38
|
-
this.childrenItems.forEach((child) => {
|
|
32
|
+
const assignedElements = slot.assignedElements({ flatten: true });
|
|
33
|
+
this._childrenItems = assignedElements.filter(
|
|
34
|
+
(el) => el.tagName.toLowerCase() === "u-tree-item"
|
|
35
|
+
);
|
|
36
|
+
this.leaf = this._childrenItems.length === 0;
|
|
37
|
+
this._childrenItems.forEach((child) => {
|
|
39
38
|
child.level = this.level + 1;
|
|
40
39
|
});
|
|
41
40
|
};
|
|
@@ -60,12 +59,34 @@ const _UTreeItem = class _UTreeItem extends BaseElement {
|
|
|
60
59
|
}
|
|
61
60
|
static {
|
|
62
61
|
this.dependencies = {
|
|
63
|
-
"u-icon": UIcon
|
|
62
|
+
"u-icon": UIcon,
|
|
63
|
+
"u-spinner": USpinner
|
|
64
64
|
};
|
|
65
65
|
}
|
|
66
|
+
/** 자식 트리 아이템 배열 (읽기 전용) */
|
|
67
|
+
get childrenItems() {
|
|
68
|
+
return this._childrenItems;
|
|
69
|
+
}
|
|
66
70
|
connectedCallback() {
|
|
67
71
|
super.connectedCallback();
|
|
68
72
|
this.setAttribute("tabindex", this.disabled ? "-1" : "0");
|
|
73
|
+
this.mutationObserver = new MutationObserver((mutations) => {
|
|
74
|
+
for (const mutation of mutations) {
|
|
75
|
+
if (mutation.type === "childList") {
|
|
76
|
+
mutation.addedNodes.forEach((node) => {
|
|
77
|
+
if (node instanceof Element && node.tagName.toLowerCase() === "u-tree-item" && !node.hasAttribute("slot")) {
|
|
78
|
+
node.setAttribute("slot", "children");
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
this.mutationObserver.observe(this, { childList: true });
|
|
85
|
+
this.processChildren();
|
|
86
|
+
}
|
|
87
|
+
disconnectedCallback() {
|
|
88
|
+
super.disconnectedCallback();
|
|
89
|
+
this.mutationObserver?.disconnect();
|
|
69
90
|
}
|
|
70
91
|
updated(changedProperties) {
|
|
71
92
|
super.updated(changedProperties);
|
|
@@ -73,7 +94,7 @@ const _UTreeItem = class _UTreeItem extends BaseElement {
|
|
|
73
94
|
this.setAttribute("tabindex", this.disabled ? "-1" : "0");
|
|
74
95
|
}
|
|
75
96
|
if (changedProperties.has("level")) {
|
|
76
|
-
this.
|
|
97
|
+
this.style.setProperty("--indent-level", this.level.toString());
|
|
77
98
|
}
|
|
78
99
|
}
|
|
79
100
|
render() {
|
|
@@ -84,40 +105,57 @@ const _UTreeItem = class _UTreeItem extends BaseElement {
|
|
|
84
105
|
lib="internal"
|
|
85
106
|
name=${this.expanded ? "chevron-down" : "chevron-right"}
|
|
86
107
|
></u-icon>
|
|
108
|
+
|
|
109
|
+
<u-spinner class="prefix icon"
|
|
110
|
+
?hidden=${!this.loading}
|
|
111
|
+
></u-spinner>
|
|
112
|
+
|
|
87
113
|
<slot name="prefix"></slot>
|
|
88
|
-
|
|
114
|
+
|
|
115
|
+
<span class="label">
|
|
116
|
+
<slot></slot>
|
|
117
|
+
</span>
|
|
118
|
+
|
|
89
119
|
<slot name="suffix"></slot>
|
|
90
120
|
</div>
|
|
121
|
+
|
|
91
122
|
<div class="children" ?hidden=${!this.expanded}>
|
|
92
123
|
<slot name="children" @slotchange=${this.handleChildrenSlotChange}></slot>
|
|
93
124
|
</div>
|
|
94
125
|
`;
|
|
95
126
|
}
|
|
96
|
-
|
|
127
|
+
/** 자식 u-tree-item 요소들에 slot 속성 부여 */
|
|
128
|
+
processChildren() {
|
|
129
|
+
Array.from(this.children).forEach((child) => {
|
|
130
|
+
if (child.tagName.toLowerCase() === "u-tree-item" && !child.hasAttribute("slot")) {
|
|
131
|
+
child.setAttribute("slot", "children");
|
|
132
|
+
}
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
}
|
|
97
136
|
__decorateClass([
|
|
98
137
|
query(".header")
|
|
99
|
-
],
|
|
100
|
-
__decorateClass([
|
|
101
|
-
queryAssignedElements({ slot: "children", selector: "u-tree-item", flatten: true })
|
|
102
|
-
], _UTreeItem.prototype, "childrenItems");
|
|
138
|
+
], UTreeItem.prototype, "headerEl");
|
|
103
139
|
__decorateClass([
|
|
104
140
|
state()
|
|
105
|
-
],
|
|
141
|
+
], UTreeItem.prototype, "leaf");
|
|
106
142
|
__decorateClass([
|
|
107
143
|
state()
|
|
108
|
-
],
|
|
144
|
+
], UTreeItem.prototype, "level");
|
|
145
|
+
__decorateClass([
|
|
146
|
+
property({ type: Boolean, reflect: true })
|
|
147
|
+
], UTreeItem.prototype, "expanded");
|
|
109
148
|
__decorateClass([
|
|
110
149
|
property({ type: Boolean, reflect: true })
|
|
111
|
-
],
|
|
150
|
+
], UTreeItem.prototype, "disabled");
|
|
112
151
|
__decorateClass([
|
|
113
152
|
property({ type: Boolean, reflect: true })
|
|
114
|
-
],
|
|
153
|
+
], UTreeItem.prototype, "loading");
|
|
115
154
|
__decorateClass([
|
|
116
155
|
property({ type: Boolean, reflect: true })
|
|
117
|
-
],
|
|
156
|
+
], UTreeItem.prototype, "selected");
|
|
118
157
|
__decorateClass([
|
|
119
158
|
property({ type: String })
|
|
120
|
-
],
|
|
121
|
-
let UTreeItem = _UTreeItem;
|
|
159
|
+
], UTreeItem.prototype, "value");
|
|
122
160
|
|
|
123
161
|
export { UTreeItem };
|
|
@@ -2,10 +2,13 @@ import { css } from 'lit';
|
|
|
2
2
|
|
|
3
3
|
const styles = css`
|
|
4
4
|
:host {
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
--indent-level: 0;
|
|
7
6
|
--indent-size: 20px;
|
|
8
7
|
}
|
|
8
|
+
|
|
9
|
+
:host {
|
|
10
|
+
display: block;
|
|
11
|
+
}
|
|
9
12
|
:host([disabled]) {
|
|
10
13
|
opacity: 0.5;
|
|
11
14
|
pointer-events: none;
|
|
@@ -22,6 +25,7 @@ const styles = css`
|
|
|
22
25
|
align-items: center;
|
|
23
26
|
gap: 6px;
|
|
24
27
|
padding: 6px 8px;
|
|
28
|
+
padding-left: calc(var(--indent-level, 0) * var(--indent-size));
|
|
25
29
|
line-height: 1.5;
|
|
26
30
|
border-radius: 4px;
|
|
27
31
|
background-color: transparent;
|
|
@@ -48,7 +52,8 @@ const styles = css`
|
|
|
48
52
|
align-items: center;
|
|
49
53
|
justify-content: center;
|
|
50
54
|
}
|
|
51
|
-
|
|
55
|
+
|
|
56
|
+
.label {
|
|
52
57
|
flex: 1;
|
|
53
58
|
display: inline-flex;
|
|
54
59
|
align-items: center;
|
package/dist/index.d.ts
CHANGED
|
@@ -5,7 +5,6 @@ export * from './components/divider/UDivider.js';
|
|
|
5
5
|
export * from './components/drawer/UDrawer.js';
|
|
6
6
|
export * from './components/form/UForm.js';
|
|
7
7
|
export * from './components/icon/UIcon.js';
|
|
8
|
-
export * from './components/icon-button/UIconButton.js';
|
|
9
8
|
export * from './components/input/UInput.js';
|
|
10
9
|
export * from './components/menu/UMenu.js';
|
|
11
10
|
export * from './components/menu-item/UMenuItem.js';
|
|
@@ -14,6 +13,7 @@ export * from './components/progress-ring/UProgressRing.js';
|
|
|
14
13
|
export * from './components/skeleton/USkeleton.js';
|
|
15
14
|
export * from './components/spinner/USpinner.js';
|
|
16
15
|
export * from './components/split-panel/USplitPanel.js';
|
|
16
|
+
export * from './components/tag/UTag.js';
|
|
17
17
|
export * from './components/tooltip/UTooltip.js';
|
|
18
18
|
export * from './components/tree/UTree.js';
|
|
19
19
|
export * from './components/tree-item/UTreeItem.js';
|
|
@@ -24,5 +24,6 @@ export * from './events/UResizeEvent';
|
|
|
24
24
|
export * from './events/USelectEvent';
|
|
25
25
|
export * from './events/UShowEvent';
|
|
26
26
|
export * from './utilities/BrowserStorage.js';
|
|
27
|
-
export * from './utilities/
|
|
28
|
-
export * from './utilities/
|
|
27
|
+
export * from './utilities/IconRegistry.js';
|
|
28
|
+
export * from './utilities/Notifier.js';
|
|
29
|
+
export * from './utilities/Theme.js';
|
package/dist/index.js
CHANGED
|
@@ -5,7 +5,6 @@ import './components/divider/UDivider.js';
|
|
|
5
5
|
import './components/drawer/UDrawer.js';
|
|
6
6
|
import './components/form/UForm.js';
|
|
7
7
|
import './components/icon/UIcon.js';
|
|
8
|
-
import './components/icon-button/UIconButton.js';
|
|
9
8
|
import './components/input/UInput.js';
|
|
10
9
|
import './components/menu/UMenu.js';
|
|
11
10
|
import './components/menu-item/UMenuItem.js';
|
|
@@ -14,12 +13,14 @@ import './components/progress-ring/UProgressRing.js';
|
|
|
14
13
|
import './components/skeleton/USkeleton.js';
|
|
15
14
|
import './components/spinner/USpinner.js';
|
|
16
15
|
import './components/split-panel/USplitPanel.js';
|
|
16
|
+
import './components/tag/UTag.js';
|
|
17
17
|
import './components/tooltip/UTooltip.js';
|
|
18
18
|
import './components/tree/UTree.js';
|
|
19
19
|
import './components/tree-item/UTreeItem.js';
|
|
20
20
|
export { BrowserStorage } from './utilities/BrowserStorage.js';
|
|
21
|
-
export {
|
|
22
|
-
export {
|
|
21
|
+
export { IconRegistry, getDefaultBaseUrl, setDefaultBaseUrl } from './utilities/IconRegistry.js';
|
|
22
|
+
export { Notifier } from './utilities/Notifier.js';
|
|
23
|
+
export { Theme } from './utilities/Theme.js';
|
|
23
24
|
export { UAlert } from './components/alert/UAlert.component.js';
|
|
24
25
|
export { UButton } from './components/button/UButton.component.js';
|
|
25
26
|
export { UDialog } from './components/dialog/UDialog.component.js';
|
|
@@ -27,7 +28,6 @@ export { UDivider } from './components/divider/UDivider.component.js';
|
|
|
27
28
|
export { UDrawer } from './components/drawer/UDrawer.component.js';
|
|
28
29
|
export { UForm } from './components/form/UForm.component.js';
|
|
29
30
|
export { UIcon } from './components/icon/UIcon.component.js';
|
|
30
|
-
export { UIconButton } from './components/icon-button/UIconButton.component.js';
|
|
31
31
|
export { UInput } from './components/input/UInput.component.js';
|
|
32
32
|
export { UMenu } from './components/menu/UMenu.component.js';
|
|
33
33
|
export { UMenuItem } from './components/menu-item/UMenuItem.component.js';
|
|
@@ -36,6 +36,7 @@ export { UProgressRing } from './components/progress-ring/UProgressRing.componen
|
|
|
36
36
|
export { USkeleton } from './components/skeleton/USkeleton.component.js';
|
|
37
37
|
export { USpinner } from './components/spinner/USpinner.component.js';
|
|
38
38
|
export { USplitPanel } from './components/split-panel/USplitPanel.component.js';
|
|
39
|
+
export { UTag } from './components/tag/UTag.component.js';
|
|
39
40
|
export { UTooltip } from './components/tooltip/UTooltip.component.js';
|
|
40
41
|
export { UTree } from './components/tree/UTree.component.js';
|
|
41
42
|
export { UTreeItem } from './components/tree-item/UTreeItem.component.js';
|
|
@@ -12,7 +12,6 @@ export { UDivider, UDividerProps } from './UDivider';
|
|
|
12
12
|
export { UDrawer, UDrawerProps } from './UDrawer';
|
|
13
13
|
export { UForm, UFormProps } from './UForm';
|
|
14
14
|
export { UIcon, UIconProps } from './UIcon';
|
|
15
|
-
export { UIconButton, UIconButtonProps } from './UIconButton';
|
|
16
15
|
export { UInput, UInputProps } from './UInput';
|
|
17
16
|
export { UMenu, UMenuProps } from './UMenu';
|
|
18
17
|
export { UMenuItem, UMenuItemProps } from './UMenuItem';
|
|
@@ -21,6 +20,7 @@ export { UProgressRing, UProgressRingProps } from './UProgressRing';
|
|
|
21
20
|
export { USkeleton, USkeletonProps } from './USkeleton';
|
|
22
21
|
export { USpinner, USpinnerProps } from './USpinner';
|
|
23
22
|
export { USplitPanel, USplitPanelProps } from './USplitPanel';
|
|
23
|
+
export { UTag, UTagProps } from './UTag';
|
|
24
24
|
export { UTooltip, UTooltipProps } from './UTooltip';
|
|
25
25
|
export { UTree, UTreeProps } from './UTree';
|
|
26
26
|
export { UTreeItem, UTreeItemProps } from './UTreeItem';
|
|
@@ -5,7 +5,6 @@ export { UDivider } from './UDivider.js';
|
|
|
5
5
|
export { UDrawer } from './UDrawer.js';
|
|
6
6
|
export { UForm } from './UForm.js';
|
|
7
7
|
export { UIcon } from './UIcon.js';
|
|
8
|
-
export { UIconButton } from './UIconButton.js';
|
|
9
8
|
export { UInput } from './UInput.js';
|
|
10
9
|
export { UMenu } from './UMenu.js';
|
|
11
10
|
export { UMenuItem } from './UMenuItem.js';
|
|
@@ -14,6 +13,7 @@ export { UProgressRing } from './UProgressRing.js';
|
|
|
14
13
|
export { USkeleton } from './USkeleton.js';
|
|
15
14
|
export { USpinner } from './USpinner.js';
|
|
16
15
|
export { USplitPanel } from './USplitPanel.js';
|
|
16
|
+
export { UTag } from './UTag.js';
|
|
17
17
|
export { UTooltip } from './UTooltip.js';
|
|
18
18
|
export { UTree } from './UTree.js';
|
|
19
19
|
export { UTreeItem } from './UTreeItem.js';
|
|
@@ -1,46 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `default` 라이브러리에서 아이콘을 로드할 때 사용할 기본 URL을 반환합니다.
|
|
3
|
+
*/
|
|
4
|
+
declare function getDefaultBaseUrl(): string;
|
|
5
|
+
/**
|
|
6
|
+
* `default` 라이브러리에서 아이콘을 로드할 때 사용할 기본 URL을 설정합니다.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* - `/assets/icons/`
|
|
10
|
+
* - `https://cdn.example.com/icons/`
|
|
11
|
+
*/
|
|
12
|
+
declare function setDefaultBaseUrl(url: string): void;
|
|
1
13
|
type IconResolver = (name: string) => string | undefined | Promise<string | undefined>;
|
|
2
14
|
/**
|
|
3
|
-
* 아이콘
|
|
15
|
+
* 아이콘 레지스트리입니다.
|
|
4
16
|
* 아이콘 라이브러리를 등록하고, 아이콘을 조회하는 기능을 제공합니다.
|
|
5
17
|
*/
|
|
6
18
|
declare class IconRegistry {
|
|
7
|
-
private static
|
|
8
|
-
|
|
19
|
+
private static libs;
|
|
20
|
+
/** 클래스 생성 방지 */
|
|
9
21
|
private constructor();
|
|
10
|
-
static get instance(): IconRegistry;
|
|
11
22
|
/**
|
|
12
23
|
* 지정된 아이콘 라이브러리가 등록되었는지 확인합니다.
|
|
13
24
|
*/
|
|
14
|
-
has(lib: string): boolean;
|
|
25
|
+
static has(lib: string): boolean;
|
|
15
26
|
/**
|
|
16
27
|
* 지정된 아이콘 라이브러리를 등록합니다.
|
|
17
28
|
* 이미 등록된 라이브러리 이름인 경우, 경고 메시지를 출력합니다.
|
|
18
29
|
*/
|
|
19
|
-
register(lib: string, resolver: IconResolver): void;
|
|
30
|
+
static register(lib: string, resolver: IconResolver): void;
|
|
20
31
|
/**
|
|
21
32
|
* 지정된 아이콘 라이브러리를 등록 해제합니다.
|
|
22
33
|
*/
|
|
23
|
-
unregister(lib: string): void;
|
|
34
|
+
static unregister(lib: string): void;
|
|
24
35
|
/**
|
|
25
36
|
* 지정된 아이콘 라이브러리의 svg 아이콘 소스를 가져옵니다.
|
|
26
37
|
*/
|
|
27
|
-
resolve(lib: string, name: string): Promise<string | undefined>;
|
|
38
|
+
static resolve(lib: string, name: string): Promise<string | undefined>;
|
|
28
39
|
}
|
|
29
|
-
|
|
30
|
-
* 전역 아이콘 레지스트리 인스턴스에 접근합니다.
|
|
31
|
-
* 기본 내장 아이콘 라이브러리가 포함되어 있습니다.
|
|
32
|
-
*/
|
|
33
|
-
export declare const icons: IconRegistry;
|
|
34
|
-
/**
|
|
35
|
-
* `default` 라이브러리에서 아이콘을 로드할 때 사용할 기본 URL을 반환합니다.
|
|
36
|
-
*/
|
|
37
|
-
export declare function getDefaultBaseUrl(): string;
|
|
38
|
-
/**
|
|
39
|
-
* `default` 라이브러리에서 아이콘을 로드할 때 사용할 기본 URL을 설정합니다.
|
|
40
|
-
*
|
|
41
|
-
* @example
|
|
42
|
-
* - `/assets/icons/`
|
|
43
|
-
* - `https://cdn.example.com/icons/`
|
|
44
|
-
*/
|
|
45
|
-
export declare function setDefaultBaseUrl(url: string): void;
|
|
46
|
-
export {};
|
|
40
|
+
export { IconRegistry, getDefaultBaseUrl, setDefaultBaseUrl, };
|