@iyulab/components 0.1.2 → 0.1.4

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 (88) hide show
  1. package/CHANGELOG.md +18 -11
  2. package/LICENSE +20 -20
  3. package/README.md +33 -33
  4. package/dist/assets/icons/arrow-clockwise.svg.js +1 -1
  5. package/dist/assets/icons/arrow-down.svg.js +1 -1
  6. package/dist/assets/icons/arrow-up.svg.js +1 -1
  7. package/dist/assets/icons/ban.svg.js +1 -1
  8. package/dist/assets/icons/check-circle-fill.svg.js +1 -1
  9. package/dist/assets/icons/check-lg.svg.js +1 -1
  10. package/dist/assets/icons/chevron-down.svg.js +1 -1
  11. package/dist/assets/icons/chevron-left.svg.js +1 -1
  12. package/dist/assets/icons/chevron-right.svg.js +1 -1
  13. package/dist/assets/icons/chevron-up.svg.js +1 -1
  14. package/dist/assets/icons/copy.svg.js +1 -1
  15. package/dist/assets/icons/dash-lg.svg.js +1 -1
  16. package/dist/assets/icons/exclamation-circle-fill.svg.js +1 -1
  17. package/dist/assets/icons/exclamation-triangle-fill.svg.js +1 -1
  18. package/dist/assets/icons/info-circle-fill.svg.js +1 -1
  19. package/dist/assets/icons/layout-sidebar.svg.js +1 -1
  20. package/dist/assets/icons/lightbulb-fill.svg.js +1 -1
  21. package/dist/assets/icons/lightbulb-off.svg.js +1 -1
  22. package/dist/assets/icons/lightbulb.svg.js +1 -1
  23. package/dist/assets/icons/mic-fill.svg.js +1 -1
  24. package/dist/assets/icons/mic-mute-fill.svg.js +1 -1
  25. package/dist/assets/icons/paperclip.svg.js +1 -1
  26. package/dist/assets/icons/pencil-square.svg.js +1 -1
  27. package/dist/assets/icons/plus-lg.svg.js +1 -1
  28. package/dist/assets/icons/search.svg.js +1 -1
  29. package/dist/assets/icons/speedometer.svg.js +1 -1
  30. package/dist/assets/icons/x-lg.svg.js +1 -1
  31. package/dist/assets/styles/dark.css +125 -125
  32. package/dist/assets/styles/dark.css.js +1 -1
  33. package/dist/assets/styles/light.css +126 -126
  34. package/dist/assets/styles/light.css.js +1 -1
  35. package/dist/components/BaseElement.styles.js +0 -1
  36. package/dist/components/divider/Divider.d.ts +25 -0
  37. package/dist/components/divider/Divider.js +89 -0
  38. package/dist/components/{split-panel/Splitter.styles.js → divider/Divider.styles.js} +20 -10
  39. package/dist/components/divider/index.d.ts +7 -0
  40. package/dist/components/icon/Icon.d.ts +3 -7
  41. package/dist/components/icon/Icon.js +8 -15
  42. package/dist/components/index.d.ts +4 -0
  43. package/dist/components/panel/Panel.d.ts +0 -1
  44. package/dist/components/panel/Panel.js +0 -4
  45. package/dist/components/progress-bar/ProgressBar.d.ts +27 -0
  46. package/dist/components/progress-bar/ProgressBar.js +99 -0
  47. package/dist/components/progress-bar/ProgressBar.styles.d.ts +1 -0
  48. package/dist/components/progress-bar/ProgressBar.styles.js +73 -0
  49. package/dist/components/progress-bar/index.d.ts +7 -0
  50. package/dist/components/progress-ring/ProgressRing.d.ts +3 -1
  51. package/dist/components/progress-ring/ProgressRing.js +18 -15
  52. package/dist/components/split-panel/SplitPanel.d.ts +8 -12
  53. package/dist/components/split-panel/SplitPanel.js +63 -88
  54. package/dist/components/split-panel/SplitPanel.styles.js +16 -1
  55. package/dist/components/tooltip/Tooltip.d.ts +8 -12
  56. package/dist/components/tooltip/Tooltip.js +39 -38
  57. package/dist/components/tooltip/Tooltip.styles.js +4 -4
  58. package/dist/components/tree/Tree.d.ts +37 -0
  59. package/dist/components/tree/Tree.js +131 -0
  60. package/dist/components/tree/Tree.styles.d.ts +1 -0
  61. package/dist/components/tree/Tree.styles.js +26 -0
  62. package/dist/components/tree/index.d.ts +3 -0
  63. package/dist/components/tree-item/TreeItem.d.ts +33 -0
  64. package/dist/components/tree-item/TreeItem.js +131 -0
  65. package/dist/components/tree-item/TreeItem.styles.d.ts +1 -0
  66. package/dist/components/tree-item/TreeItem.styles.js +66 -0
  67. package/dist/components/tree-item/index.d.ts +3 -0
  68. package/dist/index.js +4 -0
  69. package/dist/integrations/react/UDivider.d.ts +8 -0
  70. package/dist/integrations/react/UDivider.js +10 -0
  71. package/dist/integrations/react/UProgressBar.d.ts +8 -0
  72. package/dist/integrations/react/UProgressBar.js +10 -0
  73. package/dist/integrations/react/UTree.d.ts +8 -0
  74. package/dist/integrations/react/UTree.js +10 -0
  75. package/dist/integrations/react/UTreeItem.d.ts +8 -0
  76. package/dist/integrations/react/UTreeItem.js +10 -0
  77. package/dist/integrations/react/index.d.ts +4 -0
  78. package/dist/integrations/react/index.js +4 -0
  79. package/dist/internals/icon-helpers.d.ts +32 -0
  80. package/dist/internals/{icons.js → icon-helpers.js} +10 -4
  81. package/dist/internals/index.d.ts +1 -1
  82. package/dist/utilities/theme.js +18 -15
  83. package/package.json +57 -57
  84. package/dist/components/split-panel/SplitPanel.types.d.ts +0 -2
  85. package/dist/components/split-panel/Splitter.d.ts +0 -17
  86. package/dist/components/split-panel/Splitter.js +0 -45
  87. package/dist/internals/icons.d.ts +0 -6
  88. /package/dist/components/{split-panel/Splitter.styles.d.ts → divider/Divider.styles.d.ts} +0 -0
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { Tree } from '../../components/tree/index';
3
+
4
+ export declare const UTree: React.ForwardRefExoticComponent<
5
+ Partial<Tree> & React.HTMLAttributes<Tree>
6
+ >;
7
+
8
+ export type UTreeProps = React.ComponentProps<typeof UTree>;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import { createComponent } from '@lit/react';
3
+ import { Tree } from '../../components/tree/index';
4
+
5
+ export const UTree = createComponent({
6
+ react: React,
7
+ tagName: 'u-tree',
8
+ elementClass: Tree,
9
+ events: {}
10
+ });
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { TreeItem } from '../../components/tree-item/index';
3
+
4
+ export declare const UTreeItem: React.ForwardRefExoticComponent<
5
+ Partial<TreeItem> & React.HTMLAttributes<TreeItem>
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 { TreeItem } from '../../components/tree-item/index';
4
+
5
+ export const UTreeItem = createComponent({
6
+ react: React,
7
+ tagName: 'u-tree-item',
8
+ elementClass: TreeItem,
9
+ events: {}
10
+ });
@@ -10,6 +10,7 @@ export { UButton, UButtonProps } from './UButton';
10
10
  export { UContextMenu, UContextMenuProps } from './UContextMenu';
