cerxos-ui 0.0.21 → 0.0.23
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 +3 -11
- package/fesm2022/cerxos-ui.mjs +223 -5
- package/fesm2022/cerxos-ui.mjs.map +1 -1
- package/package.json +5 -1
- package/types/cerxos-ui.d.ts +55 -2
package/README.md
CHANGED
|
@@ -28,17 +28,9 @@ This command will compile your project, and the build artifacts will be placed i
|
|
|
28
28
|
|
|
29
29
|
### Publishing the Library
|
|
30
30
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
```bash
|
|
35
|
-
cd dist/cerxos-ui
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
2. Run the `npm publish` command to publish your library to the npm registry:
|
|
39
|
-
```bash
|
|
40
|
-
npm publish
|
|
41
|
-
```
|
|
31
|
+
Publishing is triggered by a maintainer-pushed version tag. Follow the
|
|
32
|
+
[workspace release instructions](https://github.com/nurakmaljalil91/cerxos-ui-workspace#publishing-cerxos-ui) for the
|
|
33
|
+
version, tag, npm trusted publisher setup, and verification steps.
|
|
42
34
|
|
|
43
35
|
## Running unit tests
|
|
44
36
|
|
package/fesm2022/cerxos-ui.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Component, EventEmitter, ElementRef, HostListener, ViewChildren, ViewChild, Output, Input, ChangeDetectionStrategy, Attribute, forwardRef, Directive, ContentChildren,
|
|
2
|
+
import { Component, EventEmitter, ElementRef, HostListener, ViewChildren, ViewChild, Output, Input, ChangeDetectionStrategy, Attribute, inject, ChangeDetectorRef, forwardRef, Directive, ContentChildren, ContentChild, HostBinding, signal, Injectable, Pipe } from '@angular/core';
|
|
3
3
|
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
4
4
|
import * as i1 from '@angular/common';
|
|
5
5
|
import { NgTemplateOutlet, CommonModule } from '@angular/common';
|
|
@@ -975,6 +975,7 @@ const MARK_SIZE_CLASSES = {
|
|
|
975
975
|
lg: 'after:h-3 after:w-2 before:h-0.5 before:w-4'
|
|
976
976
|
};
|
|
977
977
|
class CxsCheckboxComponent {
|
|
978
|
+
changeDetector = inject(ChangeDetectorRef);
|
|
978
979
|
checked = false;
|
|
979
980
|
indeterminate = false;
|
|
980
981
|
disabled = false;
|
|
@@ -1020,6 +1021,7 @@ class CxsCheckboxComponent {
|
|
|
1020
1021
|
}
|
|
1021
1022
|
writeValue(value) {
|
|
1022
1023
|
this.checked = value ?? false;
|
|
1024
|
+
this.changeDetector.markForCheck();
|
|
1023
1025
|
}
|
|
1024
1026
|
registerOnChange(fn) {
|
|
1025
1027
|
this.onChange = fn;
|
|
@@ -1029,6 +1031,7 @@ class CxsCheckboxComponent {
|
|
|
1029
1031
|
}
|
|
1030
1032
|
setDisabledState(isDisabled) {
|
|
1031
1033
|
this.disabledFromControl = isDisabled;
|
|
1034
|
+
this.changeDetector.markForCheck();
|
|
1032
1035
|
}
|
|
1033
1036
|
onCheckboxChange(event) {
|
|
1034
1037
|
const target = event.target;
|
|
@@ -1269,7 +1272,7 @@ const BODY_ROW_BASE_CLASSES$1 = 'border-b border-[var(--cxs-color-border)] last:
|
|
|
1269
1272
|
const BODY_ROW_STRIPED_CLASSES$1 = 'odd:bg-[var(--cxs-color-surface)] even:bg-[var(--cxs-color-surface-hover)]';
|
|
1270
1273
|
const BODY_CELL_BASE_CLASSES$1 = 'px-3 py-2 align-top';
|
|
1271
1274
|
const BODY_CELL_COMPACT_CLASSES$1 = 'px-2 py-1.5';
|
|
1272
|
-
const ALIGN_CLASSES$
|
|
1275
|
+
const ALIGN_CLASSES$2 = {
|
|
1273
1276
|
left: 'text-left',
|
|
1274
1277
|
center: 'text-center',
|
|
1275
1278
|
right: 'text-right'
|
|
@@ -1498,7 +1501,7 @@ class CxsDataTableComponent {
|
|
|
1498
1501
|
return [
|
|
1499
1502
|
HEADER_CELL_BASE_CLASSES$1,
|
|
1500
1503
|
this.columnBorders ? COLUMN_BORDER_CLASSES : '',
|
|
1501
|
-
ALIGN_CLASSES$
|
|
1504
|
+
ALIGN_CLASSES$2[column.align ?? 'left'],
|
|
1502
1505
|
column.headerClass ?? ''
|
|
1503
1506
|
]
|
|
1504
1507
|
.filter(Boolean)
|
|
@@ -1515,7 +1518,7 @@ class CxsDataTableComponent {
|
|
|
1515
1518
|
BODY_CELL_BASE_CLASSES$1,
|
|
1516
1519
|
this.compact ? BODY_CELL_COMPACT_CLASSES$1 : '',
|
|
1517
1520
|
this.columnBorders ? COLUMN_BORDER_CLASSES : '',
|
|
1518
|
-
ALIGN_CLASSES$
|
|
1521
|
+
ALIGN_CLASSES$2[column.align ?? 'left'],
|
|
1519
1522
|
column.cellClass ?? ''
|
|
1520
1523
|
]
|
|
1521
1524
|
.filter(Boolean)
|
|
@@ -2075,6 +2078,7 @@ const DAY_TODAY = 'border border-[var(--cxs-color-primary)]';
|
|
|
2075
2078
|
const DAY_SELECTED = 'bg-[var(--cxs-color-primary)] text-[var(--cxs-color-on-primary)]';
|
|
2076
2079
|
const DAY_HOVER = 'hover:bg-[var(--cxs-color-surface-hover)]';
|
|
2077
2080
|
class CxsDatepickerComponent {
|
|
2081
|
+
changeDetector = inject(ChangeDetectorRef);
|
|
2078
2082
|
static nextId = 0;
|
|
2079
2083
|
value = '';
|
|
2080
2084
|
variant = 'outline';
|
|
@@ -2175,6 +2179,7 @@ class CxsDatepickerComponent {
|
|
|
2175
2179
|
writeValue(value) {
|
|
2176
2180
|
this.value = value ?? '';
|
|
2177
2181
|
this.syncDisplayMonthWithValue();
|
|
2182
|
+
this.changeDetector.markForCheck();
|
|
2178
2183
|
}
|
|
2179
2184
|
registerOnChange(fn) {
|
|
2180
2185
|
this.onChange = fn;
|
|
@@ -2184,6 +2189,7 @@ class CxsDatepickerComponent {
|
|
|
2184
2189
|
}
|
|
2185
2190
|
setDisabledState(isDisabled) {
|
|
2186
2191
|
this.disabledFromControl = isDisabled;
|
|
2192
|
+
this.changeDetector.markForCheck();
|
|
2187
2193
|
}
|
|
2188
2194
|
onInput(event) {
|
|
2189
2195
|
const target = event.target;
|
|
@@ -2633,6 +2639,203 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImpo
|
|
|
2633
2639
|
type: Output
|
|
2634
2640
|
}] } });
|
|
2635
2641
|
|
|
2642
|
+
const CONTENT_BASE_CLASSES = 'absolute z-50 w-80 max-w-[calc(100vw-2rem)] rounded-[var(--cxs-radius-md)] ' +
|
|
2643
|
+
'border border-[var(--cxs-color-border)] bg-[var(--cxs-color-surface)] p-4 ' +
|
|
2644
|
+
'text-sm text-[var(--cxs-color-on-surface)] shadow-[var(--cxs-shadow-sm)]';
|
|
2645
|
+
const SIDE_CLASSES = {
|
|
2646
|
+
top: 'bottom-full mb-2',
|
|
2647
|
+
right: 'left-full ml-2',
|
|
2648
|
+
bottom: 'top-full mt-2',
|
|
2649
|
+
left: 'right-full mr-2'
|
|
2650
|
+
};
|
|
2651
|
+
const ALIGN_CLASSES$1 = {
|
|
2652
|
+
top: { start: 'left-0', center: 'left-1/2 -translate-x-1/2', end: 'right-0' },
|
|
2653
|
+
bottom: { start: 'left-0', center: 'left-1/2 -translate-x-1/2', end: 'right-0' },
|
|
2654
|
+
left: { start: 'top-0', center: 'top-1/2 -translate-y-1/2', end: 'bottom-0' },
|
|
2655
|
+
right: { start: 'top-0', center: 'top-1/2 -translate-y-1/2', end: 'bottom-0' }
|
|
2656
|
+
};
|
|
2657
|
+
class CxsHoverCardComponent {
|
|
2658
|
+
static nextId = 0;
|
|
2659
|
+
openDelay = 200;
|
|
2660
|
+
closeDelay = 200;
|
|
2661
|
+
trigger;
|
|
2662
|
+
contentId = `cxs-hover-card-${CxsHoverCardComponent.nextId++}`;
|
|
2663
|
+
open = false;
|
|
2664
|
+
host = inject((ElementRef));
|
|
2665
|
+
changeDetector = inject(ChangeDetectorRef);
|
|
2666
|
+
openTimer;
|
|
2667
|
+
closeTimer;
|
|
2668
|
+
pointerInside = false;
|
|
2669
|
+
focusInside = false;
|
|
2670
|
+
suppressFocusOpen = false;
|
|
2671
|
+
onMouseEnter() {
|
|
2672
|
+
this.pointerInside = true;
|
|
2673
|
+
this.scheduleOpen();
|
|
2674
|
+
}
|
|
2675
|
+
onMouseLeave() {
|
|
2676
|
+
this.pointerInside = false;
|
|
2677
|
+
if (!this.focusInside) {
|
|
2678
|
+
this.scheduleClose();
|
|
2679
|
+
}
|
|
2680
|
+
}
|
|
2681
|
+
onFocusIn() {
|
|
2682
|
+
this.focusInside = true;
|
|
2683
|
+
if (this.suppressFocusOpen) {
|
|
2684
|
+
this.suppressFocusOpen = false;
|
|
2685
|
+
return;
|
|
2686
|
+
}
|
|
2687
|
+
this.cancelOpen();
|
|
2688
|
+
this.cancelClose();
|
|
2689
|
+
this.setOpen(true);
|
|
2690
|
+
}
|
|
2691
|
+
onFocusOut(event) {
|
|
2692
|
+
if (event.relatedTarget && this.host.nativeElement.contains(event.relatedTarget)) {
|
|
2693
|
+
return;
|
|
2694
|
+
}
|
|
2695
|
+
this.focusInside = false;
|
|
2696
|
+
this.suppressFocusOpen = false;
|
|
2697
|
+
if (!this.pointerInside) {
|
|
2698
|
+
this.scheduleClose();
|
|
2699
|
+
}
|
|
2700
|
+
}
|
|
2701
|
+
onKeydown(event) {
|
|
2702
|
+
if (event.key === 'Escape' && this.open) {
|
|
2703
|
+
event.preventDefault();
|
|
2704
|
+
this.cancelOpen();
|
|
2705
|
+
this.cancelClose();
|
|
2706
|
+
this.setOpen(false);
|
|
2707
|
+
const trigger = this.trigger?.element.nativeElement;
|
|
2708
|
+
if (trigger && !trigger.contains(event.target)) {
|
|
2709
|
+
this.suppressFocusOpen = true;
|
|
2710
|
+
trigger.focus();
|
|
2711
|
+
}
|
|
2712
|
+
}
|
|
2713
|
+
}
|
|
2714
|
+
ngOnDestroy() {
|
|
2715
|
+
this.cancelOpen();
|
|
2716
|
+
this.cancelClose();
|
|
2717
|
+
}
|
|
2718
|
+
scheduleOpen() {
|
|
2719
|
+
this.cancelClose();
|
|
2720
|
+
if (this.open || this.openTimer) {
|
|
2721
|
+
return;
|
|
2722
|
+
}
|
|
2723
|
+
this.openTimer = setTimeout(() => {
|
|
2724
|
+
this.openTimer = undefined;
|
|
2725
|
+
this.setOpen(true);
|
|
2726
|
+
}, Math.max(0, this.openDelay));
|
|
2727
|
+
}
|
|
2728
|
+
scheduleClose() {
|
|
2729
|
+
this.cancelOpen();
|
|
2730
|
+
if (!this.open || this.closeTimer) {
|
|
2731
|
+
return;
|
|
2732
|
+
}
|
|
2733
|
+
this.closeTimer = setTimeout(() => {
|
|
2734
|
+
this.closeTimer = undefined;
|
|
2735
|
+
this.setOpen(false);
|
|
2736
|
+
}, Math.max(0, this.closeDelay));
|
|
2737
|
+
}
|
|
2738
|
+
cancelOpen() {
|
|
2739
|
+
clearTimeout(this.openTimer);
|
|
2740
|
+
this.openTimer = undefined;
|
|
2741
|
+
}
|
|
2742
|
+
cancelClose() {
|
|
2743
|
+
clearTimeout(this.closeTimer);
|
|
2744
|
+
this.closeTimer = undefined;
|
|
2745
|
+
}
|
|
2746
|
+
setOpen(open) {
|
|
2747
|
+
this.open = open;
|
|
2748
|
+
this.changeDetector.markForCheck();
|
|
2749
|
+
}
|
|
2750
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: CxsHoverCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2751
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.10", type: CxsHoverCardComponent, isStandalone: true, selector: "cxs-hover-card", inputs: { openDelay: "openDelay", closeDelay: "closeDelay" }, host: { listeners: { "mouseenter": "onMouseEnter()", "mouseleave": "onMouseLeave()", "focusin": "onFocusIn()", "focusout": "onFocusOut($event)", "keydown": "onKeydown($event)" }, classAttribute: "relative inline-flex" }, queries: [{ propertyName: "trigger", first: true, predicate: i0.forwardRef(() => CxsHoverCardTriggerDirective), descendants: true }], ngImport: i0, template: "<ng-content select=\"[cxsHoverCardTrigger]\"></ng-content>\n<ng-content select=\"[cxsHoverCardContent]\"></ng-content>\n", changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
2752
|
+
}
|
|
2753
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: CxsHoverCardComponent, decorators: [{
|
|
2754
|
+
type: Component,
|
|
2755
|
+
args: [{ selector: 'cxs-hover-card', standalone: true, host: { class: 'relative inline-flex' }, changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-content select=\"[cxsHoverCardTrigger]\"></ng-content>\n<ng-content select=\"[cxsHoverCardContent]\"></ng-content>\n" }]
|
|
2756
|
+
}], propDecorators: { openDelay: [{
|
|
2757
|
+
type: Input
|
|
2758
|
+
}], closeDelay: [{
|
|
2759
|
+
type: Input
|
|
2760
|
+
}], trigger: [{
|
|
2761
|
+
type: ContentChild,
|
|
2762
|
+
args: [forwardRef(() => CxsHoverCardTriggerDirective)]
|
|
2763
|
+
}], onMouseEnter: [{
|
|
2764
|
+
type: HostListener,
|
|
2765
|
+
args: ['mouseenter']
|
|
2766
|
+
}], onMouseLeave: [{
|
|
2767
|
+
type: HostListener,
|
|
2768
|
+
args: ['mouseleave']
|
|
2769
|
+
}], onFocusIn: [{
|
|
2770
|
+
type: HostListener,
|
|
2771
|
+
args: ['focusin']
|
|
2772
|
+
}], onFocusOut: [{
|
|
2773
|
+
type: HostListener,
|
|
2774
|
+
args: ['focusout', ['$event']]
|
|
2775
|
+
}], onKeydown: [{
|
|
2776
|
+
type: HostListener,
|
|
2777
|
+
args: ['keydown', ['$event']]
|
|
2778
|
+
}] } });
|
|
2779
|
+
class CxsHoverCardTriggerDirective {
|
|
2780
|
+
card = inject(CxsHoverCardComponent);
|
|
2781
|
+
element = inject((ElementRef));
|
|
2782
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: CxsHoverCardTriggerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
2783
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.10", type: CxsHoverCardTriggerDirective, isStandalone: true, selector: "[cxsHoverCardTrigger]", host: { properties: { "attr.aria-haspopup": "\"dialog\"", "attr.aria-expanded": "card.open", "attr.aria-controls": "card.contentId" }, classAttribute: "focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-[var(--cxs-color-focus)]" }, ngImport: i0 });
|
|
2784
|
+
}
|
|
2785
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: CxsHoverCardTriggerDirective, decorators: [{
|
|
2786
|
+
type: Directive,
|
|
2787
|
+
args: [{
|
|
2788
|
+
selector: '[cxsHoverCardTrigger]',
|
|
2789
|
+
standalone: true,
|
|
2790
|
+
host: {
|
|
2791
|
+
class: 'focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 ' +
|
|
2792
|
+
'focus-visible:outline-[var(--cxs-color-focus)]',
|
|
2793
|
+
'[attr.aria-haspopup]': '"dialog"',
|
|
2794
|
+
'[attr.aria-expanded]': 'card.open',
|
|
2795
|
+
'[attr.aria-controls]': 'card.contentId'
|
|
2796
|
+
}
|
|
2797
|
+
}]
|
|
2798
|
+
}] });
|
|
2799
|
+
class CxsHoverCardContentDirective {
|
|
2800
|
+
side = 'bottom';
|
|
2801
|
+
align = 'center';
|
|
2802
|
+
ariaLabel = 'Preview';
|
|
2803
|
+
card = inject(CxsHoverCardComponent);
|
|
2804
|
+
get contentClass() {
|
|
2805
|
+
return [
|
|
2806
|
+
CONTENT_BASE_CLASSES,
|
|
2807
|
+
SIDE_CLASSES[this.side],
|
|
2808
|
+
ALIGN_CLASSES$1[this.side][this.align],
|
|
2809
|
+
this.card.open ? '' : 'hidden'
|
|
2810
|
+
]
|
|
2811
|
+
.filter(Boolean)
|
|
2812
|
+
.join(' ');
|
|
2813
|
+
}
|
|
2814
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: CxsHoverCardContentDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
2815
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.10", type: CxsHoverCardContentDirective, isStandalone: true, selector: "[cxsHoverCardContent]", inputs: { side: "side", align: "align", ariaLabel: "ariaLabel" }, host: { properties: { "class": "contentClass", "attr.id": "card.contentId", "attr.role": "\"dialog\"", "attr.aria-label": "ariaLabel", "attr.aria-hidden": "card.open ? null : \"true\"", "attr.hidden": "card.open ? null : \"\"" } }, ngImport: i0 });
|
|
2816
|
+
}
|
|
2817
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImport: i0, type: CxsHoverCardContentDirective, decorators: [{
|
|
2818
|
+
type: Directive,
|
|
2819
|
+
args: [{
|
|
2820
|
+
selector: '[cxsHoverCardContent]',
|
|
2821
|
+
standalone: true,
|
|
2822
|
+
host: {
|
|
2823
|
+
'[class]': 'contentClass',
|
|
2824
|
+
'[attr.id]': 'card.contentId',
|
|
2825
|
+
'[attr.role]': '"dialog"',
|
|
2826
|
+
'[attr.aria-label]': 'ariaLabel',
|
|
2827
|
+
'[attr.aria-hidden]': 'card.open ? null : "true"',
|
|
2828
|
+
'[attr.hidden]': 'card.open ? null : ""'
|
|
2829
|
+
}
|
|
2830
|
+
}]
|
|
2831
|
+
}], propDecorators: { side: [{
|
|
2832
|
+
type: Input
|
|
2833
|
+
}], align: [{
|
|
2834
|
+
type: Input
|
|
2835
|
+
}], ariaLabel: [{
|
|
2836
|
+
type: Input
|
|
2837
|
+
}] } });
|
|
2838
|
+
|
|
2636
2839
|
const BASE_CLASSES$3 = 'w-full rounded-[var(--cxs-radius-md)] border border-[var(--cxs-color-border)] ' +
|
|
2637
2840
|
'bg-[var(--cxs-color-surface)] text-[var(--cxs-color-on-surface)] ' +
|
|
2638
2841
|
'placeholder:text-[var(--cxs-color-on-surface-muted)] transition-colors ' +
|
|
@@ -2665,6 +2868,7 @@ const ERROR_SIZE_CLASSES = {
|
|
|
2665
2868
|
const INVALID_CLASSES$3 = 'border-[var(--cxs-color-danger)] focus-visible:border-[var(--cxs-color-danger)] ' +
|
|
2666
2869
|
'focus-visible:outline-[var(--cxs-color-danger)]';
|
|
2667
2870
|
class CxsInputComponent {
|
|
2871
|
+
changeDetector = inject(ChangeDetectorRef);
|
|
2668
2872
|
static nextId = 0;
|
|
2669
2873
|
value = '';
|
|
2670
2874
|
type = 'text';
|
|
@@ -2747,6 +2951,7 @@ class CxsInputComponent {
|
|
|
2747
2951
|
}
|
|
2748
2952
|
writeValue(value) {
|
|
2749
2953
|
this.value = value ?? '';
|
|
2954
|
+
this.changeDetector.markForCheck();
|
|
2750
2955
|
}
|
|
2751
2956
|
registerOnChange(fn) {
|
|
2752
2957
|
this.onChange = fn;
|
|
@@ -2756,6 +2961,7 @@ class CxsInputComponent {
|
|
|
2756
2961
|
}
|
|
2757
2962
|
setDisabledState(isDisabled) {
|
|
2758
2963
|
this.disabledFromControl = isDisabled;
|
|
2964
|
+
this.changeDetector.markForCheck();
|
|
2759
2965
|
}
|
|
2760
2966
|
onInput(event) {
|
|
2761
2967
|
const target = event.target;
|
|
@@ -3008,6 +3214,7 @@ const INVALID_CLASSES$2 = 'border-[var(--cxs-color-danger)] focus-within:border-
|
|
|
3008
3214
|
'focus-within:outline-[var(--cxs-color-danger)]';
|
|
3009
3215
|
class CxsMultiSelectComponent {
|
|
3010
3216
|
elementRef;
|
|
3217
|
+
changeDetector = inject(ChangeDetectorRef);
|
|
3011
3218
|
static nextId = 0;
|
|
3012
3219
|
options = [];
|
|
3013
3220
|
value = [];
|
|
@@ -3124,6 +3331,7 @@ class CxsMultiSelectComponent {
|
|
|
3124
3331
|
}
|
|
3125
3332
|
writeValue(value) {
|
|
3126
3333
|
this.value = value ? [...value] : [];
|
|
3334
|
+
this.changeDetector.markForCheck();
|
|
3127
3335
|
}
|
|
3128
3336
|
registerOnChange(fn) {
|
|
3129
3337
|
this.onChange = fn;
|
|
@@ -3133,6 +3341,7 @@ class CxsMultiSelectComponent {
|
|
|
3133
3341
|
}
|
|
3134
3342
|
setDisabledState(isDisabled) {
|
|
3135
3343
|
this.disabledFromControl = isDisabled;
|
|
3344
|
+
this.changeDetector.markForCheck();
|
|
3136
3345
|
}
|
|
3137
3346
|
focusInput() {
|
|
3138
3347
|
if (this.isDisabled || this.readonly) {
|
|
@@ -3554,6 +3763,7 @@ const DOT_SIZE_CLASSES = {
|
|
|
3554
3763
|
const INVALID_CLASSES$1 = 'border-[var(--cxs-color-danger)] peer-checked:border-[var(--cxs-color-danger)] ' +
|
|
3555
3764
|
'after:bg-[var(--cxs-color-danger)]';
|
|
3556
3765
|
class CxsRadioComponent {
|
|
3766
|
+
changeDetector = inject(ChangeDetectorRef);
|
|
3557
3767
|
value = '';
|
|
3558
3768
|
name;
|
|
3559
3769
|
variant = 'primary';
|
|
@@ -3604,6 +3814,7 @@ class CxsRadioComponent {
|
|
|
3604
3814
|
}
|
|
3605
3815
|
writeValue(value) {
|
|
3606
3816
|
this.selectedValue = value ?? null;
|
|
3817
|
+
this.changeDetector.markForCheck();
|
|
3607
3818
|
}
|
|
3608
3819
|
registerOnChange(fn) {
|
|
3609
3820
|
this.onChange = fn;
|
|
@@ -3613,6 +3824,7 @@ class CxsRadioComponent {
|
|
|
3613
3824
|
}
|
|
3614
3825
|
setDisabledState(isDisabled) {
|
|
3615
3826
|
this.disabledFromControl = isDisabled;
|
|
3827
|
+
this.changeDetector.markForCheck();
|
|
3616
3828
|
}
|
|
3617
3829
|
onRadioChange(event) {
|
|
3618
3830
|
const target = event.target;
|
|
@@ -3805,6 +4017,7 @@ const LABEL_SIZE_CLASSES$1 = {
|
|
|
3805
4017
|
const INVALID_CLASSES = 'border-[var(--cxs-color-danger)] focus-visible:border-[var(--cxs-color-danger)] ' +
|
|
3806
4018
|
'focus-visible:outline-[var(--cxs-color-danger)]';
|
|
3807
4019
|
class CxsSelectComponent {
|
|
4020
|
+
changeDetector = inject(ChangeDetectorRef);
|
|
3808
4021
|
static nextId = 0;
|
|
3809
4022
|
value = '';
|
|
3810
4023
|
variant = 'outline';
|
|
@@ -3875,6 +4088,7 @@ class CxsSelectComponent {
|
|
|
3875
4088
|
}
|
|
3876
4089
|
writeValue(value) {
|
|
3877
4090
|
this.value = value ?? '';
|
|
4091
|
+
this.changeDetector.markForCheck();
|
|
3878
4092
|
}
|
|
3879
4093
|
registerOnChange(fn) {
|
|
3880
4094
|
this.onChange = fn;
|
|
@@ -3884,6 +4098,7 @@ class CxsSelectComponent {
|
|
|
3884
4098
|
}
|
|
3885
4099
|
setDisabledState(isDisabled) {
|
|
3886
4100
|
this.disabledFromControl = isDisabled;
|
|
4101
|
+
this.changeDetector.markForCheck();
|
|
3887
4102
|
}
|
|
3888
4103
|
onSelectChange(event) {
|
|
3889
4104
|
const target = event.target;
|
|
@@ -4044,6 +4259,7 @@ const INPUT_VARIANT_CLASSES = {
|
|
|
4044
4259
|
danger: 'cxs-slider--danger'
|
|
4045
4260
|
};
|
|
4046
4261
|
class CxsSliderComponent {
|
|
4262
|
+
changeDetector = inject(ChangeDetectorRef);
|
|
4047
4263
|
static nextId = 0;
|
|
4048
4264
|
value = 0;
|
|
4049
4265
|
min = 0;
|
|
@@ -4140,6 +4356,7 @@ class CxsSliderComponent {
|
|
|
4140
4356
|
}
|
|
4141
4357
|
writeValue(value) {
|
|
4142
4358
|
this.value = value ?? this.normalizedMin;
|
|
4359
|
+
this.changeDetector.markForCheck();
|
|
4143
4360
|
}
|
|
4144
4361
|
registerOnChange(fn) {
|
|
4145
4362
|
this.onChange = fn;
|
|
@@ -4149,6 +4366,7 @@ class CxsSliderComponent {
|
|
|
4149
4366
|
}
|
|
4150
4367
|
setDisabledState(isDisabled) {
|
|
4151
4368
|
this.disabledFromControl = isDisabled;
|
|
4369
|
+
this.changeDetector.markForCheck();
|
|
4152
4370
|
}
|
|
4153
4371
|
onInput(event) {
|
|
4154
4372
|
const target = event.target;
|
|
@@ -4982,5 +5200,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.10", ngImpo
|
|
|
4982
5200
|
* Generated bundle index. Do not edit.
|
|
4983
5201
|
*/
|
|
4984
5202
|
|
|
4985
|
-
export { CXS_USER_PREFERENCE_CHANGED_EVENT, CXS_USER_SESSION_STORAGE_KEY, CerxosUi, CxsAccordionComponent, CxsAccordionItemComponent, CxsActionMenuComponent, CxsAlertComponent, CxsAvatarComponent, CxsBadgeComponent, CxsBreadcrumbComponent, CxsButtonComponent, CxsCardComponent, CxsCarouselComponent, CxsCheckboxComponent, CxsCurrencyPipe, CxsDataTableCellDirective, CxsDataTableComponent, CxsDatePipe, CxsDatepickerComponent, CxsDialogComponent, CxsHabitGridComponent, CxsIconComponent, CxsInputComponent, CxsMenubarComponent, CxsMultiSelectComponent, CxsPreferenceFormattingService, CxsProgressBarComponent, CxsRadioChipGroupComponent, CxsRadioComponent, CxsSelectComponent, CxsSkeletonComponent, CxsSliderComponent, CxsTabLabelDirective, CxsTabPanelComponent, CxsTableComponent, CxsTabsComponent, CxsThemeDirective, CxsToastComponent, CxsToggleComponent, CxsTooltipComponent };
|
|
5203
|
+
export { CXS_USER_PREFERENCE_CHANGED_EVENT, CXS_USER_SESSION_STORAGE_KEY, CerxosUi, CxsAccordionComponent, CxsAccordionItemComponent, CxsActionMenuComponent, CxsAlertComponent, CxsAvatarComponent, CxsBadgeComponent, CxsBreadcrumbComponent, CxsButtonComponent, CxsCardComponent, CxsCarouselComponent, CxsCheckboxComponent, CxsCurrencyPipe, CxsDataTableCellDirective, CxsDataTableComponent, CxsDatePipe, CxsDatepickerComponent, CxsDialogComponent, CxsHabitGridComponent, CxsHoverCardComponent, CxsHoverCardContentDirective, CxsHoverCardTriggerDirective, CxsIconComponent, CxsInputComponent, CxsMenubarComponent, CxsMultiSelectComponent, CxsPreferenceFormattingService, CxsProgressBarComponent, CxsRadioChipGroupComponent, CxsRadioComponent, CxsSelectComponent, CxsSkeletonComponent, CxsSliderComponent, CxsTabLabelDirective, CxsTabPanelComponent, CxsTableComponent, CxsTabsComponent, CxsThemeDirective, CxsToastComponent, CxsToggleComponent, CxsTooltipComponent };
|
|
4986
5204
|
//# sourceMappingURL=cerxos-ui.mjs.map
|