manolis-ui 1.0.6
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/.vscode/settings.json +3 -0
- package/CHANGELOG.md +1 -0
- package/CHANGELOG_NEW.md +1 -0
- package/LICENSE +201 -0
- package/README.md +87 -0
- package/dist/module.cjs +5 -0
- package/dist/module.d.mts +12 -0
- package/dist/module.d.ts +12 -0
- package/dist/module.json +9 -0
- package/dist/module.mjs +34 -0
- package/dist/runtime/assets/css/tailwind.css +1 -0
- package/dist/runtime/components/actions/ButtonComponent.vue +78 -0
- package/dist/runtime/components/actions/dropdown.vue +46 -0
- package/dist/runtime/components/actions/modal.vue +52 -0
- package/dist/runtime/components/actions/swap.vue +15 -0
- package/dist/runtime/components/actions/theme-controller.vue +52 -0
- package/dist/runtime/components/data-display/accordion.vue +30 -0
- package/dist/runtime/components/data-display/avatar.vue +36 -0
- package/dist/runtime/components/data-display/badge.vue +35 -0
- package/dist/runtime/components/data-display/card.vue +50 -0
- package/dist/runtime/components/data-display/carousel.vue +34 -0
- package/dist/runtime/components/data-input/rating.vue +57 -0
- package/dist/runtime/components/feedback/loader.vue +25 -0
- package/dist/runtime/components/layout/footer.vue +39 -0
- package/dist/runtime/components/layout/hero.vue +15 -0
- package/dist/runtime/components/navigation/navigation-bar.vue +21 -0
- package/dist/runtime/components/navigation/tab.vue +60 -0
- package/dist/runtime/composables/useLocalStorage.d.ts +1 -0
- package/dist/runtime/composables/useLocalStorage.js +16 -0
- package/dist/runtime/plugin.d.ts +2 -0
- package/dist/runtime/plugin.js +4 -0
- package/dist/runtime/server/tsconfig.json +3 -0
- package/dist/types.d.mts +1 -0
- package/dist/types.d.ts +1 -0
- package/package.json +73 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
- no changes- no changes- no changes- no changes
|
package/CHANGELOG_NEW.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
- no changes
|
package/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
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.
|
package/README.md
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
Get your module up and running quickly.
|
|
3
|
+
|
|
4
|
+
Find and replace all on all files (CMD+SHIFT+F):
|
|
5
|
+
- Name: Manolis UI
|
|
6
|
+
- Package name: manolis-ui
|
|
7
|
+
- Description: My new Nuxt module
|
|
8
|
+
-->
|
|
9
|
+
|
|
10
|
+
# Manolis UI
|
|
11
|
+
|
|
12
|
+
[![npm version][npm-version-src]][npm-version-href]
|
|
13
|
+
[![npm downloads][npm-downloads-src]][npm-downloads-href]
|
|
14
|
+
[![License][license-src]][license-href]
|
|
15
|
+
[![Nuxt][nuxt-src]][nuxt-href]
|
|
16
|
+
|
|
17
|
+
A design system for every product and or company under manolis trading
|
|
18
|
+
|
|
19
|
+
- [✨ Release Notes](/CHANGELOG.md)
|
|
20
|
+
<!-- - [🏀 Online playground](https://stackblitz.com/github/manolis-trading/manolis-ui?file=playground%2Fapp.vue) -->
|
|
21
|
+
<!-- - [📖 Documentation](https://example.com) -->
|
|
22
|
+
|
|
23
|
+
## Features
|
|
24
|
+
|
|
25
|
+
<!-- Highlight some of the features your module provide here -->
|
|
26
|
+
- 🌼 Build on top of daisy UI
|
|
27
|
+
- 🛠 55 custom build components
|
|
28
|
+
- 📦 Packaged for Vue 3 and nuxt 3
|
|
29
|
+
|
|
30
|
+
## Quick Setup
|
|
31
|
+
|
|
32
|
+
Install the module to your Nuxt application with one command:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
npx nuxi module add manolis-ui
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
That's it! You can now use Manolis UI in your Nuxt app ✨
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
## Contribution
|
|
42
|
+
|
|
43
|
+
<details>
|
|
44
|
+
<summary>Local development</summary>
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
# Install dependencies
|
|
48
|
+
yarn install
|
|
49
|
+
|
|
50
|
+
# Generate type stubs
|
|
51
|
+
yarn run dev:prepare
|
|
52
|
+
|
|
53
|
+
# Develop with the playground
|
|
54
|
+
yarn run dev
|
|
55
|
+
|
|
56
|
+
# Build the playground
|
|
57
|
+
yarn run dev:build
|
|
58
|
+
|
|
59
|
+
# Run ESLint
|
|
60
|
+
yarn run lint
|
|
61
|
+
|
|
62
|
+
# Run Vitest
|
|
63
|
+
yarn run test
|
|
64
|
+
yarn run test:watch
|
|
65
|
+
|
|
66
|
+
# Release new version
|
|
67
|
+
yarn run release
|
|
68
|
+
|
|
69
|
+
# Storybook
|
|
70
|
+
yarn run storybook
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
</details>
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
<!-- Badges -->
|
|
77
|
+
[npm-version-src]: https://img.shields.io/npm/v/manolis-ui/latest.svg?style=flat&colorA=020420&colorB=00DC82
|
|
78
|
+
[npm-version-href]: https://npmjs.com/package/manolis-ui
|
|
79
|
+
|
|
80
|
+
[npm-downloads-src]: https://img.shields.io/npm/dm/manolis-ui.svg?style=flat&colorA=020420&colorB=00DC82
|
|
81
|
+
[npm-downloads-href]: https://npm.chart.dev/manolis-ui
|
|
82
|
+
|
|
83
|
+
[license-src]: https://img.shields.io/npm/l/manolis-ui.svg?style=flat&colorA=020420&colorB=00DC82
|
|
84
|
+
[license-href]: https://npmjs.com/package/manolis-ui
|
|
85
|
+
|
|
86
|
+
[nuxt-src]: https://img.shields.io/badge/Nuxt-020420?logo=nuxt.js
|
|
87
|
+
[nuxt-href]: https://nuxt.com
|
package/dist/module.cjs
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as _nuxt_schema from '@nuxt/schema';
|
|
2
|
+
|
|
3
|
+
interface ThemeOptions {
|
|
4
|
+
name: string;
|
|
5
|
+
}
|
|
6
|
+
interface ModuleOptions {
|
|
7
|
+
css: boolean;
|
|
8
|
+
theme?: ThemeOptions;
|
|
9
|
+
}
|
|
10
|
+
declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
|
|
11
|
+
|
|
12
|
+
export { type ModuleOptions, type ThemeOptions, _default as default };
|
package/dist/module.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as _nuxt_schema from '@nuxt/schema';
|
|
2
|
+
|
|
3
|
+
interface ThemeOptions {
|
|
4
|
+
name: string;
|
|
5
|
+
}
|
|
6
|
+
interface ModuleOptions {
|
|
7
|
+
css: boolean;
|
|
8
|
+
theme?: ThemeOptions;
|
|
9
|
+
}
|
|
10
|
+
declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
|
|
11
|
+
|
|
12
|
+
export { type ModuleOptions, type ThemeOptions, _default as default };
|
package/dist/module.json
ADDED
package/dist/module.mjs
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { defineNuxtModule, createResolver, addPlugin, installModule, addComponentsDir } from '@nuxt/kit';
|
|
2
|
+
|
|
3
|
+
const module = defineNuxtModule({
|
|
4
|
+
meta: {
|
|
5
|
+
name: "manolis-ui",
|
|
6
|
+
configKey: "manolisUI"
|
|
7
|
+
},
|
|
8
|
+
// Default configuration options of the Nuxt module
|
|
9
|
+
defaults: {
|
|
10
|
+
css: true
|
|
11
|
+
},
|
|
12
|
+
async setup(_options, _nuxt) {
|
|
13
|
+
const resolver = createResolver(import.meta.url);
|
|
14
|
+
addPlugin(resolver.resolve("./runtime/plugin"));
|
|
15
|
+
await installModule("@nuxtjs/tailwindcss", {
|
|
16
|
+
/**
|
|
17
|
+
* Here, you specify where your config is.
|
|
18
|
+
* By default, the module have a configPath relative
|
|
19
|
+
* to the current path, ie the playground !
|
|
20
|
+
* (or the app using your module)
|
|
21
|
+
*/
|
|
22
|
+
cssPath: _options.css ? resolver.resolve("./runtime/assets/css/tailwind.css") : false,
|
|
23
|
+
configPath: resolver.resolve("../tailwind.config")
|
|
24
|
+
});
|
|
25
|
+
await addComponentsDir({
|
|
26
|
+
path: resolver.resolve("./runtime/components"),
|
|
27
|
+
pathPrefix: false,
|
|
28
|
+
prefix: "",
|
|
29
|
+
global: true
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
|
|
34
|
+
export { module as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@tailwind base;@tailwind components;@tailwind utilities;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed, ref, watch } from 'vue';
|
|
3
|
+
interface Props {
|
|
4
|
+
outlined?: boolean,
|
|
5
|
+
active?: boolean,
|
|
6
|
+
loading?: boolean,
|
|
7
|
+
type?: 'neutral' | 'primary' | 'secondary' | 'accent' | 'ghost' | 'link' | 'info' | 'success' | 'warning' | 'error';
|
|
8
|
+
size?: string;
|
|
9
|
+
shape?: 'square' | 'circle';
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
13
|
+
outlined: false,
|
|
14
|
+
active: false,
|
|
15
|
+
loading: false
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
const sizeClass = computed(() => {
|
|
19
|
+
switch (props.size) {
|
|
20
|
+
case 'large':
|
|
21
|
+
return 'btn-lg';
|
|
22
|
+
case 'small':
|
|
23
|
+
return 'btn-sm';
|
|
24
|
+
case 'tiny':
|
|
25
|
+
return 'btn-tiny';
|
|
26
|
+
case 'wide':
|
|
27
|
+
return 'btn-wide';
|
|
28
|
+
default:
|
|
29
|
+
return '';
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
const buttonType = computed(() => {
|
|
34
|
+
switch (props.type) {
|
|
35
|
+
case "neutral":
|
|
36
|
+
return "btn-neutral";
|
|
37
|
+
case "primary":
|
|
38
|
+
return "btn-primary";
|
|
39
|
+
case "secondary":
|
|
40
|
+
return "btn-secondary";
|
|
41
|
+
case "accent":
|
|
42
|
+
return "btn-accent";
|
|
43
|
+
case "ghost":
|
|
44
|
+
return "btn-ghost";
|
|
45
|
+
case "link":
|
|
46
|
+
return "btn-link";
|
|
47
|
+
case "info":
|
|
48
|
+
return "btn-info";
|
|
49
|
+
case "success":
|
|
50
|
+
return "btn-success";
|
|
51
|
+
case "warning":
|
|
52
|
+
return "btn-warning";
|
|
53
|
+
case "error":
|
|
54
|
+
return "btn-error";
|
|
55
|
+
default:
|
|
56
|
+
return "btn-neutral";
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
const shapeClass = computed(() => {
|
|
61
|
+
switch (props.shape) {
|
|
62
|
+
case "square":
|
|
63
|
+
return "btn-square";
|
|
64
|
+
case "circle":
|
|
65
|
+
return "btn-circle";
|
|
66
|
+
default:
|
|
67
|
+
return "";
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
</script>
|
|
71
|
+
|
|
72
|
+
<template>
|
|
73
|
+
<button
|
|
74
|
+
:class="['btn', {['btn-outline']: props.outlined }, {['btn-active']: props.active }, buttonType, sizeClass, shapeClass]">
|
|
75
|
+
<span v-if="loading" class="loading loading-spinner"></span>
|
|
76
|
+
<slot>Submit</slot>
|
|
77
|
+
</button>
|
|
78
|
+
</template>
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
interface Props {
|
|
3
|
+
items?: Array<dropdownItem>;
|
|
4
|
+
position?: keyof typeof dropdownPosition;
|
|
5
|
+
floatPosition?: keyof typeof dropdownFloatPosition;
|
|
6
|
+
openOnHover?: boolean,
|
|
7
|
+
forceOpen?: boolean
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
interface dropdownItem {
|
|
11
|
+
text: string,
|
|
12
|
+
link: string,
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const dropdownPosition = {
|
|
16
|
+
left: "dropdown-left",
|
|
17
|
+
right: "dropdown-right",
|
|
18
|
+
bottom: "dropdown-bottom",
|
|
19
|
+
top: "dropdown-top"
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const dropdownFloatPosition = {
|
|
23
|
+
start: "",
|
|
24
|
+
end: "dropdown-end"
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
28
|
+
position: "bottom",
|
|
29
|
+
floatPosition: "start",
|
|
30
|
+
openOnHover: false,
|
|
31
|
+
forceOpen: false,
|
|
32
|
+
});</script>
|
|
33
|
+
|
|
34
|
+
<template>
|
|
35
|
+
<div class="dropdown" :class="dropdownPosition[props.position], dropdownFloatPosition[props.floatPosition],{ ['dropdown-open']: props.forceOpen } , { ['dropdown-hover']: props.openOnHover }">
|
|
36
|
+
<!-- this has to be a button -->
|
|
37
|
+
<slot tabindex="0" role="button">
|
|
38
|
+
<div class="btn m-1">Open dropdown</div>
|
|
39
|
+
</slot>
|
|
40
|
+
<ul tabindex="0" class="dropdown-content menu bg-base-100 rounded z-[1] w-52 p-2 shadow">
|
|
41
|
+
<li v-for="item in items"><a :href="item.link">{{ item.text }}</a></li>
|
|
42
|
+
<slot name="additional"></slot>
|
|
43
|
+
</ul>
|
|
44
|
+
|
|
45
|
+
</div>
|
|
46
|
+
</template>
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import { ref } from 'vue';
|
|
3
|
+
|
|
4
|
+
interface Props {
|
|
5
|
+
position?: keyof typeof modalPosition;
|
|
6
|
+
withBackdrop?: boolean,
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
10
|
+
position: "center",
|
|
11
|
+
withBackdrop: false
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
const modalPosition = {
|
|
15
|
+
top: "modal-top",
|
|
16
|
+
bottom: "modal-bottom",
|
|
17
|
+
center: "modal-middle"
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const dialog = ref<HTMLDialogElement | null>(null);
|
|
21
|
+
|
|
22
|
+
const openDialog = (): void => {
|
|
23
|
+
dialog.value?.showModal();
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
const closeDialog = (): void => {
|
|
27
|
+
dialog.value?.close();
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
</script>
|
|
31
|
+
|
|
32
|
+
<template>
|
|
33
|
+
<span class="w-fit cursor-pointer" @click="openDialog">
|
|
34
|
+
<slot name="trigger" role="button">
|
|
35
|
+
<button class="btn">Open</button>
|
|
36
|
+
</slot>
|
|
37
|
+
</span>
|
|
38
|
+
|
|
39
|
+
<dialog ref="dialog" class="modal" :class="modalPosition[position]">
|
|
40
|
+
<div class="modal-box">
|
|
41
|
+
<slot></slot>
|
|
42
|
+
<div class="modal-action">
|
|
43
|
+
<slot name="actions" />
|
|
44
|
+
<form method="dialog" @submit="closeDialog" :class="withBackdrop ? 'modal-backdrop' : ''">
|
|
45
|
+
<slot name="close-button">
|
|
46
|
+
<button class="btn">Close</button>
|
|
47
|
+
</slot>
|
|
48
|
+
</form>
|
|
49
|
+
</div>
|
|
50
|
+
</div>
|
|
51
|
+
</dialog>
|
|
52
|
+
</template>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
interface Props {
|
|
3
|
+
effect?: "rotate" | "flip"
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
const props = defineProps<Props>();
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<template>
|
|
10
|
+
<label class="swap" :class="props.effect ? `swap-${effect}` : ''">
|
|
11
|
+
<input type="checkbox" />
|
|
12
|
+
<div class="swap-on"><slot name="on"></slot></div>
|
|
13
|
+
<div class="swap-off"><slot name="off"></slot></div>
|
|
14
|
+
</label>
|
|
15
|
+
</template>
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import { Sun, Moon } from 'lucide-vue-next';
|
|
3
|
+
import { ref, watch, onMounted } from 'vue';
|
|
4
|
+
import { useLocalStorage } from '../../composables/useLocalStorage'; // Import the custom composable
|
|
5
|
+
|
|
6
|
+
// Define the Props interface and default values
|
|
7
|
+
interface Props {
|
|
8
|
+
theme?: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
12
|
+
theme: 'reserveren-dark',
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
// Use the composable for localStorage functionality
|
|
16
|
+
const themeValue = useLocalStorage('theme', props.theme);
|
|
17
|
+
|
|
18
|
+
// Function to apply DaisyUI theme using `data-theme` attribute
|
|
19
|
+
function updateTheme(theme: string) {
|
|
20
|
+
if (typeof window !== 'undefined' && window.document) {
|
|
21
|
+
const htmlElement = document.documentElement;
|
|
22
|
+
htmlElement.setAttribute('data-theme', theme);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
// Apply the theme on mounted (client-side only)
|
|
27
|
+
onMounted(() => {
|
|
28
|
+
updateTheme(themeValue.value);
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
// Watch themeValue changes and update localStorage
|
|
32
|
+
watch(themeValue, (newValue) => {
|
|
33
|
+
updateTheme(newValue); // Apply the theme change
|
|
34
|
+
});
|
|
35
|
+
</script>
|
|
36
|
+
|
|
37
|
+
<template>
|
|
38
|
+
<label class="swap swap-rotate">
|
|
39
|
+
<!-- Checkbox controls the state -->
|
|
40
|
+
<input
|
|
41
|
+
type="checkbox"
|
|
42
|
+
class="theme-controller"
|
|
43
|
+
v-model="themeValue"
|
|
44
|
+
:true-value="'light'"
|
|
45
|
+
:false-value="'reserveren-dark'"
|
|
46
|
+
/>
|
|
47
|
+
<!-- Sun icon for light mode -->
|
|
48
|
+
<Sun class="swap-off fill-current"></Sun>
|
|
49
|
+
<!-- Moon icon for dark mode -->
|
|
50
|
+
<Moon class="swap-on fill-current"></Moon>
|
|
51
|
+
</label>
|
|
52
|
+
</template>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import { ref, watch } from 'vue';
|
|
3
|
+
|
|
4
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
5
|
+
joinItems: false
|
|
6
|
+
});
|
|
7
|
+
|
|
8
|
+
interface Props {
|
|
9
|
+
name: string;
|
|
10
|
+
items: Array<Accordion>;
|
|
11
|
+
joinItems?: boolean;
|
|
12
|
+
icon?: "arrow" | "plus";
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
interface Accordion {
|
|
16
|
+
title: string;
|
|
17
|
+
content: string;
|
|
18
|
+
}
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
<template>
|
|
23
|
+
<div class="collapse" :class="[props.icon ? `collapse-${props.icon}` : '', { ['join-item']: joinItems }]" v-for="(item, index) in props.items">
|
|
24
|
+
<input type="radio" :name="name" value="true" />
|
|
25
|
+
<div class="collapse-title text-xl font-medium">{{item.title}}</div>
|
|
26
|
+
<div class="collapse-content">
|
|
27
|
+
<span v-html="item.content"></span>
|
|
28
|
+
</div>
|
|
29
|
+
</div>
|
|
30
|
+
</template>
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import { ref, watch } from 'vue';
|
|
3
|
+
|
|
4
|
+
interface Props {
|
|
5
|
+
image: string,
|
|
6
|
+
onlineStatus?: "online" | "offline" | "none",
|
|
7
|
+
initials?: string
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
11
|
+
onlineStatus: "none"
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
const onlineStatusValue = ref<"online" | "offline" | "none">(props.onlineStatus);
|
|
15
|
+
watch(
|
|
16
|
+
() => props.onlineStatus,
|
|
17
|
+
(newValue) => {
|
|
18
|
+
if (newValue) {
|
|
19
|
+
onlineStatusValue.value = newValue;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
);
|
|
23
|
+
|
|
24
|
+
</script>
|
|
25
|
+
|
|
26
|
+
<template>
|
|
27
|
+
<div class="avatar" :class="onlineStatus">
|
|
28
|
+
<div class="rounded-full" v-if="image">
|
|
29
|
+
<img :src="image" class="w-24">
|
|
30
|
+
</div>
|
|
31
|
+
|
|
32
|
+
<div v-else class="bg-neutral text-neutral-content w-16 rounded-full flex justify-center p-[25%] text-center">
|
|
33
|
+
<p class="text-xl">{{initials}}</p>
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
</template>
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
3
|
+
color: "neutral",
|
|
4
|
+
outline: false,
|
|
5
|
+
size: "medium"
|
|
6
|
+
});
|
|
7
|
+
const sizes = {
|
|
8
|
+
'extra small': 'badge-xs',
|
|
9
|
+
small: "badge-sm",
|
|
10
|
+
medium: "badge-md",
|
|
11
|
+
large: "badge-lg",
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const colors = {
|
|
15
|
+
neutral: "badge-neutral",
|
|
16
|
+
primary: "badge-primary",
|
|
17
|
+
secondary: "badge-secondary",
|
|
18
|
+
accent: "badge-accent",
|
|
19
|
+
ghost: "badge-ghost",
|
|
20
|
+
info: "badge-info",
|
|
21
|
+
success: "badge-success",
|
|
22
|
+
warning: "badge-warning",
|
|
23
|
+
error: "badge-error"
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
interface Props {
|
|
27
|
+
color?: "neutral" | "primary" | "secondary" | "accent" | "ghost" | "info" | "success" | "warning" | "error"
|
|
28
|
+
outline?: boolean,
|
|
29
|
+
size?: "extra small" | "small" | "medium" | "large"
|
|
30
|
+
}
|
|
31
|
+
</script>
|
|
32
|
+
|
|
33
|
+
<template>
|
|
34
|
+
<span class="badge" :class="sizes[props.size], colors[props.color], {['badge-outline']: props.outline }"><slot></slot></span>
|
|
35
|
+
</template>
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { ref, watch } from 'vue';
|
|
3
|
+
|
|
4
|
+
interface Props {
|
|
5
|
+
imgUrl: string;
|
|
6
|
+
alt?: string;
|
|
7
|
+
title?: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
outlined?: boolean;
|
|
10
|
+
}
|
|
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
|
+
|
|
20
|
+
const outlined = ref<boolean>(props.outlined);
|
|
21
|
+
|
|
22
|
+
watch(
|
|
23
|
+
() => props.outlined,
|
|
24
|
+
(newValue) => {
|
|
25
|
+
outlined.value = newValue;
|
|
26
|
+
}
|
|
27
|
+
);
|
|
28
|
+
</script>
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
<template>
|
|
32
|
+
<div class="card card-compact bg-base-100 max-w-80 min-w-64 shadow-xl rounded group h-full" :class="outlined ? 'border-4 border-primary' : ''">
|
|
33
|
+
<figure>
|
|
34
|
+
<img
|
|
35
|
+
:src="imgUrl"
|
|
36
|
+
:alt="alt"
|
|
37
|
+
class="object-cover w-full rounded"
|
|
38
|
+
v-if="imgUrl"
|
|
39
|
+
/>
|
|
40
|
+
</figure>
|
|
41
|
+
<div class="card-body">
|
|
42
|
+
<h2 class="card-title text-lg text-left group-hover:text-primary cursor-pointer" v-if="title">{{ title }}</h2>
|
|
43
|
+
<slot name="details"></slot>
|
|
44
|
+
<p class="text-left" v-if="description">{{ description }}</p>
|
|
45
|
+
<div class="card-actions flex-col flex-nowrap">
|
|
46
|
+
<slot name="actions" />
|
|
47
|
+
</div>
|
|
48
|
+
</div>
|
|
49
|
+
</div>
|
|
50
|
+
</template>
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
interface Props {
|
|
3
|
+
snapTo?: "start" | "center" | "end";
|
|
4
|
+
vertical?: boolean;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
interface Carousel {
|
|
8
|
+
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
interface CarouselItem {
|
|
12
|
+
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
16
|
+
snapTo: "start",
|
|
17
|
+
vertical: false
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
</script>
|
|
21
|
+
|
|
22
|
+
<template>
|
|
23
|
+
<div class="carousel">
|
|
24
|
+
<div class="carousel-item">
|
|
25
|
+
<img src="https://img.daisyui.com/images/stock/photo-1559703248-dcaaec9fab78.webp" alt="">
|
|
26
|
+
</div>
|
|
27
|
+
<div class="carousel-item">
|
|
28
|
+
<img src="https://img.daisyui.com/images/stock/photo-1559703248-dcaaec9fab78.webp" alt="">
|
|
29
|
+
</div>
|
|
30
|
+
<div class="carousel-item">
|
|
31
|
+
<img src="https://img.daisyui.com/images/stock/photo-1559703248-dcaaec9fab78.webp" alt="">
|
|
32
|
+
</div>
|
|
33
|
+
</div>
|
|
34
|
+
</template>
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { ref, watch, withDefaults } from 'vue';
|
|
3
|
+
|
|
4
|
+
interface Props {
|
|
5
|
+
initialRating: number;
|
|
6
|
+
numberOfStars?: number;
|
|
7
|
+
halfStars?: boolean;
|
|
8
|
+
isInteractive?: boolean;
|
|
9
|
+
size?: "xs" | "sm" | "md" | "lg";
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
13
|
+
initialRating: 0,
|
|
14
|
+
numberOfStars: 5,
|
|
15
|
+
halfStars: true,
|
|
16
|
+
isInteractive: false,
|
|
17
|
+
size: "sm",
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
const rating = ref<number>(props.initialRating);
|
|
21
|
+
|
|
22
|
+
watch(
|
|
23
|
+
() => props.initialRating,
|
|
24
|
+
(newValue) => {
|
|
25
|
+
rating.value = newValue;
|
|
26
|
+
}
|
|
27
|
+
);
|
|
28
|
+
|
|
29
|
+
const updateRating = (newRating: number) => {
|
|
30
|
+
rating.value = newRating;
|
|
31
|
+
};
|
|
32
|
+
</script>
|
|
33
|
+
|
|
34
|
+
<template>
|
|
35
|
+
<div class="rating" :class="`rating-${size}`">
|
|
36
|
+
<input
|
|
37
|
+
v-for="i in numberOfStars * (halfStars ? 2 : 1)"
|
|
38
|
+
:key="i"
|
|
39
|
+
type="radio"
|
|
40
|
+
:value="halfStars ? i * 0.5 : i"
|
|
41
|
+
:checked="rating === (halfStars ? i * 0.5 : i)"
|
|
42
|
+
@change="isInteractive ? updateRating(halfStars ? i * 0.5 : i) : null"
|
|
43
|
+
class="mask mask-star"
|
|
44
|
+
:class="{
|
|
45
|
+
'bg-yellow-400': rating >= (halfStars ? i * 0.5 : i),
|
|
46
|
+
'mask-half-1': halfStars && i % 2 !== 0,
|
|
47
|
+
'mask-half-2': halfStars && i % 2 === 0,
|
|
48
|
+
'cursor-pointer': isInteractive,
|
|
49
|
+
'cursor-default': !isInteractive
|
|
50
|
+
}"
|
|
51
|
+
:disabled="!isInteractive"
|
|
52
|
+
/>
|
|
53
|
+
</div>
|
|
54
|
+
</template>
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import { ref, watch } from 'vue';
|
|
3
|
+
|
|
4
|
+
interface Props {
|
|
5
|
+
loading?: boolean;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
9
|
+
loading: true,
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
const loading = ref<boolean>(props.loading);
|
|
13
|
+
|
|
14
|
+
watch(
|
|
15
|
+
() => props.loading,
|
|
16
|
+
(newValue) => {
|
|
17
|
+
loading.value = newValue;
|
|
18
|
+
}
|
|
19
|
+
);
|
|
20
|
+
|
|
21
|
+
</script>
|
|
22
|
+
|
|
23
|
+
<template>
|
|
24
|
+
<span class="loading loading-spinner loading-md mx-auto " v-if="loading"></span>
|
|
25
|
+
</template>
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
interface Props {
|
|
3
|
+
items: Array<FooterNavigation>;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
const props = defineProps<Props>();
|
|
7
|
+
|
|
8
|
+
interface FooterNavigation {
|
|
9
|
+
title: string;
|
|
10
|
+
items: Array<FooterNavigationItem>;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
interface FooterNavigationItem {
|
|
14
|
+
text: string;
|
|
15
|
+
link: string;
|
|
16
|
+
enabled: Boolean,
|
|
17
|
+
}
|
|
18
|
+
</script>
|
|
19
|
+
|
|
20
|
+
<template>
|
|
21
|
+
<footer class="bg-base-200 text-base-content p-10">
|
|
22
|
+
<div class="container flex space-between flex-wrap flex-col lg:flex-row">
|
|
23
|
+
<div class="footer w-full lg:w-2/3 mb-16">
|
|
24
|
+
<nav v-for="footerCols in props.items">
|
|
25
|
+
<h6 class="footer-title">{{ footerCols.title }}</h6>
|
|
26
|
+
<a v-for="footerItem in footerCols.items" class="link link-hover" :href="footerItem.link">{{ footerItem.text
|
|
27
|
+
}}</a>
|
|
28
|
+
</nav>
|
|
29
|
+
</div>
|
|
30
|
+
|
|
31
|
+
<slot></slot>
|
|
32
|
+
</div>
|
|
33
|
+
</footer>
|
|
34
|
+
</template>
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
<style scoped>
|
|
38
|
+
.footer>*{@apply w-max relative}footer .footer-title{@apply font-bold text-xl opacity-100 border-base-300 border-b-4 after:flex after:border-b-2 after:absolute after:w-full after:h-1 after:border-base-300}
|
|
39
|
+
</style>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="hero min-h-80 container">
|
|
3
|
+
<div class="hero-content !px-0 text-center">
|
|
4
|
+
<div class="max-w-1/2">
|
|
5
|
+
<h1 class="text-4xl mt-9">
|
|
6
|
+
<slot name="title">hero title</slot>
|
|
7
|
+
</h1>
|
|
8
|
+
<p>
|
|
9
|
+
<slot name="description" class="py-9" />
|
|
10
|
+
</p>
|
|
11
|
+
<slot name="call-to-action-block" class="max-w-full"><button class="btn btn-primary">Call to action</button></slot>
|
|
12
|
+
</div>
|
|
13
|
+
</div>
|
|
14
|
+
</div>
|
|
15
|
+
</template>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<script lang="ts" setup></script>
|
|
2
|
+
|
|
3
|
+
<template>
|
|
4
|
+
<nav class="navbar border-b-4 border-primary px-5 py-5">
|
|
5
|
+
<div class="navbar-start flex-1">
|
|
6
|
+
<!-- <a href="#" class="w-fit"><img src="/images/logo.svg"></a> -->
|
|
7
|
+
</div>
|
|
8
|
+
|
|
9
|
+
<div class="navbar-center flex-1 hidden md:block">
|
|
10
|
+
<div class="form-control">
|
|
11
|
+
<input type="text" placeholder="Search" class="input input-bordered w-24 md:w-auto" />
|
|
12
|
+
</div>
|
|
13
|
+
</div>
|
|
14
|
+
|
|
15
|
+
<div class="navbar-end flex-1">
|
|
16
|
+
<slot name="end"></slot>
|
|
17
|
+
</div>
|
|
18
|
+
</nav>
|
|
19
|
+
</template>
|
|
20
|
+
|
|
21
|
+
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
interface Props {
|
|
3
|
+
items: Array<string>;
|
|
4
|
+
withControlls?: boolean;
|
|
5
|
+
rotateTabsAfter?: number;//in seconds
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
const props = defineProps<Props>();
|
|
9
|
+
|
|
10
|
+
const currentTab = ref(props.items[0]);
|
|
11
|
+
|
|
12
|
+
// for setting a propperty in the template when needed (dynamic data for example)
|
|
13
|
+
const emit = defineEmits(['tab-changed']);
|
|
14
|
+
|
|
15
|
+
function setCurrentTab(tab: string) {
|
|
16
|
+
currentTab.value = tab;
|
|
17
|
+
emit('tab-changed', tab);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
function nextTab() {
|
|
21
|
+
const currentIndex = props.items.indexOf(currentTab.value);
|
|
22
|
+
const nextIndex = (currentIndex + 1) % props.items.length;
|
|
23
|
+
setCurrentTab(props.items[nextIndex]);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function previousTab() {
|
|
27
|
+
const currentIndex = props.items.indexOf(currentTab.value);
|
|
28
|
+
const previousIndex = (currentIndex - 1 + props.items.length) % props.items.length;
|
|
29
|
+
setCurrentTab(props.items[previousIndex]);
|
|
30
|
+
}
|
|
31
|
+
onMounted(() => {
|
|
32
|
+
if (props.rotateTabsAfter) {
|
|
33
|
+
setInterval(() => {
|
|
34
|
+
nextTab();
|
|
35
|
+
}, props.rotateTabsAfter * 1000);
|
|
36
|
+
}
|
|
37
|
+
})
|
|
38
|
+
|
|
39
|
+
</script>
|
|
40
|
+
|
|
41
|
+
<template>
|
|
42
|
+
<div role="tablist" class="tabs tabs-bordered tabs-lg mt-28 relative w-full">
|
|
43
|
+
<!-- controls -->
|
|
44
|
+
<div v-if="withControlls" class="hidden md:flex gap-4 right-0 top-4 absolute">
|
|
45
|
+
<button @click="previousTab()" class="cursor-pointer">Previous</button>
|
|
46
|
+
<button @click="nextTab()" class="cursor-pointer text-primary">Next</button>
|
|
47
|
+
</div>
|
|
48
|
+
<!-- tab buttons -->
|
|
49
|
+
<template v-for="item in items">
|
|
50
|
+
<a type="button" role="tab" class="tab min-w-max"
|
|
51
|
+
:class="item === currentTab ? 'bg-primary text-base-100' : ''" @click="setCurrentTab(item)"
|
|
52
|
+
:aria-selected="currentTab == item"> {{ item }}</a>
|
|
53
|
+
<!-- tab content -->
|
|
54
|
+
<div role="tabpanel"
|
|
55
|
+
class="tab-content border-base-300 border-t-2 border-x-0 border-b-0 p-6 overflow-x-auto max-w-full">
|
|
56
|
+
<slot :name="`${item}-tab`"></slot>
|
|
57
|
+
</div>
|
|
58
|
+
</template>
|
|
59
|
+
</div>
|
|
60
|
+
</template>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useLocalStorage: <T>(key: string, initialValue: T) => [T | null] extends [import("vue").Ref<any, any>] ? import("@vue/shared").IfAny<import("vue").Ref<any, any> & T, import("vue").Ref<import("vue").Ref<any, any> & T, import("vue").Ref<any, any> & T>, import("vue").Ref<any, any> & T> : import("vue").Ref<import("vue").UnwrapRef<T> | null, T | import("vue").UnwrapRef<T> | null>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { onMounted, ref, watch } from "vue";
|
|
2
|
+
export const useLocalStorage = (key, initialValue) => {
|
|
3
|
+
const storedValue = ref(null);
|
|
4
|
+
onMounted(() => {
|
|
5
|
+
if (typeof window !== "undefined") {
|
|
6
|
+
const stored = window.localStorage.getItem(key);
|
|
7
|
+
storedValue.value = stored ? JSON.parse(stored) : initialValue;
|
|
8
|
+
}
|
|
9
|
+
});
|
|
10
|
+
watch(storedValue, (newValue) => {
|
|
11
|
+
if (typeof window !== "undefined") {
|
|
12
|
+
window.localStorage.setItem(key, JSON.stringify(newValue));
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
return storedValue;
|
|
16
|
+
};
|
package/dist/types.d.mts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { type ModuleOptions, type ThemeOptions, default } from './module.js'
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { type ModuleOptions, type ThemeOptions, default } from './module'
|
package/package.json
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "manolis-ui",
|
|
3
|
+
"version": "1.0.6",
|
|
4
|
+
"description": "A modern design system made for vue based on daisy UI",
|
|
5
|
+
"repository": "manolis-trading/manolis-ui",
|
|
6
|
+
"license": "Apache-2.0",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/types.d.ts",
|
|
11
|
+
"import": "./dist/module.mjs",
|
|
12
|
+
"require": "./dist/module.cjs"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"main": "./dist/module.cjs",
|
|
16
|
+
"types": "./dist/types.d.ts",
|
|
17
|
+
"files": [
|
|
18
|
+
"dist"
|
|
19
|
+
],
|
|
20
|
+
"scripts": {
|
|
21
|
+
"prepack": "nuxt-module-build build",
|
|
22
|
+
"dev": "nuxi dev playground",
|
|
23
|
+
"dev:build": "nuxi build playground",
|
|
24
|
+
"dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxi prepare playground",
|
|
25
|
+
"release": "npm run lint && npm run test && npm run prepack && changelogen --release && npm publish && git push --follow-tags",
|
|
26
|
+
"lint": "eslint .",
|
|
27
|
+
"test": "vitest run",
|
|
28
|
+
"test:watch": "vitest watch",
|
|
29
|
+
"test:types": "vue-tsc --noEmit && cd playground && vue-tsc --noEmit",
|
|
30
|
+
"storybook": "storybook dev -p 6006",
|
|
31
|
+
"build-storybook": "storybook build"
|
|
32
|
+
},
|
|
33
|
+
"dependencies": {
|
|
34
|
+
"@nuxt/kit": "^3.14.159",
|
|
35
|
+
"lucide-vue-next": "^0.460.0"
|
|
36
|
+
},
|
|
37
|
+
"devDependencies": {
|
|
38
|
+
"@chromatic-com/storybook": "^3.2.2",
|
|
39
|
+
"@nuxt/devtools": "^1.6.0",
|
|
40
|
+
"@nuxt/eslint-config": "^0.7.1",
|
|
41
|
+
"@nuxt/module-builder": "^0.8.4",
|
|
42
|
+
"@nuxt/schema": "^3.14.159",
|
|
43
|
+
"@nuxt/test-utils": "^3.14.4",
|
|
44
|
+
"@nuxtjs/tailwindcss": "^6.12.2",
|
|
45
|
+
"@storybook/addon-essentials": "8.5.0-alpha.7",
|
|
46
|
+
"@storybook/addon-interactions": "8.5.0-alpha.7",
|
|
47
|
+
"@storybook/addon-links": "^8.4.4",
|
|
48
|
+
"@storybook/addon-postcss": "^2.0.0",
|
|
49
|
+
"@storybook/blocks": "8.5.0-alpha.7",
|
|
50
|
+
"@storybook/test": "8.5.0-alpha.7",
|
|
51
|
+
"@storybook/vue3": "8.5.0-alpha.7",
|
|
52
|
+
"@storybook/vue3-vite": "8.5.0-alpha.7",
|
|
53
|
+
"@types/node": "^22.9.1",
|
|
54
|
+
"@vitejs/plugin-vue": "^5.2.0",
|
|
55
|
+
"changelogen": "^0.5.7",
|
|
56
|
+
"daisyui": "^4.12.14",
|
|
57
|
+
"eslint": "^9.15.0",
|
|
58
|
+
"eslint-plugin-storybook": "^0.11.1",
|
|
59
|
+
"nuxt": "^3.14.159",
|
|
60
|
+
"storybook": "8.5.0-alpha.7",
|
|
61
|
+
"storybook-addon-vue-slots": "^0.9.29",
|
|
62
|
+
"typescript": "latest",
|
|
63
|
+
"vitest": "^2.1.5",
|
|
64
|
+
"vue": "^3.2",
|
|
65
|
+
"vue-tsc": "^2.1.10"
|
|
66
|
+
},
|
|
67
|
+
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e",
|
|
68
|
+
"eslintConfig": {
|
|
69
|
+
"extends": [
|
|
70
|
+
"plugin:storybook/recommended"
|
|
71
|
+
]
|
|
72
|
+
}
|
|
73
|
+
}
|