@sebgroup/green-core 3.12.2 → 3.12.3-rc.20260602103848399

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.
Files changed (43) hide show
  1. package/components/avatar/avatar.styles.js +4 -3
  2. package/components/pagination/pagination.component.d.ts +5 -0
  3. package/components/pagination/pagination.component.js +33 -2
  4. package/components/pagination/pagination.styles.js +4 -0
  5. package/components/segmented-control/segmented-control.component.js +1 -1
  6. package/components/table/table.component.d.ts +17 -1
  7. package/components/table/table.component.js +354 -10
  8. package/components/table/table.stories.data.d.ts +5 -0
  9. package/components/table/table.stories.data.js +479 -2
  10. package/components/table/table.styles.js +97 -0
  11. package/components/table/table.types.d.ts +6 -0
  12. package/custom-elements.json +6735 -6331
  13. package/gds-element.js +1 -1
  14. package/generated/locales/da.d.ts +2 -0
  15. package/generated/locales/da.js +2 -0
  16. package/generated/locales/de.d.ts +2 -0
  17. package/generated/locales/de.js +2 -0
  18. package/generated/locales/fi.d.ts +2 -0
  19. package/generated/locales/fi.js +2 -0
  20. package/generated/locales/fr.d.ts +2 -0
  21. package/generated/locales/fr.js +2 -0
  22. package/generated/locales/it.d.ts +2 -0
  23. package/generated/locales/it.js +2 -0
  24. package/generated/locales/nl.d.ts +2 -0
  25. package/generated/locales/nl.js +2 -0
  26. package/generated/locales/no.d.ts +2 -0
  27. package/generated/locales/no.js +2 -0
  28. package/generated/locales/sv.d.ts +2 -0
  29. package/generated/locales/sv.js +2 -0
  30. package/generated/mcp/components.json +1 -1
  31. package/generated/mcp/icons.json +1 -1
  32. package/generated/mcp/index.json +1 -1
  33. package/generated/mcp/pagination/api.md +1 -0
  34. package/generated/mcp/table/api.md +22 -0
  35. package/generated/mcp/tokens.json +5 -5
  36. package/generated/react/index.d.ts +11 -11
  37. package/generated/react/index.js +11 -11
  38. package/generated/react/pagination/index.d.ts +1 -0
  39. package/generated/react/table/index.d.ts +23 -1
  40. package/package.json +1 -1
  41. package/tokens/variables.light.css.js +1 -1
  42. package/utils/decorators/aria-forwarding.js +9 -5
  43. package/utils/helpers/custom-element-scoping.js +1 -1
@@ -24,8 +24,9 @@ const style = css`
24
24
  var(--gds-avatar-cutout-enabled, 0)
25
25
  );
26
26
  --_effective-overlap: calc(var(--_overlap) * var(--_grouped-enabled));
27
- --_effective-cutout-radius: calc(
28
- var(--_cutout-radius) * var(--_grouped-enabled)
27
+ --_effective-cutout-radius: max(
28
+ 0.001px,
29
+ calc(var(--_cutout-radius) * var(--_grouped-enabled))
29
30
  );
30
31
  --_cutout-right-offset: calc(
31
32
  var(--_size) / 2 + var(--_effective-overlap)
@@ -108,7 +109,7 @@ const style = css`
108
109
  mask-image: radial-gradient(
109
110
  circle var(--_effective-cutout-radius) at
110
111
  calc(100% + var(--_cutout-right-offset)) 50%,
111
- #0000 calc(var(--_effective-cutout-radius) - 0.1px),
112
+ #0000 max(0px, calc(var(--_effective-cutout-radius) - 0.1px)),
112
113
  #000 var(--_effective-cutout-radius)
113
114
  );
114
115
  }
