@leanix/components 0.4.446 → 0.4.448
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/esm2022/lib/core-ui/components/button/button.component.mjs +16 -22
- package/esm2022/lib/core-ui/core-ui.constants.mjs +207 -1
- package/fesm2022/leanix-components.mjs +221 -22
- package/fesm2022/leanix-components.mjs.map +1 -1
- package/lib/core-ui/components/button/button.component.d.ts +8 -7
- package/lib/core-ui/core-ui.constants.d.ts +6 -0
- package/lib/forms-ui/components/options-dropdown/options-dropdown.component.d.ts +1 -1
- package/lib/forms-ui/components/single-select/single-select.component.d.ts +1 -1
- package/package.json +2 -2
@@ -50,6 +50,212 @@ const DATE_FORMATS = new InjectionToken('DATE_FORMATS', {
|
|
50
50
|
const DATE_FN_LOCALE = new InjectionToken('DATE_FN_LOCALE');
|
51
51
|
const LOCALE_FN = new InjectionToken('LOCALE_FN');
|
52
52
|
const GLOBAL_TRANSLATION_OPTIONS = new InjectionToken('GLOBAL_TRANSLATION_OPTIONS');
|
53
|
+
/**
|
54
|
+
* map Font Awesome -> SAP icons
|
55
|
+
* [0]: regular icon
|
56
|
+
* [1]: solid icon alternative (if available)
|
57
|
+
*/
|
58
|
+
const ICON_MAP = {
|
59
|
+
'fa-times': ['decline'],
|
60
|
+
'fa-plus': ['add'],
|
61
|
+
'fa-check': ['accept'],
|
62
|
+
'fa-trash': ['delete'],
|
63
|
+
'fa-angle-down': ['slim-arrow-down'],
|
64
|
+
'fa-circle': ['circle-task-2', 'circle-task'],
|
65
|
+
'fa-pencil': ['edit'],
|
66
|
+
'fa-external-link': ['action'],
|
67
|
+
'fa-search': ['search'],
|
68
|
+
'fa-info-circle': ['message-information'],
|
69
|
+
'fa-question-circle': ['question-mark'],
|
70
|
+
'fa-ellipsis-v': ['overflow'],
|
71
|
+
'fa-sync': ['synchronize'],
|
72
|
+
'fa-plus-circle': ['sys-add'],
|
73
|
+
'fa-exclamation-triangle': ['warning'],
|
74
|
+
'fa-arrow-right': ['arrow-right'],
|
75
|
+
'fa-arrow-left': ['arrow-left'],
|
76
|
+
'fa-link': ['chain-link'],
|
77
|
+
'fa-check-circle': ['status-completed'],
|
78
|
+
'fa-bars': ['menu2'],
|
79
|
+
'fa-eye': ['show'],
|
80
|
+
'fa-cog': ['action-settings'],
|
81
|
+
'fa-star': ['unfavorite'],
|
82
|
+
'fa-chevron-down': ['navigation-down-arrow'],
|
83
|
+
'fa-eye-slash': ['hide'],
|
84
|
+
'fa-calendar': ['calendar'],
|
85
|
+
'fa-lock': ['locked'],
|
86
|
+
'fa-ban': ['cancel'],
|
87
|
+
'fa-user': ['person-placeholder'],
|
88
|
+
'fa-chevron-right': ['navigation-right-arrow'],
|
89
|
+
'fa-spinner': ['pending'],
|
90
|
+
'fa-times-circle': ['error'],
|
91
|
+
'fa-diamond': ['rhombus-milestone'],
|
92
|
+
'fa-sort-up': ['sorting-ranking'],
|
93
|
+
'fa-arrow-circle-up': ['arrow-top'],
|
94
|
+
'fa-bell': ['bell'],
|
95
|
+
'fa-long-arrow-left': ['arrow-left'],
|
96
|
+
'fa-sort-down': ['megamenu'],
|
97
|
+
'fa-edit': ['edit'],
|
98
|
+
'fa-angle-right': ['slim-arrow-right'],
|
99
|
+
'fa-book': ['course-book'],
|
100
|
+
'fa-download': ['download'],
|
101
|
+
'fa-file': ['document'],
|
102
|
+
'fa-undo': ['undo'],
|
103
|
+
'fa-wrench': ['wrench'],
|
104
|
+
'fa-align-justify': ['text-align-justified'],
|
105
|
+
'fa-chevron-left': ['navigation-left-arrow'],
|
106
|
+
'fa-filter': ['filter'],
|
107
|
+
'fa-plug': ['disconnected'],
|
108
|
+
'fa-clone': ['duplicate'],
|
109
|
+
'fa-info': ['message-information'],
|
110
|
+
'fa-minus': ['less'],
|
111
|
+
'fa-robot': ['tnt/robot'],
|
112
|
+
'fa-share-alt': ['share-2'],
|
113
|
+
'fa-sparkles': ['ai'],
|
114
|
+
'fa-text': ['text'],
|
115
|
+
'fa-unlink': ['broken-link'],
|
116
|
+
'fa-arrow-down': ['arrow-down'],
|
117
|
+
'fa-arrow-to-top': ['back-to-top'],
|
118
|
+
'fa-caret-down': ['megamenu'],
|
119
|
+
'fa-presentation': ['projector'],
|
120
|
+
'fa-th-large': ['business-suite/2x2-grid-layout'],
|
121
|
+
'fa-upload': ['upload'],
|
122
|
+
'fa-align-left': ['text-align-left'],
|
123
|
+
'fa-arrow-circle-right': ['initiative'],
|
124
|
+
'fa-caret-up': ['sorting-ranking'],
|
125
|
+
'fa-clock': ['in-progress'],
|
126
|
+
'fa-code-branch': ['business-suite/empty-sequence'],
|
127
|
+
'fa-comment': ['comment'],
|
128
|
+
'fa-comment-lines': ['comment'],
|
129
|
+
'fa-copy': ['copy'],
|
130
|
+
'fa-ellipsis-h': ['overflow'],
|
131
|
+
'fa-exclamation': ['business-suite/priority-1'],
|
132
|
+
'fa-square': ['border'],
|
133
|
+
'fa-tachometer': ['performance'],
|
134
|
+
'fa-tags': ['blank-tag-2'],
|
135
|
+
'fa-tasks': ['activities'],
|
136
|
+
'fa-angle-double-down': ['expand-group'],
|
137
|
+
'fa-arrow-up': ['arrow-top'],
|
138
|
+
'fa-chart-bar': ['horizontal-bar-chart'],
|
139
|
+
'fa-chevron-square-down': ['navigation-down-arrow'],
|
140
|
+
'fa-chevron-square-right': ['navigation-right-arrow'],
|
141
|
+
'fa-exclamation-square': ['high-priority'],
|
142
|
+
'fa-expand-alt': ['full-screen'],
|
143
|
+
'fa-external-link-alt': ['action'],
|
144
|
+
'fa-globe': ['world'],
|
145
|
+
'fa-graduation-cap': ['study-leave'],
|
146
|
+
'fa-list': ['list'],
|
147
|
+
'fa-paragraph': ['text'],
|
148
|
+
'fa-play': ['media-play'],
|
149
|
+
'fa-question': ['incident'],
|
150
|
+
'fa-repeat': ['synchronize'],
|
151
|
+
'fa-shapes': ['program-triangles'],
|
152
|
+
'fa-sort-alt': ['sort'],
|
153
|
+
'fa-table': ['business-suite/2x2-grid-layout'],
|
154
|
+
'fa-align-slash': ['tnt/clear-all-mapping'],
|
155
|
+
'fa-angle-double-left': ['close-command-field'],
|
156
|
+
'fa-angle-double-right': ['open-command-field'],
|
157
|
+
'fa-angle-double-up': ['collapse-group'],
|
158
|
+
'fa-arrow-from-bottom': ['upload'],
|
159
|
+
'fa-bold': ['bold-text'],
|
160
|
+
'fa-bolt': ['tnt/raise-fault'],
|
161
|
+
'fa-books': ['course-book'],
|
162
|
+
'fa-code': ['source-code'],
|
163
|
+
'fa-database': ['database'],
|
164
|
+
'fa-envelope': ['email'],
|
165
|
+
'fa-expand': ['full-screen'],
|
166
|
+
'fa-file-audio': ['attachment-audio'],
|
167
|
+
'fa-file-excel': ['excel-attachment'],
|
168
|
+
'fa-file-image': ['attachment-photo'],
|
169
|
+
'fa-file-pdf': ['pdf-attachment'],
|
170
|
+
'fa-file-video': ['attachment-video'],
|
171
|
+
'fa-file-word': ['doc-attachment'],
|
172
|
+
'fa-folder': ['folder-blank'],
|
173
|
+
'fa-heading': ['heading1'],
|
174
|
+
'fa-hourglass-half': ['lateness'],
|
175
|
+
'fa-house': ['home'],
|
176
|
+
'fa-image': ['picture'],
|
177
|
+
'fa-italic': ['italic-text'],
|
178
|
+
'fa-lightbulb': ['lightbulb'],
|
179
|
+
'fa-lightbulb-on': ['lightbulb'],
|
180
|
+
'fa-list-ol': ['list'],
|
181
|
+
'fa-map': ['map-3'],
|
182
|
+
'fa-map-pin': [],
|
183
|
+
'fa-pen': ['edit'],
|
184
|
+
'fa-people-arrows': ['citizen-connect'],
|
185
|
+
'fa-power-off': ['log'],
|
186
|
+
'fa-random': ['tnt/flow'],
|
187
|
+
'fa-redo': ['refresh'],
|
188
|
+
'fa-save': ['save'],
|
189
|
+
'fa-seedling': ['e-care'],
|
190
|
+
'fa-sitemap': ['tree'],
|
191
|
+
'fa-sort': ['sorting-ranking'],
|
192
|
+
'fa-strikethrough': ['strikethrough'],
|
193
|
+
'fa-sync-alt': ['synchronize'],
|
194
|
+
'fa-thumbs-up': ['thumb-up'],
|
195
|
+
'fa-trash-restore': ['history'],
|
196
|
+
'fa-user-friends': ['group'],
|
197
|
+
'fa-users': ['family-care'],
|
198
|
+
'fa-align-center': ['text-align-center'],
|
199
|
+
'fa-align-right': ['text-align-right'],
|
200
|
+
'fa-angle-left': ['slim-arrow-left'],
|
201
|
+
'fa-arrows-h': ['resize-horizontal'],
|
202
|
+
'fa-at': ['arobase'],
|
203
|
+
'fa-badge-check': ['checklist-item-2'],
|
204
|
+
'fa-balance-scale-right': ['compare-2'],
|
205
|
+
'fa-binoculars': ['sys-find'],
|
206
|
+
'fa-book-open': ['education'],
|
207
|
+
'fa-bullhorn': ['marketing-campaign'],
|
208
|
+
'fa-caret-left': ['navigation-left-arrow'],
|
209
|
+
'fa-chart-pie-alt': ['pie-chart'],
|
210
|
+
'fa-child': ['tnt/actor'],
|
211
|
+
'fa-comments': ['discussion'],
|
212
|
+
'fa-compass': ['business-objects-explorer'],
|
213
|
+
'fa-compress': ['exit-full-screen'],
|
214
|
+
'fa-do-not-enter': ['cancel'],
|
215
|
+
'fa-dollar-sign': ['lead'],
|
216
|
+
'fa-expand-wide': ['full-screen'],
|
217
|
+
'fa-eye-dropper': ['business-suite/pipette'],
|
218
|
+
'fa-file-plus': ['add-document'],
|
219
|
+
'fa-fire-alt': ['business-suite/fire'],
|
220
|
+
'fa-headset': ['headset'],
|
221
|
+
'fa-history': ['history'],
|
222
|
+
'fa-list-ul': ['list'],
|
223
|
+
'fa-lock-alt': ['locked'],
|
224
|
+
'fa-lock-open': ['unlocked'],
|
225
|
+
'fa-long-arrow-right': ['arrow-right'],
|
226
|
+
'fa-minus-circle': ['sys-minus'],
|
227
|
+
'fa-phone-alt': ['call'],
|
228
|
+
'fa-play-circle': ['play'],
|
229
|
+
'fa-print': ['print'],
|
230
|
+
'fa-radar': ['business-suite/radius'],
|
231
|
+
'fa-shield-alt': ['shield'],
|
232
|
+
'fa-shopping-cart': ['cart'],
|
233
|
+
'fa-trophy': ['competitor'],
|
234
|
+
'fa-umbrella-beach': ['umbrella'],
|
235
|
+
'fa-arrow': [],
|
236
|
+
'fa-atom': [],
|
237
|
+
'fa-bug': [],
|
238
|
+
'fa-bullseye-arrow': [],
|
239
|
+
'fa-chess-queen-alt': [],
|
240
|
+
'fa-cloud': [],
|
241
|
+
'fa-euro-sign': [],
|
242
|
+
'fa-exchange': [],
|
243
|
+
'fa-folder-open': [],
|
244
|
+
'fa-gavel': [],
|
245
|
+
'fa-hammer': [],
|
246
|
+
'fa-hat-wizard': [],
|
247
|
+
'fa-hourglass-end': [],
|
248
|
+
'fa-lemon': [],
|
249
|
+
'fa-pound-sign': [],
|
250
|
+
'fa-shield': [],
|
251
|
+
'fa-signal': [],
|
252
|
+
'fa-toolbox': [],
|
253
|
+
'fa-tools': [],
|
254
|
+
'fa-tshirt': [],
|
255
|
+
'fa-underline': ['underline-text'],
|
256
|
+
'fa-unicorn': [],
|
257
|
+
'fa-user-hard-hat': []
|
258
|
+
};
|
53
259
|
|
54
260
|
/**
|
55
261
|
* Badge component is used to show a small piece of information in a colored badge.
|
@@ -253,14 +459,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImpor
|
|
253
459
|
* Opt-in to render SAP icons in the `ButtonComponent`
|
254
460
|
*/
|
255
461
|
const LX_BUTTON_USE_SAP_ICONS = new InjectionToken('LX_BUTTON_USE_SAP_ICONS', {
|
256
|
-
factory: () =>
|
462
|
+
factory: () => {
|
463
|
+
window.useSAPIconInLxButton$ ??= new BehaviorSubject(false);
|
464
|
+
return window.useSAPIconInLxButton$;
|
465
|
+
}
|
257
466
|
});
|
258
|
-
/**
|
259
|
-
* @internal
|
260
|
-
* Maps font awesome icons to SAP icons to toggle icons in `ButtonComponent`.
|
261
|
-
* Required if `LX_BUTTON_USE_SAP_ICONS` is provided with `true`.
|
262
|
-
*/
|
263
|
-
const LX_BUTTON_ICON_MAP = new InjectionToken('ICON_MAP');
|
264
467
|
/**
|
265
468
|
* Button component is used to create a button with different styles and sizes. This uses native button element and
|
266
469
|
* only provides styling and some additional features like loading spinner.
|
@@ -275,7 +478,6 @@ const LX_BUTTON_ICON_MAP = new InjectionToken('ICON_MAP');
|
|
275
478
|
*/
|
276
479
|
class ButtonComponent {
|
277
480
|
constructor() {
|
278
|
-
this.iconMap = inject(LX_BUTTON_ICON_MAP, { optional: true });
|
279
481
|
this.useSAPIcons = toSignal(inject(LX_BUTTON_USE_SAP_ICONS, { optional: true }) || of(false));
|
280
482
|
/**
|
281
483
|
* The size of the button.
|
@@ -348,23 +550,20 @@ class ButtonComponent {
|
|
348
550
|
}
|
349
551
|
getMappedIconName(iconName) {
|
350
552
|
const useSAPIcons = this.useSAPIcons();
|
351
|
-
if (!iconName
|
553
|
+
if (!iconName) {
|
352
554
|
return null;
|
353
555
|
}
|
354
|
-
if (useSAPIcons
|
355
|
-
return getSAPIcon(iconName
|
556
|
+
if (useSAPIcons) {
|
557
|
+
return getSAPIcon(iconName);
|
356
558
|
}
|
357
|
-
|
358
|
-
return removeFontAwesomeVariant(iconName);
|
359
|
-
}
|
360
|
-
return null;
|
559
|
+
return removeFontAwesomeVariant(iconName);
|
361
560
|
}
|
362
561
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: ButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
363
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.8", type: ButtonComponent, isStandalone: true, selector: "button[lx-button]", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: false, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: false, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: false, isRequired: false, transformFunction: null }, pressed: { classPropertyName: "pressed", publicName: "pressed", isSignal: false, isRequired: false, transformFunction: null }, selected: { classPropertyName: "selected", publicName: "selected", isSignal: false, isRequired: false, transformFunction: null }, square: { classPropertyName: "square", publicName: "square", isSignal: false, isRequired: false, transformFunction: null }, circle: { classPropertyName: "circle", publicName: "circle", isSignal: false, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: false, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, endIcon: { classPropertyName: "endIcon", publicName: "endIcon", isSignal: true, isRequired: false, transformFunction: null }, showSpinner: { classPropertyName: "showSpinner", publicName: "showSpinner", isSignal: false, isRequired: false, transformFunction: null } }, host: { properties: { "attr.size": "this.size", "attr.color": "this.color", "attr.mode": "this.mode", "class.pressed": "this.pressed", "class.selected": "this.selected", "class.square": "this.square", "class.circle": "this.circle", "class.withIcon": "this.hasIcon", "class.loading": "this.showSpinner", "disabled": "this.isDisabled" } }, ngImport: i0, template: "@let useNewIcons = useSAPIcons();\n@let startIcon = iconName();\n@let endIcon = endIconName();\n@if (!startIcon && !endIcon) {\n <!-- old layout -->\n @if (showSpinner) {\n <lx-tiny-spinner />\n }\n <ng-container *ngTemplateOutlet=\"content\" />\n} @else {\n <div class=\"contentWrapper\">\n <!-- new layout -->\n @if (showSpinner) {\n <lx-tiny-spinner />\n } @else if (startIcon && useNewIcons) {\n <ui5-icon class=\"ui5Icon\" [name]=\"startIcon\" data-testid=\"start-icon\" />\n } @else if (startIcon && !useNewIcons) {\n <i class=\"fa-fw {{ startIcon }} {{ iconVariant() }}\" role=\"img\" aria-hidden=\"true\" data-testid=\"start-icon\"></i>\n }\n <ng-container *ngTemplateOutlet=\"content\" />\n @if (!showSpinner && endIcon && useNewIcons) {\n <ui5-icon class=\"ui5Icon\" [name]=\"endIcon\" data-testid=\"end-icon\" />\n } @else if (!showSpinner && endIcon && !useNewIcons) {\n <i class=\"fa-fw {{ endIcon }} {{ endIconVariant() }}\" role=\"img\" aria-hidden=\"true\" data-testid=\"end-icon\"></i>\n }\n </div>\n}\n\n<!-- ng-content with the same slot can be used once in the same template -->\n<ng-template #content>\n <ng-content />\n</ng-template>\n", styles: ["@keyframes subtleScaleUpKeyFrames{0%{transform:scale(.95);opacity:0}}:host ::ng-deep i{font-size:.9em}:host(.withIcon){line-height:unset}:host(.withIcon) .contentWrapper{display:flex;height:100%;align-items:center;justify-content:center;column-gap:4px}:host(.withIcon) .far{line-height:unset;font-size:var(--lxFontSmallSize)}:host(.withIcon) .ui5Icon{width:var(--lxFontSmallSize);height:var(--lxFontSmallSize);color:inherit}:host(.withIcon).loading[color]{position:relative;color:transparent}:host(.withIcon).loading[color] lx-tiny-spinner{position:absolute;left:50%;transform:translate(-50%)}:host{border-radius:3px;font-weight:var(--lxFontNormal, 400);cursor:pointer;transition:color,background-color,border-color .18s;transition-delay:0s;transition-timing-function:ease}:host[disabled]{opacity:.5;cursor:default}:host[color=default] lx-tiny-spinner{color:#2a303d}:host[color=default][mode=solid]{color:#2a303d;background-color:#f0f2f5;border:1px solid #f0f2f5}:host[color=default][mode=solid]:hover:not([disabled]),:host[color=default][mode=solid]:focus:not([disabled]){color:#2a303d;background-color:#e1e5eb;border:1px solid #e1e5eb}:host[color=default][mode=solid]:active:not([disabled]){color:#2a303d;background-color:#c2c9d6;border:1px solid #c2c9d6}:host[color=default][mode=solid].pressed{background-color:#c2c9d6!important;border-color:#c2c9d6!important}:host[color=default][mode=solid].selected{color:#2a303d;background-color:#e1e5eb;border:1px solid #e1e5eb}:host[color=default][mode=outline]{color:#2a303d;background-color:transparent;border:1px solid #e1e5eb}:host[color=default][mode=outline]:focus:not([disabled]),:host[color=default][mode=outline]:hover:not([disabled]){color:#2a303d;background-color:#f0f2f5;border:1px solid #f0f2f5}:host[color=default][mode=outline]:active:not([disabled]){color:#2a303d;background-color:#e1e5eb;border:1px solid #e1e5eb}:host[color=default][mode=ghost]{color:#2a303d;background-color:transparent;border:1px solid transparent}:host[color=default][mode=ghost]:focus:not([disabled]),:host[color=default][mode=ghost]:hover:not([disabled]){color:#2a303d;background-color:transparent;border:1px solid #e1e5eb}:host[color=default][mode=ghost]:active:not([disabled]){color:#2a303d;background-color:#f0f2f5;border:1px solid #f0f2f5}:host[color=default][mode=link]{color:#2a303d;background-color:transparent;border:1px solid transparent;padding:0;border:none}:host[color=default][mode=link]:focus:not([disabled]),:host[color=default][mode=link]:hover:not([disabled]),:host[color=default][mode=link]:active:not([disabled]){color:#2a303d;background-color:transparent;border:1px solid transparent;text-decoration:underline;border:none}:host[color=light] lx-tiny-spinner{color:#2a303d}:host[color=light][mode=solid]{color:#2a303d;background-color:#fff;border:1px solid #99a5bb}:host[color=light][mode=solid]:hover:not([disabled]),:host[color=light][mode=solid]:focus:not([disabled]){color:#2a303d;background-color:#e1e5eb;border:1px solid #e1e5eb}:host[color=light][mode=solid]:active:not([disabled]){color:#2a303d;background-color:#c2c9d6;border:1px solid #c2c9d6}:host[color=light][mode=solid].pressed{background-color:#c2c9d6!important;border-color:#c2c9d6!important}:host[color=light][mode=solid].selected{color:#2a303d;background-color:#e1e5eb;border:1px solid #e1e5eb}:host[color=light][mode=outline]{color:#2a303d;background-color:transparent;border:1px solid #e1e5eb}:host[color=light][mode=outline]:focus:not([disabled]),:host[color=light][mode=outline]:hover:not([disabled]){color:#2a303d;background-color:#fff;border:1px solid #fff}:host[color=light][mode=outline]:active:not([disabled]){color:#2a303d;background-color:#e1e5eb;border:1px solid #e1e5eb}:host[color=light][mode=ghost]{color:#2a303d;background-color:transparent;border:1px solid transparent}:host[color=light][mode=ghost]:focus:not([disabled]),:host[color=light][mode=ghost]:hover:not([disabled]){color:#2a303d;background-color:transparent;border:1px solid #e1e5eb}:host[color=light][mode=ghost]:active:not([disabled]){color:#2a303d;background-color:#fff;border:1px solid #fff}:host[color=light][mode=link]{color:#2a303d;background-color:transparent;border:1px solid transparent;padding:0;border:none}:host[color=light][mode=link]:focus:not([disabled]),:host[color=light][mode=link]:hover:not([disabled]),:host[color=light][mode=link]:active:not([disabled]){color:#2a303d;background-color:transparent;border:1px solid transparent;text-decoration:underline;border:none}:host[color=primary] lx-tiny-spinner{color:var(--lx-primarybutton-fontcolor)}:host[color=primary][mode=solid]{color:var(--lx-primarybutton-fontcolor);background-color:var(--lx-primarybutton-backgroundcolor);border:1px solid var(--lx-primarybutton-backgroundcolor)}:host[color=primary][mode=solid]:hover:not([disabled]),:host[color=primary][mode=solid]:focus:not([disabled]){color:var(--lx-primarybutton-fontcolor);background-color:var(--lx-primarybutton-backgroundcolorhover);border:1px solid var(--lx-primarybutton-backgroundcolorhover)}:host[color=primary][mode=solid]:active:not([disabled]){color:var(--lx-primarybutton-fontcolor);background-color:var(--lx-primarybutton-backgroundcoloractive);border:1px solid var(--lx-primarybutton-backgroundcoloractive)}:host[color=primary][mode=solid].pressed{background-color:var(--lx-primarybutton-backgroundcoloractive)!important;border-color:var(--lx-primarybutton-backgroundcoloractive)!important}:host[color=primary][mode=solid].selected{color:var(--lx-primarybutton-fontcolor);background-color:var(--lx-primarybutton-backgroundcolorhover);border:1px solid var(--lx-primarybutton-backgroundcolorhover)}:host[color=primary][mode=outline]{color:var(--lx-primarybutton-backgroundcolor);background-color:transparent;border:1px solid var(--lx-primarybutton-backgroundcolor)}:host[color=primary][mode=outline]:focus:not([disabled]),:host[color=primary][mode=outline]:hover:not([disabled]){color:var(--lx-primarybutton-fontcolor);background-color:var(--lx-primarybutton-backgroundcolor);border:1px solid var(--lx-primarybutton-backgroundcolor)}:host[color=primary][mode=outline]:active:not([disabled]){color:var(--lx-primarybutton-fontcolor);background-color:var(--lx-primarybutton-backgroundcolorhover);border:1px solid var(--lx-primarybutton-backgroundcolorhover)}:host[color=primary][mode=ghost]{color:var(--lx-primarybutton-backgroundcolor);background-color:transparent;border:1px solid transparent}:host[color=primary][mode=ghost]:focus:not([disabled]),:host[color=primary][mode=ghost]:hover:not([disabled]){color:var(--lx-primarybutton-backgroundcolor);background-color:transparent;border:1px solid var(--lx-primarybutton-backgroundcolor)}:host[color=primary][mode=ghost]:active:not([disabled]){color:var(--lx-primarybutton-fontcolor);background-color:var(--lx-primarybutton-backgroundcolor);border:1px solid var(--lx-primarybutton-backgroundcolor)}:host[color=primary][mode=link]{color:var(--lx-primarybutton-backgroundcolor);background-color:transparent;border:1px solid transparent;padding:0;border:none}:host[color=primary][mode=link]:focus:not([disabled]),:host[color=primary][mode=link]:hover:not([disabled]),:host[color=primary][mode=link]:active:not([disabled]){color:var(--lx-primarybutton-backgroundcolor);background-color:transparent;border:1px solid transparent;text-decoration:underline;border:none}:host[color=danger] lx-tiny-spinner{color:#fff}:host[color=danger][mode=solid]{color:#fff;background-color:#f96464;border:1px solid #f96464}:host[color=danger][mode=solid]:hover:not([disabled]),:host[color=danger][mode=solid]:focus:not([disabled]){color:#fff;background-color:#f61a1a;border:1px solid #f61a1a}:host[color=danger][mode=solid]:active:not([disabled]){color:#fff;background-color:#bd0707;border:1px solid #bd0707}:host[color=danger][mode=solid].pressed{background-color:#bd0707!important;border-color:#bd0707!important}:host[color=danger][mode=solid].selected{color:#fff;background-color:#f61a1a;border:1px solid #f61a1a}:host[color=danger][mode=outline]{color:#f96464;background-color:transparent;border:1px solid #f96464}:host[color=danger][mode=outline]:focus:not([disabled]),:host[color=danger][mode=outline]:hover:not([disabled]){color:#fff;background-color:#f96464;border:1px solid #f96464}:host[color=danger][mode=outline]:active:not([disabled]){color:#fff;background-color:#f61a1a;border:1px solid #f61a1a}:host[color=danger][mode=ghost]{color:#f96464;background-color:transparent;border:1px solid transparent}:host[color=danger][mode=ghost]:focus:not([disabled]),:host[color=danger][mode=ghost]:hover:not([disabled]){color:#f96464;background-color:transparent;border:1px solid #f96464}:host[color=danger][mode=ghost]:active:not([disabled]){color:#fff;background-color:#f96464;border:1px solid #f96464}:host[color=danger][mode=link]{color:#f96464;background-color:transparent;border:1px solid transparent;padding:0;border:none}:host[color=danger][mode=link]:focus:not([disabled]),:host[color=danger][mode=link]:hover:not([disabled]),:host[color=danger][mode=link]:active:not([disabled]){color:#f96464;background-color:transparent;border:1px solid transparent;text-decoration:underline;border:none}:host[color=success] lx-tiny-spinner{color:#fff}:host[color=success][mode=solid]{color:#fff;background-color:#33cc58;border:1px solid #33cc58}:host[color=success][mode=solid]:hover:not([disabled]),:host[color=success][mode=solid]:focus:not([disabled]){color:#fff;background-color:#248f3e;border:1px solid #248f3e}:host[color=success][mode=solid]:active:not([disabled]){color:#fff;background-color:#145223;border:1px solid #145223}:host[color=success][mode=solid].pressed{background-color:#145223!important;border-color:#145223!important}:host[color=success][mode=solid].selected{color:#fff;background-color:#248f3e;border:1px solid #248f3e}:host[color=success][mode=outline]{color:#33cc58;background-color:transparent;border:1px solid #33cc58}:host[color=success][mode=outline]:focus:not([disabled]),:host[color=success][mode=outline]:hover:not([disabled]){color:#fff;background-color:#33cc58;border:1px solid #33cc58}:host[color=success][mode=outline]:active:not([disabled]){color:#fff;background-color:#248f3e;border:1px solid #248f3e}:host[color=success][mode=ghost]{color:#33cc58;background-color:transparent;border:1px solid transparent}:host[color=success][mode=ghost]:focus:not([disabled]),:host[color=success][mode=ghost]:hover:not([disabled]){color:#33cc58;background-color:transparent;border:1px solid #33cc58}:host[color=success][mode=ghost]:active:not([disabled]){color:#fff;background-color:#33cc58;border:1px solid #33cc58}:host[color=success][mode=link]{color:#33cc58;background-color:transparent;border:1px solid transparent;padding:0;border:none}:host[color=success][mode=link]:focus:not([disabled]),:host[color=success][mode=link]:hover:not([disabled]),:host[color=success][mode=link]:active:not([disabled]){color:#33cc58;background-color:transparent;border:1px solid transparent;text-decoration:underline;border:none}:host[size=small]{height:20px;line-height:12px;padding:3px 7px;font-size:12px;min-width:20px}:host[size=small].square{width:20px;text-align:center;padding:0}:host[size=small].circle{border-radius:10px;min-width:20px;padding:0 3px}:host[size=medium]{height:24px;line-height:16px;padding:3px 7px;font-size:var(--lxFontSize, 13.5px);min-width:24px}:host[size=medium].square{width:24px;text-align:center;padding:0}:host[size=medium].circle{border-radius:11px;min-width:24px;padding:0 3px}:host[size=large]{height:32px;line-height:16px;padding:7px 11px;font-size:var(--lxFontSize, 13.5px);min-width:32px}:host[size=large].square{width:32px;text-align:center;padding:0}:host[size=large].circle{border-radius:15px;min-width:32px;padding:0 7px}:host[size=auto]{height:auto;line-height:normal;padding:0;font-size:inherit;min-width:auto}:host[size=auto].square{width:auto;text-align:center;padding:0}:host[size=auto].circle{border-radius:unset;min-width:auto;padding:0}:host[size=auto].circle{height:auto;line-height:normal;padding:0;font-size:inherit;min-width:auto}:host[size=auto].circle.square{width:auto;text-align:center;padding:0}:host[size=auto].circle.circle{border-radius:10px;min-width:auto;padding:0}:host.loading:not(.withIcon){position:relative;opacity:.5;color:transparent!important}:host.loading:not(.withIcon) lx-tiny-spinner{position:absolute;left:calc(50% - .5em)}\n"], dependencies: [{ kind: "component", type: TinySpinnerComponent, selector: "lx-tiny-spinner" }, { kind: "component", type: IconComponent$1, selector: "ui5-icon", inputs: ["design", "name", "accessibleName", "showTooltip", "mode"], exportAs: ["ui5Icon"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
562
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.8", type: ButtonComponent, isStandalone: true, selector: "button[lx-button]", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: false, isRequired: false, transformFunction: null }, color: { classPropertyName: "color", publicName: "color", isSignal: false, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: false, isRequired: false, transformFunction: null }, pressed: { classPropertyName: "pressed", publicName: "pressed", isSignal: false, isRequired: false, transformFunction: null }, selected: { classPropertyName: "selected", publicName: "selected", isSignal: false, isRequired: false, transformFunction: null }, square: { classPropertyName: "square", publicName: "square", isSignal: false, isRequired: false, transformFunction: null }, circle: { classPropertyName: "circle", publicName: "circle", isSignal: false, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: false, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, endIcon: { classPropertyName: "endIcon", publicName: "endIcon", isSignal: true, isRequired: false, transformFunction: null }, showSpinner: { classPropertyName: "showSpinner", publicName: "showSpinner", isSignal: false, isRequired: false, transformFunction: null } }, host: { properties: { "attr.size": "this.size", "attr.color": "this.color", "attr.mode": "this.mode", "class.pressed": "this.pressed", "class.selected": "this.selected", "class.square": "this.square", "class.circle": "this.circle", "class.withIcon": "this.hasIcon", "class.loading": "this.showSpinner", "disabled": "this.isDisabled" } }, ngImport: i0, template: "@let useNewIcons = useSAPIcons();\n@let startIcon = iconName();\n@let endIcon = endIconName();\n@if (!startIcon && !endIcon) {\n <!-- old layout -->\n @if (showSpinner) {\n <lx-tiny-spinner />\n }\n <ng-container *ngTemplateOutlet=\"content\" />\n} @else {\n <div class=\"contentWrapper\">\n <!-- new layout -->\n @if (showSpinner) {\n <lx-tiny-spinner />\n } @else if (startIcon && useNewIcons) {\n <ui5-icon class=\"ui5Icon\" [name]=\"startIcon\" data-testid=\"start-icon\" />\n } @else if (startIcon && !useNewIcons) {\n <i class=\"fa-fw {{ startIcon }} {{ iconVariant() }}\" role=\"img\" aria-hidden=\"true\" data-testid=\"start-icon\"></i>\n }\n <ng-container *ngTemplateOutlet=\"content\" />\n @if (!showSpinner && endIcon && useNewIcons) {\n <ui5-icon class=\"ui5Icon\" [name]=\"endIcon\" data-testid=\"end-icon\" />\n } @else if (!showSpinner && endIcon && !useNewIcons) {\n <i class=\"fa-fw {{ endIcon }} {{ endIconVariant() }}\" role=\"img\" aria-hidden=\"true\" data-testid=\"end-icon\"></i>\n }\n </div>\n}\n\n<!-- ng-content with the same slot can be used once in the same template -->\n<ng-template #content>\n <ng-content />\n</ng-template>\n", styles: ["@keyframes subtleScaleUpKeyFrames{0%{transform:scale(.95);opacity:0}}:host ::ng-deep i{font-size:.9em}:host(.withIcon) .contentWrapper{display:flex;height:100%;align-items:center;justify-content:center;column-gap:4px}:host(.withIcon) [class*=fa-]{font-size:var(--lxFontSmallSize)}:host(.withIcon) .ui5Icon{width:var(--lxFontSmallSize);height:var(--lxFontSmallSize);color:inherit}:host(.withIcon).loading[color]{position:relative;color:transparent}:host(.withIcon).loading[color] lx-tiny-spinner{position:absolute;left:50%;transform:translate(-50%)}:host{border-radius:3px;font-weight:var(--lxFontNormal, 400);cursor:pointer;transition:color,background-color,border-color .18s;transition-delay:0s;transition-timing-function:ease}:host[disabled]{opacity:.5;cursor:default}:host[color=default] lx-tiny-spinner{color:#2a303d}:host[color=default][mode=solid]{color:#2a303d;background-color:#f0f2f5;border:1px solid #f0f2f5}:host[color=default][mode=solid]:hover:not([disabled]),:host[color=default][mode=solid]:focus:not([disabled]){color:#2a303d;background-color:#e1e5eb;border:1px solid #e1e5eb}:host[color=default][mode=solid]:active:not([disabled]){color:#2a303d;background-color:#c2c9d6;border:1px solid #c2c9d6}:host[color=default][mode=solid].pressed{background-color:#c2c9d6!important;border-color:#c2c9d6!important}:host[color=default][mode=solid].selected{color:#2a303d;background-color:#e1e5eb;border:1px solid #e1e5eb}:host[color=default][mode=outline]{color:#2a303d;background-color:transparent;border:1px solid #e1e5eb}:host[color=default][mode=outline]:focus:not([disabled]),:host[color=default][mode=outline]:hover:not([disabled]){color:#2a303d;background-color:#f0f2f5;border:1px solid #f0f2f5}:host[color=default][mode=outline]:active:not([disabled]){color:#2a303d;background-color:#e1e5eb;border:1px solid #e1e5eb}:host[color=default][mode=ghost]{color:#2a303d;background-color:transparent;border:1px solid transparent}:host[color=default][mode=ghost]:focus:not([disabled]),:host[color=default][mode=ghost]:hover:not([disabled]){color:#2a303d;background-color:transparent;border:1px solid #e1e5eb}:host[color=default][mode=ghost]:active:not([disabled]){color:#2a303d;background-color:#f0f2f5;border:1px solid #f0f2f5}:host[color=default][mode=link]{color:#2a303d;background-color:transparent;border:1px solid transparent;padding:0;border:none}:host[color=default][mode=link]:focus:not([disabled]),:host[color=default][mode=link]:hover:not([disabled]),:host[color=default][mode=link]:active:not([disabled]){color:#2a303d;background-color:transparent;border:1px solid transparent;text-decoration:underline;border:none}:host[color=light] lx-tiny-spinner{color:#2a303d}:host[color=light][mode=solid]{color:#2a303d;background-color:#fff;border:1px solid #99a5bb}:host[color=light][mode=solid]:hover:not([disabled]),:host[color=light][mode=solid]:focus:not([disabled]){color:#2a303d;background-color:#e1e5eb;border:1px solid #e1e5eb}:host[color=light][mode=solid]:active:not([disabled]){color:#2a303d;background-color:#c2c9d6;border:1px solid #c2c9d6}:host[color=light][mode=solid].pressed{background-color:#c2c9d6!important;border-color:#c2c9d6!important}:host[color=light][mode=solid].selected{color:#2a303d;background-color:#e1e5eb;border:1px solid #e1e5eb}:host[color=light][mode=outline]{color:#2a303d;background-color:transparent;border:1px solid #e1e5eb}:host[color=light][mode=outline]:focus:not([disabled]),:host[color=light][mode=outline]:hover:not([disabled]){color:#2a303d;background-color:#fff;border:1px solid #fff}:host[color=light][mode=outline]:active:not([disabled]){color:#2a303d;background-color:#e1e5eb;border:1px solid #e1e5eb}:host[color=light][mode=ghost]{color:#2a303d;background-color:transparent;border:1px solid transparent}:host[color=light][mode=ghost]:focus:not([disabled]),:host[color=light][mode=ghost]:hover:not([disabled]){color:#2a303d;background-color:transparent;border:1px solid #e1e5eb}:host[color=light][mode=ghost]:active:not([disabled]){color:#2a303d;background-color:#fff;border:1px solid #fff}:host[color=light][mode=link]{color:#2a303d;background-color:transparent;border:1px solid transparent;padding:0;border:none}:host[color=light][mode=link]:focus:not([disabled]),:host[color=light][mode=link]:hover:not([disabled]),:host[color=light][mode=link]:active:not([disabled]){color:#2a303d;background-color:transparent;border:1px solid transparent;text-decoration:underline;border:none}:host[color=primary] lx-tiny-spinner{color:var(--lx-primarybutton-fontcolor)}:host[color=primary][mode=solid]{color:var(--lx-primarybutton-fontcolor);background-color:var(--lx-primarybutton-backgroundcolor);border:1px solid var(--lx-primarybutton-backgroundcolor)}:host[color=primary][mode=solid]:hover:not([disabled]),:host[color=primary][mode=solid]:focus:not([disabled]){color:var(--lx-primarybutton-fontcolor);background-color:var(--lx-primarybutton-backgroundcolorhover);border:1px solid var(--lx-primarybutton-backgroundcolorhover)}:host[color=primary][mode=solid]:active:not([disabled]){color:var(--lx-primarybutton-fontcolor);background-color:var(--lx-primarybutton-backgroundcoloractive);border:1px solid var(--lx-primarybutton-backgroundcoloractive)}:host[color=primary][mode=solid].pressed{background-color:var(--lx-primarybutton-backgroundcoloractive)!important;border-color:var(--lx-primarybutton-backgroundcoloractive)!important}:host[color=primary][mode=solid].selected{color:var(--lx-primarybutton-fontcolor);background-color:var(--lx-primarybutton-backgroundcolorhover);border:1px solid var(--lx-primarybutton-backgroundcolorhover)}:host[color=primary][mode=outline]{color:var(--lx-primarybutton-backgroundcolor);background-color:transparent;border:1px solid var(--lx-primarybutton-backgroundcolor)}:host[color=primary][mode=outline]:focus:not([disabled]),:host[color=primary][mode=outline]:hover:not([disabled]){color:var(--lx-primarybutton-fontcolor);background-color:var(--lx-primarybutton-backgroundcolor);border:1px solid var(--lx-primarybutton-backgroundcolor)}:host[color=primary][mode=outline]:active:not([disabled]){color:var(--lx-primarybutton-fontcolor);background-color:var(--lx-primarybutton-backgroundcolorhover);border:1px solid var(--lx-primarybutton-backgroundcolorhover)}:host[color=primary][mode=ghost]{color:var(--lx-primarybutton-backgroundcolor);background-color:transparent;border:1px solid transparent}:host[color=primary][mode=ghost]:focus:not([disabled]),:host[color=primary][mode=ghost]:hover:not([disabled]){color:var(--lx-primarybutton-backgroundcolor);background-color:transparent;border:1px solid var(--lx-primarybutton-backgroundcolor)}:host[color=primary][mode=ghost]:active:not([disabled]){color:var(--lx-primarybutton-fontcolor);background-color:var(--lx-primarybutton-backgroundcolor);border:1px solid var(--lx-primarybutton-backgroundcolor)}:host[color=primary][mode=link]{color:var(--lx-primarybutton-backgroundcolor);background-color:transparent;border:1px solid transparent;padding:0;border:none}:host[color=primary][mode=link]:focus:not([disabled]),:host[color=primary][mode=link]:hover:not([disabled]),:host[color=primary][mode=link]:active:not([disabled]){color:var(--lx-primarybutton-backgroundcolor);background-color:transparent;border:1px solid transparent;text-decoration:underline;border:none}:host[color=danger] lx-tiny-spinner{color:#fff}:host[color=danger][mode=solid]{color:#fff;background-color:#f96464;border:1px solid #f96464}:host[color=danger][mode=solid]:hover:not([disabled]),:host[color=danger][mode=solid]:focus:not([disabled]){color:#fff;background-color:#f61a1a;border:1px solid #f61a1a}:host[color=danger][mode=solid]:active:not([disabled]){color:#fff;background-color:#bd0707;border:1px solid #bd0707}:host[color=danger][mode=solid].pressed{background-color:#bd0707!important;border-color:#bd0707!important}:host[color=danger][mode=solid].selected{color:#fff;background-color:#f61a1a;border:1px solid #f61a1a}:host[color=danger][mode=outline]{color:#f96464;background-color:transparent;border:1px solid #f96464}:host[color=danger][mode=outline]:focus:not([disabled]),:host[color=danger][mode=outline]:hover:not([disabled]){color:#fff;background-color:#f96464;border:1px solid #f96464}:host[color=danger][mode=outline]:active:not([disabled]){color:#fff;background-color:#f61a1a;border:1px solid #f61a1a}:host[color=danger][mode=ghost]{color:#f96464;background-color:transparent;border:1px solid transparent}:host[color=danger][mode=ghost]:focus:not([disabled]),:host[color=danger][mode=ghost]:hover:not([disabled]){color:#f96464;background-color:transparent;border:1px solid #f96464}:host[color=danger][mode=ghost]:active:not([disabled]){color:#fff;background-color:#f96464;border:1px solid #f96464}:host[color=danger][mode=link]{color:#f96464;background-color:transparent;border:1px solid transparent;padding:0;border:none}:host[color=danger][mode=link]:focus:not([disabled]),:host[color=danger][mode=link]:hover:not([disabled]),:host[color=danger][mode=link]:active:not([disabled]){color:#f96464;background-color:transparent;border:1px solid transparent;text-decoration:underline;border:none}:host[color=success] lx-tiny-spinner{color:#fff}:host[color=success][mode=solid]{color:#fff;background-color:#33cc58;border:1px solid #33cc58}:host[color=success][mode=solid]:hover:not([disabled]),:host[color=success][mode=solid]:focus:not([disabled]){color:#fff;background-color:#248f3e;border:1px solid #248f3e}:host[color=success][mode=solid]:active:not([disabled]){color:#fff;background-color:#145223;border:1px solid #145223}:host[color=success][mode=solid].pressed{background-color:#145223!important;border-color:#145223!important}:host[color=success][mode=solid].selected{color:#fff;background-color:#248f3e;border:1px solid #248f3e}:host[color=success][mode=outline]{color:#33cc58;background-color:transparent;border:1px solid #33cc58}:host[color=success][mode=outline]:focus:not([disabled]),:host[color=success][mode=outline]:hover:not([disabled]){color:#fff;background-color:#33cc58;border:1px solid #33cc58}:host[color=success][mode=outline]:active:not([disabled]){color:#fff;background-color:#248f3e;border:1px solid #248f3e}:host[color=success][mode=ghost]{color:#33cc58;background-color:transparent;border:1px solid transparent}:host[color=success][mode=ghost]:focus:not([disabled]),:host[color=success][mode=ghost]:hover:not([disabled]){color:#33cc58;background-color:transparent;border:1px solid #33cc58}:host[color=success][mode=ghost]:active:not([disabled]){color:#fff;background-color:#33cc58;border:1px solid #33cc58}:host[color=success][mode=link]{color:#33cc58;background-color:transparent;border:1px solid transparent;padding:0;border:none}:host[color=success][mode=link]:focus:not([disabled]),:host[color=success][mode=link]:hover:not([disabled]),:host[color=success][mode=link]:active:not([disabled]){color:#33cc58;background-color:transparent;border:1px solid transparent;text-decoration:underline;border:none}:host[size=small]{height:20px;padding:3px 7px;font-size:var(--lxFontSmallSize, 12px);min-width:20px}:host[size=small]:not(.withIcon){line-height:12px}:host[size=small].square{width:20px;text-align:center;padding:0}:host[size=small].circle{border-radius:10px;min-width:20px;padding:0 3px}:host[size=small].withIcon:not(.square,.circle){padding:0 8px}:host[size=medium]{height:24px;padding:3px 7px;font-size:var(--lxFontSize, 13.5px);min-width:24px}:host[size=medium]:not(.withIcon){line-height:16px}:host[size=medium].square{width:24px;text-align:center;padding:0}:host[size=medium].circle{border-radius:11px;min-width:24px;padding:0 3px}:host[size=medium].withIcon:not(.square,.circle){padding:0 8px}:host[size=large]{height:32px;padding:7px 11px;font-size:var(--lxFontSize, 13.5px);min-width:32px}:host[size=large]:not(.withIcon){line-height:16px}:host[size=large].square{width:32px;text-align:center;padding:0}:host[size=large].circle{border-radius:15px;min-width:32px;padding:0 7px}:host[size=large].withIcon:not(.square,.circle){padding:0 8px}:host[size=auto]{height:auto;padding:0;font-size:inherit;min-width:auto}:host[size=auto]:not(.withIcon){line-height:normal}:host[size=auto].square{width:auto;text-align:center;padding:0}:host[size=auto].circle{border-radius:unset;min-width:auto;padding:0}:host[size=auto].circle{height:auto;padding:0;font-size:inherit;min-width:auto}:host[size=auto].circle:not(.withIcon){line-height:normal}:host[size=auto].circle.square{width:auto;text-align:center;padding:0}:host[size=auto].circle.circle{border-radius:10px;min-width:auto;padding:0}:host.loading:not(.withIcon){position:relative;opacity:.5;color:transparent!important}:host.loading:not(.withIcon) lx-tiny-spinner{position:absolute;left:calc(50% - .5em)}\n"], dependencies: [{ kind: "component", type: TinySpinnerComponent, selector: "lx-tiny-spinner" }, { kind: "component", type: IconComponent$1, selector: "ui5-icon", inputs: ["design", "name", "accessibleName", "showTooltip", "mode"], exportAs: ["ui5Icon"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
364
563
|
}
|
365
564
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImport: i0, type: ButtonComponent, decorators: [{
|
366
565
|
type: Component,
|
367
|
-
args: [{ selector: 'button[lx-button]', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [TinySpinnerComponent, IconComponent$1, NgTemplateOutlet], template: "@let useNewIcons = useSAPIcons();\n@let startIcon = iconName();\n@let endIcon = endIconName();\n@if (!startIcon && !endIcon) {\n <!-- old layout -->\n @if (showSpinner) {\n <lx-tiny-spinner />\n }\n <ng-container *ngTemplateOutlet=\"content\" />\n} @else {\n <div class=\"contentWrapper\">\n <!-- new layout -->\n @if (showSpinner) {\n <lx-tiny-spinner />\n } @else if (startIcon && useNewIcons) {\n <ui5-icon class=\"ui5Icon\" [name]=\"startIcon\" data-testid=\"start-icon\" />\n } @else if (startIcon && !useNewIcons) {\n <i class=\"fa-fw {{ startIcon }} {{ iconVariant() }}\" role=\"img\" aria-hidden=\"true\" data-testid=\"start-icon\"></i>\n }\n <ng-container *ngTemplateOutlet=\"content\" />\n @if (!showSpinner && endIcon && useNewIcons) {\n <ui5-icon class=\"ui5Icon\" [name]=\"endIcon\" data-testid=\"end-icon\" />\n } @else if (!showSpinner && endIcon && !useNewIcons) {\n <i class=\"fa-fw {{ endIcon }} {{ endIconVariant() }}\" role=\"img\" aria-hidden=\"true\" data-testid=\"end-icon\"></i>\n }\n </div>\n}\n\n<!-- ng-content with the same slot can be used once in the same template -->\n<ng-template #content>\n <ng-content />\n</ng-template>\n", styles: ["@keyframes subtleScaleUpKeyFrames{0%{transform:scale(.95);opacity:0}}:host ::ng-deep i{font-size:.9em}:host(.withIcon){line-height:unset}:host(.withIcon) .contentWrapper{display:flex;height:100%;align-items:center;justify-content:center;column-gap:4px}:host(.withIcon) .far{line-height:unset;font-size:var(--lxFontSmallSize)}:host(.withIcon) .ui5Icon{width:var(--lxFontSmallSize);height:var(--lxFontSmallSize);color:inherit}:host(.withIcon).loading[color]{position:relative;color:transparent}:host(.withIcon).loading[color] lx-tiny-spinner{position:absolute;left:50%;transform:translate(-50%)}:host{border-radius:3px;font-weight:var(--lxFontNormal, 400);cursor:pointer;transition:color,background-color,border-color .18s;transition-delay:0s;transition-timing-function:ease}:host[disabled]{opacity:.5;cursor:default}:host[color=default] lx-tiny-spinner{color:#2a303d}:host[color=default][mode=solid]{color:#2a303d;background-color:#f0f2f5;border:1px solid #f0f2f5}:host[color=default][mode=solid]:hover:not([disabled]),:host[color=default][mode=solid]:focus:not([disabled]){color:#2a303d;background-color:#e1e5eb;border:1px solid #e1e5eb}:host[color=default][mode=solid]:active:not([disabled]){color:#2a303d;background-color:#c2c9d6;border:1px solid #c2c9d6}:host[color=default][mode=solid].pressed{background-color:#c2c9d6!important;border-color:#c2c9d6!important}:host[color=default][mode=solid].selected{color:#2a303d;background-color:#e1e5eb;border:1px solid #e1e5eb}:host[color=default][mode=outline]{color:#2a303d;background-color:transparent;border:1px solid #e1e5eb}:host[color=default][mode=outline]:focus:not([disabled]),:host[color=default][mode=outline]:hover:not([disabled]){color:#2a303d;background-color:#f0f2f5;border:1px solid #f0f2f5}:host[color=default][mode=outline]:active:not([disabled]){color:#2a303d;background-color:#e1e5eb;border:1px solid #e1e5eb}:host[color=default][mode=ghost]{color:#2a303d;background-color:transparent;border:1px solid transparent}:host[color=default][mode=ghost]:focus:not([disabled]),:host[color=default][mode=ghost]:hover:not([disabled]){color:#2a303d;background-color:transparent;border:1px solid #e1e5eb}:host[color=default][mode=ghost]:active:not([disabled]){color:#2a303d;background-color:#f0f2f5;border:1px solid #f0f2f5}:host[color=default][mode=link]{color:#2a303d;background-color:transparent;border:1px solid transparent;padding:0;border:none}:host[color=default][mode=link]:focus:not([disabled]),:host[color=default][mode=link]:hover:not([disabled]),:host[color=default][mode=link]:active:not([disabled]){color:#2a303d;background-color:transparent;border:1px solid transparent;text-decoration:underline;border:none}:host[color=light] lx-tiny-spinner{color:#2a303d}:host[color=light][mode=solid]{color:#2a303d;background-color:#fff;border:1px solid #99a5bb}:host[color=light][mode=solid]:hover:not([disabled]),:host[color=light][mode=solid]:focus:not([disabled]){color:#2a303d;background-color:#e1e5eb;border:1px solid #e1e5eb}:host[color=light][mode=solid]:active:not([disabled]){color:#2a303d;background-color:#c2c9d6;border:1px solid #c2c9d6}:host[color=light][mode=solid].pressed{background-color:#c2c9d6!important;border-color:#c2c9d6!important}:host[color=light][mode=solid].selected{color:#2a303d;background-color:#e1e5eb;border:1px solid #e1e5eb}:host[color=light][mode=outline]{color:#2a303d;background-color:transparent;border:1px solid #e1e5eb}:host[color=light][mode=outline]:focus:not([disabled]),:host[color=light][mode=outline]:hover:not([disabled]){color:#2a303d;background-color:#fff;border:1px solid #fff}:host[color=light][mode=outline]:active:not([disabled]){color:#2a303d;background-color:#e1e5eb;border:1px solid #e1e5eb}:host[color=light][mode=ghost]{color:#2a303d;background-color:transparent;border:1px solid transparent}:host[color=light][mode=ghost]:focus:not([disabled]),:host[color=light][mode=ghost]:hover:not([disabled]){color:#2a303d;background-color:transparent;border:1px solid #e1e5eb}:host[color=light][mode=ghost]:active:not([disabled]){color:#2a303d;background-color:#fff;border:1px solid #fff}:host[color=light][mode=link]{color:#2a303d;background-color:transparent;border:1px solid transparent;padding:0;border:none}:host[color=light][mode=link]:focus:not([disabled]),:host[color=light][mode=link]:hover:not([disabled]),:host[color=light][mode=link]:active:not([disabled]){color:#2a303d;background-color:transparent;border:1px solid transparent;text-decoration:underline;border:none}:host[color=primary] lx-tiny-spinner{color:var(--lx-primarybutton-fontcolor)}:host[color=primary][mode=solid]{color:var(--lx-primarybutton-fontcolor);background-color:var(--lx-primarybutton-backgroundcolor);border:1px solid var(--lx-primarybutton-backgroundcolor)}:host[color=primary][mode=solid]:hover:not([disabled]),:host[color=primary][mode=solid]:focus:not([disabled]){color:var(--lx-primarybutton-fontcolor);background-color:var(--lx-primarybutton-backgroundcolorhover);border:1px solid var(--lx-primarybutton-backgroundcolorhover)}:host[color=primary][mode=solid]:active:not([disabled]){color:var(--lx-primarybutton-fontcolor);background-color:var(--lx-primarybutton-backgroundcoloractive);border:1px solid var(--lx-primarybutton-backgroundcoloractive)}:host[color=primary][mode=solid].pressed{background-color:var(--lx-primarybutton-backgroundcoloractive)!important;border-color:var(--lx-primarybutton-backgroundcoloractive)!important}:host[color=primary][mode=solid].selected{color:var(--lx-primarybutton-fontcolor);background-color:var(--lx-primarybutton-backgroundcolorhover);border:1px solid var(--lx-primarybutton-backgroundcolorhover)}:host[color=primary][mode=outline]{color:var(--lx-primarybutton-backgroundcolor);background-color:transparent;border:1px solid var(--lx-primarybutton-backgroundcolor)}:host[color=primary][mode=outline]:focus:not([disabled]),:host[color=primary][mode=outline]:hover:not([disabled]){color:var(--lx-primarybutton-fontcolor);background-color:var(--lx-primarybutton-backgroundcolor);border:1px solid var(--lx-primarybutton-backgroundcolor)}:host[color=primary][mode=outline]:active:not([disabled]){color:var(--lx-primarybutton-fontcolor);background-color:var(--lx-primarybutton-backgroundcolorhover);border:1px solid var(--lx-primarybutton-backgroundcolorhover)}:host[color=primary][mode=ghost]{color:var(--lx-primarybutton-backgroundcolor);background-color:transparent;border:1px solid transparent}:host[color=primary][mode=ghost]:focus:not([disabled]),:host[color=primary][mode=ghost]:hover:not([disabled]){color:var(--lx-primarybutton-backgroundcolor);background-color:transparent;border:1px solid var(--lx-primarybutton-backgroundcolor)}:host[color=primary][mode=ghost]:active:not([disabled]){color:var(--lx-primarybutton-fontcolor);background-color:var(--lx-primarybutton-backgroundcolor);border:1px solid var(--lx-primarybutton-backgroundcolor)}:host[color=primary][mode=link]{color:var(--lx-primarybutton-backgroundcolor);background-color:transparent;border:1px solid transparent;padding:0;border:none}:host[color=primary][mode=link]:focus:not([disabled]),:host[color=primary][mode=link]:hover:not([disabled]),:host[color=primary][mode=link]:active:not([disabled]){color:var(--lx-primarybutton-backgroundcolor);background-color:transparent;border:1px solid transparent;text-decoration:underline;border:none}:host[color=danger] lx-tiny-spinner{color:#fff}:host[color=danger][mode=solid]{color:#fff;background-color:#f96464;border:1px solid #f96464}:host[color=danger][mode=solid]:hover:not([disabled]),:host[color=danger][mode=solid]:focus:not([disabled]){color:#fff;background-color:#f61a1a;border:1px solid #f61a1a}:host[color=danger][mode=solid]:active:not([disabled]){color:#fff;background-color:#bd0707;border:1px solid #bd0707}:host[color=danger][mode=solid].pressed{background-color:#bd0707!important;border-color:#bd0707!important}:host[color=danger][mode=solid].selected{color:#fff;background-color:#f61a1a;border:1px solid #f61a1a}:host[color=danger][mode=outline]{color:#f96464;background-color:transparent;border:1px solid #f96464}:host[color=danger][mode=outline]:focus:not([disabled]),:host[color=danger][mode=outline]:hover:not([disabled]){color:#fff;background-color:#f96464;border:1px solid #f96464}:host[color=danger][mode=outline]:active:not([disabled]){color:#fff;background-color:#f61a1a;border:1px solid #f61a1a}:host[color=danger][mode=ghost]{color:#f96464;background-color:transparent;border:1px solid transparent}:host[color=danger][mode=ghost]:focus:not([disabled]),:host[color=danger][mode=ghost]:hover:not([disabled]){color:#f96464;background-color:transparent;border:1px solid #f96464}:host[color=danger][mode=ghost]:active:not([disabled]){color:#fff;background-color:#f96464;border:1px solid #f96464}:host[color=danger][mode=link]{color:#f96464;background-color:transparent;border:1px solid transparent;padding:0;border:none}:host[color=danger][mode=link]:focus:not([disabled]),:host[color=danger][mode=link]:hover:not([disabled]),:host[color=danger][mode=link]:active:not([disabled]){color:#f96464;background-color:transparent;border:1px solid transparent;text-decoration:underline;border:none}:host[color=success] lx-tiny-spinner{color:#fff}:host[color=success][mode=solid]{color:#fff;background-color:#33cc58;border:1px solid #33cc58}:host[color=success][mode=solid]:hover:not([disabled]),:host[color=success][mode=solid]:focus:not([disabled]){color:#fff;background-color:#248f3e;border:1px solid #248f3e}:host[color=success][mode=solid]:active:not([disabled]){color:#fff;background-color:#145223;border:1px solid #145223}:host[color=success][mode=solid].pressed{background-color:#145223!important;border-color:#145223!important}:host[color=success][mode=solid].selected{color:#fff;background-color:#248f3e;border:1px solid #248f3e}:host[color=success][mode=outline]{color:#33cc58;background-color:transparent;border:1px solid #33cc58}:host[color=success][mode=outline]:focus:not([disabled]),:host[color=success][mode=outline]:hover:not([disabled]){color:#fff;background-color:#33cc58;border:1px solid #33cc58}:host[color=success][mode=outline]:active:not([disabled]){color:#fff;background-color:#248f3e;border:1px solid #248f3e}:host[color=success][mode=ghost]{color:#33cc58;background-color:transparent;border:1px solid transparent}:host[color=success][mode=ghost]:focus:not([disabled]),:host[color=success][mode=ghost]:hover:not([disabled]){color:#33cc58;background-color:transparent;border:1px solid #33cc58}:host[color=success][mode=ghost]:active:not([disabled]){color:#fff;background-color:#33cc58;border:1px solid #33cc58}:host[color=success][mode=link]{color:#33cc58;background-color:transparent;border:1px solid transparent;padding:0;border:none}:host[color=success][mode=link]:focus:not([disabled]),:host[color=success][mode=link]:hover:not([disabled]),:host[color=success][mode=link]:active:not([disabled]){color:#33cc58;background-color:transparent;border:1px solid transparent;text-decoration:underline;border:none}:host[size=small]{height:20px;line-height:12px;padding:3px 7px;font-size:12px;min-width:20px}:host[size=small].square{width:20px;text-align:center;padding:0}:host[size=small].circle{border-radius:10px;min-width:20px;padding:0 3px}:host[size=medium]{height:24px;line-height:16px;padding:3px 7px;font-size:var(--lxFontSize, 13.5px);min-width:24px}:host[size=medium].square{width:24px;text-align:center;padding:0}:host[size=medium].circle{border-radius:11px;min-width:24px;padding:0 3px}:host[size=large]{height:32px;line-height:16px;padding:7px 11px;font-size:var(--lxFontSize, 13.5px);min-width:32px}:host[size=large].square{width:32px;text-align:center;padding:0}:host[size=large].circle{border-radius:15px;min-width:32px;padding:0 7px}:host[size=auto]{height:auto;line-height:normal;padding:0;font-size:inherit;min-width:auto}:host[size=auto].square{width:auto;text-align:center;padding:0}:host[size=auto].circle{border-radius:unset;min-width:auto;padding:0}:host[size=auto].circle{height:auto;line-height:normal;padding:0;font-size:inherit;min-width:auto}:host[size=auto].circle.square{width:auto;text-align:center;padding:0}:host[size=auto].circle.circle{border-radius:10px;min-width:auto;padding:0}:host.loading:not(.withIcon){position:relative;opacity:.5;color:transparent!important}:host.loading:not(.withIcon) lx-tiny-spinner{position:absolute;left:calc(50% - .5em)}\n"] }]
|
566
|
+
args: [{ selector: 'button[lx-button]', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [TinySpinnerComponent, IconComponent$1, NgTemplateOutlet], template: "@let useNewIcons = useSAPIcons();\n@let startIcon = iconName();\n@let endIcon = endIconName();\n@if (!startIcon && !endIcon) {\n <!-- old layout -->\n @if (showSpinner) {\n <lx-tiny-spinner />\n }\n <ng-container *ngTemplateOutlet=\"content\" />\n} @else {\n <div class=\"contentWrapper\">\n <!-- new layout -->\n @if (showSpinner) {\n <lx-tiny-spinner />\n } @else if (startIcon && useNewIcons) {\n <ui5-icon class=\"ui5Icon\" [name]=\"startIcon\" data-testid=\"start-icon\" />\n } @else if (startIcon && !useNewIcons) {\n <i class=\"fa-fw {{ startIcon }} {{ iconVariant() }}\" role=\"img\" aria-hidden=\"true\" data-testid=\"start-icon\"></i>\n }\n <ng-container *ngTemplateOutlet=\"content\" />\n @if (!showSpinner && endIcon && useNewIcons) {\n <ui5-icon class=\"ui5Icon\" [name]=\"endIcon\" data-testid=\"end-icon\" />\n } @else if (!showSpinner && endIcon && !useNewIcons) {\n <i class=\"fa-fw {{ endIcon }} {{ endIconVariant() }}\" role=\"img\" aria-hidden=\"true\" data-testid=\"end-icon\"></i>\n }\n </div>\n}\n\n<!-- ng-content with the same slot can be used once in the same template -->\n<ng-template #content>\n <ng-content />\n</ng-template>\n", styles: ["@keyframes subtleScaleUpKeyFrames{0%{transform:scale(.95);opacity:0}}:host ::ng-deep i{font-size:.9em}:host(.withIcon) .contentWrapper{display:flex;height:100%;align-items:center;justify-content:center;column-gap:4px}:host(.withIcon) [class*=fa-]{font-size:var(--lxFontSmallSize)}:host(.withIcon) .ui5Icon{width:var(--lxFontSmallSize);height:var(--lxFontSmallSize);color:inherit}:host(.withIcon).loading[color]{position:relative;color:transparent}:host(.withIcon).loading[color] lx-tiny-spinner{position:absolute;left:50%;transform:translate(-50%)}:host{border-radius:3px;font-weight:var(--lxFontNormal, 400);cursor:pointer;transition:color,background-color,border-color .18s;transition-delay:0s;transition-timing-function:ease}:host[disabled]{opacity:.5;cursor:default}:host[color=default] lx-tiny-spinner{color:#2a303d}:host[color=default][mode=solid]{color:#2a303d;background-color:#f0f2f5;border:1px solid #f0f2f5}:host[color=default][mode=solid]:hover:not([disabled]),:host[color=default][mode=solid]:focus:not([disabled]){color:#2a303d;background-color:#e1e5eb;border:1px solid #e1e5eb}:host[color=default][mode=solid]:active:not([disabled]){color:#2a303d;background-color:#c2c9d6;border:1px solid #c2c9d6}:host[color=default][mode=solid].pressed{background-color:#c2c9d6!important;border-color:#c2c9d6!important}:host[color=default][mode=solid].selected{color:#2a303d;background-color:#e1e5eb;border:1px solid #e1e5eb}:host[color=default][mode=outline]{color:#2a303d;background-color:transparent;border:1px solid #e1e5eb}:host[color=default][mode=outline]:focus:not([disabled]),:host[color=default][mode=outline]:hover:not([disabled]){color:#2a303d;background-color:#f0f2f5;border:1px solid #f0f2f5}:host[color=default][mode=outline]:active:not([disabled]){color:#2a303d;background-color:#e1e5eb;border:1px solid #e1e5eb}:host[color=default][mode=ghost]{color:#2a303d;background-color:transparent;border:1px solid transparent}:host[color=default][mode=ghost]:focus:not([disabled]),:host[color=default][mode=ghost]:hover:not([disabled]){color:#2a303d;background-color:transparent;border:1px solid #e1e5eb}:host[color=default][mode=ghost]:active:not([disabled]){color:#2a303d;background-color:#f0f2f5;border:1px solid #f0f2f5}:host[color=default][mode=link]{color:#2a303d;background-color:transparent;border:1px solid transparent;padding:0;border:none}:host[color=default][mode=link]:focus:not([disabled]),:host[color=default][mode=link]:hover:not([disabled]),:host[color=default][mode=link]:active:not([disabled]){color:#2a303d;background-color:transparent;border:1px solid transparent;text-decoration:underline;border:none}:host[color=light] lx-tiny-spinner{color:#2a303d}:host[color=light][mode=solid]{color:#2a303d;background-color:#fff;border:1px solid #99a5bb}:host[color=light][mode=solid]:hover:not([disabled]),:host[color=light][mode=solid]:focus:not([disabled]){color:#2a303d;background-color:#e1e5eb;border:1px solid #e1e5eb}:host[color=light][mode=solid]:active:not([disabled]){color:#2a303d;background-color:#c2c9d6;border:1px solid #c2c9d6}:host[color=light][mode=solid].pressed{background-color:#c2c9d6!important;border-color:#c2c9d6!important}:host[color=light][mode=solid].selected{color:#2a303d;background-color:#e1e5eb;border:1px solid #e1e5eb}:host[color=light][mode=outline]{color:#2a303d;background-color:transparent;border:1px solid #e1e5eb}:host[color=light][mode=outline]:focus:not([disabled]),:host[color=light][mode=outline]:hover:not([disabled]){color:#2a303d;background-color:#fff;border:1px solid #fff}:host[color=light][mode=outline]:active:not([disabled]){color:#2a303d;background-color:#e1e5eb;border:1px solid #e1e5eb}:host[color=light][mode=ghost]{color:#2a303d;background-color:transparent;border:1px solid transparent}:host[color=light][mode=ghost]:focus:not([disabled]),:host[color=light][mode=ghost]:hover:not([disabled]){color:#2a303d;background-color:transparent;border:1px solid #e1e5eb}:host[color=light][mode=ghost]:active:not([disabled]){color:#2a303d;background-color:#fff;border:1px solid #fff}:host[color=light][mode=link]{color:#2a303d;background-color:transparent;border:1px solid transparent;padding:0;border:none}:host[color=light][mode=link]:focus:not([disabled]),:host[color=light][mode=link]:hover:not([disabled]),:host[color=light][mode=link]:active:not([disabled]){color:#2a303d;background-color:transparent;border:1px solid transparent;text-decoration:underline;border:none}:host[color=primary] lx-tiny-spinner{color:var(--lx-primarybutton-fontcolor)}:host[color=primary][mode=solid]{color:var(--lx-primarybutton-fontcolor);background-color:var(--lx-primarybutton-backgroundcolor);border:1px solid var(--lx-primarybutton-backgroundcolor)}:host[color=primary][mode=solid]:hover:not([disabled]),:host[color=primary][mode=solid]:focus:not([disabled]){color:var(--lx-primarybutton-fontcolor);background-color:var(--lx-primarybutton-backgroundcolorhover);border:1px solid var(--lx-primarybutton-backgroundcolorhover)}:host[color=primary][mode=solid]:active:not([disabled]){color:var(--lx-primarybutton-fontcolor);background-color:var(--lx-primarybutton-backgroundcoloractive);border:1px solid var(--lx-primarybutton-backgroundcoloractive)}:host[color=primary][mode=solid].pressed{background-color:var(--lx-primarybutton-backgroundcoloractive)!important;border-color:var(--lx-primarybutton-backgroundcoloractive)!important}:host[color=primary][mode=solid].selected{color:var(--lx-primarybutton-fontcolor);background-color:var(--lx-primarybutton-backgroundcolorhover);border:1px solid var(--lx-primarybutton-backgroundcolorhover)}:host[color=primary][mode=outline]{color:var(--lx-primarybutton-backgroundcolor);background-color:transparent;border:1px solid var(--lx-primarybutton-backgroundcolor)}:host[color=primary][mode=outline]:focus:not([disabled]),:host[color=primary][mode=outline]:hover:not([disabled]){color:var(--lx-primarybutton-fontcolor);background-color:var(--lx-primarybutton-backgroundcolor);border:1px solid var(--lx-primarybutton-backgroundcolor)}:host[color=primary][mode=outline]:active:not([disabled]){color:var(--lx-primarybutton-fontcolor);background-color:var(--lx-primarybutton-backgroundcolorhover);border:1px solid var(--lx-primarybutton-backgroundcolorhover)}:host[color=primary][mode=ghost]{color:var(--lx-primarybutton-backgroundcolor);background-color:transparent;border:1px solid transparent}:host[color=primary][mode=ghost]:focus:not([disabled]),:host[color=primary][mode=ghost]:hover:not([disabled]){color:var(--lx-primarybutton-backgroundcolor);background-color:transparent;border:1px solid var(--lx-primarybutton-backgroundcolor)}:host[color=primary][mode=ghost]:active:not([disabled]){color:var(--lx-primarybutton-fontcolor);background-color:var(--lx-primarybutton-backgroundcolor);border:1px solid var(--lx-primarybutton-backgroundcolor)}:host[color=primary][mode=link]{color:var(--lx-primarybutton-backgroundcolor);background-color:transparent;border:1px solid transparent;padding:0;border:none}:host[color=primary][mode=link]:focus:not([disabled]),:host[color=primary][mode=link]:hover:not([disabled]),:host[color=primary][mode=link]:active:not([disabled]){color:var(--lx-primarybutton-backgroundcolor);background-color:transparent;border:1px solid transparent;text-decoration:underline;border:none}:host[color=danger] lx-tiny-spinner{color:#fff}:host[color=danger][mode=solid]{color:#fff;background-color:#f96464;border:1px solid #f96464}:host[color=danger][mode=solid]:hover:not([disabled]),:host[color=danger][mode=solid]:focus:not([disabled]){color:#fff;background-color:#f61a1a;border:1px solid #f61a1a}:host[color=danger][mode=solid]:active:not([disabled]){color:#fff;background-color:#bd0707;border:1px solid #bd0707}:host[color=danger][mode=solid].pressed{background-color:#bd0707!important;border-color:#bd0707!important}:host[color=danger][mode=solid].selected{color:#fff;background-color:#f61a1a;border:1px solid #f61a1a}:host[color=danger][mode=outline]{color:#f96464;background-color:transparent;border:1px solid #f96464}:host[color=danger][mode=outline]:focus:not([disabled]),:host[color=danger][mode=outline]:hover:not([disabled]){color:#fff;background-color:#f96464;border:1px solid #f96464}:host[color=danger][mode=outline]:active:not([disabled]){color:#fff;background-color:#f61a1a;border:1px solid #f61a1a}:host[color=danger][mode=ghost]{color:#f96464;background-color:transparent;border:1px solid transparent}:host[color=danger][mode=ghost]:focus:not([disabled]),:host[color=danger][mode=ghost]:hover:not([disabled]){color:#f96464;background-color:transparent;border:1px solid #f96464}:host[color=danger][mode=ghost]:active:not([disabled]){color:#fff;background-color:#f96464;border:1px solid #f96464}:host[color=danger][mode=link]{color:#f96464;background-color:transparent;border:1px solid transparent;padding:0;border:none}:host[color=danger][mode=link]:focus:not([disabled]),:host[color=danger][mode=link]:hover:not([disabled]),:host[color=danger][mode=link]:active:not([disabled]){color:#f96464;background-color:transparent;border:1px solid transparent;text-decoration:underline;border:none}:host[color=success] lx-tiny-spinner{color:#fff}:host[color=success][mode=solid]{color:#fff;background-color:#33cc58;border:1px solid #33cc58}:host[color=success][mode=solid]:hover:not([disabled]),:host[color=success][mode=solid]:focus:not([disabled]){color:#fff;background-color:#248f3e;border:1px solid #248f3e}:host[color=success][mode=solid]:active:not([disabled]){color:#fff;background-color:#145223;border:1px solid #145223}:host[color=success][mode=solid].pressed{background-color:#145223!important;border-color:#145223!important}:host[color=success][mode=solid].selected{color:#fff;background-color:#248f3e;border:1px solid #248f3e}:host[color=success][mode=outline]{color:#33cc58;background-color:transparent;border:1px solid #33cc58}:host[color=success][mode=outline]:focus:not([disabled]),:host[color=success][mode=outline]:hover:not([disabled]){color:#fff;background-color:#33cc58;border:1px solid #33cc58}:host[color=success][mode=outline]:active:not([disabled]){color:#fff;background-color:#248f3e;border:1px solid #248f3e}:host[color=success][mode=ghost]{color:#33cc58;background-color:transparent;border:1px solid transparent}:host[color=success][mode=ghost]:focus:not([disabled]),:host[color=success][mode=ghost]:hover:not([disabled]){color:#33cc58;background-color:transparent;border:1px solid #33cc58}:host[color=success][mode=ghost]:active:not([disabled]){color:#fff;background-color:#33cc58;border:1px solid #33cc58}:host[color=success][mode=link]{color:#33cc58;background-color:transparent;border:1px solid transparent;padding:0;border:none}:host[color=success][mode=link]:focus:not([disabled]),:host[color=success][mode=link]:hover:not([disabled]),:host[color=success][mode=link]:active:not([disabled]){color:#33cc58;background-color:transparent;border:1px solid transparent;text-decoration:underline;border:none}:host[size=small]{height:20px;padding:3px 7px;font-size:var(--lxFontSmallSize, 12px);min-width:20px}:host[size=small]:not(.withIcon){line-height:12px}:host[size=small].square{width:20px;text-align:center;padding:0}:host[size=small].circle{border-radius:10px;min-width:20px;padding:0 3px}:host[size=small].withIcon:not(.square,.circle){padding:0 8px}:host[size=medium]{height:24px;padding:3px 7px;font-size:var(--lxFontSize, 13.5px);min-width:24px}:host[size=medium]:not(.withIcon){line-height:16px}:host[size=medium].square{width:24px;text-align:center;padding:0}:host[size=medium].circle{border-radius:11px;min-width:24px;padding:0 3px}:host[size=medium].withIcon:not(.square,.circle){padding:0 8px}:host[size=large]{height:32px;padding:7px 11px;font-size:var(--lxFontSize, 13.5px);min-width:32px}:host[size=large]:not(.withIcon){line-height:16px}:host[size=large].square{width:32px;text-align:center;padding:0}:host[size=large].circle{border-radius:15px;min-width:32px;padding:0 7px}:host[size=large].withIcon:not(.square,.circle){padding:0 8px}:host[size=auto]{height:auto;padding:0;font-size:inherit;min-width:auto}:host[size=auto]:not(.withIcon){line-height:normal}:host[size=auto].square{width:auto;text-align:center;padding:0}:host[size=auto].circle{border-radius:unset;min-width:auto;padding:0}:host[size=auto].circle{height:auto;padding:0;font-size:inherit;min-width:auto}:host[size=auto].circle:not(.withIcon){line-height:normal}:host[size=auto].circle.square{width:auto;text-align:center;padding:0}:host[size=auto].circle.circle{border-radius:10px;min-width:auto;padding:0}:host.loading:not(.withIcon){position:relative;opacity:.5;color:transparent!important}:host.loading:not(.withIcon) lx-tiny-spinner{position:absolute;left:calc(50% - .5em)}\n"] }]
|
368
567
|
}], propDecorators: { size: [{
|
369
568
|
type: Input
|
370
569
|
}, {
|
@@ -414,17 +613,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImpor
|
|
414
613
|
type: HostBinding,
|
415
614
|
args: ['disabled']
|
416
615
|
}] } });
|
417
|
-
function getSAPIcon(iconName
|
616
|
+
function getSAPIcon(iconName) {
|
418
617
|
const iconVariant = extractFontAwesomeVariant(iconName);
|
419
618
|
const extractedName = removeFontAwesomeVariant(iconName);
|
420
|
-
if (!
|
619
|
+
if (!ICON_MAP[extractedName]) {
|
421
620
|
console.warn(`No SAP icon found for Font Awesome icon ${extractedName}`);
|
422
621
|
return null;
|
423
622
|
}
|
424
623
|
if (iconVariant === 'fas' || iconVariant === 'fa') {
|
425
|
-
return
|
624
|
+
return ICON_MAP[extractedName]?.[1] ?? ICON_MAP[extractedName]?.[0] ?? null;
|
426
625
|
}
|
427
|
-
return
|
626
|
+
return ICON_MAP[extractedName]?.[0] ?? null;
|
428
627
|
}
|
429
628
|
function extractFontAwesomeVariant(iconName) {
|
430
629
|
return iconName?.match(/\b(far|fas|fa(?!-)|fal|fab)\b/)?.[0] ?? 'far';
|
@@ -9807,5 +10006,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.8", ngImpor
|
|
9807
10006
|
* Generated bundle index. Do not edit.
|
9808
10007
|
*/
|
9809
10008
|
|
9810
|
-
export { ARROW_DOWN, ARROW_LEFT, ARROW_RIGHT, ARROW_UP, AfterViewInitDirective, AutocloseDirective, AutocloseGroupService, AutofocusDirective, BACKSPACE, BadgeComponent, BannerComponent, BaseSelectDirective, BasicDropdownComponent, BasicDropdownItemComponent, BrPipe, BreadcrumbComponent, ButtonComponent, ButtonGroupComponent, CURRENCY_SYMBOL_MAP, CardComponent, CdkOptionsDropdownComponent, CdkOptionsSubDropdownComponent, CollapsibleComponent, ContentPanelComponent, ContenteditableDirective, ContrastColorPipe, CounterComponent, CurrencyInputComponent, CurrencySymbolComponent, CustomDatePipe, DATEPICKER_CONTROL_VALUE_ACCESSOR, DATE_FN_LOCALE, DATE_FORMATS, DateFormatter, DateInputComponent, DatePickerComponent, DatepickerConfig, DatepickerUiModule, DragAndDropListComponent, DragAndDropListItemComponent, END, ENTER, ESCAPE, EllipsisComponent, EmptyStateComponent, ErrorMessageComponent, ExpandedDropdownComponent, FORM_CONTROL_ERROR_DISPLAY_STRATEGY, FORM_CONTROL_ERROR_NAMESPACE, FilterSelectionPipe, FilterTermPipe, FormErrorComponent, FormErrorDirective, FormSubmitDirective, FormatNumberPipe, GLOBAL_TRANSLATION_OPTIONS, HOME, HighlightRangePipe, HighlightTermPipe, IconComponent, IconScaleComponent, InputComponent, KeyboardActionSourceDirective, KeyboardSelectAction, KeyboardSelectDirective, LOCALE_FN,
|
10009
|
+
export { ARROW_DOWN, ARROW_LEFT, ARROW_RIGHT, ARROW_UP, AfterViewInitDirective, AutocloseDirective, AutocloseGroupService, AutofocusDirective, BACKSPACE, BadgeComponent, BannerComponent, BaseSelectDirective, BasicDropdownComponent, BasicDropdownItemComponent, BrPipe, BreadcrumbComponent, ButtonComponent, ButtonGroupComponent, CURRENCY_SYMBOL_MAP, CardComponent, CdkOptionsDropdownComponent, CdkOptionsSubDropdownComponent, CollapsibleComponent, ContentPanelComponent, ContenteditableDirective, ContrastColorPipe, CounterComponent, CurrencyInputComponent, CurrencySymbolComponent, CustomDatePipe, DATEPICKER_CONTROL_VALUE_ACCESSOR, DATE_FN_LOCALE, DATE_FORMATS, DateFormatter, DateInputComponent, DatePickerComponent, DatepickerConfig, DatepickerUiModule, DragAndDropListComponent, DragAndDropListItemComponent, END, ENTER, ESCAPE, EllipsisComponent, EmptyStateComponent, ErrorMessageComponent, ExpandedDropdownComponent, FORM_CONTROL_ERROR_DISPLAY_STRATEGY, FORM_CONTROL_ERROR_NAMESPACE, FilterSelectionPipe, FilterTermPipe, FormErrorComponent, FormErrorDirective, FormSubmitDirective, FormatNumberPipe, GLOBAL_TRANSLATION_OPTIONS, HOME, HighlightRangePipe, HighlightTermPipe, ICON_MAP, IconComponent, IconScaleComponent, InputComponent, KeyboardActionSourceDirective, KeyboardSelectAction, KeyboardSelectDirective, LOCALE_FN, LX_BUTTON_USE_SAP_ICONS, LX_ELLIPSIS_DEBOUNCE_ON_RESIZE, LxCoreUiModule, LxDragAndDropListModule, LxFormsModule, LxIsUuidPipe, LxLinkifyPipe, LxModalModule, LxPopoverUiModule, LxTabUiModule, LxTimeAgo, LxTranslatePipe, LxUnlinkifyPipe, MODAL_CLOSE, MarkInvalidDirective, MarkdownPipe, MaxLengthCounterDirective, ModalCloseClickLocation, ModalComponent, ModalContentDirective, ModalFooterComponent, ModalHeaderComponent, MultiSelectComponent, NbspPipe, OptionComponent, OptionGroupComponent, OptionGroupDropdownComponent, OptionsDropdownComponent, OptionsSubDropdownComponent, PickerComponent, PickerOptionComponent, PickerTriggerDirective, PillItemComponent, PillListComponent, PopoverClickDirective, PopoverComponent, PopoverContentDirective, PopoverHoverDirective, RELEVANCE_SORTING_KEY, ResizeObserverService, ResponsiveInputComponent, SPACE, SelectDropdownDirective, SelectListComponent, SelectableItemDirective, SelectedOptionDirective, SingleSelectComponent, SkeletonComponent, SortPipe, Sorting, SortingDropdownComponent, SortingDropdownTriggerComponent, SpinnerComponent, StepperComponent, SwitchComponent, TAB, TabComponent, TabGroupComponent, TableComponent, TableHeaderComponent, TinySpinnerComponent, TokenComponent, TokenizerComponent, TokenizerOverflowPopoverComponent, TooltipComponent, TooltipDirective, TranslationAfterPipe, TranslationBeforePipe, TranslationBetweenPipe, UnescapeCurlyBracesPipe, ValidateDateInForeseeableFuture, ValidateStringNotInArray, ValidateStringNotInArrayAsync, getContrastColor, getTranslationParts, highlightText, isValidHexColor, isValidX, isValidY, provideFormControlErrorDisplayStrategy, provideFormControlErrorNamespace, shorthandHexHandle };
|
9811
10010
|
//# sourceMappingURL=leanix-components.mjs.map
|