@ibobbyts/svelte-ui-utils 0.1.2

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 (82) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +379 -0
  3. package/dist/data-table/BaseDataTable.svelte +322 -0
  4. package/dist/data-table/BaseDataTable.svelte.d.ts +49 -0
  5. package/dist/data-table/BaseDataTable.svelte.d.ts.map +1 -0
  6. package/dist/data-table/DataTable.svelte +104 -0
  7. package/dist/data-table/DataTable.svelte.d.ts +59 -0
  8. package/dist/data-table/DataTable.svelte.d.ts.map +1 -0
  9. package/dist/data-table/DateRangeFilter.svelte +174 -0
  10. package/dist/data-table/DateRangeFilter.svelte.d.ts +30 -0
  11. package/dist/data-table/DateRangeFilter.svelte.d.ts.map +1 -0
  12. package/dist/data-table/FilterControl.svelte +184 -0
  13. package/dist/data-table/FilterControl.svelte.d.ts +5 -0
  14. package/dist/data-table/FilterControl.svelte.d.ts.map +1 -0
  15. package/dist/data-table/FilterTable.svelte +25 -0
  16. package/dist/data-table/FilterTable.svelte.d.ts +24 -0
  17. package/dist/data-table/FilterTable.svelte.d.ts.map +1 -0
  18. package/dist/data-table/NumberRangeFilter.svelte +80 -0
  19. package/dist/data-table/NumberRangeFilter.svelte.d.ts +32 -0
  20. package/dist/data-table/NumberRangeFilter.svelte.d.ts.map +1 -0
  21. package/dist/data-table/filter.d.ts +23 -0
  22. package/dist/data-table/filter.d.ts.map +1 -0
  23. package/dist/data-table/filter.js +38 -0
  24. package/dist/data-table/index.d.ts +11 -0
  25. package/dist/data-table/index.d.ts.map +1 -0
  26. package/dist/data-table/index.js +8 -0
  27. package/dist/data-table/state.d.ts +11 -0
  28. package/dist/data-table/state.d.ts.map +1 -0
  29. package/dist/data-table/state.js +58 -0
  30. package/dist/data-table/types.d.ts +167 -0
  31. package/dist/data-table/types.d.ts.map +1 -0
  32. package/dist/data-table/types.js +1 -0
  33. package/dist/dropdown/Dropdown.svelte +159 -0
  34. package/dist/dropdown/Dropdown.svelte.d.ts +28 -0
  35. package/dist/dropdown/Dropdown.svelte.d.ts.map +1 -0
  36. package/dist/dropdown/index.d.ts +3 -0
  37. package/dist/dropdown/index.d.ts.map +1 -0
  38. package/dist/dropdown/index.js +1 -0
  39. package/dist/dropdown/types.d.ts +9 -0
  40. package/dist/dropdown/types.d.ts.map +1 -0
  41. package/dist/dropdown/types.js +1 -0
  42. package/dist/dropdown-search/DropdownSearch.svelte +312 -0
  43. package/dist/dropdown-search/DropdownSearch.svelte.d.ts +51 -0
  44. package/dist/dropdown-search/DropdownSearch.svelte.d.ts.map +1 -0
  45. package/dist/dropdown-search/index.d.ts +6 -0
  46. package/dist/dropdown-search/index.d.ts.map +1 -0
  47. package/dist/dropdown-search/index.js +3 -0
  48. package/dist/dropdown-search/state.d.ts +15 -0
  49. package/dist/dropdown-search/state.d.ts.map +1 -0
  50. package/dist/dropdown-search/state.js +44 -0
  51. package/dist/dropdown-search/types.d.ts +24 -0
  52. package/dist/dropdown-search/types.d.ts.map +1 -0
  53. package/dist/dropdown-search/types.js +1 -0
  54. package/dist/i18n.d.ts +31 -0
  55. package/dist/i18n.d.ts.map +1 -0
  56. package/dist/i18n.js +118 -0
  57. package/dist/index.d.ts +7 -0
  58. package/dist/index.d.ts.map +1 -0
  59. package/dist/index.js +5 -0
  60. package/dist/pagination/Pagination.svelte +112 -0
  61. package/dist/pagination/Pagination.svelte.d.ts +30 -0
  62. package/dist/pagination/Pagination.svelte.d.ts.map +1 -0
  63. package/dist/pagination/index.d.ts +6 -0
  64. package/dist/pagination/index.d.ts.map +1 -0
  65. package/dist/pagination/index.js +3 -0
  66. package/dist/style.css +1110 -0
  67. package/dist/toast/Toast.svelte +37 -0
  68. package/dist/toast/Toast.svelte.d.ts +26 -0
  69. package/dist/toast/Toast.svelte.d.ts.map +1 -0
  70. package/dist/toast/ToastManager.svelte +29 -0
  71. package/dist/toast/ToastManager.svelte.d.ts +26 -0
  72. package/dist/toast/ToastManager.svelte.d.ts.map +1 -0
  73. package/dist/toast/index.d.ts +7 -0
  74. package/dist/toast/index.d.ts.map +1 -0
  75. package/dist/toast/index.js +4 -0
  76. package/dist/toast/store.d.ts +7 -0
  77. package/dist/toast/store.d.ts.map +1 -0
  78. package/dist/toast/store.js +114 -0
  79. package/dist/toast/types.d.ts +36 -0
  80. package/dist/toast/types.d.ts.map +1 -0
  81. package/dist/toast/types.js +1 -0
  82. package/package.json +83 -0
