@orangelogic/design-system 2.70.0 → 2.71.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 (99) hide show
  1. package/library/chunks/{button.CAAJPQFu.js → button.D6S0sAOO.js} +1 -1
  2. package/library/chunks/{color-swatch-group.CKHyWM8K.js → color-swatch-group.CSctShAT.js} +3 -3
  3. package/library/chunks/{color-swatch.BkpPCXd6.js → color-swatch.9fo7Prlq.js} +1 -1
  4. package/library/chunks/{confirm-popover.ZD74yDWw.js → confirm-popover.DR2_O9i_.js} +3 -3
  5. package/library/chunks/{dialog.qSV5AjOE.js → dialog.n5g61iHs.js} +106 -92
  6. package/library/chunks/{dot-pagination.BN_0ljfc.js → dot-pagination.CqpDMHMz.js} +1 -1
  7. package/library/chunks/{file-on-demand.CXE4zf0J.js → file-on-demand.DyPdfxfM.js} +8 -8
  8. package/library/chunks/{folder-select.CPALQK22.js → folder-select.B4PPWsoq.js} +3 -3
  9. package/library/chunks/{header.DXZ_5gLY.js → header.tbXKX2yv.js} +1 -1
  10. package/library/chunks/{i18n.C0iakJkV.js → i18n.BU7mYVLM.js} +2 -2
  11. package/library/chunks/icon-button.Dxz2J4cg.js +683 -0
  12. package/library/chunks/{iframe.BlzVfeBc.js → iframe.Dx7QScC8.js} +1 -1
  13. package/library/chunks/{image.B3WjaCXP.js → image.Q7doiTcu.js} +1 -1
  14. package/library/chunks/{index.CmVKj_wl.js → index.xnuklZH8.js} +1 -1
  15. package/library/chunks/{list-editor.CIAAFPco.js → list-editor.rlWs0RYN.js} +7 -7
  16. package/library/chunks/{option.ByVbmxUQ.js → option.CgM5bwtt.js} +1 -1
  17. package/library/chunks/pagination.I2BZVSB2.js +430 -0
  18. package/library/chunks/{tab-group.1h51o_Ly.js → tab-group.euL1exrl.js} +3 -3
  19. package/library/chunks/{table.wVHv1Xze.js → table.DNwNmw8a.js} +366 -351
  20. package/library/chunks/{tree.Bx0IGsWm.js → tree.ClkS3oAg.js} +1 -1
  21. package/library/components/alert.js +2 -2
  22. package/library/components/asset-link-format.js +4 -4
  23. package/library/components/atoms.js +12 -12
  24. package/library/components/border-input-group.js +1 -1
  25. package/library/components/breadcrumb.js +1 -1
  26. package/library/components/button.js +2 -2
  27. package/library/components/color-picker.js +2 -2
  28. package/library/components/color-swatch-group.js +4 -4
  29. package/library/components/color-swatch.js +2 -2
  30. package/library/components/confirm-popover.js +4 -4
  31. package/library/components/copy-button.js +1 -1
  32. package/library/components/corner-position-input-group.js +2 -2
  33. package/library/components/details.js +1 -1
  34. package/library/components/dialog.js +3 -3
  35. package/library/components/dot-pagination.js +2 -2
  36. package/library/components/drawer.js +2 -2
  37. package/library/components/dropdown.js +1 -1
  38. package/library/components/dynamic-select.js +4 -4
  39. package/library/components/e-chart.js +1 -1
  40. package/library/components/element-clamp.js +2 -2
  41. package/library/components/file-on-demand.js +9 -9
  42. package/library/components/folder-select.js +3 -3
  43. package/library/components/format-bytes.js +1 -1
  44. package/library/components/format-date.js +1 -1
  45. package/library/components/format-number.js +1 -1
  46. package/library/components/format-time.js +1 -1
  47. package/library/components/header.js +2 -2
  48. package/library/components/icon-button.js +14 -679
  49. package/library/components/iframe.js +2 -2
  50. package/library/components/image-comparer.js +1 -1
  51. package/library/components/image.js +2 -2
  52. package/library/components/input.js +409 -320
  53. package/library/components/line-clamp.js +1 -1
  54. package/library/components/list-editor.js +6 -6
  55. package/library/components/masonry.js +2 -2
  56. package/library/components/menu-item.js +1 -1
  57. package/library/components/menu.js +1 -1
  58. package/library/components/molecules.js +4 -4
  59. package/library/components/option.js +2 -2
  60. package/library/components/organisms.js +2 -2
  61. package/library/components/pagination.js +8 -6
  62. package/library/components/popup.js +1 -1
  63. package/library/components/position-picker.js +1 -1
  64. package/library/components/progress-bar.js +1 -1
  65. package/library/components/progress-ring.js +1 -1
  66. package/library/components/range.js +1 -1
  67. package/library/components/rating.js +1 -1
  68. package/library/components/relative-time.js +1 -1
  69. package/library/components/select.js +2 -2
  70. package/library/components/share-option-list.js +1 -1
  71. package/library/components/sidebar.js +1 -1
  72. package/library/components/size-input-group.js +2 -2
  73. package/library/components/spinner.js +1 -1
  74. package/library/components/split-panel.js +1 -1
  75. package/library/components/tab-group.js +4 -4
  76. package/library/components/tab.js +2 -2
  77. package/library/components/table.js +5 -5
  78. package/library/components/tag.js +2 -2
  79. package/library/components/tooltip.js +1 -1
  80. package/library/components/tree-item.js +2 -2
  81. package/library/components/tree.js +2 -2
  82. package/library/components/typeface.js +6 -6
  83. package/library/components/types.js +25 -25
  84. package/library/components/video.js +2 -2
  85. package/library/package.json +1 -1
  86. package/library/packages/atoms/src/components/dialog/dialog.d.ts +10 -0
  87. package/library/packages/atoms/src/components/icon-button/icon-button.d.ts +2 -1
  88. package/library/packages/atoms/src/components/input/auto-grow-controller.d.ts +23 -0
  89. package/library/packages/atoms/src/components/input/input.d.ts +9 -0
  90. package/library/packages/atoms/src/components/pagination/pagination.d.ts +31 -2
  91. package/library/packages/atoms/src/components/table/table.d.ts +13 -1
  92. package/library/packages/atoms/src/components/table/tabulator-tables/modules/Page/Page.d.ts +2 -2
  93. package/library/packages/types/src/icon-button.d.ts +7 -0
  94. package/library/packages/types/src/table.d.ts +3 -1
  95. package/library/packages/utils/src/custom-element/i18n.d.ts +2 -2
  96. package/library/react-web-component.d.ts +39 -7
  97. package/library/utils.js +2 -2
  98. package/package.json +1 -1
  99. package/library/chunks/pagination.DPQn2fKX.js +0 -341
