@sveltia/ui 0.23.0 → 0.23.1
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.
|
@@ -258,9 +258,6 @@
|
|
|
258
258
|
--sui-control-medium-height: 40px;
|
|
259
259
|
--sui-control-large-height: 60px;
|
|
260
260
|
--sui-checkbox-height: 24px;
|
|
261
|
-
--sui-primary-toolbar-size: 64px;
|
|
262
|
-
--sui-secondary-toolbar-size: 56px;
|
|
263
|
-
--sui-primary-row-height: 64px;
|
|
264
261
|
--sui-secondary-row-height: 48px;
|
|
265
262
|
}
|
|
266
263
|
}
|
|
@@ -16,7 +16,7 @@ const config = {
|
|
|
16
16
|
childRoles: ['row'],
|
|
17
17
|
childSelectedAttr: 'aria-selected',
|
|
18
18
|
focusChild: true,
|
|
19
|
-
selectFirst:
|
|
19
|
+
selectFirst: true,
|
|
20
20
|
},
|
|
21
21
|
listbox: {
|
|
22
22
|
orientation: 'vertical',
|
|
@@ -88,6 +88,8 @@ class Group {
|
|
|
88
88
|
this.focusChild = focusChild;
|
|
89
89
|
this.selectFirst = selectFirst;
|
|
90
90
|
|
|
91
|
+
this.parent.tabIndex = focusChild ? -1 : 0;
|
|
92
|
+
|
|
91
93
|
// Wait a bit before the relevant components, including the `aria-controls` target are mounted
|
|
92
94
|
(async () => {
|
|
93
95
|
await sleep(100);
|
|
@@ -104,19 +106,16 @@ class Group {
|
|
|
104
106
|
|
|
105
107
|
allMembers.forEach((element, index) => {
|
|
106
108
|
// Select the first one if no member has the `selected` attribute
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
: defaultSelected
|
|
111
|
-
? element === defaultSelected
|
|
112
|
-
: this.selectFirst && index === 0;
|
|
109
|
+
const isSelected = defaultSelected
|
|
110
|
+
? element === defaultSelected
|
|
111
|
+
: this.selectFirst && index === 0;
|
|
113
112
|
|
|
114
113
|
const controlTarget = /** @type {HTMLElement | null} */ (
|
|
115
114
|
document.querySelector(`#${element.getAttribute('aria-controls')}`)
|
|
116
115
|
);
|
|
117
116
|
|
|
118
117
|
element.id ||= `${this.id}-item-${index + 1}`;
|
|
119
|
-
element.tabIndex
|
|
118
|
+
element.tabIndex = isSelected ? 0 : -1;
|
|
120
119
|
element.setAttribute(this.childSelectedAttr, String(isSelected));
|
|
121
120
|
|
|
122
121
|
if (controlTarget) {
|
|
@@ -246,9 +246,6 @@
|
|
|
246
246
|
--sui-control-medium-height: 40px;
|
|
247
247
|
--sui-control-large-height: 60px;
|
|
248
248
|
--sui-checkbox-height: 24px;
|
|
249
|
-
--sui-primary-toolbar-size: 64px;
|
|
250
|
-
--sui-secondary-toolbar-size: 56px;
|
|
251
|
-
--sui-primary-row-height: 64px;
|
|
252
249
|
--sui-secondary-row-height: 48px;
|
|
253
250
|
}
|
|
254
251
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sveltia/ui",
|
|
3
|
-
"version": "0.23.
|
|
3
|
+
"version": "0.23.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"svelte": "^5.0.0"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@playwright/test": "^1.50.
|
|
49
|
+
"@playwright/test": "^1.50.1",
|
|
50
50
|
"@sveltejs/adapter-auto": "^4.0.0",
|
|
51
51
|
"@sveltejs/kit": "^2.16.1",
|
|
52
52
|
"@sveltejs/package": "^2.3.9",
|
|
@@ -65,8 +65,8 @@
|
|
|
65
65
|
"sass": "^1.83.4",
|
|
66
66
|
"stylelint": "^16.14.1",
|
|
67
67
|
"stylelint-config-recommended-scss": "^14.1.0",
|
|
68
|
-
"stylelint-scss": "^6.
|
|
69
|
-
"svelte": "5.19.
|
|
68
|
+
"stylelint-scss": "^6.11.0",
|
|
69
|
+
"svelte": "5.19.6",
|
|
70
70
|
"svelte-check": "^4.1.4",
|
|
71
71
|
"svelte-i18n": "^4.0.1",
|
|
72
72
|
"svelte-preprocess": "^6.0.3",
|