sigpro 1.1.20 → 1.2.40

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/sigpro.ui.d.ts ADDED
@@ -0,0 +1,308 @@
1
+ // sigpro.ui.d.ts
2
+
3
+ declare module "sigpro.ui" {
4
+ import type { Signal } from "./sigpro";
5
+
6
+ // Utilidades
7
+ function hide(): void;
8
+
9
+ // Toast
10
+ function toast(
11
+ message: string | (() => any) | any,
12
+ type?: "alert-success" | "alert-error" | "alert-warning" | "alert-info",
13
+ duration?: number
14
+ ): () => void;
15
+
16
+ // Calendar
17
+ interface CalendarProps {
18
+ class?: string;
19
+ value?: Signal<string | { start?: string; end?: string; startHour?: number; endHour?: number }> | any;
20
+ range?: boolean | (() => boolean);
21
+ hour?: boolean;
22
+ onChange?: (value: any) => void;
23
+ }
24
+ function calendar(p: CalendarProps): HTMLElement;
25
+
26
+ // Pallete
27
+ interface PalleteProps {
28
+ class?: string;
29
+ value?: Signal<string> | ((v: string) => void);
30
+ onchange?: (color: string) => void;
31
+ }
32
+ function pallete(p: PalleteProps): HTMLElement;
33
+
34
+ // UI Components
35
+ namespace ui {
36
+ // Accordion
37
+ function accordion(p: { class?: string; name?: string; checked?: boolean }, ...c: any[]): HTMLElement;
38
+ function accordion_title(p: { class?: string }, ...c: any[]): HTMLElement;
39
+ function accordion_content(p: { class?: string }, ...c: any[]): HTMLElement;
40
+
41
+ // Alert
42
+ function alert(p: { class?: string }, ...c: any[]): HTMLElement;
43
+
44
+ // Autocomplete
45
+ interface AutocompleteProps {
46
+ label?: string;
47
+ items: string[] | { label: string; value: any }[] | Signal<any[]>;
48
+ value?: Signal<string> | ((v: any) => void);
49
+ placeholder?: string;
50
+ class?: string;
51
+ icon?: string;
52
+ onChange?: (v: any) => void;
53
+ }
54
+ function autocomplete(p: AutocompleteProps): HTMLElement;
55
+
56
+ // Avatar
57
+ function avatar(p: { class?: string; innerClass?: string }, ...c: any[]): HTMLElement;
58
+ function avatar_group(p: { class?: string }, ...c: any[]): HTMLElement;
59
+
60
+ // Badge
61
+ function badge(p: { class?: string }, ...c: any[]): HTMLElement;
62
+
63
+ // Breadcrumbs
64
+ function breadcrumbs(p: { class?: string }, ...c: any[]): HTMLElement;
65
+
66
+ // Button
67
+ function button(p: { class?: string; onclick?: (e: Event) => void; disabled?: boolean | Signal<boolean> }, ...c: any[]): HTMLElement;
68
+
69
+ // Card
70
+ function card(p: { class?: string }, ...c: any[]): HTMLElement;
71
+ function card_title(p: { class?: string }, ...c: any[]): HTMLElement;
72
+ function card_body(p: { class?: string }, ...c: any[]): HTMLElement;
73
+ function card_actions(p: { class?: string }, ...c: any[]): HTMLElement;
74
+
75
+ // Carousel
76
+ function carousel(p: { class?: string }, ...c: any[]): HTMLElement;
77
+ function carousel_item(p: { class?: string }, ...c: any[]): HTMLElement;
78
+
79
+ // Chat
80
+ function chat(p: { class?: string }, ...c: any[]): HTMLElement;
81
+ function chat_image(p: { class?: string }, ...c: any[]): HTMLElement;
82
+ function chat_header(p: { class?: string }, ...c: any[]): HTMLElement;
83
+ function chat_bubble(p: { class?: string }, ...c: any[]): HTMLElement;
84
+ function chat_footer(p: { class?: string }, ...c: any[]): HTMLElement;
85
+
86
+ // Checkbox
87
+ function checkbox(p: { class?: string; checked?: boolean | Signal<boolean>; [key: string]: any }): HTMLElement;
88
+
89
+ // Colorpicker
90
+ function colorpicker(p: AutocompleteProps): HTMLElement;
91
+
92
+ // Combo
93
+ interface ComboProps {
94
+ label?: string;
95
+ value?: Signal<string> | string | ((v: string) => void);
96
+ placeholder?: string;
97
+ class?: string;
98
+ icon?: string;
99
+ custom?: any;
100
+ disabled?: boolean | (() => boolean);
101
+ readonly?: string;
102
+ }
103
+ function combo(p: ComboProps, c?: Function): HTMLElement;
104
+
105
+ // Datepicker
106
+ interface DatepickerProps {
107
+ label?: string;
108
+ value?: Signal<string | { start?: string; end?: string }>;
109
+ range?: boolean | (() => boolean);
110
+ placeholder?: string;
111
+ class?: string;
112
+ fromPlaceholder?: string;
113
+ toPlaceholder?: string;
114
+ onChange?: (v: any) => void;
115
+ }
116
+ function datepicker(p: DatepickerProps): HTMLElement;
117
+
118
+ // Divider
119
+ function divider(p: { class?: string }): HTMLElement;
120
+
121
+ // Drawer
122
+ function drawer(p: { class?: string }, ...c: any[]): HTMLElement;
123
+ function drawer_toggle(p: { class?: string }): HTMLElement;
124
+ function drawer_content(p: { class?: string }, ...c: any[]): HTMLElement;
125
+ function drawer_side(p: { class?: string }, ...c: any[]): HTMLElement;
126
+ function drawer_overlay(p: { class?: string }): HTMLElement;
127
+
128
+ // Dropdown
129
+ function dropdown(p: { class?: string }, ...c: any[]): HTMLElement;
130
+ function dropdown_button(p: { class?: string; tabindex?: string; role?: string }, ...c: any[]): HTMLElement;
131
+ function dropdown_content(p: { class?: string; tabindex?: string }, ...c: any[]): HTMLElement;
132
+
133
+ // FAB
134
+ function fab(p: { class?: string }, ...c: any[]): HTMLElement;
135
+ function fab_button(p: { class?: string; tabindex?: string; role?: string }, ...c: any[]): HTMLElement;
136
+
137
+ // Fieldset
138
+ function fieldset(p: { class?: string; label?: string }, ...c: any[]): HTMLElement;
139
+
140
+ // File
141
+ function file(p: { class?: string; multiple?: boolean; accept?: string; onchange?: (e: Event) => void }): HTMLElement;
142
+ interface FileDragProps {
143
+ class?: string;
144
+ drag?: boolean | Signal<boolean>;
145
+ ondrag?: (v: boolean) => void;
146
+ ondrop?: (files: FileList) => void;
147
+ }
148
+ function file_drag(p: FileDragProps, ...c: any[]): HTMLElement;
149
+ interface FilePreviewProps {
150
+ class?: string;
151
+ files?: File[] | Signal<File[]>;
152
+ onremove?: (index: number) => void;
153
+ }
154
+ function file_preview(p: FilePreviewProps): HTMLElement;
155
+ function file_error(p: { class?: string; message?: string }): HTMLElement;
156
+
157
+ // Float
158
+ function float(p: { label?: string }, ...c: any[]): HTMLElement;
159
+
160
+ // Indicator
161
+ function indicator(p: { class?: string; value?: any; badgeClass?: string }, ...c: any[]): HTMLElement;
162
+
163
+ // Input
164
+ function input(p: {
165
+ label?: string;
166
+ class?: string;
167
+ icon?: string;
168
+ right?: any;
169
+ type?: string | (() => string);
170
+ placeholder?: string;
171
+ value?: Signal<string> | string;
172
+ [key: string]: any
173
+ }): HTMLElement;
174
+
175
+ // Kbd
176
+ function kbd(p: { class?: string }, ...c: any[]): HTMLElement;
177
+
178
+ // Label
179
+ function label(p: { class?: string }, ...c: any[]): HTMLElement;
180
+
181
+ // Loading
182
+ function loading(p: { class?: string }): HTMLElement;
183
+
184
+ // Menu
185
+ function menu(p: { class?: string }, ...c: any[]): HTMLElement;
186
+ interface MenuItem {
187
+ label?: string;
188
+ href?: string;
189
+ items?: MenuItem[];
190
+ open?: boolean;
191
+ submenuClass?: string;
192
+ }
193
+ function menu_items(p: { items?: MenuItem[] }): HTMLElement[];
194
+
195
+ // Modal
196
+ function modal(p: { class?: string }, ...c: any[]): HTMLElement;
197
+ function modal_box(p: { class?: string }, ...c: any[]): HTMLElement;
198
+ function modal_action(p: { class?: string }, ...c: any[]): HTMLElement;
199
+
200
+ // Navbar
201
+ function navbar(p: { class?: string }, ...c: any[]): HTMLElement;
202
+
203
+ // Option
204
+ function option(p: { [key: string]: any }, ...c: any[]): HTMLElement;
205
+
206
+ // Password
207
+ function password(p: { label?: string; class?: string; value?: Signal<string> }): HTMLElement;
208
+
209
+ // Progress
210
+ function progress(p: { class?: string; value?: number | Signal<number>; max?: number | string }): HTMLElement;
211
+
212
+ // Radial
213
+ function radial(p: { class?: string; value?: number | Signal<number>; role?: string }): HTMLElement;
214
+
215
+ // Radio
216
+ function radio(p: { class?: string; name?: string; checked?: boolean | Signal<boolean>; [key: string]: any }): HTMLElement;
217
+
218
+ // Range
219
+ function range(p: { class?: string; min?: number; max?: number; value?: number | Signal<number>; oninput?: (e: Event) => void }): HTMLElement;
220
+
221
+ // Rating
222
+ interface RatingProps {
223
+ class?: string;
224
+ count?: number;
225
+ mask?: string;
226
+ itemClass?: string;
227
+ name?: string;
228
+ value?: Signal<number> | number;
229
+ offset?: number;
230
+ onChange?: (i: number) => void;
231
+ }
232
+ function rating(p: RatingProps): HTMLElement;
233
+
234
+ // Search
235
+ function search(p: { label?: string; class?: string; icon?: string; value?: Signal<string>; placeholder?: string }): HTMLElement;
236
+
237
+ // Select
238
+ function select(p: { class?: string; [key: string]: any }, ...c: any[]): HTMLElement;
239
+
240
+ // Stack
241
+ function stack(p: { class?: string }, ...c: any[]): HTMLElement;
242
+
243
+ // Stat
244
+ function stat(p: { class?: string }, ...c: any[]): HTMLElement;
245
+ function stat_figure(p: { class?: string }, ...c: any[]): HTMLElement;
246
+ function stat_title(p: { class?: string }, ...c: any[]): HTMLElement;
247
+ function stat_value(p: { class?: string }, ...c: any[]): HTMLElement;
248
+ function stat_desc(p: { class?: string }, ...c: any[]): HTMLElement;
249
+
250
+ // Steps
251
+ function steps(p: { class?: string }, ...c: any[]): HTMLElement;
252
+ function step(p: { class?: string; dataContent?: string }, ...c: any[]): HTMLElement;
253
+
254
+ // Swap
255
+ function swap(p: { class?: string; value?: Signal<boolean> | boolean }, ...c: any[]): HTMLElement;
256
+ function swap_on(p: { class?: string }, ...c: any[]): HTMLElement;
257
+ function swap_off(p: { class?: string }, ...c: any[]): HTMLElement;
258
+
259
+ // Table
260
+ function table(p: { class?: string }, ...c: any[]): HTMLElement;
261
+ function table_head(p: { class?: string }, ...c: any[]): HTMLElement;
262
+ function table_body(p: { class?: string }, ...c: any[]): HTMLElement;
263
+ function table_foot(p: { class?: string }, ...c: any[]): HTMLElement;
264
+ function table_row(p: { class?: string }, ...c: any[]): HTMLElement;
265
+ function table_th(p: { class?: string }, ...c: any[]): HTMLElement;
266
+ function table_td(p: { class?: string }, ...c: any[]): HTMLElement;
267
+
268
+ // Tabs
269
+ function tabs(p: { class?: string }, ...c: any[]): HTMLElement;
270
+ interface TabProps {
271
+ class?: string;
272
+ classContent?: string;
273
+ name?: string;
274
+ label?: string;
275
+ content?: any;
276
+ checked?: boolean | (() => boolean);
277
+ tabs?: Signal<any[]> | ((v: any[]) => void);
278
+ index?: number;
279
+ closable?: boolean;
280
+ onclick?: () => void;
281
+ }
282
+ function tab(p: TabProps): any[];
283
+
284
+ // Textarea
285
+ function textarea(p: { class?: string; [key: string]: any }): HTMLElement;
286
+
287
+ // Textrotate
288
+ function textrotate(p: { class?: string }, ...c: any[]): HTMLElement;
289
+
290
+ // Theme
291
+ function theme(p?: { value?: string; class?: string }): HTMLElement;
292
+
293
+ // Timeline
294
+ function timeline(p: { class?: string }, ...c: any[]): HTMLElement;
295
+ function timeline_start(p: { class?: string }, ...c: any[]): HTMLElement;
296
+ function timeline_middle(p: { class?: string }, ...c: any[]): HTMLElement;
297
+ function timeline_end(p: { class?: string }, ...c: any[]): HTMLElement;
298
+
299
+ // Toggle
300
+ function toggle(p: { class?: string; value?: string | Signal<string>; checked?: boolean | Signal<boolean>; [key: string]: any }): HTMLElement;
301
+
302
+ // Tooltip
303
+ function tooltip(p: { class?: string; tip?: string }, ...c: any[]): HTMLElement;
304
+
305
+ // Validator
306
+ function validator(p: { class?: string }, ...c: any[]): HTMLElement;
307
+ }
308
+ }