@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,17 @@
1
+ import { BaseElement } from '../BaseElement.js';
2
+ import { PanelOrientation } from './SplitPanel.types.js';
3
+ /**
4
+ * Splitter 컴포넌트는 SplitPanel의 패널들 사이에 배치되는 디바이더입니다.
5
+ * 사용자가 드래그하여 패널의 크기를 조절할 수 있습니다.
6
+ */
7
+ export declare class Splitter extends BaseElement {
8
+ static styles: import('lit').CSSResultGroup[];
9
+ static dependencies: Record<string, typeof BaseElement>;
10
+ /** 드래그 중인지 여부를 나타냅니다. */
11
+ dragging: boolean;
12
+ /** 분할 방향을 설정합니다. */
13
+ orientation: PanelOrientation;
14
+ render(): import('lit-html').TemplateResult<1>;
15
+ /** 스플리터의 크기를 반환합니다. */
16
+ get size(): number;
17
+ }
@@ -0,0 +1,39 @@
1
+ import { html as p } from "lit";
2
+ import { state as l, property as g } from "lit/decorators.js";
3
+ import { BaseElement as d } from "../BaseElement.js";
4
+ import { styles as m } from "./Splitter.styles.js";
5
+ var f = Object.defineProperty, n = (r, e, i, u) => {
6
+ for (var t = void 0, s = r.length - 1, o; s >= 0; s--)
7
+ (o = r[s]) && (t = o(e, i, t) || t);
8
+ return t && f(e, i, t), t;
9
+ };
10
+ class a extends d {
11
+ constructor() {
12
+ super(...arguments), this.dragging = !1, this.orientation = "horizontal";
13
+ }
14
+ static {
15
+ this.styles = [super.styles, m];
16
+ }
17
+ static {
18
+ this.dependencies = {};
19
+ }
20
+ render() {
21
+ return p`
22
+ <div class="handler" ?dragging=${this.dragging}></div>
23
+ `;
24
+ }
25
+ /** 스플리터의 크기를 반환합니다. */
26
+ get size() {
27
+ const e = getComputedStyle(this).getPropertyValue("--splitter-size").trim();
28
+ return parseFloat(e) || 2;
29
+ }
30
+ }
31
+ n([
32
+ l()
33
+ ], a.prototype, "dragging");
34
+ n([
35
+ g({ type: String, reflect: !0 })
36
+ ], a.prototype, "orientation");
37
+ export {
38
+ a as Splitter
39
+ };
@@ -0,0 +1 @@
1
+ export declare const styles: import('lit').CSSResult;
@@ -0,0 +1,45 @@
1
+ import { css as r } from "lit";
2
+ const e = r`
3
+ :host {
4
+ position: relative;
5
+ display: block;
6
+ flex-shrink: 0;
7
+ background-color: var(--u-neutral-200, #e5e7eb);
8
+ transition: background-color 0.2s ease;
9
+
10
+ --splitter-size: 2px;
11
+ --handler-size: 6px;
12
+ --handler-color: var(--u-blue-500, #3b82f6);
13
+ }
14
+ :host([orientation="horizontal"]) {
15
+ width: var(--splitter-size, 2px);
16
+ height: 100%;
17
+ cursor: col-resize;
18
+ }
19
+ :host([orientation="vertical"]) {
20
+ width: 100%;
21
+ height: var(--splitter-size, 2px);
22
+ cursor: row-resize;
23
+ }
24
+
25
+ .handler {
26
+ position: absolute;
27
+ z-index: 100;
28
+ top: 50%;
29
+ left: 50%;
30
+ transform: translate(-50%, -50%);
31
+ display: block;
32
+ width: 300%;
33
+ height: 300%;
34
+ background-color: var(--handler-color, #3b82f6);
35
+ opacity: 0;
36
+ transition: opacity 0.2s ease;
37
+ }
38
+ .handler[dragging],
39
+ .handler:hover {
40
+ opacity: 1;
41
+ }
42
+ `;
43
+ export {
44
+ e as styles
45
+ };
@@ -0,0 +1,7 @@
1
+ import { SplitPanel } from './SplitPanel.js';
2
+ declare global {
3
+ interface HTMLElementTagNameMap {
4
+ 'u-split-panel': SplitPanel;
5
+ }
6
+ }
7
+ export { SplitPanel };
@@ -0,0 +1,44 @@
1
+ import { PropertyValues } from 'lit';
2
+ import { Placement } from '@floating-ui/dom';
3
+ import { BaseElement } from '../BaseElement.js';
4
+ /**
5
+ * Tooltip 컴포넌트는 대상 엘리먼트에 툴팁을 표시하는 기능을 제공합니다.
6
+ */
7
+ export declare class Tooltip extends BaseElement {
8
+ static styles: import('lit').CSSResultGroup[];
9
+ static dependencies: Record<string, typeof BaseElement>;
10
+ /** 슬롯이 비어있는지 여부를 나타냅니다. */
11
+ private isSlotEmpty;
12
+ /** 툴팁이 연결될 대상 엘리먼트입니다. 지정하지 않으면 부모 엘리먼트가 대상이 됩니다. */
13
+ triggers: HTMLElement[];
14
+ /** 트리거 셀렉터 문자열입니다. 이 속성을 사용하여 트리거 엘리먼트를 지정할 수 있습니다. */
15
+ triggerSelectors?: string;
16
+ /** 현재 툴팁이 열려있는지 여부를 나타냅니다. */
17
+ open: boolean;
18
+ /** 'fixed' 위치에서 포지션을 계산할지 여부를 설정합니다. 기본값은 false입니다. */
19
+ hoist: boolean;
20
+ /** 툴팁이 나타날 위치를 설정합니다. */
21
+ placement?: Placement;
22
+ /** 툴팁의 위치에서 대상 엘리먼트까지의 거리를 픽셀단위로 설정합니다. 기본값은 8입니다. */
23
+ distance: number;
24
+ connectedCallback(): void;
25
+ disconnectedCallback(): void;
26
+ protected updated(changedProperties: PropertyValues): void;
27
+ render(): import('lit-html').TemplateResult<1>;
28
+ /** 툴팁을 표시합니다. */
29
+ show: (e?: Event) => Promise<void>;
30
+ /** 툴팁을 숨깁니다. */
31
+ hide: (_: Event) => Promise<void>;
32
+ /** 대상 엘리먼트에 툴팁 이벤트를 바인딩 합니다. */
33
+ private attachTriggers;
34
+ /** 대상 엘리먼트에 바인딩된 툴팁 이벤트를 제거합니다. */
35
+ private detachTriggers;
36
+ /**
37
+ * 툴팁이 나타날 위치에 따라 transform-origin 값을 반환합니다.
38
+ */
39
+ private getTransformOrigin;
40
+ /**
41
+ * slot에 콘텐츠가 존재하는지 확인합니다.
42
+ */
43
+ private handleSlotChange;
44
+ }
@@ -0,0 +1,130 @@
1
+ import { html as l } from "lit";
2
+ import { property as r } from "lit/decorators.js";
3
+ import { offset as g, shift as p, flip as u, autoPlacement as m, computePosition as d } from "@floating-ui/dom";
4
+ import { getParentElement as f, findElementsBy as y } from "../../internals/node-helpers.js";
5
+ import { BaseElement as E } from "../BaseElement.js";
6
+ import { styles as v } from "./Tooltip.styles.js";
7
+ var T = Object.defineProperty, i = (a, t, e, n) => {
8
+ for (var s = void 0, h = a.length - 1, c; h >= 0; h--)
9
+ (c = a[h]) && (s = c(t, e, s) || s);
10
+ return s && T(t, e, s), s;
11
+ };
12
+ class o extends E {
13
+ constructor() {
14
+ super(...arguments), this.isSlotEmpty = !0, this.triggers = [], this.open = !1, this.hoist = !1, this.distance = 8, this.show = async (t) => {
15
+ await this.updateComplete;
16
+ const e = t?.currentTarget || this.triggers[0] || null;
17
+ if (!e || this.isSlotEmpty) return;
18
+ const n = [
19
+ g({ mainAxis: this.distance }),
20
+ p(),
21
+ u()
22
+ ];
23
+ this.placement || n.push(m());
24
+ const s = await d(e, this, {
25
+ placement: this.placement,
26
+ middleware: n,
27
+ strategy: this.hoist ? "fixed" : "absolute"
28
+ });
29
+ Object.assign(this.style, {
30
+ left: `${s.x}px`,
31
+ top: `${s.y}px`,
32
+ transformOrigin: this.getTransformOrigin(s.placement)
33
+ }), await this.updateComplete, requestAnimationFrame(() => {
34
+ this.open = !0;
35
+ });
36
+ }, this.hide = async (t) => {
37
+ await this.updateComplete, requestAnimationFrame(() => {
38
+ this.open = !1;
39
+ });
40
+ }, this.handleSlotChange = (t) => {
41
+ const n = t.target.assignedNodes({ flatten: !0 }) ?? [];
42
+ this.isSlotEmpty = !n.some((s) => !!(s.nodeType === Node.ELEMENT_NODE || s.nodeType === Node.TEXT_NODE && s.textContent?.trim()));
43
+ };
44
+ }
45
+ static {
46
+ this.styles = [super.styles, v];
47
+ }
48
+ static {
49
+ this.dependencies = {};
50
+ }
51
+ connectedCallback() {
52
+ if (super.connectedCallback(), this.triggers.length === 0) {
53
+ const t = f(this);
54
+ t && (this.triggers = [t]);
55
+ }
56
+ }
57
+ disconnectedCallback() {
58
+ this.detachTriggers(this.triggers), super.disconnectedCallback();
59
+ }
60
+ updated(t) {
61
+ if (super.updated(t), t.has("triggers") && this.triggers) {
62
+ const e = t.get("triggers");
63
+ this.detachTriggers(e), this.attachTriggers(this.triggers);
64
+ }
65
+ t.has("triggerSelectors") && this.triggerSelectors && (this.triggers = y(this, this.triggerSelectors));
66
+ }
67
+ render() {
68
+ return l`
69
+ <slot @slotchange=${this.handleSlotChange}></slot>
70
+ `;
71
+ }
72
+ /** 대상 엘리먼트에 툴팁 이벤트를 바인딩 합니다. */
73
+ attachTriggers(t) {
74
+ if (t)
75
+ for (const e of t)
76
+ e.addEventListener("mouseenter", this.show), e.addEventListener("mouseleave", this.hide), e.addEventListener("focusin", this.show), e.addEventListener("focusout", this.hide);
77
+ }
78
+ /** 대상 엘리먼트에 바인딩된 툴팁 이벤트를 제거합니다. */
79
+ detachTriggers(t) {
80
+ if (t)
81
+ for (const e of t)
82
+ e.removeEventListener("mouseenter", this.show), e.removeEventListener("mouseleave", this.hide), e.removeEventListener("focusin", this.show), e.removeEventListener("focusout", this.hide);
83
+ }
84
+ /**
85
+ * 툴팁이 나타날 위치에 따라 transform-origin 값을 반환합니다.
86
+ */
87
+ getTransformOrigin(t) {
88
+ switch (t) {
89
+ case "top":
90
+ case "top-start":
91
+ case "top-end":
92
+ return "center bottom";
93
+ case "bottom":
94
+ case "bottom-start":
95
+ case "bottom-end":
96
+ return "center top";
97
+ case "left":
98
+ case "left-start":
99
+ case "left-end":
100
+ return "right center";
101
+ case "right":
102
+ case "right-start":
103
+ case "right-end":
104
+ return "left center";
105
+ default:
106
+ return "center";
107
+ }
108
+ }
109
+ }
110
+ i([
111
+ r({ attribute: !1 })
112
+ ], o.prototype, "triggers");
113
+ i([
114
+ r({ type: String, attribute: "trigger-selectors" })
115
+ ], o.prototype, "triggerSelectors");
116
+ i([
117
+ r({ type: Boolean, reflect: !0 })
118
+ ], o.prototype, "open");
119
+ i([
120
+ r({ type: Boolean, reflect: !0 })
121
+ ], o.prototype, "hoist");
122
+ i([
123
+ r({ type: String })
124
+ ], o.prototype, "placement");
125
+ i([
126
+ r({ type: Number })
127
+ ], o.prototype, "distance");
128
+ export {
129
+ o as Tooltip
130
+ };
@@ -0,0 +1 @@
1
+ export declare const styles: import('lit').CSSResult;
@@ -0,0 +1,36 @@
1
+ import { css as o } from "lit";
2
+ const e = o`
3
+ :host {
4
+ position: absolute;
5
+ z-index: 1000;
6
+ top: 0;
7
+ left: 0;
8
+ display: block;
9
+ width: max-content;
10
+
11
+ padding: 8px;
12
+ color: var(--u-tooltip-text-color);
13
+ font-family: var(--u-font-modern, inherit);
14
+ font-size: 14px;
15
+ line-height: 1.5;
16
+ border: none;
17
+ border-radius: 4px;
18
+ background-color: var(--u-tooltip-bg-color);
19
+
20
+ opacity: 0;
21
+ pointer-events: none;
22
+ transform: scale(0);
23
+ transition: opacity 0.15s ease, transform 0.15s ease;
24
+ }
25
+ :host([open]) {
26
+ opacity: 0.8;
27
+ transform: scale(1);
28
+ pointer-events: auto;
29
+ }
30
+ :host([hoist]) {
31
+ position: fixed;
32
+ }
33
+ `;
34
+ export {
35
+ e as styles
36
+ };
@@ -0,0 +1,7 @@
1
+ import { Tooltip } from './Tooltip.js';
2
+ declare global {
3
+ interface HTMLElementTagNameMap {
4
+ 'u-tooltip': Tooltip;
5
+ }
6
+ }
7
+ export { Tooltip };
@@ -0,0 +1,6 @@
1
+ export type UChangeEvent = CustomEvent<Record<PropertyKey, never>>;
2
+ declare global {
3
+ interface GlobalEventHandlersEventMap {
4
+ 'u-change': UChangeEvent;
5
+ }
6
+ }
@@ -0,0 +1,6 @@
1
+ export type UHideEvent = CustomEvent<Record<PropertyKey, never>>;
2
+ declare global {
3
+ interface GlobalEventHandlersEventMap {
4
+ 'u-hide': UHideEvent;
5
+ }
6
+ }
@@ -0,0 +1,6 @@
1
+ export type UInputEvent = CustomEvent<Record<PropertyKey, never>>;
2
+ declare global {
3
+ interface GlobalEventHandlersEventMap {
4
+ 'u-input': UInputEvent;
5
+ }
6
+ }
@@ -0,0 +1,6 @@
1
+ export type UResizeEvent = CustomEvent<Record<PropertyKey, never>>;
2
+ declare global {
3
+ interface GlobalEventHandlersEventMap {
4
+ 'u-resize': UResizeEvent;
5
+ }
6
+ }
@@ -0,0 +1,6 @@
1
+ export type USelectEvent = CustomEvent<Record<PropertyKey, never>>;
2
+ declare global {
3
+ interface GlobalEventHandlersEventMap {
4
+ 'u-select': USelectEvent;
5
+ }
6
+ }
@@ -0,0 +1,6 @@
1
+ export type UShowEvent = CustomEvent<Record<PropertyKey, never>>;
2
+ declare global {
3
+ interface GlobalEventHandlersEventMap {
4
+ 'u-show': UShowEvent;
5
+ }
6
+ }
@@ -0,0 +1,6 @@
1
+ export * from './UChangeEvent';
2
+ export * from './UHideEvent';
3
+ export * from './UInputEvent';
4
+ export * from './UResizeEvent';
5
+ export * from './USelectEvent';
6
+ export * from './UShowEvent';
@@ -0,0 +1,2 @@
1
+ export * from './components';
2
+ export * from './utilities';
package/dist/index.js ADDED
@@ -0,0 +1,40 @@
1
+ import { Alert as e } from "./components/alert/Alert.js";
2
+ import { Button as p } from "./components/button/Button.js";
3
+ import { ContextMenu as f } from "./components/context-menu/ContextMenu.js";
4
+ import { Dialog as n } from "./components/dialog/Dialog.js";
5
+ import { Form as i } from "./components/form/Form.js";
6
+ import { Icon as g } from "./components/icon/Icon.js";
7
+ import { IconButton as M } from "./components/icon-button/IconButton.js";
8
+ import { Input as s } from "./components/input/Input.js";
9
+ import { Menu as B } from "./components/menu/Menu.js";
10
+ import { Panel as S } from "./components/panel/Panel.js";
11
+ import { ProgressRing as h } from "./components/progress-ring/ProgressRing.js";
12
+ import { Spinner as A } from "./components/spinner/Spinner.js";
13
+ import { SplitPanel as D } from "./components/split-panel/SplitPanel.js";
14
+ import { Tooltip as R } from "./components/tooltip/Tooltip.js";
15
+ import { getPropertyMeta as b, propertyMeta as d, setPropertyMeta as j } from "./utilities/decorators.js";
16
+ import { notifier as q } from "./utilities/notifier.js";
17
+ import { BrowserStorage as z } from "./utilities/storage.js";
18
+ import { theme as G } from "./utilities/theme.js";
19
+ export {
20
+ e as Alert,
21
+ z as BrowserStorage,
22
+ p as Button,
23
+ f as ContextMenu,
24
+ n as Dialog,
25
+ i as Form,
26
+ g as Icon,
27
+ M as IconButton,
28
+ s as Input,
29
+ B as Menu,
30
+ S as Panel,
31
+ h as ProgressRing,
32
+ A as Spinner,
33
+ D as SplitPanel,
34
+ R as Tooltip,
35
+ b as getPropertyMeta,
36
+ q as notifier,
37
+ d as propertyMeta,
38
+ j as setPropertyMeta,
39
+ G as theme
40
+ };
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { Alert } from '../../components/alert/index';
3
+
4
+ export declare const UAlert: React.ForwardRefExoticComponent<
5
+ Partial<Alert> & React.HTMLAttributes<Alert>
6
+ >;
7
+
8
+ export type UAlertProps = React.ComponentProps<typeof UAlert>;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import { createComponent } from '@lit/react';
3
+ import { Alert } from '../../components/alert/index';
4
+
5
+ export const UAlert = createComponent({
6
+ react: React,
7
+ tagName: 'u-alert',
8
+ elementClass: Alert,
9
+ events: {}
10
+ });
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { Button } from '../../components/button/index';
3
+
4
+ export declare const UButton: React.ForwardRefExoticComponent<
5
+ Partial<Button> & React.HTMLAttributes<Button>
6
+ >;
7
+
8
+ export type UButtonProps = React.ComponentProps<typeof UButton>;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import { createComponent } from '@lit/react';
3
+ import { Button } from '../../components/button/index';
4
+
5
+ export const UButton = createComponent({
6
+ react: React,
7
+ tagName: 'u-button',
8
+ elementClass: Button,
9
+ events: {}
10
+ });
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { ContextMenu } from '../../components/context-menu/index';
3
+
4
+ export declare const UContextMenu: React.ForwardRefExoticComponent<
5
+ Partial<ContextMenu> & React.HTMLAttributes<ContextMenu>
6
+ >;
7
+
8
+ export type UContextMenuProps = React.ComponentProps<typeof UContextMenu>;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import { createComponent } from '@lit/react';
3
+ import { ContextMenu } from '../../components/context-menu/index';
4
+
5
+ export const UContextMenu = createComponent({
6
+ react: React,
7
+ tagName: 'u-context-menu',
8
+ elementClass: ContextMenu,
9
+ events: {}
10
+ });
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { CopyButton } from '../../components/copy-button/index';
3
+
4
+ export declare const UCopyButton: React.ForwardRefExoticComponent<
5
+ Partial<CopyButton> & React.HTMLAttributes<CopyButton>
6
+ >;
7
+
8
+ export type UCopyButtonProps = React.ComponentProps<typeof UCopyButton>;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import { createComponent } from '@lit/react';
3
+ import { CopyButton } from '../../components/copy-button/index';
4
+
5
+ export const UCopyButton = createComponent({
6
+ react: React,
7
+ tagName: 'u-copy-button',
8
+ elementClass: CopyButton,
9
+ events: {}
10
+ });
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { Dialog } from '../../components/dialog/index';
3
+
4
+ export declare const UDialog: React.ForwardRefExoticComponent<
5
+ Partial<Dialog> & React.HTMLAttributes<Dialog>
6
+ >;
7
+
8
+ export type UDialogProps = React.ComponentProps<typeof UDialog>;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import { createComponent } from '@lit/react';
3
+ import { Dialog } from '../../components/dialog/index';
4
+
5
+ export const UDialog = createComponent({
6
+ react: React,
7
+ tagName: 'u-dialog',
8
+ elementClass: Dialog,
9
+ events: {}
10
+ });
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { Form } from '../../components/form/index';
3
+
4
+ export declare const UForm: React.ForwardRefExoticComponent<
5
+ Partial<Form> & React.HTMLAttributes<Form>
6
+ >;
7
+
8
+ export type UFormProps = React.ComponentProps<typeof UForm>;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import { createComponent } from '@lit/react';
3
+ import { Form } from '../../components/form/index';
4
+
5
+ export const UForm = createComponent({
6
+ react: React,
7
+ tagName: 'u-form',
8
+ elementClass: Form,
9
+ events: {}
10
+ });
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { Icon } from '../../components/icon/index';
3
+
4
+ export declare const UIcon: React.ForwardRefExoticComponent<
5
+ Partial<Icon> & React.HTMLAttributes<Icon>
6
+ >;
7
+
8
+ export type UIconProps = React.ComponentProps<typeof UIcon>;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import { createComponent } from '@lit/react';
3
+ import { Icon } from '../../components/icon/index';
4
+
5
+ export const UIcon = createComponent({
6
+ react: React,
7
+ tagName: 'u-icon',
8
+ elementClass: Icon,
9
+ events: {}
10
+ });
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { IconButton } from '../../components/icon-button/index';
3
+
4
+ export declare const UIconButton: React.ForwardRefExoticComponent<
5
+ Partial<IconButton> & React.HTMLAttributes<IconButton>
6
+ >;
7
+
8
+ export type UIconButtonProps = React.ComponentProps<typeof UIconButton>;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import { createComponent } from '@lit/react';
3
+ import { IconButton } from '../../components/icon-button/index';
4
+
5
+ export const UIconButton = createComponent({
6
+ react: React,
7
+ tagName: 'u-icon-button',
8
+ elementClass: IconButton,
9
+ events: {}
10
+ });
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { Input } from '../../components/input/index';
3
+
4
+ export declare const UInput: React.ForwardRefExoticComponent<
5
+ Partial<Input> & React.HTMLAttributes<Input>
6
+ >;
7
+
8
+ export type UInputProps = React.ComponentProps<typeof UInput>;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import { createComponent } from '@lit/react';
3
+ import { Input } from '../../components/input/index';
4
+
5
+ export const UInput = createComponent({
6
+ react: React,
7
+ tagName: 'u-input',
8
+ elementClass: Input,
9
+ events: {}
10
+ });
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { Menu } from '../../components/menu/index';
3
+
4
+ export declare const UMenu: React.ForwardRefExoticComponent<
5
+ Partial<Menu> & React.HTMLAttributes<Menu>
6
+ >;
7
+
8
+ export type UMenuProps = React.ComponentProps<typeof UMenu>;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import { createComponent } from '@lit/react';
3
+ import { Menu } from '../../components/menu/index';
4
+
5
+ export const UMenu = createComponent({
6
+ react: React,
7
+ tagName: 'u-menu',
8
+ elementClass: Menu,
9
+ events: {}
10
+ });