From fe7e52a211419b20d0e591bb6f7e0b3b2cc97d63 Mon Sep 17 00:00:00 2001 From: Silvia Ivanova <59446295+SisIvanova@users.noreply.github.com> Date: Thu, 15 Feb 2024 14:36:34 +0200 Subject: [PATCH] feat(icon-button): create component samples (#3412) --- .../configs/IconButtonConfigGenerator.ts | 101 ++++++++++++++++++ live-editing/generators/ConfigGenerators.ts | 2 + projects/app-crm/src/app/app.module.ts | 5 +- projects/app-lob/src/app/app.module.ts | 5 +- .../app/grid-finjs/grid-finjs.component.html | 2 +- src/app/data-display/data-display.module.ts | 6 +- .../text-highlight-sample-1.component.html | 2 +- .../text-highlight-sample-2.component.html | 2 +- .../text-highlight-style.component.html | 2 +- .../buttons-disabled-sample.html | 2 +- .../buttons-display-density.component.html | 2 +- .../buttons-roundness-sample.html | 6 +- .../buttons-roundness-sample.scss | 10 +- .../buttons-sample-1.component.html | 2 +- .../buttons-sample-5.component.html | 2 +- .../data-entries/data-entries-routes-data.ts | 10 +- .../data-entries-routing.module.ts | 48 +++++++++ src/app/data-entries/data-entries.module.ts | 19 +++- ...grid-hierarchical-selection.component.html | 1 - .../contained-icon-button.component.html | 5 + .../contained-icon-button.component.scss | 5 + .../contained-icon-button.component.ts | 10 ++ .../disabled-icon-button.component.html | 5 + .../disabled-icon-button.component.scss | 9 ++ .../disabled-icon-button.component.ts | 10 ++ .../flat-icon-button.component.html | 5 + .../flat-icon-button.component.scss | 5 + .../flat-icon-button.component.ts | 10 ++ .../icon-button-overview.component.html | 17 +++ .../icon-button-overview.component.scss | 13 +++ .../icon-button-overview.component.ts | 10 ++ .../icon-button-size.component.html | 17 +++ .../icon-button-size.component.scss | 25 +++++ .../icon-button-size.component.ts | 10 ++ .../icon-button-styling.component.html | 17 +++ .../icon-button-styling.component.scss | 48 +++++++++ .../icon-button-styling.component.ts | 10 ++ .../outlined-icon-button.component.html | 5 + .../outlined-icon-button.component.scss | 5 + .../outlined-icon-button.component.ts | 9 ++ .../svg-icon-button.component.html | 5 + .../svg-icon-button.component.scss | 5 + .../svg-icon-button.component.ts | 17 +++ .../radio-group-sample.component.scss | 2 +- .../grid-action-strip-sample.html | 10 +- .../grid-cascading-combos.component.scss | 2 +- .../crud-sample.component.html | 2 +- .../grid-editing-sample.component.scss | 2 +- ...excel-style-filtering-style.component.scss | 4 +- src/app/grid/grids.module.ts | 5 +- .../multi-column-headers.html | 4 +- .../multi-column-headers.scss | 2 +- .../hgrid-rowClasses.component.scss | 2 +- .../hgrid-rowStyles.component.scss | 2 +- ...hierarchical-grid-action-strip-sample.html | 10 +- .../hierarchical-grid-add-row.component.scss | 2 +- ...id-advanced-filtering-style.component.scss | 4 +- ...archical-grid-batch-editing.component.scss | 2 +- .../hierarchical-grid-editing.component.scss | 2 +- ...excel-style-filtering-style.component.scss | 4 +- ...rarchical-grid-multi-column.component.scss | 2 +- .../hierarchical-grid.module.ts | 5 +- src/app/index/index.component.scss | 2 +- src/app/interactions/interactions.module.ts | 6 +- ...rlay-preset-settings-sample.component.scss | 2 +- .../query-builder-style.component.scss | 6 +- src/app/layouts/layouts.module.ts | 4 +- .../tabs-header-prefix-suffix.html | 2 +- src/app/lists/lists.module.ts | 6 +- src/app/menus/menus.module.ts | 4 +- src/app/notifications/notifications.module.ts | 5 +- src/app/pagination/pagination.module.ts | 5 +- .../calendar-sample-7.component.scss | 2 +- .../multiview/multiview.component.scss | 2 +- .../default-theme-sample.component.scss | 2 +- .../card-sample-shadow.html | 4 +- src/app/theming/theming.module.ts | 3 +- .../tree-grid-action-strip-sample.html | 10 +- ...id-advanced-filtering-style.component.scss | 4 +- ...excel-style-filtering-style.component.scss | 4 +- ...multi-column-headers-sample.component.scss | 2 +- src/app/tree-grid/tree-grid.module.ts | 4 +- 82 files changed, 562 insertions(+), 91 deletions(-) create mode 100644 live-editing/configs/IconButtonConfigGenerator.ts create mode 100644 src/app/data-entries/icon-button/contained-icon-button/contained-icon-button.component.html create mode 100644 src/app/data-entries/icon-button/contained-icon-button/contained-icon-button.component.scss create mode 100644 src/app/data-entries/icon-button/contained-icon-button/contained-icon-button.component.ts create mode 100644 src/app/data-entries/icon-button/disabled-icon-button/disabled-icon-button.component.html create mode 100644 src/app/data-entries/icon-button/disabled-icon-button/disabled-icon-button.component.scss create mode 100644 src/app/data-entries/icon-button/disabled-icon-button/disabled-icon-button.component.ts create mode 100644 src/app/data-entries/icon-button/flat-icon-button/flat-icon-button.component.html create mode 100644 src/app/data-entries/icon-button/flat-icon-button/flat-icon-button.component.scss create mode 100644 src/app/data-entries/icon-button/flat-icon-button/flat-icon-button.component.ts create mode 100644 src/app/data-entries/icon-button/icon-button-overview/icon-button-overview.component.html create mode 100644 src/app/data-entries/icon-button/icon-button-overview/icon-button-overview.component.scss create mode 100644 src/app/data-entries/icon-button/icon-button-overview/icon-button-overview.component.ts create mode 100644 src/app/data-entries/icon-button/icon-button-size/icon-button-size.component.html create mode 100644 src/app/data-entries/icon-button/icon-button-size/icon-button-size.component.scss create mode 100644 src/app/data-entries/icon-button/icon-button-size/icon-button-size.component.ts create mode 100644 src/app/data-entries/icon-button/icon-button-styling/icon-button-styling.component.html create mode 100644 src/app/data-entries/icon-button/icon-button-styling/icon-button-styling.component.scss create mode 100644 src/app/data-entries/icon-button/icon-button-styling/icon-button-styling.component.ts create mode 100644 src/app/data-entries/icon-button/outlined-icon-button/outlined-icon-button.component.html create mode 100644 src/app/data-entries/icon-button/outlined-icon-button/outlined-icon-button.component.scss create mode 100644 src/app/data-entries/icon-button/outlined-icon-button/outlined-icon-button.component.ts create mode 100644 src/app/data-entries/icon-button/svg-icon-button/svg-icon-button.component.html create mode 100644 src/app/data-entries/icon-button/svg-icon-button/svg-icon-button.component.scss create mode 100644 src/app/data-entries/icon-button/svg-icon-button/svg-icon-button.component.ts diff --git a/live-editing/configs/IconButtonConfigGenerator.ts b/live-editing/configs/IconButtonConfigGenerator.ts new file mode 100644 index 0000000000..3b6fcbe843 --- /dev/null +++ b/live-editing/configs/IconButtonConfigGenerator.ts @@ -0,0 +1,101 @@ +import {IgxButtonGroupModule, + IgxButtonModule, + IgxIconButtonDirective, + IgxIconModule, + IgxRippleModule} from 'igniteui-angular'; +import {AppModuleConfig, Config, IConfigGenerator} from 'igniteui-live-editing' +export class IconButtonConfigGenerator implements IConfigGenerator { + public generateConfigs(): Config[] { + const configs = new Array(); + + // icon button overview + configs.push(new Config({ + component: 'IconButtonOverviewComponent', + appModuleConfig: new AppModuleConfig({ + imports: ['IgxButtonModule', 'IgxIconModule', 'IgxRippleModule', 'IgxIconButtonDirective', 'IconButtonOverviewComponent'], + ngDeclarations: ['IconButtonOverviewComponent'], + ngImports: ['IgxButtonModule', 'IgxIconModule', 'IgxRippleModule', 'IgxIconButtonDirective'] + }), + shortenComponentPathBy: "/data-entries/icon-button/" + })); + + // flat icon button + configs.push(new Config({ + component: 'FlatIconButtonComponent', + appModuleConfig: new AppModuleConfig({ + imports: ['IgxButtonModule', 'IgxIconModule', 'IgxRippleModule', 'IgxIconButtonDirective', 'FlatIconButtonComponent'], + ngDeclarations: ['FlatIconButtonComponent'], + ngImports: ['IgxButtonModule', 'IgxIconModule', 'IgxRippleModule', 'IgxIconButtonDirective'] + }), + shortenComponentPathBy: "/data-entries/icon-button/" + })); + + // contained icon button + configs.push(new Config({ + component: 'ContainedIconButtonComponent', + appModuleConfig: new AppModuleConfig({ + imports: ['IgxButtonModule', 'IgxIconModule', 'IgxRippleModule', 'IgxIconButtonDirective', 'ContainedIconButtonComponent'], + ngDeclarations: ['ContainedIconButtonComponent'], + ngImports: ['IgxButtonModule', 'IgxIconModule', 'IgxRippleModule', 'IgxIconButtonDirective'] + }), + shortenComponentPathBy: "/data-entries/icon-button/" + })); + + // outlined icon button + configs.push(new Config({ + component: 'OutlinedIconButtonComponent', + appModuleConfig: new AppModuleConfig({ + imports: ['IgxButtonModule', 'IgxIconModule', 'IgxRippleModule', 'IgxIconButtonDirective', 'OutlinedIconButtonComponent'], + ngDeclarations: ['OutlinedIconButtonComponent'], + ngImports: ['IgxButtonModule', 'IgxIconModule', 'IgxRippleModule', 'IgxIconButtonDirective'] + }), + shortenComponentPathBy: "/data-entries/icon-button/" + })); + + // disabled icon button + configs.push(new Config({ + component: 'DisabledIconButtonComponent', + appModuleConfig: new AppModuleConfig({ + imports: ['IgxButtonModule', 'IgxIconModule', 'IgxRippleModule', 'IgxIconButtonDirective', 'DisabledIconButtonComponent'], + ngDeclarations: ['DisabledIconButtonComponent'], + ngImports: ['IgxButtonModule', 'IgxIconModule', 'IgxRippleModule', 'IgxIconButtonDirective'] + }), + shortenComponentPathBy: "/data-entries/icon-button/" + })); + + // SVG icon button + configs.push(new Config({ + component: 'SVGIconButtonComponent', + appModuleConfig: new AppModuleConfig({ + imports: ['IgxButtonModule', 'IgxIconModule', 'IgxRippleModule', 'IgxIconButtonDirective', 'SVGIconButtonComponent'], + ngDeclarations: ['SVGIconButtonComponent'], + ngImports: ['IgxButtonModule', 'IgxIconModule', 'IgxRippleModule', 'IgxIconButtonDirective'] + }), + shortenComponentPathBy: "/data-entries/icon-button/" + })); + + // icon button styling + configs.push(new Config({ + component: 'IconButtonStylingComponent', + appModuleConfig: new AppModuleConfig({ + imports: ['IgxButtonModule', 'IgxIconModule', 'IgxRippleModule', 'IgxIconButtonDirective', 'IconButtonStylingComponent'], + ngDeclarations: ['IconButtonStylingComponent'], + ngImports: ['IgxButtonModule', 'IgxIconModule', 'IgxRippleModule', 'IgxIconButtonDirective'] + }), + shortenComponentPathBy: "/data-entries/icon-button/" + })); + + // icon button size + configs.push(new Config({ + component: 'IconButtonSizeComponent', + appModuleConfig: new AppModuleConfig({ + imports: ['IgxButtonModule', 'IgxIconModule', 'IgxRippleModule', 'IgxIconButtonDirective', 'IconButtonSizeComponent'], + ngDeclarations: ['IconButtonSizeComponent'], + ngImports: ['IgxButtonModule', 'IgxIconModule', 'IgxRippleModule', 'IgxIconButtonDirective'] + }), + shortenComponentPathBy: "/data-entries/icon-button/" + })); + + return configs; + } +} diff --git a/live-editing/generators/ConfigGenerators.ts b/live-editing/generators/ConfigGenerators.ts index 15dc53e453..1c8e2d4ed9 100644 --- a/live-editing/generators/ConfigGenerators.ts +++ b/live-editing/generators/ConfigGenerators.ts @@ -28,6 +28,7 @@ import { ForConfigGenerator } from '../configs/ForConfigGenerator'; import { GridConfigGenerator } from '../configs/GridConfigGenerator'; import { HierarchicalGridConfigGenerator } from '../configs/HierarchicalGridConfigGenerator'; import { IconConfigGenerator } from '../configs/IconConfigGenerator'; +import { IconButtonConfigGenerator } from '../configs/IconButtonConfigGenerator'; import { InputGroupConfigGenerator } from '../configs/InputGroupConfigGenerator'; import { LayoutConfigGenerator } from '../configs/LayoutConfigGenerator'; import { LinearProgressbarConfigGenerator } from '../configs/LinearProgressbarConfigGenerator'; @@ -99,6 +100,7 @@ export const CONFIG_GENERATORS = DateRangePickerConfigGenerator, DateTimeEditorConfigGenerator, DropDownConfigGenerator, + IconButtonConfigGenerator, InputGroupConfigGenerator, MaskConfigGenerator, MonthPickerConfigGenerator, diff --git a/projects/app-crm/src/app/app.module.ts b/projects/app-crm/src/app/app.module.ts index 8cdfc77ddd..20a199aa65 100644 --- a/projects/app-crm/src/app/app.module.ts +++ b/projects/app-crm/src/app/app.module.ts @@ -4,7 +4,7 @@ import { BrowserModule, HammerModule } from '@angular/platform-browser'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { IgxAutocompleteModule, IgxButtonModule, IgxIconModule, IgxInputGroupModule, IgxLayoutModule, - IgxRippleModule, IgxGridModule, IgxAvatarModule, IgxProgressBarModule + IgxRippleModule, IgxGridModule, IgxAvatarModule, IgxProgressBarModule, IgxIconButtonDirective } from 'igniteui-angular'; import { IgxPreventDocumentScrollModule } from '../../../../src/app/directives/prevent-scroll.directive'; import { AppComponent } from './app.component'; @@ -33,7 +33,8 @@ import { SEOService } from '../../../app-lob/src/app/seo.service'; IgxProgressBarModule, FormsModule, IgxPreventDocumentScrollModule, - HammerModule + HammerModule, + IgxIconButtonDirective ], providers: [SEOService] }) diff --git a/projects/app-lob/src/app/app.module.ts b/projects/app-lob/src/app/app.module.ts index 40261e4148..624be0f764 100644 --- a/projects/app-lob/src/app/app.module.ts +++ b/projects/app-lob/src/app/app.module.ts @@ -4,7 +4,7 @@ import { FormsModule } from '@angular/forms'; import { BrowserModule, HammerModule } from '@angular/platform-browser'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { - IgxButtonModule, IgxFocusModule, IgxIconModule, IgxInputGroupModule, + IgxButtonModule, IgxFocusModule, IgxIconButtonDirective, IgxIconModule, IgxInputGroupModule, IgxLayoutModule, IgxNavbarModule, IgxNavigationDrawerModule, IgxRippleModule, IgxToggleModule } from 'igniteui-angular'; import { IgxExtrasModule } from 'igniteui-angular-extras'; @@ -38,7 +38,8 @@ import { SEOService } from './seo.service'; HammerModule, IgxExtrasModule, IgxFocusModule, - IgxToggleModule + IgxToggleModule, + IgxIconButtonDirective ], providers: [ SEOService diff --git a/projects/app-lob/src/app/grid-finjs/grid-finjs.component.html b/projects/app-lob/src/app/grid-finjs/grid-finjs.component.html index 1818dd2978..189321d008 100644 --- a/projects/app-lob/src/app/grid-finjs/grid-finjs.component.html +++ b/projects/app-lob/src/app/grid-finjs/grid-finjs.component.html @@ -95,7 +95,7 @@