@colijnit/corecomponents_v12 262.1.15 → 262.1.17
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/colijnit-corecomponents_v12.mjs +202 -36
- package/fesm2022/colijnit-corecomponents_v12.mjs.map +1 -1
- package/index.d.ts +25 -5
- package/lib/components/tooltip/style/_layout.scss +57 -14
- package/lib/components/tooltip/style/_material-definition.scss +30 -4
- package/lib/components/tooltip/style/_theme.scss +32 -13
- package/lib/style/_variables.scss +1 -0
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -3435,19 +3435,28 @@ declare class TooltipDirective implements OnDestroy, OnInit {
|
|
|
3435
3435
|
private _injector;
|
|
3436
3436
|
private _sanitizer;
|
|
3437
3437
|
set tooltip(str: string);
|
|
3438
|
+
orientation: CoDirection;
|
|
3438
3439
|
private _elementRef;
|
|
3439
3440
|
private _tooltipMessage;
|
|
3440
3441
|
private _componentRef;
|
|
3442
|
+
private _showTimeoutId;
|
|
3443
|
+
private _autoHideTimeoutId;
|
|
3444
|
+
private readonly _mouseEnterHandler;
|
|
3445
|
+
private readonly _mouseLeaveHandler;
|
|
3446
|
+
private readonly _scrollHandler;
|
|
3441
3447
|
constructor(elementRef: ElementRef, _compFactoryResolver: ComponentFactoryResolver, _appRef: ApplicationRef, _injector: Injector, _sanitizer: DomSanitizer);
|
|
3442
3448
|
ngOnDestroy(): void;
|
|
3443
3449
|
ngOnInit(): void;
|
|
3444
3450
|
private _handleScroll;
|
|
3445
|
-
private
|
|
3446
|
-
private
|
|
3451
|
+
private _startShowTimeout;
|
|
3452
|
+
private _resolveDelay;
|
|
3453
|
+
private _clearShowTimeout;
|
|
3447
3454
|
private _removeTooltip;
|
|
3455
|
+
private _startAutoHideTimeout;
|
|
3456
|
+
private _clearAutoHideTimeout;
|
|
3448
3457
|
private _createTooltipComponent;
|
|
3449
3458
|
static ɵfac: i0.ɵɵFactoryDeclaration<TooltipDirective, never>;
|
|
3450
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<TooltipDirective, "[tooltip]", never, { "tooltip": { "alias": "tooltip"; "required": false; }; }, {}, never, never, false, never>;
|
|
3459
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<TooltipDirective, "[tooltip]", never, { "tooltip": { "alias": "tooltip"; "required": false; }; "orientation": { "alias": "tooltipOrientation"; "required": false; }; }, {}, never, never, false, never>;
|
|
3451
3460
|
}
|
|
3452
3461
|
|
|
3453
3462
|
declare class TooltipComponent implements AfterViewInit, OnDestroy {
|
|
@@ -3457,21 +3466,32 @@ declare class TooltipComponent implements AfterViewInit, OnDestroy {
|
|
|
3457
3466
|
set hostElement(value: HTMLElement);
|
|
3458
3467
|
get hostElement(): HTMLElement;
|
|
3459
3468
|
toolTip: SafeHtml | string;
|
|
3469
|
+
orientation: CoDirection;
|
|
3460
3470
|
tooltipClosed: EventEmitter<void>;
|
|
3461
3471
|
showClass(): boolean;
|
|
3462
3472
|
top: number;
|
|
3463
3473
|
left: number;
|
|
3464
|
-
|
|
3474
|
+
get isTop(): boolean;
|
|
3475
|
+
get isBottom(): boolean;
|
|
3476
|
+
get isLeft(): boolean;
|
|
3477
|
+
get isRight(): boolean;
|
|
3465
3478
|
animate: boolean;
|
|
3479
|
+
private _resolvedOrientation;
|
|
3466
3480
|
private _hostElement;
|
|
3467
3481
|
private _documentClickListener;
|
|
3468
3482
|
constructor(_elementRef: ElementRef, _changeDetector: ChangeDetectorRef, _renderer: Renderer2);
|
|
3469
3483
|
ngAfterViewInit(): void;
|
|
3470
3484
|
ngOnDestroy(): void;
|
|
3471
3485
|
private _positionTooltip;
|
|
3486
|
+
private _resolveOrientation;
|
|
3487
|
+
private _fits;
|
|
3488
|
+
private _availableSpace;
|
|
3489
|
+
private _calculateLeft;
|
|
3490
|
+
private _calculateTop;
|
|
3491
|
+
private _positionArrow;
|
|
3472
3492
|
private closeTooltip;
|
|
3473
3493
|
static ɵfac: i0.ɵɵFactoryDeclaration<TooltipComponent, never>;
|
|
3474
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TooltipComponent, "co-tooltip", never, { "hostElement": { "alias": "hostElement"; "required": false; }; "toolTip": { "alias": "toolTip"; "required": false; }; }, { "tooltipClosed": "tooltipClosed"; }, never, never, false, never>;
|
|
3494
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TooltipComponent, "co-tooltip", never, { "hostElement": { "alias": "hostElement"; "required": false; }; "toolTip": { "alias": "toolTip"; "required": false; }; "orientation": { "alias": "orientation"; "required": false; }; }, { "tooltipClosed": "tooltipClosed"; }, never, never, false, never>;
|
|
3475
3495
|
}
|
|
3476
3496
|
|
|
3477
3497
|
declare class TooltipModule {
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
align-items: center;
|
|
11
11
|
column-gap: 10px;
|
|
12
12
|
padding: $co-tooltip-padding;
|
|
13
|
-
z-index:
|
|
13
|
+
z-index: $co-tooltip-z-index;
|
|
14
14
|
border-radius: $co-tooltip-border-radius;
|
|
15
15
|
border: $co-tooltip-border;
|
|
16
16
|
|
|
@@ -23,30 +23,73 @@
|
|
|
23
23
|
pointer-events: none;
|
|
24
24
|
position: absolute;
|
|
25
25
|
width: 0;
|
|
26
|
-
bottom: -20px;
|
|
27
26
|
}
|
|
28
27
|
|
|
29
28
|
&::after {
|
|
30
|
-
|
|
31
|
-
border-width: 10px;
|
|
29
|
+
border-width: $co-tooltip-arrow-size;
|
|
32
30
|
}
|
|
33
31
|
|
|
34
32
|
&::before {
|
|
35
|
-
|
|
36
|
-
border-width: 8px;
|
|
33
|
+
border-width: $co-tooltip-arrow-inner-size;
|
|
37
34
|
z-index: 1;
|
|
38
|
-
bottom: -16px;
|
|
39
35
|
}
|
|
36
|
+
|
|
37
|
+
@if not $co-tooltip-has-border {
|
|
38
|
+
&::after {
|
|
39
|
+
display: none;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// The arrow sits on the edge facing the host: --co-tooltip-arrow-center is the offset along that edge.
|
|
44
|
+
&.top {
|
|
45
|
+
&::after {
|
|
46
|
+
left: calc(#{$co-tooltip-arrow-center} - #{$co-tooltip-arrow-size});
|
|
47
|
+
bottom: calc(-2 * #{$co-tooltip-arrow-size});
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
&::before {
|
|
51
|
+
left: calc(#{$co-tooltip-arrow-center} - #{$co-tooltip-arrow-inner-size});
|
|
52
|
+
bottom: calc(-2 * #{$co-tooltip-arrow-inner-size});
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
40
56
|
&.bottom {
|
|
41
|
-
&::after
|
|
57
|
+
&::after {
|
|
58
|
+
left: calc(#{$co-tooltip-arrow-center} - #{$co-tooltip-arrow-size});
|
|
59
|
+
top: calc(-2 * #{$co-tooltip-arrow-size});
|
|
60
|
+
}
|
|
61
|
+
|
|
42
62
|
&::before {
|
|
43
|
-
|
|
63
|
+
left: calc(#{$co-tooltip-arrow-center} - #{$co-tooltip-arrow-inner-size});
|
|
64
|
+
top: calc(-2 * #{$co-tooltip-arrow-inner-size});
|
|
44
65
|
}
|
|
45
66
|
}
|
|
67
|
+
|
|
68
|
+
&.left {
|
|
69
|
+
&::after {
|
|
70
|
+
top: calc(#{$co-tooltip-arrow-center} - #{$co-tooltip-arrow-size});
|
|
71
|
+
right: calc(-2 * #{$co-tooltip-arrow-size});
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
&::before {
|
|
75
|
+
top: calc(#{$co-tooltip-arrow-center} - #{$co-tooltip-arrow-inner-size});
|
|
76
|
+
right: calc(-2 * #{$co-tooltip-arrow-inner-size});
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
&.right {
|
|
81
|
+
&::after {
|
|
82
|
+
top: calc(#{$co-tooltip-arrow-center} - #{$co-tooltip-arrow-size});
|
|
83
|
+
left: calc(-2 * #{$co-tooltip-arrow-size});
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
&::before {
|
|
87
|
+
top: calc(#{$co-tooltip-arrow-center} - #{$co-tooltip-arrow-inner-size});
|
|
88
|
+
left: calc(-2 * #{$co-tooltip-arrow-inner-size});
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
.title {
|
|
92
|
+
font-weight: $co-tooltip-title-font-weight;
|
|
93
|
+
}
|
|
46
94
|
}
|
|
47
|
-
//.validation-error-content {
|
|
48
|
-
// display: flex;
|
|
49
|
-
// flex-direction: row;
|
|
50
|
-
// align-items: center;
|
|
51
|
-
//}
|
|
52
95
|
}
|
|
@@ -1,8 +1,34 @@
|
|
|
1
|
+
@use "sass:list";
|
|
2
|
+
@use "sass:meta";
|
|
3
|
+
|
|
4
|
+
:root {
|
|
5
|
+
--co-tooltip-arrow-size: 10px;
|
|
6
|
+
--co-tooltip-arrow-inner-size: 8px;
|
|
7
|
+
--co-tooltip-arrow-center: 30px;
|
|
8
|
+
--co-tooltip-z-index: 9999999999;
|
|
9
|
+
// Read by TooltipDirective (getComputedStyle), not applied by CSS.
|
|
10
|
+
--co-tooltip-show-delay: 400ms;
|
|
11
|
+
--co-tooltip-auto-hide-delay: 10000ms; // 0 disables the auto-hide guard
|
|
12
|
+
}
|
|
13
|
+
|
|
1
14
|
$co-tooltip-font-family: $cc-font-family !default;
|
|
2
15
|
$co-tooltip-font-size: $cc-font-size-default !default;
|
|
3
16
|
$co-tooltip-padding: 10px !default;
|
|
4
|
-
$co-tooltip-background-color: $cc-color-
|
|
5
|
-
$co-tooltip-color:
|
|
6
|
-
$co-tooltip-border:
|
|
7
|
-
$co-tooltip-border-color:
|
|
17
|
+
$co-tooltip-background-color: $cc-color-tooltip-default !default;
|
|
18
|
+
$co-tooltip-color: white !default;
|
|
19
|
+
$co-tooltip-border: 1px solid !default;
|
|
20
|
+
$co-tooltip-border-color: gray !default;
|
|
8
21
|
$co-tooltip-border-radius: 5px !default;
|
|
22
|
+
$co-tooltip-arrow-size: var(--co-tooltip-arrow-size) !default;
|
|
23
|
+
$co-tooltip-arrow-inner-size: var(--co-tooltip-arrow-inner-size) !default;
|
|
24
|
+
$co-tooltip-arrow-center: var(--co-tooltip-arrow-center) !default;
|
|
25
|
+
$co-tooltip-z-index: var(--co-tooltip-z-index) !default;
|
|
26
|
+
|
|
27
|
+
// Derived from the border shorthand so the arrow rim follows whatever the consumer sets.
|
|
28
|
+
$co-tooltip-border-width: if(meta.type-of($co-tooltip-border) == list, list.nth($co-tooltip-border, 1), $co-tooltip-border) !default;
|
|
29
|
+
$co-tooltip-has-border: meta.type-of($co-tooltip-border-width) == number and $co-tooltip-border-width > 0 !default;
|
|
30
|
+
|
|
31
|
+
$co-tooltip-title-font-family: $cc-font-family !default;
|
|
32
|
+
$co-tooltip-title-font-size: $cc-font-size-default !default;
|
|
33
|
+
$co-tooltip-title-font-color: $co-tooltip-color !default;
|
|
34
|
+
$co-tooltip-title-font-weight: bold !default;
|
|
@@ -4,30 +4,49 @@
|
|
|
4
4
|
color: $co-tooltip-color;
|
|
5
5
|
border-color: $co-tooltip-border-color;
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
// Each orientation colours the border edge that forms the visible triangle.
|
|
8
|
+
&.top {
|
|
9
|
+
&::after {
|
|
10
|
+
border-top-color: $co-tooltip-border-color;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
&::before {
|
|
14
|
+
border-top-color: $co-tooltip-background-color;
|
|
15
|
+
}
|
|
10
16
|
}
|
|
11
17
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
18
|
+
&.bottom {
|
|
19
|
+
&::after {
|
|
20
|
+
border-bottom-color: $co-tooltip-border-color;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
&::before {
|
|
24
|
+
border-bottom-color: $co-tooltip-background-color;
|
|
25
|
+
}
|
|
15
26
|
}
|
|
16
27
|
|
|
17
|
-
|
|
28
|
+
&.left {
|
|
18
29
|
&::after {
|
|
19
|
-
|
|
30
|
+
border-left-color: $co-tooltip-border-color;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
&::before {
|
|
34
|
+
border-left-color: $co-tooltip-background-color;
|
|
20
35
|
}
|
|
21
36
|
}
|
|
22
|
-
|
|
37
|
+
|
|
38
|
+
&.right {
|
|
23
39
|
&::after {
|
|
24
|
-
border-
|
|
25
|
-
border-bottom-color: $co-tooltip-border-color;
|
|
40
|
+
border-right-color: $co-tooltip-border-color;
|
|
26
41
|
}
|
|
42
|
+
|
|
27
43
|
&::before {
|
|
28
|
-
border-
|
|
29
|
-
border-bottom-color: $co-tooltip-background-color;
|
|
44
|
+
border-right-color: $co-tooltip-background-color;
|
|
30
45
|
}
|
|
31
46
|
}
|
|
47
|
+
|
|
48
|
+
.title {
|
|
49
|
+
color: $co-tooltip-title-font-color;
|
|
50
|
+
}
|
|
32
51
|
}
|
|
33
52
|
}
|
|
@@ -48,6 +48,7 @@ $cc-color-text-main: #22313C !default;
|
|
|
48
48
|
$cc-color-input-positive: #d7ead7 !default;
|
|
49
49
|
$cc-color-input-important: $cc-color-light !default;
|
|
50
50
|
$cc-color-input-info: #e4e6eb !default;
|
|
51
|
+
$cc-color-tooltip-default: #2e3350 !default;
|
|
51
52
|
$cc-color-active-accent: #8faba6 !default;
|
|
52
53
|
$cc-color-less-light: #F7FAFA !default;
|
|
53
54
|
$cc-color-border: #CCCCCC !default;
|