11
11
  export { UCopyButton, UCopyButtonProps } from './UCopyButton';
12
12
  export { UDialog, UDialogProps } from './UDialog';
13
+ export { UDivider, UDividerProps } from './UDivider';
13
14
  export { UForm, UFormProps } from './UForm';
14
15
  export { UIcon, UIconProps } from './UIcon';
15
16
  export { UIconButton, UIconButtonProps } from './UIconButton';
@@ -17,7 +18,10 @@ export { UInput, UInputProps } from './UInput';
17
18
  export { UMenu, UMenuProps } from './UMenu';
18
19
  export { UMenuItem, UMenuItemProps } from './UMenuItem';
19
20
  export { UPanel, UPanelProps } from './UPanel';
21
+ export { UProgressBar, UProgressBarProps } from './UProgressBar';
20
22
  export { UProgressRing, UProgressRingProps } from './UProgressRing';
21
23
  export { USpinner, USpinnerProps } from './USpinner';
22
24
  export { USplitPanel, USplitPanelProps } from './USplitPanel';
23
25
  export { UTooltip, UTooltipProps } from './UTooltip';
26
+ export { UTree, UTreeProps } from './UTree';
27
+ export { UTreeItem, UTreeItemProps } from './UTreeItem';
@@ -3,6 +3,7 @@ export { UButton } from './UButton.js';
3
3
  export { UContextMenu } from './UContextMenu.js';
