@iyulab/components 0.1.8 โ 0.1.9
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 +7 -1
- package/README.md +2 -9
- package/dist/components/tree/UTree.component.d.ts +1 -1
- package/dist/components/tree/UTree.component.js +3 -14
- package/dist/components/tree-item/UTreeItem.component.js +1 -9
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -2
- package/dist/react-components/UAlert.d.ts +8 -0
- package/dist/react-components/UAlert.js +10 -0
- package/dist/react-components/UButton.d.ts +8 -0
- package/dist/react-components/UButton.js +10 -0
- package/dist/react-components/UDialog.d.ts +8 -0
- package/dist/react-components/UDialog.js +10 -0
- package/dist/react-components/UDivider.d.ts +8 -0
- package/dist/react-components/UDivider.js +10 -0
- package/dist/react-components/UDrawer.d.ts +8 -0
- package/dist/react-components/UDrawer.js +10 -0
- package/dist/react-components/UForm.d.ts +8 -0
- package/dist/react-components/UForm.js +10 -0
- package/dist/react-components/UIcon.d.ts +8 -0
- package/dist/react-components/UIcon.js +10 -0
- package/dist/react-components/UIconButton.d.ts +8 -0
- package/dist/react-components/UIconButton.js +10 -0
- package/dist/react-components/UInput.d.ts +8 -0
- package/dist/react-components/UInput.js +10 -0
- package/dist/react-components/UMenu.d.ts +8 -0
- package/dist/react-components/UMenu.js +10 -0
- package/dist/react-components/UMenuItem.d.ts +8 -0
- package/dist/react-components/UMenuItem.js +10 -0
- package/dist/react-components/UProgressBar.d.ts +8 -0
- package/dist/react-components/UProgressBar.js +10 -0
- package/dist/react-components/UProgressRing.d.ts +8 -0
- package/dist/react-components/UProgressRing.js +10 -0
- package/dist/react-components/USkeleton.d.ts +8 -0
- package/dist/react-components/USkeleton.js +10 -0
- package/dist/react-components/USpinner.d.ts +8 -0
- package/dist/react-components/USpinner.js +10 -0
- package/dist/react-components/USplitPanel.d.ts +8 -0
- package/dist/react-components/USplitPanel.js +10 -0
- package/dist/react-components/UTooltip.d.ts +8 -0
- package/dist/react-components/UTooltip.js +10 -0
- package/dist/react-components/UTree.d.ts +8 -0
- package/dist/react-components/UTree.js +10 -0
- package/dist/react-components/UTreeItem.d.ts +8 -0
- package/dist/react-components/UTreeItem.js +10 -0
- package/dist/react-components/index.d.ts +26 -0
- package/dist/react-components/index.js +19 -0
- package/package.json +6 -6
- package/dist/components/copy-button/UCopyButton.component.d.ts +0 -19
- package/dist/components/copy-button/UCopyButton.component.js +0 -69
- package/dist/components/copy-button/UCopyButton.d.ts +0 -7
- package/dist/components/copy-button/UCopyButton.js +0 -5
- package/dist/components/copy-button/UCopyButton.styles.d.ts +0 -1
- package/dist/components/copy-button/UCopyButton.styles.js +0 -17
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.9 (2025-12-19)
|
|
4
|
+
- Added `Tree`, `TreeItem` components for hierarchical data display
|
|
5
|
+
- Updated React wrapper plugin to support new file structure
|
|
6
|
+
- Removed `CopyButton` component
|
|
7
|
+
- Changed React wrapper output directory to `react-components`
|
|
8
|
+
|
|
3
9
|
## 0.1.8 (2025-12-18)
|
|
4
10
|
- **Breaking Change**: Added `U` prefix to all component class names (e.g., `Alert` โ `UAlert`)
|
|
5
11
|
- **Breaking Change**: Changed file naming convention
|
|
@@ -40,4 +46,4 @@
|
|
|
40
46
|
- removed `toggle` method from theme utility.
|
|
41
47
|
|
|
42
48
|
## 0.1.0 (2025-11-12)
|
|
43
|
-
- Initial library version release
|
|
49
|
+
- Initial library version release
|
package/README.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Modern web components library built with Lit-Element for building reactive user interfaces.
|
|
4
4
|
|
|
5
|
+
Visit our [Demo Site](https://components.iyulab.com) to explore all components and their features.
|
|
6
|
+
|
|
5
7
|
## Installation
|
|
6
8
|
|
|
7
9
|
```bash
|
|
@@ -10,19 +12,10 @@ npm install @iyulab/components
|
|
|
10
12
|
|
|
11
13
|
## Usage
|
|
12
14
|
|
|
13
|
-
### Basic Import
|
|
14
|
-
|
|
15
15
|
```js
|
|
16
16
|
import "@iyulab/components";
|
|
17
17
|
```
|
|
18
18
|
|
|
19
|
-
## Links
|
|
20
|
-
|
|
21
|
-
- [GitHub Repository](https://github.com/iyulab/u-components)
|
|
22
|
-
- [NPM Package](https://www.npmjs.com/package/@iyulab/components)
|
|
23
|
-
|
|
24
|
-
> ๐ **Note**: Demo site is coming soon!
|
|
25
|
-
|
|
26
19
|
## Core Dependencies
|
|
27
20
|
|
|
28
21
|
- [lit](https://www.npmjs.com/package/lit) - Fast web components framework
|
|
@@ -8,7 +8,7 @@ export declare class UTree extends BaseElement {
|
|
|
8
8
|
static styles: import('lit').CSSResultGroup[];
|
|
9
9
|
static dependencies: Record<string, typeof BaseElement>;
|
|
10
10
|
private selectedItems;
|
|
11
|
-
|
|
11
|
+
items: UTreeItem[];
|
|
12
12
|
/** ํธ๋ฆฌ๊ฐ ๋นํ์ฑํ ์ํ์ธ์ง ์ฌ๋ถ์
๋๋ค. */
|
|
13
13
|
disabled: boolean;
|
|
14
14
|
/** ๋ค์ค ์ ํ์ ํ์ฉํ ์ง ์ฌ๋ถ์
๋๋ค. */
|
|
@@ -40,11 +40,6 @@ class UTree extends BaseElement {
|
|
|
40
40
|
} else {
|
|
41
41
|
this.selectedItems.delete(item);
|
|
42
42
|
}
|
|
43
|
-
this.emit("u-tree-select", {
|
|
44
|
-
value: item.value,
|
|
45
|
-
item,
|
|
46
|
-
selectedItems: Array.from(this.selectedItems)
|
|
47
|
-
});
|
|
48
43
|
};
|
|
49
44
|
/** ํธ๋ฆฌ ํญ๋ชฉ ํ์ฅ/์ถ์ ์ด๋ฒคํธ๋ฅผ ์ฒ๋ฆฌํฉ๋๋ค. */
|
|
50
45
|
this.handleItemToggle = (e) => {
|
|
@@ -52,11 +47,6 @@ class UTree extends BaseElement {
|
|
|
52
47
|
e.stopPropagation();
|
|
53
48
|
return;
|
|
54
49
|
}
|
|
55
|
-
const item = e.detail.item;
|
|
56
|
-
this.emit("u-tree-toggle", {
|
|
57
|
-
expanded: item.expanded,
|
|
58
|
-
item
|
|
59
|
-
});
|
|
60
50
|
};
|
|
61
51
|
}
|
|
62
52
|
static {
|
|
@@ -69,7 +59,6 @@ class UTree extends BaseElement {
|
|
|
69
59
|
}
|
|
70
60
|
connectedCallback() {
|
|
71
61
|
super.connectedCallback();
|
|
72
|
-
this.setAttribute("role", "tree");
|
|
73
62
|
this.addEventListener("u-select", this.handleItemSelect);
|
|
74
63
|
this.addEventListener("u-toggle", this.handleItemToggle);
|
|
75
64
|
}
|
|
@@ -103,7 +92,7 @@ class UTree extends BaseElement {
|
|
|
103
92
|
/**
|
|
104
93
|
* ์ฌ๊ท์ ์ผ๋ก ๋ชจ๋ TreeItem์ ๊ฐ์ ธ์ต๋๋ค.
|
|
105
94
|
*/
|
|
106
|
-
getAllTreeItems(items = this.
|
|
95
|
+
getAllTreeItems(items = this.items) {
|
|
107
96
|
let allItems = [];
|
|
108
97
|
items.forEach((item) => {
|
|
109
98
|
if (item instanceof UTreeItem) {
|
|
@@ -116,8 +105,8 @@ class UTree extends BaseElement {
|
|
|
116
105
|
}
|
|
117
106
|
}
|
|
118
107
|
__decorateClass([
|
|
119
|
-
queryAssignedElements({ selector: "u-tree-item" })
|
|
120
|
-
], UTree.prototype, "
|
|
108
|
+
queryAssignedElements({ flatten: false, selector: "u-tree-item" })
|
|
109
|
+
], UTree.prototype, "items");
|
|
121
110
|
__decorateClass([
|
|
122
111
|
property({ type: Boolean, reflect: true })
|
|
123
112
|
], UTree.prototype, "disabled");
|
|
@@ -65,23 +65,14 @@ const _UTreeItem = class _UTreeItem extends BaseElement {
|
|
|
65
65
|
}
|
|
66
66
|
connectedCallback() {
|
|
67
67
|
super.connectedCallback();
|
|
68
|
-
this.setAttribute("role", "treeitem");
|
|
69
68
|
this.setAttribute("tabindex", this.disabled ? "-1" : "0");
|
|
70
69
|
}
|
|
71
70
|
updated(changedProperties) {
|
|
72
71
|
super.updated(changedProperties);
|
|
73
72
|
if (changedProperties.has("disabled")) {
|
|
74
73
|
this.setAttribute("tabindex", this.disabled ? "-1" : "0");
|
|
75
|
-
this.setAttribute("aria-disabled", this.disabled ? "true" : "false");
|
|
76
|
-
}
|
|
77
|
-
if (changedProperties.has("expanded")) {
|
|
78
|
-
this.setAttribute("aria-expanded", this.expanded ? "true" : "false");
|
|
79
|
-
}
|
|
80
|
-
if (changedProperties.has("selected")) {
|
|
81
|
-
this.setAttribute("aria-selected", this.selected ? "true" : "false");
|
|
82
74
|
}
|
|
83
75
|
if (changedProperties.has("level")) {
|
|
84
|
-
this.setAttribute("aria-level", String(this.level + 1));
|
|
85
76
|
this.headerEl.style.paddingLeft = `calc(${this.level} * var(--indent-size, 20px))`;
|
|
86
77
|
}
|
|
87
78
|
}
|
|
@@ -90,6 +81,7 @@ const _UTreeItem = class _UTreeItem extends BaseElement {
|
|
|
90
81
|
<div class="header" @click=${this.handleHeaderClick}>
|
|
91
82
|
<u-icon class="expand-icon"
|
|
92
83
|
?hidden=${this.leaf}
|
|
84
|
+
lib="internal"
|
|
93
85
|
name=${this.expanded ? "chevron-down" : "chevron-right"}
|
|
94
86
|
></u-icon>
|
|
95
87
|
<slot name="prefix"></slot>
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export * from './components/alert/UAlert.js';
|
|
2
2
|
export * from './components/button/UButton.js';
|
|
3
|
-
export * from './components/copy-button/UCopyButton.js';
|
|
4
3
|
export * from './components/dialog/UDialog.js';
|
|
5
4
|
export * from './components/divider/UDivider.js';
|
|
6
5
|
export * from './components/drawer/UDrawer.js';
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import './components/alert/UAlert.js';
|
|
2
2
|
import './components/button/UButton.js';
|
|
3
|
-
import './components/copy-button/UCopyButton.js';
|
|
4
3
|
import './components/dialog/UDialog.js';
|
|
5
4
|
import './components/divider/UDivider.js';
|
|
6
5
|
import './components/drawer/UDrawer.js';
|
|
@@ -23,7 +22,6 @@ export { notifier } from './utilities/notifier.js';
|
|
|
23
22
|
export { theme } from './utilities/theme.js';
|
|
24
23
|
export { UAlert } from './components/alert/UAlert.component.js';
|
|
25
24
|
export { UButton } from './components/button/UButton.component.js';
|
|
26
|
-
export { UCopyButton } from './components/copy-button/UCopyButton.component.js';
|
|
27
25
|
export { UDialog } from './components/dialog/UDialog.component.js';
|
|
28
26
|
export { UDivider } from './components/divider/UDivider.component.js';
|
|
29
27
|
export { UDrawer } from './components/drawer/UDrawer.component.js';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { UAlert } from '../components/alert/UAlert';
|
|
3
|
+
|
|
4
|
+
export declare const UAlert: React.ForwardRefExoticComponent<
|
|
5
|
+
Partial<UAlert> & React.HTMLAttributes<UAlert>
|
|
6
|
+
>;
|
|
7
|
+
|
|
8
|
+
export type UAlertProps = React.ComponentProps<typeof UAlert>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { UButton } from '../components/button/UButton';
|
|
3
|
+
|
|
4
|
+
export declare const UButton: React.ForwardRefExoticComponent<
|
|
5
|
+
Partial<UButton> & React.HTMLAttributes<UButton>
|
|
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 { UButton } from '../components/button/UButton';
|
|
4
|
+
|
|
5
|
+
export const UButton = createComponent({
|
|
6
|
+
react: React,
|
|
7
|
+
tagName: 'u-button',
|
|
8
|
+
elementClass: UButton,
|
|
9
|
+
events: {}
|
|
10
|
+
});
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { UDialog } from '../components/dialog/UDialog';
|
|
3
|
+
|
|
4
|
+
export declare const UDialog: React.ForwardRefExoticComponent<
|
|
5
|
+
Partial<UDialog> & React.HTMLAttributes<UDialog>
|
|
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 { UDialog } from '../components/dialog/UDialog';
|
|
4
|
+
|
|
5
|
+
export const UDialog = createComponent({
|
|
6
|
+
react: React,
|
|
7
|
+
tagName: 'u-dialog',
|
|
8
|
+
elementClass: UDialog,
|
|
9
|
+
events: {}
|
|
10
|
+
});
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { UDivider } from '../components/divider/UDivider';
|
|
3
|
+
|
|
4
|
+
export declare const UDivider: React.ForwardRefExoticComponent<
|
|
5
|
+
Partial<UDivider> & React.HTMLAttributes<UDivider>
|
|
6
|
+
>;
|
|
7
|
+
|
|
8
|
+
export type UDividerProps = React.ComponentProps<typeof UDivider>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { createComponent } from '@lit/react';
|
|
3
|
+
import { UDivider } from '../components/divider/UDivider';
|
|
4
|
+
|
|
5
|
+
export const UDivider = createComponent({
|
|
6
|
+
react: React,
|
|
7
|
+
tagName: 'u-divider',
|
|
8
|
+
elementClass: UDivider,
|
|
9
|
+
events: {}
|
|
10
|
+
});
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { UDrawer } from '../components/drawer/UDrawer';
|
|
3
|
+
|
|
4
|
+
export declare const UDrawer: React.ForwardRefExoticComponent<
|
|
5
|
+
Partial<UDrawer> & React.HTMLAttributes<UDrawer>
|
|
6
|
+
>;
|
|
7
|
+
|
|
8
|
+
export type UDrawerProps = React.ComponentProps<typeof UDrawer>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { createComponent } from '@lit/react';
|
|
3
|
+
import { UDrawer } from '../components/drawer/UDrawer';
|
|
4
|
+
|
|
5
|
+
export const UDrawer = createComponent({
|
|
6
|
+
react: React,
|
|
7
|
+
tagName: 'u-drawer',
|
|
8
|
+
elementClass: UDrawer,
|
|
9
|
+
events: {}
|
|
10
|
+
});
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { UIconButton } from '../components/icon-button/UIconButton';
|
|
3
|
+
|
|
4
|
+
export declare const UIconButton: React.ForwardRefExoticComponent<
|
|
5
|
+
Partial<UIconButton> & React.HTMLAttributes<UIconButton>
|
|
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 { UIconButton } from '../components/icon-button/UIconButton';
|
|
4
|
+
|
|
5
|
+
export const UIconButton = createComponent({
|
|
6
|
+
react: React,
|
|
7
|
+
tagName: 'u-icon-button',
|
|
8
|
+
elementClass: UIconButton,
|
|
9
|
+
events: {}
|
|
10
|
+
});
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { UInput } from '../components/input/UInput';
|
|
3
|
+
|
|
4
|
+
export declare const UInput: React.ForwardRefExoticComponent<
|
|
5
|
+
Partial<UInput> & React.HTMLAttributes<UInput>
|
|
6
|
+
>;
|
|
7
|
+
|
|
8
|
+
export type UInputProps = React.ComponentProps<typeof UInput>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { UMenuItem } from '../components/menu-item/UMenuItem';
|
|
3
|
+
|
|
4
|
+
export declare const UMenuItem: React.ForwardRefExoticComponent<
|
|
5
|
+
Partial<UMenuItem> & React.HTMLAttributes<UMenuItem>
|
|
6
|
+
>;
|
|
7
|
+
|
|
8
|
+
export type UMenuItemProps = React.ComponentProps<typeof UMenuItem>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { createComponent } from '@lit/react';
|
|
3
|
+
import { UMenuItem } from '../components/menu-item/UMenuItem';
|
|
4
|
+
|
|
5
|
+
export const UMenuItem = createComponent({
|
|
6
|
+
react: React,
|
|
7
|
+
tagName: 'u-menu-item',
|
|
8
|
+
elementClass: UMenuItem,
|
|
9
|
+
events: {}
|
|
10
|
+
});
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { UProgressBar } from '../components/progress-bar/UProgressBar';
|
|
3
|
+
|
|
4
|
+
export declare const UProgressBar: React.ForwardRefExoticComponent<
|
|
5
|
+
Partial<UProgressBar> & React.HTMLAttributes<UProgressBar>
|
|
6
|
+
>;
|
|
7
|
+
|
|
8
|
+
export type UProgressBarProps = React.ComponentProps<typeof UProgressBar>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { createComponent } from '@lit/react';
|
|
3
|
+
import { UProgressBar } from '../components/progress-bar/UProgressBar';
|
|
4
|
+
|
|
5
|
+
export const UProgressBar = createComponent({
|
|
6
|
+
react: React,
|
|
7
|
+
tagName: 'u-progress-bar',
|
|
8
|
+
elementClass: UProgressBar,
|
|
9
|
+
events: {}
|
|
10
|
+
});
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { UProgressRing } from '../components/progress-ring/UProgressRing';
|
|
3
|
+
|
|
4
|
+
export declare const UProgressRing: React.ForwardRefExoticComponent<
|
|
5
|
+
Partial<UProgressRing> & React.HTMLAttributes<UProgressRing>
|
|
6
|
+
>;
|
|
7
|
+
|
|
8
|
+
export type UProgressRingProps = React.ComponentProps<typeof UProgressRing>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { createComponent } from '@lit/react';
|
|
3
|
+
import { UProgressRing } from '../components/progress-ring/UProgressRing';
|
|
4
|
+
|
|
5
|
+
export const UProgressRing = createComponent({
|
|
6
|
+
react: React,
|
|
7
|
+
tagName: 'u-progress-ring',
|
|
8
|
+
elementClass: UProgressRing,
|
|
9
|
+
events: {}
|
|
10
|
+
});
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { USkeleton } from '../components/skeleton/USkeleton';
|
|
3
|
+
|
|
4
|
+
export declare const USkeleton: React.ForwardRefExoticComponent<
|
|
5
|
+
Partial<USkeleton> & React.HTMLAttributes<USkeleton>
|
|
6
|
+
>;
|
|
7
|
+
|
|
8
|
+
export type USkeletonProps = React.ComponentProps<typeof USkeleton>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { createComponent } from '@lit/react';
|
|
3
|
+
import { USkeleton } from '../components/skeleton/USkeleton';
|
|
4
|
+
|
|
5
|
+
export const USkeleton = createComponent({
|
|
6
|
+
react: React,
|
|
7
|
+
tagName: 'u-skeleton',
|
|
8
|
+
elementClass: USkeleton,
|
|
9
|
+
events: {}
|
|
10
|
+
});
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { USpinner } from '../components/spinner/USpinner';
|
|
3
|
+
|
|
4
|
+
export declare const USpinner: React.ForwardRefExoticComponent<
|
|
5
|
+
Partial<USpinner> & React.HTMLAttributes<USpinner>
|
|
6
|
+
>;
|
|
7
|
+
|
|
8
|
+
export type USpinnerProps = React.ComponentProps<typeof USpinner>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { createComponent } from '@lit/react';
|
|
3
|
+
import { USpinner } from '../components/spinner/USpinner';
|
|
4
|
+
|
|
5
|
+
export const USpinner = createComponent({
|
|
6
|
+
react: React,
|
|
7
|
+
tagName: 'u-spinner',
|
|
8
|
+
elementClass: USpinner,
|
|
9
|
+
events: {}
|
|
10
|
+
});
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { USplitPanel } from '../components/split-panel/USplitPanel';
|
|
3
|
+
|
|
4
|
+
export declare const USplitPanel: React.ForwardRefExoticComponent<
|
|
5
|
+
Partial<USplitPanel> & React.HTMLAttributes<USplitPanel>
|
|
6
|
+
>;
|
|
7
|
+
|
|
8
|
+
export type USplitPanelProps = React.ComponentProps<typeof USplitPanel>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { createComponent } from '@lit/react';
|
|
3
|
+
import { USplitPanel } from '../components/split-panel/USplitPanel';
|
|
4
|
+
|
|
5
|
+
export const USplitPanel = createComponent({
|
|
6
|
+
react: React,
|
|
7
|
+
tagName: 'u-split-panel',
|
|
8
|
+
elementClass: USplitPanel,
|
|
9
|
+
events: {}
|
|
10
|
+
});
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { UTooltip } from '../components/tooltip/UTooltip';
|
|
3
|
+
|
|
4
|
+
export declare const UTooltip: React.ForwardRefExoticComponent<
|
|
5
|
+
Partial<UTooltip> & React.HTMLAttributes<UTooltip>
|
|
6
|
+
>;
|
|
7
|
+
|
|
8
|
+
export type UTooltipProps = React.ComponentProps<typeof UTooltip>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { createComponent } from '@lit/react';
|
|
3
|
+
import { UTooltip } from '../components/tooltip/UTooltip';
|
|
4
|
+
|
|
5
|
+
export const UTooltip = createComponent({
|
|
6
|
+
react: React,
|
|
7
|
+
tagName: 'u-tooltip',
|
|
8
|
+
elementClass: UTooltip,
|
|
9
|
+
events: {}
|
|
10
|
+
});
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { UTreeItem } from '../components/tree-item/UTreeItem';
|
|
3
|
+
|
|
4
|
+
export declare const UTreeItem: React.ForwardRefExoticComponent<
|
|
5
|
+
Partial<UTreeItem> & React.HTMLAttributes<UTreeItem>
|
|
6
|
+
>;
|
|
7
|
+
|
|
8
|
+
export type UTreeItemProps = React.ComponentProps<typeof UTreeItem>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { createComponent } from '@lit/react';
|
|
3
|
+
import { UTreeItem } from '../components/tree-item/UTreeItem';
|
|
4
|
+
|
|
5
|
+
export const UTreeItem = createComponent({
|
|
6
|
+
react: React,
|
|
7
|
+
tagName: 'u-tree-item',
|
|
8
|
+
elementClass: UTreeItem,
|
|
9
|
+
events: {}
|
|
10
|
+
});
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* React wrapper components for @iyulab/components
|
|
3
|
+
*
|
|
4
|
+
* This file is automatically generated.
|
|
5
|
+
* Each component is prefixed with 'U' (e.g., UButton, UInput, etc.)
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
export { UAlert, UAlertProps } from './UAlert';
|
|
9
|
+
export { UButton, UButtonProps } from './UButton';
|
|
10
|
+
export { UDialog, UDialogProps } from './UDialog';
|
|
11
|
+
export { UDivider, UDividerProps } from './UDivider';
|
|
12
|
+
export { UDrawer, UDrawerProps } from './UDrawer';
|
|
13
|
+
export { UForm, UFormProps } from './UForm';
|
|
14
|
+
export { UIcon, UIconProps } from './UIcon';
|
|
15
|
+
export { UIconButton, UIconButtonProps } from './UIconButton';
|
|
16
|
+
export { UInput, UInputProps } from './UInput';
|
|
17
|
+
export { UMenu, UMenuProps } from './UMenu';
|
|
18
|
+
export { UMenuItem, UMenuItemProps } from './UMenuItem';
|
|
19
|
+
export { UProgressBar, UProgressBarProps } from './UProgressBar';
|
|
20
|
+
export { UProgressRing, UProgressRingProps } from './UProgressRing';
|
|
21
|
+
export { USkeleton, USkeletonProps } from './USkeleton';
|
|
22
|
+
export { USpinner, USpinnerProps } from './USpinner';
|
|
23
|
+
export { USplitPanel, USplitPanelProps } from './USplitPanel';
|
|
24
|
+
export { UTooltip, UTooltipProps } from './UTooltip';
|
|
25
|
+
export { UTree, UTreeProps } from './UTree';
|
|
26
|
+
export { UTreeItem, UTreeItemProps } from './UTreeItem';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export { UAlert } from './UAlert.js';
|
|
2
|
+
export { UButton } from './UButton.js';
|
|
3
|
+
export { UDialog } from './UDialog.js';
|
|
4
|
+
export { UDivider } from './UDivider.js';
|
|
5
|
+
export { UDrawer } from './UDrawer.js';
|
|
6
|
+
export { UForm } from './UForm.js';
|
|
7
|
+
export { UIcon } from './UIcon.js';
|
|
8
|
+
export { UIconButton } from './UIconButton.js';
|
|
9
|
+
export { UInput } from './UInput.js';
|
|
10
|
+
export { UMenu } from './UMenu.js';
|
|
11
|
+
export { UMenuItem } from './UMenuItem.js';
|
|
12
|
+
export { UProgressBar } from './UProgressBar.js';
|
|
13
|
+
export { UProgressRing } from './UProgressRing.js';
|
|
14
|
+
export { USkeleton } from './USkeleton.js';
|
|
15
|
+
export { USpinner } from './USpinner.js';
|
|
16
|
+
export { USplitPanel } from './USplitPanel.js';
|
|
17
|
+
export { UTooltip } from './UTooltip.js';
|
|
18
|
+
export { UTree } from './UTree.js';
|
|
19
|
+
export { UTreeItem } from './UTreeItem.js';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@iyulab/components",
|
|
3
3
|
"description": "web-components library based on lit-element made by iyulab",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.9",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"iyulab",
|
|
7
7
|
"components",
|
|
@@ -46,14 +46,14 @@
|
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@lit/react": "^1.0.8",
|
|
49
|
-
"@eslint/js": "^9.39.
|
|
50
|
-
"@types/node": "^25.0.
|
|
51
|
-
"eslint": "^9.39.
|
|
49
|
+
"@eslint/js": "^9.39.2",
|
|
50
|
+
"@types/node": "^25.0.3",
|
|
51
|
+
"eslint": "^9.39.2",
|
|
52
52
|
"eslint-plugin-lit": "^2.1.1",
|
|
53
53
|
"globals": "^16.5.0",
|
|
54
54
|
"typescript": "^5.9.3",
|
|
55
|
-
"typescript-eslint": "^8.
|
|
56
|
-
"vite": "^7.
|
|
55
|
+
"typescript-eslint": "^8.50.0",
|
|
56
|
+
"vite": "^7.3.0",
|
|
57
57
|
"vite-plugin-dts": "^4.5.4",
|
|
58
58
|
"vite-plugin-static-copy": "^3.1.4"
|
|
59
59
|
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { BaseElement } from '../BaseElement.js';
|
|
2
|
-
/**
|
|
3
|
-
* ๋ณต์ฌ ๋ฒํผ ์ปดํฌ๋ํธ์
๋๋ค.
|
|
4
|
-
*/
|
|
5
|
-
export declare class UCopyButton extends BaseElement {
|
|
6
|
-
static styles: import('lit').CSSResultGroup[];
|
|
7
|
-
static dependencies: Record<string, typeof BaseElement>;
|
|
8
|
-
/** ๋ฒํผ์ ๋ณต์ฌ ์ํ๋ฅผ ์ค์ ํฉ๋๋ค. ๋ณต์ฌ๊ฐ ์๋ฃ๋๋ฉด true๋ก ๋ณ๊ฒฝ๋ฉ๋๋ค. */
|
|
9
|
-
copied: boolean;
|
|
10
|
-
/** ๋ฒํผ์ ํ
๋๋ฆฌ ์ ๋ฌด๋ฅผ ์ค์ ํฉ๋๋ค. ๊ธฐ๋ณธ๊ฐ์ false์
๋๋ค. */
|
|
11
|
-
borderless: boolean;
|
|
12
|
-
/** ๋ฒํผ์ด ๋นํ์ฑํ ์ํ์ธ์ง ์ฌ๋ถ๋ฅผ ์ค์ ํฉ๋๋ค. ๋นํ์ฑํ๋ ๋ฒํผ์ ํด๋ฆญํ ์ ์์ต๋๋ค. */
|
|
13
|
-
disabled: boolean;
|
|
14
|
-
/** ๋ณต์ฌํ ํ
์คํธ๋ฅผ ์ค์ ํฉ๋๋ค. */
|
|
15
|
-
value: string;
|
|
16
|
-
render(): import('lit-html').TemplateResult<1>;
|
|
17
|
-
/** ๋ณต์ฌ ๋ฒํผ ํด๋ฆญ ํธ๋ค๋ฌ */
|
|
18
|
-
private handleButtonClick;
|
|
19
|
-
}
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import { html } from 'lit';
|
|
2
|
-
import { state, property } from 'lit/decorators.js';
|
|
3
|
-
import { BaseElement } from '../BaseElement.js';
|
|
4
|
-
import { UIconButton } from '../icon-button/UIconButton.component.js';
|
|
5
|
-
import { styles } from './UCopyButton.styles.js';
|
|
6
|
-
|
|
7
|
-
var __defProp = Object.defineProperty;
|
|
8
|
-
var __decorateClass = (decorators, target, key, kind) => {
|
|
9
|
-
var result = void 0 ;
|
|
10
|
-
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
11
|
-
if (decorator = decorators[i])
|
|
12
|
-
result = (decorator(target, key, result) ) || result;
|
|
13
|
-
if (result) __defProp(target, key, result);
|
|
14
|
-
return result;
|
|
15
|
-
};
|
|
16
|
-
class UCopyButton extends BaseElement {
|
|
17
|
-
constructor() {
|
|
18
|
-
super(...arguments);
|
|
19
|
-
this.copied = false;
|
|
20
|
-
this.borderless = false;
|
|
21
|
-
this.disabled = false;
|
|
22
|
-
this.value = "";
|
|
23
|
-
/** ๋ณต์ฌ ๋ฒํผ ํด๋ฆญ ํธ๋ค๋ฌ */
|
|
24
|
-
this.handleButtonClick = async () => {
|
|
25
|
-
try {
|
|
26
|
-
await navigator.clipboard.writeText(this.value);
|
|
27
|
-
this.copied = true;
|
|
28
|
-
this.emit("u-copy", { value: this.value });
|
|
29
|
-
setTimeout(() => this.copied = false, 2e3);
|
|
30
|
-
} catch (error) {
|
|
31
|
-
console.error("Failed to copy text: ", error);
|
|
32
|
-
}
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
static {
|
|
36
|
-
this.styles = [super.styles, styles];
|
|
37
|
-
}
|
|
38
|
-
static {
|
|
39
|
-
this.dependencies = {
|
|
40
|
-
"u-icon-button": UIconButton
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
render() {
|
|
44
|
-
return html`
|
|
45
|
-
<u-icon-button part="base"
|
|
46
|
-
?copied=${this.copied}
|
|
47
|
-
.borderless=${this.borderless}
|
|
48
|
-
.disabled=${this.disabled || this.copied}
|
|
49
|
-
.lib=${"internal"}
|
|
50
|
-
.name=${this.copied ? "check-lg" : "copy"}
|
|
51
|
-
@click=${this.handleButtonClick}>
|
|
52
|
-
</u-icon-button>
|
|
53
|
-
`;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
__decorateClass([
|
|
57
|
-
state()
|
|
58
|
-
], UCopyButton.prototype, "copied");
|
|
59
|
-
__decorateClass([
|
|
60
|
-
property({ type: Boolean })
|
|
61
|
-
], UCopyButton.prototype, "borderless");
|
|
62
|
-
__decorateClass([
|
|
63
|
-
property({ type: Boolean })
|
|
64
|
-
], UCopyButton.prototype, "disabled");
|
|
65
|
-
__decorateClass([
|
|
66
|
-
property({ type: String })
|
|
67
|
-
], UCopyButton.prototype, "value");
|
|
68
|
-
|
|
69
|
-
export { UCopyButton };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const styles: import('lit').CSSResult;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { css } from 'lit';
|
|
2
|
-
|
|
3
|
-
const styles = css`
|
|
4
|
-
:host {
|
|
5
|
-
display: inline-block;
|
|
6
|
-
font-size: 16px;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
u-icon-button {
|
|
10
|
-
font-size: inherit;
|
|
11
|
-
}
|
|
12
|
-
u-icon-button[copied] {
|
|
13
|
-
color: var(--u-green-600, #16a34a);
|
|
14
|
-
}
|
|
15
|
-
`;
|
|
16
|
-
|
|
17
|
-
export { styles };
|