@lesterarte/sefin-ui 0.0.3-dev.9 → 0.0.4
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.
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { EventEmitter, OnInit, OnDestroy, OnChanges, ElementRef, SimpleChanges } from '@angular/core';
|
|
2
|
+
import { EventEmitter, OnInit, OnDestroy, OnChanges, ElementRef, SimpleChanges, AfterViewInit } from '@angular/core';
|
|
3
|
+
import { ControlValueAccessor } from '@angular/forms';
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* Color design tokens as TypeScript constants
|
|
@@ -443,6 +444,11 @@ type ButtonVariant = 'primary' | 'secondary' | 'outline' | 'ghost' | 'danger';
|
|
|
443
444
|
type ButtonSize = 'sm' | 'md' | 'lg';
|
|
444
445
|
type InputSize = 'sm' | 'md' | 'lg';
|
|
445
446
|
type CardVariant = 'default' | 'elevated' | 'outlined';
|
|
447
|
+
type TypographyVariant = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'span';
|
|
448
|
+
type TypographySize = 'xs' | 'sm' | 'base' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl' | '5xl';
|
|
449
|
+
type TypographyWeight = 'light' | 'normal' | 'medium' | 'semibold' | 'bold';
|
|
450
|
+
type TypographyColor = 'text' | 'text-secondary' | 'text-disabled' | 'primary' | 'secondary' | 'success' | 'warning' | 'error';
|
|
451
|
+
type TypographyLineHeight = 'tight' | 'normal' | 'relaxed';
|
|
446
452
|
interface BaseComponent {
|
|
447
453
|
disabled?: boolean;
|
|
448
454
|
class?: string;
|
|
@@ -584,10 +590,15 @@ declare class ThemeLoader {
|
|
|
584
590
|
}
|
|
585
591
|
|
|
586
592
|
declare class ButtonComponent {
|
|
593
|
+
/** Button variant style. Options: 'primary' | 'secondary' | 'outline' | 'ghost' | 'danger' */
|
|
587
594
|
variant: ButtonVariant;
|
|
595
|
+
/** Button size. Options: 'sm' | 'md' | 'lg' */
|
|
588
596
|
size: ButtonSize;
|
|
597
|
+
/** Whether the button is disabled */
|
|
589
598
|
disabled: boolean;
|
|
599
|
+
/** Button type. Options: 'button' | 'submit' | 'reset' */
|
|
590
600
|
type: 'button' | 'submit' | 'reset';
|
|
601
|
+
/** Additional CSS classes */
|
|
591
602
|
class: string;
|
|
592
603
|
clicked: EventEmitter<MouseEvent>;
|
|
593
604
|
onClick(event: MouseEvent): void;
|
|
@@ -596,6 +607,69 @@ declare class ButtonComponent {
|
|
|
596
607
|
static ɵcmp: i0.ɵɵComponentDeclaration<ButtonComponent, "sefin-button", never, { "variant": { "alias": "variant"; "required": false; }; "size": { "alias": "size"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "type": { "alias": "type"; "required": false; }; "class": { "alias": "class"; "required": false; }; }, { "clicked": "clicked"; }, never, ["*"], true, never>;
|
|
597
608
|
}
|
|
598
609
|
|
|
610
|
+
declare class IconButtonComponent {
|
|
611
|
+
/** Button variant style. Options: 'primary' | 'secondary' | 'outline' | 'ghost' | 'danger' */
|
|
612
|
+
variant: ButtonVariant;
|
|
613
|
+
/** Button size. Options: 'sm' | 'md' | 'lg' */
|
|
614
|
+
size: ButtonSize;
|
|
615
|
+
/** Whether the button is disabled */
|
|
616
|
+
disabled: boolean;
|
|
617
|
+
/** Button type. Options: 'button' | 'submit' | 'reset' */
|
|
618
|
+
type: 'button' | 'submit' | 'reset';
|
|
619
|
+
/** Additional CSS classes */
|
|
620
|
+
class: string;
|
|
621
|
+
/** Accessibility label for the button */
|
|
622
|
+
ariaLabel: string;
|
|
623
|
+
/** Whether the button should be rounded (circular) */
|
|
624
|
+
rounded: boolean;
|
|
625
|
+
clicked: EventEmitter<MouseEvent>;
|
|
626
|
+
onClick(event: MouseEvent): void;
|
|
627
|
+
get buttonClasses(): string;
|
|
628
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<IconButtonComponent, never>;
|
|
629
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<IconButtonComponent, "sefin-icon-button", never, { "variant": { "alias": "variant"; "required": false; }; "size": { "alias": "size"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "type": { "alias": "type"; "required": false; }; "class": { "alias": "class"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; "rounded": { "alias": "rounded"; "required": false; }; }, { "clicked": "clicked"; }, never, ["*"], true, never>;
|
|
630
|
+
}
|
|
631
|
+
|
|
632
|
+
type LinkVariant = 'default' | 'primary' | 'secondary' | 'underline';
|
|
633
|
+
type LinkSize = 'sm' | 'md' | 'lg';
|
|
634
|
+
declare class LinkComponent {
|
|
635
|
+
/** Link variant style. Options: 'default' | 'primary' | 'secondary' | 'underline' */
|
|
636
|
+
variant: LinkVariant;
|
|
637
|
+
/** Link size. Options: 'sm' | 'md' | 'lg' */
|
|
638
|
+
size: LinkSize;
|
|
639
|
+
/** Whether the link is disabled */
|
|
640
|
+
disabled: boolean;
|
|
641
|
+
/** Link URL */
|
|
642
|
+
href?: string;
|
|
643
|
+
/** Link target attribute (e.g., '_blank') */
|
|
644
|
+
target?: string;
|
|
645
|
+
/** Link rel attribute */
|
|
646
|
+
rel?: string;
|
|
647
|
+
/** Additional CSS classes */
|
|
648
|
+
class: string;
|
|
649
|
+
/** Whether to show underline */
|
|
650
|
+
underline: boolean;
|
|
651
|
+
get linkClasses(): string;
|
|
652
|
+
onClick(event: Event): void;
|
|
653
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LinkComponent, never>;
|
|
654
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LinkComponent, "sefin-link", never, { "variant": { "alias": "variant"; "required": false; }; "size": { "alias": "size"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "href": { "alias": "href"; "required": false; }; "target": { "alias": "target"; "required": false; }; "rel": { "alias": "rel"; "required": false; }; "class": { "alias": "class"; "required": false; }; "underline": { "alias": "underline"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
655
|
+
}
|
|
656
|
+
|
|
657
|
+
declare class StackComponent {
|
|
658
|
+
direction: 'row' | 'column';
|
|
659
|
+
spacing: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
|
|
660
|
+
align: 'start' | 'center' | 'end' | 'stretch';
|
|
661
|
+
justify: 'start' | 'center' | 'end' | 'space-between' | 'space-around' | 'space-evenly';
|
|
662
|
+
wrap: boolean;
|
|
663
|
+
class: string;
|
|
664
|
+
get stackClasses(): string;
|
|
665
|
+
get spacingValue(): string;
|
|
666
|
+
get stackStyles(): {
|
|
667
|
+
[key: string]: string;
|
|
668
|
+
};
|
|
669
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<StackComponent, never>;
|
|
670
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<StackComponent, "sefin-stack", never, { "direction": { "alias": "direction"; "required": false; }; "spacing": { "alias": "spacing"; "required": false; }; "align": { "alias": "align"; "required": false; }; "justify": { "alias": "justify"; "required": false; }; "wrap": { "alias": "wrap"; "required": false; }; "class": { "alias": "class"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
671
|
+
}
|
|
672
|
+
|
|
599
673
|
interface AutocompleteOption {
|
|
600
674
|
value: string | number;
|
|
601
675
|
label: string;
|
|
@@ -638,7 +712,110 @@ declare class AutocompleteComponent implements OnInit, OnDestroy, OnChanges {
|
|
|
638
712
|
static ɵcmp: i0.ɵɵComponentDeclaration<AutocompleteComponent, "sefin-autocomplete", never, { "options": { "alias": "options"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "size": { "alias": "size"; "required": false; }; "class": { "alias": "class"; "required": false; }; "value": { "alias": "value"; "required": false; }; "minChars": { "alias": "minChars"; "required": false; }; "maxResults": { "alias": "maxResults"; "required": false; }; }, { "valueChange": "valueChange"; "optionSelected": "optionSelected"; "inputChange": "inputChange"; }, never, never, true, never>;
|
|
639
713
|
}
|
|
640
714
|
|
|
715
|
+
declare class CheckboxComponent implements ControlValueAccessor, AfterViewInit, OnChanges {
|
|
716
|
+
checkboxInput?: ElementRef<HTMLInputElement>;
|
|
717
|
+
size: InputSize;
|
|
718
|
+
disabled: boolean;
|
|
719
|
+
indeterminate: boolean;
|
|
720
|
+
class: string;
|
|
721
|
+
label: string;
|
|
722
|
+
name: string;
|
|
723
|
+
value: boolean;
|
|
724
|
+
valueChange: EventEmitter<boolean>;
|
|
725
|
+
checkedChange: EventEmitter<boolean>;
|
|
726
|
+
private onChange;
|
|
727
|
+
private onTouched;
|
|
728
|
+
ngAfterViewInit(): void;
|
|
729
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
730
|
+
onCheckboxChange(event: Event): void;
|
|
731
|
+
writeValue(value: boolean): void;
|
|
732
|
+
registerOnChange(fn: (value: boolean) => void): void;
|
|
733
|
+
registerOnTouched(fn: () => void): void;
|
|
734
|
+
setDisabledState(isDisabled: boolean): void;
|
|
735
|
+
get wrapperClasses(): string;
|
|
736
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CheckboxComponent, never>;
|
|
737
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CheckboxComponent, "sefin-checkbox", never, { "size": { "alias": "size"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "indeterminate": { "alias": "indeterminate"; "required": false; }; "class": { "alias": "class"; "required": false; }; "label": { "alias": "label"; "required": false; }; "name": { "alias": "name"; "required": false; }; "value": { "alias": "value"; "required": false; }; }, { "valueChange": "valueChange"; "checkedChange": "checkedChange"; }, never, never, true, never>;
|
|
738
|
+
}
|
|
739
|
+
|
|
740
|
+
interface SelectOption {
|
|
741
|
+
value: string | number;
|
|
742
|
+
label: string;
|
|
743
|
+
disabled?: boolean;
|
|
744
|
+
}
|
|
745
|
+
declare class SelectComponent implements ControlValueAccessor, OnInit, OnDestroy, OnChanges {
|
|
746
|
+
containerRef?: ElementRef<HTMLDivElement>;
|
|
747
|
+
dropdownRef?: ElementRef<HTMLDivElement>;
|
|
748
|
+
buttonRef?: ElementRef<HTMLButtonElement>;
|
|
749
|
+
options: SelectOption[];
|
|
750
|
+
placeholder: string;
|
|
751
|
+
disabled: boolean;
|
|
752
|
+
size: InputSize;
|
|
753
|
+
class: string;
|
|
754
|
+
value: string | number | null;
|
|
755
|
+
valueChange: EventEmitter<string | number>;
|
|
756
|
+
optionSelected: EventEmitter<SelectOption>;
|
|
757
|
+
isOpen: boolean;
|
|
758
|
+
selectedIndex: number;
|
|
759
|
+
private onChange;
|
|
760
|
+
private onTouched;
|
|
761
|
+
ngOnInit(): void;
|
|
762
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
763
|
+
ngOnDestroy(): void;
|
|
764
|
+
onClickOutside(event: MouseEvent): void;
|
|
765
|
+
onEscapeKey(event: Event): void;
|
|
766
|
+
toggleDropdown(): void;
|
|
767
|
+
openDropdown(): void;
|
|
768
|
+
closeDropdown(): void;
|
|
769
|
+
selectOption(option: SelectOption): void;
|
|
770
|
+
onKeyDown(event: KeyboardEvent): void;
|
|
771
|
+
private updateSelectedIndex;
|
|
772
|
+
private scrollToSelected;
|
|
773
|
+
getSelectedLabel(): string;
|
|
774
|
+
writeValue(value: string | number | null): void;
|
|
775
|
+
registerOnChange(fn: (value: string | number | null) => void): void;
|
|
776
|
+
registerOnTouched(fn: () => void): void;
|
|
777
|
+
setDisabledState(isDisabled: boolean): void;
|
|
778
|
+
get buttonClasses(): string;
|
|
779
|
+
get containerClasses(): string;
|
|
780
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SelectComponent, never>;
|
|
781
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SelectComponent, "sefin-select", never, { "options": { "alias": "options"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "size": { "alias": "size"; "required": false; }; "class": { "alias": "class"; "required": false; }; "value": { "alias": "value"; "required": false; }; }, { "valueChange": "valueChange"; "optionSelected": "optionSelected"; }, never, never, true, never>;
|
|
782
|
+
}
|
|
783
|
+
|
|
784
|
+
declare class SwitchComponent implements ControlValueAccessor {
|
|
785
|
+
size: InputSize;
|
|
786
|
+
disabled: boolean;
|
|
787
|
+
class: string;
|
|
788
|
+
label: string;
|
|
789
|
+
name: string;
|
|
790
|
+
value: boolean;
|
|
791
|
+
valueChange: EventEmitter<boolean>;
|
|
792
|
+
checkedChange: EventEmitter<boolean>;
|
|
793
|
+
private onChange;
|
|
794
|
+
private onTouched;
|
|
795
|
+
onSwitchChange(event: Event): void;
|
|
796
|
+
writeValue(value: boolean): void;
|
|
797
|
+
registerOnChange(fn: (value: boolean) => void): void;
|
|
798
|
+
registerOnTouched(fn: () => void): void;
|
|
799
|
+
setDisabledState(isDisabled: boolean): void;
|
|
800
|
+
get wrapperClasses(): string;
|
|
801
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SwitchComponent, never>;
|
|
802
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SwitchComponent, "sefin-switch", never, { "size": { "alias": "size"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "class": { "alias": "class"; "required": false; }; "label": { "alias": "label"; "required": false; }; "name": { "alias": "name"; "required": false; }; "value": { "alias": "value"; "required": false; }; }, { "valueChange": "valueChange"; "checkedChange": "checkedChange"; }, never, never, true, never>;
|
|
803
|
+
}
|
|
804
|
+
|
|
805
|
+
declare class TypographyComponent {
|
|
806
|
+
variant: TypographyVariant;
|
|
807
|
+
size?: TypographySize;
|
|
808
|
+
weight?: TypographyWeight;
|
|
809
|
+
color: TypographyColor;
|
|
810
|
+
lineHeight?: TypographyLineHeight;
|
|
811
|
+
class: string;
|
|
812
|
+
text?: string;
|
|
813
|
+
get typographyClasses(): string;
|
|
814
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TypographyComponent, never>;
|
|
815
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TypographyComponent, "sefin-typography", never, { "variant": { "alias": "variant"; "required": false; }; "size": { "alias": "size"; "required": false; }; "weight": { "alias": "weight"; "required": false; }; "color": { "alias": "color"; "required": false; }; "lineHeight": { "alias": "lineHeight"; "required": false; }; "class": { "alias": "class"; "required": false; }; "text": { "alias": "text"; "required": false; }; }, {}, never, ["*", "*", "*", "*", "*", "*", "*", "*"], true, never>;
|
|
816
|
+
}
|
|
817
|
+
|
|
641
818
|
declare const STYLES_PATH = "./styles/index.scss";
|
|
642
819
|
|
|
643
|
-
export { AutocompleteComponent, BORDER_RADIUS_TOKENS, BRAND_THEME, ButtonComponent, COLOR_TOKENS, DARK_THEME, DESIGN_TOKENS, LIGHT_THEME, SHADOW_TOKENS, SPACING_TOKENS, STYLES_PATH, TYPOGRAPHY_TOKENS, ThemeLoader };
|
|
644
|
-
export type { AutocompleteOption, BaseComponent, BorderRadiusToken, ButtonSize, ButtonVariant, CardVariant, ColorShade, ColorTokenName, CustomTheme, InputSize, ShadowToken, SpacingToken, Theme, ThemeColors, TypographyToken };
|
|
820
|
+
export { AutocompleteComponent, BORDER_RADIUS_TOKENS, BRAND_THEME, ButtonComponent, COLOR_TOKENS, CheckboxComponent, DARK_THEME, DESIGN_TOKENS, IconButtonComponent, LIGHT_THEME, LinkComponent, SHADOW_TOKENS, SPACING_TOKENS, STYLES_PATH, SelectComponent, StackComponent, SwitchComponent, TYPOGRAPHY_TOKENS, ThemeLoader, TypographyComponent };
|
|
821
|
+
export type { AutocompleteOption, BaseComponent, BorderRadiusToken, ButtonSize, ButtonVariant, CardVariant, ColorShade, ColorTokenName, CustomTheme, InputSize, LinkSize, LinkVariant, SelectOption, ShadowToken, SpacingToken, Theme, ThemeColors, TypographyColor, TypographyLineHeight, TypographySize, TypographyToken, TypographyVariant, TypographyWeight };
|