@leanix/components 0.4.443 → 0.4.445

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.
@@ -1,17 +1,32 @@
1
+ import { InjectionToken } from '@angular/core';
2
+ import { BehaviorSubject } from 'rxjs';
1
3
  import * as i0 from "@angular/core";
4
+ /**
5
+ * @internal
6
+ * Opt-in to render SAP icons in the `ButtonComponent`
7
+ */
8
+ export declare const LX_BUTTON_USE_SAP_ICONS: InjectionToken<BehaviorSubject<boolean>>;
9
+ /**
10
+ * @internal
11
+ * Maps font awesome icons to SAP icons to toggle icons in `ButtonComponent`.
12
+ * Required if `LX_BUTTON_USE_SAP_ICONS` is provided with `true`.
13
+ */
14
+ export declare const LX_BUTTON_ICON_MAP: InjectionToken<Record<string, string[]>>;
2
15
  /**
3
16
  * Button component is used to create a button with different styles and sizes. This uses native button element and
4
17
  * only provides styling and some additional features like loading spinner.
5
18
  *
6
19
  * ## Usage
7
20
  *
8
- * 1. Import the `LxCoreUiModule` module from `@leanix/components` in your module where you want to use the component.
21
+ * 1. Import the `ButtonComponent` from `@leanix/components` where you want to use the component.
9
22
  *
10
23
  * ```ts
11
- * import { LxCoreUiModule } from '@leanix/components';
24
+ * import { ButtonComponent } from '@leanix/components';
12
25
  * ```
13
26
  */
14
27
  export declare class ButtonComponent {
28
+ private readonly iconMap;
29
+ protected readonly useSAPIcons: import("@angular/core").Signal<boolean | undefined>;
15
30
  /**
16
31
  * The size of the button.
17
32
  */
@@ -44,11 +59,33 @@ export declare class ButtonComponent {
44
59
  * This disables the button.
45
60
  */
46
61
  disabled: boolean;
62
+ get hasIcon(): boolean;
63
+ /**
64
+ * The icon name (font-awesome) to display inside the button.
65
+ * It is displayed before any additional content.
66
+ *
67
+ * @default undefined
68
+ * @example
69
+ * <button lx-button icon="fa-times">Close</button>
70
+ */
71
+ readonly icon: import("@angular/core").InputSignal<string | undefined>;
72
+ protected readonly iconName: import("@angular/core").Signal<string | null>;
73
+ /**
74
+ * The icon name (font-awesome) to display inside the button.
75
+ * It is displayed after any additional content.
76
+ *
77
+ * @default undefined
78
+ * @example
79
+ * <button lx-button endIcon="fa-times">Close</button>
80
+ */
81
+ readonly endIcon: import("@angular/core").InputSignal<string | undefined>;
82
+ protected readonly endIconName: import("@angular/core").Signal<string | null>;
47
83
  /**
48
84
  * This shows a spinner inside the button.
49
85
  */
50
86
  showSpinner: boolean;
51
87
  get isDisabled(): boolean;
88
+ private getMappedIconName;
52
89
  static ɵfac: i0.ɵɵFactoryDeclaration<ButtonComponent, never>;
53
- static ɵcmp: i0.ɵɵComponentDeclaration<ButtonComponent, "button[lx-button]", never, { "size": { "alias": "size"; "required": false; }; "color": { "alias": "color"; "required": false; }; "mode": { "alias": "mode"; "required": false; }; "pressed": { "alias": "pressed"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "square": { "alias": "square"; "required": false; }; "circle": { "alias": "circle"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "showSpinner": { "alias": "showSpinner"; "required": false; }; }, {}, never, ["*"], true, never>;
90
+ static ɵcmp: i0.ɵɵComponentDeclaration<ButtonComponent, "button[lx-button]", never, { "size": { "alias": "size"; "required": false; }; "color": { "alias": "color"; "required": false; }; "mode": { "alias": "mode"; "required": false; }; "pressed": { "alias": "pressed"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "square": { "alias": "square"; "required": false; }; "circle": { "alias": "circle"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "endIcon": { "alias": "endIcon"; "required": false; "isSignal": true; }; "showSpinner": { "alias": "showSpinner"; "required": false; }; }, {}, never, ["*"], true, never>;
54
91
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leanix/components",
3
- "version": "0.4.443",
3
+ "version": "0.4.445",
4
4
  "license": "Apache-2.0",
5
5
  "author": "LeanIX GmbH",
6
6
  "repository": {
@@ -10,6 +10,7 @@
10
10
  },
11
11
  "dependencies": {
12
12
  "@ncstate/sat-popover": "13.1.0",
13
+ "@ui5/webcomponents-ngx": "0.3.1",
13
14
  "color": "3.1.3",
14
15
  "date-fns": "1.30.1",
15
16
  "dompurify": "2.5.4",