@testgorilla/tgo-ui 11.5.0 → 11.6.0
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/testgorilla-tgo-ui-components-breadcrumb.mjs +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-breadcrumb.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-device-control.mjs +114 -0
- package/fesm2022/testgorilla-tgo-ui-components-device-control.mjs.map +1 -0
- package/fesm2022/testgorilla-tgo-ui-components-overflow-menu.mjs +25 -5
- package/fesm2022/testgorilla-tgo-ui-components-overflow-menu.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-popup-tip.mjs +76 -0
- package/fesm2022/testgorilla-tgo-ui-components-popup-tip.mjs.map +1 -0
- package/fesm2022/testgorilla-tgo-ui-components-prompt.mjs +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-prompt.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-side-navigation.mjs +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-side-navigation.mjs.map +1 -1
- package/mcp/catalog.json +1 -1
- package/package.json +9 -1
- package/projects/tgo-canopy-ui/theme/_arrow.scss +43 -0
- package/projects/tgo-canopy-ui/theme/_tooltip.scss +5 -56
- package/types/testgorilla-tgo-ui-components-device-control.d.ts +91 -0
- package/types/testgorilla-tgo-ui-components-overflow-menu.d.ts +17 -2
- package/types/testgorilla-tgo-ui-components-popup-tip.d.ts +50 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@testgorilla/tgo-ui",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.6.0",
|
|
4
4
|
"license": "proprietary-license",
|
|
5
5
|
"lint-staged": {
|
|
6
6
|
"{projects,components}/**/*.ts": [
|
|
@@ -150,6 +150,10 @@
|
|
|
150
150
|
"types": "./types/testgorilla-tgo-ui-components-datepicker.d.ts",
|
|
151
151
|
"default": "./fesm2022/testgorilla-tgo-ui-components-datepicker.mjs"
|
|
152
152
|
},
|
|
153
|
+
"./components/device-control": {
|
|
154
|
+
"types": "./types/testgorilla-tgo-ui-components-device-control.d.ts",
|
|
155
|
+
"default": "./fesm2022/testgorilla-tgo-ui-components-device-control.mjs"
|
|
156
|
+
},
|
|
153
157
|
"./components/dialog": {
|
|
154
158
|
"types": "./types/testgorilla-tgo-ui-components-dialog.d.ts",
|
|
155
159
|
"default": "./fesm2022/testgorilla-tgo-ui-components-dialog.mjs"
|
|
@@ -254,6 +258,10 @@
|
|
|
254
258
|
"types": "./types/testgorilla-tgo-ui-components-popover.d.ts",
|
|
255
259
|
"default": "./fesm2022/testgorilla-tgo-ui-components-popover.mjs"
|
|
256
260
|
},
|
|
261
|
+
"./components/popup-tip": {
|
|
262
|
+
"types": "./types/testgorilla-tgo-ui-components-popup-tip.d.ts",
|
|
263
|
+
"default": "./fesm2022/testgorilla-tgo-ui-components-popup-tip.mjs"
|
|
264
|
+
},
|
|
257
265
|
"./components/progress-bar": {
|
|
258
266
|
"types": "./types/testgorilla-tgo-ui-components-progress-bar.d.ts",
|
|
259
267
|
"default": "./fesm2022/testgorilla-tgo-ui-components-progress-bar.mjs"
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
@use './variables' as *;
|
|
2
|
+
|
|
3
|
+
// The rebranded arrow: a rotated square whose two borders facing the anchor stay visible. $side is
|
|
4
|
+
// the edge the arrow sits on; the defaults reproduce the tooltip arrow, popup-tip passes its own.
|
|
5
|
+
@mixin rebranded-arrow(
|
|
6
|
+
$side,
|
|
7
|
+
$size: 15px,
|
|
8
|
+
$offset: -8px,
|
|
9
|
+
$cross: calc(50% - 7px),
|
|
10
|
+
$cross-edge: right,
|
|
11
|
+
$radius: 4px,
|
|
12
|
+
$background: $black
|
|
13
|
+
) {
|
|
14
|
+
&::after {
|
|
15
|
+
content: '';
|
|
16
|
+
position: absolute;
|
|
17
|
+
height: $size;
|
|
18
|
+
width: $size;
|
|
19
|
+
border-top: 1px solid $tgo-white;
|
|
20
|
+
border-right: 1px solid $tgo-white;
|
|
21
|
+
background: $background;
|
|
22
|
+
z-index: 10;
|
|
23
|
+
border-top-right-radius: $radius;
|
|
24
|
+
|
|
25
|
+
@if $side == left {
|
|
26
|
+
left: $offset;
|
|
27
|
+
top: $cross;
|
|
28
|
+
transform: rotate(-135deg);
|
|
29
|
+
} @else if $side == right {
|
|
30
|
+
right: $offset;
|
|
31
|
+
top: $cross;
|
|
32
|
+
transform: rotate(45deg);
|
|
33
|
+
} @else if $side == top {
|
|
34
|
+
top: $offset;
|
|
35
|
+
#{$cross-edge}: $cross;
|
|
36
|
+
transform: rotate(-45deg);
|
|
37
|
+
} @else {
|
|
38
|
+
bottom: $offset;
|
|
39
|
+
#{$cross-edge}: $cross;
|
|
40
|
+
transform: rotate(135deg);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
@use './variables' as *;
|
|
2
|
+
@use './arrow' as *;
|
|
2
3
|
|
|
3
4
|
@mixin rebranded-tooltip {
|
|
4
5
|
background-color: $black;
|
|
@@ -12,74 +13,22 @@
|
|
|
12
13
|
|
|
13
14
|
@mixin rebranded-tooltip-right {
|
|
14
15
|
margin-left: 5px;
|
|
15
|
-
|
|
16
|
-
content: '';
|
|
17
|
-
position: absolute;
|
|
18
|
-
left: -8px;
|
|
19
|
-
top: calc(50% - 7px);
|
|
20
|
-
height: 15px;
|
|
21
|
-
width: 15px;
|
|
22
|
-
border-top: 1px solid $tgo-white;
|
|
23
|
-
border-right: 1px solid $tgo-white;
|
|
24
|
-
background: $black;
|
|
25
|
-
z-index: 10;
|
|
26
|
-
border-top-right-radius: 4px;
|
|
27
|
-
transform: rotate(-135deg);
|
|
28
|
-
}
|
|
16
|
+
@include rebranded-arrow(left);
|
|
29
17
|
}
|
|
30
18
|
|
|
31
19
|
@mixin rebranded-tooltip-left {
|
|
32
20
|
margin-right: 5px;
|
|
33
|
-
|
|
34
|
-
content: '';
|
|
35
|
-
position: absolute;
|
|
36
|
-
right: -8px;
|
|
37
|
-
top: calc(50% - 7px);
|
|
38
|
-
height: 15px;
|
|
39
|
-
width: 15px;
|
|
40
|
-
border-top: 1px solid $tgo-white;
|
|
41
|
-
border-right: 1px solid $tgo-white;
|
|
42
|
-
background: $black;
|
|
43
|
-
z-index: 10;
|
|
44
|
-
border-top-right-radius: 4px;
|
|
45
|
-
transform: rotate(45deg);
|
|
46
|
-
}
|
|
21
|
+
@include rebranded-arrow(right);
|
|
47
22
|
}
|
|
48
23
|
|
|
49
24
|
@mixin rebranded-tooltip-below {
|
|
50
25
|
margin-top: 5px;
|
|
51
|
-
|
|
52
|
-
content: '';
|
|
53
|
-
position: absolute;
|
|
54
|
-
right: calc(50% - 7px);
|
|
55
|
-
top: -8px;
|
|
56
|
-
height: 15px;
|
|
57
|
-
width: 15px;
|
|
58
|
-
border-top: 1px solid $tgo-white;
|
|
59
|
-
border-right: 1px solid $tgo-white;
|
|
60
|
-
background: $black;
|
|
61
|
-
z-index: 10;
|
|
62
|
-
border-top-right-radius: 4px;
|
|
63
|
-
transform: rotate(-45deg);
|
|
64
|
-
}
|
|
26
|
+
@include rebranded-arrow(top);
|
|
65
27
|
}
|
|
66
28
|
|
|
67
29
|
@mixin rebranded-tooltip-above {
|
|
68
30
|
margin-bottom: 5px;
|
|
69
|
-
|
|
70
|
-
content: '';
|
|
71
|
-
position: absolute;
|
|
72
|
-
right: calc(50% - 7px);
|
|
73
|
-
bottom: -8px;
|
|
74
|
-
height: 15px;
|
|
75
|
-
width: 15px;
|
|
76
|
-
border-top: 1px solid $tgo-white;
|
|
77
|
-
border-right: 1px solid $tgo-white;
|
|
78
|
-
background: $black;
|
|
79
|
-
z-index: 10;
|
|
80
|
-
border-top-right-radius: 4px;
|
|
81
|
-
transform: rotate(135deg);
|
|
82
|
-
}
|
|
31
|
+
@include rebranded-arrow(bottom);
|
|
83
32
|
}
|
|
84
33
|
|
|
85
34
|
.mat-mdc-tooltip {
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { ApplicationTheme } from '@testgorilla/tgo-ui/components/core';
|
|
3
|
+
export { ApplicationTheme } from '@testgorilla/tgo-ui/components/core';
|
|
4
|
+
import { IconName } from '@testgorilla/tgo-ui/components/icon';
|
|
5
|
+
import { MenuConfig, OverflowMenuButtonsType } from '@testgorilla/tgo-ui/components/overflow-menu';
|
|
6
|
+
import { TooltipPositionType } from '@testgorilla/tgo-ui/components/tooltip';
|
|
7
|
+
import * as i1 from '@angular/common';
|
|
8
|
+
|
|
9
|
+
/** One entry of the device dropdown. */
|
|
10
|
+
interface DeviceControlOption {
|
|
11
|
+
/** Value handed back when the entry is picked. */
|
|
12
|
+
value: string;
|
|
13
|
+
/** Text shown in the dropdown. */
|
|
14
|
+
label: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Shape of the control.
|
|
18
|
+
* `toggle` renders a main button that switches the device on and off, plus a chevron that opens the
|
|
19
|
+
* dropdown. `menu` renders a single control where both halves open the dropdown.
|
|
20
|
+
*/
|
|
21
|
+
type DeviceControlVariant = 'toggle' | 'menu';
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Media device control: an on/off button paired with a device dropdown, generic across microphones,
|
|
25
|
+
* speakers and similar. The dropdown is `ui-overflow-menu`, so it behaves like every other menu.
|
|
26
|
+
*/
|
|
27
|
+
declare class DeviceControlComponent {
|
|
28
|
+
/**
|
|
29
|
+
* Shape of the control: `toggle` pairs an on/off button with the dropdown chevron; `menu` is a
|
|
30
|
+
* single button that opens the dropdown. Default: 'toggle'.
|
|
31
|
+
*/
|
|
32
|
+
readonly variant: _angular_core.InputSignal<DeviceControlVariant>;
|
|
33
|
+
readonly iconName: _angular_core.InputSignal<IconName>;
|
|
34
|
+
/** Icon shown while the device is off. Only used by the toggle variant. */
|
|
35
|
+
readonly offIconName: _angular_core.InputSignal<IconName>;
|
|
36
|
+
readonly isOn: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
37
|
+
/** Plays the icon's activity animation, for example while a test sound runs. */
|
|
38
|
+
readonly isActive: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
39
|
+
readonly options: _angular_core.InputSignal<DeviceControlOption[]>;
|
|
40
|
+
readonly selectedValue: _angular_core.InputSignal<string>;
|
|
41
|
+
/** Tooltip and accessible name of the main button while the device is on. Rendered by the toggle variant. */
|
|
42
|
+
readonly onTooltip: _angular_core.InputSignal<string>;
|
|
43
|
+
/** Tooltip and accessible name of the main button while the device is off. Rendered by the toggle variant. */
|
|
44
|
+
readonly offTooltip: _angular_core.InputSignal<string>;
|
|
45
|
+
/** Tooltip and accessible name of the button that opens the dropdown, which every variant renders. */
|
|
46
|
+
readonly menuTooltip: _angular_core.InputSignal<string>;
|
|
47
|
+
/** Shows the error badge, for example when the device cannot be opened. */
|
|
48
|
+
readonly hasError: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
49
|
+
readonly errorLabel: _angular_core.InputSignal<string>;
|
|
50
|
+
/**
|
|
51
|
+
* Defines the application theme. Defaults to dark, the primary use case for this control; the
|
|
52
|
+
* light variant is available for reuse on light surfaces.
|
|
53
|
+
*/
|
|
54
|
+
readonly applicationTheme: _angular_core.InputSignal<ApplicationTheme | undefined>;
|
|
55
|
+
/** Emits when the main button is used to switch the device on or off, with the new state. */
|
|
56
|
+
readonly toggled: _angular_core.OutputEmitterRef<boolean>;
|
|
57
|
+
/**
|
|
58
|
+
* Emits the value of the entry the user picked. An entry with an empty value is a placeholder,
|
|
59
|
+
* not a selectable option: picking it closes the dropdown without emitting.
|
|
60
|
+
*/
|
|
61
|
+
readonly optionSelected: _angular_core.OutputEmitterRef<string>;
|
|
62
|
+
/** Emits when the dropdown opens, so the consumer can refresh the entries. */
|
|
63
|
+
readonly menuOpened: _angular_core.OutputEmitterRef<void>;
|
|
64
|
+
readonly menuClosed: _angular_core.OutputEmitterRef<void>;
|
|
65
|
+
private readonly overflowMenu;
|
|
66
|
+
private readonly defaultAppTheme;
|
|
67
|
+
protected readonly theme: _angular_core.Signal<ApplicationTheme>;
|
|
68
|
+
/** Open state of the dropdown, derived from the overflow menu so there is no mirror to drift. */
|
|
69
|
+
readonly isMenuOpen: _angular_core.Signal<boolean>;
|
|
70
|
+
/** Tooltips sit above the control, which is anchored to the bottom of a call surface. */
|
|
71
|
+
protected readonly tooltipPosition = TooltipPositionType.TOP;
|
|
72
|
+
/** The dropdown opens upwards, over the call surface the control sits at the bottom of. */
|
|
73
|
+
protected readonly menuConfig: MenuConfig;
|
|
74
|
+
protected readonly menuButtons: _angular_core.Signal<OverflowMenuButtonsType[]>;
|
|
75
|
+
protected readonly mainTooltip: _angular_core.Signal<string>;
|
|
76
|
+
protected readonly currentIconName: _angular_core.Signal<IconName>;
|
|
77
|
+
toggleDevice(): void;
|
|
78
|
+
closeMenu(): void;
|
|
79
|
+
selectOption(value: string): void;
|
|
80
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DeviceControlComponent, never>;
|
|
81
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<DeviceControlComponent, "ui-device-control", never, { "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "iconName": { "alias": "iconName"; "required": false; "isSignal": true; }; "offIconName": { "alias": "offIconName"; "required": false; "isSignal": true; }; "isOn": { "alias": "isOn"; "required": false; "isSignal": true; }; "isActive": { "alias": "isActive"; "required": false; "isSignal": true; }; "options": { "alias": "options"; "required": false; "isSignal": true; }; "selectedValue": { "alias": "selectedValue"; "required": false; "isSignal": true; }; "onTooltip": { "alias": "onTooltip"; "required": true; "isSignal": true; }; "offTooltip": { "alias": "offTooltip"; "required": true; "isSignal": true; }; "menuTooltip": { "alias": "menuTooltip"; "required": true; "isSignal": true; }; "hasError": { "alias": "hasError"; "required": false; "isSignal": true; }; "errorLabel": { "alias": "errorLabel"; "required": false; "isSignal": true; }; "applicationTheme": { "alias": "applicationTheme"; "required": false; "isSignal": true; }; }, { "toggled": "toggled"; "optionSelected": "optionSelected"; "menuOpened": "menuOpened"; "menuClosed": "menuClosed"; }, never, ["[uiDeviceControlMenuFooter]"], true, never>;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
declare class DeviceControlComponentModule {
|
|
85
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DeviceControlComponentModule, never>;
|
|
86
|
+
static ɵmod: _angular_core.ɵɵNgModuleDeclaration<DeviceControlComponentModule, never, [typeof i1.CommonModule, typeof DeviceControlComponent], [typeof DeviceControlComponent]>;
|
|
87
|
+
static ɵinj: _angular_core.ɵɵInjectorDeclaration<DeviceControlComponentModule>;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export { DeviceControlComponent, DeviceControlComponentModule };
|
|
91
|
+
export type { DeviceControlOption, DeviceControlVariant };
|
|
@@ -14,12 +14,14 @@ import * as i1 from '@angular/common';
|
|
|
14
14
|
import * as i5 from '@angular/material/button';
|
|
15
15
|
import * as i6 from '@angular/material/tooltip';
|
|
16
16
|
|
|
17
|
+
type OverflowMenuSelectionMode = 'none' | 'single';
|
|
17
18
|
type OverflowMenuButtonsType = {
|
|
18
19
|
icon?: IconName;
|
|
19
20
|
label: string;
|
|
20
21
|
isDestructive?: boolean;
|
|
21
22
|
value: string;
|
|
22
23
|
disabled?: boolean;
|
|
24
|
+
isSelected?: boolean;
|
|
23
25
|
btnTemplate?: TemplateRef<unknown>;
|
|
24
26
|
subMenu?: OverflowMenuButtonsType[] | number;
|
|
25
27
|
action?: number | string;
|
|
@@ -118,6 +120,15 @@ declare class OverflowMenuComponent implements OnInit, OnChanges, AfterViewInit
|
|
|
118
120
|
*/
|
|
119
121
|
buttonSize: ButtonSize;
|
|
120
122
|
menuConfig: MenuConfig;
|
|
123
|
+
/**
|
|
124
|
+
* Selection semantics of the menu. 'single' renders every entry as a menuitemradio whose
|
|
125
|
+
* aria-checked and right-aligned check come from the button's isSelected flag; 'none' keeps
|
|
126
|
+
* plain menuitem entries.
|
|
127
|
+
*
|
|
128
|
+
* @type {OverflowMenuSelectionMode}
|
|
129
|
+
* @memberof OverflowMenuComponent
|
|
130
|
+
*/
|
|
131
|
+
readonly selectionMode: i0.InputSignal<OverflowMenuSelectionMode>;
|
|
121
132
|
isDynamicMenu: boolean;
|
|
122
133
|
withRemovableOption: boolean;
|
|
123
134
|
selectItem: EventEmitter<string>;
|
|
@@ -137,6 +148,10 @@ declare class OverflowMenuComponent implements OnInit, OnChanges, AfterViewInit
|
|
|
137
148
|
ngOnInit(): void;
|
|
138
149
|
ngOnChanges(changes: SimpleChanges): void;
|
|
139
150
|
ngAfterViewInit(): void;
|
|
151
|
+
/** Opens the dropdown programmatically, as if the trigger had been used. */
|
|
152
|
+
openMenu(): void;
|
|
153
|
+
/** Closes the dropdown, whichever way it was opened. */
|
|
154
|
+
closeMenu(): void;
|
|
140
155
|
onSelectItem(event: Event, value: string): void;
|
|
141
156
|
onMenuOpened(): void;
|
|
142
157
|
onMenuClosed(): void;
|
|
@@ -151,7 +166,7 @@ declare class OverflowMenuComponent implements OnInit, OnChanges, AfterViewInit
|
|
|
151
166
|
private resetSubmenus;
|
|
152
167
|
private createSubmenus;
|
|
153
168
|
static ɵfac: i0.ɵɵFactoryDeclaration<OverflowMenuComponent, [{ optional: true; }, null, null]>;
|
|
154
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<OverflowMenuComponent, "ui-overflow-menu", never, { "buttons": { "alias": "buttons"; "required": false; }; "iconTrigger": { "alias": "iconTrigger"; "required": false; }; "menuLabel": { "alias": "menuLabel"; "required": false; }; "applicationTheme": { "alias": "applicationTheme"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; "ariaRequired": { "alias": "ariaRequired"; "required": false; }; "describedby": { "alias": "describedby"; "required": false; }; "contentTemplateRef": { "alias": "contentTemplateRef"; "required": false; }; "buttonVariant": { "alias": "buttonVariant"; "required": false; }; "buttonSize": { "alias": "buttonSize"; "required": false; }; "menuConfig": { "alias": "menuConfig"; "required": false; }; "isDynamicMenu": { "alias": "isDynamicMenu"; "required": false; }; "withRemovableOption": { "alias": "withRemovableOption"; "required": false; }; }, { "selectItem": "selectItem"; "menuOpened": "menuOpened"; "menuClosed": "menuClosed"; }, never, ["[menu-content]"], true, never>;
|
|
169
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<OverflowMenuComponent, "ui-overflow-menu", never, { "buttons": { "alias": "buttons"; "required": false; }; "iconTrigger": { "alias": "iconTrigger"; "required": false; }; "menuLabel": { "alias": "menuLabel"; "required": false; }; "applicationTheme": { "alias": "applicationTheme"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; "ariaRequired": { "alias": "ariaRequired"; "required": false; }; "describedby": { "alias": "describedby"; "required": false; }; "contentTemplateRef": { "alias": "contentTemplateRef"; "required": false; }; "buttonVariant": { "alias": "buttonVariant"; "required": false; }; "buttonSize": { "alias": "buttonSize"; "required": false; }; "menuConfig": { "alias": "menuConfig"; "required": false; }; "selectionMode": { "alias": "selectionMode"; "required": false; "isSignal": true; }; "isDynamicMenu": { "alias": "isDynamicMenu"; "required": false; }; "withRemovableOption": { "alias": "withRemovableOption"; "required": false; }; }, { "selectItem": "selectItem"; "menuOpened": "menuOpened"; "menuClosed": "menuClosed"; }, never, ["[menu-content]"], true, never>;
|
|
155
170
|
}
|
|
156
171
|
|
|
157
172
|
declare class OverflowMenuComponentModule {
|
|
@@ -161,4 +176,4 @@ declare class OverflowMenuComponentModule {
|
|
|
161
176
|
}
|
|
162
177
|
|
|
163
178
|
export { OverflowMenuComponent, OverflowMenuComponentModule };
|
|
164
|
-
export type { MenuConfig, OverflowMenuButtonModify, OverflowMenuButtonsType };
|
|
179
|
+
export type { MenuConfig, OverflowMenuButtonModify, OverflowMenuButtonsType, OverflowMenuSelectionMode };
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { ApplicationTheme } from '@testgorilla/tgo-ui/components/core';
|
|
3
|
+
export { ApplicationTheme } from '@testgorilla/tgo-ui/components/core';
|
|
4
|
+
import * as i1 from '@angular/common';
|
|
5
|
+
|
|
6
|
+
/** Side of the anchor the tip is rendered on, which is also where its arrow points from. */
|
|
7
|
+
type PopupTipPosition = 'top' | 'bottom' | 'left' | 'right';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Tooltip that stays open until it is dismissed, with an optional inline link and a close button.
|
|
11
|
+
* Unlike `ui-tooltip` it is not hover driven: the application opens it in response to a system state.
|
|
12
|
+
*/
|
|
13
|
+
declare class PopupTipComponent {
|
|
14
|
+
readonly message: _angular_core.InputSignal<string>;
|
|
15
|
+
/** Optional link rendered inline after the message. Needs `linkUrl` to render. */
|
|
16
|
+
readonly linkText: _angular_core.InputSignal<string>;
|
|
17
|
+
readonly linkUrl: _angular_core.InputSignal<string>;
|
|
18
|
+
/** Side of the anchor the tip sits on, which decides where its arrow is drawn. Default: 'top'. */
|
|
19
|
+
readonly position: _angular_core.InputSignal<PopupTipPosition>;
|
|
20
|
+
readonly includeCloseButton: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
21
|
+
/**
|
|
22
|
+
* Accessible name of the close button. Pass a localized string: the English default is only a
|
|
23
|
+
* last-resort fallback so the button is never nameless. Default: 'Close'.
|
|
24
|
+
*/
|
|
25
|
+
readonly closeButtonLabel: _angular_core.InputSignal<string>;
|
|
26
|
+
/**
|
|
27
|
+
* Defines the application theme. Defaults to dark because the design sheet only specifies the
|
|
28
|
+
* dark tip; the light variant exists for reuse on light surfaces.
|
|
29
|
+
*/
|
|
30
|
+
readonly applicationTheme: _angular_core.InputSignal<ApplicationTheme | undefined>;
|
|
31
|
+
/**
|
|
32
|
+
* Emits when the user dismisses the tip, with the close button or with Escape. Escape only fires
|
|
33
|
+
* while focus is inside the tip: call `focus()` on it when opening, especially without the button.
|
|
34
|
+
*/
|
|
35
|
+
readonly closed: _angular_core.OutputEmitterRef<void>;
|
|
36
|
+
private readonly defaultAppTheme;
|
|
37
|
+
protected readonly theme: _angular_core.Signal<ApplicationTheme>;
|
|
38
|
+
close(): void;
|
|
39
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<PopupTipComponent, never>;
|
|
40
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<PopupTipComponent, "ui-popup-tip", never, { "message": { "alias": "message"; "required": false; "isSignal": true; }; "linkText": { "alias": "linkText"; "required": false; "isSignal": true; }; "linkUrl": { "alias": "linkUrl"; "required": false; "isSignal": true; }; "position": { "alias": "position"; "required": false; "isSignal": true; }; "includeCloseButton": { "alias": "includeCloseButton"; "required": false; "isSignal": true; }; "closeButtonLabel": { "alias": "closeButtonLabel"; "required": false; "isSignal": true; }; "applicationTheme": { "alias": "applicationTheme"; "required": false; "isSignal": true; }; }, { "closed": "closed"; }, never, ["*"], true, never>;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
declare class PopupTipComponentModule {
|
|
44
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<PopupTipComponentModule, never>;
|
|
45
|
+
static ɵmod: _angular_core.ɵɵNgModuleDeclaration<PopupTipComponentModule, never, [typeof i1.CommonModule, typeof PopupTipComponent], [typeof PopupTipComponent]>;
|
|
46
|
+
static ɵinj: _angular_core.ɵɵInjectorDeclaration<PopupTipComponentModule>;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export { PopupTipComponent, PopupTipComponentModule };
|
|
50
|
+
export type { PopupTipPosition };
|