@ardium-ui/ui 5.0.0-alpha.79 → 5.0.0-alpha.80
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.
|
@@ -4583,6 +4583,7 @@ class _BooleanComponentBase extends _NgModelComponentBase {
|
|
|
4583
4583
|
toggleSelected() {
|
|
4584
4584
|
this.selected.update(v => !v);
|
|
4585
4585
|
this._emitChange();
|
|
4586
|
+
this._emitTouched();
|
|
4586
4587
|
}
|
|
4587
4588
|
/**
|
|
4588
4589
|
* Sets the state to "selected". Emits all appropriate events only if the state changes.
|
|
@@ -4590,6 +4591,7 @@ class _BooleanComponentBase extends _NgModelComponentBase {
|
|
|
4590
4591
|
select() {
|
|
4591
4592
|
this.selected.set(true);
|
|
4592
4593
|
this._emitChange();
|
|
4594
|
+
this._emitTouched();
|
|
4593
4595
|
}
|
|
4594
4596
|
/**
|
|
4595
4597
|
* Sets the state to "unselected". Emits all appropriate events only if the state changes.
|
|
@@ -4597,6 +4599,7 @@ class _BooleanComponentBase extends _NgModelComponentBase {
|
|
|
4597
4599
|
unselect() {
|
|
4598
4600
|
this.selected.set(false);
|
|
4599
4601
|
this._emitChange();
|
|
4602
|
+
this._emitTouched();
|
|
4600
4603
|
}
|
|
4601
4604
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: _BooleanComponentBase, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
4602
4605
|
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.15", type: _BooleanComponentBase, isStandalone: true, inputs: { _selected: { classPropertyName: "_selected", publicName: "selected", isSignal: false, isRequired: false, transformFunction: null }, reverseSelected: { classPropertyName: "reverseSelected", publicName: "reverseSelected", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selectEvent: "select", unselectEvent: "unselect", changeEvent: "change", selectedChange: "selectedChange" }, host: { properties: { "attr.selected": "this._selectedHostAttribute", "class.ard-selected": "this._selectedHostAttribute" } }, usesInheritance: true, ngImport: i0 }); }
|
|
@@ -10521,6 +10524,10 @@ class ArdiumRadioComponent extends _FocusableComponentBase {
|
|
|
10521
10524
|
* The event emitter responsible for firing `change` events. Fired when the `selected` state is changed.
|
|
10522
10525
|
*/
|
|
10523
10526
|
this.changeEvent = output({ alias: 'change' });
|
|
10527
|
+
/**
|
|
10528
|
+
* The event emitter responsible for firing `touched` events. Fired when the component is marked as touched (e.g., on blur).
|
|
10529
|
+
*/
|
|
10530
|
+
this.touchedEvent = output({ alias: 'touched' });
|
|
10524
10531
|
//! [(selected)] two-way binding
|
|
10525
10532
|
// can be set using a no-value argument
|
|
10526
10533
|
this.selected = signal(false);
|
|
@@ -10540,12 +10547,15 @@ class ArdiumRadioComponent extends _FocusableComponentBase {
|
|
|
10540
10547
|
*/
|
|
10541
10548
|
_emitChange() {
|
|
10542
10549
|
if (this.selected())
|
|
10543
|
-
this.selectEvent.emit(
|
|
10550
|
+
this.selectEvent.emit();
|
|
10544
10551
|
else
|
|
10545
|
-
this.unselectEvent.emit(
|
|
10552
|
+
this.unselectEvent.emit();
|
|
10546
10553
|
this.selectedChange.emit(this.selected());
|
|
10547
10554
|
this.changeEvent.emit(this.selected());
|
|
10548
10555
|
}
|
|
10556
|
+
_emitTouched() {
|
|
10557
|
+
this.touchedEvent.emit();
|
|
10558
|
+
}
|
|
10549
10559
|
/**
|
|
10550
10560
|
* The selection state of the component. Coercible into a boolean.
|
|
10551
10561
|
*/
|
|
@@ -10561,6 +10571,7 @@ class ArdiumRadioComponent extends _FocusableComponentBase {
|
|
|
10561
10571
|
toggleSelected() {
|
|
10562
10572
|
this.selected.update(v => !v);
|
|
10563
10573
|
this._emitChange();
|
|
10574
|
+
this._emitTouched();
|
|
10564
10575
|
}
|
|
10565
10576
|
/**
|
|
10566
10577
|
* Sets the state to "selected". Emits all appropriate events only if the state changes.
|
|
@@ -10568,6 +10579,7 @@ class ArdiumRadioComponent extends _FocusableComponentBase {
|
|
|
10568
10579
|
select() {
|
|
10569
10580
|
this.selected.set(true);
|
|
10570
10581
|
this._emitChange();
|
|
10582
|
+
this._emitTouched();
|
|
10571
10583
|
}
|
|
10572
10584
|
/**
|
|
10573
10585
|
* Sets the state to "unselected". Emits all appropriate events only if the state changes.
|
|
@@ -10575,6 +10587,7 @@ class ArdiumRadioComponent extends _FocusableComponentBase {
|
|
|
10575
10587
|
unselect() {
|
|
10576
10588
|
this.selected.set(false);
|
|
10577
10589
|
this._emitChange();
|
|
10590
|
+
this._emitTouched();
|
|
10578
10591
|
}
|
|
10579
10592
|
//! event handlers
|
|
10580
10593
|
onMousedown() {
|
|
@@ -10596,7 +10609,7 @@ class ArdiumRadioComponent extends _FocusableComponentBase {
|
|
|
10596
10609
|
this._changeDetector.markForCheck();
|
|
10597
10610
|
}
|
|
10598
10611
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: ArdiumRadioComponent, deps: [{ token: ARD_RADIO_DEFAULTS }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
10599
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.15", type: ArdiumRadioComponent, isStandalone: false, selector: "ard-radio", inputs: { htmlId: { classPropertyName: "htmlId", publicName: "htmlId", isSignal: true, isRequired: false, transformFunction: null }, _selected: { classPropertyName: "_selected", publicName: "selected", isSignal: false, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selectEvent: "select", unselectEvent: "unselect", changeEvent: "change", selectedChange: "selectedChange" }, host: { properties: { "attr.selected": "this._selectedHostAttribute", "class.ard-selected": "this._selectedHostAttribute" } }, usesInheritance: true, ngImport: i0, template: "<button\r\n #focusableElement\r\n class=\"ard-radio\"\r\n type=\"button\"\r\n [ngClass]=\"ngClasses()\"\r\n (focus)=\"onFocus($event)\"\r\n (blur)=\"onBlur($event)\"\r\n (mousedown)=\"onMousedown()\"\r\n (mouseup)=\"onMouseup()\"\r\n [tabindex]=\"tabIndex()\"\r\n>\r\n <div class=\"ard-radio-circles\">\r\n <div class=\"ard-radio-outer-circle\"></div>\r\n <div class=\"ard-radio-inner-circle\"></div>\r\n <div class=\"ard-focus-overlay\"></div>\r\n <div class=\"ard-hitbox\"></div>\r\n </div>\r\n <label [for]=\"htmlId()\">\r\n <ng-content></ng-content>\r\n </label>\r\n</button>\r\n\r\n<input\r\n class=\"ard-radio-input-element\"\r\n type=\"radio\"\r\n [name]=\"name()\"\r\n [id]=\"htmlId()\"\r\n [checked]=\"selected()\"\r\n #radio\r\n/>\r\n", styles: ["@layer ard-ui{ard-radio{display:block}.ard-radio{border:none;background:none}.ard-radio>label{pointer-events:none}ard-radio>.ard-radio-input-element{display:none}}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
10612
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.15", type: ArdiumRadioComponent, isStandalone: false, selector: "ard-radio", inputs: { htmlId: { classPropertyName: "htmlId", publicName: "htmlId", isSignal: true, isRequired: false, transformFunction: null }, _selected: { classPropertyName: "_selected", publicName: "selected", isSignal: false, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selectEvent: "select", unselectEvent: "unselect", changeEvent: "change", touchedEvent: "touched", selectedChange: "selectedChange" }, host: { properties: { "attr.selected": "this._selectedHostAttribute", "class.ard-selected": "this._selectedHostAttribute" } }, usesInheritance: true, ngImport: i0, template: "<button\r\n #focusableElement\r\n class=\"ard-radio\"\r\n type=\"button\"\r\n [ngClass]=\"ngClasses()\"\r\n (focus)=\"onFocus($event)\"\r\n (blur)=\"onBlur($event)\"\r\n (mousedown)=\"onMousedown()\"\r\n (mouseup)=\"onMouseup()\"\r\n [tabindex]=\"tabIndex()\"\r\n>\r\n <div class=\"ard-radio-circles\">\r\n <div class=\"ard-radio-outer-circle\"></div>\r\n <div class=\"ard-radio-inner-circle\"></div>\r\n <div class=\"ard-focus-overlay\"></div>\r\n <div class=\"ard-hitbox\"></div>\r\n </div>\r\n <label [for]=\"htmlId()\">\r\n <ng-content></ng-content>\r\n </label>\r\n</button>\r\n\r\n<input\r\n class=\"ard-radio-input-element\"\r\n type=\"radio\"\r\n [name]=\"name()\"\r\n [id]=\"htmlId()\"\r\n [checked]=\"selected()\"\r\n #radio\r\n/>\r\n", styles: ["@layer ard-ui{ard-radio{display:block}.ard-radio{border:none;background:none}.ard-radio>label{pointer-events:none}ard-radio>.ard-radio-input-element{display:none}}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
10600
10613
|
}
|
|
10601
10614
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: ArdiumRadioComponent, decorators: [{
|
|
10602
10615
|
type: Component,
|
|
@@ -10664,6 +10677,9 @@ class ArdiumRadioGroupComponent extends _FormFieldComponentBase {
|
|
|
10664
10677
|
return;
|
|
10665
10678
|
this._handleChangeEvents(radio);
|
|
10666
10679
|
}));
|
|
10680
|
+
this._childEventSubs.push(radio.touchedEvent.subscribe(() => {
|
|
10681
|
+
this._emitTouched();
|
|
10682
|
+
}));
|
|
10667
10683
|
}
|
|
10668
10684
|
});
|
|
10669
10685
|
}
|
|
@@ -10753,6 +10769,9 @@ class ArdiumRadioGroupComponent extends _FormFieldComponentBase {
|
|
|
10753
10769
|
return;
|
|
10754
10770
|
this._handleChangeEvents(radio);
|
|
10755
10771
|
}));
|
|
10772
|
+
this._childEventSubs.push(radio.touchedEvent.subscribe(() => {
|
|
10773
|
+
this._emitTouched();
|
|
10774
|
+
}));
|
|
10756
10775
|
}
|
|
10757
10776
|
}
|
|
10758
10777
|
ngOnDestroy() {
|
|
@@ -11332,6 +11351,7 @@ class _SelectableListComponentBase extends _FormFieldComponentBase {
|
|
|
11332
11351
|
if (selected.length > 0) {
|
|
11333
11352
|
this.addEvent.emit(selected);
|
|
11334
11353
|
this._emitChange();
|
|
11354
|
+
this._emitTouched();
|
|
11335
11355
|
}
|
|
11336
11356
|
}
|
|
11337
11357
|
unselectItem(...items) {
|
|
@@ -11339,6 +11359,7 @@ class _SelectableListComponentBase extends _FormFieldComponentBase {
|
|
|
11339
11359
|
if (unselected.length > 0)
|
|
11340
11360
|
this.removeEvent.emit(unselected);
|
|
11341
11361
|
this._emitChange();
|
|
11362
|
+
this._emitTouched();
|
|
11342
11363
|
}
|
|
11343
11364
|
onMouseMove() {
|
|
11344
11365
|
this.isMouseBeingUsed.set(true);
|