@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.
Files changed (77) hide show
  1. package/CHANGELOG.md +52 -0
  2. package/dist/assets/icons/arrow-repeat.svg.js +3 -0
  3. package/dist/assets/icons/box-arrow-up-right.svg.js +3 -0
  4. package/dist/assets/icons/file-earmark.svg.js +3 -0
  5. package/dist/assets/icons/flag.svg.js +3 -0
  6. package/dist/assets/icons/globe.svg.js +3 -0
  7. package/dist/assets/icons/hand-thumbs-down-fill.svg.js +3 -0
  8. package/dist/assets/icons/hand-thumbs-down.svg.js +3 -0
  9. package/dist/assets/icons/hand-thumbs-up-fill.svg.js +3 -0
  10. package/dist/assets/icons/hand-thumbs-up.svg.js +3 -0
  11. package/dist/assets/icons/share.svg.js +3 -0
  12. package/dist/assets/icons/stop-circle.svg.js +3 -0
  13. package/dist/assets/icons/tools.svg.js +3 -0
  14. package/dist/components/FloatingElement.d.ts +13 -5
  15. package/dist/components/FloatingElement.js +32 -15
  16. package/dist/components/FloatingElement.styles.js +0 -4
  17. package/dist/components/button/UButton.component.d.ts +7 -0
  18. package/dist/components/button/UButton.component.js +20 -1
  19. package/dist/components/button/UButton.styles.js +51 -8
  20. package/dist/components/dialog/UDialog.component.d.ts +2 -0
  21. package/dist/components/dialog/UDialog.component.js +14 -9
  22. package/dist/components/divider/UDivider.component.d.ts +3 -18
  23. package/dist/components/divider/UDivider.component.js +3 -62
  24. package/dist/components/divider/UDivider.styles.js +11 -43
  25. package/dist/components/drawer/UDrawer.component.d.ts +2 -0
  26. package/dist/components/drawer/UDrawer.component.js +14 -9
  27. package/dist/components/form/UForm.component.js +3 -3
  28. package/dist/components/icon/UIcon.component.d.ts +4 -1
  29. package/dist/components/icon/UIcon.component.js +2 -2
  30. package/dist/components/menu/UMenu.component.d.ts +4 -7
  31. package/dist/components/menu/UMenu.component.js +94 -83
  32. package/dist/components/menu/UMenu.styles.js +1 -1
  33. package/dist/components/menu-item/UMenuItem.component.d.ts +10 -4
  34. package/dist/components/menu-item/UMenuItem.component.js +37 -26
  35. package/dist/components/menu-item/UMenuItem.styles.js +4 -4
  36. package/dist/components/split-panel/USplitPanel.component.d.ts +22 -8
  37. package/dist/components/split-panel/USplitPanel.component.js +121 -75
  38. package/dist/components/split-panel/USplitPanel.styles.js +30 -0
  39. package/dist/components/tag/UTag.component.d.ts +23 -0
  40. package/dist/components/tag/UTag.component.js +72 -0
  41. package/dist/components/tag/UTag.d.ts +8 -0
  42. package/dist/components/tag/UTag.js +5 -0
  43. package/dist/components/tag/UTag.styles.js +83 -0
  44. package/dist/components/tooltip/UTooltip.component.d.ts +8 -0
  45. package/dist/components/tooltip/UTooltip.component.js +59 -17
  46. package/dist/components/tooltip/UTooltip.styles.js +15 -0
  47. package/dist/components/tree-item/UTreeItem.component.d.ts +16 -8
  48. package/dist/components/tree-item/UTreeItem.component.js +69 -31
  49. package/dist/components/tree-item/UTreeItem.styles.js +8 -3
  50. package/dist/index.d.ts +4 -3
  51. package/dist/index.js +5 -4
  52. package/dist/react-components/UTag.d.ts +8 -0
  53. package/dist/react-components/UTag.js +10 -0
  54. package/dist/react-components/index.d.ts +1 -1
  55. package/dist/react-components/index.js +1 -1
  56. package/dist/utilities/{icons.d.ts → IconRegistry.d.ts} +20 -26
  57. package/dist/utilities/{icons.js → IconRegistry.js} +29 -20
  58. package/dist/utilities/{notifier.d.ts → Notifier.d.ts} +8 -13
  59. package/dist/utilities/{notifier.js → Notifier.js} +8 -10
  60. package/dist/utilities/{theme.d.ts → Theme.d.ts} +14 -20
  61. package/dist/utilities/{theme.js → Theme.js} +39 -35
  62. package/dist/{internals/attribute-converters.d.ts → utilities/converters.d.ts} +1 -1
  63. package/dist/{internals/attribute-converters.js → utilities/converters.js} +2 -2
  64. package/dist/{internals/node-helpers.js → utilities/elements.js} +6 -5
  65. package/package.json +7 -7
  66. package/dist/assets/icons/arrow-clockwise.svg.js +0 -3
  67. package/dist/assets/icons/speedometer.svg.js +0 -3
  68. package/dist/components/icon-button/UIconButton.component.d.ts +0 -20
  69. package/dist/components/icon-button/UIconButton.component.js +0 -59
  70. package/dist/components/icon-button/UIconButton.d.ts +0 -7
  71. package/dist/components/icon-button/UIconButton.js +0 -5
  72. package/dist/components/icon-button/UIconButton.styles.js +0 -54
  73. package/dist/internals/react-wrapper.d.ts +0 -21
  74. package/dist/react-components/UIconButton.d.ts +0 -8
  75. package/dist/react-components/UIconButton.js +0 -10
  76. /package/dist/components/{icon-button/UIconButton.styles.d.ts → tag/UTag.styles.d.ts} +0 -0
  77. /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 = () => this.show();
