@festo-ui/angular 3.1.0-pre-20220321.2 → 3.1.0-pre-20220323.1

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.
Files changed (26) hide show
  1. package/esm2020/lib/components/accordion/accordion-header/accordion-header.component.mjs +11 -0
  2. package/esm2020/lib/components/accordion/accordion-item/accordion-item-body/accordion-item-body.component.mjs +15 -0
  3. package/esm2020/lib/components/accordion/accordion-item/accordion-item-header/accordion-item-header.component.mjs +28 -0
  4. package/esm2020/lib/components/accordion/accordion-item/accordion-item.component.mjs +143 -0
  5. package/esm2020/lib/components/accordion/accordion.component.mjs +59 -0
  6. package/esm2020/lib/components/accordion/index.mjs +6 -0
  7. package/esm2020/lib/components/components.module.mjs +31 -5
  8. package/esm2020/lib/components/stepper-horizontal/step-horizontal/step-horizontal.component.mjs +5 -2
  9. package/fesm2015/festo-ui-angular.mjs +272 -7
  10. package/fesm2015/festo-ui-angular.mjs.map +1 -1
  11. package/fesm2020/festo-ui-angular.mjs +270 -7
  12. package/fesm2020/festo-ui-angular.mjs.map +1 -1
  13. package/lib/components/accordion/accordion-header/accordion-header.component.d.ts +5 -0
  14. package/lib/components/accordion/accordion-item/accordion-item-body/accordion-item-body.component.d.ts +6 -0
  15. package/lib/components/accordion/accordion-item/accordion-item-header/accordion-item-header.component.d.ts +15 -0
  16. package/lib/components/accordion/accordion-item/accordion-item.component.d.ts +34 -0
  17. package/lib/components/accordion/accordion.component.d.ts +24 -0
  18. package/lib/components/accordion/index.d.ts +5 -0
  19. package/lib/components/components.module.d.ts +11 -5
  20. package/lib/components/stepper-horizontal/step-horizontal/step-horizontal.component.d.ts +2 -1
  21. package/package.json +1 -1
  22. package/scss/base/components/accordion/accordion-header/accordion-header.component.scss +12 -0
  23. package/scss/base/components/accordion/accordion-item/accordion-item-body/accordion-item-body.component.scss +109 -0
  24. package/scss/base/components/accordion/accordion-item/accordion-item-header/accordion-item-header.component.scss +9 -0
  25. package/scss/base/components/accordion/accordion-item/accordion-item.component.scss +71 -0
  26. package/scss/base/components/accordion/accordion.component.scss +6 -0
