@sveltia/ui 0.23.0 → 0.23.2
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.
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
ListItemNode,
|
|
20
20
|
ListNode,
|
|
21
21
|
$handleListInsertParagraph as handleListInsertParagraph,
|
|
22
|
-
insertList,
|
|
22
|
+
$insertList as insertList,
|
|
23
23
|
$isListItemNode as isListItemNode,
|
|
24
24
|
$isListNode as isListNode,
|
|
25
25
|
} from '@lexical/list';
|
|
@@ -246,7 +246,7 @@ export const initEditor = ({ components } = {}) => {
|
|
|
246
246
|
editor.registerCommand(
|
|
247
247
|
INSERT_UNORDERED_LIST_COMMAND,
|
|
248
248
|
() => {
|
|
249
|
-
insertList(
|
|
249
|
+
insertList('bullet');
|
|
250
250
|
|
|
251
251
|
return true;
|
|
252
252
|
},
|
|
@@ -256,7 +256,7 @@ export const initEditor = ({ components } = {}) => {
|
|
|
256
256
|
editor.registerCommand(
|
|
257
257
|
INSERT_ORDERED_LIST_COMMAND,
|
|
258
258
|
() => {
|
|
259
|
-
insertList(
|
|
259
|
+
insertList('number');
|
|
260
260
|
|
|
261
261
|
return true;
|
|
262
262
|
},
|
|
@@ -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);
|
|
@@ -99,24 +101,20 @@ class Group {
|
|
|
99
101
|
* Activate the members.
|
|
100
102
|
*/
|
|
101
103
|
activate() {
|
|
102
|
-
const { parent,
|
|
103
|
-
const multi = this.multi || role === 'menu' || role === 'menubar';
|
|
104
|
+
const { parent, allMembers, selected: defaultSelected } = this;
|
|
104
105
|
|
|
105
106
|
allMembers.forEach((element, index) => {
|
|
106
107
|
// Select the first one if no member has the `selected` attribute
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
: defaultSelected
|
|
111
|
-
? element === defaultSelected
|
|
112
|
-
: this.selectFirst && index === 0;
|
|
108
|
+
const isSelected = defaultSelected
|
|
109
|
+
? element === defaultSelected
|
|
110
|
+
: this.selectFirst && index === 0;
|
|
113
111
|
|
|
114
112
|
const controlTarget = /** @type {HTMLElement | null} */ (
|
|
115
113
|
document.querySelector(`#${element.getAttribute('aria-controls')}`)
|
|
116
114
|
);
|
|
117
115
|
|
|
118
116
|
element.id ||= `${this.id}-item-${index + 1}`;
|
|
119
|
-
element.tabIndex
|
|
117
|
+
element.tabIndex = isSelected ? 0 : -1;
|
|
120
118
|
element.setAttribute(this.childSelectedAttr, String(isSelected));
|
|
121
119
|
|
|
122
120
|
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.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -28,28 +28,28 @@
|
|
|
28
28
|
"test:unit": "vitest"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@lexical/code": "^0.
|
|
32
|
-
"@lexical/dragon": "^0.
|
|
33
|
-
"@lexical/history": "^0.
|
|
34
|
-
"@lexical/link": "^0.
|
|
35
|
-
"@lexical/list": "^0.
|
|
36
|
-
"@lexical/markdown": "^0.
|
|
37
|
-
"@lexical/rich-text": "^0.
|
|
38
|
-
"@lexical/selection": "^0.
|
|
39
|
-
"@lexical/table": "^0.
|
|
40
|
-
"@lexical/utils": "^0.
|
|
31
|
+
"@lexical/code": "^0.24.0",
|
|
32
|
+
"@lexical/dragon": "^0.24.0",
|
|
33
|
+
"@lexical/history": "^0.24.0",
|
|
34
|
+
"@lexical/link": "^0.24.0",
|
|
35
|
+
"@lexical/list": "^0.24.0",
|
|
36
|
+
"@lexical/markdown": "^0.24.0",
|
|
37
|
+
"@lexical/rich-text": "^0.24.0",
|
|
38
|
+
"@lexical/selection": "^0.24.0",
|
|
39
|
+
"@lexical/table": "^0.24.0",
|
|
40
|
+
"@lexical/utils": "^0.24.0",
|
|
41
41
|
"@sveltia/utils": "^0.6.3",
|
|
42
42
|
"prismjs": "^1.29.0",
|
|
43
|
-
"lexical": "^0.
|
|
43
|
+
"lexical": "^0.24.0"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
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
|
-
"@sveltejs/kit": "^2.
|
|
52
|
-
"@sveltejs/package": "^2.3.
|
|
51
|
+
"@sveltejs/kit": "^2.17.1",
|
|
52
|
+
"@sveltejs/package": "^2.3.10",
|
|
53
53
|
"@sveltejs/vite-plugin-svelte": "5.0.3",
|
|
54
54
|
"cspell": "^8.17.3",
|
|
55
55
|
"eslint": "^8.57.1",
|
|
@@ -60,19 +60,19 @@
|
|
|
60
60
|
"eslint-plugin-svelte": "^2.46.1",
|
|
61
61
|
"postcss": "^8.5.1",
|
|
62
62
|
"postcss-html": "^1.8.0",
|
|
63
|
-
"prettier": "^3.
|
|
63
|
+
"prettier": "^3.5.0",
|
|
64
64
|
"prettier-plugin-svelte": "^3.3.3",
|
|
65
|
-
"sass": "^1.
|
|
65
|
+
"sass": "^1.84.0",
|
|
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.9",
|
|
70
70
|
"svelte-check": "^4.1.4",
|
|
71
71
|
"svelte-i18n": "^4.0.1",
|
|
72
72
|
"svelte-preprocess": "^6.0.3",
|
|
73
73
|
"tslib": "^2.8.1",
|
|
74
|
-
"vite": "^6.0
|
|
75
|
-
"vitest": "^3.0.
|
|
74
|
+
"vite": "^6.1.0",
|
|
75
|
+
"vitest": "^3.0.5"
|
|
76
76
|
},
|
|
77
77
|
"exports": {
|
|
78
78
|
".": {
|