ngx-com 0.0.1 → 0.0.4
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-avatar.mjs +772 -0
- package/fesm2022/ngx-com-components-avatar.mjs.map +1 -0
- package/fesm2022/ngx-com-components-badge.mjs +138 -0
- package/fesm2022/ngx-com-components-badge.mjs.map +1 -0
- package/fesm2022/ngx-com-components-button.mjs +146 -0
- package/fesm2022/ngx-com-components-button.mjs.map +1 -0
- package/fesm2022/ngx-com-components-calendar.mjs +5046 -0
- package/fesm2022/ngx-com-components-calendar.mjs.map +1 -0
- package/fesm2022/ngx-com-components-card.mjs +590 -0
- package/fesm2022/ngx-com-components-card.mjs.map +1 -0
- package/fesm2022/ngx-com-components-checkbox.mjs +344 -0
- package/fesm2022/ngx-com-components-checkbox.mjs.map +1 -0
- package/fesm2022/ngx-com-components-collapsible.mjs +612 -0
- package/fesm2022/ngx-com-components-collapsible.mjs.map +1 -0
- package/fesm2022/ngx-com-components-confirm.mjs +562 -0
- package/fesm2022/ngx-com-components-confirm.mjs.map +1 -0
- package/fesm2022/ngx-com-components-dropdown-testing.mjs +255 -0
- package/fesm2022/ngx-com-components-dropdown-testing.mjs.map +1 -0
- package/fesm2022/ngx-com-components-dropdown.mjs +2692 -0
- package/fesm2022/ngx-com-components-dropdown.mjs.map +1 -0
- package/fesm2022/ngx-com-components-empty-state.mjs +382 -0
- package/fesm2022/ngx-com-components-empty-state.mjs.map +1 -0
- package/fesm2022/ngx-com-components-form-field.mjs +924 -0
- package/fesm2022/ngx-com-components-form-field.mjs.map +1 -0
- package/fesm2022/ngx-com-components-icon.mjs +183 -0
- package/fesm2022/ngx-com-components-icon.mjs.map +1 -0
- package/fesm2022/ngx-com-components-item.mjs +578 -0
- package/fesm2022/ngx-com-components-item.mjs.map +1 -0
- package/fesm2022/ngx-com-components-menu.mjs +1200 -0
- package/fesm2022/ngx-com-components-menu.mjs.map +1 -0
- package/fesm2022/ngx-com-components-paginator.mjs +823 -0
- package/fesm2022/ngx-com-components-paginator.mjs.map +1 -0
- package/fesm2022/ngx-com-components-popover.mjs +901 -0
- package/fesm2022/ngx-com-components-popover.mjs.map +1 -0
- package/fesm2022/ngx-com-components-radio.mjs +621 -0
- package/fesm2022/ngx-com-components-radio.mjs.map +1 -0
- package/fesm2022/ngx-com-components-segmented-control.mjs +538 -0
- package/fesm2022/ngx-com-components-segmented-control.mjs.map +1 -0
- package/fesm2022/ngx-com-components-sort.mjs +368 -0
- package/fesm2022/ngx-com-components-sort.mjs.map +1 -0
- package/fesm2022/ngx-com-components-spinner.mjs +189 -0
- package/fesm2022/ngx-com-components-spinner.mjs.map +1 -0
- package/fesm2022/ngx-com-components-tabs.mjs +1522 -0
- package/fesm2022/ngx-com-components-tabs.mjs.map +1 -0
- package/fesm2022/ngx-com-components-tooltip.mjs +625 -0
- package/fesm2022/ngx-com-components-tooltip.mjs.map +1 -0
- package/fesm2022/ngx-com-components.mjs +17 -0
- package/fesm2022/ngx-com-components.mjs.map +1 -0
- package/fesm2022/ngx-com-tokens.mjs +12 -0
- package/fesm2022/ngx-com-tokens.mjs.map +1 -0
- package/fesm2022/ngx-com-utils.mjs +601 -0
- package/fesm2022/ngx-com-utils.mjs.map +1 -0
- package/fesm2022/ngx-com.mjs +9 -23
- package/fesm2022/ngx-com.mjs.map +1 -1
- package/package.json +105 -1
- package/types/ngx-com-components-avatar.d.ts +409 -0
- package/types/ngx-com-components-badge.d.ts +97 -0
- package/types/ngx-com-components-button.d.ts +69 -0
- package/types/ngx-com-components-calendar.d.ts +1665 -0
- package/types/ngx-com-components-card.d.ts +373 -0
- package/types/ngx-com-components-checkbox.d.ts +116 -0
- package/types/ngx-com-components-collapsible.d.ts +379 -0
- package/types/ngx-com-components-confirm.d.ts +160 -0
- package/types/ngx-com-components-dropdown-testing.d.ts +116 -0
- package/types/ngx-com-components-dropdown.d.ts +938 -0
- package/types/ngx-com-components-empty-state.d.ts +269 -0
- package/types/ngx-com-components-form-field.d.ts +531 -0
- package/types/ngx-com-components-icon.d.ts +94 -0
- package/types/ngx-com-components-item.d.ts +336 -0
- package/types/ngx-com-components-menu.d.ts +479 -0
- package/types/ngx-com-components-paginator.d.ts +265 -0
- package/types/ngx-com-components-popover.d.ts +309 -0
- package/types/ngx-com-components-radio.d.ts +258 -0
- package/types/ngx-com-components-segmented-control.d.ts +274 -0
- package/types/ngx-com-components-sort.d.ts +133 -0
- package/types/ngx-com-components-spinner.d.ts +120 -0
- package/types/ngx-com-components-tabs.d.ts +396 -0
- package/types/ngx-com-components-tooltip.d.ts +200 -0
- package/types/ngx-com-components.d.ts +12 -0
- package/types/ngx-com-tokens.d.ts +7 -0
- package/types/ngx-com-utils.d.ts +424 -0
- package/types/ngx-com.d.ts +10 -7
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { InjectionToken, Signal, InputSignal, ModelSignal, InputSignalWithTransform, OutputEmitterRef, OnInit, ElementRef } from '@angular/core';
|
|
3
|
+
import { ControlValueAccessor, NgControl } from '@angular/forms';
|
|
4
|
+
import { ErrorStateMatcher } from 'ngx-com/components/form-field';
|
|
5
|
+
|
|
6
|
+
/** Radio size variants. */
|
|
7
|
+
type RadioSize = 'sm' | 'md' | 'lg';
|
|
8
|
+
/** Radio color variants. */
|
|
9
|
+
type RadioVariant = 'primary' | 'accent' | 'warn';
|
|
10
|
+
/** Radio group orientation. */
|
|
11
|
+
type RadioOrientation = 'vertical' | 'horizontal';
|
|
12
|
+
/**
|
|
13
|
+
* CVA variants for the visual radio circle.
|
|
14
|
+
*
|
|
15
|
+
* Uses `peer` selectors to style based on native input state:
|
|
16
|
+
* - `peer-checked:` for checked state
|
|
17
|
+
* - `peer-focus-visible:` for keyboard focus
|
|
18
|
+
* - `peer-disabled:` for disabled state
|
|
19
|
+
*
|
|
20
|
+
* @tokens `--color-border`, `--color-primary`, `--color-primary-hover`,
|
|
21
|
+
* `--color-accent`, `--color-accent-hover`,
|
|
22
|
+
* `--color-warn`, `--color-warn-hover`,
|
|
23
|
+
* `--color-disabled`, `--color-ring`
|
|
24
|
+
*/
|
|
25
|
+
declare const radioCircleVariants: (props?: {
|
|
26
|
+
variant?: RadioVariant;
|
|
27
|
+
size?: RadioSize;
|
|
28
|
+
}) => string;
|
|
29
|
+
/** Size-based classes for the inner dot indicator. */
|
|
30
|
+
declare const RADIO_DOT_SIZES: Record<RadioSize, string>;
|
|
31
|
+
/** Size-based classes for the label content. */
|
|
32
|
+
declare const RADIO_LABEL_SIZES: Record<RadioSize, string>;
|
|
33
|
+
/** Orientation-based classes for the radio group container. */
|
|
34
|
+
declare const RADIO_GROUP_ORIENTATIONS: Record<RadioOrientation, string>;
|
|
35
|
+
|
|
36
|
+
/** Event emitted when radio group value changes. */
|
|
37
|
+
interface RadioGroupChange {
|
|
38
|
+
value: string | null;
|
|
39
|
+
}
|
|
40
|
+
/** Interface for radio items that register with the group. */
|
|
41
|
+
interface RadioItem {
|
|
42
|
+
value: () => string;
|
|
43
|
+
isDisabled: () => boolean;
|
|
44
|
+
focus: () => void;
|
|
45
|
+
}
|
|
46
|
+
/** Context provided to child radio components via DI. */
|
|
47
|
+
interface ComRadioGroupContext {
|
|
48
|
+
name: Signal<string>;
|
|
49
|
+
value: Signal<string | null>;
|
|
50
|
+
disabled: Signal<boolean>;
|
|
51
|
+
size: Signal<RadioSize>;
|
|
52
|
+
variant: Signal<RadioVariant>;
|
|
53
|
+
orientation: Signal<RadioOrientation>;
|
|
54
|
+
focusedValue: Signal<string | null>;
|
|
55
|
+
select: (value: string) => void;
|
|
56
|
+
focusNext: (currentValue: string) => void;
|
|
57
|
+
focusPrevious: (currentValue: string) => void;
|
|
58
|
+
register: (radio: RadioItem) => void;
|
|
59
|
+
unregister: (radio: RadioItem) => void;
|
|
60
|
+
onTouched?: () => void;
|
|
61
|
+
}
|
|
62
|
+
/** Injection token for radio group context. */
|
|
63
|
+
declare const COM_RADIO_GROUP: InjectionToken<ComRadioGroupContext>;
|
|
64
|
+
/**
|
|
65
|
+
* Radio group component that manages a set of radio buttons.
|
|
66
|
+
*
|
|
67
|
+
* Provides mutual exclusion, shared name, and roving tabindex keyboard navigation.
|
|
68
|
+
* Implements `ControlValueAccessor` for Reactive Forms integration.
|
|
69
|
+
*
|
|
70
|
+
* @tokens `--color-border`, `--color-primary`, `--color-primary-foreground`, `--color-primary-hover`,
|
|
71
|
+
* `--color-accent`, `--color-accent-foreground`, `--color-accent-hover`,
|
|
72
|
+
* `--color-warn`, `--color-warn-foreground`, `--color-warn-hover`,
|
|
73
|
+
* `--color-disabled`, `--color-disabled-foreground`, `--color-ring`
|
|
74
|
+
*
|
|
75
|
+
* @example Basic usage
|
|
76
|
+
* ```html
|
|
77
|
+
* <com-radio-group [(value)]="selectedFruit" aria-label="Select a fruit">
|
|
78
|
+
* <com-radio value="apple">Apple</com-radio>
|
|
79
|
+
* <com-radio value="banana">Banana</com-radio>
|
|
80
|
+
* <com-radio value="cherry">Cherry</com-radio>
|
|
81
|
+
* </com-radio-group>
|
|
82
|
+
* ```
|
|
83
|
+
*
|
|
84
|
+
* @example With reactive forms
|
|
85
|
+
* ```html
|
|
86
|
+
* <com-radio-group formControlName="size" aria-label="Select size">
|
|
87
|
+
* <com-radio value="sm">Small</com-radio>
|
|
88
|
+
* <com-radio value="md">Medium</com-radio>
|
|
89
|
+
* <com-radio value="lg">Large</com-radio>
|
|
90
|
+
* </com-radio-group>
|
|
91
|
+
* ```
|
|
92
|
+
*
|
|
93
|
+
* @example Horizontal orientation
|
|
94
|
+
* ```html
|
|
95
|
+
* <com-radio-group [(value)]="color" orientation="horizontal">
|
|
96
|
+
* <com-radio value="red">Red</com-radio>
|
|
97
|
+
* <com-radio value="green">Green</com-radio>
|
|
98
|
+
* <com-radio value="blue">Blue</com-radio>
|
|
99
|
+
* </com-radio-group>
|
|
100
|
+
* ```
|
|
101
|
+
*
|
|
102
|
+
* @example With variants
|
|
103
|
+
* ```html
|
|
104
|
+
* <com-radio-group [(value)]="priority" variant="warn" size="lg">
|
|
105
|
+
* <com-radio value="low">Low</com-radio>
|
|
106
|
+
* <com-radio value="medium">Medium</com-radio>
|
|
107
|
+
* <com-radio value="high">High</com-radio>
|
|
108
|
+
* </com-radio-group>
|
|
109
|
+
* ```
|
|
110
|
+
*/
|
|
111
|
+
declare class ComRadioGroup implements ControlValueAccessor {
|
|
112
|
+
/** Optional NgControl for reactive forms integration. */
|
|
113
|
+
readonly ngControl: NgControl | null;
|
|
114
|
+
/** Error state matcher for determining when to show validation errors. */
|
|
115
|
+
private readonly defaultErrorStateMatcher;
|
|
116
|
+
private readonly parentForm;
|
|
117
|
+
private readonly parentFormGroup;
|
|
118
|
+
/** Unique ID for this radio group instance. */
|
|
119
|
+
private readonly uniqueId;
|
|
120
|
+
/** ID for the error message element. */
|
|
121
|
+
readonly errorId: string;
|
|
122
|
+
/** Registered radio items. */
|
|
123
|
+
private readonly registeredRadios;
|
|
124
|
+
readonly name: InputSignal<string>;
|
|
125
|
+
readonly value: ModelSignal<string | null>;
|
|
126
|
+
readonly disabled: ModelSignal<boolean>;
|
|
127
|
+
readonly required: InputSignalWithTransform<boolean, unknown>;
|
|
128
|
+
readonly orientation: InputSignal<RadioOrientation>;
|
|
129
|
+
readonly size: InputSignal<RadioSize>;
|
|
130
|
+
readonly variant: InputSignal<RadioVariant>;
|
|
131
|
+
readonly errorMessage: InputSignal<string>;
|
|
132
|
+
readonly errorStateMatcher: InputSignal<ErrorStateMatcher | undefined>;
|
|
133
|
+
/** Internal signal to track when control is touched, used to trigger error state re-evaluation. */
|
|
134
|
+
private readonly _touched;
|
|
135
|
+
readonly ariaLabel: InputSignal<string | null>;
|
|
136
|
+
readonly ariaLabelledby: InputSignal<string | null>;
|
|
137
|
+
readonly ariaDescribedby: InputSignal<string | null>;
|
|
138
|
+
/** Emits when the selection changes, with full event details. */
|
|
139
|
+
readonly selectionChange: OutputEmitterRef<RadioGroupChange>;
|
|
140
|
+
/**
|
|
141
|
+
* Tracks the currently focused radio value for roving tabindex.
|
|
142
|
+
* Resets to the current selection (or first focusable) when value or radios change.
|
|
143
|
+
*/
|
|
144
|
+
private readonly focusedValueSignal;
|
|
145
|
+
/**
|
|
146
|
+
* Computed error state derived from form validation.
|
|
147
|
+
* Shows errors when control is invalid and touched/submitted.
|
|
148
|
+
*/
|
|
149
|
+
readonly errorState: Signal<boolean>;
|
|
150
|
+
readonly computedAriaDescribedby: Signal<string | null>;
|
|
151
|
+
protected readonly groupClasses: Signal<string>;
|
|
152
|
+
private onChange;
|
|
153
|
+
private onTouchedCallback;
|
|
154
|
+
constructor();
|
|
155
|
+
/** Creates the context object for child radios. */
|
|
156
|
+
createContext(): ComRadioGroupContext;
|
|
157
|
+
/** Register a radio item with the group. */
|
|
158
|
+
private register;
|
|
159
|
+
/** Unregister a radio item from the group. */
|
|
160
|
+
private unregister;
|
|
161
|
+
writeValue(value: string | null): void;
|
|
162
|
+
registerOnChange(fn: (value: string | null) => void): void;
|
|
163
|
+
registerOnTouched(fn: () => void): void;
|
|
164
|
+
setDisabledState(isDisabled: boolean): void;
|
|
165
|
+
/** Selects a radio by value. */
|
|
166
|
+
select(newValue: string): void;
|
|
167
|
+
/** Focuses the next non-disabled radio (with cyclic wrap). */
|
|
168
|
+
focusNext(currentValue: string): void;
|
|
169
|
+
/** Focuses the previous non-disabled radio (with cyclic wrap). */
|
|
170
|
+
focusPrevious(currentValue: string): void;
|
|
171
|
+
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>;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
/** Event emitted when a radio is selected. */
|
|
176
|
+
interface RadioChange {
|
|
177
|
+
value: string;
|
|
178
|
+
source: ComRadio;
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* Production-grade radio component with full accessibility support.
|
|
182
|
+
*
|
|
183
|
+
* Uses a native `<input type="radio">` for built-in keyboard handling,
|
|
184
|
+
* `:checked` pseudo-class, and screen reader support.
|
|
185
|
+
*
|
|
186
|
+
* Must be used within a `ComRadioGroup` which manages the selected value
|
|
187
|
+
* and provides the shared `name` attribute.
|
|
188
|
+
*
|
|
189
|
+
* @tokens `--color-border`, `--color-primary`, `--color-primary-foreground`, `--color-primary-hover`,
|
|
190
|
+
* `--color-accent`, `--color-accent-foreground`, `--color-accent-hover`,
|
|
191
|
+
* `--color-warn`, `--color-warn-foreground`, `--color-warn-hover`,
|
|
192
|
+
* `--color-disabled`, `--color-disabled-foreground`, `--color-ring`
|
|
193
|
+
*
|
|
194
|
+
* @example Basic usage within a group
|
|
195
|
+
* ```html
|
|
196
|
+
* <com-radio-group [(value)]="selectedOption">
|
|
197
|
+
* <com-radio value="option1">Option 1</com-radio>
|
|
198
|
+
* <com-radio value="option2">Option 2</com-radio>
|
|
199
|
+
* <com-radio value="option3">Option 3</com-radio>
|
|
200
|
+
* </com-radio-group>
|
|
201
|
+
* ```
|
|
202
|
+
*
|
|
203
|
+
* @example Disabled option
|
|
204
|
+
* ```html
|
|
205
|
+
* <com-radio-group [(value)]="selected">
|
|
206
|
+
* <com-radio value="enabled">Enabled option</com-radio>
|
|
207
|
+
* <com-radio value="disabled" [disabled]="true">Disabled option</com-radio>
|
|
208
|
+
* </com-radio-group>
|
|
209
|
+
* ```
|
|
210
|
+
*/
|
|
211
|
+
declare class ComRadio implements OnInit, RadioItem {
|
|
212
|
+
/** Optional parent radio group context. */
|
|
213
|
+
private readonly group;
|
|
214
|
+
/** DestroyRef for cleanup. */
|
|
215
|
+
private readonly destroyRef;
|
|
216
|
+
/** Reference to the native input element. */
|
|
217
|
+
readonly inputRef: Signal<ElementRef<HTMLInputElement> | undefined>;
|
|
218
|
+
/** Unique ID for this radio instance. */
|
|
219
|
+
private readonly uniqueId;
|
|
220
|
+
readonly value: InputSignal<string>;
|
|
221
|
+
readonly size: InputSignal<RadioSize>;
|
|
222
|
+
readonly variant: InputSignal<RadioVariant>;
|
|
223
|
+
readonly disabled: ModelSignal<boolean>;
|
|
224
|
+
readonly id: InputSignal<string | undefined>;
|
|
225
|
+
readonly ariaLabel: InputSignal<string | null>;
|
|
226
|
+
readonly ariaLabelledby: InputSignal<string | null>;
|
|
227
|
+
readonly ariaDescribedby: InputSignal<string | null>;
|
|
228
|
+
readonly changed: OutputEmitterRef<RadioChange>;
|
|
229
|
+
readonly inputId: Signal<string>;
|
|
230
|
+
/** Resolve size from group or local input. */
|
|
231
|
+
readonly resolvedSize: Signal<RadioSize>;
|
|
232
|
+
/** Resolve variant from group or local input. */
|
|
233
|
+
readonly resolvedVariant: Signal<RadioVariant>;
|
|
234
|
+
/** Whether this radio is checked based on group value. */
|
|
235
|
+
readonly isChecked: Signal<boolean>;
|
|
236
|
+
/** Whether this radio is disabled (from local or group). */
|
|
237
|
+
readonly isDisabled: Signal<boolean>;
|
|
238
|
+
/** Get name from group. */
|
|
239
|
+
readonly groupName: Signal<string | undefined>;
|
|
240
|
+
/** Tab index for roving tabindex pattern. */
|
|
241
|
+
readonly tabIndex: Signal<number>;
|
|
242
|
+
protected readonly circleClasses: Signal<string>;
|
|
243
|
+
protected readonly dotSizeClass: Signal<string>;
|
|
244
|
+
protected readonly labelSizeClass: Signal<string>;
|
|
245
|
+
ngOnInit(): void;
|
|
246
|
+
protected onInputChange(event: Event): void;
|
|
247
|
+
protected onBlur(): void;
|
|
248
|
+
protected onKeyDown(event: KeyboardEvent): void;
|
|
249
|
+
/** Focuses this radio's input element. */
|
|
250
|
+
focus(): void;
|
|
251
|
+
/** Selects this radio programmatically. */
|
|
252
|
+
select(): void;
|
|
253
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ComRadio, never>;
|
|
254
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ComRadio, "com-radio", ["comRadio"], { "value": { "alias": "value"; "required": true; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "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; }; }, { "disabled": "disabledChange"; "changed": "changed"; }, never, ["*"], true, never>;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
export { COM_RADIO_GROUP, ComRadio, ComRadioGroup, RADIO_DOT_SIZES, RADIO_GROUP_ORIENTATIONS, RADIO_LABEL_SIZES, radioCircleVariants };
|
|
258
|
+
export type { ComRadioGroupContext, RadioChange, RadioGroupChange, RadioItem, RadioOrientation, RadioSize, RadioVariant };
|
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { TemplateRef, InputSignal, ModelSignal, InputSignalWithTransform, Signal } from '@angular/core';
|
|
3
|
+
import { VariantProps } from 'class-variance-authority';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Template context provided to custom segment templates.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```html
|
|
10
|
+
* <ng-template comSegmentDef let-option let-active="active">
|
|
11
|
+
* <com-icon [name]="option.value" />
|
|
12
|
+
* <span>{{ option.label }}</span>
|
|
13
|
+
* </ng-template>
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
interface SegmentTemplateContext<T = unknown> {
|
|
17
|
+
/** The option object (default for `let-option`). */
|
|
18
|
+
$implicit: SegmentOption<T>;
|
|
19
|
+
/** Whether this segment is currently selected. */
|
|
20
|
+
active: boolean;
|
|
21
|
+
/** Whether this segment is disabled. */
|
|
22
|
+
disabled: boolean;
|
|
23
|
+
/** Position in the options list (0-indexed). */
|
|
24
|
+
index: number;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Directive to mark a custom template for segment content.
|
|
28
|
+
*
|
|
29
|
+
* The template receives a `SegmentTemplateContext` with the option data,
|
|
30
|
+
* active state, disabled state, and index. Use this to customize the
|
|
31
|
+
* inner content of each segment while the component manages the button,
|
|
32
|
+
* styling, and ARIA attributes.
|
|
33
|
+
*
|
|
34
|
+
* @example Icon + text
|
|
35
|
+
* ```html
|
|
36
|
+
* <com-segmented-control [options]="viewOptions" [(value)]="currentView">
|
|
37
|
+
* <ng-template comSegmentDef let-option let-active="active">
|
|
38
|
+
* <com-icon [name]="option.value" size="sm" />
|
|
39
|
+
* <span>{{ option.label }}</span>
|
|
40
|
+
* </ng-template>
|
|
41
|
+
* </com-segmented-control>
|
|
42
|
+
* ```
|
|
43
|
+
*
|
|
44
|
+
* @example Icon only (label used for accessibility)
|
|
45
|
+
* ```html
|
|
46
|
+
* <com-segmented-control [options]="alignmentOptions" [(value)]="alignment">
|
|
47
|
+
* <ng-template comSegmentDef let-option>
|
|
48
|
+
* <com-icon [name]="'align-' + option.value" size="sm" />
|
|
49
|
+
* </ng-template>
|
|
50
|
+
* </com-segmented-control>
|
|
51
|
+
* ```
|
|
52
|
+
*/
|
|
53
|
+
declare class ComSegmentDef<T = unknown> {
|
|
54
|
+
readonly templateRef: TemplateRef<SegmentTemplateContext<T>>;
|
|
55
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ComSegmentDef<any>, never>;
|
|
56
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ComSegmentDef<any>, "ng-template[comSegmentDef]", never, {}, {}, never, never, true, never>;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
type SegmentedControlSize = 'sm' | 'md' | 'lg';
|
|
60
|
+
type SegmentedControlColor = 'primary' | 'accent' | 'muted';
|
|
61
|
+
type SegmentedControlVariant = 'filled' | 'outline';
|
|
62
|
+
/**
|
|
63
|
+
* CVA variants for the segmented control container (track).
|
|
64
|
+
* Controls overall sizing, padding, and track background.
|
|
65
|
+
*/
|
|
66
|
+
declare const segmentedControlContainerVariants: (props?: {
|
|
67
|
+
size?: SegmentedControlSize;
|
|
68
|
+
fullWidth?: boolean;
|
|
69
|
+
}) => string;
|
|
70
|
+
/**
|
|
71
|
+
* CVA variants for individual segment buttons.
|
|
72
|
+
* Controls per-segment sizing, typography, and active/inactive color states.
|
|
73
|
+
*/
|
|
74
|
+
declare const segmentedControlSegmentVariants: (props?: {
|
|
75
|
+
size?: SegmentedControlSize;
|
|
76
|
+
color?: SegmentedControlColor;
|
|
77
|
+
variant?: SegmentedControlVariant;
|
|
78
|
+
active?: boolean;
|
|
79
|
+
fullWidth?: boolean;
|
|
80
|
+
}) => string;
|
|
81
|
+
/**
|
|
82
|
+
* Classes to apply when a segment is disabled.
|
|
83
|
+
* Separate from CVA to avoid complex variant combinations.
|
|
84
|
+
*/
|
|
85
|
+
declare const SEGMENT_DISABLED_CLASSES = "bg-disabled text-disabled-foreground cursor-not-allowed hover:bg-disabled";
|
|
86
|
+
type SegmentedControlContainerVariants = VariantProps<typeof segmentedControlContainerVariants>;
|
|
87
|
+
type SegmentedControlSegmentVariants = VariantProps<typeof segmentedControlSegmentVariants>;
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Represents a single option in the segmented control.
|
|
91
|
+
*/
|
|
92
|
+
interface SegmentOption<T = unknown> {
|
|
93
|
+
/** The value associated with this option. */
|
|
94
|
+
value: T;
|
|
95
|
+
/** Display label (also used as aria-label fallback for custom templates). */
|
|
96
|
+
label: string;
|
|
97
|
+
/** Whether this option is disabled. */
|
|
98
|
+
disabled?: boolean | undefined;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Segmented control component — a horizontal group of mutually exclusive options
|
|
102
|
+
* where one is always selected. Think of it as a styled radio group in pill form.
|
|
103
|
+
*
|
|
104
|
+
* Supports two rendering modes:
|
|
105
|
+
* - **Simple mode**: Plain text labels from the `label` property
|
|
106
|
+
* - **Custom template mode**: Full control via `ng-template[comSegmentDef]`
|
|
107
|
+
*
|
|
108
|
+
* @tokens `--color-primary`, `--color-primary-foreground`,
|
|
109
|
+
* `--color-accent`, `--color-accent-foreground`,
|
|
110
|
+
* `--color-muted`, `--color-muted-foreground`, `--color-muted-hover`,
|
|
111
|
+
* `--color-background`, `--color-foreground`,
|
|
112
|
+
* `--color-disabled`, `--color-disabled-foreground`,
|
|
113
|
+
* `--color-border`, `--color-ring`
|
|
114
|
+
*
|
|
115
|
+
* @example Basic two-option toggle
|
|
116
|
+
* ```html
|
|
117
|
+
* <com-segmented-control
|
|
118
|
+
* [options]="[
|
|
119
|
+
* { value: 'admin', label: 'Admin' },
|
|
120
|
+
* { value: 'user', label: 'User' }
|
|
121
|
+
* ]"
|
|
122
|
+
* [(value)]="selectedRole"
|
|
123
|
+
* />
|
|
124
|
+
* ```
|
|
125
|
+
*
|
|
126
|
+
* @example Multiple options with variants
|
|
127
|
+
* ```html
|
|
128
|
+
* <com-segmented-control
|
|
129
|
+
* [options]="viewOptions"
|
|
130
|
+
* [(value)]="currentView"
|
|
131
|
+
* color="primary"
|
|
132
|
+
* size="sm"
|
|
133
|
+
* />
|
|
134
|
+
* ```
|
|
135
|
+
*
|
|
136
|
+
* @example Custom template with icons
|
|
137
|
+
* ```html
|
|
138
|
+
* <com-segmented-control [options]="viewOptions" [(value)]="currentView" color="primary">
|
|
139
|
+
* <ng-template comSegmentDef let-option let-active="active">
|
|
140
|
+
* <com-icon [name]="option.value === 'grid' ? 'grid' : 'list'" size="sm" />
|
|
141
|
+
* <span>{{ option.label }}</span>
|
|
142
|
+
* </ng-template>
|
|
143
|
+
* </com-segmented-control>
|
|
144
|
+
* ```
|
|
145
|
+
*
|
|
146
|
+
* @example Custom template with badges
|
|
147
|
+
* ```html
|
|
148
|
+
* <com-segmented-control [options]="statusOptions" [(value)]="statusFilter" color="accent">
|
|
149
|
+
* <ng-template comSegmentDef let-option let-active="active">
|
|
150
|
+
* <span>{{ option.label }}</span>
|
|
151
|
+
* <span
|
|
152
|
+
* class="ml-1.5 rounded-pill px-1.5 text-xs"
|
|
153
|
+
* [class]="active ? 'bg-accent-foreground/20 text-accent-foreground' : 'bg-muted text-muted-foreground'"
|
|
154
|
+
* >
|
|
155
|
+
* {{ option.value === 'open' ? openCount : closedCount }}
|
|
156
|
+
* </span>
|
|
157
|
+
* </ng-template>
|
|
158
|
+
* </com-segmented-control>
|
|
159
|
+
* ```
|
|
160
|
+
*
|
|
161
|
+
* @example Icon only (label used for accessibility)
|
|
162
|
+
* ```html
|
|
163
|
+
* <com-segmented-control
|
|
164
|
+
* [options]="[
|
|
165
|
+
* { value: 'left', label: 'Align left' },
|
|
166
|
+
* { value: 'center', label: 'Align center' },
|
|
167
|
+
* { value: 'right', label: 'Align right' }
|
|
168
|
+
* ]"
|
|
169
|
+
* [(value)]="alignment"
|
|
170
|
+
* size="sm"
|
|
171
|
+
* >
|
|
172
|
+
* <ng-template comSegmentDef let-option>
|
|
173
|
+
* <com-icon [name]="'align-' + option.value" size="sm" />
|
|
174
|
+
* </ng-template>
|
|
175
|
+
* </com-segmented-control>
|
|
176
|
+
* ```
|
|
177
|
+
*
|
|
178
|
+
* @example Full width + outline variant
|
|
179
|
+
* ```html
|
|
180
|
+
* <com-segmented-control
|
|
181
|
+
* [options]="plans"
|
|
182
|
+
* [(value)]="selectedPlan"
|
|
183
|
+
* variant="outline"
|
|
184
|
+
* color="primary"
|
|
185
|
+
* [fullWidth]="true"
|
|
186
|
+
* />
|
|
187
|
+
* ```
|
|
188
|
+
*
|
|
189
|
+
* @example Disabled options
|
|
190
|
+
* ```html
|
|
191
|
+
* <com-segmented-control
|
|
192
|
+
* [options]="[
|
|
193
|
+
* { value: 'free', label: 'Free' },
|
|
194
|
+
* { value: 'pro', label: 'Pro' },
|
|
195
|
+
* { value: 'enterprise', label: 'Enterprise', disabled: true }
|
|
196
|
+
* ]"
|
|
197
|
+
* [(value)]="plan"
|
|
198
|
+
* color="primary"
|
|
199
|
+
* size="lg"
|
|
200
|
+
* />
|
|
201
|
+
* ```
|
|
202
|
+
*/
|
|
203
|
+
declare class ComSegmentedControl<T = unknown> {
|
|
204
|
+
/** References to all segment buttons for focus management. */
|
|
205
|
+
private readonly segmentButtons;
|
|
206
|
+
/** The list of options to display. */
|
|
207
|
+
readonly options: InputSignal<SegmentOption<T>[]>;
|
|
208
|
+
/** Currently selected value. Two-way bindable with `[(value)]`. */
|
|
209
|
+
readonly value: ModelSignal<T | undefined>;
|
|
210
|
+
/** Controls segment height, padding, and font size. */
|
|
211
|
+
readonly size: InputSignal<SegmentedControlSize>;
|
|
212
|
+
/** Color scheme for the active segment. */
|
|
213
|
+
readonly color: InputSignal<SegmentedControlColor>;
|
|
214
|
+
/** Visual variant: filled (solid background) or outline (ring border). */
|
|
215
|
+
readonly variant: InputSignal<SegmentedControlVariant>;
|
|
216
|
+
/** When true, segments stretch equally to fill available width. */
|
|
217
|
+
readonly fullWidth: InputSignalWithTransform<boolean, unknown>;
|
|
218
|
+
/** Accessible label for the radiogroup container. */
|
|
219
|
+
readonly ariaLabel: InputSignal<string | null>;
|
|
220
|
+
/** Custom CSS classes to merge with container classes. */
|
|
221
|
+
readonly userClass: InputSignal<string>;
|
|
222
|
+
/** Optional custom template for segment content. */
|
|
223
|
+
readonly customTemplate: Signal<ComSegmentDef<T> | undefined>;
|
|
224
|
+
/** Classes for the container/track element. */
|
|
225
|
+
protected readonly containerClasses: Signal<string>;
|
|
226
|
+
/**
|
|
227
|
+
* Checks if the given option is currently selected.
|
|
228
|
+
*/
|
|
229
|
+
isActive(option: SegmentOption<T>): boolean;
|
|
230
|
+
/**
|
|
231
|
+
* Selects the given option (if not disabled).
|
|
232
|
+
*/
|
|
233
|
+
select(option: SegmentOption<T>): void;
|
|
234
|
+
/**
|
|
235
|
+
* Returns the tabindex for a segment at the given index.
|
|
236
|
+
* Implements roving tabindex: only the selected (or first focusable) segment has tabindex="0".
|
|
237
|
+
*/
|
|
238
|
+
tabIndexFor(index: number): number;
|
|
239
|
+
/**
|
|
240
|
+
* Returns computed classes for a segment button.
|
|
241
|
+
*/
|
|
242
|
+
segmentClasses(option: SegmentOption<T>): string;
|
|
243
|
+
/**
|
|
244
|
+
* Builds the template context for custom templates.
|
|
245
|
+
*/
|
|
246
|
+
getTemplateContext(option: SegmentOption<T>, index: number): SegmentTemplateContext<T>;
|
|
247
|
+
/**
|
|
248
|
+
* Handles keyboard navigation for the segmented control.
|
|
249
|
+
* Implements ARIA radiogroup keyboard patterns.
|
|
250
|
+
*/
|
|
251
|
+
onKeydown(event: KeyboardEvent, currentIndex: number): void;
|
|
252
|
+
/**
|
|
253
|
+
* Finds the next focusable (non-disabled) option index in the given direction.
|
|
254
|
+
* Wraps around to the beginning/end of the list.
|
|
255
|
+
*/
|
|
256
|
+
private findNextFocusableIndex;
|
|
257
|
+
/**
|
|
258
|
+
* Finds the first focusable (non-disabled) option index.
|
|
259
|
+
*/
|
|
260
|
+
private findFirstFocusableIndex;
|
|
261
|
+
/**
|
|
262
|
+
* Finds the last focusable (non-disabled) option index.
|
|
263
|
+
*/
|
|
264
|
+
private findLastFocusableIndex;
|
|
265
|
+
/**
|
|
266
|
+
* Focuses the segment button at the given index.
|
|
267
|
+
*/
|
|
268
|
+
private focusSegmentAt;
|
|
269
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ComSegmentedControl<any>, never>;
|
|
270
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ComSegmentedControl<any>, "com-segmented-control", ["comSegmentedControl"], { "options": { "alias": "options"; "required": true; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "fullWidth": { "alias": "fullWidth"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; "userClass": { "alias": "class"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; }, ["customTemplate"], never, true, never>;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
export { ComSegmentDef, ComSegmentedControl, SEGMENT_DISABLED_CLASSES, segmentedControlContainerVariants, segmentedControlSegmentVariants };
|
|
274
|
+
export type { SegmentOption, SegmentTemplateContext, SegmentedControlColor, SegmentedControlContainerVariants, SegmentedControlSegmentVariants, SegmentedControlSize, SegmentedControlVariant };
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { OnInit, InputSignal, InputSignalWithTransform, Signal, ModelSignal, OutputEmitterRef } from '@angular/core';
|
|
3
|
+
|
|
4
|
+
/** Sort direction — three states */
|
|
5
|
+
type SortDirection = 'asc' | 'desc' | undefined;
|
|
6
|
+
/** Configures the three-state sort cycle */
|
|
7
|
+
type SortCycle = SortDirection[];
|
|
8
|
+
/** Emitted when sort state changes */
|
|
9
|
+
interface SortEvent {
|
|
10
|
+
/** The active column id, or undefined if unsorted */
|
|
11
|
+
active: string | undefined;
|
|
12
|
+
/** The sort direction */
|
|
13
|
+
direction: SortDirection;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* @tokens `--color-foreground`, `--color-muted-foreground`
|
|
17
|
+
*/
|
|
18
|
+
declare const sortHeaderVariants: (props?: {
|
|
19
|
+
sortable?: boolean;
|
|
20
|
+
active?: boolean;
|
|
21
|
+
disabled?: boolean;
|
|
22
|
+
}) => string;
|
|
23
|
+
/**
|
|
24
|
+
* @tokens `--color-foreground`, `--color-muted-foreground`
|
|
25
|
+
*/
|
|
26
|
+
declare const sortIconVariants: (props?: {
|
|
27
|
+
size?: 'sm' | 'md' | 'lg';
|
|
28
|
+
state?: 'asc' | 'desc' | 'unsorted' | 'hidden';
|
|
29
|
+
}) => string;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Sortable header component — child of [uiSort] directive.
|
|
33
|
+
*
|
|
34
|
+
* Apply to table headers, div columns, or any clickable element that should trigger sorting.
|
|
35
|
+
*
|
|
36
|
+
* @tokens `--color-foreground`, `--color-muted-foreground`, `--color-disabled-foreground`
|
|
37
|
+
*
|
|
38
|
+
* @example Basic usage
|
|
39
|
+
* ```html
|
|
40
|
+
* <tr comSort (sortChange)="onSort($event)">
|
|
41
|
+
* <th comSortHeader="name">Name</th>
|
|
42
|
+
* <th comSortHeader="age">Age</th>
|
|
43
|
+
* </tr>
|
|
44
|
+
* ```
|
|
45
|
+
*
|
|
46
|
+
* @example Arrow placement
|
|
47
|
+
* ```html
|
|
48
|
+
* <th comSortHeader="name" comSortHeaderArrowPosition="before">Name</th>
|
|
49
|
+
* ```
|
|
50
|
+
*/
|
|
51
|
+
declare class SortHeaderComponent implements OnInit {
|
|
52
|
+
private readonly sort;
|
|
53
|
+
private readonly destroyRef;
|
|
54
|
+
/** The column id — aliased from the selector */
|
|
55
|
+
readonly id: InputSignal<string>;
|
|
56
|
+
/** Disable sorting for this specific header */
|
|
57
|
+
readonly sortHeaderDisabled: InputSignalWithTransform<boolean, unknown>;
|
|
58
|
+
/** Override parent's sortShowIndicator for this header */
|
|
59
|
+
readonly sortHeaderShowIndicator: InputSignal<boolean | undefined>;
|
|
60
|
+
/** Arrow placement relative to content */
|
|
61
|
+
readonly sortHeaderArrowPosition: InputSignal<'before' | 'after'>;
|
|
62
|
+
/** Whether this header is the currently active sort column */
|
|
63
|
+
readonly isActive: Signal<boolean>;
|
|
64
|
+
/** Current direction if active, undefined otherwise */
|
|
65
|
+
readonly direction: Signal<SortDirection>;
|
|
66
|
+
/** Whether this header is sorted (active + has direction) */
|
|
67
|
+
readonly isSorted: Signal<boolean>;
|
|
68
|
+
/** Whether to show the muted indicator when unsorted */
|
|
69
|
+
readonly showUnsortedIndicator: Signal<boolean>;
|
|
70
|
+
/** Whether sorting is disabled for this header */
|
|
71
|
+
readonly isDisabled: Signal<boolean>;
|
|
72
|
+
/** aria-sort attribute value */
|
|
73
|
+
readonly ariaSort: Signal<'ascending' | 'descending' | 'none'>;
|
|
74
|
+
/** CVA-generated host classes */
|
|
75
|
+
readonly hostClasses: Signal<string>;
|
|
76
|
+
constructor();
|
|
77
|
+
ngOnInit(): void;
|
|
78
|
+
protected onClick(): void;
|
|
79
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SortHeaderComponent, never>;
|
|
80
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SortHeaderComponent, "[comSortHeader]", never, { "id": { "alias": "comSortHeader"; "required": true; "isSignal": true; }; "sortHeaderDisabled": { "alias": "sortHeaderDisabled"; "required": false; "isSignal": true; }; "sortHeaderShowIndicator": { "alias": "sortHeaderShowIndicator"; "required": false; "isSignal": true; }; "sortHeaderArrowPosition": { "alias": "comSortHeaderArrowPosition"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Parent directive that manages sort state for a group of sortable headers.
|
|
85
|
+
*
|
|
86
|
+
* Apply to a container element (e.g., `<tr>`, `<div>`) that contains `[uiSortHeader]` children.
|
|
87
|
+
* Children inject this directive via DI and read its signals directly.
|
|
88
|
+
*
|
|
89
|
+
* @tokens `--color-foreground`, `--color-muted-foreground`
|
|
90
|
+
*
|
|
91
|
+
* @example Basic usage
|
|
92
|
+
* ```html
|
|
93
|
+
* <tr comSort (sortChange)="onSort($event)">
|
|
94
|
+
* <th comSortHeader="name">Name</th>
|
|
95
|
+
* <th comSortHeader="age">Age</th>
|
|
96
|
+
* </tr>
|
|
97
|
+
* ```
|
|
98
|
+
*
|
|
99
|
+
* @example Two-way binding
|
|
100
|
+
* ```html
|
|
101
|
+
* <tr comSort [(sortActive)]="column" [(sortDirection)]="direction">
|
|
102
|
+
* <th comSortHeader="name">Name</th>
|
|
103
|
+
* </tr>
|
|
104
|
+
* ```
|
|
105
|
+
*/
|
|
106
|
+
declare class SortDirective {
|
|
107
|
+
/** Currently active sort column id — two-way via model() */
|
|
108
|
+
readonly sortActive: ModelSignal<string | undefined>;
|
|
109
|
+
/** Current sort direction — two-way via model() */
|
|
110
|
+
readonly sortDirection: ModelSignal<SortDirection>;
|
|
111
|
+
/** Disables all sorting in this container */
|
|
112
|
+
readonly sortDisabled: InputSignalWithTransform<boolean, unknown>;
|
|
113
|
+
/** Customize the click cycle (e.g., ['asc', 'desc'] to skip unsorted) */
|
|
114
|
+
readonly sortCycle: InputSignal<SortCycle>;
|
|
115
|
+
/** Show a muted arrow on unsorted headers */
|
|
116
|
+
readonly sortShowIndicator: InputSignalWithTransform<boolean, unknown>;
|
|
117
|
+
/** Emitted when active column or direction changes */
|
|
118
|
+
readonly sortChange: OutputEmitterRef<SortEvent>;
|
|
119
|
+
private readonly headers;
|
|
120
|
+
/** Register a sort header with this parent */
|
|
121
|
+
register(header: SortHeaderComponent): void;
|
|
122
|
+
/** Deregister a sort header */
|
|
123
|
+
deregister(id: string): void;
|
|
124
|
+
/** Programmatically sort by a column */
|
|
125
|
+
sort(id: string): void;
|
|
126
|
+
/** Returns the next direction in the cycle for a given column */
|
|
127
|
+
getNextDirection(id: string): SortDirection;
|
|
128
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SortDirective, never>;
|
|
129
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<SortDirective, "[comSort]", ["comSort"], { "sortActive": { "alias": "sortActive"; "required": false; "isSignal": true; }; "sortDirection": { "alias": "sortDirection"; "required": false; "isSignal": true; }; "sortDisabled": { "alias": "sortDisabled"; "required": false; "isSignal": true; }; "sortCycle": { "alias": "sortCycle"; "required": false; "isSignal": true; }; "sortShowIndicator": { "alias": "sortShowIndicator"; "required": false; "isSignal": true; }; }, { "sortActive": "sortActiveChange"; "sortDirection": "sortDirectionChange"; "sortChange": "sortChange"; }, never, never, true, never>;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
export { SortDirective, SortHeaderComponent, sortHeaderVariants, sortIconVariants };
|
|
133
|
+
export type { SortCycle, SortDirection, SortEvent };
|