@iyulab/components 0.1.11 → 0.2.1
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 +113 -59
- package/LICENSE +20 -20
- package/README.md +283 -26
- package/dist/assets/icons/arrow-down.svg.js +1 -1
- package/dist/assets/icons/arrow-repeat.svg.js +3 -0
- package/dist/assets/icons/arrow-up.svg.js +1 -1
- package/dist/assets/icons/ban.svg.js +1 -1
- package/dist/assets/icons/bell-fill.svg.js +1 -1
- package/dist/assets/icons/box-arrow-up-right.svg.js +3 -0
- package/dist/assets/icons/check-circle-fill.svg.js +1 -1
- package/dist/assets/icons/check-lg.svg.js +1 -1
- package/dist/assets/icons/chevron-down.svg.js +1 -1
- package/dist/assets/icons/chevron-left.svg.js +1 -1
- package/dist/assets/icons/chevron-right.svg.js +1 -1
- package/dist/assets/icons/chevron-up.svg.js +1 -1
- package/dist/assets/icons/copy.svg.js +1 -1
- package/dist/assets/icons/dash-lg.svg.js +1 -1
- package/dist/assets/icons/exclamation-circle-fill.svg.js +1 -1
- package/dist/assets/icons/exclamation-triangle-fill.svg.js +1 -1
- package/dist/assets/icons/eye-slash.svg.js +1 -1
- package/dist/assets/icons/eye.svg.js +1 -1
- package/dist/assets/icons/file-earmark.svg.js +3 -0
- package/dist/assets/icons/flag.svg.js +3 -0
- package/dist/assets/icons/globe.svg.js +3 -0
- package/dist/assets/icons/hand-thumbs-down-fill.svg.js +3 -0
- package/dist/assets/icons/hand-thumbs-down.svg.js +3 -0
- package/dist/assets/icons/hand-thumbs-up-fill.svg.js +3 -0
- package/dist/assets/icons/hand-thumbs-up.svg.js +3 -0
- package/dist/assets/icons/info-circle-fill.svg.js +1 -1
- package/dist/assets/icons/layout-sidebar.svg.js +1 -1
- package/dist/assets/icons/lightbulb-fill.svg.js +1 -1
- package/dist/assets/icons/lightbulb-off.svg.js +1 -1
- package/dist/assets/icons/lightbulb.svg.js +1 -1
- package/dist/assets/icons/mic-fill.svg.js +1 -1
- package/dist/assets/icons/mic-mute-fill.svg.js +1 -1
- package/dist/assets/icons/paperclip.svg.js +1 -1
- package/dist/assets/icons/pencil-square.svg.js +1 -1
- package/dist/assets/icons/plus-lg.svg.js +1 -1
- package/dist/assets/icons/search.svg.js +1 -1
- package/dist/assets/icons/share.svg.js +3 -0
- package/dist/assets/icons/stop-circle.svg.js +3 -0
- package/dist/assets/icons/tools.svg.js +3 -0
- package/dist/assets/icons/x-lg.svg.js +1 -1
- package/dist/assets/styles/dark.css +129 -129
- package/dist/assets/styles/dark.css.js +1 -1
- package/dist/assets/styles/light.css +129 -129
- package/dist/assets/styles/light.css.js +1 -1
- package/dist/components/FloatingElement.d.ts +13 -5
- package/dist/components/FloatingElement.js +31 -14
- package/dist/components/button/UButton.component.d.ts +7 -0
- package/dist/components/button/UButton.component.js +20 -1
- package/dist/components/button/UButton.styles.js +51 -8
- package/dist/components/dialog/UDialog.component.d.ts +2 -0
- package/dist/components/dialog/UDialog.component.js +14 -9
- package/dist/components/drawer/UDrawer.component.d.ts +2 -0
- package/dist/components/drawer/UDrawer.component.js +14 -9
- package/dist/components/form/UForm.component.js +3 -3
- package/dist/components/icon/UIcon.component.d.ts +1 -4
- package/dist/components/icon/UIcon.component.js +2 -2
- package/dist/components/menu/UMenu.component.js +53 -41
- package/dist/components/menu-item/UMenuItem.component.d.ts +2 -2
- package/dist/components/menu-item/UMenuItem.component.js +1 -2
- package/dist/components/split-panel/USplitPanel.component.js +4 -4
- package/dist/components/tag/UTag.component.d.ts +23 -0
- package/dist/components/tag/UTag.component.js +72 -0
- package/dist/components/tag/UTag.d.ts +8 -0
- package/dist/components/tag/UTag.js +5 -0
- package/dist/components/tag/UTag.styles.js +83 -0
- package/dist/components/tooltip/UTooltip.component.d.ts +8 -0
- package/dist/components/tooltip/UTooltip.component.js +59 -17
- package/dist/components/tooltip/UTooltip.styles.js +15 -0
- package/dist/index.d.ts +4 -3
- package/dist/index.js +5 -4
- package/dist/react-components/UTag.d.ts +8 -0
- package/dist/react-components/UTag.js +10 -0
- package/dist/react-components/index.d.ts +1 -1
- package/dist/react-components/index.js +1 -1
- package/dist/utilities/{icons.d.ts → IconRegistry.d.ts} +20 -26
- package/dist/utilities/{icons.js → IconRegistry.js} +29 -20
- package/dist/utilities/{notifier.d.ts → Notifier.d.ts} +8 -13
- package/dist/utilities/{notifier.js → Notifier.js} +8 -10
- package/dist/utilities/{theme.d.ts → Theme.d.ts} +13 -18
- package/dist/utilities/{theme.js → Theme.js} +39 -35
- package/dist/{internals/attribute-converters.d.ts → utilities/converters.d.ts} +1 -1
- package/dist/{internals/attribute-converters.js → utilities/converters.js} +2 -2
- package/dist/{internals/node-helpers.js → utilities/elements.js} +6 -5
- package/package.json +60 -60
- package/dist/assets/icons/arrow-clockwise.svg.js +0 -3
- package/dist/assets/icons/speedometer.svg.js +0 -3
- package/dist/components/icon-button/UIconButton.component.d.ts +0 -20
- package/dist/components/icon-button/UIconButton.component.js +0 -59
- package/dist/components/icon-button/UIconButton.d.ts +0 -7
- package/dist/components/icon-button/UIconButton.js +0 -5
- package/dist/components/icon-button/UIconButton.styles.js +0 -54
- package/dist/internals/react-wrapper.d.ts +0 -21
- package/dist/react-components/UIconButton.d.ts +0 -8
- package/dist/react-components/UIconButton.js +0 -10
- /package/dist/components/{icon-button/UIconButton.styles.d.ts → tag/UTag.styles.d.ts} +0 -0
- /package/dist/{internals/node-helpers.d.ts → utilities/elements.d.ts} +0 -0
|
@@ -1,130 +1,130 @@
|
|
|
1
|
-
:root {
|
|
2
|
-
color-scheme: light;
|
|
3
|
-
|
|
4
|
-
/* Neutral Colors */
|
|
5
|
-
--u-neutral-0: #FFFFFF;
|
|
6
|
-
--u-neutral-50: #FAFAFA;
|
|
7
|
-
--u-neutral-100: #F5F5F5;
|
|
8
|
-
--u-neutral-200: #EEEEEE;
|
|
9
|
-
--u-neutral-300: #E0E0E0;
|
|
10
|
-
--u-neutral-400: #BDBDBD;
|
|
11
|
-
--u-neutral-500: #9E9E9E;
|
|
12
|
-
--u-neutral-600: #757575;
|
|
13
|
-
--u-neutral-700: #616161;
|
|
14
|
-
--u-neutral-800: #424242;
|
|
15
|
-
--u-neutral-900: #212121;
|
|
16
|
-
--u-neutral-1000: #000000;
|
|
17
|
-
|
|
18
|
-
/* Blue Colors */
|
|
19
|
-
--u-blue-0: #E3F2FD;
|
|
20
|
-
--u-blue-100: #BBDEFB;
|
|
21
|
-
--u-blue-200: #90CAF9;
|
|
22
|
-
--u-blue-300: #64B5F6;
|
|
23
|
-
--u-blue-400: #42A5F5;
|
|
24
|
-
--u-blue-500: #2196F3;
|
|
25
|
-
--u-blue-600: #1E88E5;
|
|
26
|
-
--u-blue-700: #1976D2;
|
|
27
|
-
--u-blue-800: #1565C0;
|
|
28
|
-
--u-blue-900: #0D47A1;
|
|
29
|
-
--u-blue-1000: #062A5E;
|
|
30
|
-
|
|
31
|
-
/* Green Colors */
|
|
32
|
-
--u-green-0: #E8F5E9;
|
|
33
|
-
--u-green-100: #C8E6C9;
|
|
34
|
-
--u-green-200: #A5D6A7;
|
|
35
|
-
--u-green-300: #81C784;
|
|
36
|
-
--u-green-400: #66BB6A;
|
|
37
|
-
--u-green-500: #4CAF50;
|
|
38
|
-
--u-green-600: #43A047;
|
|
39
|
-
--u-green-700: #388E3C;
|
|
40
|
-
--u-green-800: #2E7D32;
|
|
41
|
-
--u-green-900: #1B5E20;
|
|
42
|
-
--u-green-1000: #0F3A12;
|
|
43
|
-
|
|
44
|
-
/* Yellow Colors */
|
|
45
|
-
--u-yellow-0: #FFFDE7;
|
|
46
|
-
--u-yellow-100: #FFF9C4;
|
|
47
|
-
--u-yellow-200: #FFF59D;
|
|
48
|
-
--u-yellow-300: #FFF176;
|
|
49
|
-
--u-yellow-400: #FFEE58;
|
|
50
|
-
--u-yellow-500: #FFEB3B;
|
|
51
|
-
--u-yellow-600: #FDD835;
|
|
52
|
-
--u-yellow-700: #FBC02D;
|
|
53
|
-
--u-yellow-800: #F9A825;
|
|
54
|
-
--u-yellow-900: #F57F17;
|
|
55
|
-
--u-yellow-1000: #8A4A00;
|
|
56
|
-
|
|
57
|
-
/* Red Colors */
|
|
58
|
-
--u-red-0: #FFEBEE;
|
|
59
|
-
--u-red-100: #FFCDD2;
|
|
60
|
-
--u-red-200: #EF9A9A;
|
|
61
|
-
--u-red-300: #E57373;
|
|
62
|
-
--u-red-400: #EF5350;
|
|
63
|
-
--u-red-500: #F44336;
|
|
64
|
-
--u-red-600: #E53935;
|
|
65
|
-
--u-red-700: #D32F2F;
|
|
66
|
-
--u-red-800: #C62828;
|
|
67
|
-
--u-red-900: #B71C1C;
|
|
68
|
-
--u-red-1000: #6B0F0F;
|
|
69
|
-
|
|
70
|
-
/* text Colors */
|
|
71
|
-
--u-txt-color: var(--u-neutral-900);
|
|
72
|
-
--u-txt-color-inverse: var(--u-neutral-0);
|
|
73
|
-
--u-txt-color-hover: var(--u-blue-600);
|
|
74
|
-
--u-txt-color-active: var(--u-blue-600);
|
|
75
|
-
--u-txt-color-disabled: var(--u-neutral-400);
|
|
76
|
-
--u-txt-color-weak: var(--u-neutral-700);
|
|
77
|
-
--u-txt-color-strong: var(--u-neutral-1000);
|
|
78
|
-
|
|
79
|
-
--u-link-txt-color: var(--u-blue-700);
|
|
80
|
-
--u-tooltip-txt-color: var(--u-neutral-0);
|
|
81
|
-
|
|
82
|
-
/* Icon Colors */
|
|
83
|
-
--u-icon-color: var(--u-neutral-700);
|
|
84
|
-
--u-icon-color-inverse: var(--u-neutral-0);
|
|
85
|
-
--u-icon-color-hover: var(--u-blue-600);
|
|
86
|
-
--u-icon-color-active: var(--u-blue-600);
|
|
87
|
-
--u-icon-color-disabled: var(--u-neutral-400);
|
|
88
|
-
|
|
89
|
-
/* border Colors */
|
|
90
|
-
--u-border-color: var(--u-neutral-300);
|
|
91
|
-
--u-border-color-weak: var(--u-neutral-200);
|
|
92
|
-
--u-border-color-strong: var(--u-neutral-400);
|
|
93
|
-
|
|
94
|
-
--u-input-border-color: var(--u-neutral-300);
|
|
95
|
-
--u-input-border-color-hover: var(--u-neutral-400);
|
|
96
|
-
--u-input-border-color-focus: var(--u-blue-600);
|
|
97
|
-
--u-input-border-color-invalid: var(--u-red-600);
|
|
98
|
-
|
|
99
|
-
/* background Colors */
|
|
100
|
-
--u-bg-color: var(--u-neutral-0);
|
|
101
|
-
--u-bg-color-inverse: var(--u-neutral-900);
|
|
102
|
-
--u-bg-color-hover: var(--u-neutral-100);
|
|
103
|
-
--u-bg-color-active: var(--u-neutral-200);
|
|
104
|
-
--u-bg-color-disabled: var(--u-neutral-50);
|
|
105
|
-
|
|
106
|
-
--u-input-bg-color: var(--u-neutral-0);
|
|
107
|
-
--u-panel-bg-color: var(--u-neutral-0);
|
|
108
|
-
--u-overlay-bg-color: rgba(0, 0, 0, 0.5);
|
|
109
|
-
--u-tooltip-bg-color: rgba(0, 0, 0, 0.75);
|
|
110
|
-
|
|
111
|
-
/* Shadow Colors */
|
|
112
|
-
--u-shadow-color-weaker: rgba(0, 0, 0, 0.04);
|
|
113
|
-
--u-shadow-color-weak: rgba(0, 0, 0, 0.08);
|
|
114
|
-
--u-shadow-color-normal: rgba(0, 0, 0, 0.12);
|
|
115
|
-
--u-shadow-color-strong: rgba(0, 0, 0, 0.16);
|
|
116
|
-
--u-shadow-color-stronger: rgba(0, 0, 0, 0.24);
|
|
117
|
-
|
|
118
|
-
/* Scrollbar Colors */
|
|
119
|
-
--u-scrollbar-color: var(--u-neutral-400);
|
|
120
|
-
--u-scrollbar-color-hover: var(--u-neutral-500);
|
|
121
|
-
--u-scrollbar-track-color: transparent;
|
|
122
|
-
|
|
123
|
-
/* Font Styles */
|
|
124
|
-
--u-font-base: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';
|
|
125
|
-
--u-font-mono: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Monaco, 'Courier New', monospace;
|
|
126
|
-
--u-font-serif: 'Georgia', 'Times New Roman', Times, serif;
|
|
127
|
-
--u-font-display: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif;
|
|
128
|
-
--u-font-modern: 'Inter', 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
|
|
129
|
-
--u-font-rounded: 'Nunito', 'Quicksand', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
|
|
1
|
+
:root {
|
|
2
|
+
color-scheme: light;
|
|
3
|
+
|
|
4
|
+
/* Neutral Colors */
|
|
5
|
+
--u-neutral-0: #FFFFFF;
|
|
6
|
+
--u-neutral-50: #FAFAFA;
|
|
7
|
+
--u-neutral-100: #F5F5F5;
|
|
8
|
+
--u-neutral-200: #EEEEEE;
|
|
9
|
+
--u-neutral-300: #E0E0E0;
|
|
10
|
+
--u-neutral-400: #BDBDBD;
|
|
11
|
+
--u-neutral-500: #9E9E9E;
|
|
12
|
+
--u-neutral-600: #757575;
|
|
13
|
+
--u-neutral-700: #616161;
|
|
14
|
+
--u-neutral-800: #424242;
|
|
15
|
+
--u-neutral-900: #212121;
|
|
16
|
+
--u-neutral-1000: #000000;
|
|
17
|
+
|
|
18
|
+
/* Blue Colors */
|
|
19
|
+
--u-blue-0: #E3F2FD;
|
|
20
|
+
--u-blue-100: #BBDEFB;
|
|
21
|
+
--u-blue-200: #90CAF9;
|
|
22
|
+
--u-blue-300: #64B5F6;
|
|
23
|
+
--u-blue-400: #42A5F5;
|
|
24
|
+
--u-blue-500: #2196F3;
|
|
25
|
+
--u-blue-600: #1E88E5;
|
|
26
|
+
--u-blue-700: #1976D2;
|
|
27
|
+
--u-blue-800: #1565C0;
|
|
28
|
+
--u-blue-900: #0D47A1;
|
|
29
|
+
--u-blue-1000: #062A5E;
|
|
30
|
+
|
|
31
|
+
/* Green Colors */
|
|
32
|
+
--u-green-0: #E8F5E9;
|
|
33
|
+
--u-green-100: #C8E6C9;
|
|
34
|
+
--u-green-200: #A5D6A7;
|
|
35
|
+
--u-green-300: #81C784;
|
|
36
|
+
--u-green-400: #66BB6A;
|
|
37
|
+
--u-green-500: #4CAF50;
|
|
38
|
+
--u-green-600: #43A047;
|
|
39
|
+
--u-green-700: #388E3C;
|
|
40
|
+
--u-green-800: #2E7D32;
|
|
41
|
+
--u-green-900: #1B5E20;
|
|
42
|
+
--u-green-1000: #0F3A12;
|
|
43
|
+
|
|
44
|
+
/* Yellow Colors */
|
|
45
|
+
--u-yellow-0: #FFFDE7;
|
|
46
|
+
--u-yellow-100: #FFF9C4;
|
|
47
|
+
--u-yellow-200: #FFF59D;
|
|
48
|
+
--u-yellow-300: #FFF176;
|
|
49
|
+
--u-yellow-400: #FFEE58;
|
|
50
|
+
--u-yellow-500: #FFEB3B;
|
|
51
|
+
--u-yellow-600: #FDD835;
|
|
52
|
+
--u-yellow-700: #FBC02D;
|
|
53
|
+
--u-yellow-800: #F9A825;
|
|
54
|
+
--u-yellow-900: #F57F17;
|
|
55
|
+
--u-yellow-1000: #8A4A00;
|
|
56
|
+
|
|
57
|
+
/* Red Colors */
|
|
58
|
+
--u-red-0: #FFEBEE;
|
|
59
|
+
--u-red-100: #FFCDD2;
|
|
60
|
+
--u-red-200: #EF9A9A;
|
|
61
|
+
--u-red-300: #E57373;
|
|
62
|
+
--u-red-400: #EF5350;
|
|
63
|
+
--u-red-500: #F44336;
|
|
64
|
+
--u-red-600: #E53935;
|
|
65
|
+
--u-red-700: #D32F2F;
|
|
66
|
+
--u-red-800: #C62828;
|
|
67
|
+
--u-red-900: #B71C1C;
|
|
68
|
+
--u-red-1000: #6B0F0F;
|
|
69
|
+
|
|
70
|
+
/* text Colors */
|
|
71
|
+
--u-txt-color: var(--u-neutral-900);
|
|
72
|
+
--u-txt-color-inverse: var(--u-neutral-0);
|
|
73
|
+
--u-txt-color-hover: var(--u-blue-600);
|
|
74
|
+
--u-txt-color-active: var(--u-blue-600);
|
|
75
|
+
--u-txt-color-disabled: var(--u-neutral-400);
|
|
76
|
+
--u-txt-color-weak: var(--u-neutral-700);
|
|
77
|
+
--u-txt-color-strong: var(--u-neutral-1000);
|
|
78
|
+
|
|
79
|
+
--u-link-txt-color: var(--u-blue-700);
|
|
80
|
+
--u-tooltip-txt-color: var(--u-neutral-0);
|
|
81
|
+
|
|
82
|
+
/* Icon Colors */
|
|
83
|
+
--u-icon-color: var(--u-neutral-700);
|
|
84
|
+
--u-icon-color-inverse: var(--u-neutral-0);
|
|
85
|
+
--u-icon-color-hover: var(--u-blue-600);
|
|
86
|
+
--u-icon-color-active: var(--u-blue-600);
|
|
87
|
+
--u-icon-color-disabled: var(--u-neutral-400);
|
|
88
|
+
|
|
89
|
+
/* border Colors */
|
|
90
|
+
--u-border-color: var(--u-neutral-300);
|
|
91
|
+
--u-border-color-weak: var(--u-neutral-200);
|
|
92
|
+
--u-border-color-strong: var(--u-neutral-400);
|
|
93
|
+
|
|
94
|
+
--u-input-border-color: var(--u-neutral-300);
|
|
95
|
+
--u-input-border-color-hover: var(--u-neutral-400);
|
|
96
|
+
--u-input-border-color-focus: var(--u-blue-600);
|
|
97
|
+
--u-input-border-color-invalid: var(--u-red-600);
|
|
98
|
+
|
|
99
|
+
/* background Colors */
|
|
100
|
+
--u-bg-color: var(--u-neutral-0);
|
|
101
|
+
--u-bg-color-inverse: var(--u-neutral-900);
|
|
102
|
+
--u-bg-color-hover: var(--u-neutral-100);
|
|
103
|
+
--u-bg-color-active: var(--u-neutral-200);
|
|
104
|
+
--u-bg-color-disabled: var(--u-neutral-50);
|
|
105
|
+
|
|
106
|
+
--u-input-bg-color: var(--u-neutral-0);
|
|
107
|
+
--u-panel-bg-color: var(--u-neutral-0);
|
|
108
|
+
--u-overlay-bg-color: rgba(0, 0, 0, 0.5);
|
|
109
|
+
--u-tooltip-bg-color: rgba(0, 0, 0, 0.75);
|
|
110
|
+
|
|
111
|
+
/* Shadow Colors */
|
|
112
|
+
--u-shadow-color-weaker: rgba(0, 0, 0, 0.04);
|
|
113
|
+
--u-shadow-color-weak: rgba(0, 0, 0, 0.08);
|
|
114
|
+
--u-shadow-color-normal: rgba(0, 0, 0, 0.12);
|
|
115
|
+
--u-shadow-color-strong: rgba(0, 0, 0, 0.16);
|
|
116
|
+
--u-shadow-color-stronger: rgba(0, 0, 0, 0.24);
|
|
117
|
+
|
|
118
|
+
/* Scrollbar Colors */
|
|
119
|
+
--u-scrollbar-color: var(--u-neutral-400);
|
|
120
|
+
--u-scrollbar-color-hover: var(--u-neutral-500);
|
|
121
|
+
--u-scrollbar-track-color: transparent;
|
|
122
|
+
|
|
123
|
+
/* Font Styles */
|
|
124
|
+
--u-font-base: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';
|
|
125
|
+
--u-font-mono: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Monaco, 'Courier New', monospace;
|
|
126
|
+
--u-font-serif: 'Georgia', 'Times New Roman', Times, serif;
|
|
127
|
+
--u-font-display: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif;
|
|
128
|
+
--u-font-modern: 'Inter', 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
|
|
129
|
+
--u-font-rounded: 'Nunito', 'Quicksand', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
|
|
130
130
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
const light = ":root {\n color-scheme: light;\n\n /* Neutral Colors */\n --u-neutral-0: #FFFFFF;\n --u-neutral-50: #FAFAFA;\n --u-neutral-100: #F5F5F5;\n --u-neutral-200: #EEEEEE;\n --u-neutral-300: #E0E0E0;\n --u-neutral-400: #BDBDBD;\n --u-neutral-500: #9E9E9E;\n --u-neutral-600: #757575;\n --u-neutral-700: #616161;\n --u-neutral-800: #424242;\n --u-neutral-900: #212121;\n --u-neutral-1000: #000000;\n\n /* Blue Colors */\n --u-blue-0: #E3F2FD;\n --u-blue-100: #BBDEFB;\n --u-blue-200: #90CAF9;\n --u-blue-300: #64B5F6;\n --u-blue-400: #42A5F5;\n --u-blue-500: #2196F3;\n --u-blue-600: #1E88E5;\n --u-blue-700: #1976D2;\n --u-blue-800: #1565C0;\n --u-blue-900: #0D47A1;\n --u-blue-1000: #062A5E;\n\n /* Green Colors */\n --u-green-0: #E8F5E9;\n --u-green-100: #C8E6C9;\n --u-green-200: #A5D6A7;\n --u-green-300: #81C784;\n --u-green-400: #66BB6A;\n --u-green-500: #4CAF50;\n --u-green-600: #43A047;\n --u-green-700: #388E3C;\n --u-green-800: #2E7D32;\n --u-green-900: #1B5E20;\n --u-green-1000: #0F3A12;\n\n /* Yellow Colors */\n --u-yellow-0: #FFFDE7;\n --u-yellow-100: #FFF9C4;\n --u-yellow-200: #FFF59D;\n --u-yellow-300: #FFF176;\n --u-yellow-400: #FFEE58;\n --u-yellow-500: #FFEB3B;\n --u-yellow-600: #FDD835;\n --u-yellow-700: #FBC02D;\n --u-yellow-800: #F9A825;\n --u-yellow-900: #F57F17;\n --u-yellow-1000: #8A4A00;\n\n /* Red Colors */\n --u-red-0: #FFEBEE;\n --u-red-100: #FFCDD2;\n --u-red-200: #EF9A9A;\n --u-red-300: #E57373;\n --u-red-400: #EF5350;\n --u-red-500: #F44336;\n --u-red-600: #E53935;\n --u-red-700: #D32F2F;\n --u-red-800: #C62828;\n --u-red-900: #B71C1C;\n --u-red-1000: #6B0F0F;\n\n /* text Colors */\n --u-txt-color: var(--u-neutral-900);\n --u-txt-color-inverse: var(--u-neutral-0);\n --u-txt-color-hover: var(--u-blue-600);\n --u-txt-color-active: var(--u-blue-600);\n --u-txt-color-disabled: var(--u-neutral-400);\n --u-txt-color-weak: var(--u-neutral-700);\n --u-txt-color-strong: var(--u-neutral-1000);\n\n --u-link-txt-color: var(--u-blue-700);\n --u-tooltip-txt-color: var(--u-neutral-0);\n\n /* Icon Colors */\n --u-icon-color: var(--u-neutral-700);\n --u-icon-color-inverse: var(--u-neutral-0);\n --u-icon-color-hover: var(--u-blue-600);\n --u-icon-color-active: var(--u-blue-600);\n --u-icon-color-disabled: var(--u-neutral-400);\n\n /* border Colors */\n --u-border-color: var(--u-neutral-300);\n --u-border-color-weak: var(--u-neutral-200);\n --u-border-color-strong: var(--u-neutral-400);\n\n --u-input-border-color: var(--u-neutral-300);\n --u-input-border-color-hover: var(--u-neutral-400);\n --u-input-border-color-focus: var(--u-blue-600);\n --u-input-border-color-invalid: var(--u-red-600);\n\n /* background Colors */\n --u-bg-color: var(--u-neutral-0);\n --u-bg-color-inverse: var(--u-neutral-900);\n --u-bg-color-hover: var(--u-neutral-100);\n --u-bg-color-active: var(--u-neutral-200);\n --u-bg-color-disabled: var(--u-neutral-50);\n \n --u-input-bg-color: var(--u-neutral-0);\n --u-panel-bg-color: var(--u-neutral-0);\n --u-overlay-bg-color: rgba(0, 0, 0, 0.5);\n --u-tooltip-bg-color: rgba(0, 0, 0, 0.75);\n\n /* Shadow Colors */\n --u-shadow-color-weaker: rgba(0, 0, 0, 0.04);\n --u-shadow-color-weak: rgba(0, 0, 0, 0.08);\n --u-shadow-color-normal: rgba(0, 0, 0, 0.12);\n --u-shadow-color-strong: rgba(0, 0, 0, 0.16);\n --u-shadow-color-stronger: rgba(0, 0, 0, 0.24);\n\n /* Scrollbar Colors */\n --u-scrollbar-color: var(--u-neutral-400);\n --u-scrollbar-color-hover: var(--u-neutral-500);\n --u-scrollbar-track-color: transparent;\n\n /* Font Styles */\n --u-font-base: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';\n --u-font-mono: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Monaco, 'Courier New', monospace;\n --u-font-serif: 'Georgia', 'Times New Roman', Times, serif;\n --u-font-display: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif;\n --u-font-modern: 'Inter', 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;\n --u-font-rounded: 'Nunito', 'Quicksand', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;\n}";
|
|
1
|
+
const light = ":root {\r\n color-scheme: light;\r\n\r\n /* Neutral Colors */\r\n --u-neutral-0: #FFFFFF;\r\n --u-neutral-50: #FAFAFA;\r\n --u-neutral-100: #F5F5F5;\r\n --u-neutral-200: #EEEEEE;\r\n --u-neutral-300: #E0E0E0;\r\n --u-neutral-400: #BDBDBD;\r\n --u-neutral-500: #9E9E9E;\r\n --u-neutral-600: #757575;\r\n --u-neutral-700: #616161;\r\n --u-neutral-800: #424242;\r\n --u-neutral-900: #212121;\r\n --u-neutral-1000: #000000;\r\n\r\n /* Blue Colors */\r\n --u-blue-0: #E3F2FD;\r\n --u-blue-100: #BBDEFB;\r\n --u-blue-200: #90CAF9;\r\n --u-blue-300: #64B5F6;\r\n --u-blue-400: #42A5F5;\r\n --u-blue-500: #2196F3;\r\n --u-blue-600: #1E88E5;\r\n --u-blue-700: #1976D2;\r\n --u-blue-800: #1565C0;\r\n --u-blue-900: #0D47A1;\r\n --u-blue-1000: #062A5E;\r\n\r\n /* Green Colors */\r\n --u-green-0: #E8F5E9;\r\n --u-green-100: #C8E6C9;\r\n --u-green-200: #A5D6A7;\r\n --u-green-300: #81C784;\r\n --u-green-400: #66BB6A;\r\n --u-green-500: #4CAF50;\r\n --u-green-600: #43A047;\r\n --u-green-700: #388E3C;\r\n --u-green-800: #2E7D32;\r\n --u-green-900: #1B5E20;\r\n --u-green-1000: #0F3A12;\r\n\r\n /* Yellow Colors */\r\n --u-yellow-0: #FFFDE7;\r\n --u-yellow-100: #FFF9C4;\r\n --u-yellow-200: #FFF59D;\r\n --u-yellow-300: #FFF176;\r\n --u-yellow-400: #FFEE58;\r\n --u-yellow-500: #FFEB3B;\r\n --u-yellow-600: #FDD835;\r\n --u-yellow-700: #FBC02D;\r\n --u-yellow-800: #F9A825;\r\n --u-yellow-900: #F57F17;\r\n --u-yellow-1000: #8A4A00;\r\n\r\n /* Red Colors */\r\n --u-red-0: #FFEBEE;\r\n --u-red-100: #FFCDD2;\r\n --u-red-200: #EF9A9A;\r\n --u-red-300: #E57373;\r\n --u-red-400: #EF5350;\r\n --u-red-500: #F44336;\r\n --u-red-600: #E53935;\r\n --u-red-700: #D32F2F;\r\n --u-red-800: #C62828;\r\n --u-red-900: #B71C1C;\r\n --u-red-1000: #6B0F0F;\r\n\r\n /* text Colors */\r\n --u-txt-color: var(--u-neutral-900);\r\n --u-txt-color-inverse: var(--u-neutral-0);\r\n --u-txt-color-hover: var(--u-blue-600);\r\n --u-txt-color-active: var(--u-blue-600);\r\n --u-txt-color-disabled: var(--u-neutral-400);\r\n --u-txt-color-weak: var(--u-neutral-700);\r\n --u-txt-color-strong: var(--u-neutral-1000);\r\n\r\n --u-link-txt-color: var(--u-blue-700);\r\n --u-tooltip-txt-color: var(--u-neutral-0);\r\n\r\n /* Icon Colors */\r\n --u-icon-color: var(--u-neutral-700);\r\n --u-icon-color-inverse: var(--u-neutral-0);\r\n --u-icon-color-hover: var(--u-blue-600);\r\n --u-icon-color-active: var(--u-blue-600);\r\n --u-icon-color-disabled: var(--u-neutral-400);\r\n\r\n /* border Colors */\r\n --u-border-color: var(--u-neutral-300);\r\n --u-border-color-weak: var(--u-neutral-200);\r\n --u-border-color-strong: var(--u-neutral-400);\r\n\r\n --u-input-border-color: var(--u-neutral-300);\r\n --u-input-border-color-hover: var(--u-neutral-400);\r\n --u-input-border-color-focus: var(--u-blue-600);\r\n --u-input-border-color-invalid: var(--u-red-600);\r\n\r\n /* background Colors */\r\n --u-bg-color: var(--u-neutral-0);\r\n --u-bg-color-inverse: var(--u-neutral-900);\r\n --u-bg-color-hover: var(--u-neutral-100);\r\n --u-bg-color-active: var(--u-neutral-200);\r\n --u-bg-color-disabled: var(--u-neutral-50);\r\n \r\n --u-input-bg-color: var(--u-neutral-0);\r\n --u-panel-bg-color: var(--u-neutral-0);\r\n --u-overlay-bg-color: rgba(0, 0, 0, 0.5);\r\n --u-tooltip-bg-color: rgba(0, 0, 0, 0.75);\r\n\r\n /* Shadow Colors */\r\n --u-shadow-color-weaker: rgba(0, 0, 0, 0.04);\r\n --u-shadow-color-weak: rgba(0, 0, 0, 0.08);\r\n --u-shadow-color-normal: rgba(0, 0, 0, 0.12);\r\n --u-shadow-color-strong: rgba(0, 0, 0, 0.16);\r\n --u-shadow-color-stronger: rgba(0, 0, 0, 0.24);\r\n\r\n /* Scrollbar Colors */\r\n --u-scrollbar-color: var(--u-neutral-400);\r\n --u-scrollbar-color-hover: var(--u-neutral-500);\r\n --u-scrollbar-track-color: transparent;\r\n\r\n /* Font Styles */\r\n --u-font-base: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';\r\n --u-font-mono: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Monaco, 'Courier New', monospace;\r\n --u-font-serif: 'Georgia', 'Times New Roman', Times, serif;\r\n --u-font-display: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif;\r\n --u-font-modern: 'Inter', 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;\r\n --u-font-rounded: 'Nunito', 'Quicksand', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;\r\n}";
|
|
2
2
|
|
|
3
3
|
export { light as default };
|
|
@@ -18,9 +18,13 @@ export declare class FloatingElement extends BaseElement {
|
|
|
18
18
|
private rafId;
|
|
19
19
|
private cleanup;
|
|
20
20
|
/**
|
|
21
|
-
*
|
|
21
|
+
* 엘리먼트가 떠 있는 동안의 대상 엘리먼트 입니다.
|
|
22
22
|
*/
|
|
23
|
-
|
|
23
|
+
target?: HTMLElement | VirtualElement;
|
|
24
|
+
/**
|
|
25
|
+
* 연결될 대상 엘리먼트 입니다. 지정하지 않으면 부모 엘리먼트가 포함됩니다.
|
|
26
|
+
*/
|
|
27
|
+
anchors?: HTMLElement[];
|
|
24
28
|
/**
|
|
25
29
|
* 앵커 엘리먼트를 찾기 위한 CSS 선택자입니다. querySelector를 사용하여 DOM에서 대상을 검색합니다.
|
|
26
30
|
*
|
|
@@ -72,13 +76,17 @@ export declare class FloatingElement extends BaseElement {
|
|
|
72
76
|
disconnectedCallback(): void;
|
|
73
77
|
protected willUpdate(changedProperties: PropertyValues): void;
|
|
74
78
|
protected updated(changedProperties: PropertyValues): void;
|
|
79
|
+
/**
|
|
80
|
+
* for 속성에 따라 element를 기준으로 앵커 엘리먼트를 탐색하여 anchors로 설정합니다.
|
|
81
|
+
*/
|
|
82
|
+
scan(element: Element): void;
|
|
75
83
|
/**
|
|
76
84
|
* 현재 엘리먼트를 표시합니다.
|
|
77
85
|
*
|
|
78
|
-
* @param
|
|
86
|
+
* @param target - 위치 계산에 사용할 타겟 엘리먼트입니다.
|
|
79
87
|
* @param auto - 표시 후 자동 위치 업데이트 활성화 여부입니다. 기본값은 true 입니다.
|
|
80
88
|
*/
|
|
81
|
-
show(
|
|
89
|
+
show(target: Element | VirtualElement, auto?: boolean): Promise<void>;
|
|
82
90
|
/**
|
|
83
91
|
* 현재 엘리먼트를 숨깁니다.
|
|
84
92
|
*/
|
|
@@ -86,7 +94,7 @@ export declare class FloatingElement extends BaseElement {
|
|
|
86
94
|
/**
|
|
87
95
|
* `floating-ui` 를 이용하여 위치를 계산하고 style 을 적용합니다.
|
|
88
96
|
*
|
|
89
|
-
* @param target - 위치 계산에 사용할
|
|
97
|
+
* @param target - 위치 계산에 사용할 타겟 엘리먼트입니다.
|
|
90
98
|
*/
|
|
91
99
|
protected reposition(target: Element | VirtualElement): Promise<void>;
|
|
92
100
|
/** 표시 상태 변경 이벤트를 발생시킵니다. */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { state, property } from 'lit/decorators.js';
|
|
2
2
|
import { autoUpdate, computePosition, offset, shift, flip, autoPlacement } from '@floating-ui/dom';
|
|
3
|
-
import { getParentElement,
|
|
3
|
+
import { getParentElement, querySelectorAllWithin } from '../utilities/elements.js';
|
|
4
4
|
import { BaseElement } from './BaseElement.js';
|
|
5
5
|
import { styles } from './FloatingElement.styles.js';
|
|
6
6
|
|
|
@@ -36,7 +36,10 @@ class FloatingElement extends BaseElement {
|
|
|
36
36
|
}
|
|
37
37
|
connectedCallback() {
|
|
38
38
|
super.connectedCallback();
|
|
39
|
-
this.
|
|
39
|
+
if (!this.anchors || this.anchors.length === 0) {
|
|
40
|
+
const parent = getParentElement(this);
|
|
41
|
+
this.anchors = parent ? [parent] : [];
|
|
42
|
+
}
|
|
40
43
|
}
|
|
41
44
|
disconnectedCallback() {
|
|
42
45
|
if (this.rafId !== null) cancelAnimationFrame(this.rafId);
|
|
@@ -48,8 +51,7 @@ class FloatingElement extends BaseElement {
|
|
|
48
51
|
willUpdate(changedProperties) {
|
|
49
52
|
super.willUpdate(changedProperties);
|
|
50
53
|
if (changedProperties.has("for")) {
|
|
51
|
-
|
|
52
|
-
this.anchor = founded || void 0;
|
|
54
|
+
this.scan(this);
|
|
53
55
|
}
|
|
54
56
|
}
|
|
55
57
|
updated(changedProperties) {
|
|
@@ -60,23 +62,34 @@ class FloatingElement extends BaseElement {
|
|
|
60
62
|
this.updateVisibleState(this.visible);
|
|
61
63
|
}
|
|
62
64
|
}
|
|
65
|
+
/**
|
|
66
|
+
* for 속성에 따라 element를 기준으로 앵커 엘리먼트를 탐색하여 anchors로 설정합니다.
|
|
67
|
+
*/
|
|
68
|
+
scan(element) {
|
|
69
|
+
if (this.for) {
|
|
70
|
+
const anchors = querySelectorAllWithin(element, this.for);
|
|
71
|
+
this.anchors = Array.from(anchors);
|
|
72
|
+
} else {
|
|
73
|
+
const parent = getParentElement(this);
|
|
74
|
+
this.anchors = parent ? [parent] : [];
|
|
75
|
+
}
|
|
76
|
+
}
|
|
63
77
|
/**
|
|
64
78
|
* 현재 엘리먼트를 표시합니다.
|
|
65
79
|
*
|
|
66
|
-
* @param
|
|
80
|
+
* @param target - 위치 계산에 사용할 타겟 엘리먼트입니다.
|
|
67
81
|
* @param auto - 표시 후 자동 위치 업데이트 활성화 여부입니다. 기본값은 true 입니다.
|
|
68
82
|
*/
|
|
69
|
-
async show(
|
|
70
|
-
anchor ||= this.anchor;
|
|
71
|
-
if (!anchor) return;
|
|
83
|
+
async show(target, auto = true) {
|
|
72
84
|
await this.updateComplete;
|
|
73
|
-
await this.reposition(
|
|
85
|
+
await this.reposition(target);
|
|
74
86
|
if (auto === true) {
|
|
75
|
-
this.cleanup = autoUpdate(
|
|
76
|
-
this.reposition(
|
|
87
|
+
this.cleanup = autoUpdate(target, this, () => {
|
|
88
|
+
this.reposition(target);
|
|
77
89
|
});
|
|
78
90
|
}
|
|
79
91
|
this.scheduleVisible(true);
|
|
92
|
+
this.target = target;
|
|
80
93
|
}
|
|
81
94
|
/**
|
|
82
95
|
* 현재 엘리먼트를 숨깁니다.
|
|
@@ -86,11 +99,12 @@ class FloatingElement extends BaseElement {
|
|
|
86
99
|
if (this.cleanup !== null) this.cleanup();
|
|
87
100
|
this.cleanup = null;
|
|
88
101
|
this.scheduleVisible(false);
|
|
102
|
+
this.target = void 0;
|
|
89
103
|
}
|
|
90
104
|
/**
|
|
91
105
|
* `floating-ui` 를 이용하여 위치를 계산하고 style 을 적용합니다.
|
|
92
106
|
*
|
|
93
|
-
* @param target - 위치 계산에 사용할
|
|
107
|
+
* @param target - 위치 계산에 사용할 타겟 엘리먼트입니다.
|
|
94
108
|
*/
|
|
95
109
|
async reposition(target) {
|
|
96
110
|
const position = await computePosition(target, this, {
|
|
@@ -152,9 +166,12 @@ class FloatingElement extends BaseElement {
|
|
|
152
166
|
}
|
|
153
167
|
__decorateClass([
|
|
154
168
|
state()
|
|
155
|
-
], FloatingElement.prototype, "
|
|
169
|
+
], FloatingElement.prototype, "target");
|
|
156
170
|
__decorateClass([
|
|
157
|
-
|
|
171
|
+
state()
|
|
172
|
+
], FloatingElement.prototype, "anchors");
|
|
173
|
+
__decorateClass([
|
|
174
|
+
property({ type: String, reflect: true })
|
|
158
175
|
], FloatingElement.prototype, "for");
|
|
159
176
|
__decorateClass([
|
|
160
177
|
property({ type: Boolean, reflect: true })
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { BaseElement } from '../BaseElement.js';
|
|
2
|
+
export type ButtonVariant = "default" | "borderless" | "link";
|
|
2
3
|
/**
|
|
3
4
|
* Button 컴포넌트는 클릭 가능한 버튼을 나타내며, 로딩 상태와 툴팁 기능을 지원합니다.
|
|
4
5
|
* @slot - 버튼 내부에 표시할 콘텐츠를 삽입합니다.
|
|
@@ -8,9 +9,15 @@ import { BaseElement } from '../BaseElement.js';
|
|
|
8
9
|
export declare class UButton extends BaseElement {
|
|
9
10
|
static styles: import('lit').CSSResultGroup[];
|
|
10
11
|
static dependencies: Record<string, typeof BaseElement>;
|
|
12
|
+
/** 버튼의 스타일 변형을 설정합니다. */
|
|
13
|
+
variant: ButtonVariant;
|
|
11
14
|
/** 버튼이 비활성화 상태인지 여부를 설정합니다. 비활성화된 버튼은 클릭할 수 없습니다. */
|
|
12
15
|
disabled: boolean;
|
|
13
16
|
/** 버튼이 로딩 상태인지 여부를 설정합니다. 로딩 중에는 버튼이 비활성화되고 스피너가 표시됩니다. */
|
|
14
17
|
loading: boolean;
|
|
18
|
+
connectedCallback(): void;
|
|
19
|
+
disconnectedCallback(): void;
|
|
15
20
|
render(): import('lit-html').TemplateResult<1>;
|
|
21
|
+
/** 클릭 이벤트 컨트롤 */
|
|
22
|
+
private handleClick;
|
|
16
23
|
}
|
|
@@ -16,8 +16,16 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
|
16
16
|
class UButton extends BaseElement {
|
|
17
17
|
constructor() {
|
|
18
18
|
super(...arguments);
|
|
19
|
+
this.variant = "default";
|
|
19
20
|
this.disabled = false;
|
|
20
21
|
this.loading = false;
|
|
22
|
+
/** 클릭 이벤트 컨트롤 */
|
|
23
|
+
this.handleClick = (e) => {
|
|
24
|
+
if (this.disabled || this.loading) {
|
|
25
|
+
e.preventDefault();
|
|
26
|
+
e.stopImmediatePropagation();
|
|
27
|
+
}
|
|
28
|
+
};
|
|
21
29
|
}
|
|
22
30
|
static {
|
|
23
31
|
this.styles = [super.styles, styles];
|
|
@@ -27,6 +35,14 @@ class UButton extends BaseElement {
|
|
|
27
35
|
"u-spinner": USpinner
|
|
28
36
|
};
|
|
29
37
|
}
|
|
38
|
+
connectedCallback() {
|
|
39
|
+
super.connectedCallback();
|
|
40
|
+
this.addEventListener("click", this.handleClick);
|
|
41
|
+
}
|
|
42
|
+
disconnectedCallback() {
|
|
43
|
+
this.removeEventListener("click", this.handleClick);
|
|
44
|
+
super.disconnectedCallback();
|
|
45
|
+
}
|
|
30
46
|
render() {
|
|
31
47
|
return html`
|
|
32
48
|
<button part="base"
|
|
@@ -36,13 +52,16 @@ class UButton extends BaseElement {
|
|
|
36
52
|
<slot name="suffix"></slot>
|
|
37
53
|
</button>
|
|
38
54
|
|
|
39
|
-
<div class="
|
|
55
|
+
<div class="mask" part="mask"
|
|
40
56
|
?hidden=${!this.loading}>
|
|
41
57
|
<u-spinner></u-spinner>
|
|
42
58
|
</div>
|
|
43
59
|
`;
|
|
44
60
|
}
|
|
45
61
|
}
|
|
62
|
+
__decorateClass([
|
|
63
|
+
property({ type: String, reflect: true })
|
|
64
|
+
], UButton.prototype, "variant");
|
|
46
65
|
__decorateClass([
|
|
47
66
|
property({ type: Boolean, reflect: true })
|
|
48
67
|
], UButton.prototype, "disabled");
|
|
@@ -8,7 +8,7 @@ const styles = css`
|
|
|
8
8
|
font-size: 14px;
|
|
9
9
|
font-weight: 500;
|
|
10
10
|
line-height: 1.5;
|
|
11
|
-
padding: 0.5em
|
|
11
|
+
padding: 0.5em;
|
|
12
12
|
border: 1px solid var(--u-border-color);
|
|
13
13
|
border-radius: 6px;
|
|
14
14
|
background-color: var(--u-bg-color);
|
|
@@ -18,19 +18,57 @@ const styles = css`
|
|
|
18
18
|
user-select: none;
|
|
19
19
|
cursor: pointer;
|
|
20
20
|
}
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
|
|
22
|
+
/* Style variants */
|
|
23
|
+
:host([variant="default"]) {
|
|
24
|
+
color: var(--u-txt-color);
|
|
25
|
+
border-color: var(--u-border-color);
|
|
26
|
+
background-color: var(--u-bg-color);
|
|
27
|
+
}
|
|
28
|
+
:host([variant="default"]:hover) {
|
|
23
29
|
background-color: var(--u-bg-color-hover);
|
|
24
30
|
}
|
|
25
|
-
:host(:active) {
|
|
26
|
-
color: var(--u-
|
|
31
|
+
:host([variant="default"]:active) {
|
|
32
|
+
background-color: var(--u-bg-color-active);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
:host([variant="borderless"]) {
|
|
36
|
+
color: var(--u-txt-color);
|
|
37
|
+
border-color: transparent;
|
|
38
|
+
background-color: transparent;
|
|
39
|
+
}
|
|
40
|
+
:host([variant="borderless"]:hover) {
|
|
41
|
+
background-color: var(--u-bg-color-hover);
|
|
42
|
+
}
|
|
43
|
+
:host([variant="borderless"]:active) {
|
|
27
44
|
background-color: var(--u-bg-color-active);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
:host([variant="link"]) {
|
|
48
|
+
color: var(--u-txt-color);
|
|
49
|
+
border-color: transparent;
|
|
50
|
+
background-color: transparent;
|
|
51
|
+
}
|
|
52
|
+
:host([variant="link"]:hover) {
|
|
53
|
+
color: var(--u-blue-500, #3b82f6);
|
|
54
|
+
}
|
|
55
|
+
:host([variant="link"]:active) {
|
|
56
|
+
color: var(--u-blue-600, #2563eb);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
:host(:active) {
|
|
28
60
|
transform: translateY(1px);
|
|
29
61
|
}
|
|
30
|
-
|
|
62
|
+
|
|
31
63
|
:host([disabled]) {
|
|
32
64
|
color: var(--u-txt-color-disabled);
|
|
33
|
-
|
|
65
|
+
cursor: not-allowed;
|
|
66
|
+
}
|
|
67
|
+
:host([loading]) {
|
|
68
|
+
cursor: wait;
|
|
69
|
+
}
|
|
70
|
+
:host([loading]) button {
|
|
71
|
+
visibility: hidden;
|
|
34
72
|
}
|
|
35
73
|
|
|
36
74
|
button {
|
|
@@ -52,6 +90,10 @@ const styles = css`
|
|
|
52
90
|
display: inline-flex;
|
|
53
91
|
justify-content: center;
|
|
54
92
|
}
|
|
93
|
+
::slotted(*) {
|
|
94
|
+
color: inherit;
|
|
95
|
+
font-size: inherit;
|
|
96
|
+
}
|
|
55
97
|
/* 슬롯에 내용이 있을 때 gap 적용 */
|
|
56
98
|
::slotted([slot="prefix"]) {
|
|
57
99
|
margin-right: 0.5em;
|
|
@@ -60,7 +102,7 @@ const styles = css`
|
|
|
60
102
|
margin-left: 0.5em;
|
|
61
103
|
}
|
|
62
104
|
|
|
63
|
-
.
|
|
105
|
+
.mask {
|
|
64
106
|
position: absolute;
|
|
65
107
|
z-index: 100;
|
|
66
108
|
top: 0;
|
|
@@ -76,6 +118,7 @@ const styles = css`
|
|
|
76
118
|
font-size: inherit;
|
|
77
119
|
border-radius: inherit;
|
|
78
120
|
background-color: inherit;
|
|
121
|
+
pointer-events: none;
|
|
79
122
|
}
|
|
80
123
|
`;
|
|
81
124
|
|
|
@@ -7,6 +7,8 @@ import { ModalElement } from '../ModalElement.js';
|
|
|
7
7
|
export declare class UDialog extends ModalElement {
|
|
8
8
|
static styles: import('lit').CSSResultGroup[];
|
|
9
9
|
static dependencies: Record<string, typeof BaseElement>;
|
|
10
|
+
/** 헤드리스 모드 여부 */
|
|
11
|
+
headless: boolean;
|
|
10
12
|
/** 타이틀 텍스트 */
|
|
11
13
|
heading: string;
|
|
12
14
|
render(): import('lit-html').TemplateResult<1>;
|