@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.
- package/dist/components/alert/alert.svelte +39 -31
- package/dist/components/alert/alert.svelte.d.ts +8 -0
- package/dist/components/alert/infobar.svelte +58 -46
- package/dist/components/alert/infobar.svelte.d.ts +8 -0
- package/dist/components/bottom-navigation/bottom-navigation.svelte +21 -15
- package/dist/components/button/button-group.svelte +10 -6
- package/dist/components/button/button-group.svelte.d.ts +8 -0
- package/dist/components/button/button.svelte +274 -175
- package/dist/components/button/floating-action-button-wrapper.svelte +23 -18
- package/dist/components/button/select-button-group.svelte +60 -41
- package/dist/components/button/select-button-group.svelte.d.ts +8 -0
- package/dist/components/button/split-button.svelte +25 -18
- package/dist/components/calendar/calendar.svelte +103 -80
- package/dist/components/checkbox/checkbox-group.svelte +25 -19
- package/dist/components/checkbox/checkbox-group.svelte.d.ts +8 -0
- package/dist/components/checkbox/checkbox.svelte +93 -65
- package/dist/components/checkbox/checkbox.svelte.d.ts +2 -2
- package/dist/components/dialog/dialog.svelte +105 -87
- package/dist/components/dialog/prompt-dialog.svelte +5 -3
- package/dist/components/disclosure/disclosure.svelte +34 -21
- package/dist/components/divider/divider.svelte +21 -14
- package/dist/components/divider/divider.svelte.d.ts +8 -0
- package/dist/components/divider/spacer.svelte +13 -8
- package/dist/components/drawer/drawer.svelte +343 -190
- package/dist/components/grid/grid-body.svelte +16 -14
- package/dist/components/grid/grid-cell.svelte +5 -3
- package/dist/components/grid/grid-col-header.svelte +5 -3
- package/dist/components/grid/grid-foot.svelte +5 -3
- package/dist/components/grid/grid-head.svelte +5 -3
- package/dist/components/grid/grid-row-header.svelte +6 -4
- package/dist/components/grid/grid-row.svelte +6 -4
- package/dist/components/grid/grid.svelte +21 -12
- package/dist/components/grid/grid.svelte.d.ts +8 -0
- package/dist/components/icon/icon.svelte +7 -5
- package/dist/components/listbox/listbox.svelte +81 -61
- package/dist/components/listbox/listbox.svelte.d.ts +8 -0
- package/dist/components/listbox/option-group.svelte +15 -11
- package/dist/components/listbox/option.svelte +54 -39
- package/dist/components/menu/menu-item-group.svelte +5 -3
- package/dist/components/menu/menu-item.svelte +67 -51
- package/dist/components/menu/menu.svelte +24 -17
- package/dist/components/menu/menu.svelte.d.ts +8 -0
- package/dist/components/progressbar/progressbar.svelte +27 -15
- package/dist/components/progressbar/progressbar.svelte.d.ts +8 -0
- package/dist/components/radio/radio-group.svelte +43 -31
- package/dist/components/radio/radio-group.svelte.d.ts +8 -0
- package/dist/components/radio/radio.svelte +81 -63
- package/dist/components/resizable-pane/resizable-handle.svelte +63 -48
- package/dist/components/resizable-pane/resizable-handle.svelte.d.ts +8 -0
- package/dist/components/resizable-pane/resizable-pane-group.svelte +18 -14
- package/dist/components/select/combobox.svelte +139 -113
- package/dist/components/select/select-tags.svelte +73 -57
- package/dist/components/slider/slider.svelte +94 -74
- package/dist/components/switch/switch.svelte +118 -81
- package/dist/components/switch/switch.svelte.d.ts +8 -0
- package/dist/components/table/table-body.svelte +16 -14
- package/dist/components/table/table-cell.svelte +5 -3
- package/dist/components/table/table-col-header.svelte +5 -3
- package/dist/components/table/table-foot.svelte +5 -3
- package/dist/components/table/table-head.svelte +5 -3
- package/dist/components/table/table-row-header.svelte +6 -4
- package/dist/components/table/table-row.svelte +6 -4
- package/dist/components/table/table.svelte +21 -13
- package/dist/components/table/table.svelte.d.ts +8 -0
- package/dist/components/tabs/tab-box.svelte +9 -6
- package/dist/components/tabs/tab-list.svelte +94 -73
- package/dist/components/tabs/tab-list.svelte.d.ts +8 -0
- package/dist/components/tabs/tab-panel.svelte +11 -7
- package/dist/components/tabs/tab-panels.svelte +19 -14
- package/dist/components/text-editor/code-editor.svelte +10 -7
- package/dist/components/text-editor/core.js +3 -0
- package/dist/components/text-editor/lexical-root.svelte +221 -160
- package/dist/components/text-editor/text-editor.svelte +25 -18
- package/dist/components/text-editor/toolbar/insert-link-button.svelte +2 -1
- package/dist/components/text-editor/toolbar/toolbar-wrapper.svelte +44 -37
- package/dist/components/text-field/number-input.svelte +87 -68
- package/dist/components/text-field/password-input.svelte +52 -42
- package/dist/components/text-field/search-bar.svelte +64 -53
- package/dist/components/text-field/secret-input.svelte +61 -46
- package/dist/components/text-field/text-area.svelte +80 -68
- package/dist/components/text-field/text-input.svelte +139 -107
- package/dist/components/toast/toast.svelte +104 -89
- package/dist/components/toolbar/toolbar.svelte +73 -54
- package/dist/components/toolbar/toolbar.svelte.d.ts +8 -0
- package/dist/components/typography/truncated-text.svelte +9 -7
- package/dist/components/util/app-shell.svelte +40 -493
- package/dist/components/util/empty-state.svelte +13 -11
- package/dist/components/util/group.svelte +8 -3
- package/dist/components/util/group.svelte.d.ts +8 -0
- package/dist/components/util/modal.svelte +59 -48
- package/dist/components/util/popup.svelte +87 -67
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -4
- package/dist/locales/en.yaml +50 -3
- package/dist/locales/ja.yaml +49 -2
- package/dist/services/i18n.d.ts +6 -0
- package/dist/services/i18n.js +19 -14
- package/dist/typedefs.d.ts +5 -1
- package/dist/typedefs.js +2 -1
- 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>
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
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>
|
|
53
|
-
|
|
54
|
-
|
|
52
|
+
<style lang="scss">
|
|
53
|
+
[role='rowgroup'] {
|
|
54
|
+
display: table-row-group;
|
|
55
|
+
}
|
|
55
56
|
|
|
56
|
-
[role=row] {
|
|
57
|
-
|
|
58
|
-
}
|
|
57
|
+
[role='row'] {
|
|
58
|
+
display: table-row;
|
|
59
|
+
}
|
|
59
60
|
|
|
60
|
-
[role=columnheader] {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
}
|
|
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,7 +31,9 @@
|
|
|
31
31
|
{@render children?.()}
|
|
32
32
|
</div>
|
|
33
33
|
|
|
34
|
-
<style
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
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
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
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
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
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
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
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
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
.
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
}
|
|
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>
|