adminforth 2.70.0-next.3 → 2.70.0-next.5

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': props.mode === 'secondary',
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>
@@ -35,7 +35,7 @@
35
35
  @click="()=>{checkboxes = []}"
36
36
  v-if="checkboxes.length"
37
37
  data-tooltip-target="tooltip-remove-all"
38
- class="flex gap-1 items-center py-1 px-3 me-2 text-sm font-medium text-lightListViewButtonText af-button-shadow
38
+ class="flex gap-1 items-center py-1 px-3 text-sm font-medium text-lightListViewButtonText af-button-shadow
39
39
  focus:outline-none bg-lightListViewButtonBackground rounded border border-lightListViewButtonBorder h-[2.125rem]
40
40
  hover:bg-lightListViewButtonBackgroundHover hover:text-lightListViewButtonTextHover focus:z-10 focus:ring-4
41
41
  focus:ring-lightListViewButtonFocusRing dark:focus:ring-darkListViewButtonFocusRing
@@ -125,7 +125,7 @@
125
125
  </RouterLink>
126
126
 
127
127
  <button
128
- class="af-filter-button flex gap-1 items-center py-1 h-[2.125rem] px-3 me-2 af-button-shadow text-sm font-medium
128
+ class="af-filter-button flex gap-1 items-center py-1 h-[2.125rem] px-3 af-button-shadow text-sm font-medium
129
129
  text-lightListViewButtonText transition-all focus:outline-none bg-lightListViewButtonBackground rounded border
130
130
  border-lightListViewButtonBorder hover:bg-lightListViewButtonBackgroundHover hover:text-lightListViewButtonTextHover
131
131
  focus:z-10 focus:ring-4 focus:ring-lightListViewButtonFocusRing dark:focus:ring-darkListViewButtonFocusRing
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adminforth",
3
- "version": "2.70.0-next.3",
3
+ "version": "2.70.0-next.5",
4
4
  "description": "OpenSource Agent-Native forth-generation admin panel",
5
5
  "keywords": [
6
6
  "adminforth",