@prioticket/design-system-web 1.4.6 → 1.4.7

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.
@@ -1,6 +1,6 @@
1
1
  # @prioticket/design-system-web Components
2
2
 
3
- Version: 1.4.6
3
+ Version: 1.4.7
4
4
 
5
5
  ### <pd-box> (PdBox)
6
6
 
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "package": {
3
3
  "name": "@prioticket/design-system-web",
4
- "version": "1.4.6",
4
+ "version": "1.4.7",
5
5
  "description": "",
6
6
  "installation": "npm install @prioticket/design-system-web"
7
7
  },
8
- "generatedAt": "2026-01-20T11:45:14.392Z",
8
+ "generatedAt": "2026-01-20T17:04:45.006Z",
9
9
  "components": {
10
10
  "pd-box": {
11
11
  "tagName": "pd-box",
@@ -142,13 +142,26 @@
142
142
  </td>
143
143
  </tr>
144
144
  `}_renderPagination(){if(!this.pagination)return o.nothing;const e=this._totalCount,t=e===0?0:this.pageIndex*this.pageSize+1,a=Math.min((this.pageIndex+1)*this.pageSize,e),r=this.pageIndex===0,n=this.pageIndex>=this._totalPages-1||e===0;return o.html`
145
- <nav class="pagination" aria-label="Table pagination">
146
- <div class="pagination-info" aria-live="polite" aria-atomic="true">
147
- <span class="pagination-range">${t}–${a}</span>
148
- <span class="pagination-total">of ${e}</span>
145
+ <nav class="pagination">
146
+ <div class="items-per-page">
147
+ <label id="page-size-label-${this._uniqueId}">Items per page:</label>
148
+ <div >
149
+ <pd-select
150
+ variant="filled"
151
+ aria-labelledby="page-size-label-${this._uniqueId}"
152
+ .value=${this.pageSize.toString()}
153
+ .options=${this.pageSizeOptions.map(i=>({value:String(i),label:String(i)}))}
154
+ @change=${this._handlePageSizeChange}
155
+ ></pd-select>
156
+ </div>
149
157
  </div>
150
-
151
- <div class="pagination-controls" role="group" aria-label="Pagination controls">
158
+
159
+ <div class="pagination-info">
160
+ <span>${t}–${a}</span>
161
+ <span>of ${e}</span>
162
+ </div>
163
+
164
+ <div>
152
165
  <pd-icon-button
153
166
  icon="first_page"
154
167
  aria-label="First page"
@@ -175,15 +188,6 @@
175
188
  ></pd-icon-button>
176
189
  </div>
177
190
 
178
- <div class="items-per-page">
179
- <label id="page-size-label-${this._uniqueId}">Items per page:</label>
180
- <pd-select
181
- aria-labelledby="page-size-label-${this._uniqueId}"
182
- .value=${this.pageSize.toString()}
183
- .options=${this.pageSizeOptions.map(i=>({value:String(i),label:String(i)}))}
184
- @change=${this._handlePageSizeChange}
185
- ></pd-select>
186
- </div>
187
191
  </nav>
188
192
  `}render(){const e=this._displayData,t=e.length===0&&!this.loading;return o.html`
189
193
  <div class="table-wrapper">
@@ -485,10 +489,7 @@
485
489
  flex-wrap: wrap;
486
490
  }
487
491
 
488
- .pagination-info {
489
- flex: 1;
490
- min-width: 100px;
491
- }
492
+
492
493
 
493
494
  .pagination-range {
494
495
  font-weight: 500;
@@ -1,4 +1,4 @@
1
- import { css as b, LitElement as y, nothing as h, html as d } from "lit";
1
+ import { css as b, LitElement as y, nothing as g, html as d } from "lit";
2
2
  import { property as c, state as u, customElement as _ } from "lit/decorators.js";
3
3
  import { repeat as f } from "lit/directives/repeat.js";
4
4
  import { classMap as m } from "lit/directives/class-map.js";
@@ -9,11 +9,11 @@ import "./pd-icon-button.es.js";
9
9
  import "./pd-select.es.js";
10
10
  import "./pd-menu-item.es.js";
11
11
  var v = Object.defineProperty, w = Object.getOwnPropertyDescriptor, l = (e, t, a, r) => {
12
- for (var o = r > 1 ? void 0 : r ? w(t, a) : t, i = e.length - 1, s; i >= 0; i--)
13
- (s = e[i]) && (o = (r ? s(t, a, o) : s(o)) || o);
12
+ for (var o = r > 1 ? void 0 : r ? w(t, a) : t, n = e.length - 1, s; n >= 0; n--)
13
+ (s = e[n]) && (o = (r ? s(t, a, o) : s(o)) || o);
14
14
  return r && o && v(t, a, o), o;
15
15
  };
16
- let n = class extends y {
16
+ let i = class extends y {
17
17
  constructor() {
18
18
  super(...arguments), this.columns = [], this.data = [], this.rowKey = (e, t) => {
19
19
  const a = e.id;
@@ -70,16 +70,16 @@ let n = class extends y {
70
70
  _sortData(e) {
71
71
  const t = this._sortColumn, a = this._sortDirection;
72
72
  return [...e].sort((r, o) => {
73
- const i = r[t], s = o[t];
74
- if (i == null && s == null) return 0;
75
- if (i == null) return a === "asc" ? 1 : -1;
73
+ const n = r[t], s = o[t];
74
+ if (n == null && s == null) return 0;
75
+ if (n == null) return a === "asc" ? 1 : -1;
76
76
  if (s == null) return a === "asc" ? -1 : 1;
77
- if (typeof i == "number" && typeof s == "number")
78
- return a === "asc" ? i - s : s - i;
79
- if (i instanceof Date && s instanceof Date)
80
- return a === "asc" ? i.getTime() - s.getTime() : s.getTime() - i.getTime();
81
- const p = String(i).toLowerCase(), g = String(s).toLowerCase();
82
- return p < g ? a === "asc" ? -1 : 1 : p > g ? a === "asc" ? 1 : -1 : 0;
77
+ if (typeof n == "number" && typeof s == "number")
78
+ return a === "asc" ? n - s : s - n;
79
+ if (n instanceof Date && s instanceof Date)
80
+ return a === "asc" ? n.getTime() - s.getTime() : s.getTime() - n.getTime();
81
+ const p = String(n).toLowerCase(), h = String(s).toLowerCase();
82
+ return p < h ? a === "asc" ? -1 : 1 : p > h ? a === "asc" ? 1 : -1 : 0;
83
83
  });
84
84
  }
85
85
  _getRowKey(e, t) {
@@ -153,7 +153,7 @@ let n = class extends y {
153
153
  }));
154
154
  }
155
155
  _handleCellChange(e, t, a, r) {
156
- const o = r.target, i = e[a.id];
156
+ const o = r.target, n = e[a.id];
157
157
  let s = o.value;
158
158
  if (a.type === "number" || a.type === "currency") {
159
159
  const p = parseFloat(o.value);
@@ -165,7 +165,7 @@ let n = class extends y {
165
165
  rowIndex: t,
166
166
  columnId: a.id,
167
167
  value: s,
168
- previousValue: i
168
+ previousValue: n
169
169
  },
170
170
  bubbles: !0,
171
171
  composed: !0
@@ -303,7 +303,7 @@ let n = class extends y {
303
303
  <th class="drag-handle-header" role="columnheader" aria-label="Reorder">
304
304
  <span class="visually-hidden">Reorder</span>
305
305
  </th>
306
- ` : h}
306
+ ` : g}
307
307
 
308
308
  ${this.selectable ? d`
309
309
  <th class="checkbox-cell" role="columnheader">
@@ -314,7 +314,7 @@ let n = class extends y {
314
314
  @change=${this._handleSelectAll}
315
315
  ></pd-checkbox>
316
316
  </th>
317
- ` : h}
317
+ ` : g}
318
318
 
319
319
  ${this.columns.map((a, r) => this._renderHeaderCell(a, r))}
320
320
  </tr>
@@ -322,7 +322,7 @@ let n = class extends y {
322
322
  `;
323
323
  }
324
324
  _renderHeaderCell(e, t) {
325
- const a = this._isColumnSortable(e), r = this._getColumnAlignment(e), o = this._sortColumn === e.id, i = this._draggedColumnIndex === t, s = this._dragOverColumnIndex === t && !i, p = o ? this._sortDirection === "asc" ? "ascending" : "descending" : "none";
325
+ const a = this._isColumnSortable(e), r = this._getColumnAlignment(e), o = this._sortColumn === e.id, n = this._draggedColumnIndex === t, s = this._dragOverColumnIndex === t && !n, p = o ? this._sortDirection === "asc" ? "ascending" : "descending" : "none";
326
326
  return d`
327
327
  <th
328
328
  role="columnheader"
@@ -331,21 +331,21 @@ let n = class extends y {
331
331
  sorted: o,
332
332
  [`align-${r}`]: !0,
333
333
  "column-draggable": this.draggableColumns,
334
- "column-dragging": i,
334
+ "column-dragging": n,
335
335
  "column-drag-over": s
336
336
  })}
337
337
  style=${e.width ? `width: ${e.width};` : ""}${e.minWidth ? ` min-width: ${e.minWidth};` : ""}
338
- aria-sort=${a ? p : h}
339
- tabindex=${a || this.draggableColumns ? "0" : h}
338
+ aria-sort=${a ? p : g}
339
+ tabindex=${a || this.draggableColumns ? "0" : g}
340
340
  draggable=${this.draggableColumns ? "true" : "false"}
341
341
  @click=${() => this._handleSort(e)}
342
- @keydown=${(g) => {
343
- this._handleHeaderKeyDown(g, e), this._handleColumnHeaderKeyDown(g, t);
342
+ @keydown=${(h) => {
343
+ this._handleHeaderKeyDown(h, e), this._handleColumnHeaderKeyDown(h, t);
344
344
  }}
345
- @dragstart=${(g) => this._onColumnDragStart(g, t)}
346
- @dragover=${(g) => this._onColumnDragOver(g, t)}
347
- @drop=${(g) => this._onColumnDrop(g, t)}
348
- @dragend=${(g) => this._onColumnDragEnd(g)}
345
+ @dragstart=${(h) => this._onColumnDragStart(h, t)}
346
+ @dragover=${(h) => this._onColumnDragOver(h, t)}
347
+ @drop=${(h) => this._onColumnDrop(h, t)}
348
+ @dragend=${(h) => this._onColumnDragEnd(h)}
349
349
  >
350
350
  <div class=${m({
351
351
  "header-content": !0,
@@ -358,7 +358,7 @@ let n = class extends y {
358
358
  size="small"
359
359
  aria-hidden="true"
360
360
  ></pd-icon>
361
- ` : h}
361
+ ` : g}
362
362
  <span class="header-text">${e.header}</span>
363
363
  ${a ? d`
364
364
  <pd-icon
@@ -371,7 +371,7 @@ let n = class extends y {
371
371
  size="small"
372
372
  aria-hidden="true"
373
373
  ></pd-icon>
374
- ` : h}
374
+ ` : g}
375
375
  </div>
376
376
  </th>
377
377
  `;
@@ -405,8 +405,8 @@ let n = class extends y {
405
405
  type=${o}
406
406
  .value=${r != null ? String(r) : ""}
407
407
  aria-label="${a.header}"
408
- @change=${(i) => this._handleCellChange(e, t, a, i)}
409
- @click=${(i) => i.stopPropagation()}
408
+ @change=${(n) => this._handleCellChange(e, t, a, n)}
409
+ @click=${(n) => n.stopPropagation()}
410
410
  style="width: 100%;"
411
411
  ></pd-text-field>
412
412
  `;
@@ -448,7 +448,7 @@ let n = class extends y {
448
448
  // Rendering - Rows
449
449
  // ---------------------------------------------------------------------------
450
450
  _renderRow(e, t) {
451
- const a = this._getRowKey(e, t), r = this._selectedRowKeys.has(a), o = this._draggedRowIndex === t, i = this._dragOverRowIndex === t && !o;
451
+ const a = this._getRowKey(e, t), r = this._selectedRowKeys.has(a), o = this._draggedRowIndex === t, n = this._dragOverRowIndex === t && !o;
452
452
  return d`
453
453
  <tr
454
454
  role="row"
@@ -456,9 +456,9 @@ let n = class extends y {
456
456
  selected: r,
457
457
  draggable: this.draggableRows,
458
458
  dragging: o,
459
- "drag-over": i
459
+ "drag-over": n
460
460
  })}
461
- aria-selected=${this.selectable ? String(r) : h}
461
+ aria-selected=${this.selectable ? String(r) : g}
462
462
  draggable=${this.draggableRows ? "true" : "false"}
463
463
  @dragstart=${(s) => this._onDragStart(s, t)}
464
464
  @dragover=${(s) => this._onDragOver(s, t)}
@@ -480,7 +480,7 @@ let n = class extends y {
480
480
  @keydown=${(s) => this._handleDragHandleKeyDown(s, t)}
481
481
  ></pd-icon>
482
482
  </td>
483
- ` : h}
483
+ ` : g}
484
484
 
485
485
  ${this.selectable ? d`
486
486
  <td class="checkbox-cell" role="cell">
@@ -494,7 +494,7 @@ let n = class extends y {
494
494
  @click=${(s) => s.stopPropagation()}
495
495
  ></pd-checkbox>
496
496
  </td>
497
- ` : h}
497
+ ` : g}
498
498
 
499
499
  ${this.columns.map((s) => d`
500
500
  <td
@@ -544,16 +544,32 @@ let n = class extends y {
544
544
  // Rendering - Pagination
545
545
  // ---------------------------------------------------------------------------
546
546
  _renderPagination() {
547
- if (!this.pagination) return h;
547
+ if (!this.pagination) return g;
548
548
  const e = this._totalCount, t = e === 0 ? 0 : this.pageIndex * this.pageSize + 1, a = Math.min((this.pageIndex + 1) * this.pageSize, e), r = this.pageIndex === 0, o = this.pageIndex >= this._totalPages - 1 || e === 0;
549
549
  return d`
550
- <nav class="pagination" aria-label="Table pagination">
551
- <div class="pagination-info" aria-live="polite" aria-atomic="true">
552
- <span class="pagination-range">${t}–${a}</span>
553
- <span class="pagination-total">of ${e}</span>
550
+ <nav class="pagination">
551
+ <div class="items-per-page">
552
+ <label id="page-size-label-${this._uniqueId}">Items per page:</label>
553
+ <div >
554
+ <pd-select
555
+ variant="filled"
556
+ aria-labelledby="page-size-label-${this._uniqueId}"
557
+ .value=${this.pageSize.toString()}
558
+ .options=${this.pageSizeOptions.map((n) => ({
559
+ value: String(n),
560
+ label: String(n)
561
+ }))}
562
+ @change=${this._handlePageSizeChange}
563
+ ></pd-select>
564
+ </div>
554
565
  </div>
555
-
556
- <div class="pagination-controls" role="group" aria-label="Pagination controls">
566
+
567
+ <div class="pagination-info">
568
+ <span>${t}–${a}</span>
569
+ <span>of ${e}</span>
570
+ </div>
571
+
572
+ <div>
557
573
  <pd-icon-button
558
574
  icon="first_page"
559
575
  aria-label="First page"
@@ -580,18 +596,6 @@ let n = class extends y {
580
596
  ></pd-icon-button>
581
597
  </div>
582
598
 
583
- <div class="items-per-page">
584
- <label id="page-size-label-${this._uniqueId}">Items per page:</label>
585
- <pd-select
586
- aria-labelledby="page-size-label-${this._uniqueId}"
587
- .value=${this.pageSize.toString()}
588
- .options=${this.pageSizeOptions.map((i) => ({
589
- value: String(i),
590
- label: String(i)
591
- }))}
592
- @change=${this._handlePageSizeChange}
593
- ></pd-select>
594
- </div>
595
599
  </nav>
596
600
  `;
597
601
  }
@@ -610,9 +614,9 @@ let n = class extends y {
610
614
  >
611
615
  ${this._renderHeader()}
612
616
  <tbody>
613
- ${this.loading ? this._renderLoadingState() : h}
614
- ${t ? this._renderEmptyState() : h}
615
- ${this.loading ? h : f(
617
+ ${this.loading ? this._renderLoadingState() : g}
618
+ ${t ? this._renderEmptyState() : g}
619
+ ${this.loading ? g : f(
616
620
  e,
617
621
  (a) => {
618
622
  const r = this._getActualDataIndex(a);
@@ -673,7 +677,7 @@ let n = class extends y {
673
677
  this._displayDataCacheKey = "";
674
678
  }
675
679
  };
676
- n.styles = b`
680
+ i.styles = b`
677
681
  :host {
678
682
  display: block;
679
683
 
@@ -955,10 +959,7 @@ n.styles = b`
955
959
  flex-wrap: wrap;
956
960
  }
957
961
 
958
- .pagination-info {
959
- flex: 1;
960
- min-width: 100px;
961
- }
962
+
962
963
 
963
964
  .pagination-range {
964
965
  font-weight: 500;
@@ -1026,79 +1027,79 @@ n.styles = b`
1026
1027
  `;
1027
1028
  l([
1028
1029
  c({ type: Array })
1029
- ], n.prototype, "columns", 2);
1030
+ ], i.prototype, "columns", 2);
1030
1031
  l([
1031
1032
  c({ type: Array })
1032
- ], n.prototype, "data", 2);
1033
+ ], i.prototype, "data", 2);
1033
1034
  l([
1034
1035
  c({ attribute: !1 })
1035
- ], n.prototype, "rowKey", 2);
1036
+ ], i.prototype, "rowKey", 2);
1036
1037
  l([
1037
1038
  c({ type: Boolean })
1038
- ], n.prototype, "selectable", 2);
1039
+ ], i.prototype, "selectable", 2);
1039
1040
  l([
1040
1041
  c({ type: Boolean })
1041
- ], n.prototype, "sortable", 2);
1042
+ ], i.prototype, "sortable", 2);
1042
1043
  l([
1043
1044
  c({ type: Boolean })
1044
- ], n.prototype, "pagination", 2);
1045
+ ], i.prototype, "pagination", 2);
1045
1046
  l([
1046
1047
  c({ type: Number })
1047
- ], n.prototype, "pageSize", 2);
1048
+ ], i.prototype, "pageSize", 2);
1048
1049
  l([
1049
1050
  c({ type: Number })
1050
- ], n.prototype, "pageIndex", 2);
1051
+ ], i.prototype, "pageIndex", 2);
1051
1052
  l([
1052
1053
  c({ type: Number })
1053
- ], n.prototype, "totalItems", 2);
1054
+ ], i.prototype, "totalItems", 2);
1054
1055
  l([
1055
1056
  c({ type: Boolean, attribute: "draggable-rows" })
1056
- ], n.prototype, "draggableRows", 2);
1057
+ ], i.prototype, "draggableRows", 2);
1057
1058
  l([
1058
1059
  c({ type: Boolean, attribute: "draggable-columns" })
1059
- ], n.prototype, "draggableColumns", 2);
1060
+ ], i.prototype, "draggableColumns", 2);
1060
1061
  l([
1061
1062
  c({ type: Boolean })
1062
- ], n.prototype, "loading", 2);
1063
+ ], i.prototype, "loading", 2);
1063
1064
  l([
1064
1065
  c({ type: Boolean, attribute: "clear-selection-on-data-change" })
1065
- ], n.prototype, "clearSelectionOnDataChange", 2);
1066
+ ], i.prototype, "clearSelectionOnDataChange", 2);
1066
1067
  l([
1067
1068
  c({ type: String, attribute: "currency-code" })
1068
- ], n.prototype, "currencyCode", 2);
1069
+ ], i.prototype, "currencyCode", 2);
1069
1070
  l([
1070
1071
  c({ type: String })
1071
- ], n.prototype, "locale", 2);
1072
+ ], i.prototype, "locale", 2);
1072
1073
  l([
1073
1074
  c({ type: Array, attribute: "page-size-options" })
1074
- ], n.prototype, "pageSizeOptions", 2);
1075
+ ], i.prototype, "pageSizeOptions", 2);
1075
1076
  l([
1076
1077
  u()
1077
- ], n.prototype, "_sortColumn", 2);
1078
+ ], i.prototype, "_sortColumn", 2);
1078
1079
  l([
1079
1080
  u()
1080
- ], n.prototype, "_sortDirection", 2);
1081
+ ], i.prototype, "_sortDirection", 2);
1081
1082
  l([
1082
1083
  u()
1083
- ], n.prototype, "_selectedRowKeys", 2);
1084
+ ], i.prototype, "_selectedRowKeys", 2);
1084
1085
  l([
1085
1086
  u()
1086
- ], n.prototype, "_draggedRowIndex", 2);
1087
+ ], i.prototype, "_draggedRowIndex", 2);
1087
1088
  l([
1088
1089
  u()
1089
- ], n.prototype, "_dragOverRowIndex", 2);
1090
+ ], i.prototype, "_dragOverRowIndex", 2);
1090
1091
  l([
1091
1092
  u()
1092
- ], n.prototype, "_isDragHandleGrabbed", 2);
1093
+ ], i.prototype, "_isDragHandleGrabbed", 2);
1093
1094
  l([
1094
1095
  u()
1095
- ], n.prototype, "_draggedColumnIndex", 2);
1096
+ ], i.prototype, "_draggedColumnIndex", 2);
1096
1097
  l([
1097
1098
  u()
1098
- ], n.prototype, "_dragOverColumnIndex", 2);
1099
- n = l([
1099
+ ], i.prototype, "_dragOverColumnIndex", 2);
1100
+ i = l([
1100
1101
  _("pd-table")
1101
- ], n);
1102
+ ], i);
1102
1103
  export {
1103
- n as PdTable
1104
+ i as PdTable
1104
1105
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prioticket/design-system-web",
3
- "version": "1.4.6",
3
+ "version": "1.4.7",
4
4
  "type": "module",
5
5
  "packageManager": "yarn@3.6.4",
6
6
  "main": "./dist/prioticket-design-system-web.cjs.js",