@voidable/ui 0.12.2 → 0.12.3
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.
|
@@ -83,6 +83,13 @@ export declare class VoidMultiselect extends VoidMultiselect_base {
|
|
|
83
83
|
*/
|
|
84
84
|
placeholder: string;
|
|
85
85
|
private get _hint();
|
|
86
|
+
/**
|
|
87
|
+
* What the trigger is described by once options are chosen. The chips are drawn, not read (they are
|
|
88
|
+
* `aria-hidden`, so a reader's cursor never rests on one), so the names of the chosen options are in the
|
|
89
|
+
* description: all of them up to three ("CSS and JavaScript"), else the first three and how many in all
|
|
90
|
+
* ("CSS, JavaScript, HTML, 5 selected").
|
|
91
|
+
*/
|
|
92
|
+
private _chosenText;
|
|
86
93
|
/** Stop the trigger opening and exclude the values from the form submission. */
|
|
87
94
|
disabled: boolean;
|
|
88
95
|
/** Size step: `sm`, `md` (default) or `lg`. */
|
|
@@ -136,6 +136,19 @@ var x = class extends a(e) {
|
|
|
136
136
|
get _hint() {
|
|
137
137
|
return this.placeholder || i(this, "multiselect.placeholder");
|
|
138
138
|
}
|
|
139
|
+
_chosenText(e) {
|
|
140
|
+
let t = this.closest("[lang]")?.getAttribute("lang") || void 0, n = e.slice(0, 3).map(b);
|
|
141
|
+
return e.length <= 3 ? (() => {
|
|
142
|
+
try {
|
|
143
|
+
return new Intl.ListFormat(t, {
|
|
144
|
+
type: "conjunction",
|
|
145
|
+
style: "long"
|
|
146
|
+
}).format(n);
|
|
147
|
+
} catch {
|
|
148
|
+
return n.join(", ");
|
|
149
|
+
}
|
|
150
|
+
})() : `${n.join(", ")}, ${i(this, "multiselect.selected", { count: e.length })}`;
|
|
151
|
+
}
|
|
139
152
|
_content() {
|
|
140
153
|
return this._parts.one("void-multiselect-content");
|
|
141
154
|
}
|
|
@@ -207,14 +220,14 @@ var x = class extends a(e) {
|
|
|
207
220
|
aria-haspopup="listbox"
|
|
208
221
|
aria-expanded=${String(t)}
|
|
209
222
|
aria-controls=${this._controls(t)}
|
|
210
|
-
aria-description=${n ?
|
|
223
|
+
aria-description=${n ? this._chosenText(e) : h}
|
|
211
224
|
aria-disabled=${this.formDisabled ? "true" : h}
|
|
212
225
|
aria-required=${this.required ? "true" : h}
|
|
213
226
|
aria-invalid=${this.error ? "true" : h}
|
|
214
227
|
@keydown=${this._onTriggerKeydown}
|
|
215
228
|
>
|
|
216
229
|
${n > 0 ? e.map((e) => m`
|
|
217
|
-
<span class="void-multiselect-pill">
|
|
230
|
+
<span class="void-multiselect-pill" aria-hidden="true">
|
|
218
231
|
<span class="void-multiselect-pill-label">${b(e)}</span>
|
|
219
232
|
<button
|
|
220
233
|
type="button"
|
|
@@ -224,7 +237,7 @@ var x = class extends a(e) {
|
|
|
224
237
|
data-value=${e.value}
|
|
225
238
|
>×</button>
|
|
226
239
|
</span>
|
|
227
|
-
`) : m`<span class="void-multiselect-placeholder">${this._hint}</span>`}
|
|
240
|
+
`) : m`<span class="void-multiselect-placeholder" aria-hidden="true">${this._hint}</span>`}
|
|
228
241
|
</div>
|
|
229
242
|
${this.error ? m`<span class="void-multiselect-error">${this.error}</span>` : h}
|
|
230
243
|
`;
|
package/dist/components.json
CHANGED
package/dist/llms.txt
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Voidable UI (@voidable/ui 0.12.
|
|
1
|
+
# Voidable UI (@voidable/ui 0.12.3)
|
|
2
2
|
|
|
3
3
|
> Lit 3 web components in the light DOM, `<void-*>` tags with no visual CSS of their own: `@voidable/theme` supplies every look through `--void-*` custom properties. They work in plain HTML, React, Vue, Svelte, Solid, Angular, Rails/Hotwire, Phoenix LiveView and Laravel/Livewire.
|
|
4
4
|
|
package/dist/reference.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @voidable/ui 0.12.
|
|
1
|
+
# @voidable/ui 0.12.3: element reference
|
|
2
2
|
|
|
3
3
|
Generated from the package's Custom Elements Manifest. 168 elements (78 registered by JavaScript, 90 CSS-only parts and patterns). Each section gives the parts, attributes with their allowed values, events with their `detail`, where the element may sit and a correct example. Start at `llms.txt` for the rules that apply to all of them.
|
|
4
4
|
|
package/dist/web-types.json
CHANGED