@sveltia/ui 0.42.0 → 0.43.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 (74) hide show
  1. package/dist/components/alert/alert.svelte +30 -36
  2. package/dist/components/alert/infobar.svelte +45 -55
  3. package/dist/components/bottom-navigation/bottom-navigation.svelte +15 -21
  4. package/dist/components/button/button-group.svelte +5 -7
  5. package/dist/components/button/button.svelte +175 -274
  6. package/dist/components/button/floating-action-button-wrapper.svelte +18 -23
  7. package/dist/components/button/select-button-group.svelte +41 -57
  8. package/dist/components/button/split-button.svelte +18 -25
  9. package/dist/components/calendar/calendar.svelte +80 -103
  10. package/dist/components/checkbox/checkbox-group.svelte +19 -22
  11. package/dist/components/checkbox/checkbox.svelte +63 -91
  12. package/dist/components/dialog/dialog.svelte +87 -105
  13. package/dist/components/dialog/prompt-dialog.svelte +3 -5
  14. package/dist/components/disclosure/disclosure.svelte +21 -34
  15. package/dist/components/divider/divider.svelte +14 -18
  16. package/dist/components/divider/spacer.svelte +8 -13
  17. package/dist/components/drawer/drawer.svelte +190 -343
  18. package/dist/components/grid/grid-body.svelte +14 -16
  19. package/dist/components/grid/grid-cell.svelte +3 -5
  20. package/dist/components/grid/grid-col-header.svelte +3 -5
  21. package/dist/components/grid/grid-foot.svelte +3 -5
  22. package/dist/components/grid/grid-head.svelte +3 -5
  23. package/dist/components/grid/grid-row-header.svelte +4 -6
  24. package/dist/components/grid/grid-row.svelte +4 -6
  25. package/dist/components/grid/grid.svelte +12 -18
  26. package/dist/components/icon/icon.svelte +5 -7
  27. package/dist/components/listbox/listbox.svelte +61 -78
  28. package/dist/components/listbox/option-group.svelte +11 -15
  29. package/dist/components/listbox/option.svelte +39 -54
  30. package/dist/components/menu/menu-item-group.svelte +3 -5
  31. package/dist/components/menu/menu-item.svelte +51 -67
  32. package/dist/components/menu/menu.svelte +17 -21
  33. package/dist/components/progressbar/progressbar.svelte +15 -24
  34. package/dist/components/radio/radio-group.svelte +31 -40
  35. package/dist/components/radio/radio.svelte +63 -81
  36. package/dist/components/resizable-pane/resizable-handle.svelte +48 -60
  37. package/dist/components/resizable-pane/resizable-pane-group.svelte +14 -18
  38. package/dist/components/select/combobox.svelte +112 -135
  39. package/dist/components/select/select-tags.svelte +57 -73
  40. package/dist/components/slider/slider.svelte +74 -94
  41. package/dist/components/switch/switch.svelte +81 -115
  42. package/dist/components/table/table-body.svelte +14 -16
  43. package/dist/components/table/table-cell.svelte +3 -5
  44. package/dist/components/table/table-col-header.svelte +3 -5
  45. package/dist/components/table/table-foot.svelte +3 -5
  46. package/dist/components/table/table-head.svelte +3 -5
  47. package/dist/components/table/table-row-header.svelte +4 -6
  48. package/dist/components/table/table-row.svelte +4 -6
  49. package/dist/components/table/table.svelte +12 -18
  50. package/dist/components/tabs/tab-box.svelte +6 -9
  51. package/dist/components/tabs/tab-list.svelte +73 -91
  52. package/dist/components/tabs/tab-panel.svelte +7 -11
  53. package/dist/components/tabs/tab-panels.svelte +14 -19
  54. package/dist/components/text-editor/code-editor.svelte +7 -10
  55. package/dist/components/text-editor/core.js +10 -7
  56. package/dist/components/text-editor/lexical-root.svelte +160 -221
  57. package/dist/components/text-editor/text-editor.svelte +18 -25
  58. package/dist/components/text-editor/toolbar/toolbar-wrapper.svelte +37 -44
  59. package/dist/components/text-field/number-input.svelte +68 -87
  60. package/dist/components/text-field/password-input.svelte +42 -52
  61. package/dist/components/text-field/search-bar.svelte +53 -64
  62. package/dist/components/text-field/secret-input.svelte +46 -61
  63. package/dist/components/text-field/text-area.svelte +68 -80
  64. package/dist/components/text-field/text-input.svelte +106 -138
  65. package/dist/components/toast/toast.svelte +89 -104
  66. package/dist/components/toolbar/toolbar.svelte +54 -70
  67. package/dist/components/typography/truncated-text.svelte +7 -9
  68. package/dist/components/util/app-shell.svelte +493 -40
  69. package/dist/components/util/empty-state.svelte +11 -13
  70. package/dist/components/util/group.svelte +3 -5
  71. package/dist/components/util/modal.svelte +48 -59
  72. package/dist/components/util/popup.svelte +67 -87
  73. package/dist/services/i18n.js +2 -2
  74. package/package.json +2 -2
