manolis-ui 0.0.10 → 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.
Files changed (97) hide show
  1. package/.github/workflows/deploy_and_publish.yml +113 -0
  2. package/.storybook/main.ts +34 -0
  3. package/.storybook/preview.ts +17 -0
  4. package/.vscode/extensions.json +3 -0
  5. package/index.html +13 -0
  6. package/package.json +1 -5
  7. package/postcss.config.js +2 -0
  8. package/public/vite.svg +1 -0
  9. package/src/App.vue +19 -0
  10. package/src/assets/vue.svg +1 -0
  11. package/src/composables/useLocalStorage.ts +24 -0
  12. package/src/index.ts +30 -0
  13. package/src/main.ts +5 -0
  14. package/src/stories/actions/Button.stories.ts +47 -0
  15. package/src/stories/actions/Dropdown.stories.ts +70 -0
  16. package/src/stories/actions/Modal.stories.ts +56 -0
  17. package/src/stories/actions/Swap.stories.ts +56 -0
  18. package/src/stories/actions/ThemeSwitcher.stories.ts +41 -0
  19. package/src/stories/data-display/accordion.stories.ts +49 -0
  20. package/src/stories/data-display/avatar.stories.ts +75 -0
  21. package/src/stories/data-display/badge.stories.ts +76 -0
  22. package/src/stories/data-display/card.stories.ts +79 -0
  23. package/src/stories/data-input/rating.stories.ts +73 -0
  24. package/src/stories/feedback/Loader.stories.ts +34 -0
  25. package/src/stories/layout/footer.stories.ts +63 -0
  26. package/src/style.css +57 -0
  27. package/src/vite-env.d.ts +1 -0
  28. package/storybook-static/assets/Button.stories-B5Gg7Ski.js +6 -0
  29. package/storybook-static/assets/Color-YHDXOIA2-Cy_mA6cn.js +1 -0
  30. package/storybook-static/assets/DocsRenderer-CFRXHY34-wSGN0bIp.js +610 -0
  31. package/storybook-static/assets/Dropdown.stories-Bth3_21L.js +32 -0
  32. package/storybook-static/assets/Loader.stories-BnqtyQP_.js +5 -0
  33. package/storybook-static/assets/Modal.stories-CxOA4msz.js +46 -0
  34. package/storybook-static/assets/Swap.stories-Cpc9q_kE.js +54 -0
  35. package/storybook-static/assets/ThemeSwitcher.stories-BwHcHihM.js +45 -0
  36. package/storybook-static/assets/accordion.stories-B6yDsDXk.js +7 -0
  37. package/storybook-static/assets/avatar.stories-BDN93iYh.js +39 -0
  38. package/storybook-static/assets/badge.stories-CXQpnu0e.js +39 -0
  39. package/storybook-static/assets/card.stories-1gVWO2fs.js +48 -0
  40. package/storybook-static/assets/entry-preview-Cfvj9hgI.js +1 -0
  41. package/storybook-static/assets/entry-preview-docs-BJQT5BWv.js +16 -0
  42. package/storybook-static/assets/footer.stories-DPXqApht.js +23 -0
  43. package/storybook-static/assets/iframe-BNdG_Qtn.js +211 -0
  44. package/storybook-static/assets/index-Bx-go_-4.js +8 -0
  45. package/storybook-static/assets/index-CiNYFPF0.js +1 -0
  46. package/storybook-static/assets/index-DrFu-skq.js +6 -0
  47. package/storybook-static/assets/preview-4lzcCKUM.css +1 -0
  48. package/storybook-static/assets/preview-B8lJiyuQ.js +34 -0
  49. package/storybook-static/assets/preview-BBWR9nbA.js +1 -0
  50. package/storybook-static/assets/preview-BWzBA1C2.js +396 -0
  51. package/storybook-static/assets/preview-CvbIS5ZJ.js +1 -0
  52. package/storybook-static/assets/preview-DD_OYowb.js +1 -0
  53. package/storybook-static/assets/preview-DGUiP6tS.js +7 -0
  54. package/storybook-static/assets/preview-DHQbi4pV.js +1 -0
  55. package/storybook-static/assets/preview-DMNI4LCC.js +15 -0
  56. package/storybook-static/assets/preview-DnqJFqn_.js +2 -0
  57. package/storybook-static/assets/preview-Dsq_8SDT.js +240 -0
  58. package/storybook-static/assets/preview-hHK5u5_Q.js +1 -0
  59. package/storybook-static/assets/rating.stories-BX0Pzp5i.js +27 -0
  60. package/storybook-static/assets/vue.esm-bundler-C-YazFc_.js +36 -0
  61. package/storybook-static/favicon.svg +1 -0
  62. package/storybook-static/iframe.html +666 -0
  63. package/storybook-static/index.html +181 -0
  64. package/storybook-static/index.json +1 -0
  65. package/storybook-static/nunito-sans-bold-italic.woff2 +0 -0
  66. package/storybook-static/nunito-sans-bold.woff2 +0 -0
  67. package/storybook-static/nunito-sans-italic.woff2 +0 -0
  68. package/storybook-static/nunito-sans-regular.woff2 +0 -0
  69. package/storybook-static/project.json +1 -0
  70. package/storybook-static/sb-addons/chromatic-com-storybook-9/manager-bundle.js +331 -0
  71. package/storybook-static/sb-addons/chromatic-com-storybook-9/manager-bundle.js.LEGAL.txt +51 -0
  72. package/storybook-static/sb-addons/essentials-actions-2/manager-bundle.js +3 -0
  73. package/storybook-static/sb-addons/essentials-backgrounds-4/manager-bundle.js +12 -0
  74. package/storybook-static/sb-addons/essentials-controls-1/manager-bundle.js +402 -0
  75. package/storybook-static/sb-addons/essentials-docs-3/manager-bundle.js +242 -0
  76. package/storybook-static/sb-addons/essentials-measure-7/manager-bundle.js +3 -0
  77. package/storybook-static/sb-addons/essentials-outline-8/manager-bundle.js +3 -0
  78. package/storybook-static/sb-addons/essentials-toolbars-6/manager-bundle.js +3 -0
  79. package/storybook-static/sb-addons/essentials-viewport-5/manager-bundle.js +3 -0
  80. package/storybook-static/sb-addons/interactions-10/manager-bundle.js +222 -0
  81. package/storybook-static/sb-addons/links-11/manager-bundle.js +3 -0
  82. package/storybook-static/sb-addons/storybook-core-core-server-presets-0/common-manager-bundle.js +3 -0
  83. package/storybook-static/sb-common-assets/favicon.svg +1 -0
  84. package/storybook-static/sb-common-assets/nunito-sans-bold-italic.woff2 +0 -0
  85. package/storybook-static/sb-common-assets/nunito-sans-bold.woff2 +0 -0
  86. package/storybook-static/sb-common-assets/nunito-sans-italic.woff2 +0 -0
  87. package/storybook-static/sb-common-assets/nunito-sans-regular.woff2 +0 -0
  88. package/storybook-static/sb-manager/globals-module-info.js +1046 -0
  89. package/storybook-static/sb-manager/globals-runtime.js +41239 -0
  90. package/storybook-static/sb-manager/globals.js +48 -0
  91. package/storybook-static/sb-manager/runtime.js +12048 -0
  92. package/storybook-static/vite.svg +1 -0
  93. package/tsconfig.app.json +27 -0
  94. package/tsconfig.build.json +3 -0
  95. package/tsconfig.json +7 -0
  96. package/tsconfig.node.json +25 -0
  97. 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;
