@sbb-esta/lyne-elements 3.3.2 → 3.5.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.
Files changed (108) hide show
  1. package/core/i18n/i18n.d.ts +5 -0
  2. package/core/i18n/i18n.d.ts.map +1 -1
  3. package/core/i18n/i18n.js +108 -84
  4. package/core/i18n.js +84 -80
  5. package/core/mixins/element-internals-mixin.js +6 -6
  6. package/core/mixins/form-associated-input-mixin.d.ts +1 -0
  7. package/core/mixins/form-associated-input-mixin.d.ts.map +1 -1
  8. package/core/mixins/form-associated-input-mixin.js +2 -2
  9. package/core/styles/core/mediaqueries.scss +1 -1
  10. package/core/styles/core.scss +34 -1
  11. package/core/styles/mixins/typo.scss +88 -41
  12. package/core/styles/node_modules_@sbb-esta_lyne-design-tokens_dist_scss_sbb-variables.scss +530 -0
  13. package/core/styles/node_modules_@sbb-esta_lyne-design-tokens_dist_scss_sbb-variables_css--mixin.scss +1123 -0
  14. package/core.css +30 -0
  15. package/custom-elements.json +863 -147
  16. package/date-input/date-input.component.d.ts +5 -4
  17. package/date-input/date-input.component.d.ts.map +1 -1
  18. package/date-input/date-input.component.js +19 -21
  19. package/development/core/i18n/i18n.d.ts +5 -0
  20. package/development/core/i18n/i18n.d.ts.map +1 -1
  21. package/development/core/i18n/i18n.js +38 -10
  22. package/development/core/i18n.js +5 -1
  23. package/development/core/mixins/element-internals-mixin.js +3 -3
  24. package/development/core/mixins/form-associated-input-mixin.d.ts +1 -0
  25. package/development/core/mixins/form-associated-input-mixin.d.ts.map +1 -1
  26. package/development/core/mixins/form-associated-input-mixin.js +3 -2
  27. package/development/date-input/date-input.component.d.ts +5 -4
  28. package/development/date-input/date-input.component.d.ts.map +1 -1
  29. package/development/date-input/date-input.component.js +5 -8
  30. package/development/dialog/dialog/dialog.component.d.ts +2 -0
  31. package/development/dialog/dialog/dialog.component.d.ts.map +1 -1
  32. package/development/dialog/dialog/dialog.component.js +6 -2
  33. package/development/dialog/dialog-title/dialog-title.component.js +2 -6
  34. package/development/file-selector/common/file-selector-common.d.ts +2 -1
  35. package/development/file-selector/common/file-selector-common.d.ts.map +1 -1
  36. package/development/file-selector/common/file-selector-common.js +64 -19
  37. package/development/file-selector/common.js +1 -1
  38. package/development/file-selector/file-selector/file-selector.component.d.ts.map +1 -1
  39. package/development/file-selector/file-selector/file-selector.component.js +12 -17
  40. package/development/file-selector/file-selector-dropzone/file-selector-dropzone.component.d.ts +0 -7
  41. package/development/file-selector/file-selector-dropzone/file-selector-dropzone.component.d.ts.map +1 -1
  42. package/development/file-selector/file-selector-dropzone/file-selector-dropzone.component.js +32 -76
  43. package/development/{file-selector-common-csww18o8.js → file-selector-common-BxXdRZxt.js} +3 -3
  44. package/development/file-selector.js +1 -1
  45. package/development/form-field/form-field/form-field.component.d.ts.map +1 -1
  46. package/development/form-field/form-field/form-field.component.js +4 -4
  47. package/development/navigation/common/navigation-action-common.js +5 -8
  48. package/development/navigation/navigation/navigation.component.js +21 -4
  49. package/development/navigation/navigation-marker/navigation-marker.component.js +5 -8
  50. package/development/navigation/navigation-section/navigation-section.component.js +6 -19
  51. package/development/paginator/common/paginator-common.d.ts +3 -0
  52. package/development/paginator/common/paginator-common.d.ts.map +1 -1
  53. package/development/paginator/common/paginator-common.js +68 -10
  54. package/development/paginator/compact-paginator/compact-paginator.component.d.ts.map +1 -1
  55. package/development/paginator/compact-paginator/compact-paginator.component.js +8 -3
  56. package/development/paginator/paginator/paginator.component.d.ts +5 -0
  57. package/development/paginator/paginator/paginator.component.d.ts.map +1 -1
  58. package/development/paginator/paginator/paginator.component.js +28 -6
  59. package/development/sidebar/sidebar-title/sidebar-title.component.js +1 -1
  60. package/development/tabs/tab-group/tab-group.component.js +3 -4
  61. package/development/time-input/time-input.component.d.ts +5 -4
  62. package/development/time-input/time-input.component.d.ts.map +1 -1
  63. package/development/time-input/time-input.component.js +5 -8
  64. package/development/title/title-base.js +14 -67
  65. package/development/title/title.component.js +17 -14
  66. package/development/toast/toast.component.js +6 -9
  67. package/development/train/train-wagon/train-wagon.component.js +6 -9
  68. package/dialog/dialog/dialog.component.d.ts +2 -0
  69. package/dialog/dialog/dialog.component.d.ts.map +1 -1
  70. package/dialog/dialog/dialog.component.js +14 -10
  71. package/dialog/dialog-title/dialog-title.component.js +1 -1
  72. package/file-selector/common/file-selector-common.d.ts +2 -1
  73. package/file-selector/common/file-selector-common.d.ts.map +1 -1
  74. package/file-selector/common/file-selector-common.js +88 -63
  75. package/file-selector/common.js +1 -1
  76. package/file-selector/file-selector/file-selector.component.d.ts.map +1 -1
  77. package/file-selector/file-selector/file-selector.component.js +26 -31
  78. package/file-selector/file-selector-dropzone/file-selector-dropzone.component.d.ts +0 -7
  79. package/file-selector/file-selector-dropzone/file-selector-dropzone.component.d.ts.map +1 -1
  80. package/file-selector/file-selector-dropzone/file-selector-dropzone.component.js +50 -74
  81. package/file-selector-common-Cn6U8goV.js +5 -0
  82. package/file-selector.js +1 -1
  83. package/form-field/form-field/form-field.component.d.ts.map +1 -1
  84. package/form-field/form-field/form-field.component.js +3 -3
  85. package/navigation/common/navigation-action-common.js +8 -8
  86. package/navigation/navigation/navigation.component.js +1 -1
  87. package/navigation/navigation-marker/navigation-marker.component.js +1 -1
  88. package/navigation/navigation-section/navigation-section.component.js +14 -14
  89. package/package.json +1 -1
  90. package/paginator/common/paginator-common.d.ts +3 -0
  91. package/paginator/common/paginator-common.d.ts.map +1 -1
  92. package/paginator/common/paginator-common.js +103 -63
  93. package/paginator/compact-paginator/compact-paginator.component.d.ts.map +1 -1
  94. package/paginator/compact-paginator/compact-paginator.component.js +13 -8
  95. package/paginator/paginator/paginator.component.d.ts +5 -0
  96. package/paginator/paginator/paginator.component.d.ts.map +1 -1
  97. package/paginator/paginator/paginator.component.js +77 -61
  98. package/sidebar/sidebar-title/sidebar-title.component.js +14 -14
  99. package/standard-theme.css +30 -0
  100. package/tabs/tab-group/tab-group.component.js +7 -7
  101. package/time-input/time-input.component.d.ts +5 -4
  102. package/time-input/time-input.component.d.ts.map +1 -1
  103. package/time-input/time-input.component.js +21 -22
  104. package/title/title-base.js +33 -33
  105. package/title/title.component.js +9 -9
  106. package/toast/toast.component.js +1 -1
  107. package/train/train-wagon/train-wagon.component.js +6 -6
  108. package/file-selector-common-Dw5d8vA4.js +0 -5
