@egose/shadcn-theme-ng 0.1.0 → 0.3.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 +2 -2
- package/accordion/README.md +405 -2
- package/alert/README.md +372 -2
- package/alert-dialog/README.md +471 -5
- package/aspect-ratio/README.md +272 -5
- package/autocomplete/README.md +502 -2
- package/autocomplete/fesm2022/autocomplete.mjs +1 -1
- package/avatar/README.md +357 -5
- package/badge/README.md +318 -2
- package/basic-alert/README.md +353 -2
- package/breadcrumb/README.md +406 -5
- package/button/README.md +482 -2
- package/button/fesm2022/button.mjs +85 -107
- package/button/types/button.d.ts +5 -8
- package/button-group/README.md +318 -5
- package/calendar/README.md +357 -2
- package/card/README.md +331 -5
- package/carousel/README.md +333 -5
- package/carousel/fesm2022/carousel.mjs +4 -1
- package/checkbox/README.md +320 -2
- package/checkbox/fesm2022/checkbox.mjs +6 -7
- package/checkbox/types/checkbox.d.ts +1 -1
- package/collapsible/README.md +332 -5
- package/combobox/README.md +507 -5
- package/combobox/fesm2022/combobox.mjs +5 -2
- package/command/README.md +435 -5
- package/confirmation-dialog/README.md +301 -2
- package/context-menu/README.md +366 -5
- package/date-picker/README.md +469 -2
- package/date-picker/fesm2022/date-picker.mjs +150 -32
- package/date-picker/types/date-picker.d.ts +102 -9
- package/dialog/README.md +448 -2
- package/drawer/README.md +395 -5
- package/dropdown-menu/README.md +417 -5
- package/empty/README.md +329 -5
- package/field/README.md +385 -5
- package/form-autocomplete/README.md +177 -0
- package/form-autocomplete/fesm2022/form-autocomplete.mjs +125 -0
- package/form-autocomplete/package.json +24 -0
- package/form-autocomplete/types/form-autocomplete.d.ts +61 -0
- package/form-checkbox/README.md +322 -2
- package/form-checkbox/fesm2022/form-checkbox.mjs +22 -9
- package/form-checkbox/types/form-checkbox.d.ts +23 -4
- package/form-combobox/README.md +202 -0
- package/form-combobox/fesm2022/form-combobox.mjs +147 -0
- package/form-combobox/package.json +24 -0
- package/form-combobox/types/form-combobox.d.ts +73 -0
- package/form-date-picker/README.md +348 -2
- package/form-date-picker/fesm2022/form-date-picker.mjs +38 -12
- package/form-date-picker/types/form-date-picker.d.ts +17 -1
- package/form-date-picker-multi/README.md +191 -0
- package/form-date-picker-multi/fesm2022/form-date-picker-multi.mjs +129 -0
- package/form-date-picker-multi/package.json +24 -0
- package/form-date-picker-multi/types/form-date-picker-multi.d.ts +58 -0
- package/form-date-range-picker/README.md +253 -0
- package/form-date-range-picker/fesm2022/form-date-range-picker.mjs +130 -0
- package/form-date-range-picker/package.json +24 -0
- package/form-date-range-picker/types/form-date-range-picker.d.ts +55 -0
- package/form-field/README.md +356 -2
- package/form-field-simple/README.md +340 -2
- package/form-input-otp/README.md +194 -0
- package/form-input-otp/fesm2022/form-input-otp.mjs +106 -0
- package/form-input-otp/package.json +24 -0
- package/form-input-otp/types/form-input-otp.d.ts +58 -0
- package/form-month-year-picker/README.md +188 -0
- package/form-month-year-picker/fesm2022/form-month-year-picker.mjs +125 -0
- package/form-month-year-picker/package.json +24 -0
- package/form-month-year-picker/types/form-month-year-picker.d.ts +53 -0
- package/form-native-select/README.md +205 -0
- package/form-native-select/fesm2022/form-native-select.mjs +103 -0
- package/form-native-select/package.json +24 -0
- package/form-native-select/types/form-native-select.d.ts +57 -0
- package/form-phone-input/README.md +188 -0
- package/form-phone-input/fesm2022/form-phone-input.mjs +113 -0
- package/form-phone-input/package.json +24 -0
- package/form-phone-input/types/form-phone-input.d.ts +58 -0
- package/form-radio-group/README.md +198 -0
- package/form-radio-group/fesm2022/form-radio-group.mjs +111 -0
- package/form-radio-group/package.json +24 -0
- package/form-radio-group/types/form-radio-group.d.ts +63 -0
- package/form-searchable-multiselect/README.md +371 -2
- package/form-searchable-multiselect/fesm2022/form-searchable-multiselect.mjs +19 -10
- package/form-searchable-multiselect/types/form-searchable-multiselect.d.ts +18 -1
- package/form-select/README.md +360 -2
- package/form-select/fesm2022/form-select.mjs +20 -11
- package/form-select/types/form-select.d.ts +18 -1
- package/form-slider/README.md +182 -0
- package/form-slider/fesm2022/form-slider.mjs +106 -0
- package/form-slider/package.json +24 -0
- package/form-slider/types/form-slider.d.ts +60 -0
- package/form-switch/README.md +173 -0
- package/form-switch/fesm2022/form-switch.mjs +100 -0
- package/form-switch/package.json +24 -0
- package/form-switch/types/form-switch.d.ts +50 -0
- package/form-text-input/README.md +381 -2
- package/form-text-input/fesm2022/form-text-input.mjs +19 -10
- package/form-text-input/types/form-text-input.d.ts +18 -1
- package/form-textarea/README.md +357 -2
- package/form-textarea/fesm2022/form-textarea.mjs +19 -10
- package/form-textarea/types/form-textarea.d.ts +18 -1
- package/form-toggle/README.md +186 -0
- package/form-toggle/fesm2022/form-toggle.mjs +159 -0
- package/form-toggle/package.json +24 -0
- package/form-toggle/types/form-toggle.d.ts +82 -0
- package/form-toggle-group/README.md +176 -0
- package/form-toggle-group/fesm2022/form-toggle-group.mjs +116 -0
- package/form-toggle-group/package.json +24 -0
- package/form-toggle-group/types/form-toggle-group.d.ts +65 -0
- package/hover-card/README.md +256 -5
- package/icon/README.md +239 -2
- package/input/README.md +269 -2
- package/input-group/README.md +335 -5
- package/input-group/fesm2022/input-group.mjs +22 -12
- package/input-group/types/input-group.d.ts +4 -1
- package/input-otp/README.md +375 -5
- package/item/README.md +385 -5
- package/item/fesm2022/item.mjs +3 -3
- package/kbd/README.md +291 -5
- package/label/README.md +272 -2
- package/layout-simple/README.md +193 -2
- package/layout-simple/fesm2022/layout-simple.mjs +472 -236
- package/layout-simple/types/layout-simple.d.ts +174 -137
- package/menu/README.md +417 -2
- package/menubar/README.md +343 -5
- package/native-select/README.md +323 -5
- package/native-select/fesm2022/native-select.mjs +18 -6
- package/native-select/types/native-select.d.ts +7 -2
- package/navigation-menu/README.md +369 -5
- package/package.json +57 -1
- package/pagination/README.md +388 -5
- package/phone-input/README.md +114 -0
- package/phone-input/fesm2022/phone-input.mjs +191 -0
- package/phone-input/package.json +24 -0
- package/phone-input/types/phone-input.d.ts +67 -0
- package/popover/README.md +331 -2
- package/progress/README.md +311 -5
- package/radio-group/README.md +364 -2
- package/radio-group/fesm2022/radio-group.mjs +5 -1
- package/resizable/README.md +269 -5
- package/scroll-area/README.md +233 -5
- package/searchable-multiselect/README.md +323 -2
- package/select/README.md +437 -2
- package/separator/README.md +222 -2
- package/sheet/README.md +311 -2
- package/sidebar/README.md +457 -5
- package/skeleton/README.md +217 -5
- package/slider/README.md +273 -5
- package/slider/fesm2022/slider.mjs +3 -3
- package/sonner/README.md +346 -2
- package/spinner/README.md +284 -2
- package/switch/README.md +310 -2
- package/switch/fesm2022/switch.mjs +7 -5
- package/switch/types/switch.d.ts +2 -1
- package/table/README.md +423 -5
- package/tabs/README.md +411 -2
- package/tabs/fesm2022/tabs.mjs +2 -2
- package/textarea/README.md +282 -5
- package/toggle/README.md +270 -5
- package/toggle-group/README.md +340 -5
- package/tooltip/README.md +269 -2
- package/typography/README.md +271 -5
- package/utils/README.md +303 -2
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, inject, input, ChangeDetectionStrategy, Component, forwardRef, viewChild, contentChild,
|
|
2
|
+
import { InjectionToken, inject, input, booleanAttribute, computed, ChangeDetectionStrategy, Component, forwardRef, viewChild, contentChild, linkedSignal, signal, output, ElementRef, effect, Directive, numberAttribute, untracked, NgModule } from '@angular/core';
|
|
3
3
|
import { NgIcon, provideIcons } from '@ng-icons/core';
|
|
4
4
|
import { lucideX, lucideCalendar, lucideChevronDown } from '@ng-icons/lucide';
|
|
5
5
|
import { BrnDateInput, provideBrnDatePickerTrigger, BrnDatePickerTriggerToken, provideBrnDatePicker, injectBrnDatePicker } from '@spartan-ng/brain/date-picker';
|
|
6
6
|
import * as i1 from '@egose/shadcn-theme-ng/input-group';
|
|
7
7
|
import { HlmInputGroup, HlmInputGroupImports } from '@egose/shadcn-theme-ng/input-group';
|
|
8
|
+
import { hlm, classes } from '@egose/shadcn-theme-ng/utils';
|
|
8
9
|
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
9
10
|
import * as i1$1 from '@spartan-ng/brain/field';
|
|
10
11
|
import { provideBrnLabelable, BrnFieldControl, BrnFieldControlDescribedBy } from '@spartan-ng/brain/field';
|
|
@@ -16,7 +17,6 @@ import { HlmPopoverImports, HlmPopoverTrigger } from '@egose/shadcn-theme-ng/pop
|
|
|
16
17
|
import { BrnOverlay } from '@spartan-ng/brain/overlay';
|
|
17
18
|
import * as i1$2 from '@egose/shadcn-theme-ng/button';
|
|
18
19
|
import { HlmButtonImports } from '@egose/shadcn-theme-ng/button';
|
|
19
|
-
import { hlm } from '@egose/shadcn-theme-ng/utils';
|
|
20
20
|
|
|
21
21
|
function getDefaultConfig$3() {
|
|
22
22
|
return {
|
|
@@ -70,6 +70,26 @@ function injectHlmDatePickerMultiConfig() {
|
|
|
70
70
|
|
|
71
71
|
class HlmDateMultiInput extends BrnDateInput {
|
|
72
72
|
_config = injectHlmDatePickerMultiConfig();
|
|
73
|
+
/** Native `name` attribute forwarded to the inner `<input>`. */
|
|
74
|
+
name = input(undefined, /* @ts-ignore */
|
|
75
|
+
...(ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []));
|
|
76
|
+
/** Native `readonly` state forwarded to the inner `<input>`. */
|
|
77
|
+
readonly = input(false, { ...(ngDevMode ? { debugName: "readonly" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
78
|
+
ariaLabel = input(undefined, /* @ts-ignore */
|
|
79
|
+
...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
80
|
+
ariaDescribedby = input(null, /* @ts-ignore */
|
|
81
|
+
...(ngDevMode ? [{ debugName: "ariaDescribedby" }] : /* istanbul ignore next */ []));
|
|
82
|
+
/** Extra classes merged onto the host group container (over the `HlmInputGroup` base). */
|
|
83
|
+
userClass = input('', { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: 'class' });
|
|
84
|
+
/** Extra classes merged onto the inner `<input>` (over the input-group input base). */
|
|
85
|
+
inputClass = input('', /* @ts-ignore */
|
|
86
|
+
...(ngDevMode ? [{ debugName: "inputClass" }] : /* istanbul ignore next */ []));
|
|
87
|
+
$inputClass = computed(() => hlm(this.inputClass()), /* @ts-ignore */
|
|
88
|
+
...(ngDevMode ? [{ debugName: "$inputClass" }] : /* istanbul ignore next */ []));
|
|
89
|
+
constructor() {
|
|
90
|
+
super();
|
|
91
|
+
classes(() => [this.userClass()]);
|
|
92
|
+
}
|
|
73
93
|
/**
|
|
74
94
|
* Parses input text into dates. Return `null` for invalid input - the
|
|
75
95
|
* picker's dates are cleared while the text is preserved so the user can
|
|
@@ -93,16 +113,21 @@ class HlmDateMultiInput extends BrnDateInput {
|
|
|
93
113
|
formatInputValue(value) {
|
|
94
114
|
return this.formatInputDates()(value);
|
|
95
115
|
}
|
|
96
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmDateMultiInput, deps:
|
|
97
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.3", type: HlmDateMultiInput, isStandalone: true, selector: "hlm-date-multi-input", inputs: { parseDate: { classPropertyName: "parseDate", publicName: "parseDate", isSignal: true, isRequired: false, transformFunction: null }, formatInputDates: { classPropertyName: "formatInputDates", publicName: "formatInputDates", isSignal: true, isRequired: false, transformFunction: null } }, providers: [provideIcons({ lucideCalendar, lucideX }), provideBrnDatePickerTrigger(HlmDateMultiInput)], usesInheritance: true, hostDirectives: [{ directive: i1.HlmInputGroup }], ngImport: i0, template: `
|
|
116
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmDateMultiInput, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
117
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.3", type: HlmDateMultiInput, isStandalone: true, selector: "hlm-date-multi-input", inputs: { name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaDescribedby: { classPropertyName: "ariaDescribedby", publicName: "ariaDescribedby", isSignal: true, isRequired: false, transformFunction: null }, userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, inputClass: { classPropertyName: "inputClass", publicName: "inputClass", isSignal: true, isRequired: false, transformFunction: null }, parseDate: { classPropertyName: "parseDate", publicName: "parseDate", isSignal: true, isRequired: false, transformFunction: null }, formatInputDates: { classPropertyName: "formatInputDates", publicName: "formatInputDates", isSignal: true, isRequired: false, transformFunction: null } }, providers: [provideIcons({ lucideCalendar, lucideX }), provideBrnDatePickerTrigger(HlmDateMultiInput)], usesInheritance: true, hostDirectives: [{ directive: i1.HlmInputGroup }], ngImport: i0, template: `
|
|
98
118
|
<input
|
|
99
119
|
#input
|
|
100
120
|
hlmInputGroupInput
|
|
101
121
|
[value]="_inputValue()"
|
|
102
122
|
[id]="inputId()"
|
|
123
|
+
[attr.name]="name()"
|
|
124
|
+
[attr.aria-label]="ariaLabel()"
|
|
125
|
+
[attr.aria-describedby]="ariaDescribedby()"
|
|
103
126
|
[placeholder]="placeholder()"
|
|
127
|
+
[readonly]="readonly()"
|
|
104
128
|
[disabled]="_disabled()"
|
|
105
129
|
[forceInvalid]="forceInvalid()"
|
|
130
|
+
[class]="$inputClass()"
|
|
106
131
|
(click)="_handleClick()"
|
|
107
132
|
(keydown.arrowDown)="_open()"
|
|
108
133
|
(keydown.enter)="_handleEnter($event)"
|
|
@@ -133,7 +158,7 @@ class HlmDateMultiInput extends BrnDateInput {
|
|
|
133
158
|
<ng-icon name="lucideCalendar" />
|
|
134
159
|
</button>
|
|
135
160
|
</hlm-input-group-addon>
|
|
136
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: i1.HlmInputGroupAddon, selector: "[hlmInputGroupAddon],hlm-input-group-addon", inputs: ["align"] }, { kind: "directive", type: i1.HlmInputGroupButton, selector: "button[hlmInputGroupButton]", inputs: ["size", "type"] }, { kind: "directive", type: i1.HlmInputGroupInput, selector: "input[hlmInputGroupInput]" }, { kind: "component", type: NgIcon, selector: "ng-icon", inputs: ["name", "svg", "size", "strokeWidth", "color"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
161
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: i1.HlmInputGroupAddon, selector: "[hlmInputGroupAddon],hlm-input-group-addon", inputs: ["align"] }, { kind: "directive", type: i1.HlmInputGroupButton, selector: "button[hlmInputGroupButton]", inputs: ["size", "type", "class"] }, { kind: "directive", type: i1.HlmInputGroupInput, selector: "input[hlmInputGroupInput]" }, { kind: "component", type: NgIcon, selector: "ng-icon", inputs: ["name", "svg", "size", "strokeWidth", "color"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
137
162
|
}
|
|
138
163
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmDateMultiInput, decorators: [{
|
|
139
164
|
type: Component,
|
|
@@ -149,9 +174,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImpor
|
|
|
149
174
|
hlmInputGroupInput
|
|
150
175
|
[value]="_inputValue()"
|
|
151
176
|
[id]="inputId()"
|
|
177
|
+
[attr.name]="name()"
|
|
178
|
+
[attr.aria-label]="ariaLabel()"
|
|
179
|
+
[attr.aria-describedby]="ariaDescribedby()"
|
|
152
180
|
[placeholder]="placeholder()"
|
|
181
|
+
[readonly]="readonly()"
|
|
153
182
|
[disabled]="_disabled()"
|
|
154
183
|
[forceInvalid]="forceInvalid()"
|
|
184
|
+
[class]="$inputClass()"
|
|
155
185
|
(click)="_handleClick()"
|
|
156
186
|
(keydown.arrowDown)="_open()"
|
|
157
187
|
(keydown.enter)="_handleEnter($event)"
|
|
@@ -184,7 +214,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImpor
|
|
|
184
214
|
</hlm-input-group-addon>
|
|
185
215
|
`,
|
|
186
216
|
}]
|
|
187
|
-
}], propDecorators: { parseDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "parseDate", required: false }] }], formatInputDates: [{ type: i0.Input, args: [{ isSignal: true, alias: "formatInputDates", required: false }] }] } });
|
|
217
|
+
}], ctorParameters: () => [], propDecorators: { name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], ariaDescribedby: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaDescribedby", required: false }] }], userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], inputClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputClass", required: false }] }], parseDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "parseDate", required: false }] }], formatInputDates: [{ type: i0.Input, args: [{ isSignal: true, alias: "formatInputDates", required: false }] }] } });
|
|
188
218
|
|
|
189
219
|
function getDefaultConfig$2() {
|
|
190
220
|
return {
|
|
@@ -324,7 +354,7 @@ class HlmDatePicker {
|
|
|
324
354
|
this.dateChange.emit(null);
|
|
325
355
|
}
|
|
326
356
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmDatePicker, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
327
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.1.3", type: HlmDatePicker, isStandalone: true, selector: "hlm-date-picker", inputs: { captionLayout: { classPropertyName: "captionLayout", publicName: "captionLayout", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, wrapperDisabled: { classPropertyName: "wrapperDisabled", publicName: "wrapperDisabled", isSignal: true, isRequired: false, transformFunction: null }, date: { classPropertyName: "date", publicName: "date", isSignal: true, isRequired: false, transformFunction: null }, defaultFocusedDate: { classPropertyName: "defaultFocusedDate", publicName: "defaultFocusedDate", isSignal: true, isRequired: false, transformFunction: null }, autoCloseOnSelect: { classPropertyName: "autoCloseOnSelect", publicName: "autoCloseOnSelect", isSignal: true, isRequired: false, transformFunction: null }, formatDate: { classPropertyName: "formatDate", publicName: "formatDate", isSignal: true, isRequired: false, transformFunction: null }, transformDate: { classPropertyName: "transformDate", publicName: "transformDate", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { dateChange: "dateChange" }, host: { classAttribute: "block" }, providers: [HLM_DATE_PICKER_VALUE_ACCESSOR, provideBrnDatePicker(HlmDatePicker), provideBrnLabelable(HlmDatePicker)], queries: [{ propertyName: "_trigger", first: true, predicate: BrnDatePickerTriggerToken, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "popover", first: true, predicate: BrnPopover, descendants: true, isSignal: true }], hostDirectives: [{ directive: i1$1.BrnFieldControl }], ngImport: i0, template: "\n <hlm-popover sideOffset=\"5\" [state]=\"_popoverState()\" (stateChanged)=\"_onStateChange($event)\">\n <ng-content />\n\n <hlm-popover-content class=\"w-fit p-0\" *hlmPopoverPortal=\"let ctx\">\n <ng-content select=\"[hlmDatePickerHeader]\" />\n <hlm-calendar\n class=\"rounded-none border-0\"\n [captionLayout]=\"captionLayout()\"\n [date]=\"_mutableDate()\"\n [defaultFocusedDate]=\"_mutableDate() ?? defaultFocusedDate()\"\n [min]=\"min()\"\n [max]=\"max()\"\n [disabled]=\"disabledState()\"\n (dateChange)=\"_handleChange($event)\"\n />\n <ng-content select=\"[hlmDatePickerFooter]\" />\n </hlm-popover-content>\n </hlm-popover>\n ", isInline: true, dependencies: [{ kind: "directive", type: i2.HlmPopover, selector: "[hlmPopover],hlm-popover" }, { kind: "directive", type: i2.HlmPopoverContent, selector: "[hlmPopoverContent],hlm-popover-content" }, { kind: "directive", type: i2.HlmPopoverPortal, selector: "[hlmPopoverPortal]" }, { kind: "component", type: HlmCalendar, selector: "hlm-calendar", inputs: ["captionLayout"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
357
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "22.1.3", type: HlmDatePicker, isStandalone: true, selector: "hlm-date-picker", inputs: { captionLayout: { classPropertyName: "captionLayout", publicName: "captionLayout", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, wrapperDisabled: { classPropertyName: "wrapperDisabled", publicName: "wrapperDisabled", isSignal: true, isRequired: false, transformFunction: null }, date: { classPropertyName: "date", publicName: "date", isSignal: true, isRequired: false, transformFunction: null }, defaultFocusedDate: { classPropertyName: "defaultFocusedDate", publicName: "defaultFocusedDate", isSignal: true, isRequired: false, transformFunction: null }, autoCloseOnSelect: { classPropertyName: "autoCloseOnSelect", publicName: "autoCloseOnSelect", isSignal: true, isRequired: false, transformFunction: null }, formatDate: { classPropertyName: "formatDate", publicName: "formatDate", isSignal: true, isRequired: false, transformFunction: null }, transformDate: { classPropertyName: "transformDate", publicName: "transformDate", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { dateChange: "dateChange" }, host: { classAttribute: "block w-full min-w-0 max-w-full" }, providers: [HLM_DATE_PICKER_VALUE_ACCESSOR, provideBrnDatePicker(HlmDatePicker), provideBrnLabelable(HlmDatePicker)], queries: [{ propertyName: "_trigger", first: true, predicate: BrnDatePickerTriggerToken, descendants: true, isSignal: true }], viewQueries: [{ propertyName: "popover", first: true, predicate: BrnPopover, descendants: true, isSignal: true }], hostDirectives: [{ directive: i1$1.BrnFieldControl }], ngImport: i0, template: "\n <hlm-popover sideOffset=\"5\" [state]=\"_popoverState()\" (stateChanged)=\"_onStateChange($event)\">\n <ng-content />\n\n <hlm-popover-content class=\"w-fit p-0\" *hlmPopoverPortal=\"let ctx\">\n <ng-content select=\"[hlmDatePickerHeader]\" />\n <hlm-calendar\n class=\"rounded-none border-0\"\n [captionLayout]=\"captionLayout()\"\n [date]=\"_mutableDate()\"\n [defaultFocusedDate]=\"_mutableDate() ?? defaultFocusedDate()\"\n [min]=\"min()\"\n [max]=\"max()\"\n [disabled]=\"disabledState()\"\n (dateChange)=\"_handleChange($event)\"\n />\n <ng-content select=\"[hlmDatePickerFooter]\" />\n </hlm-popover-content>\n </hlm-popover>\n ", isInline: true, dependencies: [{ kind: "directive", type: i2.HlmPopover, selector: "[hlmPopover],hlm-popover" }, { kind: "directive", type: i2.HlmPopoverContent, selector: "[hlmPopoverContent],hlm-popover-content" }, { kind: "directive", type: i2.HlmPopoverPortal, selector: "[hlmPopoverPortal]" }, { kind: "component", type: HlmCalendar, selector: "hlm-calendar", inputs: ["captionLayout"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
328
358
|
}
|
|
329
359
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmDatePicker, decorators: [{
|
|
330
360
|
type: Component,
|
|
@@ -334,7 +364,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImpor
|
|
|
334
364
|
providers: [HLM_DATE_PICKER_VALUE_ACCESSOR, provideBrnDatePicker(HlmDatePicker), provideBrnLabelable(HlmDatePicker)],
|
|
335
365
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
336
366
|
hostDirectives: [BrnFieldControl],
|
|
337
|
-
host: { class:
|
|
367
|
+
host: { class: "block w-full min-w-0 max-w-full" },
|
|
338
368
|
template: "\n <hlm-popover sideOffset=\"5\" [state]=\"_popoverState()\" (stateChanged)=\"_onStateChange($event)\">\n <ng-content />\n\n <hlm-popover-content class=\"w-fit p-0\" *hlmPopoverPortal=\"let ctx\">\n <ng-content select=\"[hlmDatePickerHeader]\" />\n <hlm-calendar\n class=\"rounded-none border-0\"\n [captionLayout]=\"captionLayout()\"\n [date]=\"_mutableDate()\"\n [defaultFocusedDate]=\"_mutableDate() ?? defaultFocusedDate()\"\n [min]=\"min()\"\n [max]=\"max()\"\n [disabled]=\"disabledState()\"\n (dateChange)=\"_handleChange($event)\"\n />\n <ng-content select=\"[hlmDatePickerFooter]\" />\n </hlm-popover-content>\n </hlm-popover>\n ",
|
|
339
369
|
}]
|
|
340
370
|
}], propDecorators: { popover: [{ type: i0.ViewChild, args: [i0.forwardRef(() => BrnPopover), { isSignal: true }] }], _trigger: [{ type: i0.ContentChild, args: [i0.forwardRef(() => BrnDatePickerTriggerToken), { isSignal: true }] }], captionLayout: [{ type: i0.Input, args: [{ isSignal: true, alias: "captionLayout", required: false }] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], wrapperDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "wrapperDisabled", required: false }] }], date: [{ type: i0.Input, args: [{ isSignal: true, alias: "date", required: false }] }], defaultFocusedDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultFocusedDate", required: false }] }], autoCloseOnSelect: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoCloseOnSelect", required: false }] }], formatDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "formatDate", required: false }] }], transformDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "transformDate", required: false }] }], dateChange: [{ type: i0.Output, args: ["dateChange"] }] } });
|
|
@@ -365,6 +395,22 @@ class HlmDatePickerInput extends BrnDateInput {
|
|
|
365
395
|
...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
366
396
|
ariaDescribedby = input(null, /* @ts-ignore */
|
|
367
397
|
...(ngDevMode ? [{ debugName: "ariaDescribedby" }] : /* istanbul ignore next */ []));
|
|
398
|
+
/** Native `name` attribute forwarded to the inner `<input>`. */
|
|
399
|
+
name = input(undefined, /* @ts-ignore */
|
|
400
|
+
...(ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []));
|
|
401
|
+
/** Native `readonly` state forwarded to the inner `<input>`. */
|
|
402
|
+
readonly = input(false, { ...(ngDevMode ? { debugName: "readonly" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
403
|
+
/** Extra classes merged onto the host group container (over the `HlmInputGroup` base). */
|
|
404
|
+
userClass = input('', { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: 'class' });
|
|
405
|
+
/** Extra classes merged onto the inner `<input>` (over the input-group input base). */
|
|
406
|
+
inputClass = input('', /* @ts-ignore */
|
|
407
|
+
...(ngDevMode ? [{ debugName: "inputClass" }] : /* istanbul ignore next */ []));
|
|
408
|
+
$inputClass = computed(() => hlm(this.inputClass()), /* @ts-ignore */
|
|
409
|
+
...(ngDevMode ? [{ debugName: "$inputClass" }] : /* istanbul ignore next */ []));
|
|
410
|
+
constructor() {
|
|
411
|
+
super();
|
|
412
|
+
classes(() => [this.userClass()]);
|
|
413
|
+
}
|
|
368
414
|
/**
|
|
369
415
|
* Parses input text into a date value. Return `null` for invalid
|
|
370
416
|
* input - the picker's date is cleared while the text is preserved so
|
|
@@ -388,18 +434,21 @@ class HlmDatePickerInput extends BrnDateInput {
|
|
|
388
434
|
formatInputValue(value) {
|
|
389
435
|
return this.formatInputDate()(value);
|
|
390
436
|
}
|
|
391
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmDatePickerInput, deps:
|
|
392
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.3", type: HlmDatePickerInput, isStandalone: true, selector: "hlm-date-picker-input", inputs: { ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaDescribedby: { classPropertyName: "ariaDescribedby", publicName: "ariaDescribedby", isSignal: true, isRequired: false, transformFunction: null }, parseDate: { classPropertyName: "parseDate", publicName: "parseDate", isSignal: true, isRequired: false, transformFunction: null }, formatInputDate: { classPropertyName: "formatInputDate", publicName: "formatInputDate", isSignal: true, isRequired: false, transformFunction: null } }, providers: [provideIcons({ lucideCalendar, lucideX }), provideBrnDatePickerTrigger(HlmDatePickerInput)], usesInheritance: true, hostDirectives: [{ directive: i1.HlmInputGroup }], ngImport: i0, template: `
|
|
437
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmDatePickerInput, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
438
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.3", type: HlmDatePickerInput, isStandalone: true, selector: "hlm-date-picker-input", inputs: { ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaDescribedby: { classPropertyName: "ariaDescribedby", publicName: "ariaDescribedby", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, inputClass: { classPropertyName: "inputClass", publicName: "inputClass", isSignal: true, isRequired: false, transformFunction: null }, parseDate: { classPropertyName: "parseDate", publicName: "parseDate", isSignal: true, isRequired: false, transformFunction: null }, formatInputDate: { classPropertyName: "formatInputDate", publicName: "formatInputDate", isSignal: true, isRequired: false, transformFunction: null } }, providers: [provideIcons({ lucideCalendar, lucideX }), provideBrnDatePickerTrigger(HlmDatePickerInput)], usesInheritance: true, hostDirectives: [{ directive: i1.HlmInputGroup }], ngImport: i0, template: `
|
|
393
439
|
<input
|
|
394
440
|
#input
|
|
395
441
|
hlmInputGroupInput
|
|
396
442
|
[value]="_inputValue()"
|
|
397
443
|
[id]="inputId()"
|
|
444
|
+
[attr.name]="name()"
|
|
398
445
|
[attr.aria-label]="ariaLabel()"
|
|
399
446
|
[attr.aria-describedby]="ariaDescribedby()"
|
|
400
447
|
[placeholder]="placeholder()"
|
|
448
|
+
[readonly]="readonly()"
|
|
401
449
|
[disabled]="_disabled()"
|
|
402
450
|
[forceInvalid]="forceInvalid()"
|
|
451
|
+
[class]="$inputClass()"
|
|
403
452
|
(click)="_handleClick()"
|
|
404
453
|
(keydown.arrowDown)="_open()"
|
|
405
454
|
(keydown.enter)="_handleEnter($event)"
|
|
@@ -430,7 +479,7 @@ class HlmDatePickerInput extends BrnDateInput {
|
|
|
430
479
|
<ng-icon name="lucideCalendar" />
|
|
431
480
|
</button>
|
|
432
481
|
</hlm-input-group-addon>
|
|
433
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: i1.HlmInputGroupAddon, selector: "[hlmInputGroupAddon],hlm-input-group-addon", inputs: ["align"] }, { kind: "directive", type: i1.HlmInputGroupButton, selector: "button[hlmInputGroupButton]", inputs: ["size", "type"] }, { kind: "directive", type: i1.HlmInputGroupInput, selector: "input[hlmInputGroupInput]" }, { kind: "component", type: NgIcon, selector: "ng-icon", inputs: ["name", "svg", "size", "strokeWidth", "color"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
482
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: i1.HlmInputGroupAddon, selector: "[hlmInputGroupAddon],hlm-input-group-addon", inputs: ["align"] }, { kind: "directive", type: i1.HlmInputGroupButton, selector: "button[hlmInputGroupButton]", inputs: ["size", "type", "class"] }, { kind: "directive", type: i1.HlmInputGroupInput, selector: "input[hlmInputGroupInput]" }, { kind: "component", type: NgIcon, selector: "ng-icon", inputs: ["name", "svg", "size", "strokeWidth", "color"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
434
483
|
}
|
|
435
484
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmDatePickerInput, decorators: [{
|
|
436
485
|
type: Component,
|
|
@@ -446,11 +495,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImpor
|
|
|
446
495
|
hlmInputGroupInput
|
|
447
496
|
[value]="_inputValue()"
|
|
448
497
|
[id]="inputId()"
|
|
498
|
+
[attr.name]="name()"
|
|
449
499
|
[attr.aria-label]="ariaLabel()"
|
|
450
500
|
[attr.aria-describedby]="ariaDescribedby()"
|
|
451
501
|
[placeholder]="placeholder()"
|
|
502
|
+
[readonly]="readonly()"
|
|
452
503
|
[disabled]="_disabled()"
|
|
453
504
|
[forceInvalid]="forceInvalid()"
|
|
505
|
+
[class]="$inputClass()"
|
|
454
506
|
(click)="_handleClick()"
|
|
455
507
|
(keydown.arrowDown)="_open()"
|
|
456
508
|
(keydown.enter)="_handleEnter($event)"
|
|
@@ -483,7 +535,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImpor
|
|
|
483
535
|
</hlm-input-group-addon>
|
|
484
536
|
`,
|
|
485
537
|
}]
|
|
486
|
-
}], propDecorators: { ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], ariaDescribedby: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaDescribedby", required: false }] }], parseDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "parseDate", required: false }] }], formatInputDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "formatInputDate", required: false }] }] } });
|
|
538
|
+
}], ctorParameters: () => [], propDecorators: { ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], ariaDescribedby: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaDescribedby", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], inputClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputClass", required: false }] }], parseDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "parseDate", required: false }] }], formatInputDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "formatInputDate", required: false }] }] } });
|
|
487
539
|
|
|
488
540
|
const HLM_DATE_PICKER_MUTLI_VALUE_ACCESSOR = {
|
|
489
541
|
provide: NG_VALUE_ACCESSOR,
|
|
@@ -526,10 +578,12 @@ class HlmDatePickerMulti {
|
|
|
526
578
|
...(ngDevMode ? [{ debugName: "transformDates" }] : /* istanbul ignore next */ []));
|
|
527
579
|
_popoverState = signal(null, /* @ts-ignore */
|
|
528
580
|
...(ngDevMode ? [{ debugName: "_popoverState" }] : /* istanbul ignore next */ []));
|
|
529
|
-
|
|
530
|
-
...(ngDevMode ? [{ debugName: "
|
|
581
|
+
_formDisabled = signal(false, /* @ts-ignore */
|
|
582
|
+
...(ngDevMode ? [{ debugName: "_formDisabled" }] : /* istanbul ignore next */ []));
|
|
531
583
|
/** @internal The disabled state as a readonly signal */
|
|
532
|
-
disabledState = this.
|
|
584
|
+
disabledState = computed(() => this.disabled() || this._formDisabled(), /* @ts-ignore */
|
|
585
|
+
...(ngDevMode ? [{ debugName: "disabledState" }] : /* istanbul ignore next */ []));
|
|
586
|
+
_disabled = this.disabledState;
|
|
533
587
|
formattedDate = computed(() => {
|
|
534
588
|
const dates = this._mutableDate();
|
|
535
589
|
return dates ? this.formatDates()(dates) : undefined;
|
|
@@ -590,7 +644,7 @@ class HlmDatePickerMulti {
|
|
|
590
644
|
this._onTouched = fn;
|
|
591
645
|
}
|
|
592
646
|
setDisabledState(isDisabled) {
|
|
593
|
-
this.
|
|
647
|
+
this._formDisabled.set(isDisabled);
|
|
594
648
|
}
|
|
595
649
|
open() {
|
|
596
650
|
this._popoverState.set('open');
|
|
@@ -708,6 +762,26 @@ function injectHlmDateRangePickerConfig() {
|
|
|
708
762
|
|
|
709
763
|
class HlmDateRangeInput extends BrnDateInput {
|
|
710
764
|
_config = injectHlmDateRangePickerConfig();
|
|
765
|
+
/** Native `name` attribute forwarded to the inner `<input>`. */
|
|
766
|
+
name = input(undefined, /* @ts-ignore */
|
|
767
|
+
...(ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []));
|
|
768
|
+
/** Native `readonly` state forwarded to the inner `<input>`. */
|
|
769
|
+
readonly = input(false, { ...(ngDevMode ? { debugName: "readonly" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
770
|
+
ariaLabel = input(undefined, /* @ts-ignore */
|
|
771
|
+
...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
772
|
+
ariaDescribedby = input(null, /* @ts-ignore */
|
|
773
|
+
...(ngDevMode ? [{ debugName: "ariaDescribedby" }] : /* istanbul ignore next */ []));
|
|
774
|
+
/** Extra classes merged onto the host group container (over the `HlmInputGroup` base). */
|
|
775
|
+
userClass = input('', { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: 'class' });
|
|
776
|
+
/** Extra classes merged onto the inner `<input>` (over the input-group input base). */
|
|
777
|
+
inputClass = input('', /* @ts-ignore */
|
|
778
|
+
...(ngDevMode ? [{ debugName: "inputClass" }] : /* istanbul ignore next */ []));
|
|
779
|
+
$inputClass = computed(() => hlm(this.inputClass()), /* @ts-ignore */
|
|
780
|
+
...(ngDevMode ? [{ debugName: "$inputClass" }] : /* istanbul ignore next */ []));
|
|
781
|
+
constructor() {
|
|
782
|
+
super();
|
|
783
|
+
classes(() => [this.userClass()]);
|
|
784
|
+
}
|
|
711
785
|
/**
|
|
712
786
|
* Parses input text into a date range. Return `null` for invalid
|
|
713
787
|
* input - the picker's range is cleared while the text is preserved so
|
|
@@ -731,16 +805,21 @@ class HlmDateRangeInput extends BrnDateInput {
|
|
|
731
805
|
formatInputValue(value) {
|
|
732
806
|
return this.formatInputDates()(value);
|
|
733
807
|
}
|
|
734
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmDateRangeInput, deps:
|
|
735
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.3", type: HlmDateRangeInput, isStandalone: true, selector: "hlm-date-range-input", inputs: { parseDate: { classPropertyName: "parseDate", publicName: "parseDate", isSignal: true, isRequired: false, transformFunction: null }, formatInputDates: { classPropertyName: "formatInputDates", publicName: "formatInputDates", isSignal: true, isRequired: false, transformFunction: null } }, providers: [provideIcons({ lucideCalendar, lucideX }), provideBrnDatePickerTrigger(HlmDateRangeInput)], usesInheritance: true, hostDirectives: [{ directive: i1.HlmInputGroup }], ngImport: i0, template: `
|
|
808
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmDateRangeInput, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
809
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.3", type: HlmDateRangeInput, isStandalone: true, selector: "hlm-date-range-input", inputs: { name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaDescribedby: { classPropertyName: "ariaDescribedby", publicName: "ariaDescribedby", isSignal: true, isRequired: false, transformFunction: null }, userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, inputClass: { classPropertyName: "inputClass", publicName: "inputClass", isSignal: true, isRequired: false, transformFunction: null }, parseDate: { classPropertyName: "parseDate", publicName: "parseDate", isSignal: true, isRequired: false, transformFunction: null }, formatInputDates: { classPropertyName: "formatInputDates", publicName: "formatInputDates", isSignal: true, isRequired: false, transformFunction: null } }, providers: [provideIcons({ lucideCalendar, lucideX }), provideBrnDatePickerTrigger(HlmDateRangeInput)], usesInheritance: true, hostDirectives: [{ directive: i1.HlmInputGroup }], ngImport: i0, template: `
|
|
736
810
|
<input
|
|
737
811
|
#input
|
|
738
812
|
hlmInputGroupInput
|
|
739
813
|
[value]="_inputValue()"
|
|
740
814
|
[id]="inputId()"
|
|
815
|
+
[attr.name]="name()"
|
|
816
|
+
[attr.aria-label]="ariaLabel()"
|
|
817
|
+
[attr.aria-describedby]="ariaDescribedby()"
|
|
741
818
|
[placeholder]="placeholder()"
|
|
819
|
+
[readonly]="readonly()"
|
|
742
820
|
[disabled]="_disabled()"
|
|
743
821
|
[forceInvalid]="forceInvalid()"
|
|
822
|
+
[class]="$inputClass()"
|
|
744
823
|
(click)="_handleClick()"
|
|
745
824
|
(keydown.arrowDown)="_open()"
|
|
746
825
|
(keydown.enter)="_handleEnter($event)"
|
|
@@ -771,7 +850,7 @@ class HlmDateRangeInput extends BrnDateInput {
|
|
|
771
850
|
<ng-icon name="lucideCalendar" />
|
|
772
851
|
</button>
|
|
773
852
|
</hlm-input-group-addon>
|
|
774
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: i1.HlmInputGroupAddon, selector: "[hlmInputGroupAddon],hlm-input-group-addon", inputs: ["align"] }, { kind: "directive", type: i1.HlmInputGroupButton, selector: "button[hlmInputGroupButton]", inputs: ["size", "type"] }, { kind: "directive", type: i1.HlmInputGroupInput, selector: "input[hlmInputGroupInput]" }, { kind: "component", type: NgIcon, selector: "ng-icon", inputs: ["name", "svg", "size", "strokeWidth", "color"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
853
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: i1.HlmInputGroupAddon, selector: "[hlmInputGroupAddon],hlm-input-group-addon", inputs: ["align"] }, { kind: "directive", type: i1.HlmInputGroupButton, selector: "button[hlmInputGroupButton]", inputs: ["size", "type", "class"] }, { kind: "directive", type: i1.HlmInputGroupInput, selector: "input[hlmInputGroupInput]" }, { kind: "component", type: NgIcon, selector: "ng-icon", inputs: ["name", "svg", "size", "strokeWidth", "color"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
775
854
|
}
|
|
776
855
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmDateRangeInput, decorators: [{
|
|
777
856
|
type: Component,
|
|
@@ -787,9 +866,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImpor
|
|
|
787
866
|
hlmInputGroupInput
|
|
788
867
|
[value]="_inputValue()"
|
|
789
868
|
[id]="inputId()"
|
|
869
|
+
[attr.name]="name()"
|
|
870
|
+
[attr.aria-label]="ariaLabel()"
|
|
871
|
+
[attr.aria-describedby]="ariaDescribedby()"
|
|
790
872
|
[placeholder]="placeholder()"
|
|
873
|
+
[readonly]="readonly()"
|
|
791
874
|
[disabled]="_disabled()"
|
|
792
875
|
[forceInvalid]="forceInvalid()"
|
|
876
|
+
[class]="$inputClass()"
|
|
793
877
|
(click)="_handleClick()"
|
|
794
878
|
(keydown.arrowDown)="_open()"
|
|
795
879
|
(keydown.enter)="_handleEnter($event)"
|
|
@@ -822,7 +906,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImpor
|
|
|
822
906
|
</hlm-input-group-addon>
|
|
823
907
|
`,
|
|
824
908
|
}]
|
|
825
|
-
}], propDecorators: { parseDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "parseDate", required: false }] }], formatInputDates: [{ type: i0.Input, args: [{ isSignal: true, alias: "formatInputDates", required: false }] }] } });
|
|
909
|
+
}], ctorParameters: () => [], propDecorators: { name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], ariaDescribedby: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaDescribedby", required: false }] }], userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], inputClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputClass", required: false }] }], parseDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "parseDate", required: false }] }], formatInputDates: [{ type: i0.Input, args: [{ isSignal: true, alias: "formatInputDates", required: false }] }] } });
|
|
826
910
|
|
|
827
911
|
const HLM_DATE_RANGE_PICKER_VALUE_ACCESSOR = {
|
|
828
912
|
provide: NG_VALUE_ACCESSOR,
|
|
@@ -865,10 +949,12 @@ class HlmDateRangePicker {
|
|
|
865
949
|
...(ngDevMode ? [{ debugName: "transformDates" }] : /* istanbul ignore next */ []));
|
|
866
950
|
_popoverState = signal(null, /* @ts-ignore */
|
|
867
951
|
...(ngDevMode ? [{ debugName: "_popoverState" }] : /* istanbul ignore next */ []));
|
|
868
|
-
|
|
869
|
-
...(ngDevMode ? [{ debugName: "
|
|
952
|
+
_formDisabled = signal(false, /* @ts-ignore */
|
|
953
|
+
...(ngDevMode ? [{ debugName: "_formDisabled" }] : /* istanbul ignore next */ []));
|
|
870
954
|
/** @internal The disabled state as a readonly signal */
|
|
871
|
-
disabledState = this.
|
|
955
|
+
disabledState = computed(() => this.disabled() || this._formDisabled(), /* @ts-ignore */
|
|
956
|
+
...(ngDevMode ? [{ debugName: "disabledState" }] : /* istanbul ignore next */ []));
|
|
957
|
+
_disabled = this.disabledState;
|
|
872
958
|
formattedDate = computed(() => {
|
|
873
959
|
const start = this._start();
|
|
874
960
|
const end = this._end();
|
|
@@ -954,7 +1040,7 @@ class HlmDateRangePicker {
|
|
|
954
1040
|
this._onTouched = fn;
|
|
955
1041
|
}
|
|
956
1042
|
setDisabledState(isDisabled) {
|
|
957
|
-
this.
|
|
1043
|
+
this._formDisabled.set(isDisabled);
|
|
958
1044
|
}
|
|
959
1045
|
open() {
|
|
960
1046
|
this._popoverState.set('open');
|
|
@@ -1039,6 +1125,26 @@ function injectHlmMonthYearPickerConfig() {
|
|
|
1039
1125
|
|
|
1040
1126
|
class HlmMonthYearInput extends BrnDateInput {
|
|
1041
1127
|
_config = injectHlmMonthYearPickerConfig();
|
|
1128
|
+
/** Native `name` attribute forwarded to the inner `<input>`. */
|
|
1129
|
+
name = input(undefined, /* @ts-ignore */
|
|
1130
|
+
...(ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []));
|
|
1131
|
+
/** Native `readonly` state forwarded to the inner `<input>`. */
|
|
1132
|
+
readonly = input(false, { ...(ngDevMode ? { debugName: "readonly" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
1133
|
+
ariaLabel = input(undefined, /* @ts-ignore */
|
|
1134
|
+
...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
1135
|
+
ariaDescribedby = input(null, /* @ts-ignore */
|
|
1136
|
+
...(ngDevMode ? [{ debugName: "ariaDescribedby" }] : /* istanbul ignore next */ []));
|
|
1137
|
+
/** Extra classes merged onto the host group container (over the `HlmInputGroup` base). */
|
|
1138
|
+
userClass = input('', { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: 'class' });
|
|
1139
|
+
/** Extra classes merged onto the inner `<input>` (over the input-group input base). */
|
|
1140
|
+
inputClass = input('', /* @ts-ignore */
|
|
1141
|
+
...(ngDevMode ? [{ debugName: "inputClass" }] : /* istanbul ignore next */ []));
|
|
1142
|
+
$inputClass = computed(() => hlm(this.inputClass()), /* @ts-ignore */
|
|
1143
|
+
...(ngDevMode ? [{ debugName: "$inputClass" }] : /* istanbul ignore next */ []));
|
|
1144
|
+
constructor() {
|
|
1145
|
+
super();
|
|
1146
|
+
classes(() => [this.userClass()]);
|
|
1147
|
+
}
|
|
1042
1148
|
/**
|
|
1043
1149
|
* Parses input text into a date value. Return `null` for invalid
|
|
1044
1150
|
* input - the picker's date is cleared while the text is preserved so
|
|
@@ -1062,16 +1168,21 @@ class HlmMonthYearInput extends BrnDateInput {
|
|
|
1062
1168
|
formatInputValue(value) {
|
|
1063
1169
|
return this.formatInputDate()(value);
|
|
1064
1170
|
}
|
|
1065
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmMonthYearInput, deps:
|
|
1066
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.3", type: HlmMonthYearInput, isStandalone: true, selector: "hlm-month-year-input", inputs: { parseDate: { classPropertyName: "parseDate", publicName: "parseDate", isSignal: true, isRequired: false, transformFunction: null }, formatInputDate: { classPropertyName: "formatInputDate", publicName: "formatInputDate", isSignal: true, isRequired: false, transformFunction: null } }, providers: [provideIcons({ lucideCalendar, lucideX }), provideBrnDatePickerTrigger(HlmMonthYearInput)], usesInheritance: true, hostDirectives: [{ directive: i1.HlmInputGroup }], ngImport: i0, template: `
|
|
1171
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmMonthYearInput, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1172
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.3", type: HlmMonthYearInput, isStandalone: true, selector: "hlm-month-year-input", inputs: { name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, ariaDescribedby: { classPropertyName: "ariaDescribedby", publicName: "ariaDescribedby", isSignal: true, isRequired: false, transformFunction: null }, userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, inputClass: { classPropertyName: "inputClass", publicName: "inputClass", isSignal: true, isRequired: false, transformFunction: null }, parseDate: { classPropertyName: "parseDate", publicName: "parseDate", isSignal: true, isRequired: false, transformFunction: null }, formatInputDate: { classPropertyName: "formatInputDate", publicName: "formatInputDate", isSignal: true, isRequired: false, transformFunction: null } }, providers: [provideIcons({ lucideCalendar, lucideX }), provideBrnDatePickerTrigger(HlmMonthYearInput)], usesInheritance: true, hostDirectives: [{ directive: i1.HlmInputGroup }], ngImport: i0, template: `
|
|
1067
1173
|
<input
|
|
1068
1174
|
#input
|
|
1069
1175
|
hlmInputGroupInput
|
|
1070
1176
|
[value]="_inputValue()"
|
|
1071
1177
|
[id]="inputId()"
|
|
1178
|
+
[attr.name]="name()"
|
|
1179
|
+
[attr.aria-label]="ariaLabel()"
|
|
1180
|
+
[attr.aria-describedby]="ariaDescribedby()"
|
|
1072
1181
|
[placeholder]="placeholder()"
|
|
1182
|
+
[readonly]="readonly()"
|
|
1073
1183
|
[disabled]="_disabled()"
|
|
1074
1184
|
[forceInvalid]="forceInvalid()"
|
|
1185
|
+
[class]="$inputClass()"
|
|
1075
1186
|
(click)="_handleClick()"
|
|
1076
1187
|
(keydown.arrowDown)="_open()"
|
|
1077
1188
|
(keydown.enter)="_handleEnter($event)"
|
|
@@ -1102,7 +1213,7 @@ class HlmMonthYearInput extends BrnDateInput {
|
|
|
1102
1213
|
<ng-icon name="lucideCalendar" />
|
|
1103
1214
|
</button>
|
|
1104
1215
|
</hlm-input-group-addon>
|
|
1105
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: i1.HlmInputGroupAddon, selector: "[hlmInputGroupAddon],hlm-input-group-addon", inputs: ["align"] }, { kind: "directive", type: i1.HlmInputGroupButton, selector: "button[hlmInputGroupButton]", inputs: ["size", "type"] }, { kind: "directive", type: i1.HlmInputGroupInput, selector: "input[hlmInputGroupInput]" }, { kind: "component", type: NgIcon, selector: "ng-icon", inputs: ["name", "svg", "size", "strokeWidth", "color"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1216
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: i1.HlmInputGroupAddon, selector: "[hlmInputGroupAddon],hlm-input-group-addon", inputs: ["align"] }, { kind: "directive", type: i1.HlmInputGroupButton, selector: "button[hlmInputGroupButton]", inputs: ["size", "type", "class"] }, { kind: "directive", type: i1.HlmInputGroupInput, selector: "input[hlmInputGroupInput]" }, { kind: "component", type: NgIcon, selector: "ng-icon", inputs: ["name", "svg", "size", "strokeWidth", "color"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1106
1217
|
}
|
|
1107
1218
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmMonthYearInput, decorators: [{
|
|
1108
1219
|
type: Component,
|
|
@@ -1118,9 +1229,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImpor
|
|
|
1118
1229
|
hlmInputGroupInput
|
|
1119
1230
|
[value]="_inputValue()"
|
|
1120
1231
|
[id]="inputId()"
|
|
1232
|
+
[attr.name]="name()"
|
|
1233
|
+
[attr.aria-label]="ariaLabel()"
|
|
1234
|
+
[attr.aria-describedby]="ariaDescribedby()"
|
|
1121
1235
|
[placeholder]="placeholder()"
|
|
1236
|
+
[readonly]="readonly()"
|
|
1122
1237
|
[disabled]="_disabled()"
|
|
1123
1238
|
[forceInvalid]="forceInvalid()"
|
|
1239
|
+
[class]="$inputClass()"
|
|
1124
1240
|
(click)="_handleClick()"
|
|
1125
1241
|
(keydown.arrowDown)="_open()"
|
|
1126
1242
|
(keydown.enter)="_handleEnter($event)"
|
|
@@ -1153,7 +1269,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImpor
|
|
|
1153
1269
|
</hlm-input-group-addon>
|
|
1154
1270
|
`,
|
|
1155
1271
|
}]
|
|
1156
|
-
}], propDecorators: { parseDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "parseDate", required: false }] }], formatInputDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "formatInputDate", required: false }] }] } });
|
|
1272
|
+
}], ctorParameters: () => [], propDecorators: { name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], ariaDescribedby: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaDescribedby", required: false }] }], userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], inputClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputClass", required: false }] }], parseDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "parseDate", required: false }] }], formatInputDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "formatInputDate", required: false }] }] } });
|
|
1157
1273
|
|
|
1158
1274
|
const HLM_MONTH_YEAR_PICKER_VALUE_ACCESSOR = {
|
|
1159
1275
|
provide: NG_VALUE_ACCESSOR,
|
|
@@ -1192,10 +1308,12 @@ class HlmMonthYearPicker {
|
|
|
1192
1308
|
...(ngDevMode ? [{ debugName: "transformDate" }] : /* istanbul ignore next */ []));
|
|
1193
1309
|
_popoverState = signal(null, /* @ts-ignore */
|
|
1194
1310
|
...(ngDevMode ? [{ debugName: "_popoverState" }] : /* istanbul ignore next */ []));
|
|
1195
|
-
|
|
1196
|
-
...(ngDevMode ? [{ debugName: "
|
|
1311
|
+
_formDisabled = signal(false, /* @ts-ignore */
|
|
1312
|
+
...(ngDevMode ? [{ debugName: "_formDisabled" }] : /* istanbul ignore next */ []));
|
|
1197
1313
|
/** @internal The disabled state as a readonly signal */
|
|
1198
|
-
disabledState = this.
|
|
1314
|
+
disabledState = computed(() => this.disabled() || this._formDisabled(), /* @ts-ignore */
|
|
1315
|
+
...(ngDevMode ? [{ debugName: "disabledState" }] : /* istanbul ignore next */ []));
|
|
1316
|
+
_disabled = this.disabledState;
|
|
1199
1317
|
formattedDate = computed(() => {
|
|
1200
1318
|
const date = this._mutableDate();
|
|
1201
1319
|
return date ? this.formatDate()(date) : undefined;
|
|
@@ -1252,7 +1370,7 @@ class HlmMonthYearPicker {
|
|
|
1252
1370
|
this._onTouched?.();
|
|
1253
1371
|
}
|
|
1254
1372
|
setDisabledState(isDisabled) {
|
|
1255
|
-
this.
|
|
1373
|
+
this._formDisabled.set(isDisabled);
|
|
1256
1374
|
}
|
|
1257
1375
|
open() {
|
|
1258
1376
|
this._popoverState.set('open');
|