@ederzeel/nuxt-schema-form-nightly 0.1.0-28989865.c565459
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/.github/semantic.yml +15 -0
- package/.github/workflows/ci.yml +79 -0
- package/.github/workflows/release.yml +62 -0
- package/LICENSE.md +9 -0
- package/README.md +11 -0
- package/eslint.config.mjs +73 -0
- package/package.json +66 -0
- package/playground/app.vue +5 -0
- package/playground/assets/schema-custom.json +111 -0
- package/playground/assets/schema-easy.json +16 -0
- package/playground/assets/schema.json +116 -0
- package/playground/components/ColorMode.vue +26 -0
- package/playground/components/CustomInput.vue +7 -0
- package/playground/components/MultiStage.vue +164 -0
- package/playground/components/Stepper.vue +63 -0
- package/playground/nuxt.config.ts +13 -0
- package/playground/package.json +8 -0
- package/playground/pages/index.vue +32 -0
- package/playground/tailwind.config.js +1 -0
- package/playground/tsconfig.json +4 -0
- package/pnpm-workspace.yaml +2 -0
- package/prettier.config.mjs +8 -0
- package/scripts/bump-nightly.ts +25 -0
- package/scripts/release-nightly.sh +24 -0
- package/scripts/release.sh +21 -0
- package/src/defaults.ts +3 -0
- package/src/module.ts +35 -0
- package/src/plugins/app-config.ts +24 -0
- package/src/plugins/components.ts +68 -0
- package/src/plugins/nuxt-environment.ts +40 -0
- package/src/runtime/components/SComponent.vue +57 -0
- package/src/runtime/components/SForm.vue +59 -0
- package/src/runtime/components/SInputField.vue +25 -0
- package/src/runtime/components/SObject.vue +34 -0
- package/src/runtime/components/SSelect.vue +26 -0
- package/src/runtime/components/STextarea.vue +24 -0
- package/src/runtime/components/SToggle.vue +21 -0
- package/src/runtime/types/utils.ts +44 -0
- package/src/unplugin.ts +46 -0
- package/tsconfig.json +9 -0
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
name: ci
|
|
2
|
+
on:
|
|
3
|
+
pull_request: {}
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
test:
|
|
10
|
+
runs-on: ${{ matrix.os }}
|
|
11
|
+
strategy:
|
|
12
|
+
matrix:
|
|
13
|
+
node-version: [18]
|
|
14
|
+
os: [ubuntu-latest]
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v4
|
|
17
|
+
with:
|
|
18
|
+
fetch-depth: 0
|
|
19
|
+
lfs: true
|
|
20
|
+
|
|
21
|
+
- name: Setup pnpm
|
|
22
|
+
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
|
|
23
|
+
|
|
24
|
+
- name: Install dependencies
|
|
25
|
+
run: pnpm install --frozen-lockfile
|
|
26
|
+
|
|
27
|
+
- name: Prepare
|
|
28
|
+
run: pnpm run dev:prepare
|
|
29
|
+
|
|
30
|
+
- name: Lint
|
|
31
|
+
run: pnpm lint
|
|
32
|
+
|
|
33
|
+
# - name: Install Playwright
|
|
34
|
+
# run: pnpm playwright-core install chromium
|
|
35
|
+
|
|
36
|
+
- name: Build
|
|
37
|
+
run: pnpm build
|
|
38
|
+
|
|
39
|
+
- name: Cache dist
|
|
40
|
+
uses: actions/cache@v4
|
|
41
|
+
with:
|
|
42
|
+
path: dist
|
|
43
|
+
key: ${{ matrix.os }}-node-v${{ matrix.node-version }}-${{ github.sha }}
|
|
44
|
+
|
|
45
|
+
# - name: Test
|
|
46
|
+
# run: pnpm test
|
|
47
|
+
|
|
48
|
+
nightly-release:
|
|
49
|
+
needs:
|
|
50
|
+
- test
|
|
51
|
+
runs-on: ${{ matrix.os }}
|
|
52
|
+
strategy:
|
|
53
|
+
matrix:
|
|
54
|
+
node-version: [18]
|
|
55
|
+
os: [ubuntu-latest]
|
|
56
|
+
steps:
|
|
57
|
+
- uses: actions/checkout@v4
|
|
58
|
+
|
|
59
|
+
- name: Setup pnpm
|
|
60
|
+
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # v4.0.0
|
|
61
|
+
|
|
62
|
+
- name: Install dependencies
|
|
63
|
+
run: pnpm install --frozen-lockfile
|
|
64
|
+
|
|
65
|
+
- name: Restore dist cache
|
|
66
|
+
uses: actions/cache@v4
|
|
67
|
+
with:
|
|
68
|
+
path: dist
|
|
69
|
+
key: ${{ matrix.os }}-node-v${{ matrix.node-version }}-${{ github.sha }}
|
|
70
|
+
|
|
71
|
+
- name: Release Nightly
|
|
72
|
+
if: |
|
|
73
|
+
github.event_name == 'push' &&
|
|
74
|
+
!startsWith(github.event.head_commit.message, '[skip-release]') &&
|
|
75
|
+
!startsWith(github.event.head_commit.message, 'chore') &&
|
|
76
|
+
!startsWith(github.event.head_commit.message, 'docs')
|
|
77
|
+
run: ./scripts/release-nightly.sh
|
|
78
|
+
env:
|
|
79
|
+
NPM_TOKEN: ${{secrets.NPM_TOKEN}}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
# trigger by `git tag` push only via `yarn release`
|
|
4
|
+
on:
|
|
5
|
+
push:
|
|
6
|
+
branches-ignore:
|
|
7
|
+
- '**'
|
|
8
|
+
tags:
|
|
9
|
+
- 'v*'
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
release:
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
steps:
|
|
15
|
+
- name: Checkout codes
|
|
16
|
+
uses: actions/checkout@v4
|
|
17
|
+
with:
|
|
18
|
+
fetch-depth: 0
|
|
19
|
+
|
|
20
|
+
- name: Enable corepack
|
|
21
|
+
run: corepack enable
|
|
22
|
+
|
|
23
|
+
- name: Setup node.js
|
|
24
|
+
uses: actions/setup-node@v4
|
|
25
|
+
with:
|
|
26
|
+
node-version: 18
|
|
27
|
+
cache: 'pnpm'
|
|
28
|
+
|
|
29
|
+
- name: Install dependencies
|
|
30
|
+
run: pnpm install --frozen-lockfile
|
|
31
|
+
|
|
32
|
+
- name: Create github releases
|
|
33
|
+
run: |
|
|
34
|
+
npx changelogithub
|
|
35
|
+
env:
|
|
36
|
+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
|
|
37
|
+
|
|
38
|
+
- name: Extract version tag
|
|
39
|
+
if: startsWith( github.ref, 'refs/tags/v' )
|
|
40
|
+
uses: jungwinter/split@v2
|
|
41
|
+
id: split
|
|
42
|
+
with:
|
|
43
|
+
msg: ${{ github.ref }}
|
|
44
|
+
separator: '/'
|
|
45
|
+
|
|
46
|
+
- name: Sync changelog from github releases
|
|
47
|
+
run: |
|
|
48
|
+
pnpm changelog --tag=${{ steps.split.outputs._2 }}
|
|
49
|
+
env:
|
|
50
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
51
|
+
|
|
52
|
+
- name: Commit changelog
|
|
53
|
+
uses: stefanzweifel/git-auto-commit-action@v5
|
|
54
|
+
with:
|
|
55
|
+
branch: master
|
|
56
|
+
file_pattern: 'CHANGELOG.md'
|
|
57
|
+
commit_message: 'chore: generate changelog'
|
|
58
|
+
|
|
59
|
+
- name: Publish package
|
|
60
|
+
run: ./scripts/release.sh
|
|
61
|
+
env:
|
|
62
|
+
NPM_TOKEN: ${{secrets.NPM_TOKEN}}
|
package/LICENSE.md
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Liam Ederzeel
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
|
+
|
|
7
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import globals from 'globals'
|
|
2
|
+
import js from '@eslint/js'
|
|
3
|
+
import ts from 'typescript-eslint'
|
|
4
|
+
import eslintConfigPrettier from 'eslint-config-prettier'
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* @typedef {import("eslint").Linter.FlatConfig[]} FlatConfigs
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
/** @type { FlatConfigs } */
|
|
11
|
+
export default [
|
|
12
|
+
// ignores
|
|
13
|
+
{
|
|
14
|
+
ignores: ['.nuxt', 'dist', 'playground', 'specs', 'test/fixtures', 'coverage', 'src/runtime/templates/**', 'docs']
|
|
15
|
+
},
|
|
16
|
+
|
|
17
|
+
// for global and envrionment
|
|
18
|
+
{
|
|
19
|
+
languageOptions: {
|
|
20
|
+
globals: {
|
|
21
|
+
...globals.node,
|
|
22
|
+
...globals.browser
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
|
|
27
|
+
// eslint built-in
|
|
28
|
+
js.configs.recommended,
|
|
29
|
+
|
|
30
|
+
// typescript-eslint
|
|
31
|
+
...ts.configs.recommendedTypeChecked,
|
|
32
|
+
{
|
|
33
|
+
files: ['**/*.ts', '**/*.tsx', '**/*.cts', '**/*.mts'],
|
|
34
|
+
languageOptions: {
|
|
35
|
+
parser: ts.parser,
|
|
36
|
+
parserOptions: {
|
|
37
|
+
sourceType: 'module',
|
|
38
|
+
project: true,
|
|
39
|
+
tsconfigRootDir: import.meta.dirname
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
rules: {
|
|
43
|
+
'@typescript-eslint/no-unused-vars': [
|
|
44
|
+
'error',
|
|
45
|
+
{
|
|
46
|
+
args: 'all',
|
|
47
|
+
argsIgnorePattern: '^_',
|
|
48
|
+
caughtErrors: 'all',
|
|
49
|
+
caughtErrorsIgnorePattern: '^_',
|
|
50
|
+
destructuredArrayIgnorePattern: '^_',
|
|
51
|
+
varsIgnorePattern: '^_',
|
|
52
|
+
ignoreRestSiblings: true
|
|
53
|
+
}
|
|
54
|
+
]
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
files: ['**/*.js', '**/*.cjs', '**/*.mjs'],
|
|
59
|
+
...ts.configs.disableTypeChecked
|
|
60
|
+
},
|
|
61
|
+
|
|
62
|
+
// prettier
|
|
63
|
+
eslintConfigPrettier,
|
|
64
|
+
|
|
65
|
+
// override rules
|
|
66
|
+
{
|
|
67
|
+
rules: {
|
|
68
|
+
'@typescript-eslint/no-explicit-any': 'off',
|
|
69
|
+
'@typescript-eslint/ban-ts-comment': 'off',
|
|
70
|
+
'@typescript-eslint/unbound-method': 'off'
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
]
|
package/package.json
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@ederzeel/nuxt-schema-form-nightly",
|
|
3
|
+
"version": "0.1.0-28989865.c565459",
|
|
4
|
+
"description": "A runtime form generator for nuxt",
|
|
5
|
+
"main": "./dist/module.cjs",
|
|
6
|
+
"types": "./dist/module.d.ts",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"build": "nuxt-module-build prepare && nuxt-module-build build .",
|
|
9
|
+
"dev": "nuxi dev playground",
|
|
10
|
+
"dev:build": "nuxi build playground",
|
|
11
|
+
"dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground",
|
|
12
|
+
"test": "vitest test",
|
|
13
|
+
"lint": "eslint .",
|
|
14
|
+
"release": "bumpp --commit \"release: v%s\" --push --tag"
|
|
15
|
+
},
|
|
16
|
+
"repository": {
|
|
17
|
+
"type": "git",
|
|
18
|
+
"url": "git+https://github.com/LiamEderzeel/nuxt-schema-form.git"
|
|
19
|
+
},
|
|
20
|
+
"keywords": [
|
|
21
|
+
"nuxt",
|
|
22
|
+
"jsonSchema",
|
|
23
|
+
"form"
|
|
24
|
+
],
|
|
25
|
+
"author": "Liam Ederzeel",
|
|
26
|
+
"license": "MIT",
|
|
27
|
+
"bugs": {
|
|
28
|
+
"url": "https://github.com/LiamEderzeel/nuxt-schema-form/issues"
|
|
29
|
+
},
|
|
30
|
+
"homepage": "https://github.com/LiamEderzeel/nuxt-schema-form#readme",
|
|
31
|
+
"packageManager": "pnpm@9.15.4+sha512.b2dc20e2fc72b3e18848459b37359a32064663e5627a51e4c74b2c29dd8e8e0491483c3abb40789cfd578bf362fb6ba8261b05f0387d76792ed6e23ea3b1b6a0",
|
|
32
|
+
"devDependencies": {
|
|
33
|
+
"@eslint/js": "^9.19.0",
|
|
34
|
+
"@nuxt/eslint-config": "^1.0.0",
|
|
35
|
+
"@nuxt/kit": "^3.15.4",
|
|
36
|
+
"@nuxt/module-builder": "^0.8.4",
|
|
37
|
+
"@types/eslint": "^9.6.1",
|
|
38
|
+
"eslint": "^9.19.0",
|
|
39
|
+
"eslint-config-prettier": "^10.0.1",
|
|
40
|
+
"globals": "^15.14.0",
|
|
41
|
+
"jiti": "^2.4.2",
|
|
42
|
+
"magic-string": "^0.30.17",
|
|
43
|
+
"mlly": "^1.7.4",
|
|
44
|
+
"nuxt": "^3.15.4",
|
|
45
|
+
"nuxt-component-meta": "^0.10.0",
|
|
46
|
+
"prettier": "^3.4.2",
|
|
47
|
+
"typescript": "~5.6.3",
|
|
48
|
+
"typescript-eslint": "^8.22.0"
|
|
49
|
+
},
|
|
50
|
+
"dependencies": {
|
|
51
|
+
"json-schema-library": "10.0.0-rc7",
|
|
52
|
+
"json-schema-yup-transformer": "^1.6.12",
|
|
53
|
+
"pathe": "^2.0.2",
|
|
54
|
+
"tinyglobby": "^0.2.10",
|
|
55
|
+
"unplugin": "^2.1.2",
|
|
56
|
+
"unplugin-auto-import": "^19.0.0",
|
|
57
|
+
"unplugin-vue-components": "^28.0.0",
|
|
58
|
+
"yup": "^1.6.1"
|
|
59
|
+
},
|
|
60
|
+
"resolutions": {
|
|
61
|
+
"@ederzeel/nuxt-schema-form": "workspace:*"
|
|
62
|
+
},
|
|
63
|
+
"publishConfig": {
|
|
64
|
+
"access": "public"
|
|
65
|
+
}
|
|
66
|
+
}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "Questioneer",
|
|
3
|
+
"description": "Questioneer for tennis camp 'name'",
|
|
4
|
+
"renderer": "MultiStage",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": [
|
|
7
|
+
"personal",
|
|
8
|
+
"clothing",
|
|
9
|
+
"dietary",
|
|
10
|
+
"firstname"
|
|
11
|
+
],
|
|
12
|
+
"properties": {
|
|
13
|
+
"personal": {
|
|
14
|
+
"title": "Personal",
|
|
15
|
+
"type": "object",
|
|
16
|
+
"required": [
|
|
17
|
+
"firstname",
|
|
18
|
+
"lastname",
|
|
19
|
+
"email"
|
|
20
|
+
],
|
|
21
|
+
"properties": {
|
|
22
|
+
"firstname": {
|
|
23
|
+
"title": "Firstname",
|
|
24
|
+
"description": "First name pertisipant",
|
|
25
|
+
"type": "string",
|
|
26
|
+
"default": ""
|
|
27
|
+
},
|
|
28
|
+
"lastname": {
|
|
29
|
+
"title": "Lastname",
|
|
30
|
+
"description": "Last name pertisipant",
|
|
31
|
+
"type": "string",
|
|
32
|
+
"default": ""
|
|
33
|
+
},
|
|
34
|
+
"email": {
|
|
35
|
+
"title": "Email",
|
|
36
|
+
"description": "Last name pertisipant",
|
|
37
|
+
"type": "string",
|
|
38
|
+
"format": "email",
|
|
39
|
+
"default": ""
|
|
40
|
+
},
|
|
41
|
+
"custmoinput": {
|
|
42
|
+
"title": "Custom input",
|
|
43
|
+
"description": "First name pertisipant",
|
|
44
|
+
"type": "string",
|
|
45
|
+
"default": "",
|
|
46
|
+
"renderer": "CustomInput"
|
|
47
|
+
},
|
|
48
|
+
"textarea": {
|
|
49
|
+
"title": "Firstname",
|
|
50
|
+
"description": "First name pertisipant",
|
|
51
|
+
"type": "string",
|
|
52
|
+
"default": "",
|
|
53
|
+
"renderer": "STextarea"
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
"clothing": {
|
|
58
|
+
"title": "Clothing",
|
|
59
|
+
"type": "object",
|
|
60
|
+
"required": [
|
|
61
|
+
"tshirtSize"
|
|
62
|
+
],
|
|
63
|
+
"properties": {
|
|
64
|
+
"tshirtSize": {
|
|
65
|
+
"title": "T-shirt size",
|
|
66
|
+
"renderer": "SSelect",
|
|
67
|
+
"description": "T-shirt size",
|
|
68
|
+
"enum": [
|
|
69
|
+
"s",
|
|
70
|
+
"m",
|
|
71
|
+
"l",
|
|
72
|
+
"xl"
|
|
73
|
+
],
|
|
74
|
+
"type": "string"
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
"dietary": {
|
|
79
|
+
"title": "Dietary",
|
|
80
|
+
"type": "object",
|
|
81
|
+
"required": [
|
|
82
|
+
"vegetarian",
|
|
83
|
+
"vegan",
|
|
84
|
+
"halal",
|
|
85
|
+
"nutAllergy"
|
|
86
|
+
],
|
|
87
|
+
"properties": {
|
|
88
|
+
"vegetarian": {
|
|
89
|
+
"title": "Vegetarian",
|
|
90
|
+
"description": "Vegetarian dietary restrictions",
|
|
91
|
+
"type": "boolean"
|
|
92
|
+
},
|
|
93
|
+
"vegan": {
|
|
94
|
+
"title": "Vegan",
|
|
95
|
+
"description": "Vegan dietary restrictions",
|
|
96
|
+
"type": "boolean"
|
|
97
|
+
},
|
|
98
|
+
"halal": {
|
|
99
|
+
"title": "Halal",
|
|
100
|
+
"description": "Halal dietary restrictions",
|
|
101
|
+
"type": "boolean"
|
|
102
|
+
},
|
|
103
|
+
"nutAllergy": {
|
|
104
|
+
"title": "Nut Allergy",
|
|
105
|
+
"description": "Nut allergy",
|
|
106
|
+
"type": "boolean"
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "Questioneer",
|
|
3
|
+
"description": "Questioneer for tennis camp 'name'",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"required": [
|
|
6
|
+
"firstname"
|
|
7
|
+
],
|
|
8
|
+
"properties": {
|
|
9
|
+
"firstname": {
|
|
10
|
+
"title": "Firstname",
|
|
11
|
+
"description": "First name pertisipant",
|
|
12
|
+
"type": "string",
|
|
13
|
+
"default": ""
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
{
|
|
2
|
+
"title": "Questioneer",
|
|
3
|
+
"description": "Questioneer for tennis camp 'name'",
|
|
4
|
+
"renderer": "MultiStage",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": [
|
|
7
|
+
"personal",
|
|
8
|
+
"permissions",
|
|
9
|
+
"clothing",
|
|
10
|
+
"dietary",
|
|
11
|
+
"firstname"
|
|
12
|
+
],
|
|
13
|
+
"properties": {
|
|
14
|
+
"personal": {
|
|
15
|
+
"icon": "i-lucide-user",
|
|
16
|
+
"title": "Personal",
|
|
17
|
+
"type": "object",
|
|
18
|
+
"required": [
|
|
19
|
+
"firstname",
|
|
20
|
+
"lastname",
|
|
21
|
+
"email"
|
|
22
|
+
],
|
|
23
|
+
"properties": {
|
|
24
|
+
"firstname": {
|
|
25
|
+
"title": "Firstname",
|
|
26
|
+
"description": "First name pertisipant",
|
|
27
|
+
"type": "string",
|
|
28
|
+
"default": ""
|
|
29
|
+
},
|
|
30
|
+
"lastname": {
|
|
31
|
+
"title": "Lastname",
|
|
32
|
+
"description": "Last name pertisipant",
|
|
33
|
+
"type": "string",
|
|
34
|
+
"default": ""
|
|
35
|
+
},
|
|
36
|
+
"email": {
|
|
37
|
+
"title": "Email",
|
|
38
|
+
"description": "Last name pertisipant",
|
|
39
|
+
"type": "string",
|
|
40
|
+
"format": "email",
|
|
41
|
+
"default": ""
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"permissions": {
|
|
46
|
+
"icon": "i-lucide-lock",
|
|
47
|
+
"title": "Terms",
|
|
48
|
+
"type": "object",
|
|
49
|
+
"required": [
|
|
50
|
+
"agree"
|
|
51
|
+
],
|
|
52
|
+
"properties": {
|
|
53
|
+
"agree": {
|
|
54
|
+
"title": "Agree",
|
|
55
|
+
"description": "Accept all term",
|
|
56
|
+
"type": "boolean"
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
"clothing": {
|
|
61
|
+
"icon": "i-lucide-shirt",
|
|
62
|
+
"title": "Clothing",
|
|
63
|
+
"type": "object",
|
|
64
|
+
"required": [
|
|
65
|
+
"tshirtSize"
|
|
66
|
+
],
|
|
67
|
+
"properties": {
|
|
68
|
+
"tshirtSize": {
|
|
69
|
+
"title": "T-shirt size",
|
|
70
|
+
"renderer": "SSelect",
|
|
71
|
+
"description": "T-shirt size",
|
|
72
|
+
"enum": [
|
|
73
|
+
"s",
|
|
74
|
+
"m",
|
|
75
|
+
"l",
|
|
76
|
+
"xl"
|
|
77
|
+
],
|
|
78
|
+
"type": "string"
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
"dietary": {
|
|
83
|
+
"icon": "i-lucide-apple",
|
|
84
|
+
"title": "Dietary",
|
|
85
|
+
"type": "object",
|
|
86
|
+
"required": [
|
|
87
|
+
"vegetarian",
|
|
88
|
+
"vegan",
|
|
89
|
+
"halal",
|
|
90
|
+
"nutAllergy"
|
|
91
|
+
],
|
|
92
|
+
"properties": {
|
|
93
|
+
"vegetarian": {
|
|
94
|
+
"title": "Vegetarian",
|
|
95
|
+
"description": "Vegetarian dietary restrictions",
|
|
96
|
+
"type": "boolean"
|
|
97
|
+
},
|
|
98
|
+
"vegan": {
|
|
99
|
+
"title": "Vegan",
|
|
100
|
+
"description": "Vegan dietary restrictions",
|
|
101
|
+
"type": "boolean"
|
|
102
|
+
},
|
|
103
|
+
"halal": {
|
|
104
|
+
"title": "Halal",
|
|
105
|
+
"description": "Halal dietary restrictions",
|
|
106
|
+
"type": "boolean"
|
|
107
|
+
},
|
|
108
|
+
"nutAllergy": {
|
|
109
|
+
"title": "Nut Allergy",
|
|
110
|
+
"description": "Nut allergy",
|
|
111
|
+
"type": "boolean"
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
const colorMode = useColorMode()
|
|
3
|
+
const isDark = computed({
|
|
4
|
+
get() {
|
|
5
|
+
return colorMode.value === 'dark'
|
|
6
|
+
},
|
|
7
|
+
set() {
|
|
8
|
+
colorMode.preference = colorMode.value === 'dark' ? 'light' : 'dark'
|
|
9
|
+
}
|
|
10
|
+
})
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<template>
|
|
14
|
+
<ClientOnly>
|
|
15
|
+
<UButton
|
|
16
|
+
:icon="isDark ? 'i-heroicons-moon-20-solid' : 'i-heroicons-sun-20-solid'"
|
|
17
|
+
color="gray"
|
|
18
|
+
variant="ghost"
|
|
19
|
+
aria-label="Theme"
|
|
20
|
+
@click="isDark = !isDark"
|
|
21
|
+
/>
|
|
22
|
+
<template #fallback>
|
|
23
|
+
<div class="w-8 h-8" />
|
|
24
|
+
</template>
|
|
25
|
+
</ClientOnly>
|
|
26
|
+
</template>
|