@tolle_/tolle-ui 0.0.29-beta → 0.0.30-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.
- package/esm2022/lib/calendar.component.mjs +2 -5
- package/esm2022/lib/date-picker.component.mjs +1 -1
- package/esm2022/lib/segment.component.mjs +192 -0
- package/esm2022/public-api.mjs +2 -1
- package/fesm2022/tolle-ui.mjs +189 -6
- package/fesm2022/tolle-ui.mjs.map +1 -1
- package/lib/button.component.d.ts +2 -2
- package/lib/segment.component.d.ts +38 -0
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { type VariantProps } from 'class-variance-authority';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
declare const buttonVariants: (props?: ({
|
|
4
|
-
variant?: "
|
|
5
|
-
size?: "
|
|
4
|
+
variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
|
|
5
|
+
size?: "default" | "xs" | "sm" | "lg" | "icon-xs" | "icon-sm" | "icon" | "icon-lg" | null | undefined;
|
|
6
6
|
busy?: boolean | null | undefined;
|
|
7
7
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
8
|
export type ButtonProps = VariantProps<typeof buttonVariants>;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { ElementRef, QueryList, AfterViewInit, ChangeDetectorRef, OnChanges, SimpleChanges, TemplateRef } from '@angular/core';
|
|
2
|
+
import { ControlValueAccessor } from '@angular/forms';
|
|
3
|
+
import { cn } from './utils/cn';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export type SegmentItem = {
|
|
6
|
+
label: string;
|
|
7
|
+
value: any;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
icon?: string;
|
|
10
|
+
class?: string;
|
|
11
|
+
data?: any;
|
|
12
|
+
};
|
|
13
|
+
export declare class SegmentedComponent implements ControlValueAccessor, AfterViewInit, OnChanges {
|
|
14
|
+
private cdr;
|
|
15
|
+
items: SegmentItem[];
|
|
16
|
+
class: string;
|
|
17
|
+
disabled: boolean;
|
|
18
|
+
itemTemplate?: TemplateRef<any>;
|
|
19
|
+
value: any;
|
|
20
|
+
gliderLeft: number;
|
|
21
|
+
gliderWidth: number;
|
|
22
|
+
hasValue: boolean;
|
|
23
|
+
itemElements: QueryList<ElementRef<HTMLElement>>;
|
|
24
|
+
onChange: any;
|
|
25
|
+
onTouched: any;
|
|
26
|
+
constructor(cdr: ChangeDetectorRef);
|
|
27
|
+
ngAfterViewInit(): void;
|
|
28
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
29
|
+
select(val: any): void;
|
|
30
|
+
updateGlider(): void;
|
|
31
|
+
writeValue(val: any): void;
|
|
32
|
+
registerOnChange(fn: any): void;
|
|
33
|
+
registerOnTouched(fn: any): void;
|
|
34
|
+
setDisabledState(isDisabled: boolean): void;
|
|
35
|
+
protected cn: typeof cn;
|
|
36
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SegmentedComponent, never>;
|
|
37
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SegmentedComponent, "tolle-segment", never, { "items": { "alias": "items"; "required": false; }; "class": { "alias": "class"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "itemTemplate": { "alias": "itemTemplate"; "required": false; }; }, {}, never, never, true, never>;
|
|
38
|
+
}
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED