@tylertech/forge 2.18.1 → 2.19.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 (131) hide show
  1. package/custom-elements.json +1522 -310
  2. package/dist/esm/accordion/index.js +1 -1
  3. package/dist/esm/app-bar/help-button/index.js +1 -1
  4. package/dist/esm/app-bar/index.js +1 -1
  5. package/dist/esm/app-bar/menu-button/index.js +1 -1
  6. package/dist/esm/app-bar/notification-button/index.js +1 -1
  7. package/dist/esm/app-bar/profile-button/index.js +1 -1
  8. package/dist/esm/app-bar/search/index.js +1 -1
  9. package/dist/esm/autocomplete/index.js +1 -1
  10. package/dist/esm/banner/index.js +1 -1
  11. package/dist/esm/bottom-sheet/index.js +1 -1
  12. package/dist/esm/button-area/index.js +7 -0
  13. package/dist/esm/button-area/index.js.map +7 -0
  14. package/dist/esm/button-toggle/index.js +1 -1
  15. package/dist/esm/calendar/calendar-dropdown/index.js +1 -1
  16. package/dist/esm/calendar/calendar-menu/index.js +1 -1
  17. package/dist/esm/calendar/index.js +1 -1
  18. package/dist/esm/checkbox/index.js +1 -1
  19. package/dist/esm/chip-field/index.js +1 -1
  20. package/dist/esm/chips/chip/index.js +1 -1
  21. package/dist/esm/chips/chip-set/index.js +1 -1
  22. package/dist/esm/chips/index.js +1 -1
  23. package/dist/esm/chunks/{chunk.KCC3C3WH.js → chunk.2EAQ36QO.js} +2 -2
  24. package/dist/esm/chunks/{chunk.3DYMGITQ.js → chunk.3NHRJPT4.js} +2 -2
  25. package/dist/esm/chunks/chunk.4DKCMH6P.js +7 -0
  26. package/dist/esm/chunks/chunk.4DKCMH6P.js.map +7 -0
  27. package/dist/esm/chunks/{chunk.ETJMASRZ.js → chunk.AD4NVLFA.js} +2 -2
  28. package/dist/esm/chunks/{chunk.Z4HBPQ42.js → chunk.BJRQ67AD.js} +2 -2
  29. package/dist/esm/chunks/chunk.DBKVUCUQ.js +7 -0
  30. package/dist/esm/chunks/chunk.DBKVUCUQ.js.map +7 -0
  31. package/dist/esm/chunks/{chunk.NOXJK2U7.js → chunk.GSFM6MH4.js} +2 -2
  32. package/dist/esm/chunks/{chunk.7LX3X2DU.js → chunk.JMRXBELV.js} +2 -2
  33. package/dist/esm/chunks/{chunk.F7ZYEFH5.js → chunk.K55FBLTW.js} +2 -2
  34. package/dist/esm/chunks/chunk.P4VJUJQN.js +7 -0
  35. package/dist/esm/chunks/{chunk.K4SWLH26.js.map → chunk.P4VJUJQN.js.map} +3 -3
  36. package/dist/esm/chunks/{chunk.2NA4LVTZ.js → chunk.P67RC5S3.js} +2 -2
  37. package/dist/esm/chunks/chunk.PBWUHK7Q.js +7 -0
  38. package/dist/esm/chunks/chunk.PBWUHK7Q.js.map +7 -0
  39. package/dist/esm/chunks/{chunk.55HRCXPA.js → chunk.PILDKQOE.js} +2 -2
  40. package/dist/esm/chunks/chunk.RH4E52PS.js +7 -0
  41. package/dist/esm/chunks/chunk.RH4E52PS.js.map +7 -0
  42. package/dist/esm/chunks/{chunk.GBUXAJPY.js → chunk.ROWBKHIO.js} +2 -2
  43. package/dist/esm/chunks/{chunk.J2FXLTZT.js → chunk.SNVWMZNK.js} +2 -2
  44. package/dist/esm/chunks/{chunk.J2FXLTZT.js.map → chunk.SNVWMZNK.js.map} +1 -1
  45. package/dist/esm/chunks/{chunk.AMES2WWC.js → chunk.XAPKK4ZJ.js} +2 -2
  46. package/dist/esm/chunks/chunk.YG2UMTJN.js +12 -0
  47. package/dist/esm/chunks/chunk.YG2UMTJN.js.map +7 -0
  48. package/dist/esm/color-picker/index.js +1 -1
  49. package/dist/esm/core/index.js +1 -1
  50. package/dist/esm/date-picker/index.js +1 -1
  51. package/dist/esm/date-range-picker/index.js +1 -1
  52. package/dist/esm/expansion-panel/index.js +1 -1
  53. package/dist/esm/file-picker/index.js +1 -1
  54. package/dist/esm/floating-label/index.js +1 -1
  55. package/dist/esm/icon/index.js +1 -1
  56. package/dist/esm/icon-button/index.js +1 -1
  57. package/dist/esm/index.js +1 -1
  58. package/dist/esm/list-dropdown/index.js +1 -1
  59. package/dist/esm/menu/index.js +1 -1
  60. package/dist/esm/open-icon/index.js +1 -1
  61. package/dist/esm/paginator/index.js +1 -1
  62. package/dist/esm/profile-card/index.js +1 -1
  63. package/dist/esm/quantity-field/index.js +1 -1
  64. package/dist/esm/select/core/index.js +1 -1
  65. package/dist/esm/select/index.js +1 -1
  66. package/dist/esm/select/select/index.js +1 -1
  67. package/dist/esm/select/select-dropdown/index.js +1 -1
  68. package/dist/esm/slider/index.js +1 -1
  69. package/dist/esm/split-view/index.js +1 -1
  70. package/dist/esm/split-view/split-view/index.js +1 -1
  71. package/dist/esm/split-view/split-view-panel/index.js +1 -1
  72. package/dist/esm/stepper/index.js +1 -1
  73. package/dist/esm/stepper/step/index.js +1 -1
  74. package/dist/esm/stepper/stepper/index.js +1 -1
  75. package/dist/esm/switch/index.js +1 -1
  76. package/dist/esm/table/index.js +1 -1
  77. package/dist/esm/tabs/index.js +1 -1
  78. package/dist/esm/tabs/tab-bar/index.js +1 -1
  79. package/dist/esm/text-field/index.js +1 -1
  80. package/dist/esm/time-picker/index.js +1 -1
  81. package/dist/esm/toast/index.js +1 -1
  82. package/esm/button-area/button-area-adapter.d.ts +45 -0
  83. package/esm/button-area/button-area-adapter.js +106 -0
  84. package/esm/button-area/button-area-constants.d.ts +24 -0
  85. package/esm/button-area/button-area-constants.js +30 -0
  86. package/esm/button-area/button-area-foundation.d.ts +29 -0
  87. package/esm/button-area/button-area-foundation.js +93 -0
  88. package/esm/button-area/button-area.d.ts +24 -0
  89. package/esm/button-area/button-area.js +50 -0
  90. package/esm/button-area/index.d.ts +10 -0
  91. package/esm/button-area/index.js +14 -0
  92. package/esm/expansion-panel/expansion-panel-adapter.d.ts +1 -0
  93. package/esm/expansion-panel/expansion-panel-adapter.js +7 -2
  94. package/esm/field/field-foundation.d.ts +1 -0
  95. package/esm/field/field-foundation.js +17 -7
  96. package/esm/floating-label/floating-label-foundation.d.ts +4 -1
  97. package/esm/floating-label/floating-label-foundation.js +9 -6
  98. package/esm/floating-label/floating-label.d.ts +6 -2
  99. package/esm/floating-label/floating-label.js +2 -2
  100. package/esm/index.d.ts +1 -0
  101. package/esm/index.js +3 -0
  102. package/esm/paginator/paginator-adapter.d.ts +27 -25
  103. package/esm/paginator/paginator-adapter.js +4 -6
  104. package/esm/paginator/paginator-foundation.d.ts +33 -80
  105. package/esm/paginator/paginator-foundation.js +218 -255
  106. package/esm/paginator/paginator.d.ts +0 -2
  107. package/esm/paginator/paginator.js +0 -2
  108. package/esm/split-view/split-view-panel/split-view-panel.js +1 -1
  109. package/package.json +1 -1
  110. package/styles/button-area/_mixins.scss +47 -0
  111. package/styles/button-area/button-area.scss +16 -0
  112. package/dist/esm/chunks/chunk.7G53ACL4.js +0 -7
  113. package/dist/esm/chunks/chunk.7G53ACL4.js.map +0 -7
  114. package/dist/esm/chunks/chunk.AMWDVFAU.js +0 -7
  115. package/dist/esm/chunks/chunk.AMWDVFAU.js.map +0 -7
  116. package/dist/esm/chunks/chunk.K4SWLH26.js +0 -7
  117. package/dist/esm/chunks/chunk.TOM77CWD.js +0 -7
  118. package/dist/esm/chunks/chunk.TOM77CWD.js.map +0 -7
  119. package/dist/esm/chunks/chunk.U773QUMB.js +0 -12
  120. package/dist/esm/chunks/chunk.U773QUMB.js.map +0 -7
  121. /package/dist/esm/chunks/{chunk.KCC3C3WH.js.map → chunk.2EAQ36QO.js.map} +0 -0
  122. /package/dist/esm/chunks/{chunk.3DYMGITQ.js.map → chunk.3NHRJPT4.js.map} +0 -0
  123. /package/dist/esm/chunks/{chunk.ETJMASRZ.js.map → chunk.AD4NVLFA.js.map} +0 -0
  124. /package/dist/esm/chunks/{chunk.Z4HBPQ42.js.map → chunk.BJRQ67AD.js.map} +0 -0
  125. /package/dist/esm/chunks/{chunk.NOXJK2U7.js.map → chunk.GSFM6MH4.js.map} +0 -0
  126. /package/dist/esm/chunks/{chunk.7LX3X2DU.js.map → chunk.JMRXBELV.js.map} +0 -0
  127. /package/dist/esm/chunks/{chunk.F7ZYEFH5.js.map → chunk.K55FBLTW.js.map} +0 -0
  128. /package/dist/esm/chunks/{chunk.2NA4LVTZ.js.map → chunk.P67RC5S3.js.map} +0 -0
  129. /package/dist/esm/chunks/{chunk.55HRCXPA.js.map → chunk.PILDKQOE.js.map} +0 -0
  130. /package/dist/esm/chunks/{chunk.GBUXAJPY.js.map → chunk.ROWBKHIO.js.map} +0 -0
  131. /package/dist/esm/chunks/{chunk.AMES2WWC.js.map → chunk.XAPKK4ZJ.js.map} +0 -0
@@ -5,202 +5,33 @@
5
5
  */
6
6
  import { coerceNumber, isArray, isDefined } from '@tylertech/forge-core';
7
7
  import { PAGINATOR_CONSTANTS } from './paginator-constants';
8
- /**
9
- * The foundation class behind the `<forge-paginator>` component.
10
- */
11
8
  export class PaginatorFoundation {
12
9
  constructor(_adapter) {
13
10
  this._adapter = _adapter;
14
- // Backing models
15
11
  this._pageIndex = PAGINATOR_CONSTANTS.numbers.DEFAULT_PAGE_INDEX;
16
12
  this._pageSize = PAGINATOR_CONSTANTS.numbers.DEFAULT_PAGE_SIZE;
13
+ this._offset = 0;
17
14
  this._total = PAGINATOR_CONSTANTS.numbers.DEFAULT_TOTAL;
18
- this._pageSizeOptions = [];
15
+ this._pageSizeOptions = PAGINATOR_CONSTANTS.numbers.DEFAULT_PAGE_SIZE_OPTIONS.map(o => ({ label: `${o}`, value: `${o}` }));
19
16
  this._label = PAGINATOR_CONSTANTS.strings.DEFAULT_LABEL;
20
17
  this._firstLast = false;
21
18
  this._first = false;
22
19
  this._disabled = false;
23
20
  this._alignment = 'space-between';
24
- // Create listeners
25
21
  this._pageSizeListener = (evt) => this._onPageSizeChanged(evt);
26
22
  this._firstPageListener = (evt) => this._onFirstPage(evt);
27
23
  this._previousPageListener = (evt) => this._onPreviousPage(evt);
28
24
  this._nextPageListener = (evt) => this._onNextPage(evt);
29
25
  this._lastPageListener = (evt) => this._onLastPage(evt);
30
- this._pageSizeOptions = PAGINATOR_CONSTANTS.numbers.DEFAULT_PAGE_SIZE_OPTIONS.map(o => ({ label: o.toString(), value: o.toString() }));
31
- }
32
- /** The zero-based page index. Default is 0. */
33
- set pageIndex(value) {
34
- if (this._pageIndex !== value) {
35
- if (isDefined(value)) {
36
- this._pageIndex = value;
37
- this._update();
38
- this._adapter.setHostAttribute(PAGINATOR_CONSTANTS.attributes.PAGE_INDEX, this._pageIndex.toString());
39
- }
40
- else {
41
- this._adapter.removeHostAttribute(PAGINATOR_CONSTANTS.attributes.PAGE_INDEX);
42
- }
43
- }
44
- }
45
- get pageIndex() {
46
- return this._pageIndex;
47
- }
48
- /** Number of items to display on a page. By default set to 25. */
49
- set pageSize(value) {
50
- if (this._pageSize !== value) {
51
- this._pageSize = value;
52
- this._adapter.setPageSize(this._pageSize);
53
- this._update();
54
- this._adapter.setHostAttribute(PAGINATOR_CONSTANTS.attributes.PAGE_SIZE, this._pageSize.toString());
55
- }
56
- }
57
- get pageSize() {
58
- return this._pageSize;
59
- }
60
- /** Sets page index by providing the number of items to skip. */
61
- set offset(value) {
62
- if (value >= this._total) {
63
- if (this._total >= this._pageSize) {
64
- value = this._total - this._pageSize;
65
- }
66
- else {
67
- value = 0;
68
- }
69
- }
70
- const clampedValue = Math.min(Math.max(value, 0), this._total);
71
- this.pageIndex = Math.floor(clampedValue / this._pageSize);
72
- }
73
- get offset() {
74
- return this._pageIndex * this._pageSize;
75
- }
76
- /** The total number of items to be paginated. Default is 0. */
77
- set total(value) {
78
- if (this._total !== value) {
79
- this._total = value;
80
- this._update();
81
- this._adapter.setHostAttribute(PAGINATOR_CONSTANTS.attributes.TOTAL, this._total.toString());
82
- }
83
- }
84
- get total() {
85
- return this._total;
86
- }
87
- /** The set of provided page size options to display to the user. */
88
- set pageSizeOptions(options) {
89
- if (isArray(options)) {
90
- this._pageSizeOptions = options
91
- .map(o => ({ label: o.toString(), value: o.toString() }))
92
- .sort((a, b) => coerceNumber(a.value) - coerceNumber(b.value));
93
- this._adapter.setPageSizeOptions(this._pageSizeOptions);
94
- this._adapter.attachPageSizeChangeListener(this._pageSizeListener);
95
- this._adapter.setPageSizeVisibility(true);
96
- if (isDefined(this._pageSize) && this._pageSizeOptions.length && !this._pageSizeOptions.find(o => coerceNumber(o.value) === this._pageSize)) {
97
- this.pageSize = coerceNumber(this._pageSizeOptions[0].value);
98
- }
99
- }
100
- else if (options.toString().toLowerCase() === 'false') {
101
- this._adapter.detachPageSizeChangeListener(this._pageSizeListener);
102
- this._adapter.setPageSizeVisibility(false);
103
- }
104
- }
105
- get pageSizeOptions() {
106
- return this._pageSizeOptions.map(o => Number(o.value));
107
- }
108
- /** A label for the paginator. Default is "Rows per page:". */
109
- set label(value) {
110
- if (this._label !== value) {
111
- this._label = value;
112
- this._adapter.setLabel(this._label);
113
- this._adapter.setHostAttribute(PAGINATOR_CONSTANTS.attributes.LABEL, isDefined(this._label) ? this._label.toString() : '');
114
- }
115
26
  }
116
- get label() {
117
- return this._label;
118
- }
119
- /** Whether to show the first page and last page buttons. Default is false. */
120
- set firstLast(value) {
121
- if (this._firstLast !== value) {
122
- this._firstLast = value;
123
- this._toggleFirstLastButtons();
124
- if (this._firstLast) {
125
- this._adapter.setHostAttribute(PAGINATOR_CONSTANTS.attributes.FIRST_LAST);
126
- }
127
- else {
128
- this._adapter.removeHostAttribute(PAGINATOR_CONSTANTS.attributes.FIRST_LAST);
129
- }
130
- }
131
- }
132
- get firstLast() {
133
- return this._firstLast;
134
- }
135
- /** Whether to show the first page button. Default is false. */
136
- set first(value) {
137
- if (this._first !== value) {
138
- this._first = value;
139
- this._toggleFirstButton();
140
- if (this._first) {
141
- this._adapter.setHostAttribute(PAGINATOR_CONSTANTS.attributes.FIRST);
142
- }
143
- else {
144
- this._adapter.removeHostAttribute(PAGINATOR_CONSTANTS.attributes.FIRST);
145
- }
146
- }
147
- }
148
- get first() {
149
- return this._first;
150
- }
151
- /** Whether the paginator is disabled. Default is false. */
152
- set disabled(value) {
153
- if (this._disabled !== value) {
154
- this._disabled = value;
155
- this._update();
156
- if (this._disabled) {
157
- this._adapter.setHostAttribute(PAGINATOR_CONSTANTS.attributes.DISABLED);
158
- }
159
- else {
160
- this._adapter.removeHostAttribute(PAGINATOR_CONSTANTS.attributes.DISABLED);
161
- }
162
- }
163
- }
164
- get disabled() {
165
- return this._disabled;
166
- }
167
- get alternative() {
168
- return this._alternative;
169
- }
170
- set alternative(value) {
171
- if (value !== this._alternative) {
172
- this._alternative = value;
173
- this._applyAlternative();
174
- }
175
- }
176
- get alignment() {
177
- return this._alignment;
178
- }
179
- set alignment(value) {
180
- if (value !== this._alignment) {
181
- this._alignment = value;
182
- this._applyAlternativeAlignment();
183
- }
184
- }
185
- _applyAlternativeAlignment() {
186
- this._adapter.setHostAttribute(PAGINATOR_CONSTANTS.attributes.ALIGNMENT, this._alignment);
187
- this._adapter.setAlignment(this._alignment);
188
- }
189
- _applyAlternative() {
190
- this._adapter.toggleHostAttribute(PAGINATOR_CONSTANTS.attributes.ALTERNATIVE, this._alternative);
191
- this._adapter.setAlternative(this._alternative);
192
- this._applyAlternativeAlignment();
193
- }
194
- /**
195
- * Intializes the internal state when the component loads.
196
- */
197
27
  initialize() {
198
- this._update();
28
+ this._updateRangeLabel();
199
29
  this._adapter.setLabel(this._label);
200
30
  this._adapter.setPageSizeOptions(this._pageSizeOptions);
201
31
  this._adapter.setPageSize(this._pageSize);
202
32
  this._attachListeners();
203
33
  this._toggleFirstLastButtons();
34
+ this._syncInteractionState();
204
35
  }
205
36
  disconnect() {
206
37
  this._detachListeners();
@@ -219,10 +50,6 @@ export class PaginatorFoundation {
219
50
  this._adapter.detachNextPageListener(this._nextPageListener);
220
51
  this._adapter.detachLastPageListener(this._lastPageListener);
221
52
  }
222
- /**
223
- * Handles clicking the first page button.
224
- * @param evt The click event.
225
- */
226
53
  _onFirstPage(evt) {
227
54
  evt.stopPropagation();
228
55
  if (!this._hasFirstPage()) {
@@ -231,13 +58,9 @@ export class PaginatorFoundation {
231
58
  const firstPage = 0;
232
59
  const canPage = this._emitChangeEvent(PAGINATOR_CONSTANTS.strings.FIRST_PAGE, { pageIndex: firstPage });
233
60
  if (canPage) {
234
- this.pageIndex = firstPage;
61
+ this._applyPageIndex(firstPage, { fromField: 'first' });
235
62
  }
236
63
  }
237
- /**
238
- * Handles clicking the previous page button.
239
- * @param evt The click event.
240
- */
241
64
  _onPreviousPage(evt) {
242
65
  evt.stopPropagation();
243
66
  if (!this._hasPreviousPage()) {
@@ -246,13 +69,9 @@ export class PaginatorFoundation {
246
69
  const prevPage = this._pageIndex - 1;
247
70
  const canPage = this._emitChangeEvent(PAGINATOR_CONSTANTS.strings.PREVIOUS_PAGE, { pageIndex: prevPage });
248
71
  if (canPage) {
249
- this.pageIndex = prevPage;
72
+ this._applyPageIndex(prevPage, { fromField: 'previous' });
250
73
  }
251
74
  }
252
- /**
253
- * Handles clicking the next page button.
254
- * @param evt The click event.
255
- */
256
75
  _onNextPage(evt) {
257
76
  evt.stopPropagation();
258
77
  if (!this._hasNextPage()) {
@@ -261,13 +80,9 @@ export class PaginatorFoundation {
261
80
  const nextPage = this._pageIndex + 1;
262
81
  const canPage = this._emitChangeEvent(PAGINATOR_CONSTANTS.strings.NEXT_PAGE, { pageIndex: nextPage });
263
82
  if (canPage) {
264
- this.pageIndex = nextPage;
83
+ this._applyPageIndex(nextPage, { fromField: 'next' });
265
84
  }
266
85
  }
267
- /**
268
- * Handles clicking the last page button.
269
- * @param evt The click event.
270
- */
271
86
  _onLastPage(evt) {
272
87
  evt.stopPropagation();
273
88
  if (!this._hasLastPage()) {
@@ -276,20 +91,16 @@ export class PaginatorFoundation {
276
91
  const lastPage = this._getMaxPages();
277
92
  const canPage = this._emitChangeEvent(PAGINATOR_CONSTANTS.strings.LAST_PAGE, { pageIndex: lastPage });
278
93
  if (canPage) {
279
- this.pageIndex = lastPage;
94
+ this._applyPageIndex(lastPage, { fromField: 'last' });
280
95
  }
281
96
  }
282
- /**
283
- * Handles selecting a new item in the page size options.
284
- * @param evt The select custom event.
285
- */
286
97
  _onPageSizeChanged(evt) {
287
98
  evt.stopPropagation();
288
99
  const pageSize = Number(evt.detail);
289
100
  const canPage = this._emitChangeEvent(PAGINATOR_CONSTANTS.strings.PAGE_SIZE, { pageIndex: 0, pageSize });
290
101
  if (canPage) {
291
- this.pageIndex = 0;
292
- this.pageSize = pageSize;
102
+ this._applyPageIndex(0, { fromField: 'page-size' });
103
+ this._applyPageSize(pageSize);
293
104
  }
294
105
  else {
295
106
  evt.preventDefault();
@@ -300,17 +111,10 @@ export class PaginatorFoundation {
300
111
  const detail = { type, pageSize, pageIndex, offset };
301
112
  return this._adapter.emitHostEvent(PAGINATOR_CONSTANTS.events.CHANGE, detail, true, true);
302
113
  }
303
- /**
304
- * Returns the max number of pages based on our current parameters.
305
- */
306
114
  _getMaxPages() {
307
115
  return Math.ceil(this._total / this._pageSize) - 1;
308
116
  }
309
- /**
310
- * Updates our internal state as well as updating the UI.
311
- */
312
- _update() {
313
- // Create and update the range label
117
+ _updateRangeLabel() {
314
118
  if (this.pageSize > 1) {
315
119
  const startIndex = this._pageIndex * this._pageSize;
316
120
  const indexStart = Math.floor(startIndex / this._pageSize) || 0;
@@ -322,48 +126,37 @@ export class PaginatorFoundation {
322
126
  this._rangeLabel = `${this._pageIndex + 1} ${PAGINATOR_CONSTANTS.strings.RANGE_SEPARATOR_LABEL} ${this._total}`;
323
127
  }
324
128
  this._adapter.setRangeLabel(this._rangeLabel);
325
- if (this.disabled) {
326
- this._adapter.disablePageSizeSelect();
129
+ }
130
+ _syncInteractionState(fromField = null) {
131
+ this._adapter.enableFirstPageButton();
132
+ this._adapter.enablePreviousPageButton();
133
+ this._adapter.enableNextPageButton();
134
+ this._adapter.enableLastPageButton();
135
+ if (!this._hasFirstPage()) {
136
+ if (fromField) {
137
+ this._adapter.handleFocusMove(fromField);
138
+ }
327
139
  this._adapter.disableFirstPageButton();
328
- this._adapter.disablePreviousPageButton();
329
- this._adapter.disableNextPageButton();
330
- this._adapter.disableLastPageButton();
331
140
  }
332
- else {
333
- this._adapter.enablePageSizeSelect();
334
- // Check if first page button needs to be enabled/disabled
335
- if (this._hasFirstPage()) {
336
- this._adapter.enableFirstPageButton();
337
- }
338
- else {
339
- this._adapter.disableFirstPageButton();
340
- }
341
- // Check if previous page button needs to be enabled/disabled
342
- if (this._hasPreviousPage()) {
343
- this._adapter.enablePreviousPageButton();
344
- }
345
- else {
346
- this._adapter.disablePreviousPageButton();
347
- }
348
- // Check if next page button needs to be enabled/disabled
349
- if (this._hasNextPage()) {
350
- this._adapter.enableNextPageButton();
351
- }
352
- else {
353
- this._adapter.disableNextPageButton();
141
+ if (!this._hasPreviousPage()) {
142
+ if (fromField) {
143
+ this._adapter.handleFocusMove(fromField);
354
144
  }
355
- // Check if last page button needs to be enabled/disabled
356
- if (this._hasLastPage()) {
357
- this._adapter.enableLastPageButton();
145
+ this._adapter.disablePreviousPageButton();
146
+ }
147
+ if (!this._hasNextPage()) {
148
+ if (fromField) {
149
+ this._adapter.handleFocusMove(fromField);
358
150
  }
359
- else {
360
- this._adapter.disableLastPageButton();
151
+ this._adapter.disableNextPageButton();
152
+ }
153
+ if (!this._hasLastPage()) {
154
+ if (fromField) {
155
+ this._adapter.handleFocusMove(fromField);
361
156
  }
157
+ this._adapter.disableLastPageButton();
362
158
  }
363
159
  }
364
- /**
365
- * Toggle showing/hiding first and last buttons based on the show first/last buttons flag.
366
- */
367
160
  _toggleFirstLastButtons() {
368
161
  this._toggleFirstButton();
369
162
  if (this._firstLast) {
@@ -377,9 +170,6 @@ export class PaginatorFoundation {
377
170
  }
378
171
  }
379
172
  }
380
- /**
381
- * Toggle showing/hiding first button based on the show first or first/last buttons flags.
382
- */
383
173
  _toggleFirstButton() {
384
174
  if (this._first || this._firstLast) {
385
175
  if (!this._adapter.hasFirstPageButton()) {
@@ -392,25 +182,198 @@ export class PaginatorFoundation {
392
182
  }
393
183
  }
394
184
  }
395
- /** Checks if a first page exists. */
396
185
  _hasFirstPage() {
397
- // same as has previous page
398
186
  return this._hasPreviousPage();
399
187
  }
400
- /**
401
- * Checks if a previous page exists.
402
- */
403
188
  _hasPreviousPage() {
404
- return this._pageIndex >= 1 && this._pageSize !== 0;
189
+ return this._pageIndex > 0 && this._pageSize > 0;
405
190
  }
406
- /** Checks if a next page exists */
407
191
  _hasNextPage() {
408
192
  const maxPages = this._getMaxPages();
409
- return this._pageIndex < maxPages && this._pageSize !== 0;
193
+ return this._pageIndex < maxPages && this._pageSize > 0;
410
194
  }
411
- /** Checks if a last page exists. */
412
195
  _hasLastPage() {
413
- // same as has next page
414
196
  return this._hasNextPage();
415
197
  }
198
+ _computePageIndexFromOffset(value) {
199
+ if (value >= this._total) {
200
+ if (this._total >= this._pageSize) {
201
+ value = this._total - this._pageSize;
202
+ }
203
+ else {
204
+ value = 0;
205
+ }
206
+ }
207
+ const clampedValue = Math.min(Math.max(value, 0), this._total);
208
+ const pageIndex = Math.floor(clampedValue / this._pageSize);
209
+ this._applyPageIndex(pageIndex);
210
+ }
211
+ _computeOffset() {
212
+ if (this._total > 0) {
213
+ this._offset = this._pageIndex * this._pageSize;
214
+ }
215
+ }
216
+ _applyPageIndex(value, { fromField = null } = {}) {
217
+ this._pageIndex = value;
218
+ this._computeOffset();
219
+ this._updateRangeLabel();
220
+ this._syncInteractionState(fromField);
221
+ this._adapter.toggleHostAttribute(PAGINATOR_CONSTANTS.attributes.PAGE_INDEX, this._pageIndex != null, this._pageIndex.toString());
222
+ }
223
+ _applyPageSize(value) {
224
+ this._pageSize = value;
225
+ this._adapter.setPageSize(this._pageSize);
226
+ this._computeOffset();
227
+ this._updateRangeLabel();
228
+ this._syncInteractionState();
229
+ }
230
+ _applyTotal(value) {
231
+ this._total = value;
232
+ this._updateRangeLabel();
233
+ if (this._offset > 0 && this._total > 0) {
234
+ this._computePageIndexFromOffset(this._offset);
235
+ }
236
+ this._syncInteractionState();
237
+ }
238
+ _applyAlternativeAlignment() {
239
+ this._adapter.setHostAttribute(PAGINATOR_CONSTANTS.attributes.ALIGNMENT, this._alignment);
240
+ this._adapter.setAlignment(this._alignment);
241
+ }
242
+ _applyDisabled(disabled) {
243
+ this._disabled = disabled;
244
+ if (disabled) {
245
+ this._adapter.disablePageSizeSelect();
246
+ this._adapter.disableFirstPageButton();
247
+ this._adapter.disablePreviousPageButton();
248
+ this._adapter.disableNextPageButton();
249
+ this._adapter.disableLastPageButton();
250
+ }
251
+ else {
252
+ this._adapter.enablePageSizeSelect();
253
+ this._syncInteractionState();
254
+ }
255
+ }
256
+ get pageIndex() {
257
+ return this._pageIndex;
258
+ }
259
+ set pageIndex(value) {
260
+ if (this._pageIndex !== value) {
261
+ if (isDefined(value)) {
262
+ this._applyPageIndex(value);
263
+ }
264
+ else {
265
+ this._adapter.removeHostAttribute(PAGINATOR_CONSTANTS.attributes.PAGE_INDEX);
266
+ }
267
+ }
268
+ }
269
+ get pageSize() {
270
+ return this._pageSize;
271
+ }
272
+ set pageSize(value) {
273
+ if (this._pageSize !== value) {
274
+ this._applyPageSize(value);
275
+ this._adapter.setHostAttribute(PAGINATOR_CONSTANTS.attributes.PAGE_SIZE, `${this._pageSize}`);
276
+ }
277
+ }
278
+ get offset() {
279
+ return this._offset;
280
+ }
281
+ set offset(value) {
282
+ if (this._offset !== value) {
283
+ this._offset = value;
284
+ this._computePageIndexFromOffset(value);
285
+ }
286
+ }
287
+ get total() {
288
+ return this._total;
289
+ }
290
+ set total(value) {
291
+ if (this._total !== value) {
292
+ this._applyTotal(value);
293
+ this._adapter.setHostAttribute(PAGINATOR_CONSTANTS.attributes.TOTAL, `${this._total}`);
294
+ }
295
+ }
296
+ get pageSizeOptions() {
297
+ return this._pageSizeOptions.map(o => Number(o.value));
298
+ }
299
+ set pageSizeOptions(options) {
300
+ if (isArray(options)) {
301
+ this._pageSizeOptions = options
302
+ .map(o => ({ label: o.toString(), value: o.toString() }))
303
+ .sort((a, b) => coerceNumber(a.value) - coerceNumber(b.value));
304
+ this._adapter.setPageSizeOptions(this._pageSizeOptions);
305
+ this._adapter.attachPageSizeChangeListener(this._pageSizeListener);
306
+ this._adapter.setPageSizeVisibility(true);
307
+ if (isDefined(this._pageSize) && this._pageSizeOptions.length && !this._pageSizeOptions.find(o => coerceNumber(o.value) === this._pageSize)) {
308
+ const pageSize = coerceNumber(this._pageSizeOptions[0].value);
309
+ this._applyPageSize(pageSize);
310
+ }
311
+ }
312
+ else if (options.toString().toLowerCase() === 'false') {
313
+ this._adapter.detachPageSizeChangeListener(this._pageSizeListener);
314
+ this._adapter.setPageSizeVisibility(false);
315
+ }
316
+ }
317
+ get label() {
318
+ return this._label;
319
+ }
320
+ set label(value) {
321
+ if (this._label !== value) {
322
+ this._label = value;
323
+ this._adapter.setLabel(this._label);
324
+ this._adapter.setHostAttribute(PAGINATOR_CONSTANTS.attributes.LABEL, isDefined(this._label) ? this._label.toString() : '');
325
+ }
326
+ }
327
+ get firstLast() {
328
+ return this._firstLast;
329
+ }
330
+ set firstLast(value) {
331
+ value = Boolean(value);
332
+ if (this._firstLast !== value) {
333
+ this._firstLast = value;
334
+ this._toggleFirstLastButtons();
335
+ this._adapter.toggleHostAttribute(PAGINATOR_CONSTANTS.attributes.FIRST_LAST, this._firstLast);
336
+ }
337
+ }
338
+ get first() {
339
+ return this._first;
340
+ }
341
+ set first(value) {
342
+ value = Boolean(value);
343
+ if (this._first !== value) {
344
+ this._first = value;
345
+ this._toggleFirstButton();
346
+ this._adapter.toggleHostAttribute(PAGINATOR_CONSTANTS.attributes.FIRST, this._first);
347
+ }
348
+ }
349
+ get disabled() {
350
+ return this._disabled;
351
+ }
352
+ set disabled(value) {
353
+ value = Boolean(value);
354
+ if (this._disabled !== value) {
355
+ this._applyDisabled(value);
356
+ this._adapter.toggleHostAttribute(PAGINATOR_CONSTANTS.attributes.DISABLED, this._disabled);
357
+ }
358
+ }
359
+ get alternative() {
360
+ return this._alternative;
361
+ }
362
+ set alternative(value) {
363
+ if (value !== this._alternative) {
364
+ this._alternative = value;
365
+ this._adapter.setAlternative(this._alternative);
366
+ this._applyAlternativeAlignment();
367
+ this._adapter.toggleHostAttribute(PAGINATOR_CONSTANTS.attributes.ALTERNATIVE, this._alternative);
368
+ }
369
+ }
370
+ get alignment() {
371
+ return this._alignment;
372
+ }
373
+ set alignment(value) {
374
+ if (value !== this._alignment) {
375
+ this._alignment = value;
376
+ this._applyAlternativeAlignment();
377
+ }
378
+ }
416
379
  }
@@ -27,8 +27,6 @@ declare global {
27
27
  }
28
28
  }
29
29
  /**
30
- * The custom element class behind the `<forge-paginator>` component.
31
- *
32
30
  * @tag forge-paginator
33
31
  */
34
32
  export declare class PaginatorComponent extends BaseComponent implements IPaginatorComponent {
@@ -17,8 +17,6 @@ import { TooltipComponent } from '../tooltip';
17
17
  const template = '<template><div class=\"forge-paginator\" part=\"root\"><div class=\"forge-paginator__container\" part=\"container\"><div class=\"forge-paginator__label\" part=\"label\"></div><forge-select class=\"forge-paginator__page-size-options\" aria-label=\"Choose page size\" density=\"dense\" part=\"page-size-options\"></forge-select><div class=\"forge-paginator__range-label\" part=\"range-label\"></div><forge-icon-button class=\"forge-paginator__first-page\" part=\"first-page-button\"><button aria-label=\"First Page\" part=\"first-page-button-element\"><forge-icon name=\"first_page\" part=\"first-page-icon\"></forge-icon></button><forge-tooltip position=\"top\">Go to the first page</forge-tooltip></forge-icon-button><forge-icon-button class=\"forge-paginator__previous-page\" part=\"previous-page-button\"><button aria-label=\"Previous Page\" part=\"previous-page-button-element\"><forge-icon name=\"keyboard_arrow_left\" part=\"previous-page-button-icon\"></forge-icon></button><forge-tooltip position=\"top\">Go to the previous page</forge-tooltip></forge-icon-button><div class=\"forge-paginator__range-label--alternative\" part=\"range-label-alternative\"></div><forge-icon-button class=\"forge-paginator__next-page\" part=\"next-page-button\"><button aria-label=\"Next Page\" part=\"next-page-button-element\"><forge-icon name=\"keyboard_arrow_right\" part=\"next-page-icon\"></forge-icon></button><forge-tooltip position=\"top\">Go to the next page</forge-tooltip></forge-icon-button><forge-icon-button class=\"forge-paginator__last-page\" part=\"last-page-button\"><button aria-label=\"Last Page\" part=\"last-page-button-element\"><forge-icon name=\"last_page\" part=\"last-page-icon\"></forge-icon></button><forge-tooltip position=\"top\">Go to the last page</forge-tooltip></forge-icon-button></div></div></template>';
18
18
  const styles = '.forge-icon-button{display:-webkit-inline-box;display:inline-flex;-webkit-box-pack:center;justify-content:center;-webkit-box-align:center;align-items:center;position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;border:none;outline:0;background-color:transparent;fill:currentColor;color:inherit;font-size:24px;text-decoration:none;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:48px;height:48px;padding:12px}.forge-icon-button forge-icon,.forge-icon-button img,.forge-icon-button svg{width:24px;height:24px}.forge-icon-button:disabled{color:rgba(0,0,0,.38);color:var(--mdc-theme-text-disabled-on-light,rgba(0,0,0,.38))}.forge-icon-button:disabled{cursor:default;pointer-events:none}.forge-icon-button__icon{display:inline-block}.forge-icon-button__icon.forge-icon-button__icon--on{display:none}.forge-icon-button--on .forge-icon-button__icon{display:none}.forge-icon-button--on .forge-icon-button__icon.forge-icon-button__icon--on{display:inline-block}@-webkit-keyframes mdc-ripple-fg-radius-in{from{-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);-webkit-transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1)}to{-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}}@keyframes mdc-ripple-fg-radius-in{from{-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);-webkit-transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1)}to{-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}}@-webkit-keyframes mdc-ripple-fg-opacity-in{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-in{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@-webkit-keyframes mdc-ripple-fg-opacity-out{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}@keyframes mdc-ripple-fg-opacity-out{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}.forge-icon-button{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:transparent;will-change:transform,opacity}.forge-icon-button::after,.forge-icon-button::before{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:\"\"}.forge-icon-button::before{-webkit-transition:opacity 15ms linear,background-color 15ms linear;transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}.forge-icon-button::after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}.forge-icon-button.mdc-ripple-upgraded::before{-webkit-transform:scale(var(--mdc-ripple-fg-scale,1));transform:scale(var(--mdc-ripple-fg-scale,1))}.forge-icon-button.mdc-ripple-upgraded::after{top:0;left:0;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:center center;transform-origin:center center}.forge-icon-button.mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top,0);left:var(--mdc-ripple-left,0)}.forge-icon-button.mdc-ripple-upgraded--foreground-activation::after{-webkit-animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards;animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.forge-icon-button.mdc-ripple-upgraded--foreground-deactivation::after{-webkit-animation:mdc-ripple-fg-opacity-out 150ms;animation:mdc-ripple-fg-opacity-out 150ms;-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}.forge-icon-button::after,.forge-icon-button::before{top:calc(50% - 50%);left:calc(50% - 50%);width:100%;height:100%}.forge-icon-button.mdc-ripple-upgraded::after,.forge-icon-button.mdc-ripple-upgraded::before{top:var(--mdc-ripple-top,calc(50% - 50%));left:var(--mdc-ripple-left,calc(50% - 50%));width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.forge-icon-button.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.forge-icon-button::after,.forge-icon-button::before{background-color:#000;background-color:var(--mdc-ripple-color,var(--mdc-theme-on-surface,#000))}.forge-icon-button.mdc-ripple-surface--hover::before,.forge-icon-button:hover::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity, .04)}.forge-icon-button.mdc-ripple-upgraded--background-focused::before,.forge-icon-button:not(.mdc-ripple-upgraded):focus::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity, .12)}.forge-icon-button:not(.mdc-ripple-upgraded)::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.forge-icon-button:not(.mdc-ripple-upgraded):active::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity, .12)}.forge-icon-button.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}forge-icon-button{position:relative;display:inline-block;overflow:visible}.forge-icon-button--on{color:#3f51b5;color:var(--mdc-theme-primary,#3f51b5)}.forge-icon-button--on::after,.forge-icon-button--on::before{background-color:#3f51b5;background-color:var(--mdc-ripple-color,var(--mdc-theme-primary,#3f51b5))}.forge-icon-button--on.mdc-ripple-surface--hover::before,.forge-icon-button--on:hover::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity, .04)}.forge-icon-button--on.mdc-ripple-upgraded--background-focused::before,.forge-icon-button--on:not(.mdc-ripple-upgraded):focus::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity, .12)}.forge-icon-button--on:not(.mdc-ripple-upgraded)::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.forge-icon-button--on:not(.mdc-ripple-upgraded):active::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity, .12)}.forge-icon-button--on.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.forge-icon-button--on::before{background-color:#3f51b5;background-color:var(--mdc-theme-primary,#3f51b5);opacity:.08}.forge-icon-button--dense{width:28px;height:28px;padding:2px;padding:0}.forge-icon-button--dense-1{width:44px;height:44px;padding:10px}.forge-icon-button--dense-2{width:40px;height:40px;padding:8px}.forge-icon-button--dense-3{width:36px;height:36px;padding:6px}.forge-icon-button--dense-4{width:32px;height:32px;padding:4px}.forge-icon-button--dense-5{width:28px;height:28px;padding:2px}.forge-icon-button--dense-6{width:24px;height:24px;padding:0}.forge-icon-button--with-badge forge-badge{z-index:1;z-index:var(--forge-z-index-surface,1);pointer-events:none;--forge-badge-max-width:32px;--forge-badge-border:1px solid transparent}.forge-icon-button--with-badge forge-badge[app-bar-context]{--forge-badge-border:2px solid var(--forge-app-bar-theme-background)}.forge-paginator{display:inline-block}.forge-paginator--alternative{display:-webkit-box;display:flex}.forge-paginator--alternative .forge-paginator__label,.forge-paginator--alternative .forge-paginator__page-size-options,.forge-paginator--alternative .forge-paginator__range-label{display:none}.forge-paginator--alternative .forge-paginator__range-label--alternative{display:inline-block;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-body2-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:.875rem;font-size:var(--mdc-typography-body2-font-size, .875rem);line-height:1.25rem;line-height:var(--mdc-typography-body2-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-body2-font-weight,400);letter-spacing:.0178571429em;letter-spacing:var(--mdc-typography-body2-letter-spacing, .0178571429em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-body2-text-decoration,inherit);text-decoration:var(--mdc-typography-body2-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-body2-text-transform,inherit);margin:0 12px}.forge-paginator__range-label--alternative{display:none}.forge-paginator__container{display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center}.forge-paginator__label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-caption-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:.75rem;font-size:var(--mdc-typography-caption-font-size, .75rem);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight,400);letter-spacing:.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing, .0333333333em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform,inherit);margin-right:16px}.forge-paginator__page-size-options{margin-right:16px}.forge-paginator__range-label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-caption-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:.75rem;font-size:var(--mdc-typography-caption-font-size, .75rem);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight,400);letter-spacing:.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing, .0333333333em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform,inherit);margin-right:8px}.forge-paginator__first-page,.forge-paginator__last-page,.forge-paginator__next-page,.forge-paginator__previous-page{color:rgba(0,0,0,.87);color:var(--mdc-theme-text-primary-on-background,rgba(0,0,0,.87))}:host{display:inline-block}:host([hidden]){display:none}:host([alternative]) .forge-paginator--alignment-center .forge-paginator__container{-webkit-box-pack:center;justify-content:center}:host([alternative]) .forge-paginator--alignment-center .forge-paginator__range-label--alternative{margin:0 auto}:host([alternative]) .forge-paginator--alignment-start .forge-paginator__container{-webkit-box-pack:start;justify-content:flex-start}:host([alternative]) .forge-paginator--alignment-end .forge-paginator__container{-webkit-box-pack:end;justify-content:flex-end}:host([alternative]) .forge-paginator .forge-paginator__container{-webkit-box-flex:1;flex:1}';
19
19
  /**
20
- * The custom element class behind the `<forge-paginator>` component.
21
- *
22
20
  * @tag forge-paginator
23
21
  */
24
22
  let PaginatorComponent = class PaginatorComponent extends BaseComponent {