@@ -256,76 +256,60 @@
256
256
  {/if}
257
257
  </div>
258
258
 
259
- <style lang="scss">
260
- .select-tags {
261
- display: flex;
262
- flex-wrap: wrap;
263
- align-items: center;
264
-
265
- &.disabled {
266
- pointer-events: none;
267
-
268
- & > * {
269
- opacity: 0.5;
270
- }
271
- }
272
-
273
- span[role='listbox'] {
274
- display: contents;
275
- }
276
-
277
- span[draggable] {
278
- display: inline-flex;
279
- align-items: center;
280
- position: relative;
281
- margin: var(--sui-focus-ring-width);
282
- padding: 0;
283
- padding-inline-start: 8px;
284
- border-radius: var(--sui-control-medium-border-radius);
285
- background-color: var(--sui-secondary-background-color);
286
- cursor: grab;
287
- outline: none;
288
-
289
- &:focus-within {
290
- outline: var(--sui-focus-ring-width) solid var(--sui-primary-accent-color-translucent);
291
- outline-offset: 1px;
292
- }
293
-
294
- &.drag-source {
295
- opacity: 0.4;
296
- cursor: grabbing;
297
- }
298
-
299
- &.drop-before::before,
300
- &.drop-after::after {
301
- content: '';
302
- position: absolute;
303
- top: 0;
304
- bottom: 0;
305
- margin-left: -1px;
306
- border-radius: 1px;
307
- width: 4px;
308
- background-color: var(--sui-primary-accent-color);
309
- pointer-events: none;
310
- }
311
-
312
- &.drop-before::before {
313
- inset-inline-start: calc(-1 * var(--sui-focus-ring-width) - 1px);
314
- }
315
-
316
- &.drop-after::after {
317
- inset-inline-end: calc(-1 * var(--sui-focus-ring-width) - 1px);
318
- }
319
-
320
- .label {
321
- outline: none;
322
- }
323
-
324
- :global {
325
- .icon {
326
- font-size: var(--sui-font-size-large);
327
- }
328
- }
329
- }
330
- }
331
- </style>
259
+ <style>.select-tags {
260
+ display: flex;
261
+ flex-wrap: wrap;
262
+ align-items: center;
263
+ }
264
+ .select-tags.disabled {
265
+ pointer-events: none;
266
+ }
267
+ .select-tags.disabled > * {
268
+ opacity: 0.5;
269
+ }
270
+ .select-tags span[role=listbox] {
271
+ display: contents;
272
+ }
273
+ .select-tags span[draggable] {
274
+ display: inline-flex;
275
+ align-items: center;
276
+ position: relative;
277
+ margin: var(--sui-focus-ring-width);
278
+ padding: 0;
279
+ padding-inline-start: 8px;
280
+ border-radius: var(--sui-control-medium-border-radius);
281
+ background-color: var(--sui-secondary-background-color);
282
+ cursor: grab;
283
+ outline: none;
284
+ }
285
+ .select-tags span[draggable]:focus-within {
286
+ outline: var(--sui-focus-ring-width) solid var(--sui-primary-accent-color-translucent);
287
+ outline-offset: 1px;
288
+ }
289
+ .select-tags span[draggable].drag-source {
290
+ opacity: 0.4;
291
+ cursor: grabbing;
292
+ }
293
+ .select-tags span[draggable].drop-before::before, .select-tags span[draggable].drop-after::after {
294
+ content: "";
295
+ position: absolute;
296
+ top: 0;
297
+ bottom: 0;
298
+ margin-left: -1px;
299
+ border-radius: 1px;
300
+ width: 4px;
301
+ background-color: var(--sui-primary-accent-color);
302
+ pointer-events: none;
303
+ }
304
+ .select-tags span[draggable].drop-before::before {
305
+ inset-inline-start: calc(-1 * var(--sui-focus-ring-width) - 1px);
306
+ }
307
+ .select-tags span[draggable].drop-after::after {
308
+ inset-inline-end: calc(-1 * var(--sui-focus-ring-width) - 1px);
309
+ }
310
+ .select-tags span[draggable] .label {
311
+ outline: none;
312
+ }
313
+ .select-tags span[draggable] :global(.icon) {
314
+ font-size: var(--sui-font-size-large);
315
+ }</style>
@@ -381,97 +381,77 @@
381
381
  </div>
