@leanix/components 0.4.472 → 0.4.474
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/collapsible/collapsible.component.mjs +3 -3
- package/esm2022/lib/core-ui/components/spinner/spinner.component.mjs +4 -4
- package/esm2022/lib/core-ui/components/tokenizer/tokenizer.component.mjs +40 -1
- package/esm2022/lib/forms-ui/components/option-group-dropdown/option-group-dropdown.component.mjs +4 -2
- package/esm2022/lib/forms-ui/components/picker/picker.component.mjs +4 -2
- package/esm2022/lib/forms-ui/components/single-select/single-select.component.mjs +12 -1
- package/esm2022/lib/tab-ui/components/tab-group/tab-group.component.mjs +24 -1
- package/fesm2022/leanix-components.mjs +84 -7
- package/fesm2022/leanix-components.mjs.map +1 -1
- package/lib/core-ui/components/spinner/spinner.component.d.ts +3 -3
- package/lib/core-ui/components/tokenizer/tokenizer.component.d.ts +39 -0
- package/lib/forms-ui/components/option-group-dropdown/option-group-dropdown.component.d.ts +3 -1
- package/lib/forms-ui/components/picker/picker.component.d.ts +3 -1
- package/lib/forms-ui/components/single-select/single-select.component.d.ts +11 -0
- package/lib/tab-ui/components/tab-group/tab-group.component.d.ts +23 -0
- package/package.json +1 -1
@@ -1,10 +1,10 @@
|
|
1
1
|
import * as i0 from "@angular/core";
|
2
2
|
/**
|
3
3
|
* The following CSS classes should be used to style this component. The use of the inputs is deprecated.
|
4
|
-
* - fullSpace
|
5
|
-
* - fullSpaceFixed
|
4
|
+
* - `fullSpace`: Sets position to absolute with full height and width => fills ancestor with position set.
|
5
|
+
* - `fullSpaceFixed`: Sets position to fixed with full height and width => fills window
|
6
6
|
* (or ancestor with new rendering context, created, for example, with `transform: translate(0, 0)`
|
7
|
-
* - fadeBackground
|
7
|
+
* - `fadeBackground`: Sets background to 60% transparent white. TODO: Always use for fullSpace* classes and remove.
|
8
8
|
*/
|
9
9
|
export declare class SpinnerComponent {
|
10
10
|
fadeBackground: boolean;
|
@@ -2,6 +2,45 @@ import { AfterContentInit, ChangeDetectorRef, DestroyRef, ElementRef, EventEmitt
|
|
2
2
|
import { ResizeObserverService } from '../../services/resize-observer.service';
|
3
3
|
import { TokenComponent } from './token/token.component';
|
4
4
|
import * as i0 from "@angular/core";
|
5
|
+
/**
|
6
|
+
* The tokenizer component (`lx-tokenizer`) is responsible for rendering a list of items into a container and hiding those that do not fit behind a placeholder. The items are represented as `lx-token`. Each `lx-token` allows to project any content into it, so anything can become a token. The tokenizer calculates how many items fit into the container (based on width), hiding those items that are overflowing and showing a overflow placeholder instead (e.g. "+4").
|
7
|
+
*
|
8
|
+
* ## Usage
|
9
|
+
*
|
10
|
+
* 1. Import `TokenizerComponent` & `TokenComponent` into your module or component.
|
11
|
+
* 2. Use the component in your template. All items should be wrapped in a `lx-token` element for the tokenizer to identify the individual tokens.
|
12
|
+
*
|
13
|
+
* ```ts
|
14
|
+
* import { TokenizerComponent } from '@leanix/components';
|
15
|
+
*
|
16
|
+
* @Component({
|
17
|
+
* selector: 'lx-my-component',
|
18
|
+
* standalone: true,
|
19
|
+
* imports: [TokenizerComponent, TokenComponent],
|
20
|
+
* template: `
|
21
|
+
* <lx-tokenizer>
|
22
|
+
* <lx-token>Token One</lx-token>
|
23
|
+
* <lx-token>Token Two</lx-token>
|
24
|
+
* </lx-tokenizer>
|
25
|
+
* `
|
26
|
+
* })
|
27
|
+
* export class MyComponent {}
|
28
|
+
* ```
|
29
|
+
*
|
30
|
+
* ## API
|
31
|
+
*
|
32
|
+
* ### Inputs
|
33
|
+
*
|
34
|
+
* - `active`: Can be used to activate & deactivate tokenization
|
35
|
+
*
|
36
|
+
* ### Outputs
|
37
|
+
*
|
38
|
+
* - `overflowPlaceholderClick`: Fires when the user clicks on the overflow placeholder
|
39
|
+
*
|
40
|
+
* ### Content projection
|
41
|
+
*
|
42
|
+
* - `lx-token`: All `lx-tokens` will be projected into the tokenizer
|
43
|
+
*/
|
5
44
|
export declare class TokenizerComponent implements AfterContentInit {
|
6
45
|
private elementRef;
|
7
46
|
private destroyRef;
|
@@ -15,6 +15,8 @@ export type SingleSelectOptionGroup<T = any> = {
|
|
15
15
|
};
|
16
16
|
/**
|
17
17
|
* Usage:
|
18
|
+
*
|
19
|
+
* ```
|
18
20
|
* <lx-single-select
|
19
21
|
* #singleSelect
|
20
22
|
* [selection]="value"
|
@@ -29,7 +31,7 @@ export type SingleSelectOptionGroup<T = any> = {
|
|
29
31
|
* (onItemSelected)="singleSelect.selectOption($event)">
|
30
32
|
* </lx-option-group-dropdown>
|
31
33
|
* </lx-single-select>
|
32
|
-
*
|
34
|
+
* ```
|
33
35
|
*/
|
34
36
|
export declare class OptionGroupDropdownComponent extends KeyboardSelectDirective {
|
35
37
|
readonly NAME = "OptionGroupDropdownComponent";
|
@@ -9,11 +9,12 @@ import * as i0 from "@angular/core";
|
|
9
9
|
* How to use:
|
10
10
|
* Provide the lx-picker with two kinds of ContentChildren:
|
11
11
|
* 1. A lxPickerTrigger, preferably a button element, which we use to open the dropdown on click or enter.
|
12
|
-
* 2. A list of
|
12
|
+
* 2. A list of `<li>` elements with an lx-picker-option attribute that own the option template as content children.
|
13
13
|
*
|
14
14
|
* You can use this component as part of a FormGroup or wire it up yourself by listening on the (select) output of the options.
|
15
15
|
*
|
16
16
|
* Example usage (non FormGroup style):
|
17
|
+
* ```
|
17
18
|
* <lx-picker listBoxAriaLabel="Awesome picker">
|
18
19
|
* <button lxPickerTrigger lx-button mode="outline" size="large" [square]="true" aria-label="Awesome picker" title="Awesome picker">
|
19
20
|
* <lx-icon [name]="selection.label" [color]="selection.value" fontAwsomeStyle="solid"></lx-icon>
|
@@ -22,6 +23,7 @@ import * as i0 from "@angular/core";
|
|
22
23
|
* <lx-icon lx-picker-option [name]="option.label" [color]="option.value" fontAwsomeStyle="solid"></lx-icon>
|
23
24
|
* </li>
|
24
25
|
* </lx-picker>
|
26
|
+
* ```
|
25
27
|
*/
|
26
28
|
export declare class PickerComponent implements AfterViewInit, ControlValueAccessor, OnDestroy {
|
27
29
|
private dir;
|
@@ -6,6 +6,17 @@ 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
|
+
* ## Usage
|
11
|
+
*
|
12
|
+
* 1. Import the `LxFormsModule` module from `@leanix/components` in your module where you want to use the component.
|
13
|
+
*
|
14
|
+
* ```ts
|
15
|
+
* import { LxFormsModule } from '@leanix/components';
|
16
|
+
* ```
|
17
|
+
*
|
18
|
+
* 2. Use the component in your template.
|
19
|
+
*/
|
9
20
|
export declare class SingleSelectComponent extends BaseSelectDirective implements OnDestroy, AfterViewInit, ControlValueAccessor {
|
10
21
|
private cd;
|
11
22
|
static calculateNewCursorPostionOnKeyboardNavigation(cursorPosition: number, keyCode: number): number;
|
@@ -2,6 +2,29 @@ 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
|
+
* ## Usage
|
7
|
+
*
|
8
|
+
* 1. Import the `LxTabUiModule` module from `@leanix/components` in your module where you want to use the component.
|
9
|
+
*
|
10
|
+
* ```ts
|
11
|
+
* import { LxTabUiModule } from '@leanix/components';
|
12
|
+
*
|
13
|
+
* // ...
|
14
|
+
*
|
15
|
+
* @NgModule({
|
16
|
+
* // ...
|
17
|
+
* imports: [
|
18
|
+
* // ...
|
19
|
+
* LxTabUiModule
|
20
|
+
* // ...
|
21
|
+
* ]
|
22
|
+
* })
|
23
|
+
* export class MyModule {}
|
24
|
+
* ```
|
25
|
+
*
|
26
|
+
* 2. Use the component in your template.
|
27
|
+
*/
|
5
28
|
export declare class TabGroupComponent implements OnChanges, AfterContentInit, OnDestroy {
|
6
29
|
private cd;
|
7
30
|
isCentered: boolean;
|