@@ -0,0 +1,5 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class AccordionHeaderComponent {
3
+ static ɵfac: i0.ɵɵFactoryDeclaration<AccordionHeaderComponent, never>;
4
+ static ɵcmp: i0.ɵɵComponentDeclaration<AccordionHeaderComponent, "fng-accordion-header", never, {}, {}, never, ["*"]>;
5
+ }
@@ -0,0 +1,6 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class AccordionItemBodyComponent {
3
+ id: string;
4
+ static ɵfac: i0.ɵɵFactoryDeclaration<AccordionItemBodyComponent, never>;
5
+ static ɵcmp: i0.ɵɵComponentDeclaration<AccordionItemBodyComponent, "fng-accordion-item-body", never, {}, {}, never, ["*"]>;
6
+ }
@@ -0,0 +1,15 @@
1
+ import { OnDestroy } from '@angular/core';
2
+ import { Observable } from 'rxjs';
3
+ import * as i0 from "@angular/core";
4
+ export declare enum AccordionHeaderActions {
5
+ Toggle = "toggle"
6
+ }
7
+ export declare class AccordionItemHeaderComponent implements OnDestroy {
8
+ id: string;
9
+ private actions;
10
+ actions$: Observable<AccordionHeaderActions>;
11
+ ngOnDestroy(): void;
12
+ toggle(): void;
13
+ static ɵfac: i0.ɵɵFactoryDeclaration<AccordionItemHeaderComponent, never>;
14
+ static ɵcmp: i0.ɵɵComponentDeclaration<AccordionItemHeaderComponent, "fng-accordion-item-header", never, {}, {}, never, ["*"]>;
15
+ }
@@ -0,0 +1,34 @@
1
+ import { OnChanges, SimpleChanges, ElementRef, Renderer2, AfterViewInit, ChangeDetectorRef } from '@angular/core';
2
+ import { AccordionItemBodyComponent } from './accordion-item-body/accordion-item-body.component';
3
+ import { AccordionItemHeaderComponent } from './accordion-item-header/accordion-item-header.component';
4
+ import * as i0 from "@angular/core";
5
+ export declare class AccordionItemComponent implements OnChanges, AfterViewInit {
6
+ private elementRef;
7
+ private renderer;
8
+ private cd;
9
+ static nextId: number;
10
+ componentId: string;
11
+ expanded: boolean;
12
+ _linkText: string;
13
+ get linkText(): string;
14
+ header: AccordionItemHeaderComponent;
15
+ body: AccordionItemBodyComponent;
16
+ id: string;
17
+ parentId: string;
18
+ private accordion;
19
+ private accordionSubscription;
20
+ private accordionItemHeaderSubscription;
21
+ private element;
22
+ private pristine;
23
+ constructor(elementRef: ElementRef, renderer: Renderer2, cd: ChangeDetectorRef);
24
+ ngAfterViewInit(): void;
25
+ ngOnChanges(changes: SimpleChanges): void;
26
+ toggle(): void;
27
+ collapseItem(): void;
28
+ expandItem(): void;
29
+ private handleAction;
30
+ private subscribeToAccordionActions;
31
+ private subscribeToAccordionItemHeaderActions;
32
+ static ɵfac: i0.ɵɵFactoryDeclaration<AccordionItemComponent, never>;
33
+ static ɵcmp: i0.ɵɵComponentDeclaration<AccordionItemComponent, "fng-accordion-item", never, {}, {}, ["header", "body"], ["*"]>;
34
+ }
@@ -0,0 +1,24 @@
1
+ import { QueryList, AfterViewInit, OnDestroy } from '@angular/core';
2
+ import { Observable } from 'rxjs';
3
+ import { AccordionItemComponent } from './accordion-item/accordion-item.component';
4
+ import * as i0 from "@angular/core";
5
+ export declare enum AccordionActions {
6
+ OpenAll = "openAll",
7
+ CloseAll = "closeAll"
8
+ }
9
+ export declare class AccordionComponent implements AfterViewInit, OnDestroy {
10
+ static nextId: number;
11
+ readonly componentId: string;
12
+ private actions;
13
+ actions$: Observable<AccordionActions>;
14
+ multi: boolean;
15
+ showMore: string;
16
+ showLess: string;
17
+ items: QueryList<AccordionItemComponent>;
18
+ ngAfterViewInit(): void;
19
+ ngOnDestroy(): void;
20
+ openAll(): void;
21
+ closeAll(): void;
22
+ static ɵfac: i0.ɵɵFactoryDeclaration<AccordionComponent, never>;
23
+ static ɵcmp: i0.ɵɵComponentDeclaration<AccordionComponent, "fng-accordion", never, { "multi": "fngAccordionKeepItemsOpen"; "showMore": "fngAccordionShowMoreText"; "showLess": "fngAccordionShowLessText"; }, {}, ["items"], ["*"]>;
24
+ }
@@ -0,0 +1,5 @@
1
+ export * from './accordion.component';
2
+ export * from './accordion-header/accordion-header.component';
3
+ export * from './accordion-item/accordion-item.component';
4
+ export * from './accordion-item/accordion-item-header/accordion-item-header.component';
5
+ export * from './accordion-item/accordion-item-body/accordion-item-body.component';
@@ -28,10 +28,15 @@ import * as i26 from "./mobile-flyout/mobile-flyout-page/mobile-flyout-page.comp
28
28
  import * as i27 from "./mobile-flyout/mobile-flyout-item/mobile-flyout-item.component";
