@dative-gpi/foundation-shared-components 0.0.10 → 0.0.11
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/components/FSButton.vue
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<v-btn
|
|
3
|
-
v-if="!['icon'].includes(
|
|
3
|
+
v-if="!['icon'].includes(props.variant)"
|
|
4
4
|
:ripple="false"
|
|
5
5
|
:style="style"
|
|
6
6
|
:class="classes"
|
|
7
|
-
:disabled="
|
|
7
|
+
:disabled="!props.editable"
|
|
8
8
|
v-bind="$attrs"
|
|
9
9
|
>
|
|
10
10
|
<FSRow
|
|
@@ -12,33 +12,33 @@
|
|
|
12
12
|
width="hug"
|
|
13
13
|
:wrap="false"
|
|
14
14
|
>
|
|
15
|
-
<slot name="prepend" v-bind="{ color:
|
|
15
|
+
<slot name="prepend" v-bind="{ color: props.color, colors }">
|
|
16
16
|
<FSIcon
|
|
17
|
-
v-if="
|
|
17
|
+
v-if="props.prependIcon"
|
|
18
18
|
size="l"
|
|
19
19
|
>
|
|
20
|
-
{{
|
|
20
|
+
{{ props.prependIcon }}
|
|
21
21
|
</FSIcon>
|
|
22
22
|
</slot>
|
|
23
|
-
<slot v-bind="{ color:
|
|
23
|
+
<slot v-bind="{ color: props.color, colors }">
|
|
24
24
|
<FSSpan
|
|
25
|
-
v-if="
|
|
25
|
+
v-if="props.label"
|
|
26
26
|
>
|
|
27
|
-
{{
|
|
27
|
+
{{ props.label }}
|
|
28
28
|
</FSSpan>
|
|
29
29
|
</slot>
|
|
30
|
-
<slot name="append" v-bind="{ color:
|
|
30
|
+
<slot name="append" v-bind="{ color: props.color, colors }">
|
|
31
31
|
<FSIcon
|
|
32
|
-
v-if="
|
|
32
|
+
v-if="props.appendIcon"
|
|
33
33
|
size="l"
|
|
34
34
|
>
|
|
35
|
-
{{
|
|
35
|
+
{{ props.appendIcon }}
|
|
36
36
|
</FSIcon>
|
|
37
37
|
</slot>
|
|
38
38
|
</FSRow>
|
|
39
39
|
</v-btn>
|
|
40
40
|
<FSRow
|
|
41
|
-
v-else-if="
|
|
41
|
+
v-else-if="props.icon"
|
|
42
42
|
align="center-center"
|
|
43
43
|
width="hug"
|
|
44
44
|
:style="style"
|
|
@@ -48,19 +48,20 @@
|
|
|
48
48
|
<FSIcon
|
|
49
49
|
size="l"
|
|
50
50
|
>
|
|
51
|
-
{{
|
|
51
|
+
{{ props.icon }}
|
|
52
52
|
</FSIcon>
|
|
53
53
|
<FSSpan
|
|
54
|
-
v-if="
|
|
54
|
+
v-if="props.label"
|
|
55
55
|
font="text-overline"
|
|
56
56
|
>
|
|
57
|
-
{{
|
|
57
|
+
{{ props.label }}
|
|
58
58
|
</FSSpan>
|
|
59
59
|
</FSRow>
|
|
60
60
|
</template>
|
|
61
61
|
|
|
62
62
|
<script lang="ts">
|
|
63
|
-
import { computed, defineComponent, PropType } from "vue";
|
|
63
|
+
import { computed, defineComponent, getCurrentInstance, PropType } from "vue";
|
|
64
|
+
import { useDefaults } from "vuetify";
|
|
64
65
|
|
|
65
66
|
import { useColors, useSlots } from "@dative-gpi/foundation-shared-components/composables";
|
|
66
67
|
import { ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
@@ -119,6 +120,8 @@ export default defineComponent({
|
|
|
119
120
|
}
|
|
120
121
|
},
|
|
121
122
|
setup(props) {
|
|
123
|
+
props = useDefaults(props, getCurrentInstance().type.name)
|
|
124
|
+
|
|
122
125
|
const textColors = computed(() => useColors().getContrasts(props.color));
|
|
123
126
|
const colors = computed(() => useColors().getColors(props.color));
|
|
124
127
|
const lights = useColors().getColors(ColorEnum.Light);
|
|
@@ -202,6 +205,7 @@ export default defineComponent({
|
|
|
202
205
|
});
|
|
203
206
|
|
|
204
207
|
return {
|
|
208
|
+
props,
|
|
205
209
|
colors,
|
|
206
210
|
style,
|
|
207
211
|
classes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dative-gpi/foundation-shared-components",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.11",
|
|
4
4
|
"description": "",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
"author": "",
|
|
10
10
|
"license": "ISC",
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@dative-gpi/foundation-shared-domain": "0.0.
|
|
13
|
-
"@dative-gpi/foundation-shared-services": "0.0.
|
|
12
|
+
"@dative-gpi/foundation-shared-domain": "0.0.11",
|
|
13
|
+
"@dative-gpi/foundation-shared-services": "0.0.11",
|
|
14
14
|
"@fontsource/montserrat": "^5.0.16",
|
|
15
15
|
"@lexical/history": "^0.12.5",
|
|
16
16
|
"@lexical/link": "^0.12.5",
|
|
@@ -30,5 +30,5 @@
|
|
|
30
30
|
"sass": "^1.69.5",
|
|
31
31
|
"sass-loader": "^13.3.2"
|
|
32
32
|
},
|
|
33
|
-
"gitHead": "
|
|
33
|
+
"gitHead": "4f28939e7d42ab1ef8319c614fbc210b1291fd79"
|
|
34
34
|
}
|