@iyulab/components 0.1.0 → 0.1.2
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 +8 -0
- package/dist/assets/icons/arrow-clockwise.svg.js +3 -7
- package/dist/assets/icons/arrow-down.svg.js +3 -6
- package/dist/assets/icons/arrow-up.svg.js +3 -6
- package/dist/assets/icons/ban.svg.js +3 -6
- package/dist/assets/icons/bell-fill.svg.js +3 -6
- package/dist/assets/icons/check-circle-fill.svg.js +3 -6
- package/dist/assets/icons/check-lg.svg.js +3 -6
- package/dist/assets/icons/chevron-down.svg.js +3 -6
- package/dist/assets/icons/chevron-left.svg.js +3 -6
- package/dist/assets/icons/chevron-right.svg.js +3 -6
- package/dist/assets/icons/chevron-up.svg.js +3 -6
- package/dist/assets/icons/copy.svg.js +3 -6
- package/dist/assets/icons/dash-lg.svg.js +3 -6
- package/dist/assets/icons/exclamation-circle-fill.svg.js +3 -6
- package/dist/assets/icons/exclamation-triangle-fill.svg.js +3 -6
- package/dist/assets/icons/eye-slash.svg.js +3 -8
- package/dist/assets/icons/eye.svg.js +3 -7
- package/dist/assets/icons/info-circle-fill.svg.js +3 -6
- package/dist/assets/icons/layout-sidebar.svg.js +3 -6
- package/dist/assets/icons/lightbulb-fill.svg.js +3 -6
- package/dist/assets/icons/lightbulb-off.svg.js +3 -6
- package/dist/assets/icons/lightbulb.svg.js +3 -6
- package/dist/assets/icons/mic-fill.svg.js +3 -7
- package/dist/assets/icons/mic-mute-fill.svg.js +3 -7
- package/dist/assets/icons/paperclip.svg.js +3 -6
- package/dist/assets/icons/pencil-square.svg.js +3 -7
- package/dist/assets/icons/plus-lg.svg.js +3 -6
- package/dist/assets/icons/search.svg.js +3 -6
- package/dist/assets/icons/speedometer.svg.js +3 -7
- package/dist/assets/icons/x-lg.svg.js +3 -6
- package/dist/assets/styles/dark.css.js +3 -4
- package/dist/assets/styles/light.css.js +3 -4
- package/dist/components/BaseElement.js +32 -22
- package/dist/components/BaseElement.styles.js +5 -5
- package/dist/components/alert/Alert.js +79 -51
- package/dist/components/alert/Alert.styles.js +5 -5
- package/dist/components/button/Button.js +29 -23
- package/dist/components/button/Button.styles.js +5 -5
- package/dist/components/context-menu/ContextMenu.js +123 -72
- package/dist/components/context-menu/ContextMenu.styles.js +5 -5
- package/dist/components/dialog/Dialog.js +73 -40
- package/dist/components/dialog/Dialog.styles.js +5 -5
- package/dist/components/form/Form.js +51 -32
- package/dist/components/form/Form.styles.js +5 -5
- package/dist/components/icon/Icon.js +53 -36
- package/dist/components/icon/Icon.styles.js +5 -5
- package/dist/components/icon-button/IconButton.js +44 -36
- package/dist/components/icon-button/IconButton.styles.js +5 -5
- package/dist/components/input/Input.js +161 -112
- package/dist/components/input/Input.styles.js +5 -5
- package/dist/components/menu/Menu.js +108 -58
- package/dist/components/menu/Menu.styles.js +5 -5
- package/dist/components/menu-item/MenuItem.js +67 -37
- package/dist/components/menu-item/MenuItem.styles.js +5 -5
- package/dist/components/panel/Panel.js +11 -10
- package/dist/components/panel/Panel.styles.js +5 -5
- package/dist/components/progress-ring/ProgressRing.js +70 -45
- package/dist/components/progress-ring/ProgressRing.styles.js +5 -5
- package/dist/components/spinner/Spinner.js +9 -9
- package/dist/components/spinner/Spinner.styles.js +5 -5
- package/dist/components/split-panel/SplitPanel.js +127 -66
- package/dist/components/split-panel/SplitPanel.styles.js +5 -5
- package/dist/components/split-panel/Splitter.js +29 -23
- package/dist/components/split-panel/Splitter.styles.js +5 -5
- package/dist/components/tooltip/Tooltip.js +115 -74
- package/dist/components/tooltip/Tooltip.styles.js +5 -5
- package/dist/index.js +18 -40
- package/dist/internals/attribute-converters.js +10 -8
- package/dist/internals/icons.js +41 -66
- package/dist/internals/node-helpers.js +16 -17
- package/dist/utilities/BrowserStorage.d.ts +43 -0
- package/dist/utilities/BrowserStorage.js +87 -0
- package/dist/utilities/decorators.js +19 -14
- package/dist/utilities/index.d.ts +1 -1
- package/dist/utilities/notifier.js +62 -20
- package/dist/utilities/theme.d.ts +38 -26
- package/dist/utilities/theme.js +110 -85
- package/package.json +2 -2
- package/dist/utilities/storage.d.ts +0 -60
- package/dist/utilities/storage.js +0 -120
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { css
|
|
2
|
-
|
|
1
|
+
import { css } from 'lit';
|
|
2
|
+
|
|
3
|
+
const styles = css`
|
|
3
4
|
:host {
|
|
4
5
|
position: relative;
|
|
5
6
|
display: flex;
|
|
@@ -14,6 +15,5 @@ const i = o`
|
|
|
14
15
|
flex-direction: column;
|
|
15
16
|
}
|
|
16
17
|
`;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
};
|
|
18
|
+
|
|
19
|
+
export { styles };
|
|
@@ -1,39 +1,45 @@
|
|
|
1
|
-
import { html
|
|
2
|
-
import { state
|
|
3
|
-
import { BaseElement
|
|
4
|
-
import { styles
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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;
|
|
9
14
|
};
|
|
10
|
-
class
|
|
15
|
+
class Splitter extends BaseElement {
|
|
11
16
|
constructor() {
|
|
12
|
-
super(...arguments)
|
|
17
|
+
super(...arguments);
|
|
18
|
+
this.dragging = false;
|
|
19
|
+
this.orientation = "horizontal";
|
|
13
20
|
}
|
|
14
21
|
static {
|
|
15
|
-
this.styles = [super.styles,
|
|
22
|
+
this.styles = [super.styles, styles];
|
|
16
23
|
}
|
|
17
24
|
static {
|
|
18
25
|
this.dependencies = {};
|
|
19
26
|
}
|
|
20
27
|
render() {
|
|
21
|
-
return
|
|
28
|
+
return html`
|
|
22
29
|
<div class="handler" ?dragging=${this.dragging}></div>
|
|
23
30
|
`;
|
|
24
31
|
}
|
|
25
32
|
/** 스플리터의 크기를 반환합니다. */
|
|
26
33
|
get size() {
|
|
27
|
-
const
|
|
28
|
-
return parseFloat(
|
|
34
|
+
const sizeStr = getComputedStyle(this).getPropertyValue("--splitter-size").trim();
|
|
35
|
+
return parseFloat(sizeStr) || 2;
|
|
29
36
|
}
|
|
30
37
|
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
],
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
],
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
};
|
|
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,5 +1,6 @@
|
|
|
1
|
-
import { css
|
|
2
|
-
|
|
1
|
+
import { css } from 'lit';
|
|
2
|
+
|
|
3
|
+
const styles = css`
|
|
3
4
|
:host {
|
|
4
5
|
position: relative;
|
|
5
6
|
display: block;
|
|
@@ -40,6 +41,5 @@ const e = r`
|
|
|
40
41
|
opacity: 1;
|
|
41
42
|
}
|
|
42
43
|
`;
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
};
|
|
44
|
+
|
|
45
|
+
export { styles };
|
|
@@ -1,91 +1,133 @@
|
|
|
1
|
-
import { html
|
|
2
|
-
import { property
|
|
3
|
-
import { offset
|
|
4
|
-
import { getParentElement
|
|
5
|
-
import { BaseElement
|
|
6
|
-
import { styles
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import { html } from 'lit';
|
|
2
|
+
import { property } from 'lit/decorators.js';
|
|
3
|
+
import { offset, shift, flip, autoPlacement, computePosition } from '@floating-ui/dom';
|
|
4
|
+
import { getParentElement, findElementsBy } from '../../internals/node-helpers.js';
|
|
5
|
+
import { BaseElement } from '../BaseElement.js';
|
|
6
|
+
import { styles } from './Tooltip.styles.js';
|
|
7
|
+
|
|
8
|
+
var __defProp = Object.defineProperty;
|
|
9
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
10
|
+
var result = void 0 ;
|
|
11
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
12
|
+
if (decorator = decorators[i])
|
|
13
|
+
result = (decorator(target, key, result) ) || result;
|
|
14
|
+
if (result) __defProp(target, key, result);
|
|
15
|
+
return result;
|
|
11
16
|
};
|
|
12
|
-
class
|
|
17
|
+
class Tooltip extends BaseElement {
|
|
13
18
|
constructor() {
|
|
14
|
-
super(...arguments)
|
|
19
|
+
super(...arguments);
|
|
20
|
+
/** 슬롯이 비어있는지 여부를 나타냅니다. */
|
|
21
|
+
this.isSlotEmpty = true;
|
|
22
|
+
this.triggers = [];
|
|
23
|
+
this.open = false;
|
|
24
|
+
this.hoist = false;
|
|
25
|
+
this.distance = 8;
|
|
26
|
+
/** 툴팁을 표시합니다. */
|
|
27
|
+
this.show = async (e) => {
|
|
15
28
|
await this.updateComplete;
|
|
16
|
-
const
|
|
17
|
-
if (!
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
29
|
+
const trigger = e?.currentTarget || this.triggers[0] || null;
|
|
30
|
+
if (!trigger || this.isSlotEmpty) return;
|
|
31
|
+
const middleware = [
|
|
32
|
+
offset({ mainAxis: this.distance }),
|
|
33
|
+
shift(),
|
|
34
|
+
flip()
|
|
22
35
|
];
|
|
23
|
-
this.placement
|
|
24
|
-
|
|
36
|
+
if (!this.placement)
|
|
37
|
+
middleware.push(autoPlacement());
|
|
38
|
+
const position = await computePosition(trigger, this, {
|
|
25
39
|
placement: this.placement,
|
|
26
|
-
middleware
|
|
40
|
+
middleware,
|
|
27
41
|
strategy: this.hoist ? "fixed" : "absolute"
|
|
28
42
|
});
|
|
29
43
|
Object.assign(this.style, {
|
|
30
|
-
left: `${
|
|
31
|
-
top: `${
|
|
32
|
-
transformOrigin: this.getTransformOrigin(
|
|
33
|
-
}), await this.updateComplete, requestAnimationFrame(() => {
|
|
34
|
-
this.open = !0;
|
|
44
|
+
left: `${position.x}px`,
|
|
45
|
+
top: `${position.y}px`,
|
|
46
|
+
transformOrigin: this.getTransformOrigin(position.placement)
|
|
35
47
|
});
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
this.open =
|
|
48
|
+
await this.updateComplete;
|
|
49
|
+
requestAnimationFrame(() => {
|
|
50
|
+
this.open = true;
|
|
51
|
+
});
|
|
52
|
+
};
|
|
53
|
+
/** 툴팁을 숨깁니다. */
|
|
54
|
+
this.hide = async (_) => {
|
|
55
|
+
await this.updateComplete;
|
|
56
|
+
requestAnimationFrame(() => {
|
|
57
|
+
this.open = false;
|
|
58
|
+
});
|
|
59
|
+
};
|
|
60
|
+
/**
|
|
61
|
+
* slot에 콘텐츠가 존재하는지 확인합니다.
|
|
62
|
+
*/
|
|
63
|
+
this.handleSlotChange = (e) => {
|
|
64
|
+
const slot = e.target;
|
|
65
|
+
const nodes = slot.assignedNodes({ flatten: true }) ?? [];
|
|
66
|
+
this.isSlotEmpty = !nodes.some((node) => {
|
|
67
|
+
if (node.nodeType === Node.ELEMENT_NODE) return true;
|
|
68
|
+
if (node.nodeType === Node.TEXT_NODE && node.textContent?.trim()) return true;
|
|
69
|
+
return false;
|
|
39
70
|
});
|
|
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
71
|
};
|
|
44
72
|
}
|
|
45
73
|
static {
|
|
46
|
-
this.styles = [super.styles,
|
|
74
|
+
this.styles = [super.styles, styles];
|
|
47
75
|
}
|
|
48
76
|
static {
|
|
49
77
|
this.dependencies = {};
|
|
50
78
|
}
|
|
51
79
|
connectedCallback() {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
80
|
+
super.connectedCallback();
|
|
81
|
+
if (this.triggers.length === 0) {
|
|
82
|
+
const parent = getParentElement(this);
|
|
83
|
+
if (parent) this.triggers = [parent];
|
|
55
84
|
}
|
|
56
85
|
}
|
|
57
86
|
disconnectedCallback() {
|
|
58
|
-
this.detachTriggers(this.triggers)
|
|
87
|
+
this.detachTriggers(this.triggers);
|
|
88
|
+
super.disconnectedCallback();
|
|
59
89
|
}
|
|
60
|
-
updated(
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
90
|
+
updated(changedProperties) {
|
|
91
|
+
super.updated(changedProperties);
|
|
92
|
+
if (changedProperties.has("triggers") && this.triggers) {
|
|
93
|
+
const oldTriggers = changedProperties.get("triggers");
|
|
94
|
+
this.detachTriggers(oldTriggers);
|
|
95
|
+
this.attachTriggers(this.triggers);
|
|
96
|
+
}
|
|
97
|
+
if (changedProperties.has("triggerSelectors") && this.triggerSelectors) {
|
|
98
|
+
this.triggers = findElementsBy(this, this.triggerSelectors);
|
|
64
99
|
}
|
|
65
|
-
t.has("triggerSelectors") && this.triggerSelectors && (this.triggers = y(this, this.triggerSelectors));
|
|
66
100
|
}
|
|
67
101
|
render() {
|
|
68
|
-
return
|
|
102
|
+
return html`
|
|
69
103
|
<slot @slotchange=${this.handleSlotChange}></slot>
|
|
70
104
|
`;
|
|
71
105
|
}
|
|
72
106
|
/** 대상 엘리먼트에 툴팁 이벤트를 바인딩 합니다. */
|
|
73
|
-
attachTriggers(
|
|
74
|
-
if (
|
|
75
|
-
|
|
76
|
-
|
|
107
|
+
attachTriggers(triggers) {
|
|
108
|
+
if (!triggers) return;
|
|
109
|
+
for (const trigger of triggers) {
|
|
110
|
+
trigger.addEventListener("mouseenter", this.show);
|
|
111
|
+
trigger.addEventListener("mouseleave", this.hide);
|
|
112
|
+
trigger.addEventListener("focusin", this.show);
|
|
113
|
+
trigger.addEventListener("focusout", this.hide);
|
|
114
|
+
}
|
|
77
115
|
}
|
|
78
116
|
/** 대상 엘리먼트에 바인딩된 툴팁 이벤트를 제거합니다. */
|
|
79
|
-
detachTriggers(
|
|
80
|
-
if (
|
|
81
|
-
|
|
82
|
-
|
|
117
|
+
detachTriggers(triggers) {
|
|
118
|
+
if (!triggers) return;
|
|
119
|
+
for (const trigger of triggers) {
|
|
120
|
+
trigger.removeEventListener("mouseenter", this.show);
|
|
121
|
+
trigger.removeEventListener("mouseleave", this.hide);
|
|
122
|
+
trigger.removeEventListener("focusin", this.show);
|
|
123
|
+
trigger.removeEventListener("focusout", this.hide);
|
|
124
|
+
}
|
|
83
125
|
}
|
|
84
126
|
/**
|
|
85
127
|
* 툴팁이 나타날 위치에 따라 transform-origin 값을 반환합니다.
|
|
86
128
|
*/
|
|
87
|
-
getTransformOrigin(
|
|
88
|
-
switch (
|
|
129
|
+
getTransformOrigin(placement) {
|
|
130
|
+
switch (placement) {
|
|
89
131
|
case "top":
|
|
90
132
|
case "top-start":
|
|
91
133
|
case "top-end":
|
|
@@ -107,24 +149,23 @@ class o extends E {
|
|
|
107
149
|
}
|
|
108
150
|
}
|
|
109
151
|
}
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
],
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
],
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
],
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
],
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
],
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
],
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
};
|
|
152
|
+
__decorateClass([
|
|
153
|
+
property({ attribute: false })
|
|
154
|
+
], Tooltip.prototype, "triggers");
|
|
155
|
+
__decorateClass([
|
|
156
|
+
property({ type: String, attribute: "trigger-selectors" })
|
|
157
|
+
], Tooltip.prototype, "triggerSelectors");
|
|
158
|
+
__decorateClass([
|
|
159
|
+
property({ type: Boolean, reflect: true })
|
|
160
|
+
], Tooltip.prototype, "open");
|
|
161
|
+
__decorateClass([
|
|
162
|
+
property({ type: Boolean, reflect: true })
|
|
163
|
+
], Tooltip.prototype, "hoist");
|
|
164
|
+
__decorateClass([
|
|
165
|
+
property({ type: String })
|
|
166
|
+
], Tooltip.prototype, "placement");
|
|
167
|
+
__decorateClass([
|
|
168
|
+
property({ type: Number })
|
|
169
|
+
], Tooltip.prototype, "distance");
|
|
170
|
+
|
|
171
|
+
export { Tooltip };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { css
|
|
2
|
-
|
|
1
|
+
import { css } from 'lit';
|
|
2
|
+
|
|
3
|
+
const styles = css`
|
|
3
4
|
:host {
|
|
4
5
|
position: absolute;
|
|
5
6
|
z-index: 1000;
|
|
@@ -31,6 +32,5 @@ const e = o`
|
|
|
31
32
|
position: fixed;
|
|
32
33
|
}
|
|
33
34
|
`;
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
};
|
|
35
|
+
|
|
36
|
+
export { styles };
|
package/dist/index.js
CHANGED
|
@@ -1,40 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
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
|
-
};
|
|
1
|
+
export { Alert } from './components/alert/Alert.js';
|
|
2
|
+
export { Button } from './components/button/Button.js';
|
|
3
|
+
export { ContextMenu } from './components/context-menu/ContextMenu.js';
|
|
4
|
+
export { Dialog } from './components/dialog/Dialog.js';
|
|
5
|
+
export { Form } from './components/form/Form.js';
|
|
6
|
+
export { Icon } from './components/icon/Icon.js';
|
|
7
|
+
export { IconButton } from './components/icon-button/IconButton.js';
|
|
8
|
+
export { Input } from './components/input/Input.js';
|
|
9
|
+
export { Menu } from './components/menu/Menu.js';
|
|
10
|
+
export { Panel } from './components/panel/Panel.js';
|
|
11
|
+
export { ProgressRing } from './components/progress-ring/ProgressRing.js';
|
|
12
|
+
export { Spinner } from './components/spinner/Spinner.js';
|
|
13
|
+
export { SplitPanel } from './components/split-panel/SplitPanel.js';
|
|
14
|
+
export { Tooltip } from './components/tooltip/Tooltip.js';
|
|
15
|
+
export { BrowserStorage } from './utilities/BrowserStorage.js';
|
|
16
|
+
export { getPropertyMeta, propertyMeta, setPropertyMeta } from './utilities/decorators.js';
|
|
17
|
+
export { notifier } from './utilities/notifier.js';
|
|
18
|
+
export { Theme, theme } from './utilities/theme.js';
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
function
|
|
1
|
+
function arrayAttributeConverter(parser, separator = ",") {
|
|
2
2
|
return {
|
|
3
|
-
fromAttribute: (
|
|
4
|
-
if (
|
|
5
|
-
|
|
3
|
+
fromAttribute: (value) => {
|
|
4
|
+
if (!value) return void 0;
|
|
5
|
+
return value.split(separator).map((v) => parser(v.trim()));
|
|
6
6
|
},
|
|
7
|
-
toAttribute: (
|
|
7
|
+
toAttribute: (value) => {
|
|
8
|
+
if (!value) return null;
|
|
9
|
+
return value.join(separator);
|
|
10
|
+
}
|
|
8
11
|
};
|
|
9
12
|
}
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
};
|
|
13
|
+
|
|
14
|
+
export { arrayAttributeConverter };
|
package/dist/internals/icons.js
CHANGED
|
@@ -1,67 +1,42 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import * as
|
|
3
|
-
import * as
|
|
4
|
-
import * as
|
|
5
|
-
import * as
|
|
6
|
-
import * as
|
|
7
|
-
import * as
|
|
8
|
-
import * as
|
|
9
|
-
import * as
|
|
10
|
-
import * as
|
|
11
|
-
import * as
|
|
12
|
-
import * as
|
|
13
|
-
import * as
|
|
14
|
-
import * as
|
|
15
|
-
import * as
|
|
16
|
-
import * as
|
|
17
|
-
import * as
|
|
18
|
-
import * as
|
|
19
|
-
import * as
|
|
20
|
-
import * as
|
|
21
|
-
import * as
|
|
22
|
-
import * as
|
|
23
|
-
import * as
|
|
24
|
-
import * as
|
|
25
|
-
import * as
|
|
26
|
-
import * as
|
|
27
|
-
import * as
|
|
28
|
-
import * as
|
|
29
|
-
import * as
|
|
30
|
-
import * as
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
"
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
"../assets/icons/chevron-down.svg": m,
|
|
41
|
-
"../assets/icons/chevron-left.svg": n,
|
|
42
|
-
"../assets/icons/chevron-right.svg": p,
|
|
43
|
-
"../assets/icons/chevron-up.svg": g,
|
|
44
|
-
"../assets/icons/copy.svg": f,
|
|
45
|
-
"../assets/icons/dash-lg.svg": v,
|
|
46
|
-
"../assets/icons/exclamation-circle-fill.svg": h,
|
|
47
|
-
"../assets/icons/exclamation-triangle-fill.svg": b,
|
|
48
|
-
"../assets/icons/eye-slash.svg": u,
|
|
49
|
-
"../assets/icons/eye.svg": w,
|
|
50
|
-
"../assets/icons/info-circle-fill.svg": d,
|
|
51
|
-
"../assets/icons/layout-sidebar.svg": y,
|
|
52
|
-
"../assets/icons/lightbulb-fill.svg": F,
|
|
53
|
-
"../assets/icons/lightbulb-off.svg": x,
|
|
54
|
-
"../assets/icons/lightbulb.svg": k,
|
|
55
|
-
"../assets/icons/mic-fill.svg": L,
|
|
56
|
-
"../assets/icons/mic-mute-fill.svg": C,
|
|
57
|
-
"../assets/icons/paperclip.svg": O,
|
|
58
|
-
"../assets/icons/pencil-square.svg": S,
|
|
59
|
-
"../assets/icons/plus-lg.svg": j,
|
|
60
|
-
"../assets/icons/search.svg": q,
|
|
61
|
-
"../assets/icons/speedometer.svg": D,
|
|
62
|
-
"../assets/icons/x-lg.svg": M
|
|
63
|
-
})).map(([s, o]) => [s.split("/").pop()?.replace(".svg", "") || "", o.default]).filter(([s]) => s !== "")
|
|
1
|
+
import * as arrowClockwise from '../assets/icons/arrow-clockwise.svg.js';
|
|
2
|
+
import * as arrowDown from '../assets/icons/arrow-down.svg.js';
|
|
3
|
+
import * as arrowUp from '../assets/icons/arrow-up.svg.js';
|
|
4
|
+
import * as ban from '../assets/icons/ban.svg.js';
|
|
5
|
+
import * as bellFill from '../assets/icons/bell-fill.svg.js';
|
|
6
|
+
import * as checkCircleFill from '../assets/icons/check-circle-fill.svg.js';
|
|
7
|
+
import * as checkLg from '../assets/icons/check-lg.svg.js';
|
|
8
|
+
import * as chevronDown from '../assets/icons/chevron-down.svg.js';
|
|
9
|
+
import * as chevronLeft from '../assets/icons/chevron-left.svg.js';
|
|
10
|
+
import * as chevronRight from '../assets/icons/chevron-right.svg.js';
|
|
11
|
+
import * as chevronUp from '../assets/icons/chevron-up.svg.js';
|
|
12
|
+
import * as copy from '../assets/icons/copy.svg.js';
|
|
13
|
+
import * as dashLg from '../assets/icons/dash-lg.svg.js';
|
|
14
|
+
import * as exclamationCircleFill from '../assets/icons/exclamation-circle-fill.svg.js';
|
|
15
|
+
import * as exclamationTriangleFill from '../assets/icons/exclamation-triangle-fill.svg.js';
|
|
16
|
+
import * as eyeSlash from '../assets/icons/eye-slash.svg.js';
|
|
17
|
+
import * as eye from '../assets/icons/eye.svg.js';
|
|
18
|
+
import * as infoCircleFill from '../assets/icons/info-circle-fill.svg.js';
|
|
19
|
+
import * as layoutSidebar from '../assets/icons/layout-sidebar.svg.js';
|
|
20
|
+
import * as lightbulbFill from '../assets/icons/lightbulb-fill.svg.js';
|
|
21
|
+
import * as lightbulbOff from '../assets/icons/lightbulb-off.svg.js';
|
|
22
|
+
import * as lightbulb from '../assets/icons/lightbulb.svg.js';
|
|
23
|
+
import * as micFill from '../assets/icons/mic-fill.svg.js';
|
|
24
|
+
import * as micMuteFill from '../assets/icons/mic-mute-fill.svg.js';
|
|
25
|
+
import * as paperclip from '../assets/icons/paperclip.svg.js';
|
|
26
|
+
import * as pencilSquare from '../assets/icons/pencil-square.svg.js';
|
|
27
|
+
import * as plusLg from '../assets/icons/plus-lg.svg.js';
|
|
28
|
+
import * as search from '../assets/icons/search.svg.js';
|
|
29
|
+
import * as speedometer from '../assets/icons/speedometer.svg.js';
|
|
30
|
+
import * as xLg from '../assets/icons/x-lg.svg.js';
|
|
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
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
})).map(([path, module]) => {
|
|
37
|
+
const name = path.split("/").pop()?.replace(".svg", "") || "";
|
|
38
|
+
return [name, module.default];
|
|
39
|
+
}).filter(([name]) => name !== "")
|
|
64
40
|
);
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
};
|
|
41
|
+
|
|
42
|
+
export { icons };
|
|
@@ -1,21 +1,20 @@
|
|
|
1
|
-
function
|
|
2
|
-
if (
|
|
3
|
-
return
|
|
4
|
-
{
|
|
5
|
-
const
|
|
6
|
-
return
|
|
1
|
+
function getParentElement(element) {
|
|
2
|
+
if (element.parentElement) {
|
|
3
|
+
return element.parentElement;
|
|
4
|
+
} else {
|
|
5
|
+
const root = element.getRootNode({ composed: false });
|
|
6
|
+
return root instanceof Document ? root.documentElement : root instanceof ShadowRoot ? root.host : root instanceof HTMLElement ? root : void 0;
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
|
-
function
|
|
10
|
-
if (!
|
|
11
|
-
const
|
|
12
|
-
if (
|
|
13
|
-
const
|
|
14
|
-
return Array.from(
|
|
15
|
-
} else
|
|
9
|
+
function findElementsBy(element, selectors) {
|
|
10
|
+
if (!selectors) return [];
|
|
11
|
+
const rootNode = element.getRootNode({ composed: false });
|
|
12
|
+
if (rootNode instanceof ShadowRoot || rootNode instanceof Document) {
|
|
13
|
+
const nodeList = rootNode.querySelectorAll(selectors);
|
|
14
|
+
return Array.from(nodeList);
|
|
15
|
+
} else {
|
|
16
16
|
return [];
|
|
17
|
+
}
|
|
17
18
|
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
r as getParentElement
|
|
21
|
-
};
|
|
19
|
+
|
|
20
|
+
export { findElementsBy, getParentElement };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/** localStorage 설정 옵션 */
|
|
2
|
+
export interface LocalStorageOptions {
|
|
3
|
+
type: 'localStorage';
|
|
4
|
+
}
|
|
5
|
+
/** 쿠키 스토리지 설정 옵션 */
|
|
6
|
+
export interface CookieOptions {
|
|
7
|
+
type: 'cookie';
|
|
8
|
+
path?: string;
|
|
9
|
+
domain?: string | null;
|
|
10
|
+
expires?: DOMHighResTimeStamp | null;
|
|
11
|
+
sameSite?: CookieSameSite;
|
|
12
|
+
partitioned?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export type BrowserStorageOptions = (LocalStorageOptions | CookieOptions) & {
|
|
15
|
+
/** 키 앞에 붙일 접두사 (옵션) */
|
|
16
|
+
prefix?: string;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* 웹 브라우저가 제공하는 저장소 유틸리티 클래스
|
|
20
|
+
*/
|
|
21
|
+
export declare class BrowserStorage {
|
|
22
|
+
private readonly options;
|
|
23
|
+
constructor(options: BrowserStorageOptions);
|
|
24
|
+
/** 키에 prefix를 붙인 실제 저장 키 */
|
|
25
|
+
private buildKey;
|
|
26
|
+
/**
|
|
27
|
+
* 값 저장
|
|
28
|
+
* @param key 키
|
|
29
|
+
* @param value 문자열 값 (문자열이 아닌 값은 JSON.stringify 권장)
|
|
30
|
+
*/
|
|
31
|
+
set(key: string, value: string): Promise<void>;
|
|
32
|
+
/**
|
|
33
|
+
* 값 조회
|
|
34
|
+
* @param key 키
|
|
35
|
+
* @returns 값 (없으면 null)
|
|
36
|
+
*/
|
|
37
|
+
get(key: string): Promise<string | null>;
|
|
38
|
+
/**
|
|
39
|
+
* 값 삭제
|
|
40
|
+
* @param key 키
|
|
41
|
+
*/
|
|
42
|
+
remove(key: string): Promise<void>;
|
|
43
|
+
}
|