@tolle_/tolle-ui 0.0.18-beta → 0.0.21-beta

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.
Files changed (60) hide show
  1. package/esm2022/lib/alert.component.mjs +116 -0
  2. package/esm2022/lib/avatar-fallback.component.mjs +19 -0
  3. package/esm2022/lib/avatar.component.mjs +86 -0
  4. package/esm2022/lib/badge.component.mjs +4 -4
  5. package/esm2022/lib/breadcrumb-item.component.mjs +19 -0
  6. package/esm2022/lib/breadcrumb-link.component.mjs +60 -0
  7. package/esm2022/lib/breadcrumb-separator.component.mjs +23 -0
  8. package/esm2022/lib/breadcrumb.component.mjs +28 -0
  9. package/esm2022/lib/button.component.mjs +20 -24
  10. package/esm2022/lib/card.component.mjs +3 -3
  11. package/esm2022/lib/data-table.component.mjs +1 -1
  12. package/esm2022/lib/date-picker.component.mjs +2 -2
  13. package/esm2022/lib/date-range-picker.component.mjs +1 -1
  14. package/esm2022/lib/empty-state.component.mjs +111 -0
  15. package/esm2022/lib/input.component.mjs +125 -32
  16. package/esm2022/lib/masked-input.component.mjs +210 -46
  17. package/esm2022/lib/multi-select.component.mjs +1 -1
  18. package/esm2022/lib/otp-group.component.mjs +15 -0
  19. package/esm2022/lib/otp-slot.component.mjs +74 -0
  20. package/esm2022/lib/otp.component.mjs +127 -0
  21. package/esm2022/lib/popover-content.component.mjs +44 -0
  22. package/esm2022/lib/popover.component.mjs +105 -0
  23. package/esm2022/lib/radio-group.component.mjs +78 -0
  24. package/esm2022/lib/radio-item.component.mjs +112 -0
  25. package/esm2022/lib/radio-service.mjs +23 -0
  26. package/esm2022/lib/select.component.mjs +38 -9
  27. package/esm2022/lib/textarea.component.mjs +130 -26
  28. package/esm2022/lib/theme.service.mjs +227 -56
  29. package/esm2022/public-api.mjs +16 -1
  30. package/esm2022/tolle-ui.mjs +5 -0
  31. package/fesm2022/{tolle_-tolle-ui.mjs → tolle-ui.mjs} +1730 -201
  32. package/fesm2022/tolle-ui.mjs.map +1 -0
  33. package/lib/alert.component.d.ts +25 -0
  34. package/lib/avatar-fallback.component.d.ts +5 -0
  35. package/lib/avatar.component.d.ts +17 -0
  36. package/lib/breadcrumb-item.component.d.ts +5 -0
  37. package/lib/breadcrumb-link.component.d.ts +6 -0
  38. package/lib/breadcrumb-separator.component.d.ts +5 -0
  39. package/lib/breadcrumb.component.d.ts +8 -0
  40. package/lib/button.component.d.ts +1 -4
  41. package/lib/empty-state.component.d.ts +20 -0
  42. package/lib/input.component.d.ts +11 -3
  43. package/lib/masked-input.component.d.ts +14 -1
  44. package/lib/otp-group.component.d.ts +5 -0
  45. package/lib/otp-slot.component.d.ts +13 -0
  46. package/lib/otp.component.d.ts +21 -0
  47. package/lib/popover-content.component.d.ts +8 -0
  48. package/lib/popover.component.d.ts +19 -0
  49. package/lib/radio-group.component.d.ts +23 -0
  50. package/lib/radio-item.component.d.ts +22 -0
  51. package/lib/radio-service.d.ts +11 -0
  52. package/lib/select.component.d.ts +1 -0
  53. package/lib/textarea.component.d.ts +8 -1
  54. package/lib/theme.service.d.ts +37 -3
  55. package/package.json +7 -6
  56. package/preset.js +47 -33
  57. package/public-api.d.ts +15 -0
  58. package/theme.css +208 -163
  59. package/esm2022/tolle_-tolle-ui.mjs +0 -5
  60. package/fesm2022/tolle_-tolle-ui.mjs.map +0 -1
