matcha-components 20.173.0 → 20.178.0
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/matcha-components.mjs +228 -42
- package/fesm2022/matcha-components.mjs.map +1 -1
- package/index.d.ts +54 -5
- package/package.json +1 -1
|
@@ -2489,16 +2489,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
2489
2489
|
}] } });
|
|
2490
2490
|
|
|
2491
2491
|
class MatchaCheckboxComponent {
|
|
2492
|
-
|
|
2493
|
-
this.
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
this.
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2492
|
+
get indeterminate() {
|
|
2493
|
+
return this._indeterminate;
|
|
2494
|
+
}
|
|
2495
|
+
set indeterminate(value) {
|
|
2496
|
+
if (value !== this._indeterminate) {
|
|
2497
|
+
this._indeterminate = value;
|
|
2498
|
+
if (this.inputElement) {
|
|
2499
|
+
this.inputElement.nativeElement.indeterminate = value;
|
|
2500
|
+
}
|
|
2501
|
+
this.cdr.markForCheck();
|
|
2502
|
+
}
|
|
2502
2503
|
}
|
|
2503
2504
|
get disabled() {
|
|
2504
2505
|
return this._disabled;
|
|
@@ -2515,11 +2516,16 @@ class MatchaCheckboxComponent {
|
|
|
2515
2516
|
const booleanValue = value != null && `${value}` !== 'false';
|
|
2516
2517
|
if (booleanValue !== this._checked) {
|
|
2517
2518
|
this._checked = booleanValue;
|
|
2519
|
+
if (this.inputElement) {
|
|
2520
|
+
this.inputElement.nativeElement.checked = this._checked;
|
|
2521
|
+
}
|
|
2518
2522
|
this.onChange(this._checked);
|
|
2523
|
+
this.cdr.markForCheck();
|
|
2519
2524
|
}
|
|
2520
2525
|
}
|
|
2521
2526
|
writeValue(value) {
|
|
2522
2527
|
this._checked = value;
|
|
2528
|
+
this.cdr.markForCheck();
|
|
2523
2529
|
}
|
|
2524
2530
|
registerOnChange(fn) {
|
|
2525
2531
|
this.onChange = fn;
|
|
@@ -2529,25 +2535,45 @@ class MatchaCheckboxComponent {
|
|
|
2529
2535
|
}
|
|
2530
2536
|
setDisabledState(isDisabled) {
|
|
2531
2537
|
this.disabled = isDisabled;
|
|
2538
|
+
this.cdr.markForCheck();
|
|
2539
|
+
}
|
|
2540
|
+
constructor(cdr) {
|
|
2541
|
+
this.cdr = cdr;
|
|
2542
|
+
this.color = 'accent';
|
|
2543
|
+
this._indeterminate = false;
|
|
2544
|
+
this._disabled = false;
|
|
2545
|
+
this._checked = false;
|
|
2546
|
+
this.checkedChange = new EventEmitter();
|
|
2547
|
+
this.change = new EventEmitter();
|
|
2548
|
+
// ControlValueAccessor methods
|
|
2549
|
+
this.onChange = () => { };
|
|
2550
|
+
this.onTouched = () => { };
|
|
2532
2551
|
}
|
|
2533
2552
|
onInputChange(event) {
|
|
2534
2553
|
if (this.disabled)
|
|
2535
2554
|
return;
|
|
2536
2555
|
const input = event.target;
|
|
2537
|
-
|
|
2556
|
+
const newCheckedState = input.checked;
|
|
2557
|
+
// Sincronizar estado indeterminate interno imediatamente
|
|
2558
|
+
if (this._indeterminate) {
|
|
2559
|
+
this._indeterminate = false;
|
|
2560
|
+
// Não precisa atualizar o nativo pois o browser já fez isso ao clicar
|
|
2561
|
+
}
|
|
2562
|
+
this.checked = newCheckedState;
|
|
2538
2563
|
this.onTouched();
|
|
2539
2564
|
const eventData = { checked: this.checked };
|
|
2540
2565
|
this.checkedChange.emit(eventData);
|
|
2541
|
-
this.change.emit(
|
|
2566
|
+
this.change.emit({ source: this, checked: this.checked });
|
|
2567
|
+
this.cdr.markForCheck();
|
|
2542
2568
|
}
|
|
2543
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: MatchaCheckboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2569
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: MatchaCheckboxComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2544
2570
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.0", type: MatchaCheckboxComponent, isStandalone: false, selector: "matcha-checkbox", inputs: { color: "color", indeterminate: "indeterminate", disabled: "disabled", checked: "checked" }, outputs: { checkedChange: "checkedChange", change: "change" }, providers: [
|
|
2545
2571
|
{
|
|
2546
2572
|
provide: NG_VALUE_ACCESSOR,
|
|
2547
2573
|
useExisting: forwardRef(() => MatchaCheckboxComponent),
|
|
2548
2574
|
multi: true
|
|
2549
2575
|
}
|
|
2550
|
-
], ngImport: i0, template: "<label
|
|
2576
|
+
], viewQueries: [{ propertyName: "inputElement", first: true, predicate: ["input"], descendants: true, static: true }], ngImport: i0, template: "<label class=\"matcha-checkbox flex-align-center\" [class.matcha-checkbox-disabled]=\"disabled\">\n <div class=\"matcha-checkbox-container w-40 h-40 max-w-40 max-h-40 min-w-40 min-h-40 flex-center-center radius-full cursor-pointer\"\n matchaRipple>\n <input #input type=\"checkbox\" class=\"matcha-checkbox-input\" [checked]=\"checked\" [disabled]=\"disabled\"\n [indeterminate]=\"indeterminate\" (change)=\"onInputChange($event)\">\n </div>\n\n <span class=\"matcha-checkbox-label fw-500 fs-16 lh-20\">\n <ng-content></ng-content>\n </span>\n</label>", styles: [""], dependencies: [{ kind: "directive", type: MatchaRippleDirective, selector: "[matchaRipple]", inputs: ["rippleColor"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2551
2577
|
}
|
|
2552
2578
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: MatchaCheckboxComponent, decorators: [{
|
|
2553
2579
|
type: Component,
|
|
@@ -2557,8 +2583,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
2557
2583
|
useExisting: forwardRef(() => MatchaCheckboxComponent),
|
|
2558
2584
|
multi: true
|
|
2559
2585
|
}
|
|
2560
|
-
], template: "<label
|
|
2561
|
-
}], propDecorators: {
|
|
2586
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<label class=\"matcha-checkbox flex-align-center\" [class.matcha-checkbox-disabled]=\"disabled\">\n <div class=\"matcha-checkbox-container w-40 h-40 max-w-40 max-h-40 min-w-40 min-h-40 flex-center-center radius-full cursor-pointer\"\n matchaRipple>\n <input #input type=\"checkbox\" class=\"matcha-checkbox-input\" [checked]=\"checked\" [disabled]=\"disabled\"\n [indeterminate]=\"indeterminate\" (change)=\"onInputChange($event)\">\n </div>\n\n <span class=\"matcha-checkbox-label fw-500 fs-16 lh-20\">\n <ng-content></ng-content>\n </span>\n</label>" }]
|
|
2587
|
+
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { inputElement: [{
|
|
2588
|
+
type: ViewChild,
|
|
2589
|
+
args: ['input', { static: true }]
|
|
2590
|
+
}], color: [{
|
|
2562
2591
|
type: Input
|
|
2563
2592
|
}], indeterminate: [{
|
|
2564
2593
|
type: Input
|
|
@@ -2573,19 +2602,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
2573
2602
|
}] } });
|
|
2574
2603
|
|
|
2575
2604
|
class MatchaRadioComponent {
|
|
2576
|
-
constructor() {
|
|
2577
|
-
this.color = 'accent';
|
|
2578
|
-
this.value = null;
|
|
2579
|
-
this.name = '';
|
|
2580
|
-
this._disabled = false;
|
|
2581
|
-
this._checked = false;
|
|
2582
|
-
this._modelValue = null;
|
|
2583
|
-
this.checkedChange = new EventEmitter();
|
|
2584
|
-
this.change = new EventEmitter();
|
|
2585
|
-
// ControlValueAccessor methods
|
|
2586
|
-
this.onChange = () => { };
|
|
2587
|
-
this.onTouched = () => { };
|
|
2588
|
-
}
|
|
2589
2605
|
set disabled(value) {
|
|
2590
2606
|
this._disabled = value != null && `${value}` !== 'false';
|
|
2591
2607
|
}
|
|
@@ -2598,13 +2614,18 @@ class MatchaRadioComponent {
|
|
|
2598
2614
|
set checked(value) {
|
|
2599
2615
|
if (value !== this._checked) {
|
|
2600
2616
|
this._checked = value;
|
|
2617
|
+
if (this.inputElement) {
|
|
2618
|
+
this.inputElement.nativeElement.checked = value;
|
|
2619
|
+
}
|
|
2601
2620
|
const outVal = this.value !== undefined ? this.value : this._checked;
|
|
2602
2621
|
this.onChange(outVal);
|
|
2622
|
+
this.cdr.markForCheck();
|
|
2603
2623
|
}
|
|
2604
2624
|
}
|
|
2605
2625
|
writeValue(value) {
|
|
2606
2626
|
this._modelValue = value;
|
|
2607
2627
|
this._checked = this.value !== undefined ? this.value === value : !!value;
|
|
2628
|
+
this.cdr.markForCheck();
|
|
2608
2629
|
}
|
|
2609
2630
|
registerOnChange(fn) {
|
|
2610
2631
|
this.onChange = fn;
|
|
@@ -2614,10 +2635,28 @@ class MatchaRadioComponent {
|
|
|
2614
2635
|
}
|
|
2615
2636
|
setDisabledState(isDisabled) {
|
|
2616
2637
|
this.disabled = isDisabled;
|
|
2638
|
+
this.cdr.markForCheck();
|
|
2639
|
+
}
|
|
2640
|
+
constructor(cdr) {
|
|
2641
|
+
this.cdr = cdr;
|
|
2642
|
+
this.color = 'accent';
|
|
2643
|
+
this.value = null;
|
|
2644
|
+
this.name = '';
|
|
2645
|
+
this._disabled = false;
|
|
2646
|
+
this._checked = false;
|
|
2647
|
+
this._modelValue = null;
|
|
2648
|
+
this.checkedChange = new EventEmitter();
|
|
2649
|
+
this.change = new EventEmitter();
|
|
2650
|
+
// ControlValueAccessor methods
|
|
2651
|
+
this.onChange = () => { };
|
|
2652
|
+
this.onTouched = () => { };
|
|
2617
2653
|
}
|
|
2618
2654
|
onInputChange(event) {
|
|
2619
2655
|
if (this.disabled)
|
|
2620
2656
|
return;
|
|
2657
|
+
// Não usar preventDefault aqui para manter o comportamento nativo do rádio (seleção)
|
|
2658
|
+
// Apenas paramos a propagação para o host do componente
|
|
2659
|
+
event.stopPropagation();
|
|
2621
2660
|
this.checked = true;
|
|
2622
2661
|
this.onTouched();
|
|
2623
2662
|
// Emitir o valor correto para o ControlValueAccessor
|
|
@@ -2625,16 +2664,17 @@ class MatchaRadioComponent {
|
|
|
2625
2664
|
this.onChange(outVal);
|
|
2626
2665
|
const eventData = { checked: this.checked };
|
|
2627
2666
|
this.checkedChange.emit(eventData);
|
|
2628
|
-
this.change.emit(
|
|
2667
|
+
this.change.emit({ source: this, value: outVal });
|
|
2668
|
+
this.cdr.markForCheck();
|
|
2629
2669
|
}
|
|
2630
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: MatchaRadioComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2670
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: MatchaRadioComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2631
2671
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.0", type: MatchaRadioComponent, isStandalone: false, selector: "matcha-radio", inputs: { color: "color", value: "value", name: "name", disabled: "disabled", checked: "checked" }, outputs: { checkedChange: "checkedChange", change: "change" }, providers: [
|
|
2632
2672
|
{
|
|
2633
2673
|
provide: NG_VALUE_ACCESSOR,
|
|
2634
2674
|
useExisting: forwardRef(() => MatchaRadioComponent),
|
|
2635
2675
|
multi: true
|
|
2636
2676
|
}
|
|
2637
|
-
], ngImport: i0, template: "<label\n class=\"matcha-radio flex-align-center\"\n [class.matcha-radio-disabled]=\"disabled\">\n <div\n class=\"matcha-radio-container w-40 h-40 max-w-40 max-h-40 min-w-40 min-h-40 flex-center-center radius-full cursor-pointer\"\n matchaRipple>\n <input\n type=\"radio\"\n class=\"matcha-radio-input\"\n [attr.name]=\"name\"\n [value]=\"value\"\n [checked]=\"checked\"\n [disabled]=\"disabled\"\n (change)=\"onInputChange($event)\">\n </div>\n\n <span class=\"matcha-radio-label fw-500 lh-20\">\n <ng-content></ng-content>\n </span>\n</label>", styles: [""], dependencies: [{ kind: "directive", type: MatchaRippleDirective, selector: "[matchaRipple]", inputs: ["rippleColor"] }] }); }
|
|
2677
|
+
], viewQueries: [{ propertyName: "inputElement", first: true, predicate: ["input"], descendants: true, static: true }], ngImport: i0, template: "<label\n class=\"matcha-radio flex-align-center\"\n [class.matcha-radio-disabled]=\"disabled\">\n <div\n class=\"matcha-radio-container w-40 h-40 max-w-40 max-h-40 min-w-40 min-h-40 flex-center-center radius-full cursor-pointer\"\n matchaRipple>\n <input\n type=\"radio\"\n class=\"matcha-radio-input\"\n [attr.name]=\"name\"\n [value]=\"value\"\n [checked]=\"checked\"\n [disabled]=\"disabled\"\n (change)=\"onInputChange($event)\">\n </div>\n\n <span class=\"matcha-radio-label fw-500 lh-20\">\n <ng-content></ng-content>\n </span>\n</label>", styles: [""], dependencies: [{ kind: "directive", type: MatchaRippleDirective, selector: "[matchaRipple]", inputs: ["rippleColor"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2638
2678
|
}
|
|
2639
2679
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: MatchaRadioComponent, decorators: [{
|
|
2640
2680
|
type: Component,
|
|
@@ -2644,8 +2684,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
2644
2684
|
useExisting: forwardRef(() => MatchaRadioComponent),
|
|
2645
2685
|
multi: true
|
|
2646
2686
|
}
|
|
2647
|
-
], template: "<label\n class=\"matcha-radio flex-align-center\"\n [class.matcha-radio-disabled]=\"disabled\">\n <div\n class=\"matcha-radio-container w-40 h-40 max-w-40 max-h-40 min-w-40 min-h-40 flex-center-center radius-full cursor-pointer\"\n matchaRipple>\n <input\n type=\"radio\"\n class=\"matcha-radio-input\"\n [attr.name]=\"name\"\n [value]=\"value\"\n [checked]=\"checked\"\n [disabled]=\"disabled\"\n (change)=\"onInputChange($event)\">\n </div>\n\n <span class=\"matcha-radio-label fw-500 lh-20\">\n <ng-content></ng-content>\n </span>\n</label>" }]
|
|
2648
|
-
}], propDecorators: {
|
|
2687
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<label\n class=\"matcha-radio flex-align-center\"\n [class.matcha-radio-disabled]=\"disabled\">\n <div\n class=\"matcha-radio-container w-40 h-40 max-w-40 max-h-40 min-w-40 min-h-40 flex-center-center radius-full cursor-pointer\"\n matchaRipple>\n <input\n type=\"radio\"\n class=\"matcha-radio-input\"\n [attr.name]=\"name\"\n [value]=\"value\"\n [checked]=\"checked\"\n [disabled]=\"disabled\"\n (change)=\"onInputChange($event)\">\n </div>\n\n <span class=\"matcha-radio-label fw-500 lh-20\">\n <ng-content></ng-content>\n </span>\n</label>" }]
|
|
2688
|
+
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { inputElement: [{
|
|
2689
|
+
type: ViewChild,
|
|
2690
|
+
args: ['input', { static: true }]
|
|
2691
|
+
}], color: [{
|
|
2649
2692
|
type: Input
|
|
2650
2693
|
}], value: [{
|
|
2651
2694
|
type: Input
|
|
@@ -2661,6 +2704,141 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
2661
2704
|
type: Output
|
|
2662
2705
|
}] } });
|
|
2663
2706
|
|
|
2707
|
+
let nextUniqueId = 0;
|
|
2708
|
+
class MatchaRadioGroupComponent {
|
|
2709
|
+
get value() { return this._value; }
|
|
2710
|
+
set value(newValue) {
|
|
2711
|
+
if (this._value !== newValue) {
|
|
2712
|
+
this._value = newValue;
|
|
2713
|
+
this.updateSelectedRadioFromValue();
|
|
2714
|
+
this.onChange(this._value);
|
|
2715
|
+
this._cdr.markForCheck();
|
|
2716
|
+
}
|
|
2717
|
+
}
|
|
2718
|
+
get disabled() { return this._disabled; }
|
|
2719
|
+
set disabled(value) {
|
|
2720
|
+
this._disabled = value;
|
|
2721
|
+
this.updateDisabledState();
|
|
2722
|
+
}
|
|
2723
|
+
constructor(_cdr) {
|
|
2724
|
+
this._cdr = _cdr;
|
|
2725
|
+
this._value = null;
|
|
2726
|
+
this.name = `matcha-radio-group-${nextUniqueId++}`;
|
|
2727
|
+
this._disabled = false;
|
|
2728
|
+
this.change = new EventEmitter();
|
|
2729
|
+
this.onChange = () => { };
|
|
2730
|
+
this.onTouched = () => { };
|
|
2731
|
+
this._unsubscribeAll = new Subject();
|
|
2732
|
+
this._radioSubscriptions = [];
|
|
2733
|
+
this._isInitialized = false;
|
|
2734
|
+
}
|
|
2735
|
+
ngAfterContentInit() {
|
|
2736
|
+
this._isInitialized = true;
|
|
2737
|
+
// Initial setup
|
|
2738
|
+
this.updateSelectedRadioFromValue();
|
|
2739
|
+
this.updateDisabledState();
|
|
2740
|
+
this.updateNames();
|
|
2741
|
+
this.subscribeToRadios();
|
|
2742
|
+
// Handle dynamic additions/removals
|
|
2743
|
+
this.radios.changes.pipe(takeUntil(this._unsubscribeAll)).subscribe(() => {
|
|
2744
|
+
this.updateSelectedRadioFromValue();
|
|
2745
|
+
this.updateDisabledState();
|
|
2746
|
+
this.updateNames();
|
|
2747
|
+
this.subscribeToRadios();
|
|
2748
|
+
});
|
|
2749
|
+
}
|
|
2750
|
+
updateNames() {
|
|
2751
|
+
if (this.radios) {
|
|
2752
|
+
this.radios.forEach(radio => {
|
|
2753
|
+
radio.name = this.name;
|
|
2754
|
+
radio['cdr'].markForCheck();
|
|
2755
|
+
});
|
|
2756
|
+
}
|
|
2757
|
+
}
|
|
2758
|
+
subscribeToRadios() {
|
|
2759
|
+
this._radioSubscriptions.forEach(sub => sub.unsubscribe());
|
|
2760
|
+
this._radioSubscriptions = [];
|
|
2761
|
+
if (this.radios) {
|
|
2762
|
+
this.radios.forEach(radio => {
|
|
2763
|
+
const sub = radio.change.pipe(takeUntil(this._unsubscribeAll)).subscribe((event) => {
|
|
2764
|
+
this.onTouched();
|
|
2765
|
+
if (this.value !== event.value) {
|
|
2766
|
+
this._value = event.value; // Update internal value without triggering setter logic again if unnecessary, but setter updates radios.
|
|
2767
|
+
// Actually, if clicked, the radio is already checked.
|
|
2768
|
+
// Just update value and emit.
|
|
2769
|
+
this.onChange(this._value);
|
|
2770
|
+
this.change.emit(event);
|
|
2771
|
+
}
|
|
2772
|
+
});
|
|
2773
|
+
this._radioSubscriptions.push(sub);
|
|
2774
|
+
});
|
|
2775
|
+
}
|
|
2776
|
+
}
|
|
2777
|
+
writeValue(value) {
|
|
2778
|
+
this._value = value;
|
|
2779
|
+
this.updateSelectedRadioFromValue();
|
|
2780
|
+
this._cdr.markForCheck();
|
|
2781
|
+
}
|
|
2782
|
+
registerOnChange(fn) {
|
|
2783
|
+
this.onChange = fn;
|
|
2784
|
+
}
|
|
2785
|
+
registerOnTouched(fn) {
|
|
2786
|
+
this.onTouched = fn;
|
|
2787
|
+
}
|
|
2788
|
+
setDisabledState(isDisabled) {
|
|
2789
|
+
this.disabled = isDisabled;
|
|
2790
|
+
}
|
|
2791
|
+
updateSelectedRadioFromValue() {
|
|
2792
|
+
if (this.radios && this._isInitialized) {
|
|
2793
|
+
this.radios.forEach(radio => {
|
|
2794
|
+
radio.checked = this._value === radio.value;
|
|
2795
|
+
});
|
|
2796
|
+
}
|
|
2797
|
+
}
|
|
2798
|
+
updateDisabledState() {
|
|
2799
|
+
if (this.radios && this._isInitialized && this.disabled !== undefined) {
|
|
2800
|
+
this.radios.forEach(radio => {
|
|
2801
|
+
radio.disabled = this.disabled;
|
|
2802
|
+
});
|
|
2803
|
+
}
|
|
2804
|
+
}
|
|
2805
|
+
ngOnDestroy() {
|
|
2806
|
+
this._unsubscribeAll.next();
|
|
2807
|
+
this._unsubscribeAll.complete();
|
|
2808
|
+
}
|
|
2809
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: MatchaRadioGroupComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2810
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.0", type: MatchaRadioGroupComponent, isStandalone: false, selector: "matcha-radio-group", inputs: { value: "value", name: "name", disabled: "disabled" }, outputs: { change: "change" }, host: { attributes: { "role": "radiogroup" } }, providers: [
|
|
2811
|
+
{
|
|
2812
|
+
provide: NG_VALUE_ACCESSOR,
|
|
2813
|
+
useExisting: forwardRef(() => MatchaRadioGroupComponent),
|
|
2814
|
+
multi: true
|
|
2815
|
+
}
|
|
2816
|
+
], queries: [{ propertyName: "radios", predicate: i0.forwardRef(() => MatchaRadioComponent), descendants: true }], ngImport: i0, template: "<ng-content></ng-content>", styles: [".matcha-radio-group{display:block}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
2817
|
+
}
|
|
2818
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: MatchaRadioGroupComponent, decorators: [{
|
|
2819
|
+
type: Component,
|
|
2820
|
+
args: [{ selector: 'matcha-radio-group', providers: [
|
|
2821
|
+
{
|
|
2822
|
+
provide: NG_VALUE_ACCESSOR,
|
|
2823
|
+
useExisting: forwardRef(() => MatchaRadioGroupComponent),
|
|
2824
|
+
multi: true
|
|
2825
|
+
}
|
|
2826
|
+
], host: {
|
|
2827
|
+
'role': 'radiogroup',
|
|
2828
|
+
}, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<ng-content></ng-content>", styles: [".matcha-radio-group{display:block}\n"] }]
|
|
2829
|
+
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }], propDecorators: { radios: [{
|
|
2830
|
+
type: ContentChildren,
|
|
2831
|
+
args: [forwardRef(() => MatchaRadioComponent), { descendants: true }]
|
|
2832
|
+
}], value: [{
|
|
2833
|
+
type: Input
|
|
2834
|
+
}], name: [{
|
|
2835
|
+
type: Input
|
|
2836
|
+
}], disabled: [{
|
|
2837
|
+
type: Input
|
|
2838
|
+
}], change: [{
|
|
2839
|
+
type: Output
|
|
2840
|
+
}] } });
|
|
2841
|
+
|
|
2664
2842
|
class MatchaSpinComponent {
|
|
2665
2843
|
set progress(value) {
|
|
2666
2844
|
this._progress = Number(value);
|
|
@@ -2947,9 +3125,10 @@ class MatchaSlideToggleComponent {
|
|
|
2947
3125
|
const newCheckedState = value === '' ? true : !!value;
|
|
2948
3126
|
if (newCheckedState !== this._checked) {
|
|
2949
3127
|
this._checked = newCheckedState;
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
3128
|
+
if (this.inputElement) {
|
|
3129
|
+
this.inputElement.nativeElement.checked = this._checked;
|
|
3130
|
+
}
|
|
3131
|
+
this.cdr.markForCheck();
|
|
2953
3132
|
}
|
|
2954
3133
|
}
|
|
2955
3134
|
get checked() {
|
|
@@ -3029,7 +3208,7 @@ class MatchaSlideToggleComponent {
|
|
|
3029
3208
|
useExisting: forwardRef(() => MatchaSlideToggleComponent),
|
|
3030
3209
|
multi: true,
|
|
3031
3210
|
},
|
|
3032
|
-
], usesOnChanges: true, ngImport: i0, template: "<label
|
|
3211
|
+
], viewQueries: [{ propertyName: "inputElement", first: true, predicate: ["input"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: "<label class=\"matcha-slide-toggle-wrapper flex-align-center\" [class.matcha-slide-toggle-disabled]=\"disabled\">\n <input #input type=\"checkbox\" [checked]=\"checked\" [disabled]=\"disabled\" (change)=\"onInputChange($event)\" />\n\n <span class=\"matcha-slide-toggle-label ml-8 fw-500 fs-16 lh-20\">\n <ng-content></ng-content>\n </span>\n</label>", styles: [""], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
3033
3212
|
}
|
|
3034
3213
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: MatchaSlideToggleComponent, decorators: [{
|
|
3035
3214
|
type: Component,
|
|
@@ -3039,8 +3218,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
3039
3218
|
useExisting: forwardRef(() => MatchaSlideToggleComponent),
|
|
3040
3219
|
multi: true,
|
|
3041
3220
|
},
|
|
3042
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<label
|
|
3043
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }], propDecorators: {
|
|
3221
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<label class=\"matcha-slide-toggle-wrapper flex-align-center\" [class.matcha-slide-toggle-disabled]=\"disabled\">\n <input #input type=\"checkbox\" [checked]=\"checked\" [disabled]=\"disabled\" (change)=\"onInputChange($event)\" />\n\n <span class=\"matcha-slide-toggle-label ml-8 fw-500 fs-16 lh-20\">\n <ng-content></ng-content>\n </span>\n</label>" }]
|
|
3222
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }], propDecorators: { inputElement: [{
|
|
3223
|
+
type: ViewChild,
|
|
3224
|
+
args: ['input', { static: true }]
|
|
3225
|
+
}], color: [{
|
|
3044
3226
|
type: Input
|
|
3045
3227
|
}], checked: [{
|
|
3046
3228
|
type: Input
|
|
@@ -13356,7 +13538,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
13356
13538
|
|
|
13357
13539
|
class MatchaRadioModule {
|
|
13358
13540
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: MatchaRadioModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
13359
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.0", ngImport: i0, type: MatchaRadioModule, declarations: [MatchaRadioComponent
|
|
13541
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.0", ngImport: i0, type: MatchaRadioModule, declarations: [MatchaRadioComponent,
|
|
13542
|
+
MatchaRadioGroupComponent], imports: [CommonModule, MatchaRippleModule], exports: [MatchaRadioComponent,
|
|
13543
|
+
MatchaRadioGroupComponent] }); }
|
|
13360
13544
|
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: MatchaRadioModule, imports: [CommonModule, MatchaRippleModule] }); }
|
|
13361
13545
|
}
|
|
13362
13546
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImport: i0, type: MatchaRadioModule, decorators: [{
|
|
@@ -13364,10 +13548,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
13364
13548
|
args: [{
|
|
13365
13549
|
declarations: [
|
|
13366
13550
|
MatchaRadioComponent,
|
|
13551
|
+
MatchaRadioGroupComponent
|
|
13367
13552
|
],
|
|
13368
13553
|
imports: [CommonModule, MatchaRippleModule],
|
|
13369
13554
|
exports: [
|
|
13370
13555
|
MatchaRadioComponent,
|
|
13556
|
+
MatchaRadioGroupComponent
|
|
13371
13557
|
],
|
|
13372
13558
|
}]
|
|
13373
13559
|
}] });
|
|
@@ -14016,5 +14202,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.0", ngImpor
|
|
|
14016
14202
|
* Generated bundle index. Do not edit.
|
|
14017
14203
|
*/
|
|
14018
14204
|
|
|
14019
|
-
export { CopyButtonComponent, INITIAL_CONFIG, MATCHA_MASK_CONFIG, MATCHA_OPTION_PARENT, MatchaAccordionComponent, MatchaAccordionContentComponent, MatchaAccordionHeaderComponent, MatchaAccordionItemComponent, MatchaAccordionModule, MatchaAutocompleteComponent, MatchaAutocompleteModule, MatchaAutocompleteTriggerDirective, MatchaAvatarComponent, MatchaAvatarModule, MatchaBreakpointObservableModule, MatchaBreakpointObserver, MatchaButtonComponent, MatchaButtonModule, MatchaButtonToggleComponent, MatchaButtonToggleModule, MatchaCardComponent, MatchaCardModule, MatchaCheckboxComponent, MatchaCheckboxModule, MatchaChipComponent, MatchaChipListComponent, MatchaChipModule, MatchaComponentsModule, MatchaDateComponent, MatchaDateModule, MatchaDateRangeComponent, MatchaDateRangeModule, MatchaDividerComponent, MatchaDividerModule, MatchaDragDirective, MatchaDragHandleDirective, MatchaDrawerComponent, MatchaDrawerContainerComponent, MatchaDrawerContentComponent, MatchaDrawerModule, MatchaDropListComponent, MatchaDropListModule, MatchaElevationDirective, MatchaElevationModule, MatchaErrorComponent, MatchaFormFieldComponent, MatchaFormFieldModule, MatchaGridComponent, MatchaGridModule, MatchaHighlightComponent, MatchaHighlightModule, MatchaHintTextComponent, MatchaHintTextModule, MatchaIconComponent, MatchaIconModule, MatchaInfiniteScrollComponent, MatchaInfiniteScrollDataComponent, MatchaInfiniteScrollModule, MatchaInputPhoneComponent, MatchaInputPhoneModule, MatchaLabelComponent, MatchaLazyloadComponent, MatchaLazyloadDataComponent, MatchaLazyloadModule, MatchaMaskApplierService, MatchaMaskCompatibleDirective, MatchaMaskModule, MatchaMaskPipe, MatchaMaskService, MatchaMasonryComponent, MatchaMasonryModule, MatchaModalComponent, MatchaModalContentComponent, MatchaModalFooterComponent, MatchaModalHeaderComponent, MatchaModalModule, MatchaModalOptionsComponent, MatchaModalService, MatchaOptionComponent, MatchaOptionModule, MatchaOverlayService, MatchaPageLayoutComponent, MatchaPageLayoutModule, MatchaPaginatorComponent, MatchaPaginatorIntl, MatchaPaginatorModule, MatchaPanelComponent, MatchaPanelModule, MatchaRadioComponent, MatchaRadioModule, MatchaRippleDirective, MatchaRippleModule, MatchaSelectComponent, MatchaSelectModule, MatchaSelectTriggerDirective, MatchaSkeletonComponent, MatchaSkeletonModule, MatchaSlideToggleComponent, MatchaSlideToggleModule, MatchaSliderComponent, MatchaSliderModule, MatchaSpinComponent, MatchaSpinModule, MatchaSpinnerComponent, MatchaSpinnerModule, MatchaStepperComponent, MatchaStepperContentComponent, MatchaStepperControllerComponent, MatchaStepperModule, MatchaStepperStateService, MatchaTabItemComponent, MatchaTableComponent, MatchaTableModule, MatchaTabsComponent, MatchaTabsModule, MatchaTimeComponent, MatchaTimeModule, MatchaTitleComponent, MatchaTitleModule, MatchaToolbarButtonComponent, MatchaToolbarComponent, MatchaToolbarContentComponent, MatchaToolbarCustomButtonComponent, MatchaToolbarMainButtonComponent, MatchaToolbarModule, MatchaTooltipDirective, MatchaTooltipModule, NEW_CONFIG, NextStepDirective, PrevStepDirective, StepComponent, StepContentDirective, compatibleOptions, initialConfig, timeMasks, withoutValidation };
|
|
14205
|
+
export { CopyButtonComponent, INITIAL_CONFIG, MATCHA_MASK_CONFIG, MATCHA_OPTION_PARENT, MatchaAccordionComponent, MatchaAccordionContentComponent, MatchaAccordionHeaderComponent, MatchaAccordionItemComponent, MatchaAccordionModule, MatchaAutocompleteComponent, MatchaAutocompleteModule, MatchaAutocompleteTriggerDirective, MatchaAvatarComponent, MatchaAvatarModule, MatchaBreakpointObservableModule, MatchaBreakpointObserver, MatchaButtonComponent, MatchaButtonModule, MatchaButtonToggleComponent, MatchaButtonToggleModule, MatchaCardComponent, MatchaCardModule, MatchaCheckboxComponent, MatchaCheckboxModule, MatchaChipComponent, MatchaChipListComponent, MatchaChipModule, MatchaComponentsModule, MatchaDateComponent, MatchaDateModule, MatchaDateRangeComponent, MatchaDateRangeModule, MatchaDividerComponent, MatchaDividerModule, MatchaDragDirective, MatchaDragHandleDirective, MatchaDrawerComponent, MatchaDrawerContainerComponent, MatchaDrawerContentComponent, MatchaDrawerModule, MatchaDropListComponent, MatchaDropListModule, MatchaElevationDirective, MatchaElevationModule, MatchaErrorComponent, MatchaFormFieldComponent, MatchaFormFieldModule, MatchaGridComponent, MatchaGridModule, MatchaHighlightComponent, MatchaHighlightModule, MatchaHintTextComponent, MatchaHintTextModule, MatchaIconComponent, MatchaIconModule, MatchaInfiniteScrollComponent, MatchaInfiniteScrollDataComponent, MatchaInfiniteScrollModule, MatchaInputPhoneComponent, MatchaInputPhoneModule, MatchaLabelComponent, MatchaLazyloadComponent, MatchaLazyloadDataComponent, MatchaLazyloadModule, MatchaMaskApplierService, MatchaMaskCompatibleDirective, MatchaMaskModule, MatchaMaskPipe, MatchaMaskService, MatchaMasonryComponent, MatchaMasonryModule, MatchaModalComponent, MatchaModalContentComponent, MatchaModalFooterComponent, MatchaModalHeaderComponent, MatchaModalModule, MatchaModalOptionsComponent, MatchaModalService, MatchaOptionComponent, MatchaOptionModule, MatchaOverlayService, MatchaPageLayoutComponent, MatchaPageLayoutModule, MatchaPaginatorComponent, MatchaPaginatorIntl, MatchaPaginatorModule, MatchaPanelComponent, MatchaPanelModule, MatchaRadioComponent, MatchaRadioGroupComponent, MatchaRadioModule, MatchaRippleDirective, MatchaRippleModule, MatchaSelectComponent, MatchaSelectModule, MatchaSelectTriggerDirective, MatchaSkeletonComponent, MatchaSkeletonModule, MatchaSlideToggleComponent, MatchaSlideToggleModule, MatchaSliderComponent, MatchaSliderModule, MatchaSpinComponent, MatchaSpinModule, MatchaSpinnerComponent, MatchaSpinnerModule, MatchaStepperComponent, MatchaStepperContentComponent, MatchaStepperControllerComponent, MatchaStepperModule, MatchaStepperStateService, MatchaTabItemComponent, MatchaTableComponent, MatchaTableModule, MatchaTabsComponent, MatchaTabsModule, MatchaTimeComponent, MatchaTimeModule, MatchaTitleComponent, MatchaTitleModule, MatchaToolbarButtonComponent, MatchaToolbarComponent, MatchaToolbarContentComponent, MatchaToolbarCustomButtonComponent, MatchaToolbarMainButtonComponent, MatchaToolbarModule, MatchaTooltipDirective, MatchaTooltipModule, NEW_CONFIG, NextStepDirective, PrevStepDirective, StepComponent, StepContentDirective, compatibleOptions, initialConfig, timeMasks, withoutValidation };
|
|
14020
14206
|
//# sourceMappingURL=matcha-components.mjs.map
|