@iyulab/components 0.1.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 (186) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/LICENSE +21 -0
  3. package/README.md +33 -0
  4. package/dist/assets/icons/arrow-clockwise.svg.js +7 -0
  5. package/dist/assets/icons/arrow-down.svg.js +6 -0
  6. package/dist/assets/icons/arrow-up.svg.js +6 -0
  7. package/dist/assets/icons/ban.svg.js +6 -0
  8. package/dist/assets/icons/bell-fill.svg.js +6 -0
  9. package/dist/assets/icons/check-circle-fill.svg.js +6 -0
  10. package/dist/assets/icons/check-lg.svg.js +6 -0
  11. package/dist/assets/icons/chevron-down.svg.js +6 -0
  12. package/dist/assets/icons/chevron-left.svg.js +6 -0
  13. package/dist/assets/icons/chevron-right.svg.js +6 -0
  14. package/dist/assets/icons/chevron-up.svg.js +6 -0
  15. package/dist/assets/icons/copy.svg.js +6 -0
  16. package/dist/assets/icons/dash-lg.svg.js +6 -0
  17. package/dist/assets/icons/exclamation-circle-fill.svg.js +6 -0
  18. package/dist/assets/icons/exclamation-triangle-fill.svg.js +6 -0
  19. package/dist/assets/icons/eye-slash.svg.js +8 -0
  20. package/dist/assets/icons/eye.svg.js +7 -0
  21. package/dist/assets/icons/info-circle-fill.svg.js +6 -0
  22. package/dist/assets/icons/layout-sidebar.svg.js +6 -0
  23. package/dist/assets/icons/lightbulb-fill.svg.js +6 -0
  24. package/dist/assets/icons/lightbulb-off.svg.js +6 -0
  25. package/dist/assets/icons/lightbulb.svg.js +6 -0
  26. package/dist/assets/icons/mic-fill.svg.js +7 -0
  27. package/dist/assets/icons/mic-mute-fill.svg.js +7 -0
  28. package/dist/assets/icons/paperclip.svg.js +6 -0
  29. package/dist/assets/icons/pencil-square.svg.js +7 -0
  30. package/dist/assets/icons/plus-lg.svg.js +6 -0
  31. package/dist/assets/icons/search.svg.js +6 -0
  32. package/dist/assets/icons/speedometer.svg.js +7 -0
  33. package/dist/assets/icons/x-lg.svg.js +6 -0
  34. package/dist/assets/styles/dark.css +126 -0
  35. package/dist/assets/styles/dark.css.js +4 -0
  36. package/dist/assets/styles/light.css +127 -0
  37. package/dist/assets/styles/light.css.js +4 -0
  38. package/dist/components/BaseElement.d.ts +33 -0
  39. package/dist/components/BaseElement.js +49 -0
  40. package/dist/components/BaseElement.styles.d.ts +1 -0
  41. package/dist/components/BaseElement.styles.js +29 -0
  42. package/dist/components/alert/Alert.d.ts +36 -0
  43. package/dist/components/alert/Alert.js +107 -0
  44. package/dist/components/alert/Alert.styles.d.ts +1 -0
  45. package/dist/components/alert/Alert.styles.js +114 -0
  46. package/dist/components/alert/index.d.ts +7 -0
  47. package/dist/components/button/Button.d.ts +16 -0
  48. package/dist/components/button/Button.js +45 -0
  49. package/dist/components/button/Button.styles.d.ts +1 -0
  50. package/dist/components/button/Button.styles.js +89 -0
  51. package/dist/components/button/index.d.ts +7 -0
  52. package/dist/components/context-menu/ContextMenu.d.ts +48 -0
  53. package/dist/components/context-menu/ContextMenu.js +142 -0
  54. package/dist/components/context-menu/ContextMenu.styles.d.ts +1 -0
  55. package/dist/components/context-menu/ContextMenu.styles.js +40 -0
  56. package/dist/components/context-menu/index.d.ts +7 -0
  57. package/dist/components/copy-button/CopyButton.d.ts +15 -0
  58. package/dist/components/copy-button/CopyButton.styles.d.ts +1 -0
  59. package/dist/components/copy-button/index.d.ts +7 -0
  60. package/dist/components/dialog/Dialog.d.ts +30 -0
  61. package/dist/components/dialog/Dialog.js +66 -0
  62. package/dist/components/dialog/Dialog.styles.d.ts +1 -0
  63. package/dist/components/dialog/Dialog.styles.js +32 -0
  64. package/dist/components/dialog/index.d.ts +7 -0
  65. package/dist/components/form/Form.d.ts +22 -0
  66. package/dist/components/form/Form.js +53 -0
  67. package/dist/components/form/Form.styles.d.ts +1 -0
  68. package/dist/components/form/Form.styles.js +18 -0
  69. package/dist/components/form/index.d.ts +7 -0
  70. package/dist/components/icon/Icon.d.ts +35 -0
  71. package/dist/components/icon/Icon.js +63 -0
  72. package/dist/components/icon/Icon.styles.d.ts +1 -0
  73. package/dist/components/icon/Icon.styles.js +17 -0
  74. package/dist/components/icon/index.d.ts +7 -0
  75. package/dist/components/icon-button/IconButton.d.ts +19 -0
  76. package/dist/components/icon-button/IconButton.js +51 -0
  77. package/dist/components/icon-button/IconButton.styles.d.ts +1 -0
  78. package/dist/components/icon-button/IconButton.styles.js +69 -0
  79. package/dist/components/icon-button/index.d.ts +7 -0
  80. package/dist/components/index.d.ts +14 -0
  81. package/dist/components/input/Input.d.ts +73 -0
  82. package/dist/components/input/Input.js +193 -0
  83. package/dist/components/input/Input.styles.d.ts +1 -0
  84. package/dist/components/input/Input.styles.js +149 -0
  85. package/dist/components/input/index.d.ts +7 -0
  86. package/dist/components/menu/Menu.d.ts +36 -0
  87. package/dist/components/menu/Menu.js +103 -0
  88. package/dist/components/menu/Menu.styles.d.ts +1 -0
  89. package/dist/components/menu/Menu.styles.js +33 -0
  90. package/dist/components/menu/index.d.ts +7 -0
  91. package/dist/components/menu-item/MenuItem.d.ts +27 -0
  92. package/dist/components/menu-item/MenuItem.js +68 -0
  93. package/dist/components/menu-item/MenuItem.styles.d.ts +1 -0
  94. package/dist/components/menu-item/MenuItem.styles.js +64 -0
  95. package/dist/components/menu-item/index.d.ts +7 -0
  96. package/dist/components/panel/Panel.d.ts +10 -0
  97. package/dist/components/panel/Panel.js +20 -0
  98. package/dist/components/panel/Panel.styles.d.ts +1 -0
  99. package/dist/components/panel/Panel.styles.js +12 -0
  100. package/dist/components/panel/index.d.ts +7 -0
  101. package/dist/components/progress-ring/ProgressRing.d.ts +31 -0
  102. package/dist/components/progress-ring/ProgressRing.js +85 -0
  103. package/dist/components/progress-ring/ProgressRing.styles.d.ts +1 -0
  104. package/dist/components/progress-ring/ProgressRing.styles.js +53 -0
  105. package/dist/components/progress-ring/index.d.ts +7 -0
  106. package/dist/components/spinner/Spinner.d.ts +9 -0
  107. package/dist/components/spinner/Spinner.js +22 -0
  108. package/dist/components/spinner/Spinner.styles.d.ts +1 -0
  109. package/dist/components/spinner/Spinner.styles.js +57 -0
  110. package/dist/components/spinner/index.d.ts +7 -0
  111. package/dist/components/split-panel/SplitPanel.d.ts +26 -0
  112. package/dist/components/split-panel/SplitPanel.js +86 -0
  113. package/dist/components/split-panel/SplitPanel.styles.d.ts +1 -0
  114. package/dist/components/split-panel/SplitPanel.styles.js +19 -0
  115. package/dist/components/split-panel/SplitPanel.types.d.ts +2 -0
  116. package/dist/components/split-panel/Splitter.d.ts +17 -0
  117. package/dist/components/split-panel/Splitter.js +39 -0
  118. package/dist/components/split-panel/Splitter.styles.d.ts +1 -0
  119. package/dist/components/split-panel/Splitter.styles.js +45 -0
  120. package/dist/components/split-panel/index.d.ts +7 -0
  121. package/dist/components/tooltip/Tooltip.d.ts +44 -0
  122. package/dist/components/tooltip/Tooltip.js +130 -0
  123. package/dist/components/tooltip/Tooltip.styles.d.ts +1 -0
  124. package/dist/components/tooltip/Tooltip.styles.js +36 -0
  125. package/dist/components/tooltip/index.d.ts +7 -0
  126. package/dist/events/UChangeEvent.d.ts +6 -0
  127. package/dist/events/UHideEvent.d.ts +6 -0
  128. package/dist/events/UInputEvent.d.ts +6 -0
  129. package/dist/events/UResizeEvent.d.ts +6 -0
  130. package/dist/events/USelectEvent.d.ts +6 -0
  131. package/dist/events/UShowEvent.d.ts +6 -0
  132. package/dist/events/index.d.ts +6 -0
  133. package/dist/index.d.ts +2 -0
  134. package/dist/index.js +40 -0
  135. package/dist/integrations/react/UAlert.d.ts +8 -0
  136. package/dist/integrations/react/UAlert.js +10 -0
  137. package/dist/integrations/react/UButton.d.ts +8 -0
  138. package/dist/integrations/react/UButton.js +10 -0
  139. package/dist/integrations/react/UContextMenu.d.ts +8 -0
  140. package/dist/integrations/react/UContextMenu.js +10 -0
  141. package/dist/integrations/react/UCopyButton.d.ts +8 -0
  142. package/dist/integrations/react/UCopyButton.js +10 -0
  143. package/dist/integrations/react/UDialog.d.ts +8 -0
  144. package/dist/integrations/react/UDialog.js +10 -0
  145. package/dist/integrations/react/UForm.d.ts +8 -0
  146. package/dist/integrations/react/UForm.js +10 -0
  147. package/dist/integrations/react/UIcon.d.ts +8 -0
  148. package/dist/integrations/react/UIcon.js +10 -0
  149. package/dist/integrations/react/UIconButton.d.ts +8 -0
  150. package/dist/integrations/react/UIconButton.js +10 -0
  151. package/dist/integrations/react/UInput.d.ts +8 -0
  152. package/dist/integrations/react/UInput.js +10 -0
  153. package/dist/integrations/react/UMenu.d.ts +8 -0
  154. package/dist/integrations/react/UMenu.js +10 -0
  155. package/dist/integrations/react/UMenuItem.d.ts +8 -0
  156. package/dist/integrations/react/UMenuItem.js +10 -0
  157. package/dist/integrations/react/UPanel.d.ts +8 -0
  158. package/dist/integrations/react/UPanel.js +10 -0
  159. package/dist/integrations/react/UProgressRing.d.ts +8 -0
  160. package/dist/integrations/react/UProgressRing.js +10 -0
  161. package/dist/integrations/react/USpinner.d.ts +8 -0
  162. package/dist/integrations/react/USpinner.js +10 -0
  163. package/dist/integrations/react/USplitPanel.d.ts +8 -0
  164. package/dist/integrations/react/USplitPanel.js +10 -0
  165. package/dist/integrations/react/UTooltip.d.ts +8 -0
  166. package/dist/integrations/react/UTooltip.js +10 -0
  167. package/dist/integrations/react/index.d.ts +23 -0
  168. package/dist/integrations/react/index.js +16 -0
  169. package/dist/internals/attribute-converters.d.ts +10 -0
  170. package/dist/internals/attribute-converters.js +12 -0
  171. package/dist/internals/icons.d.ts +6 -0
  172. package/dist/internals/icons.js +67 -0
  173. package/dist/internals/index.d.ts +4 -0
  174. package/dist/internals/node-helpers.d.ts +12 -0
  175. package/dist/internals/node-helpers.js +21 -0
  176. package/dist/internals/react-wrapper.d.ts +21 -0
  177. package/dist/utilities/decorators.d.ts +28 -0
  178. package/dist/utilities/decorators.js +21 -0
  179. package/dist/utilities/index.d.ts +4 -0
  180. package/dist/utilities/notifier.d.ts +26 -0
  181. package/dist/utilities/notifier.js +29 -0
  182. package/dist/utilities/storage.d.ts +60 -0
  183. package/dist/utilities/storage.js +120 -0
  184. package/dist/utilities/theme.d.ts +54 -0
  185. package/dist/utilities/theme.js +108 -0
  186. package/package.json +58 -0