@@ -0,0 +1,3 @@
1
+ {
2
+ "recommendations": ["Vue.volar"]
3
+ }
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.10",
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",
@@ -0,0 +1,2 @@
1
+ export default {
2
+ }
@@ -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>
@@ -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
+
package/src/main.ts ADDED
@@ -0,0 +1,5 @@
1
+ import './style.css'
2
+ import { createApp } from 'vue'
3
+ import App from './App.vue'
4
+
5
+ createApp(App).mount('#app')
@@ -0,0 +1,47 @@
1
+ import type { Meta, StoryObj } from '@storybook/vue3';
2
+ import Button from "../../components/actions/ButtonComponent.vue"
3
+
4
+ // More on how to set up stories at: https://storybook.js.org/docs/writing-stories
5
+ const meta = {
6
+ title: 'Actions/Buttons',
7
+ component: Button,
8
+ parameters: {
9
+ slots: {
10
+ default: "Button",
11
+ },
12
+ },
13
+ // This component will have an automatically generated docsPage entry: https://storybook.js.org/docs/writing-docs/autodocs
14
+ tags: ['autodocs'],
15
+ argTypes: {
16
+ outlined: { control: 'boolean' },
17
+ active: { control: 'boolean' },
18
+ loading: { control: 'boolean' },
19
+ size: { control: 'select', options: ['wide', 'tiny', 'small', 'large'] },
20
+ shape: {control: 'select', options: ['square', 'circle']},
21
+ type: {
22
+ control: 'select',
23
+ options: ['neutral', 'primary', 'secondary', 'accent', 'ghost', 'link', 'info', 'success', 'warning', 'error']
24
+ },
25
+ },
26
+
27
+ args: {
28
+
29
+ // primary: false,
30
+ // Use `fn` to spy on the onClick arg, which will appear in the actions panel once invoked: https://storybook.js.org/docs/essentials/actions#action-args
31
+ // onClick: fn(),
32
+ },
33
+ } satisfies Meta<typeof Button>;
34
+
35
+ export default meta;
36
+ type Story = StoryObj<typeof meta>;
37
+ /*
38
+ *👇 Render functions are a framework specific feature to allow you control on how the component renders.
39
+ * See https://storybook.js.org/docs/api/csf
40
+ * to learn how to use render functions.
41
+ */
42
+ export const Primary: Story = {
43
+ args: {
44
+ type: 'primary',
45
+ default: 'Button',
46
+ },
47
+ };
@@ -0,0 +1,70 @@
1
+ import Dropdown from '../../components/actions/dropdown.vue';
2
+ import { Meta, StoryFn } from '@storybook/vue3';
3
+
4
+ export default {
5
+ title: 'Actions/Dropdown',
6
+ component: Dropdown,
7
+ tags: ['autodocs'],
8
+ argTypes: {
9
+ items: {
10
+ control: 'object',
11
+ description: 'Array of dropdown items with `text` and `link`.',
12
+ },
13
+ position: {
14
+ control: 'select',
15
+ options: ['left', 'right', 'bottom', 'top'],
16
+ description: 'Controls the position of the dropdown relative to the button.',
17
+ },
18
+ floatPosition: {
19
+ control: 'select',
20
+ options: ['start', 'end'],
21
+ description: 'Determines the float position (start or end).',
22
+ },
23
+ openOnHover: {
24
+ control: 'boolean',
25
+ description: 'If true, the dropdown opens on hover.',
26
+ },
27
+ forceOpen: {
28
+ control: 'boolean',
29
+ description: 'If true, the dropdown remains open.',
30
+ },
31
+ },
32
+ } as Meta<typeof Dropdown>;
33
+
34
+ const Template: StoryFn<typeof Dropdown> = (args, { slots }) => ({
35
+ components: { Dropdown },
36
+ setup() {
37
+ return { args, slots };
38
+ },
39
+ template: `
40
+ <Dropdown v-bind="args">
41
+ <template #default>
42
+ <div class="btn m-1"><button>Custom Trigger</button></div>
43
+ </template>
44
+ <template #additional>
45
+ <div class="p-2 text-sm">Additional Slot Content</div>
46
+ </template>
47
+ </Dropdown>
48
+ `,
49
+ });
50
+
51
+ export const Default = Template.bind({});
52
+ Default.args = {
53
+ items: [
54
+ { text: 'Item 1', link: '#' },
55
+ { text: 'Item 2', link: '#' },
56
+ { text: 'Item 3', link: '#' },
57
+ ],
58
+ position: 'bottom',
59
+ floatPosition: 'start',
60
+ openOnHover: false,
61
+ forceOpen: false,
62
+ };
63
+ Default.parameters = {
64
+ docs: {
65
+ description: {
66
+ component:
67
+ 'A dropdown component with configurable props and slots for customization. Be sure to put a button in the default slot to get the desired results!',
68
+ },
69
+ },
70
+ };
@@ -0,0 +1,56 @@
1
+ import Modal from '../../components/actions/modal.vue';
2
+ import { Meta, StoryFn } from '@storybook/vue3';
3
+
4
+ export default {
5
+ title: 'Actions/Modal',
6
+ component: Modal,
7
+ tags: ['autodocs'], // Added autodocs tag
8
+ argTypes: {
9
+ position: {
10
+ control: 'select',
11
+ options: ['top', 'bottom', 'center'],
12
+ description: 'Controls the position of the modal.',
13
+ },
14
+ withBackdrop: {
15
+ control: 'boolean',
16
+ description: 'If true, a backdrop is displayed behind the modal.',
17
+ },
18
+ },
19
+ } as Meta<typeof Modal>;
20
+
21
+ const Template: StoryFn<typeof Modal> = (args, { slots }) => ({
22
+ components: { Modal },
23
+ setup() {
24
+ return { args, slots };
25
+ },
26
+ template: `
27
+ <Modal v-bind="args">
28
+ <template #trigger>
29
+ <button class="btn">Custom Trigger</button>
30
+ </template>
31
+ <template #default>
32
+ <h2 class="text-xl font-bold">Modal Content</h2>
33
+ <p>This is an example modal.</p>
34
+ </template>
35
+ <template #actions>
36
+ <button class="btn btn-primary">Confirm</button>
37
+ </template>
38
+ <template #close-button>
39
+ <button class="btn btn-secondary">Dismiss</button>
40
+ </template>
41
+ </Modal>
42
+ `,
43
+ });
44
+
45
+ export const Default = Template.bind({});
46
+ Default.args = {
47
+ position: 'center',
48
+ withBackdrop: true,
49
+ };
50
+ Default.parameters = {
51
+ docs: {
52
+ description: {
53
+ component: 'A customizable modal component with slots for trigger, content, actions, and a close button.',
54
+ },
55
+ },
56
+ };
@@ -0,0 +1,56 @@
1
+ import Swap from '../../components/actions/swap.vue'; // Adjust the path as per your setup
2
+ import { Meta, StoryFn } from '@storybook/vue3';
3
+
4
+ export default {
5
+ title: 'Actions/Swap',
6
+ component: Swap,
7
+ tags: ['autodocs'], // Include autodocs tag
8
+ argTypes: {
9
+ effect: {
10
+ control: 'select',
11
+ options: ['rotate', 'flip'],
12
+ description: 'The effect applied to the swap component.',
13
+ },
14
+ },
15
+ } as Meta<typeof Swap>;
16
+
17
+ const Template: StoryFn<typeof Swap> = (args, { slots }) => ({
18
+ components: { Swap },
19
+ setup() {
20
+ return { args, slots };
21
+ },
22
+ template: `
23
+ <Swap v-bind="args">
24
+ <template #on>
25
+ <div class="text-green-500 font-bold">On</div>
26
+ </template>
27
+ <template #off>
28
+ <div class="text-red-500 font-bold">Off</div>
29
+ </template>
30
+ </Swap>
31
+ `,
32
+ });
33
+
34
+ export const Default = Template.bind({});
35
+ Default.args = {
36
+ effect: 'rotate',
37
+ };
38
+ Default.parameters = {
39
+ docs: {
40
+ description: {
41
+ component: 'A swap component with optional effects and customizable slots for "on" and "off" states.',
42
+ },
43
+ },
44
+ };
45
+
46
+ export const FlipEffect = Template.bind({});
47
+ FlipEffect.args = {
48
+ effect: 'flip',
49
+ };
50
+ FlipEffect.parameters = {
51
+ docs: {
52
+ description: {
53
+ story: 'This variant applies the "flip" effect to the swap component.',
54
+ },
55
+ },
56
+ };
@@ -0,0 +1,41 @@
1
+ import ThemeSwitcher from '../../components/actions/theme-controller.vue'; // Adjust the path as per your setup
2
+ import { Meta, StoryFn } from '@storybook/vue3';
3
+
4
+ export default {
5
+ title: 'Actions/ThemeSwitcher',
6
+ component: ThemeSwitcher,
7
+ tags: ['autodocs'], // Include autodocs tag
8
+ argTypes: {
9
+ darkTheme: {
10
+ control: 'text',
11
+ description: "Define the name of your dark theme here",
12
+ },
13
+ lightTheme: {
14
+ control: 'text',
15
+ description: "Define the name of your light theme here",
16
+ }
17
+ },
18
+ } as Meta<typeof ThemeSwitcher>;
19
+
20
+ const Template: StoryFn<typeof ThemeSwitcher> = (args) => ({
21
+ components: { ThemeSwitcher },
22
+ setup() {
23
+ return { args };
24
+ },
25
+ template: `
26
+ <ThemeSwitcher v-bind="args" />
27
+ `,
28
+ });
29
+
30
+ export const Default = Template.bind({});
31
+ Default.args = {
32
+ darkTheme: 'reserveren-dark',
33
+ lightTheme: 'reserveren-light',
34
+ };
35
+ Default.parameters = {
36
+ docs: {
37
+ description: {
38
+ component: 'A theme switcher component that toggles between light and dark themes with localStorage support.',
39
+ },
40
+ },
41
+ };
@@ -0,0 +1,49 @@
1
+ import type { Meta, StoryObj } from '@storybook/vue3';
2
+ import Accordion from '../../components/data-display/accordion.vue'
3
+
4
+ // More on how to set up stories at: https://storybook.js.org/docs/writing-stories
5
+ const meta = {
6
+ title: 'Data Display/Accordion',
7
+ component: Accordion,
8
+ parameters: {
9
+ slots: {
10
+ },
11
+ },
12
+ // This component will have an automatically generated docsPage entry: https://storybook.js.org/docs/writing-docs/autodocs
13
+ tags: ['autodocs'],
14
+ argTypes: {
15
+ name: {control: "text", type: "string"},
16
+ items: {control: "object"},
17
+ joinItems: {control: "boolean", description: "Glue every item together or seperate every item."},
18
+ icon: {control: "radio", options: ["arrow", "plus"]}
19
+ },
20
+
21
+ args: {
22
+ joinItems: false,
23
+ items: [
24
+ {
25
+ title: "item 1",
26
+ content: "this is some text you can adjust with a wysiwyg editor or just in plain text",
27
+ },
28
+ {
29
+ title: "item 2",
30
+ content: "this is also some text you can adjust with a <strong>wysiwyg</strong> editor or just in plain text/html",
31
+ }
32
+ ],
33
+ },
34
+ } satisfies Meta<typeof Accordion>;
35
+
36
+ export default meta;
37
+ type Story = StoryObj<typeof meta>;
38
+ /*
39
+ *👇 Render functions are a framework specific feature to allow you control on how the component renders.
40
+ * See https://storybook.js.org/docs/api/csf
41
+ * to learn how to use render functions.
42
+ */
43
+ export const Primary: Story = {
44
+ args: {
45
+ name: "demo-accordion",
46
+ joinItems: false,
47
+ icon: "plus",
48
+ },
49
+ };