@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
@@ -4,7 +4,7 @@
4
4
  "compatibility": {
5
5
  "nuxt": ">=3.16.0"
6
6
  },
7
- "version": "0.1.191",
7
+ "version": "0.1.192",
8
8
  "builder": {
9
9
  "@nuxt/module-builder": "0.8.4",
10
10
  "unbuild": "2.0.0"
@@ -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 ? 'Deselect all' : 'Select all' }}</span>
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
- Aucun résultat
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">
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tekkare/romulus",
3
- "version": "0.1.192",
3
+ "version": "0.1.193",
4
4
  "description": "Romulus Design System - Nuxt module by Tekkare",
5
5
  "license": "MIT",
6
6
  "type": "module",