adminforth 2.70.0-next.4 → 2.70.0-next.6
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.
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
:class="{
|
|
8
8
|
'cursor-default opacity-50 pointer-events-none': props.disabled,
|
|
9
9
|
'active brightness-200 hover:brightness-150' : props.active,
|
|
10
|
-
'text-lightSecondaryContrast/70 bg-lightSecondary border-lightSecondaryContrast/30 dark:bg-darkSecondary hover:bg-lightSecondary/60 hover:border-lightSecondaryContrast/60 focus:ring-lightSecondary dark:focus:ring-darkSecondary/40 dark:text-darkSecondaryContrast dark:border-darkSecondaryContrast/40 dark:hover:bg-darkSecondary/60 dark:hover:border-white/60':
|
|
10
|
+
'text-lightSecondaryContrast/70 bg-lightSecondary border-lightSecondaryContrast/30 dark:bg-darkSecondary hover:bg-lightSecondary/60 hover:border-lightSecondaryContrast/60 focus:ring-lightSecondary dark:focus:ring-darkSecondary/40 dark:text-darkSecondaryContrast dark:border-darkSecondaryContrast/40 dark:hover:bg-darkSecondary/60 dark:hover:border-white/60': currentVariant === 'secondary',
|
|
11
11
|
}"
|
|
12
12
|
>
|
|
13
13
|
<Spinner v-if="props.loader" class="w-4 h-4 text-lightButtonsText dark:text-darkButtonsText fill-lightButtonsBackground dark:fill-darkPrimary" />
|
|
@@ -17,17 +17,22 @@
|
|
|
17
17
|
|
|
18
18
|
<script setup lang="ts">
|
|
19
19
|
import { Spinner } from '@/afcl';
|
|
20
|
+
import { computed } from 'vue';
|
|
20
21
|
|
|
21
22
|
const props = withDefaults(defineProps<{
|
|
22
23
|
loader?: boolean;
|
|
23
24
|
disabled?: boolean;
|
|
24
25
|
active?: boolean;
|
|
26
|
+
variant?: 'primary' | 'secondary';
|
|
27
|
+
/** @deprecated use variant instead of mode */
|
|
25
28
|
mode?: 'primary' | 'secondary';
|
|
26
29
|
}>(), {
|
|
27
30
|
loader: false,
|
|
28
31
|
disabled: false,
|
|
29
32
|
active: false,
|
|
30
|
-
mode: 'primary'
|
|
31
33
|
});
|
|
32
34
|
|
|
35
|
+
// mode is deprecated, but we still want to support it for backward compatibility,
|
|
36
|
+
// so we check both variant and mode props
|
|
37
|
+
const currentVariant = computed(() => props.variant ?? props.mode ?? 'primary');
|
|
33
38
|
</script>
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
class="border border-gray-300 dark:border-gray-700 dark:border-opacity-0 border-opacity-0 hover:border-opacity-100 dark:hover:border-opacity-100 rounded-md hover:bg-gray-100 dark:hover:bg-gray-800 cursor-pointer"
|
|
6
6
|
@click="toggleMenu"
|
|
7
7
|
>
|
|
8
|
-
<IconDotsHorizontalOutline class="w-6 h-6 text-lightPrimary dark:text-darkPrimary" />
|
|
8
|
+
<IconDotsHorizontalOutline class="w-6 h-6 text-lightPrimary dark:text-darkPrimary dark:brightness-150" />
|
|
9
9
|
</div>
|
|
10
10
|
<teleport to="body">
|
|
11
11
|
<div
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
<component
|
|
71
71
|
v-if="action.icon"
|
|
72
72
|
:is="getIcon(action.icon)"
|
|
73
|
-
class="w-5 h-5 mr-2 text-lightPrimary dark:text-darkPrimary"
|
|
73
|
+
class="w-5 h-5 mr-2 text-lightPrimary dark:text-darkPrimary dark:brightness-200"
|
|
74
74
|
/>
|
|
75
75
|
{{ $t(action.name) }}
|
|
76
76
|
</component>
|
|
@@ -216,7 +216,7 @@
|
|
|
216
216
|
<component
|
|
217
217
|
v-if="action.icon && !actionLoadingStates[`${action.id}_${row._primaryKeyValue}`]"
|
|
218
218
|
:is="getIcon(action.icon)"
|
|
219
|
-
class="w-6 h-6 text-lightPrimary dark:text-darkPrimary"
|
|
219
|
+
class="w-6 h-6 text-lightPrimary dark:text-darkPrimary dark:brightness-150"
|
|
220
220
|
/>
|
|
221
221
|
<Spinner
|
|
222
222
|
v-if="actionLoadingStates[`${action.id}_${row._primaryKeyValue}`]"
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
<component
|
|
60
60
|
v-if="action.icon && !actionLoadingStates[action.id!]"
|
|
61
61
|
:is="getIcon(action.icon)"
|
|
62
|
-
class="w-4 h-4 text-lightPrimary dark:text-darkPrimary"
|
|
62
|
+
class="w-4 h-4 text-lightPrimary dark:text-darkPrimary dark:brightness-200"
|
|
63
63
|
/>
|
|
64
64
|
<Spinner
|
|
65
65
|
v-if="actionLoadingStates[action.id!]"
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
<component
|
|
84
84
|
v-if="action.icon"
|
|
85
85
|
:is="getIcon(action.icon)"
|
|
86
|
-
class="w-4 h-4 text-lightPrimary dark:text-darkPrimary"
|
|
86
|
+
class="w-4 h-4 text-lightPrimary dark:text-darkPrimary dark:brightness-200"
|
|
87
87
|
/>
|
|
88
88
|
{{ action.label }}
|
|
89
89
|
</div>
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
<component
|
|
28
28
|
v-if="action.icon && !actionLoadingStates[action.id!]"
|
|
29
29
|
:is="getIcon(action.icon)"
|
|
30
|
-
class="w-4 h-4 me-2 text-lightPrimary dark:text-darkPrimary"
|
|
30
|
+
class="w-4 h-4 me-2 text-lightPrimary dark:text-darkPrimary dark:brightness-200"
|
|
31
31
|
/>
|
|
32
32
|
<Spinner
|
|
33
33
|
v-if="actionLoadingStates[action.id!]"
|