@data-fair/lib-vuetify 1.11.1 → 1.12.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@data-fair/lib-vuetify",
3
- "version": "1.11.1",
3
+ "version": "1.12.1",
4
4
  "description": "Components based on the Vuetify 3 UI lib for the data-fair stack.",
5
5
  "main": "index.js",
6
6
  "files": [
@@ -1,5 +1,25 @@
1
+ <template>
2
+ <v-autocomplete
3
+ v-model="address"
4
+ :items="addressesList"
5
+ :loading="loadingAddresses"
6
+ no-filter
7
+ :clearable="true"
8
+ return-object
9
+ hide-no-data
10
+ hide-details
11
+ label="Adresse"
12
+ placeholder="Saisissez une adresse"
13
+ :variant="variant"
14
+ density="compact"
15
+ menu-icon=""
16
+ @update:search="(search: string) => findAdresses(search)"
17
+ />
18
+ </template>
19
+
20
+
1
21
  <script setup lang="ts">
2
- import { VAutocomplete } from 'vuetify/components/VAutocomplete'
22
+ import type { VAutocomplete } from 'vuetify/components/VAutocomplete'
3
23
  import { ref, watch } from 'vue'
4
24
  import { ofetch } from 'ofetch'
5
25
  import { useDebounceFn } from '@vueuse/core'
@@ -8,9 +28,9 @@ defineProps<{variant?: VAutocomplete['variant']}>()
8
28
  const emit = defineEmits(['selected'])
9
29
  const model = defineModel({ type: String })
10
30
 
11
- const addressesList = ref([] as any[])
31
+ const addressesList = ref<any[]>([])
12
32
  const loadingAddresses = ref(false)
13
- const address = ref(null as any)
33
+ const address = ref<any>(null)
14
34
 
15
35
  const findAdressesFn = async (search: string, selectedId?: string) => {
16
36
  loadingAddresses.value = true
@@ -53,23 +73,4 @@ watch(
53
73
  emit('selected', addr ? addr.value : undefined)
54
74
  }
55
75
  )
56
- </script>
57
-
58
- <template>
59
- <v-autocomplete
60
- v-model="address"
61
- :items="addressesList"
62
- :loading="loadingAddresses"
63
- no-filter
64
- :clearable="true"
65
- return-object
66
- hide-no-data
67
- hide-details
68
- label="Adresse"
69
- placeholder="Saisissez une adresse"
70
- :variant="variant"
71
- density="compact"
72
- menu-icon=""
73
- @update:search="(search: string) => findAdresses(search)"
74
- />
75
- </template>
76
+ </script>
@@ -1,4 +1,4 @@
1
- import { VAutocomplete } from 'vuetify/components/VAutocomplete';
1
+ import type { VAutocomplete } from 'vuetify/components/VAutocomplete';
2
2
  declare let __VLS_typeProps: {
3
3
  variant?: VAutocomplete['variant'];
4
4
  };
@@ -1,5 +1,4 @@
1
1
  /// <reference types=".vue-global-types/vue_3.5_false.d.ts" />
2
- import { VAutocomplete } from 'vuetify/components/VAutocomplete';
3
2
  import { ref, watch } from 'vue';
4
3
  import { ofetch } from 'ofetch';
5
4
  import { useDebounceFn } from '@vueuse/core';
@@ -98,7 +97,6 @@ function __VLS_template() {
98
97
  const __VLS_self = (await import('vue')).defineComponent({
99
98
  setup() {
100
99
  return {
101
- VAutocomplete: VAutocomplete,
102
100
  addressesList: addressesList,
103
101
  loadingAddresses: loadingAddresses,
104
102
  address: address,
package/style/global.scss CHANGED
@@ -1,11 +1,17 @@
1
1
  @use 'vuetify' with (
2
2
  $color-pack: false,
3
- $body-font-family: 'BodyFontFamily',
4
- $heading-font-family: 'HeadingFontFamily'
3
+ $body-font-family: var(--d-body-font-family),
4
+ $heading-font-family: var(--d-heading-font-family)
5
5
  );
6
6
 
7
7
  // v-icon has an opacity when it is prepended in a list of items.
8
8
  // ref: https://github.com/vuetifyjs/vuetify/issues/18760
9
9
  .v-icon {
10
10
  --v-medium-emphasis-opacity: 1 !important;
11
+ }
12
+
13
+ // default font variables values provide retro-compatibility with the aliases we used before
14
+ :root {
15
+ --d-body-font-family: BodyFontFamily;
16
+ --d-heading-font-family: HeadingFontFamily;
11
17
  }