382
382
  </div>
383
383
 
384
- <style lang="scss">
385
- .slider {
386
- position: relative;
387
- display: inline-block;
388
- margin: var(--sui-focus-ring-width);
389
- padding: 4px 6px;
390
- touch-action: none;
391
-
392
- &:hover {
393
- .base-bar {
394
- background-color: var(--sui-hover-background-color);
395
- }
396
- }
397
-
398
- &:active {
399
- .base-bar {
400
- background-color: var(--sui-active-background-color);
401
- }
402
- }
403
- }
404
-
405
- .base {
406
- position: relative;
407
- width: var(--sui-slider-base-width, 240px);
408
- height: calc(var(--sui-checkbox-height) / 2);
409
- cursor: pointer;
410
- }
411
-
412
- .base-bar {
413
- border-width: 1px;
414
- border-style: solid;
415
- border-color: var(--sui-control-border-color);
416
- border-radius: var(--sui-checkbox-height);
417
- background-color: var(--sui-slider-background-color, var(--sui-secondary-background-color));
418
- transition: all 200ms;
419
- width: 100%;
420
- height: 100%;
421
- }
422
-
423
- .slider-bar {
424
- position: absolute;
425
- top: 0;
426
- height: calc(var(--sui-checkbox-height) / 2);
427
- border-radius: var(--sui-checkbox-height);
428
- background-color: var(--sui-primary-accent-color-light);
429
-
430
- .invalid & {
431
- background-color: var(--sui-error-border-color);
432
- }
433
- }
434
-
435
- [role='slider'] {
436
- position: absolute;
437
- top: 0;
438
- border: 3px solid var(--sui-primary-accent-color-light);
439
- border-radius: var(--sui-checkbox-height);
440
- width: calc(var(--sui-checkbox-height) - 2px);
441
- height: calc(var(--sui-checkbox-height) - 2px);
442
- background-color: var(--sui-primary-accent-color-inverted);
443
- cursor: pointer;
444
-
445
- &:dir(ltr) {
446
- transform: translate(
447
- calc((var(--sui-checkbox-height) / 2 - 1px) * -1),
448
- calc((var(--sui-checkbox-height) / 4 - 1px) * -1)
449
- );
450
- }
451
-
452
- &:dir(rtl) {
453
- transform: translate(
454
- calc((var(--sui-checkbox-height) / 2 - 1px)),
455
- calc((var(--sui-checkbox-height) / 4 - 1px) * -1)
456
- );
457
- }
458
-
459
- .invalid & {
460
- border-color: var(--sui-error-border-color);
461
- }
462
- }
463
-
464
- .label {
465
- position: absolute;
466
- top: calc(var(--sui-checkbox-height) / 2 + 8px);
467
- font-size: var(--sui-font-size-x-small);
468
-
469
- &:dir(ltr) {
470
- transform: translateX(-50%);
471
- }
472
-
473
- &:dir(rtl) {
474
- transform: translateX(50%);
475
- }
476
- }
477
- </style>
384
+ <style>.slider {
385
+ position: relative;
386
+ display: inline-block;
387
+ margin: var(--sui-focus-ring-width);
388
+ padding: 4px 6px;
389
+ touch-action: none;
390
+ }
391
+ .slider:hover .base-bar {
392
+ background-color: var(--sui-hover-background-color);
393
+ }
394
+ .slider:active .base-bar {
395
+ background-color: var(--sui-active-background-color);
396
+ }
397
+
398
+ .base {
399
+ position: relative;
400
+ width: var(--sui-slider-base-width, 240px);
401
+ height: calc(var(--sui-checkbox-height) / 2);
402
+ cursor: pointer;
403
+ }
404
+
405
+ .base-bar {
406
+ border-width: 1px;
407
+ border-style: solid;
408
+ border-color: var(--sui-control-border-color);
409
+ border-radius: var(--sui-checkbox-height);
410
+ background-color: var(--sui-slider-background-color, var(--sui-secondary-background-color));
411
+ transition: all 200ms;
412
+ width: 100%;
413
+ height: 100%;
414
+ }
415
+
416
+ .slider-bar {
417
+ position: absolute;
418
+ top: 0;
419
+ height: calc(var(--sui-checkbox-height) / 2);
420
+ border-radius: var(--sui-checkbox-height);
421
+ background-color: var(--sui-primary-accent-color-light);
422
+ }
423
+ .invalid .slider-bar {
424
+ background-color: var(--sui-error-border-color);
425
+ }
426
+
427
+ [role=slider] {
428
+ position: absolute;
429
+ top: 0;
430
+ border: 3px solid var(--sui-primary-accent-color-light);
431
+ border-radius: var(--sui-checkbox-height);
432
+ width: calc(var(--sui-checkbox-height) - 2px);
433
+ height: calc(var(--sui-checkbox-height) - 2px);
434
+ background-color: var(--sui-primary-accent-color-inverted);
435
+ cursor: pointer;
436
+ }
437
+ [role=slider]:dir(ltr) {
438
+ transform: translate(calc((var(--sui-checkbox-height) / 2 - 1px) * -1), calc((var(--sui-checkbox-height) / 4 - 1px) * -1));
439
+ }
440
+ [role=slider]:dir(rtl) {
441
+ transform: translate(calc(var(--sui-checkbox-height) / 2 - 1px), calc((var(--sui-checkbox-height) / 4 - 1px) * -1));
442
+ }
443
+ .invalid [role=slider] {
444
+ border-color: var(--sui-error-border-color);
445
+ }
446
+
447
+ .label {
448
+ position: absolute;
449
+ top: calc(var(--sui-checkbox-height) / 2 + 8px);
450
+ font-size: var(--sui-font-size-x-small);
451
+ }
452
+ .label:dir(ltr) {
453
+ transform: translateX(-50%);
454
+ }
455
+ .label:dir(rtl) {
456
+ transform: translateX(50%);
457
+ }</style>
@@ -77,118 +77,84 @@
77
77
  {/if}
