@dative-gpi/foundation-shared-components 0.0.19 → 0.0.20
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 +31 -57
- package/components/FSCard.vue +4 -4
- package/components/FSCarousel.vue +4 -3
- package/components/FSClickable.vue +125 -0
- package/components/FSLoader.vue +9 -31
- package/components/FSSlideGroup.vue +69 -8
- package/components/FSToggleSet.vue +20 -1
- package/components/FSWrapGroup.vue +22 -2
- package/components/buttons/FSButtonFile.vue +84 -0
- package/components/buttons/FSButtonFileIcon.vue +84 -0
- package/components/buttons/FSButtonFileLabel.vue +83 -0
- package/components/buttons/FSButtonFileMini.vue +83 -0
- package/components/fields/FSIconField.vue +18 -5
- package/components/lists/FSDataTableUI.vue +2 -0
- package/package.json +4 -4
- package/styles/components/fs_button.scss +0 -28
- package/styles/components/fs_clickable.scss +26 -0
- package/styles/components/fs_data_table.scss +2 -2
- package/styles/components/index.scss +1 -0
- package/styles/globals/overrides.scss +3 -2
- package/utils/css.ts +16 -2
- package/components/FSFileButton.vue +0 -246
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<FSButton
|
|
4
|
+
prependIcon="mdi-upload-outline"
|
|
5
|
+
:label="$tr('ui.button.import-file', 'Import file')"
|
|
6
|
+
:color="ColorEnum.Light"
|
|
7
|
+
@click="onClick"
|
|
8
|
+
v-bind="$attrs"
|
|
9
|
+
/>
|
|
10
|
+
<form>
|
|
11
|
+
<input
|
|
12
|
+
v-show="false"
|
|
13
|
+
type="file"
|
|
14
|
+
ref="input"
|
|
15
|
+
:accept="$props.accept"
|
|
16
|
+
@input="onInput"
|
|
17
|
+
/>
|
|
18
|
+
</form>
|
|
19
|
+
</div>
|
|
20
|
+
</template>
|
|
21
|
+
|
|
22
|
+
<script lang="ts">
|
|
23
|
+
import { defineComponent, ref } from "vue";
|
|
24
|
+
import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
25
|
+
|
|
26
|
+
import FSButton from "../FSButton.vue";
|
|
27
|
+
|
|
28
|
+
export default defineComponent({
|
|
29
|
+
name: "FSButtonFile",
|
|
30
|
+
components: {
|
|
31
|
+
FSButton
|
|
32
|
+
},
|
|
33
|
+
props: {
|
|
34
|
+
accept: {
|
|
35
|
+
type: String,
|
|
36
|
+
required: false,
|
|
37
|
+
default: "",
|
|
38
|
+
},
|
|
39
|
+
readFile: {
|
|
40
|
+
type: Boolean,
|
|
41
|
+
required: false,
|
|
42
|
+
default: true,
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
emits: ["update:modelValue"],
|
|
46
|
+
setup(props, { emit }) {
|
|
47
|
+
const input = ref(null);
|
|
48
|
+
|
|
49
|
+
const clear = () => {
|
|
50
|
+
input.value!.form && input.value!.form.reset();
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
const onClick = () => {
|
|
54
|
+
input.value!.click();
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
const onInput = () => {
|
|
58
|
+
const file = input.value!.files && input.value!.files[0];
|
|
59
|
+
if (!file) {
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
if (!props.readFile) {
|
|
63
|
+
emit("update:modelValue", file);
|
|
64
|
+
clear();
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
const reader = new FileReader();
|
|
68
|
+
reader.addEventListener("load", (fileEv) => {
|
|
69
|
+
emit("update:modelValue", fileEv.target && fileEv.target.result);
|
|
70
|
+
clear();
|
|
71
|
+
});
|
|
72
|
+
reader.readAsDataURL(file);
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
return {
|
|
77
|
+
ColorEnum,
|
|
78
|
+
input,
|
|
79
|
+
onClick,
|
|
80
|
+
onInput
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
</script>
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<FSButton
|
|
4
|
+
icon="mdi-upload-outline"
|
|
5
|
+
variant="icon"
|
|
6
|
+
:color="ColorEnum.Light"
|
|
7
|
+
@click="onClick"
|
|
8
|
+
v-bind="$attrs"
|
|
9
|
+
/>
|
|
10
|
+
<form>
|
|
11
|
+
<input
|
|
12
|
+
v-show="false"
|
|
13
|
+
type="file"
|
|
14
|
+
ref="input"
|
|
15
|
+
:accept="$props.accept"
|
|
16
|
+
@input="onInput"
|
|
17
|
+
/>
|
|
18
|
+
</form>
|
|
19
|
+
</div>
|
|
20
|
+
</template>
|
|
21
|
+
|
|
22
|
+
<script lang="ts">
|
|
23
|
+
import { defineComponent, ref } from "vue";
|
|
24
|
+
import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
25
|
+
|
|
26
|
+
import FSButton from "../FSButton.vue";
|
|
27
|
+
|
|
28
|
+
export default defineComponent({
|
|
29
|
+
name: "FSButtonFileIcon",
|
|
30
|
+
components: {
|
|
31
|
+
FSButton
|
|
32
|
+
},
|
|
33
|
+
props: {
|
|
34
|
+
accept: {
|
|
35
|
+
type: String,
|
|
36
|
+
required: false,
|
|
37
|
+
default: "",
|
|
38
|
+
},
|
|
39
|
+
readFile: {
|
|
40
|
+
type: Boolean,
|
|
41
|
+
required: false,
|
|
42
|
+
default: true,
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
emits: ["update:modelValue"],
|
|
46
|
+
setup(props, { emit }) {
|
|
47
|
+
const input = ref(null);
|
|
48
|
+
|
|
49
|
+
const clear = () => {
|
|
50
|
+
input.value!.form && input.value!.form.reset();
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
const onClick = () => {
|
|
54
|
+
input.value!.click();
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
const onInput = () => {
|
|
58
|
+
const file = input.value!.files && input.value!.files[0];
|
|
59
|
+
if (!file) {
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
if (!props.readFile) {
|
|
63
|
+
emit("update:modelValue", file);
|
|
64
|
+
clear();
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
const reader = new FileReader();
|
|
68
|
+
reader.addEventListener("load", (fileEv) => {
|
|
69
|
+
emit("update:modelValue", fileEv.target && fileEv.target.result);
|
|
70
|
+
clear();
|
|
71
|
+
});
|
|
72
|
+
reader.readAsDataURL(file);
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
return {
|
|
77
|
+
ColorEnum,
|
|
78
|
+
input,
|
|
79
|
+
onClick,
|
|
80
|
+
onInput
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
</script>
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<FSButton
|
|
4
|
+
:label="$tr('ui.button.import-file', 'Import file')"
|
|
5
|
+
:color="ColorEnum.Light"
|
|
6
|
+
@click="onClick"
|
|
7
|
+
v-bind="$attrs"
|
|
8
|
+
/>
|
|
9
|
+
<form>
|
|
10
|
+
<input
|
|
11
|
+
v-show="false"
|
|
12
|
+
type="file"
|
|
13
|
+
ref="input"
|
|
14
|
+
:accept="$props.accept"
|
|
15
|
+
@input="onInput"
|
|
16
|
+
/>
|
|
17
|
+
</form>
|
|
18
|
+
</div>
|
|
19
|
+
</template>
|
|
20
|
+
|
|
21
|
+
<script lang="ts">
|
|
22
|
+
import { defineComponent, ref } from "vue";
|
|
23
|
+
import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
24
|
+
|
|
25
|
+
import FSButton from "../FSButton.vue";
|
|
26
|
+
|
|
27
|
+
export default defineComponent({
|
|
28
|
+
name: "FSButtonFileLabel",
|
|
29
|
+
components: {
|
|
30
|
+
FSButton
|
|
31
|
+
},
|
|
32
|
+
props: {
|
|
33
|
+
accept: {
|
|
34
|
+
type: String,
|
|
35
|
+
required: false,
|
|
36
|
+
default: "",
|
|
37
|
+
},
|
|
38
|
+
readFile: {
|
|
39
|
+
type: Boolean,
|
|
40
|
+
required: false,
|
|
41
|
+
default: true,
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
emits: ["update:modelValue"],
|
|
45
|
+
setup(props, { emit }) {
|
|
46
|
+
const input = ref(null);
|
|
47
|
+
|
|
48
|
+
const clear = () => {
|
|
49
|
+
input.value!.form && input.value!.form.reset();
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
const onClick = () => {
|
|
53
|
+
input.value!.click();
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
const onInput = () => {
|
|
57
|
+
const file = input.value!.files && input.value!.files[0];
|
|
58
|
+
if (!file) {
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
if (!props.readFile) {
|
|
62
|
+
emit("update:modelValue", file);
|
|
63
|
+
clear();
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
const reader = new FileReader();
|
|
67
|
+
reader.addEventListener("load", (fileEv) => {
|
|
68
|
+
emit("update:modelValue", fileEv.target && fileEv.target.result);
|
|
69
|
+
clear();
|
|
70
|
+
});
|
|
71
|
+
reader.readAsDataURL(file);
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
return {
|
|
76
|
+
ColorEnum,
|
|
77
|
+
input,
|
|
78
|
+
onClick,
|
|
79
|
+
onInput
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
</script>
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<FSButton
|
|
4
|
+
prependIcon="mdi-upload-outline"
|
|
5
|
+
:color="ColorEnum.Light"
|
|
6
|
+
@click="onClick"
|
|
7
|
+
v-bind="$attrs"
|
|
8
|
+
/>
|
|
9
|
+
<form>
|
|
10
|
+
<input
|
|
11
|
+
v-show="false"
|
|
12
|
+
type="file"
|
|
13
|
+
ref="input"
|
|
14
|
+
:accept="$props.accept"
|
|
15
|
+
@input="onInput"
|
|
16
|
+
/>
|
|
17
|
+
</form>
|
|
18
|
+
</div>
|
|
19
|
+
</template>
|
|
20
|
+
|
|
21
|
+
<script lang="ts">
|
|
22
|
+
import { defineComponent, ref } from "vue";
|
|
23
|
+
import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
24
|
+
|
|
25
|
+
import FSButton from "../FSButton.vue";
|
|
26
|
+
|
|
27
|
+
export default defineComponent({
|
|
28
|
+
name: "FSButtonFileMini",
|
|
29
|
+
components: {
|
|
30
|
+
FSButton
|
|
31
|
+
},
|
|
32
|
+
props: {
|
|
33
|
+
accept: {
|
|
34
|
+
type: String,
|
|
35
|
+
required: false,
|
|
36
|
+
default: "",
|
|
37
|
+
},
|
|
38
|
+
readFile: {
|
|
39
|
+
type: Boolean,
|
|
40
|
+
required: false,
|
|
41
|
+
default: true,
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
emits: ["update:modelValue"],
|
|
45
|
+
setup(props, { emit }) {
|
|
46
|
+
const input = ref(null);
|
|
47
|
+
|
|
48
|
+
const clear = () => {
|
|
49
|
+
input.value!.form && input.value!.form.reset();
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
const onClick = () => {
|
|
53
|
+
input.value!.click();
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
const onInput = () => {
|
|
57
|
+
const file = input.value!.files && input.value!.files[0];
|
|
58
|
+
if (!file) {
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
if (!props.readFile) {
|
|
62
|
+
emit("update:modelValue", file);
|
|
63
|
+
clear();
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
const reader = new FileReader();
|
|
67
|
+
reader.addEventListener("load", (fileEv) => {
|
|
68
|
+
emit("update:modelValue", fileEv.target && fileEv.target.result);
|
|
69
|
+
clear();
|
|
70
|
+
});
|
|
71
|
+
reader.readAsDataURL(file);
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
return {
|
|
76
|
+
ColorEnum,
|
|
77
|
+
input,
|
|
78
|
+
onClick,
|
|
79
|
+
onInput
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
</script>
|
|
@@ -25,20 +25,21 @@
|
|
|
25
25
|
</FSTextField>
|
|
26
26
|
<FSToggleSet
|
|
27
27
|
class="fs-icon-field-set"
|
|
28
|
+
ref="toggleSetRef"
|
|
28
29
|
variant="slide"
|
|
29
|
-
:values="icons"
|
|
30
|
-
:required="$props.required"
|
|
31
|
-
:editable="$props.editable"
|
|
32
30
|
:buttonColor="$props.buttonColor"
|
|
33
31
|
:activeColor="$props.activeColor"
|
|
34
32
|
:modelValue="$props.modelValue"
|
|
33
|
+
:required="$props.required"
|
|
34
|
+
:editable="$props.editable"
|
|
35
|
+
:values="icons"
|
|
35
36
|
@update:modelValue="(value) => $emit('update:modelValue', value)"
|
|
36
37
|
/>
|
|
37
38
|
</FSCol>
|
|
38
39
|
</template>
|
|
39
40
|
|
|
40
41
|
<script lang="ts">
|
|
41
|
-
import { computed, defineComponent, PropType, ref } from "vue";
|
|
42
|
+
import { computed, defineComponent, PropType, ref, watch } from "vue";
|
|
42
43
|
|
|
43
44
|
import { Icons, sortByLevenshteinDistance } from "@dative-gpi/foundation-shared-components/utils";
|
|
44
45
|
import { useColors, useRules } from "@dative-gpi/foundation-shared-components/composables";
|
|
@@ -129,6 +130,7 @@ export default defineComponent({
|
|
|
129
130
|
const lights = getColors(ColorEnum.Light);
|
|
130
131
|
const darks = getColors(ColorEnum.Dark);
|
|
131
132
|
|
|
133
|
+
const toggleSetRef = ref(null);
|
|
132
134
|
const innerValue = ref(null);
|
|
133
135
|
|
|
134
136
|
const style = computed((): {[code: string]: string} & Partial<CSSStyleDeclaration> => {
|
|
@@ -170,7 +172,11 @@ export default defineComponent({
|
|
|
170
172
|
}
|
|
171
173
|
if (props.modelValue) {
|
|
172
174
|
const selectedIcon = innerIcons.find((icon) => icon.id === props.modelValue);
|
|
173
|
-
if (
|
|
175
|
+
if (selectedIcon) {
|
|
176
|
+
innerIcons.splice(innerIcons.indexOf(selectedIcon), 1);
|
|
177
|
+
innerIcons.unshift(selectedIcon);
|
|
178
|
+
}
|
|
179
|
+
else {
|
|
174
180
|
innerIcons.unshift({
|
|
175
181
|
id: props.modelValue,
|
|
176
182
|
prependIcon: props.modelValue
|
|
@@ -182,7 +188,14 @@ export default defineComponent({
|
|
|
182
188
|
|
|
183
189
|
const messages = computed((): string[] => getMessages(props.modelValue, props.rules));
|
|
184
190
|
|
|
191
|
+
watch(() => props.modelValue, () => {
|
|
192
|
+
if (toggleSetRef.value) {
|
|
193
|
+
toggleSetRef.value.goToStart();
|
|
194
|
+
}
|
|
195
|
+
});
|
|
196
|
+
|
|
185
197
|
return {
|
|
198
|
+
toggleSetRef,
|
|
186
199
|
innerValue,
|
|
187
200
|
validateOn,
|
|
188
201
|
messages,
|
|
@@ -242,6 +242,7 @@
|
|
|
242
242
|
v-if="innerRowsPerPage !== -1"
|
|
243
243
|
class="fs-data-table-pagination"
|
|
244
244
|
variant="slide"
|
|
245
|
+
:dash="pageOptions.length > 8"
|
|
245
246
|
:values="pageOptions"
|
|
246
247
|
:required="true"
|
|
247
248
|
v-model="innerPage"
|
|
@@ -349,6 +350,7 @@
|
|
|
349
350
|
v-if="innerRowsPerPage !== -1"
|
|
350
351
|
class="fs-data-table-pagination"
|
|
351
352
|
variant="slide"
|
|
353
|
+
:dash="pageOptions.length > 8"
|
|
352
354
|
:values="pageOptions"
|
|
353
355
|
:required="true"
|
|
354
356
|
v-model="innerPage"
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dative-gpi/foundation-shared-components",
|
|
3
3
|
"sideEffects": false,
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.20",
|
|
5
5
|
"description": "",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
"author": "",
|
|
11
11
|
"license": "ISC",
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@dative-gpi/foundation-shared-domain": "0.0.
|
|
14
|
-
"@dative-gpi/foundation-shared-services": "0.0.
|
|
13
|
+
"@dative-gpi/foundation-shared-domain": "0.0.20",
|
|
14
|
+
"@dative-gpi/foundation-shared-services": "0.0.20",
|
|
15
15
|
"@fontsource/montserrat": "^5.0.16",
|
|
16
16
|
"@lexical/clipboard": "^0.12.5",
|
|
17
17
|
"@lexical/history": "^0.12.5",
|
|
@@ -32,5 +32,5 @@
|
|
|
32
32
|
"sass": "^1.69.5",
|
|
33
33
|
"sass-loader": "^13.3.2"
|
|
34
34
|
},
|
|
35
|
-
"gitHead": "
|
|
35
|
+
"gitHead": "9e8af5e1e592b3ae7725816cad435a497d2ffe91"
|
|
36
36
|
}
|
|
@@ -1,37 +1,9 @@
|
|
|
1
1
|
.fs-button {
|
|
2
2
|
padding: var(--fs-button-padding) !important;
|
|
3
|
-
border-radius: 4px !important;
|
|
4
|
-
border: 1px solid !important;
|
|
5
|
-
box-shadow: none !important;
|
|
6
|
-
|
|
7
|
-
background-color: var(--fs-button-background-color) !important;
|
|
8
|
-
border-color: var(--fs-button-border-color) !important;
|
|
9
|
-
color: var(--fs-button-color) !important;
|
|
10
3
|
|
|
11
4
|
&.fs-button-full-width {
|
|
12
5
|
width: 100%;
|
|
13
6
|
}
|
|
14
|
-
|
|
15
|
-
&:not(.fs-button--disabled):hover {
|
|
16
|
-
background-color: var(--fs-button-hover-background-color) !important;
|
|
17
|
-
color: var(--fs-button-hover-color) !important;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
&:not(.fs-button--disabled):active {
|
|
21
|
-
background-color: var(--fs-button-active-background-color) !important;
|
|
22
|
-
border-color: var(--fs-button-active-border-color) !important;
|
|
23
|
-
color: var(--fs-button-active-color) !important;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
@include web {
|
|
27
|
-
min-width: 40px !important;
|
|
28
|
-
height: 40px !important;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
@include mobile {
|
|
32
|
-
min-width: 36px !important;
|
|
33
|
-
height: 36px !important;
|
|
34
|
-
}
|
|
35
7
|
}
|
|
36
8
|
|
|
37
9
|
.fs-button-icon {
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
.fs-clickable {
|
|
2
|
+
border-radius: var(--fs-clickable-border-radius) !important;
|
|
3
|
+
border: var(--fs-clickable-border-size) solid !important;
|
|
4
|
+
transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
|
|
5
|
+
cursor: pointer;
|
|
6
|
+
|
|
7
|
+
background-color: var(--fs-clickable-background-color) !important;
|
|
8
|
+
border-color: var(--fs-clickable-border-color) !important;
|
|
9
|
+
color: var(--fs-clickable-color) !important;
|
|
10
|
+
|
|
11
|
+
&.fs-clickable-disabled {
|
|
12
|
+
cursor: default;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
&:not(.fs-clickable-disabled):hover {
|
|
16
|
+
background-color: var(--fs-clickable-hover-background-color) !important;
|
|
17
|
+
border-color: var(--fs-clickable-hover-border-color) !important;
|
|
18
|
+
color: var(--fs-clickable-hover-color) !important;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
&:not(.fs-clickable-disabled):active {
|
|
22
|
+
background-color: var(--fs-clickable-active-background-color) !important;
|
|
23
|
+
border-color: var(--fs-clickable-active-border-color) !important;
|
|
24
|
+
color: var(--fs-clickable-active-color) !important;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -78,6 +78,7 @@ input[type=number]::-webkit-outer-spin-button {
|
|
|
78
78
|
margin: 0;
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
+
// Set the right z-index in overlays
|
|
81
82
|
$nthOverlay: 25;
|
|
82
83
|
@for $i from 1 through $nthOverlay {
|
|
83
84
|
.v-overlay-container > :nth-child(#{$i}) {
|
|
@@ -96,8 +97,8 @@ $nthOverlay: 25;
|
|
|
96
97
|
.v-slide-group__prev,
|
|
97
98
|
.v-slide-group__next {
|
|
98
99
|
color: var(--fs-group-color);
|
|
99
|
-
min-width:
|
|
100
|
-
width:
|
|
100
|
+
min-width: var(--fs-group-arrows-width) !important;
|
|
101
|
+
width: var(--fs-group-arrows-width) !important;
|
|
101
102
|
flex: 1 1 0 !important;
|
|
102
103
|
|
|
103
104
|
@include touchscreen {
|
package/utils/css.ts
CHANGED
|
@@ -1,8 +1,22 @@
|
|
|
1
|
-
|
|
1
|
+
import { useBreakpoints } from "../composables/useBreakpoints";
|
|
2
|
+
|
|
3
|
+
const { isMobileSized, isExtraSmall } = useBreakpoints();
|
|
4
|
+
|
|
5
|
+
export const sizeToVar = (value: string[] | number[] | string | number | null, nullValue: string = "fit-content", unit: "px" | "%" | "em"| "vw" | "vh" = "px"): string => {
|
|
2
6
|
if (value == null) {
|
|
3
7
|
return nullValue;
|
|
4
8
|
}
|
|
5
|
-
|
|
9
|
+
if (Array.isArray(value)) {
|
|
10
|
+
if (isExtraSmall.value) {
|
|
11
|
+
const extraSmallValue = value[2] ?? value[1] ?? value[0];
|
|
12
|
+
return typeof extraSmallValue === 'string' && isNaN(+extraSmallValue) ? extraSmallValue : `${extraSmallValue}${unit}`;
|
|
13
|
+
}
|
|
14
|
+
if (isMobileSized.value) {
|
|
15
|
+
const mobileValue = value[1] ?? value[0];
|
|
16
|
+
return typeof mobileValue === 'string' && isNaN(+mobileValue) ? mobileValue : `${mobileValue}${unit}`;
|
|
17
|
+
}
|
|
18
|
+
return typeof value[0] === 'string' && isNaN(+value[0]) ? value[0] : `${value[0]}${unit}`;
|
|
19
|
+
}
|
|
6
20
|
return typeof value === 'string' && isNaN(+value) ? value : `${value}${unit}`;
|
|
7
21
|
};
|
|
8
22
|
|