29
29
  import * as i28 from "./search-input/safe-html.pipe";
30
30
  import * as i29 from "./click-outside.directive";
31
- import * as i30 from "@angular/router";
32
- import * as i31 from "@angular/common";
33
- import * as i32 from "@angular/cdk/overlay";
34
- import * as i33 from "@angular/cdk/portal";
31
+ import * as i30 from "./accordion/accordion.component";
32
+ import * as i31 from "./accordion/accordion-header/accordion-header.component";
33
+ import * as i32 from "./accordion/accordion-item/accordion-item.component";
34
+ import * as i33 from "./accordion/accordion-item/accordion-item-header/accordion-item-header.component";
35
+ import * as i34 from "./accordion/accordion-item/accordion-item-body/accordion-item-body.component";
36
+ import * as i35 from "@angular/router";
37
+ import * as i36 from "@angular/common";
38
+ import * as i37 from "@angular/cdk/overlay";
39
+ import * as i38 from "@angular/cdk/portal";
35
40
  export * from './buttons/button/button.component';
36
41
  export * from './buttons/link-button/link-button.component';
37
42
  export * from './breadcrumb/breadcrumb.component';
@@ -62,8 +67,9 @@ export * from './click-outside.directive';
62
67
  export * from './mobile-flyout/mobile-flyout.component';
63
68
  export * from './mobile-flyout/mobile-flyout-page/mobile-flyout-page.component';
64
69
  export * from './mobile-flyout/mobile-flyout-item/mobile-flyout-item.component';
