@sebgroup/green-core 3.14.0 → 3.15.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.
@@ -83,6 +83,7 @@ __decorateClass([
83
83
  __decorateClass([
84
84
  styleExpressionProperty({
85
85
  ...forColorTokens("background"),
86
+ property: "--gds-avatar-background",
86
87
  selector: ".avatar"
87
88
  })
88
89
  ], GdsAvatar.prototype, "background", 2);
@@ -42,7 +42,10 @@ const style = css`
42
42
  user-select: none;
43
43
  box-sizing: border-box;
44
44
  overflow: hidden;
45
- background: var(--gds-sys-color-l3-neutral-01-2);
45
+ background: var(
46
+ --gds-avatar-background,
47
+ var(--gds-sys-color-l3-neutral-01-2)
48
+ );
46
49
  color: var(--gds-sys-color-content-neutral-01);
47
50
  width: var(--_size);
48
51
  height: var(--_size);
@@ -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`
@@ -74,7 +79,6 @@ export declare class GdsPagination extends GdsPagination_base {
74
79
  density: DensityMode;
75
80
  /**
76
81
  * The text summary to display on the left side (e.g. "1-10 of 100").
77
- * If a slot named "label" is provided, this property is ignored.
78
82
  */
79
83
  label: string;
80
84
  private _elInput?;
@@ -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