edvoyui-component-library-test-flight 0.0.105 → 0.0.106

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.
@@ -1,5 +1,5 @@
1
1
  export * from "/Volumes/work/repos/edvoy-ui-v2/src/components/tabs/EUITabs.vue?vue&type=script&setup=true&lang.ts";
2
- import "/Volumes/work/repos/edvoy-ui-v2/src/components/tabs/EUITabs.vue?vue&type=style&index=0&scoped=9b4681af&lang.css";
2
+ import "/Volumes/work/repos/edvoy-ui-v2/src/components/tabs/EUITabs.vue?vue&type=style&index=0&scoped=8ce36c62&lang.css";
3
3
  declare const _default: any;
4
4
  export default _default;
5
5
  //# sourceMappingURL=EUITabs.vue.d.ts.map
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "edvoyui-component-library-test-flight",
3
3
  "private": false,
4
- "version": "0.0.105",
4
+ "version": "0.0.106",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "dist/",
@@ -0,0 +1,75 @@
1
+ // EUIBreadcrumb.stories.ts
2
+ import { Meta, StoryObj } from "@storybook/vue3";
3
+ import EUIBreadcrumb from "./EUIBreadcrumb.vue";
4
+ import {
5
+ BookOpenIcon,
6
+ HomeIcon,
7
+ TableCellsIcon,
8
+ } from "@heroicons/vue/24/outline";
9
+
10
+ const meta = {
11
+ title: "Components/Breadcrumb",
12
+ component: EUIBreadcrumb,
13
+ tags: ["autodocs"],
14
+ argTypes: {
15
+ pages: {
16
+ description: `An array of objects representing the breadcrumb pages.
17
+ Each object can include:
18
+ - \`name\` (string): The display name of the breadcrumb item.
19
+ - \`href\` (string, optional): The URL the breadcrumb item points to.
20
+ - \`current\` (boolean, optional): Indicates if the breadcrumb item is the current page.
21
+ - \`showIcon\` (Vue component, optional): An icon component to display alongside the name.`,
22
+ control: "object",
23
+ },
24
+ },
25
+ } satisfies Meta<typeof EUIBreadcrumb>;
26
+
27
+ export default meta;
28
+ type Story = StoryObj<typeof meta>;
29
+
30
+ // Default story with minimum props
31
+ export const Default: Story = {
32
+ args: {
33
+ pages: [
34
+ {
35
+ name: "Home",
36
+ href: "/",
37
+ current: true,
38
+ },
39
+ {
40
+ name: "Library",
41
+ href: "/library",
42
+ current: false,
43
+ },
44
+ {
45
+ name: "Data",
46
+ current: false,
47
+ },
48
+ ],
49
+ },
50
+ };
51
+
52
+ // Default story with minimum props
53
+ export const IconsUsed: Story = {
54
+ args: {
55
+ pages: [
56
+ {
57
+ name: "Home",
58
+ href: "/",
59
+ current: true,
60
+ showIcon: HomeIcon,
61
+ },
62
+ {
63
+ name: "Library",
64
+ href: "/library",
65
+ current: false,
66
+ showIcon: BookOpenIcon,
67
+ },
68
+ {
69
+ name: "Data",
70
+ current: false,
71
+ showIcon: TableCellsIcon,
72
+ },
73
+ ],
74
+ },
75
+ };
@@ -0,0 +1,59 @@
1
+ <template>
2
+ <nav aria-label="breadcrumb" class="my-2">
3
+ <ol
4
+ role="list"
5
+ class="flex items-center justify-start max-w-full space-x-1"
6
+ >
7
+ <li
8
+ v-for="(page, index) in pages"
9
+ :key="page.name"
10
+ class="flex flex-row items-center justify-start space-x-1"
11
+ >
12
+ <a
13
+ :href="page.href"
14
+ class="inline-flex items-center gap-2 text-sm font-medium font-inter"
15
+ :class="
16
+ pages.length - 1 !== index
17
+ ? 'text-gray-600 hover:text-gray-700'
18
+ : 'text-gray-500'
19
+ "
20
+ :aria-current="page.current ? 'page' : undefined"
21
+ >
22
+ <component
23
+ v-if="page?.showIcon"
24
+ :is="page?.showIcon"
25
+ class="text-current size-4"
26
+ />
27
+ {{ page.name }}</a
28
+ >
29
+ <ChevronDownStroke
30
+ v-if="pages.length - 1 !== index"
31
+ class="flex-shrink-0 w-5 h-5 text-gray-400 transform -rotate-90"
32
+ aria-hidden="true"
33
+ />
34
+ </li>
35
+ </ol>
36
+ </nav>
37
+ </template>
38
+
39
+ <script setup lang="ts">
40
+ import { toRefs, type PropType } from "vue";
41
+ import ChevronDownStroke from "../../assets/svg/ChevronDownStroke.vue";
42
+
43
+ interface BreadcrumbPage {
44
+ name: string;
45
+ href?: string;
46
+ current?: boolean;
47
+ showIcon?: {};
48
+ }
49
+
50
+ const props = defineProps({
51
+ pages: {
52
+ type: Array as PropType<BreadcrumbPage[]>,
53
+ default: [],
54
+ },
55
+ });
56
+ const { pages } = toRefs(props);
57
+ </script>
58
+
59
+ <style scoped></style>
@@ -48,3 +48,5 @@ export { default as EUITooltip } from "./tooltip/EUITooltip.vue";
48
48
  export { default as EUISearch } from "./searchInput/EUISearch.vue";
