@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.
- package/CHANGELOG.md +4 -0
- package/LICENSE +21 -0
- package/README.md +33 -0
- package/dist/assets/icons/arrow-clockwise.svg.js +7 -0
- package/dist/assets/icons/arrow-down.svg.js +6 -0
- package/dist/assets/icons/arrow-up.svg.js +6 -0
- package/dist/assets/icons/ban.svg.js +6 -0
- package/dist/assets/icons/bell-fill.svg.js +6 -0
- package/dist/assets/icons/check-circle-fill.svg.js +6 -0
- package/dist/assets/icons/check-lg.svg.js +6 -0
- package/dist/assets/icons/chevron-down.svg.js +6 -0
- package/dist/assets/icons/chevron-left.svg.js +6 -0
- package/dist/assets/icons/chevron-right.svg.js +6 -0
- package/dist/assets/icons/chevron-up.svg.js +6 -0
- package/dist/assets/icons/copy.svg.js +6 -0
- package/dist/assets/icons/dash-lg.svg.js +6 -0
- package/dist/assets/icons/exclamation-circle-fill.svg.js +6 -0
- package/dist/assets/icons/exclamation-triangle-fill.svg.js +6 -0
- package/dist/assets/icons/eye-slash.svg.js +8 -0
- package/dist/assets/icons/eye.svg.js +7 -0
- package/dist/assets/icons/info-circle-fill.svg.js +6 -0
- package/dist/assets/icons/layout-sidebar.svg.js +6 -0
- package/dist/assets/icons/lightbulb-fill.svg.js +6 -0
- package/dist/assets/icons/lightbulb-off.svg.js +6 -0
- package/dist/assets/icons/lightbulb.svg.js +6 -0
- package/dist/assets/icons/mic-fill.svg.js +7 -0
- package/dist/assets/icons/mic-mute-fill.svg.js +7 -0
- package/dist/assets/icons/paperclip.svg.js +6 -0
- package/dist/assets/icons/pencil-square.svg.js +7 -0
- package/dist/assets/icons/plus-lg.svg.js +6 -0
- package/dist/assets/icons/search.svg.js +6 -0
- package/dist/assets/icons/speedometer.svg.js +7 -0
- package/dist/assets/icons/x-lg.svg.js +6 -0
- package/dist/assets/styles/dark.css +126 -0
- package/dist/assets/styles/dark.css.js +4 -0
- package/dist/assets/styles/light.css +127 -0
- package/dist/assets/styles/light.css.js +4 -0
- package/dist/components/BaseElement.d.ts +33 -0
- package/dist/components/BaseElement.js +49 -0
- package/dist/components/BaseElement.styles.d.ts +1 -0
- package/dist/components/BaseElement.styles.js +29 -0
- package/dist/components/alert/Alert.d.ts +36 -0
- package/dist/components/alert/Alert.js +107 -0
- package/dist/components/alert/Alert.styles.d.ts +1 -0
- package/dist/components/alert/Alert.styles.js +114 -0
- package/dist/components/alert/index.d.ts +7 -0
- package/dist/components/button/Button.d.ts +16 -0
- package/dist/components/button/Button.js +45 -0
- package/dist/components/button/Button.styles.d.ts +1 -0
- package/dist/components/button/Button.styles.js +89 -0
- package/dist/components/button/index.d.ts +7 -0
- package/dist/components/context-menu/ContextMenu.d.ts +48 -0
- package/dist/components/context-menu/ContextMenu.js +142 -0
- package/dist/components/context-menu/ContextMenu.styles.d.ts +1 -0
- package/dist/components/context-menu/ContextMenu.styles.js +40 -0
- package/dist/components/context-menu/index.d.ts +7 -0
- package/dist/components/copy-button/CopyButton.d.ts +15 -0
- package/dist/components/copy-button/CopyButton.styles.d.ts +1 -0
- package/dist/components/copy-button/index.d.ts +7 -0
- package/dist/components/dialog/Dialog.d.ts +30 -0
- package/dist/components/dialog/Dialog.js +66 -0
- package/dist/components/dialog/Dialog.styles.d.ts +1 -0
- package/dist/components/dialog/Dialog.styles.js +32 -0
- package/dist/components/dialog/index.d.ts +7 -0
- package/dist/components/form/Form.d.ts +22 -0
- package/dist/components/form/Form.js +53 -0
- package/dist/components/form/Form.styles.d.ts +1 -0
- package/dist/components/form/Form.styles.js +18 -0
- package/dist/components/form/index.d.ts +7 -0
- package/dist/components/icon/Icon.d.ts +35 -0
- package/dist/components/icon/Icon.js +63 -0
- package/dist/components/icon/Icon.styles.d.ts +1 -0
- package/dist/components/icon/Icon.styles.js +17 -0
- package/dist/components/icon/index.d.ts +7 -0
- package/dist/components/icon-button/IconButton.d.ts +19 -0
- package/dist/components/icon-button/IconButton.js +51 -0
- package/dist/components/icon-button/IconButton.styles.d.ts +1 -0
- package/dist/components/icon-button/IconButton.styles.js +69 -0
- package/dist/components/icon-button/index.d.ts +7 -0
- package/dist/components/index.d.ts +14 -0
- package/dist/components/input/Input.d.ts +73 -0
- package/dist/components/input/Input.js +193 -0
- package/dist/components/input/Input.styles.d.ts +1 -0
- package/dist/components/input/Input.styles.js +149 -0
- package/dist/components/input/index.d.ts +7 -0
- package/dist/components/menu/Menu.d.ts +36 -0
- package/dist/components/menu/Menu.js +103 -0
- package/dist/components/menu/Menu.styles.d.ts +1 -0
- package/dist/components/menu/Menu.styles.js +33 -0
- package/dist/components/menu/index.d.ts +7 -0
- package/dist/components/menu-item/MenuItem.d.ts +27 -0
- package/dist/components/menu-item/MenuItem.js +68 -0
- package/dist/components/menu-item/MenuItem.styles.d.ts +1 -0
- package/dist/components/menu-item/MenuItem.styles.js +64 -0
- package/dist/components/menu-item/index.d.ts +7 -0
- package/dist/components/panel/Panel.d.ts +10 -0
- package/dist/components/panel/Panel.js +20 -0
- package/dist/components/panel/Panel.styles.d.ts +1 -0
- package/dist/components/panel/Panel.styles.js +12 -0
- package/dist/components/panel/index.d.ts +7 -0
- package/dist/components/progress-ring/ProgressRing.d.ts +31 -0
- package/dist/components/progress-ring/ProgressRing.js +85 -0
- package/dist/components/progress-ring/ProgressRing.styles.d.ts +1 -0
- package/dist/components/progress-ring/ProgressRing.styles.js +53 -0
- package/dist/components/progress-ring/index.d.ts +7 -0
- package/dist/components/spinner/Spinner.d.ts +9 -0
- package/dist/components/spinner/Spinner.js +22 -0
- package/dist/components/spinner/Spinner.styles.d.ts +1 -0
- package/dist/components/spinner/Spinner.styles.js +57 -0
- package/dist/components/spinner/index.d.ts +7 -0
- package/dist/components/split-panel/SplitPanel.d.ts +26 -0
- package/dist/components/split-panel/SplitPanel.js +86 -0
- package/dist/components/split-panel/SplitPanel.styles.d.ts +1 -0
- package/dist/components/split-panel/SplitPanel.styles.js +19 -0
- package/dist/components/split-panel/SplitPanel.types.d.ts +2 -0
- package/dist/components/split-panel/Splitter.d.ts +17 -0
- package/dist/components/split-panel/Splitter.js +39 -0
- package/dist/components/split-panel/Splitter.styles.d.ts +1 -0
- package/dist/components/split-panel/Splitter.styles.js +45 -0
- package/dist/components/split-panel/index.d.ts +7 -0
- package/dist/components/tooltip/Tooltip.d.ts +44 -0
- package/dist/components/tooltip/Tooltip.js +130 -0
- package/dist/components/tooltip/Tooltip.styles.d.ts +1 -0
- package/dist/components/tooltip/Tooltip.styles.js +36 -0
- package/dist/components/tooltip/index.d.ts +7 -0
- package/dist/events/UChangeEvent.d.ts +6 -0
- package/dist/events/UHideEvent.d.ts +6 -0
- package/dist/events/UInputEvent.d.ts +6 -0
- package/dist/events/UResizeEvent.d.ts +6 -0
- package/dist/events/USelectEvent.d.ts +6 -0
- package/dist/events/UShowEvent.d.ts +6 -0
- package/dist/events/index.d.ts +6 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +40 -0
- package/dist/integrations/react/UAlert.d.ts +8 -0
- package/dist/integrations/react/UAlert.js +10 -0
- package/dist/integrations/react/UButton.d.ts +8 -0
- package/dist/integrations/react/UButton.js +10 -0
- package/dist/integrations/react/UContextMenu.d.ts +8 -0
- package/dist/integrations/react/UContextMenu.js +10 -0
- package/dist/integrations/react/UCopyButton.d.ts +8 -0
- package/dist/integrations/react/UCopyButton.js +10 -0
- package/dist/integrations/react/UDialog.d.ts +8 -0
- package/dist/integrations/react/UDialog.js +10 -0
- package/dist/integrations/react/UForm.d.ts +8 -0
- package/dist/integrations/react/UForm.js +10 -0
- package/dist/integrations/react/UIcon.d.ts +8 -0
- package/dist/integrations/react/UIcon.js +10 -0
- package/dist/integrations/react/UIconButton.d.ts +8 -0
- package/dist/integrations/react/UIconButton.js +10 -0
- package/dist/integrations/react/UInput.d.ts +8 -0
- package/dist/integrations/react/UInput.js +10 -0
- package/dist/integrations/react/UMenu.d.ts +8 -0
- package/dist/integrations/react/UMenu.js +10 -0
- package/dist/integrations/react/UMenuItem.d.ts +8 -0
- package/dist/integrations/react/UMenuItem.js +10 -0
- package/dist/integrations/react/UPanel.d.ts +8 -0
- package/dist/integrations/react/UPanel.js +10 -0
- package/dist/integrations/react/UProgressRing.d.ts +8 -0
- package/dist/integrations/react/UProgressRing.js +10 -0
- package/dist/integrations/react/USpinner.d.ts +8 -0
- package/dist/integrations/react/USpinner.js +10 -0
- package/dist/integrations/react/USplitPanel.d.ts +8 -0
- package/dist/integrations/react/USplitPanel.js +10 -0
- package/dist/integrations/react/UTooltip.d.ts +8 -0
- package/dist/integrations/react/UTooltip.js +10 -0
- package/dist/integrations/react/index.d.ts +23 -0
- package/dist/integrations/react/index.js +16 -0
- package/dist/internals/attribute-converters.d.ts +10 -0
- package/dist/internals/attribute-converters.js +12 -0
- package/dist/internals/icons.d.ts +6 -0
- package/dist/internals/icons.js +67 -0
- package/dist/internals/index.d.ts +4 -0
- package/dist/internals/node-helpers.d.ts +12 -0
- package/dist/internals/node-helpers.js +21 -0
- package/dist/internals/react-wrapper.d.ts +21 -0
- package/dist/utilities/decorators.d.ts +28 -0
- package/dist/utilities/decorators.js +21 -0
- package/dist/utilities/index.d.ts +4 -0
- package/dist/utilities/notifier.d.ts +26 -0
- package/dist/utilities/notifier.js +29 -0
- package/dist/utilities/storage.d.ts +60 -0
- package/dist/utilities/storage.js +120 -0
- package/dist/utilities/theme.d.ts +54 -0
- package/dist/utilities/theme.js +108 -0
- package/package.json +58 -0
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { css as o } from "lit";
|
|
2
|
+
const e = o`
|
|
3
|
+
:host {
|
|
4
|
+
position: relative;
|
|
5
|
+
display: inline-flex;
|
|
6
|
+
|
|
7
|
+
font-size: 16px;
|
|
8
|
+
color: var(--u-icon-color);
|
|
9
|
+
padding: 0.5em;
|
|
10
|
+
background-color: var(--u-bg-color);
|
|
11
|
+
border: 1px solid var(--u-border-color);
|
|
12
|
+
border-radius: 6px;
|
|
13
|
+
|
|
14
|
+
transition: all 0.2s ease;
|
|
15
|
+
user-select: none;
|
|
16
|
+
cursor: pointer;
|
|
17
|
+
}
|
|
18
|
+
:host([borderless]) {
|
|
19
|
+
border: none;
|
|
20
|
+
background-color: transparent;
|
|
21
|
+
}
|
|
22
|
+
:host([borderless]:hover) {
|
|
23
|
+
border: none;
|
|
24
|
+
background-color: transparent;
|
|
25
|
+
}
|
|
26
|
+
:host([borderless]:active) {
|
|
27
|
+
border: none;
|
|
28
|
+
background-color: transparent;
|
|
29
|
+
}
|
|
30
|
+
:host([loading]),
|
|
31
|
+
:host([disabled]) {
|
|
32
|
+
pointer-events: none;
|
|
33
|
+
}
|
|
34
|
+
:host([disabled]) {
|
|
35
|
+
opacity: 0.6;
|
|
36
|
+
color: var(--u-icon-color-disabled);
|
|
37
|
+
}
|
|
38
|
+
:host(:hover) {
|
|
39
|
+
color: var(--u-icon-color-hover);
|
|
40
|
+
background-color: var(--u-bg-color-hover);
|
|
41
|
+
border-color: var(--u-border-color-strong);
|
|
42
|
+
}
|
|
43
|
+
:host(:active) {
|
|
44
|
+
color: var(--u-icon-color-active);
|
|
45
|
+
background-color: var(--u-bg-color-active);
|
|
46
|
+
transform: translateY(1px);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
button {
|
|
50
|
+
all: unset;
|
|
51
|
+
display: inline-flex;
|
|
52
|
+
align-items: center;
|
|
53
|
+
justify-content: center;
|
|
54
|
+
}
|
|
55
|
+
button:focus-visible {
|
|
56
|
+
outline: 2px solid var(--u-blue-500, #3b82f6);
|
|
57
|
+
outline-offset: 2px;
|
|
58
|
+
border-radius: inherit;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
u-icon,
|
|
62
|
+
u-spinner {
|
|
63
|
+
font-size: inherit;
|
|
64
|
+
color: inherit;
|
|
65
|
+
}
|
|
66
|
+
`;
|
|
67
|
+
export {
|
|
68
|
+
e as styles
|
|
69
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export * from './alert';
|
|
2
|
+
export * from './button';
|
|
3
|
+
export * from './context-menu';
|
|
4
|
+
export * from './dialog';
|
|
5
|
+
export * from './form';
|
|
6
|
+
export * from './icon';
|
|
7
|
+
export * from './icon-button';
|
|
8
|
+
export * from './input';
|
|
9
|
+
export * from './menu';
|
|
10
|
+
export * from './panel';
|
|
11
|
+
export * from './progress-ring';
|
|
12
|
+
export * from './spinner';
|
|
13
|
+
export * from './split-panel';
|
|
14
|
+
export * from './tooltip';
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { PropertyValues } from 'lit';
|
|
2
|
+
import { BaseElement } from '../BaseElement.js';
|
|
3
|
+
/**
|
|
4
|
+
* Input ์ปดํฌ๋ํธ๋ ์ฌ์ฉ์ ์
๋ ฅ์ ๋ฐ๋ ํ
์คํธ ์
๋ ฅ ํ๋์
๋๋ค.
|
|
5
|
+
* prefix, suffix ์ฌ๋กฏ๊ณผ ๋ผ๋ฒจ, ๋์๋ง, ์ ํจ์ฑ ๊ฒ์ฌ ๋ฑ์ ๊ธฐ๋ฅ์ ์ ๊ณตํฉ๋๋ค.
|
|
6
|
+
*/
|
|
7
|
+
export declare class Input extends BaseElement {
|
|
8
|
+
static styles: import('lit').CSSResultGroup[];
|
|
9
|
+
static dependencies: Record<string, typeof BaseElement>;
|
|
10
|
+
input: HTMLInputElement;
|
|
11
|
+
/** password type์ธ ๊ฒฝ์ฐ ๋น๋ฐ๋ฒํธ ํ์/์จ๊น ์ํ */
|
|
12
|
+
showPassword: boolean;
|
|
13
|
+
/** ์ ํจ์ฑ ๊ฒ์ฌ ์คํจ ์ฌ๋ถ */
|
|
14
|
+
isInvalid: boolean;
|
|
15
|
+
/** ํ์ฌ ํ์ํ ์ ํจ์ฑ ๊ฒ์ฌ ๋ฉ์์ง */
|
|
16
|
+
currentValidationMessage: string;
|
|
17
|
+
/** input ์์์ type ์์ฑ */
|
|
18
|
+
type: 'text' | 'email' | 'password' | 'search' | 'tel' | 'url' | 'number';
|
|
19
|
+
/** ํ์ ์
๋ ฅ ์ฌ๋ถ */
|
|
20
|
+
required: boolean;
|
|
21
|
+
/** ๋นํ์ฑํ ์ฌ๋ถ */
|
|
22
|
+
disabled: boolean;
|
|
23
|
+
/** ํด๋ฆฌ์ด ๋ฒํผ ํ์ ์ฌ๋ถ */
|
|
24
|
+
clearable: boolean;
|
|
25
|
+
/** ์ฝ๊ธฐ ์ ์ฉ ์ฌ๋ถ */
|
|
26
|
+
readonly: boolean;
|
|
27
|
+
/** input ์์์ name ์์ฑ */
|
|
28
|
+
name?: string;
|
|
29
|
+
/** ๋ผ๋ฒจ ํ
์คํธ */
|
|
30
|
+
label?: string;
|
|
31
|
+
/** ๋ผ๋ฒจ ๋์๋ง (ํดํ) */
|
|
32
|
+
labelhelp?: string;
|
|
33
|
+
/** placeholder ํ
์คํธ */
|
|
34
|
+
placeholder?: string;
|
|
35
|
+
/** ์ปดํฌ๋ํธ ํ๋จ ์ค๋ช
ํ
์คํธ */
|
|
36
|
+
description?: string;
|
|
37
|
+
/** ์ต์ ๊ธธ์ด */
|
|
38
|
+
minlength?: number;
|
|
39
|
+
/** ์ต๋ ๊ธธ์ด */
|
|
40
|
+
maxlength?: number;
|
|
41
|
+
/** ๋ง์ถค๋ฒ ๊ฒ์ฌ ์ฌ๋ถ */
|
|
42
|
+
spellcheck: boolean;
|
|
43
|
+
/** autocomplete ์์ฑ */
|
|
44
|
+
autocomplete?: string;
|
|
45
|
+
/** ์
๋ ฅ๊ฐ */
|
|
46
|
+
value: string;
|
|
47
|
+
/** ์ ํจ์ฑ ๊ฒ์ฌ ํจํด (์ ๊ท์) */
|
|
48
|
+
pattern?: string;
|
|
49
|
+
/** ์ ํจ์ฑ ๊ฒ์ฌ ์คํจ ์ ํ์ํ ๋ฉ์์ง */
|
|
50
|
+
validationMessage?: string;
|
|
51
|
+
protected updated(changedProperties: PropertyValues): void;
|
|
52
|
+
render(): import('lit-html').TemplateResult<1>;
|
|
53
|
+
/** ๋ผ๋ฒจ ์์ญ์ ๋ ๋๋งํฉ๋๋ค. */
|
|
54
|
+
private renderHeader;
|
|
55
|
+
/** ์ ํจ์ฑ ๊ฒ์ฌ๋ฅผ ์ํํฉ๋๋ค. */
|
|
56
|
+
validate(): boolean;
|
|
57
|
+
/** ์
๋ ฅ๊ฐ์ ์ด๊ธฐํํฉ๋๋ค. */
|
|
58
|
+
clear(): void;
|
|
59
|
+
/** ์
๋ ฅ ํ๋์ ํฌ์ปค์ค๋ฅผ ์ค์ ํฉ๋๋ค. */
|
|
60
|
+
focus(): void;
|
|
61
|
+
/** ์
๋ ฅ ํ๋์ ํฌ์ปค์ค๋ฅผ ํด์ ํฉ๋๋ค. */
|
|
62
|
+
blur(): void;
|
|
63
|
+
/** input ์ด๋ฒคํธ ํธ๋ค๋ฌ */
|
|
64
|
+
private handleInput;
|
|
65
|
+
/** change ์ด๋ฒคํธ ํธ๋ค๋ฌ */
|
|
66
|
+
private handleChange;
|
|
67
|
+
/** blur ์ด๋ฒคํธ ํธ๋ค๋ฌ */
|
|
68
|
+
private handleBlur;
|
|
69
|
+
/** ํด๋ฆฌ์ด ๋ฒํผ ํด๋ฆญ ํธ๋ค๋ฌ */
|
|
70
|
+
private handleClear;
|
|
71
|
+
/** ๋น๋ฐ๋ฒํธ ํ์/์จ๊น ํ ๊ธ ํธ๋ค๋ฌ */
|
|
72
|
+
private handlePasswordToggle;
|
|
73
|
+
}
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
import { html as o, nothing as u } from "lit";
|
|
2
|
+
import { query as c, state as p, property as s } from "lit/decorators.js";
|
|
3
|
+
import { ifDefined as r } from "lit/directives/if-defined.js";
|
|
4
|
+
import { live as y } from "lit/directives/live.js";
|
|
5
|
+
import { BaseElement as v } from "../BaseElement.js";
|
|
6
|
+
import { Icon as f } from "../icon/Icon.js";
|
|
7
|
+
import { Tooltip as g } from "../tooltip/Tooltip.js";
|
|
8
|
+
import { styles as m } from "./Input.styles.js";
|
|
9
|
+
var $ = Object.defineProperty, t = (n, i, a, b) => {
|
|
10
|
+
for (var l = void 0, h = n.length - 1, d; h >= 0; h--)
|
|
11
|
+
(d = n[h]) && (l = d(i, a, l) || l);
|
|
12
|
+
return l && $(i, a, l), l;
|
|
13
|
+
};
|
|
14
|
+
class e extends v {
|
|
15
|
+
constructor() {
|
|
16
|
+
super(...arguments), this.showPassword = !1, this.isInvalid = !1, this.currentValidationMessage = "", this.type = "text", this.required = !1, this.disabled = !1, this.clearable = !1, this.readonly = !1, this.spellcheck = !1, this.value = "", this.handleInput = (i) => {
|
|
17
|
+
const a = i.target;
|
|
18
|
+
this.value = a.value, this.isInvalid && (this.isInvalid = !1, this.currentValidationMessage = ""), this.emit("u-input", { value: this.value });
|
|
19
|
+
}, this.handleChange = (i) => {
|
|
20
|
+
const a = i.target;
|
|
21
|
+
this.value = a.value, this.emit("u-change", { value: this.value });
|
|
22
|
+
}, this.handleBlur = () => {
|
|
23
|
+
this.validate();
|
|
24
|
+
}, this.handleClear = (i) => {
|
|
25
|
+
i.stopPropagation(), this.clear();
|
|
26
|
+
}, this.handlePasswordToggle = (i) => {
|
|
27
|
+
i.stopPropagation(), this.showPassword = !this.showPassword, this.focus();
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
static {
|
|
31
|
+
this.styles = [super.styles, m];
|
|
32
|
+
}
|
|
33
|
+
static {
|
|
34
|
+
this.dependencies = {
|
|
35
|
+
"u-icon": f,
|
|
36
|
+
"u-tooltip": g
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
updated(i) {
|
|
40
|
+
super.updated(i), i.has("value") && this.input && this.input.value !== this.value && (this.input.value = this.value);
|
|
41
|
+
}
|
|
42
|
+
render() {
|
|
43
|
+
return o`
|
|
44
|
+
${this.renderHeader()}
|
|
45
|
+
|
|
46
|
+
<div class="container"
|
|
47
|
+
?invalid=${this.isInvalid}
|
|
48
|
+
?disabled=${this.disabled}
|
|
49
|
+
?readonly=${this.readonly}>
|
|
50
|
+
<slot name="prefix" class="prefix"></slot>
|
|
51
|
+
|
|
52
|
+
<input part="input"
|
|
53
|
+
type=${this.type === "password" && this.showPassword ? "text" : this.type}
|
|
54
|
+
name=${r(this.name)}
|
|
55
|
+
?required=${this.required}
|
|
56
|
+
?disabled=${this.disabled}
|
|
57
|
+
?readonly=${this.readonly}
|
|
58
|
+
placeholder=${r(this.placeholder)}
|
|
59
|
+
minlength=${r(this.minlength)}
|
|
60
|
+
maxlength=${r(this.maxlength)}
|
|
61
|
+
spellcheck=${this.spellcheck}
|
|
62
|
+
autocomplete=${r(this.autocomplete)}
|
|
63
|
+
pattern=${r(this.pattern)}
|
|
64
|
+
.value=${y(this.value)}
|
|
65
|
+
@input=${this.handleInput}
|
|
66
|
+
@change=${this.handleChange}
|
|
67
|
+
@blur=${this.handleBlur}
|
|
68
|
+
/>
|
|
69
|
+
|
|
70
|
+
<slot name="suffix" class="suffix"></slot>
|
|
71
|
+
|
|
72
|
+
<div class="tools">
|
|
73
|
+
<u-icon class="tool" name=${this.showPassword ? "eye-slash" : "eye"}
|
|
74
|
+
?hidden=${this.type !== "password" || this.disabled || this.readonly}
|
|
75
|
+
@click=${this.handlePasswordToggle}
|
|
76
|
+
></u-icon>
|
|
77
|
+
<u-icon class="tool" name="x-lg"
|
|
78
|
+
?hidden=${!this.clearable || !this.value || this.disabled || this.readonly}
|
|
79
|
+
@click=${this.handleClear}
|
|
80
|
+
></u-icon>
|
|
81
|
+
</div>
|
|
82
|
+
</div>
|
|
83
|
+
|
|
84
|
+
<div class="validation-error" role="alert" ?hidden=${!this.currentValidationMessage}>
|
|
85
|
+
${this.currentValidationMessage}
|
|
86
|
+
</div>
|
|
87
|
+
|
|
88
|
+
<div class="description" ?hidden=${!this.description}>
|
|
89
|
+
${this.description}
|
|
90
|
+
</div>
|
|
91
|
+
`;
|
|
92
|
+
}
|
|
93
|
+
/** ๋ผ๋ฒจ ์์ญ์ ๋ ๋๋งํฉ๋๋ค. */
|
|
94
|
+
renderHeader() {
|
|
95
|
+
return this.label ? o`
|
|
96
|
+
<div class="header">
|
|
97
|
+
<label class="label" @click=${this.focus}>
|
|
98
|
+
${this.label}
|
|
99
|
+
${this.required ? o`<span class="required-mark">*</span>` : ""}
|
|
100
|
+
</label>
|
|
101
|
+
|
|
102
|
+
${this.labelhelp ? o`
|
|
103
|
+
<u-icon class="help-icon" name="info-circle-fill"></u-icon>
|
|
104
|
+
<u-tooltip trigger-selectors=".help-icon" placement="right-end">${this.labelhelp}</u-tooltip>
|
|
105
|
+
` : u}
|
|
106
|
+
</div>
|
|
107
|
+
` : u;
|
|
108
|
+
}
|
|
109
|
+
/** ์ ํจ์ฑ ๊ฒ์ฌ๋ฅผ ์ํํฉ๋๋ค. */
|
|
110
|
+
validate() {
|
|
111
|
+
if (!this.input) return !0;
|
|
112
|
+
const i = this.input.checkValidity();
|
|
113
|
+
return this.isInvalid = !i, i ? this.currentValidationMessage = "" : this.currentValidationMessage = this.validationMessage || this.input.validationMessage, i;
|
|
114
|
+
}
|
|
115
|
+
/** ์
๋ ฅ๊ฐ์ ์ด๊ธฐํํฉ๋๋ค. */
|
|
116
|
+
clear() {
|
|
117
|
+
this.value = "", this.isInvalid = !1, this.currentValidationMessage = "", this.focus(), this.emit("u-clear");
|
|
118
|
+
}
|
|
119
|
+
/** ์
๋ ฅ ํ๋์ ํฌ์ปค์ค๋ฅผ ์ค์ ํฉ๋๋ค. */
|
|
120
|
+
focus() {
|
|
121
|
+
this.input?.focus();
|
|
122
|
+
}
|
|
123
|
+
/** ์
๋ ฅ ํ๋์ ํฌ์ปค์ค๋ฅผ ํด์ ํฉ๋๋ค. */
|
|
124
|
+
blur() {
|
|
125
|
+
this.input?.blur();
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
t([
|
|
129
|
+
c("input")
|
|
130
|
+
], e.prototype, "input");
|
|
131
|
+
t([
|
|
132
|
+
p()
|
|
133
|
+
], e.prototype, "showPassword");
|
|
134
|
+
t([
|
|
135
|
+
p()
|
|
136
|
+
], e.prototype, "isInvalid");
|
|
137
|
+
t([
|
|
138
|
+
p()
|
|
139
|
+
], e.prototype, "currentValidationMessage");
|
|
140
|
+
t([
|
|
141
|
+
s({ type: String, reflect: !0 })
|
|
142
|
+
], e.prototype, "type");
|
|
143
|
+
t([
|
|
144
|
+
s({ type: Boolean, reflect: !0 })
|
|
145
|
+
], e.prototype, "required");
|
|
146
|
+
t([
|
|
147
|
+
s({ type: Boolean, reflect: !0 })
|
|
148
|
+
], e.prototype, "disabled");
|
|
149
|
+
t([
|
|
150
|
+
s({ type: Boolean, reflect: !0 })
|
|
151
|
+
], e.prototype, "clearable");
|
|
152
|
+
t([
|
|
153
|
+
s({ type: Boolean, reflect: !0 })
|
|
154
|
+
], e.prototype, "readonly");
|
|
155
|
+
t([
|
|
156
|
+
s({ type: String })
|
|
157
|
+
], e.prototype, "name");
|
|
158
|
+
t([
|
|
159
|
+
s({ type: String })
|
|
160
|
+
], e.prototype, "label");
|
|
161
|
+
t([
|
|
162
|
+
s({ type: String })
|
|
163
|
+
], e.prototype, "labelhelp");
|
|
164
|
+
t([
|
|
165
|
+
s({ type: String })
|
|
166
|
+
], e.prototype, "placeholder");
|
|
167
|
+
t([
|
|
168
|
+
s({ type: String })
|
|
169
|
+
], e.prototype, "description");
|
|
170
|
+
t([
|
|
171
|
+
s({ type: Number })
|
|
172
|
+
], e.prototype, "minlength");
|
|
173
|
+
t([
|
|
174
|
+
s({ type: Number })
|
|
175
|
+
], e.prototype, "maxlength");
|
|
176
|
+
t([
|
|
177
|
+
s({ type: Boolean })
|
|
178
|
+
], e.prototype, "spellcheck");
|
|
179
|
+
t([
|
|
180
|
+
s({ type: String })
|
|
181
|
+
], e.prototype, "autocomplete");
|
|
182
|
+
t([
|
|
183
|
+
s({ type: String })
|
|
184
|
+
], e.prototype, "value");
|
|
185
|
+
t([
|
|
186
|
+
s({ type: String })
|
|
187
|
+
], e.prototype, "pattern");
|
|
188
|
+
t([
|
|
189
|
+
s({ type: String })
|
|
190
|
+
], e.prototype, "validationMessage");
|
|
191
|
+
export {
|
|
192
|
+
e as Input
|
|
193
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const styles: import('lit').CSSResult;
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import { css as o } from "lit";
|
|
2
|
+
const r = o`
|
|
3
|
+
:host {
|
|
4
|
+
display: inline-block;
|
|
5
|
+
font-size: inherit;
|
|
6
|
+
}
|
|
7
|
+
:host([disabled]) {
|
|
8
|
+
opacity: 0.5;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/* ํค๋ ์์ญ */
|
|
12
|
+
.header {
|
|
13
|
+
display: flex;
|
|
14
|
+
align-items: center;
|
|
15
|
+
gap: 0.375em;
|
|
16
|
+
margin-bottom: 0.5em;
|
|
17
|
+
}
|
|
18
|
+
.header .label {
|
|
19
|
+
font-size: 0.8em;
|
|
20
|
+
font-weight: 500;
|
|
21
|
+
line-height: 1;
|
|
22
|
+
color: var(--u-text-color);
|
|
23
|
+
user-select: none;
|
|
24
|
+
cursor: pointer;
|
|
25
|
+
}
|
|
26
|
+
.header .required-mark {
|
|
27
|
+
color: var(--u-red-600);
|
|
28
|
+
margin-left: 0.25em;
|
|
29
|
+
}
|
|
30
|
+
.header .help-icon {
|
|
31
|
+
font-size: 0.8em;
|
|
32
|
+
cursor: help;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/* ์
๋ ฅ ๋ํผ */
|
|
36
|
+
.container {
|
|
37
|
+
display: flex;
|
|
38
|
+
align-items: center;
|
|
39
|
+
gap: 0.5em;
|
|
40
|
+
padding: 0.5em 0.75em;
|
|
41
|
+
background-color: var(--u-bg-color);
|
|
42
|
+
border: 1px solid var(--u-input-border-color);
|
|
43
|
+
border-radius: 0.375em;
|
|
44
|
+
transition: border-color 0.2s ease, box-shadow 0.2s ease;
|
|
45
|
+
}
|
|
46
|
+
.container[invalid] {
|
|
47
|
+
border-color: var(--u-red-600);
|
|
48
|
+
}
|
|
49
|
+
.container[invalid]:focus-within {
|
|
50
|
+
box-shadow: 0 0 0 0.125em rgba(244, 67, 54, 0.1);
|
|
51
|
+
}
|
|
52
|
+
.container[disabled] {
|
|
53
|
+
background-color: var(--u-bg-color-disabled);
|
|
54
|
+
border-color: var(--u-border-color-weak);
|
|
55
|
+
cursor: not-allowed;
|
|
56
|
+
}
|
|
57
|
+
.container[readonly] {
|
|
58
|
+
background-color: var(--u-neutral-50);
|
|
59
|
+
border-color: var(--u-border-color-weak);
|
|
60
|
+
}
|
|
61
|
+
.container:hover:not(([disabled])):not(([readonly])) {
|
|
62
|
+
border-color: var(--u-input-border-hover);
|
|
63
|
+
}
|
|
64
|
+
.container:focus-within:not(([disabled])):not(([readonly])) {
|
|
65
|
+
border-color: var(--u-input-border-focus);
|
|
66
|
+
box-shadow: 0 0 0 0.125em rgba(33, 150, 243, 0.1);
|
|
67
|
+
outline: none;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/* ์
๋ ฅ ํ๋ */
|
|
71
|
+
input {
|
|
72
|
+
flex: 1;
|
|
73
|
+
min-width: 0;
|
|
74
|
+
border: none;
|
|
75
|
+
background: transparent;
|
|
76
|
+
outline: none;
|
|
77
|
+
font-family: inherit;
|
|
78
|
+
font-size: 1em;
|
|
79
|
+
line-height: 1.5;
|
|
80
|
+
color: var(--u-text-color);
|
|
81
|
+
padding: 0;
|
|
82
|
+
}
|
|
83
|
+
input::placeholder {
|
|
84
|
+
color: var(--u-text-color-disabled);
|
|
85
|
+
}
|
|
86
|
+
input:disabled {
|
|
87
|
+
cursor: not-allowed;
|
|
88
|
+
color: var(--u-text-color-disabled);
|
|
89
|
+
}
|
|
90
|
+
input:read-only {
|
|
91
|
+
cursor: default;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/* Prefix & Suffix ์ฌ๋กฏ */
|
|
95
|
+
::slotted([slot="prefix"]),
|
|
96
|
+
::slotted([slot="suffix"]) {
|
|
97
|
+
display: contents;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/* Tools ์์ญ (clear, password toggle ๋ฑ) */
|
|
101
|
+
.tools {
|
|
102
|
+
display: flex;
|
|
103
|
+
flex-direction: row;
|
|
104
|
+
align-items: center;
|
|
105
|
+
gap: 0.375em;
|
|
106
|
+
}
|
|
107
|
+
.tool {
|
|
108
|
+
font-size: 1.125em;
|
|
109
|
+
color: var(--u-icon-color);
|
|
110
|
+
transition: color 0.2s ease;
|
|
111
|
+
cursor: pointer;
|
|
112
|
+
}
|
|
113
|
+
.tool:hover {
|
|
114
|
+
color: var(--u-icon-color-hover);
|
|
115
|
+
}
|
|
116
|
+
.tool:active {
|
|
117
|
+
color: var(--u-icon-color-active);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
/* ์ ํจ์ฑ ๊ฒ์ฌ ์๋ฌ ๋ฉ์์ง */
|
|
121
|
+
.validation-error {
|
|
122
|
+
margin-top: 0.375em;
|
|
123
|
+
font-size: 0.8125em;
|
|
124
|
+
color: var(--u-red-600);
|
|
125
|
+
line-height: 1.4;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/* ์ค๋ช
ํ
์คํธ */
|
|
129
|
+
.description {
|
|
130
|
+
margin-top: 0.375em;
|
|
131
|
+
font-size: 0.8125em;
|
|
132
|
+
color: var(--u-soft-text-color);
|
|
133
|
+
line-height: 1.4;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/* Number input ๊ธฐ๋ณธ ์คํ์ผ ์ ๊ฑฐ (๋ธ๋ผ์ฐ์ ๊ฐ ์ผ๊ด์ฑ ์ํด) */
|
|
137
|
+
input[type="number"] {
|
|
138
|
+
-moz-appearance: textfield;
|
|
139
|
+
}
|
|
140
|
+
/* Number input ์คํผ๋ ์ ๊ฑฐ ์ต์
(์ ํ์ ) */
|
|
141
|
+
input[type="number"]::-webkit-inner-spin-button,
|
|
142
|
+
input[type="number"]::-webkit-outer-spin-button {
|
|
143
|
+
-webkit-appearance: none;
|
|
144
|
+
margin: 0;
|
|
145
|
+
}
|
|
146
|
+
`;
|
|
147
|
+
export {
|
|
148
|
+
r as styles
|
|
149
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { PropertyValues } from 'lit';
|
|
2
|
+
import { BaseElement } from '../BaseElement.js';
|
|
3
|
+
/**
|
|
4
|
+
* Menu ์ปดํฌ๋ํธ๋ ์ผ๋ฐ์ ์ธ ๋ฉ๋ด ์ปจํ
์ด๋์
๋๋ค.
|
|
5
|
+
* MenuItem ์ปดํฌ๋ํธ๋ฅผ ์์์ผ๋ก ํฌํจํ์ฌ ๋ฉ๋ด๋ฅผ ๊ตฌ์ฑํฉ๋๋ค.
|
|
6
|
+
*/
|
|
7
|
+
export declare class Menu extends BaseElement {
|
|
8
|
+
static styles: import('lit').CSSResultGroup[];
|
|
9
|
+
static dependencies: Record<string, typeof BaseElement>;
|
|
10
|
+
/** ์ฌ๋กฏ์ ํ ๋น๋ ๋ฉ๋ด ํญ๋ชฉ๋ค์ ๊ฐ์ ธ์ต๋๋ค. */
|
|
11
|
+
private items;
|
|
12
|
+
/** ๋ฉ๋ด๊ฐ ์ด๋ ค์๋์ง ์ฌ๋ถ์
๋๋ค. */
|
|
13
|
+
open: boolean;
|
|
14
|
+
/** ๋ฉ๋ด ํญ๋ชฉ ์ค ํ๋๋ง ์ ํํ ์ ์๋์ง ์ฌ๋ถ์
๋๋ค. */
|
|
15
|
+
selectable: boolean;
|
|
16
|
+
/** ํ์ฌ ์ ํ๋ ๋ฉ๋ด ํญ๋ชฉ์ ๊ฐ์
๋๋ค. */
|
|
17
|
+
value: string;
|
|
18
|
+
connectedCallback(): void;
|
|
19
|
+
disconnectedCallback(): void;
|
|
20
|
+
protected updated(changedProperties: PropertyValues): void;
|
|
21
|
+
render(): import('lit-html').TemplateResult<1>;
|
|
22
|
+
/** ๋ฉ๋ด๋ฅผ ํ์ํฉ๋๋ค. */
|
|
23
|
+
show: () => Promise<void>;
|
|
24
|
+
/** ๋ฉ๋ด๋ฅผ ์จ๊น๋๋ค. */
|
|
25
|
+
hide: () => Promise<void>;
|
|
26
|
+
/** open ์ํ๊ฐ ๋ณ๊ฒฝ๋ ๋ ํธ์ถ๋ฉ๋๋ค. */
|
|
27
|
+
private updateOpenState;
|
|
28
|
+
/** ์ ํ ์ํ๋ฅผ ์
๋ฐ์ดํธํฉ๋๋ค. */
|
|
29
|
+
private updateSelection;
|
|
30
|
+
/** ์ฌ๋กฏ ๋ณ๊ฒฝ ์ด๋ฒคํธ๋ฅผ ์ฒ๋ฆฌํฉ๋๋ค. */
|
|
31
|
+
private handleSlotChange;
|
|
32
|
+
/** ๋ฉ๋ด ํญ๋ชฉ ์ ํ ์ด๋ฒคํธ๋ฅผ ์ฒ๋ฆฌํฉ๋๋ค. */
|
|
33
|
+
private handleSelect;
|
|
34
|
+
/** ํค๋ณด๋ ๋ค๋น๊ฒ์ด์
์ ์ฒ๋ฆฌํฉ๋๋ค. */
|
|
35
|
+
private handleKeydown;
|
|
36
|
+
}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { html as c } from "lit";
|
|
2
|
+
import { queryAssignedElements as u, property as o } from "lit/decorators.js";
|
|
3
|
+
import { BaseElement as d } from "../BaseElement.js";
|
|
4
|
+
import { MenuItem as p } from "../menu-item/MenuItem.js";
|
|
5
|
+
import { styles as m } from "./Menu.styles.js";
|
|
6
|
+
var f = Object.defineProperty, i = (r, e, t, n) => {
|
|
7
|
+
for (var s = void 0, a = r.length - 1, h; a >= 0; a--)
|
|
8
|
+
(h = r[a]) && (s = h(e, t, s) || s);
|
|
9
|
+
return s && f(e, t, s), s;
|
|
10
|
+
};
|
|
11
|
+
class l extends d {
|
|
12
|
+
constructor() {
|
|
13
|
+
super(...arguments), this.open = !1, this.selectable = !1, this.value = "", this.show = async () => {
|
|
14
|
+
await this.updateComplete, requestAnimationFrame(() => {
|
|
15
|
+
this.open = !0;
|
|
16
|
+
});
|
|
17
|
+
}, this.hide = async () => {
|
|
18
|
+
await this.updateComplete, requestAnimationFrame(() => {
|
|
19
|
+
this.open = !1;
|
|
20
|
+
});
|
|
21
|
+
}, this.handleSlotChange = () => {
|
|
22
|
+
this.selectable && this.value && this.updateSelection();
|
|
23
|
+
}, this.handleSelect = (e) => {
|
|
24
|
+
const t = e, n = e.target;
|
|
25
|
+
this.selectable && n && (this.value = n.value || t.detail?.value || "", this.updateSelection());
|
|
26
|
+
}, this.handleKeydown = (e) => {
|
|
27
|
+
const t = this.items.filter((a) => !a.disabled);
|
|
28
|
+
if (t.length === 0) return;
|
|
29
|
+
const n = t.findIndex((a) => a === e.target);
|
|
30
|
+
let s = n;
|
|
31
|
+
switch (e.key) {
|
|
32
|
+
case "ArrowDown":
|
|
33
|
+
e.preventDefault(), s = (n + 1) % t.length, t[s].focus();
|
|
34
|
+
break;
|
|
35
|
+
case "ArrowUp":
|
|
36
|
+
e.preventDefault(), s = n - 1 < 0 ? t.length - 1 : n - 1, t[s].focus();
|
|
37
|
+
break;
|
|
38
|
+
case "Home":
|
|
39
|
+
e.preventDefault(), t[0].focus();
|
|
40
|
+
break;
|
|
41
|
+
case "End":
|
|
42
|
+
e.preventDefault(), t[t.length - 1].focus();
|
|
43
|
+
break;
|
|
44
|
+
case "Enter":
|
|
45
|
+
case " ":
|
|
46
|
+
e.preventDefault(), n >= 0 && t[n].click();
|
|
47
|
+
break;
|
|
48
|
+
case "Escape":
|
|
49
|
+
e.preventDefault(), this.hide();
|
|
50
|
+
break;
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
static {
|
|
55
|
+
this.styles = [super.styles, m];
|
|
56
|
+
}
|
|
57
|
+
static {
|
|
58
|
+
this.dependencies = {
|
|
59
|
+
"u-menu-item": p
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
connectedCallback() {
|
|
63
|
+
super.connectedCallback(), this.setAttribute("role", "menu"), this.addEventListener("u-select", this.handleSelect), this.addEventListener("keydown", this.handleKeydown);
|
|
64
|
+
}
|
|
65
|
+
disconnectedCallback() {
|
|
66
|
+
this.removeEventListener("u-select", this.handleSelect), this.removeEventListener("keydown", this.handleKeydown), super.disconnectedCallback();
|
|
67
|
+
}
|
|
68
|
+
updated(e) {
|
|
69
|
+
super.updated(e), e.has("value") && this.selectable && this.updateSelection(), e.has("open") && this.updateOpenState(this.open);
|
|
70
|
+
}
|
|
71
|
+
render() {
|
|
72
|
+
return c`
|
|
73
|
+
<div class="container">
|
|
74
|
+
<slot @slotchange=${this.handleSlotChange}></slot>
|
|
75
|
+
</div>
|
|
76
|
+
`;
|
|
77
|
+
}
|
|
78
|
+
/** open ์ํ๊ฐ ๋ณ๊ฒฝ๋ ๋ ํธ์ถ๋ฉ๋๋ค. */
|
|
79
|
+
updateOpenState(e) {
|
|
80
|
+
e ? this.emit("u-show") : this.emit("u-hide");
|
|
81
|
+
}
|
|
82
|
+
/** ์ ํ ์ํ๋ฅผ ์
๋ฐ์ดํธํฉ๋๋ค. */
|
|
83
|
+
updateSelection() {
|
|
84
|
+
this.items.forEach((e) => {
|
|
85
|
+
e.selected = e.value === this.value;
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
i([
|
|
90
|
+
u({ selector: "u-menu-item" })
|
|
91
|
+
], l.prototype, "items");
|
|
92
|
+
i([
|
|
93
|
+
o({ type: Boolean, reflect: !0 })
|
|
94
|
+
], l.prototype, "open");
|
|
95
|
+
i([
|
|
96
|
+
o({ type: Boolean })
|
|
97
|
+
], l.prototype, "selectable");
|
|
98
|
+
i([
|
|
99
|
+
o({ type: String })
|
|
100
|
+
], l.prototype, "value");
|
|
101
|
+
export {
|
|
102
|
+
l as Menu
|
|
103
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const styles: import('lit').CSSResult;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { css as o } from "lit";
|
|
2
|
+
const t = o`
|
|
3
|
+
:host {
|
|
4
|
+
display: block;
|
|
5
|
+
width: max-content;
|
|
6
|
+
min-width: 180px;
|
|
7
|
+
|
|
8
|
+
opacity: 0;
|
|
9
|
+
transform: scale(0.95);
|
|
10
|
+
transform-origin: top left;
|
|
11
|
+
transition: opacity 0.2s ease, transform 0.2s ease;
|
|
12
|
+
pointer-events: none;
|
|
13
|
+
}
|
|
14
|
+
:host([open]) {
|
|
15
|
+
opacity: 1;
|
|
16
|
+
transform: scale(1);
|
|
17
|
+
pointer-events: auto;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.container {
|
|
21
|
+
display: flex;
|
|
22
|
+
flex-direction: column;
|
|
23
|
+
gap: 2px;
|
|
24
|
+
padding: 4px;
|
|
25
|
+
border: 1px solid var(--u-border-color, #ddd);
|
|
26
|
+
border-radius: 8px;
|
|
27
|
+
background-color: var(--u-bg-color, #fff);
|
|
28
|
+
overflow: auto;
|
|
29
|
+
}
|
|
30
|
+
`;
|
|
31
|
+
export {
|
|
32
|
+
t as styles
|
|
33
|
+
};
|