@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,261 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/vue3';
|
|
2
|
+
import ProgressCircle from '@components/Laboratory/ProgressCircle/ProgressCircle.vue';
|
|
3
|
+
|
|
4
|
+
// Meta configuration for the ProgressCircle component
|
|
5
|
+
const meta: Meta<typeof ProgressCircle> = {
|
|
6
|
+
title: 'WL/Laboratory/ProgressCircle',
|
|
7
|
+
component: ProgressCircle,
|
|
8
|
+
tags: ['autodocs'],
|
|
9
|
+
argTypes: {
|
|
10
|
+
size: {
|
|
11
|
+
control: 'text',
|
|
12
|
+
description: 'Size of the circle in pixels.',
|
|
13
|
+
},
|
|
14
|
+
text: {
|
|
15
|
+
control: 'text',
|
|
16
|
+
description: 'Text displayed inside the circle.',
|
|
17
|
+
},
|
|
18
|
+
bgColors: {
|
|
19
|
+
control: 'object',
|
|
20
|
+
description: 'Array of background colors for the segments.',
|
|
21
|
+
},
|
|
22
|
+
borderColors: {
|
|
23
|
+
control: 'object',
|
|
24
|
+
description: 'Array of border colors for the segments.',
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
args: {
|
|
28
|
+
size: '60',
|
|
29
|
+
text: 'A',
|
|
30
|
+
bgColors: [
|
|
31
|
+
'var(--Soft-Concrete-1)',
|
|
32
|
+
'var(--Soft-Concrete-1)',
|
|
33
|
+
'var(--Soft-Concrete-1)',
|
|
34
|
+
'var(--Soft-Concrete-1)',
|
|
35
|
+
'var(--Soft-Concrete-1)',
|
|
36
|
+
],
|
|
37
|
+
borderColors: [
|
|
38
|
+
'transparent',
|
|
39
|
+
'transparent',
|
|
40
|
+
'transparent',
|
|
41
|
+
'transparent',
|
|
42
|
+
'transparent',
|
|
43
|
+
],
|
|
44
|
+
},
|
|
45
|
+
parameters: {
|
|
46
|
+
docs: {
|
|
47
|
+
description: {
|
|
48
|
+
component: `
|
|
49
|
+
The \`ProgressCircle\` component displays a circular progress indicator with customizable colors, sizes, and text.
|
|
50
|
+
|
|
51
|
+
### Props
|
|
52
|
+
- **\`size\`**: Sets the size of the circle in pixels.
|
|
53
|
+
- **\`text\`**: Text displayed inside the circle.
|
|
54
|
+
- **\`bgColors\`**: An array of background colors for the circle's segments.
|
|
55
|
+
- **\`borderColors\`**: An array of border colors for the circle's segments.
|
|
56
|
+
|
|
57
|
+
### Usage
|
|
58
|
+
Use the \`ProgressCircle\` component to display progress in a circular format, with options to customize the appearance.
|
|
59
|
+
|
|
60
|
+
Below are examples of different configurations of the \`ProgressCircle\` component.
|
|
61
|
+
`,
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
export default meta;
|
|
68
|
+
type Story = StoryObj<typeof meta>;
|
|
69
|
+
|
|
70
|
+
// Define a common render template
|
|
71
|
+
const Template: Story = {
|
|
72
|
+
render: (args) => ({
|
|
73
|
+
components: { ProgressCircle },
|
|
74
|
+
setup() {
|
|
75
|
+
return { args };
|
|
76
|
+
},
|
|
77
|
+
template: `<div style="padding: 16px;">
|
|
78
|
+
<ProgressCircle v-bind="args" />
|
|
79
|
+
</div>`,
|
|
80
|
+
}),
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
// Default story
|
|
84
|
+
export const Default: Story = {
|
|
85
|
+
...Template,
|
|
86
|
+
args: {},
|
|
87
|
+
parameters: {
|
|
88
|
+
docs: {
|
|
89
|
+
source: {
|
|
90
|
+
code: `
|
|
91
|
+
<template>
|
|
92
|
+
<ProgressCircle
|
|
93
|
+
:size="'60'"
|
|
94
|
+
text="A"
|
|
95
|
+
:bgColors="[
|
|
96
|
+
'var(--Soft-Concrete-1)',
|
|
97
|
+
'var(--Soft-Concrete-1)',
|
|
98
|
+
'var(--Soft-Concrete-1)',
|
|
99
|
+
'var(--Soft-Concrete-1)',
|
|
100
|
+
'var(--Soft-Concrete-1)'
|
|
101
|
+
]"
|
|
102
|
+
:borderColors="[
|
|
103
|
+
'transparent',
|
|
104
|
+
'transparent',
|
|
105
|
+
'transparent',
|
|
106
|
+
'transparent',
|
|
107
|
+
'transparent'
|
|
108
|
+
]"
|
|
109
|
+
/>
|
|
110
|
+
</template>
|
|
111
|
+
`,
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
},
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
// Draft story
|
|
118
|
+
export const Draft: Story = {
|
|
119
|
+
...Template,
|
|
120
|
+
args: {
|
|
121
|
+
text: '1',
|
|
122
|
+
bgColors: [
|
|
123
|
+
'#E5E6EE',
|
|
124
|
+
'var(--Soft-Concrete-1)',
|
|
125
|
+
'var(--Soft-Concrete-1)',
|
|
126
|
+
'var(--Soft-Concrete-1)',
|
|
127
|
+
'var(--Soft-Concrete-1)',
|
|
128
|
+
],
|
|
129
|
+
borderColors: [
|
|
130
|
+
'#172774',
|
|
131
|
+
'transparent',
|
|
132
|
+
'transparent',
|
|
133
|
+
'transparent',
|
|
134
|
+
'transparent',
|
|
135
|
+
],
|
|
136
|
+
},
|
|
137
|
+
parameters: {
|
|
138
|
+
docs: {
|
|
139
|
+
source: {
|
|
140
|
+
code: `
|
|
141
|
+
<template>
|
|
142
|
+
<ProgressCircle
|
|
143
|
+
text="1"
|
|
144
|
+
:size="'60'"
|
|
145
|
+
:bgColors="[
|
|
146
|
+
'#E5E6EE',
|
|
147
|
+
'var(--Soft-Concrete-1)',
|
|
148
|
+
'var(--Soft-Concrete-1)',
|
|
149
|
+
'var(--Soft-Concrete-1)',
|
|
150
|
+
'var(--Soft-Concrete-1)'
|
|
151
|
+
]"
|
|
152
|
+
:borderColors="[
|
|
153
|
+
'#172774',
|
|
154
|
+
'transparent',
|
|
155
|
+
'transparent',
|
|
156
|
+
'transparent',
|
|
157
|
+
'transparent'
|
|
158
|
+
]"
|
|
159
|
+
/>
|
|
160
|
+
</template>
|
|
161
|
+
`,
|
|
162
|
+
},
|
|
163
|
+
},
|
|
164
|
+
},
|
|
165
|
+
};
|
|
166
|
+
|
|
167
|
+
// DesignStarted story
|
|
168
|
+
export const DesignStarted: Story = {
|
|
169
|
+
...Template,
|
|
170
|
+
args: {
|
|
171
|
+
text: '2',
|
|
172
|
+
size: '60',
|
|
173
|
+
bgColors: ['var(--Check-0)', '#FEFDBD', '#DDDDDF', '#DDDDDF', '#DDDDDF'],
|
|
174
|
+
borderColors: [
|
|
175
|
+
'transparent',
|
|
176
|
+
'#4F4700',
|
|
177
|
+
'transparent',
|
|
178
|
+
'transparent',
|
|
179
|
+
'transparent',
|
|
180
|
+
],
|
|
181
|
+
},
|
|
182
|
+
parameters: {
|
|
183
|
+
docs: {
|
|
184
|
+
source: {
|
|
185
|
+
code: `
|
|
186
|
+
<template>
|
|
187
|
+
<ProgressCircle
|
|
188
|
+
text="2"
|
|
189
|
+
:size="'60'"
|
|
190
|
+
:bgColors="[
|
|
191
|
+
'var(--Check-0)',
|
|
192
|
+
'#FEFDBD',
|
|
193
|
+
'#DDDDDF',
|
|
194
|
+
'#DDDDDF',
|
|
195
|
+
'#DDDDDF'
|
|
196
|
+
]"
|
|
197
|
+
:borderColors="[
|
|
198
|
+
'transparent',
|
|
199
|
+
'#4F4700',
|
|
200
|
+
'transparent',
|
|
201
|
+
'transparent',
|
|
202
|
+
'transparent'
|
|
203
|
+
]"
|
|
204
|
+
/>
|
|
205
|
+
</template>
|
|
206
|
+
`,
|
|
207
|
+
},
|
|
208
|
+
},
|
|
209
|
+
},
|
|
210
|
+
};
|
|
211
|
+
|
|
212
|
+
// DesignStarted story
|
|
213
|
+
export const TreatmentDone: Story = {
|
|
214
|
+
...Template,
|
|
215
|
+
args: {
|
|
216
|
+
text: '5',
|
|
217
|
+
size: '60',
|
|
218
|
+
bgColors: [
|
|
219
|
+
'var(--Check-0)',
|
|
220
|
+
'var(--Check-0)',
|
|
221
|
+
'var(--Check-0)',
|
|
222
|
+
'var(--Check-0)',
|
|
223
|
+
'var(--Check-0)',
|
|
224
|
+
],
|
|
225
|
+
borderColors: [
|
|
226
|
+
'transparent',
|
|
227
|
+
'transparent',
|
|
228
|
+
'transparent',
|
|
229
|
+
'transparent',
|
|
230
|
+
'transparent',
|
|
231
|
+
],
|
|
232
|
+
},
|
|
233
|
+
parameters: {
|
|
234
|
+
docs: {
|
|
235
|
+
source: {
|
|
236
|
+
code: `
|
|
237
|
+
<template>
|
|
238
|
+
<ProgressCircle
|
|
239
|
+
text="2"
|
|
240
|
+
:size="'60'"
|
|
241
|
+
:bgColors="[
|
|
242
|
+
'var(--Check-0)',
|
|
243
|
+
'#FEFDBD',
|
|
244
|
+
'#DDDDDF',
|
|
245
|
+
'#DDDDDF',
|
|
246
|
+
'#DDDDDF'
|
|
247
|
+
]"
|
|
248
|
+
:borderColors="[
|
|
249
|
+
'transparent',
|
|
250
|
+
'#4F4700',
|
|
251
|
+
'transparent',
|
|
252
|
+
'transparent',
|
|
253
|
+
'transparent'
|
|
254
|
+
]"
|
|
255
|
+
/>
|
|
256
|
+
</template>
|
|
257
|
+
`,
|
|
258
|
+
},
|
|
259
|
+
},
|
|
260
|
+
},
|
|
261
|
+
};
|
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/vue3';
|
|
2
|
+
import SelectionColumnBar from '@components/Laboratory/SelectionColumnBar/SelectionColumnBar.vue';
|
|
3
|
+
import { action } from '@storybook/addon-actions';
|
|
4
|
+
|
|
5
|
+
// Meta configuration for the SelectionColumnBar component
|
|
6
|
+
const meta: Meta<typeof SelectionColumnBar> = {
|
|
7
|
+
title: 'WL/Laboratory/SelectionColumnBar',
|
|
8
|
+
component: SelectionColumnBar,
|
|
9
|
+
tags: ['autodocs'],
|
|
10
|
+
argTypes: {
|
|
11
|
+
title: {
|
|
12
|
+
control: 'text',
|
|
13
|
+
description: 'The title displayed in the center button.',
|
|
14
|
+
},
|
|
15
|
+
disableLast: {
|
|
16
|
+
control: 'boolean',
|
|
17
|
+
description: 'Disables the "Vorheriges Board" button if true.',
|
|
18
|
+
},
|
|
19
|
+
disableNext: {
|
|
20
|
+
control: 'boolean',
|
|
21
|
+
description: 'Disables the "Nächstes Board" button if true.',
|
|
22
|
+
},
|
|
23
|
+
'click:last': {
|
|
24
|
+
action: 'click:last',
|
|
25
|
+
description: 'Triggered when the "Vorheriges Board" button is clicked.',
|
|
26
|
+
},
|
|
27
|
+
'click:next': {
|
|
28
|
+
action: 'click:next',
|
|
29
|
+
description: 'Triggered when the "Nächstes Board" button is clicked.',
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
args: {
|
|
33
|
+
title: 'Draft Board', // Default title
|
|
34
|
+
},
|
|
35
|
+
parameters: {
|
|
36
|
+
docs: {
|
|
37
|
+
description: {
|
|
38
|
+
component: `
|
|
39
|
+
The \`SelectionColumnBar\` component provides navigation with options for "Vorheriges Board" (Previous Board) and "Nächstes Board" (Next Board) buttons, along with a dynamic title. You can disable either navigation button with the \`disableLast\` and \`disableNext\` props, and track clicks on these buttons with event actions.
|
|
40
|
+
|
|
41
|
+
### Props
|
|
42
|
+
- **\`title\`**: Sets the title text in the center button.
|
|
43
|
+
- **\`disableLast\`**: Disables the "Vorheriges Board" button if set to true.
|
|
44
|
+
- **\`disableNext\`**: Disables the "Nächstes Board" button if set to true.
|
|
45
|
+
|
|
46
|
+
### Events
|
|
47
|
+
- **\`click:last\`**: Emitted when the "Vorheriges Board" button is clicked.
|
|
48
|
+
- **\`click:next\`**: Emitted when the "Nächstes Board" button is clicked.
|
|
49
|
+
`,
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
export default meta;
|
|
56
|
+
type Story = StoryObj<typeof meta>;
|
|
57
|
+
|
|
58
|
+
// Common template
|
|
59
|
+
const Template: Story = {
|
|
60
|
+
render: (args) => ({
|
|
61
|
+
components: { SelectionColumnBar },
|
|
62
|
+
setup() {
|
|
63
|
+
return { args };
|
|
64
|
+
},
|
|
65
|
+
template: `
|
|
66
|
+
<SelectionColumnBar
|
|
67
|
+
v-bind="args"
|
|
68
|
+
@click:last="args['click:last']"
|
|
69
|
+
@click:next="args['click:next']"
|
|
70
|
+
/>
|
|
71
|
+
`,
|
|
72
|
+
}),
|
|
73
|
+
parameters: {
|
|
74
|
+
docs: {
|
|
75
|
+
source: {
|
|
76
|
+
code: `
|
|
77
|
+
<template>
|
|
78
|
+
<SelectionColumnBar
|
|
79
|
+
:title="title"
|
|
80
|
+
:disableLast="disableLast"
|
|
81
|
+
:disableNext="disableNext"
|
|
82
|
+
@click:last="clickLast"
|
|
83
|
+
@click:next="clickNext"
|
|
84
|
+
/>
|
|
85
|
+
</template>
|
|
86
|
+
|
|
87
|
+
<script setup>
|
|
88
|
+
import SelectionColumnBar from '@components/Laboratory/SelectionColumnBar/SelectionColumnBar.vue';
|
|
89
|
+
|
|
90
|
+
const clickLast = () => console.log('Previous button clicked');
|
|
91
|
+
const clickNext = () => console.log('Next button clicked');
|
|
92
|
+
</script>
|
|
93
|
+
`,
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
},
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
// Default story
|
|
100
|
+
export const Default: Story = { ...Template };
|
|
101
|
+
|
|
102
|
+
// Custom title story
|
|
103
|
+
export const CustomTitle: Story = {
|
|
104
|
+
...Template,
|
|
105
|
+
args: {
|
|
106
|
+
title: 'Custom Draft Title',
|
|
107
|
+
},
|
|
108
|
+
parameters: {
|
|
109
|
+
docs: {
|
|
110
|
+
source: {
|
|
111
|
+
code: `
|
|
112
|
+
<template>
|
|
113
|
+
<SelectionColumnBar
|
|
114
|
+
title="Custom Draft Title"
|
|
115
|
+
@click:last="clickLast"
|
|
116
|
+
@click:next="clickNext"
|
|
117
|
+
/>
|
|
118
|
+
</template>
|
|
119
|
+
`,
|
|
120
|
+
},
|
|
121
|
+
},
|
|
122
|
+
},
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
// With disabled previous button
|
|
126
|
+
export const DisabledPrevious: Story = {
|
|
127
|
+
...Template,
|
|
128
|
+
args: {
|
|
129
|
+
title: 'Board with Disabled Previous',
|
|
130
|
+
disableLast: true,
|
|
131
|
+
},
|
|
132
|
+
parameters: {
|
|
133
|
+
docs: {
|
|
134
|
+
source: {
|
|
135
|
+
code: `
|
|
136
|
+
<template>
|
|
137
|
+
<SelectionColumnBar
|
|
138
|
+
title="Board with Disabled Previous"
|
|
139
|
+
:disableLast="true"
|
|
140
|
+
@click:last="clickLast"
|
|
141
|
+
@click:next="clickNext"
|
|
142
|
+
/>
|
|
143
|
+
</template>
|
|
144
|
+
`,
|
|
145
|
+
},
|
|
146
|
+
},
|
|
147
|
+
},
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
// With disabled next button
|
|
151
|
+
export const DisabledNext: Story = {
|
|
152
|
+
...Template,
|
|
153
|
+
args: {
|
|
154
|
+
title: 'Board with Disabled Next',
|
|
155
|
+
disableNext: true,
|
|
156
|
+
},
|
|
157
|
+
parameters: {
|
|
158
|
+
docs: {
|
|
159
|
+
source: {
|
|
160
|
+
code: `
|
|
161
|
+
<template>
|
|
162
|
+
<SelectionColumnBar
|
|
163
|
+
title="Board with Disabled Next"
|
|
164
|
+
:disableNext="true"
|
|
165
|
+
@click:last="clickLast"
|
|
166
|
+
@click:next="clickNext"
|
|
167
|
+
/>
|
|
168
|
+
</template>
|
|
169
|
+
`,
|
|
170
|
+
},
|
|
171
|
+
},
|
|
172
|
+
},
|
|
173
|
+
};
|
|
174
|
+
|
|
175
|
+
// With both buttons disabled
|
|
176
|
+
export const BothDisabled: Story = {
|
|
177
|
+
...Template,
|
|
178
|
+
args: {
|
|
179
|
+
title: 'Board with Both Buttons Disabled',
|
|
180
|
+
disableLast: true,
|
|
181
|
+
disableNext: true,
|
|
182
|
+
},
|
|
183
|
+
parameters: {
|
|
184
|
+
docs: {
|
|
185
|
+
source: {
|
|
186
|
+
code: `
|
|
187
|
+
<template>
|
|
188
|
+
<SelectionColumnBar
|
|
189
|
+
title="Board with Both Buttons Disabled"
|
|
190
|
+
:disableLast="true"
|
|
191
|
+
:disableNext="true"
|
|
192
|
+
@click:last="clickLast"
|
|
193
|
+
@click:next="clickNext"
|
|
194
|
+
/>
|
|
195
|
+
</template>
|
|
196
|
+
`,
|
|
197
|
+
},
|
|
198
|
+
},
|
|
199
|
+
},
|
|
200
|
+
};
|
|
201
|
+
|
|
202
|
+
// Story with event actions for debugging
|
|
203
|
+
export const WithEventActions: Story = {
|
|
204
|
+
...Template,
|
|
205
|
+
args: {
|
|
206
|
+
title: 'Event Handling Board',
|
|
207
|
+
},
|
|
208
|
+
argTypes: {
|
|
209
|
+
'click:last': { action: 'click:last' },
|
|
210
|
+
'click:next': { action: 'click:next' },
|
|
211
|
+
},
|
|
212
|
+
parameters: {
|
|
213
|
+
docs: {
|
|
214
|
+
source: {
|
|
215
|
+
code: `
|
|
216
|
+
<template>
|
|
217
|
+
<SelectionColumnBar
|
|
218
|
+
title="Event Handling Board"
|
|
219
|
+
@click:last="clickLast"
|
|
220
|
+
@click:next="clickNext"
|
|
221
|
+
/>
|
|
222
|
+
</template>
|
|
223
|
+
|
|
224
|
+
<script setup>
|
|
225
|
+
import { action } from '@storybook/addon-actions';
|
|
226
|
+
|
|
227
|
+
const clickLast = action('click:last');
|
|
228
|
+
const clickNext = action('click:next');
|
|
229
|
+
</script>
|
|
230
|
+
`,
|
|
231
|
+
},
|
|
232
|
+
},
|
|
233
|
+
},
|
|
234
|
+
};
|