70
+ export * from './accordion';
65
71
  export declare class FestoAngularComponentsModule {
66
72
  static ɵfac: i0.ɵɵFactoryDeclaration<FestoAngularComponentsModule, never>;
67
- static ɵmod: i0.ɵɵNgModuleDeclaration<FestoAngularComponentsModule, [typeof i1.ButtonComponent, typeof i2.LinkButtonComponent, typeof i3.BreadcrumbComponent, typeof i4.LoadingIndicatorComponent, typeof i5.ChipContainerComponent, typeof i6.ChipComponent, typeof i7.PaginationComponent, typeof i8.TableHeaderCellDirective, typeof i9.StepperVerticalComponent, typeof i10.StepVerticalComponent, typeof i11.StepperHorizontalComponent, typeof i12.StepHorizontalComponent, typeof i13.PopoverComponent, typeof i14.PopoverMenuComponent, typeof i15.TooltipDirective, typeof i16.PopoverContentComponent, typeof i17.PopoverContentDirective, typeof i18.LegendComponent, typeof i19.LegendDirective, typeof i20.ProgressComponent, typeof i21.TabsComponent, typeof i22.TabPaneComponent, typeof i23.ScrollableDirective, typeof i24.SearchInputComponent, typeof i25.MobileFlyoutComponent, typeof i26.MobileFlyoutPageComponent, typeof i27.MobileFlyoutItemComponent, typeof i28.SafeHtmlPipe, typeof i29.ClickOutsideDirective], [typeof i30.RouterModule, typeof i31.CommonModule, typeof i32.OverlayModule, typeof i33.PortalModule], [typeof i1.ButtonComponent, typeof i2.LinkButtonComponent, typeof i3.BreadcrumbComponent, typeof i4.LoadingIndicatorComponent, typeof i5.ChipContainerComponent, typeof i6.ChipComponent, typeof i7.PaginationComponent, typeof i8.TableHeaderCellDirective, typeof i9.StepperVerticalComponent, typeof i10.StepVerticalComponent, typeof i11.StepperHorizontalComponent, typeof i12.StepHorizontalComponent, typeof i13.PopoverComponent, typeof i14.PopoverMenuComponent, typeof i15.TooltipDirective, typeof i16.PopoverContentComponent, typeof i17.PopoverContentDirective, typeof i18.LegendComponent, typeof i19.LegendDirective, typeof i20.ProgressComponent, typeof i21.TabsComponent, typeof i22.TabPaneComponent, typeof i23.ScrollableDirective, typeof i24.SearchInputComponent, typeof i28.SafeHtmlPipe, typeof i29.ClickOutsideDirective, typeof i25.MobileFlyoutComponent, typeof i26.MobileFlyoutPageComponent, typeof i27.MobileFlyoutItemComponent]>;
73
+ static ɵmod: i0.ɵɵNgModuleDeclaration<FestoAngularComponentsModule, [typeof i1.ButtonComponent, typeof i2.LinkButtonComponent, typeof i3.BreadcrumbComponent, typeof i4.LoadingIndicatorComponent, typeof i5.ChipContainerComponent, typeof i6.ChipComponent, typeof i7.PaginationComponent, typeof i8.TableHeaderCellDirective, typeof i9.StepperVerticalComponent, typeof i10.StepVerticalComponent, typeof i11.StepperHorizontalComponent, typeof i12.StepHorizontalComponent, typeof i13.PopoverComponent, typeof i14.PopoverMenuComponent, typeof i15.TooltipDirective, typeof i16.PopoverContentComponent, typeof i17.PopoverContentDirective, typeof i18.LegendComponent, typeof i19.LegendDirective, typeof i20.ProgressComponent, typeof i21.TabsComponent, typeof i22.TabPaneComponent, typeof i23.ScrollableDirective, typeof i24.SearchInputComponent, typeof i25.MobileFlyoutComponent, typeof i26.MobileFlyoutPageComponent, typeof i27.MobileFlyoutItemComponent, typeof i28.SafeHtmlPipe, typeof i29.ClickOutsideDirective, typeof i30.AccordionComponent, typeof i31.AccordionHeaderComponent, typeof i32.AccordionItemComponent, typeof i33.AccordionItemHeaderComponent, typeof i34.AccordionItemBodyComponent], [typeof i35.RouterModule, typeof i36.CommonModule, typeof i37.OverlayModule, typeof i38.PortalModule], [typeof i1.ButtonComponent, typeof i2.LinkButtonComponent, typeof i3.BreadcrumbComponent, typeof i4.LoadingIndicatorComponent, typeof i5.ChipContainerComponent, typeof i6.ChipComponent, typeof i7.PaginationComponent, typeof i8.TableHeaderCellDirective, typeof i9.StepperVerticalComponent, typeof i10.StepVerticalComponent, typeof i11.StepperHorizontalComponent, typeof i12.StepHorizontalComponent, typeof i13.PopoverComponent, typeof i14.PopoverMenuComponent, typeof i15.TooltipDirective, typeof i16.PopoverContentComponent, typeof i17.PopoverContentDirective, typeof i18.LegendComponent, typeof i19.LegendDirective, typeof i20.ProgressComponent, typeof i21.TabsComponent, typeof i22.TabPaneComponent, typeof i23.ScrollableDirective, typeof i24.SearchInputComponent, typeof i28.SafeHtmlPipe, typeof i29.ClickOutsideDirective, typeof i25.MobileFlyoutComponent, typeof i26.MobileFlyoutPageComponent, typeof i27.MobileFlyoutItemComponent, typeof i30.AccordionComponent, typeof i31.AccordionHeaderComponent, typeof i32.AccordionItemComponent, typeof i33.AccordionItemHeaderComponent, typeof i34.AccordionItemBodyComponent]>;
68
74
  static ɵinj: i0.ɵɵInjectorDeclaration<FestoAngularComponentsModule>;
69
75
  }
@@ -1,6 +1,7 @@
1
1
  import * as i0 from "@angular/core";