78
78
  </button>
79
79
 
80
- <style lang="scss">
81
- button {
82
- display: inline-flex;
83
- align-items: center;
84
- gap: 8px;
85
- margin: var(--sui-focus-ring-width);
86
- border-width: 0;
87
- border-style: solid;
88
- border-color: transparent;
89
- padding: 0;
90
- color: var(--sui-control-foreground-color);
91
- background-color: transparent;
92
- box-shadow: none;
93
- font-family: var(--sui-control-font-family);
94
- font-size: var(--sui-control-font-size);
95
- line-height: var(--sui-control-line-height);
96
- font-weight: var(--sui-font-weight-normal, normal);
97
- text-align: start;
98
- cursor: pointer;
99
- -webkit-user-select: none;
100
- user-select: none;
101
-
102
- &[aria-invalid='true'] {
103
- span {
104
- background-color: var(--sui-error-border-color) !important;
105
- }
106
- }
107
-
108
- &:hover {
109
- &[aria-checked='false'] {
110
- span {
111
- background-color: var(--sui-hover-background-color);
112
- }
113
- }
114
-
115
- &[aria-checked='true'] {
116
- span {
117
- background-color: var(--sui-primary-accent-color-light);
118
- }
119
- }
120
- }
121
-
122
- &:active {
123
- &[aria-checked='false'] {
124
- span {
125
- background-color: var(--sui-active-background-color);
126
- }
127
- }
128
-
129
- &[aria-checked='true'] {
130
- span {
131
- background-color: var(--sui-primary-accent-color-dark);
132
- }
133
- }
134
- }
135
-
136
- &:focus-visible {
137
- outline: 0;
138
-
139
- span {
140
- outline-color: var(--sui-primary-accent-color-translucent);
141
- }
142
- }
143
-
144
- &[aria-checked='true'] {
145
- span {
146
- background-color: var(--sui-primary-accent-color);
147
- border-color: transparent;
148
-
149
- &::before {
150
- --translateX: var(--sui-checkbox-height) * 2 - var(--sui-checkbox-height);
151
- border-color: var(--sui-primary-accent-color);
152
- background-color: var(--sui-primary-accent-color-inverted);
153
- }
154
-
155
- &:dir(ltr) {
156
- &::before {
157
- transform: translateX(calc(var(--translateX)));
158
- }
159
- }
160
-
161
- &:dir(rtl) {
162
- &::before {
163
- transform: translateX(calc((var(--translateX)) * -1));
164
- }
165
- }
166
- }
167
- }
168
- }
169
-
170
- span {
171
- position: relative;
172
- width: calc(var(--sui-checkbox-height) * 2);
173
- height: var(--sui-checkbox-height);
174
- padding: 0 2px;
175
- display: inline-flex;
176
- align-items: center;
177
- border-width: 1.5px;
178
- border-style: solid;
179
- border-color: var(--sui-checkbox-border-color);
180
- border-radius: var(--sui-checkbox-height);
181
- background-color: var(--sui-control-background-color);
182
- transition: all 200ms;
183
-
184
- &::before {
185
- display: inline-block;
186
- width: calc(var(--sui-checkbox-height) - 6px);
187
- height: calc(var(--sui-checkbox-height) - 6px);
188
- border-radius: var(--sui-checkbox-height);
189
- background-color: var(--sui-checkbox-border-color);
190
- transition: all 200ms;
191
- content: '';
192
- }
193
- }
194
- </style>
80
+ <style>button {
81
+ display: inline-flex;
82
+ align-items: center;
83
+ gap: 8px;
84
+ margin: var(--sui-focus-ring-width);
85
+ border-width: 0;
86
+ border-style: solid;
87
+ border-color: transparent;
88
+ padding: 0;
89
+ color: var(--sui-control-foreground-color);
90
+ background-color: transparent;
91
+ box-shadow: none;
92
+ font-family: var(--sui-control-font-family);
93
+ font-size: var(--sui-control-font-size);
94
+ line-height: var(--sui-control-line-height);
95
+ font-weight: var(--sui-font-weight-normal, normal);
96
+ text-align: start;
97
+ cursor: pointer;
98
+ -webkit-user-select: none;
99
+ user-select: none;
100
+ }
101
+ button[aria-invalid=true] span {
102
+ background-color: var(--sui-error-border-color) !important;
103
+ }
104
+ button:hover[aria-checked=false] span {
105
+ background-color: var(--sui-hover-background-color);
106
+ }
107
+ button:hover[aria-checked=true] span {
108
+ background-color: var(--sui-primary-accent-color-light);
109
+ }
110
+ button:active[aria-checked=false] span {
111
+ background-color: var(--sui-active-background-color);
112
+ }
113
+ button:active[aria-checked=true] span {
114
+ background-color: var(--sui-primary-accent-color-dark);
115
+ }
116
+ button:focus-visible {
117
+ outline: 0;
118
+ }
119
+ button:focus-visible span {
120
+ outline-color: var(--sui-primary-accent-color-translucent);
121
+ }
122
+ button[aria-checked=true] span {
123
+ background-color: var(--sui-primary-accent-color);
124
+ border-color: transparent;
125
+ }
126
+ button[aria-checked=true] span::before {
127
+ --translateX: var(--sui-checkbox-height) * 2 - var(--sui-checkbox-height);
128
+ border-color: var(--sui-primary-accent-color);
129
+ background-color: var(--sui-primary-accent-color-inverted);
130
+ }
131
+ button[aria-checked=true] span:dir(ltr)::before {
132
+ transform: translateX(calc(var(--translateX)));
133
+ }
134
+ button[aria-checked=true] span:dir(rtl)::before {
135
+ transform: translateX(calc((var(--translateX)) * -1));
136
+ }
137
+
138
+ span {
139
+ position: relative;
140
+ width: calc(var(--sui-checkbox-height) * 2);
141
+ height: var(--sui-checkbox-height);
142
+ padding: 0 2px;
143
+ display: inline-flex;
144
+ align-items: center;
145
+ border-width: 1.5px;
146
+ border-style: solid;
147
+ border-color: var(--sui-checkbox-border-color);
148
+ border-radius: var(--sui-checkbox-height);
149
+ background-color: var(--sui-control-background-color);
150
+ transition: all 200ms;
151
+ }
152
+ span::before {
153
+ display: inline-block;
154
+ width: calc(var(--sui-checkbox-height) - 6px);
155
+ height: calc(var(--sui-checkbox-height) - 6px);
156
+ border-radius: var(--sui-checkbox-height);
157
+ background-color: var(--sui-checkbox-border-color);
158
+ transition: all 200ms;
159
+ content: "";
160
+ }</style>
@@ -49,21 +49,19 @@
49
49
  {@render children?.()}
