adminforth 3.35.1 → 4.0.1

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.
Files changed (94) hide show
  1. package/dist/modules/codeInjector.d.ts.map +1 -1
  2. package/dist/modules/codeInjector.js +20 -3
  3. package/dist/modules/codeInjector.js.map +1 -1
  4. package/dist/modules/styleGenerator.d.ts +13 -0
  5. package/dist/modules/styleGenerator.d.ts.map +1 -1
  6. package/dist/modules/styleGenerator.js +274 -1
  7. package/dist/modules/styleGenerator.js.map +1 -1
  8. package/dist/modules/styles.d.ts +24 -0
  9. package/dist/modules/styles.d.ts.map +1 -1
  10. package/dist/modules/styles.js +452 -427
  11. package/dist/modules/styles.js.map +1 -1
  12. package/dist/modules/utils.d.ts +1 -13
  13. package/dist/modules/utils.d.ts.map +1 -1
  14. package/dist/modules/utils.js +2 -275
  15. package/dist/modules/utils.js.map +1 -1
  16. package/dist/spa/index.html +2 -2
  17. package/dist/spa/package-lock.json +1373 -1136
  18. package/dist/spa/package.json +18 -15
  19. package/dist/spa/pnpm-lock.yaml +1067 -648
  20. package/dist/spa/src/App.vue +84 -92
  21. package/dist/spa/src/afcl/AreaChart.vue +8 -24
  22. package/dist/spa/src/afcl/BarChart.vue +8 -23
  23. package/dist/spa/src/afcl/Button.vue +8 -2
  24. package/dist/spa/src/afcl/ButtonGroup.vue +9 -9
  25. package/dist/spa/src/afcl/Card.vue +40 -19
  26. package/dist/spa/src/afcl/Checkbox.vue +6 -6
  27. package/dist/spa/src/afcl/CountryFlag.vue +17 -11
  28. package/dist/spa/src/afcl/DatePicker.vue +7 -7
  29. package/dist/spa/src/afcl/Dialog.vue +8 -9
  30. package/dist/spa/src/afcl/DropdownMenu.vue +210 -0
  31. package/dist/spa/src/afcl/DropdownMenuAccordion.vue +56 -0
  32. package/dist/spa/src/afcl/DropdownMenuItem.vue +86 -0
  33. package/dist/spa/src/afcl/Dropzone.vue +10 -26
  34. package/dist/spa/src/afcl/Input.vue +4 -4
  35. package/dist/spa/src/afcl/Link.vue +1 -1
  36. package/dist/spa/src/afcl/LinkButton.vue +15 -1
  37. package/dist/spa/src/afcl/MixedChart.vue +4 -18
  38. package/dist/spa/src/afcl/Modal.vue +9 -9
  39. package/dist/spa/src/afcl/PieChart.vue +8 -29
  40. package/dist/spa/src/afcl/ProgressBar.vue +2 -2
  41. package/dist/spa/src/afcl/Select.vue +20 -20
  42. package/dist/spa/src/afcl/Skeleton.vue +1 -1
  43. package/dist/spa/src/afcl/Spinner.vue +1 -1
  44. package/dist/spa/src/afcl/Table.vue +19 -26
  45. package/dist/spa/src/afcl/Textarea.vue +1 -1
  46. package/dist/spa/src/afcl/Toggle.vue +4 -4
  47. package/dist/spa/src/afcl/Tooltip.vue +1 -1
  48. package/dist/spa/src/afcl/TreeMapChart.vue +5 -20
  49. package/dist/spa/src/afcl/VerticalTabs.vue +4 -4
  50. package/dist/spa/src/afcl/buttonStyles.ts +73 -33
  51. package/dist/spa/src/afcl/chartUtils.ts +19 -0
  52. package/dist/spa/src/afcl/classMerge.ts +11 -0
  53. package/dist/spa/src/afcl/dropdownMenuContext.ts +10 -0
  54. package/dist/spa/src/afcl/fileSize.ts +12 -0
  55. package/dist/spa/src/afcl/index.ts +3 -0
  56. package/dist/spa/src/components/AcceptModal.vue +17 -19
  57. package/dist/spa/src/components/Breadcrumbs.vue +11 -13
  58. package/dist/spa/src/components/BreadcrumbsWithButtons.vue +2 -2
  59. package/dist/spa/src/components/CallActionWrapper.vue +3 -0
  60. package/dist/spa/src/components/ColumnValueInput.vue +5 -5
  61. package/dist/spa/src/components/ColumnValueInputWrapper.vue +7 -6
  62. package/dist/spa/src/components/CustomDateRangePicker.vue +8 -8
  63. package/dist/spa/src/components/CustomRangePicker.vue +2 -2
  64. package/dist/spa/src/components/ErrorMessage.vue +3 -4
  65. package/dist/spa/src/components/Filters.vue +13 -13
  66. package/dist/spa/src/components/GroupsTable.vue +12 -12
  67. package/dist/spa/src/components/ListActionsThreeDots.vue +89 -207
  68. package/dist/spa/src/components/MenuLink.vue +23 -20
  69. package/dist/spa/src/components/RangePicker.vue +9 -10
  70. package/dist/spa/src/components/ResourceListTable.vue +68 -65
  71. package/dist/spa/src/components/ShowTable.vue +8 -8
  72. package/dist/spa/src/components/Sidebar.vue +31 -38
  73. package/dist/spa/src/components/ThreeDotsMenu.vue +88 -136
  74. package/dist/spa/src/components/Toast.vue +16 -23
  75. package/dist/spa/src/components/UserMenuSettingsButton.vue +15 -36
  76. package/dist/spa/src/components/ValueRenderer.vue +13 -8
  77. package/dist/spa/src/components/icons/IconCalendar.vue +3 -3
  78. package/dist/spa/src/components/icons/IconTime.vue +3 -3
  79. package/dist/spa/src/index.scss +6 -2
  80. package/dist/spa/src/main.ts +2 -0
  81. package/dist/spa/src/renderers/CompactField.vue +3 -3
  82. package/dist/spa/src/renderers/CompactUUID.vue +3 -3
  83. package/dist/spa/src/renderers/SensitiveBlurCell.vue +9 -9
  84. package/dist/spa/src/utils/threeDotsMenu.ts +7 -0
  85. package/dist/spa/src/utils/userMenu.ts +5 -0
  86. package/dist/spa/src/utils/utils.ts +12 -39
  87. package/dist/spa/src/views/CreateEditSkeleton.vue +3 -3
  88. package/dist/spa/src/views/CreateView.vue +5 -6
  89. package/dist/spa/src/views/EditView.vue +5 -6
  90. package/dist/spa/src/views/ListView.vue +114 -115
  91. package/dist/spa/src/views/LoginView.vue +4 -4
  92. package/dist/spa/src/views/ShowView.vue +17 -18
  93. package/dist/spa/vite.config.ts +23 -16
  94. package/package.json +1 -2
