@simsustech/quasar-components 0.11.9 → 0.11.11
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/CHANGELOG.md +15 -0
- package/dist/LocaleSelect.vue_vue_type_script_setup_true_lang-Du4fNbTV.js +573 -0
- package/dist/authentication.js +218 -106
- package/dist/form.js +164 -305
- package/dist/general.js +51 -95
- package/dist/md3.js +435 -0
- package/dist/{nl-BTgHOvpQ.js → nl-BJwNz421.js} +70 -0
- package/dist/{nl-jHKPHlmh.js → nl-CneFq5NZ.js} +4 -0
- package/dist/nl-NLgZUAKl.js +6 -0
- package/dist/types/ui/authentication/AccountsTable.vue.d.ts +5 -0
- package/dist/types/ui/authentication/ConsentList.vue.d.ts +3 -0
- package/dist/types/ui/authentication/EmailChangeForm.vue.d.ts +2 -2
- package/dist/types/ui/authentication/LoginButton.vue.d.ts +1 -1
- package/dist/types/ui/authentication/LoginForm.vue.d.ts +6 -2
- package/dist/types/ui/authentication/LogoutButton.vue.d.ts +12 -0
- package/dist/types/ui/authentication/LogoutForm.vue.d.ts +18 -0
- package/dist/types/ui/authentication/PasswordChangeForm.vue.d.ts +10 -2
- package/dist/types/ui/authentication/RegisterForm.vue.d.ts +10 -2
- package/dist/types/ui/authentication/RequestOtpForm.vue.d.ts +2 -2
- package/dist/types/ui/authentication/UserMenuButton.vue.d.ts +4 -1
- package/dist/types/ui/authentication/index.d.ts +2 -0
- package/dist/types/ui/authentication/lang/index.d.ts +12 -0
- package/dist/types/ui/form/DateInput.vue.d.ts +19 -1
- package/dist/types/ui/form/FormInput.vue.d.ts +2 -15
- package/dist/types/ui/form/FormItem.vue.d.ts +2 -19
- package/dist/types/ui/form/LocaleSelect.vue.d.ts +6 -4
- package/dist/types/ui/form/lang/index.d.ts +1131 -0
- package/dist/types/ui/general/QDrawerList.vue.d.ts +2 -7
- package/dist/types/ui/general/QLanguageSelect.vue.d.ts +7 -4
- package/dist/types/ui/general/QStyledCard.vue.d.ts +9 -5
- package/dist/types/ui/general/QStyledLayout.vue.d.ts +1 -1
- package/dist/types/ui/general/QSubmitButton.vue.d.ts +1 -1
- package/dist/types/ui/general/ResourcePage.vue.d.ts +17 -5
- package/dist/types/ui/general/ResponsiveDialog.vue.d.ts +9 -4
- package/dist/types/ui/md3/Md3Layout.vue.d.ts +31 -0
- package/dist/types/ui/md3/NavigationRailFabs.vue.d.ts +14 -0
- package/dist/types/ui/md3/index.d.ts +3 -0
- package/dist/types/ui/md3/lang/en-US.d.ts +3 -0
- package/dist/types/ui/md3/lang/index.d.ts +12 -0
- package/dist/types/ui/md3/lang/nl.d.ts +3 -0
- package/package.json +21 -14
- package/src/ui/authentication/AccountsTable.vue +18 -9
- package/src/ui/authentication/ConsentList.vue +13 -18
- package/src/ui/authentication/LoginForm.vue +12 -3
- package/src/ui/authentication/LogoutButton.vue +31 -0
- package/src/ui/authentication/LogoutForm.vue +49 -0
- package/src/ui/authentication/PasswordChangeForm.vue +11 -3
- package/src/ui/authentication/RegisterForm.vue +11 -3
- package/src/ui/authentication/UserMenuButton.vue +9 -3
- package/src/ui/authentication/index.ts +2 -0
- package/src/ui/authentication/lang/en-US.ts +4 -0
- package/src/ui/authentication/lang/index.ts +4 -0
- package/src/ui/authentication/lang/nl.ts +4 -0
- package/src/ui/form/DateInput.vue +53 -26
- package/src/ui/form/LocaleSelect.vue +29 -43
- package/src/ui/form/lang/en-US.ts +377 -0
- package/src/ui/form/lang/index.ts +377 -0
- package/src/ui/form/lang/nl.ts +377 -0
- package/src/ui/general/QLanguageSelect.vue +30 -105
- package/src/ui/general/QLanguageSelectBtn.vue.bak +99 -0
- package/src/ui/general/QStyledCard.vue +2 -2
- package/src/ui/general/ResourcePage.vue +13 -5
- package/src/ui/general/ResponsiveDialog.vue +23 -6
- package/src/ui/general/index.ts +1 -0
- package/src/ui/md3/Md3Layout.vue +139 -0
- package/src/ui/md3/NavigationRailFabs.vue +68 -0
- package/src/ui/md3/index.ts +3 -0
- package/src/ui/md3/lang/en-US.ts +7 -0
- package/src/ui/md3/lang/index.ts +41 -0
- package/src/ui/md3/lang/nl.ts +7 -0
- package/vite.config.ts +4 -73
- package/dist/flags.js +0 -255
- package/dist/icons.js +0 -25
- package/dist/index-DnmJt2wP.js +0 -7921
- package/dist/nl-BL9hHEHL.js +0 -76
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<q-btn icon="
|
|
2
|
+
<q-btn :icon="personIcon">
|
|
3
3
|
<q-menu>
|
|
4
4
|
<q-list>
|
|
5
5
|
<q-item :to="userRoute">
|
|
@@ -21,15 +21,19 @@ export default {
|
|
|
21
21
|
</script>
|
|
22
22
|
|
|
23
23
|
<script setup lang="ts">
|
|
24
|
-
import { ref, watch } from 'vue'
|
|
24
|
+
import { ref, toRefs, watch } from 'vue'
|
|
25
25
|
import { useQuasar } from 'quasar'
|
|
26
26
|
import { useLang, loadLang } from './lang'
|
|
27
27
|
import type { RouteLocationRaw } from 'vue-router'
|
|
28
28
|
|
|
29
29
|
export interface Props {
|
|
30
30
|
userRoute: RouteLocationRaw
|
|
31
|
+
icons?: {
|
|
32
|
+
person: string
|
|
33
|
+
}
|
|
31
34
|
}
|
|
32
|
-
defineProps<Props>()
|
|
35
|
+
const props = defineProps<Props>()
|
|
36
|
+
const { icons } = toRefs(props)
|
|
33
37
|
// const attrs = useAttrs();
|
|
34
38
|
const emit = defineEmits<{
|
|
35
39
|
(e: 'signOut'): void
|
|
@@ -41,6 +45,8 @@ watch($q.lang, (val) => {
|
|
|
41
45
|
loadLang($q.lang.isoName)
|
|
42
46
|
})
|
|
43
47
|
|
|
48
|
+
const personIcon = icons.value?.person ?? 'person'
|
|
49
|
+
|
|
44
50
|
const variables = ref({
|
|
45
51
|
// header: lang.value.some.nested.prop
|
|
46
52
|
})
|
|
@@ -11,4 +11,6 @@ export { default as ConsentList } from './ConsentList.vue'
|
|
|
11
11
|
export { default as UserMenuButton } from './UserMenuButton.vue'
|
|
12
12
|
export { default as LoginButton } from './LoginButton.vue'
|
|
13
13
|
export { default as AccountsTable } from './AccountsTable.vue'
|
|
14
|
+
export { default as LogoutForm } from './LogoutForm.vue'
|
|
15
|
+
export { default as LogoutButton } from './LogoutButton.vue'
|
|
14
16
|
export { useLang, loadLang } from './lang/index.js'
|
|
@@ -7,30 +7,36 @@
|
|
|
7
7
|
stack-label
|
|
8
8
|
>
|
|
9
9
|
<template #control>
|
|
10
|
-
<
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
10
|
+
<div class="row">
|
|
11
|
+
<component
|
|
12
|
+
:is="QInput"
|
|
13
|
+
v-for="(part, index) in format.split('-')"
|
|
14
|
+
:key="part"
|
|
15
|
+
class="col-auto"
|
|
16
|
+
borderless
|
|
17
|
+
:filled="false"
|
|
18
|
+
:outlined="false"
|
|
19
|
+
:standout="false"
|
|
20
|
+
:rounded="false"
|
|
21
|
+
v-bind="dateProps[part]"
|
|
22
|
+
inputmode="numeric"
|
|
23
|
+
dense
|
|
24
|
+
>
|
|
25
|
+
<template #after>
|
|
26
|
+
<a v-if="index < 2" style="margin-top: 1em; width: 1ch">-</a>
|
|
27
|
+
</template>
|
|
28
|
+
</component>
|
|
29
|
+
</div>
|
|
24
30
|
</template>
|
|
25
31
|
|
|
26
32
|
<template #append>
|
|
27
33
|
<q-icon
|
|
28
34
|
v-if="clearable"
|
|
29
|
-
name="clear"
|
|
35
|
+
:name="icons.clear"
|
|
30
36
|
class="cursor-pointer"
|
|
31
37
|
@click="emit('update:modelValue', null)"
|
|
32
38
|
/>
|
|
33
|
-
<q-icon name="event" class="cursor-pointer">
|
|
39
|
+
<q-icon :name="icons.event" class="cursor-pointer">
|
|
34
40
|
<q-tooltip v-if="formattedDate">
|
|
35
41
|
{{ formattedDate }}
|
|
36
42
|
</q-tooltip>
|
|
@@ -52,6 +58,10 @@
|
|
|
52
58
|
</q-popup-proxy>
|
|
53
59
|
</q-icon>
|
|
54
60
|
</template>
|
|
61
|
+
|
|
62
|
+
<template v-for="(_, slot) in $slots" #[slot]="scope">
|
|
63
|
+
<slot :name="slot" v-bind="scope || {}" />
|
|
64
|
+
</template>
|
|
55
65
|
</q-field>
|
|
56
66
|
</template>
|
|
57
67
|
|
|
@@ -74,12 +84,20 @@ export interface Props {
|
|
|
74
84
|
required?: boolean
|
|
75
85
|
clearable?: boolean
|
|
76
86
|
date?: Partial<QDateProps>
|
|
87
|
+
icons?: {
|
|
88
|
+
event: string
|
|
89
|
+
clear: string
|
|
90
|
+
}
|
|
77
91
|
}
|
|
78
92
|
const props = withDefaults(defineProps<Props>(), {
|
|
79
93
|
format: 'YYYY-MM-DD',
|
|
80
94
|
locale: 'en-US',
|
|
81
95
|
label: '',
|
|
82
|
-
date: () => ({})
|
|
96
|
+
date: () => ({}),
|
|
97
|
+
icons: () => ({
|
|
98
|
+
event: 'event',
|
|
99
|
+
clear: 'clear'
|
|
100
|
+
})
|
|
83
101
|
})
|
|
84
102
|
const emit = defineEmits<{
|
|
85
103
|
(e: 'update:modelValue', val: string | null): void
|
|
@@ -187,12 +205,15 @@ const dateProps = computed<Record<string, QInputProps>>(() => ({
|
|
|
187
205
|
modelValue: year.value,
|
|
188
206
|
placeholder: lang.value.datePicker.YYYY,
|
|
189
207
|
style: {
|
|
190
|
-
width: format.value === 'YYYY-MM-DD' ? '8ch' : '
|
|
191
|
-
'margin-top': '-
|
|
192
|
-
'margin-bottom': '-0.5em'
|
|
208
|
+
'max-width': format.value === 'YYYY-MM-DD' ? '8ch' : '7ch',
|
|
209
|
+
'margin-top': '-1.75em',
|
|
210
|
+
'margin-bottom': '-0.5em',
|
|
211
|
+
background: 'transparent',
|
|
212
|
+
border: 0
|
|
193
213
|
},
|
|
194
214
|
// suffix: format.value === 'YYYY-MM-DD' ? '-' : undefined,
|
|
195
215
|
class: format.value !== 'YYYY-MM-DD' ? 'q-mb-none q-ml-none' : undefined,
|
|
216
|
+
inputClass: 'text-center',
|
|
196
217
|
'onUpdate:modelValue': setYear,
|
|
197
218
|
onKeydown: goToNextElement
|
|
198
219
|
},
|
|
@@ -200,12 +221,15 @@ const dateProps = computed<Record<string, QInputProps>>(() => ({
|
|
|
200
221
|
modelValue: month.value ? String(month.value).padStart(2, '0') : '',
|
|
201
222
|
placeholder: lang.value.datePicker.MM,
|
|
202
223
|
style: {
|
|
203
|
-
width: '
|
|
204
|
-
'margin-top': '-
|
|
205
|
-
'margin-bottom': '-0.5em'
|
|
224
|
+
'max-width': '7ch',
|
|
225
|
+
'margin-top': '-1.75em',
|
|
226
|
+
'margin-bottom': '-0.5em',
|
|
227
|
+
background: 'transparent',
|
|
228
|
+
border: 0
|
|
206
229
|
},
|
|
207
230
|
// suffix: '-',
|
|
208
231
|
class: 'q-ml-none',
|
|
232
|
+
inputClass: 'text-center',
|
|
209
233
|
'onUpdate:modelValue': setMonth,
|
|
210
234
|
onKeydown: goToNextElement
|
|
211
235
|
},
|
|
@@ -213,12 +237,15 @@ const dateProps = computed<Record<string, QInputProps>>(() => ({
|
|
|
213
237
|
modelValue: day.value ? String(day.value).padStart(2, '0') : '',
|
|
214
238
|
placeholder: lang.value.datePicker.DD,
|
|
215
239
|
style: {
|
|
216
|
-
width: format.value === 'DD-MM-YYYY' ? '
|
|
217
|
-
'margin-top': '-
|
|
218
|
-
'margin-bottom': '-0.5em'
|
|
240
|
+
'max-width': format.value === 'DD-MM-YYYY' ? '7ch' : '4ch',
|
|
241
|
+
'margin-top': '-1.75em',
|
|
242
|
+
'margin-bottom': '-0.5em',
|
|
243
|
+
background: 'transparent',
|
|
244
|
+
border: 0
|
|
219
245
|
},
|
|
220
246
|
// suffix: format.value === 'DD-MM-YYYY' ? '-' : undefined,
|
|
221
247
|
class: format.value === 'YYYY-MM-DD' ? 'q-ml-none' : undefined,
|
|
248
|
+
inputClass: 'text-center',
|
|
222
249
|
'onUpdate:modelValue': setDay,
|
|
223
250
|
onKeydown: goToNextElement
|
|
224
251
|
}
|
|
@@ -3,32 +3,27 @@
|
|
|
3
3
|
v-bind="attrs"
|
|
4
4
|
:options="languageOptions"
|
|
5
5
|
:model-value="modelValue"
|
|
6
|
-
:
|
|
6
|
+
:filled="false"
|
|
7
|
+
borderless
|
|
7
8
|
emit-value
|
|
8
9
|
map-options
|
|
9
10
|
>
|
|
10
|
-
<template #selected>
|
|
11
|
-
<div v-if="
|
|
12
|
-
<
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
11
|
+
<template #selected-item="scope">
|
|
12
|
+
<div v-if="scope.opt">
|
|
13
|
+
<q-item>
|
|
14
|
+
<q-item-section avatar>
|
|
15
|
+
<q-icon :name="scope.opt.icon" />
|
|
16
|
+
</q-item-section>
|
|
17
|
+
<q-item-section label>
|
|
18
|
+
{{ scope.opt.label }}
|
|
19
|
+
</q-item-section>
|
|
20
|
+
</q-item>
|
|
20
21
|
</div>
|
|
21
22
|
</template>
|
|
22
23
|
<template #option="scope">
|
|
23
24
|
<q-item v-bind="scope.itemProps">
|
|
24
25
|
<q-item-section avatar>
|
|
25
|
-
<
|
|
26
|
-
:is="
|
|
27
|
-
flags[
|
|
28
|
-
scope.opt.value.slice(-2).toLowerCase() as keyof typeof flags
|
|
29
|
-
]
|
|
30
|
-
"
|
|
31
|
-
/>
|
|
26
|
+
<q-icon :name="scope.opt.icon" />
|
|
32
27
|
</q-item-section>
|
|
33
28
|
<q-item-section>
|
|
34
29
|
<q-item-label>
|
|
@@ -41,39 +36,30 @@
|
|
|
41
36
|
</template>
|
|
42
37
|
|
|
43
38
|
<script setup lang="ts">
|
|
44
|
-
import { useAttrs, computed } from 'vue'
|
|
39
|
+
import { useAttrs, computed, toRefs } from 'vue'
|
|
45
40
|
import { QSelect } from 'quasar'
|
|
46
|
-
import
|
|
47
|
-
import { useLang as useFlagsLang } from '../flags/lang/index.js'
|
|
48
|
-
import { useLang } from './lang/index.js'
|
|
41
|
+
import { Language, useLang } from './lang/index.js'
|
|
49
42
|
|
|
50
43
|
export interface Props {
|
|
51
|
-
modelValue
|
|
52
|
-
|
|
53
|
-
|
|
44
|
+
modelValue: keyof Language['countries']
|
|
45
|
+
locales: {
|
|
46
|
+
icon: string
|
|
47
|
+
isoName: keyof Language['languages']
|
|
48
|
+
}[]
|
|
54
49
|
}
|
|
55
|
-
const
|
|
56
|
-
|
|
57
|
-
required,
|
|
58
|
-
allowedCodes = ['en-US', 'nl']
|
|
59
|
-
} = defineProps<Props>()
|
|
60
|
-
const attrs = useAttrs()
|
|
50
|
+
const props = defineProps<Props>()
|
|
51
|
+
const { modelValue, locales } = toRefs(props)
|
|
61
52
|
|
|
62
53
|
const lang = useLang()
|
|
63
|
-
const
|
|
54
|
+
const attrs = useAttrs()
|
|
64
55
|
|
|
65
56
|
const languageOptions = computed(() => {
|
|
66
|
-
const options =
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
label: flagsLang.value.languages[lang],
|
|
73
|
-
value: lang
|
|
74
|
-
})
|
|
75
|
-
}
|
|
76
|
-
}
|
|
57
|
+
const options = locales.value.map((locale) => ({
|
|
58
|
+
label: lang.value.languages[locale.isoName],
|
|
59
|
+
value: locale.isoName,
|
|
60
|
+
icon: locale.icon
|
|
61
|
+
}))
|
|
62
|
+
|
|
77
63
|
return options
|
|
78
64
|
})
|
|
79
65
|
</script>
|