@@ -1,76 +1,110 @@
1
- var y = (i) => {
1
+ var T = (i) => {
2
2
  throw TypeError(i);
3
3
  };
4
- var N = (i, s, a) => s.has(i) || y("Cannot " + a);
5
- var c = (i, s, a) => (N(i, s, "read from private field"), a ? a.call(i) : s.get(i)), b = (i, s, a) => s.has(i) ? y("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(i) : s.set(i, a), o = (i, s, a, g) => (N(i, s, "write to private field"), g ? g.call(i, a) : s.set(i, a), a);
6
- import { __runInitializers as p, __esDecorate as u } from "tslib";
7
- import { html as M } from "lit";
8
- import { property as d } from "lit/decorators.js";
9
- import { SbbLanguageController as $ } from "../../core/controllers.js";
10
- import { isLean as k } from "../../core/dom.js";
11
- import { i18nSelectedPage as O, i18nPreviousPage as w, i18nNextPage as L } from "../../core/i18n.js";
12
- import { SbbNegativeMixin as R, SbbDisabledMixin as j, SbbElementInternalsMixin as D } from "../../core/mixins.js";
4
+ var U = (i, r, l) => r.has(i) || T("Cannot " + l);
5
+ var x = (i, r, l) => (U(i, r, "read from private field"), l ? l.call(i) : r.get(i)), _ = (i, r, l) => r.has(i) ? T("Cannot add the same private member more than once") : r instanceof WeakSet ? r.add(i) : r.set(i, l), n = (i, r, l, b) => (U(i, r, "write to private field"), b ? b.call(i, l) : r.set(i, l), l);
6
+ import { __runInitializers as g, __esDecorate as c } from "tslib";
7
+ import { html as A } from "lit";
8
+ import { property as h } from "lit/decorators.js";
9
+ import { SbbLanguageController as F } from "../../core/controllers.js";
10
+ import { forceType as m } from "../../core/decorators.js";
11
+ import { isLean as G } from "../../core/dom.js";
12
+ import { i18nPage as H, i18nPaginatorSelected as J, i18nPreviousPage as K, i18nNextPage as Q } from "../../core/i18n.js";
13
+ import { SbbNegativeMixin as V, SbbDisabledMixin as W, SbbElementInternalsMixin as X } from "../../core/mixins.js";
13
14
  import "../../button/mini-button.js";
14
15
  import "../../button/mini-button-group.js";
15
16
  import "../../divider.js";
16
- const V = (i) => (() => {
17
- var h, l, r;
18
- let a = R(j(D(i))), g = [], m, x, z, _, P = [], I = [], f, S = [], v = [];
19
- return r = class extends a {
17
+ const ce = (i) => (() => {
18
+ var o, p, u, d, P, a;
19
+ let l = V(W(X(i))), b = [], y, z, v, f, L = [], I = [], S, N = [], $ = [], k, M = [], O = [], w, R = [], j = [], D, q = [], B = [];
20
+ return a = class extends l {
20
21
  constructor() {
21
22
  super(...arguments);
22
- b(this, h);
23
- b(this, l);
24
- this._length = (p(this, g), 0), this._pageSize = 10, this._pageIndex = 0, o(this, h, p(this, P, "start")), o(this, l, (p(this, I), p(this, S, k() ? "s" : "m"))), this.language = (p(this, v), new $(this)), this._previousPageSize = this._pageSize;
23
+ _(this, o);
24
+ _(this, p);
25
+ _(this, u);
26
+ _(this, d);
27
+ _(this, P);
28
+ this._length = (g(this, b), 0), this._pageSize = 10, this._pageIndex = 0, n(this, o, g(this, L, "start")), n(this, p, (g(this, I), g(this, N, G() ? "s" : "m"))), n(this, u, (g(this, $), g(this, M, ""))), n(this, d, (g(this, O), g(this, R, ""))), n(this, P, (g(this, j), g(this, q, ""))), this.language = (g(this, B), new F(this)), this._previousPageSize = this._pageSize;
25
29
  }
26
30
  /** Total number of items. */
27
- set length(e) {
28
- this._length = isNaN(e) || e < 0 ? 0 : e, this.pageIndex = this.pageIndex;
31
+ set length(t) {
32
+ this._length = isNaN(t) || t < 0 ? 0 : t, this.pageIndex = this.pageIndex;
29
33
  }
30
34
  get length() {
31
35
  return this._length;
32
36
  }
33
37
  /** Number of items per page. */
34
- set pageSize(e) {
35
- this._previousPageSize = this.pageSize, this._pageSize = Math.max(e, 0), this.pageIndex = Math.floor(this.pageIndex * this._previousPageSize / this.pageSize) || 0;
38
+ set pageSize(t) {
39
+ this._previousPageSize = this.pageSize, this._pageSize = Math.max(t, 0), this.pageIndex = Math.floor(this.pageIndex * this._previousPageSize / this.pageSize) || 0;
36
40
  }
37
41
  get pageSize() {
38
42
  return this._pageSize;
39
43
  }
40
44
  /** Current page index. */
41
- set pageIndex(e) {
42
- const t = this._pageIndex;
43
- this._pageIndex = this._coercePageIndexInRange(e), this.emitPageEvent(t);
45
+ set pageIndex(t) {
46
+ const e = this._pageIndex;
47
+ this._pageIndex = this._coercePageIndexInRange(t), this.emitPageEvent(e);
44
48
  }
45
49
  get pageIndex() {
46
50
  return this._pageIndex;
47
51
  }
48
52
  /** Position of the prev/next buttons. */
49
53
  get pagerPosition() {
50
- return c(this, h);
54
+ return x(this, o);
51
55
  }
52
- set pagerPosition(e) {
53
- o(this, h, e);
56
+ set pagerPosition(t) {
57
+ n(this, o, t);
54
58
  }
55
59
  /**
56
60
  * Size variant, either m or s.
57
61
  * @default 'm' / 's' (lean)
58
62
  */
59
63
  get size() {
60
- return c(this, l);
64
+ return x(this, p);
61
65
  }
62
- set size(e) {
63
- o(this, l, e);
66
+ set size(t) {
67
+ n(this, p, t);
64
68
  }
65
- updated(e) {
66
- super.updated(e), this.shadowRoot.querySelector("sbb-screen-reader-only").textContent = this._currentPageLabel();
69
+ /**
70
+ * Accessibility label for the page. Defaults to `page`.
71
+ * Can be set for cases like a carousel, where `slide` or `image` fits better.
72
+ */
73
+ get accessibilityPageLabel() {
74
+ return x(this, u);
75
+ }
76
+ set accessibilityPageLabel(t) {
77
+ n(this, u, t);
78
+ }
79
+ /**
80
+ * Accessibility label for the previous page. Defaults to `previous page`.
81
+ * Can be set for cases like a carousel, where `slide` or `image` fits better.
82
+ */
83
+ get accessibilityPreviousPageLabel() {
84
+ return x(this, d);
85
+ }
86
+ set accessibilityPreviousPageLabel(t) {
87
+ n(this, d, t);
88
+ }
89
+ /**
90
+ * Accessibility label for the next page. Defaults to `next page`.
91
+ * Can be set for cases like a carousel, where `slide` or `image` fits better.
92
+ */
93
+ get accessibilityNextPageLabel() {
94
+ return x(this, P);
95
+ }
96
+ set accessibilityNextPageLabel(t) {
97
+ n(this, P, t);
98
+ }
99
+ updated(t) {
100
+ super.updated(t), this.shadowRoot.querySelector("sbb-screen-reader-only#status").textContent = this._currentPageLabel();
67
101
  }
68
102
  /** Evaluate `pageIndex` by excluding edge cases. */
69
- _coercePageIndexInRange(e) {
70
- return Math.max(Math.min(Math.max(isNaN(e) ? 0 : e, 0), this.numberOfPages() - 1), 0);
103
+ _coercePageIndexInRange(t) {
104
+ return Math.max(Math.min(Math.max(isNaN(t) ? 0 : t, 0), this.numberOfPages() - 1), 0);
71
105
  }
72
106
  _currentPageLabel() {
73
- return O(this.pageIndex + 1)[this.language.current];
107
+ return `${this.accessibilityPageLabel ? this.accessibilityPageLabel : H[this.language.current]} ${this.pageIndex + 1} ${J[this.language.current]}.`;
74
108
  }
75
109
  /** Advances to the next page if it exists. */
76
110
  nextPage() {
@@ -89,8 +123,8 @@ const V = (i) => (() => {
89
123
  this.pageIndex = this.numberOfPages() - 1;
90
124
  }
91
125
  /** Move to a specific page index. */
92
- selectPage(e) {
93
- this.pageIndex = e;
126
+ selectPage(t) {
127
+ this.pageIndex = t;
94
128
  }
95
129
  /** Whether there is a previous page. */
96
130
  hasPreviousPage() {
@@ -98,8 +132,8 @@ const V = (i) => (() => {
98
132
  }
99
133
  /** Whether there is a next page. */
100
134
  hasNextPage() {
101
- const e = this.numberOfPages() - 1;
102
- return this.pageIndex < e && this.pageSize !== 0;
135
+ const t = this.numberOfPages() - 1;
136
+ return this.pageIndex < t && this.pageSize !== 0;
103
137
  }
104
138
  /**
105
139
  * Calculates the current number of pages based on the `length` and the `pageSize`;
@@ -108,8 +142,8 @@ const V = (i) => (() => {
108
142
  numberOfPages() {
109
143
  return this.pageSize ? Math.ceil(this.length / this.pageSize) : 0;
110
144
  }
111
- emitPageEvent(e) {
112
- if (!this.hasUpdated || this.pageIndex === e && this._previousPageSize === this.pageSize) {
145
+ emitPageEvent(t) {
146
+ if (!this.hasUpdated || this.pageIndex === t && this._previousPageSize === this.pageSize) {
113
147
  this._previousPageSize = this.pageSize;
114
148
  return;
115
149
  }
@@ -117,7 +151,7 @@ const V = (i) => (() => {
117
151
  bubbles: !0,
118
152
  composed: !0,
119
153
  detail: {
120
- previousPageIndex: e,
154
+ previousPageIndex: t,
121
155
  pageIndex: this.pageIndex,
122
156
  length: this.length,
123
157
  pageSize: this.pageSize
@@ -125,11 +159,11 @@ const V = (i) => (() => {
125
159
  }));
126
160
  }
127
161
  renderPrevNextButtons() {
128
- return M`
162
+ return A`
129
163
  <sbb-mini-button-group ?negative=${this.negative} size=${this.size === "s" ? "s" : "l"}>
130
164
  <sbb-mini-button
131
165
  id="sbb-paginator-prev-page"
132
- aria-label=${w[this.language.current]}
166
+ aria-label=${this.accessibilityPreviousPageLabel ? this.accessibilityPreviousPageLabel : K[this.language.current]}
133
167
  icon-name="chevron-small-left-small"
134
168
  ?disabled=${this.disabled || !this.hasPreviousPage()}
135
169
  @click=${() => this.previousPage()}
@@ -137,7 +171,7 @@ const V = (i) => (() => {
137
171
  <sbb-divider orientation="vertical"></sbb-divider>
138
172
  <sbb-mini-button
139
173
  id="sbb-paginator-next-page"
140
- aria-label=${L[this.language.current]}
174
+ aria-label=${this.accessibilityNextPageLabel ? this.accessibilityNextPageLabel : Q[this.language.current]}
141
175
  icon-name="chevron-small-right-small"
142
176
  ?disabled=${this.disabled || !this.hasNextPage()}
143
177
  @click=${() => this.nextPage()}
@@ -146,28 +180,34 @@ const V = (i) => (() => {
146
180
  `;
147
181
  }
148
182
  render() {
149
- return M`
183
+ return A`
150
184
  ${this.renderPaginator()}
151
- <sbb-screen-reader-only role="status"></sbb-screen-reader-only>
185
+ <sbb-screen-reader-only id="status" role="status"></sbb-screen-reader-only>
152
186
  `;
153
187
  }
154
- }, h = new WeakMap(), l = new WeakMap(), (() => {
155
- const e = typeof Symbol == "function" && Symbol.metadata ? Object.create(a[Symbol.metadata] ?? null) : void 0;
156
- m = [d({ type: Number })], x = [d({ attribute: "page-size", type: Number })], z = [d({ attribute: "page-index", type: Number })], _ = [d({ attribute: "pager-position", reflect: !0 })], f = [d({ reflect: !0 })], u(r, null, m, { kind: "setter", name: "length", static: !1, private: !1, access: { has: (t) => "length" in t, set: (t, n) => {
157
- t.length = n;
158
- } }, metadata: e }, null, g), u(r, null, x, { kind: "setter", name: "pageSize", static: !1, private: !1, access: { has: (t) => "pageSize" in t, set: (t, n) => {
159
- t.pageSize = n;
160
- } }, metadata: e }, null, g), u(r, null, z, { kind: "setter", name: "pageIndex", static: !1, private: !1, access: { has: (t) => "pageIndex" in t, set: (t, n) => {
161
- t.pageIndex = n;
162
- } }, metadata: e }, null, g), u(r, null, _, { kind: "accessor", name: "pagerPosition", static: !1, private: !1, access: { has: (t) => "pagerPosition" in t, get: (t) => t.pagerPosition, set: (t, n) => {
163
- t.pagerPosition = n;
164
- } }, metadata: e }, P, I), u(r, null, f, { kind: "accessor", name: "size", static: !1, private: !1, access: { has: (t) => "size" in t, get: (t) => t.size, set: (t, n) => {
165
- t.size = n;
166
- } }, metadata: e }, S, v), e && Object.defineProperty(r, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: e });
167
- })(), r.role = "group", r.events = {
188
+ }, o = new WeakMap(), p = new WeakMap(), u = new WeakMap(), d = new WeakMap(), P = new WeakMap(), (() => {
189
+ const t = typeof Symbol == "function" && Symbol.metadata ? Object.create(l[Symbol.metadata] ?? null) : void 0;
190
+ y = [h({ type: Number })], z = [h({ attribute: "page-size", type: Number })], v = [h({ attribute: "page-index", type: Number })], f = [h({ attribute: "pager-position", reflect: !0 })], S = [h({ reflect: !0 })], k = [m(), h({ attribute: "accessibility-page-label" })], w = [m(), h({ attribute: "accessibility-previous-page-label" })], D = [m(), h({ attribute: "accessibility-next-page-label" })], c(a, null, y, { kind: "setter", name: "length", static: !1, private: !1, access: { has: (e) => "length" in e, set: (e, s) => {
191
+ e.length = s;
192
+ } }, metadata: t }, null, b), c(a, null, z, { kind: "setter", name: "pageSize", static: !1, private: !1, access: { has: (e) => "pageSize" in e, set: (e, s) => {
193
+ e.pageSize = s;
194
+ } }, metadata: t }, null, b), c(a, null, v, { kind: "setter", name: "pageIndex", static: !1, private: !1, access: { has: (e) => "pageIndex" in e, set: (e, s) => {
195
+ e.pageIndex = s;
196
+ } }, metadata: t }, null, b), c(a, null, f, { kind: "accessor", name: "pagerPosition", static: !1, private: !1, access: { has: (e) => "pagerPosition" in e, get: (e) => e.pagerPosition, set: (e, s) => {
197
+ e.pagerPosition = s;
198
+ } }, metadata: t }, L, I), c(a, null, S, { kind: "accessor", name: "size", static: !1, private: !1, access: { has: (e) => "size" in e, get: (e) => e.size, set: (e, s) => {
199
+ e.size = s;
200
+ } }, metadata: t }, N, $), c(a, null, k, { kind: "accessor", name: "accessibilityPageLabel", static: !1, private: !1, access: { has: (e) => "accessibilityPageLabel" in e, get: (e) => e.accessibilityPageLabel, set: (e, s) => {
201
+ e.accessibilityPageLabel = s;
202
+ } }, metadata: t }, M, O), c(a, null, w, { kind: "accessor", name: "accessibilityPreviousPageLabel", static: !1, private: !1, access: { has: (e) => "accessibilityPreviousPageLabel" in e, get: (e) => e.accessibilityPreviousPageLabel, set: (e, s) => {
203
+ e.accessibilityPreviousPageLabel = s;
204
+ } }, metadata: t }, R, j), c(a, null, D, { kind: "accessor", name: "accessibilityNextPageLabel", static: !1, private: !1, access: { has: (e) => "accessibilityNextPageLabel" in e, get: (e) => e.accessibilityNextPageLabel, set: (e, s) => {
205
+ e.accessibilityNextPageLabel = s;
206
+ } }, metadata: t }, q, B), t && Object.defineProperty(a, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: t });
207
+ })(), a.role = "group", a.events = {
168
208
  page: "page"
169
- }, r;
209
+ }, a;
170
210
  })();
171
211
  export {
172
- V as SbbPaginatorCommonElementMixin
212
+ ce as SbbPaginatorCommonElementMixin
173
213
  };
@@ -1 +1 @@
1
- {"version":3,"file":"compact-paginator.component.d.ts","sourceRoot":"","sources":["../../../../src/elements/paginator/compact-paginator/compact-paginator.component.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AAC1D,OAAO,EAAQ,UAAU,EAAE,MAAM,KAAK,CAAC;AAIvC,OAAO,kBAAkB,CAAC;;AAI1B;;GAEG;AACH,qBAEM,0BAA2B,SAAQ,+BAA0C;IACjF,OAAuB,MAAM,EAAE,cAAc,CAAS;IACtD,gBAAuB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAE1C;IAEX,OAAO,CAAC,kBAAkB;cAcP,eAAe,IAAI,cAAc;CASrD;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAE7B,uBAAuB,EAAE,0BAA0B,CAAC;KACrD;CACF"}
1
+ {"version":3,"file":"compact-paginator.component.d.ts","sourceRoot":"","sources":["../../../../src/elements/paginator/compact-paginator/compact-paginator.component.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AAC1D,OAAO,EAAQ,UAAU,EAAE,MAAM,KAAK,CAAC;AAQvC,OAAO,kBAAkB,CAAC;AAC1B,OAAO,6BAA6B,CAAC;;AAErC;;GAEG;AACH,qBAEM,0BAA2B,SAAQ,+BAA0C;IACjF,OAAuB,MAAM,EAAE,cAAc,CAAS;IACtD,gBAAuB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAE1C;IAEX,OAAO,CAAC,kBAAkB;cAiBP,eAAe,IAAI,cAAc;CASrD;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAE7B,uBAAuB,EAAE,0BAA0B,CAAC;KACrD;CACF"}
@@ -1,24 +1,29 @@
1
1
  import { __esDecorate as b, __runInitializers as c } from "tslib";
2
2
  import { css as l, LitElement as p, html as a } from "lit";
3
3
  import { customElement as m } from "lit/decorators.js";
4
- import { SbbPaginatorCommonElementMixin as g } from "../common.js";
4
+ import { i18nPage as g, i18nPaginatorOf as d } from "../../core/i18n.js";
5
+ import { SbbPaginatorCommonElementMixin as h } from "../common.js";
5
6
  import "../../divider.js";
6
- const d = l`*,:before,:after{box-sizing:border-box}:host{display:block;--sbb-compact-paginator-height: var(--sbb-size-element-m);--sbb-compact-paginator-color: var(--sbb-color-metal);--sbb-paginator-compact-justify-content: start}:host([size=s]){--sbb-compact-paginator-height: var(--sbb-size-element-xs)}:host([negative]){--sbb-compact-paginator-color: var(--sbb-color-storm)}:host([pager-position=end]){--sbb-paginator-compact-justify-content: end}.sbb-compact-paginator{display:flex;gap:var(--sbb-spacing-fixed-5x);justify-content:var(--sbb-paginator-compact-justify-content);min-height:var(--sbb-compact-paginator-height)}.sbb-paginator__pages{--sbb-text-font-size: var(--sbb-font-size-text-m);font-family:var(--sbb-typo-font-family);font-weight:400;line-height:var(--sbb-typo-line-height-body-text);letter-spacing:var(--sbb-typo-letter-spacing-body-text);font-size:var(--sbb-text-font-size);display:flex;align-items:center;justify-content:center;gap:var(--sbb-spacing-fixed-2x);color:var(--sbb-compact-paginator-color)}.sbb-compact-paginator__divider{height:1rem}`;
7
- let x = (() => {
7
+ import "../../screen-reader-only.js";
8
+ const u = l`*,:before,:after{box-sizing:border-box}:host{display:block;--sbb-compact-paginator-height: var(--sbb-size-element-m);--sbb-compact-paginator-color: var(--sbb-color-metal);--sbb-paginator-compact-justify-content: start}:host([size=s]){--sbb-compact-paginator-height: var(--sbb-size-element-xs)}:host([negative]){--sbb-compact-paginator-color: var(--sbb-color-storm)}:host([pager-position=end]){--sbb-paginator-compact-justify-content: end}.sbb-compact-paginator{display:flex;gap:var(--sbb-spacing-fixed-5x);justify-content:var(--sbb-paginator-compact-justify-content);min-height:var(--sbb-compact-paginator-height)}.sbb-paginator__pages{--sbb-text-font-size: var(--sbb-font-size-text-m);font-family:var(--sbb-typo-font-family);font-weight:400;line-height:var(--sbb-typo-line-height-body-text);letter-spacing:var(--sbb-typo-letter-spacing-body-text);font-size:var(--sbb-text-font-size);display:flex;align-items:center;justify-content:center;gap:var(--sbb-spacing-fixed-2x);color:var(--sbb-compact-paginator-color)}.sbb-compact-paginator__divider{height:1rem}`;
9
+ let z = (() => {
8
10
  var t;
9
- let n = [m("sbb-compact-paginator")], i, r = [], e, o = g(p);
11
+ let n = [m("sbb-compact-paginator")], i, r = [], e, o = h(p);
10
12
  return t = class extends o {
11
13
  _renderPageNumbers() {
12
14
  return a`
13
- <span class="sbb-paginator__pages"
15
+ <span class="sbb-paginator__pages" aria-hidden="true"
14
16
  >${this.pageIndex + 1}<sbb-divider
15
- aria-hidden="true"
16
17
  orientation="vertical"
17
18
  class="sbb-compact-paginator__divider"
19
+ style="--sbb-divider-color: currentcolor"
18
20
  ?negative=${this.negative}
19
21
  ></sbb-divider
20
22
  >${this.numberOfPages()}</span
21
23
  >
24
+ <sbb-screen-reader-only>
25
+ ${`${this.accessibilityPageLabel ? this.accessibilityPageLabel : g[this.language.current]} ${this.pageIndex + 1} ${d[this.language.current]} ${this.numberOfPages()}`}
26
+ </sbb-screen-reader-only>
22
27
  `;
23
28
  }
24
29
  renderPaginator() {
@@ -31,10 +36,10 @@ let x = (() => {
31
36
  }, e = t, (() => {
32
37
  const s = typeof Symbol == "function" && Symbol.metadata ? Object.create(o[Symbol.metadata] ?? null) : void 0;
33
38
  b(null, i = { value: e }, n, { kind: "class", name: e.name, metadata: s }, null, r), e = i.value, s && Object.defineProperty(e, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: s });
34
- })(), t.styles = d, t.events = {
39
+ })(), t.styles = u, t.events = {
35
40
  page: "page"
36
41
  }, c(e, r), e;
37
42
  })();
38
43
  export {
39
- x as SbbCompactPaginatorElement
44
+ z as SbbCompactPaginatorElement
40
45
  };
@@ -13,6 +13,11 @@ export declare class SbbPaginatorElement extends SbbPaginatorElement_base {
13
13
  * the sbb-select for the pageSize change will be positioned oppositely, with the page numbers always in the center.
14
14
  */
15
15
  accessor pagerPosition: 'start' | 'end';
16
+ /**
17
+ * Accessibility label for the items per page. Defaults to `Items per page.`.
18
+ * Can be set for cases like a carousel, where `slide` or `image` fits better.
19
+ */
20
+ accessor accessibilityItemsPerPageLabel: string;
16
21
  private _markForFocus;
17
22
  protected updated(changedProperties: PropertyValues<this>): void;
18
23
  /** Returns the displayed page elements. */
@@ -1 +1 @@
1
- {"version":3,"file":"paginator.component.d.ts","sourceRoot":"","sources":["../../../../src/elements/paginator/paginator/paginator.component.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,cAAc,EAEnB,UAAU,EAEV,KAAK,cAAc,EACnB,KAAK,cAAc,EACpB,MAAM,KAAK,CAAC;AAWb,OAAO,qBAAqB,CAAC;AAC7B,OAAO,iBAAiB,CAAC;AACzB,OAAO,iBAAiB,CAAC;AACzB,OAAO,6BAA6B,CAAC;;AAIrC;;GAEG;AACH,qBAEM,mBAAoB,SAAQ,wBAA0C;IAC1E,OAAuB,MAAM,EAAE,cAAc,CAAS;IACtD,gBAAuB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAE1C;IAEX,wCAAwC;IACxC,SACgB,eAAe,EAAE,MAAM,EAAE,CAAM;IAE/C;;;OAGG;IACH,SAAmF,aAAa,EAC5F,OAAO,GACP,KAAK,CAAW;IAEpB,OAAO,CAAC,aAAa,CAAuB;cAEzB,OAAO,CAAC,iBAAiB,EAAE,cAAc,CAAC,IAAI,CAAC,GAAG,IAAI;IAezE,2CAA2C;IAC3C,OAAO,CAAC,gBAAgB;IAIxB;;;;;OAKG;IACH,OAAO,CAAC,qBAAqB;IA2B7B,uFAAuF;IACvF,OAAO,CAAC,MAAM;IAId,OAAO,CAAC,YAAY;IAWpB,OAAO,CAAC,0BAA0B;IA8BlC,OAAO,CAAC,kBAAkB;cAiCP,eAAe,IAAI,cAAc;CAiBrD;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAE7B,eAAe,EAAE,mBAAmB,CAAC;KACtC;CACF"}
1
+ {"version":3,"file":"paginator.component.d.ts","sourceRoot":"","sources":["../../../../src/elements/paginator/paginator/paginator.component.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,cAAc,EAEnB,UAAU,EAEV,KAAK,cAAc,EACnB,KAAK,cAAc,EACpB,MAAM,KAAK,CAAC;AAYb,OAAO,qBAAqB,CAAC;AAC7B,OAAO,iBAAiB,CAAC;AACzB,OAAO,iBAAiB,CAAC;AACzB,OAAO,6BAA6B,CAAC;;AAIrC;;GAEG;AACH,qBAEM,mBAAoB,SAAQ,wBAA0C;IAC1E,OAAuB,MAAM,EAAE,cAAc,CAAS;IACtD,gBAAuB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAE1C;IAEX,wCAAwC;IACxC,SACgB,eAAe,EAAE,MAAM,EAAE,CAAM;IAE/C;;;OAGG;IACH,SAAmF,aAAa,EAC5F,OAAO,GACP,KAAK,CAAW;IAEpB;;;OAGG;IACH,SAEgB,8BAA8B,EAAE,MAAM,CAAM;IAE5D,OAAO,CAAC,aAAa,CAAuB;cAEzB,OAAO,CAAC,iBAAiB,EAAE,cAAc,CAAC,IAAI,CAAC,GAAG,IAAI;IAezE,2CAA2C;IAC3C,OAAO,CAAC,gBAAgB;IAIxB;;;;;OAKG;IACH,OAAO,CAAC,qBAAqB;IA2B7B,uFAAuF;IACvF,OAAO,CAAC,MAAM;IAId,OAAO,CAAC,YAAY;IAWpB,OAAO,CAAC,0BAA0B;IAkClC,OAAO,CAAC,kBAAkB;cAmCP,eAAe,IAAI,cAAc;CAiBrD;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAE7B,eAAe,EAAE,mBAAmB,CAAC;KACtC;CACF"}
@@ -1,51 +1,63 @@
1
- var k = (t) => {
1
+ var O = (t) => {
2
2
  throw TypeError(t);
3
3
  };
4
- var P = (t, r, i) => r.has(t) || k("Cannot " + i);
5
- var u = (t, r, i) => (P(t, r, "read from private field"), i ? i.call(t) : r.get(t)), m = (t, r, i) => r.has(t) ? k("Cannot add the same private member more than once") : r instanceof WeakSet ? r.add(t) : r.set(t, i), c = (t, r, i, o) => (P(t, r, "write to private field"), o ? o.call(t, i) : r.set(t, i), i);
6
- import { __runInitializers as d, __esDecorate as h } from "tslib";
7
- import { css as E, LitElement as j, nothing as S, html as b } from "lit";
8
- import { customElement as A, property as $ } from "lit/decorators.js";
9
- import { repeat as I } from "lit/directives/repeat.js";
10
- import { sbbInputModalityDetector as F } from "../../core/a11y.js";
11
- import { i18nItemsPerPage as D, i18nPage as N } from "../../core/i18n.js";
12
- import { SbbPaginatorCommonElementMixin as T } from "../common.js";
4
+ var L = (t, i, r) => i.has(t) || O("Cannot " + r);
5
+ var u = (t, i, r) => (L(t, i, "read from private field"), r ? r.call(t) : i.get(t)), h = (t, i, r) => i.has(t) ? O("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(t) : i.set(t, r), p = (t, i, r, o) => (L(t, i, "write to private field"), o ? o.call(t, r) : i.set(t, r), r);
6
+ import { __runInitializers as g, __esDecorate as _ } from "tslib";
7
+ import { css as F, LitElement as T, nothing as E, html as b } from "lit";
8
+ import { customElement as D, property as f } from "lit/decorators.js";
9
+ import { repeat as j } from "lit/directives/repeat.js";
10
+ import { sbbInputModalityDetector as N } from "../../core/a11y.js";
11
+ import { forceType as M } from "../../core/decorators.js";
12
+ import { i18nItemsPerPage as V, i18nPage as B } from "../../core/i18n.js";
13
+ import { SbbPaginatorCommonElementMixin as G } from "../common.js";
13
14
  import "../../form-field.js";
14
15
  import "../../select.js";
15
16
  import "../../option.js";
16
17
  import "../../screen-reader-only.js";
17
- const M = E`*,:before,:after{box-sizing:border-box}:host{display:block;--sbb-paginator-height: var(--sbb-size-element-m);--sbb-paginator-page-color: var(--sbb-color-metal);--sbb-paginator-page-background-color: transparent;--sbb-paginator-page-border-width: 0;--sbb-paginator-page-border-style: none;--sbb-paginator-page-border-color: none;--sbb-paginator-page-cursor: pointer;--sbb-paginator-page-inset: 0;--sbb-paginator-animation-easing: var(--sbb-animation-easing);--sbb-paginator-animation-duration: var( --sbb-disable-animation-duration, var(--sbb-animation-duration-2x) );--sbb-paginator-justify-content: start;--sbb-paginator-wrapping-group-wrap: wrap-reverse;--sbb-paginator-wrap: wrap}:host([size=s]){--sbb-paginator-height: var(--sbb-size-element-xs)}:host([negative]){--sbb-paginator-page-color: var(--sbb-color-smoke);--sbb-focus-outline-color: var(--sbb-focus-outline-color-dark)}:host([pager-position=end]){--sbb-paginator-justify-content: end;--sbb-paginator-wrapping-group-wrap: wrap;--sbb-paginator-wrap: wrap-reverse}.sbb-paginator,.sbb-paginator__wrapping-group{display:flex;gap:var(--sbb-spacing-fixed-3x) var(--sbb-spacing-fixed-6x);justify-content:var(--sbb-paginator-justify-content)}.sbb-paginator{flex-wrap:var(--sbb-paginator-wrap);min-height:var(--sbb-paginator-height)}.sbb-paginator__wrapping-group{flex-wrap:var(--sbb-paginator-wrapping-group-wrap)}.sbb-paginator__page-size-options{--sbb-text-font-size: var(--sbb-font-size-text-s);font-family:var(--sbb-typo-font-family);font-weight:400;line-height:var(--sbb-typo-line-height-body-text);letter-spacing:var(--sbb-typo-letter-spacing-body-text);font-size:var(--sbb-text-font-size);display:flex;align-items:center;gap:var(--sbb-spacing-fixed-2x);white-space:nowrap;color:var(--sbb-paginator-page-color)}.sbb-paginator__page-size-options sbb-select{--sbb-text-font-size: var(--sbb-font-size-text-m);font-family:var(--sbb-typo-font-family);font-weight:400;line-height:var(--sbb-typo-line-height-body-text);letter-spacing:var(--sbb-typo-letter-spacing-body-text);font-size:var(--sbb-text-font-size);color:var(--sbb-form-field-text-color);font-size:var(--sbb-form-field-input-text-size);padding-inline-end:var(--sbb-form-field-select-inline-padding-end)}.sbb-paginator__pages{list-style:none;margin:0;padding:0;font-size:inherit;display:flex;align-items:center;justify-content:center;gap:var(--sbb-spacing-fixed-1x);-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}.sbb-paginator__page--ellipsis,.sbb-paginator__page--number{--sbb-text-font-size: var(--sbb-font-size-text-s);font-family:var(--sbb-typo-font-family);font-weight:400;line-height:var(--sbb-typo-line-height-body-text);letter-spacing:var(--sbb-typo-letter-spacing-body-text);font-size:var(--sbb-text-font-size);position:relative;color:var(--sbb-paginator-page-color)}.sbb-paginator__page--ellipsis-item,.sbb-paginator__page--number-item{display:flex;justify-content:center;align-items:center;width:var(--sbb-size-element-xxs);height:var(--sbb-size-element-xxs)}.sbb-paginator__page--number-item{-webkit-appearance:none;-moz-appearance:none;box-sizing:border-box;margin:0;outline:none;border:none;border-radius:0;padding:0;background:none;-webkit-tap-highlight-color:transparent;color:inherit;--sbb-text-font-size: var(--sbb-font-size-text-s);font-family:var(--sbb-typo-font-family);font-weight:400;line-height:var(--sbb-typo-line-height-body-text);letter-spacing:var(--sbb-typo-letter-spacing-body-text);font-size:var(--sbb-text-font-size);position:relative;cursor:var(--sbb-paginator-page-cursor);outline:none!important;color:var(--sbb-paginator-page-color);transition:color var(--sbb-paginator-animation-duration) var(--sbb-paginator-animation-easing)}.sbb-paginator__page--number-item:before{content:"";position:absolute;background-color:var(--sbb-paginator-page-background-color);border:var(--sbb-paginator-page-border-width) var(--sbb-paginator-page-border-style) var(--sbb-paginator-page-border-color);border-radius:var(--sbb-border-radius-infinity);inset:var(--sbb-paginator-page-inset);transition-property:background-color,border,inset;transition-duration:var(--sbb-paginator-animation-duration);transition-timing-function:var(--sbb-paginator-animation-easing)}.sbb-paginator__page--number-item:focus-visible:before{outline-offset:var(--sbb-focus-outline-offset);outline:var(--sbb-focus-outline-color) var(--sbb-focus-outline-style, solid) var(--sbb-focus-outline-width);outline-offset:var(--sbb-border-width-2x)}.sbb-paginator__page--number-item[data-selected]{font-weight:700;--sbb-paginator-page-color: var(--sbb-color-charcoal);--sbb-paginator-page-border-width: var(--sbb-border-width-2x);--sbb-paginator-page-border-style: solid;--sbb-paginator-page-border-color: var(--sbb-color-charcoal)}:host([negative]) .sbb-paginator__page--number-item[data-selected]{--sbb-paginator-page-color: var(--sbb-color-milk);--sbb-paginator-page-border-color: var(--sbb-color-white)}@media (forced-colors: active){.sbb-paginator__page--number-item[data-selected]{--sbb-paginator-page-border-color: Highlight !important}}.sbb-paginator__page--number-item:disabled{--sbb-paginator-page-color: var(--sbb-color-smoke);--sbb-paginator-page-border-style: dashed;--sbb-paginator-page-border-color: var(--sbb-color-smoke);--sbb-paginator-page-background-color: var(--sbb-color-milk);--sbb-paginator-page-cursor: default}.sbb-paginator__page--number-item:disabled:not([data-selected]){--sbb-paginator-page-border-width: var(--sbb-border-width-1x)}:host([negative]) .sbb-paginator__page--number-item:disabled{--sbb-paginator-page-color: var(--sbb-color-aluminium);--sbb-paginator-page-background-color: var(--sbb-color-charcoal)}@media (forced-colors: active){.sbb-paginator__page--number-item:disabled{--sbb-paginator-page-border-color: GrayText;--sbb-paginator-page-color: GrayText;--sbb-paginator-page-background-color: Canvas}}@media (any-hover: hover){.sbb-paginator__page--number-item:not(:disabled):hover{--sbb-paginator-page-background-color: var(--sbb-color-milk);--sbb-paginator-page-inset: calc(var(--sbb-border-width-2x) * -1);--sbb-paginator-translate-y-content-hover: -.0625rem}:host([negative]) .sbb-paginator__page--number-item:not(:disabled):hover{--sbb-paginator-page-background-color: var(--sbb-color-charcoal)}}@media (any-hover: hover) and (forced-colors: active){.sbb-paginator__page--number-item:not(:disabled):hover{--sbb-paginator-page-background-color: Highlight !important}}.sbb-paginator__page--number-item:not(:disabled):active{--sbb-paginator-page-color: var(--sbb-color-charcoal);--sbb-paginator-page-background-color: var(--sbb-color-cloud);--sbb-paginator-page-inset: 0;--sbb-paginator-translate-y-content-hover: 0}:host([negative]) .sbb-paginator__page--number-item:not(:disabled):active{--sbb-paginator-page-color: var(--sbb-color-milk);--sbb-paginator-page-background-color: var(--sbb-color-iron)}@media (forced-colors: active){.sbb-paginator__page--number-item:not(:disabled):active{--sbb-paginator-page-background-color: Highlight !important}}.sbb-paginator__page--number-item-label{transition:transform var(--sbb-paginator-animation-duration) var(--sbb-paginator-animation-easing);transform:translateY(var(--sbb-paginator-translate-y-content-hover, 0rem))}.sbb-screen-reader-only{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}`, l = 3;
18
- let Q = (() => {
19
- var p, g, s;
20
- let t = [A("sbb-paginator")], r, i = [], o, v = T(j), f, _ = [], y = [], x, z = [], w = [];
18
+ const H = F`*,:before,:after{box-sizing:border-box}:host{display:block;--sbb-paginator-height: var(--sbb-size-element-m);--sbb-paginator-page-color: var(--sbb-color-metal);--sbb-paginator-page-background-color: transparent;--sbb-paginator-page-border-width: 0;--sbb-paginator-page-border-style: none;--sbb-paginator-page-border-color: none;--sbb-paginator-page-cursor: pointer;--sbb-paginator-page-inset: 0;--sbb-paginator-animation-easing: var(--sbb-animation-easing);--sbb-paginator-animation-duration: var( --sbb-disable-animation-duration, var(--sbb-animation-duration-2x) );--sbb-paginator-justify-content: start;--sbb-paginator-wrapping-group-wrap: wrap-reverse;--sbb-paginator-wrap: wrap}:host([size=s]){--sbb-paginator-height: var(--sbb-size-element-xs)}:host([negative]){--sbb-paginator-page-color: var(--sbb-color-smoke);--sbb-focus-outline-color: var(--sbb-focus-outline-color-dark)}:host([pager-position=end]){--sbb-paginator-justify-content: end;--sbb-paginator-wrapping-group-wrap: wrap;--sbb-paginator-wrap: wrap-reverse}.sbb-paginator,.sbb-paginator__wrapping-group{display:flex;gap:var(--sbb-spacing-fixed-3x) var(--sbb-spacing-fixed-6x);justify-content:var(--sbb-paginator-justify-content)}.sbb-paginator{flex-wrap:var(--sbb-paginator-wrap);min-height:var(--sbb-paginator-height)}.sbb-paginator__wrapping-group{flex-wrap:var(--sbb-paginator-wrapping-group-wrap)}.sbb-paginator__page-size-options{--sbb-text-font-size: var(--sbb-font-size-text-s);font-family:var(--sbb-typo-font-family);font-weight:400;line-height:var(--sbb-typo-line-height-body-text);letter-spacing:var(--sbb-typo-letter-spacing-body-text);font-size:var(--sbb-text-font-size);display:flex;align-items:center;gap:var(--sbb-spacing-fixed-2x);white-space:nowrap;color:var(--sbb-paginator-page-color)}.sbb-paginator__page-size-options sbb-select{--sbb-text-font-size: var(--sbb-font-size-text-m);font-family:var(--sbb-typo-font-family);font-weight:400;line-height:var(--sbb-typo-line-height-body-text);letter-spacing:var(--sbb-typo-letter-spacing-body-text);font-size:var(--sbb-text-font-size);color:var(--sbb-form-field-text-color);font-size:var(--sbb-form-field-input-text-size);padding-inline-end:var(--sbb-form-field-select-inline-padding-end)}.sbb-paginator__pages{list-style:none;margin:0;padding:0;font-size:inherit;display:flex;align-items:center;justify-content:center;gap:var(--sbb-spacing-fixed-1x);-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}.sbb-paginator__page--ellipsis,.sbb-paginator__page--number{--sbb-text-font-size: var(--sbb-font-size-text-s);font-family:var(--sbb-typo-font-family);font-weight:400;line-height:var(--sbb-typo-line-height-body-text);letter-spacing:var(--sbb-typo-letter-spacing-body-text);font-size:var(--sbb-text-font-size);position:relative;color:var(--sbb-paginator-page-color)}.sbb-paginator__page--ellipsis-item,.sbb-paginator__page--number-item{display:flex;justify-content:center;align-items:center;width:var(--sbb-size-element-xxs);height:var(--sbb-size-element-xxs)}.sbb-paginator__page--number-item{-webkit-appearance:none;-moz-appearance:none;box-sizing:border-box;margin:0;outline:none;border:none;border-radius:0;padding:0;background:none;-webkit-tap-highlight-color:transparent;color:inherit;--sbb-text-font-size: var(--sbb-font-size-text-s);font-family:var(--sbb-typo-font-family);font-weight:400;line-height:var(--sbb-typo-line-height-body-text);letter-spacing:var(--sbb-typo-letter-spacing-body-text);font-size:var(--sbb-text-font-size);position:relative;cursor:var(--sbb-paginator-page-cursor);outline:none!important;color:var(--sbb-paginator-page-color);transition:color var(--sbb-paginator-animation-duration) var(--sbb-paginator-animation-easing)}.sbb-paginator__page--number-item:before{content:"";position:absolute;background-color:var(--sbb-paginator-page-background-color);border:var(--sbb-paginator-page-border-width) var(--sbb-paginator-page-border-style) var(--sbb-paginator-page-border-color);border-radius:var(--sbb-border-radius-infinity);inset:var(--sbb-paginator-page-inset);transition-property:background-color,border,inset;transition-duration:var(--sbb-paginator-animation-duration);transition-timing-function:var(--sbb-paginator-animation-easing)}.sbb-paginator__page--number-item:focus-visible:before{outline-offset:var(--sbb-focus-outline-offset);outline:var(--sbb-focus-outline-color) var(--sbb-focus-outline-style, solid) var(--sbb-focus-outline-width);outline-offset:var(--sbb-border-width-2x)}.sbb-paginator__page--number-item[data-selected]{font-weight:700;--sbb-paginator-page-color: var(--sbb-color-charcoal);--sbb-paginator-page-border-width: var(--sbb-border-width-2x);--sbb-paginator-page-border-style: solid;--sbb-paginator-page-border-color: var(--sbb-color-charcoal)}:host([negative]) .sbb-paginator__page--number-item[data-selected]{--sbb-paginator-page-color: var(--sbb-color-milk);--sbb-paginator-page-border-color: var(--sbb-color-white)}@media (forced-colors: active){.sbb-paginator__page--number-item[data-selected]{--sbb-paginator-page-border-color: Highlight !important}}.sbb-paginator__page--number-item:disabled{--sbb-paginator-page-color: var(--sbb-color-smoke);--sbb-paginator-page-border-style: dashed;--sbb-paginator-page-border-color: var(--sbb-color-smoke);--sbb-paginator-page-background-color: var(--sbb-color-milk);--sbb-paginator-page-cursor: default}.sbb-paginator__page--number-item:disabled:not([data-selected]){--sbb-paginator-page-border-width: var(--sbb-border-width-1x)}:host([negative]) .sbb-paginator__page--number-item:disabled{--sbb-paginator-page-color: var(--sbb-color-aluminium);--sbb-paginator-page-background-color: var(--sbb-color-charcoal)}@media (forced-colors: active){.sbb-paginator__page--number-item:disabled{--sbb-paginator-page-border-color: GrayText;--sbb-paginator-page-color: GrayText;--sbb-paginator-page-background-color: Canvas}}@media (any-hover: hover){.sbb-paginator__page--number-item:not(:disabled):hover{--sbb-paginator-page-background-color: var(--sbb-color-milk);--sbb-paginator-page-inset: calc(var(--sbb-border-width-2x) * -1);--sbb-paginator-translate-y-content-hover: -.0625rem}:host([negative]) .sbb-paginator__page--number-item:not(:disabled):hover{--sbb-paginator-page-background-color: var(--sbb-color-charcoal)}}@media (any-hover: hover) and (forced-colors: active){.sbb-paginator__page--number-item:not(:disabled):hover{--sbb-paginator-page-background-color: Highlight !important}}.sbb-paginator__page--number-item:not(:disabled):active{--sbb-paginator-page-color: var(--sbb-color-charcoal);--sbb-paginator-page-background-color: var(--sbb-color-cloud);--sbb-paginator-page-inset: 0;--sbb-paginator-translate-y-content-hover: 0}:host([negative]) .sbb-paginator__page--number-item:not(:disabled):active{--sbb-paginator-page-color: var(--sbb-color-milk);--sbb-paginator-page-background-color: var(--sbb-color-iron)}@media (forced-colors: active){.sbb-paginator__page--number-item:not(:disabled):active{--sbb-paginator-page-background-color: Highlight !important}}.sbb-paginator__page--number-item-label{transition:transform var(--sbb-paginator-animation-duration) var(--sbb-paginator-animation-easing);transform:translateY(var(--sbb-paginator-translate-y-content-hover, 0rem))}.sbb-screen-reader-only{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}`, m = 3;
19
+ let ie = (() => {
20
+ var l, c, d, s;
21
+ let t = [D("sbb-paginator")], i, r = [], o, v = G(T), y, x = [], P = [], z, w = [], k = [], I, S = [], $ = [];
21
22
  return s = class extends v {
22
23
  constructor() {
23
24
  super(...arguments);
24
- m(this, p);
25
- m(this, g);
26
- c(this, p, d(this, _, [])), c(this, g, (d(this, y), d(this, z, "start"))), this._markForFocus = (d(this, w), null);
25
+ h(this, l);
26
+ h(this, c);
27
+ h(this, d);
28
+ p(this, l, g(this, x, [])), p(this, c, (g(this, P), g(this, w, "start"))), p(this, d, (g(this, k), g(this, S, ""))), this._markForFocus = (g(this, $), null);
27
29
  }
28
30
  /** The available `pageSize` choices. */
29
31
  get pageSizeOptions() {
30
- return u(this, p);
32
+ return u(this, l);
31
33
  }
32
- set pageSizeOptions(a) {
33
- c(this, p, a);
34
+ set pageSizeOptions(e) {
35
+ p(this, l, e);
34
36
  }
35
37
  /**
36
38
  * Position of the prev/next buttons: if `pageSizeOptions` is set,
37
39
  * the sbb-select for the pageSize change will be positioned oppositely, with the page numbers always in the center.
38
40
  */
39
41
  get pagerPosition() {
40
- return u(this, g);
42
+ return u(this, c);
41
43
  }
42
- set pagerPosition(a) {
43
- c(this, g, a);
44
+ set pagerPosition(e) {
45
+ p(this, c, e);
44
46
  }
45
- updated(a) {
46
- if (super.updated(a), this._markForFocus && F.mostRecentModality === "keyboard") {
47
- const e = this._getVisiblePages().find((n) => this.pageIndex === +n.getAttribute("data-index"));
48
- e && e.focus(), this._markForFocus = null;
47
+ /**
48
+ * Accessibility label for the items per page. Defaults to `Items per page.`.
49
+ * Can be set for cases like a carousel, where `slide` or `image` fits better.
50
+ */
51
+ get accessibilityItemsPerPageLabel() {
52
+ return u(this, d);
53
+ }
54
+ set accessibilityItemsPerPageLabel(e) {
55
+ p(this, d, e);
56
+ }
57
+ updated(e) {
58
+ if (super.updated(e), this._markForFocus && N.mostRecentModality === "keyboard") {
59
+ const a = this._getVisiblePages().find((n) => this.pageIndex === +n.getAttribute("data-index"));
60
+ a && a.focus(), this._markForFocus = null;
49
61
  }
50
62
  }
51
63
  /** Returns the displayed page elements. */
@@ -59,34 +71,36 @@ let Q = (() => {
59
71
  * - if there are more than `MAX_PAGE_NUMBERS_DISPLAYED` other pages, ellipsis button must be used.
60
72
  */
61
73
  _getVisiblePagesIndex() {
62
- const a = this.numberOfPages(), e = this.pageIndex;
63
- return a <= l + 2 ? this._range(a) : e < l ? [...this._range(l + 1), "ellipsis", a - 1] : e >= a - l ? [
74
+ const e = this.numberOfPages(), a = this.pageIndex;
75
+ return e <= m + 2 ? this._range(e) : a < m ? [...this._range(m + 1), "ellipsis", e - 1] : a >= e - m ? [
64
76
  0,
65
77
  "ellipsis",
66
- ...this._range(l + 1, a - 1 - l)
78
+ ...this._range(m + 1, e - 1 - m)
67
79
  ] : [
68
80
  0,
69
81
  "ellipsis",
70
- e - 1,
71
- e,
72
- e + 1,
82
+ a - 1,
83
+ a,
84
+ a + 1,
73
85
  "ellipsis",
74
- a - 1
86
+ e - 1
75
87
  ];
76
88
  }
77
89
  /** Creates an array of consecutive numbers given the length and the starting value. */
78
- _range(a, e = 0) {
79
- return Array.from({ length: a }, (n, O) => O + e);
90
+ _range(e, a = 0) {
91
+ return Array.from({ length: e }, (n, A) => A + a);
80
92
  }
81
- _handleKeyUp(a) {
82
- if (a.key !== " " && a.key !== "Enter")
93
+ _handleKeyUp(e) {
94
+ if (e.key !== " " && e.key !== "Enter")
83
95
  return;
84
- this._getVisiblePages().find((n) => n === a.target) && (this._markForFocus = this.pageIndex);
96
+ this._getVisiblePages().find((n) => n === e.target) && (this._markForFocus = this.pageIndex);
85
97
  }
86
98
  _renderItemPerPageTemplate() {
87
99
  return this.pageSizeOptions && this.pageSizeOptions.length > 0 ? b`
88
100
  <div class="sbb-paginator__page-size-options">
89
- <label for="select">${D[this.language.current]}</label>
101
+ <label for="select"
102
+ >${this.accessibilityItemsPerPageLabel ? this.accessibilityItemsPerPageLabel : V[this.language.current]}</label
103
+ >
90
104
  <sbb-form-field
91
105
  borderless
92
106
  width="collapse"
@@ -96,35 +110,35 @@ let Q = (() => {
96
110
  <sbb-select
97
111
  id="select"
98
112
  ?disabled=${this.disabled}
99
- value=${this.pageSizeOptions?.find((a) => a === this.pageSize) ?? this.pageSizeOptions[0]}
100
- @change=${(a) => this.pageSize = +a.target.value}
113
+ value=${this.pageSizeOptions?.find((e) => e === this.pageSize) ?? this.pageSizeOptions[0]}
114
+ @change=${(e) => this.pageSize = +e.target.value}
101
115
  >
102
- ${I(this.pageSizeOptions, (a) => b`<sbb-option value=${a}>${a}</sbb-option>`)}
116
+ ${j(this.pageSizeOptions, (e) => b`<sbb-option value=${e}>${e}</sbb-option>`)}
103
117
  </sbb-select>
104
118
  </sbb-form-field>
105
119
  </div>
106
- ` : S;
120
+ ` : E;
107
121
  }
108
122
  _renderPageNumbers() {
109
123
  return b`
110
124
  <ul class="sbb-paginator__pages">
111
- ${I(this._getVisiblePagesIndex(), (a) => a === "ellipsis" ? b`
125
+ ${j(this._getVisiblePagesIndex(), (e) => e === "ellipsis" ? b`
112
126
  <li class="sbb-paginator__page--ellipsis">
113
127
  <span class="sbb-paginator__page--ellipsis-item">…</span>
114
128
  </li>
115
129
  ` : b`
116
130
  <li class="sbb-paginator__page--number">
117
131
  <button
118
- ?data-selected=${this.pageIndex === a}
132
+ ?data-selected=${this.pageIndex === e}
119
133
  ?disabled=${this.disabled}
120
134
  class="sbb-paginator__page--number-item"
121
- data-index=${a}
122
- aria-label="${N[this.language.current]} ${a + 1}"
123
- aria-current=${this.pageIndex === a ? "true" : S}
124
- @click=${() => this.pageIndex = a}
135
+ data-index=${e}
136
+ aria-label="${this.accessibilityPageLabel ? this.accessibilityPageLabel : B[this.language.current]} ${e + 1}"
137
+ aria-current=${this.pageIndex === e ? "true" : E}
138
+ @click=${() => this.pageIndex = e}
125
139
  @keyup=${this._handleKeyUp}
126
140
  >
127
- <span class="sbb-paginator__page--number-item-label">${a + 1}</span>
141
+ <span class="sbb-paginator__page--number-item-label">${e + 1}</span>
128
142
  </button>
129
143
  </li>
130
144
  `)}
@@ -144,17 +158,19 @@ let Q = (() => {
144
158
  </div>
145
159
  `;
146
160
  }
147
- }, p = new WeakMap(), g = new WeakMap(), o = s, (() => {
148
- const a = typeof Symbol == "function" && Symbol.metadata ? Object.create(v[Symbol.metadata] ?? null) : void 0;
149
- f = [$({ attribute: "page-size-options", type: Array })], x = [$({ attribute: "pager-position", reflect: !0 })], h(s, null, f, { kind: "accessor", name: "pageSizeOptions", static: !1, private: !1, access: { has: (e) => "pageSizeOptions" in e, get: (e) => e.pageSizeOptions, set: (e, n) => {
150
- e.pageSizeOptions = n;
151
- } }, metadata: a }, _, y), h(s, null, x, { kind: "accessor", name: "pagerPosition", static: !1, private: !1, access: { has: (e) => "pagerPosition" in e, get: (e) => e.pagerPosition, set: (e, n) => {
152
- e.pagerPosition = n;
153
- } }, metadata: a }, z, w), h(null, r = { value: o }, t, { kind: "class", name: o.name, metadata: a }, null, i), o = r.value, a && Object.defineProperty(o, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: a });
154
- })(), s.styles = M, s.events = {
161
+ }, l = new WeakMap(), c = new WeakMap(), d = new WeakMap(), o = s, (() => {
162
+ const e = typeof Symbol == "function" && Symbol.metadata ? Object.create(v[Symbol.metadata] ?? null) : void 0;
163
+ y = [f({ attribute: "page-size-options", type: Array })], z = [f({ attribute: "pager-position", reflect: !0 })], I = [M(), f({ attribute: "accessibility-items-per-page-label" })], _(s, null, y, { kind: "accessor", name: "pageSizeOptions", static: !1, private: !1, access: { has: (a) => "pageSizeOptions" in a, get: (a) => a.pageSizeOptions, set: (a, n) => {
164
+ a.pageSizeOptions = n;
165
+ } }, metadata: e }, x, P), _(s, null, z, { kind: "accessor", name: "pagerPosition", static: !1, private: !1, access: { has: (a) => "pagerPosition" in a, get: (a) => a.pagerPosition, set: (a, n) => {
166
+ a.pagerPosition = n;
167
+ } }, metadata: e }, w, k), _(s, null, I, { kind: "accessor", name: "accessibilityItemsPerPageLabel", static: !1, private: !1, access: { has: (a) => "accessibilityItemsPerPageLabel" in a, get: (a) => a.accessibilityItemsPerPageLabel, set: (a, n) => {
168
+ a.accessibilityItemsPerPageLabel = n;
169
+ } }, metadata: e }, S, $), _(null, i = { value: o }, t, { kind: "class", name: o.name, metadata: e }, null, r), o = i.value, e && Object.defineProperty(o, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: e });
170
+ })(), s.styles = H, s.events = {
155
171
  page: "page"
156
- }, d(o, i), o;
172
+ }, g(o, r), o;
157
173
  })();
158
174
  export {
159
- Q as SbbPaginatorElement
175
+ ie as SbbPaginatorElement
160
176
  };