@@ -4,8 +4,9 @@
4
4
 
5
5
  <script setup lang="ts">
6
6
  import type ApexCharts from 'apexcharts';
7
- import { type ApexOptions } from 'apexcharts';
7
+ import type { ApexOptions } from 'apexcharts';
8
8
  import { ref, onUnmounted, watch, computed } from 'vue';
9
+ import { mergeChartOptions } from './chartUtils';
9
10
  type ApexChartsConstructor = new (el: Element, options: any) => ApexCharts;
10
11
 
11
12
  const props = defineProps<{
@@ -29,7 +30,7 @@ const optionsBase = {
29
30
  height: 250,
30
31
  type: 'line',
31
32
  stacked: false,
32
- fontFamily: "Inter, sans-serif",
33
+ fontFamily: "'Geist Variable', ui-sans-serif, sans-serif",
33
34
  toolbar: {
34
35
  show: false,
35
36
  }
@@ -84,22 +85,7 @@ const chartOptions = computed(() => {
84
85
  labels: props.data?.map((item) => item.x) ?? [],
85
86
  };
86
87
 
87
- function mergeOptions(options: any, newOptions: any) {
88
- if (!newOptions) {
89
- return;
90
- }
91
- for (const key in newOptions) {
92
- if (typeof newOptions[key] === 'object' && !Array.isArray(newOptions[key])) {
93
- if (!options[key]) {
94
- options[key] = {};
95
- }
96
- mergeOptions(options[key], newOptions[key]);
97
- } else {
98
- options[key] = newOptions[key];
99
- }
100
- }
101
- }
102
- mergeOptions(options, props.options);
88
+ mergeChartOptions(options, props.options);
103
89
 
104
90
  return options;
105
91
  });
@@ -10,11 +10,11 @@
10
10
  v-show="isModalOpen"
11
11
  v-if="!removeFromDom"
12
12
  @click="backdropClick"
13
- class="bg-black/50 overflow-y-auto overscroll-contain overflow-x-hidden fixed top-0 right-0 left-0 z-50 justify-center items-center w-full h-full md:inset-0 h-1rem max-h-full flex"
13
+ class="bg-zinc-900/40 dark:bg-black/60 overflow-y-auto overscroll-contain overflow-x-hidden fixed top-0 right-0 left-0 z-50 justify-center items-center w-full h-full md:inset-0 h-1rem max-h-full flex"
14
14
  :class="props.backgroundCustomClasses"
15
15
  >
16
16
  <!-- Modal content -->
17
- <div v-bind="$attrs" class="relative bg-lightDialogBackgorund rounded-lg shadow-sm dark:bg-darkDialogBackgorund mx-4 sm:mx-0">
17
+ <div v-bind="$attrs" class="relative bg-lightDialogBackgorund rounded-xl shadow-popover dark:shadow-darkPopover dark:bg-darkDialogBackgorund mx-4 sm:mx-0">
18
18
 
19
19
  <!-- Modal body -->
20
20
  <div class="text-lightDialogBodyText dark:text-darkDialogBodyText">
@@ -24,15 +24,15 @@
24
24
  <!-- Confirmation Modal -->
25
25
  <div
26
26
  v-if="showConfirmationOnClose"
27
- class="fixed inset-0 flex items-center justify-center bg-black bg-opacity-50 z-[60]"
27
+ class="fixed inset-0 flex items-center justify-center bg-zinc-900/40 dark:bg-black/60 z-[60]"
28
28
  :class="props.modalCustomClasses"
29
29
  >
30
- <div class="bg-white dark:bg-gray-800 p-6 rounded-lg shadow-lg max-w-sm w-full">
31
- <h2 class="text-lg font-semibold mb-4 text-lightDialogHeaderText dark:text-darkDialogHeaderText">{{ t('Confirm Close') }}</h2>
32
- <p class="mb-6 text-lightDialogBodyText dark:text-darkDialogBodyText">{{ props.closeConfirmationText }}</p>
33
- <div class="flex justify-end">
30
+ <div class="bg-lightDialogBackgorund dark:bg-darkDialogBackgorund p-5 rounded-xl shadow-popover dark:shadow-darkPopover max-w-sm w-full">
31
+ <h2 class="text-base font-semibold mb-2 text-lightDialogHeaderText dark:text-darkDialogHeaderText">{{ t('Confirm Close') }}</h2>
32
+ <p class="mb-5 text-sm text-lightDialogBodyText dark:text-darkDialogBodyText">{{ props.closeConfirmationText }}</p>
33
+ <div class="flex justify-end gap-2">
34
34
  <Button
35
- class="me-3 !bg-gray-50 dark:!bg-gray-700 !text-lightDialogBodyText dark:!text-darkDialogBodyText hover:!bg-gray-100 dark:hover:!bg-gray-600 !border-gray-200 dark:!border-gray-600"
35
+ variant="secondary"
36
36
  @click="showConfirmationOnClose = false"
37
37
  >
38
38
  {{ t('Cancel') }}
@@ -58,7 +58,7 @@ import Button from "./Button.vue";
58
58
  import { ref, onMounted, nextTick, onUnmounted, computed, type Ref } from 'vue';
59
59
  import { useI18n } from 'vue-i18n';
60
60
 
61
- const isModalOpen = ref(false);
61
+ const isModalOpen = defineModel<boolean>('open', { default: false });
62
62
  const { t } = useI18n();
63
63
 
64
64
  const removeFromDom = computed(() => {
@@ -4,8 +4,9 @@
4
4
 
5
5
  <script setup lang="ts">
6
6
  import type ApexCharts from 'apexcharts';
7
- import { type ApexOptions } from 'apexcharts';
7
+ import type { ApexOptions } from 'apexcharts';
8
8
  import { ref, type Ref, watch, computed, onUnmounted } from 'vue';
9
+ import { CHART_COLORS, mergeChartOptions } from './chartUtils';
9
10
  type ApexChartsConstructor = new (el: Element, options: any) => ApexCharts;
10
11
 
11
12
  const chart: Ref<HTMLDivElement | null> = ref(null);
@@ -20,11 +21,6 @@ const props = defineProps<{
20
21
  options?: ApexOptions,
21
22
  }>();
22
23
 
23
- const SUGGESTED_COLORS = [
24
- "#4E79A7", "#F28E2B", "#E15759", "#76B7B2", "#59A14F", "#EDC949", "#B07AA1", "#FF9DA6", "#9C755F", "#BAB0AC",
25
- "#2B8A86", "#CC4D58", "#F7941D", "#F9C232", "#729B33", "#497288", "#16578D", "#5F4D99", "#F9F871", "#F9F871",
26
- ];
27
-
28
24
 
29
25
  // [ "#2B8A86", "#CC4D58", "#F7941D", "#F9C232", "#729B33", "#497288", "#16578D", "#5F4D99",]
30
26
  // ["#4E79A7", "#F28E2B", "#E15759", "#76B7B2", "#59A14F"], // Professional Cool Tones
@@ -57,13 +53,13 @@ const optionsBase = {
57
53
  show: true,
58
54
  name: {
59
55
  show: true,
60
- fontFamily: "Inter, sans-serif",
56
+ fontFamily: "'Geist Variable', ui-sans-serif, sans-serif",
61
57
  offsetY: 20,
62
58
  },
63
59
  total: {
64
60
  showAlways: true,
65
61
  show: false,
66
- fontFamily: "Inter, sans-serif",
62
+ fontFamily: "'Geist Variable', ui-sans-serif, sans-serif",
67
63
  label: "",
68
64
  formatter: function (w: any) {
69
65
  const sum = w.globals.seriesTotals.reduce((a: any, b: any) => {
@@ -74,7 +70,7 @@ const optionsBase = {
74
70
  },
75
71
  value: {
76
72
  show: true,
77
- fontFamily: "Inter, sans-serif",
73
+ fontFamily: "'Geist Variable', ui-sans-serif, sans-serif",
78
74
  offsetY: -20,
79
75
  formatter: function (value: any) {
80
76
  return value + "k"
@@ -98,7 +94,7 @@ const optionsBase = {
98
94
  },
99
95
  legend: {
100
96
  position: "bottom",
101
- fontFamily: "Inter, sans-serif",
97
+ fontFamily: "'Geist Variable', ui-sans-serif, sans-serif",
102
98
  },
103
99
  yaxis: {
104
100
  labels: {
@@ -129,28 +125,11 @@ const options = computed(() => {
129
125
 
130
126
  // shade and gradient take from first series
131
127
  series: props.data?.map((item) => item.amount) ?? [],
132
- colors: props.data?.map((item, index) => item.color ?? SUGGESTED_COLORS[index]) ?? [],
128
+ colors: props.data?.map((item, index) => item.color ?? CHART_COLORS[index]) ?? [],
133
129
  labels: props.data?.map((item) => item.label) ?? [],
134
130
  };
135
131
 
136
- // for each of ...props.options merge on lowest level. so if { chart: {height : 2} }, it should not replace chart level, only height level
137
- function mergeOptions(options: any, newOptions: any) {
138
- if (!newOptions) {
139
- return;
140
- }
141
- for (const key in newOptions) {
142
- // and is not array
143
- if (typeof newOptions[key] === 'object' && !Array.isArray(newOptions[key])) {
144
- if (!options[key]) {
145
- options[key] = {};
146
- }
147
- mergeOptions(options[key], newOptions[key]);
148
- } else {
149
- options[key] = newOptions[key];
150
- }
151
- }
152
- }
153
- mergeOptions(options, props.options);
132
+ mergeChartOptions(options, props.options);
154
133
 
155
134
  return options;
156
135
  });
@@ -1,9 +1,9 @@
1
1
  <template>
2
- <div class="relative w-full bg-lightProgressBarUnfilledColor rounded-full h-2.5 dark:bg-darkProgressBarUnfilledColor" :class="props.height ? `h-${props.height}` : ''">
2
+ <div class="relative w-full bg-lightProgressBarUnfilledColor rounded-full h-1.5 dark:bg-darkProgressBarUnfilledColor" :class="props.height ? `h-${props.height}` : ''">
3
3
  <span v-if="leftLabel" class="absolute -top-6 left-0 text-sm" :class="textClass">{{ leftLabel }}</span>
4
4
  <span v-if="rightLabel" class="absolute -top-6 right-0 text-sm" :class="textClass">{{ rightLabel }}</span>
5
5
  <div
6
- class="bg-lightPrimary dark:bg-darkPrimary h-2.5 rounded-full transition-all duration-300 ease-in-out"
6
+ class="bg-lightPrimary dark:bg-darkPrimary h-1.5 rounded-full transition-all duration-300 ease-in-out"
7
7
  :class="{ 'progress-bar': showAnimation, [`h-${props.height}`]: props.height }"
8
8
  :style="{ width: `${percentage}%` }"
9
9
  ></div>
@@ -10,9 +10,9 @@
10
10
  v-model="search"
11
11
  @click="inputClick"
12
12
  @input="inputInput"
13
- class="block w-full pl-3 pr-10 py-2.5 border border-lightDropownButtonsBorder rounded-default leading-5 bg-lightDropdownButtonsBackground
13
+ class="block w-full pl-2.5 pr-9 py-1.5 border border-lightDropownButtonsBorder rounded-default leading-5 bg-lightDropdownButtonsBackground shadow-customLight hover:border-lightInputBorderHover dark:hover:border-darkInputBorderHover
14
14
  placeholder-lightDropdownButtonsPlaceholderText text-lightDropdownButtonsText text-base sm:text-sm transition duration-150 ease-in-out dark:bg-darkDropdownButtonsBackground dark:border-darkDropdownButtonsBorder dark:placeholder-darkDropdownButtonsPlaceholderText
15
- dark:text-darkDropdownButtonsText focus:ring-lightPrimary focus:border-lightPrimary dark:focus:ring-darkPrimary dark:focus:border-darkPrimary"
15
+ dark:text-darkDropdownButtonsText focus:outline-none focus:ring-[3px] focus:ring-lightInputFocusRing focus:border-lightInputFocusBorder dark:focus:ring-darkInputFocusRing dark:focus:border-darkInputFocusBorder"
16
16
  :class="[{'cursor-pointer': searchDisabled}, classesForInput]"
17
17
  :id="inputId"
18
18
  :name="inputId"
@@ -23,67 +23,67 @@
23
23
  data-bwignore
24
24
  data-form-type="other"
25
25
  :placeholder="
26
- selectedItems.length && !multiple ? '' : (showDropdown ? $t('Search') : placeholder || $t('Select...'))
26
+ selectedItems.length && !multiple ? '' : (showDropdown && !searchDisabled ? $t('Search') : placeholder || $t('Select...'))
27
27
  "
28
28
  />
29
29
 
30
- <div v-if="!multiple && selectedItems.length" class="text-lightDropdownButtonsText dark:text-darkDropdownButtonsText absolute pointer-events-none inset-y-0 left-2 flex items-center pr-2 px-1">
30
+ <div v-if="!multiple && selectedItems.length" class="text-sm text-lightDropdownButtonsText dark:text-darkDropdownButtonsText absolute pointer-events-none inset-y-0 left-1.5 flex items-center pr-2 px-1">
31
31
  <slot
32
32
  name="selected-item"
33
33
  :option="selectedItems[0]"
34
34
  ></slot>
35
- <span v-if="!$slots['selected-item']" class="text-lightDropdownButtonsText dark:text-darkDropdownButtonsText font-medium ">
35
+ <span v-if="!$slots['selected-item']" class="text-lightDropdownButtonsText dark:text-darkDropdownButtonsText">
36
36
  {{ selectedItems[0]?.label }}
37
37
  </span>
38
38
  </div>
39
39
 
40
40
  <div class="absolute inset-y-0 right-2 flex items-center pointer-events-none">
41
41
  <!-- triangle icon -->
42
- <IconCaretDownSolid class="h-4 w-4 text-lightPrimary dark:text-darkPrimary opacity-50 transition duration-150 ease-in"
42
+ <IconChevronDown class="h-4 w-4 text-lightInputIconColor dark:text-darkInputIconColor transition duration-150 ease-in"
43
43
  :class="{ 'transform rotate-180': showDropdown }"
44
44
  />
45
45
  </div>
46
46
  </div>
47
47
  <teleport to="body" v-if="(teleportToBody || teleportToTop) && showDropdown">
48
48
  <div ref="dropdownEl" :style="getDropdownPosition" :class="{'shadow-none': isTop, 'z-30': teleportToBody, 'z-[1000]': teleportToTop}"
49
- class="fixed w-full bg-lightDropdownOptionsBackground shadow-lg dark:shadow-black dark:bg-darkDropdownOptionsBackground
50
- dark:border-gray-600 rounded-default py-1 text-base ring-1 ring-black ring-opacity-5 overflow-auto focus:outline-none sm:text-sm max-h-48"
49
+ class="fixed w-full bg-lightDropdownOptionsBackground shadow-popover dark:shadow-darkPopover dark:bg-darkDropdownOptionsBackground
50
+ rounded-lg p-1 text-base overflow-auto focus:outline-none sm:text-sm max-h-60"
51
51
  @scroll="handleDropdownScroll">
52
52
  <div
53
53
  v-for="item in filteredItems"
54
54
  :key="item.value"
55
- class="px-4 py-2 cursor-pointer hover:bg-lightDropdownOptionsHoverBackground dark:hover:bg-darkDropdownOptionsHoverBackground text-lightDropdownOptionsText dark:text-darkDropdownOptionsText"
56
- :class="{ 'bg-lightDropdownPicked dark:bg-darkDropdownPicked': selectedItems.includes(item) }"
55
+ class="px-2.5 py-1.5 rounded-md cursor-pointer hover:bg-lightDropdownOptionsHoverBackground dark:hover:bg-darkDropdownOptionsHoverBackground text-lightDropdownOptionsText dark:text-darkDropdownOptionsText"
56
+ :class="{ 'bg-lightDropdownPicked dark:bg-darkDropdownPicked font-medium': selectedItems.includes(item) }"
57
57
  @click="toogleItem(item)"
58
58
  >
59
59
  <slot name="item" :option="item"></slot>
60
60
  <label v-if="!$slots.item" :for="item.value">{{ item.label }}</label>
61
61
  </div>
62
- <div v-if="!filteredItems.length" class="px-4 py-2 cursor-pointer text-lightDropdownOptionsText dark:text-darkDropdownOptionsText">
62
+ <div v-if="!filteredItems.length" class="px-2.5 py-1.5 text-lightDropdownButtonsPlaceholderText dark:text-darkDropdownButtonsPlaceholderText">
63
63
  {{ $t('No results found') }}
64
64
  </div>
65
65
 
66
- <div v-if="$slots['extra-item']" class="px-4 py-2 dark:text-gray-400">
66
+ <div v-if="$slots['extra-item']" class="px-2.5 py-1.5 text-lightDropdownOptionsText dark:text-darkDropdownOptionsText">
67
67
  <slot name="extra-item"></slot>
68
68
  </div>
69
69
  </div>
70
70
  </teleport>
71
71
 
72
72
  <div v-if="!teleportToBody && !teleportToTop && showDropdown" ref="dropdownEl" :style="dropdownStyle" :class="{'shadow-none': isTop}"
73
- class="afcl-select-content absolute z-10 mt-1 w-full bg-lightDropdownOptionsBackground shadow-lg text-lightDropdownButtonsText dark:shadow-black dark:bg-darkDropdownOptionsBackground
74
- dark:border-gray-600 rounded-default py-1 text-base ring-1 ring-black ring-opacity-5 overflow-auto focus:outline-none sm:text-sm max-h-48"
73
+ class="afcl-select-content absolute z-10 mt-1 w-full bg-lightDropdownOptionsBackground shadow-popover text-lightDropdownButtonsText dark:shadow-darkPopover dark:bg-darkDropdownOptionsBackground
74
+ rounded-lg p-1 text-base overflow-auto focus:outline-none sm:text-sm max-h-60"
75
75
  @scroll="handleDropdownScroll">
76
76
  <div
77
77
  v-for="item in filteredItems"
78
78
  :key="item.value"
79
- class="px-4 py-2 cursor-pointer text-lightDropdownOptionsText hover:bg-lightDropdownOptionsHoverBackground dark:hover:bg-darkDropdownOptionsHoverBackground dark:text-darkDropdownOptionsText"
80
- :class="{ 'bg-lightDropdownPicked dark:bg-darkDropdownPicked': selectedItems.includes(item) }"
79
+ class="px-2.5 py-1.5 rounded-md cursor-pointer text-lightDropdownOptionsText hover:bg-lightDropdownOptionsHoverBackground dark:hover:bg-darkDropdownOptionsHoverBackground dark:text-darkDropdownOptionsText"
80
+ :class="{ 'bg-lightDropdownPicked dark:bg-darkDropdownPicked font-medium': selectedItems.includes(item) }"
81
81
  @click="toogleItem(item)"
82
82
  >
83
83
  <slot name="item" :option="item"></slot>
84
84
  <label v-if="!$slots.item" :for="item.value">{{ item.label }}</label>
85
85
  </div>
86
- <div v-if="!filteredItems.length" class="px-4 py-2 cursor-pointer text-lightDropdownOptionsText dark:text-darkDropdownOptionsText">
86
+ <div v-if="!filteredItems.length" class="px-2.5 py-1.5 text-lightDropdownButtonsPlaceholderText dark:text-darkDropdownButtonsPlaceholderText">
87
87
  {{ options?.length ? $t('No results found') : $t('No items here') }}
88
88
  </div>
89
89
  <div v-if="$slots['extra-item']" class="px-4 py-2 dark:text-darkDropdownOptionsText">
@@ -98,7 +98,7 @@
98
98
  <template v-for="item in selectedItems" :key="`afcl-select-${item.value}`">
99
99
  <slot name="selected-item" :item="item"></slot>
100
100
  <div v-if="!$slots['selected-item']"
101
- class="bg-lightDropdownMultipleSelectBackground text-lightDropdownMultipleSelectText text-xs font-medium me-2 px-2.5 py-0.5 rounded dark:bg-darkDropdownMultipleSelectBackground dark:text-darkDropdownMultipleSelectText">
101
+ class="inline-flex items-center bg-lightDropdownMultipleSelectBackground text-lightDropdownMultipleSelectText text-xs font-medium me-1.5 ps-2 pe-1.5 h-[1.375rem] rounded dark:bg-darkDropdownMultipleSelectBackground dark:text-darkDropdownMultipleSelectText">
102
102
  <span>{{ item.label }}</span>
103
103
  <button
104
104
  type="button"
@@ -123,7 +123,7 @@
123
123
 
124
124
  <script setup lang="ts">
125
125
  import { ref, computed, onMounted, onUnmounted, watch, nextTick, useId,type PropType, type Ref } from 'vue';
126
- import { IconCaretDownSolid } from '@iconify-prerendered/vue-flowbite';
126
+ import { IconChevronDown } from '@iconify-prerendered/vue-lucide';
127
127
  import { useElementSize } from '@vueuse/core'
128
128
 
129
129
  type ISingleSelectModelValue = string | number | boolean | null;
@@ -131,7 +131,7 @@ type ISingleSelectModelValue = string | number | boolean | null;
131
131
  const props = defineProps({
132
132
  options: Array,
133
133
  modelValue: {
134
- type: Array as PropType<(ISingleSelectModelValue)[] | ISingleSelectModelValue>,
134
+ type: [Array, String, Number, Boolean] as PropType<(ISingleSelectModelValue)[] | ISingleSelectModelValue>,
135
135
  default: () => [],
136
136
  },
137
137
  multiple: {
@@ -17,7 +17,7 @@
17
17
  <div
18
18
  v-else-if="type === 'input'"
19
19
  role="input"
20
- :class="['animate-pulse bg-gray-100 dark:bg-gray-700 border border-gray-200 dark:border-gray-600 rounded-default', $attrs.class]"
20
+ :class="['animate-pulse bg-lightSkeletonBackgroundColor dark:bg-darkSkeletonBackgroundColor rounded-default', $attrs.class]"
21
21
  ></div>
22
22
  <div v-else role="status" class="flex items-center justify-center animate-pulse bg-lightSkeletonIconColor rounded-full dark:bg-darkSkeletonBackgroundColor">
23
23
  <span class="sr-only">Loading...</span>
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <div role="status">
3
- <svg aria-hidden="true" class="text-gray-200 animate-spin dark:text-gray-600 fill-lightPrimary dark:fill-darkPrimary" viewBox="0 0 100 101" fill="none" xmlns="http://www.w3.org/2000/svg">
3
+ <svg aria-hidden="true" class="text-lightProgressBarUnfilledColor animate-spin dark:text-darkProgressBarUnfilledColor fill-lightPrimary dark:fill-darkPrimary" viewBox="0 0 100 101" fill="none" xmlns="http://www.w3.org/2000/svg">
4
4
  <path d="M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z" fill="currentColor"/>
5
5
  <path d="M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z" fill="currentFill"/>
6
6
  </svg>
@@ -1,11 +1,11 @@
1
1
  <template>
2
- <div class="afcl-table-container relative overflow-x-auto overflow-y-auto overscroll-x-contain shadow-md rounded-lg">
3
- <table class="afcl-table w-full text-sm text-left rtl:text-right text-lightTableText dark:text-darkTableText overflow-x-auto">
4
- <thead class="afcl-table-thread z-40 text-xs text-lightTableHeadingText uppercase bg-lightTableHeadingBackground dark:bg-darkTableHeadingBackground dark:text-darkTableHeadingText" :class="makeHeaderSticky ? 'sticky top-0' : ''">
2
+ <div class="afcl-table-container relative overflow-x-auto overflow-y-auto overscroll-x-contain border border-lightTableBorder dark:border-darkTableBorder rounded-lg bg-lightTableBackground dark:bg-darkTableBackground">
3
+ <table class="afcl-table w-full text-[13px] text-left rtl:text-right text-lightTableText dark:text-darkTableText overflow-x-auto">
4
+ <thead class="afcl-table-thread z-40 text-xs font-medium text-lightTableHeadingText border-b border-lightTableBorder dark:border-darkTableBorder bg-lightTableHeadingBackground dark:bg-darkTableHeadingBackground dark:text-darkTableHeadingText" :class="makeHeaderSticky ? 'sticky top-0' : ''">
5
5
  <tr>
6
6
  <th
7
7
  scope="col"
8
- class="px-6 py-3"
8
+ class="px-4 py-2.5 font-medium"
9
9
  ref="headerRefs"
10
10
  :key="`header-${column.fieldName}`"
11
11
  v-for="column in columns"
@@ -19,13 +19,13 @@
19
19
  {{ column.label }}
20
20
  <span v-if="isColumnSortable(column)" class="text-lightTableHeadingText dark:text-darkTableHeadingText">
21
21
  <!-- Unsorted -->
22
- <svg v-if="currentSortField !== column.fieldName" class="w-3 h-3 ms-1.5 opacity-30" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="currentColor" viewBox="0 0 24 24"><path d="M8.574 11.024h6.852a2.075 2.075 0 0 0 1.847-1.086 1.9 1.9 0 0 0-.11-1.986L13.736 2.9a2.122 2.122 0 0 0-3.472 0L6.837 7.952a1.9 1.9 0 0 0-.11 1.986 2.074 2.074 0 0 0 1.847 1.086Zm6.852 1.952H8.574a2.072 2.072 0 0 0-1.847 1.087 1.9 1.9 0 0 0 .11 1.985l3.426 5.05a2.123 2.123 0 0 0 3.472 0l3.427-5.05a1.9 1.9 0 0 0 .11-1.985 2.074 2.074 0 0 0-1.846-1.087Z"/></svg>
22
+ <IconChevronsUpDown v-if="currentSortField !== column.fieldName" class="w-3.5 h-3.5 ms-1 opacity-40" aria-hidden="true" />
23
23
 
24
24
  <!-- Sorted ascending -->
25
- <svg v-else-if="currentSortDirection === 'asc'" class="w-3 h-3 ms-1.5" fill="currentColor" viewBox="0 0 24 24"><path d="M8.574 11.024h6.852a2.075 2.075 0 0 0 1.847-1.086 1.9 1.9 0 0 0-.11-1.986L13.736 2.9a2.122 2.122 0 0 0-3.472 0L6.837 7.952a1.9 1.9 0 0 0-.11 1.986 2.074 2.074 0 0 0 1.847 0z"/></svg>
25
+ <IconArrowUp v-else-if="currentSortDirection === 'asc'" class="w-3.5 h-3.5 ms-1" aria-hidden="true" />
26
26
 
27
27
  <!-- Sorted descending -->
28
- <svg v-else class="w-3 h-3 ms-1.5 rotate-180" fill="currentColor" viewBox="0 0 24 24"><path d="M8.574 11.024h6.852a2.075 2.075 0 0 0 1.847-1.086 1.9 1.9 0 0 0-.11-1.986L13.736 2.9a2.122 2.122 0 0 0-3.472 0L6.837 7.952a1.9 1.9 0 0 0-.11 1.986 2.074 2.074 0 0 0 1.847 0z"/></svg>
28
+ <IconArrowUp v-else class="w-3.5 h-3.5 ms-1 rotate-180" aria-hidden="true" />
29
29
  </span>
30
30
  </span>
31
31
  </th>
@@ -42,8 +42,8 @@
42
42
  <tr v-else-if="!isLoading && !props.isLoading && dataPage.length === 0" class="afcl-table-empty-body">
43
43
  <td :colspan="columns.length" class="px-6 py-12 text-center">
44
44
  <div class="flex flex-col items-center justify-center text-lightTableText dark:text-darkTableText">
45
- <IconTableRowOutline class="w-10 h-10 mb-4 text-gray-400 dark:text-gray-500" />
46
- <p class="text-md">{{ $t('No data available') }}</p>
45
+ <IconRows3 class="w-6 h-6 mb-3 text-lightTablePaginationText dark:text-darkTablePaginationText" />
46
+ <p class="text-sm">{{ $t('No data available') }}</p>
47
47
  </div>
48
48
  </td>
49
49
  </tr>
@@ -58,7 +58,7 @@
58
58
  }"
59
59
  @click="tableRowClick(item)"
60
60
  >
61
- <td class="px-6 py-4" :key="`cell-${index}-${column.fieldName}`"
61
+ <td class="px-4 py-3" :key="`cell-${index}-${column.fieldName}`"
62
62
  v-for="column in props.columns"
63
63
  >
64
64
  <slot v-if="$slots[`cell:${column.fieldName}`]"
@@ -94,17 +94,13 @@
94
94
  <div class="inline-flex" :class="blockPagination ? 'pointer-events-none select-none opacity-50' : ''">
95
95
  <!-- Buttons -->
96
96
  <button
97
- class="flex items-center py-1 px-3 gap-1 text-sm font-medium text-lightActivePaginationButtonText bg-lightActivePaginationButtonBackground border-r-0 rounded-s hover:opacity-90 dark:bg-darkActivePaginationButtonBackground dark:text-darkActivePaginationButtonText disabled:opacity-50"
97
+ class="flex items-center h-7 focus-visible:z-20 focus-visible:ring-[3px] focus-visible:ring-lightFocusRing dark:focus-visible:ring-darkFocusRing px-2.5 gap-1 text-sm font-medium text-lightActivePaginationButtonText focus:outline-none bg-lightActivePaginationButtonBackground border-r-0 rounded-s-default hover:opacity-90 dark:bg-darkActivePaginationButtonBackground dark:text-darkActivePaginationButtonText disabled:opacity-50"
98
98
  @click="currentPage--; pageInput = currentPage.toString();"
99
99
  :disabled="currentPage <= 1 || blockPagination">
100
- <svg class="w-3.5 h-3.5 rtl:rotate-180" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none"
101
- viewBox="0 0 14 10">
102
- <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
103
- d="M13 5H1m0 0 4 4M1 5l4-4"/>
104
- </svg>
100
+ <IconChevronLeft class="w-4 h-4 rtl:rotate-180" aria-hidden="true" />
105
101
  </button>
106
102
  <button
107
- class="flex items-center py-1 px-3 text-sm font-medium text-lightUnactivePaginationButtonText focus:outline-none bg-lightUnactivePaginationButtonBackground border-r-0 border border-lightUnactivePaginationButtonBorder hover:bg-lightUnactivePaginationButtonHoverBackground hover:text-lightUnactivePaginationButtonHoverText dark:bg-darkUnactivePaginationButtonBackground dark:text-darkUnactivePaginationButtonText dark:border-darkUnactivePaginationButtonBorder dark:hover:text-darkUnactivePaginationButtonHoverText dark:hover:bg-darkUnactivePaginationButtonHoverBackground disabled:opacity-50"
103
+ class="flex items-center h-7 focus-visible:z-20 focus-visible:ring-[3px] focus-visible:ring-lightFocusRing dark:focus-visible:ring-darkFocusRing px-3 text-sm font-medium tabular-nums text-lightUnactivePaginationButtonText focus:outline-none bg-lightUnactivePaginationButtonBackground border-r-0 border border-lightUnactivePaginationButtonBorder hover:bg-lightUnactivePaginationButtonHoverBackground hover:text-lightUnactivePaginationButtonHoverText dark:bg-darkUnactivePaginationButtonBackground dark:text-darkUnactivePaginationButtonText dark:border-darkUnactivePaginationButtonBorder dark:hover:text-darkUnactivePaginationButtonHoverText dark:hover:bg-darkUnactivePaginationButtonHoverBackground disabled:opacity-50"
108
104
  @click="switchPage(1); pageInput = currentPage.toString();"
109
105
  :disabled="currentPage <= 1 || blockPagination">
110
106
  <!-- <IconChevronDoubleLeftOutline class="w-4 h-4" /> -->
@@ -114,14 +110,14 @@
114
110
  type="text"
115
111
  v-model="pageInput"
116
112
  :style="{ width: `${Math.max(1, pageInput.length+4)}ch` }"
117
- class="min-w-10 outline-none inline-block w-auto py-1.5 px-3 text-sm text-center text-lightTablePaginationInputText border border-lightTablePaginationInputBorder bg-lightTablePaginationInputBackground dark:border-darkTablePaginationInputBorder dark:text-darkTablePaginationInputText dark:bg-darkTablePaginationInputBackground z-10"
113
+ class="min-w-10 outline-none inline-block w-auto h-7 px-3 text-sm font-medium tabular-nums text-center text-lightTablePaginationInputText border border-lightTablePaginationInputBorder bg-lightTablePaginationInputBackground dark:border-darkTablePaginationInputBorder dark:text-darkTablePaginationInputText dark:bg-darkTablePaginationInputBackground z-10"
118
114
  @keydown="onPageKeydown($event)"
119
115
  @blur="validatePageInput()"
120
116
  >
121
117
  </input>
122
118
 
123
119
  <button
124
- class="flex items-center py-1 px-3 text-sm font-medium text-lightUnactivePaginationButtonText focus:outline-none bg-lightUnactivePaginationButtonBackground border-l-0 border border-lightUnactivePaginationButtonBorder hover:bg-lightUnactivePaginationButtonHoverBackground hover:text-lightUnactivePaginationButtonHoverText dark:bg-darkUnactivePaginationButtonBackground dark:text-darkUnactivePaginationButtonText dark:border-darkUnactivePaginationButtonBorder dark:hover:text-darkUnactivePaginationButtonHoverText dark:hover:bg-darkUnactivePaginationButtonHoverBackground disabled:opacity-50"
120
+ class="flex items-center h-7 focus-visible:z-20 focus-visible:ring-[3px] focus-visible:ring-lightFocusRing dark:focus-visible:ring-darkFocusRing px-3 text-sm font-medium tabular-nums text-lightUnactivePaginationButtonText focus:outline-none bg-lightUnactivePaginationButtonBackground border-l-0 border border-lightUnactivePaginationButtonBorder hover:bg-lightUnactivePaginationButtonHoverBackground hover:text-lightUnactivePaginationButtonHoverText dark:bg-darkUnactivePaginationButtonBackground dark:text-darkUnactivePaginationButtonText dark:border-darkUnactivePaginationButtonBorder dark:hover:text-darkUnactivePaginationButtonHoverText dark:hover:bg-darkUnactivePaginationButtonHoverBackground disabled:opacity-50"
125
121
  @click="currentPage = totalPages; pageInput = currentPage.toString();"
126
122
  :disabled="currentPage >= totalPages || blockPagination"
127
123
  >
@@ -129,15 +125,11 @@
129
125
 
130
126
  </button>
131
127
  <button
132
- class="flex items-center py-1 px-3 gap-1 text-sm font-medium text-lightActivePaginationButtonText focus:outline-none bg-lightActivePaginationButtonBackground border-l-0 rounded-e hover:opacity-90 dark:bg-darkActivePaginationButtonBackground dark:text-darkActivePaginationButtonText disabled:opacity-50"
128
+ class="flex items-center h-7 focus-visible:z-20 focus-visible:ring-[3px] focus-visible:ring-lightFocusRing dark:focus-visible:ring-darkFocusRing px-2.5 gap-1 text-sm font-medium text-lightActivePaginationButtonText focus:outline-none bg-lightActivePaginationButtonBackground border-l-0 rounded-e-default hover:opacity-90 dark:bg-darkActivePaginationButtonBackground dark:text-darkActivePaginationButtonText disabled:opacity-50"
133
129
  @click="currentPage++; pageInput = currentPage.toString();"
134
130
  :disabled="currentPage >= totalPages || blockPagination"
135
131
  >
136
- <svg class="w-3.5 h-3.5 rtl:rotate-180" aria-hidden="true" xmlns="http://www.w3.org/2000/svg" fill="none"
137
- viewBox="0 0 14 10">
138
- <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
139
- d="M1 5h12m0 0L9 1m4 4L9 9"/>
140
- </svg>
132
+ <IconChevronRight class="w-4 h-4 rtl:rotate-180" aria-hidden="true" />
141
133
  </button>
142
134
  </div>
143
135
  </div>
@@ -148,7 +140,8 @@
148
140
  <script setup lang="ts">
149
141
  import { ref, computed, useTemplateRef, watch, onMounted } from 'vue';
150
142
  import SkeleteLoader from '@/components/SkeleteLoader.vue';
151
- import { IconTableRowOutline } from '@iconify-prerendered/vue-flowbite';
143
+ import Skeleton from './Skeleton.vue';
144
+ import { IconRows3, IconChevronLeft, IconChevronRight, IconChevronsUpDown, IconArrowUp } from '@iconify-prerendered/vue-lucide';
152
145
 
153
146
  defineExpose({
154
147
  refreshTable
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <textarea
3
3
  ref="input"
4
- class="afcl-textarea bg-lightInputBackground border border-lightInputBorder text-lightInputText placeholder-lightInputPlaceholderText text-sm rounded-default block w-full p-2.5 dark:bg-darkInputBackground dark:border-darkInputBorder dark:placeholder-darkInputPlaceholderText dark:text-darkInputText dark:border-darkInputBorder focus:ring-lightInputFocusRing focus:border-lightInputFocusBorder dark:focus:ring-darkInputFocusRing dark:focus:border-darkInputFocusBorder"
4
+ class="afcl-textarea bg-lightInputBackground border border-lightInputBorder text-lightInputText placeholder-lightInputPlaceholderText text-sm leading-5 rounded-default block w-full px-2.5 py-2 shadow-customLight hover:border-lightInputBorderHover dark:hover:border-darkInputBorderHover dark:bg-darkInputBackground dark:border-darkInputBorder dark:placeholder-darkInputPlaceholderText dark:text-darkInputText dark:border-darkInputBorder focus:outline-none focus:ring-[3px] focus:ring-lightInputFocusRing focus:border-lightInputFocusBorder dark:focus:ring-darkInputFocusRing dark:focus:border-darkInputFocusBorder transition-colors"
5
5
  :class="`${readonly ? 'opacity-50' : ''} ${isIos ? 'text-md' : 'text-sm'}`"
6
6
  :placeholder="placeholder"
7
7
  :value="modelValue"
@@ -7,15 +7,15 @@
7
7
  :checked="props.modelValue"
8
8
  @change="$emit('update:modelValue', ($event.target as HTMLInputElement).checked)"
9
9
  >
10
- <div class="afcl-toggle border border-lightToggleBorderUnactive relative min-w-11 min-h-6 bg-lightToggleBgUnactive peer-focus:outline-none peer-focus:ring-4
11
- peer-focus:ring-lightToggleRing dark:peer-focus:ring-darkToggleRing rounded-full peer dark:bg-darkToggleBgUnactive
10
+ <div class="afcl-toggle border border-lightToggleBorderUnactive relative min-w-9 min-h-5 bg-lightToggleBgUnactive peer-focus:outline-none peer-focus-visible:ring-[3px]
11
+ peer-focus-visible:ring-lightToggleRing dark:peer-focus-visible:ring-darkToggleRing rounded-full peer dark:bg-darkToggleBgUnactive
12
12
  peer-checked:after:translate-x-full rtl:peer-checked:after:-translate-x-full peer-checked:after:top-[2px] peer-checked:border-none
13
13
  peer-checked:after:border-lightToggleBorderActive after:content-[''] after:absolute after:top-[1px]
14
14
  after:start-[2px] after:bg-lightToggleCircleUnactive peer-checked:after:bg-lightToggleCircleActive dark:after:bg-darkToggleCircleUnactive after:border-lightToggleBgUnactive dark:after:border-darkToggleBgUnactive after:border after:rounded-full
15
- after:h-5 after:w-5 after:transition-all dark:border-darkToggleBorderUnactive peer-checked:bg-lightToggleBgActive
15
+ after:h-4 after:w-4 after:shadow-sm after:transition-all dark:border-darkToggleBorderUnactive peer-checked:bg-lightToggleBgActive
16
16
  dark:peer-checked:bg-darkToggleBgActive dark:peer-checked:after:border-darkToggleBorderActive dark:peer-checked:after:bg-darkToggleCircleActive">
17
17
  </div>
18
- <label :for="id" class="cursor-pointer ms-3 text-sm font-medium text-lightToggleText dark:text-darkToggleText">
18
+ <label :for="id" class="cursor-pointer ms-2.5 text-sm text-lightToggleText dark:text-darkToggleText">
19
19
  <slot></slot>
20
20
  </label>
21
21
  </label>
@@ -5,7 +5,7 @@
5
5
  <teleport to="body" v-if="showTooltip">
6
6
  <div
7
7
  role="tooltip"
8
- class="absolute z-[100] invisible inline-block px-3 py-2 text-sm font-medium text-lightTooltipText dark:darkTooltipText transition-opacity duration-300 bg-lightTooltipBackground rounded-lg shadow-sm opacity-0 tooltip dark:bg-darkTooltipBackground"
8
+ class="absolute z-[100] invisible inline-block px-2.5 py-1.5 text-xs font-medium text-lightTooltipText dark:text-darkTooltipText transition-opacity duration-150 bg-lightTooltipBackground rounded-md shadow-popover opacity-0 tooltip dark:bg-darkTooltipBackground dark:shadow-darkPopover"
9
9
  ref="tooltip"
10
10
  >
11
11
  <slot name="tooltip"></slot>
@@ -4,8 +4,9 @@
4
4
 
5
5
  <script setup lang="ts">
6
6
  import type ApexCharts from 'apexcharts';
7
- import { type ApexOptions } from 'apexcharts';
7
+ import type { ApexOptions } from 'apexcharts';
8
8
  import { ref, type Ref, watch, computed, onUnmounted } from 'vue';
9
+ import { mergeChartOptions } from './chartUtils';
9
10
  type ApexChartsConstructor = new (el: Element, options: ApexOptions) => ApexCharts;
10
11
 
11
12
  const chart: Ref<HTMLDivElement | null> = ref(null);
@@ -26,7 +27,7 @@ const optionsBase: ApexOptions = {
26
27
  chart: {
27
28
  height: 350,
28
29
  type: 'treemap',
29
- fontFamily: 'Inter, sans-serif',
30
+ fontFamily: "'Geist Variable', ui-sans-serif, sans-serif",
30
31
  toolbar: {
31
32
  show: false,
32
33
  },
@@ -37,7 +38,7 @@ const optionsBase: ApexOptions = {
37
38
  dataLabels: {
38
39
  enabled: true,
39
40
  style: {
40
- fontFamily: 'Inter, sans-serif',
41
+ fontFamily: "'Geist Variable', ui-sans-serif, sans-serif",
41
42
  colors: ['#FFFFFF'],
42
43
  },
43
44
  },
@@ -75,23 +76,7 @@ const options = computed(() => {
75
76
  })),
76
77
  };
77
78
 
78
- function mergeOptions(target: any, source: any) {
79
- if (!source) {
80
- return;
81
- }
82
- for (const key in source) {
83
- if (typeof source[key] === 'object' && !Array.isArray(source[key])) {
84
- if (!target[key]) {
85
- target[key] = {};
86
- }
87
- mergeOptions(target[key], source[key]);
88
- } else {
89
- target[key] = source[key];
90
- }
91
- }
92
- }
93
-
94
- mergeOptions(nextOptions, props.options);
79
+ mergeChartOptions(nextOptions, props.options);
95
80
  return nextOptions;
96
81
  });
97
82
 
@@ -1,20 +1,20 @@
1
1
  <template>
2
2
  <div class="md:flex">
3
- <ul class="ps-6 flex-column space-y space-y-4 text-sm font-medium text-lightVerticalTabsText dark:text-darkVerticalTabsText md:me-4 mb-4 md:mb-0 md:mr-0 mr-6">
3
+ <ul class="flex-column space-y-0.5 text-sm text-lightVerticalTabsText dark:text-darkVerticalTabsText md:me-4 mb-4 md:mb-0 md:mr-0 mr-6 md:min-w-[11rem]">
4
4
  <li v-for="tab in tabs" :key="`${tab}-tab-controll`">
5
5
  <a
6
6
  v-if="!props.hideTabesWhenSingle || tabs.length > 1"
7
7
  href="#"
8
8
  @click="setActiveTab(tab)"
9
- class="inline-flex items-center px-4 py-3 rounded-lg w-full"
10
- :class="tab === activeTab ? 'text-lightVerticalTabsTextActive bg-lightVerticalTabsBackgroundActive active dark:bg-darkVerticalTabsBackgroundActive dark:text-darkVerticalTabsTextActive' : 'text-lightVerticalTabsText dark:text-darkVerticalTabsText hover:text-lightVerticalTabsTextHover bg-lightVerticalTabsBackground hover:bg-lightVerticalTabsBackgroundHover dark:bg-darkVerticalTabsBackground dark:hover:bg-darkVerticalTabsBackgroundHover dark:hover:darkVerticalTabsTextHover'"
9
+ class="inline-flex items-center gap-2 px-3 py-2 rounded-default w-full transition-colors"
10
+ :class="tab === activeTab ? 'font-medium text-lightVerticalTabsTextActive bg-lightVerticalTabsBackgroundActive active dark:bg-darkVerticalTabsBackgroundActive dark:text-darkVerticalTabsTextActive' : 'text-lightVerticalTabsText dark:text-darkVerticalTabsText hover:text-lightVerticalTabsTextHover bg-lightVerticalTabsBackground hover:bg-lightVerticalTabsBackgroundHover dark:bg-darkVerticalTabsBackground dark:hover:bg-darkVerticalTabsBackgroundHover dark:hover:darkVerticalTabsTextHover'"
11
11
  aria-current="page"
12
12
  >
13
13
  <slot :name="`tab:${tab}`"></slot>
14
14
  </a>
15
15
  </li>
16
16
  </ul>
17
- <div class="ps-6 text-medium text-lightVerticalTabsSlotText dark:text-darkVerticalTabsSlotText w-full ">
17
+ <div class="md:ps-6 md:border-s md:border-lightFormBorder dark:md:border-darkFormBorder text-sm text-lightVerticalTabsSlotText dark:text-darkVerticalTabsSlotText w-full ">
18
18
  <slot :name="activeTab"></slot>
19
19
  </div>
20
20
  </div>