@data-fair/lib-vuetify 1.10.1 → 1.11.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
@@ -1,89 +1,91 @@
1
- import { fr, en } from 'vuetify/locale'
1
+ import { fr, en } from 'vuetify/locale';
2
2
  const baseColors = {
3
- primary: '#1E88E5', // blue.darken1
4
- secondary: '#42A5F5', // blue.lighten1,
5
- accent: '#FF9800', // orange.base
6
- error: '#FF5252', // red.accent2
7
- info: '#2196F3', // blue.base
8
- success: '#4CAF50', // green.base
9
- warning: '#E91E63', // pink.base
10
- admin: '#E53935' // red.darken1
11
- }
3
+ primary: '#1E88E5', // blue.darken1
4
+ secondary: '#42A5F5', // blue.lighten1,
5
+ accent: '#FF9800', // orange.base
6
+ error: '#FF5252', // red.accent2
7
+ info: '#2196F3', // blue.base
8
+ success: '#4CAF50', // green.base
9
+ warning: '#E91E63', // pink.base
10
+ admin: '#E53935' // red.darken1
11
+ };
12
12
  const baseDarkColors = {
13
- primary: '#2196F3', // blue.base
14
- success: '#00E676' // green.accent3
15
- }
16
- export function vuetifySessionOptions (session, cspNonce) {
17
- if (!session.site.value) { throw new Error('vuetifySessionOptions requires fething site info in session util') }
18
- const colors = { ...baseColors, ...session.site.value?.colors }
19
- return {
20
- ssr: false,
21
- locale: {
22
- locale: session.lang.value,
23
- messages: { fr, en }
24
- },
25
- theme: {
26
- cspNonce,
27
- defaultTheme: session.theme.value ?? 'default',
28
- themes: {
29
- [session.theme.value ?? 'default']: {
30
- dark: session.site.value?.dark,
31
- colors,
32
- variables: {
33
- // deactivate automatic partial transparencies
34
- // best to control colors precisely and ensure sufficient contrast for readability
35
- 'high-emphasis-opacity': 1,
36
- 'medium-emphasis-opacity': 0.87
37
- }
13
+ primary: '#2196F3', // blue.base
14
+ success: '#00E676' // green.accent3
15
+ };
16
+ export function vuetifySessionOptions(session, cspNonce) {
17
+ if (!session.site.value)
18
+ throw new Error('vuetifySessionOptions requires fething site info in session util');
19
+ const colors = { ...baseColors, ...session.site.value?.colors };
20
+ return {
21
+ ssr: false,
22
+ locale: {
23
+ locale: session.lang.value,
24
+ messages: { fr, en }
25
+ },
26
+ theme: {
27
+ cspNonce,
28
+ defaultTheme: session.theme.value ?? 'default',
29
+ themes: {
30
+ [session.theme.value ?? 'default']: {
31
+ dark: session.site.value?.dark,
32
+ colors,
33
+ variables: {
34
+ // deactivate automatic partial transparencies
35
+ // best to control colors precisely and ensure sufficient contrast for readability
36
+ 'high-emphasis-opacity': 1,
37
+ 'medium-emphasis-opacity': 0.87
38
+ }
39
+ }
40
+ }
41
+ },
42
+ defaults: {
43
+ VCard: {
44
+ // white card with light grey border by default
45
+ variant: 'flat',
46
+ border: 'sm'
47
+ }
38
48
  }
39
- }
40
- },
41
- defaults: {
42
- VCard: {
43
- // white card with light grey border by default
44
- variant: 'flat',
45
- border: 'sm'
46
- }
47
- }
48
- }
49
+ };
49
50
  }
50
51
  // TODO: deprecate this in favor of sessionVuetifyOptions
51
- export function defaultOptions (searchParams, darkCookie = false, locale = 'fr') {
52
- // console.warn('vuetify.defaultOptions is deprecated, use vuetifySessionOptions')
53
- const dark = searchParams?.dark ? searchParams.dark === 'true' : darkCookie
54
- const searchParamsColors = {}
55
- for (const colorCode of ['primary', 'secondary']) {
56
- if (searchParams?.[colorCode]) { searchParamsColors[colorCode] = searchParams[colorCode] }
57
- }
58
- const lightColors = { ...baseColors, ...searchParamsColors }
59
- const darkColors = { ...baseColors, ...baseDarkColors, ...searchParamsColors }
60
- const defaultTheme = dark ? 'dark' : 'light'
61
- return {
62
- ssr: false,
63
- locale: {
64
- locale,
65
- messages: { fr, en }
66
- },
67
- theme: {
68
- defaultTheme,
69
- themes: {
70
- light: {
71
- dark: false,
72
- colors: lightColors
52
+ export function defaultOptions(searchParams, darkCookie = false, locale = 'fr') {
53
+ // console.warn('vuetify.defaultOptions is deprecated, use vuetifySessionOptions')
54
+ const dark = searchParams?.dark ? searchParams.dark === 'true' : darkCookie;
55
+ const searchParamsColors = {};
56
+ for (const colorCode of ['primary', 'secondary']) {
57
+ if (searchParams?.[colorCode])
58
+ searchParamsColors[colorCode] = searchParams[colorCode];
59
+ }
60
+ const lightColors = { ...baseColors, ...searchParamsColors };
61
+ const darkColors = { ...baseColors, ...baseDarkColors, ...searchParamsColors };
62
+ const defaultTheme = dark ? 'dark' : 'light';
63
+ return {
64
+ ssr: false,
65
+ locale: {
66
+ locale,
67
+ messages: { fr, en }
73
68
  },
74
- dark: {
75
- dark: true,
76
- colors: darkColors
69
+ theme: {
70
+ defaultTheme,
71
+ themes: {
72
+ light: {
73
+ dark: false,
74
+ colors: lightColors
75
+ },
76
+ dark: {
77
+ dark: true,
78
+ colors: darkColors
79
+ }
80
+ }
81
+ },
82
+ defaults: {
83
+ VCard: {
84
+ // grey outlined card by default
85
+ variant: 'outlined',
86
+ style: 'border-color: rgba(var(--v-theme-on-surface), var(--v-focus-opacity)) !important;'
87
+ }
77
88
  }
78
- }
79
- },
80
- defaults: {
81
- VCard: {
82
- // grey outlined card by default
83
- variant: 'outlined',
84
- style: 'border-color: rgba(var(--v-theme-on-surface), var(--v-focus-opacity)) !important;'
85
- }
86
- }
87
- }
89
+ };
88
90
  }
89
- // # sourceMappingURL=index.js.map
91
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,64 @@
1
+ <template>
2
+ <!-- Right-side navigation drawer for larger screens -->
3
+ <v-navigation-drawer
4
+ v-if="display.lgAndUp.value"
5
+ color="background"
6
+ class="pt-6"
7
+ location="right"
8
+ permanent
9
+ floating
10
+ >
11
+ <template #default>
12
+ <v-list
13
+ data-iframe-height
14
+ bg-color="background"
15
+ density="compact"
16
+ >
17
+ <v-defaults-provider :defaults="{ VListItem: { rounded: true } }">
18
+ <slot />
19
+ </v-defaults-provider>
20
+ </v-list>
21
+ </template>
22
+ </v-navigation-drawer>
23
+
24
+ <!-- Floating action button for smaller screens -->
25
+ <v-fab
26
+ v-else
27
+ size="small"
28
+ color="primary"
29
+ location="top right"
30
+ app
31
+ icon
32
+ >
33
+ <v-icon
34
+ :icon="mdiDotsVertical"
35
+ />
36
+ <v-menu
37
+ activator="parent"
38
+ :close-on-content-click="false"
39
+ >
40
+ <v-card
41
+ max-width="300"
42
+ class="mt-2"
43
+ >
44
+ <v-list
45
+ data-iframe-height
46
+ bg-color="background"
47
+ density="compact"
48
+ >
49
+ <v-defaults-provider :defaults="{ VListItem: { rounded: true } }">
50
+ <slot />
51
+ </v-defaults-provider>
52
+ </v-list>
53
+ </v-card>
54
+ </v-menu>
55
+ </v-fab>
56
+ </template>
57
+
58
+ <script setup lang="ts">
59
+ import { mdiDotsVertical } from '@mdi/js'
60
+ import { useDisplay } from 'vuetify'
61
+
62
+ const display = useDisplay()
63
+
64
+ </script>
@@ -0,0 +1,17 @@
1
+ declare function __VLS_template(): {
2
+ slots: {
3
+ default?(_: {}): any;
4
+ default?(_: {}): any;
5
+ };
6
+ refs: {};
7
+ attrs: Partial<{}>;
8
+ };
9
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
10
+ declare const __VLS_component: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
11
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
12
+ export default _default;
13
+ type __VLS_WithTemplateSlots<T, S> = T & {
14
+ new (): {
15
+ $slots: S;
16
+ };
17
+ };
@@ -0,0 +1,122 @@
1
+ /// <reference types=".vue-global-types/vue_3.5_false.d.ts" />
2
+ import { mdiDotsVertical } from '@mdi/js';
3
+ import { useDisplay } from 'vuetify';
4
+ const { defineProps, defineSlots, defineEmits, defineExpose, defineModel, defineOptions, withDefaults, } = await import('vue');
5
+ const display = useDisplay();
6
+ const __VLS_fnComponent = (await import('vue')).defineComponent({});
7
+ ;
8
+ let __VLS_functionalComponentProps;
9
+ function __VLS_template() {
10
+ const __VLS_ctx = {};
11
+ const __VLS_localComponents = {
12
+ ...{},
13
+ ...{},
14
+ ...__VLS_ctx,
15
+ };
16
+ let __VLS_components;
17
+ const __VLS_localDirectives = {
18
+ ...{},
19
+ ...__VLS_ctx,
20
+ };
21
+ let __VLS_directives;
22
+ let __VLS_styleScopedClasses;
23
+ let __VLS_resolvedLocalAndGlobalComponents;
24
+ if (__VLS_ctx.display.lgAndUp.value) {
25
+ const __VLS_0 = __VLS_resolvedLocalAndGlobalComponents.VNavigationDrawer;
26
+ /** @type { [typeof __VLS_components.VNavigationDrawer, typeof __VLS_components.vNavigationDrawer, typeof __VLS_components.VNavigationDrawer, typeof __VLS_components.vNavigationDrawer, ] } */
27
+ // @ts-ignore
28
+ const __VLS_1 = __VLS_asFunctionalComponent(__VLS_0, new __VLS_0({ color: ("background"), ...{ class: ("pt-6") }, location: ("right"), permanent: (true), floating: (true), }));
29
+ const __VLS_2 = __VLS_1({ color: ("background"), ...{ class: ("pt-6") }, location: ("right"), permanent: (true), floating: (true), }, ...__VLS_functionalComponentArgsRest(__VLS_1));
30
+ __VLS_elementAsFunction(__VLS_intrinsicElements.template, __VLS_intrinsicElements.template)({});
31
+ {
32
+ const { default: __VLS_thisSlot } = __VLS_nonNullable(__VLS_5.slots);
33
+ const __VLS_6 = __VLS_resolvedLocalAndGlobalComponents.VList;
34
+ /** @type { [typeof __VLS_components.VList, typeof __VLS_components.vList, typeof __VLS_components.VList, typeof __VLS_components.vList, ] } */
35
+ // @ts-ignore
36
+ const __VLS_7 = __VLS_asFunctionalComponent(__VLS_6, new __VLS_6({ dataIframeHeight: (true), bgColor: ("background"), density: ("compact"), }));
37
+ const __VLS_8 = __VLS_7({ dataIframeHeight: (true), bgColor: ("background"), density: ("compact"), }, ...__VLS_functionalComponentArgsRest(__VLS_7));
38
+ const __VLS_12 = __VLS_resolvedLocalAndGlobalComponents.VDefaultsProvider;
39
+ /** @type { [typeof __VLS_components.VDefaultsProvider, typeof __VLS_components.vDefaultsProvider, typeof __VLS_components.VDefaultsProvider, typeof __VLS_components.vDefaultsProvider, ] } */
40
+ // @ts-ignore
41
+ const __VLS_13 = __VLS_asFunctionalComponent(__VLS_12, new __VLS_12({ defaults: (({ VListItem: { rounded: true } })), }));
42
+ const __VLS_14 = __VLS_13({ defaults: (({ VListItem: { rounded: true } })), }, ...__VLS_functionalComponentArgsRest(__VLS_13));
43
+ var __VLS_18 = {};
44
+ __VLS_nonNullable(__VLS_17.slots).default;
45
+ const __VLS_17 = __VLS_pickFunctionalComponentCtx(__VLS_12, __VLS_14);
46
+ __VLS_nonNullable(__VLS_11.slots).default;
47
+ const __VLS_11 = __VLS_pickFunctionalComponentCtx(__VLS_6, __VLS_8);
48
+ }
49
+ const __VLS_5 = __VLS_pickFunctionalComponentCtx(__VLS_0, __VLS_2);
50
+ }
51
+ else {
52
+ const __VLS_19 = __VLS_resolvedLocalAndGlobalComponents.VFab;
53
+ /** @type { [typeof __VLS_components.VFab, typeof __VLS_components.vFab, typeof __VLS_components.VFab, typeof __VLS_components.vFab, ] } */
54
+ // @ts-ignore
55
+ const __VLS_20 = __VLS_asFunctionalComponent(__VLS_19, new __VLS_19({ size: ("small"), color: ("primary"), location: ("top right"), app: (true), icon: (true), }));
56
+ const __VLS_21 = __VLS_20({ size: ("small"), color: ("primary"), location: ("top right"), app: (true), icon: (true), }, ...__VLS_functionalComponentArgsRest(__VLS_20));
57
+ const __VLS_25 = __VLS_resolvedLocalAndGlobalComponents.VIcon;
58
+ /** @type { [typeof __VLS_components.VIcon, typeof __VLS_components.vIcon, ] } */
59
+ // @ts-ignore
60
+ const __VLS_26 = __VLS_asFunctionalComponent(__VLS_25, new __VLS_25({ icon: ((__VLS_ctx.mdiDotsVertical)), }));
61
+ const __VLS_27 = __VLS_26({ icon: ((__VLS_ctx.mdiDotsVertical)), }, ...__VLS_functionalComponentArgsRest(__VLS_26));
62
+ const __VLS_31 = __VLS_resolvedLocalAndGlobalComponents.VMenu;
63
+ /** @type { [typeof __VLS_components.VMenu, typeof __VLS_components.vMenu, typeof __VLS_components.VMenu, typeof __VLS_components.vMenu, ] } */
64
+ // @ts-ignore
65
+ const __VLS_32 = __VLS_asFunctionalComponent(__VLS_31, new __VLS_31({ activator: ("parent"), closeOnContentClick: ((false)), }));
66
+ const __VLS_33 = __VLS_32({ activator: ("parent"), closeOnContentClick: ((false)), }, ...__VLS_functionalComponentArgsRest(__VLS_32));
67
+ const __VLS_37 = __VLS_resolvedLocalAndGlobalComponents.VCard;
68
+ /** @type { [typeof __VLS_components.VCard, typeof __VLS_components.vCard, typeof __VLS_components.VCard, typeof __VLS_components.vCard, ] } */
69
+ // @ts-ignore
70
+ const __VLS_38 = __VLS_asFunctionalComponent(__VLS_37, new __VLS_37({ maxWidth: ("300"), ...{ class: ("mt-2") }, }));
71
+ const __VLS_39 = __VLS_38({ maxWidth: ("300"), ...{ class: ("mt-2") }, }, ...__VLS_functionalComponentArgsRest(__VLS_38));
72
+ const __VLS_43 = __VLS_resolvedLocalAndGlobalComponents.VList;
73
+ /** @type { [typeof __VLS_components.VList, typeof __VLS_components.vList, typeof __VLS_components.VList, typeof __VLS_components.vList, ] } */
74
+ // @ts-ignore
75
+ const __VLS_44 = __VLS_asFunctionalComponent(__VLS_43, new __VLS_43({ dataIframeHeight: (true), bgColor: ("background"), density: ("compact"), }));
76
+ const __VLS_45 = __VLS_44({ dataIframeHeight: (true), bgColor: ("background"), density: ("compact"), }, ...__VLS_functionalComponentArgsRest(__VLS_44));
77
+ const __VLS_49 = __VLS_resolvedLocalAndGlobalComponents.VDefaultsProvider;
78
+ /** @type { [typeof __VLS_components.VDefaultsProvider, typeof __VLS_components.vDefaultsProvider, typeof __VLS_components.VDefaultsProvider, typeof __VLS_components.vDefaultsProvider, ] } */
79
+ // @ts-ignore
80
+ const __VLS_50 = __VLS_asFunctionalComponent(__VLS_49, new __VLS_49({ defaults: (({ VListItem: { rounded: true } })), }));
81
+ const __VLS_51 = __VLS_50({ defaults: (({ VListItem: { rounded: true } })), }, ...__VLS_functionalComponentArgsRest(__VLS_50));
82
+ var __VLS_55 = {};
83
+ __VLS_nonNullable(__VLS_54.slots).default;
84
+ const __VLS_54 = __VLS_pickFunctionalComponentCtx(__VLS_49, __VLS_51);
85
+ __VLS_nonNullable(__VLS_48.slots).default;
86
+ const __VLS_48 = __VLS_pickFunctionalComponentCtx(__VLS_43, __VLS_45);
87
+ __VLS_nonNullable(__VLS_42.slots).default;
88
+ const __VLS_42 = __VLS_pickFunctionalComponentCtx(__VLS_37, __VLS_39);
89
+ __VLS_nonNullable(__VLS_36.slots).default;
90
+ const __VLS_36 = __VLS_pickFunctionalComponentCtx(__VLS_31, __VLS_33);
91
+ __VLS_nonNullable(__VLS_24.slots).default;
92
+ const __VLS_24 = __VLS_pickFunctionalComponentCtx(__VLS_19, __VLS_21);
93
+ }
94
+ __VLS_styleScopedClasses['pt-6'];
95
+ __VLS_styleScopedClasses['mt-2'];
96
+ var __VLS_slots;
97
+ var __VLS_inheritedAttrs;
98
+ const __VLS_refs = {};
99
+ var $refs;
100
+ return {
101
+ slots: __VLS_slots,
102
+ refs: $refs,
103
+ attrs: {},
104
+ };
105
+ }
106
+ ;
107
+ const __VLS_self = (await import('vue')).defineComponent({
108
+ setup() {
109
+ return {
110
+ mdiDotsVertical: mdiDotsVertical,
111
+ display: display,
112
+ };
113
+ },
114
+ });
115
+ const __VLS_component = (await import('vue')).defineComponent({
116
+ setup() {
117
+ return {};
118
+ },
119
+ });
120
+ export default {};
121
+ ;
122
+ //# sourceMappingURL=navigation-right.vue.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@data-fair/lib-vuetify",
3
- "version": "1.10.1",
3
+ "version": "1.11.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": [
package/vite.d.ts CHANGED
@@ -7,9 +7,20 @@ export declare const autoImports: (string | {
7
7
  '@data-fair/lib-vue/fetch.js': string[];
8
8
  '@data-fair/lib-vue/ws.js': string[];
9
9
  '@data-fair/lib-vue/async-action.js': string[];
10
+ '@data-fair/lib-vue/deep-diff.js': string[];
10
11
  } | {
12
+ '@data-fair/lib-vuetify/date-match-filter.vue': string[][];
13
+ '@data-fair/lib-vuetify/date-range-picker.vue': string[][];
14
+ '@data-fair/lib-vuetify/lang-switcher.vue': string[][];
15
+ '@data-fair/lib-vuetify/navigation-right.vue': string[][];
16
+ '@data-fair/lib-vuetify/owner-avatar.vue': string[][];
17
+ '@data-fair/lib-vuetify/owner-pick.vue': string[][];
11
18
  '@data-fair/lib-vuetify/personal-menu.vue': string[][];
19
+ '@data-fair/lib-vuetify/search-address.vue': string[][];
20
+ '@data-fair/lib-vuetify/theme-switcher.vue': string[][];
12
21
  '@data-fair/lib-vuetify/tutorial-alert.vue': string[][];
13
- '@data-fair/lib-vuetify/user-avatar.vue': string[][];
22
+ '@data-fair/lib-vuetify/ui-notif-alert.vue': string[][];
23
+ '@data-fair/lib-vuetify/ui-notif.vue': string[][];
24
+ '@data-fair/lib-vuetify/ui-user-avatar.vue': string[][];
14
25
  })[];
15
26
  export declare const settingsPath: string;
package/vite.js CHANGED
@@ -1,12 +1,22 @@
1
1
  // made for https://github.com/unplugin/unplugin-auto-import
2
- import { autoImports as vueAutoImports } from '@data-fair/lib-vue/vite.js'
2
+ import { autoImports as vueAutoImports } from '@data-fair/lib-vue/vite.js';
3
3
  export const autoImports = [
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
- export const settingsPath = new URL(import.meta.resolve('@data-fair/lib-vuetify/style/settings.scss')).pathname
12
- // # sourceMappingURL=vite.js.map
4
+ ...vueAutoImports,
5
+ {
6
+ '@data-fair/lib-vuetify/date-match-filter.vue': [['default', 'dfDateMatchFilter']],
7
+ '@data-fair/lib-vuetify/date-range-picker.vue': [['default', 'dfDateRangePicker']],
8
+ '@data-fair/lib-vuetify/lang-switcher.vue': [['default', 'dfLangSwitcher']],
9
+ '@data-fair/lib-vuetify/navigation-right.vue': [['default', 'dfNavigationRight']],
10
+ '@data-fair/lib-vuetify/owner-avatar.vue': [['default', 'dfOwnerAvatar']],
11
+ '@data-fair/lib-vuetify/owner-pick.vue': [['default', 'dfOwnerPick']],
12
+ '@data-fair/lib-vuetify/personal-menu.vue': [['default', 'dfPersonalMenu']],
13
+ '@data-fair/lib-vuetify/search-address.vue': [['default', 'dfSearchAddress']],
14
+ '@data-fair/lib-vuetify/theme-switcher.vue': [['default', 'dfThemeSwitcher']],
15
+ '@data-fair/lib-vuetify/tutorial-alert.vue': [['default', 'dfTutorialAlert']],
16
+ '@data-fair/lib-vuetify/ui-notif-alert.vue': [['default', 'dfUiNotifAlert']],
17
+ '@data-fair/lib-vuetify/ui-notif.vue': [['default', 'dfUiNotif']],
18
+ '@data-fair/lib-vuetify/ui-user-avatar.vue': [['default', 'dfUserAvatar']]
19
+ }
20
+ ];
21
+ export const settingsPath = new URL(import.meta.resolve('@data-fair/lib-vuetify/style/settings.scss')).pathname;
22
+ //# sourceMappingURL=vite.js.map