manolis-ui 0.0.9 → 0.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/deploy_and_publish.yml +113 -0
- package/.storybook/main.ts +34 -0
- package/.storybook/preview.ts +17 -0
- package/.vscode/extensions.json +3 -0
- package/dist/manolis-ui.css +1 -1
- package/dist/manolis-ui.js +4 -4
- package/dist/manolis-ui.umd.cjs +1 -1
- package/dist/style.css +48 -0
- package/index.html +13 -0
- package/package.json +1 -5
- package/postcss.config.js +2 -0
- package/public/vite.svg +1 -0
- package/src/App.vue +19 -0
- package/src/assets/vue.svg +1 -0
- package/src/components/data-input/datetimePicker.vue +3 -10
- package/src/composables/useLocalStorage.ts +24 -0
- package/src/index.ts +30 -0
- package/src/main.ts +5 -0
- package/src/stories/actions/Button.stories.ts +47 -0
- package/src/stories/actions/Dropdown.stories.ts +70 -0
- package/src/stories/actions/Modal.stories.ts +56 -0
- package/src/stories/actions/Swap.stories.ts +56 -0
- package/src/stories/actions/ThemeSwitcher.stories.ts +41 -0
- package/src/stories/data-display/accordion.stories.ts +49 -0
- package/src/stories/data-display/avatar.stories.ts +75 -0
- package/src/stories/data-display/badge.stories.ts +76 -0
- package/src/stories/data-display/card.stories.ts +79 -0
- package/src/stories/data-input/rating.stories.ts +73 -0
- package/src/stories/feedback/Loader.stories.ts +34 -0
- package/src/stories/layout/footer.stories.ts +63 -0
- package/src/style.css +57 -0
- package/src/vite-env.d.ts +1 -0
- package/storybook-static/assets/Button.stories-B5Gg7Ski.js +6 -0
- package/storybook-static/assets/Color-YHDXOIA2-Cy_mA6cn.js +1 -0
- package/storybook-static/assets/DocsRenderer-CFRXHY34-wSGN0bIp.js +610 -0
- package/storybook-static/assets/Dropdown.stories-Bth3_21L.js +32 -0
- package/storybook-static/assets/Loader.stories-BnqtyQP_.js +5 -0
- package/storybook-static/assets/Modal.stories-CxOA4msz.js +46 -0
- package/storybook-static/assets/Swap.stories-Cpc9q_kE.js +54 -0
- package/storybook-static/assets/ThemeSwitcher.stories-BwHcHihM.js +45 -0
- package/storybook-static/assets/accordion.stories-B6yDsDXk.js +7 -0
- package/storybook-static/assets/avatar.stories-BDN93iYh.js +39 -0
- package/storybook-static/assets/badge.stories-CXQpnu0e.js +39 -0
- package/storybook-static/assets/card.stories-1gVWO2fs.js +48 -0
- package/storybook-static/assets/entry-preview-Cfvj9hgI.js +1 -0
- package/storybook-static/assets/entry-preview-docs-BJQT5BWv.js +16 -0
- package/storybook-static/assets/footer.stories-DPXqApht.js +23 -0
- package/storybook-static/assets/iframe-BNdG_Qtn.js +211 -0
- package/storybook-static/assets/index-Bx-go_-4.js +8 -0
- package/storybook-static/assets/index-CiNYFPF0.js +1 -0
- package/storybook-static/assets/index-DrFu-skq.js +6 -0
- package/storybook-static/assets/preview-4lzcCKUM.css +1 -0
- package/storybook-static/assets/preview-B8lJiyuQ.js +34 -0
- package/storybook-static/assets/preview-BBWR9nbA.js +1 -0
- package/storybook-static/assets/preview-BWzBA1C2.js +396 -0
- package/storybook-static/assets/preview-CvbIS5ZJ.js +1 -0
- package/storybook-static/assets/preview-DD_OYowb.js +1 -0
- package/storybook-static/assets/preview-DGUiP6tS.js +7 -0
- package/storybook-static/assets/preview-DHQbi4pV.js +1 -0
- package/storybook-static/assets/preview-DMNI4LCC.js +15 -0
- package/storybook-static/assets/preview-DnqJFqn_.js +2 -0
- package/storybook-static/assets/preview-Dsq_8SDT.js +240 -0
- package/storybook-static/assets/preview-hHK5u5_Q.js +1 -0
- package/storybook-static/assets/rating.stories-BX0Pzp5i.js +27 -0
- package/storybook-static/assets/vue.esm-bundler-C-YazFc_.js +36 -0
- package/storybook-static/favicon.svg +1 -0
- package/storybook-static/iframe.html +666 -0
- package/storybook-static/index.html +181 -0
- package/storybook-static/index.json +1 -0
- 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 +1 -0
- package/storybook-static/sb-addons/chromatic-com-storybook-9/manager-bundle.js +331 -0
- package/storybook-static/sb-addons/chromatic-com-storybook-9/manager-bundle.js.LEGAL.txt +51 -0
- package/storybook-static/sb-addons/essentials-actions-2/manager-bundle.js +3 -0
- package/storybook-static/sb-addons/essentials-backgrounds-4/manager-bundle.js +12 -0
- package/storybook-static/sb-addons/essentials-controls-1/manager-bundle.js +402 -0
- package/storybook-static/sb-addons/essentials-docs-3/manager-bundle.js +242 -0
- package/storybook-static/sb-addons/essentials-measure-7/manager-bundle.js +3 -0
- package/storybook-static/sb-addons/essentials-outline-8/manager-bundle.js +3 -0
- package/storybook-static/sb-addons/essentials-toolbars-6/manager-bundle.js +3 -0
- package/storybook-static/sb-addons/essentials-viewport-5/manager-bundle.js +3 -0
- package/storybook-static/sb-addons/interactions-10/manager-bundle.js +222 -0
- package/storybook-static/sb-addons/links-11/manager-bundle.js +3 -0
- package/storybook-static/sb-addons/storybook-core-core-server-presets-0/common-manager-bundle.js +3 -0
- package/storybook-static/sb-common-assets/favicon.svg +1 -0
- 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 +1046 -0
- package/storybook-static/sb-manager/globals-runtime.js +41239 -0
- package/storybook-static/sb-manager/globals.js +48 -0
- package/storybook-static/sb-manager/runtime.js +12048 -0
- package/storybook-static/vite.svg +1 -0
- package/tsconfig.app.json +27 -0
- package/tsconfig.build.json +3 -0
- package/tsconfig.json +7 -0
- package/tsconfig.node.json +25 -0
- package/vite.config.ts +43 -0
|
@@ -0,0 +1,113 @@
|
|
|
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
|
|
@@ -0,0 +1,34 @@
|
|
|
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;
|
|
@@ -0,0 +1,17 @@
|
|
|
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/dist/manolis-ui.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.tabs button[data-v-08fa37eb]{cursor:pointer}.tab-content[data-v-08fa37eb]{position:absolute;z-index:10;transform-origin:top center;transition:opacity .3s ease}.tabs-boxed[data-v-08fa37eb] :is(.tab-active,[aria-selected=true]):not(.tab-disabled):not([disabled]),.tabs-boxed[data-v-08fa37eb] :is(input:checked){background-color:var(--color-base-300);color:var(--color-base-content)}@media (max-width: 768px){.tab-content[data-v-08fa37eb]{width:100%;left:50%;transform:translate(-50%);top:auto;bottom:0}}@media (min-width: 769px){.tab-content[data-v-08fa37eb]{width:auto;left:unset;transform:unset}}.input[data-v-
|
|
1
|
+
.tabs button[data-v-08fa37eb]{cursor:pointer}.tab-content[data-v-08fa37eb]{position:absolute;z-index:10;transform-origin:top center;transition:opacity .3s ease}.tabs-boxed[data-v-08fa37eb] :is(.tab-active,[aria-selected=true]):not(.tab-disabled):not([disabled]),.tabs-boxed[data-v-08fa37eb] :is(input:checked){background-color:var(--color-base-300);color:var(--color-base-content)}@media (max-width: 768px){.tab-content[data-v-08fa37eb]{width:100%;left:50%;transform:translate(-50%);top:auto;bottom:0}}@media (min-width: 769px){.tab-content[data-v-08fa37eb]{width:auto;left:unset;transform:unset}}.input[data-v-cb781ab6]{cursor:pointer}.navigationbar[data-v-8ddb2b45]{display:grid;grid-template-columns:auto auto auto;grid-template-rows:auto auto;grid-template-areas:"center center center" "bottom bottom bottom";position:fixed;width:100%!important;gap:0 1rem;align-items:center;padding:var(--navbar-padding, .5rem);min-height:4rem;z-index:5}@media (min-width: 768px){.navigationbar[data-v-8ddb2b45]{grid-template-columns:.7fr 1.6fr .7fr;grid-template-areas:"start center end" "bottom bottom bottom";grid-row-gap:2rem;padding:2rem}}.navbar-start[data-v-8ddb2b45]{grid-area:start;height:100%}.navbar-center[data-v-8ddb2b45]{grid-area:center;width:100%;height:100%}.navbar-end[data-v-8ddb2b45]{width:100%;height:100%;grid-area:end}.navbar-bottom[data-v-8ddb2b45]{grid-area:center;width:100%;display:flex;justify-content:center;align-items:center}@media (min-width: 768px){.navbar-bottom[data-v-8ddb2b45]{grid-area:bottom}}nav.navigationbar.collapsed[data-v-8ddb2b45]{top:0;z-index:10;grid-template-columns:auto 1fr auto!important}@media (min-width: 768px){nav.navigationbar.collapsed[data-v-8ddb2b45]{row-gap:0;padding:1rem}}nav.navigationbar.collapsed .navbar-bottom[data-v-8ddb2b45]{grid-area:center!important}
|
package/dist/manolis-ui.js
CHANGED
|
@@ -798,12 +798,12 @@ const Fe = ae("SunIcon", [
|
|
|
798
798
|
]),
|
|
799
799
|
i.value || !d.popup ? (n(), a("div", {
|
|
800
800
|
key: 0,
|
|
801
|
-
class: $(["z-50 lg:bg-base-100 md:mt-2
|
|
801
|
+
class: $(["z-50 lg:bg-base-100 md:mt-2 md:p-4 px-4 rounded-md w-full", [{ absolute: d.popup }]]),
|
|
802
802
|
id: K.value
|
|
803
803
|
}, [
|
|
804
804
|
C.value ? (n(), a("div", $t, [
|
|
805
805
|
t("button", {
|
|
806
|
-
class: "md:block
|
|
806
|
+
class: "hidden md:block btn-outline btn btn-primary md:btn-sm",
|
|
807
807
|
onClick: xe
|
|
808
808
|
}, c[12] || (c[12] = [
|
|
809
809
|
t("svg", {
|
|
@@ -846,7 +846,7 @@ const Fe = ae("SunIcon", [
|
|
|
846
846
|
[j, f.value]
|
|
847
847
|
]),
|
|
848
848
|
t("button", {
|
|
849
|
-
class: "md:block
|
|
849
|
+
class: "hidden md:block btn-outline btn btn-primary md:btn-sm",
|
|
850
850
|
onClick: De
|
|
851
851
|
}, c[13] || (c[13] = [
|
|
852
852
|
t("svg", {
|
|
@@ -1044,7 +1044,7 @@ const Fe = ae("SunIcon", [
|
|
|
1044
1044
|
], 10, kt)) : x("", !0)
|
|
1045
1045
|
], 512));
|
|
1046
1046
|
}
|
|
1047
|
-
}, Ft = /* @__PURE__ */ X(Rt, [["__scopeId", "data-v-
|
|
1047
|
+
}, Ft = /* @__PURE__ */ X(Rt, [["__scopeId", "data-v-cb781ab6"]]), Ht = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1048
1048
|
__proto__: null,
|
|
1049
1049
|
default: Ft
|
|
1050
1050
|
}, Symbol.toStringTag, { value: "Module" })), qt = ["value", "checked", "onChange", "disabled"], xn = /* @__PURE__ */ M({
|
package/dist/manolis-ui.umd.cjs
CHANGED
|
@@ -33,4 +33,4 @@
|
|
|
33
33
|
*
|
|
34
34
|
* This source code is licensed under the ISC license.
|
|
35
35
|
* See the LICENSE file in the root directory of this source tree.
|
|
36
|
-
*/const le=L("SunIcon",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]),ae=(c,s)=>{const t=e.ref(null);return e.onMounted(()=>{if(typeof window<"u"){const o=window.localStorage.getItem(c);t.value=o?JSON.parse(o):s}}),e.watch(t,o=>{typeof window<"u"&&window.localStorage.setItem(c,JSON.stringify(o))}),t},re={class:"swap-rotate swap"},se=["true-value","false-value"],ce=e.defineComponent({__name:"theme-controller",props:{lightTheme:{default:"light"},darkTheme:{default:"dark"}},setup(c){const s=c,t=ae("theme",s.lightTheme);function o(r){typeof window<"u"&&window.document&&document.documentElement.setAttribute("data-theme",r)}return e.onMounted(()=>o(t.value?t.value:"")),e.watch(t,r=>{o(r)}),(r,l)=>(e.openBlock(),e.createElementBlock("label",re,[e.withDirectives(e.createElementVNode("input",{type:"checkbox",class:"theme-controller","onUpdate:modelValue":l[0]||(l[0]=d=>e.isRef(t)?t.value=d:null),"true-value":s.lightTheme,"false-value":s.darkTheme},null,8,se),[[e.vModelCheckbox,e.unref(t)]]),e.createVNode(e.unref(le),{class:"swap-off fill-current"}),e.createVNode(e.unref(oe),{class:"swap-on fill-current"})]))}}),ie=["name"],de={class:"collapse-title font-bold text-2xl lg:text-4xl"},me={class:"collapse-content"},pe=["innerHTML"],fe=e.defineComponent({__name:"accordion",props:{name:{},items:{},joinItems:{type:Boolean,default:!1},icon:{}},setup(c){const s=c;return(t,o)=>(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.items,(r,l)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["collapse border border-base-300",[t.icon?`collapse-${t.icon}`:"",{"join-item":t.joinItems}]]),key:l},[e.createElementVNode("input",{type:"radio",name:t.name,value:"true"},null,8,ie),e.createElementVNode("div",de,e.toDisplayString(r.title),1),e.createElementVNode("div",me,[e.createElementVNode("span",{innerHTML:r.content},null,8,pe)])],2))),128))}}),ue={key:0,class:"rounded-sm"},ge=["src"],ke={key:1,class:"flex justify-center bg-neutral p-[25%] rounded-full w-16 text-neutral-content text-center"},he={class:"text-xl"},be=e.defineComponent({__name:"avatar",props:{image:{},onlineStatus:{default:"none"},initials:{}},setup(c){const s=c,t=e.ref(s.onlineStatus);return e.watch(()=>s.onlineStatus,o=>{o&&(t.value=o)}),(o,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["avatar",`avatar-${o.onlineStatus}`])},[o.image?(e.openBlock(),e.createElementBlock("div",ue,[e.createElementVNode("img",{src:o.image,class:"w-full h-full"},null,8,ge)])):(e.openBlock(),e.createElementBlock("div",ke,[e.createElementVNode("p",he,e.toDisplayString(o.initials),1)]))],2))}}),ye=e.defineComponent({__name:"badge",props:{color:{default:"neutral"},outline:{type:Boolean,default:!1},size:{default:"medium"}},setup(c){const s=c,t={"extra small":"badge-xs",small:"badge-sm",medium:"badge-md",large:"badge-lg"},o={neutral:"badge-neutral",primary:"badge-primary",secondary:"badge-secondary",accent:"badge-accent",ghost:"badge-ghost",info:"badge-info",success:"badge-success",warning:"badge-warning",error:"badge-error"};return(r,l)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(["badge",t[s.size],o[s.color],{"badge-outline":s.outline}])},[e.renderSlot(r.$slots,"default")],2))}}),Be=["src","alt"],we={key:1,class:"w-full h-32 skeleton"},Ee={key:0,class:"card-body"},_e={key:0,class:"group-hover:text-primary text-left text-lg cursor-pointer card-title"},Se={key:1,class:"text-left"},Ce={class:"flex-col flex-nowrap mt-auto card-actions"},Ve={key:1,class:"card-body"},$e=e.defineComponent({__name:"card",props:{imgUrl:{default:""},alt:{default:"A beautiful picture that says something about this card"},title:{default:""},description:{default:""},outlined:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},class:{default:""}},setup(c){const s=c,t=e.ref(s.outlined);return e.watch(()=>s.outlined,o=>{t.value=o}),(o,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["bg-base-100 shadow-xl rounded-sm min-w-64 max-w-full h-full card card-compact group",t.value?"border-4 border-primary":""])},[e.createElementVNode("figure",null,[o.imgUrl||o.imgUrl&&!o.loading?(e.openBlock(),e.createElementBlock("img",{key:0,src:o.imgUrl,alt:o.alt,class:e.normalizeClass(["rounded-sm w-full h-44 object-cover",{hidden:o.loading}])},null,10,Be)):e.createCommentVNode("",!0),o.loading&&o.imgUrl?(e.openBlock(),e.createElementBlock("div",we)):e.createCommentVNode("",!0)]),o.loading?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Ee,[o.title?(e.openBlock(),e.createElementBlock("h2",_e,e.toDisplayString(o.title),1)):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"details"),o.description?(e.openBlock(),e.createElementBlock("p",Se,e.toDisplayString(o.description),1)):e.createCommentVNode("",!0),e.createElementVNode("div",Ce,[e.renderSlot(o.$slots,"actions")])])),o.loading?(e.openBlock(),e.createElementBlock("div",Ve,r[0]||(r[0]=[e.createElementVNode("div",{class:"flex flex-col gap-4 w-52"},[e.createElementVNode("div",{class:"w-28 h-4 skeleton"}),e.createElementVNode("div",{class:"w-full h-4 skeleton"}),e.createElementVNode("div",{class:"w-full h-4 skeleton"})],-1)]))):e.createCommentVNode("",!0)],2))}}),Ne={class:"flex gap-4 bg-base-100 w-full tabs tabs-boxed"},De=["onClick"],xe={class:"text-sm"},Me={class:"md:block hidden opacity-35 text-xs truncate overflow-hidden ..."},Te={class:"hidden"},ze={id:"advancedSearchMobile",class:"modal"},Le={class:"modal-box"},Fe={class:"font-bold text-lg"},Oe=["checked"],Ie={class:"flex justify-between items-center pr-4 w-full font-medium text-xl collapse-title"},Ue={class:"text-sm"},Ae={class:"flex place-content-center p-0 collapse-content"},Pe=e.defineComponent({__name:"advancedSearch",props:{searchOptions:{},currentCategory:{}},emits:["search","update:search-data"],setup(c,{emit:s}){const t=c,o=s,r=e.ref(null),l={datetime:e.defineAsyncComponent(()=>Promise.resolve().then(()=>it))},d=e.ref({}),k=e.ref({left:"0px",top:"0px",transform:"translateX(0%)"}),f=e.ref(null);function m(h,w){var B,E,u;if((B=r.value)!=null&&B.name){o("update:search-data",{tab:r.value.name,data:h});return}if(t.searchOptions){let b=(u=(E=t.searchOptions)==null?void 0:E.find(_=>(_==null?void 0:_.category)===t.currentCategory))==null?void 0:u.tabs[w];b!==void 0&&(b.value=h,o("update:search-data",{tab:b==null?void 0:b.name,data:b==null?void 0:b.value}))}}function p(){o("search")}async function C(h){f.value&&!f.value.contains(h.target)&&(await e.nextTick(),r.value=null)}async function F(){if(typeof window<"u"&&window.innerWidth<=768){const h=document.getElementById("advancedSearchMobile");h?h.showModal():console.warn("Modal element not found.")}}async function O(h){var B;r.value=h,await e.nextTick();const w=d.value[h.name];if(w){const E=w.getBoundingClientRect(),u=((B=f.value)==null?void 0:B.getBoundingClientRect())||{left:0,top:0};window.innerWidth>768?k.value={left:`${E.left+E.width/2-u.left}px`,top:`${E.bottom-u.top}px`,transform:"translateX(-50%)"}:k.value={left:"50%",top:`${E.bottom-u.top}px`,transform:"translateX(-50%)"}}else console.error("Tab element not found for:",h.name)}return e.onMounted(()=>{document.addEventListener("click",C)}),e.onBeforeUnmount(()=>{document.removeEventListener("click",C)}),(h,w)=>{var B,E;return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{ref_key:"searchContainer",ref:f,class:"w-full"},[e.createElementVNode("div",{class:"group/search relative flex place-items-center border-2 shadow-md p-2 border-base-300/25 rounded-sm w-full transition-all cursor-pointer md:cursor-auto",onClick:F},[e.createElementVNode("div",Ne,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(((B=t.searchOptions.find(u=>u.category===t.currentCategory))==null?void 0:B.tabs)||[],u=>{var b;return e.openBlock(),e.createElementBlock("button",{key:u.name,onClick:_=>O(u),class:e.normalizeClass([{"tab-active":((b=r.value)==null?void 0:b.name)===u.name},"group/searchitem relative after:top-0 after:-right-2 after:absolute first-of-type:flex-auto last-of-type:flex-auto md:after:content-[''] last-of-type:after:content-none after:content-none after:bg-base-200 hover:bg-base-200 p-1 rounded-sm w-auto after:w-[1px] after:h-10 text-start overflow-x-hidden pointer-events-none md:pointer-events-auto"]),ref_for:!0,ref:_=>d.value[u.name]=_},[e.createElementVNode("p",xe,e.toDisplayString(u.name),1),e.createElementVNode("p",Me,e.toDisplayString(u.description),1)],10,De)}),128))]),r.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"absolute flex shadow-sm mt-4 w-fit max-w-full transition-all tab-content",style:e.normalizeStyle(k.value)},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l[r.value.type]),e.mergeProps(r.value.props?r.value.props:null,{onUpdated:m}),null,16))],4)):e.createCommentVNode("",!0),e.createElementVNode("button",{title:"search",type:"submit",class:"ml-1 btn btn-primary btn-square",onClick:p},[e.createVNode(e.unref(A),{size:24,color:"white"})])]),e.createElementVNode("div",Te,[e.createElementVNode("button",{title:"search",onClick:w[0]||(w[0]=()=>{})},[e.createVNode(e.unref(A),{size:24,color:"white"})])])],512),e.createElementVNode("dialog",ze,[e.createElementVNode("div",Le,[e.renderSlot(h.$slots,"additionalForMobile",{},()=>[e.createElementVNode("h3",Fe,e.toDisplayString(h.currentCategory),1)],!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(((E=t.searchOptions.find(u=>u.category===t.currentCategory))==null?void 0:E.tabs)||[],(u,b)=>(e.openBlock(),e.createElementBlock("div",{class:"bg-base-200 my-4 collapse",key:u.name},[e.createElementVNode("input",{type:"radio",name:"my-accordion-1",checked:b===0},null,8,Oe),e.createElementVNode("div",Ie,[e.createTextVNode(e.toDisplayString(u.name)+" ",1),e.createElementVNode("p",Ue,e.toDisplayString(u.description),1)]),e.createElementVNode("div",Ae,[w[1]||(w[1]=e.createElementVNode("br",null,null,-1)),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l[u.type]),e.mergeProps({ref_for:!0},u.props||{},{onUpdated:_=>m(_,b)}),null,16,["onUpdated"]))])]))),128)),e.createElementVNode("div",{class:"modal-action"},[e.createElementVNode("form",{method:"dialog"},[e.createElementVNode("button",{class:"btn btn-primary",onClick:p},"Close and Search")])])])])],64)}}}),x=(c,s)=>{const t=c.__vccOpts||c;for(const[o,r]of s)t[o]=r;return t},je=x(Pe,[["__scopeId","data-v-08fa37eb"]]),Re=["placeholder","value","id"],He=["id"],qe={key:0,class:"flex justify-between items-center place-content-center mb-4"},Ye=["value"],Je=["value"],We={key:1,class:"gap-2 grid grid-cols-7"},Xe=["onClick"],Ze={key:2,class:"mt-4 lg:w-80"},Ke={key:0,class:"mb-2 font-bold text-lg"},Ge={key:1},Qe={key:1,class:"flex gap-4"},ve=["value"],et=["value"],tt={key:2,class:"flex flex-col gap-4"},nt={key:1,class:"flex gap-2"},ot=["value"],lt=["value"],at={key:1,class:"flex gap-2"},rt=["value"],st=["value"],ct={class:"flex gap-2 mt-4"},P=x({__name:"datetimePicker",props:{mode:{type:String,default:"datetime",validator:c=>["datetime","date","time"].includes(c)},range:{type:Boolean,default:!1},placeholder:{type:String,default:"Select date and time"},popup:{type:Boolean,default:!1},id:{type:String,default:"datetimepicker"},initialDate:{type:Object,default:()=>null}},emits:["updated"],setup(c,{emit:s}){const t=c;e.watch(()=>t.range,a=>{a?(l.value={start:null,end:null},d.value={start:null,end:null}):(l.value=null,d.value=null)});const o=s,r=e.ref(!1),l=e.ref(t.range?{start:null,end:null}:null),d=e.ref(t.range?{start:null,end:null}:null),k=e.ref(new Date().toLocaleString("default",{month:"long"})),f=e.ref(new Date().getFullYear()),m=e.ref(t.range?{start:0,end:0}:0),p=e.ref(t.range?{start:0,end:0}:0),C=e.ref(null),F=e.computed(()=>`${t.id}-input`),O=e.computed(()=>`${t.id}-popup`),h=e.computed(()=>t.mode==="date"||t.mode==="datetime"),w=e.computed(()=>t.mode==="time"||t.mode==="datetime");e.computed(()=>new Date(f.value,B.value));const B=e.computed(()=>T.indexOf(k.value)),E=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],u=e.computed(()=>new Date(f.value,B.value).getDay()),b=e.computed(()=>{const a=new Date(f.value,B.value+1,0).getDate();return Array.from({length:a},(i,n)=>new Date(f.value,B.value,n+1))}),_=e.computed(()=>Array.from({length:u.value},(a,i)=>i)),I=Array.from({length:24},(a,i)=>i),U=Array.from({length:60},(a,i)=>i),M=e.computed(()=>typeof navigator<"u"&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)),T=["January","February","March","April","May","June","July","August","September","October","November","December"],At=e.computed(()=>{const a=new Date().getFullYear();return Array.from({length:100},(i,n)=>a-50+n)}),Pt=e.computed(()=>{if(!h.value||!l.value)return"";if(t.range&&l.value.start&&l.value.end){const a=l.value.start.toLocaleDateString("en-US"),i=l.value.end.toLocaleDateString("en-US");return`${a} - ${i}`}return!t.range&&l.value?l.value.toLocaleDateString("en-US"):""}),$=a=>a instanceof Date?a:new Date(a),V=a=>a instanceof Date&&!isNaN(a),jt=e.computed(()=>{if(!w.value)return"";const a=i=>{var z,N,H;const n=((z=m.value)==null?void 0:z[i])??m.value,S=((N=p.value)==null?void 0:N[i])??p.value;return M.value?((H=d.value)==null?void 0:H[i])??d.value:`${n.toString().padStart(2,"0")}:${S.toString().padStart(2,"0")}`};return t.range?`${a("start")} - ${a("end")}`:a()}),Rt=e.computed(()=>{const a=Pt.value,i=jt.value;return`${a} ${i}`.trim()}),Ht=()=>r.value=!r.value,j=()=>{y(),qt()},qt=()=>r.value=!1,Yt=()=>{l.value=t.range?{start:null,end:null}:null,d.value=t.range?{start:null,end:null}:null,y()},Jt=a=>{t.range?l.value.start&&l.value.end?l.value={start:a,end:null}:l.value.start?l.value.end=a:l.value.start=a:l.value=a,y()},Wt=a=>(a=$(a),t.range?l.value.start&&V(l.value.start)&&a.getTime()===l.value.start.getTime()||l.value.end&&V(l.value.end)&&a.getTime()===l.value.end.getTime():V(l.value)&&a.getTime()===l.value.getTime()),Xt=a=>{a=$(a);const i=new Date;return a.getDate()===i.getDate()&&a.getMonth()===i.getMonth()&&a.getFullYear()===i.getFullYear()},Zt=a=>(a=$(a),t.range&&V(l.value.start)&&a.getTime()===l.value.start.getTime()),Kt=a=>(a=$(a),t.range&&V(l.value.end)&&a.getTime()===l.value.end.getTime()),Gt=a=>{if(a=$(a),t.range&&V(l.value.start)&&V(l.value.end)){const i=l.value.start.getTime(),n=l.value.end.getTime(),S=a.getTime();return S>i&&S<n}return!1},Qt=()=>{let a=B.value-1;a<0&&(a=11,f.value--),k.value=T[a],y()},vt=()=>{let a=B.value+1;a>11&&(a=0,f.value++),k.value=T[a],y()},R=a=>{C.value&&!C.value.contains(a.target)&&r.value==!0&&j()},y=()=>{let a={};const i=(n,S,z)=>{n instanceof Date&&!isNaN(n)||(n=new Date);const N=new Date(n);return N.setUTCHours(S,z,0,0),N.toISOString()};t.range?(a.from=i(l.value.start,m.value.start,p.value.start),a.to=i(l.value.end,m.value.end,p.value.end)):a=i(l.value,m.value,p.value),o("updated",a)};return e.onMounted(()=>{t.initialDate&&(t.range&&t.initialDate.start&&t.initialDate.end?l.value={start:new Date(t.initialDate.start),end:new Date(t.initialDate.end)}:t.initialDate.start&&(l.value={start:new Date(t.initialDate.start)})),t.range?(m.value.start=m.value.start??new Date().getHours(),m.value.end=m.value.end??new Date().getHours(),p.value.start=p.value.start??new Date().getMinutes(),p.value.end=p.value.end??new Date().getMinutes()):(m.value=m.value??new Date().getHours(),p.value=p.value??new Date().getMinutes())}),t.popup&&e.onMounted(()=>document.addEventListener("click",R)),e.onUnmounted(()=>document.removeEventListener("click",R)),(a,i)=>(e.openBlock(),e.createElementBlock("div",{class:"inline-block relative w-full lg:w-[360px]",ref_key:"pickerContainer",ref:C},[e.createElementVNode("div",{class:"flex items-center gap-2 cursor-pointer",onClick:Ht},[c.popup?e.renderSlot(a.$slots,"default",{key:0},()=>[e.createElementVNode("input",{type:"text",class:"input-bordered w-full cursor-pointer input",placeholder:c.placeholder,value:Rt.value,readonly:"",id:F.value},null,8,Re),i[11]||(i[11]=e.createElementVNode("button",{class:"btn btn-ghost"}," 📅 ",-1))],!0):e.createCommentVNode("",!0)]),r.value||!c.popup?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["z-50 lg:bg-base-100 md:mt-2 px-4 md:p-4 rounded-md w-full",[{absolute:c.popup}]]),id:O.value},[h.value?(e.openBlock(),e.createElementBlock("div",qe,[e.createElementVNode("button",{class:"md:block hidden btn btn-outline btn-primary md:btn-sm",onClick:Qt},i[12]||(i[12]=[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 19l-7-7 7-7"})],-1)])),e.withDirectives(e.createElementVNode("select",{class:"border-none w-fit select","onUpdate:modelValue":i[0]||(i[0]=n=>k.value=n),onChange:y},[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(T,(n,S)=>e.createElementVNode("option",{key:S,value:n},e.toDisplayString(n),9,Ye)),64))],544),[[e.vModelSelect,k.value]]),e.withDirectives(e.createElementVNode("select",{class:"border-none w-24 select","onUpdate:modelValue":i[1]||(i[1]=n=>f.value=n),onChange:y},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(At.value,n=>(e.openBlock(),e.createElementBlock("option",{key:n,value:n},e.toDisplayString(n),9,Je))),128))],544),[[e.vModelSelect,f.value]]),e.createElementVNode("button",{class:"md:block hidden btn btn-outline btn-primary md:btn-sm",onClick:vt},i[13]||(i[13]=[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5l7 7-7 7"})],-1)]))])):e.createCommentVNode("",!0),h.value?(e.openBlock(),e.createElementBlock("div",We,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(E,n=>e.createElementVNode("div",{key:n,class:"text-center"},e.toDisplayString(n),1)),64)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,n=>(e.openBlock(),e.createElementBlock("div",{key:n,class:"text-center"}))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value,n=>(e.openBlock(),e.createElementBlock("div",{key:n,class:e.normalizeClass(["hover:bg-primary-10 py-1 rounded-full text-center cursor-pointer",{"bg-primary text-primary-content":Wt(n),today:Xt(n),"range-start bg-primary text-primary-content":Zt(n),"range-end bg-primary text-primary-content":Kt(n),"in-range bg-primary/20 hover:bg-primary/10":Gt(n)}]),onClick:S=>Jt(n)},e.toDisplayString(n.getDate()),11,Xe))),128))])):e.createCommentVNode("",!0),w.value?(e.openBlock(),e.createElementBlock("div",Ze,[t.range?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("h3",Ke,"Select Time")),t.range?(e.openBlock(),e.createElementBlock("div",tt,[e.createElementVNode("div",null,[i[14]||(i[14]=e.createElementVNode("p",{class:"font-bold"},"Start Time",-1)),M.value?e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:0,type:"time",class:"input-bordered w-full input","onUpdate:modelValue":i[5]||(i[5]=n=>d.value.start=n),onChange:y},null,544)),[[e.vModelText,d.value.start]]):(e.openBlock(),e.createElementBlock("div",nt,[e.withDirectives(e.createElementVNode("select",{class:"w-full select-bordered select","onUpdate:modelValue":i[6]||(i[6]=n=>m.value.start=n),onChange:y},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(I),n=>(e.openBlock(),e.createElementBlock("option",{key:n,value:n},e.toDisplayString(n.toString().padStart(2,"0")),9,ot))),128))],544),[[e.vModelSelect,m.value.start,void 0,{number:!0}]]),e.withDirectives(e.createElementVNode("select",{class:"w-full select-bordered select","onUpdate:modelValue":i[7]||(i[7]=n=>p.value.start=n),onChange:y},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(U),n=>(e.openBlock(),e.createElementBlock("option",{key:n,value:n},e.toDisplayString(n.toString().padStart(2,"0")),9,lt))),128))],544),[[e.vModelSelect,p.value.start,void 0,{number:!0}]])]))]),e.createElementVNode("div",null,[i[15]||(i[15]=e.createElementVNode("p",{class:"font-bold"},"End Time",-1)),M.value?e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:0,type:"time",class:"input-bordered w-full input","onUpdate:modelValue":i[8]||(i[8]=n=>d.value.end=n),onChange:y},null,544)),[[e.vModelText,d.value.end]]):(e.openBlock(),e.createElementBlock("div",at,[e.withDirectives(e.createElementVNode("select",{class:"w-full select-bordered select","onUpdate:modelValue":i[9]||(i[9]=n=>m.value.end=n),onChange:y},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(I),n=>(e.openBlock(),e.createElementBlock("option",{key:n,value:n},e.toDisplayString(n.toString().padStart(2,"0")),9,rt))),128))],544),[[e.vModelSelect,m.value.end,void 0,{number:!0}]]),e.withDirectives(e.createElementVNode("select",{class:"w-full select-bordered select","onUpdate:modelValue":i[10]||(i[10]=n=>p.value.end=n),onChange:y},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(U),n=>(e.openBlock(),e.createElementBlock("option",{key:n,value:n},e.toDisplayString(n.toString().padStart(2,"0")),9,st))),128))],544),[[e.vModelSelect,p.value.end,void 0,{number:!0}]])]))])])):(e.openBlock(),e.createElementBlock("div",Ge,[M.value?e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:0,type:"time",class:"input-bordered w-full input","onUpdate:modelValue":i[2]||(i[2]=n=>d.value=n),onChange:y},null,544)),[[e.vModelText,d.value]]):(e.openBlock(),e.createElementBlock("div",Qe,[e.withDirectives(e.createElementVNode("select",{class:"w-full select-bordered select","onUpdate:modelValue":i[3]||(i[3]=n=>m.value=n),onChange:y},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(I),n=>(e.openBlock(),e.createElementBlock("option",{key:n,value:n},e.toDisplayString(n.toString().padStart(2,"0")),9,ve))),128))],544),[[e.vModelSelect,m.value,void 0,{number:!0}]]),e.withDirectives(e.createElementVNode("select",{class:"w-full select-bordered select","onUpdate:modelValue":i[4]||(i[4]=n=>p.value=n),onChange:y},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(U),n=>(e.openBlock(),e.createElementBlock("option",{key:n,value:n},e.toDisplayString(n.toString().padStart(2,"0")),9,et))),128))],544),[[e.vModelSelect,p.value,void 0,{number:!0}]])]))]))])):e.createCommentVNode("",!0),e.createElementVNode("div",ct,[e.createElementVNode("button",{class:e.normalizeClass(["btn btn-secondary",c.popup?"w-fit":"w-full"]),onClick:Yt},"Clear",2),c.popup?(e.openBlock(),e.createElementBlock("button",{key:0,class:"btn btn-primary btn-wide",onClick:j},"Close")):e.createCommentVNode("",!0)])],10,He)):e.createCommentVNode("",!0)],512))}},[["__scopeId","data-v-e7e203aa"]]),it=Object.freeze(Object.defineProperty({__proto__:null,default:P},Symbol.toStringTag,{value:"Module"})),dt=["value","checked","onChange","disabled"],mt=e.defineComponent({__name:"rating",props:{initialRating:{default:0},numberOfStars:{default:5},halfStars:{type:Boolean,default:!0},isInteractive:{type:Boolean,default:!1},size:{default:"sm"}},setup(c){const s=c,t=e.ref(s.initialRating);e.watch(()=>s.initialRating,r=>{t.value=r});const o=r=>{t.value=r};return(r,l)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["rating",[`rating-${s.size}`,{"rating-half":r.halfStars}]])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.numberOfStars*(r.halfStars?2:1),d=>(e.openBlock(),e.createElementBlock("input",{key:d,type:"radio",value:r.halfStars?d*.5:d,checked:t.value===(r.halfStars?d*.5:d),onChange:k=>r.isInteractive?o(r.halfStars?d*.5:d):null,class:e.normalizeClass(["mask mask-star",{"bg-yellow-400":t.value>=(r.halfStars?d*.5:d),"mask-half-1":r.halfStars&&d%2!==0,"mask-half-2":r.halfStars&&d%2===0,"cursor-pointer":r.isInteractive,"cursor-default":!r.isInteractive}]),disabled:!r.isInteractive},null,42,dt))),128))],2))}}),pt={key:0,class:"loading loading-spinner loading-md mx-auto"},ft=e.defineComponent({__name:"loader",props:{loading:{type:Boolean,default:!0}},setup(c){const s=c,t=e.ref(s.loading);return e.watch(()=>s.loading,o=>{t.value=o}),(o,r)=>t.value?(e.openBlock(),e.createElementBlock("span",pt)):e.createCommentVNode("",!0)}}),ut={class:"bg-base-200 mx-auto md:px-10 py-10 text-base-content"},gt={class:"footer sm:footer-horizontal container"},kt={class:"footer-title"},ht=["href"],bt={class:"ml-auto"},yt=e.defineComponent({__name:"footer",props:{items:{}},setup(c){const s=c;return(t,o)=>(e.openBlock(),e.createElementBlock("div",ut,[e.createElementVNode("footer",gt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.items,r=>(e.openBlock(),e.createElementBlock("nav",null,[e.createElementVNode("h6",kt,e.toDisplayString(r.title),1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.items,l=>(e.openBlock(),e.createElementBlock("a",{class:"link link-hover",href:l.link},e.toDisplayString(l.text),9,ht))),256))]))),256)),e.createElementVNode("aside",bt,[e.renderSlot(t.$slots,"default")])])]))}}),Bt={},wt={class:"min-h-40 container hero"},Et={class:"px-0! text-center hero-content"},_t={class:"mt-9 text-4xl"};function St(c,s){return e.openBlock(),e.createElementBlock("div",wt,[e.createElementVNode("div",Et,[e.createElementVNode("div",null,[e.createElementVNode("h1",_t,[e.renderSlot(c.$slots,"title",{},()=>[s[0]||(s[0]=e.createTextVNode("hero title"))])]),e.createElementVNode("p",null,[e.renderSlot(c.$slots,"description",{class:"py-9"})]),e.renderSlot(c.$slots,"call-to-action-block",{class:"max-w-full"},()=>[s[1]||(s[1]=e.createElementVNode("button",{class:"btn btn-primary"},"Call to action",-1))])])])])}const Ct=x(Bt,[["render",St]]),Vt={class:"categories flex flex-row gap-4 place-content-center"},$t=["onClick"],Nt=e.defineComponent({__name:"categoryNavigation",props:{searchOptions:{},currentCategory:{}},emits:["update:currentCategory"],setup(c,{emit:s}){const t=c,o=s;function r(l){o("update:currentCategory",l)}return(l,d)=>(e.openBlock(),e.createElementBlock("div",Vt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.searchOptions,k=>(e.openBlock(),e.createElementBlock("div",{key:k.category},[e.createElementVNode("button",{onClick:f=>r(k.category),class:e.normalizeClass(["truncate",{"font-semibold":t.currentCategory===k.category}])},e.toDisplayString(k.category),11,$t)]))),128))]))}}),Dt={class:"md:flex hidden navbar-start"},xt={class:"md:flex justify-center items-center hidden navbar-center"},Mt={class:"md:flex hidden navbar-end"},Tt={class:"navbar-bottom md:flex hidden"},zt=x(e.defineComponent({__name:"navigationBar",props:{isCollapsed:{type:Boolean,default:!0}},setup(c){const s=c;return(t,o)=>(e.openBlock(),e.createElementBlock("nav",{class:e.normalizeClass(["place-items-start border-primary bg-base-100 px-5 py-5 border-b-4 transition-all navbar navigationbar",s.isCollapsed?"collapsed":""])},[e.createElementVNode("div",Dt,[e.renderSlot(t.$slots,"start",{},void 0,!0)]),e.createElementVNode("div",xt,[e.renderSlot(t.$slots,"center",{},void 0,!0)]),e.createElementVNode("div",Mt,[e.renderSlot(t.$slots,"end",{},void 0,!0)]),e.createElementVNode("div",Tt,[e.renderSlot(t.$slots,"bottom",{},void 0,!0)])],2))}}),[["__scopeId","data-v-8ddb2b45"]]),Lt={role:"tablist",class:"tabs tabs-bordered tabs-lg mt-28 relative w-full"},Ft={key:0,class:"hidden md:flex gap-4 right-0 top-4 absolute"},Ot=["onClick","aria-selected"],It={role:"tabpanel",class:"tab-content border-base-300 border-t-2 border-x-0 border-b-0 p-6 overflow-x-auto max-w-full"},Ut=e.defineComponent({__name:"tab",props:{items:{},withControlls:{type:Boolean},rotateTabsAfter:{}},emits:["tab-changed"],setup(c,{emit:s}){const t=c,o=e.ref(t.items[0]),r=s;function l(f){o.value=f,r("tab-changed",f)}function d(){const m=(t.items.indexOf(o.value)+1)%t.items.length;l(t.items[m])}function k(){const m=(t.items.indexOf(o.value)-1+t.items.length)%t.items.length;l(t.items[m])}return e.onUnmounted(()=>{t.rotateTabsAfter&&setInterval(()=>{d()},t.rotateTabsAfter*1e3)}),(f,m)=>(e.openBlock(),e.createElementBlock("div",Lt,[f.withControlls?(e.openBlock(),e.createElementBlock("div",Ft,[e.createElementVNode("button",{onClick:m[0]||(m[0]=p=>k()),class:"cursor-pointer"},"Previous"),e.createElementVNode("button",{onClick:m[1]||(m[1]=p=>d()),class:"cursor-pointer text-primary"},"Next")])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.items,p=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("a",{type:"button",role:"tab",class:e.normalizeClass(["tab min-w-max",p===o.value?"bg-primary text-base-100":""]),onClick:C=>l(p),"aria-selected":o.value==p},e.toDisplayString(p),11,Ot),e.createElementVNode("div",It,[e.renderSlot(f.$slots,`${p}-tab`)])],64))),256))]))}});g.Accordion=fe,g.AdvancedSearch=je,g.Avatar=be,g.Badge=ye,g.ButtonComponent=Y,g.Card=$e,g.CategoryNavigation=Nt,g.DatetimePicker=P,g.Dropdown=X,g.Footer=yt,g.Hero=Ct,g.Loader=ft,g.Modal=G,g.NavigationBar=zt,g.Rating=mt,g.Swap=ee,g.Tab=Ut,g.ThemeController=ce,Object.defineProperty(g,Symbol.toStringTag,{value:"Module"})});
|
|
36
|
+
*/const le=L("SunIcon",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]),ae=(c,s)=>{const t=e.ref(null);return e.onMounted(()=>{if(typeof window<"u"){const o=window.localStorage.getItem(c);t.value=o?JSON.parse(o):s}}),e.watch(t,o=>{typeof window<"u"&&window.localStorage.setItem(c,JSON.stringify(o))}),t},re={class:"swap-rotate swap"},se=["true-value","false-value"],ce=e.defineComponent({__name:"theme-controller",props:{lightTheme:{default:"light"},darkTheme:{default:"dark"}},setup(c){const s=c,t=ae("theme",s.lightTheme);function o(r){typeof window<"u"&&window.document&&document.documentElement.setAttribute("data-theme",r)}return e.onMounted(()=>o(t.value?t.value:"")),e.watch(t,r=>{o(r)}),(r,l)=>(e.openBlock(),e.createElementBlock("label",re,[e.withDirectives(e.createElementVNode("input",{type:"checkbox",class:"theme-controller","onUpdate:modelValue":l[0]||(l[0]=d=>e.isRef(t)?t.value=d:null),"true-value":s.lightTheme,"false-value":s.darkTheme},null,8,se),[[e.vModelCheckbox,e.unref(t)]]),e.createVNode(e.unref(le),{class:"swap-off fill-current"}),e.createVNode(e.unref(oe),{class:"swap-on fill-current"})]))}}),ie=["name"],de={class:"collapse-title font-bold text-2xl lg:text-4xl"},me={class:"collapse-content"},pe=["innerHTML"],fe=e.defineComponent({__name:"accordion",props:{name:{},items:{},joinItems:{type:Boolean,default:!1},icon:{}},setup(c){const s=c;return(t,o)=>(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.items,(r,l)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["collapse border border-base-300",[t.icon?`collapse-${t.icon}`:"",{"join-item":t.joinItems}]]),key:l},[e.createElementVNode("input",{type:"radio",name:t.name,value:"true"},null,8,ie),e.createElementVNode("div",de,e.toDisplayString(r.title),1),e.createElementVNode("div",me,[e.createElementVNode("span",{innerHTML:r.content},null,8,pe)])],2))),128))}}),ue={key:0,class:"rounded-sm"},ge=["src"],ke={key:1,class:"flex justify-center bg-neutral p-[25%] rounded-full w-16 text-neutral-content text-center"},he={class:"text-xl"},be=e.defineComponent({__name:"avatar",props:{image:{},onlineStatus:{default:"none"},initials:{}},setup(c){const s=c,t=e.ref(s.onlineStatus);return e.watch(()=>s.onlineStatus,o=>{o&&(t.value=o)}),(o,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["avatar",`avatar-${o.onlineStatus}`])},[o.image?(e.openBlock(),e.createElementBlock("div",ue,[e.createElementVNode("img",{src:o.image,class:"w-full h-full"},null,8,ge)])):(e.openBlock(),e.createElementBlock("div",ke,[e.createElementVNode("p",he,e.toDisplayString(o.initials),1)]))],2))}}),ye=e.defineComponent({__name:"badge",props:{color:{default:"neutral"},outline:{type:Boolean,default:!1},size:{default:"medium"}},setup(c){const s=c,t={"extra small":"badge-xs",small:"badge-sm",medium:"badge-md",large:"badge-lg"},o={neutral:"badge-neutral",primary:"badge-primary",secondary:"badge-secondary",accent:"badge-accent",ghost:"badge-ghost",info:"badge-info",success:"badge-success",warning:"badge-warning",error:"badge-error"};return(r,l)=>(e.openBlock(),e.createElementBlock("span",{class:e.normalizeClass(["badge",t[s.size],o[s.color],{"badge-outline":s.outline}])},[e.renderSlot(r.$slots,"default")],2))}}),Be=["src","alt"],we={key:1,class:"w-full h-32 skeleton"},Ee={key:0,class:"card-body"},_e={key:0,class:"group-hover:text-primary text-left text-lg cursor-pointer card-title"},Se={key:1,class:"text-left"},Ce={class:"flex-col flex-nowrap mt-auto card-actions"},Ve={key:1,class:"card-body"},$e=e.defineComponent({__name:"card",props:{imgUrl:{default:""},alt:{default:"A beautiful picture that says something about this card"},title:{default:""},description:{default:""},outlined:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},class:{default:""}},setup(c){const s=c,t=e.ref(s.outlined);return e.watch(()=>s.outlined,o=>{t.value=o}),(o,r)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["bg-base-100 shadow-xl rounded-sm min-w-64 max-w-full h-full card card-compact group",t.value?"border-4 border-primary":""])},[e.createElementVNode("figure",null,[o.imgUrl||o.imgUrl&&!o.loading?(e.openBlock(),e.createElementBlock("img",{key:0,src:o.imgUrl,alt:o.alt,class:e.normalizeClass(["rounded-sm w-full h-44 object-cover",{hidden:o.loading}])},null,10,Be)):e.createCommentVNode("",!0),o.loading&&o.imgUrl?(e.openBlock(),e.createElementBlock("div",we)):e.createCommentVNode("",!0)]),o.loading?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Ee,[o.title?(e.openBlock(),e.createElementBlock("h2",_e,e.toDisplayString(o.title),1)):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"details"),o.description?(e.openBlock(),e.createElementBlock("p",Se,e.toDisplayString(o.description),1)):e.createCommentVNode("",!0),e.createElementVNode("div",Ce,[e.renderSlot(o.$slots,"actions")])])),o.loading?(e.openBlock(),e.createElementBlock("div",Ve,r[0]||(r[0]=[e.createElementVNode("div",{class:"flex flex-col gap-4 w-52"},[e.createElementVNode("div",{class:"w-28 h-4 skeleton"}),e.createElementVNode("div",{class:"w-full h-4 skeleton"}),e.createElementVNode("div",{class:"w-full h-4 skeleton"})],-1)]))):e.createCommentVNode("",!0)],2))}}),Ne={class:"flex gap-4 bg-base-100 w-full tabs tabs-boxed"},De=["onClick"],xe={class:"text-sm"},Me={class:"md:block hidden opacity-35 text-xs truncate overflow-hidden ..."},Te={class:"hidden"},ze={id:"advancedSearchMobile",class:"modal"},Le={class:"modal-box"},Fe={class:"font-bold text-lg"},Oe=["checked"],Ie={class:"flex justify-between items-center pr-4 w-full font-medium text-xl collapse-title"},Ue={class:"text-sm"},Ae={class:"flex place-content-center p-0 collapse-content"},Pe=e.defineComponent({__name:"advancedSearch",props:{searchOptions:{},currentCategory:{}},emits:["search","update:search-data"],setup(c,{emit:s}){const t=c,o=s,r=e.ref(null),l={datetime:e.defineAsyncComponent(()=>Promise.resolve().then(()=>it))},d=e.ref({}),k=e.ref({left:"0px",top:"0px",transform:"translateX(0%)"}),f=e.ref(null);function m(h,w){var B,E,u;if((B=r.value)!=null&&B.name){o("update:search-data",{tab:r.value.name,data:h});return}if(t.searchOptions){let b=(u=(E=t.searchOptions)==null?void 0:E.find(_=>(_==null?void 0:_.category)===t.currentCategory))==null?void 0:u.tabs[w];b!==void 0&&(b.value=h,o("update:search-data",{tab:b==null?void 0:b.name,data:b==null?void 0:b.value}))}}function p(){o("search")}async function C(h){f.value&&!f.value.contains(h.target)&&(await e.nextTick(),r.value=null)}async function F(){if(typeof window<"u"&&window.innerWidth<=768){const h=document.getElementById("advancedSearchMobile");h?h.showModal():console.warn("Modal element not found.")}}async function O(h){var B;r.value=h,await e.nextTick();const w=d.value[h.name];if(w){const E=w.getBoundingClientRect(),u=((B=f.value)==null?void 0:B.getBoundingClientRect())||{left:0,top:0};window.innerWidth>768?k.value={left:`${E.left+E.width/2-u.left}px`,top:`${E.bottom-u.top}px`,transform:"translateX(-50%)"}:k.value={left:"50%",top:`${E.bottom-u.top}px`,transform:"translateX(-50%)"}}else console.error("Tab element not found for:",h.name)}return e.onMounted(()=>{document.addEventListener("click",C)}),e.onBeforeUnmount(()=>{document.removeEventListener("click",C)}),(h,w)=>{var B,E;return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{ref_key:"searchContainer",ref:f,class:"w-full"},[e.createElementVNode("div",{class:"group/search relative flex place-items-center border-2 shadow-md p-2 border-base-300/25 rounded-sm w-full transition-all cursor-pointer md:cursor-auto",onClick:F},[e.createElementVNode("div",Ne,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(((B=t.searchOptions.find(u=>u.category===t.currentCategory))==null?void 0:B.tabs)||[],u=>{var b;return e.openBlock(),e.createElementBlock("button",{key:u.name,onClick:_=>O(u),class:e.normalizeClass([{"tab-active":((b=r.value)==null?void 0:b.name)===u.name},"group/searchitem relative after:top-0 after:-right-2 after:absolute first-of-type:flex-auto last-of-type:flex-auto md:after:content-[''] last-of-type:after:content-none after:content-none after:bg-base-200 hover:bg-base-200 p-1 rounded-sm w-auto after:w-[1px] after:h-10 text-start overflow-x-hidden pointer-events-none md:pointer-events-auto"]),ref_for:!0,ref:_=>d.value[u.name]=_},[e.createElementVNode("p",xe,e.toDisplayString(u.name),1),e.createElementVNode("p",Me,e.toDisplayString(u.description),1)],10,De)}),128))]),r.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"absolute flex shadow-sm mt-4 w-fit max-w-full transition-all tab-content",style:e.normalizeStyle(k.value)},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l[r.value.type]),e.mergeProps(r.value.props?r.value.props:null,{onUpdated:m}),null,16))],4)):e.createCommentVNode("",!0),e.createElementVNode("button",{title:"search",type:"submit",class:"ml-1 btn btn-primary btn-square",onClick:p},[e.createVNode(e.unref(A),{size:24,color:"white"})])]),e.createElementVNode("div",Te,[e.createElementVNode("button",{title:"search",onClick:w[0]||(w[0]=()=>{})},[e.createVNode(e.unref(A),{size:24,color:"white"})])])],512),e.createElementVNode("dialog",ze,[e.createElementVNode("div",Le,[e.renderSlot(h.$slots,"additionalForMobile",{},()=>[e.createElementVNode("h3",Fe,e.toDisplayString(h.currentCategory),1)],!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(((E=t.searchOptions.find(u=>u.category===t.currentCategory))==null?void 0:E.tabs)||[],(u,b)=>(e.openBlock(),e.createElementBlock("div",{class:"bg-base-200 my-4 collapse",key:u.name},[e.createElementVNode("input",{type:"radio",name:"my-accordion-1",checked:b===0},null,8,Oe),e.createElementVNode("div",Ie,[e.createTextVNode(e.toDisplayString(u.name)+" ",1),e.createElementVNode("p",Ue,e.toDisplayString(u.description),1)]),e.createElementVNode("div",Ae,[w[1]||(w[1]=e.createElementVNode("br",null,null,-1)),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l[u.type]),e.mergeProps({ref_for:!0},u.props||{},{onUpdated:_=>m(_,b)}),null,16,["onUpdated"]))])]))),128)),e.createElementVNode("div",{class:"modal-action"},[e.createElementVNode("form",{method:"dialog"},[e.createElementVNode("button",{class:"btn btn-primary",onClick:p},"Close and Search")])])])])],64)}}}),x=(c,s)=>{const t=c.__vccOpts||c;for(const[o,r]of s)t[o]=r;return t},je=x(Pe,[["__scopeId","data-v-08fa37eb"]]),Re=["placeholder","value","id"],He=["id"],qe={key:0,class:"flex justify-between items-center place-content-center mb-4"},Ye=["value"],Je=["value"],We={key:1,class:"gap-2 grid grid-cols-7"},Xe=["onClick"],Ze={key:2,class:"mt-4 lg:w-80"},Ke={key:0,class:"mb-2 font-bold text-lg"},Ge={key:1},Qe={key:1,class:"flex gap-4"},ve=["value"],et=["value"],tt={key:2,class:"flex flex-col gap-4"},nt={key:1,class:"flex gap-2"},ot=["value"],lt=["value"],at={key:1,class:"flex gap-2"},rt=["value"],st=["value"],ct={class:"flex gap-2 mt-4"},P=x({__name:"datetimePicker",props:{mode:{type:String,default:"datetime",validator:c=>["datetime","date","time"].includes(c)},range:{type:Boolean,default:!1},placeholder:{type:String,default:"Select date and time"},popup:{type:Boolean,default:!1},id:{type:String,default:"datetimepicker"},initialDate:{type:Object,default:()=>null}},emits:["updated"],setup(c,{emit:s}){const t=c;e.watch(()=>t.range,a=>{a?(l.value={start:null,end:null},d.value={start:null,end:null}):(l.value=null,d.value=null)});const o=s,r=e.ref(!1),l=e.ref(t.range?{start:null,end:null}:null),d=e.ref(t.range?{start:null,end:null}:null),k=e.ref(new Date().toLocaleString("default",{month:"long"})),f=e.ref(new Date().getFullYear()),m=e.ref(t.range?{start:0,end:0}:0),p=e.ref(t.range?{start:0,end:0}:0),C=e.ref(null),F=e.computed(()=>`${t.id}-input`),O=e.computed(()=>`${t.id}-popup`),h=e.computed(()=>t.mode==="date"||t.mode==="datetime"),w=e.computed(()=>t.mode==="time"||t.mode==="datetime");e.computed(()=>new Date(f.value,B.value));const B=e.computed(()=>T.indexOf(k.value)),E=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],u=e.computed(()=>new Date(f.value,B.value).getDay()),b=e.computed(()=>{const a=new Date(f.value,B.value+1,0).getDate();return Array.from({length:a},(i,n)=>new Date(f.value,B.value,n+1))}),_=e.computed(()=>Array.from({length:u.value},(a,i)=>i)),I=Array.from({length:24},(a,i)=>i),U=Array.from({length:60},(a,i)=>i),M=e.computed(()=>typeof navigator<"u"&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)),T=["January","February","March","April","May","June","July","August","September","October","November","December"],At=e.computed(()=>{const a=new Date().getFullYear();return Array.from({length:100},(i,n)=>a-50+n)}),Pt=e.computed(()=>{if(!h.value||!l.value)return"";if(t.range&&l.value.start&&l.value.end){const a=l.value.start.toLocaleDateString("en-US"),i=l.value.end.toLocaleDateString("en-US");return`${a} - ${i}`}return!t.range&&l.value?l.value.toLocaleDateString("en-US"):""}),$=a=>a instanceof Date?a:new Date(a),V=a=>a instanceof Date&&!isNaN(a),jt=e.computed(()=>{if(!w.value)return"";const a=i=>{var z,N,H;const n=((z=m.value)==null?void 0:z[i])??m.value,S=((N=p.value)==null?void 0:N[i])??p.value;return M.value?((H=d.value)==null?void 0:H[i])??d.value:`${n.toString().padStart(2,"0")}:${S.toString().padStart(2,"0")}`};return t.range?`${a("start")} - ${a("end")}`:a()}),Rt=e.computed(()=>{const a=Pt.value,i=jt.value;return`${a} ${i}`.trim()}),Ht=()=>r.value=!r.value,j=()=>{y(),qt()},qt=()=>r.value=!1,Yt=()=>{l.value=t.range?{start:null,end:null}:null,d.value=t.range?{start:null,end:null}:null,y()},Jt=a=>{t.range?l.value.start&&l.value.end?l.value={start:a,end:null}:l.value.start?l.value.end=a:l.value.start=a:l.value=a,y()},Wt=a=>(a=$(a),t.range?l.value.start&&V(l.value.start)&&a.getTime()===l.value.start.getTime()||l.value.end&&V(l.value.end)&&a.getTime()===l.value.end.getTime():V(l.value)&&a.getTime()===l.value.getTime()),Xt=a=>{a=$(a);const i=new Date;return a.getDate()===i.getDate()&&a.getMonth()===i.getMonth()&&a.getFullYear()===i.getFullYear()},Zt=a=>(a=$(a),t.range&&V(l.value.start)&&a.getTime()===l.value.start.getTime()),Kt=a=>(a=$(a),t.range&&V(l.value.end)&&a.getTime()===l.value.end.getTime()),Gt=a=>{if(a=$(a),t.range&&V(l.value.start)&&V(l.value.end)){const i=l.value.start.getTime(),n=l.value.end.getTime(),S=a.getTime();return S>i&&S<n}return!1},Qt=()=>{let a=B.value-1;a<0&&(a=11,f.value--),k.value=T[a],y()},vt=()=>{let a=B.value+1;a>11&&(a=0,f.value++),k.value=T[a],y()},R=a=>{C.value&&!C.value.contains(a.target)&&r.value==!0&&j()},y=()=>{let a={};const i=(n,S,z)=>{n instanceof Date&&!isNaN(n)||(n=new Date);const N=new Date(n);return N.setUTCHours(S,z,0,0),N.toISOString()};t.range?(a.from=i(l.value.start,m.value.start,p.value.start),a.to=i(l.value.end,m.value.end,p.value.end)):a=i(l.value,m.value,p.value),o("updated",a)};return e.onMounted(()=>{t.initialDate&&(t.range&&t.initialDate.start&&t.initialDate.end?l.value={start:new Date(t.initialDate.start),end:new Date(t.initialDate.end)}:t.initialDate.start&&(l.value={start:new Date(t.initialDate.start)})),t.range?(m.value.start=m.value.start??new Date().getHours(),m.value.end=m.value.end??new Date().getHours(),p.value.start=p.value.start??new Date().getMinutes(),p.value.end=p.value.end??new Date().getMinutes()):(m.value=m.value??new Date().getHours(),p.value=p.value??new Date().getMinutes())}),t.popup&&e.onMounted(()=>document.addEventListener("click",R)),e.onUnmounted(()=>document.removeEventListener("click",R)),(a,i)=>(e.openBlock(),e.createElementBlock("div",{class:"inline-block relative w-full lg:w-[360px]",ref_key:"pickerContainer",ref:C},[e.createElementVNode("div",{class:"flex items-center gap-2 cursor-pointer",onClick:Ht},[c.popup?e.renderSlot(a.$slots,"default",{key:0},()=>[e.createElementVNode("input",{type:"text",class:"input-bordered w-full cursor-pointer input",placeholder:c.placeholder,value:Rt.value,readonly:"",id:F.value},null,8,Re),i[11]||(i[11]=e.createElementVNode("button",{class:"btn btn-ghost"}," 📅 ",-1))],!0):e.createCommentVNode("",!0)]),r.value||!c.popup?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["z-50 lg:bg-base-100 md:mt-2 md:p-4 px-4 rounded-md w-full",[{absolute:c.popup}]]),id:O.value},[h.value?(e.openBlock(),e.createElementBlock("div",qe,[e.createElementVNode("button",{class:"hidden md:block btn-outline btn btn-primary md:btn-sm",onClick:Qt},i[12]||(i[12]=[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 19l-7-7 7-7"})],-1)])),e.withDirectives(e.createElementVNode("select",{class:"border-none w-fit select","onUpdate:modelValue":i[0]||(i[0]=n=>k.value=n),onChange:y},[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(T,(n,S)=>e.createElementVNode("option",{key:S,value:n},e.toDisplayString(n),9,Ye)),64))],544),[[e.vModelSelect,k.value]]),e.withDirectives(e.createElementVNode("select",{class:"border-none w-24 select","onUpdate:modelValue":i[1]||(i[1]=n=>f.value=n),onChange:y},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(At.value,n=>(e.openBlock(),e.createElementBlock("option",{key:n,value:n},e.toDisplayString(n),9,Je))),128))],544),[[e.vModelSelect,f.value]]),e.createElementVNode("button",{class:"hidden md:block btn-outline btn btn-primary md:btn-sm",onClick:vt},i[13]||(i[13]=[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",class:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5l7 7-7 7"})],-1)]))])):e.createCommentVNode("",!0),h.value?(e.openBlock(),e.createElementBlock("div",We,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(E,n=>e.createElementVNode("div",{key:n,class:"text-center"},e.toDisplayString(n),1)),64)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(_.value,n=>(e.openBlock(),e.createElementBlock("div",{key:n,class:"text-center"}))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value,n=>(e.openBlock(),e.createElementBlock("div",{key:n,class:e.normalizeClass(["hover:bg-primary-10 py-1 rounded-full text-center cursor-pointer",{"bg-primary text-primary-content":Wt(n),today:Xt(n),"range-start bg-primary text-primary-content":Zt(n),"range-end bg-primary text-primary-content":Kt(n),"in-range bg-primary/20 hover:bg-primary/10":Gt(n)}]),onClick:S=>Jt(n)},e.toDisplayString(n.getDate()),11,Xe))),128))])):e.createCommentVNode("",!0),w.value?(e.openBlock(),e.createElementBlock("div",Ze,[t.range?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("h3",Ke,"Select Time")),t.range?(e.openBlock(),e.createElementBlock("div",tt,[e.createElementVNode("div",null,[i[14]||(i[14]=e.createElementVNode("p",{class:"font-bold"},"Start Time",-1)),M.value?e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:0,type:"time",class:"input-bordered w-full input","onUpdate:modelValue":i[5]||(i[5]=n=>d.value.start=n),onChange:y},null,544)),[[e.vModelText,d.value.start]]):(e.openBlock(),e.createElementBlock("div",nt,[e.withDirectives(e.createElementVNode("select",{class:"w-full select-bordered select","onUpdate:modelValue":i[6]||(i[6]=n=>m.value.start=n),onChange:y},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(I),n=>(e.openBlock(),e.createElementBlock("option",{key:n,value:n},e.toDisplayString(n.toString().padStart(2,"0")),9,ot))),128))],544),[[e.vModelSelect,m.value.start,void 0,{number:!0}]]),e.withDirectives(e.createElementVNode("select",{class:"w-full select-bordered select","onUpdate:modelValue":i[7]||(i[7]=n=>p.value.start=n),onChange:y},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(U),n=>(e.openBlock(),e.createElementBlock("option",{key:n,value:n},e.toDisplayString(n.toString().padStart(2,"0")),9,lt))),128))],544),[[e.vModelSelect,p.value.start,void 0,{number:!0}]])]))]),e.createElementVNode("div",null,[i[15]||(i[15]=e.createElementVNode("p",{class:"font-bold"},"End Time",-1)),M.value?e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:0,type:"time",class:"input-bordered w-full input","onUpdate:modelValue":i[8]||(i[8]=n=>d.value.end=n),onChange:y},null,544)),[[e.vModelText,d.value.end]]):(e.openBlock(),e.createElementBlock("div",at,[e.withDirectives(e.createElementVNode("select",{class:"w-full select-bordered select","onUpdate:modelValue":i[9]||(i[9]=n=>m.value.end=n),onChange:y},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(I),n=>(e.openBlock(),e.createElementBlock("option",{key:n,value:n},e.toDisplayString(n.toString().padStart(2,"0")),9,rt))),128))],544),[[e.vModelSelect,m.value.end,void 0,{number:!0}]]),e.withDirectives(e.createElementVNode("select",{class:"w-full select-bordered select","onUpdate:modelValue":i[10]||(i[10]=n=>p.value.end=n),onChange:y},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(U),n=>(e.openBlock(),e.createElementBlock("option",{key:n,value:n},e.toDisplayString(n.toString().padStart(2,"0")),9,st))),128))],544),[[e.vModelSelect,p.value.end,void 0,{number:!0}]])]))])])):(e.openBlock(),e.createElementBlock("div",Ge,[M.value?e.withDirectives((e.openBlock(),e.createElementBlock("input",{key:0,type:"time",class:"input-bordered w-full input","onUpdate:modelValue":i[2]||(i[2]=n=>d.value=n),onChange:y},null,544)),[[e.vModelText,d.value]]):(e.openBlock(),e.createElementBlock("div",Qe,[e.withDirectives(e.createElementVNode("select",{class:"w-full select-bordered select","onUpdate:modelValue":i[3]||(i[3]=n=>m.value=n),onChange:y},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(I),n=>(e.openBlock(),e.createElementBlock("option",{key:n,value:n},e.toDisplayString(n.toString().padStart(2,"0")),9,ve))),128))],544),[[e.vModelSelect,m.value,void 0,{number:!0}]]),e.withDirectives(e.createElementVNode("select",{class:"w-full select-bordered select","onUpdate:modelValue":i[4]||(i[4]=n=>p.value=n),onChange:y},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(U),n=>(e.openBlock(),e.createElementBlock("option",{key:n,value:n},e.toDisplayString(n.toString().padStart(2,"0")),9,et))),128))],544),[[e.vModelSelect,p.value,void 0,{number:!0}]])]))]))])):e.createCommentVNode("",!0),e.createElementVNode("div",ct,[e.createElementVNode("button",{class:e.normalizeClass(["btn btn-secondary",c.popup?"w-fit":"w-full"]),onClick:Yt},"Clear",2),c.popup?(e.openBlock(),e.createElementBlock("button",{key:0,class:"btn btn-primary btn-wide",onClick:j},"Close")):e.createCommentVNode("",!0)])],10,He)):e.createCommentVNode("",!0)],512))}},[["__scopeId","data-v-cb781ab6"]]),it=Object.freeze(Object.defineProperty({__proto__:null,default:P},Symbol.toStringTag,{value:"Module"})),dt=["value","checked","onChange","disabled"],mt=e.defineComponent({__name:"rating",props:{initialRating:{default:0},numberOfStars:{default:5},halfStars:{type:Boolean,default:!0},isInteractive:{type:Boolean,default:!1},size:{default:"sm"}},setup(c){const s=c,t=e.ref(s.initialRating);e.watch(()=>s.initialRating,r=>{t.value=r});const o=r=>{t.value=r};return(r,l)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["rating",[`rating-${s.size}`,{"rating-half":r.halfStars}]])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.numberOfStars*(r.halfStars?2:1),d=>(e.openBlock(),e.createElementBlock("input",{key:d,type:"radio",value:r.halfStars?d*.5:d,checked:t.value===(r.halfStars?d*.5:d),onChange:k=>r.isInteractive?o(r.halfStars?d*.5:d):null,class:e.normalizeClass(["mask mask-star",{"bg-yellow-400":t.value>=(r.halfStars?d*.5:d),"mask-half-1":r.halfStars&&d%2!==0,"mask-half-2":r.halfStars&&d%2===0,"cursor-pointer":r.isInteractive,"cursor-default":!r.isInteractive}]),disabled:!r.isInteractive},null,42,dt))),128))],2))}}),pt={key:0,class:"loading loading-spinner loading-md mx-auto"},ft=e.defineComponent({__name:"loader",props:{loading:{type:Boolean,default:!0}},setup(c){const s=c,t=e.ref(s.loading);return e.watch(()=>s.loading,o=>{t.value=o}),(o,r)=>t.value?(e.openBlock(),e.createElementBlock("span",pt)):e.createCommentVNode("",!0)}}),ut={class:"bg-base-200 mx-auto md:px-10 py-10 text-base-content"},gt={class:"footer sm:footer-horizontal container"},kt={class:"footer-title"},ht=["href"],bt={class:"ml-auto"},yt=e.defineComponent({__name:"footer",props:{items:{}},setup(c){const s=c;return(t,o)=>(e.openBlock(),e.createElementBlock("div",ut,[e.createElementVNode("footer",gt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.items,r=>(e.openBlock(),e.createElementBlock("nav",null,[e.createElementVNode("h6",kt,e.toDisplayString(r.title),1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.items,l=>(e.openBlock(),e.createElementBlock("a",{class:"link link-hover",href:l.link},e.toDisplayString(l.text),9,ht))),256))]))),256)),e.createElementVNode("aside",bt,[e.renderSlot(t.$slots,"default")])])]))}}),Bt={},wt={class:"min-h-40 container hero"},Et={class:"px-0! text-center hero-content"},_t={class:"mt-9 text-4xl"};function St(c,s){return e.openBlock(),e.createElementBlock("div",wt,[e.createElementVNode("div",Et,[e.createElementVNode("div",null,[e.createElementVNode("h1",_t,[e.renderSlot(c.$slots,"title",{},()=>[s[0]||(s[0]=e.createTextVNode("hero title"))])]),e.createElementVNode("p",null,[e.renderSlot(c.$slots,"description",{class:"py-9"})]),e.renderSlot(c.$slots,"call-to-action-block",{class:"max-w-full"},()=>[s[1]||(s[1]=e.createElementVNode("button",{class:"btn btn-primary"},"Call to action",-1))])])])])}const Ct=x(Bt,[["render",St]]),Vt={class:"categories flex flex-row gap-4 place-content-center"},$t=["onClick"],Nt=e.defineComponent({__name:"categoryNavigation",props:{searchOptions:{},currentCategory:{}},emits:["update:currentCategory"],setup(c,{emit:s}){const t=c,o=s;function r(l){o("update:currentCategory",l)}return(l,d)=>(e.openBlock(),e.createElementBlock("div",Vt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.searchOptions,k=>(e.openBlock(),e.createElementBlock("div",{key:k.category},[e.createElementVNode("button",{onClick:f=>r(k.category),class:e.normalizeClass(["truncate",{"font-semibold":t.currentCategory===k.category}])},e.toDisplayString(k.category),11,$t)]))),128))]))}}),Dt={class:"md:flex hidden navbar-start"},xt={class:"md:flex justify-center items-center hidden navbar-center"},Mt={class:"md:flex hidden navbar-end"},Tt={class:"navbar-bottom md:flex hidden"},zt=x(e.defineComponent({__name:"navigationBar",props:{isCollapsed:{type:Boolean,default:!0}},setup(c){const s=c;return(t,o)=>(e.openBlock(),e.createElementBlock("nav",{class:e.normalizeClass(["place-items-start border-primary bg-base-100 px-5 py-5 border-b-4 transition-all navbar navigationbar",s.isCollapsed?"collapsed":""])},[e.createElementVNode("div",Dt,[e.renderSlot(t.$slots,"start",{},void 0,!0)]),e.createElementVNode("div",xt,[e.renderSlot(t.$slots,"center",{},void 0,!0)]),e.createElementVNode("div",Mt,[e.renderSlot(t.$slots,"end",{},void 0,!0)]),e.createElementVNode("div",Tt,[e.renderSlot(t.$slots,"bottom",{},void 0,!0)])],2))}}),[["__scopeId","data-v-8ddb2b45"]]),Lt={role:"tablist",class:"tabs tabs-bordered tabs-lg mt-28 relative w-full"},Ft={key:0,class:"hidden md:flex gap-4 right-0 top-4 absolute"},Ot=["onClick","aria-selected"],It={role:"tabpanel",class:"tab-content border-base-300 border-t-2 border-x-0 border-b-0 p-6 overflow-x-auto max-w-full"},Ut=e.defineComponent({__name:"tab",props:{items:{},withControlls:{type:Boolean},rotateTabsAfter:{}},emits:["tab-changed"],setup(c,{emit:s}){const t=c,o=e.ref(t.items[0]),r=s;function l(f){o.value=f,r("tab-changed",f)}function d(){const m=(t.items.indexOf(o.value)+1)%t.items.length;l(t.items[m])}function k(){const m=(t.items.indexOf(o.value)-1+t.items.length)%t.items.length;l(t.items[m])}return e.onUnmounted(()=>{t.rotateTabsAfter&&setInterval(()=>{d()},t.rotateTabsAfter*1e3)}),(f,m)=>(e.openBlock(),e.createElementBlock("div",Lt,[f.withControlls?(e.openBlock(),e.createElementBlock("div",Ft,[e.createElementVNode("button",{onClick:m[0]||(m[0]=p=>k()),class:"cursor-pointer"},"Previous"),e.createElementVNode("button",{onClick:m[1]||(m[1]=p=>d()),class:"cursor-pointer text-primary"},"Next")])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.items,p=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("a",{type:"button",role:"tab",class:e.normalizeClass(["tab min-w-max",p===o.value?"bg-primary text-base-100":""]),onClick:C=>l(p),"aria-selected":o.value==p},e.toDisplayString(p),11,Ot),e.createElementVNode("div",It,[e.renderSlot(f.$slots,`${p}-tab`)])],64))),256))]))}});g.Accordion=fe,g.AdvancedSearch=je,g.Avatar=be,g.Badge=ye,g.ButtonComponent=Y,g.Card=$e,g.CategoryNavigation=Nt,g.DatetimePicker=P,g.Dropdown=X,g.Footer=yt,g.Hero=Ct,g.Loader=ft,g.Modal=G,g.NavigationBar=zt,g.Rating=mt,g.Swap=ee,g.Tab=Ut,g.ThemeController=ce,Object.defineProperty(g,Symbol.toStringTag,{value:"Module"})});
|
package/dist/style.css
CHANGED
|
@@ -1874,6 +1874,54 @@
|
|
|
1874
1874
|
font-size: var(--cardtitle-fs, 1.125rem);
|
|
1875
1875
|
font-weight: 600;
|
|
1876
1876
|
}
|
|
1877
|
+
.join {
|
|
1878
|
+
display: inline-flex;
|
|
1879
|
+
align-items: stretch;
|
|
1880
|
+
--join-ss: 0;
|
|
1881
|
+
--join-se: 0;
|
|
1882
|
+
--join-es: 0;
|
|
1883
|
+
--join-ee: 0;
|
|
1884
|
+
:where(.join-item) {
|
|
1885
|
+
border-start-start-radius: var(--join-ss, 0);
|
|
1886
|
+
border-start-end-radius: var(--join-se, 0);
|
|
1887
|
+
border-end-start-radius: var(--join-es, 0);
|
|
1888
|
+
border-end-end-radius: var(--join-ee, 0);
|
|
1889
|
+
* {
|
|
1890
|
+
--join-ss: var(--radius-field);
|
|
1891
|
+
--join-se: var(--radius-field);
|
|
1892
|
+
--join-es: var(--radius-field);
|
|
1893
|
+
--join-ee: var(--radius-field);
|
|
1894
|
+
}
|
|
1895
|
+
}
|
|
1896
|
+
> .join-item:where(:first-child) {
|
|
1897
|
+
--join-ss: var(--radius-field);
|
|
1898
|
+
--join-se: 0;
|
|
1899
|
+
--join-es: var(--radius-field);
|
|
1900
|
+
--join-ee: 0;
|
|
1901
|
+
}
|
|
1902
|
+
:first-child:not(:last-child) {
|
|
1903
|
+
:where(.join-item) {
|
|
1904
|
+
--join-ss: var(--radius-field);
|
|
1905
|
+
--join-se: 0;
|
|
1906
|
+
--join-es: var(--radius-field);
|
|
1907
|
+
--join-ee: 0;
|
|
1908
|
+
}
|
|
1909
|
+
}
|
|
1910
|
+
> .join-item:where(:last-child) {
|
|
1911
|
+
--join-ss: 0;
|
|
1912
|
+
--join-se: var(--radius-field);
|
|
1913
|
+
--join-es: 0;
|
|
1914
|
+
--join-ee: var(--radius-field);
|
|
1915
|
+
}
|
|
1916
|
+
:last-child:not(:first-child) {
|
|
1917
|
+
:where(.join-item) {
|
|
1918
|
+
--join-ss: 0;
|
|
1919
|
+
--join-se: var(--radius-field);
|
|
1920
|
+
--join-es: 0;
|
|
1921
|
+
--join-ee: var(--radius-field);
|
|
1922
|
+
}
|
|
1923
|
+
}
|
|
1924
|
+
}
|
|
1877
1925
|
.mask {
|
|
1878
1926
|
display: inline-block;
|
|
1879
1927
|
vertical-align: middle;
|
package/index.html
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
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/package.json
CHANGED
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "manolis-ui",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.11",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"files": [
|
|
7
|
-
"dist/*",
|
|
8
|
-
"src/components/"
|
|
9
|
-
],
|
|
10
6
|
"main": "dist/manolis-ui.js",
|
|
11
7
|
"module": "dist/manolis-ui.umd.js",
|
|
12
8
|
"types": "./dist/index.d.ts",
|
package/public/vite.svg
ADDED
|
@@ -0,0 +1 @@
|
|
|
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
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
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> -->
|
|
@@ -0,0 +1 @@
|
|
|
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>
|
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
</slot>
|
|
17
17
|
</div>
|
|
18
18
|
|
|
19
|
-
<div v-if="showPopup || !popup" class="z-50 lg:bg-base-100 md:mt-2
|
|
19
|
+
<div v-if="showPopup || !popup" class="z-50 lg:bg-base-100 md:mt-2 md:p-4 px-4 rounded-md w-full" :class="[{ absolute: popup }]" :id="popupId">
|
|
20
20
|
<div v-if="showDate" class="flex justify-between items-center place-content-center mb-4">
|
|
21
|
-
<button class="md:block
|
|
21
|
+
<button class="hidden md:block btn-outline btn btn-primary md:btn-sm" @click="previousMonth">
|
|
22
22
|
<svg xmlns="http://www.w3.org/2000/svg" class="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
|
23
23
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 19l-7-7 7-7" />
|
|
24
24
|
</svg>
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
<option v-for="year in years" :key="year" :value="year">{{ year }}</option>
|
|
33
33
|
</select>
|
|
34
34
|
|
|
35
|
-
<button class="md:block
|
|
35
|
+
<button class="hidden md:block btn-outline btn btn-primary md:btn-sm" @click="nextMonth">
|
|
36
36
|
<svg xmlns="http://www.w3.org/2000/svg" class="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
|
37
37
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7" />
|
|
38
38
|
</svg>
|
|
@@ -399,11 +399,4 @@ onUnmounted(() => document.removeEventListener('click', handleClickOutside))
|
|
|
399
399
|
.input {
|
|
400
400
|
cursor: pointer;
|
|
401
401
|
}
|
|
402
|
-
|
|
403
|
-
/* .in-range:hover {
|
|
404
|
-
@apply bg-primary bg-opacity/10;
|
|
405
|
-
} */
|
|
406
|
-
/* .range-start, .range-end {
|
|
407
|
-
@apply bg-primary text-primary-content;
|
|
408
|
-
} */
|
|
409
402
|
</style>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { onMounted, ref, watch } from "vue";
|
|
2
|
+
|
|
3
|
+
// composables/useLocalStorage.ts
|
|
4
|
+
export const useLocalStorage = <T>(key: string, initialValue: T) => {
|
|
5
|
+
const storedValue = ref<T | null>(null);
|
|
6
|
+
|
|
7
|
+
// Load value from localStorage on mount
|
|
8
|
+
onMounted(() => {
|
|
9
|
+
if (typeof window !== 'undefined') {
|
|
10
|
+
const stored = window.localStorage.getItem(key);
|
|
11
|
+
storedValue.value = stored ? JSON.parse(stored) : initialValue;
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
// Watch the value and save it to localStorage when it changes
|
|
16
|
+
watch(storedValue, (newValue) => {
|
|
17
|
+
if (typeof window !== 'undefined') {
|
|
18
|
+
window.localStorage.setItem(key, JSON.stringify(newValue));
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
return storedValue;
|
|
23
|
+
};
|
|
24
|
+
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
// actions src/components
|
|
2
|
+
export { default as ButtonComponent } from './components/actions/ButtonComponent.vue';
|
|
3
|
+
export { default as Dropdown } from './components/actions/dropdown.vue';
|
|
4
|
+
export { default as Modal } from './components/actions/modal.vue';
|
|
5
|
+
export { default as Swap } from './components/actions/swap.vue';
|
|
6
|
+
export { default as ThemeController } from './components/actions/theme-controller.vue';
|
|
7
|
+
|
|
8
|
+
// data display
|
|
9
|
+
export { default as Accordion } from './components/data-display/accordion.vue';
|
|
10
|
+
export { default as Avatar } from './components/data-display/avatar.vue';
|
|
11
|
+
export { default as Badge } from './components/data-display/badge.vue';
|
|
12
|
+
export { default as Card } from './components/data-display/card.vue';
|
|
13
|
+
|
|
14
|
+
// data input
|
|
15
|
+
export { default as AdvancedSearch } from './components/data-input/advancedSearch.vue';
|
|
16
|
+
export { default as DatetimePicker } from './components/data-input/datetimePicker.vue';
|
|
17
|
+
export { default as Rating } from './components/data-input/rating.vue';
|
|
18
|
+
|
|
19
|
+
// feedback
|
|
20
|
+
export { default as Loader } from "./components/feedback/loader.vue";
|
|
21
|
+
|
|
22
|
+
// layout
|
|
23
|
+
export { default as Footer } from "./components/layout/footer.vue";
|
|
24
|
+
export { default as Hero } from "./components/layout/hero.vue";
|
|
25
|
+
|
|
26
|
+
// navigation
|
|
27
|
+
export { default as CategoryNavigation } from "./components/navigation/categoryNavigation.vue";
|
|
28
|
+
export { default as NavigationBar } from "./components/navigation/navigationBar.vue";
|
|
29
|
+
export { default as Tab } from "./components/navigation/tab.vue";
|
|
30
|
+
|