@sonny-ui/core 0.1.0-alpha.16 → 0.1.0-alpha.18
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 +109 -55
- package/fesm2022/sonny-ui-core.mjs +617 -178
- package/fesm2022/sonny-ui-core.mjs.map +1 -1
- package/package.json +1 -1
- package/src/lib/accordion/accordion.directives.ts +0 -4
- package/src/lib/alert/alert.directives.ts +0 -3
- package/src/lib/avatar/avatar.component.ts +0 -1
- package/src/lib/avatar-group/avatar-group.component.spec.ts +74 -0
- package/src/lib/avatar-group/avatar-group.component.ts +88 -0
- package/src/lib/avatar-group/index.ts +1 -0
- package/src/lib/badge/badge.directive.ts +0 -1
- package/src/lib/breadcrumb/breadcrumb.directives.ts +0 -6
- package/src/lib/button/button.directive.ts +0 -1
- package/src/lib/button-group/button-group.directive.ts +0 -1
- package/src/lib/calendar/calendar.component.ts +0 -1
- package/src/lib/card/card.directives.ts +0 -6
- package/src/lib/carousel/carousel.directives.ts +0 -5
- package/src/lib/chat-bubble/chat-bubble.directives.ts +0 -6
- package/src/lib/checkbox/checkbox.directive.ts +0 -1
- package/src/lib/color-picker/color-picker.component.ts +5 -5
- package/src/lib/combobox/combobox.component.ts +1 -3
- package/src/lib/command-palette/command-palette.component.ts +0 -1
- package/src/lib/data-table/data-table.component.ts +0 -1
- package/src/lib/data-table/data-table.directives.ts +0 -4
- package/src/lib/date-picker/date-picker.component.ts +5 -5
- package/src/lib/date-range-picker/date-range-picker.component.ts +5 -5
- package/src/lib/diff/diff.component.ts +0 -1
- package/src/lib/divider/divider.component.ts +0 -1
- package/src/lib/dock/dock.directives.ts +0 -2
- package/src/lib/drawer/drawer.directives.ts +0 -3
- package/src/lib/dropdown/dropdown.directives.ts +3 -10
- package/src/lib/fab/fab.directives.ts +0 -3
- package/src/lib/fieldset/fieldset.directives.ts +0 -3
- package/src/lib/file-input/file-input.component.ts +0 -1
- package/src/lib/indicator/indicator.directives.ts +0 -2
- package/src/lib/input/input.directive.ts +0 -1
- package/src/lib/input/label.directive.ts +0 -1
- package/src/lib/kbd/kbd.directive.ts +0 -1
- package/src/lib/link/link.directive.ts +0 -1
- package/src/lib/list/list.directives.ts +0 -5
- package/src/lib/loader/loader.component.ts +0 -1
- package/src/lib/modal/dialog.directives.ts +0 -6
- package/src/lib/navbar/navbar.directives.ts +0 -4
- package/src/lib/number-input/index.ts +2 -0
- package/src/lib/number-input/number-input.component.spec.ts +151 -0
- package/src/lib/number-input/number-input.component.ts +152 -0
- package/src/lib/number-input/number-input.variants.ts +17 -0
- package/src/lib/otp-input/otp-input.component.ts +0 -1
- package/src/lib/pagination/pagination.component.ts +0 -1
- package/src/lib/popover/index.ts +6 -0
- package/src/lib/popover/popover.directives.spec.ts +147 -0
- package/src/lib/popover/popover.directives.ts +151 -0
- package/src/lib/progress/progress.component.ts +0 -1
- package/src/lib/radial-progress/radial-progress.component.ts +0 -1
- package/src/lib/radio/radio.directive.ts +0 -1
- package/src/lib/rating/rating.component.ts +0 -1
- package/src/lib/select/select.component.ts +1 -3
- package/src/lib/sheet/sheet.directives.ts +0 -5
- package/src/lib/skeleton/skeleton.directive.ts +0 -1
- package/src/lib/slider/slider.component.ts +0 -1
- package/src/lib/stat/stat.directives.ts +0 -5
- package/src/lib/status/status.directive.ts +0 -1
- package/src/lib/steps/steps.directives.ts +0 -2
- package/src/lib/switch/switch.component.ts +0 -1
- package/src/lib/table/table.directives.ts +0 -8
- package/src/lib/tabs/tabs.directives.ts +0 -4
- package/src/lib/tag-input/index.ts +2 -0
- package/src/lib/tag-input/tag-input.component.spec.ts +190 -0
- package/src/lib/tag-input/tag-input.component.ts +172 -0
- package/src/lib/tag-input/tag-input.variants.ts +31 -0
- package/src/lib/textarea/textarea.directive.ts +0 -1
- package/src/lib/timeline/timeline.directives.ts +0 -5
- package/src/lib/toast/toaster.component.ts +0 -1
- package/src/lib/toggle/toggle.directive.ts +0 -1
- package/src/lib/tooltip/tooltip.directive.ts +0 -1
- package/src/lib/validator/validator.directives.ts +0 -2
- package/types/sonny-ui-core.d.ts +147 -2
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
import { Component, signal } from '@angular/core';
|
|
2
|
+
import { FormControl, ReactiveFormsModule } from '@angular/forms';
|
|
3
|
+
import { TestBed, type ComponentFixture } from '@angular/core/testing';
|
|
4
|
+
import { SnyTagInputComponent } from './tag-input.component';
|
|
5
|
+
|
|
6
|
+
@Component({
|
|
7
|
+
standalone: true,
|
|
8
|
+
imports: [SnyTagInputComponent],
|
|
9
|
+
template: `
|
|
10
|
+
<sny-tag-input
|
|
11
|
+
[(value)]="tags"
|
|
12
|
+
[maxTags]="maxTags()"
|
|
13
|
+
[allowDuplicates]="allowDuplicates()"
|
|
14
|
+
[disabled]="disabled()"
|
|
15
|
+
[validate]="validateFn()"
|
|
16
|
+
(tagAdded)="lastAdded = $event"
|
|
17
|
+
(tagRemoved)="lastRemoved = $event"
|
|
18
|
+
/>
|
|
19
|
+
`,
|
|
20
|
+
})
|
|
21
|
+
class TestHost {
|
|
22
|
+
tags = signal<string[]>([]);
|
|
23
|
+
maxTags = signal<number | null>(null);
|
|
24
|
+
allowDuplicates = signal(false);
|
|
25
|
+
disabled = signal(false);
|
|
26
|
+
validateFn = signal<((t: string) => boolean) | null>(null);
|
|
27
|
+
lastAdded: string | null = null;
|
|
28
|
+
lastRemoved: string | null = null;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
describe('SnyTagInputComponent', () => {
|
|
32
|
+
let fixture: ComponentFixture<TestHost>;
|
|
33
|
+
let el: HTMLElement;
|
|
34
|
+
|
|
35
|
+
beforeEach(async () => {
|
|
36
|
+
await TestBed.configureTestingModule({ imports: [TestHost] }).compileComponents();
|
|
37
|
+
fixture = TestBed.createComponent(TestHost);
|
|
38
|
+
fixture.detectChanges();
|
|
39
|
+
el = fixture.nativeElement;
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
function getInput(): HTMLInputElement {
|
|
43
|
+
return el.querySelector('input') as HTMLInputElement;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
function getTags(): string[] {
|
|
47
|
+
return Array.from(el.querySelectorAll('span')).map((s) => s.textContent?.trim().replace('×', '').trim() ?? '');
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
function typeAndEnter(text: string): void {
|
|
51
|
+
const input = getInput();
|
|
52
|
+
input.value = text;
|
|
53
|
+
input.dispatchEvent(new Event('input', { bubbles: true }));
|
|
54
|
+
fixture.detectChanges();
|
|
55
|
+
input.dispatchEvent(new KeyboardEvent('keydown', { key: 'Enter', bubbles: true }));
|
|
56
|
+
fixture.detectChanges();
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
it('should render empty with placeholder', () => {
|
|
60
|
+
expect(getInput().placeholder).toBe('Add tag...');
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
it('should add tag on Enter', () => {
|
|
64
|
+
typeAndEnter('Angular');
|
|
65
|
+
expect(fixture.componentInstance.tags()).toContain('Angular');
|
|
66
|
+
expect(fixture.componentInstance.lastAdded).toBe('Angular');
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
it('should add tag on comma', () => {
|
|
70
|
+
const input = getInput();
|
|
71
|
+
input.value = 'React,';
|
|
72
|
+
input.dispatchEvent(new Event('input', { bubbles: true }));
|
|
73
|
+
fixture.detectChanges();
|
|
74
|
+
expect(fixture.componentInstance.tags()).toContain('React');
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
it('should reject duplicates when allowDuplicates=false', () => {
|
|
78
|
+
typeAndEnter('Angular');
|
|
79
|
+
typeAndEnter('Angular');
|
|
80
|
+
expect(fixture.componentInstance.tags().filter((t) => t === 'Angular').length).toBe(1);
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
it('should allow duplicates when allowDuplicates=true', () => {
|
|
84
|
+
fixture.componentInstance.allowDuplicates.set(true);
|
|
85
|
+
fixture.detectChanges();
|
|
86
|
+
typeAndEnter('Angular');
|
|
87
|
+
typeAndEnter('Angular');
|
|
88
|
+
expect(fixture.componentInstance.tags().filter((t) => t === 'Angular').length).toBe(2);
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
it('should respect maxTags', () => {
|
|
92
|
+
fixture.componentInstance.maxTags.set(2);
|
|
93
|
+
fixture.detectChanges();
|
|
94
|
+
typeAndEnter('A');
|
|
95
|
+
typeAndEnter('B');
|
|
96
|
+
// Input should be hidden now (atMax), so we can't type more
|
|
97
|
+
const input = el.querySelector('input');
|
|
98
|
+
expect(input).toBeNull(); // hidden when at max
|
|
99
|
+
expect(fixture.componentInstance.tags().length).toBe(2);
|
|
100
|
+
});
|
|
101
|
+
|
|
102
|
+
it('should validate with custom function', () => {
|
|
103
|
+
fixture.componentInstance.validateFn.set((t: string) => t.length >= 3);
|
|
104
|
+
fixture.detectChanges();
|
|
105
|
+
typeAndEnter('AB');
|
|
106
|
+
expect(fixture.componentInstance.tags().length).toBe(0);
|
|
107
|
+
typeAndEnter('ABC');
|
|
108
|
+
expect(fixture.componentInstance.tags()).toContain('ABC');
|
|
109
|
+
});
|
|
110
|
+
|
|
111
|
+
it('should remove tag on X click', () => {
|
|
112
|
+
typeAndEnter('Angular');
|
|
113
|
+
fixture.detectChanges();
|
|
114
|
+
const removeBtn = el.querySelector('[aria-label="Remove Angular"]') as HTMLButtonElement;
|
|
115
|
+
removeBtn.click();
|
|
116
|
+
fixture.detectChanges();
|
|
117
|
+
expect(fixture.componentInstance.tags().length).toBe(0);
|
|
118
|
+
expect(fixture.componentInstance.lastRemoved).toBe('Angular');
|
|
119
|
+
});
|
|
120
|
+
|
|
121
|
+
it('should remove last tag on Backspace with empty input', () => {
|
|
122
|
+
typeAndEnter('A');
|
|
123
|
+
typeAndEnter('B');
|
|
124
|
+
const input = getInput();
|
|
125
|
+
input.value = '';
|
|
126
|
+
input.dispatchEvent(new Event('input', { bubbles: true }));
|
|
127
|
+
input.dispatchEvent(new KeyboardEvent('keydown', { key: 'Backspace', bubbles: true }));
|
|
128
|
+
fixture.detectChanges();
|
|
129
|
+
expect(fixture.componentInstance.tags()).toEqual(['A']);
|
|
130
|
+
});
|
|
131
|
+
|
|
132
|
+
it('should add tag on blur when addOnBlur=true', () => {
|
|
133
|
+
const input = getInput();
|
|
134
|
+
input.value = 'BlurTag';
|
|
135
|
+
input.dispatchEvent(new Event('input', { bubbles: true }));
|
|
136
|
+
input.dispatchEvent(new Event('blur', { bubbles: true }));
|
|
137
|
+
fixture.detectChanges();
|
|
138
|
+
expect(fixture.componentInstance.tags()).toContain('BlurTag');
|
|
139
|
+
});
|
|
140
|
+
|
|
141
|
+
it('should disable when disabled', () => {
|
|
142
|
+
fixture.componentInstance.disabled.set(true);
|
|
143
|
+
fixture.detectChanges();
|
|
144
|
+
expect(getInput().disabled).toBe(true);
|
|
145
|
+
});
|
|
146
|
+
|
|
147
|
+
it('should emit tagAdded and tagRemoved', () => {
|
|
148
|
+
typeAndEnter('Test');
|
|
149
|
+
expect(fixture.componentInstance.lastAdded).toBe('Test');
|
|
150
|
+
const removeBtn = el.querySelector('[aria-label="Remove Test"]') as HTMLButtonElement;
|
|
151
|
+
removeBtn.click();
|
|
152
|
+
fixture.detectChanges();
|
|
153
|
+
expect(fixture.componentInstance.lastRemoved).toBe('Test');
|
|
154
|
+
});
|
|
155
|
+
});
|
|
156
|
+
|
|
157
|
+
@Component({
|
|
158
|
+
standalone: true,
|
|
159
|
+
imports: [ReactiveFormsModule, SnyTagInputComponent],
|
|
160
|
+
template: `<sny-tag-input [formControl]="ctrl" />`,
|
|
161
|
+
})
|
|
162
|
+
class ReactiveHost {
|
|
163
|
+
ctrl = new FormControl<string[]>([]);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
describe('SnyTagInputComponent — Reactive Forms', () => {
|
|
167
|
+
let fixture: ComponentFixture<ReactiveHost>;
|
|
168
|
+
|
|
169
|
+
beforeEach(async () => {
|
|
170
|
+
await TestBed.configureTestingModule({ imports: [ReactiveHost] }).compileComponents();
|
|
171
|
+
fixture = TestBed.createComponent(ReactiveHost);
|
|
172
|
+
fixture.detectChanges();
|
|
173
|
+
});
|
|
174
|
+
|
|
175
|
+
it('should populate tags from FormControl', () => {
|
|
176
|
+
fixture.componentInstance.ctrl.setValue(['A', 'B', 'C']);
|
|
177
|
+
fixture.detectChanges();
|
|
178
|
+
const tags = fixture.nativeElement.querySelectorAll('span');
|
|
179
|
+
expect(tags.length).toBe(3);
|
|
180
|
+
});
|
|
181
|
+
|
|
182
|
+
it('should update FormControl when tag added', () => {
|
|
183
|
+
const input = fixture.nativeElement.querySelector('input') as HTMLInputElement;
|
|
184
|
+
input.value = 'New';
|
|
185
|
+
input.dispatchEvent(new Event('input', { bubbles: true }));
|
|
186
|
+
input.dispatchEvent(new KeyboardEvent('keydown', { key: 'Enter', bubbles: true }));
|
|
187
|
+
fixture.detectChanges();
|
|
188
|
+
expect(fixture.componentInstance.ctrl.value).toContain('New');
|
|
189
|
+
});
|
|
190
|
+
});
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ChangeDetectionStrategy,
|
|
3
|
+
Component,
|
|
4
|
+
computed,
|
|
5
|
+
ElementRef,
|
|
6
|
+
forwardRef,
|
|
7
|
+
input,
|
|
8
|
+
model,
|
|
9
|
+
output,
|
|
10
|
+
signal,
|
|
11
|
+
viewChild,
|
|
12
|
+
} from '@angular/core';
|
|
13
|
+
import { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
14
|
+
import { cn } from '../core/utils/cn';
|
|
15
|
+
import { tagInputContainerVariants, tagVariants, type TagInputSize } from './tag-input.variants';
|
|
16
|
+
|
|
17
|
+
@Component({
|
|
18
|
+
selector: 'sny-tag-input',
|
|
19
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
20
|
+
providers: [
|
|
21
|
+
{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => SnyTagInputComponent), multi: true },
|
|
22
|
+
],
|
|
23
|
+
template: `
|
|
24
|
+
<div [class]="containerClass()" (click)="focusInput()">
|
|
25
|
+
@for (tag of value(); track tag; let i = $index) {
|
|
26
|
+
<span [class]="tagClass()">
|
|
27
|
+
{{ tag }}
|
|
28
|
+
@if (removable() && !isDisabled()) {
|
|
29
|
+
<button
|
|
30
|
+
type="button"
|
|
31
|
+
class="hover:text-destructive transition-colors leading-none"
|
|
32
|
+
(click)="removeTag(i); $event.stopPropagation()"
|
|
33
|
+
[attr.aria-label]="'Remove ' + tag"
|
|
34
|
+
>
|
|
35
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M18 6 6 18"/><path d="m6 6 12 12"/></svg>
|
|
36
|
+
</button>
|
|
37
|
+
}
|
|
38
|
+
</span>
|
|
39
|
+
}
|
|
40
|
+
@if (!atMax()) {
|
|
41
|
+
<input
|
|
42
|
+
#inputEl
|
|
43
|
+
type="text"
|
|
44
|
+
class="flex-1 min-w-[80px] outline-none bg-transparent"
|
|
45
|
+
[placeholder]="value().length === 0 ? placeholder() : ''"
|
|
46
|
+
[disabled]="isDisabled()"
|
|
47
|
+
[value]="inputValue()"
|
|
48
|
+
(input)="onInput($event)"
|
|
49
|
+
(keydown)="onKeydown($event)"
|
|
50
|
+
(blur)="onBlur()"
|
|
51
|
+
[attr.aria-label]="'Add tag'"
|
|
52
|
+
/>
|
|
53
|
+
}
|
|
54
|
+
</div>
|
|
55
|
+
`,
|
|
56
|
+
})
|
|
57
|
+
export class SnyTagInputComponent implements ControlValueAccessor {
|
|
58
|
+
readonly value = model<string[]>([]);
|
|
59
|
+
readonly placeholder = input('Add tag...');
|
|
60
|
+
readonly maxTags = input<number | null>(null);
|
|
61
|
+
readonly allowDuplicates = input(false);
|
|
62
|
+
readonly removable = input(true);
|
|
63
|
+
readonly addOnBlur = input(true);
|
|
64
|
+
readonly separators = input<string[]>(['Enter', ',']);
|
|
65
|
+
readonly validate = input<((tag: string) => boolean) | null>(null);
|
|
66
|
+
readonly disabled = input(false);
|
|
67
|
+
readonly size = input<TagInputSize>('md');
|
|
68
|
+
readonly class = input<string>('');
|
|
69
|
+
|
|
70
|
+
readonly tagAdded = output<string>();
|
|
71
|
+
readonly tagRemoved = output<string>();
|
|
72
|
+
|
|
73
|
+
readonly inputValue = signal('');
|
|
74
|
+
private readonly _disabledByCva = signal(false);
|
|
75
|
+
readonly isDisabled = computed(() => this.disabled() || this._disabledByCva());
|
|
76
|
+
readonly atMax = computed(() => this.maxTags() !== null && this.value().length >= this.maxTags()!);
|
|
77
|
+
|
|
78
|
+
readonly containerClass = computed(() =>
|
|
79
|
+
cn(tagInputContainerVariants({ size: this.size() }), this.isDisabled() && 'opacity-50 cursor-not-allowed', this.class())
|
|
80
|
+
);
|
|
81
|
+
|
|
82
|
+
readonly tagClass = computed(() =>
|
|
83
|
+
cn(tagVariants({ size: this.size() }), 'bg-secondary text-secondary-foreground')
|
|
84
|
+
);
|
|
85
|
+
|
|
86
|
+
private readonly inputRef = viewChild<ElementRef<HTMLInputElement>>('inputEl');
|
|
87
|
+
|
|
88
|
+
private _onChange: (value: string[]) => void = () => {};
|
|
89
|
+
private _onTouched: () => void = () => {};
|
|
90
|
+
|
|
91
|
+
writeValue(val: string[]): void {
|
|
92
|
+
this.value.set(val ?? []);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
registerOnChange(fn: (value: string[]) => void): void {
|
|
96
|
+
this._onChange = fn;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
registerOnTouched(fn: () => void): void {
|
|
100
|
+
this._onTouched = fn;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
setDisabledState(isDisabled: boolean): void {
|
|
104
|
+
this._disabledByCva.set(isDisabled);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
focusInput(): void {
|
|
108
|
+
this.inputRef()?.nativeElement.focus();
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
onInput(event: Event): void {
|
|
112
|
+
const val = (event.target as HTMLInputElement).value;
|
|
113
|
+
// Check if separator character was typed (e.g. comma)
|
|
114
|
+
const seps = this.separators().filter((s) => s.length === 1);
|
|
115
|
+
for (const sep of seps) {
|
|
116
|
+
if (val.includes(sep)) {
|
|
117
|
+
const parts = val.split(sep);
|
|
118
|
+
for (const part of parts) {
|
|
119
|
+
this.addTag(part);
|
|
120
|
+
}
|
|
121
|
+
this.inputValue.set('');
|
|
122
|
+
return;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
this.inputValue.set(val);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
onKeydown(event: KeyboardEvent): void {
|
|
129
|
+
if (this.separators().includes(event.key) && event.key !== ',') {
|
|
130
|
+
event.preventDefault();
|
|
131
|
+
this.addTag(this.inputValue());
|
|
132
|
+
this.inputValue.set('');
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
if (event.key === 'Backspace' && this.inputValue() === '') {
|
|
137
|
+
const tags = this.value();
|
|
138
|
+
if (tags.length > 0) {
|
|
139
|
+
this.removeTag(tags.length - 1);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
onBlur(): void {
|
|
145
|
+
if (this.addOnBlur() && this.inputValue().trim()) {
|
|
146
|
+
this.addTag(this.inputValue());
|
|
147
|
+
this.inputValue.set('');
|
|
148
|
+
}
|
|
149
|
+
this._onTouched();
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
addTag(raw: string): void {
|
|
153
|
+
const tag = raw.trim();
|
|
154
|
+
if (!tag) return;
|
|
155
|
+
if (this.atMax()) return;
|
|
156
|
+
if (!this.allowDuplicates() && this.value().includes(tag)) return;
|
|
157
|
+
|
|
158
|
+
const validateFn = this.validate();
|
|
159
|
+
if (validateFn && !validateFn(tag)) return;
|
|
160
|
+
|
|
161
|
+
this.value.update((tags) => [...tags, tag]);
|
|
162
|
+
this._onChange(this.value());
|
|
163
|
+
this.tagAdded.emit(tag);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
removeTag(index: number): void {
|
|
167
|
+
const removed = this.value()[index];
|
|
168
|
+
this.value.update((tags) => tags.filter((_, i) => i !== index));
|
|
169
|
+
this._onChange(this.value());
|
|
170
|
+
this.tagRemoved.emit(removed);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { cva } from 'class-variance-authority';
|
|
2
|
+
|
|
3
|
+
export const tagInputContainerVariants = cva(
|
|
4
|
+
'flex flex-wrap gap-1.5 border border-border rounded-md bg-background px-2 cursor-text transition-colors focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2',
|
|
5
|
+
{
|
|
6
|
+
variants: {
|
|
7
|
+
size: {
|
|
8
|
+
sm: 'min-h-[36px] py-1 text-xs',
|
|
9
|
+
md: 'min-h-[40px] py-1.5 text-sm',
|
|
10
|
+
lg: 'min-h-[44px] py-2 text-base',
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
defaultVariants: { size: 'md' },
|
|
14
|
+
}
|
|
15
|
+
);
|
|
16
|
+
|
|
17
|
+
export const tagVariants = cva(
|
|
18
|
+
'inline-flex items-center gap-1 rounded-md font-medium',
|
|
19
|
+
{
|
|
20
|
+
variants: {
|
|
21
|
+
size: {
|
|
22
|
+
sm: 'px-1.5 py-0.5 text-xs',
|
|
23
|
+
md: 'px-2 py-0.5 text-sm',
|
|
24
|
+
lg: 'px-2.5 py-1 text-sm',
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
defaultVariants: { size: 'md' },
|
|
28
|
+
}
|
|
29
|
+
);
|
|
30
|
+
|
|
31
|
+
export type TagInputSize = 'sm' | 'md' | 'lg';
|
|
@@ -8,7 +8,6 @@ export type TimelineMiddleVariant = 'default' | 'primary' | 'success' | 'error';
|
|
|
8
8
|
|
|
9
9
|
@Directive({
|
|
10
10
|
selector: '[snyTimelineItem]',
|
|
11
|
-
standalone: true,
|
|
12
11
|
host: { 'role': 'listitem', '[class]': 'computedClass()' },
|
|
13
12
|
})
|
|
14
13
|
export class SnyTimelineItemDirective {
|
|
@@ -21,7 +20,6 @@ export class SnyTimelineItemDirective {
|
|
|
21
20
|
|
|
22
21
|
@Directive({
|
|
23
22
|
selector: '[snyTimelineStart]',
|
|
24
|
-
standalone: true,
|
|
25
23
|
host: { '[class]': 'computedClass()' },
|
|
26
24
|
})
|
|
27
25
|
export class SnyTimelineStartDirective {
|
|
@@ -33,7 +31,6 @@ export class SnyTimelineStartDirective {
|
|
|
33
31
|
|
|
34
32
|
@Directive({
|
|
35
33
|
selector: '[snyTimelineMiddle]',
|
|
36
|
-
standalone: true,
|
|
37
34
|
host: { '[class]': 'computedClass()', 'aria-hidden': 'true' },
|
|
38
35
|
})
|
|
39
36
|
export class SnyTimelineMiddleDirective {
|
|
@@ -52,7 +49,6 @@ export class SnyTimelineMiddleDirective {
|
|
|
52
49
|
|
|
53
50
|
@Directive({
|
|
54
51
|
selector: '[snyTimelineEnd]',
|
|
55
|
-
standalone: true,
|
|
56
52
|
host: { '[class]': 'computedClass()' },
|
|
57
53
|
})
|
|
58
54
|
export class SnyTimelineEndDirective {
|
|
@@ -64,7 +60,6 @@ export class SnyTimelineEndDirective {
|
|
|
64
60
|
|
|
65
61
|
@Directive({
|
|
66
62
|
selector: '[snyTimeline]',
|
|
67
|
-
standalone: true,
|
|
68
63
|
exportAs: 'snyTimeline',
|
|
69
64
|
providers: [{ provide: SNY_TIMELINE, useExisting: SnyTimelineDirective }],
|
|
70
65
|
host: {
|
|
@@ -5,7 +5,6 @@ import { toggleVariants, type ToggleVariant, type ToggleSize } from './toggle.va
|
|
|
5
5
|
|
|
6
6
|
@Directive({
|
|
7
7
|
selector: 'button[snyToggle]',
|
|
8
|
-
standalone: true,
|
|
9
8
|
providers: [
|
|
10
9
|
{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => SnyToggleDirective), multi: true },
|
|
11
10
|
],
|
|
@@ -6,7 +6,6 @@ export type ValidatorHintVariant = 'error' | 'success' | 'warning' | 'info';
|
|
|
6
6
|
|
|
7
7
|
@Directive({
|
|
8
8
|
selector: '[snyValidator]',
|
|
9
|
-
standalone: true,
|
|
10
9
|
host: { '[class]': 'computedClass()' },
|
|
11
10
|
})
|
|
12
11
|
export class SnyValidatorDirective {
|
|
@@ -27,7 +26,6 @@ export class SnyValidatorDirective {
|
|
|
27
26
|
|
|
28
27
|
@Directive({
|
|
29
28
|
selector: '[snyValidatorHint]',
|
|
30
|
-
standalone: true,
|
|
31
29
|
host: {
|
|
32
30
|
'role': 'alert',
|
|
33
31
|
'[class]': 'computedClass()',
|
package/types/sonny-ui-core.d.ts
CHANGED
|
@@ -1997,6 +1997,151 @@ declare class SnyCommandPaletteService {
|
|
|
1997
1997
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<SnyCommandPaletteService>;
|
|
1998
1998
|
}
|
|
1999
1999
|
|
|
2000
|
+
declare const numberInputVariants: (props?: ({
|
|
2001
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
2002
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
2003
|
+
type NumberInputSize = 'sm' | 'md' | 'lg';
|
|
2004
|
+
|
|
2005
|
+
declare class SnyNumberInputComponent implements ControlValueAccessor {
|
|
2006
|
+
readonly value: _angular_core.ModelSignal<number>;
|
|
2007
|
+
readonly min: _angular_core.InputSignal<number | null>;
|
|
2008
|
+
readonly max: _angular_core.InputSignal<number | null>;
|
|
2009
|
+
readonly step: _angular_core.InputSignal<number>;
|
|
2010
|
+
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
2011
|
+
readonly size: _angular_core.InputSignal<NumberInputSize>;
|
|
2012
|
+
readonly placeholder: _angular_core.InputSignal<string>;
|
|
2013
|
+
readonly class: _angular_core.InputSignal<string>;
|
|
2014
|
+
readonly inputValue: _angular_core.WritableSignal<string>;
|
|
2015
|
+
private readonly _disabledByCva;
|
|
2016
|
+
readonly isDisabled: _angular_core.Signal<boolean>;
|
|
2017
|
+
readonly atMin: _angular_core.Signal<boolean>;
|
|
2018
|
+
readonly atMax: _angular_core.Signal<boolean>;
|
|
2019
|
+
readonly containerClass: _angular_core.Signal<string>;
|
|
2020
|
+
private _onChange;
|
|
2021
|
+
private _onTouched;
|
|
2022
|
+
constructor();
|
|
2023
|
+
writeValue(val: number): void;
|
|
2024
|
+
registerOnChange(fn: (value: number) => void): void;
|
|
2025
|
+
registerOnTouched(fn: () => void): void;
|
|
2026
|
+
setDisabledState(isDisabled: boolean): void;
|
|
2027
|
+
increment(): void;
|
|
2028
|
+
decrement(): void;
|
|
2029
|
+
onInput(event: Event): void;
|
|
2030
|
+
commitValue(): void;
|
|
2031
|
+
onKeydown(event: KeyboardEvent): void;
|
|
2032
|
+
private setValue;
|
|
2033
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SnyNumberInputComponent, never>;
|
|
2034
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SnyNumberInputComponent, "sny-number-input", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "step": { "alias": "step"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "class": { "alias": "class"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; }, never, never, true, never>;
|
|
2035
|
+
}
|
|
2036
|
+
|
|
2037
|
+
interface AvatarGroupItem {
|
|
2038
|
+
src?: string;
|
|
2039
|
+
alt?: string;
|
|
2040
|
+
fallback?: string;
|
|
2041
|
+
}
|
|
2042
|
+
type AvatarGroupSize = 'sm' | 'md' | 'lg';
|
|
2043
|
+
type AvatarGroupSpacing = 'tight' | 'normal';
|
|
2044
|
+
declare class SnyAvatarGroupComponent {
|
|
2045
|
+
readonly items: _angular_core.InputSignal<AvatarGroupItem[]>;
|
|
2046
|
+
readonly max: _angular_core.InputSignal<number>;
|
|
2047
|
+
readonly size: _angular_core.InputSignal<AvatarGroupSize>;
|
|
2048
|
+
readonly spacing: _angular_core.InputSignal<AvatarGroupSpacing>;
|
|
2049
|
+
readonly visibleItems: _angular_core.Signal<AvatarGroupItem[]>;
|
|
2050
|
+
readonly overflowCount: _angular_core.Signal<number>;
|
|
2051
|
+
readonly containerClass: _angular_core.Signal<string>;
|
|
2052
|
+
readonly avatarClass: _angular_core.Signal<string>;
|
|
2053
|
+
readonly fallbackClass: _angular_core.Signal<string>;
|
|
2054
|
+
readonly counterClass: _angular_core.Signal<string>;
|
|
2055
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SnyAvatarGroupComponent, never>;
|
|
2056
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SnyAvatarGroupComponent, "sny-avatar-group", never, { "items": { "alias": "items"; "required": true; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "spacing": { "alias": "spacing"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
2057
|
+
}
|
|
2058
|
+
|
|
2059
|
+
declare const tagInputContainerVariants: (props?: ({
|
|
2060
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
2061
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
2062
|
+
declare const tagVariants: (props?: ({
|
|
2063
|
+
size?: "sm" | "md" | "lg" | null | undefined;
|
|
2064
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
2065
|
+
type TagInputSize = 'sm' | 'md' | 'lg';
|
|
2066
|
+
|
|
2067
|
+
declare class SnyTagInputComponent implements ControlValueAccessor {
|
|
2068
|
+
readonly value: _angular_core.ModelSignal<string[]>;
|
|
2069
|
+
readonly placeholder: _angular_core.InputSignal<string>;
|
|
2070
|
+
readonly maxTags: _angular_core.InputSignal<number | null>;
|
|
2071
|
+
readonly allowDuplicates: _angular_core.InputSignal<boolean>;
|
|
2072
|
+
readonly removable: _angular_core.InputSignal<boolean>;
|
|
2073
|
+
readonly addOnBlur: _angular_core.InputSignal<boolean>;
|
|
2074
|
+
readonly separators: _angular_core.InputSignal<string[]>;
|
|
2075
|
+
readonly validate: _angular_core.InputSignal<((tag: string) => boolean) | null>;
|
|
2076
|
+
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
2077
|
+
readonly size: _angular_core.InputSignal<TagInputSize>;
|
|
2078
|
+
readonly class: _angular_core.InputSignal<string>;
|
|
2079
|
+
readonly tagAdded: _angular_core.OutputEmitterRef<string>;
|
|
2080
|
+
readonly tagRemoved: _angular_core.OutputEmitterRef<string>;
|
|
2081
|
+
readonly inputValue: _angular_core.WritableSignal<string>;
|
|
2082
|
+
private readonly _disabledByCva;
|
|
2083
|
+
readonly isDisabled: _angular_core.Signal<boolean>;
|
|
2084
|
+
readonly atMax: _angular_core.Signal<boolean>;
|
|
2085
|
+
readonly containerClass: _angular_core.Signal<string>;
|
|
2086
|
+
readonly tagClass: _angular_core.Signal<string>;
|
|
2087
|
+
private readonly inputRef;
|
|
2088
|
+
private _onChange;
|
|
2089
|
+
private _onTouched;
|
|
2090
|
+
writeValue(val: string[]): void;
|
|
2091
|
+
registerOnChange(fn: (value: string[]) => void): void;
|
|
2092
|
+
registerOnTouched(fn: () => void): void;
|
|
2093
|
+
setDisabledState(isDisabled: boolean): void;
|
|
2094
|
+
focusInput(): void;
|
|
2095
|
+
onInput(event: Event): void;
|
|
2096
|
+
onKeydown(event: KeyboardEvent): void;
|
|
2097
|
+
onBlur(): void;
|
|
2098
|
+
addTag(raw: string): void;
|
|
2099
|
+
removeTag(index: number): void;
|
|
2100
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SnyTagInputComponent, never>;
|
|
2101
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SnyTagInputComponent, "sny-tag-input", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "maxTags": { "alias": "maxTags"; "required": false; "isSignal": true; }; "allowDuplicates": { "alias": "allowDuplicates"; "required": false; "isSignal": true; }; "removable": { "alias": "removable"; "required": false; "isSignal": true; }; "addOnBlur": { "alias": "addOnBlur"; "required": false; "isSignal": true; }; "separators": { "alias": "separators"; "required": false; "isSignal": true; }; "validate": { "alias": "validate"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "class": { "alias": "class"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "tagAdded": "tagAdded"; "tagRemoved": "tagRemoved"; }, never, never, true, never>;
|
|
2102
|
+
}
|
|
2103
|
+
|
|
2104
|
+
declare const SNY_POPOVER: InjectionToken<SnyPopoverDirective>;
|
|
2105
|
+
declare class SnyPopoverDirective implements OnDestroy {
|
|
2106
|
+
private readonly elRef;
|
|
2107
|
+
readonly matchWidth: _angular_core.InputSignal<boolean>;
|
|
2108
|
+
readonly offset: _angular_core.InputSignal<number>;
|
|
2109
|
+
readonly closeOnOutside: _angular_core.InputSignal<boolean>;
|
|
2110
|
+
readonly closeOnEscape: _angular_core.InputSignal<boolean>;
|
|
2111
|
+
readonly isOpen: _angular_core.WritableSignal<boolean>;
|
|
2112
|
+
readonly triggerEl: _angular_core.WritableSignal<HTMLElement | null>;
|
|
2113
|
+
readonly panelEl: _angular_core.WritableSignal<HTMLElement | null>;
|
|
2114
|
+
private scrollHandler;
|
|
2115
|
+
private resizeHandler;
|
|
2116
|
+
toggle(): void;
|
|
2117
|
+
open(): void;
|
|
2118
|
+
close(): void;
|
|
2119
|
+
updatePosition(): void;
|
|
2120
|
+
private addListeners;
|
|
2121
|
+
private removeListeners;
|
|
2122
|
+
onDocumentClick(event: MouseEvent): void;
|
|
2123
|
+
onEscape(): void;
|
|
2124
|
+
ngOnDestroy(): void;
|
|
2125
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SnyPopoverDirective, never>;
|
|
2126
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<SnyPopoverDirective, "[snyPopover]", ["snyPopover"], { "matchWidth": { "alias": "matchWidth"; "required": false; "isSignal": true; }; "offset": { "alias": "offset"; "required": false; "isSignal": true; }; "closeOnOutside": { "alias": "closeOnOutside"; "required": false; "isSignal": true; }; "closeOnEscape": { "alias": "closeOnEscape"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
2127
|
+
}
|
|
2128
|
+
declare class SnyPopoverTriggerDirective {
|
|
2129
|
+
protected readonly popover: SnyPopoverDirective;
|
|
2130
|
+
private readonly elRef;
|
|
2131
|
+
constructor();
|
|
2132
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SnyPopoverTriggerDirective, never>;
|
|
2133
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<SnyPopoverTriggerDirective, "[snyPopoverTrigger]", never, {}, {}, never, never, true, never>;
|
|
2134
|
+
}
|
|
2135
|
+
declare class SnyPopoverContentDirective {
|
|
2136
|
+
protected readonly popover: SnyPopoverDirective;
|
|
2137
|
+
private readonly elRef;
|
|
2138
|
+
readonly class: _angular_core.InputSignal<string>;
|
|
2139
|
+
protected readonly computedClass: _angular_core.Signal<string>;
|
|
2140
|
+
constructor();
|
|
2141
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SnyPopoverContentDirective, never>;
|
|
2142
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<SnyPopoverContentDirective, "[snyPopoverContent]", never, { "class": { "alias": "class"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
2143
|
+
}
|
|
2144
|
+
|
|
2000
2145
|
type ValidatorHintVariant = 'error' | 'success' | 'warning' | 'info';
|
|
2001
2146
|
declare class SnyValidatorDirective {
|
|
2002
2147
|
readonly control: _angular_core.InputSignal<AbstractControl<any, any, any> | null>;
|
|
@@ -2019,5 +2164,5 @@ declare class SnyValidatorHintDirective {
|
|
|
2019
2164
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<SnyValidatorHintDirective, "[snyValidatorHint]", never, { "when": { "alias": "when"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "class": { "alias": "class"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
2020
2165
|
}
|
|
2021
2166
|
|
|
2022
|
-
export { SNY_ACCORDION, SNY_ACCORDION_ITEM, SNY_CAROUSEL, SNY_CHAT_BUBBLE, SNY_CONFIG, SNY_DIALOG_DATA, SNY_DRAWER, SNY_DROPDOWN, SNY_FAB, SNY_SHEET_DATA, SNY_STEPS, SNY_TABLE, SNY_TABS, SNY_TIMELINE, SnyAccordionContentDirective, SnyAccordionDirective, SnyAccordionItemDirective, SnyAccordionTriggerDirective, SnyAlertDescriptionDirective, SnyAlertDirective, SnyAlertTitleDirective, SnyAvatarComponent, SnyBadgeDirective, SnyBreadcrumbDirective, SnyBreadcrumbItemDirective, SnyBreadcrumbLinkDirective, SnyBreadcrumbListDirective, SnyBreadcrumbPageDirective, SnyBreadcrumbSeparatorDirective, SnyBulkActionsDefDirective, SnyButtonDirective, SnyButtonGroupDirective, SnyCalendarComponent, SnyCardContentDirective, SnyCardDescriptionDirective, SnyCardDirective, SnyCardFooterDirective, SnyCardHeaderDirective, SnyCardTitleDirective, SnyCarouselContentDirective, SnyCarouselDirective, SnyCarouselItemDirective, SnyCarouselNextDirective, SnyCarouselPrevDirective, SnyCellDefDirective, SnyChatBubbleAvatarDirective, SnyChatBubbleBodyDirective, SnyChatBubbleContentDirective, SnyChatBubbleDirective, SnyChatBubbleFooterDirective, SnyChatBubbleHeaderDirective, SnyCheckboxDirective, SnyColorPickerComponent, SnyComboboxComponent, SnyCommandPaletteComponent, SnyCommandPaletteService, SnyDataTableComponent, SnyDatePickerComponent, SnyDateRangePickerComponent, SnyDialogCloseDirective, SnyDialogContentDirective, SnyDialogDescriptionDirective, SnyDialogFooterDirective, SnyDialogHeaderDirective, SnyDialogRef, SnyDialogService, SnyDialogTitleDirective, SnyDiffComponent, SnyDividerComponent, SnyDockDirective, SnyDockItemDirective, SnyDrawerContentDirective, SnyDrawerLayoutComponent, SnyDrawerLayoutDirective, SnyDrawerSideDirective, SnyDropdownContentDirective, SnyDropdownDirective, SnyDropdownTriggerDirective, SnyFabActionDirective, SnyFabDirective, SnyFabTriggerDirective, SnyFieldsetContentDirective, SnyFieldsetDirective, SnyFieldsetLegendDirective, SnyFileInputComponent, SnyHeaderCellDefDirective, SnyIndicatorBadgeDirective, SnyIndicatorDirective, SnyInputDirective, SnyKbdDirective, SnyLabelDirective, SnyLinkDirective, SnyListDirective, SnyListItemActionDirective, SnyListItemContentDirective, SnyListItemDirective, SnyListItemIconDirective, SnyLoaderComponent, SnyMenuContentDirective, SnyMenuItemDirective, SnyMenuLabelDirective, SnyMenuSeparatorDirective, SnyNavbarBrandDirective, SnyNavbarContentDirective, SnyNavbarDirective, SnyNavbarEndDirective, SnyOtpInputComponent, SnyPaginationComponent, SnyProgressComponent, SnyRadialProgressComponent, SnyRadioDirective, SnyRatingComponent, SnyRowExpandDefDirective, SnySelectComponent, SnySheetCloseDirective, SnySheetContentDirective, SnySheetDescriptionDirective, SnySheetHeaderDirective, SnySheetRef, SnySheetService, SnySheetTitleDirective, SnySkeletonDirective, SnySliderComponent, SnyStatDescriptionDirective, SnyStatDirective, SnyStatFigureDirective, SnyStatTitleDirective, SnyStatValueDirective, SnyStatusDirective, SnyStepDirective, SnyStepsDirective, SnySwitchComponent, SnyTableBodyDirective, SnyTableCaptionDirective, SnyTableCellDirective, SnyTableDirective, SnyTableFooterDirective, SnyTableHeadDirective, SnyTableHeaderDirective, SnyTableRowDirective, SnyTabsContentDirective, SnyTabsDirective, SnyTabsListDirective, SnyTabsTriggerDirective, SnyTextareaDirective, SnyTimelineDirective, SnyTimelineEndDirective, SnyTimelineItemDirective, SnyTimelineMiddleDirective, SnyTimelineStartDirective, SnyToastService, SnyToasterComponent, SnyToggleDirective, SnyTooltipDirective, SnyValidatorDirective, SnyValidatorHintDirective, ThemeService, alertVariants, avatarVariants, badgeVariants, buttonGroupVariants, buttonVariants, cardVariants, checkboxVariants, cn, colorPickerTriggerVariants, comboboxTriggerVariants, datePickerTriggerVariants, dividerVariants, dropdownContentVariants, dropdownItemVariants, fieldsetVariants, fileInputVariants, formatColor, hexToRgb, hslToRgb, hsvToRgb, inputVariants, isValidColor, kbdVariants, labelVariants, linkVariants, loaderVariants, otpCellVariants, paginationItemVariants, parseColor, progressBarVariants, progressTrackVariants, provideSonnyUI, radioVariants, ratingVariants, rgbToHex, rgbToHsl, rgbToHsv, selectTriggerVariants, skeletonVariants, sliderTrackVariants, statusVariants, switchTrackVariants, tableCellVariants, tableVariants, tabsListVariants, tabsTriggerVariants, textareaVariants, toastVariants, toggleVariants, tooltipVariants };
|
|
2023
|
-
export type { AlertVariant, AvatarSize, AvatarVariant, BadgeSize, BadgeVariant, ButtonGroupOrientation, ButtonSize, ButtonVariant, CalendarDay, CalendarMode, CardPadding, CardVariant, ChatBubbleAlign, ChatBubbleContentVariant, CheckboxSize, ColorFormat, ColorPickerPreset, ColorPickerSize, ComboboxOption, ComboboxSize, Command, CommandGroup, CommandPaletteConfig, DataTableColumn, DataTablePaginationConfig, DatePickerPreset, DatePickerSize, DateRange, DividerOrientation, DividerVariant, DockPosition, DrawerSide, DropdownItemVariant, FabDirection, FabPosition, FieldsetVariant, FileInputSize, FileInputVariant, HSL, HSV, IndicatorPosition, IndicatorVariant, InputSize, InputVariant, KbdSize, LinkVariant, ListVariant, LoaderSize, LoaderVariant, NavbarVariant, OtpInputSize, OtpInputType, PaginationSize, PaginationVariant, ProgressSize, ProgressVariant, RGB, RadialProgressSize, RadialProgressVariant, RadioSize, RatingSize, RatingVariant, SelectOption, SelectSize, SheetSide, SkeletonSize, SkeletonVariant, SliderSize, SnyDialogConfig, SnySheetConfig, SonnyConfig, SortDirection, SortState, StatDescriptionVariant, StatusSize, StatusVariant, StepStatus, StepsOrientation, StepsSize, SwitchSize, TableDensity, TableVariant, TextareaResize, TextareaSize, TextareaVariant, Theme, TimelineConnect, TimelineMiddleVariant, TimelineOrientation, ToastAction, ToastConfig, ToastData, ToastPosition, ToastVariant, ToggleSize, ToggleVariant, TooltipPosition, ValidatorHintVariant };
|
|
2167
|
+
export { SNY_ACCORDION, SNY_ACCORDION_ITEM, SNY_CAROUSEL, SNY_CHAT_BUBBLE, SNY_CONFIG, SNY_DIALOG_DATA, SNY_DRAWER, SNY_DROPDOWN, SNY_FAB, SNY_POPOVER, SNY_SHEET_DATA, SNY_STEPS, SNY_TABLE, SNY_TABS, SNY_TIMELINE, SnyAccordionContentDirective, SnyAccordionDirective, SnyAccordionItemDirective, SnyAccordionTriggerDirective, SnyAlertDescriptionDirective, SnyAlertDirective, SnyAlertTitleDirective, SnyAvatarComponent, SnyAvatarGroupComponent, SnyBadgeDirective, SnyBreadcrumbDirective, SnyBreadcrumbItemDirective, SnyBreadcrumbLinkDirective, SnyBreadcrumbListDirective, SnyBreadcrumbPageDirective, SnyBreadcrumbSeparatorDirective, SnyBulkActionsDefDirective, SnyButtonDirective, SnyButtonGroupDirective, SnyCalendarComponent, SnyCardContentDirective, SnyCardDescriptionDirective, SnyCardDirective, SnyCardFooterDirective, SnyCardHeaderDirective, SnyCardTitleDirective, SnyCarouselContentDirective, SnyCarouselDirective, SnyCarouselItemDirective, SnyCarouselNextDirective, SnyCarouselPrevDirective, SnyCellDefDirective, SnyChatBubbleAvatarDirective, SnyChatBubbleBodyDirective, SnyChatBubbleContentDirective, SnyChatBubbleDirective, SnyChatBubbleFooterDirective, SnyChatBubbleHeaderDirective, SnyCheckboxDirective, SnyColorPickerComponent, SnyComboboxComponent, SnyCommandPaletteComponent, SnyCommandPaletteService, SnyDataTableComponent, SnyDatePickerComponent, SnyDateRangePickerComponent, SnyDialogCloseDirective, SnyDialogContentDirective, SnyDialogDescriptionDirective, SnyDialogFooterDirective, SnyDialogHeaderDirective, SnyDialogRef, SnyDialogService, SnyDialogTitleDirective, SnyDiffComponent, SnyDividerComponent, SnyDockDirective, SnyDockItemDirective, SnyDrawerContentDirective, SnyDrawerLayoutComponent, SnyDrawerLayoutDirective, SnyDrawerSideDirective, SnyDropdownContentDirective, SnyDropdownDirective, SnyDropdownTriggerDirective, SnyFabActionDirective, SnyFabDirective, SnyFabTriggerDirective, SnyFieldsetContentDirective, SnyFieldsetDirective, SnyFieldsetLegendDirective, SnyFileInputComponent, SnyHeaderCellDefDirective, SnyIndicatorBadgeDirective, SnyIndicatorDirective, SnyInputDirective, SnyKbdDirective, SnyLabelDirective, SnyLinkDirective, SnyListDirective, SnyListItemActionDirective, SnyListItemContentDirective, SnyListItemDirective, SnyListItemIconDirective, SnyLoaderComponent, SnyMenuContentDirective, SnyMenuItemDirective, SnyMenuLabelDirective, SnyMenuSeparatorDirective, SnyNavbarBrandDirective, SnyNavbarContentDirective, SnyNavbarDirective, SnyNavbarEndDirective, SnyNumberInputComponent, SnyOtpInputComponent, SnyPaginationComponent, SnyPopoverContentDirective, SnyPopoverDirective, SnyPopoverTriggerDirective, SnyProgressComponent, SnyRadialProgressComponent, SnyRadioDirective, SnyRatingComponent, SnyRowExpandDefDirective, SnySelectComponent, SnySheetCloseDirective, SnySheetContentDirective, SnySheetDescriptionDirective, SnySheetHeaderDirective, SnySheetRef, SnySheetService, SnySheetTitleDirective, SnySkeletonDirective, SnySliderComponent, SnyStatDescriptionDirective, SnyStatDirective, SnyStatFigureDirective, SnyStatTitleDirective, SnyStatValueDirective, SnyStatusDirective, SnyStepDirective, SnyStepsDirective, SnySwitchComponent, SnyTableBodyDirective, SnyTableCaptionDirective, SnyTableCellDirective, SnyTableDirective, SnyTableFooterDirective, SnyTableHeadDirective, SnyTableHeaderDirective, SnyTableRowDirective, SnyTabsContentDirective, SnyTabsDirective, SnyTabsListDirective, SnyTabsTriggerDirective, SnyTagInputComponent, SnyTextareaDirective, SnyTimelineDirective, SnyTimelineEndDirective, SnyTimelineItemDirective, SnyTimelineMiddleDirective, SnyTimelineStartDirective, SnyToastService, SnyToasterComponent, SnyToggleDirective, SnyTooltipDirective, SnyValidatorDirective, SnyValidatorHintDirective, ThemeService, alertVariants, avatarVariants, badgeVariants, buttonGroupVariants, buttonVariants, cardVariants, checkboxVariants, cn, colorPickerTriggerVariants, comboboxTriggerVariants, datePickerTriggerVariants, dividerVariants, dropdownContentVariants, dropdownItemVariants, fieldsetVariants, fileInputVariants, formatColor, hexToRgb, hslToRgb, hsvToRgb, inputVariants, isValidColor, kbdVariants, labelVariants, linkVariants, loaderVariants, numberInputVariants, otpCellVariants, paginationItemVariants, parseColor, progressBarVariants, progressTrackVariants, provideSonnyUI, radioVariants, ratingVariants, rgbToHex, rgbToHsl, rgbToHsv, selectTriggerVariants, skeletonVariants, sliderTrackVariants, statusVariants, switchTrackVariants, tableCellVariants, tableVariants, tabsListVariants, tabsTriggerVariants, tagInputContainerVariants, tagVariants, textareaVariants, toastVariants, toggleVariants, tooltipVariants };
|
|
2168
|
+
export type { AlertVariant, AvatarGroupItem, AvatarGroupSize, AvatarGroupSpacing, AvatarSize, AvatarVariant, BadgeSize, BadgeVariant, ButtonGroupOrientation, ButtonSize, ButtonVariant, CalendarDay, CalendarMode, CardPadding, CardVariant, ChatBubbleAlign, ChatBubbleContentVariant, CheckboxSize, ColorFormat, ColorPickerPreset, ColorPickerSize, ComboboxOption, ComboboxSize, Command, CommandGroup, CommandPaletteConfig, DataTableColumn, DataTablePaginationConfig, DatePickerPreset, DatePickerSize, DateRange, DividerOrientation, DividerVariant, DockPosition, DrawerSide, DropdownItemVariant, FabDirection, FabPosition, FieldsetVariant, FileInputSize, FileInputVariant, HSL, HSV, IndicatorPosition, IndicatorVariant, InputSize, InputVariant, KbdSize, LinkVariant, ListVariant, LoaderSize, LoaderVariant, NavbarVariant, NumberInputSize, OtpInputSize, OtpInputType, PaginationSize, PaginationVariant, ProgressSize, ProgressVariant, RGB, RadialProgressSize, RadialProgressVariant, RadioSize, RatingSize, RatingVariant, SelectOption, SelectSize, SheetSide, SkeletonSize, SkeletonVariant, SliderSize, SnyDialogConfig, SnySheetConfig, SonnyConfig, SortDirection, SortState, StatDescriptionVariant, StatusSize, StatusVariant, StepStatus, StepsOrientation, StepsSize, SwitchSize, TableDensity, TableVariant, TagInputSize, TextareaResize, TextareaSize, TextareaVariant, Theme, TimelineConnect, TimelineMiddleVariant, TimelineOrientation, ToastAction, ToastConfig, ToastData, ToastPosition, ToastVariant, ToggleSize, ToggleVariant, TooltipPosition, ValidatorHintVariant };
|