@eduboxpro/studio 0.1.26 → 0.1.28

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/index.d.ts CHANGED
@@ -4,6 +4,7 @@ import { Params, IsActiveMatchOptions } from '@angular/router';
4
4
  import { ControlValueAccessor, Validator, AbstractControl, ValidationErrors } from '@angular/forms';
5
5
  import { icons } from 'lucide-angular';
6
6
  import { Placement } from '@floating-ui/dom';
7
+ import * as _eduboxpro_studio from '@eduboxpro/studio';
7
8
 
8
9
  /**
9
10
  * Theme mode: light or dark
@@ -1985,9 +1986,12 @@ interface SelectDisplayContext<T = any> {
1985
1986
  highlighted: boolean;
1986
1987
  }
1987
1988
 
1988
- declare class SelectComponent<T = any> implements ControlValueAccessor {
1989
+ declare class SelectComponent<T = any> implements ControlValueAccessor, OnDestroy {
1989
1990
  private readonly configService;
1990
1991
  private readonly selectDefaults;
1992
+ private readonly document;
1993
+ private readonly renderer;
1994
+ private readonly hostEl;
1991
1995
  protected readonly triggerEl: _angular_core.Signal<ElementRef<HTMLButtonElement> | undefined>;
1992
1996
  protected readonly dropdownEl: _angular_core.Signal<ElementRef<HTMLDivElement> | undefined>;
1993
1997
  variantInput: _angular_core.InputSignal<SelectVariant | undefined>;
@@ -2014,6 +2018,7 @@ declare class SelectComponent<T = any> implements ControlValueAccessor {
2014
2018
  fullWidth: _angular_core.InputSignal<boolean>;
2015
2019
  maxHeight: _angular_core.InputSignal<string>;
2016
2020
  position: _angular_core.InputSignal<SelectPosition>;
2021
+ appendToBody: _angular_core.InputSignal<boolean>;
2017
2022
  searchPlaceholder: _angular_core.InputSignal<string>;
2018
2023
  valueChange: _angular_core.OutputEmitterRef<T | T[] | null>;
2019
2024
  searchChange: _angular_core.OutputEmitterRef<string>;
@@ -2029,7 +2034,9 @@ declare class SelectComponent<T = any> implements ControlValueAccessor {
2029
2034
  protected generatedId: string;
2030
2035
  private onChange;
2031
2036
  private onTouched;
2037
+ private portalContainer;
2032
2038
  constructor();
2039
+ ngOnDestroy(): void;
2033
2040
  protected flattenedOptions: _angular_core.Signal<SelectOption<T>[]>;
2034
2041
  protected filteredOptions: _angular_core.Signal<SelectOption<T>[]>;
2035
2042
  protected selectedOptions: _angular_core.Signal<SelectOption<T> | SelectOption<T>[] | null>;
@@ -2056,8 +2063,10 @@ declare class SelectComponent<T = any> implements ControlValueAccessor {
2056
2063
  registerOnChange(fn: any): void;
2057
2064
  registerOnTouched(fn: any): void;
2058
2065
  setDisabledState(isDisabled: boolean): void;
2066
+ private attachDropdownToBody;
2067
+ private detachDropdownFromBody;
2059
2068
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<SelectComponent<any>, never>;
2060
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<SelectComponent<any>, "studio-select", never, { "variantInput": { "alias": "variant"; "required": false; "isSignal": true; }; "sizeInput": { "alias": "size"; "required": false; "isSignal": true; }; "radiusInput": { "alias": "radius"; "required": false; "isSignal": true; }; "options": { "alias": "options"; "required": true; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "multiple": { "alias": "multiple"; "required": false; "isSignal": true; }; "searchable": { "alias": "searchable"; "required": false; "isSignal": true; }; "clearable": { "alias": "clearable"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "floatingLabel": { "alias": "floatingLabel"; "required": false; "isSignal": true; }; "hint": { "alias": "hint"; "required": false; "isSignal": true; }; "error": { "alias": "error"; "required": false; "isSignal": true; }; "errorMessage": { "alias": "errorMessage"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "prefixIcon": { "alias": "prefixIcon"; "required": false; "isSignal": true; }; "suffixIcon": { "alias": "suffixIcon"; "required": false; "isSignal": true; }; "fullWidth": { "alias": "fullWidth"; "required": false; "isSignal": true; }; "maxHeight": { "alias": "maxHeight"; "required": false; "isSignal": true; }; "position": { "alias": "position"; "required": false; "isSignal": true; }; "searchPlaceholder": { "alias": "searchPlaceholder"; "required": false; "isSignal": true; }; }, { "valueChange": "valueChange"; "searchChange": "searchChange"; "opened": "opened"; "closed": "closed"; "optionSelected": "optionSelected"; }, never, never, true, never>;
2069
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<SelectComponent<any>, "studio-select", never, { "variantInput": { "alias": "variant"; "required": false; "isSignal": true; }; "sizeInput": { "alias": "size"; "required": false; "isSignal": true; }; "radiusInput": { "alias": "radius"; "required": false; "isSignal": true; }; "options": { "alias": "options"; "required": true; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "multiple": { "alias": "multiple"; "required": false; "isSignal": true; }; "searchable": { "alias": "searchable"; "required": false; "isSignal": true; }; "clearable": { "alias": "clearable"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "floatingLabel": { "alias": "floatingLabel"; "required": false; "isSignal": true; }; "hint": { "alias": "hint"; "required": false; "isSignal": true; }; "error": { "alias": "error"; "required": false; "isSignal": true; }; "errorMessage": { "alias": "errorMessage"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "prefixIcon": { "alias": "prefixIcon"; "required": false; "isSignal": true; }; "suffixIcon": { "alias": "suffixIcon"; "required": false; "isSignal": true; }; "fullWidth": { "alias": "fullWidth"; "required": false; "isSignal": true; }; "maxHeight": { "alias": "maxHeight"; "required": false; "isSignal": true; }; "position": { "alias": "position"; "required": false; "isSignal": true; }; "appendToBody": { "alias": "appendToBody"; "required": false; "isSignal": true; }; "searchPlaceholder": { "alias": "searchPlaceholder"; "required": false; "isSignal": true; }; }, { "valueChange": "valueChange"; "searchChange": "searchChange"; "opened": "opened"; "closed": "closed"; "optionSelected": "optionSelected"; }, never, never, true, never>;
2061
2070
  }
2062
2071
 
2063
2072
  /**
@@ -2757,6 +2766,49 @@ type TextareaSize = 'sm' | 'md' | 'lg';
2757
2766
  type TextareaColor = 'primary' | 'secondary' | 'success' | 'error';
2758
2767
  type TextareaRadius = 'none' | 'sm' | 'md' | 'lg' | 'full';
2759
2768
 
2769
+ type ToastSeverity = 'success' | 'info' | 'warning' | 'error';
2770
+ type ToastPosition = 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left' | 'top-center' | 'bottom-center';
2771
+ interface ToastMessage {
2772
+ id: string;
2773
+ severity: ToastSeverity;
2774
+ summary: string;
2775
+ detail?: string;
2776
+ life?: number;
2777
+ sticky?: boolean;
2778
+ closable?: boolean;
2779
+ }
2780
+ interface ToastConfig {
2781
+ position?: ToastPosition;
2782
+ life?: number;
2783
+ closable?: boolean;
2784
+ }
2785
+
2786
+ declare class ToastService {
2787
+ private _messages;
2788
+ readonly messages: _angular_core.Signal<ToastMessage[]>;
2789
+ private defaultLife;
2790
+ private counter;
2791
+ private generateId;
2792
+ show(severity: ToastSeverity, summary: string, detail?: string, config?: Partial<ToastConfig>): void;
2793
+ success(summary: string, detail?: string, config?: Partial<ToastConfig>): void;
2794
+ info(summary: string, detail?: string, config?: Partial<ToastConfig>): void;
2795
+ warning(summary: string, detail?: string, config?: Partial<ToastConfig>): void;
2796
+ error(summary: string, detail?: string, config?: Partial<ToastConfig>): void;
2797
+ remove(id: string): void;
2798
+ clear(): void;
2799
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ToastService, never>;
2800
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<ToastService>;
2801
+ }
2802
+
2803
+ declare class ToastComponent {
2804
+ protected toastService: ToastService;
2805
+ position: _angular_core.InputSignal<ToastPosition>;
2806
+ protected hostClasses: _angular_core.Signal<string>;
2807
+ getIcon(severity: ToastSeverity): string;
2808
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ToastComponent, never>;
2809
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<ToastComponent, "studio-toast", never, { "position": { "alias": "position"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
2810
+ }
2811
+
2760
2812
  declare class TooltipComponent {
2761
2813
  content: _angular_core.InputSignal<string>;
2762
2814
  trigger: _angular_core.InputSignal<"click" | "hover" | "focus">;
@@ -2772,6 +2824,40 @@ declare class TooltipComponent {
2772
2824
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<TooltipComponent, "studio-tooltip", never, { "content": { "alias": "content"; "required": true; "isSignal": true; }; "trigger": { "alias": "trigger"; "required": false; "isSignal": true; }; "position": { "alias": "position"; "required": false; "isSignal": true; }; "openDelay": { "alias": "openDelay"; "required": false; "isSignal": true; }; "closeDelay": { "alias": "closeDelay"; "required": false; "isSignal": true; }; "arrow": { "alias": "arrow"; "required": false; "isSignal": true; }; "arrowSize": { "alias": "arrowSize"; "required": false; "isSignal": true; }; "maxWidth": { "alias": "maxWidth"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
2773
2825
  }
2774
2826
 
2827
+ type ConfirmDialogVariant = 'default' | 'danger' | 'warning';
2828
+ interface ConfirmDialogConfig {
2829
+ title: string;
2830
+ message: string;
2831
+ confirmText?: string;
2832
+ cancelText?: string;
2833
+ variant?: ConfirmDialogVariant;
2834
+ icon?: string;
2835
+ onConfirm?: () => void;
2836
+ onCancel?: () => void;
2837
+ }
2838
+
2839
+ declare class ConfirmDialogService {
2840
+ private _config;
2841
+ private _visible;
2842
+ readonly config: _angular_core.Signal<ConfirmDialogConfig | null>;
2843
+ readonly visible: _angular_core.Signal<boolean>;
2844
+ confirm(config: ConfirmDialogConfig): void;
2845
+ accept(): void;
2846
+ reject(): void;
2847
+ close(): void;
2848
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ConfirmDialogService, never>;
2849
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<ConfirmDialogService>;
2850
+ }
2851
+
2852
+ declare class ConfirmDialogComponent {
2853
+ protected confirmService: ConfirmDialogService;
2854
+ protected config: _angular_core.Signal<_eduboxpro_studio.ConfirmDialogConfig | null>;
2855
+ protected handleEscape(): void;
2856
+ getIcon(): string;
2857
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ConfirmDialogComponent, never>;
2858
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<ConfirmDialogComponent, "studio-confirm-dialog", never, {}, {}, never, never, true, never>;
2859
+ }
2860
+
2775
2861
  interface ButtonToggleGroupOption {
2776
2862
  value: string | number;
2777
2863
  label: string;
@@ -3119,5 +3205,5 @@ declare function loadGoogleFonts(fonts: Array<{
3119
3205
  display?: 'auto' | 'block' | 'swap' | 'fallback' | 'optional';
3120
3206
  }>): void;
3121
3207
 
3122
- export { BadgeComponent, BadgeWrapperComponent, BottomNavigationComponent, ButtonComponent, ButtonGroupComponent, ButtonToggleGroupComponent, COUNTRY_OPTIONS, CardComponent, ChatComponent, ChatInputComponent, ChatMessageComponent, CheckboxComponent, ColorPickerCompactComponent, ColorPickerComponent, DEFAULT_COLOR_PRESETS, DrawerComponent, DrawerService, DropdownComponent, IconComponent, InputComponent, InspectorComponent, MASK_PRESETS, MaskDirective, MaskEngine, MenuComponent, ModalComponent, NavbarComponent, PaginationComponent, PhoneInputComponent, PopoverComponent, RadioButtonComponent, STUDIO_CONFIG, SelectComponent, SidebarComponent, StudioConfigService, SwitchComponent, TableColumnDirective, TableComponent, TabsComponent, TextareaComponent, ThemeSwitchComponent, TooltipComponent, classNames, isSafeUrl, loadGoogleFont, loadGoogleFonts, provideStudioConfig, provideStudioIcons, sanitizeUrl, withConfigDefault };
3123
- export type { BadgeColor, BadgeDefaultsConfig, BadgeIconPosition, BadgeRadius, BadgeSize, BadgeVariant, BadgeWrapperPosition, BadgeWrapperSize, BottomNavigationDefaultsConfig, BottomNavigationFabPosition, BottomNavigationItem, BottomNavigationLabelMode, BottomNavigationSize, BottomNavigationVariant, ButtonDefaultsConfig, ButtonGroupDefaultsConfig, ButtonToggleGroupDefaultsConfig, ButtonToggleGroupOption, ButtonToggleGroupValue, CardColor, CardDefaultsConfig, CardImagePosition, CardOrientation, CardPadding, CardRadius, CardShadow, CardSize, CardVariant, ChatMessage, ChatSize, ChatUser, ChatVariant, CheckboxColor, CheckboxDefaultsConfig, CheckboxRadius, CheckboxSize, CheckboxVariant, ColorConfig, ColorFormat, ColorPickerDefaultsConfig, ColorPickerSize, ColorPickerVariant, ColorPreset, ColorSwatchGroup, ColorValue, ComponentsConfig, CountryOption, DrawerAnimationEasing, DrawerCloseButtonPosition, DrawerConfig, DrawerDefaultsConfig, DrawerPosition, DrawerRadius, DrawerRole, DrawerShadowSize, DrawerSize, DropdownDefaultsConfig, DropdownItem, DropdownPosition, EmptyStateConfig, HSL, InputDefaultsConfig, InputMode, InputType, InspectorComponentSize, InspectorComponentVariant, InspectorData, InspectorGroup, InspectorGroupDivider, InspectorOption, InspectorParameter, InspectorParameterType, InspectorSection, InspectorSpacing, MaskConfig, MaskPreset, MaskResult, MaskToken, MenuColor, MenuExpandEvent, MenuExpandIconPosition, MenuItem, MenuItemBadgeColor, MenuItemClickEvent, MenuItemCommandEvent, MenuItemIconPosition, MenuItemTarget, MenuItemTooltipPosition, MenuMode, MenuOrientation, MenuRadius, MenuSize, MenuSpacing, MenuVariant, ModalAnimation, ModalDefaultsConfig, ModalPosition, ModalSize, ModalVariant, NavbarColor, NavbarShadow, NavbarSize, NavbarVariant, PaginationPageChangeEvent, PaginationPageSizeChangeEvent, PaginationSize, PaginationVariant, PhoneCountry, PopoverAnimation, PopoverBoundary, PopoverConfig, PopoverDefaultsConfig, PopoverPosition, PopoverSize, PopoverTrigger, PopoverVariant, PopoverWidth, RGB, RadioButtonColor, RadioButtonDefaultsConfig, RadioButtonRadius, RadioButtonSize, RadioButtonVariant, RowAction, RowExpansion, SelectDefaultsConfig, SelectDisplayContext, SelectOption, SelectOptionGroup, SelectPosition, SelectSize, SelectVariant, SelectionEvent, SelectionMode, SidebarConfig, SidebarDefaultsConfig, SidebarPosition, SidebarSize, SidebarVariant, SortDirection, SortEvent, StudioConfig, StudioThemeConfig, SwitchDefaultsConfig, TabItem, TableCellContext, TableColumn, TableDefaultsConfig, TableDensity, TableHeaderContext, TableSort, TableState, TableVariant, TabsDefaultsConfig, TabsOrientation, TabsSize, TabsVariant, TextareaColor, TextareaDefaultsConfig, TextareaRadius, TextareaSize, TextareaVariant, ThemeMode, TooltipDefaultsConfig };
3208
+ export { BadgeComponent, BadgeWrapperComponent, BottomNavigationComponent, ButtonComponent, ButtonGroupComponent, ButtonToggleGroupComponent, COUNTRY_OPTIONS, CardComponent, ChatComponent, ChatInputComponent, ChatMessageComponent, CheckboxComponent, ColorPickerCompactComponent, ColorPickerComponent, ConfirmDialogComponent, ConfirmDialogService, DEFAULT_COLOR_PRESETS, DrawerComponent, DrawerService, DropdownComponent, IconComponent, InputComponent, InspectorComponent, MASK_PRESETS, MaskDirective, MaskEngine, MenuComponent, ModalComponent, NavbarComponent, PaginationComponent, PhoneInputComponent, PopoverComponent, RadioButtonComponent, STUDIO_CONFIG, SelectComponent, SidebarComponent, StudioConfigService, SwitchComponent, TableColumnDirective, TableComponent, TabsComponent, TextareaComponent, ThemeSwitchComponent, ToastComponent, ToastService, TooltipComponent, classNames, isSafeUrl, loadGoogleFont, loadGoogleFonts, provideStudioConfig, provideStudioIcons, sanitizeUrl, withConfigDefault };
3209
+ export type { BadgeColor, BadgeDefaultsConfig, BadgeIconPosition, BadgeRadius, BadgeSize, BadgeVariant, BadgeWrapperPosition, BadgeWrapperSize, BottomNavigationDefaultsConfig, BottomNavigationFabPosition, BottomNavigationItem, BottomNavigationLabelMode, BottomNavigationSize, BottomNavigationVariant, ButtonDefaultsConfig, ButtonGroupDefaultsConfig, ButtonToggleGroupDefaultsConfig, ButtonToggleGroupOption, ButtonToggleGroupValue, CardColor, CardDefaultsConfig, CardImagePosition, CardOrientation, CardPadding, CardRadius, CardShadow, CardSize, CardVariant, ChatMessage, ChatSize, ChatUser, ChatVariant, CheckboxColor, CheckboxDefaultsConfig, CheckboxRadius, CheckboxSize, CheckboxVariant, ColorConfig, ColorFormat, ColorPickerDefaultsConfig, ColorPickerSize, ColorPickerVariant, ColorPreset, ColorSwatchGroup, ColorValue, ComponentsConfig, ConfirmDialogConfig, ConfirmDialogVariant, CountryOption, DrawerAnimationEasing, DrawerCloseButtonPosition, DrawerConfig, DrawerDefaultsConfig, DrawerPosition, DrawerRadius, DrawerRole, DrawerShadowSize, DrawerSize, DropdownDefaultsConfig, DropdownItem, DropdownPosition, EmptyStateConfig, HSL, InputDefaultsConfig, InputMode, InputType, InspectorComponentSize, InspectorComponentVariant, InspectorData, InspectorGroup, InspectorGroupDivider, InspectorOption, InspectorParameter, InspectorParameterType, InspectorSection, InspectorSpacing, MaskConfig, MaskPreset, MaskResult, MaskToken, MenuColor, MenuExpandEvent, MenuExpandIconPosition, MenuItem, MenuItemBadgeColor, MenuItemClickEvent, MenuItemCommandEvent, MenuItemIconPosition, MenuItemTarget, MenuItemTooltipPosition, MenuMode, MenuOrientation, MenuRadius, MenuSize, MenuSpacing, MenuVariant, ModalAnimation, ModalDefaultsConfig, ModalPosition, ModalSize, ModalVariant, NavbarColor, NavbarShadow, NavbarSize, NavbarVariant, PaginationPageChangeEvent, PaginationPageSizeChangeEvent, PaginationSize, PaginationVariant, PhoneCountry, PopoverAnimation, PopoverBoundary, PopoverConfig, PopoverDefaultsConfig, PopoverPosition, PopoverSize, PopoverTrigger, PopoverVariant, PopoverWidth, RGB, RadioButtonColor, RadioButtonDefaultsConfig, RadioButtonRadius, RadioButtonSize, RadioButtonVariant, RowAction, RowExpansion, SelectDefaultsConfig, SelectDisplayContext, SelectOption, SelectOptionGroup, SelectPosition, SelectSize, SelectVariant, SelectionEvent, SelectionMode, SidebarConfig, SidebarDefaultsConfig, SidebarPosition, SidebarSize, SidebarVariant, SortDirection, SortEvent, StudioConfig, StudioThemeConfig, SwitchDefaultsConfig, TabItem, TableCellContext, TableColumn, TableDefaultsConfig, TableDensity, TableHeaderContext, TableSort, TableState, TableVariant, TabsDefaultsConfig, TabsOrientation, TabsSize, TabsVariant, TextareaColor, TextareaDefaultsConfig, TextareaRadius, TextareaSize, TextareaVariant, ThemeMode, ToastConfig, ToastMessage, ToastPosition, ToastSeverity, TooltipDefaultsConfig };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eduboxpro/studio",
3
- "version": "0.1.26",
3
+ "version": "0.1.28",
4
4
  "description": "Modern Angular UI library for educational platforms with customizable design system",
5
5
  "keywords": [
6
6
  "angular",