@dative-gpi/foundation-shared-components 0.0.18 → 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.
Files changed (71) hide show
  1. package/components/FSButton.vue +31 -57
  2. package/components/FSCard.vue +4 -4
  3. package/components/FSCarousel.vue +4 -3
  4. package/components/FSClickable.vue +125 -0
  5. package/components/FSDivider.vue +7 -2
  6. package/components/FSLoader.vue +9 -31
  7. package/components/FSSlideGroup.vue +69 -8
  8. package/components/FSToggleSet.vue +20 -1
  9. package/components/FSWrapGroup.vue +22 -2
  10. package/components/buttons/FSButtonCancel.vue +28 -0
  11. package/components/buttons/FSButtonCancelIcon.vue +28 -0
  12. package/components/buttons/FSButtonCancelLabel.vue +27 -0
  13. package/components/buttons/FSButtonCancelMini.vue +27 -0
  14. package/components/buttons/FSButtonDuplicate.vue +28 -0
  15. package/components/buttons/FSButtonDuplicateIcon.vue +28 -0
  16. package/components/buttons/FSButtonDuplicateLabel.vue +27 -0
  17. package/components/buttons/FSButtonDuplicateMini.vue +27 -0
  18. package/components/buttons/FSButtonEdit.vue +28 -0
  19. package/components/buttons/FSButtonEditIcon.vue +28 -0
  20. package/components/buttons/FSButtonEditLabel.vue +27 -0
  21. package/components/buttons/FSButtonEditMini.vue +27 -0
  22. package/components/buttons/FSButtonFile.vue +84 -0
  23. package/components/buttons/FSButtonFileIcon.vue +84 -0
  24. package/components/buttons/FSButtonFileLabel.vue +83 -0
  25. package/components/buttons/FSButtonFileMini.vue +83 -0
  26. package/components/buttons/FSButtonNext.vue +28 -0
  27. package/components/buttons/FSButtonNextIcon.vue +28 -0
  28. package/components/buttons/FSButtonNextLabel.vue +27 -0
  29. package/components/buttons/FSButtonNextMini.vue +27 -0
  30. package/components/buttons/FSButtonPrevious.vue +28 -0
  31. package/components/buttons/FSButtonPreviousIcon.vue +28 -0
  32. package/components/buttons/FSButtonPreviousLabel.vue +27 -0
  33. package/components/buttons/FSButtonPreviousMini.vue +27 -0
  34. package/components/buttons/FSButtonRedo.vue +28 -0
  35. package/components/buttons/FSButtonRedoIcon.vue +28 -0
  36. package/components/buttons/FSButtonRedoLabel.vue +27 -0
  37. package/components/buttons/FSButtonRedoMini.vue +27 -0
  38. package/components/buttons/FSButtonRemove.vue +28 -0
  39. package/components/buttons/FSButtonRemoveIcon.vue +28 -0
  40. package/components/buttons/FSButtonRemoveLabel.vue +27 -0
  41. package/components/buttons/FSButtonRemoveMini.vue +27 -0
  42. package/components/buttons/FSButtonSave.vue +28 -0
  43. package/components/buttons/FSButtonSaveIcon.vue +28 -0
  44. package/components/buttons/FSButtonSaveLabel.vue +27 -0
  45. package/components/buttons/FSButtonSaveMini.vue +27 -0
  46. package/components/buttons/FSButtonSearch.vue +28 -0
  47. package/components/buttons/FSButtonSearchIcon.vue +28 -0
  48. package/components/buttons/FSButtonSearchLabel.vue +27 -0
  49. package/components/buttons/FSButtonSearchMini.vue +27 -0
  50. package/components/buttons/FSButtonUndo.vue +28 -0
  51. package/components/buttons/FSButtonUndoIcon.vue +28 -0
  52. package/components/buttons/FSButtonUndoLabel.vue +27 -0
  53. package/components/buttons/FSButtonUndoMini.vue +27 -0
  54. package/components/buttons/FSButtonUpdate.vue +28 -0
  55. package/components/buttons/FSButtonUpdateIcon.vue +28 -0
  56. package/components/buttons/FSButtonUpdateLabel.vue +27 -0
  57. package/components/buttons/FSButtonUpdateMini.vue +27 -0
  58. package/components/buttons/FSButtonValidate.vue +28 -0
  59. package/components/buttons/FSButtonValidateIcon.vue +28 -0
  60. package/components/buttons/FSButtonValidateLabel.vue +27 -0
  61. package/components/buttons/FSButtonValidateMini.vue +27 -0
  62. package/components/fields/FSIconField.vue +18 -5
  63. package/components/lists/FSDataTableUI.vue +2 -0
  64. package/package.json +4 -4
  65. package/styles/components/fs_button.scss +0 -28
  66. package/styles/components/fs_clickable.scss +26 -0
  67. package/styles/components/fs_data_table.scss +2 -2
  68. package/styles/components/index.scss +1 -0
  69. package/styles/globals/overrides.scss +3 -2
  70. package/utils/css.ts +16 -2
  71. package/components/FSFileButton.vue +0 -246