@@ -1,341 +0,0 @@
1
- import { n as p, C as _ } from "./lib-cortex-element.CVMmyPMC.js";
2
- import { c as b } from "./custom-element.L4WJXn1j.js";
3
- import { L as C } from "./i18n.C0iakJkV.js";
4
- import { c } from "./math.DqTA6ya4.js";
5
- import { w as d } from "./watch.BCJD77bD.js";
6
- import { i as y, x as s } from "./lit-element.jLBm65_O.js";
7
- import { r as m } from "./state.CSDxrqLd.js";
8
- import { e as f } from "./class-map.BiVq-cVR.js";
9
- import { c as x } from "./repeat.DbF2p5ae.js";
10
- import { n as h } from "./when.Dr1es41R.js";
11
- import { C as z } from "./button.CAAJPQFu.js";
12
- import v from "../components/icon-button.js";
13
- import { C as $ } from "./option.ByVbmxUQ.js";
14
- import S from "../components/select.js";
15
- import w from "../components/tooltip.js";
16
- import { C as I } from "./typography.oDzoLbZS.js";
17
- import { c as P } from "./component.styles.DMSLciL5.js";
18
- var l = /* @__PURE__ */ ((t) => (t.Both = "both", t.Pages = "pages", t.Rows = "rows", t))(l || {});
19
- const B = y`
20
- ${P}
21
-
22
- :host {
23
- --width: 100px;
24
- display: block;
25
- width: fit-content;
26
- }
27
-
28
- cx-typography::part(base) {
29
- margin-block: 0;
30
- }
31
-
32
- .pagination {
33
- display: flex;
34
- align-items: center;
35
- gap: var(--cx-spacing-small);
36
- font-size: var(--cx-font-size-small);
37
- }
38
-
39
- .pagination .pagination__label__container {
40
- display: inline-flex;
41
- gap: var(--cx-spacing-small);
42
- align-items: center;
43
- }
44
-
45
- .pagination .pagination__select::part(combobox) {
46
- width: var(--width);
47
- }
48
-
49
- .pagination .pagination__navigation-buttons {
50
- display: flex;
51
- align-items: center;
52
- gap: 0;
53
- }
54
-
55
- .pagination .pagination_count,
56
- .pagination .pagination__pages {
57
- font-variant-numeric: tabular-nums;
58
- }
59
-
60
- .pagination__page--active::part(base) {
61
- color: var(--cx-color-primary);
62
- }
63
- `;
64
- var O = Object.defineProperty, F = Object.getOwnPropertyDescriptor, i = (t, a, o, r) => {
65
- for (var n = r > 1 ? void 0 : r ? F(a, o) : a, g = t.length - 1, u; g >= 0; g--)
66
- (u = t[g]) && (n = (r ? u(a, o, n) : u(n)) || n);
67
- return r && n && O(a, o, n), n;
68
- };
69
- let e = class extends _ {
70
- constructor() {
71
- super(...arguments), this.localize = new C(this), this.count = 0, this.pageSizeOptions = [10, 20, 50, 100], this.pageSize = this.pageSizeOptions[0], this.label = this.localize.term("rowsPerPage"), this.showFirst = !1, this.showLast = !1, this.showPaginationButtons = !1, this.paginationButtonCount = 5, this.paginationCounter = l.Rows, this._pageIndex = 1, this._pageCount = Math.max(1, Math.ceil(this.count / this.pageSize));
72
- }
73
- get pageIndex() {
74
- return this._pageIndex;
75
- }
76
- set pageIndex(t) {
77
- this._pageIndex = c(t, 1, this._pageCount);
78
- }
79
- get pageStart() {
80
- return c((this._pageIndex - 1) * this.pageSize + 1, 0, this.count);
81
- }
82
- get pageEnd() {
83
- return c(this._pageIndex * this.pageSize, 0, this.count);
84
- }
85
- get prevDisabled() {
86
- return this._pageIndex <= 1;
87
- }
88
- get nextDisabled() {
89
- return this._pageIndex >= this._pageCount;
90
- }
91
- updatePageCount() {
92
- const t = Number.isFinite(this.pageSize) && this.pageSize > 0 ? this.pageSize : 1;
93
- this._pageCount = Math.max(1, Math.ceil(this.count / t)), this.pageIndex = c(this.pageIndex, 1, this._pageCount);
94
- }
95
- handlePageSizeSelectChange(t) {
96
- const a = t.target;
97
- a && (this.pageSize = Number(a.value), this.pageIndex = 1);
98
- }
99
- handleFirst() {
100
- this._pageIndex = 1;
101
- }
102
- handleBack() {
103
- this._pageIndex -= 1, this._pageIndex < 1 && this.handleFirst();
104
- }
105
- handleForward() {
106
- this._pageIndex += 1, this._pageIndex > this._pageCount && this.handleLast();
107
- }
108
- handleLast() {
109
- this._pageIndex = this._pageCount;
110
- }
111
- async handleCountChange() {
112
- this.updatePageCount();
113
- }
114
- handlePageChange() {
115
- this.emit("cx-page-change", {
116
- detail: {
117
- pageIndex: this._pageIndex
118
- }
119
- });
120
- }
121
- handlePageSizeChange() {
122
- this.updatePageCount(), this.emit("cx-page-size-change", {
123
- detail: {
124
- pageSize: this.pageSize
125
- }
126
- });
127
- }
128
- handlePageClick(t) {
129
- const a = t.target;
130
- a && (this.pageIndex = Number(a.dataset.page));
131
- }
132
- renderPageButton(t) {
133
- return s`
134
- <cx-button
135
- data-page=${t}
136
- variant="text"
137
- size="small"
138
- class=${f({
139
- pagination__page: !0,
140
- "pagination__page--active": t === this.pageIndex
141
- })}
142
- >
143
- ${t}
144
- </cx-button>
145
- `;
146
- }
147
- renderPageButtons() {
148
- const t = Math.floor((this.paginationButtonCount - 1) / 2), a = Math.ceil((this.paginationButtonCount - 1) / 2), o = Math.max(
149
- 1,
150
- this._pageCount - this.pageIndex + t + 1 < this.paginationButtonCount ? this._pageCount - this.paginationButtonCount + 1 : this.pageIndex - t
151
- ), r = Math.min(
152
- this._pageCount,
153
- this.pageIndex <= a ? this.paginationButtonCount : this.pageIndex + a
154
- );
155
- return s`
156
- <div class="pagination__pages" @click=${this.handlePageClick}>
157
- ${x(
158
- Array.from({ length: r - o + 1 }, (n, g) => g + o),
159
- (n) => n,
160
- (n) => this.renderPageButton(n)
161
- )}
162
- </div>
163
- `;
164
- }
165
- renderPageCount() {
166
- return s`<cx-typography variant="body3" class="pagination_count"
167
- >${this.localize.term(
168
- "itemOfTotal",
169
- this.pageIndex,
170
- this._pageCount
171
- )}</cx-typography
172
- >`;
173
- }
174
- renderRowCount() {
175
- return s`<cx-typography variant="body3" class="pagination_count"
176
- >${this.localize.term(
177
- "itemRangeOfTotal",
178
- this.pageStart,
179
- this.pageEnd,
180
- this.count
181
- )}</cx-typography
182
- >`;
183
- }
184
- render() {
185
- return s`
186
- <div class="pagination">
187
- ${h(
188
- this.pageSizeOptions.length > 1,
189
- () => s`
190
- <label class="pagination__label__container">
191
- <cx-typography variant="body3" class="pagination__label">
192
- ${this.label}
193
- </cx-typography>
194
- <cx-select
195
- class="pagination__select"
196
- size="small"
197
- hoist
198
- value=${this.pageSize.toString()}
199
- @cx-change=${this.handlePageSizeSelectChange}
200
- >
201
- ${x(
202
- this.pageSizeOptions,
203
- (t) => t,
204
- (t) => s`
205
- <cx-option value=${t}>${t}</cx-option>
206
- `
207
- )}
208
- </cx-select>
209
- </label>
210
- `
211
- )}
212
- ${h(
213
- this.paginationCounter === l.Both || this.paginationCounter === l.Rows,
214
- () => this.renderRowCount(),
215
- () => this.renderPageCount()
216
- )}
217
- <div class="pagination__navigation-buttons">
218
- ${h(
219
- this.showFirst,
220
- () => s`
221
- <cx-tooltip hoist content=${this.localize.term("first")}>
222
- <cx-icon-button
223
- class="pagination__first"
224
- label=${this.localize.term("first")}
225
- name="first_page"
226
- ?disabled=${this.prevDisabled}
227
- @click=${this.handleFirst}
228
- ></cx-icon-button>
229
- </cx-tooltip>
230
- `
231
- )}
232
- <cx-tooltip hoist content=${this.localize.term("previous")}>
233
- <cx-icon-button
234
- class="pagination__back"
235
- label=${this.localize.term("previous")}
236
- name="chevron_left"
237
- ?disabled=${this.prevDisabled}
238
- @click=${this.handleBack}
239
- ></cx-icon-button>
240
- </cx-tooltip>
241
- ${h(
242
- this.paginationCounter === l.Both,
243
- () => this.renderPageCount()
244
- )}
245
- ${h(this.showPaginationButtons, () => this.renderPageButtons())}
246
- <cx-tooltip hoist content=${this.localize.term("next")}>
247
- <cx-icon-button
248
- class="pagination__forward"
249
- label=${this.localize.term("next")}
250
- name="chevron_right"
251
- ?disabled=${this.nextDisabled}
252
- @click=${this.handleForward}
253
- ></cx-icon-button>
254
- </cx-tooltip>
255
- ${h(
256
- this.showLast,
257
- () => s`
258
- <cx-tooltip hoist content=${this.localize.term("last")}>
259
- <cx-icon-button
260
- class="pagination__last"
261
- label=${this.localize.term("last")}
262
- name="last_page"
263
- ?disabled=${this.nextDisabled}
264
- @click=${this.handleLast}
265
- ></cx-icon-button>
266
- </cx-tooltip>
267
- `
268
- )}
269
- </div>
270
- </div>
271
- `;
272
- }
273
- };
274
- e.styles = B;
275
- e.dependencies = {
276
- "cx-button": z,
277
- "cx-icon-button": v,
278
- "cx-option": $,
279
- "cx-select": S,
280
- "cx-tooltip": w,
281
- "cx-typography": I
282
- };
283
- i([
284
- p({ type: Number })
285
- ], e.prototype, "count", 2);
286
- i([
287
- p({
288
- attribute: "page-size-options",
289
- converter: {
290
- fromAttribute: (t) => {
291
- const a = (t ?? "").trim().split(/\s+/).map((o) => Number.parseInt(o, 10)).filter((o) => Number.isFinite(o) && o > 0);
292
- return a.length ? a : [];
293
- },
294
- toAttribute: (t) => t.join(" ")
295
- },
296
- type: String
297
- })
298
- ], e.prototype, "pageSizeOptions", 2);
299
- i([
300
- p({ attribute: "page-size", type: Number })
301
- ], e.prototype, "pageSize", 2);
302
- i([
303
- p({ type: String })
304
- ], e.prototype, "label", 2);
305
- i([
306
- p({ attribute: "show-first", type: Boolean })
307
- ], e.prototype, "showFirst", 2);
308
- i([
309
- p({ attribute: "show-last", type: Boolean })
310
- ], e.prototype, "showLast", 2);
311
- i([
312
- p({ attribute: "show-pagination-buttons", type: Boolean })
313
- ], e.prototype, "showPaginationButtons", 2);
314
- i([
315
- p({ attribute: "pagination-button-count", type: Number })
316
- ], e.prototype, "paginationButtonCount", 2);
317
- i([
318
- p({ attribute: "pagination-counter", type: String })
319
- ], e.prototype, "paginationCounter", 2);
320
- i([
321
- m()
322
- ], e.prototype, "_pageIndex", 2);
323
- i([
324
- m()
325
- ], e.prototype, "_pageCount", 2);
326
- i([
327
- d("count")
328
- ], e.prototype, "handleCountChange", 1);
329
- i([
330
- d(["_pageIndex"])
331
- ], e.prototype, "handlePageChange", 1);
332
- i([
333
- d(["pageSize"])
334
- ], e.prototype, "handlePageSizeChange", 1);
335
- e = i([
336
- b("cx-pagination")
337
- ], e);
338
- export {
339
- e as C,
340
- l as P
341
- };