@leanix/components 0.4.407 → 0.4.409

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 (40) hide show
  1. package/esm2022/index.mjs +2 -1
  2. package/esm2022/lib/core-ui/components/badge/badge.component.mjs +21 -1
  3. package/esm2022/lib/core-ui/components/banner/banner.component.mjs +23 -1
  4. package/esm2022/lib/core-ui/components/button/button.component.mjs +40 -1
  5. package/esm2022/lib/core-ui/components/card/card.component.mjs +16 -1
  6. package/esm2022/lib/core-ui/components/content-panel/content-panel.component.mjs +18 -3
  7. package/esm2022/lib/core-ui/components/counter/counter.component.mjs +14 -1
  8. package/esm2022/lib/core-ui/components/integration-link-card/integration-link-card.component.mjs +47 -1
  9. package/esm2022/lib/core-ui/components/skeleton/skeleton.component.mjs +19 -1
  10. package/esm2022/lib/core-ui/components/stepper/stepper.component.mjs +41 -1
  11. package/esm2022/lib/core-ui/components/tiny-spinner/tiny-spinner.component.mjs +12 -1
  12. package/esm2022/lib/core-ui/components/tokenizer/tokenizer-overflow-popover/tokenizer-overflow-popover.component.mjs +44 -0
  13. package/esm2022/lib/core-ui/components/tokenizer/tokenizer.component.mjs +3 -3
  14. package/esm2022/lib/core-ui/tooltip/tooltip.directive.mjs +16 -1
  15. package/esm2022/lib/forms-ui/components/breadcrumb/breadcrumb.component.mjs +17 -1
  16. package/esm2022/lib/forms-ui/components/date-input/date-input.component.mjs +100 -38
  17. package/esm2022/lib/forms-ui/components/slider-toggle/slider-toggle.component.mjs +18 -1
  18. package/esm2022/lib/modal-ui/components/modal/modal.component.mjs +55 -7
  19. package/esm2022/lib/popover-ui/components/popover/popover.component.mjs +31 -6
  20. package/fesm2022/leanix-components.mjs +541 -82
  21. package/fesm2022/leanix-components.mjs.map +1 -1
  22. package/index.d.ts +1 -0
  23. package/lib/core-ui/components/badge/badge.component.d.ts +23 -0
  24. package/lib/core-ui/components/banner/banner.component.d.ts +22 -0
  25. package/lib/core-ui/components/button/button.component.d.ts +39 -0
  26. package/lib/core-ui/components/card/card.component.d.ts +15 -0
  27. package/lib/core-ui/components/content-panel/content-panel.component.d.ts +18 -1
  28. package/lib/core-ui/components/counter/counter.component.d.ts +14 -0
  29. package/lib/core-ui/components/integration-link-card/integration-link-card.component.d.ts +60 -0
  30. package/lib/core-ui/components/skeleton/skeleton.component.d.ts +18 -0
  31. package/lib/core-ui/components/stepper/stepper.component.d.ts +40 -0
  32. package/lib/core-ui/components/tiny-spinner/tiny-spinner.component.d.ts +11 -0
  33. package/lib/core-ui/components/tokenizer/tokenizer-overflow-popover/tokenizer-overflow-popover.component.d.ts +19 -0
  34. package/lib/core-ui/tooltip/tooltip.directive.d.ts +17 -0
  35. package/lib/forms-ui/components/breadcrumb/breadcrumb.component.d.ts +16 -0
  36. package/lib/forms-ui/components/date-input/date-input.component.d.ts +80 -7
  37. package/lib/forms-ui/components/slider-toggle/slider-toggle.component.d.ts +20 -0
  38. package/lib/modal-ui/components/modal/modal.component.d.ts +59 -5
  39. package/lib/popover-ui/components/popover/popover.component.d.ts +37 -5
  40. package/package.json +1 -1
@@ -1,15 +1,35 @@
1
1
  import { EventEmitter } from '@angular/core';
2
2
  import * as i0 from "@angular/core";
