@tekkare/romulus 0.1.192 → 0.1.193
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.
package/dist/module.json
CHANGED
|
@@ -35,14 +35,21 @@ const props = withDefaults(defineProps<{
|
|
|
35
35
|
searchable?: boolean | 'auto'
|
|
36
36
|
/** Texte du champ de recherche, quand il y en a un. */
|
|
37
37
|
searchPlaceholder?: string
|
|
38
|
+
/** Langue des textes propres au composant (tout selectionner, aucun resultat). */
|
|
39
|
+
lang?: 'fr' | 'en'
|
|
38
40
|
}>(), {
|
|
39
41
|
icon: undefined,
|
|
40
42
|
multiple: true,
|
|
41
43
|
showSelectAll: false,
|
|
42
44
|
searchable: 'auto',
|
|
43
45
|
searchPlaceholder: 'Rechercher...',
|
|
46
|
+
lang: 'fr',
|
|
44
47
|
})
|
|
45
48
|
|
|
49
|
+
const texts = computed(() => props.lang === 'en'
|
|
50
|
+
? { selectAll: 'Select all', deselectAll: 'Deselect all', noMatch: 'No match' }
|
|
51
|
+
: { selectAll: 'Tout sélectionner', deselectAll: 'Tout désélectionner', noMatch: 'Aucun résultat' })
|
|
52
|
+
|
|
46
53
|
const selected = defineModel<string[]>({ default: () => [] })
|
|
47
54
|
|
|
48
55
|
const isOpen = ref(false)
|
|
@@ -207,11 +214,11 @@ onUnmounted(() => {
|
|
|
207
214
|
<span class="filter-chip__checkbox" :class="{ 'filter-chip__checkbox--checked': allSelected }">
|
|
208
215
|
<PhCheck v-if="allSelected" :size="10" weight="bold" />
|
|
209
216
|
</span>
|
|
210
|
-
<span>{{ allSelected ?
|
|
217
|
+
<span>{{ allSelected ? texts.deselectAll : texts.selectAll }}</span>
|
|
211
218
|
</button>
|
|
212
219
|
<div :class="{ 'filter-chip__options-group': showSelectAll && multiple && options.length > 0 }">
|
|
213
220
|
<p v-if="hasSearch && filteredOptions.length === 0" class="filter-chip__no-match">
|
|
214
|
-
|
|
221
|
+
{{ texts.noMatch }}
|
|
215
222
|
</p>
|
|
216
223
|
<template v-for="row in rows" :key="row.key">
|
|
217
224
|
<p v-if="row.kind === 'header'" class="filter-chip__section">
|