@simsustech/quasar-components 0.1.3 → 0.3.0

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.
Files changed (85) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/{QSubmitButton.vue_vue_type_script_setup_true_lang.1d0c06eb.js → QSubmitButton.vue_vue_type_script_setup_true_lang-b5f452c6.js} +11 -4
  3. package/dist/authentication.js +53 -27
  4. package/dist/en-US-6cc72154.js +226 -0
  5. package/dist/flags.js +5 -215
  6. package/dist/form.js +543 -0
  7. package/dist/general.js +364 -14
  8. package/dist/icons.js +5 -3
  9. package/dist/nl-38cb2607.js +134 -0
  10. package/dist/{nl.6b0aedb7.js → nl-710ec15d.js} +1 -1
  11. package/dist/nl-ea9ab282.js +38 -0
  12. package/dist/style.css +2 -2
  13. package/dist/types/ui/authentication/ConsentList.vue.d.ts +2 -58
  14. package/dist/types/ui/authentication/EmailChangeForm.vue.d.ts +20 -112
  15. package/dist/types/ui/authentication/EmailChangeStepper.vue.d.ts +13 -131
  16. package/dist/types/ui/authentication/LoginButton.vue.d.ts +9 -54
  17. package/dist/types/ui/authentication/LoginForm.vue.d.ts +20 -118
  18. package/dist/types/ui/authentication/OtpInput.vue.d.ts +4 -56
  19. package/dist/types/ui/authentication/PasswordChangeForm.vue.d.ts +31 -140
  20. package/dist/types/ui/authentication/PasswordChangeStepper.vue.d.ts +13 -131
  21. package/dist/types/ui/authentication/RegisterForm.vue.d.ts +33 -167
  22. package/dist/types/ui/authentication/RequestOtpForm.vue.d.ts +18 -100
  23. package/dist/types/ui/authentication/UserMenuButton.vue.d.ts +11 -64
  24. package/dist/types/ui/authentication/VerificationSlider.vue.d.ts +4 -60
  25. package/dist/types/ui/form/BooleanItem.vue.d.ts +15 -0
  26. package/dist/types/ui/form/BooleanSelect.vue.d.ts +18 -0
  27. package/dist/types/ui/form/DateInput.vue.d.ts +19 -0
  28. package/dist/types/ui/form/EmailInput.vue.d.ts +24 -0
  29. package/dist/types/ui/form/FormInput.vue.d.ts +18 -0
  30. package/dist/types/ui/form/FormItem.vue.d.ts +25 -0
  31. package/dist/types/ui/form/GenderItem.vue.d.ts +15 -0
  32. package/dist/types/ui/form/GenderSelect.vue.d.ts +18 -0
  33. package/dist/types/ui/form/PostalCodeInput.vue.d.ts +19 -0
  34. package/dist/types/ui/form/TelephoneNumberInput.vue.d.ts +17 -0
  35. package/dist/types/ui/form/index.d.ts +10 -0
  36. package/dist/types/ui/form/lang/en-US.d.ts +3 -0
  37. package/dist/types/ui/form/lang/index.d.ts +74 -0
  38. package/dist/types/ui/form/lang/nl.d.ts +3 -0
  39. package/dist/types/ui/general/QLanguageSelect.vue.d.ts +16 -0
  40. package/dist/types/ui/general/QStyledCard.vue.d.ts +13 -58
  41. package/dist/types/ui/general/QStyledLayout.vue.d.ts +9 -54
  42. package/dist/types/ui/general/QSubmitButton.vue.d.ts +29 -114
  43. package/dist/types/ui/general/ResourcePage.vue.d.ts +61 -0
  44. package/dist/types/ui/general/ResponsiveDialog.vue.d.ts +37 -0
  45. package/dist/types/ui/general/index.d.ts +3 -0
  46. package/dist/types/virtualModules.d.ts +1 -0
  47. package/dist/virtualModules.d.ts +1 -0
  48. package/dist/virtualModules.js +3 -2
  49. package/dist/vite-plugin.js +26 -5
  50. package/package.json +28 -23
  51. package/src/ui/authentication/EmailChangeStepper.vue +2 -2
  52. package/src/ui/authentication/PasswordChangeStepper.vue +2 -2
  53. package/src/ui/authentication/lang/en-US.ts +1 -2
  54. package/src/ui/authentication/lang/nl.ts +1 -2
  55. package/src/ui/flags/README.md +1 -1
  56. package/src/ui/form/BooleanItem.vue +34 -0
  57. package/src/ui/form/BooleanSelect.vue +55 -0
  58. package/src/ui/form/DateInput.vue +70 -0
  59. package/src/ui/form/EmailInput.vue +50 -0
  60. package/src/ui/form/FormInput.vue +44 -0
  61. package/src/ui/form/FormItem.vue +50 -0
  62. package/src/ui/form/GenderItem.vue +35 -0
  63. package/src/ui/form/GenderSelect.vue +59 -0
  64. package/src/ui/form/PostalCodeInput.vue +47 -0
  65. package/src/ui/form/TelephoneNumberInput.vue +35 -0
  66. package/src/ui/form/index.ts +10 -0
  67. package/src/ui/form/lang/en-US.ts +39 -0
  68. package/src/ui/form/lang/index.ts +73 -0
  69. package/src/ui/form/lang/nl.ts +39 -0
  70. package/src/ui/general/QLanguageSelect.vue +86 -0
  71. package/src/ui/general/QStyledCard.vue +1 -1
  72. package/src/ui/general/QSubmitButton.vue +6 -1
  73. package/src/ui/general/ResourcePage.vue +121 -0
  74. package/src/ui/general/ResponsiveDialog.vue +94 -0
  75. package/src/ui/general/index.ts +3 -0
  76. package/src/ui/icons/README.md +2 -0
  77. package/src/virtualModules.ts +48 -5
  78. package/src/vite-plugin.ts +26 -6
  79. package/vite.config.ts +30 -30
  80. package/dist/nl.b1ad9de9.js +0 -134
  81. package/dist/types/ui/index.d.ts +0 -1
  82. package/src/ui/index.ts +0 -1
  83. /package/dist/{nl.7787ff31.js → nl-022c8c63.js} +0 -0
  84. /package/dist/types/ui/icons/{icons.d.ts → labels.d.ts} +0 -0
  85. /package/src/ui/icons/{icons.ts → labels.ts} +0 -0
