@sebgroup/green-core 2.24.1 → 2.25.0-rc.20260121143704368
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.component.d.ts +2 -0
- package/components/table/table.component.js +14 -0
- package/components/table/table.styles.js +1 -1
- package/custom-elements.json +13630 -13564
- 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/generated/react/table/index.d.ts +4 -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);
|
|
@@ -12,6 +12,8 @@ import * as Types from './table.types';
|
|
|
12
12
|
* @slot `empty` - Custom empty state content when no data is available.
|
|
13
13
|
* @slot `no-results` - Custom no results content when search returns empty.
|
|
14
14
|
*
|
|
15
|
+
* @event gds-page-change - Fired when the active page changes. Detail: `{ page: number }`
|
|
16
|
+
* @event gds-rows-change - Fired when the rows per page value changes. Detail: `{ rows: number }`
|
|
15
17
|
* @event gds-table-data-loaded - Fired when data is successfully loaded.
|
|
16
18
|
* @event gds-table-data-error - Fired when data loading fails.
|
|
17
19
|
* @event gds-table-selection - Fired when row selection changes.
|
|
@@ -896,6 +896,13 @@ handlePageChange_fn = async function(e) {
|
|
|
896
896
|
...this._view,
|
|
897
897
|
page: e.detail.page
|
|
898
898
|
};
|
|
899
|
+
this.dispatchEvent(
|
|
900
|
+
new CustomEvent("gds-page-change", {
|
|
901
|
+
detail: e.detail,
|
|
902
|
+
bubbles: true,
|
|
903
|
+
composed: true
|
|
904
|
+
})
|
|
905
|
+
);
|
|
899
906
|
await __privateMethod(this, _GdsTable_instances, loadData_fn).call(this);
|
|
900
907
|
};
|
|
901
908
|
handlePageSizeChange_fn = async function(e) {
|
|
@@ -904,6 +911,13 @@ handlePageSizeChange_fn = async function(e) {
|
|
|
904
911
|
rows: e.detail.rows,
|
|
905
912
|
page: 1
|
|
906
913
|
};
|
|
914
|
+
this.dispatchEvent(
|
|
915
|
+
new CustomEvent("gds-rows-change", {
|
|
916
|
+
detail: e.detail,
|
|
917
|
+
bubbles: true,
|
|
918
|
+
composed: true
|
|
919
|
+
})
|
|
920
|
+
);
|
|
907
921
|
await __privateMethod(this, _GdsTable_instances, loadData_fn).call(this);
|
|
908
922
|
};
|
|
909
923
|
/**
|
|
@@ -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);
|