@data-fair/lib-vuetify 1.5.2 → 1.6.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/index.js CHANGED
@@ -40,9 +40,11 @@ export function vuetifySessionOptions (session) {
40
40
  defaults: {
41
41
  VCard: {
42
42
  // white card with light grey border by default
43
- variant: 'elevated',
44
- elevation: 0,
43
+ variant: 'flat',
45
44
  border: 'sm'
45
+ },
46
+ global: {
47
+ rounded: 'pill'
46
48
  }
47
49
  }
48
50
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@data-fair/lib-vuetify",
3
- "version": "1.5.2",
3
+ "version": "1.6.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": [
@@ -16,7 +16,7 @@
16
16
  "build": "cd .. && npm run build"
17
17
  },
18
18
  "peerDependencies": {
19
- "@data-fair/lib-vue": "^1.9.3",
19
+ "@data-fair/lib-vue": "^1.13.0",
20
20
  "ofetch": "1",
21
21
  "vue-i18n": "10",
22
22
  "vuetify": "3"
@@ -0,0 +1,41 @@
1
+ <template>
2
+ <v-alert
3
+ v-if="notif"
4
+ class="ui-notif-alert"
5
+ v-bind="fullAlertProps"
6
+ >
7
+ <p>{{ notif.msg }}</p>
8
+ <p
9
+ v-if="notif.type === 'error'"
10
+ class="ml-3"
11
+ v-text="notif.errorMsg"
12
+ />
13
+ </v-alert>
14
+ </template>
15
+
16
+ <script setup lang="ts">
17
+ import { computed } from 'vue'
18
+ import { type UiNotif, useUiNotif } from '@data-fair/lib-vue/ui-notif.js'
19
+
20
+ const {notif, alertProps} = defineProps({
21
+ notif: {
22
+ type: Object as () => UiNotif,
23
+ default: null
24
+ },
25
+ alertProps: {
26
+ type: Object,
27
+ default () { return {} }
28
+ }
29
+ })
30
+
31
+ const fullAlertProps = computed(() => {
32
+ const props = { ...alertProps }
33
+ if (!notif) return props
34
+ props.type = notif.type
35
+ return props
36
+ })
37
+
38
+ </script>
39
+
40
+ <style>
41
+ </style>
@@ -0,0 +1,24 @@
1
+ import { type UiNotif } from '@data-fair/lib-vue/ui-notif.js';
2
+ declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
3
+ notif: {
4
+ type: () => UiNotif;
5
+ default: null;
6
+ };
7
+ alertProps: {
8
+ type: ObjectConstructor;
9
+ default(): {};
10
+ };
11
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
12
+ notif: {
13
+ type: () => UiNotif;
14
+ default: null;
15
+ };
16
+ alertProps: {
17
+ type: ObjectConstructor;
18
+ default(): {};
19
+ };
20
+ }>> & Readonly<{}>, {
21
+ notif: UiNotif;
22
+ alertProps: Record<string, any>;
23
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
24
+ export default _default;
@@ -0,0 +1,115 @@
1
+ /// <reference types=".vue-global-types/vue_3.5_false.d.ts" />
2
+ import { computed } from 'vue';
3
+ const { defineProps, defineSlots, defineEmits, defineExpose, defineModel, defineOptions, withDefaults, } = await import('vue');
4
+ const __VLS_props = defineProps({
5
+ notif: {
6
+ type: Object,
7
+ default: null
8
+ },
9
+ alertProps: {
10
+ type: Object,
11
+ default() { return {}; }
12
+ }
13
+ });
14
+ const { notif, alertProps } = __VLS_props;
15
+ const fullAlertProps = computed(() => {
16
+ const props = { ...alertProps };
17
+ if (!notif)
18
+ return props;
19
+ props.type = notif.type;
20
+ return props;
21
+ });
22
+ const __VLS_fnComponent = (await import('vue')).defineComponent({
23
+ props: {
24
+ notif: {
25
+ type: Object,
26
+ default: null
27
+ },
28
+ alertProps: {
29
+ type: Object,
30
+ default() { return {}; }
31
+ }
32
+ },
33
+ });
34
+ ;
35
+ let __VLS_functionalComponentProps;
36
+ function __VLS_template() {
37
+ const __VLS_ctx = {};
38
+ const __VLS_localComponents = {
39
+ ...{},
40
+ ...{},
41
+ ...__VLS_ctx,
42
+ };
43
+ let __VLS_components;
44
+ const __VLS_localDirectives = {
45
+ ...{},
46
+ ...__VLS_ctx,
47
+ };
48
+ let __VLS_directives;
49
+ let __VLS_styleScopedClasses;
50
+ // CSS variable injection
51
+ // CSS variable injection end
52
+ let __VLS_resolvedLocalAndGlobalComponents;
53
+ if (__VLS_ctx.notif) {
54
+ const __VLS_0 = __VLS_resolvedLocalAndGlobalComponents.VAlert;
55
+ /** @type { [typeof __VLS_components.VAlert, typeof __VLS_components.vAlert, typeof __VLS_components.VAlert, typeof __VLS_components.vAlert, ] } */
56
+ // @ts-ignore
57
+ const __VLS_1 = __VLS_asFunctionalComponent(__VLS_0, new __VLS_0({ ...{ class: ("ui-notif-alert") }, ...(__VLS_ctx.fullAlertProps), }));
58
+ const __VLS_2 = __VLS_1({ ...{ class: ("ui-notif-alert") }, ...(__VLS_ctx.fullAlertProps), }, ...__VLS_functionalComponentArgsRest(__VLS_1));
59
+ __VLS_elementAsFunction(__VLS_intrinsicElements.p, __VLS_intrinsicElements.p)({});
60
+ (__VLS_ctx.notif.msg);
61
+ if (__VLS_ctx.notif.type === 'error') {
62
+ __VLS_elementAsFunction(__VLS_intrinsicElements.p)({ ...{ class: ("ml-3") }, });
63
+ __VLS_directiveAsFunction(__VLS_directives.vText)(null, { ...__VLS_directiveBindingRestFields, value: (__VLS_ctx.notif.errorMsg) }, null, null);
64
+ }
65
+ __VLS_nonNullable(__VLS_5.slots).default;
66
+ const __VLS_5 = __VLS_pickFunctionalComponentCtx(__VLS_0, __VLS_2);
67
+ }
68
+ __VLS_styleScopedClasses['ui-notif-alert'];
69
+ __VLS_styleScopedClasses['ml-3'];
70
+ var __VLS_slots;
71
+ var __VLS_inheritedAttrs;
72
+ const __VLS_refs = {};
73
+ var $refs;
74
+ return {
75
+ slots: __VLS_slots,
76
+ refs: $refs,
77
+ attrs: {},
78
+ };
79
+ }
80
+ ;
81
+ const __VLS_self = (await import('vue')).defineComponent({
82
+ setup() {
83
+ return {
84
+ notif: notif,
85
+ fullAlertProps: fullAlertProps,
86
+ };
87
+ },
88
+ props: {
89
+ notif: {
90
+ type: Object,
91
+ default: null
92
+ },
93
+ alertProps: {
94
+ type: Object,
95
+ default() { return {}; }
96
+ }
97
+ },
98
+ });
99
+ export default (await import('vue')).defineComponent({
100
+ setup() {
101
+ return {};
102
+ },
103
+ props: {
104
+ notif: {
105
+ type: Object,
106
+ default: null
107
+ },
108
+ alertProps: {
109
+ type: Object,
110
+ default() { return {}; }
111
+ }
112
+ },
113
+ });
114
+ ;
115
+ //# sourceMappingURL=ui-notif-alert.vue.js.map
package/ui-notif.vue CHANGED
@@ -3,7 +3,7 @@
3
3
  v-if="notification"
4
4
  ref="notificationSnackbar"
5
5
  v-model="showNotification"
6
- class="ui-notification"
6
+ class="ui-notif"
7
7
  v-bind="fullSnackbarProps"
8
8
  >
9
9
  <p>{{ notification.msg }}</p>
package/ui-notif.vue.js CHANGED
@@ -65,8 +65,8 @@ function __VLS_template() {
65
65
  const __VLS_0 = __VLS_resolvedLocalAndGlobalComponents.VSnackbar;
66
66
  /** @type { [typeof __VLS_components.VSnackbar, typeof __VLS_components.vSnackbar, typeof __VLS_components.VSnackbar, typeof __VLS_components.vSnackbar, ] } */
67
67
  // @ts-ignore
68
- const __VLS_1 = __VLS_asFunctionalComponent(__VLS_0, new __VLS_0({ ref: ("notificationSnackbar"), modelValue: ((__VLS_ctx.showNotification)), ...{ class: ("ui-notification") }, ...(__VLS_ctx.fullSnackbarProps), }));
69
- const __VLS_2 = __VLS_1({ ref: ("notificationSnackbar"), modelValue: ((__VLS_ctx.showNotification)), ...{ class: ("ui-notification") }, ...(__VLS_ctx.fullSnackbarProps), }, ...__VLS_functionalComponentArgsRest(__VLS_1));
68
+ const __VLS_1 = __VLS_asFunctionalComponent(__VLS_0, new __VLS_0({ ref: ("notificationSnackbar"), modelValue: ((__VLS_ctx.showNotification)), ...{ class: ("ui-notif") }, ...(__VLS_ctx.fullSnackbarProps), }));
69
+ const __VLS_2 = __VLS_1({ ref: ("notificationSnackbar"), modelValue: ((__VLS_ctx.showNotification)), ...{ class: ("ui-notif") }, ...(__VLS_ctx.fullSnackbarProps), }, ...__VLS_functionalComponentArgsRest(__VLS_1));
70
70
  // @ts-ignore navigation for `const notificationSnackbar = ref()`
71
71
  __VLS_ctx.notificationSnackbar;
72
72
  var __VLS_6 = {};
@@ -104,7 +104,7 @@ function __VLS_template() {
104
104
  }
105
105
  const __VLS_5 = __VLS_pickFunctionalComponentCtx(__VLS_0, __VLS_2);
106
106
  }
107
- __VLS_styleScopedClasses['ui-notification'];
107
+ __VLS_styleScopedClasses['ui-notif'];
108
108
  __VLS_styleScopedClasses['ml-3'];
109
109
  var __VLS_slots;
110
110
  var __VLS_inheritedAttrs;
package/vite.d.ts CHANGED
@@ -6,6 +6,7 @@ export declare const autoImports: (string | {
6
6
  '@data-fair/lib-vue/ui-notif.js': string[];
7
7
  '@data-fair/lib-vue/fetch.js': string[];
8
8
  '@data-fair/lib-vue/ws.js': string[];
9
+ '@data-fair/lib-vue/async-action.js': string[];
9
10
  } | {
10
11
  '@data-fair/lib-vuetify/personal-menu.vue': string[][];
11
12
  '@data-fair/lib-vuetify/tutorial-alert.vue': string[][];
package/auto-imports.js DELETED
@@ -1,11 +0,0 @@
1
- // made for https://github.com/unplugin/unplugin-auto-import
2
- import vueAutoImports from '@data-fair/lib-vue/auto-imports.js'
3
- export default [
4
- ...vueAutoImports,
5
- {
6
- '@data-fair/lib-vuetify/personal-menu.vue': [['default', 'dfPersonalMenu']],
7
- '@data-fair/lib-vuetify/tutorial-alert.vue': [['default', 'dfTutorialAlert']],
8
- '@data-fair/lib-vuetify/user-avatar.vue': [['default', 'dfUserAvatar']]
9
- }
10
- ]
11
- // # sourceMappingURL=auto-imports.js.map