matcha-components 20.2.0 → 20.3.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.
@@ -1960,6 +1960,92 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImpor
1960
1960
  type: Output
1961
1961
  }] } });
1962
1962
 
1963
+ class MatchaRadioComponent {
1964
+ constructor() {
1965
+ this.color = 'accent';
1966
+ this.value = null;
1967
+ this.name = '';
1968
+ this._disabled = false;
1969
+ this._checked = false;
1970
+ this._modelValue = null;
1971
+ this.checkedChange = new EventEmitter();
1972
+ this.change = new EventEmitter();
1973
+ // ControlValueAccessor methods
1974
+ this.onChange = () => { };
1975
+ this.onTouched = () => { };
1976
+ }
1977
+ set disabled(value) {
1978
+ this._disabled = value != null && `${value}` !== 'false';
1979
+ }
1980
+ get disabled() {
1981
+ return this._disabled;
1982
+ }
1983
+ get checked() {
1984
+ return this._checked;
1985
+ }
1986
+ set checked(value) {
1987
+ if (value !== this._checked) {
1988
+ this._checked = value;
1989
+ const outVal = this.value !== undefined ? this.value : this._checked;
1990
+ this.onChange(outVal);
1991
+ }
1992
+ }
1993
+ writeValue(value) {
1994
+ this._modelValue = value;
1995
+ this._checked = this.value !== undefined ? this.value === value : !!value;
1996
+ }
1997
+ registerOnChange(fn) {
1998
+ this.onChange = fn;
1999
+ }
2000
+ registerOnTouched(fn) {
2001
+ this.onTouched = fn;
2002
+ }
2003
+ setDisabledState(isDisabled) {
2004
+ this.disabled = isDisabled;
2005
+ }
2006
+ onInputChange(event) {
2007
+ if (this.disabled)
2008
+ return;
2009
+ this.checked = true;
2010
+ this.onTouched();
2011
+ const eventData = { checked: this.checked };
2012
+ this.checkedChange.emit(eventData);
2013
+ this.change.emit(event);
2014
+ }
2015
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: MatchaRadioComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2016
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.2.1", type: MatchaRadioComponent, isStandalone: false, selector: "matcha-radio", inputs: { color: "color", value: "value", name: "name", disabled: "disabled", checked: "checked" }, outputs: { checkedChange: "checkedChange", change: "change" }, providers: [
2017
+ {
2018
+ provide: NG_VALUE_ACCESSOR,
2019
+ useExisting: forwardRef(() => MatchaRadioComponent),
2020
+ multi: true
2021
+ }
2022
+ ], 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"] }] }); }
2023
+ }
2024
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: MatchaRadioComponent, decorators: [{
2025
+ type: Component,
2026
+ args: [{ selector: 'matcha-radio', standalone: false, providers: [
2027
+ {
2028
+ provide: NG_VALUE_ACCESSOR,
2029
+ useExisting: forwardRef(() => MatchaRadioComponent),
2030
+ multi: true
2031
+ }
2032
+ ], 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>" }]
2033
+ }], propDecorators: { color: [{
2034
+ type: Input
2035
+ }], value: [{
2036
+ type: Input
2037
+ }], name: [{
2038
+ type: Input
2039
+ }], disabled: [{
2040
+ type: Input
2041
+ }], checked: [{
2042
+ type: Input
2043
+ }], checkedChange: [{
2044
+ type: Output
2045
+ }], change: [{
2046
+ type: Output
2047
+ }] } });
2048
+
1963
2049
  class MatchaSpinComponent {
1964
2050
  set progress(value) {
1965
2051
  this._progress = Number(value);
@@ -4839,40 +4925,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImpor
4839
4925
  }]
4840
4926
  }] });
4841
4927
 
4842
- class MatchaRadioButtonDirective {
4843
- constructor(_elementRef, _renderer) {
4844
- this._elementRef = _elementRef;
4845
- this._renderer = _renderer;
4846
- //this._elementRef.nativeElement.style.backgroundColor = 'grey';
4847
- this._renderer.addClass(this._elementRef.nativeElement, 'matcha-radio-button');
4848
- }
4849
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: MatchaRadioButtonDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive }); }
4850
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.2.1", type: MatchaRadioButtonDirective, isStandalone: false, selector: "[matchaRadioButton]", ngImport: i0 }); }
4851
- }
4852
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: MatchaRadioButtonDirective, decorators: [{
4853
- type: Directive,
4854
- args: [{
4855
- selector: '[matchaRadioButton]',
4856
- standalone: false
4857
- }]
4858
- }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }] });
4859
-
4860
- class MatchaRadioButtonModule {
4861
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: MatchaRadioButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
4862
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.2.1", ngImport: i0, type: MatchaRadioButtonModule, declarations: [MatchaRadioButtonDirective], imports: [CommonModule], exports: [MatchaRadioButtonDirective] }); }
4863
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: MatchaRadioButtonModule, imports: [CommonModule] }); }
4864
- }
4865
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: MatchaRadioButtonModule, decorators: [{
4866
- type: NgModule,
4867
- args: [{
4868
- declarations: [MatchaRadioButtonDirective],
4869
- imports: [
4870
- CommonModule
4871
- ],
4872
- exports: [MatchaRadioButtonDirective]
4873
- }]
4874
- }] });
4875
-
4876
4928
  class MatchaSelectDirective {
4877
4929
  constructor(_elementRef, _renderer) {
4878
4930
  this._elementRef = _elementRef;
@@ -5339,6 +5391,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImpor
5339
5391
  }]
