@sebgroup/green-core 2.24.1 → 2.25.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/components/popover/popover.component.d.ts +4 -0
- package/components/popover/popover.component.js +5 -1
- package/components/table/table.styles.js +1 -1
- package/custom-elements.json +15593 -15557
- package/gds-element.js +1 -1
- package/generated/react/index.d.ts +7 -7
- package/generated/react/index.js +7 -7
- package/generated/react/popover/index.d.ts +1 -0
- package/package.json +1 -1
- package/utils/helpers/custom-element-scoping.js +1 -1
|
@@ -58,6 +58,10 @@ export declare class GdsPopover extends GdsElement {
|
|
|
58
58
|
* Whether to use a modal dialog in mobile viewport.
|
|
59
59
|
*/
|
|
60
60
|
disableMobileStyles: boolean;
|
|
61
|
+
/**
|
|
62
|
+
* Whether to disable closing the popover when the page is scrolled.
|
|
63
|
+
*/
|
|
64
|
+
disableScrollClose: boolean;
|
|
61
65
|
/**
|
|
62
66
|
* Whether the popover should autofocus the first slotted child when opened.
|
|
63
67
|
*/
|
|
@@ -43,6 +43,7 @@ let GdsPopover = class extends GdsElement {
|
|
|
43
43
|
this.label = void 0;
|
|
44
44
|
this.placement = "bottom-start";
|
|
45
45
|
this.disableMobileStyles = false;
|
|
46
|
+
this.disableScrollClose = false;
|
|
46
47
|
this.autofocus = false;
|
|
47
48
|
this.calcMinWidth = (referenceEl) => `${referenceEl.offsetWidth}px`;
|
|
48
49
|
this.calcMaxWidth = (_referenceEl) => `auto`;
|
|
@@ -117,7 +118,7 @@ let GdsPopover = class extends GdsElement {
|
|
|
117
118
|
}
|
|
118
119
|
});
|
|
119
120
|
__privateAdd(this, _handlePageScroll, () => {
|
|
120
|
-
if (this.open && window.innerWidth > 767 && __privateGet(this, _dispatchUiStateEvent).call(this, "close")) {
|
|
121
|
+
if (this.open && !this.disableScrollClose && window.innerWidth > 767 && __privateGet(this, _dispatchUiStateEvent).call(this, "close")) {
|
|
121
122
|
this.open = false;
|
|
122
123
|
}
|
|
123
124
|
});
|
|
@@ -353,6 +354,9 @@ __decorateClass([
|
|
|
353
354
|
__decorateClass([
|
|
354
355
|
property({ type: Boolean })
|
|
355
356
|
], GdsPopover.prototype, "disableMobileStyles", 2);
|
|
357
|
+
__decorateClass([
|
|
358
|
+
property({ type: Boolean })
|
|
359
|
+
], GdsPopover.prototype, "disableScrollClose", 2);
|
|
356
360
|
__decorateClass([
|
|
357
361
|
property({ type: Boolean })
|
|
358
362
|
], GdsPopover.prototype, "autofocus", 2);
|
|
@@ -20,7 +20,7 @@ const TableStyles = css`
|
|
|
20
20
|
--table-header-padding-y: var(--gds-sys-space-xs);
|
|
21
21
|
--table-header-padding-x: var(--gds-sys-space-s);
|
|
22
22
|
--table-row-min-height: var(--gds-sys-space-xl);
|
|
23
|
-
--table-font-size: var(--gds-sys-text-detail-book-
|
|
23
|
+
--table-font-size: var(--gds-sys-text-detail-book-s);
|
|
24
24
|
--table-gap: var(--gds-sys-space-m);
|
|
25
25
|
--table-border-spacing: 0 var(--gds-sys-space-5xs);
|
|
26
26
|
--table-data-padding: var(--gds-sys-space-5xs) var(--gds-sys-space-4xs);
|