@area8975/ui 0.2.2-dev.48 → 0.2.2-dev.50
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 +3 -2
- package/fesm2022/area8975-ui-alert.mjs +113 -0
- package/fesm2022/area8975-ui-alert.mjs.map +1 -0
- package/fesm2022/area8975-ui-avatar.mjs +157 -0
- package/fesm2022/area8975-ui-avatar.mjs.map +1 -0
- package/fesm2022/area8975-ui-badge.mjs +116 -0
- package/fesm2022/area8975-ui-badge.mjs.map +1 -0
- package/fesm2022/area8975-ui-button.mjs +314 -0
- package/fesm2022/area8975-ui-button.mjs.map +1 -0
- package/fesm2022/area8975-ui-calendar.mjs +549 -0
- package/fesm2022/area8975-ui-calendar.mjs.map +1 -0
- package/fesm2022/area8975-ui-card-header.mjs +96 -0
- package/fesm2022/area8975-ui-card-header.mjs.map +1 -0
- package/fesm2022/area8975-ui-card.mjs +73 -0
- package/fesm2022/area8975-ui-card.mjs.map +1 -0
- package/fesm2022/area8975-ui-chart-palette.mjs +225 -0
- package/fesm2022/area8975-ui-chart-palette.mjs.map +1 -0
- package/fesm2022/area8975-ui-charts.mjs +2813 -0
- package/fesm2022/area8975-ui-charts.mjs.map +1 -0
- package/fesm2022/area8975-ui-checkbox.mjs +202 -0
- package/fesm2022/area8975-ui-checkbox.mjs.map +1 -0
- package/fesm2022/area8975-ui-colour.mjs +200 -0
- package/fesm2022/area8975-ui-colour.mjs.map +1 -0
- package/fesm2022/area8975-ui-container.mjs +40 -0
- package/fesm2022/area8975-ui-container.mjs.map +1 -0
- package/fesm2022/area8975-ui-counter.mjs +246 -0
- package/fesm2022/area8975-ui-counter.mjs.map +1 -0
- package/fesm2022/area8975-ui-date-range-picker.mjs +554 -0
- package/fesm2022/area8975-ui-date-range-picker.mjs.map +1 -0
- package/fesm2022/area8975-ui-datepicker.mjs +547 -0
- package/fesm2022/area8975-ui-datepicker.mjs.map +1 -0
- package/fesm2022/area8975-ui-disclosure.mjs +279 -0
- package/fesm2022/area8975-ui-disclosure.mjs.map +1 -0
- package/fesm2022/area8975-ui-drawer.mjs +106 -0
- package/fesm2022/area8975-ui-drawer.mjs.map +1 -0
- package/fesm2022/area8975-ui-dropdown-button.mjs +141 -0
- package/fesm2022/area8975-ui-dropdown-button.mjs.map +1 -0
- package/fesm2022/area8975-ui-dropdown-menu.mjs +96 -0
- package/fesm2022/area8975-ui-dropdown-menu.mjs.map +1 -0
- package/fesm2022/area8975-ui-dropdown.mjs +208 -0
- package/fesm2022/area8975-ui-dropdown.mjs.map +1 -0
- package/fesm2022/area8975-ui-dropzone.mjs +332 -0
- package/fesm2022/area8975-ui-dropzone.mjs.map +1 -0
- package/fesm2022/area8975-ui-field.mjs +191 -0
- package/fesm2022/area8975-ui-field.mjs.map +1 -0
- package/fesm2022/area8975-ui-file-input.mjs +340 -0
- package/fesm2022/area8975-ui-file-input.mjs.map +1 -0
- package/fesm2022/area8975-ui-file.mjs +47 -0
- package/fesm2022/area8975-ui-file.mjs.map +1 -0
- package/fesm2022/area8975-ui-format.mjs +70 -0
- package/fesm2022/area8975-ui-format.mjs.map +1 -0
- package/fesm2022/area8975-ui-input-addon.mjs +42 -0
- package/fesm2022/area8975-ui-input-addon.mjs.map +1 -0
- package/fesm2022/area8975-ui-input-group.mjs +86 -0
- package/fesm2022/area8975-ui-input-group.mjs.map +1 -0
- package/fesm2022/area8975-ui-input.mjs +682 -0
- package/fesm2022/area8975-ui-input.mjs.map +1 -0
- package/fesm2022/area8975-ui-kpi.mjs +167 -0
- package/fesm2022/area8975-ui-kpi.mjs.map +1 -0
- package/fesm2022/area8975-ui-layout.mjs +63 -0
- package/fesm2022/area8975-ui-layout.mjs.map +1 -0
- package/fesm2022/area8975-ui-loading.mjs +76 -0
- package/fesm2022/area8975-ui-loading.mjs.map +1 -0
- package/fesm2022/area8975-ui-modal-close-btn.mjs +89 -0
- package/fesm2022/area8975-ui-modal-close-btn.mjs.map +1 -0
- package/fesm2022/area8975-ui-modal.mjs +235 -0
- package/fesm2022/area8975-ui-modal.mjs.map +1 -0
- package/fesm2022/area8975-ui-money.mjs +230 -0
- package/fesm2022/area8975-ui-money.mjs.map +1 -0
- package/fesm2022/area8975-ui-overlay.mjs +317 -0
- package/fesm2022/area8975-ui-overlay.mjs.map +1 -0
- package/fesm2022/area8975-ui-pagination.mjs +152 -0
- package/fesm2022/area8975-ui-pagination.mjs.map +1 -0
- package/fesm2022/area8975-ui-private.mjs +63 -0
- package/fesm2022/area8975-ui-private.mjs.map +1 -0
- package/fesm2022/area8975-ui-progress.mjs +307 -0
- package/fesm2022/area8975-ui-progress.mjs.map +1 -0
- package/fesm2022/area8975-ui-radio.mjs +199 -0
- package/fesm2022/area8975-ui-radio.mjs.map +1 -0
- package/fesm2022/area8975-ui-rich-text-editor.mjs +778 -0
- package/fesm2022/area8975-ui-rich-text-editor.mjs.map +1 -0
- package/fesm2022/area8975-ui-search.mjs +266 -0
- package/fesm2022/area8975-ui-search.mjs.map +1 -0
- package/fesm2022/area8975-ui-segmented.mjs +118 -0
- package/fesm2022/area8975-ui-segmented.mjs.map +1 -0
- package/fesm2022/area8975-ui-select.mjs +926 -0
- package/fesm2022/area8975-ui-select.mjs.map +1 -0
- package/fesm2022/area8975-ui-sidebar-group.mjs +60 -0
- package/fesm2022/area8975-ui-sidebar-group.mjs.map +1 -0
- package/fesm2022/area8975-ui-sidebar-item.mjs +107 -0
- package/fesm2022/area8975-ui-sidebar-item.mjs.map +1 -0
- package/fesm2022/area8975-ui-sidebar.mjs +109 -0
- package/fesm2022/area8975-ui-sidebar.mjs.map +1 -0
- package/fesm2022/area8975-ui-skeleton.mjs +116 -0
- package/fesm2022/area8975-ui-skeleton.mjs.map +1 -0
- package/fesm2022/area8975-ui-stat.mjs +55 -0
- package/fesm2022/area8975-ui-stat.mjs.map +1 -0
- package/fesm2022/area8975-ui-switch.mjs +132 -0
- package/fesm2022/area8975-ui-switch.mjs.map +1 -0
- package/fesm2022/area8975-ui-tab.mjs +217 -0
- package/fesm2022/area8975-ui-tab.mjs.map +1 -0
- package/fesm2022/area8975-ui-table-filters.mjs +499 -0
- package/fesm2022/area8975-ui-table-filters.mjs.map +1 -0
- package/fesm2022/area8975-ui-table.mjs +1237 -0
- package/fesm2022/area8975-ui-table.mjs.map +1 -0
- package/fesm2022/area8975-ui-textarea.mjs +375 -0
- package/fesm2022/area8975-ui-textarea.mjs.map +1 -0
- package/fesm2022/area8975-ui-theme.mjs +246 -0
- package/fesm2022/area8975-ui-theme.mjs.map +1 -0
- package/fesm2022/area8975-ui-time-select.mjs +170 -0
- package/fesm2022/area8975-ui-time-select.mjs.map +1 -0
- package/fesm2022/area8975-ui-toast.mjs +269 -0
- package/fesm2022/area8975-ui-toast.mjs.map +1 -0
- package/fesm2022/area8975-ui-toaster.mjs +117 -0
- package/fesm2022/area8975-ui-toaster.mjs.map +1 -0
- package/fesm2022/area8975-ui-tooltip.mjs +196 -0
- package/fesm2022/area8975-ui-tooltip.mjs.map +1 -0
- package/fesm2022/area8975-ui-user-menu.mjs +186 -0
- package/fesm2022/area8975-ui-user-menu.mjs.map +1 -0
- package/fesm2022/area8975-ui.mjs +0 -16269
- package/package.json +237 -1
- package/types/area8975-ui-alert.d.ts +25 -0
- package/types/area8975-ui-avatar.d.ts +40 -0
- package/types/area8975-ui-badge.d.ts +31 -0
- package/types/area8975-ui-button.d.ts +129 -0
- package/types/area8975-ui-calendar.d.ts +177 -0
- package/types/area8975-ui-card-header.d.ts +28 -0
- package/types/area8975-ui-card.d.ts +18 -0
- package/types/area8975-ui-chart-palette.d.ts +176 -0
- package/types/area8975-ui-charts.d.ts +747 -0
- package/types/area8975-ui-checkbox.d.ts +61 -0
- package/types/area8975-ui-colour.d.ts +31 -0
- package/types/area8975-ui-container.d.ts +5 -0
- package/types/area8975-ui-counter.d.ts +43 -0
- package/types/area8975-ui-date-range-picker.d.ts +132 -0
- package/types/area8975-ui-datepicker.d.ts +124 -0
- package/types/area8975-ui-disclosure.d.ts +79 -0
- package/types/area8975-ui-drawer.d.ts +25 -0
- package/types/area8975-ui-dropdown-button.d.ts +32 -0
- package/types/area8975-ui-dropdown-menu.d.ts +25 -0
- package/types/area8975-ui-dropdown.d.ts +56 -0
- package/types/area8975-ui-dropzone.d.ts +96 -0
- package/types/area8975-ui-field.d.ts +72 -0
- package/types/area8975-ui-file-input.d.ts +72 -0
- package/types/area8975-ui-file.d.ts +21 -0
- package/types/area8975-ui-format.d.ts +37 -0
- package/types/area8975-ui-input-addon.d.ts +10 -0
- package/types/area8975-ui-input-group.d.ts +18 -0
- package/types/area8975-ui-input.d.ts +224 -0
- package/types/area8975-ui-kpi.d.ts +36 -0
- package/types/area8975-ui-layout.d.ts +7 -0
- package/types/area8975-ui-loading.d.ts +16 -0
- package/types/area8975-ui-modal-close-btn.d.ts +14 -0
- package/types/area8975-ui-modal.d.ts +45 -0
- package/types/area8975-ui-money.d.ts +77 -0
- package/types/area8975-ui-overlay.d.ts +75 -0
- package/types/area8975-ui-pagination.d.ts +27 -0
- package/types/area8975-ui-private.d.ts +20 -0
- package/types/area8975-ui-progress.d.ts +127 -0
- package/types/area8975-ui-radio.d.ts +61 -0
- package/types/area8975-ui-rich-text-editor.d.ts +165 -0
- package/types/area8975-ui-search.d.ts +56 -0
- package/types/area8975-ui-segmented.d.ts +41 -0
- package/types/area8975-ui-select.d.ts +293 -0
- package/types/area8975-ui-sidebar-group.d.ts +15 -0
- package/types/area8975-ui-sidebar-item.d.ts +20 -0
- package/types/area8975-ui-sidebar.d.ts +16 -0
- package/types/area8975-ui-skeleton.d.ts +35 -0
- package/types/area8975-ui-stat.d.ts +13 -0
- package/types/area8975-ui-switch.d.ts +32 -0
- package/types/area8975-ui-tab.d.ts +45 -0
- package/types/area8975-ui-table-filters.d.ts +138 -0
- package/types/area8975-ui-table.d.ts +371 -0
- package/types/area8975-ui-textarea.d.ts +126 -0
- package/types/area8975-ui-theme.d.ts +61 -0
- package/types/area8975-ui-time-select.d.ts +35 -0
- package/types/area8975-ui-toast.d.ts +78 -0
- package/types/area8975-ui-toaster.d.ts +23 -0
- package/types/area8975-ui-tooltip.d.ts +47 -0
- package/types/area8975-ui-user-menu.d.ts +39 -0
- package/types/area8975-ui.d.ts +1 -4464
- package/fesm2022/area8975-ui.mjs.map +0 -1
|
@@ -0,0 +1,547 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { Component, ElementRef, Injector, afterNextRender, booleanAttribute, computed, inject, input, model, signal, viewChild } from "@angular/core";
|
|
3
|
+
import { UiButtonComponent } from "@area8975/ui/button";
|
|
4
|
+
import { UiCalendarComponent, parseIsoDateTime, parseTime, toIsoDate } from "@area8975/ui/calendar";
|
|
5
|
+
import { UiCardComponent } from "@area8975/ui/card";
|
|
6
|
+
import { UiDropdownComponent, UiDropdownDirective } from "@area8975/ui/dropdown";
|
|
7
|
+
import { UiInputComponent } from "@area8975/ui/input";
|
|
8
|
+
import { UiTimeSelectComponent } from "@area8975/ui/time-select";
|
|
9
|
+
import { NgIcon, provideIcons } from "@ng-icons/core";
|
|
10
|
+
import { heroCalendar, heroXMark } from "@ng-icons/heroicons/outline";
|
|
11
|
+
const OPEN_KEYS = [
|
|
12
|
+
"Enter",
|
|
13
|
+
" ",
|
|
14
|
+
"ArrowDown"
|
|
15
|
+
];
|
|
16
|
+
var UiDatepickerComponent = class UiDatepickerComponent {
|
|
17
|
+
host = inject(ElementRef);
|
|
18
|
+
injector = inject(Injector);
|
|
19
|
+
value = model(null, ...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
|
|
20
|
+
id = input("", ...ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []);
|
|
21
|
+
placeholder = input("Select date", ...ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []);
|
|
22
|
+
disabled = input(false, {
|
|
23
|
+
...ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {},
|
|
24
|
+
transform: booleanAttribute
|
|
25
|
+
});
|
|
26
|
+
clearable = input(true, {
|
|
27
|
+
...ngDevMode ? { debugName: "clearable" } : /* istanbul ignore next */ {},
|
|
28
|
+
transform: booleanAttribute
|
|
29
|
+
});
|
|
30
|
+
validationState = input(null, ...ngDevMode ? [{ debugName: "validationState" }] : /* istanbul ignore next */ []);
|
|
31
|
+
describedBy = input("", ...ngDevMode ? [{ debugName: "describedBy" }] : /* istanbul ignore next */ []);
|
|
32
|
+
min = input(null, ...ngDevMode ? [{ debugName: "min" }] : /* istanbul ignore next */ []);
|
|
33
|
+
max = input(null, ...ngDevMode ? [{ debugName: "max" }] : /* istanbul ignore next */ []);
|
|
34
|
+
isDateDisabled = input(() => false, ...ngDevMode ? [{ debugName: "isDateDisabled" }] : /* istanbul ignore next */ []);
|
|
35
|
+
weekStart = input(1, ...ngDevMode ? [{ debugName: "weekStart" }] : /* istanbul ignore next */ []);
|
|
36
|
+
locale = input("en-GB", ...ngDevMode ? [{ debugName: "locale" }] : /* istanbul ignore next */ []);
|
|
37
|
+
withTime = input(false, {
|
|
38
|
+
...ngDevMode ? { debugName: "withTime" } : /* istanbul ignore next */ {},
|
|
39
|
+
transform: booleanAttribute
|
|
40
|
+
});
|
|
41
|
+
minuteStep = input(5, ...ngDevMode ? [{ debugName: "minuteStep" }] : /* istanbul ignore next */ []);
|
|
42
|
+
defaultTime = input("00:00", ...ngDevMode ? [{ debugName: "defaultTime" }] : /* istanbul ignore next */ []);
|
|
43
|
+
format = input(null, ...ngDevMode ? [{ debugName: "format" }] : /* istanbul ignore next */ []);
|
|
44
|
+
isOpen = signal(false, ...ngDevMode ? [{ debugName: "isOpen" }] : /* istanbul ignore next */ []);
|
|
45
|
+
calendar = viewChild(UiCalendarComponent, ...ngDevMode ? [{ debugName: "calendar" }] : /* istanbul ignore next */ []);
|
|
46
|
+
datePart = computed(() => this.value()?.slice(0, 10) ?? null, ...ngDevMode ? [{ debugName: "datePart" }] : /* istanbul ignore next */ []);
|
|
47
|
+
timePart = computed(() => {
|
|
48
|
+
const time = this.value()?.slice(11, 16);
|
|
49
|
+
return parseTime(time) ? time : this.defaultTime();
|
|
50
|
+
}, ...ngDevMode ? [{ debugName: "timePart" }] : /* istanbul ignore next */ []);
|
|
51
|
+
display = computed(() => {
|
|
52
|
+
const date = parseIsoDateTime(this.value());
|
|
53
|
+
const format = this.format() ?? (this.withTime() ? {
|
|
54
|
+
dateStyle: "medium",
|
|
55
|
+
timeStyle: "short"
|
|
56
|
+
} : { dateStyle: "medium" });
|
|
57
|
+
return date ? new Intl.DateTimeFormat(this.locale(), format).format(date) : "";
|
|
58
|
+
}, ...ngDevMode ? [{ debugName: "display" }] : /* istanbul ignore next */ []);
|
|
59
|
+
toggle() {
|
|
60
|
+
if (!this.disabled()) this.isOpen.update((open) => !open);
|
|
61
|
+
}
|
|
62
|
+
handleInputKeydown(event) {
|
|
63
|
+
if (this.disabled() || !OPEN_KEYS.includes(event.key)) return;
|
|
64
|
+
event.preventDefault();
|
|
65
|
+
this.isOpen.set(true);
|
|
66
|
+
afterNextRender(() => this.calendar()?.focusActiveDate(), { injector: this.injector });
|
|
67
|
+
}
|
|
68
|
+
handlePick(date) {
|
|
69
|
+
if (!date) return;
|
|
70
|
+
if (!this.withTime()) {
|
|
71
|
+
this.value.set(date);
|
|
72
|
+
this.close();
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
this.value.set(`${date}T${this.timePart()}`);
|
|
76
|
+
}
|
|
77
|
+
handleTime(time) {
|
|
78
|
+
const date = this.datePart() ?? toIsoDate(/* @__PURE__ */ new Date());
|
|
79
|
+
this.value.set(`${date}T${time}`);
|
|
80
|
+
}
|
|
81
|
+
close() {
|
|
82
|
+
this.isOpen.set(false);
|
|
83
|
+
this.focusInput();
|
|
84
|
+
}
|
|
85
|
+
handlePanelKeydown(event) {
|
|
86
|
+
if (event.key === "Escape") this.focusInput();
|
|
87
|
+
}
|
|
88
|
+
clear(event) {
|
|
89
|
+
event.stopPropagation();
|
|
90
|
+
this.value.set(null);
|
|
91
|
+
this.focusInput();
|
|
92
|
+
}
|
|
93
|
+
focusInput() {
|
|
94
|
+
this.host.nativeElement.querySelector("input")?.focus();
|
|
95
|
+
}
|
|
96
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
97
|
+
minVersion: "12.0.0",
|
|
98
|
+
version: "22.2.1",
|
|
99
|
+
ngImport: i0,
|
|
100
|
+
type: UiDatepickerComponent,
|
|
101
|
+
deps: [],
|
|
102
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
103
|
+
});
|
|
104
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
105
|
+
minVersion: "17.0.0",
|
|
106
|
+
version: "22.2.1",
|
|
107
|
+
type: UiDatepickerComponent,
|
|
108
|
+
isStandalone: true,
|
|
109
|
+
selector: "ui-datepicker",
|
|
110
|
+
inputs: {
|
|
111
|
+
value: {
|
|
112
|
+
classPropertyName: "value",
|
|
113
|
+
publicName: "value",
|
|
114
|
+
isSignal: true,
|
|
115
|
+
isRequired: false,
|
|
116
|
+
transformFunction: null
|
|
117
|
+
},
|
|
118
|
+
id: {
|
|
119
|
+
classPropertyName: "id",
|
|
120
|
+
publicName: "id",
|
|
121
|
+
isSignal: true,
|
|
122
|
+
isRequired: false,
|
|
123
|
+
transformFunction: null
|
|
124
|
+
},
|
|
125
|
+
placeholder: {
|
|
126
|
+
classPropertyName: "placeholder",
|
|
127
|
+
publicName: "placeholder",
|
|
128
|
+
isSignal: true,
|
|
129
|
+
isRequired: false,
|
|
130
|
+
transformFunction: null
|
|
131
|
+
},
|
|
132
|
+
disabled: {
|
|
133
|
+
classPropertyName: "disabled",
|
|
134
|
+
publicName: "disabled",
|
|
135
|
+
isSignal: true,
|
|
136
|
+
isRequired: false,
|
|
137
|
+
transformFunction: null
|
|
138
|
+
},
|
|
139
|
+
clearable: {
|
|
140
|
+
classPropertyName: "clearable",
|
|
141
|
+
publicName: "clearable",
|
|
142
|
+
isSignal: true,
|
|
143
|
+
isRequired: false,
|
|
144
|
+
transformFunction: null
|
|
145
|
+
},
|
|
146
|
+
validationState: {
|
|
147
|
+
classPropertyName: "validationState",
|
|
148
|
+
publicName: "validationState",
|
|
149
|
+
isSignal: true,
|
|
150
|
+
isRequired: false,
|
|
151
|
+
transformFunction: null
|
|
152
|
+
},
|
|
153
|
+
describedBy: {
|
|
154
|
+
classPropertyName: "describedBy",
|
|
155
|
+
publicName: "describedBy",
|
|
156
|
+
isSignal: true,
|
|
157
|
+
isRequired: false,
|
|
158
|
+
transformFunction: null
|
|
159
|
+
},
|
|
160
|
+
min: {
|
|
161
|
+
classPropertyName: "min",
|
|
162
|
+
publicName: "min",
|
|
163
|
+
isSignal: true,
|
|
164
|
+
isRequired: false,
|
|
165
|
+
transformFunction: null
|
|
166
|
+
},
|
|
167
|
+
max: {
|
|
168
|
+
classPropertyName: "max",
|
|
169
|
+
publicName: "max",
|
|
170
|
+
isSignal: true,
|
|
171
|
+
isRequired: false,
|
|
172
|
+
transformFunction: null
|
|
173
|
+
},
|
|
174
|
+
isDateDisabled: {
|
|
175
|
+
classPropertyName: "isDateDisabled",
|
|
176
|
+
publicName: "isDateDisabled",
|
|
177
|
+
isSignal: true,
|
|
178
|
+
isRequired: false,
|
|
179
|
+
transformFunction: null
|
|
180
|
+
},
|
|
181
|
+
weekStart: {
|
|
182
|
+
classPropertyName: "weekStart",
|
|
183
|
+
publicName: "weekStart",
|
|
184
|
+
isSignal: true,
|
|
185
|
+
isRequired: false,
|
|
186
|
+
transformFunction: null
|
|
187
|
+
},
|
|
188
|
+
locale: {
|
|
189
|
+
classPropertyName: "locale",
|
|
190
|
+
publicName: "locale",
|
|
191
|
+
isSignal: true,
|
|
192
|
+
isRequired: false,
|
|
193
|
+
transformFunction: null
|
|
194
|
+
},
|
|
195
|
+
withTime: {
|
|
196
|
+
classPropertyName: "withTime",
|
|
197
|
+
publicName: "withTime",
|
|
198
|
+
isSignal: true,
|
|
199
|
+
isRequired: false,
|
|
200
|
+
transformFunction: null
|
|
201
|
+
},
|
|
202
|
+
minuteStep: {
|
|
203
|
+
classPropertyName: "minuteStep",
|
|
204
|
+
publicName: "minuteStep",
|
|
205
|
+
isSignal: true,
|
|
206
|
+
isRequired: false,
|
|
207
|
+
transformFunction: null
|
|
208
|
+
},
|
|
209
|
+
defaultTime: {
|
|
210
|
+
classPropertyName: "defaultTime",
|
|
211
|
+
publicName: "defaultTime",
|
|
212
|
+
isSignal: true,
|
|
213
|
+
isRequired: false,
|
|
214
|
+
transformFunction: null
|
|
215
|
+
},
|
|
216
|
+
format: {
|
|
217
|
+
classPropertyName: "format",
|
|
218
|
+
publicName: "format",
|
|
219
|
+
isSignal: true,
|
|
220
|
+
isRequired: false,
|
|
221
|
+
transformFunction: null
|
|
222
|
+
}
|
|
223
|
+
},
|
|
224
|
+
outputs: { value: "valueChange" },
|
|
225
|
+
host: {
|
|
226
|
+
properties: { "attr.id": "null" },
|
|
227
|
+
classAttribute: "block"
|
|
228
|
+
},
|
|
229
|
+
providers: [provideIcons({
|
|
230
|
+
heroCalendar,
|
|
231
|
+
heroXMark
|
|
232
|
+
})],
|
|
233
|
+
viewQueries: [{
|
|
234
|
+
propertyName: "calendar",
|
|
235
|
+
first: true,
|
|
236
|
+
predicate: UiCalendarComponent,
|
|
237
|
+
descendants: true,
|
|
238
|
+
isSignal: true
|
|
239
|
+
}],
|
|
240
|
+
ngImport: i0,
|
|
241
|
+
template: "<ui-dropdown\n [isOpen]=\"isOpen\"\n placement=\"bottom-start\"\n closeBehaviour=\"whenClickOutside\"\n class=\"w-full\"\n>\n <ui-input\n [value]=\"display()\"\n [id]=\"id()\"\n [placeholder]=\"placeholder()\"\n [disabled]=\"disabled()\"\n [describedBy]=\"describedBy()\"\n [ariaExpanded]=\"isOpen()\"\n ariaHasPopup=\"dialog\"\n [validationState]=\"validationState()\"\n classes=\"cursor-pointer\"\n autocomplete=\"off\"\n readonly\n (click)=\"toggle()\"\n (keydown)=\"handleInputKeydown($event)\"\n >\n <ng-template #leading>\n <ng-icon\n name=\"heroCalendar\"\n class=\"ms-3 text-muted-foreground-1 shrink-0\"\n />\n </ng-template>\n\n <ng-template #trailing>\n @if (clearable() && value() && !disabled()) {\n <button\n type=\"button\"\n class=\"inline-flex justify-center items-center self-stretch w-8 text-muted-foreground-1 hover:text-foreground\"\n aria-label=\"Clear date\"\n (click)=\"clear($event)\"\n >\n <ng-icon name=\"heroXMark\" class=\"shrink-0\" />\n </button>\n }\n </ng-template>\n </ui-input>\n\n @if (isOpen()) {\n <div uiDropdownContent class=\"py-2\">\n <ui-card radius=\"xl\" class=\"p-3\">\n <ui-calendar\n [value]=\"datePart()\"\n [min]=\"min()\"\n [max]=\"max()\"\n [isDateDisabled]=\"isDateDisabled()\"\n [weekStart]=\"weekStart()\"\n [locale]=\"locale()\"\n (valueChange)=\"handlePick($event)\"\n (keydown)=\"handlePanelKeydown($event)\"\n />\n\n @if (withTime()) {\n <div class=\"flex justify-between items-center gap-x-2 mt-3 pt-3 border-line-2 border-t\">\n <ui-time-select\n [value]=\"timePart()\"\n [minuteStep]=\"minuteStep()\"\n (valueChange)=\"handleTime($event)\"\n (keydown)=\"handlePanelKeydown($event)\"\n />\n\n <ui-button size=\"sm\" (click)=\"close()\">Done</ui-button>\n </div>\n }\n </ui-card>\n </div>\n }\n</ui-dropdown>\n",
|
|
242
|
+
styles: ["@layer components{:host{width:100%}}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"],
|
|
243
|
+
dependencies: [
|
|
244
|
+
{
|
|
245
|
+
kind: "component",
|
|
246
|
+
type: UiInputComponent,
|
|
247
|
+
selector: "ui-input",
|
|
248
|
+
inputs: [
|
|
249
|
+
"value",
|
|
250
|
+
"classes",
|
|
251
|
+
"type",
|
|
252
|
+
"id",
|
|
253
|
+
"name",
|
|
254
|
+
"placeholder",
|
|
255
|
+
"autocomplete",
|
|
256
|
+
"inputmode",
|
|
257
|
+
"required",
|
|
258
|
+
"disabled",
|
|
259
|
+
"readonly",
|
|
260
|
+
"validationState",
|
|
261
|
+
"min",
|
|
262
|
+
"max",
|
|
263
|
+
"step",
|
|
264
|
+
"pattern",
|
|
265
|
+
"minlength",
|
|
266
|
+
"maxlength",
|
|
267
|
+
"autofocus",
|
|
268
|
+
"spellcheck",
|
|
269
|
+
"revealable",
|
|
270
|
+
"list",
|
|
271
|
+
"ariaLabel",
|
|
272
|
+
"describedBy",
|
|
273
|
+
"inputRole",
|
|
274
|
+
"ariaExpanded",
|
|
275
|
+
"ariaControls",
|
|
276
|
+
"ariaActiveDescendant",
|
|
277
|
+
"ariaAutocomplete",
|
|
278
|
+
"ariaHasPopup"
|
|
279
|
+
],
|
|
280
|
+
outputs: [
|
|
281
|
+
"valueChange",
|
|
282
|
+
"validationStateChange",
|
|
283
|
+
"focused",
|
|
284
|
+
"blurred"
|
|
285
|
+
]
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
kind: "component",
|
|
289
|
+
type: UiCalendarComponent,
|
|
290
|
+
selector: "ui-calendar",
|
|
291
|
+
inputs: [
|
|
292
|
+
"mode",
|
|
293
|
+
"value",
|
|
294
|
+
"range",
|
|
295
|
+
"min",
|
|
296
|
+
"max",
|
|
297
|
+
"isDateDisabled",
|
|
298
|
+
"weekStart",
|
|
299
|
+
"locale",
|
|
300
|
+
"dayClass",
|
|
301
|
+
"hideSelection"
|
|
302
|
+
],
|
|
303
|
+
outputs: [
|
|
304
|
+
"valueChange",
|
|
305
|
+
"rangeChange",
|
|
306
|
+
"dayClick",
|
|
307
|
+
"monthChange"
|
|
308
|
+
]
|
|
309
|
+
},
|
|
310
|
+
{
|
|
311
|
+
kind: "component",
|
|
312
|
+
type: UiDropdownComponent,
|
|
313
|
+
selector: "ui-dropdown",
|
|
314
|
+
inputs: [
|
|
315
|
+
"isOpen",
|
|
316
|
+
"placement",
|
|
317
|
+
"closeBehaviour",
|
|
318
|
+
"offset",
|
|
319
|
+
"viewportPadding",
|
|
320
|
+
"matchWidth"
|
|
321
|
+
],
|
|
322
|
+
exportAs: ["uiDropdown"]
|
|
323
|
+
},
|
|
324
|
+
{
|
|
325
|
+
kind: "directive",
|
|
326
|
+
type: UiDropdownDirective,
|
|
327
|
+
selector: "[uiDropdownContent]"
|
|
328
|
+
},
|
|
329
|
+
{
|
|
330
|
+
kind: "component",
|
|
331
|
+
type: UiButtonComponent,
|
|
332
|
+
selector: "ui-button",
|
|
333
|
+
inputs: [
|
|
334
|
+
"appearance",
|
|
335
|
+
"intent",
|
|
336
|
+
"size",
|
|
337
|
+
"classes",
|
|
338
|
+
"type",
|
|
339
|
+
"ariaLabel",
|
|
340
|
+
"disabled",
|
|
341
|
+
"loading"
|
|
342
|
+
]
|
|
343
|
+
},
|
|
344
|
+
{
|
|
345
|
+
kind: "component",
|
|
346
|
+
type: UiTimeSelectComponent,
|
|
347
|
+
selector: "ui-time-select",
|
|
348
|
+
inputs: [
|
|
349
|
+
"value",
|
|
350
|
+
"minuteStep",
|
|
351
|
+
"disabled"
|
|
352
|
+
],
|
|
353
|
+
outputs: ["valueChange"]
|
|
354
|
+
},
|
|
355
|
+
{
|
|
356
|
+
kind: "component",
|
|
357
|
+
type: NgIcon,
|
|
358
|
+
selector: "ng-icon",
|
|
359
|
+
inputs: [
|
|
360
|
+
"name",
|
|
361
|
+
"svg",
|
|
362
|
+
"size",
|
|
363
|
+
"strokeWidth",
|
|
364
|
+
"color"
|
|
365
|
+
]
|
|
366
|
+
},
|
|
367
|
+
{
|
|
368
|
+
kind: "component",
|
|
369
|
+
type: UiCardComponent,
|
|
370
|
+
selector: "ui-card",
|
|
371
|
+
inputs: ["radius"]
|
|
372
|
+
}
|
|
373
|
+
]
|
|
374
|
+
});
|
|
375
|
+
};
|
|
376
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
377
|
+
minVersion: "12.0.0",
|
|
378
|
+
version: "22.2.1",
|
|
379
|
+
ngImport: i0,
|
|
380
|
+
type: UiDatepickerComponent,
|
|
381
|
+
decorators: [{
|
|
382
|
+
type: Component,
|
|
383
|
+
args: [{
|
|
384
|
+
selector: "ui-datepicker",
|
|
385
|
+
imports: [
|
|
386
|
+
UiInputComponent,
|
|
387
|
+
UiCalendarComponent,
|
|
388
|
+
UiDropdownComponent,
|
|
389
|
+
UiDropdownDirective,
|
|
390
|
+
UiButtonComponent,
|
|
391
|
+
UiTimeSelectComponent,
|
|
392
|
+
NgIcon,
|
|
393
|
+
UiCardComponent
|
|
394
|
+
],
|
|
395
|
+
host: {
|
|
396
|
+
class: "block",
|
|
397
|
+
"[attr.id]": "null"
|
|
398
|
+
},
|
|
399
|
+
providers: [provideIcons({
|
|
400
|
+
heroCalendar,
|
|
401
|
+
heroXMark
|
|
402
|
+
})],
|
|
403
|
+
template: "<ui-dropdown\n [isOpen]=\"isOpen\"\n placement=\"bottom-start\"\n closeBehaviour=\"whenClickOutside\"\n class=\"w-full\"\n>\n <ui-input\n [value]=\"display()\"\n [id]=\"id()\"\n [placeholder]=\"placeholder()\"\n [disabled]=\"disabled()\"\n [describedBy]=\"describedBy()\"\n [ariaExpanded]=\"isOpen()\"\n ariaHasPopup=\"dialog\"\n [validationState]=\"validationState()\"\n classes=\"cursor-pointer\"\n autocomplete=\"off\"\n readonly\n (click)=\"toggle()\"\n (keydown)=\"handleInputKeydown($event)\"\n >\n <ng-template #leading>\n <ng-icon\n name=\"heroCalendar\"\n class=\"ms-3 text-muted-foreground-1 shrink-0\"\n />\n </ng-template>\n\n <ng-template #trailing>\n @if (clearable() && value() && !disabled()) {\n <button\n type=\"button\"\n class=\"inline-flex justify-center items-center self-stretch w-8 text-muted-foreground-1 hover:text-foreground\"\n aria-label=\"Clear date\"\n (click)=\"clear($event)\"\n >\n <ng-icon name=\"heroXMark\" class=\"shrink-0\" />\n </button>\n }\n </ng-template>\n </ui-input>\n\n @if (isOpen()) {\n <div uiDropdownContent class=\"py-2\">\n <ui-card radius=\"xl\" class=\"p-3\">\n <ui-calendar\n [value]=\"datePart()\"\n [min]=\"min()\"\n [max]=\"max()\"\n [isDateDisabled]=\"isDateDisabled()\"\n [weekStart]=\"weekStart()\"\n [locale]=\"locale()\"\n (valueChange)=\"handlePick($event)\"\n (keydown)=\"handlePanelKeydown($event)\"\n />\n\n @if (withTime()) {\n <div class=\"flex justify-between items-center gap-x-2 mt-3 pt-3 border-line-2 border-t\">\n <ui-time-select\n [value]=\"timePart()\"\n [minuteStep]=\"minuteStep()\"\n (valueChange)=\"handleTime($event)\"\n (keydown)=\"handlePanelKeydown($event)\"\n />\n\n <ui-button size=\"sm\" (click)=\"close()\">Done</ui-button>\n </div>\n }\n </ui-card>\n </div>\n }\n</ui-dropdown>\n",
|
|
404
|
+
styles: ["@layer components{:host{width:100%}}\n/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */\n"]
|
|
405
|
+
}]
|
|
406
|
+
}],
|
|
407
|
+
propDecorators: {
|
|
408
|
+
value: [{
|
|
409
|
+
type: i0.Input,
|
|
410
|
+
args: [{
|
|
411
|
+
isSignal: true,
|
|
412
|
+
alias: "value",
|
|
413
|
+
required: false
|
|
414
|
+
}]
|
|
415
|
+
}, {
|
|
416
|
+
type: i0.Output,
|
|
417
|
+
args: ["valueChange"]
|
|
418
|
+
}],
|
|
419
|
+
id: [{
|
|
420
|
+
type: i0.Input,
|
|
421
|
+
args: [{
|
|
422
|
+
isSignal: true,
|
|
423
|
+
alias: "id",
|
|
424
|
+
required: false
|
|
425
|
+
}]
|
|
426
|
+
}],
|
|
427
|
+
placeholder: [{
|
|
428
|
+
type: i0.Input,
|
|
429
|
+
args: [{
|
|
430
|
+
isSignal: true,
|
|
431
|
+
alias: "placeholder",
|
|
432
|
+
required: false
|
|
433
|
+
}]
|
|
434
|
+
}],
|
|
435
|
+
disabled: [{
|
|
436
|
+
type: i0.Input,
|
|
437
|
+
args: [{
|
|
438
|
+
isSignal: true,
|
|
439
|
+
alias: "disabled",
|
|
440
|
+
required: false
|
|
441
|
+
}]
|
|
442
|
+
}],
|
|
443
|
+
clearable: [{
|
|
444
|
+
type: i0.Input,
|
|
445
|
+
args: [{
|
|
446
|
+
isSignal: true,
|
|
447
|
+
alias: "clearable",
|
|
448
|
+
required: false
|
|
449
|
+
}]
|
|
450
|
+
}],
|
|
451
|
+
validationState: [{
|
|
452
|
+
type: i0.Input,
|
|
453
|
+
args: [{
|
|
454
|
+
isSignal: true,
|
|
455
|
+
alias: "validationState",
|
|
456
|
+
required: false
|
|
457
|
+
}]
|
|
458
|
+
}],
|
|
459
|
+
describedBy: [{
|
|
460
|
+
type: i0.Input,
|
|
461
|
+
args: [{
|
|
462
|
+
isSignal: true,
|
|
463
|
+
alias: "describedBy",
|
|
464
|
+
required: false
|
|
465
|
+
}]
|
|
466
|
+
}],
|
|
467
|
+
min: [{
|
|
468
|
+
type: i0.Input,
|
|
469
|
+
args: [{
|
|
470
|
+
isSignal: true,
|
|
471
|
+
alias: "min",
|
|
472
|
+
required: false
|
|
473
|
+
}]
|
|
474
|
+
}],
|
|
475
|
+
max: [{
|
|
476
|
+
type: i0.Input,
|
|
477
|
+
args: [{
|
|
478
|
+
isSignal: true,
|
|
479
|
+
alias: "max",
|
|
480
|
+
required: false
|
|
481
|
+
}]
|
|
482
|
+
}],
|
|
483
|
+
isDateDisabled: [{
|
|
484
|
+
type: i0.Input,
|
|
485
|
+
args: [{
|
|
486
|
+
isSignal: true,
|
|
487
|
+
alias: "isDateDisabled",
|
|
488
|
+
required: false
|
|
489
|
+
}]
|
|
490
|
+
}],
|
|
491
|
+
weekStart: [{
|
|
492
|
+
type: i0.Input,
|
|
493
|
+
args: [{
|
|
494
|
+
isSignal: true,
|
|
495
|
+
alias: "weekStart",
|
|
496
|
+
required: false
|
|
497
|
+
}]
|
|
498
|
+
}],
|
|
499
|
+
locale: [{
|
|
500
|
+
type: i0.Input,
|
|
501
|
+
args: [{
|
|
502
|
+
isSignal: true,
|
|
503
|
+
alias: "locale",
|
|
504
|
+
required: false
|
|
505
|
+
}]
|
|
506
|
+
}],
|
|
507
|
+
withTime: [{
|
|
508
|
+
type: i0.Input,
|
|
509
|
+
args: [{
|
|
510
|
+
isSignal: true,
|
|
511
|
+
alias: "withTime",
|
|
512
|
+
required: false
|
|
513
|
+
}]
|
|
514
|
+
}],
|
|
515
|
+
minuteStep: [{
|
|
516
|
+
type: i0.Input,
|
|
517
|
+
args: [{
|
|
518
|
+
isSignal: true,
|
|
519
|
+
alias: "minuteStep",
|
|
520
|
+
required: false
|
|
521
|
+
}]
|
|
522
|
+
}],
|
|
523
|
+
defaultTime: [{
|
|
524
|
+
type: i0.Input,
|
|
525
|
+
args: [{
|
|
526
|
+
isSignal: true,
|
|
527
|
+
alias: "defaultTime",
|
|
528
|
+
required: false
|
|
529
|
+
}]
|
|
530
|
+
}],
|
|
531
|
+
format: [{
|
|
532
|
+
type: i0.Input,
|
|
533
|
+
args: [{
|
|
534
|
+
isSignal: true,
|
|
535
|
+
alias: "format",
|
|
536
|
+
required: false
|
|
537
|
+
}]
|
|
538
|
+
}],
|
|
539
|
+
calendar: [{
|
|
540
|
+
type: i0.ViewChild,
|
|
541
|
+
args: [i0.forwardRef(() => UiCalendarComponent), { isSignal: true }]
|
|
542
|
+
}]
|
|
543
|
+
}
|
|
544
|
+
});
|
|
545
|
+
export { UiDatepickerComponent };
|
|
546
|
+
|
|
547
|
+
//# sourceMappingURL=area8975-ui-datepicker.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"area8975-ui-datepicker.mjs","names":[],"sources":["../../../projects/ui/datepicker/datepicker.component.ts","../../../projects/ui/datepicker/datepicker.component.html"],"sourcesContent":["import {\n afterNextRender,\n booleanAttribute,\n Component,\n computed,\n ElementRef,\n inject,\n Injector,\n input,\n model,\n signal,\n viewChild\n} from '@angular/core';\n\nimport { UiButtonComponent } from '@area8975/ui/button';\nimport type {\n IsoDate,\n IsoDateTime,\n WeekStart\n} from '@area8975/ui/calendar';\nimport { UiCalendarComponent } from '@area8975/ui/calendar';\nimport {\n parseIsoDateTime,\n parseTime,\n toIsoDate\n} from '@area8975/ui/calendar';\nimport { UiCardComponent } from '@area8975/ui/card';\nimport { UiDropdownComponent } from '@area8975/ui/dropdown';\nimport { UiDropdownDirective } from '@area8975/ui/dropdown';\nimport type { InputValidation } from '@area8975/ui/input';\nimport { UiInputComponent } from '@area8975/ui/input';\nimport { UiTimeSelectComponent } from '@area8975/ui/time-select';\nimport { NgIcon, provideIcons } from '@ng-icons/core';\nimport { heroCalendar, heroXMark } from '@ng-icons/heroicons/outline';\n\n\nconst OPEN_KEYS = ['Enter', ' ', 'ArrowDown'];\n\n@Component({\n selector: 'ui-datepicker',\n templateUrl: './datepicker.component.html',\n styleUrl: './datepicker.component.css',\n imports: [\n UiInputComponent,\n UiCalendarComponent,\n UiDropdownComponent,\n UiDropdownDirective,\n UiButtonComponent,\n UiTimeSelectComponent,\n NgIcon,\n UiCardComponent\n ],\n host: { class: 'block', '[attr.id]': 'null' },\n providers: [provideIcons({ heroCalendar, heroXMark })]\n})\nexport class UiDatepickerComponent {\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly injector = inject(Injector);\n\n /** \"2026-09-29\", or \"2026-09-29T14:30\" when `withTime` is on. */\n readonly value = model<IsoDate | IsoDateTime | null>(null);\n\n readonly id = input<string>('');\n readonly placeholder = input<string>('Select date');\n readonly disabled = input(false, { transform: booleanAttribute });\n readonly clearable = input(true, { transform: booleanAttribute });\n readonly validationState = input<InputValidation>(null);\n readonly describedBy = input<string>('');\n\n readonly min = input<IsoDate | null>(null);\n readonly max = input<IsoDate | null>(null);\n readonly isDateDisabled = input<(date: IsoDate) => boolean>(() => false);\n readonly weekStart = input<WeekStart>(1);\n readonly locale = input<string>('en-GB');\n\n readonly withTime = input(false, { transform: booleanAttribute });\n readonly minuteStep = input<number>(5);\n\n /** Time used when a date is picked before a time has been chosen. */\n readonly defaultTime = input<string>('00:00');\n\n /** Intl options for the value shown in the input. */\n readonly format = input<Intl.DateTimeFormatOptions | null>(null);\n\n protected readonly isOpen = signal(false);\n\n private readonly calendar = viewChild(UiCalendarComponent);\n\n protected readonly datePart = computed(() =>\n this.value()?.slice(0, 10) ?? null\n );\n\n protected readonly timePart = computed(() => {\n const time = this.value()?.slice(11, 16);\n\n return parseTime(time) ? time! : this.defaultTime();\n });\n\n protected readonly display = computed(() => {\n const date = parseIsoDateTime(this.value());\n const format = this.format() ?? (this.withTime()\n ? { dateStyle: 'medium', timeStyle: 'short' } as const\n : { dateStyle: 'medium' } as const);\n\n return date\n ? new Intl.DateTimeFormat(this.locale(), format).format(date)\n : '';\n });\n\n protected toggle(): void {\n if (!this.disabled()) {\n this.isOpen.update(open => !open);\n }\n }\n\n protected handleInputKeydown(event: KeyboardEvent): void {\n if (this.disabled() || !OPEN_KEYS.includes(event.key)) {\n return;\n }\n\n event.preventDefault();\n this.isOpen.set(true);\n\n afterNextRender(() => this.calendar()?.focusActiveDate(), {\n injector: this.injector\n });\n }\n\n protected handlePick(date: IsoDate | null): void {\n if (!date) {\n return;\n }\n\n if (!this.withTime()) {\n this.value.set(date);\n this.close();\n return;\n }\n\n // stays open so the time can be set too\n this.value.set(`${date}T${this.timePart()}`);\n }\n\n protected handleTime(time: string): void {\n // picking a time first puts it on today\n const date = this.datePart() ?? toIsoDate(new Date());\n\n this.value.set(`${date}T${time}`);\n }\n\n protected close(): void {\n this.isOpen.set(false);\n this.focusInput();\n }\n\n protected handlePanelKeydown(event: KeyboardEvent): void {\n // the overlay closes itself on escape, we just put focus back\n if (event.key === 'Escape') {\n this.focusInput();\n }\n }\n\n protected clear(event: Event): void {\n // stop the input underneath from opening the calendar\n event.stopPropagation();\n\n this.value.set(null);\n this.focusInput();\n }\n\n private focusInput(): void {\n this.host.nativeElement.querySelector('input')?.focus();\n }\n}\n","<ui-dropdown\n [isOpen]=\"isOpen\"\n placement=\"bottom-start\"\n closeBehaviour=\"whenClickOutside\"\n class=\"w-full\"\n>\n <ui-input\n [value]=\"display()\"\n [id]=\"id()\"\n [placeholder]=\"placeholder()\"\n [disabled]=\"disabled()\"\n [describedBy]=\"describedBy()\"\n [ariaExpanded]=\"isOpen()\"\n ariaHasPopup=\"dialog\"\n [validationState]=\"validationState()\"\n classes=\"cursor-pointer\"\n autocomplete=\"off\"\n readonly\n (click)=\"toggle()\"\n (keydown)=\"handleInputKeydown($event)\"\n >\n <ng-template #leading>\n <ng-icon\n name=\"heroCalendar\"\n class=\"ms-3 text-muted-foreground-1 shrink-0\"\n />\n </ng-template>\n\n <ng-template #trailing>\n @if (clearable() && value() && !disabled()) {\n <button\n type=\"button\"\n class=\"inline-flex justify-center items-center self-stretch w-8 text-muted-foreground-1 hover:text-foreground\"\n aria-label=\"Clear date\"\n (click)=\"clear($event)\"\n >\n <ng-icon name=\"heroXMark\" class=\"shrink-0\" />\n </button>\n }\n </ng-template>\n </ui-input>\n\n @if (isOpen()) {\n <div uiDropdownContent class=\"py-2\">\n <ui-card radius=\"xl\" class=\"p-3\">\n <ui-calendar\n [value]=\"datePart()\"\n [min]=\"min()\"\n [max]=\"max()\"\n [isDateDisabled]=\"isDateDisabled()\"\n [weekStart]=\"weekStart()\"\n [locale]=\"locale()\"\n (valueChange)=\"handlePick($event)\"\n (keydown)=\"handlePanelKeydown($event)\"\n />\n\n @if (withTime()) {\n <div class=\"flex justify-between items-center gap-x-2 mt-3 pt-3 border-line-2 border-t\">\n <ui-time-select\n [value]=\"timePart()\"\n [minuteStep]=\"minuteStep()\"\n (valueChange)=\"handleTime($event)\"\n (keydown)=\"handlePanelKeydown($event)\"\n />\n\n <ui-button size=\"sm\" (click)=\"close()\">Done</ui-button>\n </div>\n }\n </ui-card>\n </div>\n }\n</ui-dropdown>\n"],"mappings":";;;;;;;;;;AAoCA,MAAM,YAAY;CAAC;CAAS;CAAK;AAAW;AAmB5C,IAAa,wBAAb,MAAa,sBAAqB;CACb,OAAO,OAAgC,UAAU;CACjD,WAAW,OAAO,QAAQ;CAGlC,QAAQ,MAAoC,MAAK,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CAEjD,KAAK,MA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