@@ -67,6 +67,11 @@ export declare class GdsPagination extends GdsPagination_base {
67
67
  * Hide options
68
68
  */
69
69
  hideOptions: boolean;
70
+ /**
71
+ * Enables a compact navigation mode with only previous/next arrows
72
+ * and a centered "Page N" indicator.
73
+ */
74
+ simple: boolean;
70
75
  /**
71
76
  * Controls density mode on pagination
72
77
  * Accepts: `comfortable`, `compact`, `spacious`
@@ -4,7 +4,7 @@ import {
4
4
  __privateGet,
5
5
  __privateMethod
6
6
  } from "../../chunks/chunk.CAV4X6PU.js";
7
- var _pageCount, pageCount_get, _config, config_get, _getVisiblePages, getVisiblePages_fn, _renderPageButton, renderPageButton_fn, _renderPageButtons, renderPageButtons_fn, _renderJumpFirstButton, renderJumpFirstButton_fn, _renderPreviousButton, renderPreviousButton_fn, _renderNextButton, renderNextButton_fn, _renderJumpLastButton, renderJumpLastButton_fn, _renderNavigationControls, renderNavigationControls_fn, _renderPageSizeOption, renderPageSizeOption_fn, _renderPageSizeMenu, renderPageSizeMenu_fn, _renderLabel, renderLabel_fn, _handlePageChange, handlePageChange_fn, _handlePageSizeMenuClick, handlePageSizeMenuClick_fn, _handlePopoverStateChange, handlePopoverStateChange_fn, _handleCustomPageInput, handleCustomPageInput_fn;
7
+ var _pageCount, pageCount_get, _config, config_get, _getVisiblePages, getVisiblePages_fn, _renderPageButton, renderPageButton_fn, _renderPageButtons, renderPageButtons_fn, _renderJumpFirstButton, renderJumpFirstButton_fn, _renderPreviousButton, renderPreviousButton_fn, _renderNextButton, renderNextButton_fn, _renderJumpLastButton, renderJumpLastButton_fn, _renderNavigationControls, renderNavigationControls_fn, _renderSimpleNavigationControls, renderSimpleNavigationControls_fn, _renderPageSizeOption, renderPageSizeOption_fn, _renderPageSizeMenu, renderPageSizeMenu_fn, _renderLabel, renderLabel_fn, _handlePageChange, handlePageChange_fn, _handlePageSizeMenuClick, handlePageSizeMenuClick_fn, _handlePopoverStateChange, handlePopoverStateChange_fn, _handleCustomPageInput, handleCustomPageInput_fn;
8
8
  import { localized, msg } from "@lit/localize";
9
9
  import { nothing } from "lit";
10
10
  import { property, query, state } from "lit/decorators.js";
@@ -83,6 +83,7 @@ let GdsPagination = class extends withMarginProps(
83
83
  __privateAdd(this, _renderNextButton);
84
84
  __privateAdd(this, _renderJumpLastButton);
85
85
  __privateAdd(this, _renderNavigationControls);
86
+ __privateAdd(this, _renderSimpleNavigationControls);
86
87
  __privateAdd(this, _renderPageSizeOption);
87
88
  __privateAdd(this, _renderPageSizeMenu);
88
89
  __privateAdd(this, _renderLabel);
@@ -96,6 +97,7 @@ let GdsPagination = class extends withMarginProps(
96
97
  this.options = [5, 10, 25, 50];
97
98
  this.jump = false;
98
99
  this.hideOptions = false;
100
+ this.simple = false;
99
101
  this.density = "comfortable";
100
102
  this.label = "";
101
103
  this._isMobile = false;
@@ -126,7 +128,10 @@ let GdsPagination = class extends withMarginProps(
126
128
  justify-content="${showNavigation ? "space-between" : "flex-end"}"
127
129
  >
128
130
  ${[
129
- when(showNavigation, () => __privateMethod(this, _renderNavigationControls, renderNavigationControls_fn).call(this)),
131
+ when(
132
+ showNavigation,
133
+ () => this.simple ? __privateMethod(this, _renderSimpleNavigationControls, renderSimpleNavigationControls_fn).call(this) : __privateMethod(this, _renderNavigationControls, renderNavigationControls_fn).call(this)
134
+ ),
130
135
  pageSizeMenu
131
136
  ]}
132
137
  </gds-flex>
@@ -325,6 +330,29 @@ renderNavigationControls_fn = function() {
325
330
  </gds-flex>
326
331
  `;
327
332
  };
333
+ _renderSimpleNavigationControls = new WeakSet();
334
+ renderSimpleNavigationControls_fn = function() {
335
+ return html`
336
+ <gds-flex
337
+ gap="${__privateGet(this, _config, config_get).navGap}"
338
+ align-items="center"
339
+ class="navigation-controls navigation-controls-simple"
340
+ justify-content="center; m{flex-end}"
341
+ flex="1"
342
+ >
343
+ ${__privateMethod(this, _renderPreviousButton, renderPreviousButton_fn).call(this)}
344
+ <gds-text
345
+ font="${__privateGet(this, _config, config_get).font}"
346
+ color="neutral-01"
347
+ aria-live="polite"
348
+ aria-atomic="true"
349
+ >
350
+ ${msg("Page")} ${this.page}
351
+ </gds-text>
352
+ ${__privateMethod(this, _renderNextButton, renderNextButton_fn).call(this)}
353
+ </gds-flex>
354
+ `;
355
+ };
328
356
  _renderPageSizeOption = new WeakSet();
329
357
  renderPageSizeOption_fn = function(size) {
330
358
  const isSelected = this.rows === size;
@@ -458,6 +486,9 @@ __decorateClass([
458
486
  reflect: false
459
487
  })
460
488
  ], GdsPagination.prototype, "hideOptions", 2);
489
+ __decorateClass([
490
+ property({ type: Boolean, reflect: false })
491
+ ], GdsPagination.prototype, "simple", 2);
461
492
  __decorateClass([
462
493
  property({ reflect: false })
463
494
  ], GdsPagination.prototype, "density", 2);
@@ -13,6 +13,10 @@ const PaginationStyles = css`
13
13
  padding: 0;
14
14
  aspect-ratio: 1/1;
15
15
  }
16
+
17
+ nav {
18
+ width: 100%;
19
+ }
16
20
  `;
17
21
  export {
18
22
  PaginationStyles
@@ -143,7 +143,7 @@ let GdsSegmentedControl = class extends withLayoutChildProps(
143
143
  ?inert=${!this._showPrevButton}
144
144
  id="btn-prev"
145
145
  @click=${__privateGet(this, _scrollLeft)}
146
- aria-label=${msg("Scroll right")}
146
+ aria-label=${msg("Scroll left")}
147
147
  >
148
148
  <gds-icon-chevron-left />
149
149
  </button>
@@ -1,6 +1,7 @@
1
1
  import { GdsElement } from '../../gds-element';
2
2
  import * as Types from './table.types';
3
3
  type TableVariant = 'neutral-01' | 'neutral-02' | 'neutral-02-outlined';
4
+ declare const GdsTable_base: (new (...args: any[]) => import("../../utils/mixins/declarative-layout-mixins").SizeXProps) & (new (...args: any[]) => import("../../utils/mixins/declarative-layout-mixins").MarginProps) & (new (...args: any[]) => import("../../utils/mixins/declarative-layout-mixins").PaddingProps) & (new (...args: any[]) => import("../../utils/mixins/declarative-layout-mixins").LayoutChildProps) & typeof GdsElement;
4
5
  /**
5
6
  * @element gds-table
6
7
  * @status beta
@@ -23,7 +24,7 @@ type TableVariant = 'neutral-01' | 'neutral-02' | 'neutral-02-outlined';
23
24
  * @event gds-table-selection - Fired when row selection changes.
24
25
  * @event gds-table-expand-change - Fired when row expansion changes. Detail: `{ index: number, row: T, expanded: boolean, expandedIndices: number[] }`
25
26
  */
26
- export declare class GdsTable<T extends Types.Row = Types.Row> extends GdsElement {
27
+ export declare class GdsTable<T extends Types.Row = Types.Row> extends GdsTable_base {
27
28
  #private;
28
29
  static styles: (import("lit").CSSResult | import("lit").CSSResult[])[];
29
30
  /**
@@ -98,10 +99,23 @@ export declare class GdsTable<T extends Types.Row = Types.Row> extends GdsElemen
98
99
  * Applies alternating row background colors.
99
100
  */
100
101
  striped: boolean;
102
+ /**
103
+ * Uses compact footer pagination with previous/next arrows and current page only.
104
+ * Hides the default total summary text and page number buttons.
105
+ */
106
+ simplePagination: boolean;
101
107
  /**
102
108
  * Disables data caching mechanism.
103
109
  */
104
110
  nocache: boolean;
111
+ /**
112
+ * Enables row virtualization for large datasets.
113
+ * Only rows visible within the scroll viewport (plus a small overscan buffer)
114
+ * are rendered in the DOM. Rows that leave the viewport are removed from the
115
+ * DOM entirely; rows that enter are rendered immediately with no animation delay.
116
+ * Pair with a fixed `height` to constrain the scroll container.
117
+ */
118
+ virtualized: boolean;
105
119
  /**
106
120
  * Configures a table footer row (`<tfoot>`) at the bottom of the table.
107
121
  * The footer row provides slot insertion points for each visible column,
@@ -162,7 +176,9 @@ export declare class GdsTable<T extends Types.Row = Types.Row> extends GdsElemen
162
176
  */
163
177
  private _onRowsChange;
164
178
  private _onColumnsChange;
179
+ private _onVirtualizedChange;
165
180
  connectedCallback(): void;
181
+ disconnectedCallback(): void;
166
182
  updated(changedProperties: Map<string, unknown>): void;
167
183
  render(): any;
168
184
  /**