@innertia-solutions/nuxt-theme-spark 0.1.110 → 0.1.111
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/Admin/Header.vue +3 -3
- package/components/Admin/Page.vue +3 -3
- package/components/Admin/PageHeader.vue +4 -4
- package/components/App/Button.vue +2 -2
- package/components/App/Dropdown.vue +5 -5
- package/components/App/EmptyState.vue +3 -3
- package/components/App/LoadingState.vue +4 -4
- package/components/App/SwitchColorTheme.vue +2 -2
- package/components/App/Tag.vue +1 -1
- package/components/DataTable.vue +40 -40
- package/components/Forms/DatePicker.vue +1 -1
- package/components/Forms/Input.vue +5 -5
- package/components/Forms/Select.vue +6 -6
- package/components/Forms/SelectServer.vue +30 -30
- package/components/Layout/Auth.vue +4 -4
- package/components/Modal/DeleteConfirm.vue +1 -1
- package/components/Modal.vue +5 -5
- package/components/Nav/Tabs.vue +2 -2
- package/components/Table/Database.vue +4 -4
- package/components/Table/DownloadDropdown.vue +10 -10
- package/components/Table/FilterDropdown.vue +10 -10
- package/components/Table/Grid.vue +1 -1
- package/components/Table/Kanban.vue +7 -7
- package/components/Table/List.vue +6 -6
- package/components/Table.vue +6 -6
- package/components/TableExportable.vue +17 -17
- package/components/TableFilter.vue +7 -7
- package/components/Toast/Alert.vue +2 -2
- package/package.json +1 -1
|
@@ -7,10 +7,10 @@ const sidebar = inject('vantage:sidebar', null) as any
|
|
|
7
7
|
</script>
|
|
8
8
|
|
|
9
9
|
<template>
|
|
10
|
-
<header class="sticky top-0 z-40 bg-
|
|
10
|
+
<header class="sticky top-0 z-40 bg-card border-b border-card-line px-4 lg:px-6 h-14 flex items-center gap-x-3">
|
|
11
11
|
<!-- Hamburger mobile -->
|
|
12
12
|
<button type="button"
|
|
13
|
-
class="lg:hidden size-8 flex items-center justify-center text-
|
|
13
|
+
class="lg:hidden size-8 flex items-center justify-center text-muted-foreground hover:text-foreground"
|
|
14
14
|
@click="sidebar?.open()">
|
|
15
15
|
<svg class="size-5" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
|
|
16
16
|
<line x1="3" y1="6" x2="21" y2="6" /><line x1="3" y1="12" x2="21" y2="12" /><line x1="3" y1="18" x2="21" y2="18" />
|
|
@@ -20,7 +20,7 @@ const sidebar = inject('vantage:sidebar', null) as any
|
|
|
20
20
|
<!-- Left slot -->
|
|
21
21
|
<div class="flex-1 flex items-center gap-x-3">
|
|
22
22
|
<slot name="left">
|
|
23
|
-
<span v-if="title" class="text-sm font-medium text-
|
|
23
|
+
<span v-if="title" class="text-sm font-medium text-foreground">{{ title }}</span>
|
|
24
24
|
</slot>
|
|
25
25
|
</div>
|
|
26
26
|
|
|
@@ -13,15 +13,15 @@ const slots = useSlots()
|
|
|
13
13
|
const iconComponent = computed(() => props.icon ? TablerIcons[props.icon] ?? null : null)
|
|
14
14
|
|
|
15
15
|
const iconColorClass = computed(() => ({
|
|
16
|
-
slate: 'bg-
|
|
16
|
+
slate: 'bg-surface text-muted-foreground-1',
|
|
17
17
|
blue: 'bg-blue-100 dark:bg-blue-900/30 text-blue-600 dark:text-blue-400',
|
|
18
18
|
green: 'bg-green-100 dark:bg-green-900/30 text-green-600 dark:text-green-400',
|
|
19
19
|
amber: 'bg-amber-100 dark:bg-amber-900/30 text-amber-600 dark:text-amber-400',
|
|
20
20
|
red: 'bg-red-100 dark:bg-red-900/30 text-red-600 dark:text-red-400',
|
|
21
21
|
purple: 'bg-purple-100 dark:bg-purple-900/30 text-purple-600 dark:text-purple-400',
|
|
22
22
|
rose: 'bg-rose-100 dark:bg-rose-900/30 text-rose-600 dark:text-rose-400',
|
|
23
|
-
gray: 'bg-
|
|
24
|
-
}[props.color] ?? 'bg-
|
|
23
|
+
gray: 'bg-surface text-muted-foreground-1',
|
|
24
|
+
}[props.color] ?? 'bg-surface text-muted-foreground-1'))
|
|
25
25
|
</script>
|
|
26
26
|
|
|
27
27
|
<template>
|
|
@@ -8,15 +8,15 @@ defineProps<{
|
|
|
8
8
|
|
|
9
9
|
<template>
|
|
10
10
|
<div :class="sticky ? 'sticky top-3 z-20' : ''">
|
|
11
|
-
<div class="flex items-center justify-between bg-
|
|
11
|
+
<div class="flex items-center justify-between bg-card border border-card-line rounded-2xl shadow-sm px-4 py-3">
|
|
12
12
|
<div class="flex items-center gap-x-4">
|
|
13
13
|
<slot name="icon" />
|
|
14
14
|
<div>
|
|
15
15
|
<div class="flex items-baseline gap-x-2">
|
|
16
|
-
<h1 class="text-lg font-semibold text-
|
|
16
|
+
<h1 class="text-lg font-semibold text-foreground">{{ title }}</h1>
|
|
17
17
|
<template v-if="description">
|
|
18
|
-
<span class="size-1 rounded-full bg-
|
|
19
|
-
<p class="text-sm text-
|
|
18
|
+
<span class="size-1 rounded-full bg-surface-1 shrink-0 self-center"></span>
|
|
19
|
+
<p class="text-sm text-muted-foreground">{{ description }}</p>
|
|
20
20
|
</template>
|
|
21
21
|
</div>
|
|
22
22
|
<div v-if="$slots.breadcrumb" class="flex items-center gap-x-1 mt-0.5">
|
|
@@ -22,11 +22,11 @@ const iconSizeClasses = computed(() => ({ xs:"size-2", sm:"size-3", md:"size-4",
|
|
|
22
22
|
|
|
23
23
|
const severityClasses = computed(() => {
|
|
24
24
|
if (props.variant === "dropdown") {
|
|
25
|
-
const d = { primary:"text-blue-600 hover:bg-blue-50 dark:text-blue-400 dark:hover:bg-blue-900/20", secondary:"text-
|
|
25
|
+
const d = { primary:"text-blue-600 hover:bg-blue-50 dark:text-blue-400 dark:hover:bg-blue-900/20", secondary:"text-foreground hover:bg-muted-hover", success:"text-emerald-600 hover:bg-emerald-50 dark:text-emerald-400 dark:hover:bg-emerald-900/20", danger:"text-red-600 hover:bg-red-50 dark:text-red-400 dark:hover:bg-red-900/20", warning:"text-yellow-600 hover:bg-yellow-50 dark:text-yellow-400 dark:hover:bg-yellow-900/20", info:"text-cyan-600 hover:bg-cyan-50 dark:text-cyan-400 dark:hover:bg-cyan-900/20" }
|
|
26
26
|
return d[props.severity] || d.secondary
|
|
27
27
|
}
|
|
28
28
|
const base = "rounded-lg border transition-colors"
|
|
29
|
-
const v = { primary:"border-blue-600 bg-blue-50 text-blue-700 hover:bg-blue-100 dark:border-blue-500 dark:bg-blue-900/20 dark:text-blue-300 dark:hover:bg-blue-900/35", secondary:"border-slate-300 bg-slate-50 text-slate-700 hover:bg-
|
|
29
|
+
const v = { primary:"border-blue-600 bg-blue-50 text-blue-700 hover:bg-blue-100 dark:border-blue-500 dark:bg-blue-900/20 dark:text-blue-300 dark:hover:bg-blue-900/35", secondary:"border-slate-300 bg-slate-50 text-slate-700 hover:bg-muted-hover dark:border-card-line dark:bg-card dark:text-muted-foreground-1 dark:hover:bg-muted-hover", success:"border-emerald-600 bg-emerald-50 text-emerald-700 hover:bg-emerald-100 dark:border-emerald-500 dark:bg-emerald-900/20 dark:text-emerald-300 dark:hover:bg-emerald-900/35", danger:"border-red-600 bg-red-50 text-red-700 hover:bg-red-100 dark:border-red-500 dark:bg-red-900/20 dark:text-red-300 dark:hover:bg-red-900/35", warning:"border-yellow-600 bg-yellow-50 text-yellow-700 hover:bg-yellow-100 dark:border-yellow-500 dark:bg-yellow-900/20 dark:text-yellow-300 dark:hover:bg-yellow-900/35", info:"border-cyan-600 bg-cyan-50 text-cyan-700 hover:bg-cyan-100 dark:border-cyan-500 dark:bg-cyan-900/20 dark:text-cyan-300 dark:hover:bg-cyan-900/35" }
|
|
30
30
|
return `${base} ${v[props.severity] || v.primary}`
|
|
31
31
|
})
|
|
32
32
|
|
|
@@ -91,8 +91,8 @@ const triggerSeverityClasses = computed(() => {
|
|
|
91
91
|
? "border-blue-600 text-blue-600 hover:bg-blue-50 dark:border-blue-500 dark:text-blue-500 dark:hover:bg-blue-900/20"
|
|
92
92
|
: "border-transparent bg-blue-600 text-white hover:bg-blue-700 dark:bg-blue-600 dark:hover:bg-blue-700",
|
|
93
93
|
secondary: props.triggerOutline
|
|
94
|
-
? "border-
|
|
95
|
-
: "border-transparent bg-
|
|
94
|
+
? "border-card-line text-foreground hover:bg-muted-hover"
|
|
95
|
+
: "border-transparent bg-muted text-foreground hover:bg-muted-hover",
|
|
96
96
|
success: props.triggerOutline
|
|
97
97
|
? "border-green-600 text-green-600 hover:bg-green-50 dark:border-green-500 dark:text-green-500 dark:hover:bg-green-900/20"
|
|
98
98
|
: "border-transparent bg-green-600 text-white hover:bg-green-700 dark:bg-green-600 dark:hover:bg-green-700",
|
|
@@ -164,7 +164,7 @@ const getItemButtonClasses = (item) => {
|
|
|
164
164
|
|
|
165
165
|
const severityClasses = {
|
|
166
166
|
default:
|
|
167
|
-
"text-
|
|
167
|
+
"text-foreground hover:bg-muted-hover",
|
|
168
168
|
primary:
|
|
169
169
|
"text-blue-600 hover:bg-blue-50 dark:text-blue-400 dark:hover:bg-blue-900/20",
|
|
170
170
|
success:
|
|
@@ -231,7 +231,7 @@ const handleItemClick = (item, event) => {
|
|
|
231
231
|
|
|
232
232
|
<!-- Dropdown menu -->
|
|
233
233
|
<div
|
|
234
|
-
class="hs-dropdown-menu transition-[opacity,margin] duration hs-dropdown-open:opacity-100 opacity-0 hidden min-w-40 bg-
|
|
234
|
+
class="hs-dropdown-menu transition-[opacity,margin] duration hs-dropdown-open:opacity-100 opacity-0 hidden min-w-40 bg-dropdown shadow-md rounded-lg p-1 space-y-0.5 mt-2 dark:border dark:border-dropdown-line dark:divide-card-line z-50 border border-dropdown-line"
|
|
235
235
|
:class="[menuClass, placementClass]"
|
|
236
236
|
role="menu"
|
|
237
237
|
:aria-orientation="'vertical'"
|
|
@@ -265,7 +265,7 @@ const handleItemClick = (item, event) => {
|
|
|
265
265
|
<!-- Link if type is link or has href -->
|
|
266
266
|
<a
|
|
267
267
|
v-else
|
|
268
|
-
class="flex items-center gap-x-3.5 py-2 px-3 rounded-lg text-sm transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500
|
|
268
|
+
class="flex items-center gap-x-3.5 py-2 px-3 rounded-lg text-sm transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 text-foreground hover:bg-muted-hover"
|
|
269
269
|
:class="item.class"
|
|
270
270
|
:href="item.href || '#'"
|
|
271
271
|
@click="handleItemClick(item, $event)"
|
|
@@ -390,10 +390,10 @@ defineProps({
|
|
|
390
390
|
</slot>
|
|
391
391
|
|
|
392
392
|
<div class="max-w-sm mx-auto">
|
|
393
|
-
<p class="mt-2 font-medium text-
|
|
393
|
+
<p class="mt-2 font-medium text-foreground">
|
|
394
394
|
{{ title }}
|
|
395
395
|
</p>
|
|
396
|
-
<p class="mb-5 text-sm text-
|
|
396
|
+
<p class="mb-5 text-sm text-muted-foreground text-wrap">
|
|
397
397
|
{{ description }}
|
|
398
398
|
</p>
|
|
399
399
|
</div>
|
|
@@ -401,7 +401,7 @@ defineProps({
|
|
|
401
401
|
<a
|
|
402
402
|
v-if="showAction"
|
|
403
403
|
:href="actionLink"
|
|
404
|
-
class="py-2 px-3 inline-flex items-center gap-x-2 text-sm font-medium rounded-lg border border-
|
|
404
|
+
class="py-2 px-3 inline-flex items-center gap-x-2 text-sm font-medium rounded-lg border border-card-line bg-card text-foreground shadow-2xs hover:bg-muted-hover focus:outline-hidden focus:bg-muted-hover"
|
|
405
405
|
>
|
|
406
406
|
{{ actionText }}
|
|
407
407
|
</a>
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
>
|
|
5
5
|
<!-- Ícono/loader -->
|
|
6
6
|
<svg
|
|
7
|
-
class="animate-spin w-10 h-10 text-
|
|
7
|
+
class="animate-spin w-10 h-10 text-muted-foreground-2"
|
|
8
8
|
xmlns="http://www.w3.org/2000/svg"
|
|
9
9
|
viewBox="0 0 24 24"
|
|
10
10
|
fill="none"
|
|
@@ -20,14 +20,14 @@
|
|
|
20
20
|
<!-- Skeleton líneas -->
|
|
21
21
|
<div class="w-full max-w-xs space-y-3">
|
|
22
22
|
<div
|
|
23
|
-
class="h-4 bg-
|
|
23
|
+
class="h-4 bg-surface-1 rounded animate-pulse"
|
|
24
24
|
></div>
|
|
25
25
|
<div
|
|
26
|
-
class="h-4 bg-
|
|
26
|
+
class="h-4 bg-surface-1 rounded animate-pulse"
|
|
27
27
|
></div>
|
|
28
28
|
<div
|
|
29
29
|
v-if="showHint"
|
|
30
|
-
class="h-4 w-1/2 bg-
|
|
30
|
+
class="h-4 w-1/2 bg-surface-1 rounded animate-pulse mx-auto"
|
|
31
31
|
></div>
|
|
32
32
|
</div>
|
|
33
33
|
</div>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<template>
|
|
3
3
|
<button
|
|
4
4
|
type="button"
|
|
5
|
-
class="hs-dark-mode-active:hidden block hs-dark-mode font-medium text-slate-400 rounded-full hover:bg-
|
|
5
|
+
class="hs-dark-mode-active:hidden block hs-dark-mode font-medium text-slate-400 rounded-full hover:bg-surface focus:outline-hidden focus:bg-surface dark:text-foreground dark:hover:bg-card dark:focus:bg-card"
|
|
6
6
|
data-hs-theme-click-value="dark"
|
|
7
7
|
>
|
|
8
8
|
<span class="group inline-flex shrink-0 justify-center items-center size-9">
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
</button>
|
|
25
25
|
<button
|
|
26
26
|
type="button"
|
|
27
|
-
class="hs-dark-mode-active:block hidden hs-dark-mode font-medium text-slate-800 rounded-full hover:bg-
|
|
27
|
+
class="hs-dark-mode-active:block hidden hs-dark-mode font-medium text-slate-800 rounded-full hover:bg-surface focus:outline-hidden focus:bg-surface dark:text-foreground dark:hover:bg-card dark:focus:bg-card"
|
|
28
28
|
data-hs-theme-click-value="light"
|
|
29
29
|
>
|
|
30
30
|
<span class="group inline-flex shrink-0 justify-center items-center size-9">
|
package/components/App/Tag.vue
CHANGED
|
@@ -95,7 +95,7 @@ const severityClasses = computed(() => {
|
|
|
95
95
|
primary:
|
|
96
96
|
"border border-blue-600 text-blue-600 bg-blue-50 dark:border-blue-500 dark:text-blue-500 dark:bg-blue-900/20",
|
|
97
97
|
secondary:
|
|
98
|
-
"border border-
|
|
98
|
+
"border border-card-line text-muted-foreground-1 bg-card",
|
|
99
99
|
success:
|
|
100
100
|
"border border-green-600 text-green-600 bg-green-50 dark:border-green-500 dark:text-green-500 dark:bg-green-900/20",
|
|
101
101
|
danger:
|
package/components/DataTable.vue
CHANGED
|
@@ -425,10 +425,10 @@ const handleRowKeydown = (row, event) => {
|
|
|
425
425
|
<div class="relative">
|
|
426
426
|
<!-- Table view -->
|
|
427
427
|
<div v-if="!isGridView" class="overflow-x-auto relative">
|
|
428
|
-
<table class="relative min-w-full divide-y divide-
|
|
429
|
-
<thead class="relative z-20 bg-
|
|
428
|
+
<table class="relative min-w-full divide-y divide-card-line">
|
|
429
|
+
<thead class="relative z-20 bg-card">
|
|
430
430
|
<tr
|
|
431
|
-
class="divide-x divide-
|
|
431
|
+
class="divide-x divide-card-line"
|
|
432
432
|
:class="{ 'border-t border-gray-200': loading || data.length > 0 }"
|
|
433
433
|
>
|
|
434
434
|
<th v-if="checkable" class="text-center w-12">
|
|
@@ -436,7 +436,7 @@ const handleRowKeydown = (row, event) => {
|
|
|
436
436
|
type="checkbox"
|
|
437
437
|
:checked="isAllVisibleSelected"
|
|
438
438
|
@change="toggleSelectAll"
|
|
439
|
-
class="mx-2 shrink-0 border-gray-300 rounded-sm text-blue-900 focus:ring-blue-900 dark:bg-
|
|
439
|
+
class="mx-2 shrink-0 border-gray-300 rounded-sm text-blue-900 focus:ring-blue-900 dark:bg-card border-card-line"
|
|
440
440
|
/>
|
|
441
441
|
</th>
|
|
442
442
|
<th
|
|
@@ -447,7 +447,7 @@ const handleRowKeydown = (row, event) => {
|
|
|
447
447
|
@click="toggleSort(col)"
|
|
448
448
|
>
|
|
449
449
|
<div class="hs-dropdown relative inline-flex w-full cursor-pointer">
|
|
450
|
-
<button class="px-6 py-3 text-start w-full flex items-center gap-x-1 text-[11px] font-bold text-
|
|
450
|
+
<button class="px-6 py-3 text-start w-full flex items-center gap-x-1 text-[11px] font-bold text-muted-foreground uppercase tracking-wider">
|
|
451
451
|
{{ col.label }}
|
|
452
452
|
<span v-if="col.sortable">
|
|
453
453
|
<IconArrowsSort v-if="getSortDirection(col.key) === null" class="size-4" />
|
|
@@ -459,16 +459,16 @@ const handleRowKeydown = (row, event) => {
|
|
|
459
459
|
</th>
|
|
460
460
|
</tr>
|
|
461
461
|
</thead>
|
|
462
|
-
<tbody ref="tableBodyRef" class="divide-y divide-
|
|
462
|
+
<tbody ref="tableBodyRef" class="divide-y divide-card-line">
|
|
463
463
|
<!-- Loading skeleton -->
|
|
464
464
|
<tr
|
|
465
465
|
v-if="loading"
|
|
466
466
|
v-for="(_, index) in skeletonRows"
|
|
467
467
|
:key="'skeleton-' + index"
|
|
468
|
-
class="animate-pulse divide-x divide-
|
|
468
|
+
class="animate-pulse divide-x divide-card-line bg-card"
|
|
469
469
|
>
|
|
470
470
|
<td v-if="checkable" class="text-center w-12" :style="{ height: lastRowHeight + 'px' }">
|
|
471
|
-
<div class="w-4 h-4 bg-
|
|
471
|
+
<div class="w-4 h-4 bg-surface-1 rounded mx-auto"></div>
|
|
472
472
|
</td>
|
|
473
473
|
<td
|
|
474
474
|
v-for="col in columns"
|
|
@@ -477,7 +477,7 @@ const handleRowKeydown = (row, event) => {
|
|
|
477
477
|
:class="col.class || ''"
|
|
478
478
|
:style="{ height: lastRowHeight + 'px' }"
|
|
479
479
|
>
|
|
480
|
-
<div class="h-4 w-[50%] rounded bg-
|
|
480
|
+
<div class="h-4 w-[50%] rounded bg-surface-1"></div>
|
|
481
481
|
</td>
|
|
482
482
|
</tr>
|
|
483
483
|
|
|
@@ -486,10 +486,10 @@ const handleRowKeydown = (row, event) => {
|
|
|
486
486
|
v-if="!loading && data.length === 0"
|
|
487
487
|
v-for="(_, index) in skeletonRows"
|
|
488
488
|
:key="'empty-skeleton-' + index"
|
|
489
|
-
class="divide-x divide-
|
|
489
|
+
class="divide-x divide-card-line bg-card"
|
|
490
490
|
>
|
|
491
491
|
<td v-if="checkable" class="text-center w-12" :style="{ height: lastRowHeight + 'px' }">
|
|
492
|
-
<div class="w-4 h-4 bg-
|
|
492
|
+
<div class="w-4 h-4 bg-surface-1 rounded mx-auto"></div>
|
|
493
493
|
</td>
|
|
494
494
|
<td
|
|
495
495
|
v-for="col in columns"
|
|
@@ -498,7 +498,7 @@ const handleRowKeydown = (row, event) => {
|
|
|
498
498
|
:class="col.class || ''"
|
|
499
499
|
:style="{ height: lastRowHeight + 'px' }"
|
|
500
500
|
>
|
|
501
|
-
<div class="h-4 w-[50%] rounded bg-
|
|
501
|
+
<div class="h-4 w-[50%] rounded bg-surface"></div>
|
|
502
502
|
</td>
|
|
503
503
|
</tr>
|
|
504
504
|
|
|
@@ -510,7 +510,7 @@ const handleRowKeydown = (row, event) => {
|
|
|
510
510
|
@click="(event) => handleRowClick(row, event)"
|
|
511
511
|
@keydown="(event) => handleRowKeydown(row, event)"
|
|
512
512
|
:tabindex="isRowClickEnabled ? 0 : undefined"
|
|
513
|
-
class="divide-x divide-
|
|
513
|
+
class="divide-x divide-card-line bg-card hover:bg-muted"
|
|
514
514
|
:class="{ 'cursor-pointer': isRowClickEnabled }"
|
|
515
515
|
>
|
|
516
516
|
<td v-if="checkable" class="text-center w-12" @click.stop>
|
|
@@ -518,13 +518,13 @@ const handleRowKeydown = (row, event) => {
|
|
|
518
518
|
type="checkbox"
|
|
519
519
|
:checked="isRowSelected(row)"
|
|
520
520
|
@change="() => toggleRow(row)"
|
|
521
|
-
class="rounded border-
|
|
521
|
+
class="rounded border-card-line dark:bg-card"
|
|
522
522
|
/>
|
|
523
523
|
</td>
|
|
524
524
|
<td
|
|
525
525
|
v-for="col in columns"
|
|
526
526
|
:key="col.key"
|
|
527
|
-
class="px-6 py-3 relative group text-sm text-
|
|
527
|
+
class="px-6 py-3 relative group text-sm text-muted-foreground-1"
|
|
528
528
|
:class="col.class || ''"
|
|
529
529
|
>
|
|
530
530
|
<slot :name="col.key" :row="row" :value="row[col.key]">
|
|
@@ -538,19 +538,19 @@ const handleRowKeydown = (row, event) => {
|
|
|
538
538
|
<!-- Empty overlays -->
|
|
539
539
|
<div
|
|
540
540
|
v-if="!loading && data.length === 0 && !search"
|
|
541
|
-
class="absolute inset-0 z-10 pointer-events-none flex items-center justify-center backdrop-blur-sm bg-
|
|
541
|
+
class="absolute inset-0 z-10 pointer-events-none flex items-center justify-center backdrop-blur-sm bg-card/60 transition-all rounded-xl"
|
|
542
542
|
>
|
|
543
543
|
<slot name="empty">
|
|
544
|
-
<p class="text-
|
|
544
|
+
<p class="text-muted-foreground text-lg font-medium italic">No hay registros</p>
|
|
545
545
|
</slot>
|
|
546
546
|
</div>
|
|
547
547
|
|
|
548
548
|
<div
|
|
549
549
|
v-if="!loading && data.length === 0 && search"
|
|
550
|
-
class="absolute inset-0 z-10 pointer-events-none flex items-center justify-center backdrop-blur-sm bg-
|
|
550
|
+
class="absolute inset-0 z-10 pointer-events-none flex items-center justify-center backdrop-blur-sm bg-card/60 transition-all rounded-xl"
|
|
551
551
|
>
|
|
552
552
|
<slot name="empty-search">
|
|
553
|
-
<p class="text-
|
|
553
|
+
<p class="text-muted-foreground text-lg font-medium italic">No hay registros en la búsqueda</p>
|
|
554
554
|
</slot>
|
|
555
555
|
</div>
|
|
556
556
|
</div>
|
|
@@ -561,11 +561,11 @@ const handleRowKeydown = (row, event) => {
|
|
|
561
561
|
<div v-if="loading" :class="gridClass">
|
|
562
562
|
<div v-for="(_, index) in skeletonRows" :key="'grid-skeleton-' + index" class="animate-pulse">
|
|
563
563
|
<slot name="grid-skeleton">
|
|
564
|
-
<div class="bg-
|
|
564
|
+
<div class="bg-card rounded-lg border border-card-line p-4">
|
|
565
565
|
<div class="space-y-3">
|
|
566
|
-
<div class="h-4 bg-
|
|
567
|
-
<div class="h-4 bg-
|
|
568
|
-
<div class="h-6 bg-
|
|
566
|
+
<div class="h-4 bg-surface-1 rounded w-3/4"></div>
|
|
567
|
+
<div class="h-4 bg-surface-1 rounded w-1/2"></div>
|
|
568
|
+
<div class="h-6 bg-surface-1 rounded w-1/4"></div>
|
|
569
569
|
</div>
|
|
570
570
|
</div>
|
|
571
571
|
</slot>
|
|
@@ -583,19 +583,19 @@ const handleRowKeydown = (row, event) => {
|
|
|
583
583
|
:checkable="checkable"
|
|
584
584
|
:toggleRow="() => toggleRow(row)"
|
|
585
585
|
>
|
|
586
|
-
<div class="bg-
|
|
586
|
+
<div class="bg-card rounded-lg border border-card-line p-4 hover:shadow-md transition-shadow relative">
|
|
587
587
|
<div v-if="checkable" class="absolute top-2 left-2 z-10">
|
|
588
588
|
<input
|
|
589
589
|
type="checkbox"
|
|
590
590
|
:checked="isRowSelected(row)"
|
|
591
591
|
@change="() => toggleRow(row)"
|
|
592
|
-
class="rounded border-
|
|
592
|
+
class="rounded border-card-line dark:bg-card"
|
|
593
593
|
/>
|
|
594
594
|
</div>
|
|
595
595
|
<div class="space-y-2" :class="{ 'pt-6': checkable }">
|
|
596
596
|
<div v-for="col in columns" :key="col.key" class="flex justify-between">
|
|
597
|
-
<span class="text-sm text-
|
|
598
|
-
<span class="text-sm text-
|
|
597
|
+
<span class="text-sm text-muted-foreground">{{ col.label }}:</span>
|
|
598
|
+
<span class="text-sm text-foreground">
|
|
599
599
|
<slot :name="col.key" :row="row" :value="row[col.key]">{{ row[col.key] }}</slot>
|
|
600
600
|
</span>
|
|
601
601
|
</div>
|
|
@@ -607,10 +607,10 @@ const handleRowKeydown = (row, event) => {
|
|
|
607
607
|
<!-- Grid empty state -->
|
|
608
608
|
<div v-else class="flex items-center justify-center py-12">
|
|
609
609
|
<slot v-if="!search" name="empty">
|
|
610
|
-
<p class="text-
|
|
610
|
+
<p class="text-muted-foreground text-lg">No hay registros</p>
|
|
611
611
|
</slot>
|
|
612
612
|
<slot v-else name="empty-search">
|
|
613
|
-
<p class="text-
|
|
613
|
+
<p class="text-muted-foreground text-lg">No hay registros en la búsqueda</p>
|
|
614
614
|
</slot>
|
|
615
615
|
</div>
|
|
616
616
|
</div>
|
|
@@ -622,18 +622,18 @@ const handleRowKeydown = (row, event) => {
|
|
|
622
622
|
<div v-if="showReloadButton" class="flex items-center justify-start gap-x-2">
|
|
623
623
|
<IconReload
|
|
624
624
|
v-if="!loading"
|
|
625
|
-
class="size-4 cursor-pointer text-
|
|
625
|
+
class="size-4 cursor-pointer text-muted-foreground hover:text-muted-foreground-1 transition-colors"
|
|
626
626
|
@click="() => { clearCache(); isDataFromCache.value = false; fetchData(); }"
|
|
627
627
|
/>
|
|
628
628
|
<div v-if="loading">
|
|
629
|
-
<svg class="animate-spin size-4 text-
|
|
629
|
+
<svg class="animate-spin size-4 text-muted-foreground-2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
630
630
|
<circle cx="12" cy="12" r="10" opacity=".25" />
|
|
631
631
|
<path d="M22 12a10 10 0 0 1-10 10" />
|
|
632
632
|
</svg>
|
|
633
633
|
</div>
|
|
634
634
|
</div>
|
|
635
635
|
|
|
636
|
-
<p class="text-sm text-
|
|
636
|
+
<p class="text-sm text-foreground font-medium">{{ meta.total }} registros</p>
|
|
637
637
|
|
|
638
638
|
<div v-if="isDataFromCache && cached" class="group relative flex items-center">
|
|
639
639
|
<div class="flex items-center gap-x-1.5 py-1 px-2.5 bg-emerald-500/10 text-emerald-600 dark:text-emerald-400 rounded-lg cursor-help transition-colors hover:bg-emerald-500/20">
|
|
@@ -654,12 +654,12 @@ const handleRowKeydown = (row, event) => {
|
|
|
654
654
|
<!-- Right: per-page & pagination -->
|
|
655
655
|
<div class="flex items-center gap-x-8">
|
|
656
656
|
<div class="flex items-center gap-x-2">
|
|
657
|
-
<label class="text-[10px] font-bold text-
|
|
657
|
+
<label class="text-[10px] font-bold text-muted-foreground uppercase tracking-widest">Filas:</label>
|
|
658
658
|
<select
|
|
659
659
|
v-if="!isCustomPerPage"
|
|
660
660
|
:value="perPage"
|
|
661
661
|
@change="(e) => handlePerPageChange(e.target.value)"
|
|
662
|
-
class="bg-
|
|
662
|
+
class="bg-surface border-none text-[11px] font-bold text-muted-foreground-1 rounded-lg focus:ring-0 cursor-pointer py-1 pl-2 pr-8"
|
|
663
663
|
>
|
|
664
664
|
<option :value="10">10</option>
|
|
665
665
|
<option :value="25">25</option>
|
|
@@ -673,7 +673,7 @@ const handleRowKeydown = (row, event) => {
|
|
|
673
673
|
v-model.number="perPage"
|
|
674
674
|
min="1"
|
|
675
675
|
max="500"
|
|
676
|
-
class="w-14 bg-
|
|
676
|
+
class="w-14 bg-surface border-none text-[11px] font-bold text-muted-foreground-1 rounded-lg focus:ring-2 focus:ring-indigo-500/20 py-1 px-2"
|
|
677
677
|
@blur="perPage = perPage || 10"
|
|
678
678
|
/>
|
|
679
679
|
<button @click="resetPerPage" class="text-[10px] text-indigo-500 font-bold hover:underline">Volver</button>
|
|
@@ -683,7 +683,7 @@ const handleRowKeydown = (row, event) => {
|
|
|
683
683
|
<nav class="flex justify-end items-center gap-x-1" aria-label="Pagination">
|
|
684
684
|
<button
|
|
685
685
|
type="button"
|
|
686
|
-
class="size-8 flex items-center justify-center rounded-lg text-
|
|
686
|
+
class="size-8 flex items-center justify-center rounded-lg text-foreground hover:bg-muted-hover disabled:opacity-30"
|
|
687
687
|
:disabled="page <= 1"
|
|
688
688
|
@click="goToPreviousPage"
|
|
689
689
|
>
|
|
@@ -692,13 +692,13 @@ const handleRowKeydown = (row, event) => {
|
|
|
692
692
|
</svg>
|
|
693
693
|
</button>
|
|
694
694
|
<div class="flex items-center gap-x-1 mx-2">
|
|
695
|
-
<span class="size-8 flex items-center justify-center text-xs font-bold rounded-lg bg-
|
|
696
|
-
<span class="text-[10px] font-bold text-
|
|
697
|
-
<span class="text-[10px] font-bold text-
|
|
695
|
+
<span class="size-8 flex items-center justify-center text-xs font-bold rounded-lg bg-surface text-foreground">{{ meta.current_page }}</span>
|
|
696
|
+
<span class="text-[10px] font-bold text-muted-foreground uppercase mx-1">de</span>
|
|
697
|
+
<span class="text-[10px] font-bold text-muted-foreground">{{ meta.last_page }}</span>
|
|
698
698
|
</div>
|
|
699
699
|
<button
|
|
700
700
|
type="button"
|
|
701
|
-
class="size-8 flex items-center justify-center rounded-lg text-
|
|
701
|
+
class="size-8 flex items-center justify-center rounded-lg text-foreground hover:bg-muted-hover disabled:opacity-30"
|
|
702
702
|
:disabled="page >= meta.last_page"
|
|
703
703
|
@click="goToNextPage"
|
|
704
704
|
>
|
|
@@ -190,7 +190,7 @@ const clear = () => {
|
|
|
190
190
|
:value="internalValue"
|
|
191
191
|
:disabled="disabled"
|
|
192
192
|
:placeholder="placeholder"
|
|
193
|
-
class="w-full py-2 ps-10 pe-10 border border-gray-300 rounded-lg text-sm dark:bg-
|
|
193
|
+
class="w-full py-2 ps-10 pe-10 border border-gray-300 rounded-lg text-sm dark:bg-card dark:border-card-line dark:text-white disabled:opacity-50 disabled:pointer-events-none cursor-pointer focus:border-blue-500 focus:ring-blue-500/20 outline-none transition-all block"
|
|
194
194
|
readonly
|
|
195
195
|
/>
|
|
196
196
|
|
|
@@ -22,18 +22,18 @@ const inputType = computed(() => {
|
|
|
22
22
|
return props.type ?? 'text'
|
|
23
23
|
})
|
|
24
24
|
|
|
25
|
-
const baseClasses = 'py-2 px-3 block w-full rounded-lg text-sm text-slate-800 border border-
|
|
25
|
+
const baseClasses = 'py-2 px-3 block w-full rounded-lg text-sm text-slate-800 border border-card-line focus:ring-0 focus:border-gray-400 focus:outline-none disabled:opacity-50 dark:bg-transparent dark:text-muted-foreground-1 transition-colors placeholder:text-muted-foreground dark:placeholder:text-muted-foreground'
|
|
26
26
|
</script>
|
|
27
27
|
|
|
28
28
|
<template>
|
|
29
29
|
<div class="w-full">
|
|
30
|
-
<label v-if="label" class="block text-sm font-medium text-
|
|
30
|
+
<label v-if="label" class="block text-sm font-medium text-foreground mb-1.5">
|
|
31
31
|
{{ label }}
|
|
32
32
|
</label>
|
|
33
33
|
|
|
34
34
|
<div class="relative">
|
|
35
35
|
<!-- Ícono izquierdo -->
|
|
36
|
-
<div v-if="iconLeft" class="absolute inset-y-0 start-0 flex items-center ps-3 pointer-events-none text-
|
|
36
|
+
<div v-if="iconLeft" class="absolute inset-y-0 start-0 flex items-center ps-3 pointer-events-none text-muted-foreground">
|
|
37
37
|
<component :is="iconLeft" class="size-4" />
|
|
38
38
|
</div>
|
|
39
39
|
|
|
@@ -56,7 +56,7 @@ const baseClasses = 'py-2 px-3 block w-full rounded-lg text-sm text-slate-800 bo
|
|
|
56
56
|
v-if="type === 'password'"
|
|
57
57
|
type="button"
|
|
58
58
|
tabindex="-1"
|
|
59
|
-
class="absolute inset-y-0 end-0 flex items-center px-3 text-
|
|
59
|
+
class="absolute inset-y-0 end-0 flex items-center px-3 text-muted-foreground hover:text-muted-foreground-1 transition-colors"
|
|
60
60
|
@click="showPassword = !showPassword"
|
|
61
61
|
>
|
|
62
62
|
<component :is="showPassword ? IconEyeOff : IconEye" class="size-4" />
|
|
@@ -67,6 +67,6 @@ const baseClasses = 'py-2 px-3 block w-full rounded-lg text-sm text-slate-800 bo
|
|
|
67
67
|
<p v-if="error" class="text-xs text-red-500 dark:text-red-400 mt-1">{{ error }}</p>
|
|
68
68
|
|
|
69
69
|
<!-- Hint -->
|
|
70
|
-
<p v-else-if="hint" class="text-xs text-
|
|
70
|
+
<p v-else-if="hint" class="text-xs text-muted-foreground mt-1">{{ hint }}</p>
|
|
71
71
|
</div>
|
|
72
72
|
</template>
|
|
@@ -46,14 +46,14 @@ const handleChange = (e: Event) => {
|
|
|
46
46
|
<template>
|
|
47
47
|
<div class="space-y-1.5">
|
|
48
48
|
<!-- Label -->
|
|
49
|
-
<label v-if="label" class="block text-sm font-medium text-
|
|
49
|
+
<label v-if="label" class="block text-sm font-medium text-foreground">
|
|
50
50
|
{{ label }}
|
|
51
51
|
</label>
|
|
52
52
|
|
|
53
53
|
<!-- Select (HSSelect) -->
|
|
54
54
|
<ClientOnly>
|
|
55
55
|
<template #fallback>
|
|
56
|
-
<div class="h-[38px] bg-
|
|
56
|
+
<div class="h-[38px] bg-surface animate-pulse rounded-lg" />
|
|
57
57
|
</template>
|
|
58
58
|
|
|
59
59
|
<div :class="['relative', error ? 'select-error' : '']">
|
|
@@ -66,9 +66,9 @@ const handleChange = (e: Event) => {
|
|
|
66
66
|
data-hs-select='{
|
|
67
67
|
"placeholder": "Seleccionar...",
|
|
68
68
|
"toggleTag": "<button type=\"button\" aria-expanded=\"false\"></button>",
|
|
69
|
-
"toggleClasses": "hs-select-disabled:pointer-events-none hs-select-disabled:opacity-50 relative py-2 ps-4 pe-9 flex gap-x-2 text-nowrap w-full cursor-pointer bg-
|
|
70
|
-
"dropdownClasses": "mt-1 z-50 w-full max-h-72 p-1 space-y-0.5 bg-
|
|
71
|
-
"optionClasses": "py-2 px-4 w-full text-sm text-
|
|
69
|
+
"toggleClasses": "hs-select-disabled:pointer-events-none hs-select-disabled:opacity-50 relative py-2 ps-4 pe-9 flex gap-x-2 text-nowrap w-full cursor-pointer bg-card border border-card-line rounded-lg text-start text-sm focus:outline-hidden focus:ring-2 focus:ring-blue-500 dark:text-muted-foreground-1 dark:focus:outline-hidden dark:focus:ring-1 dark:focus:ring-blue-600",
|
|
70
|
+
"dropdownClasses": "mt-1 z-50 w-full max-h-72 p-1 space-y-0.5 bg-dropdown border border-dropdown-line rounded-lg overflow-hidden overflow-y-auto shadow-lg",
|
|
71
|
+
"optionClasses": "py-2 px-4 w-full text-sm text-foreground cursor-pointer hover:bg-muted-hover rounded-lg focus:outline-hidden focus:bg-muted-hover dark:bg-card",
|
|
72
72
|
"optionTemplate": "<div class=\"flex justify-between items-center w-full\"><span data-title></span><span class=\"hidden hs-selected:block\"><svg class=\"shrink-0 size-3.5 text-blue-600 dark:text-blue-500\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><polyline points=\"20 6 9 17 4 12\"/></svg></span></div>"
|
|
73
73
|
}'
|
|
74
74
|
>
|
|
@@ -88,7 +88,7 @@ const handleChange = (e: Event) => {
|
|
|
88
88
|
<p v-if="error" class="text-xs text-red-500 dark:text-red-400">{{ error }}</p>
|
|
89
89
|
|
|
90
90
|
<!-- Hint -->
|
|
91
|
-
<p v-else-if="hint" class="text-xs text-
|
|
91
|
+
<p v-else-if="hint" class="text-xs text-muted-foreground">{{ hint }}</p>
|
|
92
92
|
</div>
|
|
93
93
|
</template>
|
|
94
94
|
|