fancy-ui-ts 1.0.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/LICENSE +21 -0
- package/README.md +10 -0
- package/dist/index.css +232 -0
- package/dist/index.d.ts +174 -0
- package/dist/index.js +1233 -0
- package/package.json +38 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Luan Peixoto
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
package/dist/index.css
ADDED
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
/* src/styles/tokens/fc-primitives.css */
|
|
2
|
+
:root {
|
|
3
|
+
--fc-white: #ffffff;
|
|
4
|
+
--fc-gray-50: #fafafa;
|
|
5
|
+
--fc-gray-100: #f4f4f5;
|
|
6
|
+
--fc-gray-200: #e4e4e7;
|
|
7
|
+
--fc-gray-300: #d4d4d8;
|
|
8
|
+
--fc-gray-400: #a1a1aa;
|
|
9
|
+
--fc-gray-500: #71717a;
|
|
10
|
+
--fc-gray-600: #52525b;
|
|
11
|
+
--fc-gray-700: #3f3f46;
|
|
12
|
+
--fc-gray-800: #27272a;
|
|
13
|
+
--fc-gray-900: #18181b;
|
|
14
|
+
--fc-primary-50: #eff6ff;
|
|
15
|
+
--fc-primary-100: #dbeafe;
|
|
16
|
+
--fc-primary-200: #bfdbfe;
|
|
17
|
+
--fc-primary-300: #93c5fd;
|
|
18
|
+
--fc-primary-400: #60a5fa;
|
|
19
|
+
--fc-primary-500: #3b82f6;
|
|
20
|
+
--fc-primary-600: #2563eb;
|
|
21
|
+
--fc-primary-700: #1d4ed8;
|
|
22
|
+
--fc-primary-800: #1e40af;
|
|
23
|
+
--fc-primary-900: #1e3a8a;
|
|
24
|
+
--fc-success-500: #16a34a;
|
|
25
|
+
--fc-warning-500: #d97706;
|
|
26
|
+
--fc-danger-50: #fef2f2;
|
|
27
|
+
--fc-danger-100: #fee2e2;
|
|
28
|
+
--fc-danger-200: #fecaca;
|
|
29
|
+
--fc-danger-300: #fca5a5;
|
|
30
|
+
--fc-danger-400: #ef4444;
|
|
31
|
+
--fc-danger-500: #dc2626;
|
|
32
|
+
--fc-danger-600: #b91c1c;
|
|
33
|
+
--fc-danger-700: #991b1b;
|
|
34
|
+
--fc-danger-800: #7f1d1d;
|
|
35
|
+
--fc-danger-900: #450a0a;
|
|
36
|
+
--fc-space-1: 4px;
|
|
37
|
+
--fc-space-2: 8px;
|
|
38
|
+
--fc-space-3: 12px;
|
|
39
|
+
--fc-space-4: 16px;
|
|
40
|
+
--fc-space-5: 20px;
|
|
41
|
+
--fc-space-6: 24px;
|
|
42
|
+
--fc-radius-xs: 4px;
|
|
43
|
+
--fc-radius-sm: 6px;
|
|
44
|
+
--fc-radius-md: 8px;
|
|
45
|
+
--fc-radius-lg: 10px;
|
|
46
|
+
--fc-radius-xl: 12px;
|
|
47
|
+
--fc-border-width-xs: 1px;
|
|
48
|
+
--fc-border-width-sm: 2px;
|
|
49
|
+
--fc-border-width-md: 3px;
|
|
50
|
+
--fc-border-width-lg: 4px;
|
|
51
|
+
--fc-shadow-none: none;
|
|
52
|
+
--fc-shadow-sm: 0 1px 2px rgb(0 0 0 / 0.06);
|
|
53
|
+
--fc-shadow-md: 0 4px 6px rgb(0 0 0 / 0.1);
|
|
54
|
+
--fc-shadow-lg: 0 10px 15px rgb(0 0 0 / 0.15);
|
|
55
|
+
--focus-ring-none: none;
|
|
56
|
+
--fc-focus-ring-sm: 0 0 0 3px;
|
|
57
|
+
--fc-focus-ring-md: 0 0 0 4px;
|
|
58
|
+
--fc-focus-ring-lg: 0 0 0 6px;
|
|
59
|
+
--fc-focus-ring-primary: rgba(59, 130, 246, 0.35);
|
|
60
|
+
--fc-focus-ring-secondary: rgba(59, 130, 246, 0.6);
|
|
61
|
+
--fc-focus-ring-danger: rgba(239, 68, 68, 0.5);
|
|
62
|
+
--fc-focus-ring-danger-secondary: rgba(239, 68, 68, 0.6);
|
|
63
|
+
--fc-focus-ring-gray: rgba(107, 114, 128, 0.35);
|
|
64
|
+
--fc-font-size-sm: 12px;
|
|
65
|
+
--fc-font-size-md: 14px;
|
|
66
|
+
--fc-font-size-lg: 16px;
|
|
67
|
+
--fc-font-weight-normal: 400;
|
|
68
|
+
--fc-font-weight-medium: 500;
|
|
69
|
+
--fc-font-weight-bold: 600;
|
|
70
|
+
--fc-line-height: 1.4;
|
|
71
|
+
--fc-font-family: system-ui, sans-serif;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/* src/styles/tokens/fc-tokens.css */
|
|
75
|
+
:root {
|
|
76
|
+
font-family: var(--fc-font-family);
|
|
77
|
+
--fc-combobox-bg: var(--fc-white);
|
|
78
|
+
--fc-combobox-disabled-bg: var(--fc-gray-50);
|
|
79
|
+
--fc-combobox-fg: var(--fc-gray-900);
|
|
80
|
+
--fc-combobox-border: var(--fc-gray-300);
|
|
81
|
+
--fc-combobox-border-hover: var(--fc-gray-400);
|
|
82
|
+
--fc-combobox-border-focus: var(--fc-primary-400);
|
|
83
|
+
--fc-combobox-placeholder: var(--fc-gray-400);
|
|
84
|
+
--fc-combobox-disabled-placeholder: var(--fc-gray-300);
|
|
85
|
+
--fc-combobox-focus-ring: var(--fc-focus-ring-sm) var(--fc-focus-ring-primary);
|
|
86
|
+
--fc-combobox-error-bg: var(--fc-danger-50);
|
|
87
|
+
--fc-combobox-error-color: var(--fc-danger-300);
|
|
88
|
+
--fc-combobox-error-focus-ring: var(--fc-focus-ring-danger);
|
|
89
|
+
--fc-combobox-max-width: 412px;
|
|
90
|
+
--fc-combobox-padding: var(--fc-space-3);
|
|
91
|
+
--fc-combobox-border-width: var(--fc-border-width-xs);
|
|
92
|
+
--fc-combobox-radius: var(--fc-radius-md);
|
|
93
|
+
--fc-combobox-shadow: var(--fc-shadow-none);
|
|
94
|
+
--fc-option-bg: var(--fc-white);
|
|
95
|
+
--fc-option-disabled-bg: var(--fc-gray-50);
|
|
96
|
+
--fc-option-bg-hover: var(--fc-gray-100);
|
|
97
|
+
--fc-option-bg-selected: var(--fc-primary-200);
|
|
98
|
+
--fc-option-bg-active: var(--fc-primary-100);
|
|
99
|
+
--fc-option-fg: var(--fc-gray-900);
|
|
100
|
+
--fc-option-disabled-fg: var(--fc-gray-300);
|
|
101
|
+
--fc-option-fg-selected: var(--fc-primary-700);
|
|
102
|
+
--fc-option-padding: var(--fc-space-3);
|
|
103
|
+
--fc-option-radius: var(--fc-radius-md);
|
|
104
|
+
--fc-input-bg: var(--fc-white);
|
|
105
|
+
--fc-input-disabled-bg: var(--fc-gray-50);
|
|
106
|
+
--fc-input-fg: var(--fc-gray-900);
|
|
107
|
+
--fc-input-border: var(--fc-gray-400);
|
|
108
|
+
--fc-input-border-hover: var(--fc-gray-400);
|
|
109
|
+
--fc-input-border-focus: var(--fc-primary-400);
|
|
110
|
+
--fc-input-placeholder: var(--fc-gray-400);
|
|
111
|
+
--fc-input-disabled-placeholder: var(--fc-gray-300);
|
|
112
|
+
--fc-input-focus-ring: var(--fc-focus-ring-sm) var(--fc-focus-ring-primary);
|
|
113
|
+
--fc-input-error-bg: var(--fc-danger-50);
|
|
114
|
+
--fc-input-error-color: var(--fc-danger-300);
|
|
115
|
+
--fc-input-error-focus-ring: var(--fc-focus-ring-danger);
|
|
116
|
+
--fc-input-password-icon-color: var(--fc-gray-400);
|
|
117
|
+
--fc-input-password-icon-color-hover: var(--fc-gray-500);
|
|
118
|
+
--fc-input-file-border: var(--fc-gray-400);
|
|
119
|
+
--fc-input-file-border-hover: var(--fc-gray-400);
|
|
120
|
+
--fc-input-file-btn-bg: var(--fc-gray-400);
|
|
121
|
+
--fc-input-file-btn-bg-hover: var(--fc-gray-400);
|
|
122
|
+
--fc-input-file-btn-fg: var(--fc-gray-900);
|
|
123
|
+
--fc-input-file-btn-fg-hover: var(--fc-gray-900);
|
|
124
|
+
--fc-input-max-width: 412px;
|
|
125
|
+
--fc-input-padding: var(--fc-space-3);
|
|
126
|
+
--fc-input-border-width: var(--fc-border-width-xs);
|
|
127
|
+
--fc-input-radius: var(--fc-radius-md);
|
|
128
|
+
--fc-input-shadow: var(--fc-shadow-none);
|
|
129
|
+
--fc-error-color: var(--fc-danger-300);
|
|
130
|
+
--fc-error-max-width: fit-content;
|
|
131
|
+
--fc-error-font-size: var(--fc-font-size-sm);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/* src/styles/themes/fc-theme-light.css */
|
|
135
|
+
:root[fc-theme=light] {
|
|
136
|
+
--fc-combobox-bg: var(--fc-white);
|
|
137
|
+
--fc-combobox-disabled-bg: var(--fc-gray-50);
|
|
138
|
+
--fc-combobox-fg: var(--fc-gray-900);
|
|
139
|
+
--fc-combobox-border: var(--fc-gray-300);
|
|
140
|
+
--fc-combobox-border-hover: var(--fc-gray-400);
|
|
141
|
+
--fc-combobox-border-focus: var(--fc-primary-400);
|
|
142
|
+
--fc-combobox-placeholder: var(--fc-gray-400);
|
|
143
|
+
--fc-combobox-disabled-placeholder: var(--fc-gray-300);
|
|
144
|
+
--fc-combobox-focus-ring: var(--fc-focus-ring-sm) var(--fc-focus-ring-primary);
|
|
145
|
+
--fc-combobox-error-bg: var(--fc-danger-50);
|
|
146
|
+
--fc-combobox-error-color: var(--fc-danger-300);
|
|
147
|
+
--fc-combobox-error-focus-ring: var(--fc-focus-ring-danger);
|
|
148
|
+
--fc-option-bg: var(--fc-white);
|
|
149
|
+
--fc-option-disabled-bg: var(--fc-gray-50);
|
|
150
|
+
--fc-option-bg-hover: var(--fc-gray-100);
|
|
151
|
+
--fc-option-bg-selected: var(--fc-primary-200);
|
|
152
|
+
--fc-option-bg-active: var(--fc-primary-100);
|
|
153
|
+
--fc-option-fg: var(--fc-gray-900);
|
|
154
|
+
--fc-option-disabled-fg: var(--fc-gray-300);
|
|
155
|
+
--fc-option-fg-selected: var(--fc-primary-700);
|
|
156
|
+
--fc-input-bg: var(--fc-white);
|
|
157
|
+
--fc-input-disabled-bg: var(--fc-gray-50);
|
|
158
|
+
--fc-input-fg: var(--fc-gray-900);
|
|
159
|
+
--fc-input-border: var(--fc-gray-300);
|
|
160
|
+
--fc-input-border-hover: var(--fc-gray-400);
|
|
161
|
+
--fc-input-border-focus: var(--fc-primary-400);
|
|
162
|
+
--fc-input-placeholder: var(--fc-gray-400);
|
|
163
|
+
--fc-input-disabled-placeholder: var(--fc-gray-300);
|
|
164
|
+
--fc-input-focus-ring: var(--fc-focus-ring-sm) var(--fc-focus-ring-primary);
|
|
165
|
+
--fc-input-error-bg: var(--fc-danger-50);
|
|
166
|
+
--fc-input-error-color: var(--fc-danger-300);
|
|
167
|
+
--fc-input-error-focus-ring: var(--fc-focus-ring-danger);
|
|
168
|
+
--fc-input-password-icon-color: var(--fc-gray-400);
|
|
169
|
+
--fc-input-password-icon-color-hover: var(--fc-gray-500);
|
|
170
|
+
--fc-input-file-border: var(--fc-gray-300);
|
|
171
|
+
--fc-input-file-border-hover: var(--fc-gray-300);
|
|
172
|
+
--fc-input-file-btn-bg: var(--fc-gray-50);
|
|
173
|
+
--fc-input-file-btn-bg-hover: var(--fc-gray-100);
|
|
174
|
+
--fc-input-file-btn-fg: var(--fc-gray-700);
|
|
175
|
+
--fc-input-file-btn-fg-hover: var(--fc-gray-700);
|
|
176
|
+
--fc-input-max-width: 412px;
|
|
177
|
+
--fc-input-padding: var(--fc-space-3);
|
|
178
|
+
--fc-input-border-width: var(--fc-border-width-xs);
|
|
179
|
+
--fc-input-radius: var(--fc-radius-md);
|
|
180
|
+
--fc-input-shadow: var(--fc-shadow-none);
|
|
181
|
+
--fc-error-color: var(--fc-danger-300);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
/* src/styles/themes/fc-theme-dark.css */
|
|
185
|
+
:root[fc-theme=dark] {
|
|
186
|
+
--fc-combobox-bg: var(--fc-gray-800);
|
|
187
|
+
--fc-combobox-disabled-bg: var(--fc-gray-900);
|
|
188
|
+
--fc-combobox-fg: var(--fc-gray-200);
|
|
189
|
+
--fc-combobox-border: var(--fc-gray-700);
|
|
190
|
+
--fc-combobox-border-hover: var(--fc-gray-500);
|
|
191
|
+
--fc-combobox-border-focus: var(--fc-primary-400);
|
|
192
|
+
--fc-combobox-placeholder: var(--fc-gray-500);
|
|
193
|
+
--fc-combobox-disabled-placeholder: var(--fc-gray-700);
|
|
194
|
+
--fc-combobox-focus-ring: var(--fc-focus-ring-sm) var(--fc-focus-ring-secondary);
|
|
195
|
+
--fc-combobox-error-bg: var(--fc-danger-900);
|
|
196
|
+
--fc-combobox-error-color: var(--fc-danger-700);
|
|
197
|
+
--fc-combobox-error-focus-ring: var(--fc-focus-ring-danger-secondary);
|
|
198
|
+
--fc-option-bg: var(--fc-gray-800);
|
|
199
|
+
--fc-option-disabled-bg: var(--fc-gray-900);
|
|
200
|
+
--fc-option-bg-hover: var(--fc-gray-700);
|
|
201
|
+
--fc-option-bg-active: var(--fc-primary-500);
|
|
202
|
+
--fc-option-bg-selected: var(--fc-primary-600);
|
|
203
|
+
--fc-option-fg: var(--fc-gray-200);
|
|
204
|
+
--fc-option-disabled-fg: var(--fc-gray-700);
|
|
205
|
+
--fc-option-fg-selected: var(--fc-primary-50);
|
|
206
|
+
--fc-input-bg: var(--fc-gray-800);
|
|
207
|
+
--fc-input-disabled-bg: var(--fc-gray-900);
|
|
208
|
+
--fc-input-fg: var(--fc-gray-200);
|
|
209
|
+
--fc-input-border: var(--fc-gray-700);
|
|
210
|
+
--fc-input-border-hover: var(--fc-gray-500);
|
|
211
|
+
--fc-input-border-focus: var(--fc-primary-400);
|
|
212
|
+
--fc-input-placeholder: var(--fc-gray-500);
|
|
213
|
+
--fc-input-disabled-placeholder: var(--fc-gray-700);
|
|
214
|
+
--fc-input-focus-ring: var(--fc-focus-ring-sm) var(--fc-focus-ring-secondary);
|
|
215
|
+
--fc-input-error-bg: var(--fc-danger-900);
|
|
216
|
+
--fc-input-error-color: var(--fc-danger-700);
|
|
217
|
+
--fc-input-error-focus-ring: var(--fc-focus-ring-danger-secondary);
|
|
218
|
+
--fc-input-password-icon-color: var(--fc-gray-500);
|
|
219
|
+
--fc-input-password-icon-color-hover: var(--fc-gray-400);
|
|
220
|
+
--fc-input-file-border: var(--fc-gray-700);
|
|
221
|
+
--fc-input-file-border-hover: var(--fc-gray-700);
|
|
222
|
+
--fc-input-file-btn-bg: var(--fc-gray-900);
|
|
223
|
+
--fc-input-file-btn-bg-hover: var(--fc-gray-700);
|
|
224
|
+
--fc-input-file-btn-fg: var(--fc-gray-200);
|
|
225
|
+
--fc-input-file-btn-fg-hover: var(--fc-gray-200);
|
|
226
|
+
--fc-input-max-width: 412px;
|
|
227
|
+
--fc-input-padding: var(--fc-space-3);
|
|
228
|
+
--fc-input-border-width: var(--fc-border-width-xs);
|
|
229
|
+
--fc-input-radius: var(--fc-radius-md);
|
|
230
|
+
--fc-input-shadow: var(--fc-shadow-none);
|
|
231
|
+
--fc-error-color: var(--fc-danger-700);
|
|
232
|
+
}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
declare class FcCombobox extends HTMLElement {
|
|
2
|
+
static get observedAttributes(): string[];
|
|
3
|
+
private inputEl;
|
|
4
|
+
private dropdownEl;
|
|
5
|
+
static formAssociated: boolean;
|
|
6
|
+
private internals;
|
|
7
|
+
private _value;
|
|
8
|
+
private activeIndex;
|
|
9
|
+
private _validatorFunction;
|
|
10
|
+
constructor();
|
|
11
|
+
get validity(): ValidityState;
|
|
12
|
+
get validationMessage(): string;
|
|
13
|
+
get willValidate(): boolean;
|
|
14
|
+
checkValidity(): boolean;
|
|
15
|
+
reportValidity(): boolean;
|
|
16
|
+
get placeholder(): string;
|
|
17
|
+
set placeholder(val: string);
|
|
18
|
+
get name(): string;
|
|
19
|
+
set name(val: string);
|
|
20
|
+
get disabled(): boolean;
|
|
21
|
+
set disabled(val: boolean);
|
|
22
|
+
get value(): string;
|
|
23
|
+
set value(newValue: string);
|
|
24
|
+
get label(): string;
|
|
25
|
+
get options(): {
|
|
26
|
+
label: string;
|
|
27
|
+
value: string;
|
|
28
|
+
disabled?: boolean;
|
|
29
|
+
}[];
|
|
30
|
+
set options(data: {
|
|
31
|
+
label: string;
|
|
32
|
+
value: string;
|
|
33
|
+
disabled?: boolean;
|
|
34
|
+
}[]);
|
|
35
|
+
get required(): boolean;
|
|
36
|
+
set required(val: boolean);
|
|
37
|
+
get readonly(): boolean;
|
|
38
|
+
set readonly(val: boolean);
|
|
39
|
+
get strict(): boolean;
|
|
40
|
+
set strict(val: boolean);
|
|
41
|
+
get validator(): ((value: string) => string | null) | null;
|
|
42
|
+
set validator(func: ((value: string) => string | null) | null);
|
|
43
|
+
connectedCallback(): void;
|
|
44
|
+
attributeChangedCallback(name: string, _old: string, newVal: string): void;
|
|
45
|
+
disconnectedCallback(): void;
|
|
46
|
+
formResetCallback(): void;
|
|
47
|
+
formStateRestoreCallback(state: string | File | FormData | null, mode: 'restore' | 'autocomplete'): void;
|
|
48
|
+
/** helper functions for the eventListeners */
|
|
49
|
+
private onInput;
|
|
50
|
+
private onChange;
|
|
51
|
+
private onOptionSelect;
|
|
52
|
+
private onOutsideClick;
|
|
53
|
+
private onFocusOut;
|
|
54
|
+
private onDropdownClick;
|
|
55
|
+
private onFocus;
|
|
56
|
+
private onSlotChange;
|
|
57
|
+
private onKeyDown;
|
|
58
|
+
private onBlur;
|
|
59
|
+
private onInvalid;
|
|
60
|
+
private setActiveOption;
|
|
61
|
+
private getVisibleOptions;
|
|
62
|
+
private selectOption;
|
|
63
|
+
private toggleDropdown;
|
|
64
|
+
private syncValidity;
|
|
65
|
+
setProps(props: Record<string, any>): void;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
declare const defineCombobox: () => typeof FcCombobox;
|
|
69
|
+
|
|
70
|
+
declare class FcOption extends HTMLElement {
|
|
71
|
+
static get observedAttributes(): string[];
|
|
72
|
+
constructor();
|
|
73
|
+
get value(): string;
|
|
74
|
+
set value(data: string);
|
|
75
|
+
get label(): string;
|
|
76
|
+
set label(val: string);
|
|
77
|
+
get selected(): boolean;
|
|
78
|
+
set selected(isSelected: boolean);
|
|
79
|
+
get disabled(): boolean;
|
|
80
|
+
set disabled(val: boolean);
|
|
81
|
+
get active(): boolean;
|
|
82
|
+
set active(isActive: boolean);
|
|
83
|
+
connectedCallback(): void;
|
|
84
|
+
attributeChangedCallback(name: string, _oldVal: string, _newVal: string): void;
|
|
85
|
+
private onClick;
|
|
86
|
+
private updateSelection;
|
|
87
|
+
setProps(props: Record<string, any>): void;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
declare const defineOption: () => typeof FcOption;
|
|
91
|
+
|
|
92
|
+
declare class FcInput extends HTMLElement {
|
|
93
|
+
static get observedAttributes(): string[];
|
|
94
|
+
private inputEl;
|
|
95
|
+
private passwordBtnEl;
|
|
96
|
+
private fcPassEnableIcon;
|
|
97
|
+
private fcPassDisableIcon;
|
|
98
|
+
private _value;
|
|
99
|
+
private _validatorFunction;
|
|
100
|
+
static formAssociated: boolean;
|
|
101
|
+
private internals;
|
|
102
|
+
private readonly ALLOWED_TYPES;
|
|
103
|
+
constructor();
|
|
104
|
+
get validity(): ValidityState;
|
|
105
|
+
get validationMessage(): string;
|
|
106
|
+
get willValidate(): boolean;
|
|
107
|
+
checkValidity(): boolean;
|
|
108
|
+
reportValidity(): boolean;
|
|
109
|
+
get value(): string;
|
|
110
|
+
set value(val: string);
|
|
111
|
+
get files(): FileList | null;
|
|
112
|
+
get placeholder(): string;
|
|
113
|
+
set placeholder(val: string);
|
|
114
|
+
get type(): string;
|
|
115
|
+
set type(val: string);
|
|
116
|
+
get name(): string;
|
|
117
|
+
set name(val: string);
|
|
118
|
+
get disabled(): boolean;
|
|
119
|
+
set disabled(val: boolean);
|
|
120
|
+
get required(): boolean;
|
|
121
|
+
set required(val: boolean);
|
|
122
|
+
get readonly(): boolean;
|
|
123
|
+
set readonly(val: boolean);
|
|
124
|
+
get validator(): ((value: string) => string | null) | null;
|
|
125
|
+
set validator(func: ((value: string) => string | null) | null);
|
|
126
|
+
get min(): string;
|
|
127
|
+
set min(val: string);
|
|
128
|
+
get max(): string;
|
|
129
|
+
set max(val: string);
|
|
130
|
+
get step(): string;
|
|
131
|
+
set step(val: string);
|
|
132
|
+
get minLength(): number;
|
|
133
|
+
set minLength(val: number);
|
|
134
|
+
get maxLength(): number;
|
|
135
|
+
set maxLength(val: number);
|
|
136
|
+
get pattern(): string;
|
|
137
|
+
set pattern(val: string);
|
|
138
|
+
connectedCallback(): void;
|
|
139
|
+
disconnectedCallback(): void;
|
|
140
|
+
attributeChangedCallback(name: string, _oldVal: string, newVal: string): void;
|
|
141
|
+
formResetCallback(): void;
|
|
142
|
+
formStateRestoreCallback(state: string | File | FormData | null, _mode: 'restore' | 'autocomplete'): void;
|
|
143
|
+
/** functions that run by eventListeners */
|
|
144
|
+
private onInput;
|
|
145
|
+
private onChange;
|
|
146
|
+
private onBlur;
|
|
147
|
+
private onInvalid;
|
|
148
|
+
private onTogglePassword;
|
|
149
|
+
private updateToggleIcon;
|
|
150
|
+
private syncValidity;
|
|
151
|
+
setProps(props: Record<string, any>): void;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
declare const defineInput: () => typeof FcInput;
|
|
155
|
+
|
|
156
|
+
declare class FcError extends HTMLElement {
|
|
157
|
+
static get observedAttributes(): string[];
|
|
158
|
+
private errorTextEl;
|
|
159
|
+
private targetEl;
|
|
160
|
+
constructor();
|
|
161
|
+
connectedCallback(): void;
|
|
162
|
+
disconnectedCallback(): void;
|
|
163
|
+
attributeChangedCallback(name: string, oldVal: string, newVal: string): void;
|
|
164
|
+
private handleErrorState;
|
|
165
|
+
private findTarget;
|
|
166
|
+
private bindListeners;
|
|
167
|
+
private cleanup;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
declare const defineError: () => typeof FcError;
|
|
171
|
+
|
|
172
|
+
declare const defineAll: () => void;
|
|
173
|
+
|
|
174
|
+
export { FcCombobox, FcError, FcInput, FcOption, defineAll, defineCombobox, defineError, defineInput, defineOption };
|