manolis-ui 1.0.12 → 1.1.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.
- package/README.md +43 -10
- package/dist/module.d.mts +4 -8
- package/dist/module.d.ts +4 -8
- package/dist/module.json +4 -1
- package/dist/module.mjs +116 -32
- package/dist/runtime/components/actions/theme-controller.vue +3 -5
- package/dist/runtime/components/data-display/avatar.vue +1 -1
- package/dist/runtime/components/data-display/card.vue +40 -34
- package/dist/runtime/components/data-input/advancedSearch.vue +39 -0
- package/dist/runtime/components/data-input/datetimePicker.vue +371 -0
- package/dist/runtime/components/navigation/navigation-bar.vue +4 -6
- package/dist/runtime/plugin.d.ts +1 -1
- package/dist/runtime/plugin.js +2 -2
- package/dist/runtime/ui.css +0 -0
- package/dist/types.d.mts +1 -1
- package/dist/types.d.ts +1 -1
- package/package.json +28 -43
- package/.vscode/settings.json +0 -3
- package/CHANGELOG.md +0 -1
- package/CHANGELOG_NEW.md +0 -1
- package/LICENSE +0 -201
- package/dist/runtime/assets/css/tailwind.css +0 -1
package/README.md
CHANGED
|
@@ -35,6 +35,39 @@ Install the module to your Nuxt application with one command:
|
|
|
35
35
|
npx nuxi module add manolis-ui
|
|
36
36
|
```
|
|
37
37
|
|
|
38
|
+
|
|
39
|
+
Or install it as a npm package:
|
|
40
|
+
```bash
|
|
41
|
+
npm install manolis-ui daisyui@latest tailwindcss postcss autoprefixer lucide-vue-next
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
add manolis ui and tailwind to your project:
|
|
45
|
+
|
|
46
|
+
```typescript
|
|
47
|
+
export default defineNuxtConfig({
|
|
48
|
+
modules: ['manolis-ui', '@nuxtjs/tailwindcss'],
|
|
49
|
+
manolisUI: {
|
|
50
|
+
prefix: "",
|
|
51
|
+
global: false,
|
|
52
|
+
disableGlobalStyles: false,
|
|
53
|
+
},
|
|
54
|
+
})
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Create a tailwind.config.ts
|
|
58
|
+
|
|
59
|
+
```typescript
|
|
60
|
+
import { darkMode } from '#tailwind-config'
|
|
61
|
+
import type { Config } from 'tailwindcss'
|
|
62
|
+
|
|
63
|
+
export default <Partial<Config>>{
|
|
64
|
+
// or further daisy ui settings see https://daisyui.com/docs/config/
|
|
65
|
+
daisyui: {
|
|
66
|
+
themes: ["light", "dark", "cupcake"] //you can add custom themes aswell
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
```
|
|
70
|
+
|
|
38
71
|
That's it! You can now use Manolis UI in your Nuxt app ✨
|
|
39
72
|
|
|
40
73
|
|
|
@@ -45,29 +78,29 @@ That's it! You can now use Manolis UI in your Nuxt app ✨
|
|
|
45
78
|
|
|
46
79
|
```bash
|
|
47
80
|
# Install dependencies
|
|
48
|
-
|
|
81
|
+
pnpm install
|
|
49
82
|
|
|
50
83
|
# Generate type stubs
|
|
51
|
-
|
|
84
|
+
pnpm dev:prepare
|
|
52
85
|
|
|
53
86
|
# Develop with the playground
|
|
54
|
-
|
|
87
|
+
pnpm dev
|
|
55
88
|
|
|
56
89
|
# Build the playground
|
|
57
|
-
|
|
90
|
+
pnpm dev:build
|
|
58
91
|
|
|
59
92
|
# Run ESLint
|
|
60
|
-
|
|
93
|
+
pnpm lint
|
|
61
94
|
|
|
62
95
|
# Run Vitest
|
|
63
|
-
|
|
64
|
-
|
|
96
|
+
pnpm test
|
|
97
|
+
pnpm test:watch
|
|
65
98
|
|
|
66
99
|
# Release new version
|
|
67
|
-
|
|
100
|
+
pnpm release
|
|
68
101
|
|
|
69
102
|
# Storybook
|
|
70
|
-
|
|
103
|
+
pnpm storybook
|
|
71
104
|
```
|
|
72
105
|
|
|
73
106
|
</details>
|
|
@@ -84,4 +117,4 @@ That's it! You can now use Manolis UI in your Nuxt app ✨
|
|
|
84
117
|
[license-href]: https://npmjs.com/package/manolis-ui
|
|
85
118
|
|
|
86
119
|
[nuxt-src]: https://img.shields.io/badge/Nuxt-020420?logo=nuxt.js
|
|
87
|
-
[nuxt-href]: https://nuxt.com
|
|
120
|
+
[nuxt-href]: https://nuxt.com
|
package/dist/module.d.mts
CHANGED
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
import * as _nuxt_schema from '@nuxt/schema';
|
|
2
2
|
|
|
3
|
-
interface ThemeOptions {
|
|
4
|
-
name: string;
|
|
5
|
-
}
|
|
6
|
-
interface ModuleOptions {
|
|
7
|
-
css: boolean;
|
|
8
|
-
theme?: ThemeOptions;
|
|
9
|
-
}
|
|
10
3
|
interface ModuleOptions {
|
|
4
|
+
prefix?: string;
|
|
5
|
+
global?: boolean;
|
|
6
|
+
disableGlobalStyles?: boolean;
|
|
11
7
|
}
|
|
12
8
|
declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
|
|
13
9
|
|
|
14
|
-
export { type ModuleOptions,
|
|
10
|
+
export { type ModuleOptions, _default as default };
|
package/dist/module.d.ts
CHANGED
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
import * as _nuxt_schema from '@nuxt/schema';
|
|
2
2
|
|
|
3
|
-
interface ThemeOptions {
|
|
4
|
-
name: string;
|
|
5
|
-
}
|
|
6
|
-
interface ModuleOptions {
|
|
7
|
-
css: boolean;
|
|
8
|
-
theme?: ThemeOptions;
|
|
9
|
-
}
|
|
10
3
|
interface ModuleOptions {
|
|
4
|
+
prefix?: string;
|
|
5
|
+
global?: boolean;
|
|
6
|
+
disableGlobalStyles?: boolean;
|
|
11
7
|
}
|
|
12
8
|
declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
|
|
13
9
|
|
|
14
|
-
export { type ModuleOptions,
|
|
10
|
+
export { type ModuleOptions, _default as default };
|
package/dist/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -1,42 +1,126 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { addTemplate, installModule, useNuxt, createResolver, defineNuxtModule, addPlugin, addComponentsDir, addImportsDir } from '@nuxt/kit';
|
|
2
|
+
import { createRequire } from 'node:module';
|
|
3
|
+
import { join } from 'pathe';
|
|
4
|
+
import { defu } from 'defu';
|
|
2
5
|
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
// -- Unbuild CommonJS Shims --
|
|
9
|
+
import __cjs_url__ from 'url';
|
|
10
|
+
import __cjs_path__ from 'path';
|
|
11
|
+
import __cjs_mod__ from 'module';
|
|
12
|
+
const __filename = __cjs_url__.fileURLToPath(import.meta.url);
|
|
13
|
+
const __dirname = __cjs_path__.dirname(__filename);
|
|
14
|
+
const require = __cjs_mod__.createRequire(import.meta.url);
|
|
15
|
+
const name = "manolis-ui";
|
|
16
|
+
const version = "1.1.0";
|
|
17
|
+
|
|
18
|
+
function installTailwind(moduleOptions, nuxt = useNuxt(), resolve = createResolver(import.meta.url).resolve) {
|
|
19
|
+
const runtimeDir = resolve("./runtime");
|
|
20
|
+
nuxt.hook("tailwindcss:config", function(tailwindConfig) {
|
|
21
|
+
tailwindConfig.theme = tailwindConfig.theme || {};
|
|
22
|
+
tailwindConfig.theme.extend = tailwindConfig.theme.extend || {};
|
|
23
|
+
tailwindConfig.theme.extend.colors = tailwindConfig.theme.extend.colors || {};
|
|
24
|
+
nuxt.options.appConfig.ui = {
|
|
25
|
+
primary: "green",
|
|
26
|
+
gray: "cool",
|
|
27
|
+
strategy: "merge"
|
|
28
|
+
};
|
|
29
|
+
});
|
|
30
|
+
const configTemplate = addTemplate({
|
|
31
|
+
filename: "nuxtui-tailwind.config.cjs",
|
|
32
|
+
write: true,
|
|
33
|
+
getContents: ({ nuxt: nuxt2 }) => `
|
|
34
|
+
const { defaultExtractor: createDefaultExtractor } = require('tailwindcss/lib/lib/defaultExtractor.js')
|
|
35
|
+
|
|
36
|
+
const defaultExtractor = createDefaultExtractor({ tailwindConfig: { separator: ':' } })
|
|
37
|
+
|
|
38
|
+
module.exports = {
|
|
39
|
+
plugins: [
|
|
40
|
+
require('daisyui')
|
|
41
|
+
],
|
|
42
|
+
content: {
|
|
43
|
+
files: [
|
|
44
|
+
${JSON.stringify(resolve(runtimeDir, "components/**/*.{vue,mjs,ts}"))},
|
|
45
|
+
${JSON.stringify(resolve(runtimeDir, "ui.config/**/*.{mjs,js,ts}"))}
|
|
46
|
+
],
|
|
47
|
+
transform: {
|
|
48
|
+
vue: (content) => {
|
|
49
|
+
return content.replaceAll(/(?:\\r\\n|\\r|\\n)/g, ' ')
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
extract: {
|
|
53
|
+
vue: (content) => {
|
|
54
|
+
return defaultExtractor(content)
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
daisyui: {
|
|
59
|
+
themes: ["light", "dark"],
|
|
60
|
+
},
|
|
61
|
+
}
|
|
62
|
+
`
|
|
63
|
+
});
|
|
64
|
+
const { configPath: userTwConfigPath = [], ...twModuleConfig } = nuxt.options.tailwindcss ?? {};
|
|
65
|
+
const twConfigPaths = [
|
|
66
|
+
configTemplate.dst,
|
|
67
|
+
join(nuxt.options.rootDir, "tailwind.config")
|
|
68
|
+
];
|
|
69
|
+
if (typeof userTwConfigPath === "string") {
|
|
70
|
+
twConfigPaths.push(userTwConfigPath);
|
|
71
|
+
} else {
|
|
72
|
+
twConfigPaths.push(...userTwConfigPath);
|
|
73
|
+
}
|
|
74
|
+
return installModule("@nuxtjs/tailwindcss", defu({
|
|
75
|
+
exposeConfig: true,
|
|
76
|
+
config: {
|
|
77
|
+
darkMode: "class"
|
|
78
|
+
},
|
|
79
|
+
configPath: twConfigPaths
|
|
80
|
+
}, twModuleConfig));
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
createRequire(import.meta.url);
|
|
3
84
|
const module = defineNuxtModule({
|
|
4
85
|
meta: {
|
|
5
|
-
name
|
|
6
|
-
|
|
86
|
+
name,
|
|
87
|
+
version,
|
|
88
|
+
configKey: "manolisUI",
|
|
89
|
+
compatibility: {
|
|
90
|
+
nuxt: ">=3.10.0"
|
|
91
|
+
}
|
|
7
92
|
},
|
|
8
|
-
// Default configuration options of the Nuxt module
|
|
9
93
|
defaults: {
|
|
10
|
-
|
|
94
|
+
prefix: "",
|
|
95
|
+
disableGlobalStyles: false
|
|
11
96
|
},
|
|
12
|
-
async setup(
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
maxAge: 60 * 60 * 24 * 365
|
|
37
|
-
// cache assets for 1 year
|
|
97
|
+
async setup(options, nuxt) {
|
|
98
|
+
const { resolve } = createResolver(import.meta.url);
|
|
99
|
+
const runtimeDir = resolve("./runtime");
|
|
100
|
+
nuxt.options.build.transpile.push(runtimeDir);
|
|
101
|
+
nuxt.options.build.transpile.push("nuxt-lucide-icons");
|
|
102
|
+
await installTailwind(options, nuxt, resolve);
|
|
103
|
+
if (!options.disableGlobalStyles) {
|
|
104
|
+
nuxt.options.css.push(resolve(runtimeDir, "ui.css"));
|
|
105
|
+
}
|
|
106
|
+
addPlugin(resolve("./runtime/plugin"));
|
|
107
|
+
const componentDirs = [
|
|
108
|
+
"actions",
|
|
109
|
+
"data-display",
|
|
110
|
+
"data-input",
|
|
111
|
+
"feedback",
|
|
112
|
+
"layout",
|
|
113
|
+
"misc",
|
|
114
|
+
"navigation"
|
|
115
|
+
];
|
|
116
|
+
for (const dir of componentDirs) {
|
|
117
|
+
addComponentsDir({
|
|
118
|
+
path: resolve(runtimeDir, "components", dir),
|
|
119
|
+
prefix: options.prefix,
|
|
120
|
+
global: options.global
|
|
38
121
|
});
|
|
39
|
-
}
|
|
122
|
+
}
|
|
123
|
+
addImportsDir(resolve(runtimeDir, "composables"));
|
|
40
124
|
}
|
|
41
125
|
});
|
|
42
126
|
|
|
@@ -9,7 +9,7 @@ interface Props {
|
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
const props = withDefaults(defineProps<Props>(), {
|
|
12
|
-
theme: '
|
|
12
|
+
theme: 'dark',
|
|
13
13
|
});
|
|
14
14
|
|
|
15
15
|
// Use the composable for localStorage functionality
|
|
@@ -24,9 +24,7 @@ function updateTheme(theme: string) {
|
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
// Apply the theme on mounted (client-side only)
|
|
27
|
-
onMounted(() =>
|
|
28
|
-
updateTheme(themeValue.value);
|
|
29
|
-
});
|
|
27
|
+
onMounted(() => updateTheme(themeValue.value));
|
|
30
28
|
|
|
31
29
|
// Watch themeValue changes and update localStorage
|
|
32
30
|
watch(themeValue, (newValue) => {
|
|
@@ -42,7 +40,7 @@ watch(themeValue, (newValue) => {
|
|
|
42
40
|
class="theme-controller"
|
|
43
41
|
v-model="themeValue"
|
|
44
42
|
:true-value="'light'"
|
|
45
|
-
:false-value="'
|
|
43
|
+
:false-value="'dark'"
|
|
46
44
|
/>
|
|
47
45
|
<!-- Sun icon for light mode -->
|
|
48
46
|
<Sun class="swap-off fill-current"></Sun>
|
|
@@ -2,49 +2,55 @@
|
|
|
2
2
|
import { ref, watch } from 'vue';
|
|
3
3
|
|
|
4
4
|
interface Props {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
imgUrl: string;
|
|
6
|
+
alt?: string;
|
|
7
|
+
title?: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
outlined?: boolean;
|
|
10
|
+
loading: boolean;
|
|
10
11
|
}
|
|
11
|
-
|
|
12
|
-
const props = withDefaults(defineProps<Props>(), {
|
|
13
|
-
imgUrl: "",
|
|
14
|
-
alt: "A beautiful picture that says something about this card",
|
|
15
|
-
title: '',
|
|
16
|
-
outlined: false,
|
|
17
|
-
description: ""
|
|
18
|
-
});
|
|
19
12
|
|
|
20
|
-
|
|
13
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
14
|
+
imgUrl: "",
|
|
15
|
+
alt: "A beautiful picture that says something about this card",
|
|
16
|
+
title: '',
|
|
17
|
+
outlined: false,
|
|
18
|
+
description: "",
|
|
19
|
+
loading: false
|
|
20
|
+
});
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
22
|
+
const outlined = ref<boolean>(props.outlined);
|
|
23
|
+
|
|
24
|
+
watch(
|
|
25
|
+
() => props.outlined,
|
|
26
|
+
(newValue) => {
|
|
27
|
+
outlined.value = newValue;
|
|
28
|
+
}
|
|
29
|
+
);
|
|
28
30
|
</script>
|
|
29
31
|
|
|
30
32
|
|
|
31
33
|
<template>
|
|
32
|
-
|
|
34
|
+
<div class="card card-compact bg-base-100 max-w-80 min-w-64 shadow-xl rounded group h-full"
|
|
35
|
+
:class="outlined ? 'border-4 border-primary' : ''">
|
|
33
36
|
<figure>
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
:alt="alt"
|
|
37
|
-
class="object-cover w-full rounded"
|
|
38
|
-
v-if="imgUrl"
|
|
39
|
-
/>
|
|
37
|
+
<img :src="imgUrl" :alt="alt" class="object-cover w-full rounded" v-if="imgUrl || imgUrl && !loading" />
|
|
38
|
+
<div class="skeleton h-32 w-full" v-if="loading"></div>
|
|
40
39
|
</figure>
|
|
41
|
-
<div class="card-body">
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
40
|
+
<div class="card-body" v-if="!loading">
|
|
41
|
+
<h2 class="card-title text-lg text-left group-hover:text-primary cursor-pointer" v-if="title">{{ title }}</h2>
|
|
42
|
+
<slot name="details"></slot>
|
|
43
|
+
<p class="text-left" v-if="description">{{ description }}</p>
|
|
44
|
+
<div class="card-actions flex-col flex-nowrap">
|
|
45
|
+
<slot name="actions" />
|
|
46
|
+
</div>
|
|
48
47
|
</div>
|
|
48
|
+
<div class="card-body">
|
|
49
|
+
<div class="flex w-52 flex-col gap-4">
|
|
50
|
+
<div class="skeleton h-4 w-28"></div>
|
|
51
|
+
<div class="skeleton h-4 w-full"></div>
|
|
52
|
+
<div class="skeleton h-4 w-full"></div>
|
|
53
|
+
</div>
|
|
49
54
|
</div>
|
|
55
|
+
</div>
|
|
50
56
|
</template>
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { Search } from 'lucide-vue-next';
|
|
3
|
+
import { ref } from 'vue';
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
interface Props {
|
|
7
|
+
categories: Array<string>;
|
|
8
|
+
}
|
|
9
|
+
const props = defineProps<Props>();
|
|
10
|
+
const currentCategory = ref(props.categories[0]);
|
|
11
|
+
|
|
12
|
+
const emit = defineEmits(['category-changed']);
|
|
13
|
+
|
|
14
|
+
function setCurrentCategory(category: string) {
|
|
15
|
+
currentCategory.value = category;
|
|
16
|
+
emit('category-changed', category);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<template>
|
|
22
|
+
<div class="flex gap-4 place-content-center" :class="categories.length > 1 ? 'flex' : 'hidden'">
|
|
23
|
+
<button type="button" v-for="category in categories" :class="[{['font-medium']: category == currentCategory }]" @click="setCurrentCategory(category)">{{ category }}</button>
|
|
24
|
+
</div>
|
|
25
|
+
|
|
26
|
+
<div class="my-8 rounded border-2 border-opacity-25 group/search flex shadow-md hover:shadow-lg transition-all p-2 place-items-center">
|
|
27
|
+
<!-- search fields -->
|
|
28
|
+
<div class="flex-auto flex gap-4">
|
|
29
|
+
<button type="button" class="group/searchitem text-start relative p-1 hover:bg-base-200 rounded after:h-10 after:bg-base-200 after:absolute after:-right-2 after:w-[1px] after:top-0 last-of-type:after:content-none last-of-type:flex-auto first-of-type:flex-auto">
|
|
30
|
+
<p class="text-sm">Wie</p>
|
|
31
|
+
<p class="text-xs opacity-35 group-hover/searchitem:text-base-500">Aantal personen</p>
|
|
32
|
+
</button>
|
|
33
|
+
<!-- <div class="divider divider-horizontal h-10"></div> -->
|
|
34
|
+
|
|
35
|
+
</div>
|
|
36
|
+
<!-- search button -->
|
|
37
|
+
<button title="search" type="submit" class="btn btn-primary btn-square ml-1"><Search :size="24" color="white" /></button>
|
|
38
|
+
</div>
|
|
39
|
+
</template>
|
|
@@ -0,0 +1,371 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="relative inline-block" ref="pickerContainer">
|
|
3
|
+
<div class="flex items-center gap-2 cursor-pointer" @click="togglePopup">
|
|
4
|
+
<slot>
|
|
5
|
+
<input
|
|
6
|
+
type="text"
|
|
7
|
+
class="input input-bordered w-full cursor-pointer"
|
|
8
|
+
:placeholder="placeholder"
|
|
9
|
+
:value="formattedValue"
|
|
10
|
+
readonly
|
|
11
|
+
:id="inputId"
|
|
12
|
+
/>
|
|
13
|
+
<button class="btn btn-ghost">
|
|
14
|
+
📅
|
|
15
|
+
</button>
|
|
16
|
+
</slot>
|
|
17
|
+
</div>
|
|
18
|
+
|
|
19
|
+
<div v-if="showPopup" class="absolute z-50 bg-base-100 shadow-xl rounded-md p-4 mt-2 w-[360px]" :id="popupId">
|
|
20
|
+
<div v-if="showDate" class="flex items-center justify-between mb-4 place-content-center">
|
|
21
|
+
<button class="btn btn-sm btn-primary btn-outline" @click="previousMonth">
|
|
22
|
+
<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
|
23
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 19l-7-7 7-7" />
|
|
24
|
+
</svg>
|
|
25
|
+
</button>
|
|
26
|
+
|
|
27
|
+
<select class="select border-none w-fit" v-model="currentMonth" @change="emitDateTimeChanged">
|
|
28
|
+
<option v-for="(month, index) in months" :key="index" :value="month">{{ month }}</option>
|
|
29
|
+
</select>
|
|
30
|
+
|
|
31
|
+
<select class="select w-24 border-none" v-model="currentYear" @change="emitDateTimeChanged">
|
|
32
|
+
<option v-for="year in years" :key="year" :value="year">{{ year }}</option>
|
|
33
|
+
</select>
|
|
34
|
+
|
|
35
|
+
<button class="btn btn-sm btn-primary btn-outline" @click="nextMonth">
|
|
36
|
+
<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
|
37
|
+
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7" />
|
|
38
|
+
</svg>
|
|
39
|
+
</button>
|
|
40
|
+
</div>
|
|
41
|
+
|
|
42
|
+
<div v-if="showDate" class="grid grid-cols-7 gap-2">
|
|
43
|
+
<div v-for="day in daysOfWeek" :key="day" class="text-center">{{ day }}</div>
|
|
44
|
+
<div v-for="emptyDay in emptyDays" :key="emptyDay" class="text-center"></div>
|
|
45
|
+
<div v-for="day in daysInMonth" :key="day" class="text-center cursor-pointer py-1 rounded-full hover:bg-primary/10"
|
|
46
|
+
:class="{
|
|
47
|
+
'bg-primary text-primary-content': isDateSelected(day),
|
|
48
|
+
'today': isToday(day),
|
|
49
|
+
'range-start': isRangeStart(day),
|
|
50
|
+
'range-end': isRangeEnd(day),
|
|
51
|
+
'in-range': isInDateRange(day),
|
|
52
|
+
}"
|
|
53
|
+
@click="selectDate(day)">
|
|
54
|
+
{{ day.getDate() }}
|
|
55
|
+
</div>
|
|
56
|
+
</div>
|
|
57
|
+
|
|
58
|
+
<div v-if="showTime" class="mt-4">
|
|
59
|
+
<h3 class="text-lg font-bold mb-2">Select Time</h3>
|
|
60
|
+
<div v-if="!props.range">
|
|
61
|
+
<input v-if="isMobile" type="time" class="input input-bordered w-full" v-model="selectedTime" @change="emitDateTimeChanged" />
|
|
62
|
+
<div v-else class="flex gap-4">
|
|
63
|
+
<select class="select select-bordered w-full" v-model="selectedHour" @change="emitDateTimeChanged">
|
|
64
|
+
<option v-for="hour in hours" :key="hour" :value="hour">{{ hour }}</option>
|
|
65
|
+
</select>
|
|
66
|
+
<select class="select select-bordered w-full" v-model="selectedMinute" @change="emitDateTimeChanged">
|
|
67
|
+
<option v-for="minute in minutes" :key="minute" :value="minute">{{ minute }}</option>
|
|
68
|
+
</select>
|
|
69
|
+
<select class="select select-bordered w-full" v-model="selectedPeriod" @change="emitDateTimeChanged">
|
|
70
|
+
<option value="AM">AM</option>
|
|
71
|
+
<option value="PM">PM</option>
|
|
72
|
+
</select>
|
|
73
|
+
</div>
|
|
74
|
+
</div>
|
|
75
|
+
<div v-else class="flex gap-4 flex-col">
|
|
76
|
+
<div>
|
|
77
|
+
<p class="font-bold">Start Time</p>
|
|
78
|
+
<input v-if="isMobile" type="time" class="input input-bordered w-full" v-model="selectedTime.start" @change="emitDateTimeChanged" />
|
|
79
|
+
<div v-else class="flex gap-2">
|
|
80
|
+
<select class="select select-bordered w-full" v-model="selectedHour.start" @change="emitDateTimeChanged">
|
|
81
|
+
<option v-for="hour in hours" :key="hour" :value="hour">{{ hour }}</option>
|
|
82
|
+
</select>
|
|
83
|
+
<select class="select select-bordered w-full" v-model="selectedMinute.start" @change="emitDateTimeChanged">
|
|
84
|
+
<option v-for="minute in minutes" :key="minute" :value="minute">{{ minute }}</option>
|
|
85
|
+
</select>
|
|
86
|
+
<select class="select select-bordered w-full" v-model="selectedPeriod.start" @change="emitDateTimeChanged">
|
|
87
|
+
<option value="AM">AM</option>
|
|
88
|
+
<option value="PM">PM</option>
|
|
89
|
+
</select>
|
|
90
|
+
</div>
|
|
91
|
+
</div>
|
|
92
|
+
<div>
|
|
93
|
+
<p class="font-bold">End Time</p>
|
|
94
|
+
<input v-if="isMobile" type="time" class="input input-bordered w-full" v-model="selectedTime.end" @change="emitDateTimeChanged" />
|
|
95
|
+
<div v-else class="flex gap-2">
|
|
96
|
+
<select class="select select-bordered w-full" v-model="selectedHour.end" @change="emitDateTimeChanged">
|
|
97
|
+
<option v-for="hour in hours" :key="hour" :value="hour">{{ hour }}</option>
|
|
98
|
+
</select>
|
|
99
|
+
<select class="select select-bordered w-full" v-model="selectedMinute.end" @change="emitDateTimeChanged">
|
|
100
|
+
<option v-for="minute in minutes" :key="minute" :value="minute">{{ minute }}</option>
|
|
101
|
+
</select>
|
|
102
|
+
<select class="select select-bordered w-full" v-model="selectedPeriod.end" @change="emitDateTimeChanged">
|
|
103
|
+
<option value="AM">AM</option>
|
|
104
|
+
<option value="PM">PM</option>
|
|
105
|
+
</select>
|
|
106
|
+
</div>
|
|
107
|
+
</div>
|
|
108
|
+
</div>
|
|
109
|
+
</div>
|
|
110
|
+
|
|
111
|
+
<div class="mt-4 flex gap-2">
|
|
112
|
+
<button class="btn btn-secondary w-fit" @click="clearSelection">Clear</button>
|
|
113
|
+
<button class="btn btn-primary btn-wide" @click="closeAndEmit">Close</button>
|
|
114
|
+
</div>
|
|
115
|
+
</div>
|
|
116
|
+
</div>
|
|
117
|
+
</template>
|
|
118
|
+
|
|
119
|
+
<script setup>
|
|
120
|
+
import { ref, computed, onMounted, onUnmounted, watch } from 'vue'
|
|
121
|
+
|
|
122
|
+
// Props
|
|
123
|
+
const props = defineProps({
|
|
124
|
+
mode: {
|
|
125
|
+
type: String,
|
|
126
|
+
default: 'datetime', // 'datetime', 'date', 'time'
|
|
127
|
+
validator: (value) => ['datetime', 'date', 'time'].includes(value),
|
|
128
|
+
},
|
|
129
|
+
range: {
|
|
130
|
+
type: Boolean,
|
|
131
|
+
default: false,
|
|
132
|
+
},
|
|
133
|
+
placeholder: {
|
|
134
|
+
type: String,
|
|
135
|
+
default: 'Select date and time',
|
|
136
|
+
},
|
|
137
|
+
id: {
|
|
138
|
+
type: String,
|
|
139
|
+
default: 'datetimepicker',
|
|
140
|
+
}
|
|
141
|
+
})
|
|
142
|
+
|
|
143
|
+
// Emits
|
|
144
|
+
const emit = defineEmits(['update:datetimeChanged'])
|
|
145
|
+
|
|
146
|
+
// State
|
|
147
|
+
const showPopup = ref(false)
|
|
148
|
+
const selectedDate = ref(props.range ? { start: null, end: null } : null)
|
|
149
|
+
const selectedTime = ref(props.range ? { start: null, end: null } : null)
|
|
150
|
+
const currentMonth = ref(new Date().toLocaleString('default', { month: 'long' }))
|
|
151
|
+
const currentYear = ref(new Date().getFullYear())
|
|
152
|
+
const selectedHour = ref(props.range ? { start: new Date().getHours() % 12 || 12, end: new Date().getHours() % 12 || 12 } : new Date().getHours() % 12 || 12)
|
|
153
|
+
const selectedMinute = ref(props.range ? { start: new Date().getMinutes().toString().padStart(2, '0'), end: new Date().getMinutes().toString().padStart(2, '0') } : new Date().getMinutes().toString().padStart(2, '0'))
|
|
154
|
+
const selectedPeriod = ref(props.range ? { start: new Date().getHours() < 12 ? 'AM' : 'PM', end: new Date().getHours() < 12 ? 'AM' : 'PM' } : new Date().getHours() < 12 ? 'AM' : 'PM')
|
|
155
|
+
|
|
156
|
+
const pickerContainer = ref(null)
|
|
157
|
+
|
|
158
|
+
// Computed properties for IDs
|
|
159
|
+
const inputId = computed(() => `${props.id}-input`);
|
|
160
|
+
const popupId = computed(() => `${props.id}-popup`);
|
|
161
|
+
|
|
162
|
+
// Computed properties
|
|
163
|
+
const showDate = computed(() => props.mode === 'date' || props.mode === 'datetime')
|
|
164
|
+
const showTime = computed(() => props.mode === 'time' || props.mode === 'datetime')
|
|
165
|
+
const currentMonthYear = computed(() => new Date(currentYear.value, monthIndex.value))
|
|
166
|
+
const monthIndex = computed(() => {
|
|
167
|
+
return months.indexOf(currentMonth.value)
|
|
168
|
+
})
|
|
169
|
+
const daysOfWeek = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']
|
|
170
|
+
const firstDay = computed(() => new Date(currentYear.value, monthIndex.value).getDay())
|
|
171
|
+
const daysInMonth = computed(() => {
|
|
172
|
+
return Array.from({ length: new Date(currentYear.value, monthIndex.value + 1, 0).getDate() }, (_, i) => new Date(currentYear.value, monthIndex.value, i + 1))
|
|
173
|
+
})
|
|
174
|
+
const emptyDays = computed(() => Array.from({ length: firstDay.value }, (_, i) => i))
|
|
175
|
+
const hours = Array.from({ length: 12 }, (_, i) => (i + 1).toString().padStart(2, '0'))
|
|
176
|
+
const minutes = Array.from({ length: 60 }, (_, i) => i.toString().padStart(2, '0'))
|
|
177
|
+
const isMobile = computed(() => /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent))
|
|
178
|
+
const months = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]
|
|
179
|
+
const years = computed(() => {
|
|
180
|
+
const currentYear = new Date().getFullYear()
|
|
181
|
+
return Array.from({ length: 100 }, (_, i) => currentYear - 50 + i)
|
|
182
|
+
})
|
|
183
|
+
|
|
184
|
+
const formattedDate = computed(() => {
|
|
185
|
+
if (!showDate.value || !selectedDate.value) return '';
|
|
186
|
+
|
|
187
|
+
if (props.range && selectedDate.value.start && selectedDate.value.end) {
|
|
188
|
+
const startDate = selectedDate.value.start.toLocaleDateString('en-GB');
|
|
189
|
+
const endDate = selectedDate.value.end.toLocaleDateString('en-GB');
|
|
190
|
+
return `${startDate} - ${endDate}`;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
if (!props.range && selectedDate.value) {
|
|
194
|
+
return selectedDate.value.toLocaleDateString('en-GB');
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
return '';
|
|
198
|
+
});
|
|
199
|
+
|
|
200
|
+
const formattedTime = computed(() => {
|
|
201
|
+
if (!showTime.value) return '';
|
|
202
|
+
|
|
203
|
+
if (props.range && selectedTime.value.start && selectedTime.value.end) {
|
|
204
|
+
const formattedStartTime = isMobile.value
|
|
205
|
+
? selectedTime.value.start
|
|
206
|
+
: `${selectedHour.value.start}:${selectedMinute.value.start} ${selectedPeriod.value.start}`;
|
|
207
|
+
const formattedEndTime = isMobile.value
|
|
208
|
+
? selectedTime.value.end
|
|
209
|
+
: `<span class="math-inline">\{selectedHour\.value\.end\}\:</span>{selectedMinute.value.end} ${selectedPeriod.value.end}`;
|
|
210
|
+
return `${formattedStartTime} - ${formattedEndTime}`;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
if (!props.range && selectedTime.value) {
|
|
214
|
+
return isMobile.value
|
|
215
|
+
? selectedTime.value
|
|
216
|
+
: `<span class="math-inline">\{selectedHour\.value\}\:</span>{selectedMinute.value} ${selectedPeriod.value}`;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
return '';
|
|
220
|
+
});
|
|
221
|
+
|
|
222
|
+
const formattedValue = computed(() => {
|
|
223
|
+
const date = formattedDate.value;
|
|
224
|
+
const time = formattedTime.value;
|
|
225
|
+
|
|
226
|
+
if (date && time) return `${date} ${time}`;
|
|
227
|
+
if (date) return date;
|
|
228
|
+
if (time) return time;
|
|
229
|
+
|
|
230
|
+
return '';
|
|
231
|
+
});
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
// Methods
|
|
235
|
+
const togglePopup = () => (showPopup.value = !showPopup.value)
|
|
236
|
+
|
|
237
|
+
const closeAndEmit = () => {
|
|
238
|
+
emitDateTimeChanged();
|
|
239
|
+
closePopup();
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
const closePopup = () => (showPopup.value = false)
|
|
243
|
+
|
|
244
|
+
const clearSelection = () => {
|
|
245
|
+
selectedDate.value = props.range ? { start: null, end: null } : null
|
|
246
|
+
selectedTime.value = props.range ? { start: null, end: null } : null
|
|
247
|
+
emitDateTimeChanged()
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
const selectDate = (date) => {
|
|
251
|
+
if (props.range) {
|
|
252
|
+
if (selectedDate.value.start && selectedDate.value.end) {
|
|
253
|
+
selectedDate.value = { start: date, end: null }
|
|
254
|
+
} else if (!selectedDate.value.start) {
|
|
255
|
+
selectedDate.value.start = date
|
|
256
|
+
} else {
|
|
257
|
+
selectedDate.value.end = date
|
|
258
|
+
}
|
|
259
|
+
} else {
|
|
260
|
+
selectedDate.value = date
|
|
261
|
+
}
|
|
262
|
+
emitDateTimeChanged()
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
const isDateSelected = (date) => {
|
|
266
|
+
if (props.range) {
|
|
267
|
+
return (selectedDate.value.start && date.getTime() === selectedDate.value.start.getTime()) || (selectedDate.value.end && date.getTime() === selectedDate.value.end.getTime())
|
|
268
|
+
} else {
|
|
269
|
+
return selectedDate.value && date.getTime() === selectedDate.value.getTime()
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
const isToday = (date) => {
|
|
274
|
+
const today = new Date()
|
|
275
|
+
return date.getDate() === today.getDate() &&
|
|
276
|
+
date.getMonth() === today.getMonth() &&
|
|
277
|
+
date.getFullYear() === today.getFullYear()
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
const isRangeStart = (date) => {
|
|
281
|
+
return props.range && selectedDate.value.start && date.getTime() === selectedDate.value.start.getTime()
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
const isRangeEnd = (date) => {
|
|
285
|
+
return props.range && selectedDate.value.end && date.getTime() === selectedDate.value.end.getTime()
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
const isInDateRange = (date) => {
|
|
289
|
+
if (props.range && selectedDate.value.start && selectedDate.value.end) {
|
|
290
|
+
const start = selectedDate.value.start.getTime()
|
|
291
|
+
const end = selectedDate.value.end.getTime()
|
|
292
|
+
const current = date.getTime()
|
|
293
|
+
return current > start && current < end
|
|
294
|
+
}
|
|
295
|
+
return false
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
|
|
299
|
+
// Month navigation
|
|
300
|
+
const previousMonth = () => {
|
|
301
|
+
let newMonth = monthIndex.value - 1
|
|
302
|
+
if (newMonth < 0) {
|
|
303
|
+
newMonth = 11
|
|
304
|
+
currentYear.value--
|
|
305
|
+
}
|
|
306
|
+
currentMonth.value = months[newMonth]
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
const nextMonth = () => {
|
|
310
|
+
let newMonth = monthIndex.value + 1
|
|
311
|
+
if (newMonth > 11) {
|
|
312
|
+
newMonth = 0
|
|
313
|
+
currentYear.value++
|
|
314
|
+
}
|
|
315
|
+
currentMonth.value = months[newMonth]
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
// Close on outside click
|
|
319
|
+
const handleClickOutside = (event) => {
|
|
320
|
+
if (pickerContainer.value && !pickerContainer.value.contains(event.target) && showPopup.value == true) {
|
|
321
|
+
closeAndEmit()
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
const emitDateTimeChanged = () => {
|
|
326
|
+
let dateStr = '';
|
|
327
|
+
let timeStr = '';
|
|
328
|
+
|
|
329
|
+
// Handle date formatting
|
|
330
|
+
if (selectedDate.value) {
|
|
331
|
+
if (props.range) {
|
|
332
|
+
const start = selectedDate.value.start?.toLocaleDateString('en-GB') || '';
|
|
333
|
+
const end = selectedDate.value.end?.toLocaleDateString('en-GB') || '';
|
|
334
|
+
dateStr = `${start} - ${end}`;
|
|
335
|
+
} else {
|
|
336
|
+
dateStr = selectedDate.value.toLocaleDateString('en-GB');
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
// Handle time formatting
|
|
341
|
+
if (showTime.value) {
|
|
342
|
+
if (props.range) {
|
|
343
|
+
const start = selectedTime.value.start || `${selectedHour.value.start}:${selectedMinute.value.start} ${selectedPeriod.value.start}`;
|
|
344
|
+
const end = selectedTime.value.end || `${selectedHour.value.end}:${selectedMinute.value.end} ${selectedPeriod.value.end}`;
|
|
345
|
+
timeStr = `${start} - ${end}`;
|
|
346
|
+
} else {
|
|
347
|
+
timeStr = `${selectedHour.value}:${selectedMinute.value} ${selectedPeriod.value}`;
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
// Combine date and time based on mode
|
|
352
|
+
let result = '';
|
|
353
|
+
if (props.mode === 'datetime') {
|
|
354
|
+
result = props.range ? `${dateStr} ${timeStr}` : `${dateStr} ${timeStr}`;
|
|
355
|
+
} else if (props.mode === 'date') {
|
|
356
|
+
result = dateStr;
|
|
357
|
+
} else if (props.mode === 'time') {
|
|
358
|
+
result = timeStr;
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
// Emit the formatted string
|
|
362
|
+
emit('update:datetimeChanged', result.trim());
|
|
363
|
+
};
|
|
364
|
+
|
|
365
|
+
onMounted(() => document.addEventListener('click', handleClickOutside))
|
|
366
|
+
onUnmounted(() => document.removeEventListener('click', handleClickOutside))
|
|
367
|
+
</script>
|
|
368
|
+
|
|
369
|
+
<style scoped>
|
|
370
|
+
.input{cursor:pointer}.in-range{@apply bg-primary/20}.in-range:hover{@apply bg-primary/10}.range-end,.range-start{@apply bg-primary text-primary-content}
|
|
371
|
+
</style>
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
<script lang="ts" setup></script>
|
|
2
2
|
|
|
3
3
|
<template>
|
|
4
|
-
<nav class="navbar border-b-4 border-primary px-5 py-5">
|
|
4
|
+
<nav class="navbar border-b-4 border-primary px-5 py-5 place-items-start">
|
|
5
5
|
<div class="navbar-start flex-1">
|
|
6
|
-
|
|
6
|
+
<slot name="start"></slot>
|
|
7
7
|
</div>
|
|
8
8
|
|
|
9
|
-
<div class="navbar-center flex-
|
|
10
|
-
<
|
|
11
|
-
<input type="text" placeholder="Search" class="input input-bordered w-24 md:w-auto" />
|
|
12
|
-
</div>
|
|
9
|
+
<div class="navbar-center flex-auto hidden md:block">
|
|
10
|
+
<slot name="center"></slot>
|
|
13
11
|
</div>
|
|
14
12
|
|
|
15
13
|
<div class="navbar-end flex-1">
|
package/dist/runtime/plugin.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default:
|
|
1
|
+
declare const _default: any;
|
|
2
2
|
export default _default;
|
package/dist/runtime/plugin.js
CHANGED
|
File without changes
|
package/dist/types.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { type ModuleOptions,
|
|
1
|
+
export { type ModuleOptions, default } from './module.js'
|
package/dist/types.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { type ModuleOptions,
|
|
1
|
+
export { type ModuleOptions, default } from './module'
|
package/package.json
CHANGED
|
@@ -1,18 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "manolis-ui",
|
|
3
|
-
"version": "1.0
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "1.1.0",
|
|
4
|
+
"description": "My new Nuxt module",
|
|
5
5
|
"repository": "manolis-trading/manolis-ui",
|
|
6
|
-
"license": "
|
|
6
|
+
"license": "MIT",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"exports": {
|
|
9
9
|
".": {
|
|
10
10
|
"types": "./dist/types.d.ts",
|
|
11
11
|
"import": "./dist/module.mjs",
|
|
12
12
|
"require": "./dist/module.cjs"
|
|
13
|
-
}
|
|
14
|
-
"./components/ButtonComponent": "./dist/runtime/components/actions/ButtonComponent.vue"
|
|
15
|
-
|
|
13
|
+
}
|
|
16
14
|
},
|
|
17
15
|
"main": "./dist/module.cjs",
|
|
18
16
|
"types": "./dist/types.d.ts",
|
|
@@ -20,55 +18,42 @@
|
|
|
20
18
|
"dist"
|
|
21
19
|
],
|
|
22
20
|
"scripts": {
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"dev": "
|
|
26
|
-
"dev
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"release": "npm run lint && npm run test && npm run prepack && changelogen --release && npm publish && git push --follow-tags",
|
|
30
|
-
"lint": "eslint .",
|
|
21
|
+
"prepack": "nuxt-module-build build --no-fail-on-warnings",
|
|
22
|
+
"dev": "nuxi dev playground",
|
|
23
|
+
"dev:build": "nuxi build playground --no-fail-on-warnings",
|
|
24
|
+
"dev:prepare": "nuxt-module-build build --stub --no-fail-on-warnings && nuxt-module-build prepare --no-fail-on-warnings && nuxi prepare playground --no-fail-on-warnings",
|
|
25
|
+
"release": "npm run prepack && changelogen --release && npm publish && git push --follow-tags",
|
|
26
|
+
"lint": "eslint --max-warnings=0 .",
|
|
31
27
|
"test": "vitest run",
|
|
32
|
-
"test:watch": "vitest watch"
|
|
33
|
-
|
|
28
|
+
"test:watch": "vitest watch",
|
|
29
|
+
"test:types": "vue-tsc --noEmit && cd playground && vue-tsc --noEmit"
|
|
30
|
+
},
|
|
34
31
|
"dependencies": {
|
|
35
|
-
"@nuxt/kit": "^3.14.
|
|
36
|
-
"
|
|
32
|
+
"@nuxt/kit": "^3.14.1592",
|
|
33
|
+
"daisyui": "^4.12.14",
|
|
34
|
+
"defu": "^6.1.4",
|
|
35
|
+
"lucide": "^0.462.0",
|
|
36
|
+
"lucide-vue-next": "^0.462.0",
|
|
37
|
+
"pathe": "^1.1.2"
|
|
37
38
|
},
|
|
38
39
|
"devDependencies": {
|
|
39
|
-
"@
|
|
40
|
-
"@nuxt/devtools": "^1.6.0",
|
|
40
|
+
"@nuxt/devtools": "^1.6.1",
|
|
41
41
|
"@nuxt/eslint-config": "^0.7.1",
|
|
42
42
|
"@nuxt/module-builder": "^0.8.4",
|
|
43
|
-
"@nuxt/schema": "^3.14.
|
|
43
|
+
"@nuxt/schema": "^3.14.1592",
|
|
44
44
|
"@nuxt/test-utils": "^3.14.4",
|
|
45
45
|
"@nuxtjs/tailwindcss": "^6.12.2",
|
|
46
|
-
"@
|
|
47
|
-
"
|
|
48
|
-
"@storybook/addon-links": "^8.4.4",
|
|
49
|
-
"@storybook/addon-postcss": "^2.0.0",
|
|
50
|
-
"@storybook/blocks": "8.5.0-alpha.7",
|
|
51
|
-
"@storybook/test": "8.5.0-alpha.7",
|
|
52
|
-
"@storybook/vue3": "8.5.0-alpha.7",
|
|
53
|
-
"@storybook/vue3-vite": "8.5.0-alpha.7",
|
|
54
|
-
"@types/node": "^22.9.1",
|
|
55
|
-
"@vitejs/plugin-vue": "^5.2.0",
|
|
46
|
+
"@types/node": "latest",
|
|
47
|
+
"autoprefixer": "^10.4.20",
|
|
56
48
|
"changelogen": "^0.5.7",
|
|
57
|
-
"daisyui": "^4.12.14",
|
|
58
49
|
"eslint": "^9.15.0",
|
|
59
|
-
"
|
|
60
|
-
"nuxt": "^
|
|
61
|
-
"
|
|
62
|
-
"
|
|
50
|
+
"nuxt": "^3.14.1592",
|
|
51
|
+
"nuxt-lucide-icons": "^1.0.5",
|
|
52
|
+
"postcss": "^8.4.49",
|
|
53
|
+
"tailwindcss": "^3.4.15",
|
|
63
54
|
"typescript": "latest",
|
|
64
55
|
"vitest": "^2.1.5",
|
|
65
|
-
"vue": "^3.2",
|
|
66
56
|
"vue-tsc": "^2.1.10"
|
|
67
57
|
},
|
|
68
|
-
"packageManager": "
|
|
69
|
-
"eslintConfig": {
|
|
70
|
-
"extends": [
|
|
71
|
-
"plugin:storybook/recommended"
|
|
72
|
-
]
|
|
73
|
-
}
|
|
58
|
+
"packageManager": "pnpm@9.14.2+sha512.6e2baf77d06b9362294152c851c4f278ede37ab1eba3a55fda317a4a17b209f4dbb973fb250a77abc463a341fcb1f17f17cfa24091c4eb319cda0d9b84278387"
|
|
74
59
|
}
|
package/.vscode/settings.json
DELETED
package/CHANGELOG.md
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
- no changes- no changes- no changes- no changes- no changes- no changes- no changes- no changes- no changes- no changes
|
package/CHANGELOG_NEW.md
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
- no changes
|
package/LICENSE
DELETED
|
@@ -1,201 +0,0 @@
|
|
|
1
|
-
Apache License
|
|
2
|
-
Version 2.0, January 2004
|
|
3
|
-
http://www.apache.org/licenses/
|
|
4
|
-
|
|
5
|
-
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
-
|
|
7
|
-
1. Definitions.
|
|
8
|
-
|
|
9
|
-
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
-
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
-
|
|
12
|
-
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
-
the copyright owner that is granting the License.
|
|
14
|
-
|
|
15
|
-
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
-
other entities that control, are controlled by, or are under common
|
|
17
|
-
control with that entity. For the purposes of this definition,
|
|
18
|
-
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
-
direction or management of such entity, whether by contract or
|
|
20
|
-
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
-
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
-
|
|
23
|
-
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
-
exercising permissions granted by this License.
|
|
25
|
-
|
|
26
|
-
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
-
including but not limited to software source code, documentation
|
|
28
|
-
source, and configuration files.
|
|
29
|
-
|
|
30
|
-
"Object" form shall mean any form resulting from mechanical
|
|
31
|
-
transformation or translation of a Source form, including but
|
|
32
|
-
not limited to compiled object code, generated documentation,
|
|
33
|
-
and conversions to other media types.
|
|
34
|
-
|
|
35
|
-
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
-
Object form, made available under the License, as indicated by a
|
|
37
|
-
copyright notice that is included in or attached to the work
|
|
38
|
-
(an example is provided in the Appendix below).
|
|
39
|
-
|
|
40
|
-
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
-
form, that is based on (or derived from) the Work and for which the
|
|
42
|
-
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
-
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
-
of this License, Derivative Works shall not include works that remain
|
|
45
|
-
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
-
the Work and Derivative Works thereof.
|
|
47
|
-
|
|
48
|
-
"Contribution" shall mean any work of authorship, including
|
|
49
|
-
the original version of the Work and any modifications or additions
|
|
50
|
-
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
-
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
-
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
-
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
-
means any form of electronic, verbal, or written communication sent
|
|
55
|
-
to the Licensor or its representatives, including but not limited to
|
|
56
|
-
communication on electronic mailing lists, source code control systems,
|
|
57
|
-
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
-
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
-
excluding communication that is conspicuously marked or otherwise
|
|
60
|
-
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
-
|
|
62
|
-
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
-
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
-
subsequently incorporated within the Work.
|
|
65
|
-
|
|
66
|
-
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
-
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
-
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
-
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
-
Work and such Derivative Works in Source or Object form.
|
|
72
|
-
|
|
73
|
-
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
-
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
-
(except as stated in this section) patent license to make, have made,
|
|
77
|
-
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
-
where such license applies only to those patent claims licensable
|
|
79
|
-
by such Contributor that are necessarily infringed by their
|
|
80
|
-
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
-
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
-
institute patent litigation against any entity (including a
|
|
83
|
-
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
-
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
-
or contributory patent infringement, then any patent licenses
|
|
86
|
-
granted to You under this License for that Work shall terminate
|
|
87
|
-
as of the date such litigation is filed.
|
|
88
|
-
|
|
89
|
-
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
-
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
-
modifications, and in Source or Object form, provided that You
|
|
92
|
-
meet the following conditions:
|
|
93
|
-
|
|
94
|
-
(a) You must give any other recipients of the Work or
|
|
95
|
-
Derivative Works a copy of this License; and
|
|
96
|
-
|
|
97
|
-
(b) You must cause any modified files to carry prominent notices
|
|
98
|
-
stating that You changed the files; and
|
|
99
|
-
|
|
100
|
-
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
-
that You distribute, all copyright, patent, trademark, and
|
|
102
|
-
attribution notices from the Source form of the Work,
|
|
103
|
-
excluding those notices that do not pertain to any part of
|
|
104
|
-
the Derivative Works; and
|
|
105
|
-
|
|
106
|
-
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
-
distribution, then any Derivative Works that You distribute must
|
|
108
|
-
include a readable copy of the attribution notices contained
|
|
109
|
-
within such NOTICE file, excluding those notices that do not
|
|
110
|
-
pertain to any part of the Derivative Works, in at least one
|
|
111
|
-
of the following places: within a NOTICE text file distributed
|
|
112
|
-
as part of the Derivative Works; within the Source form or
|
|
113
|
-
documentation, if provided along with the Derivative Works; or,
|
|
114
|
-
within a display generated by the Derivative Works, if and
|
|
115
|
-
wherever such third-party notices normally appear. The contents
|
|
116
|
-
of the NOTICE file are for informational purposes only and
|
|
117
|
-
do not modify the License. You may add Your own attribution
|
|
118
|
-
notices within Derivative Works that You distribute, alongside
|
|
119
|
-
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
-
that such additional attribution notices cannot be construed
|
|
121
|
-
as modifying the License.
|
|
122
|
-
|
|
123
|
-
You may add Your own copyright statement to Your modifications and
|
|
124
|
-
may provide additional or different license terms and conditions
|
|
125
|
-
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
-
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
-
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
-
the conditions stated in this License.
|
|
129
|
-
|
|
130
|
-
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
-
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
-
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
-
this License, without any additional terms or conditions.
|
|
134
|
-
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
-
the terms of any separate license agreement you may have executed
|
|
136
|
-
with Licensor regarding such Contributions.
|
|
137
|
-
|
|
138
|
-
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
-
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
-
except as required for reasonable and customary use in describing the
|
|
141
|
-
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
-
|
|
143
|
-
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
-
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
-
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
-
implied, including, without limitation, any warranties or conditions
|
|
148
|
-
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
-
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
-
appropriateness of using or redistributing the Work and assume any
|
|
151
|
-
risks associated with Your exercise of permissions under this License.
|
|
152
|
-
|
|
153
|
-
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
-
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
-
unless required by applicable law (such as deliberate and grossly
|
|
156
|
-
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
-
liable to You for damages, including any direct, indirect, special,
|
|
158
|
-
incidental, or consequential damages of any character arising as a
|
|
159
|
-
result of this License or out of the use or inability to use the
|
|
160
|
-
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
-
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
-
other commercial damages or losses), even if such Contributor
|
|
163
|
-
has been advised of the possibility of such damages.
|
|
164
|
-
|
|
165
|
-
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
-
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
-
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
-
or other liability obligations and/or rights consistent with this
|
|
169
|
-
License. However, in accepting such obligations, You may act only
|
|
170
|
-
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
-
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
-
defend, and hold each Contributor harmless for any liability
|
|
173
|
-
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
-
of your accepting any such warranty or additional liability.
|
|
175
|
-
|
|
176
|
-
END OF TERMS AND CONDITIONS
|
|
177
|
-
|
|
178
|
-
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
-
|
|
180
|
-
To apply the Apache License to your work, attach the following
|
|
181
|
-
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
-
replaced with your own identifying information. (Don't include
|
|
183
|
-
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
-
comment syntax for the file format. We also recommend that a
|
|
185
|
-
file or class name and description of purpose be included on the
|
|
186
|
-
same "printed page" as the copyright notice for easier
|
|
187
|
-
identification within third-party archives.
|
|
188
|
-
|
|
189
|
-
Copyright [yyyy] [name of copyright owner]
|
|
190
|
-
|
|
191
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
-
you may not use this file except in compliance with the License.
|
|
193
|
-
You may obtain a copy of the License at
|
|
194
|
-
|
|
195
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
-
|
|
197
|
-
Unless required by applicable law or agreed to in writing, software
|
|
198
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
-
See the License for the specific language governing permissions and
|
|
201
|
-
limitations under the License.
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
@tailwind base;@tailwind components;@tailwind utilities;
|