ngx-com 0.0.19 → 0.0.21
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/fesm2022/ngx-com-components-alert.mjs +346 -0
- package/fesm2022/ngx-com-components-alert.mjs.map +1 -0
- package/fesm2022/ngx-com-components-button.mjs +1 -1
- package/fesm2022/ngx-com-components-button.mjs.map +1 -1
- package/fesm2022/ngx-com-components-calendar.mjs +29 -36
- package/fesm2022/ngx-com-components-calendar.mjs.map +1 -1
- package/fesm2022/ngx-com-components-card.mjs +1 -1
- package/fesm2022/ngx-com-components-card.mjs.map +1 -1
- package/fesm2022/ngx-com-components-carousel.mjs +708 -0
- package/fesm2022/ngx-com-components-carousel.mjs.map +1 -0
- package/fesm2022/ngx-com-components-checkbox.mjs +17 -8
- package/fesm2022/ngx-com-components-checkbox.mjs.map +1 -1
- package/fesm2022/ngx-com-components-code-block.mjs +158 -0
- package/fesm2022/ngx-com-components-code-block.mjs.map +1 -0
- package/fesm2022/ngx-com-components-collapsible.mjs +1 -1
- package/fesm2022/ngx-com-components-collapsible.mjs.map +1 -1
- package/fesm2022/ngx-com-components-confirm.mjs +3 -3
- package/fesm2022/ngx-com-components-confirm.mjs.map +1 -1
- package/fesm2022/ngx-com-components-dialog.mjs +703 -0
- package/fesm2022/ngx-com-components-dialog.mjs.map +1 -0
- package/fesm2022/ngx-com-components-dropdown.mjs +36 -31
- package/fesm2022/ngx-com-components-dropdown.mjs.map +1 -1
- package/fesm2022/ngx-com-components-form-field.mjs +48 -8
- package/fesm2022/ngx-com-components-form-field.mjs.map +1 -1
- package/fesm2022/ngx-com-components-item.mjs +1 -1
- package/fesm2022/ngx-com-components-item.mjs.map +1 -1
- package/fesm2022/ngx-com-components-paginator.mjs +3 -3
- package/fesm2022/ngx-com-components-paginator.mjs.map +1 -1
- package/fesm2022/ngx-com-components-radio.mjs +16 -9
- package/fesm2022/ngx-com-components-radio.mjs.map +1 -1
- package/fesm2022/ngx-com-components-segmented-control.mjs +1 -1
- package/fesm2022/ngx-com-components-segmented-control.mjs.map +1 -1
- package/fesm2022/ngx-com-components-separator.mjs +102 -0
- package/fesm2022/ngx-com-components-separator.mjs.map +1 -0
- package/fesm2022/ngx-com-components-switch.mjs +258 -0
- package/fesm2022/ngx-com-components-switch.mjs.map +1 -0
- package/fesm2022/ngx-com-components-table.mjs +631 -0
- package/fesm2022/ngx-com-components-table.mjs.map +1 -0
- package/fesm2022/ngx-com-components-tabs.mjs +2 -2
- package/fesm2022/ngx-com-components-tabs.mjs.map +1 -1
- package/fesm2022/ngx-com-components-toast.mjs +783 -0
- package/fesm2022/ngx-com-components-toast.mjs.map +1 -0
- package/package.json +33 -1
- package/types/ngx-com-components-alert.d.ts +166 -0
- package/types/ngx-com-components-carousel.d.ts +281 -0
- package/types/ngx-com-components-checkbox.d.ts +7 -2
- package/types/ngx-com-components-code-block.d.ts +66 -0
- package/types/ngx-com-components-confirm.d.ts +2 -2
- package/types/ngx-com-components-dialog.d.ts +264 -0
- package/types/ngx-com-components-dropdown.d.ts +8 -5
- package/types/ngx-com-components-form-field.d.ts +19 -3
- package/types/ngx-com-components-radio.d.ts +5 -3
- package/types/ngx-com-components-separator.d.ts +75 -0
- package/types/ngx-com-components-switch.d.ts +110 -0
- package/types/ngx-com-components-table.d.ts +377 -0
- package/types/ngx-com-components-toast.d.ts +217 -0
|
@@ -85,8 +85,12 @@ declare class ComCheckbox implements ControlValueAccessor {
|
|
|
85
85
|
readonly checked: ModelSignal<boolean>;
|
|
86
86
|
readonly indeterminate: ModelSignal<boolean>;
|
|
87
87
|
readonly disabled: ModelSignal<boolean>;
|
|
88
|
-
readonly
|
|
88
|
+
readonly htmlValue: InputSignal<string | undefined>;
|
|
89
89
|
readonly name: InputSignal<string | undefined>;
|
|
90
|
+
readonly touched: ModelSignal<boolean>;
|
|
91
|
+
readonly invalid: InputSignal<boolean>;
|
|
92
|
+
readonly sfErrors: InputSignal<readonly unknown[]>;
|
|
93
|
+
readonly sfRequired: InputSignal<boolean>;
|
|
90
94
|
readonly id: InputSignal<string | undefined>;
|
|
91
95
|
readonly ariaLabel: InputSignal<string | null>;
|
|
92
96
|
readonly ariaLabelledby: InputSignal<string | null>;
|
|
@@ -103,13 +107,14 @@ declare class ComCheckbox implements ControlValueAccessor {
|
|
|
103
107
|
registerOnChange(fn: (value: boolean) => void): void;
|
|
104
108
|
registerOnTouched(fn: () => void): void;
|
|
105
109
|
setDisabledState(isDisabled: boolean): void;
|
|
110
|
+
protected onBlur(): void;
|
|
106
111
|
protected onInputChange(event: Event): void;
|
|
107
112
|
/** Focuses this checkbox's input element. */
|
|
108
113
|
focus(): void;
|
|
109
114
|
/** Toggles the checkbox state programmatically. */
|
|
110
115
|
toggle(): void;
|
|
111
116
|
static ɵfac: i0.ɵɵFactoryDeclaration<ComCheckbox, never>;
|
|
112
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ComCheckbox, "com-checkbox", ["comCheckbox"], { "size": { "alias": "size"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "checked": { "alias": "checked"; "required": false; "isSignal": true; }; "indeterminate": { "alias": "indeterminate"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "
|
|
117
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ComCheckbox, "com-checkbox", ["comCheckbox"], { "size": { "alias": "size"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "checked": { "alias": "checked"; "required": false; "isSignal": true; }; "indeterminate": { "alias": "indeterminate"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "htmlValue": { "alias": "value"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "touched": { "alias": "touched"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "sfErrors": { "alias": "errors"; "required": false; "isSignal": true; }; "sfRequired": { "alias": "required"; "required": false; "isSignal": true; }; "id": { "alias": "id"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; "ariaLabelledby": { "alias": "aria-labelledby"; "required": false; "isSignal": true; }; "ariaDescribedby": { "alias": "aria-describedby"; "required": false; "isSignal": true; }; }, { "checked": "checkedChange"; "indeterminate": "indeterminateChange"; "disabled": "disabledChange"; "touched": "touchedChange"; "changed": "changed"; }, never, ["*"], true, never>;
|
|
113
118
|
}
|
|
114
119
|
|
|
115
120
|
export { CHECKBOX_ICON_SIZES, CHECKBOX_LABEL_SIZES, ComCheckbox, checkboxBoxVariants };
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { InputSignal, OutputEmitterRef, WritableSignal, Signal } from '@angular/core';
|
|
3
|
+
import { VariantProps } from 'class-variance-authority';
|
|
4
|
+
|
|
5
|
+
type CodeBlockVariant = 'filled' | 'outlined';
|
|
6
|
+
/**
|
|
7
|
+
* CVA variants for the code block container.
|
|
8
|
+
*
|
|
9
|
+
* @tokens `--color-muted`, `--color-foreground`,
|
|
10
|
+
* `--color-border`, `--color-border-subtle`,
|
|
11
|
+
* `--radius-card`, `--font-mono`
|
|
12
|
+
*/
|
|
13
|
+
declare const codeBlockVariants: (props?: {
|
|
14
|
+
variant?: CodeBlockVariant;
|
|
15
|
+
}) => string;
|
|
16
|
+
type CodeBlockVariants = VariantProps<typeof codeBlockVariants>;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Code block component for displaying code snippets with a language label
|
|
20
|
+
* and copy-to-clipboard functionality.
|
|
21
|
+
*
|
|
22
|
+
* Renders plain monospace text in a styled container — no syntax highlighting.
|
|
23
|
+
* The header bar shows an optional language label and a copy button that
|
|
24
|
+
* provides visual feedback (checkmark icon for 2 seconds) after copying.
|
|
25
|
+
*
|
|
26
|
+
* @tokens `--color-muted`, `--color-muted-foreground`, `--color-muted-hover`,
|
|
27
|
+
* `--color-foreground`, `--color-border`, `--color-border-subtle`,
|
|
28
|
+
* `--color-ring`, `--color-success`,
|
|
29
|
+
* `--font-mono`, `--radius-card`
|
|
30
|
+
*
|
|
31
|
+
* @example Basic usage with language label
|
|
32
|
+
* ```html
|
|
33
|
+
* <com-code-block code="const x = 42;" language="TypeScript" />
|
|
34
|
+
* ```
|
|
35
|
+
*
|
|
36
|
+
* @example Outlined variant
|
|
37
|
+
* ```html
|
|
38
|
+
* <com-code-block [code]="htmlSnippet" language="HTML" variant="outlined" />
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
declare class ComCodeBlockComponent {
|
|
42
|
+
/** The raw code string to display. */
|
|
43
|
+
readonly code: InputSignal<string>;
|
|
44
|
+
/** Language label shown in the header (e.g. 'TypeScript', 'HTML'). */
|
|
45
|
+
readonly language: InputSignal<string | undefined>;
|
|
46
|
+
/** Visual variant. */
|
|
47
|
+
readonly variant: InputSignal<CodeBlockVariant>;
|
|
48
|
+
/** Consumer CSS classes — merged with variant classes. */
|
|
49
|
+
readonly userClass: InputSignal<string>;
|
|
50
|
+
/** Emitted when code is successfully copied to clipboard. */
|
|
51
|
+
readonly copied: OutputEmitterRef<void>;
|
|
52
|
+
/** @internal Tracks copy feedback state. */
|
|
53
|
+
protected readonly isCopied: WritableSignal<boolean>;
|
|
54
|
+
/** @internal Computed host element classes. */
|
|
55
|
+
protected readonly hostClasses: Signal<string>;
|
|
56
|
+
private readonly clipboard;
|
|
57
|
+
private readonly destroyRef;
|
|
58
|
+
private copyTimeoutId;
|
|
59
|
+
/** Copies the code to clipboard and shows feedback for 2 seconds. */
|
|
60
|
+
protected copyToClipboard(): void;
|
|
61
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ComCodeBlockComponent, never>;
|
|
62
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ComCodeBlockComponent, "com-code-block", ["comCodeBlock"], { "code": { "alias": "code"; "required": true; "isSignal": true; }; "language": { "alias": "language"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "userClass": { "alias": "class"; "required": false; "isSignal": true; }; }, { "copied": "copied"; }, never, never, true, never>;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export { ComCodeBlockComponent, codeBlockVariants };
|
|
66
|
+
export type { CodeBlockVariant, CodeBlockVariants };
|
|
@@ -31,7 +31,7 @@ interface ConfirmTemplateContext {
|
|
|
31
31
|
* and emits `true` (confirmed) or `false` (cancelled) through its output.
|
|
32
32
|
*
|
|
33
33
|
* @tokens `--color-popover`, `--color-popover-foreground`, `--color-border`,
|
|
34
|
-
* `--color-foreground`, `--color-muted-foreground`, `--color-
|
|
34
|
+
* `--color-foreground`, `--color-muted-foreground`, `--color-backdrop`,
|
|
35
35
|
* `--shadow-lg`, `--radius-popover`
|
|
36
36
|
*
|
|
37
37
|
* @example Basic confirmation
|
|
@@ -126,7 +126,7 @@ declare class ComConfirm {
|
|
|
126
126
|
/**
|
|
127
127
|
* CVA variants for the confirmation panel backdrop.
|
|
128
128
|
*
|
|
129
|
-
* @tokens `--color-
|
|
129
|
+
* @tokens `--color-backdrop`
|
|
130
130
|
*/
|
|
131
131
|
declare const confirmBackdropVariants: (props?: {
|
|
132
132
|
visible?: boolean;
|
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import { OverlayRef } from '@angular/cdk/overlay';
|
|
3
|
+
import * as i0 from '@angular/core';
|
|
4
|
+
import { TemplateRef, OnInit, WritableSignal, InputSignal, InjectionToken, Provider } from '@angular/core';
|
|
5
|
+
import { ComponentType } from '@angular/cdk/portal';
|
|
6
|
+
import { VariantProps } from 'class-variance-authority';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Reference to an open dialog instance.
|
|
10
|
+
* Returned by `ComDialog.open()` for programmatic control.
|
|
11
|
+
*/
|
|
12
|
+
declare class ComDialogRef<R = unknown> {
|
|
13
|
+
private readonly afterClosedSubject;
|
|
14
|
+
private readonly backdropClickSubject;
|
|
15
|
+
private closed;
|
|
16
|
+
/** @internal */
|
|
17
|
+
_overlayRef: OverlayRef | null;
|
|
18
|
+
/** @internal */
|
|
19
|
+
_closeFn: ((result?: R) => void) | null;
|
|
20
|
+
/**
|
|
21
|
+
* Close the dialog, optionally passing a result value.
|
|
22
|
+
*/
|
|
23
|
+
close(result?: R): void;
|
|
24
|
+
/**
|
|
25
|
+
* Emits the result once after the dialog is fully closed and disposed.
|
|
26
|
+
*/
|
|
27
|
+
afterClosed(): Observable<R | undefined>;
|
|
28
|
+
/**
|
|
29
|
+
* Emits each time the backdrop is clicked.
|
|
30
|
+
*/
|
|
31
|
+
backdropClick(): Observable<MouseEvent>;
|
|
32
|
+
/**
|
|
33
|
+
* Proxies keydown events from the overlay.
|
|
34
|
+
*/
|
|
35
|
+
keydownEvents(): Observable<KeyboardEvent>;
|
|
36
|
+
/** @internal Called by the service after exit animation completes. */
|
|
37
|
+
_notifyClosed(result?: R): void;
|
|
38
|
+
/** @internal Forward backdrop click from overlay. */
|
|
39
|
+
_notifyBackdropClick(event: MouseEvent): void;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/** Available dialog size variants. */
|
|
43
|
+
type ComDialogSize = 'sm' | 'md' | 'lg' | 'xl' | 'full';
|
|
44
|
+
/** Configuration for opening a dialog. */
|
|
45
|
+
interface ComDialogConfig<D = unknown> {
|
|
46
|
+
/** Data to inject via COM_DIALOG_DATA. */
|
|
47
|
+
data?: D;
|
|
48
|
+
/** Dialog panel width variant. */
|
|
49
|
+
size?: ComDialogSize;
|
|
50
|
+
/** Prevent Escape and backdrop click from closing. */
|
|
51
|
+
disableClose?: boolean;
|
|
52
|
+
/** Show backdrop overlay. */
|
|
53
|
+
hasBackdrop?: boolean;
|
|
54
|
+
/** Additional CSS class on the backdrop. */
|
|
55
|
+
backdropClass?: string;
|
|
56
|
+
/** Additional CSS class on the container panel. */
|
|
57
|
+
panelClass?: string;
|
|
58
|
+
/** Where to send focus on open. */
|
|
59
|
+
autoFocus?: 'first-tabbable' | 'dialog' | false;
|
|
60
|
+
/** Return focus to trigger element on close. */
|
|
61
|
+
restoreFocus?: boolean;
|
|
62
|
+
/** Fallback aria-label if no comDialogTitle is projected. */
|
|
63
|
+
ariaLabel?: string;
|
|
64
|
+
}
|
|
65
|
+
/** Content that can be opened in a dialog. */
|
|
66
|
+
type ComDialogContent$1<T = unknown> = ComponentType<T> | TemplateRef<T>;
|
|
67
|
+
/** Template context when opening a TemplateRef dialog. */
|
|
68
|
+
interface ComDialogTemplateContext<R = unknown, D = unknown> {
|
|
69
|
+
$implicit: ComDialogRef<R>;
|
|
70
|
+
data: D;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Service for opening dialog modals imperatively.
|
|
75
|
+
*
|
|
76
|
+
* @example
|
|
77
|
+
* ```typescript
|
|
78
|
+
* const dialog = inject(ComDialog);
|
|
79
|
+
*
|
|
80
|
+
* // Open a component
|
|
81
|
+
* const ref = dialog.open<boolean>(ConfirmComponent, { data: { id: 123 } });
|
|
82
|
+
* ref.afterClosed().subscribe(result => {
|
|
83
|
+
* if (result) performAction();
|
|
84
|
+
* });
|
|
85
|
+
*
|
|
86
|
+
* // Open a template
|
|
87
|
+
* dialog.open(templateRef, { size: 'sm' });
|
|
88
|
+
* ```
|
|
89
|
+
*/
|
|
90
|
+
declare class ComDialog {
|
|
91
|
+
private readonly overlay;
|
|
92
|
+
private readonly injector;
|
|
93
|
+
private readonly destroyRef;
|
|
94
|
+
private readonly platformId;
|
|
95
|
+
private readonly document;
|
|
96
|
+
private readonly globalConfig;
|
|
97
|
+
private readonly openDialogs;
|
|
98
|
+
/**
|
|
99
|
+
* Open a dialog with the given component or template.
|
|
100
|
+
*
|
|
101
|
+
* @param content - The component class or TemplateRef to render inside the dialog.
|
|
102
|
+
* @param config - Optional dialog configuration.
|
|
103
|
+
* @returns A reference to the opened dialog.
|
|
104
|
+
*/
|
|
105
|
+
open<R = unknown, D = unknown>(content: ComDialogContent$1, config?: ComDialogConfig<D>): ComDialogRef<R>;
|
|
106
|
+
/** Close all open dialogs. */
|
|
107
|
+
closeAll(): void;
|
|
108
|
+
/** Number of currently open dialogs. */
|
|
109
|
+
get openDialogCount(): number;
|
|
110
|
+
private resolveConfig;
|
|
111
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ComDialog, never>;
|
|
112
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ComDialog>;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Marks an element as the dialog title. Sets up aria-labelledby
|
|
117
|
+
* binding on the dialog container.
|
|
118
|
+
*
|
|
119
|
+
* @example
|
|
120
|
+
* ```html
|
|
121
|
+
* <h2 comDialogTitle>Delete item</h2>
|
|
122
|
+
* ```
|
|
123
|
+
*
|
|
124
|
+
* @tokens `--color-foreground`
|
|
125
|
+
*/
|
|
126
|
+
declare class ComDialogTitle implements OnInit {
|
|
127
|
+
private readonly containerRef;
|
|
128
|
+
/** Unique ID for aria-labelledby binding. */
|
|
129
|
+
readonly id: WritableSignal<string>;
|
|
130
|
+
/** Computed CSS classes. */
|
|
131
|
+
readonly classes: WritableSignal<string>;
|
|
132
|
+
ngOnInit(): void;
|
|
133
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ComDialogTitle, never>;
|
|
134
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ComDialogTitle, "[comDialogTitle]", ["comDialogTitle"], {}, {}, never, never, true, never>;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* Marks an element as the dialog content area. Sets up aria-describedby
|
|
139
|
+
* binding on the dialog container.
|
|
140
|
+
*
|
|
141
|
+
* @example
|
|
142
|
+
* ```html
|
|
143
|
+
* <div comDialogContent>
|
|
144
|
+
* <p>Are you sure you want to delete this item?</p>
|
|
145
|
+
* </div>
|
|
146
|
+
* ```
|
|
147
|
+
*
|
|
148
|
+
* @tokens `--color-muted-foreground`
|
|
149
|
+
*/
|
|
150
|
+
declare class ComDialogContent implements OnInit {
|
|
151
|
+
private readonly containerRef;
|
|
152
|
+
/** Unique ID for aria-describedby binding. */
|
|
153
|
+
readonly id: WritableSignal<string>;
|
|
154
|
+
/** Computed CSS classes. */
|
|
155
|
+
readonly classes: WritableSignal<string>;
|
|
156
|
+
ngOnInit(): void;
|
|
157
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ComDialogContent, never>;
|
|
158
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ComDialogContent, "[comDialogContent]", ["comDialogContent"], {}, {}, never, never, true, never>;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* Marks an element as the dialog actions area (footer with buttons).
|
|
163
|
+
*
|
|
164
|
+
* @example
|
|
165
|
+
* ```html
|
|
166
|
+
* <div comDialogActions>
|
|
167
|
+
* <button comButton variant="outline" [comDialogClose]="false">Cancel</button>
|
|
168
|
+
* <button comButton [comDialogClose]="true">Confirm</button>
|
|
169
|
+
* </div>
|
|
170
|
+
* ```
|
|
171
|
+
*/
|
|
172
|
+
declare class ComDialogActions {
|
|
173
|
+
/** Computed CSS classes. */
|
|
174
|
+
readonly classes: WritableSignal<string>;
|
|
175
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ComDialogActions, never>;
|
|
176
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ComDialogActions, "[comDialogActions]", ["comDialogActions"], {}, {}, never, never, true, never>;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* Closes the nearest dialog when the host element is clicked.
|
|
181
|
+
* Optionally passes a result value.
|
|
182
|
+
*
|
|
183
|
+
* @example
|
|
184
|
+
* ```html
|
|
185
|
+
* <button comButton [comDialogClose]="false">Cancel</button>
|
|
186
|
+
* <button comButton [comDialogClose]="true">Confirm</button>
|
|
187
|
+
* ```
|
|
188
|
+
*/
|
|
189
|
+
declare class ComDialogClose {
|
|
190
|
+
private readonly dialogRef;
|
|
191
|
+
/** The result value to pass when closing the dialog. */
|
|
192
|
+
readonly comDialogClose: InputSignal<unknown>;
|
|
193
|
+
protected onClick(): void;
|
|
194
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ComDialogClose, never>;
|
|
195
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ComDialogClose, "[comDialogClose]", ["comDialogClose"], { "comDialogClose": { "alias": "comDialogClose"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* Injection token for data passed to a dialog component.
|
|
200
|
+
*
|
|
201
|
+
* @example
|
|
202
|
+
* ```typescript
|
|
203
|
+
* readonly data = inject<MyData>(COM_DIALOG_DATA);
|
|
204
|
+
* ```
|
|
205
|
+
*/
|
|
206
|
+
declare const COM_DIALOG_DATA: InjectionToken<unknown>;
|
|
207
|
+
/**
|
|
208
|
+
* Injection token for global dialog configuration defaults.
|
|
209
|
+
* @internal
|
|
210
|
+
*/
|
|
211
|
+
declare const COM_DIALOG_CONFIG: InjectionToken<ComDialogConfig>;
|
|
212
|
+
/**
|
|
213
|
+
* Provides global dialog configuration defaults.
|
|
214
|
+
*
|
|
215
|
+
* @example
|
|
216
|
+
* ```typescript
|
|
217
|
+
* bootstrapApplication(AppComponent, {
|
|
218
|
+
* providers: [
|
|
219
|
+
* provideComDialogConfig({ size: 'lg', hasBackdrop: true }),
|
|
220
|
+
* ],
|
|
221
|
+
* });
|
|
222
|
+
* ```
|
|
223
|
+
*/
|
|
224
|
+
declare function provideComDialogConfig(config: ComDialogConfig): Provider;
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* CVA variants for the dialog backdrop.
|
|
228
|
+
*
|
|
229
|
+
* @tokens `--color-backdrop`
|
|
230
|
+
*/
|
|
231
|
+
declare const dialogBackdropVariants: (props?: {
|
|
232
|
+
visible?: boolean;
|
|
233
|
+
}) => string;
|
|
234
|
+
/**
|
|
235
|
+
* CVA variants for the dialog panel container.
|
|
236
|
+
*
|
|
237
|
+
* @tokens `--color-popover`, `--color-popover-foreground`, `--color-border`,
|
|
238
|
+
* `--shadow-xl`, `--radius-overlay`
|
|
239
|
+
*/
|
|
240
|
+
declare const dialogPanelVariants: (props?: {
|
|
241
|
+
size?: 'sm' | 'md' | 'lg' | 'xl' | 'full';
|
|
242
|
+
visible?: boolean;
|
|
243
|
+
}) => string;
|
|
244
|
+
/** Type helper for dialog panel variant props. */
|
|
245
|
+
type DialogPanelVariantProps = VariantProps<typeof dialogPanelVariants>;
|
|
246
|
+
/**
|
|
247
|
+
* CVA variants for the dialog title.
|
|
248
|
+
*
|
|
249
|
+
* @tokens `--color-foreground`
|
|
250
|
+
*/
|
|
251
|
+
declare const dialogTitleVariants: () => string;
|
|
252
|
+
/**
|
|
253
|
+
* CVA variants for the dialog content area.
|
|
254
|
+
*
|
|
255
|
+
* @tokens `--color-muted-foreground`
|
|
256
|
+
*/
|
|
257
|
+
declare const dialogContentVariants: () => string;
|
|
258
|
+
/**
|
|
259
|
+
* CVA variants for the dialog actions area.
|
|
260
|
+
*/
|
|
261
|
+
declare const dialogActionsVariants: () => string;
|
|
262
|
+
|
|
263
|
+
export { COM_DIALOG_CONFIG, COM_DIALOG_DATA, ComDialog, ComDialogActions, ComDialogClose, ComDialogContent, ComDialogRef, ComDialogTitle, dialogActionsVariants, dialogBackdropVariants, dialogContentVariants, dialogPanelVariants, dialogTitleVariants, provideComDialogConfig };
|
|
264
|
+
export type { ComDialogConfig, ComDialogSize, ComDialogTemplateContext, DialogPanelVariantProps };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { TemplateRef, Signal, InputSignal, OutputEmitterRef, WritableSignal, OnInit } from '@angular/core';
|
|
2
|
+
import { TemplateRef, Signal, InputSignal, ModelSignal, OutputEmitterRef, WritableSignal, OnInit } from '@angular/core';
|
|
3
3
|
import { ControlValueAccessor, NgControl } from '@angular/forms';
|
|
4
4
|
import { FormFieldControl, ErrorStateMatcher, FormFieldAppearance } from 'ngx-com/components/form-field';
|
|
5
5
|
import { VariantProps } from 'class-variance-authority';
|
|
@@ -473,7 +473,7 @@ declare class ComDropdown<T> implements ControlValueAccessor, FormFieldControl<T
|
|
|
473
473
|
/** Array of options to display. */
|
|
474
474
|
readonly options: InputSignal<T[]>;
|
|
475
475
|
/** Current value (single or array for multiple). */
|
|
476
|
-
readonly value:
|
|
476
|
+
readonly value: ModelSignal<T | T[] | null>;
|
|
477
477
|
/** Placeholder text when no value is selected. */
|
|
478
478
|
readonly placeholder: InputSignal<string>;
|
|
479
479
|
/** Enable multi-select mode. */
|
|
@@ -518,8 +518,9 @@ declare class ComDropdown<T> implements ControlValueAccessor, FormFieldControl<T
|
|
|
518
518
|
readonly maxVisibleTags: InputSignal<number | null>;
|
|
519
519
|
/** Custom error state matcher for determining when to show errors. */
|
|
520
520
|
readonly errorStateMatcher: InputSignal<ErrorStateMatcher | undefined>;
|
|
521
|
-
|
|
522
|
-
readonly
|
|
521
|
+
readonly touched: ModelSignal<boolean>;
|
|
522
|
+
readonly invalid: InputSignal<boolean>;
|
|
523
|
+
readonly sfErrors: InputSignal<readonly unknown[]>;
|
|
523
524
|
/** Emitted when search query changes. */
|
|
524
525
|
readonly searchChange: OutputEmitterRef<string>;
|
|
525
526
|
/** Emitted when panel opens. */
|
|
@@ -556,6 +557,8 @@ declare class ComDropdown<T> implements ControlValueAccessor, FormFieldControl<T
|
|
|
556
557
|
readonly shouldLabelFloat: Signal<boolean>;
|
|
557
558
|
/** Whether the control is in an error state. Implements FormFieldControl. */
|
|
558
559
|
readonly errorState: Signal<boolean>;
|
|
560
|
+
/** Structured validation errors from Signal Forms, exposed for the parent form field. */
|
|
561
|
+
readonly errors: Signal<readonly unknown[] | null>;
|
|
559
562
|
/** Unique ID for the control. Implements FormFieldControl. */
|
|
560
563
|
readonly id: Signal<string>;
|
|
561
564
|
/**
|
|
@@ -659,7 +662,7 @@ declare class ComDropdown<T> implements ControlValueAccessor, FormFieldControl<T
|
|
|
659
662
|
private typeAhead;
|
|
660
663
|
private announce;
|
|
661
664
|
static ɵfac: i0.ɵɵFactoryDeclaration<ComDropdown<any>, never>;
|
|
662
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ComDropdown<any>, "com-dropdown", ["comDropdown"], { "options": { "alias": "options"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "multiple": { "alias": "multiple"; "required": false; "isSignal": true; }; "searchable": { "alias": "searchable"; "required": false; "isSignal": true; }; "searchPlaceholder": { "alias": "searchPlaceholder"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "clearable": { "alias": "clearable"; "required": false; "isSignal": true; }; "compareWith": { "alias": "compareWith"; "required": false; "isSignal": true; }; "displayWith": { "alias": "displayWith"; "required": false; "isSignal": true; }; "filterWith": { "alias": "filterWith"; "required": false; "isSignal": true; }; "groupBy": { "alias": "groupBy"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "state": { "alias": "state"; "required": false; "isSignal": true; }; "userClass": { "alias": "class"; "required": false; "isSignal": true; }; "panelClass": { "alias": "panelClass"; "required": false; "isSignal": true; }; "maxHeight": { "alias": "maxHeight"; "required": false; "isSignal": true; }; "panelWidth": { "alias": "panelWidth"; "required": false; "isSignal": true; }; "searchDebounceMs": { "alias": "searchDebounceMs"; "required": false; "isSignal": true; }; "virtualScrollThreshold": { "alias": "virtualScrollThreshold"; "required": false; "isSignal": true; }; "maxVisibleTags": { "alias": "maxVisibleTags"; "required": false; "isSignal": true; }; "errorStateMatcher": { "alias": "errorStateMatcher"; "required": false; "isSignal": true; }; }, { "
|
|
665
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ComDropdown<any>, "com-dropdown", ["comDropdown"], { "options": { "alias": "options"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "multiple": { "alias": "multiple"; "required": false; "isSignal": true; }; "searchable": { "alias": "searchable"; "required": false; "isSignal": true; }; "searchPlaceholder": { "alias": "searchPlaceholder"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "clearable": { "alias": "clearable"; "required": false; "isSignal": true; }; "compareWith": { "alias": "compareWith"; "required": false; "isSignal": true; }; "displayWith": { "alias": "displayWith"; "required": false; "isSignal": true; }; "filterWith": { "alias": "filterWith"; "required": false; "isSignal": true; }; "groupBy": { "alias": "groupBy"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "state": { "alias": "state"; "required": false; "isSignal": true; }; "userClass": { "alias": "class"; "required": false; "isSignal": true; }; "panelClass": { "alias": "panelClass"; "required": false; "isSignal": true; }; "maxHeight": { "alias": "maxHeight"; "required": false; "isSignal": true; }; "panelWidth": { "alias": "panelWidth"; "required": false; "isSignal": true; }; "searchDebounceMs": { "alias": "searchDebounceMs"; "required": false; "isSignal": true; }; "virtualScrollThreshold": { "alias": "virtualScrollThreshold"; "required": false; "isSignal": true; }; "maxVisibleTags": { "alias": "maxVisibleTags"; "required": false; "isSignal": true; }; "errorStateMatcher": { "alias": "errorStateMatcher"; "required": false; "isSignal": true; }; "touched": { "alias": "touched"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "sfErrors": { "alias": "errors"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "touched": "touchedChange"; "searchChange": "searchChange"; "opened": "opened"; "closed": "closed"; }, ["optionTemplate", "selectedTemplate", "emptyTemplate", "groupTemplate", "tagTemplate"], never, true, never>;
|
|
663
666
|
}
|
|
664
667
|
|
|
665
668
|
/**
|
|
@@ -35,6 +35,8 @@ declare abstract class FormFieldControl<T = unknown> {
|
|
|
35
35
|
abstract readonly errorState: Signal<boolean>;
|
|
36
36
|
/** Unique ID for the control element. */
|
|
37
37
|
abstract readonly id: Signal<string>;
|
|
38
|
+
/** Structured validation errors (Signal Forms path). */
|
|
39
|
+
readonly errors?: Signal<readonly unknown[] | null>;
|
|
38
40
|
/** Called when the form field container is clicked. */
|
|
39
41
|
abstract onContainerClick(event: MouseEvent): void;
|
|
40
42
|
}
|
|
@@ -131,8 +133,10 @@ declare class ComHint {
|
|
|
131
133
|
*/
|
|
132
134
|
declare class ComError {
|
|
133
135
|
readonly id: string;
|
|
134
|
-
/** Reference to the form control
|
|
136
|
+
/** Reference to the form control (Reactive Forms path). */
|
|
135
137
|
private readonly _control;
|
|
138
|
+
/** Structured errors from Signal Forms. */
|
|
139
|
+
private readonly _signalErrors;
|
|
136
140
|
/**
|
|
137
141
|
* Show this error only when a specific validation error key is present.
|
|
138
142
|
* If empty, the error is always shown when the control is in error state.
|
|
@@ -145,10 +149,15 @@ declare class ComError {
|
|
|
145
149
|
*/
|
|
146
150
|
readonly shouldShow: Signal<boolean>;
|
|
147
151
|
/**
|
|
148
|
-
* Sets the form control reference.
|
|
152
|
+
* Sets the form control reference (Reactive Forms).
|
|
149
153
|
* Called by the parent form field component.
|
|
150
154
|
*/
|
|
151
155
|
setControl(control: AbstractControl | null): void;
|
|
156
|
+
/**
|
|
157
|
+
* Sets structured validation errors (Signal Forms).
|
|
158
|
+
* Called by the parent form field component.
|
|
159
|
+
*/
|
|
160
|
+
setSignalErrors(errors: readonly unknown[]): void;
|
|
152
161
|
static ɵfac: i0.ɵɵFactoryDeclaration<ComError, never>;
|
|
153
162
|
static ɵdir: i0.ɵɵDirectiveDeclaration<ComError, "[comError]", ["comError"], { "match": { "alias": "match"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
154
163
|
}
|
|
@@ -414,6 +423,11 @@ declare class ComInput implements FormFieldControl<string>, OnInit, DoCheck {
|
|
|
414
423
|
readonly inputRequired: InputSignalWithTransform<boolean, unknown>;
|
|
415
424
|
readonly userAriaDescribedBy: InputSignal<string>;
|
|
416
425
|
readonly errorStateMatcher: InputSignal<ErrorStateMatcher | undefined>;
|
|
426
|
+
readonly sfInvalid: InputSignal<boolean>;
|
|
427
|
+
readonly sfTouched: InputSignalWithTransform<boolean, unknown>;
|
|
428
|
+
readonly sfErrors: InputSignal<readonly unknown[]>;
|
|
429
|
+
/** Whether the form system is Signal Forms (no NgControl present). */
|
|
430
|
+
private readonly isSignalForms;
|
|
417
431
|
private readonly _focused;
|
|
418
432
|
private readonly _autofilled;
|
|
419
433
|
private readonly _empty;
|
|
@@ -426,6 +440,8 @@ declare class ComInput implements FormFieldControl<string>, OnInit, DoCheck {
|
|
|
426
440
|
readonly disabled: Signal<boolean>;
|
|
427
441
|
readonly required: Signal<boolean>;
|
|
428
442
|
readonly errorState: Signal<boolean>;
|
|
443
|
+
/** Structured validation errors from Signal Forms, exposed for the parent form field. */
|
|
444
|
+
readonly errors: Signal<readonly unknown[] | null>;
|
|
429
445
|
/** Combined aria-describedby including user-provided and form-field-generated IDs. */
|
|
430
446
|
private readonly _describedByIds;
|
|
431
447
|
readonly ariaDescribedBy: Signal<string>;
|
|
@@ -452,7 +468,7 @@ declare class ComInput implements FormFieldControl<string>, OnInit, DoCheck {
|
|
|
452
468
|
/** Focus the native element. */
|
|
453
469
|
focus(): void;
|
|
454
470
|
static ɵfac: i0.ɵɵFactoryDeclaration<ComInput, never>;
|
|
455
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<ComInput, "input[comInput], textarea[comInput]", ["comInput"], { "inputId": { "alias": "id"; "required": false; "isSignal": true; }; "inputDisabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "inputRequired": { "alias": "required"; "required": false; "isSignal": true; }; "userAriaDescribedBy": { "alias": "aria-describedby"; "required": false; "isSignal": true; }; "errorStateMatcher": { "alias": "errorStateMatcher"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
471
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ComInput, "input[comInput], textarea[comInput]", ["comInput"], { "inputId": { "alias": "id"; "required": false; "isSignal": true; }; "inputDisabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "inputRequired": { "alias": "required"; "required": false; "isSignal": true; }; "userAriaDescribedBy": { "alias": "aria-describedby"; "required": false; "isSignal": true; }; "errorStateMatcher": { "alias": "errorStateMatcher"; "required": false; "isSignal": true; }; "sfInvalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "sfTouched": { "alias": "touched"; "required": false; "isSignal": true; }; "sfErrors": { "alias": "errors"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
456
472
|
}
|
|
457
473
|
|
|
458
474
|
/**
|
|
@@ -130,8 +130,10 @@ declare class ComRadioGroup implements ControlValueAccessor {
|
|
|
130
130
|
readonly variant: InputSignal<RadioVariant>;
|
|
131
131
|
readonly errorMessage: InputSignal<string>;
|
|
132
132
|
readonly errorStateMatcher: InputSignal<ErrorStateMatcher | undefined>;
|
|
133
|
-
/**
|
|
134
|
-
|
|
133
|
+
/** Tracks touched state — writable by both CVA callback and Signal Forms [formField]. */
|
|
134
|
+
readonly touched: ModelSignal<boolean>;
|
|
135
|
+
readonly invalid: InputSignal<boolean>;
|
|
136
|
+
readonly sfErrors: InputSignal<readonly unknown[]>;
|
|
135
137
|
readonly ariaLabel: InputSignal<string | null>;
|
|
136
138
|
readonly ariaLabelledby: InputSignal<string | null>;
|
|
137
139
|
readonly ariaDescribedby: InputSignal<string | null>;
|
|
@@ -169,7 +171,7 @@ declare class ComRadioGroup implements ControlValueAccessor {
|
|
|
169
171
|
/** Focuses the previous non-disabled radio (with cyclic wrap). */
|
|
170
172
|
focusPrevious(currentValue: string): void;
|
|
171
173
|
static ɵfac: i0.ɵɵFactoryDeclaration<ComRadioGroup, never>;
|
|
172
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ComRadioGroup, "com-radio-group", ["comRadioGroup"], { "name": { "alias": "name"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "errorMessage": { "alias": "errorMessage"; "required": false; "isSignal": true; }; "errorStateMatcher": { "alias": "errorStateMatcher"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; "ariaLabelledby": { "alias": "aria-labelledby"; "required": false; "isSignal": true; }; "ariaDescribedby": { "alias": "aria-describedby"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "disabled": "disabledChange"; "selectionChange": "selectionChange"; }, never, ["*"], true, never>;
|
|
174
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ComRadioGroup, "com-radio-group", ["comRadioGroup"], { "name": { "alias": "name"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "errorMessage": { "alias": "errorMessage"; "required": false; "isSignal": true; }; "errorStateMatcher": { "alias": "errorStateMatcher"; "required": false; "isSignal": true; }; "touched": { "alias": "touched"; "required": false; "isSignal": true; }; "invalid": { "alias": "invalid"; "required": false; "isSignal": true; }; "sfErrors": { "alias": "errors"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; "ariaLabelledby": { "alias": "aria-labelledby"; "required": false; "isSignal": true; }; "ariaDescribedby": { "alias": "aria-describedby"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "disabled": "disabledChange"; "touched": "touchedChange"; "selectionChange": "selectionChange"; }, never, ["*"], true, never>;
|
|
173
175
|
}
|
|
174
176
|
|
|
175
177
|
/** Event emitted when a radio is selected. */
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { InputSignal, InputSignalWithTransform, Signal } from '@angular/core';
|
|
3
|
+
import { VariantProps } from 'class-variance-authority';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Orientation type for separator direction.
|
|
7
|
+
*/
|
|
8
|
+
type SeparatorOrientation = 'horizontal' | 'vertical';
|
|
9
|
+
/**
|
|
10
|
+
* Variant type for separator appearance.
|
|
11
|
+
*/
|
|
12
|
+
type SeparatorVariant = 'default' | 'subtle';
|
|
13
|
+
/**
|
|
14
|
+
* CVA variants for the separator directive.
|
|
15
|
+
*
|
|
16
|
+
* @tokens `--color-border`, `--color-border-subtle`
|
|
17
|
+
*/
|
|
18
|
+
declare const separatorVariants: (props?: {
|
|
19
|
+
orientation?: SeparatorOrientation;
|
|
20
|
+
variant?: SeparatorVariant;
|
|
21
|
+
}) => string;
|
|
22
|
+
type SeparatorVariants = VariantProps<typeof separatorVariants>;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Separator directive — applies a visual divider to any host element.
|
|
26
|
+
*
|
|
27
|
+
* Works on `<hr>`, `<div>`, or any other element. Supports horizontal and
|
|
28
|
+
* vertical orientations, a subtle color variant, and a decorative mode that
|
|
29
|
+
* hides the separator from assistive technology.
|
|
30
|
+
*
|
|
31
|
+
* @tokens `--color-border`, `--color-border-subtle`
|
|
32
|
+
*
|
|
33
|
+
* @example Horizontal divider
|
|
34
|
+
* ```html
|
|
35
|
+
* <hr comSeparator />
|
|
36
|
+
* ```
|
|
37
|
+
*
|
|
38
|
+
* @example Vertical divider
|
|
39
|
+
* ```html
|
|
40
|
+
* <div comSeparator orientation="vertical" class="h-6"></div>
|
|
41
|
+
* ```
|
|
42
|
+
*
|
|
43
|
+
* @example Subtle variant
|
|
44
|
+
* ```html
|
|
45
|
+
* <hr comSeparator variant="subtle" />
|
|
46
|
+
* ```
|
|
47
|
+
*
|
|
48
|
+
* @example Decorative (hidden from screen readers)
|
|
49
|
+
* ```html
|
|
50
|
+
* <hr comSeparator decorative />
|
|
51
|
+
* ```
|
|
52
|
+
*/
|
|
53
|
+
declare class ComSeparator {
|
|
54
|
+
/** Direction of the separator line */
|
|
55
|
+
readonly orientation: InputSignal<SeparatorOrientation>;
|
|
56
|
+
/** Color intensity — `default` uses border-border, `subtle` uses border-border-subtle */
|
|
57
|
+
readonly variant: InputSignal<SeparatorVariant>;
|
|
58
|
+
/** When true, hides the separator from assistive technology */
|
|
59
|
+
readonly decorative: InputSignalWithTransform<boolean, unknown>;
|
|
60
|
+
/** Consumer CSS classes — merged with variant classes via mergeClasses() */
|
|
61
|
+
readonly userClass: InputSignal<string>;
|
|
62
|
+
/** @internal Computed host class from CVA + consumer overrides */
|
|
63
|
+
protected readonly computedClass: Signal<string>;
|
|
64
|
+
/** @internal Role attribute — separator when semantic, none when decorative */
|
|
65
|
+
protected readonly computedRole: Signal<string>;
|
|
66
|
+
/** @internal Aria-orientation — set only when not decorative */
|
|
67
|
+
protected readonly computedAriaOrientation: Signal<string | null>;
|
|
68
|
+
/** @internal Aria-hidden — true only when decorative */
|
|
69
|
+
protected readonly computedAriaHidden: Signal<'true' | null>;
|
|
70
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ComSeparator, never>;
|
|
71
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ComSeparator, "[comSeparator]", ["comSeparator"], { "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "decorative": { "alias": "decorative"; "required": false; "isSignal": true; }; "userClass": { "alias": "class"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export { ComSeparator, separatorVariants };
|
|
75
|
+
export type { SeparatorOrientation, SeparatorVariant, SeparatorVariants };
|