3
+ /**
4
+ * Switch component is a toggle switch that can be used to switch between two states.
5
+ *
6
+ * ## Usage
7
+ *
8
+ * 1. Import the `SliderToggleComponent` component from `@leanix/components` in your module or standalone copmonent where you want to use the component.
9
+ *
10
+ * ```ts
11
+ * import { SliderToggleComponent } from '@leanix/components';
12
+ * ```
13
+ */
3
14
  export declare class SliderToggleComponent {
15
+ /** Value of the switch */
4
16
  value: boolean;
17
+ /** Size of the switch */
5
18
  size: 'small';
19
+ /** Whether the switch is disabled */
6
20
  disabled: boolean;
21
+ /** Label of the switch */
7
22
  label: string;
23
+ /** Whether the label is in front of the switch */
8
24
  labelInFront: boolean;
25
+ /** Id of the switch */
9
26
  elementId?: string;
27
+ /** Event that is emitted when the switch is toggled */
10
28
  toggle: EventEmitter<boolean>;
29
+ /** @internal */
11
30
  onToggle(): void;
12
31
  get id(): string | null;
32
+ /** @internal */
13
33
  focus(checkbox: HTMLInputElement): void;
14
34
  static ɵfac: i0.ɵɵFactoryDeclaration<SliderToggleComponent, never>;
15
35
  static ɵcmp: i0.ɵɵComponentDeclaration<SliderToggleComponent, "lx-slider-toggle", never, { "value": { "alias": "value"; "required": false; }; "size": { "alias": "size"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "label": { "alias": "label"; "required": false; }; "labelInFront": { "alias": "labelInFront"; "required": false; }; "elementId": { "alias": "elementId"; "required": false; }; }, { "toggle": "toggle"; }, never, never, true, never>;
@@ -8,12 +8,42 @@ import { ModalFooterComponent } from '../modal-footer/modal-footer.component';
8
8
  import { ModalHeaderComponent } from '../modal-header/modal-header.component';
9
9
  import * as i0 from "@angular/core";
10
10
  /**
11
- * GLOBAL PROVIDERS required for this component:
12
- * - provideAnimations()
11
+ * This documentation provides details on the usage and configuration of the Modal.
13
12
  *
14
- * ATTENTION - SCROLLABLE DIALOG:
13
+ * ## Usage
14
+ *
15
+ * 1. Import `LxModalModule` and `LxCoreUiModule` modules from `@leanix/components` in your module where you want to use the component.
16
+ *
17
+ * ```ts
18
+ * import { LxModalModule, LxCoreUiModule } from '@leanix/components';
19
+ * ```
20
+ *
21
+ * 2. Use the **lx-modal** component in your template with the parameters described below.
22
+ *
23
+ * - **`open`**: Whether the modal is open or closed.
24
+ * - **`size`**: 'dialog' | 'dialog-large'.
25
+ * - **`verticalScroll`**: Whether the modal is scrollable or not.
26
+ * - **`showHeader`**: Whether the modal has a header or not.
27
+ * - **`showFooter`**: Whether the modal has a footer or not.
28
+ * - **`showCloseButton`**: Whether to show the close button.
29
+ * - **`showBackButton`**: Whether to show the back button.
30
+ *
31
+ * 3. Use optional **lx-modal-header** component in your template with the parameters described below.
32
+ *
33
+ * - **`title`**: Title of the modal.
34
+ * - **`subtitle`**: Subtitle of the modal.
35
+ * - **`bottomBorder`**: Whether to show a bottom border.
36
+ *
37
+ * 4. Use optional **lx-modal-footer** component in your template with the parameters described below.
38
+ *
39
+ * - **`border`**: Whether to show the footer at the bottom of the modal.
40
+ *
41
+ * **GLOBAL PROVIDERS** required for this component:
42
+ * - `provideAnimations()`
43
+ *
44
+ * **ATTENTION - SCROLLABLE DIALOG**:
15
45
  * The <lx-modal> component when used as "dialog" is not designed to work with a
16
- * scrollable body (via "overflow: auto | scroll") in combination with dropdowns.
46
+ * scrollable body (via `overflow: auto | scroll`) in combination with dropdowns.
17
47
  * The overflow on the body will also clip the dropdowns, which is expected.
18
48
  *
19
49
  * Reasoning:
@@ -22,42 +52,66 @@ import * as i0 from "@angular/core";
22
52
  * requires scrolling, we should discuss whether to put it into a dialog at all
23
53
  * and rather think about putting the content on a separate route or
24
54
  * using the fullscreen version of the modal.
25
- *
26
55
  */
27
56
  export declare class ModalComponent implements OnChanges, OnInit, OnDestroy, AfterViewInit {
28
57
  private overlay;
29
58
  private renderer;
30
59
  private closeModal$;
31
60
  private focusTrap;
61
+ /** @internal */
32
62
  readonly NAME = "ModalComponent";
63
+ /** Whether the modal is open or closed. */
33
64
  open: boolean;
65
+ /** Whether to show the close button. */
34
66
  showCloseButton: boolean;
67
+ /** Whether to show the back button. */
35
68
  showBackButton: boolean;
36
69
  verticalScroll: boolean;
70
+ /** The size of the modal. */
37
71
  size: 'fullscreen' | 'dialog-large' | 'dialog';
72
+ /**
73
+ * Minimum width of the modal.
74
+ *
75
+ * _NB: Some modal implementations rely on this minWidth being 600px_
76
+ */
38
77
  minWidth: string;
78
+ /** Whether the modal is a focus trap. */
39
79
  isFocusTrap: boolean;
80
+ /** Function to check if the modal can be closed. */
40
81
  canModalBeClosed?: (closeLocation: ModalCloseClickLocation | boolean) => Promise<boolean>;
82
+ /** Event emitted when the modal is closed. */
41
83
  close: EventEmitter<ModalCloseClickLocation>;
84
+ /** Event emitted when the back button is clicked. */
42
85
  back: EventEmitter<void>;
86
+ /** @internal */
43
87
  header?: ModalHeaderComponent;
88
+ /** @internal */
44
89
  footer?: ModalFooterComponent;
90
+ /** @internal */
45
91
  cdkPortal: Portal<CdkPortal>;
46
92
  private overlayRef;
47
93
  private oldOverflow?;
94
+ /** @internal */
48
95
  closeLocation: typeof ModalCloseClickLocation;
96
+ /** @internal */
49
97
  readonly destroyed$: Subject<void>;
98
+ /** @internal */
50
99
  implicitContent: TemplateRef<any>;
100
+ /** @internal */
51
101
  explicitContent?: TemplateRef<any>;
52
102
  get content(): TemplateRef<any>;
103
+ /** @internal */
53
104
  onEscape(): void;
54
105
  constructor(overlay: Overlay, renderer: Renderer2, closeModal$: Observable<ModalCloseClickLocation | boolean>, focusTrap: ConfigurableFocusTrapFactory);
55
106
  ngOnInit(): void;
56
107
  ngOnChanges(): void;
57
108
  ngAfterViewInit(): void;
109
+ /** @internal */
58
110
  openModal(): void;
111
+ /** @internal */
59
112
  emitBack(): void;
60
113
  ngOnDestroy(): void;
114
+ /** @internal */
61
115
  closeModal(closeLocation: ModalCloseClickLocation | boolean): Promise<void>;
62
116
  private trapFocusInModal;
63
117
  static ɵfac: i0.ɵɵFactoryDeclaration<ModalComponent, [null, null, { optional: true; }, null]>;
@@ -3,7 +3,15 @@ import { SatPopoverComponent, SatPopoverHorizontalAlign, SatPopoverVerticalAlign
3
3
  import { PopoverTriggerDirective } from '../../directives/popover-hover.directive';
4
4
  import * as i0 from "@angular/core";
5
5
  /**
6
- * HOW TO USE
6
+ * The Popover component is based on the [ncstate-sat/popover](https://github.com/ncstate-sat/popover) library.
7
+ *
8
+ * ## Usage
9
+ *
10
+ * 1. Import `LxPopoverUiModule` and `LxCoreUiModule` module from `@leanix/components` in your module where you want to use the component.
11
+ *
12
+ * ```ts
13
+ * import { LxPopoverUiModule, LxCoreUiModule } from '@leanix/components';
14
+ * ```
7
15
  *
8
16
  * This popover encapsulates this open source library: https://github.com/ncstate-sat/popover,
9
17
  * make sure to also check out the docs over there.
@@ -14,7 +22,8 @@ import * as i0 from "@angular/core";
14
22
  *
15
23
  * For use case 1. you would use the lxPopoverHover directive, which exports as hoverAnchor.
16
24
  *
17
- * Example:
25
+ * ### Example:
26
+ * ```html
18
27
  * <div lxPopoverHover
19
28
  * hoverAnchor
20
29
  * satPopoverAnchor
@@ -24,13 +33,15 @@ import * as i0 from "@angular/core";
24
33
  * verticalAlign="center">
25
34
  * <p>Popover content</p>
26
35
  * </lx-popover>
36
+ * ```
27
37
  *
28
38
  * For use case 2. you would use the lxPopoverClick directive, which exports as clickAnchor.
29
39
  * Note: Since the only component where we use the lxPopoverClick directive (ReportComponent)
30
40
  * needs to fetch some data before opening it, we do not register a click EventListener in this directive,
31
41
  * but require the developer to implement that in the component, where the popover is used.
32
42
  *
33
- * Example:
43
+ * ### Example:
44
+ * ```html
34
45
  * <div lxPopoverClick
35
46
  * clickAnchor
36
47
  * satPopoverAnchor
@@ -42,23 +53,33 @@ import * as i0 from "@angular/core";
42
53
  * #popover>
43
54
  * <p>Popover content</p>
44
55
  * </lx-popover>
56
+ * ```
45
57
  *
46
58
  * If this component is used with angularCompilerOptions strictTemplates=true,
47
59
  * satPopoverAnchor must be set to the reference to the SatPopover inside lx-popover.
48
60
  *
49
- * Example:
50
- * <div [satPopoverAnchor]="popover.satPopover"></div>
61
+ * ### Example:
62
+ * ```html
63
+ * <div [satPopoverAnchor]="popover.satPopover"></div>
51
64
  * <lx-popover #popover>
52
65
  * <p>Popover content</p>
53
66
  * </lx-popover>
67
+ * ```
54
68
  */
55
69
  export declare class PopoverComponent implements OnChanges {
70
+ /** The trigger directive that will open the popover. This is also the anchor for the popover. */
56
71
  trigger: PopoverTriggerDirective;
72
+ /** The horizontal alignment of the popover (`center` by default). */
57
73
  horizontalAlign: SatPopoverHorizontalAlign;
74
+ /** The vertical alignment of the popover (`above` by default). */
58
75
  verticalAlign: SatPopoverVerticalAlign;
76
+ /** Whether to apply margins. */
59
77
  noMargin: boolean;
78
+ /** Whether to allow the popover to overflow the viewport. */
60
79
  allowOverflow: boolean;
80
+ /** Whether to focus the first focusable element in the popover when it is opened. */
61
81
  autoFocus: boolean;
82
+ /** Whether to restore focus to the previously-focused element when the popover is closed. */
62
83
  restoreFocus: boolean;
63
84
  /**
64
85
  * If you have a popover, that should usually be displayed above or below its anchor,
@@ -69,20 +90,31 @@ export declare class PopoverComponent implements OnChanges {
69
90
  * position of the popover after opening.
70
91
  */
71
92
  adaptMarginsForViewportAlignChange: boolean;
93
+ /** Event emitted when the popover is opened. */
72
94
  opened: EventEmitter<void>;
95
+ /** Event emitted when the popover is closed. */
73
96
  closed: EventEmitter<void>;
97
+ /** @internal */
74
98
  satPopover: SatPopoverComponent;
99
+ /** @internal */
75
100
  implicitContent: TemplateRef<any>;
101
+ /** @internal */
76
102
  explicitContent?: TemplateRef<any>;
103
+ /** @internal */
77
104
  marginClasses: string;
78
105
  get content(): TemplateRef<any>;
79
106
  get isOpen(): boolean;
80
107
  private _isOpen;
81
108
  ngOnChanges(changes: SimpleChanges): void;
109
+ /** @internal */
82
110
  open(): void;
111
+ /** @internal */
83
112
  close(): void;
113
+ /** @internal */
84
114
  onOpen(): void;
115
+ /** @internal */
85
116
  onAfterOpen(): void;
117
+ /** @internal */
86
118
  onClose(): void;
87
119
  /**
88
120
  * SatPopover::_classList will contain a map of alignment CSS classes, once the popover was opened.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leanix/components",
3
- "version": "0.4.407",
3
+ "version": "0.4.409",
4
4
  "license": "Apache-2.0",
5
5
  "author": "LeanIX GmbH",
6
6
  "repository": {