@dative-gpi/foundation-shared-components 0.0.215 → 0.0.216

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.
@@ -11,8 +11,7 @@
11
11
  </template>
12
12
 
13
13
  <script lang="ts">
14
- import type { PropType} from "vue";
15
- import { computed, defineComponent, onMounted, onUnmounted, ref, watch } from "vue";
14
+ import { computed, defineComponent, onMounted, onUnmounted, type PropType, ref, watch } from "vue";
16
15
 
17
16
  import { useBreakpoints, useColors, useDebounce } from "@dative-gpi/foundation-shared-components/composables";
18
17
  import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
@@ -14,9 +14,10 @@
14
14
  >
15
15
  <FSOptionItem
16
16
  v-for="(item, index) in props.values"
17
+ :padding="props.optionPadding"
18
+ :editable="props.editable"
17
19
  :prependIcon="item.prependIcon"
18
20
  :appendIcon="item.appendIcon"
19
- :editable="props.editable"
20
21
  :variant="getVariant(item)"
21
22
  :color="getColor(item)"
22
23
  :class="getClass(item)"
@@ -59,9 +60,10 @@
59
60
  >
60
61
  <FSOptionItem
61
62
  v-for="(item, index) in props.values"
63
+ :padding="props.optionPadding"
64
+ :editable="props.editable"
62
65
  :prependIcon="item.prependIcon"
63
66
  :appendIcon="item.appendIcon"
64
- :editable="props.editable"
65
67
  :variant="getVariant(item)"
66
68
  :color="getColor(item)"
67
69
  :class="getClass(item)"
@@ -92,14 +94,11 @@
92
94
  </template>
93
95
 
94
96
  <script lang="ts">
95
- import type { PropType } from "vue";
96
- import { computed, defineComponent } from "vue";
97
+ import { computed, defineComponent, type PropType } from "vue";
97
98
 
98
- import type { ColorBase} from "@dative-gpi/foundation-shared-components/models";
99
- import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
99
+ import { type ColorBase, ColorEnum, type FSToggle } from "@dative-gpi/foundation-shared-components/models";
100
100
  import { useColors } from "@dative-gpi/foundation-shared-components/composables";
101
101
  import { sizeToVar } from "@dative-gpi/foundation-shared-components/utils";
102
- import type { FSToggle } from "@dative-gpi/foundation-shared-components/models";
103
102
 
104
103
  import FSOptionItem from "./FSOptionItem.vue";
105
104
  import FSSlideGroup from "./FSSlideGroup.vue";
@@ -178,6 +177,11 @@ export default defineComponent({
178
177
  required: false,
179
178
  default: "3px"
180
179
  },
180
+ optionPadding: {
181
+ type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
182
+ required: false,
183
+ default: "4px"
184
+ },
181
185
  gap: {
182
186
  type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
183
187
  required: false,
@@ -1,13 +1,12 @@
1
1
  <template>
2
2
  <FSClickable
3
- padding="4px"
4
3
  :editable="$props.editable"
5
4
  :height="['32px', '28px']"
5
+ :padding="$props.padding"
6
6
  :variant="$props.variant"
7
7
  :color="$props.color"
8
8
  :load="$props.load"
9
9
  :border="false"
10
- :width="width"
11
10
  @click.stop="onClick"
12
11
  v-bind="$attrs"
13
12
  >
@@ -52,12 +51,9 @@
52
51
  </template>
53
52
 
54
53
  <script lang="ts">
55
- import type { PropType } from "vue";
56
- import { computed, defineComponent } from "vue";
54
+ import { computed, defineComponent, type PropType } from "vue";
57
55
 
58
- import type { ColorBase} from "@dative-gpi/foundation-shared-components/models";
59
- import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
60
- import { sizeToVar, varToSize } from "@dative-gpi/foundation-shared-components/utils";
56
+ import { type ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
61
57
  import { useColors } from "@dative-gpi/foundation-shared-components/composables";
62
58
 
63
59
  import FSClickable from "./FSClickable.vue";
@@ -99,16 +95,16 @@ export default defineComponent({
99
95
  required: false,
100
96
  default: "standard"
101
97
  },
102
- ItemWidth: {
103
- type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
104
- required: false,
105
- default: () => ["32px","28px"]
106
- },
107
98
  color: {
108
99
  type: String as PropType<ColorBase>,
109
100
  required: false,
110
101
  default: ColorEnum.Primary
111
102
  },
103
+ padding: {
104
+ type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
105
+ required: false,
106
+ default: "4px"
107
+ },
112
108
  load: {
113
109
  type: Boolean,
114
110
  required: false,
@@ -126,13 +122,6 @@ export default defineComponent({
126
122
 
127
123
  const colors = computed(() => getColors(props.color));
128
124
 
129
- const width = computed((): string => {
130
- if (props.label) {
131
- return "fit-content";
132
- }
133
- return sizeToVar(varToSize(props.ItemWidth));
134
- });
135
-
136
125
  const onClick = (event: MouseEvent) => {
137
126
  if (props.editable && !props.load) {
138
127
  emit("click", event);
@@ -141,7 +130,6 @@ export default defineComponent({
141
130
 
142
131
  return {
143
132
  colors,
144
- width,
145
133
  onClick
146
134
  };
147
135
  }
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.215",
4
+ "version": "0.0.216",
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.215",
14
- "@dative-gpi/foundation-shared-services": "0.0.215"
13
+ "@dative-gpi/foundation-shared-domain": "0.0.216",
14
+ "@dative-gpi/foundation-shared-services": "0.0.216"
15
15
  },
16
16
  "peerDependencies": {
17
17
  "@dative-gpi/bones-ui": "^0.0.75",
@@ -35,5 +35,5 @@
35
35
  "sass": "1.71.1",
36
36
  "sass-loader": "13.3.2"
37
37
  },
38
- "gitHead": "0d0aafb99e7a818b3606c3ac8bea917213e389ad"
38
+ "gitHead": "f4cd126d13779ae55d565f2b11efd30f338757f3"
39
39
  }