@egose/shadcn-theme-ng 0.0.13 → 0.0.15
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/accordion/fesm2022/accordion.mjs +10 -10
- package/alert/fesm2022/alert.mjs +30 -30
- package/autocomplete/fesm2022/autocomplete.mjs +11 -11
- package/badge/fesm2022/badge.mjs +53 -53
- package/basic-alert/fesm2022/basic-alert.mjs +2 -2
- package/button/fesm2022/button.mjs +108 -108
- package/calendar/fesm2022/calendar.mjs +78 -78
- package/checkbox/README.md +64 -0
- package/checkbox/fesm2022/checkbox.mjs +146 -0
- package/checkbox/fesm2022/checkbox.mjs.map +1 -0
- package/checkbox/index.d.ts +55 -0
- package/confirmation-dialog/fesm2022/confirmation-dialog.mjs +10 -10
- package/date-picker/fesm2022/date-picker.mjs +11 -11
- package/dialog/fesm2022/dialog.mjs +9 -9
- package/exports.json +1 -1
- package/form-checkbox/README.md +64 -0
- package/form-checkbox/fesm2022/form-checkbox.mjs +134 -0
- package/form-checkbox/fesm2022/form-checkbox.mjs.map +1 -0
- package/form-checkbox/index.d.ts +26 -0
- package/form-date-picker/fesm2022/form-date-picker.mjs +9 -9
- package/form-field/fesm2022/form-field.mjs +3 -3
- package/form-field-simple/README.md +64 -0
- package/form-field-simple/fesm2022/form-field-simple.mjs +82 -0
- package/form-field-simple/fesm2022/form-field-simple.mjs.map +1 -0
- package/form-field-simple/index.d.ts +22 -0
- package/form-searchable-multiselect/fesm2022/form-searchable-multiselect.mjs +27 -20
- package/form-searchable-multiselect/fesm2022/form-searchable-multiselect.mjs.map +1 -1
- package/form-select/fesm2022/form-select.mjs +9 -9
- package/form-text-input/fesm2022/form-text-input.mjs +9 -9
- package/form-textarea/fesm2022/form-textarea.mjs +9 -9
- package/input/fesm2022/input.mjs +3 -3
- package/label/fesm2022/label.mjs +1 -1
- package/package.json +13 -1
- package/popover/fesm2022/popover.mjs +2 -2
- package/radio-group/fesm2022/radio-group.mjs +5 -5
- package/searchable-multiselect/fesm2022/searchable-multiselect.mjs +20 -20
- package/select/fesm2022/select.mjs +18 -18
- package/separator/fesm2022/separator.mjs +1 -1
- package/sonner/fesm2022/sonner.mjs +4 -4
- package/spinner/fesm2022/spinner.mjs +6 -6
- package/switch/fesm2022/switch.mjs +2 -2
- package/tabs/fesm2022/tabs.mjs +12 -12
- package/tooltip/fesm2022/tooltip.mjs +5 -5
|
@@ -10,7 +10,7 @@ import { hlm } from '@egose/shadcn-theme-ng/utils';
|
|
|
10
10
|
|
|
11
11
|
class HlmCalendar {
|
|
12
12
|
calendarClass = input('', ...(ngDevMode ? [{ debugName: "calendarClass" }] : []));
|
|
13
|
-
_computedCalenderClass = computed(() => hlm('
|
|
13
|
+
_computedCalenderClass = computed(() => hlm('rounded-md border p-3', this.calendarClass()), ...(ngDevMode ? [{ debugName: "_computedCalenderClass" }] : []));
|
|
14
14
|
/** Access the calendar i18n */
|
|
15
15
|
_i18n = injectBrnCalendarI18n();
|
|
16
16
|
/** Access the date time adapter */
|
|
@@ -39,7 +39,7 @@ class HlmCalendar {
|
|
|
39
39
|
_heading = computed(() => this._i18n
|
|
40
40
|
.config()
|
|
41
41
|
.formatHeader(this._dateAdapter.getMonth(this._calendar().focusedDate()), this._dateAdapter.getYear(this._calendar().focusedDate())), ...(ngDevMode ? [{ debugName: "_heading" }] : []));
|
|
42
|
-
_btnClass = hlm(buttonVariants({ variant: 'ghost' }), '
|
|
42
|
+
_btnClass = hlm(buttonVariants({ variant: 'ghost' }), 'size-8 p-0 font-normal aria-selected:opacity-100', 'data-[outside]:text-muted-foreground data-[outside]:aria-selected:bg-secondary/50 data-[outside]:aria-selected:text-muted-foreground data-[outside]:opacity-50 data-[outside]:aria-selected:opacity-30', 'data-[today]:bg-secondary data-[today]:text-secondary-foreground', 'data-[selected]:bg-primary data-[selected]:text-primary-foreground data-[selected]:hover:bg-primary data-[selected]:focus:bg-primary data-[selected]:focus:text-primary-foreground', 'data-[disabled]:text-muted-foreground data-[disabled]:opacity-50');
|
|
43
43
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmCalendar, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
44
44
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.1", type: HlmCalendar, isStandalone: true, selector: "hlm-calendar", inputs: { calendarClass: { classPropertyName: "calendarClass", publicName: "calendarClass", 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 }, date: { classPropertyName: "date", publicName: "date", isSignal: true, isRequired: false, transformFunction: null }, dateDisabled: { classPropertyName: "dateDisabled", publicName: "dateDisabled", isSignal: true, isRequired: false, transformFunction: null }, weekStartsOn: { classPropertyName: "weekStartsOn", publicName: "weekStartsOn", isSignal: true, isRequired: false, transformFunction: null }, defaultFocusedDate: { classPropertyName: "defaultFocusedDate", publicName: "defaultFocusedDate", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { date: "dateChange" }, viewQueries: [{ propertyName: "_calendar", first: true, predicate: BrnCalendar, descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
45
45
|
<div
|
|
@@ -53,25 +53,25 @@ class HlmCalendar {
|
|
|
53
53
|
[defaultFocusedDate]="defaultFocusedDate()"
|
|
54
54
|
[class]="_computedCalenderClass()"
|
|
55
55
|
>
|
|
56
|
-
<div class="
|
|
56
|
+
<div class="inline-flex flex-col space-y-4">
|
|
57
57
|
<!-- Header -->
|
|
58
|
-
<div class="
|
|
59
|
-
<div class="
|
|
60
|
-
<div brnCalendarHeader class="
|
|
58
|
+
<div class="space-y-4">
|
|
59
|
+
<div class="relative flex items-center justify-center pt-1">
|
|
60
|
+
<div brnCalendarHeader class="text-sm font-medium">
|
|
61
61
|
{{ _heading() }}
|
|
62
62
|
</div>
|
|
63
63
|
|
|
64
|
-
<div class="
|
|
64
|
+
<div class="flex items-center space-x-1">
|
|
65
65
|
<button
|
|
66
66
|
brnCalendarPreviousButton
|
|
67
|
-
class="
|
|
67
|
+
class="focus-visible:ring-ring hover:bg-secondary hover:text-secondary-foreground text-popover-foreground absolute left-1 inline-flex size-8 items-center justify-center whitespace-nowrap rounded-md bg-transparent p-0 text-sm font-medium transition-colors hover:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"
|
|
68
68
|
>
|
|
69
69
|
<ng-icon hlm name="lucideChevronLeft" size="sm" />
|
|
70
70
|
</button>
|
|
71
71
|
|
|
72
72
|
<button
|
|
73
73
|
brnCalendarNextButton
|
|
74
|
-
class="
|
|
74
|
+
class="focus-visible:ring-ring hover:bg-secondary hover:text-secondary-foreground text-popover-foreground absolute right-1 inline-flex size-8 items-center justify-center whitespace-nowrap rounded-md bg-transparent p-0 text-sm font-medium transition-colors hover:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"
|
|
75
75
|
>
|
|
76
76
|
<ng-icon hlm name="lucideChevronRight" size="sm" />
|
|
77
77
|
</button>
|
|
@@ -79,13 +79,13 @@ class HlmCalendar {
|
|
|
79
79
|
</div>
|
|
80
80
|
</div>
|
|
81
81
|
|
|
82
|
-
<table class="
|
|
82
|
+
<table class="w-full border-collapse space-y-1" brnCalendarGrid>
|
|
83
83
|
<thead>
|
|
84
|
-
<tr class="
|
|
84
|
+
<tr class="flex">
|
|
85
85
|
<th
|
|
86
86
|
*brnCalendarWeekday="let weekday"
|
|
87
87
|
scope="col"
|
|
88
|
-
class="
|
|
88
|
+
class="text-muted-foreground w-8 rounded-md text-[0.8rem] font-normal"
|
|
89
89
|
[attr.aria-label]="_i18n.config().labelWeekday(weekday)"
|
|
90
90
|
>
|
|
91
91
|
{{ _i18n.config().formatWeekdayName(weekday) }}
|
|
@@ -94,11 +94,11 @@ class HlmCalendar {
|
|
|
94
94
|
</thead>
|
|
95
95
|
|
|
96
96
|
<tbody role="rowgroup">
|
|
97
|
-
<tr *brnCalendarWeek="let week" class="
|
|
97
|
+
<tr *brnCalendarWeek="let week" class="mt-2 flex w-full">
|
|
98
98
|
@for (date of week; track _dateAdapter.getTime(date)) {
|
|
99
99
|
<td
|
|
100
100
|
brnCalendarCell
|
|
101
|
-
class="
|
|
101
|
+
class="data-[selected]:data-[outside]:bg-secondary/50 data-[selected]:bg-secondary relative size-8 p-0 text-center text-sm focus-within:relative focus-within:z-20 first:data-[selected]:rounded-l-md last:data-[selected]:rounded-r-md [&:has([aria-selected].day-range-end)]:rounded-r-md"
|
|
102
102
|
>
|
|
103
103
|
<button brnCalendarCellButton [date]="date" [class]="_btnClass">
|
|
104
104
|
{{ _dateAdapter.getDate(date) }}
|
|
@@ -142,25 +142,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
|
|
|
142
142
|
[defaultFocusedDate]="defaultFocusedDate()"
|
|
143
143
|
[class]="_computedCalenderClass()"
|
|
144
144
|
>
|
|
145
|
-
<div class="
|
|
145
|
+
<div class="inline-flex flex-col space-y-4">
|
|
146
146
|
<!-- Header -->
|
|
147
|
-
<div class="
|
|
148
|
-
<div class="
|
|
149
|
-
<div brnCalendarHeader class="
|
|
147
|
+
<div class="space-y-4">
|
|
148
|
+
<div class="relative flex items-center justify-center pt-1">
|
|
149
|
+
<div brnCalendarHeader class="text-sm font-medium">
|
|
150
150
|
{{ _heading() }}
|
|
151
151
|
</div>
|
|
152
152
|
|
|
153
|
-
<div class="
|
|
153
|
+
<div class="flex items-center space-x-1">
|
|
154
154
|
<button
|
|
155
155
|
brnCalendarPreviousButton
|
|
156
|
-
class="
|
|
156
|
+
class="focus-visible:ring-ring hover:bg-secondary hover:text-secondary-foreground text-popover-foreground absolute left-1 inline-flex size-8 items-center justify-center whitespace-nowrap rounded-md bg-transparent p-0 text-sm font-medium transition-colors hover:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"
|
|
157
157
|
>
|
|
158
158
|
<ng-icon hlm name="lucideChevronLeft" size="sm" />
|
|
159
159
|
</button>
|
|
160
160
|
|
|
161
161
|
<button
|
|
162
162
|
brnCalendarNextButton
|
|
163
|
-
class="
|
|
163
|
+
class="focus-visible:ring-ring hover:bg-secondary hover:text-secondary-foreground text-popover-foreground absolute right-1 inline-flex size-8 items-center justify-center whitespace-nowrap rounded-md bg-transparent p-0 text-sm font-medium transition-colors hover:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"
|
|
164
164
|
>
|
|
165
165
|
<ng-icon hlm name="lucideChevronRight" size="sm" />
|
|
166
166
|
</button>
|
|
@@ -168,13 +168,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
|
|
|
168
168
|
</div>
|
|
169
169
|
</div>
|
|
170
170
|
|
|
171
|
-
<table class="
|
|
171
|
+
<table class="w-full border-collapse space-y-1" brnCalendarGrid>
|
|
172
172
|
<thead>
|
|
173
|
-
<tr class="
|
|
173
|
+
<tr class="flex">
|
|
174
174
|
<th
|
|
175
175
|
*brnCalendarWeekday="let weekday"
|
|
176
176
|
scope="col"
|
|
177
|
-
class="
|
|
177
|
+
class="text-muted-foreground w-8 rounded-md text-[0.8rem] font-normal"
|
|
178
178
|
[attr.aria-label]="_i18n.config().labelWeekday(weekday)"
|
|
179
179
|
>
|
|
180
180
|
{{ _i18n.config().formatWeekdayName(weekday) }}
|
|
@@ -183,11 +183,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
|
|
|
183
183
|
</thead>
|
|
184
184
|
|
|
185
185
|
<tbody role="rowgroup">
|
|
186
|
-
<tr *brnCalendarWeek="let week" class="
|
|
186
|
+
<tr *brnCalendarWeek="let week" class="mt-2 flex w-full">
|
|
187
187
|
@for (date of week; track _dateAdapter.getTime(date)) {
|
|
188
188
|
<td
|
|
189
189
|
brnCalendarCell
|
|
190
|
-
class="
|
|
190
|
+
class="data-[selected]:data-[outside]:bg-secondary/50 data-[selected]:bg-secondary relative size-8 p-0 text-center text-sm focus-within:relative focus-within:z-20 first:data-[selected]:rounded-l-md last:data-[selected]:rounded-r-md [&:has([aria-selected].day-range-end)]:rounded-r-md"
|
|
191
191
|
>
|
|
192
192
|
<button brnCalendarCellButton [date]="date" [class]="_btnClass">
|
|
193
193
|
{{ _dateAdapter.getDate(date) }}
|
|
@@ -206,7 +206,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
|
|
|
206
206
|
|
|
207
207
|
class HlmCalendarMulti {
|
|
208
208
|
calendarClass = input('', ...(ngDevMode ? [{ debugName: "calendarClass" }] : []));
|
|
209
|
-
_computedCalenderClass = computed(() => hlm('
|
|
209
|
+
_computedCalenderClass = computed(() => hlm('rounded-md border p-3', this.calendarClass()), ...(ngDevMode ? [{ debugName: "_computedCalenderClass" }] : []));
|
|
210
210
|
/** Access the calendar i18n */
|
|
211
211
|
_i18n = injectBrnCalendarI18n();
|
|
212
212
|
/** Access the date time adapter */
|
|
@@ -243,7 +243,7 @@ class HlmCalendarMulti {
|
|
|
243
243
|
_heading = computed(() => this._i18n
|
|
244
244
|
.config()
|
|
245
245
|
.formatHeader(this._dateAdapter.getMonth(this._calendar().focusedDate()), this._dateAdapter.getYear(this._calendar().focusedDate())), ...(ngDevMode ? [{ debugName: "_heading" }] : []));
|
|
246
|
-
_btnClass = hlm(buttonVariants({ variant: 'ghost' }), '
|
|
246
|
+
_btnClass = hlm(buttonVariants({ variant: 'ghost' }), 'size-8 p-0 font-normal aria-selected:opacity-100', 'data-[outside]:text-muted-foreground data-[outside]:aria-selected:bg-accent/50 data-[outside]:aria-selected:text-muted-foreground data-[outside]:opacity-50 data-[outside]:aria-selected:opacity-30', 'data-[today]:bg-accent data-[today]:text-accent-foreground', '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', 'data-[disabled]:text-muted-foreground data-[disabled]:opacity-50');
|
|
247
247
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmCalendarMulti, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
248
248
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.1", type: HlmCalendarMulti, isStandalone: true, selector: "hlm-calendar-multi", inputs: { calendarClass: { classPropertyName: "calendarClass", publicName: "calendarClass", 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 }, minSelection: { classPropertyName: "minSelection", publicName: "minSelection", isSignal: true, isRequired: false, transformFunction: null }, maxSelection: { classPropertyName: "maxSelection", publicName: "maxSelection", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, date: { classPropertyName: "date", publicName: "date", isSignal: true, isRequired: false, transformFunction: null }, dateDisabled: { classPropertyName: "dateDisabled", publicName: "dateDisabled", isSignal: true, isRequired: false, transformFunction: null }, weekStartsOn: { classPropertyName: "weekStartsOn", publicName: "weekStartsOn", isSignal: true, isRequired: false, transformFunction: null }, defaultFocusedDate: { classPropertyName: "defaultFocusedDate", publicName: "defaultFocusedDate", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { date: "dateChange" }, viewQueries: [{ propertyName: "_calendar", first: true, predicate: BrnCalendarMulti, descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
249
249
|
<div
|
|
@@ -259,25 +259,25 @@ class HlmCalendarMulti {
|
|
|
259
259
|
[defaultFocusedDate]="defaultFocusedDate()"
|
|
260
260
|
[class]="_computedCalenderClass()"
|
|
261
261
|
>
|
|
262
|
-
<div class="
|
|
262
|
+
<div class="inline-flex flex-col space-y-4">
|
|
263
263
|
<!-- Header -->
|
|
264
|
-
<div class="
|
|
265
|
-
<div class="
|
|
266
|
-
<div brnCalendarHeader class="
|
|
264
|
+
<div class="space-y-4">
|
|
265
|
+
<div class="relative flex items-center justify-center pt-1">
|
|
266
|
+
<div brnCalendarHeader class="text-sm font-medium">
|
|
267
267
|
{{ _heading() }}
|
|
268
268
|
</div>
|
|
269
269
|
|
|
270
|
-
<div class="
|
|
270
|
+
<div class="flex items-center space-x-1">
|
|
271
271
|
<button
|
|
272
272
|
brnCalendarPreviousButton
|
|
273
|
-
class="
|
|
273
|
+
class="ring-offset-background focus-visible:ring-ring border-input hover:bg-accent hover:text-accent-foreground absolute left-1 inline-flex h-7 w-7 items-center justify-center whitespace-nowrap rounded-md border bg-transparent p-0 text-sm font-medium opacity-50 transition-colors hover:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"
|
|
274
274
|
>
|
|
275
275
|
<ng-icon hlm name="lucideChevronLeft" size="sm" />
|
|
276
276
|
</button>
|
|
277
277
|
|
|
278
278
|
<button
|
|
279
279
|
brnCalendarNextButton
|
|
280
|
-
class="
|
|
280
|
+
class="ring-offset-background focus-visible:ring-ring border-input hover:bg-accent hover:text-accent-foreground absolute right-1 inline-flex h-7 w-7 items-center justify-center whitespace-nowrap rounded-md border bg-transparent p-0 text-sm font-medium opacity-50 transition-colors hover:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"
|
|
281
281
|
>
|
|
282
282
|
<ng-icon hlm name="lucideChevronRight" size="sm" />
|
|
283
283
|
</button>
|
|
@@ -285,13 +285,13 @@ class HlmCalendarMulti {
|
|
|
285
285
|
</div>
|
|
286
286
|
</div>
|
|
287
287
|
|
|
288
|
-
<table class="
|
|
288
|
+
<table class="w-full border-collapse space-y-1" brnCalendarGrid>
|
|
289
289
|
<thead>
|
|
290
|
-
<tr class="
|
|
290
|
+
<tr class="flex">
|
|
291
291
|
<th
|
|
292
292
|
*brnCalendarWeekday="let weekday"
|
|
293
293
|
scope="col"
|
|
294
|
-
class="
|
|
294
|
+
class="text-muted-foreground w-8 rounded-md text-[0.8rem] font-normal"
|
|
295
295
|
[attr.aria-label]="_i18n.config().labelWeekday(weekday)"
|
|
296
296
|
>
|
|
297
297
|
{{ _i18n.config().formatWeekdayName(weekday) }}
|
|
@@ -300,11 +300,11 @@ class HlmCalendarMulti {
|
|
|
300
300
|
</thead>
|
|
301
301
|
|
|
302
302
|
<tbody role="rowgroup">
|
|
303
|
-
<tr *brnCalendarWeek="let week" class="
|
|
303
|
+
<tr *brnCalendarWeek="let week" class="mt-2 flex w-full">
|
|
304
304
|
@for (date of week; track _dateAdapter.getTime(date)) {
|
|
305
305
|
<td
|
|
306
306
|
brnCalendarCell
|
|
307
|
-
class="
|
|
307
|
+
class="data-[selected]:data-[outside]:bg-accent/50 data-[selected]:bg-accent relative h-8 w-8 p-0 text-center text-sm focus-within:relative focus-within:z-20 first:data-[selected]:rounded-l-md last:data-[selected]:rounded-r-md [&:has([aria-selected].day-range-end)]:rounded-r-md"
|
|
308
308
|
>
|
|
309
309
|
<button brnCalendarCellButton [date]="date" [class]="_btnClass">
|
|
310
310
|
{{ _dateAdapter.getDate(date) }}
|
|
@@ -350,25 +350,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
|
|
|
350
350
|
[defaultFocusedDate]="defaultFocusedDate()"
|
|
351
351
|
[class]="_computedCalenderClass()"
|
|
352
352
|
>
|
|
353
|
-
<div class="
|
|
353
|
+
<div class="inline-flex flex-col space-y-4">
|
|
354
354
|
<!-- Header -->
|
|
355
|
-
<div class="
|
|
356
|
-
<div class="
|
|
357
|
-
<div brnCalendarHeader class="
|
|
355
|
+
<div class="space-y-4">
|
|
356
|
+
<div class="relative flex items-center justify-center pt-1">
|
|
357
|
+
<div brnCalendarHeader class="text-sm font-medium">
|
|
358
358
|
{{ _heading() }}
|
|
359
359
|
</div>
|
|
360
360
|
|
|
361
|
-
<div class="
|
|
361
|
+
<div class="flex items-center space-x-1">
|
|
362
362
|
<button
|
|
363
363
|
brnCalendarPreviousButton
|
|
364
|
-
class="
|
|
364
|
+
class="ring-offset-background focus-visible:ring-ring border-input hover:bg-accent hover:text-accent-foreground absolute left-1 inline-flex h-7 w-7 items-center justify-center whitespace-nowrap rounded-md border bg-transparent p-0 text-sm font-medium opacity-50 transition-colors hover:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"
|
|
365
365
|
>
|
|
366
366
|
<ng-icon hlm name="lucideChevronLeft" size="sm" />
|
|
367
367
|
</button>
|
|
368
368
|
|
|
369
369
|
<button
|
|
370
370
|
brnCalendarNextButton
|
|
371
|
-
class="
|
|
371
|
+
class="ring-offset-background focus-visible:ring-ring border-input hover:bg-accent hover:text-accent-foreground absolute right-1 inline-flex h-7 w-7 items-center justify-center whitespace-nowrap rounded-md border bg-transparent p-0 text-sm font-medium opacity-50 transition-colors hover:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"
|
|
372
372
|
>
|
|
373
373
|
<ng-icon hlm name="lucideChevronRight" size="sm" />
|
|
374
374
|
</button>
|
|
@@ -376,13 +376,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
|
|
|
376
376
|
</div>
|
|
377
377
|
</div>
|
|
378
378
|
|
|
379
|
-
<table class="
|
|
379
|
+
<table class="w-full border-collapse space-y-1" brnCalendarGrid>
|
|
380
380
|
<thead>
|
|
381
|
-
<tr class="
|
|
381
|
+
<tr class="flex">
|
|
382
382
|
<th
|
|
383
383
|
*brnCalendarWeekday="let weekday"
|
|
384
384
|
scope="col"
|
|
385
|
-
class="
|
|
385
|
+
class="text-muted-foreground w-8 rounded-md text-[0.8rem] font-normal"
|
|
386
386
|
[attr.aria-label]="_i18n.config().labelWeekday(weekday)"
|
|
387
387
|
>
|
|
388
388
|
{{ _i18n.config().formatWeekdayName(weekday) }}
|
|
@@ -391,11 +391,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
|
|
|
391
391
|
</thead>
|
|
392
392
|
|
|
393
393
|
<tbody role="rowgroup">
|
|
394
|
-
<tr *brnCalendarWeek="let week" class="
|
|
394
|
+
<tr *brnCalendarWeek="let week" class="mt-2 flex w-full">
|
|
395
395
|
@for (date of week; track _dateAdapter.getTime(date)) {
|
|
396
396
|
<td
|
|
397
397
|
brnCalendarCell
|
|
398
|
-
class="
|
|
398
|
+
class="data-[selected]:data-[outside]:bg-accent/50 data-[selected]:bg-accent relative h-8 w-8 p-0 text-center text-sm focus-within:relative focus-within:z-20 first:data-[selected]:rounded-l-md last:data-[selected]:rounded-r-md [&:has([aria-selected].day-range-end)]:rounded-r-md"
|
|
399
399
|
>
|
|
400
400
|
<button brnCalendarCellButton [date]="date" [class]="_btnClass">
|
|
401
401
|
{{ _dateAdapter.getDate(date) }}
|
|
@@ -414,7 +414,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
|
|
|
414
414
|
|
|
415
415
|
class HlmCalendarRange {
|
|
416
416
|
calendarClass = input('', ...(ngDevMode ? [{ debugName: "calendarClass" }] : []));
|
|
417
|
-
_computedCalenderClass = computed(() => hlm('
|
|
417
|
+
_computedCalenderClass = computed(() => hlm('rounded-md border p-3', this.calendarClass()), ...(ngDevMode ? [{ debugName: "_computedCalenderClass" }] : []));
|
|
418
418
|
/** Access the calendar i18n */
|
|
419
419
|
_i18n = injectBrnCalendarI18n();
|
|
420
420
|
/** Access the date time adapter */
|
|
@@ -445,7 +445,7 @@ class HlmCalendarRange {
|
|
|
445
445
|
_heading = computed(() => this._i18n
|
|
446
446
|
.config()
|
|
447
447
|
.formatHeader(this._dateAdapter.getMonth(this._calendar().focusedDate()), this._dateAdapter.getYear(this._calendar().focusedDate())), ...(ngDevMode ? [{ debugName: "_heading" }] : []));
|
|
448
|
-
_btnClass = hlm(buttonVariants({ variant: 'ghost' }), '
|
|
448
|
+
_btnClass = hlm(buttonVariants({ variant: 'ghost' }), 'size-8 p-0 font-normal aria-selected:opacity-100', 'data-[outside]:text-muted-foreground data-[outside]:aria-selected:text-muted-foreground', 'data-[today]:bg-accent data-[today]:text-accent-foreground', 'data-[selected]:bg-primary data-[selected]:text-primary-foreground data-[selected]:focus:bg-primary data-[selected]:focus:text-primary-foreground', 'data-[disabled]:text-muted-foreground data-[disabled]:opacity-50', 'data-[range-start]:rounded-l-md', 'data-[range-end]:rounded-r-md', 'data-[range-between]:bg-accent data-[range-between]:text-accent-foreground data-[range-between]:rounded-none');
|
|
449
449
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.1", ngImport: i0, type: HlmCalendarRange, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
450
450
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.1", type: HlmCalendarRange, isStandalone: true, selector: "hlm-calendar-range", inputs: { calendarClass: { classPropertyName: "calendarClass", publicName: "calendarClass", 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 }, startDate: { classPropertyName: "startDate", publicName: "startDate", isSignal: true, isRequired: false, transformFunction: null }, endDate: { classPropertyName: "endDate", publicName: "endDate", isSignal: true, isRequired: false, transformFunction: null }, dateDisabled: { classPropertyName: "dateDisabled", publicName: "dateDisabled", isSignal: true, isRequired: false, transformFunction: null }, weekStartsOn: { classPropertyName: "weekStartsOn", publicName: "weekStartsOn", isSignal: true, isRequired: false, transformFunction: null }, defaultFocusedDate: { classPropertyName: "defaultFocusedDate", publicName: "defaultFocusedDate", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { startDate: "startDateChange", endDate: "endDateChange" }, viewQueries: [{ propertyName: "_calendar", first: true, predicate: BrnCalendarRange, descendants: true, isSignal: true }], ngImport: i0, template: `
|
|
451
451
|
<div
|
|
@@ -460,25 +460,25 @@ class HlmCalendarRange {
|
|
|
460
460
|
[defaultFocusedDate]="defaultFocusedDate()"
|
|
461
461
|
[class]="_computedCalenderClass()"
|
|
462
462
|
>
|
|
463
|
-
<div class="
|
|
463
|
+
<div class="inline-flex flex-col space-y-4">
|
|
464
464
|
<!-- Header -->
|
|
465
|
-
<div class="
|
|
466
|
-
<div class="
|
|
467
|
-
<div brnCalendarHeader class="
|
|
465
|
+
<div class="space-y-4">
|
|
466
|
+
<div class="relative flex items-center justify-center pt-1">
|
|
467
|
+
<div brnCalendarHeader class="text-sm font-medium">
|
|
468
468
|
{{ _heading() }}
|
|
469
469
|
</div>
|
|
470
470
|
|
|
471
|
-
<div class="
|
|
471
|
+
<div class="flex items-center space-x-1">
|
|
472
472
|
<button
|
|
473
473
|
brnCalendarPreviousButton
|
|
474
|
-
class="
|
|
474
|
+
class="ring-offset-background focus-visible:ring-ring border-input hover:bg-accent hover:text-accent-foreground absolute left-1 inline-flex h-7 w-7 items-center justify-center whitespace-nowrap rounded-md border bg-transparent p-0 text-sm font-medium opacity-50 transition-colors hover:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"
|
|
475
475
|
>
|
|
476
476
|
<ng-icon hlm name="lucideChevronLeft" size="sm" />
|
|
477
477
|
</button>
|
|
478
478
|
|
|
479
479
|
<button
|
|
480
480
|
brnCalendarNextButton
|
|
481
|
-
class="
|
|
481
|
+
class="ring-offset-background focus-visible:ring-ring border-input hover:bg-accent hover:text-accent-foreground absolute right-1 inline-flex h-7 w-7 items-center justify-center whitespace-nowrap rounded-md border bg-transparent p-0 text-sm font-medium opacity-50 transition-colors hover:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"
|
|
482
482
|
>
|
|
483
483
|
<ng-icon hlm name="lucideChevronRight" size="sm" />
|
|
484
484
|
</button>
|
|
@@ -486,13 +486,13 @@ class HlmCalendarRange {
|
|
|
486
486
|
</div>
|
|
487
487
|
</div>
|
|
488
488
|
|
|
489
|
-
<table class="
|
|
489
|
+
<table class="w-full border-collapse space-y-1" brnCalendarGrid>
|
|
490
490
|
<thead>
|
|
491
|
-
<tr class="
|
|
491
|
+
<tr class="flex">
|
|
492
492
|
<th
|
|
493
493
|
*brnCalendarWeekday="let weekday"
|
|
494
494
|
scope="col"
|
|
495
|
-
class="
|
|
495
|
+
class="text-muted-foreground w-8 rounded-md text-[0.8rem] font-normal"
|
|
496
496
|
[attr.aria-label]="_i18n.config().labelWeekday(weekday)"
|
|
497
497
|
>
|
|
498
498
|
{{ _i18n.config().formatWeekdayName(weekday) }}
|
|
@@ -501,11 +501,11 @@ class HlmCalendarRange {
|
|
|
501
501
|
</thead>
|
|
502
502
|
|
|
503
503
|
<tbody role="rowgroup">
|
|
504
|
-
<tr *brnCalendarWeek="let week" class="
|
|
504
|
+
<tr *brnCalendarWeek="let week" class="mt-2 flex w-full">
|
|
505
505
|
@for (date of week; track _dateAdapter.getTime(date)) {
|
|
506
506
|
<td
|
|
507
507
|
brnCalendarCell
|
|
508
|
-
class="
|
|
508
|
+
class="data-[selected]:data-[outside]:bg-accent/50 data-[selected]:bg-accent relative h-8 w-8 p-0 text-center text-sm focus-within:relative focus-within:z-20 first:data-[selected]:rounded-l-md last:data-[selected]:rounded-r-md [&:has([aria-selected].day-range-end)]:rounded-r-md"
|
|
509
509
|
>
|
|
510
510
|
<button brnCalendarCellButton [date]="date" [class]="_btnClass">
|
|
511
511
|
{{ _dateAdapter.getDate(date) }}
|
|
@@ -550,25 +550,25 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
|
|
|
550
550
|
[defaultFocusedDate]="defaultFocusedDate()"
|
|
551
551
|
[class]="_computedCalenderClass()"
|
|
552
552
|
>
|
|
553
|
-
<div class="
|
|
553
|
+
<div class="inline-flex flex-col space-y-4">
|
|
554
554
|
<!-- Header -->
|
|
555
|
-
<div class="
|
|
556
|
-
<div class="
|
|
557
|
-
<div brnCalendarHeader class="
|
|
555
|
+
<div class="space-y-4">
|
|
556
|
+
<div class="relative flex items-center justify-center pt-1">
|
|
557
|
+
<div brnCalendarHeader class="text-sm font-medium">
|
|
558
558
|
{{ _heading() }}
|
|
559
559
|
</div>
|
|
560
560
|
|
|
561
|
-
<div class="
|
|
561
|
+
<div class="flex items-center space-x-1">
|
|
562
562
|
<button
|
|
563
563
|
brnCalendarPreviousButton
|
|
564
|
-
class="
|
|
564
|
+
class="ring-offset-background focus-visible:ring-ring border-input hover:bg-accent hover:text-accent-foreground absolute left-1 inline-flex h-7 w-7 items-center justify-center whitespace-nowrap rounded-md border bg-transparent p-0 text-sm font-medium opacity-50 transition-colors hover:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"
|
|
565
565
|
>
|
|
566
566
|
<ng-icon hlm name="lucideChevronLeft" size="sm" />
|
|
567
567
|
</button>
|
|
568
568
|
|
|
569
569
|
<button
|
|
570
570
|
brnCalendarNextButton
|
|
571
|
-
class="
|
|
571
|
+
class="ring-offset-background focus-visible:ring-ring border-input hover:bg-accent hover:text-accent-foreground absolute right-1 inline-flex h-7 w-7 items-center justify-center whitespace-nowrap rounded-md border bg-transparent p-0 text-sm font-medium opacity-50 transition-colors hover:opacity-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"
|
|
572
572
|
>
|
|
573
573
|
<ng-icon hlm name="lucideChevronRight" size="sm" />
|
|
574
574
|
</button>
|
|
@@ -576,13 +576,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
|
|
|
576
576
|
</div>
|
|
577
577
|
</div>
|
|
578
578
|
|
|
579
|
-
<table class="
|
|
579
|
+
<table class="w-full border-collapse space-y-1" brnCalendarGrid>
|
|
580
580
|
<thead>
|
|
581
|
-
<tr class="
|
|
581
|
+
<tr class="flex">
|
|
582
582
|
<th
|
|
583
583
|
*brnCalendarWeekday="let weekday"
|
|
584
584
|
scope="col"
|
|
585
|
-
class="
|
|
585
|
+
class="text-muted-foreground w-8 rounded-md text-[0.8rem] font-normal"
|
|
586
586
|
[attr.aria-label]="_i18n.config().labelWeekday(weekday)"
|
|
587
587
|
>
|
|
588
588
|
{{ _i18n.config().formatWeekdayName(weekday) }}
|
|
@@ -591,11 +591,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.1", ngImpor
|
|
|
591
591
|
</thead>
|
|
592
592
|
|
|
593
593
|
<tbody role="rowgroup">
|
|
594
|
-
<tr *brnCalendarWeek="let week" class="
|
|
594
|
+
<tr *brnCalendarWeek="let week" class="mt-2 flex w-full">
|
|
595
595
|
@for (date of week; track _dateAdapter.getTime(date)) {
|
|
596
596
|
<td
|
|
597
597
|
brnCalendarCell
|
|
598
|
-
class="
|
|
598
|
+
class="data-[selected]:data-[outside]:bg-accent/50 data-[selected]:bg-accent relative h-8 w-8 p-0 text-center text-sm focus-within:relative focus-within:z-20 first:data-[selected]:rounded-l-md last:data-[selected]:rounded-r-md [&:has([aria-selected].day-range-end)]:rounded-r-md"
|
|
599
599
|
>
|
|
600
600
|
<button brnCalendarCellButton [date]="date" [class]="_btnClass">
|
|
601
601
|
{{ _dateAdapter.getDate(date) }}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# Checkbox
|
|
2
|
+
|
|
3
|
+
This project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 20.3.0.
|
|
4
|
+
|
|
5
|
+
## Code scaffolding
|
|
6
|
+
|
|
7
|
+
Angular CLI includes powerful code scaffolding tools. To generate a new component, run:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
ng generate component component-name
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
For a complete list of available schematics (such as `components`, `directives`, or `pipes`), run:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
ng generate --help
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Building
|
|
20
|
+
|
|
21
|
+
To build the library, run:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
ng build checkbox
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
This command will compile your project, and the build artifacts will be placed in the `dist/` directory.
|
|
28
|
+
|
|
29
|
+
### Publishing the Library
|
|
30
|
+
|
|
31
|
+
Once the project is built, you can publish your library by following these steps:
|
|
32
|
+
|
|
33
|
+
1. Navigate to the `dist` directory:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
cd dist/checkbox
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
2. Run the `npm publish` command to publish your library to the npm registry:
|
|
40
|
+
```bash
|
|
41
|
+
npm publish
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Running unit tests
|
|
45
|
+
|
|
46
|
+
To execute unit tests with the [Karma](https://karma-runner.github.io) test runner, use the following command:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
ng test
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Running end-to-end tests
|
|
53
|
+
|
|
54
|
+
For end-to-end (e2e) testing, run:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
ng e2e
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Angular CLI does not come with an end-to-end testing framework by default. You can choose one that suits your needs.
|
|
61
|
+
|
|
62
|
+
## Additional Resources
|
|
63
|
+
|
|
64
|
+
For more information on using the Angular CLI, including detailed command references, visit the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page.
|