50
50
  </div>
51
51
 
52
- <style lang="scss">
53
- [role='rowgroup'] {
54
- display: table-row-group;
55
- }
52
+ <style>[role=rowgroup] {
53
+ display: table-row-group;
54
+ }
56
55
 
57
- [role='row'] {
58
- display: table-row;
59
- }
56
+ [role=row] {
57
+ display: table-row;
58
+ }
60
59
 
61
- [role='columnheader'] {
62
- display: table-cell;
63
- padding: 8px;
64
- color: var(--sui-secondary-foreground-color);
65
- background-color: var(--sui-secondary-background-color);
66
- font-size: var(--sui-font-size-default);
67
- text-align: start;
68
- }
69
- </style>
60
+ [role=columnheader] {
61
+ display: table-cell;
62
+ padding: 8px;
63
+ color: var(--sui-secondary-foreground-color);
64
+ background-color: var(--sui-secondary-background-color);
65
+ font-size: var(--sui-font-size-default);
66
+ text-align: start;
67
+ }</style>
@@ -31,8 +31,6 @@
31
31
  {@render children?.()}
32
32
  </div>
33
33
 
34
- <style lang="scss">
35
- .table-cell {
36
- display: table-cell;
37
- }
38
- </style>
34
+ <style>.table-cell {
35
+ display: table-cell;
36
+ }</style>
@@ -31,8 +31,6 @@
31
31
  {@render children?.()}
