create-nuxt-base 0.1.19 → 0.1.21
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 +9 -0
- package/README.md +1 -1
- package/index.js +22 -29
- package/nuxt-base-template/formkit-theme.js +137 -0
- package/nuxt-base-template/formkit.config.js +35 -0
- package/nuxt-base-template/nuxt.config.ts +34 -3
- package/nuxt-base-template/package-lock.json +21304 -0
- package/nuxt-base-template/package.json +37 -38
- package/nuxt-base-template/src/app.vue +8 -0
- package/nuxt-base-template/src/assets/css/tailwind.css +37 -2
- package/nuxt-base-template/src/components/ModalShare.vue +67 -0
- package/nuxt-base-template/src/components/SocialMediaBubble.vue +16 -0
- package/nuxt-base-template/src/components/base/BaseAccordion.vue +52 -0
- package/nuxt-base-template/src/components/base/BaseButton.vue +106 -0
- package/nuxt-base-template/src/components/base/BaseContainer.vue +5 -0
- package/nuxt-base-template/src/components/base/BaseInfinityList.vue +34 -0
- package/nuxt-base-template/src/components/base/BaseModalContainer.vue +7 -0
- package/nuxt-base-template/src/components/base/BaseNotification.vue +81 -0
- package/nuxt-base-template/src/components/base/BaseNotificationContainer.vue +34 -0
- package/nuxt-base-template/src/components/base/BaseProgressbar.vue +66 -0
- package/nuxt-base-template/src/components/base/BaseToggle.vue +20 -0
- package/nuxt-base-template/src/components/transition/TransitionFade.vue +24 -0
- package/nuxt-base-template/src/components/transition/TransitionFadeScale.vue +24 -0
- package/nuxt-base-template/src/components/transition/TransitionSlide.vue +14 -0
- package/nuxt-base-template/src/components/transition/TransitionSlideBottom.vue +14 -0
- package/nuxt-base-template/src/components/transition/TransitionSlideRevert.vue +14 -0
- package/nuxt-base-template/src/composables/use-auth-fetch.ts +19 -0
- package/nuxt-base-template/src/composables/use-file.ts +21 -0
- package/nuxt-base-template/src/composables/use-form-helper.ts +100 -0
- package/nuxt-base-template/src/composables/use-helper.ts +52 -0
- package/nuxt-base-template/src/composables/use-modal.ts +84 -0
- package/nuxt-base-template/src/composables/use-notification.ts +29 -0
- package/nuxt-base-template/src/composables/use-share.ts +22 -0
- package/nuxt-base-template/src/error.vue +53 -0
- package/nuxt-base-template/src/forms/inputs/InputCheckbox.vue +29 -0
- package/nuxt-base-template/src/forms/inputs/InputFreeTags.vue +98 -0
- package/nuxt-base-template/src/forms/inputs/InputImage.vue +65 -0
- package/nuxt-base-template/src/forms/inputs/InputTags.vue +112 -0
- package/nuxt-base-template/src/forms/inputs/InputToggle.vue +18 -0
- package/nuxt-base-template/src/forms/plugins/asterisk-plugin.ts +29 -0
- package/nuxt-base-template/src/forms/plugins/scroll-error-plugin.ts +36 -0
- package/nuxt-base-template/src/forms/plugins/value-changes-plugin.ts +13 -0
- package/nuxt-base-template/src/middleware/admin.global.ts +9 -0
- package/nuxt-base-template/src/middleware/auth.global.ts +5 -7
- package/nuxt-base-template/src/plugins/4.auth.server.ts +70 -0
- package/nuxt-base-template/src/tests/init.test.ts +12 -0
- package/nuxt-base-template/tailwind.config.js +42 -3
- package/nuxt-base-template/tsconfig.json +4 -1
- package/package.json +1 -1
- package/nuxt-base-template/cypress.config.ts +0 -54
- package/nuxt-base-template/plugins/index.js +0 -5
- package/nuxt-base-template/src/components/.gitkeep +0 -0
- package/nuxt-base-template/src/components/base/.gitkeep +0 -0
- package/nuxt-base-template/src/composables/.gitkeep +0 -0
- package/nuxt-base-template/src/forms/.gitkeep +0 -0
- package/nuxt-base-template/src/pages/.gitkeep +0 -0
- package/nuxt-base-template/src/tests/.gitkeep +0 -0
- package/nuxt-base-template/src/tests/hello-world.spec.ts +0 -11
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [0.1.21](https://github.com/lenneTech/nuxt-base-starter/compare/v0.1.20...v0.1.21) (2023-10-19)
|
|
6
|
+
|
|
7
|
+
### [0.1.20](https://github.com/lenneTech/nuxt-base-starter/compare/v0.1.19...v0.1.20) (2023-07-03)
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
### Features
|
|
11
|
+
|
|
12
|
+
* Add package-lock and remove auto-start ([500a7ee](https://github.com/lenneTech/nuxt-base-starter/commit/500a7eeca81de331929d314e7dfebeb19fc0b0c4))
|
|
13
|
+
|
|
5
14
|
### [0.1.19](https://github.com/lenneTech/nuxt-base-starter/compare/v0.1.18...v0.1.19) (2023-07-02)
|
|
6
15
|
|
|
7
16
|
|
package/README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Nuxt Starter
|
|
2
|
-
This is a starter template to create a Nuxt 3 development environment including Tailwind, Pinia, VueUse, Nuxt Base, Eslint, Cypress with Cucumber, Unit Tests
|
|
2
|
+
This is a starter template to create a Nuxt 3 development environment including Tailwind, Pinia, VueUse, Nuxt Base, Eslint, Cypress with Cucumber, Unit Tests.
|
|
3
3
|
|
|
4
4
|
Just run the following command to create your Nuxt environment:
|
|
5
5
|
|
package/index.js
CHANGED
|
@@ -22,11 +22,11 @@ async function create() {
|
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
const projectName = process.argv[2];
|
|
25
|
+
const autoStart = process.argv[3] === 'auto-start';
|
|
25
26
|
|
|
26
27
|
if (!projectName) {
|
|
27
28
|
console.error("Please provide a valid project name.");
|
|
28
29
|
process.exit(-1);
|
|
29
|
-
return;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
const currentDir = process.cwd();
|
|
@@ -58,36 +58,29 @@ async function create() {
|
|
|
58
58
|
const npmInstall = spawn("npm", ["install"], { stdio: "inherit" });
|
|
59
59
|
await waitForSpawn(npmInstall);
|
|
60
60
|
|
|
61
|
-
|
|
62
|
-
"npx",
|
|
63
|
-
"husky",
|
|
64
|
-
"add",
|
|
65
|
-
".husky/pre-commit",
|
|
66
|
-
'"npm run lint"',
|
|
67
|
-
]);
|
|
68
|
-
await waitForSpawn(preCommitHook);
|
|
69
|
-
|
|
70
|
-
const gitAdd = childProcess.exec("git add .husky/pre-commit");
|
|
71
|
-
waitForChildProcess(gitAdd);
|
|
61
|
+
console.log("Success! Your new project is ready. 🎉");
|
|
72
62
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
63
|
+
if (autoStart) {
|
|
64
|
+
console.log("Building Project ...");
|
|
65
|
+
const npmRunBuild = spawn("npm", ["run", "build"], { stdio: "inherit" });
|
|
66
|
+
await waitForSpawn(npmRunBuild)
|
|
67
|
+
.then(() => console.log("✅ Project was successfully built"))
|
|
68
|
+
.catch(() => console.log("❌ Error while building the project"));
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
console.log(`Created ${projectName} at ${projectDir} 💾`);
|
|
72
|
+
console.log(`Launching ${projectName} in: 3 💥`);
|
|
73
|
+
await waitForMS(1000);
|
|
74
|
+
console.log(`Launching ${projectName} in: 2 🔥`);
|
|
75
|
+
await waitForMS(1000);
|
|
76
|
+
console.log(`Launching ${projectName} in: 1 🧨`);
|
|
77
|
+
await waitForMS(1000);
|
|
78
|
+
console.log(`Launching ${projectName} ... 🚀`);
|
|
79
|
+
await waitForMS(1000);
|
|
80
|
+
const npmRunDev = spawn("npm", ["run", "start"], { stdio: "inherit" });
|
|
81
|
+
await waitForSpawn(npmRunDev);
|
|
82
|
+
}
|
|
78
83
|
|
|
79
|
-
console.log("Success! Your new project is ready. 🎉");
|
|
80
|
-
console.log(`Created ${projectName} at ${projectDir} 💾`);
|
|
81
|
-
console.log(`Launching ${projectName} in: 3 💥`);
|
|
82
|
-
await waitForMS(1000);
|
|
83
|
-
console.log(`Launching ${projectName} in: 2 🔥`);
|
|
84
|
-
await waitForMS(1000);
|
|
85
|
-
console.log(`Launching ${projectName} in: 1 🧨`);
|
|
86
|
-
await waitForMS(1000);
|
|
87
|
-
console.log(`Launching ${projectName} ... 🚀`);
|
|
88
|
-
await waitForMS(1000);
|
|
89
|
-
const npmRunDev = spawn("npm", ["run", "dev"], { stdio: "inherit" });
|
|
90
|
-
await waitForSpawn(npmRunDev);
|
|
91
84
|
}
|
|
92
85
|
|
|
93
86
|
function waitForSpawn(spawn) {
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
global: {
|
|
3
|
+
fieldset: 'max-w-md border border-gray-400 rounded px-2 pb-1',
|
|
4
|
+
help: 'text-xs text-gray-500 mt-1',
|
|
5
|
+
inner: 'formkit-disabled:bg-gray-200 formkit-disabled:dark:bg-gray-200 formkit-disabled:cursor-not-allowed formkit-disabled:pointer-events-none rounded-[25px] bg-white formkit-invalid:ring-red',
|
|
6
|
+
input: 'appearance-none bg-transparent focus:outline-none focus:ring-0 focus:shadow-none dark:text-white',
|
|
7
|
+
label: 'block mb-1 text-sm text-gray-600 dark:text-white font-semibold text-left',
|
|
8
|
+
legend: 'font-bold text-sm',
|
|
9
|
+
loaderIcon: 'inline-flex items-center w-4 text-gray-600 animate-spin',
|
|
10
|
+
message: 'text-red-500 mb-1 text-xs',
|
|
11
|
+
messages: 'list-none p-0 mt-1 mb-0 text-left',
|
|
12
|
+
outer: 'mb-4 formkit-disabled:opacity-50',
|
|
13
|
+
prefixIcon: 'w-10 flex self-stretch grow-0 shrink-0 rounded-tl rounded-bl border-r border-gray-400 bg-white bg-gradient-to-b from-transparent to-gray-200 [&>svg]:w-full [&>svg]:max-w-[1em] [&>svg]:max-h-[1em] [&>svg]:m-auto',
|
|
14
|
+
suffixIcon: 'w-7 pr-3 flex self-stretch grow-0 shrink-0 [&>svg]:w-full [&>svg]:max-w-[1em] [&>svg]:max-h-[1em] [&>svg]:m-auto'
|
|
15
|
+
},
|
|
16
|
+
// Family styles apply to all inputs that share a common family
|
|
17
|
+
'family:box': {
|
|
18
|
+
decorator: 'block relative h-3 w-3 mr-2 rounded-full bg-white ring-1 ring-gray-600 formkit-invalid:ring-red peer-checked:ring-primary-500 text-transparent peer-checked:bg-primary-500',
|
|
19
|
+
decoratorIcon: 'flex p-[3px] w-full h-full absolute top-1/2 left-1/2 -translate-y-1/2 -translate-x-1/2',
|
|
20
|
+
help: 'mb-2 mt-1.5',
|
|
21
|
+
input: 'absolute w-0 h-0 overflow-hidden opacity-0 pointer-events-none peer',
|
|
22
|
+
label: '$reset text-sm text-gray-700 mt-1 select-none ps-1',
|
|
23
|
+
wrapper: 'flex items-start mb-1',
|
|
24
|
+
inner: '!bg-transparent mt-2 mx-auto',
|
|
25
|
+
},
|
|
26
|
+
'family:button': {
|
|
27
|
+
inner: 'bg-none',
|
|
28
|
+
input: '$reset inline-flex items-center justify-center bg-primary-400 hover:bg-primary-500 transition-all duration-200 text-white dark:text-gray-100 text-base font-semibold py-2 px-6 rounded-[25px] focus-visible:outline-2 focus-visible:outline-primary-600 focus-visible:outline-offset-2 formkit-disabled:bg-gray-400 formkit-loading:before:w-4 formkit-loading:before:h-4 formkit-loading:before:mr-2 formkit-loading:before:border formkit-loading:before:border-2 formkit-loading:before:border-r-transparent formkit-loading:before:rounded-[25px] formkit-loading:before:border-white formkit-loading:before:animate-spin min-w-[200px] py-2 px-3 text-base',
|
|
29
|
+
wrapper: 'mb-1',
|
|
30
|
+
prefixIcon: '$reset block w-4 -ml-2 mr-2 stretch',
|
|
31
|
+
suffixIcon: '$reset block w-4 ml-2 stretch',
|
|
32
|
+
},
|
|
33
|
+
'family:dropdown': {
|
|
34
|
+
dropdownWrapper: 'my-2 w-full drop-shadow-lg rounded [&::-webkit-scrollbar]:hidden',
|
|
35
|
+
emptyMessageInner: 'flex items-center justify-center text-sm p-2 text-center w-full text-gray-500 [&>span]:mr-3 [&>span]:ml-0',
|
|
36
|
+
inner: 'max-w-md relative flex ring-1 formkit-invalid:ring-red ring-gray-400 focus-within:ring-primary-500 focus-within:ring-2 rounded mb-1 formkit-disabled:focus-within:ring-gray-400 formkit-disabled:focus-within:ring-1 [&>span:first-child]:focus-within:text-primary-500',
|
|
37
|
+
input: 'w-full px-3 py-2',
|
|
38
|
+
listbox: 'bg-white drop-shadow-lg rounded overflow-hidden',
|
|
39
|
+
listboxButton: 'flex w-12 self-stretch justify-center mx-auto',
|
|
40
|
+
listitem: 'pl-7 relative hover:bg-gray-300 data-[is-active="true"]:bg-gray-300 data-[is-active="true"]:aria-selected:bg-primary-600 aria-selected:bg-primary-600 aria-selected:text-white',
|
|
41
|
+
loaderIcon: 'ml-auto',
|
|
42
|
+
loadMoreInner: 'flex items-center justify-center text-sm p-2 text-center w-full text-primary-500 formkit-loading:text-gray-500 cursor-pointer [&>span]:mr-3 [&>span]:ml-0',
|
|
43
|
+
option: 'p-2.5',
|
|
44
|
+
optionLoading: 'text-gray-500',
|
|
45
|
+
placeholder: 'p-2.5 text-gray-300',
|
|
46
|
+
selector: 'flex w-full justify-between items-center [&u]',
|
|
47
|
+
selectedIcon: 'block absolute top-1/2 left-2 w-3 -translate-y-1/2',
|
|
48
|
+
selectIcon: 'flex box-content w-4 px-2 self-stretch grow-0 shrink-0 dark:text-white',
|
|
49
|
+
},
|
|
50
|
+
'family:text': {
|
|
51
|
+
inner: 'flex items-center ring-1 ring-gray-400 formkit-invalid:ring-red focus-within:ring-primary-400 focus-within:ring-2 [&>label:first-child]:focus-within:text-primary-500 rounded mb-1',
|
|
52
|
+
input: 'w-full px-3 py-2 border-none text-base text-gray-700 placeholder-gray-400',
|
|
53
|
+
},
|
|
54
|
+
tags: {
|
|
55
|
+
tag: 'bg-primary text-white rounded-full px-3 flex items-center',
|
|
56
|
+
tagIcon: 'ms-2 text-lg cursor-pointer',
|
|
57
|
+
dropdown: 'bg-white ring-2 ring-primary-400 rounded-b-[25px] overflow-hidden',
|
|
58
|
+
dropdownItem: 'text-base font-normal py-2 px-3 hover:bg-gray-100 hover:text-primary w-full text-start dark:bg-gray-100 dark:text-white dark:hover:text-primary',
|
|
59
|
+
noItemsFound: 'text-base font-normal py-2 px-3 w-full text-start',
|
|
60
|
+
inputWrapper: 'formkit-disabled:bg-gray-200 formkit-disabled:cursor-not-allowed formkit-disabled:pointer-events-none rounded-[25px] bg-white flex items-center ring-1 ring-gray-400 formkit-invalid:ring-red focus-within:ring-primary-400 focus-within:ring-2 [&>label:first-child]:focus-within:text-primary-500 focus-within:rounded-b-none mt-2 transition-all duration-200',
|
|
61
|
+
input: 'w-full px-3 py-2 border-none text-base text-gray-700 placeholder-gray-400',
|
|
62
|
+
selectIcon: 'dark:text-white'
|
|
63
|
+
},
|
|
64
|
+
freeTags: {
|
|
65
|
+
tag: 'border border-primary formkit-invalid:border-red rounded-full px-3 flex items-center text-gray-600',
|
|
66
|
+
tagIcon: 'ms-2 text-lg cursor-pointer text-gray-600',
|
|
67
|
+
inputWrapper: 'formkit-disabled:bg-gray-200 formkit-disabled:cursor-not-allowed formkit-disabled:pointer-events-none rounded-[25px] bg-white flex items-center ring-1 ring-gray-400 formkit-invalid:ring-red focus-within:ring-primary-400 focus-within:ring-2 [&>label:first-child]:focus-within:text-primary-500 mt-2 transition-all duration-200',
|
|
68
|
+
input: 'w-full px-3 py-2 border-none text-base text-gray-700 placeholder-gray-400',
|
|
69
|
+
inputIcon: 'i-bi-plus me-2 text-lg text-gray-600',
|
|
70
|
+
button: 'bg-primary-500 hover:bg-primary-400 text-primary-50 min-w-[200px] py-2 px-3 text-base rounded-full mt-3 disabled:bg-gray-200 disabled:cursor-not-allowed disabled:text-gray-400',
|
|
71
|
+
suggestionsHeadline: 'text-sm text-gray-600 font-semibold mt-5 mb-3',
|
|
72
|
+
suggestionsTag: 'border border-primary rounded-full px-3 flex items-center text-gray-600',
|
|
73
|
+
suggestionsIcon: 'i-bi-plus text-lg text-gray-600 ms-2 cursor-pointer',
|
|
74
|
+
selectIcon: 'dark:text-white'
|
|
75
|
+
},
|
|
76
|
+
image: {
|
|
77
|
+
placeholder: 'dark:text-white',
|
|
78
|
+
inner: 'block shadow-none w-full',
|
|
79
|
+
uploader: 'relative p-4 text-center w-full h-full flex items-center justify-center',
|
|
80
|
+
input: 'absolute top-0 left-0 right-0 bottom-0 opacity-0 cursor-pointer',
|
|
81
|
+
fileList: 'p-0',
|
|
82
|
+
fileItem: 'rounded-[20px] flex items-center h-full',
|
|
83
|
+
fileItemImage: 'w-28 h-full rounded-[20px] object-cover object-center me-4',
|
|
84
|
+
fileItemImageName: 'me-4 dark:text-white',
|
|
85
|
+
fileItemRemove: 'appearance-none bg-none border-none font-bold shadow-none ms-auto cursor-pointer me-4 hover:text-red-500',
|
|
86
|
+
container: 'h-36 border border-dashed formkit-invalid:border-red border-gray-200 rounded-[20px]',
|
|
87
|
+
},
|
|
88
|
+
// Specific styles apply only to a given input type
|
|
89
|
+
color: {
|
|
90
|
+
inner: 'flex max-w-[5.5em] w-full formkit-prefix-icon:max-w-[7.5em] formkit-suffix-icon:formkit-prefix-icon:max-w-[10em]',
|
|
91
|
+
input: '$reset appearance-none w-full cursor-pointer border-none rounded p-0 m-0 bg-transparent [&::-webkit-color-swatch-wrapper]:p-0 [&::-webkit-color-swatch]:border-none',
|
|
92
|
+
suffixIcon: 'min-w-[2.5em] pr-0 pl-0 m-auto'
|
|
93
|
+
},
|
|
94
|
+
file: {
|
|
95
|
+
fileItem: 'flex items-center text-gray-800 mb-1 last:mb-0',
|
|
96
|
+
fileItemIcon: 'w-4 mr-2 shrink-0',
|
|
97
|
+
fileList: 'shrink grow peer px-3 py-2 formkit-multiple:data-[has-multiple="true"]:mb-6',
|
|
98
|
+
fileName: 'break-all grow text-ellipsis',
|
|
99
|
+
fileRemove: 'relative z-[2] ml-auto text-[0px] hover:text-red-500 pl-2 peer-data-[has-multiple=true]:text-sm peer-data-[has-multiple=true]:text-primary-500 peer-data-[has-multiple=true]:ml-3 peer-data-[has-multiple=true]:mb-2 formkit-multiple:bottom-[0.15em] formkit-multiple:pl-0 formkit-multiple:ml-0 formkit-multiple:left-[1em] formkit-multiple:formkit-prefix-icon:left-[3.75em]',
|
|
100
|
+
fileRemoveIcon: 'block text-base w-3 relative z-[2]',
|
|
101
|
+
inner: 'relative cursor-pointer formkit-multiple:[&>button]:absolute',
|
|
102
|
+
input: 'cursor-pointer text-transparent absolute top-0 right-0 left-0 bottom-0 opacity-0 z-[2]',
|
|
103
|
+
noFiles: 'flex w-full items-center px-3 py-2 text-gray-400',
|
|
104
|
+
noFilesIcon: 'w-4 mr-2'
|
|
105
|
+
},
|
|
106
|
+
radio: {
|
|
107
|
+
decorator: '!w-3 !h-3 rounded-full ring-gray-300',
|
|
108
|
+
decoratorIcon: 'w-3 !p-[2px]',
|
|
109
|
+
fieldset: 'border-none !p-0 !m-0 max-w-none !mt-2',
|
|
110
|
+
options: 'flex flex-row gap-5 w-full',
|
|
111
|
+
option: '',
|
|
112
|
+
icon: 'text-md i-bi-eye dark:text-white',
|
|
113
|
+
legend: 'flex items-center',
|
|
114
|
+
label: `text-gray-700 font-normal text-[15px] leading-[140%] !mt-1`,
|
|
115
|
+
wrapper: '!mb-0',
|
|
116
|
+
inner: '',
|
|
117
|
+
},
|
|
118
|
+
search: {
|
|
119
|
+
suffixIcon: 'dark:text-gray-700'
|
|
120
|
+
},
|
|
121
|
+
range: {
|
|
122
|
+
inner: '$reset flex items-center max-w-md',
|
|
123
|
+
input: '$reset w-full mb-1 h-2 p-0 rounded-full',
|
|
124
|
+
prefixIcon: '$reset w-4 mr-1 flex self-stretch grow-0 shrink-0 [&>svg]:max-w-[1em] [&>svg]:max-h-[1em] [&>svg]:m-auto',
|
|
125
|
+
suffixIcon: '$reset w-4 ml-1 flex self-stretch grow-0 shrink-0 [&>svg]:max-w-[1em] [&>svg]:max-h-[1em] [&>svg]:m-auto'
|
|
126
|
+
},
|
|
127
|
+
select: {
|
|
128
|
+
inner: 'flex relative items-center rounded mb-1 ring-1 ring-gray-400 formkit-invalid:ring-red focus-within:ring-primary-500 focus-within:ring-2 [&>span:first-child]:focus-within:text-primary-500',
|
|
129
|
+
input: 'w-full pl-3 pr-8 py-2 border-none text-base text-gray-700 placeholder-gray-300 formkit-multiple:p-0 data-[placeholder="true"]:text-gray-400 formkit-multiple:data-[placeholder="true"]:text-inherit appearance-none bg-none',
|
|
130
|
+
selectIcon: 'flex p-[3px] shrink-0 w-5 mr-2 -ml-[1.5em] h-full pointer-events-none dark:text-text-gray-700',
|
|
131
|
+
option: 'formkit-multiple:p-3 formkit-multiple:text-sm text-gray-700'
|
|
132
|
+
},
|
|
133
|
+
textarea: {
|
|
134
|
+
inner: 'flex rounded mb-1 ring-1 ring-gray-400 formkit-invalid:ring-red focus-within:ring-primary-400 [&>label:first-child]:focus-within:text-primary-500',
|
|
135
|
+
input: 'block w-full h-32 px-3 py-3 border-none text-base text-gray-700 placeholder-gray-400 focus:shadow-outline',
|
|
136
|
+
},
|
|
137
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { de } from '@formkit/i18n';
|
|
2
|
+
import { genesisIcons } from '@formkit/icons';
|
|
3
|
+
import { generateClasses } from '@formkit/themes';
|
|
4
|
+
import formkitTheme from './formkit-theme.js'
|
|
5
|
+
import { addAsteriskPlugin } from '~/forms/plugins/asterisk-plugin';
|
|
6
|
+
import { scrollToErrors } from '~/forms/plugins/scroll-error-plugin';
|
|
7
|
+
import { createInput } from '@formkit/vue';
|
|
8
|
+
|
|
9
|
+
import InputImage from "~/forms/inputs/InputImage.vue";
|
|
10
|
+
import InputTags from "~/forms/inputs/InputTags.vue";
|
|
11
|
+
import InputFreeTags from "~/forms/inputs/InputFreeTags.vue";
|
|
12
|
+
import InputCheckbox from "~/forms/inputs/InputCheckbox.vue";
|
|
13
|
+
import InputToggle from "~/forms/inputs/InputToggle.vue";
|
|
14
|
+
import {valueChangesPlugin} from "~/forms/plugins/value-changes-plugin";
|
|
15
|
+
|
|
16
|
+
export default {
|
|
17
|
+
locales: { de },
|
|
18
|
+
locale: 'de',
|
|
19
|
+
plugins: [addAsteriskPlugin, scrollToErrors, valueChangesPlugin],
|
|
20
|
+
inputs: {
|
|
21
|
+
image: createInput(InputImage),
|
|
22
|
+
tags: createInput(InputTags),
|
|
23
|
+
freeTags: createInput(InputFreeTags),
|
|
24
|
+
perimeter: createInput(InputPerimeter),
|
|
25
|
+
checkbox: createInput(InputCheckbox),
|
|
26
|
+
autocomplete: createInput(InputAutoComplete),
|
|
27
|
+
toggle: createInput(InputToggle),
|
|
28
|
+
},
|
|
29
|
+
icons: {
|
|
30
|
+
...genesisIcons,
|
|
31
|
+
},
|
|
32
|
+
config: {
|
|
33
|
+
classes: generateClasses(formkitTheme),
|
|
34
|
+
},
|
|
35
|
+
};
|
|
@@ -1,17 +1,26 @@
|
|
|
1
1
|
// https://nuxt.com/docs/api/configuration/nuxt-config
|
|
2
2
|
export default defineNuxtConfig({
|
|
3
|
+
ssr: true,
|
|
4
|
+
spaLoadingTemplate: false,
|
|
3
5
|
srcDir: './src',
|
|
4
6
|
modules: [
|
|
5
7
|
'@nuxtjs/tailwindcss',
|
|
6
8
|
'@lenne.tech/nuxt-base',
|
|
7
9
|
'@vueuse/nuxt',
|
|
8
10
|
'@formkit/nuxt',
|
|
11
|
+
'@kevinmarrec/nuxt-pwa',
|
|
12
|
+
'@nuxtjs/google-fonts',
|
|
13
|
+
'@nuxtjs/color-mode',
|
|
9
14
|
],
|
|
15
|
+
experimental: {
|
|
16
|
+
typedPages: true,
|
|
17
|
+
renderJsonPayloads: false,
|
|
18
|
+
},
|
|
10
19
|
nuxtBase: {
|
|
11
20
|
host: 'http://localhost:3000/graphql',
|
|
12
21
|
schema: '../api/schema.gql',
|
|
13
|
-
|
|
14
|
-
|
|
22
|
+
storagePrefix: 'rk',
|
|
23
|
+
generateTypes: process.env['GENERATE_TYPES'] === '1',
|
|
15
24
|
apollo: {
|
|
16
25
|
authType: 'Bearer',
|
|
17
26
|
authHeader: 'Authorization',
|
|
@@ -19,7 +28,29 @@ export default defineNuxtConfig({
|
|
|
19
28
|
proxyCookies: true,
|
|
20
29
|
},
|
|
21
30
|
},
|
|
31
|
+
app: {
|
|
32
|
+
head: {
|
|
33
|
+
title: 'Nuxt Base Starter',
|
|
34
|
+
viewport: 'width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no',
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
devServer: {
|
|
38
|
+
port: 3001,
|
|
39
|
+
},
|
|
40
|
+
colorMode: {
|
|
41
|
+
classSuffix: '',
|
|
42
|
+
},
|
|
43
|
+
// googleFonts: {
|
|
44
|
+
// families: {
|
|
45
|
+
// Montserrat: [400, 600, 800, 900],
|
|
46
|
+
// 'Work Sans': [400, 600, 800, 900],
|
|
47
|
+
// },
|
|
48
|
+
// download: true,
|
|
49
|
+
// base64: true,
|
|
50
|
+
// stylePath: '~/assets/css/fonts.css',
|
|
51
|
+
// },
|
|
22
52
|
imports: {
|
|
23
|
-
dirs: ['./states', './stores', './forms'],
|
|
53
|
+
dirs: ['./states', './stores', './forms', './interfaces', './base', './plugins'],
|
|
24
54
|
},
|
|
55
|
+
telemetry: false,
|
|
25
56
|
});
|