@@ -0,0 +1,86 @@
1
+ <template>
2
+ <q-select
3
+ v-bind="attrs"
4
+ :options="languageOptions"
5
+ :model-value="modelValue"
6
+ emit-value
7
+ map-options
8
+ >
9
+ <template #selected>
10
+ <en-us v-if="modelValue === 'en-US'" />
11
+ <nl v-if="modelValue === 'nl'" />
12
+ </template>
13
+ <template #option="scope">
14
+ <q-item v-if="scope.opt.value === 'en-US'" v-bind="scope.itemProps">
15
+ <q-item-section avatar>
16
+ <en-us ref="enUsRef" />
17
+ </q-item-section>
18
+ <q-item-section>
19
+ <q-item-label>
20
+ {{ enUsLanguage }}
21
+ </q-item-label>
22
+ </q-item-section>
23
+ </q-item>
24
+ <q-item v-if="scope.opt.value === 'nl'" v-bind="scope.itemProps">
25
+ <q-item-section avatar>
26
+ <nl ref="nlRef" />
27
+ </q-item-section>
28
+ <q-item-section>
29
+ <q-item-label>
30
+ {{ nlLanguage }}
31
+ </q-item-label>
32
+ </q-item-section>
33
+ </q-item>
34
+ </template>
35
+ </q-select>
36
+ </template>
37
+
38
+ <script setup lang="ts">
39
+ import { ref, useAttrs, computed, toRefs, watch } from 'vue'
40
+ import { useQuasar, QSelect, QuasarLanguage } from 'quasar'
41
+ import { nl, enUs } from '../flags/index.js'
42
+
43
+ export interface Props {
44
+ modelValue: string
45
+ languageImports: Record<string, () => Promise<QuasarLanguage>>
46
+ }
47
+ const props = defineProps<Props>()
48
+ const $q = useQuasar()
49
+ const { modelValue } = toRefs(props)
50
+ const attrs = useAttrs()
51
+
52
+ // const langList = import.meta.glob('../../../node_modules/quasar/lang/*.mjs')
53
+
54
+ const nlRef = ref<typeof nl>()
55
+ const nlCountry = computed(() => nlRef.value?.variables.country)
56
+ const nlLanguage = computed(() => nlRef.value?.variables.language)
57
+
58
+ const enUsRef = ref<typeof enUs>()
59
+ const enUsCountry = computed(() => enUsRef.value?.variables.country)
60
+ const enUsLanguage = computed(() => enUsRef.value?.variables.language)
61
+
62
+ const languageOptions = [
63
+ {
64
+ label: enUsLanguage.value,
65
+ value: 'en-US'
66
+ },
67
+ {
68
+ label: nlLanguage.value,
69
+ value: 'nl'
70
+ }
71
+ ]
72
+
73
+ watch(modelValue, (langIso: string) => {
74
+ try {
75
+ props.languageImports[langIso]().then(
76
+ // langList[`../../../node_modules/quasar/lang/${langIso}.mjs`]().then(
77
+ (lang) => {
78
+ // @ts-ignore
79
+ $q.lang.set(lang.default)
80
+ }
81
+ )
82
+ } catch (e) {
83
+ console.error(e)
84
+ }
85
+ })
86
+ </script>
@@ -73,5 +73,5 @@ defineExpose({
73
73
  <style lang="sass" scoped>
74
74
  .card
75
75
  width: 100%
76
- max-width: 400px
76
+ max-width: 300px
77
77
  </style>
@@ -2,7 +2,7 @@
2
2
  <q-btn
3
3
  v-bind="attrs"
4
4
  :label="isNextButton ? lang.next : lang.submit"
5
- color="primary"
5
+ :color="color"
6
6
  :loading="loading || loadingInternal"
7
7
  type="submit"
8
8
  @click="submit"
@@ -24,6 +24,7 @@ export interface Props {
24
24
  loading?: boolean
25
25
  useForm?: boolean
26
26
  isNextButton?: boolean
27
+ color?: string
27
28
  }
28
29
  const props = defineProps({
29
30
  loading: {
@@ -35,6 +36,10 @@ const props = defineProps({
35
36
  },
36
37
  isNextButton: {
37
38
  type: Boolean
39
+ },
40
+ color: {
41
+ type: String,
42
+ default: 'primary'
38
43
  }
39
44
  })
40
45
  const attrs = useAttrs()
@@ -0,0 +1,121 @@
1
+ <template>
2
+ <q-page class="q-ma-md">
3
+ <div style="margin-top: 80px">
4
+ <slot name="default" />
5
+ </div>
6
+ <q-page-sticky expand position="top">
7
+ <q-toolbar
8
+ class="shadow-2"
9
+ :class="{ 'bg-dark': $q.dark.isActive, 'bg-white': !$q.dark.isActive }"
10
+ >
11
+ <q-btn
12
+ v-if="type === 'create'"
13
+ :disable="disabled"
14
+ flat
15
+ style="margin-bottom: -50px; z-index: 5"
16
+ round
17
+ size="lg"
18
+ dense
19
+ icon="add"
20
+ class="q-mr-sm bg-primary text-white"
21
+ @click="create"
22
+ />
23
+ <q-btn
24
+ v-else
25
+ :disable="disabled"
26
+ flat
27
+ style="margin-bottom: -50px; z-index: 5"
28
+ round
29
+ size="lg"
30
+ dense
31
+ icon="edit"
32
+ class="q-mr-sm bg-primary text-white"
33
+ @click="update"
34
+ />
35
+ <q-toolbar-title shrink>
36
+ <slot name="header" />
37
+ </q-toolbar-title>
38
+ <q-space />
39
+ </q-toolbar>
40
+ </q-page-sticky>
41
+ </q-page>
42
+ </template>
43
+
44
+ <script lang="ts">
45
+ export default {
46
+ name: 'ResourcePage'
47
+ }
48
+ </script>
49
+
50
+ <script setup lang="ts">
51
+ import { ref, toRefs, watch } from 'vue'
52
+ import { useQuasar } from 'quasar'
53
+ import { useLang, loadLang } from './lang'
54
+
55
+ export interface Props {
56
+ type?: 'create' | 'update'
57
+ disabled?: boolean
58
+ }
59
+ // const props = defineProps<Props>()
60
+ const props = withDefaults(defineProps<Props>(), {
61
+ type: 'create',
62
+ disabled: false
63
+ })
64
+
65
+ // const attrs = useAttrs();
66
+ const emit = defineEmits<{
67
+ (
68
+ e: 'create',
69
+ {
70
+ data,
71
+ done
72
+ }: {
73
+ data?: any
74
+ done: (success?: boolean) => void
75
+ }
76
+ ): void
77
+ (
78
+ e: 'update',
79
+ {
80
+ data,
81
+ done
82
+ }: {
83
+ data?: any
84
+ done: (success?: boolean) => void
85
+ }
86
+ ): void
87
+ }>()
88
+ const $q = useQuasar()
89
+ const lang = useLang()
90
+ if (lang.value.isoName !== $q.lang.isoName) loadLang($q.lang.isoName)
91
+ watch($q.lang, (val) => {
92
+ loadLang($q.lang.isoName)
93
+ })
94
+
95
+ const { disabled } = toRefs(props)
96
+
97
+ const done = () => ''
98
+ const create = (evt: unknown) =>
99
+ disabled.value
100
+ ? () => {
101
+ //
102
+ }
103
+ : emit('create', { done })
104
+ const update = (evt: unknown) =>
105
+ disabled.value
106
+ ? () => {
107
+ //
108
+ }
109
+ : emit('update', { done })
110
+
111
+ const variables = ref({
112
+ // header: lang.value.some.nested.prop
113
+ })
114
+ const functions = ref({
115
+ // submit
116
+ })
117
+ defineExpose({
118
+ variables,
119
+ functions
120
+ })
121
+ </script>
@@ -0,0 +1,94 @@
1
+ <template>
2
+ <q-dialog ref="dialogRef" :maximized="$q.screen.lt.md">
3
+ <q-layout
4
+ view="LHh lpR fff"
5
+ container
6
+ :class="{ 'bg-dark': $q.dark.isActive, 'bg-white': !$q.dark.isActive }"
7
+ style="min-width: 85vw"
8
+ >
9
+ <q-header class="bg-primary">
10
+ <q-toolbar>
11
+ <q-btn icon="close" flat round dense @click="close" />
12
+ <q-toolbar-title>
13
+ <slot name="title" />
14
+ </q-toolbar-title>
15
+ <q-submit-button
16
+ v-if="!display"
17
+ color="accent"
18
+ @submit="submit"
19
+ ></q-submit-button>
20
+ </q-toolbar>
21
+ </q-header>
22
+
23
+ <q-page-container style="padding-bottom: -50px">
24
+ <q-page class="q-pa-md q-pb-xl">
25
+ <slot></slot>
26
+ </q-page>
27
+ </q-page-container>
28
+ </q-layout>
29
+ </q-dialog>
30
+ </template>
31
+
32
+ <script lang="ts">
33
+ export default {
34
+ name: 'ResponsiveDialog'
35
+ }
36
+ </script>
37
+
38
+ <script setup lang="ts">
39
+ import { ref, watch } from 'vue'
40
+ import { QDialog, useQuasar } from 'quasar'
41
+ import { useLang, loadLang } from './lang'
42
+ import QSubmitButton from './QSubmitButton.vue'
43
+
44
+ export interface Props {
45
+ display?: boolean
46
+ }
47
+ const props = defineProps<Props>()
48
+ // const attrs = useAttrs();
49
+ const modelValue = ref(false)
50
+ const emit = defineEmits<{
51
+ (
52
+ e: 'submit',
53
+ {
54
+ done
55
+ }: {
56
+ done: (success?: boolean) => void
57
+ }
58
+ ): void
59
+ }>()
60
+ const $q = useQuasar()
61
+ const lang = useLang()
62
+ if (lang.value.isoName !== $q.lang.isoName) loadLang($q.lang.isoName)
63
+ watch($q.lang, (val) => {
64
+ loadLang($q.lang.isoName)
65
+ })
66
+
67
+ const submit: InstanceType<typeof QSubmitButton>['$props']['onSubmit'] = (
68
+ evt
69
+ ) => {
70
+ emit('submit', {
71
+ done: (success = true) => {
72
+ evt.done()
73
+ if (success) dialogRef.value?.hide()
74
+ }
75
+ })
76
+ }
77
+ const dialogRef = ref<QDialog>()
78
+ const open = () => dialogRef.value?.show()
79
+ const close = () => dialogRef.value?.hide()
80
+ const toggle = () => dialogRef.value?.toggle()
81
+
82
+ const variables = ref({
83
+ // header: lang.value.some.nested.prop
84
+ })
85
+ const functions = ref({
86
+ open,
87
+ close,
88
+ toggle
89
+ })
90
+ defineExpose({
91
+ variables,
92
+ functions
93
+ })
94
+ </script>
@@ -1,2 +1,5 @@
1
1
  export { default as QSubmitButton } from './QSubmitButton.vue'
2
2
  export { default as QStyledCard } from './QStyledCard.vue'
3
+ export { default as ResponsiveDialog } from './ResponsiveDialog.vue'
4
+ export { default as ResourcePage } from './ResourcePage.vue'
5
+ export { default as QLanguageSelect } from './QLanguageSelect.vue'
@@ -1,3 +1,5 @@
1
+ # Socials
2
+
1
3
  # Credits
2
4
 
3
5
  Thanks to [SuperTinyIcons](https://github.com/edent/SuperTinyIcons) for providing the SVG icons.
@@ -1,6 +1,6 @@
1
1
  export const FlagIcon = (locale: string) => `
2
2
  import { computed, ref, watch, h } from 'vue'
3
- import { QuasarLanguageCodes, useQuasar, QIcon } from 'quasar'
3
+ import { useQuasar, QIcon } from 'quasar'
4
4
  import { useLang, loadLang } from '${
5
5
  new URL(`../src/ui/flags/lang`, import.meta.url).pathname
6
6
  }'
@@ -20,6 +20,7 @@ export const FlagIcon = (locale: string) => `
20
20
  () => lang.value.countries['${locale}']
21
21
  )
22
22
  // @ts-ignore
23
+ // const language = computed(() => lang.value.languages['${locale}'])
23
24
  const language = computed(() => lang.value.languages['${locale}'])
24
25
  const variables = ref({
25
26
  country,
@@ -42,18 +43,18 @@ export const FlagIcon = (locale: string) => `
42
43
 
43
44
  export const Icon = (icon: string) => `
44
45
  import { computed, ref, watch, h } from 'vue'
45
- import { QuasarLanguageCodes, useQuasar, QIcon } from 'quasar'
46
+ import { useQuasar, QIcon } from 'quasar'
46
47
  import icon from '${
47
48
  new URL(`../src/ui/icons/assets/${icon}.svg`, import.meta.url).pathname
48
49
  }'
49
- import icons from '${
50
- new URL(`../src/ui/icons/icons.ts`, import.meta.url).pathname
50
+ import labels from '${
51
+ new URL(`../src/ui/icons/labels.ts`, import.meta.url).pathname
51
52
  }'
52
53
  export default {
53
54
  setup(props, context) {
54
55
  const $q = useQuasar()
55
56
 
56
- const variables = ref(icons['${icon}'])
57
+ const variables = ref(labels['${icon}'])
57
58
 
58
59
  const functions = ref({
59
60
  // submit
@@ -68,3 +69,45 @@ export const Icon = (icon: string) => `
68
69
  return () => h(QIcon, { name: \`img:\${icon}\` })
69
70
  }}
70
71
  `
72
+
73
+ export const FormItem = (field: string) => `
74
+ import { ref, watch, useAttrs, h } from 'vue'
75
+ import { QItem, QItemLabel, QItemSection, useQuasar } from 'quasar'
76
+ import { useLang, loadLang } from '${
77
+ new URL(`../src/ui/form/lang/index.ts`, import.meta.url).pathname
78
+ }'
79
+
80
+ export default {
81
+ setup(props, context) {
82
+ const $q = useQuasar()
83
+ const attrs = useAttrs()
84
+
85
+ const lang = useLang()
86
+
87
+ if (lang.value.isoName !== $q.lang.isoName) loadLang($q.lang.isoName)
88
+ watch($q.lang, (val) => {
89
+ loadLang($q.lang.isoName)
90
+ })
91
+
92
+ const variables = ref({})
93
+
94
+ const functions = ref({
95
+ // submit
96
+ })
97
+
98
+ context.expose({
99
+ variables,
100
+ functions
101
+ })
102
+
103
+ // return the render function
104
+ return () =>
105
+ h(QItem, { attrs }, [
106
+ h(QItemSection, {}, [
107
+ h(QItemLabel, { overline: true }, 'field'),
108
+ h(QItemLabel, {}, 'field')
109
+ ])
110
+ ])
111
+ }
112
+ }
113
+ `
@@ -1,5 +1,6 @@
1
1
  import type { Plugin } from 'vite'
2
2
  import { promises } from 'fs'
3
+ import { Icon, FlagIcon } from './virtualModules.js'
3
4
  const { readFile } = promises
4
5
 
5
6
  export default async function ({
@@ -25,20 +26,39 @@ export default async function ({
25
26
 
26
27
  return {
27
28
  name: `${name}-plugin`,
29
+ enforce: 'pre',
30
+ resolveId: (id) => {
31
+ if (id.includes('.flag')) return id
32
+ else if (id.includes('.icon')) return id
33
+ },
34
+ load: (id) => {
35
+ if (id.includes('.flag')) {
36
+ const locale = id.slice(0, -5)
37
+ const flag = FlagIcon(locale)
38
+ return flag
39
+ } else if (id.includes('.icon')) {
40
+ const iconId = id.slice(0, -5)
41
+ const icon = Icon(iconId)
42
+ return icon
43
+ }
44
+ },
28
45
  config(config, { mode }) {
29
46
  if (mode === 'development' || buildFromSrc) {
30
47
  const alias = Object.entries(exports)
48
+ .filter(([key, val]) => {
49
+ return val.src
50
+ })
31
51
  .map(([key, val]) => {
32
52
  return {
33
- find: name + key.slice(1),
53
+ find: new RegExp(
54
+ `^${
55
+ name.replace(/[.*+?^${}()|[\]\\]/g, '\\$&') + key.slice(1)
56
+ }$`
57
+ ),
58
+ // name: name + key.slice(1),
34
59
  replacement: new URL('.' + val.src, import.meta.url).pathname
35
60
  }
36
61
  })
37
- .sort(
38
- (a, b) =>
39
- (b.find.match(/\//g) || []).length -
40
- (a.find.match(/\//g) || []).length
41
- )
42
62
 
43
63
  return {
44
64
  resolve: {
package/vite.config.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { defineConfig } from 'vite'
1
+ import { defineConfig, Plugin } from 'vite'
2
2
  import vue from '@vitejs/plugin-vue'
3
3
  import Components from 'unplugin-vue-components/vite'
4
4
  import { QuasarResolver } from 'unplugin-vue-components/resolvers'
@@ -74,34 +74,30 @@ import { FlagIcon, Icon } from './src/virtualModules.js'
74
74
  // }}
75
75
  // `
76
76
 
77
+ export const moduleTransformPlugin: Plugin = {
78
+ name: 'module-tranform-plugin',
79
+ enforce: 'pre',
80
+ resolveId: (id) => {
81
+ if (id.includes('.flag')) return id
82
+ else if (id.includes('.icon')) return id
83
+ },
84
+ load: (id) => {
85
+ if (id.includes('.flag')) {
86
+ const locale = id.slice(0, -5)
87
+ console.log(locale)
88
+ const flag = FlagIcon(locale)
89
+ return flag
90
+ } else if (id.includes('.icon')) {
91
+ const iconId = id.slice(0, -5)
92
+ const icon = Icon(iconId)
93
+ return icon
94
+ }
95
+ }
96
+ }
97
+
77
98
  export default defineConfig(async ({ command, mode }) => ({
78
99
  plugins: [
79
- {
80
- name: 'module-tranform-plugin',
81
- enforce: 'pre',
82
- resolveId: (id) => {
83
- if (id.includes('.flag')) return id
84
- else if (id.includes('.icon')) return id
85
- },
86
- load: (id) => {
87
- if (id.includes('.flag')) {
88
- const locale = id.slice(0, -5)
89
- const flag = FlagIcon(locale)
90
- return flag
91
- } else if (id.includes('.icon')) {
92
- const iconId = id.slice(0, -5)
93
- const icon = Icon(iconId)
94
- return icon
95
- }
96
- }
97
- // resolveId: (source) => {
98
- // if (source.includes('FlagIcon.vue')) {
99
- // const split = source.split('FlagIcon.vue')
100
- // split[0].slice(2)
101
- // return { id: './FlagIcon.vue' }
102
- // }
103
- // }
104
- },
100
+ moduleTransformPlugin,
105
101
  Components({
106
102
  resolvers: [QuasarResolver()]
107
103
  }),
@@ -111,7 +107,9 @@ export default defineConfig(async ({ command, mode }) => ({
111
107
  // minify: false,
112
108
  lib: {
113
109
  // UMD not supported for code-splitting builds
114
- fileName: 'ui',
110
+ fileName: (format, entryName) => {
111
+ return entryName + '.js'
112
+ },
115
113
  formats: ['es'],
116
114
  entry: './src/ui/index.ts'
117
115
  },
@@ -125,10 +123,12 @@ export default defineConfig(async ({ command, mode }) => ({
125
123
  ).pathname,
126
124
  general: new URL('./src/ui/general/index.ts', import.meta.url).pathname,
127
125
  flags: new URL('./src/ui/flags/index.ts', import.meta.url).pathname,
128
- icons: new URL('./src/ui/icons/index.ts', import.meta.url).pathname
126
+ icons: new URL('./src/ui/icons/index.ts', import.meta.url).pathname,
127
+ form: new URL('./src/ui/form/index.ts', import.meta.url).pathname
129
128
  },
130
129
  output: {
131
- entryFileNames: '[name].js'
130
+ // entryFileNames: '[name].js',
131
+ // assetFileNames: '[name].[ext]'
132
132
  },
133
133
  external: ['vue', 'vue-router', 'quasar']
134
134
  }