@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
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
* @property {number} [min] The `aria-valuemin` attribute on the wrapper element.
|
|
12
12
|
* @property {number} [max] The `aria-valuemax` attribute on the wrapper element.
|
|
13
13
|
* @property {string} [text] The `aria-valuetext` attribute on the wrapper element.
|
|
14
|
+
* @property {string} [ariaLabel] The `aria-label` attribute on the wrapper element.
|
|
14
15
|
*/
|
|
15
16
|
|
|
16
17
|
/**
|
|
@@ -23,6 +24,7 @@
|
|
|
23
24
|
min = 0,
|
|
24
25
|
max = 100,
|
|
25
26
|
text,
|
|
27
|
+
ariaLabel = undefined,
|
|
26
28
|
...restProps
|
|
27
29
|
/* eslint-enable prefer-const */
|
|
28
30
|
} = $props();
|
|
@@ -36,22 +38,32 @@
|
|
|
36
38
|
aria-valuemin={min}
|
|
37
39
|
aria-valuemax={max}
|
|
38
40
|
aria-valuetext={text}
|
|
41
|
+
aria-label={ariaLabel}
|
|
39
42
|
>
|
|
40
43
|
<div role="none" style:width="{now}%"></div>
|
|
41
44
|
</div>
|
|
42
45
|
|
|
43
|
-
<style
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
46
|
+
<style lang="scss">
|
|
47
|
+
.progressbar {
|
|
48
|
+
overflow: hidden;
|
|
49
|
+
border-width: var(--sui-progressbar-border-width, 1px);
|
|
50
|
+
border-style: var(--sui-progressbar-border-style, solid);
|
|
51
|
+
border-color: var(--sui-progressbar-border-color, var(--sui-control-border-color));
|
|
52
|
+
border-radius: var(--sui-progressbar-border-radius, 16px);
|
|
53
|
+
width: var(--sui-progressbar-width, 240px);
|
|
54
|
+
height: var(--sui-progressbar-height, 10px);
|
|
55
|
+
background-color: var(
|
|
56
|
+
--sui-progressbar-background-color,
|
|
57
|
+
var(--sui-secondary-background-color)
|
|
58
|
+
);
|
|
59
|
+
|
|
60
|
+
div {
|
|
61
|
+
height: 100%;
|
|
62
|
+
background-color: var(
|
|
63
|
+
--sui-progressbar-foreground-color,
|
|
64
|
+
var(--sui-primary-accent-color-light)
|
|
65
|
+
);
|
|
66
|
+
transition: width 250ms;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
</style>
|
|
@@ -28,6 +28,10 @@ declare const Progressbar: import("svelte").Component<{
|
|
|
28
28
|
* The `aria-valuetext` attribute on the wrapper element.
|
|
29
29
|
*/
|
|
30
30
|
text?: string | undefined;
|
|
31
|
+
/**
|
|
32
|
+
* The `aria-label` attribute on the wrapper element.
|
|
33
|
+
*/
|
|
34
|
+
ariaLabel?: string | undefined;
|
|
31
35
|
} & Record<string, any>, {}, "">;
|
|
32
36
|
type Props = {
|
|
33
37
|
/**
|
|
@@ -50,4 +54,8 @@ type Props = {
|
|
|
50
54
|
* The `aria-valuetext` attribute on the wrapper element.
|
|
51
55
|
*/
|
|
52
56
|
text?: string | undefined;
|
|
57
|
+
/**
|
|
58
|
+
* The `aria-label` attribute on the wrapper element.
|
|
59
|
+
*/
|
|
60
|
+
ariaLabel?: string | undefined;
|
|
53
61
|
};
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
* `aria-invalid` attribute.
|
|
26
26
|
* @property {'horizontal'|'vertical'} [orientation] Orientation of the widget. An alias of the
|
|
27
27
|
* `aria-orientation` attribute.
|
|
28
|
+
* @property {string} [ariaLabel] The `aria-label` attribute on the wrapper element.
|
|
28
29
|
* @property {Snippet} [children] Primary slot content.
|
|
29
30
|
* @property {(event: CustomEvent) => void} [onChange] Custom `Change` event handler.
|
|
30
31
|
*/
|
|
@@ -41,6 +42,7 @@
|
|
|
41
42
|
required = false,
|
|
42
43
|
invalid = false,
|
|
43
44
|
orientation = 'horizontal',
|
|
45
|
+
ariaLabel = undefined,
|
|
44
46
|
children,
|
|
45
47
|
onChange,
|
|
46
48
|
...restProps
|
|
@@ -60,6 +62,7 @@
|
|
|
60
62
|
aria-required={required}
|
|
61
63
|
aria-invalid={invalid}
|
|
62
64
|
aria-orientation={orientation}
|
|
65
|
+
aria-label={ariaLabel}
|
|
63
66
|
onChange={(/** @type {CustomEvent} */ event) => {
|
|
64
67
|
onChange?.(event);
|
|
65
68
|
}}
|
|
@@ -70,36 +73,45 @@
|
|
|
70
73
|
</div>
|
|
71
74
|
</div>
|
|
72
75
|
|
|
73
|
-
<style
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
76
|
+
<style lang="scss">
|
|
77
|
+
.radio-group {
|
|
78
|
+
display: inline-flex;
|
|
79
|
+
|
|
80
|
+
&:focus-visible {
|
|
81
|
+
outline-width: 0 !important;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
&.horizontal {
|
|
85
|
+
gap: 8px;
|
|
86
|
+
align-items: center;
|
|
87
|
+
flex-wrap: wrap;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
&.vertical {
|
|
91
|
+
gap: 4px;
|
|
92
|
+
flex-direction: column;
|
|
93
|
+
|
|
94
|
+
@media (pointer: coarse) {
|
|
95
|
+
gap: 8px;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
:global {
|
|
100
|
+
&[aria-invalid='true'] button {
|
|
101
|
+
border-color: var(--sui-error-border-color);
|
|
102
|
+
|
|
103
|
+
&[aria-checked='true'] {
|
|
104
|
+
border-color: var(--sui-error-border-color);
|
|
105
|
+
|
|
106
|
+
&::before {
|
|
107
|
+
background-color: var(--sui-error-border-color);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
91
112
|
}
|
|
92
|
-
}
|
|
93
|
-
.radio-group :global([aria-invalid=true]) :global(button) {
|
|
94
|
-
border-color: var(--sui-error-border-color);
|
|
95
|
-
}
|
|
96
|
-
.radio-group :global([aria-invalid=true]) :global(button[aria-checked=true]) {
|
|
97
|
-
border-color: var(--sui-error-border-color);
|
|
98
|
-
}
|
|
99
|
-
.radio-group :global([aria-invalid=true]) :global(button[aria-checked=true]::before) {
|
|
100
|
-
background-color: var(--sui-error-border-color);
|
|
101
|
-
}
|
|
102
113
|
|
|
103
|
-
.inner {
|
|
104
|
-
|
|
105
|
-
}
|
|
114
|
+
.inner {
|
|
115
|
+
display: contents;
|
|
116
|
+
}
|
|
117
|
+
</style>
|
|
@@ -42,6 +42,10 @@ declare const RadioGroup: import("svelte").Component<{
|
|
|
42
42
|
* `aria-orientation` attribute.
|
|
43
43
|
*/
|
|
44
44
|
orientation?: "horizontal" | "vertical" | undefined;
|
|
45
|
+
/**
|
|
46
|
+
* The `aria-label` attribute on the wrapper element.
|
|
47
|
+
*/
|
|
48
|
+
ariaLabel?: string | undefined;
|
|
45
49
|
/**
|
|
46
50
|
* Primary slot content.
|
|
47
51
|
*/
|
|
@@ -85,6 +89,10 @@ type Props = {
|
|
|
85
89
|
* `aria-orientation` attribute.
|
|
86
90
|
*/
|
|
87
91
|
orientation?: "horizontal" | "vertical" | undefined;
|
|
92
|
+
/**
|
|
93
|
+
* The `aria-label` attribute on the wrapper element.
|
|
94
|
+
*/
|
|
95
|
+
ariaLabel?: string | undefined;
|
|
88
96
|
/**
|
|
89
97
|
* Primary slot content.
|
|
90
98
|
*/
|
|
@@ -127,66 +127,84 @@
|
|
|
127
127
|
{/if}
|
|
128
128
|
</span>
|
|
129
129
|
|
|
130
|
-
<style
|
|
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
|
-
|
|
192
|
-
|
|
130
|
+
<style lang="scss">
|
|
131
|
+
.radio {
|
|
132
|
+
display: inline-flex;
|
|
133
|
+
align-items: center;
|
|
134
|
+
gap: 8px;
|
|
135
|
+
margin: var(--sui-focus-ring-width);
|
|
136
|
+
color: var(--sui-control-foreground-color);
|
|
137
|
+
font-family: var(--sui-control-font-family);
|
|
138
|
+
font-size: var(--sui-control-font-size);
|
|
139
|
+
line-height: var(--sui-control-line-height);
|
|
140
|
+
cursor: pointer;
|
|
141
|
+
-webkit-user-select: none;
|
|
142
|
+
user-select: none;
|
|
143
|
+
|
|
144
|
+
:global {
|
|
145
|
+
&:hover {
|
|
146
|
+
button {
|
|
147
|
+
background-color: var(--sui-hover-background-color);
|
|
148
|
+
|
|
149
|
+
&[aria-checked='true'] {
|
|
150
|
+
border-color: var(--sui-primary-accent-color-light);
|
|
151
|
+
color: var(--sui-primary-accent-color-text);
|
|
152
|
+
|
|
153
|
+
&::before {
|
|
154
|
+
background-color: var(--sui-primary-accent-color-light);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
&:active {
|
|
161
|
+
button {
|
|
162
|
+
background-color: var(--sui-active-background-color);
|
|
163
|
+
|
|
164
|
+
&[aria-checked='true'] {
|
|
165
|
+
border-color: var(--sui-primary-accent-color-dark);
|
|
166
|
+
color: var(--sui-primary-accent-color-dark);
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
button {
|
|
172
|
+
flex: none;
|
|
173
|
+
justify-content: center;
|
|
174
|
+
overflow: hidden;
|
|
175
|
+
margin: 0 !important;
|
|
176
|
+
border-width: 1.5px;
|
|
177
|
+
border-color: var(--sui-checkbox-border-color);
|
|
178
|
+
border-radius: var(--sui-checkbox-height);
|
|
179
|
+
padding: 0;
|
|
180
|
+
width: var(--sui-checkbox-height);
|
|
181
|
+
height: var(--sui-checkbox-height);
|
|
182
|
+
background-color: var(--sui-checkbox-background-color);
|
|
183
|
+
transition: all 200ms;
|
|
184
|
+
|
|
185
|
+
&::before {
|
|
186
|
+
content: '';
|
|
187
|
+
border-radius: var(--sui-checkbox-height);
|
|
188
|
+
width: calc(var(--sui-checkbox-height) - 7px);
|
|
189
|
+
height: calc(var(--sui-checkbox-height) - 7px);
|
|
190
|
+
background-color: var(--sui-primary-accent-color);
|
|
191
|
+
opacity: 0;
|
|
192
|
+
transition: all 200ms;
|
|
193
|
+
will-change: opacity;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
&[aria-checked='true'] {
|
|
197
|
+
border-color: var(--sui-primary-accent-color);
|
|
198
|
+
|
|
199
|
+
&::before {
|
|
200
|
+
opacity: 1;
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
label {
|
|
207
|
+
cursor: inherit;
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
</style>
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
* @property {boolean} [disabled] Whether to disable the handle.
|
|
19
19
|
* @property {boolean} [showHandleBar] Whether to show the handle bar.
|
|
20
20
|
* @property {string} [class] The `class` attribute on the wrapper element.
|
|
21
|
+
* @property {string} [ariaLabel] The `aria-label` attribute on the wrapper element.
|
|
21
22
|
* @property {Snippet} [children] Custom handle content. If omitted, a default visual indicator is
|
|
22
23
|
* rendered.
|
|
23
24
|
* @property {() => void} [onResizeStart] Called when a resize interaction begins (pointer down or
|
|
@@ -34,6 +35,7 @@
|
|
|
34
35
|
disabled = false,
|
|
35
36
|
showHandleBar = false,
|
|
36
37
|
class: className,
|
|
38
|
+
ariaLabel = undefined,
|
|
37
39
|
children,
|
|
38
40
|
onResizeStart,
|
|
39
41
|
onResizeEnd,
|
|
@@ -257,6 +259,7 @@
|
|
|
257
259
|
aria-valuemax={currentPaneMax}
|
|
258
260
|
aria-controls={ctx.paneDefs[handleIndex]?.id}
|
|
259
261
|
aria-disabled={disabled || undefined}
|
|
262
|
+
aria-label={ariaLabel}
|
|
260
263
|
class="sui resizable-handle {className ?? ''}"
|
|
261
264
|
class:horizontal={isHorizontal}
|
|
262
265
|
class:vertical={!isHorizontal}
|
|
@@ -273,51 +276,63 @@
|
|
|
273
276
|
{/if}
|
|
274
277
|
</div>
|
|
275
278
|
|
|
276
|
-
<style
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
.
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
279
|
+
<style lang="scss">
|
|
280
|
+
.resizable-handle {
|
|
281
|
+
position: relative;
|
|
282
|
+
flex: 0 0 auto;
|
|
283
|
+
display: flex;
|
|
284
|
+
align-items: center;
|
|
285
|
+
justify-content: center;
|
|
286
|
+
touch-action: none;
|
|
287
|
+
outline-offset: 0;
|
|
288
|
+
background-color: transparent;
|
|
289
|
+
transition: background-color 200ms;
|
|
290
|
+
|
|
291
|
+
&:focus-visible,
|
|
292
|
+
&:hover,
|
|
293
|
+
&.dragging {
|
|
294
|
+
outline: none;
|
|
295
|
+
z-index: 1;
|
|
296
|
+
background-color: var(--sui-primary-accent-color-translucent);
|
|
297
|
+
|
|
298
|
+
.handle-bar {
|
|
299
|
+
background-color: var(--sui-primary-accent-color);
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
&.disabled {
|
|
304
|
+
pointer-events: none;
|
|
305
|
+
opacity: 0.4;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
&.horizontal {
|
|
309
|
+
width: var(--sui-resizable-handle-size, 4px);
|
|
310
|
+
height: 100%;
|
|
311
|
+
cursor: col-resize;
|
|
312
|
+
|
|
313
|
+
.handle-bar {
|
|
314
|
+
width: 2px;
|
|
315
|
+
height: 40%;
|
|
316
|
+
min-height: 20px;
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
&.vertical {
|
|
321
|
+
width: 100%;
|
|
322
|
+
height: var(--sui-resizable-handle-size, 4px);
|
|
323
|
+
cursor: row-resize;
|
|
324
|
+
|
|
325
|
+
.handle-bar {
|
|
326
|
+
height: 2px;
|
|
327
|
+
width: 40%;
|
|
328
|
+
min-width: 20px;
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
.handle-bar {
|
|
333
|
+
border-radius: 1px;
|
|
334
|
+
background-color: hsl(var(--sui-border-color-1-hsl));
|
|
335
|
+
transition: background-color 200ms;
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
</style>
|
|
@@ -21,6 +21,10 @@ declare const ResizableHandle: import("svelte").Component<{
|
|
|
21
21
|
* The `class` attribute on the wrapper element.
|
|
22
22
|
*/
|
|
23
23
|
class?: string | undefined;
|
|
24
|
+
/**
|
|
25
|
+
* The `aria-label` attribute on the wrapper element.
|
|
26
|
+
*/
|
|
27
|
+
ariaLabel?: string | undefined;
|
|
24
28
|
/**
|
|
25
29
|
* Custom handle content. If omitted, a default visual indicator is
|
|
26
30
|
* rendered.
|
|
@@ -50,6 +54,10 @@ type Props = {
|
|
|
50
54
|
* The `class` attribute on the wrapper element.
|
|
51
55
|
*/
|
|
52
56
|
class?: string | undefined;
|
|
57
|
+
/**
|
|
58
|
+
* The `aria-label` attribute on the wrapper element.
|
|
59
|
+
*/
|
|
60
|
+
ariaLabel?: string | undefined;
|
|
53
61
|
/**
|
|
54
62
|
* Custom handle content. If omitted, a default visual indicator is
|
|
55
63
|
* rendered.
|
|
@@ -271,17 +271,21 @@
|
|
|
271
271
|
{@render children?.()}
|
|
272
272
|
</div>
|
|
273
273
|
|
|
274
|
-
<style
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
274
|
+
<style lang="scss">
|
|
275
|
+
.resizable-pane-group {
|
|
276
|
+
display: flex;
|
|
277
|
+
overflow: hidden;
|
|
278
|
+
|
|
279
|
+
&.horizontal {
|
|
280
|
+
flex-direction: row;
|
|
281
|
+
width: 100%;
|
|
282
|
+
height: 100%;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
&.vertical {
|
|
286
|
+
flex-direction: column;
|
|
287
|
+
width: 100%;
|
|
288
|
+
height: 100%;
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
</style>
|