@dative-gpi/foundation-shared-components 1.0.139-widgethiddencode → 1.0.140
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 +6 -6
- package/components/FSCheckbox.vue +4 -4
- package/components/FSChip.vue +3 -3
- package/components/FSClickable.vue +6 -6
- package/components/FSClock.vue +16 -7
- package/components/FSDialogFormBody.vue +3 -3
- package/components/FSDialogMultiFormBody.vue +3 -3
- package/components/FSDialogSubmit.vue +3 -3
- package/components/FSInstantPicker.vue +6 -3
- package/components/FSOptionGroup.vue +8 -8
- package/components/FSOptionItem.vue +4 -4
- package/components/FSPagination.vue +1 -1
- package/components/FSRadio.vue +4 -4
- package/components/FSRadioGroup.vue +3 -3
- package/components/FSSlider.vue +4 -4
- package/components/FSSwitch.vue +6 -4
- package/components/FSTag.vue +2 -2
- package/components/FSTagGroup.vue +3 -3
- package/components/FSToggleSet.vue +7 -7
- package/components/buttons/FSButtonCheckbox.vue +4 -4
- package/components/fields/FSAutocompleteField.vue +21 -15
- package/components/fields/FSBaseField.vue +3 -3
- package/components/fields/FSColorField.vue +6 -6
- package/components/fields/FSDateField.vue +8 -8
- package/components/fields/FSDateRangeField.vue +5 -5
- package/components/fields/FSDateTimeField.vue +8 -8
- package/components/fields/FSDateTimeRangeField.vue +5 -5
- package/components/fields/FSEntityFieldUI.vue +6 -6
- package/components/fields/FSGradientField.vue +5 -5
- package/components/fields/FSIconField.vue +6 -6
- package/components/fields/FSMagicConfigField.vue +5 -4
- package/components/fields/FSNumberField.vue +3 -3
- package/components/fields/FSPasswordField.vue +7 -7
- package/components/fields/FSRichTextField.vue +7 -7
- package/components/fields/FSSelectField.vue +22 -16
- package/components/fields/FSTagField.vue +9 -9
- package/components/fields/FSTermField.vue +8 -8
- package/components/fields/FSTextArea.vue +7 -7
- package/components/fields/FSTextField.vue +7 -7
- package/components/fields/FSTimeField.vue +14 -10
- package/components/fields/FSTimeRangeField.vue +7 -7
- package/components/fields/FSTimeStepField.vue +5 -5
- package/components/fields/FSTranslateField.vue +7 -7
- package/components/fields/FSTranslateRichTextField.vue +7 -7
- package/components/fields/FSTranslateTextArea.vue +7 -7
- package/components/fields/FSTreeViewField.vue +11 -11
- package/components/fields/periodicField/FSPeriodicDailyField.vue +5 -5
- package/components/fields/periodicField/FSPeriodicField.vue +7 -7
- package/components/fields/periodicField/FSPeriodicMonthlyField.vue +8 -8
- package/components/fields/periodicField/FSPeriodicWeeklyField.vue +5 -5
- package/components/fields/periodicField/FSPeriodicYearlyField.vue +6 -6
- package/components/lists/FSDataIteratorItem.vue +23 -67
- package/components/lists/FSDataTableUI.vue +24 -19
- package/components/lists/FSFilterButton.vue +3 -3
- package/components/lists/FSHeaderButton.vue +3 -3
- package/components/lists/FSHiddenButton.vue +2 -2
- package/components/lists/FSSimpleListItem.vue +1 -1
- package/components/tiles/FSChartTileUI.vue +0 -6
- package/components/tiles/FSDeviceOrganisationTileUI.vue +0 -6
- package/components/tiles/FSGroupTileUI.vue +0 -6
- package/components/tiles/FSLoadTile.vue +3 -2
- package/components/tiles/FSServiceAccountOrganisationTileUI.vue +0 -6
- package/components/tiles/FSSimpleTileUI.vue +0 -6
- package/components/tiles/FSTile.vue +20 -21
- package/components/tiles/FSUserOrganisationTileUI.vue +0 -6
- package/composables/useColors.ts +16 -7
- package/package.json +4 -4
- package/styles/components/fs_chip.scss +1 -1
- package/styles/components/fs_draggable.scss +0 -5
- package/styles/components/index.scss +0 -1
- package/styles/components/fs_data_iterator_item.scss +0 -35
|
@@ -112,7 +112,7 @@
|
|
|
112
112
|
:label="$tr('data-table.reset-filters', 'Reset')"
|
|
113
113
|
:height="['30px', '24px']"
|
|
114
114
|
:color="ColorEnum.Error"
|
|
115
|
-
:
|
|
115
|
+
:clickable="true"
|
|
116
116
|
@click="resetFilter"
|
|
117
117
|
/>
|
|
118
118
|
<FSHiddenButton
|
|
@@ -478,18 +478,20 @@
|
|
|
478
478
|
>
|
|
479
479
|
<FSDataIteratorItem
|
|
480
480
|
v-if="item.type === 'item'"
|
|
481
|
-
:
|
|
481
|
+
:leftColor="$props.rowColor ? $props.rowColor(item.raw) : null"
|
|
482
482
|
:headers="innerHeaders.filter(h => !$props.sneakyHeaders.includes(h.value))"
|
|
483
|
-
:
|
|
484
|
-
:
|
|
485
|
-
:
|
|
486
|
-
:
|
|
483
|
+
:selectable="$props.showSelect"
|
|
484
|
+
:singleSelect="$props.singleSelect"
|
|
485
|
+
:to="$props.itemTo"
|
|
486
|
+
:bottomColor="$props.color"
|
|
487
487
|
:item="item.raw"
|
|
488
488
|
:key="index"
|
|
489
|
-
:modelValue="$props.modelValue
|
|
490
|
-
@update:modelValue="toggleSelect"
|
|
491
|
-
|
|
492
|
-
|
|
489
|
+
:modelValue="$props.modelValue?.includes(item.raw[$props.itemValue])"
|
|
490
|
+
@update:modelValue="toggleSelect(item.raw)"
|
|
491
|
+
v-bind="onClickLibrary.clickable ? {
|
|
492
|
+
onClick: (event) => onClickLibrary.mobile(event, item),
|
|
493
|
+
onAuxclick: (event) => onClickLibrary.mobile(event, item)
|
|
494
|
+
} : {}"
|
|
493
495
|
>
|
|
494
496
|
<template
|
|
495
497
|
#item.top="props"
|
|
@@ -649,18 +651,20 @@
|
|
|
649
651
|
v-bind="{ index, item: item.raw, toggleSelect }"
|
|
650
652
|
>
|
|
651
653
|
<FSDataIteratorItem
|
|
652
|
-
:
|
|
654
|
+
:leftColor="$props.rowColor ? $props.rowColor(item.raw) : null"
|
|
653
655
|
:headers="innerHeaders.filter(h => !$props.sneakyHeaders.includes(h.value))"
|
|
654
|
-
:
|
|
655
|
-
:
|
|
656
|
-
:
|
|
657
|
-
:
|
|
656
|
+
:selectable="$props.showSelect"
|
|
657
|
+
:singleSelect="$props.singleSelect"
|
|
658
|
+
:to="$props.itemTo"
|
|
659
|
+
:bottomColor="$props.color"
|
|
658
660
|
:item="item.raw"
|
|
659
661
|
:key="index"
|
|
660
|
-
:modelValue="$props.modelValue
|
|
661
|
-
@update:modelValue="toggleSelect"
|
|
662
|
-
|
|
663
|
-
|
|
662
|
+
:modelValue="$props.modelValue?.includes(item.raw[$props.itemValue])"
|
|
663
|
+
@update:modelValue="toggleSelect(item.raw)"
|
|
664
|
+
v-bind="onClickLibrary.clickable ? {
|
|
665
|
+
onClick: (event) => onClickLibrary.mobile(event, item),
|
|
666
|
+
onAuxclick: (event) => onClickLibrary.mobile(event, item)
|
|
667
|
+
} : {}"
|
|
664
668
|
>
|
|
665
669
|
<template
|
|
666
670
|
#item.top="props"
|
|
@@ -1126,6 +1130,7 @@ export default defineComponent({
|
|
|
1126
1130
|
});
|
|
1127
1131
|
|
|
1128
1132
|
const onClickLibrary = computed((): { [key: string]: Function | boolean } => {
|
|
1133
|
+
console.log(props["onClick:row"]);
|
|
1129
1134
|
if (props["onClick:row"] || props.itemTo) {
|
|
1130
1135
|
return {
|
|
1131
1136
|
clickable: true,
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
variant="standard"
|
|
13
13
|
:height="['30px', '24px']"
|
|
14
14
|
:color="ColorEnum.Dark"
|
|
15
|
-
:
|
|
15
|
+
:clickable="true"
|
|
16
16
|
:label="label"
|
|
17
17
|
v-bind="props"
|
|
18
18
|
/>
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
:height="['30px', '24px']"
|
|
41
41
|
:variant="getAllVariant()"
|
|
42
42
|
:color="$props.color"
|
|
43
|
-
:
|
|
43
|
+
:clickable="true"
|
|
44
44
|
@click="onToggleAll"
|
|
45
45
|
/>
|
|
46
46
|
<FSDivider />
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
:height="['30px', '24px']"
|
|
64
64
|
:color="$props.color"
|
|
65
65
|
:label="filter.text"
|
|
66
|
-
:
|
|
66
|
+
:clickable="true"
|
|
67
67
|
:key="index"
|
|
68
68
|
@click="() => onToggle(filter)"
|
|
69
69
|
>
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
variant="borderless"
|
|
36
36
|
:label="$tr('data-table.hide-column', 'Hide column')"
|
|
37
37
|
:height="[30, 24]"
|
|
38
|
-
:
|
|
38
|
+
:clickable="true"
|
|
39
39
|
@click="$emit('update:hide')"
|
|
40
40
|
/>
|
|
41
41
|
<FSChip
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
prependIcon="mdi-chevron-left"
|
|
46
46
|
:label="$tr('data-table.move-left', 'Move to the left')"
|
|
47
47
|
:height="[30, 24]"
|
|
48
|
-
:
|
|
48
|
+
:clickable="true"
|
|
49
49
|
@click="$emit('update:left')"
|
|
50
50
|
/>
|
|
51
51
|
<FSChip
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
prependIcon="mdi-chevron-right"
|
|
56
56
|
:label="$tr('data-table.move-right', 'Move to the right')"
|
|
57
57
|
:height="[30, 24]"
|
|
58
|
-
:
|
|
58
|
+
:clickable="true"
|
|
59
59
|
@click="$emit('update:right')"
|
|
60
60
|
/>
|
|
61
61
|
</FSCol>
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
prependIcon="mdi-eye-off-outline"
|
|
11
11
|
:height="[30, 24]"
|
|
12
12
|
:color="ColorEnum.Light"
|
|
13
|
-
:
|
|
13
|
+
:clickable="true"
|
|
14
14
|
:label="$tr('data-table.hidden-columns', '{0} hidden column(s)', $props.headers.length.toString())"
|
|
15
15
|
v-bind="props"
|
|
16
16
|
/>
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
:height="['30px', '24px']"
|
|
47
47
|
:color="$props.color"
|
|
48
48
|
:label="header.text"
|
|
49
|
-
:
|
|
49
|
+
:clickable="true"
|
|
50
50
|
:key="index"
|
|
51
51
|
@click="$emit('update:show', header)"
|
|
52
52
|
>
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
<FSTile
|
|
3
3
|
:width="['275px','336px']"
|
|
4
4
|
:height="['124px','156px']"
|
|
5
|
-
:editable="$props.editable"
|
|
6
5
|
borderRadius="8px"
|
|
7
6
|
v-bind="$attrs"
|
|
8
7
|
>
|
|
@@ -100,11 +99,6 @@ export default defineComponent({
|
|
|
100
99
|
type: Number as PropType<ChartType>,
|
|
101
100
|
required: false,
|
|
102
101
|
default: ChartType.None
|
|
103
|
-
},
|
|
104
|
-
editable: {
|
|
105
|
-
type: Boolean,
|
|
106
|
-
required: false,
|
|
107
|
-
default: true
|
|
108
102
|
}
|
|
109
103
|
},
|
|
110
104
|
setup() {
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
<FSTile
|
|
3
3
|
:activeColor="ColorEnum.Primary"
|
|
4
4
|
:bottomColor="ColorEnum.Primary"
|
|
5
|
-
:editable="$props.editable"
|
|
6
5
|
:width="$props.width"
|
|
7
6
|
:modelValue="$props.modelValue"
|
|
8
7
|
v-bind="$attrs"
|
|
@@ -147,11 +146,6 @@ export default defineComponent({
|
|
|
147
146
|
type: Boolean,
|
|
148
147
|
required: false,
|
|
149
148
|
default: false
|
|
150
|
-
},
|
|
151
|
-
editable: {
|
|
152
|
-
type: Boolean,
|
|
153
|
-
required: false,
|
|
154
|
-
default: true
|
|
155
149
|
}
|
|
156
150
|
},
|
|
157
151
|
setup(props) {
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
<FSTile
|
|
3
3
|
:activeColor="ColorEnum.Primary"
|
|
4
4
|
:bottomColor="ColorEnum.Error"
|
|
5
|
-
:editable="$props.editable"
|
|
6
5
|
:width="$props.width"
|
|
7
6
|
:modelValue="$props.modelValue"
|
|
8
7
|
v-bind="$attrs"
|
|
@@ -169,11 +168,6 @@ export default defineComponent({
|
|
|
169
168
|
required: false,
|
|
170
169
|
default: false
|
|
171
170
|
},
|
|
172
|
-
editable: {
|
|
173
|
-
type: Boolean,
|
|
174
|
-
required: false,
|
|
175
|
-
default: true
|
|
176
|
-
},
|
|
177
171
|
width: {
|
|
178
172
|
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
179
173
|
required: false,
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
/>
|
|
41
41
|
</FSRow>
|
|
42
42
|
<FSCard
|
|
43
|
-
v-if="$props.
|
|
43
|
+
v-if="$props.selectable"
|
|
44
44
|
class="fs-tile-checkbox"
|
|
45
45
|
:height="['40px', '32px']"
|
|
46
46
|
:width="['40px', '32px']"
|
|
@@ -48,6 +48,7 @@
|
|
|
48
48
|
>
|
|
49
49
|
<FSCheckbox
|
|
50
50
|
:modelValue="$props.modelValue"
|
|
51
|
+
:disabled="true"
|
|
51
52
|
@update:modelValue="() => $emit('update:modelValue', !$props.modelValue)"
|
|
52
53
|
/>
|
|
53
54
|
</FSCard>
|
|
@@ -81,7 +82,7 @@ export default defineComponent({
|
|
|
81
82
|
required: false,
|
|
82
83
|
default: false
|
|
83
84
|
},
|
|
84
|
-
|
|
85
|
+
selectable: {
|
|
85
86
|
type: Boolean,
|
|
86
87
|
required: false,
|
|
87
88
|
default: false
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<FSTile
|
|
3
3
|
:activeColor="ColorEnum.Primary"
|
|
4
|
-
:editable="$props.editable"
|
|
5
4
|
:width="$props.width"
|
|
6
5
|
:modelValue="$props.modelValue"
|
|
7
6
|
v-bind="$attrs"
|
|
@@ -108,11 +107,6 @@ export default defineComponent({
|
|
|
108
107
|
type: Boolean,
|
|
109
108
|
required: false,
|
|
110
109
|
default: false
|
|
111
|
-
},
|
|
112
|
-
editable: {
|
|
113
|
-
type: Boolean,
|
|
114
|
-
required: false,
|
|
115
|
-
default: true
|
|
116
110
|
}
|
|
117
111
|
},
|
|
118
112
|
setup(props) {
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
<FSTile
|
|
3
3
|
:activeColor="$props.activeColor"
|
|
4
4
|
:bottomColor="$props.bottomColor"
|
|
5
|
-
:editable="$props.editable"
|
|
6
5
|
:width="$props.width"
|
|
7
6
|
:modelValue="$props.modelValue"
|
|
8
7
|
v-bind="$attrs"
|
|
@@ -136,11 +135,6 @@ export default defineComponent({
|
|
|
136
135
|
type: Boolean,
|
|
137
136
|
required: false,
|
|
138
137
|
default: false
|
|
139
|
-
},
|
|
140
|
-
editable: {
|
|
141
|
-
type: Boolean,
|
|
142
|
-
required: false,
|
|
143
|
-
default: true
|
|
144
138
|
}
|
|
145
139
|
},
|
|
146
140
|
setup(props) {
|
|
@@ -5,24 +5,7 @@
|
|
|
5
5
|
:width="$props.width"
|
|
6
6
|
>
|
|
7
7
|
<FSClickable
|
|
8
|
-
v-if="$props.
|
|
9
|
-
padding="12px"
|
|
10
|
-
:variant="variant"
|
|
11
|
-
:color="color"
|
|
12
|
-
:style="style"
|
|
13
|
-
:to="$props.to"
|
|
14
|
-
:href="$props.href"
|
|
15
|
-
width="100%"
|
|
16
|
-
height="100%"
|
|
17
|
-
@click="() => $emit('update:modelValue', !$props.modelValue)"
|
|
18
|
-
v-bind="$attrs"
|
|
19
|
-
>
|
|
20
|
-
<slot />
|
|
21
|
-
</FSClickable>
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
<FSClickable
|
|
25
|
-
v-else-if="$props.editable && ($props.href || $props.to || $attrs.onClick)"
|
|
8
|
+
v-if="($props.href || $props.to || $attrs.onClick)"
|
|
26
9
|
variant="background"
|
|
27
10
|
class="fs-tile"
|
|
28
11
|
padding="12px"
|
|
@@ -35,6 +18,7 @@
|
|
|
35
18
|
>
|
|
36
19
|
<slot />
|
|
37
20
|
<FSCard
|
|
21
|
+
v-if="$props.selectable"
|
|
38
22
|
class="fs-tile-checkbox"
|
|
39
23
|
:height="['40px', '32px']"
|
|
40
24
|
:width="['40px', '32px']"
|
|
@@ -46,6 +30,20 @@
|
|
|
46
30
|
/>
|
|
47
31
|
</FSCard>
|
|
48
32
|
</FSClickable>
|
|
33
|
+
|
|
34
|
+
<FSClickable
|
|
35
|
+
v-else-if="$props.selectable && $props.singleSelect"
|
|
36
|
+
padding="12px"
|
|
37
|
+
:variant="variant"
|
|
38
|
+
:color="color"
|
|
39
|
+
:style="style"
|
|
40
|
+
width="100%"
|
|
41
|
+
height="100%"
|
|
42
|
+
@click="() => $emit('update:modelValue', !$props.modelValue)"
|
|
43
|
+
v-bind="$attrs"
|
|
44
|
+
>
|
|
45
|
+
<slot />
|
|
46
|
+
</FSClickable>
|
|
49
47
|
|
|
50
48
|
<FSCard
|
|
51
49
|
v-else
|
|
@@ -59,7 +57,7 @@
|
|
|
59
57
|
>
|
|
60
58
|
<slot />
|
|
61
59
|
<FSCard
|
|
62
|
-
v-if="$props.
|
|
60
|
+
v-if="$props.selectable"
|
|
63
61
|
class="fs-tile-checkbox"
|
|
64
62
|
variant="background"
|
|
65
63
|
:height="['40px', '32px']"
|
|
@@ -72,6 +70,7 @@
|
|
|
72
70
|
/>
|
|
73
71
|
</FSCard>
|
|
74
72
|
</FSCard>
|
|
73
|
+
|
|
75
74
|
<div
|
|
76
75
|
v-if="$props.leftColor"
|
|
77
76
|
class="fs-tile-left"
|
|
@@ -134,10 +133,10 @@ export default defineComponent({
|
|
|
134
133
|
required: false,
|
|
135
134
|
default: null
|
|
136
135
|
},
|
|
137
|
-
|
|
136
|
+
selectable: {
|
|
138
137
|
type: Boolean,
|
|
139
138
|
required: false,
|
|
140
|
-
default:
|
|
139
|
+
default: true
|
|
141
140
|
},
|
|
142
141
|
singleSelect: {
|
|
143
142
|
type: Boolean,
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<FSTile
|
|
3
3
|
:activeColor="ColorEnum.Primary"
|
|
4
|
-
:editable="$props.editable"
|
|
5
4
|
:width="$props.width"
|
|
6
5
|
:modelValue="$props.modelValue"
|
|
7
6
|
v-bind="$attrs"
|
|
@@ -114,11 +113,6 @@ export default defineComponent({
|
|
|
114
113
|
type: Boolean,
|
|
115
114
|
required: false,
|
|
116
115
|
default: false
|
|
117
|
-
},
|
|
118
|
-
editable: {
|
|
119
|
-
type: Boolean,
|
|
120
|
-
required: false,
|
|
121
|
-
default: true
|
|
122
116
|
}
|
|
123
117
|
},
|
|
124
118
|
setup(props) {
|
package/composables/useColors.ts
CHANGED
|
@@ -5,6 +5,8 @@ import Color from "color";
|
|
|
5
5
|
import type { ColorBase, ColorVariations } from "@dative-gpi/foundation-shared-components/models";
|
|
6
6
|
import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
7
7
|
|
|
8
|
+
const colorsCache: Map<string, ColorVariations> = new Map();
|
|
9
|
+
|
|
8
10
|
export const useColors = () => {
|
|
9
11
|
const theme = useTheme().current.value;
|
|
10
12
|
const baseMinSaturation = 0;
|
|
@@ -40,17 +42,17 @@ export const useColors = () => {
|
|
|
40
42
|
};
|
|
41
43
|
|
|
42
44
|
const getContrast = (color: Color): Color => {
|
|
43
|
-
if(isGrayScale(color)){
|
|
45
|
+
if (isGrayScale(color)) {
|
|
44
46
|
const coeff = 4
|
|
45
47
|
return color
|
|
46
48
|
.value(color.value() < 70 ? 100 : Math.max(color.value() / coeff, 0));
|
|
47
49
|
}
|
|
48
50
|
|
|
49
|
-
if(isPastel(color)){
|
|
51
|
+
if (isPastel(color)) {
|
|
50
52
|
return color.darken(0.6);
|
|
51
53
|
}
|
|
52
54
|
|
|
53
|
-
if(color.darken(0.15).isLight()){
|
|
55
|
+
if (color.darken(0.15).isLight()) {
|
|
54
56
|
return color.darken(0.8);
|
|
55
57
|
}
|
|
56
58
|
|
|
@@ -59,7 +61,7 @@ export const useColors = () => {
|
|
|
59
61
|
|
|
60
62
|
const parseColor = (color: ColorBase): Color => {
|
|
61
63
|
const themed = (Object as any).values(ColorEnum).includes(color);
|
|
62
|
-
|
|
64
|
+
|
|
63
65
|
try {
|
|
64
66
|
return themed ? new Color(theme.colors[color as ColorEnum]) : new Color(color);
|
|
65
67
|
}
|
|
@@ -70,7 +72,7 @@ export const useColors = () => {
|
|
|
70
72
|
|
|
71
73
|
const getColors = (color: ColorBase): ColorVariations => {
|
|
72
74
|
const base = parseColor(color);
|
|
73
|
-
|
|
75
|
+
|
|
74
76
|
const light = getLight(base);
|
|
75
77
|
const soft = getSoft(base);
|
|
76
78
|
const dark = getDark(base);
|
|
@@ -88,7 +90,7 @@ export const useColors = () => {
|
|
|
88
90
|
};
|
|
89
91
|
|
|
90
92
|
const getGradients = (colors: ColorBase | ColorBase[], rotation: number = 90): ColorVariations => {
|
|
91
|
-
const variations = Array.isArray(colors) ? colors.map(
|
|
93
|
+
const variations = Array.isArray(colors) ? colors.map(getColorsCached) : [getColorsCached(colors)];
|
|
92
94
|
|
|
93
95
|
if (variations.length === 1) {
|
|
94
96
|
return variations[0];
|
|
@@ -121,9 +123,16 @@ export const useColors = () => {
|
|
|
121
123
|
return colors;
|
|
122
124
|
}
|
|
123
125
|
|
|
126
|
+
const getColorsCached = (color: ColorBase): ColorVariations => {
|
|
127
|
+
if (!colorsCache.has(color)) {
|
|
128
|
+
const variations = getColors(color);
|
|
129
|
+
colorsCache.set(color, variations);
|
|
130
|
+
}
|
|
131
|
+
return colorsCache.get(color) as ColorVariations;
|
|
132
|
+
};
|
|
124
133
|
|
|
125
134
|
return {
|
|
126
|
-
getColors,
|
|
135
|
+
getColors : getColorsCached,
|
|
127
136
|
getGradients,
|
|
128
137
|
getBasePaletteColors
|
|
129
138
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dative-gpi/foundation-shared-components",
|
|
3
3
|
"sideEffects": false,
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.140",
|
|
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": "1.0.
|
|
14
|
-
"@dative-gpi/foundation-shared-services": "1.0.
|
|
13
|
+
"@dative-gpi/foundation-shared-domain": "1.0.140",
|
|
14
|
+
"@dative-gpi/foundation-shared-services": "1.0.140"
|
|
15
15
|
},
|
|
16
16
|
"peerDependencies": {
|
|
17
17
|
"@dative-gpi/bones-ui": "^1.0.0",
|
|
@@ -35,5 +35,5 @@
|
|
|
35
35
|
"sass": "1.71.1",
|
|
36
36
|
"sass-loader": "13.3.2"
|
|
37
37
|
},
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "80839b29fa54c0fd76194393337e3104fe8e27d7"
|
|
39
39
|
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
.fs-data-iterator-item {
|
|
2
|
-
cursor: var(--fs-data-iterator-item-cursor);
|
|
3
|
-
position: relative;
|
|
4
|
-
min-height: 36px;
|
|
5
|
-
flex: 1 0 0;
|
|
6
|
-
|
|
7
|
-
& > .fs-col > .fs-row:first-of-type > :last-child {
|
|
8
|
-
padding-right: 32px;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
@include clickscreen {
|
|
12
|
-
&:hover::after {
|
|
13
|
-
content: "";
|
|
14
|
-
background-color: black;
|
|
15
|
-
pointer-events: none;
|
|
16
|
-
position: absolute;
|
|
17
|
-
opacity: 0.04;
|
|
18
|
-
height: 100%;
|
|
19
|
-
width: 100%;
|
|
20
|
-
left: 0;
|
|
21
|
-
top: 0;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.fs-data-iterator-item-checkbox {
|
|
27
|
-
justify-content: center;
|
|
28
|
-
align-items: center;
|
|
29
|
-
position: absolute;
|
|
30
|
-
border-radius: 4px;
|
|
31
|
-
height: 32px;
|
|
32
|
-
width: 32px;
|
|
33
|
-
right: 1px;
|
|
34
|
-
top: 1px;
|
|
35
|
-
}
|