5340
5392
  }] });
5341
5393
 
5394
+ class MatchaRadioModule {
5395
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: MatchaRadioModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
5396
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.2.1", ngImport: i0, type: MatchaRadioModule, declarations: [MatchaRadioComponent], imports: [CommonModule, MatchaRippleModule], exports: [MatchaRadioComponent] }); }
5397
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: MatchaRadioModule, imports: [CommonModule, MatchaRippleModule] }); }
5398
+ }
5399
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: MatchaRadioModule, decorators: [{
5400
+ type: NgModule,
5401
+ args: [{
5402
+ declarations: [
5403
+ MatchaRadioComponent,
5404
+ ],
5405
+ imports: [CommonModule, MatchaRippleModule],
5406
+ exports: [
5407
+ MatchaRadioComponent,
5408
+ ],
5409
+ }]
5410
+ }] });
5411
+
5342
5412
  class MatchaComponentsModule {
5343
5413
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: MatchaComponentsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
5344
5414
  static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.2.1", ngImport: i0, type: MatchaComponentsModule, declarations: [MatchaOverflowDraggableComponent], imports: [CommonModule,
@@ -5352,6 +5422,7 @@ class MatchaComponentsModule {
5352
5422
  MatchaButtonToggleModule,
5353
5423
  MatchaCardModule,
5354
5424
  MatchaCheckboxModule,
5425
+ MatchaRadioModule,
5355
5426
  MatchaChipsModule,
5356
5427
  MatchaDatepickerModule,
5357
5428
  MatchaDividerModule,
@@ -5368,7 +5439,6 @@ class MatchaComponentsModule {
5368
5439
  MatchaModalModule,
5369
5440
  MatchaPaginatorModule,
5370
5441
  MatchaProgressBarModule,
5371
- MatchaRadioButtonModule,
5372
5442
  MatchaRippleModule,
5373
5443
  MatchaSelectModule,
5374
5444
  MatchaSidenavModule,
@@ -5393,6 +5463,7 @@ class MatchaComponentsModule {
5393
5463
  MatchaButtonToggleModule,
5394
5464
  MatchaCardModule,
5395
5465
  MatchaCheckboxModule,
5466
+ MatchaRadioModule,
5396
5467
  MatchaChipsModule,
5397
5468
  MatchaDatepickerModule,
5398
5469
  MatchaDividerModule,
@@ -5410,7 +5481,6 @@ class MatchaComponentsModule {
5410
5481
  MatchaOptionModule,
5411
5482
  MatchaPaginatorModule,
5412
5483
  MatchaProgressBarModule,
5413
- MatchaRadioButtonModule,
5414
5484
  MatchaRippleModule,
5415
5485
  MatchaSelectModule,
5416
5486
  MatchaSidenavModule,
@@ -5440,6 +5510,7 @@ class MatchaComponentsModule {
5440
5510
  MatchaButtonToggleModule,
5441
5511
  MatchaCardModule,
5442
5512
  MatchaCheckboxModule,
5513
+ MatchaRadioModule,
5443
5514
  MatchaChipsModule,
5444
5515
  MatchaDatepickerModule,
5445
5516
  MatchaDividerModule,
@@ -5456,7 +5527,6 @@ class MatchaComponentsModule {
5456
5527
  MatchaModalModule,
5457
5528
  MatchaPaginatorModule,
5458
5529
  MatchaProgressBarModule,
5459
- MatchaRadioButtonModule,
5460
5530
  MatchaRippleModule,
5461
5531
  MatchaSelectModule,
5462
5532
  MatchaSidenavModule,
@@ -5481,6 +5551,7 @@ class MatchaComponentsModule {
5481
5551
  MatchaButtonToggleModule,
5482
5552
  MatchaCardModule,
5483
5553
  MatchaCheckboxModule,
5554
+ MatchaRadioModule,
5484
5555
  MatchaChipsModule,
5485
5556
  MatchaDatepickerModule,
5486
5557
  MatchaDividerModule,
@@ -5498,7 +5569,6 @@ class MatchaComponentsModule {
5498
5569
  MatchaOptionModule,
5499
5570
  MatchaPaginatorModule,
5500
5571
  MatchaProgressBarModule,
5501
- MatchaRadioButtonModule,
5502
5572
  MatchaRippleModule,
5503
5573
  MatchaSelectModule,
5504
5574
  MatchaSidenavModule,
@@ -5534,6 +5604,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImpor
5534
5604
  MatchaButtonToggleModule,
5535
5605
  MatchaCardModule,
5536
5606
  MatchaCheckboxModule,
5607
+ MatchaRadioModule,
5537
5608
  MatchaChipsModule,
5538
5609
  MatchaDatepickerModule,
5539
5610
  MatchaDividerModule,
@@ -5550,7 +5621,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImpor
5550
5621
  MatchaModalModule,
5551
5622
  MatchaPaginatorModule,
5552
5623
  MatchaProgressBarModule,
5553
- MatchaRadioButtonModule,
5554
5624
  MatchaRippleModule,
5555
5625
  MatchaSelectModule,
5556
5626
  MatchaSidenavModule,
@@ -5577,6 +5647,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImpor
5577
5647
  MatchaButtonToggleModule,
5578
5648
  MatchaCardModule,
5579
5649
  MatchaCheckboxModule,
5650
+ MatchaRadioModule,
5580
5651
  MatchaChipsModule,
5581
5652
  MatchaDatepickerModule,
5582
5653
  MatchaDividerModule,
@@ -5594,7 +5665,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImpor
5594
5665
  MatchaOptionModule,
5595
5666
  MatchaPaginatorModule,
5596
5667
  MatchaProgressBarModule,
5597
- MatchaRadioButtonModule,
5598
5668
  MatchaRippleModule,
5599
5669
  MatchaSelectModule,
5600
5670
  MatchaSidenavModule,
@@ -5680,5 +5750,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImpor
5680
5750
  * Generated bundle index. Do not edit.
5681
5751
  */
5682
5752
 
5683
- export { MatchaAccordionComponent, MatchaAccordionContentComponent, MatchaAccordionHeaderComponent, MatchaAccordionItemComponent, MatchaAccordionModule, MatchaAutocompleteComponent, MatchaAutocompleteDirective, MatchaAutocompleteModule, MatchaBadgeDirective, MatchaBadgeModule, MatchaButtonComponent, MatchaButtonModule, MatchaButtonToggleComponent, MatchaButtonToggleModule, MatchaCardComponent, MatchaCardModule, MatchaCheckboxComponent, MatchaCheckboxModule, MatchaChipsDirective, MatchaChipsModule, MatchaComponentsModule, MatchaDateComponent, MatchaDateModule, MatchaDatepickerDirective, MatchaDatepickerModule, MatchaDividerComponent, MatchaDividerModule, MatchaDragDirective, MatchaDragHandleDirective, MatchaDropListComponent, MatchaDropListModule, MatchaElevationDirective, MatchaElevationModule, MatchaErrorComponent, MatchaFormFieldComponent, MatchaFormFieldModule, MatchaGridComponent, MatchaGridModule, MatchaHintTextComponent, MatchaHintTextModule, MatchaIconComponent, MatchaIconModule, MatchaInfiniteScrollComponent, MatchaInfiniteScrollDataComponent, MatchaInfiniteScrollModule, MatchaInputDirective, MatchaInputModule, MatchaLabelComponent, MatchaLazyloadComponent, MatchaLazyloadDataComponent, MatchaLazyloadModule, MatchaMasonryComponent, MatchaMasonryModule, MatchaMenuComponent, MatchaMenuModule, MatchaMenuTriggerForDirective, MatchaModalComponent, MatchaModalContentComponent, MatchaModalFooterComponent, MatchaModalHeaderComponent, MatchaModalModule, MatchaModalOptionsComponent, MatchaModalService, MatchaOptionComponent, MatchaOptionModule, MatchaOptionService, MatchaOverlayService, MatchaPageLayoutComponent, MatchaPageLayoutModule, MatchaPaginatorDirective, MatchaPaginatorModule, MatchaProgressBarDirective, MatchaProgressBarModule, MatchaRadioButtonDirective, MatchaRadioButtonModule, MatchaRippleDirective, MatchaRippleModule, MatchaSelectDirective, MatchaSelectModule, MatchaSidenavDirective, MatchaSidenavModule, MatchaSkeletonComponent, MatchaSkeletonModule, MatchaSlideToggleComponent, MatchaSlideToggleModule, MatchaSliderDirective, MatchaSliderModule, MatchaSnackBarDirective, MatchaSnackBarModule, MatchaSortHeaderDirective, MatchaSortHeaderModule, MatchaSpinComponent, MatchaSpinModule, MatchaSpinnerComponent, MatchaSpinnerModule, MatchaStepperComponent, MatchaStepperContentComponent, MatchaStepperControllerComponent, MatchaStepperModule, MatchaStepperStateService, MatchaTabItemComponent, MatchaTableDirective, MatchaTableModule, MatchaTabsComponent, MatchaTabsModule, MatchaTimeComponent, MatchaTimeModule, MatchaTitleComponent, MatchaTitleModule, MatchaToolbarButtonComponent, MatchaToolbarComponent, MatchaToolbarContentComponent, MatchaToolbarCustomButtonComponent, MatchaToolbarMainButtonComponent, MatchaToolbarModule, MatchaTooltipDirective, MatchaTooltipModule, NextStepDirective, PrevStepDirective, StepComponent, StepContentDirective };
5753
+ export { MatchaAccordionComponent, MatchaAccordionContentComponent, MatchaAccordionHeaderComponent, MatchaAccordionItemComponent, MatchaAccordionModule, MatchaAutocompleteComponent, MatchaAutocompleteDirective, MatchaAutocompleteModule, MatchaBadgeDirective, MatchaBadgeModule, MatchaButtonComponent, MatchaButtonModule, MatchaButtonToggleComponent, MatchaButtonToggleModule, MatchaCardComponent, MatchaCardModule, MatchaCheckboxComponent, MatchaCheckboxModule, MatchaChipsDirective, MatchaChipsModule, MatchaComponentsModule, MatchaDateComponent, MatchaDateModule, MatchaDatepickerDirective, MatchaDatepickerModule, MatchaDividerComponent, MatchaDividerModule, MatchaDragDirective, MatchaDragHandleDirective, MatchaDropListComponent, MatchaDropListModule, MatchaElevationDirective, MatchaElevationModule, MatchaErrorComponent, MatchaFormFieldComponent, MatchaFormFieldModule, MatchaGridComponent, MatchaGridModule, MatchaHintTextComponent, MatchaHintTextModule, MatchaIconComponent, MatchaIconModule, MatchaInfiniteScrollComponent, MatchaInfiniteScrollDataComponent, MatchaInfiniteScrollModule, MatchaInputDirective, MatchaInputModule, MatchaLabelComponent, MatchaLazyloadComponent, MatchaLazyloadDataComponent, MatchaLazyloadModule, MatchaMasonryComponent, MatchaMasonryModule, MatchaMenuComponent, MatchaMenuModule, MatchaMenuTriggerForDirective, MatchaModalComponent, MatchaModalContentComponent, MatchaModalFooterComponent, MatchaModalHeaderComponent, MatchaModalModule, MatchaModalOptionsComponent, MatchaModalService, MatchaOptionComponent, MatchaOptionModule, MatchaOptionService, MatchaOverlayService, MatchaPageLayoutComponent, MatchaPageLayoutModule, MatchaPaginatorDirective, MatchaPaginatorModule, MatchaProgressBarDirective, MatchaProgressBarModule, MatchaRadioComponent, MatchaRadioModule, MatchaRippleDirective, MatchaRippleModule, MatchaSelectDirective, MatchaSelectModule, MatchaSidenavDirective, MatchaSidenavModule, MatchaSkeletonComponent, MatchaSkeletonModule, MatchaSlideToggleComponent, MatchaSlideToggleModule, MatchaSliderDirective, MatchaSliderModule, MatchaSnackBarDirective, MatchaSnackBarModule, MatchaSortHeaderDirective, MatchaSortHeaderModule, MatchaSpinComponent, MatchaSpinModule, MatchaSpinnerComponent, MatchaSpinnerModule, MatchaStepperComponent, MatchaStepperContentComponent, MatchaStepperControllerComponent, MatchaStepperModule, MatchaStepperStateService, MatchaTabItemComponent, MatchaTableDirective, MatchaTableModule, MatchaTabsComponent, MatchaTabsModule, MatchaTimeComponent, MatchaTimeModule, MatchaTitleComponent, MatchaTitleModule, MatchaToolbarButtonComponent, MatchaToolbarComponent, MatchaToolbarContentComponent, MatchaToolbarCustomButtonComponent, MatchaToolbarMainButtonComponent, MatchaToolbarModule, MatchaTooltipDirective, MatchaTooltipModule, NextStepDirective, PrevStepDirective, StepComponent, StepContentDirective };
5684
5754
  //# sourceMappingURL=matcha-components.mjs.map