@datagouv/components-next 0.0.25 → 0.0.27

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.
@@ -1,4 +1,4 @@
1
- import { g as Ke } from "./main-qCXX5fcf.js";
1
+ import { g as Ke } from "./main-CZXf5f3h.js";
2
2
  import We from "vue";
3
3
  function Fe(I, K) {
4
4
  for (var V = 0; V < K.length; V++) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datagouv/components-next",
3
- "version": "0.0.25",
3
+ "version": "0.0.27",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "./src/main.ts",
@@ -0,0 +1,19 @@
1
+ <script setup lang="ts">
2
+ import { RiLoader5Line } from '@remixicon/vue'
3
+
4
+ withDefaults(defineProps<{
5
+ color?: 'primary' | 'white'
6
+ }>(), {
7
+ color: 'primary',
8
+ })
9
+ </script>
10
+
11
+ <template>
12
+ <RiLoader5Line
13
+ class=" text-7xl animate-spin"
14
+ :class="{
15
+ 'text-primary': color === 'primary',
16
+ 'text-white': color === 'white',
17
+ }"
18
+ />
19
+ </template>
@@ -11,7 +11,7 @@
11
11
  :target="newTab ? '_blank' : undefined"
12
12
  :type
13
13
  >
14
- <AdminLoader
14
+ <AnimatedLoader
15
15
  v-if="loading"
16
16
  size="16"
17
17
  :color="color === 'primary' ? 'white' : 'primary'"
@@ -51,6 +51,7 @@ import { RiExternalLinkLine } from '@remixicon/vue'
51
51
  import type { RouteLocation } from 'vue-router'
52
52
  import AppLink from './AppLink.vue'
53
53
  import { bannerActionTypeKey } from './BannerAction.vue'
54
+ import AnimatedLoader from './AnimatedLoader.vue'
54
55
 
55
56
  type ColorType = 'primary' | 'primary-soft' | 'primary-softer' | 'secondary' | 'secondary-softer' | 'warning' | 'danger' | 'tertiary'
56
57
 
package/src/main.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import type { App, Plugin } from 'vue'
2
+ import { createI18n } from 'vue-i18n'
2
3
  import type { ContactPoint, ContactPointRole } from './types/contact_point.js'
3
4
  import type { Badge, Badges } from './types/badges'
4
5
  import type { Dataset, DatasetV2, DatasetV2WithFullObject, NewDataset, Quality, Rel } from './types/datasets'
@@ -16,6 +17,7 @@ import type { Site } from './types/site'
16
17
  import type { Weight, WellType } from './types/ui'
17
18
  import type { User } from './types/users'
18
19
 
20
+ import AnimatedLoader from './components/AnimatedLoader.vue'
19
21
  import AppLink from './components/AppLink.vue'
20
22
  import Avatar from './components/Avatar.vue'
21
23
  import AvatarWithName from './components/AvatarWithName.vue'
@@ -117,12 +119,27 @@ const datagouv: Plugin<PluginConfig> = {
117
119
  const textClamp = await import('vue3-text-clamp')
118
120
  options.textClamp = textClamp.default
119
121
  }
122
+ if (!options.i18n) {
123
+ const i18n = createI18n({
124
+ legacy: false,
125
+ globalInjection: true,
126
+ locale: 'fr',
127
+ messages: {},
128
+ formatFallbackMessages: true,
129
+ missingWarn: false,
130
+ fallbackFormat: true,
131
+ fallbackWarn: false,
132
+ })
133
+ options.i18n = i18n
134
+ app.use(i18n)
135
+ }
120
136
  },
121
137
  }
122
138
 
123
139
  export {
124
140
  datagouv,
125
141
  useComponentsConfig,
142
+ AnimatedLoader,
126
143
  AppLink,
127
144
  Avatar,
128
145
  AvatarWithName,
@@ -1,4 +0,0 @@
1
- import { _ as f } from "./main-qCXX5fcf.js";
2
- export {
3
- f as default
4
- };