@voidable/ui 0.12.1 → 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 ? i(this, "multiselect.selected", { count: n }) : h}
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
  `;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$comment": "Generated from custom-elements.json by packages/ui/cem/generate.js. Do not edit.",
3
3
  "package": "@voidable/ui",
4
- "version": "0.12.1",
4
+ "version": "0.12.3",
5
5
  "componentCount": 66,
6
6
  "tagCount": 78,
7
7
  "eventNames": [
package/dist/llms.txt CHANGED
@@ -1,4 +1,4 @@
1
- # Voidable UI (@voidable/ui 0.12.1)
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
 
@@ -83,7 +83,7 @@ e("ar", {
83
83
  "sidebar.label": "التنقل الجانبي",
84
84
  "spinner.label": "جارٍ التحميل",
85
85
  "statusDot.online": "متصل",
86
- "statusDot.away": "بعيد",
86
+ "statusDot.away": "غير متواجد",
87
87
  "statusDot.offline": "غير متصل",
88
88
  "stepper.label": "التقدّم",
89
89
  "table.selectAll": "تحديد كل الصفوف",
@@ -113,11 +113,11 @@ e("ar", {
113
113
  }),
114
114
  "table.selected": ({ count: e }, t) => t.plural(e, {
115
115
  zero: "لا شيء محدد",
116
- one: "محدد صف واحد",
117
- two: "محدد صفان",
118
- few: `محددة ${t.number(e)} صفوف`,
119
- many: `محدد ${t.number(e)} صفًا`,
120
- other: `محدد ${t.number(e)} صف`
116
+ one: "تم تحديد صف واحد",
117
+ two: "تم تحديد صفين",
118
+ few: `تم تحديد ${t.number(e)} صفوف`,
119
+ many: `تم تحديد ${t.number(e)} صفًا`,
120
+ other: `تم تحديد ${t.number(e)} صف`
121
121
  }),
122
122
  "table.noneSelected": "لم يُحدد أي صف",
123
123
  "table.allSelected": ({ count: e }, t) => `تم تحديد جميع الصفوف (${t.number(e)})`,
@@ -3,8 +3,8 @@ import { registerMessages as e } from "../messages.js";
3
3
  e("fr", {
4
4
  close: "Fermer",
5
5
  dismiss: "Fermer",
6
- remove: "Supprimer",
7
- removeItem: ({ name: e }) => `Supprimer ${e}`,
6
+ remove: "Retirer",
7
+ removeItem: ({ name: e }) => `Retirer ${e}`,
8
8
  valueMissing: "Veuillez renseigner ce champ.",
9
9
  "checkboxGroup.required": "Veuillez cocher au moins une case.",
10
10
  "breadcrumbs.label": "Fil d’Ariane",
@@ -20,14 +20,14 @@ e("fr", {
20
20
  "datePicker.placeholder": "Choisir une date",
21
21
  "datePicker.toggle": "Afficher ou masquer le calendrier",
22
22
  "datePicker.dialog": "Choisir une date",
23
- "datePicker.invalid": ({ format: e }) => `Saisissez une date au format ${e} ou AAAA-MM-JJ.`,
24
- "datePicker.tooEarly": ({ date: e }) => `Choisissez le ${e} ou une date ultérieure.`,
25
- "datePicker.tooLate": ({ date: e }) => `Choisissez le ${e} ou une date antérieure.`,
23
+ "datePicker.invalid": ({ format: e }) => `Veuillez saisir une date au format ${e} ou AAAA-MM-JJ.`,
24
+ "datePicker.tooEarly": ({ date: e }) => `Veuillez choisir le ${e} ou une date ultérieure.`,
25
+ "datePicker.tooLate": ({ date: e }) => `Veuillez choisir le ${e} ou une date antérieure.`,
26
26
  "carousel.slide": ({ index: e, count: t }) => `${e} sur ${t}`,
27
27
  "carousel.goTo": ({ index: e }) => `Aller à la diapositive ${e}`,
28
28
  "carousel.indicators": "Indicateurs de diapositives",
29
29
  "chart.bar": "Graphique à barres",
30
- "chart.line": "Graphique linéaire",
30
+ "chart.line": "Graphique en courbes",
31
31
  "chart.donut": "Graphique en anneau",
32
32
  "chart.gauge": "Jauge",
33
33
  "chart.label": "Libellé",
@@ -37,19 +37,19 @@ e("fr", {
37
37
  "chart.minimum": "Minimum",
38
38
  "chart.maximum": "Maximum",
39
39
  "colorPicker.label": "Sélecteur de couleur",
40
- "composeInput.placeholder": "Écrivez un message...",
40
+ "composeInput.placeholder": "Écrivez un message…",
41
41
  "composeInput.send": "Envoyer",
42
- "combobox.placeholder": "Rechercher...",
42
+ "combobox.placeholder": "Rechercher…",
43
43
  "combobox.empty": "Aucune option trouvée",
44
44
  "actionInput.action": "Action",
45
45
  "editable.placeholder": "Cliquez pour modifier",
46
46
  "errorFallback.heading": "Une erreur est survenue",
47
47
  "errorFallback.retry": "Réessayer",
48
48
  "fileUpload.prompt": ({ browse: e }) => `Déposez des fichiers ici ou ${e}`,
49
- "fileUpload.browse": "parcourez",
49
+ "fileUpload.browse": "parcourez votre appareil",
50
50
  "fileUpload.rejectType": ({ name: e }) => `${e} n’est pas un type de fichier accepté.`,
51
51
  "fileUpload.rejectSize": ({ name: e, limit: t }) => `${e} dépasse la limite de ${t}.`,
52
- "fileUpload.rejectCount": ({ name: e }) => `${e} n’a pas été ajouté : un seul fichier peut être choisi.`,
52
+ "fileUpload.rejectCount": ({ name: e }) => `${e} n’a pas été ajouté\u00a0: un seul fichier peut être choisi.`,
53
53
  "hamburger.open": "Menu",
54
54
  "hamburger.close": "Fermer le menu",
55
55
  "indicator.label": "notification",
@@ -59,7 +59,7 @@ e("fr", {
59
59
  })}`,
