@iyulab/components 0.1.4 → 0.1.5
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/dist/assets/styles/dark.css +40 -36
- package/dist/assets/styles/dark.css.js +1 -1
- package/dist/assets/styles/light.css +41 -38
- package/dist/assets/styles/light.css.js +1 -1
- package/dist/components/BaseElement.styles.js +2 -2
- package/dist/components/alert/Alert.d.ts +8 -4
- package/dist/components/alert/Alert.js +24 -15
- package/dist/components/alert/Alert.styles.js +32 -39
- package/dist/components/alert/index.js +5 -0
- package/dist/components/button/Button.js +4 -2
- package/dist/components/button/Button.styles.js +13 -20
- package/dist/components/button/index.js +5 -0
- package/dist/components/context-menu/index.js +5 -0
- package/dist/components/copy-button/CopyButton.d.ts +7 -3
- package/dist/components/copy-button/CopyButton.js +69 -0
- package/dist/components/copy-button/CopyButton.styles.js +17 -0
- package/dist/components/copy-button/index.js +5 -0
- package/dist/components/dialog/index.js +5 -0
- package/dist/components/divider/Divider.d.ts +5 -5
- package/dist/components/divider/Divider.js +15 -15
- package/dist/components/divider/Divider.styles.js +7 -5
- package/dist/components/divider/index.js +5 -0
- package/dist/components/form/Form.d.ts +3 -1
- package/dist/components/form/Form.js +3 -1
- package/dist/components/form/Form.styles.js +1 -0
- package/dist/components/form/index.js +5 -0
- package/dist/components/icon/Icon.d.ts +6 -12
- package/dist/components/icon/Icon.js +14 -30
- package/dist/components/icon/Icon.styles.js +1 -1
- package/dist/components/icon/index.js +5 -0
- package/dist/components/icon-button/IconButton.d.ts +3 -3
- package/dist/components/icon-button/IconButton.js +6 -6
- package/dist/components/icon-button/IconButton.styles.js +14 -29
- package/dist/components/icon-button/index.js +5 -0
- package/dist/components/index.d.ts +1 -1
- package/dist/components/input/Input.d.ts +14 -13
- package/dist/components/input/Input.js +56 -55
- package/dist/components/input/Input.styles.js +52 -54
- package/dist/components/input/index.js +5 -0
- package/dist/components/menu/index.js +5 -0
- package/dist/components/progress-bar/ProgressBar.d.ts +1 -1
- package/dist/components/progress-bar/ProgressBar.js +2 -2
- package/dist/components/progress-bar/ProgressBar.styles.js +10 -10
- package/dist/components/progress-bar/index.js +5 -0
- package/dist/components/progress-ring/ProgressRing.d.ts +2 -2
- package/dist/components/progress-ring/ProgressRing.js +7 -6
- package/dist/components/progress-ring/ProgressRing.styles.js +8 -9
- package/dist/components/progress-ring/index.js +5 -0
- package/dist/components/spinner/Spinner.styles.js +5 -3
- package/dist/components/spinner/index.js +5 -0
- package/dist/components/split-panel/SplitPanel.d.ts +1 -1
- package/dist/components/split-panel/SplitPanel.js +5 -7
- package/dist/components/split-panel/index.js +5 -0
- package/dist/components/tooltip/Tooltip.styles.js +1 -1
- package/dist/components/tooltip/index.js +5 -0
- package/dist/components/tree/index.js +5 -0
- package/dist/components/tree-item/index.js +5 -0
- package/dist/index.js +24 -5
- package/dist/integrations/react/index.d.ts +0 -1
- package/dist/integrations/react/index.js +0 -1
- package/dist/internals/index.d.ts +0 -1
- package/dist/utilities/decorators.js +2 -0
- package/dist/utilities/icons.d.ts +46 -0
- package/dist/utilities/icons.js +114 -0
- package/dist/utilities/index.d.ts +1 -0
- package/dist/utilities/notifier.d.ts +17 -7
- package/dist/utilities/notifier.js +51 -41
- package/dist/utilities/theme.d.ts +15 -20
- package/dist/utilities/theme.js +24 -20
- package/package.json +7 -6
- package/dist/components/panel/Panel.d.ts +0 -9
- package/dist/components/panel/Panel.js +0 -17
- package/dist/components/panel/Panel.styles.d.ts +0 -1
- package/dist/components/panel/Panel.styles.js +0 -12
- package/dist/components/panel/index.d.ts +0 -7
- package/dist/integrations/react/UPanel.d.ts +0 -8
- package/dist/integrations/react/UPanel.js +0 -10
- package/dist/internals/icon-helpers.d.ts +0 -32
- package/dist/internals/icon-helpers.js +0 -48
|
@@ -67,49 +67,53 @@
|
|
|
67
67
|
--u-red-900: #FFD2D2;
|
|
68
68
|
--u-red-1000: #FFF0F0;
|
|
69
69
|
|
|
70
|
-
/*
|
|
71
|
-
--u-
|
|
72
|
-
--u-
|
|
73
|
-
--u-
|
|
74
|
-
--u-
|
|
75
|
-
--u-
|
|
70
|
+
/* text Colors */
|
|
71
|
+
--u-txt-color: var(--u-neutral-900);
|
|
72
|
+
--u-txt-color-inverse: var(--u-neutral-100);
|
|
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-500);
|
|
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-100);
|
|
81
|
+
|
|
82
|
+
/* Icon Colors */
|
|
83
|
+
--u-icon-color: var(--u-neutral-800);
|
|
84
|
+
--u-icon-color-inverse: var(--u-neutral-100);
|
|
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-500);
|
|
88
|
+
|
|
89
|
+
/* border Colors */
|
|
90
|
+
--u-border-color: var(--u-neutral-400);
|
|
91
|
+
--u-border-color-weak: var(--u-neutral-300);
|
|
92
|
+
--u-border-color-strong: var(--u-neutral-500);
|
|
93
|
+
|
|
94
|
+
--u-input-border-color: var(--u-neutral-400);
|
|
95
|
+
--u-input-border-color-hover: var(--u-neutral-500);
|
|
96
|
+
--u-input-border-color-focus: var(--u-blue-600);
|
|
97
|
+
--u-input-border-color-invalid: var(--u-red-600);
|
|
76
98
|
|
|
77
99
|
/* background Colors */
|
|
78
100
|
--u-bg-color: var(--u-neutral-100);
|
|
79
101
|
--u-bg-color-inverse: var(--u-neutral-0);
|
|
80
102
|
--u-bg-color-hover: var(--u-neutral-300);
|
|
81
103
|
--u-bg-color-active: var(--u-neutral-400);
|
|
82
|
-
--u-bg-color-disabled: var(--u-neutral-
|
|
104
|
+
--u-bg-color-disabled: var(--u-neutral-100);
|
|
83
105
|
|
|
106
|
+
--u-input-bg-color: var(--u-neutral-200);
|
|
84
107
|
--u-panel-bg-color: var(--u-neutral-200);
|
|
85
108
|
--u-overlay-bg-color: rgba(0, 0, 0, 0.7);
|
|
86
109
|
--u-tooltip-bg-color: rgba(255, 255, 255, 0.85);
|
|
87
110
|
|
|
88
|
-
/*
|
|
89
|
-
--u-
|
|
90
|
-
--u-
|
|
91
|
-
--u-
|
|
92
|
-
|
|
93
|
-
--u-
|
|
94
|
-
--u-input-border-hover: var(--u-neutral-500);
|
|
95
|
-
--u-input-border-focus: var(--u-blue-600);
|
|
96
|
-
|
|
97
|
-
/* text Colors */
|
|
98
|
-
--u-text-color: var(--u-neutral-900);
|
|
99
|
-
--u-text-color-inverse: var(--u-neutral-100);
|
|
100
|
-
--u-text-color-hover: var(--u-blue-600);
|
|
101
|
-
--u-text-color-disabled: var(--u-neutral-500);
|
|
102
|
-
|
|
103
|
-
--u-soft-text-color: var(--u-neutral-700);
|
|
104
|
-
--u-strong-text-color: var(--u-neutral-1000);
|
|
105
|
-
--u-link-text-color: var(--u-blue-700);
|
|
106
|
-
--u-tooltip-text-color: var(--u-neutral-100);
|
|
107
|
-
|
|
108
|
-
/* Icon Colors */
|
|
109
|
-
--u-icon-color: var(--u-neutral-800);
|
|
110
|
-
--u-icon-color-inverse: var(--u-neutral-100);
|
|
111
|
-
--u-icon-color-hover: var(--u-blue-600);
|
|
112
|
-
--u-icon-color-disabled: var(--u-neutral-500);
|
|
111
|
+
/* Shadow Colors */
|
|
112
|
+
--u-shadow-color-weaker: rgba(0, 0, 0, 0.15);
|
|
113
|
+
--u-shadow-color-weak: rgba(0, 0, 0, 0.25);
|
|
114
|
+
--u-shadow-color-normal: rgba(0, 0, 0, 0.35);
|
|
115
|
+
--u-shadow-color-strong: rgba(0, 0, 0, 0.45);
|
|
116
|
+
--u-shadow-color-stronger: rgba(0, 0, 0, 0.60);
|
|
113
117
|
|
|
114
118
|
/* Scrollbar Colors */
|
|
115
119
|
--u-scrollbar-color: var(--u-neutral-500);
|
|
@@ -117,10 +121,10 @@
|
|
|
117
121
|
--u-scrollbar-track-color: transparent;
|
|
118
122
|
|
|
119
123
|
/* Font Styles */
|
|
120
|
-
--u-font-base:
|
|
121
|
-
--u-font-mono:
|
|
122
|
-
--u-font-serif:
|
|
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;
|
|
123
127
|
--u-font-display: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif;
|
|
124
|
-
--u-font-modern:
|
|
128
|
+
--u-font-modern: 'Inter', 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
|
|
125
129
|
--u-font-rounded: 'Nunito', 'Quicksand', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
|
|
126
130
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
const dark = ":root[theme=\"dark\"] {\n color-scheme: dark;\n\n /* Neutral Colors */\n --u-neutral-0: #000000;\n --u-neutral-50: #0A0A0A;\n --u-neutral-100: #121212;\n --u-neutral-200: #1E1E1E;\n --u-neutral-300: #2A2A2A;\n --u-neutral-400: #3D3D3D;\n --u-neutral-500: #525252;\n --u-neutral-600: #6E6E6E;\n --u-neutral-700: #8A8A8A;\n --u-neutral-800: #B0B0B0;\n --u-neutral-900: #D4D4D4;\n --u-neutral-1000: #FFFFFF;\n\n /* Blue Colors */\n --u-blue-0: #0A1E3D;\n --u-blue-100: #1E3A5F;\n --u-blue-200: #2B4F7E;\n --u-blue-300: #3D6B9E;\n --u-blue-400: #5284BE;\n --u-blue-500: #6BA3E3;\n --u-blue-600: #87B8F5;\n --u-blue-700: #A5CDFF;\n --u-blue-800: #C2DEFF;\n --u-blue-900: #DDEEFF;\n --u-blue-1000: #F0F7FF;\n\n /* Green Colors */\n --u-green-0: #0D2818;\n --u-green-100: #1A3F2A;\n --u-green-200: #285639;\n --u-green-300: #3A7450;\n --u-green-400: #4E9268;\n --u-green-500: #66B584;\n --u-green-600: #81D19D;\n --u-green-700: #9FE5B5;\n --u-green-800: #BEF2CD;\n --u-green-900: #DDF9E5;\n --u-green-1000: #F0FDF5;\n\n /* Yellow Colors */\n --u-yellow-0: #2E2200;\n --u-yellow-100: #4D3A00;\n --u-yellow-200: #6B5200;\n --u-yellow-300: #8A6B00;\n --u-yellow-400: #B08900;\n --u-yellow-500: #D4A712;\n --u-yellow-600: #F5C842;\n --u-yellow-700: #FFE066;\n --u-yellow-800: #FFED99;\n --u-yellow-900: #FFF5CC;\n --u-yellow-1000: #FFFBE6;\n\n /* Red Colors */\n --u-red-0: #2E0A0A;\n --u-red-100: #4D1717;\n --u-red-200: #6B2424;\n --u-red-300: #8F3535;\n --u-red-400: #B24848;\n --u-red-500: #D66060;\n --u-red-600: #F57878;\n --u-red-700: #FF9494;\n --u-red-800: #FFB3B3;\n --u-red-900: #FFD2D2;\n --u-red-1000: #FFF0F0;\n\n /*
|
|
1
|
+
const dark = ":root[theme=\"dark\"] {\n color-scheme: dark;\n\n /* Neutral Colors */\n --u-neutral-0: #000000;\n --u-neutral-50: #0A0A0A;\n --u-neutral-100: #121212;\n --u-neutral-200: #1E1E1E;\n --u-neutral-300: #2A2A2A;\n --u-neutral-400: #3D3D3D;\n --u-neutral-500: #525252;\n --u-neutral-600: #6E6E6E;\n --u-neutral-700: #8A8A8A;\n --u-neutral-800: #B0B0B0;\n --u-neutral-900: #D4D4D4;\n --u-neutral-1000: #FFFFFF;\n\n /* Blue Colors */\n --u-blue-0: #0A1E3D;\n --u-blue-100: #1E3A5F;\n --u-blue-200: #2B4F7E;\n --u-blue-300: #3D6B9E;\n --u-blue-400: #5284BE;\n --u-blue-500: #6BA3E3;\n --u-blue-600: #87B8F5;\n --u-blue-700: #A5CDFF;\n --u-blue-800: #C2DEFF;\n --u-blue-900: #DDEEFF;\n --u-blue-1000: #F0F7FF;\n\n /* Green Colors */\n --u-green-0: #0D2818;\n --u-green-100: #1A3F2A;\n --u-green-200: #285639;\n --u-green-300: #3A7450;\n --u-green-400: #4E9268;\n --u-green-500: #66B584;\n --u-green-600: #81D19D;\n --u-green-700: #9FE5B5;\n --u-green-800: #BEF2CD;\n --u-green-900: #DDF9E5;\n --u-green-1000: #F0FDF5;\n\n /* Yellow Colors */\n --u-yellow-0: #2E2200;\n --u-yellow-100: #4D3A00;\n --u-yellow-200: #6B5200;\n --u-yellow-300: #8A6B00;\n --u-yellow-400: #B08900;\n --u-yellow-500: #D4A712;\n --u-yellow-600: #F5C842;\n --u-yellow-700: #FFE066;\n --u-yellow-800: #FFED99;\n --u-yellow-900: #FFF5CC;\n --u-yellow-1000: #FFFBE6;\n\n /* Red Colors */\n --u-red-0: #2E0A0A;\n --u-red-100: #4D1717;\n --u-red-200: #6B2424;\n --u-red-300: #8F3535;\n --u-red-400: #B24848;\n --u-red-500: #D66060;\n --u-red-600: #F57878;\n --u-red-700: #FF9494;\n --u-red-800: #FFB3B3;\n --u-red-900: #FFD2D2;\n --u-red-1000: #FFF0F0;\n\n /* text Colors */\n --u-txt-color: var(--u-neutral-900);\n --u-txt-color-inverse: var(--u-neutral-100);\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-500);\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-100);\n\n /* Icon Colors */\n --u-icon-color: var(--u-neutral-800);\n --u-icon-color-inverse: var(--u-neutral-100);\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-500);\n\n /* border Colors */\n --u-border-color: var(--u-neutral-400);\n --u-border-color-weak: var(--u-neutral-300);\n --u-border-color-strong: var(--u-neutral-500);\n\n --u-input-border-color: var(--u-neutral-400);\n --u-input-border-color-hover: var(--u-neutral-500);\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-100);\n --u-bg-color-inverse: var(--u-neutral-0);\n --u-bg-color-hover: var(--u-neutral-300);\n --u-bg-color-active: var(--u-neutral-400);\n --u-bg-color-disabled: var(--u-neutral-100);\n \n --u-input-bg-color: var(--u-neutral-200);\n --u-panel-bg-color: var(--u-neutral-200);\n --u-overlay-bg-color: rgba(0, 0, 0, 0.7);\n --u-tooltip-bg-color: rgba(255, 255, 255, 0.85);\n\n /* Shadow Colors */\n --u-shadow-color-weaker: rgba(0, 0, 0, 0.15);\n --u-shadow-color-weak: rgba(0, 0, 0, 0.25);\n --u-shadow-color-normal: rgba(0, 0, 0, 0.35);\n --u-shadow-color-strong: rgba(0, 0, 0, 0.45);\n --u-shadow-color-stronger: rgba(0, 0, 0, 0.60);\n\n /* Scrollbar Colors */\n --u-scrollbar-color: var(--u-neutral-500);\n --u-scrollbar-color-hover: var(--u-neutral-600);\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}";
|
|
2
2
|
|
|
3
3
|
export { dark as default };
|
|
@@ -67,50 +67,53 @@
|
|
|
67
67
|
--u-red-900: #B71C1C;
|
|
68
68
|
--u-red-1000: #6B0F0F;
|
|
69
69
|
|
|
70
|
-
/*
|
|
71
|
-
--u-
|
|
72
|
-
--u-
|
|
73
|
-
--u-
|
|
74
|
-
--u-
|
|
75
|
-
--u-
|
|
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);
|
|
76
98
|
|
|
77
99
|
/* background Colors */
|
|
78
100
|
--u-bg-color: var(--u-neutral-0);
|
|
79
101
|
--u-bg-color-inverse: var(--u-neutral-900);
|
|
80
102
|
--u-bg-color-hover: var(--u-neutral-100);
|
|
81
103
|
--u-bg-color-active: var(--u-neutral-200);
|
|
82
|
-
--u-bg-color-disabled:
|
|
83
|
-
|
|
104
|
+
--u-bg-color-disabled: var(--u-neutral-50);
|
|
105
|
+
|
|
106
|
+
--u-input-bg-color: var(--u-neutral-0);
|
|
84
107
|
--u-panel-bg-color: var(--u-neutral-0);
|
|
85
108
|
--u-overlay-bg-color: rgba(0, 0, 0, 0.5);
|
|
86
109
|
--u-tooltip-bg-color: rgba(0, 0, 0, 0.75);
|
|
87
110
|
|
|
88
|
-
/*
|
|
89
|
-
--u-
|
|
90
|
-
--u-
|
|
91
|
-
--u-
|
|
92
|
-
|
|
93
|
-
--u-
|
|
94
|
-
--u-input-border-hover: var(--u-neutral-400);
|
|
95
|
-
--u-input-border-focus: var(--u-blue-600);
|
|
96
|
-
|
|
97
|
-
/* text Colors */
|
|
98
|
-
--u-text-color: var(--u-neutral-900);
|
|
99
|
-
--u-text-color-inverse: var(--u-neutral-0);
|
|
100
|
-
--u-text-color-hover: var(--u-blue-600);
|
|
101
|
-
--u-text-color-active: var(--u-blue-600);
|
|
102
|
-
--u-text-color-disabled: var(--u-neutral-400);
|
|
103
|
-
|
|
104
|
-
--u-soft-text-color: var(--u-neutral-700);
|
|
105
|
-
--u-link-text-color: var(--u-blue-700);
|
|
106
|
-
--u-tooltip-text-color: var(--u-neutral-0);
|
|
107
|
-
|
|
108
|
-
/* Icon Colors */
|
|
109
|
-
--u-icon-color: var(--u-neutral-700);
|
|
110
|
-
--u-icon-color-inverse: var(--u-neutral-0);
|
|
111
|
-
--u-icon-color-hover: var(--u-blue-600);
|
|
112
|
-
--u-icon-color-active: var(--u-blue-600);
|
|
113
|
-
--u-icon-color-disabled: var(--u-neutral-400);
|
|
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);
|
|
114
117
|
|
|
115
118
|
/* Scrollbar Colors */
|
|
116
119
|
--u-scrollbar-color: var(--u-neutral-400);
|
|
@@ -118,10 +121,10 @@
|
|
|
118
121
|
--u-scrollbar-track-color: transparent;
|
|
119
122
|
|
|
120
123
|
/* Font Styles */
|
|
121
|
-
--u-font-base:
|
|
122
|
-
--u-font-mono:
|
|
123
|
-
--u-font-serif:
|
|
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;
|
|
124
127
|
--u-font-display: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif;
|
|
125
|
-
--u-font-modern:
|
|
128
|
+
--u-font-modern: 'Inter', 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
|
|
126
129
|
--u-font-rounded: 'Nunito', 'Quicksand', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
|
|
127
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 /*
|
|
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}";
|
|
2
2
|
|
|
3
3
|
export { light as default };
|
|
@@ -2,10 +2,10 @@ import { css } from 'lit';
|
|
|
2
2
|
|
|
3
3
|
const styles = css`
|
|
4
4
|
:host {
|
|
5
|
+
color: var(--u-txt-color, inherit);
|
|
6
|
+
font-family: var(--u-font-base, inherit);
|
|
5
7
|
box-sizing: border-box;
|
|
6
8
|
overflow-wrap: anywhere;
|
|
7
|
-
color: var(--u-text-color, inherit);
|
|
8
|
-
font-family: var(--u-font-base, inherit);
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
:host *,
|
|
@@ -14,7 +14,7 @@ export declare class Alert extends BaseElement {
|
|
|
14
14
|
/** 상태 (warning, error, info, success, notice) */
|
|
15
15
|
type: AlertType;
|
|
16
16
|
/** 타이틀 라벨 */
|
|
17
|
-
|
|
17
|
+
heading?: string;
|
|
18
18
|
/** 본문 내용 */
|
|
19
19
|
content?: string;
|
|
20
20
|
/** 본문 최소 행 수 */
|
|
@@ -25,12 +25,16 @@ export declare class Alert extends BaseElement {
|
|
|
25
25
|
duration: number;
|
|
26
26
|
protected updated(changedProperties: PropertyValues): void;
|
|
27
27
|
render(): import('lit-html').TemplateResult<1>;
|
|
28
|
-
/**
|
|
28
|
+
/**
|
|
29
|
+
* Alert를 표시합니다.
|
|
30
|
+
*/
|
|
29
31
|
show(): Promise<void>;
|
|
30
|
-
/**
|
|
32
|
+
/**
|
|
33
|
+
* Alert를 숨깁니다.
|
|
34
|
+
*/
|
|
31
35
|
hide(): Promise<void>;
|
|
32
36
|
/** Alert 타입에 따른 아이콘 이름을 반환합니다. */
|
|
33
|
-
private
|
|
37
|
+
private getIconName;
|
|
34
38
|
/** open 속성 변경에 따른 상태 업데이트를 처리합니다. */
|
|
35
39
|
private updateOpenState;
|
|
36
40
|
}
|
|
@@ -3,6 +3,7 @@ import { property } from 'lit/decorators.js';
|
|
|
3
3
|
import { BaseElement } from '../BaseElement.js';
|
|
4
4
|
import { Icon } from '../icon/Icon.js';
|
|
5
5
|
import { styles } from './Alert.styles.js';
|
|
6
|
+
import { unsafeHTML } from 'lit/directives/unsafe-html.js';
|
|
6
7
|
|
|
7
8
|
var __defProp = Object.defineProperty;
|
|
8
9
|
var __decorateClass = (decorators, target, key, kind) => {
|
|
@@ -44,34 +45,42 @@ class Alert extends BaseElement {
|
|
|
44
45
|
}
|
|
45
46
|
render() {
|
|
46
47
|
return html`
|
|
47
|
-
<div class="container">
|
|
48
|
-
<div class="header">
|
|
49
|
-
<u-icon class="icon"
|
|
50
|
-
|
|
48
|
+
<div class="container" part="base">
|
|
49
|
+
<div class="header" part="header">
|
|
50
|
+
<u-icon class="icon" part="icon"
|
|
51
|
+
.library=${"internal"}
|
|
52
|
+
.name=${this.getIconName(this.type)}
|
|
51
53
|
></u-icon>
|
|
52
|
-
<div class="title">
|
|
53
|
-
${this.
|
|
54
|
+
<div class="title" part="title">
|
|
55
|
+
${this.heading || this.type.toUpperCase()}
|
|
54
56
|
</div>
|
|
55
|
-
<u-icon class="close-btn"
|
|
56
|
-
|
|
57
|
+
<u-icon class="close-btn" part="close-btn"
|
|
58
|
+
.library=${"internal"}
|
|
59
|
+
.name=${"x-lg"}
|
|
57
60
|
@click=${this.hide}
|
|
58
61
|
></u-icon>
|
|
59
62
|
</div>
|
|
60
|
-
<div class="content scrollable">
|
|
61
|
-
${this.content
|
|
63
|
+
<div class="content scrollable" part="content">
|
|
64
|
+
${this.content ? unsafeHTML(this.content) : html`<slot></slot>`}
|
|
65
|
+
</div>
|
|
66
|
+
<div class="footer" part="footer">
|
|
67
|
+
<slot name="footer"></slot>
|
|
62
68
|
</div>
|
|
63
|
-
<div class="footer"></div>
|
|
64
69
|
</div>
|
|
65
70
|
`;
|
|
66
71
|
}
|
|
67
|
-
/**
|
|
72
|
+
/**
|
|
73
|
+
* Alert를 표시합니다.
|
|
74
|
+
*/
|
|
68
75
|
async show() {
|
|
69
76
|
await this.updateComplete;
|
|
70
77
|
requestAnimationFrame(() => {
|
|
71
78
|
this.open = true;
|
|
72
79
|
});
|
|
73
80
|
}
|
|
74
|
-
/**
|
|
81
|
+
/**
|
|
82
|
+
* Alert를 숨깁니다.
|
|
83
|
+
*/
|
|
75
84
|
async hide() {
|
|
76
85
|
await this.updateComplete;
|
|
77
86
|
requestAnimationFrame(() => {
|
|
@@ -79,7 +88,7 @@ class Alert extends BaseElement {
|
|
|
79
88
|
});
|
|
80
89
|
}
|
|
81
90
|
/** Alert 타입에 따른 아이콘 이름을 반환합니다. */
|
|
82
|
-
|
|
91
|
+
getIconName(type) {
|
|
83
92
|
switch (type) {
|
|
84
93
|
case "error":
|
|
85
94
|
return "exclamation-circle-fill";
|
|
@@ -118,7 +127,7 @@ __decorateClass([
|
|
|
118
127
|
], Alert.prototype, "type");
|
|
119
128
|
__decorateClass([
|
|
120
129
|
property({ type: String })
|
|
121
|
-
], Alert.prototype, "
|
|
130
|
+
], Alert.prototype, "heading");
|
|
122
131
|
__decorateClass([
|
|
123
132
|
property({ type: String })
|
|
124
133
|
], Alert.prototype, "content");
|
|
@@ -1,64 +1,60 @@
|
|
|
1
1
|
import { css } from 'lit';
|
|
2
2
|
|
|
3
3
|
const styles = css`
|
|
4
|
+
:host {
|
|
5
|
+
--icon-primary-color: var(--u-neutral-700);
|
|
6
|
+
--min-content-rows: 1;
|
|
7
|
+
--max-content-rows: 3;
|
|
8
|
+
}
|
|
9
|
+
|
|
4
10
|
:host {
|
|
5
11
|
display: block;
|
|
6
12
|
min-width: 300px;
|
|
7
13
|
max-width: 500px;
|
|
8
|
-
|
|
9
|
-
background-color: var(--alert-bg-color);
|
|
10
|
-
border: 1px solid var(--alert-border-color);
|
|
14
|
+
|
|
11
15
|
border-radius: 8px;
|
|
12
|
-
box-shadow: 0 4px 12px var(--u-shadow-
|
|
16
|
+
box-shadow: 0 4px 12px var(--u-shadow-color-normal);
|
|
13
17
|
|
|
14
18
|
opacity: 0;
|
|
15
19
|
transform: scale(0.8);
|
|
16
20
|
transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
|
|
17
21
|
pointer-events: none;
|
|
18
|
-
|
|
19
|
-
--min-content-rows: 1;
|
|
20
|
-
--max-content-rows: 3;
|
|
21
|
-
|
|
22
|
-
--alert-icon-color: var(--u-neutral-700);
|
|
23
|
-
--alert-bg-color: var(--u-neutral-100);
|
|
24
|
-
--alert-border-color: var(--u-neutral-300);
|
|
25
22
|
}
|
|
26
23
|
:host([open]) {
|
|
27
24
|
opacity: 1;
|
|
28
25
|
transform: scale(1);
|
|
29
26
|
pointer-events: auto;
|
|
30
27
|
}
|
|
31
|
-
|
|
32
28
|
:host([type="error"]) {
|
|
33
|
-
--
|
|
34
|
-
|
|
35
|
-
|
|
29
|
+
--icon-primary-color: var(--u-red-700);
|
|
30
|
+
border-color: var(--u-red-300);
|
|
31
|
+
background-color: var(--u-red-200);
|
|
36
32
|
}
|
|
37
33
|
:host([type="warning"]) {
|
|
38
|
-
--
|
|
39
|
-
|
|
40
|
-
|
|
34
|
+
--icon-primary-color: var(--u-yellow-700);
|
|
35
|
+
border-color: var(--u-yellow-300);
|
|
36
|
+
background-color: var(--u-yellow-200);
|
|
41
37
|
}
|
|
42
38
|
:host([type="info"]) {
|
|
43
|
-
--
|
|
44
|
-
|
|
45
|
-
|
|
39
|
+
--icon-primary-color: var(--u-blue-700);
|
|
40
|
+
border-color: var(--u-blue-300);
|
|
41
|
+
background-color: var(--u-blue-200);
|
|
46
42
|
}
|
|
47
43
|
:host([type="success"]) {
|
|
48
|
-
--
|
|
49
|
-
|
|
50
|
-
|
|
44
|
+
--icon-primary-color: var(--u-green-700);
|
|
45
|
+
border-color: var(--u-green-300);
|
|
46
|
+
background-color: var(--u-green-200);
|
|
51
47
|
}
|
|
52
48
|
:host([type="notice"]) {
|
|
53
|
-
--
|
|
54
|
-
|
|
55
|
-
|
|
49
|
+
--icon-primary-color: var(--u-neutral-700);
|
|
50
|
+
border-color: var(--u-neutral-300);
|
|
51
|
+
background-color: var(--u-neutral-200);
|
|
56
52
|
}
|
|
57
53
|
|
|
58
54
|
.container {
|
|
59
55
|
display: flex;
|
|
60
56
|
flex-direction: column;
|
|
61
|
-
padding: 8px 12px
|
|
57
|
+
padding: 8px 12px;
|
|
62
58
|
overflow: hidden;
|
|
63
59
|
}
|
|
64
60
|
|
|
@@ -69,23 +65,21 @@ const styles = css`
|
|
|
69
65
|
align-items: center;
|
|
70
66
|
gap: 12px;
|
|
71
67
|
margin-bottom: 4px;
|
|
68
|
+
font-size: 16px;
|
|
72
69
|
user-select: none;
|
|
73
70
|
}
|
|
74
71
|
.header .icon {
|
|
75
72
|
flex-shrink: 0;
|
|
76
|
-
|
|
77
|
-
color: var(--alert-icon-color);
|
|
78
|
-
filter: drop-shadow(0 1px 2px var(--u-shadow-weak));
|
|
73
|
+
color: var(--icon-primary-color);
|
|
79
74
|
}
|
|
80
75
|
.header .title {
|
|
81
|
-
flex: 1;
|
|
82
|
-
font-size: 16px;
|
|
76
|
+
flex-grow: 1;
|
|
83
77
|
font-weight: 600;
|
|
84
|
-
line-height:
|
|
78
|
+
line-height: 2;
|
|
85
79
|
}
|
|
86
80
|
.header .close-btn {
|
|
87
81
|
flex-shrink: 0;
|
|
88
|
-
|
|
82
|
+
color: var(--u-icon-color);
|
|
89
83
|
cursor: pointer;
|
|
90
84
|
}
|
|
91
85
|
.header .close-btn:hover {
|
|
@@ -98,16 +92,15 @@ const styles = css`
|
|
|
98
92
|
|
|
99
93
|
.content {
|
|
100
94
|
font-size: 14px;
|
|
101
|
-
font-weight:
|
|
102
|
-
|
|
103
|
-
line-height: 1.6;
|
|
95
|
+
font-weight: 300;
|
|
96
|
+
line-height: 1.5;
|
|
104
97
|
min-height: calc(1.6em * var(--min-content-rows));
|
|
105
98
|
max-height: calc(1.6em * var(--max-content-rows));
|
|
106
99
|
overflow-y: auto;
|
|
107
100
|
}
|
|
108
101
|
|
|
109
102
|
.footer {
|
|
110
|
-
display:
|
|
103
|
+
display: inline-block;
|
|
111
104
|
}
|
|
112
105
|
`;
|
|
113
106
|
|
|
@@ -29,13 +29,15 @@ class Button extends BaseElement {
|
|
|
29
29
|
}
|
|
30
30
|
render() {
|
|
31
31
|
return html`
|
|
32
|
-
<button part="base"
|
|
32
|
+
<button part="base"
|
|
33
|
+
?disabled=${this.disabled || this.loading}>
|
|
33
34
|
<slot name="prefix"></slot>
|
|
34
35
|
<slot></slot>
|
|
35
36
|
<slot name="suffix"></slot>
|
|
36
37
|
</button>
|
|
37
38
|
|
|
38
|
-
<div class="overlay"
|
|
39
|
+
<div class="overlay" part="overlay"
|
|
40
|
+
?hidden=${!this.loading}>
|
|
39
41
|
<u-spinner></u-spinner>
|
|
40
42
|
</div>
|
|
41
43
|
`;
|
|
@@ -9,31 +9,29 @@ const styles = css`
|
|
|
9
9
|
font-weight: 500;
|
|
10
10
|
line-height: 1.5;
|
|
11
11
|
padding: 0.5em 1em;
|
|
12
|
-
background-color: var(--u-bg-color);
|
|
13
12
|
border: 1px solid var(--u-border-color);
|
|
14
13
|
border-radius: 6px;
|
|
14
|
+
background-color: var(--u-bg-color);
|
|
15
15
|
|
|
16
16
|
transition: all 0.2s ease;
|
|
17
|
+
overflow: hidden;
|
|
17
18
|
user-select: none;
|
|
18
19
|
cursor: pointer;
|
|
19
20
|
}
|
|
20
|
-
:host([loading]),
|
|
21
|
-
:host([disabled]) {
|
|
22
|
-
pointer-events: none;
|
|
23
|
-
}
|
|
24
|
-
:host([disabled]) {
|
|
25
|
-
color: var(--u-text-color-disabled);
|
|
26
|
-
}
|
|
27
21
|
:host(:hover) {
|
|
28
|
-
color: var(--u-
|
|
22
|
+
color: var(--u-txt-color-hover);
|
|
29
23
|
background-color: var(--u-bg-color-hover);
|
|
30
|
-
border-color: var(--u-border-color-strong);
|
|
31
24
|
}
|
|
32
25
|
:host(:active) {
|
|
33
|
-
color: var(--u-
|
|
26
|
+
color: var(--u-txt-color-active);
|
|
34
27
|
background-color: var(--u-bg-color-active);
|
|
35
28
|
transform: translateY(1px);
|
|
36
29
|
}
|
|
30
|
+
:host([loading]),
|
|
31
|
+
:host([disabled]) {
|
|
32
|
+
color: var(--u-txt-color-disabled);
|
|
33
|
+
pointer-events: none;
|
|
34
|
+
}
|
|
37
35
|
|
|
38
36
|
button {
|
|
39
37
|
all: unset;
|
|
@@ -49,21 +47,16 @@ const styles = css`
|
|
|
49
47
|
}
|
|
50
48
|
|
|
51
49
|
slot {
|
|
52
|
-
flex: 1
|
|
50
|
+
flex: 1 0 auto;
|
|
53
51
|
min-width: 0;
|
|
54
52
|
display: inline-flex;
|
|
55
|
-
align-items: center;
|
|
56
53
|
justify-content: center;
|
|
57
54
|
}
|
|
58
|
-
|
|
59
|
-
slot
|
|
60
|
-
flex: 0 0 auto;
|
|
61
|
-
}
|
|
62
|
-
/* 슬롯에 내용이 있을 때만 gap 적용 */
|
|
63
|
-
slot[name="prefix"]:not(:empty) {
|
|
55
|
+
/* 슬롯에 내용이 있을 때 gap 적용 */
|
|
56
|
+
::slotted([slot="prefix"]) {
|
|
64
57
|
margin-right: 0.5em;
|
|
65
58
|
}
|
|
66
|
-
slot
|
|
59
|
+
::slotted([slot="suffix"]) {
|
|
67
60
|
margin-left: 0.5em;
|
|
68
61
|
}
|
|
69
62
|
|
|
@@ -5,11 +5,15 @@ import { BaseElement } from '../BaseElement.js';
|
|
|
5
5
|
export declare class CopyButton extends BaseElement {
|
|
6
6
|
static styles: import('lit').CSSResultGroup[];
|
|
7
7
|
static dependencies: Record<string, typeof BaseElement>;
|
|
8
|
-
/** 버튼의
|
|
8
|
+
/** 버튼의 복사 상태를 설정합니다. 복사가 완료되면 true로 변경됩니다. */
|
|
9
|
+
copied: boolean;
|
|
10
|
+
/** 버튼의 테두리 유무를 설정합니다. 기본값은 false입니다. */
|
|
9
11
|
borderless: boolean;
|
|
10
12
|
/** 버튼이 비활성화 상태인지 여부를 설정합니다. 비활성화된 버튼은 클릭할 수 없습니다. */
|
|
11
13
|
disabled: boolean;
|
|
12
|
-
/**
|
|
13
|
-
|
|
14
|
+
/** 복사할 텍스트를 설정합니다. */
|
|
15
|
+
value: string;
|
|
14
16
|
render(): import('lit-html').TemplateResult<1>;
|
|
17
|
+
/** 복사 버튼 클릭 핸들러 */
|
|
18
|
+
private handleButtonClick;
|
|
15
19
|
}
|