ngx-com 0.0.17 → 0.0.19
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/package.json
CHANGED
|
@@ -138,6 +138,16 @@ declare abstract class DateAdapter<D> {
|
|
|
138
138
|
* Checks whether the given date is within the specified range
|
|
139
139
|
*/
|
|
140
140
|
isDateInRange(date: D, start: D | null, end: D | null): boolean;
|
|
141
|
+
/** Gets the hour component of the given date (0-23) */
|
|
142
|
+
abstract getHours(date: D): number;
|
|
143
|
+
/** Gets the minute component of the given date (0-59) */
|
|
144
|
+
abstract getMinutes(date: D): number;
|
|
145
|
+
/** Gets the second component of the given date (0-59) */
|
|
146
|
+
abstract getSeconds(date: D): number;
|
|
147
|
+
/** Returns a new date with the given hour, minute, second set */
|
|
148
|
+
abstract setTime(date: D, hours: number, minutes: number, seconds: number): D;
|
|
149
|
+
/** Creates a date with the given year, month (0-indexed), day, hours, minutes, seconds */
|
|
150
|
+
abstract createDateTime(year: number, month: number, day: number, hours: number, minutes: number, seconds: number): D;
|
|
141
151
|
/**
|
|
142
152
|
* Gets a unique identifier for the date (useful for trackBy)
|
|
143
153
|
*/
|
|
@@ -177,6 +187,11 @@ declare class NativeDateAdapter extends DateAdapter<Date> {
|
|
|
177
187
|
isValid(date: Date): boolean;
|
|
178
188
|
isSameDay(first: Date, second: Date): boolean;
|
|
179
189
|
compareDate(first: Date, second: Date): number;
|
|
190
|
+
getHours(date: Date): number;
|
|
191
|
+
getMinutes(date: Date): number;
|
|
192
|
+
getSeconds(date: Date): number;
|
|
193
|
+
setTime(date: Date, hours: number, minutes: number, seconds: number): Date;
|
|
194
|
+
createDateTime(year: number, month: number, day: number, hours: number, minutes: number, seconds: number): Date;
|
|
180
195
|
clampDate(date: Date, min: Date | null, max: Date | null): Date;
|
|
181
196
|
/**
|
|
182
197
|
* Strips the time component from a date, returning midnight
|
|
@@ -1189,7 +1204,7 @@ declare function provideWeekSelectionStrategy(): Provider;
|
|
|
1189
1204
|
* Types and interfaces for DatePicker and DateRangePicker components.
|
|
1190
1205
|
*/
|
|
1191
1206
|
/** Date format preset names */
|
|
1192
|
-
type DateFormatPreset = 'short' | 'medium' | 'long' | 'full';
|
|
1207
|
+
type DateFormatPreset = 'short' | 'medium' | 'long' | 'full' | 'time' | 'timeWithSeconds' | 'dateTimeShort' | 'dateTimeMedium' | 'dateTimeLong';
|
|
1193
1208
|
/** Panel width configuration */
|
|
1194
1209
|
type DatepickerPanelWidth = 'auto' | 'trigger' | `${number}px` | `${number}rem`;
|
|
1195
1210
|
/** Size variants for datepicker components */
|
|
@@ -1309,6 +1324,37 @@ declare const datepickerRangeSeparatorVariants: (props?: {
|
|
|
1309
1324
|
}) => string;
|
|
1310
1325
|
type DatepickerRangeSeparatorVariants = VariantProps<typeof datepickerRangeSeparatorVariants>;
|
|
1311
1326
|
|
|
1327
|
+
/**
|
|
1328
|
+
* Types and interfaces for the TimePicker component.
|
|
1329
|
+
*/
|
|
1330
|
+
/** Value type for the standalone time picker */
|
|
1331
|
+
interface ComTimeValue {
|
|
1332
|
+
/** Hours (0-23, always stored in 24h format internally) */
|
|
1333
|
+
hours: number;
|
|
1334
|
+
/** Minutes (0-59) */
|
|
1335
|
+
minutes: number;
|
|
1336
|
+
/** Seconds (0-59) */
|
|
1337
|
+
seconds: number;
|
|
1338
|
+
}
|
|
1339
|
+
/** Creates a ComTimeValue */
|
|
1340
|
+
declare function createTimeValue(hours?: number, minutes?: number, seconds?: number): ComTimeValue;
|
|
1341
|
+
/**
|
|
1342
|
+
* Compares two ComTimeValue objects.
|
|
1343
|
+
* @returns negative if a < b, 0 if equal, positive if a > b
|
|
1344
|
+
*/
|
|
1345
|
+
declare function compareTime(a: ComTimeValue, b: ComTimeValue): number;
|
|
1346
|
+
declare function generateTimePickerId(): string;
|
|
1347
|
+
/** Size variants for time picker */
|
|
1348
|
+
type TimePickerSize = 'sm' | 'default' | 'lg';
|
|
1349
|
+
/** Visual variant */
|
|
1350
|
+
type TimePickerVariant = 'standalone' | 'embedded';
|
|
1351
|
+
/** Validation state */
|
|
1352
|
+
type TimePickerState = 'default' | 'error' | 'success';
|
|
1353
|
+
/** Period for 12-hour format */
|
|
1354
|
+
type TimePeriod = 'AM' | 'PM';
|
|
1355
|
+
/** Segment type */
|
|
1356
|
+
type TimeSegment = 'hours' | 'minutes' | 'seconds';
|
|
1357
|
+
|
|
1312
1358
|
/**
|
|
1313
1359
|
* Single date picker component with calendar popup.
|
|
1314
1360
|
* Implements ControlValueAccessor for Reactive Forms and Template-driven Forms.
|
|
@@ -1398,6 +1444,14 @@ declare class ComDatepicker<D> implements ControlValueAccessor, Validator, OnDes
|
|
|
1398
1444
|
readonly ariaLabel: InputSignal<string | null>;
|
|
1399
1445
|
/** ID of element describing the input. */
|
|
1400
1446
|
readonly ariaDescribedBy: InputSignal<string | null>;
|
|
1447
|
+
/** Whether to show the time picker below the calendar. */
|
|
1448
|
+
readonly showTimePicker: InputSignal<boolean>;
|
|
1449
|
+
/** 12h vs 24h format for the time picker. `null` = auto-detect. */
|
|
1450
|
+
readonly use12HourFormat: InputSignal<boolean | null>;
|
|
1451
|
+
/** Whether the time picker shows seconds. */
|
|
1452
|
+
readonly showSeconds: InputSignal<boolean>;
|
|
1453
|
+
/** Step interval for minutes in the time picker. */
|
|
1454
|
+
readonly minuteStep: InputSignal<number>;
|
|
1401
1455
|
/** Emitted when a date is selected. */
|
|
1402
1456
|
readonly dateChange: OutputEmitterRef<D | null>;
|
|
1403
1457
|
/** Emitted when the panel opens. */
|
|
@@ -1438,6 +1492,14 @@ declare class ComDatepicker<D> implements ControlValueAccessor, Validator, OnDes
|
|
|
1438
1492
|
readonly todayButtonClasses: Signal<string>;
|
|
1439
1493
|
/** Computed clear button classes (footer). */
|
|
1440
1494
|
readonly clearButtonClasses: Signal<string>;
|
|
1495
|
+
/** Time section divider classes. */
|
|
1496
|
+
readonly timeSectionClasses: Signal<string>;
|
|
1497
|
+
/** Time value derived from the current date value. */
|
|
1498
|
+
readonly timeValue: Signal<ComTimeValue | null>;
|
|
1499
|
+
/** Effective display format — switches to dateTime when time picker is shown. */
|
|
1500
|
+
readonly effectiveDateFormat: Signal<DateFormatPreset>;
|
|
1501
|
+
/** Whether the panel should stay open (keepOpen or time picker shown). */
|
|
1502
|
+
readonly effectiveKeepOpen: Signal<boolean>;
|
|
1441
1503
|
private onChange;
|
|
1442
1504
|
private onTouched;
|
|
1443
1505
|
private onValidatorChange;
|
|
@@ -1466,6 +1528,7 @@ declare class ComDatepicker<D> implements ControlValueAccessor, Validator, OnDes
|
|
|
1466
1528
|
protected onInputBlur(): void;
|
|
1467
1529
|
protected onPanelKeydown(event: KeyboardEvent): void;
|
|
1468
1530
|
protected onDateSelected(date: D): void;
|
|
1531
|
+
protected onTimeChange(time: ComTimeValue | null): void;
|
|
1469
1532
|
protected onActiveDateChange(date: D): void;
|
|
1470
1533
|
private createOverlay;
|
|
1471
1534
|
private destroyOverlay;
|
|
@@ -1474,7 +1537,7 @@ declare class ComDatepicker<D> implements ControlValueAccessor, Validator, OnDes
|
|
|
1474
1537
|
private isDateValid;
|
|
1475
1538
|
private announce;
|
|
1476
1539
|
static ɵfac: i0.ɵɵFactoryDeclaration<ComDatepicker<any>, never>;
|
|
1477
|
-
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; }; }, { "dateChange": "dateChange"; "opened": "opened"; "closed": "closed"; }, never, never, true, never>;
|
|
1540
|
+
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; }; "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; }; }, { "dateChange": "dateChange"; "opened": "opened"; "closed": "closed"; }, never, never, true, never>;
|
|
1478
1541
|
}
|
|
1479
1542
|
|
|
1480
1543
|
/**
|
|
@@ -1571,6 +1634,14 @@ declare class ComDateRangePicker<D> implements ControlValueAccessor, Validator,
|
|
|
1571
1634
|
readonly startAriaLabel: InputSignal<string | null>;
|
|
1572
1635
|
/** Accessible label for the end input. */
|
|
1573
1636
|
readonly endAriaLabel: InputSignal<string | null>;
|
|
1637
|
+
/** Whether to show time pickers below the calendar. */
|
|
1638
|
+
readonly showTimePicker: InputSignal<boolean>;
|
|
1639
|
+
/** 12h vs 24h format for the time pickers. `null` = auto-detect. */
|
|
1640
|
+
readonly use12HourFormat: InputSignal<boolean | null>;
|
|
1641
|
+
/** Whether the time pickers show seconds. */
|
|
1642
|
+
readonly showSeconds: InputSignal<boolean>;
|
|
1643
|
+
/** Step interval for minutes in the time pickers. */
|
|
1644
|
+
readonly minuteStep: InputSignal<number>;
|
|
1574
1645
|
/** Emitted when a complete range is selected. */
|
|
1575
1646
|
readonly rangeChange: OutputEmitterRef<DateRangeValue<D> | null>;
|
|
1576
1647
|
/** Emitted when the panel opens. */
|
|
@@ -1621,6 +1692,18 @@ declare class ComDateRangePicker<D> implements ControlValueAccessor, Validator,
|
|
|
1621
1692
|
readonly todayButtonClasses: Signal<string>;
|
|
1622
1693
|
/** Computed clear button classes (footer). */
|
|
1623
1694
|
readonly clearButtonClasses: Signal<string>;
|
|
1695
|
+
/** Time section divider classes. */
|
|
1696
|
+
readonly timeSectionClasses: Signal<string>;
|
|
1697
|
+
/** Time label classes. */
|
|
1698
|
+
readonly timeLabelClasses: Signal<string>;
|
|
1699
|
+
/** Start time value derived from the start date. */
|
|
1700
|
+
readonly startTimeValue: Signal<ComTimeValue | null>;
|
|
1701
|
+
/** End time value derived from the end date. */
|
|
1702
|
+
readonly endTimeValue: Signal<ComTimeValue | null>;
|
|
1703
|
+
/** Effective display format — switches to dateTime when time picker is shown. */
|
|
1704
|
+
readonly effectiveDateFormat: Signal<DateFormatPreset>;
|
|
1705
|
+
/** Whether the panel should stay open (keepOpen or time picker shown). */
|
|
1706
|
+
readonly effectiveKeepOpen: Signal<boolean>;
|
|
1624
1707
|
private onChange;
|
|
1625
1708
|
private onTouched;
|
|
1626
1709
|
private onValidatorChange;
|
|
@@ -1654,6 +1737,8 @@ declare class ComDateRangePicker<D> implements ControlValueAccessor, Validator,
|
|
|
1654
1737
|
protected onPanelKeydown(event: KeyboardEvent): void;
|
|
1655
1738
|
protected onCalendarSelectionChange(selection: unknown): void;
|
|
1656
1739
|
protected onActiveDateChange(date: D): void;
|
|
1740
|
+
protected onStartTimeChange(time: ComTimeValue | null): void;
|
|
1741
|
+
protected onEndTimeChange(time: ComTimeValue | null): void;
|
|
1657
1742
|
private createOverlay;
|
|
1658
1743
|
private destroyOverlay;
|
|
1659
1744
|
private updateValue;
|
|
@@ -1663,8 +1748,199 @@ declare class ComDateRangePicker<D> implements ControlValueAccessor, Validator,
|
|
|
1663
1748
|
private formatDate;
|
|
1664
1749
|
private announce;
|
|
1665
1750
|
static ɵfac: i0.ɵɵFactoryDeclaration<ComDateRangePicker<any>, never>;
|
|
1666
|
-
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; }; }, { "rangeChange": "rangeChange"; "opened": "opened"; "closed": "closed"; }, never, never, true, never>;
|
|
1751
|
+
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; }; "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; }; }, { "rangeChange": "rangeChange"; "opened": "opened"; "closed": "closed"; }, never, never, true, never>;
|
|
1752
|
+
}
|
|
1753
|
+
|
|
1754
|
+
/**
|
|
1755
|
+
* CVA variants for the time picker container.
|
|
1756
|
+
*
|
|
1757
|
+
* @tokens `--color-input-background`, `--color-input-foreground`, `--color-input-border`,
|
|
1758
|
+
* `--color-ring`, `--color-warn`, `--color-success`, `--radius-input`
|
|
1759
|
+
*/
|
|
1760
|
+
declare const timepickerContainerVariants: (props?: {
|
|
1761
|
+
variant?: TimePickerVariant;
|
|
1762
|
+
size?: TimePickerSize;
|
|
1763
|
+
state?: TimePickerState;
|
|
1764
|
+
}) => string;
|
|
1765
|
+
type TimepickerContainerVariants = VariantProps<typeof timepickerContainerVariants>;
|
|
1766
|
+
/**
|
|
1767
|
+
* CVA variants for the disabled state of time picker.
|
|
1768
|
+
*
|
|
1769
|
+
* @tokens `--color-disabled`, `--color-disabled-foreground`
|
|
1770
|
+
*/
|
|
1771
|
+
declare const timepickerDisabledVariants: () => string;
|
|
1772
|
+
type TimepickerDisabledVariants = VariantProps<typeof timepickerDisabledVariants>;
|
|
1773
|
+
/**
|
|
1774
|
+
* CVA variants for each time segment input.
|
|
1775
|
+
*
|
|
1776
|
+
* @tokens `--color-primary-subtle`, `--color-primary-subtle-foreground`, `--radius-interactive-sm`
|
|
1777
|
+
*/
|
|
1778
|
+
declare const timepickerSegmentVariants: (props?: {
|
|
1779
|
+
size?: TimePickerSize;
|
|
1780
|
+
}) => string;
|
|
1781
|
+
type TimepickerSegmentVariants = VariantProps<typeof timepickerSegmentVariants>;
|
|
1782
|
+
/**
|
|
1783
|
+
* CVA variants for the colon separator.
|
|
1784
|
+
*
|
|
1785
|
+
* @tokens `--color-muted-foreground`
|
|
1786
|
+
*/
|
|
1787
|
+
declare const timepickerSeparatorVariants: (props?: {
|
|
1788
|
+
size?: TimePickerSize;
|
|
1789
|
+
}) => string;
|
|
1790
|
+
type TimepickerSeparatorVariants = VariantProps<typeof timepickerSeparatorVariants>;
|
|
1791
|
+
/**
|
|
1792
|
+
* CVA variants for the AM/PM toggle button.
|
|
1793
|
+
*
|
|
1794
|
+
* @tokens `--color-muted`, `--color-muted-foreground`, `--color-muted-hover`, `--color-ring`,
|
|
1795
|
+
* `--radius-control-sm`
|
|
1796
|
+
*/
|
|
1797
|
+
declare const timepickerPeriodVariants: (props?: {
|
|
1798
|
+
size?: TimePickerSize;
|
|
1799
|
+
}) => string;
|
|
1800
|
+
type TimepickerPeriodVariants = VariantProps<typeof timepickerPeriodVariants>;
|
|
1801
|
+
/**
|
|
1802
|
+
* CVA variants for the time section divider in datepicker panel.
|
|
1803
|
+
*
|
|
1804
|
+
* @tokens `--color-border-subtle`
|
|
1805
|
+
*/
|
|
1806
|
+
declare const timepickerSectionVariants: (props?: {
|
|
1807
|
+
size?: TimePickerSize;
|
|
1808
|
+
}) => string;
|
|
1809
|
+
type TimepickerSectionVariants = VariantProps<typeof timepickerSectionVariants>;
|
|
1810
|
+
/**
|
|
1811
|
+
* CVA variants for time labels in date range picker.
|
|
1812
|
+
*
|
|
1813
|
+
* @tokens `--color-muted-foreground`
|
|
1814
|
+
*/
|
|
1815
|
+
declare const timepickerLabelVariants: (props?: {
|
|
1816
|
+
size?: TimePickerSize;
|
|
1817
|
+
}) => string;
|
|
1818
|
+
type TimepickerLabelVariants = VariantProps<typeof timepickerLabelVariants>;
|
|
1819
|
+
|
|
1820
|
+
/**
|
|
1821
|
+
* Time picker component with segmented numeric input fields.
|
|
1822
|
+
* Supports standalone usage with ControlValueAccessor and embedded usage
|
|
1823
|
+
* within datepicker/date-range-picker panels.
|
|
1824
|
+
*
|
|
1825
|
+
* Visual layout: `[HH] : [MM] : [SS] [AM|PM]`
|
|
1826
|
+
*
|
|
1827
|
+
* @tokens `--color-input-background`, `--color-input-foreground`, `--color-input-border`,
|
|
1828
|
+
* `--color-ring`, `--color-primary-subtle`, `--color-primary-subtle-foreground`,
|
|
1829
|
+
* `--color-muted`, `--color-muted-foreground`, `--color-muted-hover`,
|
|
1830
|
+
* `--color-disabled`, `--color-disabled-foreground`,
|
|
1831
|
+
* `--color-warn`, `--color-success`, `--color-border`
|
|
1832
|
+
*
|
|
1833
|
+
* @example
|
|
1834
|
+
* ```html
|
|
1835
|
+
* <!-- Standalone with reactive forms -->
|
|
1836
|
+
* <com-time-picker formControlName="startTime" />
|
|
1837
|
+
*
|
|
1838
|
+
* <!-- 12-hour format with seconds -->
|
|
1839
|
+
* <com-time-picker formControlName="alarm" [use12HourFormat]="true" [showSeconds]="true" />
|
|
1840
|
+
*
|
|
1841
|
+
* <!-- 15-minute steps -->
|
|
1842
|
+
* <com-time-picker formControlName="meeting" [minuteStep]="15" />
|
|
1843
|
+
*
|
|
1844
|
+
* <!-- Embedded inside datepicker panel -->
|
|
1845
|
+
* <com-time-picker variant="embedded" [value]="time" (timeChange)="onTime($event)" />
|
|
1846
|
+
* ```
|
|
1847
|
+
*/
|
|
1848
|
+
declare class ComTimePicker implements ControlValueAccessor, Validator {
|
|
1849
|
+
private readonly localeId;
|
|
1850
|
+
private readonly ngControl;
|
|
1851
|
+
private readonly timepickerId;
|
|
1852
|
+
private readonly hoursInputRef;
|
|
1853
|
+
private readonly minutesInputRef;
|
|
1854
|
+
private readonly secondsInputRef;
|
|
1855
|
+
private readonly periodButtonRef;
|
|
1856
|
+
/** Current time value. */
|
|
1857
|
+
readonly value: InputSignal<ComTimeValue | null>;
|
|
1858
|
+
/** Whether the time picker is disabled. */
|
|
1859
|
+
readonly disabled: InputSignal<boolean>;
|
|
1860
|
+
/** Whether the time picker is required. */
|
|
1861
|
+
readonly required: InputSignal<boolean>;
|
|
1862
|
+
/** Whether to show the seconds segment. */
|
|
1863
|
+
readonly showSeconds: InputSignal<boolean>;
|
|
1864
|
+
/** 12h vs 24h format. `null` = auto-detect from locale. */
|
|
1865
|
+
readonly use12HourFormat: InputSignal<boolean | null>;
|
|
1866
|
+
/** Step interval for minutes. */
|
|
1867
|
+
readonly minuteStep: InputSignal<number>;
|
|
1868
|
+
/** Step interval for seconds. */
|
|
1869
|
+
readonly secondStep: InputSignal<number>;
|
|
1870
|
+
/** Minimum selectable time. */
|
|
1871
|
+
readonly minTime: InputSignal<ComTimeValue | null>;
|
|
1872
|
+
/** Maximum selectable time. */
|
|
1873
|
+
readonly maxTime: InputSignal<ComTimeValue | null>;
|
|
1874
|
+
/** Visual variant. */
|
|
1875
|
+
readonly variant: InputSignal<TimePickerVariant>;
|
|
1876
|
+
/** Size variant. */
|
|
1877
|
+
readonly size: InputSignal<TimePickerSize>;
|
|
1878
|
+
/** Validation state. */
|
|
1879
|
+
readonly state: InputSignal<TimePickerState>;
|
|
1880
|
+
/** Accessible label for the group. */
|
|
1881
|
+
readonly ariaLabel: InputSignal<string | null>;
|
|
1882
|
+
/** Additional CSS classes. */
|
|
1883
|
+
readonly userClass: InputSignal<string>;
|
|
1884
|
+
/** Placeholder text for empty segments. */
|
|
1885
|
+
readonly placeholder: InputSignal<string>;
|
|
1886
|
+
/** Emitted when time value changes. */
|
|
1887
|
+
readonly timeChange: OutputEmitterRef<ComTimeValue | null>;
|
|
1888
|
+
/** Internal value state. */
|
|
1889
|
+
readonly internalValue: WritableSignal<ComTimeValue | null>;
|
|
1890
|
+
/** Which segment is currently focused. */
|
|
1891
|
+
readonly activeSegment: WritableSignal<TimeSegment | 'period' | null>;
|
|
1892
|
+
/** Pending typed digits for auto-advance. */
|
|
1893
|
+
readonly pendingDigits: WritableSignal<string>;
|
|
1894
|
+
/** Live announcements for screen readers. */
|
|
1895
|
+
readonly liveAnnouncement: WritableSignal<string>;
|
|
1896
|
+
/** Whether to use 12-hour format. */
|
|
1897
|
+
readonly is12Hour: Signal<boolean>;
|
|
1898
|
+
/** Current period (AM/PM). */
|
|
1899
|
+
readonly period: Signal<TimePeriod>;
|
|
1900
|
+
/** Display hours (converted from 24h to 12h when needed). */
|
|
1901
|
+
readonly displayHours: Signal<number | null>;
|
|
1902
|
+
/** Formatted hours string. */
|
|
1903
|
+
readonly formattedHours: Signal<string>;
|
|
1904
|
+
/** Formatted minutes string. */
|
|
1905
|
+
readonly formattedMinutes: Signal<string>;
|
|
1906
|
+
/** Formatted seconds string. */
|
|
1907
|
+
readonly formattedSeconds: Signal<string>;
|
|
1908
|
+
/** Container classes. */
|
|
1909
|
+
readonly containerClasses: Signal<string>;
|
|
1910
|
+
/** Segment input classes. */
|
|
1911
|
+
readonly segmentClasses: Signal<string>;
|
|
1912
|
+
/** Separator classes. */
|
|
1913
|
+
readonly separatorClasses: Signal<string>;
|
|
1914
|
+
/** Period button classes. */
|
|
1915
|
+
readonly periodClasses: Signal<string>;
|
|
1916
|
+
private onChange;
|
|
1917
|
+
private onTouched;
|
|
1918
|
+
private onValidatorChange;
|
|
1919
|
+
constructor();
|
|
1920
|
+
writeValue(value: ComTimeValue | null): void;
|
|
1921
|
+
registerOnChange(fn: (value: ComTimeValue | null) => void): void;
|
|
1922
|
+
registerOnTouched(fn: () => void): void;
|
|
1923
|
+
setDisabledState(_isDisabled: boolean): void;
|
|
1924
|
+
validate(): ValidationErrors | null;
|
|
1925
|
+
registerOnValidatorChange(fn: () => void): void;
|
|
1926
|
+
protected onSegmentFocus(segment: TimeSegment): void;
|
|
1927
|
+
protected onSegmentBlur(segment: TimeSegment): void;
|
|
1928
|
+
protected onSegmentInput(event: Event, segment: TimeSegment): void;
|
|
1929
|
+
protected onSegmentKeydown(event: KeyboardEvent, segment: TimeSegment): void;
|
|
1930
|
+
protected onPeriodKeydown(event: KeyboardEvent): void;
|
|
1931
|
+
protected togglePeriod(): void;
|
|
1932
|
+
private setPeriod;
|
|
1933
|
+
private incrementSegment;
|
|
1934
|
+
private handleDigitInput;
|
|
1935
|
+
private snapToStep;
|
|
1936
|
+
private setSegmentToMin;
|
|
1937
|
+
private setSegmentToMax;
|
|
1938
|
+
private focusNextSegment;
|
|
1939
|
+
private focusPrevSegment;
|
|
1940
|
+
private updateValue;
|
|
1941
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ComTimePicker, never>;
|
|
1942
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ComTimePicker, "com-time-picker", ["comTimePicker"], { "value": { "alias": "value"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "showSeconds": { "alias": "showSeconds"; "required": false; "isSignal": true; }; "use12HourFormat": { "alias": "use12HourFormat"; "required": false; "isSignal": true; }; "minuteStep": { "alias": "minuteStep"; "required": false; "isSignal": true; }; "secondStep": { "alias": "secondStep"; "required": false; "isSignal": true; }; "minTime": { "alias": "minTime"; "required": false; "isSignal": true; }; "maxTime": { "alias": "maxTime"; "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; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "userClass": { "alias": "class"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; }, { "timeChange": "timeChange"; }, never, never, true, never>;
|
|
1667
1943
|
}
|
|
1668
1944
|
|
|
1669
|
-
export { CALENDAR_SELECTION_STRATEGY, CalendarSelectionStrategy, CalendarViewBase, ComCalendar, ComCalendarCell, ComCalendarHeader, ComCalendarMonthView, ComCalendarMultiYearView, ComCalendarYearView, ComDateRangePicker, ComDatepicker, DATE_ADAPTER, DAYS_PER_WEEK, DateAdapter, MONTHS_PER_ROW, MultiSelectionStrategy, NativeDateAdapter, RangeSelectionStrategy, SingleSelectionStrategy, WEEKS_PER_MONTH, WeekSelectionStrategy, YEARS_PER_PAGE, YEARS_PER_ROW, calendarCellVariants, calendarCellWrapperVariants, calendarHeaderButtonVariants, calendarHeaderVariants, calendarVariants, createCalendarCell, createDateRange, createDateRangeValue, createGrid, datepickerClearVariants, datepickerDisabledVariants, datepickerFooterButtonVariants, datepickerFooterVariants, datepickerIconVariants, datepickerInputVariants, datepickerPanelVariants, datepickerRangeSeparatorVariants, datepickerTriggerVariants, generateDatepickerId, getMultiYearStartingYear, getWeekdayHeaders, isDateDisabled, isMonthDisabled, isYearDisabled, navigateGrid, provideMultiSelectionStrategy, provideNativeDateAdapter, provideRangeSelectionStrategy, provideSingleSelectionStrategy, provideWeekSelectionStrategy };
|
|
1670
|
-
export type { CalendarCell, CalendarCellConfig, CalendarCellKeyNavEvent, CalendarCellState, CalendarCellVariants, CalendarCellWrapperVariants, CalendarHeaderButtonVariants, CalendarHeaderVariants, CalendarVariants, CalendarView, DateClassFn, DateFilterFn, DateFormatPreset, DateRange, DateRangeValue, DatepickerClearVariants, DatepickerDisabledVariants, DatepickerFooterButtonVariants, DatepickerFooterConfig, DatepickerFooterVariants, DatepickerIconVariants, DatepickerInputVariants, DatepickerPanelVariants, DatepickerPanelWidth, DatepickerRangeSeparatorVariants, DatepickerSize, DatepickerState, DatepickerTriggerVariants, DatepickerVariant, NameStyle, SelectionResult, WeekdayHeader };
|
|
1945
|
+
export { CALENDAR_SELECTION_STRATEGY, CalendarSelectionStrategy, CalendarViewBase, ComCalendar, ComCalendarCell, ComCalendarHeader, ComCalendarMonthView, ComCalendarMultiYearView, ComCalendarYearView, ComDateRangePicker, ComDatepicker, ComTimePicker, DATE_ADAPTER, DAYS_PER_WEEK, DateAdapter, MONTHS_PER_ROW, MultiSelectionStrategy, NativeDateAdapter, RangeSelectionStrategy, SingleSelectionStrategy, WEEKS_PER_MONTH, WeekSelectionStrategy, YEARS_PER_PAGE, YEARS_PER_ROW, calendarCellVariants, calendarCellWrapperVariants, calendarHeaderButtonVariants, calendarHeaderVariants, calendarVariants, compareTime, createCalendarCell, createDateRange, createDateRangeValue, createGrid, createTimeValue, datepickerClearVariants, datepickerDisabledVariants, datepickerFooterButtonVariants, datepickerFooterVariants, datepickerIconVariants, datepickerInputVariants, datepickerPanelVariants, datepickerRangeSeparatorVariants, datepickerTriggerVariants, generateDatepickerId, generateTimePickerId, getMultiYearStartingYear, getWeekdayHeaders, isDateDisabled, isMonthDisabled, isYearDisabled, navigateGrid, provideMultiSelectionStrategy, provideNativeDateAdapter, provideRangeSelectionStrategy, provideSingleSelectionStrategy, provideWeekSelectionStrategy, timepickerContainerVariants, timepickerDisabledVariants, timepickerLabelVariants, timepickerPeriodVariants, timepickerSectionVariants, timepickerSegmentVariants, timepickerSeparatorVariants };
|
|
1946
|
+
export type { CalendarCell, CalendarCellConfig, CalendarCellKeyNavEvent, CalendarCellState, CalendarCellVariants, CalendarCellWrapperVariants, CalendarHeaderButtonVariants, CalendarHeaderVariants, CalendarVariants, CalendarView, ComTimeValue, DateClassFn, DateFilterFn, DateFormatPreset, DateRange, DateRangeValue, DatepickerClearVariants, DatepickerDisabledVariants, DatepickerFooterButtonVariants, DatepickerFooterConfig, DatepickerFooterVariants, DatepickerIconVariants, DatepickerInputVariants, DatepickerPanelVariants, DatepickerPanelWidth, DatepickerRangeSeparatorVariants, DatepickerSize, DatepickerState, DatepickerTriggerVariants, DatepickerVariant, NameStyle, SelectionResult, TimePeriod, TimePickerSize, TimePickerState, TimePickerVariant, TimeSegment, TimepickerContainerVariants, TimepickerDisabledVariants, TimepickerLabelVariants, TimepickerPeriodVariants, TimepickerSectionVariants, TimepickerSegmentVariants, TimepickerSeparatorVariants, WeekdayHeader };
|