@leanix/components 0.4.818 → 0.4.820
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/fesm2022/leanix-components.mjs +1744 -124
- package/fesm2022/leanix-components.mjs.map +1 -1
- package/lib/core-ui/components/avatar/avatar.component.d.ts +27 -0
- package/lib/core-ui/components/avatar-group/avatar-group.component.d.ts +45 -0
- package/lib/core-ui/components/badge/badge.component.d.ts +10 -0
- package/lib/core-ui/components/banner/banner.component.d.ts +18 -0
- package/lib/core-ui/components/button/button.component.d.ts +22 -0
- package/lib/core-ui/components/button-group/button-group.component.d.ts +26 -0
- package/lib/core-ui/components/card/card.component.d.ts +16 -3
- package/lib/core-ui/components/collapsible/collapsible.component.d.ts +39 -0
- package/lib/core-ui/components/counter/counter.component.d.ts +20 -3
- package/lib/core-ui/components/ellipsis/ellipsis.component.d.ts +13 -0
- package/lib/core-ui/components/empty-state/empty-state.component.d.ts +38 -15
- package/lib/core-ui/components/page-header/page-header.component.d.ts +2 -1
- package/lib/core-ui/components/skeleton/skeleton.component.d.ts +16 -4
- package/lib/core-ui/components/spinner/spinner.component.d.ts +15 -0
- package/lib/core-ui/components/stepper/stepper.component.d.ts +23 -0
- package/lib/core-ui/components/table/table-header/table-header.component.d.ts +26 -5
- package/lib/core-ui/components/table/table.component.d.ts +25 -2
- package/lib/core-ui/components/tokenizer/token/token.component.d.ts +16 -0
- package/lib/core-ui/components/tokenizer/tokenizer-overflow-popover/tokenizer-overflow-popover.component.d.ts +38 -0
- package/lib/core-ui/components/tokenizer/tokenizer.component.d.ts +22 -5
- package/lib/core-ui/icon/fa-to-sap-icon.pipe.d.ts +2 -1
- package/lib/core-ui/tooltip/tooltip.component.d.ts +30 -0
- package/lib/forms-ui/components/basic-dropdown/basic-dropdown.component.d.ts +79 -0
- package/lib/forms-ui/components/basic-dropdown-item/basic-dropdown-item.component.d.ts +36 -0
- package/lib/forms-ui/components/breadcrumb/breadcrumb.component.d.ts +20 -2
- package/lib/forms-ui/components/cdk-options-dropdown/cdk-options-dropdown.component.d.ts +34 -0
- package/lib/forms-ui/components/cdk-options-sub-dropdown/cdk-options-sub-dropdown.component.d.ts +21 -0
- package/lib/forms-ui/components/currency/currency-input.component.d.ts +53 -0
- package/lib/forms-ui/components/currency/currency-symbol.component.d.ts +16 -0
- package/lib/forms-ui/components/date-input/date-input.component.d.ts +135 -33
- package/lib/forms-ui/components/date-picker-ui/datepicker-inner.component.d.ts +35 -0
- package/lib/forms-ui/components/date-picker-ui/daypicker.component.d.ts +6 -0
- package/lib/forms-ui/components/date-picker-ui/monthpicker.component.d.ts +6 -0
- package/lib/forms-ui/components/date-picker-ui/yearpicker.component.d.ts +6 -0
- package/lib/forms-ui/components/drag-and-drop-list/drag-and-drop-list-item/drag-and-drop-list-item.component.d.ts +27 -2
- package/lib/forms-ui/components/drag-and-drop-list/drag-and-drop-list.component.d.ts +37 -6
- package/lib/forms-ui/components/error-message/error-message.component.d.ts +15 -0
- package/lib/forms-ui/components/form-error/form-error.component.d.ts +18 -0
- package/lib/forms-ui/components/input/input.component.d.ts +27 -0
- package/lib/forms-ui/components/multi-select/multi-select-selection/multi-select-selection.component.d.ts +30 -0
- package/lib/forms-ui/components/multi-select/multi-select.component.d.ts +80 -0
- package/lib/forms-ui/components/option/option.component.d.ts +41 -0
- package/lib/forms-ui/components/option-group/option-group.component.d.ts +24 -2
- package/lib/forms-ui/components/option-group-dropdown/option-group-dropdown.component.d.ts +51 -4
- package/lib/forms-ui/components/options-dropdown/options-dropdown.component.d.ts +73 -0
- package/lib/forms-ui/components/options-sub-dropdown/options-sub-dropdown.component.d.ts +22 -0
- package/lib/forms-ui/components/picker/picker.component.d.ts +25 -17
- package/lib/forms-ui/components/picker-option/picker-option.component.d.ts +34 -5
- package/lib/forms-ui/components/pill-item/pill-item.component.d.ts +25 -0
- package/lib/forms-ui/components/pill-list/pill-list.component.d.ts +58 -2
- package/lib/forms-ui/components/responsive-input/responsive-input.component.d.ts +20 -0
- package/lib/forms-ui/components/rich-text-editor/components/rich-text-editor-toolbar/rich-text-editor-toolbar.component.d.ts +26 -0
- package/lib/forms-ui/components/rich-text-editor/extensions/link/components/link-modal/link-modal.component.d.ts +15 -0
- package/lib/forms-ui/components/rich-text-editor/extensions/table/table-bubble-menu/table-bubble-menu.component.d.ts +17 -0
- package/lib/forms-ui/components/rich-text-editor/ngx-tiptap/node-view.component.d.ts +14 -0
- package/lib/forms-ui/components/single-select/single-select.component.d.ts +39 -0
- package/lib/forms-ui/components/sorting-dropdown/sorting-dropdown.component.d.ts +24 -0
- package/lib/forms-ui/components/sorting-dropdown-trigger/sorting-dropdown-trigger.component.d.ts +20 -0
- package/lib/forms-ui/components/switch/switch.component.d.ts +37 -8
- package/lib/modal-ui/components/modal-footer/modal-footer.component.d.ts +19 -0
- package/lib/modal-ui/components/modal-header/modal-header.component.d.ts +22 -0
- package/lib/popover-ui/components/popover/popover.component.d.ts +15 -24
- package/lib/tab-ui/components/tab/tab.component.d.ts +66 -5
- package/lib/tab-ui/components/tab-group/tab-group.component.d.ts +29 -1
- package/package.json +1 -1
|
@@ -1,8 +1,25 @@
|
|
|
1
1
|
import { AfterViewInit, ElementRef } from '@angular/core';
|
|
2
2
|
import { Editor } from '@tiptap/core';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
|
+
/**
|
|
5
|
+
* Contextual bubble menu for table editing in the rich text editor.
|
|
6
|
+
*
|
|
7
|
+
* Provides three context-sensitive menus that appear when interacting with tables:
|
|
8
|
+
* - Row menu: appears when a table row selector is active
|
|
9
|
+
* - Column menu: appears when a table column selector is active
|
|
10
|
+
* - Table menu: appears when the entire table is selected
|
|
11
|
+
*
|
|
12
|
+
* ### Example
|
|
13
|
+
* @example
|
|
14
|
+
* ```html
|
|
15
|
+
* <lx-table-bubble-menu [editor]="editor" />
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
4
18
|
export declare class TableBubbleMenuComponent implements AfterViewInit {
|
|
5
19
|
NAME: string;
|
|
20
|
+
/**
|
|
21
|
+
* The Tiptap editor instance to attach table bubble menus to.
|
|
22
|
+
*/
|
|
6
23
|
editor: Editor;
|
|
7
24
|
bubbleMenuRowRef: ElementRef;
|
|
8
25
|
bubbleMenuColumnRef: ElementRef;
|
|
@@ -1,12 +1,26 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
|
+
/**
|
|
3
|
+
* Base component for custom Tiptap node views in Angular.
|
|
4
|
+
*
|
|
5
|
+
* Extend this component to create custom node views for the rich text editor.
|
|
6
|
+
* Provides all Tiptap NodeViewProps as required input signals.
|
|
7
|
+
*/
|
|
2
8
|
export declare class AngularNodeViewComponent {
|
|
9
|
+
/** The Tiptap editor instance. */
|
|
3
10
|
editor: import("@angular/core").InputSignal<import("@tiptap/core").Editor>;
|
|
11
|
+
/** The ProseMirror node being rendered. */
|
|
4
12
|
node: import("@angular/core").InputSignal<import("prosemirror-model").Node>;
|
|
13
|
+
/** Array of decorations for this node. */
|
|
5
14
|
decorations: import("@angular/core").InputSignal<readonly import("@tiptap/core").DecorationWithType[]>;
|
|
15
|
+
/** Whether the node is currently selected. */
|
|
6
16
|
selected: import("@angular/core").InputSignal<boolean>;
|
|
17
|
+
/** The Tiptap extension that created this node. */
|
|
7
18
|
extension: import("@angular/core").InputSignal<import("@tiptap/core").Node<any, any>>;
|
|
19
|
+
/** Function to get the node's position in the document. */
|
|
8
20
|
getPos: import("@angular/core").InputSignal<() => number>;
|
|
21
|
+
/** Function to update the node's attributes. */
|
|
9
22
|
updateAttributes: import("@angular/core").InputSignal<(attributes: Record<string, any>) => void>;
|
|
23
|
+
/** Function to delete the node from the document. */
|
|
10
24
|
deleteNode: import("@angular/core").InputSignal<() => void>;
|
|
11
25
|
static ɵfac: i0.ɵɵFactoryDeclaration<AngularNodeViewComponent, never>;
|
|
12
26
|
static ɵcmp: i0.ɵɵComponentDeclaration<AngularNodeViewComponent, "ng-component", never, { "editor": { "alias": "editor"; "required": true; "isSignal": true; }; "node": { "alias": "node"; "required": true; "isSignal": true; }; "decorations": { "alias": "decorations"; "required": true; "isSignal": true; }; "selected": { "alias": "selected"; "required": true; "isSignal": true; }; "extension": { "alias": "extension"; "required": true; "isSignal": true; }; "getPos": { "alias": "getPos"; "required": true; "isSignal": true; }; "updateAttributes": { "alias": "updateAttributes"; "required": true; "isSignal": true; }; "deleteNode": { "alias": "deleteNode"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
@@ -6,21 +6,57 @@ import { SingleSelectPadding } from '../../models/single-select-padding.interfac
|
|
|
6
6
|
import { KeyboardSelectAction } from '../keyboard-select.directive';
|
|
7
7
|
import * as i0 from "@angular/core";
|
|
8
8
|
export type SingleSelectSize = 'default' | 'small' | 'select2' | 'large';
|
|
9
|
+
/**
|
|
10
|
+
* A dropdown component for selecting a single value from a list of options.
|
|
11
|
+
* Implements `ControlValueAccessor` for seamless integration with Angular reactive forms.
|
|
12
|
+
*
|
|
13
|
+
* ### Projection slots
|
|
14
|
+
* - `.selectedOption`: Displays the currently selected value in the input field
|
|
15
|
+
* - `.dropdownComponent`: Contains the dropdown (typically `lx-basic-dropdown`)
|
|
16
|
+
*
|
|
17
|
+
* Alternatively, use `lxSelectDropdown` and `lxSelectedOption` directives on `<ng-template>`.
|
|
18
|
+
*
|
|
19
|
+
* ### Example
|
|
20
|
+
* @example
|
|
21
|
+
* ```html
|
|
22
|
+
* <lx-single-select
|
|
23
|
+
* #select
|
|
24
|
+
* [formControl]="control"
|
|
25
|
+
* (query)="searchTerm = $event">
|
|
26
|
+
* <span class="selectedOption">{{ control.value?.name }}</span>
|
|
27
|
+
* <lx-basic-dropdown
|
|
28
|
+
* class="dropdownComponent"
|
|
29
|
+
* [keyboardSelectAction]="select.optionsKeyboardSelectAction$"
|
|
30
|
+
* [options]="options | lxFilterByTerm: { term: searchTerm }"
|
|
31
|
+
* labelKey="name"
|
|
32
|
+
* (onItemSelected)="select.selectOption($event)">
|
|
33
|
+
* </lx-basic-dropdown>
|
|
34
|
+
* </lx-single-select>
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
9
37
|
export declare class SingleSelectComponent extends BaseSelectDirective implements OnDestroy, AfterViewInit, ControlValueAccessor {
|
|
10
38
|
private cd;
|
|
11
39
|
/** @internal */
|
|
12
40
|
static calculateNewCursorPostionOnKeyboardNavigation(cursorPosition: number, keyCode: number): number;
|
|
13
41
|
/** @internal */
|
|
14
42
|
static getKeyboardSelectAction(cursorPosition: number, keyCode: number): KeyboardSelectAction | null;
|
|
43
|
+
/** The currently selected value. */
|
|
15
44
|
selection: any;
|
|
45
|
+
/** Background color of the selection input field. */
|
|
16
46
|
selectionBackground: 'white' | 'gray';
|
|
47
|
+
/** Size variant of the select component. */
|
|
17
48
|
size: SingleSelectSize;
|
|
18
49
|
/** @deprecated To keep different inputs aligned, we should use the default padding */
|
|
19
50
|
padding?: SingleSelectPadding;
|
|
51
|
+
/** Optional ID attribute for the input element. */
|
|
20
52
|
inputId?: string;
|
|
53
|
+
/** Whether the select field is required. */
|
|
21
54
|
required: boolean;
|
|
55
|
+
/** Whether to close the dropdown when the Tab key is pressed. */
|
|
22
56
|
closeDropdownOnTab: boolean;
|
|
57
|
+
/** Event emitted when the selection changes. */
|
|
23
58
|
selectionChange: EventEmitter<any>;
|
|
59
|
+
/** Event emitted when the input loses focus. */
|
|
24
60
|
blur: EventEmitter<FocusEvent>;
|
|
25
61
|
/** @internal */
|
|
26
62
|
explicitDropdown?: TemplateRef<any>;
|
|
@@ -36,8 +72,11 @@ export declare class SingleSelectComponent extends BaseSelectDirective implement
|
|
|
36
72
|
get selectedOptionTmpl(): TemplateRef<any>;
|
|
37
73
|
/** @internal */
|
|
38
74
|
get dropdownTmpl(): TemplateRef<any>;
|
|
75
|
+
/** Whether to show a clear button to remove the selection. */
|
|
39
76
|
allowClear: boolean;
|
|
77
|
+
/** Tab index of the input element for keyboard navigation. */
|
|
40
78
|
tabIndex: number;
|
|
79
|
+
/** Whether to visually mark the input as invalid. */
|
|
41
80
|
markInvalid: boolean;
|
|
42
81
|
/** @internal */
|
|
43
82
|
toggleElement?: ElementRef<HTMLElement>;
|
|
@@ -7,10 +7,34 @@ import * as i0 from "@angular/core";
|
|
|
7
7
|
* score will be used for sorting.
|
|
8
8
|
*/
|
|
9
9
|
export declare const RELEVANCE_SORTING_KEY = "lx-relevance";
|
|
10
|
+
/**
|
|
11
|
+
* Dropdown for selecting sorting mode and direction.
|
|
12
|
+
* Displays available sorting options and allows toggling between ascending/descending order.
|
|
13
|
+
*
|
|
14
|
+
* ### Example
|
|
15
|
+
* @example
|
|
16
|
+
* ```html
|
|
17
|
+
* <lx-sorting-dropdown
|
|
18
|
+
* [currentSorting]="{ key: 'name', order: 'asc' }"
|
|
19
|
+
* [sortingOptions]="sortOptions"
|
|
20
|
+
* (apply)="handleSortChange($event)">
|
|
21
|
+
* </lx-sorting-dropdown>
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
10
24
|
export declare class SortingDropdownComponent implements OnInit {
|
|
25
|
+
/** The currently active sorting configuration. */
|
|
11
26
|
currentSorting: Sorting | null;
|
|
27
|
+
/**
|
|
28
|
+
* Available sorting options to choose from.
|
|
29
|
+
* @default []
|
|
30
|
+
*/
|
|
12
31
|
sortingOptions: Sorting[];
|
|
32
|
+
/**
|
|
33
|
+
* Whether to show ascending/descending direction options.
|
|
34
|
+
* @default true
|
|
35
|
+
*/
|
|
13
36
|
showDirectionOptions: boolean;
|
|
37
|
+
/** Event emitted when a new sorting configuration is applied. */
|
|
14
38
|
apply: EventEmitter<Sorting>;
|
|
15
39
|
readonly NAME = "SortingDropdownComponent";
|
|
16
40
|
readonly sortingDirections: SortingOrder[];
|
package/lib/forms-ui/components/sorting-dropdown-trigger/sorting-dropdown-trigger.component.d.ts
CHANGED
|
@@ -1,7 +1,27 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
|
+
/**
|
|
3
|
+
* Trigger button for the sorting dropdown.
|
|
4
|
+
* Displays the current sorting mode with a dropdown chevron icon.
|
|
5
|
+
*
|
|
6
|
+
* ### Example
|
|
7
|
+
* @example
|
|
8
|
+
* ```html
|
|
9
|
+
* <lx-sorting-dropdown-trigger
|
|
10
|
+
* label="Sort by"
|
|
11
|
+
* currentSortingLabel="Name"
|
|
12
|
+
* [disabled]="false">
|
|
13
|
+
* </lx-sorting-dropdown-trigger>
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
2
16
|
export declare class SortingDropdownTriggerComponent {
|
|
17
|
+
/** Prefix label displayed before the current sorting option (e.g., "Sort by"). */
|
|
3
18
|
label: string;
|
|
19
|
+
/** Label of the currently selected sorting option. */
|
|
4
20
|
currentSortingLabel: string;
|
|
21
|
+
/**
|
|
22
|
+
* Whether the trigger button is disabled.
|
|
23
|
+
* @default false
|
|
24
|
+
*/
|
|
5
25
|
disabled: boolean;
|
|
6
26
|
static ɵfac: i0.ɵɵFactoryDeclaration<SortingDropdownTriggerComponent, never>;
|
|
7
27
|
static ɵcmp: i0.ɵɵComponentDeclaration<SortingDropdownTriggerComponent, "lx-sorting-dropdown-trigger", never, { "label": { "alias": "label"; "required": false; }; "currentSortingLabel": { "alias": "currentSortingLabel"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, {}, never, never, true, never>;
|
|
@@ -1,22 +1,51 @@
|
|
|
1
1
|
import { EventEmitter } from '@angular/core';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* A toggle switch component for selecting between two states (on/off, true/false).
|
|
5
|
+
* Provides a visual toggle with optional label and supports disabled states.
|
|
6
|
+
*
|
|
7
|
+
* ### Example
|
|
8
|
+
* @example
|
|
9
|
+
* ```html
|
|
10
|
+
* <lx-switch
|
|
11
|
+
* [value]="isEnabled"
|
|
12
|
+
* [label]="'Enable notifications'"
|
|
13
|
+
* [labelInFront]="true"
|
|
14
|
+
* (toggle)="handleToggle($event)">
|
|
15
|
+
* </lx-switch>
|
|
16
|
+
* ```
|
|
5
17
|
*/
|
|
6
18
|
export declare class SwitchComponent {
|
|
7
|
-
/**
|
|
19
|
+
/**
|
|
20
|
+
* Current boolean value of the switch (true for on, false for off).
|
|
21
|
+
*/
|
|
8
22
|
value: boolean;
|
|
9
|
-
/**
|
|
23
|
+
/**
|
|
24
|
+
* Visual size variant of the switch.
|
|
25
|
+
* @default 'small'
|
|
26
|
+
*/
|
|
10
27
|
size: 'small';
|
|
11
|
-
/**
|
|
28
|
+
/**
|
|
29
|
+
* Whether the switch is disabled and cannot be toggled.
|
|
30
|
+
* @default false
|
|
31
|
+
*/
|
|
12
32
|
disabled: boolean;
|
|
13
|
-
/**
|
|
33
|
+
/**
|
|
34
|
+
* Text label to display alongside the switch.
|
|
35
|
+
*/
|
|
14
36
|
label: string;
|
|
15
|
-
/**
|
|
37
|
+
/**
|
|
38
|
+
* Whether the label should appear before (left of) the switch.
|
|
39
|
+
* @default true
|
|
40
|
+
*/
|
|
16
41
|
labelInFront: boolean;
|
|
17
|
-
/**
|
|
42
|
+
/**
|
|
43
|
+
* Optional ID attribute for the switch element (prefixed with "tour" for internal use).
|
|
44
|
+
*/
|
|
18
45
|
elementId?: string;
|
|
19
|
-
/**
|
|
46
|
+
/**
|
|
47
|
+
* Event emitted when the switch is toggled, returning the new boolean value.
|
|
48
|
+
*/
|
|
20
49
|
toggle: EventEmitter<boolean>;
|
|
21
50
|
/** @internal */
|
|
22
51
|
onToggle(): void;
|
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
|
+
/**
|
|
3
|
+
* Footer component for modals with content projection for action buttons.
|
|
4
|
+
*
|
|
5
|
+
* ### Projection slots
|
|
6
|
+
* - Default slot: Action buttons or footer content
|
|
7
|
+
*
|
|
8
|
+
* ### Example
|
|
9
|
+
* @example
|
|
10
|
+
* ```html
|
|
11
|
+
* <lx-modal-footer [border]="true">
|
|
12
|
+
* <button lx-button (click)="cancel()">Cancel</button>
|
|
13
|
+
* <button lx-button color="primary" (click)="save()">Save</button>
|
|
14
|
+
* </lx-modal-footer>
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
2
17
|
export declare class ModalFooterComponent {
|
|
18
|
+
/**
|
|
19
|
+
* Whether to show a top border on the footer.
|
|
20
|
+
* @default false
|
|
21
|
+
*/
|
|
3
22
|
border: boolean;
|
|
4
23
|
static ɵfac: i0.ɵɵFactoryDeclaration<ModalFooterComponent, never>;
|
|
5
24
|
static ɵcmp: i0.ɵɵComponentDeclaration<ModalFooterComponent, "lx-modal-footer", never, { "border": { "alias": "border"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
@@ -1,6 +1,28 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
|
+
/**
|
|
3
|
+
* Header component for modals with optional title and content projection.
|
|
4
|
+
*
|
|
5
|
+
* ### Projection slots
|
|
6
|
+
* - Default slot: Custom header content displayed before the title
|
|
7
|
+
*
|
|
8
|
+
* ### Example
|
|
9
|
+
* @example
|
|
10
|
+
* ```html
|
|
11
|
+
* <lx-modal-header [title]="'Create New Item'" [bottomBorder]="true">
|
|
12
|
+
* <button class="close-button">×</button>
|
|
13
|
+
* </lx-modal-header>
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
2
16
|
export declare class ModalHeaderComponent {
|
|
17
|
+
/**
|
|
18
|
+
* The title text to display in the header.
|
|
19
|
+
* @default ''
|
|
20
|
+
*/
|
|
3
21
|
title: string;
|
|
22
|
+
/**
|
|
23
|
+
* Whether to show a bottom border on the header.
|
|
24
|
+
* @default true
|
|
25
|
+
*/
|
|
4
26
|
bottomBorder: boolean;
|
|
5
27
|
static ɵfac: i0.ɵɵFactoryDeclaration<ModalHeaderComponent, never>;
|
|
6
28
|
static ɵcmp: i0.ɵɵComponentDeclaration<ModalHeaderComponent, "lx-modal-header", never, { "title": { "alias": "title"; "required": false; }; "bottomBorder": { "alias": "bottomBorder"; "required": false; }; }, {}, never, ["*"], true, never>;
|
|
@@ -3,25 +3,20 @@ import { SatPopoverComponent, SatPopoverHorizontalAlign, SatPopoverVerticalAlign
|
|
|
3
3
|
import { PopoverTriggerDirective } from '../../directives/popover-hover.directive';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* A floating overlay component anchored to a trigger element.
|
|
7
|
+
* Based on the [ncstate-sat/popover](https://github.com/ncstate-sat/popover) library.
|
|
7
8
|
*
|
|
8
|
-
*
|
|
9
|
-
|
|
10
|
-
*
|
|
11
|
-
* make sure to also check out the docs over there.
|
|
9
|
+
* The popover requires one of the trigger directives:
|
|
10
|
+
* - `lxPopoverHover`: Shows on hover (both anchor and popover body)
|
|
11
|
+
* - `lxPopoverClick`: Shows on click (stays open while hovering popover body)
|
|
12
12
|
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* 2. Show on click and while hovering the popover body.
|
|
16
|
-
*
|
|
17
|
-
* For use case 1. you would use the lxPopoverHover directive, which exports as hoverAnchor.
|
|
18
|
-
*
|
|
19
|
-
* ### Example:
|
|
13
|
+
* ### Example with hover trigger
|
|
14
|
+
* @example
|
|
20
15
|
* ```html
|
|
21
16
|
* <div lxPopoverHover
|
|
22
17
|
* hoverAnchor
|
|
23
18
|
* satPopoverAnchor
|
|
24
|
-
* #anchor="hoverAnchor"
|
|
19
|
+
* #anchor="hoverAnchor">Hover me</div>
|
|
25
20
|
* <lx-popover [trigger]="anchor"
|
|
26
21
|
* horizontalAlign="after"
|
|
27
22
|
* verticalAlign="center">
|
|
@@ -29,18 +24,14 @@ import * as i0 from "@angular/core";
|
|
|
29
24
|
* </lx-popover>
|
|
30
25
|
* ```
|
|
31
26
|
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
* needs to fetch some data before opening it, we do not register a click EventListener in this directive,
|
|
35
|
-
* but require the developer to implement that in the component, where the popover is used.
|
|
36
|
-
*
|
|
37
|
-
* ### Example:
|
|
27
|
+
* ### Example with click trigger
|
|
28
|
+
* @example
|
|
38
29
|
* ```html
|
|
39
30
|
* <div lxPopoverClick
|
|
40
31
|
* clickAnchor
|
|
41
32
|
* satPopoverAnchor
|
|
42
33
|
* #anchor="clickAnchor"
|
|
43
|
-
* (click)="popover.open()">Click
|
|
34
|
+
* (click)="popover.open()">Click me</div>
|
|
44
35
|
* <lx-popover [trigger]="anchor"
|
|
45
36
|
* horizontalAlign="after"
|
|
46
37
|
* verticalAlign="center"
|
|
@@ -49,10 +40,10 @@ import * as i0 from "@angular/core";
|
|
|
49
40
|
* </lx-popover>
|
|
50
41
|
* ```
|
|
51
42
|
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
43
|
+
* ### With strict templates
|
|
44
|
+
* When using `strictTemplates=true`, bind `satPopoverAnchor` to the popover's internal reference:
|
|
45
|
+
* ### Example
|
|
46
|
+
* @example
|
|
56
47
|
* ```html
|
|
57
48
|
* <div [satPopoverAnchor]="popover.satPopover"></div>
|
|
58
49
|
* <lx-popover #popover>
|
|
@@ -4,38 +4,99 @@ import { ActivatedRoute, Router, RouterLinkActive } from '@angular/router';
|
|
|
4
4
|
import { IconComponent } from '@ui5/webcomponents-ngx/main/icon';
|
|
5
5
|
import { Observable } from 'rxjs';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
|
+
/**
|
|
8
|
+
* Individual tab component used inside `lx-tab-group`.
|
|
9
|
+
* Supports icons, counters, router links, and keyboard navigation.
|
|
10
|
+
* Content is projected and rendered by the parent tab group when the tab is active.
|
|
11
|
+
*
|
|
12
|
+
* ### Example
|
|
13
|
+
* @example
|
|
14
|
+
* ```html
|
|
15
|
+
* <lx-tab-group>
|
|
16
|
+
* <lx-tab [label]="'General'" [icon]="'settings'" [disabled]="false">
|
|
17
|
+
* <p>General content</p>
|
|
18
|
+
* </lx-tab>
|
|
19
|
+
* <lx-tab [label]="'Notifications'" [counter]="3">
|
|
20
|
+
* <p>Notification content</p>
|
|
21
|
+
* </lx-tab>
|
|
22
|
+
* <lx-tab [label]="'Settings'" [tabLink]="['/settings']">
|
|
23
|
+
* <p>Settings content</p>
|
|
24
|
+
* </lx-tab>
|
|
25
|
+
* </lx-tab-group>
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
7
28
|
export declare class TabComponent {
|
|
8
29
|
private cd;
|
|
9
30
|
private router;
|
|
10
31
|
private activatedRoute;
|
|
11
32
|
/**
|
|
12
|
-
* The icon input takes an SAP icon name
|
|
33
|
+
* The icon input takes an SAP icon name.
|
|
13
34
|
* WARNING: Currently this component does not support using an icon together with a counter.
|
|
14
35
|
*/
|
|
15
36
|
icon?: string;
|
|
16
37
|
/**
|
|
17
|
-
* The
|
|
38
|
+
* The design of the icon.
|
|
18
39
|
* @default NonInteractive
|
|
19
40
|
*/
|
|
20
41
|
iconDesign: IconComponent['design'];
|
|
42
|
+
/**
|
|
43
|
+
* The label text displayed for the tab.
|
|
44
|
+
* @default ''
|
|
45
|
+
*/
|
|
21
46
|
label: string;
|
|
47
|
+
/**
|
|
48
|
+
* Optional title attribute for the tab element (shown on hover).
|
|
49
|
+
*/
|
|
22
50
|
title?: string;
|
|
23
51
|
/**
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
* therefore we are using type of the input as string | any[].
|
|
52
|
+
* Router link for tab navigation. Accepts both string and array formats.
|
|
53
|
+
* When set, the tab will navigate to the specified route when selected.
|
|
27
54
|
*/
|
|
28
55
|
tabLink?: string | any[];
|
|
56
|
+
/**
|
|
57
|
+
* Counter badge displayed on the tab.
|
|
58
|
+
* WARNING: Currently this component does not support using a counter together with an icon.
|
|
59
|
+
*/
|
|
29
60
|
counter?: number;
|
|
61
|
+
/**
|
|
62
|
+
* Options for the RouterLinkActive directive.
|
|
63
|
+
* @default { exact: true }
|
|
64
|
+
*/
|
|
30
65
|
routerLinkActiveOptions: {
|
|
31
66
|
exact: boolean;
|
|
32
67
|
};
|
|
68
|
+
/**
|
|
69
|
+
* Size of the counter badge.
|
|
70
|
+
* @default 'default'
|
|
71
|
+
*/
|
|
33
72
|
counterBadgeSize: 'default' | 'small';
|
|
73
|
+
/**
|
|
74
|
+
* Whether to remove margin from the tab.
|
|
75
|
+
* @default false
|
|
76
|
+
*/
|
|
34
77
|
noMargin: boolean;
|
|
78
|
+
/**
|
|
79
|
+
* Whether to remove left margin for the first tab.
|
|
80
|
+
* @default false
|
|
81
|
+
*/
|
|
35
82
|
noLeftMarginForFirstTab: boolean;
|
|
83
|
+
/**
|
|
84
|
+
* Background color of the tab.
|
|
85
|
+
* @default 'white'
|
|
86
|
+
*/
|
|
36
87
|
background: 'white' | 'gray';
|
|
88
|
+
/**
|
|
89
|
+
* Whether the tab is disabled and cannot be selected.
|
|
90
|
+
* @default false
|
|
91
|
+
*/
|
|
37
92
|
disabled: boolean;
|
|
93
|
+
/**
|
|
94
|
+
* Event emitted when the tab is selected.
|
|
95
|
+
*/
|
|
38
96
|
switch: EventEmitter<any>;
|
|
97
|
+
/**
|
|
98
|
+
* Event emitted when a keyboard key is pressed on the tab.
|
|
99
|
+
*/
|
|
39
100
|
keyDownAction: EventEmitter<KeyboardEvent>;
|
|
40
101
|
tabId: string;
|
|
41
102
|
content?: TemplatePortal<any>;
|
|
@@ -2,13 +2,41 @@ import { AfterContentInit, ChangeDetectorRef, ElementRef, EventEmitter, OnChange
|
|
|
2
2
|
import { Observable, Subject } from 'rxjs';
|
|
3
3
|
import { TabComponent } from '../tab/tab.component';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
|
+
/**
|
|
6
|
+
* Container for tab navigation that manages active tab state and keyboard interactions.
|
|
7
|
+
* Supports both static tabs and router-linked tabs with keyboard navigation (arrow keys, Home, End).
|
|
8
|
+
*
|
|
9
|
+
* ### Content Projection
|
|
10
|
+
* - Project `lx-tab` components as children
|
|
11
|
+
*
|
|
12
|
+
* ### Example
|
|
13
|
+
* @example
|
|
14
|
+
* ```html
|
|
15
|
+
* <lx-tab-group [selectedIndex]="0" (indexChange)="onTabChange($event)">
|
|
16
|
+
* <lx-tab [label]="'General'" [icon]="'settings'">
|
|
17
|
+
* <p>General content</p>
|
|
18
|
+
* </lx-tab>
|
|
19
|
+
* <lx-tab [label]="'Notifications'" [counter]="3">
|
|
20
|
+
* <p>Notification content</p>
|
|
21
|
+
* </lx-tab>
|
|
22
|
+
* </lx-tab-group>
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
5
25
|
export declare class TabGroupComponent implements OnChanges, AfterContentInit, OnDestroy {
|
|
6
26
|
private cd;
|
|
27
|
+
/**
|
|
28
|
+
* Whether the tabs should be centered.
|
|
29
|
+
* @default false
|
|
30
|
+
*/
|
|
7
31
|
isCentered: boolean;
|
|
8
32
|
/**
|
|
9
|
-
* The tab whose content should be displayed.
|
|
33
|
+
* The index of the tab whose content should be displayed.
|
|
34
|
+
* @default 0
|
|
10
35
|
*/
|
|
11
36
|
selectedIndex: number;
|
|
37
|
+
/**
|
|
38
|
+
* Event emitted when the selected tab index changes.
|
|
39
|
+
*/
|
|
12
40
|
indexChange: EventEmitter<number>;
|
|
13
41
|
/** @internal */
|
|
14
42
|
tabsQueryList$: Observable<QueryList<TabComponent>>;
|