@@ -0,0 +1,25 @@
1
+ import { EventEmitter } from '@angular/core';
2
+ import { type VariantProps } from 'class-variance-authority';
3
+ import { cn } from './utils/cn';
4
+ import * as i0 from "@angular/core";
5
+ declare const alertVariants: (props?: ({
6
+ variant?: "default" | "destructive" | "success" | "warning" | null | undefined;
7
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
8
+ type AlertVariants = VariantProps<typeof alertVariants>;
9
+ export declare class AlertComponent {
10
+ variant: AlertVariants['variant'];
11
+ title?: string;
12
+ class: string;
13
+ dismissible: boolean;
14
+ onClose: EventEmitter<void>;
15
+ dismissed: boolean;
16
+ isDismissing: boolean;
17
+ protected alertVariants: (props?: ({
18
+ variant?: "default" | "destructive" | "success" | "warning" | null | undefined;
19
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
20
+ protected cn: typeof cn;
21
+ dismiss(): void;
22
+ static ɵfac: i0.ɵɵFactoryDeclaration<AlertComponent, never>;
23
+ static ɵcmp: i0.ɵɵComponentDeclaration<AlertComponent, "tolle-alert", never, { "variant": { "alias": "variant"; "required": false; }; "title": { "alias": "title"; "required": false; }; "class": { "alias": "class"; "required": false; }; "dismissible": { "alias": "dismissible"; "required": false; }; }, { "onClose": "onClose"; }, never, ["[icon]", "*"], true, never>;
24
+ }
25
+ export {};
@@ -0,0 +1,5 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class AvatarFallbackComponent {
3
+ static ɵfac: i0.ɵɵFactoryDeclaration<AvatarFallbackComponent, never>;
4
+ static ɵcmp: i0.ɵɵComponentDeclaration<AvatarFallbackComponent, "tolle-avatar-fallback", never, {}, {}, never, ["*"], true, never>;
5
+ }
@@ -0,0 +1,17 @@
1
+ import { ChangeDetectorRef } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class AvatarComponent {
4
+ private cdr;
5
+ src?: string;
6
+ alt: string;
7
+ size: 'sm' | 'default' | 'lg' | 'xl';
8
+ shape: 'circle' | 'square';
9
+ isLoading: boolean;
10
+ hasError: boolean;
11
+ constructor(cdr: ChangeDetectorRef);
12
+ onLoad(): void;
13
+ onError(): void;
14
+ get hostClasses(): string;
15
+ static ɵfac: i0.ɵɵFactoryDeclaration<AvatarComponent, never>;
16
+ static ɵcmp: i0.ɵɵComponentDeclaration<AvatarComponent, "tolle-avatar", never, { "src": { "alias": "src"; "required": false; }; "alt": { "alias": "alt"; "required": false; }; "size": { "alias": "size"; "required": false; }; "shape": { "alias": "shape"; "required": false; }; }, {}, never, ["*"], true, never>;
17
+ }
@@ -0,0 +1,5 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class BreadcrumbItemComponent {
3
+ static ɵfac: i0.ɵɵFactoryDeclaration<BreadcrumbItemComponent, never>;
4
+ static ɵcmp: i0.ɵɵComponentDeclaration<BreadcrumbItemComponent, "tolle-breadcrumb-item", never, {}, {}, never, ["*"], true, never>;
5
+ }
@@ -0,0 +1,6 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class BreadcrumbLinkComponent {
3
+ active: boolean;
4
+ static ɵfac: i0.ɵɵFactoryDeclaration<BreadcrumbLinkComponent, never>;
5
+ static ɵcmp: i0.ɵɵComponentDeclaration<BreadcrumbLinkComponent, "tolle-breadcrumb-link", never, { "active": { "alias": "active"; "required": false; }; }, {}, never, ["*"], true, never>;
6
+ }
@@ -0,0 +1,5 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class BreadcrumbSeparatorComponent {
3
+ static ɵfac: i0.ɵɵFactoryDeclaration<BreadcrumbSeparatorComponent, never>;
4
+ static ɵcmp: i0.ɵɵComponentDeclaration<BreadcrumbSeparatorComponent, "tolle-breadcrumb-separator", never, {}, {}, never, ["*"], true, never>;
5
+ }
@@ -0,0 +1,8 @@
1
+ import { cn } from "./utils/cn";
2
+ import * as i0 from "@angular/core";
3
+ export declare class BreadcrumbComponent {
4
+ class: string;
5
+ protected cn: typeof cn;
6
+ static ɵfac: i0.ɵɵFactoryDeclaration<BreadcrumbComponent, never>;
7
+ static ɵcmp: i0.ɵɵComponentDeclaration<BreadcrumbComponent, "tolle-breadcrumb", never, { "class": { "alias": "class"; "required": false; }; }, {}, never, ["*"], true, never>;
8
+ }
@@ -3,7 +3,6 @@ import * as i0 from "@angular/core";
3
3
  declare const buttonVariants: (props?: ({
4
4
  variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link" | null | undefined;
5
5
  size?: "default" | "xs" | "sm" | "lg" | "icon-xs" | "icon-sm" | "icon" | "icon-lg" | null | undefined;
6
- block?: boolean | null | undefined;
7
6
  busy?: boolean | null | undefined;
8
7
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
9
8
  export type ButtonProps = VariantProps<typeof buttonVariants>;
@@ -11,12 +10,10 @@ export declare class ButtonComponent {
11
10
  class: string;
12
11
  variant: ButtonProps['variant'];
13
12
  size: ButtonProps['size'];
14
- block: boolean;
15
13
  disabled: boolean;
16
14
  busy: boolean;
17
- readonly: boolean;
18
15
  get computedClass(): string;
19
16
  static ɵfac: i0.ɵɵFactoryDeclaration<ButtonComponent, never>;
20
- static ɵcmp: i0.ɵɵComponentDeclaration<ButtonComponent, "tolle-button", never, { "class": { "alias": "class"; "required": false; }; "variant": { "alias": "variant"; "required": false; }; "size": { "alias": "size"; "required": false; }; "block": { "alias": "block"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "busy": { "alias": "busy"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; }, {}, never, ["*"], true, never>;
17
+ static ɵcmp: i0.ɵɵComponentDeclaration<ButtonComponent, "tolle-button", never, { "class": { "alias": "class"; "required": false; }; "variant": { "alias": "variant"; "required": false; }; "size": { "alias": "size"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "busy": { "alias": "busy"; "required": false; }; }, {}, never, ["*"], true, never>;
21
18
  }
22
19
  export {};
@@ -0,0 +1,20 @@
1
+ import { type VariantProps } from 'class-variance-authority';
2
+ import { cn } from './utils/cn';
3
+ import * as i0 from "@angular/core";
4
+ declare const emptyStateVariants: (props?: ({
5
+ variant?: "default" | "minimal" | null | undefined;
6
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
7
+ type EmptyStateVariants = VariantProps<typeof emptyStateVariants>;
8
+ export declare class EmptyStateComponent {
9
+ variant: EmptyStateVariants['variant'];
10
+ title: string;
11
+ description?: string;
12
+ class: string;
13
+ protected emptyStateVariants: (props?: ({
14
+ variant?: "default" | "minimal" | null | undefined;
15
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
16
+ protected cn: typeof cn;
17
+ static ɵfac: i0.ɵɵFactoryDeclaration<EmptyStateComponent, never>;
18
+ static ɵcmp: i0.ɵɵComponentDeclaration<EmptyStateComponent, "tolle-empty-state", never, { "variant": { "alias": "variant"; "required": false; }; "title": { "alias": "title"; "required": false; }; "description": { "alias": "description"; "required": false; }; "class": { "alias": "class"; "required": false; }; }, {}, never, ["[icon]", "[actions]"], true, never>;
19
+ }
20
+ export {};
@@ -1,9 +1,10 @@
1
- import { ChangeDetectorRef } from '@angular/core';
1
+ import { ChangeDetectorRef, ElementRef, AfterViewInit } from '@angular/core';
2
2
  import { ControlValueAccessor } from '@angular/forms';
3
3
  import { cn } from './utils/cn';
4
4
  import * as i0 from "@angular/core";
5
- export declare class InputComponent implements ControlValueAccessor {
5
+ export declare class InputComponent implements ControlValueAccessor, AfterViewInit {
6
6
  private cdr;
7
+ inputElement: ElementRef<HTMLInputElement>;
7
8
  id: string;
8
9
  label: string;
9
10
  hint: string;
@@ -16,18 +17,25 @@ export declare class InputComponent implements ControlValueAccessor {
16
17
  disabled: boolean;
17
18
  readonly: boolean;
18
19
  error: boolean;
20
+ hideHintOnFocus: boolean;
19
21
  value: any;
20
22
  onChange: any;
21
23
  onTouched: any;
24
+ isFocused: boolean;
22
25
  constructor(cdr: ChangeDetectorRef);
26
+ ngAfterViewInit(): void;
23
27
  writeValue(value: any): void;
24
28
  registerOnChange(fn: any): void;
25
29
  registerOnTouched(fn: any): void;
26
30
  setDisabledState(isDisabled: boolean): void;
27
31
  onInputChange(event: Event): void;
32
+ onFocus(): void;
33
+ onBlur(): void;
34
+ focusInput(): void;
28
35
  protected readonly cn: typeof cn;
36
+ get computedLabelClass(): string;
29
37
  get computedContainerClass(): string;
30
38
  get computedInputClass(): string;
31
39
  static ɵfac: i0.ɵɵFactoryDeclaration<InputComponent, never>;
32
- static ɵcmp: i0.ɵɵComponentDeclaration<InputComponent, "tolle-input", never, { "id": { "alias": "id"; "required": false; }; "label": { "alias": "label"; "required": false; }; "hint": { "alias": "hint"; "required": false; }; "errorMessage": { "alias": "errorMessage"; "required": false; }; "type": { "alias": "type"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "size": { "alias": "size"; "required": false; }; "containerClass": { "alias": "containerClass"; "required": false; }; "class": { "alias": "class"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "error": { "alias": "error"; "required": false; }; }, {}, never, ["[prefix]", "[suffix]"], true, never>;
40
+ static ɵcmp: i0.ɵɵComponentDeclaration<InputComponent, "tolle-input", never, { "id": { "alias": "id"; "required": false; }; "label": { "alias": "label"; "required": false; }; "hint": { "alias": "hint"; "required": false; }; "errorMessage": { "alias": "errorMessage"; "required": false; }; "type": { "alias": "type"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "size": { "alias": "size"; "required": false; }; "containerClass": { "alias": "containerClass"; "required": false; }; "class": { "alias": "class"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "error": { "alias": "error"; "required": false; }; "hideHintOnFocus": { "alias": "hideHintOnFocus"; "required": false; }; }, {}, never, ["[prefix]", "[suffix]"], true, never>;
33
41
  }
@@ -5,24 +5,37 @@ import * as i0 from "@angular/core";
5
5
  export declare class MaskedInputComponent implements ControlValueAccessor, AfterContentChecked {
6
6
  private el;
7
7
  private cdr;
8
+ id: string;
9
+ label: string;
10
+ hint: string;
11
+ errorMessage: string;
8
12
  mask: string;
9
13
  placeholder: string;
10
14
  type: string;
11
15
  disabled: boolean;
16
+ readonly: boolean;
12
17
  class: string;
18
+ containerClass: string;
13
19
  error: boolean;
14
20
  size: 'xs' | 'sm' | 'default' | 'lg';
15
21
  returnRaw: boolean;
22
+ hideHintOnFocus: boolean;
16
23
  inputEl: ElementRef<HTMLInputElement>;
17
24
  hasPrefix: boolean;
18
25
  hasSuffix: boolean;
19
26
  displayValue: string;
27
+ isFocused: boolean;
20
28
  private tokens;
21
29
  onChange: any;
22
30
  onTouched: any;
23
31
  constructor(el: ElementRef, cdr: ChangeDetectorRef);
24
32
  ngAfterContentChecked(): void;
33
+ get computedLabelClass(): string;
34
+ get computedContainerClass(): string;
25
35
  get computedInputClass(): string;
36
+ focusInput(): void;
37
+ onFocus(): void;
38
+ onBlur(): void;
26
39
  onInput(event: Event): void;
27
40
  private applyMask;
28
41
  private unmask;
@@ -32,5 +45,5 @@ export declare class MaskedInputComponent implements ControlValueAccessor, After
32
45
  setDisabledState(isDisabled: boolean): void;
33
46
  protected cn: typeof cn;
34
47
  static ɵfac: i0.ɵɵFactoryDeclaration<MaskedInputComponent, never>;
35
- static ɵcmp: i0.ɵɵComponentDeclaration<MaskedInputComponent, "tolle-masked-input", never, { "mask": { "alias": "mask"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "type": { "alias": "type"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "class": { "alias": "class"; "required": false; }; "error": { "alias": "error"; "required": false; }; "size": { "alias": "size"; "required": false; }; "returnRaw": { "alias": "returnRaw"; "required": false; }; }, {}, never, ["[prefix]", "[suffix]"], true, never>;
48
+ static ɵcmp: i0.ɵɵComponentDeclaration<MaskedInputComponent, "tolle-masked-input", never, { "id": { "alias": "id"; "required": false; }; "label": { "alias": "label"; "required": false; }; "hint": { "alias": "hint"; "required": false; }; "errorMessage": { "alias": "errorMessage"; "required": false; }; "mask": { "alias": "mask"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "type": { "alias": "type"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "class": { "alias": "class"; "required": false; }; "containerClass": { "alias": "containerClass"; "required": false; }; "error": { "alias": "error"; "required": false; }; "size": { "alias": "size"; "required": false; }; "returnRaw": { "alias": "returnRaw"; "required": false; }; "hideHintOnFocus": { "alias": "hideHintOnFocus"; "required": false; }; }, {}, never, ["[prefix]", "[suffix]"], true, never>;
36
49
  }
@@ -0,0 +1,5 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class OtpGroupComponent {
3
+ static ɵfac: i0.ɵɵFactoryDeclaration<OtpGroupComponent, never>;
4
+ static ɵcmp: i0.ɵɵComponentDeclaration<OtpGroupComponent, "tolle-otp-group", never, {}, {}, never, ["*"], true, never>;
5
+ }
@@ -0,0 +1,13 @@
1
+ import { cn } from "./utils/cn";
2
+ import * as i0 from "@angular/core";
3
+ export declare class OtpSlotComponent {
4
+ char: string | undefined;
5
+ isActive: boolean;
6
+ isFirst: boolean;
7
+ isLast: boolean;
8
+ class: string;
9
+ protected cn: typeof cn;
10
+ get computedClass(): string;
11
+ static ɵfac: i0.ɵɵFactoryDeclaration<OtpSlotComponent, never>;
12
+ static ɵcmp: i0.ɵɵComponentDeclaration<OtpSlotComponent, "tolle-otp-slot", never, { "char": { "alias": "char"; "required": false; }; "isActive": { "alias": "isActive"; "required": false; }; "isFirst": { "alias": "isFirst"; "required": false; }; "isLast": { "alias": "isLast"; "required": false; }; "class": { "alias": "class"; "required": false; }; }, {}, never, never, true, never>;
13
+ }
@@ -0,0 +1,21 @@
1
+ import { ChangeDetectorRef } from '@angular/core';
2
+ import { ControlValueAccessor } from '@angular/forms';
3
+ import * as i0 from "@angular/core";
4
+ export declare class OtpComponent implements ControlValueAccessor {
5
+ private cdr;
6
+ length: number;
7
+ disabled: boolean;
8
+ auto: boolean;
9
+ value: string;
10
+ isFocused: boolean;
11
+ onChange: any;
12
+ onTouched: any;
13
+ constructor(cdr: ChangeDetectorRef);
14
+ onInputChange(event: any): void;
15
+ getSlotClass(index: number): string;
16
+ writeValue(value: any): void;
17
+ registerOnChange(fn: any): void;
18
+ registerOnTouched(fn: any): void;
19
+ static ɵfac: i0.ɵɵFactoryDeclaration<OtpComponent, never>;
20
+ static ɵcmp: i0.ɵɵComponentDeclaration<OtpComponent, "tolle-otp", never, { "length": { "alias": "length"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "auto": { "alias": "auto"; "required": false; }; }, {}, never, ["*"], true, never>;
21
+ }
@@ -0,0 +1,8 @@
1
+ import { cn } from './utils/cn';
2
+ import * as i0 from "@angular/core";
3
+ export declare class PopoverContentComponent {
4
+ class: string;
5
+ protected cn: typeof cn;
6
+ static ɵfac: i0.ɵɵFactoryDeclaration<PopoverContentComponent, never>;
7
+ static ɵcmp: i0.ɵɵComponentDeclaration<PopoverContentComponent, "tolle-popover-content", never, { "class": { "alias": "class"; "required": false; }; }, {}, never, ["*"], true, never>;
8
+ }
@@ -0,0 +1,19 @@
1
+ import { ElementRef, EventEmitter, OnDestroy } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class PopoverComponent implements OnDestroy {
4
+ placement: 'top' | 'bottom' | 'left' | 'right';
5
+ onOpen: EventEmitter<void>;
6
+ onClose: EventEmitter<void>;
7
+ triggerEl: ElementRef;
8
+ popoverEl: ElementRef;
9
+ isOpen: boolean;
10
+ private cleanup?;
11
+ toggle(): void;
12
+ open(): void;
13
+ close(): void;
14
+ private updatePosition;
15
+ onClickOutside(event: MouseEvent): void;
16
+ ngOnDestroy(): void;
17
+ static ɵfac: i0.ɵɵFactoryDeclaration<PopoverComponent, never>;
18
+ static ɵcmp: i0.ɵɵComponentDeclaration<PopoverComponent, "tolle-popover", never, { "placement": { "alias": "placement"; "required": false; }; }, { "onOpen": "onOpen"; "onClose": "onClose"; }, never, ["[trigger]", "*"], true, never>;
19
+ }
@@ -0,0 +1,23 @@
1
+ import { OnChanges } from '@angular/core';
2
+ import { ControlValueAccessor } from '@angular/forms';
3
+ import { cn } from './utils/cn';
4
+ import { RadioService } from './radio-service';
5
+ import * as i0 from "@angular/core";
6
+ export declare class RadioGroupComponent implements ControlValueAccessor, OnChanges {
7
+ private radioService;
8
+ class: string;
9
+ disabled: boolean;
10
+ name: string;
11
+ value: any;
12
+ onChange: any;
13
+ onTouched: any;
14
+ constructor(radioService: RadioService);
15
+ setDisabledState?(isDisabled: boolean): void;
16
+ ngOnChanges(): void;
17
+ writeValue(value: any): void;
18
+ registerOnChange(fn: any): void;
19
+ registerOnTouched(fn: any): void;
20
+ protected readonly cn: typeof cn;
21
+ static ɵfac: i0.ɵɵFactoryDeclaration<RadioGroupComponent, never>;
22
+ static ɵcmp: i0.ɵɵComponentDeclaration<RadioGroupComponent, "tolle-radio-group", never, { "class": { "alias": "class"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "name": { "alias": "name"; "required": false; }; }, {}, never, ["*"], true, never>;
23
+ }
@@ -0,0 +1,22 @@
1
+ import { OnInit, OnDestroy, ChangeDetectorRef } from '@angular/core';
2
+ import { cn } from './utils/cn';
3
+ import { RadioService } from './radio-service';
4
+ import * as i0 from "@angular/core";
5
+ export declare class RadioItemComponent implements OnInit, OnDestroy {
6
+ private radioService;
7
+ private cdr;
8
+ value: any;
9
+ disabled: boolean;
10
+ class: string;
11
+ isSelected: boolean;
12
+ groupDisabled: boolean;
13
+ private sub;
14
+ get isEffectiveDisabled(): boolean;
15
+ constructor(radioService: RadioService, cdr: ChangeDetectorRef);
16
+ ngOnInit(): void;
17
+ select(): void;
18
+ ngOnDestroy(): void;
19
+ protected cn: typeof cn;
20
+ static ɵfac: i0.ɵɵFactoryDeclaration<RadioItemComponent, never>;
21
+ static ɵcmp: i0.ɵɵComponentDeclaration<RadioItemComponent, "tolle-radio-item", never, { "value": { "alias": "value"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "class": { "alias": "class"; "required": false; }; }, {}, never, ["*"], true, never>;
22
+ }
@@ -0,0 +1,11 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class RadioService {
3
+ private selectedValueSource;
4
+ selectedValue$: import("rxjs").Observable<any>;
5
+ private disabledSource;
6
+ disabled$: import("rxjs").Observable<boolean>;
7
+ select(value: any): void;
8
+ setDisabled(isDisabled: boolean): void;
9
+ static ɵfac: i0.ɵɵFactoryDeclaration<RadioService, never>;
10
+ static ɵprov: i0.ɵɵInjectableDeclaration<RadioService>;
11
+ }
@@ -14,6 +14,7 @@ export declare class SelectComponent implements ControlValueAccessor, AfterConte
14
14
  readonly: boolean;
15
15
  trigger: ElementRef;
16
16
  popover: ElementRef;
17
+ container: ElementRef;
17
18
  items: QueryList<SelectItemComponent>;
18
19
  private sub;
19
20
  searchQuery: string;
@@ -7,25 +7,32 @@ export declare class TextareaComponent implements ControlValueAccessor, AfterVie
7
7
  label: string;
8
8
  placeholder: string;
9
9
  hint: string;
10
+ errorMessage: string;
10
11
  rows: number;
11
12
  maxLength?: number;
12
13
  showCharacterCount: boolean;
13
14
  autoGrow: boolean;
14
15
  error: boolean;
15
16
  className: string;
17
+ hideHintOnFocus: boolean;
18
+ hideCharacterCountOnFocus: boolean;
16
19
  disabled: boolean;
17
20
  readonly: boolean;
18
21
  value: string;
22
+ isFocused: boolean;
19
23
  onChange: any;
20
24
  onTouched: any;
21
25
  ngAfterViewInit(): void;
26
+ get computedLabelClass(): string;
22
27
  get textareaClasses(): string;
23
28
  handleInput(event: any): void;
29
+ onFocus(): void;
30
+ onBlur(): void;
24
31
  private resize;
25
32
  writeValue(value: any): void;
26
33
  registerOnChange(fn: any): void;
27
34
  registerOnTouched(fn: any): void;
28
35
  setDisabledState(isDisabled: boolean): void;
29
36
  static ɵfac: i0.ɵɵFactoryDeclaration<TextareaComponent, never>;
30
- static ɵcmp: i0.ɵɵComponentDeclaration<TextareaComponent, "tolle-textarea", never, { "id": { "alias": "id"; "required": false; }; "label": { "alias": "label"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "hint": { "alias": "hint"; "required": false; }; "rows": { "alias": "rows"; "required": false; }; "maxLength": { "alias": "maxLength"; "required": false; }; "showCharacterCount": { "alias": "showCharacterCount"; "required": false; }; "autoGrow": { "alias": "autoGrow"; "required": false; }; "error": { "alias": "error"; "required": false; }; "className": { "alias": "className"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; }, {}, never, never, true, never>;
37
+ static ɵcmp: i0.ɵɵComponentDeclaration<TextareaComponent, "tolle-textarea", never, { "id": { "alias": "id"; "required": false; }; "label": { "alias": "label"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "hint": { "alias": "hint"; "required": false; }; "errorMessage": { "alias": "errorMessage"; "required": false; }; "rows": { "alias": "rows"; "required": false; }; "maxLength": { "alias": "maxLength"; "required": false; }; "showCharacterCount": { "alias": "showCharacterCount"; "required": false; }; "autoGrow": { "alias": "autoGrow"; "required": false; }; "error": { "alias": "error"; "required": false; }; "className": { "alias": "className"; "required": false; }; "hideHintOnFocus": { "alias": "hideHintOnFocus"; "required": false; }; "hideCharacterCountOnFocus": { "alias": "hideCharacterCountOnFocus"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; }, {}, never, never, true, never>;
31
38
  }
@@ -12,19 +12,53 @@ export declare class ThemeService {
12
12
  constructor(document: Document, platformId: Object, config: TolleConfig, rendererFactory: RendererFactory2);
13
13
  private initializeTheme;
14
14
  /**
15
- * Applies the brand identity variables with full shade palette
15
+ * Sets the border radius for all components
16
16
  */
17
- applyBrandConfig(config: TolleConfig): void;
17
+ setRadius(radius: string, persist?: boolean): void;
18
+ /**
19
+ * Updates the radius calculations in dynamic styles
20
+ */
21
+ private updateRadiusInDynamicStyles;
18
22
  /**
19
23
  * Generates full primary color palette (50-900) based on base color
20
- * Uses color-mix() for consistency with your existing approach
21
24
  */
22
25
  private generatePrimaryShades;
26
+ /**
27
+ * Convert hex color to RGB object
28
+ */
29
+ private hexToRgb;
30
+ /**
31
+ * Convert hex to RGB string format for CSS (space-separated)
32
+ */
33
+ private hexToRgbString;
34
+ /**
35
+ * Get contrast color in RGB format
36
+ */
37
+ private getContrastColorRgb;
38
+ /**
39
+ * Lighten a hex color by a percentage
40
+ */
41
+ private lightenColor;
42
+ /**
43
+ * Darken a hex color by a percentage
44
+ */
45
+ private darkenColor;
46
+ /**
47
+ * Calculate contrast color (black or white) based on background color
48
+ */
49
+ private getContrastColor;
23
50
  private injectDynamicStyles;
24
51
  toggleTheme(): void;
25
52
  private enableDarkMode;
26
53
  private disableDarkMode;
54
+ setPrimaryColor(color: string, persist?: boolean): void;
27
55
  get currentTheme(): 'dark' | 'light';
56
+ get primaryColor(): string | null;
57
+ get radius(): string | null;
58
+ /**
59
+ * Applies the brand identity variables with full shade palette
60
+ */
61
+ applyBrandConfig(config: TolleConfig): void;
28
62
  static ɵfac: i0.ɵɵFactoryDeclaration<ThemeService, [null, null, { optional: true; }, null]>;
29
63
  static ɵprov: i0.ɵɵInjectableDeclaration<ThemeService>;
30
64
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tolle_/tolle-ui",
3
- "version": "0.0.18-beta",
3
+ "version": "0.0.21-beta",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -16,9 +16,9 @@
16
16
  },
17
17
  ".": {
18
18
  "types": "./index.d.ts",
19
- "esm2022": "./esm2022/tolle_-tolle-ui.mjs",
20
- "esm": "./esm2022/tolle_-tolle-ui.mjs",
21
- "default": "./fesm2022/tolle_-tolle-ui.mjs"
19
+ "esm2022": "./esm2022/tolle-ui.mjs",
20
+ "esm": "./esm2022/tolle-ui.mjs",
21
+ "default": "./fesm2022/tolle-ui.mjs"
22
22
  }
23
23
  },
24
24
  "description": "A high-performance Angular UI library.",
@@ -30,12 +30,13 @@
30
30
  "@floating-ui/dom": "^1.7.4",
31
31
  "class-variance-authority": "^0.7.1",
32
32
  "tailwind-merge": "^3.4.0",
33
- "clsx": "^2.1.1"
33
+ "clsx": "^2.1.1",
34
+ "date-fns": "^4.1.0"
34
35
  },
35
36
  "dependencies": {
36
37
  "tslib": "^2.3.0"
37
38
  },
38
39
  "sideEffects": false,
39
- "module": "fesm2022/tolle_-tolle-ui.mjs",
40
+ "module": "fesm2022/tolle-ui.mjs",
40
41
  "typings": "index.d.ts"
41
42
  }
package/preset.js CHANGED
@@ -1,48 +1,56 @@
1
- /** @type {import('tailwindcss').Config} */
1
+ // tolle-preset.js
2
2
  module.exports = {
3
+ darkMode: 'class',
3
4
  theme: {
4
5
  extend: {
5
6
  colors: {
6
- // Primary with full palette
7
+ // CSS Variables with RGB values
8
+ border: 'rgb(var(--border) / <alpha-value>)',
9
+ input: 'rgb(var(--input) / <alpha-value>)',
10
+ ring: 'rgb(var(--ring) / <alpha-value>)',
11
+ background: 'rgb(var(--background) / <alpha-value>)',
12
+ foreground: 'rgb(var(--foreground) / <alpha-value>)',
13
+
14
+ // Primary colors with opacity support
7
15
  primary: {
8
- 50: 'var(--primary-50)',
9
- 100: 'var(--primary-100)',
10
- 200: 'var(--primary-200)',
11
- 300: 'var(--primary-300)',
12
- 400: 'var(--primary-400)',
13
- 500: 'var(--primary-500)',
14
- 600: 'var(--primary-600)',
15
- 700: 'var(--primary-700)',
16
- 800: 'var(--primary-800)',
17
- 900: 'var(--primary-900)',
18
- DEFAULT: 'var(--primary-500)',
19
- foreground: 'var(--primary-foreground)',
16
+ DEFAULT: 'rgb(var(--primary) / <alpha-value>)',
17
+ foreground: 'rgb(var(--primary-foreground) / <alpha-value>)',
18
+ 50: 'rgb(var(--primary-50) / <alpha-value>)',
19
+ 100: 'rgb(var(--primary-100) / <alpha-value>)',
20
+ 200: 'rgb(var(--primary-200) / <alpha-value>)',
21
+ 300: 'rgb(var(--primary-300) / <alpha-value>)',
22
+ 400: 'rgb(var(--primary-400) / <alpha-value>)',
23
+ 500: 'rgb(var(--primary-500) / <alpha-value>)',
24
+ 600: 'rgb(var(--primary-600) / <alpha-value>)',
25
+ 700: 'rgb(var(--primary-700) / <alpha-value>)',
26
+ 800: 'rgb(var(--primary-800) / <alpha-value>)',
27
+ 900: 'rgb(var(--primary-900) / <alpha-value>)',
20
28
  },
21
- // Other colors
29
+
30
+ // Semantic colors with opacity support
22
31
  secondary: {
23
- DEFAULT: 'var(--secondary)',
24
- foreground: 'var(--secondary-foreground)',
32
+ DEFAULT: 'rgb(var(--secondary) / <alpha-value>)',
33
+ foreground: 'rgb(var(--secondary-foreground) / <alpha-value>)',
34
+ },
35
+ destructive: {
36
+ DEFAULT: 'rgb(var(--destructive) / <alpha-value>)',
37
+ foreground: 'rgb(var(--destructive-foreground) / <alpha-value>)',
25
38
  },
26
39
  muted: {
27
- DEFAULT: 'var(--muted)',
28
- foreground: 'var(--muted-foreground)',
40
+ DEFAULT: 'rgb(var(--muted) / <alpha-value>)',
41
+ foreground: 'rgb(var(--muted-foreground) / <alpha-value>)',
29
42
  },
30
43
  accent: {
31
- DEFAULT: 'var(--accent)',
32
- foreground: 'var(--accent-foreground)',
33
- },
34
- destructive: {
35
- DEFAULT: 'var(--destructive)',
36
- foreground: 'var(--destructive-foreground)',
44
+ DEFAULT: 'rgb(var(--accent) / <alpha-value>)',
45
+ foreground: 'rgb(var(--accent-foreground) / <alpha-value>)',
37
46
  },
38
- border: 'var(--border)',
39
- input: 'var(--input)',
40
- ring: 'var(--ring)',
41
- background: 'var(--background)',
42
- foreground: 'var(--foreground)',
43
47
  popover: {
44
- DEFAULT: 'var(--popover)',
45
- foreground: 'var(--popover-foreground)',
48
+ DEFAULT: 'rgb(var(--popover) / <alpha-value>)',
49
+ foreground: 'rgb(var(--popover-foreground) / <alpha-value>)',
50
+ },
51
+ card: {
52
+ DEFAULT: 'rgb(var(--card) / <alpha-value>)',
53
+ foreground: 'rgb(var(--card-foreground) / <alpha-value>)',
46
54
  },
47
55
  },
48
56
  borderRadius: {
@@ -50,7 +58,13 @@ module.exports = {
50
58
  md: 'calc(var(--radius) - 2px)',
51
59
  sm: 'calc(var(--radius) - 4px)',
52
60
  },
61
+ boxShadow: {
62
+ sm: 'var(--shadow-sm)',
63
+ DEFAULT: 'var(--shadow)',
64
+ md: 'var(--shadow-md)',
65
+ lg: 'var(--shadow-lg)',
66
+ },
53
67
  },
54
68
  },
55
69
  plugins: [],
56
- };
70
+ }
package/public-api.d.ts CHANGED
@@ -38,3 +38,18 @@ export * from './lib/dropdown-menu.component';
38
38
  export * from './lib/dropdown-separator.component';
39
39
  export * from './lib/dropdown-trigger.directive';
40
40
  export * from './lib/textarea.component';
41
+ export * from './lib/alert.component';
42
+ export * from './lib/avatar.component';
43
+ export * from './lib/avatar-fallback.component';
44
+ export * from './lib/breadcrumb.component';
45
+ export * from './lib/breadcrumb-link.component';
46
+ export * from './lib/breadcrumb-separator.component';
47
+ export * from './lib/breadcrumb-item.component';
48
+ export * from './lib/empty-state.component';
49
+ export * from './lib/otp.component';
50
+ export * from './lib/otp-slot.component';
51
+ export * from './lib/otp-group.component';
52
+ export * from './lib/popover.component';
53
+ export * from './lib/popover-content.component';
54
+ export * from './lib/radio-group.component';
55
+ export * from './lib/radio-item.component';