@sveltia/ui 0.41.3 → 0.42.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 (100) hide show
  1. package/dist/components/alert/alert.svelte +39 -31
  2. package/dist/components/alert/alert.svelte.d.ts +8 -0
  3. package/dist/components/alert/infobar.svelte +58 -46
  4. package/dist/components/alert/infobar.svelte.d.ts +8 -0
  5. package/dist/components/bottom-navigation/bottom-navigation.svelte +21 -15
  6. package/dist/components/button/button-group.svelte +10 -6
  7. package/dist/components/button/button-group.svelte.d.ts +8 -0
  8. package/dist/components/button/button.svelte +274 -175
  9. package/dist/components/button/floating-action-button-wrapper.svelte +23 -18
  10. package/dist/components/button/select-button-group.svelte +60 -41
  11. package/dist/components/button/select-button-group.svelte.d.ts +8 -0
  12. package/dist/components/button/split-button.svelte +25 -18
  13. package/dist/components/calendar/calendar.svelte +103 -80
  14. package/dist/components/checkbox/checkbox-group.svelte +25 -19
  15. package/dist/components/checkbox/checkbox-group.svelte.d.ts +8 -0
  16. package/dist/components/checkbox/checkbox.svelte +93 -65
  17. package/dist/components/checkbox/checkbox.svelte.d.ts +2 -2
  18. package/dist/components/dialog/dialog.svelte +105 -87
  19. package/dist/components/dialog/prompt-dialog.svelte +5 -3
  20. package/dist/components/disclosure/disclosure.svelte +34 -21
  21. package/dist/components/divider/divider.svelte +21 -14
  22. package/dist/components/divider/divider.svelte.d.ts +8 -0
  23. package/dist/components/divider/spacer.svelte +13 -8
  24. package/dist/components/drawer/drawer.svelte +343 -190
  25. package/dist/components/grid/grid-body.svelte +16 -14
  26. package/dist/components/grid/grid-cell.svelte +5 -3
  27. package/dist/components/grid/grid-col-header.svelte +5 -3
  28. package/dist/components/grid/grid-foot.svelte +5 -3
  29. package/dist/components/grid/grid-head.svelte +5 -3
  30. package/dist/components/grid/grid-row-header.svelte +6 -4
  31. package/dist/components/grid/grid-row.svelte +6 -4
  32. package/dist/components/grid/grid.svelte +21 -12
  33. package/dist/components/grid/grid.svelte.d.ts +8 -0
  34. package/dist/components/icon/icon.svelte +7 -5
  35. package/dist/components/listbox/listbox.svelte +81 -61
  36. package/dist/components/listbox/listbox.svelte.d.ts +8 -0
  37. package/dist/components/listbox/option-group.svelte +15 -11
  38. package/dist/components/listbox/option.svelte +54 -39
  39. package/dist/components/menu/menu-item-group.svelte +5 -3
  40. package/dist/components/menu/menu-item.svelte +67 -51
  41. package/dist/components/menu/menu.svelte +24 -17
  42. package/dist/components/menu/menu.svelte.d.ts +8 -0
  43. package/dist/components/progressbar/progressbar.svelte +27 -15
  44. package/dist/components/progressbar/progressbar.svelte.d.ts +8 -0
  45. package/dist/components/radio/radio-group.svelte +43 -31
  46. package/dist/components/radio/radio-group.svelte.d.ts +8 -0
  47. package/dist/components/radio/radio.svelte +81 -63
  48. package/dist/components/resizable-pane/resizable-handle.svelte +63 -48
  49. package/dist/components/resizable-pane/resizable-handle.svelte.d.ts +8 -0
  50. package/dist/components/resizable-pane/resizable-pane-group.svelte +18 -14
  51. package/dist/components/select/combobox.svelte +139 -113
  52. package/dist/components/select/select-tags.svelte +73 -57
  53. package/dist/components/slider/slider.svelte +94 -74
  54. package/dist/components/switch/switch.svelte +118 -81
  55. package/dist/components/switch/switch.svelte.d.ts +8 -0
  56. package/dist/components/table/table-body.svelte +16 -14
  57. package/dist/components/table/table-cell.svelte +5 -3
  58. package/dist/components/table/table-col-header.svelte +5 -3
  59. package/dist/components/table/table-foot.svelte +5 -3
  60. package/dist/components/table/table-head.svelte +5 -3
  61. package/dist/components/table/table-row-header.svelte +6 -4
  62. package/dist/components/table/table-row.svelte +6 -4
  63. package/dist/components/table/table.svelte +21 -13
  64. package/dist/components/table/table.svelte.d.ts +8 -0
  65. package/dist/components/tabs/tab-box.svelte +9 -6
  66. package/dist/components/tabs/tab-list.svelte +94 -73
  67. package/dist/components/tabs/tab-list.svelte.d.ts +8 -0
  68. package/dist/components/tabs/tab-panel.svelte +11 -7
  69. package/dist/components/tabs/tab-panels.svelte +19 -14
  70. package/dist/components/text-editor/code-editor.svelte +10 -7
  71. package/dist/components/text-editor/core.js +3 -0
  72. package/dist/components/text-editor/lexical-root.svelte +221 -160
  73. package/dist/components/text-editor/text-editor.svelte +25 -18
  74. package/dist/components/text-editor/toolbar/insert-link-button.svelte +2 -1
  75. package/dist/components/text-editor/toolbar/toolbar-wrapper.svelte +44 -37
  76. package/dist/components/text-field/number-input.svelte +87 -68
  77. package/dist/components/text-field/password-input.svelte +52 -42
  78. package/dist/components/text-field/search-bar.svelte +64 -53
  79. package/dist/components/text-field/secret-input.svelte +61 -46
  80. package/dist/components/text-field/text-area.svelte +80 -68
  81. package/dist/components/text-field/text-input.svelte +139 -107
  82. package/dist/components/toast/toast.svelte +104 -89
  83. package/dist/components/toolbar/toolbar.svelte +73 -54
  84. package/dist/components/toolbar/toolbar.svelte.d.ts +8 -0
  85. package/dist/components/typography/truncated-text.svelte +9 -7
  86. package/dist/components/util/app-shell.svelte +40 -493
  87. package/dist/components/util/empty-state.svelte +13 -11
  88. package/dist/components/util/group.svelte +8 -3
  89. package/dist/components/util/group.svelte.d.ts +8 -0
  90. package/dist/components/util/modal.svelte +59 -48
  91. package/dist/components/util/popup.svelte +87 -67
  92. package/dist/index.d.ts +1 -0
  93. package/dist/index.js +1 -4
  94. package/dist/locales/en.yaml +50 -3
  95. package/dist/locales/ja.yaml +49 -2
  96. package/dist/services/i18n.d.ts +6 -0
  97. package/dist/services/i18n.js +19 -14
  98. package/dist/typedefs.d.ts +5 -1
  99. package/dist/typedefs.js +2 -1
  100. package/package.json +23 -23
