@spartan-ng/cli 0.0.1-alpha.515 → 0.0.1-alpha.516
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/generators/ui/libs/ui-calendar-helm/files/lib/hlm-calendar-multi.ts.template +68 -10
- package/src/generators/ui/libs/ui-calendar-helm/files/lib/hlm-calendar-range.ts.template +68 -10
- package/src/generators/ui/libs/ui-calendar-helm/files/lib/hlm-calendar.ts.template +71 -10
- package/src/generators/ui/libs/ui-date-picker-helm/files/lib/hlm-date-picker-multi.ts.template +5 -1
- package/src/generators/ui/libs/ui-date-picker-helm/files/lib/hlm-date-picker.ts.template +5 -1
- package/src/generators/ui/libs/ui-date-picker-helm/files/lib/hlm-date-range-picker.ts.template +5 -1
- package/src/generators/ui/supported-ui-libraries.json +28 -27
package/package.json
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { BooleanInput, NumberInput } from '@angular/cdk/coercion';
|
|
2
|
+
import { NgTemplateOutlet } from '@angular/common';
|
|
2
3
|
import {
|
|
3
4
|
booleanAttribute,
|
|
4
5
|
ChangeDetectionStrategy,
|
|
@@ -16,17 +17,21 @@ import {
|
|
|
16
17
|
BrnCalendarCellButton,
|
|
17
18
|
BrnCalendarGrid,
|
|
18
19
|
BrnCalendarHeader,
|
|
20
|
+
BrnCalendarMonthSelect,
|
|
19
21
|
BrnCalendarMulti,
|
|
20
22
|
BrnCalendarNextButton,
|
|
21
23
|
BrnCalendarPreviousButton,
|
|
22
24
|
BrnCalendarWeek,
|
|
23
25
|
BrnCalendarWeekday,
|
|
26
|
+
BrnCalendarYearSelect,
|
|
24
27
|
injectBrnCalendarI18n,
|
|
25
28
|
Weekday,
|
|
26
29
|
} from '@spartan-ng/brain/calendar';
|
|
27
30
|
import { injectDateAdapter } from '@spartan-ng/brain/date-time';
|
|
31
|
+
import { BrnSelectImports } from '@spartan-ng/brain/select';
|
|
28
32
|
import { buttonVariants } from '<%- importAlias %>/button';
|
|
29
33
|
import { HlmIcon } from '<%- importAlias %>/icon';
|
|
34
|
+
import { HlmSelectImports } from '<%- importAlias %>/select';
|
|
30
35
|
import { hlm } from '<%- importAlias %>/utils';
|
|
31
36
|
import type { ClassValue } from 'clsx';
|
|
32
37
|
|
|
@@ -44,6 +49,11 @@ import type { ClassValue } from 'clsx';
|
|
|
44
49
|
BrnCalendarGrid,
|
|
45
50
|
NgIcon,
|
|
46
51
|
HlmIcon,
|
|
52
|
+
BrnCalendarMonthSelect,
|
|
53
|
+
NgTemplateOutlet,
|
|
54
|
+
BrnSelectImports,
|
|
55
|
+
HlmSelectImports,
|
|
56
|
+
BrnCalendarYearSelect,
|
|
47
57
|
],
|
|
48
58
|
viewProviders: [provideIcons({ lucideChevronLeft, lucideChevronRight })],
|
|
49
59
|
template: `
|
|
@@ -64,8 +74,49 @@ import type { ClassValue } from 'clsx';
|
|
|
64
74
|
<!-- Header -->
|
|
65
75
|
<div class="space-y-4">
|
|
66
76
|
<div class="relative flex items-center justify-center pt-1">
|
|
67
|
-
<div
|
|
68
|
-
|
|
77
|
+
<div class="flex w-full items-center justify-center gap-1.5">
|
|
78
|
+
<ng-template #month>
|
|
79
|
+
<brn-select brnCalendarMonthSelect>
|
|
80
|
+
<hlm-select-trigger size="sm" [class]="_selectClass">
|
|
81
|
+
<brn-select-value />
|
|
82
|
+
</hlm-select-trigger>
|
|
83
|
+
<hlm-select-content class="max-h-80">
|
|
84
|
+
@for (month of _i18n.config().months(); track month) {
|
|
85
|
+
<hlm-option [value]="month">{{ month }}</hlm-option>
|
|
86
|
+
}
|
|
87
|
+
</hlm-select-content>
|
|
88
|
+
</brn-select>
|
|
89
|
+
</ng-template>
|
|
90
|
+
<ng-template #year>
|
|
91
|
+
<brn-select brnCalendarYearSelect>
|
|
92
|
+
<hlm-select-trigger size="sm" [class]="_selectClass">
|
|
93
|
+
<brn-select-value />
|
|
94
|
+
</hlm-select-trigger>
|
|
95
|
+
<hlm-select-content class="max-h-80">
|
|
96
|
+
@for (year of _i18n.config().years(); track year) {
|
|
97
|
+
<hlm-option [value]="year">{{ year }}</hlm-option>
|
|
98
|
+
}
|
|
99
|
+
</hlm-select-content>
|
|
100
|
+
</brn-select>
|
|
101
|
+
</ng-template>
|
|
102
|
+
@let heading = _heading();
|
|
103
|
+
@switch (captionLayout()) {
|
|
104
|
+
@case ('dropdown') {
|
|
105
|
+
<ng-container [ngTemplateOutlet]="month" />
|
|
106
|
+
<ng-container [ngTemplateOutlet]="year" />
|
|
107
|
+
}
|
|
108
|
+
@case ('dropdown-months') {
|
|
109
|
+
<ng-container [ngTemplateOutlet]="month" />
|
|
110
|
+
<div brnCalendarHeader class="text-sm font-medium">{{ heading.year }}</div>
|
|
111
|
+
}
|
|
112
|
+
@case ('dropdown-years') {
|
|
113
|
+
<div brnCalendarHeader class="text-sm font-medium">{{ heading.month }}</div>
|
|
114
|
+
<ng-container [ngTemplateOutlet]="year" />
|
|
115
|
+
}
|
|
116
|
+
@case ('label') {
|
|
117
|
+
<div brnCalendarHeader class="text-sm font-medium">{{ heading.header }}</div>
|
|
118
|
+
}
|
|
119
|
+
}
|
|
69
120
|
</div>
|
|
70
121
|
|
|
71
122
|
<div class="flex items-center space-x-1">
|
|
@@ -137,6 +188,9 @@ export class HlmCalendarMulti<T> {
|
|
|
137
188
|
/** The maximum date that can be selected. */
|
|
138
189
|
public readonly max = input<T>();
|
|
139
190
|
|
|
191
|
+
/** Show dropdowns to navigate between months or years. */
|
|
192
|
+
public readonly captionLayout = input<'dropdown' | 'label' | 'dropdown-months' | 'dropdown-years'>('label');
|
|
193
|
+
|
|
140
194
|
/** The minimum selectable dates. */
|
|
141
195
|
public readonly minSelection = input<number, NumberInput>(undefined, {
|
|
142
196
|
transform: numberAttribute,
|
|
@@ -170,14 +224,16 @@ export class HlmCalendarMulti<T> {
|
|
|
170
224
|
private readonly _calendar = viewChild.required(BrnCalendarMulti);
|
|
171
225
|
|
|
172
226
|
/** Get the heading for the current month and year */
|
|
173
|
-
protected readonly _heading = computed(() =>
|
|
174
|
-
this._i18n
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
),
|
|
180
|
-
|
|
227
|
+
protected readonly _heading = computed(() => {
|
|
228
|
+
const config = this._i18n.config();
|
|
229
|
+
const date = this._calendar().focusedDate();
|
|
230
|
+
|
|
231
|
+
return {
|
|
232
|
+
header: config.formatHeader(this._dateAdapter.getMonth(date), this._dateAdapter.getYear(date)),
|
|
233
|
+
month: config.formatMonth(this._dateAdapter.getMonth(date)),
|
|
234
|
+
year: config.formatYear(this._dateAdapter.getYear(date)),
|
|
235
|
+
};
|
|
236
|
+
});
|
|
181
237
|
|
|
182
238
|
protected readonly _btnClass = hlm(
|
|
183
239
|
buttonVariants({ variant: 'ghost' }),
|
|
@@ -187,4 +243,6 @@ export class HlmCalendarMulti<T> {
|
|
|
187
243
|
'data-[selected]:bg-primary data-[selected]:text-primary-foreground data-[selected]:hover:bg-primary data-[selected]:hover:text-primary-foreground data-[selected]:focus:bg-primary data-[selected]:focus:text-primary-foreground',
|
|
188
244
|
'data-[disabled]:text-muted-foreground data-[disabled]:opacity-50',
|
|
189
245
|
);
|
|
246
|
+
|
|
247
|
+
protected readonly _selectClass = 'gap-0 px-1.5 py-2 [&>ng-icon]:ml-1';
|
|
190
248
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { BooleanInput, NumberInput } from '@angular/cdk/coercion';
|
|
2
|
+
import { NgTemplateOutlet } from '@angular/common';
|
|
2
3
|
import {
|
|
3
4
|
booleanAttribute,
|
|
4
5
|
ChangeDetectionStrategy,
|
|
@@ -16,17 +17,21 @@ import {
|
|
|
16
17
|
BrnCalendarCellButton,
|
|
17
18
|
BrnCalendarGrid,
|
|
18
19
|
BrnCalendarHeader,
|
|
20
|
+
BrnCalendarMonthSelect,
|
|
19
21
|
BrnCalendarNextButton,
|
|
20
22
|
BrnCalendarPreviousButton,
|
|
21
23
|
BrnCalendarRange,
|
|
22
24
|
BrnCalendarWeek,
|
|
23
25
|
BrnCalendarWeekday,
|
|
26
|
+
BrnCalendarYearSelect,
|
|
24
27
|
injectBrnCalendarI18n,
|
|
25
28
|
Weekday,
|
|
26
29
|
} from '@spartan-ng/brain/calendar';
|
|
27
30
|
import { injectDateAdapter } from '@spartan-ng/brain/date-time';
|
|
31
|
+
import { BrnSelectImports } from '@spartan-ng/brain/select';
|
|
28
32
|
import { buttonVariants } from '<%- importAlias %>/button';
|
|
29
33
|
import { HlmIcon } from '<%- importAlias %>/icon';
|
|
34
|
+
import { HlmSelectImports } from '<%- importAlias %>/select';
|
|
30
35
|
import { hlm } from '<%- importAlias %>/utils';
|
|
31
36
|
import type { ClassValue } from 'clsx';
|
|
32
37
|
|
|
@@ -44,6 +49,11 @@ import type { ClassValue } from 'clsx';
|
|
|
44
49
|
NgIcon,
|
|
45
50
|
HlmIcon,
|
|
46
51
|
BrnCalendarRange,
|
|
52
|
+
BrnCalendarMonthSelect,
|
|
53
|
+
HlmSelectImports,
|
|
54
|
+
BrnSelectImports,
|
|
55
|
+
BrnCalendarYearSelect,
|
|
56
|
+
NgTemplateOutlet,
|
|
47
57
|
],
|
|
48
58
|
viewProviders: [provideIcons({ lucideChevronLeft, lucideChevronRight })],
|
|
49
59
|
template: `
|
|
@@ -63,8 +73,49 @@ import type { ClassValue } from 'clsx';
|
|
|
63
73
|
<!-- Header -->
|
|
64
74
|
<div class="space-y-4">
|
|
65
75
|
<div class="relative flex items-center justify-center pt-1">
|
|
66
|
-
<div
|
|
67
|
-
|
|
76
|
+
<div class="flex w-full items-center justify-center gap-1.5">
|
|
77
|
+
<ng-template #month>
|
|
78
|
+
<brn-select brnCalendarMonthSelect>
|
|
79
|
+
<hlm-select-trigger size="sm" [class]="_selectClass">
|
|
80
|
+
<brn-select-value />
|
|
81
|
+
</hlm-select-trigger>
|
|
82
|
+
<hlm-select-content class="max-h-80">
|
|
83
|
+
@for (month of _i18n.config().months(); track month) {
|
|
84
|
+
<hlm-option [value]="month">{{ month }}</hlm-option>
|
|
85
|
+
}
|
|
86
|
+
</hlm-select-content>
|
|
87
|
+
</brn-select>
|
|
88
|
+
</ng-template>
|
|
89
|
+
<ng-template #year>
|
|
90
|
+
<brn-select brnCalendarYearSelect>
|
|
91
|
+
<hlm-select-trigger size="sm" [class]="_selectClass">
|
|
92
|
+
<brn-select-value />
|
|
93
|
+
</hlm-select-trigger>
|
|
94
|
+
<hlm-select-content class="max-h-80">
|
|
95
|
+
@for (year of _i18n.config().years(); track year) {
|
|
96
|
+
<hlm-option [value]="year">{{ year }}</hlm-option>
|
|
97
|
+
}
|
|
98
|
+
</hlm-select-content>
|
|
99
|
+
</brn-select>
|
|
100
|
+
</ng-template>
|
|
101
|
+
@let heading = _heading();
|
|
102
|
+
@switch (captionLayout()) {
|
|
103
|
+
@case ('dropdown') {
|
|
104
|
+
<ng-container [ngTemplateOutlet]="month" />
|
|
105
|
+
<ng-container [ngTemplateOutlet]="year" />
|
|
106
|
+
}
|
|
107
|
+
@case ('dropdown-months') {
|
|
108
|
+
<ng-container [ngTemplateOutlet]="month" />
|
|
109
|
+
<div brnCalendarHeader class="text-sm font-medium">{{ heading.year }}</div>
|
|
110
|
+
}
|
|
111
|
+
@case ('dropdown-years') {
|
|
112
|
+
<div brnCalendarHeader class="text-sm font-medium">{{ heading.month }}</div>
|
|
113
|
+
<ng-container [ngTemplateOutlet]="year" />
|
|
114
|
+
}
|
|
115
|
+
@case ('label') {
|
|
116
|
+
<div brnCalendarHeader class="text-sm font-medium">{{ heading.header }}</div>
|
|
117
|
+
}
|
|
118
|
+
}
|
|
68
119
|
</div>
|
|
69
120
|
|
|
70
121
|
<div class="flex items-center space-x-1">
|
|
@@ -136,6 +187,9 @@ export class HlmCalendarRange<T> {
|
|
|
136
187
|
/** The maximum date that can be selected. */
|
|
137
188
|
public readonly max = input<T>();
|
|
138
189
|
|
|
190
|
+
/** Show dropdowns to navigate between months or years. */
|
|
191
|
+
public readonly captionLayout = input<'dropdown' | 'label' | 'dropdown-months' | 'dropdown-years'>('label');
|
|
192
|
+
|
|
139
193
|
/** Determine if the date picker is disabled. */
|
|
140
194
|
public readonly disabled = input<boolean, BooleanInput>(false, {
|
|
141
195
|
transform: booleanAttribute,
|
|
@@ -162,14 +216,16 @@ export class HlmCalendarRange<T> {
|
|
|
162
216
|
private readonly _calendar = viewChild.required(BrnCalendarRange);
|
|
163
217
|
|
|
164
218
|
/** Get the heading for the current month and year */
|
|
165
|
-
protected readonly _heading = computed(() =>
|
|
166
|
-
this._i18n
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
),
|
|
172
|
-
|
|
219
|
+
protected readonly _heading = computed(() => {
|
|
220
|
+
const config = this._i18n.config();
|
|
221
|
+
const date = this._calendar().focusedDate();
|
|
222
|
+
|
|
223
|
+
return {
|
|
224
|
+
header: config.formatHeader(this._dateAdapter.getMonth(date), this._dateAdapter.getYear(date)),
|
|
225
|
+
month: config.formatMonth(this._dateAdapter.getMonth(date)),
|
|
226
|
+
year: config.formatYear(this._dateAdapter.getYear(date)),
|
|
227
|
+
};
|
|
228
|
+
});
|
|
173
229
|
|
|
174
230
|
protected readonly _btnClass = hlm(
|
|
175
231
|
buttonVariants({ variant: 'ghost' }),
|
|
@@ -182,4 +238,6 @@ export class HlmCalendarRange<T> {
|
|
|
182
238
|
'data-[range-end]:rounded-r-md',
|
|
183
239
|
'data-[range-between]:bg-accent data-[range-between]:text-accent-foreground data-[range-between]:rounded-none',
|
|
184
240
|
);
|
|
241
|
+
|
|
242
|
+
protected readonly _selectClass = 'gap-0 px-1.5 py-2 [&>ng-icon]:ml-1';
|
|
185
243
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { BooleanInput, NumberInput } from '@angular/cdk/coercion';
|
|
2
|
+
import { NgTemplateOutlet } from '@angular/common';
|
|
2
3
|
import {
|
|
3
4
|
booleanAttribute,
|
|
4
5
|
ChangeDetectionStrategy,
|
|
@@ -17,16 +18,20 @@ import {
|
|
|
17
18
|
BrnCalendarCellButton,
|
|
18
19
|
BrnCalendarGrid,
|
|
19
20
|
BrnCalendarHeader,
|
|
21
|
+
BrnCalendarMonthSelect,
|
|
20
22
|
BrnCalendarNextButton,
|
|
21
23
|
BrnCalendarPreviousButton,
|
|
22
24
|
BrnCalendarWeek,
|
|
23
25
|
BrnCalendarWeekday,
|
|
26
|
+
BrnCalendarYearSelect,
|
|
24
27
|
injectBrnCalendarI18n,
|
|
25
28
|
Weekday,
|
|
26
29
|
} from '@spartan-ng/brain/calendar';
|
|
27
30
|
import { injectDateAdapter } from '@spartan-ng/brain/date-time';
|
|
31
|
+
import { BrnSelectImports } from '@spartan-ng/brain/select';
|
|
28
32
|
import { buttonVariants } from '<%- importAlias %>/button';
|
|
29
33
|
import { HlmIcon } from '<%- importAlias %>/icon';
|
|
34
|
+
import { HlmSelectImports } from '<%- importAlias %>/select';
|
|
30
35
|
import { hlm } from '<%- importAlias %>/utils';
|
|
31
36
|
import type { ClassValue } from 'clsx';
|
|
32
37
|
|
|
@@ -44,6 +49,14 @@ import type { ClassValue } from 'clsx';
|
|
|
44
49
|
BrnCalendarGrid,
|
|
45
50
|
NgIcon,
|
|
46
51
|
HlmIcon,
|
|
52
|
+
BrnSelectImports,
|
|
53
|
+
HlmSelectImports,
|
|
54
|
+
BrnCalendarPreviousButton,
|
|
55
|
+
BrnCalendarMonthSelect,
|
|
56
|
+
BrnCalendarMonthSelect,
|
|
57
|
+
BrnCalendarMonthSelect,
|
|
58
|
+
BrnCalendarYearSelect,
|
|
59
|
+
NgTemplateOutlet,
|
|
47
60
|
],
|
|
48
61
|
viewProviders: [provideIcons({ lucideChevronLeft, lucideChevronRight })],
|
|
49
62
|
template: `
|
|
@@ -62,8 +75,49 @@ import type { ClassValue } from 'clsx';
|
|
|
62
75
|
<!-- Header -->
|
|
63
76
|
<div class="space-y-4">
|
|
64
77
|
<div class="relative flex items-center justify-center pt-1">
|
|
65
|
-
<div
|
|
66
|
-
|
|
78
|
+
<div class="flex w-full items-center justify-center gap-1.5">
|
|
79
|
+
<ng-template #month>
|
|
80
|
+
<brn-select brnCalendarMonthSelect>
|
|
81
|
+
<hlm-select-trigger size="sm" [class]="_selectClass">
|
|
82
|
+
<brn-select-value />
|
|
83
|
+
</hlm-select-trigger>
|
|
84
|
+
<hlm-select-content class="max-h-80">
|
|
85
|
+
@for (month of _i18n.config().months(); track month) {
|
|
86
|
+
<hlm-option [value]="month">{{ month }}</hlm-option>
|
|
87
|
+
}
|
|
88
|
+
</hlm-select-content>
|
|
89
|
+
</brn-select>
|
|
90
|
+
</ng-template>
|
|
91
|
+
<ng-template #year>
|
|
92
|
+
<brn-select brnCalendarYearSelect>
|
|
93
|
+
<hlm-select-trigger size="sm" [class]="_selectClass">
|
|
94
|
+
<brn-select-value />
|
|
95
|
+
</hlm-select-trigger>
|
|
96
|
+
<hlm-select-content class="max-h-80">
|
|
97
|
+
@for (year of _i18n.config().years(); track year) {
|
|
98
|
+
<hlm-option [value]="year">{{ year }}</hlm-option>
|
|
99
|
+
}
|
|
100
|
+
</hlm-select-content>
|
|
101
|
+
</brn-select>
|
|
102
|
+
</ng-template>
|
|
103
|
+
@let heading = _heading();
|
|
104
|
+
@switch (captionLayout()) {
|
|
105
|
+
@case ('dropdown') {
|
|
106
|
+
<ng-container [ngTemplateOutlet]="month" />
|
|
107
|
+
<ng-container [ngTemplateOutlet]="year" />
|
|
108
|
+
}
|
|
109
|
+
@case ('dropdown-months') {
|
|
110
|
+
<ng-container [ngTemplateOutlet]="month" />
|
|
111
|
+
<div brnCalendarHeader class="text-sm font-medium">{{ heading.year }}</div>
|
|
112
|
+
}
|
|
113
|
+
@case ('dropdown-years') {
|
|
114
|
+
<div brnCalendarHeader class="text-sm font-medium">{{ heading.month }}</div>
|
|
115
|
+
<ng-container [ngTemplateOutlet]="year" />
|
|
116
|
+
}
|
|
117
|
+
@case ('label') {
|
|
118
|
+
<div brnCalendarHeader class="text-sm font-medium">{{ heading.header }}</div>
|
|
119
|
+
}
|
|
120
|
+
}
|
|
67
121
|
</div>
|
|
68
122
|
|
|
69
123
|
<div class="flex items-center space-x-1">
|
|
@@ -135,6 +189,9 @@ export class HlmCalendar<T> {
|
|
|
135
189
|
/** The maximum date that can be selected. */
|
|
136
190
|
public readonly max = input<T>();
|
|
137
191
|
|
|
192
|
+
/** Show dropdowns to navigate between months or years. */
|
|
193
|
+
public readonly captionLayout = input<'dropdown' | 'label' | 'dropdown-months' | 'dropdown-years'>('label');
|
|
194
|
+
|
|
138
195
|
/** Determine if the date picker is disabled. */
|
|
139
196
|
public readonly disabled = input<boolean, BooleanInput>(false, {
|
|
140
197
|
transform: booleanAttribute,
|
|
@@ -158,14 +215,16 @@ export class HlmCalendar<T> {
|
|
|
158
215
|
private readonly _calendar = viewChild.required(BrnCalendar);
|
|
159
216
|
|
|
160
217
|
/** Get the heading for the current month and year */
|
|
161
|
-
protected readonly _heading = computed(() =>
|
|
162
|
-
this._i18n
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
),
|
|
168
|
-
|
|
218
|
+
protected readonly _heading = computed(() => {
|
|
219
|
+
const config = this._i18n.config();
|
|
220
|
+
const date = this._calendar().focusedDate();
|
|
221
|
+
|
|
222
|
+
return {
|
|
223
|
+
header: config.formatHeader(this._dateAdapter.getMonth(date), this._dateAdapter.getYear(date)),
|
|
224
|
+
month: config.formatMonth(this._dateAdapter.getMonth(date)),
|
|
225
|
+
year: config.formatYear(this._dateAdapter.getYear(date)),
|
|
226
|
+
};
|
|
227
|
+
});
|
|
169
228
|
|
|
170
229
|
protected readonly _btnClass = hlm(
|
|
171
230
|
buttonVariants({ variant: 'ghost' }),
|
|
@@ -175,4 +234,6 @@ export class HlmCalendar<T> {
|
|
|
175
234
|
'data-[selected]:bg-primary data-[selected]:text-primary-foreground data-[selected]:hover:bg-primary dark:hover:text-accent-foreground data-[selected]:focus:bg-primary data-[selected]:focus:text-primary-foreground',
|
|
176
235
|
'data-[disabled]:text-muted-foreground data-[disabled]:opacity-50',
|
|
177
236
|
);
|
|
237
|
+
|
|
238
|
+
protected readonly _selectClass = 'gap-0 px-1.5 py-2 [&>ng-icon]:ml-1';
|
|
178
239
|
}
|
package/src/generators/ui/libs/ui-date-picker-helm/files/lib/hlm-date-picker-multi.ts.template
CHANGED
|
@@ -60,6 +60,7 @@ let nextId = 0;
|
|
|
60
60
|
<hlm-calendar-multi
|
|
61
61
|
calendarClass="border-0 rounded-none"
|
|
62
62
|
[date]="_mutableDate()"
|
|
63
|
+
[captionLayout]="captionLayout()"
|
|
63
64
|
[min]="min()"
|
|
64
65
|
[max]="max()"
|
|
65
66
|
[minSelection]="minSelection()"
|
|
@@ -90,7 +91,10 @@ export class HlmDatePickerMulti<T> implements ControlValueAccessor {
|
|
|
90
91
|
);
|
|
91
92
|
|
|
92
93
|
/** The id of the button that opens the date picker. */
|
|
93
|
-
public readonly buttonId = input<string>(`hlm-date-picker-multi-${nextId
|
|
94
|
+
public readonly buttonId = input<string>(`hlm-date-picker-multi-${++nextId}`);
|
|
95
|
+
|
|
96
|
+
/** Show dropdowns to navigate between months or years. */
|
|
97
|
+
public readonly captionLayout = input<'dropdown' | 'label' | 'dropdown-months' | 'dropdown-years'>('label');
|
|
94
98
|
|
|
95
99
|
/** The minimum date that can be selected.*/
|
|
96
100
|
public readonly min = input<T>();
|
|
@@ -58,6 +58,7 @@ let nextId = 0;
|
|
|
58
58
|
<div hlmPopoverContent class="w-auto p-0" *brnPopoverContent="let ctx">
|
|
59
59
|
<hlm-calendar
|
|
60
60
|
calendarClass="border-0 rounded-none"
|
|
61
|
+
[captionLayout]="captionLayout()"
|
|
61
62
|
[date]="_mutableDate()"
|
|
62
63
|
[min]="min()"
|
|
63
64
|
[max]="max()"
|
|
@@ -87,7 +88,10 @@ export class HlmDatePicker<T> implements ControlValueAccessor {
|
|
|
87
88
|
);
|
|
88
89
|
|
|
89
90
|
/** The id of the button that opens the date picker. */
|
|
90
|
-
public readonly buttonId = input<string>(`hlm-date-picker-${nextId
|
|
91
|
+
public readonly buttonId = input<string>(`hlm-date-picker-${++nextId}`);
|
|
92
|
+
|
|
93
|
+
/** Show dropdowns to navigate between months or years. */
|
|
94
|
+
public readonly captionLayout = input<'dropdown' | 'label' | 'dropdown-months' | 'dropdown-years'>('label');
|
|
91
95
|
|
|
92
96
|
/** The minimum date that can be selected.*/
|
|
93
97
|
public readonly min = input<T>();
|
package/src/generators/ui/libs/ui-date-picker-helm/files/lib/hlm-date-range-picker.ts.template
CHANGED
|
@@ -65,6 +65,7 @@ let nextId = 0;
|
|
|
65
65
|
<hlm-calendar-range
|
|
66
66
|
calendarClass="border-0 rounded-none"
|
|
67
67
|
[startDate]="_start()"
|
|
68
|
+
[captionLayout]="captionLayout()"
|
|
68
69
|
[endDate]="_end()"
|
|
69
70
|
[min]="min()"
|
|
70
71
|
[max]="max()"
|
|
@@ -95,7 +96,10 @@ export class HlmDateRangePicker<T> implements ControlValueAccessor {
|
|
|
95
96
|
);
|
|
96
97
|
|
|
97
98
|
/** The id of the button that opens the date picker. */
|
|
98
|
-
public readonly buttonId = input<string>(`hlm-date-picker-range-${nextId
|
|
99
|
+
public readonly buttonId = input<string>(`hlm-date-picker-range-${++nextId}`);
|
|
100
|
+
|
|
101
|
+
/** Show dropdowns to navigate between months or years. */
|
|
102
|
+
public readonly captionLayout = input<'dropdown' | 'label' | 'dropdown-months' | 'dropdown-years'>('label');
|
|
99
103
|
|
|
100
104
|
/** The minimum date that can be selected.*/
|
|
101
105
|
public readonly min = input<T>();
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"internalName": "ui-accordion-helm",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/core": ">=19.0.0",
|
|
6
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
6
|
+
"@spartan-ng/brain": "0.0.1-alpha.516",
|
|
7
7
|
"clsx": "^2.1.1",
|
|
8
8
|
"@ng-icons/core": ">=29.0.0",
|
|
9
9
|
"@ng-icons/lucide": ">=29.0.0"
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"internalName": "ui-alert-dialog-helm",
|
|
22
22
|
"peerDependencies": {
|
|
23
23
|
"@angular/core": ">=19.0.0",
|
|
24
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
24
|
+
"@spartan-ng/brain": "0.0.1-alpha.516",
|
|
25
25
|
"clsx": "^2.1.1"
|
|
26
26
|
}
|
|
27
27
|
},
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"peerDependencies": {
|
|
39
39
|
"@angular/core": ">=19.0.0",
|
|
40
40
|
"clsx": "^2.1.1",
|
|
41
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
41
|
+
"@spartan-ng/brain": "0.0.1-alpha.516",
|
|
42
42
|
"@angular/cdk": ">=19.0.0",
|
|
43
43
|
"@angular/common": ">=19.0.0",
|
|
44
44
|
"@angular/forms": ">=19.0.0",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"internalName": "ui-avatar-helm",
|
|
51
51
|
"peerDependencies": {
|
|
52
52
|
"@angular/core": ">=19.0.0",
|
|
53
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
53
|
+
"@spartan-ng/brain": "0.0.1-alpha.516",
|
|
54
54
|
"clsx": "^2.1.1"
|
|
55
55
|
}
|
|
56
56
|
},
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
"internalName": "ui-button-helm",
|
|
77
77
|
"peerDependencies": {
|
|
78
78
|
"@angular/core": ">=19.0.0",
|
|
79
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
79
|
+
"@spartan-ng/brain": "0.0.1-alpha.516",
|
|
80
80
|
"class-variance-authority": "^0.7.0",
|
|
81
81
|
"clsx": "^2.1.1"
|
|
82
82
|
}
|
|
@@ -86,9 +86,10 @@
|
|
|
86
86
|
"peerDependencies": {
|
|
87
87
|
"@angular/core": ">=19.0.0",
|
|
88
88
|
"@angular/cdk": ">=19.0.0",
|
|
89
|
+
"@angular/common": ">=19.0.0",
|
|
89
90
|
"@ng-icons/core": ">=29.0.0",
|
|
90
91
|
"@ng-icons/lucide": ">=29.0.0",
|
|
91
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
92
|
+
"@spartan-ng/brain": "0.0.1-alpha.516",
|
|
92
93
|
"clsx": "^2.1.1"
|
|
93
94
|
}
|
|
94
95
|
},
|
|
@@ -118,7 +119,7 @@
|
|
|
118
119
|
"@angular/forms": ">=19.0.0",
|
|
119
120
|
"@ng-icons/core": ">=29.0.0",
|
|
120
121
|
"@ng-icons/lucide": ">=29.0.0",
|
|
121
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
122
|
+
"@spartan-ng/brain": "0.0.1-alpha.516",
|
|
122
123
|
"clsx": "^2.1.1"
|
|
123
124
|
}
|
|
124
125
|
},
|
|
@@ -126,7 +127,7 @@
|
|
|
126
127
|
"internalName": "ui-command-helm",
|
|
127
128
|
"peerDependencies": {
|
|
128
129
|
"@angular/core": ">=19.0.0",
|
|
129
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
130
|
+
"@spartan-ng/brain": "0.0.1-alpha.516",
|
|
130
131
|
"clsx": "^2.1.1"
|
|
131
132
|
}
|
|
132
133
|
},
|
|
@@ -138,7 +139,7 @@
|
|
|
138
139
|
"@angular/forms": ">=19.0.0",
|
|
139
140
|
"@ng-icons/core": ">=29.0.0",
|
|
140
141
|
"@ng-icons/lucide": ">=29.0.0",
|
|
141
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
142
|
+
"@spartan-ng/brain": "0.0.1-alpha.516",
|
|
142
143
|
"clsx": "^2.1.1"
|
|
143
144
|
}
|
|
144
145
|
},
|
|
@@ -150,7 +151,7 @@
|
|
|
150
151
|
"@angular/common": ">=19.0.0",
|
|
151
152
|
"@ng-icons/core": ">=29.0.0",
|
|
152
153
|
"@ng-icons/lucide": ">=29.0.0",
|
|
153
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
154
|
+
"@spartan-ng/brain": "0.0.1-alpha.516",
|
|
154
155
|
"@angular/cdk": ">=19.0.0"
|
|
155
156
|
}
|
|
156
157
|
},
|
|
@@ -159,7 +160,7 @@
|
|
|
159
160
|
"peerDependencies": {
|
|
160
161
|
"@angular/core": ">=19.0.0",
|
|
161
162
|
"@angular/forms": ">=19.0.0",
|
|
162
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
163
|
+
"@spartan-ng/brain": "0.0.1-alpha.516",
|
|
163
164
|
"clsx": "^2.1.1"
|
|
164
165
|
}
|
|
165
166
|
},
|
|
@@ -167,7 +168,7 @@
|
|
|
167
168
|
"internalName": "ui-hover-card-helm",
|
|
168
169
|
"peerDependencies": {
|
|
169
170
|
"@angular/core": ">=19.0.0",
|
|
170
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
171
|
+
"@spartan-ng/brain": "0.0.1-alpha.516",
|
|
171
172
|
"clsx": "^2.1.1"
|
|
172
173
|
}
|
|
173
174
|
},
|
|
@@ -186,7 +187,7 @@
|
|
|
186
187
|
"class-variance-authority": "^0.7.0",
|
|
187
188
|
"clsx": "^2.1.1",
|
|
188
189
|
"@angular/forms": ">=19.0.0",
|
|
189
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
190
|
+
"@spartan-ng/brain": "0.0.1-alpha.516"
|
|
190
191
|
}
|
|
191
192
|
},
|
|
192
193
|
"input-otp": {
|
|
@@ -197,14 +198,14 @@
|
|
|
197
198
|
"@ng-icons/core": ">=29.0.0",
|
|
198
199
|
"@ng-icons/lucide": ">=29.0.0",
|
|
199
200
|
"@angular/cdk": ">=19.0.0",
|
|
200
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
201
|
+
"@spartan-ng/brain": "0.0.1-alpha.516"
|
|
201
202
|
}
|
|
202
203
|
},
|
|
203
204
|
"label": {
|
|
204
205
|
"internalName": "ui-label-helm",
|
|
205
206
|
"peerDependencies": {
|
|
206
207
|
"@angular/core": ">=19.0.0",
|
|
207
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
208
|
+
"@spartan-ng/brain": "0.0.1-alpha.516",
|
|
208
209
|
"clsx": "^2.1.1"
|
|
209
210
|
}
|
|
210
211
|
},
|
|
@@ -212,7 +213,7 @@
|
|
|
212
213
|
"internalName": "ui-menu-helm",
|
|
213
214
|
"peerDependencies": {
|
|
214
215
|
"@angular/core": ">=19.0.0",
|
|
215
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
216
|
+
"@spartan-ng/brain": "0.0.1-alpha.516",
|
|
216
217
|
"clsx": "^2.1.1",
|
|
217
218
|
"@ng-icons/core": ">=29.0.0",
|
|
218
219
|
"@ng-icons/lucide": ">=29.0.0",
|
|
@@ -226,7 +227,7 @@
|
|
|
226
227
|
"@angular/core": ">=19.0.0",
|
|
227
228
|
"@angular/cdk": ">=19.0.0",
|
|
228
229
|
"@angular/forms": ">=19.0.0",
|
|
229
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
230
|
+
"@spartan-ng/brain": "0.0.1-alpha.516",
|
|
230
231
|
"class-variance-authority": "^0.7.0",
|
|
231
232
|
"clsx": "^2.1.1",
|
|
232
233
|
"@ng-icons/core": ">=29.0.0",
|
|
@@ -239,14 +240,14 @@
|
|
|
239
240
|
"peerDependencies": {
|
|
240
241
|
"@angular/core": ">=19.0.0",
|
|
241
242
|
"clsx": "^2.1.1",
|
|
242
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
243
|
+
"@spartan-ng/brain": "0.0.1-alpha.516"
|
|
243
244
|
}
|
|
244
245
|
},
|
|
245
246
|
"progress": {
|
|
246
247
|
"internalName": "ui-progress-helm",
|
|
247
248
|
"peerDependencies": {
|
|
248
249
|
"@angular/core": ">=19.0.0",
|
|
249
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
250
|
+
"@spartan-ng/brain": "0.0.1-alpha.516",
|
|
250
251
|
"clsx": "^2.1.1"
|
|
251
252
|
}
|
|
252
253
|
},
|
|
@@ -254,7 +255,7 @@
|
|
|
254
255
|
"internalName": "ui-radio-group-helm",
|
|
255
256
|
"peerDependencies": {
|
|
256
257
|
"@angular/core": ">=19.0.0",
|
|
257
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
258
|
+
"@spartan-ng/brain": "0.0.1-alpha.516",
|
|
258
259
|
"clsx": "^2.1.1",
|
|
259
260
|
"@angular/common": ">=19.0.0"
|
|
260
261
|
}
|
|
@@ -271,7 +272,7 @@
|
|
|
271
272
|
"peerDependencies": {
|
|
272
273
|
"@angular/core": ">=19.0.0",
|
|
273
274
|
"@angular/cdk": ">=19.0.0",
|
|
274
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
275
|
+
"@spartan-ng/brain": "0.0.1-alpha.516",
|
|
275
276
|
"clsx": "^2.1.1",
|
|
276
277
|
"@ng-icons/core": ">=29.0.0",
|
|
277
278
|
"@ng-icons/lucide": ">=29.0.0",
|
|
@@ -282,7 +283,7 @@
|
|
|
282
283
|
"internalName": "ui-separator-helm",
|
|
283
284
|
"peerDependencies": {
|
|
284
285
|
"@angular/core": ">=19.0.0",
|
|
285
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
286
|
+
"@spartan-ng/brain": "0.0.1-alpha.516",
|
|
286
287
|
"clsx": "^2.1.1"
|
|
287
288
|
}
|
|
288
289
|
},
|
|
@@ -293,7 +294,7 @@
|
|
|
293
294
|
"clsx": "^2.1.1",
|
|
294
295
|
"@ng-icons/core": ">=29.0.0",
|
|
295
296
|
"@ng-icons/lucide": ">=29.0.0",
|
|
296
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
297
|
+
"@spartan-ng/brain": "0.0.1-alpha.516",
|
|
297
298
|
"class-variance-authority": "^0.7.0"
|
|
298
299
|
}
|
|
299
300
|
},
|
|
@@ -308,7 +309,7 @@
|
|
|
308
309
|
"internalName": "ui-slider-helm",
|
|
309
310
|
"peerDependencies": {
|
|
310
311
|
"@angular/core": ">=19.0.0",
|
|
311
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
312
|
+
"@spartan-ng/brain": "0.0.1-alpha.516",
|
|
312
313
|
"clsx": "^2.1.1"
|
|
313
314
|
}
|
|
314
315
|
},
|
|
@@ -334,7 +335,7 @@
|
|
|
334
335
|
"clsx": "^2.1.1",
|
|
335
336
|
"@angular/cdk": ">=19.0.0",
|
|
336
337
|
"@angular/forms": ">=19.0.0",
|
|
337
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
338
|
+
"@spartan-ng/brain": "0.0.1-alpha.516"
|
|
338
339
|
}
|
|
339
340
|
},
|
|
340
341
|
"table": {
|
|
@@ -348,7 +349,7 @@
|
|
|
348
349
|
"internalName": "ui-tabs-helm",
|
|
349
350
|
"peerDependencies": {
|
|
350
351
|
"@angular/core": ">=19.0.0",
|
|
351
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
352
|
+
"@spartan-ng/brain": "0.0.1-alpha.516",
|
|
352
353
|
"clsx": "^2.1.1",
|
|
353
354
|
"class-variance-authority": "^0.7.0",
|
|
354
355
|
"@angular/cdk": ">=19.0.0",
|
|
@@ -377,7 +378,7 @@
|
|
|
377
378
|
"internalName": "ui-tooltip-helm",
|
|
378
379
|
"peerDependencies": {
|
|
379
380
|
"@angular/core": ">=19.0.0",
|
|
380
|
-
"@spartan-ng/brain": "0.0.1-alpha.
|
|
381
|
+
"@spartan-ng/brain": "0.0.1-alpha.516"
|
|
381
382
|
}
|
|
382
383
|
},
|
|
383
384
|
"typography": {
|