ngx-com 0.0.4 → 0.0.6
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/fesm2022/ngx-com-components-calendar.mjs +38 -135
- package/fesm2022/ngx-com-components-calendar.mjs.map +1 -1
- package/fesm2022/ngx-com-components-dropdown.mjs +13 -11
- package/fesm2022/ngx-com-components-dropdown.mjs.map +1 -1
- package/fesm2022/ngx-com-components-form-field.mjs +13 -0
- package/fesm2022/ngx-com-components-form-field.mjs.map +1 -1
- package/fesm2022/ngx-com-components-item.mjs +3 -3
- package/fesm2022/ngx-com-components-item.mjs.map +1 -1
- package/fesm2022/ngx-com-components-sort.mjs +4 -4
- package/fesm2022/ngx-com-components-sort.mjs.map +1 -1
- package/fesm2022/ngx-com-components-tabs.mjs +5 -2
- package/fesm2022/ngx-com-components-tabs.mjs.map +1 -1
- package/package.json +1 -1
- package/types/ngx-com-components-calendar.d.ts +6 -1
- package/types/ngx-com-components-dropdown.d.ts +4 -2
- package/types/ngx-com-components-form-field.d.ts +5 -2
- package/types/ngx-com-components-item.d.ts +1 -1
- package/types/ngx-com-components-tabs.d.ts +3 -0
|
@@ -8,6 +8,7 @@ import { Overlay, OverlayModule } from '@angular/cdk/overlay';
|
|
|
8
8
|
import { TemplatePortal } from '@angular/cdk/portal';
|
|
9
9
|
import * as i1 from '@angular/cdk/a11y';
|
|
10
10
|
import { A11yModule } from '@angular/cdk/a11y';
|
|
11
|
+
import { ComIcon } from 'ngx-com/components/icon';
|
|
11
12
|
|
|
12
13
|
/**
|
|
13
14
|
* Calendar shared types and interfaces
|
|
@@ -390,7 +391,7 @@ const calendarCellVariants = cva(
|
|
|
390
391
|
{
|
|
391
392
|
state: 'disabled',
|
|
392
393
|
outside: true,
|
|
393
|
-
class: ['text-disabled-foreground'
|
|
394
|
+
class: ['text-disabled-foreground'],
|
|
394
395
|
},
|
|
395
396
|
{
|
|
396
397
|
state: 'selected',
|
|
@@ -3226,16 +3227,16 @@ const datepickerIconVariants = cva([
|
|
|
3226
3227
|
/**
|
|
3227
3228
|
* CVA variants for the clear button.
|
|
3228
3229
|
*
|
|
3229
|
-
* @tokens `--color-ring`, `--color-muted-foreground`, `--radius-interactive-sm`
|
|
3230
|
+
* @tokens `--color-ring`, `--color-muted-foreground`, `--color-foreground`, `--radius-interactive-sm`
|
|
3230
3231
|
*/
|
|
3231
3232
|
const datepickerClearVariants = cva([
|
|
3232
3233
|
'inline-flex',
|
|
3233
3234
|
'items-center',
|
|
3234
3235
|
'justify-center',
|
|
3235
3236
|
'rounded-interactive-sm',
|
|
3236
|
-
'
|
|
3237
|
-
'transition-
|
|
3238
|
-
'hover:
|
|
3237
|
+
'text-muted-foreground',
|
|
3238
|
+
'transition-colors',
|
|
3239
|
+
'hover:text-foreground',
|
|
3239
3240
|
'focus:outline-none',
|
|
3240
3241
|
'focus:ring-1',
|
|
3241
3242
|
'focus:ring-ring',
|
|
@@ -3494,6 +3495,15 @@ class ComDatepicker {
|
|
|
3494
3495
|
panelId = computed(() => `${this.datepickerId}-panel`, ...(ngDevMode ? [{ debugName: "panelId" }] : []));
|
|
3495
3496
|
/** Whether the datepicker has a value. */
|
|
3496
3497
|
hasValue = computed(() => this.internalValue() !== null, ...(ngDevMode ? [{ debugName: "hasValue" }] : []));
|
|
3498
|
+
/** Icon size based on datepicker size. */
|
|
3499
|
+
iconSize = computed(() => {
|
|
3500
|
+
const sizeMap = {
|
|
3501
|
+
sm: 'sm',
|
|
3502
|
+
default: 'md',
|
|
3503
|
+
lg: 'lg',
|
|
3504
|
+
};
|
|
3505
|
+
return sizeMap[this.size()];
|
|
3506
|
+
}, ...(ngDevMode ? [{ debugName: "iconSize" }] : []));
|
|
3497
3507
|
/** Formatted display value. */
|
|
3498
3508
|
displayValue = computed(() => {
|
|
3499
3509
|
const value = this.internalValue();
|
|
@@ -3865,18 +3875,7 @@ class ComDatepicker {
|
|
|
3865
3875
|
[attr.aria-label]="'Clear date'"
|
|
3866
3876
|
(click)="clear($event)"
|
|
3867
3877
|
>
|
|
3868
|
-
<
|
|
3869
|
-
viewBox="0 0 24 24"
|
|
3870
|
-
fill="none"
|
|
3871
|
-
stroke="currentColor"
|
|
3872
|
-
stroke-width="2"
|
|
3873
|
-
stroke-linecap="round"
|
|
3874
|
-
stroke-linejoin="round"
|
|
3875
|
-
class="h-full w-full"
|
|
3876
|
-
>
|
|
3877
|
-
<line x1="18" y1="6" x2="6" y2="18" />
|
|
3878
|
-
<line x1="6" y1="6" x2="18" y2="18" />
|
|
3879
|
-
</svg>
|
|
3878
|
+
<com-icon name="x" [size]="iconSize()" />
|
|
3880
3879
|
</button>
|
|
3881
3880
|
}
|
|
3882
3881
|
|
|
@@ -3888,20 +3887,7 @@ class ComDatepicker {
|
|
|
3888
3887
|
[disabled]="disabled()"
|
|
3889
3888
|
tabindex="-1"
|
|
3890
3889
|
>
|
|
3891
|
-
<
|
|
3892
|
-
viewBox="0 0 24 24"
|
|
3893
|
-
fill="none"
|
|
3894
|
-
stroke="currentColor"
|
|
3895
|
-
stroke-width="2"
|
|
3896
|
-
stroke-linecap="round"
|
|
3897
|
-
stroke-linejoin="round"
|
|
3898
|
-
class="h-full w-full"
|
|
3899
|
-
>
|
|
3900
|
-
<rect x="3" y="4" width="18" height="18" rx="2" ry="2" />
|
|
3901
|
-
<line x1="16" y1="2" x2="16" y2="6" />
|
|
3902
|
-
<line x1="8" y1="2" x2="8" y2="6" />
|
|
3903
|
-
<line x1="3" y1="10" x2="21" y2="10" />
|
|
3904
|
-
</svg>
|
|
3890
|
+
<com-icon name="calendar" [size]="iconSize()" />
|
|
3905
3891
|
</button>
|
|
3906
3892
|
</div>
|
|
3907
3893
|
|
|
@@ -3959,7 +3945,7 @@ class ComDatepicker {
|
|
|
3959
3945
|
<div class="sr-only" aria-live="polite" aria-atomic="true">
|
|
3960
3946
|
{{ liveAnnouncement() }}
|
|
3961
3947
|
</div>
|
|
3962
|
-
`, isInline: true, styles: [".sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}\n"], dependencies: [{ kind: "ngmodule", type: OverlayModule }, { kind: "ngmodule", type: A11yModule }, { kind: "directive", type: i1.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }, { kind: "component", type: ComCalendar, selector: "com-calendar", inputs: ["activeDate", "selected", "minDate", "maxDate", "dateFilter", "dateClass", "bordered", "startView", "firstDayOfWeek", "monthColumns", "cellTemplate"], outputs: ["selectedChange", "viewChanged", "activeDateChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3948
|
+
`, isInline: true, styles: [".sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}\n"], dependencies: [{ kind: "ngmodule", type: OverlayModule }, { kind: "ngmodule", type: A11yModule }, { kind: "directive", type: i1.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }, { kind: "component", type: ComCalendar, selector: "com-calendar", inputs: ["activeDate", "selected", "minDate", "maxDate", "dateFilter", "dateClass", "bordered", "startView", "firstDayOfWeek", "monthColumns", "cellTemplate"], outputs: ["selectedChange", "viewChanged", "activeDateChange"] }, { kind: "component", type: ComIcon, selector: "com-icon", inputs: ["name", "img", "color", "size", "strokeWidth", "absoluteStrokeWidth", "ariaLabel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
3963
3949
|
}
|
|
3964
3950
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ComDatepicker, decorators: [{
|
|
3965
3951
|
type: Component,
|
|
@@ -4002,18 +3988,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
4002
3988
|
[attr.aria-label]="'Clear date'"
|
|
4003
3989
|
(click)="clear($event)"
|
|
4004
3990
|
>
|
|
4005
|
-
<
|
|
4006
|
-
viewBox="0 0 24 24"
|
|
4007
|
-
fill="none"
|
|
4008
|
-
stroke="currentColor"
|
|
4009
|
-
stroke-width="2"
|
|
4010
|
-
stroke-linecap="round"
|
|
4011
|
-
stroke-linejoin="round"
|
|
4012
|
-
class="h-full w-full"
|
|
4013
|
-
>
|
|
4014
|
-
<line x1="18" y1="6" x2="6" y2="18" />
|
|
4015
|
-
<line x1="6" y1="6" x2="18" y2="18" />
|
|
4016
|
-
</svg>
|
|
3991
|
+
<com-icon name="x" [size]="iconSize()" />
|
|
4017
3992
|
</button>
|
|
4018
3993
|
}
|
|
4019
3994
|
|
|
@@ -4025,20 +4000,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
4025
4000
|
[disabled]="disabled()"
|
|
4026
4001
|
tabindex="-1"
|
|
4027
4002
|
>
|
|
4028
|
-
<
|
|
4029
|
-
viewBox="0 0 24 24"
|
|
4030
|
-
fill="none"
|
|
4031
|
-
stroke="currentColor"
|
|
4032
|
-
stroke-width="2"
|
|
4033
|
-
stroke-linecap="round"
|
|
4034
|
-
stroke-linejoin="round"
|
|
4035
|
-
class="h-full w-full"
|
|
4036
|
-
>
|
|
4037
|
-
<rect x="3" y="4" width="18" height="18" rx="2" ry="2" />
|
|
4038
|
-
<line x1="16" y1="2" x2="16" y2="6" />
|
|
4039
|
-
<line x1="8" y1="2" x2="8" y2="6" />
|
|
4040
|
-
<line x1="3" y1="10" x2="21" y2="10" />
|
|
4041
|
-
</svg>
|
|
4003
|
+
<com-icon name="calendar" [size]="iconSize()" />
|
|
4042
4004
|
</button>
|
|
4043
4005
|
</div>
|
|
4044
4006
|
|
|
@@ -4100,6 +4062,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
4100
4062
|
OverlayModule,
|
|
4101
4063
|
A11yModule,
|
|
4102
4064
|
ComCalendar,
|
|
4065
|
+
ComIcon,
|
|
4103
4066
|
], providers: [
|
|
4104
4067
|
SingleSelectionStrategy,
|
|
4105
4068
|
{ provide: CALENDAR_SELECTION_STRATEGY, useExisting: SingleSelectionStrategy },
|
|
@@ -4246,6 +4209,15 @@ class ComDateRangePicker {
|
|
|
4246
4209
|
const value = this.internalValue();
|
|
4247
4210
|
return value !== null && (value.start !== null || value.end !== null);
|
|
4248
4211
|
}, ...(ngDevMode ? [{ debugName: "hasValue" }] : []));
|
|
4212
|
+
/** Icon size based on datepicker size. */
|
|
4213
|
+
iconSize = computed(() => {
|
|
4214
|
+
const sizeMap = {
|
|
4215
|
+
sm: 'sm',
|
|
4216
|
+
default: 'md',
|
|
4217
|
+
lg: 'lg',
|
|
4218
|
+
};
|
|
4219
|
+
return sizeMap[this.size()];
|
|
4220
|
+
}, ...(ngDevMode ? [{ debugName: "iconSize" }] : []));
|
|
4249
4221
|
/** Calendar selection (converts DateRangeValue to DateRange for calendar). */
|
|
4250
4222
|
calendarSelection = computed(() => {
|
|
4251
4223
|
const value = this.internalValue();
|
|
@@ -4708,18 +4680,7 @@ class ComDateRangePicker {
|
|
|
4708
4680
|
|
|
4709
4681
|
<!-- Range separator -->
|
|
4710
4682
|
<span [class]="separatorClasses()">
|
|
4711
|
-
<
|
|
4712
|
-
viewBox="0 0 24 24"
|
|
4713
|
-
fill="none"
|
|
4714
|
-
stroke="currentColor"
|
|
4715
|
-
stroke-width="2"
|
|
4716
|
-
stroke-linecap="round"
|
|
4717
|
-
stroke-linejoin="round"
|
|
4718
|
-
class="h-4 w-4"
|
|
4719
|
-
>
|
|
4720
|
-
<line x1="5" y1="12" x2="19" y2="12" />
|
|
4721
|
-
<polyline points="12 5 19 12 12 19" />
|
|
4722
|
-
</svg>
|
|
4683
|
+
<com-icon name="arrow-right" [size]="iconSize()" />
|
|
4723
4684
|
</span>
|
|
4724
4685
|
|
|
4725
4686
|
<!-- End date input -->
|
|
@@ -4748,18 +4709,7 @@ class ComDateRangePicker {
|
|
|
4748
4709
|
[attr.aria-label]="'Clear date range'"
|
|
4749
4710
|
(click)="clear($event)"
|
|
4750
4711
|
>
|
|
4751
|
-
<
|
|
4752
|
-
viewBox="0 0 24 24"
|
|
4753
|
-
fill="none"
|
|
4754
|
-
stroke="currentColor"
|
|
4755
|
-
stroke-width="2"
|
|
4756
|
-
stroke-linecap="round"
|
|
4757
|
-
stroke-linejoin="round"
|
|
4758
|
-
class="h-full w-full"
|
|
4759
|
-
>
|
|
4760
|
-
<line x1="18" y1="6" x2="6" y2="18" />
|
|
4761
|
-
<line x1="6" y1="6" x2="18" y2="18" />
|
|
4762
|
-
</svg>
|
|
4712
|
+
<com-icon name="x" [size]="iconSize()" />
|
|
4763
4713
|
</button>
|
|
4764
4714
|
}
|
|
4765
4715
|
|
|
@@ -4771,20 +4721,7 @@ class ComDateRangePicker {
|
|
|
4771
4721
|
[disabled]="disabled()"
|
|
4772
4722
|
tabindex="-1"
|
|
4773
4723
|
>
|
|
4774
|
-
<
|
|
4775
|
-
viewBox="0 0 24 24"
|
|
4776
|
-
fill="none"
|
|
4777
|
-
stroke="currentColor"
|
|
4778
|
-
stroke-width="2"
|
|
4779
|
-
stroke-linecap="round"
|
|
4780
|
-
stroke-linejoin="round"
|
|
4781
|
-
class="h-full w-full"
|
|
4782
|
-
>
|
|
4783
|
-
<rect x="3" y="4" width="18" height="18" rx="2" ry="2" />
|
|
4784
|
-
<line x1="16" y1="2" x2="16" y2="6" />
|
|
4785
|
-
<line x1="8" y1="2" x2="8" y2="6" />
|
|
4786
|
-
<line x1="3" y1="10" x2="21" y2="10" />
|
|
4787
|
-
</svg>
|
|
4724
|
+
<com-icon name="calendar" [size]="iconSize()" />
|
|
4788
4725
|
</button>
|
|
4789
4726
|
</div>
|
|
4790
4727
|
|
|
@@ -4843,7 +4780,7 @@ class ComDateRangePicker {
|
|
|
4843
4780
|
<div class="sr-only" aria-live="polite" aria-atomic="true">
|
|
4844
4781
|
{{ liveAnnouncement() }}
|
|
4845
4782
|
</div>
|
|
4846
|
-
`, isInline: true, styles: [".sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}\n"], dependencies: [{ kind: "ngmodule", type: OverlayModule }, { kind: "ngmodule", type: A11yModule }, { kind: "directive", type: i1.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }, { kind: "component", type: ComCalendar, selector: "com-calendar", inputs: ["activeDate", "selected", "minDate", "maxDate", "dateFilter", "dateClass", "bordered", "startView", "firstDayOfWeek", "monthColumns", "cellTemplate"], outputs: ["selectedChange", "viewChanged", "activeDateChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4783
|
+
`, isInline: true, styles: [".sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}\n"], dependencies: [{ kind: "ngmodule", type: OverlayModule }, { kind: "ngmodule", type: A11yModule }, { kind: "directive", type: i1.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }, { kind: "component", type: ComCalendar, selector: "com-calendar", inputs: ["activeDate", "selected", "minDate", "maxDate", "dateFilter", "dateClass", "bordered", "startView", "firstDayOfWeek", "monthColumns", "cellTemplate"], outputs: ["selectedChange", "viewChanged", "activeDateChange"] }, { kind: "component", type: ComIcon, selector: "com-icon", inputs: ["name", "img", "color", "size", "strokeWidth", "absoluteStrokeWidth", "ariaLabel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
4847
4784
|
}
|
|
4848
4785
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ComDateRangePicker, decorators: [{
|
|
4849
4786
|
type: Component,
|
|
@@ -4880,18 +4817,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
4880
4817
|
|
|
4881
4818
|
<!-- Range separator -->
|
|
4882
4819
|
<span [class]="separatorClasses()">
|
|
4883
|
-
<
|
|
4884
|
-
viewBox="0 0 24 24"
|
|
4885
|
-
fill="none"
|
|
4886
|
-
stroke="currentColor"
|
|
4887
|
-
stroke-width="2"
|
|
4888
|
-
stroke-linecap="round"
|
|
4889
|
-
stroke-linejoin="round"
|
|
4890
|
-
class="h-4 w-4"
|
|
4891
|
-
>
|
|
4892
|
-
<line x1="5" y1="12" x2="19" y2="12" />
|
|
4893
|
-
<polyline points="12 5 19 12 12 19" />
|
|
4894
|
-
</svg>
|
|
4820
|
+
<com-icon name="arrow-right" [size]="iconSize()" />
|
|
4895
4821
|
</span>
|
|
4896
4822
|
|
|
4897
4823
|
<!-- End date input -->
|
|
@@ -4920,18 +4846,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
4920
4846
|
[attr.aria-label]="'Clear date range'"
|
|
4921
4847
|
(click)="clear($event)"
|
|
4922
4848
|
>
|
|
4923
|
-
<
|
|
4924
|
-
viewBox="0 0 24 24"
|
|
4925
|
-
fill="none"
|
|
4926
|
-
stroke="currentColor"
|
|
4927
|
-
stroke-width="2"
|
|
4928
|
-
stroke-linecap="round"
|
|
4929
|
-
stroke-linejoin="round"
|
|
4930
|
-
class="h-full w-full"
|
|
4931
|
-
>
|
|
4932
|
-
<line x1="18" y1="6" x2="6" y2="18" />
|
|
4933
|
-
<line x1="6" y1="6" x2="18" y2="18" />
|
|
4934
|
-
</svg>
|
|
4849
|
+
<com-icon name="x" [size]="iconSize()" />
|
|
4935
4850
|
</button>
|
|
4936
4851
|
}
|
|
4937
4852
|
|
|
@@ -4943,20 +4858,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
4943
4858
|
[disabled]="disabled()"
|
|
4944
4859
|
tabindex="-1"
|
|
4945
4860
|
>
|
|
4946
|
-
<
|
|
4947
|
-
viewBox="0 0 24 24"
|
|
4948
|
-
fill="none"
|
|
4949
|
-
stroke="currentColor"
|
|
4950
|
-
stroke-width="2"
|
|
4951
|
-
stroke-linecap="round"
|
|
4952
|
-
stroke-linejoin="round"
|
|
4953
|
-
class="h-full w-full"
|
|
4954
|
-
>
|
|
4955
|
-
<rect x="3" y="4" width="18" height="18" rx="2" ry="2" />
|
|
4956
|
-
<line x1="16" y1="2" x2="16" y2="6" />
|
|
4957
|
-
<line x1="8" y1="2" x2="8" y2="6" />
|
|
4958
|
-
<line x1="3" y1="10" x2="21" y2="10" />
|
|
4959
|
-
</svg>
|
|
4861
|
+
<com-icon name="calendar" [size]="iconSize()" />
|
|
4960
4862
|
</button>
|
|
4961
4863
|
</div>
|
|
4962
4864
|
|
|
@@ -5019,6 +4921,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
5019
4921
|
OverlayModule,
|
|
5020
4922
|
A11yModule,
|
|
5021
4923
|
ComCalendar,
|
|
4924
|
+
ComIcon,
|
|
5022
4925
|
], providers: [
|
|
5023
4926
|
RangeSelectionStrategy,
|
|
5024
4927
|
{ provide: CALENDAR_SELECTION_STRATEGY, useExisting: RangeSelectionStrategy },
|