manolis-ui 0.0.11 → 0.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (117) hide show
  1. package/package.json +6 -3
  2. package/.github/workflows/deploy_and_publish.yml +0 -113
  3. package/.storybook/main.ts +0 -34
  4. package/.storybook/preview.ts +0 -17
  5. package/.vscode/extensions.json +0 -3
  6. package/index.html +0 -13
  7. package/postcss.config.js +0 -2
  8. package/public/vite.svg +0 -1
  9. package/src/App.vue +0 -19
  10. package/src/assets/vue.svg +0 -1
  11. package/src/components/actions/ButtonComponent.vue +0 -80
  12. package/src/components/actions/dropdown.vue +0 -46
  13. package/src/components/actions/modal.vue +0 -52
  14. package/src/components/actions/swap.vue +0 -15
  15. package/src/components/actions/theme-controller.vue +0 -52
  16. package/src/components/data-display/accordion.vue +0 -29
  17. package/src/components/data-display/avatar.vue +0 -36
  18. package/src/components/data-display/badge.vue +0 -35
  19. package/src/components/data-display/card.vue +0 -60
  20. package/src/components/data-display/carousel.vue +0 -34
  21. package/src/components/data-input/advancedSearch.vue +0 -227
  22. package/src/components/data-input/datetimePicker.vue +0 -402
  23. package/src/components/data-input/input.vue +0 -98
  24. package/src/components/data-input/rating.vue +0 -60
  25. package/src/components/feedback/loader.vue +0 -25
  26. package/src/components/layout/footer.vue +0 -38
  27. package/src/components/layout/hero.vue +0 -15
  28. package/src/components/navigation/categoryNavigation.vue +0 -40
  29. package/src/components/navigation/navigationBar.vue +0 -107
  30. package/src/components/navigation/tab.vue +0 -62
  31. package/src/composables/useLocalStorage.ts +0 -24
  32. package/src/index.ts +0 -30
  33. package/src/main.ts +0 -5
  34. package/src/stories/actions/Button.stories.ts +0 -47
  35. package/src/stories/actions/Dropdown.stories.ts +0 -70
  36. package/src/stories/actions/Modal.stories.ts +0 -56
  37. package/src/stories/actions/Swap.stories.ts +0 -56
  38. package/src/stories/actions/ThemeSwitcher.stories.ts +0 -41
  39. package/src/stories/data-display/accordion.stories.ts +0 -49
  40. package/src/stories/data-display/avatar.stories.ts +0 -75
  41. package/src/stories/data-display/badge.stories.ts +0 -76
  42. package/src/stories/data-display/card.stories.ts +0 -79
  43. package/src/stories/data-input/rating.stories.ts +0 -73
  44. package/src/stories/feedback/Loader.stories.ts +0 -34
  45. package/src/stories/layout/footer.stories.ts +0 -63
  46. package/src/style.css +0 -57
  47. package/src/vite-env.d.ts +0 -1
  48. package/storybook-static/assets/Button.stories-B5Gg7Ski.js +0 -6
  49. package/storybook-static/assets/Color-YHDXOIA2-Cy_mA6cn.js +0 -1
  50. package/storybook-static/assets/DocsRenderer-CFRXHY34-wSGN0bIp.js +0 -610
  51. package/storybook-static/assets/Dropdown.stories-Bth3_21L.js +0 -32
  52. package/storybook-static/assets/Loader.stories-BnqtyQP_.js +0 -5
  53. package/storybook-static/assets/Modal.stories-CxOA4msz.js +0 -46
  54. package/storybook-static/assets/Swap.stories-Cpc9q_kE.js +0 -54
  55. package/storybook-static/assets/ThemeSwitcher.stories-BwHcHihM.js +0 -45
  56. package/storybook-static/assets/accordion.stories-B6yDsDXk.js +0 -7
  57. package/storybook-static/assets/avatar.stories-BDN93iYh.js +0 -39
  58. package/storybook-static/assets/badge.stories-CXQpnu0e.js +0 -39
  59. package/storybook-static/assets/card.stories-1gVWO2fs.js +0 -48
  60. package/storybook-static/assets/entry-preview-Cfvj9hgI.js +0 -1
  61. package/storybook-static/assets/entry-preview-docs-BJQT5BWv.js +0 -16
  62. package/storybook-static/assets/footer.stories-DPXqApht.js +0 -23
  63. package/storybook-static/assets/iframe-BNdG_Qtn.js +0 -211
  64. package/storybook-static/assets/index-Bx-go_-4.js +0 -8
  65. package/storybook-static/assets/index-CiNYFPF0.js +0 -1
  66. package/storybook-static/assets/index-DrFu-skq.js +0 -6
  67. package/storybook-static/assets/preview-4lzcCKUM.css +0 -1
  68. package/storybook-static/assets/preview-B8lJiyuQ.js +0 -34
  69. package/storybook-static/assets/preview-BBWR9nbA.js +0 -1
  70. package/storybook-static/assets/preview-BWzBA1C2.js +0 -396
  71. package/storybook-static/assets/preview-CvbIS5ZJ.js +0 -1
  72. package/storybook-static/assets/preview-DD_OYowb.js +0 -1
  73. package/storybook-static/assets/preview-DGUiP6tS.js +0 -7
  74. package/storybook-static/assets/preview-DHQbi4pV.js +0 -1
  75. package/storybook-static/assets/preview-DMNI4LCC.js +0 -15
  76. package/storybook-static/assets/preview-DnqJFqn_.js +0 -2
  77. package/storybook-static/assets/preview-Dsq_8SDT.js +0 -240
  78. package/storybook-static/assets/preview-hHK5u5_Q.js +0 -1
  79. package/storybook-static/assets/rating.stories-BX0Pzp5i.js +0 -27
  80. package/storybook-static/assets/vue.esm-bundler-C-YazFc_.js +0 -36
  81. package/storybook-static/favicon.svg +0 -1
  82. package/storybook-static/iframe.html +0 -666
  83. package/storybook-static/index.html +0 -181
  84. package/storybook-static/index.json +0 -1
  85. package/storybook-static/nunito-sans-bold-italic.woff2 +0 -0
  86. package/storybook-static/nunito-sans-bold.woff2 +0 -0
  87. package/storybook-static/nunito-sans-italic.woff2 +0 -0
  88. package/storybook-static/nunito-sans-regular.woff2 +0 -0
  89. package/storybook-static/project.json +0 -1
  90. package/storybook-static/sb-addons/chromatic-com-storybook-9/manager-bundle.js +0 -331
  91. package/storybook-static/sb-addons/chromatic-com-storybook-9/manager-bundle.js.LEGAL.txt +0 -51
  92. package/storybook-static/sb-addons/essentials-actions-2/manager-bundle.js +0 -3
  93. package/storybook-static/sb-addons/essentials-backgrounds-4/manager-bundle.js +0 -12
  94. package/storybook-static/sb-addons/essentials-controls-1/manager-bundle.js +0 -402
  95. package/storybook-static/sb-addons/essentials-docs-3/manager-bundle.js +0 -242
  96. package/storybook-static/sb-addons/essentials-measure-7/manager-bundle.js +0 -3
  97. package/storybook-static/sb-addons/essentials-outline-8/manager-bundle.js +0 -3
  98. package/storybook-static/sb-addons/essentials-toolbars-6/manager-bundle.js +0 -3
  99. package/storybook-static/sb-addons/essentials-viewport-5/manager-bundle.js +0 -3
  100. package/storybook-static/sb-addons/interactions-10/manager-bundle.js +0 -222
  101. package/storybook-static/sb-addons/links-11/manager-bundle.js +0 -3
  102. package/storybook-static/sb-addons/storybook-core-core-server-presets-0/common-manager-bundle.js +0 -3
  103. package/storybook-static/sb-common-assets/favicon.svg +0 -1
  104. package/storybook-static/sb-common-assets/nunito-sans-bold-italic.woff2 +0 -0
  105. package/storybook-static/sb-common-assets/nunito-sans-bold.woff2 +0 -0
  106. package/storybook-static/sb-common-assets/nunito-sans-italic.woff2 +0 -0
  107. package/storybook-static/sb-common-assets/nunito-sans-regular.woff2 +0 -0
  108. package/storybook-static/sb-manager/globals-module-info.js +0 -1046
  109. package/storybook-static/sb-manager/globals-runtime.js +0 -41239
  110. package/storybook-static/sb-manager/globals.js +0 -48
  111. package/storybook-static/sb-manager/runtime.js +0 -12048
  112. package/storybook-static/vite.svg +0 -1
  113. package/tsconfig.app.json +0 -27
  114. package/tsconfig.build.json +0 -3
  115. package/tsconfig.json +0 -7
  116. package/tsconfig.node.json +0 -25
  117. package/vite.config.ts +0 -43
