@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
@@ -0,0 +1,683 @@
1
+ import { n as r, C as p } from "./lib-cortex-element.CVMmyPMC.js";
2
+ import { c as x } from "./component.styles.DMSLciL5.js";
3
+ import { c as h } from "./custom-element.L4WJXn1j.js";
4
+ import { L as m } from "./i18n.BU7mYVLM.js";
5
+ import { r as f } from "./state.CSDxrqLd.js";
6
+ import { e as v } from "./query.BBf1UFkC.js";
7
+ import { e as y } from "./class-map.BiVq-cVR.js";
8
+ import { o as c } from "./if-defined.BRoBj_Rp.js";
9
+ import { n as k } from "./when.Dr1es41R.js";
10
+ import { i as d, u as b } from "./static.UA3G1Deq.js";
11
+ import w from "../components/icon.js";
12
+ import _ from "../components/spinner.js";
13
+ import { i as z } from "./lit-element.jLBm65_O.js";
14
+ var g = /* @__PURE__ */ ((o) => (o.Large = "large", o.Medium = "medium", o.Small = "small", o.XLarge = "x-large", o))(g || {});
15
+ const $ = z`
16
+ :host {
17
+ display: inline-block;
18
+ color: var(--cx-color-neutral-600);
19
+ --group-divider-color: rgb(128 128 128 / 33%);
20
+ }
21
+
22
+ .icon-button {
23
+ flex: 0 0 auto;
24
+ display: flex;
25
+ align-items: center;
26
+ background: none;
27
+ border: none;
28
+ border-radius: var(--cx-border-radius-medium);
29
+ font-size: inherit;
30
+ color: inherit;
31
+ padding: var(--cx-spacing-x-small);
32
+ cursor: pointer;
33
+ transition: var(--cx-transition-x-fast) color;
34
+ position: relative;
35
+ }
36
+
37
+ .icon-button:focus {
38
+ outline: none;
39
+ }
40
+
41
+ .icon-button--disabled {
42
+ opacity: 0.5;
43
+ cursor: default;
44
+ }
45
+
46
+ .icon-button:focus-visible {
47
+ outline: var(--cx-focus-ring);
48
+ outline-offset: var(--cx-focus-ring-offset);
49
+ }
50
+
51
+ .icon-button__icon {
52
+ pointer-events: none;
53
+ margin: auto;
54
+ }
55
+
56
+ .icon-button--small {
57
+ font-size: var(--cx-font-size-x-small);
58
+ padding: var(--cx-spacing-2x-small);
59
+ min-height: var(--cx-input-height-small);
60
+ min-width: var(--cx-input-height-small);
61
+ }
62
+
63
+ .icon-button--medium {
64
+ font-size: var(--cx-font-size-large);
65
+ padding: var(--cx-spacing-2x-small);
66
+ min-height: var(--cx-input-height-medium);
67
+ min-width: var(--cx-input-height-medium);
68
+ }
69
+
70
+ .icon-button--large {
71
+ font-size: var(--cx-font-size-large);
72
+ padding: var(--cx-spacing-x-small);
73
+ min-height: var(--cx-input-height-large);
74
+ min-width: var(--cx-input-width-large);
75
+ }
76
+
77
+ .icon-button--x-large {
78
+ font-size: var(--cx-font-size-large);
79
+ padding: var(--cx-spacing-small);
80
+ min-height: var(--cx-input-height-x-large);
81
+ min-width: var(--cx-input-height-x-large);
82
+ }
83
+
84
+ /*
85
+ * Standard buttons
86
+ */
87
+
88
+ /* Default */
89
+ .icon-button.icon-button--default {
90
+ background-color: var(--cx-color-neutral-100);
91
+ border-color: var(--cx-color-neutral-100);
92
+ color: var(--cx-color-neutral);
93
+ }
94
+
95
+ .icon-button.icon-button--default:hover:not(.icon-button--disabled),
96
+ .icon-button.icon-button--default.icon-button--focused:not(
97
+ .icon-button--disabled
98
+ ) {
99
+ background-color: var(--cx-color-neutral-200);
100
+ border-color: var(--cx-color-neutral-200);
101
+ color: var(--cx-color-neutral);
102
+ }
103
+
104
+ .icon-button.icon-button--default:active:not(.icon-button--disabled) {
105
+ background-color: var(--cx-color-neutral-300);
106
+ border-color: var(--cx-color-neutral-300);
107
+ color: var(--cx-color-neutral);
108
+ }
109
+
110
+ /* Primary */
111
+ .icon-button.icon-button--primary {
112
+ background-color: var(--cx-color-primary);
113
+ border-color: var(--cx-color-primary);
114
+ color: var(--cx-color-neutral-0);
115
+ }
116
+
117
+ .icon-button.icon-button--primary:hover:not(.icon-button--disabled),
118
+ .icon-button.icon-button--primary.icon-button--focused:not(
119
+ .icon-button--disabled
120
+ ) {
121
+ background-color: var(--cx-color-primary-500);
122
+ border-color: var(--cx-color-primary-500);
123
+ color: var(--cx-color-neutral-0);
124
+ }
125
+
126
+ .icon-button.icon-button--primary:active:not(.icon-button--disabled) {
127
+ background-color: var(--cx-color-primary-700);
128
+ border-color: var(--cx-color-primary-700);
129
+ color: var(--cx-color-neutral-0);
130
+ }
131
+
132
+ /* Success */
133
+ .icon-button.icon-button--success {
134
+ background-color: var(--cx-color-success);
135
+ border-color: var(--cx-color-success);
136
+ color: var(--cx-color-neutral-0);
137
+ }
138
+
139
+ .icon-button.icon-button--success:hover:not(.icon-button--disabled),
140
+ .icon-button.icon-button--success.icon-button--focused:not(
141
+ .icon-button--disabled
142
+ ) {
143
+ background-color: var(--cx-color-success-500);
144
+ border-color: var(--cx-color-success-500);
145
+ color: var(--cx-color-neutral-0);
146
+ }
147
+
148
+ .icon-button.icon-button--success:active:not(.icon-button--disabled) {
149
+ background-color: var(--cx-color-success-700);
150
+ border-color: var(--cx-color-success-700);
151
+ color: var(--cx-color-neutral-0);
152
+ }
153
+
154
+ /* Warning */
155
+ .icon-button.icon-button--warning {
156
+ background-color: var(--cx-color-warning);
157
+ border-color: var(--cx-color-warning);
158
+ color: var(--cx-color-neutral-0);
159
+ }
160
+ .icon-button.icon-button--warning:hover:not(.icon-button--disabled),
161
+ .icon-button.icon-button--warning.icon-button--focused:not(
162
+ .icon-button--disabled
163
+ ) {
164
+ background-color: var(--cx-color-warning-500);
165
+ border-color: var(--cx-color-warning-500);
166
+ color: var(--cx-color-neutral-0);
167
+ }
168
+
169
+ .icon-button.icon-button--warning:active:not(.icon-button--disabled) {
170
+ background-color: var(--cx-color-warning-700);
171
+ border-color: var(--cx-color-warning-700);
172
+ color: var(--cx-color-neutral-0);
173
+ }
174
+
175
+ /* Danger */
176
+ .icon-button.icon-button--danger {
177
+ background-color: var(--cx-color-danger);
178
+ border-color: var(--cx-color-danger);
179
+ color: var(--cx-color-neutral-0);
180
+ }
181
+
182
+ .icon-button.icon-button--danger:hover:not(.icon-button--disabled),
183
+ .icon-button.icon-button--danger.icon-button--focused:not(
184
+ .icon-button--disabled
185
+ ) {
186
+ background-color: var(--cx-color-danger-500);
187
+ border-color: var(--cx-color-danger-500);
188
+ color: var(--cx-color-neutral-0);
189
+ }
190
+
191
+ .icon-button.icon-button--danger:active:not(.icon-button--disabled) {
192
+ background-color: var(--cx-color-danger-700);
193
+ border-color: var(--cx-color-danger-700);
194
+ color: var(--cx-color-neutral-0);
195
+ }
196
+
197
+ /* Custom */
198
+ .icon-button.icon-button--custom {
199
+ background-color: var(--background-color);
200
+ border-color: var(--background-color);
201
+ color: var(--color);
202
+ }
203
+
204
+ .icon-button.icon-button--custom:hover:not(.icon-button--disabled),
205
+ .icon-button.icon-button--custom.icon-button--focused:not(
206
+ .icon-button--disabled
207
+ ) {
208
+ background-color: var(--background-color);
209
+ border-color: var(--background-color);
210
+ color: var(--color);
211
+ }
212
+
213
+ .icon-button.icon-button--custom:active:not(.icon-button--disabled) {
214
+ background-color: var(--background-color);
215
+ border-color: var(--background-color);
216
+ color: var(--color);
217
+ }
218
+
219
+ /*
220
+ * Outline buttons
221
+ */
222
+
223
+ .icon-button--outline {
224
+ background: none;
225
+ border: solid var(--cx-input-border-width);
226
+ border-color: var(--cx-input-border-color);
227
+ }
228
+
229
+ /* Default */
230
+ .icon-button--outline.icon-button--default {
231
+ border-color: var(--cx-input-border-color);
232
+ color: var(--cx-color-neutral);
233
+ }
234
+
235
+ .icon-button--outline.icon-button--default:hover:not(.icon-button--disabled),
236
+ .icon-button--outline.icon-button--default.icon-button--focused:not(
237
+ .icon-button--disabled
238
+ ),
239
+ .icon-button--outline.icon-button--default.icon-button--checked:not(
240
+ .icon-button--disabled
241
+ ) {
242
+ border-color: var(--cx-color-neutral-300);
243
+ background-color: var(--cx-color-neutral-100);
244
+ color: var(--cx-color-neutral);
245
+ }
246
+
247
+ .icon-button--outline.icon-button--default:active:not(
248
+ .icon-button--disabled
249
+ ) {
250
+ border-color: var(--cx-color-neutral-300);
251
+ background-color: var(--cx-color-neutral-200);
252
+ color: var(--cx-color-neutral);
253
+ }
254
+
255
+ /* Primary */
256
+ .icon-button--outline.icon-button--primary {
257
+ border-color: var(--cx-color-primary);
258
+ color: var(--cx-color-primary);
259
+ }
260
+
261
+ .icon-button--outline.icon-button--primary:hover:not(.icon-button--disabled),
262
+ .icon-button--outline.icon-button--primary.icon-button--focused:not(
263
+ .icon-button--disabled
264
+ ),
265
+ .icon-button--outline.icon-button--primary.icon-button--checked:not(
266
+ .icon-button--disabled
267
+ ) {
268
+ background-color: var(--cx-color-primary-500);
269
+ color: var(--cx-color-neutral-0);
270
+ }
271
+
272
+ .icon-button--outline.icon-button--primary:active:not(
273
+ .icon-button--disabled
274
+ ) {
275
+ border-color: var(--cx-color-primary-700);
276
+ background-color: var(--cx-color-primary-700);
277
+ color: var(--cx-color-neutral-0);
278
+ }
279
+
280
+ /* Success */
281
+ .icon-button--outline.icon-button--success {
282
+ border-color: var(--cx-color-success);
283
+ color: var(--cx-color-success);
284
+ }
285
+
286
+ .icon-button--outline.icon-button--success:hover:not(.icon-button--disabled),
287
+ .icon-button--outline.icon-button--success.icon-button--focused:not(
288
+ .icon-button--disabled
289
+ ),
290
+ .icon-button--outline.icon-button--success.icon-button--checked:not(
291
+ .icon-button--disabled
292
+ ) {
293
+ background-color: var(--cx-color-success-500);
294
+ color: var(--cx-color-neutral-0);
295
+ }
296
+
297
+ .icon-button--outline.icon-button--success:active:not(
298
+ .icon-button--disabled
299
+ ) {
300
+ border-color: var(--cx-color-success);
301
+ background-color: var(--cx-color-success);
302
+ color: var(--cx-color-neutral-0);
303
+ }
304
+
305
+ /* Warning */
306
+ .icon-button--outline.icon-button--warning {
307
+ border-color: var(--cx-color-warning);
308
+ color: var(--cx-color-warning);
309
+ }
310
+
311
+ .icon-button--outline.icon-button--warning:hover:not(.icon-button--disabled),
312
+ .icon-button--outline.icon-button--warning.icon-button--focused:not(
313
+ .icon-button--disabled
314
+ ),
315
+ .icon-button--outline.icon-button--warning.icon-button--checked:not(
316
+ .icon-button--disabled
317
+ ) {
318
+ background-color: var(--cx-color-warning-500);
319
+ color: var(--cx-color-neutral-0);
320
+ }
321
+
322
+ .icon-button--outline.icon-button--warning:active:not(
323
+ .icon-button--disabled
324
+ ) {
325
+ border-color: var(--cx-color-warning-700);
326
+ background-color: var(--cx-color-warning-700);
327
+ color: var(--cx-color-neutral-0);
328
+ }
329
+
330
+ /* Danger */
331
+ .icon-button--outline.icon-button--danger {
332
+ border-color: var(--cx-color-danger);
333
+ color: var(--cx-color-danger);
334
+ }
335
+
336
+ .icon-button--outline.icon-button--danger:hover:not(.icon-button--disabled),
337
+ .icon-button--outline.icon-button--danger.icon-button--focused:not(
338
+ .icon-button--disabled
339
+ ),
340
+ .icon-button--outline.icon-button--danger.icon-button--checked:not(
341
+ .icon-button--disabled
342
+ ) {
343
+ background-color: var(--cx-color-danger-500);
344
+ color: var(--cx-color-neutral-0);
345
+ }
346
+
347
+ .icon-button--outline.icon-button--danger:active:not(.icon-button--disabled) {
348
+ border-color: var(--cx-color-danger-700);
349
+ background-color: var(--cx-color-danger-700);
350
+ color: var(--cx-color-neutral-0);
351
+ }
352
+
353
+ /*
354
+ * Tertiary buttons
355
+ */
356
+
357
+ .icon-button--tertiary {
358
+ background-color: transparent;
359
+ border-color: transparent;
360
+ color: var(--cx-color-neutral);
361
+ }
362
+
363
+ .icon-button--tertiary:hover:not(.icon-button--disabled),
364
+ .icon-button--tertiary.icon-button--focused:not(.icon-button--disabled) {
365
+ background-color: var(--cx-color-neutral-100);
366
+ border-color: transparent;
367
+ color: var(--cx-color-neutral);
368
+ }
369
+
370
+ .icon-button--tertiary:focus-visible:not(.icon-button--disabled) {
371
+ background-color: var(--cx-color-neutral-200);
372
+ border-color: transparent;
373
+ color: var(--cx-color-neutral);
374
+ }
375
+
376
+ .icon-button--tertiary:active:not(.icon-button--disabled) {
377
+ background-color: var(--cx-color-neutral-300);
378
+ border-color: transparent;
379
+ color: var(--cx-color-neutral);
380
+ }
381
+
382
+ .icon-button--circle {
383
+ border-radius: var(--cx-border-radius-circle);
384
+ }
385
+
386
+ /*
387
+ * Button groups support a variety of button types (e.g. buttons with tooltips, buttons as dropdown triggers, etc.).
388
+ * This means buttons aren't always direct descendants of the button group, thus we can't target them with the
389
+ * ::slotted selector. To work around this, the button group component does some magic to add these special classes to
390
+ * buttons and we style them here instead.
391
+ */
392
+
393
+ :host(
394
+ [data-cx-button-group__button--first]:not(
395
+ [data-cx-button-group__button--last]
396
+ )
397
+ )
398
+ .icon-button {
399
+ border-start-end-radius: 0;
400
+ border-end-end-radius: 0;
401
+ }
402
+
403
+ :host([data-cx-button-group__button--inner]) .icon-button {
404
+ border-radius: 0;
405
+ }
406
+
407
+ :host(
408
+ [data-cx-button-group__button--last]:not(
409
+ [data-cx-button-group__button--first]
410
+ )
411
+ )
412
+ .icon-button {
413
+ border-start-start-radius: 0;
414
+ border-end-start-radius: 0;
415
+ }
416
+
417
+ /* All except the first */
418
+ :host(
419
+ [data-cx-button-group__button]:not([data-cx-button-group__button--first])
420
+ ) {
421
+ margin-inline-start: calc(-1 * var(--cx-input-border-width));
422
+ }
423
+
424
+ /* Add a visual separator between solid buttons */
425
+ :host(
426
+ [data-cx-button-group__button]:not(
427
+ [data-cx-button-group__button--first],
428
+ [data-cx-button-group__button--radio],
429
+ [variant='default']
430
+ ):not(:hover)
431
+ )
432
+ .icon-button:after {
433
+ content: '';
434
+ position: absolute;
435
+ top: 0;
436
+ inset-inline-start: 0;
437
+ bottom: 0;
438
+ border-left: solid 1px var(--group-divider-color);
439
+ mix-blend-mode: multiply;
440
+ }
441
+
442
+ /* Bump hovered, focused, and checked buttons up so their focus ring isn't clipped */
443
+ :host([data-cx-button-group__button--hover]) {
444
+ z-index: 1;
445
+ }
446
+
447
+ /* Focus and checked are always on top */
448
+ :host([data-cx-button-group__button--focus]),
449
+ :host([data-cx-button-group__button][checked]) {
450
+ z-index: 2;
451
+ }
452
+
453
+ /*
454
+ * Badges
455
+ */
456
+
457
+ .icon-button ::slotted(cx-badge) {
458
+ position: absolute !important;
459
+ top: 0 !important;
460
+ left: unset !important;
461
+ right: 0 !important;
462
+ translate: 50% -50%;
463
+ pointer-events: none;
464
+ }
465
+
466
+ .icon-button--rtl ::slotted(cx-badge) {
467
+ right: auto;
468
+ left: 0;
469
+ translate: -50% -50%;
470
+ }
471
+
472
+ .icon-button--small ::slotted(cx-badge) {
473
+ --padding: 0.1em 0.32em;
474
+ --font-size: var(--cx-font-size-x-small);
475
+ }
476
+
477
+ .icon-button--medium ::slotted(cx-badge) {
478
+ --font-size: var(--cx-font-size-small);
479
+ }
480
+
481
+ .icon-button--large ::slotted(cx-badge) {
482
+ --font-size: var(--cx-font-size-medium);
483
+ }
484
+
485
+ .icon-button--x-large ::slotted(cx-badge) {
486
+ --font-size: var(--cx-font-size-medium);
487
+ }
488
+
489
+ .icon-button__icon-container {
490
+ position: relative;
491
+ display: flex;
492
+ align-items: center;
493
+ justify-content: center;
494
+ width: 100%;
495
+ height: 100%;
496
+ line-height: 1;
497
+ }
498
+
499
+ .icon-button--loading {
500
+ position: relative;
501
+ cursor: wait;
502
+ }
503
+
504
+ .icon-button--loading cx-spinner {
505
+ --indicator-color: currentColor;
506
+ position: absolute;
507
+ font-size: calc(1em);
508
+ height: calc(1em);
509
+ width: calc(1em);
510
+ top: calc(50% - 0.5em);
511
+ left: calc(50% - 0.5em);
512
+ }
513
+ `;
514
+ var C = Object.defineProperty, S = Object.getOwnPropertyDescriptor, n = (o, i, l, a) => {
515
+ for (var e = a > 1 ? void 0 : a ? S(i, l) : i, u = o.length - 1, s; u >= 0; u--)
516
+ (s = o[u]) && (e = (a ? s(i, l, e) : s(e)) || e);
517
+ return a && e && C(i, l, e), e;
518
+ };
519
+ let t = class extends p {
520
+ constructor() {
521
+ super(...arguments), this.localize = new m(this), this.hasFocus = !1, this.variant = "outlined", this.buttonVariant = "text", this.label = "", this.disabled = !1, this.loading = !1, this.iconClass = "", this.size = g.Medium, this.outline = !1, this.circle = !1;
522
+ }
523
+ connectedUpdatedCallback() {
524
+ this.syncStyles(), this.styleObserver = new MutationObserver(() => this.syncStyles()), this.styleObserver.observe(this, {
525
+ attributeFilter: ["style"],
526
+ attributes: !0
527
+ });
528
+ }
529
+ disconnectedCallback() {
530
+ super.disconnectedCallback(), this.styleObserver?.disconnect();
531
+ }
532
+ syncStyles() {
533
+ const o = this.style.fontSize;
534
+ o && this.button && (this.icon.style.setProperty("--font-size", o), this.button.style.fontSize = "inherit", this.style.fontSize = "");
535
+ }
536
+ handleBlur() {
537
+ this.hasFocus = !1, this.emit("cx-blur");
538
+ }
539
+ handleFocus() {
540
+ this.hasFocus = !0, this.emit("cx-focus");
541
+ }
542
+ handleClick(o) {
543
+ this.disabled && (o.preventDefault(), o.stopPropagation());
544
+ }
545
+ /** Simulates a click on the icon button. */
546
+ click() {
547
+ this.button.click();
548
+ }
549
+ /** Sets focus on the icon button. */
550
+ focus(o) {
551
+ this.button.focus(o);
552
+ }
553
+ /** Removes focus from the icon button. */
554
+ blur() {
555
+ this.button.blur();
556
+ }
557
+ render() {
558
+ const o = !!this.href, i = o ? d`a` : d`button`;
559
+ return b`
560
+ <${i}
561
+ part="base"
562
+ class=${y({
563
+ "icon-button": !0,
564
+ "icon-button--circle": this.circle,
565
+ "icon-button--custom": !!this.src,
566
+ "icon-button--danger": this.buttonVariant === "danger",
567
+ "icon-button--default": this.buttonVariant === "default" || this.buttonVariant === "neutral",
568
+ "icon-button--disabled": !o && this.disabled,
569
+ "icon-button--focused": this.hasFocus,
570
+ "icon-button--large": this.size === "large",
571
+ "icon-button--loading": this.loading,
572
+ "icon-button--medium": this.size === "medium",
573
+ "icon-button--outline": this.outline,
574
+ "icon-button--primary": this.buttonVariant === "primary",
575
+ "icon-button--rtl": this.localize.dir() === "rtl",
576
+ "icon-button--small": this.size === "small",
577
+ "icon-button--success": this.buttonVariant === "success",
578
+ "icon-button--tertiary": this.buttonVariant === "tertiary",
579
+ "icon-button--text": this.buttonVariant === "text",
580
+ "icon-button--warning": this.buttonVariant === "warning",
581
+ "icon-button--x-large": this.size === "x-large"
582
+ })}
583
+ ?disabled=${c(o ? void 0 : this.disabled)}
584
+ type=${c(o ? void 0 : "button")}
585
+ href=${c(o ? this.href : void 0)}
586
+ target=${c(o ? this.target : void 0)}
587
+ download=${c(o ? this.download : void 0)}
588
+ rel=${c(
589
+ o && this.target ? "noreferrer noopener" : void 0
590
+ )}
591
+ role=${c(o ? void 0 : "button")}
592
+ aria-disabled=${this.disabled || this.loading ? "true" : "false"}
593
+ aria-label=${this.label}
594
+ tabindex=${this.disabled || this.loading ? "-1" : "0"}
595
+ aria-busy=${this.loading ? "true" : "false"}
596
+ @blur=${this.handleBlur}
597
+ @focus=${this.handleFocus}
598
+ @click=${this.handleClick}
599
+ >
600
+ <div class="icon-button__icon-container">
601
+ ${k(
602
+ this.loading,
603
+ () => b`<cx-spinner
604
+ part="spinner"
605
+ role="status"
606
+ aria-live="polite"
607
+ ></cx-spinner>`,
608
+ () => b`<cx-icon
609
+ class="icon-button__icon"
610
+ icon-class=${c(this.iconClass)}
611
+ name=${c(this.name)}
612
+ variant=${this.variant}
613
+ src=${c(this.src)}
614
+ aria-hidden="true"
615
+ part="icon"
616
+ ></cx-icon>`
617
+ )}
618
+ <slot name="badge"></slot>
619
+ </div>
620
+ </${i}>
621
+ `;
622
+ }
623
+ };
624
+ t.styles = [x, $];
625
+ t.dependencies = { "cx-icon": w, "cx-spinner": _ };
626
+ n([
627
+ v(".icon-button")
628
+ ], t.prototype, "button", 2);
629
+ n([
630
+ v(".icon-button__icon")
631
+ ], t.prototype, "icon", 2);
632
+ n([
633
+ f()
634
+ ], t.prototype, "hasFocus", 2);
635
+ n([
636
+ r()
637
+ ], t.prototype, "name", 2);
638
+ n([
639
+ r({ type: String })
640
+ ], t.prototype, "variant", 2);
641
+ n([
642
+ r({ attribute: "button-variant", reflect: !0, type: String })
643
+ ], t.prototype, "buttonVariant", 2);
644
+ n([
645
+ r()
646
+ ], t.prototype, "src", 2);
647
+ n([
648
+ r()
649
+ ], t.prototype, "href", 2);
650
+ n([
651
+ r()
652
+ ], t.prototype, "target", 2);
653
+ n([
654
+ r()
655
+ ], t.prototype, "download", 2);
656
+ n([
657
+ r()
658
+ ], t.prototype, "label", 2);
659
+ n([
660
+ r({ reflect: !0, type: Boolean })
661
+ ], t.prototype, "disabled", 2);
662
+ n([
663
+ r({ reflect: !0, type: Boolean })
664
+ ], t.prototype, "loading", 2);
665
+ n([
666
+ r({ attribute: "icon-class", type: String })
667
+ ], t.prototype, "iconClass", 2);
668
+ n([
669
+ r({ reflect: !0 })
670
+ ], t.prototype, "size", 2);
671
+ n([
672
+ r({ reflect: !0, type: Boolean })
673
+ ], t.prototype, "outline", 2);
674
+ n([
675
+ r({ reflect: !0, type: Boolean })
676
+ ], t.prototype, "circle", 2);
677
+ t = n([
678
+ h("cx-icon-button")
679
+ ], t);
680
+ export {
681
+ t as C,
682
+ g as I
683
+ };
@@ -1,7 +1,7 @@
1
1
  import { n as r, C as d } from "./lib-cortex-element.CVMmyPMC.js";