60
60
  "menu.label": "Menu",
61
61
  "menu.empty": "Aucun résultat",
62
- "multiselect.placeholder": "Sélectionner...",
62
+ "multiselect.placeholder": "Sélectionner…",
63
63
  "multiselect.selected": ({ count: e }, t) => `${t.number(e)} ${t.plural(e, {
64
64
  one: "sélectionné",
65
65
  other: "sélectionnés"
@@ -79,14 +79,14 @@ e("fr", {
79
79
  "statusDot.offline": "Hors ligne",
80
80
  "stepper.label": "Progression",
81
81
  "table.selectAll": "Sélectionner toutes les lignes",
82
- "table.selectAllShown": ({ count: e }, t) => `Sélectionner les ${t.number(e)} ${t.plural(e, {
83
- one: "ligne affichée",
84
- other: "lignes affichées"
85
- })}`,
86
- "table.rowsShown": ({ shown: e, total: t }, n) => `${n.number(e)} sur ${n.number(t)} ${n.plural(t, {
82
+ "table.selectAllShown": ({ count: e }, t) => t.plural(e, {
83
+ one: "Sélectionner la ligne affichée",
84
+ other: `Sélectionner les ${t.number(e)} lignes affichées`
85
+ }),
86
+ "table.rowsShown": ({ shown: e, total: t }, n) => `${n.number(e)} ${n.plural(e, {
87
87
  one: "ligne",
88
88
  other: "lignes"
89
- })}`,
89
+ })} sur ${n.number(t)}`,
90
90
  "table.rows": ({ count: e }, t) => `${t.number(e)} ${t.plural(e, {
91
91
  one: "ligne",
92
92
  other: "lignes"
@@ -102,8 +102,8 @@ e("fr", {
102
102
  })}`,
103
103
  "table.sortedAscending": ({ column: e }) => `Trié par ${e}, ordre croissant`,
104
104
  "table.sortedDescending": ({ column: e }) => `Trié par ${e}, ordre décroissant`,
105
- "table.sortCleared": ({ column: e }) => `Tri par ${e} supprimé`,
106
- "tagsInput.placeholder": "Ajouter une étiquette...",
105
+ "table.sortCleared": ({ column: e }) => `Tri par ${e} retiré`,
106
+ "tagsInput.placeholder": "Ajouter une étiquette…",
107
107
  "toast.region": "Notifications"
108
108
  });
109
109
  //#endregion
package/dist/reference.md CHANGED
@@ -1,4 +1,4 @@
1
- # @voidable/ui 0.12.1: element reference
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
 
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
3
3
  "name": "@voidable/ui",
4
- "version": "0.12.1",
4
+ "version": "0.12.3",
5
5
  "js-types-syntax": "typescript",
6
6
  "description-markup": "markdown",
7
7
  "contributions": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voidable/ui",
3
- "version": "0.12.1",
3
+ "version": "0.12.3",
4
4
  "description": "Lit 3 web components for Voidable UI: light DOM, no visual CSS until a theme is loaded",
5
5
  "keywords": [
6
6
  "web-components",