2
2
  export declare class StepHorizontalComponent {
3
3
  isActive: boolean;
4
+ title: string;
4
5
  static ɵfac: i0.ɵɵFactoryDeclaration<StepHorizontalComponent, never>;
5
- static ɵcmp: i0.ɵɵComponentDeclaration<StepHorizontalComponent, "fng-step-horizontal", never, { "isActive": "isActive"; }, {}, never, ["*"]>;
6
+ static ɵcmp: i0.ɵɵComponentDeclaration<StepHorizontalComponent, "fng-step-horizontal", never, { "isActive": "isActive"; "title": "title"; }, {}, never, ["*"]>;
6
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@festo-ui/angular",
3
- "version": "3.1.0-pre-20220321.2",
3
+ "version": "3.1.0-pre-20220323.1",
4
4
  "author": "Festo UI (styleguide@festo.com)",
5
5
  "license": "apache-2.0",
6
6
  "description": "CSS framework and utils to build FESTO web applications",
@@ -0,0 +1,12 @@
1
+ @import "../../../../../../web-essentials/scss/variables";
2
+
3
+ .fng-accordion-header {
4
+ display: flex;
5
+ align-items: center;
6
+ height: $spacer-xl;
7
+ padding: 0 $spacer-s 0 $spacer-m;
8
+ font-size: $font-size-md;
9
+ font-weight: $font-weight-bold;
10
+ color: $text;
11
+ border-bottom: 1px solid $gray-100;
12
+ }
@@ -0,0 +1,109 @@
1
+ @import "../../../../../../../web-essentials/scss/variables";
2
+
3
+ .fng-accordion-item-body {
4
+ overflow: hidden;
5
+ transition: height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
6
+ height: 0px;
7
+
8
+ // remove all padding/margin top of first element in item body to ensure that its always 24px distance to header (which is the headers padding)
9
+ > :first-child:not(.fng-accordion-item-body-spacer-bottom):not(.fng-accordion) {
10
+ margin-top: 0 !important;
11
+ padding-top: 0 !important;
12
+ }
13
+
14
+ // for mobile view we do not have an extra margin for elements in body
15
+ > :not(.fng-accordion) {
16
+ margin-right: 0px;
17
+ }
18
+
19
+ &-content {
20
+ margin-right: $spacer-xxl;
21
+ }
22
+
23
+ &-spacer {
24
+ // the spacer ensures that there is always at least 24px margin at the end of the body
25
+ // it also makes use of "margin collapsing" so that even if the last element in the body itself has a margin of 24px or more
26
+ // it will not add the 24px on top of it
27
+ &-bottom {
28
+ margin-top: $spacer-m;
29
+ height: 0;
30
+ width: 0;
31
+ }
32
+ }
33
+ }
34
+
35
+ // styles for an accordion inside an accordion (nested accordion)
36
+ .fng-accordion-item-body {
37
+
38
+ .fng-accordion {
39
+ margin-top: $spacer-xxl;
40
+ margin-bottom: $spacer-m;
41
+ }
42
+
43
+ .fng-accordion-item {
44
+ &-link {
45
+ display: block;
46
+ top: 8px;
47
+ }
48
+
49
+ &-header {
50
+ padding-top: $spacer-l;
51
+ padding-right: $spacer-l;
52
+ }
53
+
54
+ &::after {
55
+ top: 8px;
56
+ right: 0px;
57
+ color: $caerul;
58
+ font-family: $font-family-icons-16;
59
+ font-size: $font-size-xl;
60
+ content: "\e900";
61
+ height: $spacer-m;
62
+ line-height: $spacer-m;
63
+ }
64
+
65
+ &--expanded {
66
+ &::before {
67
+ background-color: transparent;
68
+ }
69
+ }
70
+ }
71
+ }
72
+
73
+ // styles for different viewports below this line with mobile first approach
74
+ @media (min-width: $grid-breakpoint-xs) {
75
+ .fng-accordion-item {
76
+ &-body {
77
+ // give all elements inside the accordion body a margin right of 64px except if its another accordion inside the body
78
+ > :not(.fng-accordion) {
79
+ margin-right: $spacer-xxl;
80
+ }
81
+ }
82
+ }
83
+
84
+ // styles for an accordion inside an accordion (nested accordion)
85
+ .fng-accordion-item-body {
86
+ .fng-accordion-item {
87
+ &-header {
88
+ padding-top: $spacer-m;
89
+ // increase the padding right because instead of only arrow icon we have text and arrow icon here
90
+ // make a best guess to fit also langugages with more chars (if too long it will be truncated with ellipsis)
91
+ padding-right: 168px;
92
+ }
93
+
94
+ &-link {
95
+ font-size: $font-size-base;
96
+ top: $spacer-m;
97
+ max-width: $spacer-xxl * 2;
98
+ // if link gets to long we truncate it with ellipsis here
99
+ white-space: nowrap;
100
+ overflow: hidden;
101
+ text-overflow: ellipsis;
102
+ }
103
+
104
+ &::after {
105
+ top: 27px;
106
+ }
107
+ }
108
+ }
109
+ }
@@ -0,0 +1,9 @@
1
+ @import "../../../../../../../web-essentials/scss/variables";
2
+
3
+ .fng-accordion-item-header {
4
+ display: flex;
5
+ align-items: center;
6
+ padding: $spacer-m $spacer-xxl $spacer-m 0;
7
+ min-height: $spacer-xl;
8
+ cursor: pointer;
9
+ }
@@ -0,0 +1,71 @@
1
+ @import "../../../../../../web-essentials/scss/variables";
2
+
3
+ .fng-accordion-item {
4
+ position: relative;
5
+ padding: 0 $spacer-s 0 $spacer-m;
6
+ border-top: 1px solid $gray-100;
7
+ border-bottom: 1px solid $gray-100;
8
+
9
+ &-link {
10
+ position: absolute;
11
+ top: $spacer-m;
12
+ right: $spacer-l;
13
+ color: $caerul;
14
+ font-size: $font-size-md;
15
+ pointer-events: none;
16
+ display: none;
17
+ }
18
+
19
+ &::before {
20
+ position: absolute;
21
+ top: 0;
22
+ left: 0;
23
+ display: block;
24
+ content: "";
25
+ width: $spacer-xxxs;
26
+ height: 0px;
27
+ background-color: $caerul;
28
+ }
29
+
30
+ &::after {
31
+ position: absolute;
32
+ top: $spacer-s;
33
+ right: $spacer-s;
34
+ display: block;
35
+ font-family: $font-family-icons-32;
36
+ font-size: $font-size-xxl;
37
+ content: "\e900";
38
+ height: $spacer-l;
39
+ line-height: $spacer-l;
40
+ transition: transform 0.2s ease;
41
+ pointer-events: none;
42
+ }
43
+
44
+ &--expanded {
45
+ .fng-accordion-item-header {
46
+ font-weight: $font-weight-bold;
47
+ }
48
+
49
+ .fng-accordion-item-body {
50
+ height: auto;
51
+ }
52
+
53
+ &::after {
54
+ transform: rotate(-180deg);
55
+ }
56
+
57
+ &::before {
58
+ height: 100%;
59
+ }
60
+ }
61
+
62
+ &--collapsed {
63
+ .fng-accordion-item-body {
64
+ height: 0px;
65
+ }
66
+
67
+ .fng-accordion-item-header {
68
+ font-weight: $font-weight-normal;
69
+ }
70
+ }
71
+ }
@@ -0,0 +1,6 @@
1
+ @import "../../../../../web-essentials/scss/variables";
2
+
3
+ .fng-accordion {
4
+ background-color: $white;
5
+ border-bottom: 1px solid $gray-100;
6
+ }