49
49
  export { default as EUISearchExpand } from "./searchexpand/EUISearchExpand.vue";
50
50
  export { default as EUISearchToggle } from "./searchexpand/EUISearchToggle.vue";
51
+
52
+ export { default as EUIBreadcrumb } from "./breadcrumb/EUIBreadcrumb.vue";
@@ -31,7 +31,7 @@
31
31
  : ' text-gray-500 hover:text-gray-600 rounded-lg bg-transparent z-0 transition-colors duration-300 ease-in origin-center',
32
32
  ]"
33
33
  >
34
- <slot name="title" :tab="tab">
34
+ <slot name="title" :tab="tab" :tabIndex="tabindex" :activeTab="activeTabIndex">
35
35
  {{ tab?.name }}
36
36
  </slot>
37
37
  </span>
@@ -51,6 +51,7 @@
51
51
  <button
52
52
  v-for="(tab, tabindex) in tabs"
53
53
  :key="tabindex"
54
+ type="button"
54
55
  role="tab"
55
56
  :id="`id-${tab.name}`"
56
57
  :class="[
@@ -64,11 +65,38 @@
64
65
  ]"
65
66
  @click="selectTab(tabindex)"
66
67
  >
67
- <slot name="title" :tab="tab">
68
+ <slot name="title" :tab="tab" :tabIndex="tabindex" :activeTab="activeTabIndex">
68
69
  {{ tab?.name }}
69
70
  </slot>
70
71
  </button>
71
72
  </div>
73
+ <div
74
+ v-else-if="tabStyle === 'shadow'"
75
+ class="justify-start relative z-0 inline-flex items-center gap-0 bg-white/50 rounded-t-lg shadow-[0px_1px_2px_0px_rgba(55,65,81,0.10)]"
76
+ >
77
+ <button
78
+ v-for="(tab, tabindex) in tabs"
79
+ :key="tabindex"
80
+ type="button"
81
+ role="tab"
82
+ :id="`id-${tab.name}`"
83
+ :class="[
84
+ 'px-3 py-1 leading-5 transition-all duration-150 ease-in-out hover:text-gray-800 h-12 rounded-t-lg',
85
+ tabSize === 'sm'
86
+ ? 'text-sm font-medium border-b-2'
87
+ : 'text-base font-semibold border-b-[3px]',
88
+ activeTabIndex === tabindex
89
+ ? 'border-purple-800 text-purple-800 bg-white z-10 rounded-t-lg shadow-[0px_2px_4px_0px_rgba(55,65,81,0.1)]'
90
+ : 'border-transparent text-gray-500 z-0',
91
+ ]"
92
+ @click="selectTab(tabindex)"
93
+ >
94
+ <slot name="title" :tab="tab" :tabIndex="tabindex" :activeTab="activeTabIndex">
95
+ {{ tab?.name }}
96
+ </slot>
97
+ </button>
98
+ </div>
99
+
72
100
  <div
73
101
  v-else
74
102
  class="flex items-center gap-1 p-2 transition-all duration-100"
@@ -76,6 +104,7 @@
76
104
  <button
77
105
  v-for="(tab, tabindex) in tabs"
78
106
  :key="tabindex"
107
+ type="button"
79
108
  role="tab"
80
109
  :id="`id-${tab.name}`"
81
110
  class="px-4 py-1 text-sm font-semibold transition-colors duration-150 ease-in-out border rounded-full"
@@ -86,12 +115,12 @@
86
115
  "
87
116
  @click="selectTab(tabindex)"
88
117
  >
89
- <slot name="title" :tab="tab">
118
+ <slot name="title" :tab="tab" :tabIndex="tabindex" :activeTab="activeTabIndex">
90
119
  {{ tab?.name }}
91
120
  </slot>
92
121
  </button>
93
122
  </div>
94
- <div :class="['py-2 text-base font-normal text-gray-700', contentClass]">
123
+ <div :class="['py-2 text-base font-normal text-gray-700 bg-white relative', contentClass, {'rounded-lg !rounded-tl-none shadow-[0px_-2px_24px_0px_rgba(0,0,0,0.075)] z-20':tabStyle === 'shadow'}]">
95
124
  <slot name="content" :active-tab="tabs[activeTabIndex]">
96
125
  {{ tabs[activeTabIndex]?.content }}
97
126
  </slot>
@@ -110,7 +139,7 @@ interface Tab {
110
139
  const props = defineProps<{
111
140
  tabs: Tab[];
112
141
  defaultActiveIndex?: number;
113
- tabStyle: "rounded" | "border" | "design";
142
+ tabStyle: "rounded" | "border" | "design" | "shadow";
114
143
  contentClass?: string[] | string;
115
144
  tabSize?: "sm" | "md";
116
145
  tabAlign?: "start" | "justify" | "end";