4
4
  export { UCopyButton } from './UCopyButton.js';
5
5
  export { UDialog } from './UDialog.js';
6
+ export { UDivider } from './UDivider.js';
6
7
  export { UForm } from './UForm.js';
7
8
  export { UIcon } from './UIcon.js';
8
9
  export { UIconButton } from './UIconButton.js';
@@ -10,7 +11,10 @@ export { UInput } from './UInput.js';
10
11
  export { UMenu } from './UMenu.js';
11
12
  export { UMenuItem } from './UMenuItem.js';
12
13
  export { UPanel } from './UPanel.js';
14
+ export { UProgressBar } from './UProgressBar.js';
13
15
  export { UProgressRing } from './UProgressRing.js';
14
16
  export { USpinner } from './USpinner.js';
15
17
  export { USplitPanel } from './USplitPanel.js';
16
18
  export { UTooltip } from './UTooltip.js';
19
+ export { UTree } from './UTree.js';
20
+ export { UTreeItem } from './UTreeItem.js';
@@ -0,0 +1,32 @@
1
+ /**
2
+ * 아이콘 이름과 SVG 소스를 매핑하는 레지스트리입니다.
3
+ *
4
+ * - 키: SVG 파일명에서 확장자를 제거한 문자열 (예: `close.svg` → `"close"`)
5
+ * - 값: SVG 파일의 raw 문자열 (`?raw` 옵션으로 로드됨)
6
+ *
7
+ * Vite의 `import.meta.glob`을 사용하여
8
+ * `../assets/icons/*.svg` 경로의 모든 SVG 파일을 빌드 시점에 한 번에 로드합니다.
9
+ * 이 레지스트리는 런타임 동안 불변이며, 아이콘 조회 시 재사용됩니다.
10
+ */
11
+ export declare const iconBundle: Map<string, string>;
12
+ /**
13
+ * 현재 설정된 아이콘 기본 URL을 반환합니다.
14
+ *
15
+ * 이 값은 아이콘을 정적 경로 또는 CDN 등에서 동적으로 로드할 때
16
+ * prefix로 사용됩니다.
17
+ *
18
+ * @returns 아이콘 로딩에 사용되는 기본 URL (예: `/assets/icons/`)
19
+ */
20
+ export declare function getBaseUrl(): string;
21
+ /**
22
+ * 아이콘을 외부에서 로드할 때 사용할 기본 URL을 설정합니다.
23
+ *
24
+ * 예:
25
+ * - `/assets/icons/`
26
+ * - `https://cdn.example.com/icons/`
27
+ *
28
+ * 일반적으로 마지막에 슬래시(`/`)가 포함된 형태를 권장합니다.
29
+ *
30
+ * @param url 아이콘이 배포된 기본 경로
31
+ */
32
+ export declare function setBaseUrl(url: string): void;
@@ -29,14 +29,20 @@ import * as search from '../assets/icons/search.svg.js';
29
29
  import * as speedometer from '../assets/icons/speedometer.svg.js';
30
30
  import * as xLg from '../assets/icons/x-lg.svg.js';
31
31
 
