@sveltia/ui 0.89.0 → 0.89.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.
|
@@ -35,7 +35,8 @@
|
|
|
35
35
|
* @property {Snippet} [children] Primary slot content, used instead of the `label`.
|
|
36
36
|
* @property {Snippet} [items] Child items slot content, which makes the item a parent node.
|
|
37
37
|
* @property {Snippet} [startIcon] Start icon slot content.
|
|
38
|
-
* @property {Snippet} [endIcon] End icon slot content
|
|
38
|
+
* @property {Snippet} [endIcon] End icon slot content, which is part of the accessible name
|
|
39
|
+
* unless it’s hidden with `aria-hidden`.
|
|
39
40
|
* @property {Snippet} [chevronIcon] Chevron icon slot content.
|
|
40
41
|
* @property {(event: CustomEvent) => void} [onChange] Custom `Change` event handler, called when
|
|
41
42
|
* the selection state is changed.
|
|
@@ -144,7 +145,7 @@
|
|
|
144
145
|
aria-selected={selected}
|
|
145
146
|
aria-expanded={items ? expanded : undefined}
|
|
146
147
|
aria-level={level}
|
|
147
|
-
aria-labelledby=
|
|
148
|
+
aria-labelledby={endIcon ? `${id}-label ${id}-end` : `${id}-label`}
|
|
148
149
|
data-label={label}
|
|
149
150
|
data-value={value}
|
|
150
151
|
data-type={valueType}
|
|
@@ -170,7 +171,12 @@
|
|
|
170
171
|
{@render children?.()}
|
|
171
172
|
{/if}
|
|
172
173
|
</span>
|
|
173
|
-
{
|
|
174
|
+
{#if endIcon}
|
|
175
|
+
<!-- Part of the name, like a count next to the label -->
|
|
176
|
+
<span role="none" class="end-icon" id="{id}-end">
|
|
177
|
+
{@render endIcon()}
|
|
178
|
+
</span>
|
|
179
|
+
{/if}
|
|
174
180
|
</div>
|
|
175
181
|
{#if items}
|
|
176
182
|
<div role="group" class="group" hidden={!expanded}>
|
|
@@ -179,7 +185,11 @@
|
|
|
179
185
|
{/if}
|
|
180
186
|
</div>
|
|
181
187
|
|
|
182
|
-
<style
|
|
188
|
+
<style>.end-icon {
|
|
189
|
+
display: contents;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
[role=treeitem] {
|
|
183
193
|
display: block;
|
|
184
194
|
}
|
|
185
195
|
[role=treeitem][hidden] {
|
|
@@ -60,7 +60,8 @@ declare const TreeItem: import("svelte").Component<import("../../typedefs.js").K
|
|
|
60
60
|
*/
|
|
61
61
|
startIcon?: Snippet<[]> | undefined;
|
|
62
62
|
/**
|
|
63
|
-
* End icon slot content
|
|
63
|
+
* End icon slot content, which is part of the accessible name
|
|
64
|
+
* unless it’s hidden with `aria-hidden`.
|
|
64
65
|
*/
|
|
65
66
|
endIcon?: Snippet<[]> | undefined;
|
|
66
67
|
/**
|
|
@@ -133,7 +134,8 @@ type Props = {
|
|
|
133
134
|
*/
|
|
134
135
|
startIcon?: Snippet<[]> | undefined;
|
|
135
136
|
/**
|
|
136
|
-
* End icon slot content
|
|
137
|
+
* End icon slot content, which is part of the accessible name
|
|
138
|
+
* unless it’s hidden with `aria-hidden`.
|
|
137
139
|
*/
|
|
138
140
|
endIcon?: Snippet<[]> | undefined;
|
|
139
141
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sveltia/ui",
|
|
3
|
-
"version": "0.89.
|
|
3
|
+
"version": "0.89.1",
|
|
4
4
|
"description": "A collection of Svelte components and utilities for building user interfaces.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -74,19 +74,19 @@
|
|
|
74
74
|
"@sveltejs/kit": "^3.1.1",
|
|
75
75
|
"@sveltejs/package": "^3.0.2",
|
|
76
76
|
"@sveltejs/vite-plugin-svelte": "^7.3.1",
|
|
77
|
-
"@vitest/browser-playwright": "^5.0
|
|
78
|
-
"@vitest/coverage-v8": "^5.0
|
|
77
|
+
"@vitest/browser-playwright": "^5.1.0",
|
|
78
|
+
"@vitest/coverage-v8": "^5.1.0",
|
|
79
79
|
"cspell": "^10.4.0",
|
|
80
80
|
"eslint": "^9.39.5",
|
|
81
81
|
"eslint-config-airbnb-extended": "^3.3.0",
|
|
82
82
|
"eslint-config-prettier": "^10.1.8",
|
|
83
83
|
"eslint-plugin-import": "^2.32.0",
|
|
84
|
-
"eslint-plugin-jsdoc": "^65.4.
|
|
85
|
-
"eslint-plugin-package-json": "^1.
|
|
86
|
-
"eslint-plugin-svelte": "^3.
|
|
84
|
+
"eslint-plugin-jsdoc": "^65.4.3",
|
|
85
|
+
"eslint-plugin-package-json": "^1.14.0",
|
|
86
|
+
"eslint-plugin-svelte": "^3.24.0",
|
|
87
87
|
"globals": "^17.14.0",
|
|
88
88
|
"happy-dom": "^21.0.4",
|
|
89
|
-
"oxlint": "^1.
|
|
89
|
+
"oxlint": "^1.91.0",
|
|
90
90
|
"playwright": "^1.64.1",
|
|
91
91
|
"postcss": "^8.5.32",
|
|
92
92
|
"postcss-html": "^2.0.0",
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
"rolldown": "^1.2.16",
|
|
96
96
|
"sass": "^1.107.1",
|
|
97
97
|
"shiki": "^4.6.0",
|
|
98
|
-
"stylelint": "^
|
|
98
|
+
"stylelint": "^18.0.0",
|
|
99
99
|
"stylelint-config-recommended-scss": "^17.0.1",
|
|
100
100
|
"stylelint-scss": "^7.4.0",
|
|
101
101
|
"svelte": "^5.57.3",
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
"svelte-preprocess": "^6.0.5",
|
|
104
104
|
"tslib": "^2.9.1",
|
|
105
105
|
"vite": "^8.3.5",
|
|
106
|
-
"vitest": "^5.0
|
|
106
|
+
"vitest": "^5.1.0",
|
|
107
107
|
"vitest-browser-svelte": "^3.1.0"
|
|
108
108
|
},
|
|
109
109
|
"peerDependencies": {
|