package/dist/style.css ADDED
@@ -0,0 +1,1110 @@
1
+ :root {
2
+ --suu-color-bg: #ffffff;
3
+ --suu-color-surface: #f9fafb;
4
+ --suu-color-text: #111827;
5
+ --suu-color-muted: #6b7280;
6
+ --suu-color-border: #d1d5db;
7
+ --suu-color-border-strong: #9ca3af;
8
+ --suu-color-accent: #2563eb;
9
+ --suu-color-accent-text: #ffffff;
10
+ --suu-color-success: #059669;
11
+ --suu-color-error: #dc2626;
12
+ --suu-color-warning: #d97706;
13
+ --suu-color-info: #2563eb;
14
+ --suu-shadow: 0 12px 30px rgb(15 23 42 / 0.14);
15
+ --suu-radius: 8px;
16
+ --suu-font: inherit;
17
+ }
18
+
19
+ [data-theme='dark'],
20
+ .suu-theme-dark {
21
+ --suu-color-bg: #111827;
22
+ --suu-color-surface: #1f2937;
23
+ --suu-color-text: #f9fafb;
24
+ --suu-color-muted: #9ca3af;
25
+ --suu-color-border: #374151;
26
+ --suu-color-border-strong: #6b7280;
27
+ --suu-color-accent: #60a5fa;
28
+ --suu-color-accent-text: #111827;
29
+ --suu-color-success: #34d399;
30
+ --suu-color-error: #f87171;
31
+ --suu-color-warning: #fbbf24;
32
+ --suu-color-info: #60a5fa;
33
+ --suu-shadow: 0 16px 34px rgb(0 0 0 / 0.32);
34
+ }
35
+
36
+ .suu-toast-region {
37
+ position: fixed;
38
+ z-index: 1000;
39
+ display: flex;
40
+ gap: 10px;
41
+ width: min(420px, calc(100vw - 32px));
42
+ pointer-events: none;
43
+ }
44
+
45
+ .suu-toast-region[data-stack='down'] {
46
+ flex-direction: column;
47
+ }
48
+
49
+ .suu-toast-region[data-stack='up'] {
50
+ flex-direction: column-reverse;
51
+ }
52
+
53
+ .suu-toast-region--top-left {
54
+ top: 16px;
55
+ left: 16px;
56
+ }
57
+
58
+ .suu-toast-region--top-center {
59
+ top: 16px;
60
+ left: 50%;
61
+ transform: translateX(-50%);
62
+ }
63
+
64
+ .suu-toast-region--top-right {
65
+ top: 16px;
66
+ right: 16px;
67
+ }
68
+
69
+ .suu-toast-region--right-center {
70
+ top: 50%;
71
+ right: 16px;
72
+ transform: translateY(-50%);
73
+ }
74
+
75
+ .suu-toast-region--bottom-right {
76
+ right: 16px;
77
+ bottom: 16px;
78
+ }
79
+
80
+ .suu-toast-region--bottom-center {
81
+ bottom: 16px;
82
+ left: 50%;
83
+ transform: translateX(-50%);
84
+ }
85
+
86
+ .suu-toast-region--bottom-left {
87
+ bottom: 16px;
88
+ left: 16px;
89
+ }
90
+
91
+ .suu-toast-region--left-center {
92
+ top: 50%;
93
+ left: 16px;
94
+ transform: translateY(-50%);
95
+ }
96
+
97
+ .suu-toast {
98
+ position: relative;
99
+ display: grid;
100
+ grid-template-columns: 4px minmax(0, 1fr) auto;
101
+ overflow: hidden;
102
+ min-height: 64px;
103
+ border: 1px solid var(--suu-color-border);
104
+ border-radius: var(--suu-radius);
105
+ background: var(--suu-color-bg);
106
+ color: var(--suu-color-text);
107
+ box-shadow: var(--suu-shadow);
108
+ font-family: var(--suu-font);
109
+ pointer-events: auto;
110
+ }
111
+
112
+ .suu-toast__accent {
113
+ background: var(--suu-color-info);
114
+ }
115
+
116
+ .suu-toast--success .suu-toast__accent,
117
+ .suu-toast--success .suu-toast__countdown {
118
+ background: var(--suu-color-success);
119
+ }
120
+
121
+ .suu-toast--error .suu-toast__accent,
122
+ .suu-toast--error .suu-toast__countdown {
123
+ background: var(--suu-color-error);
124
+ }
125
+
126
+ .suu-toast--warning .suu-toast__accent,
127
+ .suu-toast--warning .suu-toast__countdown {
128
+ background: var(--suu-color-warning);
129
+ }
130
+
131
+ .suu-toast--info .suu-toast__accent,
132
+ .suu-toast--info .suu-toast__countdown,
133
+ .suu-toast--custom .suu-toast__accent,
134
+ .suu-toast--custom .suu-toast__countdown {
135
+ background: var(--suu-color-info);
136
+ }
137
+
138
+ .suu-toast__content {
139
+ min-width: 0;
140
+ padding: 12px 14px;
141
+ }
142
+
143
+ .suu-toast__title {
144
+ font-weight: 700;
145
+ line-height: 1.35;
146
+ }
147
+
148
+ .suu-toast__message {
149
+ margin-top: 2px;
150
+ color: var(--suu-color-muted);
151
+ line-height: 1.45;
152
+ overflow-wrap: anywhere;
153
+ }
154
+
155
+ .suu-toast__close {
156
+ align-self: start;
157
+ margin: 8px 8px 0 0;
158
+ width: 28px;
159
+ height: 28px;
160
+ border: 0;
161
+ border-radius: 999px;
162
+ background: transparent;
163
+ color: var(--suu-color-muted);
164
+ cursor: pointer;
165
+ font: inherit;
166
+ }
167
+
168
+ .suu-toast__close:hover,
169
+ .suu-toast__close:focus-visible {
170
+ background: var(--suu-color-surface);
171
+ color: var(--suu-color-text);
172
+ outline: none;
173
+ }
174
+
175
+ .suu-toast__countdown {
176
+ position: absolute;
177
+ right: 0;
178
+ bottom: 0;
179
+ left: 0;
180
+ height: 3px;
181
+ transform-origin: left center;
182
+ animation: suu-toast-countdown var(--suu-toast-duration) linear forwards;
183
+ }
184
+
185
+ @keyframes suu-toast-countdown {
186
+ from {
187
+ transform: scaleX(1);
188
+ }
189
+
190
+ to {
191
+ transform: scaleX(0);
192
+ }
193
+ }
194
+
195
+ @keyframes suu-dropdown-spinner {
196
+ to {
197
+ transform: rotate(360deg);
198
+ }
199
+ }
200
+
201
+ .suu-dropdown-search {
202
+ position: relative;
203
+ width: 100%;
204
+ font-family: var(--suu-font);
205
+ }
206
+
207
+ .suu-dropdown-search__field {
208
+ position: relative;
209
+ }
210
+
211
+ .suu-dropdown-search__icon {
212
+ position: absolute;
213
+ top: 50%;
214
+ left: 14px;
215
+ z-index: 1;
216
+ width: 1.25rem;
217
+ height: 1.25rem;
218
+ fill: none;
219
+ stroke: var(--suu-color-muted);
220
+ stroke-width: 2.2;
221
+ stroke-linecap: round;
222
+ stroke-linejoin: round;
223
+ transform: translateY(-50%);
224
+ pointer-events: none;
225
+ }
226
+
227
+ .suu-dropdown-search__input,
228
+ .suu-pagination select {
229
+ width: 100%;
230
+ min-height: 42px;
231
+ border: 1px solid var(--suu-color-border);
232
+ border-radius: var(--suu-radius);
233
+ background: var(--suu-color-bg);
234
+ color: var(--suu-color-text);
235
+ font: inherit;
236
+ }
237
+
238
+ .suu-dropdown-search__input {
239
+ padding: 9px 14px 9px 44px;
240
+ box-shadow: 0 1px 2px rgb(15 23 42 / 0.04) inset;
241
+ transition:
242
+ border-color 120ms ease,
243
+ box-shadow 120ms ease;
244
+ }
245
+
246
+ .suu-dropdown-search__input:focus {
247
+ border-color: var(--suu-color-accent);
248
+ outline: 2px solid color-mix(in srgb, var(--suu-color-accent) 22%, transparent);
249
+ outline-offset: 1px;
250
+ box-shadow: 0 0 0 1px color-mix(in srgb, var(--suu-color-accent) 16%, transparent);
251
+ }
252
+
253
+ .suu-dropdown-search--valid .suu-dropdown-search__input {
254
+ border-color: var(--suu-color-success);
255
+ }
256
+
257
+ .suu-dropdown-search--invalid .suu-dropdown-search__input,
258
+ .suu-dropdown-search--error .suu-dropdown-search__input {
259
+ border-color: var(--suu-color-error);
260
+ }
261
+
262
+ .suu-dropdown-search--has-clear .suu-dropdown-search__input {
263
+ padding-right: 42px;
264
+ }
265
+
266
+ .suu-dropdown-search__clear {
267
+ position: absolute;
268
+ top: 50%;
269
+ right: 9px;
270
+ z-index: 2;
271
+ display: inline-grid;
272
+ place-items: center;
273
+ width: 1.5rem;
274
+ height: 1.5rem;
275
+ padding: 0;
276
+ border: 0;
277
+ border-radius: 999px;
278
+ background: transparent;
279
+ color: var(--suu-color-muted);
280
+ cursor: pointer;
281
+ transform: translateY(-50%);
282
+ }
283
+
284
+ .suu-dropdown-search__clear:hover {
285
+ background: var(--suu-color-surface);
286
+ color: var(--suu-color-text);
287
+ }
288
+
289
+ .suu-dropdown-search__clear:focus-visible {
290
+ outline: 2px solid color-mix(in srgb, var(--suu-color-accent) 35%, transparent);
291
+ outline-offset: 2px;
292
+ }
293
+
294
+ .suu-dropdown-search__clear svg {
295
+ width: 1rem;
296
+ height: 1rem;
297
+ fill: none;
298
+ stroke: currentColor;
299
+ stroke-width: 2;
300
+ stroke-linecap: round;
301
+ }
302
+
303
+ .suu-dropdown-search__menu {
304
+ position: absolute;
305
+ top: calc(100% + 6px);
306
+ right: 0;
307
+ left: 0;
308
+ z-index: 100;
309
+ overflow: hidden;
310
+ border: 1px solid var(--suu-color-border);
311
+ border-radius: var(--suu-radius);
312
+ background: var(--suu-color-bg);
313
+ box-shadow: 0 18px 42px rgb(15 23 42 / 0.16);
314
+ }
315
+
316
+ .suu-dropdown-search__menu-panel {
317
+ max-height: 260px;
318
+ overflow-y: auto;
319
+ background: var(--suu-color-bg);
320
+ overscroll-behavior: contain;
321
+ }
322
+
323
+ .suu-dropdown-search__option {
324
+ display: grid;
325
+ gap: 2px;
326
+ width: 100%;
327
+ padding: 9px 10px;
328
+ border: 0;
329
+ border-bottom: 1px solid var(--suu-color-border);
330
+ background: transparent;
331
+ color: var(--suu-color-text);
332
+ text-align: left;
333
+ cursor: pointer;
334
+ font: inherit;
335
+ }
336
+
337
+ .suu-dropdown-search__option:last-child {
338
+ border-bottom: 0;
339
+ }
340
+
341
+ .suu-dropdown-search__option:hover,
342
+ .suu-dropdown-search__option:focus-visible {
343
+ background: var(--suu-color-surface);
344
+ outline: none;
345
+ }
346
+
347
+ .suu-dropdown-search__option--disabled {
348
+ color: var(--suu-color-muted);
349
+ cursor: not-allowed;
350
+ opacity: 0.65;
351
+ }
352
+
353
+ .suu-dropdown-search__title {
354
+ font-weight: 650;
355
+ }
356
+
357
+ .suu-dropdown-search__meta,
358
+ .suu-dropdown-search__empty {
359
+ color: var(--suu-color-muted);
360
+ font-size: 0.875rem;
361
+ }
362
+
363
+ .suu-dropdown-search__empty {
364
+ padding: 10px;
365
+ }
366
+
367
+ .suu-dropdown-search__empty--loading {
368
+ display: flex;
369
+ align-items: center;
370
+ gap: 8px;
371
+ }
372
+
373
+ .suu-dropdown-search__spinner {
374
+ width: 0.875rem;
375
+ height: 0.875rem;
376
+ border: 2px solid color-mix(in srgb, var(--suu-color-muted) 28%, transparent);
377
+ border-top-color: var(--suu-color-accent);
378
+ border-radius: 999px;
379
+ animation: suu-dropdown-spinner 700ms linear infinite;
380
+ }
381
+
382
+ .suu-data-table {
383
+ display: grid;
384
+ gap: 0;
385
+ color: var(--suu-color-text);
386
+ font-family: var(--suu-font);
387
+ }
388
+
389
+ .suu-date-range-filter,
390
+ .suu-number-range-filter {
391
+ display: grid;
392
+ gap: 10px;
393
+ }
394
+
395
+ .suu-date-range-filter {
396
+ display: flex;
397
+ flex-wrap: wrap;
398
+ align-items: flex-end;
399
+ min-width: 0;
400
+ }
401
+
402
+ .suu-number-range-filter {
403
+ display: flex;
404
+ flex-wrap: wrap;
405
+ align-items: flex-end;
406
+ min-width: 0;
407
+ }
408
+
409
+ .suu-range-field {
410
+ display: grid;
411
+ gap: 5px;
412
+ color: var(--suu-color-text);
413
+ font-size: 0.875rem;
414
+ }
415
+
416
+ .suu-date-range-filter .suu-range-field {
417
+ flex: 0 1 var(--suu-date-range-field-width, 11rem);
418
+ min-width: var(--suu-date-range-field-min-width, 9.5rem);
419
+ }
420
+
421
+ .suu-number-range-filter .suu-range-field {
422
+ flex: 0 1 var(--suu-number-range-field-width, 10rem);
423
+ min-width: var(--suu-number-range-field-min-width, 6rem);
424
+ }
425
+
426
+ .suu-range-field span {
427
+ color: var(--suu-color-muted);
428
+ }
429
+
430
+ .suu-range-field input {
431
+ min-height: 36px;
432
+ width: 100%;
433
+ border: 1px solid var(--suu-color-border);
434
+ border-radius: var(--suu-radius);
435
+ background: var(--suu-color-bg);
436
+ color: var(--suu-color-text);
437
+ font: inherit;
438
+ }
439
+
440
+ .suu-range-field input {
441
+ padding: 7px 9px;
442
+ }
443
+
444
+ .suu-range-field input:focus {
445
+ border-color: var(--suu-color-accent);
446
+ outline: 2px solid color-mix(in srgb, var(--suu-color-accent) 22%, transparent);
447
+ outline-offset: 1px;
448
+ }
449
+
450
+ .suu-filter-preset-row {
451
+ display: flex;
452
+ flex-wrap: wrap;
453
+ gap: 6px;
454
+ }
455
+
456
+ .suu-date-range-filter .suu-filter-preset-row {
457
+ flex: 1 1 var(--suu-date-range-preset-width, 24rem);
458
+ align-self: flex-end;
459
+ }
460
+
461
+ .suu-filter-preset {
462
+ min-height: 30px;
463
+ padding: 5px 8px;
464
+ border: 1px solid var(--suu-color-border);
465
+ border-radius: var(--suu-radius);
466
+ background: var(--suu-color-bg);
467
+ color: var(--suu-color-text);
468
+ cursor: pointer;
469
+ font: inherit;
470
+ font-size: 0.8125rem;
471
+ }
472
+
473
+ .suu-filter-preset:hover,
474
+ .suu-filter-preset:focus-visible,
475
+ .suu-filter-preset--active {
476
+ border-color: var(--suu-color-accent);
477
+ outline: none;
478
+ }
479
+
480
+ .suu-filter-preset--active {
481
+ background: color-mix(in srgb, var(--suu-color-accent) 12%, var(--suu-color-bg));
482
+ }
483
+
484
+ .suu-input-affix {
485
+ display: flex;
486
+ align-items: stretch;
487
+ }
488
+
489
+ .suu-input-affix__label {
490
+ display: inline-flex;
491
+ align-items: center;
492
+ padding: 0 9px;
493
+ border: 1px solid var(--suu-color-border);
494
+ border-right: 0;
495
+ border-radius: var(--suu-radius) 0 0 var(--suu-radius);
496
+ background: var(--suu-color-surface);
497
+ color: var(--suu-color-muted);
498
+ }
499
+
500
+ .suu-input-affix input {
501
+ min-width: 0;
502
+ }
503
+
504
+ .suu-input-affix:has(.suu-input-affix__label) input {
505
+ border-radius: 0 var(--suu-radius) var(--suu-radius) 0;
506
+ }
507
+
508
+ .suu-filter-table {
509
+ display: grid;
510
+ gap: 12px;
511
+ color: var(--suu-color-text);
512
+ font-family: var(--suu-font);
513
+ }
514
+
515
+ .suu-filter-table__filters-wrap {
516
+ overflow: visible;
517
+ border: 1px solid var(--suu-color-border);
518
+ border-radius: calc(var(--suu-radius) + 4px);
519
+ background: var(--suu-color-bg);
520
+ box-shadow: 0 8px 10px rgb(15 23 42 / 0.08);
521
+ }
522
+
523
+ .suu-filter-table__filters {
524
+ width: 100%;
525
+ border-collapse: separate;
526
+ border-spacing: 0;
527
+ border-radius: inherit;
528
+ background: var(--suu-color-bg);
529
+ }
530
+
531
+ .suu-filter-table__filters th,
532
+ .suu-filter-table__filters td {
533
+ padding: 16px 20px;
534
+ text-align: left;
535
+ vertical-align: middle;
536
+ }
537
+
538
+ .suu-filter-table__filters tr + tr th,
539
+ .suu-filter-table__filters tr + tr td {
540
+ border-top: 1px solid var(--suu-color-border);
541
+ }
542
+
543
+ .suu-filter-table__filters th {
544
+ position: relative;
545
+ width: 10rem;
546
+ background: var(--suu-color-bg);
547
+ color: var(--suu-color-text);
548
+ font-weight: 700;
549
+ white-space: normal;
550
+ }
551
+
552
+ .suu-filter-table__filters th::after {
553
+ content: "";
554
+ position: absolute;
555
+ top: var(--suu-filter-table-divider-inset, 20px);
556
+ bottom: var(--suu-filter-table-divider-inset, 20px);
557
+ right: 0;
558
+ width: 1px;
559
+ background: var(--suu-color-border);
560
+ }
561
+
562
+ .suu-filter-table__filters tr:first-child th {
563
+ border-top-left-radius: calc(var(--suu-radius) + 3px);
564
+ }
565
+
566
+ .suu-filter-table__filters tr:first-child td {
567
+ border-top-right-radius: calc(var(--suu-radius) + 3px);
568
+ }
569
+
570
+ .suu-filter-table__filters tr:last-child th {
571
+ border-bottom-left-radius: calc(var(--suu-radius) + 3px);
572
+ }
573
+
574
+ .suu-filter-table__filters tr:last-child td {
575
+ border-bottom-right-radius: calc(var(--suu-radius) + 3px);
576
+ }
577
+
578
+ .suu-filter-table__filters td {
579
+ min-width: 0;
580
+ }
581
+
582
+ .suu-filter-table__control-row {
583
+ display: flex;
584
+ flex-wrap: wrap;
585
+ gap: 12px;
586
+ align-items: center;
587
+ }
588
+
589
+ .suu-filter-table__control-main {
590
+ min-width: min(100%, 15rem);
591
+ }
592
+
593
+ .suu-filter-table__options {
594
+ display: flex;
595
+ flex-wrap: wrap;
596
+ gap: 10px 14px;
597
+ align-items: center;
598
+ }
599
+
600
+ .suu-filter-table__option {
601
+ position: relative;
602
+ display: inline-flex;
603
+ align-items: center;
604
+ justify-content: flex-start;
605
+ min-height: 42px;
606
+ gap: 8px;
607
+ padding: 7px 10px 7px 12px;
608
+ border: 1px solid var(--suu-color-border);
609
+ border-radius: var(--suu-radius);
610
+ background: var(--suu-color-bg);
611
+ color: var(--suu-color-muted);
612
+ cursor: pointer;
613
+ font-weight: 650;
614
+ transition:
615
+ border-color 120ms ease,
616
+ box-shadow 120ms ease,
617
+ color 120ms ease,
618
+ background 120ms ease;
619
+ }
620
+
621
+ .suu-filter-table__option:hover {
622
+ border-color: var(--suu-color-border-strong);
623
+ color: var(--suu-color-text);
624
+ }
625
+
626
+ .suu-filter-table__option:has(.suu-filter-table__option-input:focus-visible) {
627
+ border-color: var(--suu-color-accent);
628
+ outline: 2px solid color-mix(in srgb, var(--suu-color-accent) 22%, transparent);
629
+ outline-offset: 1px;
630
+ }
631
+
632
+ .suu-filter-table__option--checked {
633
+ border-color: var(--suu-color-accent);
634
+ background: color-mix(in srgb, var(--suu-color-accent) 7%, var(--suu-color-bg));
635
+ color: var(--suu-color-accent);
636
+ box-shadow: 0 0 0 1px color-mix(in srgb, var(--suu-color-accent) 20%, transparent);
637
+ }
638
+
639
+ .suu-filter-table__option-input {
640
+ position: absolute;
641
+ width: 1px;
642
+ height: 1px;
643
+ overflow: hidden;
644
+ clip: rect(0 0 0 0);
645
+ clip-path: inset(50%);
646
+ white-space: nowrap;
647
+ }
648
+
649
+ .suu-filter-table__option-label {
650
+ line-height: 1.2;
651
+ }
652
+
653
+ .suu-filter-table__option-check {
654
+ display: inline-grid;
655
+ flex: 0 0 auto;
656
+ width: 1em;
657
+ height: 1em;
658
+ place-items: center;
659
+ border: 1px solid var(--suu-color-border-strong);
660
+ border-radius: 999px;
661
+ color: transparent;
662
+ transform: translateY(0.06em);
663
+ }
664
+
665
+ .suu-filter-table__option-check svg {
666
+ width: 0.72em;
667
+ height: 0.72em;
668
+ fill: none;
669
+ stroke: currentcolor;
670
+ stroke-width: 2.6;
671
+ stroke-linecap: round;
672
+ stroke-linejoin: round;
673
+ }
674
+
675
+ .suu-filter-table__option--checked .suu-filter-table__option-check {
676
+ border-color: var(--suu-color-accent);
677
+ background: var(--suu-color-accent);
678
+ color: var(--suu-color-accent-text);
679
+ }
680
+
681
+ .suu-filter-table__option:has(.suu-filter-table__option-input:disabled) {
682
+ cursor: not-allowed;
683
+ opacity: 0.55;
684
+ }
685
+
686
+ .suu-filter-table__controls {
687
+ display: flex;
688
+ flex-wrap: wrap;
689
+ gap: 10px;
690
+ align-items: center;
691
+ }
692
+
693
+ .suu-filter-table__action,
694
+ .suu-filter-table__select {
695
+ min-height: 38px;
696
+ border: 1px solid var(--suu-color-border);
697
+ border-radius: var(--suu-radius);
698
+ background: var(--suu-color-bg);
699
+ color: var(--suu-color-text);
700
+ cursor: pointer;
701
+ font: inherit;
702
+ }
703
+
704
+ .suu-filter-table__action {
705
+ display: inline-flex;
706
+ gap: 8px;
707
+ align-items: center;
708
+ justify-content: center;
709
+ padding: 7px 12px;
710
+ font-weight: 600;
711
+ text-decoration: none;
712
+ }
713
+
714
+ .suu-filter-table__action--primary {
715
+ border-color: var(--suu-color-accent);
716
+ background: var(--suu-color-accent);
717
+ color: #ffffff;
718
+ }
719
+
720
+ .suu-filter-table__action--secondary {
721
+ background: var(--suu-color-surface);
722
+ }
723
+
724
+ .suu-filter-table__action--ghost {
725
+ border-color: transparent;
726
+ background: transparent;
727
+ }
728
+
729
+ .suu-filter-table__action:focus-visible,
730
+ .suu-filter-table__select:focus {
731
+ border-color: var(--suu-color-accent);
732
+ outline: 2px solid color-mix(in srgb, var(--suu-color-accent) 22%, transparent);
733
+ outline-offset: 1px;
734
+ }
735
+
736
+ .suu-filter-table__action-icon {
737
+ width: 1.1rem;
738
+ height: 1.1rem;
739
+ fill: none;
740
+ stroke: currentcolor;
741
+ stroke-width: 2.4;
742
+ stroke-linecap: round;
743
+ stroke-linejoin: round;
744
+ }
745
+
746
+ .suu-filter-table__select {
747
+ padding: 7px 34px 7px 10px;
748
+ }
749
+
750
+ .suu-table-wrap {
751
+ overflow: auto;
752
+ border: 1px solid var(--suu-color-border);
753
+ border-radius: var(--suu-radius);
754
+ }
755
+
756
+ .suu-table-wrap--borderless {
757
+ border: 0;
758
+ border-radius: 0;
759
+ }
760
+
761
+ .suu-table {
762
+ width: 100%;
763
+ border-collapse: collapse;
764
+ background: var(--suu-color-bg);
765
+ }
766
+
767
+ .suu-table--layout-auto {
768
+ table-layout: auto;
769
+ }
770
+
771
+ .suu-table--layout-fixed {
772
+ table-layout: fixed;
773
+ }
774
+
775
+ .suu-table th,
776
+ .suu-table td {
777
+ padding: 10px 12px;
778
+ border-bottom: 1px solid var(--suu-color-border);
779
+ text-align: left;
780
+ vertical-align: top;
781
+ }
782
+
783
+ .suu-table--vertical-separators th:not(:first-child),
784
+ .suu-table--vertical-separators td:not(:first-child) {
785
+ border-left: 1px solid var(--suu-color-border);
786
+ }
787
+
788
+ .suu-table th[data-nowrap='true'],
789
+ .suu-table td[data-nowrap='true'] {
790
+ white-space: nowrap;
791
+ }
792
+
793
+ .suu-table th[data-align='center'],
794
+ .suu-table td[data-align='center'] {
795
+ text-align: center;
796
+ }
797
+
798
+ .suu-table th[data-align='right'],
799
+ .suu-table td[data-align='right'] {
800
+ text-align: right;
801
+ }
802
+
803
+ .suu-table thead th {
804
+ background: var(--suu-color-surface);
805
+ color: var(--suu-color-text);
806
+ font-weight: 700;
807
+ }
808
+
809
+ .suu-table--sticky-header thead th {
810
+ position: relative;
811
+ z-index: 1;
812
+ }
813
+
814
+ .suu-table--sticky-header-shadowed > thead {
815
+ opacity: 0;
816
+ pointer-events: none;
817
+ }
818
+
819
+ .suu-table__sticky-offset-probe {
820
+ position: fixed;
821
+ top: var(--suu-table-sticky-top, 0px);
822
+ left: 0;
823
+ width: 0;
824
+ height: 0;
825
+ visibility: hidden;
826
+ pointer-events: none;
827
+ }
828
+
829
+ .suu-table__sticky-clone {
830
+ position: fixed;
831
+ top: var(--suu-table-sticky-top, 0px);
832
+ z-index: var(--suu-table-sticky-z-index, 30);
833
+ overflow: hidden;
834
+ pointer-events: none;
835
+ box-shadow: 0 1px 0 var(--suu-color-border);
836
+ }
837
+
838
+ .suu-table__sticky-clone .suu-table {
839
+ table-layout: fixed;
840
+ }
841
+
842
+ .suu-table__sticky-clone .suu-table__sort-button {
843
+ pointer-events: auto;
844
+ }
845
+
846
+ .suu-table--zebra tbody tr:nth-child(even) {
847
+ background: color-mix(in srgb, var(--suu-color-surface) 70%, transparent);
848
+ }
849
+
850
+ .suu-table tbody tr:last-child td {
851
+ border-bottom: 0;
852
+ }
853
+
854
+ .suu-table tbody tr:hover {
855
+ background: color-mix(in srgb, var(--suu-color-surface) 88%, transparent);
856
+ }
857
+
858
+ .suu-table__sort-button {
859
+ display: inline-flex;
860
+ gap: 6px;
861
+ align-items: center;
862
+ width: 100%;
863
+ border: 0;
864
+ background: transparent;
865
+ color: inherit;
866
+ cursor: pointer;
867
+ font: inherit;
868
+ font-weight: inherit;
869
+ text-align: inherit;
870
+ }
871
+
872
+ .suu-table__sort-button:focus-visible {
873
+ outline: 2px solid var(--suu-color-accent);
874
+ outline-offset: 2px;
875
+ }
876
+
877
+ .suu-table__sort-indicator {
878
+ display: inline-flex;
879
+ align-items: center;
880
+ color: var(--suu-color-muted);
881
+ font-size: 0.75rem;
882
+ }
883
+
884
+ .suu-table__sort-icon {
885
+ display: block;
886
+ width: 0.875rem;
887
+ height: 0.875rem;
888
+ }
889
+
890
+ .suu-table__empty {
891
+ color: var(--suu-color-muted);
892
+ text-align: center;
893
+ }
894
+
895
+ .suu-pagination {
896
+ display: grid;
897
+ grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
898
+ gap: 12px;
899
+ align-items: center;
900
+ width: 100%;
901
+ min-height: 58px;
902
+ }
903
+
904
+ .suu-pagination__size span {
905
+ color: var(--suu-color-muted);
906
+ font-size: 0.875rem;
907
+ }
908
+
909
+ .suu-pagination__pages,
910
+ .suu-pagination__size {
911
+ display: inline-flex;
912
+ align-items: center;
913
+ align-self: center;
914
+ }
915
+
916
+ .suu-pagination__pages {
917
+ grid-column: 2;
918
+ min-height: 34px;
919
+ flex-wrap: wrap;
920
+ gap: 8px;
921
+ justify-content: center;
922
+ }
923
+
924
+ .suu-pagination__pages--empty {
925
+ min-width: 1px;
926
+ }
927
+
928
+ .suu-pagination__page-button {
929
+ display: inline-flex;
930
+ align-items: center;
931
+ justify-content: center;
932
+ min-width: 34px;
933
+ min-height: 34px;
934
+ padding: 6px 10px;
935
+ border: 1px solid transparent;
936
+ border-radius: var(--suu-radius);
937
+ background: transparent;
938
+ color: var(--suu-color-text);
939
+ cursor: pointer;
940
+ font: inherit;
941
+ font-weight: 600;
942
+ line-height: 1;
943
+ }
944
+
945
+ .suu-pagination__page-button:hover,
946
+ .suu-pagination__page-button:focus-visible {
947
+ border-color: var(--suu-color-accent);
948
+ outline: none;
949
+ }
950
+
951
+ .suu-pagination__page-button--active {
952
+ border-color: var(--suu-color-accent);
953
+ background: var(--suu-color-accent);
954
+ color: var(--suu-color-accent-text);
955
+ box-shadow: var(--suu-shadow);
956
+ }
957
+
958
+ .suu-pagination__ellipsis {
959
+ display: inline-flex;
960
+ align-items: center;
961
+ min-height: 34px;
962
+ color: var(--suu-color-muted);
963
+ font-weight: 600;
964
+ line-height: 1;
965
+ }
966
+
967
+ .suu-pagination__size {
968
+ grid-column: 3;
969
+ align-self: center;
970
+ justify-self: end;
971
+ gap: 8px;
972
+ padding-right: 12px;
973
+ }
974
+
975
+ .suu-dropdown {
976
+ --suu-dropdown-space: 14px;
977
+
978
+ position: relative;
979
+ display: inline-flex;
980
+ color: var(--suu-color-text);
981
+ }
982
+
983
+ .suu-dropdown__button {
984
+ display: inline-flex;
985
+ gap: var(--suu-dropdown-space);
986
+ align-items: center;
987
+ justify-content: space-between;
988
+ height: 42px;
989
+ padding: 0 var(--suu-dropdown-space);
990
+ border: 1px solid var(--suu-color-border);
991
+ border-radius: var(--suu-radius);
992
+ background: var(--suu-color-bg);
993
+ color: var(--suu-color-text);
994
+ cursor: pointer;
995
+ font: inherit;
996
+ line-height: 1;
997
+ }
998
+
999
+ .suu-dropdown__button:hover,
1000
+ .suu-dropdown__button:focus-visible {
1001
+ border-color: var(--suu-color-accent);
1002
+ outline: none;
1003
+ }
1004
+
1005
+ .suu-dropdown__button:disabled {
1006
+ cursor: not-allowed;
1007
+ opacity: 0.6;
1008
+ }
1009
+
1010
+ .suu-dropdown__chevron {
1011
+ width: 0.58em;
1012
+ height: 0.58em;
1013
+ border-right: 2px solid currentcolor;
1014
+ border-bottom: 2px solid currentcolor;
1015
+ transform: translateY(-20%) rotate(45deg);
1016
+ }
1017
+
1018
+ .suu-dropdown__menu {
1019
+ position: absolute;
1020
+ top: calc(100% + 6px);
1021
+ right: 0;
1022
+ z-index: 100;
1023
+ min-width: 100%;
1024
+ overflow: hidden;
1025
+ border: 1px solid var(--suu-color-border);
1026
+ border-radius: var(--suu-radius);
1027
+ background: var(--suu-color-bg);
1028
+ box-shadow: 0 18px 42px rgb(15 23 42 / 0.16);
1029
+ }
1030
+
1031
+ .suu-dropdown__menu--up {
1032
+ top: auto;
1033
+ bottom: calc(100% + 6px);
1034
+ }
1035
+
1036
+ .suu-dropdown__panel {
1037
+ max-height: 220px;
1038
+ overflow-y: auto;
1039
+ background: var(--suu-color-bg);
1040
+ overscroll-behavior: contain;
1041
+ }
1042
+
1043
+ .suu-dropdown__option {
1044
+ display: block;
1045
+ width: 100%;
1046
+ padding: 9px 14px;
1047
+ border: 0;
1048
+ border-bottom: 1px solid var(--suu-color-border);
1049
+ background: transparent;
1050
+ color: var(--suu-color-text);
1051
+ cursor: pointer;
1052
+ font: inherit;
1053
+ text-align: left;
1054
+ }
1055
+
1056
+ .suu-dropdown__option:last-child {
1057
+ border-bottom: 0;
1058
+ }
1059
+
1060
+ .suu-dropdown__option:hover,
1061
+ .suu-dropdown__option:focus-visible,
1062
+ .suu-dropdown__option--active {
1063
+ background: var(--suu-color-surface);
1064
+ outline: none;
1065
+ }
1066
+
1067
+ .suu-dropdown__option[aria-selected='true'] {
1068
+ color: var(--suu-color-accent);
1069
+ font-weight: 700;
1070
+ }
1071
+
1072
+ .suu-dropdown__option--disabled,
1073
+ .suu-dropdown__option:disabled {
1074
+ cursor: not-allowed;
1075
+ opacity: 0.55;
1076
+ }
1077
+
1078
+ @media (max-width: 640px) {
1079
+ .suu-pagination {
1080
+ grid-template-columns: 1fr;
1081
+ }
1082
+
1083
+ .suu-pagination__pages,
1084
+ .suu-pagination__size {
1085
+ grid-column: 1;
1086
+ justify-self: center;
1087
+ }
1088
+ }
1089
+
1090
+ .suu-button {
1091
+ min-height: 34px;
1092
+ padding: 6px 10px;
1093
+ border: 1px solid var(--suu-color-border);
1094
+ border-radius: var(--suu-radius);
1095
+ background: var(--suu-color-bg);
1096
+ color: var(--suu-color-text);
1097
+ cursor: pointer;
1098
+ font: inherit;
1099
+ }
1100
+
1101
+ .suu-button:hover:not(:disabled),
1102
+ .suu-button:focus-visible {
1103
+ border-color: var(--suu-color-accent);
1104
+ outline: none;
1105
+ }
1106
+
1107
+ .suu-button:disabled {
1108
+ cursor: not-allowed;
1109
+ opacity: 0.5;
1110
+ }