@eduboxpro/studio 0.1.5 → 0.1.7
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/README.md +59 -0
- package/fesm2022/eduboxpro-studio.mjs +649 -4
- package/fesm2022/eduboxpro-studio.mjs.map +1 -1
- package/index.d.ts +453 -9
- package/package.json +1 -1
- package/src/styles/studio.scss +18 -0
package/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
2
|
import { InjectionToken, EnvironmentProviders, ElementRef, Signal } from '@angular/core';
|
|
3
|
-
import { icons } from 'lucide-angular';
|
|
4
3
|
import { ControlValueAccessor } from '@angular/forms';
|
|
4
|
+
import { icons } from 'lucide-angular';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Theme mode: light or dark
|
|
@@ -56,6 +56,15 @@ interface StudioThemeConfig {
|
|
|
56
56
|
typography?: {
|
|
57
57
|
fontFamily?: string;
|
|
58
58
|
fontMono?: string;
|
|
59
|
+
/**
|
|
60
|
+
* Google Fonts configuration
|
|
61
|
+
* Automatically loads fonts from Google Fonts
|
|
62
|
+
*/
|
|
63
|
+
googleFonts?: Array<{
|
|
64
|
+
family: string;
|
|
65
|
+
weights?: number[];
|
|
66
|
+
display?: 'auto' | 'block' | 'swap' | 'fallback' | 'optional';
|
|
67
|
+
}>;
|
|
59
68
|
fontSize?: {
|
|
60
69
|
xs?: string;
|
|
61
70
|
sm?: string;
|
|
@@ -165,6 +174,30 @@ interface InputDefaultsConfig {
|
|
|
165
174
|
floatingLabel?: boolean;
|
|
166
175
|
clearable?: boolean;
|
|
167
176
|
}
|
|
177
|
+
/**
|
|
178
|
+
* Checkbox component defaults configuration
|
|
179
|
+
*/
|
|
180
|
+
interface CheckboxDefaultsConfig {
|
|
181
|
+
size?: 'sm' | 'md' | 'lg';
|
|
182
|
+
color?: 'primary' | 'secondary' | 'success' | 'error';
|
|
183
|
+
variant?: 'default' | 'outlined' | 'filled';
|
|
184
|
+
radius?: 'none' | 'sm' | 'md' | 'lg' | 'full';
|
|
185
|
+
labelPosition?: 'left' | 'right';
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* Textarea component defaults configuration
|
|
189
|
+
*/
|
|
190
|
+
interface TextareaDefaultsConfig {
|
|
191
|
+
variant?: 'outline' | 'filled' | 'underline';
|
|
192
|
+
size?: 'sm' | 'md' | 'lg';
|
|
193
|
+
color?: 'primary' | 'secondary' | 'success' | 'error';
|
|
194
|
+
radius?: 'none' | 'sm' | 'md' | 'lg' | 'full';
|
|
195
|
+
rows?: number;
|
|
196
|
+
autoResize?: boolean;
|
|
197
|
+
resize?: 'none' | 'vertical' | 'horizontal' | 'both';
|
|
198
|
+
showCharCount?: boolean;
|
|
199
|
+
clearable?: boolean;
|
|
200
|
+
}
|
|
168
201
|
/**
|
|
169
202
|
* Components defaults configuration
|
|
170
203
|
*/
|
|
@@ -173,6 +206,8 @@ interface ComponentsConfig {
|
|
|
173
206
|
badge?: BadgeDefaultsConfig;
|
|
174
207
|
switch?: SwitchDefaultsConfig;
|
|
175
208
|
input?: InputDefaultsConfig;
|
|
209
|
+
checkbox?: CheckboxDefaultsConfig;
|
|
210
|
+
textarea?: TextareaDefaultsConfig;
|
|
176
211
|
}
|
|
177
212
|
/**
|
|
178
213
|
* Main Studio configuration interface
|
|
@@ -237,11 +272,11 @@ declare function provideStudioConfig(config?: StudioConfig): EnvironmentProvider
|
|
|
237
272
|
declare class BadgeComponent {
|
|
238
273
|
private readonly configService;
|
|
239
274
|
private readonly badgeDefaults;
|
|
240
|
-
variantInput: _angular_core.InputSignal<"
|
|
275
|
+
variantInput: _angular_core.InputSignal<"solid" | "outline" | "soft" | "dot" | undefined>;
|
|
241
276
|
sizeInput: _angular_core.InputSignal<"sm" | "md" | "lg" | undefined>;
|
|
242
277
|
colorInput: _angular_core.InputSignal<"primary" | "secondary" | "success" | "error" | "warning" | "info" | "neutral" | undefined>;
|
|
243
278
|
radiusInput: _angular_core.InputSignal<"sm" | "md" | "lg" | "full" | undefined>;
|
|
244
|
-
variant: _angular_core.Signal<"
|
|
279
|
+
variant: _angular_core.Signal<"solid" | "outline" | "soft" | "dot">;
|
|
245
280
|
size: _angular_core.Signal<"sm" | "md" | "lg">;
|
|
246
281
|
color: _angular_core.Signal<"primary" | "secondary" | "success" | "error" | "warning" | "info" | "neutral">;
|
|
247
282
|
radius: _angular_core.Signal<"sm" | "md" | "lg" | "full">;
|
|
@@ -283,16 +318,16 @@ declare class BadgeComponent {
|
|
|
283
318
|
declare class ButtonComponent {
|
|
284
319
|
private readonly configService;
|
|
285
320
|
private readonly buttonDefaults;
|
|
286
|
-
variantInput: _angular_core.InputSignal<"
|
|
321
|
+
variantInput: _angular_core.InputSignal<"solid" | "outline" | "ghost" | undefined>;
|
|
287
322
|
sizeInput: _angular_core.InputSignal<"sm" | "md" | "lg" | undefined>;
|
|
288
323
|
colorInput: _angular_core.InputSignal<"primary" | "secondary" | "success" | "error" | "warning" | undefined>;
|
|
289
|
-
radiusInput: _angular_core.InputSignal<"sm" | "md" | "lg" | "none" | "
|
|
324
|
+
radiusInput: _angular_core.InputSignal<"sm" | "md" | "lg" | "none" | "xl" | "full" | undefined>;
|
|
290
325
|
shadowInput: _angular_core.InputSignal<"sm" | "md" | "lg" | "none" | undefined>;
|
|
291
326
|
compactInput: _angular_core.InputSignal<boolean | undefined>;
|
|
292
|
-
variant: _angular_core.Signal<"
|
|
327
|
+
variant: _angular_core.Signal<"solid" | "outline" | "ghost">;
|
|
293
328
|
size: _angular_core.Signal<"sm" | "md" | "lg">;
|
|
294
329
|
color: _angular_core.Signal<"primary" | "secondary" | "success" | "error" | "warning">;
|
|
295
|
-
radius: _angular_core.Signal<"sm" | "md" | "lg" | "none" | "
|
|
330
|
+
radius: _angular_core.Signal<"sm" | "md" | "lg" | "none" | "xl" | "full">;
|
|
296
331
|
shadow: _angular_core.Signal<"sm" | "md" | "lg" | "none">;
|
|
297
332
|
compact: _angular_core.Signal<boolean>;
|
|
298
333
|
disabled: _angular_core.InputSignal<boolean>;
|
|
@@ -315,6 +350,167 @@ declare class ButtonComponent {
|
|
|
315
350
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ButtonComponent, "studio-button", never, { "variantInput": { "alias": "variant"; "required": false; "isSignal": true; }; "sizeInput": { "alias": "size"; "required": false; "isSignal": true; }; "colorInput": { "alias": "color"; "required": false; "isSignal": true; }; "radiusInput": { "alias": "radius"; "required": false; "isSignal": true; }; "shadowInput": { "alias": "shadow"; "required": false; "isSignal": true; }; "compactInput": { "alias": "compact"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "loadingText": { "alias": "loadingText"; "required": false; "isSignal": true; }; "fullWidth": { "alias": "fullWidth"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "iconPosition": { "alias": "iconPosition"; "required": false; "isSignal": true; }; "href": { "alias": "href"; "required": false; "isSignal": true; }; "target": { "alias": "target"; "required": false; "isSignal": true; }; "badge": { "alias": "badge"; "required": false; "isSignal": true; }; "badgeColor": { "alias": "badgeColor"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; }, { "clicked": "clicked"; }, never, ["*"], true, never>;
|
|
316
351
|
}
|
|
317
352
|
|
|
353
|
+
/**
|
|
354
|
+
* Checkbox component for selecting boolean values
|
|
355
|
+
*
|
|
356
|
+
* @example
|
|
357
|
+
* <studio-checkbox
|
|
358
|
+
* [(ngModel)]="accepted"
|
|
359
|
+
* label="I accept terms and conditions"
|
|
360
|
+
* (changed)="onAccept($event)"
|
|
361
|
+
* />
|
|
362
|
+
*/
|
|
363
|
+
declare class CheckboxComponent implements ControlValueAccessor {
|
|
364
|
+
private readonly configService;
|
|
365
|
+
private readonly checkboxDefaults;
|
|
366
|
+
/**
|
|
367
|
+
* Size of the checkbox
|
|
368
|
+
*/
|
|
369
|
+
size: _angular_core.InputSignal<CheckboxSize>;
|
|
370
|
+
/**
|
|
371
|
+
* Color scheme
|
|
372
|
+
*/
|
|
373
|
+
color: _angular_core.InputSignal<CheckboxColor>;
|
|
374
|
+
/**
|
|
375
|
+
* Visual variant
|
|
376
|
+
*/
|
|
377
|
+
variant: _angular_core.InputSignal<CheckboxVariant>;
|
|
378
|
+
/**
|
|
379
|
+
* Border radius
|
|
380
|
+
*/
|
|
381
|
+
radius: _angular_core.InputSignal<CheckboxRadius>;
|
|
382
|
+
/**
|
|
383
|
+
* Label text
|
|
384
|
+
*/
|
|
385
|
+
label: _angular_core.InputSignal<string | undefined>;
|
|
386
|
+
/**
|
|
387
|
+
* Label position relative to checkbox
|
|
388
|
+
*/
|
|
389
|
+
labelPosition: _angular_core.InputSignal<"left" | "right">;
|
|
390
|
+
/**
|
|
391
|
+
* Additional description text
|
|
392
|
+
*/
|
|
393
|
+
description: _angular_core.InputSignal<string | undefined>;
|
|
394
|
+
/**
|
|
395
|
+
* Helper text
|
|
396
|
+
*/
|
|
397
|
+
hint: _angular_core.InputSignal<string | undefined>;
|
|
398
|
+
/**
|
|
399
|
+
* Required field
|
|
400
|
+
*/
|
|
401
|
+
required: _angular_core.InputSignal<boolean>;
|
|
402
|
+
/**
|
|
403
|
+
* Error state
|
|
404
|
+
*/
|
|
405
|
+
error: _angular_core.InputSignal<boolean>;
|
|
406
|
+
/**
|
|
407
|
+
* Error message
|
|
408
|
+
*/
|
|
409
|
+
errorMessage: _angular_core.InputSignal<string | undefined>;
|
|
410
|
+
/**
|
|
411
|
+
* Disabled state
|
|
412
|
+
*/
|
|
413
|
+
disabled: _angular_core.InputSignal<boolean>;
|
|
414
|
+
/**
|
|
415
|
+
* Readonly state
|
|
416
|
+
*/
|
|
417
|
+
readonly: _angular_core.InputSignal<boolean>;
|
|
418
|
+
/**
|
|
419
|
+
* Indeterminate state (for "select all" checkboxes)
|
|
420
|
+
*/
|
|
421
|
+
indeterminate: _angular_core.InputSignal<boolean>;
|
|
422
|
+
/**
|
|
423
|
+
* Name attribute for form control
|
|
424
|
+
*/
|
|
425
|
+
name: _angular_core.InputSignal<string | undefined>;
|
|
426
|
+
/**
|
|
427
|
+
* Tab index
|
|
428
|
+
*/
|
|
429
|
+
tabIndex: _angular_core.InputSignal<number>;
|
|
430
|
+
/**
|
|
431
|
+
* Value for checkbox groups
|
|
432
|
+
*/
|
|
433
|
+
value: _angular_core.InputSignal<any>;
|
|
434
|
+
/**
|
|
435
|
+
* Emitted when checkbox state changes
|
|
436
|
+
*/
|
|
437
|
+
changed: _angular_core.OutputEmitterRef<boolean>;
|
|
438
|
+
/**
|
|
439
|
+
* Internal checked state
|
|
440
|
+
*/
|
|
441
|
+
protected internalChecked: _angular_core.WritableSignal<boolean>;
|
|
442
|
+
/**
|
|
443
|
+
* Internal focus state
|
|
444
|
+
*/
|
|
445
|
+
protected isFocused: _angular_core.WritableSignal<boolean>;
|
|
446
|
+
/**
|
|
447
|
+
* Unique ID for accessibility
|
|
448
|
+
*/
|
|
449
|
+
protected checkboxId: _angular_core.WritableSignal<string>;
|
|
450
|
+
/**
|
|
451
|
+
* Host CSS classes
|
|
452
|
+
*/
|
|
453
|
+
protected hostClasses: _angular_core.Signal<{
|
|
454
|
+
[x: string]: boolean;
|
|
455
|
+
'studio-checkbox-wrapper': boolean;
|
|
456
|
+
'studio-checkbox-wrapper--disabled': boolean;
|
|
457
|
+
'studio-checkbox-wrapper--error': boolean;
|
|
458
|
+
'studio-checkbox-wrapper--focused': boolean;
|
|
459
|
+
'studio-checkbox-wrapper--label-left': boolean;
|
|
460
|
+
}>;
|
|
461
|
+
/**
|
|
462
|
+
* Checkbox element CSS classes
|
|
463
|
+
*/
|
|
464
|
+
protected checkboxClasses: _angular_core.Signal<{
|
|
465
|
+
[x: string]: boolean;
|
|
466
|
+
'studio-checkbox': boolean;
|
|
467
|
+
'studio-checkbox--checked': boolean;
|
|
468
|
+
'studio-checkbox--indeterminate': boolean;
|
|
469
|
+
'studio-checkbox--disabled': boolean;
|
|
470
|
+
'studio-checkbox--error': boolean;
|
|
471
|
+
}>;
|
|
472
|
+
/**
|
|
473
|
+
* Show error message
|
|
474
|
+
*/
|
|
475
|
+
protected showError: _angular_core.Signal<string | false | undefined>;
|
|
476
|
+
/**
|
|
477
|
+
* Show hint
|
|
478
|
+
*/
|
|
479
|
+
protected showHint: _angular_core.Signal<string | false | undefined>;
|
|
480
|
+
/**
|
|
481
|
+
* ARIA checked state
|
|
482
|
+
*/
|
|
483
|
+
protected ariaChecked: _angular_core.Signal<"mixed" | "true" | "false">;
|
|
484
|
+
private onChange;
|
|
485
|
+
private onTouched;
|
|
486
|
+
writeValue(value: boolean): void;
|
|
487
|
+
registerOnChange(fn: (value: boolean) => void): void;
|
|
488
|
+
registerOnTouched(fn: () => void): void;
|
|
489
|
+
setDisabledState(isDisabled: boolean): void;
|
|
490
|
+
/**
|
|
491
|
+
* Handle checkbox toggle
|
|
492
|
+
*/
|
|
493
|
+
protected handleChange(event: Event): void;
|
|
494
|
+
/**
|
|
495
|
+
* Handle focus
|
|
496
|
+
*/
|
|
497
|
+
protected handleFocus(): void;
|
|
498
|
+
/**
|
|
499
|
+
* Handle blur
|
|
500
|
+
*/
|
|
501
|
+
protected handleBlur(): void;
|
|
502
|
+
/**
|
|
503
|
+
* Handle label click
|
|
504
|
+
*/
|
|
505
|
+
protected handleLabelClick(event: Event): void;
|
|
506
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CheckboxComponent, never>;
|
|
507
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<CheckboxComponent, "studio-checkbox", never, { "size": { "alias": "size"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "radius": { "alias": "radius"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "labelPosition": { "alias": "labelPosition"; "required": false; "isSignal": true; }; "description": { "alias": "description"; "required": false; "isSignal": true; }; "hint": { "alias": "hint"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "error": { "alias": "error"; "required": false; "isSignal": true; }; "errorMessage": { "alias": "errorMessage"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "indeterminate": { "alias": "indeterminate"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "tabIndex": { "alias": "tabIndex"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "changed": "changed"; }, never, never, true, never>;
|
|
508
|
+
}
|
|
509
|
+
type CheckboxSize = 'sm' | 'md' | 'lg';
|
|
510
|
+
type CheckboxColor = 'primary' | 'secondary' | 'success' | 'error';
|
|
511
|
+
type CheckboxVariant = 'default' | 'outlined' | 'filled';
|
|
512
|
+
type CheckboxRadius = 'none' | 'sm' | 'md' | 'lg' | 'full';
|
|
513
|
+
|
|
318
514
|
/**
|
|
319
515
|
* Icon component with Lucide icons support
|
|
320
516
|
*
|
|
@@ -482,6 +678,224 @@ declare class SwitchComponent {
|
|
|
482
678
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SwitchComponent, "studio-switch", never, { "checked": { "alias": "checked"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "labelPosition": { "alias": "labelPosition"; "required": false; "isSignal": true; }; "showIcons": { "alias": "showIcons"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "sizeInput": { "alias": "size"; "required": false; "isSignal": true; }; "colorInput": { "alias": "color"; "required": false; "isSignal": true; }; }, { "checked": "checkedChange"; "checkedChange": "checkedChange"; }, never, never, true, never>;
|
|
483
679
|
}
|
|
484
680
|
|
|
681
|
+
/**
|
|
682
|
+
* Textarea component for multi-line text input
|
|
683
|
+
*
|
|
684
|
+
* @example
|
|
685
|
+
* <studio-textarea
|
|
686
|
+
* [(ngModel)]="message"
|
|
687
|
+
* label="Your message"
|
|
688
|
+
* placeholder="Enter your message..."
|
|
689
|
+
* [rows]="4"
|
|
690
|
+
* />
|
|
691
|
+
*/
|
|
692
|
+
declare class TextareaComponent implements ControlValueAccessor {
|
|
693
|
+
private readonly configService;
|
|
694
|
+
private readonly textareaDefaults;
|
|
695
|
+
variant: _angular_core.InputSignal<TextareaVariant>;
|
|
696
|
+
size: _angular_core.InputSignal<TextareaSize>;
|
|
697
|
+
color: _angular_core.InputSignal<TextareaColor>;
|
|
698
|
+
radius: _angular_core.InputSignal<TextareaRadius>;
|
|
699
|
+
/**
|
|
700
|
+
* Label text
|
|
701
|
+
*/
|
|
702
|
+
label: _angular_core.InputSignal<string | undefined>;
|
|
703
|
+
/**
|
|
704
|
+
* Floating label (moves up when focused/filled)
|
|
705
|
+
*/
|
|
706
|
+
floatingLabel: _angular_core.InputSignal<boolean>;
|
|
707
|
+
/**
|
|
708
|
+
* Placeholder text
|
|
709
|
+
*/
|
|
710
|
+
placeholder: _angular_core.InputSignal<string | undefined>;
|
|
711
|
+
/**
|
|
712
|
+
* Helper text
|
|
713
|
+
*/
|
|
714
|
+
hint: _angular_core.InputSignal<string | undefined>;
|
|
715
|
+
/**
|
|
716
|
+
* Number of visible text rows
|
|
717
|
+
*/
|
|
718
|
+
rows: _angular_core.InputSignal<number>;
|
|
719
|
+
/**
|
|
720
|
+
* Minimum rows for auto-resize
|
|
721
|
+
*/
|
|
722
|
+
minRows: _angular_core.InputSignal<number | undefined>;
|
|
723
|
+
/**
|
|
724
|
+
* Maximum rows for auto-resize
|
|
725
|
+
*/
|
|
726
|
+
maxRows: _angular_core.InputSignal<number | undefined>;
|
|
727
|
+
/**
|
|
728
|
+
* Enable auto-resize based on content
|
|
729
|
+
*/
|
|
730
|
+
autoResize: _angular_core.InputSignal<boolean>;
|
|
731
|
+
/**
|
|
732
|
+
* Resize behavior
|
|
733
|
+
*/
|
|
734
|
+
resize: _angular_core.InputSignal<"none" | "vertical" | "horizontal" | "both">;
|
|
735
|
+
/**
|
|
736
|
+
* Maximum character length
|
|
737
|
+
*/
|
|
738
|
+
maxLength: _angular_core.InputSignal<number | undefined>;
|
|
739
|
+
/**
|
|
740
|
+
* Show character counter
|
|
741
|
+
*/
|
|
742
|
+
showCharCount: _angular_core.InputSignal<boolean>;
|
|
743
|
+
/**
|
|
744
|
+
* Character counter position
|
|
745
|
+
*/
|
|
746
|
+
charCountPosition: _angular_core.InputSignal<"bottom-right" | "bottom-left">;
|
|
747
|
+
/**
|
|
748
|
+
* Required field
|
|
749
|
+
*/
|
|
750
|
+
required: _angular_core.InputSignal<boolean>;
|
|
751
|
+
/**
|
|
752
|
+
* Minimum character length
|
|
753
|
+
*/
|
|
754
|
+
minLength: _angular_core.InputSignal<number | undefined>;
|
|
755
|
+
/**
|
|
756
|
+
* Error state
|
|
757
|
+
*/
|
|
758
|
+
error: _angular_core.InputSignal<boolean>;
|
|
759
|
+
/**
|
|
760
|
+
* Error message
|
|
761
|
+
*/
|
|
762
|
+
errorMessage: _angular_core.InputSignal<string | undefined>;
|
|
763
|
+
/**
|
|
764
|
+
* Disabled state
|
|
765
|
+
*/
|
|
766
|
+
disabled: _angular_core.InputSignal<boolean>;
|
|
767
|
+
/**
|
|
768
|
+
* Readonly state
|
|
769
|
+
*/
|
|
770
|
+
readonly: _angular_core.InputSignal<boolean>;
|
|
771
|
+
/**
|
|
772
|
+
* Full width (100% of parent)
|
|
773
|
+
*/
|
|
774
|
+
fullWidth: _angular_core.InputSignal<boolean>;
|
|
775
|
+
/**
|
|
776
|
+
* Name attribute for form control
|
|
777
|
+
*/
|
|
778
|
+
name: _angular_core.InputSignal<string | undefined>;
|
|
779
|
+
/**
|
|
780
|
+
* Autocomplete attribute
|
|
781
|
+
*/
|
|
782
|
+
autocomplete: _angular_core.InputSignal<string | undefined>;
|
|
783
|
+
/**
|
|
784
|
+
* Spellcheck attribute
|
|
785
|
+
*/
|
|
786
|
+
spellcheck: _angular_core.InputSignal<boolean>;
|
|
787
|
+
/**
|
|
788
|
+
* Show clear button
|
|
789
|
+
*/
|
|
790
|
+
clearable: _angular_core.InputSignal<boolean>;
|
|
791
|
+
/**
|
|
792
|
+
* Loading state
|
|
793
|
+
*/
|
|
794
|
+
loading: _angular_core.InputSignal<boolean>;
|
|
795
|
+
/**
|
|
796
|
+
* Emitted when value changes
|
|
797
|
+
*/
|
|
798
|
+
changed: _angular_core.OutputEmitterRef<string>;
|
|
799
|
+
/**
|
|
800
|
+
* Emitted on focus
|
|
801
|
+
*/
|
|
802
|
+
focused: _angular_core.OutputEmitterRef<FocusEvent>;
|
|
803
|
+
/**
|
|
804
|
+
* Emitted on blur
|
|
805
|
+
*/
|
|
806
|
+
blurred: _angular_core.OutputEmitterRef<FocusEvent>;
|
|
807
|
+
/**
|
|
808
|
+
* Emitted on key press
|
|
809
|
+
*/
|
|
810
|
+
keyPressed: _angular_core.OutputEmitterRef<KeyboardEvent>;
|
|
811
|
+
/**
|
|
812
|
+
* Internal value
|
|
813
|
+
*/
|
|
814
|
+
protected internalValue: _angular_core.WritableSignal<string>;
|
|
815
|
+
/**
|
|
816
|
+
* Internal focus state
|
|
817
|
+
*/
|
|
818
|
+
protected isFocused: _angular_core.WritableSignal<boolean>;
|
|
819
|
+
/**
|
|
820
|
+
* Unique ID for accessibility
|
|
821
|
+
*/
|
|
822
|
+
protected textareaId: _angular_core.WritableSignal<string>;
|
|
823
|
+
/**
|
|
824
|
+
* Textarea element reference
|
|
825
|
+
*/
|
|
826
|
+
protected textareaEl: _angular_core.Signal<ElementRef<HTMLTextAreaElement> | undefined>;
|
|
827
|
+
protected hostClasses: _angular_core.Signal<string>;
|
|
828
|
+
/**
|
|
829
|
+
* Textarea element CSS classes
|
|
830
|
+
*/
|
|
831
|
+
protected textareaClasses: _angular_core.Signal<string>;
|
|
832
|
+
/**
|
|
833
|
+
* Show error message
|
|
834
|
+
*/
|
|
835
|
+
protected showError: _angular_core.Signal<string | false | undefined>;
|
|
836
|
+
/**
|
|
837
|
+
* Show hint
|
|
838
|
+
*/
|
|
839
|
+
protected showHint: _angular_core.Signal<string | false | undefined>;
|
|
840
|
+
/**
|
|
841
|
+
* Character count text
|
|
842
|
+
*/
|
|
843
|
+
protected charCountText: _angular_core.Signal<string>;
|
|
844
|
+
/**
|
|
845
|
+
* Is character limit exceeded
|
|
846
|
+
*/
|
|
847
|
+
protected isCharLimitExceeded: _angular_core.Signal<boolean>;
|
|
848
|
+
/**
|
|
849
|
+
* Computed placeholder (empty if floating label)
|
|
850
|
+
*/
|
|
851
|
+
protected computedPlaceholder: _angular_core.Signal<string | undefined>;
|
|
852
|
+
/**
|
|
853
|
+
* Show floating label in "up" position
|
|
854
|
+
*/
|
|
855
|
+
protected showFloatingLabelUp: _angular_core.Signal<boolean>;
|
|
856
|
+
private onChange;
|
|
857
|
+
private onTouched;
|
|
858
|
+
writeValue(value: string): void;
|
|
859
|
+
registerOnChange(fn: (value: string) => void): void;
|
|
860
|
+
registerOnTouched(fn: () => void): void;
|
|
861
|
+
setDisabledState(isDisabled: boolean): void;
|
|
862
|
+
constructor();
|
|
863
|
+
/**
|
|
864
|
+
* Handle textarea input
|
|
865
|
+
*/
|
|
866
|
+
protected handleInput(event: Event): void;
|
|
867
|
+
/**
|
|
868
|
+
* Handle focus
|
|
869
|
+
*/
|
|
870
|
+
protected handleFocus(event: FocusEvent): void;
|
|
871
|
+
/**
|
|
872
|
+
* Handle blur
|
|
873
|
+
*/
|
|
874
|
+
protected handleBlur(event: FocusEvent): void;
|
|
875
|
+
/**
|
|
876
|
+
* Handle key press
|
|
877
|
+
*/
|
|
878
|
+
protected handleKeyPress(event: KeyboardEvent): void;
|
|
879
|
+
/**
|
|
880
|
+
* Clear textarea value
|
|
881
|
+
*/
|
|
882
|
+
protected handleClear(): void;
|
|
883
|
+
/**
|
|
884
|
+
* Adjust textarea height for auto-resize
|
|
885
|
+
*/
|
|
886
|
+
private adjustHeightIfNeeded;
|
|
887
|
+
/**
|
|
888
|
+
* Adjust textarea height based on content
|
|
889
|
+
*/
|
|
890
|
+
private adjustHeight;
|
|
891
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TextareaComponent, never>;
|
|
892
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<TextareaComponent, "studio-textarea", never, { "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "radius": { "alias": "radius"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "floatingLabel": { "alias": "floatingLabel"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "hint": { "alias": "hint"; "required": false; "isSignal": true; }; "rows": { "alias": "rows"; "required": false; "isSignal": true; }; "minRows": { "alias": "minRows"; "required": false; "isSignal": true; }; "maxRows": { "alias": "maxRows"; "required": false; "isSignal": true; }; "autoResize": { "alias": "autoResize"; "required": false; "isSignal": true; }; "resize": { "alias": "resize"; "required": false; "isSignal": true; }; "maxLength": { "alias": "maxLength"; "required": false; "isSignal": true; }; "showCharCount": { "alias": "showCharCount"; "required": false; "isSignal": true; }; "charCountPosition": { "alias": "charCountPosition"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "minLength": { "alias": "minLength"; "required": false; "isSignal": true; }; "error": { "alias": "error"; "required": false; "isSignal": true; }; "errorMessage": { "alias": "errorMessage"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "fullWidth": { "alias": "fullWidth"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "autocomplete": { "alias": "autocomplete"; "required": false; "isSignal": true; }; "spellcheck": { "alias": "spellcheck"; "required": false; "isSignal": true; }; "clearable": { "alias": "clearable"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; }, { "changed": "changed"; "focused": "focused"; "blurred": "blurred"; "keyPressed": "keyPressed"; }, never, never, true, never>;
|
|
893
|
+
}
|
|
894
|
+
type TextareaVariant = 'outline' | 'filled' | 'underline';
|
|
895
|
+
type TextareaSize = 'sm' | 'md' | 'lg';
|
|
896
|
+
type TextareaColor = 'primary' | 'secondary' | 'success' | 'error';
|
|
897
|
+
type TextareaRadius = 'none' | 'sm' | 'md' | 'lg' | 'full';
|
|
898
|
+
|
|
485
899
|
/**
|
|
486
900
|
* Theme toggle switch with sun/moon icons
|
|
487
901
|
*
|
|
@@ -569,5 +983,35 @@ declare function classNames(...classes: (string | false | undefined | null)[]):
|
|
|
569
983
|
*/
|
|
570
984
|
declare function withConfigDefault<T>(inputSignal: Signal<T | undefined>, configSignal: Signal<T | undefined>, defaultValue: T): Signal<T>;
|
|
571
985
|
|
|
572
|
-
|
|
573
|
-
|
|
986
|
+
/**
|
|
987
|
+
* Utility for loading Google Fonts dynamically
|
|
988
|
+
*/
|
|
989
|
+
/**
|
|
990
|
+
* Load a Google Font dynamically
|
|
991
|
+
* @param fontFamily - Font family name (e.g., 'Inter', 'Poppins')
|
|
992
|
+
* @param weights - Array of font weights to load (default: [400, 500, 600, 700])
|
|
993
|
+
* @param display - Font display strategy (default: 'swap')
|
|
994
|
+
*
|
|
995
|
+
* @example
|
|
996
|
+
* loadGoogleFont('Inter', [400, 500, 600, 700]);
|
|
997
|
+
* loadGoogleFont('Poppins', [300, 400, 600]);
|
|
998
|
+
*/
|
|
999
|
+
declare function loadGoogleFont(fontFamily: string, weights?: number[], display?: 'auto' | 'block' | 'swap' | 'fallback' | 'optional'): void;
|
|
1000
|
+
/**
|
|
1001
|
+
* Load multiple Google Fonts at once
|
|
1002
|
+
* @param fonts - Array of font configurations
|
|
1003
|
+
*
|
|
1004
|
+
* @example
|
|
1005
|
+
* loadGoogleFonts([
|
|
1006
|
+
* { family: 'Inter', weights: [400, 500, 600, 700] },
|
|
1007
|
+
* { family: 'Roboto Mono', weights: [400, 500] }
|
|
1008
|
+
* ]);
|
|
1009
|
+
*/
|
|
1010
|
+
declare function loadGoogleFonts(fonts: Array<{
|
|
1011
|
+
family: string;
|
|
1012
|
+
weights?: number[];
|
|
1013
|
+
display?: 'auto' | 'block' | 'swap' | 'fallback' | 'optional';
|
|
1014
|
+
}>): void;
|
|
1015
|
+
|
|
1016
|
+
export { BadgeComponent, ButtonComponent, CheckboxComponent, IconComponent, InputComponent, STUDIO_CONFIG, StudioConfigService, SwitchComponent, TextareaComponent, ThemeSwitchComponent, classNames, isSafeUrl, loadGoogleFont, loadGoogleFonts, provideStudioConfig, provideStudioIcons, sanitizeUrl, withConfigDefault };
|
|
1017
|
+
export type { BadgeDefaultsConfig, ButtonDefaultsConfig, CheckboxColor, CheckboxDefaultsConfig, CheckboxRadius, CheckboxSize, CheckboxVariant, ColorConfig, ComponentsConfig, InputDefaultsConfig, InputMode, InputType, StudioConfig, StudioThemeConfig, SwitchDefaultsConfig, TextareaColor, TextareaDefaultsConfig, TextareaRadius, TextareaSize, TextareaVariant, ThemeMode };
|
package/package.json
CHANGED
package/src/styles/studio.scss
CHANGED
|
@@ -13,3 +13,21 @@
|
|
|
13
13
|
|
|
14
14
|
/* Mixins - use in component styles as needed */
|
|
15
15
|
/* @use '@eduboxpro/studio/styles/mixins'; */
|
|
16
|
+
|
|
17
|
+
/* Force font-family to all studio components (fixes ViewEncapsulation issue) */
|
|
18
|
+
studio-button,
|
|
19
|
+
studio-input,
|
|
20
|
+
studio-badge,
|
|
21
|
+
studio-switch,
|
|
22
|
+
studio-theme-switch,
|
|
23
|
+
studio-checkbox,
|
|
24
|
+
studio-textarea,
|
|
25
|
+
studio-button *,
|
|
26
|
+
studio-input *,
|
|
27
|
+
studio-badge *,
|
|
28
|
+
studio-switch *,
|
|
29
|
+
studio-theme-switch *,
|
|
30
|
+
studio-checkbox *,
|
|
31
|
+
studio-textarea * {
|
|
32
|
+
font-family: var(--studio-font-family) !important;
|
|
33
|
+
}
|