@egose/shadcn-theme-ng-tw 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/fesm2022/alert.mjs +1 -1
- 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/button-group/fesm2022/button-group.mjs +1 -1
- 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 +211 -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 +273 -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 +60 -16
- 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 +239 -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 +236 -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 +194 -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 +229 -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 +187 -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 +203 -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 +211 -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 +24 -15
- package/form-select/types/form-select.d.ts +18 -1
- package/form-slider/README.md +182 -0
- package/form-slider/fesm2022/form-slider.mjs +186 -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 +178 -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 +241 -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 +216 -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 +23 -13
- 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 +877 -409
- 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/sheet/fesm2022/sheet.mjs +1 -1
- package/sidebar/README.md +457 -5
- package/skeleton/README.md +217 -5
- package/slider/README.md +273 -5
- package/slider/fesm2022/slider.mjs +17 -13
- 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 +12 -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-tw/input-group';
|
|
7
7
|
import { HlmInputGroup, HlmInputGroupImports } from '@egose/shadcn-theme-ng-tw/input-group';
|
|
8
|
+
import { hlm, classes } from '@egose/shadcn-theme-ng-tw/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-tw/
|
|
|
16
17
|
import { BrnOverlay } from '@spartan-ng/brain/overlay';
|
|
17
18
|
import * as i1$2 from '@egose/shadcn-theme-ng-tw/button';
|
|
18
19
|
import { HlmButtonImports } from '@egose/shadcn-theme-ng-tw/button';
|
|
19
|
-
import { hlm } from '@egose/shadcn-theme-ng-tw/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: `
|
|
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: "tw:block tw:w-full tw:min-w-0 tw: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: `
|
|
328
358
|
<hlm-popover sideOffset="5" [state]="_popoverState()" (stateChanged)="_onStateChange($event)">
|
|
329
359
|
<ng-content />
|
|
330
360
|
|
|
@@ -353,7 +383,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImpor
|
|
|
353
383
|
providers: [HLM_DATE_PICKER_VALUE_ACCESSOR, provideBrnDatePicker(HlmDatePicker), provideBrnLabelable(HlmDatePicker)],
|
|
354
384
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
355
385
|
hostDirectives: [BrnFieldControl],
|
|
356
|
-
host: { class:
|
|
386
|
+
host: { class: 'tw:block tw:w-full tw:min-w-0 tw:max-w-full' },
|
|
357
387
|
template: `
|
|
358
388
|
<hlm-popover sideOffset="5" [state]="_popoverState()" (stateChanged)="_onStateChange($event)">
|
|
359
389
|
<ng-content />
|
|
@@ -403,6 +433,22 @@ class HlmDatePickerInput extends BrnDateInput {
|
|
|
403
433
|
...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
404
434
|
ariaDescribedby = input(null, /* @ts-ignore */
|
|
405
435
|
...(ngDevMode ? [{ debugName: "ariaDescribedby" }] : /* istanbul ignore next */ []));
|
|
436
|
+
/** Native `name` attribute forwarded to the inner `<input>`. */
|
|
437
|
+
name = input(undefined, /* @ts-ignore */
|
|
438
|
+
...(ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []));
|
|
439
|
+
/** Native `readonly` state forwarded to the inner `<input>`. */
|
|
440
|
+
readonly = input(false, { ...(ngDevMode ? { debugName: "readonly" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
441
|
+
/** Extra classes merged onto the host group container (over the `HlmInputGroup` base). */
|
|
442
|
+
userClass = input('', { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: 'class' });
|
|
443
|
+
/** Extra classes merged onto the inner `<input>` (over the input-group input base). */
|
|
444
|
+
inputClass = input('', /* @ts-ignore */
|
|
445
|
+
...(ngDevMode ? [{ debugName: "inputClass" }] : /* istanbul ignore next */ []));
|
|
446
|
+
$inputClass = computed(() => hlm(this.inputClass()), /* @ts-ignore */
|
|
447
|
+
...(ngDevMode ? [{ debugName: "$inputClass" }] : /* istanbul ignore next */ []));
|
|
448
|
+
constructor() {
|
|
449
|
+
super();
|
|
450
|
+
classes(() => [this.userClass()]);
|
|
451
|
+
}
|
|
406
452
|
/**
|
|
407
453
|
* Parses input text into a date value. Return `null` for invalid
|
|
408
454
|
* input - the picker's date is cleared while the text is preserved so
|
|
@@ -426,18 +472,21 @@ class HlmDatePickerInput extends BrnDateInput {
|
|
|
426
472
|
formatInputValue(value) {
|
|
427
473
|
return this.formatInputDate()(value);
|
|
428
474
|
}
|
|
429
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmDatePickerInput, deps:
|
|
430
|
-
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: `
|
|
475
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmDatePickerInput, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
476
|
+
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: `
|
|
431
477
|
<input
|
|
432
478
|
#input
|
|
433
479
|
hlmInputGroupInput
|
|
434
480
|
[value]="_inputValue()"
|
|
435
481
|
[id]="inputId()"
|
|
482
|
+
[attr.name]="name()"
|
|
436
483
|
[attr.aria-label]="ariaLabel()"
|
|
437
484
|
[attr.aria-describedby]="ariaDescribedby()"
|
|
438
485
|
[placeholder]="placeholder()"
|
|
486
|
+
[readonly]="readonly()"
|
|
439
487
|
[disabled]="_disabled()"
|
|
440
488
|
[forceInvalid]="forceInvalid()"
|
|
489
|
+
[class]="$inputClass()"
|
|
441
490
|
(click)="_handleClick()"
|
|
442
491
|
(keydown.arrowDown)="_open()"
|
|
443
492
|
(keydown.enter)="_handleEnter($event)"
|
|
@@ -468,7 +517,7 @@ class HlmDatePickerInput extends BrnDateInput {
|
|
|
468
517
|
<ng-icon name="lucideCalendar" />
|
|
469
518
|
</button>
|
|
470
519
|
</hlm-input-group-addon>
|
|
471
|
-
`, 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 });
|
|
520
|
+
`, 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 });
|
|
472
521
|
}
|
|
473
522
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmDatePickerInput, decorators: [{
|
|
474
523
|
type: Component,
|
|
@@ -484,11 +533,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImpor
|
|
|
484
533
|
hlmInputGroupInput
|
|
485
534
|
[value]="_inputValue()"
|
|
486
535
|
[id]="inputId()"
|
|
536
|
+
[attr.name]="name()"
|
|
487
537
|
[attr.aria-label]="ariaLabel()"
|
|
488
538
|
[attr.aria-describedby]="ariaDescribedby()"
|
|
489
539
|
[placeholder]="placeholder()"
|
|
540
|
+
[readonly]="readonly()"
|
|
490
541
|
[disabled]="_disabled()"
|
|
491
542
|
[forceInvalid]="forceInvalid()"
|
|
543
|
+
[class]="$inputClass()"
|
|
492
544
|
(click)="_handleClick()"
|
|
493
545
|
(keydown.arrowDown)="_open()"
|
|
494
546
|
(keydown.enter)="_handleEnter($event)"
|
|
@@ -521,7 +573,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImpor
|
|
|
521
573
|
</hlm-input-group-addon>
|
|
522
574
|
`,
|
|
523
575
|
}]
|
|
524
|
-
}], 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 }] }] } });
|
|
576
|
+
}], 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 }] }] } });
|
|
525
577
|
|
|
526
578
|
const HLM_DATE_PICKER_MUTLI_VALUE_ACCESSOR = {
|
|
527
579
|
provide: NG_VALUE_ACCESSOR,
|
|
@@ -564,10 +616,12 @@ class HlmDatePickerMulti {
|
|
|
564
616
|
...(ngDevMode ? [{ debugName: "transformDates" }] : /* istanbul ignore next */ []));
|
|
565
617
|
_popoverState = signal(null, /* @ts-ignore */
|
|
566
618
|
...(ngDevMode ? [{ debugName: "_popoverState" }] : /* istanbul ignore next */ []));
|
|
567
|
-
|
|
568
|
-
...(ngDevMode ? [{ debugName: "
|
|
619
|
+
_formDisabled = signal(false, /* @ts-ignore */
|
|
620
|
+
...(ngDevMode ? [{ debugName: "_formDisabled" }] : /* istanbul ignore next */ []));
|
|
569
621
|
/** @internal The disabled state as a readonly signal */
|
|
570
|
-
disabledState = this.
|
|
622
|
+
disabledState = computed(() => this.disabled() || this._formDisabled(), /* @ts-ignore */
|
|
623
|
+
...(ngDevMode ? [{ debugName: "disabledState" }] : /* istanbul ignore next */ []));
|
|
624
|
+
_disabled = this.disabledState;
|
|
571
625
|
formattedDate = computed(() => {
|
|
572
626
|
const dates = this._mutableDate();
|
|
573
627
|
return dates ? this.formatDates()(dates) : undefined;
|
|
@@ -628,7 +682,7 @@ class HlmDatePickerMulti {
|
|
|
628
682
|
this._onTouched = fn;
|
|
629
683
|
}
|
|
630
684
|
setDisabledState(isDisabled) {
|
|
631
|
-
this.
|
|
685
|
+
this._formDisabled.set(isDisabled);
|
|
632
686
|
}
|
|
633
687
|
open() {
|
|
634
688
|
this._popoverState.set('open');
|
|
@@ -846,6 +900,26 @@ function injectHlmDateRangePickerConfig() {
|
|
|
846
900
|
|
|
847
901
|
class HlmDateRangeInput extends BrnDateInput {
|
|
848
902
|
_config = injectHlmDateRangePickerConfig();
|
|
903
|
+
/** Native `name` attribute forwarded to the inner `<input>`. */
|
|
904
|
+
name = input(undefined, /* @ts-ignore */
|
|
905
|
+
...(ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []));
|
|
906
|
+
/** Native `readonly` state forwarded to the inner `<input>`. */
|
|
907
|
+
readonly = input(false, { ...(ngDevMode ? { debugName: "readonly" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
908
|
+
ariaLabel = input(undefined, /* @ts-ignore */
|
|
909
|
+
...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
910
|
+
ariaDescribedby = input(null, /* @ts-ignore */
|
|
911
|
+
...(ngDevMode ? [{ debugName: "ariaDescribedby" }] : /* istanbul ignore next */ []));
|
|
912
|
+
/** Extra classes merged onto the host group container (over the `HlmInputGroup` base). */
|
|
913
|
+
userClass = input('', { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: 'class' });
|
|
914
|
+
/** Extra classes merged onto the inner `<input>` (over the input-group input base). */
|
|
915
|
+
inputClass = input('', /* @ts-ignore */
|
|
916
|
+
...(ngDevMode ? [{ debugName: "inputClass" }] : /* istanbul ignore next */ []));
|
|
917
|
+
$inputClass = computed(() => hlm(this.inputClass()), /* @ts-ignore */
|
|
918
|
+
...(ngDevMode ? [{ debugName: "$inputClass" }] : /* istanbul ignore next */ []));
|
|
919
|
+
constructor() {
|
|
920
|
+
super();
|
|
921
|
+
classes(() => [this.userClass()]);
|
|
922
|
+
}
|
|
849
923
|
/**
|
|
850
924
|
* Parses input text into a date range. Return `null` for invalid
|
|
851
925
|
* input - the picker's range is cleared while the text is preserved so
|
|
@@ -869,16 +943,21 @@ class HlmDateRangeInput extends BrnDateInput {
|
|
|
869
943
|
formatInputValue(value) {
|
|
870
944
|
return this.formatInputDates()(value);
|
|
871
945
|
}
|
|
872
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmDateRangeInput, deps:
|
|
873
|
-
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: `
|
|
946
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmDateRangeInput, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
947
|
+
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: `
|
|
874
948
|
<input
|
|
875
949
|
#input
|
|
876
950
|
hlmInputGroupInput
|
|
877
951
|
[value]="_inputValue()"
|
|
878
952
|
[id]="inputId()"
|
|
953
|
+
[attr.name]="name()"
|
|
954
|
+
[attr.aria-label]="ariaLabel()"
|
|
955
|
+
[attr.aria-describedby]="ariaDescribedby()"
|
|
879
956
|
[placeholder]="placeholder()"
|
|
957
|
+
[readonly]="readonly()"
|
|
880
958
|
[disabled]="_disabled()"
|
|
881
959
|
[forceInvalid]="forceInvalid()"
|
|
960
|
+
[class]="$inputClass()"
|
|
882
961
|
(click)="_handleClick()"
|
|
883
962
|
(keydown.arrowDown)="_open()"
|
|
884
963
|
(keydown.enter)="_handleEnter($event)"
|
|
@@ -909,7 +988,7 @@ class HlmDateRangeInput extends BrnDateInput {
|
|
|
909
988
|
<ng-icon name="lucideCalendar" />
|
|
910
989
|
</button>
|
|
911
990
|
</hlm-input-group-addon>
|
|
912
|
-
`, 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 });
|
|
991
|
+
`, 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 });
|
|
913
992
|
}
|
|
914
993
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmDateRangeInput, decorators: [{
|
|
915
994
|
type: Component,
|
|
@@ -925,9 +1004,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImpor
|
|
|
925
1004
|
hlmInputGroupInput
|
|
926
1005
|
[value]="_inputValue()"
|
|
927
1006
|
[id]="inputId()"
|
|
1007
|
+
[attr.name]="name()"
|
|
1008
|
+
[attr.aria-label]="ariaLabel()"
|
|
1009
|
+
[attr.aria-describedby]="ariaDescribedby()"
|
|
928
1010
|
[placeholder]="placeholder()"
|
|
1011
|
+
[readonly]="readonly()"
|
|
929
1012
|
[disabled]="_disabled()"
|
|
930
1013
|
[forceInvalid]="forceInvalid()"
|
|
1014
|
+
[class]="$inputClass()"
|
|
931
1015
|
(click)="_handleClick()"
|
|
932
1016
|
(keydown.arrowDown)="_open()"
|
|
933
1017
|
(keydown.enter)="_handleEnter($event)"
|
|
@@ -960,7 +1044,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImpor
|
|
|
960
1044
|
</hlm-input-group-addon>
|
|
961
1045
|
`,
|
|
962
1046
|
}]
|
|
963
|
-
}], propDecorators: { parseDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "parseDate", required: false }] }], formatInputDates: [{ type: i0.Input, args: [{ isSignal: true, alias: "formatInputDates", required: false }] }] } });
|
|
1047
|
+
}], 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 }] }] } });
|
|
964
1048
|
|
|
965
1049
|
const HLM_DATE_RANGE_PICKER_VALUE_ACCESSOR = {
|
|
966
1050
|
provide: NG_VALUE_ACCESSOR,
|
|
@@ -1003,10 +1087,12 @@ class HlmDateRangePicker {
|
|
|
1003
1087
|
...(ngDevMode ? [{ debugName: "transformDates" }] : /* istanbul ignore next */ []));
|
|
1004
1088
|
_popoverState = signal(null, /* @ts-ignore */
|
|
1005
1089
|
...(ngDevMode ? [{ debugName: "_popoverState" }] : /* istanbul ignore next */ []));
|
|
1006
|
-
|
|
1007
|
-
...(ngDevMode ? [{ debugName: "
|
|
1090
|
+
_formDisabled = signal(false, /* @ts-ignore */
|
|
1091
|
+
...(ngDevMode ? [{ debugName: "_formDisabled" }] : /* istanbul ignore next */ []));
|
|
1008
1092
|
/** @internal The disabled state as a readonly signal */
|
|
1009
|
-
disabledState = this.
|
|
1093
|
+
disabledState = computed(() => this.disabled() || this._formDisabled(), /* @ts-ignore */
|
|
1094
|
+
...(ngDevMode ? [{ debugName: "disabledState" }] : /* istanbul ignore next */ []));
|
|
1095
|
+
_disabled = this.disabledState;
|
|
1010
1096
|
formattedDate = computed(() => {
|
|
1011
1097
|
const start = this._start();
|
|
1012
1098
|
const end = this._end();
|
|
@@ -1092,7 +1178,7 @@ class HlmDateRangePicker {
|
|
|
1092
1178
|
this._onTouched = fn;
|
|
1093
1179
|
}
|
|
1094
1180
|
setDisabledState(isDisabled) {
|
|
1095
|
-
this.
|
|
1181
|
+
this._formDisabled.set(isDisabled);
|
|
1096
1182
|
}
|
|
1097
1183
|
open() {
|
|
1098
1184
|
this._popoverState.set('open');
|
|
@@ -1217,6 +1303,26 @@ function injectHlmMonthYearPickerConfig() {
|
|
|
1217
1303
|
|
|
1218
1304
|
class HlmMonthYearInput extends BrnDateInput {
|
|
1219
1305
|
_config = injectHlmMonthYearPickerConfig();
|
|
1306
|
+
/** Native `name` attribute forwarded to the inner `<input>`. */
|
|
1307
|
+
name = input(undefined, /* @ts-ignore */
|
|
1308
|
+
...(ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []));
|
|
1309
|
+
/** Native `readonly` state forwarded to the inner `<input>`. */
|
|
1310
|
+
readonly = input(false, { ...(ngDevMode ? { debugName: "readonly" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
1311
|
+
ariaLabel = input(undefined, /* @ts-ignore */
|
|
1312
|
+
...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
|
|
1313
|
+
ariaDescribedby = input(null, /* @ts-ignore */
|
|
1314
|
+
...(ngDevMode ? [{ debugName: "ariaDescribedby" }] : /* istanbul ignore next */ []));
|
|
1315
|
+
/** Extra classes merged onto the host group container (over the `HlmInputGroup` base). */
|
|
1316
|
+
userClass = input('', { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: 'class' });
|
|
1317
|
+
/** Extra classes merged onto the inner `<input>` (over the input-group input base). */
|
|
1318
|
+
inputClass = input('', /* @ts-ignore */
|
|
1319
|
+
...(ngDevMode ? [{ debugName: "inputClass" }] : /* istanbul ignore next */ []));
|
|
1320
|
+
$inputClass = computed(() => hlm(this.inputClass()), /* @ts-ignore */
|
|
1321
|
+
...(ngDevMode ? [{ debugName: "$inputClass" }] : /* istanbul ignore next */ []));
|
|
1322
|
+
constructor() {
|
|
1323
|
+
super();
|
|
1324
|
+
classes(() => [this.userClass()]);
|
|
1325
|
+
}
|
|
1220
1326
|
/**
|
|
1221
1327
|
* Parses input text into a date value. Return `null` for invalid
|
|
1222
1328
|
* input - the picker's date is cleared while the text is preserved so
|
|
@@ -1240,16 +1346,21 @@ class HlmMonthYearInput extends BrnDateInput {
|
|
|
1240
1346
|
formatInputValue(value) {
|
|
1241
1347
|
return this.formatInputDate()(value);
|
|
1242
1348
|
}
|
|
1243
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmMonthYearInput, deps:
|
|
1244
|
-
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: `
|
|
1349
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmMonthYearInput, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1350
|
+
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: `
|
|
1245
1351
|
<input
|
|
1246
1352
|
#input
|
|
1247
1353
|
hlmInputGroupInput
|
|
1248
1354
|
[value]="_inputValue()"
|
|
1249
1355
|
[id]="inputId()"
|
|
1356
|
+
[attr.name]="name()"
|
|
1357
|
+
[attr.aria-label]="ariaLabel()"
|
|
1358
|
+
[attr.aria-describedby]="ariaDescribedby()"
|
|
1250
1359
|
[placeholder]="placeholder()"
|
|
1360
|
+
[readonly]="readonly()"
|
|
1251
1361
|
[disabled]="_disabled()"
|
|
1252
1362
|
[forceInvalid]="forceInvalid()"
|
|
1363
|
+
[class]="$inputClass()"
|
|
1253
1364
|
(click)="_handleClick()"
|
|
1254
1365
|
(keydown.arrowDown)="_open()"
|
|
1255
1366
|
(keydown.enter)="_handleEnter($event)"
|
|
@@ -1280,7 +1391,7 @@ class HlmMonthYearInput extends BrnDateInput {
|
|
|
1280
1391
|
<ng-icon name="lucideCalendar" />
|
|
1281
1392
|
</button>
|
|
1282
1393
|
</hlm-input-group-addon>
|
|
1283
|
-
`, 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 });
|
|
1394
|
+
`, 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 });
|
|
1284
1395
|
}
|
|
1285
1396
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: HlmMonthYearInput, decorators: [{
|
|
1286
1397
|
type: Component,
|
|
@@ -1296,9 +1407,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImpor
|
|
|
1296
1407
|
hlmInputGroupInput
|
|
1297
1408
|
[value]="_inputValue()"
|
|
1298
1409
|
[id]="inputId()"
|
|
1410
|
+
[attr.name]="name()"
|
|
1411
|
+
[attr.aria-label]="ariaLabel()"
|
|
1412
|
+
[attr.aria-describedby]="ariaDescribedby()"
|
|
1299
1413
|
[placeholder]="placeholder()"
|
|
1414
|
+
[readonly]="readonly()"
|
|
1300
1415
|
[disabled]="_disabled()"
|
|
1301
1416
|
[forceInvalid]="forceInvalid()"
|
|
1417
|
+
[class]="$inputClass()"
|
|
1302
1418
|
(click)="_handleClick()"
|
|
1303
1419
|
(keydown.arrowDown)="_open()"
|
|
1304
1420
|
(keydown.enter)="_handleEnter($event)"
|
|
@@ -1331,7 +1447,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImpor
|
|
|
1331
1447
|
</hlm-input-group-addon>
|
|
1332
1448
|
`,
|
|
1333
1449
|
}]
|
|
1334
|
-
}], propDecorators: { parseDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "parseDate", required: false }] }], formatInputDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "formatInputDate", required: false }] }] } });
|
|
1450
|
+
}], 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 }] }] } });
|
|
1335
1451
|
|
|
1336
1452
|
const HLM_MONTH_YEAR_PICKER_VALUE_ACCESSOR = {
|
|
1337
1453
|
provide: NG_VALUE_ACCESSOR,
|
|
@@ -1370,10 +1486,12 @@ class HlmMonthYearPicker {
|
|
|
1370
1486
|
...(ngDevMode ? [{ debugName: "transformDate" }] : /* istanbul ignore next */ []));
|
|
1371
1487
|
_popoverState = signal(null, /* @ts-ignore */
|
|
1372
1488
|
...(ngDevMode ? [{ debugName: "_popoverState" }] : /* istanbul ignore next */ []));
|
|
1373
|
-
|
|
1374
|
-
...(ngDevMode ? [{ debugName: "
|
|
1489
|
+
_formDisabled = signal(false, /* @ts-ignore */
|
|
1490
|
+
...(ngDevMode ? [{ debugName: "_formDisabled" }] : /* istanbul ignore next */ []));
|
|
1375
1491
|
/** @internal The disabled state as a readonly signal */
|
|
1376
|
-
disabledState = this.
|
|
1492
|
+
disabledState = computed(() => this.disabled() || this._formDisabled(), /* @ts-ignore */
|
|
1493
|
+
...(ngDevMode ? [{ debugName: "disabledState" }] : /* istanbul ignore next */ []));
|
|
1494
|
+
_disabled = this.disabledState;
|
|
1377
1495
|
formattedDate = computed(() => {
|
|
1378
1496
|
const date = this._mutableDate();
|
|
1379
1497
|
return date ? this.formatDate()(date) : undefined;
|
|
@@ -1430,7 +1548,7 @@ class HlmMonthYearPicker {
|
|
|
1430
1548
|
this._onTouched?.();
|
|
1431
1549
|
}
|
|
1432
1550
|
setDisabledState(isDisabled) {
|
|
1433
|
-
this.
|
|
1551
|
+
this._formDisabled.set(isDisabled);
|
|
1434
1552
|
}
|
|
1435
1553
|
open() {
|
|
1436
1554
|
this._popoverState.set('open');
|