@@ -1,98 +0,0 @@
1
- <!-- <script setup lang="ts">
2
- import { ref, watch, withDefaults } from 'vue';
3
-
4
- interface Props {
5
-
6
- }
7
-
8
- const props = withDefaults(defineProps<Props>(), {
9
-
10
- });
11
-
12
- const rating = ref<number>(props.initialRating);
13
-
14
- const updateRating = (newRating: number) => {
15
- rating.value = newRating;
16
- };
17
- </script>
18
-
19
- <template>
20
- <input type="text" placeholder="Type here" class="w-full max-w-xs input" v-model="" />
21
- </template> -->
22
-
23
- <script setup lang="ts">
24
- import { defineProps, defineEmits } from "vue";
25
-
26
- // Define props with TypeScript types
27
- const props = defineProps<{
28
- modelValue: string;
29
- label?: string;
30
- labelSecondary?: string;
31
- placeholder?: string;
32
- type?: "text" | "password" | "email" | "number" | "tel" | "url" | "search";
33
- size: "xs" | "sm" | "md" | "lg";
34
- bordered: boolean;
35
- inputClass?: string;
36
- wrapperClass?: string;
37
- helperText?: string;
38
- disabled?: boolean;
39
- readonly?: boolean;
40
- name?: string;
41
- }>();
42
-
43
- // Default prop values
44
- const {
45
- label = "",
46
- labelSecondary = "",
47
- placeholder = "",
48
- bordered = true,
49
- type = "text",
50
- size = "md",
51
- wrapperClass = "",
52
- helperText = "",
53
- disabled = false,
54
- readonly = false,
55
- name = "",
56
- } = props;
57
-
58
- // Define emits with TypeScript types
59
- const emit = defineEmits<{
60
- (e: "updated", value: string): void;
61
- }>();
62
-
63
- // Update the input value on user input
64
- const updateValue = (event: Event) => {
65
- const target = event.target as HTMLInputElement;
66
- emit("updated", target.value);
67
- };
68
- </script>
69
-
70
- <template>
71
- <div class="form-control w-full" :class="wrapperClass">
72
- <!-- Input Label -->
73
- <label v-if="label" class="label">
74
- <span class="label-text">{{ label }}</span>
75
- <span v-if="labelSecondary" class="label-text-alt">{{ labelSecondary }}</span>
76
- </label>
77
-
78
- <!-- Input Field -->
79
- <input
80
- :type="type"
81
- :value="modelValue"
82
- :placeholder="placeholder"
83
- class="w-full input"
84
- :class="[`input-${size}` ,{
85
- 'bordered': bordered,
86
- }]"
87
- :disabled="disabled"
88
- :readonly="readonly"
89
- :name="name"
90
- @input="updateValue"
91
- />
92
-
93
- <!-- Helper Text -->
94
- <label v-if="helperText" class="label">
95
- <span class="label-text-alt">{{ helperText }}</span>
96
- </label>
97
- </div>
98
- </template>
@@ -1,60 +0,0 @@
1
- <script setup lang="ts">
2
- import { ref, watch, withDefaults } from 'vue';
3
-
4
- interface Props {
5
- initialRating: number;
6
- numberOfStars?: number;
7
- halfStars?: boolean;
8
- isInteractive?: boolean;
9
- size?: "xs" | "sm" | "md" | "lg";
10
- }
11
-
12
- const props = withDefaults(defineProps<Props>(), {
13
- initialRating: 0,
14
- numberOfStars: 5,
15
- halfStars: true,
16
- isInteractive: false,
17
- size: "sm",
18
- });
19
-
20
- const rating = ref<number>(props.initialRating);
21
-
22
- watch(
23
- () => props.initialRating,
24
- (newValue) => {
25
- rating.value = newValue;
26
- }
27
- );
28
-
29
- const updateRating = (newRating: number) => {
30
- rating.value = newRating;
31
- };
32
- </script>
33
-
34
- <template>
35
- <div class="rating" :class="[
36
- `rating-${props.size}`,
37
- { 'rating-half': halfStars }
38
- ]">
39
- <input
40
- v-for="i in numberOfStars * (halfStars ? 2 : 1)"
41
- :key="i"
42
- type="radio"
43
- :value="halfStars ? i * 0.5 : i"
44
- :checked="rating === (halfStars ? i * 0.5 : i)"
45
- @change="isInteractive ? updateRating(halfStars ? i * 0.5 : i) : null"
46
- class="mask mask-star"
47
- :class="{
48
- 'bg-yellow-400': rating >= (halfStars ? i * 0.5 : i),
49
- 'mask-half-1': halfStars && i % 2 !== 0,
50
- 'mask-half-2': halfStars && i % 2 === 0,
51
- 'cursor-pointer': isInteractive,
52
- 'cursor-default': !isInteractive
53
- }"
54
- :disabled="!isInteractive"
55
- />
56
- </div>
57
- </template>
58
-
59
-
60
-
@@ -1,25 +0,0 @@
1
- <script lang="ts" setup>
2
- import { ref, watch } from 'vue';
3
-
4
- interface Props {
5
- loading?: boolean;
6
- }
7
-
8
- const props = withDefaults(defineProps<Props>(), {
9
- loading: true,
10
- });
11
-
12
- const loading = ref<boolean>(props.loading);
13
-
14
- watch(
15
- () => props.loading,
16
- (newValue) => {
17
- loading.value = newValue;
18
- }
19
- );
20
-
21
- </script>
22
-
23
- <template>
24
- <span class="loading loading-spinner loading-md mx-auto " v-if="loading"></span>
25
- </template>
@@ -1,38 +0,0 @@
1
- <script setup lang="ts">
2
- interface Props {
3
- items: Array<FooterNavigation>;
4
- }
5
-
6
- const props = defineProps<Props>();
7
-
8
- export interface FooterNavigation {
9
- title: string;
10
- items: Array<FooterNavigationItem>;
11
- }
12
-
13
- interface FooterNavigationItem {
14
- text: string;
15
- link: string;
16
- enabled: Boolean;
17
- }
18
- </script>
19
-
20
- <template>
21
- <div class="bg-base-200 mx-auto md:px-10 py-10 text-base-content">
22
- <footer class="footer sm:footer-horizontal container">
23
- <nav v-for="footerCols in props.items">
24
- <h6 class="footer-title">{{ footerCols.title }}</h6>
25
- <a
26
- v-for="footerItem in footerCols.items"
27
- class="link link-hover"
28
- :href="footerItem.link"
29
- >{{ footerItem.text }}</a
30
- >
31
- </nav>
32
-
33
- <aside class="ml-auto">
34
- <slot></slot>
35
- </aside>
36
- </footer>
37
- </div>
38
- </template>
@@ -1,15 +0,0 @@
1
- <template>
2
- <div class="min-h-40 container hero">
3
- <div class="px-0! text-center hero-content">
4
- <div>
5
- <h1 class="mt-9 text-4xl">
6
- <slot name="title">hero title</slot>
7
- </h1>
8
- <p>
9
- <slot name="description" class="py-9" />
10
- </p>
11
- <slot name="call-to-action-block" class="max-w-full"><button class="btn btn-primary">Call to action</button></slot>
12
- </div>
13
- </div>
14
- </div>
15
- </template>
@@ -1,40 +0,0 @@
1
- <script setup lang="ts">
2
- import { defineProps, defineEmits } from 'vue';
3
-
4
- interface Tab {
5
- name: string | any;
6
- description: string;
7
- type: "date" | "time" | "datetime" | any;
8
- range: boolean;
9
- props?: Object;
10
- value?: any;
11
- }
12
-
13
-
14
- interface Category {
15
- category: string;
16
- tabs: Tab[];
17
- }
18
-
19
- interface Props {
20
- searchOptions: Array<Category>;
21
- currentCategory: string;
22
- }
23
-
24
- const props = defineProps<Props>();
25
- const emit = defineEmits<{ (e: 'update:currentCategory', category: string): void }>();
26
-
27
- function changeCategory(category: string) {
28
- emit('update:currentCategory', category);
29
- }
30
- </script>
31
-
32
- <template>
33
- <div class="categories flex flex-row gap-4 place-content-center">
34
- <div v-for="category in props.searchOptions" :key="category.category">
35
- <button @click="changeCategory(category.category)" class="truncate" :class="{ 'font-semibold': props.currentCategory === category.category }">
36
- {{ category.category }}
37
- </button>
38
- </div>
39
- </div>
40
- </template>
@@ -1,107 +0,0 @@
1
- <script lang="ts" setup>
2
- // import { ref, watch } from 'vue';
3
-
4
- interface Props {
5
- isCollapsed: boolean;
6
- }
7
-
8
- const props = withDefaults(defineProps<Props>(), {
9
- isCollapsed: true
10
- });
11
-
12
- </script>
13
-
14
- <template>
15
- <nav class="place-items-start border-primary bg-base-100 px-5 py-5 border-b-4 transition-all navbar navigationbar"
16
- :class="props.isCollapsed ? 'collapsed' : ''">
17
- <div class="md:flex hidden navbar-start">
18
- <slot name="start"></slot>
19
- </div>
20
-
21
- <div class="md:flex justify-center items-center hidden navbar-center">
22
- <slot name="center"></slot>
23
- </div>
24
-
25
- <div class="md:flex hidden navbar-end">
26
- <slot name="end"></slot>
27
- </div>
28
- <div class="navbar-bottom md:flex hidden">
29
- <slot name="bottom"></slot>
30
- </div>
31
- </nav>
32
- </template>
33
-
34
- <style scoped>
35
- .navigationbar {
36
- display: grid;
37
- grid-template-columns: auto auto auto;
38
- grid-template-rows: auto auto;
39
- grid-template-areas:
40
- "center center center"
41
- "bottom bottom bottom";
42
- position: fixed;
43
- width: 100% !important;
44
- gap: 0 1rem;
45
- align-items: center;
46
- padding: var(--navbar-padding, 0.5rem);
47
- min-height: 4rem;
48
- z-index: 5;
49
-
50
-
51
- @media (min-width: 768px) {
52
- grid-template-columns: 0.7fr 1.6fr 0.7fr;
53
- grid-template-areas:
54
- "start center end"
55
- "bottom bottom bottom";
56
-
57
- grid-row-gap: 2rem;
58
- padding: 2rem;
59
-
60
- }
61
- }
62
-
63
- .navbar-start {
64
- grid-area: start;
65
- height: 100%;
66
- }
67
-
68
- .navbar-center {
69
- grid-area: center;
70
- width: 100%;
71
-
72
- height: 100%;
73
- }
74
-
75
- .navbar-end {
76
- width: 100%;
77
- height: 100%;
78
- grid-area: end;
79
- }
80
-
81
- .navbar-bottom {
82
- grid-area: center;
83
- width: 100%;
84
- display: flex;
85
- justify-content: center;
86
- align-items: center;
87
-
88
- @media (min-width: 768px) {
89
- grid-area: bottom;
90
- }
91
- }
92
-
93
- nav.navigationbar.collapsed {
94
- top: 0;
95
- z-index: 10;
96
- grid-template-columns: auto 1fr auto !important;
97
-
98
- @media (min-width: 768px) {
99
- row-gap: 0;
100
- padding: 1rem;
101
- }
102
-
103
- & .navbar-bottom {
104
- grid-area: center !important;
105
- }
106
- }
107
- </style>
@@ -1,62 +0,0 @@
1
- <script setup lang="ts">
2
- import { ref, onUnmounted } from 'vue'
3
-
4
- interface Props {
5
- items: Array<string>;
6
- withControlls?: boolean;
7
- rotateTabsAfter?: number;//in seconds
8
- }
9
-
10
- const props = defineProps<Props>();
11
-
12
- const currentTab = ref(props.items[0]);
13
-
14
- // for setting a propperty in the template when needed (dynamic data for example)
15
- const emit = defineEmits(['tab-changed']);
16
-
17
- function setCurrentTab(tab: string) {
18
- currentTab.value = tab;
19
- emit('tab-changed', tab);
20
- }
21
-
22
- function nextTab() {
23
- const currentIndex = props.items.indexOf(currentTab.value);
24
- const nextIndex = (currentIndex + 1) % props.items.length;
25
- setCurrentTab(props.items[nextIndex]);
26
- }
27
-
28
- function previousTab() {
29
- const currentIndex = props.items.indexOf(currentTab.value);
30
- const previousIndex = (currentIndex - 1 + props.items.length) % props.items.length;
31
- setCurrentTab(props.items[previousIndex]);
32
- }
33
- onUnmounted(() => {
34
- if (props.rotateTabsAfter) {
35
- setInterval(() => {
36
- nextTab();
37
- }, props.rotateTabsAfter * 1000);
38
- }
39
- })
40
-
41
- </script>
42
-
43
- <template>
44
- <div role="tablist" class="tabs tabs-bordered tabs-lg mt-28 relative w-full">
45
- <!-- controls -->
46
- <div v-if="withControlls" class="hidden md:flex gap-4 right-0 top-4 absolute">
47
- <button @click="previousTab()" class="cursor-pointer">Previous</button>
48
- <button @click="nextTab()" class="cursor-pointer text-primary">Next</button>
49
- </div>
50
- <!-- tab buttons -->
51
- <template v-for="item in items">
52
- <a type="button" role="tab" class="tab min-w-max"
53
- :class="item === currentTab ? 'bg-primary text-base-100' : ''" @click="setCurrentTab(item)"
54
- :aria-selected="currentTab == item"> {{ item }}</a>
55
- <!-- tab content -->
56
- <div role="tabpanel"
57
- class="tab-content border-base-300 border-t-2 border-x-0 border-b-0 p-6 overflow-x-auto max-w-full">
58
- <slot :name="`${item}-tab`"></slot>
59
- </div>
60
- </template>
61
- </div>
62
- </template>
@@ -1,24 +0,0 @@
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 DELETED
@@ -1,30 +0,0 @@
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 DELETED
@@ -1,5 +0,0 @@
1
- import './style.css'
2
- import { createApp } from 'vue'
3
- import App from './App.vue'
4
-
5
- createApp(App).mount('#app')
@@ -1,47 +0,0 @@
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
- };
@@ -1,70 +0,0 @@
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
- };
@@ -1,56 +0,0 @@
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
- };