10
- this._hide = () => this.hide();
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("anchor")) {
21
- const oldAnchor = changedProperties.get("anchor");
22
- const newAnchor = this.anchor;
23
- if (oldAnchor) this.unbind(oldAnchor);
24
- if (newAnchor) this.bind(newAnchor);
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(target) {
32
- target.addEventListener("pointerenter", this._show);
33
- target.addEventListener("pointerleave", this._hide);
34
- target.addEventListener("focusin", this._show);
35
- target.addEventListener("focusout", this._hide);
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(target) {
39
- target.removeEventListener("pointerenter", this._show);
40
- target.removeEventListener("pointerleave", this._hide);
41
- target.removeEventListener("focusin", this._show);
42
- target.removeEventListener("focusout", this._hide);
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
- * TreeItem 컴포넌트는 트리의 개별 노드를 나타냅니다.
5
- * u-tree 컴포넌트와 함께 사용되며, 중첩된 구조를 지원합니다.
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 handleSlotChange;
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, queryAssignedElements, state, property } from 'lit/decorators.js';
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
- const _UTreeItem = class _UTreeItem extends BaseElement {
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.handleSlotChange = (e) => {
29
+ /** 자식 슬롯 변경 시 처리 */
30
+ this.handleChildrenSlotChange = (e) => {
27
31
  const slot = e.target;
28
- const nodes = slot.assignedNodes({ flatten: true });
29
- nodes.forEach((node) => {
30
- if (node instanceof _UTreeItem) {
31
- node.setAttribute("slot", "children");
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.headerEl.style.paddingLeft = `calc(${this.level} * var(--indent-size, 20px))`;
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
- <slot @slotchange=${this.handleSlotChange}></slot>
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
- ], _UTreeItem.prototype, "headerEl");
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
- ], _UTreeItem.prototype, "leaf");
141
+ ], UTreeItem.prototype, "leaf");
106
142
  __decorateClass([
107
143
  state()
108
- ], _UTreeItem.prototype, "level");
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
- ], _UTreeItem.prototype, "disabled");
150
+ ], UTreeItem.prototype, "disabled");
112
151
  __decorateClass([
113
152
  property({ type: Boolean, reflect: true })
114
- ], _UTreeItem.prototype, "selected");
153
+ ], UTreeItem.prototype, "loading");
115
154
  __decorateClass([
116
155
  property({ type: Boolean, reflect: true })
117
- ], _UTreeItem.prototype, "expanded");
156
+ ], UTreeItem.prototype, "selected");
118
157
  __decorateClass([
119
158
  property({ type: String })
120
- ], _UTreeItem.prototype, "value");
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
- display: block;
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
- slot:not([name]) {
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/notifier.js';
28
- export * from './utilities/theme.js';
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 { notifier } from './utilities/notifier.js';
22
- export { theme } from './utilities/theme.js';
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';
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { UTag } from '../components/tag/UTag';
3
+
4
+ export declare const UTag: React.ForwardRefExoticComponent<
5
+ Partial<UTag> & React.HTMLAttributes<UTag>
6
+ >;
7
+
8
+ export type UTagProps = React.ComponentProps<typeof UTag>;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import { createComponent } from '@lit/react';
3
+ import { UTag } from '../components/tag/UTag';
4
+
5
+ export const UTag = createComponent({
6
+ react: React,
7
+ tagName: 'u-tag',
8
+ elementClass: UTag,
9
+ events: {}
10
+ });
@@ -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 _instance;
8
- private libs;
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, };