manolis-ui 0.0.11 → 0.0.13
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/package.json +6 -3
- package/.github/workflows/deploy_and_publish.yml +0 -113
- package/.storybook/main.ts +0 -34
- package/.storybook/preview.ts +0 -17
- package/.vscode/extensions.json +0 -3
- package/index.html +0 -13
- package/postcss.config.js +0 -2
- package/public/vite.svg +0 -1
- package/src/App.vue +0 -19
- package/src/assets/vue.svg +0 -1
- package/src/components/actions/ButtonComponent.vue +0 -80
- package/src/components/actions/dropdown.vue +0 -46
- package/src/components/actions/modal.vue +0 -52
- package/src/components/actions/swap.vue +0 -15
- package/src/components/actions/theme-controller.vue +0 -52
- package/src/components/data-display/accordion.vue +0 -29
- package/src/components/data-display/avatar.vue +0 -36
- package/src/components/data-display/badge.vue +0 -35
- package/src/components/data-display/card.vue +0 -60
- package/src/components/data-display/carousel.vue +0 -34
- package/src/components/data-input/advancedSearch.vue +0 -227
- package/src/components/data-input/datetimePicker.vue +0 -402
- package/src/components/data-input/input.vue +0 -98
- package/src/components/data-input/rating.vue +0 -60
- package/src/components/feedback/loader.vue +0 -25
- package/src/components/layout/footer.vue +0 -38
- package/src/components/layout/hero.vue +0 -15
- package/src/components/navigation/categoryNavigation.vue +0 -40
- package/src/components/navigation/navigationBar.vue +0 -107
- package/src/components/navigation/tab.vue +0 -62
- package/src/composables/useLocalStorage.ts +0 -24
- package/src/index.ts +0 -30
- package/src/main.ts +0 -5
- package/src/stories/actions/Button.stories.ts +0 -47
- package/src/stories/actions/Dropdown.stories.ts +0 -70
- package/src/stories/actions/Modal.stories.ts +0 -56
- package/src/stories/actions/Swap.stories.ts +0 -56
- package/src/stories/actions/ThemeSwitcher.stories.ts +0 -41
- package/src/stories/data-display/accordion.stories.ts +0 -49
- package/src/stories/data-display/avatar.stories.ts +0 -75
- package/src/stories/data-display/badge.stories.ts +0 -76
- package/src/stories/data-display/card.stories.ts +0 -79
- package/src/stories/data-input/rating.stories.ts +0 -73
- package/src/stories/feedback/Loader.stories.ts +0 -34
- package/src/stories/layout/footer.stories.ts +0 -63
- package/src/style.css +0 -57
- package/src/vite-env.d.ts +0 -1
- package/storybook-static/assets/Button.stories-B5Gg7Ski.js +0 -6
- package/storybook-static/assets/Color-YHDXOIA2-Cy_mA6cn.js +0 -1
- package/storybook-static/assets/DocsRenderer-CFRXHY34-wSGN0bIp.js +0 -610
- package/storybook-static/assets/Dropdown.stories-Bth3_21L.js +0 -32
- package/storybook-static/assets/Loader.stories-BnqtyQP_.js +0 -5
- package/storybook-static/assets/Modal.stories-CxOA4msz.js +0 -46
- package/storybook-static/assets/Swap.stories-Cpc9q_kE.js +0 -54
- package/storybook-static/assets/ThemeSwitcher.stories-BwHcHihM.js +0 -45
- package/storybook-static/assets/accordion.stories-B6yDsDXk.js +0 -7
- package/storybook-static/assets/avatar.stories-BDN93iYh.js +0 -39
- package/storybook-static/assets/badge.stories-CXQpnu0e.js +0 -39
- package/storybook-static/assets/card.stories-1gVWO2fs.js +0 -48
- package/storybook-static/assets/entry-preview-Cfvj9hgI.js +0 -1
- package/storybook-static/assets/entry-preview-docs-BJQT5BWv.js +0 -16
- package/storybook-static/assets/footer.stories-DPXqApht.js +0 -23
- package/storybook-static/assets/iframe-BNdG_Qtn.js +0 -211
- package/storybook-static/assets/index-Bx-go_-4.js +0 -8
- package/storybook-static/assets/index-CiNYFPF0.js +0 -1
- package/storybook-static/assets/index-DrFu-skq.js +0 -6
- package/storybook-static/assets/preview-4lzcCKUM.css +0 -1
- package/storybook-static/assets/preview-B8lJiyuQ.js +0 -34
- package/storybook-static/assets/preview-BBWR9nbA.js +0 -1
- package/storybook-static/assets/preview-BWzBA1C2.js +0 -396
- package/storybook-static/assets/preview-CvbIS5ZJ.js +0 -1
- package/storybook-static/assets/preview-DD_OYowb.js +0 -1
- package/storybook-static/assets/preview-DGUiP6tS.js +0 -7
- package/storybook-static/assets/preview-DHQbi4pV.js +0 -1
- package/storybook-static/assets/preview-DMNI4LCC.js +0 -15
- package/storybook-static/assets/preview-DnqJFqn_.js +0 -2
- package/storybook-static/assets/preview-Dsq_8SDT.js +0 -240
- package/storybook-static/assets/preview-hHK5u5_Q.js +0 -1
- package/storybook-static/assets/rating.stories-BX0Pzp5i.js +0 -27
- package/storybook-static/assets/vue.esm-bundler-C-YazFc_.js +0 -36
- package/storybook-static/favicon.svg +0 -1
- package/storybook-static/iframe.html +0 -666
- package/storybook-static/index.html +0 -181
- package/storybook-static/index.json +0 -1
- package/storybook-static/nunito-sans-bold-italic.woff2 +0 -0
- package/storybook-static/nunito-sans-bold.woff2 +0 -0
- package/storybook-static/nunito-sans-italic.woff2 +0 -0
- package/storybook-static/nunito-sans-regular.woff2 +0 -0
- package/storybook-static/project.json +0 -1
- package/storybook-static/sb-addons/chromatic-com-storybook-9/manager-bundle.js +0 -331
- package/storybook-static/sb-addons/chromatic-com-storybook-9/manager-bundle.js.LEGAL.txt +0 -51
- package/storybook-static/sb-addons/essentials-actions-2/manager-bundle.js +0 -3
- package/storybook-static/sb-addons/essentials-backgrounds-4/manager-bundle.js +0 -12
- package/storybook-static/sb-addons/essentials-controls-1/manager-bundle.js +0 -402
- package/storybook-static/sb-addons/essentials-docs-3/manager-bundle.js +0 -242
- package/storybook-static/sb-addons/essentials-measure-7/manager-bundle.js +0 -3
- package/storybook-static/sb-addons/essentials-outline-8/manager-bundle.js +0 -3
- package/storybook-static/sb-addons/essentials-toolbars-6/manager-bundle.js +0 -3
- package/storybook-static/sb-addons/essentials-viewport-5/manager-bundle.js +0 -3
- package/storybook-static/sb-addons/interactions-10/manager-bundle.js +0 -222
- package/storybook-static/sb-addons/links-11/manager-bundle.js +0 -3
- package/storybook-static/sb-addons/storybook-core-core-server-presets-0/common-manager-bundle.js +0 -3
- package/storybook-static/sb-common-assets/favicon.svg +0 -1
- package/storybook-static/sb-common-assets/nunito-sans-bold-italic.woff2 +0 -0
- package/storybook-static/sb-common-assets/nunito-sans-bold.woff2 +0 -0
- package/storybook-static/sb-common-assets/nunito-sans-italic.woff2 +0 -0
- package/storybook-static/sb-common-assets/nunito-sans-regular.woff2 +0 -0
- package/storybook-static/sb-manager/globals-module-info.js +0 -1046
- package/storybook-static/sb-manager/globals-runtime.js +0 -41239
- package/storybook-static/sb-manager/globals.js +0 -48
- package/storybook-static/sb-manager/runtime.js +0 -12048
- package/storybook-static/vite.svg +0 -1
- package/tsconfig.app.json +0 -27
- package/tsconfig.build.json +0 -3
- package/tsconfig.json +0 -7
- package/tsconfig.node.json +0 -25
- package/vite.config.ts +0 -43
package/package.json
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "manolis-ui",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.13",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"
|
|
7
|
-
|
|
6
|
+
"files": [
|
|
7
|
+
"dist/*"
|
|
8
|
+
],
|
|
9
|
+
"main": "./dist/manolis-ui.js",
|
|
10
|
+
"module": "./dist/manolis-ui.umd.js",
|
|
8
11
|
"types": "./dist/index.d.ts",
|
|
9
12
|
"exports": {
|
|
10
13
|
".": {
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
name: Deploy to GitHub Pages and npm
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches:
|
|
6
|
-
- master
|
|
7
|
-
|
|
8
|
-
jobs:
|
|
9
|
-
build-and-deploy:
|
|
10
|
-
runs-on: ubuntu-latest
|
|
11
|
-
|
|
12
|
-
steps:
|
|
13
|
-
- name: Checkout repository
|
|
14
|
-
uses: actions/checkout@v3
|
|
15
|
-
with:
|
|
16
|
-
fetch-depth: 0 # Important: Fetch all history for accurate version bumping
|
|
17
|
-
|
|
18
|
-
- uses: pnpm/action-setup@v3
|
|
19
|
-
name: Install pnpm
|
|
20
|
-
with:
|
|
21
|
-
run_install: false
|
|
22
|
-
|
|
23
|
-
- name: Install Node.js
|
|
24
|
-
uses: actions/setup-node@v3
|
|
25
|
-
with:
|
|
26
|
-
node-version: 20
|
|
27
|
-
cache: 'pnpm'
|
|
28
|
-
registry-url: 'https://registry.npmjs.org'
|
|
29
|
-
|
|
30
|
-
- name: Install dependencies
|
|
31
|
-
run: pnpm install
|
|
32
|
-
|
|
33
|
-
# --- Version Bumping ---
|
|
34
|
-
- name: Bump Version and Commit
|
|
35
|
-
id: version_bump
|
|
36
|
-
run: |
|
|
37
|
-
LAST_COMMIT_MESSAGE=$(git log -1 --pretty=%B)
|
|
38
|
-
|
|
39
|
-
if [[ "$LAST_COMMIT_MESSAGE" == *"BREAKING CHANGE"* ]]; then
|
|
40
|
-
BUMP_TYPE="major"
|
|
41
|
-
elif [[ "$LAST_COMMIT_MESSAGE" == *"feat:"* ]]; then
|
|
42
|
-
BUMP_TYPE="minor"
|
|
43
|
-
else
|
|
44
|
-
BUMP_TYPE="patch"
|
|
45
|
-
fi
|
|
46
|
-
|
|
47
|
-
# Get the current version
|
|
48
|
-
CURRENT_VERSION=$(node -p "require('./package.json').version")
|
|
49
|
-
|
|
50
|
-
# Determine the new version based on bump type (you might need to implement your own logic here)
|
|
51
|
-
if [[ "$BUMP_TYPE" == "major" ]]; then
|
|
52
|
-
NEW_VERSION=$(node -p "('${CURRENT_VERSION}'.split('.').map((x, i) => i === 0 ? parseInt(x) + 1 : 0)).join('.')")
|
|
53
|
-
elif [[ "$BUMP_TYPE" == "minor" ]]; then
|
|
54
|
-
NEW_VERSION=$(node -p "('${CURRENT_VERSION}'.split('.').map((x, i) => i === 1 ? parseInt(x) + 1 : (i > 1 ? 0 : x))).join('.')")
|
|
55
|
-
else
|
|
56
|
-
NEW_VERSION=$(node -p "('${CURRENT_VERSION}'.split('.').map((x, i) => i === 2 ? parseInt(x) + 1 : x)).join('.')")
|
|
57
|
-
fi
|
|
58
|
-
|
|
59
|
-
# Update package.json with the new version (using a temporary file)
|
|
60
|
-
TMP_FILE=$(mktemp)
|
|
61
|
-
node -p "JSON.stringify({...require('./package.json'), version: '$NEW_VERSION'}, null, 2)" > "$TMP_FILE"
|
|
62
|
-
mv "$TMP_FILE" package.json
|
|
63
|
-
|
|
64
|
-
# Validate JSON syntax
|
|
65
|
-
jq '.' package.json
|
|
66
|
-
|
|
67
|
-
# Configure Git user
|
|
68
|
-
git config user.email "github-actions[bot]@users.noreply.github.com"
|
|
69
|
-
git config user.name "github-actions[bot]"
|
|
70
|
-
|
|
71
|
-
# Stage and commit the changes
|
|
72
|
-
git add package.json
|
|
73
|
-
git commit -m "chore(release): v$NEW_VERSION [skip ci]"
|
|
74
|
-
|
|
75
|
-
# Now create the tag
|
|
76
|
-
git tag "v$NEW_VERSION"
|
|
77
|
-
|
|
78
|
-
echo "new_version=$NEW_VERSION" >> $GITHUB_OUTPUT
|
|
79
|
-
shell: bash
|
|
80
|
-
|
|
81
|
-
- name: Push changes
|
|
82
|
-
run: |
|
|
83
|
-
git push origin HEAD --tags
|
|
84
|
-
shell: bash
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
# --- Build ---
|
|
88
|
-
- name: Build Library
|
|
89
|
-
run: pnpm build # Replace 'build' with your actual library build script
|
|
90
|
-
|
|
91
|
-
- name: Build Storybook
|
|
92
|
-
run: pnpm build-storybook
|
|
93
|
-
|
|
94
|
-
- name: Deploy Storybook to GitHub Pages
|
|
95
|
-
uses: peaceiris/actions-gh-pages@v3
|
|
96
|
-
with:
|
|
97
|
-
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
98
|
-
publish_dir: ./storybook-static
|
|
99
|
-
|
|
100
|
-
# --- Publish ---
|
|
101
|
-
# Step 6: Publish to npm
|
|
102
|
-
- name: Publish to npm
|
|
103
|
-
run: pnpm publish --no-git-checks
|
|
104
|
-
env:
|
|
105
|
-
NODE_AUTH_TOKEN: ${{ secrets.NPM_ }} # Use the npm token stored in GitHub Secrets
|
|
106
|
-
|
|
107
|
-
# --- Push Changes (including new tag) ---
|
|
108
|
-
- name: Push Changes (including tag)
|
|
109
|
-
run: |
|
|
110
|
-
git config --global user.name "GitHub Actions Bot"
|
|
111
|
-
git config --global user.email "actions@github.com"
|
|
112
|
-
git push origin HEAD:master --follow-tags
|
|
113
|
-
if: success() # Only push if the previous steps were successful
|
package/.storybook/main.ts
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import type { StorybookConfig } from "@storybook/vue3-vite";
|
|
2
|
-
|
|
3
|
-
const config: StorybookConfig = {
|
|
4
|
-
stories: ["../src/**/*.mdx", "../src/**/*.stories.@(js|jsx|mjs|ts|tsx)"],
|
|
5
|
-
|
|
6
|
-
addons: [
|
|
7
|
-
"@storybook/addon-essentials",
|
|
8
|
-
"@chromatic-com/storybook",
|
|
9
|
-
"@storybook/addon-interactions",
|
|
10
|
-
"@storybook/addon-links",
|
|
11
|
-
"storybook-addon-vue-slots",
|
|
12
|
-
{
|
|
13
|
-
name: '@storybook/addon-postcss',
|
|
14
|
-
options: {
|
|
15
|
-
cssLoaderOptions: {
|
|
16
|
-
importLoaders: 1,
|
|
17
|
-
},
|
|
18
|
-
postcssLoaderOptions: {
|
|
19
|
-
implementation: require('postcss'),
|
|
20
|
-
},
|
|
21
|
-
},
|
|
22
|
-
}
|
|
23
|
-
],
|
|
24
|
-
|
|
25
|
-
framework: {
|
|
26
|
-
name: "@storybook/vue3-vite",
|
|
27
|
-
options: {},
|
|
28
|
-
},
|
|
29
|
-
|
|
30
|
-
docs: {
|
|
31
|
-
autodocs: true
|
|
32
|
-
}
|
|
33
|
-
};
|
|
34
|
-
export default config;
|
package/.storybook/preview.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { Preview } from "@storybook/vue3";
|
|
2
|
-
import "../src/style.css"
|
|
3
|
-
|
|
4
|
-
const preview: Preview = {
|
|
5
|
-
parameters: {
|
|
6
|
-
controls: {
|
|
7
|
-
matchers: {
|
|
8
|
-
color: /(background|color)$/i,
|
|
9
|
-
date: /Date$/i,
|
|
10
|
-
},
|
|
11
|
-
},
|
|
12
|
-
},
|
|
13
|
-
|
|
14
|
-
tags: ["autodocs"]
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
export default preview;
|
package/.vscode/extensions.json
DELETED
package/index.html
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8" />
|
|
5
|
-
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
|
6
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
|
-
<title>Vite + Vue + TS</title>
|
|
8
|
-
</head>
|
|
9
|
-
<body>
|
|
10
|
-
<div id="app"></div>
|
|
11
|
-
<script type="module" src="/src/main.ts"></script>
|
|
12
|
-
</body>
|
|
13
|
-
</html>
|
package/postcss.config.js
DELETED
package/public/vite.svg
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
|
package/src/App.vue
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
<!-- <script setup lang="ts">
|
|
2
|
-
import { ref } from 'vue';
|
|
3
|
-
import Input from './components/data-input/input.vue';
|
|
4
|
-
// Reactive properties for input values
|
|
5
|
-
const password = ref("");
|
|
6
|
-
const email = ref("");
|
|
7
|
-
|
|
8
|
-
// import HelloWorld from './components/HelloWorld.vue'
|
|
9
|
-
</script>
|
|
10
|
-
|
|
11
|
-
<template>
|
|
12
|
-
<div class="p-4">
|
|
13
|
-
<Input
|
|
14
|
-
v-model="password"
|
|
15
|
-
placeholder="Enter your username"
|
|
16
|
-
type="tel"
|
|
17
|
-
/>
|
|
18
|
-
</div>
|
|
19
|
-
</template> -->
|
package/src/assets/vue.svg
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="37.07" height="36" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 198"><path fill="#41B883" d="M204.8 0H256L128 220.8L0 0h97.92L128 51.2L157.44 0h47.36Z"></path><path fill="#41B883" d="m0 0l128 220.8L256 0h-51.2L128 132.48L50.56 0H0Z"></path><path fill="#35495E" d="M50.56 0L128 133.12L204.8 0h-47.36L128 51.2L97.92 0H50.56Z"></path></svg>
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { computed } 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
|
-
case 'full':
|
|
29
|
-
return 'w-full';
|
|
30
|
-
default:
|
|
31
|
-
return '';
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
|
|
35
|
-
const buttonType = computed(() => {
|
|
36
|
-
switch (props.type) {
|
|
37
|
-
case "neutral":
|
|
38
|
-
return "btn-neutral";
|
|
39
|
-
case "primary":
|
|
40
|
-
return "btn-primary";
|
|
41
|
-
case "secondary":
|
|
42
|
-
return "btn-secondary";
|
|
43
|
-
case "accent":
|
|
44
|
-
return "btn-accent";
|
|
45
|
-
case "ghost":
|
|
46
|
-
return "btn-ghost";
|
|
47
|
-
case "link":
|
|
48
|
-
return "btn-link px-0!";
|
|
49
|
-
case "info":
|
|
50
|
-
return "btn-info";
|
|
51
|
-
case "success":
|
|
52
|
-
return "btn-success";
|
|
53
|
-
case "warning":
|
|
54
|
-
return "btn-warning";
|
|
55
|
-
case "error":
|
|
56
|
-
return "btn-error";
|
|
57
|
-
default:
|
|
58
|
-
return "btn-neutral";
|
|
59
|
-
}
|
|
60
|
-
});
|
|
61
|
-
|
|
62
|
-
const shapeClass = computed(() => {
|
|
63
|
-
switch (props.shape) {
|
|
64
|
-
case "square":
|
|
65
|
-
return "btn-square";
|
|
66
|
-
case "circle":
|
|
67
|
-
return "btn-circle";
|
|
68
|
-
default:
|
|
69
|
-
return "";
|
|
70
|
-
}
|
|
71
|
-
});
|
|
72
|
-
</script>
|
|
73
|
-
|
|
74
|
-
<template>
|
|
75
|
-
<button
|
|
76
|
-
:class="['btn', {['btn-outline']: props.outlined }, {['btn-active']: props.active }, buttonType, sizeClass, shapeClass]">
|
|
77
|
-
<span v-if="loading" class="loading loading-spinner"></span>
|
|
78
|
-
<slot>Submit</slot>
|
|
79
|
-
</button>
|
|
80
|
-
</template>
|
|
@@ -1,46 +0,0 @@
|
|
|
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="m-1 btn">Open dropdown</div>
|
|
39
|
-
</slot>
|
|
40
|
-
<ul tabindex="0" class="z-1 bg-base-100 shadow-sm p-2 rounded-sm min-w-[inherit] md:min-w-full xl:min-w-52 dropdown-content menu">
|
|
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>
|
|
@@ -1,52 +0,0 @@
|
|
|
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[props.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>
|
|
@@ -1,15 +0,0 @@
|
|
|
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>
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
<script lang="ts" setup>
|
|
2
|
-
import { Sun, Moon } from 'lucide-vue-next';
|
|
3
|
-
import { 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
|
-
lightTheme?: string;
|
|
9
|
-
darkTheme?: string;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
const props = withDefaults(defineProps<Props>(), {
|
|
13
|
-
lightTheme: 'light',
|
|
14
|
-
darkTheme: 'dark'
|
|
15
|
-
});
|
|
16
|
-
|
|
17
|
-
// Use the composable for localStorage functionality
|
|
18
|
-
const themeValue = useLocalStorage('theme', props.lightTheme);
|
|
19
|
-
|
|
20
|
-
// Function to apply DaisyUI theme using `data-theme` attribute
|
|
21
|
-
function updateTheme(theme: string) {
|
|
22
|
-
if (typeof window !== 'undefined' && window.document) {
|
|
23
|
-
const htmlElement = document.documentElement;
|
|
24
|
-
htmlElement.setAttribute('data-theme', theme);
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
// Apply the theme on mounted (client-side only)
|
|
29
|
-
onMounted(() => updateTheme(themeValue.value ? themeValue.value : ""));
|
|
30
|
-
|
|
31
|
-
// Watch themeValue changes and update localStorage
|
|
32
|
-
watch(themeValue, (newValue : any) => {
|
|
33
|
-
updateTheme(newValue); // Apply the theme change
|
|
34
|
-
});
|
|
35
|
-
</script>
|
|
36
|
-
|
|
37
|
-
<template>
|
|
38
|
-
<label class="swap-rotate swap">
|
|
39
|
-
<!-- Checkbox controls the state -->
|
|
40
|
-
<input
|
|
41
|
-
type="checkbox"
|
|
42
|
-
class="theme-controller"
|
|
43
|
-
v-model="themeValue"
|
|
44
|
-
:true-value="props.lightTheme"
|
|
45
|
-
:false-value="props.darkTheme"
|
|
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>
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
<script lang="ts" setup>
|
|
2
|
-
|
|
3
|
-
const props = withDefaults(defineProps<Props>(), {
|
|
4
|
-
joinItems: false
|
|
5
|
-
});
|
|
6
|
-
|
|
7
|
-
interface Props {
|
|
8
|
-
name: string;
|
|
9
|
-
items: Array<Accordion>;
|
|
10
|
-
joinItems?: boolean;
|
|
11
|
-
icon?: "arrow" | "plus";
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
interface Accordion {
|
|
15
|
-
title: string;
|
|
16
|
-
content: string;
|
|
17
|
-
}
|
|
18
|
-
</script>
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
<template>
|
|
22
|
-
<div class="collapse border border-base-300" :class="[icon ? `collapse-${icon}` : '', { ['join-item']: joinItems }]" v-for="(item, index) in props.items" :key="index">
|
|
23
|
-
<input type="radio" :name="name" value="true" />
|
|
24
|
-
<div class="collapse-title font-bold text-2xl lg:text-4xl">{{item.title}}</div>
|
|
25
|
-
<div class="collapse-content">
|
|
26
|
-
<span v-html="item.content"></span>
|
|
27
|
-
</div>
|
|
28
|
-
</div>
|
|
29
|
-
</template>
|
|
@@ -1,36 +0,0 @@
|
|
|
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="`avatar-${onlineStatus}`">
|
|
28
|
-
<div class="rounded-sm" v-if="image">
|
|
29
|
-
<img :src="image" class="w-full h-full">
|
|
30
|
-
</div>
|
|
31
|
-
|
|
32
|
-
<div v-else class="flex justify-center bg-neutral p-[25%] rounded-full w-16 text-neutral-content text-center">
|
|
33
|
-
<p class="text-xl">{{initials}}</p>
|
|
34
|
-
</div>
|
|
35
|
-
</div>
|
|
36
|
-
</template>
|
|
@@ -1,35 +0,0 @@
|
|
|
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>
|
|
@@ -1,60 +0,0 @@
|
|
|
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
|
-
loading: boolean;
|
|
11
|
-
class: string;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
const props = withDefaults(defineProps<Props>(), {
|
|
15
|
-
imgUrl: "",
|
|
16
|
-
alt: "A beautiful picture that says something about this card",
|
|
17
|
-
title: '',
|
|
18
|
-
outlined: false,
|
|
19
|
-
description: "",
|
|
20
|
-
loading: false,
|
|
21
|
-
class: ""
|
|
22
|
-
});
|
|
23
|
-
|
|
24
|
-
const outlined = ref<boolean>(props.outlined);
|
|
25
|
-
|
|
26
|
-
watch(
|
|
27
|
-
() => props.outlined,
|
|
28
|
-
(newValue) => {
|
|
29
|
-
outlined.value = newValue;
|
|
30
|
-
}
|
|
31
|
-
);
|
|
32
|
-
</script>
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
<template>
|
|
36
|
-
<div class="bg-base-100 shadow-xl rounded-sm min-w-64 max-w-full h-full card card-compact group"
|
|
37
|
-
:class="outlined? 'border-4 border-primary': ''">
|
|
38
|
-
<figure>
|
|
39
|
-
<img :src="imgUrl" :alt="alt" class="rounded-sm w-full h-44 object-cover" v-if="imgUrl || imgUrl && !loading" :class="{
|
|
40
|
-
'hidden': loading
|
|
41
|
-
}" />
|
|
42
|
-
<div class="w-full h-32 skeleton" v-if="loading && imgUrl"></div>
|
|
43
|
-
</figure>
|
|
44
|
-
<div class="card-body" v-if="!loading">
|
|
45
|
-
<h2 class="group-hover:text-primary text-left text-lg cursor-pointer card-title" v-if="title">{{ title }}</h2>
|
|
46
|
-
<slot name="details"></slot>
|
|
47
|
-
<p class="text-left" v-if="description">{{ description }}</p>
|
|
48
|
-
<div class="flex-col flex-nowrap mt-auto card-actions">
|
|
49
|
-
<slot name="actions" />
|
|
50
|
-
</div>
|
|
51
|
-
</div>
|
|
52
|
-
<div class="card-body" v-if="loading">
|
|
53
|
-
<div class="flex flex-col gap-4 w-52">
|
|
54
|
-
<div class="w-28 h-4 skeleton"></div>
|
|
55
|
-
<div class="w-full h-4 skeleton"></div>
|
|
56
|
-
<div class="w-full h-4 skeleton"></div>
|
|
57
|
-
</div>
|
|
58
|
-
</div>
|
|
59
|
-
</div>
|
|
60
|
-
</template>
|