@@ -0,0 +1,7 @@
1
+ import { Menu } from './Menu.js';
2
+ declare global {
3
+ interface HTMLElementTagNameMap {
4
+ 'u-menu': Menu;
5
+ }
6
+ }
7
+ export { Menu };
@@ -0,0 +1,27 @@
1
+ import { PropertyValues } from 'lit';
2
+ import { BaseElement } from '../BaseElement.js';
3
+ /**
4
+ * MenuItem 컴포넌트는 메뉴의 개별 항목을 나타냅니다.
5
+ * u-menu 및 u-context-menu와 함께 사용됩니다.
6
+ */
7
+ export declare class MenuItem extends BaseElement {
8
+ static styles: import('lit').CSSResultGroup[];
9
+ static dependencies: Record<string, typeof BaseElement>;
10
+ /** 메뉴 항목이 비활성화 상태인지 여부입니다. */
11
+ disabled: boolean;
12
+ /** 메뉴 항목이 선택된 상태인지 여부입니다. */
13
+ selected: boolean;
14
+ /** 체크 가능한 경우, 체크 상태인지 여부입니다. */
15
+ checked: boolean;
16
+ /** 메뉴 항목에 체크 표시를 할 수 있는지 여부입니다. */
17
+ checkable: boolean;
18
+ /** 메뉴 항목의 값입니다. */
19
+ value: string;
20
+ connectedCallback(): void;
21
+ protected updated(changedProperties: PropertyValues): void;
22
+ render(): import('lit-html').TemplateResult<1>;
23
+ /** 메뉴 항목의 앞부분을 렌더링합니다. */
24
+ private renderPrefixItem;
25
+ /** 클릭 이벤트를 처리합니다. */
26
+ private handleClick;
27
+ }
@@ -0,0 +1,68 @@
1
+ import { html as d, nothing as n } from "lit";
2
+ import { property as s } from "lit/decorators.js";
3
+ import { BaseElement as o } from "../BaseElement.js";
4
+ import { styles as p } from "./MenuItem.styles.js";
5
+ var u = Object.defineProperty, i = (l, e, c, f) => {
6
+ for (var t = void 0, a = l.length - 1, h; a >= 0; a--)
7
+ (h = l[a]) && (t = h(e, c, t) || t);
8
+ return t && u(e, c, t), t;
9
+ };
10
+ class r extends o {
11
+ constructor() {
12
+ super(...arguments), this.disabled = !1, this.selected = !1, this.checked = !1, this.checkable = !1, this.value = "", this.handleClick = (e) => {
13
+ if (this.disabled) {
14
+ e.preventDefault(), e.stopPropagation();
15
+ return;
16
+ }
17
+ this.checkable ? (this.checked = !this.checked, this.emit("u-check", { checked: this.checked })) : this.emit("u-select", { value: this.value });
18
+ };
19
+ }
20
+ static {
21
+ this.styles = [super.styles, p];
22
+ }
23
+ static {
24
+ this.dependencies = {};
25
+ }
26
+ connectedCallback() {
27
+ super.connectedCallback(), this.setAttribute("role", "menuitem"), this.setAttribute("tabindex", this.disabled ? "-1" : "0");
28
+ }
29
+ updated(e) {
30
+ super.updated(e), e.has("disabled") && (this.setAttribute("tabindex", this.disabled ? "-1" : "0"), this.setAttribute("aria-disabled", this.disabled ? "true" : "false")), e.has("checked") && this.setAttribute("aria-checked", this.checked ? "true" : "false");
31
+ }
32
+ render() {
33
+ return d`
34
+ <div class="container" @click=${this.handleClick}>
35
+ ${this.renderPrefixItem()}
36
+ <slot name="prefix"></slot>
37
+ <span class="content">
38
+ <slot></slot>
39
+ </span>
40
+ <slot name="suffix"></slot>
41
+ </div>
42
+ `;
43
+ }
44
+ /** 메뉴 항목의 앞부분을 렌더링합니다. */
45
+ renderPrefixItem() {
46
+ return this.checkable ? d`
47
+ <span class="checker" ?checked=${this.checked}>✓</span>
48
+ ` : n;
49
+ }
50
+ }
51
+ i([
52
+ s({ type: Boolean, reflect: !0 })
53
+ ], r.prototype, "disabled");
54
+ i([
55
+ s({ type: Boolean, reflect: !0 })
56
+ ], r.prototype, "selected");
57
+ i([
58
+ s({ type: Boolean, reflect: !0 })
59
+ ], r.prototype, "checked");
60
+ i([
61
+ s({ type: Boolean })
62
+ ], r.prototype, "checkable");
63
+ i([
64
+ s({ type: String })
65
+ ], r.prototype, "value");
66
+ export {
67
+ r as MenuItem
68
+ };
@@ -0,0 +1 @@
1
+ export declare const styles: import('lit').CSSResult;
@@ -0,0 +1,64 @@
1
+ import { css as e } from "lit";
2
+ const r = e`
3
+ :host {
4
+ display: block;
5
+
6
+ --selected-color: var(--u-blue-600, #0066cc);
7
+ --selected-bg-color: var(--u-blue-50, #e8f4f8);
8
+ }
9
+ :host([disabled]) {
10
+ opacity: 0.5;
11
+ pointer-events: none;
12
+ cursor: not-allowed;
13
+ }
14
+ :host([disabled]) .container {
15
+ cursor: not-allowed;
16
+ pointer-events: none;
17
+ }
18
+ :host(:not([disabled])) .container:hover {
19
+ background-color: var(--u-bg-color-hover, #f5f5f5);
20
+ }
21
+ :host([selected]) .container {
22
+ color: var(--selected-color, #0066cc);
23
+ background-color: var(--selected-bg-color, #e8f4f8);
24
+ }
25
+
26
+ .container {
27
+ display: flex;
28
+ flex-direction: row;
29
+ align-items: center;
30
+ gap: 8px;
31
+ padding: 8px 12px;
32
+ line-height: 1.5;
33
+ border-radius: 4px;
34
+ background-color: transparent;
35
+ transition: background-color 0.2s ease;
36
+ user-select: none;
37
+ cursor: pointer;
38
+ }
39
+
40
+ .checker {
41
+ display: flex;
42
+ align-items: center;
43
+ justify-content: center;
44
+ opacity: 0;
45
+ width: 1em;
46
+ font-size: 0.75em;
47
+ font-weight: bold;
48
+ color: var(--u-blue-600, #0066cc);
49
+ transition: opacity 0.2s ease;
50
+ }
51
+ .checker[checked] {
52
+ opacity: 1;
53
+ }
54
+
55
+ .content {
56
+ flex: 1;
57
+ overflow: hidden;
58
+ text-overflow: ellipsis;
59
+ white-space: nowrap;
60
+ }
61
+ `;
62
+ export {
63
+ r as styles
64
+ };
@@ -0,0 +1,7 @@
1
+ import { MenuItem } from './MenuItem.js';
2
+ declare global {
3
+ interface HTMLElementTagNameMap {
4
+ 'u-menu-item': MenuItem;
5
+ }
6
+ }
7
+ export { MenuItem };
@@ -0,0 +1,10 @@
1
+ import { BaseElement } from '../BaseElement.js';
2
+ /**
3
+ * 각 패널은 독립적인 크기와 콘텐츠를 가질 수 있습니다.
4
+ */
5
+ export declare class Panel extends BaseElement {
6
+ static styles: import('lit').CSSResultGroup[];
7
+ static dependencies: Record<string, typeof BaseElement>;
8
+ connectedCallback(): void;
9
+ render(): import('lit-html').TemplateResult<1>;
10
+ }
@@ -0,0 +1,20 @@
1
+ import { html as e } from "lit";
2
+ import { BaseElement as s } from "../BaseElement.js";
3
+ import { styles as t } from "./Panel.styles.js";
4
+ class o extends s {
5
+ static {
6
+ this.styles = [super.styles, t];
7
+ }
8
+ static {
9
+ this.dependencies = {};
10
+ }
11
+ connectedCallback() {
12
+ super.connectedCallback(), this.classList.add("scrollable");
13
+ }
14
+ render() {
15
+ return e`<slot></slot>`;
16
+ }
17
+ }
18
+ export {
19
+ o as Panel
20
+ };
@@ -0,0 +1 @@
1
+ export declare const styles: import('lit').CSSResult;
@@ -0,0 +1,12 @@
1
+ import { css as t } from "lit";
2
+ const s = t`
3
+ :host {
4
+ position: relative;
5
+ display: block;
6
+ width: 100%;
7
+ height: 100%;
8
+ }
9
+ `;
10
+ export {
11
+ s as styles
12
+ };
@@ -0,0 +1,7 @@
1
+ import { Panel } from './Panel.js';
2
+ declare global {
3
+ interface HTMLElementTagNameMap {
4
+ 'u-panel': Panel;
5
+ }
6
+ }
7
+ export { Panel };
@@ -0,0 +1,31 @@
1
+ import { PropertyValues } from 'lit';
2
+ import { BaseElement } from '../BaseElement.js';
3
+ /** 원형 진행 표시기의 변형 타입 */
4
+ export type ProgressRingVariant = 'smooth' | 'blocks' | 'ticks';
5
+ /**
6
+ * ProgressRing 컴포넌트는 원형 진행 표시기를 제공합니다.
7
+ * 진행 상태를 시각적으로 나타내며, 크기와 두께를 스타일 속성으로 조절할 수 있습니다.
8
+ */
9
+ export declare class ProgressRing extends BaseElement {
10
+ static styles: import('lit').CSSResultGroup[];
11
+ static dependencies: Record<string, typeof BaseElement>;
12
+ progress: number;
13
+ dasharray: string;
14
+ /** 진행 표시기의 스타일 변형을 설정합니다. */
15
+ variant: ProgressRingVariant;
16
+ /** 진행 표시기의 최소값을 설정합니다. */
17
+ minValue: number;
18
+ /** 진행 표시기의 최대값을 설정합니다. */
19
+ maxValue: number;
20
+ /** 진행 표시기의 현재 값을 설정합니다. */
21
+ value: number;
22
+ protected willUpdate(changedProperties: PropertyValues): void;
23
+ render(): import('lit-html').TemplateResult<1>;
24
+ /** 진행 상태를 0과 1 사이의 값으로 반환합니다. */
25
+ private updateProgress;
26
+ /**
27
+ * variant에 따라 dasharray 값을 반환합니다.
28
+ * [dash-length] [gap-length] or [dash-length] 형식
29
+ */
30
+ private updateDashArray;
31
+ }
@@ -0,0 +1,85 @@
1
+ import { html as d } from "lit";
2
+ import { state as n, property as h } from "lit/decorators.js";
3
+ import { BaseElement as c } from "../BaseElement.js";
4
+ import { styles as m } from "./ProgressRing.styles.js";
5
+ var y = Object.defineProperty, a = (p, r, s, o) => {
6
+ for (var e = void 0, l = p.length - 1, u; l >= 0; l--)
7
+ (u = p[l]) && (e = u(r, s, e) || e);
8
+ return e && y(r, s, e), e;
9
+ };
10
+ const t = 100;
11
+ class i extends c {
12
+ constructor() {
13
+ super(...arguments), this.progress = 0, this.dasharray = t.toString(), this.variant = "smooth", this.minValue = 0, this.maxValue = 100, this.value = 0;
14
+ }
15
+ static {
16
+ this.styles = [super.styles, m];
17
+ }
18
+ static {
19
+ this.dependencies = {};
20
+ }
21
+ willUpdate(r) {
22
+ super.willUpdate(r), r.has("variant") && (this.dasharray = this.updateDashArray(this.variant)), (r.has("minValue") || r.has("maxValue") || r.has("value")) && (this.progress = this.updateProgress(this.minValue, this.maxValue, this.value));
23
+ }
24
+ render() {
25
+ return d`
26
+ <svg class="progress-ring" part="base">
27
+ <defs>
28
+ <mask id="progress-mask">
29
+ <circle
30
+ pathLength="${t}"
31
+ stroke="white"
32
+ stroke-dasharray="${t}"
33
+ stroke-dashoffset="${t * (1 - this.progress)}"
34
+ ></circle>
35
+ </mask>
36
+ </defs>
37
+
38
+ <circle
39
+ class="track"
40
+ pathLength="${t}"
41
+ stroke-dasharray="${this.dasharray}"
42
+ ></circle>
43
+ <circle
44
+ class="indicator"
45
+ pathLength="${t}"
46
+ stroke-dasharray="${this.dasharray}"
47
+ mask="url(#progress-mask)"
48
+ ></circle>
49
+ </svg>
50
+ <div class="label" part="label">${Math.round(this.progress * 100)}%</div>
51
+ `;
52
+ }
53
+ /** 진행 상태를 0과 1 사이의 값으로 반환합니다. */
54
+ updateProgress(r, s, o) {
55
+ return r = Number(r ?? 0), s = Number(s ?? 100), o = Math.min(Math.max(Number(o ?? 0), r), s), s === r ? 0 : (o - r) / (s - r);
56
+ }
57
+ /**
58
+ * variant에 따라 dasharray 값을 반환합니다.
59
+ * [dash-length] [gap-length] or [dash-length] 형식
60
+ */
61
+ updateDashArray(r) {
62
+ return r === "ticks" ? "1 1" : r === "blocks" ? "8 2" : t.toString();
63
+ }
64
+ }
65
+ a([
66
+ n()
67
+ ], i.prototype, "progress");
68
+ a([
69
+ n()
70
+ ], i.prototype, "dasharray");
71
+ a([
72
+ h({ type: String, reflect: !0 })
73
+ ], i.prototype, "variant");
74
+ a([
75
+ h({ type: Number })
76
+ ], i.prototype, "minValue");
77
+ a([
78
+ h({ type: Number })
79
+ ], i.prototype, "maxValue");
80
+ a([
81
+ h({ type: Number })
82
+ ], i.prototype, "value");
83
+ export {
84
+ i as ProgressRing
85
+ };
@@ -0,0 +1 @@
1
+ export declare const styles: import('lit').CSSResult;
@@ -0,0 +1,53 @@
1
+ import { css as t } from "lit";
2
+ const r = t`
3
+ :host {
4
+ position: relative;
5
+ display: inline-flex;
6
+ font-size: inherit;
7
+
8
+ --track-width: 0.25em;
9
+ --track-color: var(--u-neutral-200, #e5e7eb);
10
+ --indicator-color: var(--u-blue-600, #3b82f6);
11
+ }
12
+ /* smooth variant - 매끄러운 원형 */
13
+ :host([variant="smooth"]) .mask {
14
+ stroke-linecap: round;
15
+ }
16
+
17
+ .progress-ring {
18
+ width: 6em;
19
+ height: 6em;
20
+ transform: rotate(-90deg); /* 0%가 위에서 시작하도록 회전 */
21
+ }
22
+ .progress-ring circle {
23
+ fill: none;
24
+ stroke-width: var(--track-width);
25
+ r: calc(3em - var(--track-width) / 2);
26
+ cx: 3em;
27
+ cy: 3em;
28
+ }
29
+
30
+ .track {
31
+ stroke: var(--track-color);
32
+ }
33
+ .indicator {
34
+ stroke: var(--indicator-color);
35
+ transition: stroke-dashoffset 350ms ease;
36
+ }
37
+
38
+ /* 라벨 중앙 숫자 */
39
+ .label {
40
+ position: absolute;
41
+ inset: 0;
42
+ display: flex;
43
+ align-items: center;
44
+ justify-content: center;
45
+ font-weight: 600;
46
+ font-size: 1.1em;
47
+ color: var(--indicator-color);
48
+ pointer-events: none;
49
+ }
50
+ `;
51
+ export {
52
+ r as styles
53
+ };
@@ -0,0 +1,7 @@
1
+ import { ProgressRing } from './ProgressRing.js';
2
+ declare global {
3
+ interface HTMLElementTagNameMap {
4
+ 'u-progress-ring': ProgressRing;
5
+ }
6
+ }
7
+ export { ProgressRing };
@@ -0,0 +1,9 @@
1
+ import { BaseElement } from '../BaseElement.js';
2
+ /**
3
+ * Spinner 컴포넌트는 로딩 상태를 시각적으로 표시하는 회전하는 원형 스피너를 제공합니다.
4
+ */
5
+ export declare class Spinner extends BaseElement {
6
+ static styles: import('lit').CSSResultGroup[];
7
+ static dependencies: Record<string, typeof BaseElement>;
8
+ render(): import('lit-html').TemplateResult<1>;
9
+ }
@@ -0,0 +1,22 @@
1
+ import { html as s } from "lit";
2
+ import { BaseElement as e } from "../BaseElement.js";
3
+ import { styles as r } from "./Spinner.styles.js";
4
+ class a extends e {
5
+ static {
6
+ this.styles = [super.styles, r];
7
+ }
8
+ static {
9
+ this.dependencies = {};
10
+ }
11
+ render() {
12
+ return s`
13
+ <svg class="spinner" part="base">
14
+ <circle class="track"></circle>
15
+ <circle class="indicator"></circle>
16
+ </svg>
17
+ `;
18
+ }
19
+ }
20
+ export {
21
+ a as Spinner
22
+ };
@@ -0,0 +1 @@
1
+ export declare const styles: import('lit').CSSResult;
@@ -0,0 +1,57 @@
1
+ import { css as r } from "lit";
2
+ const t = r`
3
+ :host {
4
+ display: inline-flex;
5
+ font-size: inherit;
6
+
7
+ --track-width: 0.125em;
8
+ --track-color: var(--u-neutral-200, #e5e7eb);
9
+ --indicator-color: var(--u-neutral-800, #1f2937);
10
+ }
11
+
12
+ .spinner {
13
+ flex: 1 1 auto;
14
+ width: 1em;
15
+ height: 1em;
16
+ }
17
+ .spinner circle {
18
+ fill: none;
19
+ stroke-width: var(--track-width);
20
+ r: calc(0.5em - var(--track-width) / 2);
21
+ cx: 0.5em;
22
+ cy: 0.5em;
23
+ }
24
+
25
+ .track {
26
+ stroke: var(--track-color);
27
+ transform-origin: 0% 0%;
28
+ }
29
+
30
+ .indicator {
31
+ stroke: var(--indicator-color);
32
+ stroke-linecap: round;
33
+ stroke-dasharray: 150% 75%;
34
+ transform-origin: 50% 50%;
35
+ animation: spin 2s linear infinite;
36
+ }
37
+
38
+ @keyframes spin {
39
+ 0% {
40
+ transform: rotate(0deg);
41
+ stroke-dasharray: 0.05em, 3em;
42
+ }
43
+
44
+ 50% {
45
+ transform: rotate(450deg);
46
+ stroke-dasharray: 1.375em, 1.375em;
47
+ }
48
+
49
+ 100% {
50
+ transform: rotate(1080deg);
51
+ stroke-dasharray: 0.05em, 3em;
52
+ }
53
+ }
54
+ `;
55
+ export {
56
+ t as styles
57
+ };
@@ -0,0 +1,7 @@
1
+ import { Spinner } from './Spinner.js';
2
+ declare global {
3
+ interface HTMLElementTagNameMap {
4
+ 'u-spinner': Spinner;
5
+ }
6
+ }
7
+ export { Spinner };
@@ -0,0 +1,26 @@
1
+ import { BaseElement } from '../BaseElement.js';
2
+ import { PanelOrientation } from './SplitPanel.types.js';
3
+ /**
4
+ * SplitPanel 컴포넌트는 화면을 여러 개의 패널로 분할하여 표시합니다.
5
+ */
6
+ export declare class SplitPanel extends BaseElement {
7
+ static styles: import('lit').CSSResultGroup[];
8
+ static dependencies: Record<string, typeof BaseElement>;
9
+ private panels;
10
+ private splitters;
11
+ private isDragging;
12
+ private currentSplitter;
13
+ private totalSize;
14
+ private startPosition;
15
+ private startRatio;
16
+ /** 분할 방향을 설정합니다. 'horizontal'은 좌우 분할, 'vertical'은 상하 분할입니다. */
17
+ orientation: PanelOrientation;
18
+ /** 초기 패널 크기 비율을 설정합니다. (예: [30, 70]은 첫 번째 패널이 30%, 두 번째 패널이 70%를 차지) */
19
+ ratio: number[];
20
+ disconnectedCallback(): void;
21
+ render(): import('lit-html').TemplateResult<1>;
22
+ private handleSlotChange;
23
+ private handleMouseDown;
24
+ private handleMouseMove;
25
+ private handleMouseUp;
26
+ }
@@ -0,0 +1,86 @@
1
+ import { html as f } from "lit";
2
+ import { property as p } from "lit/decorators.js";
3
+ import { arrayAttributeConverter as g } from "../../internals/attribute-converters.js";
4
+ import { BaseElement as v } from "../BaseElement.js";
5
+ import { Panel as c } from "../panel/Panel.js";
6
+ import { Splitter as u } from "./Splitter.js";
7
+ import { styles as y } from "./SplitPanel.styles.js";
8
+ var S = Object.defineProperty, d = (a, s, r, o) => {
9
+ for (var t = void 0, e = a.length - 1, i; e >= 0; e--)
10
+ (i = a[e]) && (t = i(s, r, t) || t);
11
+ return t && S(s, r, t), t;
12
+ };
13
+ class m extends v {
14
+ constructor() {
15
+ super(...arguments), this.panels = [], this.splitters = [], this.isDragging = !1, this.currentSplitter = null, this.totalSize = 0, this.startPosition = 0, this.startRatio = [], this.orientation = "horizontal", this.ratio = [], this.handleSlotChange = async (s) => {
16
+ const t = s.target.assignedElements({ flatten: !0 }).filter((e) => e instanceof c);
17
+ if (!(this.panels.length === t.length && this.panels.every((e, i) => e === t[i]))) {
18
+ if (this.splitters.forEach((e) => e.remove()), this.splitters = [], this.panels = t, t.forEach((e, i) => {
19
+ if (i === t.length - 1)
20
+ return;
21
+ const n = new u();
22
+ n.orientation = this.orientation, n.addEventListener("mousedown", this.handleMouseDown), this.splitters.push(n), e.after(n);
23
+ }), this.ratio.length === t.length) {
24
+ const e = this.ratio.reduce((i, n) => i + n, 0);
25
+ t.forEach((i, n) => {
26
+ const l = this.ratio[n] / e * 100;
27
+ i.style.flex = `${l} 1 0%`;
28
+ });
29
+ return;
30
+ } else
31
+ t.forEach((e) => {
32
+ e.style.flex = `${100 / t.length} 1 0%`;
33
+ });
34
+ this.requestUpdate(), await this.updateComplete;
35
+ }
36
+ }, this.handleMouseDown = (s) => {
37
+ s.preventDefault();
38
+ const r = s.currentTarget;
39
+ this.currentSplitter = r, this.isDragging = !0, this.startPosition = this.orientation === "horizontal" ? s.clientX : s.clientY;
40
+ const o = this.getBoundingClientRect(), t = this.orientation === "horizontal" ? o.width : o.height, e = this.splitters.reduce((i, n) => i + n.size, 0);
41
+ this.totalSize = t - e, this.startRatio = this.panels.map((i) => {
42
+ const n = i.getBoundingClientRect();
43
+ return (this.orientation === "horizontal" ? n.width : n.height) / this.totalSize * 100;
44
+ }), r.dragging = !0, document.addEventListener("mousemove", this.handleMouseMove), document.addEventListener("mouseup", this.handleMouseUp), document.body.style.userSelect = "none", document.body.style.cursor = this.orientation === "horizontal" ? "col-resize" : "row-resize";
45
+ }, this.handleMouseMove = (s) => {
46
+ if (!this.isDragging || !this.currentSplitter) return;
47
+ s.preventDefault();
48
+ const o = (this.orientation === "horizontal" ? s.clientX : s.clientY) - this.startPosition, t = this.splitters.indexOf(this.currentSplitter);
49
+ if (t === -1) return;
50
+ const e = this.panels[t], i = this.panels[t + 1];
51
+ if (!e || !i) return;
52
+ const n = o / this.totalSize * 100, l = this.startRatio[t] + n, h = this.startRatio[t + 1] - n;
53
+ l < 0 || h < 0 || (e.style.flex = `${l} 1 0%`, i.style.flex = `${h} 1 0%`);
54
+ }, this.handleMouseUp = (s) => {
55
+ this.isDragging && (this.isDragging = !1, this.currentSplitter && (this.currentSplitter.dragging = !1, this.currentSplitter = null), document.removeEventListener("mousemove", this.handleMouseMove), document.removeEventListener("mouseup", this.handleMouseUp), document.body.style.userSelect = "", document.body.style.cursor = "");
56
+ };
57
+ }
58
+ static {
59
+ this.styles = [super.styles, y];
60
+ }
61
+ static {
62
+ this.dependencies = {
63
+ "u-panel": c,
64
+ "u-splitter": u
65
+ };
66
+ }
67
+ disconnectedCallback() {
68
+ document.removeEventListener("mousemove", this.handleMouseMove), document.removeEventListener("mouseup", this.handleMouseUp), this.splitters.forEach((s) => {
69
+ s.removeEventListener("mousedown", this.handleMouseDown), s.remove();
70
+ }), super.disconnectedCallback();
71
+ }
72
+ render() {
73
+ return f`
74
+ <slot @slotchange=${this.handleSlotChange}></slot>
75
+ `;
76
+ }
77
+ }
78
+ d([
79
+ p({ type: String, reflect: !0 })
80
+ ], m.prototype, "orientation");
81
+ d([
82
+ p({ type: Array, converter: g(parseFloat) })
83
+ ], m.prototype, "ratio");
84
+ export {
85
+ m as SplitPanel
86
+ };
@@ -0,0 +1 @@
1
+ export declare const styles: import('lit').CSSResult;
@@ -0,0 +1,19 @@
1
+ import { css as o } from "lit";
2
+ const i = o`
3
+ :host {
4
+ position: relative;
5
+ display: flex;
6
+ width: 100%;
7
+ height: 100%;
8
+ overflow: hidden;
9
+ }
10
+ :host([orientation="horizontal"]) {
11
+ flex-direction: row;
12
+ }
13
+ :host([orientation="vertical"]) {
14
+ flex-direction: column;
15
+ }
16
+ `;
17
+ export {
18
+ i as styles
19
+ };
@@ -0,0 +1,2 @@
1
+ /** 분할 패널의 방향을 나타내는 타입입니다. */
2
+ export type PanelOrientation = 'horizontal' | 'vertical';