2
2
  import { c as h } from "./component.styles.DMSLciL5.js";
3
3
  import { c as y } from "./custom-element.L4WJXn1j.js";
4
- import { L as u } from "./i18n.C0iakJkV.js";
4
+ import { L as u } from "./i18n.BU7mYVLM.js";
5
5
  import { w as g } from "./watch.BCJD77bD.js";
6
6
  import { i as v, x as p } from "./lit-element.jLBm65_O.js";
7
7
  import { e as b } from "./query.BBf1UFkC.js";
@@ -6,7 +6,7 @@ import { E as He, b as de, a as $e } from "./index.Cpamj0jB.js";
6
6
  import { c as We } from "./component.styles.DMSLciL5.js";
7
7
  import { c as Ae } from "./custom-element.L4WJXn1j.js";
8
8
  import { d as Oe } from "./debounce.DaHuiSGU.js";
9
- import { L as Me } from "./i18n.C0iakJkV.js";
9
+ import { L as Me } from "./i18n.BU7mYVLM.js";
10
10
  import { w as q } from "./watch.BCJD77bD.js";
11
11
  import { e as j } from "./class-map.BiVq-cVR.js";
12
12
  import { o as De } from "./if-defined.BRoBj_Rp.js";
@@ -11,7 +11,7 @@ import "./default-value.COZopaet.js";
11
11
  import "./drag.DXEXVXPv.js";
12
12
  import "./event.mFzZi4sr.js";
13
13
  import { f as x } from "./form.DgwYWi0O.js";
14
- import "./i18n.C0iakJkV.js";
14
+ import "./i18n.BU7mYVLM.js";
15
15
  import "./math.DqTA6ya4.js";
16
16
  import "./scroll.xtO5yojm.js";
17
17
  import { j as M } from "./dom.BQVKDNd8.js";