32
32
  </div>
33
33
 
34
- <style lang="scss">
35
- .table-col-header {
36
- display: table-cell;
37
- }
38
- </style>
34
+ <style>.table-col-header {
35
+ display: table-cell;
36
+ }</style>
@@ -36,8 +36,6 @@
36
36
  {@render children?.()}
37
37
  </div>
38
38
 
39
- <style lang="scss">
40
- .table-foot {
41
- display: table-footer-group;
42
- }
43
- </style>
39
+ <style>.table-foot {
40
+ display: table-footer-group;
41
+ }</style>
@@ -36,8 +36,6 @@
36
36
  {@render children?.()}
37
37
  </div>
38
38
 
39
- <style lang="scss">
40
- .table-head {
41
- display: table-header-group;
42
- }
43
- </style>
39
+ <style>.table-head {
40
+ display: table-header-group;
41
+ }</style>
@@ -31,9 +31,7 @@
31
31
  {@render children?.()}
32
32
  </div>
33
33
 
34
- <style lang="scss">
35
- .table-row-header {
36
- display: table-cell;
37
- height: var(--sui-secondary-row-height);
38
- }
39
- </style>
34
+ <style>.table-row-header {
35
+ display: table-cell;
36
+ height: var(--sui-secondary-row-height);
37
+ }</style>
@@ -31,9 +31,7 @@
31
31
  {@render children?.()}
32
32
  </div>
33
33
 
34
- <style lang="scss">
35
- .table-row {
36
- display: table-row;
37
- height: var(--sui-primary-row-height);
38
- }
39
- </style>
34
+ <style>.table-row {
35
+ display: table-row;
36
+ height: var(--sui-primary-row-height);
37
+ }</style>
@@ -33,21 +33,15 @@
33
33
  {@render children?.()}
34
34
  </div>
35
35
 
36
- <style lang="scss">
37
- .table {
38
- display: table;
39
- margin: var(--sui-focus-ring-width);
40
- width: calc(100% - var(--sui-focus-ring-width) * 2);
41
-
42
- &.data {
43
- border-collapse: collapse;
44
-
45
- :global {
46
- :is(.table-col-header, .table-row-header, .table-cell) {
47
- border: 1px solid var(--sui-secondary-border-color);
48
- padding: 8px 8px;
49
- }
50
- }
51
- }
52
- }
53
- </style>
36
+ <style>.table {
37
+ display: table;
38
+ margin: var(--sui-focus-ring-width);
39
+ width: calc(100% - var(--sui-focus-ring-width) * 2);
40
+ }
41
+ .table.data {
42
+ border-collapse: collapse;
43
+ }
44
+ .table.data :global(:is(.table-col-header, .table-row-header, .table-cell)) {
45
+ border: 1px solid var(--sui-secondary-border-color);
46
+ padding: 8px 8px;
47
+ }</style>