@zap-wunschlachen/wl-shared-components 1.0.32 → 1.0.34
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/App.vue +11 -6
- package/package.json +1 -1
- package/src/assets/css/base.css +0 -3
- package/src/assets/css/variables.css +1 -0
- package/src/components/Button/Button.vue +18 -5
- package/src/components/Icons/Logo.vue +2 -2
- package/src/components/Icons/MiniLogo.vue +2 -2
- package/src/plugins/vuetify.ts +1 -0
- package/src/utils/index.ts +7 -7
package/App.vue
CHANGED
|
@@ -1,17 +1,22 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="app">
|
|
3
3
|
<div class="element-container">
|
|
4
|
-
<
|
|
5
|
-
|
|
4
|
+
<Button
|
|
5
|
+
:color="siteColors['slot-bg']"
|
|
6
|
+
class="py-1 !font-bold custom-text-color outline-none focus-visible:outline"
|
|
7
|
+
:text-color="siteColors['slot-text']"
|
|
8
|
+
>
|
|
9
|
+
<template #default>
|
|
10
|
+
<p class="text-wrap">Long text button to showcase wrapping behavior in the button component</p>
|
|
11
|
+
</template>
|
|
12
|
+
</Button>
|
|
6
13
|
</div>
|
|
7
14
|
</div>
|
|
8
15
|
</template>
|
|
9
16
|
|
|
10
17
|
<script setup lang="ts">
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import { ref } from 'vue';
|
|
14
|
-
const domain = ref('domain-dental');
|
|
18
|
+
import Button from '@/components/Button/Button.vue';
|
|
19
|
+
import { siteColors } from "@/utils/index";
|
|
15
20
|
</script>
|
|
16
21
|
|
|
17
22
|
<style scoped>
|
package/package.json
CHANGED
package/src/assets/css/base.css
CHANGED
|
@@ -73,7 +73,6 @@
|
|
|
73
73
|
body {
|
|
74
74
|
background: rgba(151, 169, 192, 0.151);
|
|
75
75
|
font-family: Outfit;
|
|
76
|
-
color: var(--Dental-Blue-0);
|
|
77
76
|
}
|
|
78
77
|
|
|
79
78
|
/* Base Heading Styles */
|
|
@@ -86,7 +85,6 @@ h6 {
|
|
|
86
85
|
font-style: normal;
|
|
87
86
|
font-weight: 600;
|
|
88
87
|
line-height: 120%;
|
|
89
|
-
color: var(--Dental-Blue-0);
|
|
90
88
|
}
|
|
91
89
|
|
|
92
90
|
h1 {
|
|
@@ -130,7 +128,6 @@ p,
|
|
|
130
128
|
font-style: normal;
|
|
131
129
|
font-weight: 300;
|
|
132
130
|
line-height: 120%;
|
|
133
|
-
color: var(--Dental-Blue-0);
|
|
134
131
|
}
|
|
135
132
|
|
|
136
133
|
.p-medium {
|
|
@@ -11,13 +11,15 @@
|
|
|
11
11
|
:variant="variant"
|
|
12
12
|
:size="size"
|
|
13
13
|
:readonly="readonly"
|
|
14
|
+
:style="buttonStyle"
|
|
14
15
|
data-testid="root"
|
|
15
16
|
>
|
|
16
|
-
{{ label }}
|
|
17
|
+
<slot>{{ label }}</slot>
|
|
17
18
|
</v-btn>
|
|
18
19
|
</template>
|
|
19
20
|
|
|
20
21
|
<script setup lang="ts">
|
|
22
|
+
import { computed } from 'vue';
|
|
21
23
|
import { siteColors } from "../../utils/index";
|
|
22
24
|
|
|
23
25
|
const props = defineProps({
|
|
@@ -29,6 +31,14 @@ const props = defineProps({
|
|
|
29
31
|
type: String,
|
|
30
32
|
default: siteColors['btn_bg'],
|
|
31
33
|
},
|
|
34
|
+
/**
|
|
35
|
+
* The text color of the button (for flat variant).
|
|
36
|
+
* Default is 'white'.
|
|
37
|
+
*/
|
|
38
|
+
textColor: {
|
|
39
|
+
type: String,
|
|
40
|
+
default: 'white',
|
|
41
|
+
},
|
|
32
42
|
/**
|
|
33
43
|
* Icon to display before the button label.
|
|
34
44
|
* Accepts the name of an icon (String).
|
|
@@ -110,13 +120,16 @@ const props = defineProps({
|
|
|
110
120
|
default: false,
|
|
111
121
|
},
|
|
112
122
|
});
|
|
123
|
+
|
|
124
|
+
const buttonStyle = computed(() => {
|
|
125
|
+
if (props.variant === 'flat') {
|
|
126
|
+
return { color: props.textColor };
|
|
127
|
+
}
|
|
128
|
+
return {};
|
|
129
|
+
});
|
|
113
130
|
</script>
|
|
114
131
|
|
|
115
132
|
<style>
|
|
116
|
-
.wl-button.v-btn--variant-flat {
|
|
117
|
-
color: white !important;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
133
|
.wl-button.v-btn--variant-outlined {
|
|
121
134
|
border-width: 1.5px;
|
|
122
135
|
}
|
|
@@ -96,7 +96,7 @@ import { siteColors } from "../../utils/index";
|
|
|
96
96
|
import { computed } from "vue";
|
|
97
97
|
|
|
98
98
|
const currentDomain = computed(() => {
|
|
99
|
-
return props.domain
|
|
99
|
+
return props.domain || siteColors['domain'] || "domain-dental";
|
|
100
100
|
});
|
|
101
101
|
|
|
102
102
|
// You can pass props if you need to customize it
|
|
@@ -111,7 +111,7 @@ const props = defineProps({
|
|
|
111
111
|
},
|
|
112
112
|
domain: {
|
|
113
113
|
type: String,
|
|
114
|
-
default: "
|
|
114
|
+
default: "",
|
|
115
115
|
},
|
|
116
116
|
});
|
|
117
117
|
</script>
|
|
@@ -16,7 +16,7 @@ import { siteColors } from "../../utils/index";
|
|
|
16
16
|
import { computed } from "vue";
|
|
17
17
|
|
|
18
18
|
const currentDomain = computed(() => {
|
|
19
|
-
return props.domain
|
|
19
|
+
return props.domain || siteColors['domain'] || "domain-dental";
|
|
20
20
|
});
|
|
21
21
|
|
|
22
22
|
const props = defineProps({
|
|
@@ -30,7 +30,7 @@ const props = defineProps({
|
|
|
30
30
|
},
|
|
31
31
|
domain: {
|
|
32
32
|
type: String,
|
|
33
|
-
default: "
|
|
33
|
+
default: "",
|
|
34
34
|
},
|
|
35
35
|
});
|
|
36
36
|
</script>
|
package/src/plugins/vuetify.ts
CHANGED
package/src/utils/index.ts
CHANGED
|
@@ -58,11 +58,11 @@ const generateDynamicDomain = () => {
|
|
|
58
58
|
const domain: any = ref(null);
|
|
59
59
|
const currentDomain = generateDynamicDomain().toLowerCase();
|
|
60
60
|
|
|
61
|
-
if (currentDomain.includes("white-cocoon")) {
|
|
61
|
+
//if (currentDomain.includes("white-cocoon")) {
|
|
62
62
|
domain.value = "domain-cocoon";
|
|
63
|
-
} else {
|
|
64
|
-
domain.value = "domain-dental";
|
|
65
|
-
}
|
|
63
|
+
//} else {
|
|
64
|
+
// domain.value = "domain-dental";
|
|
65
|
+
//}
|
|
66
66
|
|
|
67
67
|
let siteColors: any = {
|
|
68
68
|
"border-color": "var(--Dental-Blue-0)",
|
|
@@ -73,7 +73,7 @@ let siteColors: any = {
|
|
|
73
73
|
font_color_code: "var(--Dental-Blue-1)",
|
|
74
74
|
font_color_title_code: "var(--Dental-Blue-0)",
|
|
75
75
|
"slot-bg": "var(--Dental-Light-Blue-0)",
|
|
76
|
-
"slot-text": "
|
|
76
|
+
"slot-text": "var(--Dental-Blue-0)",
|
|
77
77
|
bg_0: "bg-[var(--Dental-Light-Blue--3)]",
|
|
78
78
|
bg_logo_fill_color: "white",
|
|
79
79
|
button_rounded: "lg",
|
|
@@ -93,8 +93,8 @@ if (domain.value === "domain-cocoon") {
|
|
|
93
93
|
font_family: "font-['arial']",
|
|
94
94
|
btn_bg: "var(--Dark-Nude-2)",
|
|
95
95
|
"border-color": "[var(--Dark-Nude-0)",
|
|
96
|
-
"slot-bg": "var(--
|
|
97
|
-
"slot-text": "
|
|
96
|
+
"slot-bg": "var(--Light-Nude-0)",
|
|
97
|
+
"slot-text": "var(--Dark-Nude-3)",
|
|
98
98
|
"divider-color": "divide-[var(--Dark-Nude-0)]",
|
|
99
99
|
bg_logo_fill_color: "var(--Warm-Air--3)",
|
|
100
100
|
bg_card_title: "bg-[var(--Dark-Nude--3)]",
|