@zap-wunschlachen/wl-shared-components 1.0.41 → 1.0.43

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zap-wunschlachen/wl-shared-components",
3
- "version": "1.0.41",
3
+ "version": "1.0.43",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "dev": "vite",
@@ -12,22 +12,9 @@
12
12
  </template>
13
13
 
14
14
  <script setup lang="ts">
15
- import { siteColors } from "../../utils/index";
15
+ import { siteColors, getColorsForDomain } from "../../utils/index";
16
16
  import { computed, inject } from "vue";
17
17
 
18
- // Inject theme colors from ThemeProvider, fallback to global siteColors
19
- const injectedThemeColors = inject('themeColors', null);
20
- const colors = computed(() => {
21
- if (injectedThemeColors) {
22
- return injectedThemeColors.value;
23
- }
24
- return siteColors;
25
- });
26
-
27
- const currentDomain = computed(() => {
28
- return props.domain || colors.value['domain'] || "domain-dental";
29
- });
30
-
31
18
  const props = defineProps({
32
19
  width: {
33
20
  type: String,
@@ -42,4 +29,25 @@ const props = defineProps({
42
29
  default: "",
43
30
  },
44
31
  });
32
+
33
+ // Inject theme colors from ThemeProvider, fallback to global siteColors
34
+ const injectedThemeColors = inject('themeColors', null);
35
+
36
+ // When domain prop is explicitly set, use that domain's colors (for brand consistency)
37
+ // Otherwise fall back to injected theme colors or global siteColors
38
+ const colors = computed(() => {
39
+ // If domain is explicitly passed, use that domain's fixed brand colors
40
+ if (props.domain) {
41
+ return getColorsForDomain(props.domain);
42
+ }
43
+ // Otherwise use theme colors (injected or global)
44
+ if (injectedThemeColors) {
45
+ return injectedThemeColors.value;
46
+ }
47
+ return siteColors;
48
+ });
49
+
50
+ const currentDomain = computed(() => {
51
+ return props.domain || colors.value['domain'] || "domain-dental";
52
+ });
45
53
  </script>
@@ -44,7 +44,7 @@
44
44
  </template>
45
45
 
46
46
  <script setup>
47
- import TagLabel from '@components/Laboratory/TagLabel/TagLabel.vue';
47
+ import TagLabel from '../TagLabel/TagLabel.vue';
48
48
  import { defineProps } from 'vue';
49
49
  import './AppointmentCard.css';
50
50
 
@@ -45,7 +45,7 @@
45
45
  </template>
46
46
 
47
47
  <script setup>
48
- import Button from '@components/Button/Button.vue';
48
+ import Button from '../../Button/Button.vue';
49
49
  import { defineProps } from 'vue';
50
50
 
51
51
  // Define props for the paragraph text and an array of image sources
@@ -97,7 +97,7 @@
97
97
  <script setup>
98
98
  import { defineProps, defineEmits, computed } from 'vue';
99
99
  import TagLabel from '../TagLabel/TagLabel.vue';
100
- import Button from '@components/Button/Button.vue';
100
+ import Button from '../../Button/Button.vue';
101
101
 
102
102
  // Define event emitters with the specific format like "click:start", "click:cancel", etc.
103
103
  const emit = defineEmits([
@@ -24,7 +24,7 @@
24
24
  <script setup>
25
25
  import './DocumentCard.css';
26
26
  import { defineProps, defineEmits } from 'vue';
27
- import Button from '@components/Button/Button.vue';
27
+ import Button from '../../Button/Button.vue';
28
28
 
29
29
  // Define props for the DocumentCard component
30
30
  const props = defineProps({
@@ -18,7 +18,7 @@
18
18
 
19
19
  <script setup>
20
20
  import { defineProps, defineEmits } from 'vue';
21
- import NotificationBubble from '@components/NotificationBubble/NotificationBubble.vue';
21
+ import NotificationBubble from '../../NotificationBubble/NotificationBubble.vue';
22
22
 
23
23
  // Define props for the component
24
24
  const props = defineProps({
@@ -38,9 +38,9 @@
38
38
 
39
39
  <script setup>
40
40
  import { defineProps } from 'vue';
41
- import TagLabel from '@components/Laboratory/TagLabel/TagLabel.vue';
42
- import SolidArrowRight from '@components/Icons/SolidArrowRight.vue';
43
- import Circle from '@components/Icons/Circle.vue';
41
+ import TagLabel from '../TagLabel/TagLabel.vue';
42
+ import SolidArrowRight from '../../Icons/SolidArrowRight.vue';
43
+ import Circle from '../../Icons/Circle.vue';
44
44
  import './ProgressLinear.css';
45
45
 
46
46
  // Define props for date, progress value, and status
@@ -65,10 +65,10 @@
65
65
  <script setup>
66
66
  import './TicketCard.css';
67
67
 
68
- import TagLabel from '@components/Laboratory/TagLabel/TagLabel.vue';
69
- import NotificationBubble from '@components/NotificationBubble/NotificationBubble.vue';
68
+ import TagLabel from '../TagLabel/TagLabel.vue';
69
+ import NotificationBubble from '../../NotificationBubble/NotificationBubble.vue';
70
70
  import { defineProps } from 'vue';
71
- import Button from '@components/Button/Button.vue';
71
+ import Button from '../../Button/Button.vue';
72
72
 
73
73
  // Define props to make the component generic
74
74
  defineProps({
@@ -13,7 +13,7 @@
13
13
  </template>
14
14
 
15
15
  <script setup>
16
- import TagLabel from '@components/Laboratory/TagLabel/TagLabel.vue';
16
+ import TagLabel from '../TagLabel/TagLabel.vue';
17
17
 
18
18
  // Define props for the component
19
19
  const props = defineProps({