@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,113 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="d-flex flex-row ga-2 align-end" data-testid="root">
|
|
3
|
+
<!-- Conditional Rendering: Display the badge before the message if it's an 'income' type -->
|
|
4
|
+
<template v-if="type === 'income'">
|
|
5
|
+
<div style="width: 40px; margin-bottom: 20px">
|
|
6
|
+
<ChatMessageBadge :fabText="fabText" />
|
|
7
|
+
</div>
|
|
8
|
+
</template>
|
|
9
|
+
|
|
10
|
+
<!-- Message Content -->
|
|
11
|
+
<v-alert rounded="lg" :color="messageColor">
|
|
12
|
+
<!-- Title Slot with Username and Time -->
|
|
13
|
+
<template #title>
|
|
14
|
+
<div class="d-flex flex-row w-100 align-center mb-1">
|
|
15
|
+
<slot name="title">
|
|
16
|
+
<!-- Default Title Content (Username and Time) -->
|
|
17
|
+
<h5 :style="{ color: textColor }" style="margin-right: auto">
|
|
18
|
+
{{ username }}
|
|
19
|
+
</h5>
|
|
20
|
+
<p class="p-regular" :style="{ color: textColor }">{{ time }}</p>
|
|
21
|
+
</slot>
|
|
22
|
+
</div>
|
|
23
|
+
</template>
|
|
24
|
+
|
|
25
|
+
<!-- Text Slot for Message -->
|
|
26
|
+
<template #text>
|
|
27
|
+
<slot name="text">
|
|
28
|
+
<!-- Default Message Content -->
|
|
29
|
+
<p class="p-regular" :style="{ color: textColor }">
|
|
30
|
+
{{ message }}
|
|
31
|
+
</p>
|
|
32
|
+
</slot>
|
|
33
|
+
</template>
|
|
34
|
+
</v-alert>
|
|
35
|
+
|
|
36
|
+
<!-- Conditional Rendering: Display the badge after the message if it's an 'outcome' type -->
|
|
37
|
+
<template v-if="type === 'outcome'">
|
|
38
|
+
<div style="width: 50px; margin-bottom: 20px">
|
|
39
|
+
<ChatMessageBadge :fabText="fabText" />
|
|
40
|
+
</div>
|
|
41
|
+
</template>
|
|
42
|
+
</div>
|
|
43
|
+
</template>
|
|
44
|
+
|
|
45
|
+
<script setup>
|
|
46
|
+
import { defineProps, computed } from 'vue';
|
|
47
|
+
import ChatMessageBadge from './ChatMessageBadge.vue';
|
|
48
|
+
|
|
49
|
+
// Define props to control the type, username, time, and message
|
|
50
|
+
const props = defineProps({
|
|
51
|
+
/**
|
|
52
|
+
* The type of the message, either 'income' (received) or 'outcome' (sent).
|
|
53
|
+
* This prop is required and validated to only accept 'income' or 'outcome'.
|
|
54
|
+
*/
|
|
55
|
+
type: {
|
|
56
|
+
type: String,
|
|
57
|
+
required: true,
|
|
58
|
+
validator: (value) => ['income', 'outcome'].includes(value), // Only allow 'income' or 'outcome'
|
|
59
|
+
},
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* The username of the person sending or receiving the message.
|
|
63
|
+
* Default is 'Martin Paetz'.
|
|
64
|
+
*/
|
|
65
|
+
username: {
|
|
66
|
+
type: String,
|
|
67
|
+
default: 'Martin Paetz',
|
|
68
|
+
},
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* The time when the message was sent or received.
|
|
72
|
+
* Default is '11:24'.
|
|
73
|
+
*/
|
|
74
|
+
time: {
|
|
75
|
+
type: String,
|
|
76
|
+
default: '11:24',
|
|
77
|
+
},
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* The text content of the message.
|
|
81
|
+
* Default is 'Lorem ipsum dolor sit amet...'.
|
|
82
|
+
*/
|
|
83
|
+
message: {
|
|
84
|
+
type: String,
|
|
85
|
+
default: 'Lorem ipsum dolor sit amet...',
|
|
86
|
+
},
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
// Compute the background color of the message bubble based on the type
|
|
90
|
+
const messageColor = computed(() =>
|
|
91
|
+
props.type === 'income' ? 'var(--Dental-Light-Blue--2)' : 'white',
|
|
92
|
+
);
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Compute the text color of the message based on the type.
|
|
96
|
+
* Income messages will use '--Dental-Blue-0', outcome messages will use 'var(--Dental-Blue-0)'.
|
|
97
|
+
*/
|
|
98
|
+
const textColor = computed(() =>
|
|
99
|
+
props.type === 'income' ? '--Dental-Blue-0' : 'var(--Dental-Blue-0)',
|
|
100
|
+
);
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Compute the FAB text based on the username by taking the first letter
|
|
104
|
+
* of the first name and the first letter of the last name, and combining them.
|
|
105
|
+
* If the name is not provided or incomplete, default values will be used.
|
|
106
|
+
*/
|
|
107
|
+
const fabText = computed(() => {
|
|
108
|
+
const nameParts = props.username.split(' ');
|
|
109
|
+
const firstLetter = nameParts[0]?.charAt(0) || ''; // First letter of the first name
|
|
110
|
+
const lastLetter = nameParts[nameParts.length - 1]?.charAt(0) || ''; // First letter of the last name
|
|
111
|
+
return `${firstLetter}${lastLetter}`.toUpperCase(); // Combine and convert to uppercase
|
|
112
|
+
});
|
|
113
|
+
</script>
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<v-badge :color="badgeColor">
|
|
3
|
+
<!-- Badge Slot for Icon -->
|
|
4
|
+
<template v-slot:badge>
|
|
5
|
+
<v-icon :color="iconColor" :icon="icon"></v-icon>
|
|
6
|
+
</template>
|
|
7
|
+
|
|
8
|
+
<!-- Floating Action Button (FAB) with Custom Text and Icon -->
|
|
9
|
+
<v-fab
|
|
10
|
+
:base-color="fabBaseColor"
|
|
11
|
+
:color="fabColor"
|
|
12
|
+
readonly
|
|
13
|
+
:icon="fabIcon"
|
|
14
|
+
size="x-small"
|
|
15
|
+
>
|
|
16
|
+
<span :style="{ color: textColor }">{{ fabText }}</span>
|
|
17
|
+
</v-fab>
|
|
18
|
+
</v-badge>
|
|
19
|
+
</template>
|
|
20
|
+
|
|
21
|
+
<script setup>
|
|
22
|
+
import { defineProps } from 'vue';
|
|
23
|
+
import './ChatMessageBadge.css';
|
|
24
|
+
|
|
25
|
+
// Define props for the ChatMessageBadge component
|
|
26
|
+
const props = defineProps({
|
|
27
|
+
/**
|
|
28
|
+
* The background color of the badge.
|
|
29
|
+
* Default is a CSS variable 'var(--Power-Red-0)'.
|
|
30
|
+
*/
|
|
31
|
+
badgeColor: {
|
|
32
|
+
type: String,
|
|
33
|
+
default: 'var(--Power-Red-0)', // Default badge color
|
|
34
|
+
},
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* The name of the icon displayed on the badge.
|
|
38
|
+
* Default is 'mdi-mail' from the Material Design Icons.
|
|
39
|
+
*/
|
|
40
|
+
icon: {
|
|
41
|
+
type: String,
|
|
42
|
+
default: 'mdi-mail', // Default icon name
|
|
43
|
+
},
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* The color of the icon on the badge.
|
|
47
|
+
* Default is 'white'.
|
|
48
|
+
*/
|
|
49
|
+
iconColor: {
|
|
50
|
+
type: String,
|
|
51
|
+
default: 'white', // Default icon color
|
|
52
|
+
},
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* The base color of the Floating Action Button (FAB).
|
|
56
|
+
* Default is 'white'.
|
|
57
|
+
*/
|
|
58
|
+
fabBaseColor: {
|
|
59
|
+
type: String,
|
|
60
|
+
default: 'white', // Default FAB base color
|
|
61
|
+
},
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* The color of the Floating Action Button (FAB).
|
|
65
|
+
* Default is a CSS variable 'var(--Dental-Blue-0)'.
|
|
66
|
+
*/
|
|
67
|
+
fabColor: {
|
|
68
|
+
type: String,
|
|
69
|
+
default: 'var(--Dental-Blue-0)', // Default FAB color
|
|
70
|
+
},
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* The icon to display on the Floating Action Button (FAB).
|
|
74
|
+
* Default is '$vuetify', which is Vuetify's default FAB icon.
|
|
75
|
+
*/
|
|
76
|
+
fabIcon: {
|
|
77
|
+
type: String,
|
|
78
|
+
default: '$vuetify', // Default FAB icon
|
|
79
|
+
},
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* The text displayed on the Floating Action Button (FAB).
|
|
83
|
+
* Default is 'Mj'.
|
|
84
|
+
*/
|
|
85
|
+
fabText: {
|
|
86
|
+
type: String,
|
|
87
|
+
default: 'Mj', // Default FAB text
|
|
88
|
+
},
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* The color of the text inside the Floating Action Button (FAB).
|
|
92
|
+
* Default is 'white'.
|
|
93
|
+
*/
|
|
94
|
+
textColor: {
|
|
95
|
+
type: String,
|
|
96
|
+
default: 'white', // Default color for the text inside the FAB
|
|
97
|
+
},
|
|
98
|
+
});
|
|
99
|
+
</script>
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="w-100 d-flex flex-column align-center ga-4" data-testid="root">
|
|
3
|
+
<p class="p-small" style="color: var(--Soft-Concrete-2)">
|
|
4
|
+
<!-- Display CTA, Date, or Tag Content based on the "type" prop -->
|
|
5
|
+
<span v-if="type === 'cta'"
|
|
6
|
+
>Hier klicken um nächsten Arbeitsschritt zu starten</span
|
|
7
|
+
>
|
|
8
|
+
<span v-if="type === 'date'">{{ date }}</span>
|
|
9
|
+
<span v-if="type === 'tag'">{{ date }}</span>
|
|
10
|
+
</p>
|
|
11
|
+
|
|
12
|
+
<div class="w-100 d-flex flex-row align-center ga-4">
|
|
13
|
+
<!-- Conditionally styled line based on "type" prop -->
|
|
14
|
+
<div :style="{ backgroundColor: lineColor }" class="line"></div>
|
|
15
|
+
|
|
16
|
+
<!-- CTA Section -->
|
|
17
|
+
<div v-if="type === 'cta'" class="d-flex flex-row ga-2 align-center">
|
|
18
|
+
<h5>Nachster Schritt</h5>
|
|
19
|
+
<TagLabel :status="status" />
|
|
20
|
+
</div>
|
|
21
|
+
|
|
22
|
+
<!-- Date Section -->
|
|
23
|
+
<div v-if="type === 'date'" class="d-flex flex-row ga-2 align-center">
|
|
24
|
+
<h6 style="color: var(--Soft-Concrete-2)">
|
|
25
|
+
Es gibt neue Update Notifications
|
|
26
|
+
</h6>
|
|
27
|
+
</div>
|
|
28
|
+
|
|
29
|
+
<!-- Tag Section -->
|
|
30
|
+
<div v-if="type === 'tag'" class="d-flex flex-row ga-2 align-center">
|
|
31
|
+
<h6 style="color: var(--Soft-Concrete-2)">
|
|
32
|
+
{{ patient }} wurde zurück nach
|
|
33
|
+
</h6>
|
|
34
|
+
<TagLabel :status="status" />
|
|
35
|
+
<h6 style="color: var(--Soft-Concrete-2)">verschoben</h6>
|
|
36
|
+
<v-icon
|
|
37
|
+
style="margin-left: -5px"
|
|
38
|
+
color="var(--Soft-Concrete-2)"
|
|
39
|
+
icon="heroicons:information-circle"
|
|
40
|
+
></v-icon>
|
|
41
|
+
</div>
|
|
42
|
+
|
|
43
|
+
<!-- Default Notification Section -->
|
|
44
|
+
<div v-if="type === ''" class="d-flex flex-row ga-2 align-center">
|
|
45
|
+
<h6 style="color: var(--Soft-Concrete-2)">
|
|
46
|
+
Es gibt neue Update Notifications
|
|
47
|
+
</h6>
|
|
48
|
+
</div>
|
|
49
|
+
|
|
50
|
+
<!-- Another line with conditional styling -->
|
|
51
|
+
<div :style="{ backgroundColor: lineColor }" class="line"></div>
|
|
52
|
+
</div>
|
|
53
|
+
|
|
54
|
+
<!-- Button Section for Different Actions -->
|
|
55
|
+
|
|
56
|
+
<!-- Start Button for CTA: Emits "click:start" when clicked -->
|
|
57
|
+
<Button
|
|
58
|
+
v-if="
|
|
59
|
+
type === 'cta' &&
|
|
60
|
+
status !== 'Treatment Done' &&
|
|
61
|
+
status !== 'Follow-up Case Created'
|
|
62
|
+
"
|
|
63
|
+
label="Starten"
|
|
64
|
+
@click="$emit('click:start')"
|
|
65
|
+
/>
|
|
66
|
+
|
|
67
|
+
<!-- Weiter (Further) Button for Follow-up Case Created: Emits "click:further" when clicked -->
|
|
68
|
+
<Button
|
|
69
|
+
v-if="type === 'cta' && status === 'Follow-up Case Created'"
|
|
70
|
+
label="Weiter"
|
|
71
|
+
@click="$emit('click:further')"
|
|
72
|
+
/>
|
|
73
|
+
|
|
74
|
+
<!-- Dual Buttons for TreatmentDone: "Zurücklegen" and "Abschließen" -->
|
|
75
|
+
<div
|
|
76
|
+
v-if="type === 'cta' && status === 'Treatment Done'"
|
|
77
|
+
class="d-flex flex-row align-center justify-between ga-4"
|
|
78
|
+
>
|
|
79
|
+
<!-- Cancel Button: Emits "click:cancel" when clicked -->
|
|
80
|
+
<Button
|
|
81
|
+
variant="outlined"
|
|
82
|
+
style="width: 120px"
|
|
83
|
+
label="Zurücklegen"
|
|
84
|
+
@click="$emit('click:cancel')"
|
|
85
|
+
/>
|
|
86
|
+
|
|
87
|
+
<!-- Finish Button: Emits "click:finish" when clicked -->
|
|
88
|
+
<Button
|
|
89
|
+
style="width: 120px"
|
|
90
|
+
label="Abschließen"
|
|
91
|
+
@click="$emit('click:finish')"
|
|
92
|
+
/>
|
|
93
|
+
</div>
|
|
94
|
+
</div>
|
|
95
|
+
</template>
|
|
96
|
+
|
|
97
|
+
<script setup>
|
|
98
|
+
import { defineProps, defineEmits, computed } from 'vue';
|
|
99
|
+
import TagLabel from '../TagLabel/TagLabel.vue';
|
|
100
|
+
import Button from '@components/Button/Button.vue';
|
|
101
|
+
|
|
102
|
+
// Define event emitters with the specific format like "click:start", "click:cancel", etc.
|
|
103
|
+
const emit = defineEmits([
|
|
104
|
+
'click:start',
|
|
105
|
+
'click:further',
|
|
106
|
+
'click:cancel',
|
|
107
|
+
'click:finish',
|
|
108
|
+
]);
|
|
109
|
+
|
|
110
|
+
const props = defineProps({
|
|
111
|
+
type: { type: String, default: '' },
|
|
112
|
+
date: { type: String, default: '' },
|
|
113
|
+
patient: { type: String, default: 'Patient' },
|
|
114
|
+
status: { type: String, default: 'Done' },
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
// Computed property for line color based on "type" prop
|
|
118
|
+
const lineColor = computed(() => {
|
|
119
|
+
return props.type === 'cta'
|
|
120
|
+
? 'var(--Dental-Blue-0)'
|
|
121
|
+
: 'var(--Soft-Concrete-2)';
|
|
122
|
+
});
|
|
123
|
+
</script>
|
|
124
|
+
|
|
125
|
+
<style scoped>
|
|
126
|
+
.line {
|
|
127
|
+
height: 2px;
|
|
128
|
+
flex-grow: 1;
|
|
129
|
+
}
|
|
130
|
+
</style>
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<v-card elevation="0" class="document-card" rounded="lg" data-testid="root">
|
|
3
|
+
<template #title>
|
|
4
|
+
<div class="d-flex flex-row align-center">
|
|
5
|
+
<h4 class="mr-auto">{{ title }}</h4>
|
|
6
|
+
<Button
|
|
7
|
+
color="var(--Power-Red-0)"
|
|
8
|
+
@click="handleDownloadAll"
|
|
9
|
+
label="Download all"
|
|
10
|
+
variant="text"
|
|
11
|
+
>
|
|
12
|
+
</Button>
|
|
13
|
+
</div>
|
|
14
|
+
</template>
|
|
15
|
+
|
|
16
|
+
<template #text>
|
|
17
|
+
<div class="d-flex flex-column ga-4">
|
|
18
|
+
<slot />
|
|
19
|
+
</div>
|
|
20
|
+
</template>
|
|
21
|
+
</v-card>
|
|
22
|
+
</template>
|
|
23
|
+
|
|
24
|
+
<script setup>
|
|
25
|
+
import './DocumentCard.css';
|
|
26
|
+
import { defineProps, defineEmits } from 'vue';
|
|
27
|
+
import Button from '@components/Button/Button.vue';
|
|
28
|
+
|
|
29
|
+
// Define props for the DocumentCard component
|
|
30
|
+
const props = defineProps({
|
|
31
|
+
/**
|
|
32
|
+
* The title displayed at the top of the document card.
|
|
33
|
+
* Default is 'Attachments'.
|
|
34
|
+
*/
|
|
35
|
+
title: {
|
|
36
|
+
type: String,
|
|
37
|
+
default: 'Attachments',
|
|
38
|
+
},
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
// Define the custom event for downloading all attachments
|
|
42
|
+
const emit = defineEmits(['download:all']);
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Function to emit the 'download-all' event when the "Download all" button is clicked.
|
|
46
|
+
*/
|
|
47
|
+
function handleDownloadAll() {
|
|
48
|
+
emit('download:all');
|
|
49
|
+
}
|
|
50
|
+
</script>
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="d-flex flex-column">
|
|
3
|
+
<div class="d-flex flex-row align-center">
|
|
4
|
+
<h5 class="flex-grow-1">{{ header }}</h5>
|
|
5
|
+
|
|
6
|
+
<NotificationBubble
|
|
7
|
+
@click="handleIconClick"
|
|
8
|
+
iconSize="16"
|
|
9
|
+
color="transparent"
|
|
10
|
+
icon="heroicons:arrow-down-tray"
|
|
11
|
+
/>
|
|
12
|
+
</div>
|
|
13
|
+
|
|
14
|
+
<!-- Display the subheader passed as a prop -->
|
|
15
|
+
<p>{{ subheader }}</p>
|
|
16
|
+
</div>
|
|
17
|
+
</template>
|
|
18
|
+
|
|
19
|
+
<script setup>
|
|
20
|
+
import { defineProps, defineEmits } from 'vue';
|
|
21
|
+
import NotificationBubble from '@components/NotificationBubble/NotificationBubble.vue';
|
|
22
|
+
|
|
23
|
+
// Define props for the component
|
|
24
|
+
const props = defineProps({
|
|
25
|
+
/**
|
|
26
|
+
* The main header text for the component.
|
|
27
|
+
* This prop is required.
|
|
28
|
+
*/
|
|
29
|
+
header: {
|
|
30
|
+
type: String,
|
|
31
|
+
required: true,
|
|
32
|
+
},
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* The subheader text that appears below the main header.
|
|
36
|
+
* This prop is required.
|
|
37
|
+
*/
|
|
38
|
+
subheader: {
|
|
39
|
+
type: String,
|
|
40
|
+
required: true,
|
|
41
|
+
},
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
// Define the custom event for when the icon is clicked
|
|
45
|
+
const emit = defineEmits(['click:icon']);
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Function to emit the 'click:icon' event when the icon is clicked.
|
|
49
|
+
*/
|
|
50
|
+
function handleIconClick() {
|
|
51
|
+
emit('click:icon');
|
|
52
|
+
}
|
|
53
|
+
</script>
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<v-card elevation="0" class="info-card" rounded="lg" data-testid="root">
|
|
3
|
+
<template #title>
|
|
4
|
+
<div class="d-flex flex-row">
|
|
5
|
+
<div class="mr-auto"><slot name="tagLabel"></slot></div>
|
|
6
|
+
<div class="d-flex flex-row ga-2 align-center">
|
|
7
|
+
<v-icon
|
|
8
|
+
@click="handlePencilClick"
|
|
9
|
+
class="cursor-pointer"
|
|
10
|
+
size="20"
|
|
11
|
+
color="var(--Dental-Blue-0)"
|
|
12
|
+
icon="heroicons:pencil"
|
|
13
|
+
></v-icon>
|
|
14
|
+
<v-icon
|
|
15
|
+
@click="handlePrinterClick"
|
|
16
|
+
class="cursor-pointer"
|
|
17
|
+
size="20"
|
|
18
|
+
color="var(--Dental-Blue-0)"
|
|
19
|
+
icon="heroicons:printer"
|
|
20
|
+
></v-icon>
|
|
21
|
+
</div>
|
|
22
|
+
</div>
|
|
23
|
+
</template>
|
|
24
|
+
<template #text>
|
|
25
|
+
<div class="d-flex flex-column w-100 ga-6">
|
|
26
|
+
<div class="d-flex flex-row ga-2 w-100">
|
|
27
|
+
<div class="mr-auto d-flex flex-column ga-2 w-100">
|
|
28
|
+
<h4>{{ patientName }}</h4>
|
|
29
|
+
<p>#{{ patientNumber }}</p>
|
|
30
|
+
</div>
|
|
31
|
+
<div><slot name="progress"></slot></div>
|
|
32
|
+
</div>
|
|
33
|
+
<v-divider thickness="2"></v-divider>
|
|
34
|
+
<div class="mr-auto d-flex flex-column ga-2 w-100">
|
|
35
|
+
<h4>{{ header }}</h4>
|
|
36
|
+
<p>{{ subHeader }}</p>
|
|
37
|
+
<div class="d-flex flex-row ga-2 align-center w-100">
|
|
38
|
+
<div class="d-flex flex-row align-center ga-2">
|
|
39
|
+
<h4>Color</h4>
|
|
40
|
+
<p>{{ color }}</p>
|
|
41
|
+
</div>
|
|
42
|
+
<div class="d-flex flex-row align-center ga-2 mr-auto">
|
|
43
|
+
<h4>Material</h4>
|
|
44
|
+
<p>{{ material }}</p>
|
|
45
|
+
</div>
|
|
46
|
+
<div class="d-flex flex-row align-center ga-2">
|
|
47
|
+
<v-icon
|
|
48
|
+
color="var(--Dental-Blue-0)"
|
|
49
|
+
icon="heroicons:user-circle"
|
|
50
|
+
></v-icon>
|
|
51
|
+
<p>{{ dentist }}</p>
|
|
52
|
+
</div>
|
|
53
|
+
</div>
|
|
54
|
+
</div>
|
|
55
|
+
</div>
|
|
56
|
+
</template>
|
|
57
|
+
</v-card>
|
|
58
|
+
</template>
|
|
59
|
+
|
|
60
|
+
<script setup>
|
|
61
|
+
import { defineEmits, defineProps } from 'vue';
|
|
62
|
+
|
|
63
|
+
// Correct defineEmits function usage to emit events for printer and pencil icon clicks
|
|
64
|
+
const emit = defineEmits(['click:printer', 'click:pencil']);
|
|
65
|
+
|
|
66
|
+
// Define props for the component
|
|
67
|
+
const props = defineProps({
|
|
68
|
+
/**
|
|
69
|
+
* The name of the dentist associated with the task.
|
|
70
|
+
* Default is 'Martin Paetz'.
|
|
71
|
+
*/
|
|
72
|
+
dentist: {
|
|
73
|
+
type: String,
|
|
74
|
+
default: 'Martin Paetz',
|
|
75
|
+
},
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* The material associated with the task (e.g., the type of material used).
|
|
79
|
+
* Default is 'color'.
|
|
80
|
+
*/
|
|
81
|
+
material: {
|
|
82
|
+
type: String,
|
|
83
|
+
default: 'color',
|
|
84
|
+
},
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* The color associated with the material or task.
|
|
88
|
+
* Default is 'material'.
|
|
89
|
+
*/
|
|
90
|
+
color: {
|
|
91
|
+
type: String,
|
|
92
|
+
default: 'material',
|
|
93
|
+
},
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* The name of the patient related to the task or case.
|
|
97
|
+
* Default is 'Rainer Zufall'.
|
|
98
|
+
*/
|
|
99
|
+
patientName: {
|
|
100
|
+
type: String,
|
|
101
|
+
default: 'Rainer Zufall',
|
|
102
|
+
},
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* The unique patient number associated with the task.
|
|
106
|
+
* Default is 'numbeer'.
|
|
107
|
+
*/
|
|
108
|
+
patientNumber: {
|
|
109
|
+
type: String,
|
|
110
|
+
default: 'numbeer',
|
|
111
|
+
},
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* The header text for the task or case.
|
|
115
|
+
* Default is 'header'.
|
|
116
|
+
*/
|
|
117
|
+
header: {
|
|
118
|
+
type: String,
|
|
119
|
+
default: 'header',
|
|
120
|
+
},
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* The sub-header text for the task or case.
|
|
124
|
+
* Default is 'subHeader'.
|
|
125
|
+
*/
|
|
126
|
+
subHeader: {
|
|
127
|
+
type: String,
|
|
128
|
+
default: 'subHeader',
|
|
129
|
+
},
|
|
130
|
+
});
|
|
131
|
+
|
|
132
|
+
// Emit functions to handle button clicks
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* Emit 'click:printer' when the printer icon is clicked.
|
|
136
|
+
*/
|
|
137
|
+
const handlePrinterClick = () => {
|
|
138
|
+
emit('click:printer');
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Emit 'click:pencil' when the pencil icon is clicked.
|
|
143
|
+
*/
|
|
144
|
+
const handlePencilClick = () => {
|
|
145
|
+
emit('click:pencil');
|
|
146
|
+
};
|
|
147
|
+
</script>
|
|
148
|
+
|
|
149
|
+
<style>
|
|
150
|
+
.info-card .v-card-item {
|
|
151
|
+
padding: 16px 16px !important;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.info-card .v-card-text {
|
|
155
|
+
margin-top: -10px;
|
|
156
|
+
padding: 16px 20px !important;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.info-card .v-icon {
|
|
160
|
+
color: var(--Dental-Blue-0);
|
|
161
|
+
}
|
|
162
|
+
</style>
|