@zap-wunschlachen/wl-shared-components 1.0.0
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/playwright.yml +215 -0
- package/.github/workflows/static.yml +62 -0
- package/.prettierrc +5 -0
- package/.storybook/main.ts +18 -0
- package/.storybook/preview.ts +37 -0
- package/.storybook/storyWrapper.vue +18 -0
- package/.storybook/withVuetifyTheme.decorator.ts +21 -0
- package/App.vue +95 -0
- package/README.md +56 -0
- package/heroicons.ts +75 -0
- package/index.html +19 -0
- package/package.json +66 -0
- package/playwright.config.ts +35 -0
- package/public/audio/dummy_pink_noise.wav +0 -0
- package/public/background.svg +60 -0
- package/public/javascript.svg +1 -0
- package/public/style.css +187 -0
- package/public/technologies.svg +22 -0
- package/src/assets/css/base.css +235 -0
- package/src/assets/css/variables.css +96 -0
- package/src/assets/fonts/Outfit-Black.ttf +0 -0
- package/src/assets/fonts/Outfit-Bold.ttf +0 -0
- package/src/assets/fonts/Outfit-ExtraBold.ttf +0 -0
- package/src/assets/fonts/Outfit-ExtraLight.ttf +0 -0
- package/src/assets/fonts/Outfit-Light.ttf +0 -0
- package/src/assets/fonts/Outfit-Medium.ttf +0 -0
- package/src/assets/fonts/Outfit-Regular.ttf +0 -0
- package/src/assets/fonts/Outfit-SemiBold.ttf +0 -0
- package/src/assets/fonts/Outfit-Thin.ttf +0 -0
- package/src/components/Accordion/Accordion.css +59 -0
- package/src/components/Accordion/AccordionGroup.vue +51 -0
- package/src/components/Accordion/AccordionItem.vue +66 -0
- package/src/components/Appointment/Card/Actions.css +30 -0
- package/src/components/Appointment/Card/Actions.vue +66 -0
- package/src/components/Appointment/Card/Card.css +49 -0
- package/src/components/Appointment/Card/Card.vue +55 -0
- package/src/components/Appointment/Card/Details.css +51 -0
- package/src/components/Appointment/Card/Details.vue +44 -0
- package/src/components/Audio/Audio.vue +188 -0
- package/src/components/Audio/Waveform.vue +118 -0
- package/src/components/Button/Button.vue +119 -0
- package/src/components/CheckBox/CheckBox.css +185 -0
- package/src/components/CheckBox/Checkbox.vue +130 -0
- package/src/components/DateInput/DateInput.css +3 -0
- package/src/components/DateInput/DateInput.vue +263 -0
- package/src/components/Dialog/Dialog.css +6 -0
- package/src/components/Dialog/Dialog.vue +29 -0
- package/src/components/EditField/EditField.css +20 -0
- package/src/components/EditField/EditField.vue +202 -0
- package/src/components/IconBullet/IconBullet.vue +86 -0
- package/src/components/IconBullet/IconBulletList.vue +41 -0
- package/src/components/Icons/Audio/CloudFailed.vue +21 -0
- package/src/components/Icons/Audio/CloudSaved.vue +22 -0
- package/src/components/Icons/Audio/Delete.vue +16 -0
- package/src/components/Icons/Audio/Pause.vue +19 -0
- package/src/components/Icons/Audio/Play.vue +16 -0
- package/src/components/Icons/CalendarNotification.vue +126 -0
- package/src/components/Icons/Chair.vue +32 -0
- package/src/components/Icons/ChairNotification.vue +35 -0
- package/src/components/Icons/Circle.vue +66 -0
- package/src/components/Icons/FavIcon.vue +22 -0
- package/src/components/Icons/FilledCircle.vue +11 -0
- package/src/components/Icons/Group3.vue +46 -0
- package/src/components/Icons/RingNotification.vue +54 -0
- package/src/components/Icons/SolidArrowRight.vue +14 -0
- package/src/components/Icons/calendar.vue +17 -0
- package/src/components/Icons/checkbox.vue +19 -0
- package/src/components/Icons/outlineChecked.vue +27 -0
- package/src/components/Icons/play.vue +6 -0
- package/src/components/Input/Input.css +187 -0
- package/src/components/Input/Input.vue +247 -0
- package/src/components/Laboratory/AppointmentCard/AppointmentCard.css +7 -0
- package/src/components/Laboratory/AppointmentCard/AppointmentCard.vue +116 -0
- package/src/components/Laboratory/ChatBoxImage/ChatBoxImage.vue +81 -0
- package/src/components/Laboratory/ChatMessage/ChatMessage.vue +113 -0
- package/src/components/Laboratory/ChatMessage/ChatMessageBadge.css +4 -0
- package/src/components/Laboratory/ChatMessage/ChatMessageBadge.vue +99 -0
- package/src/components/Laboratory/ChatNotification/ChatNotification.vue +130 -0
- package/src/components/Laboratory/DocumentCard/DocumentCard.css +3 -0
- package/src/components/Laboratory/DocumentCard/DocumentCard.vue +50 -0
- package/src/components/Laboratory/DocumentCard/DocumentCardItem.vue +53 -0
- package/src/components/Laboratory/InfoCard/InfoCard.vue +162 -0
- package/src/components/Laboratory/MainColumnsBar/MainColumnsBar.vue +102 -0
- package/src/components/Laboratory/ProgressCircle/ProgressCircle.vue +152 -0
- package/src/components/Laboratory/ProgressLinear/ProgressLinear.css +33 -0
- package/src/components/Laboratory/ProgressLinear/ProgressLinear.vue +75 -0
- package/src/components/Laboratory/SelectionColumnBar/SelectionColumnBar.vue +92 -0
- package/src/components/Laboratory/StatusNotification/StatusNotification.vue +49 -0
- package/src/components/Laboratory/TagLabel/TagLabel.vue +126 -0
- package/src/components/Laboratory/TagLabelGroup/TagLabelGroup.vue +97 -0
- package/src/components/Laboratory/TicketCard/TicketCard.css +3 -0
- package/src/components/Laboratory/TicketCard/TicketCard.vue +143 -0
- package/src/components/Laboratory/TimeLine/TimeLineEvent.css +18 -0
- package/src/components/Laboratory/TimeLine/TimeLineEvent.vue +119 -0
- package/src/components/Laboratory/TimeLine/Timeline.css +4 -0
- package/src/components/Laboratory/TimeLine/Timeline.vue +30 -0
- package/src/components/Modal/Modal.css +6 -0
- package/src/components/Modal/Modal.vue +23 -0
- package/src/components/NotificationBubble/NotificationBubble.css +4 -0
- package/src/components/NotificationBubble/NotificationBubble.vue +90 -0
- package/src/components/OtpInput/OtpInput.css +39 -0
- package/src/components/OtpInput/OtpInput.vue +144 -0
- package/src/components/PhoneInput/PhoneInput.css +32 -0
- package/src/components/PhoneInput/PhoneInput.vue +114 -0
- package/src/components/Select/Select.css +150 -0
- package/src/components/Select/Select.vue +304 -0
- package/src/components/TextArea/TextArea.css +3 -0
- package/src/components/TextArea/TextArea.vue +126 -0
- package/src/components/TickBox/TickBox.css +49 -0
- package/src/components/TickBox/TickBox.vue +126 -0
- package/src/components/index.ts +20 -0
- package/src/constants/buttonEnums.ts +0 -0
- package/src/constants/iconEnums.ts +4 -0
- package/src/i18n/i18n.ts +16 -0
- package/src/i18n/locales/de.json +19 -0
- package/src/i18n/locales/en.json +19 -0
- package/src/index.ts +31 -0
- package/src/main.ts +11 -0
- package/src/plugins/vuetify.ts +131 -0
- package/src/shims-vue.d.ts +10 -0
- package/src/stories/Accordion.stories.ts +650 -0
- package/src/stories/Audio.stories.ts +29 -0
- package/src/stories/Button.stories.ts +263 -0
- package/src/stories/CheckBox.stories.ts +348 -0
- package/src/stories/DateInput.stories.ts +54 -0
- package/src/stories/Dialog.stories.ts +147 -0
- package/src/stories/EditField.stories.ts +79 -0
- package/src/stories/IconBullet/IconBullet.stories.ts +201 -0
- package/src/stories/IconBullet/IconBulletList.stories.ts +275 -0
- package/src/stories/Input.stories.ts +351 -0
- package/src/stories/Laboratory/Cards/AppointmentCard/AppointmentCard.stories.ts +260 -0
- package/src/stories/Laboratory/Cards/DocumentCard/DocumentCard.stories.ts +176 -0
- package/src/stories/Laboratory/Cards/DocumentCard/DocumentCardItem.stories.ts +119 -0
- package/src/stories/Laboratory/Cards/InfoCard/InfoCard.stories.ts +320 -0
- package/src/stories/Laboratory/Cards/TicketCard/TicketCard.stories.ts +335 -0
- package/src/stories/Laboratory/Chat/ChatBoxImage.stories.ts +82 -0
- package/src/stories/Laboratory/Chat/ChatMessage.stories.ts +198 -0
- package/src/stories/Laboratory/Chat/ChatMessageBadge.stories.ts +204 -0
- package/src/stories/Laboratory/Chat/ChatNotification.stories.ts +144 -0
- package/src/stories/Laboratory/Chat/ProgressLinear.stories.ts +186 -0
- package/src/stories/Laboratory/Chat/StatusNotification.stories.ts +111 -0
- package/src/stories/Laboratory/MainColumnsBar.stories.ts +48 -0
- package/src/stories/Laboratory/ProgressCircle.stories.ts +261 -0
- package/src/stories/Laboratory/SelectionColumnBar.stories.ts +234 -0
- package/src/stories/Laboratory/TagLabel.stories.ts +418 -0
- package/src/stories/Laboratory/TagLabelGroup.stories.ts +234 -0
- package/src/stories/Laboratory/Timeline.stories.ts +403 -0
- package/src/stories/NotificationBubble.stories.ts +194 -0
- package/src/stories/OtpInput.stories.ts +101 -0
- package/src/stories/PhoneInput.stories.ts +53 -0
- package/src/stories/Select.stories.ts +419 -0
- package/src/stories/TextArea.stories.ts +112 -0
- package/src/stories/TickBox.stories.ts +294 -0
- package/src/stories/assets/accessibility.png +0 -0
- package/src/stories/assets/accessibility.svg +1 -0
- package/src/stories/assets/addon-library.png +0 -0
- package/src/stories/assets/assets.png +0 -0
- package/src/stories/assets/avif-test-image.avif +0 -0
- package/src/stories/assets/context.png +0 -0
- package/src/stories/assets/discord.svg +1 -0
- package/src/stories/assets/docs.png +0 -0
- package/src/stories/assets/figma-plugin.png +0 -0
- package/src/stories/assets/github.svg +1 -0
- package/src/stories/assets/share.png +0 -0
- package/src/stories/assets/styling.png +0 -0
- package/src/stories/assets/testing.png +0 -0
- package/src/stories/assets/theming.png +0 -0
- package/src/stories/assets/tutorials.svg +1 -0
- package/src/stories/assets/youtube.svg +1 -0
- package/src/stories/v-icon.stories.ts +91 -0
- package/src/types/index.ts +21 -0
- package/src/vite-env.d.ts +1 -0
- package/tests/e2e/README.md +221 -0
- package/tests/e2e/accessibility.spec.ts +639 -0
- package/tests/e2e/accordion.spec.ts +42 -0
- package/tests/e2e/additional-components.spec.ts +438 -0
- package/tests/e2e/all-components.spec.ts +135 -0
- package/tests/e2e/button-fixed.spec.ts +59 -0
- package/tests/e2e/button.spec.ts +76 -0
- package/tests/e2e/checkbox.spec.ts +50 -0
- package/tests/e2e/date-input.spec.ts +46 -0
- package/tests/e2e/debug.spec.ts +52 -0
- package/tests/e2e/dialog.spec.ts +58 -0
- package/tests/e2e/input.spec.ts +55 -0
- package/tests/e2e/laboratory-components.spec.ts +321 -0
- package/tests/e2e/otp-input.spec.ts +50 -0
- package/tests/e2e/select.spec.ts +52 -0
- package/tests/e2e/storybook-utils.ts +59 -0
- package/tests/e2e/test-basic.spec.ts +34 -0
- package/tests/e2e/visual-regression.spec.ts +351 -0
- package/tests/unit/components/Accordion/AccordionGroup.spec.ts +343 -0
- package/tests/unit/components/Accordion/AccordionItem.spec.ts +384 -0
- package/tests/unit/components/Audio/Audio.spec.ts +404 -0
- package/tests/unit/components/Audio/Waveform.spec.ts +484 -0
- package/tests/unit/components/Core/Button.spec.ts +337 -0
- package/tests/unit/components/Core/Checkbox.spec.ts +545 -0
- package/tests/unit/components/Core/DateInput.spec.ts +691 -0
- package/tests/unit/components/Core/Dialog.spec.ts +486 -0
- package/tests/unit/components/Core/EditField.spec.ts +783 -0
- package/tests/unit/components/Core/Input.spec.ts +513 -0
- package/tests/unit/components/Core/Modal.spec.ts +519 -0
- package/tests/unit/components/Core/NotificationBubble.spec.ts +607 -0
- package/tests/unit/components/Core/OtpInput.spec.ts +709 -0
- package/tests/unit/components/Core/PhoneInput.spec.ts +620 -0
- package/tests/unit/components/Core/Select.spec.ts +713 -0
- package/tests/unit/components/Core/TextArea.spec.ts +566 -0
- package/tests/unit/components/Core/TickBox.spec.ts +780 -0
- package/tests/unit/components/IconBullet/IconBullet.spec.ts +357 -0
- package/tests/unit/components/IconBullet/IconBulletList.spec.ts +372 -0
- package/tests/unit/components/Icons/Audio/CloudFailed.spec.ts +109 -0
- package/tests/unit/components/Icons/Audio/CloudSaved.spec.ts +150 -0
- package/tests/unit/components/Icons/Audio/Delete.spec.ts +159 -0
- package/tests/unit/components/Icons/Audio/Pause.spec.ts +209 -0
- package/tests/unit/components/Icons/Audio/Play.spec.ts +218 -0
- package/tests/unit/components/Icons/CalendarNotification.spec.ts +187 -0
- package/tests/unit/components/Icons/Chair.spec.ts +235 -0
- package/tests/unit/components/Icons/ChairNotification.spec.ts +312 -0
- package/tests/unit/components/Icons/Circle.spec.ts +256 -0
- package/tests/unit/components/Icons/FavIcon.spec.ts +252 -0
- package/tests/unit/components/Icons/FilledCircle.spec.ts +275 -0
- package/tests/unit/components/Icons/Group3.spec.ts +356 -0
- package/tests/unit/components/Icons/RingNotification.spec.ts +394 -0
- package/tests/unit/components/Icons/calendar.spec.ts +287 -0
- package/tests/unit/components/Icons/checkbox.spec.ts +316 -0
- package/tests/unit/components/Icons/outlineChecked.spec.ts +435 -0
- package/tests/unit/components/Icons/play.spec.ts +309 -0
- package/tests/unit/components/Laboratory/AppointmentCard.spec.ts +168 -0
- package/tests/unit/components/Laboratory/ChatBoxImage.spec.ts +180 -0
- package/tests/unit/components/Laboratory/ChatMessage.spec.ts +264 -0
- package/tests/unit/components/Laboratory/ChatMessageBadge.spec.ts +283 -0
- package/tests/unit/components/Laboratory/ChatNotification.spec.ts +257 -0
- package/tests/unit/components/Laboratory/DocumentCard.spec.ts +229 -0
- package/tests/unit/components/Laboratory/DocumentCardItem.spec.ts +237 -0
- package/tests/unit/components/Laboratory/InfoCard.spec.ts +309 -0
- package/tests/unit/components/Laboratory/MainColumnsBar.spec.ts +252 -0
- package/tests/unit/components/Laboratory/ProgressCircle.spec.ts +291 -0
- package/tests/unit/components/Laboratory/ProgressLinear.spec.ts +276 -0
- package/tests/unit/components/Laboratory/SelectionColumnBar.spec.ts +289 -0
- package/tests/unit/components/Laboratory/StatusNotification.spec.ts +297 -0
- package/tests/unit/components/Laboratory/TagLabel.spec.ts +354 -0
- package/tests/unit/components/Laboratory/TagLabelGroup.spec.ts +378 -0
- package/tests/unit/components/Laboratory/TicketCard.spec.ts +352 -0
- package/tests/unit/components/Laboratory/TimeLineEvent.spec.ts +382 -0
- package/tests/unit/components/Laboratory/Timeline.spec.ts +420 -0
- package/tests/unit/constants/iconEnums.spec.ts +40 -0
- package/tests/unit/i18n/i18n.spec.ts +89 -0
- package/tests/unit/plugins/vuetify.spec.ts +221 -0
- package/tests/unit/setup.ts +190 -0
- package/tests/unit/src/components/index.spec.ts +193 -0
- package/tests/unit/src/index.spec.ts +183 -0
- package/tests/unit/src/main.spec.ts +152 -0
- package/tsconfig.json +26 -0
- package/vite.config.ts +29 -0
- package/vitest.config.ts +84 -0
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/vue3';
|
|
2
|
+
import ChatMessageBadge from '@components/Laboratory/ChatMessage/ChatMessageBadge.vue';
|
|
3
|
+
|
|
4
|
+
// Meta configuration for the ChatMessageBadge component
|
|
5
|
+
const meta: Meta<typeof ChatMessageBadge> = {
|
|
6
|
+
title: 'WL/Laboratory/Chat/ChatMessageBadge',
|
|
7
|
+
component: ChatMessageBadge,
|
|
8
|
+
tags: ['autodocs'],
|
|
9
|
+
argTypes: {
|
|
10
|
+
badgeColor: {
|
|
11
|
+
control: 'color',
|
|
12
|
+
description: 'The background color of the badge.',
|
|
13
|
+
},
|
|
14
|
+
icon: {
|
|
15
|
+
control: 'text',
|
|
16
|
+
description: 'The icon displayed inside the badge, e.g., mdi-mail.',
|
|
17
|
+
},
|
|
18
|
+
iconColor: {
|
|
19
|
+
control: 'color',
|
|
20
|
+
description: 'The color of the icon displayed in the badge.',
|
|
21
|
+
},
|
|
22
|
+
fabBaseColor: {
|
|
23
|
+
control: 'color',
|
|
24
|
+
description: 'The base color of the floating action button (FAB).',
|
|
25
|
+
},
|
|
26
|
+
fabColor: {
|
|
27
|
+
control: 'color',
|
|
28
|
+
description: 'The background color of the FAB.',
|
|
29
|
+
},
|
|
30
|
+
fabIcon: { control: 'text', description: 'The icon displayed in the FAB.' },
|
|
31
|
+
fabText: {
|
|
32
|
+
control: 'text',
|
|
33
|
+
description: 'Text displayed within the FAB, e.g., initials.',
|
|
34
|
+
},
|
|
35
|
+
textColor: {
|
|
36
|
+
control: 'color',
|
|
37
|
+
description: 'The color of the text displayed in the badge.',
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
args: {
|
|
41
|
+
badgeColor: 'var(--Power-Red-0)', // Default badge color
|
|
42
|
+
icon: 'mdi-mail', // Default icon
|
|
43
|
+
iconColor: 'white', // Default icon color
|
|
44
|
+
fabBaseColor: 'white', // Default FAB base color
|
|
45
|
+
fabColor: 'var(--Dental-Blue-0)', // Default FAB color
|
|
46
|
+
fabIcon: '$vuetify', // Default FAB icon
|
|
47
|
+
fabText: 'Mj', // Default FAB text
|
|
48
|
+
textColor: 'white', // Default text color
|
|
49
|
+
},
|
|
50
|
+
parameters: {
|
|
51
|
+
docs: {
|
|
52
|
+
description: {
|
|
53
|
+
component: `
|
|
54
|
+
The \`ChatMessageBadge\` component is used to display a badge with customizable colors, icons, and text. It provides flexibility for different styles, supporting options like background colors, icon colors, and floating action button (FAB) properties.
|
|
55
|
+
|
|
56
|
+
### Props
|
|
57
|
+
- **\`badgeColor\`**: Sets the background color of the badge.
|
|
58
|
+
- **\`icon\`**: The icon displayed within the badge.
|
|
59
|
+
- **\`iconColor\`**: Defines the color of the icon.
|
|
60
|
+
- **\`fabBaseColor\`**: The base color of the floating action button (FAB).
|
|
61
|
+
- **\`fabColor\`**: The background color of the FAB.
|
|
62
|
+
- **\`fabIcon\`**: The icon displayed in the FAB.
|
|
63
|
+
- **\`fabText\`**: Text displayed within the FAB, often used for initials or abbreviations.
|
|
64
|
+
- **\`textColor\`**: Sets the color of any text displayed in the badge.
|
|
65
|
+
|
|
66
|
+
### Usage
|
|
67
|
+
This component is suitable for displaying notification badges in a chat application or messaging interface, allowing customization for both appearance and content.
|
|
68
|
+
`,
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
export default meta;
|
|
75
|
+
type Story = StoryObj<typeof meta>;
|
|
76
|
+
|
|
77
|
+
// Define a common render template
|
|
78
|
+
const Template: Story = {
|
|
79
|
+
render: (args) => ({
|
|
80
|
+
components: { ChatMessageBadge },
|
|
81
|
+
setup() {
|
|
82
|
+
return { args };
|
|
83
|
+
},
|
|
84
|
+
template: '<ChatMessageBadge v-bind="args" />',
|
|
85
|
+
}),
|
|
86
|
+
parameters: {
|
|
87
|
+
docs: {
|
|
88
|
+
source: {
|
|
89
|
+
code: `
|
|
90
|
+
<template>
|
|
91
|
+
<ChatMessageBadge
|
|
92
|
+
:badgeColor="badgeColor"
|
|
93
|
+
:icon="icon"
|
|
94
|
+
:iconColor="iconColor"
|
|
95
|
+
:fabBaseColor="fabBaseColor"
|
|
96
|
+
:fabColor="fabColor"
|
|
97
|
+
:fabIcon="fabIcon"
|
|
98
|
+
:fabText="fabText"
|
|
99
|
+
:textColor="textColor"
|
|
100
|
+
/>
|
|
101
|
+
</template>
|
|
102
|
+
|
|
103
|
+
<script setup>
|
|
104
|
+
import ChatMessageBadge from '@components/Laboratory/ChatMessage/ChatMessageBadge.vue';
|
|
105
|
+
</script>
|
|
106
|
+
`,
|
|
107
|
+
},
|
|
108
|
+
},
|
|
109
|
+
},
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
// Story with default values
|
|
113
|
+
export const Default: Story = { ...Template };
|
|
114
|
+
|
|
115
|
+
// Story with custom badge color and icon
|
|
116
|
+
export const CustomBadgeIcon: Story = {
|
|
117
|
+
...Template,
|
|
118
|
+
args: {
|
|
119
|
+
badgeColor: 'blue',
|
|
120
|
+
icon: 'mdi-bell',
|
|
121
|
+
},
|
|
122
|
+
parameters: {
|
|
123
|
+
docs: {
|
|
124
|
+
source: {
|
|
125
|
+
code: `
|
|
126
|
+
<template>
|
|
127
|
+
<ChatMessageBadge
|
|
128
|
+
badgeColor="blue"
|
|
129
|
+
icon="mdi-bell"
|
|
130
|
+
iconColor="white"
|
|
131
|
+
fabBaseColor="white"
|
|
132
|
+
fabColor="var(--Dental-Blue-0)"
|
|
133
|
+
fabIcon="$vuetify"
|
|
134
|
+
fabText="Mj"
|
|
135
|
+
textColor="white"
|
|
136
|
+
/>
|
|
137
|
+
</template>
|
|
138
|
+
`,
|
|
139
|
+
},
|
|
140
|
+
},
|
|
141
|
+
},
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
// Story with a custom FAB icon and text
|
|
145
|
+
export const CustomFabIconText: Story = {
|
|
146
|
+
...Template,
|
|
147
|
+
args: {
|
|
148
|
+
fabIcon: 'mdi-home',
|
|
149
|
+
fabText: 'AB',
|
|
150
|
+
fabColor: 'green',
|
|
151
|
+
},
|
|
152
|
+
parameters: {
|
|
153
|
+
docs: {
|
|
154
|
+
source: {
|
|
155
|
+
code: `
|
|
156
|
+
<template>
|
|
157
|
+
<ChatMessageBadge
|
|
158
|
+
badgeColor="var(--Power-Red-0)"
|
|
159
|
+
icon="mdi-mail"
|
|
160
|
+
iconColor="white"
|
|
161
|
+
fabBaseColor="white"
|
|
162
|
+
fabColor="green"
|
|
163
|
+
fabIcon="mdi-home"
|
|
164
|
+
fabText="AB"
|
|
165
|
+
textColor="white"
|
|
166
|
+
/>
|
|
167
|
+
</template>
|
|
168
|
+
`,
|
|
169
|
+
},
|
|
170
|
+
},
|
|
171
|
+
},
|
|
172
|
+
};
|
|
173
|
+
|
|
174
|
+
// Story with all custom colors
|
|
175
|
+
export const AllCustomColors: Story = {
|
|
176
|
+
...Template,
|
|
177
|
+
args: {
|
|
178
|
+
badgeColor: 'purple',
|
|
179
|
+
iconColor: 'yellow',
|
|
180
|
+
fabBaseColor: 'black',
|
|
181
|
+
fabColor: 'orange',
|
|
182
|
+
textColor: 'blue',
|
|
183
|
+
},
|
|
184
|
+
parameters: {
|
|
185
|
+
docs: {
|
|
186
|
+
source: {
|
|
187
|
+
code: `
|
|
188
|
+
<template>
|
|
189
|
+
<ChatMessageBadge
|
|
190
|
+
badgeColor="purple"
|
|
191
|
+
icon="mdi-mail"
|
|
192
|
+
iconColor="yellow"
|
|
193
|
+
fabBaseColor="black"
|
|
194
|
+
fabColor="orange"
|
|
195
|
+
fabIcon="$vuetify"
|
|
196
|
+
fabText="Mj"
|
|
197
|
+
textColor="blue"
|
|
198
|
+
/>
|
|
199
|
+
</template>
|
|
200
|
+
`,
|
|
201
|
+
},
|
|
202
|
+
},
|
|
203
|
+
},
|
|
204
|
+
};
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/vue3';
|
|
2
|
+
import ChatNotification from '@components/Laboratory/ChatNotification/ChatNotification.vue';
|
|
3
|
+
import { action } from '@storybook/addon-actions';
|
|
4
|
+
|
|
5
|
+
// Meta configuration for the ChatNotification component
|
|
6
|
+
const meta: Meta<typeof ChatNotification> = {
|
|
7
|
+
title: 'WL/Laboratory/Chat/ChatNotification',
|
|
8
|
+
component: ChatNotification,
|
|
9
|
+
tags: ['autodocs'],
|
|
10
|
+
argTypes: {
|
|
11
|
+
type: {
|
|
12
|
+
control: 'select',
|
|
13
|
+
options: ['cta', 'date', 'tag'],
|
|
14
|
+
description: 'The type of content displayed (CTA, date, or tag).',
|
|
15
|
+
},
|
|
16
|
+
date: {
|
|
17
|
+
control: 'text',
|
|
18
|
+
description: 'The date to display.',
|
|
19
|
+
},
|
|
20
|
+
patient: {
|
|
21
|
+
control: 'text',
|
|
22
|
+
description: 'The patient name to display in the tag scenario.',
|
|
23
|
+
},
|
|
24
|
+
status: {
|
|
25
|
+
control: 'text',
|
|
26
|
+
description: 'The status to display inside the TagLabel component.',
|
|
27
|
+
},
|
|
28
|
+
'click:start': {
|
|
29
|
+
action: 'click:start',
|
|
30
|
+
description: 'Event emitted when the Start button is clicked.',
|
|
31
|
+
},
|
|
32
|
+
'click:further': {
|
|
33
|
+
action: 'click:further',
|
|
34
|
+
description: 'Event emitted when the Weiter (Further) button is clicked.',
|
|
35
|
+
},
|
|
36
|
+
'click:cancel': {
|
|
37
|
+
action: 'click:cancel',
|
|
38
|
+
description:
|
|
39
|
+
'Event emitted when the Zurücklegen (Cancel) button is clicked.',
|
|
40
|
+
},
|
|
41
|
+
'click:finish': {
|
|
42
|
+
action: 'click:finish',
|
|
43
|
+
description:
|
|
44
|
+
'Event emitted when the Abschließen (Finish) button is clicked.',
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
export default meta;
|
|
50
|
+
type Story = StoryObj<typeof meta>;
|
|
51
|
+
|
|
52
|
+
// Define a template for the stories
|
|
53
|
+
const Template: Story = {
|
|
54
|
+
render: (args) => ({
|
|
55
|
+
components: { ChatNotification },
|
|
56
|
+
setup() {
|
|
57
|
+
// Define actions for each event
|
|
58
|
+
const handleStart = action('click:start');
|
|
59
|
+
const handleFurther = action('click:further');
|
|
60
|
+
const handleCancel = action('click:cancel');
|
|
61
|
+
const handleFinish = action('click:finish');
|
|
62
|
+
|
|
63
|
+
return { args, handleStart, handleFurther, handleCancel, handleFinish };
|
|
64
|
+
},
|
|
65
|
+
template: `
|
|
66
|
+
<div style="padding: 16px;">
|
|
67
|
+
<ChatNotification
|
|
68
|
+
v-bind="args"
|
|
69
|
+
@click:start="handleStart"
|
|
70
|
+
@click:further="handleFurther"
|
|
71
|
+
@click:cancel="handleCancel"
|
|
72
|
+
@click:finish="handleFinish"
|
|
73
|
+
/>
|
|
74
|
+
</div>
|
|
75
|
+
`,
|
|
76
|
+
}),
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
// Stories for different scenarios
|
|
80
|
+
|
|
81
|
+
export const Empty: Story = {
|
|
82
|
+
...Template,
|
|
83
|
+
args: {},
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
export const DateExample: Story = {
|
|
87
|
+
...Template,
|
|
88
|
+
args: {
|
|
89
|
+
type: 'date',
|
|
90
|
+
date: '20. Oktober 2024',
|
|
91
|
+
},
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
export const TagExample: Story = {
|
|
95
|
+
...Template,
|
|
96
|
+
args: {
|
|
97
|
+
type: 'tag',
|
|
98
|
+
patient: 'Rainer Zufall',
|
|
99
|
+
status: 'Dispatched',
|
|
100
|
+
date: '20. Oktober 2024',
|
|
101
|
+
},
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
export const CTAExample: Story = {
|
|
105
|
+
...Template,
|
|
106
|
+
args: {
|
|
107
|
+
type: 'cta',
|
|
108
|
+
status: 'Draft',
|
|
109
|
+
},
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
// Define a story that displays 11 CTA components in a column layout
|
|
113
|
+
export const MultipleCTAsInColumn: Story = {
|
|
114
|
+
render: (args) => ({
|
|
115
|
+
components: { ChatNotification },
|
|
116
|
+
setup() {
|
|
117
|
+
// Define actions for each event
|
|
118
|
+
const handleStart = action('click:start');
|
|
119
|
+
const handleFurther = action('click:further');
|
|
120
|
+
const handleCancel = action('click:cancel');
|
|
121
|
+
const handleFinish = action('click:finish');
|
|
122
|
+
|
|
123
|
+
return { args, handleStart, handleFurther, handleCancel, handleFinish };
|
|
124
|
+
},
|
|
125
|
+
template: `
|
|
126
|
+
<div class="d-flex flex-column" style="padding: 16px; gap: 16px;">
|
|
127
|
+
<!-- Each ChatNotification component with different statuses -->
|
|
128
|
+
<ChatNotification v-bind="args" type="cta" status="Draft" @click:start="handleStart" />
|
|
129
|
+
<ChatNotification v-bind="args" type="cta" status="Design Ready" @click:start="handleStart" />
|
|
130
|
+
<ChatNotification v-bind="args" type="cta" status="Design Started" @click:start="handleStart" />
|
|
131
|
+
<ChatNotification v-bind="args" type="cta" status="Design Proof" @click:start="handleStart" />
|
|
132
|
+
<ChatNotification v-bind="args" type="cta" status="Production Ready" @click:start="handleStart" />
|
|
133
|
+
<ChatNotification v-bind="args" type="cta" status="Production Started" @click:start="handleStart" />
|
|
134
|
+
<ChatNotification v-bind="args" type="cta" status="Shipping Dispatched" @click:start="handleStart" />
|
|
135
|
+
<ChatNotification v-bind="args" type="cta" status="Treatment Took" @click:start="handleStart" />
|
|
136
|
+
|
|
137
|
+
<ChatNotification v-bind="args" type="cta" status="Follow-up Case Created" @click:further="handleFurther" />
|
|
138
|
+
<ChatNotification v-bind="args" type="cta" status="Treatment Done"@click:cancel="handleCancel" @click:finish="handleFinish" />
|
|
139
|
+
<ChatNotification v-bind="args" type="cta" status="Ready for Treatment" @click:start="handleStart" />
|
|
140
|
+
</div>
|
|
141
|
+
`,
|
|
142
|
+
}),
|
|
143
|
+
args: {}, // Shared args if needed for all components
|
|
144
|
+
};
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/vue3';
|
|
2
|
+
import ProgressLinear from '@components/Laboratory/ProgressLinear/ProgressLinear.vue';
|
|
3
|
+
import SolidArrowRight from '@components/Icons/SolidArrowRight.vue';
|
|
4
|
+
import Circle from '@components/Icons/Circle.vue';
|
|
5
|
+
import TagLabel from '@components/Laboratory/TagLabel/TagLabel.vue';
|
|
6
|
+
|
|
7
|
+
// Meta configuration for the ProgressLinear component
|
|
8
|
+
const meta: Meta<typeof ProgressLinear> = {
|
|
9
|
+
title: 'WL/Laboratory/Chat/ProgressLinear',
|
|
10
|
+
component: ProgressLinear,
|
|
11
|
+
tags: ['autodocs'],
|
|
12
|
+
argTypes: {
|
|
13
|
+
date: {
|
|
14
|
+
control: 'text',
|
|
15
|
+
description: 'Displays the estimated project duration, e.g., "1d 4h"',
|
|
16
|
+
},
|
|
17
|
+
progressValue: {
|
|
18
|
+
control: 'number',
|
|
19
|
+
description: 'The progress value as a percentage (0-100)',
|
|
20
|
+
},
|
|
21
|
+
status: {
|
|
22
|
+
control: 'text',
|
|
23
|
+
description:
|
|
24
|
+
'Status label for the progress bar (e.g., "Dispatched", "Ready")',
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
args: {
|
|
28
|
+
date: '1d 4h',
|
|
29
|
+
progressValue: 20,
|
|
30
|
+
status: 'Dispatched',
|
|
31
|
+
},
|
|
32
|
+
parameters: {
|
|
33
|
+
docs: {
|
|
34
|
+
description: {
|
|
35
|
+
component: `
|
|
36
|
+
The \`ProgressLinear\` component visually represents the progress of a project or task with a linear progress bar. It includes an estimated duration, progress value, and status label, making it useful for tracking different project stages.
|
|
37
|
+
|
|
38
|
+
### Props
|
|
39
|
+
- **\`date\`**: Estimated time remaining for the project or task, formatted as a string (e.g., '1d 4h').
|
|
40
|
+
- **\`progressValue\`**: Numeric value representing the progress percentage, where 0 is no progress and 100 is complete.
|
|
41
|
+
- **\`status\`**: Describes the current status of the task, displayed as a label next to the progress bar.
|
|
42
|
+
|
|
43
|
+
### Usage
|
|
44
|
+
Use this component to track project progress visually, adjusting properties like \`progressValue\` and \`status\` to reflect the current state.
|
|
45
|
+
`,
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
export default meta;
|
|
52
|
+
type Story = StoryObj<typeof meta>;
|
|
53
|
+
|
|
54
|
+
// Define a common render template
|
|
55
|
+
const Template: Story = {
|
|
56
|
+
render: (args) => ({
|
|
57
|
+
components: { ProgressLinear, SolidArrowRight, Circle, TagLabel },
|
|
58
|
+
setup() {
|
|
59
|
+
return { args };
|
|
60
|
+
},
|
|
61
|
+
template: `
|
|
62
|
+
<div style="padding: 16px;">
|
|
63
|
+
<ProgressLinear v-bind="args" />
|
|
64
|
+
</div>
|
|
65
|
+
`,
|
|
66
|
+
}),
|
|
67
|
+
parameters: {
|
|
68
|
+
docs: {
|
|
69
|
+
source: {
|
|
70
|
+
code: `
|
|
71
|
+
<template>
|
|
72
|
+
<ProgressLinear
|
|
73
|
+
:date="date"
|
|
74
|
+
:progressValue="progressValue"
|
|
75
|
+
:status="status"
|
|
76
|
+
/>
|
|
77
|
+
</template>
|
|
78
|
+
|
|
79
|
+
<script setup>
|
|
80
|
+
import ProgressLinear from '@components/Laboratory/ProgressLinear/ProgressLinear.vue';
|
|
81
|
+
</script>
|
|
82
|
+
`,
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
// Define different stories using the common template
|
|
89
|
+
export const Default: Story = { ...Template, args: {} };
|
|
90
|
+
|
|
91
|
+
export const Progress50: Story = {
|
|
92
|
+
...Template,
|
|
93
|
+
args: {
|
|
94
|
+
progressValue: 50,
|
|
95
|
+
date: '2d 5h',
|
|
96
|
+
status: 'Took',
|
|
97
|
+
},
|
|
98
|
+
parameters: {
|
|
99
|
+
docs: {
|
|
100
|
+
source: {
|
|
101
|
+
code: `
|
|
102
|
+
<template>
|
|
103
|
+
<ProgressLinear
|
|
104
|
+
date="2d 5h"
|
|
105
|
+
progressValue="50"
|
|
106
|
+
status="Took"
|
|
107
|
+
/>
|
|
108
|
+
</template>
|
|
109
|
+
`,
|
|
110
|
+
},
|
|
111
|
+
},
|
|
112
|
+
},
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
export const Progress80: Story = {
|
|
116
|
+
...Template,
|
|
117
|
+
args: {
|
|
118
|
+
progressValue: 80,
|
|
119
|
+
date: '3d',
|
|
120
|
+
status: 'Ready',
|
|
121
|
+
},
|
|
122
|
+
parameters: {
|
|
123
|
+
docs: {
|
|
124
|
+
source: {
|
|
125
|
+
code: `
|
|
126
|
+
<template>
|
|
127
|
+
<ProgressLinear
|
|
128
|
+
date="3d"
|
|
129
|
+
progressValue="80"
|
|
130
|
+
status="Ready"
|
|
131
|
+
/>
|
|
132
|
+
</template>
|
|
133
|
+
`,
|
|
134
|
+
},
|
|
135
|
+
},
|
|
136
|
+
},
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
export const MultipleProgressBars: Story = {
|
|
140
|
+
render: (args) => ({
|
|
141
|
+
components: { ProgressLinear, SolidArrowRight, Circle, TagLabel },
|
|
142
|
+
setup() {
|
|
143
|
+
return { args };
|
|
144
|
+
},
|
|
145
|
+
template: `
|
|
146
|
+
<div class="d-flex flex-column" style="padding: 40px; gap: 16px;">
|
|
147
|
+
<!-- Each ProgressLinear component with different progress values and statuses -->
|
|
148
|
+
<ProgressLinear progressValue="15" date="1d 4h" status="Draft" />
|
|
149
|
+
<ProgressLinear progressValue="30" date="1d 8h" status="Done" />
|
|
150
|
+
<ProgressLinear progressValue="50" date="2d 5h" status="Took" />
|
|
151
|
+
<ProgressLinear progressValue="70" date="3d" status="Dispatched" />
|
|
152
|
+
<ProgressLinear progressValue="60" date="3d" status="Ready" />
|
|
153
|
+
<ProgressLinear progressValue="80" date="3d 6h" status="Treatment Done" />
|
|
154
|
+
<ProgressLinear progressValue="20" date="3d 6h" status="Production Ready" />
|
|
155
|
+
<ProgressLinear progressValue="30" date="3d 6h" status="Production Started" />
|
|
156
|
+
<ProgressLinear progressValue="40" date="3d 6h" status="Ready for Treatment" />
|
|
157
|
+
</div>
|
|
158
|
+
`,
|
|
159
|
+
}),
|
|
160
|
+
parameters: {
|
|
161
|
+
docs: {
|
|
162
|
+
source: {
|
|
163
|
+
code: `
|
|
164
|
+
<template>
|
|
165
|
+
<div class="d-flex flex-column" style="padding: 40px; gap: 16px;">
|
|
166
|
+
<ProgressLinear progressValue="15" date="1d 4h" status="Draft" />
|
|
167
|
+
<ProgressLinear progressValue="30" date="1d 8h" status="Done" />
|
|
168
|
+
<ProgressLinear progressValue="50" date="2d 5h" status="Took" />
|
|
169
|
+
<ProgressLinear progressValue="70" date="3d" status="Dispatched" />
|
|
170
|
+
<ProgressLinear progressValue="60" date="3d" status="Ready" />
|
|
171
|
+
<ProgressLinear progressValue="80" date="3d 6h" status="Treatment Done" />
|
|
172
|
+
<ProgressLinear progressValue="20" date="3d 6h" status="Production Ready" />
|
|
173
|
+
<ProgressLinear progressValue="30" date="3d 6h" status="Production Started" />
|
|
174
|
+
<ProgressLinear progressValue="40" date="3d 6h" status="Ready for Treatment" />
|
|
175
|
+
</div>
|
|
176
|
+
</template>
|
|
177
|
+
|
|
178
|
+
<script setup>
|
|
179
|
+
import ProgressLinear from '@components/Laboratory/ProgressLinear/ProgressLinear.vue';
|
|
180
|
+
</script>
|
|
181
|
+
`,
|
|
182
|
+
},
|
|
183
|
+
},
|
|
184
|
+
},
|
|
185
|
+
args: {},
|
|
186
|
+
};
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/vue3';
|
|
2
|
+
import StatusNotification from '@components/Laboratory/StatusNotification/StatusNotification.vue'; // Adjust the path accordingly
|
|
3
|
+
|
|
4
|
+
const meta: Meta<typeof StatusNotification> = {
|
|
5
|
+
title: 'WL/Laboratory/Chat/StatusNotification',
|
|
6
|
+
component: StatusNotification,
|
|
7
|
+
tags: ['autodocs'],
|
|
8
|
+
argTypes: {
|
|
9
|
+
header: { control: 'text' },
|
|
10
|
+
subheader: { control: 'text' },
|
|
11
|
+
status: {
|
|
12
|
+
control: 'select',
|
|
13
|
+
options: [
|
|
14
|
+
'Draft',
|
|
15
|
+
'Proof',
|
|
16
|
+
'Ready',
|
|
17
|
+
'Design Ready',
|
|
18
|
+
'Production Ready',
|
|
19
|
+
'Ready for Treatment',
|
|
20
|
+
'Started',
|
|
21
|
+
'Dispatched',
|
|
22
|
+
'Design Started',
|
|
23
|
+
'Production Started',
|
|
24
|
+
'Shipping Dispatched',
|
|
25
|
+
'Took',
|
|
26
|
+
'Design Proof',
|
|
27
|
+
'Treatment Took',
|
|
28
|
+
'Treatment Done',
|
|
29
|
+
'Done',
|
|
30
|
+
'Follow-up Case Created',
|
|
31
|
+
'Arrived',
|
|
32
|
+
'Warning',
|
|
33
|
+
], // Add more statuses if needed
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
args: {
|
|
37
|
+
header: 'Susanne M. hat neuen Status gesetzt',
|
|
38
|
+
subheader: 'Do. 12. Sept. 2024 – 15:44',
|
|
39
|
+
status: 'Draft',
|
|
40
|
+
},
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
export default meta;
|
|
44
|
+
type Story = StoryObj<typeof meta>;
|
|
45
|
+
|
|
46
|
+
// Define a template for the stories
|
|
47
|
+
const Template: Story = {
|
|
48
|
+
render: (args) => ({
|
|
49
|
+
components: { StatusNotification },
|
|
50
|
+
setup() {
|
|
51
|
+
return { args };
|
|
52
|
+
},
|
|
53
|
+
template: `
|
|
54
|
+
<div style="padding: 16px;">
|
|
55
|
+
<StatusNotification v-bind="args" />
|
|
56
|
+
</div>
|
|
57
|
+
`,
|
|
58
|
+
}),
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
// Different variations of the component
|
|
62
|
+
|
|
63
|
+
export const Default: Story = { ...Template };
|
|
64
|
+
|
|
65
|
+
export const DoneStatus: Story = {
|
|
66
|
+
...Template,
|
|
67
|
+
args: {
|
|
68
|
+
header: 'Max Mustermann hat den Status aktualisiert',
|
|
69
|
+
subheader: 'Fr. 13. Sept. 2024 – 09:30',
|
|
70
|
+
status: 'Done',
|
|
71
|
+
},
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
export const DispatchedStatus: Story = {
|
|
75
|
+
...Template,
|
|
76
|
+
args: {
|
|
77
|
+
header: 'Anna Schmidt hat den Status geändert',
|
|
78
|
+
subheader: 'Mi. 14. Sept. 2024 – 11:20',
|
|
79
|
+
status: 'Dispatched',
|
|
80
|
+
},
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
// Define a story that displays multiple StatusNotification components in a column layout
|
|
84
|
+
export const MultipleStatusNotifications: Story = {
|
|
85
|
+
render: (args) => ({
|
|
86
|
+
components: { StatusNotification },
|
|
87
|
+
setup() {
|
|
88
|
+
// Define actions for each event if needed
|
|
89
|
+
const handleStatusChange = action('status:changed');
|
|
90
|
+
|
|
91
|
+
return { args, handleStatusChange };
|
|
92
|
+
},
|
|
93
|
+
template: `
|
|
94
|
+
<div class="d-flex flex-column" style="padding: 16px; gap: 16px;">
|
|
95
|
+
<!-- Each StatusNotification component with different statuses -->
|
|
96
|
+
<StatusNotification v-bind="args" header="Susanne M. hat neuen Status gesetzt" status="Draft" subheader="Do. 12. Sept. 2024 – 15:44" @status:changed="handleStatusChange" />
|
|
97
|
+
<StatusNotification v-bind="args" header="Max Mustermann hat den Status aktualisiert" status="Design Ready" subheader="Fr. 13. Sept. 2024 – 09:30" @status:changed="handleStatusChange" />
|
|
98
|
+
<StatusNotification v-bind="args" header="Anna Schmidt hat den Status geändert" status="Design Started" subheader="Mi. 14. Sept. 2024 – 11:20" @status:changed="handleStatusChange" />
|
|
99
|
+
<StatusNotification v-bind="args" header="John Doe hat den Status aktualisiert" status="Production Ready" subheader="Di. 15. Sept. 2024 – 12:50" @status:changed="handleStatusChange" />
|
|
100
|
+
<StatusNotification v-bind="args" header="Maria König hat den Status gesetzt" status="Production Started" subheader="Mo. 16. Sept. 2024 – 14:10" @status:changed="handleStatusChange" />
|
|
101
|
+
<StatusNotification v-bind="args" header="Tom Müller hat den Status gesetzt" status="Shipping Dispatched" subheader="So. 17. Sept. 2024 – 16:00" @status:changed="handleStatusChange" />
|
|
102
|
+
<StatusNotification v-bind="args" header="Lisa Schulz hat den Status gesetzt" status="Treatment Took" subheader="Sa. 18. Sept. 2024 – 17:30" @status:changed="handleStatusChange" />
|
|
103
|
+
<StatusNotification v-bind="args" header="Robert Becker hat den Status gesetzt" status="Follow-up Case Created" subheader="Fr. 19. Sept. 2024 – 18:50" @status:changed="handleStatusChange" />
|
|
104
|
+
<StatusNotification v-bind="args" header="Claudia Neumann hat den Status gesetzt" status="Treatment Done" subheader="Do. 20. Sept. 2024 – 20:10" @status:changed="handleStatusChange" />
|
|
105
|
+
<StatusNotification v-bind="args" header="Michael Fischer hat den Status gesetzt" status="Ready for Treatment" subheader="Mi. 21. Sept. 2024 – 21:40" @status:changed="handleStatusChange" />
|
|
106
|
+
<StatusNotification v-bind="args" header="Sandra Hoffmann hat den Status gesetzt" status="Done" subheader="Di. 22. Sept. 2024 – 23:15" @status:changed="handleStatusChange" />
|
|
107
|
+
</div>
|
|
108
|
+
`,
|
|
109
|
+
}),
|
|
110
|
+
args: {}, // Shared args if needed for all components
|
|
111
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/vue3';
|
|
2
|
+
import MainColumnsBar from '@components/Laboratory/MainColumnsBar/MainColumnsBar.vue'; // Adjust the import to match your component location
|
|
3
|
+
import { action } from '@storybook/addon-actions';
|
|
4
|
+
|
|
5
|
+
// Meta configuration for the MainColumnsBar component
|
|
6
|
+
const meta: Meta<typeof MainColumnsBar> = {
|
|
7
|
+
title: 'WL/Laboratory/MainColumnsBar',
|
|
8
|
+
component: MainColumnsBar,
|
|
9
|
+
tags: ['autodocs'],
|
|
10
|
+
argTypes: {
|
|
11
|
+
'click:draft': { action: 'click:draft' }, // Track the 'click:draft' event
|
|
12
|
+
'click:design': { action: 'click:design' }, // Track the 'click:design' event
|
|
13
|
+
'click:production': { action: 'click:production' }, // Track the 'click:production' event
|
|
14
|
+
'click:shipping': { action: 'click:shipping' }, // Track the 'click:shipping' event
|
|
15
|
+
'click:treatment': { action: 'click:treatment' }, // Track the 'click:treatment' event
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
export default meta;
|
|
20
|
+
type Story = StoryObj<typeof meta>;
|
|
21
|
+
|
|
22
|
+
// Common render template for the component
|
|
23
|
+
const Template: Story = {
|
|
24
|
+
render: (args) => ({
|
|
25
|
+
components: { MainColumnsBar },
|
|
26
|
+
setup() {
|
|
27
|
+
return { args };
|
|
28
|
+
},
|
|
29
|
+
template: `
|
|
30
|
+
<MainColumnsBar
|
|
31
|
+
@click:draft="args['click:draft']"
|
|
32
|
+
@click:design="args['click:design']"
|
|
33
|
+
@click:production="args['click:production']"
|
|
34
|
+
@click:shipping="args['click:shipping']"
|
|
35
|
+
@click:treatment="args['click:treatment']"
|
|
36
|
+
/>
|
|
37
|
+
`,
|
|
38
|
+
}),
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
// Default story
|
|
42
|
+
export const Default: Story = { ...Template };
|
|
43
|
+
|
|
44
|
+
// Custom story showing action log when buttons are clicked
|
|
45
|
+
export const WithEventActions: Story = {
|
|
46
|
+
...Template,
|
|
47
|
+
args: {},
|
|
48
|
+
};
|