@dative-gpi/foundation-shared-components 0.0.86 → 0.0.88
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.
|
@@ -160,6 +160,11 @@ export default defineComponent({
|
|
|
160
160
|
required: false,
|
|
161
161
|
default: ColorEnum.Primary
|
|
162
162
|
},
|
|
163
|
+
singleColor: {
|
|
164
|
+
type: Boolean,
|
|
165
|
+
required: false,
|
|
166
|
+
default: false
|
|
167
|
+
},
|
|
163
168
|
padding: {
|
|
164
169
|
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
165
170
|
required: false,
|
|
@@ -168,7 +173,7 @@ export default defineComponent({
|
|
|
168
173
|
gap: {
|
|
169
174
|
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
170
175
|
required: false,
|
|
171
|
-
default: "
|
|
176
|
+
default: "8px"
|
|
172
177
|
},
|
|
173
178
|
multiple: {
|
|
174
179
|
type: Boolean,
|
|
@@ -193,6 +198,8 @@ export default defineComponent({
|
|
|
193
198
|
|
|
194
199
|
const lights = getColors(ColorEnum.Light);
|
|
195
200
|
|
|
201
|
+
const colors = getColors(props.optionColor);
|
|
202
|
+
|
|
196
203
|
const firstChild = getFirstChild("item");
|
|
197
204
|
|
|
198
205
|
const style = computed((): { [key: string] : string | undefined } => {
|
|
@@ -234,12 +241,12 @@ export default defineComponent({
|
|
|
234
241
|
|
|
235
242
|
const getColor = (value: FSToggle): ColorBase => {
|
|
236
243
|
if (Array.isArray(props.modelValue) && props.modelValue.some(v => v === value.id)) {
|
|
237
|
-
return props.activeColor;
|
|
244
|
+
return props.singleColor ? colors.dark : props.activeColor;
|
|
238
245
|
}
|
|
239
246
|
if (!Array.isArray(props.modelValue) && props.modelValue === value.id) {
|
|
240
|
-
return props.activeColor;
|
|
247
|
+
return props.singleColor ? colors.dark : props.activeColor;
|
|
241
248
|
}
|
|
242
|
-
return props.optionColor;
|
|
249
|
+
return props.singleColor ? colors.base : props.optionColor;
|
|
243
250
|
};
|
|
244
251
|
|
|
245
252
|
const getClass = (value: FSToggle): string[] | string => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<FSClickable
|
|
3
|
-
padding="
|
|
3
|
+
padding="4px"
|
|
4
4
|
:editable="$props.editable"
|
|
5
5
|
:height="['32px', '28px']"
|
|
6
6
|
:variant="$props.variant"
|
|
@@ -46,6 +46,7 @@
|
|
|
46
46
|
import { computed, defineComponent, PropType } from "vue";
|
|
47
47
|
|
|
48
48
|
import { ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
49
|
+
import { sizeToVar, varToSize } from "@dative-gpi/foundation-shared-components/utils";
|
|
49
50
|
import { useColors } from "@dative-gpi/foundation-shared-components/composables";
|
|
50
51
|
|
|
51
52
|
import FSClickable from "./FSClickable.vue";
|
|
@@ -87,6 +88,11 @@ export default defineComponent({
|
|
|
87
88
|
required: false,
|
|
88
89
|
default: "full"
|
|
89
90
|
},
|
|
91
|
+
ItemWidth: {
|
|
92
|
+
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
93
|
+
required: false,
|
|
94
|
+
default: ["32px","28px"]
|
|
95
|
+
},
|
|
90
96
|
color: {
|
|
91
97
|
type: String as PropType<ColorBase>,
|
|
92
98
|
required: false,
|
|
@@ -113,7 +119,7 @@ export default defineComponent({
|
|
|
113
119
|
if (props.label) {
|
|
114
120
|
return "fit-content";
|
|
115
121
|
}
|
|
116
|
-
return
|
|
122
|
+
return sizeToVar(varToSize(props.ItemWidth));
|
|
117
123
|
});
|
|
118
124
|
|
|
119
125
|
const onClick = (event: MouseEvent) => {
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<FSCol gap="16px">
|
|
3
|
-
<FSRow align="bottom-center"
|
|
3
|
+
<FSRow align="bottom-center"
|
|
4
|
+
:wrap="isExtraSmall ? false : true"
|
|
5
|
+
width="fill">
|
|
4
6
|
<template v-if="$props.showSearch">
|
|
5
7
|
<FSSearchField prependInnerIcon="mdi-magnify"
|
|
6
8
|
:hideHeader="true"
|
|
@@ -10,12 +12,21 @@
|
|
|
10
12
|
:variant="showFilters ? 'full' : 'standard'"
|
|
11
13
|
@click="showFilters = !showFilters" />
|
|
12
14
|
</template>
|
|
13
|
-
<slot
|
|
15
|
+
<slot v-if="!isExtraSmall"
|
|
16
|
+
name="toolbar" />
|
|
14
17
|
<v-spacer />
|
|
15
|
-
<
|
|
16
|
-
|
|
17
|
-
:
|
|
18
|
-
|
|
18
|
+
<FSRow v-if="!$props.disableTable && !$props.disableIterator"
|
|
19
|
+
align="center-right">
|
|
20
|
+
<FSOptionGroup :values="modeOptions"
|
|
21
|
+
:singleColor="true"
|
|
22
|
+
:required="true"
|
|
23
|
+
v-model="innerMode" />
|
|
24
|
+
</FSRow>
|
|
25
|
+
</FSRow>
|
|
26
|
+
<FSRow v-if="isExtraSmall && hasToolbar">
|
|
27
|
+
<FSWrapGroup>
|
|
28
|
+
<slot name="toolbar" />
|
|
29
|
+
</FSWrapGroup>
|
|
19
30
|
</FSRow>
|
|
20
31
|
<FSRow v-if="showFiltersRow">
|
|
21
32
|
<template v-if="showFilters">
|
|
@@ -602,6 +613,10 @@ export default defineComponent({
|
|
|
602
613
|
return (props.showSearch && showFilters.value && filterableHeaders.value.length > 0) || hiddenHeaders.value.length > 0;
|
|
603
614
|
});
|
|
604
615
|
|
|
616
|
+
const hasToolbar = computed((): boolean => {
|
|
617
|
+
return !!useSlots().slots["toolbar"];
|
|
618
|
+
});
|
|
619
|
+
|
|
605
620
|
const innerSlots = computed((): { [label: string]: Slot<any> } => {
|
|
606
621
|
const slots = { ...useSlots().slots };
|
|
607
622
|
delete slots["toolbar"];
|
|
@@ -1135,6 +1150,7 @@ export default defineComponent({
|
|
|
1135
1150
|
innerMode,
|
|
1136
1151
|
modeOptions,
|
|
1137
1152
|
innerPage,
|
|
1153
|
+
hasToolbar,
|
|
1138
1154
|
pageOptions,
|
|
1139
1155
|
showFilters,
|
|
1140
1156
|
showFiltersRow,
|
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.88",
|
|
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.88",
|
|
14
|
+
"@dative-gpi/foundation-shared-services": "0.0.88",
|
|
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": "b45c82081a4df225154d4deabec996a607308966"
|
|
36
36
|
}
|