@kms-ngx-ui/presentational 20.5.0 → 20.8.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/kms-ngx-ui-presentational.mjs +70 -2
- package/fesm2022/kms-ngx-ui-presentational.mjs.map +1 -1
- package/index.d.ts +53 -28
- package/package.json +1 -1
- package/src/assets/icons.json +1 -1
- package/src/assets/llms.txt +18 -2
- package/src/assets/sprite.svg +1 -1
- package/src/lib/ui/molecules/button-toggle-group/button-toggle-group.component.scss +51 -0
- package/src/styles/styles.scss +2 -0
|
@@ -1445,7 +1445,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
1445
1445
|
class CheckboxComponent {
|
|
1446
1446
|
constructor() {
|
|
1447
1447
|
this.infoText = '';
|
|
1448
|
-
this.
|
|
1448
|
+
this._disabled = false;
|
|
1449
1449
|
/**
|
|
1450
1450
|
* Internal description name. All checkboxes with the same name belong to the same group.
|
|
1451
1451
|
* User can select none, one or all checkboxes with the same name.
|
|
@@ -1462,6 +1462,13 @@ class CheckboxComponent {
|
|
|
1462
1462
|
get checked() {
|
|
1463
1463
|
return this.innerControl.value ?? false;
|
|
1464
1464
|
}
|
|
1465
|
+
set disabled(value) {
|
|
1466
|
+
this._disabled = value;
|
|
1467
|
+
this.setDisabledState(value);
|
|
1468
|
+
}
|
|
1469
|
+
get disabled() {
|
|
1470
|
+
return this._disabled;
|
|
1471
|
+
}
|
|
1465
1472
|
valueChanged(value) {
|
|
1466
1473
|
this.onChange(value);
|
|
1467
1474
|
this.innerControl.setValue(value, { emitEvent: false });
|
|
@@ -2269,6 +2276,63 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
2269
2276
|
args: [{ selector: 'kms-button', standalone: false, template: "<!-- Basic -->\n@if (appearance() == ButtonAppearance.BASIC) {\n<button\n mat-button\n [color]=\"color()\"\n class=\"kms-button\"\n [ngClass]=\"{\n 'kms-button--loading': loading(),\n 'kms-button--basic-primary': color() === StylingTheme.PRIMARY,\n 'kms-button--basic-accent': color() === StylingTheme.SECONDARY,\n 'kms-button--basic-warn': color() === StylingTheme.WARN,\n 'kms-button--rounded': rounded()\n }\"\n [disabled]=\"disabled() || loading()\"\n (click)=\"buttonClick.emit($event)\"\n [type]=\"type()\"\n (keyup)=\"\n ($event.key === 'Enter' || $event.key === 'Space') &&\n buttonClick.emit($event)\n \"\n>\n <ng-container *ngTemplateOutlet=\"buttonTemplate\"></ng-container>\n</button>\n}\n\n<!-- Flat -->\n@else if (appearance() == ButtonAppearance.FLAT) {\n<button\n mat-flat-button\n [color]=\"color()\"\n class=\"kms-button\"\n [ngClass]=\"{\n 'kms-button--loading': loading(),\n 'kms-button--flat-primary': color() === StylingTheme.PRIMARY,\n 'kms-button--flat-accent': color() === StylingTheme.SECONDARY,\n 'kms-button--flat-warn': color() === StylingTheme.WARN,\n 'kms-button--rounded': rounded()\n }\"\n [disabled]=\"disabled() || loading()\"\n (click)=\"buttonClick.emit($event)\"\n [type]=\"type()\"\n (keyup)=\"\n ($event.key === 'Enter' || $event.key === 'Space') &&\n buttonClick.emit($event)\n \"\n>\n <ng-container *ngTemplateOutlet=\"buttonTemplate\"></ng-container>\n</button>\n}\n\n<!-- Raised -->\n@else if (appearance() == ButtonAppearance.RAISED) {\n<button\n mat-raised-button\n [color]=\"color()\"\n class=\"kms-button\"\n [ngClass]=\"{\n 'kms-button--loading': loading(),\n 'kms-button--raised-primary': color() === StylingTheme.PRIMARY,\n 'kms-button--raised-accent': color() === StylingTheme.SECONDARY,\n 'kms-button--raised-warn': color() === StylingTheme.WARN,\n 'kms-button--rounded': rounded()\n }\"\n [disabled]=\"disabled() || loading()\"\n (click)=\"buttonClick.emit($event)\"\n [type]=\"type()\"\n (keyup)=\"\n ($event.key === 'Enter' || $event.key === 'Space') &&\n buttonClick.emit($event)\n \"\n>\n <ng-container *ngTemplateOutlet=\"buttonTemplate\"></ng-container>\n</button>\n}\n\n<ng-template #buttonTemplate>\n @if (loading()) {\n <mat-spinner class=\"kms-button__spinner\" diameter=\"22\"></mat-spinner>\n } @if (icon()) {\n <kms-icon\n class=\"kms-button__icon\"\n [color]=\"iconColor()\"\n [size]=\"IconSize.XXS\"\n [icon]=\"icon()\"\n ></kms-icon>\n }\n {{ label() }}\n</ng-template>\n" }]
|
|
2270
2277
|
}], propDecorators: { color: [{ type: i0.Input, args: [{ isSignal: true, alias: "color", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], appearance: [{ type: i0.Input, args: [{ isSignal: true, alias: "appearance", required: false }] }], loading: [{ type: i0.Input, args: [{ isSignal: true, alias: "loading", required: false }] }], label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], icon: [{ type: i0.Input, args: [{ isSignal: true, alias: "icon", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], buttonClick: [{ type: i0.Output, args: ["buttonClick"] }], rounded: [{ type: i0.Input, args: [{ isSignal: true, alias: "rounded", required: false }] }] } });
|
|
2271
2278
|
|
|
2279
|
+
class ButtonToggleGroupComponent {
|
|
2280
|
+
constructor() {
|
|
2281
|
+
this.options = [];
|
|
2282
|
+
this.disabled = false;
|
|
2283
|
+
this.rounded = false;
|
|
2284
|
+
this.value = null;
|
|
2285
|
+
this.ButtonAppearance = ButtonAppearance;
|
|
2286
|
+
this.StylingTheme = StylingTheme;
|
|
2287
|
+
this.onChange = (value) => {
|
|
2288
|
+
this.value = value;
|
|
2289
|
+
};
|
|
2290
|
+
this.onTouched = () => { };
|
|
2291
|
+
}
|
|
2292
|
+
writeValue(value) {
|
|
2293
|
+
this.value = value;
|
|
2294
|
+
}
|
|
2295
|
+
registerOnChange(fn) {
|
|
2296
|
+
this.onChange = fn;
|
|
2297
|
+
}
|
|
2298
|
+
registerOnTouched(fn) {
|
|
2299
|
+
this.onTouched = fn;
|
|
2300
|
+
}
|
|
2301
|
+
select(option) {
|
|
2302
|
+
if (this.disabled || option.Disabled)
|
|
2303
|
+
return;
|
|
2304
|
+
this.value = option.Value;
|
|
2305
|
+
this.onChange(option.Value);
|
|
2306
|
+
this.onTouched();
|
|
2307
|
+
}
|
|
2308
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ButtonToggleGroupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2309
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: ButtonToggleGroupComponent, isStandalone: false, selector: "kms-button-toggle-group", inputs: { options: "options", disabled: "disabled", rounded: "rounded", value: "value" }, providers: [
|
|
2310
|
+
{
|
|
2311
|
+
provide: NG_VALUE_ACCESSOR,
|
|
2312
|
+
useExisting: forwardRef(() => ButtonToggleGroupComponent),
|
|
2313
|
+
multi: true,
|
|
2314
|
+
},
|
|
2315
|
+
], ngImport: i0, template: "<div\n class=\"kms-button-toggle-group\"\n [class.kms-button-toggle-group--disabled]=\"disabled\"\n [class.kms-button-toggle-group--rounded]=\"rounded\"\n>\n @for (option of options; track option.Value) {\n <kms-button\n class=\"kms-button-toggle-group__item\"\n [class.kms-button-toggle-group__item--active]=\"value === option.Value\"\n [appearance]=\"ButtonAppearance.BASIC\"\n [color]=\"StylingTheme.SECONDARY\"\n [label]=\"option.Text\"\n [icon]=\"option.Icon\"\n [disabled]=\"disabled || option.Disabled\"\n (buttonClick)=\"select(option)\"\n ></kms-button>\n }\n</div>\n", styles: [""], dependencies: [{ kind: "component", type: ButtonComponent, selector: "kms-button", inputs: ["color", "type", "appearance", "loading", "label", "icon", "disabled", "rounded"], outputs: ["buttonClick"] }] }); }
|
|
2316
|
+
}
|
|
2317
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ButtonToggleGroupComponent, decorators: [{
|
|
2318
|
+
type: Component,
|
|
2319
|
+
args: [{ standalone: false, selector: 'kms-button-toggle-group', providers: [
|
|
2320
|
+
{
|
|
2321
|
+
provide: NG_VALUE_ACCESSOR,
|
|
2322
|
+
useExisting: forwardRef(() => ButtonToggleGroupComponent),
|
|
2323
|
+
multi: true,
|
|
2324
|
+
},
|
|
2325
|
+
], template: "<div\n class=\"kms-button-toggle-group\"\n [class.kms-button-toggle-group--disabled]=\"disabled\"\n [class.kms-button-toggle-group--rounded]=\"rounded\"\n>\n @for (option of options; track option.Value) {\n <kms-button\n class=\"kms-button-toggle-group__item\"\n [class.kms-button-toggle-group__item--active]=\"value === option.Value\"\n [appearance]=\"ButtonAppearance.BASIC\"\n [color]=\"StylingTheme.SECONDARY\"\n [label]=\"option.Text\"\n [icon]=\"option.Icon\"\n [disabled]=\"disabled || option.Disabled\"\n (buttonClick)=\"select(option)\"\n ></kms-button>\n }\n</div>\n" }]
|
|
2326
|
+
}], propDecorators: { options: [{
|
|
2327
|
+
type: Input
|
|
2328
|
+
}], disabled: [{
|
|
2329
|
+
type: Input
|
|
2330
|
+
}], rounded: [{
|
|
2331
|
+
type: Input
|
|
2332
|
+
}], value: [{
|
|
2333
|
+
type: Input
|
|
2334
|
+
}] } });
|
|
2335
|
+
|
|
2272
2336
|
class TooltipIconComponent {
|
|
2273
2337
|
constructor() {
|
|
2274
2338
|
this.tooltipText = input('', ...(ngDevMode ? [{ debugName: "tooltipText" }] : []));
|
|
@@ -5157,6 +5221,7 @@ class KmsUiPresentationalModule {
|
|
|
5157
5221
|
SliderComponent,
|
|
5158
5222
|
CardComponent,
|
|
5159
5223
|
ButtonComponent,
|
|
5224
|
+
ButtonToggleGroupComponent,
|
|
5160
5225
|
NumericInputComponent,
|
|
5161
5226
|
GenericFormComponent,
|
|
5162
5227
|
FormSectionComponent,
|
|
@@ -5222,6 +5287,7 @@ class KmsUiPresentationalModule {
|
|
|
5222
5287
|
SliderComponent,
|
|
5223
5288
|
CardComponent,
|
|
5224
5289
|
ButtonComponent,
|
|
5290
|
+
ButtonToggleGroupComponent,
|
|
5225
5291
|
NumericInputComponent,
|
|
5226
5292
|
GenericFormComponent,
|
|
5227
5293
|
FormSectionComponent,
|
|
@@ -5291,6 +5357,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
5291
5357
|
SliderComponent,
|
|
5292
5358
|
CardComponent,
|
|
5293
5359
|
ButtonComponent,
|
|
5360
|
+
ButtonToggleGroupComponent,
|
|
5294
5361
|
NumericInputComponent,
|
|
5295
5362
|
GenericFormComponent,
|
|
5296
5363
|
FormSectionComponent,
|
|
@@ -5362,6 +5429,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
5362
5429
|
SliderComponent,
|
|
5363
5430
|
CardComponent,
|
|
5364
5431
|
ButtonComponent,
|
|
5432
|
+
ButtonToggleGroupComponent,
|
|
5365
5433
|
NumericInputComponent,
|
|
5366
5434
|
GenericFormComponent,
|
|
5367
5435
|
FormSectionComponent,
|
|
@@ -5460,5 +5528,5 @@ var FormLayout;
|
|
|
5460
5528
|
* Generated bundle index. Do not edit.
|
|
5461
5529
|
*/
|
|
5462
5530
|
|
|
5463
|
-
export { BackToTopComponent, Breakpoint, ButtonAppearance, ButtonComponent, ButtonResponseType, CardComponent, CheckboxComponent, Color, ColorInputComponent, ConfirmationDialogComponent, CustomPipesModule, DateInputComponent, DirectivesModule, DropdownFromDataComponent, DynamicFieldDirective, EnumRadiogroupComponent, FieldRegistryService, FieldType, FileInputComponent, FlyoutComponent, FormActionsComponent, FormFieldComponent, FormLayout, FormParentComponent, FormSectionComponent, GenericFormComponent, GenericFormModule, GenericFormService, GetMaxHeightDirective, IconComponent, IconSizePx, IconSizesArr, ImageSliderComponent, ImageSnippet, ImageSourceType, ImageUploadComponent, InlineAlertComponent, IntegerCurrency, KMSAccordionItemComponent, KeyValuePair, KmsTabContentDirective, KmsUiPresentationalComponent, KmsUiPresentationalModule, KmsUiPresentationalService, LabelValuePair, LoaderComponent, MapComponent, Marker, MarkerLabel, MarkerOptions, NumericInputComponent, PasswordComponent, RadioButtonComponent, RadioButtonSize, RadioGroupComponent, SafeHtmlPipe, SafeResourceUrlPipe, SafeUrlPipe, SalutationDropdownComponent, SalutationEnum, SalutationRadiogroupComponent, SanitizeNullPipe, SimpleBreakpoint, SlideToggleComponent, SliderComponent, StylingTheme, SwipeDirective, TabGroupComponent, TextInputComponent, TextValuePair, TextValuePairArray, TimeDirective, TimeInputComponent, TooltipDirective, TooltipIconComponent, TrimPipe, TypeofPipe, ViewportService, WindowDimensions, YesNoRadiogroupComponent, noSpecialCharsOnly, noWhitespaceOnly };
|
|
5531
|
+
export { BackToTopComponent, Breakpoint, ButtonAppearance, ButtonComponent, ButtonResponseType, ButtonToggleGroupComponent, CardComponent, CheckboxComponent, Color, ColorInputComponent, ConfirmationDialogComponent, CustomPipesModule, DateInputComponent, DirectivesModule, DropdownFromDataComponent, DynamicFieldDirective, EnumRadiogroupComponent, FieldRegistryService, FieldType, FileInputComponent, FlyoutComponent, FormActionsComponent, FormFieldComponent, FormLayout, FormParentComponent, FormSectionComponent, GenericFormComponent, GenericFormModule, GenericFormService, GetMaxHeightDirective, IconComponent, IconSizePx, IconSizesArr, ImageSliderComponent, ImageSnippet, ImageSourceType, ImageUploadComponent, InlineAlertComponent, IntegerCurrency, KMSAccordionItemComponent, KeyValuePair, KmsTabContentDirective, KmsUiPresentationalComponent, KmsUiPresentationalModule, KmsUiPresentationalService, LabelValuePair, LoaderComponent, MapComponent, Marker, MarkerLabel, MarkerOptions, NumericInputComponent, PasswordComponent, RadioButtonComponent, RadioButtonSize, RadioGroupComponent, SafeHtmlPipe, SafeResourceUrlPipe, SafeUrlPipe, SalutationDropdownComponent, SalutationEnum, SalutationRadiogroupComponent, SanitizeNullPipe, SimpleBreakpoint, SlideToggleComponent, SliderComponent, StylingTheme, SwipeDirective, TabGroupComponent, TextInputComponent, TextValuePair, TextValuePairArray, TimeDirective, TimeInputComponent, TooltipDirective, TooltipIconComponent, TrimPipe, TypeofPipe, ViewportService, WindowDimensions, YesNoRadiogroupComponent, noSpecialCharsOnly, noWhitespaceOnly };
|
|
5464
5532
|
//# sourceMappingURL=kms-ngx-ui-presentational.mjs.map
|