ngx-com 0.0.21 → 0.1.0
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 +137 -33
- package/fesm2022/ngx-com-components-alert.mjs +21 -11
- package/fesm2022/ngx-com-components-alert.mjs.map +1 -1
- package/fesm2022/ngx-com-components-avatar.mjs +9 -7
- package/fesm2022/ngx-com-components-avatar.mjs.map +1 -1
- 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 +27 -3112
- package/fesm2022/ngx-com-components-calendar.mjs.map +1 -1
- package/fesm2022/ngx-com-components-card.mjs +8 -8
- package/fesm2022/ngx-com-components-card.mjs.map +1 -1
- package/fesm2022/ngx-com-components-carousel.mjs +16 -4
- package/fesm2022/ngx-com-components-carousel.mjs.map +1 -1
- package/fesm2022/ngx-com-components-checkbox.mjs +1 -1
- package/fesm2022/ngx-com-components-checkbox.mjs.map +1 -1
- package/fesm2022/ngx-com-components-code-block.mjs +9 -9
- package/fesm2022/ngx-com-components-code-block.mjs.map +1 -1
- package/fesm2022/ngx-com-components-collapsible.mjs +15 -13
- package/fesm2022/ngx-com-components-collapsible.mjs.map +1 -1
- package/fesm2022/ngx-com-components-confirm.mjs +4 -4
- package/fesm2022/ngx-com-components-confirm.mjs.map +1 -1
- package/fesm2022/ngx-com-components-datepicker.mjs +2334 -0
- package/fesm2022/ngx-com-components-datepicker.mjs.map +1 -0
- package/fesm2022/ngx-com-components-dialog.mjs +47 -45
- package/fesm2022/ngx-com-components-dialog.mjs.map +1 -1
- package/fesm2022/ngx-com-components-dropdown.mjs +446 -340
- package/fesm2022/ngx-com-components-dropdown.mjs.map +1 -1
- package/fesm2022/ngx-com-components-empty-state.mjs +5 -3
- package/fesm2022/ngx-com-components-empty-state.mjs.map +1 -1
- package/fesm2022/ngx-com-components-form-field.mjs +11 -6
- package/fesm2022/ngx-com-components-form-field.mjs.map +1 -1
- package/fesm2022/ngx-com-components-icon-lucide.mjs +41 -0
- package/fesm2022/ngx-com-components-icon-lucide.mjs.map +1 -0
- package/fesm2022/ngx-com-components-icon.mjs +89 -61
- package/fesm2022/ngx-com-components-icon.mjs.map +1 -1
- package/fesm2022/ngx-com-components-item.mjs +14 -4
- package/fesm2022/ngx-com-components-item.mjs.map +1 -1
- package/fesm2022/ngx-com-components-menu.mjs +61 -69
- package/fesm2022/ngx-com-components-menu.mjs.map +1 -1
- package/fesm2022/ngx-com-components-native-control.mjs +170 -0
- package/fesm2022/ngx-com-components-native-control.mjs.map +1 -0
- package/fesm2022/ngx-com-components-paginator.mjs +11 -3
- package/fesm2022/ngx-com-components-paginator.mjs.map +1 -1
- package/fesm2022/ngx-com-components-popover.mjs +58 -33
- package/fesm2022/ngx-com-components-popover.mjs.map +1 -1
- package/fesm2022/ngx-com-components-radio.mjs +4 -4
- package/fesm2022/ngx-com-components-radio.mjs.map +1 -1
- package/fesm2022/ngx-com-components-segmented-control.mjs +6 -4
- package/fesm2022/ngx-com-components-segmented-control.mjs.map +1 -1
- package/fesm2022/ngx-com-components-sort.mjs +63 -57
- package/fesm2022/ngx-com-components-sort.mjs.map +1 -1
- package/fesm2022/ngx-com-components-spinner.mjs +6 -6
- package/fesm2022/ngx-com-components-spinner.mjs.map +1 -1
- package/fesm2022/ngx-com-components-switch.mjs +18 -9
- package/fesm2022/ngx-com-components-switch.mjs.map +1 -1
- package/fesm2022/ngx-com-components-table.mjs +23 -9
- package/fesm2022/ngx-com-components-table.mjs.map +1 -1
- package/fesm2022/ngx-com-components-tabs.mjs +81 -58
- package/fesm2022/ngx-com-components-tabs.mjs.map +1 -1
- package/fesm2022/ngx-com-components-timepicker.mjs +1048 -0
- package/fesm2022/ngx-com-components-timepicker.mjs.map +1 -0
- package/fesm2022/ngx-com-components-toast.mjs +18 -14
- package/fesm2022/ngx-com-components-toast.mjs.map +1 -1
- package/fesm2022/ngx-com-components-tooltip.mjs +5 -5
- package/fesm2022/ngx-com-components-tooltip.mjs.map +1 -1
- package/fesm2022/ngx-com-components.mjs +0 -13
- package/fesm2022/ngx-com-components.mjs.map +1 -1
- package/fesm2022/ngx-com-tokens.mjs +0 -8
- package/fesm2022/ngx-com-tokens.mjs.map +1 -1
- package/fesm2022/ngx-com-utils.mjs +13 -1
- package/fesm2022/ngx-com-utils.mjs.map +1 -1
- package/fesm2022/ngx-com.mjs +1 -1
- package/fesm2022/ngx-com.mjs.map +1 -1
- package/package.json +51 -8
- package/styles/animations.css +38 -0
- package/styles/candy.css +121 -0
- package/styles/dark.css +159 -0
- package/styles/forest.css +117 -0
- package/styles/ocean.css +117 -0
- package/styles/themes.css +7 -0
- package/styles/tokens.css +277 -0
- package/styles/utilities.css +16 -0
- package/types/ngx-com-components-alert.d.ts +14 -4
- package/types/ngx-com-components-avatar.d.ts +2 -0
- package/types/ngx-com-components-calendar.d.ts +3 -747
- package/types/ngx-com-components-card.d.ts +2 -2
- package/types/ngx-com-components-carousel.d.ts +11 -1
- package/types/ngx-com-components-code-block.d.ts +4 -4
- package/types/ngx-com-components-collapsible.d.ts +10 -2
- package/types/ngx-com-components-confirm.d.ts +2 -2
- package/types/ngx-com-components-datepicker.d.ts +623 -0
- package/types/ngx-com-components-dialog.d.ts +5 -2
- package/types/ngx-com-components-dropdown.d.ts +22 -4
- package/types/ngx-com-components-empty-state.d.ts +2 -0
- package/types/ngx-com-components-form-field.d.ts +4 -1
- package/types/ngx-com-components-icon-lucide.d.ts +32 -0
- package/types/ngx-com-components-icon.d.ts +49 -35
- package/types/ngx-com-components-item.d.ts +12 -2
- package/types/ngx-com-components-menu.d.ts +38 -38
- package/types/ngx-com-components-native-control.d.ts +99 -0
- package/types/ngx-com-components-paginator.d.ts +2 -0
- package/types/ngx-com-components-popover.d.ts +19 -12
- package/types/ngx-com-components-segmented-control.d.ts +3 -1
- package/types/ngx-com-components-sort.d.ts +13 -10
- package/types/ngx-com-components-switch.d.ts +7 -2
- package/types/ngx-com-components-table.d.ts +16 -2
- package/types/ngx-com-components-tabs.d.ts +46 -34
- package/types/ngx-com-components-timepicker.d.ts +273 -0
- package/types/ngx-com-components-toast.d.ts +4 -2
- package/types/ngx-com-components-tooltip.d.ts +1 -1
- package/types/ngx-com-components.d.ts +6 -7
- package/types/ngx-com-tokens.d.ts +5 -3
- package/types/ngx-com-utils.d.ts +11 -1
- package/types/ngx-com.d.ts +1 -1
|
@@ -0,0 +1,623 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import * as i0 from '@angular/core';
|
|
3
|
+
import { OnDestroy, ModelSignal, InputSignal, OutputEmitterRef, WritableSignal, Signal } from '@angular/core';
|
|
4
|
+
import { ControlValueAccessor, Validator, NgControl, ValidationErrors } from '@angular/forms';
|
|
5
|
+
import { IconSize } from 'ngx-com/components/icon';
|
|
6
|
+
import { DateFilterFn, CalendarView, DateRange } from 'ngx-com/components/calendar';
|
|
7
|
+
import { FormFieldControl, ErrorStateMatcher, FormFieldAppearance } from 'ngx-com/components/form-field';
|
|
8
|
+
import { ComTimeValue } from 'ngx-com/components/timepicker';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Types and interfaces for DatePicker and DateRangePicker components.
|
|
12
|
+
*/
|
|
13
|
+
/** Date format preset names */
|
|
14
|
+
type DateFormatPreset = 'short' | 'medium' | 'long' | 'full' | 'time' | 'timeWithSeconds' | 'dateTimeShort' | 'dateTimeMedium' | 'dateTimeLong';
|
|
15
|
+
/** Panel width configuration */
|
|
16
|
+
type DatepickerPanelWidth = 'auto' | 'trigger' | `${number}px` | `${number}rem`;
|
|
17
|
+
/** Size variants for datepicker components */
|
|
18
|
+
type DatepickerSize = 'sm' | 'default' | 'lg';
|
|
19
|
+
/** Visual variant for datepicker trigger */
|
|
20
|
+
type DatepickerVariant = 'default' | 'outline' | 'ghost' | 'filled' | 'naked';
|
|
21
|
+
/** Validation state for datepicker */
|
|
22
|
+
type DatepickerState = 'default' | 'error' | 'success';
|
|
23
|
+
/** Configuration for datepicker footer actions */
|
|
24
|
+
interface DatepickerFooterConfig {
|
|
25
|
+
/** Show today button */
|
|
26
|
+
showToday?: boolean;
|
|
27
|
+
/** Show clear button */
|
|
28
|
+
showClear?: boolean;
|
|
29
|
+
/** Custom today button label */
|
|
30
|
+
todayLabel?: string;
|
|
31
|
+
/** Custom clear button label */
|
|
32
|
+
clearLabel?: string;
|
|
33
|
+
}
|
|
34
|
+
/** Value type for DateRangePicker */
|
|
35
|
+
interface DateRangeValue<D> {
|
|
36
|
+
/** Start date of the range */
|
|
37
|
+
start: D | null;
|
|
38
|
+
/** End date of the range */
|
|
39
|
+
end: D | null;
|
|
40
|
+
}
|
|
41
|
+
/** Creates a DateRangeValue */
|
|
42
|
+
declare function createDateRangeValue<D>(start?: D | null, end?: D | null): DateRangeValue<D>;
|
|
43
|
+
declare function generateDatepickerId(): string;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* CVA variants for the datepicker trigger input.
|
|
47
|
+
* Uses semantic theme tokens for consistent cross-theme styling.
|
|
48
|
+
*
|
|
49
|
+
* @tokens `--color-input-background`, `--color-input-foreground`, `--color-input-border`,
|
|
50
|
+
* `--color-input-placeholder`, `--color-ring`, `--color-muted`, `--color-muted-hover`,
|
|
51
|
+
* `--color-warn`, `--color-success`, `--color-primary`, `--color-border`,
|
|
52
|
+
* `--color-disabled`, `--color-disabled-foreground`, `--radius-input`
|
|
53
|
+
*/
|
|
54
|
+
declare const datepickerTriggerVariants: (props?: {
|
|
55
|
+
variant?: DatepickerVariant;
|
|
56
|
+
size?: DatepickerSize;
|
|
57
|
+
state?: DatepickerState;
|
|
58
|
+
open?: boolean;
|
|
59
|
+
}) => string;
|
|
60
|
+
type DatepickerTriggerVariants = VariantProps<typeof datepickerTriggerVariants>;
|
|
61
|
+
/**
|
|
62
|
+
* CVA variants for the disabled state of datepicker trigger.
|
|
63
|
+
*
|
|
64
|
+
* @tokens `--color-disabled`, `--color-disabled-foreground`
|
|
65
|
+
*/
|
|
66
|
+
declare const datepickerDisabledVariants: () => string;
|
|
67
|
+
type DatepickerDisabledVariants = VariantProps<typeof datepickerDisabledVariants>;
|
|
68
|
+
/**
|
|
69
|
+
* CVA variants for the datepicker input field.
|
|
70
|
+
*
|
|
71
|
+
* @tokens `--color-input-foreground`, `--color-input-placeholder`
|
|
72
|
+
*/
|
|
73
|
+
declare const datepickerInputVariants: (props?: {
|
|
74
|
+
size?: DatepickerSize;
|
|
75
|
+
}) => string;
|
|
76
|
+
type DatepickerInputVariants = VariantProps<typeof datepickerInputVariants>;
|
|
77
|
+
/**
|
|
78
|
+
* CVA variants for the calendar icon button.
|
|
79
|
+
*
|
|
80
|
+
* @tokens `--color-ring`, `--color-muted-foreground`, `--radius-interactive-sm`
|
|
81
|
+
*/
|
|
82
|
+
declare const datepickerIconVariants: (props?: {
|
|
83
|
+
size?: DatepickerSize;
|
|
84
|
+
}) => string;
|
|
85
|
+
type DatepickerIconVariants = VariantProps<typeof datepickerIconVariants>;
|
|
86
|
+
/**
|
|
87
|
+
* CVA variants for the clear button.
|
|
88
|
+
*
|
|
89
|
+
* @tokens `--color-ring`, `--color-muted-foreground`, `--color-foreground`, `--radius-interactive-sm`
|
|
90
|
+
*/
|
|
91
|
+
declare const datepickerClearVariants: (props?: {
|
|
92
|
+
size?: DatepickerSize;
|
|
93
|
+
}) => string;
|
|
94
|
+
type DatepickerClearVariants = VariantProps<typeof datepickerClearVariants>;
|
|
95
|
+
/**
|
|
96
|
+
* CVA variants for the datepicker panel (overlay).
|
|
97
|
+
*
|
|
98
|
+
* @tokens `--color-popover`, `--color-popover-foreground`, `--color-border-subtle`, `--radius-overlay`
|
|
99
|
+
*/
|
|
100
|
+
declare const datepickerPanelVariants: (props?: {
|
|
101
|
+
size?: DatepickerSize;
|
|
102
|
+
}) => string;
|
|
103
|
+
type DatepickerPanelVariants = VariantProps<typeof datepickerPanelVariants>;
|
|
104
|
+
/**
|
|
105
|
+
* CVA variants for the footer section of the datepicker panel.
|
|
106
|
+
*
|
|
107
|
+
* @tokens `--color-border-subtle`
|
|
108
|
+
*/
|
|
109
|
+
declare const datepickerFooterVariants: (props?: {
|
|
110
|
+
size?: DatepickerSize;
|
|
111
|
+
}) => string;
|
|
112
|
+
type DatepickerFooterVariants = VariantProps<typeof datepickerFooterVariants>;
|
|
113
|
+
/**
|
|
114
|
+
* CVA variants for the footer buttons.
|
|
115
|
+
*
|
|
116
|
+
* @tokens `--color-primary`, `--color-primary-foreground`, `--color-primary-hover`,
|
|
117
|
+
* `--color-muted`, `--color-muted-foreground`, `--color-muted-hover`, `--radius-control-sm`
|
|
118
|
+
*/
|
|
119
|
+
declare const datepickerFooterButtonVariants: (props?: {
|
|
120
|
+
size?: DatepickerSize;
|
|
121
|
+
variant?: 'primary' | 'secondary';
|
|
122
|
+
}) => string;
|
|
123
|
+
type DatepickerFooterButtonVariants = VariantProps<typeof datepickerFooterButtonVariants>;
|
|
124
|
+
/**
|
|
125
|
+
* CVA variants for the range separator.
|
|
126
|
+
*
|
|
127
|
+
* @tokens `--color-muted-foreground`
|
|
128
|
+
*/
|
|
129
|
+
declare const datepickerRangeSeparatorVariants: (props?: {
|
|
130
|
+
size?: DatepickerSize;
|
|
131
|
+
}) => string;
|
|
132
|
+
type DatepickerRangeSeparatorVariants = VariantProps<typeof datepickerRangeSeparatorVariants>;
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* Single date picker component with calendar popup.
|
|
136
|
+
* Implements ControlValueAccessor for Reactive Forms and Template-driven Forms.
|
|
137
|
+
*
|
|
138
|
+
* @tokens `--color-input-background`, `--color-input-foreground`, `--color-input-border`,
|
|
139
|
+
* `--color-input-placeholder`, `--color-ring`, `--color-muted`, `--color-muted-foreground`,
|
|
140
|
+
* `--color-popover`, `--color-popover-foreground`, `--color-border-subtle`,
|
|
141
|
+
* `--color-primary`, `--color-primary-foreground`, `--color-primary-hover`,
|
|
142
|
+
* `--color-warn`, `--color-success`, `--color-disabled`, `--color-disabled-foreground`
|
|
143
|
+
*
|
|
144
|
+
* @example
|
|
145
|
+
* ```html
|
|
146
|
+
* <com-datepicker
|
|
147
|
+
* formControlName="birthDate"
|
|
148
|
+
* placeholder="Select date..."
|
|
149
|
+
* [min]="minDate"
|
|
150
|
+
* [max]="maxDate"
|
|
151
|
+
* [showTodayButton]="true"
|
|
152
|
+
* [showClearButton]="true"
|
|
153
|
+
* />
|
|
154
|
+
* ```
|
|
155
|
+
*/
|
|
156
|
+
declare class ComDatepicker<D> implements ControlValueAccessor, FormFieldControl<D | null>, Validator, OnDestroy {
|
|
157
|
+
private readonly elementRef;
|
|
158
|
+
private readonly destroyRef;
|
|
159
|
+
private readonly overlay;
|
|
160
|
+
private readonly viewContainerRef;
|
|
161
|
+
private readonly document;
|
|
162
|
+
private readonly dateAdapter;
|
|
163
|
+
/** NgControl bound to this datepicker (if using reactive forms). */
|
|
164
|
+
readonly ngControl: NgControl | null;
|
|
165
|
+
private readonly defaultErrorStateMatcher;
|
|
166
|
+
private readonly parentForm;
|
|
167
|
+
private readonly parentFormGroup;
|
|
168
|
+
/** Reference to the trigger element. */
|
|
169
|
+
private readonly triggerRef;
|
|
170
|
+
/** Reference to the input element. */
|
|
171
|
+
private readonly inputRef;
|
|
172
|
+
/** Reference to the panel template. */
|
|
173
|
+
private readonly panelTemplateRef;
|
|
174
|
+
/** Overlay reference. */
|
|
175
|
+
private overlayRef;
|
|
176
|
+
/** Unique ID for the datepicker. */
|
|
177
|
+
private readonly datepickerId;
|
|
178
|
+
/** Current value. */
|
|
179
|
+
readonly value: ModelSignal<D | null>;
|
|
180
|
+
/** Minimum selectable date. */
|
|
181
|
+
readonly min: InputSignal<D | null>;
|
|
182
|
+
/** Maximum selectable date. */
|
|
183
|
+
readonly max: InputSignal<D | null>;
|
|
184
|
+
/** Custom filter function to disable specific dates. */
|
|
185
|
+
readonly dateFilter: InputSignal<DateFilterFn<D> | null>;
|
|
186
|
+
/** Date the calendar opens to (defaults to selected or today). */
|
|
187
|
+
readonly startAt: InputSignal<D | null>;
|
|
188
|
+
/** Initial calendar view. */
|
|
189
|
+
readonly startView: InputSignal<CalendarView>;
|
|
190
|
+
/** First day of week override (0=Sun, 1=Mon, ..., 6=Sat). */
|
|
191
|
+
readonly firstDayOfWeek: InputSignal<number | null>;
|
|
192
|
+
/** Placeholder text. */
|
|
193
|
+
readonly placeholder: InputSignal<string>;
|
|
194
|
+
/** Whether the datepicker is disabled. */
|
|
195
|
+
readonly disabled: InputSignal<boolean>;
|
|
196
|
+
/** Whether the datepicker is required. */
|
|
197
|
+
readonly required: InputSignal<boolean>;
|
|
198
|
+
/** Display format for the date. */
|
|
199
|
+
readonly dateFormat: InputSignal<DateFormatPreset>;
|
|
200
|
+
/** Show a clear button in the trigger. */
|
|
201
|
+
readonly showClearButton: InputSignal<boolean>;
|
|
202
|
+
/** Show a today button in the footer. */
|
|
203
|
+
readonly showTodayButton: InputSignal<boolean>;
|
|
204
|
+
/** Show a clear button in the footer. */
|
|
205
|
+
readonly showFooterClearButton: InputSignal<boolean>;
|
|
206
|
+
/** Don't auto-close on selection. */
|
|
207
|
+
readonly keepOpen: InputSignal<boolean>;
|
|
208
|
+
/** Allow manual text input. */
|
|
209
|
+
readonly allowManualInput: InputSignal<boolean>;
|
|
210
|
+
/** Additional CSS classes for the panel. */
|
|
211
|
+
readonly panelClass: InputSignal<string>;
|
|
212
|
+
/** Panel width strategy. */
|
|
213
|
+
readonly panelWidth: InputSignal<DatepickerPanelWidth>;
|
|
214
|
+
/** CVA variant for trigger styling. */
|
|
215
|
+
readonly variant: InputSignal<DatepickerVariant>;
|
|
216
|
+
/** Size variant. */
|
|
217
|
+
readonly size: InputSignal<DatepickerSize>;
|
|
218
|
+
/** Validation state. */
|
|
219
|
+
readonly state: InputSignal<DatepickerState>;
|
|
220
|
+
/** Additional CSS classes for the trigger. */
|
|
221
|
+
readonly userClass: InputSignal<string>;
|
|
222
|
+
/** Accessible label for the input. */
|
|
223
|
+
readonly ariaLabel: InputSignal<string | null>;
|
|
224
|
+
/** ID of element describing the input. */
|
|
225
|
+
readonly ariaDescribedBy: InputSignal<string | null>;
|
|
226
|
+
/** Custom error state matcher for determining when to show errors. */
|
|
227
|
+
readonly errorStateMatcher: InputSignal<ErrorStateMatcher | undefined>;
|
|
228
|
+
readonly touched: ModelSignal<boolean>;
|
|
229
|
+
readonly invalid: InputSignal<boolean>;
|
|
230
|
+
readonly sfErrors: InputSignal<readonly unknown[]>;
|
|
231
|
+
/** Whether to show the time picker below the calendar. */
|
|
232
|
+
readonly showTimePicker: InputSignal<boolean>;
|
|
233
|
+
/** 12h vs 24h format for the time picker. `null` = auto-detect. */
|
|
234
|
+
readonly use12HourFormat: InputSignal<boolean | null>;
|
|
235
|
+
/** Whether the time picker shows seconds. */
|
|
236
|
+
readonly showSeconds: InputSignal<boolean>;
|
|
237
|
+
/** Step interval for minutes in the time picker. */
|
|
238
|
+
readonly minuteStep: InputSignal<number>;
|
|
239
|
+
/** Emitted when a date is selected. */
|
|
240
|
+
readonly dateChange: OutputEmitterRef<D | null>;
|
|
241
|
+
/** Emitted when the panel opens. */
|
|
242
|
+
readonly opened: OutputEmitterRef<void>;
|
|
243
|
+
/** Emitted when the panel closes. */
|
|
244
|
+
readonly closed: OutputEmitterRef<void>;
|
|
245
|
+
/** Whether the panel is open. */
|
|
246
|
+
readonly isOpen: WritableSignal<boolean>;
|
|
247
|
+
/** Internal value state (managed by CVA or input). */
|
|
248
|
+
readonly internalValue: WritableSignal<D | null>;
|
|
249
|
+
/** Calendar active date for navigation. Recomputes when value or startAt changes; user navigation overrides via .set(). */
|
|
250
|
+
readonly calendarActiveDate: WritableSignal<D>;
|
|
251
|
+
/** Live announcements for screen readers. */
|
|
252
|
+
readonly liveAnnouncement: WritableSignal<string>;
|
|
253
|
+
/** Whether the input is focused (not panel). */
|
|
254
|
+
private readonly _inputFocused;
|
|
255
|
+
/** IDs for aria-describedby (set by form-field). */
|
|
256
|
+
private readonly _describedByIds;
|
|
257
|
+
/** Form field appearance (set by form-field). */
|
|
258
|
+
private readonly _appearance;
|
|
259
|
+
/** Whether the datepicker is focused (input focused or panel open). Implements FormFieldControl. */
|
|
260
|
+
readonly focused: Signal<boolean>;
|
|
261
|
+
/** Whether the label should float. Label floats when focused or has a value. */
|
|
262
|
+
readonly shouldLabelFloat: Signal<boolean>;
|
|
263
|
+
/** Whether the control is in an error state. Implements FormFieldControl. */
|
|
264
|
+
readonly errorState: Signal<boolean>;
|
|
265
|
+
/** Structured validation errors from Signal Forms, exposed for the parent form field. */
|
|
266
|
+
readonly errors: Signal<readonly unknown[] | null>;
|
|
267
|
+
/** Unique ID for the control. Implements FormFieldControl. */
|
|
268
|
+
readonly id: Signal<string>;
|
|
269
|
+
/**
|
|
270
|
+
* Effective state combining manual state with automatic error detection.
|
|
271
|
+
* Manual state takes precedence over auto-detected error state.
|
|
272
|
+
*/
|
|
273
|
+
readonly effectiveState: Signal<DatepickerState>;
|
|
274
|
+
/** Combined aria-describedby from form-field and manual input. */
|
|
275
|
+
readonly effectiveAriaDescribedBy: Signal<string | null>;
|
|
276
|
+
/** Input element ID (alias for FormFieldControl id). */
|
|
277
|
+
readonly inputId: Signal<string>;
|
|
278
|
+
/** Panel element ID. */
|
|
279
|
+
readonly panelId: Signal<string>;
|
|
280
|
+
/** Whether the datepicker has a value. */
|
|
281
|
+
readonly hasValue: Signal<boolean>;
|
|
282
|
+
/** Icon size based on datepicker size. */
|
|
283
|
+
readonly iconSize: Signal<IconSize>;
|
|
284
|
+
/** Formatted display value. */
|
|
285
|
+
readonly displayValue: Signal<string>;
|
|
286
|
+
/** Computed trigger classes. */
|
|
287
|
+
readonly triggerClasses: Signal<string>;
|
|
288
|
+
/** Computed input classes. */
|
|
289
|
+
readonly inputClasses: Signal<string>;
|
|
290
|
+
/** Computed icon classes. */
|
|
291
|
+
readonly iconClasses: Signal<string>;
|
|
292
|
+
/** Computed clear button classes. */
|
|
293
|
+
readonly clearClasses: Signal<string>;
|
|
294
|
+
/** Computed panel classes. */
|
|
295
|
+
readonly panelClasses: Signal<string>;
|
|
296
|
+
/** Computed footer classes. */
|
|
297
|
+
readonly footerClasses: Signal<string>;
|
|
298
|
+
/** Computed today button classes. */
|
|
299
|
+
readonly todayButtonClasses: Signal<string>;
|
|
300
|
+
/** Computed clear button classes (footer). */
|
|
301
|
+
readonly clearButtonClasses: Signal<string>;
|
|
302
|
+
/** Time section divider classes. */
|
|
303
|
+
readonly timeSectionClasses: Signal<string>;
|
|
304
|
+
/** Time value derived from the current date value. */
|
|
305
|
+
readonly timeValue: Signal<ComTimeValue | null>;
|
|
306
|
+
/** Effective display format — switches to dateTime when time picker is shown. */
|
|
307
|
+
readonly effectiveDateFormat: Signal<DateFormatPreset>;
|
|
308
|
+
/** Whether the panel should stay open (keepOpen or time picker shown). */
|
|
309
|
+
readonly effectiveKeepOpen: Signal<boolean>;
|
|
310
|
+
private onChange;
|
|
311
|
+
private onTouched;
|
|
312
|
+
private onValidatorChange;
|
|
313
|
+
constructor();
|
|
314
|
+
ngOnDestroy(): void;
|
|
315
|
+
writeValue(value: D | null): void;
|
|
316
|
+
registerOnChange(fn: (value: D | null) => void): void;
|
|
317
|
+
registerOnTouched(fn: () => void): void;
|
|
318
|
+
setDisabledState(_isDisabled: boolean): void;
|
|
319
|
+
validate(): ValidationErrors | null;
|
|
320
|
+
registerOnValidatorChange(fn: () => void): void;
|
|
321
|
+
/** Opens the datepicker panel. */
|
|
322
|
+
open(): void;
|
|
323
|
+
/** Closes the datepicker panel. */
|
|
324
|
+
close(): void;
|
|
325
|
+
/** Toggles the datepicker panel. */
|
|
326
|
+
toggle(): void;
|
|
327
|
+
/** Clears the selected date. */
|
|
328
|
+
clear(event?: Event): void;
|
|
329
|
+
/** Selects today's date. */
|
|
330
|
+
selectToday(): void;
|
|
331
|
+
protected onInputFocus(): void;
|
|
332
|
+
protected onTriggerClick(): void;
|
|
333
|
+
protected onTriggerKeydown(event: KeyboardEvent): void;
|
|
334
|
+
protected onInputKeydown(event: KeyboardEvent): void;
|
|
335
|
+
protected onInputChange(event: Event): void;
|
|
336
|
+
protected onInputBlur(): void;
|
|
337
|
+
protected onPanelKeydown(event: KeyboardEvent): void;
|
|
338
|
+
protected onDateSelected(date: D): void;
|
|
339
|
+
protected onTimeChange(time: ComTimeValue | null): void;
|
|
340
|
+
protected onActiveDateChange(date: D): void;
|
|
341
|
+
/**
|
|
342
|
+
* Called when the form field container is clicked.
|
|
343
|
+
* Implements FormFieldControl.
|
|
344
|
+
*/
|
|
345
|
+
onContainerClick(event: MouseEvent): void;
|
|
346
|
+
/**
|
|
347
|
+
* Sets the describedBy IDs from the form field.
|
|
348
|
+
* Called by the parent form field component.
|
|
349
|
+
*/
|
|
350
|
+
setDescribedByIds(ids: string): void;
|
|
351
|
+
/**
|
|
352
|
+
* Sets the appearance for styling.
|
|
353
|
+
* Called by the parent form field component.
|
|
354
|
+
*/
|
|
355
|
+
setAppearance(appearance: FormFieldAppearance): void;
|
|
356
|
+
private createOverlay;
|
|
357
|
+
private destroyOverlay;
|
|
358
|
+
private updateValue;
|
|
359
|
+
private parseAndSetValue;
|
|
360
|
+
private isDateValid;
|
|
361
|
+
private announce;
|
|
362
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ComDatepicker<any>, never>;
|
|
363
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ComDatepicker<any>, "com-datepicker", ["comDatepicker"], { "value": { "alias": "value"; "required": false; "isSignal": true; }; "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "dateFilter": { "alias": "dateFilter"; "required": false; "isSignal": true; }; "startAt": { "alias": "startAt"; "required": false; "isSignal": true; }; "startView": { "alias": "startView"; "required": false; "isSignal": true; }; "firstDayOfWeek": { "alias": "firstDayOfWeek"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "dateFormat": { "alias": "dateFormat"; "required": false; "isSignal": true; }; "showClearButton": { "alias": "showClearButton"; "required": false; "isSignal": true; }; "showTodayButton": { "alias": "showTodayButton"; "required": false; "isSignal": true; }; "showFooterClearButton": { "alias": "showFooterClearButton"; "required": false; "isSignal": true; }; "keepOpen": { "alias": "keepOpen"; "required": false; "isSignal": true; }; "allowManualInput": { "alias": "allowManualInput"; "required": false; "isSignal": true; }; "panelClass": { "alias": "panelClass"; "required": false; "isSignal": true; }; "panelWidth": { "alias": "panelWidth"; "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; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "ariaDescribedBy": { "alias": "ariaDescribedBy"; "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; }; "showTimePicker": { "alias": "showTimePicker"; "required": false; "isSignal": true; }; "use12HourFormat": { "alias": "use12HourFormat"; "required": false; "isSignal": true; }; "showSeconds": { "alias": "showSeconds"; "required": false; "isSignal": true; }; "minuteStep": { "alias": "minuteStep"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "touched": "touchedChange"; "dateChange": "dateChange"; "opened": "opened"; "closed": "closed"; }, never, never, true, never>;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
/**
|
|
367
|
+
* Date range picker component with calendar popup.
|
|
368
|
+
* Allows selecting a start and end date via a two-click interaction.
|
|
369
|
+
* Implements ControlValueAccessor for Reactive Forms and Template-driven Forms.
|
|
370
|
+
*
|
|
371
|
+
* @tokens `--color-input-background`, `--color-input-foreground`, `--color-input-border`,
|
|
372
|
+
* `--color-input-placeholder`, `--color-ring`, `--color-muted`, `--color-muted-foreground`,
|
|
373
|
+
* `--color-popover`, `--color-popover-foreground`, `--color-border-subtle`,
|
|
374
|
+
* `--color-primary`, `--color-primary-foreground`, `--color-primary-hover`,
|
|
375
|
+
* `--color-warn`, `--color-success`, `--color-disabled`, `--color-disabled-foreground`
|
|
376
|
+
*
|
|
377
|
+
* @example
|
|
378
|
+
* ```html
|
|
379
|
+
* <com-date-range-picker
|
|
380
|
+
* formControlName="dateRange"
|
|
381
|
+
* startPlaceholder="Start date"
|
|
382
|
+
* endPlaceholder="End date"
|
|
383
|
+
* [min]="minDate"
|
|
384
|
+
* [max]="maxDate"
|
|
385
|
+
* [showTodayButton]="true"
|
|
386
|
+
* />
|
|
387
|
+
* ```
|
|
388
|
+
*/
|
|
389
|
+
declare class ComDateRangePicker<D> implements ControlValueAccessor, FormFieldControl<DateRangeValue<D> | null>, Validator, OnDestroy {
|
|
390
|
+
private readonly elementRef;
|
|
391
|
+
private readonly destroyRef;
|
|
392
|
+
private readonly overlay;
|
|
393
|
+
private readonly viewContainerRef;
|
|
394
|
+
private readonly document;
|
|
395
|
+
private readonly dateAdapter;
|
|
396
|
+
/** NgControl bound to this date range picker (if using reactive forms). */
|
|
397
|
+
readonly ngControl: NgControl | null;
|
|
398
|
+
private readonly defaultErrorStateMatcher;
|
|
399
|
+
private readonly parentForm;
|
|
400
|
+
private readonly parentFormGroup;
|
|
401
|
+
/** Reference to the trigger element. */
|
|
402
|
+
private readonly triggerRef;
|
|
403
|
+
/** Reference to the start input element. */
|
|
404
|
+
private readonly startInputRef;
|
|
405
|
+
/** Reference to the end input element. */
|
|
406
|
+
private readonly endInputRef;
|
|
407
|
+
/** Reference to the panel template. */
|
|
408
|
+
private readonly panelTemplateRef;
|
|
409
|
+
/** Overlay reference. */
|
|
410
|
+
private overlayRef;
|
|
411
|
+
/** Unique ID for the datepicker. */
|
|
412
|
+
private readonly datepickerId;
|
|
413
|
+
/** Current value. */
|
|
414
|
+
readonly value: ModelSignal<DateRangeValue<D> | null>;
|
|
415
|
+
/** Minimum selectable date. */
|
|
416
|
+
readonly min: InputSignal<D | null>;
|
|
417
|
+
/** Maximum selectable date. */
|
|
418
|
+
readonly max: InputSignal<D | null>;
|
|
419
|
+
/** Custom filter function to disable specific dates. */
|
|
420
|
+
readonly dateFilter: InputSignal<DateFilterFn<D> | null>;
|
|
421
|
+
/** Date the calendar opens to (defaults to start date or today). */
|
|
422
|
+
readonly startAt: InputSignal<D | null>;
|
|
423
|
+
/** Initial calendar view. */
|
|
424
|
+
readonly startView: InputSignal<CalendarView>;
|
|
425
|
+
/** First day of week override (0=Sun, 1=Mon, ..., 6=Sat). */
|
|
426
|
+
readonly firstDayOfWeek: InputSignal<number | null>;
|
|
427
|
+
/** Placeholder text for start date. */
|
|
428
|
+
readonly startPlaceholder: InputSignal<string>;
|
|
429
|
+
/** Placeholder text for end date. */
|
|
430
|
+
readonly endPlaceholder: InputSignal<string>;
|
|
431
|
+
/** Whether the datepicker is disabled. */
|
|
432
|
+
readonly disabled: InputSignal<boolean>;
|
|
433
|
+
/** Whether the datepicker is required. */
|
|
434
|
+
readonly required: InputSignal<boolean>;
|
|
435
|
+
/** Display format for the date. */
|
|
436
|
+
readonly dateFormat: InputSignal<DateFormatPreset>;
|
|
437
|
+
/** Show a clear button in the trigger. */
|
|
438
|
+
readonly showClearButton: InputSignal<boolean>;
|
|
439
|
+
/** Show a today button in the footer. */
|
|
440
|
+
readonly showTodayButton: InputSignal<boolean>;
|
|
441
|
+
/** Show a clear button in the footer. */
|
|
442
|
+
readonly showFooterClearButton: InputSignal<boolean>;
|
|
443
|
+
/** Don't auto-close on complete range selection. */
|
|
444
|
+
readonly keepOpen: InputSignal<boolean>;
|
|
445
|
+
/** Allow manual text input. */
|
|
446
|
+
readonly allowManualInput: InputSignal<boolean>;
|
|
447
|
+
/** Additional CSS classes for the panel. */
|
|
448
|
+
readonly panelClass: InputSignal<string>;
|
|
449
|
+
/** Panel width strategy. */
|
|
450
|
+
readonly panelWidth: InputSignal<DatepickerPanelWidth>;
|
|
451
|
+
/** CVA variant for trigger styling. */
|
|
452
|
+
readonly variant: InputSignal<DatepickerVariant>;
|
|
453
|
+
/** Size variant. */
|
|
454
|
+
readonly size: InputSignal<DatepickerSize>;
|
|
455
|
+
/** Validation state. */
|
|
456
|
+
readonly state: InputSignal<DatepickerState>;
|
|
457
|
+
/** Additional CSS classes for the trigger. */
|
|
458
|
+
readonly userClass: InputSignal<string>;
|
|
459
|
+
/** Accessible label for the start input. */
|
|
460
|
+
readonly startAriaLabel: InputSignal<string | null>;
|
|
461
|
+
/** Accessible label for the end input. */
|
|
462
|
+
readonly endAriaLabel: InputSignal<string | null>;
|
|
463
|
+
/** Custom error state matcher for determining when to show errors. */
|
|
464
|
+
readonly errorStateMatcher: InputSignal<ErrorStateMatcher | undefined>;
|
|
465
|
+
readonly touched: ModelSignal<boolean>;
|
|
466
|
+
readonly invalid: InputSignal<boolean>;
|
|
467
|
+
readonly sfErrors: InputSignal<readonly unknown[]>;
|
|
468
|
+
/** Whether to show time pickers below the calendar. */
|
|
469
|
+
readonly showTimePicker: InputSignal<boolean>;
|
|
470
|
+
/** 12h vs 24h format for the time pickers. `null` = auto-detect. */
|
|
471
|
+
readonly use12HourFormat: InputSignal<boolean | null>;
|
|
472
|
+
/** Whether the time pickers show seconds. */
|
|
473
|
+
readonly showSeconds: InputSignal<boolean>;
|
|
474
|
+
/** Step interval for minutes in the time pickers. */
|
|
475
|
+
readonly minuteStep: InputSignal<number>;
|
|
476
|
+
/** Emitted when a complete range is selected. */
|
|
477
|
+
readonly rangeChange: OutputEmitterRef<DateRangeValue<D> | null>;
|
|
478
|
+
/** Emitted when the panel opens. */
|
|
479
|
+
readonly opened: OutputEmitterRef<void>;
|
|
480
|
+
/** Emitted when the panel closes. */
|
|
481
|
+
readonly closed: OutputEmitterRef<void>;
|
|
482
|
+
/** Whether the panel is open. */
|
|
483
|
+
readonly isOpen: WritableSignal<boolean>;
|
|
484
|
+
/** Which input is currently focused. */
|
|
485
|
+
readonly activeInput: WritableSignal<'start' | 'end' | null>;
|
|
486
|
+
/** Internal value state (managed by CVA or input). */
|
|
487
|
+
readonly internalValue: WritableSignal<DateRangeValue<D> | null>;
|
|
488
|
+
/** Calendar active date for navigation. Recomputes when value or startAt changes; user navigation overrides via .set(). */
|
|
489
|
+
readonly calendarActiveDate: WritableSignal<D>;
|
|
490
|
+
/** Live announcements for screen readers. */
|
|
491
|
+
readonly liveAnnouncement: WritableSignal<string>;
|
|
492
|
+
/** Whether any input is focused. */
|
|
493
|
+
private readonly _inputFocused;
|
|
494
|
+
/** IDs for aria-describedby (set by form-field). */
|
|
495
|
+
private readonly _describedByIds;
|
|
496
|
+
/** Form field appearance (set by form-field). */
|
|
497
|
+
private readonly _appearance;
|
|
498
|
+
/** Whether the date range picker is focused. Implements FormFieldControl. */
|
|
499
|
+
readonly focused: Signal<boolean>;
|
|
500
|
+
/** Whether the label should float. */
|
|
501
|
+
readonly shouldLabelFloat: Signal<boolean>;
|
|
502
|
+
/** Whether the control is in an error state. Implements FormFieldControl. */
|
|
503
|
+
readonly errorState: Signal<boolean>;
|
|
504
|
+
/** Structured validation errors from Signal Forms. */
|
|
505
|
+
readonly errors: Signal<readonly unknown[] | null>;
|
|
506
|
+
/** Unique ID for the control (maps to start input). Implements FormFieldControl. */
|
|
507
|
+
readonly id: Signal<string>;
|
|
508
|
+
/**
|
|
509
|
+
* Effective state combining manual state with automatic error detection.
|
|
510
|
+
*/
|
|
511
|
+
readonly effectiveState: Signal<DatepickerState>;
|
|
512
|
+
/** Combined aria-describedby from form-field. */
|
|
513
|
+
readonly effectiveAriaDescribedBy: Signal<string | null>;
|
|
514
|
+
/** Start input element ID (alias for FormFieldControl id). */
|
|
515
|
+
readonly startInputId: Signal<string>;
|
|
516
|
+
/** End input element ID. */
|
|
517
|
+
readonly endInputId: Signal<string>;
|
|
518
|
+
/** Panel element ID. */
|
|
519
|
+
readonly panelId: Signal<string>;
|
|
520
|
+
/** Whether the datepicker has a value. */
|
|
521
|
+
readonly hasValue: Signal<boolean>;
|
|
522
|
+
/** Icon size based on datepicker size. */
|
|
523
|
+
readonly iconSize: Signal<IconSize>;
|
|
524
|
+
/** Calendar selection (converts DateRangeValue to DateRange for calendar). */
|
|
525
|
+
readonly calendarSelection: Signal<DateRange<D> | null>;
|
|
526
|
+
/** Formatted start display value. */
|
|
527
|
+
readonly startDisplayValue: Signal<string>;
|
|
528
|
+
/** Formatted end display value. */
|
|
529
|
+
readonly endDisplayValue: Signal<string>;
|
|
530
|
+
/** Computed trigger classes. */
|
|
531
|
+
readonly triggerClasses: Signal<string>;
|
|
532
|
+
/** Computed input classes. */
|
|
533
|
+
readonly inputClasses: Signal<string>;
|
|
534
|
+
/** Computed separator classes. */
|
|
535
|
+
readonly separatorClasses: Signal<string>;
|
|
536
|
+
/** Computed icon classes. */
|
|
537
|
+
readonly iconClasses: Signal<string>;
|
|
538
|
+
/** Computed clear button classes. */
|
|
539
|
+
readonly clearClasses: Signal<string>;
|
|
540
|
+
/** Computed panel classes. */
|
|
541
|
+
readonly panelClasses: Signal<string>;
|
|
542
|
+
/** Computed footer classes. */
|
|
543
|
+
readonly footerClasses: Signal<string>;
|
|
544
|
+
/** Computed today button classes. */
|
|
545
|
+
readonly todayButtonClasses: Signal<string>;
|
|
546
|
+
/** Computed clear button classes (footer). */
|
|
547
|
+
readonly clearButtonClasses: Signal<string>;
|
|
548
|
+
/** Time section divider classes. */
|
|
549
|
+
readonly timeSectionClasses: Signal<string>;
|
|
550
|
+
/** Time label classes. */
|
|
551
|
+
readonly timeLabelClasses: Signal<string>;
|
|
552
|
+
/** Start time value derived from the start date. */
|
|
553
|
+
readonly startTimeValue: Signal<ComTimeValue | null>;
|
|
554
|
+
/** End time value derived from the end date. */
|
|
555
|
+
readonly endTimeValue: Signal<ComTimeValue | null>;
|
|
556
|
+
/** Effective display format — switches to dateTime when time picker is shown. */
|
|
557
|
+
readonly effectiveDateFormat: Signal<DateFormatPreset>;
|
|
558
|
+
/** Whether the panel should stay open (keepOpen or time picker shown). */
|
|
559
|
+
readonly effectiveKeepOpen: Signal<boolean>;
|
|
560
|
+
private onChange;
|
|
561
|
+
private onTouched;
|
|
562
|
+
private onValidatorChange;
|
|
563
|
+
constructor();
|
|
564
|
+
ngOnDestroy(): void;
|
|
565
|
+
writeValue(value: DateRangeValue<D> | null): void;
|
|
566
|
+
registerOnChange(fn: (value: DateRangeValue<D> | null) => void): void;
|
|
567
|
+
registerOnTouched(fn: () => void): void;
|
|
568
|
+
setDisabledState(_isDisabled: boolean): void;
|
|
569
|
+
validate(): ValidationErrors | null;
|
|
570
|
+
registerOnValidatorChange(fn: () => void): void;
|
|
571
|
+
/** Opens the datepicker panel. */
|
|
572
|
+
open(): void;
|
|
573
|
+
/** Closes the datepicker panel. */
|
|
574
|
+
close(): void;
|
|
575
|
+
/** Toggles the datepicker panel. */
|
|
576
|
+
toggle(): void;
|
|
577
|
+
/** Clears the selected date range. */
|
|
578
|
+
clear(event?: Event): void;
|
|
579
|
+
/** Selects today's date as the start date. */
|
|
580
|
+
selectToday(): void;
|
|
581
|
+
protected onTriggerClick(): void;
|
|
582
|
+
protected onTriggerKeydown(event: KeyboardEvent): void;
|
|
583
|
+
protected onStartInputFocus(): void;
|
|
584
|
+
protected onEndInputFocus(): void;
|
|
585
|
+
protected onInputKeydown(event: KeyboardEvent, inputType: 'start' | 'end'): void;
|
|
586
|
+
protected onStartInputChange(_event: Event): void;
|
|
587
|
+
protected onEndInputChange(_event: Event): void;
|
|
588
|
+
protected onStartInputBlur(): void;
|
|
589
|
+
protected onEndInputBlur(): void;
|
|
590
|
+
protected onPanelKeydown(event: KeyboardEvent): void;
|
|
591
|
+
protected onCalendarSelectionChange(selection: unknown): void;
|
|
592
|
+
protected onActiveDateChange(date: D): void;
|
|
593
|
+
protected onStartTimeChange(time: ComTimeValue | null): void;
|
|
594
|
+
protected onEndTimeChange(time: ComTimeValue | null): void;
|
|
595
|
+
/**
|
|
596
|
+
* Called when the form field container is clicked.
|
|
597
|
+
* Implements FormFieldControl.
|
|
598
|
+
*/
|
|
599
|
+
onContainerClick(event: MouseEvent): void;
|
|
600
|
+
/**
|
|
601
|
+
* Sets the describedBy IDs from the form field.
|
|
602
|
+
* Called by the parent form field component.
|
|
603
|
+
*/
|
|
604
|
+
setDescribedByIds(ids: string): void;
|
|
605
|
+
/**
|
|
606
|
+
* Sets the appearance for styling.
|
|
607
|
+
* Called by the parent form field component.
|
|
608
|
+
*/
|
|
609
|
+
setAppearance(appearance: FormFieldAppearance): void;
|
|
610
|
+
private createOverlay;
|
|
611
|
+
private destroyOverlay;
|
|
612
|
+
private updateValue;
|
|
613
|
+
private parseAndSetStart;
|
|
614
|
+
private parseAndSetEnd;
|
|
615
|
+
private isDateValid;
|
|
616
|
+
private formatDate;
|
|
617
|
+
private announce;
|
|
618
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ComDateRangePicker<any>, never>;
|
|
619
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ComDateRangePicker<any>, "com-date-range-picker", ["comDateRangePicker"], { "value": { "alias": "value"; "required": false; "isSignal": true; }; "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "dateFilter": { "alias": "dateFilter"; "required": false; "isSignal": true; }; "startAt": { "alias": "startAt"; "required": false; "isSignal": true; }; "startView": { "alias": "startView"; "required": false; "isSignal": true; }; "firstDayOfWeek": { "alias": "firstDayOfWeek"; "required": false; "isSignal": true; }; "startPlaceholder": { "alias": "startPlaceholder"; "required": false; "isSignal": true; }; "endPlaceholder": { "alias": "endPlaceholder"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "dateFormat": { "alias": "dateFormat"; "required": false; "isSignal": true; }; "showClearButton": { "alias": "showClearButton"; "required": false; "isSignal": true; }; "showTodayButton": { "alias": "showTodayButton"; "required": false; "isSignal": true; }; "showFooterClearButton": { "alias": "showFooterClearButton"; "required": false; "isSignal": true; }; "keepOpen": { "alias": "keepOpen"; "required": false; "isSignal": true; }; "allowManualInput": { "alias": "allowManualInput"; "required": false; "isSignal": true; }; "panelClass": { "alias": "panelClass"; "required": false; "isSignal": true; }; "panelWidth": { "alias": "panelWidth"; "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; }; "startAriaLabel": { "alias": "startAriaLabel"; "required": false; "isSignal": true; }; "endAriaLabel": { "alias": "endAriaLabel"; "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; }; "showTimePicker": { "alias": "showTimePicker"; "required": false; "isSignal": true; }; "use12HourFormat": { "alias": "use12HourFormat"; "required": false; "isSignal": true; }; "showSeconds": { "alias": "showSeconds"; "required": false; "isSignal": true; }; "minuteStep": { "alias": "minuteStep"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "touched": "touchedChange"; "rangeChange": "rangeChange"; "opened": "opened"; "closed": "closed"; }, never, never, true, never>;
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
export { ComDateRangePicker, ComDatepicker, createDateRangeValue, datepickerClearVariants, datepickerDisabledVariants, datepickerFooterButtonVariants, datepickerFooterVariants, datepickerIconVariants, datepickerInputVariants, datepickerPanelVariants, datepickerRangeSeparatorVariants, datepickerTriggerVariants, generateDatepickerId };
|
|
623
|
+
export type { DateFormatPreset, DateRangeValue, DatepickerClearVariants, DatepickerDisabledVariants, DatepickerFooterButtonVariants, DatepickerFooterConfig, DatepickerFooterVariants, DatepickerIconVariants, DatepickerInputVariants, DatepickerPanelVariants, DatepickerPanelWidth, DatepickerRangeSeparatorVariants, DatepickerSize, DatepickerState, DatepickerTriggerVariants, DatepickerVariant };
|
|
@@ -90,7 +90,6 @@ interface ComDialogTemplateContext<R = unknown, D = unknown> {
|
|
|
90
90
|
declare class ComDialog {
|
|
91
91
|
private readonly overlay;
|
|
92
92
|
private readonly injector;
|
|
93
|
-
private readonly destroyRef;
|
|
94
93
|
private readonly platformId;
|
|
95
94
|
private readonly document;
|
|
96
95
|
private readonly globalConfig;
|
|
@@ -161,6 +160,8 @@ declare class ComDialogContent implements OnInit {
|
|
|
161
160
|
/**
|
|
162
161
|
* Marks an element as the dialog actions area (footer with buttons).
|
|
163
162
|
*
|
|
163
|
+
* @tokens none
|
|
164
|
+
*
|
|
164
165
|
* @example
|
|
165
166
|
* ```html
|
|
166
167
|
* <div comDialogActions>
|
|
@@ -180,6 +181,8 @@ declare class ComDialogActions {
|
|
|
180
181
|
* Closes the nearest dialog when the host element is clicked.
|
|
181
182
|
* Optionally passes a result value.
|
|
182
183
|
*
|
|
184
|
+
* @tokens none
|
|
185
|
+
*
|
|
183
186
|
* @example
|
|
184
187
|
* ```html
|
|
185
188
|
* <button comButton [comDialogClose]="false">Cancel</button>
|
|
@@ -235,7 +238,7 @@ declare const dialogBackdropVariants: (props?: {
|
|
|
235
238
|
* CVA variants for the dialog panel container.
|
|
236
239
|
*
|
|
237
240
|
* @tokens `--color-popover`, `--color-popover-foreground`, `--color-border`,
|
|
238
|
-
* `--shadow-
|
|
241
|
+
* `--shadow-dialog`, `--radius-overlay`
|
|
239
242
|
*/
|
|
240
243
|
declare const dialogPanelVariants: (props?: {
|
|
241
244
|
size?: 'sm' | 'md' | 'lg' | 'xl' | 'full';
|