@@ -0,0 +1,28 @@
1
+ <template>
2
+ <FSButton
3
+ icon="mdi-magnify"
4
+ variant="icon"
5
+ :color="ColorEnum.Primary"
6
+ v-bind="$attrs"
7
+ />
8
+ </template>
9
+
10
+ <script lang="ts">
11
+ import { defineComponent } from "vue";
12
+
13
+ import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
14
+
15
+ import FSButton from "../FSButton.vue";
16
+
17
+ export default defineComponent({
18
+ name: "FSButtonSearchIcon",
19
+ components: {
20
+ FSButton
21
+ },
22
+ setup() {
23
+ return {
24
+ ColorEnum
25
+ }
26
+ }
27
+ });
28
+ </script>
@@ -0,0 +1,27 @@
1
+ <template>
2
+ <FSButton
3
+ :label="$tr('ui.button.search', 'Search')"
4
+ :color="ColorEnum.Primary"
5
+ v-bind="$attrs"
6
+ />
7
+ </template>
8
+
9
+ <script lang="ts">
10
+ import { defineComponent } from "vue";
11
+
12
+ import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
13
+
14
+ import FSButton from "../FSButton.vue";
15
+
16
+ export default defineComponent({
17
+ name: "FSButtonSearchLabel",
18
+ components: {
19
+ FSButton
20
+ },
21
+ setup() {
22
+ return {
23
+ ColorEnum
24
+ }
25
+ }
26
+ });
27
+ </script>
@@ -0,0 +1,27 @@
1
+ <template>
2
+ <FSButton
3
+ prependIcon="mdi-magnify"
4
+ :color="ColorEnum.Primary"
5
+ v-bind="$attrs"
6
+ />
7
+ </template>
8
+
9
+ <script lang="ts">
10
+ import { defineComponent } from "vue";
11
+
12
+ import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
13
+
14
+ import FSButton from "../FSButton.vue";
15
+
16
+ export default defineComponent({
17
+ name: "FSButtonSearchMini",
18
+ components: {
19
+ FSButton
20
+ },
21
+ setup() {
22
+ return {
23
+ ColorEnum
24
+ }
25
+ }
26
+ });
27
+ </script>
@@ -0,0 +1,28 @@
1
+ <template>
2
+ <FSButton
3
+ prependIcon="mdi-undo-variant"
4
+ :label="$tr('ui.button.undo', 'Undo')"
5
+ :color="ColorEnum.Light"
6
+ v-bind="$attrs"
7
+ />
8
+ </template>
9
+
10
+ <script lang="ts">
11
+ import { defineComponent } from "vue";
12
+
13
+ import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
14
+
15
+ import FSButton from "../FSButton.vue";
16
+
17
+ export default defineComponent({
18
+ name: "FSButtonUndo",
19
+ components: {
20
+ FSButton
21
+ },
22
+ setup() {
23
+ return {
24
+ ColorEnum
25
+ }
26
+ }
27
+ });
28
+ </script>
@@ -0,0 +1,28 @@
1
+ <template>
2
+ <FSButton
3
+ icon="mdi-undo-variant"
4
+ variant="icon"
5
+ :color="ColorEnum.Light"
6
+ v-bind="$attrs"
7
+ />
8
+ </template>
9
+
10
+ <script lang="ts">
11
+ import { defineComponent } from "vue";
12
+
13
+ import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
14
+
15
+ import FSButton from "../FSButton.vue";
16
+
17
+ export default defineComponent({
18
+ name: "FSButtonUndoIcon",
19
+ components: {
20
+ FSButton
21
+ },
22
+ setup() {
23
+ return {
24
+ ColorEnum
25
+ }
26
+ }
27
+ });
28
+ </script>
@@ -0,0 +1,27 @@
1
+ <template>
2
+ <FSButton
3
+ :label="$tr('ui.button.undo', 'Undo')"
4
+ :color="ColorEnum.Light"
5
+ v-bind="$attrs"
6
+ />
7
+ </template>
8
+
9
+ <script lang="ts">
10
+ import { defineComponent } from "vue";
11
+
12
+ import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
13
+
14
+ import FSButton from "../FSButton.vue";
15
+
16
+ export default defineComponent({
17
+ name: "FSButtonUndo",
18
+ components: {
19
+ FSButton
20
+ },
21
+ setup() {
22
+ return {
23
+ ColorEnum
24
+ }
25
+ }
26
+ });
27
+ </script>
@@ -0,0 +1,27 @@
1
+ <template>
2
+ <FSButton
3
+ prependIcon="mdi-undo-variant"
4
+ :color="ColorEnum.Light"
5
+ v-bind="$attrs"
6
+ />
7
+ </template>
8
+
9
+ <script lang="ts">
10
+ import { defineComponent } from "vue";
11
+
12
+ import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
13
+
14
+ import FSButton from "../FSButton.vue";
15
+
16
+ export default defineComponent({
17
+ name: "FSButtonUndoMini",
18
+ components: {
19
+ FSButton
20
+ },
21
+ setup() {
22
+ return {
23
+ ColorEnum
24
+ }
25
+ }
26
+ });
27
+ </script>
@@ -0,0 +1,28 @@
1
+ <template>
2
+ <FSButton
3
+ prependIcon="mdi-pencil-outline"
4
+ :label="$tr('ui.button.update', 'Update')"
5
+ :color="ColorEnum.Primary"
6
+ v-bind="$attrs"
7
+ />
8
+ </template>
9
+
10
+ <script lang="ts">
11
+ import { defineComponent } from "vue";
12
+
13
+ import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
14
+
15
+ import FSButton from "../FSButton.vue";
16
+
17
+ export default defineComponent({
18
+ name: "FSButtonUpdate",
19
+ components: {
20
+ FSButton
21
+ },
22
+ setup() {
23
+ return {
24
+ ColorEnum
25
+ }
26
+ }
27
+ });
28
+ </script>
@@ -0,0 +1,28 @@
1
+ <template>
2
+ <FSButton
3
+ icon="mdi-pencil-outline"
4
+ variant="icon"
5
+ :color="ColorEnum.Primary"
6
+ v-bind="$attrs"
7
+ />
8
+ </template>
9
+
10
+ <script lang="ts">
11
+ import { defineComponent } from "vue";
12
+
13
+ import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
14
+
15
+ import FSButton from "../FSButton.vue";
16
+
17
+ export default defineComponent({
18
+ name: "FSButtonUpdateIcon",
19
+ components: {
20
+ FSButton
21
+ },
22
+ setup() {
23
+ return {
24
+ ColorEnum
25
+ }
26
+ }
27
+ });
28
+ </script>
@@ -0,0 +1,27 @@
1
+ <template>
2
+ <FSButton
3
+ :label="$tr('ui.button.update', 'Update')"
4
+ :color="ColorEnum.Primary"
5
+ v-bind="$attrs"
6
+ />
7
+ </template>
8
+
9
+ <script lang="ts">
10
+ import { defineComponent } from "vue";
11
+
12
+ import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
13
+
14
+ import FSButton from "../FSButton.vue";
15
+
16
+ export default defineComponent({
17
+ name: "FSButtonUpdateLabel",
18
+ components: {
19
+ FSButton
20
+ },
21
+ setup() {
22
+ return {
23
+ ColorEnum
24
+ }
25
+ }
26
+ });
27
+ </script>
@@ -0,0 +1,27 @@
1
+ <template>
2
+ <FSButton
3
+ prependIcon="mdi-pencil-outline"
4
+ :color="ColorEnum.Primary"
5
+ v-bind="$attrs"
6
+ />
7
+ </template>
8
+
9
+ <script lang="ts">
10
+ import { defineComponent } from "vue";
11
+
12
+ import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
13
+
14
+ import FSButton from "../FSButton.vue";
15
+
16
+ export default defineComponent({
17
+ name: "FSButtonUpdateMini",
18
+ components: {
19
+ FSButton
20
+ },
21
+ setup() {
22
+ return {
23
+ ColorEnum
24
+ }
25
+ }
26
+ });
27
+ </script>
@@ -0,0 +1,28 @@
1
+ <template>
2
+ <FSButton
3
+ prependIcon="mdi-check"
4
+ :label="$tr('ui.button.validate', 'Validate')"
5
+ :color="ColorEnum.Primary"
6
+ v-bind="$attrs"
7
+ />
8
+ </template>
9
+
10
+ <script lang="ts">
11
+ import { defineComponent } from "vue";
12
+
13
+ import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
14
+
15
+ import FSButton from "../FSButton.vue";
16
+
17
+ export default defineComponent({
18
+ name: "FSButtonValidate",
19
+ components: {
20
+ FSButton
21
+ },
22
+ setup() {
23
+ return {
24
+ ColorEnum
25
+ }
26
+ }
27
+ });
28
+ </script>
@@ -0,0 +1,28 @@
1
+ <template>
2
+ <FSButton
3
+ icon="mdi-check"
4
+ variant="icon"
5
+ :color="ColorEnum.Primary"
6
+ v-bind="$attrs"
7
+ />
8
+ </template>
9
+
10
+ <script lang="ts">
11
+ import { defineComponent } from "vue";
12
+
13
+ import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
14
+
15
+ import FSButton from "../FSButton.vue";
16
+
17
+ export default defineComponent({
18
+ name: "FSButtonValidateIcon",
19
+ components: {
20
+ FSButton
21
+ },
22
+ setup() {
23
+ return {
24
+ ColorEnum
25
+ }
26
+ }
27
+ });
28
+ </script>
@@ -0,0 +1,27 @@
1
+ <template>
2
+ <FSButton
3
+ :label="$tr('ui.button.validate', 'Validate')"
4
+ :color="ColorEnum.Primary"
5
+ v-bind="$attrs"
6
+ />
7
+ </template>
8
+
9
+ <script lang="ts">
10
+ import { defineComponent } from "vue";
11
+
12
+ import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
13
+
14
+ import FSButton from "../FSButton.vue";
15
+
16
+ export default defineComponent({
17
+ name: "FSButtonValidateLabel",
18
+ components: {
19
+ FSButton
20
+ },
21
+ setup() {
22
+ return {
23
+ ColorEnum
24
+ }
25
+ }
26
+ });
27
+ </script>
@@ -0,0 +1,27 @@
1
+ <template>
2
+ <FSButton
3
+ prependIcon="mdi-check"
4
+ :color="ColorEnum.Primary"
5
+ v-bind="$attrs"
6
+ />
7
+ </template>
8
+
9
+ <script lang="ts">
10
+ import { defineComponent } from "vue";
11
+
12
+ import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
13
+
14
+ import FSButton from "../FSButton.vue";
15
+
16
+ export default defineComponent({
17
+ name: "FSButtonValidateMini",
18
+ components: {
19
+ FSButton
20
+ },
21
+ setup() {
22
+ return {
23
+ ColorEnum
24
+ }
25
+ }
26
+ });
27
+ </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 (!selectedIcon) {
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.18",
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.18",
14
- "@dative-gpi/foundation-shared-services": "0.0.18",
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": "adb9af6cb91acce1d7207f464a8f493f94666c4b"
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
+ }
@@ -87,11 +87,11 @@
87
87
 
88
88
  .fs-data-table-pagination {
89
89
  @include web {
90
- max-width: 200px;
90
+ max-width: 280px;
91
91
  }
92
92
 
93
93
  @include mobile {
94
- max-width: 194px;
94
+ max-width: 274px;
95
95
  }
96
96
  }
97
97
 
@@ -6,6 +6,7 @@
6
6
  @import "fs_carousel.scss";
7
7
  @import "fs_checkbox.scss";
8
8
  @import "fs_chip.scss";
9
+ @import "fs_clickable.scss";
9
10
  @import "fs_clock.scss";
10
11
  @import "fs_col.scss";
11
12
  @import "fs_color_field.scss";
@@ -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: 24px !important;
100
- width: 24px !important;
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
- export const sizeToVar = (value: string | number | null, nullValue: string = "fit-content", unit: "px" | "%" | "em"| "vw" | "vh" = "px"): string => {
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