@@ -22,6 +22,7 @@
22
22
  * `aria-required` attribute.
23
23
  * @property {boolean} [invalid] Whether to mark the widget invalid. An alias of the
24
24
  * `aria-invalid` attribute.
25
+ * @property {string} [ariaLabel] The `aria-label` attribute on the wrapper element.
25
26
  * @property {Snippet} [children] Primary slot content.
26
27
  * @property {(event: CustomEvent) => void} [onChange] Custom `Change` event handler.
27
28
  */
@@ -39,6 +40,7 @@
39
40
  readonly = false,
40
41
  required = false,
41
42
  invalid = false,
43
+ ariaLabel = undefined,
42
44
  children,
43
45
  onChange,
44
46
  ...restProps
@@ -59,6 +61,7 @@
59
61
  aria-readonly={readonly}
60
62
  aria-required={required}
61
63
  aria-invalid={invalid}
64
+ aria-label={ariaLabel}
62
65
  onclick={() => {
63
66
  if (!disabled && !readonly) {
64
67
  checked = !checked;
@@ -74,84 +77,118 @@
74
77
  {/if}
75
78
  </button>
76
79
 
77
- <style>button {
78
- display: inline-flex;
79
- align-items: center;
80
- gap: 8px;
81
- margin: var(--sui-focus-ring-width);
82
- border-width: 0;
83
- border-style: solid;
84
- border-color: transparent;
85
- padding: 0;
86
- color: var(--sui-control-foreground-color);
87
- background-color: transparent;
88
- box-shadow: none;
89
- font-family: var(--sui-control-font-family);
90
- font-size: var(--sui-control-font-size);
91
- line-height: var(--sui-control-line-height);
92
- font-weight: var(--sui-font-weight-normal, normal);
93
- text-align: start;
94
- cursor: pointer;
95
- -webkit-user-select: none;
96
- user-select: none;
97
- }
98
- button[aria-invalid=true] span {
99
- background-color: var(--sui-error-border-color) !important;
100
- }
101
- button:hover[aria-checked=false] span {
102
- background-color: var(--sui-hover-background-color);
103
- }
104
- button:hover[aria-checked=true] span {
105
- background-color: var(--sui-primary-accent-color-light);
106
- }
107
- button:active[aria-checked=false] span {
108
- background-color: var(--sui-active-background-color);
109
- }
110
- button:active[aria-checked=true] span {
111
- background-color: var(--sui-primary-accent-color-dark);
112
- }
113
- button:focus-visible {
114
- outline: 0;
115
- }
116
- button:focus-visible span {
117
- outline-color: var(--sui-primary-accent-color-translucent);
118
- }
119
- button[aria-checked=true] span {
120
- background-color: var(--sui-primary-accent-color);
121
- border-color: transparent;
122
- }
123
- button[aria-checked=true] span::before {
124
- --translateX: var(--sui-checkbox-height) * 2 - var(--sui-checkbox-height);
125
- border-color: var(--sui-primary-accent-color);
126
- background-color: var(--sui-primary-accent-color-inverted);
127
- }
128
- button[aria-checked=true] span:dir(ltr)::before {
129
- transform: translateX(calc(var(--translateX)));
130
- }
131
- button[aria-checked=true] span:dir(rtl)::before {
132
- transform: translateX(calc((var(--translateX)) * -1));
133
- }
134
-
135
- span {
136
- position: relative;
137
- width: calc(var(--sui-checkbox-height) * 2);
138
- height: var(--sui-checkbox-height);
139
- padding: 0 2px;
140
- display: inline-flex;
141
- align-items: center;
142
- border-width: 1.5px;
143
- border-style: solid;
144
- border-color: var(--sui-checkbox-border-color);
145
- border-radius: var(--sui-checkbox-height);
146
- background-color: var(--sui-control-background-color);
147
- transition: all 200ms;
148
- }
149
- span::before {
150
- display: inline-block;
151
- width: calc(var(--sui-checkbox-height) - 6px);
152
- height: calc(var(--sui-checkbox-height) - 6px);
153
- border-radius: var(--sui-checkbox-height);
154
- background-color: var(--sui-checkbox-border-color);
155
- transition: all 200ms;
156
- content: "";
157
- }</style>
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>
@@ -41,6 +41,10 @@ declare const Switch: import("svelte").Component<{
41
41
  * `aria-invalid` attribute.
42
42
  */
43
43
  invalid?: boolean | undefined;
44
+ /**
45
+ * The `aria-label` attribute on the wrapper element.
46
+ */
47
+ ariaLabel?: string | undefined;
44
48
  /**
45
49
  * Primary slot content.
46
50
  */
@@ -83,6 +87,10 @@ type Props = {
83
87
  * `aria-invalid` attribute.
84
88
  */
85
89
  invalid?: boolean | undefined;
90
+ /**
91
+ * The `aria-label` attribute on the wrapper element.
92
+ */
93
+ ariaLabel?: string | undefined;
86
94
  /**
87
95
  * Primary slot content.
88
96
  */
@@ -49,19 +49,21 @@
49
49
  {@render children?.()}
50
50
  </div>
51
51
 
52
- <style>[role=rowgroup] {
53
- display: table-row-group;
54
- }
52
+ <style lang="scss">
53
+ [role='rowgroup'] {
54
+ display: table-row-group;
55
+ }
55
56
 
56
- [role=row] {
57
- display: table-row;
58
- }
57
+ [role='row'] {
58
+ display: table-row;
59
+ }
59
60
 
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>
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>
@@ -31,6 +31,8 @@
31
31
  {@render children?.()}
32
32
  </div>
33
33
 
34
- <style>.table-cell {
35
- display: table-cell;
36
- }</style>
34
+ <style lang="scss">
35
+ .table-cell {
36
+ display: table-cell;
37
+ }
38
+ </style>
@@ -31,6 +31,8 @@
31
31
  {@render children?.()}
32
32
  </div>
33
33
 
34
- <style>.table-col-header {
35
- display: table-cell;
36
- }</style>
34
+ <style lang="scss">
35
+ .table-col-header {
36
+ display: table-cell;
37
+ }
38
+ </style>
@@ -36,6 +36,8 @@
36
36
  {@render children?.()}
37
37
  </div>
38
38
 
39
- <style>.table-foot {
40
- display: table-footer-group;
41
- }</style>
39
+ <style lang="scss">
40
+ .table-foot {
41
+ display: table-footer-group;
42
+ }
43
+ </style>
@@ -36,6 +36,8 @@
36
36
  {@render children?.()}
37
37
  </div>
38
38
 
39
- <style>.table-head {
40
- display: table-header-group;
41
- }</style>
39
+ <style lang="scss">
40
+ .table-head {
41
+ display: table-header-group;
42
+ }
43
+ </style>
@@ -31,7 +31,9 @@
31
31
  {@render children?.()}
32
32
  </div>
33
33
 
34
- <style>.table-row-header {
35
- display: table-cell;
36
- height: var(--sui-secondary-row-height);
37
- }</style>
34
+ <style lang="scss">
35
+ .table-row-header {
36
+ display: table-cell;
37
+ height: var(--sui-secondary-row-height);
38
+ }
39
+ </style>
@@ -31,7 +31,9 @@
31
31
  {@render children?.()}
32
32
  </div>
33
33
 
34
- <style>.table-row {
35
- display: table-row;
36
- height: var(--sui-primary-row-height);
37
- }</style>
34
+ <style lang="scss">
35
+ .table-row {
36
+ display: table-row;
37
+ height: var(--sui-primary-row-height);
38
+ }
39
+ </style>
@@ -12,6 +12,7 @@
12
12
  /**
13
13
  * @typedef {object} Props
14
14
  * @property {string} [class] The `class` attribute on the wrapper element.
15
+ * @property {string} [ariaLabel] The `aria-label` attribute on the wrapper element.
15
16
  * @property {Snippet} [children] Primary slot content.
16
17
  */
17
18
 
@@ -21,25 +22,32 @@
21
22
  let {
22
23
  /* eslint-disable prefer-const */
23
24
  class: className,
25
+ ariaLabel = undefined,
24
26
  children,
25
27
  ...restProps
26
28
  /* eslint-enable prefer-const */
27
29
  } = $props();
28
30
  </script>
29
31
 
30
- <div {...restProps} role="table" class="sui table {className}">
32
+ <div {...restProps} role="table" class="sui table {className}" aria-label={ariaLabel}>
31
33
  {@render children?.()}
32
34
  </div>
33
35
 
34
- <style>.table {
35
- display: table;
36
- margin: var(--sui-focus-ring-width);
37
- width: calc(100% - var(--sui-focus-ring-width) * 2);
38
- }
39
- .table.data {
40
- border-collapse: collapse;
41
- }
42
- .table.data :global(:is(.table-col-header, .table-row-header, .table-cell)) {
43
- border: 1px solid var(--sui-secondary-border-color);
44
- padding: 8px 8px;
45
- }</style>
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>
@@ -13,6 +13,10 @@ declare const Table: import("svelte").Component<{
13
13
  * The `class` attribute on the wrapper element.
14
14
  */
15
15
  class?: string | undefined;
16
+ /**
17
+ * The `aria-label` attribute on the wrapper element.
18
+ */
19
+ ariaLabel?: string | undefined;
16
20
  /**
17
21
  * Primary slot content.
18
22
  */
@@ -23,6 +27,10 @@ type Props = {
23
27
  * The `class` attribute on the wrapper element.
24
28
  */
25
29
  class?: string | undefined;
30
+ /**
31
+ * The `aria-label` attribute on the wrapper element.
32
+ */
33
+ ariaLabel?: string | undefined;
26
34
  /**
27
35
  * Primary slot content.
28
36
  */
@@ -33,9 +33,12 @@
33
33
  {@render children?.()}
34
34
  </div>
35
35
 
36
- <style>.tab-box {
37
- display: flex;
38
- }
39
- .tab-box.vertical {
40
- flex-direction: column;
41
- }</style>
36
+ <style lang="scss">
37
+ .tab-box {
38
+ display: flex;
39
+
40
+ &.vertical {
41
+ flex-direction: column;
42
+ }
43
+ }
44
+ </style>
@@ -21,6 +21,7 @@
21
21
  * @property {'horizontal' | 'vertical'} [orientation] Orientation of the widget. An alias of the
22
22
  * `aria-orientation` attribute.
23
23
  * @property {string} [name] The `data-name` attribute on the wrapper element.
24
+ * @property {string} [ariaLabel] The `aria-label` attribute on the wrapper element.
24
25
  * @property {Snippet} [children] Primary slot content.
25
26
  * @property {(event: CustomEvent) => void} [onChange] Custom `Change` event handler.
26
27
  */
@@ -35,6 +36,7 @@
35
36
  disabled = false,
36
37
  orientation = 'horizontal',
37
38
  name = undefined,
39
+ ariaLabel = undefined,
38
40
  children,
39
41
  onChange,
40
42
  ...restProps
@@ -100,6 +102,7 @@
100
102
  aria-hidden={hidden}
101
103
  aria-disabled={disabled}
102
104
  aria-orientation={orientation}
105
+ aria-label={ariaLabel}
103
106
  data-name={name || undefined}
104
107
  onInitialized={() => {
105
108
  updateIndicator();
@@ -116,76 +119,94 @@
116
119
  <div role="none" class="indicator" style={indicatorStyle}></div>
117
120
  </div>
118
121
 
119
- <style>.tab-list {
120
- flex: none;
121
- position: relative;
122
- display: flex;
123
- align-items: center;
124
- margin: var(--sui-tab-list-margin, var(--sui-focus-ring-width));
125
- border-color: var(--sui-tab-list-border-color, var(--sui-control-border-color));
126
- border-radius: var(--sui-tab-list-border-radius, 0);
127
- background-color: var(--sui-tab-list-background-color, transparent);
128
- }
129
- .tab-list[aria-orientation=horizontal] {
130
- gap: var(--sui-horizontal-tab-list-gap, var(--sui-tab-list-gap, 8px));
131
- margin-block: var(--sui-horizontal-tab-list-margin-block, 0 32px);
132
- margin-inline: var(--sui-horizontal-tab-list-margin-inline, 0);
133
- border-block-width: var(--sui-horizontal-tab-list-border-block-width, 0 1px);
134
- border-inline-width: var(--sui-horizontal-tab-list-border-inline-width, 0 0);
135
- padding: var(--sui-horizontal-tab-list-padding, var(--sui-tab-list-padding, 0 16px));
136
- }
137
- .tab-list[aria-orientation=horizontal] :global(button) {
138
- width: var(--sui-horizontal-tab-width, var(--sui-tab-width, auto));
139
- height: var(--sui-horizontal-tab-height, var(--sui-tab-height, 100%));
140
- justify-content: var(--sui-horizontal-tab-justify-content, center);
141
- }
142
- .tab-list[aria-orientation=horizontal] .indicator {
143
- border-block-width: var(--sui-horizontal-tab-list-indicator-border-block-width, 0 2px);
144
- border-inline-width: var(--sui-horizontal-tab-list-indicator-border-inline-width, 0 0);
145
- }
146
- .tab-list[aria-orientation=vertical] {
147
- gap: var(--sui-vertical-tab-list-gap, var(--sui-tab-list-gap, 8px));
148
- flex-direction: column;
149
- margin-block: var(--sui-vertical-tab-list-margin-block, 0);
150
- margin-inline: var(--sui-vertical-tab-list-margin-inline, 0 32px);
151
- border-block-width: var(--sui-vertical-tab-list-border-block-width, 0 0);
152
- border-inline-width: var(--sui-vertical-tab-list-border-inline-width, 0 1px);
153
- padding: var(--sui-vertical-tab-list-padding, var(--sui-tab-list-padding, 8px 0));
154
- width: var(--sui-vertical-tab-list-width, auto);
155
- }
156
- .tab-list[aria-orientation=vertical] :global(button) {
157
- justify-content: var(--sui-vertical-tab-justify-content, flex-start);
158
- padding-inline-end: 32px;
159
- width: var(--sui-vertical-tab-width, var(--sui-tab-width, 100%));
160
- height: var(--sui-vertical-tab-height, var(--sui-tab-height, auto));
161
- }
162
- .tab-list[aria-orientation=vertical] .indicator {
163
- border-block-width: var(--sui-vertical-tab-list-indicator-border-block-width, 0 0);
164
- border-inline-width: var(--sui-vertical-tab-list-indicator-border-inline-width, 0 2px);
165
- }
166
- .tab-list :global(button) {
167
- position: relative;
168
- z-index: 1;
169
- border-color: transparent;
170
- margin: 0 !important;
171
- border-radius: var(--sui-tab-border-radius, 0);
172
- font-family: var(--sui-tab-font-family, var(--sui-control-font-family, inherit));
173
- font-size: var(--sui-tab-font-size, var(--sui-control-font-size, inherit));
174
- font-weight: var(--sui-tab-font-weight, var(--sui-control-font-weight, var(--sui-font-weight-normal, normal)));
175
- }
176
-
177
- .inner {
178
- display: contents;
179
- }
180
-
181
- .indicator {
182
- position: absolute;
183
- z-index: 0;
184
- inset: auto;
185
- border-radius: var(--sui-tab-list-indicator-border-radius, 0);
186
- border-color: var(--sui-tab-list-indicator-border-color, var(--sui-primary-accent-color-light));
187
- background-color: var(--sui-tab-list-indicator-background-color, transparent);
188
- box-shadow: var(--sui-tab-list-indicator-box-shadow, none);
189
- pointer-events: none;
190
- transition: var(--sui-tab-list-indicator-transition, all 200ms);
191
- }</style>
122
+ <style lang="scss">
123
+ .tab-list {
124
+ flex: none;
125
+ position: relative;
126
+ display: flex;
127
+ align-items: center;
128
+ margin: var(--sui-tab-list-margin, var(--sui-focus-ring-width));
129
+ border-color: var(--sui-tab-list-border-color, var(--sui-control-border-color));
130
+ border-radius: var(--sui-tab-list-border-radius, 0);
131
+ background-color: var(--sui-tab-list-background-color, transparent);
132
+
133
+ &[aria-orientation='horizontal'] {
134
+ gap: var(--sui-horizontal-tab-list-gap, var(--sui-tab-list-gap, 8px));
135
+ margin-block: var(--sui-horizontal-tab-list-margin-block, 0 32px);
136
+ margin-inline: var(--sui-horizontal-tab-list-margin-inline, 0);
137
+ border-block-width: var(--sui-horizontal-tab-list-border-block-width, 0 1px);
138
+ border-inline-width: var(--sui-horizontal-tab-list-border-inline-width, 0 0);
139
+ padding: var(--sui-horizontal-tab-list-padding, var(--sui-tab-list-padding, 0 16px));
140
+
141
+ :global {
142
+ button {
143
+ width: var(--sui-horizontal-tab-width, var(--sui-tab-width, auto));
144
+ height: var(--sui-horizontal-tab-height, var(--sui-tab-height, 100%));
145
+ justify-content: var(--sui-horizontal-tab-justify-content, center);
146
+ }
147
+ }
148
+
149
+ .indicator {
150
+ border-block-width: var(--sui-horizontal-tab-list-indicator-border-block-width, 0 2px);
151
+ border-inline-width: var(--sui-horizontal-tab-list-indicator-border-inline-width, 0 0);
152
+ }
153
+ }
154
+
155
+ &[aria-orientation='vertical'] {
156
+ gap: var(--sui-vertical-tab-list-gap, var(--sui-tab-list-gap, 8px));
157
+ flex-direction: column;
158
+ margin-block: var(--sui-vertical-tab-list-margin-block, 0);
159
+ margin-inline: var(--sui-vertical-tab-list-margin-inline, 0 32px);
160
+ border-block-width: var(--sui-vertical-tab-list-border-block-width, 0 0);
161
+ border-inline-width: var(--sui-vertical-tab-list-border-inline-width, 0 1px);
162
+ padding: var(--sui-vertical-tab-list-padding, var(--sui-tab-list-padding, 8px 0));
163
+ width: var(--sui-vertical-tab-list-width, auto);
164
+
165
+ :global {
166
+ button {
167
+ justify-content: var(--sui-vertical-tab-justify-content, flex-start);
168
+ padding-inline-end: 32px;
169
+ width: var(--sui-vertical-tab-width, var(--sui-tab-width, 100%));
170
+ height: var(--sui-vertical-tab-height, var(--sui-tab-height, auto));
171
+ }
172
+ }
173
+
174
+ .indicator {
175
+ border-block-width: var(--sui-vertical-tab-list-indicator-border-block-width, 0 0);
176
+ border-inline-width: var(--sui-vertical-tab-list-indicator-border-inline-width, 0 2px);
177
+ }
178
+ }
179
+
180
+ :global {
181
+ button {
182
+ position: relative;
183
+ z-index: 1;
184
+ border-color: transparent;
185
+ margin: 0 !important;
186
+ border-radius: var(--sui-tab-border-radius, 0);
187
+ font-family: var(--sui-tab-font-family, var(--sui-control-font-family, inherit));
188
+ font-size: var(--sui-tab-font-size, var(--sui-control-font-size, inherit));
189
+ font-weight: var(
190
+ --sui-tab-font-weight,
191
+ var(--sui-control-font-weight, var(--sui-font-weight-normal, normal))
192
+ );
193
+ }
194
+ }
195
+ }
196
+
197
+ .inner {
198
+ display: contents;
199
+ }
200
+
201
+ .indicator {
202
+ position: absolute;
203
+ z-index: 0;
204
+ inset: auto;
205
+ border-radius: var(--sui-tab-list-indicator-border-radius, 0);
206
+ border-color: var(--sui-tab-list-indicator-border-color, var(--sui-primary-accent-color-light));
207
+ background-color: var(--sui-tab-list-indicator-background-color, transparent);
208
+ box-shadow: var(--sui-tab-list-indicator-box-shadow, none);
209
+ pointer-events: none;
210
+ transition: var(--sui-tab-list-indicator-transition, all 200ms);
211
+ }
212
+ </style>