32
- const icons = new Map(
33
- Object.entries(/* #__PURE__ */ Object.assign({"../assets/icons/arrow-clockwise.svg": arrowClockwise,"../assets/icons/arrow-down.svg": arrowDown,"../assets/icons/arrow-up.svg": arrowUp,"../assets/icons/ban.svg": ban,"../assets/icons/bell-fill.svg": bellFill,"../assets/icons/check-circle-fill.svg": checkCircleFill,"../assets/icons/check-lg.svg": checkLg,"../assets/icons/chevron-down.svg": chevronDown,"../assets/icons/chevron-left.svg": chevronLeft,"../assets/icons/chevron-right.svg": chevronRight,"../assets/icons/chevron-up.svg": chevronUp,"../assets/icons/copy.svg": copy,"../assets/icons/dash-lg.svg": dashLg,"../assets/icons/exclamation-circle-fill.svg": exclamationCircleFill,"../assets/icons/exclamation-triangle-fill.svg": exclamationTriangleFill,"../assets/icons/eye-slash.svg": eyeSlash,"../assets/icons/eye.svg": eye,"../assets/icons/info-circle-fill.svg": infoCircleFill,"../assets/icons/layout-sidebar.svg": layoutSidebar,"../assets/icons/lightbulb-fill.svg": lightbulbFill,"../assets/icons/lightbulb-off.svg": lightbulbOff,"../assets/icons/lightbulb.svg": lightbulb,"../assets/icons/mic-fill.svg": micFill,"../assets/icons/mic-mute-fill.svg": micMuteFill,"../assets/icons/paperclip.svg": paperclip,"../assets/icons/pencil-square.svg": pencilSquare,"../assets/icons/plus-lg.svg": plusLg,"../assets/icons/search.svg": search,"../assets/icons/speedometer.svg": speedometer,"../assets/icons/x-lg.svg": xLg
32
+ let iconBaseUrl = "/assets/icons/";
33
+ const iconBundle = new Map(
34
+ Object.entries(
35
+ /* #__PURE__ */ Object.assign({"../assets/icons/arrow-clockwise.svg": arrowClockwise,"../assets/icons/arrow-down.svg": arrowDown,"../assets/icons/arrow-up.svg": arrowUp,"../assets/icons/ban.svg": ban,"../assets/icons/bell-fill.svg": bellFill,"../assets/icons/check-circle-fill.svg": checkCircleFill,"../assets/icons/check-lg.svg": checkLg,"../assets/icons/chevron-down.svg": chevronDown,"../assets/icons/chevron-left.svg": chevronLeft,"../assets/icons/chevron-right.svg": chevronRight,"../assets/icons/chevron-up.svg": chevronUp,"../assets/icons/copy.svg": copy,"../assets/icons/dash-lg.svg": dashLg,"../assets/icons/exclamation-circle-fill.svg": exclamationCircleFill,"../assets/icons/exclamation-triangle-fill.svg": exclamationTriangleFill,"../assets/icons/eye-slash.svg": eyeSlash,"../assets/icons/eye.svg": eye,"../assets/icons/info-circle-fill.svg": infoCircleFill,"../assets/icons/layout-sidebar.svg": layoutSidebar,"../assets/icons/lightbulb-fill.svg": lightbulbFill,"../assets/icons/lightbulb-off.svg": lightbulbOff,"../assets/icons/lightbulb.svg": lightbulb,"../assets/icons/mic-fill.svg": micFill,"../assets/icons/mic-mute-fill.svg": micMuteFill,"../assets/icons/paperclip.svg": paperclip,"../assets/icons/pencil-square.svg": pencilSquare,"../assets/icons/plus-lg.svg": plusLg,"../assets/icons/search.svg": search,"../assets/icons/speedometer.svg": speedometer,"../assets/icons/x-lg.svg": xLg
34
36
 
35
37
 
36
- })).map(([path, module]) => {
38
+ })
39
+ ).map(([path, module]) => {
37
40
  const name = path.split("/").pop()?.replace(".svg", "") || "";
38
41
  return [name, module.default];
39
42
  }).filter(([name]) => name !== "")
40
43
  );
44
+ function getBaseUrl() {
45
+ return iconBaseUrl;
46
+ }
41
47
 
42
- export { icons };
48
+ export { getBaseUrl, iconBundle };
@@ -1,4 +1,4 @@
1
1
  export * from './attribute-converters.js';
2
- export * from './icons.js';
2
+ export * from './icon-helpers.js';
3
3
  export * from './node-helpers.js';
4
4
  export * from './react-wrapper.js';
@@ -2,6 +2,13 @@ import * as dark from '../assets/styles/dark.css.js';
2
2
  import * as light from '../assets/styles/light.css.js';
3
3
  import { BrowserStorage } from './BrowserStorage.js';
4
4
 
5
+ const styleAssets = Object.entries(/* #__PURE__ */ Object.assign({"../assets/styles/dark.css": dark,"../assets/styles/light.css": light
6
+
7
+
8
+ })).map(([path, module]) => {
9
+ const name = path.split("/").pop()?.replace(".css", "") || "";
10
+ return [name, module.default];
11
+ }).filter(([name]) => name !== "");
5
12
  class Theme {
6
13
  /** private 생성자 — 외부에서 new Theme()를 할 수 없게 함 */
7
14
  constructor() {
@@ -40,33 +47,29 @@ class Theme {
40
47
  this.log("store option provided, initializing BrowserStorage");
41
48
  this.storage = new BrowserStorage(options.store);
42
49
  }
43
- options?.useBuiltIn || true;
44
- {
50
+ const useBuiltIn = options?.useBuiltIn ?? true;
51
+ if (useBuiltIn) {
45
52
  this.log("Import enabled: loading styles via internal assets");
46
- const assets = Object.entries(/* #__PURE__ */ Object.assign({"../assets/styles/dark.css": dark,"../assets/styles/light.css": light
47
-
48
-
49
- }));
50
- this.log(`found ${assets.length} style assets`, assets.map((a) => a[0]));
51
- for (let [path, module] of assets) {
52
- const fileName = path.split("/").pop() || path;
53
+ for (let [name, module] of styleAssets) {
53
54
  const style = document.createElement("style");
54
- style.setAttribute("data-path", fileName);
55
- style.textContent = module.default;
56
- if (document.head.querySelector(`style[data-path="${fileName}"]`)) {
57
- this.log("style already present, skipping", fileName);
55
+ style.setAttribute("data-path", name);
56
+ style.textContent = module;
57
+ if (document.head.querySelector(`style[data-path="${name}"]`)) {
58
+ this.log("style already present, skipping", name);
58
59
  continue;
59
60
  }
60
61
  document.head.appendChild(style);
61
- this.log("appended style to head", fileName);
62
+ this.log("appended style to head", name);
62
63
  }
63
64
  }
64
- let theme2 = options?.default || "system";
65
+ let theme2 = options?.default ?? "system";
65
66
  if (this.storage !== null) {
66
67
  const savedTheme = await this.storage.get(this.STORAGE_KEY_DEFAULT);
67
68
  if (savedTheme) {
68
69
  theme2 = savedTheme;
69
70
  this.log("loaded theme from storage", theme2);
71
+ } else {
72
+ this.log("no saved theme in storage, using default", theme2);
70
73
  }
71
74
  }
72
75
  this.set(theme2);
package/package.json CHANGED
@@ -1,58 +1,58 @@
1
- {
2
- "name": "@iyulab/components",
3
- "description": "web-components library by iyulab based on lit-element",
4
- "version": "0.1.2",
5
- "keywords": [
6
- "iyulab",
7
- "web-components",
8
- "lit-element"
9
- ],
10
- "license": "MIT",
11
- "author": "iyulab",
12
- "repository": {
13
- "type": "git",
14
- "url": "https://github.com/iyulab/node-components.git"
15
- },
16
- "files": [
17
- "dist",
18
- "LICENSE",
19
- "README.md",
20
- "CHANGELOG.md",
21
- "package.json"
22
- ],
23
- "type": "module",
24
- "types": "./dist/index.d.ts",
25
- "exports": {
26
- ".": {
27
- "types": "./dist/index.d.ts",
28
- "import": "./dist/index.js"
29
- },
30
- "./dist/*": {
31
- "types": "./dist/*.d.ts",
32
- "import": "./dist/*"
33
- }
34
- },
35
- "scripts": {
36
- "start": "vite --force",
37
- "build": "eslint && vite build"
38
- },
39
- "dependencies": {
40
- "@floating-ui/dom": "^1.7.4",
41
- "lit": "^3.3.1",
42
- "react": "^19.2.0",
43
- "reflect-metadata": "^0.2.2"
44
- },
45
- "devDependencies": {
46
- "@lit/react": "^1.0.8",
47
- "@eslint/js": "^9.39.1",
48
- "@types/node": "^24.10.1",
49
- "eslint": "^9.39.1",
50
- "eslint-plugin-lit": "^2.1.1",
51
- "globals": "^16.5.0",
52
- "typescript": "^5.9.3",
53
- "typescript-eslint": "^8.46.4",
54
- "vite": "^7.2.2",
55
- "vite-plugin-dts": "^4.5.4",
56
- "vite-plugin-static-copy": "^3.1.4"
57
- }
1
+ {
2
+ "name": "@iyulab/components",
3
+ "description": "web-components library by iyulab based on lit-element",
4
+ "version": "0.1.4",
5
+ "keywords": [
6
+ "iyulab",
7
+ "web-components",
8
+ "lit-element"
9
+ ],
10
+ "license": "MIT",
11
+ "author": "iyulab",
12
+ "repository": {
13
+ "type": "git",
14
+ "url": "https://github.com/iyulab/node-components.git"
15
+ },
16
+ "files": [
17
+ "dist",
18
+ "LICENSE",
19
+ "README.md",
20
+ "CHANGELOG.md",
21
+ "package.json"
22
+ ],
23
+ "type": "module",
24
+ "types": "./dist/index.d.ts",
25
+ "exports": {
26
+ ".": {
27
+ "types": "./dist/index.d.ts",
28
+ "import": "./dist/index.js"
29
+ },
30
+ "./dist/*": {
31
+ "types": "./dist/*.d.ts",
32
+ "import": "./dist/*"
33
+ }
34
+ },
35
+ "scripts": {
36
+ "start": "vite --force",
37
+ "build": "eslint && vite build"
38
+ },
39
+ "dependencies": {
40
+ "@floating-ui/dom": "^1.7.4",
41
+ "lit": "^3.3.1",
42
+ "react": "^19.2.1",
43
+ "reflect-metadata": "^0.2.2"
44
+ },
45
+ "devDependencies": {
46
+ "@lit/react": "^1.0.8",
47
+ "@eslint/js": "^9.39.1",
48
+ "@types/node": "^24.10.1",
49
+ "eslint": "^9.39.1",
50
+ "eslint-plugin-lit": "^2.1.1",
51
+ "globals": "^16.5.0",
52
+ "typescript": "^5.9.3",
53
+ "typescript-eslint": "^8.48.1",
54
+ "vite": "^7.2.6",
55
+ "vite-plugin-dts": "^4.5.4",
56
+ "vite-plugin-static-copy": "^3.1.4"
57
+ }
58
58
  }
@@ -1,2 +0,0 @@
1
- /** 분할 패널의 방향을 나타내는 타입입니다. */
2
- export type PanelOrientation = 'horizontal' | 'vertical';
@@ -1,17 +0,0 @@
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
- }
@@ -1,45 +0,0 @@
1
- import { html } from 'lit';
2
- import { state, property } from 'lit/decorators.js';
3
- import { BaseElement } from '../BaseElement.js';
4
- import { styles } from './Splitter.styles.js';
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
- };
15
- class Splitter extends BaseElement {
16
- constructor() {
17
- super(...arguments);
18
- this.dragging = false;
19
- this.orientation = "horizontal";
20
- }
21
- static {
22
- this.styles = [super.styles, styles];
23
- }
24
- static {
25
- this.dependencies = {};
26
- }
27
- render() {
28
- return html`
29
- <div class="handler" ?dragging=${this.dragging}></div>
30
- `;
31
- }
32
- /** 스플리터의 크기를 반환합니다. */
33
- get size() {
34
- const sizeStr = getComputedStyle(this).getPropertyValue("--splitter-size").trim();
35
- return parseFloat(sizeStr) || 2;
36
- }
37
- }
38
- __decorateClass([
39
- state()
40
- ], Splitter.prototype, "dragging");
41
- __decorateClass([
42
- property({ type: String, reflect: true })
43
- ], Splitter.prototype, "orientation");
44
-
45
- export { Splitter };
@@ -1,6 +0,0 @@
1
- /**
2
- * 내부적으로 사용되는 아이콘 레지스트리입니다.
3
- * SVG 아이콘 파일을 이름과 매핑하여 저장합니다.
4
- * 아이콘 파일은 '../assets/icons/' 경로에서 자동으로 로드됩니다.
5
- */
6
- export declare const icons: Map<string, string>;