@momentum-design/components 0.121.6 → 0.121.7
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/dist/browser/index.js +3 -3
- package/dist/browser/index.js.map +2 -2
- package/dist/components/popover/popover.component.d.ts +5 -5
- package/dist/components/popover/popover.component.js +24 -17
- package/dist/components/popover/popover.constants.d.ts +1 -1
- package/dist/components/popover/popover.constants.js +1 -1
- package/dist/custom-elements.json +30 -30
- package/package.json +1 -1
|
@@ -317,12 +317,12 @@ declare class Popover extends Popover_base {
|
|
|
317
317
|
*/
|
|
318
318
|
disableAriaExpanded: boolean;
|
|
319
319
|
/**
|
|
320
|
-
*
|
|
321
|
-
*
|
|
322
|
-
*
|
|
323
|
-
*
|
|
320
|
+
* Controls the visibility of a connected tooltip when this popover is open.
|
|
321
|
+
* - If set to `true`, the tooltip remains open alongside the popover.
|
|
322
|
+
* - If set to `false`, the tooltip will be closed when the popover opens.
|
|
323
|
+
* Useful for scenarios where both a popover and a tooltip are linked to the same trigger element.
|
|
324
324
|
*/
|
|
325
|
-
|
|
325
|
+
keepConnectedTooltipOpen: boolean;
|
|
326
326
|
arrowElement: HTMLElement | null;
|
|
327
327
|
/** @internal */
|
|
328
328
|
private hoverTimer;
|
|
@@ -331,12 +331,12 @@ class Popover extends BackdropMixin(PreventScrollMixin(FocusTrapMixin(Component)
|
|
|
331
331
|
*/
|
|
332
332
|
this.disableAriaExpanded = DEFAULTS.DISABLE_ARIA_EXPANDED;
|
|
333
333
|
/**
|
|
334
|
-
*
|
|
335
|
-
*
|
|
336
|
-
*
|
|
337
|
-
*
|
|
334
|
+
* Controls the visibility of a connected tooltip when this popover is open.
|
|
335
|
+
* - If set to `true`, the tooltip remains open alongside the popover.
|
|
336
|
+
* - If set to `false`, the tooltip will be closed when the popover opens.
|
|
337
|
+
* Useful for scenarios where both a popover and a tooltip are linked to the same trigger element.
|
|
338
338
|
*/
|
|
339
|
-
this.
|
|
339
|
+
this.keepConnectedTooltipOpen = DEFAULTS.KEEP_CONNECTED_TOOLTIP_OPEN;
|
|
340
340
|
this.arrowElement = null;
|
|
341
341
|
/** @internal */
|
|
342
342
|
this.hoverTimer = null;
|
|
@@ -688,7 +688,7 @@ class Popover extends BackdropMixin(PreventScrollMixin(FocusTrapMixin(Component)
|
|
|
688
688
|
(_b = this.floatingUICleanupFunction) === null || _b === void 0 ? void 0 : _b.call(this);
|
|
689
689
|
// clean timer if there is one set:
|
|
690
690
|
this.cancelCloseDelay();
|
|
691
|
-
if (this.
|
|
691
|
+
if (!this.keepConnectedTooltipOpen) {
|
|
692
692
|
if (this.connectedTooltip) {
|
|
693
693
|
this.connectedTooltip.shouldSuppressOpening = false;
|
|
694
694
|
}
|
|
@@ -778,7 +778,7 @@ class Popover extends BackdropMixin(PreventScrollMixin(FocusTrapMixin(Component)
|
|
|
778
778
|
if (popoverStack.peek() !== this) {
|
|
779
779
|
popoverStack.push(this);
|
|
780
780
|
}
|
|
781
|
-
if (this.
|
|
781
|
+
if (!this.keepConnectedTooltipOpen) {
|
|
782
782
|
// If this popover gets visible and keepConnectedTooltipsClosed is true,
|
|
783
783
|
// we need to close the connected tooltip.
|
|
784
784
|
if (this.connectedTooltip) {
|
|
@@ -844,7 +844,7 @@ class Popover extends BackdropMixin(PreventScrollMixin(FocusTrapMixin(Component)
|
|
|
844
844
|
if (this.focusBackToTrigger) {
|
|
845
845
|
triggerElement === null || triggerElement === void 0 ? void 0 : triggerElement.focus();
|
|
846
846
|
}
|
|
847
|
-
if (this.
|
|
847
|
+
if (!this.keepConnectedTooltipOpen) {
|
|
848
848
|
if (this.connectedTooltip) {
|
|
849
849
|
this.connectedTooltip.shouldSuppressOpening = false;
|
|
850
850
|
}
|
|
@@ -880,13 +880,20 @@ class Popover extends BackdropMixin(PreventScrollMixin(FocusTrapMixin(Component)
|
|
|
880
880
|
return placement;
|
|
881
881
|
}
|
|
882
882
|
switch (placement) {
|
|
883
|
-
case POPOVER_PLACEMENT.LEFT:
|
|
884
|
-
|
|
885
|
-
case POPOVER_PLACEMENT.
|
|
886
|
-
|
|
887
|
-
case POPOVER_PLACEMENT.
|
|
888
|
-
|
|
889
|
-
|
|
883
|
+
case POPOVER_PLACEMENT.LEFT:
|
|
884
|
+
return POPOVER_PLACEMENT.RIGHT;
|
|
885
|
+
case POPOVER_PLACEMENT.LEFT_START:
|
|
886
|
+
return POPOVER_PLACEMENT.RIGHT_START;
|
|
887
|
+
case POPOVER_PLACEMENT.LEFT_END:
|
|
888
|
+
return POPOVER_PLACEMENT.RIGHT_END;
|
|
889
|
+
case POPOVER_PLACEMENT.RIGHT:
|
|
890
|
+
return POPOVER_PLACEMENT.LEFT;
|
|
891
|
+
case POPOVER_PLACEMENT.RIGHT_START:
|
|
892
|
+
return POPOVER_PLACEMENT.LEFT_START;
|
|
893
|
+
case POPOVER_PLACEMENT.RIGHT_END:
|
|
894
|
+
return POPOVER_PLACEMENT.LEFT_END;
|
|
895
|
+
default:
|
|
896
|
+
return placement;
|
|
890
897
|
}
|
|
891
898
|
}
|
|
892
899
|
render() {
|
|
@@ -1047,7 +1054,7 @@ __decorate([
|
|
|
1047
1054
|
__metadata("design:type", Boolean)
|
|
1048
1055
|
], Popover.prototype, "disableAriaExpanded", void 0);
|
|
1049
1056
|
__decorate([
|
|
1050
|
-
property({ type: Boolean, reflect: true, attribute: 'keep-connected-tooltip-
|
|
1057
|
+
property({ type: Boolean, reflect: true, attribute: 'keep-connected-tooltip-open' }),
|
|
1051
1058
|
__metadata("design:type", Boolean)
|
|
1052
|
-
], Popover.prototype, "
|
|
1059
|
+
], Popover.prototype, "keepConnectedTooltipOpen", void 0);
|
|
1053
1060
|
export default Popover;
|
|
@@ -54,7 +54,7 @@ declare const DEFAULTS: {
|
|
|
54
54
|
readonly Z_INDEX: 1000;
|
|
55
55
|
readonly DISABLE_ARIA_EXPANDED: false;
|
|
56
56
|
readonly PROPAGATE_EVENT_ON_ESCAPE: false;
|
|
57
|
-
readonly
|
|
57
|
+
readonly KEEP_CONNECTED_TOOLTIP_OPEN: false;
|
|
58
58
|
readonly IS_BACKDROP_INVISIBLE: true;
|
|
59
59
|
};
|
|
60
60
|
export { TAG_NAME, POPOVER_PLACEMENT, COLOR, STRATEGY, TRIGGER, DEFAULTS };
|
|
@@ -56,7 +56,7 @@ const DEFAULTS = {
|
|
|
56
56
|
Z_INDEX: 1000,
|
|
57
57
|
DISABLE_ARIA_EXPANDED: false,
|
|
58
58
|
PROPAGATE_EVENT_ON_ESCAPE: false,
|
|
59
|
-
|
|
59
|
+
KEEP_CONNECTED_TOOLTIP_OPEN: false,
|
|
60
60
|
IS_BACKDROP_INVISIBLE: true,
|
|
61
61
|
};
|
|
62
62
|
export { TAG_NAME, POPOVER_PLACEMENT, COLOR, STRATEGY, TRIGGER, DEFAULTS };
|
|
@@ -12822,12 +12822,12 @@
|
|
|
12822
12822
|
},
|
|
12823
12823
|
{
|
|
12824
12824
|
"kind": "field",
|
|
12825
|
-
"name": "
|
|
12825
|
+
"name": "keepConnectedTooltipOpen",
|
|
12826
12826
|
"type": {
|
|
12827
12827
|
"text": "boolean"
|
|
12828
12828
|
},
|
|
12829
|
-
"description": "
|
|
12830
|
-
"attribute": "keep-connected-tooltip-
|
|
12829
|
+
"description": "Controls the visibility of a connected tooltip when this popover is open.\n- If set to `true`, the tooltip remains open alongside the popover.\n- If set to `false`, the tooltip will be closed when the popover opens.\nUseful for scenarios where both a popover and a tooltip are linked to the same trigger element.",
|
|
12830
|
+
"attribute": "keep-connected-tooltip-open",
|
|
12831
12831
|
"reflects": true,
|
|
12832
12832
|
"inheritedFrom": {
|
|
12833
12833
|
"name": "Popover",
|
|
@@ -13594,12 +13594,12 @@
|
|
|
13594
13594
|
}
|
|
13595
13595
|
},
|
|
13596
13596
|
{
|
|
13597
|
-
"name": "keep-connected-tooltip-
|
|
13597
|
+
"name": "keep-connected-tooltip-open",
|
|
13598
13598
|
"type": {
|
|
13599
13599
|
"text": "boolean"
|
|
13600
13600
|
},
|
|
13601
|
-
"description": "
|
|
13602
|
-
"fieldName": "
|
|
13601
|
+
"description": "Controls the visibility of a connected tooltip when this popover is open.\n- If set to `true`, the tooltip remains open alongside the popover.\n- If set to `false`, the tooltip will be closed when the popover opens.\nUseful for scenarios where both a popover and a tooltip are linked to the same trigger element.",
|
|
13602
|
+
"fieldName": "keepConnectedTooltipOpen",
|
|
13603
13603
|
"inheritedFrom": {
|
|
13604
13604
|
"name": "Popover",
|
|
13605
13605
|
"module": "src/components/popover/popover.component.ts"
|
|
@@ -27974,12 +27974,12 @@
|
|
|
27974
27974
|
},
|
|
27975
27975
|
{
|
|
27976
27976
|
"kind": "field",
|
|
27977
|
-
"name": "
|
|
27977
|
+
"name": "keepConnectedTooltipOpen",
|
|
27978
27978
|
"type": {
|
|
27979
27979
|
"text": "boolean"
|
|
27980
27980
|
},
|
|
27981
|
-
"description": "
|
|
27982
|
-
"attribute": "keep-connected-tooltip-
|
|
27981
|
+
"description": "Controls the visibility of a connected tooltip when this popover is open.\n- If set to `true`, the tooltip remains open alongside the popover.\n- If set to `false`, the tooltip will be closed when the popover opens.\nUseful for scenarios where both a popover and a tooltip are linked to the same trigger element.",
|
|
27982
|
+
"attribute": "keep-connected-tooltip-open",
|
|
27983
27983
|
"reflects": true,
|
|
27984
27984
|
"inheritedFrom": {
|
|
27985
27985
|
"name": "Popover",
|
|
@@ -28704,12 +28704,12 @@
|
|
|
28704
28704
|
}
|
|
28705
28705
|
},
|
|
28706
28706
|
{
|
|
28707
|
-
"name": "keep-connected-tooltip-
|
|
28707
|
+
"name": "keep-connected-tooltip-open",
|
|
28708
28708
|
"type": {
|
|
28709
28709
|
"text": "boolean"
|
|
28710
28710
|
},
|
|
28711
|
-
"description": "
|
|
28712
|
-
"fieldName": "
|
|
28711
|
+
"description": "Controls the visibility of a connected tooltip when this popover is open.\n- If set to `true`, the tooltip remains open alongside the popover.\n- If set to `false`, the tooltip will be closed when the popover opens.\nUseful for scenarios where both a popover and a tooltip are linked to the same trigger element.",
|
|
28712
|
+
"fieldName": "keepConnectedTooltipOpen",
|
|
28713
28713
|
"inheritedFrom": {
|
|
28714
28714
|
"name": "Popover",
|
|
28715
28715
|
"module": "src/components/popover/popover.component.ts"
|
|
@@ -33309,12 +33309,12 @@
|
|
|
33309
33309
|
},
|
|
33310
33310
|
{
|
|
33311
33311
|
"kind": "field",
|
|
33312
|
-
"name": "
|
|
33312
|
+
"name": "keepConnectedTooltipOpen",
|
|
33313
33313
|
"type": {
|
|
33314
33314
|
"text": "boolean"
|
|
33315
33315
|
},
|
|
33316
|
-
"description": "
|
|
33317
|
-
"attribute": "keep-connected-tooltip-
|
|
33316
|
+
"description": "Controls the visibility of a connected tooltip when this popover is open.\n- If set to `true`, the tooltip remains open alongside the popover.\n- If set to `false`, the tooltip will be closed when the popover opens.\nUseful for scenarios where both a popover and a tooltip are linked to the same trigger element.",
|
|
33317
|
+
"attribute": "keep-connected-tooltip-open",
|
|
33318
33318
|
"reflects": true
|
|
33319
33319
|
},
|
|
33320
33320
|
{
|
|
@@ -34338,12 +34338,12 @@
|
|
|
34338
34338
|
"fieldName": "disableAriaExpanded"
|
|
34339
34339
|
},
|
|
34340
34340
|
{
|
|
34341
|
-
"name": "keep-connected-tooltip-
|
|
34341
|
+
"name": "keep-connected-tooltip-open",
|
|
34342
34342
|
"type": {
|
|
34343
34343
|
"text": "boolean"
|
|
34344
34344
|
},
|
|
34345
|
-
"description": "
|
|
34346
|
-
"fieldName": "
|
|
34345
|
+
"description": "Controls the visibility of a connected tooltip when this popover is open.\n- If set to `true`, the tooltip remains open alongside the popover.\n- If set to `false`, the tooltip will be closed when the popover opens.\nUseful for scenarios where both a popover and a tooltip are linked to the same trigger element.",
|
|
34346
|
+
"fieldName": "keepConnectedTooltipOpen"
|
|
34347
34347
|
},
|
|
34348
34348
|
{
|
|
34349
34349
|
"name": "should-focus-trap-wrap",
|
|
@@ -47989,12 +47989,12 @@
|
|
|
47989
47989
|
},
|
|
47990
47990
|
{
|
|
47991
47991
|
"kind": "field",
|
|
47992
|
-
"name": "
|
|
47992
|
+
"name": "keepConnectedTooltipOpen",
|
|
47993
47993
|
"type": {
|
|
47994
47994
|
"text": "boolean"
|
|
47995
47995
|
},
|
|
47996
|
-
"description": "
|
|
47997
|
-
"attribute": "keep-connected-tooltip-
|
|
47996
|
+
"description": "Controls the visibility of a connected tooltip when this popover is open.\n- If set to `true`, the tooltip remains open alongside the popover.\n- If set to `false`, the tooltip will be closed when the popover opens.\nUseful for scenarios where both a popover and a tooltip are linked to the same trigger element.",
|
|
47997
|
+
"attribute": "keep-connected-tooltip-open",
|
|
47998
47998
|
"reflects": true,
|
|
47999
47999
|
"inheritedFrom": {
|
|
48000
48000
|
"name": "Popover",
|
|
@@ -48769,12 +48769,12 @@
|
|
|
48769
48769
|
}
|
|
48770
48770
|
},
|
|
48771
48771
|
{
|
|
48772
|
-
"name": "keep-connected-tooltip-
|
|
48772
|
+
"name": "keep-connected-tooltip-open",
|
|
48773
48773
|
"type": {
|
|
48774
48774
|
"text": "boolean"
|
|
48775
48775
|
},
|
|
48776
|
-
"description": "
|
|
48777
|
-
"fieldName": "
|
|
48776
|
+
"description": "Controls the visibility of a connected tooltip when this popover is open.\n- If set to `true`, the tooltip remains open alongside the popover.\n- If set to `false`, the tooltip will be closed when the popover opens.\nUseful for scenarios where both a popover and a tooltip are linked to the same trigger element.",
|
|
48777
|
+
"fieldName": "keepConnectedTooltipOpen",
|
|
48778
48778
|
"inheritedFrom": {
|
|
48779
48779
|
"name": "Popover",
|
|
48780
48780
|
"module": "src/components/popover/popover.component.ts"
|
|
@@ -50060,12 +50060,12 @@
|
|
|
50060
50060
|
},
|
|
50061
50061
|
{
|
|
50062
50062
|
"kind": "field",
|
|
50063
|
-
"name": "
|
|
50063
|
+
"name": "keepConnectedTooltipOpen",
|
|
50064
50064
|
"type": {
|
|
50065
50065
|
"text": "boolean"
|
|
50066
50066
|
},
|
|
50067
|
-
"description": "
|
|
50068
|
-
"attribute": "keep-connected-tooltip-
|
|
50067
|
+
"description": "Controls the visibility of a connected tooltip when this popover is open.\n- If set to `true`, the tooltip remains open alongside the popover.\n- If set to `false`, the tooltip will be closed when the popover opens.\nUseful for scenarios where both a popover and a tooltip are linked to the same trigger element.",
|
|
50068
|
+
"attribute": "keep-connected-tooltip-open",
|
|
50069
50069
|
"reflects": true,
|
|
50070
50070
|
"inheritedFrom": {
|
|
50071
50071
|
"name": "Popover",
|
|
@@ -50841,12 +50841,12 @@
|
|
|
50841
50841
|
}
|
|
50842
50842
|
},
|
|
50843
50843
|
{
|
|
50844
|
-
"name": "keep-connected-tooltip-
|
|
50844
|
+
"name": "keep-connected-tooltip-open",
|
|
50845
50845
|
"type": {
|
|
50846
50846
|
"text": "boolean"
|
|
50847
50847
|
},
|
|
50848
|
-
"description": "
|
|
50849
|
-
"fieldName": "
|
|
50848
|
+
"description": "Controls the visibility of a connected tooltip when this popover is open.\n- If set to `true`, the tooltip remains open alongside the popover.\n- If set to `false`, the tooltip will be closed when the popover opens.\nUseful for scenarios where both a popover and a tooltip are linked to the same trigger element.",
|
|
50849
|
+
"fieldName": "keepConnectedTooltipOpen",
|
|
50850
50850
|
"inheritedFrom": {
|
|
50851
50851
|
"name": "Popover",
|
|
50852
50852
|
"module": "src/components/popover/popover.component.ts"
|