@klippa/ngx-enhancy-forms 12.0.0 → 12.1.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/esm2020/lib/elements/radio/radio.component.mjs +30 -0
- package/esm2020/lib/ngx-enhancy-forms.module.mjs +10 -5
- package/esm2020/public-api.mjs +2 -1
- package/fesm2015/klippa-ngx-enhancy-forms.mjs +34 -5
- package/fesm2015/klippa-ngx-enhancy-forms.mjs.map +1 -1
- package/fesm2020/klippa-ngx-enhancy-forms.mjs +34 -5
- package/fesm2020/klippa-ngx-enhancy-forms.mjs.map +1 -1
- package/lib/elements/radio/radio.component.d.ts +18 -0
- package/lib/ngx-enhancy-forms.module.d.ts +7 -6
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
|
@@ -1840,6 +1840,31 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImpor
|
|
|
1840
1840
|
type: Input
|
|
1841
1841
|
}] } });
|
|
1842
1842
|
|
|
1843
|
+
var Orientation;
|
|
1844
|
+
(function (Orientation) {
|
|
1845
|
+
Orientation["COLUMN"] = "column";
|
|
1846
|
+
Orientation["ROW"] = "row";
|
|
1847
|
+
})(Orientation || (Orientation = {}));
|
|
1848
|
+
class RadioComponent extends ValueAccessorBase {
|
|
1849
|
+
constructor() {
|
|
1850
|
+
super(...arguments);
|
|
1851
|
+
this.orientation = Orientation.ROW;
|
|
1852
|
+
this.variant = 'classic';
|
|
1853
|
+
}
|
|
1854
|
+
}
|
|
1855
|
+
RadioComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: RadioComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
1856
|
+
RadioComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.8", type: RadioComponent, selector: "klp-form-radio", inputs: { options: "options", orientation: "orientation", variant: "variant" }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: RadioComponent, multi: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"componentContainer\" [class]=\"orientation\">\n\t<ng-container *ngFor=\"let option of options\">\n\t\t<button class=\"optionContainer\"\n\t\t\t[ngClass]=\"{classic: variant === 'classic', button: variant === 'button', isSelected: innerValue === option.id}\"\n\t\t\t(click)=\"setInnerValueAndNotify(option.id)\"\n\t\t>\n\t\t\t<div class=\"selectedRadioBtnContainer\" *ngIf=\"variant === 'classic'\">\n\t\t\t\t<div class=\"selected\" *ngIf=\"innerValue === option.id\"></div>\n\t\t\t</div>\n\t\t\t<div>{{option.name}}</div>\n\t\t</button>\n\t</ng-container>\n</div>\n", styles: [":host{display:block}.componentContainer{position:relative;display:flex}.componentContainer.column{flex-direction:column}.componentContainer.column .optionContainer{margin-bottom:.3125rem}.componentContainer.column .optionContainer:last-child{margin-bottom:0}.componentContainer.row{flex-direction:row}.componentContainer.row .optionContainer:first-child{border-radius:6px 0 0 6px}.componentContainer.row .optionContainer:last-child{border-radius:0 6px 6px 0}.optionContainer{display:flex;flex-direction:row;margin-right:.3125rem;background:transparent;border:none;align-items:center}.optionContainer.classic{cursor:pointer}.optionContainer.classic .selectedRadioBtnContainer{position:relative;height:20px;width:20px;padding:4px;border-radius:50%;border:2px solid #e6ecf5;margin-right:.3125rem}.optionContainer.classic .selectedRadioBtnContainer .selected{height:100%;width:100%;display:block;border-radius:100%;background-color:#27bb5f}.optionContainer.button{position:relative;cursor:pointer;padding:10px 14px;margin-right:0;transition:all .3s ease-in-out;color:#27bb5f;border:1px solid #27bb5f;background-color:#fff}.optionContainer.button.isSelected{background:#27bb5f;color:#fff}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
1857
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: RadioComponent, decorators: [{
|
|
1858
|
+
type: Component,
|
|
1859
|
+
args: [{ selector: 'klp-form-radio', providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: RadioComponent, multi: true }], template: "<div class=\"componentContainer\" [class]=\"orientation\">\n\t<ng-container *ngFor=\"let option of options\">\n\t\t<button class=\"optionContainer\"\n\t\t\t[ngClass]=\"{classic: variant === 'classic', button: variant === 'button', isSelected: innerValue === option.id}\"\n\t\t\t(click)=\"setInnerValueAndNotify(option.id)\"\n\t\t>\n\t\t\t<div class=\"selectedRadioBtnContainer\" *ngIf=\"variant === 'classic'\">\n\t\t\t\t<div class=\"selected\" *ngIf=\"innerValue === option.id\"></div>\n\t\t\t</div>\n\t\t\t<div>{{option.name}}</div>\n\t\t</button>\n\t</ng-container>\n</div>\n", styles: [":host{display:block}.componentContainer{position:relative;display:flex}.componentContainer.column{flex-direction:column}.componentContainer.column .optionContainer{margin-bottom:.3125rem}.componentContainer.column .optionContainer:last-child{margin-bottom:0}.componentContainer.row{flex-direction:row}.componentContainer.row .optionContainer:first-child{border-radius:6px 0 0 6px}.componentContainer.row .optionContainer:last-child{border-radius:0 6px 6px 0}.optionContainer{display:flex;flex-direction:row;margin-right:.3125rem;background:transparent;border:none;align-items:center}.optionContainer.classic{cursor:pointer}.optionContainer.classic .selectedRadioBtnContainer{position:relative;height:20px;width:20px;padding:4px;border-radius:50%;border:2px solid #e6ecf5;margin-right:.3125rem}.optionContainer.classic .selectedRadioBtnContainer .selected{height:100%;width:100%;display:block;border-radius:100%;background-color:#27bb5f}.optionContainer.button{position:relative;cursor:pointer;padding:10px 14px;margin-right:0;transition:all .3s ease-in-out;color:#27bb5f;border:1px solid #27bb5f;background-color:#fff}.optionContainer.button.isSelected{background:#27bb5f;color:#fff}\n"] }]
|
|
1860
|
+
}], propDecorators: { options: [{
|
|
1861
|
+
type: Input
|
|
1862
|
+
}], orientation: [{
|
|
1863
|
+
type: Input
|
|
1864
|
+
}], variant: [{
|
|
1865
|
+
type: Input
|
|
1866
|
+
}] } });
|
|
1867
|
+
|
|
1843
1868
|
class NgxEnhancyFormsModule {
|
|
1844
1869
|
}
|
|
1845
1870
|
NgxEnhancyFormsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: NgxEnhancyFormsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
@@ -1867,7 +1892,8 @@ NgxEnhancyFormsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", v
|
|
|
1867
1892
|
FormSubmitButtonComponent,
|
|
1868
1893
|
FormComponent,
|
|
1869
1894
|
SubFormDirective,
|
|
1870
|
-
HourMinuteInputComponent
|
|
1895
|
+
HourMinuteInputComponent,
|
|
1896
|
+
RadioComponent], imports: [CommonModule,
|
|
1871
1897
|
FormsModule,
|
|
1872
1898
|
NgSelectModule,
|
|
1873
1899
|
SortablejsModule,
|
|
@@ -1895,7 +1921,8 @@ NgxEnhancyFormsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", v
|
|
|
1895
1921
|
FormSubmitButtonComponent,
|
|
1896
1922
|
FormComponent,
|
|
1897
1923
|
SubFormDirective,
|
|
1898
|
-
HourMinuteInputComponent
|
|
1924
|
+
HourMinuteInputComponent,
|
|
1925
|
+
RadioComponent] });
|
|
1899
1926
|
NgxEnhancyFormsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.8", ngImport: i0, type: NgxEnhancyFormsModule, imports: [CommonModule,
|
|
1900
1927
|
FormsModule,
|
|
1901
1928
|
NgSelectModule,
|
|
@@ -1936,7 +1963,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImpor
|
|
|
1936
1963
|
FormSubmitButtonComponent,
|
|
1937
1964
|
FormComponent,
|
|
1938
1965
|
SubFormDirective,
|
|
1939
|
-
HourMinuteInputComponent
|
|
1966
|
+
HourMinuteInputComponent,
|
|
1967
|
+
RadioComponent
|
|
1940
1968
|
],
|
|
1941
1969
|
exports: [
|
|
1942
1970
|
ValueAccessorBase,
|
|
@@ -1963,7 +1991,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImpor
|
|
|
1963
1991
|
FormSubmitButtonComponent,
|
|
1964
1992
|
FormComponent,
|
|
1965
1993
|
SubFormDirective,
|
|
1966
|
-
HourMinuteInputComponent
|
|
1994
|
+
HourMinuteInputComponent,
|
|
1995
|
+
RadioComponent
|
|
1967
1996
|
]
|
|
1968
1997
|
}]
|
|
1969
1998
|
}] });
|
|
@@ -1976,5 +2005,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.8", ngImpor
|
|
|
1976
2005
|
* Generated bundle index. Do not edit.
|
|
1977
2006
|
*/
|
|
1978
2007
|
|
|
1979
|
-
export { ButtonComponent, CheckboxComponent, DATE_PICKER_LOCALE, DATE_PICKER_TRANSLATIONS, DATE_TIME_PICKER_TRANSLATIONS, DEFAULT_ERROR_MESSAGES, DatePickerComponent, DateTimePickerComponent, EmailInputComponent, FORM_ERROR_MESSAGES, FileInputComponent, FormCaptionComponent, FormComponent, FormElementComponent, FormErrorComponent, FormSubmitButtonComponent, HourMinuteInputComponent, KLP_DATE_FORMATS, KlpSelectOptionTemplateDirective, LoadingIndicatorComponent, MultipleValueAccessorBase, NgxEnhancyFormsModule, NumberInputComponent, PasswordFieldComponent, SELECT_TRANSLATIONS, SelectComponent, SelectFooterComponent, SortableGroupedItemsComponent, SortableItemsComponent, SubFormDirective, TextInputComponent, ToggleComponent, ValueAccessorBase, dateValidator, invalidDateKey, invalidFieldsSymbol, matDateFormatsFactory };
|
|
2008
|
+
export { ButtonComponent, CheckboxComponent, DATE_PICKER_LOCALE, DATE_PICKER_TRANSLATIONS, DATE_TIME_PICKER_TRANSLATIONS, DEFAULT_ERROR_MESSAGES, DatePickerComponent, DateTimePickerComponent, EmailInputComponent, FORM_ERROR_MESSAGES, FileInputComponent, FormCaptionComponent, FormComponent, FormElementComponent, FormErrorComponent, FormSubmitButtonComponent, HourMinuteInputComponent, KLP_DATE_FORMATS, KlpSelectOptionTemplateDirective, LoadingIndicatorComponent, MultipleValueAccessorBase, NgxEnhancyFormsModule, NumberInputComponent, Orientation, PasswordFieldComponent, RadioComponent, SELECT_TRANSLATIONS, SelectComponent, SelectFooterComponent, SortableGroupedItemsComponent, SortableItemsComponent, SubFormDirective, TextInputComponent, ToggleComponent, ValueAccessorBase, dateValidator, invalidDateKey, invalidFieldsSymbol, matDateFormatsFactory };
|
|
1980
2009
|
//# sourceMappingURL=klippa-ngx-enhancy-forms.mjs.map
|